@qratilabs/qrati-connect 2.7.2 → 2.8.0

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 (91) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/element/{B8jogRzT.js → 5CiAlCjU.js} +4 -4
  3. package/element/BDQCQkX_.js +1 -0
  4. package/element/BPMOttLj.js +1 -0
  5. package/element/BVN_VOhG.js +1 -0
  6. package/element/Bajer8z8.js +17 -0
  7. package/element/Bf4EqlE2.js +1 -0
  8. package/element/C8NFfssj.js +8 -0
  9. package/element/DQu7AGsF.js +1 -0
  10. package/element/Dqtdp5CD.js +2 -0
  11. package/element/EgsEX4Mk.js +5 -0
  12. package/element/ZsvY3_BP.js +32 -0
  13. package/element/hkAPI6mV.js +1 -0
  14. package/element/nSrWCryV.js +5 -0
  15. package/element/web.es.js +419 -419
  16. package/package.json +1 -1
  17. package/{element/BjbDXTeP.js → react/-Gc1XJZE.js} +4 -4
  18. package/react/2j0Uva3f.js +2 -0
  19. package/react/5Kn_YMsi.js +5 -0
  20. package/react/BHul_-9n.js +1 -0
  21. package/react/BMpF19BV.js +1 -0
  22. package/react/BOcElY6J.js +1 -0
  23. package/react/BW8JB9yA.js +1 -0
  24. package/react/B_X6sOg3.js +1 -0
  25. package/react/BfMBYO4b.js +1 -0
  26. package/react/C72dPYhQ.js +5 -0
  27. package/react/C83WiqkM.js +1 -0
  28. package/react/CIEA9OWd.js +1 -0
  29. package/react/COOPnhZa.js +1 -0
  30. package/react/CX7kEcm7.js +1 -0
  31. package/react/CYLiwpjD.js +32 -0
  32. package/react/{DSAOtDOg.js → CYZuQpl9.js} +4 -4
  33. package/react/Ca2GW-tU.js +1 -0
  34. package/react/CbCxF_PL.js +1 -0
  35. package/react/CjSSZsql.js +1 -0
  36. package/react/{CDAGXOJa.js → CrKuU6G6.js} +1 -1
  37. package/react/CzkP4JdG.js +1 -0
  38. package/react/D3gIYCSb.js +1 -0
  39. package/react/DEk8rfah.js +1 -0
  40. package/react/DFgDBn6O.js +17 -0
  41. package/react/{B57jvRJw.js → T39bw9GN.js} +1 -1
  42. package/react/index.cjs +1 -1
  43. package/react/index.mjs +381 -381
  44. package/react/u07nHbMK.js +1 -0
  45. package/umd/web.umd.js +1 -1
  46. package/element/BiQECCnr.js +0 -1
  47. package/element/BvkZOchm.js +0 -17
  48. package/element/COUnPxHl.js +0 -6
  49. package/element/CkfXzc1_.js +0 -1
  50. package/element/DGeYAYfl.js +0 -3
  51. package/element/DXPR6JWg.js +0 -1
  52. package/element/DqOnDVHH.js +0 -1
  53. package/element/ThtSVXLE.js +0 -32
  54. package/element/gajcOMzQ.js +0 -1
  55. package/element/ojjN3KY4.js +0 -1
  56. package/react/B-ttdr0n.js +0 -1
  57. package/react/B0pbGxj0.js +0 -1
  58. package/react/BBaYBpSS.js +0 -1
  59. package/react/BUm8-ZtV.js +0 -1
  60. package/react/Bran9aUe.js +0 -32
  61. package/react/CMUYyO6F.js +0 -1
  62. package/react/COVWNZNw.js +0 -17
  63. package/react/CPs8NoX7.js +0 -1
  64. package/react/CdZcv5CJ.js +0 -1
  65. package/react/Ce4GGag_.js +0 -1
  66. package/react/CzNVO0Zz.js +0 -1
  67. package/react/D6h9tRAZ.js +0 -1
  68. package/react/DCjmEjZr.js +0 -1
  69. package/react/DJ-3Sziz.js +0 -1
  70. package/react/DKvJBrWM.js +0 -8
  71. package/react/DaQR1Bft.js +0 -1
  72. package/react/Dbq_PyC6.js +0 -3
  73. package/react/DdmNkEML.js +0 -1
  74. package/react/buiUjKpV.js +0 -6
  75. package/react/dLaHt9rf.js +0 -1
  76. package/react/zrUJi_8F.js +0 -1
  77. /package/element/{C2ydm0ZD.js → Ccwm5LwS.js} +0 -0
  78. /package/element/{DUlbZyIi.js → DD-DUfz5.js} +0 -0
  79. /package/element/{BppxGns9.js → DMDEuqn7.js} +0 -0
  80. /package/element/{CjmNvKgB.js → DSjmSa7l.js} +0 -0
  81. /package/element/{CziefUVo.js → ZShDCNL_.js} +0 -0
  82. /package/react/{DtvJNH06.js → BqRDSbh4.js} +0 -0
  83. /package/react/{CO70kETi.js → Bqe_56Ho.js} +0 -0
  84. /package/react/{CvLw8owR.js → BxS4S1Bm.js} +0 -0
  85. /package/react/{BT55gXKs.js → CCCbXwws.js} +0 -0
  86. /package/react/{Bxitmzur.js → CEEUMvOM.js} +0 -0
  87. /package/react/{CR2MwRBM.js → CssqM9iA.js} +0 -0
  88. /package/react/{CtCRzhKd.js → DV8H8PH6.js} +0 -0
  89. /package/react/{zyOknCLQ.js → DYyT8DeU.js} +0 -0
  90. /package/react/{LDusNFdQ.js → DvZVbBR7.js} +0 -0
  91. /package/react/{D5puLxf7.js → bYucjLbl.js} +0 -0
