node_modules/pinia/dist/pinia.iife.js
/**
   * Allows using state and getters from one store without using the composition
   * API (`setup()`) by generating an object to be spread in the `computed` field
   * of a component.
   *
   * @param useStore - store to map from
   * @param keysOrMapper - array or object
   */
Allows using state and getters from one store without using the composition
API (`setup()`) by generating an object to be spread in the `computed` field
of a component.

@param useStore - store to map from
@param keysOrMapper - array or object
Allows using state and getters from one store without using the composition API ( ` setup () ` ) by generating an object to be spread in the ` computed ` field of a component . @param useStore - store to map from @param keysOrMapper - array or object
function mapState(useStore, keysOrMapper) {
      return Array.isArray(keysOrMapper)
          ? keysOrMapper.reduce((reduced, key) => {
              reduced[key] = function () {
                  return useStore(this.$pinia)[key];
              };
              return reduced;
          }, {})
          : Object.keys(keysOrMapper).reduce((reduced, key) => {
              reduced[key] = function () {
                  const store = useStore(this.$pinia);
                  const storeKey = keysOrMapper[key];
                  return typeof storeKey === 'function'
                      ? storeKey.call(this, store)
                      : store[storeKey];
              };
              return reduced;
          }, {});
  }
function mapState ( useStore , keysOrMapper ) { return Array . isArray ( keysOrMapper ) ? keysOrMapper . reduce ( ( reduced , key ) => { reduced [ key ] = function ( ) { return useStore ( this . $pinia ) [ key ] ; } ; return reduced ; } , { } ) : Object . keys ( keysOrMapper ) . reduce ( ( reduced , key ) => { reduced [ key ] = function ( ) { const store = useStore ( this . $pinia ) ; const storeKey = keysOrMapper [ key ] ; return typeof storeKey === 'function' ? storeKey . call ( this , store ) : store [ storeKey ] ; } ; return reduced ; } , { } ) ; }
Allows using state and getters from one store without using the composition
 API (`setup()`) by generating an object to be spread in the `computed` field
 of a component.
Allows using state and getters from one store without using the composition API ( ` setup () ` ) by generating an object to be spread in the ` computed ` field of a component .
// @ts-expect-error // for some reason TS is unable to infer the type of storeKey to be a // function