@shiva004/surveys 0.1.5 → 0.1.7
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.
- package/README.md +38 -38
- package/dist/assets/index-BPe2owrS.js +40 -0
- package/dist/assets/index-Chkvn1aI.css +1 -0
- package/dist/index.html +13 -0
- package/package.json +12 -41
- package/LICENSE +0 -9
- package/dist/index.cjs +0 -109
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -403
- package/dist/index.js +0 -8716
- package/dist/index.js.map +0 -1
- package/dist/style.css +0 -1
package/dist/index.cjs
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
"use strict";var io=e=>{throw TypeError(e)};var Un=(e,t,r)=>t.has(e)||io("Cannot "+r);var R=(e,t,r)=>(Un(e,t,"read from private field"),r?r.call(e):t.get(e)),Se=(e,t,r)=>t.has(e)?io("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),ee=(e,t,r,n)=>(Un(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ce=(e,t,r)=>(Un(e,t,"access private method"),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Kr={exports:{}},ne={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var lo;function Vi(){if(lo)return ne;lo=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),i=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),y=Symbol.iterator;function x(g){return g===null||typeof g!="object"?null:(g=y&&g[y]||g["@@iterator"],typeof g=="function"?g:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,F={};function T(g,N,W){this.props=g,this.context=N,this.refs=F,this.updater=W||C}T.prototype.isReactComponent={},T.prototype.setState=function(g,N){if(typeof g!="object"&&typeof g!="function"&&g!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,g,N,"setState")},T.prototype.forceUpdate=function(g){this.updater.enqueueForceUpdate(this,g,"forceUpdate")};function B(){}B.prototype=T.prototype;function S(g,N,W){this.props=g,this.context=N,this.refs=F,this.updater=W||C}var _=S.prototype=new B;_.constructor=S,k(_,T.prototype),_.isPureReactComponent=!0;var b=Array.isArray,L=Object.prototype.hasOwnProperty,z={current:null},V={key:!0,ref:!0,__self:!0,__source:!0};function K(g,N,W){var $,q={},Z=null,ae=null;if(N!=null)for($ in N.ref!==void 0&&(ae=N.ref),N.key!==void 0&&(Z=""+N.key),N)L.call(N,$)&&!V.hasOwnProperty($)&&(q[$]=N[$]);var fe=arguments.length-2;if(fe===1)q.children=W;else if(1<fe){for(var le=Array(fe),H=0;H<fe;H++)le[H]=arguments[H+2];q.children=le}if(g&&g.defaultProps)for($ in fe=g.defaultProps,fe)q[$]===void 0&&(q[$]=fe[$]);return{$$typeof:e,type:g,key:Z,ref:ae,props:q,_owner:z.current}}function se(g,N){return{$$typeof:e,type:g.type,key:N,ref:g.ref,props:g.props,_owner:g._owner}}function J(g){return typeof g=="object"&&g!==null&&g.$$typeof===e}function he(g){var N={"=":"=0",":":"=2"};return"$"+g.replace(/[=:]/g,function(W){return N[W]})}var oe=/\/+/g;function ue(g,N){return typeof g=="object"&&g!==null&&g.key!=null?he(""+g.key):N.toString(36)}function ie(g,N,W,$,q){var Z=typeof g;(Z==="undefined"||Z==="boolean")&&(g=null);var ae=!1;if(g===null)ae=!0;else switch(Z){case"string":case"number":ae=!0;break;case"object":switch(g.$$typeof){case e:case t:ae=!0}}if(ae)return ae=g,q=q(ae),g=$===""?"."+ue(ae,0):$,b(q)?(W="",g!=null&&(W=g.replace(oe,"$&/")+"/"),ie(q,N,W,"",function(H){return H})):q!=null&&(J(q)&&(q=se(q,W+(!q.key||ae&&ae.key===q.key?"":(""+q.key).replace(oe,"$&/")+"/")+g)),N.push(q)),1;if(ae=0,$=$===""?".":$+":",b(g))for(var fe=0;fe<g.length;fe++){Z=g[fe];var le=$+ue(Z,fe);ae+=ie(Z,N,W,le,q)}else if(le=x(g),typeof le=="function")for(g=le.call(g),fe=0;!(Z=g.next()).done;)Z=Z.value,le=$+ue(Z,fe++),ae+=ie(Z,N,W,le,q);else if(Z==="object")throw N=String(g),Error("Objects are not valid as a React child (found: "+(N==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":N)+"). If you meant to render a collection of children, use an array instead.");return ae}function ve(g,N,W){if(g==null)return g;var $=[],q=0;return ie(g,$,"","",function(Z){return N.call(W,Z,q++)}),$}function we(g){if(g._status===-1){var N=g._result;N=N(),N.then(function(W){(g._status===0||g._status===-1)&&(g._status=1,g._result=W)},function(W){(g._status===0||g._status===-1)&&(g._status=2,g._result=W)}),g._status===-1&&(g._status=0,g._result=N)}if(g._status===1)return g._result.default;throw g._result}var U={current:null},ze={transition:null},qe={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:ze,ReactCurrentOwner:z};function te(){throw Error("act(...) is not supported in production builds of React.")}return ne.Children={map:ve,forEach:function(g,N,W){ve(g,function(){N.apply(this,arguments)},W)},count:function(g){var N=0;return ve(g,function(){N++}),N},toArray:function(g){return ve(g,function(N){return N})||[]},only:function(g){if(!J(g))throw Error("React.Children.only expected to receive a single React element child.");return g}},ne.Component=T,ne.Fragment=r,ne.Profiler=s,ne.PureComponent=S,ne.StrictMode=n,ne.Suspense=u,ne.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=qe,ne.act=te,ne.cloneElement=function(g,N,W){if(g==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+g+".");var $=k({},g.props),q=g.key,Z=g.ref,ae=g._owner;if(N!=null){if(N.ref!==void 0&&(Z=N.ref,ae=z.current),N.key!==void 0&&(q=""+N.key),g.type&&g.type.defaultProps)var fe=g.type.defaultProps;for(le in N)L.call(N,le)&&!V.hasOwnProperty(le)&&($[le]=N[le]===void 0&&fe!==void 0?fe[le]:N[le])}var le=arguments.length-2;if(le===1)$.children=W;else if(1<le){fe=Array(le);for(var H=0;H<le;H++)fe[H]=arguments[H+2];$.children=fe}return{$$typeof:e,type:g.type,key:q,ref:Z,props:$,_owner:ae}},ne.createContext=function(g){return g={$$typeof:i,_currentValue:g,_currentValue2:g,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},g.Provider={$$typeof:o,_context:g},g.Consumer=g},ne.createElement=K,ne.createFactory=function(g){var N=K.bind(null,g);return N.type=g,N},ne.createRef=function(){return{current:null}},ne.forwardRef=function(g){return{$$typeof:l,render:g}},ne.isValidElement=J,ne.lazy=function(g){return{$$typeof:h,_payload:{_status:-1,_result:g},_init:we}},ne.memo=function(g,N){return{$$typeof:m,type:g,compare:N===void 0?null:N}},ne.startTransition=function(g){var N=ze.transition;ze.transition={};try{g()}finally{ze.transition=N}},ne.unstable_act=te,ne.useCallback=function(g,N){return U.current.useCallback(g,N)},ne.useContext=function(g){return U.current.useContext(g)},ne.useDebugValue=function(){},ne.useDeferredValue=function(g){return U.current.useDeferredValue(g)},ne.useEffect=function(g,N){return U.current.useEffect(g,N)},ne.useId=function(){return U.current.useId()},ne.useImperativeHandle=function(g,N,W){return U.current.useImperativeHandle(g,N,W)},ne.useInsertionEffect=function(g,N){return U.current.useInsertionEffect(g,N)},ne.useLayoutEffect=function(g,N){return U.current.useLayoutEffect(g,N)},ne.useMemo=function(g,N){return U.current.useMemo(g,N)},ne.useReducer=function(g,N,W){return U.current.useReducer(g,N,W)},ne.useRef=function(g){return U.current.useRef(g)},ne.useState=function(g){return U.current.useState(g)},ne.useSyncExternalStore=function(g,N,W){return U.current.useSyncExternalStore(g,N,W)},ne.useTransition=function(){return U.current.useTransition()},ne.version="18.3.1",ne}var _r={exports:{}};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/_r.exports;var co;function Wi(){return co||(co=1,(function(e,t){process.env.NODE_ENV!=="production"&&(function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var r="18.3.1",n=Symbol.for("react.element"),s=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),m=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),F=Symbol.for("react.offscreen"),T=Symbol.iterator,B="@@iterator";function S(a){if(a===null||typeof a!="object")return null;var d=T&&a[T]||a[B];return typeof d=="function"?d:null}var _={current:null},b={transition:null},L={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},z={current:null},V={},K=null;function se(a){K=a}V.setExtraStackFrame=function(a){K=a},V.getCurrentStack=null,V.getStackAddendum=function(){var a="";K&&(a+=K);var d=V.getCurrentStack;return d&&(a+=d()||""),a};var J=!1,he=!1,oe=!1,ue=!1,ie=!1,ve={ReactCurrentDispatcher:_,ReactCurrentBatchConfig:b,ReactCurrentOwner:z};ve.ReactDebugCurrentFrame=V,ve.ReactCurrentActQueue=L;function we(a){{for(var d=arguments.length,v=new Array(d>1?d-1:0),w=1;w<d;w++)v[w-1]=arguments[w];ze("warn",a,v)}}function U(a){{for(var d=arguments.length,v=new Array(d>1?d-1:0),w=1;w<d;w++)v[w-1]=arguments[w];ze("error",a,v)}}function ze(a,d,v){{var w=ve.ReactDebugCurrentFrame,A=w.getStackAddendum();A!==""&&(d+="%s",v=v.concat([A]));var Y=v.map(function(M){return String(M)});Y.unshift("Warning: "+d),Function.prototype.apply.call(console[a],console,Y)}}var qe={};function te(a,d){{var v=a.constructor,w=v&&(v.displayName||v.name)||"ReactClass",A=w+"."+d;if(qe[A])return;U("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",d,w),qe[A]=!0}}var g={isMounted:function(a){return!1},enqueueForceUpdate:function(a,d,v){te(a,"forceUpdate")},enqueueReplaceState:function(a,d,v,w){te(a,"replaceState")},enqueueSetState:function(a,d,v,w){te(a,"setState")}},N=Object.assign,W={};Object.freeze(W);function $(a,d,v){this.props=a,this.context=d,this.refs=W,this.updater=v||g}$.prototype.isReactComponent={},$.prototype.setState=function(a,d){if(typeof a!="object"&&typeof a!="function"&&a!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,d,"setState")},$.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};{var q={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},Z=function(a,d){Object.defineProperty($.prototype,a,{get:function(){we("%s(...) is deprecated in plain JavaScript React classes. %s",d[0],d[1])}})};for(var ae in q)q.hasOwnProperty(ae)&&Z(ae,q[ae])}function fe(){}fe.prototype=$.prototype;function le(a,d,v){this.props=a,this.context=d,this.refs=W,this.updater=v||g}var H=le.prototype=new fe;H.constructor=le,N(H,$.prototype),H.isPureReactComponent=!0;function Ve(){var a={current:null};return Object.seal(a),a}var O=Array.isArray;function Q(a){return O(a)}function me(a){{var d=typeof Symbol=="function"&&Symbol.toStringTag,v=d&&a[Symbol.toStringTag]||a.constructor.name||"Object";return v}}function _e(a){try{return We(a),!1}catch{return!0}}function We(a){return""+a}function et(a){if(_e(a))return U("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",me(a)),We(a)}function He(a,d,v){var w=a.displayName;if(w)return w;var A=d.displayName||d.name||"";return A!==""?v+"("+A+")":v}function De(a){return a.displayName||"Context"}function Le(a){if(a==null)return null;if(typeof a.tag=="number"&&U("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case o:return"Fragment";case s:return"Portal";case l:return"Profiler";case i:return"StrictMode";case y:return"Suspense";case x:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case m:var d=a;return De(d)+".Consumer";case u:var v=a;return De(v._context)+".Provider";case h:return He(a,a.render,"ForwardRef");case C:var w=a.displayName||null;return w!==null?w:Le(a.type)||"Memo";case k:{var A=a,Y=A._payload,M=A._init;try{return Le(M(Y))}catch{return null}}}return null}var ut=Object.prototype.hasOwnProperty,ft={key:!0,ref:!0,__self:!0,__source:!0},tt,X,Pe;Pe={};function it(a){if(ut.call(a,"ref")){var d=Object.getOwnPropertyDescriptor(a,"ref").get;if(d&&d.isReactWarning)return!1}return a.ref!==void 0}function ot(a){if(ut.call(a,"key")){var d=Object.getOwnPropertyDescriptor(a,"key").get;if(d&&d.isReactWarning)return!1}return a.key!==void 0}function Wt(a,d){var v=function(){tt||(tt=!0,U("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",d))};v.isReactWarning=!0,Object.defineProperty(a,"key",{get:v,configurable:!0})}function Ht(a,d){var v=function(){X||(X=!0,U("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",d))};v.isReactWarning=!0,Object.defineProperty(a,"ref",{get:v,configurable:!0})}function dt(a){if(typeof a.ref=="string"&&z.current&&a.__self&&z.current.stateNode!==a.__self){var d=Le(z.current.type);Pe[d]||(U('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',d,a.ref),Pe[d]=!0)}}var fr=function(a,d,v,w,A,Y,M){var G={$$typeof:n,type:a,key:d,ref:v,props:M,_owner:Y};return G._store={},Object.defineProperty(G._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(G,"_self",{configurable:!1,enumerable:!1,writable:!1,value:w}),Object.defineProperty(G,"_source",{configurable:!1,enumerable:!1,writable:!1,value:A}),Object.freeze&&(Object.freeze(G.props),Object.freeze(G)),G};function bn(a,d,v){var w,A={},Y=null,M=null,G=null,pe=null;if(d!=null){it(d)&&(M=d.ref,dt(d)),ot(d)&&(et(d.key),Y=""+d.key),G=d.__self===void 0?null:d.__self,pe=d.__source===void 0?null:d.__source;for(w in d)ut.call(d,w)&&!ft.hasOwnProperty(w)&&(A[w]=d[w])}var Ee=arguments.length-2;if(Ee===1)A.children=v;else if(Ee>1){for(var Oe=Array(Ee),je=0;je<Ee;je++)Oe[je]=arguments[je+2];Object.freeze&&Object.freeze(Oe),A.children=Oe}if(a&&a.defaultProps){var Ae=a.defaultProps;for(w in Ae)A[w]===void 0&&(A[w]=Ae[w])}if(Y||M){var Fe=typeof a=="function"?a.displayName||a.name||"Unknown":a;Y&&Wt(A,Fe),M&&Ht(A,Fe)}return fr(a,Y,M,G,pe,z.current,A)}function xn(a,d){var v=fr(a.type,d,a.ref,a._self,a._source,a._owner,a.props);return v}function Sn(a,d,v){if(a==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+a+".");var w,A=N({},a.props),Y=a.key,M=a.ref,G=a._self,pe=a._source,Ee=a._owner;if(d!=null){it(d)&&(M=d.ref,Ee=z.current),ot(d)&&(et(d.key),Y=""+d.key);var Oe;a.type&&a.type.defaultProps&&(Oe=a.type.defaultProps);for(w in d)ut.call(d,w)&&!ft.hasOwnProperty(w)&&(d[w]===void 0&&Oe!==void 0?A[w]=Oe[w]:A[w]=d[w])}var je=arguments.length-2;if(je===1)A.children=v;else if(je>1){for(var Ae=Array(je),Fe=0;Fe<je;Fe++)Ae[Fe]=arguments[Fe+2];A.children=Ae}return fr(a.type,Y,M,G,pe,Ee,A)}function St(a){return typeof a=="object"&&a!==null&&a.$$typeof===n}var Fr=".",wn=":";function dr(a){var d=/[=:]/g,v={"=":"=0",":":"=2"},w=a.replace(d,function(A){return v[A]});return"$"+w}var pr=!1,wt=/\/+/g;function Kt(a){return a.replace(wt,"$&/")}function Tt(a,d){return typeof a=="object"&&a!==null&&a.key!=null?(et(a.key),dr(""+a.key)):d.toString(36)}function At(a,d,v,w,A){var Y=typeof a;(Y==="undefined"||Y==="boolean")&&(a=null);var M=!1;if(a===null)M=!0;else switch(Y){case"string":case"number":M=!0;break;case"object":switch(a.$$typeof){case n:case s:M=!0}}if(M){var G=a,pe=A(G),Ee=w===""?Fr+Tt(G,0):w;if(Q(pe)){var Oe="";Ee!=null&&(Oe=Kt(Ee)+"/"),At(pe,d,Oe,"",function(qi){return qi})}else pe!=null&&(St(pe)&&(pe.key&&(!G||G.key!==pe.key)&&et(pe.key),pe=xn(pe,v+(pe.key&&(!G||G.key!==pe.key)?Kt(""+pe.key)+"/":"")+Ee)),d.push(pe));return 1}var je,Ae,Fe=0,Je=w===""?Fr:w+wn;if(Q(a))for(var Hr=0;Hr<a.length;Hr++)je=a[Hr],Ae=Je+Tt(je,Hr),Fe+=At(je,d,v,Ae,A);else{var Mn=S(a);if(typeof Mn=="function"){var so=a;Mn===so.entries&&(pr||we("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),pr=!0);for(var Bi=Mn.call(so),oo,zi=0;!(oo=Bi.next()).done;)je=oo.value,Ae=Je+Tt(je,zi++),Fe+=At(je,d,v,Ae,A)}else if(Y==="object"){var ao=String(a);throw new Error("Objects are not valid as a React child (found: "+(ao==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":ao)+"). If you meant to render a collection of children, use an array instead.")}}return Fe}function Yt(a,d,v){if(a==null)return a;var w=[],A=0;return At(a,w,"","",function(Y){return d.call(v,Y,A++)}),w}function Ir(a){var d=0;return Yt(a,function(){d++}),d}function _n(a,d,v){Yt(a,function(){d.apply(this,arguments)},v)}function Mr(a){return Yt(a,function(d){return d})||[]}function Ur(a){if(!St(a))throw new Error("React.Children.only expected to receive a single React element child.");return a}function Rn(a){var d={$$typeof:m,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};d.Provider={$$typeof:u,_context:d};var v=!1,w=!1,A=!1;{var Y={$$typeof:m,_context:d};Object.defineProperties(Y,{Provider:{get:function(){return w||(w=!0,U("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),d.Provider},set:function(M){d.Provider=M}},_currentValue:{get:function(){return d._currentValue},set:function(M){d._currentValue=M}},_currentValue2:{get:function(){return d._currentValue2},set:function(M){d._currentValue2=M}},_threadCount:{get:function(){return d._threadCount},set:function(M){d._threadCount=M}},Consumer:{get:function(){return v||(v=!0,U("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),d.Consumer}},displayName:{get:function(){return d.displayName},set:function(M){A||(we("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",M),A=!0)}}}),d.Consumer=Y}return d._currentRenderer=null,d._currentRenderer2=null,d}var kt=-1,Jt=0,hr=1,En=2;function Cn(a){if(a._status===kt){var d=a._result,v=d();if(v.then(function(Y){if(a._status===Jt||a._status===kt){var M=a;M._status=hr,M._result=Y}},function(Y){if(a._status===Jt||a._status===kt){var M=a;M._status=En,M._result=Y}}),a._status===kt){var w=a;w._status=Jt,w._result=v}}if(a._status===hr){var A=a._result;return A===void 0&&U(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
18
|
-
|
|
19
|
-
Your code should look like:
|
|
20
|
-
const MyComponent = lazy(() => import('./MyComponent'))
|
|
21
|
-
|
|
22
|
-
Did you accidentally put curly braces around the import?`,A),"default"in A||U(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
23
|
-
|
|
24
|
-
Your code should look like:
|
|
25
|
-
const MyComponent = lazy(() => import('./MyComponent'))`,A),A.default}else throw a._result}function Nn(a){var d={_status:kt,_result:a},v={$$typeof:k,_payload:d,_init:Cn};{var w,A;Object.defineProperties(v,{defaultProps:{configurable:!0,get:function(){return w},set:function(Y){U("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),w=Y,Object.defineProperty(v,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return A},set:function(Y){U("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),A=Y,Object.defineProperty(v,"propTypes",{enumerable:!0})}}})}return v}function On(a){a!=null&&a.$$typeof===C?U("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof a!="function"?U("forwardRef requires a render function but was given %s.",a===null?"null":typeof a):a.length!==0&&a.length!==2&&U("forwardRef render functions accept exactly two parameters: props and ref. %s",a.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),a!=null&&(a.defaultProps!=null||a.propTypes!=null)&&U("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var d={$$typeof:h,render:a};{var v;Object.defineProperty(d,"displayName",{enumerable:!1,configurable:!0,get:function(){return v},set:function(w){v=w,!a.name&&!a.displayName&&(a.displayName=w)}})}return d}var p;p=Symbol.for("react.module.reference");function j(a){return!!(typeof a=="string"||typeof a=="function"||a===o||a===l||ie||a===i||a===y||a===x||ue||a===F||J||he||oe||typeof a=="object"&&a!==null&&(a.$$typeof===k||a.$$typeof===C||a.$$typeof===u||a.$$typeof===m||a.$$typeof===h||a.$$typeof===p||a.getModuleId!==void 0))}function D(a,d){j(a)||U("memo: The first argument must be a component. Instead received: %s",a===null?"null":typeof a);var v={$$typeof:C,type:a,compare:d===void 0?null:d};{var w;Object.defineProperty(v,"displayName",{enumerable:!1,configurable:!0,get:function(){return w},set:function(A){w=A,!a.name&&!a.displayName&&(a.displayName=A)}})}return v}function I(){var a=_.current;return a===null&&U(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
26
|
-
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
27
|
-
2. You might be breaking the Rules of Hooks
|
|
28
|
-
3. You might have more than one copy of React in the same app
|
|
29
|
-
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),a}function ye(a){var d=I();if(a._context!==void 0){var v=a._context;v.Consumer===a?U("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):v.Provider===a&&U("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return d.useContext(a)}function xe(a){var d=I();return d.useState(a)}function ce(a,d,v){var w=I();return w.useReducer(a,d,v)}function re(a){var d=I();return d.useRef(a)}function Ye(a,d){var v=I();return v.useEffect(a,d)}function Te(a,d){var v=I();return v.useInsertionEffect(a,d)}function ke(a,d){var v=I();return v.useLayoutEffect(a,d)}function rt(a,d){var v=I();return v.useCallback(a,d)}function _t(a,d){var v=I();return v.useMemo(a,d)}function mt(a,d,v){var w=I();return w.useImperativeHandle(a,d,v)}function Qe(a,d){{var v=I();return v.useDebugValue(a,d)}}function mr(){var a=I();return a.useTransition()}function jn(a){var d=I();return d.useDeferredValue(a)}function Pn(){var a=I();return a.useId()}function wi(a,d,v){var w=I();return w.useSyncExternalStore(a,d,v)}var yr=0,Is,Ms,Us,$s,Bs,zs,qs;function Vs(){}Vs.__reactDisabledLog=!0;function _i(){{if(yr===0){Is=console.log,Ms=console.info,Us=console.warn,$s=console.error,Bs=console.group,zs=console.groupCollapsed,qs=console.groupEnd;var a={configurable:!0,enumerable:!0,value:Vs,writable:!0};Object.defineProperties(console,{info:a,log:a,warn:a,error:a,group:a,groupCollapsed:a,groupEnd:a})}yr++}}function Ri(){{if(yr--,yr===0){var a={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:N({},a,{value:Is}),info:N({},a,{value:Ms}),warn:N({},a,{value:Us}),error:N({},a,{value:$s}),group:N({},a,{value:Bs}),groupCollapsed:N({},a,{value:zs}),groupEnd:N({},a,{value:qs})})}yr<0&&U("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Tn=ve.ReactCurrentDispatcher,An;function $r(a,d,v){{if(An===void 0)try{throw Error()}catch(A){var w=A.stack.trim().match(/\n( *(at )?)/);An=w&&w[1]||""}return`
|
|
30
|
-
`+An+a}}var kn=!1,Br;{var Ei=typeof WeakMap=="function"?WeakMap:Map;Br=new Ei}function Ws(a,d){if(!a||kn)return"";{var v=Br.get(a);if(v!==void 0)return v}var w;kn=!0;var A=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Y;Y=Tn.current,Tn.current=null,_i();try{if(d){var M=function(){throw Error()};if(Object.defineProperty(M.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(M,[])}catch(Je){w=Je}Reflect.construct(a,[],M)}else{try{M.call()}catch(Je){w=Je}a.call(M.prototype)}}else{try{throw Error()}catch(Je){w=Je}a()}}catch(Je){if(Je&&w&&typeof Je.stack=="string"){for(var G=Je.stack.split(`
|
|
31
|
-
`),pe=w.stack.split(`
|
|
32
|
-
`),Ee=G.length-1,Oe=pe.length-1;Ee>=1&&Oe>=0&&G[Ee]!==pe[Oe];)Oe--;for(;Ee>=1&&Oe>=0;Ee--,Oe--)if(G[Ee]!==pe[Oe]){if(Ee!==1||Oe!==1)do if(Ee--,Oe--,Oe<0||G[Ee]!==pe[Oe]){var je=`
|
|
33
|
-
`+G[Ee].replace(" at new "," at ");return a.displayName&&je.includes("<anonymous>")&&(je=je.replace("<anonymous>",a.displayName)),typeof a=="function"&&Br.set(a,je),je}while(Ee>=1&&Oe>=0);break}}}finally{kn=!1,Tn.current=Y,Ri(),Error.prepareStackTrace=A}var Ae=a?a.displayName||a.name:"",Fe=Ae?$r(Ae):"";return typeof a=="function"&&Br.set(a,Fe),Fe}function Ci(a,d,v){return Ws(a,!1)}function Ni(a){var d=a.prototype;return!!(d&&d.isReactComponent)}function zr(a,d,v){if(a==null)return"";if(typeof a=="function")return Ws(a,Ni(a));if(typeof a=="string")return $r(a);switch(a){case y:return $r("Suspense");case x:return $r("SuspenseList")}if(typeof a=="object")switch(a.$$typeof){case h:return Ci(a.render);case C:return zr(a.type,d,v);case k:{var w=a,A=w._payload,Y=w._init;try{return zr(Y(A),d,v)}catch{}}}return""}var Hs={},Ks=ve.ReactDebugCurrentFrame;function qr(a){if(a){var d=a._owner,v=zr(a.type,a._source,d?d.type:null);Ks.setExtraStackFrame(v)}else Ks.setExtraStackFrame(null)}function Oi(a,d,v,w,A){{var Y=Function.call.bind(ut);for(var M in a)if(Y(a,M)){var G=void 0;try{if(typeof a[M]!="function"){var pe=Error((w||"React class")+": "+v+" type `"+M+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[M]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw pe.name="Invariant Violation",pe}G=a[M](d,M,w,v,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ee){G=Ee}G&&!(G instanceof Error)&&(qr(A),U("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",w||"React class",v,M,typeof G),qr(null)),G instanceof Error&&!(G.message in Hs)&&(Hs[G.message]=!0,qr(A),U("Failed %s type: %s",v,G.message),qr(null))}}}function Qt(a){if(a){var d=a._owner,v=zr(a.type,a._source,d?d.type:null);se(v)}else se(null)}var Dn;Dn=!1;function Ys(){if(z.current){var a=Le(z.current.type);if(a)return`
|
|
34
|
-
|
|
35
|
-
Check the render method of \``+a+"`."}return""}function ji(a){if(a!==void 0){var d=a.fileName.replace(/^.*[\\\/]/,""),v=a.lineNumber;return`
|
|
36
|
-
|
|
37
|
-
Check your code at `+d+":"+v+"."}return""}function Pi(a){return a!=null?ji(a.__source):""}var Js={};function Ti(a){var d=Ys();if(!d){var v=typeof a=="string"?a:a.displayName||a.name;v&&(d=`
|
|
38
|
-
|
|
39
|
-
Check the top-level render call using <`+v+">.")}return d}function Qs(a,d){if(!(!a._store||a._store.validated||a.key!=null)){a._store.validated=!0;var v=Ti(d);if(!Js[v]){Js[v]=!0;var w="";a&&a._owner&&a._owner!==z.current&&(w=" It was passed a child from "+Le(a._owner.type)+"."),Qt(a),U('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',v,w),Qt(null)}}}function Gs(a,d){if(typeof a=="object"){if(Q(a))for(var v=0;v<a.length;v++){var w=a[v];St(w)&&Qs(w,d)}else if(St(a))a._store&&(a._store.validated=!0);else if(a){var A=S(a);if(typeof A=="function"&&A!==a.entries)for(var Y=A.call(a),M;!(M=Y.next()).done;)St(M.value)&&Qs(M.value,d)}}}function Xs(a){{var d=a.type;if(d==null||typeof d=="string")return;var v;if(typeof d=="function")v=d.propTypes;else if(typeof d=="object"&&(d.$$typeof===h||d.$$typeof===C))v=d.propTypes;else return;if(v){var w=Le(d);Oi(v,a.props,"prop",w,a)}else if(d.PropTypes!==void 0&&!Dn){Dn=!0;var A=Le(d);U("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",A||"Unknown")}typeof d.getDefaultProps=="function"&&!d.getDefaultProps.isReactClassApproved&&U("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ai(a){{for(var d=Object.keys(a.props),v=0;v<d.length;v++){var w=d[v];if(w!=="children"&&w!=="key"){Qt(a),U("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",w),Qt(null);break}}a.ref!==null&&(Qt(a),U("Invalid attribute `ref` supplied to `React.Fragment`."),Qt(null))}}function Zs(a,d,v){var w=j(a);if(!w){var A="";(a===void 0||typeof a=="object"&&a!==null&&Object.keys(a).length===0)&&(A+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Y=Pi(d);Y?A+=Y:A+=Ys();var M;a===null?M="null":Q(a)?M="array":a!==void 0&&a.$$typeof===n?(M="<"+(Le(a.type)||"Unknown")+" />",A=" Did you accidentally export a JSX literal instead of a component?"):M=typeof a,U("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",M,A)}var G=bn.apply(this,arguments);if(G==null)return G;if(w)for(var pe=2;pe<arguments.length;pe++)Gs(arguments[pe],a);return a===o?Ai(G):Xs(G),G}var eo=!1;function ki(a){var d=Zs.bind(null,a);return d.type=a,eo||(eo=!0,we("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(d,"type",{enumerable:!1,get:function(){return we("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:a}),a}}),d}function Di(a,d,v){for(var w=Sn.apply(this,arguments),A=2;A<arguments.length;A++)Gs(arguments[A],w.type);return Xs(w),w}function Li(a,d){var v=b.transition;b.transition={};var w=b.transition;b.transition._updatedFibers=new Set;try{a()}finally{if(b.transition=v,v===null&&w._updatedFibers){var A=w._updatedFibers.size;A>10&&we("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),w._updatedFibers.clear()}}}var to=!1,Vr=null;function Fi(a){if(Vr===null)try{var d=("require"+Math.random()).slice(0,7),v=e&&e[d];Vr=v.call(e,"timers").setImmediate}catch{Vr=function(A){to===!1&&(to=!0,typeof MessageChannel>"u"&&U("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var Y=new MessageChannel;Y.port1.onmessage=A,Y.port2.postMessage(void 0)}}return Vr(a)}var Gt=0,ro=!1;function no(a){{var d=Gt;Gt++,L.current===null&&(L.current=[]);var v=L.isBatchingLegacy,w;try{if(L.isBatchingLegacy=!0,w=a(),!v&&L.didScheduleLegacyUpdate){var A=L.current;A!==null&&(L.didScheduleLegacyUpdate=!1,In(A))}}catch(Ae){throw Wr(d),Ae}finally{L.isBatchingLegacy=v}if(w!==null&&typeof w=="object"&&typeof w.then=="function"){var Y=w,M=!1,G={then:function(Ae,Fe){M=!0,Y.then(function(Je){Wr(d),Gt===0?Ln(Je,Ae,Fe):Ae(Je)},function(Je){Wr(d),Fe(Je)})}};return!ro&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){M||(ro=!0,U("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),G}else{var pe=w;if(Wr(d),Gt===0){var Ee=L.current;Ee!==null&&(In(Ee),L.current=null);var Oe={then:function(Ae,Fe){L.current===null?(L.current=[],Ln(pe,Ae,Fe)):Ae(pe)}};return Oe}else{var je={then:function(Ae,Fe){Ae(pe)}};return je}}}}function Wr(a){a!==Gt-1&&U("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Gt=a}function Ln(a,d,v){{var w=L.current;if(w!==null)try{In(w),Fi(function(){w.length===0?(L.current=null,d(a)):Ln(a,d,v)})}catch(A){v(A)}else d(a)}}var Fn=!1;function In(a){if(!Fn){Fn=!0;var d=0;try{for(;d<a.length;d++){var v=a[d];do v=v(!0);while(v!==null)}a.length=0}catch(w){throw a=a.slice(d+1),w}finally{Fn=!1}}}var Ii=Zs,Mi=Di,Ui=ki,$i={map:Yt,forEach:_n,count:Ir,toArray:Mr,only:Ur};t.Children=$i,t.Component=$,t.Fragment=o,t.Profiler=l,t.PureComponent=le,t.StrictMode=i,t.Suspense=y,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ve,t.act=no,t.cloneElement=Mi,t.createContext=Rn,t.createElement=Ii,t.createFactory=Ui,t.createRef=Ve,t.forwardRef=On,t.isValidElement=St,t.lazy=Nn,t.memo=D,t.startTransition=Li,t.unstable_act=no,t.useCallback=rt,t.useContext=ye,t.useDebugValue=Qe,t.useDeferredValue=jn,t.useEffect=Ye,t.useId=Pn,t.useImperativeHandle=mt,t.useInsertionEffect=Te,t.useLayoutEffect=ke,t.useMemo=_t,t.useReducer=ce,t.useRef=re,t.useState=xe,t.useSyncExternalStore=wi,t.useTransition=mr,t.version=r,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()})(_r,_r.exports)),_r.exports}var uo;function gs(){return uo||(uo=1,process.env.NODE_ENV==="production"?Kr.exports=Vi():Kr.exports=Wi()),Kr.exports}var E=gs();const Hi=E.lazy(()=>Promise.resolve().then(()=>Ff).then(e=>({default:e.AllSurveys}))),Ki=E.lazy(()=>Promise.resolve().then(()=>Vf).then(e=>({default:e.SurveyDetails}))),Yi=E.lazy(()=>Promise.resolve().then(()=>Mf).then(e=>({default:e.CreateSurvey}))),Ji=E.lazy(()=>Promise.resolve().then(()=>Jf).then(e=>({default:e.SurveyTemplates}))),Qi=E.lazy(()=>Promise.resolve().then(()=>Qf).then(e=>({default:e.Responses}))),Gi=E.lazy(()=>Promise.resolve().then(()=>Xf).then(e=>({default:e.NPSTracker}))),fo=E.lazy(()=>Promise.resolve().then(()=>od).then(e=>({default:e.SurveyAnalytics}))),Xi=[{path:"/all-surveys",element:Hi,isPublic:!1,meta:{title:"All Surveys",module:"survey"}},{path:"/all-surveys/create-survey",element:Yi,isPublic:!1,meta:{title:"Create Survey",module:"survey"}},{path:"/surveys/:surveyId",element:Ki,isPublic:!1,meta:{title:"Survey Details",module:"survey"}},{path:"/survey-templates",element:Ji,isPublic:!1,meta:{title:"Survey Templates",module:"survey"}},{path:"/responses",element:Qi,isPublic:!1,meta:{title:"Responses",module:"survey"}},{path:"/nps-tracker",element:Gi,isPublic:!1,meta:{title:"NPS Tracker",module:"survey"}},{path:"/survey-analytics",element:fo,isPublic:!1,meta:{title:"Survey Analytics",module:"survey"}},{path:"/survey-analytics/:surveyId",element:fo,isPublic:!1,meta:{title:"Survey Analytics",module:"survey"}}],Zi=[{id:"all-surveys",label:"All Surveys",icon:"LayoutDashboard",module:"Survey",category:"All Surveys",section:"survey",path:"/app/all-surveys",order:1},{id:"survey-templates",label:"Survey Templates",icon:"LayoutDashboard",module:"Survey",category:"Survey Templates",section:"survey",path:"/app/survey-templates",order:2},{id:"responses",label:"Responses",icon:"LayoutDashboard",module:"Survey",category:"Responses",section:"survey",path:"/app/responses",order:3},{id:"nps-tracker",label:"NPS Tracker",icon:"LayoutDashboard",module:"Survey",category:"NPS Tracker",section:"survey",path:"/app/nps-tracker",order:4},{id:"survey-analytics",label:"Survey Analytics",icon:"LayoutDashboard",module:"Survey",category:"Survey Analytics",section:"survey",path:"/app/survey-analytics",order:5}];var Yr={exports:{}},gr={};/**
|
|
40
|
-
* @license React
|
|
41
|
-
* react-jsx-runtime.production.min.js
|
|
42
|
-
*
|
|
43
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
44
|
-
*
|
|
45
|
-
* This source code is licensed under the MIT license found in the
|
|
46
|
-
* LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/var po;function el(){if(po)return gr;po=1;var e=gs(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function i(l,u,m){var h,y={},x=null,C=null;m!==void 0&&(x=""+m),u.key!==void 0&&(x=""+u.key),u.ref!==void 0&&(C=u.ref);for(h in u)n.call(u,h)&&!o.hasOwnProperty(h)&&(y[h]=u[h]);if(l&&l.defaultProps)for(h in u=l.defaultProps,u)y[h]===void 0&&(y[h]=u[h]);return{$$typeof:t,type:l,key:x,ref:C,props:y,_owner:s.current}}return gr.Fragment=r,gr.jsx=i,gr.jsxs=i,gr}var vr={};/**
|
|
48
|
-
* @license React
|
|
49
|
-
* react-jsx-runtime.development.js
|
|
50
|
-
*
|
|
51
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
52
|
-
*
|
|
53
|
-
* This source code is licensed under the MIT license found in the
|
|
54
|
-
* LICENSE file in the root directory of this source tree.
|
|
55
|
-
*/var ho;function tl(){return ho||(ho=1,process.env.NODE_ENV!=="production"&&(function(){var e=gs(),t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),C=Symbol.for("react.offscreen"),k=Symbol.iterator,F="@@iterator";function T(p){if(p===null||typeof p!="object")return null;var j=k&&p[k]||p[F];return typeof j=="function"?j:null}var B=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(p){{for(var j=arguments.length,D=new Array(j>1?j-1:0),I=1;I<j;I++)D[I-1]=arguments[I];_("error",p,D)}}function _(p,j,D){{var I=B.ReactDebugCurrentFrame,ye=I.getStackAddendum();ye!==""&&(j+="%s",D=D.concat([ye]));var xe=D.map(function(ce){return String(ce)});xe.unshift("Warning: "+j),Function.prototype.apply.call(console[p],console,xe)}}var b=!1,L=!1,z=!1,V=!1,K=!1,se;se=Symbol.for("react.module.reference");function J(p){return!!(typeof p=="string"||typeof p=="function"||p===n||p===o||K||p===s||p===m||p===h||V||p===C||b||L||z||typeof p=="object"&&p!==null&&(p.$$typeof===x||p.$$typeof===y||p.$$typeof===i||p.$$typeof===l||p.$$typeof===u||p.$$typeof===se||p.getModuleId!==void 0))}function he(p,j,D){var I=p.displayName;if(I)return I;var ye=j.displayName||j.name||"";return ye!==""?D+"("+ye+")":D}function oe(p){return p.displayName||"Context"}function ue(p){if(p==null)return null;if(typeof p.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof p=="function")return p.displayName||p.name||null;if(typeof p=="string")return p;switch(p){case n:return"Fragment";case r:return"Portal";case o:return"Profiler";case s:return"StrictMode";case m:return"Suspense";case h:return"SuspenseList"}if(typeof p=="object")switch(p.$$typeof){case l:var j=p;return oe(j)+".Consumer";case i:var D=p;return oe(D._context)+".Provider";case u:return he(p,p.render,"ForwardRef");case y:var I=p.displayName||null;return I!==null?I:ue(p.type)||"Memo";case x:{var ye=p,xe=ye._payload,ce=ye._init;try{return ue(ce(xe))}catch{return null}}}return null}var ie=Object.assign,ve=0,we,U,ze,qe,te,g,N;function W(){}W.__reactDisabledLog=!0;function $(){{if(ve===0){we=console.log,U=console.info,ze=console.warn,qe=console.error,te=console.group,g=console.groupCollapsed,N=console.groupEnd;var p={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:p,log:p,warn:p,error:p,group:p,groupCollapsed:p,groupEnd:p})}ve++}}function q(){{if(ve--,ve===0){var p={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ie({},p,{value:we}),info:ie({},p,{value:U}),warn:ie({},p,{value:ze}),error:ie({},p,{value:qe}),group:ie({},p,{value:te}),groupCollapsed:ie({},p,{value:g}),groupEnd:ie({},p,{value:N})})}ve<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Z=B.ReactCurrentDispatcher,ae;function fe(p,j,D){{if(ae===void 0)try{throw Error()}catch(ye){var I=ye.stack.trim().match(/\n( *(at )?)/);ae=I&&I[1]||""}return`
|
|
56
|
-
`+ae+p}}var le=!1,H;{var Ve=typeof WeakMap=="function"?WeakMap:Map;H=new Ve}function O(p,j){if(!p||le)return"";{var D=H.get(p);if(D!==void 0)return D}var I;le=!0;var ye=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var xe;xe=Z.current,Z.current=null,$();try{if(j){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(Qe){I=Qe}Reflect.construct(p,[],ce)}else{try{ce.call()}catch(Qe){I=Qe}p.call(ce.prototype)}}else{try{throw Error()}catch(Qe){I=Qe}p()}}catch(Qe){if(Qe&&I&&typeof Qe.stack=="string"){for(var re=Qe.stack.split(`
|
|
57
|
-
`),Ye=I.stack.split(`
|
|
58
|
-
`),Te=re.length-1,ke=Ye.length-1;Te>=1&&ke>=0&&re[Te]!==Ye[ke];)ke--;for(;Te>=1&&ke>=0;Te--,ke--)if(re[Te]!==Ye[ke]){if(Te!==1||ke!==1)do if(Te--,ke--,ke<0||re[Te]!==Ye[ke]){var rt=`
|
|
59
|
-
`+re[Te].replace(" at new "," at ");return p.displayName&&rt.includes("<anonymous>")&&(rt=rt.replace("<anonymous>",p.displayName)),typeof p=="function"&&H.set(p,rt),rt}while(Te>=1&&ke>=0);break}}}finally{le=!1,Z.current=xe,q(),Error.prepareStackTrace=ye}var _t=p?p.displayName||p.name:"",mt=_t?fe(_t):"";return typeof p=="function"&&H.set(p,mt),mt}function Q(p,j,D){return O(p,!1)}function me(p){var j=p.prototype;return!!(j&&j.isReactComponent)}function _e(p,j,D){if(p==null)return"";if(typeof p=="function")return O(p,me(p));if(typeof p=="string")return fe(p);switch(p){case m:return fe("Suspense");case h:return fe("SuspenseList")}if(typeof p=="object")switch(p.$$typeof){case u:return Q(p.render);case y:return _e(p.type,j,D);case x:{var I=p,ye=I._payload,xe=I._init;try{return _e(xe(ye),j,D)}catch{}}}return""}var We=Object.prototype.hasOwnProperty,et={},He=B.ReactDebugCurrentFrame;function De(p){if(p){var j=p._owner,D=_e(p.type,p._source,j?j.type:null);He.setExtraStackFrame(D)}else He.setExtraStackFrame(null)}function Le(p,j,D,I,ye){{var xe=Function.call.bind(We);for(var ce in p)if(xe(p,ce)){var re=void 0;try{if(typeof p[ce]!="function"){var Ye=Error((I||"React class")+": "+D+" type `"+ce+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof p[ce]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ye.name="Invariant Violation",Ye}re=p[ce](j,ce,I,D,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Te){re=Te}re&&!(re instanceof Error)&&(De(ye),S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",I||"React class",D,ce,typeof re),De(null)),re instanceof Error&&!(re.message in et)&&(et[re.message]=!0,De(ye),S("Failed %s type: %s",D,re.message),De(null))}}}var ut=Array.isArray;function ft(p){return ut(p)}function tt(p){{var j=typeof Symbol=="function"&&Symbol.toStringTag,D=j&&p[Symbol.toStringTag]||p.constructor.name||"Object";return D}}function X(p){try{return Pe(p),!1}catch{return!0}}function Pe(p){return""+p}function it(p){if(X(p))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",tt(p)),Pe(p)}var ot=B.ReactCurrentOwner,Wt={key:!0,ref:!0,__self:!0,__source:!0},Ht,dt;function fr(p){if(We.call(p,"ref")){var j=Object.getOwnPropertyDescriptor(p,"ref").get;if(j&&j.isReactWarning)return!1}return p.ref!==void 0}function bn(p){if(We.call(p,"key")){var j=Object.getOwnPropertyDescriptor(p,"key").get;if(j&&j.isReactWarning)return!1}return p.key!==void 0}function xn(p,j){typeof p.ref=="string"&&ot.current}function Sn(p,j){{var D=function(){Ht||(Ht=!0,S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",j))};D.isReactWarning=!0,Object.defineProperty(p,"key",{get:D,configurable:!0})}}function St(p,j){{var D=function(){dt||(dt=!0,S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",j))};D.isReactWarning=!0,Object.defineProperty(p,"ref",{get:D,configurable:!0})}}var Fr=function(p,j,D,I,ye,xe,ce){var re={$$typeof:t,type:p,key:j,ref:D,props:ce,_owner:xe};return re._store={},Object.defineProperty(re._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(re,"_self",{configurable:!1,enumerable:!1,writable:!1,value:I}),Object.defineProperty(re,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ye}),Object.freeze&&(Object.freeze(re.props),Object.freeze(re)),re};function wn(p,j,D,I,ye){{var xe,ce={},re=null,Ye=null;D!==void 0&&(it(D),re=""+D),bn(j)&&(it(j.key),re=""+j.key),fr(j)&&(Ye=j.ref,xn(j,ye));for(xe in j)We.call(j,xe)&&!Wt.hasOwnProperty(xe)&&(ce[xe]=j[xe]);if(p&&p.defaultProps){var Te=p.defaultProps;for(xe in Te)ce[xe]===void 0&&(ce[xe]=Te[xe])}if(re||Ye){var ke=typeof p=="function"?p.displayName||p.name||"Unknown":p;re&&Sn(ce,ke),Ye&&St(ce,ke)}return Fr(p,re,Ye,ye,I,ot.current,ce)}}var dr=B.ReactCurrentOwner,pr=B.ReactDebugCurrentFrame;function wt(p){if(p){var j=p._owner,D=_e(p.type,p._source,j?j.type:null);pr.setExtraStackFrame(D)}else pr.setExtraStackFrame(null)}var Kt;Kt=!1;function Tt(p){return typeof p=="object"&&p!==null&&p.$$typeof===t}function At(){{if(dr.current){var p=ue(dr.current.type);if(p)return`
|
|
60
|
-
|
|
61
|
-
Check the render method of \``+p+"`."}return""}}function Yt(p){return""}var Ir={};function _n(p){{var j=At();if(!j){var D=typeof p=="string"?p:p.displayName||p.name;D&&(j=`
|
|
62
|
-
|
|
63
|
-
Check the top-level render call using <`+D+">.")}return j}}function Mr(p,j){{if(!p._store||p._store.validated||p.key!=null)return;p._store.validated=!0;var D=_n(j);if(Ir[D])return;Ir[D]=!0;var I="";p&&p._owner&&p._owner!==dr.current&&(I=" It was passed a child from "+ue(p._owner.type)+"."),wt(p),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',D,I),wt(null)}}function Ur(p,j){{if(typeof p!="object")return;if(ft(p))for(var D=0;D<p.length;D++){var I=p[D];Tt(I)&&Mr(I,j)}else if(Tt(p))p._store&&(p._store.validated=!0);else if(p){var ye=T(p);if(typeof ye=="function"&&ye!==p.entries)for(var xe=ye.call(p),ce;!(ce=xe.next()).done;)Tt(ce.value)&&Mr(ce.value,j)}}}function Rn(p){{var j=p.type;if(j==null||typeof j=="string")return;var D;if(typeof j=="function")D=j.propTypes;else if(typeof j=="object"&&(j.$$typeof===u||j.$$typeof===y))D=j.propTypes;else return;if(D){var I=ue(j);Le(D,p.props,"prop",I,p)}else if(j.PropTypes!==void 0&&!Kt){Kt=!0;var ye=ue(j);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ye||"Unknown")}typeof j.getDefaultProps=="function"&&!j.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function kt(p){{for(var j=Object.keys(p.props),D=0;D<j.length;D++){var I=j[D];if(I!=="children"&&I!=="key"){wt(p),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",I),wt(null);break}}p.ref!==null&&(wt(p),S("Invalid attribute `ref` supplied to `React.Fragment`."),wt(null))}}var Jt={};function hr(p,j,D,I,ye,xe){{var ce=J(p);if(!ce){var re="";(p===void 0||typeof p=="object"&&p!==null&&Object.keys(p).length===0)&&(re+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ye=Yt();Ye?re+=Ye:re+=At();var Te;p===null?Te="null":ft(p)?Te="array":p!==void 0&&p.$$typeof===t?(Te="<"+(ue(p.type)||"Unknown")+" />",re=" Did you accidentally export a JSX literal instead of a component?"):Te=typeof p,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Te,re)}var ke=wn(p,j,D,ye,xe);if(ke==null)return ke;if(ce){var rt=j.children;if(rt!==void 0)if(I)if(ft(rt)){for(var _t=0;_t<rt.length;_t++)Ur(rt[_t],p);Object.freeze&&Object.freeze(rt)}else S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ur(rt,p)}if(We.call(j,"key")){var mt=ue(p),Qe=Object.keys(j).filter(function(Pn){return Pn!=="key"}),mr=Qe.length>0?"{key: someKey, "+Qe.join(": ..., ")+": ...}":"{key: someKey}";if(!Jt[mt+mr]){var jn=Qe.length>0?"{"+Qe.join(": ..., ")+": ...}":"{}";S(`A props object containing a "key" prop is being spread into JSX:
|
|
64
|
-
let props = %s;
|
|
65
|
-
<%s {...props} />
|
|
66
|
-
React keys must be passed directly to JSX without using spread:
|
|
67
|
-
let props = %s;
|
|
68
|
-
<%s key={someKey} {...props} />`,mr,mt,jn,mt),Jt[mt+mr]=!0}}return p===n?kt(ke):Rn(ke),ke}}function En(p,j,D){return hr(p,j,D,!0)}function Cn(p,j,D){return hr(p,j,D,!1)}var Nn=Cn,On=En;vr.Fragment=n,vr.jsx=Nn,vr.jsxs=On})()),vr}var mo;function rl(){return mo||(mo=1,process.env.NODE_ENV==="production"?Yr.exports=el():Yr.exports=tl()),Yr.exports}var c=rl();function Re({icon:e,name:t,size:r=20,...n}){const s=e??t??"Circle",o={Check:"M5 12l4 4L19 6",X:"M18 6L6 18M6 6l12 12",Search:"M21 21l-4.3-4.3M10.5 18a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15Z",Plus:"M12 5v14M5 12h14",Trash2:"M3 6h18M8 6V4h8v2m-9 0 1 14h8l1-14M10 11v5m4-5v5",Edit:"M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L8 18l-4 1 1-4Z",Circle:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0-18 0"},i=o[s]??o.Circle;return c.jsx("svg",{width:r,height:r,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n,children:c.jsx("path",{d:i})})}function Ie({icon:e,label:t,value:r,trendDirection:n="neutral",color:s="#7c3aed"}){return c.jsxs("div",{className:"rounded-xl border border-[var(--th-border)] bg-[var(--th-surface)] p-5",children:[c.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[c.jsx("span",{className:"text-sm text-[var(--th-text-3)]",children:t}),e&&c.jsx(Re,{icon:e,size:20,style:{color:s}})]}),c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-2xl font-semibold text-[var(--th-text)]",children:r}),n!=="neutral"&&c.jsx("span",{className:"text-xs text-[var(--th-text-3)]",children:"Up"})]})]})}/**
|
|
69
|
-
* @remix-run/router v1.23.4
|
|
70
|
-
*
|
|
71
|
-
* Copyright (c) Remix Software Inc.
|
|
72
|
-
*
|
|
73
|
-
* This source code is licensed under the MIT license found in the
|
|
74
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
75
|
-
*
|
|
76
|
-
* @license MIT
|
|
77
|
-
*/function Gn(){return Gn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Gn.apply(null,arguments)}var yo;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(yo||(yo={}));function at(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function oa(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function aa(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}var go;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(go||(go={}));function nl(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:s=""}=typeof e=="string"?aa(e):e,o;return r?(r=ia(r),r.startsWith("/")?o=vo(r.substring(1),"/"):o=vo(r,t)):o=t,{pathname:o,search:ll(n),hash:cl(s)}}function vo(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?r.length>1&&r.pop():s!=="."&&r.push(s)}),r.length>1?r.join("/"):"/"}function $n(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function sl(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function ol(e,t){let r=sl(e);return t?r.map((n,s)=>s===r.length-1?n.pathname:n.pathnameBase):r.map(n=>n.pathnameBase)}function al(e,t,r,n){n===void 0&&(n=!1);let s;typeof e=="string"?s=aa(e):(s=Gn({},e),at(!s.pathname||!s.pathname.includes("?"),$n("?","pathname","search",s)),at(!s.pathname||!s.pathname.includes("#"),$n("#","pathname","hash",s)),at(!s.search||!s.search.includes("#"),$n("#","search","hash",s)));let o=e===""||s.pathname==="",i=o?"/":s.pathname,l;if(i==null)l=r;else{let y=t.length-1;if(!n&&i.startsWith("..")){let x=i.split("/");for(;x[0]==="..";)x.shift(),y-=1;s.pathname=x.join("/")}l=y>=0?t[y]:"/"}let u=nl(s,l),m=i&&i!=="/"&&i.endsWith("/"),h=(o||i===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(m||h)&&(u.pathname+="/"),u}const ia=e=>e.replace(/\/\/+/g,"/"),il=e=>ia(e.join("/")),ll=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,cl=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,la=["post","put","patch","delete"];new Set(la);const ul=["get",...la];new Set(ul);/**
|
|
78
|
-
* React Router v6.30.6
|
|
79
|
-
*
|
|
80
|
-
* Copyright (c) Remix Software Inc.
|
|
81
|
-
*
|
|
82
|
-
* This source code is licensed under the MIT license found in the
|
|
83
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
84
|
-
*
|
|
85
|
-
* @license MIT
|
|
86
|
-
*/function Xn(){return Xn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xn.apply(null,arguments)}const vs=E.createContext(null);process.env.NODE_ENV!=="production"&&(vs.displayName="DataRouter");const fl=E.createContext(null);process.env.NODE_ENV!=="production"&&(fl.displayName="DataRouterState");const dl=E.createContext(null);process.env.NODE_ENV!=="production"&&(dl.displayName="Await");const bs=E.createContext(null);process.env.NODE_ENV!=="production"&&(bs.displayName="Navigation");const xs=E.createContext(null);process.env.NODE_ENV!=="production"&&(xs.displayName="Location");const Pr=E.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(Pr.displayName="Route");const pl=E.createContext(null);process.env.NODE_ENV!=="production"&&(pl.displayName="RouteError");function ca(){return E.useContext(xs)!=null}function hl(){return ca()||(process.env.NODE_ENV!=="production"?at(!1,"useLocation() may be used only in the context of a <Router> component."):at(!1)),E.useContext(xs).location}const ua="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function fa(e){E.useContext(bs).static||E.useLayoutEffect(e)}function lr(){let{isDataRoute:e}=E.useContext(Pr);return e?bl():ml()}function ml(){ca()||(process.env.NODE_ENV!=="production"?at(!1,"useNavigate() may be used only in the context of a <Router> component."):at(!1));let e=E.useContext(vs),{basename:t,future:r,navigator:n}=E.useContext(bs),{matches:s}=E.useContext(Pr),{pathname:o}=hl(),i=JSON.stringify(ol(s,r.v7_relativeSplatPath)),l=E.useRef(!1);return fa(()=>{l.current=!0}),E.useCallback(function(m,h){if(h===void 0&&(h={}),process.env.NODE_ENV!=="production"&&oa(l.current,ua),!l.current)return;if(typeof m=="number"){n.go(m);return}let y=al(m,JSON.parse(i),o,h.relative==="path");e==null&&t!=="/"&&(y.pathname=y.pathname==="/"?t:il([t,y.pathname])),(h.replace?n.replace:n.push)(y,h.state,h)},[t,n,i,o,e])}function da(){let{matches:e}=E.useContext(Pr),t=e[e.length-1];return t?t.params:{}}var pa=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(pa||{}),ha=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(ha||{});function ma(e){return e+" must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router."}function yl(e){let t=E.useContext(vs);return t||(process.env.NODE_ENV!=="production"?at(!1,ma(e)):at(!1)),t}function gl(e){let t=E.useContext(Pr);return t||(process.env.NODE_ENV!=="production"?at(!1,ma(e)):at(!1)),t}function vl(e){let t=gl(e),r=t.matches[t.matches.length-1];return r.route.id||(process.env.NODE_ENV!=="production"?at(!1,e+' can only be used on routes that contain a unique "id"'):at(!1)),r.route.id}function bl(){let{router:e}=yl(pa.UseNavigateStable),t=vl(ha.UseNavigateStable),r=E.useRef(!1);return fa(()=>{r.current=!0}),E.useCallback(function(s,o){o===void 0&&(o={}),process.env.NODE_ENV!=="production"&&oa(r.current,ua),r.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Xn({fromRouteId:t},o)))},[e,t])}new Promise(()=>{});const Tr=e=>e,Ss=e=>e,un=e=>e,jt=e=>e!=null?String(e):"",Cr=e=>{const t=Number(e);return Number.isFinite(t)?t:0},on={active:{dot:"bg-[#4edea3] animate-pulse",badge:"bg-[color:color-mix(in_srgb,var(--th-success)_10%,transparent)] text-[color:var(--th-success)]"},draft:{dot:"bg-[#ffcc6b]",badge:"bg-[color:color-mix(in_srgb,var(--th-warning-soft)_10%,transparent)] text-[color:var(--th-warning-soft)]"},paused:{dot:"bg-[#adc6ff]",badge:"bg-[color:color-mix(in_srgb,var(--th-info-soft)_10%,transparent)] text-[color:var(--th-info-soft)]"},closed:{dot:"bg-[#958da1]",badge:"bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] text-[color:var(--th-text-3)]"}},ya=E.memo(({row:e})=>{const t=jt(Tr(e).status),r=on[t]??on.draft;return c.jsx("div",{className:"flex items-center justify-center",children:c.jsx("span",{className:`w-2.5 h-2.5 rounded-full ${r.dot}`})})});ya.displayName="SurveyStatusCell";const ga=E.memo(({row:e})=>{const t=Tr(e),r=jt(t.status),n=on[r]??on.draft,s=jt(t.name),o=jt(t.description),i=t.npsScore;return c.jsxs("div",{className:"flex flex-col gap-0.5 min-w-0",children:[c.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[c.jsx(Re,{icon:"ClipboardList",size:14,className:"text-[#7c3aed] shrink-0"}),c.jsx("span",{className:"text-[13px] font-medium text-white truncate max-w-[280px]",children:s}),c.jsx("span",{className:`text-[9px] px-1.5 py-0.5 rounded font-medium capitalize shrink-0 ${n.badge}`,children:r}),i!=null&&c.jsxs("span",{className:`text-[9px] px-1.5 py-0.5 rounded shrink-0 ${i>=70?"bg-[color:color-mix(in_srgb,var(--th-success)_10%,transparent)] text-[color:var(--th-success)]":i>=50?"bg-[color:color-mix(in_srgb,var(--th-warning-soft)_10%,transparent)] text-[color:var(--th-warning-soft)]":"bg-[color:color-mix(in_srgb,var(--th-danger-soft)_10%,transparent)] text-[color:var(--th-danger-soft)]"}`,children:["NPS ",i]})]}),o&&c.jsx("span",{className:"text-[11px] text-[color:var(--th-text-3)] truncate max-w-[320px] pl-5",children:o})]})});ga.displayName="SurveyNameCell";const va=E.memo(({row:e})=>{const t=Tr(e),r=Cr(t.responses),n=Cr(t.target),s=n>0?Math.min(r/n*100,100):0;return c.jsxs("div",{className:"flex flex-col items-center gap-1 min-w-[100px]",children:[c.jsxs("span",{className:"text-[12px] font-mono text-[color:var(--th-text-1)] tabular-nums",children:[r.toLocaleString(),c.jsxs("span",{className:"text-[color:var(--th-text-3)]",children:["/",n.toLocaleString()]})]}),c.jsx("div",{className:"w-full h-1.5 rounded-full bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] overflow-hidden",children:c.jsx("div",{className:`h-full rounded-full ${s>=80?"bg-[#4edea3]":"bg-[#7c3aed]"}`,style:{width:`${s}%`}})})]})});va.displayName="ResponseProgressCell";const ba=E.memo(({row:e})=>{const t=Tr(e).npsScore;if(t==null)return c.jsx("span",{className:"text-[12px] text-[color:var(--th-text-3)]",children:"—"});const r=Cr(t),n=r>=70?"bg-[color:color-mix(in_srgb,var(--th-success)_10%,transparent)] text-[color:var(--th-success)]":r>=50?"bg-[color:color-mix(in_srgb,var(--th-warning-soft)_10%,transparent)] text-[color:var(--th-warning-soft)]":"bg-[color:color-mix(in_srgb,var(--th-danger-soft)_10%,transparent)] text-[color:var(--th-danger-soft)]";return c.jsx("span",{className:`text-[12px] font-bold font-mono px-2 py-0.5 rounded ${n}`,children:r})});ba.displayName="NpsScoreCell";const xa=E.memo(({row:e,extra:t})=>{const r=t,n=Tr(e);return c.jsxs("div",{className:"flex items-center justify-end gap-1",children:[c.jsx("button",{onClick:s=>{var o;s.stopPropagation(),(o=r==null?void 0:r.onView)==null||o.call(r,n)},className:"p-1.5 rounded-lg hover:bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] text-[color:var(--th-text-3)] hover:text-[color:var(--th-text-2)] transition-colors",children:c.jsx(Re,{icon:"BarChart3",size:13})}),c.jsx("button",{onClick:s=>{var o;s.stopPropagation(),(o=r==null?void 0:r.onEdit)==null||o.call(r,n)},className:"p-1.5 rounded-lg hover:bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] text-[color:var(--th-text-3)] hover:text-[color:var(--th-text-2)] transition-colors",children:c.jsx(Re,{icon:"Edit3",size:13})}),c.jsx("button",{onClick:s=>{var o;s.stopPropagation(),(o=r==null?void 0:r.onDelete)==null||o.call(r,n)},className:"p-1.5 rounded-lg hover:bg-[color:color-mix(in_srgb,var(--th-danger-soft)_10%,transparent)] text-[color:var(--th-text-3)] hover:text-[color:var(--th-danger-soft)] transition-colors",children:c.jsx(Re,{icon:"Trash2",size:13})})]})});xa.displayName="SurveyActionsCell";const xl={promoter:"bg-[color:color-mix(in_srgb,var(--th-success)_10%,transparent)] text-[color:var(--th-success)]",passive:"bg-[color:color-mix(in_srgb,var(--th-warning-soft)_10%,transparent)] text-[color:var(--th-warning-soft)]",detractor:"bg-[color:color-mix(in_srgb,var(--th-danger-soft)_10%,transparent)] text-[color:var(--th-danger-soft)]"},Sa=E.memo(({row:e})=>{const t=un(e);return c.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[c.jsx("div",{className:"w-8 h-8 rounded-full bg-[#7c3aed]/20 flex items-center justify-center shrink-0",children:c.jsx(Re,{icon:"User",size:14,className:"text-[color:var(--th-accent-soft)]"})}),c.jsx("span",{className:"text-[12px] font-mono text-[color:var(--th-text-2)] truncate",children:jt(t.userId)})]})});Sa.displayName="ResponseUserCell";const wa=E.memo(({row:e})=>{const t=jt(un(e).npsCategory);return t?c.jsx("span",{className:`text-[10px] px-2 py-0.5 rounded font-medium capitalize ${xl[t]??"bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] text-[color:var(--th-text-3)]"}`,children:t}):c.jsx("span",{className:"text-[12px] text-[color:var(--th-text-3)]",children:"—"})});wa.displayName="ResponseNpsCategoryCell";const _a=E.memo(({row:e})=>{const t=un(e).rating;return t==null?c.jsx("span",{className:"text-[12px] text-[color:var(--th-text-3)]",children:"—"}):c.jsx("div",{className:"flex items-center gap-0.5",children:Array.from({length:5},(r,n)=>c.jsx(Re,{icon:"Star",size:11,className:n<t?"text-[color:var(--th-warning-soft)] fill-[color:var(--th-warning-soft)]":"text-[color:color-mix(in_srgb,var(--th-text-3)_20%,transparent)]"},n))})});_a.displayName="ResponseRatingCell";const Ra=E.memo(({row:e})=>{const t=jt(un(e).responseText);return t?c.jsx("span",{className:"block max-w-[360px] truncate text-[12px] text-[color:var(--th-text-1)]",title:t,children:t}):c.jsx("span",{className:"text-[12px] text-[color:var(--th-text-3)]",children:"—"})});Ra.displayName="ResponseTextCell";const Ea=E.memo(({row:e})=>c.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[c.jsx("div",{className:"w-8 h-8 rounded-lg bg-[#7c3aed]/15 flex items-center justify-center shrink-0",children:c.jsx(Re,{icon:"BarChart3",size:14,className:"text-[color:var(--th-accent-soft)]"})}),c.jsx("span",{className:"text-[13px] font-medium text-white truncate max-w-[260px]",children:jt(Ss(e).surveyName)})]}));Ea.displayName="AnalyticsSurveyCell";const Ca=E.memo(({row:e})=>{const t=Math.min(100,Math.max(0,Cr(Ss(e).completionRate)));return c.jsxs("div",{className:"w-28",children:[c.jsxs("div",{className:"mb-1 text-[12px] font-mono tabular-nums text-[color:var(--th-text-1)]",children:[t,"%"]}),c.jsx("div",{className:"h-1.5 rounded-full bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] overflow-hidden",children:c.jsx("div",{className:`h-full rounded-full ${t>=80?"bg-[#4edea3]":t>=60?"bg-[#ffcc6b]":"bg-[#ffb4ab]"}`,style:{width:`${t}%`}})})]})});Ca.displayName="AnalyticsCompletionCell";const Na=E.memo(({row:e})=>{const t=Cr(Ss(e).averageRating);return c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx(Re,{icon:"Star",size:12,className:"text-[color:var(--th-warning-soft)] fill-[color:var(--th-warning-soft)]"}),c.jsx("span",{className:"text-[12px] font-mono tabular-nums text-[color:var(--th-text-1)]",children:t.toFixed(1)})]})});Na.displayName="AnalyticsRatingCell";function Oa(){return[{type:"surveyStatus",module:"Surveys",component:ya},{type:"surveyName",module:"Surveys",component:ga},{type:"responseProgress",module:"Surveys",component:va},{type:"npsScore",module:"Surveys",component:ba},{type:"surveyActions",module:"Surveys",component:xa},{type:"responseUser",module:"Surveys",component:Sa},{type:"responseNpsCategory",module:"Surveys",component:wa},{type:"responseRating",module:"Surveys",component:_a},{type:"responseText",module:"Surveys",component:Ra},{type:"analyticsSurvey",module:"Surveys",component:Ea},{type:"analyticsCompletion",module:"Surveys",component:Ca},{type:"analyticsRating",module:"Surveys",component:Na}]}const Sl=Object.fromEntries(Oa().map(({type:e,component:t})=>[e,t]));function fn(e){const{columns:t,data:r,totalCount:n,isLoading:s,hasMore:o,onLoadMore:i,tabs:l,activeTab:u,onTabChange:m,controls:h,searchConfig:y,filters:x,selectable:C,selectedIds:k=new Set,onSelectionChange:F,rowClickBehavior:T,onRowClick:B,currentPage:S,onEditRow:_,onActionClick:b,sortBy:L,sortOrder:z="asc",onSort:V,className:K="",height:se,stickyHeader:J,emptyMessage:he="No records found.",availableViews:oe=["table"],renderCard:ue,gridCols:ie=3}=e,ve=lr(),[we,U]=E.useState(""),[ze,qe]=E.useState({}),[te,g]=E.useState(oe[0]??"table"),[N,W]=E.useState(null),$=t.filter(O=>!O.hidden),q=N??(L?{key:L,order:z}:null),Z=E.useMemo(()=>{let O=[...r];const Q=we.trim().toLowerCase();Q&&y&&(O=O.filter(me=>y.keys.some(_e=>String(me[_e]??"").toLowerCase().includes(Q))));for(const me of x??[]){const _e=ze[me.id]??me.defaultValue??"";_e&&(O=O.filter(We=>me.predicate(We,_e)))}if(q&&!V){const me=t.find(_e=>String(_e.key)===q.key);me!=null&&me.sortFn?O.sort((_e,We)=>me.sortFn(_e,We,q.order)):O.sort((_e,We)=>{const et=_e[q.key],He=We[q.key],De=String(et??"").localeCompare(String(He??""),void 0,{numeric:!0,sensitivity:"base"});return q.order==="asc"?De:-De})}return O},[r,we,y,x,ze,q,V,t]),ae=O=>{const Q=new Set(k);Q.has(O)?Q.delete(O):Q.add(O),F==null||F(Q)},fe=O=>{F==null||F(O?new Set(Z.map(Q=>Q.id)):new Set)},le=O=>{if(B==null||B(O),!!T&&(T.type==="callback"&&T.handler(O),T.type==="navigate")){const Q=typeof T.path=="function"?T.path(O):T.path;ve(Q)}},H={selectedIds:k,onToggle:ae,onSelectAll:fe,allChecked:Z.length>0&&Z.every(O=>k.has(O.id)),onActionClick:b,onEditRow:_,navigate:O=>ve(O),currentPage:S},Ve={gridTemplateColumns:`repeat(${typeof ie=="number"?ie:ie.lg??ie.md??ie.sm??3}, minmax(0, 1fr))`};return c.jsxs("section",{className:`w-full overflow-hidden rounded-xl border border-[var(--th-border)] bg-[var(--th-surface)] ${K}`,children:[c.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-[var(--th-border)] p-3",children:[c.jsx("div",{className:"flex flex-wrap gap-2",children:l==null?void 0:l.map(O=>{const Q=typeof O=="string"?O:O.key,me=typeof O=="string"?O:O.label,_e=typeof O=="string"?void 0:O.count;return c.jsxs("button",{type:"button",onClick:()=>m==null?void 0:m(Q),className:`rounded-lg px-3 py-2 text-sm ${u===Q?"bg-violet-600 text-white":"text-[var(--th-text-2)] hover:bg-black/5"}`,children:[me,_e!==void 0?` (${_e})`:""]},Q)})}),c.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[(y||e.showSearch)&&c.jsx("input",{value:we,onChange:O=>{var Q;U(O.target.value),(Q=e.onFilterChange)==null||Q.call(e,O.target.value)},placeholder:(y==null?void 0:y.placeholder)??"Search...",className:"rounded-lg border border-[var(--th-border)] bg-transparent px-3 py-2 text-sm"}),(x??[]).map(O=>c.jsxs("select",{value:ze[O.id]??O.defaultValue??"",onChange:Q=>qe(me=>({...me,[O.id]:Q.target.value})),className:"rounded-lg border border-[var(--th-border)] bg-[var(--th-surface)] px-3 py-2 text-sm",children:[c.jsx("option",{value:"",children:O.label}),O.options.map(Q=>c.jsx("option",{value:Q.value,children:Q.label},Q.value))]},O.id)),oe.length>1&&oe.map(O=>c.jsx("button",{type:"button",onClick:()=>g(O),className:`rounded-lg px-3 py-2 text-sm capitalize ${te===O?"bg-violet-600 text-white":"border border-[var(--th-border)]"}`,children:O},O)),h==null?void 0:h.map(O=>c.jsx("button",{type:"button",disabled:O.disabled,onClick:O.onClick,className:"rounded-lg bg-violet-600 px-3 py-2 text-sm text-white disabled:opacity-50",children:O.label},O.action))]})]}),s&&r.length===0?c.jsx("div",{className:"p-10 text-center text-sm text-[var(--th-text-3)]",children:"Loading..."}):Z.length===0?c.jsx("div",{className:"p-10 text-center text-sm text-[var(--th-text-3)]",children:he}):te==="grid"&&ue?c.jsx("div",{className:"grid gap-4 p-4",style:Ve,children:Z.map((O,Q)=>c.jsx(ue,{row:O,rowIndex:Q,index:Q,isSelected:k.has(O.id),onSelect:ae,onRowClick:le,onEditRow:_,onActionClick:b},O.id))}):c.jsx("div",{className:"overflow-auto",style:{height:se},children:c.jsxs("table",{className:"w-full border-collapse text-left text-sm",children:[c.jsx("thead",{className:J?"sticky top-0 z-10 bg-[var(--th-surface)]":"bg-[var(--th-surface)]",children:c.jsxs("tr",{className:"border-b border-[var(--th-border)]",children:[C&&c.jsx("th",{className:"w-10 p-3",children:c.jsx("input",{type:"checkbox",checked:H.allChecked,onChange:O=>fe(O.target.checked),"aria-label":"Select all rows"})}),$.map(O=>c.jsx("th",{className:`p-3 font-medium text-[var(--th-text-2)] ${O.align==="right"?"text-right":O.align==="center"?"text-center":"text-left"}`,style:{width:O.width,minWidth:O.minWidth,maxWidth:O.maxWidth},children:c.jsxs("button",{type:"button",disabled:!O.sortable,onClick:()=>{const Q=(q==null?void 0:q.key)===String(O.key)&&q.order==="asc"?"desc":"asc";W({key:String(O.key),order:Q}),V==null||V(String(O.key),Q)},className:"disabled:cursor-default",children:[O.label,(q==null?void 0:q.key)===String(O.key)?(q.order==="asc"," ?"):""]})},String(O.key)))]})}),c.jsx("tbody",{children:Z.map((O,Q)=>c.jsxs("tr",{onClick:()=>le(O),className:`border-b border-[var(--th-border)] hover:bg-black/[0.03] ${(T==null?void 0:T.type)==="none"?"":"cursor-pointer"} ${typeof e.rowClassName=="function"?e.rowClassName(O):e.rowClassName??""}`,style:{height:e.rowHeight},children:[C&&c.jsx("td",{className:"p-3",onClick:me=>me.stopPropagation(),children:c.jsx("input",{type:"checkbox",checked:k.has(O.id),onChange:()=>ae(O.id),"aria-label":`Select row ${O.id}`})}),$.map(me=>{const _e=O[String(me.key)],et=Sl[me.cellType??""];return c.jsx("td",{className:`p-3 ${me.align==="right"?"text-right":me.align==="center"?"text-center":""}`,children:et?c.jsx(et,{value:_e,row:O,column:me,rowIndex:Q,currentPage:S,extra:H}):String(_e??" ")},String(me.key))})]},O.id))})]})}),c.jsxs("div",{className:"flex items-center justify-between gap-3 p-3 text-xs text-[var(--th-text-3)]",children:[c.jsxs("span",{children:[Z.length," of ",n??r.length," records"]}),o&&i&&c.jsx("button",{type:"button",onClick:()=>void i(),disabled:s,className:"rounded-lg border border-[var(--th-border)] px-3 py-2 text-sm disabled:opacity-50",children:s?"Loading...":"Load more"})]})]})}function wl({open:e,onClose:t,onConfirm:r,isLoading:n=!1,title:s,description:o,confirmLabel:i="Confirm",confirmTone:l="primary",requireConfirmText:u}){const[m,h]=E.useState("");if(!e)return null;const y=!n&&(!u||m===u);return c.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",children:c.jsxs("div",{role:"dialog","aria-modal":"true","aria-labelledby":"confirm-modal-title",className:"w-full max-w-md rounded-xl border border-[var(--th-border)] bg-[var(--th-surface)] p-6 shadow-xl",children:[c.jsx("h2",{id:"confirm-modal-title",className:"text-lg font-semibold text-[var(--th-text)]",children:s}),c.jsx("div",{className:"mt-3 text-sm text-[var(--th-text-3)]",children:o}),u&&c.jsx("input",{value:m,onChange:x=>h(x.target.value),placeholder:`Type ${u} to confirm`,className:"mt-4 w-full rounded-lg border border-[var(--th-border)] bg-transparent px-3 py-2 text-sm"}),c.jsxs("div",{className:"mt-6 flex justify-end gap-3",children:[c.jsx("button",{type:"button",onClick:()=>{h(""),t()},disabled:n,className:"rounded-lg border border-[var(--th-border)] px-4 py-2 text-sm",children:"Cancel"}),c.jsx("button",{type:"button",onClick:r,disabled:!y,className:`rounded-lg px-4 py-2 text-sm font-medium text-white disabled:opacity-50 ${l==="danger"?"bg-red-600":"bg-violet-600"}`,children:n?"Please wait...":i})]})]})})}function Vt({title:e,subtitle:t,primaryText:r,primaryIcon:n,onPrimaryClick:s,children:o}){return c.jsxs("header",{className:"mb-6 flex flex-wrap items-center justify-between gap-4",children:[c.jsxs("div",{children:[c.jsx("h1",{className:"text-2xl font-semibold text-[var(--th-text)]",children:e}),t&&c.jsx("p",{className:"mt-1 text-sm text-[var(--th-text-3)]",children:t})]}),c.jsxs("div",{className:"flex items-center gap-3",children:[o,r&&s&&c.jsxs("button",{type:"button",onClick:s,className:"inline-flex items-center gap-2 rounded-lg bg-violet-600 px-4 py-2 text-sm font-medium text-white hover:bg-violet-700",children:[n&&c.jsx(Re,{icon:n,size:16}),r]})]})]})}const _l=E.createContext(void 0),dn=e=>{const t=E.useContext(_l);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Rl={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)};var pt,Lt,ea,El=(ea=class{constructor(){Se(this,pt,Rl);Se(this,Lt,!1)}setTimeoutProvider(e){process.env.NODE_ENV!=="production"&&R(this,Lt)&&e!==R(this,pt)&&console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",{previous:R(this,pt),provider:e}),ee(this,pt,e),process.env.NODE_ENV!=="production"&&ee(this,Lt,!1)}setTimeout(e,t){return process.env.NODE_ENV!=="production"&&ee(this,Lt,!0),R(this,pt).setTimeout(e,t)}clearTimeout(e){R(this,pt).clearTimeout(e)}setInterval(e,t){return process.env.NODE_ENV!=="production"&&ee(this,Lt,!0),R(this,pt).setInterval(e,t)}clearInterval(e){R(this,pt).clearInterval(e)}},pt=new WeakMap,Lt=new WeakMap,ea);const Jr=new El;function Cl(e){setTimeout(e,0)}const Nl=typeof window>"u"||"Deno"in globalThis;function ws(){}function Ol(e){return typeof e=="number"&&e>=0&&e!==1/0}function jl(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ue(e,t){return typeof e=="function"?e(t):e}function bo(e){return JSON.stringify(e,(t,r)=>es(r)?Object.keys(r).sort().reduce((n,s)=>(n[s]=r[s],n),{}):r)}const ja=Object.prototype.hasOwnProperty;function Zn(e,t,r=0){if(e===t)return e;if(r>500)return t;const n=xo(e)&&xo(t);if(!n&&!(es(e)&&es(t)))return t;const s=(n?e:Object.keys(e)).length,o=n?t:Object.keys(t),i=o.length,l=n?new Array(i):{};let u=0;for(let m=0;m<i;m++){const h=n?m:o[m],y=e[h],x=t[h];if(y===x){l[h]=y,(n?m<s:ja.call(e,h))&&u++;continue}if(y===null||x===null||typeof y!="object"||typeof x!="object"){l[h]=x;continue}const C=Zn(y,x,r+1);l[h]=C,C===y&&u++}return s===i&&u===s?e:l}function Zr(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const r of Object.keys(e))if(!ja.call(t,r)||e[r]!==t[r])return!1;return!0}function xo(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function es(e){if(!So(e))return!1;const t=Object.getPrototypeOf(e),r=t==null?void 0:t.constructor;if(r===void 0)return!0;if(typeof r!="function")return!1;const n=r.prototype;return!(!So(n)||!n.hasOwnProperty("isPrototypeOf")||t!==Object.prototype)}function So(e){return Object.prototype.toString.call(e)==="[object Object]"}function wo(e,t,r){if(typeof r.structuralSharing=="function")return r.structuralSharing(e,t);if(r.structuralSharing!==!1){if(process.env.NODE_ENV!=="production")try{return Zn(e,t)}catch(n){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`),n}return Zn(e,t)}return t}function _s(e,t){return typeof e=="function"?e(...t):!!e}let Pl=()=>Nl;const Tl=()=>Pl();var pn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ft,Et,er,ta,Al=(ta=class extends pn{constructor(){super();Se(this,Ft);Se(this,Et);Se(this,er);ee(this,er,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){R(this,Et)||this.setEventListener(R(this,er))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,Et))==null||t.call(this),ee(this,Et,void 0))}setEventListener(t){var r;ee(this,er,t),(r=R(this,Et))==null||r.call(this),ee(this,Et,t(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(t){R(this,Ft)!==t&&(ee(this,Ft,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(r=>{r(t)})}isFocused(){var t;return typeof R(this,Ft)=="boolean"?R(this,Ft):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ft=new WeakMap,Et=new WeakMap,er=new WeakMap,ta);const kl=new Al,Dl=Cl;function Ll(){let e=[],t=0,r=l=>{l()},n=l=>{l()},s=Dl;const o=l=>{t?e.push(l):s(()=>{r(l)})},i=()=>{const l=e;e=[],l.length&&s(()=>{n(()=>{l.forEach(u=>{r(u)})})})};return{batch:l=>{let u;t++;try{u=l()}finally{t--,t||i()}return u},batchCalls:l=>(...u)=>{o(()=>{l(...u)})},schedule:o,setNotifyFunction:l=>{r=l},setBatchNotifyFunction:l=>{n=l},setScheduler:l=>{s=l}}}const hn=Ll();var tr,Ct,rr,ra,Fl=(ra=class extends pn{constructor(){super();Se(this,tr,!0);Se(this,Ct);Se(this,rr);ee(this,rr,t=>{if(typeof window<"u"&&window.addEventListener){const r=()=>t(!0),n=()=>t(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",n)}}})}onSubscribe(){R(this,Ct)||this.setEventListener(R(this,rr))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,Ct))==null||t.call(this),ee(this,Ct,void 0))}setEventListener(t){var r;ee(this,rr,t),(r=R(this,Ct))==null||r.call(this),ee(this,Ct,t(this.setOnline.bind(this)))}setOnline(t){R(this,tr)!==t&&(ee(this,tr,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return R(this,tr)}},tr=new WeakMap,Ct=new WeakMap,rr=new WeakMap,ra);const Il=new Fl;function Ml(e){return(e??"online")==="online"?Il.isOnline():!0}function Ul(e,{pages:t,pageParams:r}){const n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}function $l(e,{pages:t,pageParams:r}){var n;return t.length>0?(n=e.getPreviousPageParam)==null?void 0:n.call(e,t[0],t,r[0],r):void 0}function Bl(e,t){return t?Ul(e,t)!=null:!1}function zl(e,t){return!t||!e.getPreviousPageParam?!1:$l(e,t)!=null}function ql(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ml(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}var Xe,de,Nr,Ze,It,nr,gt,Or,sr,or,Mt,Ut,Nt,ar,ge,Rr,ts,rs,ns,ss,os,as,is,ls,na,Pa=(na=class extends pn{constructor(t,r){super();Se(this,ge);Se(this,Xe);Se(this,de);Se(this,Nr);Se(this,Ze);Se(this,It);Se(this,nr);Se(this,gt);Se(this,Or);Se(this,sr);Se(this,or);Se(this,Mt);Se(this,Ut);Se(this,Nt);Se(this,ar,new Set);this.options=r,ee(this,Xe,t),ee(this,gt,null),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,de).addObserver(this),_o(R(this,de),this.options)?Ce(this,ge,Rr).call(this):this.updateResult(),Ce(this,ge,os).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return cs(R(this,de),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return cs(R(this,de),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ce(this,ge,as).call(this),Ce(this,ge,is).call(this),R(this,de).removeObserver(this)}setOptions(t){const r=this.options,n=R(this,de);if(this.options=R(this,Xe).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ue(this.options.enabled,R(this,de))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ce(this,ge,ls).call(this),R(this,de).setOptions(this.options),r._defaulted&&!Zr(this.options,r)&&R(this,Xe).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,de),observer:this});const s=this.hasListeners();s&&Ro(R(this,de),n,this.options,r)&&Ce(this,ge,Rr).call(this),this.updateResult(),s&&(R(this,de)!==n||Ue(this.options.enabled,R(this,de))!==Ue(r.enabled,R(this,de))||Ue(this.options.staleTime,R(this,de))!==Ue(r.staleTime,R(this,de)))&&Ce(this,ge,rs).call(this);const o=Ce(this,ge,ns).call(this);s&&(R(this,de)!==n||Ue(this.options.enabled,R(this,de))!==Ue(r.enabled,R(this,de))||o!==R(this,Nt))&&Ce(this,ge,ss).call(this,o)}getOptimisticResult(t){const r=R(this,Xe).getQueryCache().build(R(this,Xe),t),n=this.createResult(r,t);return Zr(this.getCurrentResult(),n)||(ee(this,Ze,n),ee(this,nr,this.options),ee(this,It,R(this,de).state)),n}getCurrentResult(){return R(this,Ze)}trackResult(t,r){return new Proxy(t,{get:(n,s)=>(this.trackProp(s),r==null||r(s),Reflect.get(n,s))})}trackProp(t){R(this,ar).add(t)}getCurrentQuery(){return R(this,de)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const r=R(this,Xe).defaultQueryOptions(t),n=R(this,Xe).getQueryCache().build(R(this,Xe),r);let s=()=>{},o;const i=new Promise(l=>{o=l,s=R(this,Xe).getQueryCache().subscribe(u=>{u.type==="updated"&&u.query.queryHash===n.queryHash&&n.state.data!==void 0&&(s(),l(this.createResult(n,r)))})});return Promise.race([n.fetch(r).then(()=>{const l=this.createResult(n,r);return o==null||o(l),l}).finally(()=>{s()}),i])}fetch(t){return Ce(this,ge,Rr).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,Ze)))}createResult(t,r){var z;const n=R(this,de),s=this.options,o=R(this,Ze),i=R(this,It),l=R(this,nr),u=t!==n?t.state:R(this,Nr),{state:m}=t;let h={...m},y=!1,x;if(r._optimisticResults){const V=this.hasListeners(),K=!V&&_o(t,r),se=V&&Ro(t,n,r,s);(K||se)&&(h={...h,...ql(m.data,t.options)}),r._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:C,errorUpdatedAt:k,status:F}=h;x=h.data;let T=!1;if(r.placeholderData!==void 0&&x===void 0&&F==="pending"){let V;o!=null&&o.isPlaceholderData&&r.placeholderData===(l==null?void 0:l.placeholderData)?(V=o.data,T=!0):V=typeof r.placeholderData=="function"?r.placeholderData((z=R(this,or))==null?void 0:z.state.data,R(this,or)):r.placeholderData,V!==void 0&&(F="success",x=wo(o==null?void 0:o.data,V,r),y=!0)}if(r.select&&x!==void 0&&!T)if(o&&x===(i==null?void 0:i.data)&&r.select===R(this,Or))x=R(this,sr);else try{ee(this,Or,r.select),x=r.select(x),x=wo(o==null?void 0:o.data,x,r),ee(this,sr,x),ee(this,gt,null)}catch(V){ee(this,gt,V)}else x===void 0&&ee(this,gt,null);R(this,gt)&&(C=R(this,gt),x=R(this,sr),k=Date.now(),F="error",y=!1);const B=h.fetchStatus==="fetching",S=F==="pending",_=F==="error",b=S&&B,L=x!==void 0;return{status:F,fetchStatus:h.fetchStatus,isPending:S,isSuccess:F==="success",isError:_,isInitialLoading:b,isLoading:b,data:x,dataUpdatedAt:h.dataUpdatedAt,error:C,errorUpdatedAt:k,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:B,isRefetching:B&&!S,isLoadingError:_&&!L,isPaused:h.fetchStatus==="paused",isPlaceholderData:y,isRefetchError:_&&L,isStale:Rs(t,r),refetch:this.refetch,isEnabled:Ue(r.enabled,t)!==!1}}updateResult(){const t=R(this,Ze),r=this.createResult(R(this,de),this.options);if(ee(this,It,R(this,de).state),ee(this,nr,this.options),R(this,It).data!==void 0&&ee(this,or,R(this,de)),Zr(r,t))return;ee(this,Ze,r);const s=(()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,i=typeof o=="function"?o():o;if(i==="all"||!i&&!R(this,ar).size||this.options.throwOnError&&R(this,Ze).error!==t.error)return!0;for(const l of i??R(this,ar))if(R(this,Ze)[l]!==t[l])return!0;return!1})();hn.batch(()=>{s&&this.listeners.forEach(o=>{o(R(this,Ze))}),R(this,Xe).getQueryCache().notify({query:R(this,de),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ce(this,ge,os).call(this)}},Xe=new WeakMap,de=new WeakMap,Nr=new WeakMap,Ze=new WeakMap,It=new WeakMap,nr=new WeakMap,gt=new WeakMap,Or=new WeakMap,sr=new WeakMap,or=new WeakMap,Mt=new WeakMap,Ut=new WeakMap,Nt=new WeakMap,ar=new WeakMap,ge=new WeakSet,Rr=function(t){Ce(this,ge,ls).call(this);let r=R(this,de).fetch(this.options,t);return t!=null&&t.throwOnError||(r=r.catch(ws)),r},ts=function(t){return!Tl()&&Ue(this.options.enabled,R(this,de))!==!1&&Ol(t)},rs=function(){Ce(this,ge,as).call(this);const t=Ue(this.options.staleTime,R(this,de));if(R(this,Ze).isStale||!Ce(this,ge,ts).call(this,t))return;const r=jl(R(this,Ze).dataUpdatedAt,t)+1;ee(this,Mt,Jr.setTimeout(()=>{R(this,Ze).isStale||this.updateResult()},r))},ns=function(){return Ue(this.options.refetchInterval,R(this,de))??!1},ss=function(t){Ce(this,ge,is).call(this),ee(this,Nt,t),!(R(this,Nt)===0||!Ce(this,ge,ts).call(this,R(this,Nt)))&&ee(this,Ut,Jr.setInterval(()=>{(this.options.refetchIntervalInBackground||kl.isFocused())&&Ce(this,ge,Rr).call(this)},R(this,Nt)))},os=function(){Ce(this,ge,rs).call(this),Ce(this,ge,ss).call(this,Ce(this,ge,ns).call(this))},as=function(){R(this,Mt)!==void 0&&(Jr.clearTimeout(R(this,Mt)),ee(this,Mt,void 0))},is=function(){R(this,Ut)!==void 0&&(Jr.clearInterval(R(this,Ut)),ee(this,Ut,void 0))},ls=function(){const t=R(this,Xe).getQueryCache().build(R(this,Xe),this.options);if(t===R(this,de))return;const r=R(this,de);ee(this,de,t),ee(this,Nr,t.state),this.hasListeners()&&(r==null||r.removeObserver(this),t.addObserver(this))},na);function Vl(e,t){return Ue(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Ue(t.retryOnMount,e)===!1)}function _o(e,t){return Vl(e,t)||e.state.data!==void 0&&cs(e,t,t.refetchOnMount)}function cs(e,t,r){if(Ue(t.enabled,e)!==!1&&Ue(t.staleTime,e)!=="static"){const n=Ue(r,e);return n==="always"||n!==!1&&Rs(e,t)}return!1}function Ro(e,t,r,n){return(e!==t||Ue(n.enabled,e)===!1)&&(!r.suspense||e.state.status!=="error")&&Rs(e,r)}function Rs(e,t){return Ue(t.enabled,e)!==!1&&e.isStaleByTime(Ue(t.staleTime,e))}var Wl=class extends Pa{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type="infinite",super.setOptions(e)}getOptimisticResult(e){return e._type="infinite",super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var C,k;const{state:r}=e,n=super.createResult(e,t),{isFetching:s,isRefetching:o,isError:i,isRefetchError:l}=n,u=(k=(C=r.fetchMeta)==null?void 0:C.fetchMore)==null?void 0:k.direction,m=i&&u==="forward",h=s&&u==="forward",y=i&&u==="backward",x=s&&u==="backward";return{...n,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Bl(t,r.data),hasPreviousPage:zl(t,r.data),isFetchNextPageError:m,isFetchingNextPage:h,isFetchPreviousPageError:y,isFetchingPreviousPage:x,isRefetchError:l&&!m&&!y,isRefetching:o&&!h&&!x}}};function Hl(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var vt,Ot,Ge,jr,ht,Er,us,sa,Kl=(sa=class extends pn{constructor(t,r){super();Se(this,ht);Se(this,vt);Se(this,Ot);Se(this,Ge);Se(this,jr);ee(this,vt,t),this.setOptions(r),this.bindMethods(),Ce(this,ht,Er).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const r=this.options;this.options=R(this,vt).defaultMutationOptions(t),Zr(this.options,r)||R(this,vt).getMutationCache().notify({type:"observerOptionsUpdated",mutation:R(this,Ge),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&bo(r.mutationKey)!==bo(this.options.mutationKey)?this.reset():((n=R(this,Ge))==null?void 0:n.state.status)==="pending"&&R(this,Ge).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&R(this,Ge)&&(R(this,Ge).addObserver(this),Ce(this,ht,Er).call(this))}onUnsubscribe(){var t;this.hasListeners()||(t=R(this,Ge))==null||t.removeObserver(this)}onMutationUpdate(t){Ce(this,ht,Er).call(this),Ce(this,ht,us).call(this,t)}getCurrentResult(){return R(this,Ot)}reset(){var t;(t=R(this,Ge))==null||t.removeObserver(this),ee(this,Ge,void 0),Ce(this,ht,Er).call(this),Ce(this,ht,us).call(this)}mutate(t,r){var n;return ee(this,jr,r),(n=R(this,Ge))==null||n.removeObserver(this),ee(this,Ge,R(this,vt).getMutationCache().build(R(this,vt),this.options)),R(this,Ge).addObserver(this),R(this,Ge).execute(t)}},vt=new WeakMap,Ot=new WeakMap,Ge=new WeakMap,jr=new WeakMap,ht=new WeakSet,Er=function(){var r;const t=((r=R(this,Ge))==null?void 0:r.state)??Hl();ee(this,Ot,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},us=function(t){hn.batch(()=>{var n,s,o,i;const r=R(this,jr);if(r&&this.hasListeners()){const l=R(this,Ot).variables,u=R(this,Ot).context,m={client:R(this,vt),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(n=r.onSuccess)==null||n.call(r,t.data,l,u,m)}catch(h){Promise.reject(h)}try{(s=r.onSettled)==null||s.call(r,t.data,null,l,u,m)}catch(h){Promise.reject(h)}}else if((t==null?void 0:t.type)==="error"){try{(o=r.onError)==null||o.call(r,t.error,l,u,m)}catch(h){Promise.reject(h)}try{(i=r.onSettled)==null||i.call(r,void 0,t.error,l,u,m)}catch(h){Promise.reject(h)}}}this.listeners.forEach(l=>{l(R(this,Ot))})})},sa);const Ta=E.createContext(!1),Yl=()=>E.useContext(Ta);Ta.Provider;function Jl(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Ql=E.createContext(Jl()),Gl=()=>E.useContext(Ql),Xl=(e,t,r)=>{const n=(r==null?void 0:r.state.status)==="error"&&typeof e.throwOnError=="function"?_s(e.throwOnError,[r.state.error,r]):e.throwOnError;(e.suspense||n)&&(t.isReset()||(e.retryOnMount=!1))},Zl=e=>{E.useEffect(()=>{e.clearReset()},[e])},ec=({result:e,errorResetBoundary:t,throwOnError:r,query:n,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&n&&(s&&e.data===void 0||_s(r,[e.error,n])),tc=e=>{if(e.suspense){const r=s=>s==="static"?s:Math.max(s??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...s)=>r(n(...s)):r(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},rc=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,nc=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function Aa(e,t,r){if(process.env.NODE_ENV!=="production"&&(typeof e!="object"||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 n=Yl(),s=Gl(),o=dn(),i=o.defaultQueryOptions(e),l=o.getQueryCache().get(i.queryHash);process.env.NODE_ENV!=="production"&&(i.queryFn||console.error(`[${i.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`));const u=e.subscribed!==!1;i._optimisticResults=n?"isRestoring":u?"optimistic":void 0,tc(i),Xl(i,s,l),Zl(s);const[m]=E.useState(()=>new t(o,i)),h=m.getOptimisticResult(i);E.useEffect(()=>{m.setOptions(i)},[i,m]);const y=!n&&u;if(E.useSyncExternalStore(E.useCallback(x=>{const C=y?m.subscribe(hn.batchCalls(x)):ws;return m.updateResult(),C},[m,y]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),rc(i,h))throw nc(i,m,s);if(ec({result:h,errorResetBoundary:s,throwOnError:i.throwOnError,query:l,suspense:i.suspense}))throw h.error;return i.notifyOnChangeProps?h:m.trackResult(h)}function ir(e,t){return Aa(e,Pa)}function sc(e,t){const r=dn(),[n]=E.useState(()=>new Kl(r,e));E.useEffect(()=>{n.setOptions(e)},[n,e]);const s=E.useSyncExternalStore(E.useCallback(i=>n.subscribe(hn.batchCalls(i)),[n]),()=>n.getCurrentResult(),()=>n.getCurrentResult()),o=E.useCallback((...i)=>{n.mutate(i[0],i[1]).catch(ws)},[n]);if(s.error&&_s(n.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}function ka(e,t){return Aa(e,Wl)}function Da(e,t){return function(){return e.apply(t,arguments)}}const{toString:oc}=Object.prototype,{getPrototypeOf:bt}=Object,{iterator:Ar,toStringTag:La}=Symbol,xt=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Fa=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),mn=(e,t,r)=>e===Object.prototype||!r&&t===null,ac=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(r=>{if(Fa(r))return!1;const n=Object.getOwnPropertyDescriptor(e,r);return!!n&&n.configurable&&n.writable===!0})},Es=(e,t)=>{let r=e;const n=[];for(;r!=null;){if(n.indexOf(r)!==-1)return!1;n.push(r);const s=bt(r);if(mn(r,s,r===e))return!1;if(xt(r,t))return!0;r=s}return!1},ic=(e,t)=>e!=null&&Es(e,t)?e[t]:void 0,lc=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=bt(e);if(t===null&&ac(e))return e;const r=Object.create(null),n=Object.create(null),s=[];let o=e;for(;o!=null&&s.indexOf(o)===-1;){s.push(o);const i=o===e?t:bt(o);if(mn(o,i,o===e))break;const l=Object.getOwnPropertyNames(o);Object.getOwnPropertySymbols&&l.push(...Object.getOwnPropertySymbols(o));for(const u of l)Fa(u)||xt(n,u)||(r[u]=e[u],n[u]=!0);o=i}return r},Cs=(e=>t=>{const r=oc.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ct=e=>(e=e.toLowerCase(),t=>Cs(t)===e),yn=e=>t=>typeof t===e,{isArray:Bt}=Array,zt=yn("undefined");function cr(e){return e!==null&&!zt(e)&&e.constructor!==null&&!zt(e.constructor)&&nt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ia=ct("ArrayBuffer");function cc(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ia(e.buffer),t}const uc=yn("string"),nt=yn("function"),fc=yn("number"),ur=e=>e!==null&&typeof e=="object",dc=e=>e===!0||e===!1,en=e=>{if(!ur(e))return!1;const t=bt(e);return(t===null||t===Object.prototype||bt(t)===null)&&(mn(e,t,!0)||!xt(e,La)&&!xt(e,Ar))},pc=e=>{if(!ur(e)||cr(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},hc=ct("Date"),mc=ct("File"),yc=e=>!!(e&&typeof e.uri<"u"),gc=e=>e&&typeof e.getParts<"u",vc=ct("Blob"),bc=ct("FileList"),xc=ct("Set"),Sc=e=>ur(e)&&nt(e.pipe);function wc(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Eo=wc(),Co=typeof Eo.FormData<"u"?Eo.FormData:void 0,_c=e=>{if(!e)return!1;if(Co&&e instanceof Co)return!0;const t=bt(e);if(!t||t===Object.prototype||!nt(e.append))return!1;const r=Cs(e);return r==="formdata"||r==="object"&&nt(e.toString)&&e.toString()==="[object FormData]"},Rc=ct("URLSearchParams"),[Ec,Cc,Nc,Oc]=["ReadableStream","Request","Response","Headers"].map(ct),jc=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function kr(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),Bt(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{if(cr(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let l;for(n=0;n<i;n++)l=o[n],t.call(null,e[l],l,e)}}function Pc(e,t){if(cr(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,s;for(;n-- >0;)if(s=r[n],t===s.toLowerCase())return s;return null}const Dt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ma=e=>!zt(e)&&e!==Dt;function fs(...e){const{caseless:t,skipUndefined:r}=Ma(this)&&this||{},n={},s=t?Object.create(null):null,o=(i,l)=>{if(l==="__proto__"||l==="constructor"||l==="prototype")return;let u=l;if(s&&typeof l=="string"){const h=l.toLowerCase(),y=s[h];y!==void 0&&xt(n,y)?u=y:s[h]=l}const m=xt(n,u)?n[u]:void 0;en(m)&&en(i)?n[u]=fs(m,i):en(i)?n[u]=fs({},i):Bt(i)?n[u]=i.slice():(!r||!zt(i))&&(n[u]=i)};for(let i=0,l=e.length;i<l;i++){const u=e[i];if(!u||cr(u)||(kr(u,o),typeof u!="object"||Bt(u)||!Object.getOwnPropertySymbols))continue;const m=Object.getOwnPropertySymbols(u);for(let h=0;h<m.length;h++){const y=m[h];zc.call(u,y)&&o(u[y],y)}}return n}const Tc=(e,t,r,{allOwnKeys:n}={})=>(kr(t,(s,o)=>{r&&nt(s)?Object.defineProperty(e,o,{__proto__:null,value:Da(s,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),Ac=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),kc=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),r&&Object.assign(e.prototype,r)},Dc=(e,t,r,n)=>{let s,o,i;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!n||n(i,e,t))&&!l[i]&&(t[i]=e[i],l[i]=!0);e=r!==!1&&bt(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Lc=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},Fc=e=>{if(!e)return null;if(Bt(e))return e;let t=e.length;if(!Number.isSafeInteger(t)||t<0||t>4294967295)return null;const r=new Set,n=new Set;let s=e;for(;s!=null&&r.size<t;){if(n.has(s))return null;n.add(s);const i=bt(s);if(mn(s,i,s===e))break;Object.getOwnPropertyNames(s).forEach(l=>{const u=+l;Number.isInteger(u)&&u>=0&&u<t&&String(u)===l&&xt(s,l)&&r.add(u)}),s=i}if(r.size!==t)return null;const o=new Array(t);for(;t-- >0;)o[t]=e[t];return o},Ic=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&bt(Uint8Array)),Mc=(e,t)=>{const n=(e&&e[Ar]).call(e);let s;for(;(s=n.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Uc=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},$c=ct("HTMLFormElement"),Bc=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),{propertyIsEnumerable:zc}=Object.prototype,qc=ct("RegExp"),Ua=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};kr(r,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(n[o]=i||s)}),Object.defineProperties(e,n)},Vc=e=>{Ua(e,(t,r)=>{if(nt(e)&&["arguments","caller","callee"].includes(r))return!1;const n=e[r];if(nt(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Wc=(e,t)=>{const r={},n=s=>{s.forEach(o=>{r[o]=!0})};return Bt(e)?n(e):n(String(e).split(t)),r},Hc=()=>{},Kc=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Yc(e){return!!(e&&nt(e.append)&&e[La]==="FormData"&&e[Ar])}const Jc=e=>{const t=new WeakSet,r=n=>{if(ur(n)){if(t.has(n))return;if(cr(n))return n;if(!("toJSON"in n)){t.add(n);let s;if(xc(n)){s=[];for(const o of n){const i=r(o);!zt(i)&&s.push(i)}}else s=Bt(n)?[]:{},kr(n,(o,i)=>{const l=r(o);!zt(l)&&(s[i]=l)});return t.delete(n),s}}return n};return r(e)},Qc=ct("AsyncFunction"),Gc=e=>e&&(ur(e)||nt(e))&&nt(e.then)&&nt(e.catch),$a=((e,t)=>e?setImmediate:t?((r,n)=>(Dt.addEventListener("message",({source:s,data:o})=>{s===Dt&&o===r&&n.length&&n.shift()()},!1),s=>{n.push(s),Dt.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",nt(Dt.postMessage)),Xc=typeof queueMicrotask<"u"?queueMicrotask.bind(Dt):typeof process<"u"&&process.nextTick||$a,Ba=e=>e!=null&&nt(e[Ar]),Zc=e=>e!=null&&Es(e,Ar)&&Ba(e),f={isArray:Bt,isArrayBuffer:Ia,isBuffer:cr,isFormData:_c,isArrayBufferView:cc,isString:uc,isNumber:fc,isBoolean:dc,isObject:ur,isPlainObject:en,isEmptyObject:pc,isReadableStream:Ec,isRequest:Cc,isResponse:Nc,isHeaders:Oc,isUndefined:zt,isDate:hc,isFile:mc,isReactNativeBlob:yc,isReactNative:gc,isBlob:vc,isRegExp:qc,isFunction:nt,isStream:Sc,isURLSearchParams:Rc,isTypedArray:Ic,isFileList:bc,forEach:kr,merge:fs,extend:Tc,trim:jc,stripBOM:Ac,inherits:kc,toFlatObject:Dc,kindOf:Cs,kindOfTest:ct,endsWith:Lc,toArray:Fc,forEachEntry:Mc,matchAll:Uc,isHTMLForm:$c,hasOwnProperty:xt,hasOwnProp:xt,hasOwnInPrototypeChain:Es,getSafeProp:ic,toSafeFlatObject:lc,reduceDescriptors:Ua,freezeMethods:Vc,toObjectSet:Wc,toCamelCase:Bc,noop:Hc,toFiniteNumber:Kc,findKey:Pc,global:Dt,isContextDefined:Ma,isSpecCompliantForm:Yc,toJSONObject:Jc,isAsyncFn:Qc,isThenable:Gc,setImmediate:$a,asap:Xc,isIterable:Ba,isSafeIterable:Zc},eu=f.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),tu=e=>{const t=Object.create(null);let r,n,s;return e&&e.split(`
|
|
87
|
-
`).forEach(function(i){s=i.indexOf(":"),r=i.substring(0,s).trim().toLowerCase(),n=i.substring(s+1).trim();const l=f.hasOwnProp(t,r);!r||l&&f.hasOwnProp(eu,r)||(r==="set-cookie"?l?t[r].push(n):t[r]=[n]:t[r]=l?t[r]+", "+n:n)}),t};function ru(e){let t=0,r=e.length;for(;t<r;){const n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;r>t;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}const nu=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),su=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Ns(e,t){return f.isArray(e)?e.map(r=>Ns(r,t)):ru(String(e).replace(t,""))}const ou=e=>Ns(e,nu),au=e=>Ns(e,su);function za(e){const t=Object.create(null);return f.forEach(e.toJSON(),(r,n)=>{t[n]=au(r)}),t}const No=Symbol("internals");function br(e){return e&&String(e).trim().toLowerCase()}function tn(e){return e===!1||e==null?e:f.isArray(e)?e.map(tn):ou(String(e))}function iu(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const lu=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Bn(e){let t=0,r=e.length;for(;t<r;){const n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;r>t;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}function cu(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let r="";for(let n=1;n<t;n++){const s=e.charCodeAt(n);if(s===34||s===92&&(n+=1,n>=t))return e;r+=e[n]}return r}function uu(e){const t=Object.create(null),r=String(e);let n=0,s=!1,o=!1;function i(l){const u=Bn(r.slice(n,l)),m=u.indexOf("=");if(m<1)return;const h=Bn(u.slice(0,m));if(!lu.test(h))return;const y=h.toLowerCase();if(y==="__proto__"||y==="constructor"||y==="prototype")return;const x=Bn(u.slice(m+1));t[y]=cu(x)}for(let l=0;l<r.length;l++){const u=r.charCodeAt(l);s?o?o=!1:u===92?o=!0:u===34&&(s=!1):u===34?s=!0:(u===44||u===59)&&(i(l),n=l+1)}return i(r.length),t}const fu=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()),du="__Proto__",Oo=e=>e==="__proto__"?du:e;function zn(e,t,r,n,s){if(f.isFunction(n))return n.call(e,t,r);if(s&&(t=r),!!f.isString(t)){if(f.isString(n))return t.indexOf(n)!==-1;if(f.isRegExp(n))return n.test(t)}}function pu(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function hu(e,t){const r=f.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{__proto__:null,value:function(s,o,i){return this[n].call(this,t,s,o,i)},configurable:!0})})}let Be=class{constructor(t){t&&this.set(t)}set(t,r,n){const s=this;function o(l,u,m){const h=br(u);if(!h)return;const y=f.findKey(s,h);(!y||s[y]===void 0||m===!0||m===void 0&&s[y]!==!1)&&(s[Oo(y||u)]=tn(l))}const i=(l,u)=>f.forEach(l,(m,h)=>o(m,h,u));if(f.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(f.isString(t)&&(t=t.trim())&&!fu(t))i(tu(t),r);else if(f.isObject(t)&&f.isSafeIterable(t)){let l=Object.create(null),u,m;for(const h of t){if(!f.isArray(h))throw new TypeError("Object iterator must return a key-value pair");m=h[0],f.hasOwnProp(l,m)?(u=l[m],l[m]=f.isArray(u)?[...u,h[1]]:[u,h[1]]):l[m]=h[1]}i(l,r)}else t!=null&&o(r,t,n);return this}get(t,r){if(t=br(t),t){const n=f.findKey(this,t);if(n){const s=this[n];if(!r)return s;if(r===!0)return iu(s);if(f.isFunction(r))return r.call(this,s,n);if(f.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=br(t),t){const n=f.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||zn(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let s=!1;function o(i){if(i=br(i),i){const l=f.findKey(n,i);l&&(!r||zn(n,n[l],l,r))&&(delete n[l],s=!0)}}return f.isArray(t)?t.forEach(o):o(t),s}clear(t){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const o=r[n];(!t||zn(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const r=this,n=Object.create(null);return f.forEach(this,(s,o)=>{const i=f.findKey(n,o);if(i){r[i]=tn(s),delete r[o];return}const l=Oo(t?pu(o):String(o).trim());l!==o&&delete r[o],r[l]=tn(s),n[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return f.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=t&&f.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
88
|
-
`)}getSetCookie(){const t=this.get("set-cookie");return f.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return uu(t)}static concat(t,...r){const n=new this(t);return r.forEach(s=>n.set(s)),n}static accessor(t){const n=(this[No]=this[No]={accessors:{}}).accessors,s=this.prototype;function o(i){const l=br(i);n[l]||(hu(s,i),n[l]=!0)}return f.isArray(t)?t.forEach(o):o(t),this}};Be.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);f.reduceDescriptors(Be.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});f.freezeMethods(Be);const an="[REDACTED ****]";function mu(e){if(f.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(f.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function yu(e,t){const r=new Set(t.map(o=>String(o).toLowerCase())),n=[],s=o=>{if(o===null||typeof o!="object"||f.isBuffer(o))return o;if(n.indexOf(o)!==-1)return;o instanceof Be&&(o=o.toJSON()),n.push(o);let i;if(f.isArray(o))i=[],o.forEach((l,u)=>{const m=s(l);f.isUndefined(m)||(i[u]=m)});else{if(!f.isPlainObject(o)&&mu(o))return n.pop(),o;i=Object.create(null);for(const[l,u]of Object.entries(o)){const m=r.has(l.toLowerCase())?an:s(u);f.isUndefined(m)||(i[l]=m)}}return n.pop(),i};return s(e)}function jo(e){try{return String(e)}catch{return""}}function gu(e){return e.errors.map(r=>{try{return r&&r.message?jo(r.message):jo(r)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}const vu=`
|
|
89
|
-
Caused by: `,ds=Symbol("causeStack");function bu(e,t){const r=f.hasOwnProp(e,ds)&&e[ds];return r&&t.endsWith(r)?t.length-r.length:-1}function xu(e,t){try{const r=t&&t.stack;if(typeof r!="string"||!r)return;const n=e.stack;if(typeof n!="string"||!n)return;const s=vu+r;e.stack=n+s,Object.defineProperty(e,ds,{__proto__:null,value:s})}catch{}}let P=class qa extends Error{static from(t,r,n,s,o,i){let l=t.message;!l&&f.isArray(t.errors)&&t.errors.length&&(l=gu(t));const u=new qa(l,r||t.code,n,s,o);return Object.defineProperty(u,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),u.name=t.name,xu(u,t),t.status!=null&&u.status==null&&(u.status=t.status),i&&Object.assign(u,i),u}constructor(t,r,n,s,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,r=t&&f.hasOwnProp(t,"redact")?t.redact:void 0,n=f.isArray(r)&&r.length>0?yu(t,r):f.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};P.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";P.ERR_BAD_OPTION="ERR_BAD_OPTION";P.ECONNABORTED="ECONNABORTED";P.ETIMEDOUT="ETIMEDOUT";P.ECONNREFUSED="ECONNREFUSED";P.ERR_NETWORK="ERR_NETWORK";P.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";P.ERR_DEPRECATED="ERR_DEPRECATED";P.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";P.ERR_BAD_REQUEST="ERR_BAD_REQUEST";P.ERR_CANCELED="ERR_CANCELED";P.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";P.ERR_INVALID_URL="ERR_INVALID_URL";P.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const Su=null,Va=100;function ps(e){return f.isPlainObject(e)||f.isArray(e)}function Wa(e){return f.endsWith(e,"[]")?e.slice(0,-2):e}function qn(e,t,r){return e?e.concat(t).map(function(s,o){return s=Wa(s),!r&&o?"["+s+"]":s}).join(r?".":""):t}function wu(e){return f.isArray(e)&&!e.some(ps)}const _u=f.toFlatObject(f,{},null,function(t){return/^is[A-Z]/.test(t)});function gn(e,t,r){if(!f.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(S,_)=>{const b=f.getSafeProp(r,S);return f.isUndefined(b)?_:b},s=n("metaTokens",!0),o=n("visitor")||F,i=n("dots",!1),l=n("indexes",!1),u=n("Blob")||typeof Blob<"u"&&Blob,m=n("maxDepth",Va),h=u&&f.isSpecCompliantForm(t),y=[];if(!f.isFunction(o))throw new TypeError("visitor must be a function");function x(S){if(S===null)return"";if(f.isDate(S))return S.toISOString();if(f.isBoolean(S))return S.toString();if(!h&&f.isBlob(S))throw new P("Blob is not supported. Use a Buffer instead.");if(f.isArrayBuffer(S)||f.isTypedArray(S)){if(h&&typeof u=="function")return new u([S]);throw new P("Blob is not supported. Use a Buffer instead.",P.ERR_NOT_SUPPORT)}return S}function C(S){if(S>m)throw new P("Object is too deeply nested ("+S+" levels). Max depth: "+m,P.ERR_FORM_DATA_DEPTH_EXCEEDED)}function k(S,_){if(m===1/0)return JSON.stringify(S);const b=[];return JSON.stringify(S,function(z,V){if(!f.isObject(V))return V;for(;b.length&&b[b.length-1]!==this;)b.pop();return b.push(V),C(_+b.length-1),V})}function F(S,_,b){let L=S;if(f.isReactNative(t)&&f.isReactNativeBlob(S))return t.append(qn(b,_,i),x(S)),!1;if(S&&!b&&typeof S=="object"){if(f.endsWith(_,"{}"))_=s?_:_.slice(0,-2),S=k(S,1);else if(f.isArray(S)&&wu(S)||(f.isFileList(S)||f.endsWith(_,"[]"))&&(L=f.toArray(S)))return _=Wa(_),L.forEach(function(V,K){!(f.isUndefined(V)||V===null)&&t.append(l===!0?qn([_],K,i):l===null?_:_+"[]",x(V))}),!1}return ps(S)?!0:(t.append(qn(b,_,i),x(S)),!1)}const T=Object.assign(_u,{defaultVisitor:F,convertValue:x,isVisitable:ps});function B(S,_,b=0){if(!f.isUndefined(S)){if(C(b),y.indexOf(S)!==-1)throw new Error("Circular reference detected in "+_.join("."));y.push(S),f.forEach(S,function(z,V){(!(f.isUndefined(z)||z===null)&&o.call(t,z,f.isString(V)?V.trim():V,_,T))===!0&&B(z,_?_.concat(V):[V],b+1)}),y.pop()}}if(!f.isObject(e))throw new TypeError("data must be an object");return B(e),t}function Po(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(n){return t[n]})}function Os(e,t){this._pairs=[],e&&gn(e,this,t)}const Ha=Os.prototype;Ha.append=function(t,r){this._pairs.push([t,r])};Ha.toString=function(t){const r=t?n=>t.call(this,n,Po):Po;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function Ru(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ka(e,t,r){if(!t)return e;e=e||"";const n=f.isFunction(r)?{serialize:r}:r,s=f.getSafeProp(n,"encode")||Ru,o=f.getSafeProp(n,"serialize");let i;if(o?i=o(t,n):i=f.isURLSearchParams(t)?t.toString():new Os(t,n).toString(s),i){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}const xr=Symbol("internals");function Ya(e){return e?e.length:0}function To(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function Eu(e){return typeof e=="string"&&e!==""&&String(Number(e))===e?Number(e):e}function Sr(e,t){const r=e.handlers,n=Ya(r);r!==t.handlersRef?(t.handlersRef=r,t.handlerEntries.clear()):n!==t.handlersLength&&(n?t.handlerEntries.forEach(function(o,i){r[o.index]!==o.handler&&t.handlerEntries.delete(i)}):t.handlerEntries.clear()),t.handlersLength=n}class Ao{constructor(){this.handlers=[],this[xr]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(t,r,n){const s={fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null},o=this[xr];this.handlers==null&&(this.handlers=[]),Sr(this,o);const i=o.nextId++;return this.handlers.push(s),o.handlerEntries.set(i,{handler:s,index:this.handlers.length-1}),o.handlersLength=this.handlers.length,i}eject(t){const r=this[xr];Sr(this,r);const n=Eu(t),s=r.handlerEntries.get(n);if(s){if(r.handlerEntries.delete(n),this.handlers[s.index]!==s.handler)return;this.handlers[s.index]=null,r.iterationDepth||(To(this.handlers),r.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],Sr(this,this[xr]))}forEach(t){const r=this[xr];Sr(this,r),r.iterationDepth++;try{f.forEach(this.handlers,function(s){s!==null&&t(s)})}finally{--r.iterationDepth||(Sr(this,r),To(this.handlers),r.handlersLength=Ya(this.handlers))}}}const js={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0,encodeBasicAuthUsername:!1},Cu=typeof URLSearchParams<"u"?URLSearchParams:Os,Nu=typeof FormData<"u"?FormData:null,Ou=typeof Blob<"u"?Blob:null,ju={isBrowser:!0,classes:{URLSearchParams:Cu,FormData:Nu,Blob:Ou},protocols:["http","https","file","blob","url","data"]},Ps=typeof window<"u"&&typeof document<"u",hs=typeof navigator=="object"&&navigator||void 0,Pu=Ps&&(!hs||["ReactNative","NativeScript","NS"].indexOf(hs.product)<0),Tu=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Au=Ps&&window.location.href||"http://localhost",ku=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ps,hasStandardBrowserEnv:Pu,hasStandardBrowserWebWorkerEnv:Tu,navigator:hs,origin:Au},Symbol.toStringTag,{value:"Module"})),Me={...ku,...ju};function Du(e,t){return gn(e,new Me.classes.URLSearchParams,{visitor:function(r,n,s,o){return Me.isNode&&f.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const ko=Va;function Ja(e){if(e>ko)throw new P("FormData field is too deeply nested ("+e+" levels). Max depth: "+ko,P.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Lu(e){const t=[],r=/[^.[\]]+|\[([^.[\]]*)]/g;let n;for(;(n=r.exec(e))!==null;)Ja(t.length),t.push(n[0]==="[]"?"":n[1]||n[0]);return t}function Qa(e){const t={},r=Object.keys(e);let n;const s=r.length;let o;for(n=0;n<s;n++)o=r[n],t[o]=e[o];return t}function Ga(e){if(!f.isArray(e))return e;const t=Object.keys(e);return t.length!==e.length||t.some((r,n)=>r!==String(n))?Qa(e):e}function Fu(e){const t=[e];for(;t.length;){const r=t.pop();Object.keys(r).forEach(n=>{const s=r[n]=Ga(r[n]);(f.isArray(s)||f.isPlainObject(s))&&t.push(s)})}return e}function Xa(e){function t(r,n,s,o){Ja(o);let i=r[o++];if(i==="__proto__")return!0;const l=Number.isFinite(+i),u=o>=r.length;return i=!i&&f.isArray(s)?s.length:i,u?(f.hasOwnProp(s,i)?(s[i]=Ga(s[i]),s[i]=f.isArray(s[i])?s[i].concat(n):[s[i],n]):s[i]=n,!l):((!f.hasOwnProp(s,i)||!f.isObject(s[i]))&&(s[i]=[]),t(r,n,s[i],o)&&f.isArray(s[i])&&(s[i]=Qa(s[i])),!l)}if(f.isFormData(e)&&f.isFunction(e.entries)){const r={};return f.forEachEntry(e,(n,s)=>{t(Lu(n),s,r,0)}),Fu(r)}return null}const Za=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),Xt=(e,t)=>e!=null&&f.hasOwnProp(e,t)?e[t]:void 0;function Iu(e,t,r){if(f.isString(e))try{return(t||JSON.parse)(e),f.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Dr={transitional:js,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,o=f.isObject(t);if(o&&f.isHTMLForm(t)&&(t=new FormData(t)),f.isFormData(t))return s?JSON.stringify(Xa(t)):t;if(f.isArrayBuffer(t)||f.isBuffer(t)||f.isStream(t)||f.isFile(t)||f.isBlob(t)||f.isReadableStream(t))return t;if(f.isArrayBufferView(t))return t.buffer;if(f.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(o){const u=Xt(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return Du(t,u).toString();if((l=f.isFileList(t))||n.indexOf("multipart/form-data")>-1){const m=Xt(this,"env"),h=m&&m.FormData;return gn(l?{"files[]":t}:t,h&&new h,u)}}return o||s?(r.setContentType("application/json",!1),Iu(t)):t}],transformResponse:[function(t){const r=Xt(this,"transitional")||Dr.transitional,n=r&&r.forcedJSONParsing,s=Xt(this,"responseType"),o=s==="json";if(f.isResponse(t)||f.isReadableStream(t))return t;if(t&&f.isString(t)&&(n&&!s||o)){const l=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t,Xt(this,"parseReviver"))}catch(u){if(l)throw u.name==="SyntaxError"?P.from(u,P.ERR_BAD_RESPONSE,this,null,Xt(this,"response")):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Me.classes.FormData,Blob:Me.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(Za,e=>{Dr.headers[e]={}});function Vn(e,t){const r=this||Dr,n=t||r,s=Be.from(n.headers);let o=n.data;return f.forEach(e,function(l){o=l.call(r,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function ei(e){return!!(e&&e.__CANCEL__)}let Lr=class extends P{constructor(t,r,n){super(t??"canceled",P.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}};function ti(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new P("Request failed with status code "+r.status,r.status>=400&&r.status<500?P.ERR_BAD_REQUEST:P.ERR_BAD_RESPONSE,r.config,r.request,r))}const Mu=/[\t\n\r]/g;function ri(e){if(typeof e!="string")return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(Mu,"")}function Wn(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1].toLowerCase()||""}const Do=e=>{try{return decodeURIComponent(e)}catch{return e}},ni=Me.hasStandardBrowserEnv?{write(e,t,r,n,s,o,i){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];f.isNumber(r)&&l.push(`expires=${new Date(r).toUTCString()}`),f.isString(n)&&l.push(`path=${n}`),f.isString(s)&&l.push(`domain=${s}`),o===!0&&l.push("secure"),f.isString(i)&&l.push(`SameSite=${i}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie;if(!t)return null;const r=t.split(";");for(let n=0;n<r.length;n++){const s=r[n].replace(/^\s+/,""),o=s.indexOf("=");if(o!==-1&&s.slice(0,o)===e)return Do(s.slice(o+1))}return null},async readAsync(e){try{const t=typeof window<"u"&&window.cookieStore;if(t&&f.isFunction(t.get)){const r=await t.get(e);return r?Do(r.value):null}}catch{}return this.read(e)},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},async readAsync(){return null},remove(){}};function Uu(e,t){e=e||10;const r=new Array(e),n=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(u){const m=Date.now(),h=n[o];i||(i=m),r[s]=u,n[s]=m;let y=o,x=0;for(;y!==s;)x+=r[y++],y=y%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),m-i<t)return;const C=h&&m-h;return C?Math.round(x*1e3/C):void 0}}function $u(e,t){let r=0,n=1e3/t,s,o;const i=(h,y=Date.now())=>{r=y,s=null,o&&(clearTimeout(o),o=null),e(...h)};return[(...h)=>{const y=Date.now(),x=y-r;x>=n?i(h,y):(s=h,o||(o=setTimeout(()=>{o=null,i(s)},n-x)))},()=>s&&i(s),(...h)=>i(h)]}const ln=(e,t,r=3)=>{let n=0;const s=Uu(50,250);return $u(o=>{if(!o||!f.isNumber(o.loaded))return;const i=o.loaded,l=o.lengthComputable?o.total:void 0,u=Math.max(0,l!=null?Math.min(i,l):i),m=Math.max(0,u-n),h=s(m);n=Math.max(n,u);const y={loaded:u,total:l,progress:l?u/l:void 0,bytes:m,rate:h||void 0,estimated:h&&l?(l-u)/h:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(y)},r)},Lo=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Fo=(e,t=f.asap)=>(...r)=>t(()=>e(...r)),Bu=Me.hasStandardBrowserEnv?(e=>t=>(t=new URL(t,document.baseURI||Me.origin),e.protocol===t.protocol&&e.host===t.host&&e.port===t.port))(new URL(Me.origin)):()=>!0;function zu(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function qu(e,t){if(!t)return e;let r=e.length;for(;r>0&&e.charCodeAt(r-1)===47;)r--;return e.slice(0,r)+"/"+t.replace(/^\/+/,"")}const Vu=/^https?:(?!\/\/)/i;function Wu(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,r,n="")=>`${r}${n}${an}`)}function Hu(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${an}@`),r=t.indexOf("#"),s=(r===-1?t:t.slice(0,r)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${an}`);return r===-1?s:`${s}#${Wu(t.slice(r+1))}`}function Io(e,t){if(typeof e=="string"){const r=ri(e);if(Vu.test(r))throw new P(`Invalid URL ${JSON.stringify(Hu(r))}: missing "//" after protocol`,P.ERR_INVALID_URL,t)}}function si(e,t,r,n){Io(t,n);let s=!zu(t);return e&&(s||r===!1)?(Io(e,n),qu(e,t)):t}function Ku(e){const t=[{value:e}],r=new WeakSet,n=new WeakSet;for(;t.length;){const{value:s,done:o}=t.pop();if(!f.isPlainObject(s)&&!f.isArray(s))continue;if(o){r.delete(s);continue}if(r.has(s))throw new P("Circular reference detected in params",P.ERR_BAD_OPTION_VALUE);if(n.has(s))continue;n.add(s),r.add(s),t.push({value:s,done:!0});const i=Object.keys(s);Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor&&Object.getOwnPropertySymbols(s).forEach(l=>{const u=Object.getOwnPropertyDescriptor(s,l);u&&u.enumerable&&i.push(l)}),i.forEach(l=>{if(l==="__proto__"||l==="constructor"||l==="prototype"){const u=Object.getOwnPropertyDescriptor(s,l);u&&f.hasOwnProp(u,"value")&&t.push({value:u.value})}else t.push({value:s[l]})})}}const Mo=e=>e instanceof Be?{...e}:e,ms=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>{const r=Object.getOwnPropertyDescriptor(e,t);return r&&r.enumerable})):Object.keys(e);function Yu(e,t){const r=[],n=new WeakMap,s={};function o(l,u){if(!f.isPlainObject(u))return f.isArray(u)?u.slice():u;const m=f.isPlainObject(l)?l:s;let h=n.get(u);if(h||(h=new WeakMap,n.set(u,h)),h.has(m))return h.get(m);const y={};return h.set(m,y),r.push({base:m,source:u,result:y}),y}const i=f.isUndefined(t)?o(void 0,e):o(e,t);for(;r.length;){const{base:l,source:u,result:m}=r.pop(),h=new Set(ms(l)),y=new Set(ms(u));new Set([...h,...y]).forEach(C=>{if(C==="__proto__"||C==="constructor"||C==="prototype")return;const k=y.has(C),F=k?u[C]:void 0,T=(!k||f.isPlainObject(F))&&h.has(C)?l[C]:void 0;m[C]=k?o(T,F):o(void 0,T)})}return Ku(i),i}function Pt(e,t,r,n){return f.isPlainObject(e)&&f.isPlainObject(t)?f.merge.call({caseless:n},e,t):f.isPlainObject(t)?f.merge({},t):f.isArray(t)?t.slice():t}function oi(e,t,r,n){if(f.isUndefined(t)){if(!f.isUndefined(e))return Pt(void 0,e,r,n)}else return Pt(e,t,r,n)}function Hn(e,t){if(!f.isUndefined(t))return Pt(void 0,t)}function Ne(e,t){if(f.isUndefined(t)){if(!f.isUndefined(e))return Pt(void 0,e)}else return Pt(void 0,t)}function Ju(e,t,r){const n=f.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!f.isUndefined(n))if(f.isPlainObject(n)){if(f.hasOwnProp(n,r))return n[r]}else return;const s=f.hasOwnProp(e,"transitional")?e.transitional:void 0;if(f.isPlainObject(s)&&f.hasOwnProp(s,r))return s[r]}function ys(e,t,r,n,s){if(f.hasOwnProp(s,r))return Pt(e,t);if(f.hasOwnProp(n,r))return Pt(void 0,e)}function Qu(e,t,r){return oi(Mo(e),Mo(t),r,!0)}const Gu=Object.freeze({__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0}),Uo={url:Hn,method:Hn,data:Hn,baseURL:Ne,transformRequest:Ne,transformResponse:Ne,params:Yu,paramsSerializer:Ne,timeout:Ne,timeoutErrorMessage:Ne,withCredentials:Ne,withXSRFToken:Ne,adapter:Ne,responseType:Ne,xsrfCookieName:Ne,xsrfHeaderName:Ne,onUploadProgress:Ne,onDownloadProgress:Ne,decompress:Ne,maxContentLength:Ne,maxBodyLength:Ne,beforeRedirect:Ne,transport:Ne,httpAgent:Ne,httpsAgent:Ne,cancelToken:Ne,socketPath:Ne,allowedSocketPaths:Ne,responseEncoding:Ne,validateStatus:ys,headers:Qu};function qt(e,t){e=e||{},t=t||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",Gu);const n=ms({...e,...t});for(let s=0,o=n.length;s<o;s++){const i=n[s];if(i==="__proto__"||i==="constructor"||i==="prototype")continue;const l=f.hasOwnProp(Uo,i)?Uo[i]:oi,u=f.hasOwnProp(e,i)?e[i]:void 0,m=f.hasOwnProp(t,i)?t[i]:void 0,h=l===ys?l(u,m,i,e,t):l(u,m,i);f.isUndefined(h)&&l!==ys||(r[i]=h)}return f.hasOwnProp(t,"validateStatus")&&f.isUndefined(t.validateStatus)&&Ju(e,t,"validateStatusUndefinedResolves")===!1&&(f.hasOwnProp(e,"validateStatus")?r.validateStatus=Pt(void 0,e.validateStatus):delete r.validateStatus),r}const Xu=["content-type","content-length"];function Zu(e,t,r){if(r!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([n,s])=>{Xu.includes(n.toLowerCase())&&e.set(n,s)})}const $o=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16))),ef=e=>ni.read(e);function ai(e,t=ef){const r=qt({},e),n=C=>f.hasOwnProp(r,C)?r[C]:void 0,s=n("data");let o=n("withXSRFToken");const i=n("xsrfHeaderName"),l=n("xsrfCookieName");let u=n("headers");const m=n("auth"),h=n("baseURL"),y=n("allowAbsoluteUrls"),x=n("url");if(r.headers=u=Be.from(u),r.url=Ka(si(h,x,y,r),n("params"),n("paramsSerializer")),m){const C=f.getSafeProp(m,"username")||"",k=f.getSafeProp(m,"password")||"",F=n("transitional"),T=F&&f.hasOwnProp(F,"encodeBasicAuthUsername")&&F.encodeBasicAuthUsername===!0;try{u.set("Authorization","Basic "+btoa((T?$o(C):C)+":"+(k?$o(k):"")))}catch(B){throw P.from(B,P.ERR_BAD_OPTION_VALUE,e)}}if(f.isFormData(s)){const C=f.getSafeProp(s,"getHeaders");Me.hasStandardBrowserEnv||Me.hasStandardBrowserWebWorkerEnv||f.isReactNative(s)?u.setContentType(void 0):f.isFunction(C)&&Zu(u,C.call(s),n("formDataHeaderPolicy"))}if(Me.hasStandardBrowserEnv&&(f.isFunction(o)&&(o=o(r)),o===!0||o==null&&Bu(r.url))){const k=i&&l&&t(l);k&&u.set(i,k)}return r}const tf=typeof XMLHttpRequest<"u",rf=tf&&function(e){return new Promise(function(r,n){let s;try{const K=Me.hasStandardBrowserEnv&&typeof window<"u"&&window.cookieStore;s=K&&f.isFunction(K.get)}catch{}let o;const i=ai(e,s?K=>(o=K,null):void 0);let l=i.data;const u=Be.from(i.headers).normalize();let{responseType:m,onUploadProgress:h,onDownloadProgress:y}=i,x,C,k,F,T,B,S;function _(){clearTimeout(C);try{T&&T()}catch(K){setTimeout(()=>{throw K})}try{B&&B()}catch(K){setTimeout(()=>{throw K})}b&&(F&&b.removeEventListener("progress",F),b.upload&&(k&&b.upload.removeEventListener("progress",k),T&&b.upload.removeEventListener("loadend",T))),i.cancelToken&&i.cancelToken.unsubscribe(x),i.signal&&i.signal.removeEventListener("abort",x)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function L(K){if(!b)return;if(b.status===0&&(Wn(ri(i.url))||Wn(Me.origin))!=="file"&&!(b.responseURL&&b.responseURL.startsWith("file:"))){n(new P("Request aborted",P.ECONNABORTED,e,b)),_(),b=null;return}try{K?S&&S(K):B&&B()}catch(oe){setTimeout(()=>{throw oe})}if(!b)return;const se=Be.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),he={data:!m||m==="text"||m==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:se,config:e,request:b};ti(function(ue){r(ue),_()},function(ue){n(ue),_()},he),b=null}if("onloadend"in b?b.onloadend=L:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.startsWith("file:"))||setTimeout(L)},b.onabort=function(){b&&(n(new P("Request aborted",P.ECONNABORTED,e,b)),_(),b=null)},b.onerror=function(se){const J=se&&se.message?se.message:"Network Error",he=new P(J,P.ERR_NETWORK,e,b);he.event=se||null,n(he),_(),b=null},b.ontimeout=function(){if(!b)return;let se=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const J=i.transitional||js;i.timeoutErrorMessage&&(se=i.timeoutErrorMessage),n(new P(se,J.clarifyTimeoutError?P.ETIMEDOUT:P.ECONNABORTED,e,b)),_(),b=null},l===void 0&&u.setContentType(null),f.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),m&&m!=="json"&&(b.responseType=i.responseType),y&&([F,B,S]=ln(y,!0),b.addEventListener("progress",F)),h&&b.upload&&([k,T]=ln(h),b.upload.addEventListener("progress",k),b.upload.addEventListener("loadend",T)),i.cancelToken||i.signal){if(x=K=>{if(!b)return;n(!K||K.type?new Lr(null,e,b):K);const se=b;_(),b=null,se.abort()},i.cancelToken&&i.cancelToken.subscribe(x),!b)return;i.signal&&(i.signal.aborted?x():i.signal.addEventListener("abort",x))}if(!b)return;const z=Wn(i.url);if(z&&!Me.protocols.includes(z)){n(new P("Unsupported protocol "+z+":",P.ERR_BAD_REQUEST,e)),_();return}const V=()=>{b&&("setRequestHeader"in b&&f.forEach(za(u),function(se,J){b.setRequestHeader(J,se)}),b.send(l||null))};if(o){const K=typeof performance<"u"&&f.isFunction(performance.now)?()=>performance.now():Date.now,se=b.timeout>0?K()+Number(b.timeout):void 0,J=()=>{if(!b)return;const he=b;he.ontimeout(),he.abort()};if(se!==void 0){const he=()=>{const oe=se-K();oe>0?C=setTimeout(he,Math.min(oe,2147483647)):J()};he()}ni.readAsync(o).then(he=>{if(b){if(se!==void 0&&K()>=se){J();return}if(he){const oe=f.hasOwnProp(i,"xsrfHeaderName")&&i.xsrfHeaderName;u.set(oe,he)}V()}}).catch(he=>{b&&(n(P.from(he,null,e,b)),_(),b=null)})}else V()})},nf=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const r=new AbortController;let n=!1;const s=function(u){if(!n){n=!0,i();const m=u instanceof Error?u:this.reason;r.abort(m instanceof P?m:new Lr(m instanceof Error?m.message:m))}};let o=t&&setTimeout(()=>{o=null,s(new P(`timeout of ${t}ms exceeded`,P.ETIMEDOUT))},t);const i=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(u=>{const m=f.getSafeProp(u,"unsubscribe");f.isFunction(m)?m.call(u,s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>{if(!n){if(u.aborted){s.call(u);return}u.addEventListener("abort",s,{once:!0})}});const{signal:l}=r;return l.unsubscribe=()=>f.asap(i),l},sf=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,s;for(;n<r;)s=n+t,yield e.slice(n,s),n=s},of=async function*(e,t){for await(const r of af(e))yield*sf(r,t)},af=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Bo=(e,t,r,n)=>{const s=of(e,t);let o=0,i,l=u=>{i||(i=!0,n&&n(u))};return new ReadableStream({async pull(u){try{const{done:m,value:h}=await s.next();if(m){l(),u.close();return}let y=h.byteLength;if(r){let x=o+=y;r(x)}u.enqueue(new Uint8Array(h))}catch(m){throw l(m),m}},cancel(u){return l(u),s.return()}},{highWaterMark:2})},Rt=`\r
|
|
90
|
-
`,zo=e=>String(e).replace(/\r\n|\r|\n/g,Rt),qo=e=>String(e).replace(/[\r\n"]/g,t=>t==="\r"?"%0D":t===`
|
|
91
|
-
`?"%0A":"%22"),wr=(e,t)=>{let r=0;for(let n=0;n<e.length;n++){const s=e.charCodeAt(n);t&&(s===13||s===10)?(s===13&&e.charCodeAt(n+1)===10&&n++,r+=2):s<128?r++:s<2048?r+=2:s>=55296&&s<=56319&&e.charCodeAt(n+1)>=56320&&e.charCodeAt(n+1)<=57343?(r+=4,n++):r+=3}return r};class rn extends TypeError{constructor(t,r){super(t),this.name="FormDataError",this.reason=r}}function lf(e,t,r,n,s){if(!f.isFunction(t))throw new rn("Blob is not supported","blob");if(!f.isString(s)||!/^[A-Za-z0-9'()+_,./:=? -]{1,70}$/.test(s)||/ $/.test(s))throw new rn("Invalid multipart boundary","boundary");const o="--"+s+"--"+Rt;let i=o.length;const l=[],u=h=>{if(i+h>r)throw n()};u(0);for(const[h,y]of e){const x=f.isString(y),C=x?wr(y,!0):y.size;if(!Number.isFinite(C)||C<0)throw new rn("Unsupported FormData part size","part");u(C+wr(h,!0)+(!x&&y.name?wr(y.name,!1):0)+(!x&&y.type?wr(y.type,!1):0));let k="--"+s+Rt+'Content-Disposition: form-data; name="'+qo(zo(h))+'"';x||(k+='; filename="'+qo(f.isString(y.name)?y.name:"blob")+'"'+Rt+"Content-Type: "+String(y.type||"application/octet-stream").replace(/[\r\n]/g,"")),k+=Rt+Rt;const F=wr(k,!1)+C+Rt.length;u(F),i+=F,l.push({header:k,value:y,isString:x})}const m=[];for(const h of l)m.push(h.header,h.isString?zo(h.value):h.value,Rt);return m.push(o),new t(m,{type:"multipart/form-data; boundary="+s})}function cf(e,t,r,n,s){if(!f.isFunction(t))throw new P("Blob is not supported",P.ERR_NOT_SUPPORT);if(s===void 0)if(f.isFunction(Me.generateString))s="axios-"+Me.generateString(36,"0123456789abcdef");else{const o=f.global.crypto;if(!o||!f.isFunction(o.getRandomValues))throw new P("Random byte generation is not supported",P.ERR_NOT_SUPPORT);const i=new Uint8Array(18);o.getRandomValues(i),s="axios-"+Array.from(i,l=>("0"+l.toString(16)).slice(-2)).join("")}try{return lf(e,t,r,n,s)}catch(o){if(o instanceof rn){const i=o.reason==="boundary"?P.ERR_BAD_OPTION_VALUE:P.ERR_BAD_REQUEST;throw new P(o.message,i)}throw o}}const Vo=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,ii=(e,t,r)=>t+2<r&&Vo(e.charCodeAt(t+1))&&Vo(e.charCodeAt(t+2)),Wo=e=>e<=57?e-48:(e&223)-55,uf=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,ff=e=>e===9||e===10||e===12||e===13||e===32,df=e=>{const t=Math.floor(e/4),r=e%4;return t*3+(r===2?1:r===3?2:0)},pf=e=>{const t=e.length;let r=0;return t>0&&e.charCodeAt(t-1)===61&&(r++,t>1&&e.charCodeAt(t-2)===61&&r++),Math.floor((t-r)*3/4)},hf=e=>{const t=e.length;let r=0,n=0,s=!1;for(let o=0;o<t;o++){let i=e.charCodeAt(o);if(i===37&&ii(e,o,t)&&(i=Wo(e.charCodeAt(o+1))*16+Wo(e.charCodeAt(o+2)),o+=2),!ff(i)){if(i===61){n++;continue}if(!uf(i)||n>0){s=!0;continue}r++}}return s||n>2||n>0&&(r+n)%4!==0||r%4===1?pf(e):df(r)},mf=(e,t,r)=>{if(!e||typeof e!="string"||!/^data:/i.test(e))return 0;const n=e.indexOf(",");if(n<0)return 0;const s=e.slice(5,n),o=e.slice(n+1);if(r.test(s))return t(o);let l=0;for(let u=0,m=o.length;u<m;u++){const h=o.charCodeAt(u);if(h===37&&ii(o,u,m))l+=1,u+=2;else if(h<128)l+=1;else if(h<2048)l+=2;else if(h>=55296&&h<=56319&&u+1<m){const y=o.charCodeAt(u+1);y>=56320&&y<=57343?(l+=4,u++):l+=3}else l+=3}return l};function yf(e){const t=typeof e=="string"?e.indexOf("#"):-1;return mf(t===-1?e:e.slice(0,t),hf,/; *base64[\t\n\f\r ]*$/i)}const Ts="1.21.0",Ho=64*1024,Ko={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:Qr}=f,gf=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16))),Yo=e=>{if(!f.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Gr=(e,...t)=>{try{return!!e(...t)}catch{return!1}},vf=e=>{const t=e.indexOf("://");let r=e;return t!==-1&&(r=r.slice(t+3)),r.includes("@")||r.includes(":")},bf=e=>{const t=f.global!==void 0&&f.global!==null?f.global:globalThis,{ReadableStream:r,TextEncoder:n}=t;e=f.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response,Blob:t.Blob},e);const s=f.hasOwnProp(e,"fetch")?e.fetch:void 0,{Request:o,Response:i,Blob:l}=e,u=s?Qr(s):typeof fetch=="function",m=Qr(o),h=Qr(i);if(!u)return!1;const y=u&&Qr(r),x=u&&(typeof n=="function"?(_=>b=>_.encode(b))(new n):async _=>new Uint8Array(await new o(_).arrayBuffer())),C=m&&y&&Gr(()=>{let _=!1;const b=new o(Me.origin,{body:new r,method:"POST",get duplex(){return _=!0,"half"}}),L=b.headers.has("Content-Type");return b.body!=null&&b.body.cancel(),_&&!L}),k=h&&y&&Gr(()=>f.isReadableStream(new i("").body)),F=Object.assign(Object.create(null),Ko);m&&!Gr(()=>new o(Me.origin,F))&&(delete F.cache,Gr(()=>new o(Me.origin,F))||(F.cache=Ko.cache));const T={stream:k&&(_=>_.body)};u&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!T[_]&&(T[_]=(b,L)=>{let z=b&&b[_];if(z)return z.call(b);throw new P(`Response type '${_}' is not supported`,P.ERR_NOT_SUPPORT,L)})});const B=async _=>{if(_==null)return 0;if(f.isBlob(_))return _.size;if(f.isArrayBufferView(_)||f.isArrayBuffer(_))return _.byteLength;if(f.isURLSearchParams(_)&&(_=_+""),f.isString(_))return(await x(_)).byteLength},S=async(_,b)=>{const L=f.toFiniteNumber(_.getContentLength());return L??B(b)};return async _=>{let{url:b,method:L,data:z,signal:V,cancelToken:K,timeout:se,onDownloadProgress:J,onUploadProgress:he,responseType:oe,headers:ue,withCredentials:ie="same-origin",fetchOptions:ve,maxContentLength:we,maxBodyLength:U,maxRedirects:ze}=ai(_);const qe=f.isNumber(we)&&we>-1,te=f.isNumber(U)&&U>-1,g=H=>f.hasOwnProp(_,H)?_[H]:void 0;let N=s||fetch;oe=oe?(oe+"").toLowerCase():"text";let W=nf([V,K&&K.toAbortSignal()],se),$=null;const q=W&&W.unsubscribe&&(()=>{W.unsubscribe()});let Z,ae=null,fe=null;const le=()=>new P("Request body larger than maxBodyLength limit",P.ERR_BAD_REQUEST,_,$);try{let H;const Ve=g("auth");if(Ve){const X=f.getSafeProp(Ve,"username")||"",Pe=f.getSafeProp(Ve,"password")||"";H={username:X,password:Pe}}let O;if(vf(b)){if(O=new URL(b,Me.origin),!H&&(O.username||O.password)){const X=Yo(O.username),Pe=Yo(O.password);H={username:X,password:Pe}}(O.username||O.password)&&(O.username="",O.password="",b=O.href)}if(H&&(ue.delete("authorization"),ue.set("Authorization","Basic "+btoa(gf((H.username||"")+":"+(H.password||""))))),qe&&O&&O.protocol==="data:"&&yf(O.href)>we)throw new P("maxContentLength size of "+we+" exceeded",P.ERR_BAD_RESPONSE,_,$);const Q=f.isSpecCompliantForm(z)&&Be.from(g("headers")).getContentType();let me;if(f.isString(Q)&&/^multipart\/form-data(?:\s*;|$)/i.test(Q.trim())){const X=Be.parseParameters(Q);f.hasOwnProp(X,"boundary")&&(me=X.boundary)}if(f.isSpecCompliantForm(z)&&L!=="get"&&L!=="head"&&(te||he&&C||me!==void 0)&&(z=cf(z,l,te?U:1/0,le,me),ue.setContentType(me===void 0?z.type:Q),Z=z.size),te&&L!=="get"&&L!=="head"){const X=await B(z);if(typeof X=="number"&&isFinite(X)&&(Z=X,X>U))throw le()}const _e=te&&(f.isReadableStream(z)||f.isStream(z)),We=(X,Pe,it)=>Bo(X,Ho,ot=>{if(te&&ot>U)throw ae=le();Pe&&Pe(ot)},it);if(C&&L!=="get"&&L!=="head"&&(he||_e)){if(Z=Z??await S(ue,z),Z!==0||_e){let X=new o(b,{method:"POST",body:z,duplex:"half"}),Pe;if(f.isFormData(z)&&(Pe=X.headers.get("content-type"))&&ue.setContentType(Pe),X.body){const[it,ot]=he&&Lo(Z,ln(Fo(he)))||[];z=We(X.body,it,ot)}}}else if(_e&&!m&&y&&L!=="get"&&L!=="head")z=We(z);else if(_e&&m&&!C&&L!=="get"&&L!=="head")throw new P("Stream request bodies are not supported by the current fetch implementation",P.ERR_NOT_SUPPORT,_,$);f.isString(ie)||(ie=ie?"include":"omit");const et=m&&"credentials"in o.prototype;if(f.isFormData(z)){const X=ue.getContentType();X&&/^multipart\/form-data/i.test(X)&&!/boundary=/i.test(X)&&ue.delete("content-type")}ue.set("User-Agent","axios/"+Ts,!1);const He=ve==null?ve:Object.assign(Object.create(null),ve);He&&(delete He.body,delete He.headers,delete He.method,delete He.signal,delete He.duplex,delete He.credentials);const De=Object.assign(Object.create(null),He,{signal:W,method:L.toUpperCase(),headers:za(ue.normalize()),body:z,duplex:"half",credentials:et?ie:void 0});m&&(f.forEach(F,(X,Pe)=>{De[Pe]===void 0&&(De[Pe]=X)}),De.signal===void 0&&(De.signal=null),De.body===void 0&&(De.body=null)),ze===0&&(De.redirect="manual",He&&(He.redirect="manual")),$=m&&new o(b,De);let Le=await(m?N($,He):N(b,De));const ut=Be.from(Le.headers);if(qe){const X=f.toFiniteNumber(ut.getContentLength());if(X!=null&&X>we)throw new P("maxContentLength size of "+we+" exceeded",P.ERR_BAD_RESPONSE,_,$)}const ft=k&&(oe==="stream"||oe==="response");if(k&&Le.body&&(J||qe||ft&&q)){const X={};["status","statusText","headers"].forEach(dt=>{X[dt]=Le[dt]});const Pe=f.toFiniteNumber(ut.getContentLength()),[it,ot]=J&&Lo(Pe,ln(Fo(J),!0))||[];let Wt=0;const Ht=dt=>{if(qe&&(Wt=dt,Wt>we))throw fe=new P("maxContentLength size of "+we+" exceeded",P.ERR_BAD_RESPONSE,_,$);it&&it(dt)};Le=new i(Bo(Le.body,Ho,Ht,()=>{ot&&ot(),q&&q()}),X)}oe=oe||"text";let tt=await T[f.findKey(T,oe)||"text"](Le,_);if(qe&&!k&&!ft){let X;if(tt!=null&&(typeof tt.byteLength=="number"?X=tt.byteLength:typeof tt.size=="number"?X=tt.size:typeof tt=="string"&&(X=typeof n=="function"?new n().encode(tt).byteLength:tt.length)),typeof X=="number"&&X>we)throw new P("maxContentLength size of "+we+" exceeded",P.ERR_BAD_RESPONSE,_,$)}return!ft&&q&&q(),await new Promise((X,Pe)=>{ti(X,Pe,{data:tt,headers:Be.from(Le.headers),status:Le.status,statusText:Le.statusText,config:_,request:$})})}catch(H){if(q&&q(),W&&W.aborted&&W.reason instanceof P){const Ve=W.reason;throw Ve.config=_,$&&(Ve.request=$),H!==Ve&&Object.defineProperty(Ve,"cause",{__proto__:null,value:H,writable:!0,enumerable:!1,configurable:!0}),Ve}if(ae)throw $&&!ae.request&&(ae.request=$),ae;if(fe)throw fe;if(H instanceof P)throw $&&!H.request&&(H.request=$),H;if(H&&H.name==="TypeError"&&/Load failed|fetch/i.test(H.message)){const Ve=new P("Network Error",P.ERR_NETWORK,_,$,H&&H.response);throw Object.defineProperty(Ve,"cause",{__proto__:null,value:H.cause||H,writable:!0,enumerable:!1,configurable:!0}),Ve}throw P.from(H,H&&H.code,_,$,H&&H.response)}}},xf=new Map,li=e=>{const t=Object.create(null),r=e&&f.hasOwnProp(e,"env")&&e.env;["fetch","Request","Response","Blob"].forEach(C=>{r&&f.hasOwnProp(r,C)&&(t[C]=r[C])});const{fetch:n,Request:s,Response:o,Blob:i}=t,l=[s,o,n,i];let u=l.length,m=u,h,y,x=xf;for(;m--;)h=l[m],y=x.get(h),y===void 0&&x.set(h,y=m?new Map:bf(t)),x=y;return y};li();const As={http:Su,xhr:rf,fetch:{get:li}};f.forEach(As,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Jo=e=>`- ${e}`,Sf=e=>f.isFunction(e)||e===null||e===!1;function wf(e,t){e=f.isArray(e)?e:[e];const{length:r}=e;let n,s;const o={};for(let i=0;i<r;i++){n=e[i];let l;if(s=n,!Sf(n)&&(s=As[(l=String(n)).toLowerCase()],s===void 0))throw new P(`Unknown adapter '${l}'`);if(s&&(f.isFunction(s)||(s=s.get(t))))break;o[l||"#"+i]=s}if(!s){const i=Object.entries(o).map(([u,m])=>`adapter ${u} `+(m===!1?"is not supported by the environment":"is not available in the build"));let l=r?i.length>1?`since :
|
|
92
|
-
`+i.map(Jo).join(`
|
|
93
|
-
`):" "+Jo(i[0]):"as no adapter specified";throw new P("There is no suitable adapter to dispatch the request "+l,P.ERR_NOT_SUPPORT)}return s}const ci={getAdapter:wf,adapters:As};function Kn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Lr(null,e)}function Qo(e){return Math.max(0,Date.now()-e)}function Yn(e){const t=f.toSafeFlatObject(e);Kn(t),t.headers=Be.from(f.getSafeProp(t,"headers")),t.data=Vn.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1);const r=ci.getAdapter(t.adapter||Dr.adapter,t),n=Date.now();return r(t).then(function(o){Kn(t),o.duration=Qo(n),t.response=o;try{o.data=Vn.call(t,t.transformResponse,o)}finally{delete t.response}return o.headers=Be.from(o.headers),o},function(o){if(!ei(o)&&(Kn(t),o&&o.response)){o.response.duration=Qo(n),t.response=o.response;try{o.response.data=Vn.call(t,t.transformResponse,o.response)}finally{delete t.response}o.response.headers=Be.from(o.response.headers)}return Promise.reject(o)})}const vn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{vn[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Go={};vn.transitional=function(t,r,n){function s(o,i){return"[Axios v"+Ts+"] Transitional option '"+o+"'"+i+(n?". "+n:"")}return(o,i,l)=>{if(t===!1)throw new P(s(i," has been removed"+(r?" in "+r:"")),P.ERR_DEPRECATED);return r&&!Go[i]&&(Go[i]=!0,console.warn(s(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,i,l):!0}};vn.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function _f(e,t,r){if(typeof e!="object"||e===null)throw new P("options must be an object",P.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const o=n[s],i=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(i){const l=e[o],u=l===void 0||i(l,o,e);if(u!==!0)throw new P("option "+o+" must be "+u,P.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new P("Unknown option "+o,P.ERR_BAD_OPTION)}}const nn={assertOptions:_f,validators:vn},Ke=nn.validators,Jn=e=>{if(e==null||f.isPlainObject(e)||e instanceof Be)return!0;try{return f.isObject(e)&&f.getSafeProp(e,Symbol.toStringTag)==="AxiosHeaders"&&["toJSON","set","get","has","delete","clear","normalize","concat","toString",Symbol.iterator].every(t=>f.isFunction(f.getSafeProp(e,t)))}catch{return!1}};let $t=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ao,response:new Ao}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error)try{let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack;let i="";if(typeof o=="string"){const l=o.indexOf(`
|
|
94
|
-
`);i=l===-1?"":o.slice(l+1)}if(!n.stack)n.stack=i;else if(i){const l=i.indexOf(`
|
|
95
|
-
`),u=l===-1?-1:i.indexOf(`
|
|
96
|
-
`,l+1),m=u===-1?i:i.slice(u+1),h=String(n.stack),y=bu(n,h),x=y===-1?h:h.slice(0,y),C=y===-1?"":h.slice(y);x.endsWith(m)||(n.stack=x+`
|
|
97
|
-
`+i+C)}}catch{}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=qt(this.defaults,r);const{transitional:n,paramsSerializer:s,headers:o}=r;n!==void 0&&nn.assertOptions(n,{silentJSONParsing:Ke.transitional(Ke.boolean),forcedJSONParsing:Ke.transitional(Ke.boolean),clarifyTimeoutError:Ke.transitional(Ke.boolean),legacyInterceptorReqResOrdering:Ke.transitional(Ke.boolean),advertiseZstdAcceptEncoding:Ke.transitional(Ke.boolean),validateStatusUndefinedResolves:Ke.transitional(Ke.boolean),encodeBasicAuthUsername:Ke.transitional(Ke.boolean)},!1),s!=null&&(f.isFunction(s)?r.paramsSerializer={serialize:s}:nn.assertOptions(s,{encode:Ke.function,serialize:Ke.function},!0)),r.allowAbsoluteUrls!==void 0||(f.hasOwnProp(this.defaults,"allowAbsoluteUrls")&&this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),nn.assertOptions(r,{baseUrl:Ke.spelling("baseURL"),withXsrfToken:Ke.spelling("withXSRFToken")},!0),r.method=(f.getSafeProp(r,"method")||f.getSafeProp(this.defaults,"method")||"get").toLowerCase();const i=f.getSafeProp(o,"common"),l=f.getSafeProp(o,r.method),u=o&&f.merge(Jn(i)?i:void 0,Jn(l)?l:void 0);o&&f.forEach(Za.concat("common"),T=>{Jn(f.getSafeProp(o,T))&&delete o[T]}),r.headers=Be.concat(u,o);const m=[];let h=!0;this.interceptors.request.forEach(function(B){if(typeof B.runWhen=="function"&&B.runWhen(r)===!1)return;h=h&&B.synchronous;const S=r.transitional||js;S&&S.legacyInterceptorReqResOrdering?m.unshift(B.fulfilled,B.rejected):m.push(B.fulfilled,B.rejected)});const y=[];this.interceptors.response.forEach(function(B){y.push(B.fulfilled,B.rejected)});let x,C=0,k;if(!h){const T=[Yn.bind(this),void 0];for(T.unshift(...m),T.push(...y),k=T.length,x=Promise.resolve(r);C<k;)x=x.then(T[C++],T[C++]);return x}k=m.length;let F=r;for(;C<k;){const T=m[C++],B=m[C++];try{F=T?T(F):F}catch(S){if(!B){x=Promise.reject(S);break}try{const _=B.call(this,S);f.isThenable(_)&&(x=Promise.resolve(_).then(()=>Yn.call(this,F)))}catch(_){x=Promise.reject(_)}break}}if(!x)try{x=Yn.call(this,F)}catch(T){x=Promise.reject(T)}for(C=0,k=y.length;C<k;)x=x.then(y[C++],y[C++]);return x}getUri(t){t=qt(this.defaults,t);const r=si(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Ka(r,t.params,t.paramsSerializer)}};f.forEach(["delete","get","head","options"],function(t){$t.prototype[t]=async function(r,n){return this.request(qt(n||{},{method:t,url:r,data:n&&f.hasOwnProp(n,"data")?n.data:void 0}))}});f.forEach(["post","put","patch","query"],function(t){function r(n){return async function(o,i,l){return this.request(qt(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}$t.prototype[t]=r(),t!=="query"&&($t.prototype[t+"Form"]=r(!0))});let Rf=class ui{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(s=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](s);n._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(l=>{n.subscribe(l),o=l}).then(s);return i.cancel=function(){n.unsubscribe(o)},i},t(function(o,i,l){n.reason||(n.reason=new Lr(o,i,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new ui(function(s){t=s}),cancel:t}}};function Ef(e){return function(r){return e.apply(null,r)}}function Cf(e){return f.isObject(e)&&e.isAxiosError===!0}const sn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(sn).forEach(([e,t])=>{sn[t]===void 0&&(sn[t]=e)});function fi(e){const t=new $t(e),r=Da($t.prototype.request,t);return f.extend(r,$t.prototype,t,{allOwnKeys:!0}),f.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return fi(qt(e,s))},r}const be=fi(Dr);be.Axios=$t;be.CanceledError=Lr;be.CancelToken=Rf;be.isCancel=ei;be.VERSION=Ts;be.toFormData=gn;be.AxiosError=P;be.Cancel=be.CanceledError;be.all=function(t){return Promise.all(t)};be.spread=Ef;be.isAxiosError=Cf;be.mergeConfig=qt;be.AxiosHeaders=Be;be.formToJSON=e=>Xa(f.isHTMLForm(e)?new FormData(e):e);be.getAdapter=ci.getAdapter;be.HttpStatusCode=sn;be.default=be;const{Axios:ud,AxiosError:fd,CanceledError:dd,isCancel:pd,CancelToken:hd,VERSION:md,all:yd,Cancel:gd,isAxiosError:vd,spread:bd,toFormData:xd,AxiosHeaders:Sd,HttpStatusCode:wd,formToJSON:_d,getAdapter:Rd,mergeConfig:Ed,create:Cd}=be,Nf=void 0,Of=()=>({Authorization:`Bearer ${localStorage.getItem("zelisy_access_token")}`,"X-Organization-Id":localStorage.getItem("zelisy_org_id")??""});function di(e){const{data:t,isLoading:r,isError:n}=ir({queryKey:["table-config",e],queryFn:async()=>(await be.get(`${Nf}/tables/${e}/config`,{headers:Of()})).data,staleTime:3e5,gcTime:6e5,retry:2}),s=((t==null?void 0:t.columns)??[]).map(l=>({key:l.key,label:l.label,cellType:l.cellType??void 0,align:l.align??"left",width:l.width??void 0,minWidth:l.minWidth??void 0,maxWidth:l.maxWidth??void 0,sortable:l.sortable,hidden:l.hidden??!1,hideBelow:l.hideBelow??void 0,className:l.className??void 0,toggleable:l.toggleable??!0})),o=((t==null?void 0:t.tabs)??[]).map(l=>({key:l.key,label:l.label,count:l.count,icon:l.icon})),i=((t==null?void 0:t.controls)??[]).map(l=>({action:l.action,label:l.label,icon:l.icon,variant:l.variant,showOnSelection:l.showOnSelection??!1,disabled:l.disabled??!1,onClick:void 0}));return{columns:s,tabs:o,controls:i,defaultSortBy:(t==null?void 0:t.defaultSortBy)??"createdAt",defaultSortOrder:(t==null?void 0:t.defaultSortOrder)??"desc",defaultPageSize:(t==null?void 0:t.defaultPageSize)??50,tabFilterKey:(t==null?void 0:t.tabFilterKey)??void 0,isLoading:r,isError:n}}function pi(e){var qe;const{queryKey:t,fetchFn:r,pageSize:n=50,defaultSortBy:s="createdAt",defaultSortOrder:o="desc"}=e,i=dn(),[l,u]=E.useState(""),[m,h]=E.useState(s),[y,x]=E.useState(o),[C,k]=E.useState("All"),[F,T]=E.useState({}),B=E.useCallback(te=>({pageSize:n,...te?{cursor:te}:{},...l?{search:l}:{},...m?{sortBy:m}:{},...y?{sortOrder:y}:{},...C&&C!=="All"?{tab:C}:{},...F}),[n,l,m,y,C,F]),{data:S,isLoading:_,isFetchingNextPage:b,isRefetching:L,isError:z,fetchNextPage:V,hasNextPage:K,refetch:se}=ka({queryKey:[...t,l,m,y,C,F],queryFn:async({pageParam:te})=>{const g=await r(B(te));return Array.isArray(g)?{items:g,totalCount:g.length,pageSize:n,hasMore:!1,nextCursor:null}:g},getNextPageParam:te=>te.hasMore?te.nextCursor??void 0:void 0,initialPageParam:void 0,staleTime:3e4}),J=E.useMemo(()=>(S==null?void 0:S.pages.flatMap(te=>te.items))??[],[S]),he=((qe=S==null?void 0:S.pages[0])==null?void 0:qe.totalCount)??0,oe=K??!1,ue=E.useCallback(()=>{oe&&!b&&V()},[oe,b,V]),ie=E.useCallback((te,g)=>{h(te),x(g)},[]),ve=E.useCallback(te=>{k(te)},[]),we=E.useCallback((te,g)=>{T(N=>({...N,[te]:g}))},[]),U=E.useCallback((te,g)=>{i.setQueriesData({queryKey:[...t]},N=>N&&{...N,pages:N.pages.map(W=>({...W,items:W.items.map($=>$.id===te?g($):$)}))})},[i,t]),ze=E.useCallback(te=>{i.setQueriesData({queryKey:[...t]},g=>g&&{...g,pages:g.pages.map(N=>({...N,items:N.items.filter(W=>W.id!==te),totalCount:Math.max(0,(N.totalCount??1)-1)}))})},[i,t]);return{items:J,totalCount:he,hasMore:oe,isLoading:_,isFetchingNextPage:b,isRefetching:L,isError:z,refetch:se,search:l,setSearch:u,sortBy:m,sortOrder:y,setSortBy:h,setSortOrder:x,handleSort:ie,activeTab:C,setActiveTab:k,handleTabChange:ve,filters:F,updateFilter:we,loadMore:ue,optimisticUpdate:U,optimisticRemove:ze}}const Xr=void 0,yt=()=>({Authorization:`Bearer ${localStorage.getItem("zelisy_access_token")}`,"X-Organization-Id":localStorage.getItem("zelisy_org_id")??""}),lt={list:async e=>(await be.get("/JSON/surveys/GetSurveysQuery.json",{params:e,headers:yt()})).data.data,getNps:async(e=12)=>(await be.get("/JSON/surveys/GetNpsDataQuery.json",{params:{weeks:e},headers:yt()})).data.data,getById:async e=>(await lt.list({pageSize:1e3})).items.find(r=>r.id===e)??null,create:async e=>(await be.post(`${Xr}/surveys`,e,{headers:yt()})).data,delete:async e=>{await be.delete(`${Xr}/surveys/${e}`,{headers:yt()})},getResponses:async e=>(await be.get("/JSON/surveys/GetSurveyResponsesQuery.json",{params:e,headers:yt()})).data.data,getAnalytics:async()=>(await be.get("/JSON/surveys/GetSurveyAnalyticsQuery.json",{headers:yt()})).data.data,getTemplates:async()=>(await be.get("/JSON/surveys/GetSurveyTemplatesQuery.json",{headers:yt()})).data.data,useTemplate:async(e,t)=>(await be.post(`${Xr}/surveys/templates/${e}/use`,t,{headers:yt()})).data,getNpsTrend:async()=>(await be.get(`${Xr}/surveys/nps-trend`,{headers:yt()})).data},jf="_wrapper_80t4i_2",Pf="_statsgrid_80t4i_2",Tf="_cards_80t4i_18",Af="_split_80t4i_31",kf="_main_80t4i_37",Df="_detail_80t4i_42",$e={wrapper:jf,statsgrid:Pf,cards:Tf,split:Af,main:kf,detail:Df};function st({className:e="",children:t,...r}){return c.jsx("div",{className:`rounded-xl border border-[var(--th-border)] bg-[var(--th-surface)] ${e}`,...r,children:t})}const Xo={active:{dot:"bg-[#4edea3] animate-pulse",bg:"bg-[color:color-mix(in_srgb,var(--th-success)_10%,transparent)]",text:"text-[color:var(--th-success)]"},draft:{dot:"bg-[#ffcc6b]",bg:"bg-[color:color-mix(in_srgb,var(--th-warning-soft)_10%,transparent)]",text:"text-[color:var(--th-warning-soft)]"},closed:{dot:"bg-[#958da1]",bg:"bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)]",text:"text-[color:var(--th-text-3)]"}},hi=({row:e,isSelected:t,onSelect:r,onRowClick:n})=>{const s=e.target>0?Math.min(e.responses/e.target*100,100):0,o=Xo[e.status]??Xo.draft;return c.jsx("div",{role:"button",tabIndex:0,className:"h-full cursor-pointer",onClick:()=>n==null?void 0:n(e),onKeyDown:i=>i.key==="Enter"&&(n==null?void 0:n(e)),children:c.jsxs(st,{className:`group relative p-5 transition-all hover:border-[#7c3aed]/20 ${t?"border-[#7c3aed]/40 ring-1 ring-[#7c3aed]/20":""}`,children:[r&&c.jsx("button",{onClick:i=>{i.stopPropagation(),r(e.id)},className:`absolute top-3 right-3 w-5 h-5 rounded border flex items-center justify-center transition-all ${t?"bg-[#7c3aed] border-[#7c3aed]":"border-[color:color-mix(in_srgb,var(--th-ov-base)_10%,transparent)] opacity-0 group-hover:opacity-100"}`,children:t&&c.jsx(Re,{icon:"Check",size:11,className:"text-white"})}),c.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[c.jsx("span",{className:`w-2 h-2 rounded-full ${o.dot}`}),c.jsx("span",{className:`text-[9px] px-1.5 py-0.5 rounded font-medium capitalize ${o.bg} ${o.text}`,children:e.status}),e.npsScore!==null&&e.npsScore!==void 0&&c.jsxs("span",{className:`text-[9px] px-1.5 py-0.5 rounded font-bold ${e.npsScore>=70?"bg-[color:color-mix(in_srgb,var(--th-success)_10%,transparent)] text-[color:var(--th-success)]":"bg-[color:color-mix(in_srgb,var(--th-warning-soft)_10%,transparent)] text-[color:var(--th-warning-soft)]"}`,children:["NPS ",e.npsScore]})]}),c.jsx("h3",{className:"text-[14px] font-semibold text-white mb-1 truncate pr-6",children:e.name}),e.description&&c.jsx("p",{className:"text-[11px] text-[color:var(--th-text-3)] line-clamp-2 mb-3",children:e.description}),c.jsxs("div",{className:"mt-auto pt-3 border-t border-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)]",children:[c.jsxs("div",{className:"flex items-center justify-between text-[11px] mb-1.5",children:[c.jsx("span",{className:"text-[color:var(--th-text-3)]",children:"Responses"}),c.jsxs("span",{className:"text-[color:var(--th-text-1)] font-mono tabular-nums",children:[e.responses.toLocaleString()," / ",e.target.toLocaleString()]})]}),c.jsx("div",{className:"h-1.5 rounded-full bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] overflow-hidden",children:c.jsx("div",{className:`h-full rounded-full ${s>=80?"bg-[#4edea3]":"bg-[#7c3aed]"}`,style:{width:`${s}%`}})})]}),c.jsxs("div",{className:"flex items-center justify-between mt-3 text-[10px] text-[color:var(--th-text-3)]",children:[c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(Re,{icon:"HelpCircle",size:10})," ",e.questionCount," questions"]}),c.jsx("span",{children:e.createdByName})]})]})})};hi.displayName="SurveyGridCard";const Lf=[{key:"name",label:"Survey",cellType:"surveyName",sortable:!0,minWidth:260},{key:"status",label:"Status",cellType:"surveyStatus",sortable:!0,width:90,align:"center"},{key:"responses",label:"Responses",cellType:"responseProgress",sortable:!0,width:160},{key:"npsScore",label:"NPS Score",cellType:"npsScore",sortable:!0,width:110},{key:"questionCount",label:"Questions",sortable:!1,width:100},{key:"createdByName",label:"Created By",sortable:!1,width:160},{key:"updatedAt",label:"Updated",sortable:!0,width:130}],ks=()=>{var se;const e=lr(),t=di("surveys"),{items:r,totalCount:n,hasMore:s,isLoading:o,loadMore:i,handleSort:l,handleTabChange:u,sortBy:m,sortOrder:h,activeTab:y,optimisticRemove:x}=pi({queryKey:["surveys"],fetchFn:J=>lt.list(J),pageSize:t.defaultPageSize,defaultSortBy:t.defaultSortBy,defaultSortOrder:t.defaultSortOrder}),C=E.useMemo(()=>(r??[]).filter(J=>!!(J!=null&&J.id)),[r]),[k,F]=E.useState(new Set),[T,B]=E.useState(null),[S,_]=E.useState(!1),b=E.useCallback(async()=>{if(T){_(!0);try{await lt.delete(T.id),x(T.id),B(null)}finally{_(!1)}}},[T,x]),L=E.useCallback(()=>e("/app/all-surveys/create-survey"),[e]),z=E.useMemo(()=>(t.controls??[]).map(J=>({...J,onClick:()=>{J.action==="create"&&L()}})),[t.controls,L]),V=(se=t.columns)!=null&&se.length?t.columns:Lf,K=E.useMemo(()=>{const J=C.filter(ie=>ie.status==="active").length,he=C.reduce((ie,ve)=>ie+(ve.responses??0),0),oe=C.filter(ie=>ie.npsScore!==null&&ie.npsScore!==void 0),ue=oe.length?Math.round(oe.reduce((ie,ve)=>ie+(ve.npsScore??0),0)/oe.length):null;return{active:J,totalResp:he,avgNps:ue}},[C]);return c.jsxs("div",{className:$e.wrapper,children:[c.jsx(Vt,{title:"Surveys",subtitle:"Analytics · manage and track user surveys.",primaryText:"Create Survey",primaryIcon:"Plus",onPrimaryClick:L}),c.jsxs("div",{className:$e.statsgrid,children:[c.jsx(Ie,{icon:"ClipboardList",label:"Total surveys",value:n.toLocaleString(),trendDirection:"neutral",color:"#6366f1"}),c.jsx(Ie,{icon:"Activity",label:"Active",value:K.active.toLocaleString(),trendDirection:"neutral",color:"#10b981"}),c.jsx(Ie,{icon:"MessageSquare",label:"Total responses",value:K.totalResp.toLocaleString(),trendDirection:"neutral",color:"#7c3aed"}),c.jsx(Ie,{icon:"Star",label:"Avg NPS",value:K.avgNps??"—",trendDirection:"neutral",color:"#f59e0b"})]}),c.jsx(fn,{currentPage:"surveys",columns:V,data:C,totalCount:n,isLoading:t.isLoading||o,hasMore:s,onLoadMore:i,availableViews:["table","grid"],renderCard:J=>c.jsx(hi,{...J}),gridCols:{sm:1,md:2,lg:3},tabs:t.tabs,activeTab:y,onTabChange:u,controls:z,selectable:!0,selectedIds:k,onSelectionChange:F,sortBy:m,sortOrder:h,onSort:l,onEditRow:J=>e(`/app/surveys/${J.id}/edit`),onActionClick:J=>B(J),rowClickBehavior:{type:"navigate",path:J=>`/app/surveys/${J.id}`},height:"calc(100vh - 250px)",emptyMessage:"No surveys found.",stickyHeader:!0}),c.jsx(wl,{open:!!T,onClose:()=>B(null),onConfirm:b,isLoading:S,title:"Delete Survey",description:c.jsxs(c.Fragment,{children:["Delete ",c.jsx("strong",{className:"text-white",children:T==null?void 0:T.name})," and all"," ",(T==null?void 0:T.responses)??0," responses?"]}),confirmLabel:"Delete Survey",confirmTone:"danger",requireConfirmText:T==null?void 0:T.name})]})};ks.displayName="AllSurveys";const Ff=Object.freeze(Object.defineProperty({__proto__:null,AllSurveys:ks},Symbol.toStringTag,{value:"Module"})),If={nps:"bg-[color:color-mix(in_srgb,var(--th-success)_10%,transparent)] text-[color:var(--th-success)]",rating:"bg-[#7c3aed]/10 text-[color:var(--th-accent-soft)]",multiple_choice:"bg-[color:color-mix(in_srgb,var(--th-warning-soft)_10%,transparent)] text-[color:var(--th-warning-soft)]",open_text:"bg-[color:color-mix(in_srgb,var(--th-info-soft)_10%,transparent)] text-[color:var(--th-info-soft)]"},Ds=()=>{const e=lr(),[t,r]=E.useState(""),[n,s]=E.useState(""),[o,i]=E.useState(500),[l,u]=E.useState([{id:"q1",type:"nps",text:"How likely are you to recommend Zelisy?",required:!0,options:[]},{id:"q2",type:"rating",text:"How satisfied are you with the product?",required:!0,options:[]},{id:"q3",type:"multiple_choice",text:"Which feature do you use most?",required:!1,options:["Feature Flags","Experiments","Segments","Audit Log"]}]),[m,h]=E.useState(!1),[y,x]=E.useState(!1),[C,k]=E.useState({}),F=S=>u(_=>[..._,{id:`q${Date.now()}`,type:S,text:"",required:!1,options:S==="multiple_choice"?["Option 1","Option 2"]:[]}]),T=(S,_)=>u(b=>b.map(L=>L.id===S?{...L,..._}:L)),B=E.useCallback(async()=>{const S={};if(t.trim()||(S.name="Required"),l.length===0&&(S.questions="Add at least one question"),l.forEach((_,b)=>{_.text.trim()||(S[`q${b}`]=`Q${b+1} text required`)}),k(S),!Object.keys(S).length){h(!0);try{await lt.create({name:t.trim(),description:n.trim()||void 0,targetResponses:o,questions:l.map(_=>({type:_.type,question:_.text.trim(),required:_.required,options:_.options.length?_.options:void 0}))}),x(!0)}catch(_){_!=null&&_.errors&&k(_.errors)}finally{h(!1)}}},[t,n,o,l]);return y?c.jsx("div",{className:"p-6 lg:p-8 max-w-[900px] mx-auto",children:c.jsxs(st,{className:"p-12 text-center",children:[c.jsx("div",{className:"w-16 h-16 rounded-2xl bg-[color:color-mix(in_srgb,var(--th-success)_15%,transparent)] flex items-center justify-center mx-auto mb-6 glow-success",children:c.jsx(Re,{icon:"Check",size:32,className:"text-[color:var(--th-success)]"})}),c.jsx("h2",{className:"text-[24px] font-bold text-white mb-2",children:"Survey Created!"}),c.jsx("p",{className:"text-[14px] text-[color:var(--th-text-3)] mb-6",children:"Your survey is now live and collecting responses."}),c.jsx("button",{onClick:()=>e("/app/surveys"),className:"px-5 py-2.5 rounded-lg bg-[#7c3aed] hover:bg-[#8b4df0] text-white text-[13px] font-medium transition-colors",children:"View All Surveys"})]})}):c.jsxs("div",{className:"p-6 lg:p-8 max-w-[900px]",children:[c.jsxs("button",{onClick:()=>e(-1),className:"flex items-center gap-1.5 text-[13px] text-[color:var(--th-text-3)] hover:text-[color:var(--th-text-2)] transition-colors mb-6",children:[c.jsx(Re,{icon:"ArrowLeft",size:15})," Back"]}),c.jsx(Vt,{title:"Create Survey",subtitle:"analytics · build a new survey"}),c.jsxs("div",{className:"space-y-6",children:[c.jsxs(st,{className:"p-6 space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-[12px] text-[color:var(--th-text-3)] mb-1.5",children:"Survey Name"}),c.jsx("input",{value:t,onChange:S=>r(S.target.value),placeholder:"e.g. Q1 Product Satisfaction",className:`w-full px-3.5 py-2.5 rounded-lg bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] border text-[13px] text-[color:var(--th-text-1)] placeholder:text-[color:color-mix(in_srgb,var(--th-text-3)_60%,transparent)] focus:border-[#7c3aed] outline-none transition-colors ${C.name?"border-[color:var(--th-danger-soft)]":"border-[color:color-mix(in_srgb,var(--th-ov-base)_8%,transparent)]"}`}),C.name&&c.jsx("p",{className:"text-[11px] text-[color:var(--th-danger-soft)] mt-1",children:C.name})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-[12px] text-[color:var(--th-text-3)] mb-1.5",children:"Description"}),c.jsx("textarea",{value:n,onChange:S=>s(S.target.value),placeholder:"What is this survey about?",rows:2,className:"w-full px-3.5 py-2.5 rounded-lg bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] border border-[color:color-mix(in_srgb,var(--th-ov-base)_8%,transparent)] text-[13px] text-[color:var(--th-text-1)] placeholder:text-[color:color-mix(in_srgb,var(--th-text-3)_60%,transparent)] focus:border-[#7c3aed] outline-none transition-colors resize-none"})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-[12px] text-[color:var(--th-text-3)] mb-1.5",children:"Target Responses"}),c.jsx("input",{type:"number",value:o,onChange:S=>i(parseInt(S.target.value,10)||0),className:"w-32 px-3.5 py-2.5 rounded-lg bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] border border-[color:color-mix(in_srgb,var(--th-ov-base)_8%,transparent)] text-[13px] text-[color:var(--th-text-1)] font-mono focus:border-[#7c3aed] outline-none transition-colors"})]})]}),c.jsxs(st,{className:"p-6",children:[c.jsxs("h2",{className:"text-[15px] font-semibold text-white mb-4",children:["Questions (",l.length,")"]}),c.jsx("div",{className:"space-y-3",children:l.map((S,_)=>c.jsxs("div",{className:"p-4 rounded-lg bg-[color:color-mix(in_srgb,var(--th-ov-base)_2%,transparent)] border border-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] group",children:[c.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[c.jsx(Re,{icon:"GripVertical",size:14,className:"text-[color:color-mix(in_srgb,var(--th-text-3)_30%,transparent)] cursor-grab"}),c.jsxs("span",{className:"text-[12px] font-semibold text-[color:var(--th-text-3)]",children:["Q",_+1]}),c.jsx("span",{className:`text-[10px] px-2 py-0.5 rounded font-medium ${If[S.type]}`,children:S.type.replace("_"," ")}),S.required&&c.jsx("span",{className:"text-[10px] text-[color:var(--th-warning-soft)]",children:"required"}),c.jsx("div",{className:"flex-1"}),c.jsx("button",{onClick:()=>T(S.id,{required:!S.required}),className:`text-[10px] px-2 py-0.5 rounded transition-colors ${S.required?"bg-[color:color-mix(in_srgb,var(--th-warning-soft)_10%,transparent)] text-[color:var(--th-warning-soft)]":"bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] text-[color:var(--th-text-3)]"}`,children:S.required?"Required":"Optional"}),c.jsx("button",{onClick:()=>u(b=>b.filter(L=>L.id!==S.id)),className:"text-[color:var(--th-text-3)] hover:text-[color:var(--th-danger-soft)] transition-colors",children:c.jsx(Re,{icon:"Trash2",size:13})})]}),c.jsx("input",{value:S.text,onChange:b=>T(S.id,{text:b.target.value}),placeholder:"Enter your question...",className:`w-full px-3 py-2 rounded-lg bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] border text-[13px] text-[color:var(--th-text-1)] placeholder:text-[color:color-mix(in_srgb,var(--th-text-3)_60%,transparent)] focus:border-[#7c3aed] outline-none transition-colors ${C[`q${_}`]?"border-[color:var(--th-danger-soft)]":"border-[color:color-mix(in_srgb,var(--th-ov-base)_8%,transparent)]"}`}),S.options.length>0&&c.jsxs("div",{className:"mt-2 space-y-1.5",children:[S.options.map((b,L)=>c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("span",{className:"text-[10px] text-[color:var(--th-text-3)]",children:"•"}),c.jsx("input",{value:b,onChange:z=>{const V=[...S.options];V[L]=z.target.value,T(S.id,{options:V})},className:"flex-1 px-2 py-1 rounded bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] border border-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] text-[12px] text-[color:var(--th-text-2)] focus:border-[#7c3aed] outline-none"})]},L)),c.jsx("button",{onClick:()=>T(S.id,{options:[...S.options,`Option ${S.options.length+1}`]}),className:"text-[10px] text-[#7c3aed] hover:text-[#8b4df0] mt-1",children:"+ Add option"})]})]},S.id))}),c.jsx("div",{className:"mt-4 flex items-center gap-2",children:["nps","rating","multiple_choice","open_text"].map(S=>c.jsxs("button",{onClick:()=>F(S),className:"px-3 py-1.5 rounded-lg bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] hover:bg-[color:color-mix(in_srgb,var(--th-ov-base)_8%,transparent)] text-[11px] text-[color:var(--th-text-3)] transition-colors",children:["+"," ",S.replace("_"," ").replace(/\b\w/g,_=>_.toUpperCase())]},S))})]}),c.jsxs("div",{className:"flex items-center justify-end gap-3",children:[c.jsx("button",{onClick:()=>e(-1),className:"px-5 py-2.5 rounded-lg bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] hover:bg-[color:color-mix(in_srgb,var(--th-ov-base)_8%,transparent)] text-[color:var(--th-text-3)] text-[13px] font-medium transition-colors",children:"Cancel"}),c.jsxs("button",{onClick:B,disabled:m||!t.trim(),className:"px-6 py-2.5 rounded-lg bg-[#7c3aed] hover:bg-[#8b4df0] disabled:opacity-40 text-white text-[13px] font-medium transition-colors flex items-center gap-2",children:[m&&c.jsx(Re,{icon:"Loader2",size:13,className:"animate-spin"}),"Create Survey"]})]})]})]})};Ds.displayName="CreateSurvey";const Mf=Object.freeze(Object.defineProperty({__proto__:null,CreateSurvey:Ds},Symbol.toStringTag,{value:"Module"}));function Ls(e=50){var s,o;const t=ka({queryKey:["survey-responses"],queryFn:({pageParam:i})=>lt.getResponses({cursor:i,pageSize:e}),getNextPageParam:i=>i!=null&&i.hasMore?i.nextCursor??void 0:void 0,initialPageParam:void 0,staleTime:3e4}),r=E.useMemo(()=>{var i;return(((i=t.data)==null?void 0:i.pages)??[]).flatMap(l=>Array.isArray(l==null?void 0:l.items)?l.items:[]).filter(l=>!!(l!=null&&l.id))},[t.data]),n=((o=(s=t.data)==null?void 0:s.pages[0])==null?void 0:o.totalCount)??r.length;return{items:r,totalCount:n,isLoading:t.isLoading,isError:t.isError,hasMore:t.hasNextPage??!1,loadMore:()=>{t.hasNextPage&&!t.isFetchingNextPage&&t.fetchNextPage()}}}const Zt=e=>Date.parse(e.createdAt)||0,Zo=e=>e==="asc"?1:-1,Uf=["promoter","passive","detractor"],mi={placeholder:"Search by user, survey, response…",keys:["userId","surveyName","responseText"],debounceMs:150},yi={defaultId:"newest",options:[{id:"newest",label:"Date: Newest first",comparator:(e,t)=>Zt(t)-Zt(e)},{id:"oldest",label:"Date: Oldest first",comparator:(e,t)=>Zt(e)-Zt(t)},{id:"nps-high",label:"NPS: High → Low",comparator:(e,t)=>(t.npsScore??-1)-(e.npsScore??-1)},{id:"nps-low",label:"NPS: Low → High",comparator:(e,t)=>(e.npsScore??99)-(t.npsScore??99)}]},$f=e=>[{id:"survey",label:"Survey",options:[{value:"all",label:"All surveys"},...e.map(t=>({value:t,label:t}))],defaultValue:"all",predicate:(t,r)=>t.surveyName===r},{id:"category",label:"NPS category",options:[{value:"all",label:"All categories"},...Uf.map(t=>({value:t,label:t}))],defaultValue:"all",predicate:(t,r)=>t.npsCategory===r}],gi=[{key:"userId",label:"User",cellType:"responseUser",sortable:!0,minWidth:200},{key:"surveyName",label:"Survey",sortable:!0,minWidth:200},{key:"npsScore",label:"NPS",cellType:"npsScore",sortable:!0,width:90,sortFn:(e,t,r)=>((e.npsScore??-1)-(t.npsScore??-1))*Zo(r)},{key:"npsCategory",label:"Category",cellType:"responseNpsCategory",sortable:!0,width:130},{key:"rating",label:"Rating",cellType:"responseRating",sortable:!0,width:120},{key:"responseText",label:"Response",cellType:"responseText",minWidth:260},{key:"createdAt",label:"Date",sortable:!0,align:"right",width:130,sortFn:(e,t,r)=>(Zt(e)-Zt(t))*Zo(r)}],Bf=gi.filter(e=>e.key!=="surveyName"),zf={...mi,placeholder:"Search by user, response…",keys:["userId","responseText"]},Qn=e=>{if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?"—":t.toLocaleDateString(void 0,{day:"2-digit",month:"short",year:"numeric"})},qf={active:"text-[color:var(--th-success)]",draft:"text-[color:var(--th-warning-soft)]",paused:"text-[color:var(--th-warning-soft)]",closed:"text-[color:var(--th-text-3)]"},Fs=()=>{const e=lr(),{surveyId:t}=da(),{data:r,isLoading:n}=ir({queryKey:["survey",t],queryFn:()=>lt.getById(t),enabled:!!t,staleTime:120*1e3}),{data:s}=ir({queryKey:["survey-analytics"],queryFn:lt.getAnalytics,staleTime:120*1e3}),o=E.useMemo(()=>(Array.isArray(s)?s:[]).find(x=>x.surveyId===t),[s,t]),i=Ls(),l=E.useMemo(()=>i.items.filter(x=>x.surveyId===t),[i.items,t]),u=()=>e("/app/all-surveys"),m=c.jsxs("button",{type:"button",onClick:u,className:"flex w-fit cursor-pointer items-center gap-1.5 text-[13px] text-[color:var(--th-text-3)] transition-colors hover:text-[color:var(--th-text-2)]",children:[c.jsx(Re,{icon:"ArrowLeft",size:15})," Back to surveys"]});if(n)return c.jsxs("div",{className:$e.wrapper,children:[m,c.jsx("p",{className:"text-[13px] text-[color:var(--th-text-3)]",children:"Loading survey…"})]});if(!r)return c.jsxs("div",{className:$e.wrapper,children:[m,c.jsx(st,{className:"p-8 text-center text-[13px] text-[color:var(--th-text-3)]",children:"Survey not found."})]});const h=r.target>0?Math.min(Math.round(r.responses/r.target*100),100):0,y=[["Created by",r.createdByName||"—"],["Created",Qn(r.createdAt)],["Last updated",Qn(r.updatedAt)],["Ends",Qn(r.endsAt)]];return c.jsxs("div",{className:$e.wrapper,children:[m,c.jsx(Vt,{title:r.name,subtitle:r.description||"Survey details",primaryText:"View Analytics",primaryIcon:"BarChart3",onPrimaryClick:()=>e(`/app/survey-analytics/${r.id}`)}),c.jsxs("div",{className:$e.statsgrid,children:[c.jsx(Ie,{icon:"Activity",label:"Status",value:r.status.charAt(0).toUpperCase()+r.status.slice(1),trendDirection:"neutral",color:"#10b981"}),c.jsx(Ie,{icon:"MessageSquare",label:"Responses",value:r.responses.toLocaleString(),trendDirection:"neutral",color:"#7c3aed"}),c.jsx(Ie,{icon:"Star",label:"NPS score",value:r.npsScore??"—",trendDirection:"neutral",color:"#f59e0b"}),c.jsx(Ie,{icon:"HelpCircle",label:"Questions",value:r.questionCount.toLocaleString(),trendDirection:"neutral",color:"#6366f1"})]}),c.jsxs("div",{className:$e.cards,children:[c.jsxs(st,{className:"p-5",children:[c.jsx("h2",{className:"mb-4 text-[14px] font-semibold text-white",children:"Overview"}),c.jsxs("div",{className:"mb-1.5 flex items-center justify-between text-[12px]",children:[c.jsx("span",{className:"text-[color:var(--th-text-3)]",children:"Response progress"}),c.jsxs("span",{className:"font-mono tabular-nums text-[color:var(--th-text-1)]",children:[r.responses.toLocaleString()," / ",r.target.toLocaleString()," (",h,"%)"]})]}),c.jsx("div",{className:"mb-5 h-1.5 overflow-hidden rounded-full bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)]",children:c.jsx("div",{className:`h-full rounded-full ${h>=80?"bg-[#4edea3]":"bg-[#7c3aed]"}`,style:{width:`${h}%`}})}),c.jsxs("dl",{className:"space-y-2.5 text-[12.5px]",children:[c.jsxs("div",{className:"flex justify-between gap-3",children:[c.jsx("dt",{className:"text-[color:var(--th-text-3)]",children:"Status"}),c.jsx("dd",{className:`capitalize ${qf[r.status]??""}`,children:r.status})]}),y.map(([x,C])=>c.jsxs("div",{className:"flex justify-between gap-3",children:[c.jsx("dt",{className:"text-[color:var(--th-text-3)]",children:x}),c.jsx("dd",{className:"text-right text-[color:var(--th-text-2)]",children:C})]},x))]})]}),o&&c.jsxs(st,{className:"p-5",children:[c.jsx("h2",{className:"mb-4 text-[14px] font-semibold text-white",children:"Insights"}),c.jsx("dl",{className:"space-y-2.5 text-[12.5px]",children:[["Completion rate",`${o.completionRate??0}%`],["Avg completion time",o.avgCompletionTime??"—"],["Avg rating",(o.averageRating??0).toFixed(1)],["Top theme",o.topTheme??"—"],["Needs improvement",o.bottomTheme??"—"]].map(([x,C])=>c.jsxs("div",{className:"flex justify-between gap-3",children:[c.jsx("dt",{className:"text-[color:var(--th-text-3)]",children:x}),c.jsx("dd",{className:"text-right font-mono text-[color:var(--th-text-2)]",children:C})]},x))})]})]}),c.jsxs("h2",{className:"text-[14px] font-semibold text-white",children:["Responses (",l.length.toLocaleString(),")"]}),c.jsx(fn,{currentPage:"survey-details-responses",columns:Bf,data:l,totalCount:l.length,isLoading:i.isLoading,hasMore:i.hasMore,onLoadMore:i.loadMore,searchConfig:zf,sortConfig:yi,rowHeight:64,stickyHeader:!0,emptyMessage:"No responses for this survey yet."})]})};Fs.displayName="SurveyDetails";const Vf=Object.freeze(Object.defineProperty({__proto__:null,SurveyDetails:Fs},Symbol.toStringTag,{value:"Module"})),Wf={Product:"bg-[#7c3aed]/10 text-[color:var(--th-accent-soft)]",Loyalty:"bg-[color:color-mix(in_srgb,var(--th-success)_10%,transparent)] text-[color:var(--th-success)]",UX:"bg-[color:color-mix(in_srgb,var(--th-info-soft)_10%,transparent)] text-[color:var(--th-info-soft)]",Retention:"bg-[color:color-mix(in_srgb,var(--th-warning-soft)_10%,transparent)] text-[color:var(--th-warning-soft)]",Revenue:"bg-[color:color-mix(in_srgb,var(--th-danger-soft)_10%,transparent)] text-[color:var(--th-danger-soft)]"},Hf=({template:e,onClose:t})=>{const r=lr(),n=dn(),[s,o]=E.useState(e.name),[i,l]=E.useState(500),u=sc({mutationFn:()=>lt.useTemplate(e.id,{name:s,targetResponses:i}),onSuccess:()=>{n.invalidateQueries({queryKey:["surveys"]}),t(),r("/analytics/surveys")}}),m=h=>{h.target===h.currentTarget&&t()};return c.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",onClick:m,children:[c.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),c.jsxs(st,{className:"relative p-8 w-full max-w-md mx-4 shadow-2xl",children:[c.jsx("button",{onClick:t,className:`absolute top-4 right-4 p-1.5 rounded-lg hover:bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)]\r
|
|
98
|
-
text-[color:var(--th-text-3)] hover:text-[color:var(--th-text-1)] transition-colors`,children:c.jsx(Re,{icon:"X",size:16})}),c.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[c.jsx("div",{className:"w-10 h-10 rounded-xl bg-[#7c3aed]/20 flex items-center justify-center",children:c.jsx(Re,{icon:"ClipboardCopy",size:18,className:"text-[color:var(--th-accent-soft)]"})}),c.jsxs("div",{children:[c.jsx("h2",{className:"text-[16px] font-semibold text-white",children:"Use Template"}),c.jsx("p",{className:"text-[12px] text-[color:var(--th-text-3)]",children:e.name})]})]}),c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx("label",{className:"block text-[12px] text-[color:var(--th-text-3)] mb-1.5",children:"Survey Name"}),c.jsx("input",{value:s,onChange:h=>o(h.target.value),placeholder:"My survey",className:`w-full px-3.5 py-2.5 rounded-lg bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] border border-[color:color-mix(in_srgb,var(--th-ov-base)_8%,transparent)]\r
|
|
99
|
-
text-[13px] text-[color:var(--th-text-1)] placeholder:text-[color:color-mix(in_srgb,var(--th-text-3)_60%,transparent)]\r
|
|
100
|
-
focus:border-[#7c3aed] outline-none transition-colors`})]}),c.jsxs("div",{children:[c.jsx("label",{className:"block text-[12px] text-[color:var(--th-text-3)] mb-1.5",children:"Target Responses"}),c.jsx("input",{type:"number",value:i,onChange:h=>l(parseInt(h.target.value)||500),className:`w-full px-3.5 py-2.5 rounded-lg bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] border border-[color:color-mix(in_srgb,var(--th-ov-base)_8%,transparent)]\r
|
|
101
|
-
text-[13px] text-[color:var(--th-text-1)]\r
|
|
102
|
-
focus:border-[#7c3aed] outline-none transition-colors`})]})]}),c.jsxs("div",{className:"flex gap-3 mt-6",children:[c.jsx("button",{onClick:t,className:`flex-1 py-2.5 rounded-lg bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] hover:bg-[color:color-mix(in_srgb,var(--th-ov-base)_10%,transparent)]\r
|
|
103
|
-
text-[color:var(--th-text-3)] text-[13px] font-medium transition-colors`,children:"Cancel"}),c.jsxs("button",{onClick:()=>u.mutate(),disabled:!s.trim()||u.isPending,className:`flex-1 py-2.5 rounded-lg bg-[#7c3aed] hover:bg-[#8b4df0]\r
|
|
104
|
-
disabled:opacity-40 text-white text-[13px] font-medium\r
|
|
105
|
-
transition-colors flex items-center justify-center gap-2`,children:[u.isPending&&c.jsx(Re,{icon:"Loader2",size:14,className:"animate-spin"}),u.isPending?"Creating…":"Create Survey"]})]})]})]})},Kf=({t:e,onUse:t})=>c.jsxs(st,{className:"p-5 hover:border-[#7c3aed]/30 transition-all group",children:[c.jsxs("div",{className:"flex items-start justify-between mb-3",children:[c.jsxs("div",{className:"flex-1 min-w-0 pr-3",children:[c.jsx("h3",{className:"text-[14px] font-semibold text-white group-hover:text-[color:var(--th-accent-soft)] transition-colors",children:e.name}),c.jsx("p",{className:"text-[12px] text-[color:var(--th-text-3)] mt-1 leading-relaxed",children:e.description})]}),e.isSystem&&c.jsx("span",{className:`shrink-0 text-[9px] px-1.5 py-0.5 rounded\r
|
|
106
|
-
bg-[#7c3aed]/20 text-[color:var(--th-accent-soft)] font-medium`,children:"OFFICIAL"})]}),c.jsxs("div",{className:"flex items-center gap-3 mb-5 text-[11px] text-[color:var(--th-text-3)]",children:[c.jsxs("span",{className:"flex items-center gap-1",children:[c.jsx(Re,{icon:"FileText",size:11}),e.questionCount??0," questions"]}),e.category&&c.jsx("span",{className:`px-2 py-0.5 rounded text-[10px] font-medium ${Wf[e.category]??"bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] text-[color:var(--th-text-3)]"}`,children:e.category})]}),c.jsxs("button",{onClick:()=>t(e),className:`flex items-center gap-2 px-4 py-2 rounded-lg\r
|
|
107
|
-
bg-[#7c3aed] hover:bg-[#8b4df0]\r
|
|
108
|
-
text-white text-[12px] font-medium transition-colors`,children:[c.jsx(Re,{icon:"ClipboardCopy",size:12}),"Use Template"]})]}),Yf=()=>c.jsx("div",{className:$e.cards,children:Array.from({length:6}).map((e,t)=>c.jsx(st,{className:"p-5 animate-pulse h-44",children:null},t))}),vi=()=>{const[e,t]=E.useState(null),[r,n]=E.useState(null),{data:s,isLoading:o,isError:i,refetch:l}=ir({queryKey:["survey-templates"],queryFn:lt.getTemplates,staleTime:300*1e3}),u=Array.isArray(s)?s.filter(y=>!!(y!=null&&y.id)):[],m=[...new Set(u.map(y=>y.category).filter(Boolean))],h=e?u.filter(y=>y.category===e):u;return c.jsxs("div",{className:$e.wrapper,children:[c.jsx(Vt,{title:"Survey Templates",subtitle:"Analytics · pre-built templates to get started quickly"}),c.jsx("div",{className:"flex flex-wrap gap-2",children:["All",...m].map(y=>{const x=y==="All"?!e:e===y;return c.jsx("button",{onClick:()=>t(y==="All"?null:y),className:`px-3.5 py-1.5 rounded-lg text-[12px] font-medium transition-colors ${x?"bg-[#7c3aed] text-white":"bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)] text-[color:var(--th-text-3)] hover:text-[color:var(--th-text-1)] hover:bg-[color:color-mix(in_srgb,var(--th-ov-base)_10%,transparent)]"}`,children:y},y)})}),o?c.jsx(Yf,{}):i?c.jsxs(st,{className:"p-20 text-center space-y-3",children:[c.jsx(Re,{icon:"AlertTriangle",size:40,className:"text-[color:var(--th-danger-soft)] mx-auto"}),c.jsx("p",{className:"text-[15px] text-[color:var(--th-text-3)]",children:"Failed to load templates"}),c.jsx("button",{onClick:()=>l(),className:"text-[13px] text-[#7c3aed] hover:text-[#8b4df0] underline",children:"Retry"})]}):h.length===0?c.jsxs(st,{className:"p-20 text-center",children:[c.jsx(Re,{icon:"FileText",size:40,className:"text-[color:var(--th-text-3)] mx-auto mb-4"}),c.jsx("p",{className:"text-[15px] text-[color:var(--th-text-3)]",children:e?"No templates in this category":"No templates available yet"})]}):c.jsx("div",{className:$e.cards,children:h.map(y=>c.jsx(Kf,{t:y,onUse:n},y.id))}),r&&c.jsx(Hf,{template:r,onClose:()=>n(null)})]})},Jf=Object.freeze(Object.defineProperty({__proto__:null,SurveyTemplates:vi},Symbol.toStringTag,{value:"Module"})),bi=()=>{const{items:e,totalCount:t,isLoading:r,hasMore:n,loadMore:s}=Ls(),o=E.useMemo(()=>Array.from(new Set(e.map(u=>u.surveyName))).sort(),[e]),i=E.useMemo(()=>$f(o),[o]),l=E.useMemo(()=>{const u=m=>e.filter(h=>h.npsCategory===m).length;return{promoters:u("promoter"),passives:u("passive"),detractors:u("detractor")}},[e]);return c.jsxs("div",{className:$e.wrapper,children:[c.jsx(Vt,{title:"Responses",subtitle:"Analytics · individual survey responses"}),c.jsxs("div",{className:$e.statsgrid,children:[c.jsx(Ie,{icon:"MessageSquare",label:"Total responses",value:t.toLocaleString(),trendDirection:"neutral",color:"#7c3aed"}),c.jsx(Ie,{icon:"ThumbsUp",label:"Promoters",value:l.promoters.toLocaleString(),trendDirection:"neutral",color:"#4edea3"}),c.jsx(Ie,{icon:"Minus",label:"Passives",value:l.passives.toLocaleString(),trendDirection:"neutral",color:"#ffcc6b"}),c.jsx(Ie,{icon:"ThumbsDown",label:"Detractors",value:l.detractors.toLocaleString(),trendDirection:"neutral",color:"#ffb4ab"})]}),c.jsx(fn,{currentPage:"survey-responses",columns:gi,data:e,totalCount:t,isLoading:r,hasMore:n,onLoadMore:s,searchConfig:mi,filters:i,sortConfig:yi,rowClickBehavior:{type:"navigate",path:u=>`/app/survey-analytics/${u.surveyId}`},rowHeight:64,stickyHeader:!0,height:"clac(100vh - 250px)",emptyMessage:"No responses yet."})]})},Qf=Object.freeze(Object.defineProperty({__proto__:null,Responses:bi},Symbol.toStringTag,{value:"Module"})),Gf=e=>e>=70?"#4edea3":e>=50?"#7c3aed":"#ffb4ab",xi=()=>{const{data:e,isLoading:t}=ir({queryKey:["nps-summary"],queryFn:()=>lt.getNps(12),staleTime:3e5}),r=(e==null?void 0:e.scoreDelta)??0,n=Array.isArray(e==null?void 0:e.trend)?e.trend:[],s=o=>e?`${o??0}%`:"—";return c.jsxs("div",{className:$e.wrapper,children:[c.jsx(Vt,{title:"NPS Tracker",subtitle:"Analytics · Net Promoter Score over time."}),c.jsxs("div",{className:$e.statsgrid,children:[c.jsx(Ie,{icon:"Gauge",label:"Current NPS",value:e?String(e.currentScore??0):"—",trendDirection:r>0?"up":r<0?"down":"neutral",color:"#adc6ff"}),c.jsx(Ie,{icon:"ThumbsUp",label:"Promoters",value:s(e==null?void 0:e.promotersPercent),trendDirection:"neutral",color:"#4edea3"}),c.jsx(Ie,{icon:"Activity",label:"Passives",value:s(e==null?void 0:e.passivesPercent),trendDirection:"neutral",color:"#ffcc6b"}),c.jsx(Ie,{icon:"ThumbsDown",label:"Detractors",value:s(e==null?void 0:e.detractorsPercent),trendDirection:"neutral",color:"#ffb4ab"})]}),c.jsxs(st,{className:"p-6",children:[c.jsxs("h2",{className:"mb-6 text-[16px] font-semibold text-white",children:["NPS Trend",e&&c.jsxs("span",{className:"ml-3 text-[11px] font-normal text-[color:var(--th-text-3)]",children:[r>=0?"+":"",r," from prior period"]})]}),t?c.jsx("div",{className:"h-48 animate-pulse rounded-lg bg-[color:color-mix(in_srgb,var(--th-ov-base)_5%,transparent)]"}):c.jsx("div",{className:"flex h-48 items-end gap-3",children:n.map((o,i)=>{var l;return c.jsxs("div",{className:"flex flex-1 flex-col items-center gap-1",children:[c.jsx("span",{className:"text-[10px] tabular-nums text-[color:var(--th-text-3)]",children:(o==null?void 0:o.score)??0}),c.jsx("div",{className:"relative w-full",style:{height:140},children:c.jsx("div",{className:"absolute bottom-0 w-full rounded-t-sm",style:{height:`${Math.max((o==null?void 0:o.score)??0,5)}%`,backgroundColor:Gf((o==null?void 0:o.score)??0),opacity:.4+i/Math.max(n.length,1)*.6}})}),c.jsx("span",{className:"text-[9px] text-[color:var(--th-text-3)]",children:((l=o==null?void 0:o.period)==null?void 0:l.split(" ")[1])??""})]},(o==null?void 0:o.period)??i)})})]})]})},Xf=Object.freeze(Object.defineProperty({__proto__:null,NPSTracker:xi},Symbol.toStringTag,{value:"Module"})),cn=e=>(e.npsScore??0)<50||(e.completionRate??0)<70,Zf=e=>{const t=e.filter(cn).length;return[{key:"all",label:"All",count:e.length},{key:"healthy",label:"Healthy",count:e.length-t},{key:"attention",label:"Needs attention",count:t}]},ed=(e,t)=>t==="healthy"?e.filter(r=>!cn(r)):t==="attention"?e.filter(cn):e,td={placeholder:"Search surveys, themes…",keys:["surveyName","topTheme","bottomTheme"],debounceMs:150},rd={defaultId:"responses",options:[{id:"responses",label:"Most responses",comparator:(e,t)=>(t.totalResponses??0)-(e.totalResponses??0)},{id:"nps",label:"NPS: High → Low",comparator:(e,t)=>(t.npsScore??-1)-(e.npsScore??-1)},{id:"completion",label:"Completion: High → Low",comparator:(e,t)=>(t.completionRate??0)-(e.completionRate??0)},{id:"name",label:"Name: A–Z",comparator:(e,t)=>e.surveyName.localeCompare(t.surveyName)}]},nd=[{id:"nps",label:"NPS",options:[{value:"all",label:"All"},{value:"great",label:"70+"},{value:"ok",label:"50–69"},{value:"low",label:"Below 50"}],defaultValue:"all",predicate:(e,t)=>{const r=e.npsScore??-1;return t==="great"?r>=70:t==="ok"?r>=50&&r<70:t==="low"?r<50:!0}},{id:"completion",label:"Completion",options:[{value:"all",label:"All"},{value:"high",label:"80%+"},{value:"low",label:"Below 70%"}],defaultValue:"all",predicate:(e,t)=>{const r=e.completionRate??0;return t==="high"?r>=80:t==="low"?r<70:!0}}],sd=[{key:"surveyName",label:"Survey",cellType:"analyticsSurvey",sortable:!0,minWidth:260,sortFn:(e,t,r)=>e.surveyName.localeCompare(t.surveyName)*(r==="asc"?1:-1)},{key:"totalResponses",label:"Responses",sortable:!0,width:120,sortFn:(e,t,r)=>((e.totalResponses??0)-(t.totalResponses??0))*(r==="asc"?1:-1)},{key:"completionRate",label:"Completion",cellType:"analyticsCompletion",sortable:!0,width:150,sortFn:(e,t,r)=>((e.completionRate??0)-(t.completionRate??0))*(r==="asc"?1:-1)},{key:"avgCompletionTime",label:"Avg time",width:110},{key:"npsScore",label:"NPS",cellType:"npsScore",sortable:!0,width:90,sortFn:(e,t,r)=>((e.npsScore??-1)-(t.npsScore??-1))*(r==="asc"?1:-1)},{key:"averageRating",label:"Rating",cellType:"analyticsRating",sortable:!0,width:100,sortFn:(e,t,r)=>((e.averageRating??0)-(t.averageRating??0))*(r==="asc"?1:-1)},{key:"topTheme",label:"Top theme",minWidth:160},{key:"bottomTheme",label:"Needs improvement",minWidth:160}],Si=()=>{const e=lr(),{surveyId:t}=da(),{data:r,isLoading:n}=ir({queryKey:["survey-analytics"],queryFn:lt.getAnalytics,staleTime:120*1e3}),s=E.useMemo(()=>(Array.isArray(r)?r:[]).filter(k=>!!(k!=null&&k.surveyId)).map(k=>({...k,id:k.surveyId})),[r]),[o,i]=E.useState("all"),[l,u]=E.useState(t??null);E.useEffect(()=>u(t??null),[t]);const m=E.useMemo(()=>Zf(s),[s]),h=E.useMemo(()=>ed(s,o),[s,o]),y=E.useMemo(()=>s.find(k=>k.id===l),[s,l]),x=E.useMemo(()=>{const k=s.reduce((T,B)=>T+(B.totalResponses??0),0),F=s.length?Math.round(s.reduce((T,B)=>T+(B.completionRate??0),0)/s.length):null;return{totalResp:k,avgCompletion:F,attention:s.filter(cn).length}},[s]),C=k=>n||k===null?"—":String(k);return c.jsxs("div",{className:$e.wrapper,children:[t&&c.jsxs("button",{type:"button",onClick:()=>e("/app/responses"),className:"flex w-fit cursor-pointer items-center gap-1.5 text-[13px] text-[color:var(--th-text-3)] transition-colors hover:text-[color:var(--th-text-2)]",children:[c.jsx(Re,{icon:"ArrowLeft",size:15})," Back to responses"]}),c.jsx(Vt,{title:"Survey Analytics",subtitle:"Aggregated survey insights and trends across your surveys."}),c.jsxs("div",{className:$e.statsgrid,children:[c.jsx(Ie,{icon:"BarChart3",label:"Surveys",value:C(s.length),trendDirection:"neutral",color:"#f59e0b"}),c.jsx(Ie,{icon:"AlertTriangle",label:"Need attention",value:C(x.attention),trendDirection:"neutral",color:"#ef4444"}),c.jsx(Ie,{icon:"MessageSquare",label:"Total responses",value:C(x.totalResp.toLocaleString()),trendDirection:"neutral",color:"#6366f1"}),c.jsx(Ie,{icon:"CheckCircle2",label:"Avg completion",value:C(x.avgCompletion===null?null:`${x.avgCompletion}%`),trendDirection:"neutral",color:"#10b981"})]}),c.jsxs("div",{className:$e.split,children:[c.jsx("div",{className:$e.main,children:c.jsx(fn,{currentPage:"survey-analytics",columns:sd,data:h,totalCount:h.length,isLoading:n,tabs:m,activeTab:o,onTabChange:i,searchConfig:td,filters:nd,sortConfig:rd,rowClickBehavior:{type:"callback",handler:k=>u(k.id)},rowHeight:64,stickyHeader:!0,height:"calc(100vh - 250px)",emptyMessage:t?"No analytics for this survey yet.":"No analytics data yet."})}),y&&c.jsx("aside",{className:$e.detail,children:c.jsxs(st,{className:"p-5",children:[c.jsxs("div",{className:"flex items-start justify-between gap-3",children:[c.jsx("h2",{className:"text-[15px] font-semibold text-white",children:y.surveyName}),c.jsx("button",{type:"button",onClick:()=>u(null),className:"cursor-pointer text-[color:var(--th-text-3)] hover:text-[color:var(--th-text-1)]",children:"✕"})]}),c.jsx("dl",{className:"mt-4 space-y-2.5 text-[12.5px]",children:[["Responses",(y.totalResponses??0).toLocaleString()],["Completion",`${y.completionRate??0}%`],["Avg time",y.avgCompletionTime??"—"],["NPS",y.npsScore!=null?String(y.npsScore):"—"],["Avg rating",(y.averageRating??0).toFixed(1)]].map(([k,F])=>c.jsxs("div",{className:"flex justify-between gap-3",children:[c.jsx("dt",{className:"text-[color:var(--th-text-3)]",children:k}),c.jsx("dd",{className:"text-right font-mono text-[color:var(--th-text-2)]",children:F})]},k))}),c.jsxs("div",{className:"mt-4 rounded-xl border border-[color:color-mix(in_srgb,var(--th-success)_10%,transparent)] bg-[color:color-mix(in_srgb,var(--th-success)_4%,transparent)] p-3.5",children:[c.jsxs("div",{className:"mb-1.5 flex items-center gap-2",children:[c.jsx(Re,{icon:"ThumbsUp",size:13,className:"text-[color:var(--th-success)]"}),c.jsx("span",{className:"text-[11.5px] font-semibold text-[color:var(--th-success)]",children:"Top Theme"})]}),c.jsx("p",{className:"text-[13px] text-[color:var(--th-text-1)]",children:y.topTheme??"—"})]}),c.jsxs("div",{className:"mt-3 rounded-xl border border-[color:color-mix(in_srgb,var(--th-danger-soft)_10%,transparent)] bg-[color:color-mix(in_srgb,var(--th-danger-soft)_4%,transparent)] p-3.5",children:[c.jsxs("div",{className:"mb-1.5 flex items-center gap-2",children:[c.jsx(Re,{icon:"ThumbsDown",size:13,className:"text-[color:var(--th-danger-soft)]"}),c.jsx("span",{className:"text-[11.5px] font-semibold text-[color:var(--th-danger-soft)]",children:"Needs Improvement"})]}),c.jsx("p",{className:"text-[13px] text-[color:var(--th-text-1)]",children:y.bottomTheme??"—"})]})]})})]})]})},od=Object.freeze(Object.defineProperty({__proto__:null,SurveyAnalytics:Si},Symbol.toStringTag,{value:"Module"}));exports.AllSurveys=ks;exports.CreateSurvey=Ds;exports.NPSTracker=xi;exports.Responses=bi;exports.SurveyAnalytics=Si;exports.SurveyDetails=Fs;exports.SurveyTemplates=vi;exports.registerSurveyCells=Oa;exports.surveyNav=Zi;exports.surveyRoutes=Xi;exports.surveysApi=lt;exports.useSurveyResponses=Ls;exports.useTableConfig=di;exports.useTableData=pi;
|
|
109
|
-
//# sourceMappingURL=index.cjs.map
|