package/react/DdmNkEML.js DELETED
@@ -1 +0,0 @@
1
- const e=require("./D4geS7mP.js"),t=require("./CPs8NoX7.js");let r=require("react");r=e.__toESM(r),require("react/jsx-runtime");var n=class extends t.Subscribable{constructor(e,r){super(),this.options=r,this.#e=e,this.#t=null,this.#r=t.pendingThenable(),this.bindMethods(),this.setOptions(r)}#e;#n=void 0;#o=void 0;#s=void 0;#i;#a;#r;#t;#l;#c;#u;#h;#d;#f;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#n.addObserver(this),o(this.#n,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return s(this.#n,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return s(this.#n,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#g(),this.#b(),this.#n.removeObserver(this)}setOptions(e){const r=this.options,n=this.#n;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof t.resolveEnabled(this.options.enabled,this.#n))throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#w(),this.#n.setOptions(this.options),r._defaulted&&!t.shallowEqualObjects(this.options,r)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#n,observer:this});const o=this.hasListeners();o&&i(this.#n,n,this.options,r)&&this.#m(),this.updateResult(),!o||this.#n===n&&t.resolveEnabled(this.options.enabled,this.#n)===t.resolveEnabled(r.enabled,this.#n)&&t.resolveStaleTime(this.options.staleTime,this.#n)===t.resolveStaleTime(r.staleTime,this.#n)||this.#_();const s=this.#v();!o||this.#n===n&&t.resolveEnabled(this.options.enabled,this.#n)===t.resolveEnabled(r.enabled,this.#n)&&s===this.#f||this.#R(s)}getOptimisticResult(e){const r=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(r,e);var o;return o=n,t.shallowEqualObjects(this.getCurrentResult(),o)||(this.#s=n,this.#a=this.options,this.#i=this.#n.state),n}getCurrentResult(){return this.#s}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#r.status||this.#r.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#n}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#m(e){this.#w();let r=this.#n.fetch(this.options,e);return e?.throwOnError||(r=r.catch(t.noop)),r}#_(){this.#g();const e=t.resolveStaleTime(this.options.staleTime,this.#n);if(t.environmentManager.isServer()||this.#s.isStale||!t.isValidTimeout(e))return;const r=t.timeUntilStale(this.#s.dataUpdatedAt,e)+1;this.#h=t.timeoutManager.setTimeout(()=>{this.#s.isStale||this.updateResult()},r)}#v(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#n):this.options.refetchInterval)??!1}#R(e){this.#b(),this.#f=e,!t.environmentManager.isServer()&&!1!==t.resolveEnabled(this.options.enabled,this.#n)&&t.isValidTimeout(this.#f)&&0!==this.#f&&(this.#d=t.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||t.focusManager.isFocused())&&this.#m()},this.#f))}#y(){this.#_(),this.#R(this.#v())}#g(){this.#h&&(t.timeoutManager.clearTimeout(this.#h),this.#h=void 0)}#b(){this.#d&&(t.timeoutManager.clearInterval(this.#d),this.#d=void 0)}createResult(e,r){const n=this.#n,s=this.options,l=this.#s,c=this.#i,u=this.#a,h=e!==n?e.state:this.#o,{state:d}=e;let f,p={...d},m=!1;if(r._optimisticResults){const a=this.hasListeners(),l=!a&&o(e,r),c=a&&i(e,n,r,s);(l||c)&&(p={...p,...t.fetchState(d.data,e.options)}),"isRestoring"===r._optimisticResults&&(p.fetchStatus="idle")}let{error:y,errorUpdatedAt:g,status:b}=p;f=p.data;let w=!1;if(void 0!==r.placeholderData&&void 0===f&&"pending"===b){let e;l?.isPlaceholderData&&r.placeholderData===u?.placeholderData?(e=l.data,w=!0):e="function"==typeof r.placeholderData?r.placeholderData(this.#u?.state.data,this.#u):r.placeholderData,void 0!==e&&(b="success",f=t.replaceData(l?.data,e,r),m=!0)}if(r.select&&void 0!==f&&!w)if(l&&f===c?.data&&r.select===this.#l)f=this.#c;else try{this.#l=r.select,f=r.select(f),f=t.replaceData(l?.data,f,r),this.#c=f,this.#t=null}catch(x){this.#t=x}this.#t&&(y=this.#t,f=this.#c,g=Date.now(),b="error");const _="fetching"===p.fetchStatus,v="pending"===b,R="error"===b,S=v&&_,T=void 0!==f,E={status:b,fetchStatus:p.fetchStatus,isPending:v,isSuccess:"success"===b,isError:R,isInitialLoading:S,isLoading:S,data:f,dataUpdatedAt:p.dataUpdatedAt,error:y,errorUpdatedAt:g,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:p.dataUpdateCount>h.dataUpdateCount||p.errorUpdateCount>h.errorUpdateCount,isFetching:_,isRefetching:_&&!v,isLoadingError:R&&!T,isPaused:"paused"===p.fetchStatus,isPlaceholderData:m,isRefetchError:R&&T,isStale:a(e,r),refetch:this.refetch,promise:this.#r,isEnabled:!1!==t.resolveEnabled(r.enabled,e)};if(this.options.experimental_prefetchInRender){const r=void 0!==E.data,o="error"===E.status&&!r,s=e=>{o?e.reject(E.error):r&&e.resolve(E.data)},i=()=>{s(this.#r=E.promise=t.pendingThenable())},a=this.#r;switch(a.status){case"pending":e.queryHash===n.queryHash&&s(a);break;case"fulfilled":(o||E.data!==a.value)&&i();break;case"rejected":o&&E.error===a.reason||i()}}return E}updateResult(){const e=this.#s,r=this.createResult(this.#n,this.options);this.#i=this.#n.state,this.#a=this.options,void 0!==this.#i.data&&(this.#u=this.#n),t.shallowEqualObjects(r,e)||(this.#s=r,this.#S({listeners:(()=>{if(!e)return!0;const{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#p.size)return!0;const n=new Set(r??this.#p);return this.options.throwOnError&&n.add("error"),Object.keys(this.#s).some(t=>{const r=t;return this.#s[r]!==e[r]&&n.has(r)})})()}))}#w(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#n)return;const t=this.#n;this.#n=e,this.#o=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#S(e){t.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#s)}),this.#e.getQueryCache().notify({query:this.#n,type:"observerResultsUpdated"})})}};function o(e,r){return function(e,r){return!1!==t.resolveEnabled(r.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===r.retryOnMount)}(e,r)||void 0!==e.state.data&&s(e,r,r.refetchOnMount)}function s(e,r,n){if(!1!==t.resolveEnabled(r.enabled,e)&&"static"!==t.resolveStaleTime(r.staleTime,e)){const t="function"==typeof n?n(e):n;return"always"===t||!1!==t&&a(e,r)}return!1}function i(e,r,n,o){return(e!==r||!1===t.resolveEnabled(o.enabled,e))&&(!n.suspense||"error"!==e.state.status)&&a(e,n)}function a(e,r){return!1!==t.resolveEnabled(r.enabled,e)&&e.isStaleByTime(t.resolveStaleTime(r.staleTime,e))}var l=r.createContext(!1);l.Provider;var c=r.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),u=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function h(e,n,o){if("production"!==process.env.NODE_ENV&&("object"!=typeof e||Array.isArray(e)))throw new Error('Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object');const s=r.useContext(l),i=r.useContext(c),a=t.useQueryClient(o),h=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(h);const d=a.getQueryCache().get(h.queryHash);"production"!==process.env.NODE_ENV&&(h.queryFn||console.error(`[${h.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`)),h._optimisticResults=s?"isRestoring":"optimistic",(e=>{if(e.suspense){const t=1e3,r=e=>"static"===e?e:Math.max(e??t,t),n=e.staleTime;e.staleTime="function"==typeof n?(...e)=>r(n(...e)):r(n),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,t))}})(h),((e,r,n)=>{const o=n?.state.error&&"function"==typeof e.throwOnError?t.shouldThrowError(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||o)&&(r.isReset()||(e.retryOnMount=!1))})(h,i,d),(e=>{r.useEffect(()=>{e.clearReset()},[e])})(i);const f=!a.getQueryCache().get(h.queryHash),[p]=r.useState(()=>new n(a,h)),m=p.getOptimisticResult(h),y=!s&&!1!==e.subscribed;if(r.useSyncExternalStore(r.useCallback(e=>{const r=y?p.subscribe(t.notifyManager.batchCalls(e)):t.noop;return p.updateResult(),r},[p,y]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),r.useEffect(()=>{p.setOptions(h)},[h,p]),((e,t)=>e?.suspense&&t.isPending)(h,m))throw u(h,p,i);if((({result:e,errorResetBoundary:r,throwOnError:n,query:o,suspense:s})=>e.isError&&!r.isReset()&&!e.isFetching&&o&&(s&&void 0===e.data||t.shouldThrowError(n,[e.error,o])))({result:m,errorResetBoundary:i,throwOnError:h.throwOnError,query:d,suspense:h.suspense}))throw m.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(h,m),h.experimental_prefetchInRender&&!t.environmentManager.isServer()&&((e,t)=>e.isLoading&&e.isFetching&&!t)(m,s)&&(f?u(h,p,i):d?.promise)?.catch(t.noop).finally(()=>{p.updateResult()}),h.notifyOnChangeProps?m:p.trackResult(m)}function d(e,t){return h(e,n,t)}function f(e,t){for(var r in e)if("__source"!==r&&!(r in t))return!0;for(var n in t)if("__source"!==n&&e[n]!==t[n])return!0;return!1}function p(e,t){this.props=e,this.context=t}(p.prototype=new t.x$1).isPureReactComponent=!0,p.prototype.shouldComponentUpdate=function(e,t){return f(this.props,e)||f(this.state,t)};var m=t.l.__b;t.l.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),m&&m(e)},"undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref"),t.L;var y=t.l.__e;t.l.__e=function(e,t,r,n){if(e.then)for(var o,s=t;s=s.__;)if((o=s.__c)&&o.__c)return t.__e??(t.__e=r.__e,t.__k=r.__k),o.__c(e,t);y(e,t,r,n)};var g=t.l.unmount;function b(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=function(e,t){for(var r in t)e[r]=t[r];return e}({},e)).__c&&(e.__c.__P===r&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return b(e,t,r)})),e}function w(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return w(e,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function _(){this.__u=0,this.o=null,this.__b=null}function v(e){var t=e.__&&e.__.__c;return t&&t.__a&&t.__a(e)}function R(e){var r,n,o,s=null;function i(i){if(r||(r=e()).then(function(e){e&&(s=e.default||e),o=!0},function(e){n=e,o=!0}),n)throw n;if(!o)throw r;return s?t._$1(s,i):null}return i.displayName="Lazy",i.__f=!0,i}function S(){this.i=null,this.l=null}t.l.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),g&&g(e)},(_.prototype=new t.x$1).__c=function(e,t){var r=t.__c,n=this;n.o??=[],n.o.push(r);var o=v(n.__v),s=!1,i=function(){s||n.__z||(s=!0,r.__R=null,o?o(l):l())};r.__R=i;var a=r.__P;r.__P=null;var l=function(){if(! --n.__u){if(n.state.__a){var e=n.state.__a;n.__v.__k[0]=w(e,e.__c.__P,e.__c.__O)}var t;for(n.setState({__a:n.__b=null});t=n.o.pop();)t.__P=a,t.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(i,i)},_.prototype.componentWillUnmount=function(){this.o=[]},_.prototype.render=function(e,r){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=b(this.__b,n,o.__O=o.__P)}this.__b=null}var s=r.__a&&t._$1(t.k,null,e.fallback);return s&&(s.__u&=-33),[t._$1(t.k,null,r.__a?null:e.children),s]};var T=function(e,t,r){if(++r[1]===r[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(r=e.i;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.i=r=r[2]}};function E(e){return this.getChildContext=function(){return e.context},e.children}function x(e){var r=this,n=e.h;if(r.componentWillUnmount=function(){t.J(null,r.v),r.v=null,r.h=null},r.h&&r.h!==n&&r.componentWillUnmount(),!r.v){for(var o=r.__v;null!==o&&!o.__m&&null!==o.__;)o=o.__;r.h=n,r.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:o.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(e,t){this.childNodes.push(e),r.h.insertBefore(e,t)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),r.h.removeChild(e)}}}t.J(t._$1(E,{context:r.context},e.__v),r.v)}function O(e,r){var n=t._$1(x,{__v:e,h:r});return n.containerInfo=r,n}(S.prototype=new t.x$1).__a=function(e){var t=this,r=v(t.__v),n=t.l.get(e);return n[0]++,function(o){var s=function(){t.props.revealOrder?(n.push(o),T(t,e,n)):o()};r?r(s):s()}},S.prototype.render=function(e){this.i=null,this.l=new Map;var r=t.L(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&r.reverse();for(var n=r.length;n--;)this.l.set(r[n],this.i=[1,0,this.i]);return e.children},S.prototype.componentDidUpdate=S.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,r){T(e,r,t)})};var A="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,P=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,I=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,C=/[A-Z0-9]/g,q="undefined"!=typeof document,k=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};t.x$1.prototype.isReactComponent=!0,["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(t.x$1.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var N=t.l.event;t.l.event=function(e){return N&&(e=N(e)),e.persist=function(){},e.isPropagationStopped=function(){return this.cancelBubble},e.isDefaultPrevented=function(){return this.defaultPrevented},e.nativeEvent=e};var U={configurable:!0,get:function(){return this.class}},D=t.l.vnode;t.l.vnode=function(e){"string"==typeof e.type&&function(e){var r=e.props,n=e.type,o={},s=-1==n.indexOf("-");for(var i in r){var a=r[i];if(!("value"===i&&"defaultValue"in r&&null==a||q&&"children"===i&&"noscript"===n||"class"===i||"className"===i)){var l=i.toLowerCase();"defaultValue"===i&&"value"in r&&null==r.value?i="value":"download"===i&&!0===a?a="":"translate"===l&&"no"===a?a=!1:"o"===l[0]&&"n"===l[1]?"ondoubleclick"===l?i="ondblclick":"onchange"!==l||"input"!==n&&"textarea"!==n||k(r.type)?"onfocus"===l?i="onfocusin":"onblur"===l?i="onfocusout":I.test(i)&&(i=l):l=i="oninput":s&&P.test(i)?i=i.replace(C,"-$&").toLowerCase():null===a&&(a=void 0),"oninput"===l&&o[i=l]&&(i="oninputCapture"),o[i]=a}}"select"==n&&(o.multiple&&Array.isArray(o.value)&&(o.value=t.L(r.children).forEach(function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)})),null!=o.defaultValue&&(o.value=t.L(r.children).forEach(function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value}))),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",U)):r.className&&(o.class=o.className=r.className),e.props=o}(e),e.$$typeof=A,D&&D(e)};var j=t.l.__r;t.l.__r=function(e){j&&j(e),e.__c};var M=t.l.diffed;t.l.diffed=function(e){M&&M(e);var t=e.props,r=e.__e;null!=r&&"textarea"===e.type&&"value"in t&&t.value!==r.value&&(r.value=null==t.value?"":t.value)};var L=class extends Error{response;request;options;constructor(e,t,r){const n=`${e.status||0===e.status?e.status:""} ${e.statusText??""}`.trim();super(`Request failed with ${n?`status code ${n}`:"an unknown error"}: ${t.method} ${t.url}`),this.name="HTTPError",this.response=e,this.request=t,this.options=r}},Q=class extends Error{name="NonError";value;constructor(e){let t="Non-error value was thrown";try{"string"==typeof e?t=e:e&&"object"==typeof e&&"message"in e&&"string"==typeof e.message&&(t=e.message)}catch{}super(t),this.value=e}},F=class extends Error{name="ForceRetryError";customDelay;code;customRequest;constructor(e){const t=e?.cause?e.cause instanceof Error?e.cause:new Q(e.cause):void 0;super(e?.code?`Forced retry: ${e.code}`:"Forced retry",t?{cause:t}:void 0),this.customDelay=e?.delay,this.code=e?.code,this.customRequest=e?.request}},z=(()=>{let e=!1,t=!1;const r="function"==typeof globalThis.ReadableStream,n="function"==typeof globalThis.Request;if(r&&n)try{t=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(o){if(o instanceof Error&&"unsupported BodyInit type"===o.message)return!1;throw o}return e&&!t})(),B="function"==typeof globalThis.AbortController,H="function"==typeof globalThis.AbortSignal&&"function"==typeof globalThis.AbortSignal.any,$="function"==typeof globalThis.ReadableStream,V="function"==typeof globalThis.FormData,W=["get","post","put","patch","head","delete"],Z={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*",bytes:"*/*"},G=(new TextEncoder).encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,J=Symbol("stop"),Y=class{options;constructor(e){this.options=e}},K=e=>new Y(e),X={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0,context:!0},ee={next:!0},te={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,duplex:!0},re=(e,t,r)=>{let n,o=0;return e.pipeThrough(new TransformStream({transform(e,s){if(s.enqueue(e),n){o+=n.byteLength;let e=0===t?0:o/t;e>=1&&(e=1-Number.EPSILON),r?.({percent:e,totalBytes:Math.max(t,o),transferredBytes:o},n)}n=e},flush(){n&&(o+=n.byteLength,r?.({percent:1,totalBytes:Math.max(t,o),transferredBytes:o},n))}}))},ne=e=>null!==e&&"object"==typeof e,oe=(...e)=>{for(const t of e)if((!ne(t)||Array.isArray(t))&&void 0!==t)throw new TypeError("The `options` argument must be an object");return ce({},...e)},se=(e={},t={})=>{const r=new globalThis.Headers(e),n=t instanceof globalThis.Headers,o=new globalThis.Headers(t);for(const[s,i]of o.entries())n&&"undefined"===i||void 0===i?r.delete(s):r.set(s,i);return r};function ie(e,t,r){return Object.hasOwn(t,r)&&void 0===t[r]?[]:ce(e[r]??[],t[r]??[])}var ae=(e={},t={})=>({beforeRequest:ie(e,t,"beforeRequest"),beforeRetry:ie(e,t,"beforeRetry"),afterResponse:ie(e,t,"afterResponse"),beforeError:ie(e,t,"beforeError")}),le=(e,t)=>{const r=new URLSearchParams;for(const n of[e,t])if(void 0!==n)if(n instanceof URLSearchParams)for(const[e,t]of n.entries())r.append(e,t);else if(Array.isArray(n))for(const e of n){if(!Array.isArray(e)||2!==e.length)throw new TypeError("Array search parameters must be provided in [[key, value], ...] format");r.append(String(e[0]),String(e[1]))}else if(ne(n))for(const[e,t]of Object.entries(n))void 0!==t&&r.append(e,String(t));else{const e=new URLSearchParams(n);for(const[t,n]of e.entries())r.append(t,n)}return r},ce=(...e)=>{let t,r={},n={},o={};const s=[];for(const i of e)if(Array.isArray(i))Array.isArray(r)||(r=[]),r=[...r,...i];else if(ne(i)){for(let[e,n]of Object.entries(i))if("signal"===e&&n instanceof globalThis.AbortSignal)s.push(n);else if("context"!==e)"searchParams"!==e?(ne(n)&&e in r&&(n=ce(r[e],n)),r={...r,[e]:n}):t=null==n?void 0:void 0===t?n:le(t,n);else{if(null!=n&&(!ne(n)||Array.isArray(n)))throw new TypeError("The `context` option must be an object");r={...r,context:null==n?{}:{...r.context,...n}}}ne(i.hooks)&&(o=ae(o,i.hooks),r.hooks=o),ne(i.headers)&&(n=se(n,i.headers),r.headers=n)}return void 0!==t&&(r.searchParams=t),s.length>0&&(1===s.length?r.signal=s[0]:r.signal=H?AbortSignal.any(s):s.at(-1)),r},ue=e=>W.includes(e)?e.toUpperCase():e,he={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3,jitter:void 0,retryOnTimeout:!1},de=(e={})=>{if("number"==typeof e)return{...he,limit:e};if(e.methods&&!Array.isArray(e.methods))throw new Error("retry.methods must be an array");if(e.methods&&=e.methods.map(e=>e.toLowerCase()),e.statusCodes&&!Array.isArray(e.statusCodes))throw new Error("retry.statusCodes must be an array");const t=Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e));return{...he,...t}},fe=class extends Error{request;constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}},pe=class e{static create(t,r){const n=new e(t,r),o=n.#T(async()=>{if("number"==typeof n.#E.timeout&&n.#E.timeout>2147483647)throw new RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let e=await n.#x();for(const r of n.#E.hooks.afterResponse){const o=n.#O(e.clone());let s;try{s=await r(n.request,n.#A(),o,{retryCount:n.#P})}catch(t){throw n.#I(o),n.#I(e),t}if(s instanceof Y)throw n.#I(o),n.#I(e),new F(s.options);const i=s instanceof globalThis.Response?s:e;o!==i&&n.#I(o),e!==i&&n.#I(e),e=i}if(n.#O(e),!e.ok&&("function"==typeof n.#E.throwHttpErrors?n.#E.throwHttpErrors(e.status):n.#E.throwHttpErrors)){let t=new L(e,n.request,n.#A());for(const e of n.#E.hooks.beforeError)t=await e(t,{retryCount:n.#P});throw t}if(n.#E.onDownloadProgress){if("function"!=typeof n.#E.onDownloadProgress)throw new TypeError("The `onDownloadProgress` option must be a function");if(!$)throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");const t=e.clone();return n.#I(e),((e,t)=>{if(!e.body)return e;if(204===e.status)return new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers});const r=Math.max(0,Number(e.headers.get("content-length"))||0);return new Response(re(e.body,r,t),{status:e.status,statusText:e.statusText,headers:e.headers})})(t,n.#E.onDownloadProgress)}return e}).finally(()=>{const e=n.#C;n.#q(e?.body??void 0),n.#q(n.request.body??void 0)});for(const[e,s]of Object.entries(Z))"bytes"===e&&"function"!=typeof globalThis.Response?.prototype?.bytes||(o[e]=async()=>{n.request.headers.set("accept",n.request.headers.get("accept")||s);const t=await o;if("json"===e){if(204===t.status)return"";const e=await t.text();return""===e?"":r.parseJson?r.parseJson(e):JSON.parse(e)}return t[e]()});return o}static#k(e){return!e||"object"!=typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.fromEntries(Object.entries(e).filter(([,e])=>void 0!==e))}request;#N;#P=0;#U;#E;#C;#D;#j;constructor(t,r={}){if(this.#U=t,this.#E={...r,headers:se(this.#U.headers,r.headers),hooks:ae({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},r.hooks),method:ue(r.method??this.#U.method??"GET"),prefixUrl:String(r.prefixUrl||""),retry:de(r.retry),throwHttpErrors:r.throwHttpErrors??!0,timeout:r.timeout??1e4,fetch:r.fetch??globalThis.fetch.bind(globalThis),context:r.context??{}},"string"!=typeof this.#U&&!(this.#U instanceof URL||this.#U instanceof globalThis.Request))throw new TypeError("`input` must be a string, URL, or Request");if(this.#E.prefixUrl&&"string"==typeof this.#U){if(this.#U.startsWith("/"))throw new Error("`input` must not begin with a slash when using `prefixUrl`");this.#E.prefixUrl.endsWith("/")||(this.#E.prefixUrl+="/"),this.#U=this.#E.prefixUrl+this.#U}B&&H&&(this.#D=this.#E.signal??this.#U.signal,this.#N=new globalThis.AbortController,this.#E.signal=this.#D?AbortSignal.any([this.#D,this.#N.signal]):this.#N.signal),z&&(this.#E.duplex="half"),void 0!==this.#E.json&&(this.#E.body=this.#E.stringifyJson?.(this.#E.json)??JSON.stringify(this.#E.json),this.#E.headers.set("content-type",this.#E.headers.get("content-type")??"application/json"));const n=r.headers&&new globalThis.Headers(r.headers).has("content-type");if(this.#U instanceof globalThis.Request&&(V&&this.#E.body instanceof globalThis.FormData||this.#E.body instanceof URLSearchParams)&&!n&&this.#E.headers.delete("content-type"),this.request=new globalThis.Request(this.#U,this.#E),void 0!==(o=this.#E.searchParams)&&(Array.isArray(o)?o.length>0:o instanceof URLSearchParams?o.size>0:"object"==typeof o?Object.keys(o).length>0:"string"==typeof o?o.trim().length>0:Boolean(o))){const t="?"+("string"==typeof this.#E.searchParams?this.#E.searchParams.replace(/^\?/,""):new URLSearchParams(e.#k(this.#E.searchParams)).toString()),r=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,t);this.request=new globalThis.Request(r,this.#E)}var o;if(this.#E.onUploadProgress){if("function"!=typeof this.#E.onUploadProgress)throw new TypeError("The `onUploadProgress` option must be a function");if(!z)throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request=this.#M(this.request,this.#E.body??void 0)}}#L(){const e=this.#E.retry.delay(this.#P);let t=e;!0===this.#E.retry.jitter?t=Math.random()*e:"function"==typeof this.#E.retry.jitter&&(t=this.#E.retry.jitter(e),(!Number.isFinite(t)||t<0)&&(t=e));const r=this.#E.retry.backoffLimit??Number.POSITIVE_INFINITY;return Math.min(r,t)}async#Q(e){if(this.#P++,this.#P>this.#E.retry.limit)throw e;const t=e instanceof Error?e:new Q(e);if(t instanceof F)return t.customDelay??this.#L();if(!this.#E.retry.methods.includes(this.request.method.toLowerCase()))throw e;if(void 0!==this.#E.retry.shouldRetry){const r=await this.#E.retry.shouldRetry({error:t,retryCount:this.#P});if(!1===r)throw e;if(!0===r)return this.#L()}if(function(e){return e instanceof fe||e?.name===fe.name}(e)&&!this.#E.retry.retryOnTimeout)throw e;if(function(e){return e instanceof L||e?.name===L.name}(e)){if(!this.#E.retry.statusCodes.includes(e.response.status))throw e;const t=e.response.headers.get("Retry-After")??e.response.headers.get("RateLimit-Reset")??e.response.headers.get("X-RateLimit-Retry-After")??e.response.headers.get("X-RateLimit-Reset")??e.response.headers.get("X-Rate-Limit-Reset");if(t&&this.#E.retry.afterStatusCodes.includes(e.response.status)){let e=1e3*Number(t);Number.isNaN(e)?e=Date.parse(t)-Date.now():e>=Date.parse("2024-01-01")&&(e-=Date.now());const r=this.#E.retry.maxRetryAfter??e;return e<r?e:r}if(413===e.response.status)throw e}return this.#L()}#O(e){return this.#E.parseJson&&(e.json=async()=>this.#E.parseJson(await e.text())),e}#q(e){e&&e.cancel().catch(()=>{})}#I(e){this.#q(e.body??void 0)}async#T(e){try{return await e()}catch(t){const r=Math.min(await this.#Q(t),2147483647);if(this.#P<1)throw t;if(await async function(e,{signal:t}){return new Promise((r,n)=>{function o(){clearTimeout(s),n(t.reason)}t&&(t.throwIfAborted(),t.addEventListener("abort",o,{once:!0}));const s=setTimeout(()=>{t?.removeEventListener("abort",o),r()},e)})}(r,this.#D?{signal:this.#D}:{}),t instanceof F&&t.customRequest){const e=this.#E.signal?new globalThis.Request(t.customRequest,{signal:this.#E.signal}):new globalThis.Request(t.customRequest);this.#F(e)}for(const e of this.#E.hooks.beforeRetry){const r=await e({request:this.request,options:this.#A(),error:t,retryCount:this.#P});if(r instanceof globalThis.Request){this.#F(r);break}if(r instanceof globalThis.Response)return r;if(r===J)return}return this.#T(e)}}async#x(){this.#N?.signal.aborted&&(this.#N=new globalThis.AbortController,this.#E.signal=this.#D?AbortSignal.any([this.#D,this.#N.signal]):this.#N.signal,this.request=new globalThis.Request(this.request,{signal:this.#E.signal}));for(const t of this.#E.hooks.beforeRequest){const e=await t(this.request,this.#A(),{retryCount:this.#P});if(e instanceof Response)return e;if(e instanceof globalThis.Request){this.#F(e);break}}const e=((e,t)=>{const r={};for(const n in t)Object.hasOwn(t,n)&&(n in te||n in X||n in e&&!(n in ee)||(r[n]=t[n]));return r})(this.request,this.#E);return this.#C=this.request,this.request=this.#C.clone(),!1===this.#E.timeout?this.#E.fetch(this.#C,e):async function(e,t,r,n){return new Promise((o,s)=>{const i=setTimeout(()=>{r&&r.abort(),s(new fe(e))},n.timeout);n.fetch(e,t).then(o).catch(s).then(()=>{clearTimeout(i)})})}(this.#C,e,this.#N,this.#E)}#A(){if(!this.#j){const{hooks:e,...t}=this.#E;this.#j=Object.freeze(t)}return this.#j}#F(e){this.#j=void 0,this.request=this.#M(e)}#M(e,t){return this.#E.onUploadProgress&&e.body?((e,t,r)=>{if(!e.body)return e;const n=(e=>{if(!e)return 0;if(e instanceof FormData){let t=0;for(const[r,n]of e)t+=G,t+=(new TextEncoder).encode(`Content-Disposition: form-data; name="${r}"`).length,t+="string"==typeof n?(new TextEncoder).encode(n).length:n.size;return t}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if("string"==typeof e)return(new TextEncoder).encode(e).length;if(e instanceof URLSearchParams)return(new TextEncoder).encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if("object"==typeof e&&null!==e)try{const t=JSON.stringify(e);return(new TextEncoder).encode(t).length}catch{return 0}return 0})(r??e.body);return new Request(e,{duplex:"half",body:re(e.body,n,t)})})(e,this.#E.onUploadProgress,t??this.#E.body??void 0):e}},me=e=>{const t=(t,r)=>pe.create(t,oe(e,r));for(const r of W)t[r]=(t,n)=>pe.create(t,oe(e,n,{method:r}));return t.create=e=>me(oe(e)),t.extend=t=>("function"==typeof t&&(t=t(e??{})),me(oe(e,t))),t.stop=J,t.retry=K,t},ye=me();function ge({title:e,children:r}){return t.u("div",{className:"mx-auto mt-24 w-fit max-w-xl space-y-8",children:[t.u("svg",{xmlns:"http://www.w3.org/2000/svg",className:"mx-auto h-64 w-fit",width:"800",height:"469.317",viewBox:"0 0 800 469.317",role:"img","aria-label":"Error illustration",children:t.u("g",{transform:"translate(-443.142 -257.876)",children:[t.u("path",{d:"M898.247,664.1H371.155a30.276,30.276,0,0,1-30.241-30.241V352.525a30.276,30.276,0,0,1,30.241-30.241H898.247a30.276,30.276,0,0,1,30.241,30.241V633.862A30.276,30.276,0,0,1,898.247,664.1Z",transform:"translate(308.867 25.517)",fill:"#fff"}),t.u("path",{d:"M557.334,341.82H30.241A30.276,30.276,0,0,1,0,311.578V30.241A30.276,30.276,0,0,1,30.241,0H557.334a30.276,30.276,0,0,1,30.241,30.241V311.578A30.276,30.276,0,0,1,557.334,341.82ZM30.241,1.833A28.441,28.441,0,0,0,1.833,30.241V311.578a28.441,28.441,0,0,0,28.409,28.409H557.334a28.441,28.441,0,0,0,28.409-28.409V30.241A28.441,28.441,0,0,0,557.334,1.833Z",transform:"matrix(0.999, -0.035, 0.035, 0.999, 643.995, 358.158)",fill:"#d6d6e3"}),t.u("path",{d:"M754.171,630.2l-509.5-135.058a30.276,30.276,0,0,1-21.483-36.981L295.28,186.212a30.276,30.276,0,0,1,36.981-21.483l509.5,135.058a30.276,30.276,0,0,1,21.483,36.981L791.152,608.712A30.276,30.276,0,0,1,754.171,630.2Z",transform:"translate(220.958 94.156)",fill:"#f2f2f2"}),t.u("path",{d:"M775.247,705.1H248.155a30.276,30.276,0,0,1-30.241-30.241V393.525a30.276,30.276,0,0,1,30.241-30.241H775.247a30.276,30.276,0,0,1,30.241,30.242V674.862A30.275,30.275,0,0,1,775.247,705.1Z",transform:"translate(319.149 22.09)",fill:"#fff"}),t.u("path",{d:"M638.653,701.841H298.272c-.426,0-.852-.009-1.272-.033l160.985-90.663c3.065-1.762,9.943-2.382,15.361-1.385a13.912,13.912,0,0,1,4.26,1.385l108.041,60.842,5.176,2.911Z",transform:"translate(312.538 1.526)",fill:"#e6e6e6"}),t.u("path",{d:"M760.145,704.279h-294.4l57.049-26.943L526.9,675.4l74.341-35.111c4.874-2.3,16.6-2.445,22.328-.434q.577.206,1.071.434Z",transform:"translate(298.432 -0.912)",fill:"#e6e6e6"}),t.u("path",{d:"M248.322,365.284a28.441,28.441,0,0,0-28.409,28.409V675.03a28.441,28.441,0,0,0,28.409,28.409H775.415a28.441,28.441,0,0,0,28.409-28.409V393.693a28.441,28.441,0,0,0-28.409-28.409Z",transform:"translate(318.982 21.923)",fill:"#3f3d56"}),t.u("path",{d:"M777.254,685.116H250.161a8.257,8.257,0,0,1-8.248-8.248V395.532a8.257,8.257,0,0,1,8.248-8.248H777.254a8.257,8.257,0,0,1,8.248,8.248V676.869a8.257,8.257,0,0,1-8.248,8.248Zm-527.092-296a6.422,6.422,0,0,0-6.415,6.415V676.869a6.422,6.422,0,0,0,6.415,6.415H777.254a6.422,6.422,0,0,0,6.415-6.415V395.532a6.422,6.422,0,0,0-6.415-6.415Z",transform:"translate(317.143 20.083)",fill:"#ccc"}),t.u("ellipse",{cx:"71.849",cy:"89.934",rx:"71.849",ry:"89.934",transform:"translate(928.82 428.806)",fill:"#f2f2f2"}),t.u("path",{d:"M505.77,325.365h.2l3.553,203.7h-7.5Z",transform:"translate(495.097 175.29)",fill:"#ccc"}),t.u("path",{d:"M736.239,636.154h0a1.776,1.776,0,0,1-.744,2.4l-10.3,5.425-1.655-3.144,10.3-5.425A1.776,1.776,0,0,1,736.239,636.154Z",transform:"translate(276.882 -0.641)",fill:"#ccc"}),t.u("ellipse",{cx:"71.849",cy:"89.934",rx:"71.849",ry:"89.934",transform:"translate(722.256 428.806)",fill:"#f2f2f2"}),t.u("path",{d:"M510.532,627.307h0a1.777,1.777,0,0,0-2.4-.744l-7.194,3.788-2.464-141.27h-.2l-3.75,203.7h7.5l-1.02-58.456,8.78-4.622A1.777,1.777,0,0,0,510.532,627.307Z",transform:"translate(296.026 11.574)",fill:"#ccc"}),t.u("path",{d:"M626.318,603.854a2.25,2.25,0,0,0-3.04-.943l-9.116,4.8-3.122-179h-.25l-4.752,258.115h9.5l-1.292-74.07,11.125-5.857a2.251,2.251,0,0,0,.943-3.04Z",transform:"translate(286.704 16.621)",fill:"#3f3d56"}),t.u("path",{d:"M777.247,703.1H250.155a30.276,30.276,0,0,1-30.241-30.241V391.525a30.276,30.276,0,0,1,30.241-30.241H777.247a30.276,30.276,0,0,1,30.241,30.241V672.862A30.276,30.276,0,0,1,777.247,703.1Z",transform:"translate(318.982 22.257)",fill:"#fff"}),t.u("path",{d:"M671.188,708.113h-370.8c-.464,0-.928-.01-1.386-.036l175.372-98.766c3.339-1.919,10.831-2.595,16.734-1.509a15.16,15.16,0,0,1,4.641,1.509l117.7,66.28,5.639,3.172Z",transform:"translate(288.046 16.168)",fill:"#f2f2f2"}),t.u("path",{d:"M788.457,708.163H467.743l62.148-29.351,4.472-2.114,80.984-38.25c5.309-2.507,18.082-2.663,24.324-.473q.629.224,1.166.473Z",transform:"translate(287.761 16.118)",fill:"#f2f2f2"}),t.u("path",{d:"M777.247,703.1H250.155a30.276,30.276,0,0,1-30.241-30.241V391.525a30.276,30.276,0,0,1,30.241-30.241H777.247a30.276,30.276,0,0,1,30.241,30.241V672.862A30.276,30.276,0,0,1,777.247,703.1ZM250.155,363.117a28.441,28.441,0,0,0-28.409,28.409V672.862a28.441,28.441,0,0,0,28.409,28.409H777.247a28.441,28.441,0,0,0,28.409-28.409V391.525a28.441,28.441,0,0,0-28.409-28.409Z",transform:"translate(318.982 22.257)",fill:"#3f3d56"}),t.u("g",{transform:"translate(696.754 297.373)",children:[t.u("ellipse",{cx:"61.798",cy:"61.798",rx:"61.798",ry:"61.798",transform:"translate(215.662 36.955)",fill:"#ff6584"}),t.u("ellipse",{cx:"78.271",cy:"97.971",rx:"78.271",ry:"97.971",transform:"translate(225.025 127.808)",fill:"#e6e6e6"}),t.u("path",{d:"M508.105,323.365h.215l3.87,221.909h-8.171Z",transform:"translate(-204.593 -117.286)",fill:"#ccc"}),t.u("path",{d:"M739.374,634.239h0a1.935,1.935,0,0,1-.811,2.614l-11.226,5.91-1.8-3.425,11.226-5.91A1.935,1.935,0,0,1,739.374,634.239Z",transform:"translate(-422.513 -281.249)",fill:"#ccc"}),t.u("ellipse",{cx:"78.271",cy:"97.971",rx:"78.271",ry:"97.971",transform:"translate(0 127.808)",fill:"#e6e6e6"}),t.u("path",{d:"M513.962,637.661h0a1.936,1.936,0,0,0-2.614-.811l-7.837,4.126-2.684-153.9h-.215l-4.085,221.91H504.7l-1.111-63.68,9.565-5.036A1.936,1.936,0,0,0,513.962,637.661Z",transform:"translate(-422.126 -281.002)",fill:"#ccc"}),t.u("path",{d:"M612.666,280.653c54.774,0,99.294,103.207,99.294,171.768s-44.4,124.14-99.177,124.14-99.177-55.579-99.177-124.14S557.892,280.653,612.666,280.653Z",transform:"translate(-422.155 -280.653)",fill:"currentColor"}),t.u("path",{d:"M630.131,617.508a2.452,2.452,0,0,0-3.312-1.027l-9.931,5.228-3.4-195h-.272L608.039,707.89h10.353l-1.408-80.69,12.119-6.38A2.452,2.452,0,0,0,630.131,617.508Z",transform:"translate(-422.315 -280.9)",fill:"#3f3d56"})]})]})}),t.u("div",{className:"space-y-4",children:[t.u("h4",{className:"text-foreground text-center text-lg font-semibold",children:e}),t.u("p",{className:"text-muted-foreground text-center",children:r})]})]})}function be({organizationId:e,errorType:r}){return"custom-auth-invalid"===r?t.u(ge,{title:"Invalid input",children:"Custom auth mode requires uid, fname, lname. For more details please contact Qrati support."}):t.u(ge,{title:"page-not-registered"===r?"Page not registered":"Something went wrong",children:["If you are an admin of this organization, please add the current page URL in Allowed URLs under"," ",t.u("a",{className:"font-medium text-blue-500",href:t.EXTERNAL_ROUTES.ORGANIZATION_SETTINGS(e),target:"_blank",rel:"noreferrer",children:"Organization Settings"})," ","⇨"," ",t.u("a",{className:"font-medium text-blue-500",href:t.EXTERNAL_ROUTES.ORGANIZATION_SETTINGS_INTEGRATION(e),target:"_blank",rel:"noreferrer",children:"Integration Settings"}),". For more details please contact Qrati support."]})}var we=e=>({google:"Google",apple:"Apple"}[e]||e.charAt(0).toUpperCase()+e.slice(1)),_e=(e,t=0)=>{let r=t^e.length,n=0;const o=e.length;for(;n+3<o;){let t=255&e.charCodeAt(n)|(255&e.charCodeAt(n+1))<<8|(255&e.charCodeAt(n+2))<<16|(255&e.charCodeAt(n+3))<<24;t=Math.imul(t,3432918353),t=t<<15|t>>>17,t=Math.imul(t,461845907),r^=t,r=r<<13|r>>>19,r=Math.imul(r,5)+3864292196,n+=4}let s=0;switch(o-n){case 3:s^=(255&e.charCodeAt(n+2))<<16;case 2:s^=(255&e.charCodeAt(n+1))<<8;case 1:s^=255&e.charCodeAt(n),s=Math.imul(s,3432918353),s=s<<15|s>>>17,s=Math.imul(s,461845907),r^=s}return r^=r>>>16,r=Math.imul(r,2246822507),r^=r>>>13,r=Math.imul(r,3266489909),r^=r>>>16,r>>>=0,r.toString(16).padStart(8,"0")},ve=async e=>{try{return await e()}catch{return null}},Re=e=>{if(null===e||"object"!=typeof e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(Re).join(",")}]`;const t=Object.keys(e).sort(),r=[];for(const n of t){const t=e[n];void 0!==t&&r.push(`${Re(n)}:${Re(t)}`)}return`{${r.join(",")}}`},Se=async({debug:e=!1}={})=>{const t=await ve(()=>Ae()),r=await ve(()=>new Intl.NumberFormat(window.navigator.languages?.[0]||"en").resolvedOptions().numberingSystem),n=window.navigator.languages?Array.from(window.navigator.languages).join(","):window.navigator.language||null,o=Intl.DateTimeFormat().resolvedOptions().timeZone,s=(new Date).getTimezoneOffset(),i=window.matchMedia("(prefers-reduced-motion: reduce)").matches?"reduce":"no-preference",a=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",l=window.matchMedia("(forced-colors: active)").matches?"active":null,{pixelDepth:c,colorDepth:u}=window.screen,h="ontouchstart"in window||window.navigator.maxTouchPoints>0,d=await ve(()=>Te(e)),f=await ve(()=>Ee()),p=await ve(()=>xe(e)),m=await ve(()=>Oe(e)),y=window.screen.width&&window.screen.height?(window.screen.width/window.screen.height).toFixed(4):null,g={vendor:window.navigator.vendor||null,platform:window.navigator.platform||null,fonts:t,numberingSystem:r,languages:n,timezone:o,timezoneOffset:s,reducedMotion:i,colorScheme:a,hardwareConcurrency:window.navigator.hardwareConcurrency||null,deviceMemory:window.navigator.deviceMemory||null,forcedColors:l,pixelDepth:c,colorDepth:u,touchSupport:h,canvasID:d,webglID:f,webgpuID:p,audioID:m},b={aspectRatio:y,width:window.screen.width,height:window.screen.height,maxTouchPoints:window.navigator.maxTouchPoints};return(!0===navigator.userAgentData?.mobile||/Mobi|Android|iPhone|iPad|iPod|webOS|BlackBerry|Windows Phone/i.test(navigator.userAgent)||navigator.maxTouchPoints>0&&matchMedia("(pointer:coarse)").matches&&innerWidth<=1024)&&Object.assign(g,b),{fingerprint:_e(Re(g)),...g}},Te=async e=>{const t=document.createElement("canvas");t.width=280,t.height=100;const r=t.getContext("2d"),n=r.createLinearGradient(0,0,280,100);return n.addColorStop(0,"#f60"),n.addColorStop(.4,"#09f"),n.addColorStop(.7,"#f09"),n.addColorStop(1,"#0f9"),r.fillStyle=n,r.fillRect(0,0,280,100),r.font='18px "Arial","Helvetica","DejaVu Sans",sans-serif',r.fillStyle="#000",r.textBaseline="alphabetic",r.fillText("Fingerprint ¼½¾™©®∆π∑€¶§",12,45),r.font='bold 22px "Georgia","Times New Roman",serif',r.fillStyle="#222",r.fillText("🦊🐱🚀 2026",12,78),r.globalAlpha=.7,r.fillStyle="rgba(255, 80, 0, 0.35)",r.fillRect(180,20,80,60),r.beginPath(),r.arc(220,50,32,0,2*Math.PI),r.strokeStyle="#fff",r.lineWidth=4,r.stroke(),r.beginPath(),r.moveTo(30,85),r.quadraticCurveTo(140,20,240,85),r.strokeStyle="#00f",r.lineWidth=3,r.stroke(),e&&(t.style.border="1px solid #444",document.body.appendChild(t)),_e(t.toDataURL("image/png"))},Ee=()=>{const e=document.createElement("canvas"),t=e.getContext("webgl")||e.getContext("experimental-webgl"),r=t.getExtension("WEBGL_debug_renderer_info");return _e(Re({vendor:r?t.getParameter(r.UNMASKED_VENDOR_WEBGL):t.getParameter(t.VENDOR),renderer:r?t.getParameter(r.UNMASKED_RENDERER_WEBGL):t.getParameter(t.RENDERER)}))},xe=async e=>{const t=await navigator.gpu.requestAdapter({powerPreference:"high-performance"}),r={vendor:t.info?.vendor??"",architecture:t.info?.architecture??"",description:t.info?.description??"",features:Array.from(t.features).sort(),limits:Array.from(t.limits).sort()};if(e){const e=document.createElement("pre");e.style.margin="10px 0",e.style.padding="10px",e.style.border="1px solid #444",e.style.background="#111",e.style.color="#0f8",e.style.fontFamily="monospace",e.textContent=`WebGPU:\n${JSON.stringify(r,null,2)}`,document.body.appendChild(e)}return _e(Re(r))},Oe=async e=>{const t=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,6e3,44100),r=t.createOscillator();r.type="sawtooth",r.frequency.value=8800;const n=t.createDynamicsCompressor();n.threshold.value=-48,n.knee.value=30,n.ratio.value=14,n.attack.value=0,n.release.value=.3;const o=t.createGain();o.gain.value=.4,r.connect(n),n.connect(o),o.connect(t.destination),r.start(0);const s=(await t.startRendering()).getChannelData(0);let i=0,a=0;for(let c=3e3;c<5800;c+=2){const e=s[c];i=31*i+Math.floor(1e5*(e+1))|0,a=Math.imul(a^Math.floor(98765*e),2246822519)}const l=i>>>0^a>>>0;if(e){const e=document.createElement("canvas");e.width=500,e.height=120,e.style.border="1px solid #444",e.style.margin="10px 0",e.title="Audio buffer snippet (4500–5000 samples)";const t=e.getContext("2d");t.fillStyle="#111",t.fillRect(0,0,e.width,e.height),t.font="14px monospace",t.fillStyle="#0f8",t.textAlign="left",t.fillText("AudioID",10,20),t.strokeStyle="#0f8",t.lineWidth=1.5,t.beginPath();const r=Array.from(s.slice(4500,5e3)),n=e.width/r.length;for(let o=0;o<r.length;o++){const s=o*n,i=(r[o]+1)/2*e.height;0===o?t.moveTo(s,i):t.lineTo(s,i)}t.stroke(),document.body.appendChild(e)}return _e(l.toString(16))},Ae=()=>{const e=["monospace","serif","sans-serif"],t=["Arial","Helvetica","Verdana","Trebuchet MS","Comic Sans MS","Georgia","Times New Roman","Courier New","Segoe UI","Roboto","Open Sans","Noto Sans","system-ui","-apple-system","BlinkMacSystemFont"],r=document.createElement("span");r.style.fontSize="72px",r.style.position="absolute",r.style.visibility="hidden",r.style.whiteSpace="nowrap",r.textContent="mmmmmmmmmwwwwwww",document.body.appendChild(r);const n={};for(const s of e)r.style.fontFamily=s,n[s]=r.offsetWidth;const o=[];for(const s of t){let t=!1;for(const i of e)if(r.style.fontFamily=`"${s}", ${i}`,r.offsetWidth!==n[i]){o.push(s),t=!0;break}t||(r.style.fontFamily=`"${s}"`,r.offsetWidth!==n.monospace&&r.offsetWidth!==n.serif&&o.push(s))}return document.body.removeChild(r),o.length?o.sort().join(","):null};"undefined"!=typeof window&&(window.getBrowserFingerprint=Se);var Pe=async(e,t)=>{if(e instanceof L){try{const t=await e.response.json();if(t?.error)return t.error;if(t?.message)return t.message;if("INVALID_EMAIL_OR_PASSWORD"===t?.code)return"Invalid email or password"}catch{return t||e.message}return t||e.message}return e instanceof Error?t||e.message:t||String(e)},Ie=t.R(void 0),Ce=({props:e={},children:r})=>{const{organizationId:n,uid:o,fname:s,lname:i,theme:a="light"}=e,[l,c]=t.d(()=>{if("undefined"==typeof window)return null;if(o||s||i)return null;const e=localStorage.getItem("qrati_token");return e?{token:e}:null}),{isLoading:u,data:h,error:f}=d({queryKey:[t.QUERY_KEYS.QRATI_CONNECT_SESSION,n,o??null,s??null,i??null],queryFn:async()=>{const e=await(async()=>{const e=await Se();return"string"==typeof e?e:e?.fingerprint})();return(await ye.post(t.API_ROUTES.INITIALIZE_SESSION,{json:{uid:o,fname:s,lname:i,browserFingerprint:e},headers:{"x-org-id":n,Authorization:o||s||i||!localStorage.getItem("qrati_token")?void 0:`Bearer ${localStorage.getItem("qrati_token")}`}}).json()).data},enabled:!!n});t.y(()=>{const e=h?.authSession?.session?.token,t=h?.authSession?.user;t&&e?(c({...t,token:e}),h?.organization?.customAuth||localStorage.setItem("qrati_token",e)):h?.organization?.customAuth&&o&&s&&i&&c(e=>e??{uid:o,name:`${s} ${i}`,fname:s,lname:i})},[h]);const p=t.T(()=>t.getFontCss(h?.organization?.integrationSettings,h?.organization?.customFontUrl),[h?.organization?.integrationSettings,h?.organization?.customFontUrl]),m=async e=>{try{const t=await((e,t,r)=>new Promise((n,o)=>{if(!e)return void o(new Error("Provider is required"));if(!t)return void o(new Error("Organization ID is required"));const s=new URL(`${r}/qc-social-auth`);s.searchParams.set("provider",e),s.searchParams.set("organizationId",t),s.searchParams.set("origin",window.location.origin);const i=(window.screen.width-500)/2,a=(window.screen.height-600)/2,l=window.open(s.toString(),"qrati_social_auth",`width=500,height=600,left=${i},top=${a},scrollbars=yes,resizable=yes,status=yes`);if(!l)return void o(new Error("Failed to open popup window. Please allow popups and try again."));const c=()=>{clearInterval(h),clearTimeout(d),window.removeEventListener("message",u)},u=e=>{try{const t=new URL(r).origin;if(e.origin!==t)return void console.warn("Origin mismatch:",e.origin,"expected:",t)}catch(h){console.warn("Could not parse origin for verification")}const{type:s,data:i,error:a,organizationId:u}=e.data||{};if(u===t)switch(s){case"QRATI_SOCIAL_AUTH_SUCCESS":c(),l.close(),n({user:i.user,session:i.session,token:i.token});break;case"QRATI_SOCIAL_AUTH_ERROR":console.error("Authentication error:",a),c(),l.close(),o(new Error(a||"Social authentication failed"));break;case"QRATI_SOCIAL_AUTH_CANCELLED":c(),l.close(),o(new Error("Authentication was cancelled"))}else console.warn("Organization ID mismatch:",u,"expected:",t)},h=setInterval(()=>{try{l.closed&&(c(),o(new Error("Authentication was cancelled")))}catch(e){}},1e3);window.addEventListener("message",u);const d=setTimeout(()=>{c(),l.closed||l.close(),o(new Error("Authentication timeout. Please try again."))},3e5)}))(e,n??"","https://qrati.com");return t?.user&&t?.token&&(c({...t.user,token:t.token}),localStorage.setItem("qrati_token",t.token)),t}catch(f){throw console.error("Social login error:",f),f}};return f?t.u(_,{fallback:null,children:t.u(be,{organizationId:n??"",errorType:401===f?.response?.status?"page-not-registered":"generic-error"})}):!h?.organization?.customAuth||o&&s&&i?t.u(Ie.Provider,{value:{props:e,initializing:u,sessionId:h?.sessionId,organization:h?.organization,folders:h?.folders,loadingUser:u,user:l,updateUser:async e=>{c(t=>{const r={...t,...e};return r?.token&&localStorage.setItem("qrati_token",r.token),r})},registerUsingEmail:async(e,r,o,s)=>{try{const i=await ye.post(t.API_ROUTES.REGISTER,{json:{email:e,password:r,fname:o,lname:s},headers:{"x-org-id":n}}).json();return i.error?{error:i.error}:(c({...i.user,token:i.token}),localStorage.setItem("qrati_token",i.token),i)}catch(f){return{error:await Pe(f,"Registration failed")}}},loginWithGoogle:async()=>{try{return await m("google")}catch(f){throw console.error("Google login error:",f),f}},loginWithApple:async()=>{try{return await m("apple")}catch(f){throw console.error("Apple login error:",f),f}},loginUsingEmail:async(e,r)=>{try{const o=await ye.post(t.API_ROUTES.LOGIN,{json:{email:e,password:r},headers:{"x-org-id":n}}).json();return o.error?{error:o.error}:(c({...o.user,token:o.token}),localStorage.setItem("qrati_token",o.token),o)}catch(f){return{error:await Pe(f,"Invalid email or password")}}},sendPasswordResetCode:async e=>{try{const r=await ye.post(t.API_ROUTES.SEND_PASSWORD_RESET_CODE,{json:{email:e.toLowerCase()},headers:{"x-org-id":n}}).json();return r.error?{error:r.error}:r}catch(f){return{error:await Pe(f,"Failed to send password reset code")}}},verifyPasswordResetCode:async(e,r)=>{try{const o=await ye.post(t.API_ROUTES.VERIFY_PASSWORD_RESET_CODE,{json:{email:e.toLowerCase(),code:r},headers:{"x-org-id":n}}).json();return o.error?{error:o.error}:o}catch(f){return{error:await Pe(f,"Invalid code, please check your email")}}},resetPassword:async(e,r)=>{try{const o=await ye.post(t.API_ROUTES.RESET_PASSWORD,{json:{passwordResetCodeId:e,newPassword:r},headers:{"x-org-id":n}}).json();return o.error?{error:o.error}:o}catch(f){return{error:f?.message}}},signout:async()=>{try{const e=await ye.post(t.API_ROUTES.LOGOUT,{headers:{"x-org-id":n,Authorization:`Bearer ${l?.token}`}}).json();return e.error?{error:e.error}:(localStorage.removeItem("qrati_token"),c(null),e)}catch(f){return console.error(f),{error:f?.message}}},error:f},children:t.u("div",{id:"qrati-connect-container",style:{...t.getStyleObject(h?.organization,a),fontFamily:"var(--font-family)"},className:t.cn("bg-background text-foreground relative min-h-[80vh]"),children:[p?t.u("style",{children:p}):null,r]})}):t.u(_,{fallback:null,children:t.u(be,{organizationId:n??"",errorType:"custom-auth-invalid"})})},qe=()=>{const e=t.x(Ie);if(void 0===e)throw new Error("useSession must be used within SessionProvider");return e};Object.defineProperty(exports,"$",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"QueryObserver",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"SessionProvider",{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,"getBrowserFingerprint",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(exports,"getProviderDisplayName",{enumerable:!0,get:function(){return we}}),Object.defineProperty(exports,"ky",{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,"useBaseQuery",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"useQuery",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"useSession",{enumerable:!0,get:function(){return qe}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return R}});
package/react/buiUjKpV.js DELETED
@@ -1,6 +0,0 @@
1
- import{_t as e,a as t,pt as n,t as r,ut as a}from"./Ce4GGag_.js";import*as o from"react";var i="popstate";function l(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function s(e,t){if(!1===e||null==e)throw new Error(t)}function u(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function c(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function h(e,t,n=null,r,a){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?d(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10),unstable_mask:a}}function p({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function d(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function m(e,t,n="/"){return function(e,t,n){let r=T(("string"==typeof t?d(t):t).pathname||"/",n);if(null==r)return null;let a=f(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(a);let o=null;for(let i=0;null==o&&i<a.length;++i){let e=k(r);o=S(a[i],e,false)}return o}(e,t,n)}function f(e,t=[],n=[],r="",a=!1){let o=(e,o,i=a,l)=>{let u={relativePath:void 0===l?e.path||"":l,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(r)&&i)return;s(u.relativePath.startsWith(r),`Absolute route path "${u.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(r.length)}let c=N([r,u.relativePath]),h=n.concat(u);e.children&&e.children.length>0&&(s(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),f(e.children,t,h,c,i)),(null!=e.path||e.index)&&t.push({path:c,score:C(c,e.index),routesMeta:h})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of g(e.path))o(e,t,!0,n);else o(e,t)}),t}function g(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,a=n.endsWith("?"),o=n.replace(/\?$/,"");if(0===r.length)return a?[o,""]:[o];let i=g(r.join("/")),l=[];return l.push(...i.map(e=>""===e?o:[o,e].join("/"))),a&&l.push(...i),l.map(t=>e.startsWith("/")&&""===t?"/":t)}var v=/^:[\w-]+$/,y=3,b=2,w=1,E=10,R=-2,x=e=>"*"===e;function C(e,t){let n=e.split("/"),r=n.length;return n.some(x)&&(r+=R),t&&(r+=b),n.filter(e=>!x(e)).reduce((e,t)=>e+(v.test(t)?y:""===t?w:E),r)}function S(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",i=[];for(let l=0;l<r.length;++l){let e=r[l],s=l===r.length-1,u="/"===o?t:t.slice(o.length)||"/",c=$({path:e.relativePath,caseSensitive:e.caseSensitive,end:s},u),h=e.route;if(!c&&s&&n&&!r[r.length-1].route.index&&(c=$({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!c)return null;Object.assign(a,c.params),i.push({params:a,pathname:N([o,c.pathname]),pathnameBase:j(N([o,c.pathnameBase])),route:h}),"/"!==c.pathnameBase&&(o=N([o,c.pathnameBase]))}return i}function $(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=function(e,t=!1,n=!0){u("*"===e||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,a,o)=>{if(r.push({paramName:t,isOptional:null!=n}),n){let t=o.charAt(a+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=l[r]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const a=l[r];return e[t]=n&&!a?void 0:(a||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:i,pattern:e}}function k(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return u(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function T(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}var P=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function L(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function O(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function M(e){let t=function(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function _(e,t,n,r=!1){let a;"string"==typeof e?a=d(e):(a={...e},s(!a.pathname||!a.pathname.includes("?"),O("?","pathname","search",a)),s(!a.pathname||!a.pathname.includes("#"),O("#","pathname","hash",a)),s(!a.search||!a.search.includes("#"),O("#","search","hash",a)));let o,i=""===e||""===a.pathname,l=i?"/":a.pathname;if(null==l)o=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let u=function(e,t="/"){let n,{pathname:r,search:a="",hash:o=""}="string"==typeof e?d(e):e;return r?(r=r.replace(/\/\/+/g,"/"),n=r.startsWith("/")?L(r.substring(1),"/"):L(r,t)):n=t,{pathname:n,search:A(a),hash:D(o)}}(a,o),c=l&&"/"!==l&&l.endsWith("/"),h=(i||"."===l)&&n.endsWith("/");return u.pathname.endsWith("/")||!c&&!h||(u.pathname+="/"),u}var N=e=>e.join("/").replace(/\/\/+/g,"/"),j=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),A=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",D=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",U=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function F(e){return e.map(e=>e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var W="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function B(e,t){let n=e;if("string"!=typeof n||!P.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(W)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),o=T(r.pathname,t);r.origin===e.origin&&null!=o?n=o+r.search+r.hash:a=!0}catch(o){u(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var I=["POST","PUT","PATCH","DELETE"],H=(new Set(I),["GET",...I]),z=(new Set(H),o.createContext(null));z.displayName="DataRouter";var J=o.createContext(null);J.displayName="DataRouterState";var Y=o.createContext(!1),V=o.createContext({isTransitioning:!1});V.displayName="ViewTransition",o.createContext(/* @__PURE__ */new Map).displayName="Fetchers",o.createContext(null).displayName="Await";var K=o.createContext(null);K.displayName="Navigation";var X=o.createContext(null);X.displayName="Location";var q=o.createContext({outlet:null,matches:[],isDataRoute:!1});q.displayName="Route";var G=o.createContext(null);G.displayName="RouteError";var Q="REACT_ROUTER_ERROR";function Z(){return null!=o.useContext(X)}function ee(){return s(Z(),"useLocation() may be used only in the context of a <Router> component."),o.useContext(X).location}var te="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ne(e){o.useContext(K).static||o.useLayoutEffect(e)}function re(){let{isDataRoute:e}=o.useContext(q);return e?function(){let{router:e}=function(){let e=o.useContext(z);return s(e,me("useNavigate")),e}(),t=fe("useNavigate"),n=o.useRef(!1);return ne(()=>{n.current=!0}),o.useCallback(async(r,a={})=>{u(n.current,te),n.current&&("number"==typeof r?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...a}))},[e,t])}():function(){s(Z(),"useNavigate() may be used only in the context of a <Router> component.");let e=o.useContext(z),{basename:t,navigator:n}=o.useContext(K),{matches:r}=o.useContext(q),{pathname:a}=ee(),i=JSON.stringify(M(r)),l=o.useRef(!1);return ne(()=>{l.current=!0}),o.useCallback((r,o={})=>{if(u(l.current,te),!l.current)return;if("number"==typeof r)return void n.go(r);let s=_(r,JSON.parse(i),a,"path"===o.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:N([t,s.pathname])),(o.replace?n.replace:n.push)(s,o.state,o)},[t,n,i,a,e])}()}var ae=o.createContext(null);function oe(){let{matches:e}=o.useContext(q),t=e[e.length-1];return t?t.params:{}}function ie(e,{relative:t}={}){let{matches:n}=o.useContext(q),{pathname:r}=ee(),a=JSON.stringify(M(n));return o.useMemo(()=>_(e,JSON.parse(a),r,"path"===t),[e,a,r,t])}function le(e,t,n){s(Z(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:r}=o.useContext(K),{matches:a}=o.useContext(q),i=a[a.length-1],l=i?i.params:{},c=i?i.pathname:"/",h=i?i.pathnameBase:"/",p=i&&i.route;{let e=p&&p.path||"";ve(c,!p||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let f,g=ee();if(t){let e="string"==typeof t?d(t):t;s("/"===h||e.pathname?.startsWith(h),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=g;let v=f.pathname||"/",y=v;if("/"!==h){let e=h.replace(/^\//,"").split("/");y="/"+v.replace(/^\//,"").split("/").slice(e.length).join("/")}let b=m(e,{pathname:y});u(p||null!=b,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),u(null==b||void 0!==b[b.length-1].route.element||void 0!==b[b.length-1].route.Component||void 0!==b[b.length-1].route.lazy,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=function(e,t=[],n){let r=n?.state;if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let a=e,i=r?.errors;if(null!=i){let e=a.findIndex(e=>e.route.id&&void 0!==i?.[e.route.id]);s(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let l=!1,u=-1;if(n&&r){l=r.renderFallback;for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(u=e),t.route.id){let{loaderData:e,errors:o}=r,i=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!o||void 0===o[t.route.id]);if(t.route.lazy||i){n.isStatic&&(l=!0),a=u>=0?a.slice(0,u+1):[a[0]];break}}}}let c=n?.onError,h=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:F(r.matches),errorInfo:t})}:void 0;return a.reduceRight((e,n,s)=>{let c,p=!1,d=null,m=null;r&&(c=i&&n.route.id?i[n.route.id]:void 0,d=n.route.errorElement||ue,l&&(u<0&&0===s?(ve("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,m=null):u===s&&(p=!0,m=n.route.hydrateFallbackElement||null)));let f=t.concat(a.slice(0,s+1)),g=()=>{let t;return t=c?d:p?m:n.route.Component?/* @__PURE__ */o.createElement(n.route.Component,null):n.route.element?n.route.element:e,/* @__PURE__ */o.createElement(de,{match:n,routeContext:{outlet:e,matches:f,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===s)?/* @__PURE__ */o.createElement(ce,{location:r.location,revalidation:r.revalidation,component:d,error:c,children:g(),routeContext:{outlet:null,matches:f,isDataRoute:!0},onError:h}):g()},null)}(b&&b.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:N([h,r.encodeLocation?r.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?h:N([h,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),a,n);return t&&w?/* @__PURE__ */o.createElement(X.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...f},navigationType:"POP"}},w):w}function se(){let e=function(){let e=o.useContext(G),t=function(e){let t=o.useContext(J);return s(t,me(e)),t}("useRouteError"),n=fe("useRouteError");return void 0!==e?e:t.errors?.[n]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:r},i={padding:"2px 4px",backgroundColor:r},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=/* @__PURE__ */o.createElement(o.Fragment,null,/* @__PURE__ */o.createElement("p",null,"💿 Hey developer 👋"),/* @__PURE__ */o.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",/* @__PURE__ */o.createElement("code",{style:i},"ErrorBoundary")," or"," ",/* @__PURE__ */o.createElement("code",{style:i},"errorElement")," prop on your route.")),/* @__PURE__ */o.createElement(o.Fragment,null,/* @__PURE__ */o.createElement("h2",null,"Unexpected Application Error!"),/* @__PURE__ */o.createElement("h3",{style:{fontStyle:"italic"}},t),n?/* @__PURE__ */o.createElement("pre",{style:a},n):null,l)}var ue=/* @__PURE__ */o.createElement(se,null),ce=class extends o.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${Q}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new U(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?/* @__PURE__ */o.createElement(q.Provider,{value:this.props.routeContext},/* @__PURE__ */o.createElement(G.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?/* @__PURE__ */o.createElement(pe,{error:e},t):t}};ce.contextType=Y;var he=/* @__PURE__ */new WeakMap;function pe({children:e,error:t}){let{basename:n}=o.useContext(K);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${Q}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let r=he.get(t);if(r)throw r;let a=B(e.location,n);if(W&&!he.get(t)){if(!a.isExternal&&!e.reloadDocument){const n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw he.set(t,n),n}window.location.href=a.absoluteURL||a.to}/* @__PURE__ */
2
- return o.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function de({routeContext:e,match:t,children:n}){let r=o.useContext(z);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),/* @__PURE__ */o.createElement(q.Provider,{value:e},n)}function me(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fe(e){let t=function(e){let t=o.useContext(q);return s(t,me(e)),t}(e),n=t.matches[t.matches.length-1];return s(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}var ge={};function ve(e,t,n){t||ge[e]||(ge[e]=!0,u(!1,n))}function ye({basename:e,children:t,initialEntries:n,initialIndex:r,unstable_useTransitions:a}){let i=o.useRef();null==i.current&&(i.current=function(e={}){let t,{initialEntries:n=["/"],initialIndex:r,v5Compat:a=!1}=e;t=n.map((e,t)=>f(e,"string"==typeof e?null:e.state,0===t?"default":void 0,"string"==typeof e?void 0:e.unstable_mask));let o=c(null==r?t.length-1:r),i="POP",s=null;function c(e){return Math.min(Math.max(e,0),t.length-1)}function m(){return t[o]}function f(e,n=null,r,a){let o=h(t?m().pathname:"/",e,n,r,a);return u("/"===o.pathname.charAt(0),`relative pathnames are not supported in memory history: ${JSON.stringify(e)}`),o}function g(e){return"string"==typeof e?e:p(e)}return{get index(){return o},get action(){return i},get location(){return m()},createHref:g,createURL:e=>new URL(g(e),"http://localhost"),encodeLocation(e){let t="string"==typeof e?d(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push(e,n){i="PUSH";let r=l(e)?e:f(e,n);o+=1,t.splice(o,t.length,r),a&&s&&s({action:i,location:r,delta:1})},replace(e,n){i="REPLACE";let r=l(e)?e:f(e,n);t[o]=r,a&&s&&s({action:i,location:r,delta:0})},go(e){i="POP";let n=c(o+e),r=t[n];o=n,s&&s({action:i,location:r,delta:e})},listen:e=>(s=e,()=>{s=null})}}({initialEntries:n,initialIndex:r,v5Compat:!0}));let s=i.current,[c,m]=o.useState({action:s.action,location:s.location}),f=o.useCallback(e=>{!1===a?m(e):o.startTransition(()=>m(e))},[a]);return o.useLayoutEffect(()=>s.listen(f),[s,f]),/* @__PURE__ */o.createElement(Re,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:s,unstable_useTransitions:a})}function be({to:e,replace:t,state:n,relative:r}){s(Z(),"<Navigate> may be used only in the context of a <Router> component.");let{static:a}=o.useContext(K);u(!a,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:i}=o.useContext(q),{pathname:l}=ee(),c=re(),h=_(e,M(i),l,"path"===r),p=JSON.stringify(h);return o.useEffect(()=>{c(JSON.parse(p),{replace:t,state:n,relative:r})},[c,p,r,t,n]),null}function we(e){return function(e){let t=o.useContext(q).outlet;return o.useMemo(()=>t&&/* @__PURE__ */o.createElement(ae.Provider,{value:e},t),[t,e])}(e.context)}function Ee(e){s(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Re({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:a,static:i=!1,unstable_useTransitions:l}){s(!Z(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=e.replace(/^\/*/,"/"),h=o.useMemo(()=>({basename:c,navigator:a,static:i,unstable_useTransitions:l,future:{}}),[c,a,i,l]);"string"==typeof n&&(n=d(n));let{pathname:p="/",search:m="",hash:f="",state:g=null,key:v="default",unstable_mask:y}=n,b=o.useMemo(()=>{let e=T(p,c);return null==e?null:{location:{pathname:e,search:m,hash:f,state:g,key:v,unstable_mask:y},navigationType:r}},[c,p,m,f,g,v,r,y]);return u(null!=b,`<Router basename="${c}"> is not able to match the URL "${p}${m}${f}" because it does not start with the basename, so the <Router> won't render anything.`),null==b?null:/* @__PURE__ */o.createElement(K.Provider,{value:h},/* @__PURE__ */o.createElement(X.Provider,{children:t,value:b}))}function xe({children:e,location:t}){return le(Ce(e),t)}function Ce(e,t=[]){let n=[];return o.Children.forEach(e,(e,r)=>{if(!o.isValidElement(e))return;let a=[...t,r];if(e.type===o.Fragment)return void n.push.apply(n,Ce(e.props.children,a));s(e.type===Ee,`[${"string"==typeof e.type?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),s(!e.props.index||!e.props.children,"An index route cannot have child routes.");let i={id:e.props.id||a.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=Ce(e.props.children,a)),n.push(i)}),n}o.useOptimistic,o.memo(function({routes:e,future:t,state:n,isStatic:r,onError:a}){return le(e,void 0,{state:n,isStatic:r,onError:a,future:t})});var Se="get",$e="application/x-www-form-urlencoded";function ke(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}var Te=null,Pe=/* @__PURE__ */new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Le(e){return null==e||Pe.has(e)?e:(u(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${$e}"`),null)}function Oe(e,t){if(!1===e||null==e)throw new Error(t)}function Me(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function _e(e,t,n,r,a,o){let i=(e,t)=>!n[t]||e.route.id!==n[t].route.id,l=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===o?t.filter((e,t)=>i(e,t)||l(e,t)):"data"===o?t.filter((t,o)=>{let s=r.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(i(t,o)||l(t,o))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0}):[]}function Ne(){let e=o.useContext(z);return Oe(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var je=o.createContext(void 0);function Ae(){let e=o.useContext(je);return Oe(e,"You must render this element inside a <HydratedRouter> element"),e}function De(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ue({page:e,...t}){let{router:n}=Ne(),r=o.useMemo(()=>m(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?/* @__PURE__ */o.createElement(Fe,{page:e,matches:r,...t}):null}function Fe({page:e,matches:t,...n}){let r=ee(),{future:a,manifest:i,routeModules:l}=Ae(),{basename:s}=Ne(),{loaderData:u,matches:c}=function(){let e=o.useContext(J);return Oe(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}(),h=o.useMemo(()=>_e(e,t,c,i,r,"data"),[e,t,c,i,r]),p=o.useMemo(()=>_e(e,t,c,i,r,"assets"),[e,t,c,i,r]),d=o.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=/* @__PURE__ */new Set,o=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];t&&t.hasLoader&&(!h.some(t=>t.route.id===e.route.id)&&e.route.id in u&&l[e.route.id]?.shouldRevalidate||t.hasClientLoader?o=!0:n.add(e.route.id))}),0===n.size)return[];let c=function(e,t,n,r){let a="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:"/"===a.pathname?a.pathname=`_root.${r}`:t&&"/"===T(a.pathname,t)?a.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${r}`,a}(e,s,a.unstable_trailingSlashAwareDataRequests,"data");return o&&n.size>0&&c.searchParams.set("_routes",t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(",")),[c.pathname+c.search]},[s,a.unstable_trailingSlashAwareDataRequests,u,r,i,h,t,e,l]),m=o.useMemo(()=>function(e,t,{includeHydrateFallback:n}={}){return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let a=[r.module];return r.clientActionModule&&(a=a.concat(r.clientActionModule)),r.clientLoaderModule&&(a=a.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(a=a.concat(r.hydrateFallbackModule)),r.imports&&(a=a.concat(r.imports)),a}).flat(1),[...new Set(r)];var r}(p,i),[p,i]),f=function(e){let{manifest:t,routeModules:n}=Ae(),[r,a]=o.useState([]);return o.useEffect(()=>{let r=!1;return async function(e,t,n){return function(e,t){let n=/* @__PURE__ */new Set;return new Set(t),e.reduce((e,t)=>{let r=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(t));return n.has(r)||(n.add(r),e.push({key:r,link:t})),e},[])}((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await async function(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Me).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(e,t,n).then(e=>{r||a(e)}),()=>{r=!0}},[e,t,n]),r}(p);/* @__PURE__ */
3
- return o.createElement(o.Fragment,null,d.map(e=>/* @__PURE__ */o.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n})),m.map(e=>/* @__PURE__ */o.createElement("link",{key:e,rel:"modulepreload",href:e,...n})),f.map(({key:e,link:t})=>/* @__PURE__ */o.createElement("link",{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function We(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}je.displayName="FrameworkContext";var Be="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{Be&&(window.__reactRouterVersion="7.13.1")}catch(Et){}function Ie({basename:e,children:t,unstable_useTransitions:n,window:r}){let a=o.useRef();null==a.current&&(a.current=function(e={}){return function(e,t,n,r={}){let{window:a=document.defaultView,v5Compat:o=!1}=r,u=a.history,d="POP",m=null,f=g();function g(){return(u.state||{idx:null}).idx}function v(){d="POP";let e=g(),t=null==e?null:e-f;f=e,m&&m({action:d,location:b.location,delta:t})}function y(e){return function(e,t=!1){let n="http://localhost";"undefined"!=typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),s(n,"No window.location.(origin|href) available to create URL");let r="string"==typeof e?e:p(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}(e)}null==f&&(f=0,u.replaceState({...u.state,idx:f},""));let b={get action(){return d},get location(){return e(a,u)},listen(e){if(m)throw new Error("A history only accepts one active listener");return a.addEventListener(i,v),m=e,()=>{a.removeEventListener(i,v),m=null}},createHref:e=>t(a,e),createURL:y,encodeLocation(e){let t=y(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){d="PUSH";let r=l(e)?e:h(b.location,e,t);n&&n(r,e),f=g()+1;let i=c(r,f),s=b.createHref(r.unstable_mask||r);try{u.pushState(i,"",s)}catch(p){if(p instanceof DOMException&&"DataCloneError"===p.name)throw p;a.location.assign(s)}o&&m&&m({action:d,location:b.location,delta:1})},replace:function(e,t){d="REPLACE";let r=l(e)?e:h(b.location,e,t);n&&n(r,e),f=g();let a=c(r,f),i=b.createHref(r.unstable_mask||r);u.replaceState(a,"",i),o&&m&&m({action:d,location:b.location,delta:0})},go:e=>u.go(e)};return b}(function(e,t){let{pathname:n="/",search:r="",hash:a=""}=d(e.location.hash.substring(1));return n.startsWith("/")||n.startsWith(".")||(n="/"+n),h("",{pathname:n,search:r,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){let n=e.document.querySelector("base"),r="";if(n&&n.getAttribute("href")){let t=e.location.href,n=t.indexOf("#");r=-1===n?t:t.slice(0,n)}return r+"#"+("string"==typeof t?t:p(t))},function(e,t){u("/"===e.pathname.charAt(0),`relative pathnames are not supported in hash history.push(${JSON.stringify(t)})`)},e)}({window:r,v5Compat:!0}));let m=a.current,[f,g]=o.useState({action:m.action,location:m.location}),v=o.useCallback(e=>{!1===n?g(e):o.startTransition(()=>g(e))},[n]);return o.useLayoutEffect(()=>m.listen(v),[m,v]),/* @__PURE__ */o.createElement(Re,{basename:e,children:t,location:f.location,navigationType:f.action,navigator:m,unstable_useTransitions:n})}var He=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ze=o.forwardRef(function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:a,replace:i,unstable_mask:l,state:u,target:c,to:h,preventScrollReset:d,viewTransition:m,unstable_defaultShouldRevalidate:f,...g},v){let{basename:y,navigator:b,unstable_useTransitions:w}=o.useContext(K),E="string"==typeof h&&He.test(h),R=B(h,y),x=function(e,{relative:t}={}){s(Z(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=o.useContext(K),{hash:a,pathname:i,search:l}=ie(e,{relative:t}),u=i;return"/"!==n&&(u="/"===i?n:N([n,i])),r.createHref({pathname:u,search:l,hash:a})}(h=R.to,{relative:r}),C=ee(),S=null;if(l){let e=_(l,[],C.unstable_mask?C.unstable_mask.pathname:"/",!0);"/"!==y&&(e.pathname="/"===e.pathname?y:N([y,e.pathname])),S=b.createHref(e)}let[$,k,T]=function(e,t){let n=o.useContext(je),[r,a]=o.useState(!1),[i,l]=o.useState(!1),{onFocus:s,onBlur:u,onMouseEnter:c,onMouseLeave:h,onTouchStart:p}=t,d=o.useRef(null);o.useEffect(()=>{if("render"===e&&l(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{l(e.isIntersecting)})},{threshold:.5});return d.current&&e.observe(d.current),()=>{e.disconnect()}}},[e]),o.useEffect(()=>{if(r){let e=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{a(!0)},f=()=>{a(!1),l(!1)};return n?"intent"!==e?[i,d,{}]:[i,d,{onFocus:De(s,m),onBlur:De(u,f),onMouseEnter:De(c,m),onMouseLeave:De(h,f),onTouchStart:De(p,m)}]:[!1,d,{}]}(n,g),P=function(e,{target:t,replace:n,unstable_mask:r,state:a,preventScrollReset:i,relative:l,viewTransition:s,unstable_defaultShouldRevalidate:u,unstable_useTransitions:c}={}){let h=re(),d=ee(),m=ie(e,{relative:l});return o.useCallback(f=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(f,t)){f.preventDefault();let t=void 0!==n?n:p(d)===p(m),g=()=>h(e,{replace:t,unstable_mask:r,state:a,preventScrollReset:i,relative:l,viewTransition:s,unstable_defaultShouldRevalidate:u});c?o.startTransition(()=>g()):g()}},[d,h,m,n,r,a,t,e,i,l,s,u,c])}(h,{replace:i,unstable_mask:l,state:u,target:c,preventScrollReset:d,relative:r,viewTransition:m,unstable_defaultShouldRevalidate:f,unstable_useTransitions:w}),L=!(R.isExternal||a),O=/* @__PURE__ */o.createElement("a",{...g,...T,href:(L?S:void 0)||R.absoluteURL||x,onClick:L?function(t){e&&e(t),t.defaultPrevented||P(t)}:e,ref:We(v,k),target:c,"data-discover":E||"render"!==t?void 0:"true"});return $&&!E?/* @__PURE__ */o.createElement(o.Fragment,null,O,/* @__PURE__ */o.createElement(Ue,{page:x})):O});ze.displayName="Link";var Je=o.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:a,to:i,viewTransition:l,children:u,...c},h){let p=ie(i,{relative:c.relative}),d=ee(),m=o.useContext(J),{navigator:f,basename:g}=o.useContext(K),v=null!=m&&function(e,{relative:t}={}){let n=o.useContext(V);s(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ve("useViewTransitionState"),a=ie(e,{relative:t});if(!n.isTransitioning)return!1;let i=T(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=T(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=$(a.pathname,l)||null!=$(a.pathname,i)}(p)&&!0===l,y=f.encodeLocation?f.encodeLocation(p).pathname:p.pathname,b=d.pathname,w=m&&m.navigation&&m.navigation.location?m.navigation.location.pathname:null;t||(b=b.toLowerCase(),w=w?w.toLowerCase():null,y=y.toLowerCase()),w&&g&&(w=T(w,g)||w);const E="/"!==y&&y.endsWith("/")?y.length-1:y.length;let R,x=b===y||!r&&b.startsWith(y)&&"/"===b.charAt(E),C=null!=w&&(w===y||!r&&w.startsWith(y)&&"/"===w.charAt(y.length)),S={isActive:x,isPending:C,isTransitioning:v},k=x?e:void 0;R="function"==typeof n?n(S):[n,x?"active":null,C?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let P="function"==typeof a?a(S):a;/* @__PURE__ */
4
- return o.createElement(ze,{...c,"aria-current":k,className:R,ref:h,style:P,to:i,viewTransition:l},"function"==typeof u?u(S):u)});Je.displayName="NavLink";var Ye=o.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:a,state:i,method:l=Se,action:u,onSubmit:c,relative:h,preventScrollReset:d,viewTransition:m,unstable_defaultShouldRevalidate:f,...g},v)=>{let{unstable_useTransitions:y}=o.useContext(K),b=function(){let{router:e}=Ve("useSubmit"),{basename:t}=o.useContext(K),n=fe("useRouteId"),r=e.fetch,a=e.navigate;return o.useCallback(async(e,o={})=>{let{action:i,method:l,encType:s,formData:u,body:c}=function(e,t){let n,r,a,o,i;if(ke(l=e)&&"form"===l.tagName.toLowerCase()){let i=e.getAttribute("action");r=i?T(i,t):null,n=e.getAttribute("method")||Se,a=Le(e.getAttribute("enctype"))||$e,o=new FormData(e)}else if(function(e){return ke(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return ke(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(r=l?T(l,t):null,n=e.getAttribute("formmethod")||i.getAttribute("method")||Se,a=Le(e.getAttribute("formenctype"))||Le(i.getAttribute("enctype"))||$e,o=new FormData(i,e),!function(){if(null===Te)try{new FormData(document.createElement("form"),0),Te=!1}catch(Et){Te=!0}return Te}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}else t&&o.append(t,r)}}else{if(ke(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Se,r=null,a=$e,i=e}var l;return o&&"text/plain"===a&&(i=o,o=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:o,body:i}}(e,t);!1===o.navigate?await r(o.fetcherKey||Xe(),n,o.action||i,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:u,body:c,formMethod:o.method||l,formEncType:o.encType||s,flushSync:o.flushSync}):await a(o.action||i,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:u,body:c,formMethod:o.method||l,formEncType:o.encType||s,replace:o.replace,state:o.state,fromRouteId:n,flushSync:o.flushSync,viewTransition:o.viewTransition})},[r,a,t,n])}(),w=function(e,{relative:t}={}){let{basename:n}=o.useContext(K),r=o.useContext(q);s(r,"useFormAction must be used inside a RouteContext");let[a]=r.matches.slice(-1),i={...ie(e||".",{relative:t})},l=ee();if(null==e){i.search=l.search;let e=new URLSearchParams(i.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();i.search=n?`?${n}`:""}}return e&&"."!==e||!a.route.index||(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(i.pathname="/"===i.pathname?n:N([n,i.pathname])),p(i)}(u,{relative:h}),E="get"===l.toLowerCase()?"get":"post",R="string"==typeof u&&He.test(u);/* @__PURE__ */
5
- return o.createElement("form",{ref:v,method:E,action:w,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute("formmethod")||l,u=()=>b(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:a,state:i,relative:h,preventScrollReset:d,viewTransition:m,unstable_defaultShouldRevalidate:f});y&&!1!==n?o.startTransition(()=>u()):u()},...g,"data-discover":R||"render"!==e?void 0:"true"})});function Ve(e){let t=o.useContext(z);return s(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}Ye.displayName="Form";var Ke=0,Xe=()=>`__${String(++Ke)}__`,qe=({as:n="div",className:r,threshold:o=.5,rootMargin:i="0px",triggerOnce:l,onChange:s,onClick:u,children:c})=>{const h=a(null),p=a(!1);return e(()=>{const e=h.current;if(!e)return;const t=new IntersectionObserver(e=>{e.forEach(e=>{l&&p.current||(e.isIntersecting&&(p.current=!0),s?.(e.isIntersecting))})},{threshold:o,rootMargin:i});return t.observe(e),()=>t.disconnect()},[o,i,s,l]),/* @__PURE__ */t(n,{ref:h,className:r,onClick:u,children:c})},Ge=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],Qe=e=>{let t=0;for(let n=0;n<e.length;n++){let r=e[n];t=83*t+Ge.indexOf(r)}return t},Ze=e=>{let t=e/255;return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},et=e=>{let t=Math.max(0,Math.min(1,e));return t<=.0031308?Math.trunc(12.92*t*255+.5):Math.trunc(255*(1.055*Math.pow(t,.4166666666666667)-.055)+.5)},tt=(e,t)=>(e=>e<0?-1:1)(e)*Math.pow(Math.abs(e),t),nt=class extends Error{constructor(e){super(e),this.name="ValidationError",this.message=e}},rt=e=>{let t=e>>8&255,n=255&e;return[Ze(e>>16),Ze(t),Ze(n)]},at=(e,t)=>{let n=Math.floor(e/361),r=Math.floor(e/19)%19,a=e%19;return[tt((n-9)/9,2)*t,tt((r-9)/9,2)*t,tt((a-9)/9,2)*t]},ot=(e,t,n,r)=>{(e=>{if(!e||e.length<6)throw new nt("The blurhash string must be at least 6 characters");let t=Qe(e[0]),n=Math.floor(t/9)+1,r=t%9+1;if(e.length!==4+2*r*n)throw new nt(`blurhash length mismatch: length is ${e.length} but it should be ${4+2*r*n}`)})(e),r|=1;let a=Qe(e[0]),o=Math.floor(a/9)+1,i=a%9+1,l=(Qe(e[1])+1)/166,s=new Array(i*o);for(let h=0;h<s.length;h++)s[h]=0===h?rt(Qe(e.substring(2,6))):at(Qe(e.substring(4+2*h,6+2*h)),l*r);let u=4*t,c=new Uint8ClampedArray(u*n);for(let h=0;h<n;h++)for(let e=0;e<t;e++){let r=0,a=0,l=0;for(let u=0;u<o;u++)for(let o=0;o<i;o++){let c=Math.cos(Math.PI*e*o/t)*Math.cos(Math.PI*h*u/n),p=s[o+u*i];r+=p[0]*c,a+=p[1]*c,l+=p[2]*c}let p=et(r),d=et(a),m=et(l);c[4*e+0+h*u]=p,c[4*e+1+h*u]=d,c[4*e+2+h*u]=m,c[4*e+3+h*u]=255}return c},it=Object.defineProperty,lt=Object.defineProperties,st=Object.getOwnPropertyDescriptors,ut=Object.getOwnPropertySymbols,ct=Object.prototype.hasOwnProperty,ht=Object.prototype.propertyIsEnumerable,pt=(e,t,n)=>t in e?it(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,dt=(e,t)=>{for(var n in t||(t={}))ct.call(t,n)&&pt(e,n,t[n]);if(ut)for(var n of ut(t))ht.call(t,n)&&pt(e,n,t[n]);return e},mt=(e,t)=>lt(e,st(t)),ft=(e,t)=>{var n={};for(var r in e)ct.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&ut)for(var r of ut(e))t.indexOf(r)<0&&ht.call(e,r)&&(n[r]=e[r]);return n},gt=class extends o.PureComponent{constructor(){super(...arguments),this.canvas=null,this.handleRef=e=>{this.canvas=e,this.draw()},this.draw=()=>{let{hash:e,height:t,punch:n,width:r}=this.props;if(this.canvas){let a=ot(e,r,t,n),o=this.canvas.getContext("2d"),i=o.createImageData(r,t);i.data.set(a),o.putImageData(i,0,0)}}}componentDidUpdate(){this.draw()}render(){let e=this.props,{hash:t,height:n,width:r}=e,a=ft(e,["hash","height","width"]);return o.createElement("canvas",mt(dt({},a),{height:n,width:r,ref:this.handleRef}))}};gt.defaultProps={height:128,width:128};var vt={position:"absolute",top:0,bottom:0,left:0,right:0,width:"100%",height:"100%"},yt=class extends o.PureComponent{componentDidUpdate(){if(this.props.resolutionX<=0)throw new Error("resolutionX must be larger than zero");if(this.props.resolutionY<=0)throw new Error("resolutionY must be larger than zero")}render(){let e=this.props,{hash:t,height:n,width:r,punch:a,resolutionX:i,resolutionY:l,style:s}=e,u=ft(e,["hash","height","width","punch","resolutionX","resolutionY","style"]);return o.createElement("div",mt(dt({},u),{style:mt(dt({display:"inline-block",height:n,width:r},s),{position:"relative"})}),o.createElement(gt,{hash:t,height:l,width:i,punch:a,style:vt}))}};yt.defaultProps={height:128,width:128,resolutionX:32,resolutionY:32};var bt=gt,wt=({src:o,alt:i,threshold:l=.1,rootMargin:s="200px 0px",blurhash:u,containerClassName:c="size-full",wrapperClassName:h,imgClassName:p="",sizeMode:d="cover",position:m="center",delayMs:f=100,delayTime:g,onClick:v})=>{const y=u&&u.length>=6?u:"LEHV6nWB2yk8pyo0adR*.7kCMdnj",[b,w]=n(!1),[E,R]=n(!1),[x,C]=n(!1),S=a(null),$="number"==typeof g?g:f,k=h??c;e(()=>{if(!b)return x?S.current=window.setTimeout(()=>{R(!0)},$):S.current&&(clearTimeout(S.current),S.current=null),()=>{S.current&&clearTimeout(S.current)}},[x,b,$]);const T=E&&x||b;/* @__PURE__ */
6
- return t(qe,{as:"div",className:r(k,"relative overflow-hidden"),threshold:l,rootMargin:s,onChange:e=>C(e),children:[!b&&/* @__PURE__ */t(bt,{className:"size-full blur-2xl",hash:y}),T&&o&&/* @__PURE__ */t("img",{alt:i,src:o,onLoad:()=>w(!0),className:r("absolute top-0 left-0 size-full object-center transition-all duration-300",b?"scale-100 opacity-100":"scale-95 opacity-0","contain"===d?"object-contain":"object-cover","top"===m?"object-top":"bottom"===m?"object-bottom":"object-center",p),onClick:e=>v?.(e)})]})};export{ze as a,be as c,xe as d,ee as f,Ie as i,we as l,oe as m,ot as n,ye as o,re as p,qe as r,Je as s,wt as t,Ee as u};
package/react/dLaHt9rf.js DELETED
@@ -1 +0,0 @@
1
- const e=require("./CPs8NoX7.js"),n=require("./CDAGXOJa.js"),r=require("./BBaYBpSS.js"),t=require("./zrUJi_8F.js");var o=new n.QueryClient,i=(n,i)=>{e.J(e.u(e.QueryClientProvider,{client:o,children:e.u(r.MemoryRouter,{children:e.u(t.EventMapPopup,{event:n})})}),i)};exports.default=({events:n,apiKey:r})=>{const t=e.A(null),o=e.A(null);return e.y(()=>{if(t.current&&!o.current)return(async()=>{const{setOptions:e,importLibrary:a}=await Promise.resolve().then(()=>require("./CO70kETi.js"));e({key:r,v:"weekly"}),await Promise.all([a("maps"),a("marker")]);const s=window.google.maps;if(!t.current)return;const l=new s.Map(t.current,{mapId:"DEMO_MAP_ID",renderingType:"VECTOR",mapTypeId:"roadmap",center:{lat:20,lng:0},zoom:2,mapTypeControl:!1,streetViewControl:!1});s.event.addListenerOnce(l,"idle",()=>{l.getRenderingType?.()!==s.RenderingType?.VECTOR&&console.warn("Google Maps fell back to raster rendering; globe view is unavailable in raster mode.")}),o.current=l;const c=n.filter(e=>"number"==typeof e.location?.x&&"number"==typeof e.location?.y);if(0===c.length)return;const d=new s.LatLngBounds,u=new s.InfoWindow({maxWidth:200});for(const n of c){const e=n.location.x,r={lat:n.location.y,lng:e};d.extend(r);const t=document.createElement("div");t.style.cssText="\n width: 28px; height: 28px; cursor: pointer;\n background: var(--color-primary, #6366f1);\n border-radius: 50% 50% 50% 0;\n transform: rotate(-45deg);\n border: 2px solid white;\n box-shadow: 0 2px 8px rgba(0,0,0,0.3);\n ";const o=new s.marker.AdvancedMarkerElement({map:l,position:r,content:t});o.addEventListener("gmp-click",()=>{const e=document.createElement("div");i(n,e),u.setContent(e),u.open({anchor:o,map:l})})}l.fitBounds(d)})(),()=>{o.current=null}},[r]),e.u("div",{ref:t,class:"size-full"})};
package/react/zrUJi_8F.js DELETED
@@ -1 +0,0 @@
1
- const e=require("./CPs8NoX7.js"),l=require("./BBaYBpSS.js");var t=({event:t})=>{const n=l.useNavigate(),[r,i]=e.d(0),a=e.A(null),u=(t.contents??[]).filter(e=>e.thumbnailUrl||e.url);return e.y(()=>{if(!(u.length<=1))return a.current=setInterval(()=>{i(e=>(e+1)%u.length)},3e3),()=>{a.current&&clearInterval(a.current)}},[u.length]),e.u("div",{class:"w-44 overflow-hidden",children:[u.length>0?e.u("div",{class:"relative h-28 w-full overflow-hidden",children:[e.u(l.LazyLoadImage,{src:u[r]?.thumbnailUrl||u[r]?.url,blurhash:u[r]?.blurHash,containerClassName:"size-full",imgClassName:"rounded-none"}),u.length>1&&e.u("div",{class:"absolute right-0 bottom-1.5 left-0 flex justify-center gap-1",children:u.map((l,t)=>e.u("button",{onClick:()=>i(t),class:"size-1.5 rounded-full transition-all "+(t===r?"bg-white":"bg-white/50"),"aria-label":`Go to image ${t+1}`},t))})]}):e.u("div",{class:"bg-muted flex h-28 w-full items-center justify-center",children:e.u("svg",{xmlns:"http://www.w3.org/2000/svg",class:"text-muted-foreground size-10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5",children:e.u("path",{d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909M9 12.75a2.25 2.25 0 100-4.5 2.25 2.25 0 000 4.5z"})})}),e.u("div",{class:"",children:[e.u("p",{class:"line-clamp-2 text-sm leading-tight font-medium",children:t.name}),t.location?.label&&e.u("p",{class:"text-foreground line-clamp-1 text-xs",children:t.location.label}),e.u("button",{onClick:()=>{n(e.PAGE_ROUTES.GALLERY(t.slug))},class:"bg-background text-foreground mt-2 w-full rounded py-1 text-xs font-medium transition-opacity hover:opacity-90",children:"Explore"})]})]})};Object.defineProperty(exports,"EventMapPopup",{enumerable:!0,get:function(){return t}});
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes