node_modules/pinia/dist/pinia.iife.js
/**
   * Mutates in place `newState` with `oldState` to _hot update_ it. It will
   * remove any key not existing in `newState` and recursively merge plain
   * objects.
   *
   * @param newState - new state object to be patched
   * @param oldState - old state that should be used to patch newState
   * @returns - newState
   */
Mutates in place `newState` with `oldState` to _hot update_ it. It will
remove any key not existing in `newState` and recursively merge plain
objects.

@param newState - new state object to be patched
@param oldState - old state that should be used to patch newState
@returns - newState
Mutates in place ` newState ` with ` oldState ` to _hot update_ it . It will remove any key not existing in ` newState ` and recursively merge plain objects . @param newState - new state object to be patched @param oldState - old state that should be used to patch newState @returns - newState
function patchObject(newState, oldState) {
      for (const key in oldState) {
          const subPatch = oldState[key];
          if (!(key in newState)) {
              continue;
          }
          const targetValue = newState[key];
          if (isPlainObject(targetValue) &&
              isPlainObject(subPatch) &&
              !vueDemi.isRef(subPatch) &&
              !vueDemi.isReactive(subPatch)) {
              newState[key] = patchObject(targetValue, subPatch);
          }
          else {
              if (vueDemi.isVue2) {
                  vueDemi.set(newState, key, subPatch);
              }
              else {
                  newState[key] = subPatch;
              }
          }
      }
      return newState;
  }
function patchObject ( newState , oldState ) { for ( const key in oldState ) { const subPatch = oldState [ key ] ; if ( ! ( key in newState ) ) { continue ; } const targetValue = newState [ key ] ; if ( isPlainObject ( targetValue ) && isPlainObject ( subPatch ) && ! vueDemi . isRef ( subPatch ) && ! vueDemi . isReactive ( subPatch ) ) { newState [ key ] = patchObject ( targetValue , subPatch ) ; } else { if ( vueDemi . isVue2 ) { vueDemi . set ( newState , key , subPatch ) ; } else { newState [ key ] = subPatch ; } } } return newState ; }
Mutates in place `newState` with `oldState` to _hot update_ it.
Mutates in place ` newState ` with ` oldState ` to _hot update_ it .
// no need to go through symbols because they cannot be serialized anyway // skip the whole sub tree // objects are either a bit more complex (e.g. refs) or primitives, so we // just set the whole thing