@powerhousedao/connect 2.5.0-dev.13 → 2.5.0-dev.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/.env +1 -1
  2. package/dist/assets/{app-CfLgnxyV.js → app-S6QDL9-4.js} +226 -58
  3. package/dist/assets/{app-CfLgnxyV.js.map → app-S6QDL9-4.js.map} +1 -1
  4. package/dist/assets/{app-loader-Da3bAkvN.js → app-loader-CeI8w5EJ.js} +9 -8
  5. package/dist/assets/{app-loader-Da3bAkvN.js.map → app-loader-CeI8w5EJ.js.map} +1 -1
  6. package/dist/assets/{ccip-XyzcC2OO.js → ccip--a_phOwR.js} +4 -4
  7. package/dist/assets/{ccip-XyzcC2OO.js.map → ccip--a_phOwR.js.map} +1 -1
  8. package/dist/assets/{content-moRQPp_g.js → content-C3XYytMU.js} +73 -72
  9. package/dist/assets/{content-moRQPp_g.js.map → content-C3XYytMU.js.map} +1 -1
  10. package/dist/assets/{index-DpU1evrL.js → index-B_EhPARV.js} +4 -4
  11. package/dist/assets/{index-DpU1evrL.js.map → index-B_EhPARV.js.map} +1 -1
  12. package/dist/assets/{index-BX6L7YIm.js → index-BmErA8AK.js} +5 -5
  13. package/dist/assets/{index-BX6L7YIm.js.map → index-BmErA8AK.js.map} +1 -1
  14. package/dist/assets/{index-C5pmKsbl.js → index-CWkAUjtO.js} +19 -12
  15. package/dist/assets/index-CWkAUjtO.js.map +1 -0
  16. package/dist/assets/{index-47_dwZnB.js → index-Cab-yuSh.js} +4 -4
  17. package/dist/assets/{index-47_dwZnB.js.map → index-Cab-yuSh.js.map} +1 -1
  18. package/dist/assets/{index-CS-ArJoi.js → index-svGQ6i0k.js} +4 -4
  19. package/dist/assets/{index-CS-ArJoi.js.map → index-svGQ6i0k.js.map} +1 -1
  20. package/dist/assets/{main.DP5LHvly.js → main.C76YRa2t.js} +2 -2
  21. package/dist/assets/{main.DP5LHvly.js.map → main.C76YRa2t.js.map} +1 -1
  22. package/dist/assets/{nodefs-DPnN6Ar0.js → nodefs-BiMqirwn.js} +4 -4
  23. package/dist/assets/{nodefs-DPnN6Ar0.js.map → nodefs-BiMqirwn.js.map} +1 -1
  24. package/dist/assets/{opfs-ahp-CEfWDHTR.js → opfs-ahp-De_iDcOG.js} +4 -4
  25. package/dist/assets/{opfs-ahp-CEfWDHTR.js.map → opfs-ahp-De_iDcOG.js.map} +1 -1
  26. package/dist/assets/{reactor-analytics-CC_4d7Yq.js → reactor-analytics-kgPbPIsY.js} +21 -16
  27. package/dist/assets/reactor-analytics-kgPbPIsY.js.map +1 -0
  28. package/dist/assets/{router-CjiZKsCh.js → router-C0R6sEgb.js} +6 -6
  29. package/dist/assets/{router-CjiZKsCh.js.map → router-C0R6sEgb.js.map} +1 -1
  30. package/dist/index.html +2 -2
  31. package/dist/swEnv.js +1 -1
  32. package/dist/vite-envs.sh +3 -3
  33. package/package.json +10 -10
  34. package/dist/assets/index-C5pmKsbl.js.map +0 -1
  35. package/dist/assets/reactor-analytics-CC_4d7Yq.js.map +0 -1
package/dist/.env CHANGED
@@ -10,7 +10,7 @@ SENTRY_PROJECT=""
10
10
  LOG_LEVEL="info"
11
11
 
12
12
  ## app configuration & feature flags
13
- PH_CONNECT_DISABLE_ADD_DRIVE=true
13
+ PH_CONNECT_DISABLE_ADD_DRIVE="false"
14
14
  PH_CONNECT_WARN_OUTDATED_APP="false"
15
15
  PH_CONNECT_STUDIO_MODE="false"
16
16
  PH_CONNECT_ROUTER_BASENAME="/"
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ccip-XyzcC2OO.js","assets/main.DP5LHvly.js","assets/app-loader-Da3bAkvN.js","assets/app-loader-CDW9U8zV.css","assets/index-BX6L7YIm.js","assets/index-CS-ArJoi.js","assets/style-C0GVbPTL.css","assets/nodefs-DPnN6Ar0.js","assets/opfs-ahp-CEfWDHTR.js","assets/router-CjiZKsCh.js","assets/reactor-analytics-CC_4d7Yq.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ccip--a_phOwR.js","assets/main.C76YRa2t.js","assets/app-loader-CeI8w5EJ.js","assets/app-loader-CDW9U8zV.css","assets/index-BmErA8AK.js","assets/index-svGQ6i0k.js","assets/style-C0GVbPTL.css","assets/nodefs-BiMqirwn.js","assets/opfs-ahp-De_iDcOG.js","assets/router-C0R6sEgb.js","assets/reactor-analytics-kgPbPIsY.js"])))=>i.map(i=>d[i]);
2
2
  var __defProp2 = Object.defineProperty;
