@xpert-ai/plugin-live-dashboard 0.3.1 → 0.4.1
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/.xpertai-plugin/plugin.json +10 -2
- package/README.md +6 -0
- package/assets/branding/cover-v1.prompt.txt +27 -0
- package/assets/branding/cover-v1.webp +0 -0
- package/assets/previews/customer-brief.png +0 -0
- package/assets/previews/profit-atlas.png +0 -0
- package/assets/previews/trend-workspace.png +0 -0
- package/dist/index.js +6 -3
- package/dist/lib/agent.schema.d.ts +43 -37
- package/dist/lib/agent.schema.js +2 -1
- package/dist/lib/app-config.d.ts +62 -0
- package/dist/lib/app-config.js +38 -0
- package/dist/lib/artifact-type.provider.d.ts +15 -0
- package/dist/lib/artifact-type.provider.js +78 -0
- package/dist/lib/assistant-template.d.ts +1 -2
- package/dist/lib/assistant-template.js +3 -52
- package/dist/lib/content.provider.js +13 -5
- package/dist/lib/dashboard-navigation.d.ts +58 -14
- package/dist/lib/dashboard-navigation.js +11 -10
- package/dist/lib/dashboard-view.schema.d.ts +278 -46
- package/dist/lib/dashboard-view.schema.js +9 -1
- package/dist/lib/dashboard.service.d.ts +49 -3
- package/dist/lib/dashboard.service.js +64 -28
- package/dist/lib/document-libraries.d.ts +1 -1
- package/dist/lib/document-libraries.js +3 -2
- package/dist/lib/document-network.d.ts +1 -1
- package/dist/lib/document-network.js +2 -6
- package/dist/lib/editing-feedback.d.ts +5 -0
- package/dist/lib/editing-feedback.js +19 -0
- package/dist/lib/editing-patch.d.ts +22 -0
- package/dist/lib/editing-patch.js +46 -0
- package/dist/lib/editing-session.d.ts +167 -0
- package/dist/lib/editing-session.js +53 -0
- package/dist/lib/editing.d.ts +92 -60
- package/dist/lib/editing.js +36 -24
- package/dist/lib/html-guidance.d.ts +1 -1
- package/dist/lib/html-guidance.js +1 -1
- package/dist/lib/middleware.js +42 -18
- package/dist/lib/monitor.d.ts +70 -0
- package/dist/lib/monitor.js +101 -0
- package/dist/lib/plugin.js +4 -1
- package/dist/lib/project.d.ts +106 -0
- package/dist/lib/project.js +17 -0
- package/dist/lib/projects.schema.d.ts +63 -0
- package/dist/lib/projects.schema.js +8 -0
- package/dist/lib/projects.service.d.ts +25 -0
- package/dist/lib/projects.service.js +75 -0
- package/dist/lib/resource-card.js +1 -1
- package/dist/lib/runtime-context.d.ts +3 -0
- package/dist/lib/runtime-context.js +13 -0
- package/dist/lib/save-evidence.d.ts +1 -1
- package/dist/lib/templates.d.ts +2 -0
- package/dist/lib/templates.js +55 -0
- package/dist/lib/view.provider.d.ts +127 -8
- package/dist/lib/view.provider.js +49 -12
- package/dist/libraries/TREND-WORKSPACE-ICONS-LICENSE.txt +43 -0
- package/dist/libraries/catalog.json +1 -1
- package/dist/remote/app.css +1 -1
- package/dist/remote/app.js +34 -34
- package/dist/remote/build-manifest.json +116 -32
- package/dist/sandbox-actions/action.json +1 -1
- package/dist/sandbox-actions/bundle/host.js +2 -2
- package/dist/sandbox-actions/bundle/resource-cache.mjs +2 -1
- package/dist/sandbox-actions/bundle/validate.mjs +1 -1
- package/docs/docs.json +7 -0
- package/docs/frontend-libraries.mdx +12 -4
- package/docs/html-mode.md +3 -3
- package/docs/quick-start-acceptance.mdx +50 -0
- package/docs/quick-start.mdx +64 -0
- package/docs/superstore.mdx +38 -0
- package/docs/team-sharing.mdx +6 -2
- package/docs/trend-workspace-acceptance.mdx +43 -0
- package/docs/trend-workspace.mdx +30 -0
- package/docs/verification.mdx +4 -2
- package/docs/visual-styles-acceptance.mdx +40 -0
- package/docs/visual-styles.mdx +46 -0
- package/package.json +23 -17
- package/skills/live-dashboard/SKILL.md +27 -3
- package/skills/live-dashboard/examples/README.md +25 -0
- package/skills/live-dashboard/examples/catalog.json +79 -0
- package/skills/live-dashboard/examples/production-quality/README.md +25 -0
- package/skills/live-dashboard/examples/production-quality/dashboard.html +129 -0
- package/skills/live-dashboard/examples/production-quality/definition.json +67 -0
- package/skills/live-dashboard/examples/production-quality/demo.csv +7 -0
- package/skills/live-dashboard/examples/production-quality/demo.json +44 -0
- package/skills/live-dashboard/examples/production-quality/expected.json +26 -0
- package/skills/live-dashboard/examples/production-quality/preview.png +0 -0
- package/skills/live-dashboard/examples/production-quality/query.json +53 -0
- package/skills/live-dashboard/examples/regional-sales/README.md +25 -0
- package/skills/live-dashboard/examples/regional-sales/dashboard-create.json +35 -0
- package/skills/live-dashboard/examples/regional-sales/definition.json +35 -0
- package/skills/live-dashboard/examples/regional-sales/demo.csv +5 -0
- package/skills/live-dashboard/examples/regional-sales/demo.json +18 -0
- package/skills/live-dashboard/examples/regional-sales/expected.json +19 -0
- package/skills/live-dashboard/examples/regional-sales/preview.png +0 -0
- package/skills/live-dashboard/examples/regional-sales/query.json +45 -0
- package/skills/live-dashboard/examples/sales-overview/README.md +25 -0
- package/skills/live-dashboard/examples/sales-overview/dashboard.html +129 -0
- package/skills/live-dashboard/examples/sales-overview/definition.json +57 -0
- package/skills/live-dashboard/examples/sales-overview/demo.csv +7 -0
- package/skills/live-dashboard/examples/sales-overview/demo.json +38 -0
- package/skills/live-dashboard/examples/sales-overview/expected.json +22 -0
- package/skills/live-dashboard/examples/sales-overview/preview.png +0 -0
- package/skills/live-dashboard/examples/sales-overview/query.json +52 -0
- package/skills/live-dashboard/examples/superstore/README.md +64 -0
- package/skills/live-dashboard/examples/superstore/THIRD_PARTY_LICENSE.txt +207 -0
- package/skills/live-dashboard/examples/superstore/build_data.py +155 -0
- package/skills/live-dashboard/examples/superstore/build_pages.py +129 -0
- package/skills/live-dashboard/examples/superstore/checks.json +104 -0
- package/skills/live-dashboard/examples/superstore/customers-mobile-dark.png +0 -0
- package/skills/live-dashboard/examples/superstore/customers-select.png +0 -0
- package/skills/live-dashboard/examples/superstore/customers.html +316 -0
- package/skills/live-dashboard/examples/superstore/customers.png +0 -0
- package/skills/live-dashboard/examples/superstore/customers.queries.json +512 -0
- package/skills/live-dashboard/examples/superstore/expected.json +4069 -0
- package/skills/live-dashboard/examples/superstore/import.json +200 -0
- package/skills/live-dashboard/examples/superstore/orders.csv +10195 -0
- package/skills/live-dashboard/examples/superstore/overview-mobile-dark.png +0 -0
- package/skills/live-dashboard/examples/superstore/overview-select.png +0 -0
- package/skills/live-dashboard/examples/superstore/overview.html +310 -0
- package/skills/live-dashboard/examples/superstore/overview.png +0 -0
- package/skills/live-dashboard/examples/superstore/overview.queries.json +636 -0
- package/skills/live-dashboard/examples/superstore/page.js +109 -0
- package/skills/live-dashboard/examples/superstore/profitability-mobile-dark.png +0 -0
- package/skills/live-dashboard/examples/superstore/profitability-select.png +0 -0
- package/skills/live-dashboard/examples/superstore/profitability.html +307 -0
- package/skills/live-dashboard/examples/superstore/profitability.png +0 -0
- package/skills/live-dashboard/examples/superstore/profitability.queries.json +334 -0
- package/skills/live-dashboard/examples/superstore/provenance.json +24 -0
- package/skills/live-dashboard/examples/superstore/semantic-model.json +220 -0
- package/skills/live-dashboard/examples/superstore/test_data.py +62 -0
- package/skills/live-dashboard/references/html-runtime.md +1 -1
- package/skills/live-dashboard/themes/README.md +50 -0
- package/skills/live-dashboard/themes/customer-brief/README.md +47 -0
- package/skills/live-dashboard/themes/customer-brief/charts.js +17 -0
- package/skills/live-dashboard/themes/customer-brief/layout.html +22 -0
- package/skills/live-dashboard/themes/customer-brief/theme.css +108 -0
- package/skills/live-dashboard/themes/profit-atlas/README.md +43 -0
- package/skills/live-dashboard/themes/profit-atlas/charts.js +30 -0
- package/skills/live-dashboard/themes/profit-atlas/layout.html +19 -0
- package/skills/live-dashboard/themes/profit-atlas/theme.css +75 -0
- package/skills/live-dashboard/themes/trend-workspace/ICON_LICENSE.txt +43 -0
- package/skills/live-dashboard/themes/trend-workspace/README.md +144 -0
- package/skills/live-dashboard/themes/trend-workspace/charts.js +60 -0
- package/skills/live-dashboard/themes/trend-workspace/icons.js +11 -0
- package/skills/live-dashboard/themes/trend-workspace/layout.html +45 -0
- package/skills/live-dashboard/themes/trend-workspace/select.js +127 -0
- package/skills/live-dashboard/themes/trend-workspace/theme.css +137 -0
package/dist/remote/app.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
(function(){"use strict";function Qy(r,t){for(var o=0;o<t.length;o++){const i=t[o];if(typeof i!="string"&&!Array.isArray(i)){for(const a in i)if(a!=="default"&&!(a in r)){const l=Object.getOwnPropertyDescriptor(i,a);l&&Object.defineProperty(r,a,l.get?l:{enumerable:!0,get:()=>i[a]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}function Yy(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var $l={exports:{}},Le={};var df;function Xy(){if(df)return Le;df=1;var r=Symbol.for("react.element"),t=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.iterator;function S(I){return I===null||typeof I!="object"?null:(I=y&&I[y]||I["@@iterator"],typeof I=="function"?I:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,_={};function k(I,E,W){this.props=I,this.context=E,this.refs=_,this.updater=W||b}k.prototype.isReactComponent={},k.prototype.setState=function(I,E){if(typeof I!="object"&&typeof I!="function"&&I!=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,I,E,"setState")},k.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function R(){}R.prototype=k.prototype;function D(I,E,W){this.props=I,this.context=E,this.refs=_,this.updater=W||b}var T=D.prototype=new R;T.constructor=D,w(T,k.prototype),T.isPureReactComponent=!0;var O=Array.isArray,V=Object.prototype.hasOwnProperty,L={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function j(I,E,W){var J,H={},re=null,pe=null;if(E!=null)for(J in E.ref!==void 0&&(pe=E.ref),E.key!==void 0&&(re=""+E.key),E)V.call(E,J)&&!B.hasOwnProperty(J)&&(H[J]=E[J]);var X=arguments.length-2;if(X===1)H.children=W;else if(1<X){for(var ne=Array(X),Te=0;Te<X;Te++)ne[Te]=arguments[Te+2];H.children=ne}if(I&&I.defaultProps)for(J in X=I.defaultProps,X)H[J]===void 0&&(H[J]=X[J]);return{$$typeof:r,type:I,key:re,ref:pe,props:H,_owner:L.current}}function Y(I,E){return{$$typeof:r,type:I.type,key:E,ref:I.ref,props:I.props,_owner:I._owner}}function ce(I){return typeof I=="object"&&I!==null&&I.$$typeof===r}function Ce(I){var E={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(W){return E[W]})}var le=/\/+/g;function ue(I,E){return typeof I=="object"&&I!==null&&I.key!=null?Ce(""+I.key):E.toString(36)}function se(I,E,W,J,H){var re=typeof I;(re==="undefined"||re==="boolean")&&(I=null);var pe=!1;if(I===null)pe=!0;else switch(re){case"string":case"number":pe=!0;break;case"object":switch(I.$$typeof){case r:case t:pe=!0}}if(pe)return pe=I,H=H(pe),I=J===""?"."+ue(pe,0):J,O(H)?(W="",I!=null&&(W=I.replace(le,"$&/")+"/"),se(H,E,W,"",function(Te){return Te})):H!=null&&(ce(H)&&(H=Y(H,W+(!H.key||pe&&pe.key===H.key?"":(""+H.key).replace(le,"$&/")+"/")+I)),E.push(H)),1;if(pe=0,J=J===""?".":J+":",O(I))for(var X=0;X<I.length;X++){re=I[X];var ne=J+ue(re,X);pe+=se(re,E,W,ne,H)}else if(ne=S(I),typeof ne=="function")for(I=ne.call(I),X=0;!(re=I.next()).done;)re=re.value,ne=J+ue(re,X++),pe+=se(re,E,W,ne,H);else if(re==="object")throw E=String(I),Error("Objects are not valid as a React child (found: "+(E==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":E)+"). If you meant to render a collection of children, use an array instead.");return pe}function be(I,E,W){if(I==null)return I;var J=[],H=0;return se(I,J,"","",function(re){return E.call(W,re,H++)}),J}function ae(I){if(I._status===-1){var E=I._result;E=E(),E.then(function(W){(I._status===0||I._status===-1)&&(I._status=1,I._result=W)},function(W){(I._status===0||I._status===-1)&&(I._status=2,I._result=W)}),I._status===-1&&(I._status=0,I._result=E)}if(I._status===1)return I._result.default;throw I._result}var oe={current:null},U={transition:null},G={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:U,ReactCurrentOwner:L};function z(){throw Error("act(...) is not supported in production builds of React.")}return Le.Children={map:be,forEach:function(I,E,W){be(I,function(){E.apply(this,arguments)},W)},count:function(I){var E=0;return be(I,function(){E++}),E},toArray:function(I){return be(I,function(E){return E})||[]},only:function(I){if(!ce(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},Le.Component=k,Le.Fragment=o,Le.Profiler=a,Le.PureComponent=D,Le.StrictMode=i,Le.Suspense=h,Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=G,Le.act=z,Le.cloneElement=function(I,E,W){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var J=w({},I.props),H=I.key,re=I.ref,pe=I._owner;if(E!=null){if(E.ref!==void 0&&(re=E.ref,pe=L.current),E.key!==void 0&&(H=""+E.key),I.type&&I.type.defaultProps)var X=I.type.defaultProps;for(ne in E)V.call(E,ne)&&!B.hasOwnProperty(ne)&&(J[ne]=E[ne]===void 0&&X!==void 0?X[ne]:E[ne])}var ne=arguments.length-2;if(ne===1)J.children=W;else if(1<ne){X=Array(ne);for(var Te=0;Te<ne;Te++)X[Te]=arguments[Te+2];J.children=X}return{$$typeof:r,type:I.type,key:H,ref:re,props:J,_owner:pe}},Le.createContext=function(I){return I={$$typeof:u,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},I.Provider={$$typeof:l,_context:I},I.Consumer=I},Le.createElement=j,Le.createFactory=function(I){var E=j.bind(null,I);return E.type=I,E},Le.createRef=function(){return{current:null}},Le.forwardRef=function(I){return{$$typeof:d,render:I}},Le.isValidElement=ce,Le.lazy=function(I){return{$$typeof:v,_payload:{_status:-1,_result:I},_init:ae}},Le.memo=function(I,E){return{$$typeof:g,type:I,compare:E===void 0?null:E}},Le.startTransition=function(I){var E=U.transition;U.transition={};try{I()}finally{U.transition=E}},Le.unstable_act=z,Le.useCallback=function(I,E){return oe.current.useCallback(I,E)},Le.useContext=function(I){return oe.current.useContext(I)},Le.useDebugValue=function(){},Le.useDeferredValue=function(I){return oe.current.useDeferredValue(I)},Le.useEffect=function(I,E){return oe.current.useEffect(I,E)},Le.useId=function(){return oe.current.useId()},Le.useImperativeHandle=function(I,E,W){return oe.current.useImperativeHandle(I,E,W)},Le.useInsertionEffect=function(I,E){return oe.current.useInsertionEffect(I,E)},Le.useLayoutEffect=function(I,E){return oe.current.useLayoutEffect(I,E)},Le.useMemo=function(I,E){return oe.current.useMemo(I,E)},Le.useReducer=function(I,E,W){return oe.current.useReducer(I,E,W)},Le.useRef=function(I){return oe.current.useRef(I)},Le.useState=function(I){return oe.current.useState(I)},Le.useSyncExternalStore=function(I,E,W){return oe.current.useSyncExternalStore(I,E,W)},Le.useTransition=function(){return oe.current.useTransition()},Le.version="18.3.1",Le}var ff;function jl(){return ff||(ff=1,$l.exports=Xy()),$l.exports}var m=jl();const Si=Qy({__proto__:null,default:Yy(m)},[m]);var Ps={},Ml={exports:{}},jt={},zl={exports:{}},Fl={};var pf;function Jy(){return pf||(pf=1,(function(r){function t(U,G){var z=U.length;U.push(G);e:for(;0<z;){var I=z-1>>>1,E=U[I];if(0<a(E,G))U[I]=G,U[z]=E,z=I;else break e}}function o(U){return U.length===0?null:U[0]}function i(U){if(U.length===0)return null;var G=U[0],z=U.pop();if(z!==G){U[0]=z;e:for(var I=0,E=U.length,W=E>>>1;I<W;){var J=2*(I+1)-1,H=U[J],re=J+1,pe=U[re];if(0>a(H,z))re<E&&0>a(pe,H)?(U[I]=pe,U[re]=z,I=re):(U[I]=H,U[J]=z,I=J);else if(re<E&&0>a(pe,z))U[I]=pe,U[re]=z,I=re;else break e}}return G}function a(U,G){var z=U.sortIndex-G.sortIndex;return z!==0?z:U.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;r.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();r.unstable_now=function(){return u.now()-d}}var h=[],g=[],v=1,y=null,S=3,b=!1,w=!1,_=!1,k=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(U){for(var G=o(g);G!==null;){if(G.callback===null)i(g);else if(G.startTime<=U)i(g),G.sortIndex=G.expirationTime,t(h,G);else break;G=o(g)}}function O(U){if(_=!1,T(U),!w)if(o(h)!==null)w=!0,ae(V);else{var G=o(g);G!==null&&oe(O,G.startTime-U)}}function V(U,G){w=!1,_&&(_=!1,R(j),j=-1),b=!0;var z=S;try{for(T(G),y=o(h);y!==null&&(!(y.expirationTime>G)||U&&!Ce());){var I=y.callback;if(typeof I=="function"){y.callback=null,S=y.priorityLevel;var E=I(y.expirationTime<=G);G=r.unstable_now(),typeof E=="function"?y.callback=E:y===o(h)&&i(h),T(G)}else i(h);y=o(h)}if(y!==null)var W=!0;else{var J=o(g);J!==null&&oe(O,J.startTime-G),W=!1}return W}finally{y=null,S=z,b=!1}}var L=!1,B=null,j=-1,Y=5,ce=-1;function Ce(){return!(r.unstable_now()-ce<Y)}function le(){if(B!==null){var U=r.unstable_now();ce=U;var G=!0;try{G=B(!0,U)}finally{G?ue():(L=!1,B=null)}}else L=!1}var ue;if(typeof D=="function")ue=function(){D(le)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,be=se.port2;se.port1.onmessage=le,ue=function(){be.postMessage(null)}}else ue=function(){k(le,0)};function ae(U){B=U,L||(L=!0,ue())}function oe(U,G){j=k(function(){U(r.unstable_now())},G)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(U){U.callback=null},r.unstable_continueExecution=function(){w||b||(w=!0,ae(V))},r.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Y=0<U?Math.floor(1e3/U):5},r.unstable_getCurrentPriorityLevel=function(){return S},r.unstable_getFirstCallbackNode=function(){return o(h)},r.unstable_next=function(U){switch(S){case 1:case 2:case 3:var G=3;break;default:G=S}var z=S;S=G;try{return U()}finally{S=z}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(U,G){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var z=S;S=U;try{return G()}finally{S=z}},r.unstable_scheduleCallback=function(U,G,z){var I=r.unstable_now();switch(typeof z=="object"&&z!==null?(z=z.delay,z=typeof z=="number"&&0<z?I+z:I):z=I,U){case 1:var E=-1;break;case 2:E=250;break;case 5:E=1073741823;break;case 4:E=1e4;break;default:E=5e3}return E=z+E,U={id:v++,callback:G,priorityLevel:U,startTime:z,expirationTime:E,sortIndex:-1},z>I?(U.sortIndex=z,t(g,U),o(h)===null&&U===o(g)&&(_?(R(j),j=-1):_=!0,oe(O,z-I))):(U.sortIndex=E,t(h,U),w||b||(w=!0,ae(V))),U},r.unstable_shouldYield=Ce,r.unstable_wrapCallback=function(U){var G=S;return function(){var z=S;S=G;try{return U.apply(this,arguments)}finally{S=z}}}})(Fl)),Fl}var hf;function ex(){return hf||(hf=1,zl.exports=Jy()),zl.exports}var mf;function tx(){if(mf)return jt;mf=1;var r=jl(),t=ex();function o(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s<arguments.length;s++)n+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,a={};function l(e,n){u(e,n),u(e+"Capture",n)}function u(e,n){for(a[e]=n,e=0;e<n.length;e++)i.add(n[e])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,g=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,v={},y={};function S(e){return h.call(y,e)?!0:h.call(v,e)?!1:g.test(e)?y[e]=!0:(v[e]=!0,!1)}function b(e,n,s,c){if(s!==null&&s.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return c?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function w(e,n,s,c){if(n===null||typeof n>"u"||b(e,n,s,c))return!0;if(c)return!1;if(s!==null)switch(s.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function _(e,n,s,c,f,p,x){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=c,this.attributeNamespace=f,this.mustUseProperty=s,this.propertyName=e,this.type=n,this.sanitizeURL=p,this.removeEmptyString=x}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){k[e]=new _(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];k[n]=new _(n,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){k[e]=new _(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){k[e]=new _(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){k[e]=new _(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){k[e]=new _(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){k[e]=new _(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){k[e]=new _(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){k[e]=new _(e,5,!1,e.toLowerCase(),null,!1,!1)});var R=/[\-:]([a-z])/g;function D(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(R,D);k[n]=new _(n,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(R,D);k[n]=new _(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(R,D);k[n]=new _(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){k[e]=new _(e,1,!1,e.toLowerCase(),null,!1,!1)}),k.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){k[e]=new _(e,1,!1,e.toLowerCase(),null,!0,!0)});function T(e,n,s,c){var f=k.hasOwnProperty(n)?k[n]:null;(f!==null?f.type!==0:c||!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(w(n,s,f,c)&&(s=null),c||f===null?S(n)&&(s===null?e.removeAttribute(n):e.setAttribute(n,""+s)):f.mustUseProperty?e[f.propertyName]=s===null?f.type===3?!1:"":s:(n=f.attributeName,c=f.attributeNamespace,s===null?e.removeAttribute(n):(f=f.type,s=f===3||f===4&&s===!0?"":""+s,c?e.setAttributeNS(c,n,s):e.setAttribute(n,s))))}var O=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,V=Symbol.for("react.element"),L=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),ce=Symbol.for("react.provider"),Ce=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),se=Symbol.for("react.suspense_list"),be=Symbol.for("react.memo"),ae=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),U=Symbol.iterator;function G(e){return e===null||typeof e!="object"?null:(e=U&&e[U]||e["@@iterator"],typeof e=="function"?e:null)}var z=Object.assign,I;function E(e){if(I===void 0)try{throw Error()}catch(s){var n=s.stack.trim().match(/\n( *(at )?)/);I=n&&n[1]||""}return`
|
|
2
|
-
`+
|
|
3
|
-
`),
|
|
4
|
-
`),
|
|
5
|
-
`+f[x].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),P}while(1<=x&&0<=C);break}}}finally{W=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?E(e):""}function H(e){switch(e.tag){case 5:return E(e.type);case 16:return E("Lazy");case 13:return E("Suspense");case 19:return E("SuspenseList");case 0:case 2:case 15:return e=J(e.type,!1),e;case 11:return e=J(e.type.render,!1),e;case 1:return e=J(e.type,!0),e;default:return""}}function re(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case B:return"Fragment";case L:return"Portal";case Y:return"Profiler";case j:return"StrictMode";case ue:return"Suspense";case se:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Ce:return(e.displayName||"Context")+".Consumer";case ce:return(e._context.displayName||"Context")+".Provider";case le:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case be:return n=e.displayName||null,n!==null?n:re(e.type)||"Memo";case ae:n=e._payload,e=e._init;try{return re(e(n))}catch{}}return null}function pe(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return re(n);case 8:return n===j?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function X(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ne(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Te(e){var n=ne(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),c=""+e[n];if(!e.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var f=s.get,p=s.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(x){c=""+x,p.call(this,x)}}),Object.defineProperty(e,n,{enumerable:s.enumerable}),{getValue:function(){return c},setValue:function(x){c=""+x},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function $e(e){e._valueTracker||(e._valueTracker=Te(e))}function je(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var s=n.getValue(),c="";return e&&(c=ne(e)?e.checked?"true":"false":e.value),e=c,e!==s?(n.setValue(e),!0):!1}function ze(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ot(e,n){var s=n.checked;return z({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function it(e,n){var s=n.defaultValue==null?"":n.defaultValue,c=n.checked!=null?n.checked:n.defaultChecked;s=X(n.value!=null?n.value:s),e._wrapperState={initialChecked:c,initialValue:s,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function St(e,n){n=n.checked,n!=null&&T(e,"checked",n,!1)}function Tn(e,n){St(e,n);var s=X(n.value),c=n.type;if(s!=null)c==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(c==="submit"||c==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Hi(e,n.type,s):n.hasOwnProperty("defaultValue")&&Hi(e,n.type,X(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function rr(e,n,s){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var c=n.type;if(!(c!=="submit"&&c!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,s||n===e.value||(e.value=n),e.defaultValue=n}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function Hi(e,n,s){(n!=="number"||ze(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var uo=Array.isArray;function Rr(e,n,s,c){if(e=e.options,n){n={};for(var f=0;f<s.length;f++)n["$"+s[f]]=!0;for(s=0;s<e.length;s++)f=n.hasOwnProperty("$"+e[s].value),e[s].selected!==f&&(e[s].selected=f),f&&c&&(e[s].defaultSelected=!0)}else{for(s=""+X(s),n=null,f=0;f<e.length;f++){if(e[f].value===s){e[f].selected=!0,c&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function Qo(e,n){if(n.dangerouslySetInnerHTML!=null)throw Error(o(91));return z({},n,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Wi(e,n){var s=n.value;if(s==null){if(s=n.children,n=n.defaultValue,s!=null){if(n!=null)throw Error(o(92));if(uo(s)){if(1<s.length)throw Error(o(93));s=s[0]}n=s}n==null&&(n=""),s=n}e._wrapperState={initialValue:X(s)}}function ie(e,n){var s=X(n.value),c=X(n.defaultValue);s!=null&&(s=""+s,s!==e.value&&(e.value=s),n.defaultValue==null&&e.defaultValue!==s&&(e.defaultValue=s)),c!=null&&(e.defaultValue=""+c)}function Ne(e){var n=e.textContent;n===e._wrapperState.initialValue&&n!==""&&n!==null&&(e.value=n)}function Ye(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Xe(e,n){return e==null||e==="http://www.w3.org/1999/xhtml"?Ye(n):e==="http://www.w3.org/2000/svg"&&n==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Be,Ft=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(n,s,c,f){MSApp.execUnsafeLocalFunction(function(){return e(n,s,c,f)})}:e})(function(e,n){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=n;else{for(Be=Be||document.createElement("div"),Be.innerHTML="<svg>"+n.valueOf().toString()+"</svg>",n=Be.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Pr(e,n){if(n){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=n;return}}e.textContent=n}var Dn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},f_=["Webkit","ms","Moz","O"];Object.keys(Dn).forEach(function(e){f_.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),Dn[n]=Dn[e]})});function dg(e,n,s){return n==null||typeof n=="boolean"||n===""?"":s||typeof n!="number"||n===0||Dn.hasOwnProperty(e)&&Dn[e]?(""+n).trim():n+"px"}function fg(e,n){e=e.style;for(var s in n)if(n.hasOwnProperty(s)){var c=s.indexOf("--")===0,f=dg(s,n[s],c);s==="float"&&(s="cssFloat"),c?e.setProperty(s,f):e[s]=f}}var p_=z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bu(e,n){if(n){if(p_[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(o(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(o(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(o(61))}if(n.style!=null&&typeof n.style!="object")throw Error(o(62))}}function ku(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Cu=null;function _u(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Eu=null,Yo=null,Xo=null;function pg(e){if(e=ps(e)){if(typeof Eu!="function")throw Error(o(280));var n=e.stateNode;n&&(n=Ya(n),Eu(e.stateNode,e.type,n))}}function hg(e){Yo?Xo?Xo.push(e):Xo=[e]:Yo=e}function mg(){if(Yo){var e=Yo,n=Xo;if(Xo=Yo=null,pg(e),n)for(e=0;e<n.length;e++)pg(n[e])}}function gg(e,n){return e(n)}function vg(){}var Ru=!1;function yg(e,n,s){if(Ru)return e(n,s);Ru=!0;try{return gg(e,n,s)}finally{Ru=!1,(Yo!==null||Xo!==null)&&(vg(),mg())}}function Ki(e,n){var s=e.stateNode;if(s===null)return null;var c=Ya(s);if(c===null)return null;s=c[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(e=e.type,c=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!c;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(o(231,n,typeof s));return s}var Pu=!1;if(d)try{var Zi={};Object.defineProperty(Zi,"passive",{get:function(){Pu=!0}}),window.addEventListener("test",Zi,Zi),window.removeEventListener("test",Zi,Zi)}catch{Pu=!1}function h_(e,n,s,c,f,p,x,C,P){var F=Array.prototype.slice.call(arguments,3);try{n.apply(s,F)}catch(Z){this.onError(Z)}}var qi=!1,Ia=null,Oa=!1,Iu=null,m_={onError:function(e){qi=!0,Ia=e}};function g_(e,n,s,c,f,p,x,C,P){qi=!1,Ia=null,h_.apply(m_,arguments)}function v_(e,n,s,c,f,p,x,C,P){if(g_.apply(this,arguments),qi){if(qi){var F=Ia;qi=!1,Ia=null}else throw Error(o(198));Oa||(Oa=!0,Iu=F)}}function fo(e){var n=e,s=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(s=n.return),e=n.return;while(e)}return n.tag===3?s:null}function xg(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function wg(e){if(fo(e)!==e)throw Error(o(188))}function y_(e){var n=e.alternate;if(!n){if(n=fo(e),n===null)throw Error(o(188));return n!==e?null:e}for(var s=e,c=n;;){var f=s.return;if(f===null)break;var p=f.alternate;if(p===null){if(c=f.return,c!==null){s=c;continue}break}if(f.child===p.child){for(p=f.child;p;){if(p===s)return wg(f),e;if(p===c)return wg(f),n;p=p.sibling}throw Error(o(188))}if(s.return!==c.return)s=f,c=p;else{for(var x=!1,C=f.child;C;){if(C===s){x=!0,s=f,c=p;break}if(C===c){x=!0,c=f,s=p;break}C=C.sibling}if(!x){for(C=p.child;C;){if(C===s){x=!0,s=p,c=f;break}if(C===c){x=!0,c=p,s=f;break}C=C.sibling}if(!x)throw Error(o(189))}}if(s.alternate!==c)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?e:n}function Sg(e){return e=y_(e),e!==null?bg(e):null}function bg(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var n=bg(e);if(n!==null)return n;e=e.sibling}return null}var kg=t.unstable_scheduleCallback,Cg=t.unstable_cancelCallback,x_=t.unstable_shouldYield,w_=t.unstable_requestPaint,ct=t.unstable_now,S_=t.unstable_getCurrentPriorityLevel,Ou=t.unstable_ImmediatePriority,_g=t.unstable_UserBlockingPriority,Na=t.unstable_NormalPriority,b_=t.unstable_LowPriority,Eg=t.unstable_IdlePriority,Ta=null,An=null;function k_(e){if(An&&typeof An.onCommitFiberRoot=="function")try{An.onCommitFiberRoot(Ta,e,void 0,(e.current.flags&128)===128)}catch{}}var pn=Math.clz32?Math.clz32:E_,C_=Math.log,__=Math.LN2;function E_(e){return e>>>=0,e===0?32:31-(C_(e)/__|0)|0}var Da=64,Aa=4194304;function Gi(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function La(e,n){var s=e.pendingLanes;if(s===0)return 0;var c=0,f=e.suspendedLanes,p=e.pingedLanes,x=s&268435455;if(x!==0){var C=x&~f;C!==0?c=Gi(C):(p&=x,p!==0&&(c=Gi(p)))}else x=s&~f,x!==0?c=Gi(x):p!==0&&(c=Gi(p));if(c===0)return 0;if(n!==0&&n!==c&&(n&f)===0&&(f=c&-c,p=n&-n,f>=p||f===16&&(p&4194240)!==0))return n;if((c&4)!==0&&(c|=s&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=c;0<n;)s=31-pn(n),f=1<<s,c|=e[s],n&=~f;return c}function R_(e,n){switch(e){case 1:case 2:case 4:return n+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function P_(e,n){for(var s=e.suspendedLanes,c=e.pingedLanes,f=e.expirationTimes,p=e.pendingLanes;0<p;){var x=31-pn(p),C=1<<x,P=f[x];P===-1?((C&s)===0||(C&c)!==0)&&(f[x]=R_(C,n)):P<=n&&(e.expiredLanes|=C),p&=~C}}function Nu(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Rg(){var e=Da;return Da<<=1,(Da&4194240)===0&&(Da=64),e}function Tu(e){for(var n=[],s=0;31>s;s++)n.push(e);return n}function Qi(e,n,s){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-pn(n),e[n]=s}function I_(e,n){var s=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var c=e.eventTimes;for(e=e.expirationTimes;0<s;){var f=31-pn(s),p=1<<f;n[f]=0,c[f]=-1,e[f]=-1,s&=~p}}function Du(e,n){var s=e.entangledLanes|=n;for(e=e.entanglements;s;){var c=31-pn(s),f=1<<c;f&n|e[c]&n&&(e[c]|=n),s&=~f}}var qe=0;function Pg(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Ig,Au,Og,Ng,Tg,Lu=!1,$a=[],Ir=null,Or=null,Nr=null,Yi=new Map,Xi=new Map,Tr=[],O_="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Dg(e,n){switch(e){case"focusin":case"focusout":Ir=null;break;case"dragenter":case"dragleave":Or=null;break;case"mouseover":case"mouseout":Nr=null;break;case"pointerover":case"pointerout":Yi.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Xi.delete(n.pointerId)}}function Ji(e,n,s,c,f,p){return e===null||e.nativeEvent!==p?(e={blockedOn:n,domEventName:s,eventSystemFlags:c,nativeEvent:p,targetContainers:[f]},n!==null&&(n=ps(n),n!==null&&Au(n)),e):(e.eventSystemFlags|=c,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function N_(e,n,s,c,f){switch(n){case"focusin":return Ir=Ji(Ir,e,n,s,c,f),!0;case"dragenter":return Or=Ji(Or,e,n,s,c,f),!0;case"mouseover":return Nr=Ji(Nr,e,n,s,c,f),!0;case"pointerover":var p=f.pointerId;return Yi.set(p,Ji(Yi.get(p)||null,e,n,s,c,f)),!0;case"gotpointercapture":return p=f.pointerId,Xi.set(p,Ji(Xi.get(p)||null,e,n,s,c,f)),!0}return!1}function Ag(e){var n=po(e.target);if(n!==null){var s=fo(n);if(s!==null){if(n=s.tag,n===13){if(n=xg(s),n!==null){e.blockedOn=n,Tg(e.priority,function(){Og(s)});return}}else if(n===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ja(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var s=ju(e.domEventName,e.eventSystemFlags,n[0],e.nativeEvent);if(s===null){s=e.nativeEvent;var c=new s.constructor(s.type,s);Cu=c,s.target.dispatchEvent(c),Cu=null}else return n=ps(s),n!==null&&Au(n),e.blockedOn=s,!1;n.shift()}return!0}function Lg(e,n,s){ja(e)&&s.delete(n)}function T_(){Lu=!1,Ir!==null&&ja(Ir)&&(Ir=null),Or!==null&&ja(Or)&&(Or=null),Nr!==null&&ja(Nr)&&(Nr=null),Yi.forEach(Lg),Xi.forEach(Lg)}function es(e,n){e.blockedOn===n&&(e.blockedOn=null,Lu||(Lu=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,T_)))}function ts(e){function n(f){return es(f,e)}if(0<$a.length){es($a[0],e);for(var s=1;s<$a.length;s++){var c=$a[s];c.blockedOn===e&&(c.blockedOn=null)}}for(Ir!==null&&es(Ir,e),Or!==null&&es(Or,e),Nr!==null&&es(Nr,e),Yi.forEach(n),Xi.forEach(n),s=0;s<Tr.length;s++)c=Tr[s],c.blockedOn===e&&(c.blockedOn=null);for(;0<Tr.length&&(s=Tr[0],s.blockedOn===null);)Ag(s),s.blockedOn===null&&Tr.shift()}var Jo=O.ReactCurrentBatchConfig,Ma=!0;function D_(e,n,s,c){var f=qe,p=Jo.transition;Jo.transition=null;try{qe=1,$u(e,n,s,c)}finally{qe=f,Jo.transition=p}}function A_(e,n,s,c){var f=qe,p=Jo.transition;Jo.transition=null;try{qe=4,$u(e,n,s,c)}finally{qe=f,Jo.transition=p}}function $u(e,n,s,c){if(Ma){var f=ju(e,n,s,c);if(f===null)ed(e,n,c,za,s),Dg(e,c);else if(N_(f,e,n,s,c))c.stopPropagation();else if(Dg(e,c),n&4&&-1<O_.indexOf(e)){for(;f!==null;){var p=ps(f);if(p!==null&&Ig(p),p=ju(e,n,s,c),p===null&&ed(e,n,c,za,s),p===f)break;f=p}f!==null&&c.stopPropagation()}else ed(e,n,c,null,s)}}var za=null;function ju(e,n,s,c){if(za=null,e=_u(c),e=po(e),e!==null)if(n=fo(e),n===null)e=null;else if(s=n.tag,s===13){if(e=xg(n),e!==null)return e;e=null}else if(s===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null);return za=e,null}function $g(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(S_()){case Ou:return 1;case _g:return 4;case Na:case b_:return 16;case Eg:return 536870912;default:return 16}default:return 16}}var Dr=null,Mu=null,Fa=null;function jg(){if(Fa)return Fa;var e,n=Mu,s=n.length,c,f="value"in Dr?Dr.value:Dr.textContent,p=f.length;for(e=0;e<s&&n[e]===f[e];e++);var x=s-e;for(c=1;c<=x&&n[s-c]===f[p-c];c++);return Fa=f.slice(e,1<c?1-c:void 0)}function Va(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Ua(){return!0}function Mg(){return!1}function qt(e){function n(s,c,f,p,x){this._reactName=s,this._targetInst=f,this.type=c,this.nativeEvent=p,this.target=x,this.currentTarget=null;for(var C in e)e.hasOwnProperty(C)&&(s=e[C],this[C]=s?s(p):p[C]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Ua:Mg,this.isPropagationStopped=Mg,this}return z(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Ua)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Ua)},persist:function(){},isPersistent:Ua}),n}var ei={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zu=qt(ei),ns=z({},ei,{view:0,detail:0}),L_=qt(ns),Fu,Vu,rs,Ba=z({},ns,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==rs&&(rs&&e.type==="mousemove"?(Fu=e.screenX-rs.screenX,Vu=e.screenY-rs.screenY):Vu=Fu=0,rs=e),Fu)},movementY:function(e){return"movementY"in e?e.movementY:Vu}}),zg=qt(Ba),$_=z({},Ba,{dataTransfer:0}),j_=qt($_),M_=z({},ns,{relatedTarget:0}),Uu=qt(M_),z_=z({},ei,{animationName:0,elapsedTime:0,pseudoElement:0}),F_=qt(z_),V_=z({},ei,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),U_=qt(V_),B_=z({},ei,{data:0}),Fg=qt(B_),H_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},W_={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},K_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Z_(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=K_[e])?!!n[e]:!1}function Bu(){return Z_}var q_=z({},ns,{key:function(e){if(e.key){var n=H_[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Va(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?W_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bu,charCode:function(e){return e.type==="keypress"?Va(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Va(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),G_=qt(q_),Q_=z({},Ba,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vg=qt(Q_),Y_=z({},ns,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bu}),X_=qt(Y_),J_=z({},ei,{propertyName:0,elapsedTime:0,pseudoElement:0}),eE=qt(J_),tE=z({},Ba,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),nE=qt(tE),rE=[9,13,27,32],Hu=d&&"CompositionEvent"in window,os=null;d&&"documentMode"in document&&(os=document.documentMode);var oE=d&&"TextEvent"in window&&!os,Ug=d&&(!Hu||os&&8<os&&11>=os),Bg=" ",Hg=!1;function Wg(e,n){switch(e){case"keyup":return rE.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Kg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ti=!1;function iE(e,n){switch(e){case"compositionend":return Kg(n);case"keypress":return n.which!==32?null:(Hg=!0,Bg);case"textInput":return e=n.data,e===Bg&&Hg?null:e;default:return null}}function sE(e,n){if(ti)return e==="compositionend"||!Hu&&Wg(e,n)?(e=jg(),Fa=Mu=Dr=null,ti=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Ug&&n.locale!=="ko"?null:n.data;default:return null}}var aE={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Zg(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!aE[e.type]:n==="textarea"}function qg(e,n,s,c){hg(c),n=qa(n,"onChange"),0<n.length&&(s=new zu("onChange","change",null,s,c),e.push({event:s,listeners:n}))}var is=null,ss=null;function lE(e){fv(e,0)}function Ha(e){var n=si(e);if(je(n))return e}function cE(e,n){if(e==="change")return n}var Gg=!1;if(d){var Wu;if(d){var Ku="oninput"in document;if(!Ku){var Qg=document.createElement("div");Qg.setAttribute("oninput","return;"),Ku=typeof Qg.oninput=="function"}Wu=Ku}else Wu=!1;Gg=Wu&&(!document.documentMode||9<document.documentMode)}function Yg(){is&&(is.detachEvent("onpropertychange",Xg),ss=is=null)}function Xg(e){if(e.propertyName==="value"&&Ha(ss)){var n=[];qg(n,ss,e,_u(e)),yg(lE,n)}}function uE(e,n,s){e==="focusin"?(Yg(),is=n,ss=s,is.attachEvent("onpropertychange",Xg)):e==="focusout"&&Yg()}function dE(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ha(ss)}function fE(e,n){if(e==="click")return Ha(n)}function pE(e,n){if(e==="input"||e==="change")return Ha(n)}function hE(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var hn=typeof Object.is=="function"?Object.is:hE;function as(e,n){if(hn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var s=Object.keys(e),c=Object.keys(n);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var f=s[c];if(!h.call(n,f)||!hn(e[f],n[f]))return!1}return!0}function Jg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ev(e,n){var s=Jg(e);e=0;for(var c;s;){if(s.nodeType===3){if(c=e+s.textContent.length,e<=n&&c>=n)return{node:s,offset:n-e};e=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Jg(s)}}function tv(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?tv(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function nv(){for(var e=window,n=ze();n instanceof e.HTMLIFrameElement;){try{var s=typeof n.contentWindow.location.href=="string"}catch{s=!1}if(s)e=n.contentWindow;else break;n=ze(e.document)}return n}function Zu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function mE(e){var n=nv(),s=e.focusedElem,c=e.selectionRange;if(n!==s&&s&&s.ownerDocument&&tv(s.ownerDocument.documentElement,s)){if(c!==null&&Zu(s)){if(n=c.start,e=c.end,e===void 0&&(e=n),"selectionStart"in s)s.selectionStart=n,s.selectionEnd=Math.min(e,s.value.length);else if(e=(n=s.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var f=s.textContent.length,p=Math.min(c.start,f);c=c.end===void 0?p:Math.min(c.end,f),!e.extend&&p>c&&(f=c,c=p,p=f),f=ev(s,p);var x=ev(s,c);f&&x&&(e.rangeCount!==1||e.anchorNode!==f.node||e.anchorOffset!==f.offset||e.focusNode!==x.node||e.focusOffset!==x.offset)&&(n=n.createRange(),n.setStart(f.node,f.offset),e.removeAllRanges(),p>c?(e.addRange(n),e.extend(x.node,x.offset)):(n.setEnd(x.node,x.offset),e.addRange(n)))}}for(n=[],e=s;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<n.length;s++)e=n[s],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gE=d&&"documentMode"in document&&11>=document.documentMode,ni=null,qu=null,ls=null,Gu=!1;function rv(e,n,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Gu||ni==null||ni!==ze(c)||(c=ni,"selectionStart"in c&&Zu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),ls&&as(ls,c)||(ls=c,c=qa(qu,"onSelect"),0<c.length&&(n=new zu("onSelect","select",null,n,s),e.push({event:n,listeners:c}),n.target=ni)))}function Wa(e,n){var s={};return s[e.toLowerCase()]=n.toLowerCase(),s["Webkit"+e]="webkit"+n,s["Moz"+e]="moz"+n,s}var ri={animationend:Wa("Animation","AnimationEnd"),animationiteration:Wa("Animation","AnimationIteration"),animationstart:Wa("Animation","AnimationStart"),transitionend:Wa("Transition","TransitionEnd")},Qu={},ov={};d&&(ov=document.createElement("div").style,"AnimationEvent"in window||(delete ri.animationend.animation,delete ri.animationiteration.animation,delete ri.animationstart.animation),"TransitionEvent"in window||delete ri.transitionend.transition);function Ka(e){if(Qu[e])return Qu[e];if(!ri[e])return e;var n=ri[e],s;for(s in n)if(n.hasOwnProperty(s)&&s in ov)return Qu[e]=n[s];return e}var iv=Ka("animationend"),sv=Ka("animationiteration"),av=Ka("animationstart"),lv=Ka("transitionend"),cv=new Map,uv="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ar(e,n){cv.set(e,n),l(n,[e])}for(var Yu=0;Yu<uv.length;Yu++){var Xu=uv[Yu],vE=Xu.toLowerCase(),yE=Xu[0].toUpperCase()+Xu.slice(1);Ar(vE,"on"+yE)}Ar(iv,"onAnimationEnd"),Ar(sv,"onAnimationIteration"),Ar(av,"onAnimationStart"),Ar("dblclick","onDoubleClick"),Ar("focusin","onFocus"),Ar("focusout","onBlur"),Ar(lv,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cs="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),xE=new Set("cancel close invalid load scroll toggle".split(" ").concat(cs));function dv(e,n,s){var c=e.type||"unknown-event";e.currentTarget=s,v_(c,n,void 0,e),e.currentTarget=null}function fv(e,n){n=(n&4)!==0;for(var s=0;s<e.length;s++){var c=e[s],f=c.event;c=c.listeners;e:{var p=void 0;if(n)for(var x=c.length-1;0<=x;x--){var C=c[x],P=C.instance,F=C.currentTarget;if(C=C.listener,P!==p&&f.isPropagationStopped())break e;dv(f,C,F),p=P}else for(x=0;x<c.length;x++){if(C=c[x],P=C.instance,F=C.currentTarget,C=C.listener,P!==p&&f.isPropagationStopped())break e;dv(f,C,F),p=P}}}if(Oa)throw e=Iu,Oa=!1,Iu=null,e}function et(e,n){var s=n[sd];s===void 0&&(s=n[sd]=new Set);var c=e+"__bubble";s.has(c)||(pv(n,e,2,!1),s.add(c))}function Ju(e,n,s){var c=0;n&&(c|=4),pv(s,e,c,n)}var Za="_reactListening"+Math.random().toString(36).slice(2);function us(e){if(!e[Za]){e[Za]=!0,i.forEach(function(s){s!=="selectionchange"&&(xE.has(s)||Ju(s,!1,e),Ju(s,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Za]||(n[Za]=!0,Ju("selectionchange",!1,n))}}function pv(e,n,s,c){switch($g(n)){case 1:var f=D_;break;case 4:f=A_;break;default:f=$u}s=f.bind(null,n,s,e),f=void 0,!Pu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),c?f!==void 0?e.addEventListener(n,s,{capture:!0,passive:f}):e.addEventListener(n,s,!0):f!==void 0?e.addEventListener(n,s,{passive:f}):e.addEventListener(n,s,!1)}function ed(e,n,s,c,f){var p=c;if((n&1)===0&&(n&2)===0&&c!==null)e:for(;;){if(c===null)return;var x=c.tag;if(x===3||x===4){var C=c.stateNode.containerInfo;if(C===f||C.nodeType===8&&C.parentNode===f)break;if(x===4)for(x=c.return;x!==null;){var P=x.tag;if((P===3||P===4)&&(P=x.stateNode.containerInfo,P===f||P.nodeType===8&&P.parentNode===f))return;x=x.return}for(;C!==null;){if(x=po(C),x===null)return;if(P=x.tag,P===5||P===6){c=p=x;continue e}C=C.parentNode}}c=c.return}yg(function(){var F=p,Z=_u(s),q=[];e:{var K=cv.get(e);if(K!==void 0){var fe=zu,ye=e;switch(e){case"keypress":if(Va(s)===0)break e;case"keydown":case"keyup":fe=G_;break;case"focusin":ye="focus",fe=Uu;break;case"focusout":ye="blur",fe=Uu;break;case"beforeblur":case"afterblur":fe=Uu;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=zg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=j_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=X_;break;case iv:case sv:case av:fe=F_;break;case lv:fe=eE;break;case"scroll":fe=L_;break;case"wheel":fe=nE;break;case"copy":case"cut":case"paste":fe=U_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=Vg}var we=(n&4)!==0,ut=!we&&e==="scroll",$=we?K!==null?K+"Capture":null:K;we=[];for(var N=F,M;N!==null;){M=N;var ee=M.stateNode;if(M.tag===5&&ee!==null&&(M=ee,$!==null&&(ee=Ki(N,$),ee!=null&&we.push(ds(N,ee,M)))),ut)break;N=N.return}0<we.length&&(K=new fe(K,ye,null,s,Z),q.push({event:K,listeners:we}))}}if((n&7)===0){e:{if(K=e==="mouseover"||e==="pointerover",fe=e==="mouseout"||e==="pointerout",K&&s!==Cu&&(ye=s.relatedTarget||s.fromElement)&&(po(ye)||ye[or]))break e;if((fe||K)&&(K=Z.window===Z?Z:(K=Z.ownerDocument)?K.defaultView||K.parentWindow:window,fe?(ye=s.relatedTarget||s.toElement,fe=F,ye=ye?po(ye):null,ye!==null&&(ut=fo(ye),ye!==ut||ye.tag!==5&&ye.tag!==6)&&(ye=null)):(fe=null,ye=F),fe!==ye)){if(we=zg,ee="onMouseLeave",$="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(we=Vg,ee="onPointerLeave",$="onPointerEnter",N="pointer"),ut=fe==null?K:si(fe),M=ye==null?K:si(ye),K=new we(ee,N+"leave",fe,s,Z),K.target=ut,K.relatedTarget=M,ee=null,po(Z)===F&&(we=new we($,N+"enter",ye,s,Z),we.target=M,we.relatedTarget=ut,ee=we),ut=ee,fe&&ye)t:{for(we=fe,$=ye,N=0,M=we;M;M=oi(M))N++;for(M=0,ee=$;ee;ee=oi(ee))M++;for(;0<N-M;)we=oi(we),N--;for(;0<M-N;)$=oi($),M--;for(;N--;){if(we===$||$!==null&&we===$.alternate)break t;we=oi(we),$=oi($)}we=null}else we=null;fe!==null&&hv(q,K,fe,we,!1),ye!==null&&ut!==null&&hv(q,ut,ye,we,!0)}}e:{if(K=F?si(F):window,fe=K.nodeName&&K.nodeName.toLowerCase(),fe==="select"||fe==="input"&&K.type==="file")var ke=cE;else if(Zg(K))if(Gg)ke=pE;else{ke=dE;var _e=uE}else(fe=K.nodeName)&&fe.toLowerCase()==="input"&&(K.type==="checkbox"||K.type==="radio")&&(ke=fE);if(ke&&(ke=ke(e,F))){qg(q,ke,s,Z);break e}_e&&_e(e,K,F),e==="focusout"&&(_e=K._wrapperState)&&_e.controlled&&K.type==="number"&&Hi(K,"number",K.value)}switch(_e=F?si(F):window,e){case"focusin":(Zg(_e)||_e.contentEditable==="true")&&(ni=_e,qu=F,ls=null);break;case"focusout":ls=qu=ni=null;break;case"mousedown":Gu=!0;break;case"contextmenu":case"mouseup":case"dragend":Gu=!1,rv(q,s,Z);break;case"selectionchange":if(gE)break;case"keydown":case"keyup":rv(q,s,Z)}var Ee;if(Hu)e:{switch(e){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else ti?Wg(e,s)&&(Ie="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Ie="onCompositionStart");Ie&&(Ug&&s.locale!=="ko"&&(ti||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&ti&&(Ee=jg()):(Dr=Z,Mu="value"in Dr?Dr.value:Dr.textContent,ti=!0)),_e=qa(F,Ie),0<_e.length&&(Ie=new Fg(Ie,e,null,s,Z),q.push({event:Ie,listeners:_e}),Ee?Ie.data=Ee:(Ee=Kg(s),Ee!==null&&(Ie.data=Ee)))),(Ee=oE?iE(e,s):sE(e,s))&&(F=qa(F,"onBeforeInput"),0<F.length&&(Z=new Fg("onBeforeInput","beforeinput",null,s,Z),q.push({event:Z,listeners:F}),Z.data=Ee))}fv(q,n)})}function ds(e,n,s){return{instance:e,listener:n,currentTarget:s}}function qa(e,n){for(var s=n+"Capture",c=[];e!==null;){var f=e,p=f.stateNode;f.tag===5&&p!==null&&(f=p,p=Ki(e,s),p!=null&&c.unshift(ds(e,p,f)),p=Ki(e,n),p!=null&&c.push(ds(e,p,f))),e=e.return}return c}function oi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function hv(e,n,s,c,f){for(var p=n._reactName,x=[];s!==null&&s!==c;){var C=s,P=C.alternate,F=C.stateNode;if(P!==null&&P===c)break;C.tag===5&&F!==null&&(C=F,f?(P=Ki(s,p),P!=null&&x.unshift(ds(s,P,C))):f||(P=Ki(s,p),P!=null&&x.push(ds(s,P,C)))),s=s.return}x.length!==0&&e.push({event:n,listeners:x})}var wE=/\r\n?/g,SE=/\u0000|\uFFFD/g;function mv(e){return(typeof e=="string"?e:""+e).replace(wE,`
|
|
6
|
-
`).replace(SE,"")}function Ga(e,n,s){if(n=mv(n),mv(e)!==n&&s)throw Error(o(425))}function Qa(){}var td=null,nd=null;function rd(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var od=typeof setTimeout=="function"?setTimeout:void 0,bE=typeof clearTimeout=="function"?clearTimeout:void 0,gv=typeof Promise=="function"?Promise:void 0,kE=typeof queueMicrotask=="function"?queueMicrotask:typeof gv<"u"?function(e){return gv.resolve(null).then(e).catch(CE)}:od;function CE(e){setTimeout(function(){throw e})}function id(e,n){var s=n,c=0;do{var f=s.nextSibling;if(e.removeChild(s),f&&f.nodeType===8)if(s=f.data,s==="/$"){if(c===0){e.removeChild(f),ts(n);return}c--}else s!=="$"&&s!=="$?"&&s!=="$!"||c++;s=f}while(s);ts(n)}function Lr(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?")break;if(n==="/$")return null}}return e}function vv(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(n===0)return e;n--}else s==="/$"&&n++}e=e.previousSibling}return null}var ii=Math.random().toString(36).slice(2),Ln="__reactFiber$"+ii,fs="__reactProps$"+ii,or="__reactContainer$"+ii,sd="__reactEvents$"+ii,_E="__reactListeners$"+ii,EE="__reactHandles$"+ii;function po(e){var n=e[Ln];if(n)return n;for(var s=e.parentNode;s;){if(n=s[or]||s[Ln]){if(s=n.alternate,n.child!==null||s!==null&&s.child!==null)for(e=vv(e);e!==null;){if(s=e[Ln])return s;e=vv(e)}return n}e=s,s=e.parentNode}return null}function ps(e){return e=e[Ln]||e[or],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function si(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(o(33))}function Ya(e){return e[fs]||null}var ad=[],ai=-1;function $r(e){return{current:e}}function tt(e){0>ai||(e.current=ad[ai],ad[ai]=null,ai--)}function Je(e,n){ai++,ad[ai]=e.current,e.current=n}var jr={},Rt=$r(jr),Vt=$r(!1),ho=jr;function li(e,n){var s=e.type.contextTypes;if(!s)return jr;var c=e.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===n)return c.__reactInternalMemoizedMaskedChildContext;var f={},p;for(p in s)f[p]=n[p];return c&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=f),f}function Ut(e){return e=e.childContextTypes,e!=null}function Xa(){tt(Vt),tt(Rt)}function yv(e,n,s){if(Rt.current!==jr)throw Error(o(168));Je(Rt,n),Je(Vt,s)}function xv(e,n,s){var c=e.stateNode;if(n=n.childContextTypes,typeof c.getChildContext!="function")return s;c=c.getChildContext();for(var f in c)if(!(f in n))throw Error(o(108,pe(e)||"Unknown",f));return z({},s,c)}function Ja(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||jr,ho=Rt.current,Je(Rt,e),Je(Vt,Vt.current),!0}function wv(e,n,s){var c=e.stateNode;if(!c)throw Error(o(169));s?(e=xv(e,n,ho),c.__reactInternalMemoizedMergedChildContext=e,tt(Vt),tt(Rt),Je(Rt,e)):tt(Vt),Je(Vt,s)}var ir=null,el=!1,ld=!1;function Sv(e){ir===null?ir=[e]:ir.push(e)}function RE(e){el=!0,Sv(e)}function Mr(){if(!ld&&ir!==null){ld=!0;var e=0,n=qe;try{var s=ir;for(qe=1;e<s.length;e++){var c=s[e];do c=c(!0);while(c!==null)}ir=null,el=!1}catch(f){throw ir!==null&&(ir=ir.slice(e+1)),kg(Ou,Mr),f}finally{qe=n,ld=!1}}return null}var ci=[],ui=0,tl=null,nl=0,nn=[],rn=0,mo=null,sr=1,ar="";function go(e,n){ci[ui++]=nl,ci[ui++]=tl,tl=e,nl=n}function bv(e,n,s){nn[rn++]=sr,nn[rn++]=ar,nn[rn++]=mo,mo=e;var c=sr;e=ar;var f=32-pn(c)-1;c&=~(1<<f),s+=1;var p=32-pn(n)+f;if(30<p){var x=f-f%5;p=(c&(1<<x)-1).toString(32),c>>=x,f-=x,sr=1<<32-pn(n)+f|s<<f|c,ar=p+e}else sr=1<<p|s<<f|c,ar=e}function cd(e){e.return!==null&&(go(e,1),bv(e,1,0))}function ud(e){for(;e===tl;)tl=ci[--ui],ci[ui]=null,nl=ci[--ui],ci[ui]=null;for(;e===mo;)mo=nn[--rn],nn[rn]=null,ar=nn[--rn],nn[rn]=null,sr=nn[--rn],nn[rn]=null}var Gt=null,Qt=null,rt=!1,mn=null;function kv(e,n){var s=ln(5,null,null,0);s.elementType="DELETED",s.stateNode=n,s.return=e,n=e.deletions,n===null?(e.deletions=[s],e.flags|=16):n.push(s)}function Cv(e,n){switch(e.tag){case 5:var s=e.type;return n=n.nodeType!==1||s.toLowerCase()!==n.nodeName.toLowerCase()?null:n,n!==null?(e.stateNode=n,Gt=e,Qt=Lr(n.firstChild),!0):!1;case 6:return n=e.pendingProps===""||n.nodeType!==3?null:n,n!==null?(e.stateNode=n,Gt=e,Qt=null,!0):!1;case 13:return n=n.nodeType!==8?null:n,n!==null?(s=mo!==null?{id:sr,overflow:ar}:null,e.memoizedState={dehydrated:n,treeContext:s,retryLane:1073741824},s=ln(18,null,null,0),s.stateNode=n,s.return=e,e.child=s,Gt=e,Qt=null,!0):!1;default:return!1}}function dd(e){return(e.mode&1)!==0&&(e.flags&128)===0}function fd(e){if(rt){var n=Qt;if(n){var s=n;if(!Cv(e,n)){if(dd(e))throw Error(o(418));n=Lr(s.nextSibling);var c=Gt;n&&Cv(e,n)?kv(c,s):(e.flags=e.flags&-4097|2,rt=!1,Gt=e)}}else{if(dd(e))throw Error(o(418));e.flags=e.flags&-4097|2,rt=!1,Gt=e}}}function _v(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Gt=e}function rl(e){if(e!==Gt)return!1;if(!rt)return _v(e),rt=!0,!1;var n;if((n=e.tag!==3)&&!(n=e.tag!==5)&&(n=e.type,n=n!=="head"&&n!=="body"&&!rd(e.type,e.memoizedProps)),n&&(n=Qt)){if(dd(e))throw Ev(),Error(o(418));for(;n;)kv(e,n),n=Lr(n.nextSibling)}if(_v(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));e:{for(e=e.nextSibling,n=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"){if(n===0){Qt=Lr(e.nextSibling);break e}n--}else s!=="$"&&s!=="$!"&&s!=="$?"||n++}e=e.nextSibling}Qt=null}}else Qt=Gt?Lr(e.stateNode.nextSibling):null;return!0}function Ev(){for(var e=Qt;e;)e=Lr(e.nextSibling)}function di(){Qt=Gt=null,rt=!1}function pd(e){mn===null?mn=[e]:mn.push(e)}var PE=O.ReactCurrentBatchConfig;function hs(e,n,s){if(e=s.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(o(309));var c=s.stateNode}if(!c)throw Error(o(147,e));var f=c,p=""+e;return n!==null&&n.ref!==null&&typeof n.ref=="function"&&n.ref._stringRef===p?n.ref:(n=function(x){var C=f.refs;x===null?delete C[p]:C[p]=x},n._stringRef=p,n)}if(typeof e!="string")throw Error(o(284));if(!s._owner)throw Error(o(290,e))}return e}function ol(e,n){throw e=Object.prototype.toString.call(n),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e))}function Rv(e){var n=e._init;return n(e._payload)}function Pv(e){function n($,N){if(e){var M=$.deletions;M===null?($.deletions=[N],$.flags|=16):M.push(N)}}function s($,N){if(!e)return null;for(;N!==null;)n($,N),N=N.sibling;return null}function c($,N){for($=new Map;N!==null;)N.key!==null?$.set(N.key,N):$.set(N.index,N),N=N.sibling;return $}function f($,N){return $=Kr($,N),$.index=0,$.sibling=null,$}function p($,N,M){return $.index=M,e?(M=$.alternate,M!==null?(M=M.index,M<N?($.flags|=2,N):M):($.flags|=2,N)):($.flags|=1048576,N)}function x($){return e&&$.alternate===null&&($.flags|=2),$}function C($,N,M,ee){return N===null||N.tag!==6?(N=of(M,$.mode,ee),N.return=$,N):(N=f(N,M),N.return=$,N)}function P($,N,M,ee){var ke=M.type;return ke===B?Z($,N,M.props.children,ee,M.key):N!==null&&(N.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===ae&&Rv(ke)===N.type)?(ee=f(N,M.props),ee.ref=hs($,N,M),ee.return=$,ee):(ee=Pl(M.type,M.key,M.props,null,$.mode,ee),ee.ref=hs($,N,M),ee.return=$,ee)}function F($,N,M,ee){return N===null||N.tag!==4||N.stateNode.containerInfo!==M.containerInfo||N.stateNode.implementation!==M.implementation?(N=sf(M,$.mode,ee),N.return=$,N):(N=f(N,M.children||[]),N.return=$,N)}function Z($,N,M,ee,ke){return N===null||N.tag!==7?(N=Co(M,$.mode,ee,ke),N.return=$,N):(N=f(N,M),N.return=$,N)}function q($,N,M){if(typeof N=="string"&&N!==""||typeof N=="number")return N=of(""+N,$.mode,M),N.return=$,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case V:return M=Pl(N.type,N.key,N.props,null,$.mode,M),M.ref=hs($,null,N),M.return=$,M;case L:return N=sf(N,$.mode,M),N.return=$,N;case ae:var ee=N._init;return q($,ee(N._payload),M)}if(uo(N)||G(N))return N=Co(N,$.mode,M,null),N.return=$,N;ol($,N)}return null}function K($,N,M,ee){var ke=N!==null?N.key:null;if(typeof M=="string"&&M!==""||typeof M=="number")return ke!==null?null:C($,N,""+M,ee);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case V:return M.key===ke?P($,N,M,ee):null;case L:return M.key===ke?F($,N,M,ee):null;case ae:return ke=M._init,K($,N,ke(M._payload),ee)}if(uo(M)||G(M))return ke!==null?null:Z($,N,M,ee,null);ol($,M)}return null}function fe($,N,M,ee,ke){if(typeof ee=="string"&&ee!==""||typeof ee=="number")return $=$.get(M)||null,C(N,$,""+ee,ke);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case V:return $=$.get(ee.key===null?M:ee.key)||null,P(N,$,ee,ke);case L:return $=$.get(ee.key===null?M:ee.key)||null,F(N,$,ee,ke);case ae:var _e=ee._init;return fe($,N,M,_e(ee._payload),ke)}if(uo(ee)||G(ee))return $=$.get(M)||null,Z(N,$,ee,ke,null);ol(N,ee)}return null}function ye($,N,M,ee){for(var ke=null,_e=null,Ee=N,Ie=N=0,Ct=null;Ee!==null&&Ie<M.length;Ie++){Ee.index>Ie?(Ct=Ee,Ee=null):Ct=Ee.sibling;var He=K($,Ee,M[Ie],ee);if(He===null){Ee===null&&(Ee=Ct);break}e&&Ee&&He.alternate===null&&n($,Ee),N=p(He,N,Ie),_e===null?ke=He:_e.sibling=He,_e=He,Ee=Ct}if(Ie===M.length)return s($,Ee),rt&&go($,Ie),ke;if(Ee===null){for(;Ie<M.length;Ie++)Ee=q($,M[Ie],ee),Ee!==null&&(N=p(Ee,N,Ie),_e===null?ke=Ee:_e.sibling=Ee,_e=Ee);return rt&&go($,Ie),ke}for(Ee=c($,Ee);Ie<M.length;Ie++)Ct=fe(Ee,$,Ie,M[Ie],ee),Ct!==null&&(e&&Ct.alternate!==null&&Ee.delete(Ct.key===null?Ie:Ct.key),N=p(Ct,N,Ie),_e===null?ke=Ct:_e.sibling=Ct,_e=Ct);return e&&Ee.forEach(function(Zr){return n($,Zr)}),rt&&go($,Ie),ke}function we($,N,M,ee){var ke=G(M);if(typeof ke!="function")throw Error(o(150));if(M=ke.call(M),M==null)throw Error(o(151));for(var _e=ke=null,Ee=N,Ie=N=0,Ct=null,He=M.next();Ee!==null&&!He.done;Ie++,He=M.next()){Ee.index>Ie?(Ct=Ee,Ee=null):Ct=Ee.sibling;var Zr=K($,Ee,He.value,ee);if(Zr===null){Ee===null&&(Ee=Ct);break}e&&Ee&&Zr.alternate===null&&n($,Ee),N=p(Zr,N,Ie),_e===null?ke=Zr:_e.sibling=Zr,_e=Zr,Ee=Ct}if(He.done)return s($,Ee),rt&&go($,Ie),ke;if(Ee===null){for(;!He.done;Ie++,He=M.next())He=q($,He.value,ee),He!==null&&(N=p(He,N,Ie),_e===null?ke=He:_e.sibling=He,_e=He);return rt&&go($,Ie),ke}for(Ee=c($,Ee);!He.done;Ie++,He=M.next())He=fe(Ee,$,Ie,He.value,ee),He!==null&&(e&&He.alternate!==null&&Ee.delete(He.key===null?Ie:He.key),N=p(He,N,Ie),_e===null?ke=He:_e.sibling=He,_e=He);return e&&Ee.forEach(function(aR){return n($,aR)}),rt&&go($,Ie),ke}function ut($,N,M,ee){if(typeof M=="object"&&M!==null&&M.type===B&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case V:e:{for(var ke=M.key,_e=N;_e!==null;){if(_e.key===ke){if(ke=M.type,ke===B){if(_e.tag===7){s($,_e.sibling),N=f(_e,M.props.children),N.return=$,$=N;break e}}else if(_e.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===ae&&Rv(ke)===_e.type){s($,_e.sibling),N=f(_e,M.props),N.ref=hs($,_e,M),N.return=$,$=N;break e}s($,_e);break}else n($,_e);_e=_e.sibling}M.type===B?(N=Co(M.props.children,$.mode,ee,M.key),N.return=$,$=N):(ee=Pl(M.type,M.key,M.props,null,$.mode,ee),ee.ref=hs($,N,M),ee.return=$,$=ee)}return x($);case L:e:{for(_e=M.key;N!==null;){if(N.key===_e)if(N.tag===4&&N.stateNode.containerInfo===M.containerInfo&&N.stateNode.implementation===M.implementation){s($,N.sibling),N=f(N,M.children||[]),N.return=$,$=N;break e}else{s($,N);break}else n($,N);N=N.sibling}N=sf(M,$.mode,ee),N.return=$,$=N}return x($);case ae:return _e=M._init,ut($,N,_e(M._payload),ee)}if(uo(M))return ye($,N,M,ee);if(G(M))return we($,N,M,ee);ol($,M)}return typeof M=="string"&&M!==""||typeof M=="number"?(M=""+M,N!==null&&N.tag===6?(s($,N.sibling),N=f(N,M),N.return=$,$=N):(s($,N),N=of(M,$.mode,ee),N.return=$,$=N),x($)):s($,N)}return ut}var fi=Pv(!0),Iv=Pv(!1),il=$r(null),sl=null,pi=null,hd=null;function md(){hd=pi=sl=null}function gd(e){var n=il.current;tt(il),e._currentValue=n}function vd(e,n,s){for(;e!==null;){var c=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,c!==null&&(c.childLanes|=n)):c!==null&&(c.childLanes&n)!==n&&(c.childLanes|=n),e===s)break;e=e.return}}function hi(e,n){sl=e,hd=pi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&n)!==0&&(Bt=!0),e.firstContext=null)}function on(e){var n=e._currentValue;if(hd!==e)if(e={context:e,memoizedValue:n,next:null},pi===null){if(sl===null)throw Error(o(308));pi=e,sl.dependencies={lanes:0,firstContext:e}}else pi=pi.next=e;return n}var vo=null;function yd(e){vo===null?vo=[e]:vo.push(e)}function Ov(e,n,s,c){var f=n.interleaved;return f===null?(s.next=s,yd(n)):(s.next=f.next,f.next=s),n.interleaved=s,lr(e,c)}function lr(e,n){e.lanes|=n;var s=e.alternate;for(s!==null&&(s.lanes|=n),s=e,e=e.return;e!==null;)e.childLanes|=n,s=e.alternate,s!==null&&(s.childLanes|=n),s=e,e=e.return;return s.tag===3?s.stateNode:null}var zr=!1;function xd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Nv(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function cr(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function Fr(e,n,s){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(Ue&2)!==0){var f=c.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),c.pending=n,lr(e,s)}return f=c.interleaved,f===null?(n.next=n,yd(c)):(n.next=f.next,f.next=n),c.interleaved=n,lr(e,s)}function al(e,n,s){if(n=n.updateQueue,n!==null&&(n=n.shared,(s&4194240)!==0)){var c=n.lanes;c&=e.pendingLanes,s|=c,n.lanes=s,Du(e,s)}}function Tv(e,n){var s=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var f=null,p=null;if(s=s.firstBaseUpdate,s!==null){do{var x={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};p===null?f=p=x:p=p.next=x,s=s.next}while(s!==null);p===null?f=p=n:p=p.next=n}else f=p=n;s={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:p,shared:c.shared,effects:c.effects},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=n:e.next=n,s.lastBaseUpdate=n}function ll(e,n,s,c){var f=e.updateQueue;zr=!1;var p=f.firstBaseUpdate,x=f.lastBaseUpdate,C=f.shared.pending;if(C!==null){f.shared.pending=null;var P=C,F=P.next;P.next=null,x===null?p=F:x.next=F,x=P;var Z=e.alternate;Z!==null&&(Z=Z.updateQueue,C=Z.lastBaseUpdate,C!==x&&(C===null?Z.firstBaseUpdate=F:C.next=F,Z.lastBaseUpdate=P))}if(p!==null){var q=f.baseState;x=0,Z=F=P=null,C=p;do{var K=C.lane,fe=C.eventTime;if((c&K)===K){Z!==null&&(Z=Z.next={eventTime:fe,lane:0,tag:C.tag,payload:C.payload,callback:C.callback,next:null});e:{var ye=e,we=C;switch(K=n,fe=s,we.tag){case 1:if(ye=we.payload,typeof ye=="function"){q=ye.call(fe,q,K);break e}q=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=we.payload,K=typeof ye=="function"?ye.call(fe,q,K):ye,K==null)break e;q=z({},q,K);break e;case 2:zr=!0}}C.callback!==null&&C.lane!==0&&(e.flags|=64,K=f.effects,K===null?f.effects=[C]:K.push(C))}else fe={eventTime:fe,lane:K,tag:C.tag,payload:C.payload,callback:C.callback,next:null},Z===null?(F=Z=fe,P=q):Z=Z.next=fe,x|=K;if(C=C.next,C===null){if(C=f.shared.pending,C===null)break;K=C,C=K.next,K.next=null,f.lastBaseUpdate=K,f.shared.pending=null}}while(!0);if(Z===null&&(P=q),f.baseState=P,f.firstBaseUpdate=F,f.lastBaseUpdate=Z,n=f.shared.interleaved,n!==null){f=n;do x|=f.lane,f=f.next;while(f!==n)}else p===null&&(f.shared.lanes=0);wo|=x,e.lanes=x,e.memoizedState=q}}function Dv(e,n,s){if(e=n.effects,n.effects=null,e!==null)for(n=0;n<e.length;n++){var c=e[n],f=c.callback;if(f!==null){if(c.callback=null,c=s,typeof f!="function")throw Error(o(191,f));f.call(c)}}}var ms={},$n=$r(ms),gs=$r(ms),vs=$r(ms);function yo(e){if(e===ms)throw Error(o(174));return e}function wd(e,n){switch(Je(vs,n),Je(gs,e),Je($n,ms),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:Xe(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=Xe(n,e)}tt($n),Je($n,n)}function mi(){tt($n),tt(gs),tt(vs)}function Av(e){yo(vs.current);var n=yo($n.current),s=Xe(n,e.type);n!==s&&(Je(gs,e),Je($n,s))}function Sd(e){gs.current===e&&(tt($n),tt(gs))}var st=$r(0);function cl(e){for(var n=e;n!==null;){if(n.tag===13){var s=n.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var bd=[];function kd(){for(var e=0;e<bd.length;e++)bd[e]._workInProgressVersionPrimary=null;bd.length=0}var ul=O.ReactCurrentDispatcher,Cd=O.ReactCurrentBatchConfig,xo=0,at=null,vt=null,bt=null,dl=!1,ys=!1,xs=0,IE=0;function Pt(){throw Error(o(321))}function _d(e,n){if(n===null)return!1;for(var s=0;s<n.length&&s<e.length;s++)if(!hn(e[s],n[s]))return!1;return!0}function Ed(e,n,s,c,f,p){if(xo=p,at=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,ul.current=e===null||e.memoizedState===null?DE:AE,e=s(c,f),ys){p=0;do{if(ys=!1,xs=0,25<=p)throw Error(o(301));p+=1,bt=vt=null,n.updateQueue=null,ul.current=LE,e=s(c,f)}while(ys)}if(ul.current=hl,n=vt!==null&&vt.next!==null,xo=0,bt=vt=at=null,dl=!1,n)throw Error(o(300));return e}function Rd(){var e=xs!==0;return xs=0,e}function jn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bt===null?at.memoizedState=bt=e:bt=bt.next=e,bt}function sn(){if(vt===null){var e=at.alternate;e=e!==null?e.memoizedState:null}else e=vt.next;var n=bt===null?at.memoizedState:bt.next;if(n!==null)bt=n,vt=e;else{if(e===null)throw Error(o(310));vt=e,e={memoizedState:vt.memoizedState,baseState:vt.baseState,baseQueue:vt.baseQueue,queue:vt.queue,next:null},bt===null?at.memoizedState=bt=e:bt=bt.next=e}return bt}function ws(e,n){return typeof n=="function"?n(e):n}function Pd(e){var n=sn(),s=n.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var c=vt,f=c.baseQueue,p=s.pending;if(p!==null){if(f!==null){var x=f.next;f.next=p.next,p.next=x}c.baseQueue=f=p,s.pending=null}if(f!==null){p=f.next,c=c.baseState;var C=x=null,P=null,F=p;do{var Z=F.lane;if((xo&Z)===Z)P!==null&&(P=P.next={lane:0,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),c=F.hasEagerState?F.eagerState:e(c,F.action);else{var q={lane:Z,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null};P===null?(C=P=q,x=c):P=P.next=q,at.lanes|=Z,wo|=Z}F=F.next}while(F!==null&&F!==p);P===null?x=c:P.next=C,hn(c,n.memoizedState)||(Bt=!0),n.memoizedState=c,n.baseState=x,n.baseQueue=P,s.lastRenderedState=c}if(e=s.interleaved,e!==null){f=e;do p=f.lane,at.lanes|=p,wo|=p,f=f.next;while(f!==e)}else f===null&&(s.lanes=0);return[n.memoizedState,s.dispatch]}function Id(e){var n=sn(),s=n.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var c=s.dispatch,f=s.pending,p=n.memoizedState;if(f!==null){s.pending=null;var x=f=f.next;do p=e(p,x.action),x=x.next;while(x!==f);hn(p,n.memoizedState)||(Bt=!0),n.memoizedState=p,n.baseQueue===null&&(n.baseState=p),s.lastRenderedState=p}return[p,c]}function Lv(){}function $v(e,n){var s=at,c=sn(),f=n(),p=!hn(c.memoizedState,f);if(p&&(c.memoizedState=f,Bt=!0),c=c.queue,Od(zv.bind(null,s,c,e),[e]),c.getSnapshot!==n||p||bt!==null&&bt.memoizedState.tag&1){if(s.flags|=2048,Ss(9,Mv.bind(null,s,c,f,n),void 0,null),kt===null)throw Error(o(349));(xo&30)!==0||jv(s,n,f)}return f}function jv(e,n,s){e.flags|=16384,e={getSnapshot:n,value:s},n=at.updateQueue,n===null?(n={lastEffect:null,stores:null},at.updateQueue=n,n.stores=[e]):(s=n.stores,s===null?n.stores=[e]:s.push(e))}function Mv(e,n,s,c){n.value=s,n.getSnapshot=c,Fv(n)&&Vv(e)}function zv(e,n,s){return s(function(){Fv(n)&&Vv(e)})}function Fv(e){var n=e.getSnapshot;e=e.value;try{var s=n();return!hn(e,s)}catch{return!0}}function Vv(e){var n=lr(e,1);n!==null&&xn(n,e,1,-1)}function Uv(e){var n=jn();return typeof e=="function"&&(e=e()),n.memoizedState=n.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ws,lastRenderedState:e},n.queue=e,e=e.dispatch=TE.bind(null,at,e),[n.memoizedState,e]}function Ss(e,n,s,c){return e={tag:e,create:n,destroy:s,deps:c,next:null},n=at.updateQueue,n===null?(n={lastEffect:null,stores:null},at.updateQueue=n,n.lastEffect=e.next=e):(s=n.lastEffect,s===null?n.lastEffect=e.next=e:(c=s.next,s.next=e,e.next=c,n.lastEffect=e)),e}function Bv(){return sn().memoizedState}function fl(e,n,s,c){var f=jn();at.flags|=e,f.memoizedState=Ss(1|n,s,void 0,c===void 0?null:c)}function pl(e,n,s,c){var f=sn();c=c===void 0?null:c;var p=void 0;if(vt!==null){var x=vt.memoizedState;if(p=x.destroy,c!==null&&_d(c,x.deps)){f.memoizedState=Ss(n,s,p,c);return}}at.flags|=e,f.memoizedState=Ss(1|n,s,p,c)}function Hv(e,n){return fl(8390656,8,e,n)}function Od(e,n){return pl(2048,8,e,n)}function Wv(e,n){return pl(4,2,e,n)}function Kv(e,n){return pl(4,4,e,n)}function Zv(e,n){if(typeof n=="function")return e=e(),n(e),function(){n(null)};if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function qv(e,n,s){return s=s!=null?s.concat([e]):null,pl(4,4,Zv.bind(null,n,e),s)}function Nd(){}function Gv(e,n){var s=sn();n=n===void 0?null:n;var c=s.memoizedState;return c!==null&&n!==null&&_d(n,c[1])?c[0]:(s.memoizedState=[e,n],e)}function Qv(e,n){var s=sn();n=n===void 0?null:n;var c=s.memoizedState;return c!==null&&n!==null&&_d(n,c[1])?c[0]:(e=e(),s.memoizedState=[e,n],e)}function Yv(e,n,s){return(xo&21)===0?(e.baseState&&(e.baseState=!1,Bt=!0),e.memoizedState=s):(hn(s,n)||(s=Rg(),at.lanes|=s,wo|=s,e.baseState=!0),n)}function OE(e,n){var s=qe;qe=s!==0&&4>s?s:4,e(!0);var c=Cd.transition;Cd.transition={};try{e(!1),n()}finally{qe=s,Cd.transition=c}}function Xv(){return sn().memoizedState}function NE(e,n,s){var c=Hr(e);if(s={lane:c,action:s,hasEagerState:!1,eagerState:null,next:null},Jv(e))ey(n,s);else if(s=Ov(e,n,s,c),s!==null){var f=$t();xn(s,e,c,f),ty(s,n,c)}}function TE(e,n,s){var c=Hr(e),f={lane:c,action:s,hasEagerState:!1,eagerState:null,next:null};if(Jv(e))ey(n,f);else{var p=e.alternate;if(e.lanes===0&&(p===null||p.lanes===0)&&(p=n.lastRenderedReducer,p!==null))try{var x=n.lastRenderedState,C=p(x,s);if(f.hasEagerState=!0,f.eagerState=C,hn(C,x)){var P=n.interleaved;P===null?(f.next=f,yd(n)):(f.next=P.next,P.next=f),n.interleaved=f;return}}catch{}s=Ov(e,n,f,c),s!==null&&(f=$t(),xn(s,e,c,f),ty(s,n,c))}}function Jv(e){var n=e.alternate;return e===at||n!==null&&n===at}function ey(e,n){ys=dl=!0;var s=e.pending;s===null?n.next=n:(n.next=s.next,s.next=n),e.pending=n}function ty(e,n,s){if((s&4194240)!==0){var c=n.lanes;c&=e.pendingLanes,s|=c,n.lanes=s,Du(e,s)}}var hl={readContext:on,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useInsertionEffect:Pt,useLayoutEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useMutableSource:Pt,useSyncExternalStore:Pt,useId:Pt,unstable_isNewReconciler:!1},DE={readContext:on,useCallback:function(e,n){return jn().memoizedState=[e,n===void 0?null:n],e},useContext:on,useEffect:Hv,useImperativeHandle:function(e,n,s){return s=s!=null?s.concat([e]):null,fl(4194308,4,Zv.bind(null,n,e),s)},useLayoutEffect:function(e,n){return fl(4194308,4,e,n)},useInsertionEffect:function(e,n){return fl(4,2,e,n)},useMemo:function(e,n){var s=jn();return n=n===void 0?null:n,e=e(),s.memoizedState=[e,n],e},useReducer:function(e,n,s){var c=jn();return n=s!==void 0?s(n):n,c.memoizedState=c.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},c.queue=e,e=e.dispatch=NE.bind(null,at,e),[c.memoizedState,e]},useRef:function(e){var n=jn();return e={current:e},n.memoizedState=e},useState:Uv,useDebugValue:Nd,useDeferredValue:function(e){return jn().memoizedState=e},useTransition:function(){var e=Uv(!1),n=e[0];return e=OE.bind(null,e[1]),jn().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,s){var c=at,f=jn();if(rt){if(s===void 0)throw Error(o(407));s=s()}else{if(s=n(),kt===null)throw Error(o(349));(xo&30)!==0||jv(c,n,s)}f.memoizedState=s;var p={value:s,getSnapshot:n};return f.queue=p,Hv(zv.bind(null,c,p,e),[e]),c.flags|=2048,Ss(9,Mv.bind(null,c,p,s,n),void 0,null),s},useId:function(){var e=jn(),n=kt.identifierPrefix;if(rt){var s=ar,c=sr;s=(c&~(1<<32-pn(c)-1)).toString(32)+s,n=":"+n+"R"+s,s=xs++,0<s&&(n+="H"+s.toString(32)),n+=":"}else s=IE++,n=":"+n+"r"+s.toString(32)+":";return e.memoizedState=n},unstable_isNewReconciler:!1},AE={readContext:on,useCallback:Gv,useContext:on,useEffect:Od,useImperativeHandle:qv,useInsertionEffect:Wv,useLayoutEffect:Kv,useMemo:Qv,useReducer:Pd,useRef:Bv,useState:function(){return Pd(ws)},useDebugValue:Nd,useDeferredValue:function(e){var n=sn();return Yv(n,vt.memoizedState,e)},useTransition:function(){var e=Pd(ws)[0],n=sn().memoizedState;return[e,n]},useMutableSource:Lv,useSyncExternalStore:$v,useId:Xv,unstable_isNewReconciler:!1},LE={readContext:on,useCallback:Gv,useContext:on,useEffect:Od,useImperativeHandle:qv,useInsertionEffect:Wv,useLayoutEffect:Kv,useMemo:Qv,useReducer:Id,useRef:Bv,useState:function(){return Id(ws)},useDebugValue:Nd,useDeferredValue:function(e){var n=sn();return vt===null?n.memoizedState=e:Yv(n,vt.memoizedState,e)},useTransition:function(){var e=Id(ws)[0],n=sn().memoizedState;return[e,n]},useMutableSource:Lv,useSyncExternalStore:$v,useId:Xv,unstable_isNewReconciler:!1};function gn(e,n){if(e&&e.defaultProps){n=z({},n),e=e.defaultProps;for(var s in e)n[s]===void 0&&(n[s]=e[s]);return n}return n}function Td(e,n,s,c){n=e.memoizedState,s=s(c,n),s=s==null?n:z({},n,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var ml={isMounted:function(e){return(e=e._reactInternals)?fo(e)===e:!1},enqueueSetState:function(e,n,s){e=e._reactInternals;var c=$t(),f=Hr(e),p=cr(c,f);p.payload=n,s!=null&&(p.callback=s),n=Fr(e,p,f),n!==null&&(xn(n,e,f,c),al(n,e,f))},enqueueReplaceState:function(e,n,s){e=e._reactInternals;var c=$t(),f=Hr(e),p=cr(c,f);p.tag=1,p.payload=n,s!=null&&(p.callback=s),n=Fr(e,p,f),n!==null&&(xn(n,e,f,c),al(n,e,f))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var s=$t(),c=Hr(e),f=cr(s,c);f.tag=2,n!=null&&(f.callback=n),n=Fr(e,f,c),n!==null&&(xn(n,e,c,s),al(n,e,c))}};function ny(e,n,s,c,f,p,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(c,p,x):n.prototype&&n.prototype.isPureReactComponent?!as(s,c)||!as(f,p):!0}function ry(e,n,s){var c=!1,f=jr,p=n.contextType;return typeof p=="object"&&p!==null?p=on(p):(f=Ut(n)?ho:Rt.current,c=n.contextTypes,p=(c=c!=null)?li(e,f):jr),n=new n(s,p),e.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=ml,e.stateNode=n,n._reactInternals=e,c&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=f,e.__reactInternalMemoizedMaskedChildContext=p),n}function oy(e,n,s,c){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(s,c),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(s,c),n.state!==e&&ml.enqueueReplaceState(n,n.state,null)}function Dd(e,n,s,c){var f=e.stateNode;f.props=s,f.state=e.memoizedState,f.refs={},xd(e);var p=n.contextType;typeof p=="object"&&p!==null?f.context=on(p):(p=Ut(n)?ho:Rt.current,f.context=li(e,p)),f.state=e.memoizedState,p=n.getDerivedStateFromProps,typeof p=="function"&&(Td(e,n,p,s),f.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(n=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),n!==f.state&&ml.enqueueReplaceState(f,f.state,null),ll(e,s,f,c),f.state=e.memoizedState),typeof f.componentDidMount=="function"&&(e.flags|=4194308)}function gi(e,n){try{var s="",c=n;do s+=H(c),c=c.return;while(c);var f=s}catch(p){f=`
|
|
7
|
-
Error generating stack: `+
|
|
8
|
-
`+p.stack}return{value:e,source:n,stack:f,digest:null}}function Ad(e,n,s){return{value:e,source:null,stack:s??null,digest:n??null}}function Ld(e,n){try{console.error(n.value)}catch(s){setTimeout(function(){throw s})}}var $E=typeof WeakMap=="function"?WeakMap:Map;function iy(e,n,s){s=cr(-1,s),s.tag=3,s.payload={element:null};var c=n.value;return s.callback=function(){bl||(bl=!0,Qd=c),Ld(e,n)},s}function sy(e,n,s){s=cr(-1,s),s.tag=3;var c=e.type.getDerivedStateFromError;if(typeof c=="function"){var f=n.value;s.payload=function(){return c(f)},s.callback=function(){Ld(e,n)}}var p=e.stateNode;return p!==null&&typeof p.componentDidCatch=="function"&&(s.callback=function(){Ld(e,n),typeof c!="function"&&(Ur===null?Ur=new Set([this]):Ur.add(this));var x=n.stack;this.componentDidCatch(n.value,{componentStack:x!==null?x:""})}),s}function ay(e,n,s){var c=e.pingCache;if(c===null){c=e.pingCache=new $E;var f=new Set;c.set(n,f)}else f=c.get(n),f===void 0&&(f=new Set,c.set(n,f));f.has(s)||(f.add(s),e=QE.bind(null,e,n,s),n.then(e,e))}function ly(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function cy(e,n,s,c,f){return(e.mode&1)===0?(e===n?e.flags|=65536:(e.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(n=cr(-1,1),n.tag=2,Fr(s,n,1))),s.lanes|=1),e):(e.flags|=65536,e.lanes=f,e)}var jE=O.ReactCurrentOwner,Bt=!1;function Lt(e,n,s,c){n.child=e===null?Iv(n,null,s,c):fi(n,e.child,s,c)}function uy(e,n,s,c,f){s=s.render;var p=n.ref;return hi(n,f),c=Ed(e,n,s,c,p,f),s=Rd(),e!==null&&!Bt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~f,ur(e,n,f)):(rt&&s&&cd(n),n.flags|=1,Lt(e,n,c,f),n.child)}function dy(e,n,s,c,f){if(e===null){var p=s.type;return typeof p=="function"&&!rf(p)&&p.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(n.tag=15,n.type=p,fy(e,n,p,c,f)):(e=Pl(s.type,null,c,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(p=e.child,(e.lanes&f)===0){var x=p.memoizedProps;if(s=s.compare,s=s!==null?s:as,s(x,c)&&e.ref===n.ref)return ur(e,n,f)}return n.flags|=1,e=Kr(p,c),e.ref=n.ref,e.return=n,n.child=e}function fy(e,n,s,c,f){if(e!==null){var p=e.memoizedProps;if(as(p,c)&&e.ref===n.ref)if(Bt=!1,n.pendingProps=c=p,(e.lanes&f)!==0)(e.flags&131072)!==0&&(Bt=!0);else return n.lanes=e.lanes,ur(e,n,f)}return $d(e,n,s,c,f)}function py(e,n,s){var c=n.pendingProps,f=c.children,p=e!==null?e.memoizedState:null;if(c.mode==="hidden")if((n.mode&1)===0)n.memoizedState={baseLanes:0,cachePool:null,transitions:null},Je(yi,Yt),Yt|=s;else{if((s&1073741824)===0)return e=p!==null?p.baseLanes|s:s,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,Je(yi,Yt),Yt|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=p!==null?p.baseLanes:s,Je(yi,Yt),Yt|=c}else p!==null?(c=p.baseLanes|s,n.memoizedState=null):c=s,Je(yi,Yt),Yt|=c;return Lt(e,n,f,s),n.child}function hy(e,n){var s=n.ref;(e===null&&s!==null||e!==null&&e.ref!==s)&&(n.flags|=512,n.flags|=2097152)}function $d(e,n,s,c,f){var p=Ut(s)?ho:Rt.current;return p=li(n,p),hi(n,f),s=Ed(e,n,s,c,p,f),c=Rd(),e!==null&&!Bt?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~f,ur(e,n,f)):(rt&&c&&cd(n),n.flags|=1,Lt(e,n,s,f),n.child)}function my(e,n,s,c,f){if(Ut(s)){var p=!0;Ja(n)}else p=!1;if(hi(n,f),n.stateNode===null)vl(e,n),ry(n,s,c),Dd(n,s,c,f),c=!0;else if(e===null){var x=n.stateNode,C=n.memoizedProps;x.props=C;var P=x.context,F=s.contextType;typeof F=="object"&&F!==null?F=on(F):(F=Ut(s)?ho:Rt.current,F=li(n,F));var Z=s.getDerivedStateFromProps,q=typeof Z=="function"||typeof x.getSnapshotBeforeUpdate=="function";q||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(C!==c||P!==F)&&oy(n,x,c,F),zr=!1;var K=n.memoizedState;x.state=K,ll(n,c,x,f),P=n.memoizedState,C!==c||K!==P||Vt.current||zr?(typeof Z=="function"&&(Td(n,s,Z,c),P=n.memoizedState),(C=zr||ny(n,s,C,c,K,P,F))?(q||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(n.flags|=4194308)):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=c,n.memoizedState=P),x.props=c,x.state=P,x.context=F,c=C):(typeof x.componentDidMount=="function"&&(n.flags|=4194308),c=!1)}else{x=n.stateNode,Nv(e,n),C=n.memoizedProps,F=n.type===n.elementType?C:gn(n.type,C),x.props=F,q=n.pendingProps,K=x.context,P=s.contextType,typeof P=="object"&&P!==null?P=on(P):(P=Ut(s)?ho:Rt.current,P=li(n,P));var fe=s.getDerivedStateFromProps;(Z=typeof fe=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(C!==q||K!==P)&&oy(n,x,c,P),zr=!1,K=n.memoizedState,x.state=K,ll(n,c,x,f);var ye=n.memoizedState;C!==q||K!==ye||Vt.current||zr?(typeof fe=="function"&&(Td(n,s,fe,c),ye=n.memoizedState),(F=zr||ny(n,s,F,c,K,ye,P)||!1)?(Z||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(c,ye,P),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(c,ye,P)),typeof x.componentDidUpdate=="function"&&(n.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof x.componentDidUpdate!="function"||C===e.memoizedProps&&K===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&K===e.memoizedState||(n.flags|=1024),n.memoizedProps=c,n.memoizedState=ye),x.props=c,x.state=ye,x.context=P,c=F):(typeof x.componentDidUpdate!="function"||C===e.memoizedProps&&K===e.memoizedState||(n.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||C===e.memoizedProps&&K===e.memoizedState||(n.flags|=1024),c=!1)}return jd(e,n,s,c,p,f)}function jd(e,n,s,c,f,p){hy(e,n);var x=(n.flags&128)!==0;if(!c&&!x)return f&&wv(n,s,!1),ur(e,n,p);c=n.stateNode,jE.current=n;var C=x&&typeof s.getDerivedStateFromError!="function"?null:c.render();return n.flags|=1,e!==null&&x?(n.child=fi(n,e.child,null,p),n.child=fi(n,null,C,p)):Lt(e,n,C,p),n.memoizedState=c.state,f&&wv(n,s,!0),n.child}function gy(e){var n=e.stateNode;n.pendingContext?yv(e,n.pendingContext,n.pendingContext!==n.context):n.context&&yv(e,n.context,!1),wd(e,n.containerInfo)}function vy(e,n,s,c,f){return di(),pd(f),n.flags|=256,Lt(e,n,s,c),n.child}var Md={dehydrated:null,treeContext:null,retryLane:0};function zd(e){return{baseLanes:e,cachePool:null,transitions:null}}function yy(e,n,s){var c=n.pendingProps,f=st.current,p=!1,x=(n.flags&128)!==0,C;if((C=x)||(C=e!==null&&e.memoizedState===null?!1:(f&2)!==0),C?(p=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(f|=1),Je(st,f&1),e===null)return fd(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((n.mode&1)===0?n.lanes=1:e.data==="$!"?n.lanes=8:n.lanes=1073741824,null):(x=c.children,e=c.fallback,p?(c=n.mode,p=n.child,x={mode:"hidden",children:x},(c&1)===0&&p!==null?(p.childLanes=0,p.pendingProps=x):p=Il(x,c,0,null),e=Co(e,c,s,null),p.return=n,e.return=n,p.sibling=e,n.child=p,n.child.memoizedState=zd(s),n.memoizedState=Md,e):Fd(n,x));if(f=e.memoizedState,f!==null&&(C=f.dehydrated,C!==null))return ME(e,n,x,c,C,f,s);if(p){p=c.fallback,x=n.mode,f=e.child,C=f.sibling;var P={mode:"hidden",children:c.children};return(x&1)===0&&n.child!==f?(c=n.child,c.childLanes=0,c.pendingProps=P,n.deletions=null):(c=Kr(f,P),c.subtreeFlags=f.subtreeFlags&14680064),C!==null?p=Kr(C,p):(p=Co(p,x,s,null),p.flags|=2),p.return=n,c.return=n,c.sibling=p,n.child=c,c=p,p=n.child,x=e.child.memoizedState,x=x===null?zd(s):{baseLanes:x.baseLanes|s,cachePool:null,transitions:x.transitions},p.memoizedState=x,p.childLanes=e.childLanes&~s,n.memoizedState=Md,c}return p=e.child,e=p.sibling,c=Kr(p,{mode:"visible",children:c.children}),(n.mode&1)===0&&(c.lanes=s),c.return=n,c.sibling=null,e!==null&&(s=n.deletions,s===null?(n.deletions=[e],n.flags|=16):s.push(e)),n.child=c,n.memoizedState=null,c}function Fd(e,n){return n=Il({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function gl(e,n,s,c){return c!==null&&pd(c),fi(n,e.child,null,s),e=Fd(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function ME(e,n,s,c,f,p,x){if(s)return n.flags&256?(n.flags&=-257,c=Ad(Error(o(422))),gl(e,n,x,c)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(p=c.fallback,f=n.mode,c=Il({mode:"visible",children:c.children},f,0,null),p=Co(p,f,x,null),p.flags|=2,c.return=n,p.return=n,c.sibling=p,n.child=c,(n.mode&1)!==0&&fi(n,e.child,null,x),n.child.memoizedState=zd(x),n.memoizedState=Md,p);if((n.mode&1)===0)return gl(e,n,x,null);if(f.data==="$!"){if(c=f.nextSibling&&f.nextSibling.dataset,c)var C=c.dgst;return c=C,p=Error(o(419)),c=Ad(p,c,void 0),gl(e,n,x,c)}if(C=(x&e.childLanes)!==0,Bt||C){if(c=kt,c!==null){switch(x&-x){case 4:f=2;break;case 16:f=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:f=32;break;case 536870912:f=268435456;break;default:f=0}f=(f&(c.suspendedLanes|x))!==0?0:f,f!==0&&f!==p.retryLane&&(p.retryLane=f,lr(e,f),xn(c,e,f,-1))}return nf(),c=Ad(Error(o(421))),gl(e,n,x,c)}return f.data==="$?"?(n.flags|=128,n.child=e.child,n=YE.bind(null,e),f._reactRetry=n,null):(e=p.treeContext,Qt=Lr(f.nextSibling),Gt=n,rt=!0,mn=null,e!==null&&(nn[rn++]=sr,nn[rn++]=ar,nn[rn++]=mo,sr=e.id,ar=e.overflow,mo=n),n=Fd(n,c.children),n.flags|=4096,n)}function xy(e,n,s){e.lanes|=n;var c=e.alternate;c!==null&&(c.lanes|=n),vd(e.return,n,s)}function Vd(e,n,s,c,f){var p=e.memoizedState;p===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:f}:(p.isBackwards=n,p.rendering=null,p.renderingStartTime=0,p.last=c,p.tail=s,p.tailMode=f)}function wy(e,n,s){var c=n.pendingProps,f=c.revealOrder,p=c.tail;if(Lt(e,n,c.children,s),c=st.current,(c&2)!==0)c=c&1|2,n.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&xy(e,s,n);else if(e.tag===19)xy(e,s,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}c&=1}if(Je(st,c),(n.mode&1)===0)n.memoizedState=null;else switch(f){case"forwards":for(s=n.child,f=null;s!==null;)e=s.alternate,e!==null&&cl(e)===null&&(f=s),s=s.sibling;s=f,s===null?(f=n.child,n.child=null):(f=s.sibling,s.sibling=null),Vd(n,!1,f,s,p);break;case"backwards":for(s=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&cl(e)===null){n.child=f;break}e=f.sibling,f.sibling=s,s=f,f=e}Vd(n,!0,s,null,p);break;case"together":Vd(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function vl(e,n){(n.mode&1)===0&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function ur(e,n,s){if(e!==null&&(n.dependencies=e.dependencies),wo|=n.lanes,(s&n.childLanes)===0)return null;if(e!==null&&n.child!==e.child)throw Error(o(153));if(n.child!==null){for(e=n.child,s=Kr(e,e.pendingProps),n.child=s,s.return=n;e.sibling!==null;)e=e.sibling,s=s.sibling=Kr(e,e.pendingProps),s.return=n;s.sibling=null}return n.child}function zE(e,n,s){switch(n.tag){case 3:gy(n),di();break;case 5:Av(n);break;case 1:Ut(n.type)&&Ja(n);break;case 4:wd(n,n.stateNode.containerInfo);break;case 10:var c=n.type._context,f=n.memoizedProps.value;Je(il,c._currentValue),c._currentValue=f;break;case 13:if(c=n.memoizedState,c!==null)return c.dehydrated!==null?(Je(st,st.current&1),n.flags|=128,null):(s&n.child.childLanes)!==0?yy(e,n,s):(Je(st,st.current&1),e=ur(e,n,s),e!==null?e.sibling:null);Je(st,st.current&1);break;case 19:if(c=(s&n.childLanes)!==0,(e.flags&128)!==0){if(c)return wy(e,n,s);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),Je(st,st.current),c)break;return null;case 22:case 23:return n.lanes=0,py(e,n,s)}return ur(e,n,s)}var Sy,Ud,by,ky;Sy=function(e,n){for(var s=n.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===n)break;for(;s.sibling===null;){if(s.return===null||s.return===n)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},Ud=function(){},by=function(e,n,s,c){var f=e.memoizedProps;if(f!==c){e=n.stateNode,yo($n.current);var p=null;switch(s){case"input":f=ot(e,f),c=ot(e,c),p=[];break;case"select":f=z({},f,{value:void 0}),c=z({},c,{value:void 0}),p=[];break;case"textarea":f=Qo(e,f),c=Qo(e,c),p=[];break;default:typeof f.onClick!="function"&&typeof c.onClick=="function"&&(e.onclick=Qa)}bu(s,c);var x;s=null;for(F in f)if(!c.hasOwnProperty(F)&&f.hasOwnProperty(F)&&f[F]!=null)if(F==="style"){var C=f[F];for(x in C)C.hasOwnProperty(x)&&(s||(s={}),s[x]="")}else F!=="dangerouslySetInnerHTML"&&F!=="children"&&F!=="suppressContentEditableWarning"&&F!=="suppressHydrationWarning"&&F!=="autoFocus"&&(a.hasOwnProperty(F)?p||(p=[]):(p=p||[]).push(F,null));for(F in c){var P=c[F];if(C=f?.[F],c.hasOwnProperty(F)&&P!==C&&(P!=null||C!=null))if(F==="style")if(C){for(x in C)!C.hasOwnProperty(x)||P&&P.hasOwnProperty(x)||(s||(s={}),s[x]="");for(x in P)P.hasOwnProperty(x)&&C[x]!==P[x]&&(s||(s={}),s[x]=P[x])}else s||(p||(p=[]),p.push(F,s)),s=P;else F==="dangerouslySetInnerHTML"?(P=P?P.__html:void 0,C=C?C.__html:void 0,P!=null&&C!==P&&(p=p||[]).push(F,P)):F==="children"?typeof P!="string"&&typeof P!="number"||(p=p||[]).push(F,""+P):F!=="suppressContentEditableWarning"&&F!=="suppressHydrationWarning"&&(a.hasOwnProperty(F)?(P!=null&&F==="onScroll"&&et("scroll",e),p||C===P||(p=[])):(p=p||[]).push(F,P))}s&&(p=p||[]).push("style",s);var F=p;(n.updateQueue=F)&&(n.flags|=4)}},ky=function(e,n,s,c){s!==c&&(n.flags|=4)};function bs(e,n){if(!rt)switch(e.tailMode){case"hidden":n=e.tail;for(var s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:c.sibling=null}}function It(e){var n=e.alternate!==null&&e.alternate.child===e.child,s=0,c=0;if(n)for(var f=e.child;f!==null;)s|=f.lanes|f.childLanes,c|=f.subtreeFlags&14680064,c|=f.flags&14680064,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)s|=f.lanes|f.childLanes,c|=f.subtreeFlags,c|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=c,e.childLanes=s,n}function FE(e,n,s){var c=n.pendingProps;switch(ud(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return It(n),null;case 1:return Ut(n.type)&&Xa(),It(n),null;case 3:return c=n.stateNode,mi(),tt(Vt),tt(Rt),kd(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(e===null||e.child===null)&&(rl(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,mn!==null&&(Jd(mn),mn=null))),Ud(e,n),It(n),null;case 5:Sd(n);var f=yo(vs.current);if(s=n.type,e!==null&&n.stateNode!=null)by(e,n,s,c,f),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!c){if(n.stateNode===null)throw Error(o(166));return It(n),null}if(e=yo($n.current),rl(n)){c=n.stateNode,s=n.type;var p=n.memoizedProps;switch(c[Ln]=n,c[fs]=p,e=(n.mode&1)!==0,s){case"dialog":et("cancel",c),et("close",c);break;case"iframe":case"object":case"embed":et("load",c);break;case"video":case"audio":for(f=0;f<cs.length;f++)et(cs[f],c);break;case"source":et("error",c);break;case"img":case"image":case"link":et("error",c),et("load",c);break;case"details":et("toggle",c);break;case"input":it(c,p),et("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!p.multiple},et("invalid",c);break;case"textarea":Wi(c,p),et("invalid",c)}bu(s,p),f=null;for(var x in p)if(p.hasOwnProperty(x)){var C=p[x];x==="children"?typeof C=="string"?c.textContent!==C&&(p.suppressHydrationWarning!==!0&&Ga(c.textContent,C,e),f=["children",C]):typeof C=="number"&&c.textContent!==""+C&&(p.suppressHydrationWarning!==!0&&Ga(c.textContent,C,e),f=["children",""+C]):a.hasOwnProperty(x)&&C!=null&&x==="onScroll"&&et("scroll",c)}switch(s){case"input":$e(c),rr(c,p,!0);break;case"textarea":$e(c),Ne(c);break;case"select":case"option":break;default:typeof p.onClick=="function"&&(c.onclick=Qa)}c=f,n.updateQueue=c,c!==null&&(n.flags|=4)}else{x=f.nodeType===9?f:f.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ye(s)),e==="http://www.w3.org/1999/xhtml"?s==="script"?(e=x.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof c.is=="string"?e=x.createElement(s,{is:c.is}):(e=x.createElement(s),s==="select"&&(x=e,c.multiple?x.multiple=!0:c.size&&(x.size=c.size))):e=x.createElementNS(e,s),e[Ln]=n,e[fs]=c,Sy(e,n,!1,!1),n.stateNode=e;e:{switch(x=ku(s,c),s){case"dialog":et("cancel",e),et("close",e),f=c;break;case"iframe":case"object":case"embed":et("load",e),f=c;break;case"video":case"audio":for(f=0;f<cs.length;f++)et(cs[f],e);f=c;break;case"source":et("error",e),f=c;break;case"img":case"image":case"link":et("error",e),et("load",e),f=c;break;case"details":et("toggle",e),f=c;break;case"input":it(e,c),f=ot(e,c),et("invalid",e);break;case"option":f=c;break;case"select":e._wrapperState={wasMultiple:!!c.multiple},f=z({},c,{value:void 0}),et("invalid",e);break;case"textarea":Wi(e,c),f=Qo(e,c),et("invalid",e);break;default:f=c}bu(s,f),C=f;for(p in C)if(C.hasOwnProperty(p)){var P=C[p];p==="style"?fg(e,P):p==="dangerouslySetInnerHTML"?(P=P?P.__html:void 0,P!=null&&Ft(e,P)):p==="children"?typeof P=="string"?(s!=="textarea"||P!=="")&&Pr(e,P):typeof P=="number"&&Pr(e,""+P):p!=="suppressContentEditableWarning"&&p!=="suppressHydrationWarning"&&p!=="autoFocus"&&(a.hasOwnProperty(p)?P!=null&&p==="onScroll"&&et("scroll",e):P!=null&&T(e,p,P,x))}switch(s){case"input":$e(e),rr(e,c,!1);break;case"textarea":$e(e),Ne(e);break;case"option":c.value!=null&&e.setAttribute("value",""+X(c.value));break;case"select":e.multiple=!!c.multiple,p=c.value,p!=null?Rr(e,!!c.multiple,p,!1):c.defaultValue!=null&&Rr(e,!!c.multiple,c.defaultValue,!0);break;default:typeof f.onClick=="function"&&(e.onclick=Qa)}switch(s){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}}c&&(n.flags|=4)}n.ref!==null&&(n.flags|=512,n.flags|=2097152)}return It(n),null;case 6:if(e&&n.stateNode!=null)ky(e,n,e.memoizedProps,c);else{if(typeof c!="string"&&n.stateNode===null)throw Error(o(166));if(s=yo(vs.current),yo($n.current),rl(n)){if(c=n.stateNode,s=n.memoizedProps,c[Ln]=n,(p=c.nodeValue!==s)&&(e=Gt,e!==null))switch(e.tag){case 3:Ga(c.nodeValue,s,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ga(c.nodeValue,s,(e.mode&1)!==0)}p&&(n.flags|=4)}else c=(s.nodeType===9?s:s.ownerDocument).createTextNode(c),c[Ln]=n,n.stateNode=c}return It(n),null;case 13:if(tt(st),c=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(rt&&Qt!==null&&(n.mode&1)!==0&&(n.flags&128)===0)Ev(),di(),n.flags|=98560,p=!1;else if(p=rl(n),c!==null&&c.dehydrated!==null){if(e===null){if(!p)throw Error(o(318));if(p=n.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(o(317));p[Ln]=n}else di(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;It(n),p=!1}else mn!==null&&(Jd(mn),mn=null),p=!0;if(!p)return n.flags&65536?n:null}return(n.flags&128)!==0?(n.lanes=s,n):(c=c!==null,c!==(e!==null&&e.memoizedState!==null)&&c&&(n.child.flags|=8192,(n.mode&1)!==0&&(e===null||(st.current&1)!==0?yt===0&&(yt=3):nf())),n.updateQueue!==null&&(n.flags|=4),It(n),null);case 4:return mi(),Ud(e,n),e===null&&us(n.stateNode.containerInfo),It(n),null;case 10:return gd(n.type._context),It(n),null;case 17:return Ut(n.type)&&Xa(),It(n),null;case 19:if(tt(st),p=n.memoizedState,p===null)return It(n),null;if(c=(n.flags&128)!==0,x=p.rendering,x===null)if(c)bs(p,!1);else{if(yt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(x=cl(e),x!==null){for(n.flags|=128,bs(p,!1),c=x.updateQueue,c!==null&&(n.updateQueue=c,n.flags|=4),n.subtreeFlags=0,c=s,s=n.child;s!==null;)p=s,e=c,p.flags&=14680066,x=p.alternate,x===null?(p.childLanes=0,p.lanes=e,p.child=null,p.subtreeFlags=0,p.memoizedProps=null,p.memoizedState=null,p.updateQueue=null,p.dependencies=null,p.stateNode=null):(p.childLanes=x.childLanes,p.lanes=x.lanes,p.child=x.child,p.subtreeFlags=0,p.deletions=null,p.memoizedProps=x.memoizedProps,p.memoizedState=x.memoizedState,p.updateQueue=x.updateQueue,p.type=x.type,e=x.dependencies,p.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),s=s.sibling;return Je(st,st.current&1|2),n.child}e=e.sibling}p.tail!==null&&ct()>xi&&(n.flags|=128,c=!0,bs(p,!1),n.lanes=4194304)}else{if(!c)if(e=cl(x),e!==null){if(n.flags|=128,c=!0,s=e.updateQueue,s!==null&&(n.updateQueue=s,n.flags|=4),bs(p,!0),p.tail===null&&p.tailMode==="hidden"&&!x.alternate&&!rt)return It(n),null}else 2*ct()-p.renderingStartTime>xi&&s!==1073741824&&(n.flags|=128,c=!0,bs(p,!1),n.lanes=4194304);p.isBackwards?(x.sibling=n.child,n.child=x):(s=p.last,s!==null?s.sibling=x:n.child=x,p.last=x)}return p.tail!==null?(n=p.tail,p.rendering=n,p.tail=n.sibling,p.renderingStartTime=ct(),n.sibling=null,s=st.current,Je(st,c?s&1|2:s&1),n):(It(n),null);case 22:case 23:return tf(),c=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==c&&(n.flags|=8192),c&&(n.mode&1)!==0?(Yt&1073741824)!==0&&(It(n),n.subtreeFlags&6&&(n.flags|=8192)):It(n),null;case 24:return null;case 25:return null}throw Error(o(156,n.tag))}function VE(e,n){switch(ud(n),n.tag){case 1:return Ut(n.type)&&Xa(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return mi(),tt(Vt),tt(Rt),kd(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 5:return Sd(n),null;case 13:if(tt(st),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(o(340));di()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return tt(st),null;case 4:return mi(),null;case 10:return gd(n.type._context),null;case 22:case 23:return tf(),null;case 24:return null;default:return null}}var yl=!1,Ot=!1,UE=typeof WeakSet=="function"?WeakSet:Set,ve=null;function vi(e,n){var s=e.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(c){lt(e,n,c)}else s.current=null}function Bd(e,n,s){try{s()}catch(c){lt(e,n,c)}}var Cy=!1;function BE(e,n){if(td=Ma,e=nv(),Zu(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var f=c.anchorOffset,p=c.focusNode;c=c.focusOffset;try{s.nodeType,p.nodeType}catch{s=null;break e}var x=0,C=-1,P=-1,F=0,Z=0,q=e,K=null;t:for(;;){for(var fe;q!==s||f!==0&&q.nodeType!==3||(C=x+f),q!==p||c!==0&&q.nodeType!==3||(P=x+c),q.nodeType===3&&(x+=q.nodeValue.length),(fe=q.firstChild)!==null;)K=q,q=fe;for(;;){if(q===e)break t;if(K===s&&++F===f&&(C=x),K===p&&++Z===c&&(P=x),(fe=q.nextSibling)!==null)break;q=K,K=q.parentNode}q=fe}s=C===-1||P===-1?null:{start:C,end:P}}else s=null}s=s||{start:0,end:0}}else s=null;for(nd={focusedElem:e,selectionRange:s},Ma=!1,ve=n;ve!==null;)if(n=ve,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,ve=e;else for(;ve!==null;){n=ve;try{var ye=n.alternate;if((n.flags&1024)!==0)switch(n.tag){case 0:case 11:case 15:break;case 1:if(ye!==null){var we=ye.memoizedProps,ut=ye.memoizedState,$=n.stateNode,N=$.getSnapshotBeforeUpdate(n.elementType===n.type?we:gn(n.type,we),ut);$.__reactInternalSnapshotBeforeUpdate=N}break;case 3:var M=n.stateNode.containerInfo;M.nodeType===1?M.textContent="":M.nodeType===9&&M.documentElement&&M.removeChild(M.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(ee){lt(n,n.return,ee)}if(e=n.sibling,e!==null){e.return=n.return,ve=e;break}ve=n.return}return ye=Cy,Cy=!1,ye}function ks(e,n,s){var c=n.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var f=c=c.next;do{if((f.tag&e)===e){var p=f.destroy;f.destroy=void 0,p!==void 0&&Bd(n,s,p)}f=f.next}while(f!==c)}}function xl(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var c=s.create;s.destroy=c()}s=s.next}while(s!==n)}}function Hd(e){var n=e.ref;if(n!==null){var s=e.stateNode;e.tag,e=s,typeof n=="function"?n(e):n.current=e}}function _y(e){var n=e.alternate;n!==null&&(e.alternate=null,_y(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Ln],delete n[fs],delete n[sd],delete n[_E],delete n[EE])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ey(e){return e.tag===5||e.tag===3||e.tag===4}function Ry(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ey(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Wd(e,n,s){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?s.nodeType===8?s.parentNode.insertBefore(e,n):s.insertBefore(e,n):(s.nodeType===8?(n=s.parentNode,n.insertBefore(e,s)):(n=s,n.appendChild(e)),s=s._reactRootContainer,s!=null||n.onclick!==null||(n.onclick=Qa));else if(c!==4&&(e=e.child,e!==null))for(Wd(e,n,s),e=e.sibling;e!==null;)Wd(e,n,s),e=e.sibling}function Kd(e,n,s){var c=e.tag;if(c===5||c===6)e=e.stateNode,n?s.insertBefore(e,n):s.appendChild(e);else if(c!==4&&(e=e.child,e!==null))for(Kd(e,n,s),e=e.sibling;e!==null;)Kd(e,n,s),e=e.sibling}var _t=null,vn=!1;function Vr(e,n,s){for(s=s.child;s!==null;)Py(e,n,s),s=s.sibling}function Py(e,n,s){if(An&&typeof An.onCommitFiberUnmount=="function")try{An.onCommitFiberUnmount(Ta,s)}catch{}switch(s.tag){case 5:Ot||vi(s,n);case 6:var c=_t,f=vn;_t=null,Vr(e,n,s),_t=c,vn=f,_t!==null&&(vn?(e=_t,s=s.stateNode,e.nodeType===8?e.parentNode.removeChild(s):e.removeChild(s)):_t.removeChild(s.stateNode));break;case 18:_t!==null&&(vn?(e=_t,s=s.stateNode,e.nodeType===8?id(e.parentNode,s):e.nodeType===1&&id(e,s),ts(e)):id(_t,s.stateNode));break;case 4:c=_t,f=vn,_t=s.stateNode.containerInfo,vn=!0,Vr(e,n,s),_t=c,vn=f;break;case 0:case 11:case 14:case 15:if(!Ot&&(c=s.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){f=c=c.next;do{var p=f,x=p.destroy;p=p.tag,x!==void 0&&((p&2)!==0||(p&4)!==0)&&Bd(s,n,x),f=f.next}while(f!==c)}Vr(e,n,s);break;case 1:if(!Ot&&(vi(s,n),c=s.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=s.memoizedProps,c.state=s.memoizedState,c.componentWillUnmount()}catch(C){lt(s,n,C)}Vr(e,n,s);break;case 21:Vr(e,n,s);break;case 22:s.mode&1?(Ot=(c=Ot)||s.memoizedState!==null,Vr(e,n,s),Ot=c):Vr(e,n,s);break;default:Vr(e,n,s)}}function Iy(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var s=e.stateNode;s===null&&(s=e.stateNode=new UE),n.forEach(function(c){var f=XE.bind(null,e,c);s.has(c)||(s.add(c),c.then(f,f))})}}function yn(e,n){var s=n.deletions;if(s!==null)for(var c=0;c<s.length;c++){var f=s[c];try{var p=e,x=n,C=x;e:for(;C!==null;){switch(C.tag){case 5:_t=C.stateNode,vn=!1;break e;case 3:_t=C.stateNode.containerInfo,vn=!0;break e;case 4:_t=C.stateNode.containerInfo,vn=!0;break e}C=C.return}if(_t===null)throw Error(o(160));Py(p,x,f),_t=null,vn=!1;var P=f.alternate;P!==null&&(P.return=null),f.return=null}catch(F){lt(f,n,F)}}if(n.subtreeFlags&12854)for(n=n.child;n!==null;)Oy(n,e),n=n.sibling}function Oy(e,n){var s=e.alternate,c=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(yn(n,e),Mn(e),c&4){try{ks(3,e,e.return),xl(3,e)}catch(we){lt(e,e.return,we)}try{ks(5,e,e.return)}catch(we){lt(e,e.return,we)}}break;case 1:yn(n,e),Mn(e),c&512&&s!==null&&vi(s,s.return);break;case 5:if(yn(n,e),Mn(e),c&512&&s!==null&&vi(s,s.return),e.flags&32){var f=e.stateNode;try{Pr(f,"")}catch(we){lt(e,e.return,we)}}if(c&4&&(f=e.stateNode,f!=null)){var p=e.memoizedProps,x=s!==null?s.memoizedProps:p,C=e.type,P=e.updateQueue;if(e.updateQueue=null,P!==null)try{C==="input"&&p.type==="radio"&&p.name!=null&&St(f,p),ku(C,x);var F=ku(C,p);for(x=0;x<P.length;x+=2){var Z=P[x],q=P[x+1];Z==="style"?fg(f,q):Z==="dangerouslySetInnerHTML"?Ft(f,q):Z==="children"?Pr(f,q):T(f,Z,q,F)}switch(C){case"input":Tn(f,p);break;case"textarea":ie(f,p);break;case"select":var K=f._wrapperState.wasMultiple;f._wrapperState.wasMultiple=!!p.multiple;var fe=p.value;fe!=null?Rr(f,!!p.multiple,fe,!1):K!==!!p.multiple&&(p.defaultValue!=null?Rr(f,!!p.multiple,p.defaultValue,!0):Rr(f,!!p.multiple,p.multiple?[]:"",!1))}f[fs]=p}catch(we){lt(e,e.return,we)}}break;case 6:if(yn(n,e),Mn(e),c&4){if(e.stateNode===null)throw Error(o(162));f=e.stateNode,p=e.memoizedProps;try{f.nodeValue=p}catch(we){lt(e,e.return,we)}}break;case 3:if(yn(n,e),Mn(e),c&4&&s!==null&&s.memoizedState.isDehydrated)try{ts(n.containerInfo)}catch(we){lt(e,e.return,we)}break;case 4:yn(n,e),Mn(e);break;case 13:yn(n,e),Mn(e),f=e.child,f.flags&8192&&(p=f.memoizedState!==null,f.stateNode.isHidden=p,!p||f.alternate!==null&&f.alternate.memoizedState!==null||(Gd=ct())),c&4&&Iy(e);break;case 22:if(Z=s!==null&&s.memoizedState!==null,e.mode&1?(Ot=(F=Ot)||Z,yn(n,e),Ot=F):yn(n,e),Mn(e),c&8192){if(F=e.memoizedState!==null,(e.stateNode.isHidden=F)&&!Z&&(e.mode&1)!==0)for(ve=e,Z=e.child;Z!==null;){for(q=ve=Z;ve!==null;){switch(K=ve,fe=K.child,K.tag){case 0:case 11:case 14:case 15:ks(4,K,K.return);break;case 1:vi(K,K.return);var ye=K.stateNode;if(typeof ye.componentWillUnmount=="function"){c=K,s=K.return;try{n=c,ye.props=n.memoizedProps,ye.state=n.memoizedState,ye.componentWillUnmount()}catch(we){lt(c,s,we)}}break;case 5:vi(K,K.return);break;case 22:if(K.memoizedState!==null){Dy(q);continue}}fe!==null?(fe.return=K,ve=fe):Dy(q)}Z=Z.sibling}e:for(Z=null,q=e;;){if(q.tag===5){if(Z===null){Z=q;try{f=q.stateNode,F?(p=f.style,typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none"):(C=q.stateNode,P=q.memoizedProps.style,x=P!=null&&P.hasOwnProperty("display")?P.display:null,C.style.display=dg("display",x))}catch(we){lt(e,e.return,we)}}}else if(q.tag===6){if(Z===null)try{q.stateNode.nodeValue=F?"":q.memoizedProps}catch(we){lt(e,e.return,we)}}else if((q.tag!==22&&q.tag!==23||q.memoizedState===null||q===e)&&q.child!==null){q.child.return=q,q=q.child;continue}if(q===e)break e;for(;q.sibling===null;){if(q.return===null||q.return===e)break e;Z===q&&(Z=null),q=q.return}Z===q&&(Z=null),q.sibling.return=q.return,q=q.sibling}}break;case 19:yn(n,e),Mn(e),c&4&&Iy(e);break;case 21:break;default:yn(n,e),Mn(e)}}function Mn(e){var n=e.flags;if(n&2){try{e:{for(var s=e.return;s!==null;){if(Ey(s)){var c=s;break e}s=s.return}throw Error(o(160))}switch(c.tag){case 5:var f=c.stateNode;c.flags&32&&(Pr(f,""),c.flags&=-33);var p=Ry(e);Kd(e,p,f);break;case 3:case 4:var x=c.stateNode.containerInfo,C=Ry(e);Wd(e,C,x);break;default:throw Error(o(161))}}catch(P){lt(e,e.return,P)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function HE(e,n,s){ve=e,Ny(e)}function Ny(e,n,s){for(var c=(e.mode&1)!==0;ve!==null;){var f=ve,p=f.child;if(f.tag===22&&c){var x=f.memoizedState!==null||yl;if(!x){var C=f.alternate,P=C!==null&&C.memoizedState!==null||Ot;C=yl;var F=Ot;if(yl=x,(Ot=P)&&!F)for(ve=f;ve!==null;)x=ve,P=x.child,x.tag===22&&x.memoizedState!==null?Ay(f):P!==null?(P.return=x,ve=P):Ay(f);for(;p!==null;)ve=p,Ny(p),p=p.sibling;ve=f,yl=C,Ot=F}Ty(e)}else(f.subtreeFlags&8772)!==0&&p!==null?(p.return=f,ve=p):Ty(e)}}function Ty(e){for(;ve!==null;){var n=ve;if((n.flags&8772)!==0){var s=n.alternate;try{if((n.flags&8772)!==0)switch(n.tag){case 0:case 11:case 15:Ot||xl(5,n);break;case 1:var c=n.stateNode;if(n.flags&4&&!Ot)if(s===null)c.componentDidMount();else{var f=n.elementType===n.type?s.memoizedProps:gn(n.type,s.memoizedProps);c.componentDidUpdate(f,s.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var p=n.updateQueue;p!==null&&Dv(n,p,c);break;case 3:var x=n.updateQueue;if(x!==null){if(s=null,n.child!==null)switch(n.child.tag){case 5:s=n.child.stateNode;break;case 1:s=n.child.stateNode}Dv(n,x,s)}break;case 5:var C=n.stateNode;if(s===null&&n.flags&4){s=C;var P=n.memoizedProps;switch(n.type){case"button":case"input":case"select":case"textarea":P.autoFocus&&s.focus();break;case"img":P.src&&(s.src=P.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(n.memoizedState===null){var F=n.alternate;if(F!==null){var Z=F.memoizedState;if(Z!==null){var q=Z.dehydrated;q!==null&&ts(q)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}Ot||n.flags&512&&Hd(n)}catch(K){lt(n,n.return,K)}}if(n===e){ve=null;break}if(s=n.sibling,s!==null){s.return=n.return,ve=s;break}ve=n.return}}function Dy(e){for(;ve!==null;){var n=ve;if(n===e){ve=null;break}var s=n.sibling;if(s!==null){s.return=n.return,ve=s;break}ve=n.return}}function Ay(e){for(;ve!==null;){var n=ve;try{switch(n.tag){case 0:case 11:case 15:var s=n.return;try{xl(4,n)}catch(P){lt(n,s,P)}break;case 1:var c=n.stateNode;if(typeof c.componentDidMount=="function"){var f=n.return;try{c.componentDidMount()}catch(P){lt(n,f,P)}}var p=n.return;try{Hd(n)}catch(P){lt(n,p,P)}break;case 5:var x=n.return;try{Hd(n)}catch(P){lt(n,x,P)}}}catch(P){lt(n,n.return,P)}if(n===e){ve=null;break}var C=n.sibling;if(C!==null){C.return=n.return,ve=C;break}ve=n.return}}var WE=Math.ceil,wl=O.ReactCurrentDispatcher,Zd=O.ReactCurrentOwner,an=O.ReactCurrentBatchConfig,Ue=0,kt=null,ht=null,Et=0,Yt=0,yi=$r(0),yt=0,Cs=null,wo=0,Sl=0,qd=0,_s=null,Ht=null,Gd=0,xi=1/0,dr=null,bl=!1,Qd=null,Ur=null,kl=!1,Br=null,Cl=0,Es=0,Yd=null,_l=-1,El=0;function $t(){return(Ue&6)!==0?ct():_l!==-1?_l:_l=ct()}function Hr(e){return(e.mode&1)===0?1:(Ue&2)!==0&&Et!==0?Et&-Et:PE.transition!==null?(El===0&&(El=Rg()),El):(e=qe,e!==0||(e=window.event,e=e===void 0?16:$g(e.type)),e)}function xn(e,n,s,c){if(50<Es)throw Es=0,Yd=null,Error(o(185));Qi(e,s,c),((Ue&2)===0||e!==kt)&&(e===kt&&((Ue&2)===0&&(Sl|=s),yt===4&&Wr(e,Et)),Wt(e,c),s===1&&Ue===0&&(n.mode&1)===0&&(xi=ct()+500,el&&Mr()))}function Wt(e,n){var s=e.callbackNode;P_(e,n);var c=La(e,e===kt?Et:0);if(c===0)s!==null&&Cg(s),e.callbackNode=null,e.callbackPriority=0;else if(n=c&-c,e.callbackPriority!==n){if(s!=null&&Cg(s),n===1)e.tag===0?RE($y.bind(null,e)):Sv($y.bind(null,e)),kE(function(){(Ue&6)===0&&Mr()}),s=null;else{switch(Pg(c)){case 1:s=Ou;break;case 4:s=_g;break;case 16:s=Na;break;case 536870912:s=Eg;break;default:s=Na}s=Hy(s,Ly.bind(null,e))}e.callbackPriority=n,e.callbackNode=s}}function Ly(e,n){if(_l=-1,El=0,(Ue&6)!==0)throw Error(o(327));var s=e.callbackNode;if(wi()&&e.callbackNode!==s)return null;var c=La(e,e===kt?Et:0);if(c===0)return null;if((c&30)!==0||(c&e.expiredLanes)!==0||n)n=Rl(e,c);else{n=c;var f=Ue;Ue|=2;var p=My();(kt!==e||Et!==n)&&(dr=null,xi=ct()+500,bo(e,n));do try{qE();break}catch(C){jy(e,C)}while(!0);md(),wl.current=p,Ue=f,ht!==null?n=0:(kt=null,Et=0,n=yt)}if(n!==0){if(n===2&&(f=Nu(e),f!==0&&(c=f,n=Xd(e,f))),n===1)throw s=Cs,bo(e,0),Wr(e,c),Wt(e,ct()),s;if(n===6)Wr(e,c);else{if(f=e.current.alternate,(c&30)===0&&!KE(f)&&(n=Rl(e,c),n===2&&(p=Nu(e),p!==0&&(c=p,n=Xd(e,p))),n===1))throw s=Cs,bo(e,0),Wr(e,c),Wt(e,ct()),s;switch(e.finishedWork=f,e.finishedLanes=c,n){case 0:case 1:throw Error(o(345));case 2:ko(e,Ht,dr);break;case 3:if(Wr(e,c),(c&130023424)===c&&(n=Gd+500-ct(),10<n)){if(La(e,0)!==0)break;if(f=e.suspendedLanes,(f&c)!==c){$t(),e.pingedLanes|=e.suspendedLanes&f;break}e.timeoutHandle=od(ko.bind(null,e,Ht,dr),n);break}ko(e,Ht,dr);break;case 4:if(Wr(e,c),(c&4194240)===c)break;for(n=e.eventTimes,f=-1;0<c;){var x=31-pn(c);p=1<<x,x=n[x],x>f&&(f=x),c&=~p}if(c=f,c=ct()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*WE(c/1960))-c,10<c){e.timeoutHandle=od(ko.bind(null,e,Ht,dr),c);break}ko(e,Ht,dr);break;case 5:ko(e,Ht,dr);break;default:throw Error(o(329))}}}return Wt(e,ct()),e.callbackNode===s?Ly.bind(null,e):null}function Xd(e,n){var s=_s;return e.current.memoizedState.isDehydrated&&(bo(e,n).flags|=256),e=Rl(e,n),e!==2&&(n=Ht,Ht=s,n!==null&&Jd(n)),e}function Jd(e){Ht===null?Ht=e:Ht.push.apply(Ht,e)}function KE(e){for(var n=e;;){if(n.flags&16384){var s=n.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var c=0;c<s.length;c++){var f=s[c],p=f.getSnapshot;f=f.value;try{if(!hn(p(),f))return!1}catch{return!1}}}if(s=n.child,n.subtreeFlags&16384&&s!==null)s.return=n,n=s;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Wr(e,n){for(n&=~qd,n&=~Sl,e.suspendedLanes|=n,e.pingedLanes&=~n,e=e.expirationTimes;0<n;){var s=31-pn(n),c=1<<s;e[s]=-1,n&=~c}}function $y(e){if((Ue&6)!==0)throw Error(o(327));wi();var n=La(e,0);if((n&1)===0)return Wt(e,ct()),null;var s=Rl(e,n);if(e.tag!==0&&s===2){var c=Nu(e);c!==0&&(n=c,s=Xd(e,c))}if(s===1)throw s=Cs,bo(e,0),Wr(e,n),Wt(e,ct()),s;if(s===6)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=n,ko(e,Ht,dr),Wt(e,ct()),null}function ef(e,n){var s=Ue;Ue|=1;try{return e(n)}finally{Ue=s,Ue===0&&(xi=ct()+500,el&&Mr())}}function So(e){Br!==null&&Br.tag===0&&(Ue&6)===0&&wi();var n=Ue;Ue|=1;var s=an.transition,c=qe;try{if(an.transition=null,qe=1,e)return e()}finally{qe=c,an.transition=s,Ue=n,(Ue&6)===0&&Mr()}}function tf(){Yt=yi.current,tt(yi)}function bo(e,n){e.finishedWork=null,e.finishedLanes=0;var s=e.timeoutHandle;if(s!==-1&&(e.timeoutHandle=-1,bE(s)),ht!==null)for(s=ht.return;s!==null;){var c=s;switch(ud(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&Xa();break;case 3:mi(),tt(Vt),tt(Rt),kd();break;case 5:Sd(c);break;case 4:mi();break;case 13:tt(st);break;case 19:tt(st);break;case 10:gd(c.type._context);break;case 22:case 23:tf()}s=s.return}if(kt=e,ht=e=Kr(e.current,null),Et=Yt=n,yt=0,Cs=null,qd=Sl=wo=0,Ht=_s=null,vo!==null){for(n=0;n<vo.length;n++)if(s=vo[n],c=s.interleaved,c!==null){s.interleaved=null;var f=c.next,p=s.pending;if(p!==null){var x=p.next;p.next=f,c.next=x}s.pending=c}vo=null}return e}function jy(e,n){do{var s=ht;try{if(md(),ul.current=hl,dl){for(var c=at.memoizedState;c!==null;){var f=c.queue;f!==null&&(f.pending=null),c=c.next}dl=!1}if(xo=0,bt=vt=at=null,ys=!1,xs=0,Zd.current=null,s===null||s.return===null){yt=1,Cs=n,ht=null;break}e:{var p=e,x=s.return,C=s,P=n;if(n=Et,C.flags|=32768,P!==null&&typeof P=="object"&&typeof P.then=="function"){var F=P,Z=C,q=Z.tag;if((Z.mode&1)===0&&(q===0||q===11||q===15)){var K=Z.alternate;K?(Z.updateQueue=K.updateQueue,Z.memoizedState=K.memoizedState,Z.lanes=K.lanes):(Z.updateQueue=null,Z.memoizedState=null)}var fe=ly(x);if(fe!==null){fe.flags&=-257,cy(fe,x,C,p,n),fe.mode&1&&ay(p,F,n),n=fe,P=F;var ye=n.updateQueue;if(ye===null){var we=new Set;we.add(P),n.updateQueue=we}else ye.add(P);break e}else{if((n&1)===0){ay(p,F,n),nf();break e}P=Error(o(426))}}else if(rt&&C.mode&1){var ut=ly(x);if(ut!==null){(ut.flags&65536)===0&&(ut.flags|=256),cy(ut,x,C,p,n),pd(gi(P,C));break e}}p=P=gi(P,C),yt!==4&&(yt=2),_s===null?_s=[p]:_s.push(p),p=x;do{switch(p.tag){case 3:p.flags|=65536,n&=-n,p.lanes|=n;var $=iy(p,P,n);Tv(p,$);break e;case 1:C=P;var N=p.type,M=p.stateNode;if((p.flags&128)===0&&(typeof N.getDerivedStateFromError=="function"||M!==null&&typeof M.componentDidCatch=="function"&&(Ur===null||!Ur.has(M)))){p.flags|=65536,n&=-n,p.lanes|=n;var ee=sy(p,C,n);Tv(p,ee);break e}}p=p.return}while(p!==null)}Fy(s)}catch(ke){n=ke,ht===s&&s!==null&&(ht=s=s.return);continue}break}while(!0)}function My(){var e=wl.current;return wl.current=hl,e===null?hl:e}function nf(){(yt===0||yt===3||yt===2)&&(yt=4),kt===null||(wo&268435455)===0&&(Sl&268435455)===0||Wr(kt,Et)}function Rl(e,n){var s=Ue;Ue|=2;var c=My();(kt!==e||Et!==n)&&(dr=null,bo(e,n));do try{ZE();break}catch(f){jy(e,f)}while(!0);if(md(),Ue=s,wl.current=c,ht!==null)throw Error(o(261));return kt=null,Et=0,yt}function ZE(){for(;ht!==null;)zy(ht)}function qE(){for(;ht!==null&&!x_();)zy(ht)}function zy(e){var n=By(e.alternate,e,Yt);e.memoizedProps=e.pendingProps,n===null?Fy(e):ht=n,Zd.current=null}function Fy(e){var n=e;do{var s=n.alternate;if(e=n.return,(n.flags&32768)===0){if(s=FE(s,n,Yt),s!==null){ht=s;return}}else{if(s=VE(s,n),s!==null){s.flags&=32767,ht=s;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{yt=6,ht=null;return}}if(n=n.sibling,n!==null){ht=n;return}ht=n=e}while(n!==null);yt===0&&(yt=5)}function ko(e,n,s){var c=qe,f=an.transition;try{an.transition=null,qe=1,GE(e,n,s,c)}finally{an.transition=f,qe=c}return null}function GE(e,n,s,c){do wi();while(Br!==null);if((Ue&6)!==0)throw Error(o(327));s=e.finishedWork;var f=e.finishedLanes;if(s===null)return null;if(e.finishedWork=null,e.finishedLanes=0,s===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var p=s.lanes|s.childLanes;if(I_(e,p),e===kt&&(ht=kt=null,Et=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||kl||(kl=!0,Hy(Na,function(){return wi(),null})),p=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||p){p=an.transition,an.transition=null;var x=qe;qe=1;var C=Ue;Ue|=4,Zd.current=null,BE(e,s),Oy(s,e),mE(nd),Ma=!!td,nd=td=null,e.current=s,HE(s),w_(),Ue=C,qe=x,an.transition=p}else e.current=s;if(kl&&(kl=!1,Br=e,Cl=f),p=e.pendingLanes,p===0&&(Ur=null),k_(s.stateNode),Wt(e,ct()),n!==null)for(c=e.onRecoverableError,s=0;s<n.length;s++)f=n[s],c(f.value,{componentStack:f.stack,digest:f.digest});if(bl)throw bl=!1,e=Qd,Qd=null,e;return(Cl&1)!==0&&e.tag!==0&&wi(),p=e.pendingLanes,(p&1)!==0?e===Yd?Es++:(Es=0,Yd=e):Es=0,Mr(),null}function wi(){if(Br!==null){var e=Pg(Cl),n=an.transition,s=qe;try{if(an.transition=null,qe=16>e?16:e,Br===null)var c=!1;else{if(e=Br,Br=null,Cl=0,(Ue&6)!==0)throw Error(o(331));var f=Ue;for(Ue|=4,ve=e.current;ve!==null;){var p=ve,x=p.child;if((ve.flags&16)!==0){var C=p.deletions;if(C!==null){for(var P=0;P<C.length;P++){var F=C[P];for(ve=F;ve!==null;){var Z=ve;switch(Z.tag){case 0:case 11:case 15:ks(8,Z,p)}var q=Z.child;if(q!==null)q.return=Z,ve=q;else for(;ve!==null;){Z=ve;var K=Z.sibling,fe=Z.return;if(_y(Z),Z===F){ve=null;break}if(K!==null){K.return=fe,ve=K;break}ve=fe}}}var ye=p.alternate;if(ye!==null){var we=ye.child;if(we!==null){ye.child=null;do{var ut=we.sibling;we.sibling=null,we=ut}while(we!==null)}}ve=p}}if((p.subtreeFlags&2064)!==0&&x!==null)x.return=p,ve=x;else e:for(;ve!==null;){if(p=ve,(p.flags&2048)!==0)switch(p.tag){case 0:case 11:case 15:ks(9,p,p.return)}var $=p.sibling;if($!==null){$.return=p.return,ve=$;break e}ve=p.return}}var N=e.current;for(ve=N;ve!==null;){x=ve;var M=x.child;if((x.subtreeFlags&2064)!==0&&M!==null)M.return=x,ve=M;else e:for(x=N;ve!==null;){if(C=ve,(C.flags&2048)!==0)try{switch(C.tag){case 0:case 11:case 15:xl(9,C)}}catch(ke){lt(C,C.return,ke)}if(C===x){ve=null;break e}var ee=C.sibling;if(ee!==null){ee.return=C.return,ve=ee;break e}ve=C.return}}if(Ue=f,Mr(),An&&typeof An.onPostCommitFiberRoot=="function")try{An.onPostCommitFiberRoot(Ta,e)}catch{}c=!0}return c}finally{qe=s,an.transition=n}}return!1}function Vy(e,n,s){n=gi(s,n),n=iy(e,n,1),e=Fr(e,n,1),n=$t(),e!==null&&(Qi(e,1,n),Wt(e,n))}function lt(e,n,s){if(e.tag===3)Vy(e,e,s);else for(;n!==null;){if(n.tag===3){Vy(n,e,s);break}else if(n.tag===1){var c=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Ur===null||!Ur.has(c))){e=gi(s,e),e=sy(n,e,1),n=Fr(n,e,1),e=$t(),n!==null&&(Qi(n,1,e),Wt(n,e));break}}n=n.return}}function QE(e,n,s){var c=e.pingCache;c!==null&&c.delete(n),n=$t(),e.pingedLanes|=e.suspendedLanes&s,kt===e&&(Et&s)===s&&(yt===4||yt===3&&(Et&130023424)===Et&&500>ct()-Gd?bo(e,0):qd|=s),Wt(e,n)}function Uy(e,n){n===0&&((e.mode&1)===0?n=1:(n=Aa,Aa<<=1,(Aa&130023424)===0&&(Aa=4194304)));var s=$t();e=lr(e,n),e!==null&&(Qi(e,n,s),Wt(e,s))}function YE(e){var n=e.memoizedState,s=0;n!==null&&(s=n.retryLane),Uy(e,s)}function XE(e,n){var s=0;switch(e.tag){case 13:var c=e.stateNode,f=e.memoizedState;f!==null&&(s=f.retryLane);break;case 19:c=e.stateNode;break;default:throw Error(o(314))}c!==null&&c.delete(n),Uy(e,s)}var By;By=function(e,n,s){if(e!==null)if(e.memoizedProps!==n.pendingProps||Vt.current)Bt=!0;else{if((e.lanes&s)===0&&(n.flags&128)===0)return Bt=!1,zE(e,n,s);Bt=(e.flags&131072)!==0}else Bt=!1,rt&&(n.flags&1048576)!==0&&bv(n,nl,n.index);switch(n.lanes=0,n.tag){case 2:var c=n.type;vl(e,n),e=n.pendingProps;var f=li(n,Rt.current);hi(n,s),f=Ed(null,n,c,e,f,s);var p=Rd();return n.flags|=1,typeof f=="object"&&f!==null&&typeof f.render=="function"&&f.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,Ut(c)?(p=!0,Ja(n)):p=!1,n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,xd(n),f.updater=ml,n.stateNode=f,f._reactInternals=n,Dd(n,c,e,s),n=jd(null,n,c,!0,p,s)):(n.tag=0,rt&&p&&cd(n),Lt(null,n,f,s),n=n.child),n;case 16:c=n.elementType;e:{switch(vl(e,n),e=n.pendingProps,f=c._init,c=f(c._payload),n.type=c,f=n.tag=eR(c),e=gn(c,e),f){case 0:n=$d(null,n,c,e,s);break e;case 1:n=my(null,n,c,e,s);break e;case 11:n=uy(null,n,c,e,s);break e;case 14:n=dy(null,n,c,gn(c.type,e),s);break e}throw Error(o(306,c,""))}return n;case 0:return c=n.type,f=n.pendingProps,f=n.elementType===c?f:gn(c,f),$d(e,n,c,f,s);case 1:return c=n.type,f=n.pendingProps,f=n.elementType===c?f:gn(c,f),my(e,n,c,f,s);case 3:e:{if(gy(n),e===null)throw Error(o(387));c=n.pendingProps,p=n.memoizedState,f=p.element,Nv(e,n),ll(n,c,null,s);var x=n.memoizedState;if(c=x.element,p.isDehydrated)if(p={element:c,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},n.updateQueue.baseState=p,n.memoizedState=p,n.flags&256){f=gi(Error(o(423)),n),n=vy(e,n,c,s,f);break e}else if(c!==f){f=gi(Error(o(424)),n),n=vy(e,n,c,s,f);break e}else for(Qt=Lr(n.stateNode.containerInfo.firstChild),Gt=n,rt=!0,mn=null,s=Iv(n,null,c,s),n.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(di(),c===f){n=ur(e,n,s);break e}Lt(e,n,c,s)}n=n.child}return n;case 5:return Av(n),e===null&&fd(n),c=n.type,f=n.pendingProps,p=e!==null?e.memoizedProps:null,x=f.children,rd(c,f)?x=null:p!==null&&rd(c,p)&&(n.flags|=32),hy(e,n),Lt(e,n,x,s),n.child;case 6:return e===null&&fd(n),null;case 13:return yy(e,n,s);case 4:return wd(n,n.stateNode.containerInfo),c=n.pendingProps,e===null?n.child=fi(n,null,c,s):Lt(e,n,c,s),n.child;case 11:return c=n.type,f=n.pendingProps,f=n.elementType===c?f:gn(c,f),uy(e,n,c,f,s);case 7:return Lt(e,n,n.pendingProps,s),n.child;case 8:return Lt(e,n,n.pendingProps.children,s),n.child;case 12:return Lt(e,n,n.pendingProps.children,s),n.child;case 10:e:{if(c=n.type._context,f=n.pendingProps,p=n.memoizedProps,x=f.value,Je(il,c._currentValue),c._currentValue=x,p!==null)if(hn(p.value,x)){if(p.children===f.children&&!Vt.current){n=ur(e,n,s);break e}}else for(p=n.child,p!==null&&(p.return=n);p!==null;){var C=p.dependencies;if(C!==null){x=p.child;for(var P=C.firstContext;P!==null;){if(P.context===c){if(p.tag===1){P=cr(-1,s&-s),P.tag=2;var F=p.updateQueue;if(F!==null){F=F.shared;var Z=F.pending;Z===null?P.next=P:(P.next=Z.next,Z.next=P),F.pending=P}}p.lanes|=s,P=p.alternate,P!==null&&(P.lanes|=s),vd(p.return,s,n),C.lanes|=s;break}P=P.next}}else if(p.tag===10)x=p.type===n.type?null:p.child;else if(p.tag===18){if(x=p.return,x===null)throw Error(o(341));x.lanes|=s,C=x.alternate,C!==null&&(C.lanes|=s),vd(x,s,n),x=p.sibling}else x=p.child;if(x!==null)x.return=p;else for(x=p;x!==null;){if(x===n){x=null;break}if(p=x.sibling,p!==null){p.return=x.return,x=p;break}x=x.return}p=x}Lt(e,n,f.children,s),n=n.child}return n;case 9:return f=n.type,c=n.pendingProps.children,hi(n,s),f=on(f),c=c(f),n.flags|=1,Lt(e,n,c,s),n.child;case 14:return c=n.type,f=gn(c,n.pendingProps),f=gn(c.type,f),dy(e,n,c,f,s);case 15:return fy(e,n,n.type,n.pendingProps,s);case 17:return c=n.type,f=n.pendingProps,f=n.elementType===c?f:gn(c,f),vl(e,n),n.tag=1,Ut(c)?(e=!0,Ja(n)):e=!1,hi(n,s),ry(n,c,f),Dd(n,c,f,s),jd(null,n,c,!0,e,s);case 19:return wy(e,n,s);case 22:return py(e,n,s)}throw Error(o(156,n.tag))};function Hy(e,n){return kg(e,n)}function JE(e,n,s,c){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(e,n,s,c){return new JE(e,n,s,c)}function rf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function eR(e){if(typeof e=="function")return rf(e)?1:0;if(e!=null){if(e=e.$$typeof,e===le)return 11;if(e===be)return 14}return 2}function Kr(e,n){var s=e.alternate;return s===null?(s=ln(e.tag,n,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=n,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&14680064,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,n=e.dependencies,s.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s}function Pl(e,n,s,c,f,p){var x=2;if(c=e,typeof e=="function")rf(e)&&(x=1);else if(typeof e=="string")x=5;else e:switch(e){case B:return Co(s.children,f,p,n);case j:x=8,f|=8;break;case Y:return e=ln(12,s,n,f|2),e.elementType=Y,e.lanes=p,e;case ue:return e=ln(13,s,n,f),e.elementType=ue,e.lanes=p,e;case se:return e=ln(19,s,n,f),e.elementType=se,e.lanes=p,e;case oe:return Il(s,f,p,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ce:x=10;break e;case Ce:x=9;break e;case le:x=11;break e;case be:x=14;break e;case ae:x=16,c=null;break e}throw Error(o(130,e==null?e:typeof e,""))}return n=ln(x,s,n,f),n.elementType=e,n.type=c,n.lanes=p,n}function Co(e,n,s,c){return e=ln(7,e,c,n),e.lanes=s,e}function Il(e,n,s,c){return e=ln(22,e,c,n),e.elementType=oe,e.lanes=s,e.stateNode={isHidden:!1},e}function of(e,n,s){return e=ln(6,e,null,n),e.lanes=s,e}function sf(e,n,s){return n=ln(4,e.children!==null?e.children:[],e.key,n),n.lanes=s,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function tR(e,n,s,c,f){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Tu(0),this.expirationTimes=Tu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tu(0),this.identifierPrefix=c,this.onRecoverableError=f,this.mutableSourceEagerHydrationData=null}function af(e,n,s,c,f,p,x,C,P){return e=new tR(e,n,s,C,P),n===1?(n=1,p===!0&&(n|=8)):n=0,p=ln(3,null,null,n),e.current=p,p.stateNode=e,p.memoizedState={element:c,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},xd(p),e}function nR(e,n,s){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:c==null?null:""+c,children:e,containerInfo:n,implementation:s}}function Wy(e){if(!e)return jr;e=e._reactInternals;e:{if(fo(e)!==e||e.tag!==1)throw Error(o(170));var n=e;do{switch(n.tag){case 3:n=n.stateNode.context;break e;case 1:if(Ut(n.type)){n=n.stateNode.__reactInternalMemoizedMergedChildContext;break e}}n=n.return}while(n!==null);throw Error(o(171))}if(e.tag===1){var s=e.type;if(Ut(s))return xv(e,s,n)}return n}function Ky(e,n,s,c,f,p,x,C,P){return e=af(s,c,!0,e,f,p,x,C,P),e.context=Wy(null),s=e.current,c=$t(),f=Hr(s),p=cr(c,f),p.callback=n??null,Fr(s,p,f),e.current.lanes=f,Qi(e,f,c),Wt(e,c),e}function Ol(e,n,s,c){var f=n.current,p=$t(),x=Hr(f);return s=Wy(s),n.context===null?n.context=s:n.pendingContext=s,n=cr(p,x),n.payload={element:e},c=c===void 0?null:c,c!==null&&(n.callback=c),e=Fr(f,n,x),e!==null&&(xn(e,f,x,p),al(e,f,x)),x}function Nl(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function Zy(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<n?s:n}}function lf(e,n){Zy(e,n),(e=e.alternate)&&Zy(e,n)}function rR(){return null}var qy=typeof reportError=="function"?reportError:function(e){console.error(e)};function cf(e){this._internalRoot=e}Tl.prototype.render=cf.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(o(409));Ol(e,n,null,null)},Tl.prototype.unmount=cf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;So(function(){Ol(null,e,null,null)}),n[or]=null}};function Tl(e){this._internalRoot=e}Tl.prototype.unstable_scheduleHydration=function(e){if(e){var n=Ng();e={blockedOn:null,target:e,priority:n};for(var s=0;s<Tr.length&&n!==0&&n<Tr[s].priority;s++);Tr.splice(s,0,e),s===0&&Ag(e)}};function uf(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Dl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Gy(){}function oR(e,n,s,c,f){if(f){if(typeof c=="function"){var p=c;c=function(){var F=Nl(x);p.call(F)}}var x=Ky(n,c,e,0,null,!1,!1,"",Gy);return e._reactRootContainer=x,e[or]=x.current,us(e.nodeType===8?e.parentNode:e),So(),x}for(;f=e.lastChild;)e.removeChild(f);if(typeof c=="function"){var C=c;c=function(){var F=Nl(P);C.call(F)}}var P=af(e,0,!1,null,null,!1,!1,"",Gy);return e._reactRootContainer=P,e[or]=P.current,us(e.nodeType===8?e.parentNode:e),So(function(){Ol(n,P,s,c)}),P}function Al(e,n,s,c,f){var p=s._reactRootContainer;if(p){var x=p;if(typeof f=="function"){var C=f;f=function(){var P=Nl(x);C.call(P)}}Ol(n,x,e,f)}else x=oR(s,n,e,f,c);return Nl(x)}Ig=function(e){switch(e.tag){case 3:var n=e.stateNode;if(n.current.memoizedState.isDehydrated){var s=Gi(n.pendingLanes);s!==0&&(Du(n,s|1),Wt(n,ct()),(Ue&6)===0&&(xi=ct()+500,Mr()))}break;case 13:So(function(){var c=lr(e,1);if(c!==null){var f=$t();xn(c,e,1,f)}}),lf(e,1)}},Au=function(e){if(e.tag===13){var n=lr(e,134217728);if(n!==null){var s=$t();xn(n,e,134217728,s)}lf(e,134217728)}},Og=function(e){if(e.tag===13){var n=Hr(e),s=lr(e,n);if(s!==null){var c=$t();xn(s,e,n,c)}lf(e,n)}},Ng=function(){return qe},Tg=function(e,n){var s=qe;try{return qe=e,n()}finally{qe=s}},Eu=function(e,n,s){switch(n){case"input":if(Tn(e,s),n=s.name,s.type==="radio"&&n!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+n)+'][type="radio"]'),n=0;n<s.length;n++){var c=s[n];if(c!==e&&c.form===e.form){var f=Ya(c);if(!f)throw Error(o(90));je(c),Tn(c,f)}}}break;case"textarea":ie(e,s);break;case"select":n=s.value,n!=null&&Rr(e,!!s.multiple,n,!1)}},gg=ef,vg=So;var iR={usingClientEntryPoint:!1,Events:[ps,si,Ya,hg,mg,ef]},Rs={findFiberByHostInstance:po,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},sR={bundleType:Rs.bundleType,version:Rs.version,rendererPackageName:Rs.rendererPackageName,rendererConfig:Rs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:O.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Sg(e),e===null?null:e.stateNode},findFiberByHostInstance:Rs.findFiberByHostInstance||rR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ll=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ll.isDisabled&&Ll.supportsFiber)try{Ta=Ll.inject(sR),An=Ll}catch{}}return jt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=iR,jt.createPortal=function(e,n){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!uf(n))throw Error(o(200));return nR(e,n,null,s)},jt.createRoot=function(e,n){if(!uf(e))throw Error(o(299));var s=!1,c="",f=qy;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(c=n.identifierPrefix),n.onRecoverableError!==void 0&&(f=n.onRecoverableError)),n=af(e,1,!1,null,null,s,!1,c,f),e[or]=n.current,us(e.nodeType===8?e.parentNode:e),new cf(n)},jt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=Sg(n),e=e===null?null:e.stateNode,e},jt.flushSync=function(e){return So(e)},jt.hydrate=function(e,n,s){if(!Dl(n))throw Error(o(200));return Al(null,e,n,!0,s)},jt.hydrateRoot=function(e,n,s){if(!uf(e))throw Error(o(405));var c=s!=null&&s.hydratedSources||null,f=!1,p="",x=qy;if(s!=null&&(s.unstable_strictMode===!0&&(f=!0),s.identifierPrefix!==void 0&&(p=s.identifierPrefix),s.onRecoverableError!==void 0&&(x=s.onRecoverableError)),n=Ky(n,null,e,1,s??null,f,!1,p,x),e[or]=n.current,us(e),c)for(e=0;e<c.length;e++)s=c[e],f=s._getVersion,f=f(s._source),n.mutableSourceEagerHydrationData==null?n.mutableSourceEagerHydrationData=[s,f]:n.mutableSourceEagerHydrationData.push(s,f);return new Tl(n)},jt.render=function(e,n,s){if(!Dl(n))throw Error(o(200));return Al(null,e,n,!1,s)},jt.unmountComponentAtNode=function(e){if(!Dl(e))throw Error(o(40));return e._reactRootContainer?(So(function(){Al(null,null,e,!1,function(){e._reactRootContainer=null,e[or]=null})}),!0):!1},jt.unstable_batchedUpdates=ef,jt.unstable_renderSubtreeIntoContainer=function(e,n,s,c){if(!Dl(s))throw Error(o(200));if(e==null||e._reactInternals===void 0)throw Error(o(38));return Al(e,n,s,!1,c)},jt.version="18.3.1-next-f1338f8080-20240426",jt}var gf;function vf(){if(gf)return Ml.exports;gf=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(t){console.error(t)}}return r(),Ml.exports=tx(),Ml.exports}var yf;function nx(){if(yf)return Ps;yf=1;var r=vf();return Ps.createRoot=r.createRoot,Ps.hydrateRoot=r.hydrateRoot,Ps}var rx=nx(),Fe;(function(r){r.assertEqual=a=>{};function t(a){}r.assertIs=t;function o(a){throw new Error}r.assertNever=o,r.arrayToEnum=a=>{const l={};for(const u of a)l[u]=u;return l},r.getValidEnumValues=a=>{const l=r.objectKeys(a).filter(d=>typeof a[a[d]]!="number"),u={};for(const d of l)u[d]=a[d];return r.objectValues(u)},r.objectValues=a=>r.objectKeys(a).map(function(l){return a[l]}),r.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const l=[];for(const u in a)Object.prototype.hasOwnProperty.call(a,u)&&l.push(u);return l},r.find=(a,l)=>{for(const u of a)if(l(u))return u},r.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function i(a,l=" | "){return a.map(u=>typeof u=="string"?`'${u}'`:u).join(l)}r.joinValues=i,r.jsonStringifyReplacer=(a,l)=>typeof l=="bigint"?l.toString():l})(Fe||(Fe={}));var xf;(function(r){r.mergeShapes=(t,o)=>({...t,...o})})(xf||(xf={}));const me=Fe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fr=r=>{switch(typeof r){case"undefined":return me.undefined;case"string":return me.string;case"number":return Number.isNaN(r)?me.nan:me.number;case"boolean":return me.boolean;case"function":return me.function;case"bigint":return me.bigint;case"symbol":return me.symbol;case"object":return Array.isArray(r)?me.array:r===null?me.null:r.then&&typeof r.then=="function"&&r.catch&&typeof r.catch=="function"?me.promise:typeof Map<"u"&&r instanceof Map?me.map:typeof Set<"u"&&r instanceof Set?me.set:typeof Date<"u"&&r instanceof Date?me.date:me.object;default:return me.unknown}},Q=Fe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class zn extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};const o=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,o):this.__proto__=o,this.name="ZodError",this.issues=t}format(t){const o=t||function(l){return l.message},i={_errors:[]},a=l=>{for(const u of l.issues)if(u.code==="invalid_union")u.unionErrors.map(a);else if(u.code==="invalid_return_type")a(u.returnTypeError);else if(u.code==="invalid_arguments")a(u.argumentsError);else if(u.path.length===0)i._errors.push(o(u));else{let d=i,h=0;for(;h<u.path.length;){const g=u.path[h];h===u.path.length-1?(d[g]=d[g]||{_errors:[]},d[g]._errors.push(o(u))):d[g]=d[g]||{_errors:[]},d=d[g],h++}}};return a(this),i}static assert(t){if(!(t instanceof zn))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Fe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=o=>o.message){const o={},i=[];for(const a of this.issues)a.path.length>0?(o[a.path[0]]=o[a.path[0]]||[],o[a.path[0]].push(t(a))):i.push(t(a));return{formErrors:i,fieldErrors:o}}get formErrors(){return this.flatten()}}zn.create=r=>new zn(r);const Vl=(r,t)=>{let o;switch(r.code){case Q.invalid_type:r.received===me.undefined?o="Required":o=`Expected ${r.expected}, received ${r.received}`;break;case Q.invalid_literal:o=`Invalid literal value, expected ${JSON.stringify(r.expected,Fe.jsonStringifyReplacer)}`;break;case Q.unrecognized_keys:o=`Unrecognized key(s) in object: ${Fe.joinValues(r.keys,", ")}`;break;case Q.invalid_union:o="Invalid input";break;case Q.invalid_union_discriminator:o=`Invalid discriminator value. Expected ${Fe.joinValues(r.options)}`;break;case Q.invalid_enum_value:o=`Invalid enum value. Expected ${Fe.joinValues(r.options)}, received '${r.received}'`;break;case Q.invalid_arguments:o="Invalid function arguments";break;case Q.invalid_return_type:o="Invalid function return type";break;case Q.invalid_date:o="Invalid date";break;case Q.invalid_string:typeof r.validation=="object"?"includes"in r.validation?(o=`Invalid input: must include "${r.validation.includes}"`,typeof r.validation.position=="number"&&(o=`${o} at one or more positions greater than or equal to ${r.validation.position}`)):"startsWith"in r.validation?o=`Invalid input: must start with "${r.validation.startsWith}"`:"endsWith"in r.validation?o=`Invalid input: must end with "${r.validation.endsWith}"`:Fe.assertNever(r.validation):r.validation!=="regex"?o=`Invalid ${r.validation}`:o="Invalid";break;case Q.too_small:r.type==="array"?o=`Array must contain ${r.exact?"exactly":r.inclusive?"at least":"more than"} ${r.minimum} element(s)`:r.type==="string"?o=`String must contain ${r.exact?"exactly":r.inclusive?"at least":"over"} ${r.minimum} character(s)`:r.type==="number"?o=`Number must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${r.minimum}`:r.type==="date"?o=`Date must be ${r.exact?"exactly equal to ":r.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(r.minimum))}`:o="Invalid input";break;case Q.too_big:r.type==="array"?o=`Array must contain ${r.exact?"exactly":r.inclusive?"at most":"less than"} ${r.maximum} element(s)`:r.type==="string"?o=`String must contain ${r.exact?"exactly":r.inclusive?"at most":"under"} ${r.maximum} character(s)`:r.type==="number"?o=`Number must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="bigint"?o=`BigInt must be ${r.exact?"exactly":r.inclusive?"less than or equal to":"less than"} ${r.maximum}`:r.type==="date"?o=`Date must be ${r.exact?"exactly":r.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(r.maximum))}`:o="Invalid input";break;case Q.custom:o="Invalid input";break;case Q.invalid_intersection_types:o="Intersection results could not be merged";break;case Q.not_multiple_of:o=`Number must be a multiple of ${r.multipleOf}`;break;case Q.not_finite:o="Number must be finite";break;default:o=t.defaultError,Fe.assertNever(r)}return{message:o}};let ox=Vl;function ix(){return ox}const sx=r=>{const{data:t,path:o,errorMaps:i,issueData:a}=r,l=[...o,...a.path||[]],u={...a,path:l};if(a.message!==void 0)return{...a,path:l,message:a.message};let d="";const h=i.filter(g=>!!g).slice().reverse();for(const g of h)d=g(u,{data:t,defaultError:d}).message;return{...a,path:l,message:d}};function de(r,t){const o=ix(),i=sx({issueData:t,data:r.data,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,o,o===Vl?void 0:Vl].filter(a=>!!a)});r.common.issues.push(i)}class Nt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,o){const i=[];for(const a of o){if(a.status==="aborted")return Re;a.status==="dirty"&&t.dirty(),i.push(a.value)}return{status:t.value,value:i}}static async mergeObjectAsync(t,o){const i=[];for(const a of o){const l=await a.key,u=await a.value;i.push({key:l,value:u})}return Nt.mergeObjectSync(t,i)}static mergeObjectSync(t,o){const i={};for(const a of o){const{key:l,value:u}=a;if(l.status==="aborted"||u.status==="aborted")return Re;l.status==="dirty"&&t.dirty(),u.status==="dirty"&&t.dirty(),l.value!=="__proto__"&&(typeof u.value<"u"||a.alwaysSet)&&(i[l.value]=u.value)}return{status:t.value,value:i}}}const Re=Object.freeze({status:"aborted"}),bi=r=>({status:"dirty",value:r}),Xt=r=>({status:"valid",value:r}),wf=r=>r.status==="aborted",Sf=r=>r.status==="dirty",_o=r=>r.status==="valid",Is=r=>typeof Promise<"u"&&r instanceof Promise;var Se;(function(r){r.errToObj=t=>typeof t=="string"?{message:t}:t||{},r.toString=t=>typeof t=="string"?t:t?.message})(Se||(Se={}));class wn{constructor(t,o,i,a){this._cachedPath=[],this.parent=t,this.data=o,this._path=i,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const bf=(r,t)=>{if(_o(t))return{success:!0,data:t.value};if(!r.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const o=new zn(r.common.issues);return this._error=o,this._error}}};function De(r){if(!r)return{};const{errorMap:t,invalid_type_error:o,required_error:i,description:a}=r;if(t&&(o||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:a}:{errorMap:(u,d)=>{const{message:h}=r;return u.code==="invalid_enum_value"?{message:h??d.defaultError}:typeof d.data>"u"?{message:h??i??d.defaultError}:u.code!=="invalid_type"?{message:d.defaultError}:{message:h??o??d.defaultError}},description:a}}class Me{get description(){return this._def.description}_getType(t){return fr(t.data)}_getOrReturnCtx(t,o){return o||{common:t.parent.common,data:t.data,parsedType:fr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Nt,ctx:{common:t.parent.common,data:t.data,parsedType:fr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const o=this._parse(t);if(Is(o))throw new Error("Synchronous parse encountered promise.");return o}_parseAsync(t){const o=this._parse(t);return Promise.resolve(o)}parse(t,o){const i=this.safeParse(t,o);if(i.success)return i.data;throw i.error}safeParse(t,o){const i={common:{issues:[],async:o?.async??!1,contextualErrorMap:o?.errorMap},path:o?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fr(t)},a=this._parseSync({data:t,path:i.path,parent:i});return bf(i,a)}"~validate"(t){const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fr(t)};if(!this["~standard"].async)try{const i=this._parseSync({data:t,path:[],parent:o});return _o(i)?{value:i.value}:{issues:o.common.issues}}catch(i){i?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:o}).then(i=>_o(i)?{value:i.value}:{issues:o.common.issues})}async parseAsync(t,o){const i=await this.safeParseAsync(t,o);if(i.success)return i.data;throw i.error}async safeParseAsync(t,o){const i={common:{issues:[],contextualErrorMap:o?.errorMap,async:!0},path:o?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:fr(t)},a=this._parse({data:t,path:i.path,parent:i}),l=await(Is(a)?a:Promise.resolve(a));return bf(i,l)}refine(t,o){const i=a=>typeof o=="string"||typeof o>"u"?{message:o}:typeof o=="function"?o(a):o;return this._refinement((a,l)=>{const u=t(a),d=()=>l.addIssue({code:Q.custom,...i(a)});return typeof Promise<"u"&&u instanceof Promise?u.then(h=>h?!0:(d(),!1)):u?!0:(d(),!1)})}refinement(t,o){return this._refinement((i,a)=>t(i)?!0:(a.addIssue(typeof o=="function"?o(i,a):o),!1))}_refinement(t){return new Yr({schema:this,typeName:Pe.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:o=>this["~validate"](o)}}optional(){return Un.create(this,this._def)}nullable(){return Xr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Sn.create(this)}promise(){return js.create(this,this._def)}or(t){return Ts.create([this,t],this._def)}and(t){return Ds.create(this,t,this._def)}transform(t){return new Yr({...De(this._def),schema:this,typeName:Pe.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const o=typeof t=="function"?t:()=>t;return new Ms({...De(this._def),innerType:this,defaultValue:o,typeName:Pe.ZodDefault})}brand(){return new Nf({typeName:Pe.ZodBranded,type:this,...De(this._def)})}catch(t){const o=typeof t=="function"?t:()=>t;return new zs({...De(this._def),innerType:this,catchValue:o,typeName:Pe.ZodCatch})}describe(t){const o=this.constructor;return new o({...this._def,description:t})}pipe(t){return Gl.create(this,t)}readonly(){return Fs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ax=/^c[^\s-]{8,}$/i,lx=/^[0-9a-z]+$/,cx=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ux=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,dx=/^[a-z0-9_-]{21}$/i,fx=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,px=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,hx=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,mx="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ul;const gx=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,vx=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,yx=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,xx=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,wx=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Sx=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,kf="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",bx=new RegExp(`^${kf}$`);function Cf(r){let t="[0-5]\\d";r.precision?t=`${t}\\.\\d{${r.precision}}`:r.precision==null&&(t=`${t}(\\.\\d+)?`);const o=r.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${o}`}function kx(r){return new RegExp(`^${Cf(r)}$`)}function Cx(r){let t=`${kf}T${Cf(r)}`;const o=[];return o.push(r.local?"Z?":"Z"),r.offset&&o.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${o.join("|")})`,new RegExp(`^${t}$`)}function _x(r,t){return!!((t==="v4"||!t)&&gx.test(r)||(t==="v6"||!t)&&yx.test(r))}function Ex(r,t){if(!fx.test(r))return!1;try{const[o]=r.split("."),i=o.replace(/-/g,"+").replace(/_/g,"/").padEnd(o.length+(4-o.length%4)%4,"="),a=JSON.parse(atob(i));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||t&&a.alg!==t)}catch{return!1}}function Rx(r,t){return!!((t==="v4"||!t)&&vx.test(r)||(t==="v6"||!t)&&xx.test(r))}class Fn extends Me{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==me.string){const l=this._getOrReturnCtx(t);return de(l,{code:Q.invalid_type,expected:me.string,received:l.parsedType}),Re}const i=new Nt;let a;for(const l of this._def.checks)if(l.kind==="min")t.data.length<l.value&&(a=this._getOrReturnCtx(t,a),de(a,{code:Q.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),i.dirty());else if(l.kind==="max")t.data.length>l.value&&(a=this._getOrReturnCtx(t,a),de(a,{code:Q.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),i.dirty());else if(l.kind==="length"){const u=t.data.length>l.value,d=t.data.length<l.value;(u||d)&&(a=this._getOrReturnCtx(t,a),u?de(a,{code:Q.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):d&&de(a,{code:Q.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),i.dirty())}else if(l.kind==="email")hx.test(t.data)||(a=this._getOrReturnCtx(t,a),de(a,{validation:"email",code:Q.invalid_string,message:l.message}),i.dirty());else if(l.kind==="emoji")Ul||(Ul=new RegExp(mx,"u")),Ul.test(t.data)||(a=this._getOrReturnCtx(t,a),de(a,{validation:"emoji",code:Q.invalid_string,message:l.message}),i.dirty());else if(l.kind==="uuid")ux.test(t.data)||(a=this._getOrReturnCtx(t,a),de(a,{validation:"uuid",code:Q.invalid_string,message:l.message}),i.dirty());else if(l.kind==="nanoid")dx.test(t.data)||(a=this._getOrReturnCtx(t,a),de(a,{validation:"nanoid",code:Q.invalid_string,message:l.message}),i.dirty());else if(l.kind==="cuid")ax.test(t.data)||(a=this._getOrReturnCtx(t,a),de(a,{validation:"cuid",code:Q.invalid_string,message:l.message}),i.dirty());else if(l.kind==="cuid2")lx.test(t.data)||(a=this._getOrReturnCtx(t,a),de(a,{validation:"cuid2",code:Q.invalid_string,message:l.message}),i.dirty());else if(l.kind==="ulid")cx.test(t.data)||(a=this._getOrReturnCtx(t,a),de(a,{validation:"ulid",code:Q.invalid_string,message:l.message}),i.dirty());else if(l.kind==="url")try{new URL(t.data)}catch{a=this._getOrReturnCtx(t,a),de(a,{validation:"url",code:Q.invalid_string,message:l.message}),i.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(t.data)||(a=this._getOrReturnCtx(t,a),de(a,{validation:"regex",code:Q.invalid_string,message:l.message}),i.dirty())):l.kind==="trim"?t.data=t.data.trim():l.kind==="includes"?t.data.includes(l.value,l.position)||(a=this._getOrReturnCtx(t,a),de(a,{code:Q.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),i.dirty()):l.kind==="toLowerCase"?t.data=t.data.toLowerCase():l.kind==="toUpperCase"?t.data=t.data.toUpperCase():l.kind==="startsWith"?t.data.startsWith(l.value)||(a=this._getOrReturnCtx(t,a),de(a,{code:Q.invalid_string,validation:{startsWith:l.value},message:l.message}),i.dirty()):l.kind==="endsWith"?t.data.endsWith(l.value)||(a=this._getOrReturnCtx(t,a),de(a,{code:Q.invalid_string,validation:{endsWith:l.value},message:l.message}),i.dirty()):l.kind==="datetime"?Cx(l).test(t.data)||(a=this._getOrReturnCtx(t,a),de(a,{code:Q.invalid_string,validation:"datetime",message:l.message}),i.dirty()):l.kind==="date"?bx.test(t.data)||(a=this._getOrReturnCtx(t,a),de(a,{code:Q.invalid_string,validation:"date",message:l.message}),i.dirty()):l.kind==="time"?kx(l).test(t.data)||(a=this._getOrReturnCtx(t,a),de(a,{code:Q.invalid_string,validation:"time",message:l.message}),i.dirty()):l.kind==="duration"?px.test(t.data)||(a=this._getOrReturnCtx(t,a),de(a,{validation:"duration",code:Q.invalid_string,message:l.message}),i.dirty()):l.kind==="ip"?_x(t.data,l.version)||(a=this._getOrReturnCtx(t,a),de(a,{validation:"ip",code:Q.invalid_string,message:l.message}),i.dirty()):l.kind==="jwt"?Ex(t.data,l.alg)||(a=this._getOrReturnCtx(t,a),de(a,{validation:"jwt",code:Q.invalid_string,message:l.message}),i.dirty()):l.kind==="cidr"?Rx(t.data,l.version)||(a=this._getOrReturnCtx(t,a),de(a,{validation:"cidr",code:Q.invalid_string,message:l.message}),i.dirty()):l.kind==="base64"?wx.test(t.data)||(a=this._getOrReturnCtx(t,a),de(a,{validation:"base64",code:Q.invalid_string,message:l.message}),i.dirty()):l.kind==="base64url"?Sx.test(t.data)||(a=this._getOrReturnCtx(t,a),de(a,{validation:"base64url",code:Q.invalid_string,message:l.message}),i.dirty()):Fe.assertNever(l);return{status:i.value,value:t.data}}_regex(t,o,i){return this.refinement(a=>t.test(a),{validation:o,code:Q.invalid_string,...Se.errToObj(i)})}_addCheck(t){return new Fn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Se.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Se.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Se.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Se.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Se.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Se.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Se.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Se.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Se.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Se.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Se.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Se.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Se.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:t?.offset??!1,local:t?.local??!1,...Se.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...Se.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...Se.errToObj(t)})}regex(t,o){return this._addCheck({kind:"regex",regex:t,...Se.errToObj(o)})}includes(t,o){return this._addCheck({kind:"includes",value:t,position:o?.position,...Se.errToObj(o?.message)})}startsWith(t,o){return this._addCheck({kind:"startsWith",value:t,...Se.errToObj(o)})}endsWith(t,o){return this._addCheck({kind:"endsWith",value:t,...Se.errToObj(o)})}min(t,o){return this._addCheck({kind:"min",value:t,...Se.errToObj(o)})}max(t,o){return this._addCheck({kind:"max",value:t,...Se.errToObj(o)})}length(t,o){return this._addCheck({kind:"length",value:t,...Se.errToObj(o)})}nonempty(t){return this.min(1,Se.errToObj(t))}trim(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Fn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const o of this._def.checks)o.kind==="min"&&(t===null||o.value>t)&&(t=o.value);return t}get maxLength(){let t=null;for(const o of this._def.checks)o.kind==="max"&&(t===null||o.value<t)&&(t=o.value);return t}}Fn.create=r=>new Fn({checks:[],typeName:Pe.ZodString,coerce:r?.coerce??!1,...De(r)});function Px(r,t){const o=(r.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,a=o>i?o:i,l=Number.parseInt(r.toFixed(a).replace(".","")),u=Number.parseInt(t.toFixed(a).replace(".",""));return l%u/10**a}class Eo extends Me{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==me.number){const l=this._getOrReturnCtx(t);return de(l,{code:Q.invalid_type,expected:me.number,received:l.parsedType}),Re}let i;const a=new Nt;for(const l of this._def.checks)l.kind==="int"?Fe.isInteger(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{code:Q.invalid_type,expected:"integer",received:"float",message:l.message}),a.dirty()):l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(i=this._getOrReturnCtx(t,i),de(i,{code:Q.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),a.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(i=this._getOrReturnCtx(t,i),de(i,{code:Q.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),a.dirty()):l.kind==="multipleOf"?Px(t.data,l.value)!==0&&(i=this._getOrReturnCtx(t,i),de(i,{code:Q.not_multiple_of,multipleOf:l.value,message:l.message}),a.dirty()):l.kind==="finite"?Number.isFinite(t.data)||(i=this._getOrReturnCtx(t,i),de(i,{code:Q.not_finite,message:l.message}),a.dirty()):Fe.assertNever(l);return{status:a.value,value:t.data}}gte(t,o){return this.setLimit("min",t,!0,Se.toString(o))}gt(t,o){return this.setLimit("min",t,!1,Se.toString(o))}lte(t,o){return this.setLimit("max",t,!0,Se.toString(o))}lt(t,o){return this.setLimit("max",t,!1,Se.toString(o))}setLimit(t,o,i,a){return new Eo({...this._def,checks:[...this._def.checks,{kind:t,value:o,inclusive:i,message:Se.toString(a)}]})}_addCheck(t){return new Eo({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Se.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Se.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Se.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Se.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Se.toString(t)})}multipleOf(t,o){return this._addCheck({kind:"multipleOf",value:t,message:Se.toString(o)})}finite(t){return this._addCheck({kind:"finite",message:Se.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Se.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Se.toString(t)})}get minValue(){let t=null;for(const o of this._def.checks)o.kind==="min"&&(t===null||o.value>t)&&(t=o.value);return t}get maxValue(){let t=null;for(const o of this._def.checks)o.kind==="max"&&(t===null||o.value<t)&&(t=o.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Fe.isInteger(t.value))}get isFinite(){let t=null,o=null;for(const i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return!0;i.kind==="min"?(o===null||i.value>o)&&(o=i.value):i.kind==="max"&&(t===null||i.value<t)&&(t=i.value)}return Number.isFinite(o)&&Number.isFinite(t)}}Eo.create=r=>new Eo({checks:[],typeName:Pe.ZodNumber,coerce:r?.coerce||!1,...De(r)});class ki extends Me{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==me.bigint)return this._getInvalidInput(t);let i;const a=new Nt;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?t.data<l.value:t.data<=l.value)&&(i=this._getOrReturnCtx(t,i),de(i,{code:Q.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),a.dirty()):l.kind==="max"?(l.inclusive?t.data>l.value:t.data>=l.value)&&(i=this._getOrReturnCtx(t,i),de(i,{code:Q.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),a.dirty()):l.kind==="multipleOf"?t.data%l.value!==BigInt(0)&&(i=this._getOrReturnCtx(t,i),de(i,{code:Q.not_multiple_of,multipleOf:l.value,message:l.message}),a.dirty()):Fe.assertNever(l);return{status:a.value,value:t.data}}_getInvalidInput(t){const o=this._getOrReturnCtx(t);return de(o,{code:Q.invalid_type,expected:me.bigint,received:o.parsedType}),Re}gte(t,o){return this.setLimit("min",t,!0,Se.toString(o))}gt(t,o){return this.setLimit("min",t,!1,Se.toString(o))}lte(t,o){return this.setLimit("max",t,!0,Se.toString(o))}lt(t,o){return this.setLimit("max",t,!1,Se.toString(o))}setLimit(t,o,i,a){return new ki({...this._def,checks:[...this._def.checks,{kind:t,value:o,inclusive:i,message:Se.toString(a)}]})}_addCheck(t){return new ki({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Se.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Se.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Se.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Se.toString(t)})}multipleOf(t,o){return this._addCheck({kind:"multipleOf",value:t,message:Se.toString(o)})}get minValue(){let t=null;for(const o of this._def.checks)o.kind==="min"&&(t===null||o.value>t)&&(t=o.value);return t}get maxValue(){let t=null;for(const o of this._def.checks)o.kind==="max"&&(t===null||o.value<t)&&(t=o.value);return t}}ki.create=r=>new ki({checks:[],typeName:Pe.ZodBigInt,coerce:r?.coerce??!1,...De(r)});class Bl extends Me{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==me.boolean){const i=this._getOrReturnCtx(t);return de(i,{code:Q.invalid_type,expected:me.boolean,received:i.parsedType}),Re}return Xt(t.data)}}Bl.create=r=>new Bl({typeName:Pe.ZodBoolean,coerce:r?.coerce||!1,...De(r)});class Os extends Me{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==me.date){const l=this._getOrReturnCtx(t);return de(l,{code:Q.invalid_type,expected:me.date,received:l.parsedType}),Re}if(Number.isNaN(t.data.getTime())){const l=this._getOrReturnCtx(t);return de(l,{code:Q.invalid_date}),Re}const i=new Nt;let a;for(const l of this._def.checks)l.kind==="min"?t.data.getTime()<l.value&&(a=this._getOrReturnCtx(t,a),de(a,{code:Q.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),i.dirty()):l.kind==="max"?t.data.getTime()>l.value&&(a=this._getOrReturnCtx(t,a),de(a,{code:Q.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),i.dirty()):Fe.assertNever(l);return{status:i.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Os({...this._def,checks:[...this._def.checks,t]})}min(t,o){return this._addCheck({kind:"min",value:t.getTime(),message:Se.toString(o)})}max(t,o){return this._addCheck({kind:"max",value:t.getTime(),message:Se.toString(o)})}get minDate(){let t=null;for(const o of this._def.checks)o.kind==="min"&&(t===null||o.value>t)&&(t=o.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const o of this._def.checks)o.kind==="max"&&(t===null||o.value<t)&&(t=o.value);return t!=null?new Date(t):null}}Os.create=r=>new Os({checks:[],coerce:r?.coerce||!1,typeName:Pe.ZodDate,...De(r)});class _f extends Me{_parse(t){if(this._getType(t)!==me.symbol){const i=this._getOrReturnCtx(t);return de(i,{code:Q.invalid_type,expected:me.symbol,received:i.parsedType}),Re}return Xt(t.data)}}_f.create=r=>new _f({typeName:Pe.ZodSymbol,...De(r)});class Hl extends Me{_parse(t){if(this._getType(t)!==me.undefined){const i=this._getOrReturnCtx(t);return de(i,{code:Q.invalid_type,expected:me.undefined,received:i.parsedType}),Re}return Xt(t.data)}}Hl.create=r=>new Hl({typeName:Pe.ZodUndefined,...De(r)});class Ns extends Me{_parse(t){if(this._getType(t)!==me.null){const i=this._getOrReturnCtx(t);return de(i,{code:Q.invalid_type,expected:me.null,received:i.parsedType}),Re}return Xt(t.data)}}Ns.create=r=>new Ns({typeName:Pe.ZodNull,...De(r)});class Ef extends Me{constructor(){super(...arguments),this._any=!0}_parse(t){return Xt(t.data)}}Ef.create=r=>new Ef({typeName:Pe.ZodAny,...De(r)});class Wl extends Me{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Xt(t.data)}}Wl.create=r=>new Wl({typeName:Pe.ZodUnknown,...De(r)});class pr extends Me{_parse(t){const o=this._getOrReturnCtx(t);return de(o,{code:Q.invalid_type,expected:me.never,received:o.parsedType}),Re}}pr.create=r=>new pr({typeName:Pe.ZodNever,...De(r)});class Rf extends Me{_parse(t){if(this._getType(t)!==me.undefined){const i=this._getOrReturnCtx(t);return de(i,{code:Q.invalid_type,expected:me.void,received:i.parsedType}),Re}return Xt(t.data)}}Rf.create=r=>new Rf({typeName:Pe.ZodVoid,...De(r)});class Sn extends Me{_parse(t){const{ctx:o,status:i}=this._processInputParams(t),a=this._def;if(o.parsedType!==me.array)return de(o,{code:Q.invalid_type,expected:me.array,received:o.parsedType}),Re;if(a.exactLength!==null){const u=o.data.length>a.exactLength.value,d=o.data.length<a.exactLength.value;(u||d)&&(de(o,{code:u?Q.too_big:Q.too_small,minimum:d?a.exactLength.value:void 0,maximum:u?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),i.dirty())}if(a.minLength!==null&&o.data.length<a.minLength.value&&(de(o,{code:Q.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),i.dirty()),a.maxLength!==null&&o.data.length>a.maxLength.value&&(de(o,{code:Q.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),i.dirty()),o.common.async)return Promise.all([...o.data].map((u,d)=>a.type._parseAsync(new wn(o,u,o.path,d)))).then(u=>Nt.mergeArray(i,u));const l=[...o.data].map((u,d)=>a.type._parseSync(new wn(o,u,o.path,d)));return Nt.mergeArray(i,l)}get element(){return this._def.type}min(t,o){return new Sn({...this._def,minLength:{value:t,message:Se.toString(o)}})}max(t,o){return new Sn({...this._def,maxLength:{value:t,message:Se.toString(o)}})}length(t,o){return new Sn({...this._def,exactLength:{value:t,message:Se.toString(o)}})}nonempty(t){return this.min(1,t)}}Sn.create=(r,t)=>new Sn({type:r,minLength:null,maxLength:null,exactLength:null,typeName:Pe.ZodArray,...De(t)});function Ro(r){if(r instanceof dt){const t={};for(const o in r.shape){const i=r.shape[o];t[o]=Un.create(Ro(i))}return new dt({...r._def,shape:()=>t})}else return r instanceof Sn?new Sn({...r._def,type:Ro(r.element)}):r instanceof Un?Un.create(Ro(r.unwrap())):r instanceof Xr?Xr.create(Ro(r.unwrap())):r instanceof Gr?Gr.create(r.items.map(t=>Ro(t))):r}class dt extends Me{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),o=Fe.objectKeys(t);return this._cached={shape:t,keys:o},this._cached}_parse(t){if(this._getType(t)!==me.object){const g=this._getOrReturnCtx(t);return de(g,{code:Q.invalid_type,expected:me.object,received:g.parsedType}),Re}const{status:i,ctx:a}=this._processInputParams(t),{shape:l,keys:u}=this._getCached(),d=[];if(!(this._def.catchall instanceof pr&&this._def.unknownKeys==="strip"))for(const g in a.data)u.includes(g)||d.push(g);const h=[];for(const g of u){const v=l[g],y=a.data[g];h.push({key:{status:"valid",value:g},value:v._parse(new wn(a,y,a.path,g)),alwaysSet:g in a.data})}if(this._def.catchall instanceof pr){const g=this._def.unknownKeys;if(g==="passthrough")for(const v of d)h.push({key:{status:"valid",value:v},value:{status:"valid",value:a.data[v]}});else if(g==="strict")d.length>0&&(de(a,{code:Q.unrecognized_keys,keys:d}),i.dirty());else if(g!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const g=this._def.catchall;for(const v of d){const y=a.data[v];h.push({key:{status:"valid",value:v},value:g._parse(new wn(a,y,a.path,v)),alwaysSet:v in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const g=[];for(const v of h){const y=await v.key,S=await v.value;g.push({key:y,value:S,alwaysSet:v.alwaysSet})}return g}).then(g=>Nt.mergeObjectSync(i,g)):Nt.mergeObjectSync(i,h)}get shape(){return this._def.shape()}strict(t){return Se.errToObj,new dt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(o,i)=>{const a=this._def.errorMap?.(o,i).message??i.defaultError;return o.code==="unrecognized_keys"?{message:Se.errToObj(t).message??a}:{message:a}}}:{}})}strip(){return new dt({...this._def,unknownKeys:"strip"})}passthrough(){return new dt({...this._def,unknownKeys:"passthrough"})}extend(t){return new dt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new dt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Pe.ZodObject})}setKey(t,o){return this.augment({[t]:o})}catchall(t){return new dt({...this._def,catchall:t})}pick(t){const o={};for(const i of Fe.objectKeys(t))t[i]&&this.shape[i]&&(o[i]=this.shape[i]);return new dt({...this._def,shape:()=>o})}omit(t){const o={};for(const i of Fe.objectKeys(this.shape))t[i]||(o[i]=this.shape[i]);return new dt({...this._def,shape:()=>o})}deepPartial(){return Ro(this)}partial(t){const o={};for(const i of Fe.objectKeys(this.shape)){const a=this.shape[i];t&&!t[i]?o[i]=a:o[i]=a.optional()}return new dt({...this._def,shape:()=>o})}required(t){const o={};for(const i of Fe.objectKeys(this.shape))if(t&&!t[i])o[i]=this.shape[i];else{let l=this.shape[i];for(;l instanceof Un;)l=l._def.innerType;o[i]=l}return new dt({...this._def,shape:()=>o})}keyof(){return If(Fe.objectKeys(this.shape))}}dt.create=(r,t)=>new dt({shape:()=>r,unknownKeys:"strip",catchall:pr.create(),typeName:Pe.ZodObject,...De(t)}),dt.strictCreate=(r,t)=>new dt({shape:()=>r,unknownKeys:"strict",catchall:pr.create(),typeName:Pe.ZodObject,...De(t)}),dt.lazycreate=(r,t)=>new dt({shape:r,unknownKeys:"strip",catchall:pr.create(),typeName:Pe.ZodObject,...De(t)});class Ts extends Me{_parse(t){const{ctx:o}=this._processInputParams(t),i=this._def.options;function a(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return o.common.issues.push(...d.ctx.common.issues),d.result;const u=l.map(d=>new zn(d.ctx.common.issues));return de(o,{code:Q.invalid_union,unionErrors:u}),Re}if(o.common.async)return Promise.all(i.map(async l=>{const u={...o,common:{...o.common,issues:[]},parent:null};return{result:await l._parseAsync({data:o.data,path:o.path,parent:u}),ctx:u}})).then(a);{let l;const u=[];for(const h of i){const g={...o,common:{...o.common,issues:[]},parent:null},v=h._parseSync({data:o.data,path:o.path,parent:g});if(v.status==="valid")return v;v.status==="dirty"&&!l&&(l={result:v,ctx:g}),g.common.issues.length&&u.push(g.common.issues)}if(l)return o.common.issues.push(...l.ctx.common.issues),l.result;const d=u.map(h=>new zn(h));return de(o,{code:Q.invalid_union,unionErrors:d}),Re}}get options(){return this._def.options}}Ts.create=(r,t)=>new Ts({options:r,typeName:Pe.ZodUnion,...De(t)});const Vn=r=>r instanceof Ls?Vn(r.schema):r instanceof Yr?Vn(r.innerType()):r instanceof $s?[r.value]:r instanceof Qr?r.options:r instanceof ql?Fe.objectValues(r.enum):r instanceof Ms?Vn(r._def.innerType):r instanceof Hl?[void 0]:r instanceof Ns?[null]:r instanceof Un?[void 0,...Vn(r.unwrap())]:r instanceof Xr?[null,...Vn(r.unwrap())]:r instanceof Nf||r instanceof Fs?Vn(r.unwrap()):r instanceof zs?Vn(r._def.innerType):[];class Kl extends Me{_parse(t){const{ctx:o}=this._processInputParams(t);if(o.parsedType!==me.object)return de(o,{code:Q.invalid_type,expected:me.object,received:o.parsedType}),Re;const i=this.discriminator,a=o.data[i],l=this.optionsMap.get(a);return l?o.common.async?l._parseAsync({data:o.data,path:o.path,parent:o}):l._parseSync({data:o.data,path:o.path,parent:o}):(de(o,{code:Q.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),Re)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,o,i){const a=new Map;for(const l of o){const u=Vn(l.shape[t]);if(!u.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const d of u){if(a.has(d))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(d)}`);a.set(d,l)}}return new Kl({typeName:Pe.ZodDiscriminatedUnion,discriminator:t,options:o,optionsMap:a,...De(i)})}}function Zl(r,t){const o=fr(r),i=fr(t);if(r===t)return{valid:!0,data:r};if(o===me.object&&i===me.object){const a=Fe.objectKeys(t),l=Fe.objectKeys(r).filter(d=>a.indexOf(d)!==-1),u={...r,...t};for(const d of l){const h=Zl(r[d],t[d]);if(!h.valid)return{valid:!1};u[d]=h.data}return{valid:!0,data:u}}else if(o===me.array&&i===me.array){if(r.length!==t.length)return{valid:!1};const a=[];for(let l=0;l<r.length;l++){const u=r[l],d=t[l],h=Zl(u,d);if(!h.valid)return{valid:!1};a.push(h.data)}return{valid:!0,data:a}}else return o===me.date&&i===me.date&&+r==+t?{valid:!0,data:r}:{valid:!1}}class Ds extends Me{_parse(t){const{status:o,ctx:i}=this._processInputParams(t),a=(l,u)=>{if(wf(l)||wf(u))return Re;const d=Zl(l.value,u.value);return d.valid?((Sf(l)||Sf(u))&&o.dirty(),{status:o.value,value:d.data}):(de(i,{code:Q.invalid_intersection_types}),Re)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([l,u])=>a(l,u)):a(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}}Ds.create=(r,t,o)=>new Ds({left:r,right:t,typeName:Pe.ZodIntersection,...De(o)});class Gr extends Me{_parse(t){const{status:o,ctx:i}=this._processInputParams(t);if(i.parsedType!==me.array)return de(i,{code:Q.invalid_type,expected:me.array,received:i.parsedType}),Re;if(i.data.length<this._def.items.length)return de(i,{code:Q.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Re;!this._def.rest&&i.data.length>this._def.items.length&&(de(i,{code:Q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),o.dirty());const l=[...i.data].map((u,d)=>{const h=this._def.items[d]||this._def.rest;return h?h._parse(new wn(i,u,i.path,d)):null}).filter(u=>!!u);return i.common.async?Promise.all(l).then(u=>Nt.mergeArray(o,u)):Nt.mergeArray(o,l)}get items(){return this._def.items}rest(t){return new Gr({...this._def,rest:t})}}Gr.create=(r,t)=>{if(!Array.isArray(r))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gr({items:r,typeName:Pe.ZodTuple,rest:null,...De(t)})};class As extends Me{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:o,ctx:i}=this._processInputParams(t);if(i.parsedType!==me.object)return de(i,{code:Q.invalid_type,expected:me.object,received:i.parsedType}),Re;const a=[],l=this._def.keyType,u=this._def.valueType;for(const d in i.data)a.push({key:l._parse(new wn(i,d,i.path,d)),value:u._parse(new wn(i,i.data[d],i.path,d)),alwaysSet:d in i.data});return i.common.async?Nt.mergeObjectAsync(o,a):Nt.mergeObjectSync(o,a)}get element(){return this._def.valueType}static create(t,o,i){return o instanceof Me?new As({keyType:t,valueType:o,typeName:Pe.ZodRecord,...De(i)}):new As({keyType:Fn.create(),valueType:t,typeName:Pe.ZodRecord,...De(o)})}}class Pf extends Me{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:o,ctx:i}=this._processInputParams(t);if(i.parsedType!==me.map)return de(i,{code:Q.invalid_type,expected:me.map,received:i.parsedType}),Re;const a=this._def.keyType,l=this._def.valueType,u=[...i.data.entries()].map(([d,h],g)=>({key:a._parse(new wn(i,d,i.path,[g,"key"])),value:l._parse(new wn(i,h,i.path,[g,"value"]))}));if(i.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const h of u){const g=await h.key,v=await h.value;if(g.status==="aborted"||v.status==="aborted")return Re;(g.status==="dirty"||v.status==="dirty")&&o.dirty(),d.set(g.value,v.value)}return{status:o.value,value:d}})}else{const d=new Map;for(const h of u){const g=h.key,v=h.value;if(g.status==="aborted"||v.status==="aborted")return Re;(g.status==="dirty"||v.status==="dirty")&&o.dirty(),d.set(g.value,v.value)}return{status:o.value,value:d}}}}Pf.create=(r,t,o)=>new Pf({valueType:t,keyType:r,typeName:Pe.ZodMap,...De(o)});class Ci extends Me{_parse(t){const{status:o,ctx:i}=this._processInputParams(t);if(i.parsedType!==me.set)return de(i,{code:Q.invalid_type,expected:me.set,received:i.parsedType}),Re;const a=this._def;a.minSize!==null&&i.data.size<a.minSize.value&&(de(i,{code:Q.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),o.dirty()),a.maxSize!==null&&i.data.size>a.maxSize.value&&(de(i,{code:Q.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),o.dirty());const l=this._def.valueType;function u(h){const g=new Set;for(const v of h){if(v.status==="aborted")return Re;v.status==="dirty"&&o.dirty(),g.add(v.value)}return{status:o.value,value:g}}const d=[...i.data.values()].map((h,g)=>l._parse(new wn(i,h,i.path,g)));return i.common.async?Promise.all(d).then(h=>u(h)):u(d)}min(t,o){return new Ci({...this._def,minSize:{value:t,message:Se.toString(o)}})}max(t,o){return new Ci({...this._def,maxSize:{value:t,message:Se.toString(o)}})}size(t,o){return this.min(t,o).max(t,o)}nonempty(t){return this.min(1,t)}}Ci.create=(r,t)=>new Ci({valueType:r,minSize:null,maxSize:null,typeName:Pe.ZodSet,...De(t)});class Ls extends Me{get schema(){return this._def.getter()}_parse(t){const{ctx:o}=this._processInputParams(t);return this._def.getter()._parse({data:o.data,path:o.path,parent:o})}}Ls.create=(r,t)=>new Ls({getter:r,typeName:Pe.ZodLazy,...De(t)});class $s extends Me{_parse(t){if(t.data!==this._def.value){const o=this._getOrReturnCtx(t);return de(o,{received:o.data,code:Q.invalid_literal,expected:this._def.value}),Re}return{status:"valid",value:t.data}}get value(){return this._def.value}}$s.create=(r,t)=>new $s({value:r,typeName:Pe.ZodLiteral,...De(t)});function If(r,t){return new Qr({values:r,typeName:Pe.ZodEnum,...De(t)})}class Qr extends Me{_parse(t){if(typeof t.data!="string"){const o=this._getOrReturnCtx(t),i=this._def.values;return de(o,{expected:Fe.joinValues(i),received:o.parsedType,code:Q.invalid_type}),Re}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const o=this._getOrReturnCtx(t),i=this._def.values;return de(o,{received:o.data,code:Q.invalid_enum_value,options:i}),Re}return Xt(t.data)}get options(){return this._def.values}get enum(){const t={};for(const o of this._def.values)t[o]=o;return t}get Values(){const t={};for(const o of this._def.values)t[o]=o;return t}get Enum(){const t={};for(const o of this._def.values)t[o]=o;return t}extract(t,o=this._def){return Qr.create(t,{...this._def,...o})}exclude(t,o=this._def){return Qr.create(this.options.filter(i=>!t.includes(i)),{...this._def,...o})}}Qr.create=If;class ql extends Me{_parse(t){const o=Fe.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(t);if(i.parsedType!==me.string&&i.parsedType!==me.number){const a=Fe.objectValues(o);return de(i,{expected:Fe.joinValues(a),received:i.parsedType,code:Q.invalid_type}),Re}if(this._cache||(this._cache=new Set(Fe.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const a=Fe.objectValues(o);return de(i,{received:i.data,code:Q.invalid_enum_value,options:a}),Re}return Xt(t.data)}get enum(){return this._def.values}}ql.create=(r,t)=>new ql({values:r,typeName:Pe.ZodNativeEnum,...De(t)});class js extends Me{unwrap(){return this._def.type}_parse(t){const{ctx:o}=this._processInputParams(t);if(o.parsedType!==me.promise&&o.common.async===!1)return de(o,{code:Q.invalid_type,expected:me.promise,received:o.parsedType}),Re;const i=o.parsedType===me.promise?o.data:Promise.resolve(o.data);return Xt(i.then(a=>this._def.type.parseAsync(a,{path:o.path,errorMap:o.common.contextualErrorMap})))}}js.create=(r,t)=>new js({type:r,typeName:Pe.ZodPromise,...De(t)});class Yr extends Me{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Pe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:o,ctx:i}=this._processInputParams(t),a=this._def.effect||null,l={addIssue:u=>{de(i,u),u.fatal?o.abort():o.dirty()},get path(){return i.path}};if(l.addIssue=l.addIssue.bind(l),a.type==="preprocess"){const u=a.transform(i.data,l);if(i.common.async)return Promise.resolve(u).then(async d=>{if(o.value==="aborted")return Re;const h=await this._def.schema._parseAsync({data:d,path:i.path,parent:i});return h.status==="aborted"?Re:h.status==="dirty"||o.value==="dirty"?bi(h.value):h});{if(o.value==="aborted")return Re;const d=this._def.schema._parseSync({data:u,path:i.path,parent:i});return d.status==="aborted"?Re:d.status==="dirty"||o.value==="dirty"?bi(d.value):d}}if(a.type==="refinement"){const u=d=>{const h=a.refinement(d,l);if(i.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(i.common.async===!1){const d=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return d.status==="aborted"?Re:(d.status==="dirty"&&o.dirty(),u(d.value),{status:o.value,value:d.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(d=>d.status==="aborted"?Re:(d.status==="dirty"&&o.dirty(),u(d.value).then(()=>({status:o.value,value:d.value}))))}if(a.type==="transform")if(i.common.async===!1){const u=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!_o(u))return Re;const d=a.transform(u.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:o.value,value:d}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(u=>_o(u)?Promise.resolve(a.transform(u.value,l)).then(d=>({status:o.value,value:d})):Re);Fe.assertNever(a)}}Yr.create=(r,t,o)=>new Yr({schema:r,typeName:Pe.ZodEffects,effect:t,...De(o)}),Yr.createWithPreprocess=(r,t,o)=>new Yr({schema:t,effect:{type:"preprocess",transform:r},typeName:Pe.ZodEffects,...De(o)});class Un extends Me{_parse(t){return this._getType(t)===me.undefined?Xt(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Un.create=(r,t)=>new Un({innerType:r,typeName:Pe.ZodOptional,...De(t)});class Xr extends Me{_parse(t){return this._getType(t)===me.null?Xt(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Xr.create=(r,t)=>new Xr({innerType:r,typeName:Pe.ZodNullable,...De(t)});class Ms extends Me{_parse(t){const{ctx:o}=this._processInputParams(t);let i=o.data;return o.parsedType===me.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:o.path,parent:o})}removeDefault(){return this._def.innerType}}Ms.create=(r,t)=>new Ms({innerType:r,typeName:Pe.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...De(t)});class zs extends Me{_parse(t){const{ctx:o}=this._processInputParams(t),i={...o,common:{...o.common,issues:[]}},a=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return Is(a)?a.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new zn(i.common.issues)},input:i.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new zn(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}}zs.create=(r,t)=>new zs({innerType:r,typeName:Pe.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...De(t)});class Of extends Me{_parse(t){if(this._getType(t)!==me.nan){const i=this._getOrReturnCtx(t);return de(i,{code:Q.invalid_type,expected:me.nan,received:i.parsedType}),Re}return{status:"valid",value:t.data}}}Of.create=r=>new Of({typeName:Pe.ZodNaN,...De(r)});class Nf extends Me{_parse(t){const{ctx:o}=this._processInputParams(t),i=o.data;return this._def.type._parse({data:i,path:o.path,parent:o})}unwrap(){return this._def.type}}class Gl extends Me{_parse(t){const{status:o,ctx:i}=this._processInputParams(t);if(i.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return l.status==="aborted"?Re:l.status==="dirty"?(o.dirty(),bi(l.value)):this._def.out._parseAsync({data:l.value,path:i.path,parent:i})})();{const a=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?Re:a.status==="dirty"?(o.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:i.path,parent:i})}}static create(t,o){return new Gl({in:t,out:o,typeName:Pe.ZodPipeline})}}class Fs extends Me{_parse(t){const o=this._def.innerType._parse(t),i=a=>(_o(a)&&(a.value=Object.freeze(a.value)),a);return Is(o)?o.then(a=>i(a)):i(o)}unwrap(){return this._def.innerType}}Fs.create=(r,t)=>new Fs({innerType:r,typeName:Pe.ZodReadonly,...De(t)});var Pe;(function(r){r.ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly"})(Pe||(Pe={}));const te=Fn.create,mt=Eo.create,Tt=Bl.create,hr=Ns.create,Jr=Wl.create;pr.create;const nt=Sn.create,xe=dt.create,Bn=Ts.create,Tf=Kl.create;Ds.create,Gr.create;const mr=As.create,Ix=Ls.create,Qe=$s.create,Hn=Qr.create;js.create,Un.create,Xr.create;function Df(r){var t,o,i="";if(typeof r=="string"||typeof r=="number")i+=r;else if(typeof r=="object")if(Array.isArray(r)){var a=r.length;for(t=0;t<a;t++)r[t]&&(o=Df(r[t]))&&(i&&(i+=" "),i+=o)}else for(o in r)r[o]&&(i&&(i+=" "),i+=o);return i}function Af(){for(var r,t,o=0,i="",a=arguments.length;o<a;o++)(r=arguments[o])&&(t=Df(r))&&(i&&(i+=" "),i+=t);return i}const Ox=(r,t)=>{const o=new Array(r.length+t.length);for(let i=0;i<r.length;i++)o[i]=r[i];for(let i=0;i<t.length;i++)o[r.length+i]=t[i];return o},Nx=(r,t)=>({classGroupId:r,validator:t}),Lf=(r=new Map,t=null,o)=>({nextPart:r,validators:t,classGroupId:o}),Vs="-",$f=[],Tx="arbitrary..",Dx=r=>{const t=Lx(r),{conflictingClassGroups:o,conflictingClassGroupModifiers:i}=r;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return Ax(u);const d=u.split(Vs),h=d[0]===""&&d.length>1?1:0;return jf(d,h,t)},getConflictingClassGroupIds:(u,d)=>{if(d){const h=i[u],g=o[u];return h?g?Ox(g,h):h:g||$f}return o[u]||$f}}},jf=(r,t,o)=>{if(r.length-t===0)return o.classGroupId;const a=r[t],l=o.nextPart.get(a);if(l){const g=jf(r,t+1,l);if(g)return g}const u=o.validators;if(u===null)return;const d=t===0?r.join(Vs):r.slice(t).join(Vs),h=u.length;for(let g=0;g<h;g++){const v=u[g];if(v.validator(d))return v.classGroupId}},Ax=r=>r.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=r.slice(1,-1),o=t.indexOf(":"),i=t.slice(0,o);return i?Tx+i:void 0})(),Lx=r=>{const{theme:t,classGroups:o}=r;return $x(o,t)},$x=(r,t)=>{const o=Lf();for(const i in r){const a=r[i];Ql(a,o,i,t)}return o},Ql=(r,t,o,i)=>{const a=r.length;for(let l=0;l<a;l++){const u=r[l];jx(u,t,o,i)}},jx=(r,t,o,i)=>{if(typeof r=="string"){Mx(r,t,o);return}if(typeof r=="function"){zx(r,t,o,i);return}Fx(r,t,o,i)},Mx=(r,t,o)=>{const i=r===""?t:Mf(t,r);i.classGroupId=o},zx=(r,t,o,i)=>{if(Vx(r)){Ql(r(i),t,o,i);return}t.validators===null&&(t.validators=[]),t.validators.push(Nx(o,r))},Fx=(r,t,o,i)=>{const a=Object.entries(r),l=a.length;for(let u=0;u<l;u++){const[d,h]=a[u];Ql(h,Mf(t,d),o,i)}},Mf=(r,t)=>{let o=r;const i=t.split(Vs),a=i.length;for(let l=0;l<a;l++){const u=i[l];let d=o.nextPart.get(u);d||(d=Lf(),o.nextPart.set(u,d)),o=d}return o},Vx=r=>"isThemeGetter"in r&&r.isThemeGetter===!0,Ux=r=>{if(r<1)return{get:()=>{},set:()=>{}};let t=0,o=Object.create(null),i=Object.create(null);const a=(l,u)=>{o[l]=u,t++,t>r&&(t=0,i=o,o=Object.create(null))};return{get(l){let u=o[l];if(u!==void 0)return u;if((u=i[l])!==void 0)return a(l,u),u},set(l,u){l in o?o[l]=u:a(l,u)}}},Yl="!",zf=":",Bx=[],Ff=(r,t,o,i,a)=>({modifiers:r,hasImportantModifier:t,baseClassName:o,maybePostfixModifierPosition:i,isExternal:a}),Hx=r=>{const{prefix:t,experimentalParseClassName:o}=r;let i=a=>{const l=[];let u=0,d=0,h=0,g;const v=a.length;for(let _=0;_<v;_++){const k=a[_];if(u===0&&d===0){if(k===zf){l.push(a.slice(h,_)),h=_+1;continue}if(k==="/"){g=_;continue}}k==="["?u++:k==="]"?u--:k==="("?d++:k===")"&&d--}const y=l.length===0?a:a.slice(h);let S=y,b=!1;y.endsWith(Yl)?(S=y.slice(0,-1),b=!0):y.startsWith(Yl)&&(S=y.slice(1),b=!0);const w=g&&g>h?g-h:void 0;return Ff(l,b,S,w)};if(t){const a=t+zf,l=i;i=u=>u.startsWith(a)?l(u.slice(a.length)):Ff(Bx,!1,u,void 0,!0)}if(o){const a=i;i=l=>o({className:l,parseClassName:a})}return i},Wx=r=>{const t=new Map;return r.orderSensitiveModifiers.forEach((o,i)=>{t.set(o,1e6+i)}),o=>{const i=[];let a=[];for(let l=0;l<o.length;l++){const u=o[l],d=u[0]==="[",h=t.has(u);d||h?(a.length>0&&(a.sort(),i.push(...a),a=[]),i.push(u)):a.push(u)}return a.length>0&&(a.sort(),i.push(...a)),i}},Kx=r=>({cache:Ux(r.cacheSize),parseClassName:Hx(r),sortModifiers:Wx(r),postfixLookupClassGroupIds:Zx(r),...Dx(r)}),Zx=r=>{const t=Object.create(null),o=r.postfixLookupClassGroups;if(o)for(let i=0;i<o.length;i++)t[o[i]]=!0;return t},qx=/\s+/,Gx=(r,t)=>{const{parseClassName:o,getClassGroupId:i,getConflictingClassGroupIds:a,sortModifiers:l,postfixLookupClassGroupIds:u}=t,d=[],h=r.trim().split(qx);let g="";for(let v=h.length-1;v>=0;v-=1){const y=h[v],{isExternal:S,modifiers:b,hasImportantModifier:w,baseClassName:_,maybePostfixModifierPosition:k}=o(y);if(S){g=y+(g.length>0?" "+g:g);continue}let R=!!k,D;if(R){const B=_.substring(0,k);D=i(B);const j=D&&u[D]?i(_):void 0;j&&j!==D&&(D=j,R=!1)}else D=i(_);if(!D){if(!R){g=y+(g.length>0?" "+g:g);continue}if(D=i(_),!D){g=y+(g.length>0?" "+g:g);continue}R=!1}const T=b.length===0?"":b.length===1?b[0]:l(b).join(":"),O=w?T+Yl:T,V=O+D;if(d.indexOf(V)>-1)continue;d.push(V);const L=a(D,R);for(let B=0;B<L.length;++B){const j=L[B];d.push(O+j)}g=y+(g.length>0?" "+g:g)}return g},Qx=(...r)=>{let t=0,o,i,a="";for(;t<r.length;)(o=r[t++])&&(i=Vf(o))&&(a&&(a+=" "),a+=i);return a},Vf=r=>{if(typeof r=="string")return r;let t,o="";for(let i=0;i<r.length;i++)r[i]&&(t=Vf(r[i]))&&(o&&(o+=" "),o+=t);return o},Yx=(r,...t)=>{let o,i,a,l;const u=h=>{const g=t.reduce((v,y)=>y(v),r());return o=Kx(g),i=o.cache.get,a=o.cache.set,l=d,d(h)},d=h=>{const g=i(h);if(g)return g;const v=Gx(h,o);return a(h,v),v};return l=u,(...h)=>l(Qx(...h))},Xx=[],gt=r=>{const t=o=>o[r]||Xx;return t.isThemeGetter=!0,t},Uf=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Bf=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Jx=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,e0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,t0=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,n0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,r0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,o0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gr=r=>Jx.test(r),Ae=r=>!!r&&!Number.isNaN(Number(r)),bn=r=>!!r&&Number.isInteger(Number(r)),Xl=r=>r.endsWith("%")&&Ae(r.slice(0,-1)),Wn=r=>e0.test(r),Hf=()=>!0,i0=r=>t0.test(r)&&!n0.test(r),Jl=()=>!1,s0=r=>r0.test(r),a0=r=>o0.test(r),l0=r=>!he(r)&&!ge(r),c0=r=>r.startsWith("@container")&&(r[10]==="/"&&r[11]!==void 0||r[11]==="s"&&r[16]!==void 0&&r.startsWith("-size/",10)||r[11]==="n"&&r[18]!==void 0&&r.startsWith("-normal/",10)),u0=r=>vr(r,Qf,Jl),he=r=>Uf.test(r),eo=r=>vr(r,Yf,i0),Wf=r=>vr(r,y0,Ae),d0=r=>vr(r,Jf,Hf),f0=r=>vr(r,Xf,Jl),Kf=r=>vr(r,qf,Jl),p0=r=>vr(r,Gf,a0),Us=r=>vr(r,ep,s0),ge=r=>Bf.test(r),_i=r=>to(r,Yf),h0=r=>to(r,Xf),Zf=r=>to(r,qf),m0=r=>to(r,Qf),g0=r=>to(r,Gf),Bs=r=>to(r,ep,!0),v0=r=>to(r,Jf,!0),vr=(r,t,o)=>{const i=Uf.exec(r);return i?i[1]?t(i[1]):o(i[2]):!1},to=(r,t,o=!1)=>{const i=Bf.exec(r);return i?i[1]?t(i[1]):o:!1},qf=r=>r==="position"||r==="percentage",Gf=r=>r==="image"||r==="url",Qf=r=>r==="length"||r==="size"||r==="bg-size",Yf=r=>r==="length",y0=r=>r==="number",Xf=r=>r==="family-name",Jf=r=>r==="number"||r==="weight",ep=r=>r==="shadow",x0=Yx(()=>{const r=gt("color"),t=gt("font"),o=gt("text"),i=gt("font-weight"),a=gt("tracking"),l=gt("leading"),u=gt("breakpoint"),d=gt("container"),h=gt("spacing"),g=gt("radius"),v=gt("shadow"),y=gt("inset-shadow"),S=gt("text-shadow"),b=gt("drop-shadow"),w=gt("blur"),_=gt("perspective"),k=gt("aspect"),R=gt("ease"),D=gt("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],V=()=>[...O(),ge,he],L=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],j=()=>[ge,he,h],Y=()=>[gr,"full","auto",...j()],ce=()=>[bn,"none","subgrid",ge,he],Ce=()=>["auto",{span:["full",bn,ge,he]},bn,ge,he],le=()=>[bn,"auto",ge,he],ue=()=>["auto","min","max","fr",ge,he],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],be=()=>["start","end","center","stretch","center-safe","end-safe"],ae=()=>["auto",...j()],oe=()=>[gr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],U=()=>[gr,"screen","full","dvw","lvw","svw","min","max","fit",...j()],G=()=>[gr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...j()],z=()=>[r,ge,he],I=()=>[...O(),Zf,Kf,{position:[ge,he]}],E=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",m0,u0,{size:[ge,he]}],J=()=>[Xl,_i,eo],H=()=>["","none","full",g,ge,he],re=()=>["",Ae,_i,eo],pe=()=>["solid","dashed","dotted","double"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[Ae,Xl,Zf,Kf],Te=()=>["","none",w,ge,he],$e=()=>["none",Ae,ge,he],je=()=>["none",Ae,ge,he],ze=()=>[Ae,ge,he],ot=()=>[gr,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Wn],breakpoint:[Wn],color:[Hf],container:[Wn],"drop-shadow":[Wn],ease:["in","out","in-out"],font:[l0],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Wn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Wn],shadow:[Wn],spacing:["px",Ae],text:[Wn],"text-shadow":[Wn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",gr,he,ge,k]}],container:["container"],"container-type":[{"@container":["","normal","size",ge,he]}],"container-named":[c0],columns:[{columns:[Ae,he,ge,d]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:V()}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:Y()}],"inset-x":[{"inset-x":Y()}],"inset-y":[{"inset-y":Y()}],start:[{"inset-s":Y(),start:Y()}],end:[{"inset-e":Y(),end:Y()}],"inset-bs":[{"inset-bs":Y()}],"inset-be":[{"inset-be":Y()}],top:[{top:Y()}],right:[{right:Y()}],bottom:[{bottom:Y()}],left:[{left:Y()}],visibility:["visible","invisible","collapse"],z:[{z:[bn,"auto",ge,he]}],basis:[{basis:[gr,"full","auto",d,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ae,gr,"auto","initial","none",he]}],grow:[{grow:["",Ae,ge,he]}],shrink:[{shrink:["",Ae,ge,he]}],order:[{order:[bn,"first","last","none",ge,he]}],"grid-cols":[{"grid-cols":ce()}],"col-start-end":[{col:Ce()}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":ce()}],"row-start-end":[{row:Ce()}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ue()}],"auto-rows":[{"auto-rows":ue()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...be(),"normal"]}],"justify-self":[{"justify-self":["auto",...be()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...be(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...be(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...be(),"baseline"]}],"place-self":[{"place-self":["auto",...be()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pbs:[{pbs:j()}],pbe:[{pbe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:ae()}],mx:[{mx:ae()}],my:[{my:ae()}],ms:[{ms:ae()}],me:[{me:ae()}],mbs:[{mbs:ae()}],mbe:[{mbe:ae()}],mt:[{mt:ae()}],mr:[{mr:ae()}],mb:[{mb:ae()}],ml:[{ml:ae()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:oe()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...G()]}],"min-block-size":[{"min-block":["auto",...G()]}],"max-block-size":[{"max-block":["none",...G()]}],w:[{w:[d,"screen",...oe()]}],"min-w":[{"min-w":[d,"screen","none",...oe()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...oe()]}],h:[{h:["screen","lh",...oe()]}],"min-h":[{"min-h":["screen","lh","none",...oe()]}],"max-h":[{"max-h":["screen","lh",...oe()]}],"font-size":[{text:["base",o,_i,eo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[i,v0,d0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Xl,he]}],"font-family":[{font:[h0,f0,t]}],"font-features":[{"font-features":[he]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,ge,he]}],"line-clamp":[{"line-clamp":[Ae,"none",ge,Wf]}],leading:[{leading:[l,...j()]}],"list-image":[{"list-image":["none",ge,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ge,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ae,"from-font","auto",ge,eo]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[Ae,"auto",ge,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"tab-size":[{tab:[bn,ge,he]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ge,he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ge,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:E()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},bn,ge,he],radial:["",ge,he],conic:[bn,ge,he]},g0,p0]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:J()}],"gradient-via-pos":[{via:J()}],"gradient-to-pos":[{to:J()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-bs":[{"border-bs":re()}],"border-w-be":[{"border-be":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...pe(),"hidden","none"]}],"divide-style":[{divide:[...pe(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-bs":[{"border-bs":z()}],"border-color-be":[{"border-be":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ae,ge,he]}],"outline-w":[{outline:["",Ae,_i,eo]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",v,Bs,Us]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",y,Bs,Us]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[Ae,eo]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",S,Bs,Us]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[Ae,ge,he]}],"mix-blend":[{"mix-blend":[...X(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":X()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ae]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[ge,he]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":O()}],"mask-image-conic-pos":[{"mask-conic":[Ae]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:E()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ge,he]}],filter:[{filter:["","none",ge,he]}],blur:[{blur:Te()}],brightness:[{brightness:[Ae,ge,he]}],contrast:[{contrast:[Ae,ge,he]}],"drop-shadow":[{"drop-shadow":["","none",b,Bs,Us]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",Ae,ge,he]}],"hue-rotate":[{"hue-rotate":[Ae,ge,he]}],invert:[{invert:["",Ae,ge,he]}],saturate:[{saturate:[Ae,ge,he]}],sepia:[{sepia:["",Ae,ge,he]}],"backdrop-filter":[{"backdrop-filter":["","none",ge,he]}],"backdrop-blur":[{"backdrop-blur":Te()}],"backdrop-brightness":[{"backdrop-brightness":[Ae,ge,he]}],"backdrop-contrast":[{"backdrop-contrast":[Ae,ge,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ae,ge,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ae,ge,he]}],"backdrop-invert":[{"backdrop-invert":["",Ae,ge,he]}],"backdrop-opacity":[{"backdrop-opacity":[Ae,ge,he]}],"backdrop-saturate":[{"backdrop-saturate":[Ae,ge,he]}],"backdrop-sepia":[{"backdrop-sepia":["",Ae,ge,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ge,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ae,"initial",ge,he]}],ease:[{ease:["linear","initial",R,ge,he]}],delay:[{delay:[Ae,ge,he]}],animate:[{animate:["none",D,ge,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[_,ge,he]}],"perspective-origin":[{"perspective-origin":V()}],rotate:[{rotate:$e()}],"rotate-x":[{"rotate-x":$e()}],"rotate-y":[{"rotate-y":$e()}],"rotate-z":[{"rotate-z":$e()}],scale:[{scale:je()}],"scale-x":[{"scale-x":je()}],"scale-y":[{"scale-y":je()}],"scale-z":[{"scale-z":je()}],"scale-3d":["scale-3d"],skew:[{skew:ze()}],"skew-x":[{"skew-x":ze()}],"skew-y":[{"skew-y":ze()}],transform:[{transform:[ge,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:V()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ot()}],"translate-x":[{"translate-x":ot()}],"translate-y":[{"translate-y":ot()}],"translate-z":[{"translate-z":ot()}],"translate-none":["translate-none"],zoom:[{zoom:[bn,ge,he]}],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ge,he]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":z()}],"scrollbar-track-color":[{"scrollbar-track":z()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mbs":[{"scroll-mbs":j()}],"scroll-mbe":[{"scroll-mbe":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pbs":[{"scroll-pbs":j()}],"scroll-pbe":[{"scroll-pbe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ge,he]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[Ae,_i,eo,Wf]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function w0(r={}){const t=r.styleId??"xpert-shadcn-ui-theme-vars";if(typeof document>"u")return;r.density==="compact"?document.documentElement.dataset.xuiDensity="compact":r.density==="default"&&delete document.documentElement.dataset.xuiDensity;let o=document.getElementById(t);o||(o=document.createElement("style"),o.id=t,document.head.appendChild(o)),o.textContent=`
|
|
1
|
+
(function(){"use strict";function Kw(n,e){for(var o=0;o<e.length;o++){const s=e[o];if(typeof s!="string"&&!Array.isArray(s)){for(const i in s)if(i!=="default"&&!(i in n)){const l=Object.getOwnPropertyDescriptor(s,i);l&&Object.defineProperty(n,i,l.get?l:{enumerable:!0,get:()=>s[i]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}function Gw(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Mc={exports:{}},ze={};var bp;function Zw(){if(bp)return ze;bp=1;var n=Symbol.for("react.element"),e=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.iterator;function x(T){return T===null||typeof T!="object"?null:(T=v&&T[v]||T["@@iterator"],typeof T=="function"?T:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function k(T,P,W){this.props=T,this.context=P,this.refs=C,this.updater=W||b}k.prototype.isReactComponent={},k.prototype.setState=function(T,P){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,P,"setState")},k.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function N(){}N.prototype=k.prototype;function D(T,P,W){this.props=T,this.context=P,this.refs=C,this.updater=W||b}var O=D.prototype=new N;O.constructor=D,S(O,k.prototype),O.isPureReactComponent=!0;var R=Array.isArray,L=Object.prototype.hasOwnProperty,j={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function I(T,P,W){var Z,H={},re=null,de=null;if(P!=null)for(Z in P.ref!==void 0&&(de=P.ref),P.key!==void 0&&(re=""+P.key),P)L.call(P,Z)&&!B.hasOwnProperty(Z)&&(H[Z]=P[Z]);var Y=arguments.length-2;if(Y===1)H.children=W;else if(1<Y){for(var se=Array(Y),Oe=0;Oe<Y;Oe++)se[Oe]=arguments[Oe+2];H.children=se}if(T&&T.defaultProps)for(Z in Y=T.defaultProps,Y)H[Z]===void 0&&(H[Z]=Y[Z]);return{$$typeof:n,type:T,key:re,ref:de,props:H,_owner:j.current}}function K(T,P){return{$$typeof:n,type:T.type,key:P,ref:T.ref,props:T.props,_owner:T._owner}}function ae(T){return typeof T=="object"&&T!==null&&T.$$typeof===n}function be(T){var P={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(W){return P[W]})}var le=/\/+/g;function ce(T,P){return typeof T=="object"&&T!==null&&T.key!=null?be(""+T.key):P.toString(36)}function ue(T,P,W,Z,H){var re=typeof T;(re==="undefined"||re==="boolean")&&(T=null);var de=!1;if(T===null)de=!0;else switch(re){case"string":case"number":de=!0;break;case"object":switch(T.$$typeof){case n:case e:de=!0}}if(de)return de=T,H=H(de),T=Z===""?"."+ce(de,0):Z,R(H)?(W="",T!=null&&(W=T.replace(le,"$&/")+"/"),ue(H,P,W,"",function(Oe){return Oe})):H!=null&&(ae(H)&&(H=K(H,W+(!H.key||de&&de.key===H.key?"":(""+H.key).replace(le,"$&/")+"/")+T)),P.push(H)),1;if(de=0,Z=Z===""?".":Z+":",R(T))for(var Y=0;Y<T.length;Y++){re=T[Y];var se=Z+ce(re,Y);de+=ue(re,P,W,se,H)}else if(se=x(T),typeof se=="function")for(T=se.call(T),Y=0;!(re=T.next()).done;)re=re.value,se=Z+ce(re,Y++),de+=ue(re,P,W,se,H);else if(re==="object")throw P=String(T),Error("Objects are not valid as a React child (found: "+(P==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":P)+"). If you meant to render a collection of children, use an array instead.");return de}function Se(T,P,W){if(T==null)return T;var Z=[],H=0;return ue(T,Z,"","",function(re){return P.call(W,re,H++)}),Z}function q(T){if(T._status===-1){var P=T._result;P=P(),P.then(function(W){(T._status===0||T._status===-1)&&(T._status=1,T._result=W)},function(W){(T._status===0||T._status===-1)&&(T._status=2,T._result=W)}),T._status===-1&&(T._status=0,T._result=P)}if(T._status===1)return T._result.default;throw T._result}var ne={current:null},U={transition:null},Q={ReactCurrentDispatcher:ne,ReactCurrentBatchConfig:U,ReactCurrentOwner:j};function M(){throw Error("act(...) is not supported in production builds of React.")}return ze.Children={map:Se,forEach:function(T,P,W){Se(T,function(){P.apply(this,arguments)},W)},count:function(T){var P=0;return Se(T,function(){P++}),P},toArray:function(T){return Se(T,function(P){return P})||[]},only:function(T){if(!ae(T))throw Error("React.Children.only expected to receive a single React element child.");return T}},ze.Component=k,ze.Fragment=o,ze.Profiler=i,ze.PureComponent=D,ze.StrictMode=s,ze.Suspense=h,ze.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Q,ze.act=M,ze.cloneElement=function(T,P,W){if(T==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+T+".");var Z=S({},T.props),H=T.key,re=T.ref,de=T._owner;if(P!=null){if(P.ref!==void 0&&(re=P.ref,de=j.current),P.key!==void 0&&(H=""+P.key),T.type&&T.type.defaultProps)var Y=T.type.defaultProps;for(se in P)L.call(P,se)&&!B.hasOwnProperty(se)&&(Z[se]=P[se]===void 0&&Y!==void 0?Y[se]:P[se])}var se=arguments.length-2;if(se===1)Z.children=W;else if(1<se){Y=Array(se);for(var Oe=0;Oe<se;Oe++)Y[Oe]=arguments[Oe+2];Z.children=Y}return{$$typeof:n,type:T.type,key:H,ref:re,props:Z,_owner:de}},ze.createContext=function(T){return T={$$typeof:u,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},T.Provider={$$typeof:l,_context:T},T.Consumer=T},ze.createElement=I,ze.createFactory=function(T){var P=I.bind(null,T);return P.type=T,P},ze.createRef=function(){return{current:null}},ze.forwardRef=function(T){return{$$typeof:d,render:T}},ze.isValidElement=ae,ze.lazy=function(T){return{$$typeof:y,_payload:{_status:-1,_result:T},_init:q}},ze.memo=function(T,P){return{$$typeof:m,type:T,compare:P===void 0?null:P}},ze.startTransition=function(T){var P=U.transition;U.transition={};try{T()}finally{U.transition=P}},ze.unstable_act=M,ze.useCallback=function(T,P){return ne.current.useCallback(T,P)},ze.useContext=function(T){return ne.current.useContext(T)},ze.useDebugValue=function(){},ze.useDeferredValue=function(T){return ne.current.useDeferredValue(T)},ze.useEffect=function(T,P){return ne.current.useEffect(T,P)},ze.useId=function(){return ne.current.useId()},ze.useImperativeHandle=function(T,P,W){return ne.current.useImperativeHandle(T,P,W)},ze.useInsertionEffect=function(T,P){return ne.current.useInsertionEffect(T,P)},ze.useLayoutEffect=function(T,P){return ne.current.useLayoutEffect(T,P)},ze.useMemo=function(T,P){return ne.current.useMemo(T,P)},ze.useReducer=function(T,P,W){return ne.current.useReducer(T,P,W)},ze.useRef=function(T){return ne.current.useRef(T)},ze.useState=function(T){return ne.current.useState(T)},ze.useSyncExternalStore=function(T,P,W){return ne.current.useSyncExternalStore(T,P,W)},ze.useTransition=function(){return ne.current.useTransition()},ze.version="18.3.1",ze}var Sp;function jc(){return Sp||(Sp=1,Mc.exports=Zw()),Mc.exports}var f=jc();const ns=Kw({__proto__:null,default:Gw(f)},[f]);var fa={},Lc={exports:{}},Wt={},Fc={exports:{}},zc={};var Cp;function qw(){return Cp||(Cp=1,(function(n){function e(U,Q){var M=U.length;U.push(Q);e:for(;0<M;){var T=M-1>>>1,P=U[T];if(0<i(P,Q))U[T]=Q,U[M]=P,M=T;else break e}}function o(U){return U.length===0?null:U[0]}function s(U){if(U.length===0)return null;var Q=U[0],M=U.pop();if(M!==Q){U[0]=M;e:for(var T=0,P=U.length,W=P>>>1;T<W;){var Z=2*(T+1)-1,H=U[Z],re=Z+1,de=U[re];if(0>i(H,M))re<P&&0>i(de,H)?(U[T]=de,U[re]=M,T=re):(U[T]=H,U[Z]=M,T=Z);else if(re<P&&0>i(de,M))U[T]=de,U[re]=M,T=re;else break e}}return Q}function i(U,Q){var M=U.sortIndex-Q.sortIndex;return M!==0?M:U.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;n.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();n.unstable_now=function(){return u.now()-d}}var h=[],m=[],y=1,v=null,x=3,b=!1,S=!1,C=!1,k=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function O(U){for(var Q=o(m);Q!==null;){if(Q.callback===null)s(m);else if(Q.startTime<=U)s(m),Q.sortIndex=Q.expirationTime,e(h,Q);else break;Q=o(m)}}function R(U){if(C=!1,O(U),!S)if(o(h)!==null)S=!0,q(L);else{var Q=o(m);Q!==null&&ne(R,Q.startTime-U)}}function L(U,Q){S=!1,C&&(C=!1,N(I),I=-1),b=!0;var M=x;try{for(O(Q),v=o(h);v!==null&&(!(v.expirationTime>Q)||U&&!be());){var T=v.callback;if(typeof T=="function"){v.callback=null,x=v.priorityLevel;var P=T(v.expirationTime<=Q);Q=n.unstable_now(),typeof P=="function"?v.callback=P:v===o(h)&&s(h),O(Q)}else s(h);v=o(h)}if(v!==null)var W=!0;else{var Z=o(m);Z!==null&&ne(R,Z.startTime-Q),W=!1}return W}finally{v=null,x=M,b=!1}}var j=!1,B=null,I=-1,K=5,ae=-1;function be(){return!(n.unstable_now()-ae<K)}function le(){if(B!==null){var U=n.unstable_now();ae=U;var Q=!0;try{Q=B(!0,U)}finally{Q?ce():(j=!1,B=null)}}else j=!1}var ce;if(typeof D=="function")ce=function(){D(le)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,Se=ue.port2;ue.port1.onmessage=le,ce=function(){Se.postMessage(null)}}else ce=function(){k(le,0)};function q(U){B=U,j||(j=!0,ce())}function ne(U,Q){I=k(function(){U(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(U){U.callback=null},n.unstable_continueExecution=function(){S||b||(S=!0,q(L))},n.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<U?Math.floor(1e3/U):5},n.unstable_getCurrentPriorityLevel=function(){return x},n.unstable_getFirstCallbackNode=function(){return o(h)},n.unstable_next=function(U){switch(x){case 1:case 2:case 3:var Q=3;break;default:Q=x}var M=x;x=Q;try{return U()}finally{x=M}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(U,Q){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var M=x;x=U;try{return Q()}finally{x=M}},n.unstable_scheduleCallback=function(U,Q,M){var T=n.unstable_now();switch(typeof M=="object"&&M!==null?(M=M.delay,M=typeof M=="number"&&0<M?T+M:T):M=T,U){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=M+P,U={id:y++,callback:Q,priorityLevel:U,startTime:M,expirationTime:P,sortIndex:-1},M>T?(U.sortIndex=M,e(m,U),o(h)===null&&U===o(m)&&(C?(N(I),I=-1):C=!0,ne(R,M-T))):(U.sortIndex=P,e(h,U),S||b||(S=!0,q(L))),U},n.unstable_shouldYield=be,n.unstable_wrapCallback=function(U){var Q=x;return function(){var M=x;x=Q;try{return U.apply(this,arguments)}finally{x=M}}}})(zc)),zc}var kp;function Yw(){return kp||(kp=1,Fc.exports=qw()),Fc.exports}var Ep;function Qw(){if(Ep)return Wt;Ep=1;var n=jc(),e=Yw();function o(t){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+t,a=1;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+t+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,i={};function l(t,r){u(t,r),u(t+"Capture",r)}function u(t,r){for(i[t]=r,t=0;t<r.length;t++)s.add(r[t])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,m=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,y={},v={};function x(t){return h.call(v,t)?!0:h.call(y,t)?!1:m.test(t)?v[t]=!0:(y[t]=!0,!1)}function b(t,r,a,c){if(a!==null&&a.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return c?!1:a!==null?!a.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function S(t,r,a,c){if(r===null||typeof r>"u"||b(t,r,a,c))return!0;if(c)return!1;if(a!==null)switch(a.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function C(t,r,a,c,p,g,w){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=c,this.attributeNamespace=p,this.mustUseProperty=a,this.propertyName=t,this.type=r,this.sanitizeURL=g,this.removeEmptyString=w}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){k[t]=new C(t,0,!1,t,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var r=t[0];k[r]=new C(r,1,!1,t[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(t){k[t]=new C(t,2,!1,t.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){k[t]=new C(t,2,!1,t,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){k[t]=new C(t,3,!1,t.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(t){k[t]=new C(t,3,!0,t,null,!1,!1)}),["capture","download"].forEach(function(t){k[t]=new C(t,4,!1,t,null,!1,!1)}),["cols","rows","size","span"].forEach(function(t){k[t]=new C(t,6,!1,t,null,!1,!1)}),["rowSpan","start"].forEach(function(t){k[t]=new C(t,5,!1,t.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function D(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var r=t.replace(N,D);k[r]=new C(r,1,!1,t,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var r=t.replace(N,D);k[r]=new C(r,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(t){var r=t.replace(N,D);k[r]=new C(r,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(t){k[t]=new C(t,1,!1,t.toLowerCase(),null,!1,!1)}),k.xlinkHref=new C("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(t){k[t]=new C(t,1,!1,t.toLowerCase(),null,!0,!0)});function O(t,r,a,c){var p=k.hasOwnProperty(r)?k[r]:null;(p!==null?p.type!==0:c||!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(S(r,a,p,c)&&(a=null),c||p===null?x(r)&&(a===null?t.removeAttribute(r):t.setAttribute(r,""+a)):p.mustUseProperty?t[p.propertyName]=a===null?p.type===3?!1:"":a:(r=p.attributeName,c=p.attributeNamespace,a===null?t.removeAttribute(r):(p=p.type,a=p===3||p===4&&a===!0?"":""+a,c?t.setAttributeNS(c,r,a):t.setAttribute(r,a))))}var R=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,L=Symbol.for("react.element"),j=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),ae=Symbol.for("react.provider"),be=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),ce=Symbol.for("react.suspense"),ue=Symbol.for("react.suspense_list"),Se=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),ne=Symbol.for("react.offscreen"),U=Symbol.iterator;function Q(t){return t===null||typeof t!="object"?null:(t=U&&t[U]||t["@@iterator"],typeof t=="function"?t:null)}var M=Object.assign,T;function P(t){if(T===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);T=r&&r[1]||""}return`
|
|
2
|
+
`+T+t}var W=!1;function Z(t,r){if(!t||W)return"";W=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(r)if(r=function(){throw Error()},Object.defineProperty(r.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(r,[])}catch(V){var c=V}Reflect.construct(t,[],r)}else{try{r.call()}catch(V){c=V}t.call(r.prototype)}else{try{throw Error()}catch(V){c=V}t()}}catch(V){if(V&&c&&typeof V.stack=="string"){for(var p=V.stack.split(`
|
|
3
|
+
`),g=c.stack.split(`
|
|
4
|
+
`),w=p.length-1,_=g.length-1;1<=w&&0<=_&&p[w]!==g[_];)_--;for(;1<=w&&0<=_;w--,_--)if(p[w]!==g[_]){if(w!==1||_!==1)do if(w--,_--,0>_||p[w]!==g[_]){var A=`
|
|
5
|
+
`+p[w].replace(" at new "," at ");return t.displayName&&A.includes("<anonymous>")&&(A=A.replace("<anonymous>",t.displayName)),A}while(1<=w&&0<=_);break}}}finally{W=!1,Error.prepareStackTrace=a}return(t=t?t.displayName||t.name:"")?P(t):""}function H(t){switch(t.tag){case 5:return P(t.type);case 16:return P("Lazy");case 13:return P("Suspense");case 19:return P("SuspenseList");case 0:case 2:case 15:return t=Z(t.type,!1),t;case 11:return t=Z(t.type.render,!1),t;case 1:return t=Z(t.type,!0),t;default:return""}}function re(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case B:return"Fragment";case j:return"Portal";case K:return"Profiler";case I:return"StrictMode";case ce:return"Suspense";case ue:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case be:return(t.displayName||"Context")+".Consumer";case ae:return(t._context.displayName||"Context")+".Provider";case le:var r=t.render;return t=t.displayName,t||(t=r.displayName||r.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Se:return r=t.displayName||null,r!==null?r:re(t.type)||"Memo";case q:r=t._payload,t=t._init;try{return re(t(r))}catch{}}return null}function de(t){var r=t.type;switch(t.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=r.render,t=t.displayName||t.name||"",r.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return re(r);case 8:return r===I?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function Y(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function se(t){var r=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Oe(t){var r=se(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,r),c=""+t[r];if(!t.hasOwnProperty(r)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var p=a.get,g=a.set;return Object.defineProperty(t,r,{configurable:!0,get:function(){return p.call(this)},set:function(w){c=""+w,g.call(this,w)}}),Object.defineProperty(t,r,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(w){c=""+w},stopTracking:function(){t._valueTracker=null,delete t[r]}}}}function Ue(t){t._valueTracker||(t._valueTracker=Oe(t))}function je(t){if(!t)return!1;var r=t._valueTracker;if(!r)return!0;var a=r.getValue(),c="";return t&&(c=se(t)?t.checked?"true":"false":t.value),t=c,t!==a?(r.setValue(t),!0):!1}function We(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function xt(t,r){var a=r.checked;return M({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??t._wrapperState.initialChecked})}function ht(t,r){var a=r.defaultValue==null?"":r.defaultValue,c=r.checked!=null?r.checked:r.defaultChecked;a=Y(r.value!=null?r.value:a),t._wrapperState={initialChecked:c,initialValue:a,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}function Qn(t,r){r=r.checked,r!=null&&O(t,"checked",r,!1)}function Rn(t,r){Qn(t,r);var a=Y(r.value),c=r.type;if(a!=null)c==="number"?(a===0&&t.value===""||t.value!=a)&&(t.value=""+a):t.value!==""+a&&(t.value=""+a);else if(c==="submit"||c==="reset"){t.removeAttribute("value");return}r.hasOwnProperty("value")?Lo(t,r.type,a):r.hasOwnProperty("defaultValue")&&Lo(t,r.type,Y(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(t.defaultChecked=!!r.defaultChecked)}function Zr(t,r,a){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var c=r.type;if(!(c!=="submit"&&c!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+t._wrapperState.initialValue,a||r===t.value||(t.value=r),t.defaultValue=r}a=t.name,a!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,a!==""&&(t.name=a)}function Lo(t,r,a){(r!=="number"||We(t.ownerDocument)!==t)&&(a==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+a&&(t.defaultValue=""+a))}var ft=Array.isArray;function In(t,r,a,c){if(t=t.options,r){r={};for(var p=0;p<a.length;p++)r["$"+a[p]]=!0;for(a=0;a<t.length;a++)p=r.hasOwnProperty("$"+t[a].value),t[a].selected!==p&&(t[a].selected=p),p&&c&&(t[a].defaultSelected=!0)}else{for(a=""+Y(a),r=null,p=0;p<t.length;p++){if(t[p].value===a){t[p].selected=!0,c&&(t[p].defaultSelected=!0);return}r!==null||t[p].disabled||(r=t[p])}r!==null&&(r.selected=!0)}}function Fo(t,r){if(r.dangerouslySetInnerHTML!=null)throw Error(o(91));return M({},r,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function qr(t,r){var a=r.value;if(a==null){if(a=r.children,r=r.defaultValue,a!=null){if(r!=null)throw Error(o(92));if(ft(a)){if(1<a.length)throw Error(o(93));a=a[0]}r=a}r==null&&(r=""),a=r}t._wrapperState={initialValue:Y(a)}}function zo(t,r){var a=Y(r.value),c=Y(r.defaultValue);a!=null&&(a=""+a,a!==t.value&&(t.value=a),r.defaultValue==null&&t.defaultValue!==a&&(t.defaultValue=a)),c!=null&&(t.defaultValue=""+c)}function Tn(t){var r=t.textContent;r===t._wrapperState.initialValue&&r!==""&&r!==null&&(t.value=r)}function Ei(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Dn(t,r){return t==null||t==="http://www.w3.org/1999/xhtml"?Ei(r):t==="http://www.w3.org/2000/svg"&&r==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Yr,_i=(function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(r,a,c,p){MSApp.execUnsafeLocalFunction(function(){return t(r,a,c,p)})}:t})(function(t,r){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=r;else{for(Yr=Yr||document.createElement("div"),Yr.innerHTML="<svg>"+r.valueOf().toString()+"</svg>",r=Yr.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;r.firstChild;)t.appendChild(r.firstChild)}});function gn(t,r){if(r){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=r;return}}t.textContent=r}var an={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Qr=["Webkit","ms","Moz","O"];Object.keys(an).forEach(function(t){Qr.forEach(function(r){r=r+t.charAt(0).toUpperCase()+t.substring(1),an[r]=an[t]})});function _s(t,r,a){return r==null||typeof r=="boolean"||r===""?"":a||typeof r!="number"||r===0||an.hasOwnProperty(t)&&an[t]?(""+r).trim():r+"px"}function Sr(t,r){t=t.style;for(var a in r)if(r.hasOwnProperty(a)){var c=a.indexOf("--")===0,p=_s(a,r[a],c);a==="float"&&(a="cssFloat"),c?t.setProperty(a,p):t[a]=p}}var Vt=M({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Xr(t,r){if(r){if(Vt[t]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(o(137,t));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(o(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(o(61))}if(r.style!=null&&typeof r.style!="object")throw Error(o(62))}}function Vo(t,r){if(t.indexOf("-")===-1)return typeof r.is=="string";switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Uo=null;function Pi(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ri=null,Jr=null,Cr=null;function Ii(t){if(t=Qi(t)){if(typeof Ri!="function")throw Error(o(280));var r=t.stateNode;r&&(r=Ql(r),Ri(t.stateNode,t.type,r))}}function Tl(t){Jr?Cr?Cr.push(t):Cr=[t]:Jr=t}function Ti(){if(Jr){var t=Jr,r=Cr;if(Cr=Jr=null,Ii(t),r)for(t=0;t<r.length;t++)Ii(r[t])}}function Di(t,r){return t(r)}function G(){}var Ee=!1;function Le(t,r,a){if(Ee)return t(r,a);Ee=!0;try{return Di(t,r,a)}finally{Ee=!1,(Jr!==null||Cr!==null)&&(G(),Ti())}}function Be(t,r){var a=t.stateNode;if(a===null)return null;var c=Ql(a);if(c===null)return null;a=c[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(t=t.type,c=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!c;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(o(231,r,typeof a));return a}var Ke=!1;if(d)try{var ln={};Object.defineProperty(ln,"passive",{get:function(){Ke=!0}}),window.addEventListener("test",ln,ln),window.removeEventListener("test",ln,ln)}catch{Ke=!1}function Ut(t,r,a,c,p,g,w,_,A){var V=Array.prototype.slice.call(arguments,3);try{r.apply(a,V)}catch(J){this.onError(J)}}var Xe=!1,Xn=null,cn=!1,Ni=null,QI={onError:function(t){Xe=!0,Xn=t}};function XI(t,r,a,c,p,g,w,_,A){Xe=!1,Xn=null,Ut.apply(QI,arguments)}function JI(t,r,a,c,p,g,w,_,A){if(XI.apply(this,arguments),Xe){if(Xe){var V=Xn;Xe=!1,Xn=null}else throw Error(o(198));cn||(cn=!0,Ni=V)}}function Bo(t){var r=t,a=t;if(t.alternate)for(;r.return;)r=r.return;else{t=r;do r=t,(r.flags&4098)!==0&&(a=r.return),t=r.return;while(t)}return r.tag===3?a:null}function my(t){if(t.tag===13){var r=t.memoizedState;if(r===null&&(t=t.alternate,t!==null&&(r=t.memoizedState)),r!==null)return r.dehydrated}return null}function gy(t){if(Bo(t)!==t)throw Error(o(188))}function eT(t){var r=t.alternate;if(!r){if(r=Bo(t),r===null)throw Error(o(188));return r!==t?null:t}for(var a=t,c=r;;){var p=a.return;if(p===null)break;var g=p.alternate;if(g===null){if(c=p.return,c!==null){a=c;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===a)return gy(p),t;if(g===c)return gy(p),r;g=g.sibling}throw Error(o(188))}if(a.return!==c.return)a=p,c=g;else{for(var w=!1,_=p.child;_;){if(_===a){w=!0,a=p,c=g;break}if(_===c){w=!0,c=p,a=g;break}_=_.sibling}if(!w){for(_=g.child;_;){if(_===a){w=!0,a=g,c=p;break}if(_===c){w=!0,c=g,a=p;break}_=_.sibling}if(!w)throw Error(o(189))}}if(a.alternate!==c)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?t:r}function vy(t){return t=eT(t),t!==null?yy(t):null}function yy(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var r=yy(t);if(r!==null)return r;t=t.sibling}return null}var xy=e.unstable_scheduleCallback,wy=e.unstable_cancelCallback,tT=e.unstable_shouldYield,nT=e.unstable_requestPaint,mt=e.unstable_now,rT=e.unstable_getCurrentPriorityLevel,zd=e.unstable_ImmediatePriority,by=e.unstable_UserBlockingPriority,Dl=e.unstable_NormalPriority,oT=e.unstable_LowPriority,Sy=e.unstable_IdlePriority,Nl=null,Jn=null;function sT(t){if(Jn&&typeof Jn.onCommitFiberRoot=="function")try{Jn.onCommitFiberRoot(Nl,t,void 0,(t.current.flags&128)===128)}catch{}}var Nn=Math.clz32?Math.clz32:lT,iT=Math.log,aT=Math.LN2;function lT(t){return t>>>=0,t===0?32:31-(iT(t)/aT|0)|0}var Ol=64,Al=4194304;function Oi(t){switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function $l(t,r){var a=t.pendingLanes;if(a===0)return 0;var c=0,p=t.suspendedLanes,g=t.pingedLanes,w=a&268435455;if(w!==0){var _=w&~p;_!==0?c=Oi(_):(g&=w,g!==0&&(c=Oi(g)))}else w=a&~p,w!==0?c=Oi(w):g!==0&&(c=Oi(g));if(c===0)return 0;if(r!==0&&r!==c&&(r&p)===0&&(p=c&-c,g=r&-r,p>=g||p===16&&(g&4194240)!==0))return r;if((c&4)!==0&&(c|=a&16),r=t.entangledLanes,r!==0)for(t=t.entanglements,r&=c;0<r;)a=31-Nn(r),p=1<<a,c|=t[a],r&=~p;return c}function cT(t,r){switch(t){case 1:case 2:case 4:return r+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function uT(t,r){for(var a=t.suspendedLanes,c=t.pingedLanes,p=t.expirationTimes,g=t.pendingLanes;0<g;){var w=31-Nn(g),_=1<<w,A=p[w];A===-1?((_&a)===0||(_&c)!==0)&&(p[w]=cT(_,r)):A<=r&&(t.expiredLanes|=_),g&=~_}}function Vd(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function Cy(){var t=Ol;return Ol<<=1,(Ol&4194240)===0&&(Ol=64),t}function Ud(t){for(var r=[],a=0;31>a;a++)r.push(t);return r}function Ai(t,r,a){t.pendingLanes|=r,r!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,r=31-Nn(r),t[r]=a}function dT(t,r){var a=t.pendingLanes&~r;t.pendingLanes=r,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=r,t.mutableReadLanes&=r,t.entangledLanes&=r,r=t.entanglements;var c=t.eventTimes;for(t=t.expirationTimes;0<a;){var p=31-Nn(a),g=1<<p;r[p]=0,c[p]=-1,t[p]=-1,a&=~g}}function Bd(t,r){var a=t.entangledLanes|=r;for(t=t.entanglements;a;){var c=31-Nn(a),p=1<<c;p&r|t[c]&r&&(t[c]|=r),a&=~p}}var et=0;function ky(t){return t&=-t,1<t?4<t?(t&268435455)!==0?16:536870912:4:1}var Ey,Hd,_y,Py,Ry,Wd=!1,Ml=[],eo=null,to=null,no=null,$i=new Map,Mi=new Map,ro=[],fT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Iy(t,r){switch(t){case"focusin":case"focusout":eo=null;break;case"dragenter":case"dragleave":to=null;break;case"mouseover":case"mouseout":no=null;break;case"pointerover":case"pointerout":$i.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Mi.delete(r.pointerId)}}function ji(t,r,a,c,p,g){return t===null||t.nativeEvent!==g?(t={blockedOn:r,domEventName:a,eventSystemFlags:c,nativeEvent:g,targetContainers:[p]},r!==null&&(r=Qi(r),r!==null&&Hd(r)),t):(t.eventSystemFlags|=c,r=t.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),t)}function pT(t,r,a,c,p){switch(r){case"focusin":return eo=ji(eo,t,r,a,c,p),!0;case"dragenter":return to=ji(to,t,r,a,c,p),!0;case"mouseover":return no=ji(no,t,r,a,c,p),!0;case"pointerover":var g=p.pointerId;return $i.set(g,ji($i.get(g)||null,t,r,a,c,p)),!0;case"gotpointercapture":return g=p.pointerId,Mi.set(g,ji(Mi.get(g)||null,t,r,a,c,p)),!0}return!1}function Ty(t){var r=Ho(t.target);if(r!==null){var a=Bo(r);if(a!==null){if(r=a.tag,r===13){if(r=my(a),r!==null){t.blockedOn=r,Ry(t.priority,function(){_y(a)});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function jl(t){if(t.blockedOn!==null)return!1;for(var r=t.targetContainers;0<r.length;){var a=Gd(t.domEventName,t.eventSystemFlags,r[0],t.nativeEvent);if(a===null){a=t.nativeEvent;var c=new a.constructor(a.type,a);Uo=c,a.target.dispatchEvent(c),Uo=null}else return r=Qi(a),r!==null&&Hd(r),t.blockedOn=a,!1;r.shift()}return!0}function Dy(t,r,a){jl(t)&&a.delete(r)}function hT(){Wd=!1,eo!==null&&jl(eo)&&(eo=null),to!==null&&jl(to)&&(to=null),no!==null&&jl(no)&&(no=null),$i.forEach(Dy),Mi.forEach(Dy)}function Li(t,r){t.blockedOn===r&&(t.blockedOn=null,Wd||(Wd=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,hT)))}function Fi(t){function r(p){return Li(p,t)}if(0<Ml.length){Li(Ml[0],t);for(var a=1;a<Ml.length;a++){var c=Ml[a];c.blockedOn===t&&(c.blockedOn=null)}}for(eo!==null&&Li(eo,t),to!==null&&Li(to,t),no!==null&&Li(no,t),$i.forEach(r),Mi.forEach(r),a=0;a<ro.length;a++)c=ro[a],c.blockedOn===t&&(c.blockedOn=null);for(;0<ro.length&&(a=ro[0],a.blockedOn===null);)Ty(a),a.blockedOn===null&&ro.shift()}var Ps=R.ReactCurrentBatchConfig,Ll=!0;function mT(t,r,a,c){var p=et,g=Ps.transition;Ps.transition=null;try{et=1,Kd(t,r,a,c)}finally{et=p,Ps.transition=g}}function gT(t,r,a,c){var p=et,g=Ps.transition;Ps.transition=null;try{et=4,Kd(t,r,a,c)}finally{et=p,Ps.transition=g}}function Kd(t,r,a,c){if(Ll){var p=Gd(t,r,a,c);if(p===null)df(t,r,c,Fl,a),Iy(t,c);else if(pT(p,t,r,a,c))c.stopPropagation();else if(Iy(t,c),r&4&&-1<fT.indexOf(t)){for(;p!==null;){var g=Qi(p);if(g!==null&&Ey(g),g=Gd(t,r,a,c),g===null&&df(t,r,c,Fl,a),g===p)break;p=g}p!==null&&c.stopPropagation()}else df(t,r,c,null,a)}}var Fl=null;function Gd(t,r,a,c){if(Fl=null,t=Pi(c),t=Ho(t),t!==null)if(r=Bo(t),r===null)t=null;else if(a=r.tag,a===13){if(t=my(r),t!==null)return t;t=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;t=null}else r!==t&&(t=null);return Fl=t,null}function Ny(t){switch(t){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(rT()){case zd:return 1;case by:return 4;case Dl:case oT:return 16;case Sy:return 536870912;default:return 16}default:return 16}}var oo=null,Zd=null,zl=null;function Oy(){if(zl)return zl;var t,r=Zd,a=r.length,c,p="value"in oo?oo.value:oo.textContent,g=p.length;for(t=0;t<a&&r[t]===p[t];t++);var w=a-t;for(c=1;c<=w&&r[a-c]===p[g-c];c++);return zl=p.slice(t,1<c?1-c:void 0)}function Vl(t){var r=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&r===13&&(t=13)):t=r,t===10&&(t=13),32<=t||t===13?t:0}function Ul(){return!0}function Ay(){return!1}function un(t){function r(a,c,p,g,w){this._reactName=a,this._targetInst=p,this.type=c,this.nativeEvent=g,this.target=w,this.currentTarget=null;for(var _ in t)t.hasOwnProperty(_)&&(a=t[_],this[_]=a?a(g):g[_]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Ul:Ay,this.isPropagationStopped=Ay,this}return M(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ul)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ul)},persist:function(){},isPersistent:Ul}),r}var Rs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qd=un(Rs),zi=M({},Rs,{view:0,detail:0}),vT=un(zi),Yd,Qd,Vi,Bl=M({},zi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Jd,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Vi&&(Vi&&t.type==="mousemove"?(Yd=t.screenX-Vi.screenX,Qd=t.screenY-Vi.screenY):Qd=Yd=0,Vi=t),Yd)},movementY:function(t){return"movementY"in t?t.movementY:Qd}}),$y=un(Bl),yT=M({},Bl,{dataTransfer:0}),xT=un(yT),wT=M({},zi,{relatedTarget:0}),Xd=un(wT),bT=M({},Rs,{animationName:0,elapsedTime:0,pseudoElement:0}),ST=un(bT),CT=M({},Rs,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),kT=un(CT),ET=M({},Rs,{data:0}),My=un(ET),_T={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},PT={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},RT={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function IT(t){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(t):(t=RT[t])?!!r[t]:!1}function Jd(){return IT}var TT=M({},zi,{key:function(t){if(t.key){var r=_T[t.key]||t.key;if(r!=="Unidentified")return r}return t.type==="keypress"?(t=Vl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?PT[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Jd,charCode:function(t){return t.type==="keypress"?Vl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Vl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),DT=un(TT),NT=M({},Bl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jy=un(NT),OT=M({},zi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Jd}),AT=un(OT),$T=M({},Rs,{propertyName:0,elapsedTime:0,pseudoElement:0}),MT=un($T),jT=M({},Bl,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),LT=un(jT),FT=[9,13,27,32],ef=d&&"CompositionEvent"in window,Ui=null;d&&"documentMode"in document&&(Ui=document.documentMode);var zT=d&&"TextEvent"in window&&!Ui,Ly=d&&(!ef||Ui&&8<Ui&&11>=Ui),Fy=" ",zy=!1;function Vy(t,r){switch(t){case"keyup":return FT.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uy(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Is=!1;function VT(t,r){switch(t){case"compositionend":return Uy(r);case"keypress":return r.which!==32?null:(zy=!0,Fy);case"textInput":return t=r.data,t===Fy&&zy?null:t;default:return null}}function UT(t,r){if(Is)return t==="compositionend"||!ef&&Vy(t,r)?(t=Oy(),zl=Zd=oo=null,Is=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Ly&&r.locale!=="ko"?null:r.data;default:return null}}var BT={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function By(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r==="input"?!!BT[t.type]:r==="textarea"}function Hy(t,r,a,c){Tl(c),r=Zl(r,"onChange"),0<r.length&&(a=new qd("onChange","change",null,a,c),t.push({event:a,listeners:r}))}var Bi=null,Hi=null;function HT(t){lx(t,0)}function Hl(t){var r=As(t);if(je(r))return t}function WT(t,r){if(t==="change")return r}var Wy=!1;if(d){var tf;if(d){var nf="oninput"in document;if(!nf){var Ky=document.createElement("div");Ky.setAttribute("oninput","return;"),nf=typeof Ky.oninput=="function"}tf=nf}else tf=!1;Wy=tf&&(!document.documentMode||9<document.documentMode)}function Gy(){Bi&&(Bi.detachEvent("onpropertychange",Zy),Hi=Bi=null)}function Zy(t){if(t.propertyName==="value"&&Hl(Hi)){var r=[];Hy(r,Hi,t,Pi(t)),Le(HT,r)}}function KT(t,r,a){t==="focusin"?(Gy(),Bi=r,Hi=a,Bi.attachEvent("onpropertychange",Zy)):t==="focusout"&&Gy()}function GT(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Hl(Hi)}function ZT(t,r){if(t==="click")return Hl(r)}function qT(t,r){if(t==="input"||t==="change")return Hl(r)}function YT(t,r){return t===r&&(t!==0||1/t===1/r)||t!==t&&r!==r}var On=typeof Object.is=="function"?Object.is:YT;function Wi(t,r){if(On(t,r))return!0;if(typeof t!="object"||t===null||typeof r!="object"||r===null)return!1;var a=Object.keys(t),c=Object.keys(r);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var p=a[c];if(!h.call(r,p)||!On(t[p],r[p]))return!1}return!0}function qy(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Yy(t,r){var a=qy(t);t=0;for(var c;a;){if(a.nodeType===3){if(c=t+a.textContent.length,t<=r&&c>=r)return{node:a,offset:r-t};t=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=qy(a)}}function Qy(t,r){return t&&r?t===r?!0:t&&t.nodeType===3?!1:r&&r.nodeType===3?Qy(t,r.parentNode):"contains"in t?t.contains(r):t.compareDocumentPosition?!!(t.compareDocumentPosition(r)&16):!1:!1}function Xy(){for(var t=window,r=We();r instanceof t.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)t=r.contentWindow;else break;r=We(t.document)}return r}function rf(t){var r=t&&t.nodeName&&t.nodeName.toLowerCase();return r&&(r==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||r==="textarea"||t.contentEditable==="true")}function QT(t){var r=Xy(),a=t.focusedElem,c=t.selectionRange;if(r!==a&&a&&a.ownerDocument&&Qy(a.ownerDocument.documentElement,a)){if(c!==null&&rf(a)){if(r=c.start,t=c.end,t===void 0&&(t=r),"selectionStart"in a)a.selectionStart=r,a.selectionEnd=Math.min(t,a.value.length);else if(t=(r=a.ownerDocument||document)&&r.defaultView||window,t.getSelection){t=t.getSelection();var p=a.textContent.length,g=Math.min(c.start,p);c=c.end===void 0?g:Math.min(c.end,p),!t.extend&&g>c&&(p=c,c=g,g=p),p=Yy(a,g);var w=Yy(a,c);p&&w&&(t.rangeCount!==1||t.anchorNode!==p.node||t.anchorOffset!==p.offset||t.focusNode!==w.node||t.focusOffset!==w.offset)&&(r=r.createRange(),r.setStart(p.node,p.offset),t.removeAllRanges(),g>c?(t.addRange(r),t.extend(w.node,w.offset)):(r.setEnd(w.node,w.offset),t.addRange(r)))}}for(r=[],t=a;t=t.parentNode;)t.nodeType===1&&r.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<r.length;a++)t=r[a],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var XT=d&&"documentMode"in document&&11>=document.documentMode,Ts=null,of=null,Ki=null,sf=!1;function Jy(t,r,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;sf||Ts==null||Ts!==We(c)||(c=Ts,"selectionStart"in c&&rf(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Ki&&Wi(Ki,c)||(Ki=c,c=Zl(of,"onSelect"),0<c.length&&(r=new qd("onSelect","select",null,r,a),t.push({event:r,listeners:c}),r.target=Ts)))}function Wl(t,r){var a={};return a[t.toLowerCase()]=r.toLowerCase(),a["Webkit"+t]="webkit"+r,a["Moz"+t]="moz"+r,a}var Ds={animationend:Wl("Animation","AnimationEnd"),animationiteration:Wl("Animation","AnimationIteration"),animationstart:Wl("Animation","AnimationStart"),transitionend:Wl("Transition","TransitionEnd")},af={},ex={};d&&(ex=document.createElement("div").style,"AnimationEvent"in window||(delete Ds.animationend.animation,delete Ds.animationiteration.animation,delete Ds.animationstart.animation),"TransitionEvent"in window||delete Ds.transitionend.transition);function Kl(t){if(af[t])return af[t];if(!Ds[t])return t;var r=Ds[t],a;for(a in r)if(r.hasOwnProperty(a)&&a in ex)return af[t]=r[a];return t}var tx=Kl("animationend"),nx=Kl("animationiteration"),rx=Kl("animationstart"),ox=Kl("transitionend"),sx=new Map,ix="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function so(t,r){sx.set(t,r),l(r,[t])}for(var lf=0;lf<ix.length;lf++){var cf=ix[lf],JT=cf.toLowerCase(),eD=cf[0].toUpperCase()+cf.slice(1);so(JT,"on"+eD)}so(tx,"onAnimationEnd"),so(nx,"onAnimationIteration"),so(rx,"onAnimationStart"),so("dblclick","onDoubleClick"),so("focusin","onFocus"),so("focusout","onBlur"),so(ox,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),tD=new Set("cancel close invalid load scroll toggle".split(" ").concat(Gi));function ax(t,r,a){var c=t.type||"unknown-event";t.currentTarget=a,JI(c,r,void 0,t),t.currentTarget=null}function lx(t,r){r=(r&4)!==0;for(var a=0;a<t.length;a++){var c=t[a],p=c.event;c=c.listeners;e:{var g=void 0;if(r)for(var w=c.length-1;0<=w;w--){var _=c[w],A=_.instance,V=_.currentTarget;if(_=_.listener,A!==g&&p.isPropagationStopped())break e;ax(p,_,V),g=A}else for(w=0;w<c.length;w++){if(_=c[w],A=_.instance,V=_.currentTarget,_=_.listener,A!==g&&p.isPropagationStopped())break e;ax(p,_,V),g=A}}}if(cn)throw t=Ni,cn=!1,Ni=null,t}function st(t,r){var a=r[vf];a===void 0&&(a=r[vf]=new Set);var c=t+"__bubble";a.has(c)||(cx(r,t,2,!1),a.add(c))}function uf(t,r,a){var c=0;r&&(c|=4),cx(a,t,c,r)}var Gl="_reactListening"+Math.random().toString(36).slice(2);function Zi(t){if(!t[Gl]){t[Gl]=!0,s.forEach(function(a){a!=="selectionchange"&&(tD.has(a)||uf(a,!1,t),uf(a,!0,t))});var r=t.nodeType===9?t:t.ownerDocument;r===null||r[Gl]||(r[Gl]=!0,uf("selectionchange",!1,r))}}function cx(t,r,a,c){switch(Ny(r)){case 1:var p=mT;break;case 4:p=gT;break;default:p=Kd}a=p.bind(null,r,a,t),p=void 0,!Ke||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),c?p!==void 0?t.addEventListener(r,a,{capture:!0,passive:p}):t.addEventListener(r,a,!0):p!==void 0?t.addEventListener(r,a,{passive:p}):t.addEventListener(r,a,!1)}function df(t,r,a,c,p){var g=c;if((r&1)===0&&(r&2)===0&&c!==null)e:for(;;){if(c===null)return;var w=c.tag;if(w===3||w===4){var _=c.stateNode.containerInfo;if(_===p||_.nodeType===8&&_.parentNode===p)break;if(w===4)for(w=c.return;w!==null;){var A=w.tag;if((A===3||A===4)&&(A=w.stateNode.containerInfo,A===p||A.nodeType===8&&A.parentNode===p))return;w=w.return}for(;_!==null;){if(w=Ho(_),w===null)return;if(A=w.tag,A===5||A===6){c=g=w;continue e}_=_.parentNode}}c=c.return}Le(function(){var V=g,J=Pi(a),ee=[];e:{var X=sx.get(t);if(X!==void 0){var he=qd,we=t;switch(t){case"keypress":if(Vl(a)===0)break e;case"keydown":case"keyup":he=DT;break;case"focusin":we="focus",he=Xd;break;case"focusout":we="blur",he=Xd;break;case"beforeblur":case"afterblur":he=Xd;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":he=$y;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":he=xT;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":he=AT;break;case tx:case nx:case rx:he=ST;break;case ox:he=MT;break;case"scroll":he=vT;break;case"wheel":he=LT;break;case"copy":case"cut":case"paste":he=kT;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":he=jy}var Ce=(r&4)!==0,gt=!Ce&&t==="scroll",F=Ce?X!==null?X+"Capture":null:X;Ce=[];for(var $=V,z;$!==null;){z=$;var ie=z.stateNode;if(z.tag===5&&ie!==null&&(z=ie,F!==null&&(ie=Be($,F),ie!=null&&Ce.push(qi($,ie,z)))),gt)break;$=$.return}0<Ce.length&&(X=new he(X,we,null,a,J),ee.push({event:X,listeners:Ce}))}}if((r&7)===0){e:{if(X=t==="mouseover"||t==="pointerover",he=t==="mouseout"||t==="pointerout",X&&a!==Uo&&(we=a.relatedTarget||a.fromElement)&&(Ho(we)||we[kr]))break e;if((he||X)&&(X=J.window===J?J:(X=J.ownerDocument)?X.defaultView||X.parentWindow:window,he?(we=a.relatedTarget||a.toElement,he=V,we=we?Ho(we):null,we!==null&&(gt=Bo(we),we!==gt||we.tag!==5&&we.tag!==6)&&(we=null)):(he=null,we=V),he!==we)){if(Ce=$y,ie="onMouseLeave",F="onMouseEnter",$="mouse",(t==="pointerout"||t==="pointerover")&&(Ce=jy,ie="onPointerLeave",F="onPointerEnter",$="pointer"),gt=he==null?X:As(he),z=we==null?X:As(we),X=new Ce(ie,$+"leave",he,a,J),X.target=gt,X.relatedTarget=z,ie=null,Ho(J)===V&&(Ce=new Ce(F,$+"enter",we,a,J),Ce.target=z,Ce.relatedTarget=gt,ie=Ce),gt=ie,he&&we)t:{for(Ce=he,F=we,$=0,z=Ce;z;z=Ns(z))$++;for(z=0,ie=F;ie;ie=Ns(ie))z++;for(;0<$-z;)Ce=Ns(Ce),$--;for(;0<z-$;)F=Ns(F),z--;for(;$--;){if(Ce===F||F!==null&&Ce===F.alternate)break t;Ce=Ns(Ce),F=Ns(F)}Ce=null}else Ce=null;he!==null&&ux(ee,X,he,Ce,!1),we!==null&>!==null&&ux(ee,gt,we,Ce,!0)}}e:{if(X=V?As(V):window,he=X.nodeName&&X.nodeName.toLowerCase(),he==="select"||he==="input"&&X.type==="file")var _e=WT;else if(By(X))if(Wy)_e=qT;else{_e=GT;var Pe=KT}else(he=X.nodeName)&&he.toLowerCase()==="input"&&(X.type==="checkbox"||X.type==="radio")&&(_e=ZT);if(_e&&(_e=_e(t,V))){Hy(ee,_e,a,J);break e}Pe&&Pe(t,X,V),t==="focusout"&&(Pe=X._wrapperState)&&Pe.controlled&&X.type==="number"&&Lo(X,"number",X.value)}switch(Pe=V?As(V):window,t){case"focusin":(By(Pe)||Pe.contentEditable==="true")&&(Ts=Pe,of=V,Ki=null);break;case"focusout":Ki=of=Ts=null;break;case"mousedown":sf=!0;break;case"contextmenu":case"mouseup":case"dragend":sf=!1,Jy(ee,a,J);break;case"selectionchange":if(XT)break;case"keydown":case"keyup":Jy(ee,a,J)}var Re;if(ef)e:{switch(t){case"compositionstart":var De="onCompositionStart";break e;case"compositionend":De="onCompositionEnd";break e;case"compositionupdate":De="onCompositionUpdate";break e}De=void 0}else Is?Vy(t,a)&&(De="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(De="onCompositionStart");De&&(Ly&&a.locale!=="ko"&&(Is||De!=="onCompositionStart"?De==="onCompositionEnd"&&Is&&(Re=Oy()):(oo=J,Zd="value"in oo?oo.value:oo.textContent,Is=!0)),Pe=Zl(V,De),0<Pe.length&&(De=new My(De,t,null,a,J),ee.push({event:De,listeners:Pe}),Re?De.data=Re:(Re=Uy(a),Re!==null&&(De.data=Re)))),(Re=zT?VT(t,a):UT(t,a))&&(V=Zl(V,"onBeforeInput"),0<V.length&&(J=new My("onBeforeInput","beforeinput",null,a,J),ee.push({event:J,listeners:V}),J.data=Re))}lx(ee,r)})}function qi(t,r,a){return{instance:t,listener:r,currentTarget:a}}function Zl(t,r){for(var a=r+"Capture",c=[];t!==null;){var p=t,g=p.stateNode;p.tag===5&&g!==null&&(p=g,g=Be(t,a),g!=null&&c.unshift(qi(t,g,p)),g=Be(t,r),g!=null&&c.push(qi(t,g,p))),t=t.return}return c}function Ns(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function ux(t,r,a,c,p){for(var g=r._reactName,w=[];a!==null&&a!==c;){var _=a,A=_.alternate,V=_.stateNode;if(A!==null&&A===c)break;_.tag===5&&V!==null&&(_=V,p?(A=Be(a,g),A!=null&&w.unshift(qi(a,A,_))):p||(A=Be(a,g),A!=null&&w.push(qi(a,A,_)))),a=a.return}w.length!==0&&t.push({event:r,listeners:w})}var nD=/\r\n?/g,rD=/\u0000|\uFFFD/g;function dx(t){return(typeof t=="string"?t:""+t).replace(nD,`
|
|
6
|
+
`).replace(rD,"")}function ql(t,r,a){if(r=dx(r),dx(t)!==r&&a)throw Error(o(425))}function Yl(){}var ff=null,pf=null;function hf(t,r){return t==="textarea"||t==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var mf=typeof setTimeout=="function"?setTimeout:void 0,oD=typeof clearTimeout=="function"?clearTimeout:void 0,fx=typeof Promise=="function"?Promise:void 0,sD=typeof queueMicrotask=="function"?queueMicrotask:typeof fx<"u"?function(t){return fx.resolve(null).then(t).catch(iD)}:mf;function iD(t){setTimeout(function(){throw t})}function gf(t,r){var a=r,c=0;do{var p=a.nextSibling;if(t.removeChild(a),p&&p.nodeType===8)if(a=p.data,a==="/$"){if(c===0){t.removeChild(p),Fi(r);return}c--}else a!=="$"&&a!=="$?"&&a!=="$!"||c++;a=p}while(a);Fi(r)}function io(t){for(;t!=null;t=t.nextSibling){var r=t.nodeType;if(r===1||r===3)break;if(r===8){if(r=t.data,r==="$"||r==="$!"||r==="$?")break;if(r==="/$")return null}}return t}function px(t){t=t.previousSibling;for(var r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"){if(r===0)return t;r--}else a==="/$"&&r++}t=t.previousSibling}return null}var Os=Math.random().toString(36).slice(2),er="__reactFiber$"+Os,Yi="__reactProps$"+Os,kr="__reactContainer$"+Os,vf="__reactEvents$"+Os,aD="__reactListeners$"+Os,lD="__reactHandles$"+Os;function Ho(t){var r=t[er];if(r)return r;for(var a=t.parentNode;a;){if(r=a[kr]||a[er]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(t=px(t);t!==null;){if(a=t[er])return a;t=px(t)}return r}t=a,a=t.parentNode}return null}function Qi(t){return t=t[er]||t[kr],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function As(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(o(33))}function Ql(t){return t[Yi]||null}var yf=[],$s=-1;function ao(t){return{current:t}}function it(t){0>$s||(t.current=yf[$s],yf[$s]=null,$s--)}function rt(t,r){$s++,yf[$s]=t.current,t.current=r}var lo={},At=ao(lo),qt=ao(!1),Wo=lo;function Ms(t,r){var a=t.type.contextTypes;if(!a)return lo;var c=t.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===r)return c.__reactInternalMemoizedMaskedChildContext;var p={},g;for(g in a)p[g]=r[g];return c&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=r,t.__reactInternalMemoizedMaskedChildContext=p),p}function Yt(t){return t=t.childContextTypes,t!=null}function Xl(){it(qt),it(At)}function hx(t,r,a){if(At.current!==lo)throw Error(o(168));rt(At,r),rt(qt,a)}function mx(t,r,a){var c=t.stateNode;if(r=r.childContextTypes,typeof c.getChildContext!="function")return a;c=c.getChildContext();for(var p in c)if(!(p in r))throw Error(o(108,de(t)||"Unknown",p));return M({},a,c)}function Jl(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||lo,Wo=At.current,rt(At,t),rt(qt,qt.current),!0}function gx(t,r,a){var c=t.stateNode;if(!c)throw Error(o(169));a?(t=mx(t,r,Wo),c.__reactInternalMemoizedMergedChildContext=t,it(qt),it(At),rt(At,t)):it(qt),rt(qt,a)}var Er=null,ec=!1,xf=!1;function vx(t){Er===null?Er=[t]:Er.push(t)}function cD(t){ec=!0,vx(t)}function co(){if(!xf&&Er!==null){xf=!0;var t=0,r=et;try{var a=Er;for(et=1;t<a.length;t++){var c=a[t];do c=c(!0);while(c!==null)}Er=null,ec=!1}catch(p){throw Er!==null&&(Er=Er.slice(t+1)),xy(zd,co),p}finally{et=r,xf=!1}}return null}var js=[],Ls=0,tc=null,nc=0,vn=[],yn=0,Ko=null,_r=1,Pr="";function Go(t,r){js[Ls++]=nc,js[Ls++]=tc,tc=t,nc=r}function yx(t,r,a){vn[yn++]=_r,vn[yn++]=Pr,vn[yn++]=Ko,Ko=t;var c=_r;t=Pr;var p=32-Nn(c)-1;c&=~(1<<p),a+=1;var g=32-Nn(r)+p;if(30<g){var w=p-p%5;g=(c&(1<<w)-1).toString(32),c>>=w,p-=w,_r=1<<32-Nn(r)+p|a<<p|c,Pr=g+t}else _r=1<<g|a<<p|c,Pr=t}function wf(t){t.return!==null&&(Go(t,1),yx(t,1,0))}function bf(t){for(;t===tc;)tc=js[--Ls],js[Ls]=null,nc=js[--Ls],js[Ls]=null;for(;t===Ko;)Ko=vn[--yn],vn[yn]=null,Pr=vn[--yn],vn[yn]=null,_r=vn[--yn],vn[yn]=null}var dn=null,fn=null,at=!1,An=null;function xx(t,r){var a=Sn(5,null,null,0);a.elementType="DELETED",a.stateNode=r,a.return=t,r=t.deletions,r===null?(t.deletions=[a],t.flags|=16):r.push(a)}function wx(t,r){switch(t.tag){case 5:var a=t.type;return r=r.nodeType!==1||a.toLowerCase()!==r.nodeName.toLowerCase()?null:r,r!==null?(t.stateNode=r,dn=t,fn=io(r.firstChild),!0):!1;case 6:return r=t.pendingProps===""||r.nodeType!==3?null:r,r!==null?(t.stateNode=r,dn=t,fn=null,!0):!1;case 13:return r=r.nodeType!==8?null:r,r!==null?(a=Ko!==null?{id:_r,overflow:Pr}:null,t.memoizedState={dehydrated:r,treeContext:a,retryLane:1073741824},a=Sn(18,null,null,0),a.stateNode=r,a.return=t,t.child=a,dn=t,fn=null,!0):!1;default:return!1}}function Sf(t){return(t.mode&1)!==0&&(t.flags&128)===0}function Cf(t){if(at){var r=fn;if(r){var a=r;if(!wx(t,r)){if(Sf(t))throw Error(o(418));r=io(a.nextSibling);var c=dn;r&&wx(t,r)?xx(c,a):(t.flags=t.flags&-4097|2,at=!1,dn=t)}}else{if(Sf(t))throw Error(o(418));t.flags=t.flags&-4097|2,at=!1,dn=t}}}function bx(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;dn=t}function rc(t){if(t!==dn)return!1;if(!at)return bx(t),at=!0,!1;var r;if((r=t.tag!==3)&&!(r=t.tag!==5)&&(r=t.type,r=r!=="head"&&r!=="body"&&!hf(t.type,t.memoizedProps)),r&&(r=fn)){if(Sf(t))throw Sx(),Error(o(418));for(;r;)xx(t,r),r=io(r.nextSibling)}if(bx(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));e:{for(t=t.nextSibling,r=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"){if(r===0){fn=io(t.nextSibling);break e}r--}else a!=="$"&&a!=="$!"&&a!=="$?"||r++}t=t.nextSibling}fn=null}}else fn=dn?io(t.stateNode.nextSibling):null;return!0}function Sx(){for(var t=fn;t;)t=io(t.nextSibling)}function Fs(){fn=dn=null,at=!1}function kf(t){An===null?An=[t]:An.push(t)}var uD=R.ReactCurrentBatchConfig;function Xi(t,r,a){if(t=a.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(o(309));var c=a.stateNode}if(!c)throw Error(o(147,t));var p=c,g=""+t;return r!==null&&r.ref!==null&&typeof r.ref=="function"&&r.ref._stringRef===g?r.ref:(r=function(w){var _=p.refs;w===null?delete _[g]:_[g]=w},r._stringRef=g,r)}if(typeof t!="string")throw Error(o(284));if(!a._owner)throw Error(o(290,t))}return t}function oc(t,r){throw t=Object.prototype.toString.call(r),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t))}function Cx(t){var r=t._init;return r(t._payload)}function kx(t){function r(F,$){if(t){var z=F.deletions;z===null?(F.deletions=[$],F.flags|=16):z.push($)}}function a(F,$){if(!t)return null;for(;$!==null;)r(F,$),$=$.sibling;return null}function c(F,$){for(F=new Map;$!==null;)$.key!==null?F.set($.key,$):F.set($.index,$),$=$.sibling;return F}function p(F,$){return F=yo(F,$),F.index=0,F.sibling=null,F}function g(F,$,z){return F.index=z,t?(z=F.alternate,z!==null?(z=z.index,z<$?(F.flags|=2,$):z):(F.flags|=2,$)):(F.flags|=1048576,$)}function w(F){return t&&F.alternate===null&&(F.flags|=2),F}function _(F,$,z,ie){return $===null||$.tag!==6?($=mp(z,F.mode,ie),$.return=F,$):($=p($,z),$.return=F,$)}function A(F,$,z,ie){var _e=z.type;return _e===B?J(F,$,z.props.children,ie,z.key):$!==null&&($.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===q&&Cx(_e)===$.type)?(ie=p($,z.props),ie.ref=Xi(F,$,z),ie.return=F,ie):(ie=Rc(z.type,z.key,z.props,null,F.mode,ie),ie.ref=Xi(F,$,z),ie.return=F,ie)}function V(F,$,z,ie){return $===null||$.tag!==4||$.stateNode.containerInfo!==z.containerInfo||$.stateNode.implementation!==z.implementation?($=gp(z,F.mode,ie),$.return=F,$):($=p($,z.children||[]),$.return=F,$)}function J(F,$,z,ie,_e){return $===null||$.tag!==7?($=ts(z,F.mode,ie,_e),$.return=F,$):($=p($,z),$.return=F,$)}function ee(F,$,z){if(typeof $=="string"&&$!==""||typeof $=="number")return $=mp(""+$,F.mode,z),$.return=F,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case L:return z=Rc($.type,$.key,$.props,null,F.mode,z),z.ref=Xi(F,null,$),z.return=F,z;case j:return $=gp($,F.mode,z),$.return=F,$;case q:var ie=$._init;return ee(F,ie($._payload),z)}if(ft($)||Q($))return $=ts($,F.mode,z,null),$.return=F,$;oc(F,$)}return null}function X(F,$,z,ie){var _e=$!==null?$.key:null;if(typeof z=="string"&&z!==""||typeof z=="number")return _e!==null?null:_(F,$,""+z,ie);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case L:return z.key===_e?A(F,$,z,ie):null;case j:return z.key===_e?V(F,$,z,ie):null;case q:return _e=z._init,X(F,$,_e(z._payload),ie)}if(ft(z)||Q(z))return _e!==null?null:J(F,$,z,ie,null);oc(F,z)}return null}function he(F,$,z,ie,_e){if(typeof ie=="string"&&ie!==""||typeof ie=="number")return F=F.get(z)||null,_($,F,""+ie,_e);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case L:return F=F.get(ie.key===null?z:ie.key)||null,A($,F,ie,_e);case j:return F=F.get(ie.key===null?z:ie.key)||null,V($,F,ie,_e);case q:var Pe=ie._init;return he(F,$,z,Pe(ie._payload),_e)}if(ft(ie)||Q(ie))return F=F.get(z)||null,J($,F,ie,_e,null);oc($,ie)}return null}function we(F,$,z,ie){for(var _e=null,Pe=null,Re=$,De=$=0,It=null;Re!==null&&De<z.length;De++){Re.index>De?(It=Re,Re=null):It=Re.sibling;var Qe=X(F,Re,z[De],ie);if(Qe===null){Re===null&&(Re=It);break}t&&Re&&Qe.alternate===null&&r(F,Re),$=g(Qe,$,De),Pe===null?_e=Qe:Pe.sibling=Qe,Pe=Qe,Re=It}if(De===z.length)return a(F,Re),at&&Go(F,De),_e;if(Re===null){for(;De<z.length;De++)Re=ee(F,z[De],ie),Re!==null&&($=g(Re,$,De),Pe===null?_e=Re:Pe.sibling=Re,Pe=Re);return at&&Go(F,De),_e}for(Re=c(F,Re);De<z.length;De++)It=he(Re,F,De,z[De],ie),It!==null&&(t&&It.alternate!==null&&Re.delete(It.key===null?De:It.key),$=g(It,$,De),Pe===null?_e=It:Pe.sibling=It,Pe=It);return t&&Re.forEach(function(xo){return r(F,xo)}),at&&Go(F,De),_e}function Ce(F,$,z,ie){var _e=Q(z);if(typeof _e!="function")throw Error(o(150));if(z=_e.call(z),z==null)throw Error(o(151));for(var Pe=_e=null,Re=$,De=$=0,It=null,Qe=z.next();Re!==null&&!Qe.done;De++,Qe=z.next()){Re.index>De?(It=Re,Re=null):It=Re.sibling;var xo=X(F,Re,Qe.value,ie);if(xo===null){Re===null&&(Re=It);break}t&&Re&&xo.alternate===null&&r(F,Re),$=g(xo,$,De),Pe===null?_e=xo:Pe.sibling=xo,Pe=xo,Re=It}if(Qe.done)return a(F,Re),at&&Go(F,De),_e;if(Re===null){for(;!Qe.done;De++,Qe=z.next())Qe=ee(F,Qe.value,ie),Qe!==null&&($=g(Qe,$,De),Pe===null?_e=Qe:Pe.sibling=Qe,Pe=Qe);return at&&Go(F,De),_e}for(Re=c(F,Re);!Qe.done;De++,Qe=z.next())Qe=he(Re,F,De,Qe.value,ie),Qe!==null&&(t&&Qe.alternate!==null&&Re.delete(Qe.key===null?De:Qe.key),$=g(Qe,$,De),Pe===null?_e=Qe:Pe.sibling=Qe,Pe=Qe);return t&&Re.forEach(function(BD){return r(F,BD)}),at&&Go(F,De),_e}function gt(F,$,z,ie){if(typeof z=="object"&&z!==null&&z.type===B&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case L:e:{for(var _e=z.key,Pe=$;Pe!==null;){if(Pe.key===_e){if(_e=z.type,_e===B){if(Pe.tag===7){a(F,Pe.sibling),$=p(Pe,z.props.children),$.return=F,F=$;break e}}else if(Pe.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===q&&Cx(_e)===Pe.type){a(F,Pe.sibling),$=p(Pe,z.props),$.ref=Xi(F,Pe,z),$.return=F,F=$;break e}a(F,Pe);break}else r(F,Pe);Pe=Pe.sibling}z.type===B?($=ts(z.props.children,F.mode,ie,z.key),$.return=F,F=$):(ie=Rc(z.type,z.key,z.props,null,F.mode,ie),ie.ref=Xi(F,$,z),ie.return=F,F=ie)}return w(F);case j:e:{for(Pe=z.key;$!==null;){if($.key===Pe)if($.tag===4&&$.stateNode.containerInfo===z.containerInfo&&$.stateNode.implementation===z.implementation){a(F,$.sibling),$=p($,z.children||[]),$.return=F,F=$;break e}else{a(F,$);break}else r(F,$);$=$.sibling}$=gp(z,F.mode,ie),$.return=F,F=$}return w(F);case q:return Pe=z._init,gt(F,$,Pe(z._payload),ie)}if(ft(z))return we(F,$,z,ie);if(Q(z))return Ce(F,$,z,ie);oc(F,z)}return typeof z=="string"&&z!==""||typeof z=="number"?(z=""+z,$!==null&&$.tag===6?(a(F,$.sibling),$=p($,z),$.return=F,F=$):(a(F,$),$=mp(z,F.mode,ie),$.return=F,F=$),w(F)):a(F,$)}return gt}var zs=kx(!0),Ex=kx(!1),sc=ao(null),ic=null,Vs=null,Ef=null;function _f(){Ef=Vs=ic=null}function Pf(t){var r=sc.current;it(sc),t._currentValue=r}function Rf(t,r,a){for(;t!==null;){var c=t.alternate;if((t.childLanes&r)!==r?(t.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),t===a)break;t=t.return}}function Us(t,r){ic=t,Ef=Vs=null,t=t.dependencies,t!==null&&t.firstContext!==null&&((t.lanes&r)!==0&&(Qt=!0),t.firstContext=null)}function xn(t){var r=t._currentValue;if(Ef!==t)if(t={context:t,memoizedValue:r,next:null},Vs===null){if(ic===null)throw Error(o(308));Vs=t,ic.dependencies={lanes:0,firstContext:t}}else Vs=Vs.next=t;return r}var Zo=null;function If(t){Zo===null?Zo=[t]:Zo.push(t)}function _x(t,r,a,c){var p=r.interleaved;return p===null?(a.next=a,If(r)):(a.next=p.next,p.next=a),r.interleaved=a,Rr(t,c)}function Rr(t,r){t.lanes|=r;var a=t.alternate;for(a!==null&&(a.lanes|=r),a=t,t=t.return;t!==null;)t.childLanes|=r,a=t.alternate,a!==null&&(a.childLanes|=r),a=t,t=t.return;return a.tag===3?a.stateNode:null}var uo=!1;function Tf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Px(t,r){t=t.updateQueue,r.updateQueue===t&&(r.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Ir(t,r){return{eventTime:t,lane:r,tag:0,payload:null,callback:null,next:null}}function fo(t,r,a){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(Ye&2)!==0){var p=c.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),c.pending=r,Rr(t,a)}return p=c.interleaved,p===null?(r.next=r,If(c)):(r.next=p.next,p.next=r),c.interleaved=r,Rr(t,a)}function ac(t,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194240)!==0)){var c=r.lanes;c&=t.pendingLanes,a|=c,r.lanes=a,Bd(t,a)}}function Rx(t,r){var a=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var p=null,g=null;if(a=a.firstBaseUpdate,a!==null){do{var w={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};g===null?p=g=w:g=g.next=w,a=a.next}while(a!==null);g===null?p=g=r:g=g.next=r}else p=g=r;a={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:c.shared,effects:c.effects},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=r:t.next=r,a.lastBaseUpdate=r}function lc(t,r,a,c){var p=t.updateQueue;uo=!1;var g=p.firstBaseUpdate,w=p.lastBaseUpdate,_=p.shared.pending;if(_!==null){p.shared.pending=null;var A=_,V=A.next;A.next=null,w===null?g=V:w.next=V,w=A;var J=t.alternate;J!==null&&(J=J.updateQueue,_=J.lastBaseUpdate,_!==w&&(_===null?J.firstBaseUpdate=V:_.next=V,J.lastBaseUpdate=A))}if(g!==null){var ee=p.baseState;w=0,J=V=A=null,_=g;do{var X=_.lane,he=_.eventTime;if((c&X)===X){J!==null&&(J=J.next={eventTime:he,lane:0,tag:_.tag,payload:_.payload,callback:_.callback,next:null});e:{var we=t,Ce=_;switch(X=r,he=a,Ce.tag){case 1:if(we=Ce.payload,typeof we=="function"){ee=we.call(he,ee,X);break e}ee=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=Ce.payload,X=typeof we=="function"?we.call(he,ee,X):we,X==null)break e;ee=M({},ee,X);break e;case 2:uo=!0}}_.callback!==null&&_.lane!==0&&(t.flags|=64,X=p.effects,X===null?p.effects=[_]:X.push(_))}else he={eventTime:he,lane:X,tag:_.tag,payload:_.payload,callback:_.callback,next:null},J===null?(V=J=he,A=ee):J=J.next=he,w|=X;if(_=_.next,_===null){if(_=p.shared.pending,_===null)break;X=_,_=X.next,X.next=null,p.lastBaseUpdate=X,p.shared.pending=null}}while(!0);if(J===null&&(A=ee),p.baseState=A,p.firstBaseUpdate=V,p.lastBaseUpdate=J,r=p.shared.interleaved,r!==null){p=r;do w|=p.lane,p=p.next;while(p!==r)}else g===null&&(p.shared.lanes=0);Qo|=w,t.lanes=w,t.memoizedState=ee}}function Ix(t,r,a){if(t=r.effects,r.effects=null,t!==null)for(r=0;r<t.length;r++){var c=t[r],p=c.callback;if(p!==null){if(c.callback=null,c=a,typeof p!="function")throw Error(o(191,p));p.call(c)}}}var Ji={},tr=ao(Ji),ea=ao(Ji),ta=ao(Ji);function qo(t){if(t===Ji)throw Error(o(174));return t}function Df(t,r){switch(rt(ta,r),rt(ea,t),rt(tr,Ji),t=r.nodeType,t){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:Dn(null,"");break;default:t=t===8?r.parentNode:r,r=t.namespaceURI||null,t=t.tagName,r=Dn(r,t)}it(tr),rt(tr,r)}function Bs(){it(tr),it(ea),it(ta)}function Tx(t){qo(ta.current);var r=qo(tr.current),a=Dn(r,t.type);r!==a&&(rt(ea,t),rt(tr,a))}function Nf(t){ea.current===t&&(it(tr),it(ea))}var ct=ao(0);function cc(t){for(var r=t;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Of=[];function Af(){for(var t=0;t<Of.length;t++)Of[t]._workInProgressVersionPrimary=null;Of.length=0}var uc=R.ReactCurrentDispatcher,$f=R.ReactCurrentBatchConfig,Yo=0,ut=null,Ct=null,Pt=null,dc=!1,na=!1,ra=0,dD=0;function $t(){throw Error(o(321))}function Mf(t,r){if(r===null)return!1;for(var a=0;a<r.length&&a<t.length;a++)if(!On(t[a],r[a]))return!1;return!0}function jf(t,r,a,c,p,g){if(Yo=g,ut=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,uc.current=t===null||t.memoizedState===null?mD:gD,t=a(c,p),na){g=0;do{if(na=!1,ra=0,25<=g)throw Error(o(301));g+=1,Pt=Ct=null,r.updateQueue=null,uc.current=vD,t=a(c,p)}while(na)}if(uc.current=hc,r=Ct!==null&&Ct.next!==null,Yo=0,Pt=Ct=ut=null,dc=!1,r)throw Error(o(300));return t}function Lf(){var t=ra!==0;return ra=0,t}function nr(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pt===null?ut.memoizedState=Pt=t:Pt=Pt.next=t,Pt}function wn(){if(Ct===null){var t=ut.alternate;t=t!==null?t.memoizedState:null}else t=Ct.next;var r=Pt===null?ut.memoizedState:Pt.next;if(r!==null)Pt=r,Ct=t;else{if(t===null)throw Error(o(310));Ct=t,t={memoizedState:Ct.memoizedState,baseState:Ct.baseState,baseQueue:Ct.baseQueue,queue:Ct.queue,next:null},Pt===null?ut.memoizedState=Pt=t:Pt=Pt.next=t}return Pt}function oa(t,r){return typeof r=="function"?r(t):r}function Ff(t){var r=wn(),a=r.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=t;var c=Ct,p=c.baseQueue,g=a.pending;if(g!==null){if(p!==null){var w=p.next;p.next=g.next,g.next=w}c.baseQueue=p=g,a.pending=null}if(p!==null){g=p.next,c=c.baseState;var _=w=null,A=null,V=g;do{var J=V.lane;if((Yo&J)===J)A!==null&&(A=A.next={lane:0,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),c=V.hasEagerState?V.eagerState:t(c,V.action);else{var ee={lane:J,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null};A===null?(_=A=ee,w=c):A=A.next=ee,ut.lanes|=J,Qo|=J}V=V.next}while(V!==null&&V!==g);A===null?w=c:A.next=_,On(c,r.memoizedState)||(Qt=!0),r.memoizedState=c,r.baseState=w,r.baseQueue=A,a.lastRenderedState=c}if(t=a.interleaved,t!==null){p=t;do g=p.lane,ut.lanes|=g,Qo|=g,p=p.next;while(p!==t)}else p===null&&(a.lanes=0);return[r.memoizedState,a.dispatch]}function zf(t){var r=wn(),a=r.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=t;var c=a.dispatch,p=a.pending,g=r.memoizedState;if(p!==null){a.pending=null;var w=p=p.next;do g=t(g,w.action),w=w.next;while(w!==p);On(g,r.memoizedState)||(Qt=!0),r.memoizedState=g,r.baseQueue===null&&(r.baseState=g),a.lastRenderedState=g}return[g,c]}function Dx(){}function Nx(t,r){var a=ut,c=wn(),p=r(),g=!On(c.memoizedState,p);if(g&&(c.memoizedState=p,Qt=!0),c=c.queue,Vf($x.bind(null,a,c,t),[t]),c.getSnapshot!==r||g||Pt!==null&&Pt.memoizedState.tag&1){if(a.flags|=2048,sa(9,Ax.bind(null,a,c,p,r),void 0,null),Rt===null)throw Error(o(349));(Yo&30)!==0||Ox(a,r,p)}return p}function Ox(t,r,a){t.flags|=16384,t={getSnapshot:r,value:a},r=ut.updateQueue,r===null?(r={lastEffect:null,stores:null},ut.updateQueue=r,r.stores=[t]):(a=r.stores,a===null?r.stores=[t]:a.push(t))}function Ax(t,r,a,c){r.value=a,r.getSnapshot=c,Mx(r)&&jx(t)}function $x(t,r,a){return a(function(){Mx(r)&&jx(t)})}function Mx(t){var r=t.getSnapshot;t=t.value;try{var a=r();return!On(t,a)}catch{return!0}}function jx(t){var r=Rr(t,1);r!==null&&Ln(r,t,1,-1)}function Lx(t){var r=nr();return typeof t=="function"&&(t=t()),r.memoizedState=r.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:oa,lastRenderedState:t},r.queue=t,t=t.dispatch=hD.bind(null,ut,t),[r.memoizedState,t]}function sa(t,r,a,c){return t={tag:t,create:r,destroy:a,deps:c,next:null},r=ut.updateQueue,r===null?(r={lastEffect:null,stores:null},ut.updateQueue=r,r.lastEffect=t.next=t):(a=r.lastEffect,a===null?r.lastEffect=t.next=t:(c=a.next,a.next=t,t.next=c,r.lastEffect=t)),t}function Fx(){return wn().memoizedState}function fc(t,r,a,c){var p=nr();ut.flags|=t,p.memoizedState=sa(1|r,a,void 0,c===void 0?null:c)}function pc(t,r,a,c){var p=wn();c=c===void 0?null:c;var g=void 0;if(Ct!==null){var w=Ct.memoizedState;if(g=w.destroy,c!==null&&Mf(c,w.deps)){p.memoizedState=sa(r,a,g,c);return}}ut.flags|=t,p.memoizedState=sa(1|r,a,g,c)}function zx(t,r){return fc(8390656,8,t,r)}function Vf(t,r){return pc(2048,8,t,r)}function Vx(t,r){return pc(4,2,t,r)}function Ux(t,r){return pc(4,4,t,r)}function Bx(t,r){if(typeof r=="function")return t=t(),r(t),function(){r(null)};if(r!=null)return t=t(),r.current=t,function(){r.current=null}}function Hx(t,r,a){return a=a!=null?a.concat([t]):null,pc(4,4,Bx.bind(null,r,t),a)}function Uf(){}function Wx(t,r){var a=wn();r=r===void 0?null:r;var c=a.memoizedState;return c!==null&&r!==null&&Mf(r,c[1])?c[0]:(a.memoizedState=[t,r],t)}function Kx(t,r){var a=wn();r=r===void 0?null:r;var c=a.memoizedState;return c!==null&&r!==null&&Mf(r,c[1])?c[0]:(t=t(),a.memoizedState=[t,r],t)}function Gx(t,r,a){return(Yo&21)===0?(t.baseState&&(t.baseState=!1,Qt=!0),t.memoizedState=a):(On(a,r)||(a=Cy(),ut.lanes|=a,Qo|=a,t.baseState=!0),r)}function fD(t,r){var a=et;et=a!==0&&4>a?a:4,t(!0);var c=$f.transition;$f.transition={};try{t(!1),r()}finally{et=a,$f.transition=c}}function Zx(){return wn().memoizedState}function pD(t,r,a){var c=go(t);if(a={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null},qx(t))Yx(r,a);else if(a=_x(t,r,a,c),a!==null){var p=Ht();Ln(a,t,c,p),Qx(a,r,c)}}function hD(t,r,a){var c=go(t),p={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null};if(qx(t))Yx(r,p);else{var g=t.alternate;if(t.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var w=r.lastRenderedState,_=g(w,a);if(p.hasEagerState=!0,p.eagerState=_,On(_,w)){var A=r.interleaved;A===null?(p.next=p,If(r)):(p.next=A.next,A.next=p),r.interleaved=p;return}}catch{}a=_x(t,r,p,c),a!==null&&(p=Ht(),Ln(a,t,c,p),Qx(a,r,c))}}function qx(t){var r=t.alternate;return t===ut||r!==null&&r===ut}function Yx(t,r){na=dc=!0;var a=t.pending;a===null?r.next=r:(r.next=a.next,a.next=r),t.pending=r}function Qx(t,r,a){if((a&4194240)!==0){var c=r.lanes;c&=t.pendingLanes,a|=c,r.lanes=a,Bd(t,a)}}var hc={readContext:xn,useCallback:$t,useContext:$t,useEffect:$t,useImperativeHandle:$t,useInsertionEffect:$t,useLayoutEffect:$t,useMemo:$t,useReducer:$t,useRef:$t,useState:$t,useDebugValue:$t,useDeferredValue:$t,useTransition:$t,useMutableSource:$t,useSyncExternalStore:$t,useId:$t,unstable_isNewReconciler:!1},mD={readContext:xn,useCallback:function(t,r){return nr().memoizedState=[t,r===void 0?null:r],t},useContext:xn,useEffect:zx,useImperativeHandle:function(t,r,a){return a=a!=null?a.concat([t]):null,fc(4194308,4,Bx.bind(null,r,t),a)},useLayoutEffect:function(t,r){return fc(4194308,4,t,r)},useInsertionEffect:function(t,r){return fc(4,2,t,r)},useMemo:function(t,r){var a=nr();return r=r===void 0?null:r,t=t(),a.memoizedState=[t,r],t},useReducer:function(t,r,a){var c=nr();return r=a!==void 0?a(r):r,c.memoizedState=c.baseState=r,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:r},c.queue=t,t=t.dispatch=pD.bind(null,ut,t),[c.memoizedState,t]},useRef:function(t){var r=nr();return t={current:t},r.memoizedState=t},useState:Lx,useDebugValue:Uf,useDeferredValue:function(t){return nr().memoizedState=t},useTransition:function(){var t=Lx(!1),r=t[0];return t=fD.bind(null,t[1]),nr().memoizedState=t,[r,t]},useMutableSource:function(){},useSyncExternalStore:function(t,r,a){var c=ut,p=nr();if(at){if(a===void 0)throw Error(o(407));a=a()}else{if(a=r(),Rt===null)throw Error(o(349));(Yo&30)!==0||Ox(c,r,a)}p.memoizedState=a;var g={value:a,getSnapshot:r};return p.queue=g,zx($x.bind(null,c,g,t),[t]),c.flags|=2048,sa(9,Ax.bind(null,c,g,a,r),void 0,null),a},useId:function(){var t=nr(),r=Rt.identifierPrefix;if(at){var a=Pr,c=_r;a=(c&~(1<<32-Nn(c)-1)).toString(32)+a,r=":"+r+"R"+a,a=ra++,0<a&&(r+="H"+a.toString(32)),r+=":"}else a=dD++,r=":"+r+"r"+a.toString(32)+":";return t.memoizedState=r},unstable_isNewReconciler:!1},gD={readContext:xn,useCallback:Wx,useContext:xn,useEffect:Vf,useImperativeHandle:Hx,useInsertionEffect:Vx,useLayoutEffect:Ux,useMemo:Kx,useReducer:Ff,useRef:Fx,useState:function(){return Ff(oa)},useDebugValue:Uf,useDeferredValue:function(t){var r=wn();return Gx(r,Ct.memoizedState,t)},useTransition:function(){var t=Ff(oa)[0],r=wn().memoizedState;return[t,r]},useMutableSource:Dx,useSyncExternalStore:Nx,useId:Zx,unstable_isNewReconciler:!1},vD={readContext:xn,useCallback:Wx,useContext:xn,useEffect:Vf,useImperativeHandle:Hx,useInsertionEffect:Vx,useLayoutEffect:Ux,useMemo:Kx,useReducer:zf,useRef:Fx,useState:function(){return zf(oa)},useDebugValue:Uf,useDeferredValue:function(t){var r=wn();return Ct===null?r.memoizedState=t:Gx(r,Ct.memoizedState,t)},useTransition:function(){var t=zf(oa)[0],r=wn().memoizedState;return[t,r]},useMutableSource:Dx,useSyncExternalStore:Nx,useId:Zx,unstable_isNewReconciler:!1};function $n(t,r){if(t&&t.defaultProps){r=M({},r),t=t.defaultProps;for(var a in t)r[a]===void 0&&(r[a]=t[a]);return r}return r}function Bf(t,r,a,c){r=t.memoizedState,a=a(c,r),a=a==null?r:M({},r,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var mc={isMounted:function(t){return(t=t._reactInternals)?Bo(t)===t:!1},enqueueSetState:function(t,r,a){t=t._reactInternals;var c=Ht(),p=go(t),g=Ir(c,p);g.payload=r,a!=null&&(g.callback=a),r=fo(t,g,p),r!==null&&(Ln(r,t,p,c),ac(r,t,p))},enqueueReplaceState:function(t,r,a){t=t._reactInternals;var c=Ht(),p=go(t),g=Ir(c,p);g.tag=1,g.payload=r,a!=null&&(g.callback=a),r=fo(t,g,p),r!==null&&(Ln(r,t,p,c),ac(r,t,p))},enqueueForceUpdate:function(t,r){t=t._reactInternals;var a=Ht(),c=go(t),p=Ir(a,c);p.tag=2,r!=null&&(p.callback=r),r=fo(t,p,c),r!==null&&(Ln(r,t,c,a),ac(r,t,c))}};function Xx(t,r,a,c,p,g,w){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,g,w):r.prototype&&r.prototype.isPureReactComponent?!Wi(a,c)||!Wi(p,g):!0}function Jx(t,r,a){var c=!1,p=lo,g=r.contextType;return typeof g=="object"&&g!==null?g=xn(g):(p=Yt(r)?Wo:At.current,c=r.contextTypes,g=(c=c!=null)?Ms(t,p):lo),r=new r(a,g),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=mc,t.stateNode=r,r._reactInternals=t,c&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=p,t.__reactInternalMemoizedMaskedChildContext=g),r}function ew(t,r,a,c){t=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,c),r.state!==t&&mc.enqueueReplaceState(r,r.state,null)}function Hf(t,r,a,c){var p=t.stateNode;p.props=a,p.state=t.memoizedState,p.refs={},Tf(t);var g=r.contextType;typeof g=="object"&&g!==null?p.context=xn(g):(g=Yt(r)?Wo:At.current,p.context=Ms(t,g)),p.state=t.memoizedState,g=r.getDerivedStateFromProps,typeof g=="function"&&(Bf(t,r,g,a),p.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(r=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),r!==p.state&&mc.enqueueReplaceState(p,p.state,null),lc(t,a,p,c),p.state=t.memoizedState),typeof p.componentDidMount=="function"&&(t.flags|=4194308)}function Hs(t,r){try{var a="",c=r;do a+=H(c),c=c.return;while(c);var p=a}catch(g){p=`
|
|
7
|
+
Error generating stack: `+g.message+`
|
|
8
|
+
`+g.stack}return{value:t,source:r,stack:p,digest:null}}function Wf(t,r,a){return{value:t,source:null,stack:a??null,digest:r??null}}function Kf(t,r){try{console.error(r.value)}catch(a){setTimeout(function(){throw a})}}var yD=typeof WeakMap=="function"?WeakMap:Map;function tw(t,r,a){a=Ir(-1,a),a.tag=3,a.payload={element:null};var c=r.value;return a.callback=function(){Sc||(Sc=!0,ap=c),Kf(t,r)},a}function nw(t,r,a){a=Ir(-1,a),a.tag=3;var c=t.type.getDerivedStateFromError;if(typeof c=="function"){var p=r.value;a.payload=function(){return c(p)},a.callback=function(){Kf(t,r)}}var g=t.stateNode;return g!==null&&typeof g.componentDidCatch=="function"&&(a.callback=function(){Kf(t,r),typeof c!="function"&&(ho===null?ho=new Set([this]):ho.add(this));var w=r.stack;this.componentDidCatch(r.value,{componentStack:w!==null?w:""})}),a}function rw(t,r,a){var c=t.pingCache;if(c===null){c=t.pingCache=new yD;var p=new Set;c.set(r,p)}else p=c.get(r),p===void 0&&(p=new Set,c.set(r,p));p.has(a)||(p.add(a),t=ND.bind(null,t,r,a),r.then(t,t))}function ow(t){do{var r;if((r=t.tag===13)&&(r=t.memoizedState,r=r!==null?r.dehydrated!==null:!0),r)return t;t=t.return}while(t!==null);return null}function sw(t,r,a,c,p){return(t.mode&1)===0?(t===r?t.flags|=65536:(t.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(r=Ir(-1,1),r.tag=2,fo(a,r,1))),a.lanes|=1),t):(t.flags|=65536,t.lanes=p,t)}var xD=R.ReactCurrentOwner,Qt=!1;function Bt(t,r,a,c){r.child=t===null?Ex(r,null,a,c):zs(r,t.child,a,c)}function iw(t,r,a,c,p){a=a.render;var g=r.ref;return Us(r,p),c=jf(t,r,a,c,g,p),a=Lf(),t!==null&&!Qt?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~p,Tr(t,r,p)):(at&&a&&wf(r),r.flags|=1,Bt(t,r,c,p),r.child)}function aw(t,r,a,c,p){if(t===null){var g=a.type;return typeof g=="function"&&!hp(g)&&g.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(r.tag=15,r.type=g,lw(t,r,g,c,p)):(t=Rc(a.type,null,c,r,r.mode,p),t.ref=r.ref,t.return=r,r.child=t)}if(g=t.child,(t.lanes&p)===0){var w=g.memoizedProps;if(a=a.compare,a=a!==null?a:Wi,a(w,c)&&t.ref===r.ref)return Tr(t,r,p)}return r.flags|=1,t=yo(g,c),t.ref=r.ref,t.return=r,r.child=t}function lw(t,r,a,c,p){if(t!==null){var g=t.memoizedProps;if(Wi(g,c)&&t.ref===r.ref)if(Qt=!1,r.pendingProps=c=g,(t.lanes&p)!==0)(t.flags&131072)!==0&&(Qt=!0);else return r.lanes=t.lanes,Tr(t,r,p)}return Gf(t,r,a,c,p)}function cw(t,r,a){var c=r.pendingProps,p=c.children,g=t!==null?t.memoizedState:null;if(c.mode==="hidden")if((r.mode&1)===0)r.memoizedState={baseLanes:0,cachePool:null,transitions:null},rt(Ks,pn),pn|=a;else{if((a&1073741824)===0)return t=g!==null?g.baseLanes|a:a,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:t,cachePool:null,transitions:null},r.updateQueue=null,rt(Ks,pn),pn|=t,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=g!==null?g.baseLanes:a,rt(Ks,pn),pn|=c}else g!==null?(c=g.baseLanes|a,r.memoizedState=null):c=a,rt(Ks,pn),pn|=c;return Bt(t,r,p,a),r.child}function uw(t,r){var a=r.ref;(t===null&&a!==null||t!==null&&t.ref!==a)&&(r.flags|=512,r.flags|=2097152)}function Gf(t,r,a,c,p){var g=Yt(a)?Wo:At.current;return g=Ms(r,g),Us(r,p),a=jf(t,r,a,c,g,p),c=Lf(),t!==null&&!Qt?(r.updateQueue=t.updateQueue,r.flags&=-2053,t.lanes&=~p,Tr(t,r,p)):(at&&c&&wf(r),r.flags|=1,Bt(t,r,a,p),r.child)}function dw(t,r,a,c,p){if(Yt(a)){var g=!0;Jl(r)}else g=!1;if(Us(r,p),r.stateNode===null)vc(t,r),Jx(r,a,c),Hf(r,a,c,p),c=!0;else if(t===null){var w=r.stateNode,_=r.memoizedProps;w.props=_;var A=w.context,V=a.contextType;typeof V=="object"&&V!==null?V=xn(V):(V=Yt(a)?Wo:At.current,V=Ms(r,V));var J=a.getDerivedStateFromProps,ee=typeof J=="function"||typeof w.getSnapshotBeforeUpdate=="function";ee||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(_!==c||A!==V)&&ew(r,w,c,V),uo=!1;var X=r.memoizedState;w.state=X,lc(r,c,w,p),A=r.memoizedState,_!==c||X!==A||qt.current||uo?(typeof J=="function"&&(Bf(r,a,J,c),A=r.memoizedState),(_=uo||Xx(r,a,_,c,X,A,V))?(ee||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(r.flags|=4194308)):(typeof w.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=A),w.props=c,w.state=A,w.context=V,c=_):(typeof w.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{w=r.stateNode,Px(t,r),_=r.memoizedProps,V=r.type===r.elementType?_:$n(r.type,_),w.props=V,ee=r.pendingProps,X=w.context,A=a.contextType,typeof A=="object"&&A!==null?A=xn(A):(A=Yt(a)?Wo:At.current,A=Ms(r,A));var he=a.getDerivedStateFromProps;(J=typeof he=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(_!==ee||X!==A)&&ew(r,w,c,A),uo=!1,X=r.memoizedState,w.state=X,lc(r,c,w,p);var we=r.memoizedState;_!==ee||X!==we||qt.current||uo?(typeof he=="function"&&(Bf(r,a,he,c),we=r.memoizedState),(V=uo||Xx(r,a,V,c,X,we,A)||!1)?(J||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(c,we,A),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(c,we,A)),typeof w.componentDidUpdate=="function"&&(r.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof w.componentDidUpdate!="function"||_===t.memoizedProps&&X===t.memoizedState||(r.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||_===t.memoizedProps&&X===t.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=we),w.props=c,w.state=we,w.context=A,c=V):(typeof w.componentDidUpdate!="function"||_===t.memoizedProps&&X===t.memoizedState||(r.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||_===t.memoizedProps&&X===t.memoizedState||(r.flags|=1024),c=!1)}return Zf(t,r,a,c,g,p)}function Zf(t,r,a,c,p,g){uw(t,r);var w=(r.flags&128)!==0;if(!c&&!w)return p&&gx(r,a,!1),Tr(t,r,g);c=r.stateNode,xD.current=r;var _=w&&typeof a.getDerivedStateFromError!="function"?null:c.render();return r.flags|=1,t!==null&&w?(r.child=zs(r,t.child,null,g),r.child=zs(r,null,_,g)):Bt(t,r,_,g),r.memoizedState=c.state,p&&gx(r,a,!0),r.child}function fw(t){var r=t.stateNode;r.pendingContext?hx(t,r.pendingContext,r.pendingContext!==r.context):r.context&&hx(t,r.context,!1),Df(t,r.containerInfo)}function pw(t,r,a,c,p){return Fs(),kf(p),r.flags|=256,Bt(t,r,a,c),r.child}var qf={dehydrated:null,treeContext:null,retryLane:0};function Yf(t){return{baseLanes:t,cachePool:null,transitions:null}}function hw(t,r,a){var c=r.pendingProps,p=ct.current,g=!1,w=(r.flags&128)!==0,_;if((_=w)||(_=t!==null&&t.memoizedState===null?!1:(p&2)!==0),_?(g=!0,r.flags&=-129):(t===null||t.memoizedState!==null)&&(p|=1),rt(ct,p&1),t===null)return Cf(r),t=r.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?((r.mode&1)===0?r.lanes=1:t.data==="$!"?r.lanes=8:r.lanes=1073741824,null):(w=c.children,t=c.fallback,g?(c=r.mode,g=r.child,w={mode:"hidden",children:w},(c&1)===0&&g!==null?(g.childLanes=0,g.pendingProps=w):g=Ic(w,c,0,null),t=ts(t,c,a,null),g.return=r,t.return=r,g.sibling=t,r.child=g,r.child.memoizedState=Yf(a),r.memoizedState=qf,t):Qf(r,w));if(p=t.memoizedState,p!==null&&(_=p.dehydrated,_!==null))return wD(t,r,w,c,_,p,a);if(g){g=c.fallback,w=r.mode,p=t.child,_=p.sibling;var A={mode:"hidden",children:c.children};return(w&1)===0&&r.child!==p?(c=r.child,c.childLanes=0,c.pendingProps=A,r.deletions=null):(c=yo(p,A),c.subtreeFlags=p.subtreeFlags&14680064),_!==null?g=yo(_,g):(g=ts(g,w,a,null),g.flags|=2),g.return=r,c.return=r,c.sibling=g,r.child=c,c=g,g=r.child,w=t.child.memoizedState,w=w===null?Yf(a):{baseLanes:w.baseLanes|a,cachePool:null,transitions:w.transitions},g.memoizedState=w,g.childLanes=t.childLanes&~a,r.memoizedState=qf,c}return g=t.child,t=g.sibling,c=yo(g,{mode:"visible",children:c.children}),(r.mode&1)===0&&(c.lanes=a),c.return=r,c.sibling=null,t!==null&&(a=r.deletions,a===null?(r.deletions=[t],r.flags|=16):a.push(t)),r.child=c,r.memoizedState=null,c}function Qf(t,r){return r=Ic({mode:"visible",children:r},t.mode,0,null),r.return=t,t.child=r}function gc(t,r,a,c){return c!==null&&kf(c),zs(r,t.child,null,a),t=Qf(r,r.pendingProps.children),t.flags|=2,r.memoizedState=null,t}function wD(t,r,a,c,p,g,w){if(a)return r.flags&256?(r.flags&=-257,c=Wf(Error(o(422))),gc(t,r,w,c)):r.memoizedState!==null?(r.child=t.child,r.flags|=128,null):(g=c.fallback,p=r.mode,c=Ic({mode:"visible",children:c.children},p,0,null),g=ts(g,p,w,null),g.flags|=2,c.return=r,g.return=r,c.sibling=g,r.child=c,(r.mode&1)!==0&&zs(r,t.child,null,w),r.child.memoizedState=Yf(w),r.memoizedState=qf,g);if((r.mode&1)===0)return gc(t,r,w,null);if(p.data==="$!"){if(c=p.nextSibling&&p.nextSibling.dataset,c)var _=c.dgst;return c=_,g=Error(o(419)),c=Wf(g,c,void 0),gc(t,r,w,c)}if(_=(w&t.childLanes)!==0,Qt||_){if(c=Rt,c!==null){switch(w&-w){case 4:p=2;break;case 16:p=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:p=32;break;case 536870912:p=268435456;break;default:p=0}p=(p&(c.suspendedLanes|w))!==0?0:p,p!==0&&p!==g.retryLane&&(g.retryLane=p,Rr(t,p),Ln(c,t,p,-1))}return pp(),c=Wf(Error(o(421))),gc(t,r,w,c)}return p.data==="$?"?(r.flags|=128,r.child=t.child,r=OD.bind(null,t),p._reactRetry=r,null):(t=g.treeContext,fn=io(p.nextSibling),dn=r,at=!0,An=null,t!==null&&(vn[yn++]=_r,vn[yn++]=Pr,vn[yn++]=Ko,_r=t.id,Pr=t.overflow,Ko=r),r=Qf(r,c.children),r.flags|=4096,r)}function mw(t,r,a){t.lanes|=r;var c=t.alternate;c!==null&&(c.lanes|=r),Rf(t.return,r,a)}function Xf(t,r,a,c,p){var g=t.memoizedState;g===null?t.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:p}:(g.isBackwards=r,g.rendering=null,g.renderingStartTime=0,g.last=c,g.tail=a,g.tailMode=p)}function gw(t,r,a){var c=r.pendingProps,p=c.revealOrder,g=c.tail;if(Bt(t,r,c.children,a),c=ct.current,(c&2)!==0)c=c&1|2,r.flags|=128;else{if(t!==null&&(t.flags&128)!==0)e:for(t=r.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&mw(t,a,r);else if(t.tag===19)mw(t,a,r);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break e;for(;t.sibling===null;){if(t.return===null||t.return===r)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}c&=1}if(rt(ct,c),(r.mode&1)===0)r.memoizedState=null;else switch(p){case"forwards":for(a=r.child,p=null;a!==null;)t=a.alternate,t!==null&&cc(t)===null&&(p=a),a=a.sibling;a=p,a===null?(p=r.child,r.child=null):(p=a.sibling,a.sibling=null),Xf(r,!1,p,a,g);break;case"backwards":for(a=null,p=r.child,r.child=null;p!==null;){if(t=p.alternate,t!==null&&cc(t)===null){r.child=p;break}t=p.sibling,p.sibling=a,a=p,p=t}Xf(r,!0,a,null,g);break;case"together":Xf(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function vc(t,r){(r.mode&1)===0&&t!==null&&(t.alternate=null,r.alternate=null,r.flags|=2)}function Tr(t,r,a){if(t!==null&&(r.dependencies=t.dependencies),Qo|=r.lanes,(a&r.childLanes)===0)return null;if(t!==null&&r.child!==t.child)throw Error(o(153));if(r.child!==null){for(t=r.child,a=yo(t,t.pendingProps),r.child=a,a.return=r;t.sibling!==null;)t=t.sibling,a=a.sibling=yo(t,t.pendingProps),a.return=r;a.sibling=null}return r.child}function bD(t,r,a){switch(r.tag){case 3:fw(r),Fs();break;case 5:Tx(r);break;case 1:Yt(r.type)&&Jl(r);break;case 4:Df(r,r.stateNode.containerInfo);break;case 10:var c=r.type._context,p=r.memoizedProps.value;rt(sc,c._currentValue),c._currentValue=p;break;case 13:if(c=r.memoizedState,c!==null)return c.dehydrated!==null?(rt(ct,ct.current&1),r.flags|=128,null):(a&r.child.childLanes)!==0?hw(t,r,a):(rt(ct,ct.current&1),t=Tr(t,r,a),t!==null?t.sibling:null);rt(ct,ct.current&1);break;case 19:if(c=(a&r.childLanes)!==0,(t.flags&128)!==0){if(c)return gw(t,r,a);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),rt(ct,ct.current),c)break;return null;case 22:case 23:return r.lanes=0,cw(t,r,a)}return Tr(t,r,a)}var vw,Jf,yw,xw;vw=function(t,r){for(var a=r.child;a!==null;){if(a.tag===5||a.tag===6)t.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},Jf=function(){},yw=function(t,r,a,c){var p=t.memoizedProps;if(p!==c){t=r.stateNode,qo(tr.current);var g=null;switch(a){case"input":p=xt(t,p),c=xt(t,c),g=[];break;case"select":p=M({},p,{value:void 0}),c=M({},c,{value:void 0}),g=[];break;case"textarea":p=Fo(t,p),c=Fo(t,c),g=[];break;default:typeof p.onClick!="function"&&typeof c.onClick=="function"&&(t.onclick=Yl)}Xr(a,c);var w;a=null;for(V in p)if(!c.hasOwnProperty(V)&&p.hasOwnProperty(V)&&p[V]!=null)if(V==="style"){var _=p[V];for(w in _)_.hasOwnProperty(w)&&(a||(a={}),a[w]="")}else V!=="dangerouslySetInnerHTML"&&V!=="children"&&V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&V!=="autoFocus"&&(i.hasOwnProperty(V)?g||(g=[]):(g=g||[]).push(V,null));for(V in c){var A=c[V];if(_=p?.[V],c.hasOwnProperty(V)&&A!==_&&(A!=null||_!=null))if(V==="style")if(_){for(w in _)!_.hasOwnProperty(w)||A&&A.hasOwnProperty(w)||(a||(a={}),a[w]="");for(w in A)A.hasOwnProperty(w)&&_[w]!==A[w]&&(a||(a={}),a[w]=A[w])}else a||(g||(g=[]),g.push(V,a)),a=A;else V==="dangerouslySetInnerHTML"?(A=A?A.__html:void 0,_=_?_.__html:void 0,A!=null&&_!==A&&(g=g||[]).push(V,A)):V==="children"?typeof A!="string"&&typeof A!="number"||(g=g||[]).push(V,""+A):V!=="suppressContentEditableWarning"&&V!=="suppressHydrationWarning"&&(i.hasOwnProperty(V)?(A!=null&&V==="onScroll"&&st("scroll",t),g||_===A||(g=[])):(g=g||[]).push(V,A))}a&&(g=g||[]).push("style",a);var V=g;(r.updateQueue=V)&&(r.flags|=4)}},xw=function(t,r,a,c){a!==c&&(r.flags|=4)};function ia(t,r){if(!at)switch(t.tailMode){case"hidden":r=t.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?r||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function Mt(t){var r=t.alternate!==null&&t.alternate.child===t.child,a=0,c=0;if(r)for(var p=t.child;p!==null;)a|=p.lanes|p.childLanes,c|=p.subtreeFlags&14680064,c|=p.flags&14680064,p.return=t,p=p.sibling;else for(p=t.child;p!==null;)a|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=t,p=p.sibling;return t.subtreeFlags|=c,t.childLanes=a,r}function SD(t,r,a){var c=r.pendingProps;switch(bf(r),r.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mt(r),null;case 1:return Yt(r.type)&&Xl(),Mt(r),null;case 3:return c=r.stateNode,Bs(),it(qt),it(At),Af(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(t===null||t.child===null)&&(rc(r)?r.flags|=4:t===null||t.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,An!==null&&(up(An),An=null))),Jf(t,r),Mt(r),null;case 5:Nf(r);var p=qo(ta.current);if(a=r.type,t!==null&&r.stateNode!=null)yw(t,r,a,c,p),t.ref!==r.ref&&(r.flags|=512,r.flags|=2097152);else{if(!c){if(r.stateNode===null)throw Error(o(166));return Mt(r),null}if(t=qo(tr.current),rc(r)){c=r.stateNode,a=r.type;var g=r.memoizedProps;switch(c[er]=r,c[Yi]=g,t=(r.mode&1)!==0,a){case"dialog":st("cancel",c),st("close",c);break;case"iframe":case"object":case"embed":st("load",c);break;case"video":case"audio":for(p=0;p<Gi.length;p++)st(Gi[p],c);break;case"source":st("error",c);break;case"img":case"image":case"link":st("error",c),st("load",c);break;case"details":st("toggle",c);break;case"input":ht(c,g),st("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!g.multiple},st("invalid",c);break;case"textarea":qr(c,g),st("invalid",c)}Xr(a,g),p=null;for(var w in g)if(g.hasOwnProperty(w)){var _=g[w];w==="children"?typeof _=="string"?c.textContent!==_&&(g.suppressHydrationWarning!==!0&&ql(c.textContent,_,t),p=["children",_]):typeof _=="number"&&c.textContent!==""+_&&(g.suppressHydrationWarning!==!0&&ql(c.textContent,_,t),p=["children",""+_]):i.hasOwnProperty(w)&&_!=null&&w==="onScroll"&&st("scroll",c)}switch(a){case"input":Ue(c),Zr(c,g,!0);break;case"textarea":Ue(c),Tn(c);break;case"select":case"option":break;default:typeof g.onClick=="function"&&(c.onclick=Yl)}c=p,r.updateQueue=c,c!==null&&(r.flags|=4)}else{w=p.nodeType===9?p:p.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=Ei(a)),t==="http://www.w3.org/1999/xhtml"?a==="script"?(t=w.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof c.is=="string"?t=w.createElement(a,{is:c.is}):(t=w.createElement(a),a==="select"&&(w=t,c.multiple?w.multiple=!0:c.size&&(w.size=c.size))):t=w.createElementNS(t,a),t[er]=r,t[Yi]=c,vw(t,r,!1,!1),r.stateNode=t;e:{switch(w=Vo(a,c),a){case"dialog":st("cancel",t),st("close",t),p=c;break;case"iframe":case"object":case"embed":st("load",t),p=c;break;case"video":case"audio":for(p=0;p<Gi.length;p++)st(Gi[p],t);p=c;break;case"source":st("error",t),p=c;break;case"img":case"image":case"link":st("error",t),st("load",t),p=c;break;case"details":st("toggle",t),p=c;break;case"input":ht(t,c),p=xt(t,c),st("invalid",t);break;case"option":p=c;break;case"select":t._wrapperState={wasMultiple:!!c.multiple},p=M({},c,{value:void 0}),st("invalid",t);break;case"textarea":qr(t,c),p=Fo(t,c),st("invalid",t);break;default:p=c}Xr(a,p),_=p;for(g in _)if(_.hasOwnProperty(g)){var A=_[g];g==="style"?Sr(t,A):g==="dangerouslySetInnerHTML"?(A=A?A.__html:void 0,A!=null&&_i(t,A)):g==="children"?typeof A=="string"?(a!=="textarea"||A!=="")&&gn(t,A):typeof A=="number"&&gn(t,""+A):g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&g!=="autoFocus"&&(i.hasOwnProperty(g)?A!=null&&g==="onScroll"&&st("scroll",t):A!=null&&O(t,g,A,w))}switch(a){case"input":Ue(t),Zr(t,c,!1);break;case"textarea":Ue(t),Tn(t);break;case"option":c.value!=null&&t.setAttribute("value",""+Y(c.value));break;case"select":t.multiple=!!c.multiple,g=c.value,g!=null?In(t,!!c.multiple,g,!1):c.defaultValue!=null&&In(t,!!c.multiple,c.defaultValue,!0);break;default:typeof p.onClick=="function"&&(t.onclick=Yl)}switch(a){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}}c&&(r.flags|=4)}r.ref!==null&&(r.flags|=512,r.flags|=2097152)}return Mt(r),null;case 6:if(t&&r.stateNode!=null)xw(t,r,t.memoizedProps,c);else{if(typeof c!="string"&&r.stateNode===null)throw Error(o(166));if(a=qo(ta.current),qo(tr.current),rc(r)){if(c=r.stateNode,a=r.memoizedProps,c[er]=r,(g=c.nodeValue!==a)&&(t=dn,t!==null))switch(t.tag){case 3:ql(c.nodeValue,a,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&ql(c.nodeValue,a,(t.mode&1)!==0)}g&&(r.flags|=4)}else c=(a.nodeType===9?a:a.ownerDocument).createTextNode(c),c[er]=r,r.stateNode=c}return Mt(r),null;case 13:if(it(ct),c=r.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(at&&fn!==null&&(r.mode&1)!==0&&(r.flags&128)===0)Sx(),Fs(),r.flags|=98560,g=!1;else if(g=rc(r),c!==null&&c.dehydrated!==null){if(t===null){if(!g)throw Error(o(318));if(g=r.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(o(317));g[er]=r}else Fs(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Mt(r),g=!1}else An!==null&&(up(An),An=null),g=!0;if(!g)return r.flags&65536?r:null}return(r.flags&128)!==0?(r.lanes=a,r):(c=c!==null,c!==(t!==null&&t.memoizedState!==null)&&c&&(r.child.flags|=8192,(r.mode&1)!==0&&(t===null||(ct.current&1)!==0?kt===0&&(kt=3):pp())),r.updateQueue!==null&&(r.flags|=4),Mt(r),null);case 4:return Bs(),Jf(t,r),t===null&&Zi(r.stateNode.containerInfo),Mt(r),null;case 10:return Pf(r.type._context),Mt(r),null;case 17:return Yt(r.type)&&Xl(),Mt(r),null;case 19:if(it(ct),g=r.memoizedState,g===null)return Mt(r),null;if(c=(r.flags&128)!==0,w=g.rendering,w===null)if(c)ia(g,!1);else{if(kt!==0||t!==null&&(t.flags&128)!==0)for(t=r.child;t!==null;){if(w=cc(t),w!==null){for(r.flags|=128,ia(g,!1),c=w.updateQueue,c!==null&&(r.updateQueue=c,r.flags|=4),r.subtreeFlags=0,c=a,a=r.child;a!==null;)g=a,t=c,g.flags&=14680066,w=g.alternate,w===null?(g.childLanes=0,g.lanes=t,g.child=null,g.subtreeFlags=0,g.memoizedProps=null,g.memoizedState=null,g.updateQueue=null,g.dependencies=null,g.stateNode=null):(g.childLanes=w.childLanes,g.lanes=w.lanes,g.child=w.child,g.subtreeFlags=0,g.deletions=null,g.memoizedProps=w.memoizedProps,g.memoizedState=w.memoizedState,g.updateQueue=w.updateQueue,g.type=w.type,t=w.dependencies,g.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),a=a.sibling;return rt(ct,ct.current&1|2),r.child}t=t.sibling}g.tail!==null&&mt()>Gs&&(r.flags|=128,c=!0,ia(g,!1),r.lanes=4194304)}else{if(!c)if(t=cc(w),t!==null){if(r.flags|=128,c=!0,a=t.updateQueue,a!==null&&(r.updateQueue=a,r.flags|=4),ia(g,!0),g.tail===null&&g.tailMode==="hidden"&&!w.alternate&&!at)return Mt(r),null}else 2*mt()-g.renderingStartTime>Gs&&a!==1073741824&&(r.flags|=128,c=!0,ia(g,!1),r.lanes=4194304);g.isBackwards?(w.sibling=r.child,r.child=w):(a=g.last,a!==null?a.sibling=w:r.child=w,g.last=w)}return g.tail!==null?(r=g.tail,g.rendering=r,g.tail=r.sibling,g.renderingStartTime=mt(),r.sibling=null,a=ct.current,rt(ct,c?a&1|2:a&1),r):(Mt(r),null);case 22:case 23:return fp(),c=r.memoizedState!==null,t!==null&&t.memoizedState!==null!==c&&(r.flags|=8192),c&&(r.mode&1)!==0?(pn&1073741824)!==0&&(Mt(r),r.subtreeFlags&6&&(r.flags|=8192)):Mt(r),null;case 24:return null;case 25:return null}throw Error(o(156,r.tag))}function CD(t,r){switch(bf(r),r.tag){case 1:return Yt(r.type)&&Xl(),t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 3:return Bs(),it(qt),it(At),Af(),t=r.flags,(t&65536)!==0&&(t&128)===0?(r.flags=t&-65537|128,r):null;case 5:return Nf(r),null;case 13:if(it(ct),t=r.memoizedState,t!==null&&t.dehydrated!==null){if(r.alternate===null)throw Error(o(340));Fs()}return t=r.flags,t&65536?(r.flags=t&-65537|128,r):null;case 19:return it(ct),null;case 4:return Bs(),null;case 10:return Pf(r.type._context),null;case 22:case 23:return fp(),null;case 24:return null;default:return null}}var yc=!1,jt=!1,kD=typeof WeakSet=="function"?WeakSet:Set,xe=null;function Ws(t,r){var a=t.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(c){pt(t,r,c)}else a.current=null}function ep(t,r,a){try{a()}catch(c){pt(t,r,c)}}var ww=!1;function ED(t,r){if(ff=Ll,t=Xy(),rf(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var p=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break e}var w=0,_=-1,A=-1,V=0,J=0,ee=t,X=null;t:for(;;){for(var he;ee!==a||p!==0&&ee.nodeType!==3||(_=w+p),ee!==g||c!==0&&ee.nodeType!==3||(A=w+c),ee.nodeType===3&&(w+=ee.nodeValue.length),(he=ee.firstChild)!==null;)X=ee,ee=he;for(;;){if(ee===t)break t;if(X===a&&++V===p&&(_=w),X===g&&++J===c&&(A=w),(he=ee.nextSibling)!==null)break;ee=X,X=ee.parentNode}ee=he}a=_===-1||A===-1?null:{start:_,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(pf={focusedElem:t,selectionRange:a},Ll=!1,xe=r;xe!==null;)if(r=xe,t=r.child,(r.subtreeFlags&1028)!==0&&t!==null)t.return=r,xe=t;else for(;xe!==null;){r=xe;try{var we=r.alternate;if((r.flags&1024)!==0)switch(r.tag){case 0:case 11:case 15:break;case 1:if(we!==null){var Ce=we.memoizedProps,gt=we.memoizedState,F=r.stateNode,$=F.getSnapshotBeforeUpdate(r.elementType===r.type?Ce:$n(r.type,Ce),gt);F.__reactInternalSnapshotBeforeUpdate=$}break;case 3:var z=r.stateNode.containerInfo;z.nodeType===1?z.textContent="":z.nodeType===9&&z.documentElement&&z.removeChild(z.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(ie){pt(r,r.return,ie)}if(t=r.sibling,t!==null){t.return=r.return,xe=t;break}xe=r.return}return we=ww,ww=!1,we}function aa(t,r,a){var c=r.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var p=c=c.next;do{if((p.tag&t)===t){var g=p.destroy;p.destroy=void 0,g!==void 0&&ep(r,a,g)}p=p.next}while(p!==c)}}function xc(t,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var a=r=r.next;do{if((a.tag&t)===t){var c=a.create;a.destroy=c()}a=a.next}while(a!==r)}}function tp(t){var r=t.ref;if(r!==null){var a=t.stateNode;t.tag,t=a,typeof r=="function"?r(t):r.current=t}}function bw(t){var r=t.alternate;r!==null&&(t.alternate=null,bw(r)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(r=t.stateNode,r!==null&&(delete r[er],delete r[Yi],delete r[vf],delete r[aD],delete r[lD])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Sw(t){return t.tag===5||t.tag===3||t.tag===4}function Cw(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Sw(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function np(t,r,a){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?a.nodeType===8?a.parentNode.insertBefore(t,r):a.insertBefore(t,r):(a.nodeType===8?(r=a.parentNode,r.insertBefore(t,a)):(r=a,r.appendChild(t)),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=Yl));else if(c!==4&&(t=t.child,t!==null))for(np(t,r,a),t=t.sibling;t!==null;)np(t,r,a),t=t.sibling}function rp(t,r,a){var c=t.tag;if(c===5||c===6)t=t.stateNode,r?a.insertBefore(t,r):a.appendChild(t);else if(c!==4&&(t=t.child,t!==null))for(rp(t,r,a),t=t.sibling;t!==null;)rp(t,r,a),t=t.sibling}var Tt=null,Mn=!1;function po(t,r,a){for(a=a.child;a!==null;)kw(t,r,a),a=a.sibling}function kw(t,r,a){if(Jn&&typeof Jn.onCommitFiberUnmount=="function")try{Jn.onCommitFiberUnmount(Nl,a)}catch{}switch(a.tag){case 5:jt||Ws(a,r);case 6:var c=Tt,p=Mn;Tt=null,po(t,r,a),Tt=c,Mn=p,Tt!==null&&(Mn?(t=Tt,a=a.stateNode,t.nodeType===8?t.parentNode.removeChild(a):t.removeChild(a)):Tt.removeChild(a.stateNode));break;case 18:Tt!==null&&(Mn?(t=Tt,a=a.stateNode,t.nodeType===8?gf(t.parentNode,a):t.nodeType===1&&gf(t,a),Fi(t)):gf(Tt,a.stateNode));break;case 4:c=Tt,p=Mn,Tt=a.stateNode.containerInfo,Mn=!0,po(t,r,a),Tt=c,Mn=p;break;case 0:case 11:case 14:case 15:if(!jt&&(c=a.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){p=c=c.next;do{var g=p,w=g.destroy;g=g.tag,w!==void 0&&((g&2)!==0||(g&4)!==0)&&ep(a,r,w),p=p.next}while(p!==c)}po(t,r,a);break;case 1:if(!jt&&(Ws(a,r),c=a.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount()}catch(_){pt(a,r,_)}po(t,r,a);break;case 21:po(t,r,a);break;case 22:a.mode&1?(jt=(c=jt)||a.memoizedState!==null,po(t,r,a),jt=c):po(t,r,a);break;default:po(t,r,a)}}function Ew(t){var r=t.updateQueue;if(r!==null){t.updateQueue=null;var a=t.stateNode;a===null&&(a=t.stateNode=new kD),r.forEach(function(c){var p=AD.bind(null,t,c);a.has(c)||(a.add(c),c.then(p,p))})}}function jn(t,r){var a=r.deletions;if(a!==null)for(var c=0;c<a.length;c++){var p=a[c];try{var g=t,w=r,_=w;e:for(;_!==null;){switch(_.tag){case 5:Tt=_.stateNode,Mn=!1;break e;case 3:Tt=_.stateNode.containerInfo,Mn=!0;break e;case 4:Tt=_.stateNode.containerInfo,Mn=!0;break e}_=_.return}if(Tt===null)throw Error(o(160));kw(g,w,p),Tt=null,Mn=!1;var A=p.alternate;A!==null&&(A.return=null),p.return=null}catch(V){pt(p,r,V)}}if(r.subtreeFlags&12854)for(r=r.child;r!==null;)_w(r,t),r=r.sibling}function _w(t,r){var a=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(jn(r,t),rr(t),c&4){try{aa(3,t,t.return),xc(3,t)}catch(Ce){pt(t,t.return,Ce)}try{aa(5,t,t.return)}catch(Ce){pt(t,t.return,Ce)}}break;case 1:jn(r,t),rr(t),c&512&&a!==null&&Ws(a,a.return);break;case 5:if(jn(r,t),rr(t),c&512&&a!==null&&Ws(a,a.return),t.flags&32){var p=t.stateNode;try{gn(p,"")}catch(Ce){pt(t,t.return,Ce)}}if(c&4&&(p=t.stateNode,p!=null)){var g=t.memoizedProps,w=a!==null?a.memoizedProps:g,_=t.type,A=t.updateQueue;if(t.updateQueue=null,A!==null)try{_==="input"&&g.type==="radio"&&g.name!=null&&Qn(p,g),Vo(_,w);var V=Vo(_,g);for(w=0;w<A.length;w+=2){var J=A[w],ee=A[w+1];J==="style"?Sr(p,ee):J==="dangerouslySetInnerHTML"?_i(p,ee):J==="children"?gn(p,ee):O(p,J,ee,V)}switch(_){case"input":Rn(p,g);break;case"textarea":zo(p,g);break;case"select":var X=p._wrapperState.wasMultiple;p._wrapperState.wasMultiple=!!g.multiple;var he=g.value;he!=null?In(p,!!g.multiple,he,!1):X!==!!g.multiple&&(g.defaultValue!=null?In(p,!!g.multiple,g.defaultValue,!0):In(p,!!g.multiple,g.multiple?[]:"",!1))}p[Yi]=g}catch(Ce){pt(t,t.return,Ce)}}break;case 6:if(jn(r,t),rr(t),c&4){if(t.stateNode===null)throw Error(o(162));p=t.stateNode,g=t.memoizedProps;try{p.nodeValue=g}catch(Ce){pt(t,t.return,Ce)}}break;case 3:if(jn(r,t),rr(t),c&4&&a!==null&&a.memoizedState.isDehydrated)try{Fi(r.containerInfo)}catch(Ce){pt(t,t.return,Ce)}break;case 4:jn(r,t),rr(t);break;case 13:jn(r,t),rr(t),p=t.child,p.flags&8192&&(g=p.memoizedState!==null,p.stateNode.isHidden=g,!g||p.alternate!==null&&p.alternate.memoizedState!==null||(ip=mt())),c&4&&Ew(t);break;case 22:if(J=a!==null&&a.memoizedState!==null,t.mode&1?(jt=(V=jt)||J,jn(r,t),jt=V):jn(r,t),rr(t),c&8192){if(V=t.memoizedState!==null,(t.stateNode.isHidden=V)&&!J&&(t.mode&1)!==0)for(xe=t,J=t.child;J!==null;){for(ee=xe=J;xe!==null;){switch(X=xe,he=X.child,X.tag){case 0:case 11:case 14:case 15:aa(4,X,X.return);break;case 1:Ws(X,X.return);var we=X.stateNode;if(typeof we.componentWillUnmount=="function"){c=X,a=X.return;try{r=c,we.props=r.memoizedProps,we.state=r.memoizedState,we.componentWillUnmount()}catch(Ce){pt(c,a,Ce)}}break;case 5:Ws(X,X.return);break;case 22:if(X.memoizedState!==null){Iw(ee);continue}}he!==null?(he.return=X,xe=he):Iw(ee)}J=J.sibling}e:for(J=null,ee=t;;){if(ee.tag===5){if(J===null){J=ee;try{p=ee.stateNode,V?(g=p.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none"):(_=ee.stateNode,A=ee.memoizedProps.style,w=A!=null&&A.hasOwnProperty("display")?A.display:null,_.style.display=_s("display",w))}catch(Ce){pt(t,t.return,Ce)}}}else if(ee.tag===6){if(J===null)try{ee.stateNode.nodeValue=V?"":ee.memoizedProps}catch(Ce){pt(t,t.return,Ce)}}else if((ee.tag!==22&&ee.tag!==23||ee.memoizedState===null||ee===t)&&ee.child!==null){ee.child.return=ee,ee=ee.child;continue}if(ee===t)break e;for(;ee.sibling===null;){if(ee.return===null||ee.return===t)break e;J===ee&&(J=null),ee=ee.return}J===ee&&(J=null),ee.sibling.return=ee.return,ee=ee.sibling}}break;case 19:jn(r,t),rr(t),c&4&&Ew(t);break;case 21:break;default:jn(r,t),rr(t)}}function rr(t){var r=t.flags;if(r&2){try{e:{for(var a=t.return;a!==null;){if(Sw(a)){var c=a;break e}a=a.return}throw Error(o(160))}switch(c.tag){case 5:var p=c.stateNode;c.flags&32&&(gn(p,""),c.flags&=-33);var g=Cw(t);rp(t,g,p);break;case 3:case 4:var w=c.stateNode.containerInfo,_=Cw(t);np(t,_,w);break;default:throw Error(o(161))}}catch(A){pt(t,t.return,A)}t.flags&=-3}r&4096&&(t.flags&=-4097)}function _D(t,r,a){xe=t,Pw(t)}function Pw(t,r,a){for(var c=(t.mode&1)!==0;xe!==null;){var p=xe,g=p.child;if(p.tag===22&&c){var w=p.memoizedState!==null||yc;if(!w){var _=p.alternate,A=_!==null&&_.memoizedState!==null||jt;_=yc;var V=jt;if(yc=w,(jt=A)&&!V)for(xe=p;xe!==null;)w=xe,A=w.child,w.tag===22&&w.memoizedState!==null?Tw(p):A!==null?(A.return=w,xe=A):Tw(p);for(;g!==null;)xe=g,Pw(g),g=g.sibling;xe=p,yc=_,jt=V}Rw(t)}else(p.subtreeFlags&8772)!==0&&g!==null?(g.return=p,xe=g):Rw(t)}}function Rw(t){for(;xe!==null;){var r=xe;if((r.flags&8772)!==0){var a=r.alternate;try{if((r.flags&8772)!==0)switch(r.tag){case 0:case 11:case 15:jt||xc(5,r);break;case 1:var c=r.stateNode;if(r.flags&4&&!jt)if(a===null)c.componentDidMount();else{var p=r.elementType===r.type?a.memoizedProps:$n(r.type,a.memoizedProps);c.componentDidUpdate(p,a.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var g=r.updateQueue;g!==null&&Ix(r,g,c);break;case 3:var w=r.updateQueue;if(w!==null){if(a=null,r.child!==null)switch(r.child.tag){case 5:a=r.child.stateNode;break;case 1:a=r.child.stateNode}Ix(r,w,a)}break;case 5:var _=r.stateNode;if(a===null&&r.flags&4){a=_;var A=r.memoizedProps;switch(r.type){case"button":case"input":case"select":case"textarea":A.autoFocus&&a.focus();break;case"img":A.src&&(a.src=A.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(r.memoizedState===null){var V=r.alternate;if(V!==null){var J=V.memoizedState;if(J!==null){var ee=J.dehydrated;ee!==null&&Fi(ee)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}jt||r.flags&512&&tp(r)}catch(X){pt(r,r.return,X)}}if(r===t){xe=null;break}if(a=r.sibling,a!==null){a.return=r.return,xe=a;break}xe=r.return}}function Iw(t){for(;xe!==null;){var r=xe;if(r===t){xe=null;break}var a=r.sibling;if(a!==null){a.return=r.return,xe=a;break}xe=r.return}}function Tw(t){for(;xe!==null;){var r=xe;try{switch(r.tag){case 0:case 11:case 15:var a=r.return;try{xc(4,r)}catch(A){pt(r,a,A)}break;case 1:var c=r.stateNode;if(typeof c.componentDidMount=="function"){var p=r.return;try{c.componentDidMount()}catch(A){pt(r,p,A)}}var g=r.return;try{tp(r)}catch(A){pt(r,g,A)}break;case 5:var w=r.return;try{tp(r)}catch(A){pt(r,w,A)}}}catch(A){pt(r,r.return,A)}if(r===t){xe=null;break}var _=r.sibling;if(_!==null){_.return=r.return,xe=_;break}xe=r.return}}var PD=Math.ceil,wc=R.ReactCurrentDispatcher,op=R.ReactCurrentOwner,bn=R.ReactCurrentBatchConfig,Ye=0,Rt=null,wt=null,Dt=0,pn=0,Ks=ao(0),kt=0,la=null,Qo=0,bc=0,sp=0,ca=null,Xt=null,ip=0,Gs=1/0,Dr=null,Sc=!1,ap=null,ho=null,Cc=!1,mo=null,kc=0,ua=0,lp=null,Ec=-1,_c=0;function Ht(){return(Ye&6)!==0?mt():Ec!==-1?Ec:Ec=mt()}function go(t){return(t.mode&1)===0?1:(Ye&2)!==0&&Dt!==0?Dt&-Dt:uD.transition!==null?(_c===0&&(_c=Cy()),_c):(t=et,t!==0||(t=window.event,t=t===void 0?16:Ny(t.type)),t)}function Ln(t,r,a,c){if(50<ua)throw ua=0,lp=null,Error(o(185));Ai(t,a,c),((Ye&2)===0||t!==Rt)&&(t===Rt&&((Ye&2)===0&&(bc|=a),kt===4&&vo(t,Dt)),Jt(t,c),a===1&&Ye===0&&(r.mode&1)===0&&(Gs=mt()+500,ec&&co()))}function Jt(t,r){var a=t.callbackNode;uT(t,r);var c=$l(t,t===Rt?Dt:0);if(c===0)a!==null&&wy(a),t.callbackNode=null,t.callbackPriority=0;else if(r=c&-c,t.callbackPriority!==r){if(a!=null&&wy(a),r===1)t.tag===0?cD(Nw.bind(null,t)):vx(Nw.bind(null,t)),sD(function(){(Ye&6)===0&&co()}),a=null;else{switch(ky(c)){case 1:a=zd;break;case 4:a=by;break;case 16:a=Dl;break;case 536870912:a=Sy;break;default:a=Dl}a=zw(a,Dw.bind(null,t))}t.callbackPriority=r,t.callbackNode=a}}function Dw(t,r){if(Ec=-1,_c=0,(Ye&6)!==0)throw Error(o(327));var a=t.callbackNode;if(Zs()&&t.callbackNode!==a)return null;var c=$l(t,t===Rt?Dt:0);if(c===0)return null;if((c&30)!==0||(c&t.expiredLanes)!==0||r)r=Pc(t,c);else{r=c;var p=Ye;Ye|=2;var g=Aw();(Rt!==t||Dt!==r)&&(Dr=null,Gs=mt()+500,Jo(t,r));do try{TD();break}catch(_){Ow(t,_)}while(!0);_f(),wc.current=g,Ye=p,wt!==null?r=0:(Rt=null,Dt=0,r=kt)}if(r!==0){if(r===2&&(p=Vd(t),p!==0&&(c=p,r=cp(t,p))),r===1)throw a=la,Jo(t,0),vo(t,c),Jt(t,mt()),a;if(r===6)vo(t,c);else{if(p=t.current.alternate,(c&30)===0&&!RD(p)&&(r=Pc(t,c),r===2&&(g=Vd(t),g!==0&&(c=g,r=cp(t,g))),r===1))throw a=la,Jo(t,0),vo(t,c),Jt(t,mt()),a;switch(t.finishedWork=p,t.finishedLanes=c,r){case 0:case 1:throw Error(o(345));case 2:es(t,Xt,Dr);break;case 3:if(vo(t,c),(c&130023424)===c&&(r=ip+500-mt(),10<r)){if($l(t,0)!==0)break;if(p=t.suspendedLanes,(p&c)!==c){Ht(),t.pingedLanes|=t.suspendedLanes&p;break}t.timeoutHandle=mf(es.bind(null,t,Xt,Dr),r);break}es(t,Xt,Dr);break;case 4:if(vo(t,c),(c&4194240)===c)break;for(r=t.eventTimes,p=-1;0<c;){var w=31-Nn(c);g=1<<w,w=r[w],w>p&&(p=w),c&=~g}if(c=p,c=mt()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*PD(c/1960))-c,10<c){t.timeoutHandle=mf(es.bind(null,t,Xt,Dr),c);break}es(t,Xt,Dr);break;case 5:es(t,Xt,Dr);break;default:throw Error(o(329))}}}return Jt(t,mt()),t.callbackNode===a?Dw.bind(null,t):null}function cp(t,r){var a=ca;return t.current.memoizedState.isDehydrated&&(Jo(t,r).flags|=256),t=Pc(t,r),t!==2&&(r=Xt,Xt=a,r!==null&&up(r)),t}function up(t){Xt===null?Xt=t:Xt.push.apply(Xt,t)}function RD(t){for(var r=t;;){if(r.flags&16384){var a=r.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var c=0;c<a.length;c++){var p=a[c],g=p.getSnapshot;p=p.value;try{if(!On(g(),p))return!1}catch{return!1}}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;else{if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function vo(t,r){for(r&=~sp,r&=~bc,t.suspendedLanes|=r,t.pingedLanes&=~r,t=t.expirationTimes;0<r;){var a=31-Nn(r),c=1<<a;t[a]=-1,r&=~c}}function Nw(t){if((Ye&6)!==0)throw Error(o(327));Zs();var r=$l(t,0);if((r&1)===0)return Jt(t,mt()),null;var a=Pc(t,r);if(t.tag!==0&&a===2){var c=Vd(t);c!==0&&(r=c,a=cp(t,c))}if(a===1)throw a=la,Jo(t,0),vo(t,r),Jt(t,mt()),a;if(a===6)throw Error(o(345));return t.finishedWork=t.current.alternate,t.finishedLanes=r,es(t,Xt,Dr),Jt(t,mt()),null}function dp(t,r){var a=Ye;Ye|=1;try{return t(r)}finally{Ye=a,Ye===0&&(Gs=mt()+500,ec&&co())}}function Xo(t){mo!==null&&mo.tag===0&&(Ye&6)===0&&Zs();var r=Ye;Ye|=1;var a=bn.transition,c=et;try{if(bn.transition=null,et=1,t)return t()}finally{et=c,bn.transition=a,Ye=r,(Ye&6)===0&&co()}}function fp(){pn=Ks.current,it(Ks)}function Jo(t,r){t.finishedWork=null,t.finishedLanes=0;var a=t.timeoutHandle;if(a!==-1&&(t.timeoutHandle=-1,oD(a)),wt!==null)for(a=wt.return;a!==null;){var c=a;switch(bf(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&Xl();break;case 3:Bs(),it(qt),it(At),Af();break;case 5:Nf(c);break;case 4:Bs();break;case 13:it(ct);break;case 19:it(ct);break;case 10:Pf(c.type._context);break;case 22:case 23:fp()}a=a.return}if(Rt=t,wt=t=yo(t.current,null),Dt=pn=r,kt=0,la=null,sp=bc=Qo=0,Xt=ca=null,Zo!==null){for(r=0;r<Zo.length;r++)if(a=Zo[r],c=a.interleaved,c!==null){a.interleaved=null;var p=c.next,g=a.pending;if(g!==null){var w=g.next;g.next=p,c.next=w}a.pending=c}Zo=null}return t}function Ow(t,r){do{var a=wt;try{if(_f(),uc.current=hc,dc){for(var c=ut.memoizedState;c!==null;){var p=c.queue;p!==null&&(p.pending=null),c=c.next}dc=!1}if(Yo=0,Pt=Ct=ut=null,na=!1,ra=0,op.current=null,a===null||a.return===null){kt=1,la=r,wt=null;break}e:{var g=t,w=a.return,_=a,A=r;if(r=Dt,_.flags|=32768,A!==null&&typeof A=="object"&&typeof A.then=="function"){var V=A,J=_,ee=J.tag;if((J.mode&1)===0&&(ee===0||ee===11||ee===15)){var X=J.alternate;X?(J.updateQueue=X.updateQueue,J.memoizedState=X.memoizedState,J.lanes=X.lanes):(J.updateQueue=null,J.memoizedState=null)}var he=ow(w);if(he!==null){he.flags&=-257,sw(he,w,_,g,r),he.mode&1&&rw(g,V,r),r=he,A=V;var we=r.updateQueue;if(we===null){var Ce=new Set;Ce.add(A),r.updateQueue=Ce}else we.add(A);break e}else{if((r&1)===0){rw(g,V,r),pp();break e}A=Error(o(426))}}else if(at&&_.mode&1){var gt=ow(w);if(gt!==null){(gt.flags&65536)===0&&(gt.flags|=256),sw(gt,w,_,g,r),kf(Hs(A,_));break e}}g=A=Hs(A,_),kt!==4&&(kt=2),ca===null?ca=[g]:ca.push(g),g=w;do{switch(g.tag){case 3:g.flags|=65536,r&=-r,g.lanes|=r;var F=tw(g,A,r);Rx(g,F);break e;case 1:_=A;var $=g.type,z=g.stateNode;if((g.flags&128)===0&&(typeof $.getDerivedStateFromError=="function"||z!==null&&typeof z.componentDidCatch=="function"&&(ho===null||!ho.has(z)))){g.flags|=65536,r&=-r,g.lanes|=r;var ie=nw(g,_,r);Rx(g,ie);break e}}g=g.return}while(g!==null)}Mw(a)}catch(_e){r=_e,wt===a&&a!==null&&(wt=a=a.return);continue}break}while(!0)}function Aw(){var t=wc.current;return wc.current=hc,t===null?hc:t}function pp(){(kt===0||kt===3||kt===2)&&(kt=4),Rt===null||(Qo&268435455)===0&&(bc&268435455)===0||vo(Rt,Dt)}function Pc(t,r){var a=Ye;Ye|=2;var c=Aw();(Rt!==t||Dt!==r)&&(Dr=null,Jo(t,r));do try{ID();break}catch(p){Ow(t,p)}while(!0);if(_f(),Ye=a,wc.current=c,wt!==null)throw Error(o(261));return Rt=null,Dt=0,kt}function ID(){for(;wt!==null;)$w(wt)}function TD(){for(;wt!==null&&!tT();)$w(wt)}function $w(t){var r=Fw(t.alternate,t,pn);t.memoizedProps=t.pendingProps,r===null?Mw(t):wt=r,op.current=null}function Mw(t){var r=t;do{var a=r.alternate;if(t=r.return,(r.flags&32768)===0){if(a=SD(a,r,pn),a!==null){wt=a;return}}else{if(a=CD(a,r),a!==null){a.flags&=32767,wt=a;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{kt=6,wt=null;return}}if(r=r.sibling,r!==null){wt=r;return}wt=r=t}while(r!==null);kt===0&&(kt=5)}function es(t,r,a){var c=et,p=bn.transition;try{bn.transition=null,et=1,DD(t,r,a,c)}finally{bn.transition=p,et=c}return null}function DD(t,r,a,c){do Zs();while(mo!==null);if((Ye&6)!==0)throw Error(o(327));a=t.finishedWork;var p=t.finishedLanes;if(a===null)return null;if(t.finishedWork=null,t.finishedLanes=0,a===t.current)throw Error(o(177));t.callbackNode=null,t.callbackPriority=0;var g=a.lanes|a.childLanes;if(dT(t,g),t===Rt&&(wt=Rt=null,Dt=0),(a.subtreeFlags&2064)===0&&(a.flags&2064)===0||Cc||(Cc=!0,zw(Dl,function(){return Zs(),null})),g=(a.flags&15990)!==0,(a.subtreeFlags&15990)!==0||g){g=bn.transition,bn.transition=null;var w=et;et=1;var _=Ye;Ye|=4,op.current=null,ED(t,a),_w(a,t),QT(pf),Ll=!!ff,pf=ff=null,t.current=a,_D(a),nT(),Ye=_,et=w,bn.transition=g}else t.current=a;if(Cc&&(Cc=!1,mo=t,kc=p),g=t.pendingLanes,g===0&&(ho=null),sT(a.stateNode),Jt(t,mt()),r!==null)for(c=t.onRecoverableError,a=0;a<r.length;a++)p=r[a],c(p.value,{componentStack:p.stack,digest:p.digest});if(Sc)throw Sc=!1,t=ap,ap=null,t;return(kc&1)!==0&&t.tag!==0&&Zs(),g=t.pendingLanes,(g&1)!==0?t===lp?ua++:(ua=0,lp=t):ua=0,co(),null}function Zs(){if(mo!==null){var t=ky(kc),r=bn.transition,a=et;try{if(bn.transition=null,et=16>t?16:t,mo===null)var c=!1;else{if(t=mo,mo=null,kc=0,(Ye&6)!==0)throw Error(o(331));var p=Ye;for(Ye|=4,xe=t.current;xe!==null;){var g=xe,w=g.child;if((xe.flags&16)!==0){var _=g.deletions;if(_!==null){for(var A=0;A<_.length;A++){var V=_[A];for(xe=V;xe!==null;){var J=xe;switch(J.tag){case 0:case 11:case 15:aa(8,J,g)}var ee=J.child;if(ee!==null)ee.return=J,xe=ee;else for(;xe!==null;){J=xe;var X=J.sibling,he=J.return;if(bw(J),J===V){xe=null;break}if(X!==null){X.return=he,xe=X;break}xe=he}}}var we=g.alternate;if(we!==null){var Ce=we.child;if(Ce!==null){we.child=null;do{var gt=Ce.sibling;Ce.sibling=null,Ce=gt}while(Ce!==null)}}xe=g}}if((g.subtreeFlags&2064)!==0&&w!==null)w.return=g,xe=w;else e:for(;xe!==null;){if(g=xe,(g.flags&2048)!==0)switch(g.tag){case 0:case 11:case 15:aa(9,g,g.return)}var F=g.sibling;if(F!==null){F.return=g.return,xe=F;break e}xe=g.return}}var $=t.current;for(xe=$;xe!==null;){w=xe;var z=w.child;if((w.subtreeFlags&2064)!==0&&z!==null)z.return=w,xe=z;else e:for(w=$;xe!==null;){if(_=xe,(_.flags&2048)!==0)try{switch(_.tag){case 0:case 11:case 15:xc(9,_)}}catch(_e){pt(_,_.return,_e)}if(_===w){xe=null;break e}var ie=_.sibling;if(ie!==null){ie.return=_.return,xe=ie;break e}xe=_.return}}if(Ye=p,co(),Jn&&typeof Jn.onPostCommitFiberRoot=="function")try{Jn.onPostCommitFiberRoot(Nl,t)}catch{}c=!0}return c}finally{et=a,bn.transition=r}}return!1}function jw(t,r,a){r=Hs(a,r),r=tw(t,r,1),t=fo(t,r,1),r=Ht(),t!==null&&(Ai(t,1,r),Jt(t,r))}function pt(t,r,a){if(t.tag===3)jw(t,t,a);else for(;r!==null;){if(r.tag===3){jw(r,t,a);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(ho===null||!ho.has(c))){t=Hs(a,t),t=nw(r,t,1),r=fo(r,t,1),t=Ht(),r!==null&&(Ai(r,1,t),Jt(r,t));break}}r=r.return}}function ND(t,r,a){var c=t.pingCache;c!==null&&c.delete(r),r=Ht(),t.pingedLanes|=t.suspendedLanes&a,Rt===t&&(Dt&a)===a&&(kt===4||kt===3&&(Dt&130023424)===Dt&&500>mt()-ip?Jo(t,0):sp|=a),Jt(t,r)}function Lw(t,r){r===0&&((t.mode&1)===0?r=1:(r=Al,Al<<=1,(Al&130023424)===0&&(Al=4194304)));var a=Ht();t=Rr(t,r),t!==null&&(Ai(t,r,a),Jt(t,a))}function OD(t){var r=t.memoizedState,a=0;r!==null&&(a=r.retryLane),Lw(t,a)}function AD(t,r){var a=0;switch(t.tag){case 13:var c=t.stateNode,p=t.memoizedState;p!==null&&(a=p.retryLane);break;case 19:c=t.stateNode;break;default:throw Error(o(314))}c!==null&&c.delete(r),Lw(t,a)}var Fw;Fw=function(t,r,a){if(t!==null)if(t.memoizedProps!==r.pendingProps||qt.current)Qt=!0;else{if((t.lanes&a)===0&&(r.flags&128)===0)return Qt=!1,bD(t,r,a);Qt=(t.flags&131072)!==0}else Qt=!1,at&&(r.flags&1048576)!==0&&yx(r,nc,r.index);switch(r.lanes=0,r.tag){case 2:var c=r.type;vc(t,r),t=r.pendingProps;var p=Ms(r,At.current);Us(r,a),p=jf(null,r,c,t,p,a);var g=Lf();return r.flags|=1,typeof p=="object"&&p!==null&&typeof p.render=="function"&&p.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,Yt(c)?(g=!0,Jl(r)):g=!1,r.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,Tf(r),p.updater=mc,r.stateNode=p,p._reactInternals=r,Hf(r,c,t,a),r=Zf(null,r,c,!0,g,a)):(r.tag=0,at&&g&&wf(r),Bt(null,r,p,a),r=r.child),r;case 16:c=r.elementType;e:{switch(vc(t,r),t=r.pendingProps,p=c._init,c=p(c._payload),r.type=c,p=r.tag=MD(c),t=$n(c,t),p){case 0:r=Gf(null,r,c,t,a);break e;case 1:r=dw(null,r,c,t,a);break e;case 11:r=iw(null,r,c,t,a);break e;case 14:r=aw(null,r,c,$n(c.type,t),a);break e}throw Error(o(306,c,""))}return r;case 0:return c=r.type,p=r.pendingProps,p=r.elementType===c?p:$n(c,p),Gf(t,r,c,p,a);case 1:return c=r.type,p=r.pendingProps,p=r.elementType===c?p:$n(c,p),dw(t,r,c,p,a);case 3:e:{if(fw(r),t===null)throw Error(o(387));c=r.pendingProps,g=r.memoizedState,p=g.element,Px(t,r),lc(r,c,null,a);var w=r.memoizedState;if(c=w.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:w.cache,pendingSuspenseBoundaries:w.pendingSuspenseBoundaries,transitions:w.transitions},r.updateQueue.baseState=g,r.memoizedState=g,r.flags&256){p=Hs(Error(o(423)),r),r=pw(t,r,c,a,p);break e}else if(c!==p){p=Hs(Error(o(424)),r),r=pw(t,r,c,a,p);break e}else for(fn=io(r.stateNode.containerInfo.firstChild),dn=r,at=!0,An=null,a=Ex(r,null,c,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Fs(),c===p){r=Tr(t,r,a);break e}Bt(t,r,c,a)}r=r.child}return r;case 5:return Tx(r),t===null&&Cf(r),c=r.type,p=r.pendingProps,g=t!==null?t.memoizedProps:null,w=p.children,hf(c,p)?w=null:g!==null&&hf(c,g)&&(r.flags|=32),uw(t,r),Bt(t,r,w,a),r.child;case 6:return t===null&&Cf(r),null;case 13:return hw(t,r,a);case 4:return Df(r,r.stateNode.containerInfo),c=r.pendingProps,t===null?r.child=zs(r,null,c,a):Bt(t,r,c,a),r.child;case 11:return c=r.type,p=r.pendingProps,p=r.elementType===c?p:$n(c,p),iw(t,r,c,p,a);case 7:return Bt(t,r,r.pendingProps,a),r.child;case 8:return Bt(t,r,r.pendingProps.children,a),r.child;case 12:return Bt(t,r,r.pendingProps.children,a),r.child;case 10:e:{if(c=r.type._context,p=r.pendingProps,g=r.memoizedProps,w=p.value,rt(sc,c._currentValue),c._currentValue=w,g!==null)if(On(g.value,w)){if(g.children===p.children&&!qt.current){r=Tr(t,r,a);break e}}else for(g=r.child,g!==null&&(g.return=r);g!==null;){var _=g.dependencies;if(_!==null){w=g.child;for(var A=_.firstContext;A!==null;){if(A.context===c){if(g.tag===1){A=Ir(-1,a&-a),A.tag=2;var V=g.updateQueue;if(V!==null){V=V.shared;var J=V.pending;J===null?A.next=A:(A.next=J.next,J.next=A),V.pending=A}}g.lanes|=a,A=g.alternate,A!==null&&(A.lanes|=a),Rf(g.return,a,r),_.lanes|=a;break}A=A.next}}else if(g.tag===10)w=g.type===r.type?null:g.child;else if(g.tag===18){if(w=g.return,w===null)throw Error(o(341));w.lanes|=a,_=w.alternate,_!==null&&(_.lanes|=a),Rf(w,a,r),w=g.sibling}else w=g.child;if(w!==null)w.return=g;else for(w=g;w!==null;){if(w===r){w=null;break}if(g=w.sibling,g!==null){g.return=w.return,w=g;break}w=w.return}g=w}Bt(t,r,p.children,a),r=r.child}return r;case 9:return p=r.type,c=r.pendingProps.children,Us(r,a),p=xn(p),c=c(p),r.flags|=1,Bt(t,r,c,a),r.child;case 14:return c=r.type,p=$n(c,r.pendingProps),p=$n(c.type,p),aw(t,r,c,p,a);case 15:return lw(t,r,r.type,r.pendingProps,a);case 17:return c=r.type,p=r.pendingProps,p=r.elementType===c?p:$n(c,p),vc(t,r),r.tag=1,Yt(c)?(t=!0,Jl(r)):t=!1,Us(r,a),Jx(r,c,p),Hf(r,c,p,a),Zf(null,r,c,!0,t,a);case 19:return gw(t,r,a);case 22:return cw(t,r,a)}throw Error(o(156,r.tag))};function zw(t,r){return xy(t,r)}function $D(t,r,a,c){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Sn(t,r,a,c){return new $D(t,r,a,c)}function hp(t){return t=t.prototype,!(!t||!t.isReactComponent)}function MD(t){if(typeof t=="function")return hp(t)?1:0;if(t!=null){if(t=t.$$typeof,t===le)return 11;if(t===Se)return 14}return 2}function yo(t,r){var a=t.alternate;return a===null?(a=Sn(t.tag,r,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=r,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&14680064,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,r=t.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a}function Rc(t,r,a,c,p,g){var w=2;if(c=t,typeof t=="function")hp(t)&&(w=1);else if(typeof t=="string")w=5;else e:switch(t){case B:return ts(a.children,p,g,r);case I:w=8,p|=8;break;case K:return t=Sn(12,a,r,p|2),t.elementType=K,t.lanes=g,t;case ce:return t=Sn(13,a,r,p),t.elementType=ce,t.lanes=g,t;case ue:return t=Sn(19,a,r,p),t.elementType=ue,t.lanes=g,t;case ne:return Ic(a,p,g,r);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case ae:w=10;break e;case be:w=9;break e;case le:w=11;break e;case Se:w=14;break e;case q:w=16,c=null;break e}throw Error(o(130,t==null?t:typeof t,""))}return r=Sn(w,a,r,p),r.elementType=t,r.type=c,r.lanes=g,r}function ts(t,r,a,c){return t=Sn(7,t,c,r),t.lanes=a,t}function Ic(t,r,a,c){return t=Sn(22,t,c,r),t.elementType=ne,t.lanes=a,t.stateNode={isHidden:!1},t}function mp(t,r,a){return t=Sn(6,t,null,r),t.lanes=a,t}function gp(t,r,a){return r=Sn(4,t.children!==null?t.children:[],t.key,r),r.lanes=a,r.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},r}function jD(t,r,a,c,p){this.tag=r,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ud(0),this.expirationTimes=Ud(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ud(0),this.identifierPrefix=c,this.onRecoverableError=p,this.mutableSourceEagerHydrationData=null}function vp(t,r,a,c,p,g,w,_,A){return t=new jD(t,r,a,_,A),r===1?(r=1,g===!0&&(r|=8)):r=0,g=Sn(3,null,null,r),t.current=g,g.stateNode=t,g.memoizedState={element:c,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},Tf(g),t}function LD(t,r,a){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:j,key:c==null?null:""+c,children:t,containerInfo:r,implementation:a}}function Vw(t){if(!t)return lo;t=t._reactInternals;e:{if(Bo(t)!==t||t.tag!==1)throw Error(o(170));var r=t;do{switch(r.tag){case 3:r=r.stateNode.context;break e;case 1:if(Yt(r.type)){r=r.stateNode.__reactInternalMemoizedMergedChildContext;break e}}r=r.return}while(r!==null);throw Error(o(171))}if(t.tag===1){var a=t.type;if(Yt(a))return mx(t,a,r)}return r}function Uw(t,r,a,c,p,g,w,_,A){return t=vp(a,c,!0,t,p,g,w,_,A),t.context=Vw(null),a=t.current,c=Ht(),p=go(a),g=Ir(c,p),g.callback=r??null,fo(a,g,p),t.current.lanes=p,Ai(t,p,c),Jt(t,c),t}function Tc(t,r,a,c){var p=r.current,g=Ht(),w=go(p);return a=Vw(a),r.context===null?r.context=a:r.pendingContext=a,r=Ir(g,w),r.payload={element:t},c=c===void 0?null:c,c!==null&&(r.callback=c),t=fo(p,r,w),t!==null&&(Ln(t,p,w,g),ac(t,p,w)),w}function Dc(t){return t=t.current,t.child?(t.child.tag===5,t.child.stateNode):null}function Bw(t,r){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<r?a:r}}function yp(t,r){Bw(t,r),(t=t.alternate)&&Bw(t,r)}function FD(){return null}var Hw=typeof reportError=="function"?reportError:function(t){console.error(t)};function xp(t){this._internalRoot=t}Nc.prototype.render=xp.prototype.render=function(t){var r=this._internalRoot;if(r===null)throw Error(o(409));Tc(t,r,null,null)},Nc.prototype.unmount=xp.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var r=t.containerInfo;Xo(function(){Tc(null,t,null,null)}),r[kr]=null}};function Nc(t){this._internalRoot=t}Nc.prototype.unstable_scheduleHydration=function(t){if(t){var r=Py();t={blockedOn:null,target:t,priority:r};for(var a=0;a<ro.length&&r!==0&&r<ro[a].priority;a++);ro.splice(a,0,t),a===0&&Ty(t)}};function wp(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Oc(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function Ww(){}function zD(t,r,a,c,p){if(p){if(typeof c=="function"){var g=c;c=function(){var V=Dc(w);g.call(V)}}var w=Uw(r,c,t,0,null,!1,!1,"",Ww);return t._reactRootContainer=w,t[kr]=w.current,Zi(t.nodeType===8?t.parentNode:t),Xo(),w}for(;p=t.lastChild;)t.removeChild(p);if(typeof c=="function"){var _=c;c=function(){var V=Dc(A);_.call(V)}}var A=vp(t,0,!1,null,null,!1,!1,"",Ww);return t._reactRootContainer=A,t[kr]=A.current,Zi(t.nodeType===8?t.parentNode:t),Xo(function(){Tc(r,A,a,c)}),A}function Ac(t,r,a,c,p){var g=a._reactRootContainer;if(g){var w=g;if(typeof p=="function"){var _=p;p=function(){var A=Dc(w);_.call(A)}}Tc(r,w,t,p)}else w=zD(a,r,t,p,c);return Dc(w)}Ey=function(t){switch(t.tag){case 3:var r=t.stateNode;if(r.current.memoizedState.isDehydrated){var a=Oi(r.pendingLanes);a!==0&&(Bd(r,a|1),Jt(r,mt()),(Ye&6)===0&&(Gs=mt()+500,co()))}break;case 13:Xo(function(){var c=Rr(t,1);if(c!==null){var p=Ht();Ln(c,t,1,p)}}),yp(t,1)}},Hd=function(t){if(t.tag===13){var r=Rr(t,134217728);if(r!==null){var a=Ht();Ln(r,t,134217728,a)}yp(t,134217728)}},_y=function(t){if(t.tag===13){var r=go(t),a=Rr(t,r);if(a!==null){var c=Ht();Ln(a,t,r,c)}yp(t,r)}},Py=function(){return et},Ry=function(t,r){var a=et;try{return et=t,r()}finally{et=a}},Ri=function(t,r,a){switch(r){case"input":if(Rn(t,a),r=a.name,a.type==="radio"&&r!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),r=0;r<a.length;r++){var c=a[r];if(c!==t&&c.form===t.form){var p=Ql(c);if(!p)throw Error(o(90));je(c),Rn(c,p)}}}break;case"textarea":zo(t,a);break;case"select":r=a.value,r!=null&&In(t,!!a.multiple,r,!1)}},Di=dp,G=Xo;var VD={usingClientEntryPoint:!1,Events:[Qi,As,Ql,Tl,Ti,dp]},da={findFiberByHostInstance:Ho,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},UD={bundleType:da.bundleType,version:da.version,rendererPackageName:da.rendererPackageName,rendererConfig:da.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:R.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=vy(t),t===null?null:t.stateNode},findFiberByHostInstance:da.findFiberByHostInstance||FD,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var $c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!$c.isDisabled&&$c.supportsFiber)try{Nl=$c.inject(UD),Jn=$c}catch{}}return Wt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=VD,Wt.createPortal=function(t,r){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wp(r))throw Error(o(200));return LD(t,r,null,a)},Wt.createRoot=function(t,r){if(!wp(t))throw Error(o(299));var a=!1,c="",p=Hw;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onRecoverableError!==void 0&&(p=r.onRecoverableError)),r=vp(t,1,!1,null,null,a,!1,c,p),t[kr]=r.current,Zi(t.nodeType===8?t.parentNode:t),new xp(r)},Wt.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var r=t._reactInternals;if(r===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=vy(r),t=t===null?null:t.stateNode,t},Wt.flushSync=function(t){return Xo(t)},Wt.hydrate=function(t,r,a){if(!Oc(r))throw Error(o(200));return Ac(null,t,r,!0,a)},Wt.hydrateRoot=function(t,r,a){if(!wp(t))throw Error(o(405));var c=a!=null&&a.hydratedSources||null,p=!1,g="",w=Hw;if(a!=null&&(a.unstable_strictMode===!0&&(p=!0),a.identifierPrefix!==void 0&&(g=a.identifierPrefix),a.onRecoverableError!==void 0&&(w=a.onRecoverableError)),r=Uw(r,null,t,1,a??null,p,!1,g,w),t[kr]=r.current,Zi(t),c)for(t=0;t<c.length;t++)a=c[t],p=a._getVersion,p=p(a._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[a,p]:r.mutableSourceEagerHydrationData.push(a,p);return new Nc(r)},Wt.render=function(t,r,a){if(!Oc(r))throw Error(o(200));return Ac(null,t,r,!1,a)},Wt.unmountComponentAtNode=function(t){if(!Oc(t))throw Error(o(40));return t._reactRootContainer?(Xo(function(){Ac(null,null,t,!1,function(){t._reactRootContainer=null,t[kr]=null})}),!0):!1},Wt.unstable_batchedUpdates=dp,Wt.unstable_renderSubtreeIntoContainer=function(t,r,a,c){if(!Oc(a))throw Error(o(200));if(t==null||t._reactInternals===void 0)throw Error(o(38));return Ac(t,r,a,!1,c)},Wt.version="18.3.1-next-f1338f8080-20240426",Wt}var _p;function Pp(){if(_p)return Lc.exports;_p=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),Lc.exports=Qw(),Lc.exports}var Rp;function Xw(){if(Rp)return fa;Rp=1;var n=Pp();return fa.createRoot=n.createRoot,fa.hydrateRoot=n.hydrateRoot,fa}var Jw=Xw(),Ze;(function(n){n.assertEqual=i=>{};function e(i){}n.assertIs=e;function o(i){throw new Error}n.assertNever=o,n.arrayToEnum=i=>{const l={};for(const u of i)l[u]=u;return l},n.getValidEnumValues=i=>{const l=n.objectKeys(i).filter(d=>typeof i[i[d]]!="number"),u={};for(const d of l)u[d]=i[d];return n.objectValues(u)},n.objectValues=i=>n.objectKeys(i).map(function(l){return i[l]}),n.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const l=[];for(const u in i)Object.prototype.hasOwnProperty.call(i,u)&&l.push(u);return l},n.find=(i,l)=>{for(const u of i)if(l(u))return u},n.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&Number.isFinite(i)&&Math.floor(i)===i;function s(i,l=" | "){return i.map(u=>typeof u=="string"?`'${u}'`:u).join(l)}n.joinValues=s,n.jsonStringifyReplacer=(i,l)=>typeof l=="bigint"?l.toString():l})(Ze||(Ze={}));var Ip;(function(n){n.mergeShapes=(e,o)=>({...e,...o})})(Ip||(Ip={}));const ve=Ze.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Nr=n=>{switch(typeof n){case"undefined":return ve.undefined;case"string":return ve.string;case"number":return Number.isNaN(n)?ve.nan:ve.number;case"boolean":return ve.boolean;case"function":return ve.function;case"bigint":return ve.bigint;case"symbol":return ve.symbol;case"object":return Array.isArray(n)?ve.array:n===null?ve.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?ve.promise:typeof Map<"u"&&n instanceof Map?ve.map:typeof Set<"u"&&n instanceof Set?ve.set:typeof Date<"u"&&n instanceof Date?ve.date:ve.object;default:return ve.unknown}},oe=Ze.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class or extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=s=>{this.issues=[...this.issues,s]},this.addIssues=(s=[])=>{this.issues=[...this.issues,...s]};const o=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,o):this.__proto__=o,this.name="ZodError",this.issues=e}format(e){const o=e||function(l){return l.message},s={_errors:[]},i=l=>{for(const u of l.issues)if(u.code==="invalid_union")u.unionErrors.map(i);else if(u.code==="invalid_return_type")i(u.returnTypeError);else if(u.code==="invalid_arguments")i(u.argumentsError);else if(u.path.length===0)s._errors.push(o(u));else{let d=s,h=0;for(;h<u.path.length;){const m=u.path[h];h===u.path.length-1?(d[m]=d[m]||{_errors:[]},d[m]._errors.push(o(u))):d[m]=d[m]||{_errors:[]},d=d[m],h++}}};return i(this),s}static assert(e){if(!(e instanceof or))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ze.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=o=>o.message){const o={},s=[];for(const i of this.issues)i.path.length>0?(o[i.path[0]]=o[i.path[0]]||[],o[i.path[0]].push(e(i))):s.push(e(i));return{formErrors:s,fieldErrors:o}}get formErrors(){return this.flatten()}}or.create=n=>new or(n);const Vc=(n,e)=>{let o;switch(n.code){case oe.invalid_type:n.received===ve.undefined?o="Required":o=`Expected ${n.expected}, received ${n.received}`;break;case oe.invalid_literal:o=`Invalid literal value, expected ${JSON.stringify(n.expected,Ze.jsonStringifyReplacer)}`;break;case oe.unrecognized_keys:o=`Unrecognized key(s) in object: ${Ze.joinValues(n.keys,", ")}`;break;case oe.invalid_union:o="Invalid input";break;case oe.invalid_union_discriminator:o=`Invalid discriminator value. Expected ${Ze.joinValues(n.options)}`;break;case oe.invalid_enum_value:o=`Invalid enum value. Expected ${Ze.joinValues(n.options)}, received '${n.received}'`;break;case oe.invalid_arguments:o="Invalid function arguments";break;case oe.invalid_return_type:o="Invalid function return type";break;case oe.invalid_date:o="Invalid date";break;case oe.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(o=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(o=`${o} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?o=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?o=`Invalid input: must end with "${n.validation.endsWith}"`:Ze.assertNever(n.validation):n.validation!=="regex"?o=`Invalid ${n.validation}`:o="Invalid";break;case oe.too_small:n.type==="array"?o=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?o=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?o=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?o=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:o="Invalid input";break;case oe.too_big:n.type==="array"?o=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?o=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?o=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?o=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?o=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:o="Invalid input";break;case oe.custom:o="Invalid input";break;case oe.invalid_intersection_types:o="Intersection results could not be merged";break;case oe.not_multiple_of:o=`Number must be a multiple of ${n.multipleOf}`;break;case oe.not_finite:o="Number must be finite";break;default:o=e.defaultError,Ze.assertNever(n)}return{message:o}};let e0=Vc;function t0(){return e0}const n0=n=>{const{data:e,path:o,errorMaps:s,issueData:i}=n,l=[...o,...i.path||[]],u={...i,path:l};if(i.message!==void 0)return{...i,path:l,message:i.message};let d="";const h=s.filter(m=>!!m).slice().reverse();for(const m of h)d=m(u,{data:e,defaultError:d}).message;return{...i,path:l,message:d}};function fe(n,e){const o=t0(),s=n0({issueData:e,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,o,o===Vc?void 0:Vc].filter(i=>!!i)});n.common.issues.push(s)}class Lt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,o){const s=[];for(const i of o){if(i.status==="aborted")return Ie;i.status==="dirty"&&e.dirty(),s.push(i.value)}return{status:e.value,value:s}}static async mergeObjectAsync(e,o){const s=[];for(const i of o){const l=await i.key,u=await i.value;s.push({key:l,value:u})}return Lt.mergeObjectSync(e,s)}static mergeObjectSync(e,o){const s={};for(const i of o){const{key:l,value:u}=i;if(l.status==="aborted"||u.status==="aborted")return Ie;l.status==="dirty"&&e.dirty(),u.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof u.value<"u"||i.alwaysSet)&&(s[l.value]=u.value)}return{status:e.value,value:s}}}const Ie=Object.freeze({status:"aborted"}),qs=n=>({status:"dirty",value:n}),hn=n=>({status:"valid",value:n}),Tp=n=>n.status==="aborted",Dp=n=>n.status==="dirty",rs=n=>n.status==="valid",pa=n=>typeof Promise<"u"&&n instanceof Promise;var ke;(function(n){n.errToObj=e=>typeof e=="string"?{message:e}:e||{},n.toString=e=>typeof e=="string"?e:e?.message})(ke||(ke={}));class Fn{constructor(e,o,s,i){this._cachedPath=[],this.parent=e,this.data=o,this._path=s,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Np=(n,e)=>{if(rs(e))return{success:!0,data:e.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const o=new or(n.common.issues);return this._error=o,this._error}}};function Me(n){if(!n)return{};const{errorMap:e,invalid_type_error:o,required_error:s,description:i}=n;if(e&&(o||s))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(u,d)=>{const{message:h}=n;return u.code==="invalid_enum_value"?{message:h??d.defaultError}:typeof d.data>"u"?{message:h??s??d.defaultError}:u.code!=="invalid_type"?{message:d.defaultError}:{message:h??o??d.defaultError}},description:i}}class He{get description(){return this._def.description}_getType(e){return Nr(e.data)}_getOrReturnCtx(e,o){return o||{common:e.parent.common,data:e.data,parsedType:Nr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Lt,ctx:{common:e.parent.common,data:e.data,parsedType:Nr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const o=this._parse(e);if(pa(o))throw new Error("Synchronous parse encountered promise.");return o}_parseAsync(e){const o=this._parse(e);return Promise.resolve(o)}parse(e,o){const s=this.safeParse(e,o);if(s.success)return s.data;throw s.error}safeParse(e,o){const s={common:{issues:[],async:o?.async??!1,contextualErrorMap:o?.errorMap},path:o?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Nr(e)},i=this._parseSync({data:e,path:s.path,parent:s});return Np(s,i)}"~validate"(e){const o={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Nr(e)};if(!this["~standard"].async)try{const s=this._parseSync({data:e,path:[],parent:o});return rs(s)?{value:s.value}:{issues:o.common.issues}}catch(s){s?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),o.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:o}).then(s=>rs(s)?{value:s.value}:{issues:o.common.issues})}async parseAsync(e,o){const s=await this.safeParseAsync(e,o);if(s.success)return s.data;throw s.error}async safeParseAsync(e,o){const s={common:{issues:[],contextualErrorMap:o?.errorMap,async:!0},path:o?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Nr(e)},i=this._parse({data:e,path:s.path,parent:s}),l=await(pa(i)?i:Promise.resolve(i));return Np(s,l)}refine(e,o){const s=i=>typeof o=="string"||typeof o>"u"?{message:o}:typeof o=="function"?o(i):o;return this._refinement((i,l)=>{const u=e(i),d=()=>l.addIssue({code:oe.custom,...s(i)});return typeof Promise<"u"&&u instanceof Promise?u.then(h=>h?!0:(d(),!1)):u?!0:(d(),!1)})}refinement(e,o){return this._refinement((s,i)=>e(s)?!0:(i.addIssue(typeof o=="function"?o(s,i):o),!1))}_refinement(e){return new Co({schema:this,typeName:Te.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:o=>this["~validate"](o)}}optional(){return ar.create(this,this._def)}nullable(){return ko.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return zn.create(this)}promise(){return ba.create(this,this._def)}or(e){return ga.create([this,e],this._def)}and(e){return va.create(this,e,this._def)}transform(e){return new Co({...Me(this._def),schema:this,typeName:Te.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const o=typeof e=="function"?e:()=>e;return new Sa({...Me(this._def),innerType:this,defaultValue:o,typeName:Te.ZodDefault})}brand(){return new Vp({typeName:Te.ZodBranded,type:this,...Me(this._def)})}catch(e){const o=typeof e=="function"?e:()=>e;return new Ca({...Me(this._def),innerType:this,catchValue:o,typeName:Te.ZodCatch})}describe(e){const o=this.constructor;return new o({...this._def,description:e})}pipe(e){return qc.create(this,e)}readonly(){return ka.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const r0=/^c[^\s-]{8,}$/i,o0=/^[0-9a-z]+$/,s0=/^[0-9A-HJKMNP-TV-Z]{26}$/i,i0=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,a0=/^[a-z0-9_-]{21}$/i,l0=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,c0=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,u0=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,d0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Uc;const f0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,p0=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,h0=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,m0=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,g0=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,v0=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Op="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",y0=new RegExp(`^${Op}$`);function Ap(n){let e="[0-5]\\d";n.precision?e=`${e}\\.\\d{${n.precision}}`:n.precision==null&&(e=`${e}(\\.\\d+)?`);const o=n.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${o}`}function x0(n){return new RegExp(`^${Ap(n)}$`)}function w0(n){let e=`${Op}T${Ap(n)}`;const o=[];return o.push(n.local?"Z?":"Z"),n.offset&&o.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${o.join("|")})`,new RegExp(`^${e}$`)}function b0(n,e){return!!((e==="v4"||!e)&&f0.test(n)||(e==="v6"||!e)&&h0.test(n))}function S0(n,e){if(!l0.test(n))return!1;try{const[o]=n.split("."),s=o.replace(/-/g,"+").replace(/_/g,"/").padEnd(o.length+(4-o.length%4)%4,"="),i=JSON.parse(atob(s));return!(typeof i!="object"||i===null||"typ"in i&&i?.typ!=="JWT"||!i.alg||e&&i.alg!==e)}catch{return!1}}function C0(n,e){return!!((e==="v4"||!e)&&p0.test(n)||(e==="v6"||!e)&&m0.test(n))}class sr extends He{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ve.string){const l=this._getOrReturnCtx(e);return fe(l,{code:oe.invalid_type,expected:ve.string,received:l.parsedType}),Ie}const s=new Lt;let i;for(const l of this._def.checks)if(l.kind==="min")e.data.length<l.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:oe.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),s.dirty());else if(l.kind==="max")e.data.length>l.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:oe.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),s.dirty());else if(l.kind==="length"){const u=e.data.length>l.value,d=e.data.length<l.value;(u||d)&&(i=this._getOrReturnCtx(e,i),u?fe(i,{code:oe.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):d&&fe(i,{code:oe.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),s.dirty())}else if(l.kind==="email")u0.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"email",code:oe.invalid_string,message:l.message}),s.dirty());else if(l.kind==="emoji")Uc||(Uc=new RegExp(d0,"u")),Uc.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"emoji",code:oe.invalid_string,message:l.message}),s.dirty());else if(l.kind==="uuid")i0.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"uuid",code:oe.invalid_string,message:l.message}),s.dirty());else if(l.kind==="nanoid")a0.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"nanoid",code:oe.invalid_string,message:l.message}),s.dirty());else if(l.kind==="cuid")r0.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"cuid",code:oe.invalid_string,message:l.message}),s.dirty());else if(l.kind==="cuid2")o0.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"cuid2",code:oe.invalid_string,message:l.message}),s.dirty());else if(l.kind==="ulid")s0.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"ulid",code:oe.invalid_string,message:l.message}),s.dirty());else if(l.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),fe(i,{validation:"url",code:oe.invalid_string,message:l.message}),s.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"regex",code:oe.invalid_string,message:l.message}),s.dirty())):l.kind==="trim"?e.data=e.data.trim():l.kind==="includes"?e.data.includes(l.value,l.position)||(i=this._getOrReturnCtx(e,i),fe(i,{code:oe.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),s.dirty()):l.kind==="toLowerCase"?e.data=e.data.toLowerCase():l.kind==="toUpperCase"?e.data=e.data.toUpperCase():l.kind==="startsWith"?e.data.startsWith(l.value)||(i=this._getOrReturnCtx(e,i),fe(i,{code:oe.invalid_string,validation:{startsWith:l.value},message:l.message}),s.dirty()):l.kind==="endsWith"?e.data.endsWith(l.value)||(i=this._getOrReturnCtx(e,i),fe(i,{code:oe.invalid_string,validation:{endsWith:l.value},message:l.message}),s.dirty()):l.kind==="datetime"?w0(l).test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{code:oe.invalid_string,validation:"datetime",message:l.message}),s.dirty()):l.kind==="date"?y0.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{code:oe.invalid_string,validation:"date",message:l.message}),s.dirty()):l.kind==="time"?x0(l).test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{code:oe.invalid_string,validation:"time",message:l.message}),s.dirty()):l.kind==="duration"?c0.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"duration",code:oe.invalid_string,message:l.message}),s.dirty()):l.kind==="ip"?b0(e.data,l.version)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"ip",code:oe.invalid_string,message:l.message}),s.dirty()):l.kind==="jwt"?S0(e.data,l.alg)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"jwt",code:oe.invalid_string,message:l.message}),s.dirty()):l.kind==="cidr"?C0(e.data,l.version)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"cidr",code:oe.invalid_string,message:l.message}),s.dirty()):l.kind==="base64"?g0.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"base64",code:oe.invalid_string,message:l.message}),s.dirty()):l.kind==="base64url"?v0.test(e.data)||(i=this._getOrReturnCtx(e,i),fe(i,{validation:"base64url",code:oe.invalid_string,message:l.message}),s.dirty()):Ze.assertNever(l);return{status:s.value,value:e.data}}_regex(e,o,s){return this.refinement(i=>e.test(i),{validation:o,code:oe.invalid_string,...ke.errToObj(s)})}_addCheck(e){return new sr({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...ke.errToObj(e)})}url(e){return this._addCheck({kind:"url",...ke.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...ke.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...ke.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...ke.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...ke.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...ke.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...ke.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...ke.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...ke.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...ke.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...ke.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...ke.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...ke.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...ke.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...ke.errToObj(e)})}regex(e,o){return this._addCheck({kind:"regex",regex:e,...ke.errToObj(o)})}includes(e,o){return this._addCheck({kind:"includes",value:e,position:o?.position,...ke.errToObj(o?.message)})}startsWith(e,o){return this._addCheck({kind:"startsWith",value:e,...ke.errToObj(o)})}endsWith(e,o){return this._addCheck({kind:"endsWith",value:e,...ke.errToObj(o)})}min(e,o){return this._addCheck({kind:"min",value:e,...ke.errToObj(o)})}max(e,o){return this._addCheck({kind:"max",value:e,...ke.errToObj(o)})}length(e,o){return this._addCheck({kind:"length",value:e,...ke.errToObj(o)})}nonempty(e){return this.min(1,ke.errToObj(e))}trim(){return new sr({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new sr({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new sr({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const o of this._def.checks)o.kind==="min"&&(e===null||o.value>e)&&(e=o.value);return e}get maxLength(){let e=null;for(const o of this._def.checks)o.kind==="max"&&(e===null||o.value<e)&&(e=o.value);return e}}sr.create=n=>new sr({checks:[],typeName:Te.ZodString,coerce:n?.coerce??!1,...Me(n)});function k0(n,e){const o=(n.toString().split(".")[1]||"").length,s=(e.toString().split(".")[1]||"").length,i=o>s?o:s,l=Number.parseInt(n.toFixed(i).replace(".","")),u=Number.parseInt(e.toFixed(i).replace(".",""));return l%u/10**i}class os extends He{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ve.number){const l=this._getOrReturnCtx(e);return fe(l,{code:oe.invalid_type,expected:ve.number,received:l.parsedType}),Ie}let s;const i=new Lt;for(const l of this._def.checks)l.kind==="int"?Ze.isInteger(e.data)||(s=this._getOrReturnCtx(e,s),fe(s,{code:oe.invalid_type,expected:"integer",received:"float",message:l.message}),i.dirty()):l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(s=this._getOrReturnCtx(e,s),fe(s,{code:oe.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),i.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(s=this._getOrReturnCtx(e,s),fe(s,{code:oe.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),i.dirty()):l.kind==="multipleOf"?k0(e.data,l.value)!==0&&(s=this._getOrReturnCtx(e,s),fe(s,{code:oe.not_multiple_of,multipleOf:l.value,message:l.message}),i.dirty()):l.kind==="finite"?Number.isFinite(e.data)||(s=this._getOrReturnCtx(e,s),fe(s,{code:oe.not_finite,message:l.message}),i.dirty()):Ze.assertNever(l);return{status:i.value,value:e.data}}gte(e,o){return this.setLimit("min",e,!0,ke.toString(o))}gt(e,o){return this.setLimit("min",e,!1,ke.toString(o))}lte(e,o){return this.setLimit("max",e,!0,ke.toString(o))}lt(e,o){return this.setLimit("max",e,!1,ke.toString(o))}setLimit(e,o,s,i){return new os({...this._def,checks:[...this._def.checks,{kind:e,value:o,inclusive:s,message:ke.toString(i)}]})}_addCheck(e){return new os({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:ke.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ke.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ke.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ke.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ke.toString(e)})}multipleOf(e,o){return this._addCheck({kind:"multipleOf",value:e,message:ke.toString(o)})}finite(e){return this._addCheck({kind:"finite",message:ke.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ke.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ke.toString(e)})}get minValue(){let e=null;for(const o of this._def.checks)o.kind==="min"&&(e===null||o.value>e)&&(e=o.value);return e}get maxValue(){let e=null;for(const o of this._def.checks)o.kind==="max"&&(e===null||o.value<e)&&(e=o.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ze.isInteger(e.value))}get isFinite(){let e=null,o=null;for(const s of this._def.checks){if(s.kind==="finite"||s.kind==="int"||s.kind==="multipleOf")return!0;s.kind==="min"?(o===null||s.value>o)&&(o=s.value):s.kind==="max"&&(e===null||s.value<e)&&(e=s.value)}return Number.isFinite(o)&&Number.isFinite(e)}}os.create=n=>new os({checks:[],typeName:Te.ZodNumber,coerce:n?.coerce||!1,...Me(n)});class Ys extends He{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==ve.bigint)return this._getInvalidInput(e);let s;const i=new Lt;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(s=this._getOrReturnCtx(e,s),fe(s,{code:oe.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),i.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(s=this._getOrReturnCtx(e,s),fe(s,{code:oe.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),i.dirty()):l.kind==="multipleOf"?e.data%l.value!==BigInt(0)&&(s=this._getOrReturnCtx(e,s),fe(s,{code:oe.not_multiple_of,multipleOf:l.value,message:l.message}),i.dirty()):Ze.assertNever(l);return{status:i.value,value:e.data}}_getInvalidInput(e){const o=this._getOrReturnCtx(e);return fe(o,{code:oe.invalid_type,expected:ve.bigint,received:o.parsedType}),Ie}gte(e,o){return this.setLimit("min",e,!0,ke.toString(o))}gt(e,o){return this.setLimit("min",e,!1,ke.toString(o))}lte(e,o){return this.setLimit("max",e,!0,ke.toString(o))}lt(e,o){return this.setLimit("max",e,!1,ke.toString(o))}setLimit(e,o,s,i){return new Ys({...this._def,checks:[...this._def.checks,{kind:e,value:o,inclusive:s,message:ke.toString(i)}]})}_addCheck(e){return new Ys({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ke.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ke.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ke.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ke.toString(e)})}multipleOf(e,o){return this._addCheck({kind:"multipleOf",value:e,message:ke.toString(o)})}get minValue(){let e=null;for(const o of this._def.checks)o.kind==="min"&&(e===null||o.value>e)&&(e=o.value);return e}get maxValue(){let e=null;for(const o of this._def.checks)o.kind==="max"&&(e===null||o.value<e)&&(e=o.value);return e}}Ys.create=n=>new Ys({checks:[],typeName:Te.ZodBigInt,coerce:n?.coerce??!1,...Me(n)});class Bc extends He{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ve.boolean){const s=this._getOrReturnCtx(e);return fe(s,{code:oe.invalid_type,expected:ve.boolean,received:s.parsedType}),Ie}return hn(e.data)}}Bc.create=n=>new Bc({typeName:Te.ZodBoolean,coerce:n?.coerce||!1,...Me(n)});class ha extends He{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ve.date){const l=this._getOrReturnCtx(e);return fe(l,{code:oe.invalid_type,expected:ve.date,received:l.parsedType}),Ie}if(Number.isNaN(e.data.getTime())){const l=this._getOrReturnCtx(e);return fe(l,{code:oe.invalid_date}),Ie}const s=new Lt;let i;for(const l of this._def.checks)l.kind==="min"?e.data.getTime()<l.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:oe.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),s.dirty()):l.kind==="max"?e.data.getTime()>l.value&&(i=this._getOrReturnCtx(e,i),fe(i,{code:oe.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),s.dirty()):Ze.assertNever(l);return{status:s.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ha({...this._def,checks:[...this._def.checks,e]})}min(e,o){return this._addCheck({kind:"min",value:e.getTime(),message:ke.toString(o)})}max(e,o){return this._addCheck({kind:"max",value:e.getTime(),message:ke.toString(o)})}get minDate(){let e=null;for(const o of this._def.checks)o.kind==="min"&&(e===null||o.value>e)&&(e=o.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const o of this._def.checks)o.kind==="max"&&(e===null||o.value<e)&&(e=o.value);return e!=null?new Date(e):null}}ha.create=n=>new ha({checks:[],coerce:n?.coerce||!1,typeName:Te.ZodDate,...Me(n)});class $p extends He{_parse(e){if(this._getType(e)!==ve.symbol){const s=this._getOrReturnCtx(e);return fe(s,{code:oe.invalid_type,expected:ve.symbol,received:s.parsedType}),Ie}return hn(e.data)}}$p.create=n=>new $p({typeName:Te.ZodSymbol,...Me(n)});class Hc extends He{_parse(e){if(this._getType(e)!==ve.undefined){const s=this._getOrReturnCtx(e);return fe(s,{code:oe.invalid_type,expected:ve.undefined,received:s.parsedType}),Ie}return hn(e.data)}}Hc.create=n=>new Hc({typeName:Te.ZodUndefined,...Me(n)});class ma extends He{_parse(e){if(this._getType(e)!==ve.null){const s=this._getOrReturnCtx(e);return fe(s,{code:oe.invalid_type,expected:ve.null,received:s.parsedType}),Ie}return hn(e.data)}}ma.create=n=>new ma({typeName:Te.ZodNull,...Me(n)});class Mp extends He{constructor(){super(...arguments),this._any=!0}_parse(e){return hn(e.data)}}Mp.create=n=>new Mp({typeName:Te.ZodAny,...Me(n)});class Wc extends He{constructor(){super(...arguments),this._unknown=!0}_parse(e){return hn(e.data)}}Wc.create=n=>new Wc({typeName:Te.ZodUnknown,...Me(n)});class Or extends He{_parse(e){const o=this._getOrReturnCtx(e);return fe(o,{code:oe.invalid_type,expected:ve.never,received:o.parsedType}),Ie}}Or.create=n=>new Or({typeName:Te.ZodNever,...Me(n)});class jp extends He{_parse(e){if(this._getType(e)!==ve.undefined){const s=this._getOrReturnCtx(e);return fe(s,{code:oe.invalid_type,expected:ve.void,received:s.parsedType}),Ie}return hn(e.data)}}jp.create=n=>new jp({typeName:Te.ZodVoid,...Me(n)});class zn extends He{_parse(e){const{ctx:o,status:s}=this._processInputParams(e),i=this._def;if(o.parsedType!==ve.array)return fe(o,{code:oe.invalid_type,expected:ve.array,received:o.parsedType}),Ie;if(i.exactLength!==null){const u=o.data.length>i.exactLength.value,d=o.data.length<i.exactLength.value;(u||d)&&(fe(o,{code:u?oe.too_big:oe.too_small,minimum:d?i.exactLength.value:void 0,maximum:u?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),s.dirty())}if(i.minLength!==null&&o.data.length<i.minLength.value&&(fe(o,{code:oe.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),s.dirty()),i.maxLength!==null&&o.data.length>i.maxLength.value&&(fe(o,{code:oe.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),s.dirty()),o.common.async)return Promise.all([...o.data].map((u,d)=>i.type._parseAsync(new Fn(o,u,o.path,d)))).then(u=>Lt.mergeArray(s,u));const l=[...o.data].map((u,d)=>i.type._parseSync(new Fn(o,u,o.path,d)));return Lt.mergeArray(s,l)}get element(){return this._def.type}min(e,o){return new zn({...this._def,minLength:{value:e,message:ke.toString(o)}})}max(e,o){return new zn({...this._def,maxLength:{value:e,message:ke.toString(o)}})}length(e,o){return new zn({...this._def,exactLength:{value:e,message:ke.toString(o)}})}nonempty(e){return this.min(1,e)}}zn.create=(n,e)=>new zn({type:n,minLength:null,maxLength:null,exactLength:null,typeName:Te.ZodArray,...Me(e)});function ss(n){if(n instanceof vt){const e={};for(const o in n.shape){const s=n.shape[o];e[o]=ar.create(ss(s))}return new vt({...n._def,shape:()=>e})}else return n instanceof zn?new zn({...n._def,type:ss(n.element)}):n instanceof ar?ar.create(ss(n.unwrap())):n instanceof ko?ko.create(ss(n.unwrap())):n instanceof bo?bo.create(n.items.map(e=>ss(e))):n}class vt extends He{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),o=Ze.objectKeys(e);return this._cached={shape:e,keys:o},this._cached}_parse(e){if(this._getType(e)!==ve.object){const m=this._getOrReturnCtx(e);return fe(m,{code:oe.invalid_type,expected:ve.object,received:m.parsedType}),Ie}const{status:s,ctx:i}=this._processInputParams(e),{shape:l,keys:u}=this._getCached(),d=[];if(!(this._def.catchall instanceof Or&&this._def.unknownKeys==="strip"))for(const m in i.data)u.includes(m)||d.push(m);const h=[];for(const m of u){const y=l[m],v=i.data[m];h.push({key:{status:"valid",value:m},value:y._parse(new Fn(i,v,i.path,m)),alwaysSet:m in i.data})}if(this._def.catchall instanceof Or){const m=this._def.unknownKeys;if(m==="passthrough")for(const y of d)h.push({key:{status:"valid",value:y},value:{status:"valid",value:i.data[y]}});else if(m==="strict")d.length>0&&(fe(i,{code:oe.unrecognized_keys,keys:d}),s.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const m=this._def.catchall;for(const y of d){const v=i.data[y];h.push({key:{status:"valid",value:y},value:m._parse(new Fn(i,v,i.path,y)),alwaysSet:y in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const m=[];for(const y of h){const v=await y.key,x=await y.value;m.push({key:v,value:x,alwaysSet:y.alwaysSet})}return m}).then(m=>Lt.mergeObjectSync(s,m)):Lt.mergeObjectSync(s,h)}get shape(){return this._def.shape()}strict(e){return ke.errToObj,new vt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(o,s)=>{const i=this._def.errorMap?.(o,s).message??s.defaultError;return o.code==="unrecognized_keys"?{message:ke.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new vt({...this._def,unknownKeys:"strip"})}passthrough(){return new vt({...this._def,unknownKeys:"passthrough"})}extend(e){return new vt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new vt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Te.ZodObject})}setKey(e,o){return this.augment({[e]:o})}catchall(e){return new vt({...this._def,catchall:e})}pick(e){const o={};for(const s of Ze.objectKeys(e))e[s]&&this.shape[s]&&(o[s]=this.shape[s]);return new vt({...this._def,shape:()=>o})}omit(e){const o={};for(const s of Ze.objectKeys(this.shape))e[s]||(o[s]=this.shape[s]);return new vt({...this._def,shape:()=>o})}deepPartial(){return ss(this)}partial(e){const o={};for(const s of Ze.objectKeys(this.shape)){const i=this.shape[s];e&&!e[s]?o[s]=i:o[s]=i.optional()}return new vt({...this._def,shape:()=>o})}required(e){const o={};for(const s of Ze.objectKeys(this.shape))if(e&&!e[s])o[s]=this.shape[s];else{let l=this.shape[s];for(;l instanceof ar;)l=l._def.innerType;o[s]=l}return new vt({...this._def,shape:()=>o})}keyof(){return Fp(Ze.objectKeys(this.shape))}}vt.create=(n,e)=>new vt({shape:()=>n,unknownKeys:"strip",catchall:Or.create(),typeName:Te.ZodObject,...Me(e)}),vt.strictCreate=(n,e)=>new vt({shape:()=>n,unknownKeys:"strict",catchall:Or.create(),typeName:Te.ZodObject,...Me(e)}),vt.lazycreate=(n,e)=>new vt({shape:n,unknownKeys:"strip",catchall:Or.create(),typeName:Te.ZodObject,...Me(e)});class ga extends He{_parse(e){const{ctx:o}=this._processInputParams(e),s=this._def.options;function i(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return o.common.issues.push(...d.ctx.common.issues),d.result;const u=l.map(d=>new or(d.ctx.common.issues));return fe(o,{code:oe.invalid_union,unionErrors:u}),Ie}if(o.common.async)return Promise.all(s.map(async l=>{const u={...o,common:{...o.common,issues:[]},parent:null};return{result:await l._parseAsync({data:o.data,path:o.path,parent:u}),ctx:u}})).then(i);{let l;const u=[];for(const h of s){const m={...o,common:{...o.common,issues:[]},parent:null},y=h._parseSync({data:o.data,path:o.path,parent:m});if(y.status==="valid")return y;y.status==="dirty"&&!l&&(l={result:y,ctx:m}),m.common.issues.length&&u.push(m.common.issues)}if(l)return o.common.issues.push(...l.ctx.common.issues),l.result;const d=u.map(h=>new or(h));return fe(o,{code:oe.invalid_union,unionErrors:d}),Ie}}get options(){return this._def.options}}ga.create=(n,e)=>new ga({options:n,typeName:Te.ZodUnion,...Me(e)});const ir=n=>n instanceof xa?ir(n.schema):n instanceof Co?ir(n.innerType()):n instanceof wa?[n.value]:n instanceof So?n.options:n instanceof Zc?Ze.objectValues(n.enum):n instanceof Sa?ir(n._def.innerType):n instanceof Hc?[void 0]:n instanceof ma?[null]:n instanceof ar?[void 0,...ir(n.unwrap())]:n instanceof ko?[null,...ir(n.unwrap())]:n instanceof Vp||n instanceof ka?ir(n.unwrap()):n instanceof Ca?ir(n._def.innerType):[];class Kc extends He{_parse(e){const{ctx:o}=this._processInputParams(e);if(o.parsedType!==ve.object)return fe(o,{code:oe.invalid_type,expected:ve.object,received:o.parsedType}),Ie;const s=this.discriminator,i=o.data[s],l=this.optionsMap.get(i);return l?o.common.async?l._parseAsync({data:o.data,path:o.path,parent:o}):l._parseSync({data:o.data,path:o.path,parent:o}):(fe(o,{code:oe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[s]}),Ie)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,o,s){const i=new Map;for(const l of o){const u=ir(l.shape[e]);if(!u.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const d of u){if(i.has(d))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(d)}`);i.set(d,l)}}return new Kc({typeName:Te.ZodDiscriminatedUnion,discriminator:e,options:o,optionsMap:i,...Me(s)})}}function Gc(n,e){const o=Nr(n),s=Nr(e);if(n===e)return{valid:!0,data:n};if(o===ve.object&&s===ve.object){const i=Ze.objectKeys(e),l=Ze.objectKeys(n).filter(d=>i.indexOf(d)!==-1),u={...n,...e};for(const d of l){const h=Gc(n[d],e[d]);if(!h.valid)return{valid:!1};u[d]=h.data}return{valid:!0,data:u}}else if(o===ve.array&&s===ve.array){if(n.length!==e.length)return{valid:!1};const i=[];for(let l=0;l<n.length;l++){const u=n[l],d=e[l],h=Gc(u,d);if(!h.valid)return{valid:!1};i.push(h.data)}return{valid:!0,data:i}}else return o===ve.date&&s===ve.date&&+n==+e?{valid:!0,data:n}:{valid:!1}}class va extends He{_parse(e){const{status:o,ctx:s}=this._processInputParams(e),i=(l,u)=>{if(Tp(l)||Tp(u))return Ie;const d=Gc(l.value,u.value);return d.valid?((Dp(l)||Dp(u))&&o.dirty(),{status:o.value,value:d.data}):(fe(s,{code:oe.invalid_intersection_types}),Ie)};return s.common.async?Promise.all([this._def.left._parseAsync({data:s.data,path:s.path,parent:s}),this._def.right._parseAsync({data:s.data,path:s.path,parent:s})]).then(([l,u])=>i(l,u)):i(this._def.left._parseSync({data:s.data,path:s.path,parent:s}),this._def.right._parseSync({data:s.data,path:s.path,parent:s}))}}va.create=(n,e,o)=>new va({left:n,right:e,typeName:Te.ZodIntersection,...Me(o)});class bo extends He{_parse(e){const{status:o,ctx:s}=this._processInputParams(e);if(s.parsedType!==ve.array)return fe(s,{code:oe.invalid_type,expected:ve.array,received:s.parsedType}),Ie;if(s.data.length<this._def.items.length)return fe(s,{code:oe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ie;!this._def.rest&&s.data.length>this._def.items.length&&(fe(s,{code:oe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),o.dirty());const l=[...s.data].map((u,d)=>{const h=this._def.items[d]||this._def.rest;return h?h._parse(new Fn(s,u,s.path,d)):null}).filter(u=>!!u);return s.common.async?Promise.all(l).then(u=>Lt.mergeArray(o,u)):Lt.mergeArray(o,l)}get items(){return this._def.items}rest(e){return new bo({...this._def,rest:e})}}bo.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new bo({items:n,typeName:Te.ZodTuple,rest:null,...Me(e)})};class ya extends He{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:o,ctx:s}=this._processInputParams(e);if(s.parsedType!==ve.object)return fe(s,{code:oe.invalid_type,expected:ve.object,received:s.parsedType}),Ie;const i=[],l=this._def.keyType,u=this._def.valueType;for(const d in s.data)i.push({key:l._parse(new Fn(s,d,s.path,d)),value:u._parse(new Fn(s,s.data[d],s.path,d)),alwaysSet:d in s.data});return s.common.async?Lt.mergeObjectAsync(o,i):Lt.mergeObjectSync(o,i)}get element(){return this._def.valueType}static create(e,o,s){return o instanceof He?new ya({keyType:e,valueType:o,typeName:Te.ZodRecord,...Me(s)}):new ya({keyType:sr.create(),valueType:e,typeName:Te.ZodRecord,...Me(o)})}}class Lp extends He{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:o,ctx:s}=this._processInputParams(e);if(s.parsedType!==ve.map)return fe(s,{code:oe.invalid_type,expected:ve.map,received:s.parsedType}),Ie;const i=this._def.keyType,l=this._def.valueType,u=[...s.data.entries()].map(([d,h],m)=>({key:i._parse(new Fn(s,d,s.path,[m,"key"])),value:l._parse(new Fn(s,h,s.path,[m,"value"]))}));if(s.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const h of u){const m=await h.key,y=await h.value;if(m.status==="aborted"||y.status==="aborted")return Ie;(m.status==="dirty"||y.status==="dirty")&&o.dirty(),d.set(m.value,y.value)}return{status:o.value,value:d}})}else{const d=new Map;for(const h of u){const m=h.key,y=h.value;if(m.status==="aborted"||y.status==="aborted")return Ie;(m.status==="dirty"||y.status==="dirty")&&o.dirty(),d.set(m.value,y.value)}return{status:o.value,value:d}}}}Lp.create=(n,e,o)=>new Lp({valueType:e,keyType:n,typeName:Te.ZodMap,...Me(o)});class Qs extends He{_parse(e){const{status:o,ctx:s}=this._processInputParams(e);if(s.parsedType!==ve.set)return fe(s,{code:oe.invalid_type,expected:ve.set,received:s.parsedType}),Ie;const i=this._def;i.minSize!==null&&s.data.size<i.minSize.value&&(fe(s,{code:oe.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),o.dirty()),i.maxSize!==null&&s.data.size>i.maxSize.value&&(fe(s,{code:oe.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),o.dirty());const l=this._def.valueType;function u(h){const m=new Set;for(const y of h){if(y.status==="aborted")return Ie;y.status==="dirty"&&o.dirty(),m.add(y.value)}return{status:o.value,value:m}}const d=[...s.data.values()].map((h,m)=>l._parse(new Fn(s,h,s.path,m)));return s.common.async?Promise.all(d).then(h=>u(h)):u(d)}min(e,o){return new Qs({...this._def,minSize:{value:e,message:ke.toString(o)}})}max(e,o){return new Qs({...this._def,maxSize:{value:e,message:ke.toString(o)}})}size(e,o){return this.min(e,o).max(e,o)}nonempty(e){return this.min(1,e)}}Qs.create=(n,e)=>new Qs({valueType:n,minSize:null,maxSize:null,typeName:Te.ZodSet,...Me(e)});class xa extends He{get schema(){return this._def.getter()}_parse(e){const{ctx:o}=this._processInputParams(e);return this._def.getter()._parse({data:o.data,path:o.path,parent:o})}}xa.create=(n,e)=>new xa({getter:n,typeName:Te.ZodLazy,...Me(e)});class wa extends He{_parse(e){if(e.data!==this._def.value){const o=this._getOrReturnCtx(e);return fe(o,{received:o.data,code:oe.invalid_literal,expected:this._def.value}),Ie}return{status:"valid",value:e.data}}get value(){return this._def.value}}wa.create=(n,e)=>new wa({value:n,typeName:Te.ZodLiteral,...Me(e)});function Fp(n,e){return new So({values:n,typeName:Te.ZodEnum,...Me(e)})}class So extends He{_parse(e){if(typeof e.data!="string"){const o=this._getOrReturnCtx(e),s=this._def.values;return fe(o,{expected:Ze.joinValues(s),received:o.parsedType,code:oe.invalid_type}),Ie}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const o=this._getOrReturnCtx(e),s=this._def.values;return fe(o,{received:o.data,code:oe.invalid_enum_value,options:s}),Ie}return hn(e.data)}get options(){return this._def.values}get enum(){const e={};for(const o of this._def.values)e[o]=o;return e}get Values(){const e={};for(const o of this._def.values)e[o]=o;return e}get Enum(){const e={};for(const o of this._def.values)e[o]=o;return e}extract(e,o=this._def){return So.create(e,{...this._def,...o})}exclude(e,o=this._def){return So.create(this.options.filter(s=>!e.includes(s)),{...this._def,...o})}}So.create=Fp;class Zc extends He{_parse(e){const o=Ze.getValidEnumValues(this._def.values),s=this._getOrReturnCtx(e);if(s.parsedType!==ve.string&&s.parsedType!==ve.number){const i=Ze.objectValues(o);return fe(s,{expected:Ze.joinValues(i),received:s.parsedType,code:oe.invalid_type}),Ie}if(this._cache||(this._cache=new Set(Ze.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const i=Ze.objectValues(o);return fe(s,{received:s.data,code:oe.invalid_enum_value,options:i}),Ie}return hn(e.data)}get enum(){return this._def.values}}Zc.create=(n,e)=>new Zc({values:n,typeName:Te.ZodNativeEnum,...Me(e)});class ba extends He{unwrap(){return this._def.type}_parse(e){const{ctx:o}=this._processInputParams(e);if(o.parsedType!==ve.promise&&o.common.async===!1)return fe(o,{code:oe.invalid_type,expected:ve.promise,received:o.parsedType}),Ie;const s=o.parsedType===ve.promise?o.data:Promise.resolve(o.data);return hn(s.then(i=>this._def.type.parseAsync(i,{path:o.path,errorMap:o.common.contextualErrorMap})))}}ba.create=(n,e)=>new ba({type:n,typeName:Te.ZodPromise,...Me(e)});class Co extends He{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Te.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:o,ctx:s}=this._processInputParams(e),i=this._def.effect||null,l={addIssue:u=>{fe(s,u),u.fatal?o.abort():o.dirty()},get path(){return s.path}};if(l.addIssue=l.addIssue.bind(l),i.type==="preprocess"){const u=i.transform(s.data,l);if(s.common.async)return Promise.resolve(u).then(async d=>{if(o.value==="aborted")return Ie;const h=await this._def.schema._parseAsync({data:d,path:s.path,parent:s});return h.status==="aborted"?Ie:h.status==="dirty"||o.value==="dirty"?qs(h.value):h});{if(o.value==="aborted")return Ie;const d=this._def.schema._parseSync({data:u,path:s.path,parent:s});return d.status==="aborted"?Ie:d.status==="dirty"||o.value==="dirty"?qs(d.value):d}}if(i.type==="refinement"){const u=d=>{const h=i.refinement(d,l);if(s.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(s.common.async===!1){const d=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});return d.status==="aborted"?Ie:(d.status==="dirty"&&o.dirty(),u(d.value),{status:o.value,value:d.value})}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(d=>d.status==="aborted"?Ie:(d.status==="dirty"&&o.dirty(),u(d.value).then(()=>({status:o.value,value:d.value}))))}if(i.type==="transform")if(s.common.async===!1){const u=this._def.schema._parseSync({data:s.data,path:s.path,parent:s});if(!rs(u))return Ie;const d=i.transform(u.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:o.value,value:d}}else return this._def.schema._parseAsync({data:s.data,path:s.path,parent:s}).then(u=>rs(u)?Promise.resolve(i.transform(u.value,l)).then(d=>({status:o.value,value:d})):Ie);Ze.assertNever(i)}}Co.create=(n,e,o)=>new Co({schema:n,typeName:Te.ZodEffects,effect:e,...Me(o)}),Co.createWithPreprocess=(n,e,o)=>new Co({schema:e,effect:{type:"preprocess",transform:n},typeName:Te.ZodEffects,...Me(o)});class ar extends He{_parse(e){return this._getType(e)===ve.undefined?hn(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ar.create=(n,e)=>new ar({innerType:n,typeName:Te.ZodOptional,...Me(e)});class ko extends He{_parse(e){return this._getType(e)===ve.null?hn(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ko.create=(n,e)=>new ko({innerType:n,typeName:Te.ZodNullable,...Me(e)});class Sa extends He{_parse(e){const{ctx:o}=this._processInputParams(e);let s=o.data;return o.parsedType===ve.undefined&&(s=this._def.defaultValue()),this._def.innerType._parse({data:s,path:o.path,parent:o})}removeDefault(){return this._def.innerType}}Sa.create=(n,e)=>new Sa({innerType:n,typeName:Te.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Me(e)});class Ca extends He{_parse(e){const{ctx:o}=this._processInputParams(e),s={...o,common:{...o.common,issues:[]}},i=this._def.innerType._parse({data:s.data,path:s.path,parent:{...s}});return pa(i)?i.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new or(s.common.issues)},input:s.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new or(s.common.issues)},input:s.data})}}removeCatch(){return this._def.innerType}}Ca.create=(n,e)=>new Ca({innerType:n,typeName:Te.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Me(e)});class zp extends He{_parse(e){if(this._getType(e)!==ve.nan){const s=this._getOrReturnCtx(e);return fe(s,{code:oe.invalid_type,expected:ve.nan,received:s.parsedType}),Ie}return{status:"valid",value:e.data}}}zp.create=n=>new zp({typeName:Te.ZodNaN,...Me(n)});class Vp extends He{_parse(e){const{ctx:o}=this._processInputParams(e),s=o.data;return this._def.type._parse({data:s,path:o.path,parent:o})}unwrap(){return this._def.type}}class qc extends He{_parse(e){const{status:o,ctx:s}=this._processInputParams(e);if(s.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:s.data,path:s.path,parent:s});return l.status==="aborted"?Ie:l.status==="dirty"?(o.dirty(),qs(l.value)):this._def.out._parseAsync({data:l.value,path:s.path,parent:s})})();{const i=this._def.in._parseSync({data:s.data,path:s.path,parent:s});return i.status==="aborted"?Ie:i.status==="dirty"?(o.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:s.path,parent:s})}}static create(e,o){return new qc({in:e,out:o,typeName:Te.ZodPipeline})}}class ka extends He{_parse(e){const o=this._def.innerType._parse(e),s=i=>(rs(i)&&(i.value=Object.freeze(i.value)),i);return pa(o)?o.then(i=>s(i)):s(o)}unwrap(){return this._def.innerType}}ka.create=(n,e)=>new ka({innerType:n,typeName:Te.ZodReadonly,...Me(e)});var Te;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(Te||(Te={}));const te=sr.create,tt=os.create,ot=Bc.create,Ar=ma.create,$r=Wc.create;Or.create;const nt=zn.create,me=vt.create,lr=ga.create,E0=Kc.create;va.create,bo.create;const Mr=ya.create,_0=xa.create,Je=wa.create,en=So.create;ba.create,ar.create,ko.create;function Up(n){var e,o,s="";if(typeof n=="string"||typeof n=="number")s+=n;else if(typeof n=="object")if(Array.isArray(n)){var i=n.length;for(e=0;e<i;e++)n[e]&&(o=Up(n[e]))&&(s&&(s+=" "),s+=o)}else for(o in n)n[o]&&(s&&(s+=" "),s+=o);return s}function Bp(){for(var n,e,o=0,s="",i=arguments.length;o<i;o++)(n=arguments[o])&&(e=Up(n))&&(s&&(s+=" "),s+=e);return s}const P0=(n,e)=>{const o=new Array(n.length+e.length);for(let s=0;s<n.length;s++)o[s]=n[s];for(let s=0;s<e.length;s++)o[n.length+s]=e[s];return o},R0=(n,e)=>({classGroupId:n,validator:e}),Hp=(n=new Map,e=null,o)=>({nextPart:n,validators:e,classGroupId:o}),Ea="-",Wp=[],I0="arbitrary..",T0=n=>{const e=N0(n),{conflictingClassGroups:o,conflictingClassGroupModifiers:s}=n;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return D0(u);const d=u.split(Ea),h=d[0]===""&&d.length>1?1:0;return Kp(d,h,e)},getConflictingClassGroupIds:(u,d)=>{if(d){const h=s[u],m=o[u];return h?m?P0(m,h):h:m||Wp}return o[u]||Wp}}},Kp=(n,e,o)=>{if(n.length-e===0)return o.classGroupId;const i=n[e],l=o.nextPart.get(i);if(l){const m=Kp(n,e+1,l);if(m)return m}const u=o.validators;if(u===null)return;const d=e===0?n.join(Ea):n.slice(e).join(Ea),h=u.length;for(let m=0;m<h;m++){const y=u[m];if(y.validator(d))return y.classGroupId}},D0=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=n.slice(1,-1),o=e.indexOf(":"),s=e.slice(0,o);return s?I0+s:void 0})(),N0=n=>{const{theme:e,classGroups:o}=n;return O0(o,e)},O0=(n,e)=>{const o=Hp();for(const s in n){const i=n[s];Yc(i,o,s,e)}return o},Yc=(n,e,o,s)=>{const i=n.length;for(let l=0;l<i;l++){const u=n[l];A0(u,e,o,s)}},A0=(n,e,o,s)=>{if(typeof n=="string"){$0(n,e,o);return}if(typeof n=="function"){M0(n,e,o,s);return}j0(n,e,o,s)},$0=(n,e,o)=>{const s=n===""?e:Gp(e,n);s.classGroupId=o},M0=(n,e,o,s)=>{if(L0(n)){Yc(n(s),e,o,s);return}e.validators===null&&(e.validators=[]),e.validators.push(R0(o,n))},j0=(n,e,o,s)=>{const i=Object.entries(n),l=i.length;for(let u=0;u<l;u++){const[d,h]=i[u];Yc(h,Gp(e,d),o,s)}},Gp=(n,e)=>{let o=n;const s=e.split(Ea),i=s.length;for(let l=0;l<i;l++){const u=s[l];let d=o.nextPart.get(u);d||(d=Hp(),o.nextPart.set(u,d)),o=d}return o},L0=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,F0=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,o=Object.create(null),s=Object.create(null);const i=(l,u)=>{o[l]=u,e++,e>n&&(e=0,s=o,o=Object.create(null))};return{get(l){let u=o[l];if(u!==void 0)return u;if((u=s[l])!==void 0)return i(l,u),u},set(l,u){l in o?o[l]=u:i(l,u)}}},Qc="!",Zp=":",z0=[],qp=(n,e,o,s,i)=>({modifiers:n,hasImportantModifier:e,baseClassName:o,maybePostfixModifierPosition:s,isExternal:i}),V0=n=>{const{prefix:e,experimentalParseClassName:o}=n;let s=i=>{const l=[];let u=0,d=0,h=0,m;const y=i.length;for(let C=0;C<y;C++){const k=i[C];if(u===0&&d===0){if(k===Zp){l.push(i.slice(h,C)),h=C+1;continue}if(k==="/"){m=C;continue}}k==="["?u++:k==="]"?u--:k==="("?d++:k===")"&&d--}const v=l.length===0?i:i.slice(h);let x=v,b=!1;v.endsWith(Qc)?(x=v.slice(0,-1),b=!0):v.startsWith(Qc)&&(x=v.slice(1),b=!0);const S=m&&m>h?m-h:void 0;return qp(l,b,x,S)};if(e){const i=e+Zp,l=s;s=u=>u.startsWith(i)?l(u.slice(i.length)):qp(z0,!1,u,void 0,!0)}if(o){const i=s;s=l=>o({className:l,parseClassName:i})}return s},U0=n=>{const e=new Map;return n.orderSensitiveModifiers.forEach((o,s)=>{e.set(o,1e6+s)}),o=>{const s=[];let i=[];for(let l=0;l<o.length;l++){const u=o[l],d=u[0]==="[",h=e.has(u);d||h?(i.length>0&&(i.sort(),s.push(...i),i=[]),s.push(u)):i.push(u)}return i.length>0&&(i.sort(),s.push(...i)),s}},B0=n=>({cache:F0(n.cacheSize),parseClassName:V0(n),sortModifiers:U0(n),postfixLookupClassGroupIds:H0(n),...T0(n)}),H0=n=>{const e=Object.create(null),o=n.postfixLookupClassGroups;if(o)for(let s=0;s<o.length;s++)e[o[s]]=!0;return e},W0=/\s+/,K0=(n,e)=>{const{parseClassName:o,getClassGroupId:s,getConflictingClassGroupIds:i,sortModifiers:l,postfixLookupClassGroupIds:u}=e,d=[],h=n.trim().split(W0);let m="";for(let y=h.length-1;y>=0;y-=1){const v=h[y],{isExternal:x,modifiers:b,hasImportantModifier:S,baseClassName:C,maybePostfixModifierPosition:k}=o(v);if(x){m=v+(m.length>0?" "+m:m);continue}let N=!!k,D;if(N){const B=C.substring(0,k);D=s(B);const I=D&&u[D]?s(C):void 0;I&&I!==D&&(D=I,N=!1)}else D=s(C);if(!D){if(!N){m=v+(m.length>0?" "+m:m);continue}if(D=s(C),!D){m=v+(m.length>0?" "+m:m);continue}N=!1}const O=b.length===0?"":b.length===1?b[0]:l(b).join(":"),R=S?O+Qc:O,L=R+D;if(d.indexOf(L)>-1)continue;d.push(L);const j=i(D,N);for(let B=0;B<j.length;++B){const I=j[B];d.push(R+I)}m=v+(m.length>0?" "+m:m)}return m},G0=(...n)=>{let e=0,o,s,i="";for(;e<n.length;)(o=n[e++])&&(s=Yp(o))&&(i&&(i+=" "),i+=s);return i},Yp=n=>{if(typeof n=="string")return n;let e,o="";for(let s=0;s<n.length;s++)n[s]&&(e=Yp(n[s]))&&(o&&(o+=" "),o+=e);return o},Z0=(n,...e)=>{let o,s,i,l;const u=h=>{const m=e.reduce((y,v)=>v(y),n());return o=B0(m),s=o.cache.get,i=o.cache.set,l=d,d(h)},d=h=>{const m=s(h);if(m)return m;const y=K0(h,o);return i(h,y),y};return l=u,(...h)=>l(G0(...h))},q0=[],bt=n=>{const e=o=>o[n]||q0;return e.isThemeGetter=!0,e},Qp=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Xp=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Y0=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Q0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,X0=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,J0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,eb=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,tb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,jr=n=>Y0.test(n),Fe=n=>!!n&&!Number.isNaN(Number(n)),Vn=n=>!!n&&Number.isInteger(Number(n)),Xc=n=>n.endsWith("%")&&Fe(n.slice(0,-1)),cr=n=>Q0.test(n),Jp=()=>!0,nb=n=>X0.test(n)&&!J0.test(n),Jc=()=>!1,rb=n=>eb.test(n),ob=n=>tb.test(n),sb=n=>!ge(n)&&!ye(n),ib=n=>n.startsWith("@container")&&(n[10]==="/"&&n[11]!==void 0||n[11]==="s"&&n[16]!==void 0&&n.startsWith("-size/",10)||n[11]==="n"&&n[18]!==void 0&&n.startsWith("-normal/",10)),ab=n=>Lr(n,sh,Jc),ge=n=>Qp.test(n),Eo=n=>Lr(n,ih,nb),eh=n=>Lr(n,mb,Fe),lb=n=>Lr(n,lh,Jp),cb=n=>Lr(n,ah,Jc),th=n=>Lr(n,rh,Jc),ub=n=>Lr(n,oh,ob),_a=n=>Lr(n,ch,rb),ye=n=>Xp.test(n),Xs=n=>_o(n,ih),db=n=>_o(n,ah),nh=n=>_o(n,rh),fb=n=>_o(n,sh),pb=n=>_o(n,oh),Pa=n=>_o(n,ch,!0),hb=n=>_o(n,lh,!0),Lr=(n,e,o)=>{const s=Qp.exec(n);return s?s[1]?e(s[1]):o(s[2]):!1},_o=(n,e,o=!1)=>{const s=Xp.exec(n);return s?s[1]?e(s[1]):o:!1},rh=n=>n==="position"||n==="percentage",oh=n=>n==="image"||n==="url",sh=n=>n==="length"||n==="size"||n==="bg-size",ih=n=>n==="length",mb=n=>n==="number",ah=n=>n==="family-name",lh=n=>n==="number"||n==="weight",ch=n=>n==="shadow",gb=Z0(()=>{const n=bt("color"),e=bt("font"),o=bt("text"),s=bt("font-weight"),i=bt("tracking"),l=bt("leading"),u=bt("breakpoint"),d=bt("container"),h=bt("spacing"),m=bt("radius"),y=bt("shadow"),v=bt("inset-shadow"),x=bt("text-shadow"),b=bt("drop-shadow"),S=bt("blur"),C=bt("perspective"),k=bt("aspect"),N=bt("ease"),D=bt("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...R(),ye,ge],j=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],I=()=>[ye,ge,h],K=()=>[jr,"full","auto",...I()],ae=()=>[Vn,"none","subgrid",ye,ge],be=()=>["auto",{span:["full",Vn,ye,ge]},Vn,ye,ge],le=()=>[Vn,"auto",ye,ge],ce=()=>["auto","min","max","fr",ye,ge],ue=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Se=()=>["start","end","center","stretch","center-safe","end-safe"],q=()=>["auto",...I()],ne=()=>[jr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],U=()=>[jr,"screen","full","dvw","lvw","svw","min","max","fit",...I()],Q=()=>[jr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...I()],M=()=>[n,ye,ge],T=()=>[...R(),nh,th,{position:[ye,ge]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",fb,ab,{size:[ye,ge]}],Z=()=>[Xc,Xs,Eo],H=()=>["","none","full",m,ye,ge],re=()=>["",Fe,Xs,Eo],de=()=>["solid","dashed","dotted","double"],Y=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],se=()=>[Fe,Xc,nh,th],Oe=()=>["","none",S,ye,ge],Ue=()=>["none",Fe,ye,ge],je=()=>["none",Fe,ye,ge],We=()=>[Fe,ye,ge],xt=()=>[jr,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[cr],breakpoint:[cr],color:[Jp],container:[cr],"drop-shadow":[cr],ease:["in","out","in-out"],font:[sb],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[cr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[cr],shadow:[cr],spacing:["px",Fe],text:[cr],"text-shadow":[cr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",jr,ge,ye,k]}],container:["container"],"container-type":[{"@container":["","normal","size",ye,ge]}],"container-named":[ib],columns:[{columns:[Fe,ge,ye,d]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:L()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{"inset-s":K(),start:K()}],end:[{"inset-e":K(),end:K()}],"inset-bs":[{"inset-bs":K()}],"inset-be":[{"inset-be":K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[Vn,"auto",ye,ge]}],basis:[{basis:[jr,"full","auto",d,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Fe,jr,"auto","initial","none",ge]}],grow:[{grow:["",Fe,ye,ge]}],shrink:[{shrink:["",Fe,ye,ge]}],order:[{order:[Vn,"first","last","none",ye,ge]}],"grid-cols":[{"grid-cols":ae()}],"col-start-end":[{col:be()}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":ae()}],"row-start-end":[{row:be()}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ce()}],"auto-rows":[{"auto-rows":ce()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...ue(),"normal"]}],"justify-items":[{"justify-items":[...Se(),"normal"]}],"justify-self":[{"justify-self":["auto",...Se()]}],"align-content":[{content:["normal",...ue()]}],"align-items":[{items:[...Se(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Se(),{baseline:["","last"]}]}],"place-content":[{"place-content":ue()}],"place-items":[{"place-items":[...Se(),"baseline"]}],"place-self":[{"place-self":["auto",...Se()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pbs:[{pbs:I()}],pbe:[{pbe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:q()}],mx:[{mx:q()}],my:[{my:q()}],ms:[{ms:q()}],me:[{me:q()}],mbs:[{mbs:q()}],mbe:[{mbe:q()}],mt:[{mt:q()}],mr:[{mr:q()}],mb:[{mb:q()}],ml:[{ml:q()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:ne()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...Q()]}],"min-block-size":[{"min-block":["auto",...Q()]}],"max-block-size":[{"max-block":["none",...Q()]}],w:[{w:[d,"screen",...ne()]}],"min-w":[{"min-w":[d,"screen","none",...ne()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...ne()]}],h:[{h:["screen","lh",...ne()]}],"min-h":[{"min-h":["screen","lh","none",...ne()]}],"max-h":[{"max-h":["screen","lh",...ne()]}],"font-size":[{text:["base",o,Xs,Eo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,hb,lb]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Xc,ge]}],"font-family":[{font:[db,cb,e]}],"font-features":[{"font-features":[ge]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ye,ge]}],"line-clamp":[{"line-clamp":[Fe,"none",ye,eh]}],leading:[{leading:[l,...I()]}],"list-image":[{"list-image":["none",ye,ge]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ye,ge]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:[Fe,"from-font","auto",ye,Eo]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[Fe,"auto",ye,ge]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"tab-size":[{tab:[Vn,ye,ge]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye,ge]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ye,ge]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:T()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Vn,ye,ge],radial:["",ye,ge],conic:[Vn,ye,ge]},pb,ub]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:H()}],"rounded-s":[{"rounded-s":H()}],"rounded-e":[{"rounded-e":H()}],"rounded-t":[{"rounded-t":H()}],"rounded-r":[{"rounded-r":H()}],"rounded-b":[{"rounded-b":H()}],"rounded-l":[{"rounded-l":H()}],"rounded-ss":[{"rounded-ss":H()}],"rounded-se":[{"rounded-se":H()}],"rounded-ee":[{"rounded-ee":H()}],"rounded-es":[{"rounded-es":H()}],"rounded-tl":[{"rounded-tl":H()}],"rounded-tr":[{"rounded-tr":H()}],"rounded-br":[{"rounded-br":H()}],"rounded-bl":[{"rounded-bl":H()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-bs":[{"border-bs":re()}],"border-w-be":[{"border-be":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...de(),"hidden","none"]}],"divide-style":[{divide:[...de(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...de(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Fe,ye,ge]}],"outline-w":[{outline:["",Fe,Xs,Eo]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",y,Pa,_a]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",v,Pa,_a]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[Fe,Eo]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",x,Pa,_a]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[Fe,ye,ge]}],"mix-blend":[{"mix-blend":[...Y(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Y()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Fe]}],"mask-image-linear-from-pos":[{"mask-linear-from":se()}],"mask-image-linear-to-pos":[{"mask-linear-to":se()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":se()}],"mask-image-t-to-pos":[{"mask-t-to":se()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":se()}],"mask-image-r-to-pos":[{"mask-r-to":se()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":se()}],"mask-image-b-to-pos":[{"mask-b-to":se()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":se()}],"mask-image-l-to-pos":[{"mask-l-to":se()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":se()}],"mask-image-x-to-pos":[{"mask-x-to":se()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":se()}],"mask-image-y-to-pos":[{"mask-y-to":se()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[ye,ge]}],"mask-image-radial-from-pos":[{"mask-radial-from":se()}],"mask-image-radial-to-pos":[{"mask-radial-to":se()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":R()}],"mask-image-conic-pos":[{"mask-conic":[Fe]}],"mask-image-conic-from-pos":[{"mask-conic-from":se()}],"mask-image-conic-to-pos":[{"mask-conic-to":se()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:T()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ye,ge]}],filter:[{filter:["","none",ye,ge]}],blur:[{blur:Oe()}],brightness:[{brightness:[Fe,ye,ge]}],contrast:[{contrast:[Fe,ye,ge]}],"drop-shadow":[{"drop-shadow":["","none",b,Pa,_a]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",Fe,ye,ge]}],"hue-rotate":[{"hue-rotate":[Fe,ye,ge]}],invert:[{invert:["",Fe,ye,ge]}],saturate:[{saturate:[Fe,ye,ge]}],sepia:[{sepia:["",Fe,ye,ge]}],"backdrop-filter":[{"backdrop-filter":["","none",ye,ge]}],"backdrop-blur":[{"backdrop-blur":Oe()}],"backdrop-brightness":[{"backdrop-brightness":[Fe,ye,ge]}],"backdrop-contrast":[{"backdrop-contrast":[Fe,ye,ge]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Fe,ye,ge]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Fe,ye,ge]}],"backdrop-invert":[{"backdrop-invert":["",Fe,ye,ge]}],"backdrop-opacity":[{"backdrop-opacity":[Fe,ye,ge]}],"backdrop-saturate":[{"backdrop-saturate":[Fe,ye,ge]}],"backdrop-sepia":[{"backdrop-sepia":["",Fe,ye,ge]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ye,ge]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Fe,"initial",ye,ge]}],ease:[{ease:["linear","initial",N,ye,ge]}],delay:[{delay:[Fe,ye,ge]}],animate:[{animate:["none",D,ye,ge]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,ye,ge]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:Ue()}],"rotate-x":[{"rotate-x":Ue()}],"rotate-y":[{"rotate-y":Ue()}],"rotate-z":[{"rotate-z":Ue()}],scale:[{scale:je()}],"scale-x":[{"scale-x":je()}],"scale-y":[{"scale-y":je()}],"scale-z":[{"scale-z":je()}],"scale-3d":["scale-3d"],skew:[{skew:We()}],"skew-x":[{"skew-x":We()}],"skew-y":[{"skew-y":We()}],transform:[{transform:[ye,ge,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:xt()}],"translate-x":[{"translate-x":xt()}],"translate-y":[{"translate-y":xt()}],"translate-z":[{"translate-z":xt()}],"translate-none":["translate-none"],zoom:[{zoom:[Vn,ye,ge]}],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ye,ge]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":M()}],"scrollbar-track-color":[{"scrollbar-track":M()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mbs":[{"scroll-mbs":I()}],"scroll-mbe":[{"scroll-mbe":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pbs":[{"scroll-pbs":I()}],"scroll-pbe":[{"scroll-pbe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ye,ge]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[Fe,Xs,Eo,eh]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function vb(n={}){const e=n.styleId??"xpert-shadcn-ui-theme-vars";if(typeof document>"u")return;n.density==="compact"?document.documentElement.dataset.xuiDensity="compact":n.density==="default"&&delete document.documentElement.dataset.xuiDensity;let o=document.getElementById(e);o||(o=document.createElement("style"),o.id=e,document.head.appendChild(o)),o.textContent=`
|
|
9
9
|
:root {
|
|
10
10
|
--background: var(--xui-color-background, #ffffff);
|
|
11
11
|
--foreground: var(--xui-color-foreground, #18181b);
|
|
@@ -60,47 +60,47 @@ Error generating stack: `+p.message+`
|
|
|
60
60
|
--border: var(--xui-color-border, #27272a);
|
|
61
61
|
--input: var(--xui-color-input, var(--border));
|
|
62
62
|
}
|
|
63
|
-
`}const tp=(...r)=>r.filter((t,o,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===o).join(" ").trim();const S0=r=>r.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const b0=r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,i)=>i?i.toUpperCase():o.toLowerCase());const np=r=>{const t=b0(r);return t.charAt(0).toUpperCase()+t.slice(1)};var ec={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const k0=r=>{for(const t in r)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},C0=m.createContext({}),_0=()=>m.useContext(C0),E0=m.forwardRef(({color:r,size:t,strokeWidth:o,absoluteStrokeWidth:i,className:a="",children:l,iconNode:u,...d},h)=>{const{size:g=24,strokeWidth:v=2,absoluteStrokeWidth:y=!1,color:S="currentColor",className:b=""}=_0()??{},w=i??y?Number(o??v)*24/Number(t??g):o??v;return m.createElement("svg",{ref:h,...ec,width:t??g??ec.width,height:t??g??ec.height,stroke:r??S,strokeWidth:w,className:tp("lucide",b,a),...!l&&!k0(d)&&{"aria-hidden":"true"},...d},[...u.map(([_,k])=>m.createElement(_,k)),...Array.isArray(l)?l:[l]])});const Jt=(r,t)=>{const o=m.forwardRef(({className:i,...a},l)=>m.createElement(E0,{ref:l,iconNode:t,className:tp(`lucide-${S0(np(r))}`,`lucide-${r}`,i),...a}));return o.displayName=np(r),o};const rp=Jt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const tc=Jt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const op=Jt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const R0=Jt("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);const P0=Jt("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);const I0=Jt("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const nc=Jt("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);const ip=Jt("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);const O0=Jt("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const N0=Jt("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const T0=Jt("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const D0=Jt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var rc={exports:{}},Ei={};var sp;function A0(){if(sp)return Ei;sp=1;var r=jl(),t=Symbol.for("react.element"),o=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(d,h,g){var v,y={},S=null,b=null;g!==void 0&&(S=""+g),h.key!==void 0&&(S=""+h.key),h.ref!==void 0&&(b=h.ref);for(v in h)i.call(h,v)&&!l.hasOwnProperty(v)&&(y[v]=h[v]);if(d&&d.defaultProps)for(v in h=d.defaultProps,h)y[v]===void 0&&(y[v]=h[v]);return{$$typeof:t,type:d,key:S,ref:b,props:y,_owner:a.current}}return Ei.Fragment=o,Ei.jsx=u,Ei.jsxs=u,Ei}var ap;function L0(){return ap||(ap=1,rc.exports=A0()),rc.exports}var A=L0(),Ri=vf(),$0=Object.defineProperty,oc=(r,t)=>$0(r,"name",{value:t,configurable:!0});function ic(r,t){if(typeof r=="function")return r(t);r!=null&&(r.current=t)}oc(ic,"setRef");function no(...r){return t=>{let o=!1;const i=r.map(a=>{const l=ic(a,t);return!o&&typeof l=="function"&&(o=!0),l});if(o)return()=>{for(let a=0;a<i.length;a++){const l=i[a];typeof l=="function"?l():ic(r[a],null)}}}}oc(no,"composeRefs");function Ge(...r){return m.useCallback(no(...r),r)}oc(Ge,"useComposedRefs");var j0=Object.defineProperty,cn=(r,t)=>j0(r,"name",{value:t,configurable:!0});function kn(r){const t=m.forwardRef((o,i)=>{let{children:a,...l}=o,u=null,d=!1;const h=[];sc(a)&&typeof Hs=="function"&&(a=Hs(a._payload)),m.Children.forEach(a,S=>{if(dp(S)){d=!0;const b=S;let w="child"in b.props?b.props.child:b.props.children;sc(w)&&typeof Hs=="function"&&(w=Hs(w._payload)),u=F0(b,w),h.push(u?.props?.children)}else h.push(S)}),u?u=m.cloneElement(u,void 0,h):!d&&m.Children.count(a)===1&&m.isValidElement(a)&&(u=a);const g=u?up(u):void 0,v=Ge(i,g);if(!u){if(a||a===0)throw new Error(d?B0(r):U0(r));return a}const y=cp(l,u.props??{});return u.type!==m.Fragment&&(y.ref=i?v:g),m.cloneElement(u,y)});return t.displayName=`${r}.Slot`,t}cn(kn,"createSlot");var M0=kn("Slot"),lp=Symbol.for("radix.slottable");function z0(r){const t=cn(o=>"child"in o?o.children(o.child):o.children,"Slottable");return t.displayName=`${r}.Slottable`,t.__radixId=lp,t}cn(z0,"createSlottable");var F0=cn((r,t)=>{if("child"in r.props){const o=r.props.child;return m.isValidElement(o)?m.cloneElement(o,void 0,r.props.children(o.props.children)):null}return m.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function cp(r,t){const o={...t};for(const i in t){const a=r[i],l=t[i];/^on[A-Z]/.test(i)?a&&l?o[i]=(...d)=>{const h=l(...d);return a(...d),h}:a&&(o[i]=a):i==="style"?o[i]={...a,...l}:i==="className"&&(o[i]=[a,l].filter(Boolean).join(" "))}return{...r,...o}}cn(cp,"mergeProps");function up(r){let t=Object.getOwnPropertyDescriptor(r.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?r.ref:(t=Object.getOwnPropertyDescriptor(r,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?r.props.ref:r.props.ref||r.ref)}cn(up,"getElementRef");function dp(r){return m.isValidElement(r)&&typeof r.type=="function"&&"__radixId"in r.type&&r.type.__radixId===lp}cn(dp,"isSlottable");var V0=Symbol.for("react.lazy");function sc(r){return r!=null&&typeof r=="object"&&"$$typeof"in r&&r.$$typeof===V0&&"_payload"in r&&fp(r._payload)}cn(sc,"isLazyComponent");function fp(r){return typeof r=="object"&&r!==null&&"then"in r}cn(fp,"isPromiseLike");var U0=cn(r=>`${r} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),B0=cn(r=>`${r} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Hs=Si[" use ".trim().toString()],H0=Object.defineProperty,W0=(r,t)=>H0(r,"name",{value:t,configurable:!0}),K0=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ze=K0.reduce((r,t)=>{const o=kn(`Primitive.${t}`),i=m.forwardRef((a,l)=>{const{asChild:u,...d}=a,h=u?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),A.jsx(h,{...d,ref:l})});return i.displayName=`Primitive.${t}`,{...r,[t]:i}},{});function pp(r,t){r&&Ri.flushSync(()=>r.dispatchEvent(t))}W0(pp,"dispatchDiscreteCustomEvent");var Z0=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),q0=Object.defineProperty,en=(r,t)=>q0(r,"name",{value:t,configurable:!0});function G0(r,t){const o=m.createContext(t);o.displayName=r+"Context";const i=en(l=>{const{children:u,...d}=l,h=m.useMemo(()=>d,Object.values(d));return A.jsx(o.Provider,{value:h,children:u})},"Provider");i.displayName=r+"Provider";function a(l,u={}){const{optional:d=!1}=u,h=m.useContext(o);if(h)return h;if(t!==void 0)return t;if(!d)throw new Error(`\`${l}\` must be used within \`${r}\``)}return en(a,"useContext"),[i,a]}en(G0,"createContext");function yr(r,t=[]){let o=[];function i(l,u){const d=m.createContext(u);d.displayName=l+"Context";const h=o.length;o=[...o,u];const g=en(y=>{const{scope:S,children:b,...w}=y,_=S?.[r]?.[h]||d,k=m.useMemo(()=>w,Object.values(w));return A.jsx(_.Provider,{value:k,children:b})},"Provider");g.displayName=l+"Provider";function v(y,S,b={}){const{optional:w=!1}=b,_=S?.[r]?.[h]||d,k=m.useContext(_);if(k)return k;if(u!==void 0)return u;if(!w)throw new Error(`\`${y}\` must be used within \`${l}\``)}return en(v,"useContext"),[g,v]}en(i,"createContext");const a=en(()=>{const l=o.map(u=>m.createContext(u));return en(function(d){const h=d?.[r]||l;return m.useMemo(()=>({[`__scope${r}`]:{...d,[r]:h}}),[d,h])},"useScope")},"createScope");return a.scopeName=r,[i,hp(a,...t)]}en(yr,"createContextScope");function hp(...r){const t=r[0];if(r.length===1)return t;const o=en(()=>{const i=r.map(a=>({useScope:a(),scopeName:a.scopeName}));return en(function(l){const u=i.reduce((d,{useScope:h,scopeName:g})=>{const y=h(l)[`__scope${g}`];return{...d,...y}},{});return m.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])},"useComposedScopes")},"createScope");return o.scopeName=t.scopeName,o}en(hp,"composeContextScopes");var Q0=Object.defineProperty,xt=(r,t)=>Q0(r,"name",{value:t,configurable:!0});function mp(r){const t=r+"CollectionProvider",[o,i]=yr(t),[a,l]=o(t,{collectionRef:{current:null},itemMap:new Map}),u=xt(_=>{const{scope:k,children:R}=_,D=m.useRef(null),T=m.useRef(new Map).current;return A.jsx(a,{scope:k,itemMap:T,collectionRef:D,children:R})},"CollectionProvider");u.displayName=t;const d=r+"CollectionSlot",h=kn(d),g=m.forwardRef((_,k)=>{const{scope:R,children:D}=_,T=l(d,R),O=Ge(k,T.collectionRef);return A.jsx(h,{ref:O,children:D})});g.displayName=d;const v=r+"CollectionItemSlot",y="data-radix-collection-item",S=kn(v),b=m.forwardRef((_,k)=>{const{scope:R,children:D,...T}=_,O=m.useRef(null),V=Ge(k,O),L=l(v,R);return m.useEffect(()=>(L.itemMap.set(O,{ref:O,...T}),()=>{L.itemMap.delete(O)})),A.jsx(S,{[y]:"",ref:V,children:D})});b.displayName=v;function w(_){const k=l(r+"CollectionConsumer",_);return m.useCallback(()=>{const D=k.collectionRef.current;if(!D)return[];const T=Array.from(D.querySelectorAll(`[${y}]`));return Array.from(k.itemMap.values()).sort((L,B)=>T.indexOf(L.ref.current)-T.indexOf(B.ref.current))},[k.collectionRef,k.itemMap])}return xt(w,"useCollection"),[{Provider:u,Slot:g,ItemSlot:b},w,i]}xt(mp,"createCollection");var gp=new WeakMap,ac=class qr extends Map{static{xt(this,"OrderedDict")}#e;constructor(t){super(t),this.#e=[...super.keys()],gp.set(this,!0)}set(t,o){return gp.get(this)&&(this.has(t)?this.#e[this.#e.indexOf(t)]=t:this.#e.push(t)),super.set(t,o),this}insert(t,o,i){const a=this.has(o),l=this.#e.length,u=lc(t);let d=u>=0?u:l+u;const h=d<0||d>=l?-1:d;if(h===this.size||a&&h===this.size-1||h===-1)return this.set(o,i),this;const g=this.size+(a?0:1);u<0&&d++;const v=[...this.#e];let y,S=!1;for(let b=d;b<g;b++)if(d===b){let w=v[b];v[b]===o&&(w=v[b+1]),a&&this.delete(o),y=this.get(w),this.set(o,i)}else{!S&&v[b-1]===o&&(S=!0);const w=v[S?b:b-1],_=y;y=this.get(w),this.delete(w),this.set(w,_)}return this}with(t,o,i){const a=new qr(this);return a.insert(t,o,i),a}before(t){const o=this.#e.indexOf(t)-1;if(!(o<0))return this.entryAt(o)}setBefore(t,o,i){const a=this.#e.indexOf(t);return a===-1?this:this.insert(a,o,i)}after(t){let o=this.#e.indexOf(t);if(o=o===-1||o===this.size-1?-1:o+1,o!==-1)return this.entryAt(o)}setAfter(t,o,i){const a=this.#e.indexOf(t);return a===-1?this:this.insert(a+1,o,i)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(t){const o=super.delete(t);return o&&this.#e.splice(this.#e.indexOf(t),1),o}deleteAt(t){const o=this.keyAt(t);return o!==void 0?this.delete(o):!1}at(t){const o=Ws(this.#e,t);if(o!==void 0)return this.get(o)}entryAt(t){const o=Ws(this.#e,t);if(o!==void 0)return[o,this.get(o)]}indexOf(t){return this.#e.indexOf(t)}keyAt(t){return Ws(this.#e,t)}from(t,o){const i=this.indexOf(t);if(i===-1)return;let a=i+o;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(t,o){const i=this.indexOf(t);if(i===-1)return;let a=i+o;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(t,o){let i=0;for(const a of this){if(Reflect.apply(t,o,[a,i,this]))return a;i++}}findIndex(t,o){let i=0;for(const a of this){if(Reflect.apply(t,o,[a,i,this]))return i;i++}return-1}filter(t,o){const i=[];let a=0;for(const l of this)Reflect.apply(t,o,[l,a,this])&&i.push(l),a++;return new qr(i)}map(t,o){const i=[];let a=0;for(const l of this)i.push([l[0],Reflect.apply(t,o,[l,a,this])]),a++;return new qr(i)}reduce(...t){const[o,i]=t;let a=0,l=i??this.at(0);for(const u of this)a===0&&t.length===1?l=u:l=Reflect.apply(o,this,[l,u,a,this]),a++;return l}reduceRight(...t){const[o,i]=t;let a=i??this.at(-1);for(let l=this.size-1;l>=0;l--){const u=this.at(l);l===this.size-1&&t.length===1?a=u:a=Reflect.apply(o,this,[a,u,l,this])}return a}toSorted(t){const o=[...this.entries()].sort(t);return new qr(o)}toReversed(){const t=new qr;for(let o=this.size-1;o>=0;o--){const i=this.keyAt(o),a=this.get(i);t.set(i,a)}return t}toSpliced(...t){const o=[...this.entries()];return o.splice(...t),new qr(o)}slice(t,o){const i=new qr;let a=this.size-1;if(t===void 0)return i;t<0&&(t=t+this.size),o!==void 0&&o>0&&(a=o-1);for(let l=t;l<=a;l++){const u=this.keyAt(l),d=this.get(u);i.set(u,d)}return i}every(t,o){let i=0;for(const a of this){if(!Reflect.apply(t,o,[a,i,this]))return!1;i++}return!0}some(t,o){let i=0;for(const a of this){if(Reflect.apply(t,o,[a,i,this]))return!0;i++}return!1}};function Ws(r,t){if("at"in Array.prototype)return Array.prototype.at.call(r,t);const o=vp(r,t);return o===-1?void 0:r[o]}xt(Ws,"at");function vp(r,t){const o=r.length,i=lc(t),a=i>=0?i:o+i;return a<0||a>=o?-1:a}xt(vp,"toSafeIndex");function lc(r){return r!==r||r===0?0:Math.trunc(r)}xt(lc,"toSafeInteger");function Y0(r){const t=r+"CollectionProvider",[o,i]=yr(t),[a,l]=o(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new ac,setItemMap:xt(()=>{},"setItemMap")}),u=xt(({state:T,...O})=>T?A.jsx(h,{...O,state:T}):A.jsx(d,{...O}),"CollectionProvider");u.displayName=t;const d=xt(T=>{const O=k();return A.jsx(h,{...T,state:O})},"CollectionInit");d.displayName=t+"Init";const h=xt(T=>{const{scope:O,children:V,state:L}=T,B=m.useRef(null),[j,Y]=m.useState(null),ce=Ge(B,Y),[Ce,le]=L;return m.useEffect(()=>{if(!j)return;const ue=wp(()=>{});return ue.observe(j,{childList:!0,subtree:!0}),()=>{ue.disconnect()}},[j]),A.jsx(a,{scope:O,itemMap:Ce,setItemMap:le,collectionRef:ce,collectionRefObject:B,collectionElement:j,children:V})},"CollectionProviderImpl");h.displayName=t+"Impl";const g=r+"CollectionSlot",v=kn(g),y=m.forwardRef((T,O)=>{const{scope:V,children:L}=T,B=l(g,V),j=Ge(O,B.collectionRef);return A.jsx(v,{ref:j,children:L})});y.displayName=g;const S=r+"CollectionItemSlot",b="data-radix-collection-item",w=kn(S),_=m.forwardRef((T,O)=>{const{scope:V,children:L,...B}=T,j=m.useRef(null),[Y,ce]=m.useState(null),Ce=Ge(O,j,ce),le=l(S,V),{setItemMap:ue}=le,se=m.useRef(B);yp(se.current,B)||(se.current=B);const be=se.current;return m.useEffect(()=>{const ae=be;return ue(oe=>Y?oe.has(Y)?oe.set(Y,{...ae,element:Y}).toSorted(cc):(oe.set(Y,{...ae,element:Y}),oe.toSorted(cc)):oe),()=>{ue(oe=>!Y||!oe.has(Y)?oe:(oe.delete(Y),new ac(oe)))}},[Y,be,ue]),A.jsx(w,{[b]:"",ref:Ce,children:L})});_.displayName=S;function k(){return m.useState(new ac)}xt(k,"useInitCollection");function R(T){const{itemMap:O}=l(r+"CollectionConsumer",T);return O}return xt(R,"useCollection"),[{Provider:u,Slot:y,ItemSlot:_},{createCollectionScope:i,useCollection:R,useInitCollection:k}]}xt(Y0,"createCollection");function yp(r,t){if(r===t)return!0;if(typeof r!="object"||typeof t!="object"||r==null||t==null)return!1;const o=Object.keys(r),i=Object.keys(t);if(o.length!==i.length)return!1;for(const a of o)if(!Object.prototype.hasOwnProperty.call(t,a)||r[a]!==t[a])return!1;return!0}xt(yp,"shallowEqual");function xp(r,t){return!!(t.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_PRECEDING)}xt(xp,"isElementPreceding");function cc(r,t){return!r[1].element||!t[1].element?0:xp(r[1].element,t[1].element)?-1:1}xt(cc,"sortByDocumentPosition");function wp(r){return new MutationObserver(o=>{for(const i of o)if(i.type==="childList"){r();return}})}xt(wp,"getChildListObserver");var X0=Object.defineProperty,Po=(r,t)=>X0(r,"name",{value:t,configurable:!0}),Sp=!!(typeof window<"u"&&window.document&&window.document.createElement);function We(r,t,{checkForDefaultPrevented:o=!0}={}){return Po(function(a){if(r?.(a),o===!1||!a||!a.defaultPrevented)return t?.(a)},"handleEvent")}Po(We,"composeEventHandlers");function J0(r){if(!Sp)throw new Error("Cannot access window outside of the DOM");return r?.ownerDocument?.defaultView??window}Po(J0,"getOwnerWindow");function uc(r){if(!Sp)throw new Error("Cannot access document outside of the DOM");return r?.ownerDocument??document}Po(uc,"getOwnerDocument");function bp(r,t=!1){const{activeElement:o}=uc(r);if(!o?.nodeName)return null;if(kp(o)&&o.contentDocument)return bp(o.contentDocument.body,t);if(t){const i=o.getAttribute("aria-activedescendant");if(i){const a=uc(o).getElementById(i);if(a)return a}}return o}Po(bp,"getActiveElement");function kp(r){return r.tagName==="IFRAME"}Po(kp,"isFrame");var ft=globalThis?.document?m.useLayoutEffect:()=>{},ew=Object.defineProperty,tw=(r,t)=>ew(r,"name",{value:t,configurable:!0}),Cp=Si[" useEffectEvent ".trim().toString()],_p=Si[" useInsertionEffect ".trim().toString()];function Ep(r){if(typeof Cp=="function")return Cp(r);const t=m.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof _p=="function"?_p(()=>{t.current=r}):ft(()=>{t.current=r}),m.useMemo(()=>((...o)=>t.current?.(...o)),[])}tw(Ep,"useEffectEvent");var nw=Object.defineProperty,Pi=(r,t)=>nw(r,"name",{value:t,configurable:!0}),rw=Si[" useInsertionEffect ".trim().toString()]||ft;function Ii({prop:r,defaultProp:t,onChange:o=Pi(()=>{},"onChange"),caller:i}){const[a,l,u]=Rp({defaultProp:t,onChange:o}),d=r!==void 0,h=d?r:a,g=m.useCallback(v=>{if(d){const y=Pp(v)?v(r):v;y!==r&&u.current?.(y)}else l(v)},[d,r,l,u]);return[h,g]}Pi(Ii,"useControllableState");function Rp({defaultProp:r,onChange:t}){const[o,i]=m.useState(r),a=m.useRef(o),l=m.useRef(t);return rw(()=>{l.current=t},[t]),m.useEffect(()=>{a.current!==o&&(l.current?.(o),a.current=o)},[o,a]),[o,i,l]}Pi(Rp,"useUncontrolledState");function Pp(r){return typeof r=="function"}Pi(Pp,"isFunction");var Ip=Symbol("RADIX:SYNC_STATE");function ow(r,t,o,i){const{prop:a,defaultProp:l,onChange:u,caller:d}=t,h=a!==void 0,g=Ep(u),v=[{...o,state:l}];i&&v.push(i);const[y,S]=m.useReducer((k,R)=>{if(R.type===Ip)return{...k,state:R.state};const D=r(k,R);return h&&!Object.is(D.state,k.state)&&g(D.state),D},...v),b=y.state,w=m.useRef(b);m.useEffect(()=>{w.current!==b&&(w.current=b,h||g(b))},[b,w,h]);const _=m.useMemo(()=>a!==void 0?{...y,state:a}:y,[y,a]);return m.useEffect(()=>{h&&!Object.is(a,y.state)&&S({type:Ip,state:a})},[a,y.state,h]),[_,S]}Pi(ow,"useControllableStateReducer");var iw=Object.defineProperty,Kn=(r,t)=>iw(r,"name",{value:t,configurable:!0});function Op(r,t){return m.useReducer((o,i)=>t[o][i]??o,r)}Kn(Op,"useStateMachine");var Io=Kn(r=>{const{present:t,children:o}=r,i=Np(t),a=typeof o=="function"?o({present:i.isPresent}):m.Children.only(o),l=Tp(i.ref,Dp(a));return typeof o=="function"||i.isPresent?m.cloneElement(a,{ref:l}):null},"Presence");function Np(r){const[t,o]=m.useState(),i=m.useRef(null),a=m.useRef(r),l=m.useRef("none"),u=m.useRef(void 0),d=r?"mounted":"unmounted",[h,g]=Op(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return m.useEffect(()=>{h==="mounted"?(l.current=u.current??Oo(i.current),u.current=void 0):l.current="none"},[h]),ft(()=>{const v=i.current,y=a.current;if(y!==r){const b=l.current,w=Oo(v);r?(u.current=w,g("MOUNT")):w==="none"||v?.display==="none"?g("UNMOUNT"):g(y&&b!==w?"ANIMATION_OUT":"UNMOUNT"),a.current=r}},[r,g]),ft(()=>{if(t){let v;const y=t.ownerDocument.defaultView??window,S=Kn(w=>{const k=Oo(i.current).includes(CSS.escape(w.animationName));if(w.target===t&&k&&(g("ANIMATION_END"),!a.current)){const R=t.style.animationFillMode;t.style.animationFillMode="forwards",v=y.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=R)})}},"handleAnimationEnd"),b=Kn(w=>{w.target===t&&(l.current=Oo(i.current))},"handleAnimationStart");return t.addEventListener("animationstart",b),t.addEventListener("animationcancel",S),t.addEventListener("animationend",S),()=>{y.clearTimeout(v),t.removeEventListener("animationstart",b),t.removeEventListener("animationcancel",S),t.removeEventListener("animationend",S)}}else g("ANIMATION_END")},[t,g]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:m.useCallback(v=>{if(v){const y=getComputedStyle(v);i.current=y,u.current=Oo(y)}else i.current=null;o(v)},[])}}Kn(Np,"usePresence");function dc(r,t){if(typeof r=="function")return r(t);r!=null&&(r.current=t)}Kn(dc,"setRef");function Tp(...r){const t=m.useRef(r);return t.current=r,m.useCallback(o=>{const i=t.current;let a=!1;const l=i.map(u=>{const d=dc(u,o);return!a&&typeof d=="function"&&(a=!0),d});if(a)return()=>{for(let u=0;u<l.length;u++){const d=l[u];typeof d=="function"?d():dc(i[u],null)}}},[])}Kn(Tp,"useStableComposedRefs");function Oo(r){return r?.animationName||"none"}Kn(Oo,"getAnimationName");function Dp(r){let t=Object.getOwnPropertyDescriptor(r.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?r.ref:(t=Object.getOwnPropertyDescriptor(r,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?r.props.ref:r.props.ref||r.ref)}Kn(Dp,"getElementRef");var sw=Object.defineProperty,aw=(r,t)=>sw(r,"name",{value:t,configurable:!0}),lw=Si[" useId ".trim().toString()]||(()=>{}),cw=0;function Kt(r){const[t,o]=m.useState(lw());return ft(()=>{r||o(i=>i??String(cw++))},[r]),r||(t?`radix-${t}`:"")}aw(Kt,"useId");var uw=Object.defineProperty,dw=(r,t)=>uw(r,"name",{value:t,configurable:!0}),fw=m.createContext(void 0);function Ap(r){const t=m.useContext(fw);return r||t||"ltr"}dw(Ap,"useDirection");var pw=Object.defineProperty,hw=(r,t)=>pw(r,"name",{value:t,configurable:!0});function Cn(r){const t=m.useRef(r);return m.useEffect(()=>{t.current=r}),m.useMemo(()=>((...o)=>t.current?.(...o)),[])}hw(Cn,"useCallbackRef");var mw=Object.defineProperty,wt=(r,t)=>mw(r,"name",{value:t,configurable:!0}),fc="dismissableLayer.update",gw="dismissableLayer.pointerDownOutside",vw="dismissableLayer.focusOutside",Lp,$p=m.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),pc=m.forwardRef(wt(function(t,o){const{disableOutsidePointerEvents:i=!1,deferPointerDownOutside:a=!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:h,onDismiss:g,...v}=t,y=m.useContext($p),[S,b]=m.useState(null),w=S?.ownerDocument??globalThis?.document,[,_]=m.useState({}),k=Ge(o,b),R=Array.from(y.layers),[D]=[...y.layersWithOutsidePointerEventsDisabled].slice(-1),T=D?R.indexOf(D):-1,O=S?R.indexOf(S):-1,V=y.layersWithOutsidePointerEventsDisabled.size>0,L=O>=T,B=m.useRef(!1),j=Mp(le=>{u?.(le),h?.(le),le.defaultPrevented||g?.()},{ownerDocument:w,deferPointerDownOutside:a,isDeferredPointerDownOutsideRef:B,dismissableSurfaces:y.dismissableSurfaces,shouldHandlePointerDownOutside:m.useCallback(le=>{if(!(le instanceof Node))return!1;const ue=[...y.branches].some(se=>se.contains(le));return L&&!ue},[y.branches,L])}),Y=zp(le=>{if(a&&B.current)return;const ue=le.target;[...y.branches].some(be=>be.contains(ue))||(d?.(le),h?.(le),le.defaultPrevented||g?.())},w),ce=S?O===R.length-1:!1,Ce=Cn(le=>{le.key==="Escape"&&(l?.(le),!le.defaultPrevented&&g&&(le.preventDefault(),g()))});return m.useEffect(()=>{if(ce)return w.addEventListener("keydown",Ce,{capture:!0}),()=>w.removeEventListener("keydown",Ce,{capture:!0})},[w,ce,Ce]),m.useEffect(()=>{if(S)return i&&(y.layersWithOutsidePointerEventsDisabled.size===0&&(Lp=w.body.style.pointerEvents,w.body.style.pointerEvents="none"),y.layersWithOutsidePointerEventsDisabled.add(S)),y.layers.add(S),hc(),()=>{i&&(y.layersWithOutsidePointerEventsDisabled.delete(S),y.layersWithOutsidePointerEventsDisabled.size===0&&(w.body.style.pointerEvents=Lp))}},[S,w,i,y]),m.useEffect(()=>()=>{S&&(y.layers.delete(S),y.layersWithOutsidePointerEventsDisabled.delete(S),hc())},[S,y]),m.useEffect(()=>{const le=wt(()=>_({}),"handleUpdate");return document.addEventListener(fc,le),()=>document.removeEventListener(fc,le)},[]),A.jsx(Ze.div,{...v,ref:k,style:{pointerEvents:V?L?"auto":"none":void 0,...t.style},onFocusCapture:We(t.onFocusCapture,Y.onFocusCapture),onBlurCapture:We(t.onBlurCapture,Y.onBlurCapture),onPointerDownCapture:We(t.onPointerDownCapture,j.onPointerDownCapture)})},"DismissableLayer"));function jp(){const r=m.useContext($p),[t,o]=m.useState(null);return m.useEffect(()=>{if(t)return r.dismissableSurfaces.add(t),()=>{r.dismissableSurfaces.delete(t)}},[t,r.dismissableSurfaces]),o}wt(jp,"useDismissableLayerSurface");var yw=wt(()=>!0,"IS_TRUE");function Mp(r,t){const{ownerDocument:o=globalThis?.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:l,shouldHandlePointerDownOutside:u=yw}=t,d=Cn(r),h=m.useRef(!1),g=m.useRef(!1),v=m.useRef(new Map),y=m.useRef(()=>{});return m.useEffect(()=>{function S(){g.current=!1,a.current=!1,v.current.clear()}wt(S,"resetOutsideInteraction");function b(){return Array.from(v.current.values()).some(Boolean)}wt(b,"isOutsideInteractionIntercepted");function w(T){if(!g.current)return;const O=T.target;O instanceof Node&&[...l].some(L=>L.contains(O))||v.current.set(T.type,!0),T.type==="click"&&window.setTimeout(()=>{g.current&&y.current()},0)}wt(w,"handleInteractionCapture");function _(T){g.current&&v.current.set(T.type,!1)}wt(_,"handleInteractionBubble");const k=wt(T=>{if(T.target&&!h.current){let O=function(){o.removeEventListener("click",y.current);const L=b();S(),L||mc(gw,d,V,{discrete:!0})};if(wt(O,"handleAndDispatchPointerDownOutsideEvent"),!u(T.target)){o.removeEventListener("click",y.current),S(),h.current=!1;return}const V={originalEvent:T};g.current=!0,a.current=i&&T.button===0,v.current.clear(),!i||T.button!==0?O():(o.removeEventListener("click",y.current),y.current=O,o.addEventListener("click",y.current,{once:!0}))}else o.removeEventListener("click",y.current),S();h.current=!1},"handlePointerDown"),R=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const T of R)o.addEventListener(T,w,!0),o.addEventListener(T,_);const D=window.setTimeout(()=>{o.addEventListener("pointerdown",k)},0);return()=>{window.clearTimeout(D),o.removeEventListener("pointerdown",k),o.removeEventListener("click",y.current);for(const T of R)o.removeEventListener(T,w,!0),o.removeEventListener(T,_)}},[o,d,i,a,l,u]),{onPointerDownCapture:wt(()=>h.current=!0,"onPointerDownCapture")}}wt(Mp,"usePointerDownOutside");function zp(r,t=globalThis?.document){const o=Cn(r),i=m.useRef(!1);return m.useEffect(()=>{const a=wt(l=>{l.target&&!i.current&&mc(vw,o,{originalEvent:l},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,o]),{onFocusCapture:wt(()=>i.current=!0,"onFocusCapture"),onBlurCapture:wt(()=>i.current=!1,"onBlurCapture")}}wt(zp,"useFocusOutside");function hc(){const r=new CustomEvent(fc);document.dispatchEvent(r)}wt(hc,"dispatchUpdate");function mc(r,t,o,{discrete:i}){const a=o.originalEvent.target,l=new CustomEvent(r,{bubbles:!1,cancelable:!0,detail:o});t&&a.addEventListener(r,t,{once:!0}),i?pp(a,l):a.dispatchEvent(l)}wt(mc,"handleAndDispatchCustomEvent");var xw=Object.defineProperty,Dt=(r,t)=>xw(r,"name",{value:t,configurable:!0}),gc="focusScope.autoFocusOnMount",vc="focusScope.autoFocusOnUnmount",Fp={bubbles:!1,cancelable:!0},yc=m.forwardRef(Dt(function(t,o){const{loop:i=!1,trapped:a=!1,onMountAutoFocus:l,onUnmountAutoFocus:u,...d}=t,[h,g]=m.useState(null),v=Cn(l),y=Cn(u),S=m.useRef(null),b=Ge(o,g),w=m.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;m.useEffect(()=>{if(a){let k=function(O){if(w.paused||!h)return;const V=O.target;h.contains(V)?S.current=V:Zn(S.current,{select:!0})},R=function(O){if(w.paused||!h)return;const V=O.relatedTarget;V!==null&&(h.contains(V)||Zn(S.current,{select:!0}))},D=function(O){if(document.activeElement===document.body)for(const L of O)L.removedNodes.length>0&&Zn(h)};Dt(k,"handleFocusIn"),Dt(R,"handleFocusOut"),Dt(D,"handleMutations"),document.addEventListener("focusin",k),document.addEventListener("focusout",R);const T=new MutationObserver(D);return h&&T.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",R),T.disconnect()}}},[a,h,w.paused]),m.useEffect(()=>{if(h){Wp.add(w);const k=document.activeElement;if(!h.contains(k)){const D=new CustomEvent(gc,Fp);h.addEventListener(gc,v),h.dispatchEvent(D),D.defaultPrevented||(Vp(Zp(xc(h)),{select:!0}),document.activeElement===k&&Zn(h))}return()=>{h.removeEventListener(gc,v),setTimeout(()=>{const D=new CustomEvent(vc,Fp);h.addEventListener(vc,y),h.dispatchEvent(D),D.defaultPrevented||Zn(k??document.body,{select:!0}),h.removeEventListener(vc,y),Wp.remove(w)},0)}}},[h,v,y,w]);const _=m.useCallback(k=>{if(!i&&!a||w.paused)return;const R=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,D=document.activeElement;if(R&&D){const T=k.currentTarget,[O,V]=Up(T);O&&V?!k.shiftKey&&D===V?(k.preventDefault(),i&&Zn(O,{select:!0})):k.shiftKey&&D===O&&(k.preventDefault(),i&&Zn(V,{select:!0})):D===T&&k.preventDefault()}},[i,a,w.paused]);return A.jsx(Ze.div,{tabIndex:-1,...d,ref:b,onKeyDown:_})},"FocusScope"));function Vp(r,{select:t=!1}={}){const o=document.activeElement;for(const i of r)if(Zn(i,{select:t}),document.activeElement!==o)return}Dt(Vp,"focusFirst");function Up(r){const t=xc(r),o=wc(t,r),i=wc(t.reverse(),r);return[o,i]}Dt(Up,"getTabbableEdges");function xc(r){const t=[],o=document.createTreeWalker(r,NodeFilter.SHOW_ELEMENT,{acceptNode:Dt(i=>{const a=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||a?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;o.nextNode();)t.push(o.currentNode);return t}Dt(xc,"getTabbableCandidates");function wc(r,t){const o=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(const i of r)if(!(o?!i.checkVisibility({checkVisibilityCSS:!0}):Bp(i,{upTo:t})))return i}Dt(wc,"findVisible");function Bp(r,{upTo:t}){if(getComputedStyle(r).visibility==="hidden")return!0;for(;r;){if(t!==void 0&&r===t)return!1;if(getComputedStyle(r).display==="none")return!0;r=r.parentElement}return!1}Dt(Bp,"isHidden");function Hp(r){return r instanceof HTMLInputElement&&"select"in r}Dt(Hp,"isSelectableInput");function Zn(r,{select:t=!1}={}){if(r&&r.focus){const o=document.activeElement;r.focus({preventScroll:!0}),r!==o&&Hp(r)&&t&&r.select()}}Dt(Zn,"focus");var Wp=Kp();function Kp(){let r=[];return{add(t){const o=r[0];t!==o&&o?.pause(),r=Sc(r,t),r.unshift(t)},remove(t){r=Sc(r,t),r[0]?.resume()}}}Dt(Kp,"createFocusScopesStack");function Sc(r,t){const o=[...r],i=o.indexOf(t);return i!==-1&&o.splice(i,1),o}Dt(Sc,"arrayRemove");function Zp(r){return r.filter(t=>t.tagName!=="A")}Dt(Zp,"removeLinks");var ww=Object.defineProperty,Sw=(r,t)=>ww(r,"name",{value:t,configurable:!0}),bc=m.forwardRef(Sw(function(t,o){const{container:i,...a}=t,[l,u]=m.useState(!1);ft(()=>u(!0),[]);const d=i||l&&globalThis?.document?.body;return d?Ri.createPortal(A.jsx(Ze.div,{...a,ref:o}),d):null},"Portal")),bw=Object.defineProperty,kc=(r,t)=>bw(r,"name",{value:t,configurable:!0}),Ks=0,No=null;function kw(r){return Oi(),r.children}kc(kw,"FocusGuards");function Oi(){m.useEffect(()=>{No||(No={start:Cc(),end:Cc()});const{start:r,end:t}=No;return document.body.firstElementChild!==r&&document.body.insertAdjacentElement("afterbegin",r),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Ks++,()=>{Ks===1&&(No?.start.remove(),No?.end.remove(),No=null),Ks=Math.max(0,Ks-1)}},[])}kc(Oi,"useFocusGuards");function Cc(){const r=document.createElement("span");return r.setAttribute("data-radix-focus-guard",""),r.tabIndex=0,r.style.outline="none",r.style.opacity="0",r.style.position="fixed",r.style.pointerEvents="none",r}kc(Cc,"createFocusGuard");var _n=function(){return _n=Object.assign||function(t){for(var o,i=1,a=arguments.length;i<a;i++){o=arguments[i];for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(t[l]=o[l])}return t},_n.apply(this,arguments)};function qp(r,t){var o={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&t.indexOf(i)<0&&(o[i]=r[i]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,i=Object.getOwnPropertySymbols(r);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(r,i[a])&&(o[i[a]]=r[i[a]]);return o}function Cw(r,t,o){if(o||arguments.length===2)for(var i=0,a=t.length,l;i<a;i++)(l||!(i in t))&&(l||(l=Array.prototype.slice.call(t,0,i)),l[i]=t[i]);return r.concat(l||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Zs="right-scroll-bar-position",qs="width-before-scroll-bar",_w="with-scroll-bars-hidden",Ew="--removed-body-scroll-bar-size";function _c(r,t){return typeof r=="function"?r(t):r&&(r.current=t),r}function Rw(r,t){var o=m.useState(function(){return{value:r,callback:t,facade:{get current(){return o.value},set current(i){var a=o.value;a!==i&&(o.value=i,o.callback(i,a))}}}})[0];return o.callback=t,o.facade}var Pw=typeof window<"u"?m.useLayoutEffect:m.useEffect,Gp=new WeakMap;function Iw(r,t){var o=Rw(null,function(i){return r.forEach(function(a){return _c(a,i)})});return Pw(function(){var i=Gp.get(o);if(i){var a=new Set(i),l=new Set(r),u=o.current;a.forEach(function(d){l.has(d)||_c(d,null)}),l.forEach(function(d){a.has(d)||_c(d,u)})}Gp.set(o,r)},[r]),o}function Ow(r){return r}function Nw(r,t){t===void 0&&(t=Ow);var o=[],i=!1,a={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:r},useMedium:function(l){var u=t(l,i);return o.push(u),function(){o=o.filter(function(d){return d!==u})}},assignSyncMedium:function(l){for(i=!0;o.length;){var u=o;o=[],u.forEach(l)}o={push:function(d){return l(d)},filter:function(){return o}}},assignMedium:function(l){i=!0;var u=[];if(o.length){var d=o;o=[],d.forEach(l),u=o}var h=function(){var v=u;u=[],v.forEach(l)},g=function(){return Promise.resolve().then(h)};g(),o={push:function(v){u.push(v),g()},filter:function(v){return u=u.filter(v),o}}}};return a}function Tw(r){r===void 0&&(r={});var t=Nw(null);return t.options=_n({async:!0,ssr:!1},r),t}var Qp=function(r){var t=r.sideCar,o=qp(r,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return m.createElement(i,_n({},o))};Qp.isSideCarExport=!0;function Dw(r,t){return r.useMedium(t),Qp}var Yp=Tw(),Ec=function(){},Gs=m.forwardRef(function(r,t){var o=m.useRef(null),i=m.useState({onScrollCapture:Ec,onWheelCapture:Ec,onTouchMoveCapture:Ec}),a=i[0],l=i[1],u=r.forwardProps,d=r.children,h=r.className,g=r.removeScrollBar,v=r.enabled,y=r.shards,S=r.sideCar,b=r.noRelative,w=r.noIsolation,_=r.inert,k=r.allowPinchZoom,R=r.as,D=R===void 0?"div":R,T=r.gapMode,O=qp(r,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),V=S,L=Iw([o,t]),B=_n(_n({},O),a);return m.createElement(m.Fragment,null,v&&m.createElement(V,{sideCar:Yp,removeScrollBar:g,shards:y,noRelative:b,noIsolation:w,inert:_,setCallbacks:l,allowPinchZoom:!!k,lockRef:o,gapMode:T}),u?m.cloneElement(m.Children.only(d),_n(_n({},B),{ref:L})):m.createElement(D,_n({},B,{className:h,ref:L}),d))});Gs.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Gs.classNames={fullWidth:qs,zeroRight:Zs};var Aw=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Lw(){if(!document)return null;var r=document.createElement("style");r.type="text/css";var t=Aw();return t&&r.setAttribute("nonce",t),r}function $w(r,t){r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}function jw(r){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(r)}var Mw=function(){var r=0,t=null;return{add:function(o){r==0&&(t=Lw())&&($w(t,o),jw(t)),r++},remove:function(){r--,!r&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},zw=function(){var r=Mw();return function(t,o){m.useEffect(function(){return r.add(t),function(){r.remove()}},[t&&o])}},Xp=function(){var r=zw(),t=function(o){var i=o.styles,a=o.dynamic;return r(i,a),null};return t},Fw={left:0,top:0,right:0,gap:0},Rc=function(r){return parseInt(r||"",10)||0},Vw=function(r){var t=window.getComputedStyle(document.body),o=t[r==="padding"?"paddingLeft":"marginLeft"],i=t[r==="padding"?"paddingTop":"marginTop"],a=t[r==="padding"?"paddingRight":"marginRight"];return[Rc(o),Rc(i),Rc(a)]},Uw=function(r){if(r===void 0&&(r="margin"),typeof window>"u")return Fw;var t=Vw(r),o=document.documentElement.clientWidth,i=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,i-o+t[2]-t[0])}},Bw=Xp(),To="data-scroll-locked",Hw=function(r,t,o,i){var a=r.left,l=r.top,u=r.right,d=r.gap;return o===void 0&&(o="margin"),`
|
|
64
|
-
.`.concat(
|
|
65
|
-
overflow: hidden `).concat(
|
|
66
|
-
padding-right: `).concat(d,"px ").concat(
|
|
63
|
+
`}const uh=(...n)=>n.filter((e,o,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===o).join(" ").trim();const yb=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const xb=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,o,s)=>s?s.toUpperCase():o.toLowerCase());const dh=n=>{const e=xb(n);return e.charAt(0).toUpperCase()+e.slice(1)};var eu={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const wb=n=>{for(const e in n)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},bb=f.createContext({}),Sb=()=>f.useContext(bb),Cb=f.forwardRef(({color:n,size:e,strokeWidth:o,absoluteStrokeWidth:s,className:i="",children:l,iconNode:u,...d},h)=>{const{size:m=24,strokeWidth:y=2,absoluteStrokeWidth:v=!1,color:x="currentColor",className:b=""}=Sb()??{},S=s??v?Number(o??y)*24/Number(e??m):o??y;return f.createElement("svg",{ref:h,...eu,width:e??m??eu.width,height:e??m??eu.height,stroke:n??x,strokeWidth:S,className:uh("lucide",b,i),...!l&&!wb(d)&&{"aria-hidden":"true"},...d},[...u.map(([C,k])=>f.createElement(C,k)),...Array.isArray(l)?l:[l]])});const Kt=(n,e)=>{const o=f.forwardRef(({className:s,...i},l)=>f.createElement(Cb,{ref:l,iconNode:e,className:uh(`lucide-${yb(dh(n))}`,`lucide-${n}`,s),...i}));return o.displayName=dh(n),o};const Js=Kt("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const tu=Kt("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const nu=Kt("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const fh=Kt("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const ph=Kt("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);const kb=Kt("file-braces",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);const Eb=Kt("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);const hh=Kt("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const ru=Kt("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);const mh=Kt("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);const _b=Kt("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const Pb=Kt("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);const gh=Kt("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const Rb=Kt("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var ou={exports:{}},ei={};var vh;function Ib(){if(vh)return ei;vh=1;var n=jc(),e=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(d,h,m){var y,v={},x=null,b=null;m!==void 0&&(x=""+m),h.key!==void 0&&(x=""+h.key),h.ref!==void 0&&(b=h.ref);for(y in h)s.call(h,y)&&!l.hasOwnProperty(y)&&(v[y]=h[y]);if(d&&d.defaultProps)for(y in h=d.defaultProps,h)v[y]===void 0&&(v[y]=h[y]);return{$$typeof:e,type:d,key:x,ref:b,props:v,_owner:i.current}}return ei.Fragment=o,ei.jsx=u,ei.jsxs=u,ei}var yh;function Tb(){return yh||(yh=1,ou.exports=Ib()),ou.exports}var E=Tb(),ti=Pp(),Db=Object.defineProperty,su=(n,e)=>Db(n,"name",{value:e,configurable:!0});function iu(n,e){if(typeof n=="function")return n(e);n!=null&&(n.current=e)}su(iu,"setRef");function Po(...n){return e=>{let o=!1;const s=n.map(i=>{const l=iu(i,e);return!o&&typeof l=="function"&&(o=!0),l});if(o)return()=>{for(let i=0;i<s.length;i++){const l=s[i];typeof l=="function"?l():iu(n[i],null)}}}}su(Po,"composeRefs");function Ve(...n){return f.useCallback(Po(...n),n)}su(Ve,"useComposedRefs");var Nb=Object.defineProperty,Cn=(n,e)=>Nb(n,"name",{value:e,configurable:!0});function kn(n){const e=f.forwardRef((o,s)=>{let{children:i,...l}=o,u=null,d=!1;const h=[];au(i)&&typeof Ra=="function"&&(i=Ra(i._payload)),f.Children.forEach(i,x=>{if(kh(x)){d=!0;const b=x;let S="child"in b.props?b.props.child:b.props.children;au(S)&&typeof Ra=="function"&&(S=Ra(S._payload)),u=Ob(b,S),h.push(u?.props?.children)}else h.push(x)}),u?u=f.cloneElement(u,void 0,h):!d&&f.Children.count(i)===1&&f.isValidElement(i)&&(u=i);const m=u?Ch(u):void 0,y=Ve(s,m);if(!u){if(i||i===0)throw new Error(d?Mb(n):$b(n));return i}const v=Sh(l,u.props??{});return u.type!==f.Fragment&&(v.ref=s?y:m),f.cloneElement(u,v)});return e.displayName=`${n}.Slot`,e}Cn(kn,"createSlot");var xh=kn("Slot"),wh=Symbol.for("radix.slottable");function bh(n){const e=Cn(o=>"child"in o?o.children(o.child):o.children,"Slottable");return e.displayName=`${n}.Slottable`,e.__radixId=wh,e}Cn(bh,"createSlottable");var Ob=Cn((n,e)=>{if("child"in n.props){const o=n.props.child;return f.isValidElement(o)?f.cloneElement(o,void 0,n.props.children(o.props.children)):null}return f.isValidElement(e)?e:null},"getSlottableElementFromSlottable");function Sh(n,e){const o={...e};for(const s in e){const i=n[s],l=e[s];/^on[A-Z]/.test(s)?i&&l?o[s]=(...d)=>{const h=l(...d);return i(...d),h}:i&&(o[s]=i):s==="style"?o[s]={...i,...l}:s==="className"&&(o[s]=[i,l].filter(Boolean).join(" "))}return{...n,...o}}Cn(Sh,"mergeProps");function Ch(n){let e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,o=e&&"isReactWarning"in e&&e.isReactWarning;return o?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get,o=e&&"isReactWarning"in e&&e.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}Cn(Ch,"getElementRef");function kh(n){return f.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===wh}Cn(kh,"isSlottable");var Ab=Symbol.for("react.lazy");function au(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===Ab&&"_payload"in n&&Eh(n._payload)}Cn(au,"isLazyComponent");function Eh(n){return typeof n=="object"&&n!==null&&"then"in n}Cn(Eh,"isPromiseLike");var $b=Cn(n=>`${n} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Mb=Cn(n=>`${n} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),Ra=ns[" use ".trim().toString()],jb=Object.defineProperty,Lb=(n,e)=>jb(n,"name",{value:e,configurable:!0}),Fb=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ae=Fb.reduce((n,e)=>{const o=kn(`Primitive.${e}`),s=f.forwardRef((i,l)=>{const{asChild:u,...d}=i,h=u?o:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(h,{...d,ref:l})});return s.displayName=`Primitive.${e}`,{...n,[e]:s}},{});function lu(n,e){n&&ti.flushSync(()=>n.dispatchEvent(e))}Lb(lu,"dispatchDiscreteCustomEvent");var zb=Object.defineProperty,Vb=(n,e)=>zb(n,"name",{value:e,configurable:!0}),_h=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Ub=f.forwardRef(Vb(function(e,o){return E.jsx(Ae.span,{...e,ref:o,style:{..._h,...e.style}})},"VisuallyHidden")),Bb=Ub,Hb=Object.defineProperty,mn=(n,e)=>Hb(n,"name",{value:e,configurable:!0});function Wb(n,e){const o=f.createContext(e);o.displayName=n+"Context";const s=mn(l=>{const{children:u,...d}=l,h=f.useMemo(()=>d,Object.values(d));return E.jsx(o.Provider,{value:h,children:u})},"Provider");s.displayName=n+"Provider";function i(l,u={}){const{optional:d=!1}=u,h=f.useContext(o);if(h)return h;if(e!==void 0)return e;if(!d)throw new Error(`\`${l}\` must be used within \`${n}\``)}return mn(i,"useContext"),[s,i]}mn(Wb,"createContext");function tn(n,e=[]){let o=[];function s(l,u){const d=f.createContext(u);d.displayName=l+"Context";const h=o.length;o=[...o,u];const m=mn(v=>{const{scope:x,children:b,...S}=v,C=x?.[n]?.[h]||d,k=f.useMemo(()=>S,Object.values(S));return E.jsx(C.Provider,{value:k,children:b})},"Provider");m.displayName=l+"Provider";function y(v,x,b={}){const{optional:S=!1}=b,C=x?.[n]?.[h]||d,k=f.useContext(C);if(k)return k;if(u!==void 0)return u;if(!S)throw new Error(`\`${v}\` must be used within \`${l}\``)}return mn(y,"useContext"),[m,y]}mn(s,"createContext");const i=mn(()=>{const l=o.map(u=>f.createContext(u));return mn(function(d){const h=d?.[n]||l;return f.useMemo(()=>({[`__scope${n}`]:{...d,[n]:h}}),[d,h])},"useScope")},"createScope");return i.scopeName=n,[s,Ph(i,...e)]}mn(tn,"createContextScope");function Ph(...n){const e=n[0];if(n.length===1)return e;const o=mn(()=>{const s=n.map(i=>({useScope:i(),scopeName:i.scopeName}));return mn(function(l){const u=s.reduce((d,{useScope:h,scopeName:m})=>{const v=h(l)[`__scope${m}`];return{...d,...v}},{});return f.useMemo(()=>({[`__scope${e.scopeName}`]:u}),[u])},"useComposedScopes")},"createScope");return o.scopeName=e.scopeName,o}mn(Ph,"composeContextScopes");var Kb=Object.defineProperty,Et=(n,e)=>Kb(n,"name",{value:e,configurable:!0});function Ia(n){const e=n+"CollectionProvider",[o,s]=tn(e),[i,l]=o(e,{collectionRef:{current:null},itemMap:new Map}),u=Et(C=>{const{scope:k,children:N}=C,D=f.useRef(null),O=f.useRef(new Map).current;return E.jsx(i,{scope:k,itemMap:O,collectionRef:D,children:N})},"CollectionProvider");u.displayName=e;const d=n+"CollectionSlot",h=kn(d),m=f.forwardRef((C,k)=>{const{scope:N,children:D}=C,O=l(d,N),R=Ve(k,O.collectionRef);return E.jsx(h,{ref:R,children:D})});m.displayName=d;const y=n+"CollectionItemSlot",v="data-radix-collection-item",x=kn(y),b=f.forwardRef((C,k)=>{const{scope:N,children:D,...O}=C,R=f.useRef(null),L=Ve(k,R),j=l(y,N);return f.useEffect(()=>(j.itemMap.set(R,{ref:R,...O}),()=>{j.itemMap.delete(R)})),E.jsx(x,{[v]:"",ref:L,children:D})});b.displayName=y;function S(C){const k=l(n+"CollectionConsumer",C);return f.useCallback(()=>{const D=k.collectionRef.current;if(!D)return[];const O=Array.from(D.querySelectorAll(`[${v}]`));return Array.from(k.itemMap.values()).sort((j,B)=>O.indexOf(j.ref.current)-O.indexOf(B.ref.current))},[k.collectionRef,k.itemMap])}return Et(S,"useCollection"),[{Provider:u,Slot:m,ItemSlot:b},S,s]}Et(Ia,"createCollection");var Rh=new WeakMap,cu=class wo extends Map{static{Et(this,"OrderedDict")}#e;constructor(e){super(e),this.#e=[...super.keys()],Rh.set(this,!0)}set(e,o){return Rh.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,o),this}insert(e,o,s){const i=this.has(o),l=this.#e.length,u=uu(e);let d=u>=0?u:l+u;const h=d<0||d>=l?-1:d;if(h===this.size||i&&h===this.size-1||h===-1)return this.set(o,s),this;const m=this.size+(i?0:1);u<0&&d++;const y=[...this.#e];let v,x=!1;for(let b=d;b<m;b++)if(d===b){let S=y[b];y[b]===o&&(S=y[b+1]),i&&this.delete(o),v=this.get(S),this.set(o,s)}else{!x&&y[b-1]===o&&(x=!0);const S=y[x?b:b-1],C=v;v=this.get(S),this.delete(S),this.set(S,C)}return this}with(e,o,s){const i=new wo(this);return i.insert(e,o,s),i}before(e){const o=this.#e.indexOf(e)-1;if(!(o<0))return this.entryAt(o)}setBefore(e,o,s){const i=this.#e.indexOf(e);return i===-1?this:this.insert(i,o,s)}after(e){let o=this.#e.indexOf(e);if(o=o===-1||o===this.size-1?-1:o+1,o!==-1)return this.entryAt(o)}setAfter(e,o,s){const i=this.#e.indexOf(e);return i===-1?this:this.insert(i+1,o,s)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){const o=super.delete(e);return o&&this.#e.splice(this.#e.indexOf(e),1),o}deleteAt(e){const o=this.keyAt(e);return o!==void 0?this.delete(o):!1}at(e){const o=Ta(this.#e,e);if(o!==void 0)return this.get(o)}entryAt(e){const o=Ta(this.#e,e);if(o!==void 0)return[o,this.get(o)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return Ta(this.#e,e)}from(e,o){const s=this.indexOf(e);if(s===-1)return;let i=s+o;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.at(i)}keyFrom(e,o){const s=this.indexOf(e);if(s===-1)return;let i=s+o;return i<0&&(i=0),i>=this.size&&(i=this.size-1),this.keyAt(i)}find(e,o){let s=0;for(const i of this){if(Reflect.apply(e,o,[i,s,this]))return i;s++}}findIndex(e,o){let s=0;for(const i of this){if(Reflect.apply(e,o,[i,s,this]))return s;s++}return-1}filter(e,o){const s=[];let i=0;for(const l of this)Reflect.apply(e,o,[l,i,this])&&s.push(l),i++;return new wo(s)}map(e,o){const s=[];let i=0;for(const l of this)s.push([l[0],Reflect.apply(e,o,[l,i,this])]),i++;return new wo(s)}reduce(...e){const[o,s]=e;let i=0,l=s??this.at(0);for(const u of this)i===0&&e.length===1?l=u:l=Reflect.apply(o,this,[l,u,i,this]),i++;return l}reduceRight(...e){const[o,s]=e;let i=s??this.at(-1);for(let l=this.size-1;l>=0;l--){const u=this.at(l);l===this.size-1&&e.length===1?i=u:i=Reflect.apply(o,this,[i,u,l,this])}return i}toSorted(e){const o=[...this.entries()].sort(e);return new wo(o)}toReversed(){const e=new wo;for(let o=this.size-1;o>=0;o--){const s=this.keyAt(o),i=this.get(s);e.set(s,i)}return e}toSpliced(...e){const o=[...this.entries()];return o.splice(...e),new wo(o)}slice(e,o){const s=new wo;let i=this.size-1;if(e===void 0)return s;e<0&&(e=e+this.size),o!==void 0&&o>0&&(i=o-1);for(let l=e;l<=i;l++){const u=this.keyAt(l),d=this.get(u);s.set(u,d)}return s}every(e,o){let s=0;for(const i of this){if(!Reflect.apply(e,o,[i,s,this]))return!1;s++}return!0}some(e,o){let s=0;for(const i of this){if(Reflect.apply(e,o,[i,s,this]))return!0;s++}return!1}};function Ta(n,e){if("at"in Array.prototype)return Array.prototype.at.call(n,e);const o=Ih(n,e);return o===-1?void 0:n[o]}Et(Ta,"at");function Ih(n,e){const o=n.length,s=uu(e),i=s>=0?s:o+s;return i<0||i>=o?-1:i}Et(Ih,"toSafeIndex");function uu(n){return n!==n||n===0?0:Math.trunc(n)}Et(uu,"toSafeInteger");function Gb(n){const e=n+"CollectionProvider",[o,s]=tn(e),[i,l]=o(e,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new cu,setItemMap:Et(()=>{},"setItemMap")}),u=Et(({state:O,...R})=>O?E.jsx(h,{...R,state:O}):E.jsx(d,{...R}),"CollectionProvider");u.displayName=e;const d=Et(O=>{const R=k();return E.jsx(h,{...O,state:R})},"CollectionInit");d.displayName=e+"Init";const h=Et(O=>{const{scope:R,children:L,state:j}=O,B=f.useRef(null),[I,K]=f.useState(null),ae=Ve(B,K),[be,le]=j;return f.useEffect(()=>{if(!I)return;const ce=Nh(()=>{});return ce.observe(I,{childList:!0,subtree:!0}),()=>{ce.disconnect()}},[I]),E.jsx(i,{scope:R,itemMap:be,setItemMap:le,collectionRef:ae,collectionRefObject:B,collectionElement:I,children:L})},"CollectionProviderImpl");h.displayName=e+"Impl";const m=n+"CollectionSlot",y=kn(m),v=f.forwardRef((O,R)=>{const{scope:L,children:j}=O,B=l(m,L),I=Ve(R,B.collectionRef);return E.jsx(y,{ref:I,children:j})});v.displayName=m;const x=n+"CollectionItemSlot",b="data-radix-collection-item",S=kn(x),C=f.forwardRef((O,R)=>{const{scope:L,children:j,...B}=O,I=f.useRef(null),[K,ae]=f.useState(null),be=Ve(R,I,ae),le=l(x,L),{setItemMap:ce}=le,ue=f.useRef(B);Th(ue.current,B)||(ue.current=B);const Se=ue.current;return f.useEffect(()=>{const q=Se;return ce(ne=>K?ne.has(K)?ne.set(K,{...q,element:K}).toSorted(du):(ne.set(K,{...q,element:K}),ne.toSorted(du)):ne),()=>{ce(ne=>!K||!ne.has(K)?ne:(ne.delete(K),new cu(ne)))}},[K,Se,ce]),E.jsx(S,{[b]:"",ref:be,children:j})});C.displayName=x;function k(){return f.useState(new cu)}Et(k,"useInitCollection");function N(O){const{itemMap:R}=l(n+"CollectionConsumer",O);return R}return Et(N,"useCollection"),[{Provider:u,Slot:v,ItemSlot:C},{createCollectionScope:s,useCollection:N,useInitCollection:k}]}Et(Gb,"createCollection");function Th(n,e){if(n===e)return!0;if(typeof n!="object"||typeof e!="object"||n==null||e==null)return!1;const o=Object.keys(n),s=Object.keys(e);if(o.length!==s.length)return!1;for(const i of o)if(!Object.prototype.hasOwnProperty.call(e,i)||n[i]!==e[i])return!1;return!0}Et(Th,"shallowEqual");function Dh(n,e){return!!(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING)}Et(Dh,"isElementPreceding");function du(n,e){return!n[1].element||!e[1].element?0:Dh(n[1].element,e[1].element)?-1:1}Et(du,"sortByDocumentPosition");function Nh(n){return new MutationObserver(o=>{for(const s of o)if(s.type==="childList"){n();return}})}Et(Nh,"getChildListObserver");var Zb=Object.defineProperty,is=(n,e)=>Zb(n,"name",{value:e,configurable:!0}),Oh=!!(typeof window<"u"&&window.document&&window.document.createElement);function pe(n,e,{checkForDefaultPrevented:o=!0}={}){return is(function(i){if(n?.(i),o===!1||!i||!i.defaultPrevented)return e?.(i)},"handleEvent")}is(pe,"composeEventHandlers");function qb(n){if(!Oh)throw new Error("Cannot access window outside of the DOM");return n?.ownerDocument?.defaultView??window}is(qb,"getOwnerWindow");function fu(n){if(!Oh)throw new Error("Cannot access document outside of the DOM");return n?.ownerDocument??document}is(fu,"getOwnerDocument");function Ah(n,e=!1){const{activeElement:o}=fu(n);if(!o?.nodeName)return null;if($h(o)&&o.contentDocument)return Ah(o.contentDocument.body,e);if(e){const s=o.getAttribute("aria-activedescendant");if(s){const i=fu(o).getElementById(s);if(i)return i}}return o}is(Ah,"getActiveElement");function $h(n){return n.tagName==="IFRAME"}is($h,"isFrame");var dt=globalThis?.document?f.useLayoutEffect:()=>{},Yb=Object.defineProperty,Qb=(n,e)=>Yb(n,"name",{value:e,configurable:!0}),Mh=ns[" useEffectEvent ".trim().toString()],jh=ns[" useInsertionEffect ".trim().toString()];function Lh(n){if(typeof Mh=="function")return Mh(n);const e=f.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof jh=="function"?jh(()=>{e.current=n}):dt(()=>{e.current=n}),f.useMemo(()=>((...o)=>e.current?.(...o)),[])}Qb(Lh,"useEffectEvent");var Xb=Object.defineProperty,ni=(n,e)=>Xb(n,"name",{value:e,configurable:!0}),Jb=ns[" useInsertionEffect ".trim().toString()]||dt;function Un({prop:n,defaultProp:e,onChange:o=ni(()=>{},"onChange"),caller:s}){const[i,l,u]=Fh({defaultProp:e,onChange:o}),d=n!==void 0,h=d?n:i,m=f.useCallback(y=>{if(d){const v=zh(y)?y(n):y;v!==n&&u.current?.(v)}else l(y)},[d,n,l,u]);return[h,m]}ni(Un,"useControllableState");function Fh({defaultProp:n,onChange:e}){const[o,s]=f.useState(n),i=f.useRef(o),l=f.useRef(e);return Jb(()=>{l.current=e},[e]),f.useEffect(()=>{i.current!==o&&(l.current?.(o),i.current=o)},[o,i]),[o,s,l]}ni(Fh,"useUncontrolledState");function zh(n){return typeof n=="function"}ni(zh,"isFunction");var Vh=Symbol("RADIX:SYNC_STATE");function eS(n,e,o,s){const{prop:i,defaultProp:l,onChange:u,caller:d}=e,h=i!==void 0,m=Lh(u),y=[{...o,state:l}];s&&y.push(s);const[v,x]=f.useReducer((k,N)=>{if(N.type===Vh)return{...k,state:N.state};const D=n(k,N);return h&&!Object.is(D.state,k.state)&&m(D.state),D},...y),b=v.state,S=f.useRef(b);f.useEffect(()=>{S.current!==b&&(S.current=b,h||m(b))},[b,S,h]);const C=f.useMemo(()=>i!==void 0?{...v,state:i}:v,[v,i]);return f.useEffect(()=>{h&&!Object.is(i,v.state)&&x({type:Vh,state:i})},[i,v.state,h]),[C,x]}ni(eS,"useControllableStateReducer");var tS=Object.defineProperty,ur=(n,e)=>tS(n,"name",{value:e,configurable:!0});function Uh(n,e){return f.useReducer((o,s)=>e[o][s]??o,n)}ur(Uh,"useStateMachine");var nn=ur(n=>{const{present:e,children:o}=n,s=Bh(e),i=typeof o=="function"?o({present:s.isPresent}):f.Children.only(o),l=Hh(s.ref,Wh(i));return typeof o=="function"||s.isPresent?f.cloneElement(i,{ref:l}):null},"Presence");function Bh(n){const[e,o]=f.useState(),s=f.useRef(null),i=f.useRef(n),l=f.useRef("none"),u=f.useRef(void 0),d=n?"mounted":"unmounted",[h,m]=Uh(d,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{h==="mounted"?(l.current=u.current??as(s.current),u.current=void 0):l.current="none"},[h]),dt(()=>{const y=s.current,v=i.current;if(v!==n){const b=l.current,S=as(y);n?(u.current=S,m("MOUNT")):S==="none"||y?.display==="none"?m("UNMOUNT"):m(v&&b!==S?"ANIMATION_OUT":"UNMOUNT"),i.current=n}},[n,m]),dt(()=>{if(e){let y;const v=e.ownerDocument.defaultView??window,x=ur(S=>{const k=as(s.current).includes(CSS.escape(S.animationName));if(S.target===e&&k&&(m("ANIMATION_END"),!i.current)){const N=e.style.animationFillMode;e.style.animationFillMode="forwards",y=v.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=N)})}},"handleAnimationEnd"),b=ur(S=>{S.target===e&&(l.current=as(s.current))},"handleAnimationStart");return e.addEventListener("animationstart",b),e.addEventListener("animationcancel",x),e.addEventListener("animationend",x),()=>{v.clearTimeout(y),e.removeEventListener("animationstart",b),e.removeEventListener("animationcancel",x),e.removeEventListener("animationend",x)}}else m("ANIMATION_END")},[e,m]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:f.useCallback(y=>{if(y){const v=getComputedStyle(y);s.current=v,u.current=as(v)}else s.current=null;o(y)},[])}}ur(Bh,"usePresence");function pu(n,e){if(typeof n=="function")return n(e);n!=null&&(n.current=e)}ur(pu,"setRef");function Hh(...n){const e=f.useRef(n);return e.current=n,f.useCallback(o=>{const s=e.current;let i=!1;const l=s.map(u=>{const d=pu(u,o);return!i&&typeof d=="function"&&(i=!0),d});if(i)return()=>{for(let u=0;u<l.length;u++){const d=l[u];typeof d=="function"?d():pu(s[u],null)}}},[])}ur(Hh,"useStableComposedRefs");function as(n){return n?.animationName||"none"}ur(as,"getAnimationName");function Wh(n){let e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,o=e&&"isReactWarning"in e&&e.isReactWarning;return o?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get,o=e&&"isReactWarning"in e&&e.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}ur(Wh,"getElementRef");var nS=Object.defineProperty,rS=(n,e)=>nS(n,"name",{value:e,configurable:!0}),oS=ns[" useId ".trim().toString()]||(()=>{}),sS=0;function yt(n){const[e,o]=f.useState(oS());return dt(()=>{n||o(s=>s??String(sS++))},[n]),n||(e?`radix-${e}`:"")}rS(yt,"useId");var iS=Object.defineProperty,aS=(n,e)=>iS(n,"name",{value:e,configurable:!0}),lS=f.createContext(void 0);function ri(n){const e=f.useContext(lS);return n||e||"ltr"}aS(ri,"useDirection");var cS=Object.defineProperty,uS=(n,e)=>cS(n,"name",{value:e,configurable:!0});function Gt(n){const e=f.useRef(n);return f.useEffect(()=>{e.current=n}),f.useMemo(()=>((...o)=>e.current?.(...o)),[])}uS(Gt,"useCallbackRef");var dS=Object.defineProperty,_t=(n,e)=>dS(n,"name",{value:e,configurable:!0}),hu="dismissableLayer.update",fS="dismissableLayer.pointerDownOutside",pS="dismissableLayer.focusOutside",Kh,Gh=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),oi=f.forwardRef(_t(function(e,o){const{disableOutsidePointerEvents:s=!1,deferPointerDownOutside:i=!1,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:h,onDismiss:m,...y}=e,v=f.useContext(Gh),[x,b]=f.useState(null),S=x?.ownerDocument??globalThis?.document,[,C]=f.useState({}),k=Ve(o,b),N=Array.from(v.layers),[D]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),O=D?N.indexOf(D):-1,R=x?N.indexOf(x):-1,L=v.layersWithOutsidePointerEventsDisabled.size>0,j=R>=O,B=f.useRef(!1),I=qh(le=>{u?.(le),h?.(le),le.defaultPrevented||m?.()},{ownerDocument:S,deferPointerDownOutside:i,isDeferredPointerDownOutsideRef:B,dismissableSurfaces:v.dismissableSurfaces,shouldHandlePointerDownOutside:f.useCallback(le=>{if(!(le instanceof Node))return!1;const ce=[...v.branches].some(ue=>ue.contains(le));return j&&!ce},[v.branches,j])}),K=Yh(le=>{if(i&&B.current)return;const ce=le.target;[...v.branches].some(Se=>Se.contains(ce))||(d?.(le),h?.(le),le.defaultPrevented||m?.())},S),ae=x?R===N.length-1:!1,be=Gt(le=>{le.key==="Escape"&&(l?.(le),!le.defaultPrevented&&m&&(le.preventDefault(),m()))});return f.useEffect(()=>{if(ae)return S.addEventListener("keydown",be,{capture:!0}),()=>S.removeEventListener("keydown",be,{capture:!0})},[S,ae,be]),f.useEffect(()=>{if(x)return s&&(v.layersWithOutsidePointerEventsDisabled.size===0&&(Kh=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),v.layersWithOutsidePointerEventsDisabled.add(x)),v.layers.add(x),mu(),()=>{s&&(v.layersWithOutsidePointerEventsDisabled.delete(x),v.layersWithOutsidePointerEventsDisabled.size===0&&(S.body.style.pointerEvents=Kh))}},[x,S,s,v]),f.useEffect(()=>()=>{x&&(v.layers.delete(x),v.layersWithOutsidePointerEventsDisabled.delete(x),mu())},[x,v]),f.useEffect(()=>{const le=_t(()=>C({}),"handleUpdate");return document.addEventListener(hu,le),()=>document.removeEventListener(hu,le)},[]),E.jsx(Ae.div,{...y,ref:k,style:{pointerEvents:L?j?"auto":"none":void 0,...e.style},onFocusCapture:pe(e.onFocusCapture,K.onFocusCapture),onBlurCapture:pe(e.onBlurCapture,K.onBlurCapture),onPointerDownCapture:pe(e.onPointerDownCapture,I.onPointerDownCapture)})},"DismissableLayer"));function Zh(){const n=f.useContext(Gh),[e,o]=f.useState(null);return f.useEffect(()=>{if(e)return n.dismissableSurfaces.add(e),()=>{n.dismissableSurfaces.delete(e)}},[e,n.dismissableSurfaces]),o}_t(Zh,"useDismissableLayerSurface");var hS=_t(()=>!0,"IS_TRUE");function qh(n,e){const{ownerDocument:o=globalThis?.document,deferPointerDownOutside:s=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:l,shouldHandlePointerDownOutside:u=hS}=e,d=Gt(n),h=f.useRef(!1),m=f.useRef(!1),y=f.useRef(new Map),v=f.useRef(()=>{});return f.useEffect(()=>{function x(){m.current=!1,i.current=!1,y.current.clear()}_t(x,"resetOutsideInteraction");function b(){return Array.from(y.current.values()).some(Boolean)}_t(b,"isOutsideInteractionIntercepted");function S(O){if(!m.current)return;const R=O.target;R instanceof Node&&[...l].some(j=>j.contains(R))||y.current.set(O.type,!0),O.type==="click"&&window.setTimeout(()=>{m.current&&v.current()},0)}_t(S,"handleInteractionCapture");function C(O){m.current&&y.current.set(O.type,!1)}_t(C,"handleInteractionBubble");const k=_t(O=>{if(O.target&&!h.current){let R=function(){o.removeEventListener("click",v.current);const j=b();x(),j||gu(fS,d,L,{discrete:!0})};if(_t(R,"handleAndDispatchPointerDownOutsideEvent"),!u(O.target)){o.removeEventListener("click",v.current),x(),h.current=!1;return}const L={originalEvent:O};m.current=!0,i.current=s&&O.button===0,y.current.clear(),!s||O.button!==0?R():(o.removeEventListener("click",v.current),v.current=R,o.addEventListener("click",v.current,{once:!0}))}else o.removeEventListener("click",v.current),x();h.current=!1},"handlePointerDown"),N=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const O of N)o.addEventListener(O,S,!0),o.addEventListener(O,C);const D=window.setTimeout(()=>{o.addEventListener("pointerdown",k)},0);return()=>{window.clearTimeout(D),o.removeEventListener("pointerdown",k),o.removeEventListener("click",v.current);for(const O of N)o.removeEventListener(O,S,!0),o.removeEventListener(O,C)}},[o,d,s,i,l,u]),{onPointerDownCapture:_t(()=>h.current=!0,"onPointerDownCapture")}}_t(qh,"usePointerDownOutside");function Yh(n,e=globalThis?.document){const o=Gt(n),s=f.useRef(!1);return f.useEffect(()=>{const i=_t(l=>{l.target&&!s.current&&gu(pS,o,{originalEvent:l},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,o]),{onFocusCapture:_t(()=>s.current=!0,"onFocusCapture"),onBlurCapture:_t(()=>s.current=!1,"onBlurCapture")}}_t(Yh,"useFocusOutside");function mu(){const n=new CustomEvent(hu);document.dispatchEvent(n)}_t(mu,"dispatchUpdate");function gu(n,e,o,{discrete:s}){const i=o.originalEvent.target,l=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:o});e&&i.addEventListener(n,e,{once:!0}),s?lu(i,l):i.dispatchEvent(l)}_t(gu,"handleAndDispatchCustomEvent");var mS=Object.defineProperty,Ft=(n,e)=>mS(n,"name",{value:e,configurable:!0}),vu="focusScope.autoFocusOnMount",yu="focusScope.autoFocusOnUnmount",Qh={bubbles:!1,cancelable:!0},Da=f.forwardRef(Ft(function(e,o){const{loop:s=!1,trapped:i=!1,onMountAutoFocus:l,onUnmountAutoFocus:u,...d}=e,[h,m]=f.useState(null),y=Gt(l),v=Gt(u),x=f.useRef(null),b=Ve(o,m),S=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(i){let k=function(R){if(S.paused||!h)return;const L=R.target;h.contains(L)?x.current=L:dr(x.current,{select:!0})},N=function(R){if(S.paused||!h)return;const L=R.relatedTarget;L!==null&&(h.contains(L)||dr(x.current,{select:!0}))},D=function(R){if(document.activeElement===document.body)for(const j of R)j.removedNodes.length>0&&dr(h)};Ft(k,"handleFocusIn"),Ft(N,"handleFocusOut"),Ft(D,"handleMutations"),document.addEventListener("focusin",k),document.addEventListener("focusout",N);const O=new MutationObserver(D);return h&&O.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",N),O.disconnect()}}},[i,h,S.paused]),f.useEffect(()=>{if(h){nm.add(S);const k=document.activeElement;if(!h.contains(k)){const D=new CustomEvent(vu,Qh);h.addEventListener(vu,y),h.dispatchEvent(D),D.defaultPrevented||(Xh(om(xu(h)),{select:!0}),document.activeElement===k&&dr(h))}return()=>{h.removeEventListener(vu,y),setTimeout(()=>{const D=new CustomEvent(yu,Qh);h.addEventListener(yu,v),h.dispatchEvent(D),D.defaultPrevented||dr(k??document.body,{select:!0}),h.removeEventListener(yu,v),nm.remove(S)},0)}}},[h,y,v,S]);const C=f.useCallback(k=>{if(!s&&!i||S.paused)return;const N=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,D=document.activeElement;if(N&&D){const O=k.currentTarget,[R,L]=Jh(O);R&&L?!k.shiftKey&&D===L?(k.preventDefault(),s&&dr(R,{select:!0})):k.shiftKey&&D===R&&(k.preventDefault(),s&&dr(L,{select:!0})):D===O&&k.preventDefault()}},[s,i,S.paused]);return E.jsx(Ae.div,{tabIndex:-1,...d,ref:b,onKeyDown:C})},"FocusScope"));function Xh(n,{select:e=!1}={}){const o=document.activeElement;for(const s of n)if(dr(s,{select:e}),document.activeElement!==o)return}Ft(Xh,"focusFirst");function Jh(n){const e=xu(n),o=wu(e,n),s=wu(e.reverse(),n);return[o,s]}Ft(Jh,"getTabbableEdges");function xu(n){const e=[],o=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:Ft(s=>{const i=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||i?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;o.nextNode();)e.push(o.currentNode);return e}Ft(xu,"getTabbableCandidates");function wu(n,e){const o=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(const s of n)if(!(o?!s.checkVisibility({checkVisibilityCSS:!0}):em(s,{upTo:e})))return s}Ft(wu,"findVisible");function em(n,{upTo:e}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(e!==void 0&&n===e)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}Ft(em,"isHidden");function tm(n){return n instanceof HTMLInputElement&&"select"in n}Ft(tm,"isSelectableInput");function dr(n,{select:e=!1}={}){if(n&&n.focus){const o=document.activeElement;n.focus({preventScroll:!0}),n!==o&&tm(n)&&e&&n.select()}}Ft(dr,"focus");var nm=rm();function rm(){let n=[];return{add(e){const o=n[0];e!==o&&o?.pause(),n=bu(n,e),n.unshift(e)},remove(e){n=bu(n,e),n[0]?.resume()}}}Ft(rm,"createFocusScopesStack");function bu(n,e){const o=[...n],s=o.indexOf(e);return s!==-1&&o.splice(s,1),o}Ft(bu,"arrayRemove");function om(n){return n.filter(e=>e.tagName!=="A")}Ft(om,"removeLinks");var gS=Object.defineProperty,vS=(n,e)=>gS(n,"name",{value:e,configurable:!0}),si=f.forwardRef(vS(function(e,o){const{container:s,...i}=e,[l,u]=f.useState(!1);dt(()=>u(!0),[]);const d=s||l&&globalThis?.document?.body;return d?ti.createPortal(E.jsx(Ae.div,{...i,ref:o}),d):null},"Portal")),yS=Object.defineProperty,Su=(n,e)=>yS(n,"name",{value:e,configurable:!0}),Na=0,ls=null;function xS(n){return cs(),n.children}Su(xS,"FocusGuards");function cs(){f.useEffect(()=>{ls||(ls={start:Cu(),end:Cu()});const{start:n,end:e}=ls;return document.body.firstElementChild!==n&&document.body.insertAdjacentElement("afterbegin",n),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),Na++,()=>{Na===1&&(ls?.start.remove(),ls?.end.remove(),ls=null),Na=Math.max(0,Na-1)}},[])}Su(cs,"useFocusGuards");function Cu(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}Su(Cu,"createFocusGuard");var Bn=function(){return Bn=Object.assign||function(e){for(var o,s=1,i=arguments.length;s<i;s++){o=arguments[s];for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(e[l]=o[l])}return e},Bn.apply(this,arguments)};function sm(n,e){var o={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&e.indexOf(s)<0&&(o[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,s=Object.getOwnPropertySymbols(n);i<s.length;i++)e.indexOf(s[i])<0&&Object.prototype.propertyIsEnumerable.call(n,s[i])&&(o[s[i]]=n[s[i]]);return o}function wS(n,e,o){if(o||arguments.length===2)for(var s=0,i=e.length,l;s<i;s++)(l||!(s in e))&&(l||(l=Array.prototype.slice.call(e,0,s)),l[s]=e[s]);return n.concat(l||Array.prototype.slice.call(e))}typeof SuppressedError=="function"&&SuppressedError;var Oa="right-scroll-bar-position",Aa="width-before-scroll-bar",bS="with-scroll-bars-hidden",SS="--removed-body-scroll-bar-size";function ku(n,e){return typeof n=="function"?n(e):n&&(n.current=e),n}function CS(n,e){var o=f.useState(function(){return{value:n,callback:e,facade:{get current(){return o.value},set current(s){var i=o.value;i!==s&&(o.value=s,o.callback(s,i))}}}})[0];return o.callback=e,o.facade}var kS=typeof window<"u"?f.useLayoutEffect:f.useEffect,im=new WeakMap;function ES(n,e){var o=CS(null,function(s){return n.forEach(function(i){return ku(i,s)})});return kS(function(){var s=im.get(o);if(s){var i=new Set(s),l=new Set(n),u=o.current;i.forEach(function(d){l.has(d)||ku(d,null)}),l.forEach(function(d){i.has(d)||ku(d,u)})}im.set(o,n)},[n]),o}function _S(n){return n}function PS(n,e){e===void 0&&(e=_S);var o=[],s=!1,i={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:n},useMedium:function(l){var u=e(l,s);return o.push(u),function(){o=o.filter(function(d){return d!==u})}},assignSyncMedium:function(l){for(s=!0;o.length;){var u=o;o=[],u.forEach(l)}o={push:function(d){return l(d)},filter:function(){return o}}},assignMedium:function(l){s=!0;var u=[];if(o.length){var d=o;o=[],d.forEach(l),u=o}var h=function(){var y=u;u=[],y.forEach(l)},m=function(){return Promise.resolve().then(h)};m(),o={push:function(y){u.push(y),m()},filter:function(y){return u=u.filter(y),o}}}};return i}function RS(n){n===void 0&&(n={});var e=PS(null);return e.options=Bn({async:!0,ssr:!1},n),e}var am=function(n){var e=n.sideCar,o=sm(n,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=e.read();if(!s)throw new Error("Sidecar medium not found");return f.createElement(s,Bn({},o))};am.isSideCarExport=!0;function IS(n,e){return n.useMedium(e),am}var lm=RS(),Eu=function(){},$a=f.forwardRef(function(n,e){var o=f.useRef(null),s=f.useState({onScrollCapture:Eu,onWheelCapture:Eu,onTouchMoveCapture:Eu}),i=s[0],l=s[1],u=n.forwardProps,d=n.children,h=n.className,m=n.removeScrollBar,y=n.enabled,v=n.shards,x=n.sideCar,b=n.noRelative,S=n.noIsolation,C=n.inert,k=n.allowPinchZoom,N=n.as,D=N===void 0?"div":N,O=n.gapMode,R=sm(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),L=x,j=ES([o,e]),B=Bn(Bn({},R),i);return f.createElement(f.Fragment,null,y&&f.createElement(L,{sideCar:lm,removeScrollBar:m,shards:v,noRelative:b,noIsolation:S,inert:C,setCallbacks:l,allowPinchZoom:!!k,lockRef:o,gapMode:O}),u?f.cloneElement(f.Children.only(d),Bn(Bn({},B),{ref:j})):f.createElement(D,Bn({},B,{className:h,ref:j}),d))});$a.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$a.classNames={fullWidth:Aa,zeroRight:Oa};var TS=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function DS(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var e=TS();return e&&n.setAttribute("nonce",e),n}function NS(n,e){n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}function OS(n){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(n)}var AS=function(){var n=0,e=null;return{add:function(o){n==0&&(e=DS())&&(NS(e,o),OS(e)),n++},remove:function(){n--,!n&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},$S=function(){var n=AS();return function(e,o){f.useEffect(function(){return n.add(e),function(){n.remove()}},[e&&o])}},cm=function(){var n=$S(),e=function(o){var s=o.styles,i=o.dynamic;return n(s,i),null};return e},MS={left:0,top:0,right:0,gap:0},_u=function(n){return parseInt(n||"",10)||0},jS=function(n){var e=window.getComputedStyle(document.body),o=e[n==="padding"?"paddingLeft":"marginLeft"],s=e[n==="padding"?"paddingTop":"marginTop"],i=e[n==="padding"?"paddingRight":"marginRight"];return[_u(o),_u(s),_u(i)]},LS=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return MS;var e=jS(n),o=document.documentElement.clientWidth,s=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,s-o+e[2]-e[0])}},FS=cm(),us="data-scroll-locked",zS=function(n,e,o,s){var i=n.left,l=n.top,u=n.right,d=n.gap;return o===void 0&&(o="margin"),`
|
|
64
|
+
.`.concat(bS,` {
|
|
65
|
+
overflow: hidden `).concat(s,`;
|
|
66
|
+
padding-right: `).concat(d,"px ").concat(s,`;
|
|
67
67
|
}
|
|
68
|
-
body[`).concat(
|
|
69
|
-
overflow: hidden `).concat(
|
|
68
|
+
body[`).concat(us,`] {
|
|
69
|
+
overflow: hidden `).concat(s,`;
|
|
70
70
|
overscroll-behavior: contain;
|
|
71
|
-
`).concat([
|
|
72
|
-
padding-left: `.concat(
|
|
71
|
+
`).concat([e&&"position: relative ".concat(s,";"),o==="margin"&&`
|
|
72
|
+
padding-left: `.concat(i,`px;
|
|
73
73
|
padding-top: `).concat(l,`px;
|
|
74
74
|
padding-right: `).concat(u,`px;
|
|
75
75
|
margin-left:0;
|
|
76
76
|
margin-top:0;
|
|
77
|
-
margin-right: `).concat(d,"px ").concat(
|
|
78
|
-
`),o==="padding"&&"padding-right: ".concat(d,"px ").concat(
|
|
77
|
+
margin-right: `).concat(d,"px ").concat(s,`;
|
|
78
|
+
`),o==="padding"&&"padding-right: ".concat(d,"px ").concat(s,";")].filter(Boolean).join(""),`
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
.`).concat(
|
|
82
|
-
right: `).concat(d,"px ").concat(
|
|
81
|
+
.`).concat(Oa,` {
|
|
82
|
+
right: `).concat(d,"px ").concat(s,`;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
.`).concat(
|
|
86
|
-
margin-right: `).concat(d,"px ").concat(
|
|
85
|
+
.`).concat(Aa,` {
|
|
86
|
+
margin-right: `).concat(d,"px ").concat(s,`;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
.`).concat(
|
|
90
|
-
right: 0 `).concat(
|
|
89
|
+
.`).concat(Oa," .").concat(Oa,` {
|
|
90
|
+
right: 0 `).concat(s,`;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
.`).concat(
|
|
94
|
-
margin-right: 0 `).concat(
|
|
93
|
+
.`).concat(Aa," .").concat(Aa,` {
|
|
94
|
+
margin-right: 0 `).concat(s,`;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
body[`).concat(
|
|
98
|
-
`).concat(
|
|
97
|
+
body[`).concat(us,`] {
|
|
98
|
+
`).concat(SS,": ").concat(d,`px;
|
|
99
99
|
}
|
|
100
|
-
`)},
|
|
101
|
-
.block-interactivity-`.concat(
|
|
102
|
-
.allow-interactivity-`).concat(
|
|
103
|
-
`)},nS=0,Ao=[];function rS(r){var t=m.useRef([]),o=m.useRef([0,0]),i=m.useRef(),a=m.useState(nS++)[0],l=m.useState(Xp)[0],u=m.useRef(r);m.useEffect(function(){u.current=r},[r]),m.useEffect(function(){if(r.inert){document.body.classList.add("block-interactivity-".concat(a));var _=Cw([r.lockRef.current],(r.shards||[]).map(ih),!0).filter(Boolean);return _.forEach(function(k){return k.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),_.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(a))})}}},[r.inert,r.lockRef.current,r.shards]);var d=m.useCallback(function(_,k){if("touches"in _&&_.touches.length===2||_.type==="wheel"&&_.ctrlKey)return!u.current.allowPinchZoom;var R=Ys(_),D=o.current,T="deltaX"in _?_.deltaX:D[0]-R[0],O="deltaY"in _?_.deltaY:D[1]-R[1],V,L=_.target,B=Math.abs(T)>Math.abs(O)?"h":"v";if("touches"in _&&B==="h"&&L.type==="range")return!1;var j=window.getSelection(),Y=j&&j.anchorNode,ce=Y?Y===L||Y.contains(L):!1;if(ce)return!1;var Ce=th(B,L);if(!Ce)return!0;if(Ce?V=B:(V=B==="v"?"h":"v",Ce=th(B,L)),!Ce)return!1;if(!i.current&&"changedTouches"in _&&(T||O)&&(i.current=V),!V)return!0;var le=i.current||V;return Jw(le,k,_,le==="h"?T:O)},[]),h=m.useCallback(function(_){var k=_;if(!(!Ao.length||Ao[Ao.length-1]!==l)){var R="deltaY"in k?oh(k):Ys(k),D=t.current.filter(function(V){return V.name===k.type&&(V.target===k.target||k.target===V.shadowParent)&&eS(V.delta,R)})[0];if(D&&D.should){k.cancelable&&k.preventDefault();return}if(!D){var T=(u.current.shards||[]).map(ih).filter(Boolean).filter(function(V){return V.contains(k.target)}),O=T.length>0?d(k,T[0]):!u.current.noIsolation;O&&k.cancelable&&k.preventDefault()}}},[]),g=m.useCallback(function(_,k,R,D){var T={name:_,delta:k,target:R,should:D,shadowParent:oS(R)};t.current.push(T),setTimeout(function(){t.current=t.current.filter(function(O){return O!==T})},1)},[]),v=m.useCallback(function(_){o.current=Ys(_),i.current=void 0},[]),y=m.useCallback(function(_){g(_.type,oh(_),_.target,d(_,r.lockRef.current))},[]),S=m.useCallback(function(_){g(_.type,Ys(_),_.target,d(_,r.lockRef.current))},[]);m.useEffect(function(){return Ao.push(l),r.setCallbacks({onScrollCapture:y,onWheelCapture:y,onTouchMoveCapture:S}),document.addEventListener("wheel",h,Do),document.addEventListener("touchmove",h,Do),document.addEventListener("touchstart",v,Do),function(){Ao=Ao.filter(function(_){return _!==l}),document.removeEventListener("wheel",h,Do),document.removeEventListener("touchmove",h,Do),document.removeEventListener("touchstart",v,Do)}},[]);var b=r.removeScrollBar,w=r.inert;return m.createElement(m.Fragment,null,w?m.createElement(l,{styles:tS(a)}):null,b?m.createElement(Kw,{noRelative:r.noRelative,gapMode:r.gapMode}):null)}function oS(r){for(var t=null;r!==null;)r instanceof ShadowRoot&&(t=r.host,r=r.host),r=r.parentNode;return t}const iS=Dw(Yp,rS);var Xs=m.forwardRef(function(r,t){return m.createElement(Gs,_n({},r,{ref:t,sideCar:iS}))});Xs.classNames=Gs.classNames;var sS=function(r){if(typeof document>"u")return null;var t=Array.isArray(r)?r[0]:r;return t.ownerDocument.body},Lo=new WeakMap,Js=new WeakMap,ea={},Ic=0,sh=function(r){return r&&(r.host||sh(r.parentNode))},aS=function(r,t){return t.map(function(o){if(r.contains(o))return o;var i=sh(o);return i&&r.contains(i)?i:(console.error("aria-hidden",o,"in not contained inside",r,". Doing nothing"),null)}).filter(function(o){return!!o})},lS=function(r,t,o,i){var a=aS(t,Array.isArray(r)?r:[r]);ea[o]||(ea[o]=new WeakMap);var l=ea[o],u=[],d=new Set,h=new Set(a),g=function(y){!y||d.has(y)||(d.add(y),g(y.parentNode))};a.forEach(g);var v=function(y){!y||h.has(y)||Array.prototype.forEach.call(y.children,function(S){if(d.has(S))v(S);else try{var b=S.getAttribute(i),w=b!==null&&b!=="false",_=(Lo.get(S)||0)+1,k=(l.get(S)||0)+1;Lo.set(S,_),l.set(S,k),u.push(S),_===1&&w&&Js.set(S,!0),k===1&&S.setAttribute(o,"true"),w||S.setAttribute(i,"true")}catch(R){console.error("aria-hidden: cannot operate on ",S,R)}})};return v(t),d.clear(),Ic++,function(){u.forEach(function(y){var S=Lo.get(y)-1,b=l.get(y)-1;Lo.set(y,S),l.set(y,b),S||(Js.has(y)||y.removeAttribute(i),Js.delete(y)),b||y.removeAttribute(o)}),Ic--,Ic||(Lo=new WeakMap,Lo=new WeakMap,Js=new WeakMap,ea={})}},Oc=function(r,t,o){o===void 0&&(o="data-aria-hidden");var i=Array.from(Array.isArray(r)?r:[r]),a=sS(r);return a?(i.push.apply(i,Array.from(a.querySelectorAll("[aria-live], script"))),lS(i,a,o,"aria-hidden")):function(){return null}},cS=Object.defineProperty,Zt=(r,t)=>cS(r,"name",{value:t,configurable:!0}),Nc="Dialog",[ah,lh]=yr(Nc),[uS,un]=ah(Nc),Tc=Zt(r=>{const{__scopeDialog:t,children:o,open:i,defaultOpen:a,onOpenChange:l,modal:u=!0}=r,d=m.useRef(null),h=m.useRef(null),[g,v]=Ii({prop:i,defaultProp:a??!1,onChange:l,caller:Nc}),[y,S]=m.useState(0),[b,w]=m.useState(0);return A.jsx(uS,{scope:t,triggerRef:d,contentRef:h,contentId:Kt(),titleId:Kt(),descriptionId:Kt(),titlePresent:y>0,descriptionPresent:b>0,setTitleCount:S,setDescriptionCount:w,open:g,onOpenChange:v,onOpenToggle:m.useCallback(()=>v(_=>!_),[v]),modal:u,children:o})},"Dialog"),dS="DialogTrigger",fS=m.forwardRef(Zt(function(t,o){const{__scopeDialog:i,...a}=t,l=un(dS,i),u=Ge(o,l.triggerRef);return A.jsx(Ze.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":na(l.open),...a,ref:u,onClick:We(t.onClick,l.onOpenToggle)})},"DialogTrigger")),ch="DialogPortal",[pS,uh]=ah(ch,{forceMount:void 0}),Dc=Zt(r=>{const{__scopeDialog:t,forceMount:o,children:i,container:a}=r,l=un(ch,t);return A.jsx(pS,{scope:t,forceMount:o,children:m.Children.map(i,u=>A.jsx(Io,{present:o||l.open,children:A.jsx(bc,{asChild:!0,container:a,children:u})}))})},"DialogPortal"),Ac="DialogOverlay",Lc=m.forwardRef(Zt(function(t,o){const i=uh(Ac,t.__scopeDialog),{forceMount:a=i.forceMount,...l}=t,u=un(Ac,t.__scopeDialog);return u.modal?A.jsx(Io,{present:a||u.open,children:A.jsx(mS,{...l,ref:o})}):null},"DialogOverlay")),hS=kn("DialogOverlay.RemoveScroll"),mS=m.forwardRef(Zt(function(t,o){const{__scopeDialog:i,...a}=t,l=un(Ac,i),u=jp(),d=Ge(o,u);return A.jsx(Xs,{as:hS,allowPinchZoom:!0,shards:[l.contentRef],children:A.jsx(Ze.div,{"data-state":na(l.open),...a,ref:d,style:{pointerEvents:"auto",...a.style}})})},"DialogOverlayImpl")),Ni="DialogContent",$c=m.forwardRef(Zt(function(t,o){const i=uh(Ni,t.__scopeDialog),{forceMount:a=i.forceMount,...l}=t,u=un(Ni,t.__scopeDialog);return A.jsx(Io,{present:a||u.open,children:u.modal?A.jsx(gS,{...l,ref:o}):A.jsx(vS,{...l,ref:o})})},"DialogContent")),gS=m.forwardRef(Zt(function(t,o){const i=un(Ni,t.__scopeDialog),a=m.useRef(null),l=Ge(o,i.contentRef,a);return m.useEffect(()=>{const u=a.current;if(u)return Oc(u)},[]),A.jsx(dh,{...t,ref:l,trapFocus:i.open,disableOutsidePointerEvents:i.open,onCloseAutoFocus:We(t.onCloseAutoFocus,u=>{u.preventDefault(),i.triggerRef.current?.focus()}),onPointerDownOutside:We(t.onPointerDownOutside,u=>{const d=u.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0;(d.button===2||h)&&u.preventDefault()}),onFocusOutside:We(t.onFocusOutside,u=>u.preventDefault())})},"DialogContentModal")),vS=m.forwardRef(Zt(function(t,o){const i=un(Ni,t.__scopeDialog),a=m.useRef(!1),l=m.useRef(!1);return A.jsx(dh,{...t,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{t.onCloseAutoFocus?.(u),u.defaultPrevented||(a.current||i.triggerRef.current?.focus(),u.preventDefault()),a.current=!1,l.current=!1},onInteractOutside:u=>{t.onInteractOutside?.(u),u.defaultPrevented||(a.current=!0,u.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const d=u.target;i.triggerRef.current?.contains(d)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&l.current&&u.preventDefault()}})},"DialogContentNonModal")),dh=m.forwardRef(Zt(function(t,o){const{__scopeDialog:i,trapFocus:a,onOpenAutoFocus:l,onCloseAutoFocus:u,...d}=t,h=un(Ni,i);return Oi(),A.jsx(A.Fragment,{children:A.jsx(yc,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:l,onUnmountAutoFocus:u,children:A.jsx(pc,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionPresent?h.descriptionId:void 0,"aria-labelledby":h.titlePresent?h.titleId:void 0,"data-state":na(h.open),...d,ref:o,deferPointerDownOutside:!0,onDismiss:()=>h.onOpenChange(!1)})})})},"DialogContentImpl")),yS="DialogTitle",fh=m.forwardRef(Zt(function(t,o){const{__scopeDialog:i,...a}=t,l=un(yS,i),{setTitleCount:u}=l;return ft(()=>(u(d=>d+1),()=>u(d=>d-1)),[u]),A.jsx(Ze.h2,{id:l.titleId,...a,ref:o})},"DialogTitle")),xS="DialogDescription",ph=m.forwardRef(Zt(function(t,o){const{__scopeDialog:i,...a}=t,l=un(xS,i),{setDescriptionCount:u}=l;return ft(()=>(u(d=>d+1),()=>u(d=>d-1)),[u]),A.jsx(Ze.p,{id:l.descriptionId,...a,ref:o})},"DialogDescription")),wS="DialogClose",ta=m.forwardRef(Zt(function(t,o){const{__scopeDialog:i,...a}=t,l=un(wS,i);return A.jsx(Ze.button,{type:"button",...a,ref:o,onClick:We(t.onClick,()=>l.onOpenChange(!1))})},"DialogClose"));function na(r){return r?"open":"closed"}Zt(na,"getState");var SS=Object.defineProperty,qn=(r,t)=>SS(r,"name",{value:t,configurable:!0}),bS="AlertDialog",[kS,bR]=yr(bS,[lh]),Gn=lh(),CS=qn(r=>{const{__scopeAlertDialog:t,...o}=r,i=Gn(t);return A.jsx(Tc,{...i,...o,modal:!0})},"AlertDialog");m.forwardRef(qn(function(t,o){const{__scopeAlertDialog:i,...a}=t,l=Gn(i);return A.jsx(fS,{...l,...a,ref:o})},"AlertDialogTrigger"));var _S=qn(r=>{const{__scopeAlertDialog:t,...o}=r,i=Gn(t);return A.jsx(Dc,{...i,...o})},"AlertDialogPortal"),ES=m.forwardRef(qn(function(t,o){const{__scopeAlertDialog:i,...a}=t,l=Gn(i);return A.jsx(Lc,{...l,...a,ref:o})},"AlertDialogOverlay")),RS="AlertDialogContent",[PS,IS]=kS(RS),OS=m.forwardRef(qn(function(t,o){const{__scopeAlertDialog:i,children:a,...l}=t,u=Gn(i),d=m.useRef(null),h=Ge(o,d),g=m.useRef(null);return A.jsx(PS,{scope:i,cancelRef:g,children:A.jsx($c,{role:"alertdialog",...u,...l,ref:h,onOpenAutoFocus:We(l.onOpenAutoFocus,v=>{v.preventDefault(),g.current?.focus({preventScroll:!0})}),onPointerDownOutside:v=>v.preventDefault(),onInteractOutside:v=>v.preventDefault(),children:a})})},"AlertDialogContent")),NS=m.forwardRef(qn(function(t,o){const{__scopeAlertDialog:i,...a}=t,l=Gn(i);return A.jsx(fh,{...l,...a,ref:o})},"AlertDialogTitle")),TS=m.forwardRef(qn(function(t,o){const{__scopeAlertDialog:i,...a}=t,l=Gn(i);return A.jsx(ph,{...l,...a,ref:o})},"AlertDialogDescription"));m.forwardRef(qn(function(t,o){const{__scopeAlertDialog:i,...a}=t,l=Gn(i);return A.jsx(ta,{...l,...a,ref:o})},"AlertDialogAction"));var DS="AlertDialogCancel",AS=m.forwardRef(qn(function(t,o){const{__scopeAlertDialog:i,...a}=t,{cancelRef:l}=IS(DS,i),u=Gn(i),d=Ge(o,l);return A.jsx(ta,{...u,...a,ref:d})},"AlertDialogCancel")),LS=CS,$S=_S,jS=ES,MS=OS,zS=AS,FS=NS,VS=TS,US=Object.defineProperty,BS=(r,t)=>US(r,"name",{value:t,configurable:!0});function hh(r){const[t,o]=m.useState(void 0);return ft(()=>{if(r){o({width:r.offsetWidth,height:r.offsetHeight});const i=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const l=a[0];let u,d;if("borderBoxSize"in l){const h=l.borderBoxSize,g=Array.isArray(h)?h[0]:h;u=g.inlineSize,d=g.blockSize}else u=r.offsetWidth,d=r.offsetHeight;o({width:u,height:d})});return i.observe(r,{box:"border-box"}),()=>i.unobserve(r)}else o(void 0)},[r]),t}BS(hh,"useSize");const HS=["top","right","bottom","left"],xr=Math.min,Qn=Math.max,ra=Math.round,oa=Math.floor,Yn=r=>({x:r,y:r}),WS={left:"right",right:"left",bottom:"top",top:"bottom"};function mh(r,t,o){return Qn(r,xr(t,o))}function Xn(r,t){return typeof r=="function"?r(t):r}function wr(r){return r.split("-")[0]}function $o(r){return r.split("-")[1]}function jc(r){return r==="x"?"y":"x"}function Mc(r){return r==="y"?"height":"width"}function En(r){const t=r[0];return t==="t"||t==="b"?"y":"x"}function zc(r){return jc(En(r))}function KS(r,t,o){o===void 0&&(o=!1);const i=$o(r),a=zc(r),l=Mc(a);let u=a==="x"?i===(o?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(u=ia(u)),[u,ia(u)]}function ZS(r){const t=ia(r);return[Fc(r),t,Fc(t)]}function Fc(r){return r.includes("start")?r.replace("start","end"):r.replace("end","start")}const gh=["left","right"],vh=["right","left"],qS=["top","bottom"],GS=["bottom","top"];function QS(r,t,o){switch(r){case"top":case"bottom":return o?t?vh:gh:t?gh:vh;case"left":case"right":return t?qS:GS;default:return[]}}function YS(r,t,o,i){const a=$o(r);let l=QS(wr(r),o==="start",i);return a&&(l=l.map(u=>u+"-"+a),t&&(l=l.concat(l.map(Fc)))),l}function ia(r){const t=wr(r);return WS[t]+r.slice(t.length)}function XS(r){var t,o,i,a;return{top:(t=r.top)!=null?t:0,right:(o=r.right)!=null?o:0,bottom:(i=r.bottom)!=null?i:0,left:(a=r.left)!=null?a:0}}function yh(r){return typeof r!="number"?XS(r):{top:r,right:r,bottom:r,left:r}}function sa(r){const{x:t,y:o,width:i,height:a}=r;return{width:i,height:a,top:o,left:t,right:t+i,bottom:o+a,x:t,y:o}}function xh(r,t,o){let{reference:i,floating:a}=r;const l=En(t),u=zc(t),d=Mc(u),h=wr(t),g=l==="y",v=i.x+i.width/2-a.width/2,y=i.y+i.height/2-a.height/2,S=i[d]/2-a[d]/2;let b;switch(h){case"top":b={x:v,y:i.y-a.height};break;case"bottom":b={x:v,y:i.y+i.height};break;case"right":b={x:i.x+i.width,y};break;case"left":b={x:i.x-a.width,y};break;default:b={x:i.x,y:i.y}}const w=$o(t);return w&&(b[u]+=S*(w==="end"?1:-1)*(o&&g?-1:1)),b}async function JS(r,t){var o;t===void 0&&(t={});const{x:i,y:a,platform:l,rects:u,elements:d,strategy:h}=r,{boundary:g="clippingAncestors",rootBoundary:v="viewport",elementContext:y="floating",altBoundary:S=!1,padding:b=0}=Xn(t,r),w=yh(b),k=d[S?y==="floating"?"reference":"floating":y],R=sa(await l.getClippingRect({element:(o=await(l.isElement==null?void 0:l.isElement(k)))==null||o?k:k.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:g,rootBoundary:v,strategy:h})),D=y==="floating"?{x:i,y:a,width:u.floating.width,height:u.floating.height}:u.reference,T=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),O=await(l.isElement==null?void 0:l.isElement(T))&&await(l.getScale==null?void 0:l.getScale(T))||{x:1,y:1},V=sa(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:D,offsetParent:T,strategy:h}):D);return{top:(R.top-V.top+w.top)/O.y,bottom:(V.bottom-R.bottom+w.bottom)/O.y,left:(R.left-V.left+w.left)/O.x,right:(V.right-R.right+w.right)/O.x}}const e1=50,t1=async(r,t,o)=>{const{placement:i="bottom",strategy:a="absolute",middleware:l=[],platform:u}=o,d=u.detectOverflow?u:{...u,detectOverflow:JS},h=await(u.isRTL==null?void 0:u.isRTL(t));let g=await u.getElementRects({reference:r,floating:t,strategy:a}),{x:v,y}=xh(g,i,h),S=i,b=0;const w={};for(let _=0;_<l.length;_++){const k=l[_];if(!k)continue;const{name:R,fn:D}=k,{x:T,y:O,data:V,reset:L}=await D({x:v,y,initialPlacement:i,placement:S,strategy:a,middlewareData:w,rects:g,platform:d,elements:{reference:r,floating:t}});v=T??v,y=O??y,w[R]={...w[R],...V},L&&b<e1&&(b++,typeof L=="object"&&(L.placement&&(S=L.placement),L.rects&&(g=L.rects===!0?await u.getElementRects({reference:r,floating:t,strategy:a}):L.rects),{x:v,y}=xh(g,S,h)),_=-1)}return{x:v,y,placement:S,strategy:a,middlewareData:w}},n1=r=>({name:"arrow",options:r,async fn(t){const{x:o,y:i,placement:a,rects:l,platform:u,elements:d,middlewareData:h}=t,{element:g,padding:v=0}=Xn(r,t)||{};if(g==null)return{};const y=yh(v),S={x:o,y:i},b=zc(a),w=Mc(b),_=await u.getDimensions(g),k=b==="y",R=k?"top":"left",D=k?"bottom":"right",T=k?"clientHeight":"clientWidth",O=l.reference[w]+l.reference[b]-S[b]-l.floating[w],V=S[b]-l.reference[b],L=await(u.getOffsetParent==null?void 0:u.getOffsetParent(g));let B=L?L[T]:0;(!B||!await(u.isElement==null?void 0:u.isElement(L)))&&(B=d.floating[T]||l.floating[w]);const j=O/2-V/2,Y=B/2-_[w]/2-1,ce=xr(y[R],Y),Ce=xr(y[D],Y),le=B-_[w]-Ce,ue=B/2-_[w]/2+j,se=mh(ce,ue,le),be=!h.arrow&&$o(a)!=null&&ue!==se&&l.reference[w]/2-(ue<ce?ce:Ce)-_[w]/2<0,ae=be?ue<ce?ue-ce:ue-le:0;return{[b]:S[b]+ae,data:{[b]:se,centerOffset:ue-se-ae,...be&&{alignmentOffset:ae}},reset:be}}}),r1=function(r){return r===void 0&&(r={}),{name:"flip",options:r,async fn(t){var o,i;const{placement:a,middlewareData:l,rects:u,initialPlacement:d,platform:h,elements:g}=t,{mainAxis:v=!0,crossAxis:y=!0,fallbackPlacements:S,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:_=!0,...k}=Xn(r,t);if((o=l.arrow)!=null&&o.alignmentOffset)return{};const R=wr(a),D=En(d),T=wr(d)===d,O=await(h.isRTL==null?void 0:h.isRTL(g.floating)),V=S||(T||!_?[ia(d)]:ZS(d)),L=w!=="none";!S&&L&&V.push(...YS(d,_,w,O));const B=[d,...V],j=await h.detectOverflow(t,k),Y=[];let ce=((i=l.flip)==null?void 0:i.overflows)||[];if(v&&Y.push(j[R]),y){const se=KS(a,u,O);Y.push(j[se[0]],j[se[1]])}if(ce=[...ce,{placement:a,overflows:Y}],!Y.every(se=>se<=0)){var Ce,le;const se=(((Ce=l.flip)==null?void 0:Ce.index)||0)+1,be=B[se];if(be&&(!(y==="alignment"?D!==En(be):!1)||ce.every(U=>En(U.placement)===D?U.overflows[0]>0:!0)))return{data:{index:se,overflows:ce},reset:{placement:be}};let ae=(le=ce.filter(oe=>oe.overflows[0]<=0).sort((oe,U)=>oe.overflows[1]-U.overflows[1])[0])==null?void 0:le.placement;if(!ae)switch(b){case"bestFit":{var ue;const oe=(ue=ce.filter(U=>{if(L){const G=En(U.placement);return G===D||G==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(G=>G>0).reduce((G,z)=>G+z,0)]).sort((U,G)=>U[1]-G[1])[0])==null?void 0:ue[0];oe&&(ae=oe);break}case"initialPlacement":ae=d;break}if(a!==ae)return{reset:{placement:ae}}}return{}}}};function wh(r,t){return{top:r.top-t.height,right:r.right-t.width,bottom:r.bottom-t.height,left:r.left-t.width}}function Sh(r){return HS.some(t=>r[t]>=0)}const o1=function(r){return r===void 0&&(r={}),{name:"hide",options:r,async fn(t){const{rects:o,platform:i}=t,{strategy:a="referenceHidden",...l}=Xn(r,t);switch(a){case"referenceHidden":{const u=await i.detectOverflow(t,{...l,elementContext:"reference"}),d=wh(u,o.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:Sh(d)}}}case"escaped":{const u=await i.detectOverflow(t,{...l,altBoundary:!0}),d=wh(u,o.floating);return{data:{escapedOffsets:d,escaped:Sh(d)}}}default:return{}}}}},bh=new Set(["left","top"]);async function i1(r,t){const{placement:o,platform:i,elements:a}=r,l=await(i.isRTL==null?void 0:i.isRTL(a.floating)),u=wr(o),d=$o(o),h=En(o)==="y",g=bh.has(u)?-1:1,v=l&&h?-1:1,y=Xn(t,r);let{mainAxis:S,crossAxis:b,alignmentAxis:w}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return d&&typeof w=="number"&&(b=d==="end"?w*-1:w),h?{x:b*v,y:S*g}:{x:S*g,y:b*v}}const s1=function(r){return r===void 0&&(r=0),{name:"offset",options:r,async fn(t){var o,i;const{x:a,y:l,placement:u,middlewareData:d}=t,h=await i1(t,r);return u===((o=d.offset)==null?void 0:o.placement)&&(i=d.arrow)!=null&&i.alignmentOffset?{}:{x:a+h.x,y:l+h.y,data:{...h,placement:u}}}}},a1=function(r){return r===void 0&&(r={}),{name:"shift",options:r,async fn(t){const{x:o,y:i,placement:a,platform:l}=t,{mainAxis:u=!0,crossAxis:d=!1,limiter:h={fn:D=>{let{x:T,y:O}=D;return{x:T,y:O}}},...g}=Xn(r,t),v={x:o,y:i},y=await l.detectOverflow(t,g),S=En(a),b=jc(S);let w=v[b],_=v[S];const k=(D,T)=>mh(T+y[D==="y"?"top":"left"],T,T-y[D==="y"?"bottom":"right"]);u&&(w=k(b,w)),d&&(_=k(S,_));const R=h.fn({...t,[b]:w,[S]:_});return{...R,data:{x:R.x-o,y:R.y-i,enabled:{[b]:u,[S]:d}}}}}},l1=function(r){return r===void 0&&(r={}),{options:r,fn(t){var o,i;const{x:a,y:l,placement:u,rects:d,middlewareData:h}=t,{offset:g=0,mainAxis:v=!0,crossAxis:y=!0}=Xn(r,t),S={x:a,y:l},b=En(u),w=jc(b);let _=S[w],k=S[b];const R=Xn(g,t),D=typeof R=="number"?{mainAxis:R,crossAxis:0}:{mainAxis:(o=R.mainAxis)!=null?o:0,crossAxis:(i=R.crossAxis)!=null?i:0};if(v){const V=w==="y"?"height":"width",L=d.reference[w]-d.floating[V]+D.mainAxis,B=d.reference[w]+d.reference[V]-D.mainAxis;_<L?_=L:_>B&&(_=B)}if(y){var T,O;const V=w==="y"?"width":"height",L=bh.has(wr(u)),B=d.reference[b]-d.floating[V]+(L&&((T=h.offset)==null?void 0:T[b])||0)+(L?0:D.crossAxis),j=d.reference[b]+d.reference[V]+(L?0:((O=h.offset)==null?void 0:O[b])||0)-(L?D.crossAxis:0);k<B?k=B:k>j&&(k=j)}return{[w]:_,[b]:k}}}},c1=function(r){return r===void 0&&(r={}),{name:"size",options:r,async fn(t){const{placement:o,rects:i,platform:a,elements:l}=t,{apply:u=()=>{},...d}=Xn(r,t),h=await a.detectOverflow(t,d),g=wr(o),v=$o(o),y=En(o)==="y",{width:S,height:b}=i.floating;let w,_;g==="top"||g==="bottom"?(w=g,_=v===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(_=g,w=v==="end"?"top":"bottom");const k=b-h.top-h.bottom,R=S-h.left-h.right,D=xr(b-h[w],k),T=xr(S-h[_],R),O=t.middlewareData.shift,V=!O;let L=D,B=T;O!=null&&O.enabled.x&&(B=R),O!=null&&O.enabled.y&&(L=k),V&&!v&&(y?B=S-2*Qn(h.left,h.right):L=b-2*Qn(h.top,h.bottom)),await u({...t,availableWidth:B,availableHeight:L});const j=await a.getDimensions(l.floating);return S!==j.width||b!==j.height?{reset:{rects:!0}}:{}}}};function aa(){return typeof window<"u"}function jo(r){return kh(r)?(r.nodeName||"").toLowerCase():"#document"}function Mt(r){var t;return(r==null||(t=r.ownerDocument)==null?void 0:t.defaultView)||window}function Jn(r){var t;return(t=(kh(r)?r.ownerDocument:r.document)||window.document)==null?void 0:t.documentElement}function kh(r){return aa()?r instanceof Node||r instanceof Mt(r).Node:!1}function Rn(r){return aa()?r instanceof Element||r instanceof Mt(r).Element:!1}function Sr(r){return aa()?r instanceof HTMLElement||r instanceof Mt(r).HTMLElement:!1}function Ch(r){return!aa()||typeof ShadowRoot>"u"?!1:r instanceof ShadowRoot||r instanceof Mt(r).ShadowRoot}function la(r){const{overflow:t,overflowX:o,overflowY:i,display:a}=Pn(r);return/auto|scroll|overlay|hidden|clip/.test(t+i+o)&&a!=="inline"&&a!=="contents"}function u1(r){return/^(table|td|th)$/.test(jo(r))}function ca(r){try{if(r.matches(":popover-open"))return!0}catch{}try{return r.matches(":modal")}catch{return!1}}const d1=/transform|translate|scale|rotate|perspective|filter/,f1=/paint|layout|strict|content/,ro=r=>!!r&&r!=="none";let Vc;function Uc(r){const t=Rn(r)?Pn(r):r;return ro(t.transform)||ro(t.translate)||ro(t.scale)||ro(t.rotate)||ro(t.perspective)||!Bc()&&(ro(t.backdropFilter)||ro(t.filter))||d1.test(t.willChange||"")||f1.test(t.contain||"")}function p1(r){let t=oo(r);for(;Sr(t)&&!Ti(t);){if(Uc(t))return t;if(ca(t))return null;t=oo(t)}return null}function Bc(){return Vc==null&&(Vc=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Vc}function Ti(r){return/^(html|body|#document)$/.test(jo(r))}function Pn(r){return Mt(r).getComputedStyle(r)}function ua(r){return Rn(r)?{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}:{scrollLeft:r.scrollX,scrollTop:r.scrollY}}function oo(r){if(jo(r)==="html")return r;const t=r.assignedSlot||r.parentNode||Ch(r)&&r.host||Jn(r);return Ch(t)?t.host:t}function _h(r){const t=oo(r);return Ti(t)?(r.ownerDocument||r).body:Sr(t)&&la(t)?t:_h(t)}function Di(r,t,o){var i;t===void 0&&(t=[]),o===void 0&&(o=!0);const a=_h(r),l=a===((i=r.ownerDocument)==null?void 0:i.body),u=Mt(a);if(l){const d=Hc(u);return t.concat(u,u.visualViewport||[],la(a)?a:[],d&&o?Di(d):[])}else return t.concat(a,Di(a,[],o))}function Hc(r){return r.parent&&Object.getPrototypeOf(r.parent)?r.frameElement:null}function Eh(r){const t=Pn(r);let o=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const a=Sr(r),l=a?r.offsetWidth:o,u=a?r.offsetHeight:i,d=ra(o)!==l||ra(i)!==u;return d&&(o=l,i=u),{width:o,height:i,$:d}}function Wc(r){return Rn(r)?r:r.contextElement}function Mo(r){const t=Wc(r);if(!Sr(t))return Yn(1);const o=t.getBoundingClientRect(),{width:i,height:a,$:l}=Eh(t);let u=(l?ra(o.width):o.width)/i,d=(l?ra(o.height):o.height)/a;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const h1=Yn(0);function Rh(r){const t=Mt(r);return!Bc()||!t.visualViewport?h1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function m1(r,t,o){return t===void 0&&(t=!1),!!o&&t&&o===Mt(r)}function io(r,t,o,i){t===void 0&&(t=!1),o===void 0&&(o=!1);const a=r.getBoundingClientRect(),l=Wc(r);let u=Yn(1);t&&(i?Rn(i)&&(u=Mo(i)):u=Mo(r));const d=m1(l,o,i)?Rh(l):Yn(0);let h=(a.left+d.x)/u.x,g=(a.top+d.y)/u.y,v=a.width/u.x,y=a.height/u.y;if(l&&i){const S=Mt(l),b=Rn(i)?Mt(i):i;let w=S,_=Hc(w);for(;_&&b!==w;){const k=Mo(_),R=_.getBoundingClientRect(),D=Pn(_),T=R.left+(_.clientLeft+parseFloat(D.paddingLeft))*k.x,O=R.top+(_.clientTop+parseFloat(D.paddingTop))*k.y;h*=k.x,g*=k.y,v*=k.x,y*=k.y,h+=T,g+=O,w=Mt(_),_=Hc(w)}}return sa({width:v,height:y,x:h,y:g})}function da(r,t){const o=ua(r).scrollLeft;return t?t.left+o:io(Jn(r)).left+o}function Ph(r,t){const o=r.getBoundingClientRect(),i=o.left+t.scrollLeft-da(r,o),a=o.top+t.scrollTop;return{x:i,y:a}}function g1(r){let{elements:t,rect:o,offsetParent:i,strategy:a}=r;const l=a==="fixed",u=Jn(i),d=t?ca(t.floating):!1;if(i===u||d&&l)return o;let h={scrollLeft:0,scrollTop:0},g=Yn(1);const v=Yn(0),y=Sr(i);if((y||!l)&&((jo(i)!=="body"||la(u))&&(h=ua(i)),y)){const b=io(i);g=Mo(i),v.x=b.x+i.clientLeft,v.y=b.y+i.clientTop}const S=u&&!y&&!l?Ph(u,h):Yn(0);return{width:o.width*g.x,height:o.height*g.y,x:o.x*g.x-h.scrollLeft*g.x+v.x+S.x,y:o.y*g.y-h.scrollTop*g.y+v.y+S.y}}function v1(r){return r.getClientRects?Array.from(r.getClientRects()):[]}function y1(r){const t=ua(r),o=r.ownerDocument.body,i=Qn(r.scrollWidth,r.clientWidth,o.scrollWidth,o.clientWidth),a=Qn(r.scrollHeight,r.clientHeight,o.scrollHeight,o.clientHeight);let l=-t.scrollLeft+da(r);const u=-t.scrollTop;return Pn(o).direction==="rtl"&&(l+=Qn(r.clientWidth,o.clientWidth)-i),{width:i,height:a,x:l,y:u}}const x1=25;function w1(r,t,o){o===void 0&&(o="viewport");const i=o==="layoutViewport",a=Mt(r),l=Jn(r),u=a.visualViewport;let d=l.clientWidth,h=l.clientHeight,g=0,v=0;if(u){const S=!Bc()||t==="fixed";i?S||(g=-u.offsetLeft,v=-u.offsetTop):(d=u.width,h=u.height,S&&(g=u.offsetLeft,v=u.offsetTop))}if(da(l)<=0){const S=l.ownerDocument,b=S.body,w=getComputedStyle(b),_=S.compatMode==="CSS1Compat"&&parseFloat(w.marginLeft)+parseFloat(w.marginRight)||0,k=Math.abs(l.clientWidth-b.clientWidth-_),R=getComputedStyle(l).scrollbarGutter==="stable both-edges"?k/2:k;R<=x1&&(d-=R)}return{width:d,height:h,x:g,y:v}}function S1(r,t){const o=io(r,!0,t==="fixed"),i=o.top+r.clientTop,a=o.left+r.clientLeft,l=Mo(r),u=r.clientWidth*l.x,d=r.clientHeight*l.y,h=a*l.x,g=i*l.y;return{width:u,height:d,x:h,y:g}}function Ih(r,t,o){let i;if(t==="viewport"||t==="layoutViewport")i=w1(r,o,t);else if(t==="document")i=y1(Jn(r));else if(Rn(t))i=S1(t,o);else{const a=Rh(r);i={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return sa(i)}function b1(r,t){const o=t.get(r);if(o)return o;let i=Di(r,[],!1).filter(d=>Rn(d)&&jo(d)!=="body"),a=null;const l=Pn(r).position==="fixed";let u=l?oo(r):r;for(;Rn(u)&&!Ti(u);){const d=Pn(u),h=Uc(u),g=a?a.position:l?"fixed":"";!h&&(g==="fixed"||g==="absolute"&&d.position==="static")?i=i.filter(y=>y!==u):a=d,u=oo(u)}return t.set(r,i),i}function k1(r){let{element:t,boundary:o,rootBoundary:i,strategy:a}=r;const u=[...o==="clippingAncestors"?ca(t)?[]:b1(t,this._c):[].concat(o),i],d=Ih(t,u[0],a);let h=d.top,g=d.right,v=d.bottom,y=d.left;for(let S=1;S<u.length;S++){const b=Ih(t,u[S],a);h=Qn(b.top,h),g=xr(b.right,g),v=xr(b.bottom,v),y=Qn(b.left,y)}return{width:g-y,height:v-h,x:y,y:h}}function C1(r){const{width:t,height:o}=Eh(r);return{width:t,height:o}}function _1(r,t,o){const i=Sr(t),a=Jn(t),l=o==="fixed",u=io(r,!0,l,t);let d={scrollLeft:0,scrollTop:0};const h=Yn(0);if((i||!l)&&((jo(t)!=="body"||la(a))&&(d=ua(t)),i)){const S=io(t,!0,l,t);h.x=S.x+t.clientLeft,h.y=S.y+t.clientTop}!i&&a&&(h.x=da(a));const g=a&&!i&&!l?Ph(a,d):Yn(0),v=u.left+d.scrollLeft-h.x-g.x,y=u.top+d.scrollTop-h.y-g.y;return{x:v,y,width:u.width,height:u.height}}function Kc(r){return Pn(r).position==="static"}function Oh(r,t){if(!Sr(r)||Pn(r).position==="fixed")return null;if(t)return t(r);let o=r.offsetParent;return Jn(r)===o&&(o=o.ownerDocument.body),o}function Nh(r,t){const o=Mt(r);if(ca(r))return o;if(!Sr(r)){let a=oo(r);for(;a&&!Ti(a);){if(Rn(a)&&!Kc(a))return a;a=oo(a)}return o}let i=Oh(r,t);for(;i&&u1(i)&&Kc(i);)i=Oh(i,t);return i&&Ti(i)&&Kc(i)&&!Uc(i)?o:i||p1(r)||o}const E1=async function(r){const t=this.getOffsetParent||Nh,o=this.getDimensions,i=await o(r.floating);return{reference:_1(r.reference,await t(r.floating),r.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function R1(r){return Pn(r).direction==="rtl"}const P1={convertOffsetParentRelativeRectToViewportRelativeRect:g1,getDocumentElement:Jn,getClippingRect:k1,getOffsetParent:Nh,getElementRects:E1,getClientRects:v1,getDimensions:C1,getScale:Mo,isElement:Rn,isRTL:R1};function Th(r,t){return r.x===t.x&&r.y===t.y&&r.width===t.width&&r.height===t.height}function I1(r,t,o){let i=null,a;const l=Jn(r);function u(){var v;clearTimeout(a),(v=i)==null||v.disconnect(),i=null}function d(v,y){v===void 0&&(v=!1),y===void 0&&(y=1),u();const S=r.getBoundingClientRect(),{left:b,top:w,width:_,height:k}=S;if(v||t(),!_||!k)return;const R=oa(w),D=oa(l.clientWidth-(b+_)),T=oa(l.clientHeight-(w+k)),O=oa(b),L={rootMargin:-R+"px "+-D+"px "+-T+"px "+-O+"px",threshold:Qn(0,xr(1,y))||1};let B=!0;function j(Y){const ce=Y[0].intersectionRatio;if(!Th(S,r.getBoundingClientRect()))return d();if(ce!==y){if(!B)return d();ce?d(!1,ce):a=setTimeout(()=>{d(!1,1e-7)},1e3)}B=!1}try{i=new IntersectionObserver(j,{...L,root:l.ownerDocument})}catch{i=new IntersectionObserver(j,L)}i.observe(r)}const h=Mt(r),g=()=>d(o);return h.addEventListener("resize",g),d(!0),()=>{h.removeEventListener("resize",g),u()}}function O1(r,t,o,i){i===void 0&&(i={});const{ancestorScroll:a=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:h=!1}=i,g=Wc(r),v=a||l?[...g?Di(g):[],...t?Di(t):[]]:[];v.forEach(R=>{a&&R.addEventListener("scroll",o),l&&R.addEventListener("resize",o)});const y=g&&d?I1(g,o,l):null;let S=-1,b=null;u&&(b=new ResizeObserver(R=>{let[D]=R;D&&D.target===g&&b&&t&&(b.unobserve(t),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var T;(T=b)==null||T.observe(t)})),o()}),g&&!h&&b.observe(g),t&&b.observe(t));let w,_=h?io(r):null;h&&k();function k(){const R=io(r);_&&!Th(_,R)&&o(),_=R,w=requestAnimationFrame(k)}return o(),()=>{var R;v.forEach(D=>{a&&D.removeEventListener("scroll",o),l&&D.removeEventListener("resize",o)}),y?.(),(R=b)==null||R.disconnect(),b=null,h&&cancelAnimationFrame(w)}}const N1=s1,T1=a1,D1=r1,A1=c1,L1=o1,Dh=n1,$1=l1,j1=(r,t,o)=>{const i=new Map,a=o??{},l={...P1,...a.platform,_c:i};return t1(r,t,{...a,platform:l})};var M1=typeof document<"u",z1=function(){},fa=M1?m.useLayoutEffect:z1;function pa(r,t){if(r===t)return!0;if(typeof r!=typeof t)return!1;if(typeof r=="function"&&r.toString()===t.toString())return!0;let o,i,a;if(r&&t&&typeof r=="object"){if(Array.isArray(r)){if(o=r.length,o!==t.length)return!1;for(i=o;i--!==0;)if(!pa(r[i],t[i]))return!1;return!0}if(a=Object.keys(r),o=a.length,o!==Object.keys(t).length)return!1;for(i=o;i--!==0;)if(!{}.hasOwnProperty.call(t,a[i]))return!1;for(i=o;i--!==0;){const l=a[i];if(!(l==="_owner"&&r.$$typeof)&&!pa(r[l],t[l]))return!1}return!0}return r!==r&&t!==t}function Ah(r){return typeof window>"u"?1:(r.ownerDocument.defaultView||window).devicePixelRatio||1}function Lh(r,t){const o=Ah(r);return Math.round(t*o)/o}function Zc(r){const t=m.useRef(r);return fa(()=>{t.current=r}),t}function F1(r){r===void 0&&(r={});const{placement:t="bottom",strategy:o="absolute",middleware:i=[],platform:a,elements:{reference:l,floating:u}={},transform:d=!0,whileElementsMounted:h,open:g}=r,[v,y]=m.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[S,b]=m.useState(i);pa(S,i)||b(i);const[w,_]=m.useState(null),[k,R]=m.useState(null),D=m.useCallback(U=>{U!==L.current&&(L.current=U,_(U))},[]),T=m.useCallback(U=>{U!==B.current&&(B.current=U,R(U))},[]),O=l||w,V=u||k,L=m.useRef(null),B=m.useRef(null),j=m.useRef(v),Y=h!=null,ce=Zc(h),Ce=Zc(a),le=Zc(g),ue=m.useCallback(()=>{if(!L.current||!B.current)return;const U={placement:t,strategy:o,middleware:S};Ce.current&&(U.platform=Ce.current),j1(L.current,B.current,U).then(G=>{const z={...G,isPositioned:le.current!==!1};se.current&&!pa(j.current,z)&&(j.current=z,Ri.flushSync(()=>{y(z)}))})},[S,t,o,Ce,le]);fa(()=>{g===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,y(U=>({...U,isPositioned:!1})))},[g]);const se=m.useRef(!1);fa(()=>(se.current=!0,()=>{se.current=!1}),[]),fa(()=>{if(O&&(L.current=O),V&&(B.current=V),O&&V){if(ce.current)return ce.current(O,V,ue);ue()}},[O,V,ue,ce,Y]);const be=m.useMemo(()=>({reference:L,floating:B,setReference:D,setFloating:T}),[D,T]),ae=m.useMemo(()=>({reference:O,floating:V}),[O,V]),oe=m.useMemo(()=>{const U={position:o,left:0,top:0};if(!ae.floating)return U;const G=Lh(ae.floating,v.x),z=Lh(ae.floating,v.y);return d?{...U,transform:"translate("+G+"px, "+z+"px)",...Ah(ae.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:G,top:z}},[o,d,ae.floating,v.x,v.y]);return m.useMemo(()=>({...v,update:ue,refs:be,elements:ae,floatingStyles:oe}),[v,ue,be,ae,oe])}const V1=r=>{function t(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:r,fn(o){const{element:i,padding:a}=typeof r=="function"?r(o):r;return i&&t(i)?i.current!=null?Dh({element:i.current,padding:a}).fn(o):{}:i?Dh({element:i,padding:a}).fn(o):{}}}},U1=(r,t)=>{const o=N1(r);return{name:o.name,fn:o.fn,options:[r,t]}},B1=(r,t)=>{const o=T1(r);return{name:o.name,fn:o.fn,options:[r,t]}},H1=(r,t)=>({fn:$1(r).fn,options:[r,t]}),W1=(r,t)=>{const o=D1(r);return{name:o.name,fn:o.fn,options:[r,t]}},K1=(r,t)=>{const o=A1(r);return{name:o.name,fn:o.fn,options:[r,t]}},Z1=(r,t)=>{const o=L1(r);return{name:o.name,fn:o.fn,options:[r,t]}},q1=(r,t)=>{const o=V1(r);return{name:o.name,fn:o.fn,options:[r,t]}};var G1=Object.defineProperty,br=(r,t)=>G1(r,"name",{value:t,configurable:!0}),$h="Popper",[jh,ha]=yr($h),[Q1,Mh]=jh($h),Y1=br(r=>{const{__scopePopper:t,children:o}=r,[i,a]=m.useState(null),[l,u]=m.useState(void 0);return A.jsx(Q1,{scope:t,anchor:i,onAnchorChange:a,placementState:l,setPlacementState:u,children:o})},"Popper"),X1="PopperAnchor",J1=m.forwardRef(br(function(t,o){const{__scopePopper:i,virtualRef:a,...l}=t,u=Mh(X1,i),d=m.useRef(null),h=u.onAnchorChange,g=m.useCallback(_=>{d.current=_,_&&h(_)},[h]),v=Ge(o,g),y=m.useRef(null);m.useEffect(()=>{if(!a)return;const _=y.current;y.current=a.current,_!==y.current&&h(y.current)});const S=u.placementState&&ma(u.placementState),b=S?.[0],w=S?.[1];return a?null:A.jsx(Ze.div,{"data-radix-popper-side":b,"data-radix-popper-align":w,...l,ref:v})},"PopperAnchor")),zh="PopperContent",[eb,kR]=jh(zh),tb=m.forwardRef(br(function(t,o){const{__scopePopper:i,side:a="bottom",sideOffset:l=0,align:u="center",alignOffset:d=0,arrowPadding:h=0,avoidCollisions:g=!0,collisionBoundary:v=[],collisionPadding:y=0,sticky:S="partial",hideWhenDetached:b=!1,updatePositionStrategy:w="optimized",onPlaced:_,...k}=t,R=Mh(zh,i),[D,T]=m.useState(null),O=Ge(o,T),[V,L]=m.useState(null),B=hh(V),j=B?.width??0,Y=B?.height??0,ce=a+(u!=="center"?"-"+u:""),Ce=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},le=Array.isArray(v)?v:[v],ue=le.length>0,se={padding:Ce,boundary:le.filter(Fh),altBoundary:ue},{refs:be,floatingStyles:ae,placement:oe,isPositioned:U,middlewareData:G}=F1({strategy:"fixed",placement:ce,whileElementsMounted:br((...ne)=>O1(...ne,{animationFrame:w==="always"}),"whileElementsMounted"),elements:{reference:R.anchor},middleware:[U1({mainAxis:l+Y,alignmentAxis:d}),g&&B1({mainAxis:!0,crossAxis:!1,limiter:S==="partial"?H1():void 0,...se}),g&&W1({...se}),K1({...se,apply:br(({elements:ne,rects:Te,availableWidth:$e,availableHeight:je})=>{const{width:ze,height:ot}=Te.reference,it=ne.floating.style;it.setProperty("--radix-popper-available-width",`${$e}px`),it.setProperty("--radix-popper-available-height",`${je}px`),it.setProperty("--radix-popper-anchor-width",`${ze}px`),it.setProperty("--radix-popper-anchor-height",`${ot}px`)},"apply")}),V&&q1({element:V,padding:h}),nb({arrowWidth:j,arrowHeight:Y}),b&&Z1({strategy:"referenceHidden",...se,boundary:ue?se.boundary:void 0})]}),z=R.setPlacementState;ft(()=>(z(oe),()=>{z(void 0)}),[oe,z]);const[I,E]=ma(oe),W=Cn(_);ft(()=>{U&&W?.()},[U,W]);const J=G.arrow?.x,H=G.arrow?.y,re=G.arrow?.centerOffset!==0,[pe,X]=m.useState();return ft(()=>{D&&X(window.getComputedStyle(D).zIndex)},[D]),A.jsx("div",{ref:be.setFloating,"data-radix-popper-content-wrapper":"",style:{...ae,transform:U?ae.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[G.transformOrigin?.x,G.transformOrigin?.y].join(" "),...G.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:A.jsx(eb,{scope:i,placedSide:I,placedAlign:E,onArrowChange:L,arrowX:J,arrowY:H,shouldHideArrow:re,children:A.jsx(Ze.div,{"data-side":I,"data-align":E,...k,ref:O,style:{...k.style,animation:U?k.style?.animation:"none"}})})})},"PopperContent"));function Fh(r){return r!==null}br(Fh,"isNotNull");var nb=br(r=>({name:"transformOrigin",options:r,fn(t){const{placement:o,rects:i,middlewareData:a}=t,u=a.arrow?.centerOffset!==0,d=u?0:r.arrowWidth,h=u?0:r.arrowHeight,[g,v]=ma(o),y={start:"0%",center:"50%",end:"100%"}[v],S=(a.arrow?.x??0)+d/2,b=(a.arrow?.y??0)+h/2;let w="",_="";return g==="bottom"?(w=u?y:`${S}px`,_=`${-h}px`):g==="top"?(w=u?y:`${S}px`,_=`${i.floating.height+h}px`):g==="right"?(w=`${-h}px`,_=u?y:`${b}px`):g==="left"&&(w=`${i.floating.width+h}px`,_=u?y:`${b}px`),{data:{x:w,y:_}}}}),"transformOrigin");function ma(r){const[t,o="center"]=r.split("-");return[t,o]}br(ma,"getSideAndAlignFromPlacement");var Vh=Y1,Uh=J1,Bh=tb,rb=Object.defineProperty,ob=(r,t)=>rb(r,"name",{value:t,configurable:!0});function Hh(r){const t=m.useRef({value:r,previous:r});return m.useMemo(()=>(t.current.value!==r&&(t.current.previous=t.current.value,t.current.value=r),t.current.previous),[r])}ob(Hh,"usePrevious");var ib=Object.defineProperty,sb=(r,t)=>ib(r,"name",{value:t,configurable:!0});function qc(r,[t,o]){return Math.min(o,Math.max(t,r))}sb(qc,"clamp");var ab=Object.defineProperty,kr=(r,t)=>ab(r,"name",{value:t,configurable:!0}),Gc="Popover",[Wh,CR]=yr(Gc,[ha]),Qc=ha(),[lb,zo]=Wh(Gc),cb=kr(r=>{const{__scopePopover:t,children:o,open:i,defaultOpen:a,onOpenChange:l,modal:u=!1}=r,d=Qc(t),h=m.useRef(null),[g,v]=m.useState(!1),[y,S]=Ii({prop:i,defaultProp:a??!1,onChange:l,caller:Gc});return A.jsx(Vh,{...d,children:A.jsx(lb,{scope:t,contentId:Kt(),triggerRef:h,open:y,onOpenChange:S,onOpenToggle:m.useCallback(()=>S(b=>!b),[S]),hasCustomAnchor:g,onCustomAnchorAdd:m.useCallback(()=>v(!0),[]),onCustomAnchorRemove:m.useCallback(()=>v(!1),[]),modal:u,children:o})})},"Popover"),ub="PopoverTrigger",db=m.forwardRef(kr(function(t,o){const{__scopePopover:i,...a}=t,l=zo(ub,i),u=Qc(i),d=Ge(o,l.triggerRef),h=A.jsx(Ze.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":Yc(l.open),...a,ref:d,onClick:We(t.onClick,l.onOpenToggle)});return l.hasCustomAnchor?h:A.jsx(Uh,{asChild:!0,...u,children:h})},"PopoverTrigger")),Kh="PopoverPortal",[fb,pb]=Wh(Kh,{forceMount:void 0}),hb=kr(r=>{const{__scopePopover:t,forceMount:o,children:i,container:a}=r,l=zo(Kh,t);return A.jsx(fb,{scope:t,forceMount:o,children:A.jsx(Io,{present:o||l.open,children:A.jsx(bc,{asChild:!0,container:a,children:i})})})},"PopoverPortal"),Ai="PopoverContent",mb=m.forwardRef(kr(function(t,o){const i=pb(Ai,t.__scopePopover),{forceMount:a=i.forceMount,...l}=t,u=zo(Ai,t.__scopePopover);return A.jsx(Io,{present:a||u.open,children:u.modal?A.jsx(vb,{...l,ref:o}):A.jsx(yb,{...l,ref:o})})},"PopoverContent")),gb=kn("PopoverContent.RemoveScroll"),vb=m.forwardRef(kr(function(t,o){const i=zo(Ai,t.__scopePopover),a=m.useRef(null),l=Ge(o,a),u=m.useRef(!1);return m.useEffect(()=>{const d=a.current;if(d)return Oc(d)},[]),A.jsx(Xs,{as:gb,allowPinchZoom:!0,children:A.jsx(Zh,{...t,ref:l,trapFocus:i.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:We(t.onCloseAutoFocus,d=>{d.preventDefault(),u.current||i.triggerRef.current?.focus()}),onPointerDownOutside:We(t.onPointerDownOutside,d=>{const h=d.detail.originalEvent,g=h.button===0&&h.ctrlKey===!0,v=h.button===2||g;u.current=v},{checkForDefaultPrevented:!1}),onFocusOutside:We(t.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),yb=m.forwardRef(kr(function(t,o){const i=zo(Ai,t.__scopePopover),a=m.useRef(!1),l=m.useRef(!1);return A.jsx(Zh,{...t,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{t.onCloseAutoFocus?.(u),u.defaultPrevented||(a.current||i.triggerRef.current?.focus(),u.preventDefault()),a.current=!1,l.current=!1},onInteractOutside:u=>{t.onInteractOutside?.(u),u.defaultPrevented||(a.current=!0,u.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const d=u.target;i.triggerRef.current?.contains(d)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&l.current&&u.preventDefault()}})},"PopoverContentNonModal")),Zh=m.forwardRef(kr(function(t,o){const{__scopePopover:i,trapFocus:a,onOpenAutoFocus:l,onCloseAutoFocus:u,disableOutsidePointerEvents:d,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:v,onInteractOutside:y,...S}=t,b=zo(Ai,i),w=Qc(i);return Oi(),A.jsx(yc,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:l,onUnmountAutoFocus:u,children:A.jsx(pc,{asChild:!0,disableOutsidePointerEvents:d,onInteractOutside:y,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:v,onDismiss:()=>b.onOpenChange(!1),deferPointerDownOutside:!0,children:A.jsx(Bh,{"data-state":Yc(b.open),role:"dialog",id:b.contentId,...w,...S,ref:o,style:{...S.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function Yc(r){return r?"open":"closed"}kr(Yc,"getState");var xb=cb,wb=db,Sb=hb,bb=mb,kb=Object.defineProperty,Ve=(r,t)=>kb(r,"name",{value:t,configurable:!0}),Cb=[" ","Enter","ArrowUp","ArrowDown"],_b=[" ","Enter"],Fo="Select",[ga,va,Eb]=mp(Fo),[so,_R]=yr(Fo,[Eb,ha]),Xc=ha(),[Rb,Cr]=so(Fo),[Pb,Ib]=so(Fo);function qh(r){const{__scopeSelect:t,children:o,open:i,defaultOpen:a,onOpenChange:l,value:u,defaultValue:d,onValueChange:h,dir:g,name:v,autoComplete:y,disabled:S,required:b,form:w,internal_do_not_use_render:_}=r,k=Xc(t),[R,D]=m.useState(null),[T,O]=m.useState(null),[V,L]=m.useState(!1),B=Ap(g),[j,Y]=Ii({prop:i,defaultProp:a??!1,onChange:l,caller:Fo}),[ce,Ce]=Ii({prop:u,defaultProp:d,onChange:h,caller:Fo}),le=m.useRef(null),ue=m.useRef(ce);m.useEffect(()=>{const E=w?R?.ownerDocument.getElementById(w):R?.form;if(E instanceof HTMLFormElement){const W=Ve(()=>Ce(ue.current),"reset");return E.addEventListener("reset",W),()=>E.removeEventListener("reset",W)}},[w,R,Ce]);const se=R?!!w||!!R.closest("form"):!0,[be,ae]=m.useState(new Set),oe=Kt(),U=Array.from(be).map(E=>E.props.value).join(";"),G=m.useCallback(E=>{ae(W=>new Set(W).add(E))},[]),z=m.useCallback(E=>{ae(W=>{const J=new Set(W);return J.delete(E),J})},[]),I={required:b,trigger:R,onTriggerChange:D,valueNode:T,onValueNodeChange:O,valueNodeHasChildren:V,onValueNodeHasChildrenChange:L,contentId:oe,value:ce,onValueChange:Ce,open:j,onOpenChange:Y,dir:B,triggerPointerDownPosRef:le,disabled:S,name:v,autoComplete:y,form:w,nativeOptions:be,nativeSelectKey:U,isFormControl:se};return A.jsx(Vh,{...k,children:A.jsx(Rb,{scope:t,...I,children:A.jsx(ga.Provider,{scope:t,children:A.jsx(Pb,{scope:t,onNativeOptionAdd:G,onNativeOptionRemove:z,children:nm(_)?_(I):o})})})})}Ve(qh,"SelectProvider");var Ob=Ve(r=>{const{__scopeSelect:t,children:o,...i}=r;return A.jsx(qh,{__scopeSelect:t,...i,internal_do_not_use_render:({isFormControl:a})=>A.jsxs(A.Fragment,{children:[o,a?A.jsx(nk,{__scopeSelect:t}):null]})})},"Select"),Nb="SelectTrigger",Tb=m.forwardRef(Ve(function(t,o){const{__scopeSelect:i,disabled:a=!1,...l}=t,u=Xc(i),d=Cr(Nb,i),h=d.disabled||a,g=Ge(o,d.onTriggerChange),v=va(i),y=m.useRef("touch"),[S,b,w]=tu(k=>{const R=v().filter(O=>!O.disabled),D=R.find(O=>O.value===d.value),T=nu(R,k,D);T!==void 0&&d.onValueChange(T.value)}),_=Ve(k=>{h||(d.onOpenChange(!0),w()),k&&(d.triggerPointerDownPosRef.current={x:Math.round(k.pageX),y:Math.round(k.pageY)})},"handleOpen");return A.jsx(Uh,{asChild:!0,...u,children:A.jsx(Ze.button,{type:"button",role:"combobox","aria-controls":d.open?d.contentId:void 0,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":Li(d.value)?"":void 0,...l,ref:g,onClick:We(l.onClick,k=>{k.currentTarget.focus(),y.current!=="mouse"&&_(k)}),onPointerDown:We(l.onPointerDown,k=>{y.current=k.pointerType;const R=k.target;R.hasPointerCapture(k.pointerId)&&R.releasePointerCapture(k.pointerId),k.button===0&&k.ctrlKey===!1&&k.pointerType==="mouse"&&(_(k),k.preventDefault())}),onKeyDown:We(l.onKeyDown,k=>{const R=S.current!=="";!(k.ctrlKey||k.altKey||k.metaKey)&&k.key.length===1&&b(k.key),!(R&&k.key===" ")&&Cb.includes(k.key)&&(_(),k.preventDefault())})})})},"SelectTrigger")),Db="SelectValue",Ab=m.forwardRef(Ve(function(t,o){const{__scopeSelect:i,className:a,style:l,children:u,placeholder:d="",...h}=t,g=Cr(Db,i),{onValueNodeHasChildrenChange:v}=g,y=u!==void 0,S=Ge(o,g.onValueNodeChange);ft(()=>{v(y)},[v,y]);const b=Li(g.value);return A.jsx(Ze.span,{...h,asChild:b?!1:h.asChild,ref:S,style:{pointerEvents:"none"},children:A.jsx(m.Fragment,{children:b?d:u},b?"placeholder":"value")})},"SelectValue")),Lb=m.forwardRef(Ve(function(t,o){const{__scopeSelect:i,children:a,...l}=t;return A.jsx(Ze.span,{"aria-hidden":!0,...l,ref:o,children:a||"▼"})},"SelectIcon")),$b="SelectPortal",[jb,Mb]=so($b,{forceMount:void 0}),zb=Ve(r=>{const{__scopeSelect:t,forceMount:o,...i}=r;return A.jsx(jb,{scope:r.__scopeSelect,forceMount:o,children:A.jsx(bc,{asChild:!0,...i})})},"SelectPortal"),ao="SelectContent",Fb=m.forwardRef(Ve(function(t,o){const i=Mb(ao,t.__scopeSelect),{forceMount:a=i.forceMount,...l}=t,u=Cr(ao,t.__scopeSelect),[d,h]=m.useState();return ft(()=>{h(new DocumentFragment)},[]),A.jsx(Io,{present:a||u.open,children:({present:g})=>g?A.jsx(Bb,{...l,ref:o}):A.jsx(Vb,{...l,fragment:d})})},"SelectContent")),Vb=m.forwardRef(Ve(function(t,o){const{__scopeSelect:i,children:a,fragment:l}=t;return l?Ri.createPortal(A.jsx(Gh,{scope:i,children:A.jsx(ga.Slot,{scope:i,children:A.jsx("div",{ref:o,children:a})})}),l):null},"SelectContentFragment")),dn=10,[Gh,lo]=so(ao),Ub=kn("SelectContent.RemoveScroll"),Bb=m.forwardRef(Ve(function(t,o){const{__scopeSelect:i}=t,{position:a="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,side:h,sideOffset:g,align:v,alignOffset:y,arrowPadding:S,collisionBoundary:b,collisionPadding:w,sticky:_,hideWhenDetached:k,avoidCollisions:R,...D}=t,T=Cr(ao,i),[O,V]=m.useState(null),[L,B]=m.useState(null),j=Ge(o,V),[Y,ce]=m.useState(null),[Ce,le]=m.useState(null),ue=va(i),[se,be]=m.useState(!1),ae=m.useRef(!1);m.useEffect(()=>{if(O)return Oc(O)},[O]),Oi();const oe=m.useCallback(X=>{const[ne,...Te]=ue().map(ze=>ze.ref.current),[$e]=Te.slice(-1),je=document.activeElement;for(const ze of X)if(ze===je||(ze?.scrollIntoView({block:"nearest"}),ze===ne&&L&&(L.scrollTop=0),ze===$e&&L&&(L.scrollTop=L.scrollHeight),ze?.focus(),document.activeElement!==je))return},[ue,L]),U=m.useCallback(()=>oe([Y,O]),[oe,Y,O]);m.useEffect(()=>{se&&U()},[se,U]);const{onOpenChange:G,triggerPointerDownPosRef:z}=T;m.useEffect(()=>{if(O){let X={x:0,y:0};const ne=Ve($e=>{X={x:Math.abs(Math.round($e.pageX)-(z.current?.x??0)),y:Math.abs(Math.round($e.pageY)-(z.current?.y??0))}},"handlePointerMove"),Te=Ve($e=>{X.x<=10&&X.y<=10?$e.preventDefault():$e.composedPath().includes(O)||G(!1),document.removeEventListener("pointermove",ne),z.current=null},"handlePointerUp");return z.current!==null&&(document.addEventListener("pointermove",ne),document.addEventListener("pointerup",Te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",Te,{capture:!0})}}},[O,G,z]),m.useEffect(()=>{const X=Ve(()=>G(!1),"close");return window.addEventListener("blur",X),window.addEventListener("resize",X),()=>{window.removeEventListener("blur",X),window.removeEventListener("resize",X)}},[G]);const[I,E]=tu(X=>{const ne=ue().filter(je=>!je.disabled),Te=ne.find(je=>je.ref.current===document.activeElement),$e=nu(ne,X,Te);$e&&setTimeout(()=>$e.ref.current?.focus())}),W=m.useCallback((X,ne,Te)=>{const $e=!ae.current&&!Te;(T.value!==void 0&&T.value===ne||$e)&&(ce(X),$e&&(ae.current=!0))},[T.value]),J=m.useCallback(()=>O?.focus(),[O]),H=m.useCallback((X,ne,Te)=>{const $e=!ae.current&&!Te;(T.value!==void 0&&T.value===ne||$e)&&le(X)},[T.value]),re=a==="popper"?Qh:Hb,pe=re===Qh?{side:h,sideOffset:g,align:v,alignOffset:y,arrowPadding:S,collisionBoundary:b,collisionPadding:w,sticky:_,hideWhenDetached:k,avoidCollisions:R}:{};return A.jsx(Gh,{scope:i,content:O,viewport:L,onViewportChange:B,itemRefCallback:W,selectedItem:Y,onItemLeave:J,itemTextRefCallback:H,focusSelectedItem:U,selectedItemText:Ce,position:a,isPositioned:se,searchRef:I,children:A.jsx(Xs,{as:Ub,allowPinchZoom:!0,children:A.jsx(yc,{asChild:!0,trapped:T.open,onMountAutoFocus:X=>{X.preventDefault()},onUnmountAutoFocus:We(l,X=>{T.trigger?.focus({preventScroll:!0}),X.preventDefault()}),children:A.jsx(pc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:X=>X.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:A.jsx(re,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:X=>X.preventDefault(),...D,...pe,onPlaced:()=>be(!0),ref:j,style:{display:"flex",flexDirection:"column",outline:"none",...D.style},onKeyDown:We(D.onKeyDown,X=>{const ne=X.ctrlKey||X.altKey||X.metaKey;if(X.key==="Tab"&&X.preventDefault(),!ne&&X.key.length===1&&E(X.key),["ArrowUp","ArrowDown","Home","End"].includes(X.key)){let $e=ue().filter(je=>!je.disabled).map(je=>je.ref.current);if(["ArrowUp","End"].includes(X.key)&&($e=$e.slice().reverse()),["ArrowUp","ArrowDown"].includes(X.key)){const je=X.target,ze=$e.indexOf(je);$e=$e.slice(ze+1)}setTimeout(()=>oe($e)),X.preventDefault()}})})})})})})},"SelectContentImpl")),Hb=m.forwardRef(Ve(function(t,o){const{__scopeSelect:i,onPlaced:a,...l}=t,u=Cr(ao,i),d=lo(ao,i),[h,g]=m.useState(null),[v,y]=m.useState(null),S=Ge(o,y),b=va(i),w=m.useRef(!1),_=m.useRef(!0),{viewport:k,selectedItem:R,selectedItemText:D,focusSelectedItem:T}=d,O=m.useCallback(()=>{if(u.trigger&&u.valueNode&&h&&v&&k&&R&&D){const j=u.trigger.getBoundingClientRect(),Y=v.getBoundingClientRect(),ce=u.valueNode.getBoundingClientRect(),Ce=D.getBoundingClientRect();if(u.dir!=="rtl"){const je=Ce.left-Y.left,ze=ce.left-je,ot=j.left-ze,it=j.width+ot,St=Math.max(it,Y.width),Tn=window.innerWidth-dn,rr=qc(ze,[dn,Math.max(dn,Tn-St)]);h.style.minWidth=it+"px",h.style.left=rr+"px"}else{const je=Y.right-Ce.right,ze=window.innerWidth-ce.right-je,ot=window.innerWidth-j.right-ze,it=j.width+ot,St=Math.max(it,Y.width),Tn=window.innerWidth-dn,rr=qc(ze,[dn,Math.max(dn,Tn-St)]);h.style.minWidth=it+"px",h.style.right=rr+"px"}const le=b(),ue=window.innerHeight-dn*2,se=k.scrollHeight,be=window.getComputedStyle(v),ae=parseInt(be.borderTopWidth,10),oe=parseInt(be.paddingTop,10),U=parseInt(be.borderBottomWidth,10),G=parseInt(be.paddingBottom,10),z=ae+oe+se+G+U,I=Math.min(R.offsetHeight*5,z),E=window.getComputedStyle(k),W=parseInt(E.paddingTop,10),J=parseInt(E.paddingBottom,10),H=j.top+j.height/2-dn,re=ue-H,pe=R.offsetHeight/2,X=R.offsetTop+pe,ne=ae+oe+X,Te=z-ne;if(ne<=H){const je=le.length>0&&R===le[le.length-1].ref.current;h.style.bottom="0px";const ze=v.clientHeight-k.offsetTop-k.offsetHeight,ot=Math.max(re,pe+(je?J:0)+ze+U),it=ne+ot;h.style.height=it+"px"}else{const je=le.length>0&&R===le[0].ref.current;h.style.top="0px";const ot=Math.max(H,ae+k.offsetTop+(je?W:0)+pe)+Te;h.style.height=ot+"px",k.scrollTop=ne-H+k.offsetTop}h.style.margin=`${dn}px 0`,h.style.minHeight=I+"px",h.style.maxHeight=ue+"px",a?.(),requestAnimationFrame(()=>w.current=!0)}},[b,u.trigger,u.valueNode,h,v,k,R,D,u.dir,a]);ft(()=>O(),[O]);const[V,L]=m.useState();ft(()=>{v&&L(window.getComputedStyle(v).zIndex)},[v]);const B=m.useCallback(j=>{j&&_.current===!0&&(O(),T?.(),_.current=!1)},[O,T]);return A.jsx(Wb,{scope:i,contentWrapper:h,shouldExpandOnScrollRef:w,onScrollButtonChange:B,children:A.jsx("div",{ref:g,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:V},children:A.jsx(Ze.div,{...l,ref:S,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})},"SelectItemAlignedPosition")),Qh=m.forwardRef(Ve(function(t,o){const{__scopeSelect:i,align:a="start",collisionPadding:l=dn,...u}=t,d=Xc(i);return A.jsx(Bh,{...d,...u,ref:o,align:a,collisionPadding:l,style:{boxSizing:"border-box",...u.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[Wb,Jc]=so(ao,{}),Yh="SelectViewport",Kb=m.forwardRef(Ve(function(t,o){const{__scopeSelect:i,nonce:a,...l}=t,u=lo(Yh,i),d=Jc(Yh,i),h=Ge(o,u.onViewportChange),g=m.useRef(0);return A.jsxs(A.Fragment,{children:[A.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),A.jsx(ga.Slot,{scope:i,children:A.jsx(Ze.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:We(l.onScroll,v=>{const y=v.currentTarget,{contentWrapper:S,shouldExpandOnScrollRef:b}=d;if(b?.current&&S){const w=Math.abs(g.current-y.scrollTop);if(w>0){const _=window.innerHeight-dn*2,k=parseFloat(S.style.minHeight),R=parseFloat(S.style.height),D=Math.max(k,R);if(D<_){const T=D+w,O=Math.min(_,T),V=T-O;S.style.height=O+"px",S.style.bottom==="0px"&&(y.scrollTop=V>0?V:0,S.style.justifyContent="flex-end")}}}g.current=y.scrollTop})})})]})},"SelectViewport")),Zb="SelectGroup",[ER,RR]=so(Zb),eu="SelectItem",[qb,Xh]=so(eu),Gb=m.forwardRef(Ve(function(t,o){const{__scopeSelect:i,value:a,disabled:l=!1,textValue:u,...d}=t,h=Cr(eu,i),g=lo(eu,i),v=h.value===a,[y,S]=m.useState(u??""),[b,w]=m.useState(!1),_=Cn(O=>g.itemRefCallback?.(O,a,l)),k=Ge(o,_),R=Kt(),D=m.useRef("touch"),T=Ve(()=>{l||(h.onValueChange(a),h.onOpenChange(!1))},"handleSelect");return A.jsx(qb,{scope:i,value:a,disabled:l,textId:R,isSelected:v,onItemTextChange:m.useCallback(O=>{S(V=>V||(O?.textContent??"").trim())},[]),children:A.jsx(ga.ItemSlot,{scope:i,value:a,disabled:l,textValue:y,children:A.jsx(Ze.div,{role:"option","aria-labelledby":R,"data-highlighted":b?"":void 0,"aria-selected":v&&b,"data-state":v?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...d,ref:k,onFocus:We(d.onFocus,()=>w(!0)),onBlur:We(d.onBlur,()=>w(!1)),onClick:We(d.onClick,()=>{D.current!=="mouse"&&T()}),onPointerUp:We(d.onPointerUp,()=>{D.current==="mouse"&&T()}),onPointerDown:We(d.onPointerDown,O=>{D.current=O.pointerType}),onPointerMove:We(d.onPointerMove,O=>{D.current=O.pointerType,l?g.onItemLeave?.():D.current==="mouse"&&O.currentTarget.focus({preventScroll:!0})}),onPointerLeave:We(d.onPointerLeave,O=>{O.currentTarget===document.activeElement&&g.onItemLeave?.()}),onKeyDown:We(d.onKeyDown,O=>{l||O.target!==O.currentTarget||g.searchRef?.current!==""&&O.key===" "||(_b.includes(O.key)&&T(),O.key===" "&&O.preventDefault())})})})})},"SelectItem")),ya="SelectItemText",Qb=m.forwardRef(Ve(function(t,o){const{__scopeSelect:i,className:a,style:l,...u}=t,d=Cr(ya,i),h=lo(ya,i),g=Xh(ya,i),v=Ib(ya,i),[y,S]=m.useState(null),b=Cn(T=>h.itemTextRefCallback?.(T,g.value,g.disabled)),w=Ge(o,S,g.onItemTextChange,b),_=y?.textContent,k=m.useMemo(()=>A.jsx("option",{value:g.value,disabled:g.disabled,children:_},g.value),[g.disabled,g.value,_]),{onNativeOptionAdd:R,onNativeOptionRemove:D}=v;return ft(()=>(R(k),()=>D(k)),[R,D,k]),A.jsxs(A.Fragment,{children:[A.jsx(Ze.span,{id:g.textId,...u,ref:w}),g.isSelected&&d.valueNode&&!d.valueNodeHasChildren&&!Li(d.value)?Ri.createPortal(u.children,d.valueNode):null]})},"SelectItemText")),Yb="SelectItemIndicator",Xb=m.forwardRef(Ve(function(t,o){const{__scopeSelect:i,...a}=t;return Xh(Yb,i).isSelected?A.jsx(Ze.span,{"aria-hidden":!0,...a,ref:o}):null},"SelectItemIndicator")),Jh="SelectScrollUpButton",Jb=m.forwardRef(Ve(function(t,o){const i=lo(Jh,t.__scopeSelect),a=Jc(Jh,t.__scopeSelect),[l,u]=m.useState(!1),d=Ge(o,a.onScrollButtonChange);return ft(()=>{if(i.viewport&&i.isPositioned){let h=function(){const v=g.scrollTop>0;u(v)};Ve(h,"handleScroll");const g=i.viewport;return h(),g.addEventListener("scroll",h),()=>g.removeEventListener("scroll",h)}},[i.viewport,i.isPositioned]),l?A.jsx(tm,{...t,ref:d,onAutoScroll:()=>{const{viewport:h,selectedItem:g}=i;h&&g&&(h.scrollTop=h.scrollTop-g.offsetHeight)}}):null},"SelectScrollUpButton")),em="SelectScrollDownButton",ek=m.forwardRef(Ve(function(t,o){const i=lo(em,t.__scopeSelect),a=Jc(em,t.__scopeSelect),[l,u]=m.useState(!1),d=Ge(o,a.onScrollButtonChange);return ft(()=>{if(i.viewport&&i.isPositioned){let h=function(){const v=g.scrollHeight-g.clientHeight,y=Math.ceil(g.scrollTop)<v;u(y)};Ve(h,"handleScroll");const g=i.viewport;return h(),g.addEventListener("scroll",h),()=>g.removeEventListener("scroll",h)}},[i.viewport,i.isPositioned]),l?A.jsx(tm,{...t,ref:d,onAutoScroll:()=>{const{viewport:h,selectedItem:g}=i;h&&g&&(h.scrollTop=h.scrollTop+g.offsetHeight)}}):null},"SelectScrollDownButton")),tm=m.forwardRef(Ve(function(t,o){const{__scopeSelect:i,onAutoScroll:a,...l}=t,u=lo("SelectScrollButton",i),d=m.useRef(null),h=va(i),g=m.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return m.useEffect(()=>()=>g(),[g]),ft(()=>{h().find(y=>y.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[h]),A.jsx(Ze.div,{"aria-hidden":!0,...l,ref:o,style:{flexShrink:0,...l.style},onPointerDown:We(l.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(a,50))}),onPointerMove:We(l.onPointerMove,()=>{u.onItemLeave?.(),d.current===null&&(d.current=window.setInterval(a,50))}),onPointerLeave:We(l.onPointerLeave,()=>{g()})})},"SelectScrollButtonImpl")),tk="SelectBubbleInput",nk=m.forwardRef(Ve(function({__scopeSelect:t,...o},i){const a=Cr(tk,t),{value:l,onValueChange:u,required:d,disabled:h,name:g,autoComplete:v,form:y}=a,{nativeOptions:S,nativeSelectKey:b}=a,w=m.useRef(null),_=Ge(i,w),k=l??"",R=Hh(k),D=Array.from(S).some(T=>(T.props.value??"")==="");return m.useEffect(()=>{const T=w.current;if(!T)return;const O=window.HTMLSelectElement.prototype,L=Object.getOwnPropertyDescriptor(O,"value").set;if(R!==k&&L){const B=new Event("change",{bubbles:!0});L.call(T,k),T.dispatchEvent(B)}},[R,k]),A.jsxs(Ze.select,{"aria-hidden":!0,required:d,tabIndex:-1,name:g,autoComplete:v,disabled:h,form:y,onChange:T=>u(T.target.value),...o,style:{...Z0,...o.style},ref:_,defaultValue:k,children:[Li(l)&&!D?A.jsx("option",{value:""}):null,Array.from(S)]},b)},"SelectBubbleInput"));function nm(r){return typeof r=="function"}Ve(nm,"isFunction");function Li(r){return r===""||r===void 0}Ve(Li,"shouldShowPlaceholder");function tu(r){const t=Cn(r),o=m.useRef(""),i=m.useRef(0),a=m.useCallback(u=>{const d=o.current+u;t(d),Ve((function h(g){o.current=g,window.clearTimeout(i.current),g!==""&&(i.current=window.setTimeout(()=>h(""),1e3))}),"updateSearch")(d)},[t]),l=m.useCallback(()=>{o.current="",window.clearTimeout(i.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(i.current),[]),[o,a,l]}Ve(tu,"useTypeaheadSearch");function nu(r,t,o){const a=t.length>1&&Array.from(t).every(g=>g===t[0])?t[0]:t,l=o?r.indexOf(o):-1;let u=rm(r,Math.max(l,0));a.length===1&&(u=u.filter(g=>g!==o));const h=u.find(g=>g.textValue.toLowerCase().startsWith(a.toLowerCase()));return h!==o?h:void 0}Ve(nu,"findNextItem");function rm(r,t){return r.map((o,i)=>r[(t+i)%r.length])}Ve(rm,"wrapArray");const om=r=>typeof r=="boolean"?`${r}`:r===0?"0":r,im=Af,sm=(r,t)=>o=>{var i;if(t?.variants==null)return im(r,o?.class,o?.className);const{variants:a,defaultVariants:l}=t,u=Object.keys(a).map(g=>{const v=o?.[g],y=l?.[g];if(v===null)return null;const S=om(v)||om(y);return a[g][S]}),d=o&&Object.entries(o).reduce((g,v)=>{let[y,S]=v;return S===void 0||(g[y]=S),g},{}),h=t==null||(i=t.compoundVariants)===null||i===void 0?void 0:i.reduce((g,v)=>{let{class:y,className:S,...b}=v;return Object.entries(b).every(w=>{let[_,k]=w;return Array.isArray(k)?k.includes({...l,...d}[_]):{...l,...d}[_]===k})?[...g,y,S]:g},[]);return im(r,u,h,o?.class,o?.className)};var am=1,rk=.9,ok=.8,ik=.17,ru=.1,ou=.999,sk=.9999,ak=.99,lk=/[\\\/_+.#"@\[\(\{&]/,ck=/[\\\/_+.#"@\[\(\{&]/g,uk=/[\s-]/,lm=/[\s-]/g;function iu(r,t,o,i,a,l,u){if(l===t.length)return a===r.length?am:ak;var d=`${a},${l}`;if(u[d]!==void 0)return u[d];for(var h=i.charAt(l),g=o.indexOf(h,a),v=0,y,S,b,w;g>=0;)y=iu(r,t,o,i,g+1,l+1,u),y>v&&(g===a?y*=am:lk.test(r.charAt(g-1))?(y*=ok,b=r.slice(a,g-1).match(ck),b&&a>0&&(y*=Math.pow(ou,b.length))):uk.test(r.charAt(g-1))?(y*=rk,w=r.slice(a,g-1).match(lm),w&&a>0&&(y*=Math.pow(ou,w.length))):(y*=ik,a>0&&(y*=Math.pow(ou,g-a))),r.charAt(g)!==t.charAt(l)&&(y*=sk)),(y<ru&&o.charAt(g-1)===i.charAt(l+1)||i.charAt(l+1)===i.charAt(l)&&o.charAt(g-1)!==i.charAt(l))&&(S=iu(r,t,o,i,g+1,l+2,u),S*ru>y&&(y=S*ru)),y>v&&(v=y),g=o.indexOf(h,g+1);return u[d]=v,v}function cm(r){return r.toLowerCase().replace(lm," ")}function dk(r,t,o){return r=o&&o.length>0?`${r+" "+o.join(" ")}`:r,iu(r,t,cm(r),cm(t),0,0,{})}var $i='[cmdk-group=""]',su='[cmdk-group-items=""]',fk='[cmdk-group-heading=""]',um='[cmdk-item=""]',dm=`${um}:not([aria-disabled="true"])`,au="cmdk-item-select",Vo="data-value",pk=(r,t,o)=>dk(r,t,o),fm=m.createContext(void 0),ji=()=>m.useContext(fm),pm=m.createContext(void 0),lu=()=>m.useContext(pm),hm=m.createContext(void 0),mm=m.forwardRef((r,t)=>{let o=Uo(()=>{var E,W;return{search:"",value:(W=(E=r.value)!=null?E:r.defaultValue)!=null?W:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),i=Uo(()=>new Set),a=Uo(()=>new Map),l=Uo(()=>new Map),u=Uo(()=>new Set),d=gm(r),{label:h,children:g,value:v,onValueChange:y,filter:S,shouldFilter:b,loop:w,disablePointerSelection:_=!1,vimBindings:k=!0,...R}=r,D=Kt(),T=Kt(),O=Kt(),V=m.useRef(null),L=Ck();co(()=>{if(v!==void 0){let E=v.trim();o.current.value=E,B.emit()}},[v]),co(()=>{L(6,ue)},[]);let B=m.useMemo(()=>({subscribe:E=>(u.current.add(E),()=>u.current.delete(E)),snapshot:()=>o.current,setState:(E,W,J)=>{var H,re,pe,X;if(!Object.is(o.current[E],W)){if(o.current[E]=W,E==="search")le(),ce(),L(1,Ce);else if(E==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ne=document.getElementById(O);ne?ne.focus():(H=document.getElementById(D))==null||H.focus()}if(L(7,()=>{var ne;o.current.selectedItemId=(ne=se())==null?void 0:ne.id,B.emit()}),J||L(5,ue),((re=d.current)==null?void 0:re.value)!==void 0){let ne=W??"";(X=(pe=d.current).onValueChange)==null||X.call(pe,ne);return}}B.emit()}},emit:()=>{u.current.forEach(E=>E())}}),[]),j=m.useMemo(()=>({value:(E,W,J)=>{var H;W!==((H=l.current.get(E))==null?void 0:H.value)&&(l.current.set(E,{value:W,keywords:J}),o.current.filtered.items.set(E,Y(W,J)),L(2,()=>{ce(),B.emit()}))},item:(E,W)=>(i.current.add(E),W&&(a.current.has(W)?a.current.get(W).add(E):a.current.set(W,new Set([E]))),L(3,()=>{le(),ce(),o.current.value||Ce(),B.emit()}),()=>{l.current.delete(E),i.current.delete(E),o.current.filtered.items.delete(E);let J=se();L(4,()=>{le(),J?.getAttribute("id")===E&&Ce(),B.emit()})}),group:E=>(a.current.has(E)||a.current.set(E,new Set),()=>{l.current.delete(E),a.current.delete(E)}),filter:()=>d.current.shouldFilter,label:h||r["aria-label"],getDisablePointerSelection:()=>d.current.disablePointerSelection,listId:D,inputId:O,labelId:T,listInnerRef:V}),[]);function Y(E,W){var J,H;let re=(H=(J=d.current)==null?void 0:J.filter)!=null?H:pk;return E?re(E,o.current.search,W):0}function ce(){if(!o.current.search||d.current.shouldFilter===!1)return;let E=o.current.filtered.items,W=[];o.current.filtered.groups.forEach(H=>{let re=a.current.get(H),pe=0;re.forEach(X=>{let ne=E.get(X);pe=Math.max(ne,pe)}),W.push([H,pe])});let J=V.current;be().sort((H,re)=>{var pe,X;let ne=H.getAttribute("id"),Te=re.getAttribute("id");return((pe=E.get(Te))!=null?pe:0)-((X=E.get(ne))!=null?X:0)}).forEach(H=>{let re=H.closest(su);re?re.appendChild(H.parentElement===re?H:H.closest(`${su} > *`)):J.appendChild(H.parentElement===J?H:H.closest(`${su} > *`))}),W.sort((H,re)=>re[1]-H[1]).forEach(H=>{var re;let pe=(re=V.current)==null?void 0:re.querySelector(`${$i}[${Vo}="${encodeURIComponent(H[0])}"]`);pe?.parentElement.appendChild(pe)})}function Ce(){let E=be().find(J=>J.getAttribute("aria-disabled")!=="true"),W=E?.getAttribute(Vo);B.setState("value",W||void 0)}function le(){var E,W,J,H;if(!o.current.search||d.current.shouldFilter===!1){o.current.filtered.count=i.current.size;return}o.current.filtered.groups=new Set;let re=0;for(let pe of i.current){let X=(W=(E=l.current.get(pe))==null?void 0:E.value)!=null?W:"",ne=(H=(J=l.current.get(pe))==null?void 0:J.keywords)!=null?H:[],Te=Y(X,ne);o.current.filtered.items.set(pe,Te),Te>0&&re++}for(let[pe,X]of a.current)for(let ne of X)if(o.current.filtered.items.get(ne)>0){o.current.filtered.groups.add(pe);break}o.current.filtered.count=re}function ue(){var E,W,J;let H=se();H&&(((E=H.parentElement)==null?void 0:E.firstChild)===H&&((J=(W=H.closest($i))==null?void 0:W.querySelector(fk))==null||J.scrollIntoView({block:"nearest"})),H.scrollIntoView({block:"nearest"}))}function se(){var E;return(E=V.current)==null?void 0:E.querySelector(`${um}[aria-selected="true"]`)}function be(){var E;return Array.from(((E=V.current)==null?void 0:E.querySelectorAll(dm))||[])}function ae(E){let W=be()[E];W&&B.setState("value",W.getAttribute(Vo))}function oe(E){var W;let J=se(),H=be(),re=H.findIndex(X=>X===J),pe=H[re+E];(W=d.current)!=null&&W.loop&&(pe=re+E<0?H[H.length-1]:re+E===H.length?H[0]:H[re+E]),pe&&B.setState("value",pe.getAttribute(Vo))}function U(E){let W=se(),J=W?.closest($i),H;for(;J&&!H;)J=E>0?bk(J,$i):kk(J,$i),H=J?.querySelector(dm);H?B.setState("value",H.getAttribute(Vo)):oe(E)}let G=()=>ae(be().length-1),z=E=>{E.preventDefault(),E.metaKey?G():E.altKey?U(1):oe(1)},I=E=>{E.preventDefault(),E.metaKey?ae(0):E.altKey?U(-1):oe(-1)};return m.createElement(Ze.div,{ref:t,tabIndex:-1,...R,"cmdk-root":"",onKeyDown:E=>{var W;(W=R.onKeyDown)==null||W.call(R,E);let J=E.nativeEvent.isComposing||E.keyCode===229;if(!(E.defaultPrevented||J))switch(E.key){case"n":case"j":{k&&E.ctrlKey&&z(E);break}case"ArrowDown":{z(E);break}case"p":case"k":{k&&E.ctrlKey&&I(E);break}case"ArrowUp":{I(E);break}case"Home":{E.preventDefault(),ae(0);break}case"End":{E.preventDefault(),G();break}case"Enter":{E.preventDefault();let H=se();if(H){let re=new Event(au);H.dispatchEvent(re)}}}}},m.createElement("label",{"cmdk-label":"",htmlFor:j.inputId,id:j.labelId,style:Ek},h),xa(r,E=>m.createElement(pm.Provider,{value:B},m.createElement(fm.Provider,{value:j},E))))}),hk=m.forwardRef((r,t)=>{var o,i;let a=Kt(),l=m.useRef(null),u=m.useContext(hm),d=ji(),h=gm(r),g=(i=(o=h.current)==null?void 0:o.forceMount)!=null?i:u?.forceMount;co(()=>{if(!g)return d.item(a,u?.id)},[g]);let v=vm(a,l,[r.value,r.children,l],r.keywords),y=lu(),S=_r(L=>L.value&&L.value===v.current),b=_r(L=>g||d.filter()===!1?!0:L.search?L.filtered.items.get(a)>0:!0);m.useEffect(()=>{let L=l.current;if(!(!L||r.disabled))return L.addEventListener(au,w),()=>L.removeEventListener(au,w)},[b,r.onSelect,r.disabled]);function w(){var L,B;_(),(B=(L=h.current).onSelect)==null||B.call(L,v.current)}function _(){y.setState("value",v.current,!0)}if(!b)return null;let{disabled:k,value:R,onSelect:D,forceMount:T,keywords:O,...V}=r;return m.createElement(Ze.div,{ref:no(l,t),...V,id:a,"cmdk-item":"",role:"option","aria-disabled":!!k,"aria-selected":!!S,"data-disabled":!!k,"data-selected":!!S,onPointerMove:k||d.getDisablePointerSelection()?void 0:_,onClick:k?void 0:w},r.children)}),mk=m.forwardRef((r,t)=>{let{heading:o,children:i,forceMount:a,...l}=r,u=Kt(),d=m.useRef(null),h=m.useRef(null),g=Kt(),v=ji(),y=_r(b=>a||v.filter()===!1?!0:b.search?b.filtered.groups.has(u):!0);co(()=>v.group(u),[]),vm(u,d,[r.value,r.heading,h]);let S=m.useMemo(()=>({id:u,forceMount:a}),[a]);return m.createElement(Ze.div,{ref:no(d,t),...l,"cmdk-group":"",role:"presentation",hidden:y?void 0:!0},o&&m.createElement("div",{ref:h,"cmdk-group-heading":"","aria-hidden":!0,id:g},o),xa(r,b=>m.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":o?g:void 0},m.createElement(hm.Provider,{value:S},b))))}),gk=m.forwardRef((r,t)=>{let{alwaysRender:o,...i}=r,a=m.useRef(null),l=_r(u=>!u.search);return!o&&!l?null:m.createElement(Ze.div,{ref:no(a,t),...i,"cmdk-separator":"",role:"separator"})}),vk=m.forwardRef((r,t)=>{let{onValueChange:o,...i}=r,a=r.value!=null,l=lu(),u=_r(g=>g.search),d=_r(g=>g.selectedItemId),h=ji();return m.useEffect(()=>{r.value!=null&&l.setState("search",r.value)},[r.value]),m.createElement(Ze.input,{ref:t,...i,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":h.listId,"aria-labelledby":h.labelId,"aria-activedescendant":d,id:h.inputId,type:"text",value:a?r.value:u,onChange:g=>{a||l.setState("search",g.target.value),o?.(g.target.value)}})}),yk=m.forwardRef((r,t)=>{let{children:o,label:i="Suggestions",...a}=r,l=m.useRef(null),u=m.useRef(null),d=_r(g=>g.selectedItemId),h=ji();return m.useEffect(()=>{if(u.current&&l.current){let g=u.current,v=l.current,y,S=new ResizeObserver(()=>{y=requestAnimationFrame(()=>{let b=g.offsetHeight;v.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return S.observe(g),()=>{cancelAnimationFrame(y),S.unobserve(g)}}},[]),m.createElement(Ze.div,{ref:no(l,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":d,"aria-label":i,id:h.listId},xa(r,g=>m.createElement("div",{ref:no(u,h.listInnerRef),"cmdk-list-sizer":""},g)))}),xk=m.forwardRef((r,t)=>{let{open:o,onOpenChange:i,overlayClassName:a,contentClassName:l,container:u,...d}=r;return m.createElement(Tc,{open:o,onOpenChange:i},m.createElement(Dc,{container:u},m.createElement(Lc,{"cmdk-overlay":"",className:a}),m.createElement($c,{"aria-label":r.label,"cmdk-dialog":"",className:l},m.createElement(mm,{ref:t,...d}))))}),wk=m.forwardRef((r,t)=>_r(o=>o.filtered.count===0)?m.createElement(Ze.div,{ref:t,...r,"cmdk-empty":"",role:"presentation"}):null),Sk=m.forwardRef((r,t)=>{let{progress:o,children:i,label:a="Loading...",...l}=r;return m.createElement(Ze.div,{ref:t,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},xa(r,u=>m.createElement("div",{"aria-hidden":!0},u)))}),Mi=Object.assign(mm,{List:yk,Item:hk,Input:vk,Group:mk,Separator:gk,Dialog:xk,Empty:wk,Loading:Sk});function bk(r,t){let o=r.nextElementSibling;for(;o;){if(o.matches(t))return o;o=o.nextElementSibling}}function kk(r,t){let o=r.previousElementSibling;for(;o;){if(o.matches(t))return o;o=o.previousElementSibling}}function gm(r){let t=m.useRef(r);return co(()=>{t.current=r}),t}var co=typeof window>"u"?m.useEffect:m.useLayoutEffect;function Uo(r){let t=m.useRef();return t.current===void 0&&(t.current=r()),t}function _r(r){let t=lu(),o=()=>r(t.snapshot());return m.useSyncExternalStore(t.subscribe,o,o)}function vm(r,t,o,i=[]){let a=m.useRef(),l=ji();return co(()=>{var u;let d=(()=>{var g;for(let v of o){if(typeof v=="string")return v.trim();if(typeof v=="object"&&"current"in v)return v.current?(g=v.current.textContent)==null?void 0:g.trim():a.current}})(),h=i.map(g=>g.trim());l.value(r,d,h),(u=t.current)==null||u.setAttribute(Vo,d),a.current=d}),a}var Ck=()=>{let[r,t]=m.useState(),o=Uo(()=>new Map);return co(()=>{o.current.forEach(i=>i()),o.current=new Map},[r]),(i,a)=>{o.current.set(i,a),t({})}};function _k(r){let t=r.type;return typeof t=="function"?t(r.props):"render"in t?t.render(r.props):r}function xa({asChild:r,children:t},o){return r&&m.isValidElement(t)?m.cloneElement(_k(t),{ref:t.ref},o(t.props.children)):o(t)}var Ek={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Oe=r=>typeof r=="string",zi=()=>{let r,t;const o=new Promise((i,a)=>{r=i,t=a});return o.resolve=r,o.reject=t,o},ym=r=>r==null?"":""+r,Rk=(r,t,o)=>{r.forEach(i=>{t[i]&&(o[i]=t[i])})},Pk=/###/g,xm=r=>r&&r.indexOf("###")>-1?r.replace(Pk,"."):r,wm=r=>!r||Oe(r),Fi=(r,t,o)=>{const i=Oe(t)?t.split("."):t;let a=0;for(;a<i.length-1;){if(wm(r))return{};const l=xm(i[a]);!r[l]&&o&&(r[l]=new o),Object.prototype.hasOwnProperty.call(r,l)?r=r[l]:r={},++a}return wm(r)?{}:{obj:r,k:xm(i[a])}},Sm=(r,t,o)=>{const{obj:i,k:a}=Fi(r,t,Object);if(i!==void 0||t.length===1){i[a]=o;return}let l=t[t.length-1],u=t.slice(0,t.length-1),d=Fi(r,u,Object);for(;d.obj===void 0&&u.length;)l=`${u[u.length-1]}.${l}`,u=u.slice(0,u.length-1),d=Fi(r,u,Object),d?.obj&&typeof d.obj[`${d.k}.${l}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${l}`]=o},Ik=(r,t,o,i)=>{const{obj:a,k:l}=Fi(r,t,Object);a[l]=a[l]||[],a[l].push(o)},wa=(r,t)=>{const{obj:o,k:i}=Fi(r,t);if(o&&Object.prototype.hasOwnProperty.call(o,i))return o[i]},Ok=(r,t,o)=>{const i=wa(r,o);return i!==void 0?i:wa(t,o)},bm=(r,t,o)=>{for(const i in t)i!=="__proto__"&&i!=="constructor"&&(i in r?Oe(r[i])||r[i]instanceof String||Oe(t[i])||t[i]instanceof String?o&&(r[i]=t[i]):bm(r[i],t[i],o):r[i]=t[i]);return r},Bo=r=>r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Nk={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Tk=r=>Oe(r)?r.replace(/[&<>"'\/]/g,t=>Nk[t]):r;class Dk{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const o=this.regExpMap.get(t);if(o!==void 0)return o;const i=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,i),this.regExpQueue.push(t),i}}const Ak=[" ",",","?","!",";"],Lk=new Dk(20),$k=(r,t,o)=>{t=t||"",o=o||"";const i=Ak.filter(u=>t.indexOf(u)<0&&o.indexOf(u)<0);if(i.length===0)return!0;const a=Lk.getRegExp(`(${i.map(u=>u==="?"?"\\?":u).join("|")})`);let l=!a.test(r);if(!l){const u=r.indexOf(o);u>0&&!a.test(r.substring(0,u))&&(l=!0)}return l},cu=(r,t,o=".")=>{if(!r)return;if(r[t])return Object.prototype.hasOwnProperty.call(r,t)?r[t]:void 0;const i=t.split(o);let a=r;for(let l=0;l<i.length;){if(!a||typeof a!="object")return;let u,d="";for(let h=l;h<i.length;++h)if(h!==l&&(d+=o),d+=i[h],u=a[d],u!==void 0){if(["string","number","boolean"].indexOf(typeof u)>-1&&h<i.length-1)continue;l+=h-l+1;break}a=u}return a},Vi=r=>r?.replace("_","-"),jk={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,t){console?.[r]?.apply?.(console,t)}};class Sa{constructor(t,o={}){this.init(t,o)}init(t,o={}){this.prefix=o.prefix||"i18next:",this.logger=t||jk,this.options=o,this.debug=o.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,o,i,a){return a&&!this.debug?null:(Oe(t[0])&&(t[0]=`${i}${this.prefix} ${t[0]}`),this.logger[o](t))}create(t){return new Sa(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Sa(this.logger,t)}}var In=new Sa;class ba{constructor(){this.observers={}}on(t,o){return t.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const a=this.observers[i].get(o)||0;this.observers[i].set(o,a+1)}),this}off(t,o){if(this.observers[t]){if(!o){delete this.observers[t];return}this.observers[t].delete(o)}}emit(t,...o){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([a,l])=>{for(let u=0;u<l;u++)a(...o)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([a,l])=>{for(let u=0;u<l;u++)a.apply(a,[t,...o])})}}class km extends ba{constructor(t,o={ns:["translation"],defaultNS:"translation"}){super(),this.data=t||{},this.options=o,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const o=this.options.ns.indexOf(t);o>-1&&this.options.ns.splice(o,1)}getResource(t,o,i,a={}){const l=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,u=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;t.indexOf(".")>-1?d=t.split("."):(d=[t,o],i&&(Array.isArray(i)?d.push(...i):Oe(i)&&l?d.push(...i.split(l)):d.push(i)));const h=wa(this.data,d);return!h&&!o&&!i&&t.indexOf(".")>-1&&(t=d[0],o=d[1],i=d.slice(2).join(".")),h||!u||!Oe(i)?h:cu(this.data?.[t]?.[o],i,l)}addResource(t,o,i,a,l={silent:!1}){const u=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let d=[t,o];i&&(d=d.concat(u?i.split(u):i)),t.indexOf(".")>-1&&(d=t.split("."),a=o,o=d[1]),this.addNamespaces(o),Sm(this.data,d,a),l.silent||this.emit("added",t,o,i,a)}addResources(t,o,i,a={silent:!1}){for(const l in i)(Oe(i[l])||Array.isArray(i[l]))&&this.addResource(t,o,l,i[l],{silent:!0});a.silent||this.emit("added",t,o,i)}addResourceBundle(t,o,i,a,l,u={silent:!1,skipCopy:!1}){let d=[t,o];t.indexOf(".")>-1&&(d=t.split("."),a=i,i=o,o=d[1]),this.addNamespaces(o);let h=wa(this.data,d)||{};u.skipCopy||(i=JSON.parse(JSON.stringify(i))),a?bm(h,i,l):h={...h,...i},Sm(this.data,d,h),u.silent||this.emit("added",t,o,i)}removeResourceBundle(t,o){this.hasResourceBundle(t,o)&&delete this.data[t][o],this.removeNamespaces(o),this.emit("removed",t,o)}hasResourceBundle(t,o){return this.getResource(t,o)!==void 0}getResourceBundle(t,o){return o||(o=this.options.defaultNS),this.getResource(t,o)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const o=this.getDataByLanguage(t);return!!(o&&Object.keys(o)||[]).find(a=>o[a]&&Object.keys(o[a]).length>0)}toJSON(){return this.data}}var Cm={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,t,o,i,a){return r.forEach(l=>{t=this.processors[l]?.process(t,o,i,a)??t}),t}};const _m=Symbol("i18next/PATH_KEY");function Mk(){const r=[],t=Object.create(null);let o;return t.get=(i,a)=>(o?.revoke?.(),a===_m?r:(r.push(a),o=Proxy.revocable(i,t),o.proxy)),Proxy.revocable(Object.create(null),t).proxy}function uu(r,t){const{[_m]:o}=r(Mk());return o.join(t?.keySeparator??".")}const Em={},du=r=>!Oe(r)&&typeof r!="boolean"&&typeof r!="number";class ka extends ba{constructor(t,o={}){super(),Rk(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=o,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=In.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t,o={interpolation:{}}){const i={...o};if(t==null)return!1;const a=this.resolve(t,i);if(a?.res===void 0)return!1;const l=du(a.res);return!(i.returnObjects===!1&&l)}extractFromKey(t,o){let i=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let l=o.ns||this.options.defaultNS||[];const u=i&&t.indexOf(i)>-1,d=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!$k(t,i,a);if(u&&!d){const h=t.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:t,namespaces:Oe(l)?[l]:l};const g=t.split(i);(i!==a||i===a&&this.options.ns.indexOf(g[0])>-1)&&(l=g.shift()),t=g.join(a)}return{key:t,namespaces:Oe(l)?[l]:l}}translate(t,o,i){let a=typeof o=="object"?{...o}:o;if(typeof a!="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),typeof a=="object"&&(a={...a}),a||(a={}),t==null)return"";typeof t=="function"&&(t=uu(t,{...this.options,...a})),Array.isArray(t)||(t=[String(t)]);const l=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,u=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,{key:d,namespaces:h}=this.extractFromKey(t[t.length-1],a),g=h[h.length-1];let v=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;v===void 0&&(v=":");const y=a.lng||this.language,S=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(y?.toLowerCase()==="cimode")return S?l?{res:`${g}${v}${d}`,usedKey:d,exactUsedKey:d,usedLng:y,usedNS:g,usedParams:this.getUsedParamsDetails(a)}:`${g}${v}${d}`:l?{res:d,usedKey:d,exactUsedKey:d,usedLng:y,usedNS:g,usedParams:this.getUsedParamsDetails(a)}:d;const b=this.resolve(t,a);let w=b?.res;const _=b?.usedKey||d,k=b?.exactUsedKey||d,R=["[object Number]","[object Function]","[object RegExp]"],D=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,O=a.count!==void 0&&!Oe(a.count),V=ka.hasDefaultValue(a),L=O?this.pluralResolver.getSuffix(y,a.count,a):"",B=a.ordinal&&O?this.pluralResolver.getSuffix(y,a.count,{ordinal:!1}):"",j=O&&!a.ordinal&&a.count===0,Y=j&&a[`defaultValue${this.options.pluralSeparator}zero`]||a[`defaultValue${L}`]||a[`defaultValue${B}`]||a.defaultValue;let ce=w;T&&!w&&V&&(ce=Y);const Ce=du(ce),le=Object.prototype.toString.apply(ce);if(T&&ce&&Ce&&R.indexOf(le)<0&&!(Oe(D)&&Array.isArray(ce))){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ue=this.options.returnedObjectHandler?this.options.returnedObjectHandler(_,ce,{...a,ns:h}):`key '${d} (${this.language})' returned an object instead of string.`;return l?(b.res=ue,b.usedParams=this.getUsedParamsDetails(a),b):ue}if(u){const ue=Array.isArray(ce),se=ue?[]:{},be=ue?k:_;for(const ae in ce)if(Object.prototype.hasOwnProperty.call(ce,ae)){const oe=`${be}${u}${ae}`;V&&!w?se[ae]=this.translate(oe,{...a,defaultValue:du(Y)?Y[ae]:void 0,joinArrays:!1,ns:h}):se[ae]=this.translate(oe,{...a,joinArrays:!1,ns:h}),se[ae]===oe&&(se[ae]=ce[ae])}w=se}}else if(T&&Oe(D)&&Array.isArray(w))w=w.join(D),w&&(w=this.extendTranslation(w,t,a,i));else{let ue=!1,se=!1;!this.isValidLookup(w)&&V&&(ue=!0,w=Y),this.isValidLookup(w)||(se=!0,w=d);const ae=(a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&se?void 0:w,oe=V&&Y!==w&&this.options.updateMissing;if(se||ue||oe){if(this.logger.log(oe?"updateKey":"missingKey",y,g,d,oe?Y:w),u){const I=this.resolve(d,{...a,keySeparator:!1});I&&I.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const G=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&G&&G[0])for(let I=0;I<G.length;I++)U.push(G[I]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(a.lng||this.language):U.push(a.lng||this.language);const z=(I,E,W)=>{const J=V&&W!==w?W:ae;this.options.missingKeyHandler?this.options.missingKeyHandler(I,g,E,J,oe,a):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(I,g,E,J,oe,a),this.emit("missingKey",I,g,E,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?U.forEach(I=>{const E=this.pluralResolver.getSuffixes(I,a);j&&a[`defaultValue${this.options.pluralSeparator}zero`]&&E.indexOf(`${this.options.pluralSeparator}zero`)<0&&E.push(`${this.options.pluralSeparator}zero`),E.forEach(W=>{z([I],d+W,a[`defaultValue${W}`]||Y)})}):z(U,d,Y))}w=this.extendTranslation(w,t,a,b,i),se&&w===d&&this.options.appendNamespaceToMissingKey&&(w=`${g}${v}${d}`),(se||ue)&&this.options.parseMissingKeyHandler&&(w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}${v}${d}`:d,ue?w:void 0,a))}return l?(b.res=w,b.usedParams=this.getUsedParamsDetails(a),b):w}extendTranslation(t,o,i,a,l){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const h=Oe(t)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let g;if(h){const y=t.match(this.interpolator.nestingRegexp);g=y&&y.length}let v=i.replace&&!Oe(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(v={...this.options.interpolation.defaultVariables,...v}),t=this.interpolator.interpolate(t,v,i.lng||this.language||a.usedLng,i),h){const y=t.match(this.interpolator.nestingRegexp),S=y&&y.length;g<S&&(i.nest=!1)}!i.lng&&a&&a.res&&(i.lng=this.language||a.usedLng),i.nest!==!1&&(t=this.interpolator.nest(t,(...y)=>l?.[0]===y[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${o[0]}`),null):this.translate(...y,o),i)),i.interpolation&&this.interpolator.reset()}const u=i.postProcess||this.options.postProcess,d=Oe(u)?[u]:u;return t!=null&&d?.length&&i.applyPostProcessor!==!1&&(t=Cm.handle(d,t,o,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),t}resolve(t,o={}){let i,a,l,u,d;return Oe(t)&&(t=[t]),t.forEach(h=>{if(this.isValidLookup(i))return;const g=this.extractFromKey(h,o),v=g.key;a=v;let y=g.namespaces;this.options.fallbackNS&&(y=y.concat(this.options.fallbackNS));const S=o.count!==void 0&&!Oe(o.count),b=S&&!o.ordinal&&o.count===0,w=o.context!==void 0&&(Oe(o.context)||typeof o.context=="number")&&o.context!=="",_=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);y.forEach(k=>{this.isValidLookup(i)||(d=k,!Em[`${_[0]}-${k}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(d)&&(Em[`${_[0]}-${k}`]=!0,this.logger.warn(`key "${a}" for languages "${_.join(", ")}" won't get resolved as namespace "${d}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),_.forEach(R=>{if(this.isValidLookup(i))return;u=R;const D=[v];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(D,v,R,k,o);else{let O;S&&(O=this.pluralResolver.getSuffix(R,o.count,o));const V=`${this.options.pluralSeparator}zero`,L=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(S&&(o.ordinal&&O.indexOf(L)===0&&D.push(v+O.replace(L,this.options.pluralSeparator)),D.push(v+O),b&&D.push(v+V)),w){const B=`${v}${this.options.contextSeparator||"_"}${o.context}`;D.push(B),S&&(o.ordinal&&O.indexOf(L)===0&&D.push(B+O.replace(L,this.options.pluralSeparator)),D.push(B+O),b&&D.push(B+V))}}let T;for(;T=D.pop();)this.isValidLookup(i)||(l=T,i=this.getResource(R,k,T,o))}))})}),{res:i,usedKey:a,exactUsedKey:l,usedLng:u,usedNS:d}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,o,i,a={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,o,i,a):this.resourceStore.getResource(t,o,i,a)}getUsedParamsDetails(t={}){const o=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=t.replace&&!Oe(t.replace);let a=i?t.replace:t;if(i&&typeof t.count<"u"&&(a.count=t.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!i){a={...a};for(const l of o)delete a[l]}return a}static hasDefaultValue(t){const o="defaultValue";for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&o===i.substring(0,o.length)&&t[i]!==void 0)return!0;return!1}}class Rm{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=In.create("languageUtils")}getScriptPartFromCode(t){if(t=Vi(t),!t||t.indexOf("-")<0)return null;const o=t.split("-");return o.length===2||(o.pop(),o[o.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(o.join("-"))}getLanguagePartFromCode(t){if(t=Vi(t),!t||t.indexOf("-")<0)return t;const o=t.split("-");return this.formatLanguageCode(o[0])}formatLanguageCode(t){if(Oe(t)&&t.indexOf("-")>-1){let o;try{o=Intl.getCanonicalLocales(t)[0]}catch{}return o&&this.options.lowerCaseLng&&(o=o.toLowerCase()),o||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let o;return t.forEach(i=>{if(o)return;const a=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(a))&&(o=a)}),!o&&this.options.supportedLngs&&t.forEach(i=>{if(o)return;const a=this.getScriptPartFromCode(i);if(this.isSupportedCode(a))return o=a;const l=this.getLanguagePartFromCode(i);if(this.isSupportedCode(l))return o=l;o=this.options.supportedLngs.find(u=>{if(u===l)return u;if(!(u.indexOf("-")<0&&l.indexOf("-")<0)&&(u.indexOf("-")>0&&l.indexOf("-")<0&&u.substring(0,u.indexOf("-"))===l||u.indexOf(l)===0&&l.length>1))return u})}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}getFallbackCodes(t,o){if(!t)return[];if(typeof t=="function"&&(t=t(o)),Oe(t)&&(t=[t]),Array.isArray(t))return t;if(!o)return t.default||[];let i=t[o];return i||(i=t[this.getScriptPartFromCode(o)]),i||(i=t[this.formatLanguageCode(o)]),i||(i=t[this.getLanguagePartFromCode(o)]),i||(i=t.default),i||[]}toResolveHierarchy(t,o){const i=this.getFallbackCodes((o===!1?[]:o)||this.options.fallbackLng||[],t),a=[],l=u=>{u&&(this.isSupportedCode(u)?a.push(u):this.logger.warn(`rejecting language code not found in supportedLngs: ${u}`))};return Oe(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&l(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&l(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&l(this.getLanguagePartFromCode(t))):Oe(t)&&l(this.formatLanguageCode(t)),i.forEach(u=>{a.indexOf(u)<0&&l(this.formatLanguageCode(u))}),a}}const Pm={zero:0,one:1,two:2,few:3,many:4,other:5},Im={select:r=>r===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class zk{constructor(t,o={}){this.languageUtils=t,this.options=o,this.logger=In.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,o){this.rules[t]=o}clearCache(){this.pluralRulesCache={}}getRule(t,o={}){const i=Vi(t==="dev"?"en":t),a=o.ordinal?"ordinal":"cardinal",l=JSON.stringify({cleanedCode:i,type:a});if(l in this.pluralRulesCache)return this.pluralRulesCache[l];let u;try{u=new Intl.PluralRules(i,{type:a})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Im;if(!t.match(/-|_/))return Im;const h=this.languageUtils.getLanguagePartFromCode(t);u=this.getRule(h,o)}return this.pluralRulesCache[l]=u,u}needsPlural(t,o={}){let i=this.getRule(t,o);return i||(i=this.getRule("dev",o)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,o,i={}){return this.getSuffixes(t,i).map(a=>`${o}${a}`)}getSuffixes(t,o={}){let i=this.getRule(t,o);return i||(i=this.getRule("dev",o)),i?i.resolvedOptions().pluralCategories.sort((a,l)=>Pm[a]-Pm[l]).map(a=>`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${a}`):[]}getSuffix(t,o,i={}){const a=this.getRule(t,i);return a?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${a.select(o)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",o,i))}}const Om=(r,t,o,i=".",a=!0)=>{let l=Ok(r,t,o);return!l&&a&&Oe(o)&&(l=cu(r,o,i),l===void 0&&(l=cu(t,o,i))),l},fu=r=>r.replace(/\$/g,"$$$$");class Fk{constructor(t={}){this.logger=In.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(o=>o),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:o,escapeValue:i,useRawValueToEscape:a,prefix:l,prefixEscaped:u,suffix:d,suffixEscaped:h,formatSeparator:g,unescapeSuffix:v,unescapePrefix:y,nestingPrefix:S,nestingPrefixEscaped:b,nestingSuffix:w,nestingSuffixEscaped:_,nestingOptionsSeparator:k,maxReplaces:R,alwaysFormat:D}=t.interpolation;this.escape=o!==void 0?o:Tk,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=a!==void 0?a:!1,this.prefix=l?Bo(l):u||"{{",this.suffix=d?Bo(d):h||"}}",this.formatSeparator=g||",",this.unescapePrefix=v?"":y||"-",this.unescapeSuffix=this.unescapePrefix?"":v||"",this.nestingPrefix=S?Bo(S):b||Bo("$t("),this.nestingSuffix=w?Bo(w):_||Bo(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=R||1e3,this.alwaysFormat=D!==void 0?D:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(o,i)=>o?.source===i?(o.lastIndex=0,o):new RegExp(i,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,o,i,a){let l,u,d;const h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},g=b=>{if(b.indexOf(this.formatSeparator)<0){const R=Om(o,h,b,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(R,void 0,i,{...a,...o,interpolationkey:b}):R}const w=b.split(this.formatSeparator),_=w.shift().trim(),k=w.join(this.formatSeparator).trim();return this.format(Om(o,h,_,this.options.keySeparator,this.options.ignoreJSONStructure),k,i,{...a,...o,interpolationkey:_})};this.resetRegExp();const v=a?.missingInterpolationHandler||this.options.missingInterpolationHandler,y=a?.interpolation?.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:b=>fu(b)},{regex:this.regexp,safeValue:b=>this.escapeValue?fu(this.escape(b)):fu(b)}].forEach(b=>{for(d=0;l=b.regex.exec(t);){const w=l[1].trim();if(u=g(w),u===void 0)if(typeof v=="function"){const k=v(t,l,a);u=Oe(k)?k:""}else if(a&&Object.prototype.hasOwnProperty.call(a,w))u="";else if(y){u=l[0];continue}else this.logger.warn(`missed to pass in variable ${w} for interpolating ${t}`),u="";else!Oe(u)&&!this.useRawValueToEscape&&(u=ym(u));const _=b.safeValue(u);if(t=t.replace(l[0],_),y?(b.regex.lastIndex+=u.length,b.regex.lastIndex-=l[0].length):b.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),t}nest(t,o,i={}){let a,l,u;const d=(h,g)=>{const v=this.nestingOptionsSeparator;if(h.indexOf(v)<0)return h;const y=h.split(new RegExp(`${v}[ ]*{`));let S=`{${y[1]}`;h=y[0],S=this.interpolate(S,u);const b=S.match(/'/g),w=S.match(/"/g);((b?.length??0)%2===0&&!w||w.length%2!==0)&&(S=S.replace(/'/g,'"'));try{u=JSON.parse(S),g&&(u={...g,...u})}catch(_){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,_),`${h}${v}${S}`}return u.defaultValue&&u.defaultValue.indexOf(this.prefix)>-1&&delete u.defaultValue,h};for(;a=this.nestingRegexp.exec(t);){let h=[];u={...i},u=u.replace&&!Oe(u.replace)?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;const g=/{.*}/.test(a[1])?a[1].lastIndexOf("}")+1:a[1].indexOf(this.formatSeparator);if(g!==-1&&(h=a[1].slice(g).split(this.formatSeparator).map(v=>v.trim()).filter(Boolean),a[1]=a[1].slice(0,g)),l=o(d.call(this,a[1].trim(),u),u),l&&a[0]===t&&!Oe(l))return l;Oe(l)||(l=ym(l)),l||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${t}`),l=""),h.length&&(l=h.reduce((v,y)=>this.format(v,y,i.lng,{...i,interpolationkey:a[1].trim()}),l.trim())),t=t.replace(a[0],l),this.regexp.lastIndex=0}return t}}const Vk=r=>{let t=r.toLowerCase().trim();const o={};if(r.indexOf("(")>-1){const i=r.split("(");t=i[0].toLowerCase().trim();const a=i[1].substring(0,i[1].length-1);t==="currency"&&a.indexOf(":")<0?o.currency||(o.currency=a.trim()):t==="relativetime"&&a.indexOf(":")<0?o.range||(o.range=a.trim()):a.split(";").forEach(u=>{if(u){const[d,...h]=u.split(":"),g=h.join(":").trim().replace(/^'+|'+$/g,""),v=d.trim();o[v]||(o[v]=g),g==="false"&&(o[v]=!1),g==="true"&&(o[v]=!0),isNaN(g)||(o[v]=parseInt(g,10))}})}return{formatName:t,formatOptions:o}},Nm=r=>{const t={};return(o,i,a)=>{let l=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(l={...l,[a.interpolationkey]:void 0});const u=i+JSON.stringify(l);let d=t[u];return d||(d=r(Vi(i),a),t[u]=d),d(o)}},Uk=r=>(t,o,i)=>r(Vi(o),i)(t);class Bk{constructor(t={}){this.logger=In.create("formatter"),this.options=t,this.init(t)}init(t,o={interpolation:{}}){this.formatSeparator=o.interpolation.formatSeparator||",";const i=o.cacheInBuiltFormats?Nm:Uk;this.formats={number:i((a,l)=>{const u=new Intl.NumberFormat(a,{...l});return d=>u.format(d)}),currency:i((a,l)=>{const u=new Intl.NumberFormat(a,{...l,style:"currency"});return d=>u.format(d)}),datetime:i((a,l)=>{const u=new Intl.DateTimeFormat(a,{...l});return d=>u.format(d)}),relativetime:i((a,l)=>{const u=new Intl.RelativeTimeFormat(a,{...l});return d=>u.format(d,l.range||"day")}),list:i((a,l)=>{const u=new Intl.ListFormat(a,{...l});return d=>u.format(d)})}}add(t,o){this.formats[t.toLowerCase().trim()]=o}addCached(t,o){this.formats[t.toLowerCase().trim()]=Nm(o)}format(t,o,i,a={}){const l=o.split(this.formatSeparator);if(l.length>1&&l[0].indexOf("(")>1&&l[0].indexOf(")")<0&&l.find(d=>d.indexOf(")")>-1)){const d=l.findIndex(h=>h.indexOf(")")>-1);l[0]=[l[0],...l.splice(1,d)].join(this.formatSeparator)}return l.reduce((d,h)=>{const{formatName:g,formatOptions:v}=Vk(h);if(this.formats[g]){let y=d;try{const S=a?.formatParams?.[a.interpolationkey]||{},b=S.locale||S.lng||a.locale||a.lng||i;y=this.formats[g](d,b,{...v,...a,...S})}catch(S){this.logger.warn(S)}return y}else this.logger.warn(`there was no format function for ${g}`);return d},t)}}const Hk=(r,t)=>{r.pending[t]!==void 0&&(delete r.pending[t],r.pendingCount--)};class Wk extends ba{constructor(t,o,i,a={}){super(),this.backend=t,this.store=o,this.services=i,this.languageUtils=i.languageUtils,this.options=a,this.logger=In.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,a.backend,a)}queueLoad(t,o,i,a){const l={},u={},d={},h={};return t.forEach(g=>{let v=!0;o.forEach(y=>{const S=`${g}|${y}`;!i.reload&&this.store.hasResourceBundle(g,y)?this.state[S]=2:this.state[S]<0||(this.state[S]===1?u[S]===void 0&&(u[S]=!0):(this.state[S]=1,v=!1,u[S]===void 0&&(u[S]=!0),l[S]===void 0&&(l[S]=!0),h[y]===void 0&&(h[y]=!0)))}),v||(d[g]=!0)}),(Object.keys(l).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(l),pending:Object.keys(u),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(h)}}loaded(t,o,i){const a=t.split("|"),l=a[0],u=a[1];o&&this.emit("failedLoading",l,u,o),!o&&i&&this.store.addResourceBundle(l,u,i,void 0,void 0,{skipCopy:!0}),this.state[t]=o?-1:2,o&&i&&(this.state[t]=0);const d={};this.queue.forEach(h=>{Ik(h.loaded,[l],u),Hk(h,t),o&&h.errors.push(o),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(g=>{d[g]||(d[g]={});const v=h.loaded[g];v.length&&v.forEach(y=>{d[g][y]===void 0&&(d[g][y]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(h=>!h.done)}read(t,o,i,a=0,l=this.retryTimeout,u){if(!t.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:o,fcName:i,tried:a,wait:l,callback:u});return}this.readingCalls++;const d=(g,v)=>{if(this.readingCalls--,this.waitingReads.length>0){const y=this.waitingReads.shift();this.read(y.lng,y.ns,y.fcName,y.tried,y.wait,y.callback)}if(g&&v&&a<this.maxRetries){setTimeout(()=>{this.read.call(this,t,o,i,a+1,l*2,u)},l);return}u(g,v)},h=this.backend[i].bind(this.backend);if(h.length===2){try{const g=h(t,o);g&&typeof g.then=="function"?g.then(v=>d(null,v)).catch(d):d(null,g)}catch(g){d(g)}return}return h(t,o,d)}prepareLoading(t,o,i={},a){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();Oe(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Oe(o)&&(o=[o]);const l=this.queueLoad(t,o,i,a);if(!l.toLoad.length)return l.pending.length||a(),null;l.toLoad.forEach(u=>{this.loadOne(u)})}load(t,o,i){this.prepareLoading(t,o,{},i)}reload(t,o,i){this.prepareLoading(t,o,{reload:!0},i)}loadOne(t,o=""){const i=t.split("|"),a=i[0],l=i[1];this.read(a,l,"read",void 0,void 0,(u,d)=>{u&&this.logger.warn(`${o}loading namespace ${l} for language ${a} failed`,u),!u&&d&&this.logger.log(`${o}loaded namespace ${l} for language ${a}`,d),this.loaded(t,u,d)})}saveMissing(t,o,i,a,l,u={},d=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(o)){this.logger.warn(`did not save key "${i}" as the namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend?.create){const h={...u,isUpdate:l},g=this.backend.create.bind(this.backend);if(g.length<6)try{let v;g.length===5?v=g(t,o,i,a,h):v=g(t,o,i,a),v&&typeof v.then=="function"?v.then(y=>d(null,y)).catch(d):d(null,v)}catch(v){d(v)}else g(t,o,i,a,d,h)}!t||!t[0]||this.store.addResource(t[0],o,i,a)}}}const Tm=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r=>{let t={};if(typeof r[1]=="object"&&(t=r[1]),Oe(r[1])&&(t.defaultValue=r[1]),Oe(r[2])&&(t.tDescription=r[2]),typeof r[2]=="object"||typeof r[3]=="object"){const o=r[3]||r[2];Object.keys(o).forEach(i=>{t[i]=o[i]})}return t},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Dm=r=>(Oe(r.ns)&&(r.ns=[r.ns]),Oe(r.fallbackLng)&&(r.fallbackLng=[r.fallbackLng]),Oe(r.fallbackNS)&&(r.fallbackNS=[r.fallbackNS]),r.supportedLngs?.indexOf?.("cimode")<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),typeof r.initImmediate=="boolean"&&(r.initAsync=r.initImmediate),r),Ca=()=>{},Kk=r=>{Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(o=>{typeof r[o]=="function"&&(r[o]=r[o].bind(r))})};class Ui extends ba{constructor(t={},o){if(super(),this.options=Dm(t),this.services={},this.logger=In,this.modules={external:[]},Kk(this),o&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,o),this;setTimeout(()=>{this.init(t,o)},0)}}init(t={},o){this.isInitializing=!0,typeof t=="function"&&(o=t,t={}),t.defaultNS==null&&t.ns&&(Oe(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=Tm();this.options={...i,...this.options,...Dm(t)},this.options.interpolation={...i.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const a=g=>g?typeof g=="function"?new g:g:null;if(!this.options.isClone){this.modules.logger?In.init(a(this.modules.logger),this.options):In.init(null,this.options);let g;this.modules.formatter?g=this.modules.formatter:g=Bk;const v=new Rm(this.options);this.store=new km(this.options.resources,this.options);const y=this.services;y.logger=In,y.resourceStore=this.store,y.languageUtils=v,y.pluralResolver=new zk(v,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),g&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(y.formatter=a(g),y.formatter.init&&y.formatter.init(y,this.options),this.options.interpolation.format=y.formatter.format.bind(y.formatter)),y.interpolator=new Fk(this.options),y.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},y.backendConnector=new Wk(a(this.modules.backend),y.resourceStore,y,this.options),y.backendConnector.on("*",(b,...w)=>{this.emit(b,...w)}),this.modules.languageDetector&&(y.languageDetector=a(this.modules.languageDetector),y.languageDetector.init&&y.languageDetector.init(y,this.options.detection,this.options)),this.modules.i18nFormat&&(y.i18nFormat=a(this.modules.i18nFormat),y.i18nFormat.init&&y.i18nFormat.init(this)),this.translator=new ka(this.services,this.options),this.translator.on("*",(b,...w)=>{this.emit(b,...w)}),this.modules.external.forEach(b=>{b.init&&b.init(this)})}if(this.format=this.options.interpolation.format,o||(o=Ca),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const g=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);g.length>0&&g[0]!=="dev"&&(this.options.lng=g[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(g=>{this[g]=(...v)=>this.store[g](...v)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(g=>{this[g]=(...v)=>(this.store[g](...v),this)});const d=zi(),h=()=>{const g=(v,y)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),d.resolve(y),o(v,y)};if(this.languages&&!this.isInitialized)return g(null,this.t.bind(this));this.changeLanguage(this.options.lng,g)};return this.options.resources||!this.options.initAsync?h():setTimeout(h,0),d}loadResources(t,o=Ca){let i=o;const a=Oe(t)?t:this.language;if(typeof t=="function"&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if(a?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const l=[],u=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(g=>{g!=="cimode"&&l.indexOf(g)<0&&l.push(g)})};a?u(a):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(h=>u(h)),this.options.preload?.forEach?.(d=>u(d)),this.services.backendConnector.load(l,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(d)})}else i(null)}reloadResources(t,o,i){const a=zi();return typeof t=="function"&&(i=t,t=void 0),typeof o=="function"&&(i=o,o=void 0),t||(t=this.languages),o||(o=this.options.ns),i||(i=Ca),this.services.backendConnector.reload(t,o,l=>{a.resolve(),i(l)}),a}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Cm.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1)){for(let o=0;o<this.languages.length;o++){const i=this.languages[o];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(t)<0&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,o){this.isLanguageChangingTo=t;const i=zi();this.emit("languageChanging",t);const a=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},l=(d,h)=>{h?this.isLanguageChangingTo===t&&(a(h),this.translator.changeLanguage(h),this.isLanguageChangingTo=void 0,this.emit("languageChanged",h),this.logger.log("languageChanged",h)):this.isLanguageChangingTo=void 0,i.resolve((...g)=>this.t(...g)),o&&o(d,(...g)=>this.t(...g))},u=d=>{!t&&!d&&this.services.languageDetector&&(d=[]);const h=Oe(d)?d:d&&d[0],g=this.store.hasLanguageSomeTranslations(h)?h:this.services.languageUtils.getBestMatchFromCodes(Oe(d)?[d]:d);g&&(this.language||a(g),this.translator.language||this.translator.changeLanguage(g),this.services.languageDetector?.cacheUserLanguage?.(g)),this.loadResources(g,v=>{l(v,g)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(t),i}getFixedT(t,o,i){const a=(l,u,...d)=>{let h;typeof u!="object"?h=this.options.overloadTranslationOptionHandler([l,u].concat(d)):h={...u},h.lng=h.lng||a.lng,h.lngs=h.lngs||a.lngs,h.ns=h.ns||a.ns,h.keyPrefix!==""&&(h.keyPrefix=h.keyPrefix||i||a.keyPrefix);const g=this.options.keySeparator||".";let v;return h.keyPrefix&&Array.isArray(l)?v=l.map(y=>(typeof y=="function"&&(y=uu(y,{...this.options,...u})),`${h.keyPrefix}${g}${y}`)):(typeof l=="function"&&(l=uu(l,{...this.options,...u})),v=h.keyPrefix?`${h.keyPrefix}${g}${l}`:l),this.t(v,h)};return Oe(t)?a.lng=t:a.lngs=t,a.ns=o,a.keyPrefix=i,a}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,o={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=o.lng||this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const u=(d,h)=>{const g=this.services.backendConnector.state[`${d}|${h}`];return g===-1||g===0||g===2};if(o.precheck){const d=o.precheck(this,u);if(d!==void 0)return d}return!!(this.hasResourceBundle(i,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(i,t)&&(!a||u(l,t)))}loadNamespaces(t,o){const i=zi();return this.options.ns?(Oe(t)&&(t=[t]),t.forEach(a=>{this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}),this.loadResources(a=>{i.resolve(),o&&o(a)}),i):(o&&o(),Promise.resolve())}loadLanguages(t,o){const i=zi();Oe(t)&&(t=[t]);const a=this.options.preload||[],l=t.filter(u=>a.indexOf(u)<0&&this.services.languageUtils.isSupportedCode(u));return l.length?(this.options.preload=a.concat(l),this.loadResources(u=>{i.resolve(),o&&o(u)}),i):(o&&o(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const a=new Intl.Locale(t);if(a&&a.getTextInfo){const l=a.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const o=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services?.languageUtils||new Rm(Tm());return t.toLowerCase().indexOf("-latn")>1?"ltr":o.indexOf(i.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},o){return new Ui(t,o)}cloneInstance(t={},o=Ca){const i=t.forkResourceStore;i&&delete t.forkResourceStore;const a={...this.options,...t,isClone:!0},l=new Ui(a);if((t.debug!==void 0||t.prefix!==void 0)&&(l.logger=l.logger.clone(t)),["store","services","language"].forEach(d=>{l[d]=this[d]}),l.services={...this.services},l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},i){const d=Object.keys(this.store.data).reduce((h,g)=>(h[g]={...this.store.data[g]},h[g]=Object.keys(h[g]).reduce((v,y)=>(v[y]={...h[g][y]},v),h[g]),h),{});l.store=new km(d,a),l.services.resourceStore=l.store}return l.translator=new ka(l.services,a),l.translator.on("*",(d,...h)=>{l.emit(d,...h)}),l.init(a,o),l.translator.options=a,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const At=Ui.createInstance();At.createInstance=Ui.createInstance;const Zk=At.createInstance;At.dir,At.init,At.loadResources,At.reloadResources,At.use,At.changeLanguage,At.getFixedT,At.t,At.exists,At.setDefaultNamespace,At.hasLoadedNamespace,At.loadNamespaces,At.loadLanguages;const qk=Symbol("remote-view.message");class Gk extends Error{constructor(t,o,i){super(),this.key=t,this.values=o,Object.defineProperty(this,"message",{configurable:!0,get:()=>i(t,o)}),this.name="ViewMessageError"}key;values}const pu={en:{close:"Close",commandTitle:"Command palette",commandDescription:"Search for a command to run…"},"zh-Hans":{close:"关闭",commandTitle:"命令面板",commandDescription:"搜索要运行的命令…"},"zh-Hant":{close:"關閉",commandTitle:"命令面板",commandDescription:"搜尋要執行的命令…"}};function Am(r){try{const t=new Intl.Locale((r||"en").replaceAll("_","-"));return t.language==="zh"?t.maximize().script==="Hant"?"zh-Hant":"zh-Hans":"en"}catch{return"en"}}function Lm(r,t=typeof navigator>"u"?"en":navigator.language){const o=d=>{const h=Am(d);return h==="zh-Hant"&&!r["zh-Hant"]?"zh-Hans":h},i=Zk();i.init({lng:o(t),fallbackLng:"en",supportedLngs:["en","zh-Hans","zh-Hant"],load:"currentOnly",initAsync:!1,keySeparator:!1,defaultNS:"view",interpolation:{escapeValue:!1},resources:{en:{view:r.en,ui:pu.en},"zh-Hans":{view:r["zh-Hans"],ui:pu["zh-Hans"]},"zh-Hant":{view:r["zh-Hant"]??r["zh-Hans"],ui:pu["zh-Hant"]}}});const a=()=>o(i.resolvedLanguage??i.language),l=d=>(i.on("languageChanged",d),()=>{i.off("languageChanged",d)}),u=(d,h)=>String(i.t(d,h));return{getLocale:a,subscribe:l,setLocale(d){d!==void 0&&i.changeLanguage(o(d)),typeof document<"u"&&(document.documentElement.lang=a())},t:(d,h)=>u(d,h),message:(d,h)=>({[qk]:!0,key:d,values:h}),error:(d,h)=>new Gk(d,h,u),format(d){return typeof d=="string"?d:d instanceof Error?d.message:u(d.key,d.values)},ui:d=>String(i.t(d,{ns:"ui"})),date(d,h={}){const g=new Date(d);return Number.isNaN(g.getTime())?"":new Intl.DateTimeFormat(a(),h).format(g)},number(d,h){return new Intl.NumberFormat(a(),h).format(d)},label(d,h=""){if(typeof d=="string")return d;const g=Object.entries(d),v=a();return g.find(([y])=>Am(y)===v&&/^(en|zh)([-_]|$)/i.test(y))?.[1]??d.en_US??d.en??d["en-US"]??h}}}const Qk=Lm({en:{},"zh-Hans":{}},"en"),$m=m.createContext(Qk);function Yk({i18n:r,children:t}){return A.jsx($m.Provider,{value:r,children:t})}function Xk(r){return m.useSyncExternalStore(r.subscribe,r.getLocale,r.getLocale)}function jm(){const r=m.useContext($m);return Xk(r),r.ui}m.createContext(null);function Ke(...r){return x0(Af(r))}const hu=sm("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}}),pt=m.forwardRef(function({className:r,variant:t="default",size:o="default",asChild:i=!1,...a},l){const u=i?M0:"button";return A.jsx(u,{ref:l,"data-slot":"button","data-variant":t,"data-size":o,className:Ke(hu({variant:t,size:o,className:r})),...a})});function Mm({...r}){return A.jsx(LS,{"data-slot":"alert-dialog",...r})}function Jk({...r}){return A.jsx($S,{"data-slot":"alert-dialog-portal",...r})}function eC({className:r,...t}){return A.jsx(jS,{"data-slot":"alert-dialog-overlay",className:Ke("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",r),...t})}function zm({className:r,size:t="default",...o}){return A.jsxs(Jk,{children:[A.jsx(eC,{}),A.jsx(MS,{"data-slot":"alert-dialog-content","data-size":t,className:Ke("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",r),...o})]})}function Fm({className:r,...t}){return A.jsx("div",{"data-slot":"alert-dialog-footer",className:Ke("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",r),...t})}function Vm({className:r,...t}){return A.jsx(FS,{"data-slot":"alert-dialog-title",className:Ke("text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",r),...t})}function Um({className:r,...t}){return A.jsx(VS,{"data-slot":"alert-dialog-description",className:Ke("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",r),...t})}function Bm({className:r,variant:t="outline",size:o="default",...i}){return A.jsx(pt,{variant:t,size:o,asChild:!0,children:A.jsx(zS,{"data-slot":"alert-dialog-cancel",className:Ke(r),...i})})}function tC({...r}){return A.jsx(Tc,{"data-slot":"dialog",...r})}function nC({...r}){return A.jsx(Dc,{"data-slot":"dialog-portal",...r})}function rC({className:r,...t}){return A.jsx(Lc,{"data-slot":"dialog-overlay",className:Ke("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",r),...t})}function oC({className:r,children:t,showCloseButton:o=!0,...i}){const a=jm();return A.jsxs(nC,{children:[A.jsx(rC,{}),A.jsxs($c,{"data-slot":"dialog-content",className:Ke("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",r),...i,children:[t,o&&A.jsx(ta,{"data-slot":"dialog-close",asChild:!0,children:A.jsxs(pt,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm",children:[A.jsx(D0,{}),A.jsx("span",{className:"sr-only",children:a("close")})]})})]})]})}function iC({className:r,...t}){return A.jsx("div",{"data-slot":"dialog-header",className:Ke("flex flex-col gap-2",r),...t})}function sC({className:r,showCloseButton:t=!1,children:o,...i}){const a=jm();return A.jsxs("div",{"data-slot":"dialog-footer",className:Ke("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",r),...i,children:[o,t&&A.jsx(ta,{asChild:!0,children:A.jsx(pt,{variant:"outline",children:a("close")})})]})}function aC({className:r,...t}){return A.jsx(fh,{"data-slot":"dialog-title",className:Ke("text-base leading-none font-medium",r),...t})}function lC({className:r,...t}){return A.jsx(ph,{"data-slot":"dialog-description",className:Ke("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",r),...t})}function Hm({className:r,type:t,...o}){return A.jsx("input",{type:t,"data-slot":"input",className:Ke("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",r),...o})}function cC({className:r,...t}){return A.jsx("textarea",{"data-slot":"textarea",className:Ke("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",r),...t})}function uC({className:r,...t}){return A.jsx("div",{"data-slot":"input-group",role:"group",className:Ke("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",r),...t})}const dC=sm("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function fC({className:r,align:t="inline-start",...o}){return A.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:Ke(dC({align:t}),r),onClick:i=>{i.target.closest("button")||i.currentTarget.parentElement?.querySelector("input")?.focus()},...o})}function pC({className:r,...t}){return A.jsx(Mi,{"data-slot":"command",className:Ke("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",r),...t})}function hC({className:r,...t}){return A.jsx("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:A.jsxs(uC,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[A.jsx(Mi.Input,{"data-slot":"command-input",className:Ke("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",r),...t}),A.jsx(fC,{children:A.jsx(O0,{className:"size-4 shrink-0 opacity-50"})})]})})}function mC({className:r,...t}){return A.jsx(Mi.List,{"data-slot":"command-list",className:Ke("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",r),...t})}function gC({className:r,...t}){return A.jsx(Mi.Empty,{"data-slot":"command-empty",className:Ke("py-6 text-center text-sm",r),...t})}function vC({className:r,children:t,...o}){return A.jsxs(Mi.Item,{"data-slot":"command-item",className:Ke("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",r),...o,children:[t,A.jsx(rp,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}function Wm({...r}){return A.jsx(xb,{"data-slot":"popover",...r})}function Km({...r}){return A.jsx(wb,{"data-slot":"popover-trigger",...r})}function Zm({className:r,align:t="center",sideOffset:o=4,...i}){return A.jsx(Sb,{children:A.jsx(bb,{"data-slot":"popover-content",align:t,sideOffset:o,className:Ke("z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",r),...i})})}function Ho({...r}){return A.jsx(Ob,{"data-slot":"select",...r})}function Wo({...r}){return A.jsx(Ab,{"data-slot":"select-value",...r})}function Ko({className:r,size:t="default",children:o,...i}){return A.jsxs(Tb,{"data-slot":"select-trigger","data-size":t,className:Ke("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",r),...i,children:[o,A.jsx(Lb,{asChild:!0,children:A.jsx(tc,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function Zo({className:r,children:t,position:o="item-aligned",align:i="center",...a}){return A.jsx(zb,{children:A.jsxs(Fb,{"data-slot":"select-content","data-align-trigger":o==="item-aligned",className:Ke("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",r),position:o,align:i,...a,children:[A.jsx(yC,{}),A.jsx(Kb,{"data-position":o,className:Ke("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",o==="popper"&&""),children:t}),A.jsx(xC,{})]})})}function fn({className:r,children:t,...o}){return A.jsxs(Gb,{"data-slot":"select-item",className:Ke("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",r),...o,children:[A.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:A.jsx(Xb,{children:A.jsx(rp,{className:"pointer-events-none"})})}),A.jsx(Qb,{children:t})]})}function yC({className:r,...t}){return A.jsx(Jb,{"data-slot":"select-scroll-up-button",className:Ke("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",r),...t,children:A.jsx(op,{})})}function xC({className:r,...t}){return A.jsx(ek,{"data-slot":"select-scroll-down-button",className:Ke("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",r),...t,children:A.jsx(tc,{})})}m.createContext(null),m.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});const er=te().regex(/^[A-Za-z][A-Za-z0-9_.-]{0,79}$/),mu=Bn([te().max(4e3),mt().finite(),Tt(),hr()]),tr=Ix(()=>Bn([te().max(32e3),mt().finite(),Tt(),hr(),nt(tr).max(1e3),mr(tr)])),gu=Tf("kind",[xe({kind:Qe("data-source"),dataSourceId:te().uuid()}).strict(),xe({kind:Qe("definition"),definitionId:te().uuid(),versionId:te().uuid()}).strict(),xe({kind:Qe("artifact"),artifactId:te().uuid(),versionId:te().uuid()}).strict()]);mr(tr);const wC=xe({id:er,sourceField:te().min(1).max(256),label:te().min(1).max(160),logicalType:Hn(["string","boolean","int64","float64","decimal","date","timestamp"]),nullable:Tt(),role:Hn(["dimension","measure","time","identifier"]),semanticRef:te().max(512).optional(),unit:te().max(80).optional()}).strict(),SC=xe({name:er,controlId:er,type:Hn(["string","number","boolean","date"]),required:Tt(),defaultValue:mu.optional(),allowedValues:nt(mu).max(200).optional()}).strict(),bC=xe({id:er,source:gu,providerId:te().min(1).max(160),operation:er,contractVersion:mt().int().positive(),payload:tr,parameters:nt(SC).max(24),output:xe({datasetId:er,fields:nt(wC).min(1).max(80),grain:nt(er).max(20)}).strict()}).strict();function kC(r,t){const o=r.output.fields.map(a=>a.id),i=r.parameters.map(a=>a.name);(new Set(o).size!==o.length||new Set(i).size!==i.length)&&t.addIssue({code:"custom",message:"Duplicate field or parameter identifier"}),(new Set(r.output.grain).size!==r.output.grain.length||r.output.grain.some(a=>!o.includes(a)))&&t.addIssue({code:"custom",message:"Grain references an undeclared field"}),new TextEncoder().encode(JSON.stringify(r.payload)).byteLength>64e3&&t.addIssue({code:"custom",message:"Query payload exceeds limit"})}const qm=bC.superRefine(kC),CC=mr(er,mu).default({});xe({binding:qm,controls:CC}).strict(),xe({source:gu,providerId:te().min(1).max(160),request:tr.default({})}).strict().refine(r=>new TextEncoder().encode(JSON.stringify(r)).byteLength<=16e3,"Discovery request exceeds limit"),xe({items:nt(xe({id:te().min(1).max(512),name:te().min(1).max(512),kind:Hn(["collection","dataset"]),description:te().max(4e3).optional(),inspectRequest:tr.optional(),metadata:tr}).strict()).max(50),nextRequest:tr.optional(),queryContract:xe({operation:er,contractVersion:mt().int().positive(),payloadSchema:tr,instructions:te().max(8e3)}).strict()}).strict().refine(r=>new TextEncoder().encode(JSON.stringify(r)).byteLength<=128e3,"Discovery response exceeds limit");function _C(r,t){if(r==null)return{};var o={},i=Object.keys(r),a,l;for(l=0;l<i.length;l++)a=i[l],!(t.indexOf(a)>=0)&&(o[a]=r[a]);return o}const Gm="xpert.artifact-document",Qm=1,_a=te().regex(/^[A-Za-z][A-Za-z0-9_.-]{0,79}$/),EC=Bn([te().max(4e3),mt().finite(),Tt(),hr()]),Ym=mr(_a,EC).refine(r=>Object.keys(r).length<=24,"Too many controls"),RC=xe({type:Qe("query"),requestId:te().min(1).max(80),bindingId:_a,controls:Ym}).strict(),PC=xe({bindingIds:nt(_a).max(64).refine(r=>new Set(r).size===r.length,"Duplicate binding IDs"),defaults:Ym,theme:Hn(["light","dark"]),locale:te().min(1).max(80)}).strict(),Xm=te().min(1).max(3e5).superRefine((r,t)=>{(new TextEncoder().encode(r).byteLength>3e5||!/<html[\s>]/i.test(r)||!/<body[\s>]/i.test(r))&&t.addIssue({code:"custom",message:"Supply a complete UTF-8 HTML document, at most 300 KB"})}),IC=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),On=(r,t)=>r>>>t|r<<32-t;function OC(r){const t=new Uint8Array(Math.ceil((r.length+9)/64)*64);t.set(r),t[r.length]=128;const o=new DataView(t.buffer);o.setUint32(t.length-8,Math.floor(r.length/536870912)),o.setUint32(t.length-4,r.length*8>>>0);const i=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint32Array(64);for(let l=0;l<t.length;l+=64){for(let w=0;w<16;w++)a[w]=o.getUint32(l+w*4);for(let w=16;w<64;w++){const _=a[w-15],k=a[w-2],R=On(_,7)^On(_,18)^_>>>3,D=On(k,17)^On(k,19)^k>>>10;a[w]=a[w-16]+R+a[w-7]+D>>>0}let[u,d,h,g,v,y,S,b]=i;for(let w=0;w<64;w++){const _=On(v,6)^On(v,11)^On(v,25),k=v&y^~v&S,R=b+_+k+IC[w]+a[w]>>>0,D=On(u,2)^On(u,13)^On(u,22),T=u&d^u&h^d&h,O=D+T>>>0;b=S,S=y,y=v,v=g+R>>>0,g=h,h=d,d=u,u=R+O>>>0}i[0]=i[0]+u>>>0,i[1]=i[1]+d>>>0,i[2]=i[2]+h>>>0,i[3]=i[3]+g>>>0,i[4]=i[4]+v>>>0,i[5]=i[5]+y>>>0,i[6]=i[6]+S>>>0,i[7]=i[7]+b>>>0}return Array.from(i,l=>l.toString(16).padStart(8,"0")).join("")}const Jm=xe({id:_a,version:te().regex(/^\d+\.\d+\.\d+(?:-[A-Za-z0-9.-]+)?$/),format:Qe("classic-script"),global:te().regex(/^[A-Za-z_$][A-Za-z0-9_$]{0,79}$/).refine(r=>!["window","self","globalThis","document","parent","top","location","xpertLiveArtifact","__proto__","constructor","prototype"].includes(r)),sha256:te().regex(/^[a-f0-9]{64}$/)}).strict(),NC=Jm.transform(r=>({id:r.id,version:r.version,format:"classic-script",global:r.global,sha256:r.sha256})),vu=nt(NC).max(8).superRefine((r,t)=>{(new Set(r.map(o=>o.id)).size!==r.length||new Set(r.map(o=>o.global)).size!==r.length)&&t.addIssue({code:"custom",message:"Duplicate dependency ID or global"})}),eg=nt(Jm.extend({source:te().min(1).max(4e6)}).strict().transform(r=>({id:r.id,version:r.version,format:"classic-script",global:r.global,sha256:r.sha256,source:r.source}))).max(8);function tg(r,t){const o=eg.parse(r),i=vu.parse(o.map(l=>{var{source:u}=l,d=_C(l,["source"]);return d}));let a=0;for(const l of o){const u=new TextEncoder().encode(l.source);if(a+=u.length,u.length>4e6||a>8e6)throw new Error("DOCUMENT_DEPENDENCY_TOO_LARGE");if(OC(u)!==l.sha256)throw new Error("DOCUMENT_DEPENDENCY_INTEGRITY_FAILED")}if(t&&JSON.stringify(vu.parse(t))!==JSON.stringify(i))throw new Error("DOCUMENT_DEPENDENCY_LOCK_MISMATCH");return o.map(l=>({id:l.id,version:l.version,global:l.global,sha256:l.sha256,source:l.source,format:"classic-script"}))}function TC(r){const t=o=>JSON.stringify(o).replace(/</g,"\\u003c").replace(/>/g,"\\u003e");return tg(r).map(o=>`<script>(()=>{const s=document.createElement('script');s.textContent=${t(o.source)};document.head.appendChild(s);s.remove();if(typeof window[${t(o.global)}]==='undefined')throw new Error('DOCUMENT_DEPENDENCY_GLOBAL_MISSING');})();<\/script>`).join("")}const DC=te().max(250).refine(r=>{try{const t=new URL(r);return t.protocol==="https:"&&t.origin===r&&!t.username&&!t.password&&/^(?:[a-z0-9.-]+|\[[a-f0-9:]+\])$/i.test(t.hostname)}catch{return!1}},"Use an exact HTTPS origin without a path, credentials or wildcard"),Ea=nt(DC).max(16),AC=xe({scripts:Ea.optional(),styles:Ea.optional(),fonts:Ea.optional(),images:Ea.optional()}).strict();function ng(r){const t=AC.parse(r??{}),o=i=>i?.length?` ${[...new Set(i)].join(" ")}`:"";return["default-src 'none'",`script-src 'unsafe-inline'${o(t.scripts)}`,`style-src 'unsafe-inline'${o(t.styles)}`,`img-src data: blob:${o(t.images)}`,`font-src data:${o(t.fonts)}`,"connect-src 'none'","frame-src 'none'","worker-src 'none'","object-src 'none'","base-uri 'none'","form-action 'none'"].join("; ")}ng();function LC(r,t,o=[],i){if(Xm.parse(r),!/^[a-f0-9]{32}$/.test(t))throw new Error("Invalid Artifact document session ID");return`<!doctype html><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="${ng(i)}"><script>${$C.replace("__XPERT_DOCUMENT_SESSION__",t)}<\/script>${TC(o)}${r}`}const $C=String.raw`
|
|
100
|
+
`)},um=function(){var n=parseInt(document.body.getAttribute(us)||"0",10);return isFinite(n)?n:0},VS=function(){f.useEffect(function(){return document.body.setAttribute(us,(um()+1).toString()),function(){var n=um()-1;n<=0?document.body.removeAttribute(us):document.body.setAttribute(us,n.toString())}},[])},US=function(n){var e=n.noRelative,o=n.noImportant,s=n.gapMode,i=s===void 0?"margin":s;VS();var l=f.useMemo(function(){return LS(i)},[i]);return f.createElement(FS,{styles:zS(l,!e,i,o?"":"!important")})},Pu=!1;if(typeof window<"u")try{var Ma=Object.defineProperty({},"passive",{get:function(){return Pu=!0,!0}});window.addEventListener("test",Ma,Ma),window.removeEventListener("test",Ma,Ma)}catch{Pu=!1}var ds=Pu?{passive:!1}:!1,BS=function(n){return n.tagName==="TEXTAREA"},dm=function(n,e){if(!(n instanceof Element))return!1;var o=window.getComputedStyle(n);return o[e]!=="hidden"&&!(o.overflowY===o.overflowX&&!BS(n)&&o[e]==="visible")},HS=function(n){return dm(n,"overflowY")},WS=function(n){return dm(n,"overflowX")},fm=function(n,e){var o=e.ownerDocument,s=e;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var i=pm(n,s);if(i){var l=hm(n,s),u=l[1],d=l[2];if(u>d)return!0}s=s.parentNode}while(s&&s!==o.body);return!1},KS=function(n){var e=n.scrollTop,o=n.scrollHeight,s=n.clientHeight;return[e,o,s]},GS=function(n){var e=n.scrollLeft,o=n.scrollWidth,s=n.clientWidth;return[e,o,s]},pm=function(n,e){return n==="v"?HS(e):WS(e)},hm=function(n,e){return n==="v"?KS(e):GS(e)},ZS=function(n,e){return n==="h"&&e==="rtl"?-1:1},qS=function(n,e,o,s,i){var l=ZS(n,window.getComputedStyle(e).direction),u=l*s,d=o.target,h=e.contains(d),m=!1,y=u>0,v=0,x=0;do{if(!d)break;var b=hm(n,d),S=b[0],C=b[1],k=b[2],N=C-k-l*S;(S||N)&&pm(n,d)&&(v+=N,x+=S);var D=d.parentNode;d=D&&D.nodeType===Node.DOCUMENT_FRAGMENT_NODE?D.host:D}while(!h&&d!==document.body||h&&(e.contains(d)||e===d));return(y&&Math.abs(v)<1||!y&&Math.abs(x)<1)&&(m=!0),m},ja=function(n){return"changedTouches"in n?[n.changedTouches[0].clientX,n.changedTouches[0].clientY]:[0,0]},mm=function(n){return[n.deltaX,n.deltaY]},gm=function(n){return n&&"current"in n?n.current:n},YS=function(n,e){return n[0]===e[0]&&n[1]===e[1]},QS=function(n){return`
|
|
101
|
+
.block-interactivity-`.concat(n,` {pointer-events: none;}
|
|
102
|
+
.allow-interactivity-`).concat(n,` {pointer-events: all;}
|
|
103
|
+
`)},XS=0,fs=[];function JS(n){var e=f.useRef([]),o=f.useRef([0,0]),s=f.useRef(),i=f.useState(XS++)[0],l=f.useState(cm)[0],u=f.useRef(n);f.useEffect(function(){u.current=n},[n]),f.useEffect(function(){if(n.inert){document.body.classList.add("block-interactivity-".concat(i));var C=wS([n.lockRef.current],(n.shards||[]).map(gm),!0).filter(Boolean);return C.forEach(function(k){return k.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),C.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(i))})}}},[n.inert,n.lockRef.current,n.shards]);var d=f.useCallback(function(C,k){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!u.current.allowPinchZoom;var N=ja(C),D=o.current,O="deltaX"in C?C.deltaX:D[0]-N[0],R="deltaY"in C?C.deltaY:D[1]-N[1],L,j=C.target,B=Math.abs(O)>Math.abs(R)?"h":"v";if("touches"in C&&B==="h"&&j.type==="range")return!1;var I=window.getSelection(),K=I&&I.anchorNode,ae=K?K===j||K.contains(j):!1;if(ae)return!1;var be=fm(B,j);if(!be)return!0;if(be?L=B:(L=B==="v"?"h":"v",be=fm(B,j)),!be)return!1;if(!s.current&&"changedTouches"in C&&(O||R)&&(s.current=L),!L)return!0;var le=s.current||L;return qS(le,k,C,le==="h"?O:R)},[]),h=f.useCallback(function(C){var k=C;if(!(!fs.length||fs[fs.length-1]!==l)){var N="deltaY"in k?mm(k):ja(k),D=e.current.filter(function(L){return L.name===k.type&&(L.target===k.target||k.target===L.shadowParent)&&YS(L.delta,N)})[0];if(D&&D.should){k.cancelable&&k.preventDefault();return}if(!D){var O=(u.current.shards||[]).map(gm).filter(Boolean).filter(function(L){return L.contains(k.target)}),R=O.length>0?d(k,O[0]):!u.current.noIsolation;R&&k.cancelable&&k.preventDefault()}}},[]),m=f.useCallback(function(C,k,N,D){var O={name:C,delta:k,target:N,should:D,shadowParent:e1(N)};e.current.push(O),setTimeout(function(){e.current=e.current.filter(function(R){return R!==O})},1)},[]),y=f.useCallback(function(C){o.current=ja(C),s.current=void 0},[]),v=f.useCallback(function(C){m(C.type,mm(C),C.target,d(C,n.lockRef.current))},[]),x=f.useCallback(function(C){m(C.type,ja(C),C.target,d(C,n.lockRef.current))},[]);f.useEffect(function(){return fs.push(l),n.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:x}),document.addEventListener("wheel",h,ds),document.addEventListener("touchmove",h,ds),document.addEventListener("touchstart",y,ds),function(){fs=fs.filter(function(C){return C!==l}),document.removeEventListener("wheel",h,ds),document.removeEventListener("touchmove",h,ds),document.removeEventListener("touchstart",y,ds)}},[]);var b=n.removeScrollBar,S=n.inert;return f.createElement(f.Fragment,null,S?f.createElement(l,{styles:QS(i)}):null,b?f.createElement(US,{noRelative:n.noRelative,gapMode:n.gapMode}):null)}function e1(n){for(var e=null;n!==null;)n instanceof ShadowRoot&&(e=n.host,n=n.host),n=n.parentNode;return e}const t1=IS(lm,JS);var ii=f.forwardRef(function(n,e){return f.createElement($a,Bn({},n,{ref:e,sideCar:t1}))});ii.classNames=$a.classNames;var n1=function(n){if(typeof document>"u")return null;var e=Array.isArray(n)?n[0]:n;return e.ownerDocument.body},ps=new WeakMap,La=new WeakMap,Fa={},Ru=0,vm=function(n){return n&&(n.host||vm(n.parentNode))},r1=function(n,e){return e.map(function(o){if(n.contains(o))return o;var s=vm(o);return s&&n.contains(s)?s:(console.error("aria-hidden",o,"in not contained inside",n,". Doing nothing"),null)}).filter(function(o){return!!o})},o1=function(n,e,o,s){var i=r1(e,Array.isArray(n)?n:[n]);Fa[o]||(Fa[o]=new WeakMap);var l=Fa[o],u=[],d=new Set,h=new Set(i),m=function(v){!v||d.has(v)||(d.add(v),m(v.parentNode))};i.forEach(m);var y=function(v){!v||h.has(v)||Array.prototype.forEach.call(v.children,function(x){if(d.has(x))y(x);else try{var b=x.getAttribute(s),S=b!==null&&b!=="false",C=(ps.get(x)||0)+1,k=(l.get(x)||0)+1;ps.set(x,C),l.set(x,k),u.push(x),C===1&&S&&La.set(x,!0),k===1&&x.setAttribute(o,"true"),S||x.setAttribute(s,"true")}catch(N){console.error("aria-hidden: cannot operate on ",x,N)}})};return y(e),d.clear(),Ru++,function(){u.forEach(function(v){var x=ps.get(v)-1,b=l.get(v)-1;ps.set(v,x),l.set(v,b),x||(La.has(v)||v.removeAttribute(s),La.delete(v)),b||v.removeAttribute(o)}),Ru--,Ru||(ps=new WeakMap,ps=new WeakMap,La=new WeakMap,Fa={})}},za=function(n,e,o){o===void 0&&(o="data-aria-hidden");var s=Array.from(Array.isArray(n)?n:[n]),i=n1(n);return i?(s.push.apply(s,Array.from(i.querySelectorAll("[aria-live], script"))),o1(s,i,o,"aria-hidden")):function(){return null}},s1=Object.defineProperty,rn=(n,e)=>s1(n,"name",{value:e,configurable:!0}),Iu="Dialog",[ym,xm]=tn(Iu),[i1,En]=ym(Iu),Tu=rn(n=>{const{__scopeDialog:e,children:o,open:s,defaultOpen:i,onOpenChange:l,modal:u=!0}=n,d=f.useRef(null),h=f.useRef(null),[m,y]=Un({prop:s,defaultProp:i??!1,onChange:l,caller:Iu}),[v,x]=f.useState(0),[b,S]=f.useState(0);return E.jsx(i1,{scope:e,triggerRef:d,contentRef:h,contentId:yt(),titleId:yt(),descriptionId:yt(),titlePresent:v>0,descriptionPresent:b>0,setTitleCount:x,setDescriptionCount:S,open:m,onOpenChange:y,onOpenToggle:f.useCallback(()=>y(C=>!C),[y]),modal:u,children:o})},"Dialog"),a1="DialogTrigger",l1=f.forwardRef(rn(function(e,o){const{__scopeDialog:s,...i}=e,l=En(a1,s),u=Ve(o,l.triggerRef);return E.jsx(Ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":Ua(l.open),...i,ref:u,onClick:pe(e.onClick,l.onOpenToggle)})},"DialogTrigger")),wm="DialogPortal",[c1,bm]=ym(wm,{forceMount:void 0}),Du=rn(n=>{const{__scopeDialog:e,forceMount:o,children:s,container:i}=n,l=En(wm,e);return E.jsx(c1,{scope:e,forceMount:o,children:f.Children.map(s,u=>E.jsx(nn,{present:o||l.open,children:E.jsx(si,{asChild:!0,container:i,children:u})}))})},"DialogPortal"),Nu="DialogOverlay",Ou=f.forwardRef(rn(function(e,o){const s=bm(Nu,e.__scopeDialog),{forceMount:i=s.forceMount,...l}=e,u=En(Nu,e.__scopeDialog);return u.modal?E.jsx(nn,{present:i||u.open,children:E.jsx(d1,{...l,ref:o})}):null},"DialogOverlay")),u1=kn("DialogOverlay.RemoveScroll"),d1=f.forwardRef(rn(function(e,o){const{__scopeDialog:s,...i}=e,l=En(Nu,s),u=Zh(),d=Ve(o,u);return E.jsx(ii,{as:u1,allowPinchZoom:!0,shards:[l.contentRef],children:E.jsx(Ae.div,{"data-state":Ua(l.open),...i,ref:d,style:{pointerEvents:"auto",...i.style}})})},"DialogOverlayImpl")),ai="DialogContent",Au=f.forwardRef(rn(function(e,o){const s=bm(ai,e.__scopeDialog),{forceMount:i=s.forceMount,...l}=e,u=En(ai,e.__scopeDialog);return E.jsx(nn,{present:i||u.open,children:u.modal?E.jsx(f1,{...l,ref:o}):E.jsx(p1,{...l,ref:o})})},"DialogContent")),f1=f.forwardRef(rn(function(e,o){const s=En(ai,e.__scopeDialog),i=f.useRef(null),l=Ve(o,s.contentRef,i);return f.useEffect(()=>{const u=i.current;if(u)return za(u)},[]),E.jsx(Sm,{...e,ref:l,trapFocus:s.open,disableOutsidePointerEvents:s.open,onCloseAutoFocus:pe(e.onCloseAutoFocus,u=>{u.preventDefault(),s.triggerRef.current?.focus()}),onPointerDownOutside:pe(e.onPointerDownOutside,u=>{const d=u.detail.originalEvent,h=d.button===0&&d.ctrlKey===!0;(d.button===2||h)&&u.preventDefault()}),onFocusOutside:pe(e.onFocusOutside,u=>u.preventDefault())})},"DialogContentModal")),p1=f.forwardRef(rn(function(e,o){const s=En(ai,e.__scopeDialog),i=f.useRef(!1),l=f.useRef(!1);return E.jsx(Sm,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{e.onCloseAutoFocus?.(u),u.defaultPrevented||(i.current||s.triggerRef.current?.focus(),u.preventDefault()),i.current=!1,l.current=!1},onInteractOutside:u=>{e.onInteractOutside?.(u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const d=u.target;s.triggerRef.current?.contains(d)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&l.current&&u.preventDefault()}})},"DialogContentNonModal")),Sm=f.forwardRef(rn(function(e,o){const{__scopeDialog:s,trapFocus:i,onOpenAutoFocus:l,onCloseAutoFocus:u,...d}=e,h=En(ai,s);return cs(),E.jsx(E.Fragment,{children:E.jsx(Da,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:l,onUnmountAutoFocus:u,children:E.jsx(oi,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionPresent?h.descriptionId:void 0,"aria-labelledby":h.titlePresent?h.titleId:void 0,"data-state":Ua(h.open),...d,ref:o,deferPointerDownOutside:!0,onDismiss:()=>h.onOpenChange(!1)})})})},"DialogContentImpl")),h1="DialogTitle",Cm=f.forwardRef(rn(function(e,o){const{__scopeDialog:s,...i}=e,l=En(h1,s),{setTitleCount:u}=l;return dt(()=>(u(d=>d+1),()=>u(d=>d-1)),[u]),E.jsx(Ae.h2,{id:l.titleId,...i,ref:o})},"DialogTitle")),m1="DialogDescription",km=f.forwardRef(rn(function(e,o){const{__scopeDialog:s,...i}=e,l=En(m1,s),{setDescriptionCount:u}=l;return dt(()=>(u(d=>d+1),()=>u(d=>d-1)),[u]),E.jsx(Ae.p,{id:l.descriptionId,...i,ref:o})},"DialogDescription")),g1="DialogClose",Va=f.forwardRef(rn(function(e,o){const{__scopeDialog:s,...i}=e,l=En(g1,s);return E.jsx(Ae.button,{type:"button",...i,ref:o,onClick:pe(e.onClick,()=>l.onOpenChange(!1))})},"DialogClose"));function Ua(n){return n?"open":"closed"}rn(Ua,"getState");var v1=Object.defineProperty,fr=(n,e)=>v1(n,"name",{value:e,configurable:!0}),y1="AlertDialog",[x1,i2]=tn(y1,[xm]),pr=xm(),w1=fr(n=>{const{__scopeAlertDialog:e,...o}=n,s=pr(e);return E.jsx(Tu,{...s,...o,modal:!0})},"AlertDialog");f.forwardRef(fr(function(e,o){const{__scopeAlertDialog:s,...i}=e,l=pr(s);return E.jsx(l1,{...l,...i,ref:o})},"AlertDialogTrigger"));var b1=fr(n=>{const{__scopeAlertDialog:e,...o}=n,s=pr(e);return E.jsx(Du,{...s,...o})},"AlertDialogPortal"),S1=f.forwardRef(fr(function(e,o){const{__scopeAlertDialog:s,...i}=e,l=pr(s);return E.jsx(Ou,{...l,...i,ref:o})},"AlertDialogOverlay")),C1="AlertDialogContent",[k1,E1]=x1(C1),_1=f.forwardRef(fr(function(e,o){const{__scopeAlertDialog:s,children:i,...l}=e,u=pr(s),d=f.useRef(null),h=Ve(o,d),m=f.useRef(null);return E.jsx(k1,{scope:s,cancelRef:m,children:E.jsx(Au,{role:"alertdialog",...u,...l,ref:h,onOpenAutoFocus:pe(l.onOpenAutoFocus,y=>{y.preventDefault(),m.current?.focus({preventScroll:!0})}),onPointerDownOutside:y=>y.preventDefault(),onInteractOutside:y=>y.preventDefault(),children:i})})},"AlertDialogContent")),P1=f.forwardRef(fr(function(e,o){const{__scopeAlertDialog:s,...i}=e,l=pr(s);return E.jsx(Cm,{...l,...i,ref:o})},"AlertDialogTitle")),R1=f.forwardRef(fr(function(e,o){const{__scopeAlertDialog:s,...i}=e,l=pr(s);return E.jsx(km,{...l,...i,ref:o})},"AlertDialogDescription"));f.forwardRef(fr(function(e,o){const{__scopeAlertDialog:s,...i}=e,l=pr(s);return E.jsx(Va,{...l,...i,ref:o})},"AlertDialogAction"));var I1="AlertDialogCancel",T1=f.forwardRef(fr(function(e,o){const{__scopeAlertDialog:s,...i}=e,{cancelRef:l}=E1(I1,s),u=pr(s),d=Ve(o,l);return E.jsx(Va,{...u,...i,ref:d})},"AlertDialogCancel")),D1=w1,N1=b1,O1=S1,A1=_1,$1=T1,M1=P1,j1=R1,L1=Object.defineProperty,F1=(n,e)=>L1(n,"name",{value:e,configurable:!0});function Em(n){const[e,o]=f.useState(void 0);return dt(()=>{if(n){o({width:n.offsetWidth,height:n.offsetHeight});const s=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const l=i[0];let u,d;if("borderBoxSize"in l){const h=l.borderBoxSize,m=Array.isArray(h)?h[0]:h;u=m.inlineSize,d=m.blockSize}else u=n.offsetWidth,d=n.offsetHeight;o({width:u,height:d})});return s.observe(n,{box:"border-box"}),()=>s.unobserve(n)}else o(void 0)},[n]),e}F1(Em,"useSize");const z1=["top","right","bottom","left"],Fr=Math.min,hr=Math.max,Ba=Math.round,Ha=Math.floor,mr=n=>({x:n,y:n}),V1={left:"right",right:"left",bottom:"top",top:"bottom"};function _m(n,e,o){return hr(n,Fr(e,o))}function gr(n,e){return typeof n=="function"?n(e):n}function zr(n){return n.split("-")[0]}function hs(n){return n.split("-")[1]}function $u(n){return n==="x"?"y":"x"}function Mu(n){return n==="y"?"height":"width"}function Hn(n){const e=n[0];return e==="t"||e==="b"?"y":"x"}function ju(n){return $u(Hn(n))}function U1(n,e,o){o===void 0&&(o=!1);const s=hs(n),i=ju(n),l=Mu(i);let u=i==="x"?s===(o?"end":"start")?"right":"left":s==="start"?"bottom":"top";return e.reference[l]>e.floating[l]&&(u=Wa(u)),[u,Wa(u)]}function B1(n){const e=Wa(n);return[Lu(n),e,Lu(e)]}function Lu(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const Pm=["left","right"],Rm=["right","left"],H1=["top","bottom"],W1=["bottom","top"];function K1(n,e,o){switch(n){case"top":case"bottom":return o?e?Rm:Pm:e?Pm:Rm;case"left":case"right":return e?H1:W1;default:return[]}}function G1(n,e,o,s){const i=hs(n);let l=K1(zr(n),o==="start",s);return i&&(l=l.map(u=>u+"-"+i),e&&(l=l.concat(l.map(Lu)))),l}function Wa(n){const e=zr(n);return V1[e]+n.slice(e.length)}function Z1(n){var e,o,s,i;return{top:(e=n.top)!=null?e:0,right:(o=n.right)!=null?o:0,bottom:(s=n.bottom)!=null?s:0,left:(i=n.left)!=null?i:0}}function Im(n){return typeof n!="number"?Z1(n):{top:n,right:n,bottom:n,left:n}}function Ka(n){const{x:e,y:o,width:s,height:i}=n;return{width:s,height:i,top:o,left:e,right:e+s,bottom:o+i,x:e,y:o}}function Tm(n,e,o){let{reference:s,floating:i}=n;const l=Hn(e),u=ju(e),d=Mu(u),h=zr(e),m=l==="y",y=s.x+s.width/2-i.width/2,v=s.y+s.height/2-i.height/2,x=s[d]/2-i[d]/2;let b;switch(h){case"top":b={x:y,y:s.y-i.height};break;case"bottom":b={x:y,y:s.y+s.height};break;case"right":b={x:s.x+s.width,y:v};break;case"left":b={x:s.x-i.width,y:v};break;default:b={x:s.x,y:s.y}}const S=hs(e);return S&&(b[u]+=x*(S==="end"?1:-1)*(o&&m?-1:1)),b}async function q1(n,e){var o;e===void 0&&(e={});const{x:s,y:i,platform:l,rects:u,elements:d,strategy:h}=n,{boundary:m="clippingAncestors",rootBoundary:y="viewport",elementContext:v="floating",altBoundary:x=!1,padding:b=0}=gr(e,n),S=Im(b),k=d[x?v==="floating"?"reference":"floating":v],N=Ka(await l.getClippingRect({element:(o=await(l.isElement==null?void 0:l.isElement(k)))==null||o?k:k.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(d.floating)),boundary:m,rootBoundary:y,strategy:h})),D=v==="floating"?{x:s,y:i,width:u.floating.width,height:u.floating.height}:u.reference,O=await(l.getOffsetParent==null?void 0:l.getOffsetParent(d.floating)),R=await(l.isElement==null?void 0:l.isElement(O))&&await(l.getScale==null?void 0:l.getScale(O))||{x:1,y:1},L=Ka(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:D,offsetParent:O,strategy:h}):D);return{top:(N.top-L.top+S.top)/R.y,bottom:(L.bottom-N.bottom+S.bottom)/R.y,left:(N.left-L.left+S.left)/R.x,right:(L.right-N.right+S.right)/R.x}}const Y1=50,Q1=async(n,e,o)=>{const{placement:s="bottom",strategy:i="absolute",middleware:l=[],platform:u}=o,d=u.detectOverflow?u:{...u,detectOverflow:q1},h=await(u.isRTL==null?void 0:u.isRTL(e));let m=await u.getElementRects({reference:n,floating:e,strategy:i}),{x:y,y:v}=Tm(m,s,h),x=s,b=0;const S={};for(let C=0;C<l.length;C++){const k=l[C];if(!k)continue;const{name:N,fn:D}=k,{x:O,y:R,data:L,reset:j}=await D({x:y,y:v,initialPlacement:s,placement:x,strategy:i,middlewareData:S,rects:m,platform:d,elements:{reference:n,floating:e}});y=O??y,v=R??v,S[N]={...S[N],...L},j&&b<Y1&&(b++,typeof j=="object"&&(j.placement&&(x=j.placement),j.rects&&(m=j.rects===!0?await u.getElementRects({reference:n,floating:e,strategy:i}):j.rects),{x:y,y:v}=Tm(m,x,h)),C=-1)}return{x:y,y:v,placement:x,strategy:i,middlewareData:S}},X1=n=>({name:"arrow",options:n,async fn(e){const{x:o,y:s,placement:i,rects:l,platform:u,elements:d,middlewareData:h}=e,{element:m,padding:y=0}=gr(n,e)||{};if(m==null)return{};const v=Im(y),x={x:o,y:s},b=ju(i),S=Mu(b),C=await u.getDimensions(m),k=b==="y",N=k?"top":"left",D=k?"bottom":"right",O=k?"clientHeight":"clientWidth",R=l.reference[S]+l.reference[b]-x[b]-l.floating[S],L=x[b]-l.reference[b],j=await(u.getOffsetParent==null?void 0:u.getOffsetParent(m));let B=j?j[O]:0;(!B||!await(u.isElement==null?void 0:u.isElement(j)))&&(B=d.floating[O]||l.floating[S]);const I=R/2-L/2,K=B/2-C[S]/2-1,ae=Fr(v[N],K),be=Fr(v[D],K),le=B-C[S]-be,ce=B/2-C[S]/2+I,ue=_m(ae,ce,le),Se=!h.arrow&&hs(i)!=null&&ce!==ue&&l.reference[S]/2-(ce<ae?ae:be)-C[S]/2<0,q=Se?ce<ae?ce-ae:ce-le:0;return{[b]:x[b]+q,data:{[b]:ue,centerOffset:ce-ue-q,...Se&&{alignmentOffset:q}},reset:Se}}}),J1=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var o,s;const{placement:i,middlewareData:l,rects:u,initialPlacement:d,platform:h,elements:m}=e,{mainAxis:y=!0,crossAxis:v=!0,fallbackPlacements:x,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:C=!0,...k}=gr(n,e);if((o=l.arrow)!=null&&o.alignmentOffset)return{};const N=zr(i),D=Hn(d),O=zr(d)===d,R=await(h.isRTL==null?void 0:h.isRTL(m.floating)),L=x||(O||!C?[Wa(d)]:B1(d)),j=S!=="none";!x&&j&&L.push(...G1(d,C,S,R));const B=[d,...L],I=await h.detectOverflow(e,k),K=[];let ae=((s=l.flip)==null?void 0:s.overflows)||[];if(y&&K.push(I[N]),v){const ue=U1(i,u,R);K.push(I[ue[0]],I[ue[1]])}if(ae=[...ae,{placement:i,overflows:K}],!K.every(ue=>ue<=0)){var be,le;const ue=(((be=l.flip)==null?void 0:be.index)||0)+1,Se=B[ue];if(Se&&(!(v==="alignment"?D!==Hn(Se):!1)||ae.every(U=>Hn(U.placement)===D?U.overflows[0]>0:!0)))return{data:{index:ue,overflows:ae},reset:{placement:Se}};let q=(le=ae.filter(ne=>ne.overflows[0]<=0).sort((ne,U)=>ne.overflows[1]-U.overflows[1])[0])==null?void 0:le.placement;if(!q)switch(b){case"bestFit":{var ce;const ne=(ce=ae.filter(U=>{if(j){const Q=Hn(U.placement);return Q===D||Q==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(Q=>Q>0).reduce((Q,M)=>Q+M,0)]).sort((U,Q)=>U[1]-Q[1])[0])==null?void 0:ce[0];ne&&(q=ne);break}case"initialPlacement":q=d;break}if(i!==q)return{reset:{placement:q}}}return{}}}};function Dm(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function Nm(n){return z1.some(e=>n[e]>=0)}const eC=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){const{rects:o,platform:s}=e,{strategy:i="referenceHidden",...l}=gr(n,e);switch(i){case"referenceHidden":{const u=await s.detectOverflow(e,{...l,elementContext:"reference"}),d=Dm(u,o.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:Nm(d)}}}case"escaped":{const u=await s.detectOverflow(e,{...l,altBoundary:!0}),d=Dm(u,o.floating);return{data:{escapedOffsets:d,escaped:Nm(d)}}}default:return{}}}}},Om=new Set(["left","top"]);async function tC(n,e){const{placement:o,platform:s,elements:i}=n,l=await(s.isRTL==null?void 0:s.isRTL(i.floating)),u=zr(o),d=hs(o),h=Hn(o)==="y",m=Om.has(u)?-1:1,y=l&&h?-1:1,v=gr(e,n);let{mainAxis:x,crossAxis:b,alignmentAxis:S}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return d&&typeof S=="number"&&(b=d==="end"?S*-1:S),h?{x:b*y,y:x*m}:{x:x*m,y:b*y}}const nC=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var o,s;const{x:i,y:l,placement:u,middlewareData:d}=e,h=await tC(e,n);return u===((o=d.offset)==null?void 0:o.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:i+h.x,y:l+h.y,data:{...h,placement:u}}}}},rC=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){const{x:o,y:s,placement:i,platform:l}=e,{mainAxis:u=!0,crossAxis:d=!1,limiter:h={fn:D=>{let{x:O,y:R}=D;return{x:O,y:R}}},...m}=gr(n,e),y={x:o,y:s},v=await l.detectOverflow(e,m),x=Hn(i),b=$u(x);let S=y[b],C=y[x];const k=(D,O)=>_m(O+v[D==="y"?"top":"left"],O,O-v[D==="y"?"bottom":"right"]);u&&(S=k(b,S)),d&&(C=k(x,C));const N=h.fn({...e,[b]:S,[x]:C});return{...N,data:{x:N.x-o,y:N.y-s,enabled:{[b]:u,[x]:d}}}}}},oC=function(n){return n===void 0&&(n={}),{options:n,fn(e){var o,s;const{x:i,y:l,placement:u,rects:d,middlewareData:h}=e,{offset:m=0,mainAxis:y=!0,crossAxis:v=!0}=gr(n,e),x={x:i,y:l},b=Hn(u),S=$u(b);let C=x[S],k=x[b];const N=gr(m,e),D=typeof N=="number"?{mainAxis:N,crossAxis:0}:{mainAxis:(o=N.mainAxis)!=null?o:0,crossAxis:(s=N.crossAxis)!=null?s:0};if(y){const L=S==="y"?"height":"width",j=d.reference[S]-d.floating[L]+D.mainAxis,B=d.reference[S]+d.reference[L]-D.mainAxis;C<j?C=j:C>B&&(C=B)}if(v){var O,R;const L=S==="y"?"width":"height",j=Om.has(zr(u)),B=d.reference[b]-d.floating[L]+(j&&((O=h.offset)==null?void 0:O[b])||0)+(j?0:D.crossAxis),I=d.reference[b]+d.reference[L]+(j?0:((R=h.offset)==null?void 0:R[b])||0)-(j?D.crossAxis:0);k<B?k=B:k>I&&(k=I)}return{[S]:C,[b]:k}}}},sC=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){const{placement:o,rects:s,platform:i,elements:l}=e,{apply:u=()=>{},...d}=gr(n,e),h=await i.detectOverflow(e,d),m=zr(o),y=hs(o),v=Hn(o)==="y",{width:x,height:b}=s.floating;let S,C;m==="top"||m==="bottom"?(S=m,C=y===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(C=m,S=y==="end"?"top":"bottom");const k=b-h.top-h.bottom,N=x-h.left-h.right,D=Fr(b-h[S],k),O=Fr(x-h[C],N),R=e.middlewareData.shift,L=!R;let j=D,B=O;R!=null&&R.enabled.x&&(B=N),R!=null&&R.enabled.y&&(j=k),L&&!y&&(v?B=x-2*hr(h.left,h.right):j=b-2*hr(h.top,h.bottom)),await u({...e,availableWidth:B,availableHeight:j});const I=await i.getDimensions(l.floating);return x!==I.width||b!==I.height?{reset:{rects:!0}}:{}}}};function Ga(){return typeof window<"u"}function ms(n){return Am(n)?(n.nodeName||"").toLowerCase():"#document"}function Zt(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function vr(n){var e;return(e=(Am(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function Am(n){return Ga()?n instanceof Node||n instanceof Zt(n).Node:!1}function Wn(n){return Ga()?n instanceof Element||n instanceof Zt(n).Element:!1}function Vr(n){return Ga()?n instanceof HTMLElement||n instanceof Zt(n).HTMLElement:!1}function $m(n){return!Ga()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Zt(n).ShadowRoot}function Za(n){const{overflow:e,overflowX:o,overflowY:s,display:i}=Kn(n);return/auto|scroll|overlay|hidden|clip/.test(e+s+o)&&i!=="inline"&&i!=="contents"}function iC(n){return/^(table|td|th)$/.test(ms(n))}function qa(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const aC=/transform|translate|scale|rotate|perspective|filter/,lC=/paint|layout|strict|content/,Ro=n=>!!n&&n!=="none";let Fu;function zu(n){const e=Wn(n)?Kn(n):n;return Ro(e.transform)||Ro(e.translate)||Ro(e.scale)||Ro(e.rotate)||Ro(e.perspective)||!Vu()&&(Ro(e.backdropFilter)||Ro(e.filter))||aC.test(e.willChange||"")||lC.test(e.contain||"")}function cC(n){let e=Io(n);for(;Vr(e)&&!li(e);){if(zu(e))return e;if(qa(e))return null;e=Io(e)}return null}function Vu(){return Fu==null&&(Fu=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Fu}function li(n){return/^(html|body|#document)$/.test(ms(n))}function Kn(n){return Zt(n).getComputedStyle(n)}function Ya(n){return Wn(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Io(n){if(ms(n)==="html")return n;const e=n.assignedSlot||n.parentNode||$m(n)&&n.host||vr(n);return $m(e)?e.host:e}function Mm(n){const e=Io(n);return li(e)?(n.ownerDocument||n).body:Vr(e)&&Za(e)?e:Mm(e)}function ci(n,e,o){var s;e===void 0&&(e=[]),o===void 0&&(o=!0);const i=Mm(n),l=i===((s=n.ownerDocument)==null?void 0:s.body),u=Zt(i);if(l){const d=Uu(u);return e.concat(u,u.visualViewport||[],Za(i)?i:[],d&&o?ci(d):[])}else return e.concat(i,ci(i,[],o))}function Uu(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function jm(n){const e=Kn(n);let o=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const i=Vr(n),l=i?n.offsetWidth:o,u=i?n.offsetHeight:s,d=Ba(o)!==l||Ba(s)!==u;return d&&(o=l,s=u),{width:o,height:s,$:d}}function Bu(n){return Wn(n)?n:n.contextElement}function gs(n){const e=Bu(n);if(!Vr(e))return mr(1);const o=e.getBoundingClientRect(),{width:s,height:i,$:l}=jm(e);let u=(l?Ba(o.width):o.width)/s,d=(l?Ba(o.height):o.height)/i;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const uC=mr(0);function Lm(n){const e=Zt(n);return!Vu()||!e.visualViewport?uC:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function dC(n,e,o){return e===void 0&&(e=!1),!!o&&e&&o===Zt(n)}function To(n,e,o,s){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=n.getBoundingClientRect(),l=Bu(n);let u=mr(1);e&&(s?Wn(s)&&(u=gs(s)):u=gs(n));const d=dC(l,o,s)?Lm(l):mr(0);let h=(i.left+d.x)/u.x,m=(i.top+d.y)/u.y,y=i.width/u.x,v=i.height/u.y;if(l&&s){const x=Zt(l),b=Wn(s)?Zt(s):s;let S=x,C=Uu(S);for(;C&&b!==S;){const k=gs(C),N=C.getBoundingClientRect(),D=Kn(C),O=N.left+(C.clientLeft+parseFloat(D.paddingLeft))*k.x,R=N.top+(C.clientTop+parseFloat(D.paddingTop))*k.y;h*=k.x,m*=k.y,y*=k.x,v*=k.y,h+=O,m+=R,S=Zt(C),C=Uu(S)}}return Ka({width:y,height:v,x:h,y:m})}function Qa(n,e){const o=Ya(n).scrollLeft;return e?e.left+o:To(vr(n)).left+o}function Fm(n,e){const o=n.getBoundingClientRect(),s=o.left+e.scrollLeft-Qa(n,o),i=o.top+e.scrollTop;return{x:s,y:i}}function fC(n){let{elements:e,rect:o,offsetParent:s,strategy:i}=n;const l=i==="fixed",u=vr(s),d=e?qa(e.floating):!1;if(s===u||d&&l)return o;let h={scrollLeft:0,scrollTop:0},m=mr(1);const y=mr(0),v=Vr(s);if((v||!l)&&((ms(s)!=="body"||Za(u))&&(h=Ya(s)),v)){const b=To(s);m=gs(s),y.x=b.x+s.clientLeft,y.y=b.y+s.clientTop}const x=u&&!v&&!l?Fm(u,h):mr(0);return{width:o.width*m.x,height:o.height*m.y,x:o.x*m.x-h.scrollLeft*m.x+y.x+x.x,y:o.y*m.y-h.scrollTop*m.y+y.y+x.y}}function pC(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function hC(n){const e=Ya(n),o=n.ownerDocument.body,s=hr(n.scrollWidth,n.clientWidth,o.scrollWidth,o.clientWidth),i=hr(n.scrollHeight,n.clientHeight,o.scrollHeight,o.clientHeight);let l=-e.scrollLeft+Qa(n);const u=-e.scrollTop;return Kn(o).direction==="rtl"&&(l+=hr(n.clientWidth,o.clientWidth)-s),{width:s,height:i,x:l,y:u}}const mC=25;function gC(n,e,o){o===void 0&&(o="viewport");const s=o==="layoutViewport",i=Zt(n),l=vr(n),u=i.visualViewport;let d=l.clientWidth,h=l.clientHeight,m=0,y=0;if(u){const x=!Vu()||e==="fixed";s?x||(m=-u.offsetLeft,y=-u.offsetTop):(d=u.width,h=u.height,x&&(m=u.offsetLeft,y=u.offsetTop))}if(Qa(l)<=0){const x=l.ownerDocument,b=x.body,S=getComputedStyle(b),C=x.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,k=Math.abs(l.clientWidth-b.clientWidth-C),N=getComputedStyle(l).scrollbarGutter==="stable both-edges"?k/2:k;N<=mC&&(d-=N)}return{width:d,height:h,x:m,y}}function vC(n,e){const o=To(n,!0,e==="fixed"),s=o.top+n.clientTop,i=o.left+n.clientLeft,l=gs(n),u=n.clientWidth*l.x,d=n.clientHeight*l.y,h=i*l.x,m=s*l.y;return{width:u,height:d,x:h,y:m}}function zm(n,e,o){let s;if(e==="viewport"||e==="layoutViewport")s=gC(n,o,e);else if(e==="document")s=hC(vr(n));else if(Wn(e))s=vC(e,o);else{const i=Lm(n);s={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Ka(s)}function yC(n,e){const o=e.get(n);if(o)return o;let s=ci(n,[],!1).filter(d=>Wn(d)&&ms(d)!=="body"),i=null;const l=Kn(n).position==="fixed";let u=l?Io(n):n;for(;Wn(u)&&!li(u);){const d=Kn(u),h=zu(u),m=i?i.position:l?"fixed":"";!h&&(m==="fixed"||m==="absolute"&&d.position==="static")?s=s.filter(v=>v!==u):i=d,u=Io(u)}return e.set(n,s),s}function xC(n){let{element:e,boundary:o,rootBoundary:s,strategy:i}=n;const u=[...o==="clippingAncestors"?qa(e)?[]:yC(e,this._c):[].concat(o),s],d=zm(e,u[0],i);let h=d.top,m=d.right,y=d.bottom,v=d.left;for(let x=1;x<u.length;x++){const b=zm(e,u[x],i);h=hr(b.top,h),m=Fr(b.right,m),y=Fr(b.bottom,y),v=hr(b.left,v)}return{width:m-v,height:y-h,x:v,y:h}}function wC(n){const{width:e,height:o}=jm(n);return{width:e,height:o}}function bC(n,e,o){const s=Vr(e),i=vr(e),l=o==="fixed",u=To(n,!0,l,e);let d={scrollLeft:0,scrollTop:0};const h=mr(0);if((s||!l)&&((ms(e)!=="body"||Za(i))&&(d=Ya(e)),s)){const x=To(e,!0,l,e);h.x=x.x+e.clientLeft,h.y=x.y+e.clientTop}!s&&i&&(h.x=Qa(i));const m=i&&!s&&!l?Fm(i,d):mr(0),y=u.left+d.scrollLeft-h.x-m.x,v=u.top+d.scrollTop-h.y-m.y;return{x:y,y:v,width:u.width,height:u.height}}function Hu(n){return Kn(n).position==="static"}function Vm(n,e){if(!Vr(n)||Kn(n).position==="fixed")return null;if(e)return e(n);let o=n.offsetParent;return vr(n)===o&&(o=o.ownerDocument.body),o}function Um(n,e){const o=Zt(n);if(qa(n))return o;if(!Vr(n)){let i=Io(n);for(;i&&!li(i);){if(Wn(i)&&!Hu(i))return i;i=Io(i)}return o}let s=Vm(n,e);for(;s&&iC(s)&&Hu(s);)s=Vm(s,e);return s&&li(s)&&Hu(s)&&!zu(s)?o:s||cC(n)||o}const SC=async function(n){const e=this.getOffsetParent||Um,o=this.getDimensions,s=await o(n.floating);return{reference:bC(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function CC(n){return Kn(n).direction==="rtl"}const kC={convertOffsetParentRelativeRectToViewportRelativeRect:fC,getDocumentElement:vr,getClippingRect:xC,getOffsetParent:Um,getElementRects:SC,getClientRects:pC,getDimensions:wC,getScale:gs,isElement:Wn,isRTL:CC};function Bm(n,e){return n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height}function EC(n,e,o){let s=null,i;const l=vr(n);function u(){var y;clearTimeout(i),(y=s)==null||y.disconnect(),s=null}function d(y,v){y===void 0&&(y=!1),v===void 0&&(v=1),u();const x=n.getBoundingClientRect(),{left:b,top:S,width:C,height:k}=x;if(y||e(),!C||!k)return;const N=Ha(S),D=Ha(l.clientWidth-(b+C)),O=Ha(l.clientHeight-(S+k)),R=Ha(b),j={rootMargin:-N+"px "+-D+"px "+-O+"px "+-R+"px",threshold:hr(0,Fr(1,v))||1};let B=!0;function I(K){const ae=K[0].intersectionRatio;if(!Bm(x,n.getBoundingClientRect()))return d();if(ae!==v){if(!B)return d();ae?d(!1,ae):i=setTimeout(()=>{d(!1,1e-7)},1e3)}B=!1}try{s=new IntersectionObserver(I,{...j,root:l.ownerDocument})}catch{s=new IntersectionObserver(I,j)}s.observe(n)}const h=Zt(n),m=()=>d(o);return h.addEventListener("resize",m),d(!0),()=>{h.removeEventListener("resize",m),u()}}function _C(n,e,o,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:h=!1}=s,m=Bu(n),y=i||l?[...m?ci(m):[],...e?ci(e):[]]:[];y.forEach(N=>{i&&N.addEventListener("scroll",o),l&&N.addEventListener("resize",o)});const v=m&&d?EC(m,o,l):null;let x=-1,b=null;u&&(b=new ResizeObserver(N=>{let[D]=N;D&&D.target===m&&b&&e&&(b.unobserve(e),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var O;(O=b)==null||O.observe(e)})),o()}),m&&!h&&b.observe(m),e&&b.observe(e));let S,C=h?To(n):null;h&&k();function k(){const N=To(n);C&&!Bm(C,N)&&o(),C=N,S=requestAnimationFrame(k)}return o(),()=>{var N;y.forEach(D=>{i&&D.removeEventListener("scroll",o),l&&D.removeEventListener("resize",o)}),v?.(),(N=b)==null||N.disconnect(),b=null,h&&cancelAnimationFrame(S)}}const PC=nC,RC=rC,IC=J1,TC=sC,DC=eC,Hm=X1,NC=oC,OC=(n,e,o)=>{const s=new Map,i=o??{},l={...kC,...i.platform,_c:s};return Q1(n,e,{...i,platform:l})};var AC=typeof document<"u",$C=function(){},Xa=AC?f.useLayoutEffect:$C;function Ja(n,e){if(n===e)return!0;if(typeof n!=typeof e)return!1;if(typeof n=="function"&&n.toString()===e.toString())return!0;let o,s,i;if(n&&e&&typeof n=="object"){if(Array.isArray(n)){if(o=n.length,o!==e.length)return!1;for(s=o;s--!==0;)if(!Ja(n[s],e[s]))return!1;return!0}if(i=Object.keys(n),o=i.length,o!==Object.keys(e).length)return!1;for(s=o;s--!==0;)if(!{}.hasOwnProperty.call(e,i[s]))return!1;for(s=o;s--!==0;){const l=i[s];if(!(l==="_owner"&&n.$$typeof)&&!Ja(n[l],e[l]))return!1}return!0}return n!==n&&e!==e}function Wm(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Km(n,e){const o=Wm(n);return Math.round(e*o)/o}function Wu(n){const e=f.useRef(n);return Xa(()=>{e.current=n}),e}function MC(n){n===void 0&&(n={});const{placement:e="bottom",strategy:o="absolute",middleware:s=[],platform:i,elements:{reference:l,floating:u}={},transform:d=!0,whileElementsMounted:h,open:m}=n,[y,v]=f.useState({x:0,y:0,strategy:o,placement:e,middlewareData:{},isPositioned:!1}),[x,b]=f.useState(s);Ja(x,s)||b(s);const[S,C]=f.useState(null),[k,N]=f.useState(null),D=f.useCallback(U=>{U!==j.current&&(j.current=U,C(U))},[]),O=f.useCallback(U=>{U!==B.current&&(B.current=U,N(U))},[]),R=l||S,L=u||k,j=f.useRef(null),B=f.useRef(null),I=f.useRef(y),K=h!=null,ae=Wu(h),be=Wu(i),le=Wu(m),ce=f.useCallback(()=>{if(!j.current||!B.current)return;const U={placement:e,strategy:o,middleware:x};be.current&&(U.platform=be.current),OC(j.current,B.current,U).then(Q=>{const M={...Q,isPositioned:le.current!==!1};ue.current&&!Ja(I.current,M)&&(I.current=M,ti.flushSync(()=>{v(M)}))})},[x,e,o,be,le]);Xa(()=>{m===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,v(U=>({...U,isPositioned:!1})))},[m]);const ue=f.useRef(!1);Xa(()=>(ue.current=!0,()=>{ue.current=!1}),[]),Xa(()=>{if(R&&(j.current=R),L&&(B.current=L),R&&L){if(ae.current)return ae.current(R,L,ce);ce()}},[R,L,ce,ae,K]);const Se=f.useMemo(()=>({reference:j,floating:B,setReference:D,setFloating:O}),[D,O]),q=f.useMemo(()=>({reference:R,floating:L}),[R,L]),ne=f.useMemo(()=>{const U={position:o,left:0,top:0};if(!q.floating)return U;const Q=Km(q.floating,y.x),M=Km(q.floating,y.y);return d?{...U,transform:"translate("+Q+"px, "+M+"px)",...Wm(q.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:Q,top:M}},[o,d,q.floating,y.x,y.y]);return f.useMemo(()=>({...y,update:ce,refs:Se,elements:q,floatingStyles:ne}),[y,ce,Se,q,ne])}const jC=n=>{function e(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:n,fn(o){const{element:s,padding:i}=typeof n=="function"?n(o):n;return s&&e(s)?s.current!=null?Hm({element:s.current,padding:i}).fn(o):{}:s?Hm({element:s,padding:i}).fn(o):{}}}},LC=(n,e)=>{const o=PC(n);return{name:o.name,fn:o.fn,options:[n,e]}},FC=(n,e)=>{const o=RC(n);return{name:o.name,fn:o.fn,options:[n,e]}},zC=(n,e)=>({fn:NC(n).fn,options:[n,e]}),VC=(n,e)=>{const o=IC(n);return{name:o.name,fn:o.fn,options:[n,e]}},UC=(n,e)=>{const o=TC(n);return{name:o.name,fn:o.fn,options:[n,e]}},BC=(n,e)=>{const o=DC(n);return{name:o.name,fn:o.fn,options:[n,e]}},HC=(n,e)=>{const o=jC(n);return{name:o.name,fn:o.fn,options:[n,e]}};var WC=Object.defineProperty,KC=(n,e)=>WC(n,"name",{value:e,configurable:!0}),GC=f.forwardRef(KC(function(e,o){const{children:s,width:i=10,height:l=5,...u}=e;return E.jsx(Ae.svg,{...u,ref:o,width:i,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?s:E.jsx("polygon",{points:"0,0 30,0 15,10"})})},"Arrow")),ZC=GC,qC=Object.defineProperty,yr=(n,e)=>qC(n,"name",{value:e,configurable:!0}),Gm="Popper",[Zm,Ur]=tn(Gm),[YC,qm]=Zm(Gm),QC=yr(n=>{const{__scopePopper:e,children:o}=n,[s,i]=f.useState(null),[l,u]=f.useState(void 0);return E.jsx(YC,{scope:e,anchor:s,onAnchorChange:i,placementState:l,setPlacementState:u,children:o})},"Popper"),XC="PopperAnchor",JC=f.forwardRef(yr(function(e,o){const{__scopePopper:s,virtualRef:i,...l}=e,u=qm(XC,s),d=f.useRef(null),h=u.onAnchorChange,m=f.useCallback(C=>{d.current=C,C&&h(C)},[h]),y=Ve(o,m),v=f.useRef(null);f.useEffect(()=>{if(!i)return;const C=v.current;v.current=i.current,C!==v.current&&h(v.current)});const x=u.placementState&&el(u.placementState),b=x?.[0],S=x?.[1];return i?null:E.jsx(Ae.div,{"data-radix-popper-side":b,"data-radix-popper-align":S,...l,ref:y})},"PopperAnchor")),Ym="PopperContent",[ek,tk]=Zm(Ym),nk=f.forwardRef(yr(function(e,o){const{__scopePopper:s,side:i="bottom",sideOffset:l=0,align:u="center",alignOffset:d=0,arrowPadding:h=0,avoidCollisions:m=!0,collisionBoundary:y=[],collisionPadding:v=0,sticky:x="partial",hideWhenDetached:b=!1,updatePositionStrategy:S="optimized",onPlaced:C,...k}=e,N=qm(Ym,s),[D,O]=f.useState(null),R=Ve(o,O),[L,j]=f.useState(null),B=Em(L),I=B?.width??0,K=B?.height??0,ae=i+(u!=="center"?"-"+u:""),be=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},le=Array.isArray(y)?y:[y],ce=le.length>0,ue={padding:be,boundary:le.filter(Qm),altBoundary:ce},{refs:Se,floatingStyles:q,placement:ne,isPositioned:U,middlewareData:Q}=MC({strategy:"fixed",placement:ae,whileElementsMounted:yr((...se)=>_C(...se,{animationFrame:S==="always"}),"whileElementsMounted"),elements:{reference:N.anchor},middleware:[LC({mainAxis:l+K,alignmentAxis:d}),m&&FC({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?zC():void 0,...ue}),m&&VC({...ue}),UC({...ue,apply:yr(({elements:se,rects:Oe,availableWidth:Ue,availableHeight:je})=>{const{width:We,height:xt}=Oe.reference,ht=se.floating.style;ht.setProperty("--radix-popper-available-width",`${Ue}px`),ht.setProperty("--radix-popper-available-height",`${je}px`),ht.setProperty("--radix-popper-anchor-width",`${We}px`),ht.setProperty("--radix-popper-anchor-height",`${xt}px`)},"apply")}),L&&HC({element:L,padding:h}),ik({arrowWidth:I,arrowHeight:K}),b&&BC({strategy:"referenceHidden",...ue,boundary:ce?ue.boundary:void 0})]}),M=N.setPlacementState;dt(()=>(M(ne),()=>{M(void 0)}),[ne,M]);const[T,P]=el(ne),W=Gt(C);dt(()=>{U&&W?.()},[U,W]);const Z=Q.arrow?.x,H=Q.arrow?.y,re=Q.arrow?.centerOffset!==0,[de,Y]=f.useState();return dt(()=>{D&&Y(window.getComputedStyle(D).zIndex)},[D]),E.jsx("div",{ref:Se.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:U?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[Q.transformOrigin?.x,Q.transformOrigin?.y].join(" "),...Q.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:E.jsx(ek,{scope:s,placedSide:T,placedAlign:P,onArrowChange:j,arrowX:Z,arrowY:H,shouldHideArrow:re,children:E.jsx(Ae.div,{"data-side":T,"data-align":P,...k,ref:R,style:{...k.style,animation:U?k.style?.animation:"none"}})})})},"PopperContent")),rk="PopperArrow",ok={top:"bottom",right:"left",bottom:"top",left:"right"},sk=f.forwardRef(yr(function(e,o){const{__scopePopper:s,...i}=e,l=tk(rk,s),u=ok[l.placedSide];return E.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:E.jsx(ZC,{...i,ref:o,style:{...i.style,display:"block"}})})},"PopperArrow"));function Qm(n){return n!==null}yr(Qm,"isNotNull");var ik=yr(n=>({name:"transformOrigin",options:n,fn(e){const{placement:o,rects:s,middlewareData:i}=e,u=i.arrow?.centerOffset!==0,d=u?0:n.arrowWidth,h=u?0:n.arrowHeight,[m,y]=el(o),v={start:"0%",center:"50%",end:"100%"}[y],x=(i.arrow?.x??0)+d/2,b=(i.arrow?.y??0)+h/2;let S="",C="";return m==="bottom"?(S=u?v:`${x}px`,C=`${-h}px`):m==="top"?(S=u?v:`${x}px`,C=`${s.floating.height+h}px`):m==="right"?(S=`${-h}px`,C=u?v:`${b}px`):m==="left"&&(S=`${s.floating.width+h}px`,C=u?v:`${b}px`),{data:{x:S,y:C}}}}),"transformOrigin");function el(n){const[e,o="center"]=n.split("-");return[e,o]}yr(el,"getSideAndAlignFromPlacement");var ui=QC,tl=JC,nl=nk,ak=sk,lk=Object.defineProperty,Ku=(n,e)=>lk(n,"name",{value:e,configurable:!0}),Gu=!1;function Xm(){const[n,e]=f.useState(Gu);return f.useEffect(()=>{Gu||(Gu=!0,e(!0))},[]),n}Ku(Xm,"useIsHydrated");var Jm=ns[" useSyncExternalStore ".trim().toString()];function eg(){return()=>{}}Ku(eg,"subscribe");function tg(){return Jm(eg,()=>!0,()=>!1)}Ku(tg,"useIsHydratedModern");var ck=typeof Jm=="function"?tg:Xm,uk=Object.defineProperty,Do=(n,e)=>uk(n,"name",{value:e,configurable:!0}),Zu="rovingFocusGroup.onEntryFocus",dk={bubbles:!1,cancelable:!0},rl="RovingFocusGroup",[qu,ng,fk]=Ia(rl),[pk,ol]=tn(rl,[fk]),[hk,mk]=pk(rl),gk=f.forwardRef(Do(function(e,o){return E.jsx(qu.Provider,{scope:e.__scopeRovingFocusGroup,children:E.jsx(qu.Slot,{scope:e.__scopeRovingFocusGroup,children:E.jsx(vk,{...e,ref:o})})})},"RovingFocusGroup")),vk=f.forwardRef(Do(function(e,o){const{__scopeRovingFocusGroup:s,orientation:i,loop:l=!1,dir:u,currentTabStopId:d,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:m,onEntryFocus:y,preventScrollOnEntryFocus:v=!1,...x}=e,b=f.useRef(null),S=Ve(o,b),C=ri(u),[k,N]=Un({prop:d,defaultProp:h??null,onChange:m,caller:rl}),[D,O]=f.useState(!1),R=Gt(y),L=ng(s),j=f.useRef(!1),[B,I]=f.useState(0);return f.useEffect(()=>{const K=b.current;if(K)return K.addEventListener(Zu,R),()=>K.removeEventListener(Zu,R)},[R]),E.jsx(hk,{scope:s,orientation:i,dir:C,loop:l,currentTabStopId:k,onItemFocus:f.useCallback(K=>N(K),[N]),onItemShiftTab:f.useCallback(()=>O(!0),[]),onFocusableItemAdd:f.useCallback(()=>I(K=>K+1),[]),onFocusableItemRemove:f.useCallback(()=>I(K=>K-1),[]),children:E.jsx(Ae.div,{tabIndex:D||B===0?-1:0,"data-orientation":i,...x,ref:S,style:{outline:"none",...e.style},onMouseDown:pe(e.onMouseDown,()=>{j.current=!0}),onFocus:pe(e.onFocus,K=>{const ae=!j.current;if(K.target===K.currentTarget&&ae&&!D){const be=new CustomEvent(Zu,dk);if(K.currentTarget.dispatchEvent(be),!be.defaultPrevented){const le=L().filter(ne=>ne.focusable),ce=le.find(ne=>ne.active),ue=le.find(ne=>ne.id===k),q=[ce,ue,...le].filter(Boolean).map(ne=>ne.ref.current);Yu(q,v)}}j.current=!1}),onBlur:pe(e.onBlur,()=>O(!1))})})},"RovingFocusGroupImpl")),yk="RovingFocusGroupItem",xk=f.forwardRef(Do(function(e,o){const{__scopeRovingFocusGroup:s,focusable:i=!0,active:l=!1,tabStopId:u,children:d,...h}=e,m=yt(),y=u||m,v=mk(yk,s),x=v.currentTabStopId===y,b=ng(s),{onFocusableItemAdd:S,onFocusableItemRemove:C,currentTabStopId:k}=v,N=ck();return dt(()=>{if(!(!N||!i))return S(),()=>C()},[N,i,S,C]),f.useEffect(()=>{if(!(N||!i))return S(),()=>C()},[N,i,S,C]),E.jsx(qu.ItemSlot,{scope:s,id:y,focusable:i,active:l,children:E.jsx(Ae.span,{tabIndex:x?0:-1,"data-orientation":v.orientation,...h,ref:o,onMouseDown:pe(e.onMouseDown,D=>{i?v.onItemFocus(y):D.preventDefault()}),onFocus:pe(e.onFocus,()=>v.onItemFocus(y)),onKeyDown:pe(e.onKeyDown,D=>{if(D.key==="Tab"&&D.shiftKey){v.onItemShiftTab();return}if(D.target!==D.currentTarget)return;const O=og(D,v.orientation,v.dir);if(O!==void 0){if(D.metaKey||D.ctrlKey||D.altKey||D.shiftKey)return;D.preventDefault();let L=b().filter(j=>j.focusable).map(j=>j.ref.current);if(O==="last")L.reverse();else if(O==="prev"||O==="next"){O==="prev"&&L.reverse();const j=L.indexOf(D.currentTarget);L=v.loop?sg(L,j+1):L.slice(j+1)}setTimeout(()=>Yu(L))}}),children:typeof d=="function"?d({isCurrentTabStop:x,hasTabStop:k!=null}):d})})},"RovingFocusGroupItem")),wk={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function rg(n,e){return e!=="rtl"?n:n==="ArrowLeft"?"ArrowRight":n==="ArrowRight"?"ArrowLeft":n}Do(rg,"getDirectionAwareKey");function og(n,e,o){const s=rg(n.key,o);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return wk[s]}Do(og,"getFocusIntent");function Yu(n,e=!1){const o=document.activeElement;for(const s of n)if(s===o||(s.focus({preventScroll:e}),document.activeElement!==o))return}Do(Yu,"focusFirst");function sg(n,e){return n.map((o,s)=>n[(e+s)%n.length])}Do(sg,"wrapArray");var ig=gk,ag=xk,bk=Object.defineProperty,Ge=(n,e)=>bk(n,"name",{value:e,configurable:!0}),Qu=["Enter"," "],Sk=["ArrowDown","PageUp","Home"],lg=["ArrowUp","PageDown","End"],Ck=[...Sk,...lg],kk={ltr:[...Qu,"ArrowRight"],rtl:[...Qu,"ArrowLeft"]},Ek={ltr:["ArrowLeft"],rtl:["ArrowRight"]},sl="Menu",[di,_k,Pk]=Ia(sl),[No,cg]=tn(sl,[Pk,Ur,ol]),il=Ur(),ug=ol(),[dg,Br]=No(sl),[Rk,fi]=No(sl),Ik=Ge(n=>{const{__scopeMenu:e,open:o=!1,children:s,dir:i,onOpenChange:l,modal:u=!0}=n,d=il(e),[h,m]=f.useState(null),y=f.useRef(!1),v=Gt(l),x=ri(i);return f.useEffect(()=>{const b=Ge(()=>{y.current=!0,document.addEventListener("pointerdown",S,{capture:!0,once:!0}),document.addEventListener("pointermove",S,{capture:!0,once:!0})},"handleKeyDown"),S=Ge(()=>y.current=!1,"handlePointer");return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",S,{capture:!0}),document.removeEventListener("pointermove",S,{capture:!0})}},[]),f.useEffect(()=>{if(!o)return;const b=Ge(()=>v(!1),"handleBlur");return window.addEventListener("blur",b),()=>window.removeEventListener("blur",b)},[o,v]),E.jsx(ui,{...d,children:E.jsx(dg,{scope:e,open:o,onOpenChange:v,content:h,onContentChange:m,children:E.jsx(Rk,{scope:e,onClose:f.useCallback(()=>v(!1),[v]),isUsingKeyboardRef:y,dir:x,modal:u,children:s})})})},"Menu"),fg=f.forwardRef(Ge(function(e,o){const{__scopeMenu:s,...i}=e,l=il(s);return E.jsx(tl,{...l,...i,ref:o})},"MenuAnchor")),pg="MenuPortal",[Tk,hg]=No(pg,{forceMount:void 0}),Dk=Ge(n=>{const{__scopeMenu:e,forceMount:o,children:s,container:i}=n,l=Br(pg,e);return E.jsx(Tk,{scope:e,forceMount:o,children:E.jsx(nn,{present:o||l.open,children:E.jsx(si,{asChild:!0,container:i,children:s})})})},"MenuPortal"),_n="MenuContent",[Nk,Xu]=No(_n),Ok=f.forwardRef(Ge(function(e,o){const s=hg(_n,e.__scopeMenu),{forceMount:i=s.forceMount,...l}=e,u=Br(_n,e.__scopeMenu),d=fi(_n,e.__scopeMenu);return E.jsx(di.Provider,{scope:e.__scopeMenu,children:E.jsx(nn,{present:i||u.open,children:E.jsx(di.Slot,{scope:e.__scopeMenu,children:d.modal?E.jsx(Ak,{...l,ref:o}):E.jsx($k,{...l,ref:o})})})})},"MenuContent")),Ak=f.forwardRef(Ge(function(e,o){const s=Br(_n,e.__scopeMenu),i=f.useRef(null),l=Ve(o,i);return f.useEffect(()=>{const u=i.current;if(u)return za(u)},[]),E.jsx(Ju,{...e,ref:l,trapFocus:s.open,disableOutsidePointerEvents:s.open,disableOutsideScroll:!0,onFocusOutside:pe(e.onFocusOutside,u=>u.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>s.onOpenChange(!1)})},"MenuRootContentModal")),$k=f.forwardRef(Ge(function(e,o){const s=Br(_n,e.__scopeMenu);return E.jsx(Ju,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>s.onOpenChange(!1)})},"MenuRootContentNonModal")),Mk=kn("MenuContent.ScrollLock"),Ju=f.forwardRef(Ge(function(e,o){const{__scopeMenu:s,loop:i=!1,trapFocus:l,onOpenAutoFocus:u,onCloseAutoFocus:d,disableOutsidePointerEvents:h,onEntryFocus:m,onEscapeKeyDown:y,onPointerDownOutside:v,onFocusOutside:x,onInteractOutside:b,onDismiss:S,disableOutsideScroll:C,...k}=e,N=Br(_n,s),D=fi(_n,s),O=il(s),R=ug(s),L=_k(s),[j,B]=f.useState(null),I=f.useRef(null),K=Ve(o,I,N.onContentChange),ae=f.useRef(0),be=f.useRef(""),le=f.useRef(0),ce=f.useRef(null),ue=f.useRef("right"),Se=f.useRef(0),q=C?ii:f.Fragment,ne=C?{as:Mk,allowPinchZoom:!0}:void 0,U=Ge(M=>{const T=be.current+M,P=L().filter(Y=>!Y.disabled),W=document.activeElement,Z=P.find(Y=>Y.ref.current===W)?.textValue,H=P.map(Y=>Y.textValue),re=Cg(H,T,Z),de=P.find(Y=>Y.textValue===re)?.ref.current;Ge((function Y(se){be.current=se,window.clearTimeout(ae.current),se!==""&&(ae.current=window.setTimeout(()=>Y(""),1e3))}),"updateSearch")(T),de&&setTimeout(()=>de.focus())},"handleTypeaheadSearch");f.useEffect(()=>()=>window.clearTimeout(ae.current),[]),cs();const Q=f.useCallback(M=>ue.current===ce.current?.side&&Eg(M,ce.current?.area),[]);return E.jsx(Nk,{scope:s,searchRef:be,onItemEnter:f.useCallback(M=>{Q(M)&&M.preventDefault()},[Q]),onItemLeave:f.useCallback(M=>{Q(M)||(I.current?.focus(),B(null))},[Q]),onTriggerLeave:f.useCallback(M=>{Q(M)&&M.preventDefault()},[Q]),pointerGraceTimerRef:le,onPointerGraceIntentChange:f.useCallback(M=>{ce.current=M},[]),children:E.jsx(q,{...ne,children:E.jsx(Da,{asChild:!0,trapped:l,onMountAutoFocus:pe(u,M=>{M.preventDefault(),I.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:d,children:E.jsx(oi,{asChild:!0,disableOutsidePointerEvents:h,onEscapeKeyDown:y,onPointerDownOutside:v,onFocusOutside:x,onInteractOutside:b,onDismiss:S,children:E.jsx(ig,{asChild:!0,...R,dir:D.dir,orientation:"vertical",loop:i,currentTabStopId:j,onCurrentTabStopIdChange:B,onEntryFocus:pe(m,M=>{D.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:E.jsx(nl,{role:"menu","aria-orientation":"vertical","data-state":td(N.open),"data-radix-menu-content":"",dir:D.dir,...O,...k,ref:K,style:{outline:"none",...k.style},onKeyDown:pe(k.onKeyDown,M=>{const P=M.target.closest("[data-radix-menu-content]")===M.currentTarget,W=M.ctrlKey||M.altKey||M.metaKey,Z=M.key.length===1;P&&(M.key==="Tab"&&M.preventDefault(),!W&&Z&&U(M.key));const H=I.current;if(M.target!==H||!Ck.includes(M.key))return;M.preventDefault();const de=L().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);lg.includes(M.key)&&de.reverse(),bg(de)}),onBlur:pe(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(ae.current),be.current="")}),onPointerMove:pe(e.onPointerMove,vs(M=>{const T=M.target,P=Se.current!==M.clientX;if(M.currentTarget.contains(T)&&P){const W=M.clientX>Se.current?"right":"left";ue.current=W,Se.current=M.clientX}}))})})})})})})},"MenuContentImpl")),jk=f.forwardRef(Ge(function(e,o){const{__scopeMenu:s,...i}=e;return E.jsx(Ae.div,{role:"group",...i,ref:o})},"MenuGroup")),Lk=f.forwardRef(Ge(function(e,o){const{__scopeMenu:s,...i}=e;return E.jsx(Ae.div,{...i,ref:o})},"MenuLabel")),ed="MenuItem",mg="menu.itemSelect",gg=f.forwardRef(Ge(function(e,o){const{disabled:s=!1,onSelect:i,...l}=e,u=f.useRef(null),d=fi(ed,e.__scopeMenu),h=Xu(ed,e.__scopeMenu),m=Ve(o,u),y=f.useRef(!1),v=Ge(()=>{const x=u.current;if(!s&&x){const b=new CustomEvent(mg,{bubbles:!0,cancelable:!0});x.addEventListener(mg,S=>i?.(S),{once:!0}),lu(x,b),b.defaultPrevented?y.current=!1:d.onClose()}},"handleSelect");return E.jsx(vg,{...l,ref:m,disabled:s,onClick:pe(e.onClick,v),onPointerDown:x=>{e.onPointerDown?.(x),y.current=!0},onPointerUp:pe(e.onPointerUp,x=>{y.current||x.currentTarget?.click()}),onKeyDown:pe(e.onKeyDown,x=>{s||x.target!==x.currentTarget||h.searchRef.current!==""&&x.key===" "||Qu.includes(x.key)&&(x.currentTarget.click(),x.preventDefault())})})},"MenuItem")),vg=f.forwardRef(Ge(function(e,o){const{__scopeMenu:s,disabled:i=!1,textValue:l,...u}=e,d=Xu(ed,s),h=ug(s),m=f.useRef(null),y=Ve(o,m),[v,x]=f.useState(!1),[b,S]=f.useState("");return f.useEffect(()=>{const C=m.current;C&&S((C.textContent??"").trim())},[u.children]),E.jsx(di.ItemSlot,{scope:s,disabled:i,textValue:l??b,children:E.jsx(ag,{asChild:!0,...h,focusable:!i,children:E.jsx(Ae.div,{role:"menuitem","data-highlighted":v?"":void 0,"aria-disabled":i||void 0,"data-disabled":i?"":void 0,...u,ref:y,onPointerMove:pe(e.onPointerMove,vs(C=>{i?d.onItemLeave(C):(d.onItemEnter(C),C.defaultPrevented||C.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:pe(e.onPointerLeave,vs(C=>d.onItemLeave(C))),onFocus:pe(e.onFocus,()=>x(!0)),onBlur:pe(e.onBlur,()=>x(!1))})})})},"MenuItemImpl")),Fk="MenuRadioGroup",[zk,Vk]=No(Fk,{value:void 0,onValueChange:Ge(()=>{},"onValueChange")}),Uk=f.forwardRef(Ge(function(e,o){const{value:s,onValueChange:i,...l}=e,u=Gt(i);return E.jsx(zk,{scope:e.__scopeMenu,value:s,onValueChange:u,children:E.jsx(jk,{...l,ref:o})})},"MenuRadioGroup")),Bk="MenuRadioItem",Hk=f.forwardRef(Ge(function(e,o){const{value:s,...i}=e,l=Vk(Bk,e.__scopeMenu),u=s===l.value;return E.jsx(Wk,{scope:e.__scopeMenu,checked:u,children:E.jsx(gg,{role:"menuitemradio","aria-checked":u,...i,ref:o,"data-state":rd(u),onSelect:pe(i.onSelect,()=>l.onValueChange?.(s),{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),yg="MenuItemIndicator",[Wk,Kk]=No(yg,{checked:!1}),Gk=f.forwardRef(Ge(function(e,o){const{__scopeMenu:s,forceMount:i,...l}=e,u=Kk(yg,s);return E.jsx(nn,{present:i||nd(u.checked)||u.checked===!0,children:E.jsx(Ae.span,{...l,ref:o,"data-state":rd(u.checked)})})},"MenuItemIndicator")),Zk=f.forwardRef(Ge(function(e,o){const{__scopeMenu:s,...i}=e;return E.jsx(Ae.div,{role:"separator","aria-orientation":"horizontal",...i,ref:o})},"MenuSeparator")),xg="MenuSub",[qk,wg]=No(xg),Yk=Ge(n=>{const{__scopeMenu:e,children:o,open:s=!1,onOpenChange:i}=n,l=Br(xg,e),u=il(e),[d,h]=f.useState(null),[m,y]=f.useState(null),v=Gt(i);return f.useEffect(()=>(l.open===!1&&v(!1),()=>v(!1)),[l.open,v]),E.jsx(ui,{...u,children:E.jsx(dg,{scope:e,open:s,onOpenChange:v,content:m,onContentChange:y,children:E.jsx(qk,{scope:e,contentId:yt(),triggerId:yt(),trigger:d,onTriggerChange:h,children:o})})})},"MenuSub"),al="MenuSubTrigger",Qk=f.forwardRef(Ge(function(e,o){const s=Br(al,e.__scopeMenu),i=fi(al,e.__scopeMenu),l=wg(al,e.__scopeMenu),u=Xu(al,e.__scopeMenu),d=f.useRef(null),{pointerGraceTimerRef:h,onPointerGraceIntentChange:m}=u,y={__scopeMenu:e.__scopeMenu},v=f.useCallback(()=>{d.current&&window.clearTimeout(d.current),d.current=null},[]);f.useEffect(()=>v,[v]),f.useEffect(()=>{const b=h.current;return()=>{window.clearTimeout(b),m(null)}},[h,m]);const x=Ve(o,l.onTriggerChange);return E.jsx(fg,{asChild:!0,...y,children:E.jsx(vg,{id:l.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?l.contentId:void 0,"data-state":td(s.open),...e,ref:x,onClick:b=>{e.onClick?.(b),!(e.disabled||b.defaultPrevented)&&(b.currentTarget.focus(),s.open||s.onOpenChange(!0))},onPointerMove:pe(e.onPointerMove,vs(b=>{u.onItemEnter(b),!b.defaultPrevented&&!e.disabled&&!s.open&&!d.current&&(u.onPointerGraceIntentChange(null),d.current=window.setTimeout(()=>{s.onOpenChange(!0),v()},100))})),onPointerLeave:pe(e.onPointerLeave,vs(b=>{v();const S=s.content?.getBoundingClientRect();if(S){const C=s.content?.dataset.side,k=C==="right",N=k?-5:5,D=S[k?"left":"right"],O=S[k?"right":"left"];u.onPointerGraceIntentChange({area:[{x:b.clientX+N,y:b.clientY},{x:D,y:S.top},{x:O,y:S.top},{x:O,y:S.bottom},{x:D,y:S.bottom}],side:C}),window.clearTimeout(h.current),h.current=window.setTimeout(()=>u.onPointerGraceIntentChange(null),300)}else{if(u.onTriggerLeave(b),b.defaultPrevented)return;u.onPointerGraceIntentChange(null)}})),onKeyDown:pe(e.onKeyDown,b=>{e.disabled||b.target!==b.currentTarget||u.searchRef.current!==""&&b.key===" "||kk[i.dir].includes(b.key)&&(s.onOpenChange(!0),s.content?.focus(),b.preventDefault())})})})},"MenuSubTrigger")),Xk="MenuSubContent",Jk=f.forwardRef(Ge(function(e,o){const s=hg(_n,e.__scopeMenu),{forceMount:i=s.forceMount,align:l="start",...u}=e,d=Br(_n,e.__scopeMenu),h=fi(_n,e.__scopeMenu),m=wg(Xk,e.__scopeMenu),y=f.useRef(null),v=Ve(o,y);return E.jsx(di.Provider,{scope:e.__scopeMenu,children:E.jsx(nn,{present:i||d.open,children:E.jsx(di.Slot,{scope:e.__scopeMenu,children:E.jsx(Ju,{id:m.contentId,"aria-labelledby":m.triggerId,...u,ref:v,align:l,side:h.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:x=>{h.isUsingKeyboardRef.current&&y.current?.focus(),x.preventDefault()},onCloseAutoFocus:x=>x.preventDefault(),onFocusOutside:pe(e.onFocusOutside,x=>{x.target!==m.trigger&&d.onOpenChange(!1)}),onEscapeKeyDown:pe(e.onEscapeKeyDown,x=>{h.onClose(),x.preventDefault()}),onKeyDown:pe(e.onKeyDown,x=>{const b=x.currentTarget.contains(x.target),S=Ek[h.dir].includes(x.key);b&&S&&(d.onOpenChange(!1),m.trigger?.focus(),x.preventDefault())})})})})})},"MenuSubContent"));function td(n){return n?"open":"closed"}Ge(td,"getOpenState");function nd(n){return n==="indeterminate"}Ge(nd,"isIndeterminate");function rd(n){return nd(n)?"indeterminate":n?"checked":"unchecked"}Ge(rd,"getCheckedState");function bg(n){const e=document.activeElement;for(const o of n)if(o===e||(o.focus(),document.activeElement!==e))return}Ge(bg,"focusFirst");function Sg(n,e){return n.map((o,s)=>n[(e+s)%n.length])}Ge(Sg,"wrapArray");function Cg(n,e,o){const i=e.length>1&&Array.from(e).every(m=>m===e[0])?e[0]:e,l=o?n.indexOf(o):-1;let u=Sg(n,Math.max(l,0));i.length===1&&(u=u.filter(m=>m!==o));const h=u.find(m=>m.toLowerCase().startsWith(i.toLowerCase()));return h!==o?h:void 0}Ge(Cg,"getNextMatch");function kg(n,e){const{x:o,y:s}=n;let i=!1;for(let l=0,u=e.length-1;l<e.length;u=l++){const d=e[l],h=e[u],m=d.x,y=d.y,v=h.x,x=h.y;y>s!=x>s&&o<(v-m)*(s-y)/(x-y)+m&&(i=!i)}return i}Ge(kg,"isPointInPolygon");function Eg(n,e){if(!e)return!1;const o={x:n.clientX,y:n.clientY};return kg(o,e)}Ge(Eg,"isPointerInGraceArea");function vs(n){return e=>e.pointerType==="mouse"?n(e):void 0}Ge(vs,"whenMouse");var eE=Ik,tE=fg,nE=Dk,rE=Ok,oE=Lk,sE=gg,iE=Uk,aE=Hk,lE=Gk,cE=Zk,uE=Yk,dE=Qk,fE=Jk,pE=Object.defineProperty,on=(n,e)=>pE(n,"name",{value:e,configurable:!0}),od="DropdownMenu",[hE,a2]=tn(od,[cg]),sn=cg(),[mE,_g]=hE(od),gE=on(n=>{const{__scopeDropdownMenu:e,children:o,dir:s,open:i,defaultOpen:l,onOpenChange:u,modal:d=!0}=n,h=sn(e),m=f.useRef(null),[y,v]=Un({prop:i,defaultProp:l??!1,onChange:u,caller:od});return E.jsx(mE,{scope:e,triggerId:yt(),triggerRef:m,contentId:yt(),open:y,onOpenChange:v,onOpenToggle:f.useCallback(()=>v(x=>!x),[v]),modal:d,children:E.jsx(eE,{...h,open:y,onOpenChange:v,dir:s,modal:d,children:o})})},"DropdownMenu"),vE="DropdownMenuTrigger",yE=f.forwardRef(on(function(e,o){const{__scopeDropdownMenu:s,disabled:i=!1,...l}=e,u=_g(vE,s),d=sn(s),h=Ve(o,u.triggerRef);return E.jsx(tE,{asChild:!0,...d,children:E.jsx(Ae.button,{type:"button",id:u.triggerId,"aria-haspopup":"menu","aria-expanded":u.open,"aria-controls":u.open?u.contentId:void 0,"data-state":u.open?"open":"closed","data-disabled":i?"":void 0,disabled:i,...l,ref:h,onPointerDown:pe(e.onPointerDown,m=>{!i&&m.button===0&&m.ctrlKey===!1&&(u.onOpenToggle(),u.open||m.preventDefault())}),onKeyDown:pe(e.onKeyDown,m=>{i||(["Enter"," "].includes(m.key)&&u.onOpenToggle(),m.key==="ArrowDown"&&u.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(m.key)&&m.preventDefault())})})})},"DropdownMenuTrigger")),xE=on(n=>{const{__scopeDropdownMenu:e,...o}=n,s=sn(e);return E.jsx(nE,{...s,...o})},"DropdownMenuPortal"),wE="DropdownMenuContent",bE=f.forwardRef(on(function(e,o){const{__scopeDropdownMenu:s,...i}=e,l=_g(wE,s),u=sn(s),d=f.useRef(!1);return E.jsx(rE,{id:l.contentId,"aria-labelledby":l.triggerId,...u,...i,ref:o,onCloseAutoFocus:pe(e.onCloseAutoFocus,h=>{d.current||l.triggerRef.current?.focus(),d.current=!1,h.preventDefault()}),onInteractOutside:pe(e.onInteractOutside,h=>{const m=h.detail.originalEvent,y=m.button===0&&m.ctrlKey===!0,v=m.button===2||y;(!l.modal||v)&&(d.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),SE=f.forwardRef(on(function(e,o){const{__scopeDropdownMenu:s,...i}=e,l=sn(s);return E.jsx(oE,{...l,...i,ref:o})},"DropdownMenuLabel")),CE=f.forwardRef(on(function(e,o){const{__scopeDropdownMenu:s,...i}=e,l=sn(s);return E.jsx(sE,{...l,...i,ref:o})},"DropdownMenuItem")),kE=f.forwardRef(on(function(e,o){const{__scopeDropdownMenu:s,...i}=e,l=sn(s);return E.jsx(iE,{...l,...i,ref:o})},"DropdownMenuRadioGroup")),EE=f.forwardRef(on(function(e,o){const{__scopeDropdownMenu:s,...i}=e,l=sn(s);return E.jsx(aE,{...l,...i,ref:o})},"DropdownMenuRadioItem")),_E=f.forwardRef(on(function(e,o){const{__scopeDropdownMenu:s,...i}=e,l=sn(s);return E.jsx(lE,{...l,...i,ref:o})},"DropdownMenuItemIndicator")),PE=f.forwardRef(on(function(e,o){const{__scopeDropdownMenu:s,...i}=e,l=sn(s);return E.jsx(cE,{...l,...i,ref:o})},"DropdownMenuSeparator")),RE=on(n=>{const{__scopeDropdownMenu:e,children:o,open:s,onOpenChange:i,defaultOpen:l}=n,u=sn(e),[d,h]=Un({prop:s,defaultProp:l??!1,onChange:i,caller:"DropdownMenuSub"});return E.jsx(uE,{...u,open:d,onOpenChange:h,children:o})},"DropdownMenuSub"),IE=f.forwardRef(on(function(e,o){const{__scopeDropdownMenu:s,...i}=e,l=sn(s);return E.jsx(dE,{...l,...i,ref:o})},"DropdownMenuSubTrigger")),TE=f.forwardRef(on(function(e,o){const{__scopeDropdownMenu:s,...i}=e,l=sn(s);return E.jsx(fE,{...l,...i,ref:o,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuSubContent")),DE=gE,NE=yE,Pg=xE,OE=bE,AE=SE,$E=CE,ME=kE,jE=EE,LE=_E,FE=PE,zE=RE,VE=IE,UE=TE,BE=Object.defineProperty,HE=(n,e)=>BE(n,"name",{value:e,configurable:!0});function Rg(n){const e=f.useRef({value:n,previous:n});return f.useMemo(()=>(e.current.value!==n&&(e.current.previous=e.current.value,e.current.value=n),e.current.previous),[n])}HE(Rg,"usePrevious");var WE=Object.defineProperty,KE=(n,e)=>WE(n,"name",{value:e,configurable:!0});function sd(n,[e,o]){return Math.min(o,Math.max(e,n))}KE(sd,"clamp");var GE=Object.defineProperty,Hr=(n,e)=>GE(n,"name",{value:e,configurable:!0}),id="Popover",[Ig,l2]=tn(id,[Ur]),ad=Ur(),[ZE,ys]=Ig(id),qE=Hr(n=>{const{__scopePopover:e,children:o,open:s,defaultOpen:i,onOpenChange:l,modal:u=!1}=n,d=ad(e),h=f.useRef(null),[m,y]=f.useState(!1),[v,x]=Un({prop:s,defaultProp:i??!1,onChange:l,caller:id});return E.jsx(ui,{...d,children:E.jsx(ZE,{scope:e,contentId:yt(),triggerRef:h,open:v,onOpenChange:x,onOpenToggle:f.useCallback(()=>x(b=>!b),[x]),hasCustomAnchor:m,onCustomAnchorAdd:f.useCallback(()=>y(!0),[]),onCustomAnchorRemove:f.useCallback(()=>y(!1),[]),modal:u,children:o})})},"Popover"),YE="PopoverTrigger",QE=f.forwardRef(Hr(function(e,o){const{__scopePopover:s,...i}=e,l=ys(YE,s),u=ad(s),d=Ve(o,l.triggerRef),h=E.jsx(Ae.button,{type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.open?l.contentId:void 0,"data-state":ld(l.open),...i,ref:d,onClick:pe(e.onClick,l.onOpenToggle)});return l.hasCustomAnchor?h:E.jsx(tl,{asChild:!0,...u,children:h})},"PopoverTrigger")),Tg="PopoverPortal",[XE,JE]=Ig(Tg,{forceMount:void 0}),e_=Hr(n=>{const{__scopePopover:e,forceMount:o,children:s,container:i}=n,l=ys(Tg,e);return E.jsx(XE,{scope:e,forceMount:o,children:E.jsx(nn,{present:o||l.open,children:E.jsx(si,{asChild:!0,container:i,children:s})})})},"PopoverPortal"),pi="PopoverContent",t_=f.forwardRef(Hr(function(e,o){const s=JE(pi,e.__scopePopover),{forceMount:i=s.forceMount,...l}=e,u=ys(pi,e.__scopePopover);return E.jsx(nn,{present:i||u.open,children:u.modal?E.jsx(r_,{...l,ref:o}):E.jsx(o_,{...l,ref:o})})},"PopoverContent")),n_=kn("PopoverContent.RemoveScroll"),r_=f.forwardRef(Hr(function(e,o){const s=ys(pi,e.__scopePopover),i=f.useRef(null),l=Ve(o,i),u=f.useRef(!1);return f.useEffect(()=>{const d=i.current;if(d)return za(d)},[]),E.jsx(ii,{as:n_,allowPinchZoom:!0,children:E.jsx(Dg,{...e,ref:l,trapFocus:s.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pe(e.onCloseAutoFocus,d=>{d.preventDefault(),u.current||s.triggerRef.current?.focus()}),onPointerDownOutside:pe(e.onPointerDownOutside,d=>{const h=d.detail.originalEvent,m=h.button===0&&h.ctrlKey===!0,y=h.button===2||m;u.current=y},{checkForDefaultPrevented:!1}),onFocusOutside:pe(e.onFocusOutside,d=>d.preventDefault(),{checkForDefaultPrevented:!1})})})},"PopoverContentModal")),o_=f.forwardRef(Hr(function(e,o){const s=ys(pi,e.__scopePopover),i=f.useRef(!1),l=f.useRef(!1);return E.jsx(Dg,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:u=>{e.onCloseAutoFocus?.(u),u.defaultPrevented||(i.current||s.triggerRef.current?.focus(),u.preventDefault()),i.current=!1,l.current=!1},onInteractOutside:u=>{e.onInteractOutside?.(u),u.defaultPrevented||(i.current=!0,u.detail.originalEvent.type==="pointerdown"&&(l.current=!0));const d=u.target;s.triggerRef.current?.contains(d)&&u.preventDefault(),u.detail.originalEvent.type==="focusin"&&l.current&&u.preventDefault()}})},"PopoverContentNonModal")),Dg=f.forwardRef(Hr(function(e,o){const{__scopePopover:s,trapFocus:i,onOpenAutoFocus:l,onCloseAutoFocus:u,disableOutsidePointerEvents:d,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:y,onInteractOutside:v,...x}=e,b=ys(pi,s),S=ad(s);return cs(),E.jsx(Da,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:l,onUnmountAutoFocus:u,children:E.jsx(oi,{asChild:!0,disableOutsidePointerEvents:d,onInteractOutside:v,onEscapeKeyDown:h,onPointerDownOutside:m,onFocusOutside:y,onDismiss:()=>b.onOpenChange(!1),deferPointerDownOutside:!0,children:E.jsx(nl,{"data-state":ld(b.open),role:"dialog",id:b.contentId,...S,...x,ref:o,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})},"PopoverContentImpl"));function ld(n){return n?"open":"closed"}Hr(ld,"getState");var s_=qE,i_=QE,a_=e_,l_=t_,c_=Object.defineProperty,qe=(n,e)=>c_(n,"name",{value:e,configurable:!0}),u_=[" ","Enter","ArrowUp","ArrowDown"],d_=[" ","Enter"],xs="Select",[ll,cl,f_]=Ia(xs),[Oo,c2]=tn(xs,[f_,Ur]),cd=Ur(),[p_,Wr]=Oo(xs),[h_,m_]=Oo(xs);function Ng(n){const{__scopeSelect:e,children:o,open:s,defaultOpen:i,onOpenChange:l,value:u,defaultValue:d,onValueChange:h,dir:m,name:y,autoComplete:v,disabled:x,required:b,form:S,internal_do_not_use_render:C}=n,k=cd(e),[N,D]=f.useState(null),[O,R]=f.useState(null),[L,j]=f.useState(!1),B=ri(m),[I,K]=Un({prop:s,defaultProp:i??!1,onChange:l,caller:xs}),[ae,be]=Un({prop:u,defaultProp:d,onChange:h,caller:xs}),le=f.useRef(null),ce=f.useRef(ae);f.useEffect(()=>{const P=S?N?.ownerDocument.getElementById(S):N?.form;if(P instanceof HTMLFormElement){const W=qe(()=>be(ce.current),"reset");return P.addEventListener("reset",W),()=>P.removeEventListener("reset",W)}},[S,N,be]);const ue=N?!!S||!!N.closest("form"):!0,[Se,q]=f.useState(new Set),ne=yt(),U=Array.from(Se).map(P=>P.props.value).join(";"),Q=f.useCallback(P=>{q(W=>new Set(W).add(P))},[]),M=f.useCallback(P=>{q(W=>{const Z=new Set(W);return Z.delete(P),Z})},[]),T={required:b,trigger:N,onTriggerChange:D,valueNode:O,onValueNodeChange:R,valueNodeHasChildren:L,onValueNodeHasChildrenChange:j,contentId:ne,value:ae,onValueChange:be,open:I,onOpenChange:K,dir:B,triggerPointerDownPosRef:le,disabled:x,name:y,autoComplete:v,form:S,nativeOptions:Se,nativeSelectKey:U,isFormControl:ue};return E.jsx(ui,{...k,children:E.jsx(p_,{scope:e,...T,children:E.jsx(ll.Provider,{scope:e,children:E.jsx(h_,{scope:e,onNativeOptionAdd:Q,onNativeOptionRemove:M,children:zg(C)?C(T):o})})})})}qe(Ng,"SelectProvider");var g_=qe(n=>{const{__scopeSelect:e,children:o,...s}=n;return E.jsx(Ng,{__scopeSelect:e,...s,internal_do_not_use_render:({isFormControl:i})=>E.jsxs(E.Fragment,{children:[o,i?E.jsx(U_,{__scopeSelect:e}):null]})})},"Select"),v_="SelectTrigger",y_=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,disabled:i=!1,...l}=e,u=cd(s),d=Wr(v_,s),h=d.disabled||i,m=Ve(o,d.onTriggerChange),y=cl(s),v=f.useRef("touch"),[x,b,S]=fd(k=>{const N=y().filter(R=>!R.disabled),D=N.find(R=>R.value===d.value),O=pd(N,k,D);O!==void 0&&d.onValueChange(O.value)}),C=qe(k=>{h||(d.onOpenChange(!0),S()),k&&(d.triggerPointerDownPosRef.current={x:Math.round(k.pageX),y:Math.round(k.pageY)})},"handleOpen");return E.jsx(tl,{asChild:!0,...u,children:E.jsx(Ae.button,{type:"button",role:"combobox","aria-controls":d.open?d.contentId:void 0,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":hi(d.value)?"":void 0,...l,ref:m,onClick:pe(l.onClick,k=>{k.currentTarget.focus(),v.current!=="mouse"&&C(k)}),onPointerDown:pe(l.onPointerDown,k=>{v.current=k.pointerType;const N=k.target;N.hasPointerCapture(k.pointerId)&&N.releasePointerCapture(k.pointerId),k.button===0&&k.ctrlKey===!1&&k.pointerType==="mouse"&&(C(k),k.preventDefault())}),onKeyDown:pe(l.onKeyDown,k=>{const N=x.current!=="";!(k.ctrlKey||k.altKey||k.metaKey)&&k.key.length===1&&b(k.key),!(N&&k.key===" ")&&u_.includes(k.key)&&(C(),k.preventDefault())})})})},"SelectTrigger")),x_="SelectValue",w_=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,className:i,style:l,children:u,placeholder:d="",...h}=e,m=Wr(x_,s),{onValueNodeHasChildrenChange:y}=m,v=u!==void 0,x=Ve(o,m.onValueNodeChange);dt(()=>{y(v)},[y,v]);const b=hi(m.value);return E.jsx(Ae.span,{...h,asChild:b?!1:h.asChild,ref:x,style:{pointerEvents:"none"},children:E.jsx(f.Fragment,{children:b?d:u},b?"placeholder":"value")})},"SelectValue")),b_=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,children:i,...l}=e;return E.jsx(Ae.span,{"aria-hidden":!0,...l,ref:o,children:i||"▼"})},"SelectIcon")),S_="SelectPortal",[C_,k_]=Oo(S_,{forceMount:void 0}),E_=qe(n=>{const{__scopeSelect:e,forceMount:o,...s}=n;return E.jsx(C_,{scope:n.__scopeSelect,forceMount:o,children:E.jsx(si,{asChild:!0,...s})})},"SelectPortal"),Ao="SelectContent",__=f.forwardRef(qe(function(e,o){const s=k_(Ao,e.__scopeSelect),{forceMount:i=s.forceMount,...l}=e,u=Wr(Ao,e.__scopeSelect),[d,h]=f.useState();return dt(()=>{h(new DocumentFragment)},[]),E.jsx(nn,{present:i||u.open,children:({present:m})=>m?E.jsx(I_,{...l,ref:o}):E.jsx(P_,{...l,fragment:d})})},"SelectContent")),P_=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,children:i,fragment:l}=e;return l?ti.createPortal(E.jsx(Og,{scope:s,children:E.jsx(ll.Slot,{scope:s,children:E.jsx("div",{ref:o,children:i})})}),l):null},"SelectContentFragment")),Pn=10,[Og,$o]=Oo(Ao),R_=kn("SelectContent.RemoveScroll"),I_=f.forwardRef(qe(function(e,o){const{__scopeSelect:s}=e,{position:i="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,side:h,sideOffset:m,align:y,alignOffset:v,arrowPadding:x,collisionBoundary:b,collisionPadding:S,sticky:C,hideWhenDetached:k,avoidCollisions:N,...D}=e,O=Wr(Ao,s),[R,L]=f.useState(null),[j,B]=f.useState(null),I=Ve(o,L),[K,ae]=f.useState(null),[be,le]=f.useState(null),ce=cl(s),[ue,Se]=f.useState(!1),q=f.useRef(!1);f.useEffect(()=>{if(R)return za(R)},[R]),cs();const ne=f.useCallback(Y=>{const[se,...Oe]=ce().map(We=>We.ref.current),[Ue]=Oe.slice(-1),je=document.activeElement;for(const We of Y)if(We===je||(We?.scrollIntoView({block:"nearest"}),We===se&&j&&(j.scrollTop=0),We===Ue&&j&&(j.scrollTop=j.scrollHeight),We?.focus(),document.activeElement!==je))return},[ce,j]),U=f.useCallback(()=>ne([K,R]),[ne,K,R]);f.useEffect(()=>{ue&&U()},[ue,U]);const{onOpenChange:Q,triggerPointerDownPosRef:M}=O;f.useEffect(()=>{if(R){let Y={x:0,y:0};const se=qe(Ue=>{Y={x:Math.abs(Math.round(Ue.pageX)-(M.current?.x??0)),y:Math.abs(Math.round(Ue.pageY)-(M.current?.y??0))}},"handlePointerMove"),Oe=qe(Ue=>{Y.x<=10&&Y.y<=10?Ue.preventDefault():Ue.composedPath().includes(R)||Q(!1),document.removeEventListener("pointermove",se),M.current=null},"handlePointerUp");return M.current!==null&&(document.addEventListener("pointermove",se),document.addEventListener("pointerup",Oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",se),document.removeEventListener("pointerup",Oe,{capture:!0})}}},[R,Q,M]),f.useEffect(()=>{const Y=qe(()=>Q(!1),"close");return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[Q]);const[T,P]=fd(Y=>{const se=ce().filter(je=>!je.disabled),Oe=se.find(je=>je.ref.current===document.activeElement),Ue=pd(se,Y,Oe);Ue&&setTimeout(()=>Ue.ref.current?.focus())}),W=f.useCallback((Y,se,Oe)=>{const Ue=!q.current&&!Oe;(O.value!==void 0&&O.value===se||Ue)&&(ae(Y),Ue&&(q.current=!0))},[O.value]),Z=f.useCallback(()=>R?.focus(),[R]),H=f.useCallback((Y,se,Oe)=>{const Ue=!q.current&&!Oe;(O.value!==void 0&&O.value===se||Ue)&&le(Y)},[O.value]),re=i==="popper"?Ag:T_,de=re===Ag?{side:h,sideOffset:m,align:y,alignOffset:v,arrowPadding:x,collisionBoundary:b,collisionPadding:S,sticky:C,hideWhenDetached:k,avoidCollisions:N}:{};return E.jsx(Og,{scope:s,content:R,viewport:j,onViewportChange:B,itemRefCallback:W,selectedItem:K,onItemLeave:Z,itemTextRefCallback:H,focusSelectedItem:U,selectedItemText:be,position:i,isPositioned:ue,searchRef:T,children:E.jsx(ii,{as:R_,allowPinchZoom:!0,children:E.jsx(Da,{asChild:!0,trapped:O.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:pe(l,Y=>{O.trigger?.focus({preventScroll:!0}),Y.preventDefault()}),children:E.jsx(oi,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>O.onOpenChange(!1),children:E.jsx(re,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:Y=>Y.preventDefault(),...D,...de,onPlaced:()=>Se(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...D.style},onKeyDown:pe(D.onKeyDown,Y=>{const se=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!se&&Y.key.length===1&&P(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let Ue=ce().filter(je=>!je.disabled).map(je=>je.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(Ue=Ue.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const je=Y.target,We=Ue.indexOf(je);Ue=Ue.slice(We+1)}setTimeout(()=>ne(Ue)),Y.preventDefault()}})})})})})})},"SelectContentImpl")),T_=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,onPlaced:i,...l}=e,u=Wr(Ao,s),d=$o(Ao,s),[h,m]=f.useState(null),[y,v]=f.useState(null),x=Ve(o,v),b=cl(s),S=f.useRef(!1),C=f.useRef(!0),{viewport:k,selectedItem:N,selectedItemText:D,focusSelectedItem:O}=d,R=f.useCallback(()=>{if(u.trigger&&u.valueNode&&h&&y&&k&&N&&D){const I=u.trigger.getBoundingClientRect(),K=y.getBoundingClientRect(),ae=u.valueNode.getBoundingClientRect(),be=D.getBoundingClientRect();if(u.dir!=="rtl"){const je=be.left-K.left,We=ae.left-je,xt=I.left-We,ht=I.width+xt,Qn=Math.max(ht,K.width),Rn=window.innerWidth-Pn,Zr=sd(We,[Pn,Math.max(Pn,Rn-Qn)]);h.style.minWidth=ht+"px",h.style.left=Zr+"px"}else{const je=K.right-be.right,We=window.innerWidth-ae.right-je,xt=window.innerWidth-I.right-We,ht=I.width+xt,Qn=Math.max(ht,K.width),Rn=window.innerWidth-Pn,Zr=sd(We,[Pn,Math.max(Pn,Rn-Qn)]);h.style.minWidth=ht+"px",h.style.right=Zr+"px"}const le=b(),ce=window.innerHeight-Pn*2,ue=k.scrollHeight,Se=window.getComputedStyle(y),q=parseInt(Se.borderTopWidth,10),ne=parseInt(Se.paddingTop,10),U=parseInt(Se.borderBottomWidth,10),Q=parseInt(Se.paddingBottom,10),M=q+ne+ue+Q+U,T=Math.min(N.offsetHeight*5,M),P=window.getComputedStyle(k),W=parseInt(P.paddingTop,10),Z=parseInt(P.paddingBottom,10),H=I.top+I.height/2-Pn,re=ce-H,de=N.offsetHeight/2,Y=N.offsetTop+de,se=q+ne+Y,Oe=M-se;if(se<=H){const je=le.length>0&&N===le[le.length-1].ref.current;h.style.bottom="0px";const We=y.clientHeight-k.offsetTop-k.offsetHeight,xt=Math.max(re,de+(je?Z:0)+We+U),ht=se+xt;h.style.height=ht+"px"}else{const je=le.length>0&&N===le[0].ref.current;h.style.top="0px";const xt=Math.max(H,q+k.offsetTop+(je?W:0)+de)+Oe;h.style.height=xt+"px",k.scrollTop=se-H+k.offsetTop}h.style.margin=`${Pn}px 0`,h.style.minHeight=T+"px",h.style.maxHeight=ce+"px",i?.(),requestAnimationFrame(()=>S.current=!0)}},[b,u.trigger,u.valueNode,h,y,k,N,D,u.dir,i]);dt(()=>R(),[R]);const[L,j]=f.useState();dt(()=>{y&&j(window.getComputedStyle(y).zIndex)},[y]);const B=f.useCallback(I=>{I&&C.current===!0&&(R(),O?.(),C.current=!1)},[R,O]);return E.jsx(D_,{scope:s,contentWrapper:h,shouldExpandOnScrollRef:S,onScrollButtonChange:B,children:E.jsx("div",{ref:m,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:L},children:E.jsx(Ae.div,{...l,ref:x,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})},"SelectItemAlignedPosition")),Ag=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,align:i="start",collisionPadding:l=Pn,...u}=e,d=cd(s);return E.jsx(nl,{...d,...u,ref:o,align:i,collisionPadding:l,style:{boxSizing:"border-box",...u.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[D_,ud]=Oo(Ao,{}),$g="SelectViewport",N_=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,nonce:i,...l}=e,u=$o($g,s),d=ud($g,s),h=Ve(o,u.onViewportChange),m=f.useRef(0);return E.jsxs(E.Fragment,{children:[E.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),E.jsx(ll.Slot,{scope:s,children:E.jsx(Ae.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:h,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:pe(l.onScroll,y=>{const v=y.currentTarget,{contentWrapper:x,shouldExpandOnScrollRef:b}=d;if(b?.current&&x){const S=Math.abs(m.current-v.scrollTop);if(S>0){const C=window.innerHeight-Pn*2,k=parseFloat(x.style.minHeight),N=parseFloat(x.style.height),D=Math.max(k,N);if(D<C){const O=D+S,R=Math.min(C,O),L=O-R;x.style.height=R+"px",x.style.bottom==="0px"&&(v.scrollTop=L>0?L:0,x.style.justifyContent="flex-end")}}}m.current=v.scrollTop})})})]})},"SelectViewport")),O_="SelectGroup",[u2,d2]=Oo(O_),dd="SelectItem",[A_,Mg]=Oo(dd),$_=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,value:i,disabled:l=!1,textValue:u,...d}=e,h=Wr(dd,s),m=$o(dd,s),y=h.value===i,[v,x]=f.useState(u??""),[b,S]=f.useState(!1),C=Gt(R=>m.itemRefCallback?.(R,i,l)),k=Ve(o,C),N=yt(),D=f.useRef("touch"),O=qe(()=>{l||(h.onValueChange(i),h.onOpenChange(!1))},"handleSelect");return E.jsx(A_,{scope:s,value:i,disabled:l,textId:N,isSelected:y,onItemTextChange:f.useCallback(R=>{x(L=>L||(R?.textContent??"").trim())},[]),children:E.jsx(ll.ItemSlot,{scope:s,value:i,disabled:l,textValue:v,children:E.jsx(Ae.div,{role:"option","aria-labelledby":N,"data-highlighted":b?"":void 0,"aria-selected":y&&b,"data-state":y?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...d,ref:k,onFocus:pe(d.onFocus,()=>S(!0)),onBlur:pe(d.onBlur,()=>S(!1)),onClick:pe(d.onClick,()=>{D.current!=="mouse"&&O()}),onPointerUp:pe(d.onPointerUp,()=>{D.current==="mouse"&&O()}),onPointerDown:pe(d.onPointerDown,R=>{D.current=R.pointerType}),onPointerMove:pe(d.onPointerMove,R=>{D.current=R.pointerType,l?m.onItemLeave?.():D.current==="mouse"&&R.currentTarget.focus({preventScroll:!0})}),onPointerLeave:pe(d.onPointerLeave,R=>{R.currentTarget===document.activeElement&&m.onItemLeave?.()}),onKeyDown:pe(d.onKeyDown,R=>{l||R.target!==R.currentTarget||m.searchRef?.current!==""&&R.key===" "||(d_.includes(R.key)&&O(),R.key===" "&&R.preventDefault())})})})})},"SelectItem")),ul="SelectItemText",M_=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,className:i,style:l,...u}=e,d=Wr(ul,s),h=$o(ul,s),m=Mg(ul,s),y=m_(ul,s),[v,x]=f.useState(null),b=Gt(O=>h.itemTextRefCallback?.(O,m.value,m.disabled)),S=Ve(o,x,m.onItemTextChange,b),C=v?.textContent,k=f.useMemo(()=>E.jsx("option",{value:m.value,disabled:m.disabled,children:C},m.value),[m.disabled,m.value,C]),{onNativeOptionAdd:N,onNativeOptionRemove:D}=y;return dt(()=>(N(k),()=>D(k)),[N,D,k]),E.jsxs(E.Fragment,{children:[E.jsx(Ae.span,{id:m.textId,...u,ref:S}),m.isSelected&&d.valueNode&&!d.valueNodeHasChildren&&!hi(d.value)?ti.createPortal(u.children,d.valueNode):null]})},"SelectItemText")),j_="SelectItemIndicator",L_=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,...i}=e;return Mg(j_,s).isSelected?E.jsx(Ae.span,{"aria-hidden":!0,...i,ref:o}):null},"SelectItemIndicator")),jg="SelectScrollUpButton",F_=f.forwardRef(qe(function(e,o){const s=$o(jg,e.__scopeSelect),i=ud(jg,e.__scopeSelect),[l,u]=f.useState(!1),d=Ve(o,i.onScrollButtonChange);return dt(()=>{if(s.viewport&&s.isPositioned){let h=function(){const y=m.scrollTop>0;u(y)};qe(h,"handleScroll");const m=s.viewport;return h(),m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[s.viewport,s.isPositioned]),l?E.jsx(Fg,{...e,ref:d,onAutoScroll:()=>{const{viewport:h,selectedItem:m}=s;h&&m&&(h.scrollTop=h.scrollTop-m.offsetHeight)}}):null},"SelectScrollUpButton")),Lg="SelectScrollDownButton",z_=f.forwardRef(qe(function(e,o){const s=$o(Lg,e.__scopeSelect),i=ud(Lg,e.__scopeSelect),[l,u]=f.useState(!1),d=Ve(o,i.onScrollButtonChange);return dt(()=>{if(s.viewport&&s.isPositioned){let h=function(){const y=m.scrollHeight-m.clientHeight,v=Math.ceil(m.scrollTop)<y;u(v)};qe(h,"handleScroll");const m=s.viewport;return h(),m.addEventListener("scroll",h),()=>m.removeEventListener("scroll",h)}},[s.viewport,s.isPositioned]),l?E.jsx(Fg,{...e,ref:d,onAutoScroll:()=>{const{viewport:h,selectedItem:m}=s;h&&m&&(h.scrollTop=h.scrollTop+m.offsetHeight)}}):null},"SelectScrollDownButton")),Fg=f.forwardRef(qe(function(e,o){const{__scopeSelect:s,onAutoScroll:i,...l}=e,u=$o("SelectScrollButton",s),d=f.useRef(null),h=cl(s),m=f.useCallback(()=>{d.current!==null&&(window.clearInterval(d.current),d.current=null)},[]);return f.useEffect(()=>()=>m(),[m]),dt(()=>{h().find(v=>v.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[h]),E.jsx(Ae.div,{"aria-hidden":!0,...l,ref:o,style:{flexShrink:0,...l.style},onPointerDown:pe(l.onPointerDown,()=>{d.current===null&&(d.current=window.setInterval(i,50))}),onPointerMove:pe(l.onPointerMove,()=>{u.onItemLeave?.(),d.current===null&&(d.current=window.setInterval(i,50))}),onPointerLeave:pe(l.onPointerLeave,()=>{m()})})},"SelectScrollButtonImpl")),V_="SelectBubbleInput",U_=f.forwardRef(qe(function({__scopeSelect:e,...o},s){const i=Wr(V_,e),{value:l,onValueChange:u,required:d,disabled:h,name:m,autoComplete:y,form:v}=i,{nativeOptions:x,nativeSelectKey:b}=i,S=f.useRef(null),C=Ve(s,S),k=l??"",N=Rg(k),D=Array.from(x).some(O=>(O.props.value??"")==="");return f.useEffect(()=>{const O=S.current;if(!O)return;const R=window.HTMLSelectElement.prototype,j=Object.getOwnPropertyDescriptor(R,"value").set;if(N!==k&&j){const B=new Event("change",{bubbles:!0});j.call(O,k),O.dispatchEvent(B)}},[N,k]),E.jsxs(Ae.select,{"aria-hidden":!0,required:d,tabIndex:-1,name:m,autoComplete:y,disabled:h,form:v,onChange:O=>u(O.target.value),...o,style:{..._h,...o.style},ref:C,defaultValue:k,children:[hi(l)&&!D?E.jsx("option",{value:""}):null,Array.from(x)]},b)},"SelectBubbleInput"));function zg(n){return typeof n=="function"}qe(zg,"isFunction");function hi(n){return n===""||n===void 0}qe(hi,"shouldShowPlaceholder");function fd(n){const e=Gt(n),o=f.useRef(""),s=f.useRef(0),i=f.useCallback(u=>{const d=o.current+u;e(d),qe((function h(m){o.current=m,window.clearTimeout(s.current),m!==""&&(s.current=window.setTimeout(()=>h(""),1e3))}),"updateSearch")(d)},[e]),l=f.useCallback(()=>{o.current="",window.clearTimeout(s.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(s.current),[]),[o,i,l]}qe(fd,"useTypeaheadSearch");function pd(n,e,o){const i=e.length>1&&Array.from(e).every(m=>m===e[0])?e[0]:e,l=o?n.indexOf(o):-1;let u=Vg(n,Math.max(l,0));i.length===1&&(u=u.filter(m=>m!==o));const h=u.find(m=>m.textValue.toLowerCase().startsWith(i.toLowerCase()));return h!==o?h:void 0}qe(pd,"findNextItem");function Vg(n,e){return n.map((o,s)=>n[(e+s)%n.length])}qe(Vg,"wrapArray");var B_=Object.defineProperty,ws=(n,e)=>B_(n,"name",{value:e,configurable:!0}),hd="Tabs",[H_,f2]=tn(hd,[ol]),Ug=ol(),[W_,md]=H_(hd),K_=f.forwardRef(ws(function(e,o){const{__scopeTabs:s,value:i,onValueChange:l,defaultValue:u,orientation:d="horizontal",dir:h,activationMode:m="automatic",...y}=e,v=ri(h),[x,b]=Un({prop:i,onChange:l,defaultProp:u??"",caller:hd});return E.jsx(W_,{scope:s,baseId:yt(),value:x,onValueChange:b,orientation:d,dir:v,activationMode:m,children:E.jsx(Ae.div,{dir:v,"data-orientation":d,...y,ref:o})})},"Tabs")),G_="TabsList",Z_=f.forwardRef(ws(function(e,o){const{__scopeTabs:s,loop:i=!0,...l}=e,u=md(G_,s),d=Ug(s);return E.jsx(ig,{asChild:!0,...d,orientation:u.orientation,dir:u.dir,loop:i,children:E.jsx(Ae.div,{role:"tablist","aria-orientation":u.orientation,...l,ref:o})})},"TabsList")),q_="TabsTrigger",Y_=f.forwardRef(ws(function(e,o){const{__scopeTabs:s,value:i,disabled:l=!1,...u}=e,d=md(q_,s),h=Ug(s),m=gd(d.baseId,i),y=vd(d.baseId,i),v=i===d.value;return E.jsx(ag,{asChild:!0,...h,focusable:!l,active:v,children:E.jsx(Ae.button,{type:"button",role:"tab","aria-selected":v,"aria-controls":y,"data-state":v?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:m,...u,ref:o,onMouseDown:pe(e.onMouseDown,x=>{!l&&x.button===0&&x.ctrlKey===!1?d.onValueChange(i):x.preventDefault()}),onKeyDown:pe(e.onKeyDown,x=>{l||x.target!==x.currentTarget||[" ","Enter"].includes(x.key)&&d.onValueChange(i)}),onFocus:pe(e.onFocus,()=>{const x=d.activationMode!=="manual";!v&&!l&&x&&d.onValueChange(i)})})})},"TabsTrigger")),Q_="TabsContent",X_=f.forwardRef(ws(function(e,o){const{__scopeTabs:s,value:i,forceMount:l,children:u,...d}=e,h=md(Q_,s),m=gd(h.baseId,i),y=vd(h.baseId,i),v=i===h.value,x=f.useRef(v);return f.useEffect(()=>{const b=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(b)},[]),E.jsx(nn,{present:l||v,children:({present:b})=>E.jsx(Ae.div,{"data-state":v?"active":"inactive","data-orientation":h.orientation,role:"tabpanel","aria-labelledby":m,hidden:!b,id:y,tabIndex:0,...d,ref:o,style:{...e.style,animationDuration:x.current?"0s":void 0},children:b&&u})})},"TabsContent"));function gd(n,e){return`${n}-trigger-${e}`}ws(gd,"makeTriggerId");function vd(n,e){return`${n}-content-${e}`}ws(vd,"makeContentId");var J_=K_,eP=Z_,tP=Y_,nP=X_,rP=Object.defineProperty,St=(n,e)=>rP(n,"name",{value:e,configurable:!0}),[yd,p2]=tn("Tooltip",[Ur]),dl=Ur(),oP="TooltipProvider",sP=700,xd="tooltip.open",[iP,wd]=yd(oP),aP=St(n=>{const{__scopeTooltip:e,delayDuration:o=sP,skipDelayDuration:s=300,disableHoverableContent:i=!1,children:l}=n,u=f.useRef(!0),d=f.useRef(!1),h=f.useRef(0);return f.useEffect(()=>{const m=h.current;return()=>window.clearTimeout(m)},[]),E.jsx(iP,{scope:e,isOpenDelayedRef:u,delayDuration:o,onOpen:f.useCallback(()=>{s<=0||(window.clearTimeout(h.current),u.current=!1)},[s]),onClose:f.useCallback(()=>{s<=0||(window.clearTimeout(h.current),h.current=window.setTimeout(()=>u.current=!0,s))},[s]),isPointerInTransitRef:d,onPointerInTransitChange:f.useCallback(m=>{d.current=m},[]),disableHoverableContent:i,children:l})},"TooltipProvider"),bd="Tooltip",[lP,mi]=yd(bd),cP=St(n=>{const{__scopeTooltip:e,children:o,open:s,defaultOpen:i,onOpenChange:l,disableHoverableContent:u,delayDuration:d}=n,h=wd(bd,n.__scopeTooltip),m=dl(e),[y,v]=f.useState(null),[x,b]=f.useState(void 0),S=yt(),C=f.useRef(0),k=u??h.disableHoverableContent,N=d??h.delayDuration,D=f.useRef(!1),[O,R]=Un({prop:s,defaultProp:i??!1,onChange:St(ae=>{ae?(h.onOpen(),document.dispatchEvent(new CustomEvent(xd))):h.onClose(),l?.(ae)},"onChange"),caller:bd}),L=f.useMemo(()=>O?D.current?"delayed-open":"instant-open":"closed",[O]),j=f.useCallback(()=>{window.clearTimeout(C.current),C.current=0,D.current=!1,R(!0)},[R]),B=f.useCallback(()=>{window.clearTimeout(C.current),C.current=0,R(!1)},[R]),I=f.useCallback(()=>{window.clearTimeout(C.current),C.current=window.setTimeout(()=>{D.current=!0,R(!0),C.current=0},N)},[N,R]);f.useEffect(()=>()=>{C.current&&(window.clearTimeout(C.current),C.current=0)},[]);const K=x??S;return E.jsx(ui,{...m,children:E.jsx(lP,{scope:e,contentId:K,setContentId:b,open:O,stateAttribute:L,trigger:y,onTriggerChange:v,onTriggerEnter:f.useCallback(()=>{h.isOpenDelayedRef.current?I():j()},[h.isOpenDelayedRef,I,j]),onTriggerLeave:f.useCallback(()=>{k?B():(window.clearTimeout(C.current),C.current=0)},[B,k]),onOpen:j,onClose:B,disableHoverableContent:k,children:o})})},"Tooltip"),Bg="TooltipTrigger",uP=f.forwardRef(St(function(e,o){const{__scopeTooltip:s,...i}=e,l=mi(Bg,s),u=wd(Bg,s),d=dl(s),h=f.useRef(null),m=Ve(o,h,l.onTriggerChange),y=f.useRef(!1),v=f.useRef(!1),x=f.useCallback(()=>y.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",x),[x]),E.jsx(tl,{asChild:!0,...d,children:E.jsx(Ae.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...i,ref:m,onPointerMove:pe(e.onPointerMove,b=>{b.pointerType!=="touch"&&!v.current&&!u.isPointerInTransitRef.current&&(l.onTriggerEnter(),v.current=!0)}),onPointerLeave:pe(e.onPointerLeave,()=>{l.onTriggerLeave(),v.current=!1}),onPointerDown:pe(e.onPointerDown,()=>{l.open&&l.onClose(),y.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:pe(e.onFocus,()=>{y.current||l.onOpen()}),onBlur:pe(e.onBlur,l.onClose),onClick:pe(e.onClick,l.onClose)})})},"TooltipTrigger")),Hg="TooltipPortal",[dP,fP]=yd(Hg,{forceMount:void 0}),pP=St(n=>{const{__scopeTooltip:e,forceMount:o,children:s,container:i}=n,l=mi(Hg,e);return E.jsx(dP,{scope:e,forceMount:o,children:E.jsx(nn,{present:o||l.open,children:E.jsx(si,{asChild:!0,container:i,children:s})})})},"TooltipPortal"),gi="TooltipContent",hP=f.forwardRef(St(function(e,o){const s=fP(gi,e.__scopeTooltip),{forceMount:i=s.forceMount,side:l="top",...u}=e,d=mi(gi,e.__scopeTooltip);return E.jsx(nn,{present:i||d.open,children:d.disableHoverableContent?E.jsx(Wg,{side:l,...u,ref:o}):E.jsx(mP,{side:l,...u,ref:o})})},"TooltipContent")),mP=f.forwardRef(St(function(e,o){const s=mi(gi,e.__scopeTooltip),i=wd(gi,e.__scopeTooltip),l=f.useRef(null),u=Ve(o,l),[d,h]=f.useState(null),{trigger:m,onClose:y}=s,v=l.current,{onPointerInTransitChange:x}=i,b=f.useCallback(()=>{h(null),x(!1)},[x]),S=f.useCallback((C,k)=>{const N=C.currentTarget,D={x:C.clientX,y:C.clientY},O=Kg(D,N.getBoundingClientRect()),R=Gg(D,O),L=Zg(k.getBoundingClientRect()),j=Yg([...R,...L]);h(j),x(!0)},[x]);return f.useEffect(()=>()=>b(),[b]),f.useEffect(()=>{if(m&&v){const C=St(N=>S(N,v),"handleTriggerLeave"),k=St(N=>S(N,m),"handleContentLeave");return m.addEventListener("pointerleave",C),v.addEventListener("pointerleave",k),()=>{m.removeEventListener("pointerleave",C),v.removeEventListener("pointerleave",k)}}},[m,v,S,b]),f.useEffect(()=>{if(d){const C=St(k=>{const N=k.target,D={x:k.clientX,y:k.clientY},O=m?.contains(N)||v?.contains(N),R=!qg(D,d);O?b():R&&(b(),y())},"handleTrackPointerGrace");return document.addEventListener("pointermove",C),()=>document.removeEventListener("pointermove",C)}},[m,v,d,y,b]),E.jsx(Wg,{...e,ref:u})},"TooltipContentHoverable")),gP=bh("TooltipContent"),Wg=f.forwardRef(St(function(e,o){const{__scopeTooltip:s,children:i,"aria-label":l,id:u,onEscapeKeyDown:d,onPointerDownOutside:h,...m}=e,y=mi(gi,s),v=dl(s),{onClose:x}=y;f.useEffect(()=>(document.addEventListener(xd,x),()=>document.removeEventListener(xd,x)),[x]),f.useEffect(()=>{if(y.trigger){const S=St(C=>{C.target instanceof Node&&C.target.contains(y.trigger)&&x()},"handleScroll");return window.addEventListener("scroll",S,{capture:!0}),()=>window.removeEventListener("scroll",S,{capture:!0})}},[y.trigger,x]);const{setContentId:b}=y;return dt(()=>(b(u),()=>{b(void 0)}),[u,b]),E.jsx(oi,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:d,onPointerDownOutside:h,onFocusOutside:S=>S.preventDefault(),onDismiss:x,children:E.jsxs(nl,{"data-state":y.stateAttribute,role:l?void 0:"tooltip",id:l?void 0:y.contentId,...v,...m,ref:o,style:{...m.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[E.jsx(gP,{children:i}),l?E.jsx(Bb,{id:y.contentId,role:"tooltip",children:l}):null]})})},"TooltipContentImpl")),vP=f.forwardRef(St(function(e,o){const{__scopeTooltip:s,...i}=e,l=dl(s);return E.jsx(ak,{...l,...i,ref:o})},"TooltipArrow"));function Kg(n,e){const o=Math.abs(e.top-n.y),s=Math.abs(e.bottom-n.y),i=Math.abs(e.right-n.x),l=Math.abs(e.left-n.x);switch(Math.min(o,s,i,l)){case l:return"left";case i:return"right";case o:return"top";case s:return"bottom";default:throw new Error("unreachable")}}St(Kg,"getExitSideFromRect");function Gg(n,e,o=5){const s=[];switch(e){case"top":s.push({x:n.x-o,y:n.y+o},{x:n.x+o,y:n.y+o});break;case"bottom":s.push({x:n.x-o,y:n.y-o},{x:n.x+o,y:n.y-o});break;case"left":s.push({x:n.x+o,y:n.y-o},{x:n.x+o,y:n.y+o});break;case"right":s.push({x:n.x-o,y:n.y-o},{x:n.x-o,y:n.y+o});break}return s}St(Gg,"getPaddedExitPoints");function Zg(n){const{top:e,right:o,bottom:s,left:i}=n;return[{x:i,y:e},{x:o,y:e},{x:o,y:s},{x:i,y:s}]}St(Zg,"getPointsFromRect");function qg(n,e){const{x:o,y:s}=n;let i=!1;for(let l=0,u=e.length-1;l<e.length;u=l++){const d=e[l],h=e[u],m=d.x,y=d.y,v=h.x,x=h.y;y>s!=x>s&&o<(v-m)*(s-y)/(x-y)+m&&(i=!i)}return i}St(qg,"isPointInPolygon");function Yg(n){const e=n.slice();return e.sort((o,s)=>o.x<s.x?-1:o.x>s.x?1:o.y<s.y?-1:o.y>s.y?1:0),Qg(e)}St(Yg,"getHull");function Qg(n){if(n.length<=1)return n.slice();const e=[];for(let s=0;s<n.length;s++){const i=n[s];for(;e.length>=2;){const l=e[e.length-1],u=e[e.length-2];if((l.x-u.x)*(i.y-u.y)>=(l.y-u.y)*(i.x-u.x))e.pop();else break}e.push(i)}e.pop();const o=[];for(let s=n.length-1;s>=0;s--){const i=n[s];for(;o.length>=2;){const l=o[o.length-1],u=o[o.length-2];if((l.x-u.x)*(i.y-u.y)>=(l.y-u.y)*(i.x-u.x))o.pop();else break}o.push(i)}return o.pop(),e.length===1&&o.length===1&&e[0].x===o[0].x&&e[0].y===o[0].y?e:e.concat(o)}St(Qg,"getHullPresorted");var yP=aP,xP=cP,wP=uP,bP=pP,SP=hP,CP=vP;const Xg=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Jg=Bp,fl=(n,e)=>o=>{var s;if(e?.variants==null)return Jg(n,o?.class,o?.className);const{variants:i,defaultVariants:l}=e,u=Object.keys(i).map(m=>{const y=o?.[m],v=l?.[m];if(y===null)return null;const x=Xg(y)||Xg(v);return i[m][x]}),d=o&&Object.entries(o).reduce((m,y)=>{let[v,x]=y;return x===void 0||(m[v]=x),m},{}),h=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((m,y)=>{let{class:v,className:x,...b}=y;return Object.entries(b).every(S=>{let[C,k]=S;return Array.isArray(k)?k.includes({...l,...d}[C]):{...l,...d}[C]===k})?[...m,v,x]:m},[]);return Jg(n,u,h,o?.class,o?.className)};var ev=1,kP=.9,EP=.8,_P=.17,Sd=.1,Cd=.999,PP=.9999,RP=.99,IP=/[\\\/_+.#"@\[\(\{&]/,TP=/[\\\/_+.#"@\[\(\{&]/g,DP=/[\s-]/,tv=/[\s-]/g;function kd(n,e,o,s,i,l,u){if(l===e.length)return i===n.length?ev:RP;var d=`${i},${l}`;if(u[d]!==void 0)return u[d];for(var h=s.charAt(l),m=o.indexOf(h,i),y=0,v,x,b,S;m>=0;)v=kd(n,e,o,s,m+1,l+1,u),v>y&&(m===i?v*=ev:IP.test(n.charAt(m-1))?(v*=EP,b=n.slice(i,m-1).match(TP),b&&i>0&&(v*=Math.pow(Cd,b.length))):DP.test(n.charAt(m-1))?(v*=kP,S=n.slice(i,m-1).match(tv),S&&i>0&&(v*=Math.pow(Cd,S.length))):(v*=_P,i>0&&(v*=Math.pow(Cd,m-i))),n.charAt(m)!==e.charAt(l)&&(v*=PP)),(v<Sd&&o.charAt(m-1)===s.charAt(l+1)||s.charAt(l+1)===s.charAt(l)&&o.charAt(m-1)!==s.charAt(l))&&(x=kd(n,e,o,s,m+1,l+2,u),x*Sd>v&&(v=x*Sd)),v>y&&(y=v),m=o.indexOf(h,m+1);return u[d]=y,y}function nv(n){return n.toLowerCase().replace(tv," ")}function NP(n,e,o){return n=o&&o.length>0?`${n+" "+o.join(" ")}`:n,kd(n,e,nv(n),nv(e),0,0,{})}var vi='[cmdk-group=""]',Ed='[cmdk-group-items=""]',OP='[cmdk-group-heading=""]',rv='[cmdk-item=""]',ov=`${rv}:not([aria-disabled="true"])`,_d="cmdk-item-select",bs="data-value",AP=(n,e,o)=>NP(n,e,o),sv=f.createContext(void 0),yi=()=>f.useContext(sv),iv=f.createContext(void 0),Pd=()=>f.useContext(iv),av=f.createContext(void 0),lv=f.forwardRef((n,e)=>{let o=Ss(()=>{var P,W;return{search:"",value:(W=(P=n.value)!=null?P:n.defaultValue)!=null?W:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),s=Ss(()=>new Set),i=Ss(()=>new Map),l=Ss(()=>new Map),u=Ss(()=>new Set),d=cv(n),{label:h,children:m,value:y,onValueChange:v,filter:x,shouldFilter:b,loop:S,disablePointerSelection:C=!1,vimBindings:k=!0,...N}=n,D=yt(),O=yt(),R=yt(),L=f.useRef(null),j=WP();Mo(()=>{if(y!==void 0){let P=y.trim();o.current.value=P,B.emit()}},[y]),Mo(()=>{j(6,ce)},[]);let B=f.useMemo(()=>({subscribe:P=>(u.current.add(P),()=>u.current.delete(P)),snapshot:()=>o.current,setState:(P,W,Z)=>{var H,re,de,Y;if(!Object.is(o.current[P],W)){if(o.current[P]=W,P==="search")le(),ae(),j(1,be);else if(P==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let se=document.getElementById(R);se?se.focus():(H=document.getElementById(D))==null||H.focus()}if(j(7,()=>{var se;o.current.selectedItemId=(se=ue())==null?void 0:se.id,B.emit()}),Z||j(5,ce),((re=d.current)==null?void 0:re.value)!==void 0){let se=W??"";(Y=(de=d.current).onValueChange)==null||Y.call(de,se);return}}B.emit()}},emit:()=>{u.current.forEach(P=>P())}}),[]),I=f.useMemo(()=>({value:(P,W,Z)=>{var H;W!==((H=l.current.get(P))==null?void 0:H.value)&&(l.current.set(P,{value:W,keywords:Z}),o.current.filtered.items.set(P,K(W,Z)),j(2,()=>{ae(),B.emit()}))},item:(P,W)=>(s.current.add(P),W&&(i.current.has(W)?i.current.get(W).add(P):i.current.set(W,new Set([P]))),j(3,()=>{le(),ae(),o.current.value||be(),B.emit()}),()=>{l.current.delete(P),s.current.delete(P),o.current.filtered.items.delete(P);let Z=ue();j(4,()=>{le(),Z?.getAttribute("id")===P&&be(),B.emit()})}),group:P=>(i.current.has(P)||i.current.set(P,new Set),()=>{l.current.delete(P),i.current.delete(P)}),filter:()=>d.current.shouldFilter,label:h||n["aria-label"],getDisablePointerSelection:()=>d.current.disablePointerSelection,listId:D,inputId:R,labelId:O,listInnerRef:L}),[]);function K(P,W){var Z,H;let re=(H=(Z=d.current)==null?void 0:Z.filter)!=null?H:AP;return P?re(P,o.current.search,W):0}function ae(){if(!o.current.search||d.current.shouldFilter===!1)return;let P=o.current.filtered.items,W=[];o.current.filtered.groups.forEach(H=>{let re=i.current.get(H),de=0;re.forEach(Y=>{let se=P.get(Y);de=Math.max(se,de)}),W.push([H,de])});let Z=L.current;Se().sort((H,re)=>{var de,Y;let se=H.getAttribute("id"),Oe=re.getAttribute("id");return((de=P.get(Oe))!=null?de:0)-((Y=P.get(se))!=null?Y:0)}).forEach(H=>{let re=H.closest(Ed);re?re.appendChild(H.parentElement===re?H:H.closest(`${Ed} > *`)):Z.appendChild(H.parentElement===Z?H:H.closest(`${Ed} > *`))}),W.sort((H,re)=>re[1]-H[1]).forEach(H=>{var re;let de=(re=L.current)==null?void 0:re.querySelector(`${vi}[${bs}="${encodeURIComponent(H[0])}"]`);de?.parentElement.appendChild(de)})}function be(){let P=Se().find(Z=>Z.getAttribute("aria-disabled")!=="true"),W=P?.getAttribute(bs);B.setState("value",W||void 0)}function le(){var P,W,Z,H;if(!o.current.search||d.current.shouldFilter===!1){o.current.filtered.count=s.current.size;return}o.current.filtered.groups=new Set;let re=0;for(let de of s.current){let Y=(W=(P=l.current.get(de))==null?void 0:P.value)!=null?W:"",se=(H=(Z=l.current.get(de))==null?void 0:Z.keywords)!=null?H:[],Oe=K(Y,se);o.current.filtered.items.set(de,Oe),Oe>0&&re++}for(let[de,Y]of i.current)for(let se of Y)if(o.current.filtered.items.get(se)>0){o.current.filtered.groups.add(de);break}o.current.filtered.count=re}function ce(){var P,W,Z;let H=ue();H&&(((P=H.parentElement)==null?void 0:P.firstChild)===H&&((Z=(W=H.closest(vi))==null?void 0:W.querySelector(OP))==null||Z.scrollIntoView({block:"nearest"})),H.scrollIntoView({block:"nearest"}))}function ue(){var P;return(P=L.current)==null?void 0:P.querySelector(`${rv}[aria-selected="true"]`)}function Se(){var P;return Array.from(((P=L.current)==null?void 0:P.querySelectorAll(ov))||[])}function q(P){let W=Se()[P];W&&B.setState("value",W.getAttribute(bs))}function ne(P){var W;let Z=ue(),H=Se(),re=H.findIndex(Y=>Y===Z),de=H[re+P];(W=d.current)!=null&&W.loop&&(de=re+P<0?H[H.length-1]:re+P===H.length?H[0]:H[re+P]),de&&B.setState("value",de.getAttribute(bs))}function U(P){let W=ue(),Z=W?.closest(vi),H;for(;Z&&!H;)Z=P>0?BP(Z,vi):HP(Z,vi),H=Z?.querySelector(ov);H?B.setState("value",H.getAttribute(bs)):ne(P)}let Q=()=>q(Se().length-1),M=P=>{P.preventDefault(),P.metaKey?Q():P.altKey?U(1):ne(1)},T=P=>{P.preventDefault(),P.metaKey?q(0):P.altKey?U(-1):ne(-1)};return f.createElement(Ae.div,{ref:e,tabIndex:-1,...N,"cmdk-root":"",onKeyDown:P=>{var W;(W=N.onKeyDown)==null||W.call(N,P);let Z=P.nativeEvent.isComposing||P.keyCode===229;if(!(P.defaultPrevented||Z))switch(P.key){case"n":case"j":{k&&P.ctrlKey&&M(P);break}case"ArrowDown":{M(P);break}case"p":case"k":{k&&P.ctrlKey&&T(P);break}case"ArrowUp":{T(P);break}case"Home":{P.preventDefault(),q(0);break}case"End":{P.preventDefault(),Q();break}case"Enter":{P.preventDefault();let H=ue();if(H){let re=new Event(_d);H.dispatchEvent(re)}}}}},f.createElement("label",{"cmdk-label":"",htmlFor:I.inputId,id:I.labelId,style:GP},h),hl(n,P=>f.createElement(iv.Provider,{value:B},f.createElement(sv.Provider,{value:I},P))))}),$P=f.forwardRef((n,e)=>{var o,s;let i=yt(),l=f.useRef(null),u=f.useContext(av),d=yi(),h=cv(n),m=(s=(o=h.current)==null?void 0:o.forceMount)!=null?s:u?.forceMount;Mo(()=>{if(!m)return d.item(i,u?.id)},[m]);let y=uv(i,l,[n.value,n.children,l],n.keywords),v=Pd(),x=Kr(j=>j.value&&j.value===y.current),b=Kr(j=>m||d.filter()===!1?!0:j.search?j.filtered.items.get(i)>0:!0);f.useEffect(()=>{let j=l.current;if(!(!j||n.disabled))return j.addEventListener(_d,S),()=>j.removeEventListener(_d,S)},[b,n.onSelect,n.disabled]);function S(){var j,B;C(),(B=(j=h.current).onSelect)==null||B.call(j,y.current)}function C(){v.setState("value",y.current,!0)}if(!b)return null;let{disabled:k,value:N,onSelect:D,forceMount:O,keywords:R,...L}=n;return f.createElement(Ae.div,{ref:Po(l,e),...L,id:i,"cmdk-item":"",role:"option","aria-disabled":!!k,"aria-selected":!!x,"data-disabled":!!k,"data-selected":!!x,onPointerMove:k||d.getDisablePointerSelection()?void 0:C,onClick:k?void 0:S},n.children)}),MP=f.forwardRef((n,e)=>{let{heading:o,children:s,forceMount:i,...l}=n,u=yt(),d=f.useRef(null),h=f.useRef(null),m=yt(),y=yi(),v=Kr(b=>i||y.filter()===!1?!0:b.search?b.filtered.groups.has(u):!0);Mo(()=>y.group(u),[]),uv(u,d,[n.value,n.heading,h]);let x=f.useMemo(()=>({id:u,forceMount:i}),[i]);return f.createElement(Ae.div,{ref:Po(d,e),...l,"cmdk-group":"",role:"presentation",hidden:v?void 0:!0},o&&f.createElement("div",{ref:h,"cmdk-group-heading":"","aria-hidden":!0,id:m},o),hl(n,b=>f.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":o?m:void 0},f.createElement(av.Provider,{value:x},b))))}),jP=f.forwardRef((n,e)=>{let{alwaysRender:o,...s}=n,i=f.useRef(null),l=Kr(u=>!u.search);return!o&&!l?null:f.createElement(Ae.div,{ref:Po(i,e),...s,"cmdk-separator":"",role:"separator"})}),LP=f.forwardRef((n,e)=>{let{onValueChange:o,...s}=n,i=n.value!=null,l=Pd(),u=Kr(m=>m.search),d=Kr(m=>m.selectedItemId),h=yi();return f.useEffect(()=>{n.value!=null&&l.setState("search",n.value)},[n.value]),f.createElement(Ae.input,{ref:e,...s,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":h.listId,"aria-labelledby":h.labelId,"aria-activedescendant":d,id:h.inputId,type:"text",value:i?n.value:u,onChange:m=>{i||l.setState("search",m.target.value),o?.(m.target.value)}})}),FP=f.forwardRef((n,e)=>{let{children:o,label:s="Suggestions",...i}=n,l=f.useRef(null),u=f.useRef(null),d=Kr(m=>m.selectedItemId),h=yi();return f.useEffect(()=>{if(u.current&&l.current){let m=u.current,y=l.current,v,x=new ResizeObserver(()=>{v=requestAnimationFrame(()=>{let b=m.offsetHeight;y.style.setProperty("--cmdk-list-height",b.toFixed(1)+"px")})});return x.observe(m),()=>{cancelAnimationFrame(v),x.unobserve(m)}}},[]),f.createElement(Ae.div,{ref:Po(l,e),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":d,"aria-label":s,id:h.listId},hl(n,m=>f.createElement("div",{ref:Po(u,h.listInnerRef),"cmdk-list-sizer":""},m)))}),zP=f.forwardRef((n,e)=>{let{open:o,onOpenChange:s,overlayClassName:i,contentClassName:l,container:u,...d}=n;return f.createElement(Tu,{open:o,onOpenChange:s},f.createElement(Du,{container:u},f.createElement(Ou,{"cmdk-overlay":"",className:i}),f.createElement(Au,{"aria-label":n.label,"cmdk-dialog":"",className:l},f.createElement(lv,{ref:e,...d}))))}),VP=f.forwardRef((n,e)=>Kr(o=>o.filtered.count===0)?f.createElement(Ae.div,{ref:e,...n,"cmdk-empty":"",role:"presentation"}):null),UP=f.forwardRef((n,e)=>{let{progress:o,children:s,label:i="Loading...",...l}=n;return f.createElement(Ae.div,{ref:e,...l,"cmdk-loading":"",role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},hl(n,u=>f.createElement("div",{"aria-hidden":!0},u)))}),pl=Object.assign(lv,{List:FP,Item:$P,Input:LP,Group:MP,Separator:jP,Dialog:zP,Empty:VP,Loading:UP});function BP(n,e){let o=n.nextElementSibling;for(;o;){if(o.matches(e))return o;o=o.nextElementSibling}}function HP(n,e){let o=n.previousElementSibling;for(;o;){if(o.matches(e))return o;o=o.previousElementSibling}}function cv(n){let e=f.useRef(n);return Mo(()=>{e.current=n}),e}var Mo=typeof window>"u"?f.useEffect:f.useLayoutEffect;function Ss(n){let e=f.useRef();return e.current===void 0&&(e.current=n()),e}function Kr(n){let e=Pd(),o=()=>n(e.snapshot());return f.useSyncExternalStore(e.subscribe,o,o)}function uv(n,e,o,s=[]){let i=f.useRef(),l=yi();return Mo(()=>{var u;let d=(()=>{var m;for(let y of o){if(typeof y=="string")return y.trim();if(typeof y=="object"&&"current"in y)return y.current?(m=y.current.textContent)==null?void 0:m.trim():i.current}})(),h=s.map(m=>m.trim());l.value(n,d,h),(u=e.current)==null||u.setAttribute(bs,d),i.current=d}),i}var WP=()=>{let[n,e]=f.useState(),o=Ss(()=>new Map);return Mo(()=>{o.current.forEach(s=>s()),o.current=new Map},[n]),(s,i)=>{o.current.set(s,i),e({})}};function KP(n){let e=n.type;return typeof e=="function"?e(n.props):"render"in e?e.render(n.props):n}function hl({asChild:n,children:e},o){return n&&f.isValidElement(e)?f.cloneElement(KP(e),{ref:e.ref},o(e.props.children)):o(e)}var GP={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Ne=n=>typeof n=="string",xi=()=>{let n,e;const o=new Promise((s,i)=>{n=s,e=i});return o.resolve=n,o.reject=e,o},dv=n=>n==null?"":""+n,ZP=(n,e,o)=>{n.forEach(s=>{e[s]&&(o[s]=e[s])})},qP=/###/g,fv=n=>n&&n.indexOf("###")>-1?n.replace(qP,"."):n,pv=n=>!n||Ne(n),wi=(n,e,o)=>{const s=Ne(e)?e.split("."):e;let i=0;for(;i<s.length-1;){if(pv(n))return{};const l=fv(s[i]);!n[l]&&o&&(n[l]=new o),Object.prototype.hasOwnProperty.call(n,l)?n=n[l]:n={},++i}return pv(n)?{}:{obj:n,k:fv(s[i])}},hv=(n,e,o)=>{const{obj:s,k:i}=wi(n,e,Object);if(s!==void 0||e.length===1){s[i]=o;return}let l=e[e.length-1],u=e.slice(0,e.length-1),d=wi(n,u,Object);for(;d.obj===void 0&&u.length;)l=`${u[u.length-1]}.${l}`,u=u.slice(0,u.length-1),d=wi(n,u,Object),d?.obj&&typeof d.obj[`${d.k}.${l}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${l}`]=o},YP=(n,e,o,s)=>{const{obj:i,k:l}=wi(n,e,Object);i[l]=i[l]||[],i[l].push(o)},ml=(n,e)=>{const{obj:o,k:s}=wi(n,e);if(o&&Object.prototype.hasOwnProperty.call(o,s))return o[s]},QP=(n,e,o)=>{const s=ml(n,o);return s!==void 0?s:ml(e,o)},mv=(n,e,o)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in n?Ne(n[s])||n[s]instanceof String||Ne(e[s])||e[s]instanceof String?o&&(n[s]=e[s]):mv(n[s],e[s],o):n[s]=e[s]);return n},Cs=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var XP={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const JP=n=>Ne(n)?n.replace(/[&<>"'\/]/g,e=>XP[e]):n;class eR{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const o=this.regExpMap.get(e);if(o!==void 0)return o;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}const tR=[" ",",","?","!",";"],nR=new eR(20),rR=(n,e,o)=>{e=e||"",o=o||"";const s=tR.filter(u=>e.indexOf(u)<0&&o.indexOf(u)<0);if(s.length===0)return!0;const i=nR.getRegExp(`(${s.map(u=>u==="?"?"\\?":u).join("|")})`);let l=!i.test(n);if(!l){const u=n.indexOf(o);u>0&&!i.test(n.substring(0,u))&&(l=!0)}return l},Rd=(n,e,o=".")=>{if(!n)return;if(n[e])return Object.prototype.hasOwnProperty.call(n,e)?n[e]:void 0;const s=e.split(o);let i=n;for(let l=0;l<s.length;){if(!i||typeof i!="object")return;let u,d="";for(let h=l;h<s.length;++h)if(h!==l&&(d+=o),d+=s[h],u=i[d],u!==void 0){if(["string","number","boolean"].indexOf(typeof u)>-1&&h<s.length-1)continue;l+=h-l+1;break}i=u}return i},bi=n=>n?.replace("_","-"),oR={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){console?.[n]?.apply?.(console,e)}};class gl{constructor(e,o={}){this.init(e,o)}init(e,o={}){this.prefix=o.prefix||"i18next:",this.logger=e||oR,this.options=o,this.debug=o.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,o,s,i){return i&&!this.debug?null:(Ne(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[o](e))}create(e){return new gl(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new gl(this.logger,e)}}var Gn=new gl;class vl{constructor(){this.observers={}}on(e,o){return e.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const i=this.observers[s].get(o)||0;this.observers[s].set(o,i+1)}),this}off(e,o){if(this.observers[e]){if(!o){delete this.observers[e];return}this.observers[e].delete(o)}}emit(e,...o){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([i,l])=>{for(let u=0;u<l;u++)i(...o)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,l])=>{for(let u=0;u<l;u++)i.apply(i,[e,...o])})}}class gv extends vl{constructor(e,o={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=o,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const o=this.options.ns.indexOf(e);o>-1&&this.options.ns.splice(o,1)}getResource(e,o,s,i={}){const l=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,u=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;e.indexOf(".")>-1?d=e.split("."):(d=[e,o],s&&(Array.isArray(s)?d.push(...s):Ne(s)&&l?d.push(...s.split(l)):d.push(s)));const h=ml(this.data,d);return!h&&!o&&!s&&e.indexOf(".")>-1&&(e=d[0],o=d[1],s=d.slice(2).join(".")),h||!u||!Ne(s)?h:Rd(this.data?.[e]?.[o],s,l)}addResource(e,o,s,i,l={silent:!1}){const u=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let d=[e,o];s&&(d=d.concat(u?s.split(u):s)),e.indexOf(".")>-1&&(d=e.split("."),i=o,o=d[1]),this.addNamespaces(o),hv(this.data,d,i),l.silent||this.emit("added",e,o,s,i)}addResources(e,o,s,i={silent:!1}){for(const l in s)(Ne(s[l])||Array.isArray(s[l]))&&this.addResource(e,o,l,s[l],{silent:!0});i.silent||this.emit("added",e,o,s)}addResourceBundle(e,o,s,i,l,u={silent:!1,skipCopy:!1}){let d=[e,o];e.indexOf(".")>-1&&(d=e.split("."),i=s,s=o,o=d[1]),this.addNamespaces(o);let h=ml(this.data,d)||{};u.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?mv(h,s,l):h={...h,...s},hv(this.data,d,h),u.silent||this.emit("added",e,o,s)}removeResourceBundle(e,o){this.hasResourceBundle(e,o)&&delete this.data[e][o],this.removeNamespaces(o),this.emit("removed",e,o)}hasResourceBundle(e,o){return this.getResource(e,o)!==void 0}getResourceBundle(e,o){return o||(o=this.options.defaultNS),this.getResource(e,o)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const o=this.getDataByLanguage(e);return!!(o&&Object.keys(o)||[]).find(i=>o[i]&&Object.keys(o[i]).length>0)}toJSON(){return this.data}}var vv={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,o,s,i){return n.forEach(l=>{e=this.processors[l]?.process(e,o,s,i)??e}),e}};const yv=Symbol("i18next/PATH_KEY");function sR(){const n=[],e=Object.create(null);let o;return e.get=(s,i)=>(o?.revoke?.(),i===yv?n:(n.push(i),o=Proxy.revocable(s,e),o.proxy)),Proxy.revocable(Object.create(null),e).proxy}function Id(n,e){const{[yv]:o}=n(sR());return o.join(e?.keySeparator??".")}const xv={},Td=n=>!Ne(n)&&typeof n!="boolean"&&typeof n!="number";class yl extends vl{constructor(e,o={}){super(),ZP(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=o,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Gn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,o={interpolation:{}}){const s={...o};if(e==null)return!1;const i=this.resolve(e,s);if(i?.res===void 0)return!1;const l=Td(i.res);return!(s.returnObjects===!1&&l)}extractFromKey(e,o){let s=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let l=o.ns||this.options.defaultNS||[];const u=s&&e.indexOf(s)>-1,d=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!rR(e,s,i);if(u&&!d){const h=e.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:e,namespaces:Ne(l)?[l]:l};const m=e.split(s);(s!==i||s===i&&this.options.ns.indexOf(m[0])>-1)&&(l=m.shift()),e=m.join(i)}return{key:e,namespaces:Ne(l)?[l]:l}}translate(e,o,s){let i=typeof o=="object"?{...o}:o;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),e==null)return"";typeof e=="function"&&(e=Id(e,{...this.options,...i})),Array.isArray(e)||(e=[String(e)]);const l=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,u=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:d,namespaces:h}=this.extractFromKey(e[e.length-1],i),m=h[h.length-1];let y=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;y===void 0&&(y=":");const v=i.lng||this.language,x=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(v?.toLowerCase()==="cimode")return x?l?{res:`${m}${y}${d}`,usedKey:d,exactUsedKey:d,usedLng:v,usedNS:m,usedParams:this.getUsedParamsDetails(i)}:`${m}${y}${d}`:l?{res:d,usedKey:d,exactUsedKey:d,usedLng:v,usedNS:m,usedParams:this.getUsedParamsDetails(i)}:d;const b=this.resolve(e,i);let S=b?.res;const C=b?.usedKey||d,k=b?.exactUsedKey||d,N=["[object Number]","[object Function]","[object RegExp]"],D=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,O=!this.i18nFormat||this.i18nFormat.handleAsObject,R=i.count!==void 0&&!Ne(i.count),L=yl.hasDefaultValue(i),j=R?this.pluralResolver.getSuffix(v,i.count,i):"",B=i.ordinal&&R?this.pluralResolver.getSuffix(v,i.count,{ordinal:!1}):"",I=R&&!i.ordinal&&i.count===0,K=I&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${j}`]||i[`defaultValue${B}`]||i.defaultValue;let ae=S;O&&!S&&L&&(ae=K);const be=Td(ae),le=Object.prototype.toString.apply(ae);if(O&&ae&&be&&N.indexOf(le)<0&&!(Ne(D)&&Array.isArray(ae))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ce=this.options.returnedObjectHandler?this.options.returnedObjectHandler(C,ae,{...i,ns:h}):`key '${d} (${this.language})' returned an object instead of string.`;return l?(b.res=ce,b.usedParams=this.getUsedParamsDetails(i),b):ce}if(u){const ce=Array.isArray(ae),ue=ce?[]:{},Se=ce?k:C;for(const q in ae)if(Object.prototype.hasOwnProperty.call(ae,q)){const ne=`${Se}${u}${q}`;L&&!S?ue[q]=this.translate(ne,{...i,defaultValue:Td(K)?K[q]:void 0,joinArrays:!1,ns:h}):ue[q]=this.translate(ne,{...i,joinArrays:!1,ns:h}),ue[q]===ne&&(ue[q]=ae[q])}S=ue}}else if(O&&Ne(D)&&Array.isArray(S))S=S.join(D),S&&(S=this.extendTranslation(S,e,i,s));else{let ce=!1,ue=!1;!this.isValidLookup(S)&&L&&(ce=!0,S=K),this.isValidLookup(S)||(ue=!0,S=d);const q=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ue?void 0:S,ne=L&&K!==S&&this.options.updateMissing;if(ue||ce||ne){if(this.logger.log(ne?"updateKey":"missingKey",v,m,d,ne?K:S),u){const T=this.resolve(d,{...i,keySeparator:!1});T&&T.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const Q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Q&&Q[0])for(let T=0;T<Q.length;T++)U.push(Q[T]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(i.lng||this.language):U.push(i.lng||this.language);const M=(T,P,W)=>{const Z=L&&W!==S?W:q;this.options.missingKeyHandler?this.options.missingKeyHandler(T,m,P,Z,ne,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(T,m,P,Z,ne,i),this.emit("missingKey",T,m,P,S)};this.options.saveMissing&&(this.options.saveMissingPlurals&&R?U.forEach(T=>{const P=this.pluralResolver.getSuffixes(T,i);I&&i[`defaultValue${this.options.pluralSeparator}zero`]&&P.indexOf(`${this.options.pluralSeparator}zero`)<0&&P.push(`${this.options.pluralSeparator}zero`),P.forEach(W=>{M([T],d+W,i[`defaultValue${W}`]||K)})}):M(U,d,K))}S=this.extendTranslation(S,e,i,b,s),ue&&S===d&&this.options.appendNamespaceToMissingKey&&(S=`${m}${y}${d}`),(ue||ce)&&this.options.parseMissingKeyHandler&&(S=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${m}${y}${d}`:d,ce?S:void 0,i))}return l?(b.res=S,b.usedParams=this.getUsedParamsDetails(i),b):S}extendTranslation(e,o,s,i,l){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const h=Ne(e)&&(s?.interpolation?.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(h){const v=e.match(this.interpolator.nestingRegexp);m=v&&v.length}let y=s.replace&&!Ne(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(y={...this.options.interpolation.defaultVariables,...y}),e=this.interpolator.interpolate(e,y,s.lng||this.language||i.usedLng,s),h){const v=e.match(this.interpolator.nestingRegexp),x=v&&v.length;m<x&&(s.nest=!1)}!s.lng&&i&&i.res&&(s.lng=this.language||i.usedLng),s.nest!==!1&&(e=this.interpolator.nest(e,(...v)=>l?.[0]===v[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${o[0]}`),null):this.translate(...v,o),s)),s.interpolation&&this.interpolator.reset()}const u=s.postProcess||this.options.postProcess,d=Ne(u)?[u]:u;return e!=null&&d?.length&&s.applyPostProcessor!==!1&&(e=vv.handle(d,e,o,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e,o={}){let s,i,l,u,d;return Ne(e)&&(e=[e]),e.forEach(h=>{if(this.isValidLookup(s))return;const m=this.extractFromKey(h,o),y=m.key;i=y;let v=m.namespaces;this.options.fallbackNS&&(v=v.concat(this.options.fallbackNS));const x=o.count!==void 0&&!Ne(o.count),b=x&&!o.ordinal&&o.count===0,S=o.context!==void 0&&(Ne(o.context)||typeof o.context=="number")&&o.context!=="",C=o.lngs?o.lngs:this.languageUtils.toResolveHierarchy(o.lng||this.language,o.fallbackLng);v.forEach(k=>{this.isValidLookup(s)||(d=k,!xv[`${C[0]}-${k}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(d)&&(xv[`${C[0]}-${k}`]=!0,this.logger.warn(`key "${i}" for languages "${C.join(", ")}" won't get resolved as namespace "${d}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),C.forEach(N=>{if(this.isValidLookup(s))return;u=N;const D=[y];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(D,y,N,k,o);else{let R;x&&(R=this.pluralResolver.getSuffix(N,o.count,o));const L=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(x&&(o.ordinal&&R.indexOf(j)===0&&D.push(y+R.replace(j,this.options.pluralSeparator)),D.push(y+R),b&&D.push(y+L)),S){const B=`${y}${this.options.contextSeparator||"_"}${o.context}`;D.push(B),x&&(o.ordinal&&R.indexOf(j)===0&&D.push(B+R.replace(j,this.options.pluralSeparator)),D.push(B+R),b&&D.push(B+L))}}let O;for(;O=D.pop();)this.isValidLookup(s)||(l=O,s=this.getResource(N,k,O,o))}))})}),{res:s,usedKey:i,exactUsedKey:l,usedLng:u,usedNS:d}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,o,s,i={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,o,s,i):this.resourceStore.getResource(e,o,s,i)}getUsedParamsDetails(e={}){const o=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=e.replace&&!Ne(e.replace);let i=s?e.replace:e;if(s&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!s){i={...i};for(const l of o)delete i[l]}return i}static hasDefaultValue(e){const o="defaultValue";for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&o===s.substring(0,o.length)&&e[s]!==void 0)return!0;return!1}}class wv{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Gn.create("languageUtils")}getScriptPartFromCode(e){if(e=bi(e),!e||e.indexOf("-")<0)return null;const o=e.split("-");return o.length===2||(o.pop(),o[o.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(o.join("-"))}getLanguagePartFromCode(e){if(e=bi(e),!e||e.indexOf("-")<0)return e;const o=e.split("-");return this.formatLanguageCode(o[0])}formatLanguageCode(e){if(Ne(e)&&e.indexOf("-")>-1){let o;try{o=Intl.getCanonicalLocales(e)[0]}catch{}return o&&this.options.lowerCaseLng&&(o=o.toLowerCase()),o||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let o;return e.forEach(s=>{if(o)return;const i=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(i))&&(o=i)}),!o&&this.options.supportedLngs&&e.forEach(s=>{if(o)return;const i=this.getScriptPartFromCode(s);if(this.isSupportedCode(i))return o=i;const l=this.getLanguagePartFromCode(s);if(this.isSupportedCode(l))return o=l;o=this.options.supportedLngs.find(u=>{if(u===l)return u;if(!(u.indexOf("-")<0&&l.indexOf("-")<0)&&(u.indexOf("-")>0&&l.indexOf("-")<0&&u.substring(0,u.indexOf("-"))===l||u.indexOf(l)===0&&l.length>1))return u})}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}getFallbackCodes(e,o){if(!e)return[];if(typeof e=="function"&&(e=e(o)),Ne(e)&&(e=[e]),Array.isArray(e))return e;if(!o)return e.default||[];let s=e[o];return s||(s=e[this.getScriptPartFromCode(o)]),s||(s=e[this.formatLanguageCode(o)]),s||(s=e[this.getLanguagePartFromCode(o)]),s||(s=e.default),s||[]}toResolveHierarchy(e,o){const s=this.getFallbackCodes((o===!1?[]:o)||this.options.fallbackLng||[],e),i=[],l=u=>{u&&(this.isSupportedCode(u)?i.push(u):this.logger.warn(`rejecting language code not found in supportedLngs: ${u}`))};return Ne(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&l(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&l(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&l(this.getLanguagePartFromCode(e))):Ne(e)&&l(this.formatLanguageCode(e)),s.forEach(u=>{i.indexOf(u)<0&&l(this.formatLanguageCode(u))}),i}}const bv={zero:0,one:1,two:2,few:3,many:4,other:5},Sv={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class iR{constructor(e,o={}){this.languageUtils=e,this.options=o,this.logger=Gn.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,o){this.rules[e]=o}clearCache(){this.pluralRulesCache={}}getRule(e,o={}){const s=bi(e==="dev"?"en":e),i=o.ordinal?"ordinal":"cardinal",l=JSON.stringify({cleanedCode:s,type:i});if(l in this.pluralRulesCache)return this.pluralRulesCache[l];let u;try{u=new Intl.PluralRules(s,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),Sv;if(!e.match(/-|_/))return Sv;const h=this.languageUtils.getLanguagePartFromCode(e);u=this.getRule(h,o)}return this.pluralRulesCache[l]=u,u}needsPlural(e,o={}){let s=this.getRule(e,o);return s||(s=this.getRule("dev",o)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,o,s={}){return this.getSuffixes(e,s).map(i=>`${o}${i}`)}getSuffixes(e,o={}){let s=this.getRule(e,o);return s||(s=this.getRule("dev",o)),s?s.resolvedOptions().pluralCategories.sort((i,l)=>bv[i]-bv[l]).map(i=>`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(e,o,s={}){const i=this.getRule(e,s);return i?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(o)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",o,s))}}const Cv=(n,e,o,s=".",i=!0)=>{let l=QP(n,e,o);return!l&&i&&Ne(o)&&(l=Rd(n,o,s),l===void 0&&(l=Rd(e,o,s))),l},Dd=n=>n.replace(/\$/g,"$$$$");class aR{constructor(e={}){this.logger=Gn.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(o=>o),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:o,escapeValue:s,useRawValueToEscape:i,prefix:l,prefixEscaped:u,suffix:d,suffixEscaped:h,formatSeparator:m,unescapeSuffix:y,unescapePrefix:v,nestingPrefix:x,nestingPrefixEscaped:b,nestingSuffix:S,nestingSuffixEscaped:C,nestingOptionsSeparator:k,maxReplaces:N,alwaysFormat:D}=e.interpolation;this.escape=o!==void 0?o:JP,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=l?Cs(l):u||"{{",this.suffix=d?Cs(d):h||"}}",this.formatSeparator=m||",",this.unescapePrefix=y?"":v||"-",this.unescapeSuffix=this.unescapePrefix?"":y||"",this.nestingPrefix=x?Cs(x):b||Cs("$t("),this.nestingSuffix=S?Cs(S):C||Cs(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=N||1e3,this.alwaysFormat=D!==void 0?D:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(o,s)=>o?.source===s?(o.lastIndex=0,o):new RegExp(s,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,o,s,i){let l,u,d;const h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},m=b=>{if(b.indexOf(this.formatSeparator)<0){const N=Cv(o,h,b,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(N,void 0,s,{...i,...o,interpolationkey:b}):N}const S=b.split(this.formatSeparator),C=S.shift().trim(),k=S.join(this.formatSeparator).trim();return this.format(Cv(o,h,C,this.options.keySeparator,this.options.ignoreJSONStructure),k,s,{...i,...o,interpolationkey:C})};this.resetRegExp();const y=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,v=i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:b=>Dd(b)},{regex:this.regexp,safeValue:b=>this.escapeValue?Dd(this.escape(b)):Dd(b)}].forEach(b=>{for(d=0;l=b.regex.exec(e);){const S=l[1].trim();if(u=m(S),u===void 0)if(typeof y=="function"){const k=y(e,l,i);u=Ne(k)?k:""}else if(i&&Object.prototype.hasOwnProperty.call(i,S))u="";else if(v){u=l[0];continue}else this.logger.warn(`missed to pass in variable ${S} for interpolating ${e}`),u="";else!Ne(u)&&!this.useRawValueToEscape&&(u=dv(u));const C=b.safeValue(u);if(e=e.replace(l[0],C),v?(b.regex.lastIndex+=u.length,b.regex.lastIndex-=l[0].length):b.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),e}nest(e,o,s={}){let i,l,u;const d=(h,m)=>{const y=this.nestingOptionsSeparator;if(h.indexOf(y)<0)return h;const v=h.split(new RegExp(`${y}[ ]*{`));let x=`{${v[1]}`;h=v[0],x=this.interpolate(x,u);const b=x.match(/'/g),S=x.match(/"/g);((b?.length??0)%2===0&&!S||S.length%2!==0)&&(x=x.replace(/'/g,'"'));try{u=JSON.parse(x),m&&(u={...m,...u})}catch(C){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,C),`${h}${y}${x}`}return u.defaultValue&&u.defaultValue.indexOf(this.prefix)>-1&&delete u.defaultValue,h};for(;i=this.nestingRegexp.exec(e);){let h=[];u={...s},u=u.replace&&!Ne(u.replace)?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;const m=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(m!==-1&&(h=i[1].slice(m).split(this.formatSeparator).map(y=>y.trim()).filter(Boolean),i[1]=i[1].slice(0,m)),l=o(d.call(this,i[1].trim(),u),u),l&&i[0]===e&&!Ne(l))return l;Ne(l)||(l=dv(l)),l||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),l=""),h.length&&(l=h.reduce((y,v)=>this.format(y,v,s.lng,{...s,interpolationkey:i[1].trim()}),l.trim())),e=e.replace(i[0],l),this.regexp.lastIndex=0}return e}}const lR=n=>{let e=n.toLowerCase().trim();const o={};if(n.indexOf("(")>-1){const s=n.split("(");e=s[0].toLowerCase().trim();const i=s[1].substring(0,s[1].length-1);e==="currency"&&i.indexOf(":")<0?o.currency||(o.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?o.range||(o.range=i.trim()):i.split(";").forEach(u=>{if(u){const[d,...h]=u.split(":"),m=h.join(":").trim().replace(/^'+|'+$/g,""),y=d.trim();o[y]||(o[y]=m),m==="false"&&(o[y]=!1),m==="true"&&(o[y]=!0),isNaN(m)||(o[y]=parseInt(m,10))}})}return{formatName:e,formatOptions:o}},kv=n=>{const e={};return(o,s,i)=>{let l=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(l={...l,[i.interpolationkey]:void 0});const u=s+JSON.stringify(l);let d=e[u];return d||(d=n(bi(s),i),e[u]=d),d(o)}},cR=n=>(e,o,s)=>n(bi(o),s)(e);class uR{constructor(e={}){this.logger=Gn.create("formatter"),this.options=e,this.init(e)}init(e,o={interpolation:{}}){this.formatSeparator=o.interpolation.formatSeparator||",";const s=o.cacheInBuiltFormats?kv:cR;this.formats={number:s((i,l)=>{const u=new Intl.NumberFormat(i,{...l});return d=>u.format(d)}),currency:s((i,l)=>{const u=new Intl.NumberFormat(i,{...l,style:"currency"});return d=>u.format(d)}),datetime:s((i,l)=>{const u=new Intl.DateTimeFormat(i,{...l});return d=>u.format(d)}),relativetime:s((i,l)=>{const u=new Intl.RelativeTimeFormat(i,{...l});return d=>u.format(d,l.range||"day")}),list:s((i,l)=>{const u=new Intl.ListFormat(i,{...l});return d=>u.format(d)})}}add(e,o){this.formats[e.toLowerCase().trim()]=o}addCached(e,o){this.formats[e.toLowerCase().trim()]=kv(o)}format(e,o,s,i={}){const l=o.split(this.formatSeparator);if(l.length>1&&l[0].indexOf("(")>1&&l[0].indexOf(")")<0&&l.find(d=>d.indexOf(")")>-1)){const d=l.findIndex(h=>h.indexOf(")")>-1);l[0]=[l[0],...l.splice(1,d)].join(this.formatSeparator)}return l.reduce((d,h)=>{const{formatName:m,formatOptions:y}=lR(h);if(this.formats[m]){let v=d;try{const x=i?.formatParams?.[i.interpolationkey]||{},b=x.locale||x.lng||i.locale||i.lng||s;v=this.formats[m](d,b,{...y,...i,...x})}catch(x){this.logger.warn(x)}return v}else this.logger.warn(`there was no format function for ${m}`);return d},e)}}const dR=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class fR extends vl{constructor(e,o,s,i={}){super(),this.backend=e,this.store=o,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=Gn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,i.backend,i)}queueLoad(e,o,s,i){const l={},u={},d={},h={};return e.forEach(m=>{let y=!0;o.forEach(v=>{const x=`${m}|${v}`;!s.reload&&this.store.hasResourceBundle(m,v)?this.state[x]=2:this.state[x]<0||(this.state[x]===1?u[x]===void 0&&(u[x]=!0):(this.state[x]=1,y=!1,u[x]===void 0&&(u[x]=!0),l[x]===void 0&&(l[x]=!0),h[v]===void 0&&(h[v]=!0)))}),y||(d[m]=!0)}),(Object.keys(l).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(l),pending:Object.keys(u),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(h)}}loaded(e,o,s){const i=e.split("|"),l=i[0],u=i[1];o&&this.emit("failedLoading",l,u,o),!o&&s&&this.store.addResourceBundle(l,u,s,void 0,void 0,{skipCopy:!0}),this.state[e]=o?-1:2,o&&s&&(this.state[e]=0);const d={};this.queue.forEach(h=>{YP(h.loaded,[l],u),dR(h,e),o&&h.errors.push(o),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(m=>{d[m]||(d[m]={});const y=h.loaded[m];y.length&&y.forEach(v=>{d[m][v]===void 0&&(d[m][v]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(h=>!h.done)}read(e,o,s,i=0,l=this.retryTimeout,u){if(!e.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:o,fcName:s,tried:i,wait:l,callback:u});return}this.readingCalls++;const d=(m,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const v=this.waitingReads.shift();this.read(v.lng,v.ns,v.fcName,v.tried,v.wait,v.callback)}if(m&&y&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,o,s,i+1,l*2,u)},l);return}u(m,y)},h=this.backend[s].bind(this.backend);if(h.length===2){try{const m=h(e,o);m&&typeof m.then=="function"?m.then(y=>d(null,y)).catch(d):d(null,m)}catch(m){d(m)}return}return h(e,o,d)}prepareLoading(e,o,s={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();Ne(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Ne(o)&&(o=[o]);const l=this.queueLoad(e,o,s,i);if(!l.toLoad.length)return l.pending.length||i(),null;l.toLoad.forEach(u=>{this.loadOne(u)})}load(e,o,s){this.prepareLoading(e,o,{},s)}reload(e,o,s){this.prepareLoading(e,o,{reload:!0},s)}loadOne(e,o=""){const s=e.split("|"),i=s[0],l=s[1];this.read(i,l,"read",void 0,void 0,(u,d)=>{u&&this.logger.warn(`${o}loading namespace ${l} for language ${i} failed`,u),!u&&d&&this.logger.log(`${o}loaded namespace ${l} for language ${i}`,d),this.loaded(e,u,d)})}saveMissing(e,o,s,i,l,u={},d=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(o)){this.logger.warn(`did not save key "${s}" as the namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(s==null||s==="")){if(this.backend?.create){const h={...u,isUpdate:l},m=this.backend.create.bind(this.backend);if(m.length<6)try{let y;m.length===5?y=m(e,o,s,i,h):y=m(e,o,s,i),y&&typeof y.then=="function"?y.then(v=>d(null,v)).catch(d):d(null,y)}catch(y){d(y)}else m(e,o,s,i,d,h)}!e||!e[0]||this.store.addResource(e[0],o,s,i)}}}const Ev=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),Ne(n[1])&&(e.defaultValue=n[1]),Ne(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const o=n[3]||n[2];Object.keys(o).forEach(s=>{e[s]=o[s]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),_v=n=>(Ne(n.ns)&&(n.ns=[n.ns]),Ne(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),Ne(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs?.indexOf?.("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n),xl=()=>{},pR=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(o=>{typeof n[o]=="function"&&(n[o]=n[o].bind(n))})};class Si extends vl{constructor(e={},o){if(super(),this.options=_v(e),this.services={},this.logger=Gn,this.modules={external:[]},pR(this),o&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,o),this;setTimeout(()=>{this.init(e,o)},0)}}init(e={},o){this.isInitializing=!0,typeof e=="function"&&(o=e,e={}),e.defaultNS==null&&e.ns&&(Ne(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const s=Ev();this.options={...s,...this.options,..._v(e)},this.options.interpolation={...s.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);const i=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?Gn.init(i(this.modules.logger),this.options):Gn.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:m=uR;const y=new wv(this.options);this.store=new gv(this.options.resources,this.options);const v=this.services;v.logger=Gn,v.resourceStore=this.store,v.languageUtils=y,v.pluralResolver=new iR(y,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),m&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(v.formatter=i(m),v.formatter.init&&v.formatter.init(v,this.options),this.options.interpolation.format=v.formatter.format.bind(v.formatter)),v.interpolator=new aR(this.options),v.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},v.backendConnector=new fR(i(this.modules.backend),v.resourceStore,v,this.options),v.backendConnector.on("*",(b,...S)=>{this.emit(b,...S)}),this.modules.languageDetector&&(v.languageDetector=i(this.modules.languageDetector),v.languageDetector.init&&v.languageDetector.init(v,this.options.detection,this.options)),this.modules.i18nFormat&&(v.i18nFormat=i(this.modules.i18nFormat),v.i18nFormat.init&&v.i18nFormat.init(this)),this.translator=new yl(this.services,this.options),this.translator.on("*",(b,...S)=>{this.emit(b,...S)}),this.modules.external.forEach(b=>{b.init&&b.init(this)})}if(this.format=this.options.interpolation.format,o||(o=xl),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(m=>{this[m]=(...y)=>this.store[m](...y)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=(...y)=>(this.store[m](...y),this)});const d=xi(),h=()=>{const m=(y,v)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),d.resolve(v),o(y,v)};if(this.languages&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initAsync?h():setTimeout(h,0),d}loadResources(e,o=xl){let s=o;const i=Ne(e)?e:this.language;if(typeof e=="function"&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const l=[],u=d=>{if(!d||d==="cimode")return;this.services.languageUtils.toResolveHierarchy(d).forEach(m=>{m!=="cimode"&&l.indexOf(m)<0&&l.push(m)})};i?u(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(h=>u(h)),this.options.preload?.forEach?.(d=>u(d)),this.services.backendConnector.load(l,this.options.ns,d=>{!d&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(d)})}else s(null)}reloadResources(e,o,s){const i=xi();return typeof e=="function"&&(s=e,e=void 0),typeof o=="function"&&(s=o,o=void 0),e||(e=this.languages),o||(o=this.options.ns),s||(s=xl),this.services.backendConnector.reload(e,o,l=>{i.resolve(),s(l)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&vv.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let o=0;o<this.languages.length;o++){const s=this.languages[o];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,o){this.isLanguageChangingTo=e;const s=xi();this.emit("languageChanging",e);const i=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},l=(d,h)=>{h?this.isLanguageChangingTo===e&&(i(h),this.translator.changeLanguage(h),this.isLanguageChangingTo=void 0,this.emit("languageChanged",h),this.logger.log("languageChanged",h)):this.isLanguageChangingTo=void 0,s.resolve((...m)=>this.t(...m)),o&&o(d,(...m)=>this.t(...m))},u=d=>{!e&&!d&&this.services.languageDetector&&(d=[]);const h=Ne(d)?d:d&&d[0],m=this.store.hasLanguageSomeTranslations(h)?h:this.services.languageUtils.getBestMatchFromCodes(Ne(d)?[d]:d);m&&(this.language||i(m),this.translator.language||this.translator.changeLanguage(m),this.services.languageDetector?.cacheUserLanguage?.(m)),this.loadResources(m,y=>{l(y,m)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(e),s}getFixedT(e,o,s){const i=(l,u,...d)=>{let h;typeof u!="object"?h=this.options.overloadTranslationOptionHandler([l,u].concat(d)):h={...u},h.lng=h.lng||i.lng,h.lngs=h.lngs||i.lngs,h.ns=h.ns||i.ns,h.keyPrefix!==""&&(h.keyPrefix=h.keyPrefix||s||i.keyPrefix);const m=this.options.keySeparator||".";let y;return h.keyPrefix&&Array.isArray(l)?y=l.map(v=>(typeof v=="function"&&(v=Id(v,{...this.options,...u})),`${h.keyPrefix}${m}${v}`)):(typeof l=="function"&&(l=Id(l,{...this.options,...u})),y=h.keyPrefix?`${h.keyPrefix}${m}${l}`:l),this.t(y,h)};return Ne(e)?i.lng=e:i.lngs=e,i.ns=o,i.keyPrefix=s,i}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,o={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=o.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const u=(d,h)=>{const m=this.services.backendConnector.state[`${d}|${h}`];return m===-1||m===0||m===2};if(o.precheck){const d=o.precheck(this,u);if(d!==void 0)return d}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(s,e)&&(!i||u(l,e)))}loadNamespaces(e,o){const s=xi();return this.options.ns?(Ne(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{s.resolve(),o&&o(i)}),s):(o&&o(),Promise.resolve())}loadLanguages(e,o){const s=xi();Ne(e)&&(e=[e]);const i=this.options.preload||[],l=e.filter(u=>i.indexOf(u)<0&&this.services.languageUtils.isSupportedCode(u));return l.length?(this.options.preload=i.concat(l),this.loadResources(u=>{s.resolve(),o&&o(u)}),s):(o&&o(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const i=new Intl.Locale(e);if(i&&i.getTextInfo){const l=i.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const o=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],s=this.services?.languageUtils||new wv(Ev());return e.toLowerCase().indexOf("-latn")>1?"ltr":o.indexOf(s.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},o){return new Si(e,o)}cloneInstance(e={},o=xl){const s=e.forkResourceStore;s&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},l=new Si(i);if((e.debug!==void 0||e.prefix!==void 0)&&(l.logger=l.logger.clone(e)),["store","services","language"].forEach(d=>{l[d]=this[d]}),l.services={...this.services},l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},s){const d=Object.keys(this.store.data).reduce((h,m)=>(h[m]={...this.store.data[m]},h[m]=Object.keys(h[m]).reduce((y,v)=>(y[v]={...h[m][v]},y),h[m]),h),{});l.store=new gv(d,i),l.services.resourceStore=l.store}return l.translator=new yl(l.services,i),l.translator.on("*",(d,...h)=>{l.emit(d,...h)}),l.init(i,o),l.translator.options=i,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const zt=Si.createInstance();zt.createInstance=Si.createInstance;const hR=zt.createInstance;zt.dir,zt.init,zt.loadResources,zt.reloadResources,zt.use,zt.changeLanguage,zt.getFixedT,zt.t,zt.exists,zt.setDefaultNamespace,zt.hasLoadedNamespace,zt.loadNamespaces,zt.loadLanguages;const mR=Symbol("remote-view.message");class gR extends Error{constructor(e,o,s){super(),this.key=e,this.values=o,Object.defineProperty(this,"message",{configurable:!0,get:()=>s(e,o)}),this.name="ViewMessageError"}key;values}const Nd={en:{close:"Close",commandTitle:"Command palette",commandDescription:"Search for a command to run…"},"zh-Hans":{close:"关闭",commandTitle:"命令面板",commandDescription:"搜索要运行的命令…"},"zh-Hant":{close:"關閉",commandTitle:"命令面板",commandDescription:"搜尋要執行的命令…"}};function Pv(n){try{const e=new Intl.Locale((n||"en").replaceAll("_","-"));return e.language==="zh"?e.maximize().script==="Hant"?"zh-Hant":"zh-Hans":"en"}catch{return"en"}}function Rv(n,e=typeof navigator>"u"?"en":navigator.language){const o=d=>{const h=Pv(d);return h==="zh-Hant"&&!n["zh-Hant"]?"zh-Hans":h},s=hR();s.init({lng:o(e),fallbackLng:"en",supportedLngs:["en","zh-Hans","zh-Hant"],load:"currentOnly",initAsync:!1,keySeparator:!1,defaultNS:"view",interpolation:{escapeValue:!1},resources:{en:{view:n.en,ui:Nd.en},"zh-Hans":{view:n["zh-Hans"],ui:Nd["zh-Hans"]},"zh-Hant":{view:n["zh-Hant"]??n["zh-Hans"],ui:Nd["zh-Hant"]}}});const i=()=>o(s.resolvedLanguage??s.language),l=d=>(s.on("languageChanged",d),()=>{s.off("languageChanged",d)}),u=(d,h)=>String(s.t(d,h));return{getLocale:i,subscribe:l,setLocale(d){d!==void 0&&s.changeLanguage(o(d)),typeof document<"u"&&(document.documentElement.lang=i())},t:(d,h)=>u(d,h),message:(d,h)=>({[mR]:!0,key:d,values:h}),error:(d,h)=>new gR(d,h,u),format(d){return typeof d=="string"?d:d instanceof Error?d.message:u(d.key,d.values)},ui:d=>String(s.t(d,{ns:"ui"})),date(d,h={}){const m=new Date(d);return Number.isNaN(m.getTime())?"":new Intl.DateTimeFormat(i(),h).format(m)},number(d,h){return new Intl.NumberFormat(i(),h).format(d)},label(d,h=""){if(typeof d=="string")return d;const m=Object.entries(d),y=i();return m.find(([v])=>Pv(v)===y&&/^(en|zh)([-_]|$)/i.test(v))?.[1]??d.en_US??d.en??d["en-US"]??h}}}const vR=Rv({en:{},"zh-Hans":{}},"en"),Iv=f.createContext(vR);function yR({i18n:n,children:e}){return E.jsx(Iv.Provider,{value:n,children:e})}function xR(n){return f.useSyncExternalStore(n.subscribe,n.getLocale,n.getLocale)}function Tv(){const n=f.useContext(Iv);return xR(n),n.ui}f.createContext(null);function $e(...n){return gb(Bp(n))}const Od=fl("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}}),lt=f.forwardRef(function({className:n,variant:e="default",size:o="default",asChild:s=!1,...i},l){const u=s?xh:"button";return E.jsx(u,{ref:l,"data-slot":"button","data-variant":e,"data-size":o,className:$e(Od({variant:e,size:o,className:n})),...i})});function Dv({...n}){return E.jsx(D1,{"data-slot":"alert-dialog",...n})}function wR({...n}){return E.jsx(N1,{"data-slot":"alert-dialog-portal",...n})}function bR({className:n,...e}){return E.jsx(O1,{"data-slot":"alert-dialog-overlay",className:$e("fixed inset-0 z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",n),...e})}function Nv({className:n,size:e="default",...o}){return E.jsxs(wR,{children:[E.jsx(bR,{}),E.jsx(A1,{"data-slot":"alert-dialog-content","data-size":e,className:$e("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),...o})]})}function Ov({className:n,...e}){return E.jsx("div",{"data-slot":"alert-dialog-footer",className:$e("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",n),...e})}function Av({className:n,...e}){return E.jsx(M1,{"data-slot":"alert-dialog-title",className:$e("text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2",n),...e})}function $v({className:n,...e}){return E.jsx(j1,{"data-slot":"alert-dialog-description",className:$e("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",n),...e})}function Mv({className:n,variant:e="outline",size:o="default",...s}){return E.jsx(lt,{variant:e,size:o,asChild:!0,children:E.jsx($1,{"data-slot":"alert-dialog-cancel",className:$e(n),...s})})}const SR=fl("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",secondary:"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",destructive:"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",outline:"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",ghost:"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function CR({className:n,variant:e="default",asChild:o=!1,...s}){const i=o?xh:"span";return E.jsx(i,{"data-slot":"badge","data-variant":e,className:$e(SR({variant:e}),n),...s})}function kR({...n}){return E.jsx(Tu,{"data-slot":"dialog",...n})}function ER({...n}){return E.jsx(Du,{"data-slot":"dialog-portal",...n})}function _R({className:n,...e}){return E.jsx(Ou,{"data-slot":"dialog-overlay",className:$e("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",n),...e})}function PR({className:n,children:e,showCloseButton:o=!0,...s}){const i=Tv();return E.jsxs(ER,{children:[E.jsx(_R,{}),E.jsxs(Au,{"data-slot":"dialog-content",className:$e("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),...s,children:[e,o&&E.jsx(Va,{"data-slot":"dialog-close",asChild:!0,children:E.jsxs(lt,{variant:"ghost",className:"absolute top-2 right-2",size:"icon-sm",children:[E.jsx(Rb,{}),E.jsx("span",{className:"sr-only",children:i("close")})]})})]})]})}function RR({className:n,...e}){return E.jsx("div",{"data-slot":"dialog-header",className:$e("flex flex-col gap-2",n),...e})}function IR({className:n,showCloseButton:e=!1,children:o,...s}){const i=Tv();return E.jsxs("div",{"data-slot":"dialog-footer",className:$e("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",n),...s,children:[o,e&&E.jsx(Va,{asChild:!0,children:E.jsx(lt,{variant:"outline",children:i("close")})})]})}function TR({className:n,...e}){return E.jsx(Cm,{"data-slot":"dialog-title",className:$e("text-base leading-none font-medium",n),...e})}function DR({className:n,...e}){return E.jsx(km,{"data-slot":"dialog-description",className:$e("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",n),...e})}function jv({className:n,type:e,...o}){return E.jsx("input",{type:e,"data-slot":"input",className:$e("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",n),...o})}function NR({className:n,...e}){return E.jsx("textarea",{"data-slot":"textarea",className:$e("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",n),...e})}function OR({className:n,...e}){return E.jsx("div",{"data-slot":"input-group",role:"group",className:$e("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",n),...e})}const AR=fl("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function $R({className:n,align:e="inline-start",...o}){return E.jsx("div",{role:"group","data-slot":"input-group-addon","data-align":e,className:$e(AR({align:e}),n),onClick:s=>{s.target.closest("button")||s.currentTarget.parentElement?.querySelector("input")?.focus()},...o})}function Lv({className:n,...e}){return E.jsx(pl,{"data-slot":"command",className:$e("flex size-full flex-col overflow-hidden rounded-xl! bg-popover p-1 text-popover-foreground",n),...e})}function Fv({className:n,...e}){return E.jsx("div",{"data-slot":"command-input-wrapper",className:"p-1 pb-0",children:E.jsxs(OR,{className:"h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",children:[E.jsx(pl.Input,{"data-slot":"command-input",className:$e("w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",n),...e}),E.jsx($R,{children:E.jsx(_b,{className:"size-4 shrink-0 opacity-50"})})]})})}function zv({className:n,...e}){return E.jsx(pl.List,{"data-slot":"command-list",className:$e("no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",n),...e})}function Vv({className:n,children:e,...o}){return E.jsxs(pl.Item,{"data-slot":"command-item",className:$e("group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",n),...o,children:[e,E.jsx(Js,{className:"ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100"})]})}function MR({...n}){return E.jsx(DE,{"data-slot":"dropdown-menu",...n})}function Uv({...n}){return E.jsx(Pg,{"data-slot":"dropdown-menu-portal",...n})}function jR({...n}){return E.jsx(NE,{"data-slot":"dropdown-menu-trigger",...n})}function LR({className:n,align:e="start",sideOffset:o=4,...s}){return E.jsx(Pg,{children:E.jsx(OE,{"data-slot":"dropdown-menu-content",sideOffset:o,align:e,className:$e("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:overflow-hidden data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),...s})})}function wl({className:n,inset:e,variant:o="default",...s}){return E.jsx($E,{"data-slot":"dropdown-menu-item","data-inset":e,"data-variant":o,className:$e("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",n),...s})}function Bv({...n}){return E.jsx(ME,{"data-slot":"dropdown-menu-radio-group",...n})}function Ci({className:n,children:e,inset:o,...s}){return E.jsxs(jE,{"data-slot":"dropdown-menu-radio-item","data-inset":o,className:$e("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...s,children:[E.jsx("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:E.jsx(LE,{children:E.jsx(Js,{})})}),e]})}function FR({className:n,inset:e,...o}){return E.jsx(AE,{"data-slot":"dropdown-menu-label","data-inset":e,className:$e("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",n),...o})}function Hv({className:n,...e}){return E.jsx(FE,{"data-slot":"dropdown-menu-separator",className:$e("-mx-1 my-1 h-px bg-border",n),...e})}function Wv({...n}){return E.jsx(zE,{"data-slot":"dropdown-menu-sub",...n})}function Kv({className:n,inset:e,children:o,...s}){return E.jsxs(VE,{"data-slot":"dropdown-menu-sub-trigger","data-inset":e,className:$e("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...s,children:[o,E.jsx(nu,{className:"ml-auto"})]})}function Gv({className:n,...e}){return E.jsx(UE,{"data-slot":"dropdown-menu-sub-content",className:$e("z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),...e})}function Zv({...n}){return E.jsx(s_,{"data-slot":"popover",...n})}function qv({...n}){return E.jsx(i_,{"data-slot":"popover-trigger",...n})}function Yv({className:n,align:e="center",sideOffset:o=4,...s}){return E.jsx(a_,{children:E.jsx(l_,{"data-slot":"popover-content",align:e,sideOffset:o,className:$e("z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),...s})})}function bl({...n}){return E.jsx(g_,{"data-slot":"select",...n})}function Sl({...n}){return E.jsx(w_,{"data-slot":"select-value",...n})}function Cl({className:n,size:e="default",children:o,...s}){return E.jsxs(y_,{"data-slot":"select-trigger","data-size":e,className:$e("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",n),...s,children:[o,E.jsx(b_,{asChild:!0,children:E.jsx(tu,{className:"pointer-events-none size-4 text-muted-foreground"})})]})}function kl({className:n,children:e,position:o="item-aligned",align:s="center",...i}){return E.jsx(E_,{children:E.jsxs(__,{"data-slot":"select-content","data-align-trigger":o==="item-aligned",className:$e("relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:o,align:s,...i,children:[E.jsx(zR,{}),E.jsx(N_,{"data-position":o,className:$e("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",o==="popper"&&""),children:e}),E.jsx(VR,{})]})})}function ks({className:n,children:e,...o}){return E.jsxs($_,{"data-slot":"select-item",className:$e("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",n),...o,children:[E.jsx("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:E.jsx(L_,{children:E.jsx(Js,{className:"pointer-events-none"})})}),E.jsx(M_,{children:e})]})}function zR({className:n,...e}){return E.jsx(F_,{"data-slot":"select-scroll-up-button",className:$e("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",n),...e,children:E.jsx(fh,{})})}function VR({className:n,...e}){return E.jsx(z_,{"data-slot":"select-scroll-down-button",className:$e("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",n),...e,children:E.jsx(tu,{})})}function UR({delayDuration:n=0,...e}){return E.jsx(yP,{"data-slot":"tooltip-provider",delayDuration:n,...e})}function BR({...n}){return E.jsx(xP,{"data-slot":"tooltip",...n})}function HR({...n}){return E.jsx(wP,{"data-slot":"tooltip-trigger",...n})}function WR({className:n,sideOffset:e=0,children:o,...s}){return E.jsx(bP,{children:E.jsxs(SP,{"data-slot":"tooltip-content",sideOffset:e,className:$e("z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",n),...s,children:[o,E.jsx(CP,{className:"z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground"})]})})}f.createContext(null);function KR({className:n,orientation:e="horizontal",...o}){return E.jsx(J_,{"data-slot":"tabs","data-orientation":e,className:$e("group/tabs flex gap-2 data-horizontal:flex-col",n),...o})}const GR=fl("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function ZR({className:n,variant:e="default",...o}){return E.jsx(eP,{"data-slot":"tabs-list","data-variant":e,className:$e(GR({variant:e}),n),...o})}function Qv({className:n,...e}){return E.jsx(tP,{"data-slot":"tabs-trigger",className:$e("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",n),...e})}function Xv({className:n,...e}){return E.jsx(nP,{"data-slot":"tabs-content",className:$e("flex-1 text-sm outline-none",n),...e})}f.createContext({size:"default",variant:"default",spacing:2,orientation:"horizontal"});const xr=te().regex(/^[A-Za-z][A-Za-z0-9_.-]{0,79}$/),Ad=lr([te().max(4e3),tt().finite(),ot(),Ar()]),wr=_0(()=>lr([te().max(32e3),tt().finite(),ot(),Ar(),nt(wr).max(1e3),Mr(wr)])),$d=E0("kind",[me({kind:Je("data-source"),dataSourceId:te().uuid()}).strict(),me({kind:Je("definition"),definitionId:te().uuid(),versionId:te().uuid()}).strict(),me({kind:Je("artifact"),artifactId:te().uuid(),versionId:te().uuid()}).strict()]);Mr(wr);const qR=me({id:xr,sourceField:te().min(1).max(256),label:te().min(1).max(160),logicalType:en(["string","boolean","int64","float64","decimal","date","timestamp"]),nullable:ot(),role:en(["dimension","measure","time","identifier"]),semanticRef:te().max(512).optional(),unit:te().max(80).optional()}).strict(),YR=me({name:xr,controlId:xr,type:en(["string","number","boolean","date"]),required:ot(),defaultValue:Ad.optional(),allowedValues:nt(Ad).max(200).optional()}).strict(),QR=me({id:xr,source:$d,providerId:te().min(1).max(160),operation:xr,contractVersion:tt().int().positive(),payload:wr,parameters:nt(YR).max(24),output:me({datasetId:xr,fields:nt(qR).min(1).max(80),grain:nt(xr).max(20)}).strict()}).strict();function XR(n,e){const o=n.output.fields.map(i=>i.id),s=n.parameters.map(i=>i.name);(new Set(o).size!==o.length||new Set(s).size!==s.length)&&e.addIssue({code:"custom",message:"Duplicate field or parameter identifier"}),(new Set(n.output.grain).size!==n.output.grain.length||n.output.grain.some(i=>!o.includes(i)))&&e.addIssue({code:"custom",message:"Grain references an undeclared field"}),new TextEncoder().encode(JSON.stringify(n.payload)).byteLength>64e3&&e.addIssue({code:"custom",message:"Query payload exceeds limit"})}const Jv=QR.superRefine(XR),JR=Mr(xr,Ad).default({});me({binding:Jv,controls:JR}).strict(),me({source:$d,providerId:te().min(1).max(160),request:wr.default({})}).strict().refine(n=>new TextEncoder().encode(JSON.stringify(n)).byteLength<=16e3,"Discovery request exceeds limit"),me({items:nt(me({id:te().min(1).max(512),name:te().min(1).max(512),kind:en(["collection","dataset"]),description:te().max(4e3).optional(),inspectRequest:wr.optional(),metadata:wr}).strict()).max(50),nextRequest:wr.optional(),queryContract:me({operation:xr,contractVersion:tt().int().positive(),payloadSchema:wr,instructions:te().max(8e3)}).strict()}).strict().refine(n=>new TextEncoder().encode(JSON.stringify(n)).byteLength<=128e3,"Discovery response exceeds limit");function eI(n,e){if(n==null)return{};var o={},s=Object.keys(n),i,l;for(l=0;l<s.length;l++)i=s[l],!(e.indexOf(i)>=0)&&(o[i]=n[i]);return o}const ey="xpert.artifact-document",ty=1,El=te().regex(/^[A-Za-z][A-Za-z0-9_.-]{0,79}$/),tI=lr([te().max(4e3),tt().finite(),ot(),Ar()]),ny=Mr(El,tI).refine(n=>Object.keys(n).length<=24,"Too many controls"),nI=me({type:Je("query"),requestId:te().min(1).max(80),bindingId:El,controls:ny}).strict(),rI=me({bindingIds:nt(El).max(64).refine(n=>new Set(n).size===n.length,"Duplicate binding IDs"),defaults:ny,theme:en(["light","dark"]),locale:te().min(1).max(80)}).strict(),ry=te().min(1).max(3e5).superRefine((n,e)=>{(new TextEncoder().encode(n).byteLength>3e5||!/<html[\s>]/i.test(n)||!/<body[\s>]/i.test(n))&&e.addIssue({code:"custom",message:"Supply a complete UTF-8 HTML document, at most 300 KB"})}),oI=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Zn=(n,e)=>n>>>e|n<<32-e;function sI(n){const e=new Uint8Array(Math.ceil((n.length+9)/64)*64);e.set(n),e[n.length]=128;const o=new DataView(e.buffer);o.setUint32(e.length-8,Math.floor(n.length/536870912)),o.setUint32(e.length-4,n.length*8>>>0);const s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),i=new Uint32Array(64);for(let l=0;l<e.length;l+=64){for(let S=0;S<16;S++)i[S]=o.getUint32(l+S*4);for(let S=16;S<64;S++){const C=i[S-15],k=i[S-2],N=Zn(C,7)^Zn(C,18)^C>>>3,D=Zn(k,17)^Zn(k,19)^k>>>10;i[S]=i[S-16]+N+i[S-7]+D>>>0}let[u,d,h,m,y,v,x,b]=s;for(let S=0;S<64;S++){const C=Zn(y,6)^Zn(y,11)^Zn(y,25),k=y&v^~y&x,N=b+C+k+oI[S]+i[S]>>>0,D=Zn(u,2)^Zn(u,13)^Zn(u,22),O=u&d^u&h^d&h,R=D+O>>>0;b=x,x=v,v=y,y=m+N>>>0,m=h,h=d,d=u,u=N+R>>>0}s[0]=s[0]+u>>>0,s[1]=s[1]+d>>>0,s[2]=s[2]+h>>>0,s[3]=s[3]+m>>>0,s[4]=s[4]+y>>>0,s[5]=s[5]+v>>>0,s[6]=s[6]+x>>>0,s[7]=s[7]+b>>>0}return Array.from(s,l=>l.toString(16).padStart(8,"0")).join("")}const oy=me({id:El,version:te().regex(/^\d+\.\d+\.\d+(?:-[A-Za-z0-9.-]+)?$/),format:Je("classic-script"),global:te().regex(/^[A-Za-z_$][A-Za-z0-9_$]{0,79}$/).refine(n=>!["window","self","globalThis","document","parent","top","location","xpertLiveArtifact","__proto__","constructor","prototype"].includes(n)),sha256:te().regex(/^[a-f0-9]{64}$/)}).strict(),iI=oy.transform(n=>({id:n.id,version:n.version,format:"classic-script",global:n.global,sha256:n.sha256})),Md=nt(iI).max(8).superRefine((n,e)=>{(new Set(n.map(o=>o.id)).size!==n.length||new Set(n.map(o=>o.global)).size!==n.length)&&e.addIssue({code:"custom",message:"Duplicate dependency ID or global"})}),sy=nt(oy.extend({source:te().min(1).max(4e6)}).strict().transform(n=>({id:n.id,version:n.version,format:"classic-script",global:n.global,sha256:n.sha256,source:n.source}))).max(8);function iy(n,e){const o=sy.parse(n),s=Md.parse(o.map(l=>{var{source:u}=l,d=eI(l,["source"]);return d}));let i=0;for(const l of o){const u=new TextEncoder().encode(l.source);if(i+=u.length,u.length>4e6||i>8e6)throw new Error("DOCUMENT_DEPENDENCY_TOO_LARGE");if(sI(u)!==l.sha256)throw new Error("DOCUMENT_DEPENDENCY_INTEGRITY_FAILED")}if(e&&JSON.stringify(Md.parse(e))!==JSON.stringify(s))throw new Error("DOCUMENT_DEPENDENCY_LOCK_MISMATCH");return o.map(l=>({id:l.id,version:l.version,global:l.global,sha256:l.sha256,source:l.source,format:"classic-script"}))}function aI(n){const e=o=>JSON.stringify(o).replace(/</g,"\\u003c").replace(/>/g,"\\u003e");return iy(n).map(o=>`<script>(()=>{const s=document.createElement('script');s.textContent=${e(o.source)};document.head.appendChild(s);s.remove();if(typeof window[${e(o.global)}]==='undefined')throw new Error('DOCUMENT_DEPENDENCY_GLOBAL_MISSING');})();<\/script>`).join("")}const lI=te().max(250).refine(n=>{try{const e=new URL(n);return e.protocol==="https:"&&e.origin===n&&!e.username&&!e.password&&/^(?:[a-z0-9.-]+|\[[a-f0-9:]+\])$/i.test(e.hostname)}catch{return!1}},"Use an exact HTTPS origin without a path, credentials or wildcard"),_l=nt(lI).max(16),cI=me({mode:en(["restricted","unrestricted"]).optional(),scripts:_l.optional(),styles:_l.optional(),fonts:_l.optional(),images:_l.optional()}).strict();function ay(n){const e=cI.parse(n??{});if(e.mode==="unrestricted")return["default-src * data: blob:","script-src * data: blob: 'unsafe-inline'","style-src * data: blob: 'unsafe-inline'","img-src * data: blob:","font-src * data: blob:","connect-src * data: blob: ws: wss:","media-src * data: blob:","frame-src * data: blob:","worker-src * data: blob:","object-src 'none'","base-uri 'none'","form-action 'none'"].join("; ");const o=s=>s?.length?` ${[...new Set(s)].join(" ")}`:"";return["default-src 'none'",`script-src 'unsafe-inline'${o(e.scripts)}`,`style-src 'unsafe-inline'${o(e.styles)}`,`img-src data: blob:${o(e.images)}`,`font-src data:${o(e.fonts)}`,"connect-src 'none'","frame-src 'none'","worker-src 'none'","object-src 'none'","base-uri 'none'","form-action 'none'"].join("; ")}ay();function uI(n,e,o=[],s){if(ry.parse(n),!/^[a-f0-9]{32}$/.test(e))throw new Error("Invalid Artifact document session ID");return`<!doctype html><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="${ay(s)}"><script>${dI.replace("__XPERT_DOCUMENT_SESSION__",e)}<\/script>${aI(o)}${n}`}const dI=String.raw`
|
|
104
104
|
;(() => {
|
|
105
105
|
'use strict'
|
|
106
106
|
const SESSION_ID = '__XPERT_DOCUMENT_SESSION__'
|
|
@@ -248,6 +248,6 @@ Error generating stack: `+p.message+`
|
|
|
248
248
|
})
|
|
249
249
|
parent.postMessage({ channel: CHANNEL, version: VERSION, type: 'ready', sessionId: SESSION_ID }, '*')
|
|
250
250
|
})()
|
|
251
|
-
`,jC=xe({channel:Qe(Gm),version:Qe(Qm),type:Qe("ready"),sessionId:te().regex(/^[a-f0-9]{32}$/)}).strict(),MC=xe({type:Qe("diagnostic"),code:Qe("DOCUMENT_BINDING_DENIED")}).strict();function zC(r,t){if(!r.ownerDocument.querySelector("meta[data-xpert-document-policy]"))throw new Error("Install the Artifact document frame policy before mounting a document");const o=PC.parse(t.context),i=Array.from(crypto.getRandomValues(new Uint8Array(16)),T=>T.toString(16).padStart(2,"0")).join(""),a=LC(t.html,i,t.dependencies,t.networkPolicy),l=new MessageChannel,u=new Set(o.bindingIds),d=new Set,h=new Set,g=new Map,v=r.ownerDocument.defaultView;let y=!1,S=!1,b=0,w=Date.now();r.setAttribute("sandbox","allow-scripts"),r.referrerPolicy="no-referrer";const _=(T,O)=>{try{T?.(O)}catch{}},k=T=>{S||l.port1.postMessage(T)},R=(T,O)=>{k({type:"result",requestId:T,ok:!1,code:O}),_(t.onError,O)};l.port1.onmessage=async T=>{if(S)return;const O=MC.safeParse(T.data);if(O.success){_(t.onError,O.data.code);return}const V=RC.safeParse(T.data);if(!V.success){_(t.onError,"DOCUMENT_INVALID_REQUEST");return}const L={type:V.data.type,requestId:V.data.requestId,bindingId:V.data.bindingId,controls:V.data.controls};if(!u.has(L.bindingId)){R(L.requestId,"DOCUMENT_BINDING_DENIED");return}if(Date.now()-w>=6e4&&(b=0,w=Date.now(),d.clear()),h.has(L.requestId)||d.has(L.requestId)){R(L.requestId,"DOCUMENT_REQUEST_REPLAY");return}if(h.size>=8||++b>60){R(L.requestId,"DOCUMENT_QUERY_LIMIT");return}d.add(L.requestId),h.add(L.requestId),g.set(L.bindingId,L.requestId),_(t.onBusy,!0);try{const B=await t.query(L);S||(k({type:"result",requestId:L.requestId,ok:!0,dataset:B}),g.get(L.bindingId)===L.requestId&&_(t.onResult,B))}catch{S||(k({type:"result",requestId:L.requestId,ok:!1,code:"DOCUMENT_QUERY_FAILED"}),g.get(L.bindingId)===L.requestId&&_(t.onError,"DOCUMENT_QUERY_FAILED"))}finally{h.delete(L.requestId),S||_(t.onBusy,h.size>0)}};const D=T=>{var O;if(S||y||T.source!==r.contentWindow)return;const V=jC.safeParse(T.data);!V.success||V.data.sessionId!==i||(y=!0,(O=r.contentWindow)==null||O.postMessage({channel:Gm,version:Qm,type:"init",sessionId:i,context:o},"*",[l.port2]))};return v.addEventListener("message",D),l.port1.start(),r.srcdoc=a,{refresh(){k({type:"refresh"})},dispose(){S||(S=!0,v.removeEventListener("message",D),l.port1.close(),l.port2.close(),_(t.onBusy,!1))}}}function FC(r){if(r.querySelector("meta[data-xpert-document-policy]"))return;const t=r.createElement("meta");t.httpEquiv="Content-Security-Policy",t.content="frame-src 'none'",t.dataset.xpertDocumentPolicy="1",r.head.prepend(t)}const Nn=te().regex(/^[A-Za-z][A-Za-z0-9_.-]{0,79}$/),Ra=xe({schema:Qe("xpert.live-dashboard"),id:te().uuid(),title:te().min(1).max(160),bindings:nt(qm).max(8),presentation:xe({type:Qe("html"),html:Xm,dependencies:vu.optional()}).strict().optional(),controls:nt(xe({controlId:Nn,type:Hn(["string","number","boolean","date"]),defaultValue:Bn([te(),mt(),Tt(),hr()]).optional(),allowedValues:nt(Bn([te(),mt(),Tt(),hr()])).max(200).optional(),label:te().min(1).max(160)}).strict()).max(24),charts:nt(xe({id:Nn,title:te().min(1).max(160),type:Hn(["bar","line","area","pie","scatter"]),datasetId:Nn,x:Nn,y:Nn,color:Nn.optional()}).strict()).max(20),tables:nt(xe({id:Nn,title:te().min(1).max(160),datasetId:Nn,fields:nt(Nn).min(1).max(30)}).strict()).max(20)}).strict().superRefine((r,t)=>{const o=(i,a)=>{new Set(i).size!==i.length&&t.addIssue({code:"custom",message:`Duplicate ${a}`})};!r.bindings.length&&(r.presentation||r.controls.length||r.charts.length||r.tables.length)&&t.addIssue({code:"custom",message:"An unconfigured draft must contain no views or controls"}),o(r.bindings.map(i=>i.id),"binding"),o(r.bindings.map(i=>i.output.datasetId),"dataset"),o(r.controls.map(i=>i.controlId),"control"),o([...r.charts,...r.tables].map(i=>i.id),"view"),r.bindings.length&&!r.presentation&&!r.charts.length&&!r.tables.length&&t.addIssue({code:"custom",message:"At least one chart or table is required"}),r.presentation&&(r.charts.length||r.tables.length)&&t.addIssue({code:"custom",message:"HTML presentation owns its charts; use empty charts/tables arrays"});for(const i of r.controls){const a=r.bindings.flatMap(u=>u.parameters.filter(d=>d.controlId===i.controlId));a.length||t.addIssue({code:"custom",message:"Control is not bound to a query parameter"});const l=[...i.defaultValue!==void 0?[i.defaultValue]:[],...i.allowedValues??[]];l.some(u=>u!==null&&(i.type==="number"?typeof u!="number"||!Number.isFinite(u):i.type==="boolean"?typeof u!="boolean":typeof u!="string"))&&t.addIssue({code:"custom",message:"Control value has an incompatible type"}),i.allowedValues&&i.defaultValue!==void 0&&!i.allowedValues.includes(i.defaultValue)&&t.addIssue({code:"custom",message:"Default control value is not allowed"});for(const u of a)u.defaultValue!==void 0&&i.defaultValue!==void 0&&u.defaultValue!==i.defaultValue&&t.addIssue({code:"custom",message:"Control and parameter defaults disagree"}),l.some(d=>d===null?u.required:u.allowedValues&&!u.allowedValues.includes(d))&&t.addIssue({code:"custom",message:"Control values conflict with parameter restrictions"})}for(const i of r.bindings)for(const a of i.parameters){const l=r.controls.find(u=>u.controlId===a.controlId);(!l||l.type!==a.type)&&t.addIssue({code:"custom",message:"Control mapping is missing or has an incompatible type"})}for(const i of[...r.charts,...r.tables]){const a=r.bindings.find(u=>u.output.datasetId===i.datasetId)?.output,l="fields"in i?i.fields:[i.x,i.y,...i.color?[i.color]:[]];(!a||l.some(u=>!a.fields.some(d=>d.id===u)))&&t.addIssue({code:"custom",message:"View references an undeclared Dataset field"}),"y"in i&&!a?.fields.some(u=>u.id===i.y&&["float64","int64","decimal"].includes(u.logicalType))&&t.addIssue({code:"custom",message:"Chart measure must be numeric"}),"y"in i&&i.type!=="scatter"&&a?.grain.some(u=>u!==i.x&&u!==i.color)&&t.addIssue({code:"custom",message:"Chart must encode every Dataset grain dimension in x/color; use another aggregated binding for totals"})}});Ra.innerType().pick({title:!0,bindings:!0,controls:!0,charts:!0,tables:!0,presentation:!0}).partial().strict();const VC=mr(Bn([te().max(4e3),mt().finite(),Tt(),hr()]));xe({manifest:Ra,expectedVersionId:te().uuid().nullable(),expectedRevision:mt().int().nonnegative().default(0)}).strict(),xe({artifactId:te().uuid(),versionId:te().uuid().optional(),draftRevision:mt().int().positive().optional(),controls:VC.default({})}).strict().extend({bindingId:Nn}).strict();const rg="live-dashboard__live-dashboard",og=Tf("target",[xe({target:Qe("workbench.view"),viewKey:Qe(rg)}).strict(),xe({target:Qe("assistant.project"),projectId:te().uuid(),viewKey:Qe(rg)}).strict()]),UC=xe({selectionId:te().uuid().optional(),parameters:xe({contentProvider:te().optional(),contentId:te().uuid().optional(),contentTitle:te().optional(),contentEditor:te().optional(),artifactId:te().uuid().optional(),versionId:te().uuid().optional()}).strict().optional()}).transform((r,t)=>{const o=r.selectionId??r.parameters?.artifactId,i=r.parameters?.versionId;return(r.selectionId&&r.parameters?.artifactId&&r.selectionId!==r.parameters.artifactId||i&&!o)&&t.addIssue({code:Q.custom,message:"DASHBOARD_NAVIGATION_INVALID: provide one Artifact identity and an optional version"}),{artifactId:o,versionId:i}}),yu=r=>JSON.stringify([r.artifactId??null,r.versionId??null]),Bi=xe({artifactId:te(),versionId:te().nullish(),versionNumber:mt().optional(),title:te().nullish(),updatedAt:te().optional(),draftRevision:mt().optional(),canDelete:Tt().optional(),isDraft:Tt().optional(),baseVersionId:te().nullish()}),BC=Bi.extend({manifest:Ra,dependencies:eg.optional()}),HC=xe({meta:xe({navigationTarget:og.optional(),dashboards:nt(Bi),sources:nt(xe({source:gu,name:te()})),saved:BC.optional(),versions:nt(Bi).optional()})}),WC=["dashboard_create","dashboard_create_html","dashboard_update"],KC=xe({dashboard:xe({artifactId:te().uuid(),draftRevision:mt().int().positive(),status:Qe("draft")})});function ZC(r){let t=r;if(typeof t=="string")try{t=JSON.parse(t)}catch{return null}const o=KC.safeParse(t);return o.success?o.data.dashboard:null}const qC=xe({channel:Qe("xpertai.remote_component"),protocolVersion:Qe(1),type:te(),visible:Tt().optional(),scopeRevision:mt().optional(),kind:te().optional(),resourceId:te().optional(),instanceId:te().optional(),requestId:te().optional(),locale:te().optional(),initialQuery:Jr(),data:Jr(),result:Jr(),message:te().optional(),event:xe({type:te(),toolName:te().optional(),data:xe({output:Jr(),revision:mt().int().nonnegative().optional()}).optional()}).optional(),theme:xe({mode:te().optional(),density:Hn(["default","compact"]).optional(),tokens:mr(Bn([te(),mt()])).optional()}).optional()});let nr,qo,ig,xu=!0;const GC=()=>xu&&!document.hidden,wu=new Set,QC=r=>(wu.add(r),()=>{wu.delete(r)});function sg(){for(const r of Er.values())clearTimeout(r.timer),r.reject(new Error("Context changed"));Er.clear()}let YC=0;const Er=new Map;function Su(r,t={}){window.parent.postMessage({channel:"xpertai.remote_component",protocolVersion:1,instanceId:nr,scopeRevision:qo,type:r,...t},"*")}function XC(r,t){let o;const i=a=>{if(a.source!==window.parent)return;const l=qC.safeParse(a.data);if(!l.success)return;const u=l.data;if(u.type==="init"){if(nr&&u.instanceId!==nr)return;qo!==u.scopeRevision&&sg(),nr=u.instanceId,qo=u.scopeRevision,ig=u.initialQuery,xu=u.visible??!0,document.documentElement.classList.toggle("dark",u.theme?.mode==="dark");for(const[h,g]of Object.entries(u.theme?.tokens??{})){const v=h.startsWith("--")?h:`--xui-${h.replace(/[._]/g,"-").replace(/[A-Z]/g,y=>`-${y.toLowerCase()}`)}`;document.documentElement.style.setProperty(v,String(g))}w0({density:u.theme?.density}),r(u.locale??"en-US",u.initialQuery);return}if(u.type==="hostEvent"&&nr&&u.instanceId===nr&&u.event?.type==="view.context.changed"){const h=u.event.data?.revision;h!==void 0&&h>(qo??-1)&&(sg(),qo=h);return}if(!nr||u.instanceId!==nr||u.scopeRevision!==qo&&u.type!=="error")return;if(u.type==="visibility"){xu=u.visible===!0;return}if(u.type==="editorEvent"&&u.kind==="prepareClose"&&u.resourceId&&u.requestId){Su("closePrepared",{requestId:u.requestId,ready:[...wu].every(h=>h(u.resourceId))});return}if(u.type==="hostEvent"&&u.event?.type==="assistant.tool.completed"&&WC.includes(u.event.toolName??"")){const h=ZC(u.event.data?.output);h&&`${h.artifactId}:${h.draftRevision}`!==o&&(o=`${h.artifactId}:${h.draftRevision}`,t(h.artifactId));return}if(!u.requestId)return;const d=Er.get(u.requestId);d&&(Er.delete(u.requestId),clearTimeout(d.timer),u.type==="error"?d.reject(new Error(u.message??"Request failed")):d.resolve(u.data??u.result))};return window.addEventListener("message",i),Su("ready"),()=>{window.removeEventListener("message",i);for(const a of Er.values())clearTimeout(a.timer),a.reject(new Error("View closed"));Er.clear()}}function tn(r,t){if(!nr)return Promise.reject(new Error("View is not connected"));const o=`dashboard-${++YC}`;return new Promise((i,a)=>{const l=window.setTimeout(()=>{Er.delete(o),a(new Error("Request timed out"))},27e4);Er.set(o,{resolve:i,reject:a,timer:l}),Su(r,{requestId:o,...t})})}function ag(r){return tn("invokeClientCommand",{commandKey:"assistant.context.set",payload:{key:"live_dashboard",...r?{context:{schemaVersion:1,...r}}:{clear:!0}}})}async function lg(r,t,o){const i=og.parse(r),a=xe({selectionId:te().optional(),parameters:xe({contentId:te().uuid().optional(),contentProvider:te().optional(),contentTitle:te().optional(),contentEditor:te().optional()}).optional()}).safeParse(ig);let l={};if(t&&a.success&&a.data.parameters?.contentId)if(a.data.selectionId===t)l={...a.data.parameters};else{const u=await tn("invokeClientCommand",{commandKey:"workbench.content.resolve",payload:{providerKey:"live-dashboard.content",resourceId:t}});l=xe({success:Qe(!0),navigation:xe({parameters:mr(Jr()).optional()})}).parse(u).navigation.parameters??{}}return tn("invokeClientCommand",{commandKey:"workbench.navigation.open",payload:{...i,...t?{selectionId:t}:{},parameters:{...l,...o?{versionId:o}:{}}}})}const cg={bindingUnavailable:"Some views could not load. Check your data access or retry. Available views are shown below.",publishShareBlocked:"This draft contains private or unavailable data sources and cannot replace the version used by the active team share. Remove those bindings or revoke the share before publishing. The published version and link are unchanged.",viewerControls:"Dashboard controls",hideViewerControls:"Hide dashboard controls",share:"Team sharing",teamReadOnly:"Team · read only",shareHint:"Share published versions with signed-in members of this organization. Drafts remain private.",sharePermissions:"Each viewer needs their own data source permissions. Sharing does not grant file or source access.",shareVersion:"Version policy",shareLatest:"Follow latest published version",shareFixed:"Pin a published version",shareLink:"Share link",copyLink:"Copy link",copied:"Copied",openShared:"Open page",enableShare:"Enable sharing",updateShare:"Update sharing",revokeShare:"Revoke link",publishBeforeShare:"Publish a version before sharing.",privateDependencies:"This provider uses private script or file dependencies. Team access must be supported and granted separately before sharing.",sourceUnavailable:"A declared data source or provider is unavailable.",draft:"Working draft",publish:"Publish draft",confirm:"Confirm publication",confirmPublish:"Publish this saved revision as a new immutable version?",title:"Live dashboards",empty:"Create a dashboard with your Assistant, or import a definition.",import:"Import definition",save:"Save",cancel:"Cancel",refresh:"Refresh",apply:"Apply filters",loading:"Loading…",saved:"Saved",refreshed:"Updated",definition:"Dashboard definition",sources:"Available sources",version:"Version",partial:"Partial result — narrow the filters to retrieve all rows.",select:"Choose a dashboard",error:"The operation failed. Check your access and query definition.",all:"All",edit:"Edit working draft",history:"Version history",search:"Search dashboards…",noResults:"No dashboards found.",autoRefresh:"Auto refresh",off:"Off",seconds30:"Every 30 seconds",minute1:"Every minute",deleteDashboard:"Delete dashboard",deleteNamedDashboard:"Delete “{{title}}”",confirmDeleteDashboard:"Delete “{{title}}”? It will be removed from the dashboard list and shared links will stop working. Source data and workspace files will be kept.",deleting:"Deleting…"},Go=Lm({en:cg,"zh-Hans":{bindingUnavailable:"部分视图未能加载,请检查数据权限或重试。已成功查询的视图仍可查看。",publishShareBlocked:"草稿包含私有或不可用的数据源,无法更新当前团队分享。请移除这些数据绑定,或先撤销分享再发布。已发布版本和共享链接保持不变。",viewerControls:"看板操作",hideViewerControls:"收起看板操作",share:"团队分享",teamReadOnly:"团队 · 只读",shareHint:"向本组织已登录成员分享正式版本,草稿保持私有。",sharePermissions:"每位访问者仍需自己的数据源权限。分享不会授予文件或数据源访问权。",shareVersion:"版本策略",shareLatest:"跟随最新正式版本",shareFixed:"固定正式版本",shareLink:"分享链接",copyLink:"复制链接",copied:"已复制",openShared:"打开独立页面",enableShare:"开启分享",updateShare:"更新分享",revokeShare:"撤销链接",publishBeforeShare:"请先发布一个正式版本。",privateDependencies:"此数据源使用私有脚本或文件依赖,需要单独支持并授予团队访问权限后才能分享。",sourceUnavailable:"声明的数据源或适配器不可用。",draft:"工作草稿",publish:"发布草稿",confirm:"确认发布",confirmPublish:"将这份已保存草稿发布为新的正式版本?",title:"实时看板",empty:"让 Assistant 创建看板,或导入看板定义。",import:"导入定义",save:"保存",cancel:"取消",refresh:"刷新",apply:"应用筛选",loading:"加载中…",saved:"已保存",refreshed:"已更新",definition:"看板定义",sources:"可用数据源",version:"版本",partial:"结果不完整,请缩小筛选范围以获取全部数据。",select:"选择看板",error:"操作失败,请检查访问权限和查询定义。",all:"全部",edit:"编辑工作草稿",history:"版本历史",search:"搜索看板…",noResults:"未找到匹配的看板。",autoRefresh:"自动刷新",off:"关闭",seconds30:"每 30 秒",minute1:"每分钟",deleteDashboard:"删除看板",deleteNamedDashboard:"删除“{{title}}”",confirmDeleteDashboard:"确定删除“{{title}}”?看板将从列表移除,共享链接将失效。数据源和工作区文件会保留。",deleting:"正在删除…"},"zh-Hant":{bindingUnavailable:"部分視圖未能載入,請檢查資料權限或重試。成功查詢的視圖仍可查看。",publishShareBlocked:"草稿包含私有或無法使用的資料來源,無法更新目前的團隊分享。請移除這些資料繫結,或先撤銷分享再發佈。已發佈版本與分享連結保持不變。",viewerControls:"看板操作",hideViewerControls:"收起看板操作",share:"團隊分享",teamReadOnly:"團隊 · 唯讀",shareHint:"向本組織已登入成員分享正式版本,草稿保持私有。",sharePermissions:"每位訪問者仍需自己的資料來源權限。分享不會授予檔案或資料來源存取權。",shareVersion:"版本策略",shareLatest:"跟隨最新正式版本",shareFixed:"固定正式版本",shareLink:"分享連結",copyLink:"複製連結",copied:"已複製",openShared:"開啟獨立頁面",enableShare:"開啟分享",updateShare:"更新分享",revokeShare:"撤銷連結",publishBeforeShare:"請先發佈一個正式版本。",privateDependencies:"此資料來源使用私有腳本或檔案依賴,需要單獨支援並授予團隊存取權後才能分享。",sourceUnavailable:"聲明的資料來源或適配器不可用。",draft:"工作草稿",publish:"發佈草稿",confirm:"確認發佈",confirmPublish:"將這份已儲存草稿發佈為新的正式版本?",title:"即時看板",empty:"讓 Assistant 建立看板,或匯入看板定義。",import:"匯入定義",save:"儲存",cancel:"取消",refresh:"重新整理",apply:"套用篩選",loading:"載入中…",saved:"已儲存",refreshed:"已更新",definition:"看板定義",sources:"可用資料來源",version:"版本",partial:"結果不完整,請縮小篩選範圍以取得全部資料。",select:"選擇看板",error:"操作失敗,請檢查存取權限和查詢定義。",all:"全部",edit:"編輯工作草稿",history:"版本歷史",search:"搜尋看板…",noResults:"找不到符合的看板。",autoRefresh:"自動重新整理",off:"關閉",seconds30:"每 30 秒",minute1:"每分鐘",deleteDashboard:"刪除看板",deleteNamedDashboard:"刪除「{{title}}」",confirmDeleteDashboard:"確定刪除「{{title}}」?看板將從清單移除,共享連結將失效。資料來源和工作區檔案會保留。",deleting:"正在刪除…"}},"en");function ug(r){return Go.setLocale(r),document.documentElement.lang=Go.getLocale(),Object.fromEntries(Object.keys(cg).map(t=>[t,Go.t(t)]))}const JC={scripts:["https://cdn.tailwindcss.com","https://cdn.jsdelivr.net","https://cdnjs.cloudflare.com","https://unpkg.com"],styles:["https://cdn.jsdelivr.net","https://cdnjs.cloudflare.com","https://unpkg.com","https://fonts.googleapis.com"],fonts:["https://cdn.jsdelivr.net","https://cdnjs.cloudflare.com","https://unpkg.com","https://fonts.gstatic.com"]};function e_(r,t){return zC(r,{...t,networkPolicy:JC})}const t_=xe({success:Qe(!0),data:xe({schema:Qe("xpert.analytics.dataset"),datasetId:te(),fields:nt(xe({id:te()}).passthrough()),rows:nt(mr(Bn([te(),mt(),Tt(),hr()]))),completeness:xe({truncated:Tt()}).passthrough(),freshness:xe({sourceFetchedAt:te()}).passthrough(),provenance:xe({executionId:te()}).passthrough()}).passthrough()}),n_=m.forwardRef(function(t,o){const i=m.useRef(null),a=m.useRef(null),l=m.useRef(t);return l.current=t,m.useImperativeHandle(o,()=>({refresh(){a.current?.refresh()}}),[]),m.useEffect(()=>{const u=i.current;if(!u||!t.manifest.presentation)return;const d=t.manifest;let h;try{h=tg(t.dependencies,d.presentation?.dependencies??[])}catch{l.current.onError("DOCUMENT_DEPENDENCY_INTEGRITY_FAILED"),l.current.onBusy(!1);return}const g=e_(u,{html:t.manifest.presentation.html,dependencies:h,context:{bindingIds:d.bindings.map(v=>v.id),defaults:Object.fromEntries(d.controls.filter(v=>v.defaultValue!==void 0).map(v=>[v.controlId,v.defaultValue??null])),locale:document.documentElement.lang||"en-US",theme:document.documentElement.classList.contains("dark")?"dark":"light"},query:async v=>t_.parse(await tn("executeAction",{actionKey:"query-binding",input:{artifactId:t.artifactId,versionId:t.versionId,draftRevision:t.draftRevision,bindingId:v.bindingId,controls:v.controls}})).data,onBusy:v=>l.current.onBusy(v),onError:v=>l.current.onError(v),onResult:v=>l.current.onResult({partial:v.completeness.truncated,fetchedAt:v.freshness.sourceFetchedAt})});return a.current=g,()=>{g.dispose(),a.current=null}},[t.artifactId,t.versionId,t.draftRevision]),m.createElement("iframe",{ref:i,title:t.manifest.title,sandbox:"allow-scripts",className:"h-full w-full border-0"})});function r_({items:r,value:t,disabled:o,label:i,searchLabel:a,emptyLabel:l,deleteLabel:u,onChange:d,onDelete:h}){const[g,v]=m.useState(!1),[y,S]=m.useState(""),b=r.filter(R=>`${R.title??""} ${R.artifactId}`.toLocaleLowerCase().includes(y.trim().toLocaleLowerCase())),w=m.useId(),_=r.find(R=>R.artifactId===t),k=_?.title??_?.artifactId??i;return m.createElement(Wm,{open:g,onOpenChange:R=>{v(R),R||S("")}},m.createElement(Km,{role:"combobox","aria-label":i,"aria-expanded":g,"aria-controls":g?w:void 0,"aria-haspopup":"listbox",disabled:o,className:Ke(hu({variant:"outline"}),"dashboard-picker justify-between font-normal"),title:k},m.createElement("span",{className:"truncate"},k),m.createElement(tc,{className:"shrink-0 opacity-50"})),m.createElement(Zm,{align:"start",className:"dashboard-picker-menu p-0"},m.createElement(pC,{shouldFilter:!1},m.createElement(hC,{value:y,onValueChange:S,"aria-label":a,placeholder:a}),m.createElement(mC,{id:w,"aria-label":i},m.createElement(gC,null,l),b.map(R=>m.createElement("div",{key:R.artifactId,className:"flex items-center gap-1"},m.createElement(vC,{value:R.artifactId,className:"min-w-0 flex-1",disabled:o,keywords:[R.title??R.artifactId],"data-checked":R.artifactId===t,onSelect:()=>{v(!1),S(""),R.artifactId!==t&&d(R.artifactId)}},m.createElement("span",{className:"min-w-0 truncate",title:R.title??R.artifactId},R.title??R.artifactId)),R.canDelete&&m.createElement(pt,{variant:"ghost",size:"icon",disabled:o,"aria-label":u(R.title??R.artifactId),title:u(R.title??R.artifactId),onKeyDown:D=>D.stopPropagation(),onClick:()=>{v(!1),S(""),h(R.artifactId)}},m.createElement(T0,{"aria-hidden":"true"}))))))))}const o_=xe({published:xe({versionId:te(),versionNumber:mt(),title:te().nullish()}).nullable(),issues:nt(xe({code:te(),bindingId:te().optional()})),link:xe({status:te(),versionMode:Hn(["latest","version"]),versionId:te().nullish(),url:te().url().optional()}).nullable()}),i_=xe({success:Qe(!0),data:o_});function s_({artifactId:r,versionId:t,versions:o,t:i,onClose:a}){const[l,u]=m.useState(null),[d,h]=m.useState("latest"),[g,v]=m.useState(t??o[0]?.versionId??""),[y,S]=m.useState(!1),[b,w]=m.useState(""),[_,k]=m.useState(!1),R=m.useRef(null),D=m.useRef(0),T=m.useRef(!1);async function O(j){const Y=++D.current;S(!0),w(""),k(!1);try{const ce=i_.parse(await tn("executeAction",{actionKey:j,input:{artifactId:r,...j==="share"?{versionMode:d}:{},...j!=="revoke-share"&&d==="version"&&g?{versionId:g}:{}}})).data;Y===D.current&&(u(ce),T.current||(T.current=!0,ce.link?.status==="active"&&(h(ce.link.versionMode),ce.link.versionId&&v(ce.link.versionId))))}catch{Y===D.current&&w(i.error)}finally{Y===D.current&&S(!1)}}m.useEffect(()=>(O("share-status"),()=>{++D.current}),[r,d,g]);const V=l?.link?.status==="active"?l.link:null,L=V&&V.versionMode===d&&(d==="latest"||V.versionId===g),B=j=>j==="DASHBOARD_PUBLISH_BEFORE_SHARING"?i.publishBeforeShare:j==="WORKSPACE_SCRIPT_PRIVATE_DEPENDENCIES"||j==="DASHBOARD_PRIVATE_DEPENDENCY"?i.privateDependencies:i.sourceUnavailable;return m.createElement(tC,{open:!0,onOpenChange:j=>{!j&&!y&&a()}},m.createElement(oC,null,m.createElement(iC,null,m.createElement(aC,null,i.share),m.createElement(lC,null,i.shareHint)),m.createElement("div",{className:"grid gap-4 py-2"},m.createElement("label",{className:"grid gap-2 text-sm"},i.shareVersion,m.createElement(Ho,{value:d,disabled:y,onValueChange:j=>h(j==="version"?"version":"latest")},m.createElement(Ko,{"aria-label":i.shareVersion},m.createElement(Wo,null)),m.createElement(Zo,null,m.createElement(fn,{value:"latest"},i.shareLatest),m.createElement(fn,{value:"version"},i.shareFixed)))),d==="version"&&m.createElement(Ho,{value:g,disabled:y,onValueChange:v},m.createElement(Ko,{"aria-label":i.version},m.createElement(Wo,{placeholder:i.version})),m.createElement(Zo,null,o.filter(j=>j.versionId).map(j=>m.createElement(fn,{key:j.versionId,value:j.versionId},i.version," ",j.versionNumber)))),l?.published&&m.createElement("p",{className:"text-sm text-muted-foreground"},l.published.title," · ",i.version," ",l.published.versionNumber),!!l?.issues.length&&m.createElement("ul",{className:"grid gap-2 text-sm text-destructive",role:"alert"},l.issues.map((j,Y)=>m.createElement("li",{key:Y},B(j.code),j.bindingId?` (${j.bindingId})`:""))),m.createElement("p",{className:"text-xs text-muted-foreground"},i.sharePermissions),V?.url&&m.createElement("div",{className:"grid gap-2"},m.createElement("label",{htmlFor:"dashboard-share-url",className:"text-sm"},i.shareLink),m.createElement(Hm,{id:"dashboard-share-url",ref:R,readOnly:!0,value:V.url,onFocus:j=>j.target.select()}),m.createElement("div",{className:"flex gap-2"},m.createElement(pt,{variant:"outline",onClick:()=>{R.current?.focus(),R.current?.select(),k(document.execCommand("copy"))}},_?i.copied:i.copyLink),m.createElement(pt,{variant:"outline",onClick:async()=>{if(V.url){w("");try{xe({success:Qe(!0)}).parse(await tn("invokeClientCommand",{commandKey:"artifact.presentation.open",payload:{url:V.url}}))}catch{w(i.error)}}}},i.openShared))),b&&m.createElement("p",{role:"alert",className:"text-sm text-destructive"},b)),m.createElement(sC,null,V&&m.createElement(pt,{variant:"outline",disabled:y,onClick:()=>{O("revoke-share")}},i.revokeShare),m.createElement(pt,{variant:"outline",disabled:y,onClick:a},i.cancel),m.createElement(pt,{disabled:y||!l||!!l.issues.length||!!L,onClick:()=>{O("share")}},V?i.updateShare:i.enableShare))))}function a_({children:r,busy:t,t:o}){const[i,a]=m.useState(!1),l=m.useRef(!1),u=m.useRef(null),d=m.useRef(!1),h=m.useRef(),g=()=>{clearTimeout(h.current)},v=b=>{g(),b||(l.current=!1),a(b)},y=b=>{b.pointerType==="mouse"&&(g(),a(!0))},S=b=>{b.pointerType!=="mouse"||l.current||(g(),h.current=setTimeout(()=>{l.current||a(!1)},180))};return m.useEffect(()=>()=>clearTimeout(h.current),[]),m.useEffect(()=>{if(!i)return;let b;const w=()=>{b=setTimeout(()=>{document.activeElement instanceof HTMLIFrameElement&&v(!1)},0)};return window.addEventListener("blur",w),()=>{window.removeEventListener("blur",w),clearTimeout(b)}},[i]),m.createElement(Wm,{open:i,onOpenChange:v},m.createElement("div",{className:"viewer-controls-trigger"},m.createElement(Km,{asChild:!0},m.createElement("button",{ref:u,type:"button",className:Ke(hu({variant:"outline",size:"icon"}),"viewer-controls-button"),"aria-label":o.viewerControls,title:o.viewerControls,onPointerEnter:y,onPointerLeave:S,onClick:b=>{b.preventDefault(),g(),l.current?v(!1):(l.current=!0,a(!0))}},t?m.createElement(nc,{className:"motion-safe:animate-spin","aria-hidden":"true"}):m.createElement(R0,{"aria-hidden":"true"}),t&&m.createElement("span",{role:"status",className:"sr-only"},o.loading)))),m.createElement(Zm,{align:"end",side:"bottom",sideOffset:8,collisionPadding:12,"aria-label":o.viewerControls,className:"viewer-controls-panel w-[min(44rem,calc(100vw-24px))] gap-0 p-0",onPointerEnter:y,onPointerLeave:S,onPointerDownCapture:()=>{l.current=!0},onFocusCapture:()=>{l.current=!0},onOpenAutoFocus:b=>{l.current||b.preventDefault()},onEscapeKeyDown:()=>{d.current=!0},onCloseAutoFocus:b=>{b.preventDefault(),d.current&&u.current?.focus({preventScroll:!0}),d.current=!1}},r,m.createElement(pt,{variant:"ghost",size:"icon",className:"viewer-controls-close","aria-label":o.hideViewerControls,title:o.hideViewerControls,onClick:()=>{d.current=!0,v(!1)}},m.createElement(op,{"aria-hidden":"true"}))))}FC(document);const zt=window.__DASHBOARD_READ_ONLY__===!0,Pa=xe({success:Qe(!0),data:Jr()}),l_=xe({payload:Jr(),failures:nt(xe({bindingId:te(),datasetId:te(),reason:Qe("unavailable")})).default([]),datasets:nt(xe({completeness:xe({truncated:Tt()}),freshness:xe({sourceFetchedAt:te()})}))});function c_(){const[r,t]=m.useState(()=>ug("en-US")),[o,i]=m.useState([]),[a,l]=m.useState([]),[u,d]=m.useState(null),[h,g]=m.useState([]),[v,y]=m.useState({}),[S,b]=m.useState(""),[w,_]=m.useState(!0),[k,R]=m.useState(""),[D,T]=m.useState(""),[O,V]=m.useState("off"),[L,B]=m.useState(null),[j,Y]=m.useState(null),[ce,Ce]=m.useState(""),[le,ue]=m.useState(!1),[se,be]=m.useState(null),[ae,oe]=m.useState(!1),[U,G]=m.useState([]),[z,I]=m.useState(!1),E=m.useRef(0),W=m.useRef(0),J=m.useRef(0),H=m.useRef(),re=m.useRef(),pe=m.useRef(),X=m.useRef(null),ne=m.useRef({dirty:!1,resourceId:""}),Te=L!==null&&L!==JSON.stringify(u?.manifest,null,2);ne.current={dirty:Te||w&&L!==null,resourceId:u?.artifactId??""};const $e=ie=>{u&&tn("invokeClientCommand",{commandKey:"workbench.content.status",payload:{resourceId:u.artifactId,title:u.title,dirty:ie}}).catch(()=>{})};m.useEffect(()=>{$e(Te||w&&L!==null)},[Te,w,L===null,u?.artifactId,u?.title]),m.useEffect(()=>QC(ie=>ie!==ne.current.resourceId||!ne.current.dirty),[]);function je(){H.current=void 0,b(""),G([]),d(null),B(null),g([]),I(!1),be(null),Y(null),Ce(""),y({}),T(""),oe(!1)}async function ze(ie,Ne){const Ye=E.current,Xe=++J.current,Be=HC.parse(await tn("requestData",{query:{parameters:ie?{artifactId:ie,...Ne?{versionId:Ne}:{}}:{}}})).meta;return Ye===E.current&&Xe===J.current&&(i(Be.dashboards),l(Be.sources),re.current=Be.navigationTarget),Be}async function ot(ie,Ne){const Ye=++E.current;if(!ie.versionId&&!ie.draftRevision)throw new Error("Missing saved definition");if(b(""),G([]),T(""),oe(!1),!ie.manifest.bindings.length)return;const Xe=l_.parse(Pa.parse(await tn("executeAction",{actionKey:"query",input:{artifactId:ie.artifactId,versionId:ie.versionId??void 0,...ie.isDraft?{draftRevision:ie.draftRevision}:{},controls:Ne}})).data);Ye===E.current&&(G(Xe.failures.map(Be=>Be.datasetId)),b(Xe.datasets.length?d_(Xe.payload):""),oe(Xe.datasets.some(Be=>Be.completeness.truncated)),T(Xe.datasets.map(Be=>Be.freshness.sourceFetchedAt).sort()[0]??""))}async function it(ie,Ne,Ye=!0){const Xe=++E.current;je(),H.current=ie;const Be=await ze(ie,Ne),Ft=Be.saved;if(Xe!==E.current)return;if(!Ft||!Ft.versionId&&!Ft.draftRevision)throw new Error("Dashboard is unavailable");const Pr=Object.fromEntries(Ft.manifest.controls.filter(Dn=>Dn.defaultValue!==void 0).map(Dn=>[Dn.controlId,Dn.defaultValue??null]));d(Ft),g(Be.versions??[]),y(Pr),T(""),oe(!1),!(!zt&&Ye&&(pe.current=yu({artifactId:ie,versionId:Ne}),await lg(Be.navigationTarget,ie,Ne),Xe!==E.current))&&(zt||await ag({artifactId:Ft.artifactId,versionId:Ft.versionId??void 0,draftRevision:Ft.draftRevision}),Xe===E.current&&!Ft.manifest.presentation&&Ft.manifest.bindings.length&&await ot(Ft,Pr))}async function St(ie){const Ne=++W.current;_(!0),R("");try{await ie()}catch(Ye){Ne===W.current&&R(Ye instanceof Error?Ye.message:r.error)}finally{Ne===W.current&&_(!1)}}const Tn=m.useRef({saved:u,controls:v,busy:w,editor:L,confirmDelete:j});Tn.current={saved:u,controls:v,busy:w,editor:L,confirmDelete:j},m.useEffect(()=>{if(O==="off")return;let ie=!1,Ne=!1;const Ye=async()=>{const Be=Tn.current;if(!(ie||!GC()||Ne||Be.busy||Be.confirmDelete||Be.editor!==null||!Be.saved?.manifest.bindings.length)){Ne=!0;try{Be.saved.manifest.presentation?X.current?.refresh():await ot(Be.saved,Be.controls)}catch{ie||R(r.error)}finally{Ne=!1}}},Xe=window.setInterval(()=>{Ye()},Number(O)*1e3);return document.addEventListener("visibilitychange",Ye),()=>{ie=!0,window.clearInterval(Xe),document.removeEventListener("visibilitychange",Ye)}},[O,u?.artifactId,r.error]);async function rr(){const ie=++E.current;je();const Ne=await ze();if(ie!==E.current)return;const Ye=[...Ne.dashboards].sort((Xe,Be)=>(Be.updatedAt??"").localeCompare(Xe.updatedAt??""))[0];Ye&&await it(Ye.artifactId,void 0,!1)}m.useEffect(()=>XC((ie,Ne)=>{t(ug(ie));const Ye=UC.safeParse(Ne??{});if(!Ye.success){++E.current,pe.current=void 0,je(),St(async()=>{throw new Error("DASHBOARD_NAVIGATION_INVALID")});return}const Xe=Ye.data,Be=yu(Xe);Be!==pe.current&&(pe.current=Be,St(()=>Xe.artifactId?it(Xe.artifactId,Xe.versionId,!1):rr()))},ie=>{St(()=>it(ie))}),[]);async function Hi(){const ie=Ra.parse(JSON.parse(L??"")),Ne=u?.manifest.id===ie.id?u.versionId??null:null,Ye=Bi.parse(Pa.parse(await tn("executeAction",{actionKey:"save",input:{manifest:ie,expectedVersionId:Ne,expectedRevision:u?.manifest.id===ie.id?u.draftRevision??0:0}})).data);await it(Ye.artifactId)}async function uo(){if(!se?.draftRevision)return;const ie=Bi.parse(Pa.parse(await tn("executeAction",{actionKey:"publish",input:{artifactId:se.artifactId,expectedRevision:se.draftRevision,expectedCurrentVersionId:se.baseVersionId??se.versionId??null,confirmed:!0}}).catch(Ne=>{throw Ne instanceof Error&&Ne.message==="DASHBOARD_PUBLISH_SHARE_BLOCKED"?(be(null),new Error(r.publishShareBlocked)):Ne})).data);be(null),await it(ie.artifactId,ie.versionId??void 0)}async function Rr(){const ie=j;if(!(le||!ie?.canDelete||!ie.draftRevision)){Ce(""),ue(!0);try{const Ne=xe({artifactId:Qe(ie.artifactId)}).parse(Pa.parse(await tn("executeAction",{actionKey:"delete",input:{artifactId:ie.artifactId,expectedRevision:ie.draftRevision,confirmed:!0}})).data);Y(null),i(Ye=>Ye.filter(Xe=>Xe.artifactId!==Ne.artifactId)),H.current===Ne.artifactId&&(++E.current,je(),pe.current=yu({artifactId:void 0,versionId:void 0}),await Promise.all([ag(null),lg(re.current)])),await ze()}catch(Ne){throw Ce(Ne instanceof Error?Ne.message:r.error),Ne}finally{ue(!1)}}}const Qo=m.createElement("header",{className:"dashboard-toolbar border-b"},m.createElement("h1",{className:"toolbar-title text-base font-semibold"},zt?u?.title??r.title:r.title),!zt&&m.createElement(r_,{items:o,value:u?.artifactId??"",disabled:w||le||L!==null,label:r.select,searchLabel:r.search,emptyLabel:r.noResults,deleteLabel:ie=>Go.t("deleteNamedDashboard",{title:ie}),onDelete:ie=>{Ce(""),Y(o.find(Ne=>Ne.artifactId===ie)??null)},onChange:ie=>{St(()=>it(ie))}}),zt&&u&&m.createElement("span",{className:"text-xs text-muted-foreground"},r.teamReadOnly," · ",r.version," ",u.versionNumber),m.createElement("span",{className:"toolbar-loading text-muted-foreground",role:"status",title:w?r.loading:void 0},w&&m.createElement(m.Fragment,null,m.createElement(nc,{className:"size-4 motion-safe:animate-spin","aria-hidden":"true"}),m.createElement("span",{className:"sr-only"},r.loading))),!zt&&u&&m.createElement(Ho,{value:u.isDraft?"draft":u.versionId??"draft",onValueChange:ie=>{St(()=>it(u.artifactId,ie==="draft"?void 0:ie))},disabled:w||L!==null},m.createElement(Ko,{className:"toolbar-version","aria-label":r.history},m.createElement(Wo,{placeholder:r.history})),m.createElement(Zo,null,m.createElement(fn,{value:"draft"},r.draft,u.isDraft?` · r${u.draftRevision}`:""),h.filter(ie=>ie.versionId).map(ie=>m.createElement(fn,{key:ie.versionId,value:ie.versionId},r.version," ",ie.versionNumber)))),u&&D&&m.createElement("time",{className:"toolbar-updated text-xs text-muted-foreground",dateTime:D,title:`${r.refreshed}: ${new Date(D).toLocaleString(document.documentElement.lang)}`},m.createElement("span",{className:"toolbar-full-date"},new Date(D).toLocaleString(document.documentElement.lang)),m.createElement("span",{className:"toolbar-short-date"},new Date(D).toLocaleTimeString(document.documentElement.lang))),m.createElement("div",{className:"toolbar-actions"},!zt&&u?.isDraft&&m.createElement(pt,{disabled:w||L!==null||!u.manifest.bindings.length,onClick:()=>be(u),"aria-label":r.publish,title:r.publish},m.createElement(ip,null),m.createElement("span",null,r.publish)),!zt&&u&&m.createElement(pt,{variant:"outline",disabled:w||L!==null,"aria-label":r.edit,title:r.edit,onClick:()=>{St(async()=>{const ie=await ze(u.artifactId);if(!ie.saved)throw new Error(r.error);d(ie.saved),g(ie.versions??[]),B(JSON.stringify(ie.saved.manifest,null,2))})}},m.createElement(P0,null),m.createElement("span",null,r.edit)),!zt&&m.createElement(pt,{variant:"outline",disabled:w||L!==null,"aria-label":r.import,title:r.import,onClick:()=>B("")},m.createElement(I0,null),m.createElement("span",null,r.import)),!zt&&u&&m.createElement(pt,{variant:"outline",onClick:()=>I(!0),disabled:w,"aria-label":r.share,title:r.share},m.createElement(N0,null),m.createElement("span",null,r.share)),m.createElement(Ho,{value:O,onValueChange:V,disabled:!u||L!==null},m.createElement(Ko,{"aria-label":r.autoRefresh},m.createElement(Wo,null)),m.createElement(Zo,null,m.createElement(fn,{value:"off"},r.off),m.createElement(fn,{value:"30"},r.seconds30),m.createElement(fn,{value:"60"},r.minute1))),m.createElement(pt,{disabled:w||L!==null,"aria-label":r.refresh,title:r.refresh,onClick:()=>{u?.manifest.presentation?(R(""),X.current?.refresh()):St(async()=>{u?(await ze(),await ot(u,v)):await rr()})}},m.createElement(nc,null),m.createElement("span",null,r.refresh)))),Wi=u&&!u.manifest.presentation&&!!u.manifest.controls.length&&m.createElement("section",{className:"flex flex-wrap items-end gap-3 border-b px-4 py-3"},u.manifest.controls.map(ie=>m.createElement(u_,{key:ie.controlId,control:ie,value:v[ie.controlId]??null,disabled:w,onChange:Ne=>y(Ye=>({...Ye,[ie.controlId]:Ne}))})),m.createElement(pt,{type:"button",variant:"outline",disabled:w,onClick:()=>{St(()=>ot(u,v))}},r.apply));return m.createElement("main",{className:"dashboard-shell","data-read-only":zt||void 0},zt?m.createElement(a_,{busy:w,t:r},Qo,Wi):Qo,!zt&&z&&u&&m.createElement(s_,{artifactId:u.artifactId,versionId:u.versionId??void 0,versions:h,t:r,onClose:()=>I(!1)}),m.createElement(Mm,{open:!!j,onOpenChange:ie=>{!ie&&!w&&!le&&Y(null)}},m.createElement(zm,null,m.createElement(Vm,null,r.deleteDashboard),m.createElement(Um,null,Go.t("confirmDeleteDashboard",{title:j?.title??j?.artifactId??""})),m.createElement("p",{className:"break-all text-xs text-muted-foreground"},j?.artifactId),ce&&m.createElement("p",{role:"alert",className:"text-destructive"},ce),m.createElement(Fm,null,m.createElement(Bm,{disabled:w||le},r.cancel),m.createElement(pt,{variant:"destructive",disabled:w||le,onClick:()=>{St(Rr)}},le?r.deleting:r.deleteDashboard)))),m.createElement(Mm,{open:!!se,onOpenChange:ie=>{!ie&&!w&&be(null)}},m.createElement(zm,null,m.createElement(Vm,null,r.publish),m.createElement(Um,null,r.confirmPublish," ",se?.manifest.title," · r",se?.draftRevision),m.createElement(Fm,null,m.createElement(Bm,{disabled:w},r.cancel),m.createElement(pt,{disabled:w,onClick:()=>{St(uo)}},r.confirm)))),k&&m.createElement("div",{role:"alert",className:"border-b px-4 py-3 text-destructive"},k),L!==null?m.createElement("section",{className:"editor-panel p-4"},m.createElement("label",{className:"text-sm font-medium",htmlFor:"definition"},r.definition),m.createElement(cC,{id:"definition",className:"min-h-0 flex-1 font-mono text-xs",value:L,onChange:ie=>{ne.current.dirty=!0,$e(!0),B(ie.target.value)},disabled:w}),m.createElement("details",{className:"text-xs"},m.createElement("summary",null,r.sources),m.createElement("pre",{className:"max-h-32 overflow-auto"},JSON.stringify(a,null,2))),m.createElement("div",{className:"flex justify-end gap-2"},m.createElement(pt,{variant:"outline",onClick:()=>B(null),disabled:w},r.cancel),m.createElement(pt,{onClick:()=>{St(Hi)},disabled:w||!L.trim()},m.createElement(ip,null),r.save))):m.createElement(m.Fragment,null,!zt&&Wi,U.length>0&&m.createElement("div",{role:"alert",className:"px-4 py-2 text-sm"},m.createElement("p",null,r.bindingUnavailable),m.createElement("ul",null,U.map(ie=>m.createElement("li",{key:ie},[...u?.manifest.charts??[],...u?.manifest.tables??[]].filter(Ne=>Ne.datasetId===ie).map(Ne=>Ne.title).join(" · ")||ie)))),ae&&m.createElement("p",{role:"status",className:"px-4 py-2 text-sm"},r.partial),m.createElement("section",{className:"canvas-panel","aria-busy":w},!w&&!S&&!u?.manifest.presentation&&!k&&!U.length&&m.createElement("p",{className:"p-6 text-muted-foreground"},r.empty),u?.manifest.presentation&&m.createElement(n_,{ref:X,artifactId:u.artifactId,versionId:u.versionId??void 0,draftRevision:u.isDraft?u.draftRevision:void 0,manifest:u.manifest,dependencies:u.dependencies??[],onBusy:_,onError:R,onResult:ie=>{R(""),oe(ie.partial),T(ie.fetchedAt)}}),S&&m.createElement("iframe",{title:u?.manifest.title??r.title,sandbox:"allow-scripts",srcDoc:S,className:"h-full w-full border-0"}))))}function u_({control:r,value:t,onChange:o,disabled:i}){return m.createElement("div",{className:"grid gap-1.5"},m.createElement("label",{htmlFor:r.controlId,className:"text-xs text-muted-foreground"},r.label),r.allowedValues?m.createElement(Ho,{value:JSON.stringify(t),onValueChange:a=>o(Bn([te(),mt(),Tt(),hr()]).parse(JSON.parse(a))),disabled:i},m.createElement(Ko,{id:r.controlId,className:"w-44"},m.createElement(Wo,null)),m.createElement(Zo,null,r.allowedValues.map(a=>m.createElement(fn,{key:JSON.stringify(a),value:JSON.stringify(a)},String(a??"—"))))):r.type==="boolean"?m.createElement(Ho,{value:String(t),onValueChange:a=>o(a==="true"),disabled:i},m.createElement(Ko,{id:r.controlId,className:"w-44"},m.createElement(Wo,null)),m.createElement(Zo,null,m.createElement(fn,{value:"true"},"true"),m.createElement(fn,{value:"false"},"false"))):m.createElement(Hm,{id:r.controlId,className:"w-44",disabled:i,type:r.type==="date"?"date":r.type==="number"?"number":"text",value:t===null?"":String(t),onChange:a=>o(a.target.value===""?null:r.type==="number"?Number(a.target.value):a.target.value)}))}function d_(r){const t=i=>JSON.stringify(i).replace(/</g,"\\u003c").replace(/>/g,"\\u003e"),o=`<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; img-src data: blob:; font-src data:; connect-src 'none'; frame-src 'none'; base-uri 'none'; form-action 'none'"><script>window.__DATASCIENCE_ARTIFACT_HOSTING__={mode:'site_creator',readOnly:true,controls:{edit:false,exportHostedLink:false,hostedLink:false}};window.xpertai={toolOutput:${t(r)},toolResponseMetadata:${t(r)},availableDisplayModes:['inline','fullscreen'],displayMode:'fullscreen',hostContext:{availableDisplayModes:['inline','fullscreen'],displayMode:'fullscreen'}};
|
|
251
|
+
`,fI=me({channel:Je(ey),version:Je(ty),type:Je("ready"),sessionId:te().regex(/^[a-f0-9]{32}$/)}).strict(),pI=me({type:Je("diagnostic"),code:Je("DOCUMENT_BINDING_DENIED")}).strict();function hI(n,e){if(!n.ownerDocument.querySelector("meta[data-xpert-document-policy]"))throw new Error("Install the Artifact document frame policy before mounting a document");const o=rI.parse(e.context),s=Array.from(crypto.getRandomValues(new Uint8Array(16)),O=>O.toString(16).padStart(2,"0")).join(""),i=uI(e.html,s,e.dependencies,e.networkPolicy),l=new MessageChannel,u=new Set(o.bindingIds),d=new Set,h=new Set,m=new Map,y=n.ownerDocument.defaultView;let v=!1,x=!1,b=0,S=Date.now();n.setAttribute("sandbox","allow-scripts"),n.referrerPolicy="no-referrer";const C=(O,R)=>{try{O?.(R)}catch{}},k=O=>{x||l.port1.postMessage(O)},N=(O,R)=>{k({type:"result",requestId:O,ok:!1,code:R}),C(e.onError,R)};l.port1.onmessage=async O=>{if(x)return;const R=pI.safeParse(O.data);if(R.success){C(e.onError,R.data.code);return}const L=nI.safeParse(O.data);if(!L.success){C(e.onError,"DOCUMENT_INVALID_REQUEST");return}const j={type:L.data.type,requestId:L.data.requestId,bindingId:L.data.bindingId,controls:L.data.controls};if(!u.has(j.bindingId)){N(j.requestId,"DOCUMENT_BINDING_DENIED");return}if(Date.now()-S>=6e4&&(b=0,S=Date.now(),d.clear()),h.has(j.requestId)||d.has(j.requestId)){N(j.requestId,"DOCUMENT_REQUEST_REPLAY");return}if(h.size>=8||++b>60){N(j.requestId,"DOCUMENT_QUERY_LIMIT");return}d.add(j.requestId),h.add(j.requestId),m.set(j.bindingId,j.requestId),C(e.onBusy,!0);try{const B=await e.query(j);x||(k({type:"result",requestId:j.requestId,ok:!0,dataset:B}),m.get(j.bindingId)===j.requestId&&C(e.onResult,B))}catch{x||(k({type:"result",requestId:j.requestId,ok:!1,code:"DOCUMENT_QUERY_FAILED"}),m.get(j.bindingId)===j.requestId&&C(e.onError,"DOCUMENT_QUERY_FAILED"))}finally{h.delete(j.requestId),x||C(e.onBusy,h.size>0)}};const D=O=>{var R;if(x||v||O.source!==n.contentWindow)return;const L=fI.safeParse(O.data);!L.success||L.data.sessionId!==s||(v=!0,(R=n.contentWindow)==null||R.postMessage({channel:ey,version:ty,type:"init",sessionId:s,context:o},"*",[l.port2]))};return y.addEventListener("message",D),l.port1.start(),n.srcdoc=i,{refresh(){k({type:"refresh"})},dispose(){x||(x=!0,y.removeEventListener("message",D),l.port1.close(),l.port2.close(),C(e.onBusy,!1))}}}function mI(n){if(n.querySelector("meta[data-xpert-document-policy]"))return;const e=n.createElement("meta");e.httpEquiv="Content-Security-Policy",e.content="frame-src 'none'",e.dataset.xpertDocumentPolicy="1",n.head.prepend(e)}const qn=te().regex(/^[A-Za-z][A-Za-z0-9_.-]{0,79}$/),Pl=me({schema:Je("xpert.live-dashboard"),id:te().uuid(),title:te().min(1).max(160),bindings:nt(Jv).max(8),presentation:me({type:Je("html"),html:ry,dependencies:Md.optional()}).strict().optional(),controls:nt(me({controlId:qn,type:en(["string","number","boolean","date"]),defaultValue:lr([te(),tt(),ot(),Ar()]).optional(),allowedValues:nt(lr([te(),tt(),ot(),Ar()])).max(200).optional(),label:te().min(1).max(160)}).strict()).max(24),charts:nt(me({id:qn,title:te().min(1).max(160),type:en(["bar","line","area","pie","scatter"]),datasetId:qn,x:qn,y:qn,color:qn.optional()}).strict()).max(20),tables:nt(me({id:qn,title:te().min(1).max(160),datasetId:qn,fields:nt(qn).min(1).max(30)}).strict()).max(20)}).strict().superRefine((n,e)=>{const o=(s,i)=>{new Set(s).size!==s.length&&e.addIssue({code:"custom",message:`Duplicate ${i}`})};!n.bindings.length&&(n.presentation||n.controls.length||n.charts.length||n.tables.length)&&e.addIssue({code:"custom",message:"An unconfigured draft must contain no views or controls"}),o(n.bindings.map(s=>s.id),"binding"),o(n.bindings.map(s=>s.output.datasetId),"dataset"),o(n.controls.map(s=>s.controlId),"control"),o([...n.charts,...n.tables].map(s=>s.id),"view"),n.bindings.length&&!n.presentation&&!n.charts.length&&!n.tables.length&&e.addIssue({code:"custom",message:"At least one chart or table is required"}),n.presentation&&(n.charts.length||n.tables.length)&&e.addIssue({code:"custom",message:"HTML presentation owns its charts; use empty charts/tables arrays"});for(const s of n.controls){const i=n.bindings.flatMap(u=>u.parameters.filter(d=>d.controlId===s.controlId));i.length||e.addIssue({code:"custom",message:"Control is not bound to a query parameter"});const l=[...s.defaultValue!==void 0?[s.defaultValue]:[],...s.allowedValues??[]];l.some(u=>u!==null&&(s.type==="number"?typeof u!="number"||!Number.isFinite(u):s.type==="boolean"?typeof u!="boolean":typeof u!="string"))&&e.addIssue({code:"custom",message:"Control value has an incompatible type"}),s.allowedValues&&s.defaultValue!==void 0&&!s.allowedValues.includes(s.defaultValue)&&e.addIssue({code:"custom",message:"Default control value is not allowed"});for(const u of i)u.defaultValue!==void 0&&s.defaultValue!==void 0&&u.defaultValue!==s.defaultValue&&e.addIssue({code:"custom",message:"Control and parameter defaults disagree"}),l.some(d=>d===null?u.required:u.allowedValues&&!u.allowedValues.includes(d))&&e.addIssue({code:"custom",message:"Control values conflict with parameter restrictions"})}for(const s of n.bindings)for(const i of s.parameters){const l=n.controls.find(u=>u.controlId===i.controlId);(!l||l.type!==i.type)&&e.addIssue({code:"custom",message:"Control mapping is missing or has an incompatible type"})}for(const s of[...n.charts,...n.tables]){const i=n.bindings.find(u=>u.output.datasetId===s.datasetId)?.output,l="fields"in s?s.fields:[s.x,s.y,...s.color?[s.color]:[]];(!i||l.some(u=>!i.fields.some(d=>d.id===u)))&&e.addIssue({code:"custom",message:"View references an undeclared Dataset field"}),"y"in s&&!i?.fields.some(u=>u.id===s.y&&["float64","int64","decimal"].includes(u.logicalType))&&e.addIssue({code:"custom",message:"Chart measure must be numeric"}),"y"in s&&s.type!=="scatter"&&i?.grain.some(u=>u!==s.x&&u!==s.color)&&e.addIssue({code:"custom",message:"Chart must encode every Dataset grain dimension in x/color; use another aggregated binding for totals"})}});Pl.innerType().pick({title:!0,bindings:!0,controls:!0,charts:!0,tables:!0,presentation:!0}).partial().strict();const gI=Mr(lr([te().max(4e3),tt().finite(),ot(),Ar()]));me({manifest:Pl,expectedVersionId:te().uuid().nullable(),expectedRevision:tt().int().nonnegative().default(0)}).strict(),me({artifactId:te().uuid(),versionId:te().uuid().optional(),draftRevision:tt().int().positive().optional(),controls:gI.default({})}).strict().extend({bindingId:qn}).strict(),me({search:te().trim().max(200).default(""),page:tt().int().positive().default(1)}).strict().extend({projectId:te().uuid().optional()});const ly=me({id:te().uuid(),name:te()}),vI=me({items:nt(ly),page:tt().int().positive(),hasMore:ot()}),cy=me({target:Je("workbench.view"),viewKey:Je("live-dashboard__live-dashboard")}).strict(),yI=me({selectionId:te().uuid().optional(),page:tt().int().positive().optional(),pageSize:tt().int().min(1).max(100).optional(),parameters:me({pipelineInstanceId:te().uuid().optional(),pipelineRoundId:te().uuid().optional(),pipelineNodeId:te().uuid().optional(),contentProvider:te().optional(),contentId:te().uuid().optional(),contentTitle:te().optional(),contentEditor:te().optional(),artifactId:te().uuid().optional(),versionId:te().uuid().optional(),newDashboard:ot().optional(),picker:Je("dashboards").optional(),draftRevision:tt().int().positive().optional(),mode:en(["published","draft"]).optional()}).strict().optional()}).transform((n,e)=>{const o=n.selectionId??n.parameters?.artifactId,s=n.parameters?.versionId;return(n.parameters?.newDashboard&&o||n.selectionId&&n.parameters?.artifactId&&n.selectionId!==n.parameters.artifactId||s&&!o)&&e.addIssue({code:oe.custom,message:"DASHBOARD_NAVIGATION_INVALID: provide one Artifact identity and an optional version"}),{artifactId:o,versionId:s,...n.parameters?.draftRevision?{draftRevision:n.parameters.draftRevision}:{},...n.page?{page:n.page}:{},...n.pageSize?{pageSize:n.pageSize}:{},...n.parameters?.mode?{mode:n.parameters.mode}:{},...n.parameters?.picker?{picker:n.parameters.picker}:{},...n.parameters?.newDashboard?{newDashboard:!0}:{}}}),ki=n=>JSON.stringify([n.artifactId??null,n.versionId??null,n.newDashboard??!1,n.mode??null,n.draftRevision??null,n.picker??null]),jo=me({artifactId:te(),versionId:te().nullish(),versionNumber:tt().optional(),title:te().nullish(),updatedAt:te().optional(),draftRevision:tt().optional(),canDelete:ot().optional(),isDraft:ot().optional(),baseVersionId:te().nullish()}),xI=me({items:nt(jo),page:tt().int().positive(),hasMore:ot(),canEdit:ot().default(!1),mode:en(["draft","published"]).optional()}),wI=jo.extend({manifest:Pl,dependencies:sy.optional()}),bI=me({meta:me({currentProject:ly.nullable().optional(),access:me({project:ot(),archived:ot(),canReadDraft:ot(),canEdit:ot(),canManage:ot()}).optional(),mode:en(["published","draft"]).optional(),notice:Je("not_published").optional(),pagination:me({page:tt(),pageSize:tt(),hasMore:ot()}).optional(),navigationTarget:cy.optional(),dashboards:nt(jo),selectedDashboard:jo.optional(),sources:nt(me({source:$d,name:te()})),saved:wI.optional(),versions:nt(jo).optional()})}),SI=["dashboard_create","dashboard_create_html","dashboard_update"],CI=me({dashboard:me({artifactId:te().uuid(),draftRevision:tt().int().positive(),status:Je("draft")})});function kI(n){let e=n;if(typeof e=="string")try{e=JSON.parse(e)}catch{return null}const o=CI.safeParse(e);return o.success?o.data.dashboard:null}const EI=me({channel:Je("xpertai.remote_component"),protocolVersion:Je(1),type:te(),visible:ot().optional(),scopeRevision:tt().optional(),kind:te().optional(),resourceId:te().optional(),instanceId:te().optional(),requestId:te().optional(),locale:te().optional(),initialQuery:$r(),data:$r(),result:$r(),message:te().optional(),event:me({type:te(),toolName:te().optional(),data:me({output:$r(),revision:tt().int().nonnegative().optional()}).optional()}).optional(),theme:me({mode:te().optional(),density:en(["default","compact"]).optional(),tokens:Mr(lr([te(),tt()])).optional()}).optional()});let br,Es,uy,jd=!0;const _I=()=>jd&&!document.hidden,Ld=new Set,PI=n=>(Ld.add(n),()=>{Ld.delete(n)});function dy(){for(const n of Gr.values())clearTimeout(n.timer),n.reject(new Error("Context changed"));Gr.clear()}let RI=0;const Gr=new Map;function Fd(n,e={}){window.parent.postMessage({channel:"xpertai.remote_component",protocolVersion:1,instanceId:br,scopeRevision:Es,type:n,...e},"*")}function II(n,e,o=()=>{}){let s;const i=l=>{if(l.source!==window.parent)return;const u=EI.safeParse(l.data);if(!u.success)return;const d=u.data;if(d.type==="init"){if(br&&d.instanceId!==br)return;Es!==d.scopeRevision&&(dy(),s=void 0,o()),br=d.instanceId,Es=d.scopeRevision,uy=d.initialQuery,jd=d.visible??!0,document.documentElement.classList.toggle("dark",d.theme?.mode==="dark");for(const[m,y]of Object.entries(d.theme?.tokens??{})){const v=m.startsWith("--")?m:`--xui-${m.replace(/[._]/g,"-").replace(/[A-Z]/g,x=>`-${x.toLowerCase()}`)}`;document.documentElement.style.setProperty(v,String(y))}vb({density:d.theme?.density}),n(d.locale??"en-US",d.initialQuery);return}if(d.type==="hostEvent"&&br&&d.instanceId===br&&d.event?.type==="view.context.changed"){const m=d.event.data?.revision;m!==void 0&&m>(Es??-1)&&(dy(),Es=m,s=void 0,o());return}if(!br||d.instanceId!==br||d.scopeRevision!==Es&&d.type!=="error")return;if(d.type==="visibility"){jd=d.visible===!0;return}if(d.type==="editorEvent"&&d.kind==="prepareClose"&&d.resourceId&&d.requestId){Fd("closePrepared",{requestId:d.requestId,ready:[...Ld].every(m=>m(d.resourceId))});return}if(d.type==="hostEvent"&&d.event?.type==="assistant.tool.completed"&&SI.includes(d.event.toolName??"")){const m=kI(d.event.data?.output);m&&`${m.artifactId}:${m.draftRevision}`!==s&&(s=`${m.artifactId}:${m.draftRevision}`,e(m.artifactId));return}if(!d.requestId)return;const h=Gr.get(d.requestId);h&&(Gr.delete(d.requestId),clearTimeout(h.timer),d.type==="error"?h.reject(new Error(d.message??"Request failed")):h.resolve(d.data??d.result))};return window.addEventListener("message",i),Fd("ready"),()=>{window.removeEventListener("message",i);for(const l of Gr.values())clearTimeout(l.timer),l.reject(new Error("View closed"));Gr.clear()}}function Nt(n,e){if(!br)return Promise.reject(new Error("View is not connected"));const o=`dashboard-${++RI}`;return new Promise((s,i)=>{const l=window.setTimeout(()=>{Gr.delete(o),i(new Error("Request timed out"))},27e4);Gr.set(o,{resolve:s,reject:i,timer:l}),Fd(n,{requestId:o,...e})})}function TI(n){return Nt("invokeClientCommand",{commandKey:"assistant.context.set",payload:{key:"live_dashboard",context:n?{schemaVersion:1,...n}:{schemaVersion:1,mode:"new"}}})}async function Rl(n,e,o,s){const i=cy.parse(n),l=me({selectionId:te().optional(),parameters:me({contentId:te().uuid().optional(),contentProvider:te().optional(),contentTitle:te().optional(),contentEditor:te().optional()}).optional()}).safeParse(uy);let u={};if(e&&l.success&&l.data.parameters?.contentId)if(l.data.selectionId===e)u={...l.data.parameters};else{const d=await Nt("invokeClientCommand",{commandKey:"workbench.content.resolve",payload:{providerKey:"live-dashboard.content",resourceId:e}});u=me({success:Je(!0),navigation:me({parameters:Mr($r()).optional()})}).parse(d).navigation.parameters??{}}return Nt("invokeClientCommand",{commandKey:"workbench.navigation.open",payload:{...i,...e?{selectionId:e}:{},parameters:{...u,...s?{mode:s}:{},...o?{versionId:o}:{},...e?{}:{newDashboard:!0}}}})}const fy={bindingUnavailable:"Some views could not load. Check your data access or retry. Available views are shown below.",publishShareBlocked:"This draft contains private or unavailable data sources and cannot replace the version used by the active team share. Remove those bindings or revoke the share before publishing. The published version and link are unchanged.",viewerControls:"Dashboard controls",hideViewerControls:"Hide dashboard controls",share:"Team sharing",teamReadOnly:"Team · read only",shareHint:"Share published versions with signed-in members of this organization. Drafts remain private.",sharePermissions:"Each viewer needs their own data source permissions. Sharing does not grant file or source access.",shareVersion:"Version policy",shareLatest:"Follow latest published version",shareFixed:"Pin a published version",shareLink:"Share link",copied:"Copied",openShared:"Open page",enableShare:"Enable sharing",updateShare:"Update sharing",revokeShare:"Revoke link",publishBeforeShare:"Publish a version before sharing.",privateDependencies:"This provider uses private script or file dependencies. Team access must be supported and granted separately before sharing.",sourceUnavailable:"A declared data source or provider is unavailable.",draft:"Working draft",publish:"Publish draft",confirm:"Confirm publication",confirmPublish:"Publish this saved revision as a new immutable version?",title:"Live dashboards",empty:"Create a dashboard with your Assistant, or import a definition.",import:"Import definition",save:"Save",cancel:"Cancel",refresh:"Refresh",apply:"Apply filters",loading:"Loading…",saved:"Saved",refreshed:"Updated",definition:"Dashboard definition",sources:"Available sources",version:"Version",partial:"Partial result — narrow the filters to retrieve all rows.",select:"Choose a dashboard",error:"The operation failed. Check your access and query definition.",all:"All",edit:"Edit working draft",history:"Version history",search:"Search dashboards…",noResults:"No dashboards found.",autoRefresh:"Auto refresh",off:"Off",seconds30:"Every 30 seconds",minute1:"Every minute",deleteDashboard:"Delete dashboard",deleteNamedDashboard:"Delete “{{title}}”",confirmDeleteDashboard:"Delete “{{title}}”? It will be removed from the dashboard list and shared links will stop working. Source data and workspace files will be kept.",deleting:"Deleting…",newDashboard:"New dashboard",privateScriptPublication:"This is a private Workspace script. Ask the Assistant to prepare a reusable dataset, review its pinned code/files in Settings → Analytics, and publish Organization visibility. Then update this dashboard to that dataset and publish a new dashboard version.",publishDefinitionAudience:"This dataset is private. Its owner can publish Organization visibility in Settings → Analytics; each viewer still needs upstream access.",notPublished:"This dashboard has not been published.",draftAccessDenied:"Only project editors can open working drafts.",loadMore:"Load more",published:"Published version",project:"Project",selectProject:"Select project",searchProjects:"Search projects",noProjects:"No available projects. Create a project in ChatKit.",projectsFailed:"Could not load projects. Please retry.",projectSwitchFailed:"Could not switch project. Please retry.",copyLink:"Copy link",selectProjectDashboard:"Select project and dashboard",more:"More actions",draftRevision:"Draft r{{revision}}",publishedVersion:"Published v{{version}}",dashboards:"Dashboards",previousPage:"Previous page",nextPage:"Next page",projectPages:"Project pages",dashboardPages:"Dashboard pages",dashboardsFailed:"Could not load dashboards. Please retry.",starterTitle:"Start with a working example",starterHint:"Examples use labeled synthetic data and save a draft in the current Project.",regionalTitle:"Regional sales · Beginner",regionalDescription:"Standard bar chart, region filter and detail table.",salesTitle:"Sales overview · Beginner",salesDescription:"Sales metrics, daily trend and regional breakdown.",qualityTitle:"Production quality · Beginner",qualityDescription:"Output, weighted yield and defects by production line.",tryExample:"Try demo",realDataHint:"Have your own data? Start by checking access and metric definitions.",realDataTitle:"Use my data",regionalPrompt:"Read the complete regional-sales recipe in the live-dashboard skill. Create a new regional sales dashboard in the current Project using its bundled demo file and standard chart definition. Verify region filters, sales amounts and detail rows; do not substitute another example or unrelated existing project data. Execute real queries and two filter checks, then save a labeled demo draft without publishing.",salesPrompt:"Read the complete sales-overview recipe in the live-dashboard skill. Create a new sales overview in the current Project using its bundled demo file and complete page. Include sales, orders, daily trends, region filters and details; do not substitute another example or unrelated existing project data. Execute real queries and two filter checks, then save a labeled demo draft without publishing.",qualityPrompt:"Read the complete production-quality recipe in the live-dashboard skill. Create a new production quality dashboard in the current Project using its bundled demo file and complete page. Include produced, good, weighted yield, defective units and production-line filters; do not rename a sales dashboard or substitute sales data. Execute real queries and two line-filter checks, then save a labeled demo draft without publishing.",realDataPrompt:"Create a dashboard using my real data. First inspect authorized sources in the current Project and confirm metric definitions. Do not substitute demo data.",superstoreTitle:"Superstore enterprise BI · Advanced",superstoreDescription:"Official retail teaching data: executive overview, product profitability, customers and returns. Requires a Data Xpert model.",superstorePrompt:"Read themes/README.md and the complete superstore recipe (Trend Workspace for overview, Profit Atlas for profitability, Customer Brief for customers and returns) in the live-dashboard skill. Use the authorized published Data Xpert SuperstoreOrders model to create three separate dashboards in the current Project: executive overview, product profitability, and customers and returns. Preserve demo labels; validate all data and region, year and category filters, then save three drafts using the complete HTML and every Binding. Do not publish. If the model is unavailable, explain data preparation; never substitute other examples or invented rows.",deleteDashboardNamed:"Delete dashboard “{{title}}”",loadingMore:"Loading more…",dashboardUpdatedAt:"Updated {{time}}",updateTimeUnavailable:"Update time unavailable"},Yn=Rv({en:fy,"zh-Hans":{bindingUnavailable:"部分视图未能加载,请检查数据权限或重试。已成功查询的视图仍可查看。",publishShareBlocked:"草稿包含私有或不可用的数据源,无法更新当前团队分享。请移除这些数据绑定,或先撤销分享再发布。已发布版本和共享链接保持不变。",viewerControls:"看板操作",hideViewerControls:"收起看板操作",share:"团队分享",teamReadOnly:"团队 · 只读",shareHint:"向本组织已登录成员分享正式版本,草稿保持私有。",sharePermissions:"每位访问者仍需自己的数据源权限。分享不会授予文件或数据源访问权。",shareVersion:"版本策略",shareLatest:"跟随最新正式版本",shareFixed:"固定正式版本",shareLink:"分享链接",copied:"已复制",openShared:"打开独立页面",enableShare:"开启分享",updateShare:"更新分享",revokeShare:"撤销链接",publishBeforeShare:"请先发布一个正式版本。",privateDependencies:"此数据源使用私有脚本或文件依赖,需要单独支持并授予团队访问权限后才能分享。",sourceUnavailable:"声明的数据源或适配器不可用。",draft:"工作草稿",publish:"发布草稿",confirm:"确认发布",confirmPublish:"将这份已保存草稿发布为新的正式版本?",title:"实时看板",empty:"让 Assistant 创建看板,或导入看板定义。",import:"导入定义",save:"保存",cancel:"取消",refresh:"刷新",apply:"应用筛选",loading:"加载中…",saved:"已保存",refreshed:"已更新",definition:"看板定义",sources:"可用数据源",version:"版本",partial:"结果不完整,请缩小筛选范围以获取全部数据。",select:"选择看板",error:"操作失败,请检查访问权限和查询定义。",all:"全部",edit:"编辑工作草稿",history:"版本历史",search:"搜索看板…",noResults:"未找到匹配的看板。",autoRefresh:"自动刷新",off:"关闭",seconds30:"每 30 秒",minute1:"每分钟",deleteDashboard:"删除看板",deleteNamedDashboard:"删除“{{title}}”",confirmDeleteDashboard:"确定删除“{{title}}”?看板将从列表移除,共享链接将失效。数据源和工作区文件会保留。",deleting:"正在删除…",newDashboard:"新建看板",privateScriptPublication:"这是私有 Workspace 脚本。请让助手准备可复用数据集,在设置 → 分析中审核固定的代码和文件并发布为组织内可见,再将本看板更新为该数据集并发布新版本。",publishDefinitionAudience:"此数据集仍为私有。所有者可在设置 → 分析中发布为组织内可见;查看者仍须具备上游数据权限。",notPublished:"此看板尚未发布。",draftAccessDenied:"只有项目编辑者可以打开工作草稿。",loadMore:"加载更多",published:"正式版本",project:"项目",selectProject:"选择项目",searchProjects:"搜索项目",noProjects:"暂无可用项目,请在 ChatKit 中创建项目。",projectsFailed:"项目加载失败,请重试。",projectSwitchFailed:"项目切换失败,请重试。",copyLink:"复制链接",selectProjectDashboard:"选择项目和看板",more:"更多操作",draftRevision:"草稿 r{{revision}}",publishedVersion:"正式版 v{{version}}",dashboards:"看板",previousPage:"上一页",nextPage:"下一页",projectPages:"项目分页",dashboardPages:"看板分页",dashboardsFailed:"看板加载失败,请重试。",starterTitle:"从可运行样例开始",starterHint:"样例使用明确标注的演示数据,在当前项目内保存草稿。",regionalTitle:"区域销售 · 入门",regionalDescription:"标准柱状图、区域筛选与明细表。",salesTitle:"销售总览 · 入门",salesDescription:"销售指标、每日趋势与区域对比。",qualityTitle:"生产质量 · 入门",qualityDescription:"产量、加权良品率与产线缺陷分析。",tryExample:"体验样例",realDataHint:"已有业务数据?先检查权限与指标口径。",realDataTitle:"使用我的数据",regionalPrompt:"请读取 live-dashboard 技能中 regional-sales 的完整配方,使用该配方随附的演示文件和标准图表定义,在当前项目新建区域销售看板。核对区域筛选、销售额和明细;不要使用其他样例或项目中已有的不同数据替代。完成实际查询与两个筛选验证后保存草稿,保留演示标识,不发布。",salesPrompt:"请读取 live-dashboard 技能中 sales-overview 的完整配方,使用该配方随附的演示文件和完整页面,在当前项目新建销售总览看板。包含销售额、订单数、日趋势、区域筛选和明细;不要使用其他样例或项目中已有的不同数据替代。完成实际查询与两个筛选验证后保存草稿,保留演示标识,不发布。",qualityPrompt:"请读取 live-dashboard 技能中 production-quality 的完整配方,使用该配方随附的演示文件和完整页面,在当前项目新建生产质量看板。必须包含产量、良品数、加权良品率、不良品数和产线筛选;不要将销售数据或其他看板改名替代。完成实际查询与两个产线筛选验证后保存草稿,保留演示标识,不发布。",realDataPrompt:"使用我的真实业务数据制作看板。先检查当前项目有权限的数据源并确认指标口径,不得使用演示数据补齐。",superstoreTitle:"Superstore 企业分析 · 进阶",superstoreDescription:"官方零售教学数据:经营总览、商品盈利、客户与退货;需先连接 Data Xpert 模型。",superstorePrompt:"请读取 live-dashboard 技能中的 themes/README.md 和 superstore 完整配方(总览使用 Trend Workspace、盈利使用 Profit Atlas、客户退货使用 Customer Brief),在当前项目使用已授权的 Data Xpert SuperstoreOrders 发布模型,分别制作经营总览、商品盈利、客户与退货三个看板。必须保留演示标识;先核对全量及区域、年份、品类筛选,再按完整 HTML 和全部 Binding 保存三个草稿,不发布。若模型不可用,请说明数据准备步骤,不得用其他样例或自造数据替代。",deleteDashboardNamed:"删除看板“{{title}}”",loadingMore:"正在加载更多…",dashboardUpdatedAt:"更新于 {{time}}",updateTimeUnavailable:"暂无更新时间"},"zh-Hant":{bindingUnavailable:"部分視圖未能載入,請檢查資料權限或重試。成功查詢的視圖仍可查看。",publishShareBlocked:"草稿包含私有或無法使用的資料來源,無法更新目前的團隊分享。請移除這些資料繫結,或先撤銷分享再發佈。已發佈版本與分享連結保持不變。",viewerControls:"看板操作",hideViewerControls:"收起看板操作",share:"團隊分享",teamReadOnly:"團隊 · 唯讀",shareHint:"向本組織已登入成員分享正式版本,草稿保持私有。",sharePermissions:"每位訪問者仍需自己的資料來源權限。分享不會授予檔案或資料來源存取權。",shareVersion:"版本策略",shareLatest:"跟隨最新正式版本",shareFixed:"固定正式版本",shareLink:"分享連結",copied:"已複製",openShared:"開啟獨立頁面",enableShare:"開啟分享",updateShare:"更新分享",revokeShare:"撤銷連結",publishBeforeShare:"請先發佈一個正式版本。",privateDependencies:"此資料來源使用私有腳本或檔案依賴,需要單獨支援並授予團隊存取權後才能分享。",sourceUnavailable:"聲明的資料來源或適配器不可用。",draft:"工作草稿",publish:"發佈草稿",confirm:"確認發佈",confirmPublish:"將這份已儲存草稿發佈為新的正式版本?",title:"即時看板",empty:"讓 Assistant 建立看板,或匯入看板定義。",import:"匯入定義",save:"儲存",cancel:"取消",refresh:"重新整理",apply:"套用篩選",loading:"載入中…",saved:"已儲存",refreshed:"已更新",definition:"看板定義",sources:"可用資料來源",version:"版本",partial:"結果不完整,請縮小篩選範圍以取得全部資料。",select:"選擇看板",error:"操作失敗,請檢查存取權限和查詢定義。",all:"全部",edit:"編輯工作草稿",history:"版本歷史",search:"搜尋看板…",noResults:"找不到符合的看板。",autoRefresh:"自動重新整理",off:"關閉",seconds30:"每 30 秒",minute1:"每分鐘",deleteDashboard:"刪除看板",deleteNamedDashboard:"刪除「{{title}}」",confirmDeleteDashboard:"確定刪除「{{title}}」?看板將從清單移除,共享連結將失效。資料來源和工作區檔案會保留。",deleting:"正在刪除…",newDashboard:"新建看板",privateScriptPublication:"這是私人 Workspace 腳本。請讓助手準備可重用資料集,在設定 → 分析中審核固定的程式碼和檔案並發佈為組織內可見,再將本看板更新為該資料集並發佈新版本。",publishDefinitionAudience:"此資料集仍為私人。擁有者可在設定 → 分析中發佈為組織內可見;檢視者仍須具備上游資料權限。",notPublished:"此看板尚未發佈。",draftAccessDenied:"只有專案編輯者可以開啟工作草稿。",loadMore:"載入更多",published:"正式版本",project:"專案",selectProject:"選擇專案",searchProjects:"搜尋專案",noProjects:"暫無可用專案,請在 ChatKit 中建立專案。",projectsFailed:"專案載入失敗,請重試。",projectSwitchFailed:"專案切換失敗,請重試。",copyLink:"複製連結",selectProjectDashboard:"選擇專案與看板",more:"更多操作",draftRevision:"草稿 r{{revision}}",publishedVersion:"正式版 v{{version}}",dashboards:"看板",previousPage:"上一頁",nextPage:"下一頁",projectPages:"專案分頁",dashboardPages:"看板分頁",dashboardsFailed:"看板載入失敗,請重試。",starterTitle:"從可執行範例開始",starterHint:"範例使用明確標註的示範資料,在目前專案內儲存草稿。",regionalTitle:"區域銷售 · 入門",regionalDescription:"標準長條圖、區域篩選與明細表。",salesTitle:"銷售總覽 · 入門",salesDescription:"銷售指標、每日趨勢與區域比較。",qualityTitle:"生產品質 · 入門",qualityDescription:"產量、加權良率與產線缺陷分析。",tryExample:"體驗範例",realDataHint:"已有業務資料?先檢查權限與指標定義。",realDataTitle:"使用我的資料",regionalPrompt:"請讀取 live-dashboard 技能中 regional-sales 的完整配方,使用該配方隨附的示範檔案和標準圖表定義,在目前專案新建區域銷售看板。核對區域篩選、銷售額和明細;不要使用其他樣例或專案中既有的不同資料替代。完成實際查詢與兩個篩選驗證後儲存草稿,保留示範標示,不發布。",salesPrompt:"請讀取 live-dashboard 技能中 sales-overview 的完整配方,使用該配方隨附的示範檔案和完整頁面,在目前專案新建銷售總覽看板。包含銷售額、訂單數、每日趨勢、區域篩選和明細;不要使用其他樣例或專案中既有的不同資料替代。完成實際查詢與兩個篩選驗證後儲存草稿,保留示範標示,不發布。",qualityPrompt:"請讀取 live-dashboard 技能中 production-quality 的完整配方,使用該配方隨附的示範檔案和完整頁面,在目前專案新建生產品質看板。必須包含產量、良品數、加權良品率、不良品數和產線篩選;不要將銷售資料或其他看板改名替代。完成實際查詢與兩個產線篩選驗證後儲存草稿,保留示範標示,不發布。",realDataPrompt:"使用我的真實業務資料製作儀表板。先檢查目前專案有權限的資料來源並確認指標定義,不得使用示範資料補齊。",superstoreTitle:"Superstore 企業分析 · 進階",superstoreDescription:"官方零售教學資料:經營總覽、商品獲利、客戶與退貨;需先連接 Data Xpert 模型。",superstorePrompt:"請讀取 live-dashboard 技能中的 themes/README.md 與 superstore 完整配方(總覽使用 Trend Workspace、獲利使用 Profit Atlas、客戶退貨使用 Customer Brief),在目前專案使用已授權的 Data Xpert SuperstoreOrders 發佈模型,分別製作經營總覽、商品獲利、客戶與退貨三個看板。保留示範標識;核對全量與區域、年份、品類篩選後,使用完整 HTML 與全部 Binding 儲存三個草稿,不發佈。模型不可用時說明資料準備步驟,不得替換成其他樣例或自造資料。",deleteDashboardNamed:"刪除看板「{{title}}」",loadingMore:"正在載入更多…",dashboardUpdatedAt:"更新於 {{time}}",updateTimeUnavailable:"暫無更新時間"}},"en");function py(n){return Yn.setLocale(n),document.documentElement.lang=Yn.getLocale(),Object.fromEntries(Object.keys(fy).map(e=>[e,Yn.t(e)]))}const DI={mode:"unrestricted"};function NI(n,e){return hI(n,{...e,networkPolicy:DI})}const OI=me({success:Je(!0),data:me({schema:Je("xpert.analytics.dataset"),datasetId:te(),fields:nt(me({id:te()}).passthrough()),rows:nt(Mr(lr([te(),tt(),ot(),Ar()]))),completeness:me({truncated:ot()}).passthrough(),freshness:me({sourceFetchedAt:te()}).passthrough(),provenance:me({executionId:te()}).passthrough()}).passthrough()}),AI=f.forwardRef(function(e,o){const s=f.useRef(null),i=f.useRef(null),l=f.useRef(e);return l.current=e,f.useImperativeHandle(o,()=>({refresh(){i.current?.refresh()}}),[]),f.useEffect(()=>{const u=s.current;if(!u||!e.manifest.presentation)return;const d=e.manifest;let h;try{h=iy(e.dependencies,d.presentation?.dependencies??[])}catch{l.current.onError("DOCUMENT_DEPENDENCY_INTEGRITY_FAILED"),l.current.onBusy(!1);return}const m=NI(u,{html:e.manifest.presentation.html,dependencies:h,context:{bindingIds:d.bindings.map(y=>y.id),defaults:Object.fromEntries(d.controls.filter(y=>y.defaultValue!==void 0).map(y=>[y.controlId,y.defaultValue??null])),locale:document.documentElement.lang||"en-US",theme:document.documentElement.classList.contains("dark")?"dark":"light"},query:async y=>OI.parse(await Nt("executeAction",{actionKey:"query-binding",input:{artifactId:e.artifactId,versionId:e.versionId,draftRevision:e.draftRevision,bindingId:y.bindingId,controls:y.controls}})).data,onBusy:y=>l.current.onBusy(y),onError:y=>l.current.onError(y),onResult:y=>l.current.onResult({partial:y.completeness.truncated,fetchedAt:y.freshness.sourceFetchedAt})});return i.current=m,()=>{m.dispose(),i.current=null}},[e.artifactId,e.versionId,e.draftRevision]),f.createElement("iframe",{ref:s,title:e.manifest.title,sandbox:"allow-scripts",className:"h-full w-full border-0"})});function $I({t:n,disabled:e,canEdit:o,canShare:s,canDelete:i,version:l,versions:u,onVersion:d,onEdit:h,onImport:m,onShare:y,onDelete:v,refreshSeconds:x,onRefreshSeconds:b,hasDashboard:S,updatedAt:C}){return f.createElement(MR,null,f.createElement(jR,{asChild:!0},f.createElement(lt,{variant:"ghost",size:"icon",disabled:e,"aria-label":n.more,title:n.more},f.createElement(ph,null))),f.createElement(LR,{align:"end",className:"w-60"},o&&S&&f.createElement(wl,{onSelect:h},f.createElement(kb,null),n.edit),s&&f.createElement(wl,{onSelect:y},f.createElement(Pb,null),n.share),o&&f.createElement(wl,{onSelect:m},f.createElement(hh,null),n.import),d&&f.createElement(Wv,null,f.createElement(Kv,null,f.createElement(Eb,null),n.history),f.createElement(Uv,null,f.createElement(Gv,{className:"max-h-64 w-48 overflow-y-auto"},f.createElement(Bv,{value:l,onValueChange:d},f.createElement(Ci,{value:"draft"},n.draft),u.filter(k=>k.versionId).map(k=>f.createElement(Ci,{key:k.versionId,value:k.versionId},n.version," ",k.versionNumber)))))),f.createElement(Wv,null,f.createElement(Kv,{disabled:!S},f.createElement(ru,null),n.autoRefresh),f.createElement(Uv,null,f.createElement(Gv,{className:"w-48"},f.createElement(Bv,{value:x,onValueChange:b},f.createElement(Ci,{value:"off"},n.off),f.createElement(Ci,{value:"30"},n.seconds30),f.createElement(Ci,{value:"60"},n.minute1))))),C&&f.createElement(f.Fragment,null,f.createElement(Hv,null),f.createElement(FR,null,n.refreshed,f.createElement("time",{className:"block font-normal",dateTime:C},new Date(C).toLocaleString(document.documentElement.lang)))),i&&f.createElement(f.Fragment,null,f.createElement(Hv,null),f.createElement(wl,{variant:"destructive",onSelect:v},f.createElement(gh,null),n.deleteDashboard))))}function hy(n,e,o,s){const[i,l]=f.useState(""),u=JSON.stringify([n,s,i]),[d,h]=f.useState({key:u,items:[],page:0,hasMore:!0,data:null,loading:!0,failed:!1}),m=f.useRef(0),y=f.useRef(!1),v=f.useRef(null),x=f.useCallback(async(S,C)=>{try{const k=await Nt("executeAction",{actionKey:n,input:{search:i,page:S,...s?{projectId:s}:{}}}),N=e.parse(me({success:Je(!0),data:$r()}).parse(k).data);if(C!==m.current)return;h(D=>{const O=S===1?[]:D.items,R=new Set(O.map(o));return{key:u,items:[...O,...N.items.filter(L=>!R.has(o(L)))],page:N.page,hasMore:N.hasMore,data:N,loading:!1,failed:!1}})}catch{C===m.current&&h(k=>({...k,loading:!1,failed:!0}))}finally{C===m.current&&(y.current=!1)}},[n,e,o,s,i,u]);f.useEffect(()=>{const S=++m.current;y.current=!0,h({key:u,items:[],page:0,hasMore:!0,data:null,loading:!0,failed:!1});const C=window.setTimeout(()=>{x(1,S)},i?200:80);return()=>{++m.current,window.clearTimeout(C)}},[u,x]);const b=f.useCallback((S=!1)=>{d.key!==u||y.current||!d.hasMore||d.failed&&!S||(y.current=!0,h(C=>({...C,loading:!0,failed:!1})),x(d.page+1,m.current))},[d.key,d.page,d.hasMore,d.failed,u,x]);return f.useEffect(()=>{if(!v.current||!d.hasMore||d.loading||d.failed||typeof IntersectionObserver>"u")return;const S=new IntersectionObserver(C=>{C.some(k=>k.isIntersecting)&&b()},{rootMargin:"0px 0px 24px 0px"});return S.observe(v.current),()=>S.disconnect()},[d.hasMore,d.loading,d.failed,b]),{...d,items:d.key===u?d.items:[],search:i,setSearch:l,sentinel:v,retry:()=>b(!0),onScroll:S=>{const C=S.currentTarget;C.scrollHeight-C.scrollTop-C.clientHeight<24&&b()}}}const MI=n=>n.id,jI=n=>n.artifactId;function LI({project:n,preview:e,disabled:o,onPreview:s,onSelect:i,t:l}){const u=hy("projects",vI,MI),[d,h]=f.useState(n?.id??""),m=f.useRef(!1);return f.createElement("section",{className:"picker-column","aria-label":l.project},f.createElement("div",{className:"picker-column-heading"},f.createElement("h2",{className:"text-sm font-semibold"},l.project)),f.createElement(Lv,{shouldFilter:!1,value:d,onValueChange:y=>{h(y);const v=u.items.find(x=>x.id===y);m.current&&v&&!o&&s(v)},onKeyDownCapture:y=>{m.current=["ArrowUp","ArrowDown","Home","End"].includes(y.key)},className:"picker-command"},f.createElement(Fv,{value:u.search,onValueChange:u.setSearch,"aria-label":l.searchProjects,placeholder:l.searchProjects}),f.createElement(zv,{className:"picker-list","aria-label":l.selectProject,"aria-busy":u.loading,onScroll:u.onScroll},u.items.map(y=>f.createElement(Vv,{key:y.id,value:y.id,"data-current":y.id===n?.id,className:y.id===e?.id?"bg-secondary font-medium":void 0,"aria-current":y.id===n?.id?!0:void 0,disabled:o,onPointerEnter:()=>{m.current=!1,o||s(y)},onSelect:()=>i(y)},f.createElement("span",{className:"min-w-0 flex-1 truncate",title:y.name},y.name),y.id===n?.id&&f.createElement(Js,{"aria-hidden":"true"}),f.createElement(nu,{"aria-hidden":"true"}))),u.loading&&f.createElement("p",{role:"status",className:"p-3 text-sm text-muted-foreground"},u.items.length?l.loadingMore:l.loading),u.failed&&f.createElement("div",{className:"p-3"},f.createElement("p",{role:"alert",className:"text-sm"},l.projectsFailed),f.createElement(lt,{variant:"ghost",onClick:u.retry},l.refresh)),!u.loading&&!u.failed&&!u.items.length&&f.createElement("p",{className:"p-3 text-sm text-muted-foreground"},l.noProjects),f.createElement("div",{ref:u.sentinel,className:"h-px","aria-hidden":"true"}))))}function FI({value:n,project:e,disabled:o,onChange:s,onNew:i,onDelete:l,t:u}){const d=hy("dashboards",xI,jI,e?.id),[h,m]=f.useState(n),y=new Intl.DateTimeFormat(Yn.getLocale(),{dateStyle:"medium",timeStyle:"short"});return f.createElement("section",{className:"picker-column","aria-label":u.dashboards},f.createElement("div",{className:"picker-column-heading"},f.createElement("h2",{className:"text-sm font-semibold truncate",title:e?.name},u.dashboards),i&&e&&d.data?.canEdit&&f.createElement(lt,{variant:"ghost",size:"sm",disabled:o,onClick:i},f.createElement(hh,null),u.newDashboard)),f.createElement(Lv,{shouldFilter:!1,value:h,onValueChange:m,className:"picker-command"},f.createElement(Fv,{value:d.search,onValueChange:d.setSearch,"aria-label":u.search,placeholder:u.search}),f.createElement(zv,{className:"picker-list","aria-label":u.select,"aria-busy":d.loading,onScroll:d.onScroll},d.items.map(v=>{const x=v.updatedAt?new Date(v.updatedAt):null;return f.createElement(BR,{key:v.artifactId},f.createElement(HR,{asChild:!0},f.createElement("div",{className:"picker-dashboard-row"},f.createElement(Vv,{value:v.artifactId,"data-current":v.artifactId===n,className:v.artifactId===n?"bg-secondary font-medium":void 0,"aria-current":v.artifactId===n?!0:void 0,disabled:o,onSelect:()=>s(v.artifactId,d.data?.mode)},f.createElement("span",{className:"min-w-0 flex-1 truncate"},v.title??v.artifactId),v.artifactId===n&&f.createElement(Js,{"aria-hidden":"true"})),l&&v.canDelete&&!!v.draftRevision&&f.createElement(lt,{className:"picker-delete",variant:"ghost",size:"icon",disabled:o,"aria-label":Yn.t("deleteDashboardNamed",{title:v.title??v.artifactId}),onKeyDown:b=>{b.key==="Enter"&&b.stopPropagation()},onClick:()=>l(v)},f.createElement(gh,{"aria-hidden":"true"})))),f.createElement(WR,{side:"top",align:"start",collisionPadding:12,className:"max-w-[min(18rem,calc(100vw-24px))] break-words"},f.createElement("div",{className:"space-y-1"},f.createElement("p",null,v.title??v.artifactId),f.createElement("p",null,x&&Number.isFinite(x.getTime())?Yn.t("dashboardUpdatedAt",{time:y.format(x)}):u.updateTimeUnavailable))))}),d.loading&&f.createElement("p",{role:"status",className:"p-3 text-sm text-muted-foreground"},d.items.length?u.loadingMore:u.loading),d.failed&&f.createElement("div",{className:"p-3"},f.createElement("p",{role:"alert",className:"text-sm"},u.dashboardsFailed),f.createElement(lt,{variant:"ghost",onClick:d.retry},u.refresh)),!d.loading&&!d.failed&&!d.items.length&&f.createElement("p",{className:"p-3 text-sm text-muted-foreground"},u.noResults),f.createElement("div",{ref:d.sentinel,className:"h-px","aria-hidden":"true"}))))}function zI({project:n,value:e,disabled:o,onChange:s,onNew:i,onDelete:l,t:u}){const[d,h]=f.useState(n),[m,y]=f.useState(n?"dashboards":"projects");return f.createElement(UR,{delayDuration:250,disableHoverableContent:!0},f.createElement(KR,{value:m,onValueChange:y,className:"picker-panels"},f.createElement(ZR,{className:"picker-mobile-tabs","aria-label":u.selectProjectDashboard},f.createElement(Qv,{value:"projects"},u.project),f.createElement(Qv,{value:"dashboards"},u.dashboards)),f.createElement(Xv,{value:"projects",forceMount:!0,className:"picker-pane picker-project-pane"},f.createElement(LI,{project:n,preview:d,disabled:o,onPreview:h,onSelect:v=>{h(v),y("dashboards")},t:u})),f.createElement(Xv,{value:"dashboards",forceMount:!0,className:"picker-pane"},f.createElement(FI,{key:d?.id??"personal",project:d,value:d?.id===n?.id?e:"",disabled:o,onChange:(v,x)=>s(v,d?.id,x),onNew:i?()=>i(d?.id):void 0,onDelete:l?v=>l(v,d?.id):void 0,t:u}))))}function VI({value:n,selectedTitle:e,project:o,disabled:s,open:i,onOpenChange:l,onChange:u,onNew:d,onDelete:h,t:m}){const y=f.useId(),v=e??(n||m.select);return f.createElement(Zv,{open:i,onOpenChange:l},f.createElement(qv,{role:"combobox","aria-label":m.selectProjectDashboard,"aria-expanded":i,"aria-controls":i?y:void 0,"aria-haspopup":"dialog",disabled:s,className:$e(Od({variant:"outline"}),"dashboard-picker justify-between"),title:`${o?.name??m.selectProject} / ${v}`},f.createElement("span",{className:"picker-project truncate text-muted-foreground"},o?.name??m.selectProject),f.createElement(nu,{className:"shrink-0 opacity-50","aria-hidden":"true"}),f.createElement("span",{className:"picker-dashboard truncate font-medium"},v),f.createElement(tu,{className:"shrink-0 opacity-50","aria-hidden":"true"})),f.createElement(Yv,{id:y,"aria-label":m.selectProjectDashboard,align:"start",collisionPadding:12,className:"dashboard-picker-menu p-0"},f.createElement(zI,{key:o?.id??"personal",project:o,value:n,disabled:s,onChange:u,onNew:d,onDelete:h,t:m})))}const UI=me({published:me({versionId:te(),versionNumber:tt(),title:te().nullish()}).nullable(),issues:nt(me({code:te(),bindingId:te().optional()})),link:me({status:te(),versionMode:en(["latest","version"]),versionId:te().nullish(),url:te().url().optional()}).nullable()}),BI=me({success:Je(!0),data:UI});function HI({artifactId:n,versionId:e,versions:o,t:s,onClose:i}){const[l,u]=f.useState(null),[d,h]=f.useState("latest"),[m,y]=f.useState(e??o[0]?.versionId??""),[v,x]=f.useState(!1),[b,S]=f.useState(""),[C,k]=f.useState(!1),N=f.useRef(null),D=f.useRef(0),O=f.useRef(!1);async function R(I){const K=++D.current;x(!0),S(""),k(!1);try{const ae=BI.parse(await Nt("executeAction",{actionKey:I,input:{artifactId:n,...I==="share"?{versionMode:d}:{},...I!=="revoke-share"&&d==="version"&&m?{versionId:m}:{}}})).data;K===D.current&&(u(ae),O.current||(O.current=!0,ae.link?.status==="active"&&(h(ae.link.versionMode),ae.link.versionId&&y(ae.link.versionId))))}catch{K===D.current&&S(s.error)}finally{K===D.current&&x(!1)}}f.useEffect(()=>(R("share-status"),()=>{++D.current}),[n,d,m]);const L=l?.link?.status==="active"?l.link:null,j=L&&L.versionMode===d&&(d==="latest"||L.versionId===m),B=I=>I==="DASHBOARD_PUBLISH_BEFORE_SHARING"?s.publishBeforeShare:I==="WORKSPACE_SCRIPT_PRIVATE_DEPENDENCIES"?s.privateScriptPublication:I==="ANALYTICS_DEFINITION_PRIVATE"?s.publishDefinitionAudience:I==="DASHBOARD_PRIVATE_DEPENDENCY"?s.privateDependencies:s.sourceUnavailable;return f.createElement(kR,{open:!0,onOpenChange:I=>{!I&&!v&&i()}},f.createElement(PR,null,f.createElement(RR,null,f.createElement(TR,null,s.share),f.createElement(DR,null,s.shareHint)),f.createElement("div",{className:"grid gap-4 py-2"},f.createElement("label",{className:"grid gap-2 text-sm"},s.shareVersion,f.createElement(bl,{value:d,disabled:v,onValueChange:I=>h(I==="version"?"version":"latest")},f.createElement(Cl,{"aria-label":s.shareVersion},f.createElement(Sl,null)),f.createElement(kl,null,f.createElement(ks,{value:"latest"},s.shareLatest),f.createElement(ks,{value:"version"},s.shareFixed)))),d==="version"&&f.createElement(bl,{value:m,disabled:v,onValueChange:y},f.createElement(Cl,{"aria-label":s.version},f.createElement(Sl,{placeholder:s.version})),f.createElement(kl,null,o.filter(I=>I.versionId).map(I=>f.createElement(ks,{key:I.versionId,value:I.versionId},s.version," ",I.versionNumber)))),l?.published&&f.createElement("p",{className:"text-sm text-muted-foreground"},l.published.title," · ",s.version," ",l.published.versionNumber),!!l?.issues.length&&f.createElement("ul",{className:"grid gap-2 text-sm text-destructive",role:"alert"},l.issues.map((I,K)=>f.createElement("li",{key:K},B(I.code),I.bindingId?` (${I.bindingId})`:""))),f.createElement("p",{className:"text-xs text-muted-foreground"},s.sharePermissions),L?.url&&f.createElement("div",{className:"grid gap-2"},f.createElement("label",{htmlFor:"dashboard-share-url",className:"text-sm"},s.shareLink),f.createElement(jv,{id:"dashboard-share-url",ref:N,readOnly:!0,value:L.url,onFocus:I=>I.target.select()}),f.createElement("div",{className:"flex gap-2"},f.createElement(lt,{variant:"outline",onClick:()=>{N.current?.focus(),N.current?.select(),k(document.execCommand("copy"))}},C?s.copied:s.copyLink),f.createElement(lt,{variant:"outline",onClick:async()=>{if(L.url){S("");try{me({success:Je(!0)}).parse(await Nt("invokeClientCommand",{commandKey:"artifact.presentation.open",payload:{url:L.url}}))}catch{S(s.error)}}}},s.openShared))),b&&f.createElement("p",{role:"alert",className:"text-sm text-destructive"},b)),f.createElement(IR,null,L&&f.createElement(lt,{variant:"outline",disabled:v,onClick:()=>{R("revoke-share")}},s.revokeShare),f.createElement(lt,{variant:"outline",disabled:v,onClick:i},s.cancel),f.createElement(lt,{disabled:v||!l||!!l.issues.length||!!j,onClick:()=>{R("share")}},L?s.updateShare:s.enableShare))))}function WI({children:n,busy:e,t:o}){const[s,i]=f.useState(!1),l=f.useRef(!1),u=f.useRef(null),d=f.useRef(!1),h=f.useRef(),m=()=>{clearTimeout(h.current)},y=b=>{m(),b||(l.current=!1),i(b)},v=b=>{b.pointerType==="mouse"&&(m(),i(!0))},x=b=>{b.pointerType!=="mouse"||l.current||(m(),h.current=setTimeout(()=>{l.current||i(!1)},180))};return f.useEffect(()=>()=>clearTimeout(h.current),[]),f.useEffect(()=>{if(!s)return;let b;const S=()=>{b=setTimeout(()=>{document.activeElement instanceof HTMLIFrameElement&&y(!1)},0)};return window.addEventListener("blur",S),()=>{window.removeEventListener("blur",S),clearTimeout(b)}},[s]),f.createElement(Zv,{open:s,onOpenChange:y},f.createElement("div",{className:"viewer-controls-trigger"},f.createElement(qv,{asChild:!0},f.createElement("button",{ref:u,type:"button",className:$e(Od({variant:"outline",size:"icon"}),"viewer-controls-button"),"aria-label":o.viewerControls,title:o.viewerControls,onPointerEnter:v,onPointerLeave:x,onClick:b=>{b.preventDefault(),m(),l.current?y(!1):(l.current=!0,i(!0))}},e?f.createElement(ru,{className:"motion-safe:animate-spin","aria-hidden":"true"}):f.createElement(ph,{"aria-hidden":"true"}),e&&f.createElement("span",{role:"status",className:"sr-only"},o.loading)))),f.createElement(Yv,{align:"end",side:"bottom",sideOffset:8,collisionPadding:12,"aria-label":o.viewerControls,className:"viewer-controls-panel w-[min(44rem,calc(100vw-24px))] gap-0 p-0",onPointerEnter:v,onPointerLeave:x,onPointerDownCapture:()=>{l.current=!0},onFocusCapture:()=>{l.current=!0},onOpenAutoFocus:b=>{l.current||b.preventDefault()},onEscapeKeyDown:()=>{d.current=!0},onCloseAutoFocus:b=>{b.preventDefault(),d.current&&u.current?.focus({preventScroll:!0}),d.current=!1}},n,f.createElement(lt,{variant:"ghost",size:"icon",className:"viewer-controls-close","aria-label":o.hideViewerControls,title:o.hideViewerControls,onClick:()=>{d.current=!0,y(!1)}},f.createElement(fh,{"aria-hidden":"true"}))))}function KI({t:n,onStart:e}){return f.createElement("section",{className:"mx-auto grid max-w-2xl gap-5 p-6","aria-label":n.starterTitle},f.createElement("div",null,f.createElement("h2",null,n.starterTitle),f.createElement("p",{className:"text-sm text-muted-foreground"},n.starterHint)),f.createElement("div",{className:"grid gap-3"},[["regionalTitle","regionalDescription","regionalPrompt"],["salesTitle","salesDescription","salesPrompt"],["qualityTitle","qualityDescription","qualityPrompt"],["superstoreTitle","superstoreDescription","superstorePrompt"]].map(([o,s,i])=>f.createElement("div",{key:o,className:"flex flex-wrap items-center justify-between gap-3 border-b pb-3"},f.createElement("div",null,f.createElement("p",null,n[o]),f.createElement("p",{className:"text-sm text-muted-foreground"},n[s])),f.createElement(lt,{variant:"outline",onClick:()=>{e(n[i])},"aria-label":`${n.tryExample}: ${n[o]}`},n.tryExample)))),f.createElement("div",{className:"flex flex-wrap items-center justify-between gap-3"},f.createElement("p",{className:"text-sm text-muted-foreground"},n.realDataHint),f.createElement(lt,{onClick:()=>{e(n.realDataPrompt)}},n.realDataTitle)))}mI(document);const Ot=window.__DASHBOARD_READ_ONLY__===!0,Il=me({success:Je(!0),data:$r()}),GI=me({payload:$r(),failures:nt(me({bindingId:te(),datasetId:te(),reason:Je("unavailable")})).default([]),datasets:nt(me({completeness:me({truncated:ot()}),freshness:me({sourceFetchedAt:te()})}))});function ZI(){const[n,e]=f.useState(()=>py("en-US")),[o,s]=f.useState(!1),i=f.useRef(!1),[l,u]=f.useState([]),[d,h]=f.useState(null),[m,y]=f.useState({project:!1,archived:!1,canReadDraft:!1,canEdit:!1,canManage:!1}),[v,x]=f.useState(null),[b,S]=f.useState("published"),C=f.useRef(),[k,N]=f.useState(""),[D,O]=f.useState({page:1,pageSize:50,hasMore:!1}),R=!Ot&&m.canEdit,L=!Ot&&m.canManage,[j,B]=f.useState([]),[I,K]=f.useState(null),[ae,be]=f.useState([]),[le,ce]=f.useState({}),[ue,Se]=f.useState(""),[q,ne]=f.useState(!0),[U,Q]=f.useState(""),[M,T]=f.useState(""),[P,W]=f.useState("off"),[Z,H]=f.useState(null),[re,de]=f.useState(null),[Y,se]=f.useState(""),[Oe,Ue]=f.useState(!1),[je,We]=f.useState(null),[xt,ht]=f.useState(!1),[Qn,Rn]=f.useState([]),[Zr,Lo]=f.useState(!1),ft=f.useRef(0),In=f.useRef(0),Fo=f.useRef(0),qr=f.useRef(),zo=f.useRef(),Tn=f.useRef(),Ei=f.useRef(null),Dn=f.useRef({dirty:!1,resourceId:""}),Yr=Z!==null&&Z!==JSON.stringify(I?.manifest,null,2);Dn.current={dirty:Yr||q&&Z!==null,resourceId:I?.artifactId??""};const _i=G=>{I&&Nt("invokeClientCommand",{commandKey:"workbench.content.status",payload:{resourceId:I.artifactId,title:I.title,dirty:G}}).catch(()=>{})};f.useEffect(()=>{_i(Yr||q&&Z!==null)},[Yr,q,Z===null,I?.artifactId,I?.title]),f.useEffect(()=>PI(G=>G!==Dn.current.resourceId||!Dn.current.dirty),[]);function gn(){qr.current=void 0,N(""),Se(""),Rn([]),K(null),h(null),H(null),be([]),Lo(!1),We(null),de(null),se(""),ce({}),T(""),ht(!1)}function an(G){return TI(G)}async function Qr(G,Ee,Le=C.current,Be=1,Ke){const ln=ft.current,Ut=++Fo.current,Xe=bI.parse(await Nt("requestData",{query:{page:Be,pageSize:50,parameters:{...Ke?{draftRevision:Ke}:{},...G?{artifactId:G}:{},...Ee?{versionId:Ee}:{},...Le?{mode:Le}:{}}}})).meta;return ln===ft.current&&Ut===Fo.current&&(u(Xn=>Be===1?Xe.dashboards:[...Xn,...Xe.dashboards.filter(cn=>!Xn.some(Ni=>Ni.artifactId===cn.artifactId))]),B(Xe.sources),zo.current=Xe.navigationTarget,x(Xe.currentProject??null),Xe.access&&y(Xe.access),Xe.pagination&&O(Xe.pagination),Xe.mode&&(C.current=Xe.mode,S(Xe.mode))),Xe}async function _s(G,Ee){const Le=++ft.current;if(!G.versionId&&!G.draftRevision)throw new Error("Missing saved definition");if(Se(""),Rn([]),T(""),ht(!1),!G.manifest.bindings.length)return;const Be=GI.parse(Il.parse(await Nt("executeAction",{actionKey:"query",input:{artifactId:G.artifactId,versionId:G.versionId??void 0,...G.isDraft?{draftRevision:G.draftRevision}:{},controls:Ee}})).data);Le===ft.current&&(Rn(Be.failures.map(Ke=>Ke.datasetId)),Se(Be.datasets.length?YI(Be.payload):""),ht(Be.datasets.some(Ke=>Ke.completeness.truncated)),T(Be.datasets.map(Ke=>Ke.freshness.sourceFetchedAt).sort()[0]??""))}async function Sr(G,Ee,Le=!0,Be=C.current,Ke){const ln=++ft.current;gn(),qr.current=G;const Ut=await Qr(G,Ee,Be,1,Ke),Xe=Ut.saved;if(ln!==ft.current)return;if(h(Ut.selectedDashboard??Ut.dashboards.find(cn=>cn.artifactId===G)??null),Ut.notice==="not_published"){N(n.notPublished),Ot||(await an(null),Le&&await Rl(Ut.navigationTarget,G,void 0,Ut.mode));return}if(!Xe||!Xe.versionId&&!Xe.draftRevision)throw new Error("Dashboard is unavailable");const Xn=Object.fromEntries(Xe.manifest.controls.filter(cn=>cn.defaultValue!==void 0).map(cn=>[cn.controlId,cn.defaultValue??null]));K(Xe),be(Ut.versions??[]),ce(Xn),T(""),ht(!1),!(!Ot&&Le&&(Tn.current=ki({artifactId:G,versionId:Ee,mode:Ut.mode}),await Rl(Ut.navigationTarget,G,Ee,Ut.mode),ln!==ft.current))&&(Ot||await an({artifactId:Xe.artifactId,...Ut.mode==="published"?{versionId:Xe.versionId??void 0}:{draftRevision:Xe.draftRevision}}),ln===ft.current&&!Xe.manifest.presentation&&Xe.manifest.bindings.length&&await _s(Xe,Xn))}async function Vt(G){const Ee=++In.current;ne(!0),Q("");try{await G()}catch(Le){Ee===In.current&&Q(Le instanceof Error&&Le.message==="DASHBOARD_DRAFT_ACCESS_DENIED"?n.draftAccessDenied:Le instanceof Error?Le.message:n.error)}finally{Ee===In.current&&ne(!1)}}const Xr=f.useRef({saved:I,controls:le,busy:q,editor:Z,confirmDelete:re});Xr.current={saved:I,controls:le,busy:q,editor:Z,confirmDelete:re};async function Vo(){const G=Xr.current;if(!G.saved){await Uo();return}if(Dn.current.dirty||G.editor!==null)return;const Ee=G.saved,Le=++ft.current,Be=await Qr(Ee.artifactId,Ee.versionId??void 0,Ee.isDraft?"draft":"published");if(Le!==ft.current||qr.current!==Ee.artifactId||Dn.current.dirty)return;h(Be.selectedDashboard??Be.dashboards.find(ln=>ln.artifactId===Ee.artifactId)??null);const Ke=Be.saved;if(!Ke)throw gn(),new Error("Dashboard is unavailable");K(Ke),be(Be.versions??[]),Ot||await an({artifactId:Ke.artifactId,...Ke.isDraft?{draftRevision:Ke.draftRevision}:{versionId:Ke.versionId??void 0}}),Le===ft.current&&(Ke.manifest.presentation?Ke.draftRevision===Ee.draftRevision&&Ke.versionId===Ee.versionId&&Ei.current?.refresh():await _s(Ke,G.controls))}f.useEffect(()=>{if(P==="off")return;let G=!1,Ee=!1;const Le=async()=>{const Ke=Xr.current;if(!(G||!_I()||Ee||Ke.busy||Ke.confirmDelete||Ke.editor!==null||!Ke.saved?.manifest.bindings.length)){Ee=!0;try{await Vo()}catch{G||Q(n.error)}finally{Ee=!1}}},Be=window.setInterval(()=>{Le()},Number(P)*1e3);return document.addEventListener("visibilitychange",Le),()=>{G=!0,window.clearInterval(Be),document.removeEventListener("visibilitychange",Le)}},[P,I?.artifactId,n.error]);async function Uo(G=!1){const Ee=++ft.current;gn();const Le=await Qr(void 0,void 0,G?"draft":void 0);if(Ee===ft.current){if(Ot&&Le.saved){await Sr(Le.saved.artifactId,Le.saved.versionId??void 0,!1);return}G&&!Ot&&await an(null)}}f.useEffect(()=>II((G,Ee)=>{e(py(G));const Le=yI.safeParse(Ee??{});if(!Le.success){++ft.current,Tn.current=void 0,gn(),Vt(async()=>{throw new Error("DASHBOARD_NAVIGATION_INVALID")});return}const Be=Le.data,Ke=ki(Be);Ke!==Tn.current&&(Tn.current=Ke,i.current=!!Be.picker,s(!!Be.picker),Vt(()=>Be.artifactId?Sr(Be.artifactId,Be.versionId,!1,Be.mode,Be.draftRevision):Uo(Be.newDashboard)))},G=>{if(Dn.current.dirty||qr.current!==G||!Xr.current.saved?.isDraft){Qr().catch(()=>{});return}Vt(Vo)},()=>{++ft.current,++In.current,++Fo.current,ne(!1),u([]),x(null),C.current=void 0,Tn.current=void 0,gn()}),[]);async function Pi(){const G=Pl.parse(JSON.parse(Z??"")),Ee=I?.manifest.id===G.id?I.versionId??null:null,Le=jo.parse(Il.parse(await Nt("executeAction",{actionKey:"save",input:{manifest:G,expectedVersionId:Ee,expectedRevision:I?.manifest.id===G.id?I.draftRevision??0:0}})).data);await Sr(Le.artifactId,void 0,!0,"draft")}async function Ri(){if(!je?.draftRevision)return;const G=jo.parse(Il.parse(await Nt("executeAction",{actionKey:"publish",input:{artifactId:je.artifactId,expectedRevision:je.draftRevision,expectedCurrentVersionId:je.baseVersionId??je.versionId??null,confirmed:!0}}).catch(Ee=>{throw Ee instanceof Error&&Ee.message==="DASHBOARD_PUBLISH_SHARE_BLOCKED"?(We(null),new Error(n.publishShareBlocked)):Ee})).data);We(null),await Sr(G.artifactId,G.versionId??void 0,!0,"published")}async function Jr(){const G=re;if(!(Oe||!G?.canDelete||!G.draftRevision)){se(""),Ue(!0);try{const Ee=me({artifactId:Je(G.artifactId)}).parse(Il.parse(await Nt("executeAction",{actionKey:"delete",input:{artifactId:G.artifactId,expectedRevision:G.draftRevision,confirmed:!0,...G.projectId?{projectId:G.projectId}:{}}})).data);de(null),u(Le=>Le.filter(Be=>Be.artifactId!==Ee.artifactId)),qr.current===Ee.artifactId&&(++ft.current,gn(),Tn.current=ki({artifactId:void 0,versionId:void 0}),await Promise.all([an(null),Rl(zo.current)])),await Qr()}catch(Ee){throw se(Ee instanceof Error?Ee.message:n.error),Ee}finally{Ue(!1)}}}function Cr(G,Ee){Ot||!G.canDelete||!G.draftRevision||(s(!1),se(""),de({...G,...Ee?{projectId:Ee}:{}}))}async function Ii(G,Ee,Le=!1,Be){if(G===v?.id)return;const Ke=await Nt("invokeClientCommand",{commandKey:"workbench.navigation.open",payload:{target:"assistant.project",projectId:G,viewKey:"live-dashboard__live-dashboard",...Ee?{selectionId:Ee}:{},parameters:Le?{newDashboard:!0}:{...Be?{mode:Be}:{}}}});if(!me({success:Je(!0)}).safeParse(Ke).success)throw new Error(n.projectSwitchFailed)}function Tl(G){s(G),!G&&i.current&&(i.current=!1,Tn.current=ki({artifactId:void 0,versionId:void 0}),Nt("invokeClientCommand",{commandKey:"workbench.navigation.open",payload:{...zo.current,parameters:{}}}).catch(()=>{}))}const Ti=f.createElement("header",{className:"dashboard-toolbar border-b"},f.createElement("h1",{className:Ot?"toolbar-title text-base font-semibold":"sr-only"},Ot?I?.title??n.title:n.title),!Ot&&f.createElement(VI,{value:I?.artifactId??"",selectedTitle:I?.title,project:v??null,disabled:q||Oe||Z!==null,open:o,onOpenChange:Tl,t:n,onDelete:Cr,onChange:(G,Ee,Le)=>{s(!1),i.current=!1,Vt(()=>Ee&&Ee!==v?.id?Ii(Ee,G,!1,Le):Sr(G,void 0,!0,Le))},onNew:G=>{s(!1),i.current=!1,Vt(async()=>{if(G&&G!==v?.id){await Ii(G,void 0,!0);return}await Uo(!0),Tn.current=ki({artifactId:void 0,versionId:void 0,newDashboard:!0}),await Rl(zo.current)})}}),I&&f.createElement(CR,{variant:"secondary",className:"toolbar-version",role:"status"},I.isDraft?Yn.t("draftRevision",{revision:I.draftRevision??"—"}):Yn.t("publishedVersion",{version:I.versionNumber??"—"})),f.createElement("div",{className:"toolbar-actions"},L&&I?.isDraft&&f.createElement(lt,{disabled:q||Z!==null||!I.manifest.bindings.length,onClick:()=>We(I),"aria-label":n.publish,title:n.publish},f.createElement(mh,null),f.createElement("span",null,n.publish)),f.createElement(lt,{variant:"ghost",size:"icon",disabled:q||Z!==null,"aria-label":n.refresh,title:n.refresh,onClick:()=>{Vt(Vo)}},f.createElement(ru,{className:q?"motion-safe:animate-spin":void 0})),f.createElement($I,{t:n,disabled:q||Oe||Z!==null,canEdit:R,hasDashboard:!!I,canShare:L&&!!I,canDelete:L&&!!d?.canDelete&&!!d.draftRevision,versions:ae,version:I?.isDraft?"draft":I?.versionId??void 0,onVersion:!Ot&&m.canReadDraft&&I?G=>{Vt(()=>Sr(I.artifactId,G==="draft"?void 0:G,!0,G==="draft"?"draft":"published"))}:void 0,onEdit:()=>{Vt(async()=>{if(!I)return;const G=await Qr(I.artifactId,void 0,"draft");if(!G.saved)throw new Error(n.error);await an({artifactId:G.saved.artifactId,draftRevision:G.saved.draftRevision}),K(G.saved),be(G.versions??[]),H(JSON.stringify(G.saved.manifest,null,2))})},onImport:()=>H(""),onShare:()=>Lo(!0),onDelete:()=>{d&&Cr(d)},refreshSeconds:P,onRefreshSeconds:W,updatedAt:M}))),Di=I&&!I.manifest.presentation&&!!I.manifest.controls.length&&f.createElement("section",{className:"flex flex-wrap items-end gap-3 border-b px-4 py-3"},I.manifest.controls.map(G=>f.createElement(qI,{key:G.controlId,control:G,value:le[G.controlId]??null,disabled:q,onChange:Ee=>ce(Le=>({...Le,[G.controlId]:Ee}))})),f.createElement(lt,{type:"button",variant:"outline",disabled:q,onClick:()=>{Vt(()=>_s(I,le))}},n.apply));return f.createElement("main",{className:"dashboard-shell","data-read-only":Ot||void 0},Ot?f.createElement(WI,{busy:q,t:n},Ti,Di):Ti,L&&Zr&&I&&f.createElement(HI,{artifactId:I.artifactId,versionId:I.versionId??void 0,versions:ae,t:n,onClose:()=>Lo(!1)}),f.createElement(Dv,{open:!!re,onOpenChange:G=>{!G&&!q&&!Oe&&de(null)}},f.createElement(Nv,null,f.createElement(Av,null,n.deleteDashboard),f.createElement($v,null,Yn.t("confirmDeleteDashboard",{title:re?.title??re?.artifactId??""})),f.createElement("p",{className:"break-all text-xs text-muted-foreground"},re?.artifactId),Y&&f.createElement("p",{role:"alert",className:"text-destructive"},Y),f.createElement(Ov,null,f.createElement(Mv,{disabled:q||Oe},n.cancel),f.createElement(lt,{variant:"destructive",disabled:q||Oe,onClick:()=>{Vt(Jr)}},Oe?n.deleting:n.deleteDashboard)))),f.createElement(Dv,{open:!!je,onOpenChange:G=>{!G&&!q&&We(null)}},f.createElement(Nv,null,f.createElement(Av,null,n.publish),f.createElement($v,null,n.confirmPublish," ",je?.manifest.title," · r",je?.draftRevision),f.createElement(Ov,null,f.createElement(Mv,{disabled:q},n.cancel),f.createElement(lt,{disabled:q,onClick:()=>{Vt(Ri)}},n.confirm)))),k&&f.createElement("p",{role:"status",className:"border-b px-4 py-3 text-muted-foreground"},k),U&&f.createElement("div",{role:"alert",className:"border-b px-4 py-3 text-destructive"},U),Z!==null?f.createElement("section",{className:"editor-panel p-4"},f.createElement("label",{className:"text-sm font-medium",htmlFor:"definition"},n.definition),f.createElement(NR,{id:"definition",className:"min-h-0 flex-1 font-mono text-xs",value:Z,onChange:G=>{Dn.current.dirty=!0,_i(!0),H(G.target.value)},disabled:q}),f.createElement("details",{className:"text-xs"},f.createElement("summary",null,n.sources),f.createElement("pre",{className:"max-h-32 overflow-auto"},JSON.stringify(j,null,2))),f.createElement("div",{className:"flex justify-end gap-2"},f.createElement(lt,{variant:"outline",onClick:()=>H(null),disabled:q},n.cancel),f.createElement(lt,{onClick:()=>{Vt(Pi)},disabled:q||!Z.trim()},f.createElement(mh,null),n.save))):f.createElement(f.Fragment,null,!Ot&&Di,Qn.length>0&&f.createElement("div",{role:"alert",className:"px-4 py-2 text-sm"},f.createElement("p",null,n.bindingUnavailable),f.createElement("ul",null,Qn.map(G=>f.createElement("li",{key:G},[...I?.manifest.charts??[],...I?.manifest.tables??[]].filter(Ee=>Ee.datasetId===G).map(Ee=>Ee.title).join(" · ")||G)))),xt&&f.createElement("p",{role:"status",className:"px-4 py-2 text-sm"},n.partial),f.createElement("section",{className:"canvas-panel","aria-busy":q},!q&&!ue&&!I?.manifest.presentation&&!U&&!Qn.length&&(!I&&R&&v?f.createElement(KI,{t:n,onStart:G=>Vt(async()=>{await an(null),await Nt("invokeClientCommand",{commandKey:"assistant.chat.send_message",payload:{text:G}})})}):f.createElement("p",{className:"p-6 text-muted-foreground"},n.empty)),I?.manifest.presentation&&f.createElement(AI,{ref:Ei,artifactId:I.artifactId,versionId:I.versionId??void 0,draftRevision:I.isDraft?I.draftRevision:void 0,manifest:I.manifest,dependencies:I.dependencies??[],onBusy:ne,onError:Q,onResult:G=>{Q(""),ht(G.partial),T(G.fetchedAt)}}),ue&&f.createElement("iframe",{title:I?.manifest.title??n.title,sandbox:"allow-scripts",srcDoc:ue,className:"h-full w-full border-0"}))))}function qI({control:n,value:e,onChange:o,disabled:s}){return f.createElement("div",{className:"grid gap-1.5"},f.createElement("label",{htmlFor:n.controlId,className:"text-xs text-muted-foreground"},n.label),n.allowedValues?f.createElement(bl,{value:JSON.stringify(e),onValueChange:i=>o(lr([te(),tt(),ot(),Ar()]).parse(JSON.parse(i))),disabled:s},f.createElement(Cl,{id:n.controlId,className:"w-44"},f.createElement(Sl,null)),f.createElement(kl,null,n.allowedValues.map(i=>f.createElement(ks,{key:JSON.stringify(i),value:JSON.stringify(i)},String(i??"—"))))):n.type==="boolean"?f.createElement(bl,{value:String(e),onValueChange:i=>o(i==="true"),disabled:s},f.createElement(Cl,{id:n.controlId,className:"w-44"},f.createElement(Sl,null)),f.createElement(kl,null,f.createElement(ks,{value:"true"},"true"),f.createElement(ks,{value:"false"},"false"))):f.createElement(jv,{id:n.controlId,className:"w-44",disabled:s,type:n.type==="date"?"date":n.type==="number"?"number":"text",value:e===null?"":String(e),onChange:i=>o(i.target.value===""?null:n.type==="number"?Number(i.target.value):i.target.value)}))}function YI(n){const e=s=>JSON.stringify(s).replace(/</g,"\\u003c").replace(/>/g,"\\u003e"),o=`<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; img-src data: blob:; font-src data:; connect-src 'none'; frame-src 'none'; base-uri 'none'; form-action 'none'"><script>window.__DATASCIENCE_ARTIFACT_HOSTING__={mode:'site_creator',readOnly:true,controls:{edit:false,exportHostedLink:false,hostedLink:false}};window.xpertai={toolOutput:${e(n)},toolResponseMetadata:${e(n)},availableDisplayModes:['inline','fullscreen'],displayMode:'fullscreen',hostContext:{availableDisplayModes:['inline','fullscreen'],displayMode:'fullscreen'}};
|
|
252
252
|
window.__datascienceArtifactFetchShimInstalled=true;
|
|
253
|
-
window.fetch=async function(input,init){const path=new URL(typeof input==='string'?input:input.url,'https://renderer.invalid').pathname;const payload=window.xpertai.toolOutput;const data={'/api/manifest':payload.manifest,'/api/snapshot':payload.snapshot,'/api/package':{manifestPath:'live dashboard',snapshotPath:'live query'}};const ok=(!init||!init.method||init.method==='GET')&&Object.prototype.hasOwnProperty.call(data,path);return new Response(JSON.stringify(ok?data[path]:{error:'Unavailable in live read-only view'}),{status:ok?200:404,headers:{'Content-Type':'application/json'}})};<\/script>`;return window.__ANALYTICS_RENDERER_HTML__.replace(/<head(\s[^>]*)?>/i,
|
|
253
|
+
window.fetch=async function(input,init){const path=new URL(typeof input==='string'?input:input.url,'https://renderer.invalid').pathname;const payload=window.xpertai.toolOutput;const data={'/api/manifest':payload.manifest,'/api/snapshot':payload.snapshot,'/api/package':{manifestPath:'live dashboard',snapshotPath:'live query'}};const ok=(!init||!init.method||init.method==='GET')&&Object.prototype.hasOwnProperty.call(data,path);return new Response(JSON.stringify(ok?data[path]:{error:'Unavailable in live read-only view'}),{status:ok?200:404,headers:{'Content-Type':'application/json'}})};<\/script>`;return window.__ANALYTICS_RENDERER_HTML__.replace(/<head(\s[^>]*)?>/i,s=>`${s}${o}`)}Jw.createRoot(document.getElementById("root")).render(f.createElement(yR,{i18n:Yn},f.createElement(ZI,null)))})();
|