3
3
  var __typeError = (msg) => {
4
4
  throw TypeError(msg);
@@ -18,12 +18,12 @@ var __privateWrapper = (obj, member, setter, getter) => ({
18
18
  return __privateGet(obj, member, getter);
19
19
  }
20
20
  });
21
- var _InternalTransmitter_instances, buildInternalOperationUpdate_fn, _focused, _cleanup, _setup, _a, _online, _cleanup2, _setup2, _b, _gcTimeout, _c, _initialState, _revertState, _cache, _client, _retryer, _defaultOptions, _abortSignalConsumed, _Query_instances, dispatch_fn, _d, _queries, _e2, _observers, _mutationCache, _retryer2, _Mutation_instances, dispatch_fn2, _f, _mutations, _scopes, _mutationId, _g, _queryCache, _mutationCache2, _defaultOptions2, _queryDefaults, _mutationDefaults, _mountCount, _unsubscribeFocus, _unsubscribeOnline, _h, _client2, _currentQuery, _currentQueryInitialState, _currentResult, _currentResultState, _currentResultOptions, _currentThenable, _selectError, _selectFn, _selectResult, _lastQueryWithDefinedData, _staleTimeoutId, _refetchIntervalId, _currentRefetchInterval, _trackedProps, _QueryObserver_instances, executeFetch_fn, updateStaleTimeout_fn, computeRefetchInterval_fn, updateRefetchInterval_fn, updateTimers_fn, clearStaleTimeout_fn, clearRefetchInterval_fn, updateQuery_fn, notify_fn, _i, _subtleCrypto, _keyPair, _keyPairStorage, _did, _bearerToken, _ConnectCrypto_instances, initCrypto_fn, initialize_fn, parseDid_fn, generateECDSAKeyPair_fn, exportKeyPair_fn, importKeyPair_fn, _sign, _verify, stringToBytes_fn;
22
- import { _ as __vitePreload } from "./main.DP5LHvly.js";
21
+ var _InternalTransmitter_instances, buildInternalOperationUpdate_fn, _focused, _cleanup, _setup, _a, _online, _cleanup2, _setup2, _b, _gcTimeout, _c, _initialState, _revertState, _cache, _client, _retryer, _defaultOptions, _abortSignalConsumed, _Query_instances, dispatch_fn, _d, _queries, _e2, _observers, _mutationCache, _retryer2, _Mutation_instances, dispatch_fn2, _f, _mutations, _scopes, _mutationId, _g, _queryCache, _mutationCache2, _defaultOptions2, _queryDefaults, _mutationDefaults, _mountCount, _unsubscribeFocus, _unsubscribeOnline, _h, _client2, _currentQuery, _currentQueryInitialState, _currentResult, _currentResultState, _currentResultOptions, _currentThenable, _selectError, _selectFn, _selectResult, _lastQueryWithDefinedData, _staleTimeoutId, _refetchIntervalId, _currentRefetchInterval, _trackedProps, _QueryObserver_instances, executeFetch_fn, updateStaleTimeout_fn, computeRefetchInterval_fn, updateRefetchInterval_fn, updateTimers_fn, clearStaleTimeout_fn, clearRefetchInterval_fn, updateQuery_fn, notify_fn, _i, _client3, _currentResult2, _currentMutation, _mutateOptions, _MutationObserver_instances, updateResult_fn, notify_fn2, _j, _subtleCrypto, _keyPair, _keyPairStorage, _did, _bearerToken, _ConnectCrypto_instances, initCrypto_fn, initialize_fn, parseDid_fn, generateECDSAKeyPair_fn, exportKeyPair_fn, importKeyPair_fn, _sign, _verify, stringToBytes_fn;
22
+ import { _ as __vitePreload } from "./main.C76YRa2t.js";
23
23
  import { jsx as jsx$1, Fragment, jsxs } from "react/jsx-runtime";
24
24
  import * as React from "react";
25
25
  import React__default, { useLayoutEffect, useEffect, useState, forwardRef, Suspense, useCallback, useContext, useRef, useMemo, createContext, Component, Fragment as Fragment$1, createElement, useReducer, useDebugValue, useId as useId$1, useSyncExternalStore, isValidElement, cloneElement, Children, lazy } from "react";
26
- import { c as createAction, a as createReducer, i as isDocumentAction, R as ReorderStateExamplesInputSchema, D as DeleteStateExampleInputSchema, U as UpdateStateExampleInputSchema, A as AddStateExampleInputSchema, S as SetInitialStateInputSchema, b as SetStateSchemaInputSchema, d as ReorderModuleOperationsInputSchema, e as DeleteOperationInputSchema, M as MoveOperationInputSchema, f as SetOperationReducerInputSchema, g as SetOperationTemplateInputSchema, h as SetOperationDescriptionInputSchema, j as SetOperationSchemaInputSchema, k as SetOperationScopeInputSchema, l as SetOperationNameInputSchema, m as AddOperationInputSchema, n as ReorderOperationExamplesInputSchema, o as DeleteOperationExampleInputSchema, p as UpdateOperationExampleInputSchema, q as AddOperationExampleInputSchema, r as ReorderOperationErrorsInputSchema, s as DeleteOperationErrorInputSchema, t as SetOperationErrorTemplateInputSchema, u as SetOperationErrorDescriptionInputSchema, v as SetOperationErrorNameInputSchema, w as SetOperationErrorCodeInputSchema, x as AddOperationErrorInputSchema, y as ReorderModulesInputSchema, z as DeleteModuleInputSchema, B as SetModuleDescriptionInputSchema, C as SetModuleNameInputSchema, E as AddModuleInputSchema, F as ReorderChangeLogItemsInputSchema, G as DeleteChangeLogItemInputSchema, H as UpdateChangeLogItemInputSchema, I as AddChangeLogItemInputSchema, J as SetAuthorWebsiteInputSchema, K as SetAuthorNameInputSchema, L as SetModelDescriptionInputSchema, N as SetModelExtensionInputSchema, O as SetModelIdInputSchema, P as SetModelNameInputSchema, Q as baseCreateExtendedState, T as baseCreateDocument, V as baseSaveToFile, W as baseSaveToFileHandle, X as baseLoadFromFile, Y as baseLoadFromInput, Z as pascalCase, _ as RunAsap, $ as logger$4, a0 as utils$4, a1 as getDefaultExportFromCjs, a2 as LOCAL, a3 as commonjsGlobal, a4 as PUBLIC, a5 as SWITCHBOARD, a6 as objectType, a7 as recordType, a8 as stringType, a9 as capitalCase, aa as CLOUD, ab as getAugmentedNamespace, ac as createZip, ad as buildSignedOperation, ae as getI18n, af as getDefaults, ag as connectConfig, ah as childLogger, ai as process, aj as setErrorHandler, ak as module, al as createBrowserDocumentDriveServer, am as createBrowserStorage, an as generateId, ao as ReadDriveNotFoundError, ap as hashDocumentStateForScope, aq as reducer$8, ar as isDocumentDrive, as as generateAddNodeAction, at as isFileNode, au as uploadDocumentOperations, av as updateFile, aw as addFolder, ax as isFolderNode, ay as deleteNode, az as updateNode, aA as moveNode, aB as generateNodesCopy, aC as copyNode, aD as setDriveName, aE as setAvailableOffline, aF as setSharingType, aG as SynchronizationUnitNotFoundError, aH as removeTrigger, aI as PullResponderTransmitter, aJ as addTrigger, aK as requestPublicDrive, aL as serviceWorkerManager, aM as packageJson, aN as t$1 } from "./app-loader-Da3bAkvN.js";
26
+ import { c as createAction, a as createReducer, i as isDocumentAction, R as ReorderStateExamplesInputSchema, D as DeleteStateExampleInputSchema, U as UpdateStateExampleInputSchema, A as AddStateExampleInputSchema, S as SetInitialStateInputSchema, b as SetStateSchemaInputSchema, d as ReorderModuleOperationsInputSchema, e as DeleteOperationInputSchema, M as MoveOperationInputSchema, f as SetOperationReducerInputSchema, g as SetOperationTemplateInputSchema, h as SetOperationDescriptionInputSchema, j as SetOperationSchemaInputSchema, k as SetOperationScopeInputSchema, l as SetOperationNameInputSchema, m as AddOperationInputSchema, n as ReorderOperationExamplesInputSchema, o as DeleteOperationExampleInputSchema, p as UpdateOperationExampleInputSchema, q as AddOperationExampleInputSchema, r as ReorderOperationErrorsInputSchema, s as DeleteOperationErrorInputSchema, t as SetOperationErrorTemplateInputSchema, u as SetOperationErrorDescriptionInputSchema, v as SetOperationErrorNameInputSchema, w as SetOperationErrorCodeInputSchema, x as AddOperationErrorInputSchema, y as ReorderModulesInputSchema, z as DeleteModuleInputSchema, B as SetModuleDescriptionInputSchema, C as SetModuleNameInputSchema, E as AddModuleInputSchema, F as ReorderChangeLogItemsInputSchema, G as DeleteChangeLogItemInputSchema, H as UpdateChangeLogItemInputSchema, I as AddChangeLogItemInputSchema, J as SetAuthorWebsiteInputSchema, K as SetAuthorNameInputSchema, L as SetModelDescriptionInputSchema, N as SetModelExtensionInputSchema, O as SetModelIdInputSchema, P as SetModelNameInputSchema, Q as baseCreateExtendedState, T as baseCreateDocument, V as baseSaveToFile, W as baseSaveToFileHandle, X as baseLoadFromFile, Y as baseLoadFromInput, Z as pascalCase, _ as RunAsap, $ as logger$4, a0 as utils$4, a1 as getDefaultExportFromCjs, a2 as LOCAL, a3 as commonjsGlobal, a4 as PUBLIC, a5 as SWITCHBOARD, a6 as objectType, a7 as recordType, a8 as stringType, a9 as capitalCase, aa as CLOUD, ab as getAugmentedNamespace, ac as createZip, ad as buildSignedOperation, ae as getI18n, af as getDefaults, ag as connectConfig, ah as childLogger, ai as process, aj as setErrorHandler, ak as module, al as createBrowserDocumentDriveServer, am as createBrowserStorage, an as generateId, ao as ReadDriveNotFoundError, ap as hashDocumentStateForScope, aq as reducer$8, ar as isDocumentDrive, as as generateAddNodeAction, at as isFileNode, au as uploadDocumentOperations, av as updateFile, aw as addFolder, ax as isFolderNode, ay as deleteNode, az as updateNode, aA as moveNode, aB as generateNodesCopy, aC as copyNode, aD as setDriveName, aE as setAvailableOffline, aF as setSharingType, aG as SynchronizationUnitNotFoundError, aH as removeTrigger, aI as PullResponderTransmitter, aJ as addTrigger, aK as requestPublicDrive, aL as serviceWorkerManager, aM as packageJson, aN as t$1 } from "./app-loader-CeI8w5EJ.js";
27
27
  import * as ReactDOM from "react-dom";
28
28
  import ReactDOM__default, { createPortal } from "react-dom";
29
29
  const setModelName = (input) => createAction("SET_MODEL_NAME", { ...input });
@@ -23857,7 +23857,7 @@ async function call(client2, args2) {
23857
23857
  } catch (err2) {
23858
23858
  const data2 = getRevertErrorData(err2);
23859
23859
  const { offchainLookup, offchainLookupSignature } = await __vitePreload(async () => {
23860
- const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-XyzcC2OO.js");
23860
+ const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip--a_phOwR.js");
23861
23861
  return { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 };
23862
23862
  }, true ? __vite__mapDeps([0,1,2,3]) : void 0);
23863
23863
  if (client2.ccipRead !== false && (data2 == null ? void 0 : data2.slice(0, 10)) === offchainLookupSignature && to)
@@ -25023,7 +25023,7 @@ async function getFeeHistory(client2, { blockCount, blockNumber, blockTag = "lat
25023
25023
  }, { dedupe: Boolean(blockNumberHex) });
25024
25024
  return formatFeeHistory(feeHistory);
25025
25025
  }
25026
- async function getFilterChanges(_client3, { filter }) {
25026
+ async function getFilterChanges(_client4, { filter }) {
25027
25027
  const strict = "strict" in filter && filter.strict;
25028
25028
  const logs = await filter.request({
25029
25029
  method: "eth_getFilterChanges",
@@ -25040,7 +25040,7 @@ async function getFilterChanges(_client3, { filter }) {
25040
25040
  strict
25041
25041
  });
25042
25042
  }
25043
- async function getFilterLogs(_client3, { filter }) {
25043
+ async function getFilterLogs(_client4, { filter }) {
25044
25044
  const strict = filter.strict ?? false;
25045
25045
  const logs = await filter.request({
25046
25046
  method: "eth_getFilterLogs",
@@ -27410,7 +27410,7 @@ function watchBlockNumber(client2, { emitOnBegin = false, emitMissed = false, on
27410
27410
  };
27411
27411
  return enablePolling ? pollBlockNumber() : subscribeBlockNumber();
27412
27412
  }
27413
- async function uninstallFilter(_client3, { filter }) {
27413
+ async function uninstallFilter(_client4, { filter }) {
27414
27414
  return filter.request({
27415
27415
  method: "eth_uninstallFilter",
27416
27416
  params: [filter.id]
@@ -32684,7 +32684,7 @@ var Mutation = (_f = class extends Removable {
32684
32684
  this.execute(this.state.variables);
32685
32685
  }
32686
32686
  async execute(variables) {
32687
- var _a2, _b2, _c2, _d2, _e3, _f2, _g2, _h2, _i2, _j, _k, _l, _m, _n2, _o, _p, _q, _r, _s, _t2;
32687
+ var _a2, _b2, _c2, _d2, _e3, _f2, _g2, _h2, _i2, _j2, _k, _l, _m, _n2, _o, _p, _q, _r, _s, _t2;
32688
32688
  const onContinue = () => {
32689
32689
  __privateMethod(this, _Mutation_instances, dispatch_fn2).call(this, { type: "continue" });
32690
32690
  };
@@ -32738,7 +32738,7 @@ var Mutation = (_f = class extends Removable {
32738
32738
  this
32739
32739
  ));
32740
32740
  await ((_h2 = (_g2 = this.options).onSuccess) == null ? void 0 : _h2.call(_g2, data, variables, this.state.context));
32741
- await ((_j = (_i2 = __privateGet(this, _mutationCache).config).onSettled) == null ? void 0 : _j.call(
32741
+ await ((_j2 = (_i2 = __privateGet(this, _mutationCache).config).onSettled) == null ? void 0 : _j2.call(
32742
32742
  _i2,
32743
32743
  data,
32744
32744
  null,
@@ -33815,6 +33815,105 @@ function shouldAssignObserverCurrentProperties(observer, optimisticResult) {
33815
33815
  }
33816
33816
  return false;
33817
33817
  }
33818
+ var MutationObserver$1 = (_j = class extends Subscribable {
33819
+ constructor(client2, options2) {
33820
+ super();
33821
+ __privateAdd(this, _MutationObserver_instances);
33822
+ __privateAdd(this, _client3);
33823
+ __privateAdd(this, _currentResult2);
33824
+ __privateAdd(this, _currentMutation);
33825
+ __privateAdd(this, _mutateOptions);
33826
+ __privateSet(this, _client3, client2);
33827
+ this.setOptions(options2);
33828
+ this.bindMethods();
33829
+ __privateMethod(this, _MutationObserver_instances, updateResult_fn).call(this);
33830
+ }
33831
+ bindMethods() {
33832
+ this.mutate = this.mutate.bind(this);
33833
+ this.reset = this.reset.bind(this);
33834
+ }
33835
+ setOptions(options2) {
33836
+ var _a2;
33837
+ const prevOptions = this.options;
33838
+ this.options = __privateGet(this, _client3).defaultMutationOptions(options2);
33839
+ if (!shallowEqualObjects(this.options, prevOptions)) {
33840
+ __privateGet(this, _client3).getMutationCache().notify({
33841
+ type: "observerOptionsUpdated",
33842
+ mutation: __privateGet(this, _currentMutation),
33843
+ observer: this
33844
+ });
33845
+ }
33846
+ if ((prevOptions == null ? void 0 : prevOptions.mutationKey) && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) {
33847
+ this.reset();
33848
+ } else if (((_a2 = __privateGet(this, _currentMutation)) == null ? void 0 : _a2.state.status) === "pending") {
33849
+ __privateGet(this, _currentMutation).setOptions(this.options);
33850
+ }
33851
+ }
33852
+ onUnsubscribe() {
33853
+ var _a2;
33854
+ if (!this.hasListeners()) {
33855
+ (_a2 = __privateGet(this, _currentMutation)) == null ? void 0 : _a2.removeObserver(this);
33856
+ }
33857
+ }
33858
+ onMutationUpdate(action) {
33859
+ __privateMethod(this, _MutationObserver_instances, updateResult_fn).call(this);
33860
+ __privateMethod(this, _MutationObserver_instances, notify_fn2).call(this, action);
33861
+ }
33862
+ getCurrentResult() {
33863
+ return __privateGet(this, _currentResult2);
33864
+ }
33865
+ reset() {
33866
+ var _a2;
33867
+ (_a2 = __privateGet(this, _currentMutation)) == null ? void 0 : _a2.removeObserver(this);
33868
+ __privateSet(this, _currentMutation, void 0);
33869
+ __privateMethod(this, _MutationObserver_instances, updateResult_fn).call(this);
33870
+ __privateMethod(this, _MutationObserver_instances, notify_fn2).call(this);
33871
+ }
33872
+ mutate(variables, options2) {
33873
+ var _a2;
33874
+ __privateSet(this, _mutateOptions, options2);
33875
+ (_a2 = __privateGet(this, _currentMutation)) == null ? void 0 : _a2.removeObserver(this);
33876
+ __privateSet(this, _currentMutation, __privateGet(this, _client3).getMutationCache().build(__privateGet(this, _client3), this.options));
33877
+ __privateGet(this, _currentMutation).addObserver(this);
33878
+ return __privateGet(this, _currentMutation).execute(variables);
33879
+ }
33880
+ }, _client3 = new WeakMap(), _currentResult2 = new WeakMap(), _currentMutation = new WeakMap(), _mutateOptions = new WeakMap(), _MutationObserver_instances = new WeakSet(), updateResult_fn = function() {
33881
+ var _a2;
33882
+ const state = ((_a2 = __privateGet(this, _currentMutation)) == null ? void 0 : _a2.state) ?? getDefaultState();
33883
+ __privateSet(this, _currentResult2, {
33884
+ ...state,
33885
+ isPending: state.status === "pending",
33886
+ isSuccess: state.status === "success",
33887
+ isError: state.status === "error",
33888
+ isIdle: state.status === "idle",
33889
+ mutate: this.mutate,
33890
+ reset: this.reset
33891
+ });
33892
+ }, notify_fn2 = function(action) {
33893
+ notifyManager.batch(() => {
33894
+ var _a2, _b2, _c2, _d2, _e3, _f2, _g2, _h2;
33895
+ if (__privateGet(this, _mutateOptions) && this.hasListeners()) {
33896
+ const variables = __privateGet(this, _currentResult2).variables;
33897
+ const context = __privateGet(this, _currentResult2).context;
33898
+ if ((action == null ? void 0 : action.type) === "success") {
33899
+ (_b2 = (_a2 = __privateGet(this, _mutateOptions)).onSuccess) == null ? void 0 : _b2.call(_a2, action.data, variables, context);
33900
+ (_d2 = (_c2 = __privateGet(this, _mutateOptions)).onSettled) == null ? void 0 : _d2.call(_c2, action.data, null, variables, context);
33901
+ } else if ((action == null ? void 0 : action.type) === "error") {
33902
+ (_f2 = (_e3 = __privateGet(this, _mutateOptions)).onError) == null ? void 0 : _f2.call(_e3, action.error, variables, context);
33903
+ (_h2 = (_g2 = __privateGet(this, _mutateOptions)).onSettled) == null ? void 0 : _h2.call(
33904
+ _g2,
33905
+ void 0,
33906
+ action.error,
33907
+ variables,
33908
+ context
33909
+ );
33910
+ }
33911
+ }
33912
+ this.listeners.forEach((listener) => {
33913
+ listener(__privateGet(this, _currentResult2));
33914
+ });
33915
+ });
33916
+ }, _j);
33818
33917
  var QueryClientContext = React.createContext(
33819
33918
  void 0
33820
33919
  );
@@ -33963,6 +34062,36 @@ function useBaseQuery(options2, Observer, queryClient) {
33963
34062
  function useQuery(options2, queryClient) {
33964
34063
  return useBaseQuery(options2, QueryObserver);
33965
34064
  }
34065
+ function useMutation(options2, queryClient) {
34066
+ const client2 = useQueryClient();
34067
+ const [observer] = React.useState(
34068
+ () => new MutationObserver$1(
34069
+ client2,
34070
+ options2
34071
+ )
34072
+ );
34073
+ React.useEffect(() => {
34074
+ observer.setOptions(options2);
34075
+ }, [observer, options2]);
34076
+ const result = React.useSyncExternalStore(
34077
+ React.useCallback(
34078
+ (onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)),
34079
+ [observer]
34080
+ ),
34081
+ () => observer.getCurrentResult(),
34082
+ () => observer.getCurrentResult()
34083
+ );
34084
+ const mutate = React.useCallback(
34085
+ (variables, mutateOptions) => {
34086
+ observer.mutate(variables, mutateOptions).catch(noop$1);
34087
+ },
34088
+ [observer]
34089
+ );
34090
+ if (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) {
34091
+ throw result.error;
34092
+ }
34093
+ return { ...result, mutate, mutateAsync: result.mutate };
34094
+ }
33966
34095
  const FormInput = forwardRef(function FormInput2(props, ref2) {
33967
34096
  const { icon, errorMessage, isDirty, containerClassName, inputClassName, errorMessageClassName, hideErrors = false, ...delegatedProps } = props;
33968
34097
  const type2 = props.type ?? "text";
@@ -57377,11 +57506,11 @@ function observe$1(effect, store = getDefaultStore()) {
57377
57506
  let _connectCrypto;
57378
57507
  async function initConnectCrypto() {
57379
57508
  const { ConnectCrypto: ConnectCrypto2 } = await __vitePreload(async () => {
57380
- const { ConnectCrypto: ConnectCrypto3 } = await import("./index-BX6L7YIm.js");
57509
+ const { ConnectCrypto: ConnectCrypto3 } = await import("./index-BmErA8AK.js");
57381
57510
  return { ConnectCrypto: ConnectCrypto3 };
57382
57511
  }, true ? __vite__mapDeps([4,2,1,3]) : void 0);
57383
57512
  const { BrowserKeyStorage } = await __vitePreload(async () => {
57384
- const { BrowserKeyStorage: BrowserKeyStorage2 } = await import("./index-BX6L7YIm.js");
57513
+ const { BrowserKeyStorage: BrowserKeyStorage2 } = await import("./index-BmErA8AK.js");
57385
57514
  return { BrowserKeyStorage: BrowserKeyStorage2 };
57386
57515
  }, true ? __vite__mapDeps([4,2,1,3]) : void 0);
57387
57516
  const connectCrypto = new ConnectCrypto2(new BrowserKeyStorage());
@@ -57453,7 +57582,7 @@ function useRenown() {
57453
57582
  return;
57454
57583
  }
57455
57584
  const { initRenownBrowser } = await __vitePreload(async () => {
57456
- const { initRenownBrowser: initRenownBrowser2 } = await import("./index-BX6L7YIm.js");
57585
+ const { initRenownBrowser: initRenownBrowser2 } = await import("./index-BmErA8AK.js");
57457
57586
  return { initRenownBrowser: initRenownBrowser2 };
57458
57587
  }, true ? __vite__mapDeps([4,2,1,3]) : void 0);
57459
57588
  const renownBrowser = initRenownBrowser(did2);
@@ -77204,7 +77333,7 @@ function useFileNodeDocument() {
77204
77333
  );
77205
77334
  }
77206
77335
  async function loadBaseEditors() {
77207
- const documentModelEditor = await __vitePreload(() => import("./index-CS-ArJoi.js"), true ? __vite__mapDeps([5,2,1,3]) : void 0);
77336
+ const documentModelEditor = await __vitePreload(() => import("./index-svGQ6i0k.js"), true ? __vite__mapDeps([5,2,1,3]) : void 0);
77208
77337
  await __vitePreload(() => Promise.resolve({}), true ? __vite__mapDeps([6]) : void 0);
77209
77338
  const module2 = documentModelEditor.documentModelEditorModule;
77210
77339
  return [module2];
@@ -119584,11 +119713,11 @@ function Fe(e2) {
119584
119713
  async function Ae(e2, t2) {
119585
119714
  let r2;
119586
119715
  if (e2 && t2 === "nodefs") {
119587
- let { NodeFS: a2 } = await __vitePreload(() => import("./nodefs-DPnN6Ar0.js"), true ? __vite__mapDeps([7,1,2,3]) : void 0);
119716
+ let { NodeFS: a2 } = await __vitePreload(() => import("./nodefs-BiMqirwn.js"), true ? __vite__mapDeps([7,1,2,3]) : void 0);
119588
119717
  r2 = new a2(e2);
119589
119718
  } else if (e2 && t2 === "idbfs") r2 = new ee(e2);
119590
119719
  else if (e2 && t2 === "opfs-ahp") {
119591
- let { OpfsAhpFS: a2 } = await __vitePreload(() => import("./opfs-ahp-CEfWDHTR.js"), true ? __vite__mapDeps([8,1,2,3]) : void 0);
119720
+ let { OpfsAhpFS: a2 } = await __vitePreload(() => import("./opfs-ahp-De_iDcOG.js"), true ? __vite__mapDeps([8,1,2,3]) : void 0);
119592
119721
  r2 = new a2(e2);
119593
119722
  } else r2 = new te();
119594
119723
  return r2;
@@ -125355,61 +125484,100 @@ const logger = childLogger(["reactor-browser", "analytics", "provider"]);
125355
125484
  const defaultQueryClient = new QueryClient();
125356
125485
  const analyticsOptionsKey = ["analytics", "options"];
125357
125486
  const analyticsStoreKey = ["analytics", "store"];
125358
- async function createOrGetAnalyticsStore(options2) {
125487
+ const analyticsEngineKey = ["analytics", "store"];
125488
+ async function createAnalyticsStore(options2) {
125489
+ const store = new BrowserAnalyticsStore(options2);
125490
+ await store.init();
125491
+ const engine = new AnalyticsQueryEngine(store);
125492
+ return { store, engine, options: options2 };
125493
+ }
125494
+ async function getAnalyticsStore(options2) {
125359
125495
  const globalAnalytics = getGlobal("analytics");
125360
125496
  if (!options2 || !options2.databaseName) {
125361
125497
  if (globalAnalytics) {
125362
- return globalAnalytics.store;
125498
+ return (await globalAnalytics).store;
125363
125499
  } else {
125364
125500
  throw new Error("Analytics store options are required if no global analytics store is available");
125365
125501
  }
125366
125502
  }
125367
- if (options2.databaseName === (globalAnalytics == null ? void 0 : globalAnalytics.options.databaseName)) {
125368
- logger.warn("Analytics store already initialized with the same database name. Returning existing store.");
125369
- return globalAnalytics.store;
125503
+ if (globalAnalytics && options2.databaseName === (await globalAnalytics).options.databaseName) {
125504
+ return (await globalAnalytics).store;
125370
125505
  }
125371
- const store = new BrowserAnalyticsStore(options2);
125372
- await store.init();
125373
- const engine = new AnalyticsQueryEngine(store);
125374
- setGlobal("analytics", { store, engine, options: options2 });
125375
- return store;
125506
+ return null;
125376
125507
  }
125377
- function useCreateOrGetAnalyticsStore(queryClient, options2) {
125378
- queryClient.setQueryDefaults(analyticsOptionsKey, {
125379
- queryFn: () => options2,
125380
- staleTime: Infinity,
125381
- gcTime: Infinity
125508
+ async function createOrGetAnalyticsStore(options2) {
125509
+ const globalAnalytics = await getAnalyticsStore(options2);
125510
+ if (globalAnalytics) {
125511
+ return globalAnalytics;
125512
+ }
125513
+ if (!options2) {
125514
+ throw new Error("Analytics store options are required if no global analytics store is available");
125515
+ }
125516
+ const analytics = createAnalyticsStore(options2);
125517
+ setGlobal("analytics", analytics);
125518
+ analytics.then(({ store }) => {
125519
+ logger.debug("Analytics store created", store);
125520
+ }).catch((e2) => {
125521
+ logger.error("Analytics store creation failed", e2);
125382
125522
  });
125383
- queryClient.setQueryDefaults(analyticsStoreKey, {
125384
- queryFn: () => createOrGetAnalyticsStore(options2),
125385
- staleTime: Infinity,
125386
- gcTime: Infinity
125523
+ return (await analytics).store;
125524
+ }
125525
+ function useCreateAnalyticsStore(options2) {
125526
+ const queryClient = useQueryClient();
125527
+ useEffect(() => {
125528
+ queryClient.setQueryDefaults(analyticsOptionsKey, {
125529
+ queryFn: () => options2,
125530
+ staleTime: Infinity,
125531
+ gcTime: Infinity
125532
+ });
125533
+ }, [queryClient, options2]);
125534
+ return useMutation({
125535
+ mutationFn: async () => {
125536
+ const store = await createOrGetAnalyticsStore(options2);
125537
+ queryClient.setQueryDefaults(analyticsStoreKey, {
125538
+ queryFn: () => options2,
125539
+ staleTime: Infinity,
125540
+ gcTime: Infinity
125541
+ });
125542
+ return store;
125543
+ }
125387
125544
  });
125388
125545
  }
125389
- function useAnalyticsStoreOptions() {
125546
+ function useAnalyticsStoreAsync(options2) {
125390
125547
  return useQuery({
125391
- queryKey: analyticsOptionsKey
125548
+ queryKey: [analyticsStoreKey, options2],
125549
+ queryFn: () => getAnalyticsStore(options2),
125550
+ retry: true,
125551
+ throwOnError: false
125392
125552
  });
125393
125553
  }
125394
- function useAnalyticsStore() {
125395
- const { data: storeOptions } = useAnalyticsStoreOptions();
125396
- const store = useQuery({
125397
- queryKey: analyticsStoreKey,
125398
- enabled: !!storeOptions,
125399
- retry: false
125400
- });
125401
- return store.data;
125554
+ function CreateAnalyticsStore(props) {
125555
+ const options2 = useMemo(() => "options" in props ? props.options : "databaseName" in props && props.databaseName ? {
125556
+ databaseName: props.databaseName
125557
+ } : void 0, [props]);
125558
+ const { mutate } = useCreateAnalyticsStore(options2);
125559
+ useEffect(() => {
125560
+ if (options2 == null ? void 0 : options2.databaseName) {
125561
+ mutate();
125562
+ }
125563
+ }, [options2]);
125564
+ return null;
125402
125565
  }
125403
125566
  function AnalyticsProvider({ children, queryClient = defaultQueryClient, ...props }) {
125404
- const options2 = "options" in props ? props.options : "databaseName" in props && props.databaseName ? {
125405
- databaseName: props.databaseName
125406
- } : void 0;
125407
- useCreateOrGetAnalyticsStore(queryClient, options2);
125408
- return jsx$1(QueryClientProvider, { client: queryClient, children });
125567
+ return jsxs(QueryClientProvider, { client: queryClient, children: [jsx$1(CreateAnalyticsStore, { ...props }), children] });
125409
125568
  }
125410
- function useAnalyticsEngine() {
125411
- const globalAnalytics = getGlobal("analytics");
125412
- return globalAnalytics == null ? void 0 : globalAnalytics.engine;
125569
+ function useAnalyticsEngineAsync() {
125570
+ return useQuery({
125571
+ queryKey: analyticsEngineKey,
125572
+ queryFn: async () => {
125573
+ const globalAnalytics = getGlobal("analytics");
125574
+ if (!globalAnalytics) {
125575
+ throw new Error("No analytics store available");
125576
+ }
125577
+ return (await globalAnalytics).engine;
125578
+ },
125579
+ retry: false
125580
+ });
125413
125581
  }
125414
125582
  class ProcessorManager {
125415
125583
  constructor(listeners, drive) {
@@ -125500,7 +125668,7 @@ atomStore.sub(reactorAtom, () => {
125500
125668
  return atomStore.get(processorManagerAtom);
125501
125669
  });
125502
125670
  const Router = React__default.lazy(async () => {
125503
- const createRouterComponent = await __vitePreload(() => import("./router-CjiZKsCh.js").then((n2) => n2.r), true ? __vite__mapDeps([9,1,2,3]) : void 0);
125671
+ const createRouterComponent = await __vitePreload(() => import("./router-C0R6sEgb.js").then((n2) => n2.r), true ? __vite__mapDeps([9,1,2,3]) : void 0);
125504
125672
  const router = await createRouterComponent.default();
125505
125673
  return { default: router };
125506
125674
  });
@@ -125513,7 +125681,7 @@ const Preloader = () => {
125513
125681
  return null;
125514
125682
  };
125515
125683
  const ReactorAnalyticsProvider = lazy(
125516
- () => __vitePreload(() => import("./reactor-analytics-CC_4d7Yq.js"), true ? __vite__mapDeps([10,1,2,3]) : void 0)
125684
+ () => __vitePreload(() => import("./reactor-analytics-kgPbPIsY.js"), true ? __vite__mapDeps([10,1,2,3]) : void 0)
125517
125685
  );
125518
125686
  const App = () => /* @__PURE__ */ jsx$1(React__default.StrictMode, { children: /* @__PURE__ */ jsx$1(Suspense, { fallback: /* @__PURE__ */ jsx$1(Fragment, {}), children: /* @__PURE__ */ jsxs(Provider$1, { store: atomStore, children: [
125519
125687
  /* @__PURE__ */ jsx$1(Preloader, {}),
@@ -125559,7 +125727,7 @@ export {
125559
125727
  SUCCESS as S,
125560
125728
  useGetAppNameForEditorId as T,
125561
125729
  createMemoryRouter as U,
125562
- useAnalyticsStore as V,
125730
+ useAnalyticsStoreAsync as V,
125563
125731
  WagmiContext$1 as W,
125564
125732
  useUnwrappedProcessorManager as X,
125565
125733
  AnalyticsProvider as Y,
@@ -125652,7 +125820,7 @@ export {
125652
125820
  SearchBar as bI,
125653
125821
  useQueryClient as bJ,
125654
125822
  AnalyticsPath as bK,
125655
- useAnalyticsEngine as bL,
125823
+ useAnalyticsEngineAsync as bL,
125656
125824
  DateTime as bM,
125657
125825
  AnalyticsGranularity as bN,
125658
125826
  useGetEditor as bO,
@@ -125714,4 +125882,4 @@ export {
125714
125882
  useDocumentDrives as y,
125715
125883
  useReadModeContext as z
125716
125884
  };
125717
- //# sourceMappingURL=app-CfLgnxyV.js.map
125885
+ //# sourceMappingURL=app-S6QDL9-4.js.map