@homepages/concrete 2.0.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +34 -0
- package/codemods/framework-namespace.mjs +107 -0
- package/codemods/manifest.json +9 -0
- package/codemods/theme-collapse.mjs +394 -0
- package/dist/artifact/playground/client/assets/{index-CW7co-u9.js → index-B3eNADCe.js} +41 -35
- package/dist/artifact/playground/client/index.html +1 -1
- package/dist/artifact/playground/client/island-canvas-host.mjs +1 -1
- package/dist/base.css +46 -29
- package/dist/cli/check/render/class-conflicts.js +1 -1
- package/dist/cli/dev/islands.js +2 -2
- package/dist/packages/external/concrete/package.js +1 -1
- package/dist/primitives/FrameShell.d.ts +1 -1
- package/dist/primitives/FrameShell.js +1 -1
- package/dist/primitives/Image.d.ts +1 -1
- package/dist/primitives/Image.js +3 -3
- package/dist/primitives/Section.d.ts +3 -3
- package/dist/primitives/Section.js +4 -4
- package/dist/primitives/Tour.d.ts +1 -1
- package/dist/primitives/Tour.js +3 -3
- package/dist/primitives/Video.d.ts +1 -1
- package/dist/primitives/Video.js +3 -3
- package/dist/styles.css +4 -3
- package/guide/reference/cli/INDEX.md +2 -2
- package/guide/reference/cli/build.md +1 -1
- package/guide/reference/cli/check.md +1 -1
- package/guide/reference/cli/dev.md +1 -1
- package/guide/reference/cli/property-add.md +1 -1
- package/guide/reference/cli/property-list.md +1 -1
- package/guide/reference/cli/publish.md +1 -1
- package/guide/reference/cli/upgrade.md +1 -1
- package/guide/reference/rules/INDEX.md +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var gg=n=>{throw TypeError(n)};var jd=(n,l,s)=>l.has(n)||gg("Cannot "+s);var k=(n,l,s)=>(jd(n,l,"read from private field"),s?s.call(n):l.get(n)),be=(n,l,s)=>l.has(n)?gg("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(n):l.set(n,s),fe=(n,l,s,o)=>(jd(n,l,"write to private field"),o?o.call(n,s):l.set(n,s),s),je=(n,l,s)=>(jd(n,l,"access private method"),s);var qr=(n,l,s,o)=>({set _(u){fe(n,l,u,s)},get _(){return k(n,l,o)}});(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))o(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const h of d.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&o(h)}).observe(document,{childList:!0,subtree:!0});function s(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function o(u){if(u.ep)return;u.ep=!0;const d=s(u);fetch(u.href,d)}})();function p_(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Md={exports:{}},eo={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@ var yg=n=>{throw TypeError(n)};var jd=(n,l,s)=>l.has(n)||yg("Cannot "+s);var k=(
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var bg;function y_(){if(bg)return eo;bg=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function s(o,u,d){var h=null;if(d!==void 0&&(h=""+d),u.key!==void 0&&(h=""+u.key),"key"in u){d={};for(var p in u)p!=="key"&&(d[p]=u[p])}else d=u;return u=d.ref,{$$typeof:n,type:o,key:h,ref:u!==void 0?u:null,props:d}}return eo.Fragment=l,eo.jsx=s,eo.jsxs=s,eo}var vg;function g_(){return vg||(vg=1,Md.exports=y_()),Md.exports}var f=g_(),Cd={exports:{}},Ae={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react.production.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@ var yg=n=>{throw TypeError(n)};var jd=(n,l,s)=>l.has(n)||yg("Cannot "+s);var k=(
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var xg;function b_(){if(xg)return Ae;xg=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),E=Symbol.iterator;function j(S){return S===null||typeof S!="object"?null:(S=E&&S[E]||S["@@iterator"],typeof S=="function"?S:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,M={};function R(S,q,Y){this.props=S,this.context=q,this.refs=M,this.updater=Y||T}R.prototype.isReactComponent={},R.prototype.setState=function(S,q){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,q,"setState")},R.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function D(){}D.prototype=R.prototype;function z(S,q,Y){this.props=S,this.context=q,this.refs=M,this.updater=Y||T}var I=z.prototype=new D;I.constructor=z,C(I,R.prototype),I.isPureReactComponent=!0;var le=Array.isArray;function ne(){}var W={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function ue(S,q,Y){var N=Y.ref;return{$$typeof:n,type:S,key:q,ref:N!==void 0?N:null,props:Y}}function de(S,q){return ue(S.type,q,S.props)}function re(S){return typeof S=="object"&&S!==null&&S.$$typeof===n}function ie(S){var q={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(Y){return q[Y]})}var U=/\/+/g;function H(S,q){return typeof S=="object"&&S!==null&&S.key!=null?ie(""+S.key):q.toString(36)}function $(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(ne,ne):(S.status="pending",S.then(function(q){S.status==="pending"&&(S.status="fulfilled",S.value=q)},function(q){S.status==="pending"&&(S.status="rejected",S.reason=q)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function w(S,q,Y,N,P){var Q=typeof S;(Q==="undefined"||Q==="boolean")&&(S=null);var Z=!1;if(S===null)Z=!0;else switch(Q){case"bigint":case"string":case"number":Z=!0;break;case"object":switch(S.$$typeof){case n:case l:Z=!0;break;case x:return Z=S._init,w(Z(S._payload),q,Y,N,P)}}if(Z)return P=P(S),Z=N===""?"."+H(S,0):N,le(P)?(Y="",Z!=null&&(Y=Z.replace(U,"$&/")+"/"),w(P,q,Y,"",function(Ee){return Ee})):P!=null&&(re(P)&&(P=de(P,Y+(P.key==null||S&&S.key===P.key?"":(""+P.key).replace(U,"$&/")+"/")+Z)),q.push(P)),1;Z=0;var pe=N===""?".":N+":";if(le(S))for(var ge=0;ge<S.length;ge++)N=S[ge],Q=pe+H(N,ge),Z+=w(N,q,Y,Q,P);else if(ge=j(S),typeof ge=="function")for(S=ge.call(S),ge=0;!(N=S.next()).done;)N=N.value,Q=pe+H(N,ge++),Z+=w(N,q,Y,Q,P);else if(Q==="object"){if(typeof S.then=="function")return w($(S),q,Y,N,P);throw q=String(S),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return Z}function F(S,q,Y){if(S==null)return S;var N=[],P=0;return w(S,N,"","",function(Q){return q.call(Y,Q,P++)}),N}function ce(S){if(S._status===-1){var q=S._result;q=q(),q.then(function(Y){(S._status===0||S._status===-1)&&(S._status=1,S._result=Y)},function(Y){(S._status===0||S._status===-1)&&(S._status=2,S._result=Y)}),S._status===-1&&(S._status=0,S._result=q)}if(S._status===1)return S._result.default;throw S._result}var ee=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},G={map:F,forEach:function(S,q,Y){F(S,function(){q.apply(this,arguments)},Y)},count:function(S){var q=0;return F(S,function(){q++}),q},toArray:function(S){return F(S,function(q){return q})||[]},only:function(S){if(!re(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return Ae.Activity=b,Ae.Children=G,Ae.Component=R,Ae.Fragment=s,Ae.Profiler=u,Ae.PureComponent=z,Ae.StrictMode=o,Ae.Suspense=m,Ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=W,Ae.__COMPILER_RUNTIME={__proto__:null,c:function(S){return W.H.useMemoCache(S)}},Ae.cache=function(S){return function(){return S.apply(null,arguments)}},Ae.cacheSignal=function(){return null},Ae.cloneElement=function(S,q,Y){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var N=C({},S.props),P=S.key;if(q!=null)for(Q in q.key!==void 0&&(P=""+q.key),q)!L.call(q,Q)||Q==="key"||Q==="__self"||Q==="__source"||Q==="ref"&&q.ref===void 0||(N[Q]=q[Q]);var Q=arguments.length-2;if(Q===1)N.children=Y;else if(1<Q){for(var Z=Array(Q),pe=0;pe<Q;pe++)Z[pe]=arguments[pe+2];N.children=Z}return ue(S.type,P,N)},Ae.createContext=function(S){return S={$$typeof:h,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:d,_context:S},S},Ae.createElement=function(S,q,Y){var N,P={},Q=null;if(q!=null)for(N in q.key!==void 0&&(Q=""+q.key),q)L.call(q,N)&&N!=="key"&&N!=="__self"&&N!=="__source"&&(P[N]=q[N]);var Z=arguments.length-2;if(Z===1)P.children=Y;else if(1<Z){for(var pe=Array(Z),ge=0;ge<Z;ge++)pe[ge]=arguments[ge+2];P.children=pe}if(S&&S.defaultProps)for(N in Z=S.defaultProps,Z)P[N]===void 0&&(P[N]=Z[N]);return ue(S,Q,P)},Ae.createRef=function(){return{current:null}},Ae.forwardRef=function(S){return{$$typeof:p,render:S}},Ae.isValidElement=re,Ae.lazy=function(S){return{$$typeof:x,_payload:{_status:-1,_result:S},_init:ce}},Ae.memo=function(S,q){return{$$typeof:g,type:S,compare:q===void 0?null:q}},Ae.startTransition=function(S){var q=W.T,Y={};W.T=Y;try{var N=S(),P=W.S;P!==null&&P(Y,N),typeof N=="object"&&N!==null&&typeof N.then=="function"&&N.then(ne,ee)}catch(Q){ee(Q)}finally{q!==null&&Y.types!==null&&(q.types=Y.types),W.T=q}},Ae.unstable_useCacheRefresh=function(){return W.H.useCacheRefresh()},Ae.use=function(S){return W.H.use(S)},Ae.useActionState=function(S,q,Y){return W.H.useActionState(S,q,Y)},Ae.useCallback=function(S,q){return W.H.useCallback(S,q)},Ae.useContext=function(S){return W.H.useContext(S)},Ae.useDebugValue=function(){},Ae.useDeferredValue=function(S,q){return W.H.useDeferredValue(S,q)},Ae.useEffect=function(S,q){return W.H.useEffect(S,q)},Ae.useEffectEvent=function(S){return W.H.useEffectEvent(S)},Ae.useId=function(){return W.H.useId()},Ae.useImperativeHandle=function(S,q,Y){return W.H.useImperativeHandle(S,q,Y)},Ae.useInsertionEffect=function(S,q){return W.H.useInsertionEffect(S,q)},Ae.useLayoutEffect=function(S,q){return W.H.useLayoutEffect(S,q)},Ae.useMemo=function(S,q){return W.H.useMemo(S,q)},Ae.useOptimistic=function(S,q){return W.H.useOptimistic(S,q)},Ae.useReducer=function(S,q,Y){return W.H.useReducer(S,q,Y)},Ae.useRef=function(S){return W.H.useRef(S)},Ae.useState=function(S){return W.H.useState(S)},Ae.useSyncExternalStore=function(S,q,Y){return W.H.useSyncExternalStore(S,q,Y)},Ae.useTransition=function(){return W.H.useTransition()},Ae.version="19.2.6",Ae}var _g;function Hf(){return _g||(_g=1,Cd.exports=b_()),Cd.exports}var _=Hf();const Gr=p_(_);var Ad={exports:{}},to={},Nd={exports:{}},Td={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@ var yg=n=>{throw TypeError(n)};var jd=(n,l,s)=>l.has(n)||yg("Cannot "+s);var k=(
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var
|
|
25
|
+
*/var wg;function v_(){return wg||(wg=1,(function(n){function l(w,F){var ce=w.length;w.push(F);e:for(;0<ce;){var ee=ce-1>>>1,G=w[ee];if(0<u(G,F))w[ee]=F,w[ce]=G,ce=ee;else break e}}function s(w){return w.length===0?null:w[0]}function o(w){if(w.length===0)return null;var F=w[0],ce=w.pop();if(ce!==F){w[0]=ce;e:for(var ee=0,G=w.length,S=G>>>1;ee<S;){var q=2*(ee+1)-1,Y=w[q],N=q+1,P=w[N];if(0>u(Y,ce))N<G&&0>u(P,Y)?(w[ee]=P,w[N]=ce,ee=N):(w[ee]=Y,w[q]=ce,ee=q);else if(N<G&&0>u(P,ce))w[ee]=P,w[N]=ce,ee=N;else break e}}return F}function u(w,F){var ce=w.sortIndex-F.sortIndex;return ce!==0?ce:w.id-F.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var h=Date,p=h.now();n.unstable_now=function(){return h.now()-p}}var m=[],g=[],x=1,b=null,E=3,j=!1,T=!1,C=!1,M=!1,R=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;function I(w){for(var F=s(g);F!==null;){if(F.callback===null)o(g);else if(F.startTime<=w)o(g),F.sortIndex=F.expirationTime,l(m,F);else break;F=s(g)}}function le(w){if(C=!1,I(w),!T)if(s(m)!==null)T=!0,ne||(ne=!0,ie());else{var F=s(g);F!==null&&$(le,F.startTime-w)}}var ne=!1,W=-1,L=5,ue=-1;function de(){return M?!0:!(n.unstable_now()-ue<L)}function re(){if(M=!1,ne){var w=n.unstable_now();ue=w;var F=!0;try{e:{T=!1,C&&(C=!1,D(W),W=-1),j=!0;var ce=E;try{t:{for(I(w),b=s(m);b!==null&&!(b.expirationTime>w&&de());){var ee=b.callback;if(typeof ee=="function"){b.callback=null,E=b.priorityLevel;var G=ee(b.expirationTime<=w);if(w=n.unstable_now(),typeof G=="function"){b.callback=G,I(w),F=!0;break t}b===s(m)&&o(m),I(w)}else o(m);b=s(m)}if(b!==null)F=!0;else{var S=s(g);S!==null&&$(le,S.startTime-w),F=!1}}break e}finally{b=null,E=ce,j=!1}F=void 0}}finally{F?ie():ne=!1}}}var ie;if(typeof z=="function")ie=function(){z(re)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,H=U.port2;U.port1.onmessage=re,ie=function(){H.postMessage(null)}}else ie=function(){R(re,0)};function $(w,F){W=R(function(){w(n.unstable_now())},F)}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(w){w.callback=null},n.unstable_forceFrameRate=function(w){0>w||125<w?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<w?Math.floor(1e3/w):5},n.unstable_getCurrentPriorityLevel=function(){return E},n.unstable_next=function(w){switch(E){case 1:case 2:case 3:var F=3;break;default:F=E}var ce=E;E=F;try{return w()}finally{E=ce}},n.unstable_requestPaint=function(){M=!0},n.unstable_runWithPriority=function(w,F){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var ce=E;E=w;try{return F()}finally{E=ce}},n.unstable_scheduleCallback=function(w,F,ce){var ee=n.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?ee+ce:ee):ce=ee,w){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=ce+G,w={id:x++,callback:F,priorityLevel:w,startTime:ce,expirationTime:G,sortIndex:-1},ce>ee?(w.sortIndex=ce,l(g,w),s(m)===null&&w===s(g)&&(C?(D(W),W=-1):C=!0,$(le,ce-ee))):(w.sortIndex=G,l(m,w),T||j||(T=!0,ne||(ne=!0,ie()))),w},n.unstable_shouldYield=de,n.unstable_wrapCallback=function(w){var F=E;return function(){var ce=E;E=F;try{return w.apply(this,arguments)}finally{E=ce}}}})(Td)),Td}var Sg;function x_(){return Sg||(Sg=1,Nd.exports=v_()),Nd.exports}var Od={exports:{}},Bt={};/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.js
|
|
28
28
|
*
|
|
@@ -30,7 +30,7 @@ var yg=n=>{throw TypeError(n)};var jd=(n,l,s)=>l.has(n)||yg("Cannot "+s);var k=(
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var
|
|
33
|
+
*/var kg;function __(){if(kg)return Bt;kg=1;var n=Hf();function l(m){var g="https://react.dev/errors/"+m;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)g+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+m+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var o={d:{f:s,r:function(){throw Error(l(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},u=Symbol.for("react.portal");function d(m,g,x){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:b==null?null:""+b,children:m,containerInfo:g,implementation:x}}var h=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(m,g){if(m==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Bt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Bt.createPortal=function(m,g){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(l(299));return d(m,g,null,x)},Bt.flushSync=function(m){var g=h.T,x=o.p;try{if(h.T=null,o.p=2,m)return m()}finally{h.T=g,o.p=x,o.d.f()}},Bt.preconnect=function(m,g){typeof m=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,o.d.C(m,g))},Bt.prefetchDNS=function(m){typeof m=="string"&&o.d.D(m)},Bt.preinit=function(m,g){if(typeof m=="string"&&g&&typeof g.as=="string"){var x=g.as,b=p(x,g.crossOrigin),E=typeof g.integrity=="string"?g.integrity:void 0,j=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;x==="style"?o.d.S(m,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:b,integrity:E,fetchPriority:j}):x==="script"&&o.d.X(m,{crossOrigin:b,integrity:E,fetchPriority:j,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Bt.preinitModule=function(m,g){if(typeof m=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var x=p(g.as,g.crossOrigin);o.d.M(m,{crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&o.d.M(m)},Bt.preload=function(m,g){if(typeof m=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var x=g.as,b=p(x,g.crossOrigin);o.d.L(m,x,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},Bt.preloadModule=function(m,g){if(typeof m=="string")if(g){var x=p(g.as,g.crossOrigin);o.d.m(m,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:x,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else o.d.m(m)},Bt.requestFormReset=function(m){o.d.r(m)},Bt.unstable_batchedUpdates=function(m,g){return m(g)},Bt.useFormState=function(m,g,x){return h.H.useFormState(m,g,x)},Bt.useFormStatus=function(){return h.H.useHostTransitionStatus()},Bt.version="19.2.6",Bt}var Eg;function b0(){if(Eg)return Od.exports;Eg=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(l){console.error(l)}}return n(),Od.exports=__(),Od.exports}/**
|
|
34
34
|
* @license React
|
|
35
35
|
* react-dom-client.production.js
|
|
36
36
|
*
|
|
@@ -38,15 +38,15 @@ var yg=n=>{throw TypeError(n)};var jd=(n,l,s)=>l.has(n)||yg("Cannot "+s);var k=(
|
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the MIT license found in the
|
|
40
40
|
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var
|
|
41
|
+
*/var jg;function w_(){if(jg)return to;jg=1;var n=x_(),l=Hf(),s=b0();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function h(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(d(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,i=t;;){var r=a.return;if(r===null)break;var c=r.alternate;if(c===null){if(i=r.return,i!==null){a=i;continue}break}if(r.child===c.child){for(c=r.child;c;){if(c===a)return m(r),e;if(c===i)return m(r),t;c=c.sibling}throw Error(o(188))}if(a.return!==i.return)a=r,i=c;else{for(var y=!1,v=r.child;v;){if(v===a){y=!0,a=r,i=c;break}if(v===i){y=!0,i=r,a=c;break}v=v.sibling}if(!y){for(v=c.child;v;){if(v===a){y=!0,a=c,i=r;break}if(v===i){y=!0,i=c,a=r;break}v=v.sibling}if(!y)throw Error(o(189))}}if(a.alternate!==i)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function x(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=x(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,E=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),z=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),le=Symbol.for("react.suspense"),ne=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),ue=Symbol.for("react.activity"),de=Symbol.for("react.memo_cache_sentinel"),re=Symbol.iterator;function ie(e){return e===null||typeof e!="object"?null:(e=re&&e[re]||e["@@iterator"],typeof e=="function"?e:null)}var U=Symbol.for("react.client.reference");function H(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===U?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case R:return"Profiler";case M:return"StrictMode";case le:return"Suspense";case ne:return"SuspenseList";case ue:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case T:return"Portal";case z:return e.displayName||"Context";case D:return(e._context.displayName||"Context")+".Consumer";case I:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case W:return t=e.displayName||null,t!==null?t:H(e.type)||"Memo";case L:t=e._payload,e=e._init;try{return H(e(t))}catch{}}return null}var $=Array.isArray,w=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},ee=[],G=-1;function S(e){return{current:e}}function q(e){0>G||(e.current=ee[G],ee[G]=null,G--)}function Y(e,t){G++,ee[G]=e.current,e.current=t}var N=S(null),P=S(null),Q=S(null),Z=S(null);function pe(e,t){switch(Y(Q,t),Y(P,e),Y(N,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?qy(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=qy(t),e=Gy(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(N),Y(N,e)}function ge(){q(N),q(P),q(Q)}function Ee(e){e.memoizedState!==null&&Y(Z,e);var t=N.current,a=Gy(t,e.type);t!==a&&(Y(P,e),Y(N,a))}function Re(e){P.current===e&&(q(N),q(P)),Z.current===e&&(q(Z),Zs._currentValue=ce)}var Ue,nt;function Ye(e){if(Ue===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ue=t&&t[1]||"",nt=-1<a.stack.indexOf(`
|
|
42
42
|
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
43
|
`+Ue+e+nt}var Te=!1;function hn(e,t){if(!e||Te)return"";Te=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(J){var X=J}Reflect.construct(e,[],oe)}else{try{oe.call()}catch(J){X=J}e.call(oe.prototype)}}else{try{throw Error()}catch(J){X=J}(oe=e())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(J){if(J&&X&&typeof J.stack=="string")return[J.stack,X.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=i.DetermineComponentFrameRoot(),y=c[0],v=c[1];if(y&&v){var A=y.split(`
|
|
44
44
|
`),K=v.split(`
|
|
45
45
|
`);for(r=i=0;i<A.length&&!A[i].includes("DetermineComponentFrameRoot");)i++;for(;r<K.length&&!K[r].includes("DetermineComponentFrameRoot");)r++;if(i===A.length||r===K.length)for(i=A.length-1,r=K.length-1;1<=i&&0<=r&&A[i]!==K[r];)r--;for(;1<=i&&0<=r;i--,r--)if(A[i]!==K[r]){if(i!==1||r!==1)do if(i--,r--,0>r||A[i]!==K[r]){var ae=`
|
|
46
46
|
`+A[i].replace(" at new "," at ");return e.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",e.displayName)),ae}while(1<=i&&0<=r);break}}}finally{Te=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ye(a):""}function So(e,t){switch(e.tag){case 26:case 27:case 5:return Ye(e.type);case 16:return Ye("Lazy");case 13:return e.child!==t&&t!==null?Ye("Suspense Fallback"):Ye("Suspense");case 19:return Ye("SuspenseList");case 0:case 15:return hn(e.type,!1);case 11:return hn(e.type.render,!1);case 1:return hn(e.type,!0);case 31:return Ye("Activity");default:return""}}function ko(e){try{var t="",a=null;do t+=So(e,a),a=e,e=e.return;while(e);return t}catch(i){return`
|
|
47
47
|
Error generating stack: `+i.message+`
|
|
48
|
-
`+i.stack}}var ti=Object.prototype.hasOwnProperty,ni=n.unstable_scheduleCallback,ai=n.unstable_cancelCallback,dl=n.unstable_shouldYield,On=n.unstable_requestPaint,rt=n.unstable_now,Eo=n.unstable_getCurrentPriorityLevel,us=n.unstable_ImmediatePriority,li=n.unstable_UserBlockingPriority,fl=n.unstable_NormalPriority,ii=n.unstable_LowPriority,it=n.unstable_IdlePriority,hl=n.log,jo=n.unstable_setDisableYieldValue,xa=null,zt=null;function te(e){if(typeof hl=="function"&&jo(e),zt&&typeof zt.setStrictMode=="function")try{zt.setStrictMode(xa,e)}catch{}}var he=Math.clz32?Math.clz32:Be,Se=Math.log,Me=Math.LN2;function Be(e){return e>>>=0,e===0?32:31-(Se(e)/Me|0)|0}var Ne=256,mt=262144,pt=4194304;function ct(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Dt(e,t,a){var i=e.pendingLanes;if(i===0)return 0;var r=0,c=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var v=i&134217727;return v!==0?(i=v&~c,i!==0?r=ct(i):(y&=v,y!==0?r=ct(y):a||(a=v&~e,a!==0&&(r=ct(a))))):(v=i&~c,v!==0?r=ct(v):y!==0?r=ct(y):a||(a=i&~e,a!==0&&(r=ct(a)))),r===0?0:t!==0&&t!==r&&(t&c)===0&&(c=r&-r,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:r}function Ut(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Lt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function jn(){var e=pt;return pt<<=1,(pt&62914560)===0&&(pt=4194304),e}function ml(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function _a(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function wa(e,t,a,i,r,c){var y=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var v=e.entanglements,A=e.expirationTimes,K=e.hiddenUpdates;for(a=y&~a;0<a;){var ae=31-he(a),oe=1<<ae;v[ae]=0,A[ae]=-1;var X=K[ae];if(X!==null)for(K[ae]=null,ae=0;ae<X.length;ae++){var J=X[ae];J!==null&&(J.lane&=-536870913)}a&=~oe}i!==0&&Mo(e,i,0),c!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=c&~(y&~t))}function Mo(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-he(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|a&261930}function wh(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var i=31-he(a),r=1<<i;r&t|e[i]&t&&(e[i]|=t),a&=~r}}function Sh(e,t){var a=t&-t;return a=(a&42)!==0?1:pc(a),(a&(e.suspendedLanes|t))!==0?0:a}function pc(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function yc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function kh(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:cg(e.type))}function Eh(e,t){var a=F.p;try{return F.p=e,t()}finally{F.p=a}}var Sa=Math.random().toString(36).slice(2),Ct="__reactFiber$"+Sa,Vt="__reactProps$"+Sa,si="__reactContainer$"+Sa,gc="__reactEvents$"+Sa,lx="__reactListeners$"+Sa,ix="__reactHandles$"+Sa,jh="__reactResources$"+Sa,ds="__reactMarker$"+Sa;function bc(e){delete e[Ct],delete e[Vt],delete e[gc],delete e[lx],delete e[ix]}function oi(e){var t=e[Ct];if(t)return t;for(var a=e.parentNode;a;){if(t=a[si]||a[Ct]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=$y(e);e!==null;){if(a=e[Ct])return a;e=$y(e)}return t}e=a,a=e.parentNode}return null}function ri(e){if(e=e[Ct]||e[si]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function fs(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function ci(e){var t=e[jh];return t||(t=e[jh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Et(e){e[ds]=!0}var Mh=new Set,Ch={};function pl(e,t){ui(e,t),ui(e+"Capture",t)}function ui(e,t){for(Ch[e]=t,e=0;e<t.length;e++)Mh.add(t[e])}var sx=RegExp("^[: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]*$"),Ah={},Nh={};function ox(e){return ti.call(Nh,e)?!0:ti.call(Ah,e)?!1:sx.test(e)?Nh[e]=!0:(Ah[e]=!0,!1)}function Co(e,t,a){if(ox(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Ao(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Kn(e,t,a,i){if(i===null)e.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+i)}}function mn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Th(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function rx(e,t,a){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var r=i.get,c=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(y){a=""+y,c.call(this,y)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function vc(e){if(!e._valueTracker){var t=Th(e)?"checked":"value";e._valueTracker=rx(e,t,""+e[t])}}function Oh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),i="";return e&&(i=Th(e)?e.checked?"true":"false":e.value),e=i,e!==a?(t.setValue(e),!0):!1}function No(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}}var cx=/[\n"\\]/g;function pn(e){return e.replace(cx,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function xc(e,t,a,i,r,c,y,v){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+mn(t)):e.value!==""+mn(t)&&(e.value=""+mn(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?_c(e,y,mn(t)):a!=null?_c(e,y,mn(a)):i!=null&&e.removeAttribute("value"),r==null&&c!=null&&(e.defaultChecked=!!c),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+mn(v):e.removeAttribute("name")}function Rh(e,t,a,i,r,c,y,v){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){vc(e);return}a=a!=null?""+mn(a):"",t=t!=null?""+mn(t):a,v||t===e.value||(e.value=t),e.defaultValue=t}i=i??r,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=v?e.checked:!!i,e.defaultChecked=!!i,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),vc(e)}function _c(e,t,a){t==="number"&&No(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function di(e,t,a,i){if(e=e.options,t){t={};for(var r=0;r<a.length;r++)t["$"+a[r]]=!0;for(a=0;a<e.length;a++)r=t.hasOwnProperty("$"+e[a].value),e[a].selected!==r&&(e[a].selected=r),r&&i&&(e[a].defaultSelected=!0)}else{for(a=""+mn(a),t=null,r=0;r<e.length;r++){if(e[r].value===a){e[r].selected=!0,i&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function zh(e,t,a){if(t!=null&&(t=""+mn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+mn(a):""}function Dh(e,t,a,i){if(t==null){if(i!=null){if(a!=null)throw Error(o(92));if($(i)){if(1<i.length)throw Error(o(93));i=i[0]}a=i}a==null&&(a=""),t=a}a=mn(t),e.defaultValue=a,i=e.textContent,i===a&&i!==""&&i!==null&&(e.value=i),vc(e)}function fi(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var ux=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Uh(e,t,a){var i=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,a):typeof a!="number"||a===0||ux.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Lh(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var i in a)!a.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var r in t)i=t[r],t.hasOwnProperty(r)&&a[r]!==i&&Uh(e,r,i)}else for(var c in t)t.hasOwnProperty(c)&&Uh(e,c,t[c])}function wc(e){if(e.indexOf("-")===-1)return!1;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 dx=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),fx=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function To(e){return fx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function $n(){}var Sc=null;function kc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hi=null,mi=null;function Bh(e){var t=ri(e);if(t&&(e=t.stateNode)){var a=e[Vt]||null;e:switch(e=t.stateNode,t.type){case"input":if(xc(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+pn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var i=a[t];if(i!==e&&i.form===e.form){var r=i[Vt]||null;if(!r)throw Error(o(90));xc(i,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<a.length;t++)i=a[t],i.form===e.form&&Oh(i)}break e;case"textarea":zh(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&di(e,!!a.multiple,t,!1)}}}var Ec=!1;function Hh(e,t,a){if(Ec)return e(t,a);Ec=!0;try{var i=e(t);return i}finally{if(Ec=!1,(hi!==null||mi!==null)&&(br(),hi&&(t=hi,e=mi,mi=hi=null,Bh(t),e)))for(t=0;t<e.length;t++)Bh(e[t])}}function hs(e,t){var a=e.stateNode;if(a===null)return null;var i=a[Vt]||null;if(i===null)return null;a=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var Xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jc=!1;if(Xn)try{var ms={};Object.defineProperty(ms,"passive",{get:function(){jc=!0}}),window.addEventListener("test",ms,ms),window.removeEventListener("test",ms,ms)}catch{jc=!1}var ka=null,Mc=null,Oo=null;function qh(){if(Oo)return Oo;var e,t=Mc,a=t.length,i,r="value"in ka?ka.value:ka.textContent,c=r.length;for(e=0;e<a&&t[e]===r[e];e++);var y=a-e;for(i=1;i<=y&&t[a-i]===r[c-i];i++);return Oo=r.slice(e,1<i?1-i:void 0)}function Ro(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function zo(){return!0}function Gh(){return!1}function Yt(e){function t(a,i,r,c,y){this._reactName=a,this._targetInst=r,this.type=i,this.nativeEvent=c,this.target=y,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(a=e[v],this[v]=a?a(c):c[v]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?zo:Gh,this.isPropagationStopped=Gh,this}return b(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=zo)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=zo)},persist:function(){},isPersistent:zo}),t}var yl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Do=Yt(yl),ps=b({},yl,{view:0,detail:0}),hx=Yt(ps),Cc,Ac,ys,Uo=b({},ps,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tc,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!==ys&&(ys&&e.type==="mousemove"?(Cc=e.screenX-ys.screenX,Ac=e.screenY-ys.screenY):Ac=Cc=0,ys=e),Cc)},movementY:function(e){return"movementY"in e?e.movementY:Ac}}),Ih=Yt(Uo),mx=b({},Uo,{dataTransfer:0}),px=Yt(mx),yx=b({},ps,{relatedTarget:0}),Nc=Yt(yx),gx=b({},yl,{animationName:0,elapsedTime:0,pseudoElement:0}),bx=Yt(gx),vx=b({},yl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xx=Yt(vx),_x=b({},yl,{data:0}),Qh=Yt(_x),wx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sx={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"},kx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ex(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=kx[e])?!!t[e]:!1}function Tc(){return Ex}var jx=b({},ps,{key:function(e){if(e.key){var t=wx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ro(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Sx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tc,charCode:function(e){return e.type==="keypress"?Ro(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ro(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Mx=Yt(jx),Cx=b({},Uo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vh=Yt(Cx),Ax=b({},ps,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tc}),Nx=Yt(Ax),Tx=b({},yl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ox=Yt(Tx),Rx=b({},Uo,{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}),zx=Yt(Rx),Dx=b({},yl,{newState:0,oldState:0}),Ux=Yt(Dx),Lx=[9,13,27,32],Oc=Xn&&"CompositionEvent"in window,gs=null;Xn&&"documentMode"in document&&(gs=document.documentMode);var Bx=Xn&&"TextEvent"in window&&!gs,Yh=Xn&&(!Oc||gs&&8<gs&&11>=gs),Kh=" ",$h=!1;function Xh(e,t){switch(e){case"keyup":return Lx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pi=!1;function Hx(e,t){switch(e){case"compositionend":return Fh(t);case"keypress":return t.which!==32?null:($h=!0,Kh);case"textInput":return e=t.data,e===Kh&&$h?null:e;default:return null}}function qx(e,t){if(pi)return e==="compositionend"||!Oc&&Xh(e,t)?(e=qh(),Oo=Mc=ka=null,pi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Yh&&t.locale!=="ko"?null:t.data;default:return null}}var Gx={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 Zh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Gx[e.type]:t==="textarea"}function Ph(e,t,a,i){hi?mi?mi.push(i):mi=[i]:hi=i,t=Er(t,"onChange"),0<t.length&&(a=new Do("onChange","change",null,a,i),e.push({event:a,listeners:t}))}var bs=null,vs=null;function Ix(e){Ry(e,0)}function Lo(e){var t=fs(e);if(Oh(t))return e}function Jh(e,t){if(e==="change")return t}var Wh=!1;if(Xn){var Rc;if(Xn){var zc="oninput"in document;if(!zc){var em=document.createElement("div");em.setAttribute("oninput","return;"),zc=typeof em.oninput=="function"}Rc=zc}else Rc=!1;Wh=Rc&&(!document.documentMode||9<document.documentMode)}function tm(){bs&&(bs.detachEvent("onpropertychange",nm),vs=bs=null)}function nm(e){if(e.propertyName==="value"&&Lo(vs)){var t=[];Ph(t,vs,e,kc(e)),Hh(Ix,t)}}function Qx(e,t,a){e==="focusin"?(tm(),bs=t,vs=a,bs.attachEvent("onpropertychange",nm)):e==="focusout"&&tm()}function Vx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Lo(vs)}function Yx(e,t){if(e==="click")return Lo(t)}function Kx(e,t){if(e==="input"||e==="change")return Lo(t)}function $x(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tn=typeof Object.is=="function"?Object.is:$x;function xs(e,t){if(tn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(i=0;i<a.length;i++){var r=a[i];if(!ti.call(t,r)||!tn(e[r],t[r]))return!1}return!0}function am(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function lm(e,t){var a=am(e);e=0;for(var i;a;){if(a.nodeType===3){if(i=e+a.textContent.length,e<=t&&i>=t)return{node:a,offset:t-e};e=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=am(a)}}function im(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?im(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function sm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=No(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=No(e.document)}return t}function Dc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Xx=Xn&&"documentMode"in document&&11>=document.documentMode,yi=null,Uc=null,_s=null,Lc=!1;function om(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Lc||yi==null||yi!==No(i)||(i=yi,"selectionStart"in i&&Dc(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),_s&&xs(_s,i)||(_s=i,i=Er(Uc,"onSelect"),0<i.length&&(t=new Do("onSelect","select",null,t,a),e.push({event:t,listeners:i}),t.target=yi)))}function gl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var gi={animationend:gl("Animation","AnimationEnd"),animationiteration:gl("Animation","AnimationIteration"),animationstart:gl("Animation","AnimationStart"),transitionrun:gl("Transition","TransitionRun"),transitionstart:gl("Transition","TransitionStart"),transitioncancel:gl("Transition","TransitionCancel"),transitionend:gl("Transition","TransitionEnd")},Bc={},rm={};Xn&&(rm=document.createElement("div").style,"AnimationEvent"in window||(delete gi.animationend.animation,delete gi.animationiteration.animation,delete gi.animationstart.animation),"TransitionEvent"in window||delete gi.transitionend.transition);function bl(e){if(Bc[e])return Bc[e];if(!gi[e])return e;var t=gi[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in rm)return Bc[e]=t[a];return e}var cm=bl("animationend"),um=bl("animationiteration"),dm=bl("animationstart"),Fx=bl("transitionrun"),Zx=bl("transitionstart"),Px=bl("transitioncancel"),fm=bl("transitionend"),hm=new Map,Hc="abort auxClick beforeToggle 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(" ");Hc.push("scrollEnd");function Mn(e,t){hm.set(e,t),pl(t,[e])}var Bo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},yn=[],bi=0,qc=0;function Ho(){for(var e=bi,t=qc=bi=0;t<e;){var a=yn[t];yn[t++]=null;var i=yn[t];yn[t++]=null;var r=yn[t];yn[t++]=null;var c=yn[t];if(yn[t++]=null,i!==null&&r!==null){var y=i.pending;y===null?r.next=r:(r.next=y.next,y.next=r),i.pending=r}c!==0&&mm(a,r,c)}}function qo(e,t,a,i){yn[bi++]=e,yn[bi++]=t,yn[bi++]=a,yn[bi++]=i,qc|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function Gc(e,t,a,i){return qo(e,t,a,i),Go(e)}function vl(e,t){return qo(e,null,null,t),Go(e)}function mm(e,t,a){e.lanes|=a;var i=e.alternate;i!==null&&(i.lanes|=a);for(var r=!1,c=e.return;c!==null;)c.childLanes|=a,i=c.alternate,i!==null&&(i.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(r=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,r&&t!==null&&(r=31-he(a),e=c.hiddenUpdates,i=e[r],i===null?e[r]=[t]:i.push(t),t.lane=a|536870912),c):null}function Go(e){if(50<Qs)throw Qs=0,Zu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var vi={};function Jx(e,t,a,i){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(e,t,a,i){return new Jx(e,t,a,i)}function Ic(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fn(e,t){var a=e.alternate;return a===null?(a=nn(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function pm(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Io(e,t,a,i,r,c){var y=0;if(i=e,typeof e=="function")Ic(e)&&(y=1);else if(typeof e=="string")y=a_(e,a,N.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ue:return e=nn(31,a,t,r),e.elementType=ue,e.lanes=c,e;case C:return xl(a.children,r,c,t);case M:y=8,r|=24;break;case R:return e=nn(12,a,t,r|2),e.elementType=R,e.lanes=c,e;case le:return e=nn(13,a,t,r),e.elementType=le,e.lanes=c,e;case ne:return e=nn(19,a,t,r),e.elementType=ne,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case z:y=10;break e;case D:y=9;break e;case I:y=11;break e;case W:y=14;break e;case L:y=16,i=null;break e}y=29,a=Error(o(130,e===null?"null":typeof e,"")),i=null}return t=nn(y,a,t,r),t.elementType=e,t.type=i,t.lanes=c,t}function xl(e,t,a,i){return e=nn(7,e,i,t),e.lanes=a,e}function Qc(e,t,a){return e=nn(6,e,null,t),e.lanes=a,e}function ym(e){var t=nn(18,null,null,0);return t.stateNode=e,t}function Vc(e,t,a){return t=nn(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var gm=new WeakMap;function gn(e,t){if(typeof e=="object"&&e!==null){var a=gm.get(e);return a!==void 0?a:(t={value:e,source:t,stack:ko(t)},gm.set(e,t),t)}return{value:e,source:t,stack:ko(t)}}var xi=[],_i=0,Qo=null,ws=0,bn=[],vn=0,Ea=null,Rn=1,zn="";function Zn(e,t){xi[_i++]=ws,xi[_i++]=Qo,Qo=e,ws=t}function bm(e,t,a){bn[vn++]=Rn,bn[vn++]=zn,bn[vn++]=Ea,Ea=e;var i=Rn;e=zn;var r=32-he(i)-1;i&=~(1<<r),a+=1;var c=32-he(t)+r;if(30<c){var y=r-r%5;c=(i&(1<<y)-1).toString(32),i>>=y,r-=y,Rn=1<<32-he(t)+r|a<<r|i,zn=c+e}else Rn=1<<c|a<<r|i,zn=e}function Yc(e){e.return!==null&&(Zn(e,1),bm(e,1,0))}function Kc(e){for(;e===Qo;)Qo=xi[--_i],xi[_i]=null,ws=xi[--_i],xi[_i]=null;for(;e===Ea;)Ea=bn[--vn],bn[vn]=null,zn=bn[--vn],bn[vn]=null,Rn=bn[--vn],bn[vn]=null}function vm(e,t){bn[vn++]=Rn,bn[vn++]=zn,bn[vn++]=Ea,Rn=t.id,zn=t.overflow,Ea=e}var At=null,at=null,Qe=!1,ja=null,xn=!1,$c=Error(o(519));function Ma(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ss(gn(t,e)),$c}function xm(e){var t=e.stateNode,a=e.type,i=e.memoizedProps;switch(t[Ct]=e,t[Vt]=i,a){case"dialog":qe("cancel",t),qe("close",t);break;case"iframe":case"object":case"embed":qe("load",t);break;case"video":case"audio":for(a=0;a<Ys.length;a++)qe(Ys[a],t);break;case"source":qe("error",t);break;case"img":case"image":case"link":qe("error",t),qe("load",t);break;case"details":qe("toggle",t);break;case"input":qe("invalid",t),Rh(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":qe("invalid",t);break;case"textarea":qe("invalid",t),Dh(t,i.value,i.defaultValue,i.children)}a=i.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||i.suppressHydrationWarning===!0||Ly(t.textContent,a)?(i.popover!=null&&(qe("beforetoggle",t),qe("toggle",t)),i.onScroll!=null&&qe("scroll",t),i.onScrollEnd!=null&&qe("scrollend",t),i.onClick!=null&&(t.onclick=$n),t=!0):t=!1,t||Ma(e,!0)}function _m(e){for(At=e.return;At;)switch(At.tag){case 5:case 31:case 13:xn=!1;return;case 27:case 3:xn=!0;return;default:At=At.return}}function wi(e){if(e!==At)return!1;if(!Qe)return _m(e),Qe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||dd(e.type,e.memoizedProps)),a=!a),a&&at&&Ma(e),_m(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));at=Ky(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));at=Ky(e)}else t===27?(t=at,Ga(e.type)?(e=yd,yd=null,at=e):at=t):at=At?wn(e.stateNode.nextSibling):null;return!0}function _l(){at=At=null,Qe=!1}function Xc(){var e=ja;return e!==null&&(Ft===null?Ft=e:Ft.push.apply(Ft,e),ja=null),e}function Ss(e){ja===null?ja=[e]:ja.push(e)}var Fc=S(null),wl=null,Pn=null;function Ca(e,t,a){Y(Fc,t._currentValue),t._currentValue=a}function Jn(e){e._currentValue=Fc.current,q(Fc)}function Zc(e,t,a){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===a)break;e=e.return}}function Pc(e,t,a,i){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var c=r.dependencies;if(c!==null){var y=r.child;c=c.firstContext;e:for(;c!==null;){var v=c;c=r;for(var A=0;A<t.length;A++)if(v.context===t[A]){c.lanes|=a,v=c.alternate,v!==null&&(v.lanes|=a),Zc(c.return,a,e),i||(y=null);break e}c=v.next}}else if(r.tag===18){if(y=r.return,y===null)throw Error(o(341));y.lanes|=a,c=y.alternate,c!==null&&(c.lanes|=a),Zc(y,a,e),y=null}else y=r.child;if(y!==null)y.return=r;else for(y=r;y!==null;){if(y===e){y=null;break}if(r=y.sibling,r!==null){r.return=y.return,y=r;break}y=y.return}r=y}}function Si(e,t,a,i){e=null;for(var r=t,c=!1;r!==null;){if(!c){if((r.flags&524288)!==0)c=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var y=r.alternate;if(y===null)throw Error(o(387));if(y=y.memoizedProps,y!==null){var v=r.type;tn(r.pendingProps.value,y.value)||(e!==null?e.push(v):e=[v])}}else if(r===Z.current){if(y=r.alternate,y===null)throw Error(o(387));y.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Zs):e=[Zs])}r=r.return}e!==null&&Pc(t,e,a,i),t.flags|=262144}function Vo(e){for(e=e.firstContext;e!==null;){if(!tn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Sl(e){wl=e,Pn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Nt(e){return wm(wl,e)}function Yo(e,t){return wl===null&&Sl(e),wm(e,t)}function wm(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Pn===null){if(e===null)throw Error(o(308));Pn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Pn=Pn.next=t;return a}var Wx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},e2=n.unstable_scheduleCallback,t2=n.unstable_NormalPriority,bt={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Jc(){return{controller:new Wx,data:new Map,refCount:0}}function ks(e){e.refCount--,e.refCount===0&&e2(t2,function(){e.controller.abort()})}var Es=null,Wc=0,ki=0,Ei=null;function n2(e,t){if(Es===null){var a=Es=[];Wc=0,ki=nd(),Ei={status:"pending",value:void 0,then:function(i){a.push(i)}}}return Wc++,t.then(Sm,Sm),t}function Sm(){if(--Wc===0&&Es!==null){Ei!==null&&(Ei.status="fulfilled");var e=Es;Es=null,ki=0,Ei=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function a2(e,t){var a=[],i={status:"pending",value:null,reason:null,then:function(r){a.push(r)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var r=0;r<a.length;r++)(0,a[r])(t)},function(r){for(i.status="rejected",i.reason=r,r=0;r<a.length;r++)(0,a[r])(void 0)}),i}var km=w.S;w.S=function(e,t){oy=rt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&n2(e,t),km!==null&&km(e,t)};var kl=S(null);function eu(){var e=kl.current;return e!==null?e:tt.pooledCache}function Ko(e,t){t===null?Y(kl,kl.current):Y(kl,t.pool)}function Em(){var e=eu();return e===null?null:{parent:bt._currentValue,pool:e}}var ji=Error(o(460)),tu=Error(o(474)),$o=Error(o(542)),Xo={then:function(){}};function jm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Mm(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then($n,$n),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Am(e),e;default:if(typeof t.status=="string")t.then($n,$n);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=i}},function(i){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Am(e),e}throw jl=t,ji}}function El(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(jl=a,ji):a}}var jl=null;function Cm(){if(jl===null)throw Error(o(459));var e=jl;return jl=null,e}function Am(e){if(e===ji||e===$o)throw Error(o(483))}var Mi=null,js=0;function Fo(e){var t=js;return js+=1,Mi===null&&(Mi=[]),Mm(Mi,e,t)}function Ms(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Zo(e,t){throw t.$$typeof===E?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Nm(e){function t(B,O){if(e){var V=B.deletions;V===null?(B.deletions=[O],B.flags|=16):V.push(O)}}function a(B,O){if(!e)return null;for(;O!==null;)t(B,O),O=O.sibling;return null}function i(B){for(var O=new Map;B!==null;)B.key!==null?O.set(B.key,B):O.set(B.index,B),B=B.sibling;return O}function r(B,O){return B=Fn(B,O),B.index=0,B.sibling=null,B}function c(B,O,V){return B.index=V,e?(V=B.alternate,V!==null?(V=V.index,V<O?(B.flags|=67108866,O):V):(B.flags|=67108866,O)):(B.flags|=1048576,O)}function y(B){return e&&B.alternate===null&&(B.flags|=67108866),B}function v(B,O,V,se){return O===null||O.tag!==6?(O=Qc(V,B.mode,se),O.return=B,O):(O=r(O,V),O.return=B,O)}function A(B,O,V,se){var ke=V.type;return ke===C?ae(B,O,V.props.children,se,V.key):O!==null&&(O.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===L&&El(ke)===O.type)?(O=r(O,V.props),Ms(O,V),O.return=B,O):(O=Io(V.type,V.key,V.props,null,B.mode,se),Ms(O,V),O.return=B,O)}function K(B,O,V,se){return O===null||O.tag!==4||O.stateNode.containerInfo!==V.containerInfo||O.stateNode.implementation!==V.implementation?(O=Vc(V,B.mode,se),O.return=B,O):(O=r(O,V.children||[]),O.return=B,O)}function ae(B,O,V,se,ke){return O===null||O.tag!==7?(O=xl(V,B.mode,se,ke),O.return=B,O):(O=r(O,V),O.return=B,O)}function oe(B,O,V){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Qc(""+O,B.mode,V),O.return=B,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case j:return V=Io(O.type,O.key,O.props,null,B.mode,V),Ms(V,O),V.return=B,V;case T:return O=Vc(O,B.mode,V),O.return=B,O;case L:return O=El(O),oe(B,O,V)}if($(O)||ie(O))return O=xl(O,B.mode,V,null),O.return=B,O;if(typeof O.then=="function")return oe(B,Fo(O),V);if(O.$$typeof===z)return oe(B,Yo(B,O),V);Zo(B,O)}return null}function X(B,O,V,se){var ke=O!==null?O.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return ke!==null?null:v(B,O,""+V,se);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case j:return V.key===ke?A(B,O,V,se):null;case T:return V.key===ke?K(B,O,V,se):null;case L:return V=El(V),X(B,O,V,se)}if($(V)||ie(V))return ke!==null?null:ae(B,O,V,se,null);if(typeof V.then=="function")return X(B,O,Fo(V),se);if(V.$$typeof===z)return X(B,O,Yo(B,V),se);Zo(B,V)}return null}function J(B,O,V,se,ke){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return B=B.get(V)||null,v(O,B,""+se,ke);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case j:return B=B.get(se.key===null?V:se.key)||null,A(O,B,se,ke);case T:return B=B.get(se.key===null?V:se.key)||null,K(O,B,se,ke);case L:return se=El(se),J(B,O,V,se,ke)}if($(se)||ie(se))return B=B.get(V)||null,ae(O,B,se,ke,null);if(typeof se.then=="function")return J(B,O,V,Fo(se),ke);if(se.$$typeof===z)return J(B,O,V,Yo(O,se),ke);Zo(O,se)}return null}function _e(B,O,V,se){for(var ke=null,Ke=null,we=O,ze=O=0,Ie=null;we!==null&&ze<V.length;ze++){we.index>ze?(Ie=we,we=null):Ie=we.sibling;var $e=X(B,we,V[ze],se);if($e===null){we===null&&(we=Ie);break}e&&we&&$e.alternate===null&&t(B,we),O=c($e,O,ze),Ke===null?ke=$e:Ke.sibling=$e,Ke=$e,we=Ie}if(ze===V.length)return a(B,we),Qe&&Zn(B,ze),ke;if(we===null){for(;ze<V.length;ze++)we=oe(B,V[ze],se),we!==null&&(O=c(we,O,ze),Ke===null?ke=we:Ke.sibling=we,Ke=we);return Qe&&Zn(B,ze),ke}for(we=i(we);ze<V.length;ze++)Ie=J(we,B,ze,V[ze],se),Ie!==null&&(e&&Ie.alternate!==null&&we.delete(Ie.key===null?ze:Ie.key),O=c(Ie,O,ze),Ke===null?ke=Ie:Ke.sibling=Ie,Ke=Ie);return e&&we.forEach(function(Ka){return t(B,Ka)}),Qe&&Zn(B,ze),ke}function Ce(B,O,V,se){if(V==null)throw Error(o(151));for(var ke=null,Ke=null,we=O,ze=O=0,Ie=null,$e=V.next();we!==null&&!$e.done;ze++,$e=V.next()){we.index>ze?(Ie=we,we=null):Ie=we.sibling;var Ka=X(B,we,$e.value,se);if(Ka===null){we===null&&(we=Ie);break}e&&we&&Ka.alternate===null&&t(B,we),O=c(Ka,O,ze),Ke===null?ke=Ka:Ke.sibling=Ka,Ke=Ka,we=Ie}if($e.done)return a(B,we),Qe&&Zn(B,ze),ke;if(we===null){for(;!$e.done;ze++,$e=V.next())$e=oe(B,$e.value,se),$e!==null&&(O=c($e,O,ze),Ke===null?ke=$e:Ke.sibling=$e,Ke=$e);return Qe&&Zn(B,ze),ke}for(we=i(we);!$e.done;ze++,$e=V.next())$e=J(we,B,ze,$e.value,se),$e!==null&&(e&&$e.alternate!==null&&we.delete($e.key===null?ze:$e.key),O=c($e,O,ze),Ke===null?ke=$e:Ke.sibling=$e,Ke=$e);return e&&we.forEach(function(m_){return t(B,m_)}),Qe&&Zn(B,ze),ke}function et(B,O,V,se){if(typeof V=="object"&&V!==null&&V.type===C&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case j:e:{for(var ke=V.key;O!==null;){if(O.key===ke){if(ke=V.type,ke===C){if(O.tag===7){a(B,O.sibling),se=r(O,V.props.children),se.return=B,B=se;break e}}else if(O.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===L&&El(ke)===O.type){a(B,O.sibling),se=r(O,V.props),Ms(se,V),se.return=B,B=se;break e}a(B,O);break}else t(B,O);O=O.sibling}V.type===C?(se=xl(V.props.children,B.mode,se,V.key),se.return=B,B=se):(se=Io(V.type,V.key,V.props,null,B.mode,se),Ms(se,V),se.return=B,B=se)}return y(B);case T:e:{for(ke=V.key;O!==null;){if(O.key===ke)if(O.tag===4&&O.stateNode.containerInfo===V.containerInfo&&O.stateNode.implementation===V.implementation){a(B,O.sibling),se=r(O,V.children||[]),se.return=B,B=se;break e}else{a(B,O);break}else t(B,O);O=O.sibling}se=Vc(V,B.mode,se),se.return=B,B=se}return y(B);case L:return V=El(V),et(B,O,V,se)}if($(V))return _e(B,O,V,se);if(ie(V)){if(ke=ie(V),typeof ke!="function")throw Error(o(150));return V=ke.call(V),Ce(B,O,V,se)}if(typeof V.then=="function")return et(B,O,Fo(V),se);if(V.$$typeof===z)return et(B,O,Yo(B,V),se);Zo(B,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,O!==null&&O.tag===6?(a(B,O.sibling),se=r(O,V),se.return=B,B=se):(a(B,O),se=Qc(V,B.mode,se),se.return=B,B=se),y(B)):a(B,O)}return function(B,O,V,se){try{js=0;var ke=et(B,O,V,se);return Mi=null,ke}catch(we){if(we===ji||we===$o)throw we;var Ke=nn(29,we,null,B.mode);return Ke.lanes=se,Ke.return=B,Ke}finally{}}}var Ml=Nm(!0),Tm=Nm(!1),Aa=!1;function nu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function au(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Na(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ta(e,t,a){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Xe&2)!==0){var r=i.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),i.pending=t,t=Go(e),mm(e,null,a),t}return qo(e,i,t,a),Go(e)}function Cs(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,wh(e,a)}}function lu(e,t){var a=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,a===i)){var r=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?r=c=y:c=c.next=y,a=a.next}while(a!==null);c===null?r=c=t:c=c.next=t}else r=c=t;a={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:c,shared:i.shared,callbacks:i.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var iu=!1;function As(){if(iu){var e=Ei;if(e!==null)throw e}}function Ns(e,t,a,i){iu=!1;var r=e.updateQueue;Aa=!1;var c=r.firstBaseUpdate,y=r.lastBaseUpdate,v=r.shared.pending;if(v!==null){r.shared.pending=null;var A=v,K=A.next;A.next=null,y===null?c=K:y.next=K,y=A;var ae=e.alternate;ae!==null&&(ae=ae.updateQueue,v=ae.lastBaseUpdate,v!==y&&(v===null?ae.firstBaseUpdate=K:v.next=K,ae.lastBaseUpdate=A))}if(c!==null){var oe=r.baseState;y=0,ae=K=A=null,v=c;do{var X=v.lane&-536870913,J=X!==v.lane;if(J?(Ge&X)===X:(i&X)===X){X!==0&&X===ki&&(iu=!0),ae!==null&&(ae=ae.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var _e=e,Ce=v;X=t;var et=a;switch(Ce.tag){case 1:if(_e=Ce.payload,typeof _e=="function"){oe=_e.call(et,oe,X);break e}oe=_e;break e;case 3:_e.flags=_e.flags&-65537|128;case 0:if(_e=Ce.payload,X=typeof _e=="function"?_e.call(et,oe,X):_e,X==null)break e;oe=b({},oe,X);break e;case 2:Aa=!0}}X=v.callback,X!==null&&(e.flags|=64,J&&(e.flags|=8192),J=r.callbacks,J===null?r.callbacks=[X]:J.push(X))}else J={lane:X,tag:v.tag,payload:v.payload,callback:v.callback,next:null},ae===null?(K=ae=J,A=oe):ae=ae.next=J,y|=X;if(v=v.next,v===null){if(v=r.shared.pending,v===null)break;J=v,v=J.next,J.next=null,r.lastBaseUpdate=J,r.shared.pending=null}}while(!0);ae===null&&(A=oe),r.baseState=A,r.firstBaseUpdate=K,r.lastBaseUpdate=ae,c===null&&(r.shared.lanes=0),Ua|=y,e.lanes=y,e.memoizedState=oe}}function Om(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Rm(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Om(a[e],t)}var Ci=S(null),Po=S(0);function zm(e,t){e=oa,Y(Po,e),Y(Ci,t),oa=e|t.baseLanes}function su(){Y(Po,oa),Y(Ci,Ci.current)}function ou(){oa=Po.current,q(Ci),q(Po)}var an=S(null),_n=null;function Oa(e){var t=e.alternate;Y(yt,yt.current&1),Y(an,e),_n===null&&(t===null||Ci.current!==null||t.memoizedState!==null)&&(_n=e)}function ru(e){Y(yt,yt.current),Y(an,e),_n===null&&(_n=e)}function Dm(e){e.tag===22?(Y(yt,yt.current),Y(an,e),_n===null&&(_n=e)):Ra()}function Ra(){Y(yt,yt.current),Y(an,an.current)}function ln(e){q(an),_n===e&&(_n=null),q(yt)}var yt=S(0);function Jo(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||md(a)||pd(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wn=0,Oe=null,Je=null,vt=null,Wo=!1,Ai=!1,Cl=!1,er=0,Ts=0,Ni=null,l2=0;function ut(){throw Error(o(321))}function cu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!tn(e[a],t[a]))return!1;return!0}function uu(e,t,a,i,r,c){return Wn=c,Oe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,w.H=e===null||e.memoizedState===null?bp:Eu,Cl=!1,c=a(i,r),Cl=!1,Ai&&(c=Lm(t,a,i,r)),Um(e),c}function Um(e){w.H=zs;var t=Je!==null&&Je.next!==null;if(Wn=0,vt=Je=Oe=null,Wo=!1,Ts=0,Ni=null,t)throw Error(o(300));e===null||xt||(e=e.dependencies,e!==null&&Vo(e)&&(xt=!0))}function Lm(e,t,a,i){Oe=e;var r=0;do{if(Ai&&(Ni=null),Ts=0,Ai=!1,25<=r)throw Error(o(301));if(r+=1,vt=Je=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}w.H=vp,c=t(a,i)}while(Ai);return c}function i2(){var e=w.H,t=e.useState()[0];return t=typeof t.then=="function"?Os(t):t,e=e.useState()[0],(Je!==null?Je.memoizedState:null)!==e&&(Oe.flags|=1024),t}function du(){var e=er!==0;return er=0,e}function fu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function hu(e){if(Wo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Wo=!1}Wn=0,vt=Je=Oe=null,Ai=!1,Ts=er=0,Ni=null}function Gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vt===null?Oe.memoizedState=vt=e:vt=vt.next=e,vt}function gt(){if(Je===null){var e=Oe.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=vt===null?Oe.memoizedState:vt.next;if(t!==null)vt=t,Je=e;else{if(e===null)throw Oe.alternate===null?Error(o(467)):Error(o(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},vt===null?Oe.memoizedState=vt=e:vt=vt.next=e}return vt}function tr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Os(e){var t=Ts;return Ts+=1,Ni===null&&(Ni=[]),e=Mm(Ni,e,t),t=Oe,(vt===null?t.memoizedState:vt.next)===null&&(t=t.alternate,w.H=t===null||t.memoizedState===null?bp:Eu),e}function nr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Os(e);if(e.$$typeof===z)return Nt(e)}throw Error(o(438,String(e)))}function mu(e){var t=null,a=Oe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var i=Oe.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=tr(),Oe.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),i=0;i<e;i++)a[i]=de;return t.index++,a}function ea(e,t){return typeof t=="function"?t(e):t}function ar(e){var t=gt();return pu(t,Je,e)}function pu(e,t,a){var i=e.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=a;var r=e.baseQueue,c=i.pending;if(c!==null){if(r!==null){var y=r.next;r.next=c.next,c.next=y}t.baseQueue=r=c,i.pending=null}if(c=e.baseState,r===null)e.memoizedState=c;else{t=r.next;var v=y=null,A=null,K=t,ae=!1;do{var oe=K.lane&-536870913;if(oe!==K.lane?(Ge&oe)===oe:(Wn&oe)===oe){var X=K.revertLane;if(X===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),oe===ki&&(ae=!0);else if((Wn&X)===X){K=K.next,X===ki&&(ae=!0);continue}else oe={lane:0,revertLane:K.revertLane,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},A===null?(v=A=oe,y=c):A=A.next=oe,Oe.lanes|=X,Ua|=X;oe=K.action,Cl&&a(c,oe),c=K.hasEagerState?K.eagerState:a(c,oe)}else X={lane:oe,revertLane:K.revertLane,gesture:K.gesture,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},A===null?(v=A=X,y=c):A=A.next=X,Oe.lanes|=oe,Ua|=oe;K=K.next}while(K!==null&&K!==t);if(A===null?y=c:A.next=v,!tn(c,e.memoizedState)&&(xt=!0,ae&&(a=Ei,a!==null)))throw a;e.memoizedState=c,e.baseState=y,e.baseQueue=A,i.lastRenderedState=c}return r===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function yu(e){var t=gt(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var i=a.dispatch,r=a.pending,c=t.memoizedState;if(r!==null){a.pending=null;var y=r=r.next;do c=e(c,y.action),y=y.next;while(y!==r);tn(c,t.memoizedState)||(xt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,i]}function Bm(e,t,a){var i=Oe,r=gt(),c=Qe;if(c){if(a===void 0)throw Error(o(407));a=a()}else a=t();var y=!tn((Je||r).memoizedState,a);if(y&&(r.memoizedState=a,xt=!0),r=r.queue,vu(Gm.bind(null,i,r,e),[e]),r.getSnapshot!==t||y||vt!==null&&vt.memoizedState.tag&1){if(i.flags|=2048,Ti(9,{destroy:void 0},qm.bind(null,i,r,a,t),null),tt===null)throw Error(o(349));c||(Wn&127)!==0||Hm(i,t,a)}return a}function Hm(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Oe.updateQueue,t===null?(t=tr(),Oe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function qm(e,t,a,i){t.value=a,t.getSnapshot=i,Im(t)&&Qm(e)}function Gm(e,t,a){return a(function(){Im(t)&&Qm(e)})}function Im(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!tn(e,a)}catch{return!0}}function Qm(e){var t=vl(e,2);t!==null&&Zt(t,e,2)}function gu(e){var t=Gt();if(typeof e=="function"){var a=e;if(e=a(),Cl){te(!0);try{a()}finally{te(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:e},t}function Vm(e,t,a,i){return e.baseState=a,pu(e,Je,typeof i=="function"?i:ea)}function s2(e,t,a,i,r){if(sr(e))throw Error(o(485));if(e=t.action,e!==null){var c={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){c.listeners.push(y)}};w.T!==null?a(!0):c.isTransition=!1,i(c),a=t.pending,a===null?(c.next=t.pending=c,Ym(t,c)):(c.next=a.next,t.pending=a.next=c)}}function Ym(e,t){var a=t.action,i=t.payload,r=e.state;if(t.isTransition){var c=w.T,y={};w.T=y;try{var v=a(r,i),A=w.S;A!==null&&A(y,v),Km(e,t,v)}catch(K){bu(e,t,K)}finally{c!==null&&y.types!==null&&(c.types=y.types),w.T=c}}else try{c=a(r,i),Km(e,t,c)}catch(K){bu(e,t,K)}}function Km(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(i){$m(e,t,i)},function(i){return bu(e,t,i)}):$m(e,t,a)}function $m(e,t,a){t.status="fulfilled",t.value=a,Xm(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Ym(e,a)))}function bu(e,t,a){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=a,Xm(t),t=t.next;while(t!==i)}e.action=null}function Xm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Fm(e,t){return t}function Zm(e,t){if(Qe){var a=tt.formState;if(a!==null){e:{var i=Oe;if(Qe){if(at){t:{for(var r=at,c=xn;r.nodeType!==8;){if(!c){r=null;break t}if(r=wn(r.nextSibling),r===null){r=null;break t}}c=r.data,r=c==="F!"||c==="F"?r:null}if(r){at=wn(r.nextSibling),i=r.data==="F!";break e}}Ma(i)}i=!1}i&&(t=a[0])}}return a=Gt(),a.memoizedState=a.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fm,lastRenderedState:t},a.queue=i,a=pp.bind(null,Oe,i),i.dispatch=a,i=gu(!1),c=ku.bind(null,Oe,!1,i.queue),i=Gt(),r={state:t,dispatch:null,action:e,pending:null},i.queue=r,a=s2.bind(null,Oe,r,c,a),r.dispatch=a,i.memoizedState=e,[t,a,!1]}function Pm(e){var t=gt();return Jm(t,Je,e)}function Jm(e,t,a){if(t=pu(e,t,Fm)[0],e=ar(ea)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=Os(t)}catch(y){throw y===ji?$o:y}else i=t;t=gt();var r=t.queue,c=r.dispatch;return a!==t.memoizedState&&(Oe.flags|=2048,Ti(9,{destroy:void 0},o2.bind(null,r,a),null)),[i,c,e]}function o2(e,t){e.action=t}function Wm(e){var t=gt(),a=Je;if(a!==null)return Jm(t,a,e);gt(),t=t.memoizedState,a=gt();var i=a.queue.dispatch;return a.memoizedState=e,[t,i,!1]}function Ti(e,t,a,i){return e={tag:e,create:a,deps:i,inst:t,next:null},t=Oe.updateQueue,t===null&&(t=tr(),Oe.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(i=a.next,a.next=e,e.next=i,t.lastEffect=e),e}function ep(){return gt().memoizedState}function lr(e,t,a,i){var r=Gt();Oe.flags|=e,r.memoizedState=Ti(1|t,{destroy:void 0},a,i===void 0?null:i)}function ir(e,t,a,i){var r=gt();i=i===void 0?null:i;var c=r.memoizedState.inst;Je!==null&&i!==null&&cu(i,Je.memoizedState.deps)?r.memoizedState=Ti(t,c,a,i):(Oe.flags|=e,r.memoizedState=Ti(1|t,c,a,i))}function tp(e,t){lr(8390656,8,e,t)}function vu(e,t){ir(2048,8,e,t)}function r2(e){Oe.flags|=4;var t=Oe.updateQueue;if(t===null)t=tr(),Oe.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function np(e){var t=gt().memoizedState;return r2({ref:t,nextImpl:e}),function(){if((Xe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function ap(e,t){return ir(4,2,e,t)}function lp(e,t){return ir(4,4,e,t)}function ip(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function sp(e,t,a){a=a!=null?a.concat([e]):null,ir(4,4,ip.bind(null,t,e),a)}function xu(){}function op(e,t){var a=gt();t=t===void 0?null:t;var i=a.memoizedState;return t!==null&&cu(t,i[1])?i[0]:(a.memoizedState=[e,t],e)}function rp(e,t){var a=gt();t=t===void 0?null:t;var i=a.memoizedState;if(t!==null&&cu(t,i[1]))return i[0];if(i=e(),Cl){te(!0);try{e()}finally{te(!1)}}return a.memoizedState=[i,t],i}function _u(e,t,a){return a===void 0||(Wn&1073741824)!==0&&(Ge&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=cy(),Oe.lanes|=e,Ua|=e,a)}function cp(e,t,a,i){return tn(a,t)?a:Ci.current!==null?(e=_u(e,a,i),tn(e,t)||(xt=!0),e):(Wn&42)===0||(Wn&1073741824)!==0&&(Ge&261930)===0?(xt=!0,e.memoizedState=a):(e=cy(),Oe.lanes|=e,Ua|=e,t)}function up(e,t,a,i,r){var c=F.p;F.p=c!==0&&8>c?c:8;var y=w.T,v={};w.T=v,ku(e,!1,t,a);try{var A=r(),K=w.S;if(K!==null&&K(v,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var ae=a2(A,i);Rs(e,t,ae,rn(e))}else Rs(e,t,i,rn(e))}catch(oe){Rs(e,t,{then:function(){},status:"rejected",reason:oe},rn())}finally{F.p=c,y!==null&&v.types!==null&&(y.types=v.types),w.T=y}}function c2(){}function wu(e,t,a,i){if(e.tag!==5)throw Error(o(476));var r=dp(e).queue;up(e,r,t,ce,a===null?c2:function(){return fp(e),a(i)})}function dp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:ce},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function fp(e){var t=dp(e);t.next===null&&(t=e.alternate.memoizedState),Rs(e,t.next.queue,{},rn())}function Su(){return Nt(Zs)}function hp(){return gt().memoizedState}function mp(){return gt().memoizedState}function u2(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=rn();e=Na(a);var i=Ta(t,e,a);i!==null&&(Zt(i,t,a),Cs(i,t,a)),t={cache:Jc()},e.payload=t;return}t=t.return}}function d2(e,t,a){var i=rn();a={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},sr(e)?yp(t,a):(a=Gc(e,t,a,i),a!==null&&(Zt(a,e,i),gp(a,t,i)))}function pp(e,t,a){var i=rn();Rs(e,t,a,i)}function Rs(e,t,a,i){var r={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(sr(e))yp(t,r);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var y=t.lastRenderedState,v=c(y,a);if(r.hasEagerState=!0,r.eagerState=v,tn(v,y))return qo(e,t,r,0),tt===null&&Ho(),!1}catch{}finally{}if(a=Gc(e,t,r,i),a!==null)return Zt(a,e,i),gp(a,t,i),!0}return!1}function ku(e,t,a,i){if(i={lane:2,revertLane:nd(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},sr(e)){if(t)throw Error(o(479))}else t=Gc(e,a,i,2),t!==null&&Zt(t,e,2)}function sr(e){var t=e.alternate;return e===Oe||t!==null&&t===Oe}function yp(e,t){Ai=Wo=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function gp(e,t,a){if((a&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,wh(e,a)}}var zs={readContext:Nt,use:nr,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut};zs.useEffectEvent=ut;var bp={readContext:Nt,use:nr,useCallback:function(e,t){return Gt().memoizedState=[e,t===void 0?null:t],e},useContext:Nt,useEffect:tp,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,lr(4194308,4,ip.bind(null,t,e),a)},useLayoutEffect:function(e,t){return lr(4194308,4,e,t)},useInsertionEffect:function(e,t){lr(4,2,e,t)},useMemo:function(e,t){var a=Gt();t=t===void 0?null:t;var i=e();if(Cl){te(!0);try{e()}finally{te(!1)}}return a.memoizedState=[i,t],i},useReducer:function(e,t,a){var i=Gt();if(a!==void 0){var r=a(t);if(Cl){te(!0);try{a(t)}finally{te(!1)}}}else r=t;return i.memoizedState=i.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},i.queue=e,e=e.dispatch=d2.bind(null,Oe,e),[i.memoizedState,e]},useRef:function(e){var t=Gt();return e={current:e},t.memoizedState=e},useState:function(e){e=gu(e);var t=e.queue,a=pp.bind(null,Oe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:xu,useDeferredValue:function(e,t){var a=Gt();return _u(a,e,t)},useTransition:function(){var e=gu(!1);return e=up.bind(null,Oe,e.queue,!0,!1),Gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var i=Oe,r=Gt();if(Qe){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),tt===null)throw Error(o(349));(Ge&127)!==0||Hm(i,t,a)}r.memoizedState=a;var c={value:a,getSnapshot:t};return r.queue=c,tp(Gm.bind(null,i,c,e),[e]),i.flags|=2048,Ti(9,{destroy:void 0},qm.bind(null,i,c,a,t),null),a},useId:function(){var e=Gt(),t=tt.identifierPrefix;if(Qe){var a=zn,i=Rn;a=(i&~(1<<32-he(i)-1)).toString(32)+a,t="_"+t+"R_"+a,a=er++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=l2++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Su,useFormState:Zm,useActionState:Zm,useOptimistic:function(e){var t=Gt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=ku.bind(null,Oe,!0,a),a.dispatch=t,[e,t]},useMemoCache:mu,useCacheRefresh:function(){return Gt().memoizedState=u2.bind(null,Oe)},useEffectEvent:function(e){var t=Gt(),a={impl:e};return t.memoizedState=a,function(){if((Xe&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},Eu={readContext:Nt,use:nr,useCallback:op,useContext:Nt,useEffect:vu,useImperativeHandle:sp,useInsertionEffect:ap,useLayoutEffect:lp,useMemo:rp,useReducer:ar,useRef:ep,useState:function(){return ar(ea)},useDebugValue:xu,useDeferredValue:function(e,t){var a=gt();return cp(a,Je.memoizedState,e,t)},useTransition:function(){var e=ar(ea)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:Os(e),t]},useSyncExternalStore:Bm,useId:hp,useHostTransitionStatus:Su,useFormState:Pm,useActionState:Pm,useOptimistic:function(e,t){var a=gt();return Vm(a,Je,e,t)},useMemoCache:mu,useCacheRefresh:mp};Eu.useEffectEvent=np;var vp={readContext:Nt,use:nr,useCallback:op,useContext:Nt,useEffect:vu,useImperativeHandle:sp,useInsertionEffect:ap,useLayoutEffect:lp,useMemo:rp,useReducer:yu,useRef:ep,useState:function(){return yu(ea)},useDebugValue:xu,useDeferredValue:function(e,t){var a=gt();return Je===null?_u(a,e,t):cp(a,Je.memoizedState,e,t)},useTransition:function(){var e=yu(ea)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:Os(e),t]},useSyncExternalStore:Bm,useId:hp,useHostTransitionStatus:Su,useFormState:Wm,useActionState:Wm,useOptimistic:function(e,t){var a=gt();return Je!==null?Vm(a,Je,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:mu,useCacheRefresh:mp};vp.useEffectEvent=np;function ju(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:b({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Mu={enqueueSetState:function(e,t,a){e=e._reactInternals;var i=rn(),r=Na(i);r.payload=t,a!=null&&(r.callback=a),t=Ta(e,r,i),t!==null&&(Zt(t,e,i),Cs(t,e,i))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=rn(),r=Na(i);r.tag=1,r.payload=t,a!=null&&(r.callback=a),t=Ta(e,r,i),t!==null&&(Zt(t,e,i),Cs(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=rn(),i=Na(a);i.tag=2,t!=null&&(i.callback=t),t=Ta(e,i,a),t!==null&&(Zt(t,e,a),Cs(t,e,a))}};function xp(e,t,a,i,r,c,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,c,y):t.prototype&&t.prototype.isPureReactComponent?!xs(a,i)||!xs(r,c):!0}function _p(e,t,a,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,i),t.state!==e&&Mu.enqueueReplaceState(t,t.state,null)}function Al(e,t){var a=t;if("ref"in t){a={};for(var i in t)i!=="ref"&&(a[i]=t[i])}if(e=e.defaultProps){a===t&&(a=b({},a));for(var r in e)a[r]===void 0&&(a[r]=e[r])}return a}function wp(e){Bo(e)}function Sp(e){console.error(e)}function kp(e){Bo(e)}function or(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Ep(e,t,a){try{var i=e.onCaughtError;i(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Cu(e,t,a){return a=Na(a),a.tag=3,a.payload={element:null},a.callback=function(){or(e,t)},a}function jp(e){return e=Na(e),e.tag=3,e}function Mp(e,t,a,i){var r=a.type.getDerivedStateFromError;if(typeof r=="function"){var c=i.value;e.payload=function(){return r(c)},e.callback=function(){Ep(t,a,i)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Ep(t,a,i),typeof r!="function"&&(La===null?La=new Set([this]):La.add(this));var v=i.stack;this.componentDidCatch(i.value,{componentStack:v!==null?v:""})})}function f2(e,t,a,i,r){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=a.alternate,t!==null&&Si(t,a,r,!0),a=an.current,a!==null){switch(a.tag){case 31:case 13:return _n===null?vr():a.alternate===null&&dt===0&&(dt=3),a.flags&=-257,a.flags|=65536,a.lanes=r,i===Xo?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([i]):t.add(i),Wu(e,i,r)),!1;case 22:return a.flags|=65536,i===Xo?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([i]):a.add(i)),Wu(e,i,r)),!1}throw Error(o(435,a.tag))}return Wu(e,i,r),vr(),!1}if(Qe)return t=an.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,i!==$c&&(e=Error(o(422),{cause:i}),Ss(gn(e,a)))):(i!==$c&&(t=Error(o(423),{cause:i}),Ss(gn(t,a))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,i=gn(i,a),r=Cu(e.stateNode,i,r),lu(e,r),dt!==4&&(dt=2)),!1;var c=Error(o(520),{cause:i});if(c=gn(c,a),Is===null?Is=[c]:Is.push(c),dt!==4&&(dt=2),t===null)return!0;i=gn(i,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=r&-r,a.lanes|=e,e=Cu(a.stateNode,i,e),lu(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(La===null||!La.has(c))))return a.flags|=65536,r&=-r,a.lanes|=r,r=jp(r),Mp(r,e,a,i),lu(a,r),!1}a=a.return}while(a!==null);return!1}var Au=Error(o(461)),xt=!1;function Tt(e,t,a,i){t.child=e===null?Tm(t,null,a,i):Ml(t,e.child,a,i)}function Cp(e,t,a,i,r){a=a.render;var c=t.ref;if("ref"in i){var y={};for(var v in i)v!=="ref"&&(y[v]=i[v])}else y=i;return Sl(t),i=uu(e,t,a,y,c,r),v=du(),e!==null&&!xt?(fu(e,t,r),ta(e,t,r)):(Qe&&v&&Yc(t),t.flags|=1,Tt(e,t,i,r),t.child)}function Ap(e,t,a,i,r){if(e===null){var c=a.type;return typeof c=="function"&&!Ic(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,Np(e,t,c,i,r)):(e=Io(a.type,null,i,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!Lu(e,r)){var y=c.memoizedProps;if(a=a.compare,a=a!==null?a:xs,a(y,i)&&e.ref===t.ref)return ta(e,t,r)}return t.flags|=1,e=Fn(c,i),e.ref=t.ref,e.return=t,t.child=e}function Np(e,t,a,i,r){if(e!==null){var c=e.memoizedProps;if(xs(c,i)&&e.ref===t.ref)if(xt=!1,t.pendingProps=i=c,Lu(e,r))(e.flags&131072)!==0&&(xt=!0);else return t.lanes=e.lanes,ta(e,t,r)}return Nu(e,t,a,i,r)}function Tp(e,t,a,i){var r=i.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|a:a,e!==null){for(i=t.child=e.child,r=0;i!==null;)r=r|i.lanes|i.childLanes,i=i.sibling;i=r&~c}else i=0,t.child=null;return Op(e,t,c,a,i)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ko(t,c!==null?c.cachePool:null),c!==null?zm(t,c):su(),Dm(t);else return i=t.lanes=536870912,Op(e,t,c!==null?c.baseLanes|a:a,a,i)}else c!==null?(Ko(t,c.cachePool),zm(t,c),Ra(),t.memoizedState=null):(e!==null&&Ko(t,null),su(),Ra());return Tt(e,t,r,a),t.child}function Ds(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Op(e,t,a,i,r){var c=eu();return c=c===null?null:{parent:bt._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&Ko(t,null),su(),Dm(t),e!==null&&Si(e,t,i,!0),t.childLanes=r,null}function rr(e,t){return t=ur({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Rp(e,t,a){return Ml(t,e.child,null,a),e=rr(t,t.pendingProps),e.flags|=2,ln(t),t.memoizedState=null,e}function h2(e,t,a){var i=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Qe){if(i.mode==="hidden")return e=rr(t,i),t.lanes=536870912,Ds(null,e);if(ru(t),(e=at)?(e=Yy(e,xn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ea!==null?{id:Rn,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},a=ym(e),a.return=t,t.child=a,At=t,at=null)):e=null,e===null)throw Ma(t);return t.lanes=536870912,null}return rr(t,i)}var c=e.memoizedState;if(c!==null){var y=c.dehydrated;if(ru(t),r)if(t.flags&256)t.flags&=-257,t=Rp(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(xt||Si(e,t,a,!1),r=(a&e.childLanes)!==0,xt||r){if(i=tt,i!==null&&(y=Sh(i,a),y!==0&&y!==c.retryLane))throw c.retryLane=y,vl(e,y),Zt(i,e,y),Au;vr(),t=Rp(e,t,a)}else e=c.treeContext,at=wn(y.nextSibling),At=t,Qe=!0,ja=null,xn=!1,e!==null&&vm(t,e),t=rr(t,i),t.flags|=4096;return t}return e=Fn(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function cr(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Nu(e,t,a,i,r){return Sl(t),a=uu(e,t,a,i,void 0,r),i=du(),e!==null&&!xt?(fu(e,t,r),ta(e,t,r)):(Qe&&i&&Yc(t),t.flags|=1,Tt(e,t,a,r),t.child)}function zp(e,t,a,i,r,c){return Sl(t),t.updateQueue=null,a=Lm(t,i,a,r),Um(e),i=du(),e!==null&&!xt?(fu(e,t,c),ta(e,t,c)):(Qe&&i&&Yc(t),t.flags|=1,Tt(e,t,a,c),t.child)}function Dp(e,t,a,i,r){if(Sl(t),t.stateNode===null){var c=vi,y=a.contextType;typeof y=="object"&&y!==null&&(c=Nt(y)),c=new a(i,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Mu,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=i,c.state=t.memoizedState,c.refs={},nu(t),y=a.contextType,c.context=typeof y=="object"&&y!==null?Nt(y):vi,c.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(ju(t,a,y,i),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(y=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),y!==c.state&&Mu.enqueueReplaceState(c,c.state,null),Ns(t,i,c,r),As(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){c=t.stateNode;var v=t.memoizedProps,A=Al(a,v);c.props=A;var K=c.context,ae=a.contextType;y=vi,typeof ae=="object"&&ae!==null&&(y=Nt(ae));var oe=a.getDerivedStateFromProps;ae=typeof oe=="function"||typeof c.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,ae||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(v||K!==y)&&_p(t,c,i,y),Aa=!1;var X=t.memoizedState;c.state=X,Ns(t,i,c,r),As(),K=t.memoizedState,v||X!==K||Aa?(typeof oe=="function"&&(ju(t,a,oe,i),K=t.memoizedState),(A=Aa||xp(t,a,A,i,X,K,y))?(ae||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=K),c.props=i,c.state=K,c.context=y,i=A):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{c=t.stateNode,au(e,t),y=t.memoizedProps,ae=Al(a,y),c.props=ae,oe=t.pendingProps,X=c.context,K=a.contextType,A=vi,typeof K=="object"&&K!==null&&(A=Nt(K)),v=a.getDerivedStateFromProps,(K=typeof v=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(y!==oe||X!==A)&&_p(t,c,i,A),Aa=!1,X=t.memoizedState,c.state=X,Ns(t,i,c,r),As();var J=t.memoizedState;y!==oe||X!==J||Aa||e!==null&&e.dependencies!==null&&Vo(e.dependencies)?(typeof v=="function"&&(ju(t,a,v,i),J=t.memoizedState),(ae=Aa||xp(t,a,ae,i,X,J,A)||e!==null&&e.dependencies!==null&&Vo(e.dependencies))?(K||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(i,J,A),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(i,J,A)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||y===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=J),c.props=i,c.state=J,c.context=A,i=ae):(typeof c.componentDidUpdate!="function"||y===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),i=!1)}return c=i,cr(e,t),i=(t.flags&128)!==0,c||i?(c=t.stateNode,a=i&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&i?(t.child=Ml(t,e.child,null,r),t.child=Ml(t,null,a,r)):Tt(e,t,a,r),t.memoizedState=c.state,e=t.child):e=ta(e,t,r),e}function Up(e,t,a,i){return _l(),t.flags|=256,Tt(e,t,a,i),t.child}var Tu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ou(e){return{baseLanes:e,cachePool:Em()}}function Ru(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=on),e}function Lp(e,t,a){var i=t.pendingProps,r=!1,c=(t.flags&128)!==0,y;if((y=c)||(y=e!==null&&e.memoizedState===null?!1:(yt.current&2)!==0),y&&(r=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Qe){if(r?Oa(t):Ra(),(e=at)?(e=Yy(e,xn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ea!==null?{id:Rn,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},a=ym(e),a.return=t,t.child=a,At=t,at=null)):e=null,e===null)throw Ma(t);return pd(e)?t.lanes=32:t.lanes=536870912,null}var v=i.children;return i=i.fallback,r?(Ra(),r=t.mode,v=ur({mode:"hidden",children:v},r),i=xl(i,r,a,null),v.return=t,i.return=t,v.sibling=i,t.child=v,i=t.child,i.memoizedState=Ou(a),i.childLanes=Ru(e,y,a),t.memoizedState=Tu,Ds(null,i)):(Oa(t),zu(t,v))}var A=e.memoizedState;if(A!==null&&(v=A.dehydrated,v!==null)){if(c)t.flags&256?(Oa(t),t.flags&=-257,t=Du(e,t,a)):t.memoizedState!==null?(Ra(),t.child=e.child,t.flags|=128,t=null):(Ra(),v=i.fallback,r=t.mode,i=ur({mode:"visible",children:i.children},r),v=xl(v,r,a,null),v.flags|=2,i.return=t,v.return=t,i.sibling=v,t.child=i,Ml(t,e.child,null,a),i=t.child,i.memoizedState=Ou(a),i.childLanes=Ru(e,y,a),t.memoizedState=Tu,t=Ds(null,i));else if(Oa(t),pd(v)){if(y=v.nextSibling&&v.nextSibling.dataset,y)var K=y.dgst;y=K,i=Error(o(419)),i.stack="",i.digest=y,Ss({value:i,source:null,stack:null}),t=Du(e,t,a)}else if(xt||Si(e,t,a,!1),y=(a&e.childLanes)!==0,xt||y){if(y=tt,y!==null&&(i=Sh(y,a),i!==0&&i!==A.retryLane))throw A.retryLane=i,vl(e,i),Zt(y,e,i),Au;md(v)||vr(),t=Du(e,t,a)}else md(v)?(t.flags|=192,t.child=e.child,t=null):(e=A.treeContext,at=wn(v.nextSibling),At=t,Qe=!0,ja=null,xn=!1,e!==null&&vm(t,e),t=zu(t,i.children),t.flags|=4096);return t}return r?(Ra(),v=i.fallback,r=t.mode,A=e.child,K=A.sibling,i=Fn(A,{mode:"hidden",children:i.children}),i.subtreeFlags=A.subtreeFlags&65011712,K!==null?v=Fn(K,v):(v=xl(v,r,a,null),v.flags|=2),v.return=t,i.return=t,i.sibling=v,t.child=i,Ds(null,i),i=t.child,v=e.child.memoizedState,v===null?v=Ou(a):(r=v.cachePool,r!==null?(A=bt._currentValue,r=r.parent!==A?{parent:A,pool:A}:r):r=Em(),v={baseLanes:v.baseLanes|a,cachePool:r}),i.memoizedState=v,i.childLanes=Ru(e,y,a),t.memoizedState=Tu,Ds(e.child,i)):(Oa(t),a=e.child,e=a.sibling,a=Fn(a,{mode:"visible",children:i.children}),a.return=t,a.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=a,t.memoizedState=null,a)}function zu(e,t){return t=ur({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ur(e,t){return e=nn(22,e,null,t),e.lanes=0,e}function Du(e,t,a){return Ml(t,e.child,null,a),e=zu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Bp(e,t,a){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Zc(e.return,t,a)}function Uu(e,t,a,i,r,c){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:r,treeForkCount:c}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=i,y.tail=a,y.tailMode=r,y.treeForkCount=c)}function Hp(e,t,a){var i=t.pendingProps,r=i.revealOrder,c=i.tail;i=i.children;var y=yt.current,v=(y&2)!==0;if(v?(y=y&1|2,t.flags|=128):y&=1,Y(yt,y),Tt(e,t,i,a),i=Qe?ws:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Bp(e,a,t);else if(e.tag===19)Bp(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(a=t.child,r=null;a!==null;)e=a.alternate,e!==null&&Jo(e)===null&&(r=a),a=a.sibling;a=r,a===null?(r=t.child,t.child=null):(r=a.sibling,a.sibling=null),Uu(t,!1,r,a,c,i);break;case"backwards":case"unstable_legacy-backwards":for(a=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Jo(e)===null){t.child=r;break}e=r.sibling,r.sibling=a,a=r,r=e}Uu(t,!0,a,null,c,i);break;case"together":Uu(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function ta(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ua|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Si(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=Fn(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Fn(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Lu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Vo(e)))}function m2(e,t,a){switch(t.tag){case 3:pe(t,t.stateNode.containerInfo),Ca(t,bt,e.memoizedState.cache),_l();break;case 27:case 5:Ee(t);break;case 4:pe(t,t.stateNode.containerInfo);break;case 10:Ca(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ru(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Oa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Lp(e,t,a):(Oa(t),e=ta(e,t,a),e!==null?e.sibling:null);Oa(t);break;case 19:var r=(e.flags&128)!==0;if(i=(a&t.childLanes)!==0,i||(Si(e,t,a,!1),i=(a&t.childLanes)!==0),r){if(i)return Hp(e,t,a);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Y(yt,yt.current),i)break;return null;case 22:return t.lanes=0,Tp(e,t,a,t.pendingProps);case 24:Ca(t,bt,e.memoizedState.cache)}return ta(e,t,a)}function qp(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)xt=!0;else{if(!Lu(e,a)&&(t.flags&128)===0)return xt=!1,m2(e,t,a);xt=(e.flags&131072)!==0}else xt=!1,Qe&&(t.flags&1048576)!==0&&bm(t,ws,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=El(t.elementType),t.type=e,typeof e=="function")Ic(e)?(i=Al(e,i),t.tag=1,t=Dp(null,t,e,i,a)):(t.tag=0,t=Nu(null,t,e,i,a));else{if(e!=null){var r=e.$$typeof;if(r===I){t.tag=11,t=Cp(null,t,e,i,a);break e}else if(r===W){t.tag=14,t=Ap(null,t,e,i,a);break e}}throw t=H(e)||e,Error(o(306,t,""))}}return t;case 0:return Nu(e,t,t.type,t.pendingProps,a);case 1:return i=t.type,r=Al(i,t.pendingProps),Dp(e,t,i,r,a);case 3:e:{if(pe(t,t.stateNode.containerInfo),e===null)throw Error(o(387));i=t.pendingProps;var c=t.memoizedState;r=c.element,au(e,t),Ns(t,i,null,a);var y=t.memoizedState;if(i=y.cache,Ca(t,bt,i),i!==c.cache&&Pc(t,[bt],a,!0),As(),i=y.element,c.isDehydrated)if(c={element:i,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Up(e,t,i,a);break e}else if(i!==r){r=gn(Error(o(424)),t),Ss(r),t=Up(e,t,i,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(at=wn(e.firstChild),At=t,Qe=!0,ja=null,xn=!0,a=Tm(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(_l(),i===r){t=ta(e,t,a);break e}Tt(e,t,i,a)}t=t.child}return t;case 26:return cr(e,t),e===null?(a=Py(t.type,null,t.pendingProps,null))?t.memoizedState=a:Qe||(a=t.type,e=t.pendingProps,i=jr(Q.current).createElement(a),i[Ct]=t,i[Vt]=e,Ot(i,a,e),Et(i),t.stateNode=i):t.memoizedState=Py(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ee(t),e===null&&Qe&&(i=t.stateNode=Xy(t.type,t.pendingProps,Q.current),At=t,xn=!0,r=at,Ga(t.type)?(yd=r,at=wn(i.firstChild)):at=r),Tt(e,t,t.pendingProps.children,a),cr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Qe&&((r=i=at)&&(i=V2(i,t.type,t.pendingProps,xn),i!==null?(t.stateNode=i,At=t,at=wn(i.firstChild),xn=!1,r=!0):r=!1),r||Ma(t)),Ee(t),r=t.type,c=t.pendingProps,y=e!==null?e.memoizedProps:null,i=c.children,dd(r,c)?i=null:y!==null&&dd(r,y)&&(t.flags|=32),t.memoizedState!==null&&(r=uu(e,t,i2,null,null,a),Zs._currentValue=r),cr(e,t),Tt(e,t,i,a),t.child;case 6:return e===null&&Qe&&((e=a=at)&&(a=Y2(a,t.pendingProps,xn),a!==null?(t.stateNode=a,At=t,at=null,e=!0):e=!1),e||Ma(t)),null;case 13:return Lp(e,t,a);case 4:return pe(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ml(t,null,i,a):Tt(e,t,i,a),t.child;case 11:return Cp(e,t,t.type,t.pendingProps,a);case 7:return Tt(e,t,t.pendingProps,a),t.child;case 8:return Tt(e,t,t.pendingProps.children,a),t.child;case 12:return Tt(e,t,t.pendingProps.children,a),t.child;case 10:return i=t.pendingProps,Ca(t,t.type,i.value),Tt(e,t,i.children,a),t.child;case 9:return r=t.type._context,i=t.pendingProps.children,Sl(t),r=Nt(r),i=i(r),t.flags|=1,Tt(e,t,i,a),t.child;case 14:return Ap(e,t,t.type,t.pendingProps,a);case 15:return Np(e,t,t.type,t.pendingProps,a);case 19:return Hp(e,t,a);case 31:return h2(e,t,a);case 22:return Tp(e,t,a,t.pendingProps);case 24:return Sl(t),i=Nt(bt),e===null?(r=eu(),r===null&&(r=tt,c=Jc(),r.pooledCache=c,c.refCount++,c!==null&&(r.pooledCacheLanes|=a),r=c),t.memoizedState={parent:i,cache:r},nu(t),Ca(t,bt,r)):((e.lanes&a)!==0&&(au(e,t),Ns(t,null,null,a),As()),r=e.memoizedState,c=t.memoizedState,r.parent!==i?(r={parent:i,cache:i},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Ca(t,bt,i)):(i=c.cache,Ca(t,bt,i),i!==r.cache&&Pc(t,[bt],a,!0))),Tt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function na(e){e.flags|=4}function Bu(e,t,a,i,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(hy())e.flags|=8192;else throw jl=Xo,tu}else e.flags&=-16777217}function Gp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!ng(t))if(hy())e.flags|=8192;else throw jl=Xo,tu}function dr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?jn():536870912,e.lanes|=t,Di|=t)}function Us(e,t){if(!Qe)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function lt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(t)for(var r=e.child;r!==null;)a|=r.lanes|r.childLanes,i|=r.subtreeFlags&65011712,i|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)a|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=i,e.childLanes=a,t}function p2(e,t,a){var i=t.pendingProps;switch(Kc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(t),null;case 1:return lt(t),null;case 3:return a=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Jn(bt),ge(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(wi(t)?na(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xc())),lt(t),null;case 26:var r=t.type,c=t.memoizedState;return e===null?(na(t),c!==null?(lt(t),Gp(t,c)):(lt(t),Bu(t,r,null,i,a))):c?c!==e.memoizedState?(na(t),lt(t),Gp(t,c)):(lt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&na(t),lt(t),Bu(t,r,e,i,a)),null;case 27:if(Re(t),a=Q.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&na(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return lt(t),null}e=N.current,wi(t)?xm(t):(e=Xy(r,i,a),t.stateNode=e,na(t))}return lt(t),null;case 5:if(Re(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&na(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return lt(t),null}if(c=N.current,wi(t))xm(t);else{var y=jr(Q.current);switch(c){case 1:c=y.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:c=y.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":c=y.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":c=y.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":c=y.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof i.is=="string"?y.createElement("select",{is:i.is}):y.createElement("select"),i.multiple?c.multiple=!0:i.size&&(c.size=i.size);break;default:c=typeof i.is=="string"?y.createElement(r,{is:i.is}):y.createElement(r)}}c[Ct]=t,c[Vt]=i;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)c.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=c;e:switch(Ot(c,r,i),r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&na(t)}}return lt(t),Bu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&na(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(e=Q.current,wi(t)){if(e=t.stateNode,a=t.memoizedProps,i=null,r=At,r!==null)switch(r.tag){case 27:case 5:i=r.memoizedProps}e[Ct]=t,e=!!(e.nodeValue===a||i!==null&&i.suppressHydrationWarning===!0||Ly(e.nodeValue,a)),e||Ma(t,!0)}else e=jr(e).createTextNode(i),e[Ct]=t,t.stateNode=e}return lt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(i=wi(t),a!==null){if(e===null){if(!i)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Ct]=t}else _l(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),e=!1}else a=Xc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(ln(t),t):(ln(t),null);if((t.flags&128)!==0)throw Error(o(558))}return lt(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=wi(t),i!==null&&i.dehydrated!==null){if(e===null){if(!r)throw Error(o(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));r[Ct]=t}else _l(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),r=!1}else r=Xc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(ln(t),t):(ln(t),null)}return ln(t),(t.flags&128)!==0?(t.lanes=a,t):(a=i!==null,e=e!==null&&e.memoizedState!==null,a&&(i=t.child,r=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(r=i.alternate.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==r&&(i.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),dr(t,t.updateQueue),lt(t),null);case 4:return ge(),e===null&&sd(t.stateNode.containerInfo),lt(t),null;case 10:return Jn(t.type),lt(t),null;case 19:if(q(yt),i=t.memoizedState,i===null)return lt(t),null;if(r=(t.flags&128)!==0,c=i.rendering,c===null)if(r)Us(i,!1);else{if(dt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Jo(e),c!==null){for(t.flags|=128,Us(i,!1),e=c.updateQueue,t.updateQueue=e,dr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)pm(a,e),a=a.sibling;return Y(yt,yt.current&1|2),Qe&&Zn(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&rt()>yr&&(t.flags|=128,r=!0,Us(i,!1),t.lanes=4194304)}else{if(!r)if(e=Jo(c),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,dr(t,e),Us(i,!0),i.tail===null&&i.tailMode==="hidden"&&!c.alternate&&!Qe)return lt(t),null}else 2*rt()-i.renderingStartTime>yr&&a!==536870912&&(t.flags|=128,r=!0,Us(i,!1),t.lanes=4194304);i.isBackwards?(c.sibling=t.child,t.child=c):(e=i.last,e!==null?e.sibling=c:t.child=c,i.last=c)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=rt(),e.sibling=null,a=yt.current,Y(yt,r?a&1|2:a&1),Qe&&Zn(t,i.treeForkCount),e):(lt(t),null);case 22:case 23:return ln(t),ou(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(a&536870912)!==0&&(t.flags&128)===0&&(lt(t),t.subtreeFlags&6&&(t.flags|=8192)):lt(t),a=t.updateQueue,a!==null&&dr(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==a&&(t.flags|=2048),e!==null&&q(kl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Jn(bt),lt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function y2(e,t){switch(Kc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jn(bt),ge(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Re(t),null;case 31:if(t.memoizedState!==null){if(ln(t),t.alternate===null)throw Error(o(340));_l()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ln(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));_l()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(yt),null;case 4:return ge(),null;case 10:return Jn(t.type),null;case 22:case 23:return ln(t),ou(),e!==null&&q(kl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Jn(bt),null;case 25:return null;default:return null}}function Ip(e,t){switch(Kc(t),t.tag){case 3:Jn(bt),ge();break;case 26:case 27:case 5:Re(t);break;case 4:ge();break;case 31:t.memoizedState!==null&&ln(t);break;case 13:ln(t);break;case 19:q(yt);break;case 10:Jn(t.type);break;case 22:case 23:ln(t),ou(),e!==null&&q(kl);break;case 24:Jn(bt)}}function Ls(e,t){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var r=i.next;a=r;do{if((a.tag&e)===e){i=void 0;var c=a.create,y=a.inst;i=c(),y.destroy=i}a=a.next}while(a!==r)}}catch(v){Pe(t,t.return,v)}}function za(e,t,a){try{var i=t.updateQueue,r=i!==null?i.lastEffect:null;if(r!==null){var c=r.next;i=c;do{if((i.tag&e)===e){var y=i.inst,v=y.destroy;if(v!==void 0){y.destroy=void 0,r=t;var A=a,K=v;try{K()}catch(ae){Pe(r,A,ae)}}}i=i.next}while(i!==c)}}catch(ae){Pe(t,t.return,ae)}}function Qp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{Rm(t,a)}catch(i){Pe(e,e.return,i)}}}function Vp(e,t,a){a.props=Al(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(i){Pe(e,t,i)}}function Bs(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof a=="function"?e.refCleanup=a(i):a.current=i}}catch(r){Pe(e,t,r)}}function Dn(e,t){var a=e.ref,i=e.refCleanup;if(a!==null)if(typeof i=="function")try{i()}catch(r){Pe(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(r){Pe(e,t,r)}else a.current=null}function Yp(e){var t=e.type,a=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&i.focus();break e;case"img":a.src?i.src=a.src:a.srcSet&&(i.srcset=a.srcSet)}}catch(r){Pe(e,e.return,r)}}function Hu(e,t,a){try{var i=e.stateNode;B2(i,e.type,a,t),i[Vt]=t}catch(r){Pe(e,e.return,r)}}function Kp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ga(e.type)||e.tag===4}function qu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Kp(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.tag===27&&Ga(e.type)||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 Gu(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=$n));else if(i!==4&&(i===27&&Ga(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Gu(e,t,a),e=e.sibling;e!==null;)Gu(e,t,a),e=e.sibling}function fr(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(i!==4&&(i===27&&Ga(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(fr(e,t,a),e=e.sibling;e!==null;)fr(e,t,a),e=e.sibling}function $p(e){var t=e.stateNode,a=e.memoizedProps;try{for(var i=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Ot(t,i,a),t[Ct]=e,t[Vt]=a}catch(c){Pe(e,e.return,c)}}var aa=!1,_t=!1,Iu=!1,Xp=typeof WeakSet=="function"?WeakSet:Set,jt=null;function g2(e,t){if(e=e.containerInfo,cd=Rr,e=sm(e),Dc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var i=a.getSelection&&a.getSelection();if(i&&i.rangeCount!==0){a=i.anchorNode;var r=i.anchorOffset,c=i.focusNode;i=i.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var y=0,v=-1,A=-1,K=0,ae=0,oe=e,X=null;t:for(;;){for(var J;oe!==a||r!==0&&oe.nodeType!==3||(v=y+r),oe!==c||i!==0&&oe.nodeType!==3||(A=y+i),oe.nodeType===3&&(y+=oe.nodeValue.length),(J=oe.firstChild)!==null;)X=oe,oe=J;for(;;){if(oe===e)break t;if(X===a&&++K===r&&(v=y),X===c&&++ae===i&&(A=y),(J=oe.nextSibling)!==null)break;oe=X,X=oe.parentNode}oe=J}a=v===-1||A===-1?null:{start:v,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(ud={focusedElem:e,selectionRange:a},Rr=!1,jt=t;jt!==null;)if(t=jt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,jt=e;else for(;jt!==null;){switch(t=jt,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)r=e[a],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=t,r=c.memoizedProps,c=c.memoizedState,i=a.stateNode;try{var _e=Al(a.type,r);e=i.getSnapshotBeforeUpdate(_e,c),i.__reactInternalSnapshotBeforeUpdate=e}catch(Ce){Pe(a,a.return,Ce)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)hd(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":hd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,jt=e;break}jt=t.return}}function Fp(e,t,a){var i=a.flags;switch(a.tag){case 0:case 11:case 15:ia(e,a),i&4&&Ls(5,a);break;case 1:if(ia(e,a),i&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){Pe(a,a.return,y)}else{var r=Al(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Pe(a,a.return,y)}}i&64&&Qp(a),i&512&&Bs(a,a.return);break;case 3:if(ia(e,a),i&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{Rm(e,t)}catch(y){Pe(a,a.return,y)}}break;case 27:t===null&&i&4&&$p(a);case 26:case 5:ia(e,a),t===null&&i&4&&Yp(a),i&512&&Bs(a,a.return);break;case 12:ia(e,a);break;case 31:ia(e,a),i&4&&Jp(e,a);break;case 13:ia(e,a),i&4&&Wp(e,a),i&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=j2.bind(null,a),K2(e,a))));break;case 22:if(i=a.memoizedState!==null||aa,!i){t=t!==null&&t.memoizedState!==null||_t,r=aa;var c=_t;aa=i,(_t=t)&&!c?sa(e,a,(a.subtreeFlags&8772)!==0):ia(e,a),aa=r,_t=c}break;case 30:break;default:ia(e,a)}}function Zp(e){var t=e.alternate;t!==null&&(e.alternate=null,Zp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bc(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var st=null,Kt=!1;function la(e,t,a){for(a=a.child;a!==null;)Pp(e,t,a),a=a.sibling}function Pp(e,t,a){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount(xa,a)}catch{}switch(a.tag){case 26:_t||Dn(a,t),la(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:_t||Dn(a,t);var i=st,r=Kt;Ga(a.type)&&(st=a.stateNode,Kt=!1),la(e,t,a),$s(a.stateNode),st=i,Kt=r;break;case 5:_t||Dn(a,t);case 6:if(i=st,r=Kt,st=null,la(e,t,a),st=i,Kt=r,st!==null)if(Kt)try{(st.nodeType===9?st.body:st.nodeName==="HTML"?st.ownerDocument.body:st).removeChild(a.stateNode)}catch(c){Pe(a,t,c)}else try{st.removeChild(a.stateNode)}catch(c){Pe(a,t,c)}break;case 18:st!==null&&(Kt?(e=st,Qy(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Qi(e)):Qy(st,a.stateNode));break;case 4:i=st,r=Kt,st=a.stateNode.containerInfo,Kt=!0,la(e,t,a),st=i,Kt=r;break;case 0:case 11:case 14:case 15:za(2,a,t),_t||za(4,a,t),la(e,t,a);break;case 1:_t||(Dn(a,t),i=a.stateNode,typeof i.componentWillUnmount=="function"&&Vp(a,t,i)),la(e,t,a);break;case 21:la(e,t,a);break;case 22:_t=(i=_t)||a.memoizedState!==null,la(e,t,a),_t=i;break;default:la(e,t,a)}}function Jp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Qi(e)}catch(a){Pe(t,t.return,a)}}}function Wp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Qi(e)}catch(a){Pe(t,t.return,a)}}function b2(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Xp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Xp),t;default:throw Error(o(435,e.tag))}}function hr(e,t){var a=b2(e);t.forEach(function(i){if(!a.has(i)){a.add(i);var r=M2.bind(null,e,i);i.then(r,r)}})}function $t(e,t){var a=t.deletions;if(a!==null)for(var i=0;i<a.length;i++){var r=a[i],c=e,y=t,v=y;e:for(;v!==null;){switch(v.tag){case 27:if(Ga(v.type)){st=v.stateNode,Kt=!1;break e}break;case 5:st=v.stateNode,Kt=!1;break e;case 3:case 4:st=v.stateNode.containerInfo,Kt=!0;break e}v=v.return}if(st===null)throw Error(o(160));Pp(c,y,r),st=null,Kt=!1,c=r.alternate,c!==null&&(c.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ey(t,e),t=t.sibling}var Cn=null;function ey(e,t){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:$t(t,e),Xt(e),i&4&&(za(3,e,e.return),Ls(3,e),za(5,e,e.return));break;case 1:$t(t,e),Xt(e),i&512&&(_t||a===null||Dn(a,a.return)),i&64&&aa&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?i:a.concat(i))));break;case 26:var r=Cn;if($t(t,e),Xt(e),i&512&&(_t||a===null||Dn(a,a.return)),i&4){var c=a!==null?a.memoizedState:null;if(i=e.memoizedState,a===null)if(i===null)if(e.stateNode===null){e:{i=e.type,a=e.memoizedProps,r=r.ownerDocument||r;t:switch(i){case"title":c=r.getElementsByTagName("title")[0],(!c||c[ds]||c[Ct]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=r.createElement(i),r.head.insertBefore(c,r.querySelector("head > title"))),Ot(c,i,a),c[Ct]=e,Et(c),i=c;break e;case"link":var y=eg("link","href",r).get(i+(a.href||""));if(y){for(var v=0;v<y.length;v++)if(c=y[v],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(v,1);break t}}c=r.createElement(i),Ot(c,i,a),r.head.appendChild(c);break;case"meta":if(y=eg("meta","content",r).get(i+(a.content||""))){for(v=0;v<y.length;v++)if(c=y[v],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(v,1);break t}}c=r.createElement(i),Ot(c,i,a),r.head.appendChild(c);break;default:throw Error(o(468,i))}c[Ct]=e,Et(c),i=c}e.stateNode=i}else tg(r,e.type,e.stateNode);else e.stateNode=Wy(r,i,e.memoizedProps);else c!==i?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,i===null?tg(r,e.type,e.stateNode):Wy(r,i,e.memoizedProps)):i===null&&e.stateNode!==null&&Hu(e,e.memoizedProps,a.memoizedProps)}break;case 27:$t(t,e),Xt(e),i&512&&(_t||a===null||Dn(a,a.return)),a!==null&&i&4&&Hu(e,e.memoizedProps,a.memoizedProps);break;case 5:if($t(t,e),Xt(e),i&512&&(_t||a===null||Dn(a,a.return)),e.flags&32){r=e.stateNode;try{fi(r,"")}catch(_e){Pe(e,e.return,_e)}}i&4&&e.stateNode!=null&&(r=e.memoizedProps,Hu(e,r,a!==null?a.memoizedProps:r)),i&1024&&(Iu=!0);break;case 6:if($t(t,e),Xt(e),i&4){if(e.stateNode===null)throw Error(o(162));i=e.memoizedProps,a=e.stateNode;try{a.nodeValue=i}catch(_e){Pe(e,e.return,_e)}}break;case 3:if(Ar=null,r=Cn,Cn=Mr(t.containerInfo),$t(t,e),Cn=r,Xt(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{Qi(t.containerInfo)}catch(_e){Pe(e,e.return,_e)}Iu&&(Iu=!1,ty(e));break;case 4:i=Cn,Cn=Mr(e.stateNode.containerInfo),$t(t,e),Xt(e),Cn=i;break;case 12:$t(t,e),Xt(e);break;case 31:$t(t,e),Xt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,hr(e,i)));break;case 13:$t(t,e),Xt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(pr=rt()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,hr(e,i)));break;case 22:r=e.memoizedState!==null;var A=a!==null&&a.memoizedState!==null,K=aa,ae=_t;if(aa=K||r,_t=ae||A,$t(t,e),_t=ae,aa=K,Xt(e),i&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(a===null||A||aa||_t||Nl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){A=a=t;try{if(c=A.stateNode,r)y=c.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{v=A.stateNode;var oe=A.memoizedProps.style,X=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;v.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(_e){Pe(A,A.return,_e)}}}else if(t.tag===6){if(a===null){A=t;try{A.stateNode.nodeValue=r?"":A.memoizedProps}catch(_e){Pe(A,A.return,_e)}}}else if(t.tag===18){if(a===null){A=t;try{var J=A.stateNode;r?Vy(J,!0):Vy(A.stateNode,!1)}catch(_e){Pe(A,A.return,_e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(a=i.retryQueue,a!==null&&(i.retryQueue=null,hr(e,a))));break;case 19:$t(t,e),Xt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,hr(e,i)));break;case 30:break;case 21:break;default:$t(t,e),Xt(e)}}function Xt(e){var t=e.flags;if(t&2){try{for(var a,i=e.return;i!==null;){if(Kp(i)){a=i;break}i=i.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var r=a.stateNode,c=qu(e);fr(e,c,r);break;case 5:var y=a.stateNode;a.flags&32&&(fi(y,""),a.flags&=-33);var v=qu(e);fr(e,v,y);break;case 3:case 4:var A=a.stateNode.containerInfo,K=qu(e);Gu(e,K,A);break;default:throw Error(o(161))}}catch(ae){Pe(e,e.return,ae)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ty(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ty(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ia(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Fp(e,t.alternate,t),t=t.sibling}function Nl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:za(4,t,t.return),Nl(t);break;case 1:Dn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Vp(t,t.return,a),Nl(t);break;case 27:$s(t.stateNode);case 26:case 5:Dn(t,t.return),Nl(t);break;case 22:t.memoizedState===null&&Nl(t);break;case 30:Nl(t);break;default:Nl(t)}e=e.sibling}}function sa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,r=e,c=t,y=c.flags;switch(c.tag){case 0:case 11:case 15:sa(r,c,a),Ls(4,c);break;case 1:if(sa(r,c,a),i=c,r=i.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(K){Pe(i,i.return,K)}if(i=c,r=i.updateQueue,r!==null){var v=i.stateNode;try{var A=r.shared.hiddenCallbacks;if(A!==null)for(r.shared.hiddenCallbacks=null,r=0;r<A.length;r++)Om(A[r],v)}catch(K){Pe(i,i.return,K)}}a&&y&64&&Qp(c),Bs(c,c.return);break;case 27:$p(c);case 26:case 5:sa(r,c,a),a&&i===null&&y&4&&Yp(c),Bs(c,c.return);break;case 12:sa(r,c,a);break;case 31:sa(r,c,a),a&&y&4&&Jp(r,c);break;case 13:sa(r,c,a),a&&y&4&&Wp(r,c);break;case 22:c.memoizedState===null&&sa(r,c,a),Bs(c,c.return);break;case 30:break;default:sa(r,c,a)}t=t.sibling}}function Qu(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&ks(a))}function Vu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ks(e))}function An(e,t,a,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ny(e,t,a,i),t=t.sibling}function ny(e,t,a,i){var r=t.flags;switch(t.tag){case 0:case 11:case 15:An(e,t,a,i),r&2048&&Ls(9,t);break;case 1:An(e,t,a,i);break;case 3:An(e,t,a,i),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ks(e)));break;case 12:if(r&2048){An(e,t,a,i),e=t.stateNode;try{var c=t.memoizedProps,y=c.id,v=c.onPostCommit;typeof v=="function"&&v(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(A){Pe(t,t.return,A)}}else An(e,t,a,i);break;case 31:An(e,t,a,i);break;case 13:An(e,t,a,i);break;case 23:break;case 22:c=t.stateNode,y=t.alternate,t.memoizedState!==null?c._visibility&2?An(e,t,a,i):Hs(e,t):c._visibility&2?An(e,t,a,i):(c._visibility|=2,Oi(e,t,a,i,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Qu(y,t);break;case 24:An(e,t,a,i),r&2048&&Vu(t.alternate,t);break;default:An(e,t,a,i)}}function Oi(e,t,a,i,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,y=t,v=a,A=i,K=y.flags;switch(y.tag){case 0:case 11:case 15:Oi(c,y,v,A,r),Ls(8,y);break;case 23:break;case 22:var ae=y.stateNode;y.memoizedState!==null?ae._visibility&2?Oi(c,y,v,A,r):Hs(c,y):(ae._visibility|=2,Oi(c,y,v,A,r)),r&&K&2048&&Qu(y.alternate,y);break;case 24:Oi(c,y,v,A,r),r&&K&2048&&Vu(y.alternate,y);break;default:Oi(c,y,v,A,r)}t=t.sibling}}function Hs(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,i=t,r=i.flags;switch(i.tag){case 22:Hs(a,i),r&2048&&Qu(i.alternate,i);break;case 24:Hs(a,i),r&2048&&Vu(i.alternate,i);break;default:Hs(a,i)}t=t.sibling}}var qs=8192;function Ri(e,t,a){if(e.subtreeFlags&qs)for(e=e.child;e!==null;)ay(e,t,a),e=e.sibling}function ay(e,t,a){switch(e.tag){case 26:Ri(e,t,a),e.flags&qs&&e.memoizedState!==null&&l_(a,Cn,e.memoizedState,e.memoizedProps);break;case 5:Ri(e,t,a);break;case 3:case 4:var i=Cn;Cn=Mr(e.stateNode.containerInfo),Ri(e,t,a),Cn=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=qs,qs=16777216,Ri(e,t,a),qs=i):Ri(e,t,a));break;default:Ri(e,t,a)}}function ly(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Gs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];jt=i,sy(i,e)}ly(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)iy(e),e=e.sibling}function iy(e){switch(e.tag){case 0:case 11:case 15:Gs(e),e.flags&2048&&za(9,e,e.return);break;case 3:Gs(e);break;case 12:Gs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,mr(e)):Gs(e);break;default:Gs(e)}}function mr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];jt=i,sy(i,e)}ly(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:za(8,t,t.return),mr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,mr(t));break;default:mr(t)}e=e.sibling}}function sy(e,t){for(;jt!==null;){var a=jt;switch(a.tag){case 0:case 11:case 15:za(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var i=a.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:ks(a.memoizedState.cache)}if(i=a.child,i!==null)i.return=a,jt=i;else e:for(a=e;jt!==null;){i=jt;var r=i.sibling,c=i.return;if(Zp(i),i===a){jt=null;break e}if(r!==null){r.return=c,jt=r;break e}jt=c}}}var v2={getCacheForType:function(e){var t=Nt(bt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Nt(bt).controller.signal}},x2=typeof WeakMap=="function"?WeakMap:Map,Xe=0,tt=null,He=null,Ge=0,Ze=0,sn=null,Da=!1,zi=!1,Yu=!1,oa=0,dt=0,Ua=0,Tl=0,Ku=0,on=0,Di=0,Is=null,Ft=null,$u=!1,pr=0,oy=0,yr=1/0,gr=null,La=null,wt=0,Ba=null,Ui=null,ra=0,Xu=0,Fu=null,ry=null,Qs=0,Zu=null;function rn(){return(Xe&2)!==0&&Ge!==0?Ge&-Ge:w.T!==null?nd():kh()}function cy(){if(on===0)if((Ge&536870912)===0||Qe){var e=mt;mt<<=1,(mt&3932160)===0&&(mt=262144),on=e}else on=536870912;return e=an.current,e!==null&&(e.flags|=32),on}function Zt(e,t,a){(e===tt&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)&&(Li(e,0),Ha(e,Ge,on,!1)),_a(e,a),((Xe&2)===0||e!==tt)&&(e===tt&&((Xe&2)===0&&(Tl|=a),dt===4&&Ha(e,Ge,on,!1)),Un(e))}function uy(e,t,a){if((Xe&6)!==0)throw Error(o(327));var i=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Ut(e,t),r=i?S2(e,t):Ju(e,t,!0),c=i;do{if(r===0){zi&&!i&&Ha(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!_2(a)){r=Ju(e,t,!1),c=!1;continue}if(r===2){if(c=t,e.errorRecoveryDisabledLanes&c)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var v=e;r=Is;var A=v.current.memoizedState.isDehydrated;if(A&&(Li(v,y).flags|=256),y=Ju(v,y,!1),y!==2){if(Yu&&!A){v.errorRecoveryDisabledLanes|=c,Tl|=c,r=4;break e}c=Ft,Ft=r,c!==null&&(Ft===null?Ft=c:Ft.push.apply(Ft,c))}r=y}if(c=!1,r!==2)continue}}if(r===1){Li(e,0),Ha(e,t,0,!0);break}e:{switch(i=e,c=r,c){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Ha(i,t,on,!Da);break e;case 2:Ft=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(r=pr+300-rt(),10<r)){if(Ha(i,t,on,!Da),Dt(i,0,!0)!==0)break e;ra=t,i.timeoutHandle=Gy(dy.bind(null,i,a,Ft,gr,$u,t,on,Tl,Di,Da,c,"Throttled",-0,0),r);break e}dy(i,a,Ft,gr,$u,t,on,Tl,Di,Da,c,null,-0,0)}}break}while(!0);Un(e)}function dy(e,t,a,i,r,c,y,v,A,K,ae,oe,X,J){if(e.timeoutHandle=-1,oe=t.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$n},ay(t,c,oe);var _e=(c&62914560)===c?pr-rt():(c&4194048)===c?oy-rt():0;if(_e=i_(oe,_e),_e!==null){ra=c,e.cancelPendingCommit=_e(vy.bind(null,e,t,c,a,i,r,y,v,A,ae,oe,null,X,J)),Ha(e,c,y,!K);return}}vy(e,t,c,a,i,r,y,v,A)}function _2(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var i=0;i<a.length;i++){var r=a[i],c=r.getSnapshot;r=r.value;try{if(!tn(c(),r))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ha(e,t,a,i){t&=~Ku,t&=~Tl,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var r=t;0<r;){var c=31-he(r),y=1<<c;i[c]=-1,r&=~y}a!==0&&Mo(e,a,t)}function br(){return(Xe&6)===0?(Vs(0),!1):!0}function Pu(){if(He!==null){if(Ze===0)var e=He.return;else e=He,Pn=wl=null,hu(e),Mi=null,js=0,e=He;for(;e!==null;)Ip(e.alternate,e),e=e.return;He=null}}function Li(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,G2(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ra=0,Pu(),tt=e,He=a=Fn(e.current,null),Ge=t,Ze=0,sn=null,Da=!1,zi=Ut(e,t),Yu=!1,Di=on=Ku=Tl=Ua=dt=0,Ft=Is=null,$u=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var r=31-he(i),c=1<<r;t|=e[r],i&=~c}return oa=t,Ho(),a}function fy(e,t){Oe=null,w.H=zs,t===ji||t===$o?(t=Cm(),Ze=3):t===tu?(t=Cm(),Ze=4):Ze=t===Au?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,sn=t,He===null&&(dt=1,or(e,gn(t,e.current)))}function hy(){var e=an.current;return e===null?!0:(Ge&4194048)===Ge?_n===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?e===_n:!1}function my(){var e=w.H;return w.H=zs,e===null?zs:e}function py(){var e=w.A;return w.A=v2,e}function vr(){dt=4,Da||(Ge&4194048)!==Ge&&an.current!==null||(zi=!0),(Ua&134217727)===0&&(Tl&134217727)===0||tt===null||Ha(tt,Ge,on,!1)}function Ju(e,t,a){var i=Xe;Xe|=2;var r=my(),c=py();(tt!==e||Ge!==t)&&(gr=null,Li(e,t)),t=!1;var y=dt;e:do try{if(Ze!==0&&He!==null){var v=He,A=sn;switch(Ze){case 8:Pu(),y=6;break e;case 3:case 2:case 9:case 6:an.current===null&&(t=!0);var K=Ze;if(Ze=0,sn=null,Bi(e,v,A,K),a&&zi){y=0;break e}break;default:K=Ze,Ze=0,sn=null,Bi(e,v,A,K)}}w2(),y=dt;break}catch(ae){fy(e,ae)}while(!0);return t&&e.shellSuspendCounter++,Pn=wl=null,Xe=i,w.H=r,w.A=c,He===null&&(tt=null,Ge=0,Ho()),y}function w2(){for(;He!==null;)yy(He)}function S2(e,t){var a=Xe;Xe|=2;var i=my(),r=py();tt!==e||Ge!==t?(gr=null,yr=rt()+500,Li(e,t)):zi=Ut(e,t);e:do try{if(Ze!==0&&He!==null){t=He;var c=sn;t:switch(Ze){case 1:Ze=0,sn=null,Bi(e,t,c,1);break;case 2:case 9:if(jm(c)){Ze=0,sn=null,gy(t);break}t=function(){Ze!==2&&Ze!==9||tt!==e||(Ze=7),Un(e)},c.then(t,t);break e;case 3:Ze=7;break e;case 4:Ze=5;break e;case 7:jm(c)?(Ze=0,sn=null,gy(t)):(Ze=0,sn=null,Bi(e,t,c,7));break;case 5:var y=null;switch(He.tag){case 26:y=He.memoizedState;case 5:case 27:var v=He;if(y?ng(y):v.stateNode.complete){Ze=0,sn=null;var A=v.sibling;if(A!==null)He=A;else{var K=v.return;K!==null?(He=K,xr(K)):He=null}break t}}Ze=0,sn=null,Bi(e,t,c,5);break;case 6:Ze=0,sn=null,Bi(e,t,c,6);break;case 8:Pu(),dt=6;break e;default:throw Error(o(462))}}k2();break}catch(ae){fy(e,ae)}while(!0);return Pn=wl=null,w.H=i,w.A=r,Xe=a,He!==null?0:(tt=null,Ge=0,Ho(),dt)}function k2(){for(;He!==null&&!dl();)yy(He)}function yy(e){var t=qp(e.alternate,e,oa);e.memoizedProps=e.pendingProps,t===null?xr(e):He=t}function gy(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=zp(a,t,t.pendingProps,t.type,void 0,Ge);break;case 11:t=zp(a,t,t.pendingProps,t.type.render,t.ref,Ge);break;case 5:hu(t);default:Ip(a,t),t=He=pm(t,oa),t=qp(a,t,oa)}e.memoizedProps=e.pendingProps,t===null?xr(e):He=t}function Bi(e,t,a,i){Pn=wl=null,hu(t),Mi=null,js=0;var r=t.return;try{if(f2(e,r,t,a,Ge)){dt=1,or(e,gn(a,e.current)),He=null;return}}catch(c){if(r!==null)throw He=r,c;dt=1,or(e,gn(a,e.current)),He=null;return}t.flags&32768?(Qe||i===1?e=!0:zi||(Ge&536870912)!==0?e=!1:(Da=e=!0,(i===2||i===9||i===3||i===6)&&(i=an.current,i!==null&&i.tag===13&&(i.flags|=16384))),by(t,e)):xr(t)}function xr(e){var t=e;do{if((t.flags&32768)!==0){by(t,Da);return}e=t.return;var a=p2(t.alternate,t,oa);if(a!==null){He=a;return}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);dt===0&&(dt=5)}function by(e,t){do{var a=y2(e.alternate,e);if(a!==null){a.flags&=32767,He=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){He=e;return}He=e=a}while(e!==null);dt=6,He=null}function vy(e,t,a,i,r,c,y,v,A){e.cancelPendingCommit=null;do _r();while(wt!==0);if((Xe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(c=t.lanes|t.childLanes,c|=qc,wa(e,a,c,y,v,A),e===tt&&(He=tt=null,Ge=0),Ui=t,Ba=e,ra=a,Xu=c,Fu=r,ry=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,C2(fl,function(){return ky(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=w.T,w.T=null,r=F.p,F.p=2,y=Xe,Xe|=4;try{g2(e,t,a)}finally{Xe=y,F.p=r,w.T=i}}wt=1,xy(),_y(),wy()}}function xy(){if(wt===1){wt=0;var e=Ba,t=Ui,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=w.T,w.T=null;var i=F.p;F.p=2;var r=Xe;Xe|=4;try{ey(t,e);var c=ud,y=sm(e.containerInfo),v=c.focusedElem,A=c.selectionRange;if(y!==v&&v&&v.ownerDocument&&im(v.ownerDocument.documentElement,v)){if(A!==null&&Dc(v)){var K=A.start,ae=A.end;if(ae===void 0&&(ae=K),"selectionStart"in v)v.selectionStart=K,v.selectionEnd=Math.min(ae,v.value.length);else{var oe=v.ownerDocument||document,X=oe&&oe.defaultView||window;if(X.getSelection){var J=X.getSelection(),_e=v.textContent.length,Ce=Math.min(A.start,_e),et=A.end===void 0?Ce:Math.min(A.end,_e);!J.extend&&Ce>et&&(y=et,et=Ce,Ce=y);var B=lm(v,Ce),O=lm(v,et);if(B&&O&&(J.rangeCount!==1||J.anchorNode!==B.node||J.anchorOffset!==B.offset||J.focusNode!==O.node||J.focusOffset!==O.offset)){var V=oe.createRange();V.setStart(B.node,B.offset),J.removeAllRanges(),Ce>et?(J.addRange(V),J.extend(O.node,O.offset)):(V.setEnd(O.node,O.offset),J.addRange(V))}}}}for(oe=[],J=v;J=J.parentNode;)J.nodeType===1&&oe.push({element:J,left:J.scrollLeft,top:J.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<oe.length;v++){var se=oe[v];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}Rr=!!cd,ud=cd=null}finally{Xe=r,F.p=i,w.T=a}}e.current=t,wt=2}}function _y(){if(wt===2){wt=0;var e=Ba,t=Ui,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=w.T,w.T=null;var i=F.p;F.p=2;var r=Xe;Xe|=4;try{Fp(e,t.alternate,t)}finally{Xe=r,F.p=i,w.T=a}}wt=3}}function wy(){if(wt===4||wt===3){wt=0,On();var e=Ba,t=Ui,a=ra,i=ry;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?wt=5:(wt=0,Ui=Ba=null,Sy(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(La=null),yc(a),t=t.stateNode,zt&&typeof zt.onCommitFiberRoot=="function")try{zt.onCommitFiberRoot(xa,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=w.T,r=F.p,F.p=2,w.T=null;try{for(var c=e.onRecoverableError,y=0;y<i.length;y++){var v=i[y];c(v.value,{componentStack:v.stack})}}finally{w.T=t,F.p=r}}(ra&3)!==0&&_r(),Un(e),r=e.pendingLanes,(a&261930)!==0&&(r&42)!==0?e===Zu?Qs++:(Qs=0,Zu=e):Qs=0,Vs(0)}}function Sy(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ks(t)))}function _r(){return xy(),_y(),wy(),ky()}function ky(){if(wt!==5)return!1;var e=Ba,t=Xu;Xu=0;var a=yc(ra),i=w.T,r=F.p;try{F.p=32>a?32:a,w.T=null,a=Fu,Fu=null;var c=Ba,y=ra;if(wt=0,Ui=Ba=null,ra=0,(Xe&6)!==0)throw Error(o(331));var v=Xe;if(Xe|=4,iy(c.current),ny(c,c.current,y,a),Xe=v,Vs(0,!1),zt&&typeof zt.onPostCommitFiberRoot=="function")try{zt.onPostCommitFiberRoot(xa,c)}catch{}return!0}finally{F.p=r,w.T=i,Sy(e,t)}}function Ey(e,t,a){t=gn(a,t),t=Cu(e.stateNode,t,2),e=Ta(e,t,2),e!==null&&(_a(e,2),Un(e))}function Pe(e,t,a){if(e.tag===3)Ey(e,e,a);else for(;t!==null;){if(t.tag===3){Ey(t,e,a);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(La===null||!La.has(i))){e=gn(a,e),a=jp(2),i=Ta(t,a,2),i!==null&&(Mp(a,i,t,e),_a(i,2),Un(i));break}}t=t.return}}function Wu(e,t,a){var i=e.pingCache;if(i===null){i=e.pingCache=new x2;var r=new Set;i.set(t,r)}else r=i.get(t),r===void 0&&(r=new Set,i.set(t,r));r.has(a)||(Yu=!0,r.add(a),e=E2.bind(null,e,t,a),t.then(e,e))}function E2(e,t,a){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,tt===e&&(Ge&a)===a&&(dt===4||dt===3&&(Ge&62914560)===Ge&&300>rt()-pr?(Xe&2)===0&&Li(e,0):Ku|=a,Di===Ge&&(Di=0)),Un(e)}function jy(e,t){t===0&&(t=jn()),e=vl(e,t),e!==null&&(_a(e,t),Un(e))}function j2(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),jy(e,a)}function M2(e,t){var a=0;switch(e.tag){case 31:case 13:var i=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(o(314))}i!==null&&i.delete(t),jy(e,a)}function C2(e,t){return ni(e,t)}var wr=null,Hi=null,ed=!1,Sr=!1,td=!1,qa=0;function Un(e){e!==Hi&&e.next===null&&(Hi===null?wr=Hi=e:Hi=Hi.next=e),Sr=!0,ed||(ed=!0,N2())}function Vs(e,t){if(!td&&Sr){td=!0;do for(var a=!1,i=wr;i!==null;){if(e!==0){var r=i.pendingLanes;if(r===0)var c=0;else{var y=i.suspendedLanes,v=i.pingedLanes;c=(1<<31-he(42|e)+1)-1,c&=r&~(y&~v),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,Ny(i,c))}else c=Ge,c=Dt(i,i===tt?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(c&3)===0||Ut(i,c)||(a=!0,Ny(i,c));i=i.next}while(a);td=!1}}function A2(){My()}function My(){Sr=ed=!1;var e=0;qa!==0&&q2()&&(e=qa);for(var t=rt(),a=null,i=wr;i!==null;){var r=i.next,c=Cy(i,t);c===0?(i.next=null,a===null?wr=r:a.next=r,r===null&&(Hi=a)):(a=i,(e!==0||(c&3)!==0)&&(Sr=!0)),i=r}wt!==0&&wt!==5||Vs(e),qa!==0&&(qa=0)}function Cy(e,t){for(var a=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var y=31-he(c),v=1<<y,A=r[y];A===-1?((v&a)===0||(v&i)!==0)&&(r[y]=Lt(v,t)):A<=t&&(e.expiredLanes|=v),c&=~v}if(t=tt,a=Ge,a=Dt(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,a===0||e===t&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&ai(i),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Ut(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(i!==null&&ai(i),yc(a)){case 2:case 8:a=li;break;case 32:a=fl;break;case 268435456:a=it;break;default:a=fl}return i=Ay.bind(null,e),a=ni(a,i),e.callbackPriority=t,e.callbackNode=a,t}return i!==null&&i!==null&&ai(i),e.callbackPriority=2,e.callbackNode=null,2}function Ay(e,t){if(wt!==0&&wt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(_r()&&e.callbackNode!==a)return null;var i=Ge;return i=Dt(e,e===tt?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(uy(e,i,t),Cy(e,rt()),e.callbackNode!=null&&e.callbackNode===a?Ay.bind(null,e):null)}function Ny(e,t){if(_r())return null;uy(e,t,!0)}function N2(){I2(function(){(Xe&6)!==0?ni(us,A2):My()})}function nd(){if(qa===0){var e=ki;e===0&&(e=Ne,Ne<<=1,(Ne&261888)===0&&(Ne=256)),qa=e}return qa}function Ty(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:To(""+e)}function Oy(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function T2(e,t,a,i,r){if(t==="submit"&&a&&a.stateNode===r){var c=Ty((r[Vt]||null).action),y=i.submitter;y&&(t=(t=y[Vt]||null)?Ty(t.formAction):y.getAttribute("formAction"),t!==null&&(c=t,y=null));var v=new Do("action","action",null,i,r);e.push({event:v,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(qa!==0){var A=y?Oy(r,y):new FormData(r);wu(a,{pending:!0,data:A,method:r.method,action:c},null,A)}}else typeof c=="function"&&(v.preventDefault(),A=y?Oy(r,y):new FormData(r),wu(a,{pending:!0,data:A,method:r.method,action:c},c,A))},currentTarget:r}]})}}for(var ad=0;ad<Hc.length;ad++){var ld=Hc[ad],O2=ld.toLowerCase(),R2=ld[0].toUpperCase()+ld.slice(1);Mn(O2,"on"+R2)}Mn(cm,"onAnimationEnd"),Mn(um,"onAnimationIteration"),Mn(dm,"onAnimationStart"),Mn("dblclick","onDoubleClick"),Mn("focusin","onFocus"),Mn("focusout","onBlur"),Mn(Fx,"onTransitionRun"),Mn(Zx,"onTransitionStart"),Mn(Px,"onTransitionCancel"),Mn(fm,"onTransitionEnd"),ui("onMouseEnter",["mouseout","mouseover"]),ui("onMouseLeave",["mouseout","mouseover"]),ui("onPointerEnter",["pointerout","pointerover"]),ui("onPointerLeave",["pointerout","pointerover"]),pl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),pl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),pl("onBeforeInput",["compositionend","keypress","textInput","paste"]),pl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),pl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),pl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ys="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(" "),z2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ys));function Ry(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var i=e[a],r=i.event;i=i.listeners;e:{var c=void 0;if(t)for(var y=i.length-1;0<=y;y--){var v=i[y],A=v.instance,K=v.currentTarget;if(v=v.listener,A!==c&&r.isPropagationStopped())break e;c=v,r.currentTarget=K;try{c(r)}catch(ae){Bo(ae)}r.currentTarget=null,c=A}else for(y=0;y<i.length;y++){if(v=i[y],A=v.instance,K=v.currentTarget,v=v.listener,A!==c&&r.isPropagationStopped())break e;c=v,r.currentTarget=K;try{c(r)}catch(ae){Bo(ae)}r.currentTarget=null,c=A}}}}function qe(e,t){var a=t[gc];a===void 0&&(a=t[gc]=new Set);var i=e+"__bubble";a.has(i)||(zy(t,e,2,!1),a.add(i))}function id(e,t,a){var i=0;t&&(i|=4),zy(a,e,i,t)}var kr="_reactListening"+Math.random().toString(36).slice(2);function sd(e){if(!e[kr]){e[kr]=!0,Mh.forEach(function(a){a!=="selectionchange"&&(z2.has(a)||id(a,!1,e),id(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[kr]||(t[kr]=!0,id("selectionchange",!1,t))}}function zy(e,t,a,i){switch(cg(t)){case 2:var r=r_;break;case 8:r=c_;break;default:r=_d}a=r.bind(null,t,a,e),r=void 0,!jc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),i?r!==void 0?e.addEventListener(t,a,{capture:!0,passive:r}):e.addEventListener(t,a,!0):r!==void 0?e.addEventListener(t,a,{passive:r}):e.addEventListener(t,a,!1)}function od(e,t,a,i,r){var c=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var y=i.tag;if(y===3||y===4){var v=i.stateNode.containerInfo;if(v===r)break;if(y===4)for(y=i.return;y!==null;){var A=y.tag;if((A===3||A===4)&&y.stateNode.containerInfo===r)return;y=y.return}for(;v!==null;){if(y=oi(v),y===null)return;if(A=y.tag,A===5||A===6||A===26||A===27){i=c=y;continue e}v=v.parentNode}}i=i.return}Hh(function(){var K=c,ae=kc(a),oe=[];e:{var X=hm.get(e);if(X!==void 0){var J=Do,_e=e;switch(e){case"keypress":if(Ro(a)===0)break e;case"keydown":case"keyup":J=Mx;break;case"focusin":_e="focus",J=Nc;break;case"focusout":_e="blur",J=Nc;break;case"beforeblur":case"afterblur":J=Nc;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":J=Ih;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=px;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=Nx;break;case cm:case um:case dm:J=bx;break;case fm:J=Ox;break;case"scroll":case"scrollend":J=hx;break;case"wheel":J=zx;break;case"copy":case"cut":case"paste":J=xx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":J=Vh;break;case"toggle":case"beforetoggle":J=Ux}var Ce=(t&4)!==0,et=!Ce&&(e==="scroll"||e==="scrollend"),B=Ce?X!==null?X+"Capture":null:X;Ce=[];for(var O=K,V;O!==null;){var se=O;if(V=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||V===null||B===null||(se=hs(O,B),se!=null&&Ce.push(Ks(O,se,V))),et)break;O=O.return}0<Ce.length&&(X=new J(X,_e,null,a,ae),oe.push({event:X,listeners:Ce}))}}if((t&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",J=e==="mouseout"||e==="pointerout",X&&a!==Sc&&(_e=a.relatedTarget||a.fromElement)&&(oi(_e)||_e[si]))break e;if((J||X)&&(X=ae.window===ae?ae:(X=ae.ownerDocument)?X.defaultView||X.parentWindow:window,J?(_e=a.relatedTarget||a.toElement,J=K,_e=_e?oi(_e):null,_e!==null&&(et=d(_e),Ce=_e.tag,_e!==et||Ce!==5&&Ce!==27&&Ce!==6)&&(_e=null)):(J=null,_e=K),J!==_e)){if(Ce=Ih,se="onMouseLeave",B="onMouseEnter",O="mouse",(e==="pointerout"||e==="pointerover")&&(Ce=Vh,se="onPointerLeave",B="onPointerEnter",O="pointer"),et=J==null?X:fs(J),V=_e==null?X:fs(_e),X=new Ce(se,O+"leave",J,a,ae),X.target=et,X.relatedTarget=V,se=null,oi(ae)===K&&(Ce=new Ce(B,O+"enter",_e,a,ae),Ce.target=V,Ce.relatedTarget=et,se=Ce),et=se,J&&_e)t:{for(Ce=D2,B=J,O=_e,V=0,se=B;se;se=Ce(se))V++;se=0;for(var ke=O;ke;ke=Ce(ke))se++;for(;0<V-se;)B=Ce(B),V--;for(;0<se-V;)O=Ce(O),se--;for(;V--;){if(B===O||O!==null&&B===O.alternate){Ce=B;break t}B=Ce(B),O=Ce(O)}Ce=null}else Ce=null;J!==null&&Dy(oe,X,J,Ce,!1),_e!==null&&et!==null&&Dy(oe,et,_e,Ce,!0)}}e:{if(X=K?fs(K):window,J=X.nodeName&&X.nodeName.toLowerCase(),J==="select"||J==="input"&&X.type==="file")var Ke=Jh;else if(Zh(X))if(Wh)Ke=Kx;else{Ke=Vx;var we=Qx}else J=X.nodeName,!J||J.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?K&&wc(K.elementType)&&(Ke=Jh):Ke=Yx;if(Ke&&(Ke=Ke(e,K))){Ph(oe,Ke,a,ae);break e}we&&we(e,X,K),e==="focusout"&&K&&X.type==="number"&&K.memoizedProps.value!=null&&_c(X,"number",X.value)}switch(we=K?fs(K):window,e){case"focusin":(Zh(we)||we.contentEditable==="true")&&(yi=we,Uc=K,_s=null);break;case"focusout":_s=Uc=yi=null;break;case"mousedown":Lc=!0;break;case"contextmenu":case"mouseup":case"dragend":Lc=!1,om(oe,a,ae);break;case"selectionchange":if(Xx)break;case"keydown":case"keyup":om(oe,a,ae)}var ze;if(Oc)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 pi?Xh(e,a)&&(Ie="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ie="onCompositionStart");Ie&&(Yh&&a.locale!=="ko"&&(pi||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&pi&&(ze=qh()):(ka=ae,Mc="value"in ka?ka.value:ka.textContent,pi=!0)),we=Er(K,Ie),0<we.length&&(Ie=new Qh(Ie,e,null,a,ae),oe.push({event:Ie,listeners:we}),ze?Ie.data=ze:(ze=Fh(a),ze!==null&&(Ie.data=ze)))),(ze=Bx?Hx(e,a):qx(e,a))&&(Ie=Er(K,"onBeforeInput"),0<Ie.length&&(we=new Qh("onBeforeInput","beforeinput",null,a,ae),oe.push({event:we,listeners:Ie}),we.data=ze)),T2(oe,e,K,a,ae)}Ry(oe,t)})}function Ks(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Er(e,t){for(var a=t+"Capture",i=[];e!==null;){var r=e,c=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||c===null||(r=hs(e,a),r!=null&&i.unshift(Ks(e,r,c)),r=hs(e,t),r!=null&&i.push(Ks(e,r,c))),e.tag===3)return i;e=e.return}return[]}function D2(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dy(e,t,a,i,r){for(var c=t._reactName,y=[];a!==null&&a!==i;){var v=a,A=v.alternate,K=v.stateNode;if(v=v.tag,A!==null&&A===i)break;v!==5&&v!==26&&v!==27||K===null||(A=K,r?(K=hs(a,c),K!=null&&y.unshift(Ks(a,K,A))):r||(K=hs(a,c),K!=null&&y.push(Ks(a,K,A)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var U2=/\r\n?/g,L2=/\u0000|\uFFFD/g;function Uy(e){return(typeof e=="string"?e:""+e).replace(U2,`
|
|
49
|
-
`).replace(L2,"")}function Ly(e,t){return t=Uy(t),Uy(e)===t}function We(e,t,a,i,r,c){switch(a){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||fi(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&fi(e,""+i);break;case"className":Ao(e,"class",i);break;case"tabIndex":Ao(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":Ao(e,a,i);break;case"style":Lh(e,i,c);break;case"data":if(t!=="object"){Ao(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=To(""+i),e.setAttribute(a,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(a==="formAction"?(t!=="input"&&We(e,t,"name",r.name,r,null),We(e,t,"formEncType",r.formEncType,r,null),We(e,t,"formMethod",r.formMethod,r,null),We(e,t,"formTarget",r.formTarget,r,null)):(We(e,t,"encType",r.encType,r,null),We(e,t,"method",r.method,r,null),We(e,t,"target",r.target,r,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=To(""+i),e.setAttribute(a,i);break;case"onClick":i!=null&&(e.onclick=$n);break;case"onScroll":i!=null&&qe("scroll",e);break;case"onScrollEnd":i!=null&&qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(a=i.__html,a!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}a=To(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""+i):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":i===!0?e.setAttribute(a,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,i):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(a,i):e.removeAttribute(a);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(a):e.setAttribute(a,i);break;case"popover":qe("beforetoggle",e),qe("toggle",e),Co(e,"popover",i);break;case"xlinkActuate":Kn(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":Kn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":Kn(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":Kn(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":Kn(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":Kn(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":Kn(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":Kn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":Kn(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":Co(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=dx.get(a)||a,Co(e,a,i))}}function rd(e,t,a,i,r,c){switch(a){case"style":Lh(e,i,c);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(a=i.__html,a!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof i=="string"?fi(e,i):(typeof i=="number"||typeof i=="bigint")&&fi(e,""+i);break;case"onScroll":i!=null&&qe("scroll",e);break;case"onScrollEnd":i!=null&&qe("scrollend",e);break;case"onClick":i!=null&&(e.onclick=$n);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ch.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(r=a.endsWith("Capture"),t=a.slice(2,r?a.length-7:void 0),c=e[Vt]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,r),typeof i=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,i,r);break e}a in e?e[a]=i:i===!0?e.setAttribute(a,""):Co(e,a,i)}}}function Ot(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",e),qe("load",e);var i=!1,r=!1,c;for(c in a)if(a.hasOwnProperty(c)){var y=a[c];if(y!=null)switch(c){case"src":i=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:We(e,t,c,y,a,null)}}r&&We(e,t,"srcSet",a.srcSet,a,null),i&&We(e,t,"src",a.src,a,null);return;case"input":qe("invalid",e);var v=c=y=r=null,A=null,K=null;for(i in a)if(a.hasOwnProperty(i)){var ae=a[i];if(ae!=null)switch(i){case"name":r=ae;break;case"type":y=ae;break;case"checked":A=ae;break;case"defaultChecked":K=ae;break;case"value":c=ae;break;case"defaultValue":v=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(o(137,t));break;default:We(e,t,i,ae,a,null)}}Rh(e,c,v,A,K,y,r,!1);return;case"select":qe("invalid",e),i=y=c=null;for(r in a)if(a.hasOwnProperty(r)&&(v=a[r],v!=null))switch(r){case"value":c=v;break;case"defaultValue":y=v;break;case"multiple":i=v;default:We(e,t,r,v,a,null)}t=c,a=y,e.multiple=!!i,t!=null?di(e,!!i,t,!1):a!=null&&di(e,!!i,a,!0);return;case"textarea":qe("invalid",e),c=r=i=null;for(y in a)if(a.hasOwnProperty(y)&&(v=a[y],v!=null))switch(y){case"value":i=v;break;case"defaultValue":r=v;break;case"children":c=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(o(91));break;default:We(e,t,y,v,a,null)}Dh(e,i,r,c);return;case"option":for(A in a)if(a.hasOwnProperty(A)&&(i=a[A],i!=null))switch(A){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:We(e,t,A,i,a,null)}return;case"dialog":qe("beforetoggle",e),qe("toggle",e),qe("cancel",e),qe("close",e);break;case"iframe":case"object":qe("load",e);break;case"video":case"audio":for(i=0;i<Ys.length;i++)qe(Ys[i],e);break;case"image":qe("error",e),qe("load",e);break;case"details":qe("toggle",e);break;case"embed":case"source":case"link":qe("error",e),qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(K in a)if(a.hasOwnProperty(K)&&(i=a[K],i!=null))switch(K){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:We(e,t,K,i,a,null)}return;default:if(wc(t)){for(ae in a)a.hasOwnProperty(ae)&&(i=a[ae],i!==void 0&&rd(e,t,ae,i,a,void 0));return}}for(v in a)a.hasOwnProperty(v)&&(i=a[v],i!=null&&We(e,t,v,i,a,null))}function B2(e,t,a,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,c=null,y=null,v=null,A=null,K=null,ae=null;for(J in a){var oe=a[J];if(a.hasOwnProperty(J)&&oe!=null)switch(J){case"checked":break;case"value":break;case"defaultValue":A=oe;default:i.hasOwnProperty(J)||We(e,t,J,null,i,oe)}}for(var X in i){var J=i[X];if(oe=a[X],i.hasOwnProperty(X)&&(J!=null||oe!=null))switch(X){case"type":c=J;break;case"name":r=J;break;case"checked":K=J;break;case"defaultChecked":ae=J;break;case"value":y=J;break;case"defaultValue":v=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(o(137,t));break;default:J!==oe&&We(e,t,X,J,i,oe)}}xc(e,y,v,A,K,ae,c,r);return;case"select":J=y=v=X=null;for(c in a)if(A=a[c],a.hasOwnProperty(c)&&A!=null)switch(c){case"value":break;case"multiple":J=A;default:i.hasOwnProperty(c)||We(e,t,c,null,i,A)}for(r in i)if(c=i[r],A=a[r],i.hasOwnProperty(r)&&(c!=null||A!=null))switch(r){case"value":X=c;break;case"defaultValue":v=c;break;case"multiple":y=c;default:c!==A&&We(e,t,r,c,i,A)}t=v,a=y,i=J,X!=null?di(e,!!a,X,!1):!!i!=!!a&&(t!=null?di(e,!!a,t,!0):di(e,!!a,a?[]:"",!1));return;case"textarea":J=X=null;for(v in a)if(r=a[v],a.hasOwnProperty(v)&&r!=null&&!i.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:We(e,t,v,null,i,r)}for(y in i)if(r=i[y],c=a[y],i.hasOwnProperty(y)&&(r!=null||c!=null))switch(y){case"value":X=r;break;case"defaultValue":J=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(o(91));break;default:r!==c&&We(e,t,y,r,i,c)}zh(e,X,J);return;case"option":for(var _e in a)if(X=a[_e],a.hasOwnProperty(_e)&&X!=null&&!i.hasOwnProperty(_e))switch(_e){case"selected":e.selected=!1;break;default:We(e,t,_e,null,i,X)}for(A in i)if(X=i[A],J=a[A],i.hasOwnProperty(A)&&X!==J&&(X!=null||J!=null))switch(A){case"selected":e.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:We(e,t,A,X,i,J)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ce in a)X=a[Ce],a.hasOwnProperty(Ce)&&X!=null&&!i.hasOwnProperty(Ce)&&We(e,t,Ce,null,i,X);for(K in i)if(X=i[K],J=a[K],i.hasOwnProperty(K)&&X!==J&&(X!=null||J!=null))switch(K){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(o(137,t));break;default:We(e,t,K,X,i,J)}return;default:if(wc(t)){for(var et in a)X=a[et],a.hasOwnProperty(et)&&X!==void 0&&!i.hasOwnProperty(et)&&rd(e,t,et,void 0,i,X);for(ae in i)X=i[ae],J=a[ae],!i.hasOwnProperty(ae)||X===J||X===void 0&&J===void 0||rd(e,t,ae,X,i,J);return}}for(var B in a)X=a[B],a.hasOwnProperty(B)&&X!=null&&!i.hasOwnProperty(B)&&We(e,t,B,null,i,X);for(oe in i)X=i[oe],J=a[oe],!i.hasOwnProperty(oe)||X===J||X==null&&J==null||We(e,t,oe,X,i,J)}function By(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function H2(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),i=0;i<a.length;i++){var r=a[i],c=r.transferSize,y=r.initiatorType,v=r.duration;if(c&&v&&By(y)){for(y=0,v=r.responseEnd,i+=1;i<a.length;i++){var A=a[i],K=A.startTime;if(K>v)break;var ae=A.transferSize,oe=A.initiatorType;ae&&By(oe)&&(A=A.responseEnd,y+=ae*(A<v?1:(v-K)/(A-K)))}if(--i,t+=8*(c+y)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var cd=null,ud=null;function jr(e){return e.nodeType===9?e:e.ownerDocument}function Hy(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function qy(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function dd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var fd=null;function q2(){var e=window.event;return e&&e.type==="popstate"?e===fd?!1:(fd=e,!0):(fd=null,!1)}var Gy=typeof setTimeout=="function"?setTimeout:void 0,G2=typeof clearTimeout=="function"?clearTimeout:void 0,Iy=typeof Promise=="function"?Promise:void 0,I2=typeof queueMicrotask=="function"?queueMicrotask:typeof Iy<"u"?function(e){return Iy.resolve(null).then(e).catch(Q2)}:Gy;function Q2(e){setTimeout(function(){throw e})}function Ga(e){return e==="head"}function Qy(e,t){var a=t,i=0;do{var r=a.nextSibling;if(e.removeChild(a),r&&r.nodeType===8)if(a=r.data,a==="/$"||a==="/&"){if(i===0){e.removeChild(r),Qi(t);return}i--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")i++;else if(a==="html")$s(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,$s(a);for(var c=a.firstChild;c;){var y=c.nextSibling,v=c.nodeName;c[ds]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=y}}else a==="body"&&$s(e.ownerDocument.body);a=r}while(a);Qi(t)}function Vy(e,t){var a=e;e=0;do{var i=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),i&&i.nodeType===8)if(a=i.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=i}while(a)}function hd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":hd(a),bc(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function V2(e,t,a,i){for(;e.nodeType===1;){var r=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[ds])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=wn(e.nextSibling),e===null)break}return null}function Y2(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=wn(e.nextSibling),e===null))return null;return e}function Yy(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=wn(e.nextSibling),e===null))return null;return e}function md(e){return e.data==="$?"||e.data==="$~"}function pd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function K2(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var i=function(){t(),a.removeEventListener("DOMContentLoaded",i)};a.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function wn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var yd=null;function Ky(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return wn(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function $y(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Xy(e,t,a){switch(t=jr(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function $s(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bc(e)}var Sn=new Map,Fy=new Set;function Mr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ca=F.d;F.d={f:$2,r:X2,D:F2,C:Z2,L:P2,m:J2,X:e_,S:W2,M:t_};function $2(){var e=ca.f(),t=br();return e||t}function X2(e){var t=ri(e);t!==null&&t.tag===5&&t.type==="form"?fp(t):ca.r(e)}var qi=typeof document>"u"?null:document;function Zy(e,t,a){var i=qi;if(i&&typeof t=="string"&&t){var r=pn(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),Fy.has(r)||(Fy.add(r),e={rel:e,crossOrigin:a,href:t},i.querySelector(r)===null&&(t=i.createElement("link"),Ot(t,"link",e),Et(t),i.head.appendChild(t)))}}function F2(e){ca.D(e),Zy("dns-prefetch",e,null)}function Z2(e,t){ca.C(e,t),Zy("preconnect",e,t)}function P2(e,t,a){ca.L(e,t,a);var i=qi;if(i&&e&&t){var r='link[rel="preload"][as="'+pn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+pn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+pn(a.imageSizes)+'"]')):r+='[href="'+pn(e)+'"]';var c=r;switch(t){case"style":c=Gi(e);break;case"script":c=Ii(e)}Sn.has(c)||(e=b({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Sn.set(c,e),i.querySelector(r)!==null||t==="style"&&i.querySelector(Xs(c))||t==="script"&&i.querySelector(Fs(c))||(t=i.createElement("link"),Ot(t,"link",e),Et(t),i.head.appendChild(t)))}}function J2(e,t){ca.m(e,t);var a=qi;if(a&&e){var i=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+pn(i)+'"][href="'+pn(e)+'"]',c=r;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ii(e)}if(!Sn.has(c)&&(e=b({rel:"modulepreload",href:e},t),Sn.set(c,e),a.querySelector(r)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Fs(c)))return}i=a.createElement("link"),Ot(i,"link",e),Et(i),a.head.appendChild(i)}}}function W2(e,t,a){ca.S(e,t,a);var i=qi;if(i&&e){var r=ci(i).hoistableStyles,c=Gi(e);t=t||"default";var y=r.get(c);if(!y){var v={loading:0,preload:null};if(y=i.querySelector(Xs(c)))v.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Sn.get(c))&&gd(e,a);var A=y=i.createElement("link");Et(A),Ot(A,"link",e),A._p=new Promise(function(K,ae){A.onload=K,A.onerror=ae}),A.addEventListener("load",function(){v.loading|=1}),A.addEventListener("error",function(){v.loading|=2}),v.loading|=4,Cr(y,t,i)}y={type:"stylesheet",instance:y,count:1,state:v},r.set(c,y)}}}function e_(e,t){ca.X(e,t);var a=qi;if(a&&e){var i=ci(a).hoistableScripts,r=Ii(e),c=i.get(r);c||(c=a.querySelector(Fs(r)),c||(e=b({src:e,async:!0},t),(t=Sn.get(r))&&bd(e,t),c=a.createElement("script"),Et(c),Ot(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},i.set(r,c))}}function t_(e,t){ca.M(e,t);var a=qi;if(a&&e){var i=ci(a).hoistableScripts,r=Ii(e),c=i.get(r);c||(c=a.querySelector(Fs(r)),c||(e=b({src:e,async:!0,type:"module"},t),(t=Sn.get(r))&&bd(e,t),c=a.createElement("script"),Et(c),Ot(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},i.set(r,c))}}function Py(e,t,a,i){var r=(r=Q.current)?Mr(r):null;if(!r)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Gi(a.href),a=ci(r).hoistableStyles,i=a.get(t),i||(i={type:"style",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Gi(a.href);var c=ci(r).hoistableStyles,y=c.get(e);if(y||(r=r.ownerDocument||r,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,y),(c=r.querySelector(Xs(e)))&&!c._p&&(y.instance=c,y.state.loading=5),Sn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Sn.set(e,a),c||n_(r,e,a,y.state))),t&&i===null)throw Error(o(528,""));return y}if(t&&i!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ii(a),a=ci(r).hoistableScripts,i=a.get(t),i||(i={type:"script",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Gi(e){return'href="'+pn(e)+'"'}function Xs(e){return'link[rel="stylesheet"]['+e+"]"}function Jy(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function n_(e,t,a,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),Ot(t,"link",a),Et(t),e.head.appendChild(t))}function Ii(e){return'[src="'+pn(e)+'"]'}function Fs(e){return"script[async]"+e}function Wy(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+pn(a.href)+'"]');if(i)return t.instance=i,Et(i),i;var r=b({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Et(i),Ot(i,"style",r),Cr(i,a.precedence,e),t.instance=i;case"stylesheet":r=Gi(a.href);var c=e.querySelector(Xs(r));if(c)return t.state.loading|=4,t.instance=c,Et(c),c;i=Jy(a),(r=Sn.get(r))&&gd(i,r),c=(e.ownerDocument||e).createElement("link"),Et(c);var y=c;return y._p=new Promise(function(v,A){y.onload=v,y.onerror=A}),Ot(c,"link",i),t.state.loading|=4,Cr(c,a.precedence,e),t.instance=c;case"script":return c=Ii(a.src),(r=e.querySelector(Fs(c)))?(t.instance=r,Et(r),r):(i=a,(r=Sn.get(c))&&(i=b({},a),bd(i,r)),e=e.ownerDocument||e,r=e.createElement("script"),Et(r),Ot(r,"link",i),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,Cr(i,a.precedence,e));return t.instance}function Cr(e,t,a){for(var i=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=i.length?i[i.length-1]:null,c=r,y=0;y<i.length;y++){var v=i[y];if(v.dataset.precedence===t)c=v;else if(c!==r)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function gd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function bd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ar=null;function eg(e,t,a){if(Ar===null){var i=new Map,r=Ar=new Map;r.set(a,i)}else r=Ar,i=r.get(a),i||(i=new Map,r.set(a,i));if(i.has(e))return i;for(i.set(e,null),a=a.getElementsByTagName(e),r=0;r<a.length;r++){var c=a[r];if(!(c[ds]||c[Ct]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var y=c.getAttribute(t)||"";y=e+y;var v=i.get(y);v?v.push(c):i.set(y,[c])}}return i}function tg(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function a_(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ng(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function l_(e,t,a,i){if(a.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var r=Gi(i.href),c=t.querySelector(Xs(r));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Nr.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=c,Et(c);return}c=t.ownerDocument||t,i=Jy(i),(r=Sn.get(r))&&gd(i,r),c=c.createElement("link"),Et(c);var y=c;y._p=new Promise(function(v,A){y.onload=v,y.onerror=A}),Ot(c,"link",i),a.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Nr.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var vd=0;function i_(e,t){return e.stylesheets&&e.count===0&&Or(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var i=setTimeout(function(){if(e.stylesheets&&Or(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&vd===0&&(vd=62500*H2());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Or(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>vd?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(r)}}:null}function Nr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Or(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Tr=null;function Or(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Tr=new Map,t.forEach(s_,e),Tr=null,Nr.call(e))}function s_(e,t){if(!(t.state.loading&4)){var a=Tr.get(e);if(a)var i=a.get(null);else{a=new Map,Tr.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<r.length;c++){var y=r[c];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),i=y)}i&&a.set(null,i)}r=t.instance,y=r.getAttribute("data-precedence"),c=a.get(y)||i,c===i&&a.set(null,r),a.set(y,r),this.count++,i=Nr.bind(this),r.addEventListener("load",i),r.addEventListener("error",i),c?c.parentNode.insertBefore(r,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Zs={$$typeof:z,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function o_(e,t,a,i,r,c,y,v,A){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ml(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ml(0),this.hiddenUpdates=ml(null),this.identifierPrefix=i,this.onUncaughtError=r,this.onCaughtError=c,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function ag(e,t,a,i,r,c,y,v,A,K,ae,oe){return e=new o_(e,t,a,y,A,K,ae,oe,v),t=1,c===!0&&(t|=24),c=nn(3,null,null,t),e.current=c,c.stateNode=e,t=Jc(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:i,isDehydrated:a,cache:t},nu(c),e}function lg(e){return e?(e=vi,e):vi}function ig(e,t,a,i,r,c){r=lg(r),i.context===null?i.context=r:i.pendingContext=r,i=Na(t),i.payload={element:a},c=c===void 0?null:c,c!==null&&(i.callback=c),a=Ta(e,i,t),a!==null&&(Zt(a,e,t),Cs(a,e,t))}function sg(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function xd(e,t){sg(e,t),(e=e.alternate)&&sg(e,t)}function og(e){if(e.tag===13||e.tag===31){var t=vl(e,67108864);t!==null&&Zt(t,e,67108864),xd(e,67108864)}}function rg(e){if(e.tag===13||e.tag===31){var t=rn();t=pc(t);var a=vl(e,t);a!==null&&Zt(a,e,t),xd(e,t)}}var Rr=!0;function r_(e,t,a,i){var r=w.T;w.T=null;var c=F.p;try{F.p=2,_d(e,t,a,i)}finally{F.p=c,w.T=r}}function c_(e,t,a,i){var r=w.T;w.T=null;var c=F.p;try{F.p=8,_d(e,t,a,i)}finally{F.p=c,w.T=r}}function _d(e,t,a,i){if(Rr){var r=wd(i);if(r===null)od(e,t,i,zr,a),ug(e,i);else if(d_(r,e,t,a,i))i.stopPropagation();else if(ug(e,i),t&4&&-1<u_.indexOf(e)){for(;r!==null;){var c=ri(r);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var y=ct(c.pendingLanes);if(y!==0){var v=c;for(v.pendingLanes|=2,v.entangledLanes|=2;y;){var A=1<<31-he(y);v.entanglements[1]|=A,y&=~A}Un(c),(Xe&6)===0&&(yr=rt()+500,Vs(0))}}break;case 31:case 13:v=vl(c,2),v!==null&&Zt(v,c,2),br(),xd(c,2)}if(c=wd(i),c===null&&od(e,t,i,zr,a),c===r)break;r=c}r!==null&&i.stopPropagation()}else od(e,t,i,null,a)}}function wd(e){return e=kc(e),Sd(e)}var zr=null;function Sd(e){if(zr=null,e=oi(e),e!==null){var t=d(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(t),e!==null)return e;e=null}else if(a===31){if(e=p(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return zr=e,null}function cg(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Eo()){case us:return 2;case li:return 8;case fl:case ii:return 32;case it:return 268435456;default:return 32}default:return 32}}var kd=!1,Ia=null,Qa=null,Va=null,Ps=new Map,Js=new Map,Ya=[],u_="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".split(" ");function ug(e,t){switch(e){case"focusin":case"focusout":Ia=null;break;case"dragenter":case"dragleave":Qa=null;break;case"mouseover":case"mouseout":Va=null;break;case"pointerover":case"pointerout":Ps.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Js.delete(t.pointerId)}}function Ws(e,t,a,i,r,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:i,nativeEvent:c,targetContainers:[r]},t!==null&&(t=ri(t),t!==null&&og(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function d_(e,t,a,i,r){switch(t){case"focusin":return Ia=Ws(Ia,e,t,a,i,r),!0;case"dragenter":return Qa=Ws(Qa,e,t,a,i,r),!0;case"mouseover":return Va=Ws(Va,e,t,a,i,r),!0;case"pointerover":var c=r.pointerId;return Ps.set(c,Ws(Ps.get(c)||null,e,t,a,i,r)),!0;case"gotpointercapture":return c=r.pointerId,Js.set(c,Ws(Js.get(c)||null,e,t,a,i,r)),!0}return!1}function dg(e){var t=oi(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,Eh(e.priority,function(){rg(a)});return}}else if(t===31){if(t=p(a),t!==null){e.blockedOn=t,Eh(e.priority,function(){rg(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=wd(e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);Sc=i,a.target.dispatchEvent(i),Sc=null}else return t=ri(a),t!==null&&og(t),e.blockedOn=a,!1;t.shift()}return!0}function fg(e,t,a){Dr(e)&&a.delete(t)}function f_(){kd=!1,Ia!==null&&Dr(Ia)&&(Ia=null),Qa!==null&&Dr(Qa)&&(Qa=null),Va!==null&&Dr(Va)&&(Va=null),Ps.forEach(fg),Js.forEach(fg)}function Ur(e,t){e.blockedOn===t&&(e.blockedOn=null,kd||(kd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,f_)))}var Lr=null;function hg(e){Lr!==e&&(Lr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Lr===e&&(Lr=null);for(var t=0;t<e.length;t+=3){var a=e[t],i=e[t+1],r=e[t+2];if(typeof i!="function"){if(Sd(i||a)===null)continue;break}var c=ri(a);c!==null&&(e.splice(t,3),t-=3,wu(c,{pending:!0,data:r,method:a.method,action:i},i,r))}}))}function Qi(e){function t(A){return Ur(A,e)}Ia!==null&&Ur(Ia,e),Qa!==null&&Ur(Qa,e),Va!==null&&Ur(Va,e),Ps.forEach(t),Js.forEach(t);for(var a=0;a<Ya.length;a++){var i=Ya[a];i.blockedOn===e&&(i.blockedOn=null)}for(;0<Ya.length&&(a=Ya[0],a.blockedOn===null);)dg(a),a.blockedOn===null&&Ya.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(i=0;i<a.length;i+=3){var r=a[i],c=a[i+1],y=r[Vt]||null;if(typeof c=="function")y||hg(a);else if(y){var v=null;if(c&&c.hasAttribute("formAction")){if(r=c,y=c[Vt]||null)v=y.formAction;else if(Sd(r)!==null)continue}else v=y.action;typeof v=="function"?a[i+1]=v:(a.splice(i,3),i-=3),hg(a)}}}function mg(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(y){return r=y})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),i||setTimeout(a,20)}function a(){if(!i&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function Ed(e){this._internalRoot=e}Br.prototype.render=Ed.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,i=rn();ig(a,i,e,t,null,null)},Br.prototype.unmount=Ed.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ig(e.current,2,null,e,null,null),br(),t[si]=null}};function Br(e){this._internalRoot=e}Br.prototype.unstable_scheduleHydration=function(e){if(e){var t=kh();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ya.length&&t!==0&&t<Ya[a].priority;a++);Ya.splice(a,0,e),a===0&&dg(e)}};var pg=l.version;if(pg!=="19.2.6")throw Error(o(527,pg,"19.2.6"));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var h_={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:w,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hr.isDisabled&&Hr.supportsFiber)try{xa=Hr.inject(h_),zt=Hr}catch{}}return to.createRoot=function(e,t){if(!u(e))throw Error(o(299));var a=!1,i="",r=wp,c=Sp,y=kp;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=ag(e,1,!1,null,null,a,i,null,r,c,y,mg),e[si]=t.current,sd(e),new Ed(t)},to.hydrateRoot=function(e,t,a){if(!u(e))throw Error(o(299));var i=!1,r="",c=wp,y=Sp,v=kp,A=null;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(r=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(v=a.onRecoverableError),a.formState!==void 0&&(A=a.formState)),t=ag(e,1,!0,t,a??null,i,r,A,c,y,v,mg),t.context=lg(null),a=t.current,i=rn(),i=pc(i),r=Na(i),r.callback=null,Ta(a,r,i),a=i,t.current.lanes=a,_a(t,a),Un(t),e[si]=t.current,sd(e),new Br(t)},to.version="19.2.6",to}var jg;function S_(){if(jg)return Ad.exports;jg=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(l){console.error(l)}}return n(),Ad.exports=w_(),Ad.exports}var k_=S_();function E_(n){if(!n)return null;const l=n.split("~"),s=l[0];if(!s)return null;if(l.length===1)return{kind:"section",instanceId:s};const o=l[1];if(!o)return null;const u=l[2],d=u!==void 0?Number(u):NaN;return{kind:"slot",instanceId:s,slotId:o,...Number.isInteger(d)?{itemIndex:d}:{}}}function j_(n){if(!n)return null;if(n.kind==="section")return n.instanceId;const l=`${n.instanceId}~${n.slotId}`;return n.itemIndex!==void 0?`${l}~${n.itemIndex}`:l}function M_(n,l){const s=new URL(l).pathname,o=s.endsWith("/")?s:`${s}/`;return`${n}/`===o?"":n.startsWith(o)?n.slice(o.length):null}function C_(n,l){const[s,o,u,d,...h]=n.split("/").filter(Boolean);if(s!=="fixtures"||!o||u!=="canvas"||h.length>0)return null;const p=new URLSearchParams(l);return{fixture:decodeURIComponent(o),canvasId:d?decodeURIComponent(d):null,format:p.get("format"),selection:E_(p.get("sel"))}}function A_(n){var s;const l=n.fixtures[0];return l===void 0?null:{fixture:l.id,canvasId:((s=n.template.canvases[0])==null?void 0:s.id)??null,format:null,selection:null}}function Mg(n){const l=n.canvasId===null?"canvas":`canvas/${encodeURIComponent(n.canvasId)}`,s=`fixtures/${encodeURIComponent(n.fixture)}/${l}`,o=new URLSearchParams;n.format!==null&&o.set("format",n.format);const u=j_(n.selection);u&&o.set("sel",u);const d=o.toString();return d?`${s}?${d}`:s}function v0(n,l){var s;return((s=n.parentElement)==null?void 0:s.closest(`[${l.slotId}],[${l.slotField}]`))??null}function ga(n,l){return!n.hasAttribute(l.slotUnselectable)}function x0(n,l,s,o){const u=[];for(const d of Array.from(n.querySelectorAll(l)))v0(d,o)===s&&u.push(d);return u}function Hf(n,l,s){return x0(n,`[${s.slotItem}="${String(l)}"]`,n,s)}function Cg(n,l,s,o){var d;let u=n.closest(`[${l}]`);for(;u&&s.contains(u);){if(ga(u,o)&&v0(u,o)===s)return u;u=((d=u.parentElement)==null?void 0:d.closest(`[${l}]`))??null}return null}const Rd=1,N_=12;function T_(n,l){return{"--we-r-top":`${n.top}px`,"--we-r-left":`${n.left}px`,"--we-r-w":`${n.width}px`,"--we-r-h":`${n.height}px`,"--we-r-off":`${l}px`}}function O_(n){const l=rc(n);return l.width<=0||l.height<=0?!1:!R_(n,l)}function Ag(n){return n==="hidden"||n==="scroll"||n==="auto"||n==="clip"}function R_(n,l){const s=n.ownerDocument.defaultView;if(!s)return!1;let o=-1/0,u=-1/0,d=1/0,h=1/0;for(let g=n.parentElement;g;g=g.parentElement){const x=s.getComputedStyle(g),b=Ag(x.overflowX||x.overflow),E=Ag(x.overflowY||x.overflow);if(!b&&!E)continue;const j=g.getBoundingClientRect();b&&(u=Math.max(u,j.left),d=Math.min(d,j.right)),E&&(o=Math.max(o,j.top),h=Math.min(h,j.bottom))}const p=l.left+l.width<=u||l.left>=d,m=l.top+l.height<=o||l.top>=h;return p||m}function rc(n){const l=n.getBoundingClientRect();if(l.width>0&&l.height>0)return l;let s=1/0,o=1/0,u=-1/0,d=-1/0,h=!1;for(const p of Array.from(n.children)){const m=rc(p);m.width<=0||m.height<=0||(h=!0,s=Math.min(s,m.top),o=Math.min(o,m.left),u=Math.max(u,m.right),d=Math.max(d,m.bottom))}return h?new DOMRect(o,s,u-o,d-s):l}function _0(n,l,s,o){if(!n)return;if(!l){Fr(n);return}const u=T_(rc(l),s);for(const[d,h]of Object.entries(u))n.style.setProperty(d,h);o&&n.setAttribute("data-kind",o),n.setAttribute("data-active","true")}function Fr(n){n&&(n.removeAttribute("data-active"),n.removeAttribute("data-kind"))}function Ng(n,l,s,o){if(!n)return[];const u=n.ownerDocument,d=Array.from(n.querySelectorAll(".we-chrome-ring--selection")),h=n.querySelector(":scope > .we-chrome-label");for(;d.length<l.length;){const p=u.createElement("div");p.className="we-chrome-ring we-chrome-ring--selection",n.insertBefore(p,h),d.push(p)}d.forEach((p,m)=>_0(p,l[m]??null,s,o));for(const p of d.slice(Math.max(l.length,1)))p.remove();return d.slice(0,l.length)}function z_(n,l,s){if(!n)return;if(!l||!s){Fd(n);return}const o=rc(l),u=n.getAttribute("data-active")==="true",d=n.textContent!==s;n.textContent=s,n.style.setProperty("--we-l-top",`${o.top}px`),n.style.setProperty("--we-l-left",`${o.left}px`),n.style.setProperty("--we-l-indent",`${N_}px`),u&&d&&(n.removeAttribute("data-active"),n.offsetWidth),n.setAttribute("data-active","true")}function Fd(n){n&&(n.removeAttribute("data-active"),n.textContent="")}function Xl(n){return typeof CSS<"u"&&CSS.escape?CSS.escape(n):n.replace(/[^a-zA-Z0-9_-]/g,l=>`\\${l}`)}function qf(n){const l=n.filter(s=>O_(s));return l.length>0?l:n.slice(0,1)}function w0(n,l,s){const o=Array.from(n.querySelectorAll(`[${s.slotId}="${Xl(l)}"]`)).filter(u=>ga(u,s));return qf(o)}function D_(n,l,s){if(!l||l.kind!=="slot"||l.item_index==null)return[];const o=[];for(const u of n)o.push(...Hf(u,l.item_index,s).filter(d=>ga(d,s)));return qf(o)}function S0(n,l,s){if(!l)return[];const o=n.querySelector(`[${s.sectionInstanceId}="${Xl(l.instance_id)}"]`);if(!o)return[];if(l.kind==="section")return[o];const u=w0(o,l.slot_id,s);if(u.length===0)return[];if(l.item_index!=null||l.field_name){const d=l.field_name?`[${s.slotField}="${Xl(l.field_name)}"]`:null,h=[];for(const p of u){let m=[p];if(!(l.item_index!=null&&(m=Hf(p,l.item_index,s).filter(g=>ga(g,s)),m.length===0)))for(const g of m)if(d){const x=x0(g,d,p,s).filter(b=>ga(b,s));if(x.length>0){h.push(...x);continue}g!==p&&h.push(g)}else h.push(g)}if(h.length>0)return qf(h)}return u.map(d=>{const h=d.closest(`[${s.slotGroup}]`);return h&&ga(h,s)?h:d})}function U_(n,l,s){return S0(n,l,s)[0]??null}const Tg="we-enh-shield",L_="we-enh-shield--item",Vi="data-we-live";function B_(n,l,s){if(!l||l.kind!=="slot"||l.item_index==null)return[];const o=[];for(const u of k0(n,l,s))o.push(...Hf(u,l.item_index,s).filter(d=>ga(d,s)));return o}function k0(n,l,s){if(!l||l.kind!=="slot")return[];const o=n.querySelector(`[${s.sectionInstanceId}="${Xl(l.instance_id)}"]`);return o?Array.from(o.querySelectorAll(`[${s.slotId}="${Xl(l.slot_id)}"]`)):[]}function H_(n,l,s){if(n.querySelectorAll(`[${Vi}]`).forEach(u=>u.removeAttribute(Vi)),!l)return;const o=n.querySelector(`[${s.sectionInstanceId}="${Xl(l.instance_id)}"]`);if(o)if(l.kind==="section")o.setAttribute(Vi,"true");else{const u=B_(n,l,s),d=u.length>0?u:k0(n,l,s).filter(h=>ga(h,s));for(const h of d)h.setAttribute(Vi,"true")}}const Kl=1440,Og=Math.round(Kl*9/16),E0=14,Gf="we-frame-defaults";function q_(n){return`
|
|
48
|
+
`+i.stack}}var ti=Object.prototype.hasOwnProperty,ni=n.unstable_scheduleCallback,ai=n.unstable_cancelCallback,dl=n.unstable_shouldYield,On=n.unstable_requestPaint,rt=n.unstable_now,Eo=n.unstable_getCurrentPriorityLevel,us=n.unstable_ImmediatePriority,li=n.unstable_UserBlockingPriority,fl=n.unstable_NormalPriority,ii=n.unstable_LowPriority,it=n.unstable_IdlePriority,hl=n.log,jo=n.unstable_setDisableYieldValue,xa=null,zt=null;function te(e){if(typeof hl=="function"&&jo(e),zt&&typeof zt.setStrictMode=="function")try{zt.setStrictMode(xa,e)}catch{}}var he=Math.clz32?Math.clz32:Be,Se=Math.log,Me=Math.LN2;function Be(e){return e>>>=0,e===0?32:31-(Se(e)/Me|0)|0}var Ne=256,mt=262144,pt=4194304;function ct(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Dt(e,t,a){var i=e.pendingLanes;if(i===0)return 0;var r=0,c=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var v=i&134217727;return v!==0?(i=v&~c,i!==0?r=ct(i):(y&=v,y!==0?r=ct(y):a||(a=v&~e,a!==0&&(r=ct(a))))):(v=i&~c,v!==0?r=ct(v):y!==0?r=ct(y):a||(a=i&~e,a!==0&&(r=ct(a)))),r===0?0:t!==0&&t!==r&&(t&c)===0&&(c=r&-r,a=t&-t,c>=a||c===32&&(a&4194048)!==0)?t:r}function Ut(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Lt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function jn(){var e=pt;return pt<<=1,(pt&62914560)===0&&(pt=4194304),e}function ml(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function _a(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function wa(e,t,a,i,r,c){var y=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var v=e.entanglements,A=e.expirationTimes,K=e.hiddenUpdates;for(a=y&~a;0<a;){var ae=31-he(a),oe=1<<ae;v[ae]=0,A[ae]=-1;var X=K[ae];if(X!==null)for(K[ae]=null,ae=0;ae<X.length;ae++){var J=X[ae];J!==null&&(J.lane&=-536870913)}a&=~oe}i!==0&&Mo(e,i,0),c!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=c&~(y&~t))}function Mo(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-he(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|a&261930}function Sh(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var i=31-he(a),r=1<<i;r&t|e[i]&t&&(e[i]|=t),a&=~r}}function kh(e,t){var a=t&-t;return a=(a&42)!==0?1:pc(a),(a&(e.suspendedLanes|t))!==0?0:a}function pc(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function yc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Eh(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:ug(e.type))}function jh(e,t){var a=F.p;try{return F.p=e,t()}finally{F.p=a}}var Sa=Math.random().toString(36).slice(2),Ct="__reactFiber$"+Sa,Vt="__reactProps$"+Sa,si="__reactContainer$"+Sa,gc="__reactEvents$"+Sa,lx="__reactListeners$"+Sa,ix="__reactHandles$"+Sa,Mh="__reactResources$"+Sa,ds="__reactMarker$"+Sa;function bc(e){delete e[Ct],delete e[Vt],delete e[gc],delete e[lx],delete e[ix]}function oi(e){var t=e[Ct];if(t)return t;for(var a=e.parentNode;a;){if(t=a[si]||a[Ct]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=Xy(e);e!==null;){if(a=e[Ct])return a;e=Xy(e)}return t}e=a,a=e.parentNode}return null}function ri(e){if(e=e[Ct]||e[si]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function fs(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function ci(e){var t=e[Mh];return t||(t=e[Mh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Et(e){e[ds]=!0}var Ch=new Set,Ah={};function pl(e,t){ui(e,t),ui(e+"Capture",t)}function ui(e,t){for(Ah[e]=t,e=0;e<t.length;e++)Ch.add(t[e])}var sx=RegExp("^[: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]*$"),Nh={},Th={};function ox(e){return ti.call(Th,e)?!0:ti.call(Nh,e)?!1:sx.test(e)?Th[e]=!0:(Nh[e]=!0,!1)}function Co(e,t,a){if(ox(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Ao(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Kn(e,t,a,i){if(i===null)e.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+i)}}function mn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Oh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function rx(e,t,a){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var r=i.get,c=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(y){a=""+y,c.call(this,y)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function vc(e){if(!e._valueTracker){var t=Oh(e)?"checked":"value";e._valueTracker=rx(e,t,""+e[t])}}function Rh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),i="";return e&&(i=Oh(e)?e.checked?"true":"false":e.value),e=i,e!==a?(t.setValue(e),!0):!1}function No(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}}var cx=/[\n"\\]/g;function pn(e){return e.replace(cx,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function xc(e,t,a,i,r,c,y,v){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),t!=null?y==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+mn(t)):e.value!==""+mn(t)&&(e.value=""+mn(t)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),t!=null?_c(e,y,mn(t)):a!=null?_c(e,y,mn(a)):i!=null&&e.removeAttribute("value"),r==null&&c!=null&&(e.defaultChecked=!!c),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.name=""+mn(v):e.removeAttribute("name")}function zh(e,t,a,i,r,c,y,v){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),t!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||t!=null)){vc(e);return}a=a!=null?""+mn(a):"",t=t!=null?""+mn(t):a,v||t===e.value||(e.value=t),e.defaultValue=t}i=i??r,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=v?e.checked:!!i,e.defaultChecked=!!i,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),vc(e)}function _c(e,t,a){t==="number"&&No(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function di(e,t,a,i){if(e=e.options,t){t={};for(var r=0;r<a.length;r++)t["$"+a[r]]=!0;for(a=0;a<e.length;a++)r=t.hasOwnProperty("$"+e[a].value),e[a].selected!==r&&(e[a].selected=r),r&&i&&(e[a].defaultSelected=!0)}else{for(a=""+mn(a),t=null,r=0;r<e.length;r++){if(e[r].value===a){e[r].selected=!0,i&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Dh(e,t,a){if(t!=null&&(t=""+mn(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+mn(a):""}function Uh(e,t,a,i){if(t==null){if(i!=null){if(a!=null)throw Error(o(92));if($(i)){if(1<i.length)throw Error(o(93));i=i[0]}a=i}a==null&&(a=""),t=a}a=mn(t),e.defaultValue=a,i=e.textContent,i===a&&i!==""&&i!==null&&(e.value=i),vc(e)}function fi(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var ux=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Lh(e,t,a){var i=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,a):typeof a!="number"||a===0||ux.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Bh(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var i in a)!a.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var r in t)i=t[r],t.hasOwnProperty(r)&&a[r]!==i&&Lh(e,r,i)}else for(var c in t)t.hasOwnProperty(c)&&Lh(e,c,t[c])}function wc(e){if(e.indexOf("-")===-1)return!1;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 dx=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),fx=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function To(e){return fx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function $n(){}var Sc=null;function kc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var hi=null,mi=null;function Hh(e){var t=ri(e);if(t&&(e=t.stateNode)){var a=e[Vt]||null;e:switch(e=t.stateNode,t.type){case"input":if(xc(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+pn(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var i=a[t];if(i!==e&&i.form===e.form){var r=i[Vt]||null;if(!r)throw Error(o(90));xc(i,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<a.length;t++)i=a[t],i.form===e.form&&Rh(i)}break e;case"textarea":Dh(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&di(e,!!a.multiple,t,!1)}}}var Ec=!1;function qh(e,t,a){if(Ec)return e(t,a);Ec=!0;try{var i=e(t);return i}finally{if(Ec=!1,(hi!==null||mi!==null)&&(br(),hi&&(t=hi,e=mi,mi=hi=null,Hh(t),e)))for(t=0;t<e.length;t++)Hh(e[t])}}function hs(e,t){var a=e.stateNode;if(a===null)return null;var i=a[Vt]||null;if(i===null)return null;a=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var Xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),jc=!1;if(Xn)try{var ms={};Object.defineProperty(ms,"passive",{get:function(){jc=!0}}),window.addEventListener("test",ms,ms),window.removeEventListener("test",ms,ms)}catch{jc=!1}var ka=null,Mc=null,Oo=null;function Gh(){if(Oo)return Oo;var e,t=Mc,a=t.length,i,r="value"in ka?ka.value:ka.textContent,c=r.length;for(e=0;e<a&&t[e]===r[e];e++);var y=a-e;for(i=1;i<=y&&t[a-i]===r[c-i];i++);return Oo=r.slice(e,1<i?1-i:void 0)}function Ro(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function zo(){return!0}function Ih(){return!1}function Yt(e){function t(a,i,r,c,y){this._reactName=a,this._targetInst=r,this.type=i,this.nativeEvent=c,this.target=y,this.currentTarget=null;for(var v in e)e.hasOwnProperty(v)&&(a=e[v],this[v]=a?a(c):c[v]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?zo:Ih,this.isPropagationStopped=Ih,this}return b(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=zo)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=zo)},persist:function(){},isPersistent:zo}),t}var yl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Do=Yt(yl),ps=b({},yl,{view:0,detail:0}),hx=Yt(ps),Cc,Ac,ys,Uo=b({},ps,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tc,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!==ys&&(ys&&e.type==="mousemove"?(Cc=e.screenX-ys.screenX,Ac=e.screenY-ys.screenY):Ac=Cc=0,ys=e),Cc)},movementY:function(e){return"movementY"in e?e.movementY:Ac}}),Qh=Yt(Uo),mx=b({},Uo,{dataTransfer:0}),px=Yt(mx),yx=b({},ps,{relatedTarget:0}),Nc=Yt(yx),gx=b({},yl,{animationName:0,elapsedTime:0,pseudoElement:0}),bx=Yt(gx),vx=b({},yl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xx=Yt(vx),_x=b({},yl,{data:0}),Vh=Yt(_x),wx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sx={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"},kx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ex(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=kx[e])?!!t[e]:!1}function Tc(){return Ex}var jx=b({},ps,{key:function(e){if(e.key){var t=wx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ro(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Sx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tc,charCode:function(e){return e.type==="keypress"?Ro(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ro(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Mx=Yt(jx),Cx=b({},Uo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yh=Yt(Cx),Ax=b({},ps,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tc}),Nx=Yt(Ax),Tx=b({},yl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ox=Yt(Tx),Rx=b({},Uo,{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}),zx=Yt(Rx),Dx=b({},yl,{newState:0,oldState:0}),Ux=Yt(Dx),Lx=[9,13,27,32],Oc=Xn&&"CompositionEvent"in window,gs=null;Xn&&"documentMode"in document&&(gs=document.documentMode);var Bx=Xn&&"TextEvent"in window&&!gs,Kh=Xn&&(!Oc||gs&&8<gs&&11>=gs),$h=" ",Xh=!1;function Fh(e,t){switch(e){case"keyup":return Lx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pi=!1;function Hx(e,t){switch(e){case"compositionend":return Zh(t);case"keypress":return t.which!==32?null:(Xh=!0,$h);case"textInput":return e=t.data,e===$h&&Xh?null:e;default:return null}}function qx(e,t){if(pi)return e==="compositionend"||!Oc&&Fh(e,t)?(e=Gh(),Oo=Mc=ka=null,pi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Kh&&t.locale!=="ko"?null:t.data;default:return null}}var Gx={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 Ph(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Gx[e.type]:t==="textarea"}function Jh(e,t,a,i){hi?mi?mi.push(i):mi=[i]:hi=i,t=Er(t,"onChange"),0<t.length&&(a=new Do("onChange","change",null,a,i),e.push({event:a,listeners:t}))}var bs=null,vs=null;function Ix(e){zy(e,0)}function Lo(e){var t=fs(e);if(Rh(t))return e}function Wh(e,t){if(e==="change")return t}var em=!1;if(Xn){var Rc;if(Xn){var zc="oninput"in document;if(!zc){var tm=document.createElement("div");tm.setAttribute("oninput","return;"),zc=typeof tm.oninput=="function"}Rc=zc}else Rc=!1;em=Rc&&(!document.documentMode||9<document.documentMode)}function nm(){bs&&(bs.detachEvent("onpropertychange",am),vs=bs=null)}function am(e){if(e.propertyName==="value"&&Lo(vs)){var t=[];Jh(t,vs,e,kc(e)),qh(Ix,t)}}function Qx(e,t,a){e==="focusin"?(nm(),bs=t,vs=a,bs.attachEvent("onpropertychange",am)):e==="focusout"&&nm()}function Vx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Lo(vs)}function Yx(e,t){if(e==="click")return Lo(t)}function Kx(e,t){if(e==="input"||e==="change")return Lo(t)}function $x(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var tn=typeof Object.is=="function"?Object.is:$x;function xs(e,t){if(tn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(i=0;i<a.length;i++){var r=a[i];if(!ti.call(t,r)||!tn(e[r],t[r]))return!1}return!0}function lm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function im(e,t){var a=lm(e);e=0;for(var i;a;){if(a.nodeType===3){if(i=e+a.textContent.length,e<=t&&i>=t)return{node:a,offset:t-e};e=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=lm(a)}}function sm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?sm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function om(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=No(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=No(e.document)}return t}function Dc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Xx=Xn&&"documentMode"in document&&11>=document.documentMode,yi=null,Uc=null,_s=null,Lc=!1;function rm(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Lc||yi==null||yi!==No(i)||(i=yi,"selectionStart"in i&&Dc(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),_s&&xs(_s,i)||(_s=i,i=Er(Uc,"onSelect"),0<i.length&&(t=new Do("onSelect","select",null,t,a),e.push({event:t,listeners:i}),t.target=yi)))}function gl(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var gi={animationend:gl("Animation","AnimationEnd"),animationiteration:gl("Animation","AnimationIteration"),animationstart:gl("Animation","AnimationStart"),transitionrun:gl("Transition","TransitionRun"),transitionstart:gl("Transition","TransitionStart"),transitioncancel:gl("Transition","TransitionCancel"),transitionend:gl("Transition","TransitionEnd")},Bc={},cm={};Xn&&(cm=document.createElement("div").style,"AnimationEvent"in window||(delete gi.animationend.animation,delete gi.animationiteration.animation,delete gi.animationstart.animation),"TransitionEvent"in window||delete gi.transitionend.transition);function bl(e){if(Bc[e])return Bc[e];if(!gi[e])return e;var t=gi[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in cm)return Bc[e]=t[a];return e}var um=bl("animationend"),dm=bl("animationiteration"),fm=bl("animationstart"),Fx=bl("transitionrun"),Zx=bl("transitionstart"),Px=bl("transitioncancel"),hm=bl("transitionend"),mm=new Map,Hc="abort auxClick beforeToggle 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(" ");Hc.push("scrollEnd");function Mn(e,t){mm.set(e,t),pl(t,[e])}var Bo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},yn=[],bi=0,qc=0;function Ho(){for(var e=bi,t=qc=bi=0;t<e;){var a=yn[t];yn[t++]=null;var i=yn[t];yn[t++]=null;var r=yn[t];yn[t++]=null;var c=yn[t];if(yn[t++]=null,i!==null&&r!==null){var y=i.pending;y===null?r.next=r:(r.next=y.next,y.next=r),i.pending=r}c!==0&&pm(a,r,c)}}function qo(e,t,a,i){yn[bi++]=e,yn[bi++]=t,yn[bi++]=a,yn[bi++]=i,qc|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function Gc(e,t,a,i){return qo(e,t,a,i),Go(e)}function vl(e,t){return qo(e,null,null,t),Go(e)}function pm(e,t,a){e.lanes|=a;var i=e.alternate;i!==null&&(i.lanes|=a);for(var r=!1,c=e.return;c!==null;)c.childLanes|=a,i=c.alternate,i!==null&&(i.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(r=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,r&&t!==null&&(r=31-he(a),e=c.hiddenUpdates,i=e[r],i===null?e[r]=[t]:i.push(t),t.lane=a|536870912),c):null}function Go(e){if(50<Qs)throw Qs=0,Zu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var vi={};function Jx(e,t,a,i){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(e,t,a,i){return new Jx(e,t,a,i)}function Ic(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fn(e,t){var a=e.alternate;return a===null?(a=nn(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function ym(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Io(e,t,a,i,r,c){var y=0;if(i=e,typeof e=="function")Ic(e)&&(y=1);else if(typeof e=="string")y=a_(e,a,N.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ue:return e=nn(31,a,t,r),e.elementType=ue,e.lanes=c,e;case C:return xl(a.children,r,c,t);case M:y=8,r|=24;break;case R:return e=nn(12,a,t,r|2),e.elementType=R,e.lanes=c,e;case le:return e=nn(13,a,t,r),e.elementType=le,e.lanes=c,e;case ne:return e=nn(19,a,t,r),e.elementType=ne,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case z:y=10;break e;case D:y=9;break e;case I:y=11;break e;case W:y=14;break e;case L:y=16,i=null;break e}y=29,a=Error(o(130,e===null?"null":typeof e,"")),i=null}return t=nn(y,a,t,r),t.elementType=e,t.type=i,t.lanes=c,t}function xl(e,t,a,i){return e=nn(7,e,i,t),e.lanes=a,e}function Qc(e,t,a){return e=nn(6,e,null,t),e.lanes=a,e}function gm(e){var t=nn(18,null,null,0);return t.stateNode=e,t}function Vc(e,t,a){return t=nn(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var bm=new WeakMap;function gn(e,t){if(typeof e=="object"&&e!==null){var a=bm.get(e);return a!==void 0?a:(t={value:e,source:t,stack:ko(t)},bm.set(e,t),t)}return{value:e,source:t,stack:ko(t)}}var xi=[],_i=0,Qo=null,ws=0,bn=[],vn=0,Ea=null,Rn=1,zn="";function Zn(e,t){xi[_i++]=ws,xi[_i++]=Qo,Qo=e,ws=t}function vm(e,t,a){bn[vn++]=Rn,bn[vn++]=zn,bn[vn++]=Ea,Ea=e;var i=Rn;e=zn;var r=32-he(i)-1;i&=~(1<<r),a+=1;var c=32-he(t)+r;if(30<c){var y=r-r%5;c=(i&(1<<y)-1).toString(32),i>>=y,r-=y,Rn=1<<32-he(t)+r|a<<r|i,zn=c+e}else Rn=1<<c|a<<r|i,zn=e}function Yc(e){e.return!==null&&(Zn(e,1),vm(e,1,0))}function Kc(e){for(;e===Qo;)Qo=xi[--_i],xi[_i]=null,ws=xi[--_i],xi[_i]=null;for(;e===Ea;)Ea=bn[--vn],bn[vn]=null,zn=bn[--vn],bn[vn]=null,Rn=bn[--vn],bn[vn]=null}function xm(e,t){bn[vn++]=Rn,bn[vn++]=zn,bn[vn++]=Ea,Rn=t.id,zn=t.overflow,Ea=e}var At=null,at=null,Qe=!1,ja=null,xn=!1,$c=Error(o(519));function Ma(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ss(gn(t,e)),$c}function _m(e){var t=e.stateNode,a=e.type,i=e.memoizedProps;switch(t[Ct]=e,t[Vt]=i,a){case"dialog":qe("cancel",t),qe("close",t);break;case"iframe":case"object":case"embed":qe("load",t);break;case"video":case"audio":for(a=0;a<Ys.length;a++)qe(Ys[a],t);break;case"source":qe("error",t);break;case"img":case"image":case"link":qe("error",t),qe("load",t);break;case"details":qe("toggle",t);break;case"input":qe("invalid",t),zh(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":qe("invalid",t);break;case"textarea":qe("invalid",t),Uh(t,i.value,i.defaultValue,i.children)}a=i.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||i.suppressHydrationWarning===!0||By(t.textContent,a)?(i.popover!=null&&(qe("beforetoggle",t),qe("toggle",t)),i.onScroll!=null&&qe("scroll",t),i.onScrollEnd!=null&&qe("scrollend",t),i.onClick!=null&&(t.onclick=$n),t=!0):t=!1,t||Ma(e,!0)}function wm(e){for(At=e.return;At;)switch(At.tag){case 5:case 31:case 13:xn=!1;return;case 27:case 3:xn=!0;return;default:At=At.return}}function wi(e){if(e!==At)return!1;if(!Qe)return wm(e),Qe=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||dd(e.type,e.memoizedProps)),a=!a),a&&at&&Ma(e),wm(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));at=$y(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));at=$y(e)}else t===27?(t=at,Ga(e.type)?(e=yd,yd=null,at=e):at=t):at=At?wn(e.stateNode.nextSibling):null;return!0}function _l(){at=At=null,Qe=!1}function Xc(){var e=ja;return e!==null&&(Ft===null?Ft=e:Ft.push.apply(Ft,e),ja=null),e}function Ss(e){ja===null?ja=[e]:ja.push(e)}var Fc=S(null),wl=null,Pn=null;function Ca(e,t,a){Y(Fc,t._currentValue),t._currentValue=a}function Jn(e){e._currentValue=Fc.current,q(Fc)}function Zc(e,t,a){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===a)break;e=e.return}}function Pc(e,t,a,i){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var c=r.dependencies;if(c!==null){var y=r.child;c=c.firstContext;e:for(;c!==null;){var v=c;c=r;for(var A=0;A<t.length;A++)if(v.context===t[A]){c.lanes|=a,v=c.alternate,v!==null&&(v.lanes|=a),Zc(c.return,a,e),i||(y=null);break e}c=v.next}}else if(r.tag===18){if(y=r.return,y===null)throw Error(o(341));y.lanes|=a,c=y.alternate,c!==null&&(c.lanes|=a),Zc(y,a,e),y=null}else y=r.child;if(y!==null)y.return=r;else for(y=r;y!==null;){if(y===e){y=null;break}if(r=y.sibling,r!==null){r.return=y.return,y=r;break}y=y.return}r=y}}function Si(e,t,a,i){e=null;for(var r=t,c=!1;r!==null;){if(!c){if((r.flags&524288)!==0)c=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var y=r.alternate;if(y===null)throw Error(o(387));if(y=y.memoizedProps,y!==null){var v=r.type;tn(r.pendingProps.value,y.value)||(e!==null?e.push(v):e=[v])}}else if(r===Z.current){if(y=r.alternate,y===null)throw Error(o(387));y.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Zs):e=[Zs])}r=r.return}e!==null&&Pc(t,e,a,i),t.flags|=262144}function Vo(e){for(e=e.firstContext;e!==null;){if(!tn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Sl(e){wl=e,Pn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Nt(e){return Sm(wl,e)}function Yo(e,t){return wl===null&&Sl(e),Sm(e,t)}function Sm(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Pn===null){if(e===null)throw Error(o(308));Pn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Pn=Pn.next=t;return a}var Wx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},e2=n.unstable_scheduleCallback,t2=n.unstable_NormalPriority,bt={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Jc(){return{controller:new Wx,data:new Map,refCount:0}}function ks(e){e.refCount--,e.refCount===0&&e2(t2,function(){e.controller.abort()})}var Es=null,Wc=0,ki=0,Ei=null;function n2(e,t){if(Es===null){var a=Es=[];Wc=0,ki=nd(),Ei={status:"pending",value:void 0,then:function(i){a.push(i)}}}return Wc++,t.then(km,km),t}function km(){if(--Wc===0&&Es!==null){Ei!==null&&(Ei.status="fulfilled");var e=Es;Es=null,ki=0,Ei=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function a2(e,t){var a=[],i={status:"pending",value:null,reason:null,then:function(r){a.push(r)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var r=0;r<a.length;r++)(0,a[r])(t)},function(r){for(i.status="rejected",i.reason=r,r=0;r<a.length;r++)(0,a[r])(void 0)}),i}var Em=w.S;w.S=function(e,t){ry=rt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&n2(e,t),Em!==null&&Em(e,t)};var kl=S(null);function eu(){var e=kl.current;return e!==null?e:tt.pooledCache}function Ko(e,t){t===null?Y(kl,kl.current):Y(kl,t.pool)}function jm(){var e=eu();return e===null?null:{parent:bt._currentValue,pool:e}}var ji=Error(o(460)),tu=Error(o(474)),$o=Error(o(542)),Xo={then:function(){}};function Mm(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Cm(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then($n,$n),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Nm(e),e;default:if(typeof t.status=="string")t.then($n,$n);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=i}},function(i){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Nm(e),e}throw jl=t,ji}}function El(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(jl=a,ji):a}}var jl=null;function Am(){if(jl===null)throw Error(o(459));var e=jl;return jl=null,e}function Nm(e){if(e===ji||e===$o)throw Error(o(483))}var Mi=null,js=0;function Fo(e){var t=js;return js+=1,Mi===null&&(Mi=[]),Cm(Mi,e,t)}function Ms(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Zo(e,t){throw t.$$typeof===E?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Tm(e){function t(B,O){if(e){var V=B.deletions;V===null?(B.deletions=[O],B.flags|=16):V.push(O)}}function a(B,O){if(!e)return null;for(;O!==null;)t(B,O),O=O.sibling;return null}function i(B){for(var O=new Map;B!==null;)B.key!==null?O.set(B.key,B):O.set(B.index,B),B=B.sibling;return O}function r(B,O){return B=Fn(B,O),B.index=0,B.sibling=null,B}function c(B,O,V){return B.index=V,e?(V=B.alternate,V!==null?(V=V.index,V<O?(B.flags|=67108866,O):V):(B.flags|=67108866,O)):(B.flags|=1048576,O)}function y(B){return e&&B.alternate===null&&(B.flags|=67108866),B}function v(B,O,V,se){return O===null||O.tag!==6?(O=Qc(V,B.mode,se),O.return=B,O):(O=r(O,V),O.return=B,O)}function A(B,O,V,se){var ke=V.type;return ke===C?ae(B,O,V.props.children,se,V.key):O!==null&&(O.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===L&&El(ke)===O.type)?(O=r(O,V.props),Ms(O,V),O.return=B,O):(O=Io(V.type,V.key,V.props,null,B.mode,se),Ms(O,V),O.return=B,O)}function K(B,O,V,se){return O===null||O.tag!==4||O.stateNode.containerInfo!==V.containerInfo||O.stateNode.implementation!==V.implementation?(O=Vc(V,B.mode,se),O.return=B,O):(O=r(O,V.children||[]),O.return=B,O)}function ae(B,O,V,se,ke){return O===null||O.tag!==7?(O=xl(V,B.mode,se,ke),O.return=B,O):(O=r(O,V),O.return=B,O)}function oe(B,O,V){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=Qc(""+O,B.mode,V),O.return=B,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case j:return V=Io(O.type,O.key,O.props,null,B.mode,V),Ms(V,O),V.return=B,V;case T:return O=Vc(O,B.mode,V),O.return=B,O;case L:return O=El(O),oe(B,O,V)}if($(O)||ie(O))return O=xl(O,B.mode,V,null),O.return=B,O;if(typeof O.then=="function")return oe(B,Fo(O),V);if(O.$$typeof===z)return oe(B,Yo(B,O),V);Zo(B,O)}return null}function X(B,O,V,se){var ke=O!==null?O.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return ke!==null?null:v(B,O,""+V,se);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case j:return V.key===ke?A(B,O,V,se):null;case T:return V.key===ke?K(B,O,V,se):null;case L:return V=El(V),X(B,O,V,se)}if($(V)||ie(V))return ke!==null?null:ae(B,O,V,se,null);if(typeof V.then=="function")return X(B,O,Fo(V),se);if(V.$$typeof===z)return X(B,O,Yo(B,V),se);Zo(B,V)}return null}function J(B,O,V,se,ke){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return B=B.get(V)||null,v(O,B,""+se,ke);if(typeof se=="object"&&se!==null){switch(se.$$typeof){case j:return B=B.get(se.key===null?V:se.key)||null,A(O,B,se,ke);case T:return B=B.get(se.key===null?V:se.key)||null,K(O,B,se,ke);case L:return se=El(se),J(B,O,V,se,ke)}if($(se)||ie(se))return B=B.get(V)||null,ae(O,B,se,ke,null);if(typeof se.then=="function")return J(B,O,V,Fo(se),ke);if(se.$$typeof===z)return J(B,O,V,Yo(O,se),ke);Zo(O,se)}return null}function _e(B,O,V,se){for(var ke=null,Ke=null,we=O,ze=O=0,Ie=null;we!==null&&ze<V.length;ze++){we.index>ze?(Ie=we,we=null):Ie=we.sibling;var $e=X(B,we,V[ze],se);if($e===null){we===null&&(we=Ie);break}e&&we&&$e.alternate===null&&t(B,we),O=c($e,O,ze),Ke===null?ke=$e:Ke.sibling=$e,Ke=$e,we=Ie}if(ze===V.length)return a(B,we),Qe&&Zn(B,ze),ke;if(we===null){for(;ze<V.length;ze++)we=oe(B,V[ze],se),we!==null&&(O=c(we,O,ze),Ke===null?ke=we:Ke.sibling=we,Ke=we);return Qe&&Zn(B,ze),ke}for(we=i(we);ze<V.length;ze++)Ie=J(we,B,ze,V[ze],se),Ie!==null&&(e&&Ie.alternate!==null&&we.delete(Ie.key===null?ze:Ie.key),O=c(Ie,O,ze),Ke===null?ke=Ie:Ke.sibling=Ie,Ke=Ie);return e&&we.forEach(function(Ka){return t(B,Ka)}),Qe&&Zn(B,ze),ke}function Ce(B,O,V,se){if(V==null)throw Error(o(151));for(var ke=null,Ke=null,we=O,ze=O=0,Ie=null,$e=V.next();we!==null&&!$e.done;ze++,$e=V.next()){we.index>ze?(Ie=we,we=null):Ie=we.sibling;var Ka=X(B,we,$e.value,se);if(Ka===null){we===null&&(we=Ie);break}e&&we&&Ka.alternate===null&&t(B,we),O=c(Ka,O,ze),Ke===null?ke=Ka:Ke.sibling=Ka,Ke=Ka,we=Ie}if($e.done)return a(B,we),Qe&&Zn(B,ze),ke;if(we===null){for(;!$e.done;ze++,$e=V.next())$e=oe(B,$e.value,se),$e!==null&&(O=c($e,O,ze),Ke===null?ke=$e:Ke.sibling=$e,Ke=$e);return Qe&&Zn(B,ze),ke}for(we=i(we);!$e.done;ze++,$e=V.next())$e=J(we,B,ze,$e.value,se),$e!==null&&(e&&$e.alternate!==null&&we.delete($e.key===null?ze:$e.key),O=c($e,O,ze),Ke===null?ke=$e:Ke.sibling=$e,Ke=$e);return e&&we.forEach(function(m_){return t(B,m_)}),Qe&&Zn(B,ze),ke}function et(B,O,V,se){if(typeof V=="object"&&V!==null&&V.type===C&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case j:e:{for(var ke=V.key;O!==null;){if(O.key===ke){if(ke=V.type,ke===C){if(O.tag===7){a(B,O.sibling),se=r(O,V.props.children),se.return=B,B=se;break e}}else if(O.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===L&&El(ke)===O.type){a(B,O.sibling),se=r(O,V.props),Ms(se,V),se.return=B,B=se;break e}a(B,O);break}else t(B,O);O=O.sibling}V.type===C?(se=xl(V.props.children,B.mode,se,V.key),se.return=B,B=se):(se=Io(V.type,V.key,V.props,null,B.mode,se),Ms(se,V),se.return=B,B=se)}return y(B);case T:e:{for(ke=V.key;O!==null;){if(O.key===ke)if(O.tag===4&&O.stateNode.containerInfo===V.containerInfo&&O.stateNode.implementation===V.implementation){a(B,O.sibling),se=r(O,V.children||[]),se.return=B,B=se;break e}else{a(B,O);break}else t(B,O);O=O.sibling}se=Vc(V,B.mode,se),se.return=B,B=se}return y(B);case L:return V=El(V),et(B,O,V,se)}if($(V))return _e(B,O,V,se);if(ie(V)){if(ke=ie(V),typeof ke!="function")throw Error(o(150));return V=ke.call(V),Ce(B,O,V,se)}if(typeof V.then=="function")return et(B,O,Fo(V),se);if(V.$$typeof===z)return et(B,O,Yo(B,V),se);Zo(B,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,O!==null&&O.tag===6?(a(B,O.sibling),se=r(O,V),se.return=B,B=se):(a(B,O),se=Qc(V,B.mode,se),se.return=B,B=se),y(B)):a(B,O)}return function(B,O,V,se){try{js=0;var ke=et(B,O,V,se);return Mi=null,ke}catch(we){if(we===ji||we===$o)throw we;var Ke=nn(29,we,null,B.mode);return Ke.lanes=se,Ke.return=B,Ke}finally{}}}var Ml=Tm(!0),Om=Tm(!1),Aa=!1;function nu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function au(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Na(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ta(e,t,a){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(Xe&2)!==0){var r=i.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),i.pending=t,t=Go(e),pm(e,null,a),t}return qo(e,i,t,a),Go(e)}function Cs(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,Sh(e,a)}}function lu(e,t){var a=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,a===i)){var r=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?r=c=y:c=c.next=y,a=a.next}while(a!==null);c===null?r=c=t:c=c.next=t}else r=c=t;a={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:c,shared:i.shared,callbacks:i.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var iu=!1;function As(){if(iu){var e=Ei;if(e!==null)throw e}}function Ns(e,t,a,i){iu=!1;var r=e.updateQueue;Aa=!1;var c=r.firstBaseUpdate,y=r.lastBaseUpdate,v=r.shared.pending;if(v!==null){r.shared.pending=null;var A=v,K=A.next;A.next=null,y===null?c=K:y.next=K,y=A;var ae=e.alternate;ae!==null&&(ae=ae.updateQueue,v=ae.lastBaseUpdate,v!==y&&(v===null?ae.firstBaseUpdate=K:v.next=K,ae.lastBaseUpdate=A))}if(c!==null){var oe=r.baseState;y=0,ae=K=A=null,v=c;do{var X=v.lane&-536870913,J=X!==v.lane;if(J?(Ge&X)===X:(i&X)===X){X!==0&&X===ki&&(iu=!0),ae!==null&&(ae=ae.next={lane:0,tag:v.tag,payload:v.payload,callback:null,next:null});e:{var _e=e,Ce=v;X=t;var et=a;switch(Ce.tag){case 1:if(_e=Ce.payload,typeof _e=="function"){oe=_e.call(et,oe,X);break e}oe=_e;break e;case 3:_e.flags=_e.flags&-65537|128;case 0:if(_e=Ce.payload,X=typeof _e=="function"?_e.call(et,oe,X):_e,X==null)break e;oe=b({},oe,X);break e;case 2:Aa=!0}}X=v.callback,X!==null&&(e.flags|=64,J&&(e.flags|=8192),J=r.callbacks,J===null?r.callbacks=[X]:J.push(X))}else J={lane:X,tag:v.tag,payload:v.payload,callback:v.callback,next:null},ae===null?(K=ae=J,A=oe):ae=ae.next=J,y|=X;if(v=v.next,v===null){if(v=r.shared.pending,v===null)break;J=v,v=J.next,J.next=null,r.lastBaseUpdate=J,r.shared.pending=null}}while(!0);ae===null&&(A=oe),r.baseState=A,r.firstBaseUpdate=K,r.lastBaseUpdate=ae,c===null&&(r.shared.lanes=0),Ua|=y,e.lanes=y,e.memoizedState=oe}}function Rm(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function zm(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Rm(a[e],t)}var Ci=S(null),Po=S(0);function Dm(e,t){e=oa,Y(Po,e),Y(Ci,t),oa=e|t.baseLanes}function su(){Y(Po,oa),Y(Ci,Ci.current)}function ou(){oa=Po.current,q(Ci),q(Po)}var an=S(null),_n=null;function Oa(e){var t=e.alternate;Y(yt,yt.current&1),Y(an,e),_n===null&&(t===null||Ci.current!==null||t.memoizedState!==null)&&(_n=e)}function ru(e){Y(yt,yt.current),Y(an,e),_n===null&&(_n=e)}function Um(e){e.tag===22?(Y(yt,yt.current),Y(an,e),_n===null&&(_n=e)):Ra()}function Ra(){Y(yt,yt.current),Y(an,an.current)}function ln(e){q(an),_n===e&&(_n=null),q(yt)}var yt=S(0);function Jo(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||md(a)||pd(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wn=0,Oe=null,Je=null,vt=null,Wo=!1,Ai=!1,Cl=!1,er=0,Ts=0,Ni=null,l2=0;function ut(){throw Error(o(321))}function cu(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!tn(e[a],t[a]))return!1;return!0}function uu(e,t,a,i,r,c){return Wn=c,Oe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,w.H=e===null||e.memoizedState===null?vp:Eu,Cl=!1,c=a(i,r),Cl=!1,Ai&&(c=Bm(t,a,i,r)),Lm(e),c}function Lm(e){w.H=zs;var t=Je!==null&&Je.next!==null;if(Wn=0,vt=Je=Oe=null,Wo=!1,Ts=0,Ni=null,t)throw Error(o(300));e===null||xt||(e=e.dependencies,e!==null&&Vo(e)&&(xt=!0))}function Bm(e,t,a,i){Oe=e;var r=0;do{if(Ai&&(Ni=null),Ts=0,Ai=!1,25<=r)throw Error(o(301));if(r+=1,vt=Je=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}w.H=xp,c=t(a,i)}while(Ai);return c}function i2(){var e=w.H,t=e.useState()[0];return t=typeof t.then=="function"?Os(t):t,e=e.useState()[0],(Je!==null?Je.memoizedState:null)!==e&&(Oe.flags|=1024),t}function du(){var e=er!==0;return er=0,e}function fu(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function hu(e){if(Wo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Wo=!1}Wn=0,vt=Je=Oe=null,Ai=!1,Ts=er=0,Ni=null}function Gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return vt===null?Oe.memoizedState=vt=e:vt=vt.next=e,vt}function gt(){if(Je===null){var e=Oe.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var t=vt===null?Oe.memoizedState:vt.next;if(t!==null)vt=t,Je=e;else{if(e===null)throw Oe.alternate===null?Error(o(467)):Error(o(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},vt===null?Oe.memoizedState=vt=e:vt=vt.next=e}return vt}function tr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Os(e){var t=Ts;return Ts+=1,Ni===null&&(Ni=[]),e=Cm(Ni,e,t),t=Oe,(vt===null?t.memoizedState:vt.next)===null&&(t=t.alternate,w.H=t===null||t.memoizedState===null?vp:Eu),e}function nr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Os(e);if(e.$$typeof===z)return Nt(e)}throw Error(o(438,String(e)))}function mu(e){var t=null,a=Oe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var i=Oe.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=tr(),Oe.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),i=0;i<e;i++)a[i]=de;return t.index++,a}function ea(e,t){return typeof t=="function"?t(e):t}function ar(e){var t=gt();return pu(t,Je,e)}function pu(e,t,a){var i=e.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=a;var r=e.baseQueue,c=i.pending;if(c!==null){if(r!==null){var y=r.next;r.next=c.next,c.next=y}t.baseQueue=r=c,i.pending=null}if(c=e.baseState,r===null)e.memoizedState=c;else{t=r.next;var v=y=null,A=null,K=t,ae=!1;do{var oe=K.lane&-536870913;if(oe!==K.lane?(Ge&oe)===oe:(Wn&oe)===oe){var X=K.revertLane;if(X===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),oe===ki&&(ae=!0);else if((Wn&X)===X){K=K.next,X===ki&&(ae=!0);continue}else oe={lane:0,revertLane:K.revertLane,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},A===null?(v=A=oe,y=c):A=A.next=oe,Oe.lanes|=X,Ua|=X;oe=K.action,Cl&&a(c,oe),c=K.hasEagerState?K.eagerState:a(c,oe)}else X={lane:oe,revertLane:K.revertLane,gesture:K.gesture,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},A===null?(v=A=X,y=c):A=A.next=X,Oe.lanes|=oe,Ua|=oe;K=K.next}while(K!==null&&K!==t);if(A===null?y=c:A.next=v,!tn(c,e.memoizedState)&&(xt=!0,ae&&(a=Ei,a!==null)))throw a;e.memoizedState=c,e.baseState=y,e.baseQueue=A,i.lastRenderedState=c}return r===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function yu(e){var t=gt(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var i=a.dispatch,r=a.pending,c=t.memoizedState;if(r!==null){a.pending=null;var y=r=r.next;do c=e(c,y.action),y=y.next;while(y!==r);tn(c,t.memoizedState)||(xt=!0),t.memoizedState=c,t.baseQueue===null&&(t.baseState=c),a.lastRenderedState=c}return[c,i]}function Hm(e,t,a){var i=Oe,r=gt(),c=Qe;if(c){if(a===void 0)throw Error(o(407));a=a()}else a=t();var y=!tn((Je||r).memoizedState,a);if(y&&(r.memoizedState=a,xt=!0),r=r.queue,vu(Im.bind(null,i,r,e),[e]),r.getSnapshot!==t||y||vt!==null&&vt.memoizedState.tag&1){if(i.flags|=2048,Ti(9,{destroy:void 0},Gm.bind(null,i,r,a,t),null),tt===null)throw Error(o(349));c||(Wn&127)!==0||qm(i,t,a)}return a}function qm(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Oe.updateQueue,t===null?(t=tr(),Oe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Gm(e,t,a,i){t.value=a,t.getSnapshot=i,Qm(t)&&Vm(e)}function Im(e,t,a){return a(function(){Qm(t)&&Vm(e)})}function Qm(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!tn(e,a)}catch{return!0}}function Vm(e){var t=vl(e,2);t!==null&&Zt(t,e,2)}function gu(e){var t=Gt();if(typeof e=="function"){var a=e;if(e=a(),Cl){te(!0);try{a()}finally{te(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:e},t}function Ym(e,t,a,i){return e.baseState=a,pu(e,Je,typeof i=="function"?i:ea)}function s2(e,t,a,i,r){if(sr(e))throw Error(o(485));if(e=t.action,e!==null){var c={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){c.listeners.push(y)}};w.T!==null?a(!0):c.isTransition=!1,i(c),a=t.pending,a===null?(c.next=t.pending=c,Km(t,c)):(c.next=a.next,t.pending=a.next=c)}}function Km(e,t){var a=t.action,i=t.payload,r=e.state;if(t.isTransition){var c=w.T,y={};w.T=y;try{var v=a(r,i),A=w.S;A!==null&&A(y,v),$m(e,t,v)}catch(K){bu(e,t,K)}finally{c!==null&&y.types!==null&&(c.types=y.types),w.T=c}}else try{c=a(r,i),$m(e,t,c)}catch(K){bu(e,t,K)}}function $m(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(i){Xm(e,t,i)},function(i){return bu(e,t,i)}):Xm(e,t,a)}function Xm(e,t,a){t.status="fulfilled",t.value=a,Fm(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Km(e,a)))}function bu(e,t,a){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=a,Fm(t),t=t.next;while(t!==i)}e.action=null}function Fm(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Zm(e,t){return t}function Pm(e,t){if(Qe){var a=tt.formState;if(a!==null){e:{var i=Oe;if(Qe){if(at){t:{for(var r=at,c=xn;r.nodeType!==8;){if(!c){r=null;break t}if(r=wn(r.nextSibling),r===null){r=null;break t}}c=r.data,r=c==="F!"||c==="F"?r:null}if(r){at=wn(r.nextSibling),i=r.data==="F!";break e}}Ma(i)}i=!1}i&&(t=a[0])}}return a=Gt(),a.memoizedState=a.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zm,lastRenderedState:t},a.queue=i,a=yp.bind(null,Oe,i),i.dispatch=a,i=gu(!1),c=ku.bind(null,Oe,!1,i.queue),i=Gt(),r={state:t,dispatch:null,action:e,pending:null},i.queue=r,a=s2.bind(null,Oe,r,c,a),r.dispatch=a,i.memoizedState=e,[t,a,!1]}function Jm(e){var t=gt();return Wm(t,Je,e)}function Wm(e,t,a){if(t=pu(e,t,Zm)[0],e=ar(ea)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=Os(t)}catch(y){throw y===ji?$o:y}else i=t;t=gt();var r=t.queue,c=r.dispatch;return a!==t.memoizedState&&(Oe.flags|=2048,Ti(9,{destroy:void 0},o2.bind(null,r,a),null)),[i,c,e]}function o2(e,t){e.action=t}function ep(e){var t=gt(),a=Je;if(a!==null)return Wm(t,a,e);gt(),t=t.memoizedState,a=gt();var i=a.queue.dispatch;return a.memoizedState=e,[t,i,!1]}function Ti(e,t,a,i){return e={tag:e,create:a,deps:i,inst:t,next:null},t=Oe.updateQueue,t===null&&(t=tr(),Oe.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(i=a.next,a.next=e,e.next=i,t.lastEffect=e),e}function tp(){return gt().memoizedState}function lr(e,t,a,i){var r=Gt();Oe.flags|=e,r.memoizedState=Ti(1|t,{destroy:void 0},a,i===void 0?null:i)}function ir(e,t,a,i){var r=gt();i=i===void 0?null:i;var c=r.memoizedState.inst;Je!==null&&i!==null&&cu(i,Je.memoizedState.deps)?r.memoizedState=Ti(t,c,a,i):(Oe.flags|=e,r.memoizedState=Ti(1|t,c,a,i))}function np(e,t){lr(8390656,8,e,t)}function vu(e,t){ir(2048,8,e,t)}function r2(e){Oe.flags|=4;var t=Oe.updateQueue;if(t===null)t=tr(),Oe.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function ap(e){var t=gt().memoizedState;return r2({ref:t,nextImpl:e}),function(){if((Xe&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function lp(e,t){return ir(4,2,e,t)}function ip(e,t){return ir(4,4,e,t)}function sp(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function op(e,t,a){a=a!=null?a.concat([e]):null,ir(4,4,sp.bind(null,t,e),a)}function xu(){}function rp(e,t){var a=gt();t=t===void 0?null:t;var i=a.memoizedState;return t!==null&&cu(t,i[1])?i[0]:(a.memoizedState=[e,t],e)}function cp(e,t){var a=gt();t=t===void 0?null:t;var i=a.memoizedState;if(t!==null&&cu(t,i[1]))return i[0];if(i=e(),Cl){te(!0);try{e()}finally{te(!1)}}return a.memoizedState=[i,t],i}function _u(e,t,a){return a===void 0||(Wn&1073741824)!==0&&(Ge&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=uy(),Oe.lanes|=e,Ua|=e,a)}function up(e,t,a,i){return tn(a,t)?a:Ci.current!==null?(e=_u(e,a,i),tn(e,t)||(xt=!0),e):(Wn&42)===0||(Wn&1073741824)!==0&&(Ge&261930)===0?(xt=!0,e.memoizedState=a):(e=uy(),Oe.lanes|=e,Ua|=e,t)}function dp(e,t,a,i,r){var c=F.p;F.p=c!==0&&8>c?c:8;var y=w.T,v={};w.T=v,ku(e,!1,t,a);try{var A=r(),K=w.S;if(K!==null&&K(v,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var ae=a2(A,i);Rs(e,t,ae,rn(e))}else Rs(e,t,i,rn(e))}catch(oe){Rs(e,t,{then:function(){},status:"rejected",reason:oe},rn())}finally{F.p=c,y!==null&&v.types!==null&&(y.types=v.types),w.T=y}}function c2(){}function wu(e,t,a,i){if(e.tag!==5)throw Error(o(476));var r=fp(e).queue;dp(e,r,t,ce,a===null?c2:function(){return hp(e),a(i)})}function fp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:ce},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ea,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function hp(e){var t=fp(e);t.next===null&&(t=e.alternate.memoizedState),Rs(e,t.next.queue,{},rn())}function Su(){return Nt(Zs)}function mp(){return gt().memoizedState}function pp(){return gt().memoizedState}function u2(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=rn();e=Na(a);var i=Ta(t,e,a);i!==null&&(Zt(i,t,a),Cs(i,t,a)),t={cache:Jc()},e.payload=t;return}t=t.return}}function d2(e,t,a){var i=rn();a={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},sr(e)?gp(t,a):(a=Gc(e,t,a,i),a!==null&&(Zt(a,e,i),bp(a,t,i)))}function yp(e,t,a){var i=rn();Rs(e,t,a,i)}function Rs(e,t,a,i){var r={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(sr(e))gp(t,r);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=t.lastRenderedReducer,c!==null))try{var y=t.lastRenderedState,v=c(y,a);if(r.hasEagerState=!0,r.eagerState=v,tn(v,y))return qo(e,t,r,0),tt===null&&Ho(),!1}catch{}finally{}if(a=Gc(e,t,r,i),a!==null)return Zt(a,e,i),bp(a,t,i),!0}return!1}function ku(e,t,a,i){if(i={lane:2,revertLane:nd(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},sr(e)){if(t)throw Error(o(479))}else t=Gc(e,a,i,2),t!==null&&Zt(t,e,2)}function sr(e){var t=e.alternate;return e===Oe||t!==null&&t===Oe}function gp(e,t){Ai=Wo=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function bp(e,t,a){if((a&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,Sh(e,a)}}var zs={readContext:Nt,use:nr,useCallback:ut,useContext:ut,useEffect:ut,useImperativeHandle:ut,useLayoutEffect:ut,useInsertionEffect:ut,useMemo:ut,useReducer:ut,useRef:ut,useState:ut,useDebugValue:ut,useDeferredValue:ut,useTransition:ut,useSyncExternalStore:ut,useId:ut,useHostTransitionStatus:ut,useFormState:ut,useActionState:ut,useOptimistic:ut,useMemoCache:ut,useCacheRefresh:ut};zs.useEffectEvent=ut;var vp={readContext:Nt,use:nr,useCallback:function(e,t){return Gt().memoizedState=[e,t===void 0?null:t],e},useContext:Nt,useEffect:np,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,lr(4194308,4,sp.bind(null,t,e),a)},useLayoutEffect:function(e,t){return lr(4194308,4,e,t)},useInsertionEffect:function(e,t){lr(4,2,e,t)},useMemo:function(e,t){var a=Gt();t=t===void 0?null:t;var i=e();if(Cl){te(!0);try{e()}finally{te(!1)}}return a.memoizedState=[i,t],i},useReducer:function(e,t,a){var i=Gt();if(a!==void 0){var r=a(t);if(Cl){te(!0);try{a(t)}finally{te(!1)}}}else r=t;return i.memoizedState=i.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},i.queue=e,e=e.dispatch=d2.bind(null,Oe,e),[i.memoizedState,e]},useRef:function(e){var t=Gt();return e={current:e},t.memoizedState=e},useState:function(e){e=gu(e);var t=e.queue,a=yp.bind(null,Oe,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:xu,useDeferredValue:function(e,t){var a=Gt();return _u(a,e,t)},useTransition:function(){var e=gu(!1);return e=dp.bind(null,Oe,e.queue,!0,!1),Gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var i=Oe,r=Gt();if(Qe){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),tt===null)throw Error(o(349));(Ge&127)!==0||qm(i,t,a)}r.memoizedState=a;var c={value:a,getSnapshot:t};return r.queue=c,np(Im.bind(null,i,c,e),[e]),i.flags|=2048,Ti(9,{destroy:void 0},Gm.bind(null,i,c,a,t),null),a},useId:function(){var e=Gt(),t=tt.identifierPrefix;if(Qe){var a=zn,i=Rn;a=(i&~(1<<32-he(i)-1)).toString(32)+a,t="_"+t+"R_"+a,a=er++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=l2++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Su,useFormState:Pm,useActionState:Pm,useOptimistic:function(e){var t=Gt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=ku.bind(null,Oe,!0,a),a.dispatch=t,[e,t]},useMemoCache:mu,useCacheRefresh:function(){return Gt().memoizedState=u2.bind(null,Oe)},useEffectEvent:function(e){var t=Gt(),a={impl:e};return t.memoizedState=a,function(){if((Xe&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},Eu={readContext:Nt,use:nr,useCallback:rp,useContext:Nt,useEffect:vu,useImperativeHandle:op,useInsertionEffect:lp,useLayoutEffect:ip,useMemo:cp,useReducer:ar,useRef:tp,useState:function(){return ar(ea)},useDebugValue:xu,useDeferredValue:function(e,t){var a=gt();return up(a,Je.memoizedState,e,t)},useTransition:function(){var e=ar(ea)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:Os(e),t]},useSyncExternalStore:Hm,useId:mp,useHostTransitionStatus:Su,useFormState:Jm,useActionState:Jm,useOptimistic:function(e,t){var a=gt();return Ym(a,Je,e,t)},useMemoCache:mu,useCacheRefresh:pp};Eu.useEffectEvent=ap;var xp={readContext:Nt,use:nr,useCallback:rp,useContext:Nt,useEffect:vu,useImperativeHandle:op,useInsertionEffect:lp,useLayoutEffect:ip,useMemo:cp,useReducer:yu,useRef:tp,useState:function(){return yu(ea)},useDebugValue:xu,useDeferredValue:function(e,t){var a=gt();return Je===null?_u(a,e,t):up(a,Je.memoizedState,e,t)},useTransition:function(){var e=yu(ea)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:Os(e),t]},useSyncExternalStore:Hm,useId:mp,useHostTransitionStatus:Su,useFormState:ep,useActionState:ep,useOptimistic:function(e,t){var a=gt();return Je!==null?Ym(a,Je,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:mu,useCacheRefresh:pp};xp.useEffectEvent=ap;function ju(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:b({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Mu={enqueueSetState:function(e,t,a){e=e._reactInternals;var i=rn(),r=Na(i);r.payload=t,a!=null&&(r.callback=a),t=Ta(e,r,i),t!==null&&(Zt(t,e,i),Cs(t,e,i))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=rn(),r=Na(i);r.tag=1,r.payload=t,a!=null&&(r.callback=a),t=Ta(e,r,i),t!==null&&(Zt(t,e,i),Cs(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=rn(),i=Na(a);i.tag=2,t!=null&&(i.callback=t),t=Ta(e,i,a),t!==null&&(Zt(t,e,a),Cs(t,e,a))}};function _p(e,t,a,i,r,c,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,c,y):t.prototype&&t.prototype.isPureReactComponent?!xs(a,i)||!xs(r,c):!0}function wp(e,t,a,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,i),t.state!==e&&Mu.enqueueReplaceState(t,t.state,null)}function Al(e,t){var a=t;if("ref"in t){a={};for(var i in t)i!=="ref"&&(a[i]=t[i])}if(e=e.defaultProps){a===t&&(a=b({},a));for(var r in e)a[r]===void 0&&(a[r]=e[r])}return a}function Sp(e){Bo(e)}function kp(e){console.error(e)}function Ep(e){Bo(e)}function or(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function jp(e,t,a){try{var i=e.onCaughtError;i(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Cu(e,t,a){return a=Na(a),a.tag=3,a.payload={element:null},a.callback=function(){or(e,t)},a}function Mp(e){return e=Na(e),e.tag=3,e}function Cp(e,t,a,i){var r=a.type.getDerivedStateFromError;if(typeof r=="function"){var c=i.value;e.payload=function(){return r(c)},e.callback=function(){jp(t,a,i)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){jp(t,a,i),typeof r!="function"&&(La===null?La=new Set([this]):La.add(this));var v=i.stack;this.componentDidCatch(i.value,{componentStack:v!==null?v:""})})}function f2(e,t,a,i,r){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=a.alternate,t!==null&&Si(t,a,r,!0),a=an.current,a!==null){switch(a.tag){case 31:case 13:return _n===null?vr():a.alternate===null&&dt===0&&(dt=3),a.flags&=-257,a.flags|=65536,a.lanes=r,i===Xo?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([i]):t.add(i),Wu(e,i,r)),!1;case 22:return a.flags|=65536,i===Xo?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([i]):a.add(i)),Wu(e,i,r)),!1}throw Error(o(435,a.tag))}return Wu(e,i,r),vr(),!1}if(Qe)return t=an.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,i!==$c&&(e=Error(o(422),{cause:i}),Ss(gn(e,a)))):(i!==$c&&(t=Error(o(423),{cause:i}),Ss(gn(t,a))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,i=gn(i,a),r=Cu(e.stateNode,i,r),lu(e,r),dt!==4&&(dt=2)),!1;var c=Error(o(520),{cause:i});if(c=gn(c,a),Is===null?Is=[c]:Is.push(c),dt!==4&&(dt=2),t===null)return!0;i=gn(i,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=r&-r,a.lanes|=e,e=Cu(a.stateNode,i,e),lu(a,e),!1;case 1:if(t=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(La===null||!La.has(c))))return a.flags|=65536,r&=-r,a.lanes|=r,r=Mp(r),Cp(r,e,a,i),lu(a,r),!1}a=a.return}while(a!==null);return!1}var Au=Error(o(461)),xt=!1;function Tt(e,t,a,i){t.child=e===null?Om(t,null,a,i):Ml(t,e.child,a,i)}function Ap(e,t,a,i,r){a=a.render;var c=t.ref;if("ref"in i){var y={};for(var v in i)v!=="ref"&&(y[v]=i[v])}else y=i;return Sl(t),i=uu(e,t,a,y,c,r),v=du(),e!==null&&!xt?(fu(e,t,r),ta(e,t,r)):(Qe&&v&&Yc(t),t.flags|=1,Tt(e,t,i,r),t.child)}function Np(e,t,a,i,r){if(e===null){var c=a.type;return typeof c=="function"&&!Ic(c)&&c.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=c,Tp(e,t,c,i,r)):(e=Io(a.type,null,i,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(c=e.child,!Lu(e,r)){var y=c.memoizedProps;if(a=a.compare,a=a!==null?a:xs,a(y,i)&&e.ref===t.ref)return ta(e,t,r)}return t.flags|=1,e=Fn(c,i),e.ref=t.ref,e.return=t,t.child=e}function Tp(e,t,a,i,r){if(e!==null){var c=e.memoizedProps;if(xs(c,i)&&e.ref===t.ref)if(xt=!1,t.pendingProps=i=c,Lu(e,r))(e.flags&131072)!==0&&(xt=!0);else return t.lanes=e.lanes,ta(e,t,r)}return Nu(e,t,a,i,r)}function Op(e,t,a,i){var r=i.children,c=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((t.flags&128)!==0){if(c=c!==null?c.baseLanes|a:a,e!==null){for(i=t.child=e.child,r=0;i!==null;)r=r|i.lanes|i.childLanes,i=i.sibling;i=r&~c}else i=0,t.child=null;return Rp(e,t,c,a,i)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ko(t,c!==null?c.cachePool:null),c!==null?Dm(t,c):su(),Um(t);else return i=t.lanes=536870912,Rp(e,t,c!==null?c.baseLanes|a:a,a,i)}else c!==null?(Ko(t,c.cachePool),Dm(t,c),Ra(),t.memoizedState=null):(e!==null&&Ko(t,null),su(),Ra());return Tt(e,t,r,a),t.child}function Ds(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Rp(e,t,a,i,r){var c=eu();return c=c===null?null:{parent:bt._currentValue,pool:c},t.memoizedState={baseLanes:a,cachePool:c},e!==null&&Ko(t,null),su(),Um(t),e!==null&&Si(e,t,i,!0),t.childLanes=r,null}function rr(e,t){return t=ur({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function zp(e,t,a){return Ml(t,e.child,null,a),e=rr(t,t.pendingProps),e.flags|=2,ln(t),t.memoizedState=null,e}function h2(e,t,a){var i=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Qe){if(i.mode==="hidden")return e=rr(t,i),t.lanes=536870912,Ds(null,e);if(ru(t),(e=at)?(e=Ky(e,xn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ea!==null?{id:Rn,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},a=gm(e),a.return=t,t.child=a,At=t,at=null)):e=null,e===null)throw Ma(t);return t.lanes=536870912,null}return rr(t,i)}var c=e.memoizedState;if(c!==null){var y=c.dehydrated;if(ru(t),r)if(t.flags&256)t.flags&=-257,t=zp(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(xt||Si(e,t,a,!1),r=(a&e.childLanes)!==0,xt||r){if(i=tt,i!==null&&(y=kh(i,a),y!==0&&y!==c.retryLane))throw c.retryLane=y,vl(e,y),Zt(i,e,y),Au;vr(),t=zp(e,t,a)}else e=c.treeContext,at=wn(y.nextSibling),At=t,Qe=!0,ja=null,xn=!1,e!==null&&xm(t,e),t=rr(t,i),t.flags|=4096;return t}return e=Fn(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function cr(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Nu(e,t,a,i,r){return Sl(t),a=uu(e,t,a,i,void 0,r),i=du(),e!==null&&!xt?(fu(e,t,r),ta(e,t,r)):(Qe&&i&&Yc(t),t.flags|=1,Tt(e,t,a,r),t.child)}function Dp(e,t,a,i,r,c){return Sl(t),t.updateQueue=null,a=Bm(t,i,a,r),Lm(e),i=du(),e!==null&&!xt?(fu(e,t,c),ta(e,t,c)):(Qe&&i&&Yc(t),t.flags|=1,Tt(e,t,a,c),t.child)}function Up(e,t,a,i,r){if(Sl(t),t.stateNode===null){var c=vi,y=a.contextType;typeof y=="object"&&y!==null&&(c=Nt(y)),c=new a(i,c),t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Mu,t.stateNode=c,c._reactInternals=t,c=t.stateNode,c.props=i,c.state=t.memoizedState,c.refs={},nu(t),y=a.contextType,c.context=typeof y=="object"&&y!==null?Nt(y):vi,c.state=t.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(ju(t,a,y,i),c.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(y=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),y!==c.state&&Mu.enqueueReplaceState(c,c.state,null),Ns(t,i,c,r),As(),c.state=t.memoizedState),typeof c.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){c=t.stateNode;var v=t.memoizedProps,A=Al(a,v);c.props=A;var K=c.context,ae=a.contextType;y=vi,typeof ae=="object"&&ae!==null&&(y=Nt(ae));var oe=a.getDerivedStateFromProps;ae=typeof oe=="function"||typeof c.getSnapshotBeforeUpdate=="function",v=t.pendingProps!==v,ae||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(v||K!==y)&&wp(t,c,i,y),Aa=!1;var X=t.memoizedState;c.state=X,Ns(t,i,c,r),As(),K=t.memoizedState,v||X!==K||Aa?(typeof oe=="function"&&(ju(t,a,oe,i),K=t.memoizedState),(A=Aa||_p(t,a,A,i,X,K,y))?(ae||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(t.flags|=4194308)):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=K),c.props=i,c.state=K,c.context=y,i=A):(typeof c.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{c=t.stateNode,au(e,t),y=t.memoizedProps,ae=Al(a,y),c.props=ae,oe=t.pendingProps,X=c.context,K=a.contextType,A=vi,typeof K=="object"&&K!==null&&(A=Nt(K)),v=a.getDerivedStateFromProps,(K=typeof v=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(y!==oe||X!==A)&&wp(t,c,i,A),Aa=!1,X=t.memoizedState,c.state=X,Ns(t,i,c,r),As();var J=t.memoizedState;y!==oe||X!==J||Aa||e!==null&&e.dependencies!==null&&Vo(e.dependencies)?(typeof v=="function"&&(ju(t,a,v,i),J=t.memoizedState),(ae=Aa||_p(t,a,ae,i,X,J,A)||e!==null&&e.dependencies!==null&&Vo(e.dependencies))?(K||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(i,J,A),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(i,J,A)),typeof c.componentDidUpdate=="function"&&(t.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof c.componentDidUpdate!="function"||y===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=J),c.props=i,c.state=J,c.context=A,i=ae):(typeof c.componentDidUpdate!="function"||y===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),i=!1)}return c=i,cr(e,t),i=(t.flags&128)!==0,c||i?(c=t.stateNode,a=i&&typeof a.getDerivedStateFromError!="function"?null:c.render(),t.flags|=1,e!==null&&i?(t.child=Ml(t,e.child,null,r),t.child=Ml(t,null,a,r)):Tt(e,t,a,r),t.memoizedState=c.state,e=t.child):e=ta(e,t,r),e}function Lp(e,t,a,i){return _l(),t.flags|=256,Tt(e,t,a,i),t.child}var Tu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ou(e){return{baseLanes:e,cachePool:jm()}}function Ru(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=on),e}function Bp(e,t,a){var i=t.pendingProps,r=!1,c=(t.flags&128)!==0,y;if((y=c)||(y=e!==null&&e.memoizedState===null?!1:(yt.current&2)!==0),y&&(r=!0,t.flags&=-129),y=(t.flags&32)!==0,t.flags&=-33,e===null){if(Qe){if(r?Oa(t):Ra(),(e=at)?(e=Ky(e,xn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ea!==null?{id:Rn,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},a=gm(e),a.return=t,t.child=a,At=t,at=null)):e=null,e===null)throw Ma(t);return pd(e)?t.lanes=32:t.lanes=536870912,null}var v=i.children;return i=i.fallback,r?(Ra(),r=t.mode,v=ur({mode:"hidden",children:v},r),i=xl(i,r,a,null),v.return=t,i.return=t,v.sibling=i,t.child=v,i=t.child,i.memoizedState=Ou(a),i.childLanes=Ru(e,y,a),t.memoizedState=Tu,Ds(null,i)):(Oa(t),zu(t,v))}var A=e.memoizedState;if(A!==null&&(v=A.dehydrated,v!==null)){if(c)t.flags&256?(Oa(t),t.flags&=-257,t=Du(e,t,a)):t.memoizedState!==null?(Ra(),t.child=e.child,t.flags|=128,t=null):(Ra(),v=i.fallback,r=t.mode,i=ur({mode:"visible",children:i.children},r),v=xl(v,r,a,null),v.flags|=2,i.return=t,v.return=t,i.sibling=v,t.child=i,Ml(t,e.child,null,a),i=t.child,i.memoizedState=Ou(a),i.childLanes=Ru(e,y,a),t.memoizedState=Tu,t=Ds(null,i));else if(Oa(t),pd(v)){if(y=v.nextSibling&&v.nextSibling.dataset,y)var K=y.dgst;y=K,i=Error(o(419)),i.stack="",i.digest=y,Ss({value:i,source:null,stack:null}),t=Du(e,t,a)}else if(xt||Si(e,t,a,!1),y=(a&e.childLanes)!==0,xt||y){if(y=tt,y!==null&&(i=kh(y,a),i!==0&&i!==A.retryLane))throw A.retryLane=i,vl(e,i),Zt(y,e,i),Au;md(v)||vr(),t=Du(e,t,a)}else md(v)?(t.flags|=192,t.child=e.child,t=null):(e=A.treeContext,at=wn(v.nextSibling),At=t,Qe=!0,ja=null,xn=!1,e!==null&&xm(t,e),t=zu(t,i.children),t.flags|=4096);return t}return r?(Ra(),v=i.fallback,r=t.mode,A=e.child,K=A.sibling,i=Fn(A,{mode:"hidden",children:i.children}),i.subtreeFlags=A.subtreeFlags&65011712,K!==null?v=Fn(K,v):(v=xl(v,r,a,null),v.flags|=2),v.return=t,i.return=t,i.sibling=v,t.child=i,Ds(null,i),i=t.child,v=e.child.memoizedState,v===null?v=Ou(a):(r=v.cachePool,r!==null?(A=bt._currentValue,r=r.parent!==A?{parent:A,pool:A}:r):r=jm(),v={baseLanes:v.baseLanes|a,cachePool:r}),i.memoizedState=v,i.childLanes=Ru(e,y,a),t.memoizedState=Tu,Ds(e.child,i)):(Oa(t),a=e.child,e=a.sibling,a=Fn(a,{mode:"visible",children:i.children}),a.return=t,a.sibling=null,e!==null&&(y=t.deletions,y===null?(t.deletions=[e],t.flags|=16):y.push(e)),t.child=a,t.memoizedState=null,a)}function zu(e,t){return t=ur({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ur(e,t){return e=nn(22,e,null,t),e.lanes=0,e}function Du(e,t,a){return Ml(t,e.child,null,a),e=zu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Hp(e,t,a){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Zc(e.return,t,a)}function Uu(e,t,a,i,r,c){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:r,treeForkCount:c}:(y.isBackwards=t,y.rendering=null,y.renderingStartTime=0,y.last=i,y.tail=a,y.tailMode=r,y.treeForkCount=c)}function qp(e,t,a){var i=t.pendingProps,r=i.revealOrder,c=i.tail;i=i.children;var y=yt.current,v=(y&2)!==0;if(v?(y=y&1|2,t.flags|=128):y&=1,Y(yt,y),Tt(e,t,i,a),i=Qe?ws:0,!v&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Hp(e,a,t);else if(e.tag===19)Hp(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(a=t.child,r=null;a!==null;)e=a.alternate,e!==null&&Jo(e)===null&&(r=a),a=a.sibling;a=r,a===null?(r=t.child,t.child=null):(r=a.sibling,a.sibling=null),Uu(t,!1,r,a,c,i);break;case"backwards":case"unstable_legacy-backwards":for(a=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Jo(e)===null){t.child=r;break}e=r.sibling,r.sibling=a,a=r,r=e}Uu(t,!0,a,null,c,i);break;case"together":Uu(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function ta(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ua|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Si(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=Fn(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Fn(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Lu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Vo(e)))}function m2(e,t,a){switch(t.tag){case 3:pe(t,t.stateNode.containerInfo),Ca(t,bt,e.memoizedState.cache),_l();break;case 27:case 5:Ee(t);break;case 4:pe(t,t.stateNode.containerInfo);break;case 10:Ca(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ru(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Oa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Bp(e,t,a):(Oa(t),e=ta(e,t,a),e!==null?e.sibling:null);Oa(t);break;case 19:var r=(e.flags&128)!==0;if(i=(a&t.childLanes)!==0,i||(Si(e,t,a,!1),i=(a&t.childLanes)!==0),r){if(i)return qp(e,t,a);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Y(yt,yt.current),i)break;return null;case 22:return t.lanes=0,Op(e,t,a,t.pendingProps);case 24:Ca(t,bt,e.memoizedState.cache)}return ta(e,t,a)}function Gp(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)xt=!0;else{if(!Lu(e,a)&&(t.flags&128)===0)return xt=!1,m2(e,t,a);xt=(e.flags&131072)!==0}else xt=!1,Qe&&(t.flags&1048576)!==0&&vm(t,ws,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=El(t.elementType),t.type=e,typeof e=="function")Ic(e)?(i=Al(e,i),t.tag=1,t=Up(null,t,e,i,a)):(t.tag=0,t=Nu(null,t,e,i,a));else{if(e!=null){var r=e.$$typeof;if(r===I){t.tag=11,t=Ap(null,t,e,i,a);break e}else if(r===W){t.tag=14,t=Np(null,t,e,i,a);break e}}throw t=H(e)||e,Error(o(306,t,""))}}return t;case 0:return Nu(e,t,t.type,t.pendingProps,a);case 1:return i=t.type,r=Al(i,t.pendingProps),Up(e,t,i,r,a);case 3:e:{if(pe(t,t.stateNode.containerInfo),e===null)throw Error(o(387));i=t.pendingProps;var c=t.memoizedState;r=c.element,au(e,t),Ns(t,i,null,a);var y=t.memoizedState;if(i=y.cache,Ca(t,bt,i),i!==c.cache&&Pc(t,[bt],a,!0),As(),i=y.element,c.isDehydrated)if(c={element:i,isDehydrated:!1,cache:y.cache},t.updateQueue.baseState=c,t.memoizedState=c,t.flags&256){t=Lp(e,t,i,a);break e}else if(i!==r){r=gn(Error(o(424)),t),Ss(r),t=Lp(e,t,i,a);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(at=wn(e.firstChild),At=t,Qe=!0,ja=null,xn=!0,a=Om(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(_l(),i===r){t=ta(e,t,a);break e}Tt(e,t,i,a)}t=t.child}return t;case 26:return cr(e,t),e===null?(a=Jy(t.type,null,t.pendingProps,null))?t.memoizedState=a:Qe||(a=t.type,e=t.pendingProps,i=jr(Q.current).createElement(a),i[Ct]=t,i[Vt]=e,Ot(i,a,e),Et(i),t.stateNode=i):t.memoizedState=Jy(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ee(t),e===null&&Qe&&(i=t.stateNode=Fy(t.type,t.pendingProps,Q.current),At=t,xn=!0,r=at,Ga(t.type)?(yd=r,at=wn(i.firstChild)):at=r),Tt(e,t,t.pendingProps.children,a),cr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Qe&&((r=i=at)&&(i=V2(i,t.type,t.pendingProps,xn),i!==null?(t.stateNode=i,At=t,at=wn(i.firstChild),xn=!1,r=!0):r=!1),r||Ma(t)),Ee(t),r=t.type,c=t.pendingProps,y=e!==null?e.memoizedProps:null,i=c.children,dd(r,c)?i=null:y!==null&&dd(r,y)&&(t.flags|=32),t.memoizedState!==null&&(r=uu(e,t,i2,null,null,a),Zs._currentValue=r),cr(e,t),Tt(e,t,i,a),t.child;case 6:return e===null&&Qe&&((e=a=at)&&(a=Y2(a,t.pendingProps,xn),a!==null?(t.stateNode=a,At=t,at=null,e=!0):e=!1),e||Ma(t)),null;case 13:return Bp(e,t,a);case 4:return pe(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ml(t,null,i,a):Tt(e,t,i,a),t.child;case 11:return Ap(e,t,t.type,t.pendingProps,a);case 7:return Tt(e,t,t.pendingProps,a),t.child;case 8:return Tt(e,t,t.pendingProps.children,a),t.child;case 12:return Tt(e,t,t.pendingProps.children,a),t.child;case 10:return i=t.pendingProps,Ca(t,t.type,i.value),Tt(e,t,i.children,a),t.child;case 9:return r=t.type._context,i=t.pendingProps.children,Sl(t),r=Nt(r),i=i(r),t.flags|=1,Tt(e,t,i,a),t.child;case 14:return Np(e,t,t.type,t.pendingProps,a);case 15:return Tp(e,t,t.type,t.pendingProps,a);case 19:return qp(e,t,a);case 31:return h2(e,t,a);case 22:return Op(e,t,a,t.pendingProps);case 24:return Sl(t),i=Nt(bt),e===null?(r=eu(),r===null&&(r=tt,c=Jc(),r.pooledCache=c,c.refCount++,c!==null&&(r.pooledCacheLanes|=a),r=c),t.memoizedState={parent:i,cache:r},nu(t),Ca(t,bt,r)):((e.lanes&a)!==0&&(au(e,t),Ns(t,null,null,a),As()),r=e.memoizedState,c=t.memoizedState,r.parent!==i?(r={parent:i,cache:i},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Ca(t,bt,i)):(i=c.cache,Ca(t,bt,i),i!==r.cache&&Pc(t,[bt],a,!0))),Tt(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function na(e){e.flags|=4}function Bu(e,t,a,i,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(my())e.flags|=8192;else throw jl=Xo,tu}else e.flags&=-16777217}function Ip(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!ag(t))if(my())e.flags|=8192;else throw jl=Xo,tu}function dr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?jn():536870912,e.lanes|=t,Di|=t)}function Us(e,t){if(!Qe)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function lt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(t)for(var r=e.child;r!==null;)a|=r.lanes|r.childLanes,i|=r.subtreeFlags&65011712,i|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)a|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=i,e.childLanes=a,t}function p2(e,t,a){var i=t.pendingProps;switch(Kc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return lt(t),null;case 1:return lt(t),null;case 3:return a=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Jn(bt),ge(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(wi(t)?na(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Xc())),lt(t),null;case 26:var r=t.type,c=t.memoizedState;return e===null?(na(t),c!==null?(lt(t),Ip(t,c)):(lt(t),Bu(t,r,null,i,a))):c?c!==e.memoizedState?(na(t),lt(t),Ip(t,c)):(lt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&na(t),lt(t),Bu(t,r,e,i,a)),null;case 27:if(Re(t),a=Q.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&na(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return lt(t),null}e=N.current,wi(t)?_m(t):(e=Fy(r,i,a),t.stateNode=e,na(t))}return lt(t),null;case 5:if(Re(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&na(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return lt(t),null}if(c=N.current,wi(t))_m(t);else{var y=jr(Q.current);switch(c){case 1:c=y.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:c=y.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":c=y.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":c=y.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":c=y.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof i.is=="string"?y.createElement("select",{is:i.is}):y.createElement("select"),i.multiple?c.multiple=!0:i.size&&(c.size=i.size);break;default:c=typeof i.is=="string"?y.createElement(r,{is:i.is}):y.createElement(r)}}c[Ct]=t,c[Vt]=i;e:for(y=t.child;y!==null;){if(y.tag===5||y.tag===6)c.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===t)break e;for(;y.sibling===null;){if(y.return===null||y.return===t)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}t.stateNode=c;e:switch(Ot(c,r,i),r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&na(t)}}return lt(t),Bu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&na(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(e=Q.current,wi(t)){if(e=t.stateNode,a=t.memoizedProps,i=null,r=At,r!==null)switch(r.tag){case 27:case 5:i=r.memoizedProps}e[Ct]=t,e=!!(e.nodeValue===a||i!==null&&i.suppressHydrationWarning===!0||By(e.nodeValue,a)),e||Ma(t,!0)}else e=jr(e).createTextNode(i),e[Ct]=t,t.stateNode=e}return lt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(i=wi(t),a!==null){if(e===null){if(!i)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Ct]=t}else _l(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),e=!1}else a=Xc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(ln(t),t):(ln(t),null);if((t.flags&128)!==0)throw Error(o(558))}return lt(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=wi(t),i!==null&&i.dehydrated!==null){if(e===null){if(!r)throw Error(o(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(o(317));r[Ct]=t}else _l(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;lt(t),r=!1}else r=Xc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(ln(t),t):(ln(t),null)}return ln(t),(t.flags&128)!==0?(t.lanes=a,t):(a=i!==null,e=e!==null&&e.memoizedState!==null,a&&(i=t.child,r=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(r=i.alternate.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==r&&(i.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),dr(t,t.updateQueue),lt(t),null);case 4:return ge(),e===null&&sd(t.stateNode.containerInfo),lt(t),null;case 10:return Jn(t.type),lt(t),null;case 19:if(q(yt),i=t.memoizedState,i===null)return lt(t),null;if(r=(t.flags&128)!==0,c=i.rendering,c===null)if(r)Us(i,!1);else{if(dt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(c=Jo(e),c!==null){for(t.flags|=128,Us(i,!1),e=c.updateQueue,t.updateQueue=e,dr(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)ym(a,e),a=a.sibling;return Y(yt,yt.current&1|2),Qe&&Zn(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&rt()>yr&&(t.flags|=128,r=!0,Us(i,!1),t.lanes=4194304)}else{if(!r)if(e=Jo(c),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,dr(t,e),Us(i,!0),i.tail===null&&i.tailMode==="hidden"&&!c.alternate&&!Qe)return lt(t),null}else 2*rt()-i.renderingStartTime>yr&&a!==536870912&&(t.flags|=128,r=!0,Us(i,!1),t.lanes=4194304);i.isBackwards?(c.sibling=t.child,t.child=c):(e=i.last,e!==null?e.sibling=c:t.child=c,i.last=c)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=rt(),e.sibling=null,a=yt.current,Y(yt,r?a&1|2:a&1),Qe&&Zn(t,i.treeForkCount),e):(lt(t),null);case 22:case 23:return ln(t),ou(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(a&536870912)!==0&&(t.flags&128)===0&&(lt(t),t.subtreeFlags&6&&(t.flags|=8192)):lt(t),a=t.updateQueue,a!==null&&dr(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==a&&(t.flags|=2048),e!==null&&q(kl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Jn(bt),lt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function y2(e,t){switch(Kc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jn(bt),ge(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Re(t),null;case 31:if(t.memoizedState!==null){if(ln(t),t.alternate===null)throw Error(o(340));_l()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ln(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));_l()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(yt),null;case 4:return ge(),null;case 10:return Jn(t.type),null;case 22:case 23:return ln(t),ou(),e!==null&&q(kl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Jn(bt),null;case 25:return null;default:return null}}function Qp(e,t){switch(Kc(t),t.tag){case 3:Jn(bt),ge();break;case 26:case 27:case 5:Re(t);break;case 4:ge();break;case 31:t.memoizedState!==null&&ln(t);break;case 13:ln(t);break;case 19:q(yt);break;case 10:Jn(t.type);break;case 22:case 23:ln(t),ou(),e!==null&&q(kl);break;case 24:Jn(bt)}}function Ls(e,t){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var r=i.next;a=r;do{if((a.tag&e)===e){i=void 0;var c=a.create,y=a.inst;i=c(),y.destroy=i}a=a.next}while(a!==r)}}catch(v){Pe(t,t.return,v)}}function za(e,t,a){try{var i=t.updateQueue,r=i!==null?i.lastEffect:null;if(r!==null){var c=r.next;i=c;do{if((i.tag&e)===e){var y=i.inst,v=y.destroy;if(v!==void 0){y.destroy=void 0,r=t;var A=a,K=v;try{K()}catch(ae){Pe(r,A,ae)}}}i=i.next}while(i!==c)}}catch(ae){Pe(t,t.return,ae)}}function Vp(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{zm(t,a)}catch(i){Pe(e,e.return,i)}}}function Yp(e,t,a){a.props=Al(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(i){Pe(e,t,i)}}function Bs(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof a=="function"?e.refCleanup=a(i):a.current=i}}catch(r){Pe(e,t,r)}}function Dn(e,t){var a=e.ref,i=e.refCleanup;if(a!==null)if(typeof i=="function")try{i()}catch(r){Pe(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(r){Pe(e,t,r)}else a.current=null}function Kp(e){var t=e.type,a=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&i.focus();break e;case"img":a.src?i.src=a.src:a.srcSet&&(i.srcset=a.srcSet)}}catch(r){Pe(e,e.return,r)}}function Hu(e,t,a){try{var i=e.stateNode;B2(i,e.type,a,t),i[Vt]=t}catch(r){Pe(e,e.return,r)}}function $p(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ga(e.type)||e.tag===4}function qu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||$p(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.tag===27&&Ga(e.type)||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 Gu(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=$n));else if(i!==4&&(i===27&&Ga(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Gu(e,t,a),e=e.sibling;e!==null;)Gu(e,t,a),e=e.sibling}function fr(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(i!==4&&(i===27&&Ga(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(fr(e,t,a),e=e.sibling;e!==null;)fr(e,t,a),e=e.sibling}function Xp(e){var t=e.stateNode,a=e.memoizedProps;try{for(var i=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Ot(t,i,a),t[Ct]=e,t[Vt]=a}catch(c){Pe(e,e.return,c)}}var aa=!1,_t=!1,Iu=!1,Fp=typeof WeakSet=="function"?WeakSet:Set,jt=null;function g2(e,t){if(e=e.containerInfo,cd=Rr,e=om(e),Dc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var i=a.getSelection&&a.getSelection();if(i&&i.rangeCount!==0){a=i.anchorNode;var r=i.anchorOffset,c=i.focusNode;i=i.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var y=0,v=-1,A=-1,K=0,ae=0,oe=e,X=null;t:for(;;){for(var J;oe!==a||r!==0&&oe.nodeType!==3||(v=y+r),oe!==c||i!==0&&oe.nodeType!==3||(A=y+i),oe.nodeType===3&&(y+=oe.nodeValue.length),(J=oe.firstChild)!==null;)X=oe,oe=J;for(;;){if(oe===e)break t;if(X===a&&++K===r&&(v=y),X===c&&++ae===i&&(A=y),(J=oe.nextSibling)!==null)break;oe=X,X=oe.parentNode}oe=J}a=v===-1||A===-1?null:{start:v,end:A}}else a=null}a=a||{start:0,end:0}}else a=null;for(ud={focusedElem:e,selectionRange:a},Rr=!1,jt=t;jt!==null;)if(t=jt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,jt=e;else for(;jt!==null;){switch(t=jt,c=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)r=e[a],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=t,r=c.memoizedProps,c=c.memoizedState,i=a.stateNode;try{var _e=Al(a.type,r);e=i.getSnapshotBeforeUpdate(_e,c),i.__reactInternalSnapshotBeforeUpdate=e}catch(Ce){Pe(a,a.return,Ce)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)hd(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":hd(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,jt=e;break}jt=t.return}}function Zp(e,t,a){var i=a.flags;switch(a.tag){case 0:case 11:case 15:ia(e,a),i&4&&Ls(5,a);break;case 1:if(ia(e,a),i&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(y){Pe(a,a.return,y)}else{var r=Al(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Pe(a,a.return,y)}}i&64&&Vp(a),i&512&&Bs(a,a.return);break;case 3:if(ia(e,a),i&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{zm(e,t)}catch(y){Pe(a,a.return,y)}}break;case 27:t===null&&i&4&&Xp(a);case 26:case 5:ia(e,a),t===null&&i&4&&Kp(a),i&512&&Bs(a,a.return);break;case 12:ia(e,a);break;case 31:ia(e,a),i&4&&Wp(e,a);break;case 13:ia(e,a),i&4&&ey(e,a),i&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=j2.bind(null,a),K2(e,a))));break;case 22:if(i=a.memoizedState!==null||aa,!i){t=t!==null&&t.memoizedState!==null||_t,r=aa;var c=_t;aa=i,(_t=t)&&!c?sa(e,a,(a.subtreeFlags&8772)!==0):ia(e,a),aa=r,_t=c}break;case 30:break;default:ia(e,a)}}function Pp(e){var t=e.alternate;t!==null&&(e.alternate=null,Pp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bc(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var st=null,Kt=!1;function la(e,t,a){for(a=a.child;a!==null;)Jp(e,t,a),a=a.sibling}function Jp(e,t,a){if(zt&&typeof zt.onCommitFiberUnmount=="function")try{zt.onCommitFiberUnmount(xa,a)}catch{}switch(a.tag){case 26:_t||Dn(a,t),la(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:_t||Dn(a,t);var i=st,r=Kt;Ga(a.type)&&(st=a.stateNode,Kt=!1),la(e,t,a),$s(a.stateNode),st=i,Kt=r;break;case 5:_t||Dn(a,t);case 6:if(i=st,r=Kt,st=null,la(e,t,a),st=i,Kt=r,st!==null)if(Kt)try{(st.nodeType===9?st.body:st.nodeName==="HTML"?st.ownerDocument.body:st).removeChild(a.stateNode)}catch(c){Pe(a,t,c)}else try{st.removeChild(a.stateNode)}catch(c){Pe(a,t,c)}break;case 18:st!==null&&(Kt?(e=st,Vy(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Qi(e)):Vy(st,a.stateNode));break;case 4:i=st,r=Kt,st=a.stateNode.containerInfo,Kt=!0,la(e,t,a),st=i,Kt=r;break;case 0:case 11:case 14:case 15:za(2,a,t),_t||za(4,a,t),la(e,t,a);break;case 1:_t||(Dn(a,t),i=a.stateNode,typeof i.componentWillUnmount=="function"&&Yp(a,t,i)),la(e,t,a);break;case 21:la(e,t,a);break;case 22:_t=(i=_t)||a.memoizedState!==null,la(e,t,a),_t=i;break;default:la(e,t,a)}}function Wp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Qi(e)}catch(a){Pe(t,t.return,a)}}}function ey(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Qi(e)}catch(a){Pe(t,t.return,a)}}function b2(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Fp),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Fp),t;default:throw Error(o(435,e.tag))}}function hr(e,t){var a=b2(e);t.forEach(function(i){if(!a.has(i)){a.add(i);var r=M2.bind(null,e,i);i.then(r,r)}})}function $t(e,t){var a=t.deletions;if(a!==null)for(var i=0;i<a.length;i++){var r=a[i],c=e,y=t,v=y;e:for(;v!==null;){switch(v.tag){case 27:if(Ga(v.type)){st=v.stateNode,Kt=!1;break e}break;case 5:st=v.stateNode,Kt=!1;break e;case 3:case 4:st=v.stateNode.containerInfo,Kt=!0;break e}v=v.return}if(st===null)throw Error(o(160));Jp(c,y,r),st=null,Kt=!1,c=r.alternate,c!==null&&(c.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ty(t,e),t=t.sibling}var Cn=null;function ty(e,t){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:$t(t,e),Xt(e),i&4&&(za(3,e,e.return),Ls(3,e),za(5,e,e.return));break;case 1:$t(t,e),Xt(e),i&512&&(_t||a===null||Dn(a,a.return)),i&64&&aa&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?i:a.concat(i))));break;case 26:var r=Cn;if($t(t,e),Xt(e),i&512&&(_t||a===null||Dn(a,a.return)),i&4){var c=a!==null?a.memoizedState:null;if(i=e.memoizedState,a===null)if(i===null)if(e.stateNode===null){e:{i=e.type,a=e.memoizedProps,r=r.ownerDocument||r;t:switch(i){case"title":c=r.getElementsByTagName("title")[0],(!c||c[ds]||c[Ct]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=r.createElement(i),r.head.insertBefore(c,r.querySelector("head > title"))),Ot(c,i,a),c[Ct]=e,Et(c),i=c;break e;case"link":var y=tg("link","href",r).get(i+(a.href||""));if(y){for(var v=0;v<y.length;v++)if(c=y[v],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(v,1);break t}}c=r.createElement(i),Ot(c,i,a),r.head.appendChild(c);break;case"meta":if(y=tg("meta","content",r).get(i+(a.content||""))){for(v=0;v<y.length;v++)if(c=y[v],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(v,1);break t}}c=r.createElement(i),Ot(c,i,a),r.head.appendChild(c);break;default:throw Error(o(468,i))}c[Ct]=e,Et(c),i=c}e.stateNode=i}else ng(r,e.type,e.stateNode);else e.stateNode=eg(r,i,e.memoizedProps);else c!==i?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,i===null?ng(r,e.type,e.stateNode):eg(r,i,e.memoizedProps)):i===null&&e.stateNode!==null&&Hu(e,e.memoizedProps,a.memoizedProps)}break;case 27:$t(t,e),Xt(e),i&512&&(_t||a===null||Dn(a,a.return)),a!==null&&i&4&&Hu(e,e.memoizedProps,a.memoizedProps);break;case 5:if($t(t,e),Xt(e),i&512&&(_t||a===null||Dn(a,a.return)),e.flags&32){r=e.stateNode;try{fi(r,"")}catch(_e){Pe(e,e.return,_e)}}i&4&&e.stateNode!=null&&(r=e.memoizedProps,Hu(e,r,a!==null?a.memoizedProps:r)),i&1024&&(Iu=!0);break;case 6:if($t(t,e),Xt(e),i&4){if(e.stateNode===null)throw Error(o(162));i=e.memoizedProps,a=e.stateNode;try{a.nodeValue=i}catch(_e){Pe(e,e.return,_e)}}break;case 3:if(Ar=null,r=Cn,Cn=Mr(t.containerInfo),$t(t,e),Cn=r,Xt(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{Qi(t.containerInfo)}catch(_e){Pe(e,e.return,_e)}Iu&&(Iu=!1,ny(e));break;case 4:i=Cn,Cn=Mr(e.stateNode.containerInfo),$t(t,e),Xt(e),Cn=i;break;case 12:$t(t,e),Xt(e);break;case 31:$t(t,e),Xt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,hr(e,i)));break;case 13:$t(t,e),Xt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(pr=rt()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,hr(e,i)));break;case 22:r=e.memoizedState!==null;var A=a!==null&&a.memoizedState!==null,K=aa,ae=_t;if(aa=K||r,_t=ae||A,$t(t,e),_t=ae,aa=K,Xt(e),i&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(a===null||A||aa||_t||Nl(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){A=a=t;try{if(c=A.stateNode,r)y=c.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{v=A.stateNode;var oe=A.memoizedProps.style,X=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;v.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(_e){Pe(A,A.return,_e)}}}else if(t.tag===6){if(a===null){A=t;try{A.stateNode.nodeValue=r?"":A.memoizedProps}catch(_e){Pe(A,A.return,_e)}}}else if(t.tag===18){if(a===null){A=t;try{var J=A.stateNode;r?Yy(J,!0):Yy(A.stateNode,!1)}catch(_e){Pe(A,A.return,_e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(a=i.retryQueue,a!==null&&(i.retryQueue=null,hr(e,a))));break;case 19:$t(t,e),Xt(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,hr(e,i)));break;case 30:break;case 21:break;default:$t(t,e),Xt(e)}}function Xt(e){var t=e.flags;if(t&2){try{for(var a,i=e.return;i!==null;){if($p(i)){a=i;break}i=i.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var r=a.stateNode,c=qu(e);fr(e,c,r);break;case 5:var y=a.stateNode;a.flags&32&&(fi(y,""),a.flags&=-33);var v=qu(e);fr(e,v,y);break;case 3:case 4:var A=a.stateNode.containerInfo,K=qu(e);Gu(e,K,A);break;default:throw Error(o(161))}}catch(ae){Pe(e,e.return,ae)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ny(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ny(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ia(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Zp(e,t.alternate,t),t=t.sibling}function Nl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:za(4,t,t.return),Nl(t);break;case 1:Dn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Yp(t,t.return,a),Nl(t);break;case 27:$s(t.stateNode);case 26:case 5:Dn(t,t.return),Nl(t);break;case 22:t.memoizedState===null&&Nl(t);break;case 30:Nl(t);break;default:Nl(t)}e=e.sibling}}function sa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,r=e,c=t,y=c.flags;switch(c.tag){case 0:case 11:case 15:sa(r,c,a),Ls(4,c);break;case 1:if(sa(r,c,a),i=c,r=i.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(K){Pe(i,i.return,K)}if(i=c,r=i.updateQueue,r!==null){var v=i.stateNode;try{var A=r.shared.hiddenCallbacks;if(A!==null)for(r.shared.hiddenCallbacks=null,r=0;r<A.length;r++)Rm(A[r],v)}catch(K){Pe(i,i.return,K)}}a&&y&64&&Vp(c),Bs(c,c.return);break;case 27:Xp(c);case 26:case 5:sa(r,c,a),a&&i===null&&y&4&&Kp(c),Bs(c,c.return);break;case 12:sa(r,c,a);break;case 31:sa(r,c,a),a&&y&4&&Wp(r,c);break;case 13:sa(r,c,a),a&&y&4&&ey(r,c);break;case 22:c.memoizedState===null&&sa(r,c,a),Bs(c,c.return);break;case 30:break;default:sa(r,c,a)}t=t.sibling}}function Qu(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&ks(a))}function Vu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ks(e))}function An(e,t,a,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ay(e,t,a,i),t=t.sibling}function ay(e,t,a,i){var r=t.flags;switch(t.tag){case 0:case 11:case 15:An(e,t,a,i),r&2048&&Ls(9,t);break;case 1:An(e,t,a,i);break;case 3:An(e,t,a,i),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ks(e)));break;case 12:if(r&2048){An(e,t,a,i),e=t.stateNode;try{var c=t.memoizedProps,y=c.id,v=c.onPostCommit;typeof v=="function"&&v(y,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(A){Pe(t,t.return,A)}}else An(e,t,a,i);break;case 31:An(e,t,a,i);break;case 13:An(e,t,a,i);break;case 23:break;case 22:c=t.stateNode,y=t.alternate,t.memoizedState!==null?c._visibility&2?An(e,t,a,i):Hs(e,t):c._visibility&2?An(e,t,a,i):(c._visibility|=2,Oi(e,t,a,i,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Qu(y,t);break;case 24:An(e,t,a,i),r&2048&&Vu(t.alternate,t);break;default:An(e,t,a,i)}}function Oi(e,t,a,i,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var c=e,y=t,v=a,A=i,K=y.flags;switch(y.tag){case 0:case 11:case 15:Oi(c,y,v,A,r),Ls(8,y);break;case 23:break;case 22:var ae=y.stateNode;y.memoizedState!==null?ae._visibility&2?Oi(c,y,v,A,r):Hs(c,y):(ae._visibility|=2,Oi(c,y,v,A,r)),r&&K&2048&&Qu(y.alternate,y);break;case 24:Oi(c,y,v,A,r),r&&K&2048&&Vu(y.alternate,y);break;default:Oi(c,y,v,A,r)}t=t.sibling}}function Hs(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,i=t,r=i.flags;switch(i.tag){case 22:Hs(a,i),r&2048&&Qu(i.alternate,i);break;case 24:Hs(a,i),r&2048&&Vu(i.alternate,i);break;default:Hs(a,i)}t=t.sibling}}var qs=8192;function Ri(e,t,a){if(e.subtreeFlags&qs)for(e=e.child;e!==null;)ly(e,t,a),e=e.sibling}function ly(e,t,a){switch(e.tag){case 26:Ri(e,t,a),e.flags&qs&&e.memoizedState!==null&&l_(a,Cn,e.memoizedState,e.memoizedProps);break;case 5:Ri(e,t,a);break;case 3:case 4:var i=Cn;Cn=Mr(e.stateNode.containerInfo),Ri(e,t,a),Cn=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=qs,qs=16777216,Ri(e,t,a),qs=i):Ri(e,t,a));break;default:Ri(e,t,a)}}function iy(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Gs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];jt=i,oy(i,e)}iy(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)sy(e),e=e.sibling}function sy(e){switch(e.tag){case 0:case 11:case 15:Gs(e),e.flags&2048&&za(9,e,e.return);break;case 3:Gs(e);break;case 12:Gs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,mr(e)):Gs(e);break;default:Gs(e)}}function mr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];jt=i,oy(i,e)}iy(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:za(8,t,t.return),mr(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,mr(t));break;default:mr(t)}e=e.sibling}}function oy(e,t){for(;jt!==null;){var a=jt;switch(a.tag){case 0:case 11:case 15:za(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var i=a.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:ks(a.memoizedState.cache)}if(i=a.child,i!==null)i.return=a,jt=i;else e:for(a=e;jt!==null;){i=jt;var r=i.sibling,c=i.return;if(Pp(i),i===a){jt=null;break e}if(r!==null){r.return=c,jt=r;break e}jt=c}}}var v2={getCacheForType:function(e){var t=Nt(bt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Nt(bt).controller.signal}},x2=typeof WeakMap=="function"?WeakMap:Map,Xe=0,tt=null,He=null,Ge=0,Ze=0,sn=null,Da=!1,zi=!1,Yu=!1,oa=0,dt=0,Ua=0,Tl=0,Ku=0,on=0,Di=0,Is=null,Ft=null,$u=!1,pr=0,ry=0,yr=1/0,gr=null,La=null,wt=0,Ba=null,Ui=null,ra=0,Xu=0,Fu=null,cy=null,Qs=0,Zu=null;function rn(){return(Xe&2)!==0&&Ge!==0?Ge&-Ge:w.T!==null?nd():Eh()}function uy(){if(on===0)if((Ge&536870912)===0||Qe){var e=mt;mt<<=1,(mt&3932160)===0&&(mt=262144),on=e}else on=536870912;return e=an.current,e!==null&&(e.flags|=32),on}function Zt(e,t,a){(e===tt&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)&&(Li(e,0),Ha(e,Ge,on,!1)),_a(e,a),((Xe&2)===0||e!==tt)&&(e===tt&&((Xe&2)===0&&(Tl|=a),dt===4&&Ha(e,Ge,on,!1)),Un(e))}function dy(e,t,a){if((Xe&6)!==0)throw Error(o(327));var i=!a&&(t&127)===0&&(t&e.expiredLanes)===0||Ut(e,t),r=i?S2(e,t):Ju(e,t,!0),c=i;do{if(r===0){zi&&!i&&Ha(e,t,0,!1);break}else{if(a=e.current.alternate,c&&!_2(a)){r=Ju(e,t,!1),c=!1;continue}if(r===2){if(c=t,e.errorRecoveryDisabledLanes&c)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){t=y;e:{var v=e;r=Is;var A=v.current.memoizedState.isDehydrated;if(A&&(Li(v,y).flags|=256),y=Ju(v,y,!1),y!==2){if(Yu&&!A){v.errorRecoveryDisabledLanes|=c,Tl|=c,r=4;break e}c=Ft,Ft=r,c!==null&&(Ft===null?Ft=c:Ft.push.apply(Ft,c))}r=y}if(c=!1,r!==2)continue}}if(r===1){Li(e,0),Ha(e,t,0,!0);break}e:{switch(i=e,c=r,c){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Ha(i,t,on,!Da);break e;case 2:Ft=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(r=pr+300-rt(),10<r)){if(Ha(i,t,on,!Da),Dt(i,0,!0)!==0)break e;ra=t,i.timeoutHandle=Iy(fy.bind(null,i,a,Ft,gr,$u,t,on,Tl,Di,Da,c,"Throttled",-0,0),r);break e}fy(i,a,Ft,gr,$u,t,on,Tl,Di,Da,c,null,-0,0)}}break}while(!0);Un(e)}function fy(e,t,a,i,r,c,y,v,A,K,ae,oe,X,J){if(e.timeoutHandle=-1,oe=t.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$n},ly(t,c,oe);var _e=(c&62914560)===c?pr-rt():(c&4194048)===c?ry-rt():0;if(_e=i_(oe,_e),_e!==null){ra=c,e.cancelPendingCommit=_e(xy.bind(null,e,t,c,a,i,r,y,v,A,ae,oe,null,X,J)),Ha(e,c,y,!K);return}}xy(e,t,c,a,i,r,y,v,A)}function _2(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var i=0;i<a.length;i++){var r=a[i],c=r.getSnapshot;r=r.value;try{if(!tn(c(),r))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ha(e,t,a,i){t&=~Ku,t&=~Tl,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var r=t;0<r;){var c=31-he(r),y=1<<c;i[c]=-1,r&=~y}a!==0&&Mo(e,a,t)}function br(){return(Xe&6)===0?(Vs(0),!1):!0}function Pu(){if(He!==null){if(Ze===0)var e=He.return;else e=He,Pn=wl=null,hu(e),Mi=null,js=0,e=He;for(;e!==null;)Qp(e.alternate,e),e=e.return;He=null}}function Li(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,G2(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ra=0,Pu(),tt=e,He=a=Fn(e.current,null),Ge=t,Ze=0,sn=null,Da=!1,zi=Ut(e,t),Yu=!1,Di=on=Ku=Tl=Ua=dt=0,Ft=Is=null,$u=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var r=31-he(i),c=1<<r;t|=e[r],i&=~c}return oa=t,Ho(),a}function hy(e,t){Oe=null,w.H=zs,t===ji||t===$o?(t=Am(),Ze=3):t===tu?(t=Am(),Ze=4):Ze=t===Au?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,sn=t,He===null&&(dt=1,or(e,gn(t,e.current)))}function my(){var e=an.current;return e===null?!0:(Ge&4194048)===Ge?_n===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?e===_n:!1}function py(){var e=w.H;return w.H=zs,e===null?zs:e}function yy(){var e=w.A;return w.A=v2,e}function vr(){dt=4,Da||(Ge&4194048)!==Ge&&an.current!==null||(zi=!0),(Ua&134217727)===0&&(Tl&134217727)===0||tt===null||Ha(tt,Ge,on,!1)}function Ju(e,t,a){var i=Xe;Xe|=2;var r=py(),c=yy();(tt!==e||Ge!==t)&&(gr=null,Li(e,t)),t=!1;var y=dt;e:do try{if(Ze!==0&&He!==null){var v=He,A=sn;switch(Ze){case 8:Pu(),y=6;break e;case 3:case 2:case 9:case 6:an.current===null&&(t=!0);var K=Ze;if(Ze=0,sn=null,Bi(e,v,A,K),a&&zi){y=0;break e}break;default:K=Ze,Ze=0,sn=null,Bi(e,v,A,K)}}w2(),y=dt;break}catch(ae){hy(e,ae)}while(!0);return t&&e.shellSuspendCounter++,Pn=wl=null,Xe=i,w.H=r,w.A=c,He===null&&(tt=null,Ge=0,Ho()),y}function w2(){for(;He!==null;)gy(He)}function S2(e,t){var a=Xe;Xe|=2;var i=py(),r=yy();tt!==e||Ge!==t?(gr=null,yr=rt()+500,Li(e,t)):zi=Ut(e,t);e:do try{if(Ze!==0&&He!==null){t=He;var c=sn;t:switch(Ze){case 1:Ze=0,sn=null,Bi(e,t,c,1);break;case 2:case 9:if(Mm(c)){Ze=0,sn=null,by(t);break}t=function(){Ze!==2&&Ze!==9||tt!==e||(Ze=7),Un(e)},c.then(t,t);break e;case 3:Ze=7;break e;case 4:Ze=5;break e;case 7:Mm(c)?(Ze=0,sn=null,by(t)):(Ze=0,sn=null,Bi(e,t,c,7));break;case 5:var y=null;switch(He.tag){case 26:y=He.memoizedState;case 5:case 27:var v=He;if(y?ag(y):v.stateNode.complete){Ze=0,sn=null;var A=v.sibling;if(A!==null)He=A;else{var K=v.return;K!==null?(He=K,xr(K)):He=null}break t}}Ze=0,sn=null,Bi(e,t,c,5);break;case 6:Ze=0,sn=null,Bi(e,t,c,6);break;case 8:Pu(),dt=6;break e;default:throw Error(o(462))}}k2();break}catch(ae){hy(e,ae)}while(!0);return Pn=wl=null,w.H=i,w.A=r,Xe=a,He!==null?0:(tt=null,Ge=0,Ho(),dt)}function k2(){for(;He!==null&&!dl();)gy(He)}function gy(e){var t=Gp(e.alternate,e,oa);e.memoizedProps=e.pendingProps,t===null?xr(e):He=t}function by(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Dp(a,t,t.pendingProps,t.type,void 0,Ge);break;case 11:t=Dp(a,t,t.pendingProps,t.type.render,t.ref,Ge);break;case 5:hu(t);default:Qp(a,t),t=He=ym(t,oa),t=Gp(a,t,oa)}e.memoizedProps=e.pendingProps,t===null?xr(e):He=t}function Bi(e,t,a,i){Pn=wl=null,hu(t),Mi=null,js=0;var r=t.return;try{if(f2(e,r,t,a,Ge)){dt=1,or(e,gn(a,e.current)),He=null;return}}catch(c){if(r!==null)throw He=r,c;dt=1,or(e,gn(a,e.current)),He=null;return}t.flags&32768?(Qe||i===1?e=!0:zi||(Ge&536870912)!==0?e=!1:(Da=e=!0,(i===2||i===9||i===3||i===6)&&(i=an.current,i!==null&&i.tag===13&&(i.flags|=16384))),vy(t,e)):xr(t)}function xr(e){var t=e;do{if((t.flags&32768)!==0){vy(t,Da);return}e=t.return;var a=p2(t.alternate,t,oa);if(a!==null){He=a;return}if(t=t.sibling,t!==null){He=t;return}He=t=e}while(t!==null);dt===0&&(dt=5)}function vy(e,t){do{var a=y2(e.alternate,e);if(a!==null){a.flags&=32767,He=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){He=e;return}He=e=a}while(e!==null);dt=6,He=null}function xy(e,t,a,i,r,c,y,v,A){e.cancelPendingCommit=null;do _r();while(wt!==0);if((Xe&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(c=t.lanes|t.childLanes,c|=qc,wa(e,a,c,y,v,A),e===tt&&(He=tt=null,Ge=0),Ui=t,Ba=e,ra=a,Xu=c,Fu=r,cy=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,C2(fl,function(){return Ey(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=w.T,w.T=null,r=F.p,F.p=2,y=Xe,Xe|=4;try{g2(e,t,a)}finally{Xe=y,F.p=r,w.T=i}}wt=1,_y(),wy(),Sy()}}function _y(){if(wt===1){wt=0;var e=Ba,t=Ui,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=w.T,w.T=null;var i=F.p;F.p=2;var r=Xe;Xe|=4;try{ty(t,e);var c=ud,y=om(e.containerInfo),v=c.focusedElem,A=c.selectionRange;if(y!==v&&v&&v.ownerDocument&&sm(v.ownerDocument.documentElement,v)){if(A!==null&&Dc(v)){var K=A.start,ae=A.end;if(ae===void 0&&(ae=K),"selectionStart"in v)v.selectionStart=K,v.selectionEnd=Math.min(ae,v.value.length);else{var oe=v.ownerDocument||document,X=oe&&oe.defaultView||window;if(X.getSelection){var J=X.getSelection(),_e=v.textContent.length,Ce=Math.min(A.start,_e),et=A.end===void 0?Ce:Math.min(A.end,_e);!J.extend&&Ce>et&&(y=et,et=Ce,Ce=y);var B=im(v,Ce),O=im(v,et);if(B&&O&&(J.rangeCount!==1||J.anchorNode!==B.node||J.anchorOffset!==B.offset||J.focusNode!==O.node||J.focusOffset!==O.offset)){var V=oe.createRange();V.setStart(B.node,B.offset),J.removeAllRanges(),Ce>et?(J.addRange(V),J.extend(O.node,O.offset)):(V.setEnd(O.node,O.offset),J.addRange(V))}}}}for(oe=[],J=v;J=J.parentNode;)J.nodeType===1&&oe.push({element:J,left:J.scrollLeft,top:J.scrollTop});for(typeof v.focus=="function"&&v.focus(),v=0;v<oe.length;v++){var se=oe[v];se.element.scrollLeft=se.left,se.element.scrollTop=se.top}}Rr=!!cd,ud=cd=null}finally{Xe=r,F.p=i,w.T=a}}e.current=t,wt=2}}function wy(){if(wt===2){wt=0;var e=Ba,t=Ui,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=w.T,w.T=null;var i=F.p;F.p=2;var r=Xe;Xe|=4;try{Zp(e,t.alternate,t)}finally{Xe=r,F.p=i,w.T=a}}wt=3}}function Sy(){if(wt===4||wt===3){wt=0,On();var e=Ba,t=Ui,a=ra,i=cy;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?wt=5:(wt=0,Ui=Ba=null,ky(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(La=null),yc(a),t=t.stateNode,zt&&typeof zt.onCommitFiberRoot=="function")try{zt.onCommitFiberRoot(xa,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=w.T,r=F.p,F.p=2,w.T=null;try{for(var c=e.onRecoverableError,y=0;y<i.length;y++){var v=i[y];c(v.value,{componentStack:v.stack})}}finally{w.T=t,F.p=r}}(ra&3)!==0&&_r(),Un(e),r=e.pendingLanes,(a&261930)!==0&&(r&42)!==0?e===Zu?Qs++:(Qs=0,Zu=e):Qs=0,Vs(0)}}function ky(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ks(t)))}function _r(){return _y(),wy(),Sy(),Ey()}function Ey(){if(wt!==5)return!1;var e=Ba,t=Xu;Xu=0;var a=yc(ra),i=w.T,r=F.p;try{F.p=32>a?32:a,w.T=null,a=Fu,Fu=null;var c=Ba,y=ra;if(wt=0,Ui=Ba=null,ra=0,(Xe&6)!==0)throw Error(o(331));var v=Xe;if(Xe|=4,sy(c.current),ay(c,c.current,y,a),Xe=v,Vs(0,!1),zt&&typeof zt.onPostCommitFiberRoot=="function")try{zt.onPostCommitFiberRoot(xa,c)}catch{}return!0}finally{F.p=r,w.T=i,ky(e,t)}}function jy(e,t,a){t=gn(a,t),t=Cu(e.stateNode,t,2),e=Ta(e,t,2),e!==null&&(_a(e,2),Un(e))}function Pe(e,t,a){if(e.tag===3)jy(e,e,a);else for(;t!==null;){if(t.tag===3){jy(t,e,a);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(La===null||!La.has(i))){e=gn(a,e),a=Mp(2),i=Ta(t,a,2),i!==null&&(Cp(a,i,t,e),_a(i,2),Un(i));break}}t=t.return}}function Wu(e,t,a){var i=e.pingCache;if(i===null){i=e.pingCache=new x2;var r=new Set;i.set(t,r)}else r=i.get(t),r===void 0&&(r=new Set,i.set(t,r));r.has(a)||(Yu=!0,r.add(a),e=E2.bind(null,e,t,a),t.then(e,e))}function E2(e,t,a){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,tt===e&&(Ge&a)===a&&(dt===4||dt===3&&(Ge&62914560)===Ge&&300>rt()-pr?(Xe&2)===0&&Li(e,0):Ku|=a,Di===Ge&&(Di=0)),Un(e)}function My(e,t){t===0&&(t=jn()),e=vl(e,t),e!==null&&(_a(e,t),Un(e))}function j2(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),My(e,a)}function M2(e,t){var a=0;switch(e.tag){case 31:case 13:var i=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(o(314))}i!==null&&i.delete(t),My(e,a)}function C2(e,t){return ni(e,t)}var wr=null,Hi=null,ed=!1,Sr=!1,td=!1,qa=0;function Un(e){e!==Hi&&e.next===null&&(Hi===null?wr=Hi=e:Hi=Hi.next=e),Sr=!0,ed||(ed=!0,N2())}function Vs(e,t){if(!td&&Sr){td=!0;do for(var a=!1,i=wr;i!==null;){if(e!==0){var r=i.pendingLanes;if(r===0)var c=0;else{var y=i.suspendedLanes,v=i.pingedLanes;c=(1<<31-he(42|e)+1)-1,c&=r&~(y&~v),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,Ty(i,c))}else c=Ge,c=Dt(i,i===tt?c:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(c&3)===0||Ut(i,c)||(a=!0,Ty(i,c));i=i.next}while(a);td=!1}}function A2(){Cy()}function Cy(){Sr=ed=!1;var e=0;qa!==0&&q2()&&(e=qa);for(var t=rt(),a=null,i=wr;i!==null;){var r=i.next,c=Ay(i,t);c===0?(i.next=null,a===null?wr=r:a.next=r,r===null&&(Hi=a)):(a=i,(e!==0||(c&3)!==0)&&(Sr=!0)),i=r}wt!==0&&wt!==5||Vs(e),qa!==0&&(qa=0)}function Ay(e,t){for(var a=e.suspendedLanes,i=e.pingedLanes,r=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var y=31-he(c),v=1<<y,A=r[y];A===-1?((v&a)===0||(v&i)!==0)&&(r[y]=Lt(v,t)):A<=t&&(e.expiredLanes|=v),c&=~v}if(t=tt,a=Ge,a=Dt(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,a===0||e===t&&(Ze===2||Ze===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&ai(i),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||Ut(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(i!==null&&ai(i),yc(a)){case 2:case 8:a=li;break;case 32:a=fl;break;case 268435456:a=it;break;default:a=fl}return i=Ny.bind(null,e),a=ni(a,i),e.callbackPriority=t,e.callbackNode=a,t}return i!==null&&i!==null&&ai(i),e.callbackPriority=2,e.callbackNode=null,2}function Ny(e,t){if(wt!==0&&wt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(_r()&&e.callbackNode!==a)return null;var i=Ge;return i=Dt(e,e===tt?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(dy(e,i,t),Ay(e,rt()),e.callbackNode!=null&&e.callbackNode===a?Ny.bind(null,e):null)}function Ty(e,t){if(_r())return null;dy(e,t,!0)}function N2(){I2(function(){(Xe&6)!==0?ni(us,A2):Cy()})}function nd(){if(qa===0){var e=ki;e===0&&(e=Ne,Ne<<=1,(Ne&261888)===0&&(Ne=256)),qa=e}return qa}function Oy(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:To(""+e)}function Ry(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function T2(e,t,a,i,r){if(t==="submit"&&a&&a.stateNode===r){var c=Oy((r[Vt]||null).action),y=i.submitter;y&&(t=(t=y[Vt]||null)?Oy(t.formAction):y.getAttribute("formAction"),t!==null&&(c=t,y=null));var v=new Do("action","action",null,i,r);e.push({event:v,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(qa!==0){var A=y?Ry(r,y):new FormData(r);wu(a,{pending:!0,data:A,method:r.method,action:c},null,A)}}else typeof c=="function"&&(v.preventDefault(),A=y?Ry(r,y):new FormData(r),wu(a,{pending:!0,data:A,method:r.method,action:c},c,A))},currentTarget:r}]})}}for(var ad=0;ad<Hc.length;ad++){var ld=Hc[ad],O2=ld.toLowerCase(),R2=ld[0].toUpperCase()+ld.slice(1);Mn(O2,"on"+R2)}Mn(um,"onAnimationEnd"),Mn(dm,"onAnimationIteration"),Mn(fm,"onAnimationStart"),Mn("dblclick","onDoubleClick"),Mn("focusin","onFocus"),Mn("focusout","onBlur"),Mn(Fx,"onTransitionRun"),Mn(Zx,"onTransitionStart"),Mn(Px,"onTransitionCancel"),Mn(hm,"onTransitionEnd"),ui("onMouseEnter",["mouseout","mouseover"]),ui("onMouseLeave",["mouseout","mouseover"]),ui("onPointerEnter",["pointerout","pointerover"]),ui("onPointerLeave",["pointerout","pointerover"]),pl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),pl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),pl("onBeforeInput",["compositionend","keypress","textInput","paste"]),pl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),pl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),pl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ys="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(" "),z2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ys));function zy(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var i=e[a],r=i.event;i=i.listeners;e:{var c=void 0;if(t)for(var y=i.length-1;0<=y;y--){var v=i[y],A=v.instance,K=v.currentTarget;if(v=v.listener,A!==c&&r.isPropagationStopped())break e;c=v,r.currentTarget=K;try{c(r)}catch(ae){Bo(ae)}r.currentTarget=null,c=A}else for(y=0;y<i.length;y++){if(v=i[y],A=v.instance,K=v.currentTarget,v=v.listener,A!==c&&r.isPropagationStopped())break e;c=v,r.currentTarget=K;try{c(r)}catch(ae){Bo(ae)}r.currentTarget=null,c=A}}}}function qe(e,t){var a=t[gc];a===void 0&&(a=t[gc]=new Set);var i=e+"__bubble";a.has(i)||(Dy(t,e,2,!1),a.add(i))}function id(e,t,a){var i=0;t&&(i|=4),Dy(a,e,i,t)}var kr="_reactListening"+Math.random().toString(36).slice(2);function sd(e){if(!e[kr]){e[kr]=!0,Ch.forEach(function(a){a!=="selectionchange"&&(z2.has(a)||id(a,!1,e),id(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[kr]||(t[kr]=!0,id("selectionchange",!1,t))}}function Dy(e,t,a,i){switch(ug(t)){case 2:var r=r_;break;case 8:r=c_;break;default:r=_d}a=r.bind(null,t,a,e),r=void 0,!jc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),i?r!==void 0?e.addEventListener(t,a,{capture:!0,passive:r}):e.addEventListener(t,a,!0):r!==void 0?e.addEventListener(t,a,{passive:r}):e.addEventListener(t,a,!1)}function od(e,t,a,i,r){var c=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var y=i.tag;if(y===3||y===4){var v=i.stateNode.containerInfo;if(v===r)break;if(y===4)for(y=i.return;y!==null;){var A=y.tag;if((A===3||A===4)&&y.stateNode.containerInfo===r)return;y=y.return}for(;v!==null;){if(y=oi(v),y===null)return;if(A=y.tag,A===5||A===6||A===26||A===27){i=c=y;continue e}v=v.parentNode}}i=i.return}qh(function(){var K=c,ae=kc(a),oe=[];e:{var X=mm.get(e);if(X!==void 0){var J=Do,_e=e;switch(e){case"keypress":if(Ro(a)===0)break e;case"keydown":case"keyup":J=Mx;break;case"focusin":_e="focus",J=Nc;break;case"focusout":_e="blur",J=Nc;break;case"beforeblur":case"afterblur":J=Nc;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":J=Qh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=px;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=Nx;break;case um:case dm:case fm:J=bx;break;case hm:J=Ox;break;case"scroll":case"scrollend":J=hx;break;case"wheel":J=zx;break;case"copy":case"cut":case"paste":J=xx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":J=Yh;break;case"toggle":case"beforetoggle":J=Ux}var Ce=(t&4)!==0,et=!Ce&&(e==="scroll"||e==="scrollend"),B=Ce?X!==null?X+"Capture":null:X;Ce=[];for(var O=K,V;O!==null;){var se=O;if(V=se.stateNode,se=se.tag,se!==5&&se!==26&&se!==27||V===null||B===null||(se=hs(O,B),se!=null&&Ce.push(Ks(O,se,V))),et)break;O=O.return}0<Ce.length&&(X=new J(X,_e,null,a,ae),oe.push({event:X,listeners:Ce}))}}if((t&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",J=e==="mouseout"||e==="pointerout",X&&a!==Sc&&(_e=a.relatedTarget||a.fromElement)&&(oi(_e)||_e[si]))break e;if((J||X)&&(X=ae.window===ae?ae:(X=ae.ownerDocument)?X.defaultView||X.parentWindow:window,J?(_e=a.relatedTarget||a.toElement,J=K,_e=_e?oi(_e):null,_e!==null&&(et=d(_e),Ce=_e.tag,_e!==et||Ce!==5&&Ce!==27&&Ce!==6)&&(_e=null)):(J=null,_e=K),J!==_e)){if(Ce=Qh,se="onMouseLeave",B="onMouseEnter",O="mouse",(e==="pointerout"||e==="pointerover")&&(Ce=Yh,se="onPointerLeave",B="onPointerEnter",O="pointer"),et=J==null?X:fs(J),V=_e==null?X:fs(_e),X=new Ce(se,O+"leave",J,a,ae),X.target=et,X.relatedTarget=V,se=null,oi(ae)===K&&(Ce=new Ce(B,O+"enter",_e,a,ae),Ce.target=V,Ce.relatedTarget=et,se=Ce),et=se,J&&_e)t:{for(Ce=D2,B=J,O=_e,V=0,se=B;se;se=Ce(se))V++;se=0;for(var ke=O;ke;ke=Ce(ke))se++;for(;0<V-se;)B=Ce(B),V--;for(;0<se-V;)O=Ce(O),se--;for(;V--;){if(B===O||O!==null&&B===O.alternate){Ce=B;break t}B=Ce(B),O=Ce(O)}Ce=null}else Ce=null;J!==null&&Uy(oe,X,J,Ce,!1),_e!==null&&et!==null&&Uy(oe,et,_e,Ce,!0)}}e:{if(X=K?fs(K):window,J=X.nodeName&&X.nodeName.toLowerCase(),J==="select"||J==="input"&&X.type==="file")var Ke=Wh;else if(Ph(X))if(em)Ke=Kx;else{Ke=Vx;var we=Qx}else J=X.nodeName,!J||J.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?K&&wc(K.elementType)&&(Ke=Wh):Ke=Yx;if(Ke&&(Ke=Ke(e,K))){Jh(oe,Ke,a,ae);break e}we&&we(e,X,K),e==="focusout"&&K&&X.type==="number"&&K.memoizedProps.value!=null&&_c(X,"number",X.value)}switch(we=K?fs(K):window,e){case"focusin":(Ph(we)||we.contentEditable==="true")&&(yi=we,Uc=K,_s=null);break;case"focusout":_s=Uc=yi=null;break;case"mousedown":Lc=!0;break;case"contextmenu":case"mouseup":case"dragend":Lc=!1,rm(oe,a,ae);break;case"selectionchange":if(Xx)break;case"keydown":case"keyup":rm(oe,a,ae)}var ze;if(Oc)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 pi?Fh(e,a)&&(Ie="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ie="onCompositionStart");Ie&&(Kh&&a.locale!=="ko"&&(pi||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&pi&&(ze=Gh()):(ka=ae,Mc="value"in ka?ka.value:ka.textContent,pi=!0)),we=Er(K,Ie),0<we.length&&(Ie=new Vh(Ie,e,null,a,ae),oe.push({event:Ie,listeners:we}),ze?Ie.data=ze:(ze=Zh(a),ze!==null&&(Ie.data=ze)))),(ze=Bx?Hx(e,a):qx(e,a))&&(Ie=Er(K,"onBeforeInput"),0<Ie.length&&(we=new Vh("onBeforeInput","beforeinput",null,a,ae),oe.push({event:we,listeners:Ie}),we.data=ze)),T2(oe,e,K,a,ae)}zy(oe,t)})}function Ks(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Er(e,t){for(var a=t+"Capture",i=[];e!==null;){var r=e,c=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||c===null||(r=hs(e,a),r!=null&&i.unshift(Ks(e,r,c)),r=hs(e,t),r!=null&&i.push(Ks(e,r,c))),e.tag===3)return i;e=e.return}return[]}function D2(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Uy(e,t,a,i,r){for(var c=t._reactName,y=[];a!==null&&a!==i;){var v=a,A=v.alternate,K=v.stateNode;if(v=v.tag,A!==null&&A===i)break;v!==5&&v!==26&&v!==27||K===null||(A=K,r?(K=hs(a,c),K!=null&&y.unshift(Ks(a,K,A))):r||(K=hs(a,c),K!=null&&y.push(Ks(a,K,A)))),a=a.return}y.length!==0&&e.push({event:t,listeners:y})}var U2=/\r\n?/g,L2=/\u0000|\uFFFD/g;function Ly(e){return(typeof e=="string"?e:""+e).replace(U2,`
|
|
49
|
+
`).replace(L2,"")}function By(e,t){return t=Ly(t),Ly(e)===t}function We(e,t,a,i,r,c){switch(a){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||fi(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&fi(e,""+i);break;case"className":Ao(e,"class",i);break;case"tabIndex":Ao(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":Ao(e,a,i);break;case"style":Bh(e,i,c);break;case"data":if(t!=="object"){Ao(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=To(""+i),e.setAttribute(a,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof c=="function"&&(a==="formAction"?(t!=="input"&&We(e,t,"name",r.name,r,null),We(e,t,"formEncType",r.formEncType,r,null),We(e,t,"formMethod",r.formMethod,r,null),We(e,t,"formTarget",r.formTarget,r,null)):(We(e,t,"encType",r.encType,r,null),We(e,t,"method",r.method,r,null),We(e,t,"target",r.target,r,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=To(""+i),e.setAttribute(a,i);break;case"onClick":i!=null&&(e.onclick=$n);break;case"onScroll":i!=null&&qe("scroll",e);break;case"onScrollEnd":i!=null&&qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(a=i.__html,a!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}a=To(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""+i):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":i===!0?e.setAttribute(a,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,i):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(a,i):e.removeAttribute(a);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(a):e.setAttribute(a,i);break;case"popover":qe("beforetoggle",e),qe("toggle",e),Co(e,"popover",i);break;case"xlinkActuate":Kn(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":Kn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":Kn(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":Kn(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":Kn(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":Kn(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":Kn(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":Kn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":Kn(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":Co(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=dx.get(a)||a,Co(e,a,i))}}function rd(e,t,a,i,r,c){switch(a){case"style":Bh(e,i,c);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(a=i.__html,a!=null){if(r.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof i=="string"?fi(e,i):(typeof i=="number"||typeof i=="bigint")&&fi(e,""+i);break;case"onScroll":i!=null&&qe("scroll",e);break;case"onScrollEnd":i!=null&&qe("scrollend",e);break;case"onClick":i!=null&&(e.onclick=$n);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ah.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(r=a.endsWith("Capture"),t=a.slice(2,r?a.length-7:void 0),c=e[Vt]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(t,c,r),typeof i=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,i,r);break e}a in e?e[a]=i:i===!0?e.setAttribute(a,""):Co(e,a,i)}}}function Ot(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",e),qe("load",e);var i=!1,r=!1,c;for(c in a)if(a.hasOwnProperty(c)){var y=a[c];if(y!=null)switch(c){case"src":i=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:We(e,t,c,y,a,null)}}r&&We(e,t,"srcSet",a.srcSet,a,null),i&&We(e,t,"src",a.src,a,null);return;case"input":qe("invalid",e);var v=c=y=r=null,A=null,K=null;for(i in a)if(a.hasOwnProperty(i)){var ae=a[i];if(ae!=null)switch(i){case"name":r=ae;break;case"type":y=ae;break;case"checked":A=ae;break;case"defaultChecked":K=ae;break;case"value":c=ae;break;case"defaultValue":v=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(o(137,t));break;default:We(e,t,i,ae,a,null)}}zh(e,c,v,A,K,y,r,!1);return;case"select":qe("invalid",e),i=y=c=null;for(r in a)if(a.hasOwnProperty(r)&&(v=a[r],v!=null))switch(r){case"value":c=v;break;case"defaultValue":y=v;break;case"multiple":i=v;default:We(e,t,r,v,a,null)}t=c,a=y,e.multiple=!!i,t!=null?di(e,!!i,t,!1):a!=null&&di(e,!!i,a,!0);return;case"textarea":qe("invalid",e),c=r=i=null;for(y in a)if(a.hasOwnProperty(y)&&(v=a[y],v!=null))switch(y){case"value":i=v;break;case"defaultValue":r=v;break;case"children":c=v;break;case"dangerouslySetInnerHTML":if(v!=null)throw Error(o(91));break;default:We(e,t,y,v,a,null)}Uh(e,i,r,c);return;case"option":for(A in a)if(a.hasOwnProperty(A)&&(i=a[A],i!=null))switch(A){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:We(e,t,A,i,a,null)}return;case"dialog":qe("beforetoggle",e),qe("toggle",e),qe("cancel",e),qe("close",e);break;case"iframe":case"object":qe("load",e);break;case"video":case"audio":for(i=0;i<Ys.length;i++)qe(Ys[i],e);break;case"image":qe("error",e),qe("load",e);break;case"details":qe("toggle",e);break;case"embed":case"source":case"link":qe("error",e),qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(K in a)if(a.hasOwnProperty(K)&&(i=a[K],i!=null))switch(K){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:We(e,t,K,i,a,null)}return;default:if(wc(t)){for(ae in a)a.hasOwnProperty(ae)&&(i=a[ae],i!==void 0&&rd(e,t,ae,i,a,void 0));return}}for(v in a)a.hasOwnProperty(v)&&(i=a[v],i!=null&&We(e,t,v,i,a,null))}function B2(e,t,a,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,c=null,y=null,v=null,A=null,K=null,ae=null;for(J in a){var oe=a[J];if(a.hasOwnProperty(J)&&oe!=null)switch(J){case"checked":break;case"value":break;case"defaultValue":A=oe;default:i.hasOwnProperty(J)||We(e,t,J,null,i,oe)}}for(var X in i){var J=i[X];if(oe=a[X],i.hasOwnProperty(X)&&(J!=null||oe!=null))switch(X){case"type":c=J;break;case"name":r=J;break;case"checked":K=J;break;case"defaultChecked":ae=J;break;case"value":y=J;break;case"defaultValue":v=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(o(137,t));break;default:J!==oe&&We(e,t,X,J,i,oe)}}xc(e,y,v,A,K,ae,c,r);return;case"select":J=y=v=X=null;for(c in a)if(A=a[c],a.hasOwnProperty(c)&&A!=null)switch(c){case"value":break;case"multiple":J=A;default:i.hasOwnProperty(c)||We(e,t,c,null,i,A)}for(r in i)if(c=i[r],A=a[r],i.hasOwnProperty(r)&&(c!=null||A!=null))switch(r){case"value":X=c;break;case"defaultValue":v=c;break;case"multiple":y=c;default:c!==A&&We(e,t,r,c,i,A)}t=v,a=y,i=J,X!=null?di(e,!!a,X,!1):!!i!=!!a&&(t!=null?di(e,!!a,t,!0):di(e,!!a,a?[]:"",!1));return;case"textarea":J=X=null;for(v in a)if(r=a[v],a.hasOwnProperty(v)&&r!=null&&!i.hasOwnProperty(v))switch(v){case"value":break;case"children":break;default:We(e,t,v,null,i,r)}for(y in i)if(r=i[y],c=a[y],i.hasOwnProperty(y)&&(r!=null||c!=null))switch(y){case"value":X=r;break;case"defaultValue":J=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(o(91));break;default:r!==c&&We(e,t,y,r,i,c)}Dh(e,X,J);return;case"option":for(var _e in a)if(X=a[_e],a.hasOwnProperty(_e)&&X!=null&&!i.hasOwnProperty(_e))switch(_e){case"selected":e.selected=!1;break;default:We(e,t,_e,null,i,X)}for(A in i)if(X=i[A],J=a[A],i.hasOwnProperty(A)&&X!==J&&(X!=null||J!=null))switch(A){case"selected":e.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:We(e,t,A,X,i,J)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ce in a)X=a[Ce],a.hasOwnProperty(Ce)&&X!=null&&!i.hasOwnProperty(Ce)&&We(e,t,Ce,null,i,X);for(K in i)if(X=i[K],J=a[K],i.hasOwnProperty(K)&&X!==J&&(X!=null||J!=null))switch(K){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(o(137,t));break;default:We(e,t,K,X,i,J)}return;default:if(wc(t)){for(var et in a)X=a[et],a.hasOwnProperty(et)&&X!==void 0&&!i.hasOwnProperty(et)&&rd(e,t,et,void 0,i,X);for(ae in i)X=i[ae],J=a[ae],!i.hasOwnProperty(ae)||X===J||X===void 0&&J===void 0||rd(e,t,ae,X,i,J);return}}for(var B in a)X=a[B],a.hasOwnProperty(B)&&X!=null&&!i.hasOwnProperty(B)&&We(e,t,B,null,i,X);for(oe in i)X=i[oe],J=a[oe],!i.hasOwnProperty(oe)||X===J||X==null&&J==null||We(e,t,oe,X,i,J)}function Hy(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function H2(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),i=0;i<a.length;i++){var r=a[i],c=r.transferSize,y=r.initiatorType,v=r.duration;if(c&&v&&Hy(y)){for(y=0,v=r.responseEnd,i+=1;i<a.length;i++){var A=a[i],K=A.startTime;if(K>v)break;var ae=A.transferSize,oe=A.initiatorType;ae&&Hy(oe)&&(A=A.responseEnd,y+=ae*(A<v?1:(v-K)/(A-K)))}if(--i,t+=8*(c+y)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var cd=null,ud=null;function jr(e){return e.nodeType===9?e:e.ownerDocument}function qy(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Gy(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function dd(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var fd=null;function q2(){var e=window.event;return e&&e.type==="popstate"?e===fd?!1:(fd=e,!0):(fd=null,!1)}var Iy=typeof setTimeout=="function"?setTimeout:void 0,G2=typeof clearTimeout=="function"?clearTimeout:void 0,Qy=typeof Promise=="function"?Promise:void 0,I2=typeof queueMicrotask=="function"?queueMicrotask:typeof Qy<"u"?function(e){return Qy.resolve(null).then(e).catch(Q2)}:Iy;function Q2(e){setTimeout(function(){throw e})}function Ga(e){return e==="head"}function Vy(e,t){var a=t,i=0;do{var r=a.nextSibling;if(e.removeChild(a),r&&r.nodeType===8)if(a=r.data,a==="/$"||a==="/&"){if(i===0){e.removeChild(r),Qi(t);return}i--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")i++;else if(a==="html")$s(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,$s(a);for(var c=a.firstChild;c;){var y=c.nextSibling,v=c.nodeName;c[ds]||v==="SCRIPT"||v==="STYLE"||v==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=y}}else a==="body"&&$s(e.ownerDocument.body);a=r}while(a);Qi(t)}function Yy(e,t){var a=e;e=0;do{var i=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),i&&i.nodeType===8)if(a=i.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=i}while(a)}function hd(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":hd(a),bc(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function V2(e,t,a,i){for(;e.nodeType===1;){var r=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[ds])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var c=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=wn(e.nextSibling),e===null)break}return null}function Y2(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=wn(e.nextSibling),e===null))return null;return e}function Ky(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=wn(e.nextSibling),e===null))return null;return e}function md(e){return e.data==="$?"||e.data==="$~"}function pd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function K2(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var i=function(){t(),a.removeEventListener("DOMContentLoaded",i)};a.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function wn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var yd=null;function $y(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return wn(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function Xy(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function Fy(e,t,a){switch(t=jr(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function $s(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bc(e)}var Sn=new Map,Zy=new Set;function Mr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ca=F.d;F.d={f:$2,r:X2,D:F2,C:Z2,L:P2,m:J2,X:e_,S:W2,M:t_};function $2(){var e=ca.f(),t=br();return e||t}function X2(e){var t=ri(e);t!==null&&t.tag===5&&t.type==="form"?hp(t):ca.r(e)}var qi=typeof document>"u"?null:document;function Py(e,t,a){var i=qi;if(i&&typeof t=="string"&&t){var r=pn(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),Zy.has(r)||(Zy.add(r),e={rel:e,crossOrigin:a,href:t},i.querySelector(r)===null&&(t=i.createElement("link"),Ot(t,"link",e),Et(t),i.head.appendChild(t)))}}function F2(e){ca.D(e),Py("dns-prefetch",e,null)}function Z2(e,t){ca.C(e,t),Py("preconnect",e,t)}function P2(e,t,a){ca.L(e,t,a);var i=qi;if(i&&e&&t){var r='link[rel="preload"][as="'+pn(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+pn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+pn(a.imageSizes)+'"]')):r+='[href="'+pn(e)+'"]';var c=r;switch(t){case"style":c=Gi(e);break;case"script":c=Ii(e)}Sn.has(c)||(e=b({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Sn.set(c,e),i.querySelector(r)!==null||t==="style"&&i.querySelector(Xs(c))||t==="script"&&i.querySelector(Fs(c))||(t=i.createElement("link"),Ot(t,"link",e),Et(t),i.head.appendChild(t)))}}function J2(e,t){ca.m(e,t);var a=qi;if(a&&e){var i=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+pn(i)+'"][href="'+pn(e)+'"]',c=r;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=Ii(e)}if(!Sn.has(c)&&(e=b({rel:"modulepreload",href:e},t),Sn.set(c,e),a.querySelector(r)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Fs(c)))return}i=a.createElement("link"),Ot(i,"link",e),Et(i),a.head.appendChild(i)}}}function W2(e,t,a){ca.S(e,t,a);var i=qi;if(i&&e){var r=ci(i).hoistableStyles,c=Gi(e);t=t||"default";var y=r.get(c);if(!y){var v={loading:0,preload:null};if(y=i.querySelector(Xs(c)))v.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Sn.get(c))&&gd(e,a);var A=y=i.createElement("link");Et(A),Ot(A,"link",e),A._p=new Promise(function(K,ae){A.onload=K,A.onerror=ae}),A.addEventListener("load",function(){v.loading|=1}),A.addEventListener("error",function(){v.loading|=2}),v.loading|=4,Cr(y,t,i)}y={type:"stylesheet",instance:y,count:1,state:v},r.set(c,y)}}}function e_(e,t){ca.X(e,t);var a=qi;if(a&&e){var i=ci(a).hoistableScripts,r=Ii(e),c=i.get(r);c||(c=a.querySelector(Fs(r)),c||(e=b({src:e,async:!0},t),(t=Sn.get(r))&&bd(e,t),c=a.createElement("script"),Et(c),Ot(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},i.set(r,c))}}function t_(e,t){ca.M(e,t);var a=qi;if(a&&e){var i=ci(a).hoistableScripts,r=Ii(e),c=i.get(r);c||(c=a.querySelector(Fs(r)),c||(e=b({src:e,async:!0,type:"module"},t),(t=Sn.get(r))&&bd(e,t),c=a.createElement("script"),Et(c),Ot(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},i.set(r,c))}}function Jy(e,t,a,i){var r=(r=Q.current)?Mr(r):null;if(!r)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Gi(a.href),a=ci(r).hoistableStyles,i=a.get(t),i||(i={type:"style",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Gi(a.href);var c=ci(r).hoistableStyles,y=c.get(e);if(y||(r=r.ownerDocument||r,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,y),(c=r.querySelector(Xs(e)))&&!c._p&&(y.instance=c,y.state.loading=5),Sn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Sn.set(e,a),c||n_(r,e,a,y.state))),t&&i===null)throw Error(o(528,""));return y}if(t&&i!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ii(a),a=ci(r).hoistableScripts,i=a.get(t),i||(i={type:"script",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Gi(e){return'href="'+pn(e)+'"'}function Xs(e){return'link[rel="stylesheet"]['+e+"]"}function Wy(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function n_(e,t,a,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),Ot(t,"link",a),Et(t),e.head.appendChild(t))}function Ii(e){return'[src="'+pn(e)+'"]'}function Fs(e){return"script[async]"+e}function eg(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+pn(a.href)+'"]');if(i)return t.instance=i,Et(i),i;var r=b({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Et(i),Ot(i,"style",r),Cr(i,a.precedence,e),t.instance=i;case"stylesheet":r=Gi(a.href);var c=e.querySelector(Xs(r));if(c)return t.state.loading|=4,t.instance=c,Et(c),c;i=Wy(a),(r=Sn.get(r))&&gd(i,r),c=(e.ownerDocument||e).createElement("link"),Et(c);var y=c;return y._p=new Promise(function(v,A){y.onload=v,y.onerror=A}),Ot(c,"link",i),t.state.loading|=4,Cr(c,a.precedence,e),t.instance=c;case"script":return c=Ii(a.src),(r=e.querySelector(Fs(c)))?(t.instance=r,Et(r),r):(i=a,(r=Sn.get(c))&&(i=b({},a),bd(i,r)),e=e.ownerDocument||e,r=e.createElement("script"),Et(r),Ot(r,"link",i),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,Cr(i,a.precedence,e));return t.instance}function Cr(e,t,a){for(var i=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=i.length?i[i.length-1]:null,c=r,y=0;y<i.length;y++){var v=i[y];if(v.dataset.precedence===t)c=v;else if(c!==r)break}c?c.parentNode.insertBefore(e,c.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function gd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function bd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ar=null;function tg(e,t,a){if(Ar===null){var i=new Map,r=Ar=new Map;r.set(a,i)}else r=Ar,i=r.get(a),i||(i=new Map,r.set(a,i));if(i.has(e))return i;for(i.set(e,null),a=a.getElementsByTagName(e),r=0;r<a.length;r++){var c=a[r];if(!(c[ds]||c[Ct]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var y=c.getAttribute(t)||"";y=e+y;var v=i.get(y);v?v.push(c):i.set(y,[c])}}return i}function ng(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function a_(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function ag(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function l_(e,t,a,i){if(a.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var r=Gi(i.href),c=t.querySelector(Xs(r));if(c){t=c._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Nr.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=c,Et(c);return}c=t.ownerDocument||t,i=Wy(i),(r=Sn.get(r))&&gd(i,r),c=c.createElement("link"),Et(c);var y=c;y._p=new Promise(function(v,A){y.onload=v,y.onerror=A}),Ot(c,"link",i),a.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Nr.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var vd=0;function i_(e,t){return e.stylesheets&&e.count===0&&Or(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var i=setTimeout(function(){if(e.stylesheets&&Or(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+t);0<e.imgBytes&&vd===0&&(vd=62500*H2());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Or(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>vd?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(r)}}:null}function Nr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Or(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Tr=null;function Or(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Tr=new Map,t.forEach(s_,e),Tr=null,Nr.call(e))}function s_(e,t){if(!(t.state.loading&4)){var a=Tr.get(e);if(a)var i=a.get(null);else{a=new Map,Tr.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<r.length;c++){var y=r[c];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),i=y)}i&&a.set(null,i)}r=t.instance,y=r.getAttribute("data-precedence"),c=a.get(y)||i,c===i&&a.set(null,r),a.set(y,r),this.count++,i=Nr.bind(this),r.addEventListener("load",i),r.addEventListener("error",i),c?c.parentNode.insertBefore(r,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Zs={$$typeof:z,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function o_(e,t,a,i,r,c,y,v,A){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ml(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ml(0),this.hiddenUpdates=ml(null),this.identifierPrefix=i,this.onUncaughtError=r,this.onCaughtError=c,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function lg(e,t,a,i,r,c,y,v,A,K,ae,oe){return e=new o_(e,t,a,y,A,K,ae,oe,v),t=1,c===!0&&(t|=24),c=nn(3,null,null,t),e.current=c,c.stateNode=e,t=Jc(),t.refCount++,e.pooledCache=t,t.refCount++,c.memoizedState={element:i,isDehydrated:a,cache:t},nu(c),e}function ig(e){return e?(e=vi,e):vi}function sg(e,t,a,i,r,c){r=ig(r),i.context===null?i.context=r:i.pendingContext=r,i=Na(t),i.payload={element:a},c=c===void 0?null:c,c!==null&&(i.callback=c),a=Ta(e,i,t),a!==null&&(Zt(a,e,t),Cs(a,e,t))}function og(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function xd(e,t){og(e,t),(e=e.alternate)&&og(e,t)}function rg(e){if(e.tag===13||e.tag===31){var t=vl(e,67108864);t!==null&&Zt(t,e,67108864),xd(e,67108864)}}function cg(e){if(e.tag===13||e.tag===31){var t=rn();t=pc(t);var a=vl(e,t);a!==null&&Zt(a,e,t),xd(e,t)}}var Rr=!0;function r_(e,t,a,i){var r=w.T;w.T=null;var c=F.p;try{F.p=2,_d(e,t,a,i)}finally{F.p=c,w.T=r}}function c_(e,t,a,i){var r=w.T;w.T=null;var c=F.p;try{F.p=8,_d(e,t,a,i)}finally{F.p=c,w.T=r}}function _d(e,t,a,i){if(Rr){var r=wd(i);if(r===null)od(e,t,i,zr,a),dg(e,i);else if(d_(r,e,t,a,i))i.stopPropagation();else if(dg(e,i),t&4&&-1<u_.indexOf(e)){for(;r!==null;){var c=ri(r);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var y=ct(c.pendingLanes);if(y!==0){var v=c;for(v.pendingLanes|=2,v.entangledLanes|=2;y;){var A=1<<31-he(y);v.entanglements[1]|=A,y&=~A}Un(c),(Xe&6)===0&&(yr=rt()+500,Vs(0))}}break;case 31:case 13:v=vl(c,2),v!==null&&Zt(v,c,2),br(),xd(c,2)}if(c=wd(i),c===null&&od(e,t,i,zr,a),c===r)break;r=c}r!==null&&i.stopPropagation()}else od(e,t,i,null,a)}}function wd(e){return e=kc(e),Sd(e)}var zr=null;function Sd(e){if(zr=null,e=oi(e),e!==null){var t=d(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=h(t),e!==null)return e;e=null}else if(a===31){if(e=p(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return zr=e,null}function ug(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Eo()){case us:return 2;case li:return 8;case fl:case ii:return 32;case it:return 268435456;default:return 32}default:return 32}}var kd=!1,Ia=null,Qa=null,Va=null,Ps=new Map,Js=new Map,Ya=[],u_="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".split(" ");function dg(e,t){switch(e){case"focusin":case"focusout":Ia=null;break;case"dragenter":case"dragleave":Qa=null;break;case"mouseover":case"mouseout":Va=null;break;case"pointerover":case"pointerout":Ps.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Js.delete(t.pointerId)}}function Ws(e,t,a,i,r,c){return e===null||e.nativeEvent!==c?(e={blockedOn:t,domEventName:a,eventSystemFlags:i,nativeEvent:c,targetContainers:[r]},t!==null&&(t=ri(t),t!==null&&rg(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function d_(e,t,a,i,r){switch(t){case"focusin":return Ia=Ws(Ia,e,t,a,i,r),!0;case"dragenter":return Qa=Ws(Qa,e,t,a,i,r),!0;case"mouseover":return Va=Ws(Va,e,t,a,i,r),!0;case"pointerover":var c=r.pointerId;return Ps.set(c,Ws(Ps.get(c)||null,e,t,a,i,r)),!0;case"gotpointercapture":return c=r.pointerId,Js.set(c,Ws(Js.get(c)||null,e,t,a,i,r)),!0}return!1}function fg(e){var t=oi(e.target);if(t!==null){var a=d(t);if(a!==null){if(t=a.tag,t===13){if(t=h(a),t!==null){e.blockedOn=t,jh(e.priority,function(){cg(a)});return}}else if(t===31){if(t=p(a),t!==null){e.blockedOn=t,jh(e.priority,function(){cg(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=wd(e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);Sc=i,a.target.dispatchEvent(i),Sc=null}else return t=ri(a),t!==null&&rg(t),e.blockedOn=a,!1;t.shift()}return!0}function hg(e,t,a){Dr(e)&&a.delete(t)}function f_(){kd=!1,Ia!==null&&Dr(Ia)&&(Ia=null),Qa!==null&&Dr(Qa)&&(Qa=null),Va!==null&&Dr(Va)&&(Va=null),Ps.forEach(hg),Js.forEach(hg)}function Ur(e,t){e.blockedOn===t&&(e.blockedOn=null,kd||(kd=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,f_)))}var Lr=null;function mg(e){Lr!==e&&(Lr=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Lr===e&&(Lr=null);for(var t=0;t<e.length;t+=3){var a=e[t],i=e[t+1],r=e[t+2];if(typeof i!="function"){if(Sd(i||a)===null)continue;break}var c=ri(a);c!==null&&(e.splice(t,3),t-=3,wu(c,{pending:!0,data:r,method:a.method,action:i},i,r))}}))}function Qi(e){function t(A){return Ur(A,e)}Ia!==null&&Ur(Ia,e),Qa!==null&&Ur(Qa,e),Va!==null&&Ur(Va,e),Ps.forEach(t),Js.forEach(t);for(var a=0;a<Ya.length;a++){var i=Ya[a];i.blockedOn===e&&(i.blockedOn=null)}for(;0<Ya.length&&(a=Ya[0],a.blockedOn===null);)fg(a),a.blockedOn===null&&Ya.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(i=0;i<a.length;i+=3){var r=a[i],c=a[i+1],y=r[Vt]||null;if(typeof c=="function")y||mg(a);else if(y){var v=null;if(c&&c.hasAttribute("formAction")){if(r=c,y=c[Vt]||null)v=y.formAction;else if(Sd(r)!==null)continue}else v=y.action;typeof v=="function"?a[i+1]=v:(a.splice(i,3),i-=3),mg(a)}}}function pg(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(y){return r=y})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),i||setTimeout(a,20)}function a(){if(!i&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function Ed(e){this._internalRoot=e}Br.prototype.render=Ed.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,i=rn();sg(a,i,e,t,null,null)},Br.prototype.unmount=Ed.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;sg(e.current,2,null,e,null,null),br(),t[si]=null}};function Br(e){this._internalRoot=e}Br.prototype.unstable_scheduleHydration=function(e){if(e){var t=Eh();e={blockedOn:null,target:e,priority:t};for(var a=0;a<Ya.length&&t!==0&&t<Ya[a].priority;a++);Ya.splice(a,0,e),a===0&&fg(e)}};var yg=l.version;if(yg!=="19.2.6")throw Error(o(527,yg,"19.2.6"));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var h_={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:w,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hr.isDisabled&&Hr.supportsFiber)try{xa=Hr.inject(h_),zt=Hr}catch{}}return to.createRoot=function(e,t){if(!u(e))throw Error(o(299));var a=!1,i="",r=Sp,c=kp,y=Ep;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(c=t.onCaughtError),t.onRecoverableError!==void 0&&(y=t.onRecoverableError)),t=lg(e,1,!1,null,null,a,i,null,r,c,y,pg),e[si]=t.current,sd(e),new Ed(t)},to.hydrateRoot=function(e,t,a){if(!u(e))throw Error(o(299));var i=!1,r="",c=Sp,y=kp,v=Ep,A=null;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(r=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(v=a.onRecoverableError),a.formState!==void 0&&(A=a.formState)),t=lg(e,1,!0,t,a??null,i,r,A,c,y,v,pg),t.context=ig(null),a=t.current,i=rn(),i=pc(i),r=Na(i),r.callback=null,Ta(a,r,i),a=i,t.current.lanes=a,_a(t,a),Un(t),e[si]=t.current,sd(e),new Br(t)},to.version="19.2.6",to}var Mg;function S_(){if(Mg)return Ad.exports;Mg=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(l){console.error(l)}}return n(),Ad.exports=w_(),Ad.exports}var k_=S_();function E_(n){if(!n)return null;const l=n.split("~"),s=l[0];if(!s)return null;if(l.length===1)return{kind:"section",instanceId:s};const o=l[1];if(!o)return null;const u=l[2],d=u!==void 0?Number(u):NaN;return{kind:"slot",instanceId:s,slotId:o,...Number.isInteger(d)?{itemIndex:d}:{}}}function j_(n){if(!n)return null;if(n.kind==="section")return n.instanceId;const l=`${n.instanceId}~${n.slotId}`;return n.itemIndex!==void 0?`${l}~${n.itemIndex}`:l}function M_(n,l){const s=new URL(l).pathname,o=s.endsWith("/")?s:`${s}/`;return`${n}/`===o?"":n.startsWith(o)?n.slice(o.length):null}function C_(n,l){const[s,o,u,d,...h]=n.split("/").filter(Boolean);if(s!=="fixtures"||!o||u!=="canvas"||h.length>0)return null;const p=new URLSearchParams(l);return{fixture:decodeURIComponent(o),canvasId:d?decodeURIComponent(d):null,format:p.get("format"),selection:E_(p.get("sel"))}}function A_(n){var s;const l=n.fixtures[0];return l===void 0?null:{fixture:l.id,canvasId:((s=n.template.canvases[0])==null?void 0:s.id)??null,format:null,selection:null}}function Cg(n){const l=n.canvasId===null?"canvas":`canvas/${encodeURIComponent(n.canvasId)}`,s=`fixtures/${encodeURIComponent(n.fixture)}/${l}`,o=new URLSearchParams;n.format!==null&&o.set("format",n.format);const u=j_(n.selection);u&&o.set("sel",u);const d=o.toString();return d?`${s}?${d}`:s}function v0(n,l){var s;return((s=n.parentElement)==null?void 0:s.closest(`[${l.slotId}],[${l.slotField}]`))??null}function ga(n,l){return!n.hasAttribute(l.slotUnselectable)}function x0(n,l,s,o){const u=[];for(const d of Array.from(n.querySelectorAll(l)))v0(d,o)===s&&u.push(d);return u}function qf(n,l,s){return x0(n,`[${s.slotItem}="${String(l)}"]`,n,s)}function Ag(n,l,s,o){var d;let u=n.closest(`[${l}]`);for(;u&&s.contains(u);){if(ga(u,o)&&v0(u,o)===s)return u;u=((d=u.parentElement)==null?void 0:d.closest(`[${l}]`))??null}return null}const Rd=1,N_=12;function T_(n,l){return{"--we-r-top":`${n.top}px`,"--we-r-left":`${n.left}px`,"--we-r-w":`${n.width}px`,"--we-r-h":`${n.height}px`,"--we-r-off":`${l}px`}}function O_(n){const l=rc(n);return l.width<=0||l.height<=0?!1:!R_(n,l)}function Ng(n){return n==="hidden"||n==="scroll"||n==="auto"||n==="clip"}function R_(n,l){const s=n.ownerDocument.defaultView;if(!s)return!1;let o=-1/0,u=-1/0,d=1/0,h=1/0;for(let g=n.parentElement;g;g=g.parentElement){const x=s.getComputedStyle(g),b=Ng(x.overflowX||x.overflow),E=Ng(x.overflowY||x.overflow);if(!b&&!E)continue;const j=g.getBoundingClientRect();b&&(u=Math.max(u,j.left),d=Math.min(d,j.right)),E&&(o=Math.max(o,j.top),h=Math.min(h,j.bottom))}const p=l.left+l.width<=u||l.left>=d,m=l.top+l.height<=o||l.top>=h;return p||m}function rc(n){const l=n.getBoundingClientRect();if(l.width>0&&l.height>0)return l;let s=1/0,o=1/0,u=-1/0,d=-1/0,h=!1;for(const p of Array.from(n.children)){const m=rc(p);m.width<=0||m.height<=0||(h=!0,s=Math.min(s,m.top),o=Math.min(o,m.left),u=Math.max(u,m.right),d=Math.max(d,m.bottom))}return h?new DOMRect(o,s,u-o,d-s):l}function _0(n,l,s,o){if(!n)return;if(!l){Fr(n);return}const u=T_(rc(l),s);for(const[d,h]of Object.entries(u))n.style.setProperty(d,h);o&&n.setAttribute("data-kind",o),n.setAttribute("data-active","true")}function Fr(n){n&&(n.removeAttribute("data-active"),n.removeAttribute("data-kind"))}function Tg(n,l,s,o){if(!n)return[];const u=n.ownerDocument,d=Array.from(n.querySelectorAll(".we-chrome-ring--selection")),h=n.querySelector(":scope > .we-chrome-label");for(;d.length<l.length;){const p=u.createElement("div");p.className="we-chrome-ring we-chrome-ring--selection",n.insertBefore(p,h),d.push(p)}d.forEach((p,m)=>_0(p,l[m]??null,s,o));for(const p of d.slice(Math.max(l.length,1)))p.remove();return d.slice(0,l.length)}function z_(n,l,s){if(!n)return;if(!l||!s){Zd(n);return}const o=rc(l),u=n.getAttribute("data-active")==="true",d=n.textContent!==s;n.textContent=s,n.style.setProperty("--we-l-top",`${o.top}px`),n.style.setProperty("--we-l-left",`${o.left}px`),n.style.setProperty("--we-l-indent",`${N_}px`),u&&d&&(n.removeAttribute("data-active"),n.offsetWidth),n.setAttribute("data-active","true")}function Zd(n){n&&(n.removeAttribute("data-active"),n.textContent="")}function Xl(n){return typeof CSS<"u"&&CSS.escape?CSS.escape(n):n.replace(/[^a-zA-Z0-9_-]/g,l=>`\\${l}`)}function Gf(n){const l=n.filter(s=>O_(s));return l.length>0?l:n.slice(0,1)}function w0(n,l,s){const o=Array.from(n.querySelectorAll(`[${s.slotId}="${Xl(l)}"]`)).filter(u=>ga(u,s));return Gf(o)}function D_(n,l,s){if(!l||l.kind!=="slot"||l.item_index==null)return[];const o=[];for(const u of n)o.push(...qf(u,l.item_index,s).filter(d=>ga(d,s)));return Gf(o)}function S0(n,l,s){if(!l)return[];const o=n.querySelector(`[${s.sectionInstanceId}="${Xl(l.instance_id)}"]`);if(!o)return[];if(l.kind==="section")return[o];const u=w0(o,l.slot_id,s);if(u.length===0)return[];if(l.item_index!=null||l.field_name){const d=l.field_name?`[${s.slotField}="${Xl(l.field_name)}"]`:null,h=[];for(const p of u){let m=[p];if(!(l.item_index!=null&&(m=qf(p,l.item_index,s).filter(g=>ga(g,s)),m.length===0)))for(const g of m)if(d){const x=x0(g,d,p,s).filter(b=>ga(b,s));if(x.length>0){h.push(...x);continue}g!==p&&h.push(g)}else h.push(g)}if(h.length>0)return Gf(h)}return u.map(d=>{const h=d.closest(`[${s.slotGroup}]`);return h&&ga(h,s)?h:d})}function U_(n,l,s){return S0(n,l,s)[0]??null}const Og="we-enh-shield",L_="we-enh-shield--item",Vi="data-we-live";function B_(n,l,s){if(!l||l.kind!=="slot"||l.item_index==null)return[];const o=[];for(const u of k0(n,l,s))o.push(...qf(u,l.item_index,s).filter(d=>ga(d,s)));return o}function k0(n,l,s){if(!l||l.kind!=="slot")return[];const o=n.querySelector(`[${s.sectionInstanceId}="${Xl(l.instance_id)}"]`);return o?Array.from(o.querySelectorAll(`[${s.slotId}="${Xl(l.slot_id)}"]`)):[]}function H_(n,l,s){if(n.querySelectorAll(`[${Vi}]`).forEach(u=>u.removeAttribute(Vi)),!l)return;const o=n.querySelector(`[${s.sectionInstanceId}="${Xl(l.instance_id)}"]`);if(o)if(l.kind==="section")o.setAttribute(Vi,"true");else{const u=B_(n,l,s),d=u.length>0?u:k0(n,l,s).filter(h=>ga(h,s));for(const h of d)h.setAttribute(Vi,"true")}}const Kl=1440,zd=Math.round(Kl*9/16),E0=14,If="we-frame-defaults";function q_(n){return`
|
|
50
50
|
/* Section wrapper -- structure only. No selection chrome here;
|
|
51
51
|
rings are painted by the host's overlay. Zero margin
|
|
52
52
|
+ padding means sections butt edge-to-edge, matching publisher. */
|
|
@@ -132,13 +132,13 @@ Error generating stack: `+i.message+`
|
|
|
132
132
|
so the same imposition lands here. Layered so an author utility on the
|
|
133
133
|
section root still wins, exactly as it does against the stylesheet's own
|
|
134
134
|
copy of this rule. */
|
|
135
|
-
@layer ${
|
|
135
|
+
@layer ${If} {
|
|
136
136
|
[${n}] > .we-section-body > * { flex-shrink: 0; }
|
|
137
137
|
}`}function I_(n,l){const s=l?`#we-page {
|
|
138
138
|
padding: 0;
|
|
139
139
|
}`:`#we-page {
|
|
140
140
|
width: ${Kl}px;
|
|
141
|
-
min-height: ${
|
|
141
|
+
min-height: ${zd}px;
|
|
142
142
|
overflow: hidden;
|
|
143
143
|
border-radius: ${E0}px;
|
|
144
144
|
background: #f5f3ee;
|
|
@@ -148,16 +148,22 @@ Error generating stack: `+i.message+`
|
|
|
148
148
|
vw units and width queries need nothing from us; its HEIGHT is the page's
|
|
149
149
|
own measurement, which makes 100svh circular here — a section sized from it
|
|
150
150
|
asks for a window its own height is what produced, and climbs on every
|
|
151
|
-
pass. The
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
151
|
+
pass. The window-height token is the seam that ends it: a section writes
|
|
152
|
+
the token instead of the unit, and here it is the screen this card is cut
|
|
153
|
+
from (the floor above), a constant that settles in one pass. Declared
|
|
154
|
+
UNLAYERED, unlike the document defaults: this is not a fallback a template
|
|
155
|
+
may better, it is what the window IS on this surface, and each framework's
|
|
156
|
+
own declaration of the token is unlayered too. A page box takes none of
|
|
157
|
+
this — a frame document is given the window its format declares, so 100svh
|
|
158
|
+
there is already the truth.
|
|
159
|
+
|
|
160
|
+
TWO declarations of one constant, which is a parallel run and not a shim:
|
|
161
|
+
this canvas serves templates of both frameworks side by side, and each
|
|
162
|
+
names the token in its own namespace. The older spelling goes when the
|
|
163
|
+
older framework does, in the change that moves the rest of its names. */
|
|
159
164
|
:root {
|
|
160
|
-
--tr-window-h: ${
|
|
165
|
+
--tr-window-h: ${zd}px;
|
|
166
|
+
--concrete-window-h: ${zd}px;
|
|
161
167
|
}`;return`
|
|
162
168
|
html, body {
|
|
163
169
|
margin: 0;
|
|
@@ -172,7 +178,7 @@ Error generating stack: `+i.message+`
|
|
|
172
178
|
wraps in the frame diverge from capture otherwise. The layer (pre-declared
|
|
173
179
|
by the srcdoc, see FRAME_DEFAULTS_LAYER) is what makes these lose to any
|
|
174
180
|
template declaration. */
|
|
175
|
-
@layer ${
|
|
181
|
+
@layer ${If} {
|
|
176
182
|
html, body {
|
|
177
183
|
background: transparent;
|
|
178
184
|
}
|
|
@@ -246,7 +252,7 @@ Error generating stack: `+i.message+`
|
|
|
246
252
|
clickable at z-index 2 (e.g. the neighborhood card over the map canvas). Item
|
|
247
253
|
shields ride one plane above the base, so a click over an item copy hits the
|
|
248
254
|
ITEM's shield and one click selects that item. */
|
|
249
|
-
.${
|
|
255
|
+
.${Og} {
|
|
250
256
|
position: absolute;
|
|
251
257
|
inset: 0;
|
|
252
258
|
z-index: 1;
|
|
@@ -254,7 +260,7 @@ Error generating stack: `+i.message+`
|
|
|
254
260
|
background: transparent;
|
|
255
261
|
}
|
|
256
262
|
.${L_} { z-index: 2; }
|
|
257
|
-
[${Vi}] .${
|
|
263
|
+
[${Vi}] .${Og} { display: none; }
|
|
258
264
|
|
|
259
265
|
/* Image slider: until the slider's \`images\` slot is the live selection, its
|
|
260
266
|
z-index:2 nav arrows would paint above the z-index:1 shield and stay
|
|
@@ -262,7 +268,7 @@ Error generating stack: `+i.message+`
|
|
|
262
268
|
catches the first click; restored once .tr-slider carries data-we-live.
|
|
263
269
|
Editor-only — deliberately not in published tokens.css. */
|
|
264
270
|
.tr-slider:not([${Vi}]) .tr-slider__nav { pointer-events: none; }
|
|
265
|
-
`}function Q_(n,l){const o=n/Kl,u=Number.POSITIVE_INFINITY;return Math.max(.05,Math.min(.9,.72*o,.1926*o+.54,u))}const V_=420,Rg=.92;function Y_(n,l,s){if(!s)return n;const o=Math.max(n,V_/s.width),u=Math.min(.9,n*Kl/s.width,Rg*l.availableWidthPx/s.width,Rg*l.availableHeightPx/s.height);return Math.max(.05,Math.min(o,u))}function zg(n,l,s){var u;let o=n.closest(`[${l}]`);for(;o&&!ga(o,s);)o=((u=o.parentElement)==null?void 0:u.closest(`[${l}]`))??null;return o}function K_(n,l,s){for(const o of Array.from(n.querySelectorAll(`[${s.markers.slotId}]`))){if(o.closest(`[${s.markers.slotGroup}]`)!==n)continue;const u=o.getAttribute(s.markers.slotId);if(u&&s.isSlotEditable(l,u))return u}return null}function $_(n,l,s){if(!n)return null;const o=n.closest(`[${s.markers.sectionInstanceId}]`),u=o==null?void 0:o.getAttribute(s.markers.sectionInstanceId);if(!o||!u)return null;const d=l.find(M=>M.instance_id===u),h={selection:{kind:"section",instance_id:u},element:o};if(!d)return h;const p=zg(n,s.markers.slotGroup,s.markers);if(p&&o.contains(p)){const M=K_(p,u,s);return M?{selection:{kind:"slot",instance_id:u,slot_id:M},element:p}:h}const m=zg(n,s.markers.slotId,s.markers),g=m==null?void 0:m.getAttribute(s.markers.slotId);if(!m||!g||!s.isSlotEditable(u,g))return h;const x=
|
|
271
|
+
`}function Q_(n,l){const o=n/Kl,u=Number.POSITIVE_INFINITY;return Math.max(.05,Math.min(.9,.72*o,.1926*o+.54,u))}const V_=420,Rg=.92;function Y_(n,l,s){if(!s)return n;const o=Math.max(n,V_/s.width),u=Math.min(.9,n*Kl/s.width,Rg*l.availableWidthPx/s.width,Rg*l.availableHeightPx/s.height);return Math.max(.05,Math.min(o,u))}function zg(n,l,s){var u;let o=n.closest(`[${l}]`);for(;o&&!ga(o,s);)o=((u=o.parentElement)==null?void 0:u.closest(`[${l}]`))??null;return o}function K_(n,l,s){for(const o of Array.from(n.querySelectorAll(`[${s.markers.slotId}]`))){if(o.closest(`[${s.markers.slotGroup}]`)!==n)continue;const u=o.getAttribute(s.markers.slotId);if(u&&s.isSlotEditable(l,u))return u}return null}function $_(n,l,s){if(!n)return null;const o=n.closest(`[${s.markers.sectionInstanceId}]`),u=o==null?void 0:o.getAttribute(s.markers.sectionInstanceId);if(!o||!u)return null;const d=l.find(M=>M.instance_id===u),h={selection:{kind:"section",instance_id:u},element:o};if(!d)return h;const p=zg(n,s.markers.slotGroup,s.markers);if(p&&o.contains(p)){const M=K_(p,u,s);return M?{selection:{kind:"slot",instance_id:u,slot_id:M},element:p}:h}const m=zg(n,s.markers.slotId,s.markers),g=m==null?void 0:m.getAttribute(s.markers.slotId);if(!m||!g||!s.isSlotEditable(u,g))return h;const x=Ag(n,s.markers.slotItem,m,s.markers),b=x?Number(x.getAttribute(s.markers.slotItem)):NaN,E=Number.isInteger(b)?b:void 0,j=Ag(n,s.markers.slotField,m,s.markers),T=(j==null?void 0:j.getAttribute(s.markers.slotField))??null,C=T&&s.isSlotEditable(u,g,T)?T:null;return{selection:{kind:"slot",instance_id:u,slot_id:g,...E!==void 0?{item_index:E}:{},...C?{field_name:C}:{}},element:(C?j:null)??x??m}}function Pd(n){return n.section_display_name?n.section_display_name:n.section_key.split("-").map(l=>l&&l[0].toUpperCase()+l.slice(1)).join(" ")}function X_(n){if(!n)return"null";let l=2166136261;for(let s=0;s<n.length;s++)l^=n.charCodeAt(s),l=Math.imul(l,16777619);return(l>>>0).toString(16)}function j0(n,l){var d;const s=l.createElement("div");s.className="we-render-error";const o=l.createElement("p");o.className="we-render-error__title",o.textContent="Couldn’t render this section.";const u=l.createElement("p");return u.className="we-render-error__detail",u.textContent=((d=n.render_error)==null?void 0:d.message)??"Unknown render error.",s.appendChild(o),s.appendChild(u),s}function F_(n,l,s,o){const u=l.createElement("div");u.setAttribute(s.sectionInstanceId,n.instance_id),u.setAttribute("data-section-label",Pd(n)),u.dataset.svId=n.section_version_id,u.dataset.htmlHash=X_(n.html);const d=l.createElement("div");return d.className="we-section-body",n.render_error||n.html===null?d.appendChild(j0(n,l)):d.innerHTML=o(n.html),u.appendChild(d),u}function Dg(n){return JSON.stringify(n).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026")}const Z_="tr-frame";function Dd(n){return n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function P_(n,l){const s=Object.entries(l).map(([o,u])=>`${o}:${u}`).join(";");return{class:Z_,dataFormat:n,style:s}}function J_(n){if(!n)return"";const l=P_(n.formatId,n.tokens);return` class="${Dd(l.class)}" data-format="${Dd(l.dataFormat)}" style="${Dd(l.style)}"`}function W_(n){if(Object.keys(n.islandMap).length===0)return"";if(Object.keys(n.importMap).length===0&&!n.hostResolvesOwnImports)return console.error("canvas: this template version has islands but no import map, so nothing can resolve their React — sections render statically. Republish the template to emit the vendor."),"";const l=n.hostScriptSrc?`
|
|
266
272
|
<script id="tr-island-host" type="module" src="${n.hostScriptSrc}"><\/script>`:"";return`${Object.keys(n.importMap).length===0?"":`
|
|
267
273
|
<script type="importmap">${Dg({imports:n.importMap})}<\/script>`}
|
|
268
274
|
<script>window.__TR_ISLAND_MAP=${Dg(n.islandMap)};<\/script>
|
|
@@ -277,14 +283,14 @@ Error generating stack: `+i.message+`
|
|
|
277
283
|
kernel's document defaults must lose to everything a template declares,
|
|
278
284
|
so their layer is pre-declared here, before any template stylesheet,
|
|
279
285
|
pinning it below every layer those go on to declare. -->
|
|
280
|
-
<style>@layer ${
|
|
286
|
+
<style>@layer ${If};</style>
|
|
281
287
|
${o}${W_(n)}
|
|
282
288
|
<style>${I_(l,s)}</style>
|
|
283
289
|
</head>
|
|
284
290
|
<body>
|
|
285
291
|
<div id="we-page"${J_(s)}></div>
|
|
286
292
|
</body>
|
|
287
|
-
</html>`}function nw(n){return!!(n!=null&&n.getElementById("we-page"))}function Ug(n){const l=s=>ew(s,n.assets.basePath);return{srcdoc:()=>tw(n.assets,n.markers,n.pageBox),buildSectionWrapper:(s,o)=>F_(s,o,n.markers,l),buildErrorPlaceholder:j0,resolveTarget:(s,o)=>$_(s,o,n),localizeSectionAssets:l,resolveSelectionEl:(s,o)=>U_(s,o,n.markers),resolveSelectionEls:(s,o)=>S0(s,o,n.markers),resolveVisibleSlotEls:(s,o)=>w0(s,o,n.markers),resolveItemEls:(s,o)=>D_(s,o,n.markers),setLiveOwner:(s,o)=>H_(s,o,n.markers)}}const M0=(n,l)=>`<svg class="${n}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${l}</svg>`;function aw(n){return M0(n,'<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/>')}function lw(n){return M0(n,'<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/>')}const iw=42,C0=16;function sw(n,l){const s=[];for(const u of n)for(s.push({sum:u.y,n:1,items:[u]});s.length>1;){const d=s[s.length-1],h=s[s.length-2];if(!d||!h)break;const p=d.sum/d.n-(d.n-1)/2*l,m=h.sum/h.n+(h.n-1)/2*l;if(p-m<l)s.splice(s.length-2,2,{sum:h.sum+d.sum,n:h.n+d.n,items:h.items.concat(d.items)});else break}const o={};for(const u of s){const d=u.sum/u.n-(u.n-1)/2*l;u.items.forEach((h,p)=>{o[h.idx]=d+p*l})}return o}const ow=aw("we-htab-eye-off"),rw=lw("we-htab-eye-on"),
|
|
293
|
+
</html>`}function nw(n){return!!(n!=null&&n.getElementById("we-page"))}function Ug(n){const l=s=>ew(s,n.assets.basePath);return{srcdoc:()=>tw(n.assets,n.markers,n.pageBox),buildSectionWrapper:(s,o)=>F_(s,o,n.markers,l),buildErrorPlaceholder:j0,resolveTarget:(s,o)=>$_(s,o,n),localizeSectionAssets:l,resolveSelectionEl:(s,o)=>U_(s,o,n.markers),resolveSelectionEls:(s,o)=>S0(s,o,n.markers),resolveVisibleSlotEls:(s,o)=>w0(s,o,n.markers),resolveItemEls:(s,o)=>D_(s,o,n.markers),setLiveOwner:(s,o)=>H_(s,o,n.markers)}}const M0=(n,l)=>`<svg class="${n}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${l}</svg>`;function aw(n){return M0(n,'<path d="M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"/><path d="M14.084 14.158a3 3 0 0 1-4.242-4.242"/><path d="M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"/><path d="m2 2 20 20"/>')}function lw(n){return M0(n,'<path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/><circle cx="12" cy="12" r="3"/>')}const iw=42,C0=16;function sw(n,l){const s=[];for(const u of n)for(s.push({sum:u.y,n:1,items:[u]});s.length>1;){const d=s[s.length-1],h=s[s.length-2];if(!d||!h)break;const p=d.sum/d.n-(d.n-1)/2*l,m=h.sum/h.n+(h.n-1)/2*l;if(p-m<l)s.splice(s.length-2,2,{sum:h.sum+d.sum,n:h.n+d.n,items:h.items.concat(d.items)});else break}const o={};for(const u of s){const d=u.sum/u.n-(u.n-1)/2*l;u.items.forEach((h,p)=>{o[h.idx]=d+p*l})}return o}const ow=aw("we-htab-eye-off"),rw=lw("we-htab-eye-on"),Jd=new WeakMap;function cw(n,l,s,o){const u=n.createElement("button");u.type="button",u.className="we-htab",u.dataset.hiddenTab=l,u.title=`Show ${s}`,u.setAttribute("aria-label",`Show ${s}`),u.innerHTML=`<span class="we-htab-eye">${ow}${rw}</span><span class="we-htab-name"></span>`;const d=u.querySelector(".we-htab-name");return d&&(d.textContent=s),Jd.set(u,o),u.addEventListener("click",h=>{var p;h.stopPropagation(),(p=Jd.get(u))==null||p()}),u}function uw(n,l,s,o){const u=new Map;n.querySelectorAll(".we-htab").forEach(p=>{const m=p.dataset.hiddenTab;m&&u.set(m,p)});const d=new Set,h=[];for(const p of s){let m=u.get(p.instanceId);if(!m)m=cw(l,p.instanceId,p.label,()=>o(p.instanceId)),n.appendChild(m);else{const g=m.querySelector(".we-htab-name");g&&g.textContent!==p.label&&(g.textContent=p.label),m.title=`Show ${p.label}`,m.setAttribute("aria-label",`Show ${p.label}`),Jd.set(m,()=>o(p.instanceId))}d.add(p.instanceId),h.push(m)}return u.forEach((p,m)=>{d.has(m)||p.remove()}),h}function dw(n,l,s){const o=n.map((d,h)=>{const p=l(d.dataset.hiddenTab??""),m=p?p.getBoundingClientRect().top*s:0;return{idx:h,y:m}}),u=sw(o,iw);n.forEach((d,h)=>{d.style.top=`${u[h]}px`,d.style.left=`${C0-d.offsetWidth}px`})}const fw=48,hw=30,mw=`
|
|
288
294
|
@property --we-scale {
|
|
289
295
|
syntax: "<number>";
|
|
290
296
|
inherits: true;
|
|
@@ -695,7 +701,7 @@ Error generating stack: `+i.message+`
|
|
|
695
701
|
transition: none !important;
|
|
696
702
|
}
|
|
697
703
|
}
|
|
698
|
-
`,pw='<div class="we-guide"></div><div class="we-chrome-ring we-chrome-ring--hover"></div><div class="we-chrome-ring we-chrome-ring--selection"></div><div class="we-chrome-label"></div>',Wr="we-canvas-frame",Lg="we-frame-titlebar",Bg="we-canvas-frame-label",Hg="we-htabs",qg="we-chrome-overlay";function Dd(n,l,s){const o=n.querySelector(l);if(o)return o;const u=s();return n.appendChild(u),u}function yw(n,l){const s=n.querySelector(`:scope > .${Lg}`);if(s)return s;const o=l.createElement("div");return o.className=Lg,n.insertBefore(o,n.firstChild),o}function gw(n){for(let l=n.nextElementSibling;l;l=l.nextElementSibling)if(l.classList.contains(Wr))return l;return null}function bw(n,l){const s=n.ownerDocument,o=yw(n,s),u=l.label??"",d=o.querySelector(`:scope > .${Bg}`);if(u==="")d==null||d.remove();else{const x=d??o.insertBefore(s.createElement("div"),o.firstChild);x.className=Bg,x.textContent!==u&&(x.textContent=u)}const h=Dd(n,":scope > iframe",()=>s.createElement("iframe"));l.title!==void 0&&h.title!==l.title&&(h.title=l.title),l.sandbox!==void 0&&h.getAttribute("sandbox")!==l.sandbox&&h.setAttribute("sandbox",l.sandbox),h.getAttribute("srcdoc")!==l.srcdoc&&h.setAttribute("srcdoc",l.srcdoc);const p=Dd(n,`:scope > .${Hg}`,()=>{const x=s.createElement("div");return x.className=Hg,x}),m=Dd(n,`:scope > .${qg}`,()=>{const x=s.createElement("div");return x.className=qg,x.setAttribute("aria-hidden","true"),x});m.childElementCount===0&&(m.innerHTML=pw);const g=l.pageBox;return g?(n.style.setProperty("--we-page-w",`${g.width}px`),n.style.setProperty("--we-page-h",`${g.height}px`),n.style.setProperty("--we-page-radius","0px")):(n.style.removeProperty("--we-page-w"),n.style.removeProperty("--we-page-radius")),{iframe:h,overlay:m,tabLayer:p}}function vw(n,l,s){const{iframe:o}=s;return{key:l,wrapper:n,iframe:o,overlay:s.overlay,tabLayer:s.tabLayer,get doc(){return o.contentDocument},setPageHeight(u){n.style.setProperty("--we-page-h",`${u}px`)}}}function xw(n,l){const s=n.ownerDocument,o=new Map;for(const m of Array.from(n.querySelectorAll(`:scope > .${Wr}`))){const g=m.dataset.frameKey;g!==void 0&&o.set(g,m)}const u=[],d=[],h=new Set;for(const m of l){let g=o.get(m.key);g||(g=s.createElement("div"),g.className=Wr,g.dataset.frameKey=m.key);const x=bw(g,m);u.push(g),h.add(m.key),d.push(vw(g,m.key,x))}let p=null;for(let m=u.length-1;m>=0;m--){const g=u[m];g&&((g.parentNode!==n||gw(g)!==p)&&n.insertBefore(g,p),p=g)}return o.forEach((m,g)=>{h.has(g)||m.remove()}),l.some(m=>(m.label??"")!=="")?n.style.setProperty("--we-frame-label-lane",`${hw}px`):n.style.removeProperty("--we-frame-label-lane"),d}function _w(n,l,s){const o=[];for(const u of n){const d=u.doc;if(!d)continue;const h=l.resolveSelectionEls(d,s);h.length>0&&o.push({handle:u,els:h})}return o}function ww(n,l){const s=n==null?void 0:n.querySelector(":scope > .we-guide");if(s){if(l===null){s.removeAttribute("data-active");return}s.style.setProperty("--we-g-bleed",`${l}px`),s.setAttribute("data-active","true")}}const Sw=24;function kw(n,l,s,o){if(n.height+2*o<=l)return n.top>=o&&n.bottom<=l-o?null:n.top<o?Math.max(0,s+n.top-o):Math.max(0,s+n.bottom-(l-o));const d=Math.max(0,s+n.top-o);return Math.abs(d-s)<1?null:d}function Ew(n,l,s,o){const u=l+n.top*s-o,d=n.height*s;return{top:u,bottom:u+d,height:d}}const Gg="__trEditorBridge",jw=1,A0=new WeakMap;function Mw(n){return n?n.kind==="section"?{kind:"section",instanceId:n.instance_id}:{kind:"slot",instanceId:n.instance_id,slotId:n.slot_id,...n.item_index!==void 0?{itemIndex:n.item_index}:{},...n.field_name!==void 0?{fieldName:n.field_name}:{}}:null}function Cw(n){const l=n[Gg];if(l)return l;const s=new Set,o={protocol:jw,selection:null,subscribe(u){return s.add(u),()=>{s.delete(u)}}};return A0.set(o,s),n[Gg]=o,o}function Aw(n,l,s){if(!n||!l)return;const u=Cw(n);u.selection=Mw(s);for(const d of[...A0.get(u)??[]])d()}function N0(n){var l,s,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(l=0;l<u;l++)n[l]&&(s=N0(n[l]))&&(o&&(o+=" "),o+=s)}else for(s in n)n[s]&&(o&&(o+=" "),o+=s);return o}function If(){for(var n,l,s=0,o="",u=arguments.length;s<u;s++)(n=arguments[s])&&(l=N0(n))&&(o&&(o+=" "),o+=l);return o}const Nw=(n,l)=>{const s=new Array(n.length+l.length);for(let o=0;o<n.length;o++)s[o]=n[o];for(let o=0;o<l.length;o++)s[n.length+o]=l[o];return s},Tw=(n,l)=>({classGroupId:n,validator:l}),T0=(n=new Map,l=null,s)=>({nextPart:n,validators:l,classGroupId:s}),ec="-",Ig=[],Ow="arbitrary..",Rw=n=>{const l=Dw(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=n;return{getClassGroupId:h=>{if(h.startsWith("[")&&h.endsWith("]"))return zw(h);const p=h.split(ec),m=p[0]===""&&p.length>1?1:0;return O0(p,m,l)},getConflictingClassGroupIds:(h,p)=>{if(p){const m=o[h],g=s[h];return m?g?Nw(g,m):m:g||Ig}return s[h]||Ig}}},O0=(n,l,s)=>{if(n.length-l===0)return s.classGroupId;const u=n[l],d=s.nextPart.get(u);if(d){const g=O0(n,l+1,d);if(g)return g}const h=s.validators;if(h===null)return;const p=l===0?n.join(ec):n.slice(l).join(ec),m=h.length;for(let g=0;g<m;g++){const x=h[g];if(x.validator(p))return x.classGroupId}},zw=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const l=n.slice(1,-1),s=l.indexOf(":"),o=l.slice(0,s);return o?Ow+o:void 0})(),Dw=n=>{const{theme:l,classGroups:s}=n;return Uw(s,l)},Uw=(n,l)=>{const s=T0();for(const o in n){const u=n[o];Qf(u,s,o,l)}return s},Qf=(n,l,s,o)=>{const u=n.length;for(let d=0;d<u;d++){const h=n[d];Lw(h,l,s,o)}},Lw=(n,l,s,o)=>{if(typeof n=="string"){Bw(n,l,s);return}if(typeof n=="function"){Hw(n,l,s,o);return}qw(n,l,s,o)},Bw=(n,l,s)=>{const o=n===""?l:R0(l,n);o.classGroupId=s},Hw=(n,l,s,o)=>{if(Gw(n)){Qf(n(o),l,s,o);return}l.validators===null&&(l.validators=[]),l.validators.push(Tw(s,n))},qw=(n,l,s,o)=>{const u=Object.entries(n),d=u.length;for(let h=0;h<d;h++){const[p,m]=u[h];Qf(m,R0(l,p),s,o)}},R0=(n,l)=>{let s=n;const o=l.split(ec),u=o.length;for(let d=0;d<u;d++){const h=o[d];let p=s.nextPart.get(h);p||(p=T0(),s.nextPart.set(h,p)),s=p}return s},Gw=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,Iw=n=>{if(n<1)return{get:()=>{},set:()=>{}};let l=0,s=Object.create(null),o=Object.create(null);const u=(d,h)=>{s[d]=h,l++,l>n&&(l=0,o=s,s=Object.create(null))};return{get(d){let h=s[d];if(h!==void 0)return h;if((h=o[d])!==void 0)return u(d,h),h},set(d,h){d in s?s[d]=h:u(d,h)}}},Jd="!",Qg=":",Qw=[],Vg=(n,l,s,o,u)=>({modifiers:n,hasImportantModifier:l,baseClassName:s,maybePostfixModifierPosition:o,isExternal:u}),Vw=n=>{const{prefix:l,experimentalParseClassName:s}=n;let o=u=>{const d=[];let h=0,p=0,m=0,g;const x=u.length;for(let C=0;C<x;C++){const M=u[C];if(h===0&&p===0){if(M===Qg){d.push(u.slice(m,C)),m=C+1;continue}if(M==="/"){g=C;continue}}M==="["?h++:M==="]"?h--:M==="("?p++:M===")"&&p--}const b=d.length===0?u:u.slice(m);let E=b,j=!1;b.endsWith(Jd)?(E=b.slice(0,-1),j=!0):b.startsWith(Jd)&&(E=b.slice(1),j=!0);const T=g&&g>m?g-m:void 0;return Vg(d,j,E,T)};if(l){const u=l+Qg,d=o;o=h=>h.startsWith(u)?d(h.slice(u.length)):Vg(Qw,!1,h,void 0,!0)}if(s){const u=o;o=d=>s({className:d,parseClassName:u})}return o},Yw=n=>{const l=new Map;return n.orderSensitiveModifiers.forEach((s,o)=>{l.set(s,1e6+o)}),s=>{const o=[];let u=[];for(let d=0;d<s.length;d++){const h=s[d],p=h[0]==="[",m=l.has(h);p||m?(u.length>0&&(u.sort(),o.push(...u),u=[]),o.push(h)):u.push(h)}return u.length>0&&(u.sort(),o.push(...u)),o}},Kw=n=>({cache:Iw(n.cacheSize),parseClassName:Vw(n),sortModifiers:Yw(n),postfixLookupClassGroupIds:$w(n),...Rw(n)}),$w=n=>{const l=Object.create(null),s=n.postfixLookupClassGroups;if(s)for(let o=0;o<s.length;o++)l[s[o]]=!0;return l},Xw=/\s+/,Fw=(n,l)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:u,sortModifiers:d,postfixLookupClassGroupIds:h}=l,p=[],m=n.trim().split(Xw);let g="";for(let x=m.length-1;x>=0;x-=1){const b=m[x],{isExternal:E,modifiers:j,hasImportantModifier:T,baseClassName:C,maybePostfixModifierPosition:M}=s(b);if(E){g=b+(g.length>0?" "+g:g);continue}let R=!!M,D;if(R){const W=C.substring(0,M);D=o(W);const L=D&&h[D]?o(C):void 0;L&&L!==D&&(D=L,R=!1)}else D=o(C);if(!D){if(!R){g=b+(g.length>0?" "+g:g);continue}if(D=o(C),!D){g=b+(g.length>0?" "+g:g);continue}R=!1}const z=j.length===0?"":j.length===1?j[0]:d(j).join(":"),I=T?z+Jd:z,le=I+D;if(p.indexOf(le)>-1)continue;p.push(le);const ne=u(D,R);for(let W=0;W<ne.length;++W){const L=ne[W];p.push(I+L)}g=b+(g.length>0?" "+g:g)}return g},Zw=(...n)=>{let l=0,s,o,u="";for(;l<n.length;)(s=n[l++])&&(o=z0(s))&&(u&&(u+=" "),u+=o);return u},z0=n=>{if(typeof n=="string")return n;let l,s="";for(let o=0;o<n.length;o++)n[o]&&(l=z0(n[o]))&&(s&&(s+=" "),s+=l);return s},Pw=(n,...l)=>{let s,o,u,d;const h=m=>{const g=l.reduce((x,b)=>b(x),n());return s=Kw(g),o=s.cache.get,u=s.cache.set,d=p,p(m)},p=m=>{const g=o(m);if(g)return g;const x=Fw(m,s);return u(m,x),x};return d=h,(...m)=>d(Zw(...m))},Jw=[],St=n=>{const l=s=>s[n]||Jw;return l.isThemeGetter=!0,l},D0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,U0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ww=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,eS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tS=/\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$/,nS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,aS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$a=n=>Ww.test(n),Le=n=>!!n&&!Number.isNaN(Number(n)),Ln=n=>!!n&&Number.isInteger(Number(n)),Ud=n=>n.endsWith("%")&&Le(n.slice(0,-1)),ua=n=>eS.test(n),L0=()=>!0,iS=n=>tS.test(n)&&!nS.test(n),Vf=()=>!1,sS=n=>aS.test(n),oS=n=>lS.test(n),rS=n=>!ve(n)&&!xe(n),cS=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)),uS=n=>rl(n,q0,Vf),ve=n=>D0.test(n),Ol=n=>rl(n,G0,iS),Yg=n=>rl(n,bS,Le),dS=n=>rl(n,Q0,L0),fS=n=>rl(n,I0,Vf),Kg=n=>rl(n,B0,Vf),hS=n=>rl(n,H0,oS),Ir=n=>rl(n,V0,sS),xe=n=>U0.test(n),no=n=>Jl(n,G0),mS=n=>Jl(n,I0),$g=n=>Jl(n,B0),pS=n=>Jl(n,q0),yS=n=>Jl(n,H0),Qr=n=>Jl(n,V0,!0),gS=n=>Jl(n,Q0,!0),rl=(n,l,s)=>{const o=D0.exec(n);return o?o[1]?l(o[1]):s(o[2]):!1},Jl=(n,l,s=!1)=>{const o=U0.exec(n);return o?o[1]?l(o[1]):s:!1},B0=n=>n==="position"||n==="percentage",H0=n=>n==="image"||n==="url",q0=n=>n==="length"||n==="size"||n==="bg-size",G0=n=>n==="length",bS=n=>n==="number",I0=n=>n==="family-name",Q0=n=>n==="number"||n==="weight",V0=n=>n==="shadow",vS=()=>{const n=St("color"),l=St("font"),s=St("text"),o=St("font-weight"),u=St("tracking"),d=St("leading"),h=St("breakpoint"),p=St("container"),m=St("spacing"),g=St("radius"),x=St("shadow"),b=St("inset-shadow"),E=St("text-shadow"),j=St("drop-shadow"),T=St("blur"),C=St("perspective"),M=St("aspect"),R=St("ease"),D=St("animate"),z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],le=()=>[...I(),xe,ve],ne=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto","contain","none"],L=()=>[xe,ve,m],ue=()=>[$a,"full","auto",...L()],de=()=>[Ln,"none","subgrid",xe,ve],re=()=>["auto",{span:["full",Ln,xe,ve]},Ln,xe,ve],ie=()=>[Ln,"auto",xe,ve],U=()=>["auto","min","max","fr",xe,ve],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],w=()=>["auto",...L()],F=()=>[$a,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],ce=()=>[$a,"screen","full","dvw","lvw","svw","min","max","fit",...L()],ee=()=>[$a,"screen","full","lh","dvh","lvh","svh","min","max","fit",...L()],G=()=>[n,xe,ve],S=()=>[...I(),$g,Kg,{position:[xe,ve]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Y=()=>["auto","cover","contain",pS,uS,{size:[xe,ve]}],N=()=>[Ud,no,Ol],P=()=>["","none","full",g,xe,ve],Q=()=>["",Le,no,Ol],Z=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ge=()=>[Le,Ud,$g,Kg],Ee=()=>["","none",T,xe,ve],Re=()=>["none",Le,xe,ve],Ue=()=>["none",Le,xe,ve],nt=()=>[Le,xe,ve],Ye=()=>[$a,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ua],breakpoint:[ua],color:[L0],container:[ua],"drop-shadow":[ua],ease:["in","out","in-out"],font:[rS],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ua],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ua],shadow:[ua],spacing:["px",Le],text:[ua],"text-shadow":[ua],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",$a,ve,xe,M]}],container:["container"],"container-type":[{"@container":["","normal","size",xe,ve]}],"container-named":[cS],columns:[{columns:[Le,ve,xe,p]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"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:le()}],overflow:[{overflow:ne()}],"overflow-x":[{"overflow-x":ne()}],"overflow-y":[{"overflow-y":ne()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ue()}],"inset-x":[{"inset-x":ue()}],"inset-y":[{"inset-y":ue()}],start:[{"inset-s":ue(),start:ue()}],end:[{"inset-e":ue(),end:ue()}],"inset-bs":[{"inset-bs":ue()}],"inset-be":[{"inset-be":ue()}],top:[{top:ue()}],right:[{right:ue()}],bottom:[{bottom:ue()}],left:[{left:ue()}],visibility:["visible","invisible","collapse"],z:[{z:[Ln,"auto",xe,ve]}],basis:[{basis:[$a,"full","auto",p,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,$a,"auto","initial","none",ve]}],grow:[{grow:["",Le,xe,ve]}],shrink:[{shrink:["",Le,xe,ve]}],order:[{order:[Ln,"first","last","none",xe,ve]}],"grid-cols":[{"grid-cols":de()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":ie()}],"col-end":[{"col-end":ie()}],"grid-rows":[{"grid-rows":de()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":ie()}],"row-end":[{"row-end":ie()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pbs:[{pbs:L()}],pbe:[{pbe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:w()}],mx:[{mx:w()}],my:[{my:w()}],ms:[{ms:w()}],me:[{me:w()}],mbs:[{mbs:w()}],mbe:[{mbe:w()}],mt:[{mt:w()}],mr:[{mr:w()}],mb:[{mb:w()}],ml:[{ml:w()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],"inline-size":[{inline:["auto",...ce()]}],"min-inline-size":[{"min-inline":["auto",...ce()]}],"max-inline-size":[{"max-inline":["none",...ce()]}],"block-size":[{block:["auto",...ee()]}],"min-block-size":[{"min-block":["auto",...ee()]}],"max-block-size":[{"max-block":["none",...ee()]}],w:[{w:[p,"screen",...F()]}],"min-w":[{"min-w":[p,"screen","none",...F()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[h]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",s,no,Ol]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,gS,dS]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ud,ve]}],"font-family":[{font:[mS,fS,l]}],"font-features":[{"font-features":[ve]}],"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:[u,xe,ve]}],"line-clamp":[{"line-clamp":[Le,"none",xe,Yg]}],leading:[{leading:[d,...L()]}],"list-image":[{"list-image":["none",xe,ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",xe,ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",xe,Ol]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[Le,"auto",xe,ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"tab-size":[{tab:[Ln,xe,ve]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xe,ve]}],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",xe,ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:S()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:Y()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ln,xe,ve],radial:["",xe,ve],conic:[Ln,xe,ve]},yS,hS]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:N()}],"gradient-via-pos":[{via:N()}],"gradient-to-pos":[{to:N()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-bs":[{"border-bs":Q()}],"border-w-be":[{"border-be":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z(),"hidden","none"]}],"divide-style":[{divide:[...Z(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-bs":[{"border-bs":G()}],"border-color-be":[{"border-be":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...Z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,xe,ve]}],"outline-w":[{outline:["",Le,no,Ol]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",x,Qr,Ir]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",b,Qr,Ir]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[Le,Ol]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",E,Qr,Ir]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[Le,xe,ve]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"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":[Le]}],"mask-image-linear-from-pos":[{"mask-linear-from":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[xe,ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"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":I()}],"mask-image-conic-pos":[{"mask-conic":[Le]}],"mask-image-conic-from-pos":[{"mask-conic-from":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:S()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:Y()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",xe,ve]}],filter:[{filter:["","none",xe,ve]}],blur:[{blur:Ee()}],brightness:[{brightness:[Le,xe,ve]}],contrast:[{contrast:[Le,xe,ve]}],"drop-shadow":[{"drop-shadow":["","none",j,Qr,Ir]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",Le,xe,ve]}],"hue-rotate":[{"hue-rotate":[Le,xe,ve]}],invert:[{invert:["",Le,xe,ve]}],saturate:[{saturate:[Le,xe,ve]}],sepia:[{sepia:["",Le,xe,ve]}],"backdrop-filter":[{"backdrop-filter":["","none",xe,ve]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[Le,xe,ve]}],"backdrop-contrast":[{"backdrop-contrast":[Le,xe,ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,xe,ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,xe,ve]}],"backdrop-invert":[{"backdrop-invert":["",Le,xe,ve]}],"backdrop-opacity":[{"backdrop-opacity":[Le,xe,ve]}],"backdrop-saturate":[{"backdrop-saturate":[Le,xe,ve]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,xe,ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",xe,ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",xe,ve]}],ease:[{ease:["linear","initial",R,xe,ve]}],delay:[{delay:[Le,xe,ve]}],animate:[{animate:["none",D,xe,ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,xe,ve]}],"perspective-origin":[{"perspective-origin":le()}],rotate:[{rotate:Re()}],"rotate-x":[{"rotate-x":Re()}],"rotate-y":[{"rotate-y":Re()}],"rotate-z":[{"rotate-z":Re()}],scale:[{scale:Ue()}],"scale-x":[{"scale-x":Ue()}],"scale-y":[{"scale-y":Ue()}],"scale-z":[{"scale-z":Ue()}],"scale-3d":["scale-3d"],skew:[{skew:nt()}],"skew-x":[{"skew-x":nt()}],"skew-y":[{"skew-y":nt()}],transform:[{transform:[xe,ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:le()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ye()}],"translate-x":[{"translate-x":Ye()}],"translate-y":[{"translate-y":Ye()}],"translate-z":[{"translate-z":Ye()}],"translate-none":["translate-none"],zoom:[{zoom:[Ln,xe,ve]}],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"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",xe,ve]}],"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":G()}],"scrollbar-track-color":[{"scrollbar-track":G()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mbs":[{"scroll-mbs":L()}],"scroll-mbe":[{"scroll-mbe":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pbs":[{"scroll-pbs":L()}],"scroll-pbe":[{"scroll-pbe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",xe,ve]}],fill:[{fill:["none",...G()]}],"stroke-w":[{stroke:[Le,no,Ol,Yg]}],stroke:[{stroke:["none",...G()]}],"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"]}},Yf=Pw(vS);function me(...n){return Yf(If(n))}function Xg(n){return(n==null?void 0:n.kind)!=="direct"?null:n.field==="logo_dark"?{kind:"logo",variant:"dark"}:n.field==="logo_light"?{kind:"logo",variant:"light"}:n.field==="headshot"?{kind:"headshot"}:null}function xS(n){return n.kind==="headshot"?"headshot":n.variant==="dark"?"logo_dark":"logo_light"}function Wd(n){if(typeof n!="object"||n===null)return null;const l=n,s=typeof l.photo_id=="string"&&l.photo_id.length>0?l.photo_id:null;return s||(typeof l.asset_id=="string"&&l.asset_id.length>0?l.asset_id:null)}/**
|
|
704
|
+
`,pw='<div class="we-guide"></div><div class="we-chrome-ring we-chrome-ring--hover"></div><div class="we-chrome-ring we-chrome-ring--selection"></div><div class="we-chrome-label"></div>',Wr="we-canvas-frame",Lg="we-frame-titlebar",Bg="we-canvas-frame-label",Hg="we-htabs",qg="we-chrome-overlay";function Ud(n,l,s){const o=n.querySelector(l);if(o)return o;const u=s();return n.appendChild(u),u}function yw(n,l){const s=n.querySelector(`:scope > .${Lg}`);if(s)return s;const o=l.createElement("div");return o.className=Lg,n.insertBefore(o,n.firstChild),o}function gw(n){for(let l=n.nextElementSibling;l;l=l.nextElementSibling)if(l.classList.contains(Wr))return l;return null}function bw(n,l){const s=n.ownerDocument,o=yw(n,s),u=l.label??"",d=o.querySelector(`:scope > .${Bg}`);if(u==="")d==null||d.remove();else{const x=d??o.insertBefore(s.createElement("div"),o.firstChild);x.className=Bg,x.textContent!==u&&(x.textContent=u)}const h=Ud(n,":scope > iframe",()=>s.createElement("iframe"));l.title!==void 0&&h.title!==l.title&&(h.title=l.title),l.sandbox!==void 0&&h.getAttribute("sandbox")!==l.sandbox&&h.setAttribute("sandbox",l.sandbox),h.getAttribute("srcdoc")!==l.srcdoc&&h.setAttribute("srcdoc",l.srcdoc);const p=Ud(n,`:scope > .${Hg}`,()=>{const x=s.createElement("div");return x.className=Hg,x}),m=Ud(n,`:scope > .${qg}`,()=>{const x=s.createElement("div");return x.className=qg,x.setAttribute("aria-hidden","true"),x});m.childElementCount===0&&(m.innerHTML=pw);const g=l.pageBox;return g?(n.style.setProperty("--we-page-w",`${g.width}px`),n.style.setProperty("--we-page-h",`${g.height}px`),n.style.setProperty("--we-page-radius","0px")):(n.style.removeProperty("--we-page-w"),n.style.removeProperty("--we-page-radius")),{iframe:h,overlay:m,tabLayer:p}}function vw(n,l,s){const{iframe:o}=s;return{key:l,wrapper:n,iframe:o,overlay:s.overlay,tabLayer:s.tabLayer,get doc(){return o.contentDocument},setPageHeight(u){n.style.setProperty("--we-page-h",`${u}px`)}}}function xw(n,l){const s=n.ownerDocument,o=new Map;for(const m of Array.from(n.querySelectorAll(`:scope > .${Wr}`))){const g=m.dataset.frameKey;g!==void 0&&o.set(g,m)}const u=[],d=[],h=new Set;for(const m of l){let g=o.get(m.key);g||(g=s.createElement("div"),g.className=Wr,g.dataset.frameKey=m.key);const x=bw(g,m);u.push(g),h.add(m.key),d.push(vw(g,m.key,x))}let p=null;for(let m=u.length-1;m>=0;m--){const g=u[m];g&&((g.parentNode!==n||gw(g)!==p)&&n.insertBefore(g,p),p=g)}return o.forEach((m,g)=>{h.has(g)||m.remove()}),l.some(m=>(m.label??"")!=="")?n.style.setProperty("--we-frame-label-lane",`${hw}px`):n.style.removeProperty("--we-frame-label-lane"),d}function _w(n,l,s){const o=[];for(const u of n){const d=u.doc;if(!d)continue;const h=l.resolveSelectionEls(d,s);h.length>0&&o.push({handle:u,els:h})}return o}function ww(n,l){const s=n==null?void 0:n.querySelector(":scope > .we-guide");if(s){if(l===null){s.removeAttribute("data-active");return}s.style.setProperty("--we-g-bleed",`${l}px`),s.setAttribute("data-active","true")}}const Sw=24;function kw(n,l,s,o){if(n.height+2*o<=l)return n.top>=o&&n.bottom<=l-o?null:n.top<o?Math.max(0,s+n.top-o):Math.max(0,s+n.bottom-(l-o));const d=Math.max(0,s+n.top-o);return Math.abs(d-s)<1?null:d}function Ew(n,l,s,o){const u=l+n.top*s-o,d=n.height*s;return{top:u,bottom:u+d,height:d}}const Gg="__trEditorBridge",jw=1,A0=new WeakMap;function Mw(n){return n?n.kind==="section"?{kind:"section",instanceId:n.instance_id}:{kind:"slot",instanceId:n.instance_id,slotId:n.slot_id,...n.item_index!==void 0?{itemIndex:n.item_index}:{},...n.field_name!==void 0?{fieldName:n.field_name}:{}}:null}function Cw(n){const l=n[Gg];if(l)return l;const s=new Set,o={protocol:jw,selection:null,subscribe(u){return s.add(u),()=>{s.delete(u)}}};return A0.set(o,s),n[Gg]=o,o}function Aw(n,l,s){if(!n||!l)return;const u=Cw(n);u.selection=Mw(s);for(const d of[...A0.get(u)??[]])d()}function N0(n){var l,s,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(l=0;l<u;l++)n[l]&&(s=N0(n[l]))&&(o&&(o+=" "),o+=s)}else for(s in n)n[s]&&(o&&(o+=" "),o+=s);return o}function Qf(){for(var n,l,s=0,o="",u=arguments.length;s<u;s++)(n=arguments[s])&&(l=N0(n))&&(o&&(o+=" "),o+=l);return o}const Nw=(n,l)=>{const s=new Array(n.length+l.length);for(let o=0;o<n.length;o++)s[o]=n[o];for(let o=0;o<l.length;o++)s[n.length+o]=l[o];return s},Tw=(n,l)=>({classGroupId:n,validator:l}),T0=(n=new Map,l=null,s)=>({nextPart:n,validators:l,classGroupId:s}),ec="-",Ig=[],Ow="arbitrary..",Rw=n=>{const l=Dw(n),{conflictingClassGroups:s,conflictingClassGroupModifiers:o}=n;return{getClassGroupId:h=>{if(h.startsWith("[")&&h.endsWith("]"))return zw(h);const p=h.split(ec),m=p[0]===""&&p.length>1?1:0;return O0(p,m,l)},getConflictingClassGroupIds:(h,p)=>{if(p){const m=o[h],g=s[h];return m?g?Nw(g,m):m:g||Ig}return s[h]||Ig}}},O0=(n,l,s)=>{if(n.length-l===0)return s.classGroupId;const u=n[l],d=s.nextPart.get(u);if(d){const g=O0(n,l+1,d);if(g)return g}const h=s.validators;if(h===null)return;const p=l===0?n.join(ec):n.slice(l).join(ec),m=h.length;for(let g=0;g<m;g++){const x=h[g];if(x.validator(p))return x.classGroupId}},zw=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const l=n.slice(1,-1),s=l.indexOf(":"),o=l.slice(0,s);return o?Ow+o:void 0})(),Dw=n=>{const{theme:l,classGroups:s}=n;return Uw(s,l)},Uw=(n,l)=>{const s=T0();for(const o in n){const u=n[o];Vf(u,s,o,l)}return s},Vf=(n,l,s,o)=>{const u=n.length;for(let d=0;d<u;d++){const h=n[d];Lw(h,l,s,o)}},Lw=(n,l,s,o)=>{if(typeof n=="string"){Bw(n,l,s);return}if(typeof n=="function"){Hw(n,l,s,o);return}qw(n,l,s,o)},Bw=(n,l,s)=>{const o=n===""?l:R0(l,n);o.classGroupId=s},Hw=(n,l,s,o)=>{if(Gw(n)){Vf(n(o),l,s,o);return}l.validators===null&&(l.validators=[]),l.validators.push(Tw(s,n))},qw=(n,l,s,o)=>{const u=Object.entries(n),d=u.length;for(let h=0;h<d;h++){const[p,m]=u[h];Vf(m,R0(l,p),s,o)}},R0=(n,l)=>{let s=n;const o=l.split(ec),u=o.length;for(let d=0;d<u;d++){const h=o[d];let p=s.nextPart.get(h);p||(p=T0(),s.nextPart.set(h,p)),s=p}return s},Gw=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,Iw=n=>{if(n<1)return{get:()=>{},set:()=>{}};let l=0,s=Object.create(null),o=Object.create(null);const u=(d,h)=>{s[d]=h,l++,l>n&&(l=0,o=s,s=Object.create(null))};return{get(d){let h=s[d];if(h!==void 0)return h;if((h=o[d])!==void 0)return u(d,h),h},set(d,h){d in s?s[d]=h:u(d,h)}}},Wd="!",Qg=":",Qw=[],Vg=(n,l,s,o,u)=>({modifiers:n,hasImportantModifier:l,baseClassName:s,maybePostfixModifierPosition:o,isExternal:u}),Vw=n=>{const{prefix:l,experimentalParseClassName:s}=n;let o=u=>{const d=[];let h=0,p=0,m=0,g;const x=u.length;for(let C=0;C<x;C++){const M=u[C];if(h===0&&p===0){if(M===Qg){d.push(u.slice(m,C)),m=C+1;continue}if(M==="/"){g=C;continue}}M==="["?h++:M==="]"?h--:M==="("?p++:M===")"&&p--}const b=d.length===0?u:u.slice(m);let E=b,j=!1;b.endsWith(Wd)?(E=b.slice(0,-1),j=!0):b.startsWith(Wd)&&(E=b.slice(1),j=!0);const T=g&&g>m?g-m:void 0;return Vg(d,j,E,T)};if(l){const u=l+Qg,d=o;o=h=>h.startsWith(u)?d(h.slice(u.length)):Vg(Qw,!1,h,void 0,!0)}if(s){const u=o;o=d=>s({className:d,parseClassName:u})}return o},Yw=n=>{const l=new Map;return n.orderSensitiveModifiers.forEach((s,o)=>{l.set(s,1e6+o)}),s=>{const o=[];let u=[];for(let d=0;d<s.length;d++){const h=s[d],p=h[0]==="[",m=l.has(h);p||m?(u.length>0&&(u.sort(),o.push(...u),u=[]),o.push(h)):u.push(h)}return u.length>0&&(u.sort(),o.push(...u)),o}},Kw=n=>({cache:Iw(n.cacheSize),parseClassName:Vw(n),sortModifiers:Yw(n),postfixLookupClassGroupIds:$w(n),...Rw(n)}),$w=n=>{const l=Object.create(null),s=n.postfixLookupClassGroups;if(s)for(let o=0;o<s.length;o++)l[s[o]]=!0;return l},Xw=/\s+/,Fw=(n,l)=>{const{parseClassName:s,getClassGroupId:o,getConflictingClassGroupIds:u,sortModifiers:d,postfixLookupClassGroupIds:h}=l,p=[],m=n.trim().split(Xw);let g="";for(let x=m.length-1;x>=0;x-=1){const b=m[x],{isExternal:E,modifiers:j,hasImportantModifier:T,baseClassName:C,maybePostfixModifierPosition:M}=s(b);if(E){g=b+(g.length>0?" "+g:g);continue}let R=!!M,D;if(R){const W=C.substring(0,M);D=o(W);const L=D&&h[D]?o(C):void 0;L&&L!==D&&(D=L,R=!1)}else D=o(C);if(!D){if(!R){g=b+(g.length>0?" "+g:g);continue}if(D=o(C),!D){g=b+(g.length>0?" "+g:g);continue}R=!1}const z=j.length===0?"":j.length===1?j[0]:d(j).join(":"),I=T?z+Wd:z,le=I+D;if(p.indexOf(le)>-1)continue;p.push(le);const ne=u(D,R);for(let W=0;W<ne.length;++W){const L=ne[W];p.push(I+L)}g=b+(g.length>0?" "+g:g)}return g},Zw=(...n)=>{let l=0,s,o,u="";for(;l<n.length;)(s=n[l++])&&(o=z0(s))&&(u&&(u+=" "),u+=o);return u},z0=n=>{if(typeof n=="string")return n;let l,s="";for(let o=0;o<n.length;o++)n[o]&&(l=z0(n[o]))&&(s&&(s+=" "),s+=l);return s},Pw=(n,...l)=>{let s,o,u,d;const h=m=>{const g=l.reduce((x,b)=>b(x),n());return s=Kw(g),o=s.cache.get,u=s.cache.set,d=p,p(m)},p=m=>{const g=o(m);if(g)return g;const x=Fw(m,s);return u(m,x),x};return d=h,(...m)=>d(Zw(...m))},Jw=[],St=n=>{const l=s=>s[n]||Jw;return l.isThemeGetter=!0,l},D0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,U0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ww=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,eS=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tS=/\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$/,nS=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,aS=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lS=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$a=n=>Ww.test(n),Le=n=>!!n&&!Number.isNaN(Number(n)),Ln=n=>!!n&&Number.isInteger(Number(n)),Ld=n=>n.endsWith("%")&&Le(n.slice(0,-1)),ua=n=>eS.test(n),L0=()=>!0,iS=n=>tS.test(n)&&!nS.test(n),Yf=()=>!1,sS=n=>aS.test(n),oS=n=>lS.test(n),rS=n=>!ve(n)&&!xe(n),cS=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)),uS=n=>rl(n,q0,Yf),ve=n=>D0.test(n),Ol=n=>rl(n,G0,iS),Yg=n=>rl(n,bS,Le),dS=n=>rl(n,Q0,L0),fS=n=>rl(n,I0,Yf),Kg=n=>rl(n,B0,Yf),hS=n=>rl(n,H0,oS),Ir=n=>rl(n,V0,sS),xe=n=>U0.test(n),no=n=>Jl(n,G0),mS=n=>Jl(n,I0),$g=n=>Jl(n,B0),pS=n=>Jl(n,q0),yS=n=>Jl(n,H0),Qr=n=>Jl(n,V0,!0),gS=n=>Jl(n,Q0,!0),rl=(n,l,s)=>{const o=D0.exec(n);return o?o[1]?l(o[1]):s(o[2]):!1},Jl=(n,l,s=!1)=>{const o=U0.exec(n);return o?o[1]?l(o[1]):s:!1},B0=n=>n==="position"||n==="percentage",H0=n=>n==="image"||n==="url",q0=n=>n==="length"||n==="size"||n==="bg-size",G0=n=>n==="length",bS=n=>n==="number",I0=n=>n==="family-name",Q0=n=>n==="number"||n==="weight",V0=n=>n==="shadow",vS=()=>{const n=St("color"),l=St("font"),s=St("text"),o=St("font-weight"),u=St("tracking"),d=St("leading"),h=St("breakpoint"),p=St("container"),m=St("spacing"),g=St("radius"),x=St("shadow"),b=St("inset-shadow"),E=St("text-shadow"),j=St("drop-shadow"),T=St("blur"),C=St("perspective"),M=St("aspect"),R=St("ease"),D=St("animate"),z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],le=()=>[...I(),xe,ve],ne=()=>["auto","hidden","clip","visible","scroll"],W=()=>["auto","contain","none"],L=()=>[xe,ve,m],ue=()=>[$a,"full","auto",...L()],de=()=>[Ln,"none","subgrid",xe,ve],re=()=>["auto",{span:["full",Ln,xe,ve]},Ln,xe,ve],ie=()=>[Ln,"auto",xe,ve],U=()=>["auto","min","max","fr",xe,ve],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],w=()=>["auto",...L()],F=()=>[$a,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],ce=()=>[$a,"screen","full","dvw","lvw","svw","min","max","fit",...L()],ee=()=>[$a,"screen","full","lh","dvh","lvh","svh","min","max","fit",...L()],G=()=>[n,xe,ve],S=()=>[...I(),$g,Kg,{position:[xe,ve]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Y=()=>["auto","cover","contain",pS,uS,{size:[xe,ve]}],N=()=>[Ld,no,Ol],P=()=>["","none","full",g,xe,ve],Q=()=>["",Le,no,Ol],Z=()=>["solid","dashed","dotted","double"],pe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ge=()=>[Le,Ld,$g,Kg],Ee=()=>["","none",T,xe,ve],Re=()=>["none",Le,xe,ve],Ue=()=>["none",Le,xe,ve],nt=()=>[Le,xe,ve],Ye=()=>[$a,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ua],breakpoint:[ua],color:[L0],container:[ua],"drop-shadow":[ua],ease:["in","out","in-out"],font:[rS],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ua],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ua],shadow:[ua],spacing:["px",Le],text:[ua],"text-shadow":[ua],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",$a,ve,xe,M]}],container:["container"],"container-type":[{"@container":["","normal","size",xe,ve]}],"container-named":[cS],columns:[{columns:[Le,ve,xe,p]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"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:le()}],overflow:[{overflow:ne()}],"overflow-x":[{"overflow-x":ne()}],"overflow-y":[{"overflow-y":ne()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ue()}],"inset-x":[{"inset-x":ue()}],"inset-y":[{"inset-y":ue()}],start:[{"inset-s":ue(),start:ue()}],end:[{"inset-e":ue(),end:ue()}],"inset-bs":[{"inset-bs":ue()}],"inset-be":[{"inset-be":ue()}],top:[{top:ue()}],right:[{right:ue()}],bottom:[{bottom:ue()}],left:[{left:ue()}],visibility:["visible","invisible","collapse"],z:[{z:[Ln,"auto",xe,ve]}],basis:[{basis:[$a,"full","auto",p,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,$a,"auto","initial","none",ve]}],grow:[{grow:["",Le,xe,ve]}],shrink:[{shrink:["",Le,xe,ve]}],order:[{order:[Ln,"first","last","none",xe,ve]}],"grid-cols":[{"grid-cols":de()}],"col-start-end":[{col:re()}],"col-start":[{"col-start":ie()}],"col-end":[{"col-end":ie()}],"grid-rows":[{"grid-rows":de()}],"row-start-end":[{row:re()}],"row-start":[{"row-start":ie()}],"row-end":[{"row-end":ie()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pbs:[{pbs:L()}],pbe:[{pbe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:w()}],mx:[{mx:w()}],my:[{my:w()}],ms:[{ms:w()}],me:[{me:w()}],mbs:[{mbs:w()}],mbe:[{mbe:w()}],mt:[{mt:w()}],mr:[{mr:w()}],mb:[{mb:w()}],ml:[{ml:w()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],"inline-size":[{inline:["auto",...ce()]}],"min-inline-size":[{"min-inline":["auto",...ce()]}],"max-inline-size":[{"max-inline":["none",...ce()]}],"block-size":[{block:["auto",...ee()]}],"min-block-size":[{"min-block":["auto",...ee()]}],"max-block-size":[{"max-block":["none",...ee()]}],w:[{w:[p,"screen",...F()]}],"min-w":[{"min-w":[p,"screen","none",...F()]}],"max-w":[{"max-w":[p,"screen","none","prose",{screen:[h]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",s,no,Ol]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,gS,dS]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ld,ve]}],"font-family":[{font:[mS,fS,l]}],"font-features":[{"font-features":[ve]}],"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:[u,xe,ve]}],"line-clamp":[{"line-clamp":[Le,"none",xe,Yg]}],leading:[{leading:[d,...L()]}],"list-image":[{"list-image":["none",xe,ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",xe,ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",xe,Ol]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[Le,"auto",xe,ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"tab-size":[{tab:[Ln,xe,ve]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xe,ve]}],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",xe,ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:S()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:Y()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ln,xe,ve],radial:["",xe,ve],conic:[Ln,xe,ve]},yS,hS]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:N()}],"gradient-via-pos":[{via:N()}],"gradient-to-pos":[{to:N()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-bs":[{"border-bs":Q()}],"border-w-be":[{"border-be":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Z(),"hidden","none"]}],"divide-style":[{divide:[...Z(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-bs":[{"border-bs":G()}],"border-color-be":[{"border-be":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...Z(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,xe,ve]}],"outline-w":[{outline:["",Le,no,Ol]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",x,Qr,Ir]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",b,Qr,Ir]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[Le,Ol]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",E,Qr,Ir]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[Le,xe,ve]}],"mix-blend":[{"mix-blend":[...pe(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":pe()}],"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":[Le]}],"mask-image-linear-from-pos":[{"mask-linear-from":ge()}],"mask-image-linear-to-pos":[{"mask-linear-to":ge()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":ge()}],"mask-image-t-to-pos":[{"mask-t-to":ge()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":ge()}],"mask-image-r-to-pos":[{"mask-r-to":ge()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":ge()}],"mask-image-b-to-pos":[{"mask-b-to":ge()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":ge()}],"mask-image-l-to-pos":[{"mask-l-to":ge()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":ge()}],"mask-image-x-to-pos":[{"mask-x-to":ge()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":ge()}],"mask-image-y-to-pos":[{"mask-y-to":ge()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[xe,ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":ge()}],"mask-image-radial-to-pos":[{"mask-radial-to":ge()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"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":I()}],"mask-image-conic-pos":[{"mask-conic":[Le]}],"mask-image-conic-from-pos":[{"mask-conic-from":ge()}],"mask-image-conic-to-pos":[{"mask-conic-to":ge()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:S()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:Y()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",xe,ve]}],filter:[{filter:["","none",xe,ve]}],blur:[{blur:Ee()}],brightness:[{brightness:[Le,xe,ve]}],contrast:[{contrast:[Le,xe,ve]}],"drop-shadow":[{"drop-shadow":["","none",j,Qr,Ir]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",Le,xe,ve]}],"hue-rotate":[{"hue-rotate":[Le,xe,ve]}],invert:[{invert:["",Le,xe,ve]}],saturate:[{saturate:[Le,xe,ve]}],sepia:[{sepia:["",Le,xe,ve]}],"backdrop-filter":[{"backdrop-filter":["","none",xe,ve]}],"backdrop-blur":[{"backdrop-blur":Ee()}],"backdrop-brightness":[{"backdrop-brightness":[Le,xe,ve]}],"backdrop-contrast":[{"backdrop-contrast":[Le,xe,ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,xe,ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,xe,ve]}],"backdrop-invert":[{"backdrop-invert":["",Le,xe,ve]}],"backdrop-opacity":[{"backdrop-opacity":[Le,xe,ve]}],"backdrop-saturate":[{"backdrop-saturate":[Le,xe,ve]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,xe,ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",xe,ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",xe,ve]}],ease:[{ease:["linear","initial",R,xe,ve]}],delay:[{delay:[Le,xe,ve]}],animate:[{animate:["none",D,xe,ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,xe,ve]}],"perspective-origin":[{"perspective-origin":le()}],rotate:[{rotate:Re()}],"rotate-x":[{"rotate-x":Re()}],"rotate-y":[{"rotate-y":Re()}],"rotate-z":[{"rotate-z":Re()}],scale:[{scale:Ue()}],"scale-x":[{"scale-x":Ue()}],"scale-y":[{"scale-y":Ue()}],"scale-z":[{"scale-z":Ue()}],"scale-3d":["scale-3d"],skew:[{skew:nt()}],"skew-x":[{"skew-x":nt()}],"skew-y":[{"skew-y":nt()}],transform:[{transform:[xe,ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:le()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ye()}],"translate-x":[{"translate-x":Ye()}],"translate-y":[{"translate-y":Ye()}],"translate-z":[{"translate-z":Ye()}],"translate-none":["translate-none"],zoom:[{zoom:[Ln,xe,ve]}],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}],"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",xe,ve]}],"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":G()}],"scrollbar-track-color":[{"scrollbar-track":G()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mbs":[{"scroll-mbs":L()}],"scroll-mbe":[{"scroll-mbe":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pbs":[{"scroll-pbs":L()}],"scroll-pbe":[{"scroll-pbe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",xe,ve]}],fill:[{fill:["none",...G()]}],"stroke-w":[{stroke:[Le,no,Ol,Yg]}],stroke:[{stroke:["none",...G()]}],"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"]}},Kf=Pw(vS);function me(...n){return Kf(Qf(n))}function Xg(n){return(n==null?void 0:n.kind)!=="direct"?null:n.field==="logo_dark"?{kind:"logo",variant:"dark"}:n.field==="logo_light"?{kind:"logo",variant:"light"}:n.field==="headshot"?{kind:"headshot"}:null}function xS(n){return n.kind==="headshot"?"headshot":n.variant==="dark"?"logo_dark":"logo_light"}function ef(n){if(typeof n!="object"||n===null)return null;const l=n,s=typeof l.photo_id=="string"&&l.photo_id.length>0?l.photo_id:null;return s||(typeof l.asset_id=="string"&&l.asset_id.length>0?l.asset_id:null)}/**
|
|
699
705
|
* @license lucide-react v1.28.0 - ISC
|
|
700
706
|
*
|
|
701
707
|
* This source code is licensed under the ISC license.
|
|
@@ -720,12 +726,12 @@ Error generating stack: `+i.message+`
|
|
|
720
726
|
*
|
|
721
727
|
* This source code is licensed under the ISC license.
|
|
722
728
|
* See the LICENSE file in the root directory of this source tree.
|
|
723
|
-
*/var
|
|
729
|
+
*/var Bd={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"};/**
|
|
724
730
|
* @license lucide-react v1.28.0 - ISC
|
|
725
731
|
*
|
|
726
732
|
* This source code is licensed under the ISC license.
|
|
727
733
|
* See the LICENSE file in the root directory of this source tree.
|
|
728
|
-
*/const SS=n=>{for(const l in n)if(l.startsWith("aria-")||l==="role"||l==="title")return!0;return!1},kS=_.createContext({}),ES=()=>_.useContext(kS),jS=_.forwardRef(({color:n,size:l,strokeWidth:s,absoluteStrokeWidth:o,className:u="",children:d,iconNode:h,...p},m)=>{const{size:g=24,strokeWidth:x=2,absoluteStrokeWidth:b=!1,color:E="currentColor",className:j=""}=ES()??{},T=o??b?Number(s??x)*24/Number(l??g):s??x;return _.createElement("svg",{ref:m,...
|
|
734
|
+
*/const SS=n=>{for(const l in n)if(l.startsWith("aria-")||l==="role"||l==="title")return!0;return!1},kS=_.createContext({}),ES=()=>_.useContext(kS),jS=_.forwardRef(({color:n,size:l,strokeWidth:s,absoluteStrokeWidth:o,className:u="",children:d,iconNode:h,...p},m)=>{const{size:g=24,strokeWidth:x=2,absoluteStrokeWidth:b=!1,color:E="currentColor",className:j=""}=ES()??{},T=o??b?Number(s??x)*24/Number(l??g):s??x;return _.createElement("svg",{ref:m,...Bd,width:l??g??Bd.width,height:l??g??Bd.height,stroke:n??E,strokeWidth:T,className:Y0("lucide",j,u),...!d&&!SS(p)&&{"aria-hidden":"true"},...p},[...h.map(([C,M])=>_.createElement(C,M)),...Array.isArray(d)?d:[d]])});/**
|
|
729
735
|
* @license lucide-react v1.28.0 - ISC
|
|
730
736
|
*
|
|
731
737
|
* This source code is licensed under the ISC license.
|
|
@@ -775,7 +781,7 @@ Error generating stack: `+i.message+`
|
|
|
775
781
|
*
|
|
776
782
|
* This source code is licensed under the ISC license.
|
|
777
783
|
* See the LICENSE file in the root directory of this source tree.
|
|
778
|
-
*/const QS=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]
|
|
784
|
+
*/const QS=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],$f=ye("box",QS);/**
|
|
779
785
|
* @license lucide-react v1.28.0 - ISC
|
|
780
786
|
*
|
|
781
787
|
* This source code is licensed under the ISC license.
|
|
@@ -875,7 +881,7 @@ Error generating stack: `+i.message+`
|
|
|
875
881
|
*
|
|
876
882
|
* This source code is licensed under the ISC license.
|
|
877
883
|
* See the LICENSE file in the root directory of this source tree.
|
|
878
|
-
*/const kk=[["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 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]
|
|
884
|
+
*/const kk=[["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 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Xf=ye("file-text",kk);/**
|
|
879
885
|
* @license lucide-react v1.28.0 - ISC
|
|
880
886
|
*
|
|
881
887
|
* This source code is licensed under the ISC license.
|
|
@@ -905,7 +911,7 @@ Error generating stack: `+i.message+`
|
|
|
905
911
|
*
|
|
906
912
|
* This source code is licensed under the ISC license.
|
|
907
913
|
* See the LICENSE file in the root directory of this source tree.
|
|
908
|
-
*/const zk=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],
|
|
914
|
+
*/const zk=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Ff=ye("image",zk);/**
|
|
909
915
|
* @license lucide-react v1.28.0 - ISC
|
|
910
916
|
*
|
|
911
917
|
* This source code is licensed under the ISC license.
|
|
@@ -1030,7 +1036,7 @@ Error generating stack: `+i.message+`
|
|
|
1030
1036
|
*
|
|
1031
1037
|
* This source code is licensed under the ISC license.
|
|
1032
1038
|
* See the LICENSE file in the root directory of this source tree.
|
|
1033
|
-
*/const j5=[["path",{d:"m15.194 13.707 3.814 1.86-1.86 3.814",key:"16shm9"}],["path",{d:"M16.47214 7.52786 A 5 10 0 1 0 13 21.79796",key:"1245p8"}],["path",{d:"M21.79796 11 A 10 5 0 1 0 19 15.57071",key:"1i40ks"}]],
|
|
1039
|
+
*/const j5=[["path",{d:"m15.194 13.707 3.814 1.86-1.86 3.814",key:"16shm9"}],["path",{d:"M16.47214 7.52786 A 5 10 0 1 0 13 21.79796",key:"1245p8"}],["path",{d:"M21.79796 11 A 10 5 0 1 0 19 15.57071",key:"1i40ks"}]],Zf=ye("rotate-3d",j5);/**
|
|
1034
1040
|
* @license lucide-react v1.28.0 - ISC
|
|
1035
1041
|
*
|
|
1036
1042
|
* This source code is licensed under the ISC license.
|
|
@@ -1095,7 +1101,7 @@ Error generating stack: `+i.message+`
|
|
|
1095
1101
|
*
|
|
1096
1102
|
* This source code is licensed under the ISC license.
|
|
1097
1103
|
* See the LICENSE file in the root directory of this source tree.
|
|
1098
|
-
*/const $5=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],lv=ye("x",$5),Zf="flex flex-col gap-3.5 pt-1",Qn="flex flex-col gap-1",X5="flex items-center justify-between gap-2.5",va="text-[length:calc(11*var(--content))] font-medium text-ink-4 pl-0.5",Pf="m-0 text-caption leading-[1.4] text-danger",cc="bg-[repeating-linear-gradient(135deg,rgba(20,18,13,0.05)_0_1px,transparent_1px_9px)]",ot="appearance-none cursor-pointer border-0 bg-transparent p-0 m-0 outline-none",vo="flex w-full items-stretch rounded-[calc(8*var(--content))] border border-line bg-white transition-[border-color,box-shadow] duration-[120ms] focus-within:border-accent focus-within:shadow-[0_0_0_3px_rgba(15,42,34,0.07)]",ss="min-w-0 flex-1 appearance-none border-0 bg-transparent px-2.75 py-2.25 text-[length:calc(13.5*var(--content))] text-ink outline-none placeholder:text-ink-4",ef="flex items-center text-[length:calc(12.5*var(--content))] text-ink-4",F5=me(ot,"min-w-0 flex-1 bg-transparent text-ink outline-none placeholder:text-ink-4");function xo(n,l="Item"){const s=(n??"").trim().split(/\s+/).filter(Boolean),o=s.length>0?s[s.length-1]:l,u=Z5(o);return u.charAt(0).toUpperCase()+u.slice(1)}function Z5(n){return/[^aeiou]ies$/i.test(n)?n.slice(0,-3)+"y":/(?:s|x|z|ch|sh)es$/i.test(n)?n.slice(0,-2):/[^s]s$/i.test(n)?n.slice(0,-1):n}function P5(n,l){const s="font-mono text-[length:calc(10.5*var(--content))] text-ink-4 [font-feature-settings:'tnum'] shrink-0";return l==null?s:n>l?me(s,"text-danger"):n>=l*.9?me(s,"text-[#7a5a14]"):s}function iv({label:n,count:l,max:s,right:o,revealed:u=!0}){return f.jsxs("div",{className:X5,children:[f.jsx("span",{className:va,children:n}),f.jsx("div",{className:"flex items-center gap-1.5",children:o??(s!=null&&l!=null&&f.jsxs("span",{"aria-hidden":!u,className:me(P5(l,s),"transition-[opacity,transform] duration-150 ease-out motion-reduce:transition-none",u?"opacity-100 translate-y-0":"opacity-0 translate-y-1"),children:[l," / ",s]}))})]})}function Jf({children:n}){return f.jsx("span",{className:va,children:n})}function Zr({value:n,onChange:l,label:s,max:o,count:u,headerRight:d,placeholder:h,multiline:p=!1,rows:m=3,inputMode:g,maxLength:x,spellCheck:b,bare:E=!1,className:j,ariaLabel:T,id:C}){const[M,R]=_.useState(!1),D=ne=>l(ne.target.value),z=()=>R(!0),I=()=>R(!1);if(E)return f.jsx("input",{id:C,className:me(F5,j),value:n,placeholder:h,inputMode:g,maxLength:x,spellCheck:b,"aria-label":T,onChange:D});const le=s!=null||d!=null||o!=null;return f.jsxs("div",{className:Qn,children:[le&&f.jsx(iv,{label:s??"",count:u??n.length,max:o,right:d,revealed:M}),f.jsx("div",{className:vo,children:p?f.jsx("textarea",{id:C,className:me(ss,"min-h-[calc(76*var(--content))] resize-none leading-[1.5]",j),rows:m,value:n,placeholder:h,maxLength:x,spellCheck:b,"aria-label":T,onChange:D,onFocus:z,onBlur:I}):f.jsx("input",{id:C,className:me(ss,j),value:n,placeholder:h,inputMode:g,maxLength:x,spellCheck:b,"aria-label":T,onChange:D,onFocus:z,onBlur:I})})]})}function It(n,l,s=1.5){const o=n;return function({size:d=l}={}){return f.jsx(o,{size:d,strokeWidth:s,style:{width:`calc(${d} * var(--content))`,height:`calc(${d} * var(--content))`}})}}const De={swap:It(zS,13),crop:It(fk,13),eye:It(F0,13),eyeOff:It(X0,13),trash:It(tv,11),plus:It(J0,14),up:It(nv,15),link:It(Kk,13),play:({size:n=20}={})=>f.jsx(g5,{size:n,strokeWidth:0,fill:"currentColor",style:{width:`calc(${n} * var(--content))`,height:`calc(${n} * var(--content))`}}),tour:It(Ff,18),search:It(ev,14),x:It(lv,15),check:It(K0,13),minus:It(i5,16),external:It($0,11),grip:It(Z0,13,1.8)},J5="flex max-h-full w-full flex-col overflow-hidden rounded-[14px] bg-canvas shadow-[0_24px_70px_-24px_rgba(20,18,13,0.5),0_2px_0_rgba(20,18,13,0.04)]",sv="flex flex-shrink-0 items-center gap-[14px] border-b border-line-soft px-[18px] py-4",ov="mr-auto flex min-w-0 flex-col gap-0.5",rv="m-0 text-[16px] font-semibold tracking-[-0.01em]",W5="text-[12px] text-ink-3",cv=me(ot,"grid size-8 flex-shrink-0 place-items-center rounded-[8px] text-ink-3 hover:bg-[#f1f0ea] hover:text-ink"),uv="flex flex-shrink-0 items-center justify-between gap-3 border-t border-line-soft px-[18px] py-[13px]",dv="ml-auto flex gap-2",fv=me(ot,"inline-flex h-9 items-center gap-1.5 rounded-[9px] border border-transparent px-4 text-[13px] font-semibold"),hv=me(fv,"border-line bg-white text-ink hover:bg-[#faf9f6]"),Wf=me(fv,"border-honey-2 bg-honey text-honey-ink hover:bg-honey-2 disabled:cursor-default disabled:opacity-45"),e4=me(ot,"inline-flex h-9 items-center px-1 font-medium text-ink-2 hover:text-ink"),Zg="flex flex-shrink-0 gap-2.5 px-[18px] pb-3 pt-[14px]",Pg="flex h-[38px] flex-1 items-center gap-2 rounded-[9px] border border-line bg-white px-3 transition-[border-color] duration-[120ms] focus-within:border-accent",Jg="grid flex-shrink-0 place-items-center text-ink-3",Wg="flex-1 border-0 bg-transparent text-[13.5px] text-ink",t4="min-h-0 flex-1 overflow-y-auto px-[18px] pb-[18px] pt-0.5",n4="grid grid-cols-4 gap-x-3 gap-y-[14px]",a4="col-span-full py-12 text-center text-[13px] text-ink-3",l4=me(ot,"group/cell flex flex-col gap-1.5 text-left"),i4="flex h-[120px] items-center justify-center",s4="relative mx-auto w-fit max-w-full overflow-hidden rounded-[9px] border border-line transition-[box-shadow,border-color] duration-[120ms] group-hover/cell:border-ink-4 group-data-[selected]/cell:border-accent group-data-[selected]/cell:shadow-[0_0_0_3px_rgba(15,42,34,0.18)]",eb="block h-auto max-h-[120px] w-auto max-w-full",o4="absolute right-1.5 top-1.5 grid size-[22px] place-items-center rounded-full bg-accent text-white shadow-[0_2px_6px_rgba(0,0,0,0.25)]",r4="relative grid h-[120px] w-[160px] place-items-center bg-[#e6e3da] text-ink-3",c4="block w-full truncate text-center text-[11.5px] leading-[1.35] text-ink-2",u4="absolute bottom-1.5 left-1.5 rounded-full bg-[rgba(15,18,9,0.72)] px-1.5 py-0.5 text-[10.5px] font-semibold tabular-nums text-white",d4=me(ot,"group/up flex h-[120px] w-full flex-col items-center justify-center gap-[7px] self-start rounded-[9px] border-[1.5px] border-dashed border-ink-4 bg-[#fafaf8] text-ink-3 hover:border-accent hover:bg-white hover:text-accent"),f4="grid size-[38px] place-items-center rounded-full border border-line bg-white group-hover/up:border-accent",h4="text-[12px] font-semibold",m4="flex flex-shrink-0 gap-0.5 rounded-[9px] bg-[#f1f0ea] p-[3px]",p4=me(ot,"inline-flex h-8 items-center rounded-[7px] px-[13px] text-[12.5px] font-semibold text-ink-3");function y4(n,l=!1){return me(p4,n&&"bg-white text-ink shadow-[0_1px_3px_rgba(20,18,13,0.1)]",l&&"opacity-40 cursor-not-allowed")}var eh=b0();function g4(...n){return Yf(If(n))}const mv=1e3;let b4=0;const ol=[];let pv="",yv="";function v4(){if(ol.length!==1||typeof document>"u")return;const n=document.body;pv=n.style.overflow,yv=n.style.paddingRight;const l=window.innerWidth-document.documentElement.clientWidth;n.style.overflow="hidden",l>0&&(n.style.paddingRight=`${l}px`)}function x4(){ol.length===0&&(typeof document>"u"||(document.body.style.overflow=pv,document.body.style.paddingRight=yv))}function _4(){const n=++b4;return ol.push(n),v4(),n}function tb(n){const l=ol.indexOf(n);l!==-1&&ol.splice(l,1),x4()}function w4(n){const l=ol.indexOf(n);return mv+(l===-1?0:l)*10}function nb(n){return ol[ol.length-1]===n}const S4="(prefers-reduced-motion: reduce)";function k4(){const[n,l]=_.useState(!1);return _.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const s=window.matchMedia(S4);l(s.matches);const o=u=>l(u.matches);return s.addEventListener("change",o),()=>s.removeEventListener("change",o)},[]),n}const E4={sm:"max-w-[calc(420*var(--frame))]",md:"max-w-[calc(520*var(--frame))]",lg:"max-w-[calc(800*var(--frame))]",xl:"max-w-[calc(1240*var(--frame))]",full:"max-w-[calc(100vw-80px)]"},j4='a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';function M4({open:n,onClose:l,className:s,size:o,closeOnBackdrop:u=!0,closeOnEsc:d=!0,labelledBy:h,ariaLabel:p,children:m}){const[g,x]=_.useState("closed"),b=_.useRef(null),E=_.useRef(null),j=_.useRef(null),[T,C]=_.useState(1e3),M=k4();_.useEffect(()=>{n&&g==="closed"?x("open"):!n&&g==="open"&&x(M?"closed":"closing")},[n,g,M]),_.useEffect(()=>{var z;if(g==="open"&&b.current===null){j.current=document.activeElement??null;const I=_4();b.current=I,C(w4(I)),(z=E.current)==null||z.focus()}},[g]),_.useEffect(()=>{var z,I;g==="closed"&&b.current!==null&&(tb(b.current),b.current=null,(I=(z=j.current)==null?void 0:z.focus)==null||I.call(z),j.current=null)},[g]),_.useEffect(()=>()=>{b.current!==null&&(tb(b.current),b.current=null)},[]),_.useEffect(()=>{if(g!=="closing")return;const z=setTimeout(()=>x("closed"),400);return()=>clearTimeout(z)},[g]),_.useEffect(()=>{if(g!=="open"||!d)return;const z=I=>{I.key==="Escape"&&(b.current===null||!nb(b.current)||(I.stopPropagation(),l()))};return document.addEventListener("keydown",z,!0),()=>document.removeEventListener("keydown",z,!0)},[g,d,l]),_.useEffect(()=>{if(g!=="open")return;const z=I=>{if(I.key!=="Tab"||b.current===null||!nb(b.current))return;const le=E.current;if(!le)return;const ne=le.querySelectorAll(j4);if(ne.length===0){I.preventDefault();return}const W=ne[0],L=ne[ne.length-1];I.shiftKey&&document.activeElement===W?(I.preventDefault(),L==null||L.focus()):!I.shiftKey&&document.activeElement===L&&(I.preventDefault(),W==null||W.focus())};return document.addEventListener("keydown",z,!0),()=>document.removeEventListener("keydown",z,!0)},[g]);const R=_.useCallback(z=>{z.target===z.currentTarget&&g==="closing"&&x("closed")},[g]);if(g==="closed"||typeof document>"u")return null;const D=g==="closing"?"closing":"open";return eh.createPortal(f.jsx("div",{className:"hp-modal-backdrop","data-state":D,style:{zIndex:T},onMouseDown:u?l:void 0,children:f.jsx("div",{ref:E,className:g4("hp-modal-panel",o?E4[o]:void 0,s),"data-state":D,role:"dialog","aria-modal":"true","aria-labelledby":h,"aria-label":p,tabIndex:-1,onMouseDown:z=>z.stopPropagation(),onAnimationEnd:R,children:m})}),document.body)}const C4={page:"max-w-[920px]",pick:"max-w-[700px]",crop:"max-w-[680px]"};function gv({open:n=!0,variant:l,onClose:s,children:o}){return f.jsx(M4,{open:n,onClose:s,className:me(J5,C4[l]),children:o})}const cn={Shell:gv,head:sv,titles:ov,title:rv,subtitle:W5,close:cv,CloseIcon:De.x,foot:uv,actions:dv,buttonGhost:hv,buttonPrimary:Wf,buttonLink:e4,ZoomOutIcon:De.minus,ZoomInIcon:De.plus};function A4(n){return n.flatMap(l=>typeof l=="string"?[l]:[l[0],l[1]])}const N4=new Set(["text","number","select","url"]);function ab(n){return N4.has(n.type)?n.type!=="text"||n.size===void 0||n.size==="short":!1}function T4(n){const l=[];for(let s=0;s<n.length;s++){const o=n[s+1];ab(n[s])&&o!==void 0&&ab(o)?(l.push({kind:"pair",indices:[s,s+1]}),s++):l.push({kind:"single",index:s})}return l}function bv(n,l){const s=new Map(l.map((d,h)=>[d,h])),o=[],u=new Set;for(const d of n??[]){if(typeof d=="string"){const E=s.get(d);E!==void 0&&!u.has(d)&&(u.add(d),o.push({kind:"single",index:E}));continue}const[h,p]=d,m=s.get(h),g=s.get(p),x=m!==void 0&&!u.has(h),b=g!==void 0&&!u.has(p);x&&b?(u.add(h),u.add(p),o.push({kind:"pair",indices:[m,g]})):x?(u.add(h),o.push({kind:"single",index:m})):b&&(u.add(p),o.push({kind:"single",index:g}))}for(const d of l)u.has(d)||(u.add(d),o.push({kind:"single",index:s.get(d)}));return o}function vv({items:n,rows:l}){return f.jsx("div",{className:Zf,children:l.map(s=>s.kind==="pair"?f.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[n[s.indices[0]],n[s.indices[1]]]},`p${s.indices[0]}`):f.jsx("div",{children:n[s.index]},`s${s.index}`))})}function tf(n){var d;const l=n.crop,s=l!=null&&l.aspect&&l.aspect>0?l.aspect:16/10,o=(d=l==null?void 0:l.mobile)==null?void 0:d.aspect,u=o&&o>0&&Math.abs(o-s)>1e-4?o:void 0;return{mode:(l==null?void 0:l.mode)==="free"?"free":"locked",aspect:s,aspectLabel:l==null?void 0:l.aspectLabel,mobileAspect:u}}function O4(n,l){if(!n||!l)return{nx:0,ny:0,nw:1,nh:1};const s=Math.min(1,l/n),o=Math.min(1,n/l);return{nx:(1-s)/2,ny:(1-o)/2,nw:s,nh:o}}function xv(n,l,s){return n==="free"?{nx:0,ny:0,nw:1,nh:1}:O4(l,s)}function lb(n,l,s){const o=n.nx+n.nw/2,u=n.ny+n.nh/2;if(!l||!s)return{...n};const d=l/s;let h=n.nw,p=h/d;return p>n.nh&&(p=n.nh,h=p*d),{nx:o-h/2,ny:u-p/2,nw:h,nh:p}}function _v(n){const l=s=>Math.round(s*1e4)/1e4;return l(n.nx)===0&&l(n.ny)===0&&l(n.nw)===1&&l(n.nh)===1}function R4(n,l,s,o){const u=n==null?void 0:n.rect;return u&&u.nw&&u.nh?{nx:u.nx,ny:u.ny,nw:u.nw,nh:u.nh}:xv(l,s,o)}const Fa=52,z4=1,D4=6,U4=.94,Rt=(n,l,s)=>s<l?l:Math.max(l,Math.min(s,n));function Vr(n,l,s,o,u,d,h){n=Math.max(Fa,n);const p=u>0?h.r-s:s-h.l;n=Math.min(n,p);let m=n/l;const g=d>0?h.b-o:o-h.t;return m>g&&(m=g,n=m*l),{w:Math.max(Fa,n),h:Math.max(Fa,n/l)}}function L4({src:n,mode:l,aspect:s,seed:o}){const u=_.useRef(null),[,d]=_.useReducer(U=>U+1,0),h=_.useRef(null),p=_.useRef({w:0,h:0}),m=_.useRef({z:1,icx:0,icy:0}),g=_.useRef({x:0,y:0,w:0,h:0}),x=_.useRef(!1),b=_.useRef(o??null),[E,j]=_.useState(null),T=()=>{const U=h.current,H=p.current;if(!U||!H.w)return{w:0,h:0};const $=Math.min(H.w/U.w,H.h/U.h)*U4;return{w:U.w*$,h:U.h*$}},C=()=>{const U=T(),H=m.current,$=U.w*H.z,w=U.h*H.z;return{l:H.icx-$/2,t:H.icy-w/2,r:H.icx+$/2,b:H.icy+w/2,w:$,h:w}},M=()=>{const U=C(),H=p.current;return{l:Math.max(U.l,0),t:Math.max(U.t,0),r:Math.min(U.r,H.w),b:Math.min(U.b,H.h)}},R=()=>{const U=C(),H=g.current,$=m.current,w=U.w/2,F=U.h/2;U.w>=H.w&&($.icx=Rt($.icx,H.x+H.w-w,H.x+w)),U.h>=H.h&&($.icy=Rt($.icy,H.y+H.h-F,H.y+F))},D=()=>{const U=g.current,H=M(),$=H.r-H.l,w=H.b-H.t;if(l==="locked"){let F=Math.min(U.w,$),ce=F/s;ce>w&&(ce=w,F=ce*s),U.w=F,U.h=ce}else U.w=Math.min(U.w,$),U.h=Math.min(U.h,w);U.x=Rt(U.x,H.l,H.r-U.w),U.y=Rt(U.y,H.t,H.b-U.h)},z=()=>{D(),R(),D()},I=U=>{const H=p.current;if(!H.w||!h.current)return;m.current={z:1,icx:H.w/2,icy:H.h/2};const $=C(),w=h.current.w/h.current.h,F=U?R4(b.current,l,w,s):xv(l,w,s);g.current={x:$.l+F.nx*$.w,y:$.t+F.ny*$.h,w:F.nw*$.w,h:F.nh*$.h},z(),x.current=!0,d()};_.useEffect(()=>{x.current=!1,h.current=null,d();const U=new Image;U.onload=()=>{h.current={w:U.naturalWidth||1,h:U.naturalHeight||1},I(!0)},U.src=n},[n]),_.useEffect(()=>{b.current=o??null},[o]),_.useEffect(()=>{h.current&&I(!1)},[l,s]),_.useLayoutEffect(()=>{const U=u.current;if(!U)return;const H=()=>{const w=U.getBoundingClientRect(),F=p.current.w;p.current={w:w.width,h:w.height},!F&&h.current?I(!0):F&&(z(),d())};H();const $=new ResizeObserver(H);return $.observe(U),()=>$.disconnect()},[]);const le=U=>{const H=u.current.getBoundingClientRect();return{x:U.clientX-H.left,y:U.clientY-H.top}},ne=U=>{var ce,ee;if(U.button)return;U.stopPropagation(),(ee=(ce=U.currentTarget).setPointerCapture)==null||ee.call(ce,U.pointerId),j("move");const H=le(U),$={...g.current},w=G=>{const S=le(G),q=M(),Y=g.current;Y.x=Rt($.x+(S.x-H.x),q.l,q.r-Y.w),Y.y=Rt($.y+(S.y-H.y),q.t,q.b-Y.h),d()},F=()=>{window.removeEventListener("pointermove",w),window.removeEventListener("pointerup",F),window.removeEventListener("pointercancel",F),j(null)};window.addEventListener("pointermove",w),window.addEventListener("pointerup",F),window.addEventListener("pointercancel",F)},W=U=>H=>{var G,S;if(H.button)return;H.stopPropagation(),(S=(G=H.currentTarget).setPointerCapture)==null||S.call(G,H.pointerId),j(U);const $=g.current,w={l:$.x,t:$.y,r:$.x+$.w,b:$.y+$.h},F=le(H),ce=q=>{const Y=le(q),N=M(),P=Y.x-F.x,Q=Y.y-F.y;let Z=w.l,pe=w.t,ge=w.r,Ee=w.b;if(l==="free")U.includes("w")&&(Z=Rt(w.l+P,N.l,ge-Fa)),U.includes("e")&&(ge=Rt(w.r+P,Z+Fa,N.r)),U.includes("n")&&(pe=Rt(w.t+Q,N.t,Ee-Fa)),U.includes("s")&&(Ee=Rt(w.b+Q,pe+Fa,N.b));else{const Re=s;if(U==="se"){const Ue=Vr(w.r+P-w.l,Re,w.l,w.t,1,1,N);Z=w.l,pe=w.t,ge=Z+Ue.w,Ee=pe+Ue.h}else if(U==="nw"){const Ue=Vr(w.r-(w.l+P),Re,w.r,w.b,-1,-1,N);ge=w.r,Ee=w.b,Z=ge-Ue.w,pe=Ee-Ue.h}else if(U==="ne"){const Ue=Vr(w.r+P-w.l,Re,w.l,w.b,1,-1,N);Z=w.l,Ee=w.b,ge=Z+Ue.w,pe=Ee-Ue.h}else if(U==="sw"){const Ue=Vr(w.r-(w.l+P),Re,w.r,w.t,-1,1,N);ge=w.r,pe=w.t,Z=ge-Ue.w,Ee=pe+Ue.h}else{const Ue=(w.l+w.r)/2,nt=(w.t+w.b)/2;let Ye=$.w,Te=$.h;U==="e"?Ye=(w.r+P-Ue)*2:U==="w"?Ye=(Ue-(w.l+P))*2:U==="s"?(Te=(w.b+Q-nt)*2,Ye=Te*Re):U==="n"&&(Te=(nt-(w.t+Q))*2,Ye=Te*Re),Ye=Math.max(Fa,Ye),Te=Ye/Re,Ye=Math.min(Ye,N.r-N.l),Te=Ye/Re,Te>N.b-N.t&&(Te=N.b-N.t,Ye=Te*Re),Z=Rt(Ue-Ye/2,N.l,N.r-Ye),pe=Rt(nt-Te/2,N.t,N.b-Te),ge=Z+Ye,Ee=pe+Te}}g.current={x:Z,y:pe,w:ge-Z,h:Ee-pe},d()},ee=()=>{window.removeEventListener("pointermove",ce),window.removeEventListener("pointerup",ee),window.removeEventListener("pointercancel",ee),j(null)};window.addEventListener("pointermove",ce),window.addEventListener("pointerup",ee),window.addEventListener("pointercancel",ee)},L=(U,H,$)=>{const w=m.current;U=Rt(U,z4,D4);const F=U/w.z;w.icx=H+(w.icx-H)*F,w.icy=$+(w.icy-$)*F,w.z=U,z(),d()},ue=U=>{const H=p.current;L(m.current.z*U,H.w/2,H.h/2)},de=_.useRef(()=>{});de.current=U=>{U.preventDefault();const H=p.current,$=Math.exp(-U.deltaY*.0015*(U.ctrlKey?2.6:1));L(m.current.z*$,H.w/2,H.h/2)},_.useEffect(()=>{const U=u.current;if(!U)return;const H=$=>de.current($);return U.addEventListener("wheel",H,{passive:!1}),()=>U.removeEventListener("wheel",H)},[]);const re=()=>I(!1),ie=()=>{const U=C(),H=g.current;return U.w?{nx:Rt((H.x-U.l)/U.w,0,1),ny:Rt((H.y-U.t)/U.h,0,1),nw:Rt(H.w/U.w,0,1),nh:Rt(H.h/U.h,0,1)}:{nx:0,ny:0,nw:1,nh:1}};return{stageRef:u,ready:x.current,activeHandle:E,imgRect:C,box:g.current,view:m.current,onBoxDown:ne,onHandleDown:W,zoomBy:ue,reset:re,cropValue:ie,natAspect:h.current?h.current.w/h.current.h:null}}function B4({chrome:n,pct:l,onZoomOut:s,onZoomIn:o,resetSlot:u,children:d}){return f.jsxs("div",{className:n.foot,children:[f.jsxs("div",{className:"flex items-center gap-3",children:[u,f.jsxs("div",{className:"flex h-9 items-center overflow-hidden rounded-[9px] border border-line",children:[f.jsx("button",{type:"button",className:"grid size-9 place-items-center text-ink-2 hover:bg-[#f1f0ea] hover:text-ink",onClick:s,"aria-label":"Zoom out",children:f.jsx(n.ZoomOutIcon,{})}),f.jsx("span",{className:"grid h-9 min-w-[54px] place-items-center border-x border-line font-mono text-[12px] text-ink-2",children:l}),f.jsx("button",{type:"button",className:"grid size-9 place-items-center text-ink-2 hover:bg-[#f1f0ea] hover:text-ink",onClick:o,"aria-label":"Zoom in",children:f.jsx(n.ZoomInIcon,{})})]})]}),f.jsx("div",{className:n.actions,children:d})]})}const H4=["n","s","e","w"],q4=["nw","ne","sw","se"];function G4({cr:n,mode:l,src:s,stageClassName:o}){const u=n.imgRect(),d=n.box,h=n.activeHandle!==null;return f.jsx("div",{className:`we-cs-stage ${o}`,ref:n.stageRef,children:n.ready&&f.jsxs(f.Fragment,{children:[f.jsx("img",{className:"we-cs-img",src:s,alt:"",draggable:!1,style:{left:u.l,top:u.t,width:u.w,height:u.h}}),f.jsxs("div",{className:`we-cs-box${h?" live":""}`,"data-mode":l,"data-crop-box":!0,style:{left:d.x,top:d.y,width:d.w,height:d.h},onPointerDown:n.onBoxDown,children:[f.jsx("div",{className:"we-cs-ring"}),f.jsxs("div",{className:"we-cs-thirds",children:[f.jsx("i",{}),f.jsx("i",{}),f.jsx("i",{}),f.jsx("i",{})]}),H4.map(p=>f.jsx("div",{"data-crop-handle":p,className:`we-cs-h edge ${p}`,onPointerDown:n.onHandleDown(p)},p)),q4.map(p=>f.jsx("div",{"data-crop-handle":p,className:`we-cs-h corner ${p}`,onPointerDown:n.onHandleDown(p)},p))]})]})})}const I4=_.forwardRef(function({chrome:l,src:s,mode:o,aspect:u,seed:d,stageClassName:h="h-[412px]",footerActions:p,onUserEdit:m},g){const x=L4({src:s,mode:o,aspect:u,seed:d});_.useImperativeHandle(g,()=>({cropValue:()=>x.cropValue(),natAspect:()=>x.natAspect}),[x]);const b=Math.round(x.view.z*100)+"%",E=_.useRef(!1),j=_.useRef(!1),T=()=>{j.current=!0},C=()=>{j.current&&!E.current&&(E.current=!0,m==null||m())},M=()=>{j.current=!1};return f.jsxs(f.Fragment,{children:[f.jsx("div",{onPointerDownCapture:T,onPointerMoveCapture:C,onPointerUpCapture:M,children:f.jsx(G4,{cr:x,mode:o,src:s,stageClassName:h})}),f.jsx(B4,{chrome:l,pct:b,onZoomOut:()=>x.zoomBy(1/1.25),onZoomIn:()=>x.zoomBy(1.25),resetSlot:f.jsx("button",{type:"button",className:l.buttonLink,onClick:x.reset,children:"Reset"}),children:p})]})});function ib(...n){return Yf(If(n))}function Q4({view:n,onChange:l,className:s}){const o=(u,d,h)=>f.jsx("button",{type:"button","aria-label":d,"aria-pressed":n===u,onClick:()=>l(u),className:ib("flex h-7 w-8 items-center justify-center rounded-[6px] transition-[background,color] duration-[120ms]",n===u?"bg-white text-ink shadow-sm":"text-white/85 hover:text-white"),children:f.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:f.jsx("path",{d:h})})});return f.jsxs("div",{className:ib("inline-flex gap-0.5 rounded-[8px] bg-[rgba(15,18,9,0.55)] p-0.5 backdrop-blur",s),children:[o("desktop","Desktop crop","M3 5h18v11H3zM8 20h8M12 16v4"),o("mobile","Mobile crop","M8 3h8a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zM11 18h2")]})}function th({chrome:n,open:l=!0,src:s,mode:o,aspect:u,mobileAspect:d,seed:h,mobileSeed:p,onApply:m,onClose:g,title:x="Crop photo",subtitle:b,variant:E="crop",stageClassName:j="h-[412px]"}){const[T]=_.useState(s),C=d!=null&&Math.abs(d-u)>1e-4,[M,R]=_.useState("desktop"),[D,z]=_.useState({desktop:(h==null?void 0:h.rect)??null,mobile:(p==null?void 0:p.rect)??null}),I=_.useRef(!(p!=null&&p.rect)),le=_.useRef(null),ne=U=>U==="mobile"?d??u:u,W=()=>{var U;return((U=le.current)==null?void 0:U.natAspect())??u},L=U=>U==="desktop"?{rect:D.desktop}:{rect:D.mobile??D.desktop},ue=()=>{var U;return((U=le.current)==null?void 0:U.cropValue())??null},de=U=>{if(U===M)return;const H=ue();z($=>{const w={...$,[M]:H??$[M]};if(M==="desktop"&&I.current){const F=w.desktop??H;F&&(w.mobile=lb(F,d??u,W()))}return w}),R(U)},re=()=>{M==="mobile"&&(I.current=!1)},ie=()=>{const U=ue(),H=W(),$=(M==="desktop"?U:D.desktop)??U??{nx:0,ny:0,nw:1,nh:1};let w={rect:$,ar:H};if(C){let F=M==="mobile"?U:D.mobile;F||(F=lb($,d??u,H)),w={...w,mobile:{rect:F,derived:I.current}}}m(w)};return f.jsxs(n.Shell,{open:l,variant:E,onClose:g,children:[f.jsxs("div",{className:n.head,children:[f.jsxs("div",{className:n.titles,children:[f.jsx("h2",{className:n.title,children:x}),b?f.jsx("span",{className:n.subtitle,children:b}):null]}),f.jsx("button",{className:n.close,onClick:g,"aria-label":"Close",children:f.jsx(n.CloseIcon,{})})]}),f.jsxs("div",{className:"relative",children:[C&&f.jsx(Q4,{view:M,onChange:de,className:"absolute right-3 top-3 z-10"}),f.jsx(I4,{ref:le,chrome:n,src:T,mode:o,aspect:ne(M),seed:L(M),stageClassName:j,onUserEdit:re,footerActions:f.jsxs(f.Fragment,{children:[f.jsx("button",{className:n.buttonGhost,onClick:g,children:"Cancel"}),f.jsx("button",{className:n.buttonPrimary,onClick:ie,children:"Apply crop"})]})},M)]})]})}function V4(n,l,s){return{nx:n.x/l,ny:n.y/s,nw:n.w/l,nh:n.h/s}}function Y4(n,l,s){return{x:n.nx*l,y:n.ny*s,w:n.nw*l,h:n.nh*s}}function K4(n,l,s,o){const u=Math.max(o,Math.min(n.w,l)),d=Math.max(o,Math.min(n.h,s)),h=Math.max(0,Math.min(n.x,l-u)),p=Math.max(0,Math.min(n.y,s-d));return{x:h,y:p,w:u,h:d}}function $4(n,l,s,o){return K4(Y4(n,l,s),l,s,o)}var Wl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ul,Za,Yi,s0,X4=(s0=class extends Wl{constructor(){super();be(this,Ul);be(this,Za);be(this,Yi);fe(this,Yi,l=>{if(typeof window<"u"&&window.addEventListener){const s=()=>l();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){k(this,Za)||this.setEventListener(k(this,Yi))}onUnsubscribe(){var l;this.hasListeners()||((l=k(this,Za))==null||l.call(this),fe(this,Za,void 0))}setEventListener(l){var s;fe(this,Yi,l),(s=k(this,Za))==null||s.call(this),fe(this,Za,l(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(l){k(this,Ul)!==l&&(fe(this,Ul,l),this.onFocus())}onFocus(){const l=this.isFocused();this.listeners.forEach(s=>{s(l)})}isFocused(){var l;return typeof k(this,Ul)=="boolean"?k(this,Ul):((l=globalThis.document)==null?void 0:l.visibilityState)!=="hidden"}},Ul=new WeakMap,Za=new WeakMap,Yi=new WeakMap,s0),nh=new X4,F4={setTimeout:(n,l)=>setTimeout(n,l),clearTimeout:n=>clearTimeout(n),setInterval:(n,l)=>setInterval(n,l),clearInterval:n=>clearInterval(n)},Pa,Lf,o0,Z4=(o0=class{constructor(){be(this,Pa,F4);be(this,Lf,!1)}setTimeoutProvider(n){fe(this,Pa,n)}setTimeout(n,l){return k(this,Pa).setTimeout(n,l)}clearTimeout(n){k(this,Pa).clearTimeout(n)}setInterval(n,l){return k(this,Pa).setInterval(n,l)}clearInterval(n){k(this,Pa).clearInterval(n)}},Pa=new WeakMap,Lf=new WeakMap,o0),zl=new Z4;function P4(n){setTimeout(n,0)}var J4=typeof window>"u"||"Deno"in globalThis;function qt(){}function W4(n,l){return typeof n=="function"?n(l):n}function nf(n){return typeof n=="number"&&n>=0&&n!==1/0}function wv(n,l){return Math.max(n+(l||0)-Date.now(),0)}function sl(n,l){return typeof n=="function"?n(l):n}function fn(n,l){return typeof n=="function"?n(l):n}function sb(n,l){const{type:s="all",exact:o,fetchStatus:u,predicate:d,queryKey:h,stale:p}=n;if(h){if(o){if(l.queryHash!==ah(h,l.options))return!1}else if(!os(l.queryKey,h))return!1}if(s!=="all"){const m=l.isActive();if(s==="active"&&!m||s==="inactive"&&m)return!1}return!(typeof p=="boolean"&&l.isStale()!==p||u&&u!==l.state.fetchStatus||d&&!d(l))}function ob(n,l){const{exact:s,status:o,predicate:u,mutationKey:d}=n;if(d){if(!l.options.mutationKey)return!1;if(s){if(Fl(l.options.mutationKey)!==Fl(d))return!1}else if(!os(l.options.mutationKey,d))return!1}return!(o&&l.state.status!==o||u&&!u(l))}function ah(n,l){return((l==null?void 0:l.queryKeyHashFn)||Fl)(n)}function Fl(n){return JSON.stringify(n,(l,s)=>af(s)?Object.keys(s).sort().reduce((o,u)=>(o[u]=s[u],o),{}):s)}function os(n,l){if(n===l)return!0;if(typeof n!=typeof l)return!1;if(n&&l&&typeof n=="object"&&typeof l=="object"){if(Array.isArray(n)&&Array.isArray(l)){for(let o=0;o<l.length;o++)if(!os(n[o],l[o]))return!1;return!0}const s=Object.keys(l);for(const o of s)if(!os(n[o],l[o]))return!1;return!0}return!1}var eE=Object.prototype.hasOwnProperty;function lh(n,l,s=0){if(n===l)return n;if(s>500)return l;const o=rb(n)&&rb(l);if(!o&&!(af(n)&&af(l)))return l;const d=(o?n:Object.keys(n)).length,h=o?l:Object.keys(l),p=h.length,m=o?new Array(p):{};let g=0;for(let x=0;x<p;x++){const b=o?x:h[x],E=n[b],j=l[b];if(E===j){m[b]=E,(o?x<d:eE.call(n,b))&&g++;continue}if(E===null||j===null||typeof E!="object"||typeof j!="object"){m[b]=j;continue}const T=lh(E,j,s+1);m[b]=T,T===E&&g++}return d===p&&g===d?n:m}function oo(n,l){if(!l||Object.keys(n).length!==Object.keys(l).length)return!1;for(const s in n)if(n[s]!==l[s])return!1;return!0}function rb(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function af(n){if(!cb(n))return!1;const l=n.constructor;if(l===void 0)return!0;const s=l.prototype;return!(!cb(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function cb(n){return Object.prototype.toString.call(n)==="[object Object]"}function tE(n){return new Promise(l=>{zl.setTimeout(l,n)})}function lf(n,l,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,l):s.structuralSharing!==!1?lh(n,l):l}function nE(n,l,s=0){const o=[...n,l];return s&&o.length>s?o.slice(1):o}function aE(n,l,s=0){const o=[l,...n];return s&&o.length>s?o.slice(0,-1):o}var ih=Symbol();function Sv(n,l){return!n.queryFn&&(l!=null&&l.initialPromise)?()=>l.initialPromise:!n.queryFn||n.queryFn===ih?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function sh(n,l){return typeof n=="function"?n(...l):!!n}function lE(n,l,s){let o=!1,u;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(u??(u=l()),o||(o=!0,u.aborted?s():u.addEventListener("abort",s,{once:!0})),u)}),n}var ro=(()=>{let n=()=>J4;return{isServer(){return n()},setIsServer(l){n=l}}})();function sf(){let n,l;const s=new Promise((u,d)=>{n=u,l=d});s.status="pending",s.catch(()=>{});function o(u){Object.assign(s,u),delete s.resolve,delete s.reject}return s.resolve=u=>{o({status:"fulfilled",value:u}),n(u)},s.reject=u=>{o({status:"rejected",reason:u}),l(u)},s}var iE=P4;function sE(){let n=[],l=0,s=p=>{p()},o=p=>{p()},u=iE;const d=p=>{l?n.push(p):u(()=>{s(p)})},h=()=>{const p=n;n=[],p.length&&u(()=>{o(()=>{p.forEach(m=>{s(m)})})})};return{batch:p=>{let m;l++;try{m=p()}finally{l--,l||h()}return m},batchCalls:p=>(...m)=>{d(()=>{p(...m)})},schedule:d,setNotifyFunction:p=>{s=p},setBatchNotifyFunction:p=>{o=p},setScheduler:p=>{u=p}}}var ht=sE(),Ki,Ja,$i,r0,oE=(r0=class extends Wl{constructor(){super();be(this,Ki,!0);be(this,Ja);be(this,$i);fe(this,$i,l=>{if(typeof window<"u"&&window.addEventListener){const s=()=>l(!0),o=()=>l(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",o)}}})}onSubscribe(){k(this,Ja)||this.setEventListener(k(this,$i))}onUnsubscribe(){var l;this.hasListeners()||((l=k(this,Ja))==null||l.call(this),fe(this,Ja,void 0))}setEventListener(l){var s;fe(this,$i,l),(s=k(this,Ja))==null||s.call(this),fe(this,Ja,l(this.setOnline.bind(this)))}setOnline(l){k(this,Ki)!==l&&(fe(this,Ki,l),this.listeners.forEach(o=>{o(l)}))}isOnline(){return k(this,Ki)}},Ki=new WeakMap,Ja=new WeakMap,$i=new WeakMap,r0),tc=new oE;function rE(n){return Math.min(1e3*2**n,3e4)}function kv(n){return(n??"online")==="online"?tc.isOnline():!0}var of=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function Ev(n){let l=!1,s=0,o;const u=sf(),d=()=>u.status!=="pending",h=C=>{var M;if(!d()){const R=new of(C);E(R),(M=n.onCancel)==null||M.call(n,R)}},p=()=>{l=!0},m=()=>{l=!1},g=()=>nh.isFocused()&&(n.networkMode==="always"||tc.isOnline())&&n.canRun(),x=()=>kv(n.networkMode)&&n.canRun(),b=C=>{d()||(o==null||o(),u.resolve(C))},E=C=>{d()||(o==null||o(),u.reject(C))},j=()=>new Promise(C=>{var M;o=R=>{(d()||g())&&C(R)},(M=n.onPause)==null||M.call(n)}).then(()=>{var C;o=void 0,d()||(C=n.onContinue)==null||C.call(n)}),T=()=>{if(d())return;let C;const M=s===0?n.initialPromise:void 0;try{C=M??n.fn()}catch(R){C=Promise.reject(R)}Promise.resolve(C).then(b).catch(R=>{var ne;if(d())return;const D=n.retry??(ro.isServer()?0:3),z=n.retryDelay??rE,I=typeof z=="function"?z(s,R):z,le=D===!0||typeof D=="number"&&s<D||typeof D=="function"&&D(s,R);if(l||!le){E(R);return}s++,(ne=n.onFail)==null||ne.call(n,s,R),tE(I).then(()=>g()?void 0:j()).then(()=>{l?E(R):T()})})};return{promise:u,status:()=>u.status,cancel:h,continue:()=>(o==null||o(),u),cancelRetry:p,continueRetry:m,canStart:x,start:()=>(x()?T():j().then(T),u)}}var Ll,c0,jv=(c0=class{constructor(){be(this,Ll)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),nf(this.gcTime)&&fe(this,Ll,zl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(ro.isServer()?1/0:300*1e3))}clearGcTimeout(){k(this,Ll)!==void 0&&(zl.clearTimeout(k(this,Ll)),fe(this,Ll,void 0))}},Ll=new WeakMap,c0);function cE(n){return{onFetch:(l,s)=>{var x,b,E,j,T;const o=l.options,u=(E=(b=(x=l.fetchOptions)==null?void 0:x.meta)==null?void 0:b.fetchMore)==null?void 0:E.direction,d=((j=l.state.data)==null?void 0:j.pages)||[],h=((T=l.state.data)==null?void 0:T.pageParams)||[];let p={pages:[],pageParams:[]},m=0;const g=async()=>{let C=!1;const M=z=>{lE(z,()=>l.signal,()=>C=!0)},R=Sv(l.options,l.fetchOptions),D=async(z,I,le)=>{if(C)return Promise.reject(l.signal.reason);if(I==null&&z.pages.length)return Promise.resolve(z);const W=(()=>{const re={client:l.client,queryKey:l.queryKey,pageParam:I,direction:le?"backward":"forward",meta:l.options.meta};return M(re),re})(),L=await R(W),{maxPages:ue}=l.options,de=le?aE:nE;return{pages:de(z.pages,L,ue),pageParams:de(z.pageParams,I,ue)}};if(u&&d.length){const z=u==="backward",I=z?uE:ub,le={pages:d,pageParams:h},ne=I(o,le);p=await D(le,ne,z)}else{const z=n??d.length;do{const I=m===0?h[0]??o.initialPageParam:ub(o,p);if(m>0&&I==null)break;p=await D(p,I),m++}while(m<z)}return p};l.options.persister?l.fetchFn=()=>{var C,M;return(M=(C=l.options).persister)==null?void 0:M.call(C,g,{client:l.client,queryKey:l.queryKey,meta:l.options.meta,signal:l.signal},s)}:l.fetchFn=g}}}function ub(n,{pages:l,pageParams:s}){const o=l.length-1;return l.length>0?n.getNextPageParam(l[o],l,s[o],s):void 0}function uE(n,{pages:l,pageParams:s}){var o;return l.length>0?(o=n.getPreviousPageParam)==null?void 0:o.call(n,l[0],l,s[0],s):void 0}var Xi,Bl,Fi,kn,Hl,Mt,co,ql,dn,Mv,fa,u0,dE=(u0=class extends jv{constructor(l){super();be(this,dn);be(this,Xi);be(this,Bl);be(this,Fi);be(this,kn);be(this,Hl);be(this,Mt);be(this,co);be(this,ql);fe(this,ql,!1),fe(this,co,l.defaultOptions),this.setOptions(l.options),this.observers=[],fe(this,Hl,l.client),fe(this,kn,k(this,Hl).getQueryCache()),this.queryKey=l.queryKey,this.queryHash=l.queryHash,fe(this,Bl,fb(this.options)),this.state=l.state??k(this,Bl),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return k(this,Xi)}get promise(){var l;return(l=k(this,Mt))==null?void 0:l.promise}setOptions(l){if(this.options={...k(this,co),...l},l!=null&&l._type&&fe(this,Xi,l._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=fb(this.options);s.data!==void 0&&(this.setState(db(s.data,s.dataUpdatedAt)),fe(this,Bl,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&k(this,kn).remove(this)}setData(l,s){const o=lf(this.state.data,l,this.options);return je(this,dn,fa).call(this,{data:o,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),o}setState(l){je(this,dn,fa).call(this,{type:"setState",state:l})}cancel(l){var o,u;const s=(o=k(this,Mt))==null?void 0:o.promise;return(u=k(this,Mt))==null||u.cancel(l),s?s.then(qt).catch(qt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return k(this,Bl)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(l=>fn(l.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ih||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(l=>sl(l.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(l=>l.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(l=0){return this.state.data===void 0?!0:l==="static"?!1:this.state.isInvalidated?!0:!wv(this.state.dataUpdatedAt,l)}onFocus(){var s;const l=this.observers.find(o=>o.shouldFetchOnWindowFocus());l==null||l.refetch({cancelRefetch:!1}),(s=k(this,Mt))==null||s.continue()}onOnline(){var s;const l=this.observers.find(o=>o.shouldFetchOnReconnect());l==null||l.refetch({cancelRefetch:!1}),(s=k(this,Mt))==null||s.continue()}addObserver(l){this.observers.includes(l)||(this.observers.push(l),this.clearGcTimeout(),k(this,kn).notify({type:"observerAdded",query:this,observer:l}))}removeObserver(l){this.observers.includes(l)&&(this.observers=this.observers.filter(s=>s!==l),this.observers.length||(k(this,Mt)&&(k(this,ql)||je(this,dn,Mv).call(this)?k(this,Mt).cancel({revert:!0}):k(this,Mt).cancelRetry()),this.scheduleGc()),k(this,kn).notify({type:"observerRemoved",query:this,observer:l}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||je(this,dn,fa).call(this,{type:"invalidate"})}async fetch(l,s){var g,x,b,E,j,T,C,M,R,D,z;if(this.state.fetchStatus!=="idle"&&((g=k(this,Mt))==null?void 0:g.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(k(this,Mt))return k(this,Mt).continueRetry(),k(this,Mt).promise}if(l&&this.setOptions(l),!this.options.queryFn){const I=this.observers.find(le=>le.options.queryFn);I&&this.setOptions(I.options)}const o=new AbortController,u=I=>{Object.defineProperty(I,"signal",{enumerable:!0,get:()=>(fe(this,ql,!0),o.signal)})},d=()=>{const I=Sv(this.options,s),ne=(()=>{const W={client:k(this,Hl),queryKey:this.queryKey,meta:this.meta};return u(W),W})();return fe(this,ql,!1),this.options.persister?this.options.persister(I,ne,this):I(ne)},p=(()=>{const I={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:k(this,Hl),state:this.state,fetchFn:d};return u(I),I})(),m=k(this,Xi)==="infinite"?cE(this.options.pages):this.options.behavior;m==null||m.onFetch(p,this),fe(this,Fi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((x=p.fetchOptions)==null?void 0:x.meta))&&je(this,dn,fa).call(this,{type:"fetch",meta:(b=p.fetchOptions)==null?void 0:b.meta}),fe(this,Mt,Ev({initialPromise:s==null?void 0:s.initialPromise,fn:p.fetchFn,onCancel:I=>{I instanceof of&&I.revert&&this.setState({...k(this,Fi),fetchStatus:"idle"}),o.abort()},onFail:(I,le)=>{je(this,dn,fa).call(this,{type:"failed",failureCount:I,error:le})},onPause:()=>{je(this,dn,fa).call(this,{type:"pause"})},onContinue:()=>{je(this,dn,fa).call(this,{type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode,canRun:()=>!0}));try{const I=await k(this,Mt).start();if(I===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(I),(j=(E=k(this,kn).config).onSuccess)==null||j.call(E,I,this),(C=(T=k(this,kn).config).onSettled)==null||C.call(T,I,this.state.error,this),I}catch(I){if(I instanceof of){if(I.silent)return k(this,Mt).promise;if(I.revert){if(this.state.data===void 0)throw I;return this.state.data}}throw je(this,dn,fa).call(this,{type:"error",error:I}),(R=(M=k(this,kn).config).onError)==null||R.call(M,I,this),(z=(D=k(this,kn).config).onSettled)==null||z.call(D,this.state.data,I,this),I}finally{this.scheduleGc()}}},Xi=new WeakMap,Bl=new WeakMap,Fi=new WeakMap,kn=new WeakMap,Hl=new WeakMap,Mt=new WeakMap,co=new WeakMap,ql=new WeakMap,dn=new WeakSet,Mv=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},fa=function(l){const s=o=>{switch(l.type){case"failed":return{...o,fetchFailureCount:l.failureCount,fetchFailureReason:l.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...Cv(o.data,this.options),fetchMeta:l.meta??null};case"success":const u={...o,...db(l.data,l.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!l.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return fe(this,Fi,l.manual?u:void 0),u;case"error":const d=l.error;return{...o,error:d,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...l.state}}};this.state=s(this.state),ht.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),k(this,kn).notify({query:this,type:"updated",action:l})})},u0);function Cv(n,l){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:kv(l.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function db(n,l){return{data:n,dataUpdatedAt:l??Date.now(),error:null,isInvalidated:!1,status:"success"}}function fb(n){const l=typeof n.initialData=="function"?n.initialData():n.initialData,s=l!==void 0,o=s?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:l,dataUpdateCount:0,dataUpdatedAt:s?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Pt,Ve,uo,Qt,Gl,Zi,ha,Wa,fo,Pi,Ji,Il,Ql,el,Wi,Fe,so,rf,cf,uf,df,ff,hf,mf,Av,d0,oh=(d0=class extends Wl{constructor(l,s){super();be(this,Fe);be(this,Pt);be(this,Ve);be(this,uo);be(this,Qt);be(this,Gl);be(this,Zi);be(this,ha);be(this,Wa);be(this,fo);be(this,Pi);be(this,Ji);be(this,Il);be(this,Ql);be(this,el);be(this,Wi,new Set);this.options=s,fe(this,Pt,l),fe(this,Wa,null),fe(this,ha,sf()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(k(this,Ve).addObserver(this),hb(k(this,Ve),this.options)?je(this,Fe,so).call(this):this.updateResult(),je(this,Fe,df).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return pf(k(this,Ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return pf(k(this,Ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,je(this,Fe,ff).call(this),je(this,Fe,hf).call(this),k(this,Ve).removeObserver(this)}setOptions(l){const s=this.options,o=k(this,Ve);if(this.options=k(this,Pt).defaultQueryOptions(l),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof fn(this.options.enabled,k(this,Ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");je(this,Fe,mf).call(this),k(this,Ve).setOptions(this.options),s._defaulted&&!oo(this.options,s)&&k(this,Pt).getQueryCache().notify({type:"observerOptionsUpdated",query:k(this,Ve),observer:this});const u=this.hasListeners();u&&mb(k(this,Ve),o,this.options,s)&&je(this,Fe,so).call(this),this.updateResult(),u&&(k(this,Ve)!==o||fn(this.options.enabled,k(this,Ve))!==fn(s.enabled,k(this,Ve))||sl(this.options.staleTime,k(this,Ve))!==sl(s.staleTime,k(this,Ve)))&&je(this,Fe,rf).call(this);const d=je(this,Fe,cf).call(this);u&&(k(this,Ve)!==o||fn(this.options.enabled,k(this,Ve))!==fn(s.enabled,k(this,Ve))||d!==k(this,el))&&je(this,Fe,uf).call(this,d)}getOptimisticResult(l){const s=k(this,Pt).getQueryCache().build(k(this,Pt),l),o=this.createResult(s,l);return hE(this,o)&&(fe(this,Qt,o),fe(this,Zi,this.options),fe(this,Gl,k(this,Ve).state)),o}getCurrentResult(){return k(this,Qt)}trackResult(l,s){return new Proxy(l,{get:(o,u)=>(this.trackProp(u),s==null||s(u),u==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&k(this,ha).status==="pending"&&k(this,ha).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,u))})}trackProp(l){k(this,Wi).add(l)}getCurrentQuery(){return k(this,Ve)}refetch({...l}={}){return this.fetch({...l})}fetchOptimistic(l){const s=k(this,Pt).defaultQueryOptions(l),o=k(this,Pt).getQueryCache().build(k(this,Pt),s);return o.fetch().then(()=>this.createResult(o,s))}fetch(l){return je(this,Fe,so).call(this,{...l,cancelRefetch:l.cancelRefetch??!0}).then(()=>(this.updateResult(),k(this,Qt)))}createResult(l,s){var ue;const o=k(this,Ve),u=this.options,d=k(this,Qt),h=k(this,Gl),p=k(this,Zi),g=l!==o?l.state:k(this,uo),{state:x}=l;let b={...x},E=!1,j;if(s._optimisticResults){const de=this.hasListeners(),re=!de&&hb(l,s),ie=de&&mb(l,o,s,u);(re||ie)&&(b={...b,...Cv(x.data,l.options)}),s._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:T,errorUpdatedAt:C,status:M}=b;j=b.data;let R=!1;if(s.placeholderData!==void 0&&j===void 0&&M==="pending"){let de;d!=null&&d.isPlaceholderData&&s.placeholderData===(p==null?void 0:p.placeholderData)?(de=d.data,R=!0):de=typeof s.placeholderData=="function"?s.placeholderData((ue=k(this,Ji))==null?void 0:ue.state.data,k(this,Ji)):s.placeholderData,de!==void 0&&(M="success",j=lf(d==null?void 0:d.data,de,s),E=!0)}if(s.select&&j!==void 0&&!R)if(d&&j===(h==null?void 0:h.data)&&s.select===k(this,fo))j=k(this,Pi);else try{fe(this,fo,s.select),j=s.select(j),j=lf(d==null?void 0:d.data,j,s),fe(this,Pi,j),fe(this,Wa,null)}catch(de){fe(this,Wa,de)}k(this,Wa)&&(T=k(this,Wa),j=k(this,Pi),C=Date.now(),M="error");const D=b.fetchStatus==="fetching",z=M==="pending",I=M==="error",le=z&&D,ne=j!==void 0,L={status:M,fetchStatus:b.fetchStatus,isPending:z,isSuccess:M==="success",isError:I,isInitialLoading:le,isLoading:le,data:j,dataUpdatedAt:b.dataUpdatedAt,error:T,errorUpdatedAt:C,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:l.isFetched(),isFetchedAfterMount:b.dataUpdateCount>g.dataUpdateCount||b.errorUpdateCount>g.errorUpdateCount,isFetching:D,isRefetching:D&&!z,isLoadingError:I&&!ne,isPaused:b.fetchStatus==="paused",isPlaceholderData:E,isRefetchError:I&&ne,isStale:rh(l,s),refetch:this.refetch,promise:k(this,ha),isEnabled:fn(s.enabled,l)!==!1};if(this.options.experimental_prefetchInRender){const de=L.data!==void 0,re=L.status==="error"&&!de,ie=$=>{re?$.reject(L.error):de&&$.resolve(L.data)},U=()=>{const $=fe(this,ha,L.promise=sf());ie($)},H=k(this,ha);switch(H.status){case"pending":l.queryHash===o.queryHash&&ie(H);break;case"fulfilled":(re||L.data!==H.value)&&U();break;case"rejected":(!re||L.error!==H.reason)&&U();break}}return L}updateResult(){const l=k(this,Qt),s=this.createResult(k(this,Ve),this.options);if(fe(this,Gl,k(this,Ve).state),fe(this,Zi,this.options),k(this,Gl).data!==void 0&&fe(this,Ji,k(this,Ve)),oo(s,l))return;fe(this,Qt,s);const o=()=>{if(!l)return!0;const{notifyOnChangeProps:u}=this.options,d=typeof u=="function"?u():u;if(d==="all"||!d&&!k(this,Wi).size)return!0;const h=new Set(d??k(this,Wi));return this.options.throwOnError&&h.add("error"),Object.keys(k(this,Qt)).some(p=>{const m=p;return k(this,Qt)[m]!==l[m]&&h.has(m)})};je(this,Fe,Av).call(this,{listeners:o()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&je(this,Fe,df).call(this)}},Pt=new WeakMap,Ve=new WeakMap,uo=new WeakMap,Qt=new WeakMap,Gl=new WeakMap,Zi=new WeakMap,ha=new WeakMap,Wa=new WeakMap,fo=new WeakMap,Pi=new WeakMap,Ji=new WeakMap,Il=new WeakMap,Ql=new WeakMap,el=new WeakMap,Wi=new WeakMap,Fe=new WeakSet,so=function(l){je(this,Fe,mf).call(this);let s=k(this,Ve).fetch(this.options,l);return l!=null&&l.throwOnError||(s=s.catch(qt)),s},rf=function(){je(this,Fe,ff).call(this);const l=sl(this.options.staleTime,k(this,Ve));if(ro.isServer()||k(this,Qt).isStale||!nf(l))return;const o=wv(k(this,Qt).dataUpdatedAt,l)+1;fe(this,Il,zl.setTimeout(()=>{k(this,Qt).isStale||this.updateResult()},o))},cf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(k(this,Ve)):this.options.refetchInterval)??!1},uf=function(l){je(this,Fe,hf).call(this),fe(this,el,l),!(ro.isServer()||fn(this.options.enabled,k(this,Ve))===!1||!nf(k(this,el))||k(this,el)===0)&&fe(this,Ql,zl.setInterval(()=>{(this.options.refetchIntervalInBackground||nh.isFocused())&&je(this,Fe,so).call(this)},k(this,el)))},df=function(){je(this,Fe,rf).call(this),je(this,Fe,uf).call(this,je(this,Fe,cf).call(this))},ff=function(){k(this,Il)!==void 0&&(zl.clearTimeout(k(this,Il)),fe(this,Il,void 0))},hf=function(){k(this,Ql)!==void 0&&(zl.clearInterval(k(this,Ql)),fe(this,Ql,void 0))},mf=function(){const l=k(this,Pt).getQueryCache().build(k(this,Pt),this.options);if(l===k(this,Ve))return;const s=k(this,Ve);fe(this,Ve,l),fe(this,uo,l.state),this.hasListeners()&&(s==null||s.removeObserver(this),l.addObserver(this))},Av=function(l){ht.batch(()=>{l.listeners&&this.listeners.forEach(s=>{s(k(this,Qt))}),k(this,Pt).getQueryCache().notify({query:k(this,Ve),type:"observerResultsUpdated"})})},d0);function fE(n,l){return fn(l.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&fn(l.retryOnMount,n)===!1)}function hb(n,l){return fE(n,l)||n.state.data!==void 0&&pf(n,l,l.refetchOnMount)}function pf(n,l,s){if(fn(l.enabled,n)!==!1&&sl(l.staleTime,n)!=="static"){const o=typeof s=="function"?s(n):s;return o==="always"||o!==!1&&rh(n,l)}return!1}function mb(n,l,s,o){return(n!==l||fn(o.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&rh(n,s)}function rh(n,l){return fn(l.enabled,n)!==!1&&n.isStaleByTime(sl(l.staleTime,n))}function hE(n,l){return!oo(n.getCurrentResult(),l)}var ho,qn,Ht,Vl,Gn,Xa,f0,mE=(f0=class extends jv{constructor(l){super();be(this,Gn);be(this,ho);be(this,qn);be(this,Ht);be(this,Vl);fe(this,ho,l.client),this.mutationId=l.mutationId,fe(this,Ht,l.mutationCache),fe(this,qn,[]),this.state=l.state||Nv(),this.setOptions(l.options),this.scheduleGc()}setOptions(l){this.options=l,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(l){k(this,qn).includes(l)||(k(this,qn).push(l),this.clearGcTimeout(),k(this,Ht).notify({type:"observerAdded",mutation:this,observer:l}))}removeObserver(l){fe(this,qn,k(this,qn).filter(s=>s!==l)),this.scheduleGc(),k(this,Ht).notify({type:"observerRemoved",mutation:this,observer:l})}optionalRemove(){k(this,qn).length||(this.state.status==="pending"?this.scheduleGc():k(this,Ht).remove(this))}continue(){var l;return((l=k(this,Vl))==null?void 0:l.continue())??this.execute(this.state.variables)}async execute(l){var h,p,m,g,x,b,E,j,T,C,M,R,D,z,I,le,ne,W;const s=()=>{je(this,Gn,Xa).call(this,{type:"continue"})},o={client:k(this,ho),meta:this.options.meta,mutationKey:this.options.mutationKey};fe(this,Vl,Ev({fn:()=>this.options.mutationFn?this.options.mutationFn(l,o):Promise.reject(new Error("No mutationFn found")),onFail:(L,ue)=>{je(this,Gn,Xa).call(this,{type:"failed",failureCount:L,error:ue})},onPause:()=>{je(this,Gn,Xa).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>k(this,Ht).canRun(this)}));const u=this.state.status==="pending",d=!k(this,Vl).canStart();try{if(u)s();else{je(this,Gn,Xa).call(this,{type:"pending",variables:l,isPaused:d}),k(this,Ht).config.onMutate&&await k(this,Ht).config.onMutate(l,this,o);const ue=await((p=(h=this.options).onMutate)==null?void 0:p.call(h,l,o));ue!==this.state.context&&je(this,Gn,Xa).call(this,{type:"pending",context:ue,variables:l,isPaused:d})}const L=await k(this,Vl).start();return await((g=(m=k(this,Ht).config).onSuccess)==null?void 0:g.call(m,L,l,this.state.context,this,o)),await((b=(x=this.options).onSuccess)==null?void 0:b.call(x,L,l,this.state.context,o)),await((j=(E=k(this,Ht).config).onSettled)==null?void 0:j.call(E,L,null,this.state.variables,this.state.context,this,o)),await((C=(T=this.options).onSettled)==null?void 0:C.call(T,L,null,l,this.state.context,o)),je(this,Gn,Xa).call(this,{type:"success",data:L}),L}catch(L){try{await((R=(M=k(this,Ht).config).onError)==null?void 0:R.call(M,L,l,this.state.context,this,o))}catch(ue){Promise.reject(ue)}try{await((z=(D=this.options).onError)==null?void 0:z.call(D,L,l,this.state.context,o))}catch(ue){Promise.reject(ue)}try{await((le=(I=k(this,Ht).config).onSettled)==null?void 0:le.call(I,void 0,L,this.state.variables,this.state.context,this,o))}catch(ue){Promise.reject(ue)}try{await((W=(ne=this.options).onSettled)==null?void 0:W.call(ne,void 0,L,l,this.state.context,o))}catch(ue){Promise.reject(ue)}throw je(this,Gn,Xa).call(this,{type:"error",error:L}),L}finally{k(this,Ht).runNext(this)}}},ho=new WeakMap,qn=new WeakMap,Ht=new WeakMap,Vl=new WeakMap,Gn=new WeakSet,Xa=function(l){const s=o=>{switch(l.type){case"failed":return{...o,failureCount:l.failureCount,failureReason:l.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:l.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:l.isPaused,status:"pending",variables:l.variables,submittedAt:Date.now()};case"success":return{...o,data:l.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:l.error,failureCount:o.failureCount+1,failureReason:l.error,isPaused:!1,status:"error"}}};this.state=s(this.state),ht.batch(()=>{k(this,qn).forEach(o=>{o.onMutationUpdate(l)}),k(this,Ht).notify({mutation:this,type:"updated",action:l})})},f0);function Nv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ma,Nn,mo,h0,pE=(h0=class extends Wl{constructor(l={}){super();be(this,ma);be(this,Nn);be(this,mo);this.config=l,fe(this,ma,new Set),fe(this,Nn,new Map),fe(this,mo,0)}build(l,s,o){const u=new mE({client:l,mutationCache:this,mutationId:++qr(this,mo)._,options:l.defaultMutationOptions(s),state:o});return this.add(u),u}add(l){k(this,ma).add(l);const s=Yr(l);if(typeof s=="string"){const o=k(this,Nn).get(s);o?o.push(l):k(this,Nn).set(s,[l])}this.notify({type:"added",mutation:l})}remove(l){if(k(this,ma).delete(l)){const s=Yr(l);if(typeof s=="string"){const o=k(this,Nn).get(s);if(o)if(o.length>1){const u=o.indexOf(l);u!==-1&&o.splice(u,1)}else o[0]===l&&k(this,Nn).delete(s)}}this.notify({type:"removed",mutation:l})}canRun(l){const s=Yr(l);if(typeof s=="string"){const o=k(this,Nn).get(s),u=o==null?void 0:o.find(d=>d.state.status==="pending");return!u||u===l}else return!0}runNext(l){var o;const s=Yr(l);if(typeof s=="string"){const u=(o=k(this,Nn).get(s))==null?void 0:o.find(d=>d!==l&&d.state.isPaused);return(u==null?void 0:u.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ht.batch(()=>{k(this,ma).forEach(l=>{this.notify({type:"removed",mutation:l})}),k(this,ma).clear(),k(this,Nn).clear()})}getAll(){return Array.from(k(this,ma))}find(l){const s={exact:!0,...l};return this.getAll().find(o=>ob(s,o))}findAll(l={}){return this.getAll().filter(s=>ob(l,s))}notify(l){ht.batch(()=>{this.listeners.forEach(s=>{s(l)})})}resumePausedMutations(){const l=this.getAll().filter(s=>s.state.isPaused);return ht.batch(()=>Promise.all(l.map(s=>s.continue().catch(qt))))}},ma=new WeakMap,Nn=new WeakMap,mo=new WeakMap,h0);function Yr(n){var l;return(l=n.options.scope)==null?void 0:l.id}var pa,tl,Jt,ya,ba,Pr,yf,m0,yE=(m0=class extends Wl{constructor(s,o){super();be(this,ba);be(this,pa);be(this,tl);be(this,Jt);be(this,ya);fe(this,pa,s),this.setOptions(o),this.bindMethods(),je(this,ba,Pr).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(s){var u;const o=this.options;this.options=k(this,pa).defaultMutationOptions(s),oo(this.options,o)||k(this,pa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:k(this,Jt),observer:this}),o!=null&&o.mutationKey&&this.options.mutationKey&&Fl(o.mutationKey)!==Fl(this.options.mutationKey)?this.reset():((u=k(this,Jt))==null?void 0:u.state.status)==="pending"&&k(this,Jt).setOptions(this.options)}onUnsubscribe(){var s;this.hasListeners()||(s=k(this,Jt))==null||s.removeObserver(this)}onMutationUpdate(s){je(this,ba,Pr).call(this),je(this,ba,yf).call(this,s)}getCurrentResult(){return k(this,tl)}reset(){var s;(s=k(this,Jt))==null||s.removeObserver(this),fe(this,Jt,void 0),je(this,ba,Pr).call(this),je(this,ba,yf).call(this)}mutate(s,o){var u;return fe(this,ya,o),(u=k(this,Jt))==null||u.removeObserver(this),fe(this,Jt,k(this,pa).getMutationCache().build(k(this,pa),this.options)),k(this,Jt).addObserver(this),k(this,Jt).execute(s)}},pa=new WeakMap,tl=new WeakMap,Jt=new WeakMap,ya=new WeakMap,ba=new WeakSet,Pr=function(){var o;const s=((o=k(this,Jt))==null?void 0:o.state)??Nv();fe(this,tl,{...s,isPending:s.status==="pending",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset})},yf=function(s){ht.batch(()=>{var o,u,d,h,p,m,g,x;if(k(this,ya)&&this.hasListeners()){const b=k(this,tl).variables,E=k(this,tl).context,j={client:k(this,pa),meta:this.options.meta,mutationKey:this.options.mutationKey};if((s==null?void 0:s.type)==="success"){try{(u=(o=k(this,ya)).onSuccess)==null||u.call(o,s.data,b,E,j)}catch(T){Promise.reject(T)}try{(h=(d=k(this,ya)).onSettled)==null||h.call(d,s.data,null,b,E,j)}catch(T){Promise.reject(T)}}else if((s==null?void 0:s.type)==="error"){try{(m=(p=k(this,ya)).onError)==null||m.call(p,s.error,b,E,j)}catch(T){Promise.reject(T)}try{(x=(g=k(this,ya)).onSettled)==null||x.call(g,void 0,s.error,b,E,j)}catch(T){Promise.reject(T)}}}this.listeners.forEach(b=>{b(k(this,tl))})})},m0);function pb(n,l){const s=new Set(l);return n.filter(o=>!s.has(o))}function gE(n,l,s){const o=n.slice(0);return o[l]=s,o}var es,Wt,ts,Yl,un,nl,po,yo,go,bo,kt,gf,bf,Tv,vf,xf,_f,p0,bE=(p0=class extends Wl{constructor(l,s,o){super();be(this,kt);be(this,es);be(this,Wt);be(this,ts);be(this,Yl);be(this,un);be(this,nl);be(this,po);be(this,yo);be(this,go);be(this,bo,[]);fe(this,es,l),fe(this,Yl,o),fe(this,ts,[]),fe(this,un,[]),fe(this,Wt,[]),this.setQueries(s)}onSubscribe(){this.listeners.size===1&&k(this,un).forEach(l=>{l.subscribe(s=>{je(this,kt,xf).call(this,l,s)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,k(this,un).forEach(l=>{l.destroy()})}setQueries(l,s){fe(this,ts,l),fe(this,Yl,s),ht.batch(()=>{const o=k(this,un),u=je(this,kt,vf).call(this,k(this,ts));u.forEach(b=>b.observer.setOptions(b.defaultedQueryOptions));const d=u.map(b=>b.observer),h=d.map(b=>b.getCurrentResult()),p=o.length!==d.length,m=d.some((b,E)=>b!==o[E]),g=p||m,x=g?!0:h.some((b,E)=>{const j=k(this,Wt)[E];return!j||!oo(b,j)});!g&&!x||(g&&(fe(this,bo,u),fe(this,un,d)),fe(this,Wt,h),this.hasListeners()&&(g&&(pb(o,d).forEach(b=>{b.destroy()}),pb(d,o).forEach(b=>{b.subscribe(E=>{je(this,kt,xf).call(this,b,E)})})),je(this,kt,_f).call(this)))})}getCurrentResult(){return k(this,Wt)}getQueries(){return k(this,un).map(l=>l.getCurrentQuery())}getObservers(){return k(this,un)}getOptimisticResult(l,s){const o=je(this,kt,vf).call(this,l),u=o.map(h=>h.observer.getOptimisticResult(h.defaultedQueryOptions)),d=o.map(h=>h.defaultedQueryOptions.queryHash);return[u,h=>je(this,kt,bf).call(this,h??u,s,d),()=>je(this,kt,gf).call(this,u,o)]}},es=new WeakMap,Wt=new WeakMap,ts=new WeakMap,Yl=new WeakMap,un=new WeakMap,nl=new WeakMap,po=new WeakMap,yo=new WeakMap,go=new WeakMap,bo=new WeakMap,kt=new WeakSet,gf=function(l,s){return s.map((o,u)=>{const d=l[u];return o.defaultedQueryOptions.notifyOnChangeProps?d:o.observer.trackResult(d,h=>{s.forEach(p=>{p.observer.trackProp(h)})})})},bf=function(l,s,o){if(s){const u=k(this,go),d=o!==void 0&&u!==void 0&&(u.length!==o.length||o.some((h,p)=>h!==u[p]));return(!k(this,nl)||k(this,Wt)!==k(this,yo)||d||s!==k(this,po))&&(fe(this,po,s),fe(this,yo,k(this,Wt)),o!==void 0&&fe(this,go,o),fe(this,nl,lh(k(this,nl),s(l)))),k(this,nl)}return l},Tv=function(){var l;return((l=k(this,Yl))==null?void 0:l.combine)!==void 0&&k(this,un).some((s,o)=>{var u;return s.options.suspense&&((u=k(this,Wt)[o])==null?void 0:u.data)===void 0})},vf=function(l){const s=new Map;k(this,un).forEach(u=>{const d=u.options.queryHash;if(!d)return;const h=s.get(d);h?h.push(u):s.set(d,[u])});const o=[];return l.forEach(u=>{var m;const d=k(this,es).defaultQueryOptions(u),p=((m=s.get(d.queryHash))==null?void 0:m.shift())??new oh(k(this,es),d);o.push({defaultedQueryOptions:d,observer:p})}),o},xf=function(l,s){const o=k(this,un).indexOf(l);o!==-1&&(fe(this,Wt,gE(k(this,Wt),o,s)),je(this,kt,_f).call(this))},_f=function(){var l;if(this.hasListeners()){const s=je(this,kt,gf).call(this,k(this,Wt),k(this,bo)),o=je(this,kt,Tv).call(this),u=k(this,nl),d=o?u:je(this,kt,bf).call(this,s,(l=k(this,Yl))==null?void 0:l.combine);(o||u!==d)&&ht.batch(()=>{this.listeners.forEach(h=>{h(k(this,Wt))})})}},p0),In,y0,vE=(y0=class extends Wl{constructor(l={}){super();be(this,In);this.config=l,fe(this,In,new Map)}build(l,s,o){const u=s.queryKey,d=s.queryHash??ah(u,s);let h=this.get(d);return h||(h=new dE({client:l,queryKey:u,queryHash:d,options:l.defaultQueryOptions(s),state:o,defaultOptions:l.getQueryDefaults(u)}),this.add(h)),h}add(l){k(this,In).has(l.queryHash)||(k(this,In).set(l.queryHash,l),this.notify({type:"added",query:l}))}remove(l){const s=k(this,In).get(l.queryHash);s&&(l.destroy(),s===l&&k(this,In).delete(l.queryHash),this.notify({type:"removed",query:l}))}clear(){ht.batch(()=>{this.getAll().forEach(l=>{this.remove(l)})})}get(l){return k(this,In).get(l)}getAll(){return[...k(this,In).values()]}find(l){const s={exact:!0,...l};return this.getAll().find(o=>sb(s,o))}findAll(l={}){const s=this.getAll();return Object.keys(l).length>0?s.filter(o=>sb(l,o)):s}notify(l){ht.batch(()=>{this.listeners.forEach(s=>{s(l)})})}onFocus(){ht.batch(()=>{this.getAll().forEach(l=>{l.onFocus()})})}onOnline(){ht.batch(()=>{this.getAll().forEach(l=>{l.onOnline()})})}},In=new WeakMap,y0),ft,al,ll,ns,as,il,ls,is,g0,xE=(g0=class{constructor(n={}){be(this,ft);be(this,al);be(this,ll);be(this,ns);be(this,as);be(this,il);be(this,ls);be(this,is);fe(this,ft,n.queryCache||new vE),fe(this,al,n.mutationCache||new pE),fe(this,ll,n.defaultOptions||{}),fe(this,ns,new Map),fe(this,as,new Map),fe(this,il,0)}mount(){qr(this,il)._++,k(this,il)===1&&(fe(this,ls,nh.subscribe(async n=>{n&&(await this.resumePausedMutations(),k(this,ft).onFocus())})),fe(this,is,tc.subscribe(async n=>{n&&(await this.resumePausedMutations(),k(this,ft).onOnline())})))}unmount(){var n,l;qr(this,il)._--,k(this,il)===0&&((n=k(this,ls))==null||n.call(this),fe(this,ls,void 0),(l=k(this,is))==null||l.call(this),fe(this,is,void 0))}isFetching(n){return k(this,ft).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return k(this,al).findAll({...n,status:"pending"}).length}getQueryData(n){var s;const l=this.defaultQueryOptions({queryKey:n});return(s=k(this,ft).get(l.queryHash))==null?void 0:s.state.data}ensureQueryData(n){const l=this.defaultQueryOptions(n),s=k(this,ft).build(this,l),o=s.state.data;return o===void 0?this.fetchQuery(n):(n.revalidateIfStale&&s.isStaleByTime(sl(l.staleTime,s))&&this.prefetchQuery(l),Promise.resolve(o))}getQueriesData(n){return k(this,ft).findAll(n).map(({queryKey:l,state:s})=>{const o=s.data;return[l,o]})}setQueryData(n,l,s){const o=this.defaultQueryOptions({queryKey:n}),u=k(this,ft).get(o.queryHash),d=u==null?void 0:u.state.data,h=W4(l,d);if(h!==void 0)return k(this,ft).build(this,o).setData(h,{...s,manual:!0})}setQueriesData(n,l,s){return ht.batch(()=>k(this,ft).findAll(n).map(({queryKey:o})=>[o,this.setQueryData(o,l,s)]))}getQueryState(n){var s;const l=this.defaultQueryOptions({queryKey:n});return(s=k(this,ft).get(l.queryHash))==null?void 0:s.state}removeQueries(n){const l=k(this,ft);ht.batch(()=>{l.findAll(n).forEach(s=>{l.remove(s)})})}resetQueries(n,l){const s=k(this,ft);return ht.batch(()=>(s.findAll(n).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...n},l)))}cancelQueries(n,l={}){const s={revert:!0,...l},o=ht.batch(()=>k(this,ft).findAll(n).map(u=>u.cancel(s)));return Promise.all(o).then(qt).catch(qt)}invalidateQueries(n,l={}){return ht.batch(()=>(k(this,ft).findAll(n).forEach(s=>{s.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},l)))}refetchQueries(n,l={}){const s={...l,cancelRefetch:l.cancelRefetch??!0},o=ht.batch(()=>k(this,ft).findAll(n).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let d=u.fetch(void 0,s);return s.throwOnError||(d=d.catch(qt)),u.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(o).then(qt)}fetchQuery(n){const l=this.defaultQueryOptions(n);l.retry===void 0&&(l.retry=!1);const s=k(this,ft).build(this,l);return s.isStaleByTime(sl(l.staleTime,s))?s.fetch(l):Promise.resolve(s.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(qt).catch(qt)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(qt).catch(qt)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return tc.isOnline()?k(this,al).resumePausedMutations():Promise.resolve()}getQueryCache(){return k(this,ft)}getMutationCache(){return k(this,al)}getDefaultOptions(){return k(this,ll)}setDefaultOptions(n){fe(this,ll,n)}setQueryDefaults(n,l){k(this,ns).set(Fl(n),{queryKey:n,defaultOptions:l})}getQueryDefaults(n){const l=[...k(this,ns).values()],s={};return l.forEach(o=>{os(n,o.queryKey)&&Object.assign(s,o.defaultOptions)}),s}setMutationDefaults(n,l){k(this,as).set(Fl(n),{mutationKey:n,defaultOptions:l})}getMutationDefaults(n){const l=[...k(this,as).values()],s={};return l.forEach(o=>{os(n,o.mutationKey)&&Object.assign(s,o.defaultOptions)}),s}defaultQueryOptions(n){if(n._defaulted)return n;const l={...k(this,ll).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return l.queryHash||(l.queryHash=ah(l.queryKey,l)),l.refetchOnReconnect===void 0&&(l.refetchOnReconnect=l.networkMode!=="always"),l.throwOnError===void 0&&(l.throwOnError=!!l.suspense),!l.networkMode&&l.persister&&(l.networkMode="offlineFirst"),l.queryFn===ih&&(l.enabled=!1),l}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...k(this,ll).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){k(this,ft).clear(),k(this,al).clear()}},ft=new WeakMap,al=new WeakMap,ll=new WeakMap,ns=new WeakMap,as=new WeakMap,il=new WeakMap,ls=new WeakMap,is=new WeakMap,g0),Ov=_.createContext(void 0),cs=n=>{const l=_.useContext(Ov);if(!l)throw new Error("No QueryClient set, use QueryClientProvider to set one");return l},_E=({client:n,children:l})=>(_.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),f.jsx(Ov.Provider,{value:n,children:l})),Rv=_.createContext(!1),zv=()=>_.useContext(Rv);Rv.Provider;function wE(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var SE=_.createContext(wE()),Dv=()=>_.useContext(SE),Uv=(n,l,s)=>{const o=s!=null&&s.state.error&&typeof n.throwOnError=="function"?sh(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||o)&&(l.isReset()||(n.retryOnMount=!1))},Lv=n=>{_.useEffect(()=>{n.clearReset()},[n])},Bv=({result:n,errorResetBoundary:l,throwOnError:s,query:o,suspense:u})=>n.isError&&!l.isReset()&&!n.isFetching&&o&&(u&&n.data===void 0||sh(s,[n.error,o])),Hv=n=>{if(n.suspense){const s=u=>u==="static"?u:Math.max(u??1e3,1e3),o=n.staleTime;n.staleTime=typeof o=="function"?(...u)=>s(o(...u)):s(o),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},kE=(n,l)=>n.isLoading&&n.isFetching&&!l,wf=(n,l)=>(n==null?void 0:n.suspense)&&l.isPending,Sf=(n,l,s)=>l.fetchOptimistic(n).catch(()=>{s.clearReset()});function EE({queries:n,...l},s){const o=cs(),u=zv(),d=Dv(),h=_.useMemo(()=>n.map(C=>{const M=o.defaultQueryOptions(C);return M._optimisticResults=u?"isRestoring":"optimistic",M}),[n,o,u]);h.forEach(C=>{Hv(C);const M=o.getQueryCache().get(C.queryHash);Uv(C,d,M)}),Lv(d);const[p]=_.useState(()=>new bE(o,h,l)),[m,g,x]=p.getOptimisticResult(h,l.combine),b=!u&&l.subscribed!==!1;_.useSyncExternalStore(_.useCallback(C=>b?p.subscribe(ht.batchCalls(C)):qt,[p,b]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),_.useEffect(()=>{p.setQueries(h,l)},[h,l,p]);const j=m.some((C,M)=>wf(h[M],C))?m.flatMap((C,M)=>{const R=h[M];if(R&&wf(R,C)){const D=new oh(o,R);return Sf(R,D,d)}return[]}):[];if(j.length>0)throw Promise.all(j);const T=m.find((C,M)=>{const R=h[M];return R&&Bv({result:C,errorResetBoundary:d,throwOnError:R.throwOnError,query:o.getQueryCache().get(R.queryHash),suspense:R.suspense})});if(T!=null&&T.error)throw T.error;return g(x())}function jE(n,l,s){var j,T,C,M;const o=zv(),u=Dv(),d=cs(),h=d.defaultQueryOptions(n);(T=(j=d.getDefaultOptions().queries)==null?void 0:j._experimental_beforeQuery)==null||T.call(j,h);const p=d.getQueryCache().get(h.queryHash),m=n.subscribed!==!1;h._optimisticResults=o?"isRestoring":m?"optimistic":void 0,Hv(h),Uv(h,u,p),Lv(u);const g=!d.getQueryCache().get(h.queryHash),[x]=_.useState(()=>new l(d,h)),b=x.getOptimisticResult(h),E=!o&&m;if(_.useSyncExternalStore(_.useCallback(R=>{const D=E?x.subscribe(ht.batchCalls(R)):qt;return x.updateResult(),D},[x,E]),()=>x.getCurrentResult(),()=>x.getCurrentResult()),_.useEffect(()=>{x.setOptions(h)},[h,x]),wf(h,b))throw Sf(h,x,u);if(Bv({result:b,errorResetBoundary:u,throwOnError:h.throwOnError,query:p,suspense:h.suspense}))throw b.error;if((M=(C=d.getDefaultOptions().queries)==null?void 0:C._experimental_afterQuery)==null||M.call(C,h,b),h.experimental_prefetchInRender&&!ro.isServer()&&kE(b,o)){const R=g?Sf(h,x,u):p==null?void 0:p.promise;R==null||R.catch(qt).finally(()=>{x.updateResult()})}return h.notifyOnChangeProps?b:x.trackResult(b)}function en(n,l){return jE(n,oh)}function ME(n,l){const s=cs(),[o]=_.useState(()=>new yE(s,n));_.useEffect(()=>{o.setOptions(n)},[o,n]);const u=_.useSyncExternalStore(_.useCallback(h=>o.subscribe(ht.batchCalls(h)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),d=_.useCallback((h,p)=>{o.mutate(h,p).catch(qt)},[o]);if(u.error&&sh(o.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:d,mutateAsync:u.mutate}}const yb=n=>{let l;const s=new Set,o=(g,x)=>{const b=typeof g=="function"?g(l):g;if(!Object.is(b,l)){const E=l;l=x??(typeof b!="object"||b===null)?b:Object.assign({},l,b),s.forEach(j=>j(l,E))}},u=()=>l,p={setState:o,getState:u,getInitialState:()=>m,subscribe:g=>(s.add(g),()=>s.delete(g))},m=l=n(o,u,p);return p},CE=(n=>n?yb(n):yb),AE=n=>n;function NE(n,l=AE){const s=Gr.useSyncExternalStore(n.subscribe,Gr.useCallback(()=>l(n.getState()),[n,l]),Gr.useCallback(()=>l(n.getInitialState()),[n,l]));return Gr.useDebugValue(s),s}const gb=n=>{const l=CE(n),s=o=>NE(l,o);return Object.assign(s,l),s},qv=(n=>n?gb(n):gb),En=qv(n=>({byKey:{},noticeByKey:{},watchedByKey:{},start:(l,s)=>n(o=>({byKey:{...o.byKey,[l]:s},noticeByKey:bb(o.noticeByKey,l),watchedByKey:{...o.watchedByKey,[l]:s.cropKey}})),finish:l=>n(s=>{if(!(l in s.byKey))return s;const o={...s.byKey};return delete o[l],{byKey:o}}),notice:(l,s)=>n(o=>o.noticeByKey[l]===s?o:{noticeByKey:{...o.noticeByKey,[l]:s}}),clearNotice:l=>n(s=>l in s.noticeByKey?{noticeByKey:bb(s.noticeByKey,l)}:s)}));function bb(n,l){if(!(l in n))return n;const s={...n};return delete s[l],s}function TE(n){return En(l=>l.noticeByKey[n])}const vb=1e3,OE=6e4;function RE({getJobStatus:n}){const l=En(s=>s.byKey);return f.jsx(f.Fragment,{children:Object.entries(l).map(([s,o])=>f.jsx(zE,{entryKey:s,entry:o,getJobStatus:n},o.jobId))})}function zE({entryKey:n,entry:l,getJobStatus:s}){var M,R;const o=En(D=>D.finish),u=En(D=>D.notice),{jobId:d,propertyId:h,cropKey:p,mobileJobId:m,mobileCropKey:g,apply:x,revert:b}=l,E=en({queryKey:["image-crop-job",h,d],queryFn:()=>s(h,d),refetchInterval:D=>{var I;const z=(I=D.state.data)==null?void 0:I.status;return z==="succeeded"||z==="failed"?!1:vb}}),j=en({queryKey:["image-crop-job",h,m],queryFn:()=>s(h,m),enabled:!!m,refetchInterval:D=>{var I;const z=(I=D.state.data)==null?void 0:I.status;return z==="succeeded"||z==="failed"?!1:vb}}),T=(M=E.data)==null?void 0:M.status,C=m?(R=j.data)==null?void 0:R.status:void 0;return _.useEffect(()=>{!(T==="succeeded"||T==="failed")||!(!m||C==="succeeded"||C==="failed")||(T==="failed"||C==="failed"?(b(),u(n,"failed"),o(n)):(x(p,m?g:void 0),o(n)))},[T,C,m,n,p,g,x,b,u,o]),_.useEffect(()=>{const D=setTimeout(()=>{u(n,"slow"),o(n)},OE);return()=>clearTimeout(D)},[n,u,o]),null}function DE(n){if(!n||typeof n!="object")return null;const l=n;return typeof l.job_id!="string"||typeof l.crop_key!="string"||!l.rect||typeof l.rect!="object"||typeof l.ar!="number"?null:l}function Gv(n,l){_.useEffect(()=>{var s,o;for(const u of n){const d=En.getState();if(u.key in d.byKey||d.watchedByKey[u.key]===u.pending.crop_key)continue;const h=l(u);d.start(u.key,{jobId:u.pending.job_id,propertyId:u.propertyId,cropKey:u.pending.crop_key,mobileJobId:(s=u.pending.mobile)==null?void 0:s.job_id,mobileCropKey:(o=u.pending.mobile)==null?void 0:o.crop_key,instanceId:u.instanceId,slotId:u.slotId,itemIndex:u.itemIndex,apply:h.apply,revert:h.revert})}})}const Jr={dimOpacity:.35,grayscale:.4,transitionMs:120,spinner:{diameter:28,stroke:3,trackColor:"rgba(20,18,13,.18)",headColor:"rgba(20,18,13,.6)",spinDurationMs:800}},UE={opacity:Jr.dimOpacity,filter:`grayscale(${Jr.grayscale})`,transition:`opacity ${Jr.transitionMs}ms`};function LE(){if(typeof document>"u"||document.getElementById("recrop-spin-kf"))return;const n=document.createElement("style");n.id="recrop-spin-kf",n.textContent="@keyframes recrop-spin{to{transform:rotate(360deg)}}",document.head.appendChild(n)}function Iv(){LE();const n=Jr.spinner;return f.jsx("div",{"data-recrop-loading":!0,role:"status","aria-label":"Re-cropping…",className:"pointer-events-none absolute inset-0 z-[5] grid place-items-center",children:f.jsx("span",{"aria-hidden":!0,style:{width:n.diameter,height:n.diameter,border:`${n.stroke}px solid ${n.trackColor}`,borderTopColor:n.headColor,borderRadius:"50%",animation:`recrop-spin ${n.spinDurationMs}ms linear infinite`}})})}function Qv(n,l,s){const o=_.useMemo(()=>[...new Set(l.filter(d=>!!d))],[l]),u=EE({queries:o.map(d=>({queryKey:["crop-url",n,d],queryFn:()=>s(n,d),enabled:!!n,staleTime:600*1e3}))});return _.useMemo(()=>{const d=new Map;return o.forEach((h,p)=>{var g;const m=(g=u[p])==null?void 0:g.data;typeof m=="string"&&d.set(h,m)}),d},[o,u])}const Vv=_.createContext(null);function BE({api:n,children:l}){return f.jsx(Vv.Provider,{value:n,children:l})}function Vn(){const n=_.useContext(Vv);if(!n)throw new Error("useMediaLibraryApi: missing MediaLibraryApiProvider");return n}const nc=[{extension:".pdf",mimeTypes:["application/pdf"],family:"pdf"},{extension:".csv",mimeTypes:["text/csv","application/vnd.ms-excel"],family:"spreadsheet"},{extension:".xlsx",mimeTypes:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],family:"spreadsheet"},{extension:".docx",mimeTypes:["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],family:"text-document"},{extension:".doc",mimeTypes:["application/msword"],family:"text-document"},{extension:".txt",mimeTypes:["text/plain"],family:"text-document"},{extension:".pptx",mimeTypes:["application/vnd.openxmlformats-officedocument.presentationml.presentation"],family:"presentation"}],Yv=new Set(nc.map(n=>n.extension)),Kv=new Set(nc.flatMap(n=>n.mimeTypes));function uc(n){const l=n.indexOf(";");return(l===-1?n:n.slice(0,l)).trim().toLowerCase()}function ch(n){const l=Math.max(n.lastIndexOf("/"),n.lastIndexOf("\\")),s=n.slice(l+1),o=s.lastIndexOf(".");return o<=0?"":s.slice(o).toLowerCase()}function HE(n){return uc(n).startsWith("image/")}function qE(n){return uc(n).startsWith("video/")}function $v(n,l){return Yv.has(ch(n))&&Kv.has(uc(l))}function GE(n,l){return HE(l)||qE(l)||$v(n,l)}function IE(n,l){const s=ch(n),o=nc.find(h=>h.extension===s);if(o)return o.family;const u=uc(l),d=nc.find(h=>h.mimeTypes.includes(u));return d?d.family:null}const QE=[...Kv,...Yv].join(","),VE="an image, a video, or a document (PDF, Word, Excel .xlsx, PowerPoint .pptx, CSV, or text)";function YE(n){switch(n){case"pdf":return{glyph:"doc",typeNoun:"PDF"};case"spreadsheet":return{glyph:"spreadsheet",typeNoun:"Spreadsheet"};case"text-document":return{glyph:"doc",typeNoun:"Document"};case"presentation":return{glyph:"presentation",typeNoun:"Presentation"}}}function KE(n,l){const s=IE(n,l),{glyph:o,typeNoun:u}=s===null?{glyph:"doc",typeNoun:"File"}:YE(s);return{glyph:o,typeNoun:u,extension:ch(n).replace(".","").toUpperCase()}}const Tn={items:[],subs:new Set};function uh(){Tn.subs.forEach(n=>n())}function $E(n){Tn.items=[n,...Tn.items],uh()}function da(n,l){Tn.items=Tn.items.map(s=>s.id===n?{...s,...l}:s),uh()}function xb(n){Tn.items=Tn.items.filter(l=>l.id!==n),uh()}function _b(){return Tn.items}function XE(){const[,n]=_.useReducer(l=>l+1,0);return _.useEffect(()=>(Tn.subs.add(n),()=>{Tn.subs.delete(n)}),[]),Tn.items}function Xv(n){return n<1024?`${n} B`:n<1048576?`${(n/1024).toFixed(0)} KB`:`${(n/1048576).toFixed(1)} MB`}const FE=qv(n=>({byPlan:{},start:(l,s,o)=>n(u=>({byPlan:{...u.byPlan,[l]:{jobId:s,propertyId:o}}})),advance:(l,s)=>n(o=>{const u=o.byPlan[l];return!u||u.jobId===s?o:{byPlan:{...o.byPlan,[l]:{...u,jobId:s}}}}),finish:l=>n(s=>{if(!(l in s.byPlan))return s;const o={...s.byPlan};return delete o[l],{byPlan:o}})})),ZE=5,wb=500*1024*1024;function Sb(n){return`${Math.round(n/(1024*1024))} MB`}function Fv(n){return n.size>wb?{ok:!1,message:`This file is ${Sb(n.size)}. The maximum upload size is ${Sb(wb)}.`}:GE(n.name,n.type)?{ok:!0}:{ok:!1,message:`This file type (${n.type||"unknown"}) isn't supported. Upload ${VE}.`}}function PE(n){const l=Fv(n);return l.ok?n.type.startsWith("image/")?{ok:!0}:{ok:!1,message:`A floor plan has to be an image. This file is ${n.type||"of an unknown type"}.`}:l}function JE(n){return n.committedUploadId?{kind:"replace",uploadId:n.committedUploadId}:n.attempt?{kind:"resume",attempt:n.attempt}:{kind:"fresh"}}function WE(n){return{id:n.id,kind:"document",name:n.name,size:n.size_bytes>0?Xv(n.size_bytes):"",src:n.preview_url,mime:n.mime}}function Zv(n){var o;const{getDocuments:l}=Vn(),s=en({queryKey:["documents",n],queryFn:()=>l(n),enabled:!!n});return{items:(((o=s.data)==null?void 0:o.documents)??[]).map(WE),isLoading:s.isLoading}}function e3(n){var s;const l=new Map;for(const o of n){const u=((s=o.source)==null?void 0:s.upload_id)??o.id;l.has(u)||l.set(u,o)}return[...l.entries()].map(([o,u])=>({id:o,kind:"plan",name:u.display_label||"Floor plan",size:"",src:u.thumbnail_url}))}function t3(n){var o;const{getFloorplans:l}=Vn(),s=en({queryKey:["floorplan-library",n],queryFn:()=>l(n),enabled:!!n});return{items:e3(((o=s.data)==null?void 0:o.floorplans)??[]),isLoading:s.isLoading}}async function n3(n,l,s){let o=0;const u=Math.max(1,Math.min(l,n.length)),d=Array.from({length:u},async()=>{for(;o<n.length;){const h=o++;try{await s(n[h],h)}catch{}}});await Promise.all(d)}function a3(n){return{id:n.id,kind:"plan",name:n.display_label,size:"",src:n.thumbnail_url,caption:null,ready:n.ready}}function Pv(n){var o;const{getFloorplans:l}=Vn(),s=en({queryKey:["floorplan-library",n],queryFn:()=>l(n),enabled:!!n});return{items:(((o=s.data)==null?void 0:o.floorplans)??[]).map(a3),isLoading:s.isLoading}}function l3(n){var o;const{getFloorplans:l}=Vn();return((o=en({queryKey:["floorplan-library",n],queryFn:()=>l(n),enabled:!!n}).data)==null?void 0:o.floorplans)??[]}function i3(n,l){n.invalidateQueries({queryKey:["floorplan-library",l]}),n.invalidateQueries({queryKey:["floorplans",l]})}function Jv(n){return n.type.startsWith("video/")?"video":$v(n.name,n.type)?"document":"photo"}function s3(n){switch(n){case"photo":case"video":case"document":return n;case"floor_plan":case"link":case null:return null}}function o3(n,l){return[`${n}s`,l]}function r3(n){const{deleteUpload:l,getUploads:s,postUploadWithProgress:o}=Vn(),u=cs(),d=XE(),h=_.useCallback((b,E,j)=>(da(b,{status:"uploading",error:void 0}),o(n,E,()=>{},{...j,onAttempt:T=>da(b,{attempt:T??void 0})}).then(T=>{da(b,{id:T.id,status:"classifying",committedUploadId:T.id})}).catch(T=>{da(b,{status:"failed",error:T instanceof Error?T.message:"Upload failed"})})),[n,o]),p=_.useCallback((b,E)=>{const j=b?Array.from(b):[],T=(E==null?void 0:E.declaredType)==="floor_plan",C=[];for(const M of j){const R=crypto.randomUUID(),D=T?PE(M):Fv(M),z=T?"plan":Jv(M);$E({id:R,kind:z,name:M.name,size:Xv(M.size),src:z==="photo"||z==="plan"?URL.createObjectURL(M):"",status:D.ok?"uploading":"failed",error:D.ok?void 0:D.message,file:M}),D.ok&&C.push({tempId:R,file:M})}n3(C,ZE,async M=>{await h(M.tempId,M.file,E)})},[h]),m=_.useCallback(b=>{const E=_b().find(C=>C.id===b);if(!E)return;const j=E.kind==="plan"?{declaredType:"floor_plan"}:void 0,T=JE(E);if(T.kind==="resume"){h(b,E.file,{...j,attempt:T.attempt});return}if(T.kind==="fresh"){h(b,E.file,j);return}da(b,{status:"uploading",error:void 0}),l(n,T.uploadId).then(()=>(da(b,{attempt:void 0,committedUploadId:void 0}),h(b,E.file,j))).catch(C=>{da(b,{status:"failed",error:C instanceof Error?C.message:"Upload failed"})})},[h,l,n]),g=d.some(b=>b.status==="classifying"),x=en({queryKey:["editor-upload-status",n],queryFn:()=>s(n),enabled:g,refetchInterval:g?1500:!1});return _.useEffect(()=>{var C;const b=(C=x.data)==null?void 0:C.uploads;if(!b)return;const E=new Map(b.map(M=>[M.id,M])),j=new Set;let T=!1;for(const M of _b()){if(M.status!=="classifying")continue;const R=E.get(M.id);if(!R)continue;if(R.status==="failed"){da(M.id,{status:"failed",error:"Processing failed"});continue}if(M.kind==="plan"){xb(M.id),T=!0;continue}if(R.status!=="ready")continue;const D=s3(R.type);if(D===null){da(M.id,{status:"not_photo",error:`Classified as ${R.type??"non-photo"}`});continue}xb(M.id),j.add(D)}for(const M of j)u.invalidateQueries({queryKey:o3(M,n)});T&&i3(u,n)},[x.data,n,u]),{items:d,addFiles:p,retry:m}}function Kr(n){return typeof n=="string"&&n.length>0?n:null}function c3(n){var s,o,u,d;const l=[];for(const h of n){const p=Kr((s=h.fields)==null?void 0:s.name),m=Kr((o=h.fields)==null?void 0:o.avatar_upload_id);m&&h.avatar_url&&l.push({id:m,kind:"library",name:p?`${p} — headshot`:"Headshot",size:"",src:h.avatar_url,caption:null});const g=Kr((u=h.fields)==null?void 0:u.logo_dark_upload_id);g&&h.logo_dark_url&&l.push({id:g,kind:"library",name:p?`${p} — logo (dark)`:"Logo (dark)",size:"",src:h.logo_dark_url,caption:null});const x=Kr((d=h.fields)==null?void 0:d.logo_light_upload_id);x&&h.logo_light_url&&l.push({id:x,kind:"library",name:p?`${p} — logo (light)`:"Logo (light)",size:"",src:h.logo_light_url,caption:null})}return l}const u3=["library-items","contact"];function Wv(){var s;const{listLibraryItems:n}=Vn(),l=en({queryKey:u3,queryFn:()=>n("contact")});return{items:c3(((s=l.data)==null?void 0:s.items)??[]),isLoading:l.isLoading}}function d3(n){return{id:n.id,kind:"video",name:n.name,size:"",src:n.poster_url,caption:n.caption??null,ready:n.ready,durationMs:n.duration_ms,videoSource:n.source,...n.provider!==null?{provider:n.provider}:{}}}function _o(n){var o;const{getVideos:l}=Vn(),s=en({queryKey:["videos",n],queryFn:()=>l(n),enabled:!!n});return{items:(((o=s.data)==null?void 0:o.videos)??[]).map(d3),isLoading:s.isLoading}}function e1(n){if(n==null||!Number.isFinite(n)||n<0)return"";const l=Math.round(n/1e3),s=Math.floor(l/60),o=l%60;return`${s}:${String(o).padStart(2,"0")}`}function f3(n){return{id:n.id,kind:"photo",name:n.name,size:"",src:n.thumbnail_url,caption:n.caption??null}}function dh(n){var o;const{getPhotos:l}=Vn(),s=en({queryKey:["photos",n],queryFn:()=>l(n),enabled:!!n});return{items:(((o=s.data)==null?void 0:o.photos)??[]).map(f3),isLoading:s.isLoading}}function dc(n){const{items:l}=dh(n),{items:s}=Pv(n),{items:o}=Wv(),{items:u}=_o(n);return _.useMemo(()=>{const d=new Map;for(const h of[...l,...s,...o,...u])h.src&&d.set(h.id,h.src);return d},[l,s,o,u])}const kf=(n,l)=>["floorplan-source-page",n,l];function h3(n){const{recropFloorplan:l}=Vn(),s=FE(u=>u.start),o=cs();return ME({mutationFn:({planId:u,bbox:d})=>l(n,u,d),onMutate:async({planId:u,bbox:d})=>{const h=kf(n,u);await o.cancelQueries({queryKey:h});const p=o.getQueryData(h);return o.setQueryData(h,m=>m&&{...m,source_bbox:d}),{prev:p,planId:u}},onError:(u,d,h)=>{h!=null&&h.prev&&o.setQueryData(kf(n,h.planId),h.prev)},onSuccess:(u,d)=>s(d.planId,u.job_id,n)})}function m3(n){return{id:n.id,kind:"tour",name:n.name,size:"",src:n.poster_url,caption:n.caption??null,ready:n.ready,provider:n.provider}}function fh(n){var o;const{getTours:l}=Vn(),s=en({queryKey:["tours",n],queryFn:()=>l(n),enabled:!!n});return{items:(((o=s.data)==null?void 0:o.tours)??[]).map(m3),isLoading:s.isLoading}}function p3(n,l,s){return n&&l?{w:n,h:l}:s?{w:s.w,h:s.h}:null}function y3(n){const[l,s]=_.useState(0),[o,u]=_.useState(null);_.useEffect(()=>{if(!n)return;let p=!0;const m=new Image;return m.onload=()=>{p&&u({src:n,attempt:l,size:{w:m.naturalWidth||1,h:m.naturalHeight||1}})},m.onerror=()=>{p&&u({src:n,attempt:l,size:null})},m.src=n,()=>{p=!1}},[n,l]);const d=_.useCallback(()=>{s(p=>p+1)},[]),h=o&&o.src===n&&o.attempt===l?o:null;return{size:(h==null?void 0:h.size)??null,failed:h!==null&&h.size===null,retry:d}}const g3=16,t1="Crop floor plan",b3="Loading floor plan…",v3="Couldn't load this floor plan's source page.";function kb({tone:n,message:l,stageClassName:s,onClose:o,onRetry:u}){return f.jsxs(cn.Shell,{open:!0,variant:"page",onClose:o,children:[f.jsxs("div",{className:cn.head,children:[f.jsx("div",{className:cn.titles,children:f.jsx("h2",{className:cn.title,children:t1})}),f.jsx("button",{type:"button",className:cn.close,onClick:o,"aria-label":"Close",children:f.jsx(cn.CloseIcon,{})})]}),f.jsxs("div",{role:n==="failed"?"alert":"status",className:me(s,"flex flex-col items-center justify-center gap-3 px-6 text-center"),children:[n==="pending"&&f.jsx("span",{"aria-hidden":!0,className:"size-5 animate-spin rounded-full border-2 border-line border-t-accent [animation-duration:0.7s]"}),f.jsx("p",{className:"m-0 text-[13px] text-ink-2",children:l})]}),f.jsx("div",{className:cn.foot,children:f.jsxs("div",{className:cn.actions,children:[f.jsx("button",{type:"button",className:cn.buttonGhost,onClick:o,children:"Cancel"}),u?f.jsx("button",{type:"button",className:cn.buttonPrimary,onClick:u,children:"Try again"}):null]})})]})}function x3({propertyId:n,planId:l,getSourcePage:s,onClose:o,stageClassName:u="h-[60vh] max-h-[620px]"}){const d=en({queryKey:kf(n,l),queryFn:()=>s(n,l)}),h=d.data,p=y3(h&&!(h.source_width&&h.source_height)?h.source_url:null),m=p3(h==null?void 0:h.source_width,h==null?void 0:h.source_height,p.size),g=h3(n);if(!d.isFetching&&(d.isError||p.failed))return f.jsx(kb,{tone:"failed",message:v3,stageClassName:u,onClose:o,onRetry:()=>{p.retry(),d.refetch()}});if(!h||!m)return f.jsx(kb,{tone:"pending",message:b3,stageClassName:u,onClose:o});const x=h.source_bbox?V4(h.source_bbox,m.w,m.h):{nx:0,ny:0,nw:1,nh:1};return f.jsx(th,{chrome:cn,src:h.source_url,mode:"free",aspect:m.w/m.h,variant:"page",stageClassName:u,title:t1,seed:{rect:x},onClose:o,onApply:b=>{o(),g.mutate({planId:l,bbox:$4(b.rect,m.w,m.h,g3)})}})}const _3=["Basement","Ground","1st floor","2nd floor","3rd floor","4th floor","Penthouse"],w3="fixed overflow-y-auto rounded-[calc(8*var(--content))] border border-line bg-white py-1 shadow-[0_16px_38px_-12px_rgba(20,18,13,0.4)]",Bd=240,n1=me(ot,"flex w-full items-center rounded-none px-2.5 py-2 text-left text-body text-ink hover:bg-accent-soft data-[active=true]:bg-accent-soft"),S3=me(n1,"text-accent"),ao=4,Eb=140,lo=8,k3="flex w-full items-stretch rounded-[calc(5*var(--content))] border border-transparent bg-[#f3f1ea] transition-[background,border-color,box-shadow] duration-[120ms] hover:bg-[#ece9df] focus-within:border-ink-3 focus-within:bg-white focus-within:shadow-[0_0_0_3px_rgba(20,18,13,0.05)]",E3="min-w-0 flex-1 appearance-none border-0 bg-transparent px-1.75 py-1 text-[length:calc(11.5*var(--content))] font-semibold text-ink-2 placeholder:font-medium placeholder:text-ink-4";function j3({value:n,onChange:l,presets:s,label:o,placeholder:u="Label…",ariaLabel:d,compact:h=!1}){const[p,m]=_.useState(!1),[g,x]=_.useState(""),[b,E]=_.useState(0),[j,T]=_.useState(null),C=_.useId(),M=_.useRef(null),R=_.useRef(null),D=g.trim().toLowerCase(),z=p&&D?s.filter($=>$.toLowerCase().includes(D)):s,I=s.some($=>$.toLowerCase()===D),le=g.trim().length>0&&!I,ne=z.length+(le?1:0),W=_.useCallback(()=>{if(!R.current)return;const $=R.current.getBoundingClientRect(),w=window.innerHeight-$.bottom-ao-lo;T({rect:$,above:w<Bd})},[]);function L(){W(),m(!0)}function ue($){l($.trim()),de()}function de(){m(!1),x(""),E(0)}function re($){if(!p&&($.key==="ArrowDown"||$.key==="Enter")){L();return}if($.key==="Escape"){de();return}$.key==="ArrowDown"?($.preventDefault(),E(w=>Math.min(ne-1,w+1))):$.key==="ArrowUp"?($.preventDefault(),E(w=>Math.max(0,w-1))):$.key==="Enter"&&($.preventDefault(),b<z.length?ue(z[b]):le&&ue(g))}function ie($){var ee,G;const w=$.relatedTarget,F=(ee=M.current)==null?void 0:ee.contains(w),ce=(G=document.getElementById(C))==null?void 0:G.contains(w);!F&&!ce&&de()}_.useEffect(()=>{if(p)return window.addEventListener("scroll",W,!0),window.addEventListener("resize",W),()=>{window.removeEventListener("scroll",W,!0),window.removeEventListener("resize",W)}},[p,W]);const U=h?k3:me(vo,p&&"border-accent"),H=h?E3:ss;return f.jsxs("div",{className:me(!h&&Qn),ref:M,onBlurCapture:ie,children:[o&&!h&&f.jsx("span",{className:va,children:o}),f.jsx("div",{className:U,ref:R,children:f.jsx("input",{className:H,value:p?g:n,placeholder:n||u,onFocus:L,onChange:$=>{x($.target.value),p||L(),E(0)},onKeyDown:re,"aria-label":d??o??"Label","aria-expanded":p,"aria-controls":C,role:"combobox"})}),p&&ne>0&&j&&eh.createPortal(f.jsxs("div",{className:w3,id:C,role:"listbox",style:{left:Math.max(lo,Math.min(j.rect.left,window.innerWidth-Math.max(j.rect.width,Eb)-lo)),...j.above?{bottom:window.innerHeight-j.rect.top+ao,maxHeight:Math.min(j.rect.top-ao-lo,Bd)}:{top:j.rect.bottom+ao,maxHeight:Math.min(window.innerHeight-j.rect.bottom-ao-lo,Bd)},minWidth:Math.max(j.rect.width,Eb),zIndex:mv+200},children:[z.map(($,w)=>f.jsx("button",{type:"button",role:"option","aria-selected":w===b,"data-active":w===b,className:n1,onMouseEnter:()=>E(w),onMouseDown:F=>F.preventDefault(),onClick:()=>ue($),children:f.jsx("span",{className:"truncate",children:$})},$)),le&&f.jsx("button",{type:"button",role:"option","aria-selected":b===z.length,"data-active":b===z.length,className:S3,onMouseEnter:()=>E(z.length),onMouseDown:$=>$.preventDefault(),onClick:()=>ue(g),children:f.jsxs("span",{className:"truncate",children:["Use “",g.trim(),"”"]})})]}),document.body)]})}const M3="group/card relative flex flex-col overflow-hidden rounded-[8px] border border-line bg-canvas transition-[border-color] duration-[120ms] hover:border-ink-4",C3="relative aspect-[4/3] touch-none select-none bg-[#fafaf6]",A3="absolute inset-0 block size-full object-contain",N3=me("absolute inset-0 grid place-items-center font-mono text-[12px] text-ink-3",cc),T3="absolute right-[5px] top-[5px] z-[4] flex gap-[3px] transition-opacity duration-[120ms]",O3="opacity-0 group-hover/card:opacity-100",Hd=me(ot,"we-no-drag grid size-5 place-items-center rounded-[4px] bg-white text-ink-2 shadow-[0_1px_2px_rgba(20,18,13,0.18)] transition-[background,color] duration-[120ms] hover:bg-[#f3f1ea] hover:text-ink"),R3="hover:bg-[#fbe6e2] hover:text-[#8e2c1e]",z3="border-t border-line-soft px-[7px] py-[6px]",D3="pointer-events-none absolute bottom-[6px] right-[6px] z-[3] grid size-[22px] place-items-center rounded-full bg-[rgba(255,255,255,0.94)] text-[11px] font-bold text-ink shadow-[0_1px_3px_rgba(20,18,13,0.25)]";function U3({src:n,alt:l="",floor:s,onFloorChange:o,onCrop:u,cropTitle:d="Crop floor plan",onRemove:h,removeTitle:p="Remove from unit",include:m,badge:g,drag:x}){const b=m?!m.on:!1,E=me(T3,b?"opacity-100":O3);return f.jsxs("div",{className:me(M3,b&&"opacity-60",(x==null?void 0:x.active)&&"opacity-[0.28]"),"data-dragid":x==null?void 0:x.dataDragId,children:[f.jsxs("div",{className:me(C3,x&&"cursor-grab",(x==null?void 0:x.active)&&"cursor-grabbing"),onPointerDown:x==null?void 0:x.onPointerDown,children:[n?f.jsx("img",{className:me(A3,b&&"grayscale"),src:n,alt:l,draggable:!1}):f.jsx("div",{className:N3}),f.jsxs("span",{className:E,children:[u&&f.jsx("button",{type:"button",className:Hd,title:d,onClick:u,children:f.jsx(De.crop,{})}),h&&f.jsx("button",{type:"button",className:me(Hd,R3),title:p,onClick:h,children:f.jsx(De.trash,{})}),m&&f.jsx("button",{type:"button",className:Hd,title:m.on?"Hide from site":"Show on site","aria-pressed":m.on,onClick:m.onToggle,children:m.on?f.jsx(De.eye,{}):f.jsx(De.eyeOff,{})})]}),g!=null&&f.jsx("span",{className:D3,children:g})]}),f.jsx("div",{className:z3,children:f.jsx(j3,{value:s,onChange:o,presets:_3,placeholder:"Floor",ariaLabel:"Floor label",compact:!0})})]})}const L3=24,B3=14;function H3(n){return n.length<=L3?n:`${n.slice(0,B3)}…${n.slice(-9)}`}function q3(n,l,s){return n?`${H3(n)}`:`Floor plan ${l}`}function G3(n){var s;if(n.fields!=null)return"row-editor";const l=(s=n.element)==null?void 0:s.type;return l==="image"||l==="video"||l==="tour"?"gallery":l==="poi"?"poi-curation":l==="document"?"document-list":"scalar-list"}function hh(n){const l=G3(n);return{editor:l,granularity:l==="row-editor"?"item":"unit"}}function a1(n){if(n!==null&&typeof n=="object"&&!Array.isArray(n)){const l=n;if(typeof l.asset_id=="string")return{asset_id:l.asset_id}}return{asset_id:""}}function I3(n){return n.map(a1).filter(l=>l.asset_id!=="")}function fc(n){switch(n.kind){case"document":return KE(n.name,n.mime??"");case"video":return{glyph:"video",typeNoun:"Video",extension:""};case"photo":case"plan":case"library":return{glyph:"image",typeNoun:"Image",extension:""};case"tour":return{glyph:"video",typeNoun:"3D tour",extension:""}}}function Q3(n){return[fc(n).typeNoun,n.size].filter(Boolean).join(" · ")}function V3(n){const l=new Map;for(const s of n)for(const o of s)l.set(o.id,o);return l}function l1(n){const{items:l}=Zv(n),{items:s}=dh(n),{items:o}=t3(n),{items:u}=_o(n),d=V3([s,o,u,l]);return h=>d.get(h)}const Y3="group/row relative flex min-h-12 items-center gap-2.5 rounded-[calc(8*var(--content))] border border-line bg-white px-2.5 py-2 [transition:border-color_.14s,box-shadow_.14s,background_.3s]",K3="flex min-w-0 flex-1 flex-col gap-px",$3="truncate text-[length:calc(13.5*var(--content))] text-ink",X3="truncate text-caption text-ink-3",F3="flex flex-col items-center gap-2 rounded-[calc(8*var(--content))] border border-dashed border-line px-3 py-4 text-center text-[length:calc(12.5*var(--content))] text-ink-4",Z3="we-no-drag flex flex-shrink-0 items-center gap-0.75",P3="flex items-center gap-0.75 opacity-0 transition-opacity duration-[120ms] group-hover/row:opacity-100",i1="grid size-6 cursor-pointer place-items-center rounded-md border-0 bg-transparent p-0 text-ink-3 outline-none hover:bg-[#f1f0ea] hover:text-ink-2",s1="relative grid size-[calc(34*var(--content))] flex-shrink-0 place-items-center overflow-hidden rounded-[calc(6*var(--content))] border border-line bg-[#f4f3ee] text-ink-3",J3="size-full object-cover",W3="absolute bottom-0 inset-x-0 truncate bg-[rgba(15,18,9,0.55)] px-0.5 text-center text-[length:calc(7.5*var(--content))] font-bold leading-[1.5] tracking-[0.02em] text-white",ej={doc:$f,spreadsheet:Sk,presentation:W0,image:Xf,video:av};function wo({glyph:n,extension:l,size:s=16,className:o}){const u=ej[n];return f.jsxs(f.Fragment,{children:[f.jsx(u,{size:s,strokeWidth:1.5,className:o,style:{width:`calc(${s} * var(--content))`,height:`calc(${s} * var(--content))`}}),l&&f.jsx("span",{className:W3,children:l})]})}function tj({entry:n}){const{glyph:l,extension:s}=fc(n);return f.jsx("span",{className:s1,children:n.src?f.jsx("img",{className:J3,src:n.src,alt:"",draggable:!1}):f.jsx(wo,{glyph:l,extension:s})})}function o1({entry:n,trailing:l,onRemove:s,dragProps:o,dragging:u}){return f.jsxs("div",{...o,className:me(Y3,o&&"cursor-grab hover:border-[#d9d5c9]",u&&"cursor-grabbing border-transparent bg-accent-soft [&>*]:opacity-[0.25]"),children:[n?f.jsx(tj,{entry:n}):f.jsx("span",{className:s1,children:f.jsx(wo,{glyph:"doc",extension:""})}),f.jsxs("div",{className:K3,children:[f.jsx("span",{className:$3,title:n==null?void 0:n.name,children:(n==null?void 0:n.name)??"Document unavailable"}),f.jsx("span",{className:X3,children:n?Q3(n):"This file is no longer on the property"})]}),(l!==void 0||s!==void 0)&&f.jsx("div",{className:Z3,children:f.jsxs("span",{className:P3,children:[l,s&&f.jsx("button",{type:"button",className:me(i1,"hover:bg-[#fbecea] hover:text-danger"),title:"Remove",onClick:s,children:f.jsx(De.trash,{})})]})})]})}function nj({label:n,onAdd:l}){return f.jsxs("div",{className:F3,children:[f.jsx("span",{className:"text-ink-4",children:f.jsx(wo,{glyph:"doc",extension:"",size:22})}),f.jsx("span",{children:"No document yet"}),f.jsxs("button",{type:"button",className:"inline-flex h-6.5 cursor-pointer items-center gap-1.25 rounded-full border-0 bg-accent pl-2.25 pr-2.75 text-[length:calc(11.5*var(--content))] font-semibold text-white transition-[background] duration-[120ms] hover:bg-accent-ink",onClick:l,children:[f.jsx(De.plus,{})," ",n]})]})}const r1={units:{idKey:"unit_id",ownership:"property"},contacts:{idKey:"id",cap:12,min:1,ownership:"library"},comparables:{idKey:"id",ownership:"property"}};function c1(n){var s;if(((s=n.source)==null?void 0:s.kind)!=="direct")return null;const l=n.source.field;return l!==void 0&&Object.hasOwn(r1,l)?l:null}const aj=["tour","video","social","listing","file","map"],Zl={matterport:{kind:"tour",label:"Matterport",pattern:/(^|\.)matterport\.com$/i,strategy:"api"},biganto:{kind:"tour",label:"Biganto",pattern:/(^|\.)biganto\.com$/i,strategy:"opengraph"},youtube:{kind:"video",label:"YouTube",pattern:/(^|\.)(youtube\.com|youtu\.be)$/i,strategy:"oembed"},vimeo:{kind:"video",label:"Vimeo",pattern:/(^|\.)vimeo\.com$/i,strategy:"oembed"},zillow:{kind:"listing",label:"Zillow",pattern:/(^|\.)zillow\.com$/i,strategy:"none"},redfin:{kind:"listing",label:"Redfin",pattern:/(^|\.)redfin\.com$/i,strategy:"none"},dropbox:{kind:"file",label:"Dropbox",pattern:/(^|\.)dropbox\.com$/i,strategy:"none"},drive:{kind:"file",label:"Google Drive",pattern:/^drive\.google\.com$/i,strategy:"none"},maps:{kind:"map",label:"Google Maps",pattern:/(^|\.)google\.com$/i,path:/^\/maps(\/|$)/i,strategy:"none"}};function u1(n){let l;try{l=new URL(n)}catch{return null}if(l.protocol!=="http:"&&l.protocol!=="https:")return null;for(const[s,o]of Object.entries(Zl))if(o.pattern.test(l.hostname)&&!(o.path&&!o.path.test(l.pathname)))return s;return null}function Ef(n,l){const s=u1(l);return s===null?!1:s===n?!0:aj.includes(n)&&Zl[s].kind===n}const d1=_.createContext(null);function lj({ports:n,children:l}){return f.jsx(d1.Provider,{value:n,children:l})}function Yn(){const n=_.useContext(d1);if(!n)throw new Error("useSlotEditorPorts: missing SlotEditorPortsProvider");return n}function Dl(n){return Yn().useEditorStore(n)}function ij(){return Yn().api}function f1(){return Yn()}function jf(n){var l;return n===void 0?"Link":((l=Zl[n])==null?void 0:l.label)??"Link"}function ac(n){return n.kind==="tour"?jf(n.provider):n.kind!=="video"?"":n.videoSource==="link"?jf(n.provider):n.ready===!1?"Processing…":e1(n.durationMs)||"Video"}function mh({kind:n,size:l}){return n==="tour"?f.jsx(De.tour,{size:l}):f.jsx(De.play,{size:l})}const sj=me(ot,"inline-flex items-center gap-1.25 rounded-sm bg-[rgba(255,255,255,0.94)] px-2.5 py-1.5 text-[length:calc(11.5*var(--content))] font-semibold text-ink transition-[background] duration-[120ms] hover:bg-white"),oj="flex items-center justify-between gap-2 px-0.5 text-caption text-ink-3",rj="text-caption font-medium text-ink-4",cj="16 / 9",uj="relative block w-full overflow-hidden rounded-[calc(9*var(--content))] bg-[#e6e3da]",h1="block size-full object-cover",dj="pointer-events-none absolute bottom-1.25 left-1.25 z-[3] rounded-full bg-[rgba(15,18,9,0.72)] px-1.5 py-0.5 text-[10.5px] font-semibold tabular-nums text-white group-data-[ghost]/tile:hidden";function m1({kind:n,label:l,poster:s,hasSelection:o,addLabel:u,onPick:d,status:h,metaName:p,metaDetail:m,emptyText:g,noPosterText:x,children:b}){return f.jsxs("div",{className:Zf,children:[f.jsxs("div",{className:Qn,children:[f.jsx(Jf,{children:l}),f.jsxs("div",{className:"relative h-72.5 overflow-hidden rounded-[calc(9*var(--content))] bg-[#e6e3da]",children:[s?f.jsx("img",{className:"size-full object-cover",src:s,alt:""}):f.jsxs("div",{className:me("flex size-full flex-col items-center justify-center gap-1.5 text-small text-ink-3",cc),children:[o?f.jsx(mh,{kind:n,size:22}):f.jsx(De.up,{}),f.jsx("span",{children:o?x:g})]}),f.jsxs("div",{className:"absolute inset-x-0 bottom-0 flex items-center justify-between bg-[linear-gradient(to_top,rgba(15,18,9,0.55),transparent)] p-2.5",children:[f.jsx("button",{type:"button",className:sj,onClick:d,children:o?f.jsxs(f.Fragment,{children:[f.jsx(De.swap,{})," Replace"]}):f.jsxs(f.Fragment,{children:[f.jsx(De.up,{})," ",u]})}),h&&f.jsx("span",{className:rj,children:h})]})]})]}),p!==void 0&&f.jsxs("div",{className:oj,children:[f.jsx("span",{className:"truncate",children:p}),m&&f.jsx("span",{className:"shrink-0 tabular-nums",children:m})]}),b]})}function p1({kind:n,poster:l,index:s,ghost:o,badge:u,overlays:d,placeholderClassName:h}){return f.jsxs("span",{className:me(uj,o&&"opacity-[0.28]"),style:{aspectRatio:cj},children:[l?f.jsx("img",{className:h1,src:l,alt:"",draggable:!1}):f.jsxs("span",{className:me(h,"relative"),children:[f.jsx("span",{className:"absolute inset-0 grid place-items-center text-ink-3 opacity-40",children:f.jsx(mh,{kind:n,size:22})}),f.jsx("span",{className:"relative",children:s+1})]}),d,u&&f.jsx("span",{className:dj,children:u})]})}function y1({poster:n,index:l,placeholderClassName:s}){return n?f.jsx("img",{className:h1,src:n,alt:"",draggable:!1}):f.jsx("div",{className:s,children:l+1})}function Mf(n){if(n===void 0)return"Not a valid URL";const l=Object.entries(Zl).find(([o])=>o===n);if(l)return`Needs a ${l[1].label} link`;const s=g1(n);return s.length>0?`Needs a ${n} link (${s.join(", ")})`:`Needs a ${n} link`}function g1(n){return Object.values(Zl).filter(l=>l.kind===n).map(l=>l.label)}function fj(n){try{return new URL(n)}catch{return null}}function Cf(n){const l=n.trim();return l&&(/^https?:\/\//i.test(l)?l:`https://${l}`)}function Af(n){const l=fj(n);if(l===null||l.protocol!=="http:"&&l.protocol!=="https:")return!1;const s=l.hostname;return s.includes(".")&&!s.startsWith(".")&&!s.endsWith(".")}const hj={photo:"photos",plan:"floor plans",library:"library images",video:"videos",tour:"tours",document:"documents"},mj={photo:"Photos",plan:"Floor plans",library:"Library",video:"Videos",tour:"Tours",document:"Documents"},pj={video:"video",tour:"tour"},yj=["photo","plan","video","document"];function gj(n){return n==="video"?"video/*":n==="document"?QE:"image/*"}function qd(n){return n.kind==="plan"&&n.ready===!1||n.kind==="tour"&&n.ready===!1?!1:!n.status||n.status==="classifying"}function bj(n,l){const s=new Set(n);return s.has(l)?s.delete(l):s.add(l),s}function b1(n){const{items:l,addFiles:s,retry:o}=r3(n),{items:u}=dh(n),{items:d}=Pv(n),{items:h}=Wv(),{items:p}=_o(n),{items:m}=fh(n),{items:g}=Zv(n),x=new Set([...u.map(E=>E.id),...d.map(E=>E.id),...p.map(E=>E.id),...m.map(E=>E.id),...g.map(E=>E.id)]);return{items:[...l.filter(E=>!x.has(E.id)),...u,...d,...h,...p,...m,...g],addFiles:s,retry:o}}function vj({entry:n}){if(n.kind==="document"){const{glyph:l,extension:s}=fc(n);return f.jsx(wo,{glyph:l,extension:s,size:30})}return f.jsx(mh,{kind:n.kind==="tour"?"tour":"video",size:18})}function xj(n){switch(n){case"uploading":return"Uploading…";case"classifying":return"Processing…";case"failed":return"Failed — retry";case"not_photo":return"Not a photo"}}function jb({primaryLabel:n,primaryDisabled:l,onPrimary:s,onClose:o}){return f.jsx("div",{className:uv,children:f.jsxs("div",{className:dv,children:[f.jsx("button",{className:hv,onClick:o,children:"Cancel"}),f.jsx("button",{className:Wf,disabled:l,onClick:s,children:n})]})})}function _j({open:n,title:l,propertyId:s,onClose:o,footer:u,selectedIds:d,onCellClick:h,onCellDoubleClick:p,initialFilter:m,kinds:g,disabledKinds:x,videoSources:b,onPickOne:E}){const{items:j,addFiles:T,retry:C}=b1(s),M=cs(),{api:R,capabilities:D}=f1(),z=g??["photo","plan","library","video"],[I,le]=_.useState(""),ne=x??[],W=z.find(N=>!ne.includes(N))??z[0]??"photo",[L,ue]=_.useState(z.includes(m)&&!ne.includes(m)?m:W),de=_.useRef(null),re=(b==null?void 0:b.includes("link"))??!1,ie=L==="video"&&!re?null:pj[L]??null,U=I.trim().toLowerCase(),H=j.filter(N=>N.kind===L&&N.name.toLowerCase().includes(U)&&(re||N.videoSource!=="link")),[$,w]=_.useState(""),[F,ce]=_.useState(null),[ee,G]=_.useState(!1),S=async()=>{const N=$.trim();if(!N||ee||ie===null)return;const P=Cf(N);if(!Af(P)||!Ef(ie,P)){ce(Mf(ie));return}const Q=u1(P);if(Q===null){ce(Mf(ie));return}ce(null),G(!0);try{const Z=await R.postLink(s,P);await M.invalidateQueries({queryKey:[ie==="tour"?"tours":"videos",s]}),w(""),E==null||E(ie==="tour"?{id:Z.id,kind:"tour",name:Zl[Q].label,size:"",src:"",caption:null,ready:!0,provider:Q}:{id:Z.id,kind:"video",name:Zl[Q].label,size:"",src:"",caption:null,ready:!0,durationMs:null,videoSource:"link",provider:Q})}catch{ce("Could not add that link. Try again.")}finally{G(!1)}},q=N=>{const P=N.target.files,Q=L==="plan";if(T(P,Q?{declaredType:"floor_plan"}:void 0),!Q){const Z=P==null?void 0:P[0],pe=Z?Jv(Z):"photo";z.includes(pe)&&!ne.includes(pe)&&ue(pe)}N.target.value=""},Y=N=>{if(N.status==="failed"){C(N.id);return}qd(N)&&h(N)};return f.jsxs(gv,{open:n,variant:"pick",onClose:o,children:[f.jsxs("div",{className:sv,children:[f.jsx("div",{className:ov,children:f.jsx("h2",{className:rv,children:l})}),f.jsx("button",{className:cv,onClick:o,"aria-label":"Close",children:f.jsx(De.x,{})})]}),f.jsxs("div",{className:Zg,children:[f.jsxs("div",{className:Pg,children:[f.jsx("span",{className:Jg,children:f.jsx(De.search,{})}),f.jsx("input",{className:Wg,autoFocus:!0,placeholder:"Search file names…",value:I,onChange:N=>le(N.target.value)})]}),z.length>1&&f.jsx("div",{className:m4,children:z.map(N=>{const P=ne.includes(N);return f.jsx("button",{type:"button",className:y4(L===N,P),disabled:P,"aria-disabled":P||void 0,onClick:()=>!P&&ue(N),children:mj[N]},N)})})]}),ie!==null&&f.jsxs("div",{className:Zg,children:[f.jsxs("div",{className:Pg,children:[f.jsx("span",{className:Jg,children:f.jsx(De.link,{})}),f.jsx("input",{className:Wg,placeholder:`Paste a ${ie} link (${g1(ie).join(" or ")})…`,value:$,disabled:ee,onChange:N=>{w(N.target.value),ce(null)},onKeyDown:N=>{N.key==="Enter"&&S()}})]}),f.jsx("button",{type:"button",className:Wf,disabled:ee||$.trim().length===0,onClick:()=>void S(),children:ee?"Adding…":"Add link"})]}),F&&f.jsx("div",{className:"px-4 pb-1 text-[11.5px] font-medium text-[#b4342b]",role:"alert",children:F}),f.jsx("div",{className:t4,children:f.jsxs("div",{className:n4,children:[D.upload&&yj.includes(L)&&f.jsxs("button",{className:d4,onClick:()=>{var N;return(N=de.current)==null?void 0:N.click()},children:[f.jsx("span",{className:f4,children:f.jsx(De.up,{})}),f.jsx("span",{className:h4,children:"Upload"})]}),H.length===0?f.jsxs("div",{className:a4,children:["No ",hj[L]," match"," ",U?`”${I}”`:"your search","."]}):H.map(N=>f.jsxs("button",{className:l4,"data-selected":d.has(N.id)?"":void 0,"aria-disabled":!qd(N)&&N.status!=="failed",onClick:()=>Y(N),onDoubleClick:p&&qd(N)?()=>p(N):void 0,children:[f.jsx("span",{className:i4,children:f.jsxs("span",{className:s4,children:[N.src?f.jsx("img",{className:N.kind==="plan"&&N.ready===!1?`${eb} opacity-40`:eb,src:N.src,alt:""}):f.jsx("span",{className:r4,children:f.jsx(vj,{entry:N})}),d.has(N.id)&&f.jsx("span",{className:o4,children:f.jsx(De.check,{})}),!N.status&&ac(N)&&f.jsx("span",{className:u4,children:ac(N)}),N.status&&f.jsx("span",{className:"absolute inset-x-0 bottom-0 bg-[rgba(15,18,9,0.6)] px-1.5 py-1 text-[10.5px] font-semibold text-white",title:N.error??void 0,children:xj(N.status)}),N.kind==="tour"&&N.ready===!1&&f.jsx("span",{className:"absolute inset-x-0 bottom-0 bg-[rgba(15,18,9,0.6)] px-1.5 py-1 text-[10.5px] font-semibold text-white",role:"status",children:"Not embeddable"}),N.kind==="plan"&&N.ready===!1&&f.jsx("span",{className:"absolute inset-x-0 bottom-0 bg-[rgba(15,18,9,0.6)] px-1.5 py-1 text-[10.5px] font-semibold text-white",role:"status",children:"Processing…"})]})}),(N.kind==="document"||N.kind==="tour")&&f.jsx("span",{className:c4,title:N.name,children:N.name})]},N.id))]})}),u,D.upload&&f.jsx("input",{ref:de,type:"file",accept:gj(L),multiple:!0,hidden:!0,onChange:q})]})}function cl(n){var M,R;const{propertyId:l,onClose:s}=n,{items:o}=b1(l),u=((M=n.kinds)==null?void 0:M.length)===1?n.kinds[0]:void 0,d=n.noun??(u==="video"||u==="tour"?u:"photo"),[h,p]=_.useState(n.mode==="single"?n.currentId??null:null),[m,g]=_.useState(()=>n.mode==="multi"?new Set(n.selectedIds.filter(Boolean)):new Set),x=D=>{n.mode==="single"?p(D.id):g(z=>bj(z,D.id))};let b,E,j,T,C;if(n.mode==="single"){const{onPick:D,currentId:z}=n,I=o.find(le=>le.id===h)??null;b=new Set(h?[h]:[]),E=le=>D(le),j=f.jsx(jb,{primaryLabel:`Use ${d}`,primaryDisabled:!I,onPrimary:()=>I&&D(I),onClose:s}),T=`Choose a ${d}`,C=((R=o.find(le=>le.id===z))==null?void 0:R.kind)??"photo"}else{const{onApply:D}=n;b=m,E=void 0,j=f.jsx(jb,{primaryLabel:"Save selection",onPrimary:()=>D(o.filter(z=>m.has(z.id))),onClose:s}),T=`Choose ${d}s`,C="photo"}return f.jsx(_j,{open:n.open,title:n.title??T,propertyId:l,onClose:s,initialFilter:n.initialFilter??C,kinds:n.kinds,disabledKinds:n.disabledKinds,videoSources:n.videoSources,onPickOne:n.mode==="single"?n.onPick:void 0,selectedIds:b,onCellClick:x,onCellDoubleClick:E,footer:j})}function wj({slot:n,value:l,onChange:s,propertyId:o}){const[u,d]=_.useState(!1),h=(l==null?void 0:l.asset_id)??"",p=l1(o),m=h?p(h):void 0;return f.jsxs("div",{className:Qn,children:[f.jsx(Jf,{children:n.label}),h?f.jsx(o1,{entry:m,trailing:f.jsx("button",{type:"button",className:i1,title:"Replace",onClick:()=>d(!0),children:f.jsx(De.swap,{})}),onRemove:()=>s(null)}):f.jsx(nj,{label:`Add ${xo(n.label,"Document")}`,onAdd:()=>d(!0)}),u&&f.jsx(cl,{mode:"single",propertyId:o,noun:"document",kinds:["document","photo","video"],initialFilter:h?void 0:"document",currentId:h||void 0,onClose:()=>d(!1),onPick:g=>{d(!1),s({asset_id:g.id})}})]})}const Sj={PanelUI:wj,applyOptimistic:null,coerce:a1};function kj(n,l,s){if(l===s||l<0||s<0)return n;const o=n.slice(),[u]=o.splice(l,1);return o.splice(s,0,u),o}const v1="data-drag-scope";function Gd(n){return Array.from(n.querySelectorAll("[data-dragid]")).filter(l=>l.closest(`[${v1}]`)===n)}function x1({items:n,getKey:l,onReorder:s,onDrop:o,axis:u="xy",threshold:d=4,ignoreSelector:h=".we-no-drag"}){const[p,m]=_.useState(null),[g,x]=_.useState({w:0,h:0}),b=_.useRef(null),E=_.useRef(null),j=_.useRef({}),T=_.useRef({grabX:0,grabY:0,scale:1}),C=_.useRef({x:0,y:0}),M=_.useRef(null),R=_.useRef(null),D=_.useRef(n),z=_.useRef(l),I=_.useRef({onReorder:s,onDrop:o});_.useLayoutEffect(()=>{I.current={onReorder:s,onDrop:o}});function le(){const re=E.current,ie=b.current;if(!re||!ie)return;const U=ie.getBoundingClientRect(),H=T.current.scale||1,$=(C.current.x-U.left)/H-T.current.grabX,w=(C.current.y-U.top)/H-T.current.grabY;u!=="y"&&(re.style.left=`${$}px`),re.style.top=`${w}px`}function ne(){const re=b.current,ie=re.getBoundingClientRect(),U=T.current.scale||1,H=(C.current.x-ie.left)/U,$=(C.current.y-ie.top)/U,w=D.current;let F=0,ce=1/0;return Gd(re).forEach(ee=>{const G=w.findIndex(N=>z.current(N)===ee.dataset.dragid);if(G<0)return;const S=ee.offsetLeft+ee.offsetWidth/2,q=ee.offsetTop+ee.offsetHeight/2,Y=(H-S)**2+($-q)**2;Y<ce&&(ce=Y,F=G)}),Math.max(0,Math.min(w.length-1,F))}_.useLayoutEffect(()=>{const re=b.current;if(!re)return;re.setAttribute(v1,"");const ie=j.current,U={};Gd(re).forEach(H=>{const $=H.dataset.dragid,w={left:H.offsetLeft,top:H.offsetTop};U[$]=w;const F=ie[$];if(F&&$!==R.current){const ce=F.left-w.left,ee=F.top-w.top;(ce||ee)&&H.animate([{transform:`translate(${ce}px,${ee}px)`},{transform:"none"}],{duration:190,easing:"cubic-bezier(.2,.7,.3,1)"})}}),j.current=U,R.current&&le()});function W(re,ie){var F,ce,ee,G,S;const U=b.current,H=Gd(U).find(q=>q.dataset.dragid===re)??null;if(!H)return;const $=H.getBoundingClientRect(),w=U.getBoundingClientRect().width/U.offsetWidth||1;T.current={grabX:(ie.clientX-$.left)/w,grabY:(ie.clientY-$.top)/w,scale:w},(ce=(F=document.activeElement)==null?void 0:F.blur)==null||ce.call(F),(S=(G=(ee=window.getSelection)==null?void 0:ee.call(window))==null?void 0:G.removeAllRanges)==null||S.call(G),C.current={x:ie.clientX,y:ie.clientY},D.current=n,z.current=l,R.current=re,x({w:H.offsetWidth,h:H.offsetHeight}),m(re)}function L(re,ie){re.button===0&&(re.target.closest(h)||(M.current={key:ie,x:re.clientX,y:re.clientY},window.addEventListener("pointermove",ue),window.addEventListener("pointerup",de)))}function ue(re){const ie=M.current;if(!ie)return;if(!R.current){if(Math.hypot(re.clientX-ie.x,re.clientY-ie.y)<d)return;W(ie.key,re)}C.current={x:re.clientX,y:re.clientY},le();const U=ne(),H=D.current,$=H.findIndex(F=>z.current(F)===R.current);if($<0||$===U)return;const w=kj(H,$,U);D.current=w,I.current.onReorder(w)}function de(){window.removeEventListener("pointermove",ue),window.removeEventListener("pointerup",de),M.current=null,R.current&&(R.current=null,m(null),I.current.onDrop(D.current))}return{containerRef:b,cloneRef:E,getItemProps:re=>({"data-dragid":re,onPointerDown:ie=>L(ie,re)}),draggingKey:p,cloneBox:g}}const Ej="flex min-h-6.5 items-center justify-between gap-2.5",jj=me(ot,"inline-flex h-6.5 items-center gap-1.25 rounded-full bg-accent pl-2.25 pr-2.75 text-[length:calc(11.5*var(--content))] font-semibold text-white transition-[background] duration-[120ms] hover:bg-accent-ink"),Mj="relative grid grid-cols-2 gap-2",Cj="[grid-column:1/-1] py-4.5 text-center text-small text-ink-3",Aj="pointer-events-none absolute z-[60] cursor-grabbing overflow-hidden rounded-[8px] bg-canvas shadow-[0_16px_38px_-8px_rgba(20,18,13,0.5)] after:absolute after:inset-0 after:rounded-[8px] after:border-2 after:border-dashed after:border-[#111] after:content-['']",Nj="relative aspect-[4/3] bg-[#fafaf6]",Tj="absolute inset-0 block size-full object-contain";function Mb(n){return Array.isArray(n)?n.map(l=>{if(typeof l!="object"||l===null)return null;const s=l;if(typeof s.key=="string")return s;const o=typeof s.id=="string"?s.id:"";return{key:w1(),id:o,uploadId:typeof s.upload_id=="string"?s.upload_id:"",url:"",alt:"",floor:typeof s.floor_label=="string"?s.floor_label:""}}).filter(l=>l!==null):[]}function Oj(n){return n.map((l,s)=>{const o=l.floor.trim();return{id:l.id,...l.uploadId?{upload_id:l.uploadId}:{},floor_label:o||null,position:s}})}function _1(n){return n.map(l=>({planId:l.id,label:l.floor}))}let Cb=0;function w1(){return Cb+=1,`pl-${Cb}`}function Id(n){return JSON.stringify(n.map(l=>[l.id,l.floor]))}function Rj(n,l,s){const o=new Map(l.map(u=>[u.id,u]));return n.map(u=>{const d=o.get(u.planId);return d?{...d,floor:u.label}:{key:w1(),id:u.planId,uploadId:"",url:s.get(u.planId)??"",alt:"",floor:u.label}})}function zj(n){return{_key:"fp-sibling",label:n.label,beds:"",baths:"",sqft:"",price:"",plans:_1(n.plans),planExclusions:[],planFloors:{}}}function Dj({plans:n,propertyId:l,unitLabel:s,siblingUnits:o,unitIndex:u,onChange:d}){const{UnitPlanPicker:h,api:p}=f1(),[m,g]=_.useState(!1),[x,b]=_.useState(null),E=l3(l),j=_.useMemo(()=>{const H=new Map;for(const $ of E)H.set($.id,$.thumbnail_url);return H},[E]),T=H=>H.url||j.get(H.id)||"",[C,M]=_.useState(n),[R,D]=_.useState(()=>Id(n)),z=H=>{M(H),D(Id(H)),d(H)},{containerRef:I,cloneRef:le,getItemProps:ne,draggingKey:W,cloneBox:L}=x1({items:C,getKey:H=>H.key,onReorder:M,onDrop:z,axis:"xy"});if(!W){const H=Id(n);H!==R&&(D(H),M(n))}const ue=(H,$)=>z(C.map(w=>w.key===H?{...w,floor:$}:w)),de=H=>z(C.filter($=>$.key!==H)),re=o==null?void 0:o.map(zj),ie=W?C.find(H=>H.key===W):null,U=ie?T(ie):"";return f.jsxs("div",{className:"flex flex-col gap-2.25",children:[f.jsxs("div",{className:Ej,children:[f.jsxs("span",{className:va,children:[C.length," floor plan",C.length===1?"":"s"]}),f.jsx("div",{className:"flex items-center gap-1.5",children:f.jsxs("button",{type:"button",className:jj,onClick:()=>g(!0),children:[f.jsx(De.plus,{})," Add"]})})]}),f.jsxs("div",{className:Mj,ref:I,children:[C.length===0&&f.jsx("div",{className:Cj,children:"No floor plans yet — use Add to choose plans."}),C.map((H,$)=>f.jsx(U3,{src:T(H)||null,floor:H.floor,onFloorChange:w=>ue(H.key,w),onCrop:()=>b(H.id),onRemove:()=>de(H.key),removeTitle:"Remove from unit",badge:$+1,drag:{dataDragId:H.key,onPointerDown:ne(H.key).onPointerDown,active:W===H.key}},H.key)),ie&&f.jsx("div",{ref:le,className:Aj,style:{width:L.w,height:L.h,left:0,top:0},children:f.jsx("div",{className:Nj,children:U&&f.jsx("img",{className:Tj,src:U,alt:"",draggable:!1})})})]}),m&&f.jsx(h,{open:!0,propertyId:l,unit:{_key:"fp-preview",label:s??"",beds:"",baths:"",sqft:"",price:"",plans:_1(C),planExclusions:[],planFloors:{}},units:re,unitIndex:u,library:E,onClose:()=>g(!1),onUnitPatch:H=>{H.plans&&z(Rj(H.plans,C,j))},onCrop:b}),x&&f.jsx(x3,{propertyId:l,planId:x,getSourcePage:p.getFloorplanSourcePage,onClose:()=>b(null)})]})}const Uj={failed:"Crop failed — the image is unchanged. Try cropping again.",slow:"This crop is still processing. It will appear as soon as it finishes."},Lj="m-0 text-caption leading-[1.4] text-ink-4";function S1({storeKey:n}){const l=TE(n),s=En(o=>o.clearNotice);return l?f.jsxs("p",{role:"alert","data-crop-notice":l,className:me(l==="failed"?Pf:Lj,"flex items-center justify-between gap-2"),children:[f.jsx("span",{children:Uj[l]}),f.jsx("button",{type:"button",className:me(ot,"shrink-0 underline"),onClick:()=>s(n),children:"Dismiss"})]}):null}const Bj=360,Hj="relative overflow-hidden rounded-[calc(9*var(--content))]";function k1({src:n,derivativeUrl:l,mode:s,slotAspect:o,sizing:u,ar:d,dimmed:h,children:p}){const m=l??n,g=s==="locked"?"cover":"contain",x=_.useRef(null),[b,E]=_.useState(null);_.useLayoutEffect(()=>{if(s!=="free")return;const D=x.current;D!=null&&D.complete&&D.naturalWidth>0&&D.naturalHeight>0&&E({src:m,aspect:D.naturalWidth/D.naturalHeight})},[m,s]);const j=D=>{if(s!=="free")return;const z=D.currentTarget;z.naturalWidth>0&&z.naturalHeight>0&&E({src:m,aspect:z.naturalWidth/z.naturalHeight})},T=b&&b.src===m?b.aspect:typeof d=="number"&&d>0?d:o,C=s==="locked"?o:T,M=h?UE:void 0,R=u==="single"?{aspectRatio:String(C),width:"100%",maxWidth:`${Bj*C}px`,marginInline:"auto"}:{aspectRatio:String(C),width:"100%"};return f.jsxs("div",{className:Hj,style:R,children:[f.jsx("img",{ref:x,className:`block size-full object-center ${g==="cover"?"object-cover":"object-contain"}`,src:m,alt:"",draggable:!1,onLoad:j,style:M}),p]})}function qj(n){var u,d;const l=ij(),o=(u=en({queryKey:["property",n],queryFn:()=>l.fetchProperty(n)}).data)==null?void 0:u.contacts;return((d=(o==null?void 0:o.find(h=>h.is_primary))??(o==null?void 0:o[0]))==null?void 0:d.library_item_id)??null}const $r=me(ot,"inline-flex items-center gap-1.25 rounded-sm bg-[rgba(255,255,255,0.94)] px-2.5 py-1.5 text-[length:calc(11.5*var(--content))] font-semibold text-ink transition-[background] duration-[120ms] hover:bg-white");function Ab(n,l,s,o){const u=()=>{const d=n.current;return d.photo_id!==o?!0:!!(d.pending_crop&&d.pending_crop.crop_key!==s.crop_key)};return{apply:(d,h)=>{u()||l({...n.current,rect:s.rect,ar:s.ar,crop_key:d,mobile:s.mobile?{rect:s.mobile.rect,crop_key:h??null,derived:s.mobile.derived}:n.current.mobile??void 0,pending_crop:null})},revert:()=>{u()||l({...n.current,pending_crop:null})}}}function Nb({value:n,onChange:l,propertyId:s,cropKey:o,cropCfg:u,contactImage:d,displayName:h}){var ee;const{api:p}=Yn(),[m,g]=_.useState(null),x=dc(s),b=Qv(s,[n.crop_key],p.getCropDerivativeUrl),E=n.crop_key?b.get(n.crop_key):void 0,j=En(G=>o in G.byKey),T=o.startsWith(`${s}:`)?o.slice(s.length+1):o,[C="",M=""]=T.split(":"),R=qj(s),D=(d==null?void 0:d.itemId)??R,z=_.useRef(null),[I,le]=_.useState(!1),ne=d!==null&&D!==null,W=Wd(n),L=W?x.has(W):!1,ue=en({queryKey:["staged-upload-url",D,W],queryFn:()=>p.presignLibraryItemUpload(D,W),enabled:!!D&&!!W&&!L}),de=(W?x.get(W):void 0)??ue.data??n.url??void 0,re=_.useRef(null),ie=async G=>{if(!D||!d)return;le(!0);const S=xS(d.kind==="headshot"?{kind:"headshot"}:{kind:"logo",variant:d.variant});try{const{upload_id:q,url:Y}=await p.stageLibraryItemImage(D,G,S),N=re.current;re.current=q,l({...n,photo_id:q,url:Y,rect:null,ar:null,crop_key:null,mobile:null,pending_crop:null}),N&&N!==q&&p.deleteStagedLibraryItemImage(D,N).catch(()=>{})}catch(q){console.error("[editor] contact image stage failed",{field:S,contactId:D,err:q})}finally{le(!1)}},U=G=>{var q;const S=(q=G.target.files)==null?void 0:q[0];G.target.value="",S&&ie(S)},H=f.jsxs("button",{type:"button",className:$r,disabled:I,onClick:()=>{var G;return(G=z.current)==null?void 0:G.click()},children:[f.jsx(De.up,{})," ",I?"Saving…":"Upload"]}),$=_.useRef(n);_.useEffect(()=>{$.current=n},[n]);const w=n.pending_crop??null,F=_.useCallback(G=>Ab($,l,G.pending,$.current.photo_id),[l]);Gv(w?[{key:o,pending:w,propertyId:s,instanceId:C,slotId:M}]:[],F);const ce=async G=>{var S,q,Y;if(g(null),!!n.photo_id){if(_v(G.rect)){(n.rect||n.crop_key||n.mobile||n.pending_crop)&&l({...n,rect:null,ar:null,crop_key:null,mobile:null,pending_crop:null});return}try{const N=await p.cropImage(s,n.photo_id,G.rect,((S=G.mobile)==null?void 0:S.rect)??null),P={job_id:N.job_id,crop_key:N.crop_key,rect:G.rect,ar:G.ar,mobile:G.mobile&&N.mobile?{job_id:N.mobile.job_id,crop_key:N.mobile.crop_key,rect:G.mobile.rect,derived:G.mobile.derived}:null};l({...$.current,pending_crop:P});const Q=Ab($,l,P,n.photo_id);En.getState().start(o,{jobId:N.job_id,propertyId:s,cropKey:N.crop_key,mobileJobId:(q=N.mobile)==null?void 0:q.job_id,mobileCropKey:(Y=N.mobile)==null?void 0:Y.crop_key,instanceId:C,slotId:M,apply:Q.apply,revert:Q.revert})}catch(N){En.getState().notice(o,"failed"),console.error("[editor] image crop failed",{instanceId:C,slotId:M,err:N})}}};return f.jsxs("div",{className:Zf,children:[f.jsxs("div",{className:Qn,children:[f.jsx(Jf,{children:h??"Image"}),de?f.jsxs(k1,{src:de,derivativeUrl:E,ar:n.ar,mode:u.mode,slotAspect:u.aspect,sizing:"single",dimmed:j,children:[j&&f.jsx(Iv,{}),f.jsx("div",{className:"absolute inset-x-0 bottom-0 flex items-center justify-between bg-[linear-gradient(to_top,rgba(15,18,9,0.55),transparent)] p-2.5",children:f.jsxs("div",{className:"flex items-center gap-1.5",children:[ne?H:f.jsxs("button",{type:"button",className:$r,onClick:()=>g("pick"),children:[f.jsx(De.swap,{})," Replace"]}),f.jsxs("button",{type:"button",className:$r,onClick:()=>g("crop"),children:[f.jsx(De.crop,{})," Crop"]})]})})]}):f.jsxs("div",{className:"relative h-72.5 overflow-hidden rounded-[calc(9*var(--content))] bg-[#e6e3da]",children:[f.jsxs("div",{className:me("flex size-full flex-col items-center justify-center gap-1.5 text-small text-ink-3",cc),children:[f.jsx(De.up,{}),f.jsx("span",{children:"No image yet"})]}),f.jsx("div",{className:"absolute inset-x-0 bottom-0 flex items-center justify-between bg-[linear-gradient(to_top,rgba(15,18,9,0.55),transparent)] p-2.5",children:ne?H:f.jsxs("button",{type:"button",className:$r,onClick:()=>g("pick"),children:[f.jsx(De.up,{})," Add image"]})})]}),f.jsx(S1,{storeKey:o})]}),ne&&f.jsx("input",{ref:z,type:"file",accept:"image/*",hidden:!0,onChange:U}),m==="pick"&&f.jsx(cl,{mode:"single",propertyId:s,currentId:n.photo_id||void 0,onClose:()=>g(null),onPick:G=>{if(G.id===n.photo_id){l({...n,url:G.src}),g(null);return}l({...n,photo_id:G.id,url:G.src,alt:n.alt||G.caption||"",rect:null,ar:null,crop_key:null,pending_crop:null}),g(null)}}),m==="crop"&&de&&f.jsx(th,{chrome:cn,src:de,mode:u.mode,aspect:u.aspect,aspectLabel:u.aspectLabel,mobileAspect:u.mobileAspect,seed:{rect:n.rect??null},mobileSeed:{rect:((ee=n.mobile)==null?void 0:ee.rect)??null},onClose:()=>g(null),onApply:G=>{ce(G)}})]})}function Gj({slot:n,instanceId:l,slotId:s,value:o,onChange:u,propertyId:d,recordContext:h}){var x;if(h){if(n.sourceFilter==="floorplans"&&d!=null){const b=(h.siblingRecords??[]).map(j=>({label:typeof j.unit_label=="string"?j.unit_label:"",plans:Mb(j.floor_plans)})),E=h.itemIndex;return f.jsx(Dj,{plans:Mb(o),propertyId:d,unitLabel:E!=null&&((x=b[E])==null?void 0:x.label)||void 0,unitIndex:E,siblingUnits:b,onChange:j=>u(Oj(j))})}if(d!=null&&l!=null&&s!=null){const b=Xg(n.source);return f.jsx(Nb,{value:o,onChange:u,propertyId:d,cropKey:`${d}:${l}:${s}:${h.fieldKey}`,cropCfg:tf(n),displayName:n.label,contactImage:b?{...b,instanceId:l,slotId:s,itemId:h.itemId}:null})}return null}const p=tf(n),m=`${d}:${l}:${s}`,g=Xg(n.source);return f.jsx(Nb,{value:o,onChange:u,propertyId:d,cropKey:m,cropCfg:p,contactImage:g?{...g,instanceId:l,slotId:s}:null,displayName:n.label})}function Ij(n,l){const s=n.querySelector("img");if(s){l.url&&s.setAttribute("src",l.url),s.setAttribute("alt",l.alt??""),s.style.transform="",s.style.transformOrigin="",s.style.objectPosition="";return}const o=n.querySelector("video");o&&(l.url?o.setAttribute("poster",l.url):o.removeAttribute("poster"))}function E1(n){if(n&&typeof n=="object"){const l=n;return{photo_id:typeof l.photo_id=="string"&&l.photo_id.length>0?l.photo_id:typeof l.asset_id=="string"?l.asset_id:"",url:typeof l.url=="string"?l.url:"",alt:typeof l.alt=="string"?l.alt:"",rect:l.rect&&typeof l.rect=="object"?l.rect:void 0,ar:typeof l.ar=="number"?l.ar:void 0,crop_key:typeof l.crop_key=="string"?l.crop_key:void 0,mobile:l.mobile&&typeof l.mobile=="object"&&l.mobile.rect?l.mobile:void 0,pending_crop:DE(l.pending_crop)??void 0}}return{photo_id:"",url:"",alt:""}}const Qj={PanelUI:Gj,applyOptimistic:Ij,coerce:n=>Array.isArray(n)?n:E1(n)},Vj=me(ot,"inline-flex h-6.5 items-center gap-1.25 rounded-full bg-accent pl-2.25 pr-2.75 text-[length:calc(11.5*var(--content))] font-semibold text-white transition-[background] duration-[120ms] hover:bg-accent-ink"),Yj="group/tile relative cursor-grab touch-none select-none",rs=me("grid size-full place-items-center font-mono text-small text-ink-3",cc),Kj="absolute right-1.25 top-1.25 z-[4] flex gap-0.75 opacity-0 transition-opacity duration-[120ms] group-hover/tile:opacity-100 group-data-[ghost]/tile:hidden",j1=me(ot,"we-no-drag grid size-5 place-items-center rounded-[calc(4*var(--content))] bg-white text-ink-2 shadow-[0_1px_2px_rgba(20,18,13,0.18)] transition-[background,color] duration-[120ms] hover:bg-[#f3f1ea] hover:text-ink"),Tb="pointer-events-none absolute bottom-1.25 right-1.25 z-[3] grid size-5.5 place-items-center rounded-full bg-[rgba(255,255,255,0.94)] text-caption font-bold text-ink shadow-[0_1px_3px_rgba(20,18,13,0.25)] group-data-[ghost]/tile:hidden",$j="pointer-events-none absolute z-[60] cursor-grabbing overflow-hidden rounded-[calc(9*var(--content))] shadow-[0_16px_38px_-8px_rgba(20,18,13,0.5)] after:absolute after:inset-0 after:rounded-[calc(9*var(--content))] after:border-2 after:border-dashed after:border-[#111] after:content-['']";function hc(n,l,s,o,u){const d=new Set(l.map(g=>g.id)),h=n.filter(g=>d.has(s(g.value))),p=new Set(h.map(g=>s(g.value))),m=l.filter(g=>!p.has(g.id)).map(g=>u(o(g)));return[...h,...m]}function ph({engine:n,noun:l,max:s,emptyText:o,onAdd:u,renderTile:d,renderClone:h,tileActions:p,children:m}){const{rows:g,atMax:x,canRemove:b}=n,{containerRef:E,cloneRef:j,getItemProps:T,draggingKey:C,cloneBox:M}=n.drag,R=C?n.indexOf(C):-1,D=R>=0?g[R]:null;return f.jsxs("div",{className:Qn,children:[f.jsxs("div",{className:"flex min-h-6.5 items-center justify-between gap-2.5",children:[f.jsxs("span",{className:va,children:[g.length," ",l,g.length===1?"":"s"]}),f.jsxs("button",{type:"button",className:Vj,onClick:u,disabled:x,title:x?`Maximum ${s} ${l}s`:`Add ${l}s`,style:x?{opacity:.5,cursor:"default"}:void 0,children:[f.jsx(De.plus,{})," Add"]})]}),f.jsxs("div",{className:"relative grid grid-cols-2 gap-2",ref:E,children:[g.length===0&&f.jsx("div",{className:"[grid-column:1/-1] py-4.5 text-center text-small text-ink-3",children:o}),g.map((z,I)=>{const le=f.jsxs(f.Fragment,{children:[f.jsxs("span",{className:Kj,children:[p==null?void 0:p(z),b&&f.jsx("button",{type:"button",className:me(j1,"hover:bg-[#FBE6E2] hover:text-[#8E2C1E]"),title:"Remove",onClick:()=>n.remove(z.key),children:f.jsx(De.trash,{})})]}),f.jsx("span",{className:Tb,children:I+1})]});return f.jsx("div",{...T(z.key),"data-ghost":C===z.key?"":void 0,className:me(Yj,C===z.key&&"cursor-grabbing"),children:d(z,I,le)},z.key)}),D&&f.jsxs("div",{ref:j,className:$j,style:{width:M.w,height:M.h,left:0,top:0},children:[h(D,R),f.jsx("span",{className:Tb,children:R+1})]})]}),m]})}let Xj=0;function Fj(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`li-${(Xj++).toString(36)}`}function Nf(n,l){return{key:(l==null?void 0:l(n))??Fj(),value:n}}function Ob(n,l){return n.map(s=>Nf(s,l))}function Qd(n){return JSON.stringify(n)}function ei({items:n,identityOf:l,min:s=0,max:o=1/0,axis:u="y",commit:d,onCommitted:h}){const[p,m]=_.useState(()=>Ob(n,l)),[g,x]=_.useState(()=>Qd(n)),b=_.useRef(p);_.useEffect(()=>{b.current=p},[p]);function E(M){b.current=M,m(M)}function j(M,R){E(M),x(Qd(M.map(D=>D.value))),d(M,R),h==null||h(M,R)}const T=x1({items:p,getKey:M=>M.key,onReorder:E,onDrop:M=>j(M,"reorder"),axis:u,threshold:5});if(!T.draggingKey){const M=Qd(n);M!==g&&(x(M),m(Ob(n,l)))}function C(M,R){const D=b.current;D.some(z=>z.key===M)&&j(D.map(z=>z.key===M?{...z,value:R(z.value)}:z),"edit")}return{rows:p,drag:T,atMax:p.length>=o,canRemove:p.length>s,add:M=>{const R=b.current;R.length>=o||j([...R,Nf(M,l)],"add")},remove:M=>{const R=b.current;R.length<=s||j(R.filter(D=>D.key!==M),"remove")},setValue:(M,R)=>C(M,()=>R),updateValue:C,replace:M=>j(M.slice(0,o),"replace"),mint:M=>Nf(M,l),indexOf:M=>p.findIndex(R=>R.key===M),keyAt:M=>{var R;return((R=p[M])==null?void 0:R.key)??null},latestRows:()=>b.current}}const Zj="block h-auto max-h-35 w-auto max-w-full group-data-[ghost]/tile:opacity-[0.28]";function Pj(n){return n.map(E1)}function Jj({itemSlot:n,min:l,max:s,instanceId:o,slotId:u,value:d,propertyId:h,selectedItemIndex:p,commit:m}){var ce;const{api:g}=Yn(),x=tf(n),b=dc(h),E=En(ee=>ee.byKey),j=ee=>`${h}:${o}:${u}:${ee}`,T=ee=>(ee.photo_id?b.get(ee.photo_id):void 0)??ee.url,C=_.useMemo(()=>Pj(d),[d]),[M,R]=_.useState(!1),[D,z]=_.useState(null),I=ei({items:C,min:l,max:s,axis:"xy",commit:m}),{rows:le}=I,ne=Qv(h,le.map(ee=>ee.value.crop_key),g.getCropDerivativeUrl),[W,L]=_.useState(null),ue=p??null;if(!I.drag.draggingKey&&ue!==W&&(L(ue),ue!=null)){const ee=I.keyAt(ue);ee&&z(ee)}const de=(ee,G,S)=>{const q=Y=>Y.photo_id!==S||!!(Y.pending_crop&&Y.pending_crop.crop_key!==G.crop_key);return{apply:(Y,N)=>I.updateValue(ee,P=>q(P)?P:{...P,rect:G.rect,ar:G.ar,crop_key:Y,mobile:G.mobile?{rect:G.mobile.rect,crop_key:N??null,derived:G.mobile.derived}:P.mobile,pending_crop:null}),revert:()=>I.updateValue(ee,Y=>q(Y)?Y:{...Y,pending_crop:null})}};Gv(le.flatMap(ee=>{const G=ee.value.pending_crop;return G?[{key:j(ee.key),pending:G,propertyId:h,instanceId:o,slotId:u,itemIndex:I.indexOf(ee.key),rowKey:ee.key,photoId:ee.value.photo_id}]:[]}),ee=>de(ee.rowKey,ee.pending,ee.photoId));const re=async ee=>{var Y,N,P;const G=D;if(z(null),!G)return;const S=le.find(Q=>Q.key===G);if(!S||!S.value.photo_id)return;if(_v(ee.rect)){(S.value.rect||S.value.crop_key||S.value.mobile||S.value.pending_crop)&&I.updateValue(G,Q=>({...Q,rect:null,ar:null,crop_key:null,mobile:null,pending_crop:null}));return}const q=I.indexOf(G);try{const Q=await g.cropImage(h,S.value.photo_id,ee.rect,((Y=ee.mobile)==null?void 0:Y.rect)??null),Z={job_id:Q.job_id,crop_key:Q.crop_key,rect:ee.rect,ar:ee.ar,mobile:ee.mobile&&Q.mobile?{job_id:Q.mobile.job_id,crop_key:Q.mobile.crop_key,rect:ee.mobile.rect,derived:ee.mobile.derived}:null};I.updateValue(G,ge=>({...ge,pending_crop:Z}));const pe=de(G,Z,S.value.photo_id);En.getState().start(j(G),{jobId:Q.job_id,propertyId:h,cropKey:Q.crop_key,mobileJobId:(N=Q.mobile)==null?void 0:N.job_id,mobileCropKey:(P=Q.mobile)==null?void 0:P.crop_key,instanceId:o,slotId:u,itemIndex:q,apply:pe.apply,revert:pe.revert})}catch(Q){En.getState().notice(j(G),"failed"),console.error("[editor] image crop failed",{instanceId:o,slotId:u,key:G,err:Q})}},ie=ee=>{I.replace(hc(le,ee,G=>G.photo_id,G=>({photo_id:G.id,url:G.src,alt:G.caption??""}),I.mint)),R(!1)},U=D?le.find(ee=>ee.key===D):null,H=U?T(U.value):"";function $(ee,G,S){const q=T(ee.value),Y=I.drag.draggingKey===ee.key;return q?f.jsxs("span",{"data-thumb":!0,className:me("block w-full",Y&&"opacity-[0.28]"),children:[f.jsxs(k1,{src:q,derivativeUrl:ee.value.crop_key?ne.get(ee.value.crop_key):void 0,ar:ee.value.ar,mode:x.mode,slotAspect:x.aspect,sizing:"tile",dimmed:j(ee.key)in E,children:[j(ee.key)in E&&f.jsx(Iv,{}),S]}),f.jsx(S1,{storeKey:j(ee.key)})]}):f.jsxs("div",{className:me(rs,"relative w-full"),style:{aspectRatio:String(x.aspect)},children:[G+1,S]})}function w(ee,G){const S=T(ee.value);return S?f.jsx("img",{className:Zj,src:S,alt:"",draggable:!1}):f.jsx("div",{className:rs,children:G+1})}function F(ee){return f.jsx("button",{type:"button",className:j1,title:"Crop",onClick:()=>z(ee.key),children:f.jsx(De.crop,{})})}return f.jsxs(ph,{engine:I,noun:"image",max:s,emptyText:"No images yet — use Add to choose photos.",onAdd:()=>R(!0),renderTile:$,renderClone:w,tileActions:F,children:[M&&f.jsx(cl,{mode:"multi",title:"Add photos",propertyId:h,selectedIds:le.map(ee=>ee.value.photo_id),onApply:ie,onClose:()=>R(!1)}),U&&H&&f.jsx(th,{chrome:cn,src:H,mode:x.mode,aspect:x.aspect,aspectLabel:x.aspectLabel,mobileAspect:x.mobileAspect,seed:{rect:U.value.rect??null},mobileSeed:{rect:((ce=U.value.mobile)==null?void 0:ce.rect)??null},onApply:ee=>{re(ee)},onClose:()=>z(null)})]})}function Wj({slot:n,value:l,onChange:s,propertyId:o}){const[u,d]=_.useState(!1),{items:h}=fh(o),p=l.tour_id?h.find(g=>g.id===l.tour_id):void 0,m=(p==null?void 0:p.src)||l.poster;return f.jsx(m1,{kind:"tour",label:n.label,poster:m,hasSelection:!!l.tour_id,addLabel:"Add tour",onPick:()=>d(!0),metaName:p==null?void 0:p.name,metaDetail:jf((p==null?void 0:p.provider)??l.provider),emptyText:"No tour yet",noPosterText:"No thumbnail from this provider",children:u&&f.jsx(cl,{mode:"single",title:"Choose a tour",propertyId:o,kinds:["tour"],initialFilter:"tour",noun:"tour",currentId:l.tour_id||void 0,onClose:()=>d(!1),onPick:g=>{d(!1),g.id!==l.tour_id&&s({...l,tour_id:g.id,url:"",poster:g.src,alt:l.alt||g.caption||"",...g.provider?{provider:g.provider}:{provider:void 0}})}})})}function eM(n,l){const s=n.matches("img")?n:n.querySelector("img");s&&l.poster&&s.setAttribute("src",l.poster)}function M1(n){if(n&&typeof n=="object"){const l=n;return{tour_id:typeof l.tour_id=="string"&&l.tour_id.length>0?l.tour_id:typeof l.asset_id=="string"?l.asset_id:"",url:typeof l.url=="string"?l.url:"",poster:typeof l.poster=="string"?l.poster:"",alt:typeof l.alt=="string"?l.alt:"",...typeof l.provider=="string"&&l.provider?{provider:l.provider}:{}}}return{tour_id:"",url:"",poster:"",alt:""}}const tM={PanelUI:Wj,applyOptimistic:eM,coerce:M1};function nM(n){return n.map(M1)}function aM({min:n,max:l,value:s,propertyId:o,commit:u}){const{items:d}=fh(o),h=M=>d.find(R=>R.id===M),p=M=>{var R;return(M.tour_id?(R=h(M.tour_id))==null?void 0:R.src:void 0)||M.poster},m=_.useMemo(()=>nM(s),[s]),[g,x]=_.useState(!1),b=ei({items:m,min:n,max:l,axis:"xy",commit:u}),{rows:E}=b,j=M=>{b.replace(hc(E,M,R=>R.tour_id,R=>({tour_id:R.id,url:"",poster:R.src,alt:R.caption??"",...R.provider?{provider:R.provider}:{}}),b.mint)),x(!1)};function T(M,R,D){const z=h(M.value.tour_id);return f.jsx(p1,{kind:"tour",poster:p(M.value),index:R,ghost:b.drag.draggingKey===M.key,badge:ac(z??{kind:"tour",provider:M.value.provider}),overlays:D,placeholderClassName:rs})}function C(M,R){return f.jsx(y1,{poster:p(M.value),index:R,placeholderClassName:rs})}return f.jsx(ph,{engine:b,noun:"tour",max:l,emptyText:"No tours yet — use Add to choose tours.",onAdd:()=>x(!0),renderTile:T,renderClone:C,children:g&&f.jsx(cl,{mode:"multi",title:"Add tours",propertyId:o,kinds:["tour"],initialFilter:"tour",noun:"tour",selectedIds:E.map(M=>M.value.tour_id),onApply:j,onClose:()=>x(!1)})})}function lM({slot:n,value:l,onChange:s,propertyId:o}){const[u,d]=_.useState(!1),h=dc(o),{items:p}=_o(o),m=l.video_id?p.find(E=>E.id===l.video_id):void 0,g=(l.video_id?h.get(l.video_id):void 0)??l.poster,x=(m==null?void 0:m.ready)===!1,b=e1(m==null?void 0:m.durationMs);return f.jsx(m1,{kind:"video",label:n.label,poster:g,hasSelection:!!l.video_id,addLabel:"Add video",onPick:()=>d(!0),status:x?"Processing…":null,metaName:m==null?void 0:m.name,metaDetail:b,emptyText:"No video yet",noPosterText:"Preparing poster…",children:u&&f.jsx(cl,{mode:"single",title:"Choose a video",propertyId:o,kinds:["video"],initialFilter:"video",videoSources:n.sources,currentId:l.video_id||void 0,onClose:()=>d(!1),onPick:E=>{d(!1),E.id!==l.video_id&&s({...l,video_id:E.id,url:"",poster:E.src,alt:l.alt||E.caption||"",...E.videoSource==="link"?{source:"link",...E.provider?{provider:E.provider}:{}}:{source:void 0,provider:void 0}})}})})}function Rb(n,l){return n.matches(l)?n:n.querySelector(l)}function iM(n,l){const s=Rb(n,"video");if(s){l.poster&&s.setAttribute("poster",l.poster),l.url&&s.setAttribute("src",l.url),l.alt&&s.setAttribute("aria-label",l.alt);return}const o=Rb(n,"img");o&&l.poster&&o.setAttribute("src",l.poster)}function C1(n){if(n&&typeof n=="object"){const l=n;return{video_id:typeof l.video_id=="string"&&l.video_id.length>0?l.video_id:typeof l.asset_id=="string"?l.asset_id:"",url:typeof l.url=="string"?l.url:"",poster:typeof l.poster=="string"?l.poster:"",alt:typeof l.alt=="string"?l.alt:"",width:typeof l.width=="number"?l.width:void 0,height:typeof l.height=="number"?l.height:void 0,...l.source==="link"?{source:"link"}:{},...typeof l.provider=="string"&&l.provider?{provider:l.provider}:{}}}return{video_id:"",url:"",poster:"",alt:""}}const sM={PanelUI:lM,applyOptimistic:iM,coerce:C1};function oM(n){return n.map(C1)}function rM({itemSlot:n,min:l,max:s,value:o,propertyId:u,commit:d}){const h=dc(u),{items:p}=_o(u),m=D=>p.find(z=>z.id===D),g=D=>(D.video_id?h.get(D.video_id):void 0)??D.poster,x=_.useMemo(()=>oM(o),[o]),[b,E]=_.useState(!1),j=ei({items:x,min:l,max:s,axis:"xy",commit:d}),{rows:T}=j,C=D=>{j.replace(hc(T,D,z=>z.video_id,z=>({video_id:z.id,url:"",poster:z.src,alt:z.caption??"",...z.videoSource==="link"?{source:"link",...z.provider?{provider:z.provider}:{}}:{}}),j.mint)),E(!1)};function M(D,z,I){const le=m(D.value.video_id);return f.jsx(p1,{kind:"video",poster:g(D.value),index:z,ghost:j.drag.draggingKey===D.key,badge:le?ac(le):"",overlays:I,placeholderClassName:rs})}function R(D,z){return f.jsx(y1,{poster:g(D.value),index:z,placeholderClassName:rs})}return f.jsx(ph,{engine:j,noun:"video",max:s,emptyText:"No videos yet — use Add to choose videos.",onAdd:()=>E(!0),renderTile:M,renderClone:R,children:b&&f.jsx(cl,{mode:"multi",title:"Add videos",propertyId:u,kinds:["video"],initialFilter:"video",videoSources:n.sources,selectedIds:T.map(D=>D.value.video_id),onApply:C,onClose:()=>E(!1)})})}function cM(n){const l=n.fields;if(!l)return[];const s=n.item_order;if(!s||s.length===0)return Object.entries(l);const o=new Set,u=[];for(const d of s)d in l&&!o.has(d)&&(o.add(d),u.push([d,l[d]]));for(const[d,h]of Object.entries(l))o.has(d)||u.push([d,h]);return u}function uM(n){switch(n.type){case"text":case"select":case"url":return"";case"number":case"image":case"video":case"tour":case"poi":case"document":return null;case"list":return[]}}function zb(n){const l={};for(const[s,o]of n)l[s]=uM(o);return l}function Db(n,l,s,o){var m;const u=s.title;if(!u)return`Item ${o+1}`;const d=n[u],h=typeof d=="string"?d.trim():"";if(!h)return"Untitled";const p=(m=l.find(([g])=>g===u))==null?void 0:m[1];if((p==null?void 0:p.type)!=="select")return h;for(const g of p.values??[])if(typeof g!="string"&&g.value===h)return g.label;return h}function dM(n){const{editor:l,granularity:s}=hh(n),o=l==="row-editor"?{kind:"record",entries:cM(n)}:{kind:"single",slot:n.element??{type:"text",label:n.label}};return{editor:l,granularity:s,itemContent:o,min:typeof n.min=="number"?n.min:0,max:typeof n.max=="number"?n.max:1/0,axis:l==="gallery"?"xy":"y"}}const fM="flex flex-col gap-2.75",hM="flex items-center justify-between gap-2.5",mM="relative flex flex-col gap-1.75",pM="rounded-[calc(8*var(--content))] border border-dashed border-line px-3 py-3.5 text-center text-[length:calc(12.5*var(--content))] text-ink-4",yM=me(ot,"flex h-8.5 w-full items-center justify-start gap-1.5 rounded-[calc(8*var(--content))] px-2.5 text-[length:calc(12.5*var(--content))] font-medium text-ink-3 transition-colors duration-[120ms] hover:bg-line-soft hover:text-ink disabled:cursor-default disabled:opacity-45 disabled:hover:bg-transparent"),gM="pointer-events-none absolute z-[30] flex items-center gap-2.5 rounded-[calc(8*var(--content))] border border-accent bg-white px-2.5 py-1.75 shadow-[0_14px_30px_-10px_rgba(20,18,13,0.35)]",bM="truncate text-[length:calc(13.5*var(--content))] text-ink";function vM({entry:n}){const l=n?fc(n):void 0;return f.jsx(wo,{glyph:(l==null?void 0:l.glyph)??"doc",extension:""})}function xM({slot:n,min:l,max:s,value:o,propertyId:u,commit:d}){var I;const h=_.useMemo(()=>I3(o),[o]),[p,m]=_.useState(!1),g=l1(u),x=ei({items:h,min:l,max:s,axis:"y",commit:d}),{rows:b}=x,E=le=>{x.replace(hc(b,le,ne=>ne.asset_id,ne=>({asset_id:ne.id}),x.mint)),m(!1)},{containerRef:j,cloneRef:T,getItemProps:C,draggingKey:M,cloneBox:R}=x.drag,D=M?b.find(le=>le.key===M):null,z=`Add ${xo(n.label,"Document")}`;return f.jsxs("div",{className:fM,children:[f.jsx("div",{className:hM,children:f.jsx("span",{className:va,children:n.label})}),f.jsxs("div",{className:me(mM,M&&"select-none [&_*]:select-none"),ref:j,children:[b.length===0&&f.jsx("div",{className:pM,children:"No documents yet — use Add to choose one."}),b.map(le=>f.jsx(o1,{entry:g(le.value.asset_id),onRemove:x.canRemove?()=>x.remove(le.key):void 0,dragProps:C(le.key),dragging:M===le.key},le.key)),D&&f.jsxs("div",{ref:T,className:gM,style:{width:R.w,height:R.h,left:0,top:0},children:[f.jsx(vM,{entry:g(D.value.asset_id)}),f.jsx("span",{className:bM,children:((I=g(D.value.asset_id))==null?void 0:I.name)??"Document unavailable"})]})]}),f.jsxs("button",{type:"button",className:yM,disabled:x.atMax,title:x.atMax?`Maximum ${s} documents`:void 0,onClick:()=>m(!0),children:[f.jsx(De.plus,{})," ",z]}),p&&f.jsx(cl,{mode:"multi",propertyId:u,noun:"document",kinds:["document","photo","video"],initialFilter:"document",selectedIds:b.map(le=>le.value.asset_id),onApply:E,onClose:()=>m(!1)})]})}function _M(n,l){const s=Wd(n),o=Wd(l);return s!=null||o!=null?s===o:n===l?!0:n==null||l==null?!1:String(n)===String(l)}function wM(n,l,s,o,u){const d=Dl(p=>p.markSlotOverridden),h=!u&&c1(n)===null;return function(m,g){h&&d(l,s,{kind:"scalar"}),o(m.map(x=>x.value))}}async function SM(n,l,s){const o=await n(`/properties/${l}/poi/search`,{method:"POST",json:{query:s}});return Array.isArray(o==null?void 0:o.results)?o.results:[]}async function A1(n,l,s){return n(`/properties/${l}/poi/${encodeURIComponent(s)}`)}async function kM(n,l,s){if(s.length===0)return{};const o=await n(`/properties/${l}/poi/photo-urls`,{method:"POST",json:{place_ids:s}});return(o==null?void 0:o.urls)??{}}function N1(n){if(n==null||!Number.isFinite(n))return null;const l=n/1609.344;return l<.1?"< 0.1 mi":`${l.toFixed(1)} mi`}let EM=0;function jM(){return`poi${++EM}${Math.random().toString(36).slice(2,6)}`}const lc=n=>typeof n=="number"&&Number.isFinite(n)?n:void 0,io=n=>typeof n=="string"&&n!==""?n:void 0;function MM(n){const l={},s=lc(n.rating);s!==void 0&&(l.rating=s);const o=lc(n.review_count);o!==void 0&&(l.review_count=o);const u=io(n.type_label);u!==void 0&&(l.type_label=u);const d=io(n.price_level);d!==void 0&&(l.price_level=d);const h=io(n.website_uri);h!==void 0&&(l.website_uri=h);const p=io(n.google_maps_uri);p!==void 0&&(l.google_maps_uri=p);const m=io(n.summary);m!==void 0&&(l.summary=m);const g=CM(n.photo);return g!==void 0&&(l.photo=g),l}function CM(n){if(!n||typeof n!="object")return;const l=n,s=lc(l.width),o=lc(l.height),u=l.attribution;if(!(s===void 0||o===void 0||typeof u!="string"))return{width:s,height:o,attribution:u}}function T1(n){if(!n||typeof n!="object")return null;const l=n;return typeof l.place_id!="string"||typeof l.name!="string"||typeof l.lat!="number"||typeof l.lng!="number"?null:{id:typeof l.id=="string"?l.id:jM(),place_id:l.place_id,name:l.name,address:typeof l.address=="string"?l.address:null,lat:l.lat,lng:l.lng,distance_m:typeof l.distance_m=="number"?l.distance_m:null,...MM(l)}}function AM(n){return n.map(T1).filter(l=>l!==null)}function NM(n){return[n.rating===void 0?null:`★ ${n.rating.toFixed(1)}${n.review_count===void 0?"":` (${n.review_count.toLocaleString()})`}`,n.type_label,N1(n.distance_m),n.address].filter(Boolean).join(" · ")}const yh="group/row relative flex min-h-10.5 items-center gap-2.5 rounded-[calc(8*var(--content))] border border-line bg-white px-2.5 py-1.75 [transition:border-color_.14s,box-shadow_.14s,background_.3s]",ic="grid w-5 flex-shrink-0 place-items-center text-ink-4",gh="flex min-w-0 flex-1 flex-col gap-px",sc="truncate text-[length:calc(13.5*var(--content))] text-ink",bh="truncate text-caption text-ink-3",O1="rounded-[calc(8*var(--content))] border border-dashed border-line px-3 py-3.5 text-center text-[length:calc(12.5*var(--content))] text-ink-4",R1="text-caption text-danger",z1="opacity-70",D1="size-[calc(14*var(--content))] flex-shrink-0 animate-[we-ml-spin_.7s_linear_infinite] rounded-full border-2 border-[#d9d5c9] border-t-accent",TM="size-[calc(26*var(--content))] flex-shrink-0 rounded-[calc(5*var(--content))] object-cover bg-[#f1f0ea]",OM="we-no-drag flex flex-shrink-0 items-center gap-0.75",RM="flex items-center gap-0.75 opacity-0 transition-opacity duration-[120ms] group-hover/row:opacity-100",zM="grid size-6 cursor-pointer place-items-center rounded-md border-0 bg-transparent p-0 text-ink-3 outline-none hover:bg-[#f1f0ea] hover:text-ink-2",U1=()=>f.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",className:"w-[calc(14*var(--content))] h-[calc(14*var(--content))]",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("path",{d:"M8 14s4.5-4 4.5-7.5a4.5 4.5 0 0 0-9 0C3.5 10 8 14 8 14Z"}),f.jsx("circle",{cx:"8",cy:"6.4",r:"1.7"})]});function L1(n,l){const{apiFetch:s}=Yn().api,[o,u]=_.useState({}),d=l.filter(p=>p.photo).map(p=>p.place_id).sort().join(","),h=_.useRef(new Set);return _.useEffect(()=>{const m=(d===""?[]:d.split(",")).filter(g=>!h.current.has(g));m.length!==0&&(m.forEach(g=>h.current.add(g)),kM(s,n,m).then(g=>{u(x=>({...x,...g}))}).catch(()=>{m.forEach(g=>h.current.delete(g))}))},[d,n,s]),{urls:o,dropUrl:p=>u(m=>{if(!(p in m))return m;const g={...m};return delete g[p],g})}}function B1({row:n,photoUrl:l,onPhotoError:s,onRemove:o,dragProps:u,dragging:d,flashNew:h}){const p=NM(n);return f.jsxs("div",{...u,className:me(yh,u&&"cursor-grab hover:border-[#d9d5c9]",d&&"cursor-grabbing border-transparent bg-accent-soft [&>*]:opacity-[0.25]",h&&"animate-[we-ml-rowin_.26s_cubic-bezier(.2,.7,.3,1)_both]"),children:[l?f.jsx("img",{className:TM,src:l,alt:"",draggable:!1,onError:s}):f.jsx("span",{className:ic,children:f.jsx(U1,{})}),f.jsxs("div",{className:gh,children:[f.jsx("span",{className:sc,children:n.name}),p&&f.jsx("span",{className:bh,children:p})]}),o&&f.jsx("div",{className:OM,children:f.jsx("span",{className:RM,children:f.jsx("button",{type:"button",className:me(zM,"hover:bg-[#fbecea] hover:text-danger"),title:"Remove",onClick:o,children:f.jsx(De.trash,{})})})})]})}const DM="relative flex flex-col",UM="flex min-w-0 items-center gap-2 rounded-[calc(8*var(--content))] border border-line bg-white px-2.5 transition-[border-color,box-shadow] duration-[120ms] focus-within:border-accent focus-within:shadow-[0_0_0_3px_rgba(15,42,34,0.07)]",LM="grid flex-shrink-0 place-items-center text-ink-4",BM="min-w-0 flex-1 appearance-none border-0 bg-transparent py-2.25 text-[length:calc(13.5*var(--content))] text-ink placeholder:text-ink-4",HM="size-[calc(15*var(--content))] flex-shrink-0 animate-[we-ml-spin_.7s_linear_infinite] rounded-full border-2 border-[#d9d5c9] border-t-accent",qM="absolute left-0 right-0 top-[calc(100%+4*var(--content))] z-[40] overflow-hidden rounded-[calc(8*var(--content))] border border-line bg-white shadow-[0_14px_30px_-12px_rgba(20,18,13,0.28)]",GM="m-0 max-h-[calc(264*var(--content))] list-none overflow-y-auto p-1",IM=me(ot,"flex w-full flex-col gap-px rounded-md px-2 py-1.75 text-left"),QM="bg-accent-soft",VM="cursor-default opacity-55",YM="flex items-center gap-1.5 truncate text-[length:calc(13.5*var(--content))] text-ink",KM="truncate text-caption text-ink-3",Vd="px-3 py-3 text-center text-[length:calc(12.5*var(--content))] text-ink-4",$M="inline-flex flex-shrink-0 items-center gap-1 text-good",XM=2,FM=300;function H1({propertyId:n,placeholder:l,addedIds:s,disabled:o=!1,disabledHint:u,onSelect:d}){const{apiFetch:h}=Yn().api,[p,m]=_.useState(""),[g,x]=_.useState([]),[b,E]=_.useState("idle"),[j,T]=_.useState(0),[C,M]=_.useState(0),R=_.useRef(0),D=_.useId();_.useEffect(()=>{const ne=p.trim();if(ne.length<XM){++R.current,E("idle"),x([]);return}const W=++R.current;E("loading");const L=setTimeout(()=>{SM(h,n,ne).then(ue=>{W===R.current&&(x(ue),T(0),E(ue.length?"results":"empty"))}).catch(()=>{W===R.current&&E("error")})},FM);return()=>clearTimeout(L)},[p,n,C,h]);function z(ne){s.has(ne.place_id)||(d(ne),m(""),x([]),E("idle"))}function I(ne){if(ne.key==="Escape"){E("idle"),x([]);return}if(b==="results"){if(ne.key==="ArrowDown")ne.preventDefault(),T(W=>Math.min(g.length-1,W+1));else if(ne.key==="ArrowUp")ne.preventDefault(),T(W=>Math.max(0,W-1));else if(ne.key==="Enter"){ne.preventDefault();const W=g[j];W&&z(W)}}}const le=b!=="idle";return f.jsxs("div",{className:DM,onBlur:ne=>{ne.currentTarget.contains(ne.relatedTarget)||E("idle")},children:[f.jsxs("div",{className:me(UM,o&&"opacity-55"),role:"combobox","aria-expanded":le,"aria-haspopup":"listbox","aria-controls":D,children:[f.jsx("span",{className:LM,children:f.jsx(De.search,{})}),f.jsx("input",{className:BM,value:p,placeholder:l,disabled:o,title:o?u:void 0,onChange:ne=>m(ne.target.value),onKeyDown:I,"aria-label":l,"aria-autocomplete":"list","aria-activedescendant":b==="results"?`${D}-${j}`:void 0}),b==="loading"&&f.jsx("span",{className:HM})]}),le&&f.jsxs("div",{className:qM,children:[b==="loading"&&f.jsx("div",{className:Vd,children:"Searching…"}),b==="empty"&&f.jsxs("div",{className:Vd,children:["No places found for “",p.trim(),"”."]}),b==="error"&&f.jsxs("div",{className:Vd,children:["Couldn't reach search."," ",f.jsx("button",{type:"button",className:"font-semibold text-accent-ink underline",onClick:()=>M(ne=>ne+1),children:"Retry"})]}),b==="results"&&f.jsx("ul",{className:GM,role:"listbox",id:D,children:g.map((ne,W)=>{const L=s.has(ne.place_id),ue=[N1(ne.distance_m),ne.address].filter(Boolean).join(" · ");return f.jsx("li",{id:`${D}-${W}`,role:"option","aria-selected":W===j,children:f.jsxs("button",{type:"button",disabled:L,className:me(IM,W===j&&!L&&QM,L&&VM),onMouseEnter:()=>T(W),onClick:()=>z(ne),children:[f.jsxs("span",{className:YM,children:[L&&f.jsxs("span",{className:$M,children:[f.jsx(De.check,{size:12})," Added ·"]}),f.jsx("span",{className:"truncate",children:ne.name})]}),ue&&f.jsx("span",{className:KM,children:ue})]})},ne.place_id)})})]})]})}const ZM="flex flex-col gap-2.75",PM="flex items-center justify-between gap-2.5 text-[length:calc(10.5*var(--content))] font-medium text-ink-4",JM="relative flex flex-col gap-1.75",WM="pointer-events-none absolute z-[30] flex items-center gap-2.5 rounded-[calc(8*var(--content))] border border-accent bg-white px-2.5 py-1.75 shadow-[0_14px_30px_-10px_rgba(20,18,13,0.35)]",eC=400;function tC({slot:n,min:l,max:s,value:o,propertyId:u,commit:d}){const{apiFetch:h}=Yn().api,p=_.useMemo(()=>AM(o),[o]),[m,g]=_.useState(null),[x,b]=_.useState(null),[E,j]=_.useState({}),T=_.useRef({});_.useEffect(()=>()=>{Object.values(T.current).forEach(clearTimeout)},[]);const C=ei({items:p,identityOf:ie=>ie.id,min:l,max:s,axis:"y",commit:d}),{rows:M}=C,{urls:R,dropUrl:D}=L1(u,p);function z(ie){j(U=>({...U,[ie]:!0})),clearTimeout(T.current[ie]),T.current[ie]=setTimeout(()=>j(U=>{const H={...U};return delete H[ie],H}),eC)}async function I(ie){if(g(null),!C.atMax&&!C.latestRows().some(U=>U.value.place_id===ie.place_id)){b(ie);try{let U;try{U=await A1(h,u,ie.place_id)}catch{g("Couldn't add that place — try again.");return}if(C.latestRows().some(H=>H.value.place_id===U.place_id))return;C.add(U),z(U.id)}finally{b(null)}}}const{containerRef:le,cloneRef:ne,getItemProps:W,draggingKey:L,cloneBox:ue}=C.drag,de=L?M.find(ie=>ie.key===L):null,re=new Set(M.map(ie=>ie.value.place_id));return f.jsxs("div",{className:ZM,children:[f.jsx("div",{className:PM,children:f.jsx("span",{children:n.label})}),f.jsx(H1,{propertyId:u,placeholder:n.placeholder??"Search nearby…",addedIds:re,disabled:C.atMax,disabledHint:`Maximum ${s} places`,onSelect:ie=>void I(ie)}),m&&f.jsx("span",{className:R1,children:m}),f.jsxs("div",{className:me(JM,L&&"select-none [&_*]:select-none"),ref:le,children:[M.length===0&&!x&&f.jsx("div",{className:O1,children:"No places yet — search above to add one."}),M.map(ie=>f.jsx(B1,{row:ie.value,photoUrl:R[ie.value.place_id],onPhotoError:()=>D(ie.value.place_id),onRemove:C.canRemove?()=>C.remove(ie.key):void 0,dragProps:W(ie.key),dragging:L===ie.key,flashNew:E[ie.value.id]===!0},ie.key)),x&&f.jsxs("div",{className:me(yh,z1),"aria-live":"polite",children:[f.jsx("span",{className:ic,children:f.jsx("span",{className:D1})}),f.jsxs("div",{className:gh,children:[f.jsx("span",{className:sc,children:x.name}),f.jsx("span",{className:bh,children:"Adding…"})]})]}),de&&f.jsxs("div",{ref:ne,className:WM,style:{width:ue.w,height:ue.h,left:0,top:0},children:[f.jsx("span",{className:ic,children:f.jsx(U1,{})}),f.jsx("span",{className:sc,children:de.value.name})]})]})]})}const nC='input, textarea, select, button, [tabindex]:not([tabindex="-1"]), [contenteditable="true"]',Tf="data-field-name";function aC(n,l){var o;const s=Array.from(n.querySelectorAll(`[${Tf}]`)).find(u=>u.getAttribute(Tf)===l);s&&(s.scrollIntoView({block:"nearest"}),(o=s.querySelector(nC))==null||o.focus({preventScroll:!0}))}function Of({slot:n,instanceId:l,slotId:s,value:o,propertyId:u,onChange:d,overridden:h,selectedItemIndex:p,selectedFieldName:m,itemBaseline:g,recordContext:x}){const b=K1(n.type);if(!b)return null;const E=b.coerce(o),{PanelUI:j}=b;return f.jsx(j,{slot:n,instanceId:l,slotId:s,value:E,onChange:d,propertyId:u,selectedItemIndex:p,selectedFieldName:m,overridden:h,itemBaseline:g,recordContext:x})}function lC(n){var l,s;switch(hh(n).editor){case"gallery":return((l=n.element)==null?void 0:l.type)==="video"?Ck:((s=n.element)==null?void 0:s.type)==="tour"?Ff:Uk;case"poi-curation":return a5;case"document-list":return jk;case"row-editor":return Kf;case"scalar-list":return Xk}}function iC(n){switch(n.type){case"text":return U5;case"url":return Vk;case"image":return Xf;case"video":return av;case"tour":return Ff;case"poi":return P0;case"document":return $f;case"select":return o5;case"list":return lC(n);default:return Kf}}function q1(n){const l=new Set(n.map(iC));return l.size===1?[...l][0]:Kf}function sC(){return`tmp_${globalThis.crypto.randomUUID()}`}function oC(n){return typeof n=="string"&&n.startsWith("tmp_")}const rC=me(ot,"flex w-full items-center justify-start gap-2 rounded-lg p-2.75 text-body font-semibold text-ink-3 transition-colors duration-[120ms] hover:bg-line-soft hover:text-ink"),cC=me(ot,"inline-flex items-center gap-1.75 self-start h-9 px-3 rounded-lg text-body font-medium text-danger transition-[background,color] duration-[120ms] hover:bg-danger/15 focus-visible:bg-danger/15 focus-visible:ring-2 focus-visible:ring-danger/25"),uC="relative flex flex-col gap-3",dC="data-[ghost]:opacity-40",fC="pointer-events-none absolute left-0 top-0 z-50 flex items-center gap-2.5 overflow-hidden rounded border border-line bg-canvas pl-2 pr-3.5 shadow-[0_16px_38px_-8px_rgba(20,18,13,0.5)]";function Yd(n,l){return l&&typeof n[l]=="string"?{key:l,value:n[l]}:null}function hC({slot:n,entries:l,min:s,max:o,instanceId:u,slotId:d,value:h,commit:p,selectedItemIndex:m,selectedFieldName:g,itemBaseline:x}){const{Accordion:b,AccordionHeader:E}=Yn(),j=l.filter(([,Z])=>$1(Z)),T=bv(n.layout,j.map(([Z])=>Z)),C=q1(l.map(([,Z])=>Z)),M=Dl(Z=>Z.session.property_id),R=Dl(Z=>Z.select),D=Dl(Z=>Z.markSlotOverridden),z=Dl(Z=>Z.relinkSlot),I=c1(n),le=I?r1[I].idKey:null;function ne(Z){R({kind:"slot",instance_id:u,slot_id:d,item_index:Z})}const W=_.useRef(null),L=ei({items:h,identityOf:Z=>{var pe;return((pe=Yd(Z,le))==null?void 0:pe.value)??null},min:s,max:o,axis:"y",commit:p,onCommitted:(Z,pe)=>{const ge=W.current;if(pe!=="reorder"||ge==null)return;const Ee=Z.findIndex(Re=>Re.key===ge);Ee>=0&&ne(Ee)}}),{rows:ue}=L,de=m??null,re=de!=null?L.keyAt(de):null;_.useEffect(()=>{W.current=re},[re]);const ie=_.useRef(null);_.useEffect(()=>{re==null||!g||!ie.current||aC(ie.current,g)},[re,g]);function U(){R({kind:"slot",instance_id:u,slot_id:d})}function H(Z){if(re===Z)return U();const pe=L.indexOf(Z);pe<0||ne(pe)}function $(){if(L.atMax)return;const Z=I?{...zb(l),[le]:sC()}:zb(l);L.add(Z),ne(ue.length)}function w(Z){if(!L.canRemove)return;const pe=ue.find(Re=>Re.key===Z),ge=pe==null?void 0:pe.value[le??""];I!==null&&pe!=null&&typeof ge=="string"&&!oC(ge)&&D(u,d,{kind:"item_removed",item_id:ge});const Ee=L.indexOf(Z);L.remove(Z),re===Z?U():de!=null&&Ee>=0&&Ee<de&&ne(de-1)}function F(Z,pe){const ge=ue.find(Re=>Re.key===Z);if(ge==null)return;const Ee=Yd(ge.value,le);if(Ee!=null){const Re=x==null?void 0:x.find(Ue=>Ue[Ee.key]===Ee.value);for(const Ue of Object.keys(pe))if(Ue!==Ee.key){const nt=Re==null?void 0:Re[Ue];Re!=null&&_M(pe[Ue],nt)?z(u,d,{kind:"item",item_id:Ee.value,field:Ue}):D(u,d,{kind:"item",item_id:Ee.value,field:Ue})}}L.setValue(Z,{...ge.value,...pe})}const{containerRef:ce,cloneRef:ee,getItemProps:G,draggingKey:S,cloneBox:q}=L.drag,Y=S?ue.find(Z=>Z.key===S):null,N=Y?ue.indexOf(Y):-1,P=Y?Db(Y.value,l,n,N):"";function Q(){return f.jsx("div",{ref:ee,className:fC,style:{width:q.w,height:q.h},children:f.jsx(E,{icon:f.jsx(C,{size:14}),title:P,showGrip:!0,showChevron:!1})})}return f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsxs("div",{ref:ce,className:me(uC,S&&"select-none [&_*]:select-none"),children:[ue.map((Z,pe)=>{const ge=Db(Z.value,l,n,pe);return f.jsx("div",{"data-ghost":S===Z.key?"":void 0,className:dC,children:f.jsx(b,{open:S==null&&re===Z.key,onToggle:()=>H(Z.key),icon:f.jsx(C,{size:14}),title:ge,scrollKey:Z.key,dragId:Z.key,dragHandleProps:{onPointerDown:G(Z.key).onPointerDown},children:f.jsxs("div",{className:"flex flex-col gap-4",ref:re===Z.key?ie:void 0,children:[f.jsx(vv,{rows:T,items:j.map(([Ee,Re])=>{var Ue;return f.jsx("div",{[Tf]:Ee,children:f.jsx(Of,{slot:Re,instanceId:u,slotId:d,value:Z.value[Ee],propertyId:M,onChange:nt=>F(Z.key,{[Ee]:nt}),recordContext:{itemId:(Ue=Yd(Z.value,le))==null?void 0:Ue.value,itemIndex:pe,siblingRecords:ue.map(nt=>nt.value),fieldKey:Ee}})},Ee)})}),re===Z.key&&L.canRemove&&f.jsxs("button",{type:"button",className:me(cC,"max-w-full"),onClick:()=>w(Z.key),children:[f.jsx("span",{className:"inline-flex shrink-0",children:f.jsx(De.trash,{size:13})}),f.jsxs("span",{className:"min-w-0 truncate",children:["Delete ",ge]})]})]})})},Z.key)}),Y?Q():null]}),!L.atMax&&f.jsxs("button",{type:"button",className:rC,onClick:$,children:[f.jsx(De.plus,{})," Add ",xo(n.label)]})]})}const Kd={listing_intent:n=>[{value:"for_sale",label:"For Sale"},{value:"for_rent",label:"For Rent"}]};function mC(n){return typeof n=="string"?{value:n,label:n}:{value:n.value,label:n.label}}function G1(n,l){var o,u;if(n.values)return n.values.map(mC);const s=(o=n.options)==null?void 0:o.source;return s!==void 0&&s!==""?((u=Kd[s])==null?void 0:u.call(Kd,l))??[]:[]}function pC(n){return n.trim().toLowerCase().replace(/\s+/g,"-")}const yC="fixed z-[120] max-h-[calc(240*var(--content))] overflow-y-auto rounded-[calc(8*var(--content))] border border-line bg-white shadow-[0_16px_38px_-12px_rgba(20,18,13,0.4)]",I1=me(ot,"flex w-full items-center justify-between gap-2 rounded-none px-2.5 py-2 text-left text-body text-ink hover:bg-accent-soft data-[active=true]:bg-accent-soft"),gC=me(I1,"text-accent"),bC=4,Ub=160,Lb=8,vC=me(ot,"min-w-0 flex-1 cursor-text bg-transparent py-2.25 text-left text-[length:calc(13.5*var(--content))] text-ink outline-none placeholder:text-ink-4");function Bb({open:n,className:l,onMouseDown:s}){return f.jsx("span",{className:me("flex flex-shrink-0 items-center text-ink-4 transition-transform duration-[120ms]",n&&"rotate-180",l),onMouseDown:s,"aria-hidden":"true",children:f.jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:f.jsx("path",{d:"m6 9 6 6 6-6"})})})}function xC(){return f.jsx("svg",{className:"flex-shrink-0 text-ink-2",width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:f.jsx("path",{d:"M3.5 8.5l3 3 6-6.5"})})}function _C(n,l){const s=l.toLowerCase().trim();return s?n.filter(o=>o.label.toLowerCase().includes(s)):n}function wC(n,l){const s=l.toLowerCase().trim();return n.some(o=>o.label.toLowerCase()===s)}function Rf({label:n,value:l,options:s,onChange:o,placeholder:u,bare:d=!1,autoOpen:h=!1,onDismiss:p,id:m,creatable:g=!1,canCreate:x}){const[b,E]=_.useState(h),[j,T]=_.useState(0),[C,M]=_.useState(null),[R,D]=_.useState(""),z=_.useId(),I=_.useRef(null),le=_.useRef(null),ne=_.useRef(null),W=s.findIndex(Q=>Q.value===l),L=W>=0?s[W]:void 0,ue=_C(s,b?R:""),de=pC(R),re=b&&de.length>0?s.find(Q=>Q.value===de):void 0,ie=re&&!ue.some(Q=>Q.value===re.value)?[...ue,re]:ue,U=g&&de.length>0&&!wC(s,R)&&!re&&((x==null?void 0:x(de))??!0),H=ie.length+(U?1:0);function $(){ne.current&&M(ne.current.getBoundingClientRect()),T(Math.max(0,W)),E(!0)}const w=_.useCallback(()=>{E(!1),D(""),p==null||p()},[p]);function F(Q){var Z;Q.value!==l&&o(Q.value),E(!1),D(""),(Z=le.current)==null||Z.focus()}function ce(Q){var Z;o(Q),E(!1),D(""),(Z=le.current)==null||Z.focus()}function ee(Q){var Z;if(!b){(Q.key==="ArrowDown"||Q.key==="Enter"||Q.key===" ")&&(Q.preventDefault(),$());return}if(Q.key==="Escape")Q.preventDefault(),(Z=le.current)==null||Z.focus(),w();else if(Q.key==="ArrowDown")Q.preventDefault(),T(pe=>Math.min(H-1,pe+1));else if(Q.key==="ArrowUp")Q.preventDefault(),T(pe=>Math.max(0,pe-1));else if(Q.key==="Enter")if(Q.preventDefault(),j<ie.length){const pe=ie[j];pe&&F(pe)}else U&&ce(de)}const G=_.useCallback(Q=>{var ge,Ee;const Z=(ge=I.current)==null?void 0:ge.contains(Q),pe=(Ee=document.getElementById(z))==null?void 0:Ee.contains(Q);return!Z&&!pe},[z]);function S(Q){b&&G(Q.relatedTarget)&&w()}_.useEffect(()=>{var Q;h&&((Q=le.current)==null||Q.focus())},[h]),_.useEffect(()=>{if(!b)return;const Q=()=>{ne.current&&M(ne.current.getBoundingClientRect())};return Q(),window.addEventListener("scroll",Q,!0),window.addEventListener("resize",Q),()=>{window.removeEventListener("scroll",Q,!0),window.removeEventListener("resize",Q)}},[b]),_.useEffect(()=>{if(!b)return;const Q=Z=>{G(Z.target)&&w()};return document.addEventListener("mousedown",Q),()=>document.removeEventListener("mousedown",Q)},[b,G,w]);const q=Q=>{Q.preventDefault(),b||$()},Y=f.jsx("input",{ref:le,id:m,className:d?vC:me(ss,"cursor-text"),value:b?R:(L==null?void 0:L.label)??l,placeholder:u??"",role:"combobox","aria-haspopup":"listbox","aria-expanded":b,"aria-controls":z,"aria-label":n,onFocus:$,onClick:()=>{b||$()},onChange:Q=>{D(Q.target.value),b||$(),T(0)},onKeyDown:ee}),N=d?f.jsxs(f.Fragment,{children:[Y,f.jsx(Bb,{open:b,className:"pl-2",onMouseDown:q})]}):f.jsxs(f.Fragment,{children:[Y,f.jsx(Bb,{open:b,className:"pl-1 pr-2.75",onMouseDown:q})]}),P=b&&C&&H>0?eh.createPortal(f.jsxs("div",{className:yC,id:z,role:"listbox",style:{left:Math.max(Lb,Math.min(C.left,window.innerWidth-Math.max(C.width,Ub)-Lb)),top:C.bottom+bC,minWidth:Math.max(C.width,Ub)},children:[ie.map((Q,Z)=>f.jsxs("button",{type:"button",role:"option","aria-selected":Q.value===l,"data-active":Z===j,className:I1,onMouseEnter:()=>T(Z),onMouseDown:pe=>pe.preventDefault(),onClick:()=>F(Q),children:[f.jsx("span",{className:"truncate",children:Q.label}),Q.value===l&&f.jsx(xC,{})]},Q.value)),U&&f.jsx("button",{type:"button",role:"option","aria-selected":j===ie.length,"data-active":j===ie.length,className:gC,onMouseEnter:()=>T(ie.length),onMouseDown:Q=>Q.preventDefault(),onClick:()=>ce(de),children:f.jsxs("span",{className:"truncate",children:["Create “",de,"”"]})})]}),document.body):null;return d?f.jsxs("div",{className:"flex min-w-0 flex-1 items-center",ref:Q=>{I.current=Q,ne.current=Q},onBlurCapture:S,children:[N,P]}):f.jsxs("div",{className:Qn,ref:I,onBlurCapture:S,children:[f.jsx("span",{className:va,children:n}),f.jsx("div",{className:me(vo,b&&"border-accent"),ref:ne,children:N}),P]})}const SC="relative flex flex-col gap-2",kC="group/li flex cursor-text touch-none items-center gap-2 rounded-[calc(8*var(--content))] border border-line bg-white px-2.75 transition-[border-color,box-shadow] duration-[120ms] hover:border-[#d9d5c9] focus-within:border-accent",EC=me(ot,"we-no-drag grid size-5.5 flex-shrink-0 place-items-center rounded-[calc(5*var(--content))] text-ink-3 transition-[background,color] duration-[120ms] hover:bg-[#FBE6E2] hover:text-[#8E2C1E]"),jC="pointer-events-none absolute z-[60] flex cursor-grabbing items-center gap-2 overflow-hidden rounded-[calc(8*var(--content))] bg-white px-2.75 text-[length:calc(13.5*var(--content))] text-ink shadow-[0_16px_38px_-8px_rgba(20,18,13,0.5)] after:absolute after:inset-0 after:rounded-[calc(9*var(--content))] after:border after:border-solid after:border-[#d9d5c9] after:content-['']",MC=me(ot,"flex h-8.5 w-full items-center justify-start gap-1.5 rounded-[calc(8*var(--content))] px-2.5 text-[length:calc(12.5*var(--content))] font-medium text-ink-3 transition-colors duration-[120ms] hover:bg-line-soft hover:text-ink");function CC(n){const l=n.currentTarget.control;if(!l||n.target===l||n.target.closest("button")||(n.preventDefault(),l.focus(),!(l instanceof HTMLInputElement)))return;const o=n.clientX<l.getBoundingClientRect().left?0:l.value.length;l.setSelectionRange(o,o)}function Q1({engine:n,label:l,addLabel:s=`Add ${xo(l)}`,renderControl:o,cloneText:u,onAdd:d,renderAdd:h,addDisabled:p=!1}){const{rows:m,drag:g}=n,{containerRef:x,cloneRef:b,getItemProps:E,draggingKey:j,cloneBox:T}=g,C=j?m.find(R=>R.key===j):null,M=h==null?void 0:h(n.add);return f.jsxs("div",{className:Qn,children:[f.jsx("span",{className:va,children:l}),f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsxs("div",{className:me(SC,j&&"select-none [&_*]:select-none"),ref:x,children:[m.map(R=>f.jsxs("label",{htmlFor:R.key,onClick:CC,...E(R.key),"data-ghost":j===R.key?"":void 0,className:me(kC,j===R.key&&"cursor-grabbing border-transparent bg-accent-soft"),children:[f.jsx("span",{"aria-hidden":"true",className:"flex flex-shrink-0 cursor-grab items-center text-ink-4 transition-colors duration-[120ms] hover:text-ink-2 group-data-[ghost]/li:opacity-[0.25]",children:f.jsx(De.grip,{})}),o({id:R.key,value:R.value,onChange:D=>n.setValue(R.key,D)}),n.canRemove&&f.jsx("button",{type:"button",className:EC,title:"Remove",onClick:()=>n.remove(R.key),children:f.jsx(De.trash,{})})]},R.key)),C&&f.jsxs("div",{ref:b,className:jC,style:{width:T.w,height:T.h,left:0,top:0,position:"absolute"},children:[f.jsx("span",{"aria-hidden":"true",className:"flex flex-shrink-0 items-center text-ink-4",children:f.jsx(De.grip,{})}),f.jsx("span",{className:"min-w-0 flex-1 truncate py-2.25",children:u(C.value)})]})]}),M??(!n.atMax&&!p&&f.jsxs("button",{type:"button",className:MC,onClick:()=>d(n.add),children:[f.jsx(De.plus,{})," ",s]}))]})]})}function AC({engine:n,label:l,placeholder:s="List item",addLabel:o,maxLength:u}){return f.jsx(Q1,{engine:n,label:l,addLabel:o,cloneText:d=>d,renderControl:({id:d,value:h,onChange:p})=>f.jsx(Zr,{bare:!0,id:d,value:h,onChange:p,placeholder:s,ariaLabel:s,maxLength:u,className:"cursor-[inherit] py-2.25 text-[length:calc(13.5*var(--content))] group-data-[ghost]/li:opacity-[0.25]"}),onAdd:d=>d("")})}function NC({engine:n,label:l,options:s,unique:o=!1,creatable:u=!1}){const[d,h]=_.useState(!1),p=n.rows.map(E=>E.value),m=E=>o?s.filter(j=>j.value===E||!p.includes(j.value)):s,g=m(null),x=E=>{var j;return((j=s.find(T=>T.value===E))==null?void 0:j.label)??E},b=E=>!o||!p.includes(E);return f.jsx(Q1,{engine:n,label:l,addDisabled:!u&&g.length===0,cloneText:E=>x(E),renderControl:({id:E,value:j,onChange:T})=>f.jsx(Rf,{bare:!0,id:E,label:l,value:j,options:m(j),onChange:T,creatable:u,canCreate:b}),onAdd:()=>h(!0),renderAdd:E=>d?f.jsx(Rf,{bare:!0,autoOpen:!0,label:`Add ${xo(l)}`,value:"",placeholder:"Choose one",options:g,onDismiss:()=>h(!1),onChange:j=>{h(!1),E(j)},creatable:u,canCreate:b}):null})}function TC({slot:n,itemSlot:l,min:s,max:o,value:u,commit:d}){const h=Dl(m=>m.session.listing_intent),p=ei({items:u,min:s,max:o,axis:"y",commit:d});return l.type==="select"?f.jsx(NC,{engine:p,label:n.label,options:G1(l,{listingIntent:h}),creatable:l.creatable===!0,unique:n.unique===!0}):f.jsx(AC,{engine:p,label:n.label,maxLength:l.cap})}function OC(n){const{slot:l,instanceId:s,slotId:o,value:u,onChange:d,recordContext:h}=n,p=dM(l),m=wM(l,s,o,d,h!=null);if(p.itemContent.kind==="record")return f.jsx(hC,{slot:l,entries:p.itemContent.entries,min:p.min,max:p.max,instanceId:s,slotId:o,value:u,commit:m,selectedItemIndex:n.selectedItemIndex,selectedFieldName:n.selectedFieldName,itemBaseline:n.itemBaseline});const g=p.itemContent.slot;return p.editor==="gallery"?g.type==="tour"?f.jsx(aM,{min:p.min,max:p.max,value:u,propertyId:n.propertyId,commit:m}):g.type==="video"?f.jsx(rM,{itemSlot:g,min:p.min,max:p.max,value:u,propertyId:n.propertyId,commit:m}):f.jsx(Jj,{itemSlot:g,min:p.min,max:p.max,instanceId:s,slotId:o,value:u,propertyId:n.propertyId,selectedItemIndex:n.selectedItemIndex,commit:m}):p.editor==="document-list"?f.jsx(xM,{slot:l,min:p.min,max:p.max,value:u,propertyId:n.propertyId,commit:m}):p.editor==="poi-curation"?f.jsx(tC,{slot:l,min:p.min,max:p.max,value:u,propertyId:n.propertyId,commit:m}):f.jsx(TC,{slot:l,itemSlot:g,min:p.min,max:p.max,value:u,commit:m})}const RC={PanelUI:OC,applyOptimistic:null,coerce:n=>Array.isArray(n)?n:[]};function zC(n,l){const s=String(n??"").replace(/[^\d.]/g,"");if(s==="")return"";const[o,u]=s.split("."),d=Number((o||"0").replace(/[^\d]/g,"")||0).toLocaleString("en-US");return u!=null?`${d}.${u}`:d}function DC(n,l){let s=n.replace(l!=null&&l.decimals?/[^\d.]/g:/[^\d]/g,"");if(l!=null&&l.decimals){const u=s.indexOf(".");u>=0&&(s=s.slice(0,u+1)+s.slice(u+1).replace(/\./g,""))}const o=s.replace(/[^\d]/g,"");return(l==null?void 0:l.maxDigits)!=null&&o.length>l.maxDigits?null:s}function UC({label:n,value:l,onChange:s,prefix:o,suffix:u,group:d,decimals:h,maxDigits:p,placeholder:m,errorText:g}){const x=d?zC(l):l;return f.jsxs("div",{className:Qn,children:[f.jsx("span",{className:va,children:n}),f.jsxs("div",{className:me(vo,g&&"border-danger"),children:[o&&f.jsx("span",{className:me(ef,"pl-2.75"),children:o}),f.jsx("input",{className:me(ss,"[font-variant-numeric:tabular-nums]",o&&"pl-1"),inputMode:h?"decimal":"numeric",value:x,placeholder:m??"0",onChange:b=>{const E=DC(b.target.value,{decimals:h,maxDigits:p});E!=null&&s(E)}}),u&&f.jsx("span",{className:me(ef,"pr-2.75"),children:u})]}),g&&f.jsx("p",{className:Pf,children:g})]})}function LC(n){return n==null?"":String(n)}function V1(n){const l=n.trim();if(l==="")return null;const s=Number(l);return Number.isFinite(s)?s:null}function BC({slot:n,value:l,onChange:s}){return f.jsx(UC,{label:n.label,value:LC(l),onChange:o=>s(V1(o)),prefix:n.prefix,suffix:n.suffix,group:n.thousandsSep,decimals:n.decimals,maxDigits:n.maxDigits,placeholder:n.placeholder})}const HC={PanelUI:BC,applyOptimistic:null,coerce:n=>typeof n=="number"?n:V1(typeof n=="string"?n:"")},qC="flex flex-col gap-2";function GC({slot:n,value:l,onChange:s,propertyId:o}){const{apiFetch:u}=Yn().api,[d,h]=_.useState(null),[p,m]=_.useState(null),g=_.useMemo(()=>l?[l]:[],[l]),{urls:x,dropUrl:b}=L1(o,g);async function E(j){if(h(null),(l==null?void 0:l.place_id)!==j.place_id){m(j);try{const T=await A1(u,o,j.place_id);s(T)}catch{h("Couldn't add that place — try again.")}finally{m(null)}}}return f.jsxs("div",{className:qC,children:[f.jsx(H1,{propertyId:o,placeholder:n.placeholder??"Search nearby…",addedIds:l?new Set([l.place_id]):new Set,onSelect:j=>void E(j)}),d&&f.jsx("span",{className:R1,children:d}),p?f.jsxs("div",{className:me(yh,z1),"aria-live":"polite",children:[f.jsx("span",{className:ic,children:f.jsx("span",{className:D1})}),f.jsxs("div",{className:gh,children:[f.jsx("span",{className:sc,children:p.name}),f.jsx("span",{className:bh,children:"Adding…"})]})]}):l?f.jsx(B1,{row:l,photoUrl:x[l.place_id],onPhotoError:()=>b(l.place_id),onRemove:()=>s(null)}):f.jsx("div",{className:O1,children:"No place yet — search above to choose one."})]})}const IC={PanelUI:GC,applyOptimistic:null,coerce:T1};function QC({slot:n,value:l,onChange:s}){const o=Dl(d=>d.session.listing_intent),u=G1(n,{listingIntent:o});return f.jsx(Rf,{label:n.label,value:l??"",options:u,creatable:n.creatable??!1,placeholder:"Choose one",onChange:s})}const VC={PanelUI:QC,applyOptimistic:null,coerce:n=>typeof n=="string"?n:null},YC="data-slot-id",Hb="data-slot-text-leaf",KC="data-slot-group",$C="data-slot-item",XC="data-slot-field",FC="data-slot-unselectable",mc="data-section-instance-id";function ZC(n,l){const s=[];n.hasAttribute(Hb)&&s.push(n),s.push(...Array.from(n.querySelectorAll(`[${Hb}]`))),s.length!==0&&s.forEach(o=>{PC(o,l)})}function PC(n,l){const s=n.ownerDocument,o=[];l.split(`
|
|
1099
|
-
`).forEach((u,d)=>{d>0&&o.push(s.createElement("br")),o.push(s.createTextNode(u))}),n.replaceChildren(...o)}function Y1(n){return typeof n=="string"?n:n==null?"":typeof n=="number"||typeof n=="boolean"?String(n):""}const JC={short:120,medium:240,long:2e3};function WC(n){return JC[n]}function eA({slot:n,value:l,onChange:s}){const o=l??"",u=n.size??"short",d=typeof n.cap=="number"?n.cap:WC(u);return u==="long"?f.jsx(Zr,{value:o,onChange:s,label:n.label,max:d,maxLength:d,placeholder:n.placeholder,multiline:!0,rows:5}):u==="medium"?f.jsx(Zr,{value:o,onChange:s,label:n.label,max:d,maxLength:d,placeholder:n.placeholder,multiline:!0,rows:2}):f.jsx(Zr,{value:o,onChange:s,label:n.label,max:d,maxLength:d,placeholder:n.placeholder??""})}const tA={PanelUI:eA,applyOptimistic:ZC,coerce:Y1};function nA({slot:n,value:l,onChange:s}){const o=l??"",[u,d]=_.useState(o),[h,p]=_.useState(o);o!==h&&(p(o),d(o));const m=Cf(u),g=Af(m),x=n.accepts,b=x===void 0||m===""||Ef(x,m),E=m!==""&&(!g||!b),j=T=>{const C=Cf(T);C!==""&&!Af(C)||C!==""&&x!==void 0&&!Ef(x,C)||(d(C),C!==o&&s(C))};return f.jsxs("div",{className:Qn,children:[f.jsx(iv,{label:n.label}),f.jsxs("div",{className:vo,children:[f.jsx("input",{className:ss,type:"text",inputMode:"url",value:u,placeholder:n.placeholder??"https://",spellCheck:!1,onChange:T=>d(T.target.value),onBlur:T=>j(T.target.value)}),f.jsx("span",{className:me(ef,"pr-2.75"),children:g?f.jsx("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:me(ot,"flex items-center text-ink-4 hover:text-accent transition-colors duration-[120ms]"),"aria-label":"Open URL in new tab",children:f.jsx(De.external,{})}):f.jsx("span",{className:"flex items-center text-ink-4 opacity-30",children:f.jsx(De.external,{})})})]}),E&&f.jsx("p",{className:Pf,children:g?Mf(x):"Not a valid URL"})]})}const aA={PanelUI:nA,applyOptimistic:null,coerce:Y1};let qb=null;function lA(){return qb??(qb={text:tA,number:HC,select:VC,image:Qj,list:RC,poi:IC,url:aA,video:sM,tour:tM,document:Sj}),qb}function K1(n){const s=lA()[n];return s===void 0?null:s}function $1(n){const l=K1(n.type);return l?l.isEditable?l.isEditable(n):n.locked!==!0:!1}function iA(n,l){const s=n.variant;return!s||l==null?!0:s.cases.includes(l)}function sA(n){const l=Object.keys(n.slots),s=n.slot_order;if(!s||s.length===0)return l;const o=new Set,u=[];for(const d of s)d in n.slots&&!o.has(d)&&(o.add(d),u.push(d));for(const d of l)o.has(d)||u.push(d);return u}function X1(n,l){const s=[],o=new Map,u=new Map;for(const m of n.groups??[])for(const g of A4(m.members))u.set(g,{id:m.id,label:m.label});for(const m of sA(n)){const g=n.slots[m];if(!$1(g)||!iA(g,l))continue;const x=u.get(m);if(x){let b=o.get(x.id);b||(b={kind:"group",key:x.id,label:x.label,Icon:null,items:[],rows:[]},o.set(x.id,b),s.push(b)),b.items.push({slotId:m,slot:g})}else hh(g).editor==="row-editor"?s.push({kind:"record",key:m,label:g.label,Icon:null,slotId:m,slot:g}):s.push({kind:"group",key:m,label:g.label,Icon:null,items:[{slotId:m,slot:g}],rows:[]})}const d=n.groups??[],h=d.some(m=>m.members.some(g=>typeof g!="string")),p=new Map(d.map(m=>[m.id,m.members]));for(const m of s)m.kind==="group"&&(m.rows=h?bv(p.get(m.key),m.items.map(g=>g.slotId)):T4(m.items.map(g=>g.slot)),m.Icon=q1(m.items.map(g=>g.slot)));return s}function oA(n){return n==null?!0:typeof n=="string"?n.trim()==="":Array.isArray(n)?n.length===0:typeof n=="object"?Object.keys(n).length===0:!1}function rA(n,l,s){const o=[];for(const u of X1(n,l)){const d=u.kind==="group"?u.items:[{slotId:u.slotId,slot:u.slot}];for(const{slotId:h,slot:p}of d)p.variant&&oA(s(h))&&o.push(h)}return o}const cA=ye("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"ig-frame"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"ig-lens"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"ig-flash"}]]),uA=ye("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"fb-f"}]]),dA=ye("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"li-arm"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"li-stem"}],["circle",{cx:"4",cy:"4",r:"2",key:"li-dot"}]]),fA=ye("XLogo",[["path",{d:"M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z",transform:"translate(2 2) scale(0.8333)",fill:"currentColor",stroke:"none",key:"x-mark"}]]),hA={home:Rk,building:YS,template:qk,palette:d5,filePen:_k,library:Ik,plug:v5,helpCircle:lk,lock:Zk,creditCard:uk,settings:A5,power:w5,user:Q5,plus:J0,globe:Nk,image:Xf,fileText:$f,users:Y5,eye:F0,eyeOff:X0,pulse:CS,search:ev,chart:FS,layout:Bk,chevDown:JS,chevRight:ek,chevSelector:nk,pencil:h5,dots:yk,grip:Z0,external:$0,copy:rk,trash:tv,archive:NS,sparkle:R5,arrowUp:qS,arrowDown:OS,arrowLeft:US,arrowRight:BS,undo:B5,redo:E5,logout:Jk,check:K0,x:lv,clock:sk,calendar:$S,mapPin:P0,userPlus:G5,mail:e5,phone:p5,share:T5,upload:nv,bookOpen:IS,newspaper:c5,presentation:W0,instagram:cA,facebook:uA,linkedin:dA,xLogo:fA};function Pl({name:n,size:l=18,stroke:s=2,fill:o,color:u,className:d,style:h}){const p=hA[n];return f.jsx(p,{size:l,strokeWidth:s,fill:o??"none",color:u,className:d,style:{flexShrink:0,width:`calc(${l} * var(--content))`,height:`calc(${l} * var(--content))`,color:u??"currentColor",...h},"aria-hidden":"true"})}function mA(){return f.jsxs("div",{className:"hp-rest-in flex min-h-0 flex-1 flex-col items-center justify-center px-8 pb-10 text-center",children:[f.jsx("span",{className:"text-ink-4","aria-hidden":"true",children:f.jsx(Pl,{name:"pencil",size:22,stroke:1.6})}),f.jsx("p",{className:"m-0 mt-3 text-body-lg font-medium text-ink-2",children:"Nothing selected"}),f.jsx("p",{className:"m-0 mt-1 max-w-[calc(220*var(--content))] text-body leading-[1.45] text-ink-4",children:"Click anything on the canvas to edit it"})]})}const Gb=1;function Ib(n){const l=new URLSearchParams;for(const[o,u]of Object.entries(n))u!=null&&u!==""&&l.set(o,u);const s=l.toString();return s===""?"":`?${s}`}const Rl={catalog:"api/catalog",render:"api/render",media:n=>`api/media${Ib({fixture:n})}`,capture:(n,l)=>`api/capture/${n}${Ib({fixture:l.fixture,format:l.format,page:l.page,canvas:l.canvas})}`,live:(n,l)=>`fixtures/${encodeURIComponent(n)}/live${l==="/"?"/":`${l}/`}`,hmr:"__hmr"},pA={source:"source:changed",stylesheet:"stylesheet:changed",fixtures:"fixtures:changed"};async function Qb(n,l){const s=(await l.text().catch(()=>"")).trim();return new Error(s===""?`${n}: HTTP ${l.status}`:s)}function yA(n,l=(s,o)=>fetch(s,o)){const s=u=>new URL(u,n).href,o=async u=>{const d=await l(s(u));if(!d.ok)throw await Qb(u,d);return await d.json()};return{base:n,async catalog(){const u=await o(Rl.catalog);if(u.wire!==Gb)throw new Error(`This playground speaks wire ${Gb}, and its host answered with wire ${String(u.wire)}.`);return u},async render(u){const d=await l(s(Rl.render),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(u)});if(!d.ok)throw await Qb(Rl.render,d);return await d.json()},media:u=>o(Rl.media(u)),captureHref:(u,d)=>s(Rl.capture(u,d)),liveHref:(u,d)=>s(Rl.live(u,d)),subscribe(u){let d;try{d=new EventSource(s(Rl.hmr))}catch{return()=>{}}const h=Object.entries(u).map(([p,m])=>{const g=pA[p],x=()=>m();return d.addEventListener(g,x),()=>d.removeEventListener(g,x)});return()=>{for(const p of h)p();d.close()}}}}let zf=null;function gA(n){zf=n}function bA(){if(zf===null)throw new Error("The playground's host is not installed yet.");return zf}let F1=null;function vA(n){F1=n}function xA(){return F1}function Vb(n,l){return`${n} ${l}${n===1?"":"s"}`}function _A(n){const l=[n.propertyType,n.listingIntent].filter(o=>o!==null).map(o=>o.replaceAll("_"," "));l.push(Vb(n.units,"unit"),Vb(n.photos,"photo"));const s=l.join(", ");return s.charAt(0).toUpperCase()+s.slice(1)}function wA(n){return`${n.label} (${_A(n.summary)})`}function SA(n,l){return`${n}${n.includes("?")?"&":"?"}v=${encodeURIComponent(l)}`}function kA(n){return{basePath:n.basePath,stylesheets:n.stylesheets.map(l=>SA(l,n.cssRev)),importMap:n.importMap,islandMap:n.islands,hostScriptSrc:n.hostScript,hostResolvesOwnImports:Object.keys(n.importMap).length===0}}function Yb(n){const l=n.sectionSchemaByInstance??{};return{markers:{sectionInstanceId:mc,slotId:YC,slotGroup:KC,slotItem:$C,slotField:XC,slotUnselectable:FC},assets:kA(n),...n.pageBox===void 0?{}:{pageBox:n.pageBox},isSlotEditable:(s,o,u)=>{var h,p,m;const d=(h=l[s])==null?void 0:h.slots[o];return d===void 0||d.locked===!0?!1:u===void 0||((m=(p=d.fields)==null?void 0:p[u])==null?void 0:m.locked)!==!0}}}const EA=/^\/properties\/[^/]+\/poi\/search$/,jA=/^\/properties\/[^/]+\/poi\/([^/]+)$/,Df=[{place_id:"pg-coffee",name:"Bluebird Coffee",address:"88 Market St",lat:40.798,lng:-73.972,distance_m:210,rating:4.6,review_count:312,type_label:"Coffee shop",price_level:"PRICE_LEVEL_INEXPENSIVE"},{place_id:"pg-park",name:"Riverside Park",address:"500 Riverside Dr",lat:40.8,lng:-73.97,distance_m:320,type_label:"Park"},{place_id:"pg-grocer",name:"Corner Grocery",address:"45 Vine Ave",lat:40.796,lng:-73.968,distance_m:480,rating:4.1,review_count:88,type_label:"Grocery store"},{place_id:"pg-school",name:"Lincoln Elementary School",address:"12 School St",lat:40.803,lng:-73.965,distance_m:640,type_label:"Elementary school"},{place_id:"pg-transit",name:"Metro Station — 5th & Main",address:null,lat:40.799,lng:-73.975,distance_m:750,type_label:"Transit station"},{place_id:"pg-gym",name:"Eastside Fitness",address:"300 Water St",lat:40.805,lng:-73.961,distance_m:1100,rating:3.9,review_count:174,type_label:"Gym",summary:"A neighborhood gym with a lap pool and early hours."}];function MA(n){const l=typeof n=="object"&&n!==null?n.query:void 0,s=typeof l=="string"?l.trim().toLowerCase():"";return s?{results:Df.filter(o=>{var u;return o.name.toLowerCase().includes(s)||(((u=o.address)==null?void 0:u.toLowerCase().includes(s))??!1)})}:{results:Df}}let CA=0;function AA(n,l={}){const s=(l.method??"GET").toUpperCase();if(s==="POST"&&EA.test(n))return Promise.resolve(MA(l.json));const o=s==="GET"?jA.exec(n):null;if(o){const u=decodeURIComponent(o[1]),d=Df.find(h=>h.place_id===u);if(d)return Promise.resolve({...d,id:`pg-row-${++CA}`})}return Promise.reject(new Error(`No API backend in the playground: ${l.method??"GET"} ${n}. This capability is served by the host application; supply a provider to use it here.`))}function NA(n,l,s){const o=Math.min(Math.max(Math.round(n.nx*l),0),Math.max(l-1,0)),u=Math.min(Math.max(Math.round(n.ny*s),0),Math.max(s-1,0)),d=Math.max(Math.min(Math.round(n.nw*l),l-o),1),h=Math.max(Math.min(Math.round(n.nh*s),s-u),1);return{sx:o,sy:u,sw:d,sh:h}}function TA(n,l){return new Promise((s,o)=>{const u=l.createElement("img");u.onload=()=>s(u),u.onerror=()=>o(new Error(`Could not load ${n} to crop it.`)),u.src=n})}async function OA(n,l,s=document){const o=await TA(n,s),{sx:u,sy:d,sw:h,sh:p}=NA(l,o.naturalWidth,o.naturalHeight),m=s.createElement("canvas");m.width=h,m.height=p;const g=m.getContext("2d");if(!g)throw new Error("No 2d canvas context; cannot crop.");g.drawImage(o,u,d,h,p,0,0,h,p);const x=await new Promise(b=>m.toBlob(b));if(!x)throw new Error("Canvas produced no blob; cannot crop.");return URL.createObjectURL(x)}const $l="2026-01-01T00:00:00.000Z",Kb=new Map;function ul(n){let l=Kb.get(n);return l===void 0&&(l=bA().media(n).then(s=>s.items).catch(()=>[]),Kb.set(n,l)),l}function RA(n,l){return l.filter(s=>s.kind==="photo").map(s=>({id:s.id,property_id:n,name:s.name,thumbnail_url:s.src,uploaded_at:$l,caption:s.caption??null}))}function zA(n,l){return l.filter(s=>s.kind==="video").map(s=>({id:s.id,property_id:n,name:s.name,poster_url:s.src,ready:s.ready??!0,duration_ms:s.durationMs??null,width:null,height:null,uploaded_at:$l,caption:s.caption??null,source:s.provider===void 0?"upload":"link",provider:s.provider??null}))}function DA(n){return n.filter(l=>l.kind==="tour").map(l=>({id:l.id,name:l.name,provider:l.provider??"",poster_url:l.src,caption:l.caption??null,ready:l.ready??!0}))}function UA(n,l){return l.filter(s=>s.kind==="document").map(s=>({id:s.id,property_id:n,name:s.name,mime:s.mime??"",size_bytes:s.sizeBytes??0,preview_url:s.src,uploaded_at:$l}))}function Z1(n,l){return{floorplans:l.filter(o=>o.kind==="plan").map(o=>({id:o.id,property_id:n,source:null,thumbnail_url:o.src,ready:!0,uploaded_at:$l,display_label:q3(o.name,1)}))}}function vh(n){return Promise.reject(new Error(`${n} is served by the host application and has no playground equivalent. A fixture's media is read-only.`))}async function LA(n){return{photos:RA(n,await ul(n))}}async function BA(n){return{videos:zA(n,await ul(n))}}async function HA(n){return{tours:DA(await ul(n))}}async function qA(n){return{documents:UA(n,await ul(n))}}async function GA(n){return Z1(n,await ul(n))}async function IA(n,l){const{floorplans:s}=Z1(n,await ul(n)),o=s.find(u=>u.id===l);if(!o)throw new Error(`The fixture's property has no floor plan ${l}.`);return{source_url:o.thumbnail_url,source_bbox:null,ai_bbox:null,source_width:null,source_height:null}}function QA(n){return vh("Upload status")}function VA(n,l,s){return vh("Re-cropping a floor plan")}function YA(n,l,s){return vh("Pasting a link")}const Uf=new Map;let $b=0;async function KA(n,l,s,o){const d=(await ul(n)).find(m=>m.id===l);if(!(d!=null&&d.src))throw new Error(`The fixture's property has no asset ${l} to crop.`);const h=`dev-crop-${++$b}`;Uf.set(h,{sourceUrl:d.src,rect:s});const p={status:"processing",job_id:h,crop_key:h};if(o){const m=`dev-crop-${++$b}`;Uf.set(m,{sourceUrl:d.src,rect:o}),p.mobile={job_id:m,crop_key:m}}return p}function $A(n,l){return Promise.resolve({id:l,kind:"image_crop",status:"succeeded",enqueued_at:$l,started_at:$l,completed_at:$l})}const Xb=new Map;function XA(n,l){const s=Uf.get(l);if(!s)return Promise.reject(new Error(`Unknown crop ${l}.`));let o=Xb.get(l);return o||(o=OA(s.sourceUrl,s.rect),Xb.set(l,o)),o}const Fb="2026-01-01T00:00:00.000Z";function FA(n){return n.endsWith("logo (dark)")?"logo_dark":n.endsWith("logo (light)")?"logo_light":"headshot"}function ZA(n,l){if(l)return l;const[s]=n.split(" — ");return s??n}function PA(n){const l=new Map;for(const s of n){if(s.kind!=="library")continue;const o=ZA(s.name,s.caption);let u=l.get(o);switch(u||(u={id:`dev-contact-${o.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}`,category:"contact",fields:{name:o},created_at:Fb,updated_at:Fb},l.set(o,u)),FA(s.name)){case"headshot":u.fields.avatar_upload_id=s.id,u.avatar_url=s.src;break;case"logo_dark":u.fields.logo_dark_upload_id=s.id,u.logo_dark_url=s.src;break;case"logo_light":u.fields.logo_light_upload_id=s.id,u.logo_light_url=s.src;break}}return[...l.values()]}async function JA(n="contact"){const l=xA();return{items:l===null?[]:PA(await ul(l))}}function xh(){return Promise.reject(new Error("Library uploads are served by the host application. The dev media pack is read-only."))}function WA(n,l){return xh()}function eN(n,l,s){return xh()}function tN(n,l){return xh()}function nN(n){return Promise.reject(new Error("There is no property in the playground: the canvas renders a template, not a listing."))}const aN=12;function lN(n,l,s,o){if(n.top>=o&&n.bottom<=l-o)return null;const d=Math.max(0,s+n.top-o);return Math.abs(d-s)<1?null:d}function P1({icon:n,title:l,subtitle:s,showGrip:o=!1,showChevron:u=!0,open:d}){return f.jsxs(f.Fragment,{children:[o?f.jsx("span",{"aria-hidden":"true",className:"-mr-1 flex flex-shrink-0 cursor-grab items-center text-ink-4 transition-colors duration-[120ms] hover:text-ink-2 active:cursor-grabbing",children:f.jsx(Pl,{name:"grip",size:14,stroke:1.8})}):null,f.jsx("span",{className:"grid size-6.5 flex-shrink-0 place-items-center rounded-md bg-accent-soft text-accent-ink","aria-hidden":"true",children:n}),s?f.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-px",children:[f.jsx("span",{className:"truncate text-[length:calc(13.5*var(--content))] font-medium text-ink-2",children:l}),f.jsx("span",{className:"truncate text-[length:calc(11.5*var(--content))] text-ink-3 [font-variant-numeric:tabular-nums]",children:s})]}):f.jsx("span",{className:"min-w-0 flex-1 truncate text-left text-[length:calc(13.5*var(--content))] font-medium text-ink-2",children:l}),u?f.jsx("span",{"data-acc-open":d,className:"grid flex-shrink-0 place-items-center text-ink-3 transition-transform duration-150 ease-[ease] data-[acc-open=true]:rotate-180","aria-hidden":"true",children:f.jsx(Pl,{name:"chevDown",size:14,stroke:1.8})}):null]})}function J1({open:n,onToggle:l,icon:s,title:o,subtitle:u,scrollKey:d,dragId:h,dragHandleProps:p,children:m}){const g=_.useRef(null);return _.useEffect(()=>{if(!n)return;const x=g.current,b=x==null?void 0:x.closest(".hp-sb-scroll");if(!x||!b)return;const E=window.matchMedia("(prefers-reduced-motion: reduce)").matches,j=()=>{const R=x.getBoundingClientRect(),D=b.getBoundingClientRect(),z=lN({top:R.top-D.top,bottom:R.bottom-D.top,height:R.height},b.clientHeight,b.scrollTop,aN);z!=null&&b.scrollTo({top:z,behavior:E?"auto":"smooth"})};if(E){const R=requestAnimationFrame(j);return()=>cancelAnimationFrame(R)}const T=new AbortController,C=()=>{T.abort(),window.clearTimeout(M),j()};x.addEventListener("transitionend",R=>{R.propertyName==="grid-template-rows"&&R.target instanceof Node&&R.target.parentNode===x&&C()},{signal:T.signal});const M=window.setTimeout(C,280);return()=>{T.abort(),window.clearTimeout(M)}},[n,d]),f.jsxs("div",{ref:g,"data-open":n,"data-dragid":h,className:me("we-acc flex-shrink-0 overflow-hidden rounded border border-line bg-canvas","origin-center [transform:scale(var(--gx,1),var(--gy,1))] [will-change:transform]","[transition:transform_.18s_cubic-bezier(.34,1.56,.64,1),box-shadow_.18s_ease,border-color_.16s_ease]","has-[>.we-acc-head:hover]:shadow-[0_4px_14px_-6px_rgba(20,24,15,0.18)]","has-[>.we-acc-head:active]:[transition-duration:.08s]","motion-reduce:[transform:none] motion-reduce:[transition:box-shadow_.18s_ease,border-color_.16s_ease]"),children:[f.jsx("button",{type:"button",className:me("we-acc-head flex w-full cursor-pointer appearance-none items-center gap-2.5 border-0 bg-transparent pr-3.5 py-3 text-left outline-none",p?"pl-2":"pl-3.5",p&&"touch-none"),onClick:l,onPointerDown:p==null?void 0:p.onPointerDown,"aria-expanded":n,children:f.jsx(P1,{icon:s,title:o,subtitle:u,showGrip:p!=null,open:n})}),f.jsx("div",{"data-acc-open":n,className:"grid grid-rows-[0fr] transition-[grid-template-rows] duration-200 ease-out data-[acc-open=true]:grid-rows-[1fr] motion-reduce:transition-none","aria-hidden":!n,children:f.jsx("div",{className:"min-h-0 overflow-hidden",children:f.jsx("div",{"data-acc-open":n,className:"bg-white px-3.5 pb-4 pt-2 opacity-0 transition-opacity duration-200 ease-out data-[acc-open=true]:opacity-100 motion-reduce:transition-none",children:m})})})]})}function iN(n,l,s){return Promise.reject(new Error("Uploading is served by the host application; the playground has no upload backend."))}function sN(n,l){return Promise.reject(new Error("Uploading is served by the host application; the playground has no upload backend."))}const oN={getPhotos:LA,getVideos:BA,getTours:HA,getDocuments:qA,getFloorplans:GA,getUploads:QA,recropFloorplan:VA,listLibraryItems:JA,postUploadWithProgress:iN,deleteUpload:sN};function rN({open:n,onClose:l}){return n?f.jsxs("div",{className:"rounded-md border border-dashed border-ink-4 bg-accent-soft px-3 py-2.5","data-testid":"unit-plan-picker-stub",role:"dialog","aria-label":"Floor-plan assignment",children:[f.jsx("p",{className:"text-caption font-medium text-ink-2",children:"Floor-plan assignment lives in the app"}),f.jsx("p",{className:"mt-1 text-caption text-ink-3",children:"Assigning a floor plan to a unit is a property-editing act, done against a real property. The playground has no property, so this picker is inert here."}),f.jsx("button",{type:"button",className:"mt-2 rounded-md border border-ink-4 px-2 py-1 text-caption text-ink-2",onClick:l,children:"Close"})]}):null}function oc(n){return n===null||typeof n!="object"?JSON.stringify(n)??"undefined":Array.isArray(n)?`[${n.map(oc).join(",")}]`:`{${Object.keys(n).sort().map(l=>`${JSON.stringify(l)}:${oc(n[l])}`).join(",")}}`}function cN(n,l,s,o){if(l===null||l.fixtureId!==s)return[];const u=[];for(const[d,h]of Object.entries(n.slots)){const p=oc(h);if(p===oc(l.slots[d]))continue;const m=o.slots[d];m!==void 0&&u.push({id:`${d}:scalar::@${p}`,kind:"scalar",label:m.label,slotId:d})}return u}const uN={fact:"border-accent/40 text-accent",computed:"border-accent/40 text-accent",authored:"border-line text-ink-2",empty:"border-dashed border-line text-ink-4",edited:"border-honey-2 bg-honey/20 text-honey-ink"};function W1(n){return f.jsx("span",{className:"inline-flex flex-shrink-0 items-center gap-1","data-testid":"provenance-chips",children:n.chips.map(l=>f.jsx("span",{"data-testid":"provenance-chip","data-provenance":l.kind,"data-slots":l.slots.map(s=>s.id).join(" "),title:`${l.kind}: ${l.slots.map(s=>s.ref===null?s.id:`${s.id} ← ${s.ref}`).join(", ")}`,className:`pointer-events-auto inline-flex h-[18px] cursor-help items-center rounded-full border bg-canvas px-1.5 font-mono text-[10px] font-normal normal-case leading-none tracking-[0.02em] ${uN[l.kind]}`,children:l.kind},l.kind))})}function dN(n){return f.jsxs("div",{className:"relative",children:[n.children,f.jsx("div",{className:"pointer-events-none absolute right-10 top-[15px]",children:f.jsx(W1,{chips:n.chips})})]})}function fN(n,l){const s=!l,o=n.required&&!s;return{hidden:s,locked:o,title:o?"Required section — cannot hide":s?"Hidden from live page":"Visible on live page"}}function ex(n){const{variant:l}=n;return l===null||l.locked||l.cases.length<2?null:l.cases}function hN(n,l){return l||(n==null?void 0:n.kind)==="session"?{kind:"edited",ref:null}:n===void 0?{kind:"empty",ref:null}:n.kind==="fact"||n.kind==="computed"?{kind:n.kind,ref:n.ref}:{kind:n.kind,ref:null}}function mN(n,l,s){const o=new Map;for(const u of n){const{kind:d,ref:h}=hN(l==null?void 0:l[u],s(u));o.set(d,[...o.get(d)??[],{id:u,ref:h}])}return[...o].map(([u,d])=>({kind:u,slots:d}))}const Zb="grid h-8 w-8 cursor-pointer place-items-center rounded-md border-0 p-0 transition-colors";function pN(n){const l=fN(n.display,n.enabled);return f.jsxs("header",{className:"flex min-h-[calc(56*var(--content))] flex-shrink-0 items-center justify-between gap-3 px-5 pb-2 pt-4","data-testid":"section-header",children:[f.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:f.jsx("h2",{className:"m-0 truncate text-body-lg font-semibold tracking-[-0.005em] text-ink",children:n.label})}),f.jsxs("div",{className:"inline-flex flex-shrink-0 items-center gap-0.5",children:[f.jsx("button",{type:"button","data-testid":"section-eye","aria-pressed":l.hidden,"aria-label":l.title,onClick:()=>!l.locked&&n.onSetEnabled(l.hidden),disabled:l.locked,title:l.title,className:`${Zb} disabled:cursor-not-allowed disabled:text-ink-4 disabled:opacity-100 ${l.hidden?"bg-[rgba(20,18,13,0.06)] text-ink [box-shadow:inset_0_0_0_1px_var(--color-line)]":"bg-transparent text-ink-2 hover:bg-[rgba(20,18,13,0.06)] hover:text-ink disabled:hover:bg-transparent disabled:hover:text-ink-4"}`,children:f.jsx(Pl,{name:l.hidden?"eyeOff":"eye",size:15,stroke:1.8})}),ex(n.display)?f.jsx("button",{type:"button","data-testid":"section-gear",onClick:n.onOpenSettings,title:"Section settings","aria-label":"Section settings",className:`${Zb} bg-transparent text-ink-2 hover:bg-[rgba(20,18,13,0.06)] hover:text-ink`,children:f.jsx(Pl,{name:"settings",size:15,stroke:1.8})}):null]})]})}const yN=me("group/case flex cursor-pointer items-center gap-2.5 rounded border border-line bg-canvas px-3 py-2.5","transition-[border-color,background-color] hover:border-[var(--color-ink-4)]","has-[:focus-visible]:border-accent","data-[selected=true]:border-accent data-[selected=true]:bg-accent-soft");function gN(n){const l=ex(n.display),s=rA(n.sectionSchema,n.variant,n.slotValue).length;return f.jsxs(f.Fragment,{children:[f.jsx("header",{className:"flex min-h-[calc(56*var(--content))] flex-shrink-0 items-center justify-between gap-3 px-5 pb-2 pt-4",children:f.jsxs("nav",{className:"inline-flex min-w-0 items-center gap-1.5 text-body-lg tracking-[-0.005em]","aria-label":"Breadcrumbs",children:[f.jsx("button",{type:"button","data-testid":"settings-back",onClick:n.onBack,className:"max-w-[calc(220*var(--content))] cursor-pointer truncate border-0 bg-transparent p-0 font-medium text-ink-3 hover:bg-transparent transition-colors hover:text-ink hover:underline hover:underline-offset-[3px]",children:n.label}),f.jsx("span",{className:"inline-grid place-items-center leading-none text-ink-4","aria-hidden":"true",children:f.jsx(Pl,{name:"chevRight",size:12,stroke:1.8})}),f.jsx("span",{className:"max-w-[calc(220*var(--content))] truncate font-semibold text-ink",children:"Settings"})]})}),f.jsx("div",{className:"hp-sb-scroll min-h-0 flex-1 overflow-y-auto px-4 pb-6 pt-2","data-testid":"section-settings",children:l?f.jsxs("section",{"aria-label":"Variation",className:"flex flex-col gap-2.5",children:[f.jsx("h3",{className:"px-1 text-[length:calc(11.5*var(--content))] font-medium uppercase tracking-[0.04em] text-ink-3",children:"Variation"}),f.jsx("div",{className:"flex flex-col gap-2",children:l.map(o=>f.jsxs("label",{"data-selected":o.value===n.variant,className:yN,children:[f.jsx("input",{type:"radio",className:"sr-only",name:`variation-${n.instanceId}`,value:o.value,checked:o.value===n.variant,onChange:()=>n.onSetVariant(o.value)}),f.jsx("span",{"aria-hidden":"true",className:"grid size-4 flex-shrink-0 place-items-center rounded-full border-[1.5px] border-ink-4 transition-colors group-data-[selected=true]/case:border-accent",children:f.jsx("span",{className:"size-2 rounded-full bg-accent opacity-0 transition-opacity group-data-[selected=true]/case:opacity-100"})}),f.jsx("span",{className:"min-w-0 flex-1 truncate text-[length:calc(13.5*var(--content))] font-medium text-ink",children:o.label})]},o.value))}),s>0?f.jsx("p",{"aria-live":"polite",className:"rounded border border-line bg-accent-soft px-3 py-2 text-[length:calc(12.5*var(--content))] leading-[1.45] text-ink-2",children:s===1?"1 empty field in this variation":`${s} empty fields in this variation`}):null]}):f.jsx("p",{className:"px-1 py-3 text-[length:calc(12.5*var(--content))] text-ink-3",children:"Nothing to configure in this section."})})]})}function bN(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Pb(n){return f.jsx("svg",{viewBox:"0 0 14 14",width:"13",height:"13",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n,children:f.jsx("path",{d:"M2.5 7h9M8 3.5 11.5 7 8 10.5"})})}function vN(n){return f.jsx("svg",{viewBox:"0 0 16 16",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n,children:f.jsx("path",{d:"M3.5 8.5l3 3 6-6.5"})})}function Jb(n){return f.jsx("svg",{viewBox:"0 0 14 14",width:"13",height:"13",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round","aria-hidden":"true",...n,children:f.jsx("path",{d:"M3.5 3.5l7 7M10.5 3.5l-7 7"})})}function xN({items:n,onApply:l}){const s=n??[],o=s.length,u=s.map(de=>de.id).join("|"),[d,h]=_.useState(!1),[p,m]=_.useState("idle"),[g,x]=_.useState(!1),[b,E]=_.useState(0),j=_.useRef(null),T=_.useRef(null),C=_.useRef(null),M=_.useRef(null),R=_.useRef(s),D=_.useRef(!0);_.useLayoutEffect(()=>{R.current=s});const z=_.useRef(bN()).current,I=_.useCallback(de=>{const re=j.current;if(z||document.hidden||re==null||typeof re.animate!="function"){x(!1),h(!1),m("idle"),de==null||de();return}x(!0);const ie=re.animate([{opacity:1,transform:"none"},{opacity:0,transform:"translateY(6px)"}],{duration:240,easing:"cubic-bezier(.4,0,.2,1)",fill:"forwards"});ie.onfinish=()=>{x(!1),h(!1),m("idle"),de==null||de()}},[z]);_.useEffect(()=>(T.current!=null&&clearTimeout(T.current),o>0&&p==="idle"?u!==M.current&&!d&&(T.current=setTimeout(()=>{h(!0)},550)):o===0&&d&&!g&&p==="idle"&&I(),()=>{T.current!=null&&clearTimeout(T.current)}),[o,u,d,p,g,I]),_.useLayoutEffect(()=>{if(!d||p!=="idle"||z||g)return;const de=j.current;de!=null&&typeof de.animate=="function"&&!document.hidden&&de.animate([{opacity:.45,transform:"translateY(10px)"},{opacity:1,transform:"none"}],{duration:420,easing:"cubic-bezier(.18,.82,.25,1)"})},[d,p,z,g]),_.useEffect(()=>{if(p!=="applying")return;const de=re=>{re.preventDefault(),re.returnValue=""};return window.addEventListener("beforeunload",de),()=>window.removeEventListener("beforeunload",de)},[p]),_.useEffect(()=>(D.current=!0,()=>{D.current=!1,T.current!=null&&clearTimeout(T.current),C.current!=null&&clearTimeout(C.current)}),[]);const le=()=>{const de=R.current;E(de.length),m("applying"),(async()=>{try{if(await l(de),!D.current)return;h(!1),m("success"),C.current!=null&&clearTimeout(C.current),C.current=setTimeout(()=>{I(()=>{M.current=null})},1200)}catch{if(!D.current)return;m("error")}})()},ne=()=>{M.current=u,I()};if(!d&&p!=="success"&&!g)return null;const W=p==="applying",L=W?b:o,ue=L===1?f.jsxs(f.Fragment,{children:[f.jsx("b",{className:"font-bold text-ink",children:"1"})," change to your property details"]}):f.jsxs(f.Fragment,{children:[f.jsx("b",{className:"font-bold text-ink",children:L})," changes to your property details"]});return f.jsx("div",{className:"pointer-events-none absolute bottom-[10px] left-0 right-0 z-[6]","aria-live":"polite",children:f.jsx("div",{className:"pointer-events-none",ref:j,children:f.jsx("div",{className:"pointer-events-auto relative mx-3 rounded-[calc(11*var(--content))] border border-line bg-canvas px-[calc(13*var(--content))] pb-[calc(12*var(--content))] pt-[calc(11*var(--content))] shadow-[0_8px_22px_-8px_rgba(20,18,13,.26),0_2px_6px_rgba(20,18,13,.08)] data-[done]:border-[#cfe6d4] data-[done]:bg-[#eef6ef]","data-done":p==="success"?"":void 0,children:p==="success"?f.jsxs("div",{className:"flex items-center gap-2 text-body font-semibold text-good",children:[f.jsx("span",{className:"grid flex-shrink-0 place-items-center [animation:we-ub-pop_.34s_cubic-bezier(.2,1.3,.4,1)_both]",children:f.jsx(vN,{})}),"Updated everywhere"]}):p==="error"?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex items-start gap-[calc(9*var(--content))]",children:[f.jsxs("div",{className:"min-w-0 flex-1 text-body leading-[1.4]",children:[f.jsx("div",{className:"font-semibold text-danger",children:"Couldn't update"}),f.jsx("div",{className:"mt-0.5 text-[length:calc(11.5*var(--content))] text-ink-3",children:"Something went wrong. Please try again."})]}),f.jsx("button",{type:"button",className:"-mr-0.5 -mt-0.5 grid h-[calc(20*var(--content))] w-[calc(20*var(--content))] flex-shrink-0 cursor-pointer place-items-center rounded-[calc(5*var(--content))] text-ink-4 transition-[background-color,color] duration-[120ms] hover:bg-[rgba(20,18,13,.06)] hover:text-ink-2",onClick:ne,"aria-label":"Dismiss",children:f.jsx(Jb,{})})]}),f.jsxs("button",{type:"button","data-action":"retry",className:"mt-[calc(10*var(--content))] box-border inline-flex h-[calc(34*var(--content))] w-full cursor-pointer items-center justify-center gap-[calc(6*var(--content))] rounded-[calc(8*var(--content))] bg-accent text-[length:calc(12.5*var(--content))] font-semibold text-white transition-[background-color,transform] duration-[120ms] hover:bg-[#143a2f] active:translate-y-[0.5px]",onClick:le,children:["Retry ",f.jsx(Pb,{})]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex items-start gap-[calc(9*var(--content))]",children:[f.jsxs("div",{className:"min-w-0 flex-1 text-body leading-[1.4] text-ink-2",children:[ue,f.jsx("div",{className:"mt-0.5 text-[length:calc(11.5*var(--content))] text-ink-3",children:"Update them everywhere these details are used."})]}),f.jsx("button",{type:"button",className:"-mr-0.5 -mt-0.5 grid h-[calc(20*var(--content))] w-[calc(20*var(--content))] flex-shrink-0 cursor-pointer place-items-center rounded-[calc(5*var(--content))] text-ink-4 transition-[background-color,color] duration-[120ms] hover:bg-[rgba(20,18,13,.06)] hover:text-ink-2 disabled:cursor-default disabled:opacity-50",onClick:ne,disabled:W,"aria-label":"Dismiss",children:f.jsx(Jb,{})})]}),f.jsx("button",{type:"button","data-action":"apply",disabled:W,className:"mt-[calc(10*var(--content))] box-border inline-flex h-[calc(34*var(--content))] w-full cursor-pointer items-center justify-center gap-[calc(6*var(--content))] rounded-[calc(8*var(--content))] bg-accent text-[length:calc(12.5*var(--content))] font-semibold text-white transition-[background-color,transform] duration-[120ms] hover:bg-[#143a2f] active:translate-y-[0.5px] disabled:cursor-default disabled:hover:bg-accent disabled:active:translate-y-0",onClick:le,children:W?f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"inline-block size-[calc(14*var(--content))] animate-spin rounded-full border-2 border-white/40 border-t-white",role:"status","aria-label":"Updating"}),"Updating…"]}):f.jsxs(f.Fragment,{children:["Update everywhere ",f.jsx(Pb,{})]})})]})})})})}const _N="Real editor chrome. The playground has no linked sources, so this cannot update anything — the flow above is a preview.",wN="Nothing was updated. In the app this writes the change to every deliverable sharing the linked source.";function SN({items:n}){const[l,s]=_.useState([]),o=n.filter(h=>!l.includes(h.id)),u=l.length>0&&o.length===0,d=_.useCallback(h=>{s(p=>[...p,...h.map(m=>m.id)])},[]);return f.jsxs("div",{className:"instance-panel__we",children:[f.jsx("div",{className:"instance-panel__we-anchor",children:f.jsx(xN,{items:o,onApply:d})}),o.length>0||u?f.jsx("p",{className:"instance-panel__we-caption","data-testid":"we-caption","data-phase":u?"applied":"preview",children:u?wN:_N}):null]})}const kN={apiFetch:AA,cropImage:KA,getCropDerivativeUrl:XA,getFloorplanSourcePage:IA,postLink:YA,stageLibraryItemImage:eN,presignLibraryItemUpload:WA,deleteStagedLibraryItemImage:tN,fetchProperty:nN};function EN(n,l,s){return _.useMemo(()=>{const o={session:{property_id:n,listing_intent:null},select:u=>{if(u===null){s(null);return}if(u.kind==="section"){s({kind:"section",instanceId:u.instance_id});return}s({kind:"slot",instanceId:u.instance_id,slotId:u.slot_id,...u.item_index!==void 0?{itemIndex:u.item_index}:{}})},markSlotOverridden:()=>{},relinkSlot:()=>{}};return{useEditorStore:u=>u(o),Accordion:J1,AccordionHeader:P1,UnitPlanPicker:rN,capabilities:{upload:!1},api:kN}},[n,l,s])}function Wb(n,l){const{selection:s}=n;if((s==null?void 0:s.kind)==="slot"&&!(s.instanceId!==n.instanceId||s.slotId!==l))return s.itemIndex}function e0(n,l){var s;return mN(l,(s=n.payload)==null?void 0:s.provenance,o=>n.override.slots[o]!==void 0)}function $d(n,l){var o;const s=n.override.slots[l];return s!==void 0?s:(o=n.payload)==null?void 0:o.resolvedProps.slots[l]}function jN(n){var p;const l=EN(n.fixture,n.selection,n.onSelect),s=_.useMemo(()=>new xE,[]),o=n.displayState.variant,u=_.useMemo(()=>X1(n.sectionSchema,o),[n.sectionSchema,o]),d=_.useMemo(()=>cN(n.override,n.baseline,n.fixture,n.sectionSchema),[n.override,n.baseline,n.fixture,n.sectionSchema]),h=((p=n.selection)==null?void 0:p.kind)==="slot"&&n.selection.instanceId===n.instanceId?n.selection.slotId:null;return f.jsxs("aside",{className:"instance-panel","data-testid":"instance-panel","data-instance-id":n.instanceId,children:[n.settingsOpen?f.jsx(gN,{instanceId:n.instanceId,label:n.label,display:n.display,sectionSchema:n.sectionSchema,variant:o,slotValue:m=>$d(n,m),onSetVariant:n.onSetVariant,onBack:n.onCloseSettings}):f.jsx(pN,{label:n.label,display:n.display,enabled:n.displayState.enabled,onSetEnabled:n.onSetEnabled,onOpenSettings:n.onOpenSettings}),n.settingsOpen?null:n.renderError?f.jsx("p",{className:"instance-panel__error","data-testid":"render-error",children:n.renderError}):null,n.settingsOpen?null:n.payload===null?f.jsx("p",{className:"instance-panel__empty","data-testid":"panel-loading",children:"Loading…"}):f.jsx(_E,{client:s,children:f.jsx(BE,{api:oN,children:f.jsxs(lj,{ports:l,children:[f.jsx(RE,{getJobStatus:$A}),f.jsxs("div",{className:"instance-panel__dock",children:[f.jsxs("div",{className:"hp-sb-scroll instance-panel__cards","data-testid":"slot-cards","data-dirty":d.length>0?"":void 0,children:[u.map(m=>m.kind==="record"?f.jsxs("section",{"aria-label":m.label,"data-testid":"object-list-card",className:"flex flex-col gap-2.5",children:[f.jsxs("h3",{className:"flex items-center gap-1.5 px-1 text-[length:calc(11.5*var(--content))] font-medium uppercase tracking-[0.04em] text-ink-3",children:[m.Icon?f.jsx(m.Icon,{size:13}):null,m.label,f.jsx("span",{className:"ml-auto",children:f.jsx(W1,{chips:e0(n,[m.slotId])})})]}),f.jsx("div",{className:"flex flex-col gap-3",children:f.jsx(Of,{slot:m.slot,instanceId:n.instanceId,slotId:m.slotId,value:$d(n,m.slotId),propertyId:n.fixture,onChange:g=>n.onApplySlot(m.slotId,g),selectedItemIndex:Wb(n,m.slotId)})})]},m.key):f.jsx(dN,{chips:e0(n,m.items.map(g=>g.slotId)),children:f.jsx(J1,{open:h!=null&&m.items.some(g=>g.slotId===h),onToggle:()=>h!=null&&m.items.some(g=>g.slotId===h)?n.onSelect({kind:"section",instanceId:n.instanceId}):n.onSelect({kind:"slot",instanceId:n.instanceId,slotId:m.items[0].slotId}),icon:m.Icon?f.jsx(m.Icon,{size:14}):null,title:m.label,scrollKey:m.key,children:f.jsx(vv,{items:m.items.map(({slotId:g,slot:x})=>f.jsx(Of,{slot:x,instanceId:n.instanceId,slotId:g,value:$d(n,g),propertyId:n.fixture,onChange:b=>n.onApplySlot(g,b),selectedItemIndex:Wb(n,g)},g)),rows:m.rows})})},m.key)),u.length===0?f.jsx("p",{className:"instance-panel__empty","data-testid":"no-editable-slots",children:"Nothing to edit in this section."}):null]}),f.jsx(SN,{items:d})]})]})})})]})}function MN(n,l){return n.find(s=>s.pages.includes(l))??null}function CN(n,l,s,o){const u=l.endsWith("/")?l:`${l}/`;if(!n.startsWith(u))return null;const d=n.indexOf("#"),h=d===-1?null:n.slice(d+1),p=(d===-1?n:n.slice(0,d)).slice(u.length).split("/").filter(Boolean),[m,g,x,b,...E]=p;if(m!=="fixtures"||g===void 0||x!=="live"||E.length>0)return null;const j=b===void 0?"/":`/${decodeURIComponent(b)}`,T=s.find(M=>M.path===j);if(!T)return null;const C=MN(o,T.id);return C?{pageId:T.id,canvasId:C.id,anchor:h||null}:null}const Xd="box-border inline-flex h-10 w-full items-center justify-center gap-1.75 rounded-lg border text-center text-[length:calc(13.5*var(--content))] font-semibold tracking-[-0.005em]",AN="group cursor-pointer border-line bg-canvas text-ink transition-[background-color,border-color,box-shadow,color,transform] hover:border-[var(--color-ink-4)] hover:bg-[#fafaf8] active:translate-y-[0.5px]",NN="cursor-pointer border-honey-2 bg-honey text-honey-ink transition-[background-color,border-color,box-shadow,color,transform] hover:bg-honey-2 hover:shadow-[0_2px_6px_rgba(40,44,50,0.12)] active:translate-y-[0.5px]",TN="cursor-not-allowed border-line bg-[#f3f1ea] text-ink-4";function ON({host:n,templateName:l,fixture:s,output:o,format:u,canvas:d,pagePath:h}){const p=o==="website"?{href:n.liveHref(s,h??"/"),title:`Open this page as it would publish — ${l}`}:null,m=o==="image"?{href:n.captureHref("bundle",{fixture:s,format:u,canvas:d}),title:`Download every page of this canvas as a zip — ${l}`}:o==="document"?{href:n.captureHref("print",{fixture:s,format:u}),title:`Download the PDF — ${l}`}:null;return f.jsx("footer",{className:"flex-shrink-0 border-t border-line-soft bg-canvas p-3","data-testid":"panel-footer",children:f.jsxs("div",{className:m&&!p?"w-full":"grid w-full grid-cols-2 gap-2",children:[p?f.jsxs("a",{href:p.href,target:"_blank",rel:"noopener noreferrer","data-testid":"view-live",title:p.title,className:`${Xd} ${AN}`,children:[f.jsx("span",{className:"grid place-items-center text-ink-3 transition-colors group-hover:text-ink",children:f.jsx(Pl,{name:"external",size:12,stroke:1.6})}),f.jsx("span",{"data-testid":"view-live-label",children:"View live"})]}):null,m?f.jsxs("a",{href:m.href,"data-testid":"download",title:m.title,className:`${Xd} ${NN}`,children:[f.jsx(mk,{size:14,className:"h-[calc(14*var(--content))] w-[calc(14*var(--content))]"}),f.jsx("span",{"data-testid":"download-label",children:"Download"})]}):f.jsx("button",{type:"button",disabled:!0,"data-testid":"publish",title:"Publishing needs a property and a deliverable — preview publish states in the application",className:`${Xd} ${TN}`,children:f.jsx("span",{children:"Publish"})})]})})}function RN(n,l,s,o){const u=n.ownerDocument,d=[],h=new Map;for(const p of Array.from(n.children)){const m=p,g=m.getAttribute(mc);g&&h.set(g,m)}for(const p of l){const m=h.get(p.instance_id),g=(m==null?void 0:m.dataset.svId)!==p.section_version_id;m&&g&&(o==null||o(m),m.remove());const x=m&&!g,b=x?m:s(p,u);x||d.push(b),n.appendChild(b),h.delete(p.instance_id)}return h.forEach(p=>{o==null||o(p),p.remove()}),d}function tx(n){return n==null?void 0:n.__trCanvasIslands}function zN(n,l,s,o){const u=n==null?void 0:n.querySelector(`[${mc}="${s}"]`);if(!u)return!1;const d=u.querySelector(":scope > .we-section-body")??u,h=tx(l);return h==null||h.unmountRoot(u),d.innerHTML=o,h==null||h.hydrateRoot(u),!0}function DN(){return{slots:{}}}function Hn(n,l,s){var o;return((o=n[l])==null?void 0:o[s])??DN()}function _h(n,l,s,o){return{...n,[l]:{...n[l],[s]:o}}}function UN(n,l,s,o,u){const d=Hn(n,l,s);return _h(n,l,s,{...d,slots:{...d.slots,[o]:u}})}function LN(n,l,s,o){return _h(n,l,s,{...Hn(n,l,s),enabled:o})}function BN(n,l,s,o){return _h(n,l,s,{...Hn(n,l,s),variant:o})}function HN(n,l){const s=n.enabled??(l==null?void 0:l.enabled)??!0,o=n.variant??(l==null?void 0:l.variant);return o===void 0?{enabled:s}:{enabled:s,variant:o}}function qN(n){return Object.keys(n.slots).length===0?{}:{slots:n.slots}}function GN(n,l){const s={};for(const[o,u]of Object.entries(n[l]??{}))u.enabled===void 0&&u.variant===void 0||(s[o]={...u.enabled===void 0?{}:{enabled:u.enabled},...u.variant===void 0?{}:{variant:u.variant}});return s}function IN(n,l){return Object.keys(n).filter(s=>l[s]!==n[s])}function t0(n,l){if(!l.some(o=>o in n))return n;const s={...n};for(const o of l)delete s[o];return s}function n0(n,l,s,o){return{...n,[l]:{...n[l],[s]:o}}}function QN(n,l,s){const o=n[l];if(!o||!(s in o))return n;const u={...o};return delete u[s],{...n,[l]:u}}function VN(n){const{host:l,fixture:s,doc:o,resolvedDisplay:u,sessions:d,pages:h,frameFor:p}=n,{edits:m,baselines:g,setEdits:x,setBaseline:b}=d,[E,j]=_.useState({}),[T,C]=_.useState({}),M=[s,o??"",...h.map(Y=>Y.id)].join("\0"),[R,D]=_.useState(M);R!==M&&(D(M),j({}),C({}));const z=_.useRef(E);z.current=E;const I=_.useRef(p);I.current=p;const le=_.useRef(h);le.current=h;const ne=_.useRef(m);ne.current=m;const W=_.useRef(s);W.current=s;const L=_.useRef(o);L.current=o;const ue=_.useRef(new Map),de=_.useCallback(Y=>Hn(m,s,Y),[m,s]),re=_.useCallback(Y=>HN(Hn(m,s,Y),u==null?void 0:u[Y]),[m,s,u]),ie=_.useCallback((Y,N)=>{var P;return((P=T[Y])==null?void 0:P[N])??null},[T]),U=_.useCallback(Y=>{var N;for(const P of h){const Q=(N=T[P.id])==null?void 0:N[Y];if(Q!==void 0)return Q}return null},[T,h]),H=_.useCallback(Y=>{var N;for(const P of h){const Q=(N=E[P.id])==null?void 0:N[Y];if(Q)return Q}return null},[E,h]),$=_.useCallback(Y=>{var N;return((N=g[s])==null?void 0:N[Y])??null},[g,s]),w=_.useCallback(async(Y,N,P,Q)=>{const Z=Y.id,pe=W.current,ge=L.current,Ee=`${Z}\0${N}`,Re=(ue.current.get(Ee)??0)+1;ue.current.set(Ee,Re);const Ue=()=>pe!==W.current||ge!==L.current||ue.current.get(Ee)!==Re;try{const nt=await l.render({page:Z,instance:N,fixture:pe,session:qN(P),display:GN(ne.current,pe)});if(Ue()||(j(hn=>n0(hn,Z,N,nt)),Object.keys(P.slots).length===0&&P.variant===void 0&&b(pe,N,{fixtureId:pe,slots:nt.resolvedProps.slots}),C(hn=>QN(hn,Z,N)),!Q))return;const{doc:Ye,win:Te}=I.current(Z);zN(Ye,Te,N,nt.html)}catch(nt){if(Ue())return;const Ye=nt instanceof Error?nt.message:String(nt);C(Te=>n0(Te,Z,N,Ye))}},[l,b]),F=_.useCallback((Y,N)=>{var Q;if((Q=z.current[Y])!=null&&Q[N])return;const P=le.current.find(Z=>Z.id===Y);P&&w(P,N,Hn(ne.current,W.current,N),!1)},[w]),ce=_.useCallback((Y,N)=>{var P;for(const Q of le.current)((P=z.current[Q.id])==null?void 0:P[Y])!==void 0&&w(Q,Y,N,!0)},[w]),ee=_.useCallback(Y=>{ce(Y,Hn(ne.current,W.current,Y))},[ce]),G=_.useCallback((Y,N,P)=>{const Q=UN(ne.current,W.current,Y,N,P);ne.current=Q,x(Q),ce(Y,Hn(Q,W.current,Y))},[ce,x]),S=_.useCallback((Y,N)=>{const P=LN(ne.current,W.current,Y,N);ne.current=P,x(P);for(const Q of le.current)for(const Z of Object.keys(z.current[Q.id]??{}))w(Q,Z,Hn(P,W.current,Z),!0)},[w,x]),q=_.useCallback((Y,N)=>{const P=BN(ne.current,W.current,Y,N);ne.current=P,x(P),ce(Y,Hn(P,W.current,Y))},[ce,x]);return _.useMemo(()=>({overrideFor:de,displayFor:re,payloads:E,errorOn:ie,errorFor:U,payloadFor:H,baselineFor:$,ensureLoaded:F,reload:ee,applySlot:G,setEnabled:S,setVariant:q}),[de,re,E,ie,U,H,$,F,ee,G,S,q])}const YN={slots:{},slot_order:[]},KN={required:!1,variant:null},$N=[];function a0(n){return n?n.kind==="section"?{kind:"section",instance_id:n.instanceId}:{kind:"slot",instance_id:n.instanceId,slot_id:n.slotId,...n.itemIndex!==void 0?{item_index:n.itemIndex}:{}}:null}function XN(n){return n.kind==="section"?{kind:"section",instanceId:n.instance_id}:{kind:"slot",instanceId:n.instance_id,slotId:n.slot_id,...n.item_index!==void 0?{itemIndex:n.item_index}:{}}}function FN(n,l){if(!n)return[];const s=[];for(const o of n.pages){const u=l.find(d=>d.id===o);u&&s.push(u)}return s}function Xr(n,l,s,o){var m;const u=((m=l.doc)==null?void 0:m.getElementById(n))??null;if(!u||!s)return;const d=u.getBoundingClientRect(),h=Ew({top:d.top,height:d.height},l.wrapper.offsetTop,o,s.scrollTop),p=kw(h,s.clientHeight,s.scrollTop,Sw);p!==null&&s.scrollTo({top:p,behavior:"smooth"})}function l0(n,l){return n.querySelector(`[${mc}="${Xl(l)}"]`)}function Bn(n){const l=JSON.stringify(n);return _.useMemo(()=>n,[l])}function ZN(n){var jo,xa,zt;const{host:l,catalog:s,view:o,onViewChange:u,sessions:d}=n,h=_.useRef(null),p=_.useRef([]),[m,g]=_.useState({}),[x,b]=_.useState(1),[E,j]=_.useState(0),[T,C]=_.useState(!1),[M,R]=_.useState(null),D=o.fixture,z=s.fixtures.find(te=>te.id===D),I=z==null?void 0:z.doc,le=z==null?void 0:z.display,[ne,W]=_.useState(null),L=_.useCallback(te=>{W(null),u(te)},[u]);_.useEffect(()=>{vA(D)},[D]);const ue=_.useMemo(()=>new URL(l.base).pathname,[l.base]),de=Bn(s.template.pages),re=Bn(s.template.canvases),ie=Bn(s.islands.map),U=Bn(s.stylesheets),H=s.islands.hostScript,$=Bn(s.islands.importMap),w=Bn(Object.fromEntries(s.template.instances.map(te=>[te.instanceId,te.sectionSchema]))),F=Bn(Object.fromEntries(s.template.instances.map(te=>[te.instanceId,te.section]))),ce=Bn(s.template.instances),ee=s.template.output,G=ee!=="website",S=G?s.template.formats:[],q=Bn(G?S.find(te=>te.id===o.format)??S[0]??null:null),Y=q!==null&&q.bleed>0?q.bleed:null,N=_.useMemo(()=>q?{formatId:q.id,width:q.cssWidth,height:q.cssHeight,tokens:q.tokens}:void 0,[q]),P=re.find(te=>te.id===o.canvasId)??(o.canvasId===null?re[0]??null:null),Q=re.length>0&&P===null,Z=_.useMemo(()=>P?FN(P,de):$N,[P,de]),pe=_.useMemo(()=>Z.map(te=>({id:te.id})),[Z]),ge={basePath:ue,stylesheets:U,cssRev:String(E),islands:ie,hostScript:H,importMap:$},Ee=_.useMemo(()=>Ug(Yb({...ge,sectionSchemaByInstance:w,...N?{pageBox:N}:{}})),[ue,U,E,ie,H,$,w,N]),Re=_.useMemo(()=>Ug(Yb({...ge,...N?{pageBox:N}:{}})).srcdoc(),[ue,U,E,ie,H,$,N]),[Ue,nt]=_.useState(Re);Ue!==Re&&(nt(Re),g({}));const Ye=_.useCallback(te=>{const he=p.current.find(Se=>Se.key===te);return{doc:(he==null?void 0:he.doc)??null,win:(he==null?void 0:he.iframe.contentWindow)??null}},[]),Te=VN({host:l,fixture:D,doc:I,resolvedDisplay:le,sessions:d,pages:pe,frameFor:Ye}),hn=Bn(ce.map(te=>te.instanceId).filter(te=>!Te.displayFor(te).enabled)),[So,ko]=_.useState(null),ti=_.useRef(o.selection);ti.current=o.selection;const ni=_.useRef(Te);ni.current=Te;const ai=_.useRef(Z);ai.current=Z;const dl=_.useRef(x);dl.current=x;const On=_.useMemo(()=>Z.map(te=>({key:te.id,srcdoc:Re,label:te.label,title:`Canvas preview — ${te.label}`,...N?{pageBox:N}:{}})),[Z,Re,N]);_.useEffect(()=>{const te=h.current;if(!te)return;const he=xw(te,On);p.current=he;const Se=he.map(Me=>{const Be=()=>{nw(Me.doc)&&g(Ne=>({...Ne,[Me.key]:!0}))};return Me.iframe.addEventListener("load",Be),()=>Me.iframe.removeEventListener("load",Be)});return()=>{for(const Me of Se)Me()}},[On]),_.useEffect(()=>{for(const te of p.current)ww(te.overlay,T?Y:null)},[T,Y,On]),_.useEffect(()=>{const te=h.current;if(!te||typeof ResizeObserver>"u")return;const he=new ResizeObserver(Se=>{var Ne;const Me=(Ne=Se[0])==null?void 0:Ne.contentRect;if(!(Me!=null&&Me.width))return;const Be=Q_(Me.width);b(Y_(Be,{availableWidthPx:Me.width,availableHeightPx:Me.height},N?{width:N.width,height:N.height}:void 0))});return he.observe(te),()=>he.disconnect()},[N]),_.useEffect(()=>{var te;(te=h.current)==null||te.style.setProperty("--we-scale",String(x))},[x]),_.useEffect(()=>{var he;if(N)return;const te=[];for(const Se of p.current){if(!m[Se.key])continue;const Me=(he=Se.doc)==null?void 0:he.getElementById("we-page");if(!Me)continue;const Be=()=>Se.setPageHeight(Me.getBoundingClientRect().height);if(Be(),typeof ResizeObserver>"u")continue;const Ne=new ResizeObserver(Be);Ne.observe(Me),te.push(()=>Ne.disconnect())}return()=>{for(const Se of te)Se()}},[m,On,N]),_.useEffect(()=>{const te=So;if(!te)return;const he=()=>{document.documentElement.style.setProperty("--we-panel-w",`${te.offsetWidth}px`)};he();const Se=typeof ResizeObserver<"u"?new ResizeObserver(he):null;return Se==null||Se.observe(te),()=>{Se==null||Se.disconnect(),document.documentElement.style.removeProperty("--we-panel-w")}},[So]),_.useEffect(()=>{for(const te of Z)for(const he of te.instanceIds)Te.ensureLoaded(te.id,he)},[Z,Te.ensureLoaded,D,I]);const rt=_.useMemo(()=>{const te={};for(const he of Z){const Se=Te.payloads[he.id]??{};te[he.id]=he.instanceIds.filter(Me=>Se[Me]??Te.errorOn(he.id,Me)).map(Me=>{var Ne,mt;const Be=Te.errorOn(he.id,Me);return{instance_id:Me,section_version_id:D,section_key:F[Me]??Me,section_display_name:((Ne=ce.find(pt=>pt.instanceId===Me))==null?void 0:Ne.label)??null,html:((mt=Se[Me])==null?void 0:mt.html)??null,render_error:Be?{code:"render_failed",message:Be}:null}})}return te},[Z,Te.payloads,Te.errorOn,F,ce,D]);_.useEffect(()=>{let te=!1;for(const he of p.current){if(!m[he.key])continue;const Se=he.doc,Me=he.iframe.contentWindow,Be=Se==null?void 0:Se.getElementById("we-page");if(!Be)continue;const Ne=tx(Me),mt=RN(Be,rt[he.key]??[],(pt,ct)=>Ee.buildSectionWrapper(pt,ct),pt=>Ne==null?void 0:Ne.unmountRoot(pt));mt.length>0&&!Ne&&!te&&Object.keys(ie).length>0&&(te=!0,console.warn("playground: no island host on a canvas frame, so nothing will hydrate and sections stay static. Expected window.__trCanvasIslands from the canvas island host script."));for(const pt of mt)Ne==null||Ne.hydrateRoot(pt).catch(ct=>{console.error("playground: canvas hydration pass failed:",ct)})}},[m,On,rt,Ee,ie]);const Eo=_.useRef(()=>{});Eo.current=te=>{Te.setEnabled(te,!0),L({...o,selection:{kind:"section",instanceId:te}})},_.useEffect(()=>{var Se;const te=new Set(hn),he=[];for(const Me of p.current){if(!m[Me.key])continue;const Be=Me.doc;if(!Be)continue;const Ne=rt[Me.key]??[];for(const Lt of Ne)(Se=l0(Be,Lt.instance_id))==null||Se.setAttribute("data-hidden",te.has(Lt.instance_id)?"true":"false");const mt=Ne.filter(Lt=>te.has(Lt.instance_id)).map(Lt=>({instanceId:Lt.instance_id,label:Zd(Lt)})),pt=uw(Me.tabLayer,document,mt,Lt=>Eo.current(Lt)),ct=()=>dw(pt,Lt=>l0(Be,Lt),x);ct();const Dt=Be.getElementById("we-page");if(!Dt||typeof ResizeObserver>"u")continue;const Ut=new ResizeObserver(ct);Ut.observe(Dt),he.push(()=>Ut.disconnect())}return()=>{for(const Me of he)Me()}},[m,On,rt,hn,x]);const us=_.useCallback(()=>{const te=p.current,he=ti.current,Se=a0(he);for(const Ne of te)Ne.doc&&Ee.setLiveOwner(Ne.doc,Se);const Me=_w(te,Ee,Se),Be=he!==null&&hn.includes(he.instanceId);for(const Ne of te){const mt=Ne.overlay.querySelector(".we-chrome-label"),pt=he&&!Be?Me.find(ct=>ct.handle.key===Ne.key):void 0;if(!pt||!he){Ng(Ne.overlay,[],Rd),Fd(mt);continue}if(Ng(Ne.overlay,pt.els,Rd,he.kind),he.kind==="section"){const ct=(rt[Ne.key]??[]).find(Dt=>Dt.instance_id===he.instanceId);z_(mt,pt.els[0]??null,ct?Zd(ct):"")}else Fd(mt)}},[Ee,rt,hn]);_.useEffect(()=>{us();for(const te of p.current){if(!m[te.key])continue;const he=te.doc,Se=te.iframe.contentWindow;he&&Se&&Aw(Se,he,a0(o.selection))}},[m,On,o.selection,us]);const li=_.useCallback((te,he)=>{const Se=te.getAttribute("href")??"";if(!Se||Se==="#")return;const Me=h.current;if(Se.startsWith("#")){Xr(Se.slice(1),he,Me,dl.current);return}const Be=CN(Se,ue,de,re);if(!Be){window.open(Se,"_blank","noopener,noreferrer");return}if(P!==null&&Be.canvasId===P.id){const Ne=p.current.find(mt=>mt.key===Be.pageId);if(!Ne)return;Be.anchor?Xr(Be.anchor,Ne,Me,dl.current):Ne!==he&&Xr("we-page",Ne,Me,dl.current);return}L({...o,canvasId:Be.canvasId,selection:null}),Be.anchor&&R({pageId:Be.pageId,anchor:Be.anchor})},[o,L,ue,de,re,P]);_.useEffect(()=>{var he;if(!M||!m[M.pageId])return;const te=p.current.find(Se=>Se.key===M.pageId);(he=te==null?void 0:te.doc)!=null&&he.getElementById(M.anchor)&&(Xr(M.anchor,te,h.current,dl.current),R(null))},[M,m,rt]),_.useEffect(()=>{const te=[];for(const he of p.current){if(!m[he.key])continue;const Se=he.doc;if(!Se)continue;const Me=rt[he.key]??[],Be=he.overlay.querySelector(".we-chrome-ring--hover"),Ne=Dt=>{var _a;const Ut=Dt.target,Lt=Ee.resolveTarget(Ut,Me);Fr(Be);const jn=Lt?XN(Lt.selection):null,ml=((_a=Ut.closest)==null?void 0:_a.call(Ut,"a"))??null;if(ml){if(Dt.preventDefault(),(jn==null?void 0:jn.kind)==="slot"){const wa=o.selection,Mo=(wa==null?void 0:wa.kind)==="slot"&&wa.instanceId===jn.instanceId&&wa.slotId===jn.slotId&&wa.itemIndex===jn.itemIndex;L({...o,selection:jn}),Mo&&li(ml,he);return}li(ml,he);return}L({...o,selection:jn})},mt=Dt=>{const Ut=Ee.resolveTarget(Dt.target,Me);Ut?_0(Be,Ut.element,Rd):Fr(Be)},pt=()=>Fr(Be),ct=Dt=>{Dt.key==="Escape"&&L({...o,selection:null})};Se.body.addEventListener("click",Ne),Se.body.addEventListener("mouseover",mt),Se.body.addEventListener("mouseleave",pt),Se.body.addEventListener("keydown",ct),te.push(()=>{Se.body.removeEventListener("click",Ne),Se.body.removeEventListener("mouseover",mt),Se.body.removeEventListener("mouseleave",pt),Se.body.removeEventListener("keydown",ct)})}return()=>{for(const he of te)he()}},[m,On,Ee,rt,o,L,li]);const fl=s.capabilities.hmr;_.useEffect(()=>{if(!fl)return;const te=()=>{const he=new Set;for(const Se of ai.current)for(const Me of Se.instanceIds)he.has(Me)||(he.add(Me),ni.current.reload(Me))};return l.subscribe({source:te,stylesheet:()=>j(he=>he+1)})},[l,fl]);const ii=o.selection,it=(ii==null?void 0:ii.instanceId)??null,hl=Z.find(te=>it!==null&&te.instanceIds.includes(it))??Z[0]??null;return _.useEffect(()=>{it&&hl&&Te.ensureLoaded(hl.id,it)},[it,hl==null?void 0:hl.id,Te.ensureLoaded]),Q?f.jsxs("div",{className:"boot-error",children:['The template declares no canvas "',o.canvasId,'".',`
|
|
1100
|
-
`,"Declared canvases: ",re.map(te=>te.id).join(", ")]}):f.jsxs("div",{className:"canvas-mirror",children:[f.jsx("style",{children:mw}),re.length>1?f.jsx("div",{className:"canvas-bar",children:f.jsx("nav",{className:"canvas-bar__card","aria-label":"Canvases",children:re.map(te=>f.jsx("button",{type:"button",className:te.id===(P==null?void 0:P.id)?"canvas-bar__tab is-current":"canvas-bar__tab","aria-current":te.id===(P==null?void 0:P.id)?"page":void 0,onClick:()=>L({...o,canvasId:te.id,selection:null}),children:te.label},te.id))})}):null,f.jsx("div",{className:"we-canvas-stage canvas-mirror__stage",ref:h,onClick:te=>{var Se;const he=te.target;(he===h.current||(Se=he.classList)!=null&&Se.contains(Wr))&&L({...o,selection:null})}}),f.jsxs("div",{className:"canvas-mirror__sidebar",ref:ko,children:[f.jsxs("div",{className:"sidebar-template",children:[f.jsxs("label",{className:"sidebar-template__field",children:["Fixture",f.jsx("select",{"data-testid":"fixture-picker",value:D,onChange:te=>L({...o,fixture:te.target.value,selection:null}),children:s.fixtures.map(te=>f.jsx("option",{value:te.id,children:wA(te)},te.id))})]}),G&&q&&S.length>1?f.jsxs("label",{className:"sidebar-template__field",children:["Format",f.jsx("select",{"data-testid":"format-switcher",value:q.id,onChange:te=>u({...o,format:te.target.value}),children:S.map(te=>f.jsx("option",{value:te.id,children:`${te.id} — ${te.pixelWidth}×${te.pixelHeight}px${te.physical?` (${te.physical})`:""}`},te.id))})]}):null,Y!==null?f.jsxs("label",{className:"sidebar-template__toggle",children:[f.jsx("input",{type:"checkbox","data-testid":"guides-toggle",checked:T,onChange:te=>C(te.target.checked)}),"Trim & bleed guides"]}):null]}),it?f.jsx(jN,{instanceId:it,label:((jo=ce.find(te=>te.instanceId===it))==null?void 0:jo.label)??it,display:((xa=ce.find(te=>te.instanceId===it))==null?void 0:xa.display)??KN,displayState:Te.displayFor(it),settingsOpen:ne===it,onSetEnabled:te=>Te.setEnabled(it,te),onSetVariant:te=>Te.setVariant(it,te),onOpenSettings:()=>W(it),onCloseSettings:()=>W(null),fixture:D,sectionSchema:w[it]??YN,override:Te.overrideFor(it),payload:Te.payloadFor(it),baseline:Te.baselineFor(it),renderError:Te.errorFor(it),selection:ii,onSelect:te=>L({...o,selection:te}),onApplySlot:(te,he)=>Te.applySlot(it,te,he)}):f.jsx(mA,{}),s.capabilities.capture||ee==="website"?f.jsx(ON,{host:l,templateName:s.template.name,fixture:D,output:ee,format:(q==null?void 0:q.id)??null,canvas:(P==null?void 0:P.id)??null,pagePath:((zt=Z[0])==null?void 0:zt.path)??null}):null]})]})}function PN(n){const[l,s]=_.useState({}),[o,u]=_.useState({}),[d,h]=_.useState(n);if(n!==null&&n!==d){const g=d===null?[]:IN(d,n);h(n),g.length>0&&(s(x=>t0(x,g)),u(x=>t0(x,g)))}const p=_.useCallback(g=>s(g),[]),m=_.useCallback((g,x,b)=>{u(E=>({...E,[g]:{...E[g],[x]:b}}))},[]);return _.useMemo(()=>({edits:l,baselines:o,setEdits:p,setBaseline:m}),[l,o,p,m])}function i0(n){const l=M_(window.location.pathname,n.base);return l===null?null:C_(l,window.location.search)}function JN({host:n}){const[l,s]=_.useState(null),[o,u]=_.useState(null),[d,h]=_.useState(0),[p,m]=_.useState(()=>i0(n)),g=_.useMemo(()=>l===null||l.error!==void 0?null:Object.fromEntries(l.fixtures.map(T=>[T.id,T.doc])),[l]),x=PN(g);_.useEffect(()=>{let T=!0;return n.catalog().then(C=>{T&&(s(C),u(null))},C=>{T&&u(C instanceof Error?C.message:String(C))}),()=>{T=!1}},[n,d]);const b=l==null?void 0:l.template.name;_.useEffect(()=>{b&&(document.title=`${b} - Playground`)},[b]);const E=(l==null?void 0:l.capabilities.hmr)===!0;_.useEffect(()=>{if(!E)return;const T=()=>h(C=>C+1);return n.subscribe({source:T,fixtures:T})},[n,E]),_.useEffect(()=>{const T=()=>m(i0(n));return window.addEventListener("popstate",T),()=>window.removeEventListener("popstate",T)},[n]),_.useEffect(()=>{if(p!==null||l===null)return;const T=A_(l);T!==null&&(window.history.replaceState({},"",new URL(
|
|
1104
|
+
*/const $5=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],lv=ye("x",$5),Pf="flex flex-col gap-3.5 pt-1",Qn="flex flex-col gap-1",X5="flex items-center justify-between gap-2.5",va="text-[length:calc(11*var(--content))] font-medium text-ink-4 pl-0.5",Jf="m-0 text-caption leading-[1.4] text-danger",cc="bg-[repeating-linear-gradient(135deg,rgba(20,18,13,0.05)_0_1px,transparent_1px_9px)]",ot="appearance-none cursor-pointer border-0 bg-transparent p-0 m-0 outline-none",vo="flex w-full items-stretch rounded-[calc(8*var(--content))] border border-line bg-white transition-[border-color,box-shadow] duration-[120ms] focus-within:border-accent focus-within:shadow-[0_0_0_3px_rgba(15,42,34,0.07)]",ss="min-w-0 flex-1 appearance-none border-0 bg-transparent px-2.75 py-2.25 text-[length:calc(13.5*var(--content))] text-ink outline-none placeholder:text-ink-4",tf="flex items-center text-[length:calc(12.5*var(--content))] text-ink-4",F5=me(ot,"min-w-0 flex-1 bg-transparent text-ink outline-none placeholder:text-ink-4");function xo(n,l="Item"){const s=(n??"").trim().split(/\s+/).filter(Boolean),o=s.length>0?s[s.length-1]:l,u=Z5(o);return u.charAt(0).toUpperCase()+u.slice(1)}function Z5(n){return/[^aeiou]ies$/i.test(n)?n.slice(0,-3)+"y":/(?:s|x|z|ch|sh)es$/i.test(n)?n.slice(0,-2):/[^s]s$/i.test(n)?n.slice(0,-1):n}function P5(n,l){const s="font-mono text-[length:calc(10.5*var(--content))] text-ink-4 [font-feature-settings:'tnum'] shrink-0";return l==null?s:n>l?me(s,"text-danger"):n>=l*.9?me(s,"text-[#7a5a14]"):s}function iv({label:n,count:l,max:s,right:o,revealed:u=!0}){return f.jsxs("div",{className:X5,children:[f.jsx("span",{className:va,children:n}),f.jsx("div",{className:"flex items-center gap-1.5",children:o??(s!=null&&l!=null&&f.jsxs("span",{"aria-hidden":!u,className:me(P5(l,s),"transition-[opacity,transform] duration-150 ease-out motion-reduce:transition-none",u?"opacity-100 translate-y-0":"opacity-0 translate-y-1"),children:[l," / ",s]}))})]})}function Wf({children:n}){return f.jsx("span",{className:va,children:n})}function Zr({value:n,onChange:l,label:s,max:o,count:u,headerRight:d,placeholder:h,multiline:p=!1,rows:m=3,inputMode:g,maxLength:x,spellCheck:b,bare:E=!1,className:j,ariaLabel:T,id:C}){const[M,R]=_.useState(!1),D=ne=>l(ne.target.value),z=()=>R(!0),I=()=>R(!1);if(E)return f.jsx("input",{id:C,className:me(F5,j),value:n,placeholder:h,inputMode:g,maxLength:x,spellCheck:b,"aria-label":T,onChange:D});const le=s!=null||d!=null||o!=null;return f.jsxs("div",{className:Qn,children:[le&&f.jsx(iv,{label:s??"",count:u??n.length,max:o,right:d,revealed:M}),f.jsx("div",{className:vo,children:p?f.jsx("textarea",{id:C,className:me(ss,"min-h-[calc(76*var(--content))] resize-none leading-[1.5]",j),rows:m,value:n,placeholder:h,maxLength:x,spellCheck:b,"aria-label":T,onChange:D,onFocus:z,onBlur:I}):f.jsx("input",{id:C,className:me(ss,j),value:n,placeholder:h,inputMode:g,maxLength:x,spellCheck:b,"aria-label":T,onChange:D,onFocus:z,onBlur:I})})]})}function It(n,l,s=1.5){const o=n;return function({size:d=l}={}){return f.jsx(o,{size:d,strokeWidth:s,style:{width:`calc(${d} * var(--content))`,height:`calc(${d} * var(--content))`}})}}const De={swap:It(zS,13),crop:It(fk,13),eye:It(F0,13),eyeOff:It(X0,13),trash:It(tv,11),plus:It(J0,14),up:It(nv,15),link:It(Kk,13),play:({size:n=20}={})=>f.jsx(g5,{size:n,strokeWidth:0,fill:"currentColor",style:{width:`calc(${n} * var(--content))`,height:`calc(${n} * var(--content))`}}),tour:It(Zf,18),search:It(ev,14),x:It(lv,15),check:It(K0,13),minus:It(i5,16),external:It($0,11),grip:It(Z0,13,1.8)},J5="flex max-h-full w-full flex-col overflow-hidden rounded-[14px] bg-canvas shadow-[0_24px_70px_-24px_rgba(20,18,13,0.5),0_2px_0_rgba(20,18,13,0.04)]",sv="flex flex-shrink-0 items-center gap-[14px] border-b border-line-soft px-[18px] py-4",ov="mr-auto flex min-w-0 flex-col gap-0.5",rv="m-0 text-[16px] font-semibold tracking-[-0.01em]",W5="text-[12px] text-ink-3",cv=me(ot,"grid size-8 flex-shrink-0 place-items-center rounded-[8px] text-ink-3 hover:bg-[#f1f0ea] hover:text-ink"),uv="flex flex-shrink-0 items-center justify-between gap-3 border-t border-line-soft px-[18px] py-[13px]",dv="ml-auto flex gap-2",fv=me(ot,"inline-flex h-9 items-center gap-1.5 rounded-[9px] border border-transparent px-4 text-[13px] font-semibold"),hv=me(fv,"border-line bg-white text-ink hover:bg-[#faf9f6]"),eh=me(fv,"border-honey-2 bg-honey text-honey-ink hover:bg-honey-2 disabled:cursor-default disabled:opacity-45"),e4=me(ot,"inline-flex h-9 items-center px-1 font-medium text-ink-2 hover:text-ink"),Zg="flex flex-shrink-0 gap-2.5 px-[18px] pb-3 pt-[14px]",Pg="flex h-[38px] flex-1 items-center gap-2 rounded-[9px] border border-line bg-white px-3 transition-[border-color] duration-[120ms] focus-within:border-accent",Jg="grid flex-shrink-0 place-items-center text-ink-3",Wg="flex-1 border-0 bg-transparent text-[13.5px] text-ink",t4="min-h-0 flex-1 overflow-y-auto px-[18px] pb-[18px] pt-0.5",n4="grid grid-cols-4 gap-x-3 gap-y-[14px]",a4="col-span-full py-12 text-center text-[13px] text-ink-3",l4=me(ot,"group/cell flex flex-col gap-1.5 text-left"),i4="flex h-[120px] items-center justify-center",s4="relative mx-auto w-fit max-w-full overflow-hidden rounded-[9px] border border-line transition-[box-shadow,border-color] duration-[120ms] group-hover/cell:border-ink-4 group-data-[selected]/cell:border-accent group-data-[selected]/cell:shadow-[0_0_0_3px_rgba(15,42,34,0.18)]",eb="block h-auto max-h-[120px] w-auto max-w-full",o4="absolute right-1.5 top-1.5 grid size-[22px] place-items-center rounded-full bg-accent text-white shadow-[0_2px_6px_rgba(0,0,0,0.25)]",r4="relative grid h-[120px] w-[160px] place-items-center bg-[#e6e3da] text-ink-3",c4="block w-full truncate text-center text-[11.5px] leading-[1.35] text-ink-2",u4="absolute bottom-1.5 left-1.5 rounded-full bg-[rgba(15,18,9,0.72)] px-1.5 py-0.5 text-[10.5px] font-semibold tabular-nums text-white",d4=me(ot,"group/up flex h-[120px] w-full flex-col items-center justify-center gap-[7px] self-start rounded-[9px] border-[1.5px] border-dashed border-ink-4 bg-[#fafaf8] text-ink-3 hover:border-accent hover:bg-white hover:text-accent"),f4="grid size-[38px] place-items-center rounded-full border border-line bg-white group-hover/up:border-accent",h4="text-[12px] font-semibold",m4="flex flex-shrink-0 gap-0.5 rounded-[9px] bg-[#f1f0ea] p-[3px]",p4=me(ot,"inline-flex h-8 items-center rounded-[7px] px-[13px] text-[12.5px] font-semibold text-ink-3");function y4(n,l=!1){return me(p4,n&&"bg-white text-ink shadow-[0_1px_3px_rgba(20,18,13,0.1)]",l&&"opacity-40 cursor-not-allowed")}var th=b0();function g4(...n){return Kf(Qf(n))}const mv=1e3;let b4=0;const ol=[];let pv="",yv="";function v4(){if(ol.length!==1||typeof document>"u")return;const n=document.body;pv=n.style.overflow,yv=n.style.paddingRight;const l=window.innerWidth-document.documentElement.clientWidth;n.style.overflow="hidden",l>0&&(n.style.paddingRight=`${l}px`)}function x4(){ol.length===0&&(typeof document>"u"||(document.body.style.overflow=pv,document.body.style.paddingRight=yv))}function _4(){const n=++b4;return ol.push(n),v4(),n}function tb(n){const l=ol.indexOf(n);l!==-1&&ol.splice(l,1),x4()}function w4(n){const l=ol.indexOf(n);return mv+(l===-1?0:l)*10}function nb(n){return ol[ol.length-1]===n}const S4="(prefers-reduced-motion: reduce)";function k4(){const[n,l]=_.useState(!1);return _.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const s=window.matchMedia(S4);l(s.matches);const o=u=>l(u.matches);return s.addEventListener("change",o),()=>s.removeEventListener("change",o)},[]),n}const E4={sm:"max-w-[calc(420*var(--frame))]",md:"max-w-[calc(520*var(--frame))]",lg:"max-w-[calc(800*var(--frame))]",xl:"max-w-[calc(1240*var(--frame))]",full:"max-w-[calc(100vw-80px)]"},j4='a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';function M4({open:n,onClose:l,className:s,size:o,closeOnBackdrop:u=!0,closeOnEsc:d=!0,labelledBy:h,ariaLabel:p,children:m}){const[g,x]=_.useState("closed"),b=_.useRef(null),E=_.useRef(null),j=_.useRef(null),[T,C]=_.useState(1e3),M=k4();_.useEffect(()=>{n&&g==="closed"?x("open"):!n&&g==="open"&&x(M?"closed":"closing")},[n,g,M]),_.useEffect(()=>{var z;if(g==="open"&&b.current===null){j.current=document.activeElement??null;const I=_4();b.current=I,C(w4(I)),(z=E.current)==null||z.focus()}},[g]),_.useEffect(()=>{var z,I;g==="closed"&&b.current!==null&&(tb(b.current),b.current=null,(I=(z=j.current)==null?void 0:z.focus)==null||I.call(z),j.current=null)},[g]),_.useEffect(()=>()=>{b.current!==null&&(tb(b.current),b.current=null)},[]),_.useEffect(()=>{if(g!=="closing")return;const z=setTimeout(()=>x("closed"),400);return()=>clearTimeout(z)},[g]),_.useEffect(()=>{if(g!=="open"||!d)return;const z=I=>{I.key==="Escape"&&(b.current===null||!nb(b.current)||(I.stopPropagation(),l()))};return document.addEventListener("keydown",z,!0),()=>document.removeEventListener("keydown",z,!0)},[g,d,l]),_.useEffect(()=>{if(g!=="open")return;const z=I=>{if(I.key!=="Tab"||b.current===null||!nb(b.current))return;const le=E.current;if(!le)return;const ne=le.querySelectorAll(j4);if(ne.length===0){I.preventDefault();return}const W=ne[0],L=ne[ne.length-1];I.shiftKey&&document.activeElement===W?(I.preventDefault(),L==null||L.focus()):!I.shiftKey&&document.activeElement===L&&(I.preventDefault(),W==null||W.focus())};return document.addEventListener("keydown",z,!0),()=>document.removeEventListener("keydown",z,!0)},[g]);const R=_.useCallback(z=>{z.target===z.currentTarget&&g==="closing"&&x("closed")},[g]);if(g==="closed"||typeof document>"u")return null;const D=g==="closing"?"closing":"open";return th.createPortal(f.jsx("div",{className:"hp-modal-backdrop","data-state":D,style:{zIndex:T},onMouseDown:u?l:void 0,children:f.jsx("div",{ref:E,className:g4("hp-modal-panel",o?E4[o]:void 0,s),"data-state":D,role:"dialog","aria-modal":"true","aria-labelledby":h,"aria-label":p,tabIndex:-1,onMouseDown:z=>z.stopPropagation(),onAnimationEnd:R,children:m})}),document.body)}const C4={page:"max-w-[920px]",pick:"max-w-[700px]",crop:"max-w-[680px]"};function gv({open:n=!0,variant:l,onClose:s,children:o}){return f.jsx(M4,{open:n,onClose:s,className:me(J5,C4[l]),children:o})}const cn={Shell:gv,head:sv,titles:ov,title:rv,subtitle:W5,close:cv,CloseIcon:De.x,foot:uv,actions:dv,buttonGhost:hv,buttonPrimary:eh,buttonLink:e4,ZoomOutIcon:De.minus,ZoomInIcon:De.plus};function A4(n){return n.flatMap(l=>typeof l=="string"?[l]:[l[0],l[1]])}const N4=new Set(["text","number","select","url"]);function ab(n){return N4.has(n.type)?n.type!=="text"||n.size===void 0||n.size==="short":!1}function T4(n){const l=[];for(let s=0;s<n.length;s++){const o=n[s+1];ab(n[s])&&o!==void 0&&ab(o)?(l.push({kind:"pair",indices:[s,s+1]}),s++):l.push({kind:"single",index:s})}return l}function bv(n,l){const s=new Map(l.map((d,h)=>[d,h])),o=[],u=new Set;for(const d of n??[]){if(typeof d=="string"){const E=s.get(d);E!==void 0&&!u.has(d)&&(u.add(d),o.push({kind:"single",index:E}));continue}const[h,p]=d,m=s.get(h),g=s.get(p),x=m!==void 0&&!u.has(h),b=g!==void 0&&!u.has(p);x&&b?(u.add(h),u.add(p),o.push({kind:"pair",indices:[m,g]})):x?(u.add(h),o.push({kind:"single",index:m})):b&&(u.add(p),o.push({kind:"single",index:g}))}for(const d of l)u.has(d)||(u.add(d),o.push({kind:"single",index:s.get(d)}));return o}function vv({items:n,rows:l}){return f.jsx("div",{className:Pf,children:l.map(s=>s.kind==="pair"?f.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[n[s.indices[0]],n[s.indices[1]]]},`p${s.indices[0]}`):f.jsx("div",{children:n[s.index]},`s${s.index}`))})}function nf(n){var d;const l=n.crop,s=l!=null&&l.aspect&&l.aspect>0?l.aspect:16/10,o=(d=l==null?void 0:l.mobile)==null?void 0:d.aspect,u=o&&o>0&&Math.abs(o-s)>1e-4?o:void 0;return{mode:(l==null?void 0:l.mode)==="free"?"free":"locked",aspect:s,aspectLabel:l==null?void 0:l.aspectLabel,mobileAspect:u}}function O4(n,l){if(!n||!l)return{nx:0,ny:0,nw:1,nh:1};const s=Math.min(1,l/n),o=Math.min(1,n/l);return{nx:(1-s)/2,ny:(1-o)/2,nw:s,nh:o}}function xv(n,l,s){return n==="free"?{nx:0,ny:0,nw:1,nh:1}:O4(l,s)}function lb(n,l,s){const o=n.nx+n.nw/2,u=n.ny+n.nh/2;if(!l||!s)return{...n};const d=l/s;let h=n.nw,p=h/d;return p>n.nh&&(p=n.nh,h=p*d),{nx:o-h/2,ny:u-p/2,nw:h,nh:p}}function _v(n){const l=s=>Math.round(s*1e4)/1e4;return l(n.nx)===0&&l(n.ny)===0&&l(n.nw)===1&&l(n.nh)===1}function R4(n,l,s,o){const u=n==null?void 0:n.rect;return u&&u.nw&&u.nh?{nx:u.nx,ny:u.ny,nw:u.nw,nh:u.nh}:xv(l,s,o)}const Fa=52,z4=1,D4=6,U4=.94,Rt=(n,l,s)=>s<l?l:Math.max(l,Math.min(s,n));function Vr(n,l,s,o,u,d,h){n=Math.max(Fa,n);const p=u>0?h.r-s:s-h.l;n=Math.min(n,p);let m=n/l;const g=d>0?h.b-o:o-h.t;return m>g&&(m=g,n=m*l),{w:Math.max(Fa,n),h:Math.max(Fa,n/l)}}function L4({src:n,mode:l,aspect:s,seed:o}){const u=_.useRef(null),[,d]=_.useReducer(U=>U+1,0),h=_.useRef(null),p=_.useRef({w:0,h:0}),m=_.useRef({z:1,icx:0,icy:0}),g=_.useRef({x:0,y:0,w:0,h:0}),x=_.useRef(!1),b=_.useRef(o??null),[E,j]=_.useState(null),T=()=>{const U=h.current,H=p.current;if(!U||!H.w)return{w:0,h:0};const $=Math.min(H.w/U.w,H.h/U.h)*U4;return{w:U.w*$,h:U.h*$}},C=()=>{const U=T(),H=m.current,$=U.w*H.z,w=U.h*H.z;return{l:H.icx-$/2,t:H.icy-w/2,r:H.icx+$/2,b:H.icy+w/2,w:$,h:w}},M=()=>{const U=C(),H=p.current;return{l:Math.max(U.l,0),t:Math.max(U.t,0),r:Math.min(U.r,H.w),b:Math.min(U.b,H.h)}},R=()=>{const U=C(),H=g.current,$=m.current,w=U.w/2,F=U.h/2;U.w>=H.w&&($.icx=Rt($.icx,H.x+H.w-w,H.x+w)),U.h>=H.h&&($.icy=Rt($.icy,H.y+H.h-F,H.y+F))},D=()=>{const U=g.current,H=M(),$=H.r-H.l,w=H.b-H.t;if(l==="locked"){let F=Math.min(U.w,$),ce=F/s;ce>w&&(ce=w,F=ce*s),U.w=F,U.h=ce}else U.w=Math.min(U.w,$),U.h=Math.min(U.h,w);U.x=Rt(U.x,H.l,H.r-U.w),U.y=Rt(U.y,H.t,H.b-U.h)},z=()=>{D(),R(),D()},I=U=>{const H=p.current;if(!H.w||!h.current)return;m.current={z:1,icx:H.w/2,icy:H.h/2};const $=C(),w=h.current.w/h.current.h,F=U?R4(b.current,l,w,s):xv(l,w,s);g.current={x:$.l+F.nx*$.w,y:$.t+F.ny*$.h,w:F.nw*$.w,h:F.nh*$.h},z(),x.current=!0,d()};_.useEffect(()=>{x.current=!1,h.current=null,d();const U=new Image;U.onload=()=>{h.current={w:U.naturalWidth||1,h:U.naturalHeight||1},I(!0)},U.src=n},[n]),_.useEffect(()=>{b.current=o??null},[o]),_.useEffect(()=>{h.current&&I(!1)},[l,s]),_.useLayoutEffect(()=>{const U=u.current;if(!U)return;const H=()=>{const w=U.getBoundingClientRect(),F=p.current.w;p.current={w:w.width,h:w.height},!F&&h.current?I(!0):F&&(z(),d())};H();const $=new ResizeObserver(H);return $.observe(U),()=>$.disconnect()},[]);const le=U=>{const H=u.current.getBoundingClientRect();return{x:U.clientX-H.left,y:U.clientY-H.top}},ne=U=>{var ce,ee;if(U.button)return;U.stopPropagation(),(ee=(ce=U.currentTarget).setPointerCapture)==null||ee.call(ce,U.pointerId),j("move");const H=le(U),$={...g.current},w=G=>{const S=le(G),q=M(),Y=g.current;Y.x=Rt($.x+(S.x-H.x),q.l,q.r-Y.w),Y.y=Rt($.y+(S.y-H.y),q.t,q.b-Y.h),d()},F=()=>{window.removeEventListener("pointermove",w),window.removeEventListener("pointerup",F),window.removeEventListener("pointercancel",F),j(null)};window.addEventListener("pointermove",w),window.addEventListener("pointerup",F),window.addEventListener("pointercancel",F)},W=U=>H=>{var G,S;if(H.button)return;H.stopPropagation(),(S=(G=H.currentTarget).setPointerCapture)==null||S.call(G,H.pointerId),j(U);const $=g.current,w={l:$.x,t:$.y,r:$.x+$.w,b:$.y+$.h},F=le(H),ce=q=>{const Y=le(q),N=M(),P=Y.x-F.x,Q=Y.y-F.y;let Z=w.l,pe=w.t,ge=w.r,Ee=w.b;if(l==="free")U.includes("w")&&(Z=Rt(w.l+P,N.l,ge-Fa)),U.includes("e")&&(ge=Rt(w.r+P,Z+Fa,N.r)),U.includes("n")&&(pe=Rt(w.t+Q,N.t,Ee-Fa)),U.includes("s")&&(Ee=Rt(w.b+Q,pe+Fa,N.b));else{const Re=s;if(U==="se"){const Ue=Vr(w.r+P-w.l,Re,w.l,w.t,1,1,N);Z=w.l,pe=w.t,ge=Z+Ue.w,Ee=pe+Ue.h}else if(U==="nw"){const Ue=Vr(w.r-(w.l+P),Re,w.r,w.b,-1,-1,N);ge=w.r,Ee=w.b,Z=ge-Ue.w,pe=Ee-Ue.h}else if(U==="ne"){const Ue=Vr(w.r+P-w.l,Re,w.l,w.b,1,-1,N);Z=w.l,Ee=w.b,ge=Z+Ue.w,pe=Ee-Ue.h}else if(U==="sw"){const Ue=Vr(w.r-(w.l+P),Re,w.r,w.t,-1,1,N);ge=w.r,pe=w.t,Z=ge-Ue.w,Ee=pe+Ue.h}else{const Ue=(w.l+w.r)/2,nt=(w.t+w.b)/2;let Ye=$.w,Te=$.h;U==="e"?Ye=(w.r+P-Ue)*2:U==="w"?Ye=(Ue-(w.l+P))*2:U==="s"?(Te=(w.b+Q-nt)*2,Ye=Te*Re):U==="n"&&(Te=(nt-(w.t+Q))*2,Ye=Te*Re),Ye=Math.max(Fa,Ye),Te=Ye/Re,Ye=Math.min(Ye,N.r-N.l),Te=Ye/Re,Te>N.b-N.t&&(Te=N.b-N.t,Ye=Te*Re),Z=Rt(Ue-Ye/2,N.l,N.r-Ye),pe=Rt(nt-Te/2,N.t,N.b-Te),ge=Z+Ye,Ee=pe+Te}}g.current={x:Z,y:pe,w:ge-Z,h:Ee-pe},d()},ee=()=>{window.removeEventListener("pointermove",ce),window.removeEventListener("pointerup",ee),window.removeEventListener("pointercancel",ee),j(null)};window.addEventListener("pointermove",ce),window.addEventListener("pointerup",ee),window.addEventListener("pointercancel",ee)},L=(U,H,$)=>{const w=m.current;U=Rt(U,z4,D4);const F=U/w.z;w.icx=H+(w.icx-H)*F,w.icy=$+(w.icy-$)*F,w.z=U,z(),d()},ue=U=>{const H=p.current;L(m.current.z*U,H.w/2,H.h/2)},de=_.useRef(()=>{});de.current=U=>{U.preventDefault();const H=p.current,$=Math.exp(-U.deltaY*.0015*(U.ctrlKey?2.6:1));L(m.current.z*$,H.w/2,H.h/2)},_.useEffect(()=>{const U=u.current;if(!U)return;const H=$=>de.current($);return U.addEventListener("wheel",H,{passive:!1}),()=>U.removeEventListener("wheel",H)},[]);const re=()=>I(!1),ie=()=>{const U=C(),H=g.current;return U.w?{nx:Rt((H.x-U.l)/U.w,0,1),ny:Rt((H.y-U.t)/U.h,0,1),nw:Rt(H.w/U.w,0,1),nh:Rt(H.h/U.h,0,1)}:{nx:0,ny:0,nw:1,nh:1}};return{stageRef:u,ready:x.current,activeHandle:E,imgRect:C,box:g.current,view:m.current,onBoxDown:ne,onHandleDown:W,zoomBy:ue,reset:re,cropValue:ie,natAspect:h.current?h.current.w/h.current.h:null}}function B4({chrome:n,pct:l,onZoomOut:s,onZoomIn:o,resetSlot:u,children:d}){return f.jsxs("div",{className:n.foot,children:[f.jsxs("div",{className:"flex items-center gap-3",children:[u,f.jsxs("div",{className:"flex h-9 items-center overflow-hidden rounded-[9px] border border-line",children:[f.jsx("button",{type:"button",className:"grid size-9 place-items-center text-ink-2 hover:bg-[#f1f0ea] hover:text-ink",onClick:s,"aria-label":"Zoom out",children:f.jsx(n.ZoomOutIcon,{})}),f.jsx("span",{className:"grid h-9 min-w-[54px] place-items-center border-x border-line font-mono text-[12px] text-ink-2",children:l}),f.jsx("button",{type:"button",className:"grid size-9 place-items-center text-ink-2 hover:bg-[#f1f0ea] hover:text-ink",onClick:o,"aria-label":"Zoom in",children:f.jsx(n.ZoomInIcon,{})})]})]}),f.jsx("div",{className:n.actions,children:d})]})}const H4=["n","s","e","w"],q4=["nw","ne","sw","se"];function G4({cr:n,mode:l,src:s,stageClassName:o}){const u=n.imgRect(),d=n.box,h=n.activeHandle!==null;return f.jsx("div",{className:`we-cs-stage ${o}`,ref:n.stageRef,children:n.ready&&f.jsxs(f.Fragment,{children:[f.jsx("img",{className:"we-cs-img",src:s,alt:"",draggable:!1,style:{left:u.l,top:u.t,width:u.w,height:u.h}}),f.jsxs("div",{className:`we-cs-box${h?" live":""}`,"data-mode":l,"data-crop-box":!0,style:{left:d.x,top:d.y,width:d.w,height:d.h},onPointerDown:n.onBoxDown,children:[f.jsx("div",{className:"we-cs-ring"}),f.jsxs("div",{className:"we-cs-thirds",children:[f.jsx("i",{}),f.jsx("i",{}),f.jsx("i",{}),f.jsx("i",{})]}),H4.map(p=>f.jsx("div",{"data-crop-handle":p,className:`we-cs-h edge ${p}`,onPointerDown:n.onHandleDown(p)},p)),q4.map(p=>f.jsx("div",{"data-crop-handle":p,className:`we-cs-h corner ${p}`,onPointerDown:n.onHandleDown(p)},p))]})]})})}const I4=_.forwardRef(function({chrome:l,src:s,mode:o,aspect:u,seed:d,stageClassName:h="h-[412px]",footerActions:p,onUserEdit:m},g){const x=L4({src:s,mode:o,aspect:u,seed:d});_.useImperativeHandle(g,()=>({cropValue:()=>x.cropValue(),natAspect:()=>x.natAspect}),[x]);const b=Math.round(x.view.z*100)+"%",E=_.useRef(!1),j=_.useRef(!1),T=()=>{j.current=!0},C=()=>{j.current&&!E.current&&(E.current=!0,m==null||m())},M=()=>{j.current=!1};return f.jsxs(f.Fragment,{children:[f.jsx("div",{onPointerDownCapture:T,onPointerMoveCapture:C,onPointerUpCapture:M,children:f.jsx(G4,{cr:x,mode:o,src:s,stageClassName:h})}),f.jsx(B4,{chrome:l,pct:b,onZoomOut:()=>x.zoomBy(1/1.25),onZoomIn:()=>x.zoomBy(1.25),resetSlot:f.jsx("button",{type:"button",className:l.buttonLink,onClick:x.reset,children:"Reset"}),children:p})]})});function ib(...n){return Kf(Qf(n))}function Q4({view:n,onChange:l,className:s}){const o=(u,d,h)=>f.jsx("button",{type:"button","aria-label":d,"aria-pressed":n===u,onClick:()=>l(u),className:ib("flex h-7 w-8 items-center justify-center rounded-[6px] transition-[background,color] duration-[120ms]",n===u?"bg-white text-ink shadow-sm":"text-white/85 hover:text-white"),children:f.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:f.jsx("path",{d:h})})});return f.jsxs("div",{className:ib("inline-flex gap-0.5 rounded-[8px] bg-[rgba(15,18,9,0.55)] p-0.5 backdrop-blur",s),children:[o("desktop","Desktop crop","M3 5h18v11H3zM8 20h8M12 16v4"),o("mobile","Mobile crop","M8 3h8a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zM11 18h2")]})}function nh({chrome:n,open:l=!0,src:s,mode:o,aspect:u,mobileAspect:d,seed:h,mobileSeed:p,onApply:m,onClose:g,title:x="Crop photo",subtitle:b,variant:E="crop",stageClassName:j="h-[412px]"}){const[T]=_.useState(s),C=d!=null&&Math.abs(d-u)>1e-4,[M,R]=_.useState("desktop"),[D,z]=_.useState({desktop:(h==null?void 0:h.rect)??null,mobile:(p==null?void 0:p.rect)??null}),I=_.useRef(!(p!=null&&p.rect)),le=_.useRef(null),ne=U=>U==="mobile"?d??u:u,W=()=>{var U;return((U=le.current)==null?void 0:U.natAspect())??u},L=U=>U==="desktop"?{rect:D.desktop}:{rect:D.mobile??D.desktop},ue=()=>{var U;return((U=le.current)==null?void 0:U.cropValue())??null},de=U=>{if(U===M)return;const H=ue();z($=>{const w={...$,[M]:H??$[M]};if(M==="desktop"&&I.current){const F=w.desktop??H;F&&(w.mobile=lb(F,d??u,W()))}return w}),R(U)},re=()=>{M==="mobile"&&(I.current=!1)},ie=()=>{const U=ue(),H=W(),$=(M==="desktop"?U:D.desktop)??U??{nx:0,ny:0,nw:1,nh:1};let w={rect:$,ar:H};if(C){let F=M==="mobile"?U:D.mobile;F||(F=lb($,d??u,H)),w={...w,mobile:{rect:F,derived:I.current}}}m(w)};return f.jsxs(n.Shell,{open:l,variant:E,onClose:g,children:[f.jsxs("div",{className:n.head,children:[f.jsxs("div",{className:n.titles,children:[f.jsx("h2",{className:n.title,children:x}),b?f.jsx("span",{className:n.subtitle,children:b}):null]}),f.jsx("button",{className:n.close,onClick:g,"aria-label":"Close",children:f.jsx(n.CloseIcon,{})})]}),f.jsxs("div",{className:"relative",children:[C&&f.jsx(Q4,{view:M,onChange:de,className:"absolute right-3 top-3 z-10"}),f.jsx(I4,{ref:le,chrome:n,src:T,mode:o,aspect:ne(M),seed:L(M),stageClassName:j,onUserEdit:re,footerActions:f.jsxs(f.Fragment,{children:[f.jsx("button",{className:n.buttonGhost,onClick:g,children:"Cancel"}),f.jsx("button",{className:n.buttonPrimary,onClick:ie,children:"Apply crop"})]})},M)]})]})}function V4(n,l,s){return{nx:n.x/l,ny:n.y/s,nw:n.w/l,nh:n.h/s}}function Y4(n,l,s){return{x:n.nx*l,y:n.ny*s,w:n.nw*l,h:n.nh*s}}function K4(n,l,s,o){const u=Math.max(o,Math.min(n.w,l)),d=Math.max(o,Math.min(n.h,s)),h=Math.max(0,Math.min(n.x,l-u)),p=Math.max(0,Math.min(n.y,s-d));return{x:h,y:p,w:u,h:d}}function $4(n,l,s,o){return K4(Y4(n,l,s),l,s,o)}var Wl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ul,Za,Yi,s0,X4=(s0=class extends Wl{constructor(){super();be(this,Ul);be(this,Za);be(this,Yi);fe(this,Yi,l=>{if(typeof window<"u"&&window.addEventListener){const s=()=>l();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){k(this,Za)||this.setEventListener(k(this,Yi))}onUnsubscribe(){var l;this.hasListeners()||((l=k(this,Za))==null||l.call(this),fe(this,Za,void 0))}setEventListener(l){var s;fe(this,Yi,l),(s=k(this,Za))==null||s.call(this),fe(this,Za,l(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(l){k(this,Ul)!==l&&(fe(this,Ul,l),this.onFocus())}onFocus(){const l=this.isFocused();this.listeners.forEach(s=>{s(l)})}isFocused(){var l;return typeof k(this,Ul)=="boolean"?k(this,Ul):((l=globalThis.document)==null?void 0:l.visibilityState)!=="hidden"}},Ul=new WeakMap,Za=new WeakMap,Yi=new WeakMap,s0),ah=new X4,F4={setTimeout:(n,l)=>setTimeout(n,l),clearTimeout:n=>clearTimeout(n),setInterval:(n,l)=>setInterval(n,l),clearInterval:n=>clearInterval(n)},Pa,Bf,o0,Z4=(o0=class{constructor(){be(this,Pa,F4);be(this,Bf,!1)}setTimeoutProvider(n){fe(this,Pa,n)}setTimeout(n,l){return k(this,Pa).setTimeout(n,l)}clearTimeout(n){k(this,Pa).clearTimeout(n)}setInterval(n,l){return k(this,Pa).setInterval(n,l)}clearInterval(n){k(this,Pa).clearInterval(n)}},Pa=new WeakMap,Bf=new WeakMap,o0),zl=new Z4;function P4(n){setTimeout(n,0)}var J4=typeof window>"u"||"Deno"in globalThis;function qt(){}function W4(n,l){return typeof n=="function"?n(l):n}function af(n){return typeof n=="number"&&n>=0&&n!==1/0}function wv(n,l){return Math.max(n+(l||0)-Date.now(),0)}function sl(n,l){return typeof n=="function"?n(l):n}function fn(n,l){return typeof n=="function"?n(l):n}function sb(n,l){const{type:s="all",exact:o,fetchStatus:u,predicate:d,queryKey:h,stale:p}=n;if(h){if(o){if(l.queryHash!==lh(h,l.options))return!1}else if(!os(l.queryKey,h))return!1}if(s!=="all"){const m=l.isActive();if(s==="active"&&!m||s==="inactive"&&m)return!1}return!(typeof p=="boolean"&&l.isStale()!==p||u&&u!==l.state.fetchStatus||d&&!d(l))}function ob(n,l){const{exact:s,status:o,predicate:u,mutationKey:d}=n;if(d){if(!l.options.mutationKey)return!1;if(s){if(Fl(l.options.mutationKey)!==Fl(d))return!1}else if(!os(l.options.mutationKey,d))return!1}return!(o&&l.state.status!==o||u&&!u(l))}function lh(n,l){return((l==null?void 0:l.queryKeyHashFn)||Fl)(n)}function Fl(n){return JSON.stringify(n,(l,s)=>lf(s)?Object.keys(s).sort().reduce((o,u)=>(o[u]=s[u],o),{}):s)}function os(n,l){if(n===l)return!0;if(typeof n!=typeof l)return!1;if(n&&l&&typeof n=="object"&&typeof l=="object"){if(Array.isArray(n)&&Array.isArray(l)){for(let o=0;o<l.length;o++)if(!os(n[o],l[o]))return!1;return!0}const s=Object.keys(l);for(const o of s)if(!os(n[o],l[o]))return!1;return!0}return!1}var eE=Object.prototype.hasOwnProperty;function ih(n,l,s=0){if(n===l)return n;if(s>500)return l;const o=rb(n)&&rb(l);if(!o&&!(lf(n)&&lf(l)))return l;const d=(o?n:Object.keys(n)).length,h=o?l:Object.keys(l),p=h.length,m=o?new Array(p):{};let g=0;for(let x=0;x<p;x++){const b=o?x:h[x],E=n[b],j=l[b];if(E===j){m[b]=E,(o?x<d:eE.call(n,b))&&g++;continue}if(E===null||j===null||typeof E!="object"||typeof j!="object"){m[b]=j;continue}const T=ih(E,j,s+1);m[b]=T,T===E&&g++}return d===p&&g===d?n:m}function oo(n,l){if(!l||Object.keys(n).length!==Object.keys(l).length)return!1;for(const s in n)if(n[s]!==l[s])return!1;return!0}function rb(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function lf(n){if(!cb(n))return!1;const l=n.constructor;if(l===void 0)return!0;const s=l.prototype;return!(!cb(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function cb(n){return Object.prototype.toString.call(n)==="[object Object]"}function tE(n){return new Promise(l=>{zl.setTimeout(l,n)})}function sf(n,l,s){return typeof s.structuralSharing=="function"?s.structuralSharing(n,l):s.structuralSharing!==!1?ih(n,l):l}function nE(n,l,s=0){const o=[...n,l];return s&&o.length>s?o.slice(1):o}function aE(n,l,s=0){const o=[l,...n];return s&&o.length>s?o.slice(0,-1):o}var sh=Symbol();function Sv(n,l){return!n.queryFn&&(l!=null&&l.initialPromise)?()=>l.initialPromise:!n.queryFn||n.queryFn===sh?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function oh(n,l){return typeof n=="function"?n(...l):!!n}function lE(n,l,s){let o=!1,u;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(u??(u=l()),o||(o=!0,u.aborted?s():u.addEventListener("abort",s,{once:!0})),u)}),n}var ro=(()=>{let n=()=>J4;return{isServer(){return n()},setIsServer(l){n=l}}})();function of(){let n,l;const s=new Promise((u,d)=>{n=u,l=d});s.status="pending",s.catch(()=>{});function o(u){Object.assign(s,u),delete s.resolve,delete s.reject}return s.resolve=u=>{o({status:"fulfilled",value:u}),n(u)},s.reject=u=>{o({status:"rejected",reason:u}),l(u)},s}var iE=P4;function sE(){let n=[],l=0,s=p=>{p()},o=p=>{p()},u=iE;const d=p=>{l?n.push(p):u(()=>{s(p)})},h=()=>{const p=n;n=[],p.length&&u(()=>{o(()=>{p.forEach(m=>{s(m)})})})};return{batch:p=>{let m;l++;try{m=p()}finally{l--,l||h()}return m},batchCalls:p=>(...m)=>{d(()=>{p(...m)})},schedule:d,setNotifyFunction:p=>{s=p},setBatchNotifyFunction:p=>{o=p},setScheduler:p=>{u=p}}}var ht=sE(),Ki,Ja,$i,r0,oE=(r0=class extends Wl{constructor(){super();be(this,Ki,!0);be(this,Ja);be(this,$i);fe(this,$i,l=>{if(typeof window<"u"&&window.addEventListener){const s=()=>l(!0),o=()=>l(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",o)}}})}onSubscribe(){k(this,Ja)||this.setEventListener(k(this,$i))}onUnsubscribe(){var l;this.hasListeners()||((l=k(this,Ja))==null||l.call(this),fe(this,Ja,void 0))}setEventListener(l){var s;fe(this,$i,l),(s=k(this,Ja))==null||s.call(this),fe(this,Ja,l(this.setOnline.bind(this)))}setOnline(l){k(this,Ki)!==l&&(fe(this,Ki,l),this.listeners.forEach(o=>{o(l)}))}isOnline(){return k(this,Ki)}},Ki=new WeakMap,Ja=new WeakMap,$i=new WeakMap,r0),tc=new oE;function rE(n){return Math.min(1e3*2**n,3e4)}function kv(n){return(n??"online")==="online"?tc.isOnline():!0}var rf=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function Ev(n){let l=!1,s=0,o;const u=of(),d=()=>u.status!=="pending",h=C=>{var M;if(!d()){const R=new rf(C);E(R),(M=n.onCancel)==null||M.call(n,R)}},p=()=>{l=!0},m=()=>{l=!1},g=()=>ah.isFocused()&&(n.networkMode==="always"||tc.isOnline())&&n.canRun(),x=()=>kv(n.networkMode)&&n.canRun(),b=C=>{d()||(o==null||o(),u.resolve(C))},E=C=>{d()||(o==null||o(),u.reject(C))},j=()=>new Promise(C=>{var M;o=R=>{(d()||g())&&C(R)},(M=n.onPause)==null||M.call(n)}).then(()=>{var C;o=void 0,d()||(C=n.onContinue)==null||C.call(n)}),T=()=>{if(d())return;let C;const M=s===0?n.initialPromise:void 0;try{C=M??n.fn()}catch(R){C=Promise.reject(R)}Promise.resolve(C).then(b).catch(R=>{var ne;if(d())return;const D=n.retry??(ro.isServer()?0:3),z=n.retryDelay??rE,I=typeof z=="function"?z(s,R):z,le=D===!0||typeof D=="number"&&s<D||typeof D=="function"&&D(s,R);if(l||!le){E(R);return}s++,(ne=n.onFail)==null||ne.call(n,s,R),tE(I).then(()=>g()?void 0:j()).then(()=>{l?E(R):T()})})};return{promise:u,status:()=>u.status,cancel:h,continue:()=>(o==null||o(),u),cancelRetry:p,continueRetry:m,canStart:x,start:()=>(x()?T():j().then(T),u)}}var Ll,c0,jv=(c0=class{constructor(){be(this,Ll)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),af(this.gcTime)&&fe(this,Ll,zl.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(ro.isServer()?1/0:300*1e3))}clearGcTimeout(){k(this,Ll)!==void 0&&(zl.clearTimeout(k(this,Ll)),fe(this,Ll,void 0))}},Ll=new WeakMap,c0);function cE(n){return{onFetch:(l,s)=>{var x,b,E,j,T;const o=l.options,u=(E=(b=(x=l.fetchOptions)==null?void 0:x.meta)==null?void 0:b.fetchMore)==null?void 0:E.direction,d=((j=l.state.data)==null?void 0:j.pages)||[],h=((T=l.state.data)==null?void 0:T.pageParams)||[];let p={pages:[],pageParams:[]},m=0;const g=async()=>{let C=!1;const M=z=>{lE(z,()=>l.signal,()=>C=!0)},R=Sv(l.options,l.fetchOptions),D=async(z,I,le)=>{if(C)return Promise.reject(l.signal.reason);if(I==null&&z.pages.length)return Promise.resolve(z);const W=(()=>{const re={client:l.client,queryKey:l.queryKey,pageParam:I,direction:le?"backward":"forward",meta:l.options.meta};return M(re),re})(),L=await R(W),{maxPages:ue}=l.options,de=le?aE:nE;return{pages:de(z.pages,L,ue),pageParams:de(z.pageParams,I,ue)}};if(u&&d.length){const z=u==="backward",I=z?uE:ub,le={pages:d,pageParams:h},ne=I(o,le);p=await D(le,ne,z)}else{const z=n??d.length;do{const I=m===0?h[0]??o.initialPageParam:ub(o,p);if(m>0&&I==null)break;p=await D(p,I),m++}while(m<z)}return p};l.options.persister?l.fetchFn=()=>{var C,M;return(M=(C=l.options).persister)==null?void 0:M.call(C,g,{client:l.client,queryKey:l.queryKey,meta:l.options.meta,signal:l.signal},s)}:l.fetchFn=g}}}function ub(n,{pages:l,pageParams:s}){const o=l.length-1;return l.length>0?n.getNextPageParam(l[o],l,s[o],s):void 0}function uE(n,{pages:l,pageParams:s}){var o;return l.length>0?(o=n.getPreviousPageParam)==null?void 0:o.call(n,l[0],l,s[0],s):void 0}var Xi,Bl,Fi,kn,Hl,Mt,co,ql,dn,Mv,fa,u0,dE=(u0=class extends jv{constructor(l){super();be(this,dn);be(this,Xi);be(this,Bl);be(this,Fi);be(this,kn);be(this,Hl);be(this,Mt);be(this,co);be(this,ql);fe(this,ql,!1),fe(this,co,l.defaultOptions),this.setOptions(l.options),this.observers=[],fe(this,Hl,l.client),fe(this,kn,k(this,Hl).getQueryCache()),this.queryKey=l.queryKey,this.queryHash=l.queryHash,fe(this,Bl,fb(this.options)),this.state=l.state??k(this,Bl),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return k(this,Xi)}get promise(){var l;return(l=k(this,Mt))==null?void 0:l.promise}setOptions(l){if(this.options={...k(this,co),...l},l!=null&&l._type&&fe(this,Xi,l._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const s=fb(this.options);s.data!==void 0&&(this.setState(db(s.data,s.dataUpdatedAt)),fe(this,Bl,s))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&k(this,kn).remove(this)}setData(l,s){const o=sf(this.state.data,l,this.options);return je(this,dn,fa).call(this,{data:o,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),o}setState(l){je(this,dn,fa).call(this,{type:"setState",state:l})}cancel(l){var o,u;const s=(o=k(this,Mt))==null?void 0:o.promise;return(u=k(this,Mt))==null||u.cancel(l),s?s.then(qt).catch(qt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return k(this,Bl)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(l=>fn(l.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===sh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(l=>sl(l.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(l=>l.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(l=0){return this.state.data===void 0?!0:l==="static"?!1:this.state.isInvalidated?!0:!wv(this.state.dataUpdatedAt,l)}onFocus(){var s;const l=this.observers.find(o=>o.shouldFetchOnWindowFocus());l==null||l.refetch({cancelRefetch:!1}),(s=k(this,Mt))==null||s.continue()}onOnline(){var s;const l=this.observers.find(o=>o.shouldFetchOnReconnect());l==null||l.refetch({cancelRefetch:!1}),(s=k(this,Mt))==null||s.continue()}addObserver(l){this.observers.includes(l)||(this.observers.push(l),this.clearGcTimeout(),k(this,kn).notify({type:"observerAdded",query:this,observer:l}))}removeObserver(l){this.observers.includes(l)&&(this.observers=this.observers.filter(s=>s!==l),this.observers.length||(k(this,Mt)&&(k(this,ql)||je(this,dn,Mv).call(this)?k(this,Mt).cancel({revert:!0}):k(this,Mt).cancelRetry()),this.scheduleGc()),k(this,kn).notify({type:"observerRemoved",query:this,observer:l}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||je(this,dn,fa).call(this,{type:"invalidate"})}async fetch(l,s){var g,x,b,E,j,T,C,M,R,D,z;if(this.state.fetchStatus!=="idle"&&((g=k(this,Mt))==null?void 0:g.status())!=="rejected"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(k(this,Mt))return k(this,Mt).continueRetry(),k(this,Mt).promise}if(l&&this.setOptions(l),!this.options.queryFn){const I=this.observers.find(le=>le.options.queryFn);I&&this.setOptions(I.options)}const o=new AbortController,u=I=>{Object.defineProperty(I,"signal",{enumerable:!0,get:()=>(fe(this,ql,!0),o.signal)})},d=()=>{const I=Sv(this.options,s),ne=(()=>{const W={client:k(this,Hl),queryKey:this.queryKey,meta:this.meta};return u(W),W})();return fe(this,ql,!1),this.options.persister?this.options.persister(I,ne,this):I(ne)},p=(()=>{const I={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:k(this,Hl),state:this.state,fetchFn:d};return u(I),I})(),m=k(this,Xi)==="infinite"?cE(this.options.pages):this.options.behavior;m==null||m.onFetch(p,this),fe(this,Fi,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((x=p.fetchOptions)==null?void 0:x.meta))&&je(this,dn,fa).call(this,{type:"fetch",meta:(b=p.fetchOptions)==null?void 0:b.meta}),fe(this,Mt,Ev({initialPromise:s==null?void 0:s.initialPromise,fn:p.fetchFn,onCancel:I=>{I instanceof rf&&I.revert&&this.setState({...k(this,Fi),fetchStatus:"idle"}),o.abort()},onFail:(I,le)=>{je(this,dn,fa).call(this,{type:"failed",failureCount:I,error:le})},onPause:()=>{je(this,dn,fa).call(this,{type:"pause"})},onContinue:()=>{je(this,dn,fa).call(this,{type:"continue"})},retry:p.options.retry,retryDelay:p.options.retryDelay,networkMode:p.options.networkMode,canRun:()=>!0}));try{const I=await k(this,Mt).start();if(I===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(I),(j=(E=k(this,kn).config).onSuccess)==null||j.call(E,I,this),(C=(T=k(this,kn).config).onSettled)==null||C.call(T,I,this.state.error,this),I}catch(I){if(I instanceof rf){if(I.silent)return k(this,Mt).promise;if(I.revert){if(this.state.data===void 0)throw I;return this.state.data}}throw je(this,dn,fa).call(this,{type:"error",error:I}),(R=(M=k(this,kn).config).onError)==null||R.call(M,I,this),(z=(D=k(this,kn).config).onSettled)==null||z.call(D,this.state.data,I,this),I}finally{this.scheduleGc()}}},Xi=new WeakMap,Bl=new WeakMap,Fi=new WeakMap,kn=new WeakMap,Hl=new WeakMap,Mt=new WeakMap,co=new WeakMap,ql=new WeakMap,dn=new WeakSet,Mv=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},fa=function(l){const s=o=>{switch(l.type){case"failed":return{...o,fetchFailureCount:l.failureCount,fetchFailureReason:l.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...Cv(o.data,this.options),fetchMeta:l.meta??null};case"success":const u={...o,...db(l.data,l.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!l.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return fe(this,Fi,l.manual?u:void 0),u;case"error":const d=l.error;return{...o,error:d,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...l.state}}};this.state=s(this.state),ht.batch(()=>{this.observers.forEach(o=>{o.onQueryUpdate()}),k(this,kn).notify({query:this,type:"updated",action:l})})},u0);function Cv(n,l){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:kv(l.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function db(n,l){return{data:n,dataUpdatedAt:l??Date.now(),error:null,isInvalidated:!1,status:"success"}}function fb(n){const l=typeof n.initialData=="function"?n.initialData():n.initialData,s=l!==void 0,o=s?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:l,dataUpdateCount:0,dataUpdatedAt:s?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Pt,Ve,uo,Qt,Gl,Zi,ha,Wa,fo,Pi,Ji,Il,Ql,el,Wi,Fe,so,cf,uf,df,ff,hf,mf,pf,Av,d0,rh=(d0=class extends Wl{constructor(l,s){super();be(this,Fe);be(this,Pt);be(this,Ve);be(this,uo);be(this,Qt);be(this,Gl);be(this,Zi);be(this,ha);be(this,Wa);be(this,fo);be(this,Pi);be(this,Ji);be(this,Il);be(this,Ql);be(this,el);be(this,Wi,new Set);this.options=s,fe(this,Pt,l),fe(this,Wa,null),fe(this,ha,of()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(k(this,Ve).addObserver(this),hb(k(this,Ve),this.options)?je(this,Fe,so).call(this):this.updateResult(),je(this,Fe,ff).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return yf(k(this,Ve),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return yf(k(this,Ve),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,je(this,Fe,hf).call(this),je(this,Fe,mf).call(this),k(this,Ve).removeObserver(this)}setOptions(l){const s=this.options,o=k(this,Ve);if(this.options=k(this,Pt).defaultQueryOptions(l),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof fn(this.options.enabled,k(this,Ve))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");je(this,Fe,pf).call(this),k(this,Ve).setOptions(this.options),s._defaulted&&!oo(this.options,s)&&k(this,Pt).getQueryCache().notify({type:"observerOptionsUpdated",query:k(this,Ve),observer:this});const u=this.hasListeners();u&&mb(k(this,Ve),o,this.options,s)&&je(this,Fe,so).call(this),this.updateResult(),u&&(k(this,Ve)!==o||fn(this.options.enabled,k(this,Ve))!==fn(s.enabled,k(this,Ve))||sl(this.options.staleTime,k(this,Ve))!==sl(s.staleTime,k(this,Ve)))&&je(this,Fe,cf).call(this);const d=je(this,Fe,uf).call(this);u&&(k(this,Ve)!==o||fn(this.options.enabled,k(this,Ve))!==fn(s.enabled,k(this,Ve))||d!==k(this,el))&&je(this,Fe,df).call(this,d)}getOptimisticResult(l){const s=k(this,Pt).getQueryCache().build(k(this,Pt),l),o=this.createResult(s,l);return hE(this,o)&&(fe(this,Qt,o),fe(this,Zi,this.options),fe(this,Gl,k(this,Ve).state)),o}getCurrentResult(){return k(this,Qt)}trackResult(l,s){return new Proxy(l,{get:(o,u)=>(this.trackProp(u),s==null||s(u),u==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&k(this,ha).status==="pending"&&k(this,ha).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(o,u))})}trackProp(l){k(this,Wi).add(l)}getCurrentQuery(){return k(this,Ve)}refetch({...l}={}){return this.fetch({...l})}fetchOptimistic(l){const s=k(this,Pt).defaultQueryOptions(l),o=k(this,Pt).getQueryCache().build(k(this,Pt),s);return o.fetch().then(()=>this.createResult(o,s))}fetch(l){return je(this,Fe,so).call(this,{...l,cancelRefetch:l.cancelRefetch??!0}).then(()=>(this.updateResult(),k(this,Qt)))}createResult(l,s){var ue;const o=k(this,Ve),u=this.options,d=k(this,Qt),h=k(this,Gl),p=k(this,Zi),g=l!==o?l.state:k(this,uo),{state:x}=l;let b={...x},E=!1,j;if(s._optimisticResults){const de=this.hasListeners(),re=!de&&hb(l,s),ie=de&&mb(l,o,s,u);(re||ie)&&(b={...b,...Cv(x.data,l.options)}),s._optimisticResults==="isRestoring"&&(b.fetchStatus="idle")}let{error:T,errorUpdatedAt:C,status:M}=b;j=b.data;let R=!1;if(s.placeholderData!==void 0&&j===void 0&&M==="pending"){let de;d!=null&&d.isPlaceholderData&&s.placeholderData===(p==null?void 0:p.placeholderData)?(de=d.data,R=!0):de=typeof s.placeholderData=="function"?s.placeholderData((ue=k(this,Ji))==null?void 0:ue.state.data,k(this,Ji)):s.placeholderData,de!==void 0&&(M="success",j=sf(d==null?void 0:d.data,de,s),E=!0)}if(s.select&&j!==void 0&&!R)if(d&&j===(h==null?void 0:h.data)&&s.select===k(this,fo))j=k(this,Pi);else try{fe(this,fo,s.select),j=s.select(j),j=sf(d==null?void 0:d.data,j,s),fe(this,Pi,j),fe(this,Wa,null)}catch(de){fe(this,Wa,de)}k(this,Wa)&&(T=k(this,Wa),j=k(this,Pi),C=Date.now(),M="error");const D=b.fetchStatus==="fetching",z=M==="pending",I=M==="error",le=z&&D,ne=j!==void 0,L={status:M,fetchStatus:b.fetchStatus,isPending:z,isSuccess:M==="success",isError:I,isInitialLoading:le,isLoading:le,data:j,dataUpdatedAt:b.dataUpdatedAt,error:T,errorUpdatedAt:C,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:l.isFetched(),isFetchedAfterMount:b.dataUpdateCount>g.dataUpdateCount||b.errorUpdateCount>g.errorUpdateCount,isFetching:D,isRefetching:D&&!z,isLoadingError:I&&!ne,isPaused:b.fetchStatus==="paused",isPlaceholderData:E,isRefetchError:I&&ne,isStale:ch(l,s),refetch:this.refetch,promise:k(this,ha),isEnabled:fn(s.enabled,l)!==!1};if(this.options.experimental_prefetchInRender){const de=L.data!==void 0,re=L.status==="error"&&!de,ie=$=>{re?$.reject(L.error):de&&$.resolve(L.data)},U=()=>{const $=fe(this,ha,L.promise=of());ie($)},H=k(this,ha);switch(H.status){case"pending":l.queryHash===o.queryHash&&ie(H);break;case"fulfilled":(re||L.data!==H.value)&&U();break;case"rejected":(!re||L.error!==H.reason)&&U();break}}return L}updateResult(){const l=k(this,Qt),s=this.createResult(k(this,Ve),this.options);if(fe(this,Gl,k(this,Ve).state),fe(this,Zi,this.options),k(this,Gl).data!==void 0&&fe(this,Ji,k(this,Ve)),oo(s,l))return;fe(this,Qt,s);const o=()=>{if(!l)return!0;const{notifyOnChangeProps:u}=this.options,d=typeof u=="function"?u():u;if(d==="all"||!d&&!k(this,Wi).size)return!0;const h=new Set(d??k(this,Wi));return this.options.throwOnError&&h.add("error"),Object.keys(k(this,Qt)).some(p=>{const m=p;return k(this,Qt)[m]!==l[m]&&h.has(m)})};je(this,Fe,Av).call(this,{listeners:o()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&je(this,Fe,ff).call(this)}},Pt=new WeakMap,Ve=new WeakMap,uo=new WeakMap,Qt=new WeakMap,Gl=new WeakMap,Zi=new WeakMap,ha=new WeakMap,Wa=new WeakMap,fo=new WeakMap,Pi=new WeakMap,Ji=new WeakMap,Il=new WeakMap,Ql=new WeakMap,el=new WeakMap,Wi=new WeakMap,Fe=new WeakSet,so=function(l){je(this,Fe,pf).call(this);let s=k(this,Ve).fetch(this.options,l);return l!=null&&l.throwOnError||(s=s.catch(qt)),s},cf=function(){je(this,Fe,hf).call(this);const l=sl(this.options.staleTime,k(this,Ve));if(ro.isServer()||k(this,Qt).isStale||!af(l))return;const o=wv(k(this,Qt).dataUpdatedAt,l)+1;fe(this,Il,zl.setTimeout(()=>{k(this,Qt).isStale||this.updateResult()},o))},uf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(k(this,Ve)):this.options.refetchInterval)??!1},df=function(l){je(this,Fe,mf).call(this),fe(this,el,l),!(ro.isServer()||fn(this.options.enabled,k(this,Ve))===!1||!af(k(this,el))||k(this,el)===0)&&fe(this,Ql,zl.setInterval(()=>{(this.options.refetchIntervalInBackground||ah.isFocused())&&je(this,Fe,so).call(this)},k(this,el)))},ff=function(){je(this,Fe,cf).call(this),je(this,Fe,df).call(this,je(this,Fe,uf).call(this))},hf=function(){k(this,Il)!==void 0&&(zl.clearTimeout(k(this,Il)),fe(this,Il,void 0))},mf=function(){k(this,Ql)!==void 0&&(zl.clearInterval(k(this,Ql)),fe(this,Ql,void 0))},pf=function(){const l=k(this,Pt).getQueryCache().build(k(this,Pt),this.options);if(l===k(this,Ve))return;const s=k(this,Ve);fe(this,Ve,l),fe(this,uo,l.state),this.hasListeners()&&(s==null||s.removeObserver(this),l.addObserver(this))},Av=function(l){ht.batch(()=>{l.listeners&&this.listeners.forEach(s=>{s(k(this,Qt))}),k(this,Pt).getQueryCache().notify({query:k(this,Ve),type:"observerResultsUpdated"})})},d0);function fE(n,l){return fn(l.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&fn(l.retryOnMount,n)===!1)}function hb(n,l){return fE(n,l)||n.state.data!==void 0&&yf(n,l,l.refetchOnMount)}function yf(n,l,s){if(fn(l.enabled,n)!==!1&&sl(l.staleTime,n)!=="static"){const o=typeof s=="function"?s(n):s;return o==="always"||o!==!1&&ch(n,l)}return!1}function mb(n,l,s,o){return(n!==l||fn(o.enabled,n)===!1)&&(!s.suspense||n.state.status!=="error")&&ch(n,s)}function ch(n,l){return fn(l.enabled,n)!==!1&&n.isStaleByTime(sl(l.staleTime,n))}function hE(n,l){return!oo(n.getCurrentResult(),l)}var ho,qn,Ht,Vl,Gn,Xa,f0,mE=(f0=class extends jv{constructor(l){super();be(this,Gn);be(this,ho);be(this,qn);be(this,Ht);be(this,Vl);fe(this,ho,l.client),this.mutationId=l.mutationId,fe(this,Ht,l.mutationCache),fe(this,qn,[]),this.state=l.state||Nv(),this.setOptions(l.options),this.scheduleGc()}setOptions(l){this.options=l,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(l){k(this,qn).includes(l)||(k(this,qn).push(l),this.clearGcTimeout(),k(this,Ht).notify({type:"observerAdded",mutation:this,observer:l}))}removeObserver(l){fe(this,qn,k(this,qn).filter(s=>s!==l)),this.scheduleGc(),k(this,Ht).notify({type:"observerRemoved",mutation:this,observer:l})}optionalRemove(){k(this,qn).length||(this.state.status==="pending"?this.scheduleGc():k(this,Ht).remove(this))}continue(){var l;return((l=k(this,Vl))==null?void 0:l.continue())??this.execute(this.state.variables)}async execute(l){var h,p,m,g,x,b,E,j,T,C,M,R,D,z,I,le,ne,W;const s=()=>{je(this,Gn,Xa).call(this,{type:"continue"})},o={client:k(this,ho),meta:this.options.meta,mutationKey:this.options.mutationKey};fe(this,Vl,Ev({fn:()=>this.options.mutationFn?this.options.mutationFn(l,o):Promise.reject(new Error("No mutationFn found")),onFail:(L,ue)=>{je(this,Gn,Xa).call(this,{type:"failed",failureCount:L,error:ue})},onPause:()=>{je(this,Gn,Xa).call(this,{type:"pause"})},onContinue:s,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>k(this,Ht).canRun(this)}));const u=this.state.status==="pending",d=!k(this,Vl).canStart();try{if(u)s();else{je(this,Gn,Xa).call(this,{type:"pending",variables:l,isPaused:d}),k(this,Ht).config.onMutate&&await k(this,Ht).config.onMutate(l,this,o);const ue=await((p=(h=this.options).onMutate)==null?void 0:p.call(h,l,o));ue!==this.state.context&&je(this,Gn,Xa).call(this,{type:"pending",context:ue,variables:l,isPaused:d})}const L=await k(this,Vl).start();return await((g=(m=k(this,Ht).config).onSuccess)==null?void 0:g.call(m,L,l,this.state.context,this,o)),await((b=(x=this.options).onSuccess)==null?void 0:b.call(x,L,l,this.state.context,o)),await((j=(E=k(this,Ht).config).onSettled)==null?void 0:j.call(E,L,null,this.state.variables,this.state.context,this,o)),await((C=(T=this.options).onSettled)==null?void 0:C.call(T,L,null,l,this.state.context,o)),je(this,Gn,Xa).call(this,{type:"success",data:L}),L}catch(L){try{await((R=(M=k(this,Ht).config).onError)==null?void 0:R.call(M,L,l,this.state.context,this,o))}catch(ue){Promise.reject(ue)}try{await((z=(D=this.options).onError)==null?void 0:z.call(D,L,l,this.state.context,o))}catch(ue){Promise.reject(ue)}try{await((le=(I=k(this,Ht).config).onSettled)==null?void 0:le.call(I,void 0,L,this.state.variables,this.state.context,this,o))}catch(ue){Promise.reject(ue)}try{await((W=(ne=this.options).onSettled)==null?void 0:W.call(ne,void 0,L,l,this.state.context,o))}catch(ue){Promise.reject(ue)}throw je(this,Gn,Xa).call(this,{type:"error",error:L}),L}finally{k(this,Ht).runNext(this)}}},ho=new WeakMap,qn=new WeakMap,Ht=new WeakMap,Vl=new WeakMap,Gn=new WeakSet,Xa=function(l){const s=o=>{switch(l.type){case"failed":return{...o,failureCount:l.failureCount,failureReason:l.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:l.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:l.isPaused,status:"pending",variables:l.variables,submittedAt:Date.now()};case"success":return{...o,data:l.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:l.error,failureCount:o.failureCount+1,failureReason:l.error,isPaused:!1,status:"error"}}};this.state=s(this.state),ht.batch(()=>{k(this,qn).forEach(o=>{o.onMutationUpdate(l)}),k(this,Ht).notify({mutation:this,type:"updated",action:l})})},f0);function Nv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ma,Nn,mo,h0,pE=(h0=class extends Wl{constructor(l={}){super();be(this,ma);be(this,Nn);be(this,mo);this.config=l,fe(this,ma,new Set),fe(this,Nn,new Map),fe(this,mo,0)}build(l,s,o){const u=new mE({client:l,mutationCache:this,mutationId:++qr(this,mo)._,options:l.defaultMutationOptions(s),state:o});return this.add(u),u}add(l){k(this,ma).add(l);const s=Yr(l);if(typeof s=="string"){const o=k(this,Nn).get(s);o?o.push(l):k(this,Nn).set(s,[l])}this.notify({type:"added",mutation:l})}remove(l){if(k(this,ma).delete(l)){const s=Yr(l);if(typeof s=="string"){const o=k(this,Nn).get(s);if(o)if(o.length>1){const u=o.indexOf(l);u!==-1&&o.splice(u,1)}else o[0]===l&&k(this,Nn).delete(s)}}this.notify({type:"removed",mutation:l})}canRun(l){const s=Yr(l);if(typeof s=="string"){const o=k(this,Nn).get(s),u=o==null?void 0:o.find(d=>d.state.status==="pending");return!u||u===l}else return!0}runNext(l){var o;const s=Yr(l);if(typeof s=="string"){const u=(o=k(this,Nn).get(s))==null?void 0:o.find(d=>d!==l&&d.state.isPaused);return(u==null?void 0:u.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ht.batch(()=>{k(this,ma).forEach(l=>{this.notify({type:"removed",mutation:l})}),k(this,ma).clear(),k(this,Nn).clear()})}getAll(){return Array.from(k(this,ma))}find(l){const s={exact:!0,...l};return this.getAll().find(o=>ob(s,o))}findAll(l={}){return this.getAll().filter(s=>ob(l,s))}notify(l){ht.batch(()=>{this.listeners.forEach(s=>{s(l)})})}resumePausedMutations(){const l=this.getAll().filter(s=>s.state.isPaused);return ht.batch(()=>Promise.all(l.map(s=>s.continue().catch(qt))))}},ma=new WeakMap,Nn=new WeakMap,mo=new WeakMap,h0);function Yr(n){var l;return(l=n.options.scope)==null?void 0:l.id}var pa,tl,Jt,ya,ba,Pr,gf,m0,yE=(m0=class extends Wl{constructor(s,o){super();be(this,ba);be(this,pa);be(this,tl);be(this,Jt);be(this,ya);fe(this,pa,s),this.setOptions(o),this.bindMethods(),je(this,ba,Pr).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(s){var u;const o=this.options;this.options=k(this,pa).defaultMutationOptions(s),oo(this.options,o)||k(this,pa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:k(this,Jt),observer:this}),o!=null&&o.mutationKey&&this.options.mutationKey&&Fl(o.mutationKey)!==Fl(this.options.mutationKey)?this.reset():((u=k(this,Jt))==null?void 0:u.state.status)==="pending"&&k(this,Jt).setOptions(this.options)}onUnsubscribe(){var s;this.hasListeners()||(s=k(this,Jt))==null||s.removeObserver(this)}onMutationUpdate(s){je(this,ba,Pr).call(this),je(this,ba,gf).call(this,s)}getCurrentResult(){return k(this,tl)}reset(){var s;(s=k(this,Jt))==null||s.removeObserver(this),fe(this,Jt,void 0),je(this,ba,Pr).call(this),je(this,ba,gf).call(this)}mutate(s,o){var u;return fe(this,ya,o),(u=k(this,Jt))==null||u.removeObserver(this),fe(this,Jt,k(this,pa).getMutationCache().build(k(this,pa),this.options)),k(this,Jt).addObserver(this),k(this,Jt).execute(s)}},pa=new WeakMap,tl=new WeakMap,Jt=new WeakMap,ya=new WeakMap,ba=new WeakSet,Pr=function(){var o;const s=((o=k(this,Jt))==null?void 0:o.state)??Nv();fe(this,tl,{...s,isPending:s.status==="pending",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset})},gf=function(s){ht.batch(()=>{var o,u,d,h,p,m,g,x;if(k(this,ya)&&this.hasListeners()){const b=k(this,tl).variables,E=k(this,tl).context,j={client:k(this,pa),meta:this.options.meta,mutationKey:this.options.mutationKey};if((s==null?void 0:s.type)==="success"){try{(u=(o=k(this,ya)).onSuccess)==null||u.call(o,s.data,b,E,j)}catch(T){Promise.reject(T)}try{(h=(d=k(this,ya)).onSettled)==null||h.call(d,s.data,null,b,E,j)}catch(T){Promise.reject(T)}}else if((s==null?void 0:s.type)==="error"){try{(m=(p=k(this,ya)).onError)==null||m.call(p,s.error,b,E,j)}catch(T){Promise.reject(T)}try{(x=(g=k(this,ya)).onSettled)==null||x.call(g,void 0,s.error,b,E,j)}catch(T){Promise.reject(T)}}}this.listeners.forEach(b=>{b(k(this,tl))})})},m0);function pb(n,l){const s=new Set(l);return n.filter(o=>!s.has(o))}function gE(n,l,s){const o=n.slice(0);return o[l]=s,o}var es,Wt,ts,Yl,un,nl,po,yo,go,bo,kt,bf,vf,Tv,xf,_f,wf,p0,bE=(p0=class extends Wl{constructor(l,s,o){super();be(this,kt);be(this,es);be(this,Wt);be(this,ts);be(this,Yl);be(this,un);be(this,nl);be(this,po);be(this,yo);be(this,go);be(this,bo,[]);fe(this,es,l),fe(this,Yl,o),fe(this,ts,[]),fe(this,un,[]),fe(this,Wt,[]),this.setQueries(s)}onSubscribe(){this.listeners.size===1&&k(this,un).forEach(l=>{l.subscribe(s=>{je(this,kt,_f).call(this,l,s)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,k(this,un).forEach(l=>{l.destroy()})}setQueries(l,s){fe(this,ts,l),fe(this,Yl,s),ht.batch(()=>{const o=k(this,un),u=je(this,kt,xf).call(this,k(this,ts));u.forEach(b=>b.observer.setOptions(b.defaultedQueryOptions));const d=u.map(b=>b.observer),h=d.map(b=>b.getCurrentResult()),p=o.length!==d.length,m=d.some((b,E)=>b!==o[E]),g=p||m,x=g?!0:h.some((b,E)=>{const j=k(this,Wt)[E];return!j||!oo(b,j)});!g&&!x||(g&&(fe(this,bo,u),fe(this,un,d)),fe(this,Wt,h),this.hasListeners()&&(g&&(pb(o,d).forEach(b=>{b.destroy()}),pb(d,o).forEach(b=>{b.subscribe(E=>{je(this,kt,_f).call(this,b,E)})})),je(this,kt,wf).call(this)))})}getCurrentResult(){return k(this,Wt)}getQueries(){return k(this,un).map(l=>l.getCurrentQuery())}getObservers(){return k(this,un)}getOptimisticResult(l,s){const o=je(this,kt,xf).call(this,l),u=o.map(h=>h.observer.getOptimisticResult(h.defaultedQueryOptions)),d=o.map(h=>h.defaultedQueryOptions.queryHash);return[u,h=>je(this,kt,vf).call(this,h??u,s,d),()=>je(this,kt,bf).call(this,u,o)]}},es=new WeakMap,Wt=new WeakMap,ts=new WeakMap,Yl=new WeakMap,un=new WeakMap,nl=new WeakMap,po=new WeakMap,yo=new WeakMap,go=new WeakMap,bo=new WeakMap,kt=new WeakSet,bf=function(l,s){return s.map((o,u)=>{const d=l[u];return o.defaultedQueryOptions.notifyOnChangeProps?d:o.observer.trackResult(d,h=>{s.forEach(p=>{p.observer.trackProp(h)})})})},vf=function(l,s,o){if(s){const u=k(this,go),d=o!==void 0&&u!==void 0&&(u.length!==o.length||o.some((h,p)=>h!==u[p]));return(!k(this,nl)||k(this,Wt)!==k(this,yo)||d||s!==k(this,po))&&(fe(this,po,s),fe(this,yo,k(this,Wt)),o!==void 0&&fe(this,go,o),fe(this,nl,ih(k(this,nl),s(l)))),k(this,nl)}return l},Tv=function(){var l;return((l=k(this,Yl))==null?void 0:l.combine)!==void 0&&k(this,un).some((s,o)=>{var u;return s.options.suspense&&((u=k(this,Wt)[o])==null?void 0:u.data)===void 0})},xf=function(l){const s=new Map;k(this,un).forEach(u=>{const d=u.options.queryHash;if(!d)return;const h=s.get(d);h?h.push(u):s.set(d,[u])});const o=[];return l.forEach(u=>{var m;const d=k(this,es).defaultQueryOptions(u),p=((m=s.get(d.queryHash))==null?void 0:m.shift())??new rh(k(this,es),d);o.push({defaultedQueryOptions:d,observer:p})}),o},_f=function(l,s){const o=k(this,un).indexOf(l);o!==-1&&(fe(this,Wt,gE(k(this,Wt),o,s)),je(this,kt,wf).call(this))},wf=function(){var l;if(this.hasListeners()){const s=je(this,kt,bf).call(this,k(this,Wt),k(this,bo)),o=je(this,kt,Tv).call(this),u=k(this,nl),d=o?u:je(this,kt,vf).call(this,s,(l=k(this,Yl))==null?void 0:l.combine);(o||u!==d)&&ht.batch(()=>{this.listeners.forEach(h=>{h(k(this,Wt))})})}},p0),In,y0,vE=(y0=class extends Wl{constructor(l={}){super();be(this,In);this.config=l,fe(this,In,new Map)}build(l,s,o){const u=s.queryKey,d=s.queryHash??lh(u,s);let h=this.get(d);return h||(h=new dE({client:l,queryKey:u,queryHash:d,options:l.defaultQueryOptions(s),state:o,defaultOptions:l.getQueryDefaults(u)}),this.add(h)),h}add(l){k(this,In).has(l.queryHash)||(k(this,In).set(l.queryHash,l),this.notify({type:"added",query:l}))}remove(l){const s=k(this,In).get(l.queryHash);s&&(l.destroy(),s===l&&k(this,In).delete(l.queryHash),this.notify({type:"removed",query:l}))}clear(){ht.batch(()=>{this.getAll().forEach(l=>{this.remove(l)})})}get(l){return k(this,In).get(l)}getAll(){return[...k(this,In).values()]}find(l){const s={exact:!0,...l};return this.getAll().find(o=>sb(s,o))}findAll(l={}){const s=this.getAll();return Object.keys(l).length>0?s.filter(o=>sb(l,o)):s}notify(l){ht.batch(()=>{this.listeners.forEach(s=>{s(l)})})}onFocus(){ht.batch(()=>{this.getAll().forEach(l=>{l.onFocus()})})}onOnline(){ht.batch(()=>{this.getAll().forEach(l=>{l.onOnline()})})}},In=new WeakMap,y0),ft,al,ll,ns,as,il,ls,is,g0,xE=(g0=class{constructor(n={}){be(this,ft);be(this,al);be(this,ll);be(this,ns);be(this,as);be(this,il);be(this,ls);be(this,is);fe(this,ft,n.queryCache||new vE),fe(this,al,n.mutationCache||new pE),fe(this,ll,n.defaultOptions||{}),fe(this,ns,new Map),fe(this,as,new Map),fe(this,il,0)}mount(){qr(this,il)._++,k(this,il)===1&&(fe(this,ls,ah.subscribe(async n=>{n&&(await this.resumePausedMutations(),k(this,ft).onFocus())})),fe(this,is,tc.subscribe(async n=>{n&&(await this.resumePausedMutations(),k(this,ft).onOnline())})))}unmount(){var n,l;qr(this,il)._--,k(this,il)===0&&((n=k(this,ls))==null||n.call(this),fe(this,ls,void 0),(l=k(this,is))==null||l.call(this),fe(this,is,void 0))}isFetching(n){return k(this,ft).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return k(this,al).findAll({...n,status:"pending"}).length}getQueryData(n){var s;const l=this.defaultQueryOptions({queryKey:n});return(s=k(this,ft).get(l.queryHash))==null?void 0:s.state.data}ensureQueryData(n){const l=this.defaultQueryOptions(n),s=k(this,ft).build(this,l),o=s.state.data;return o===void 0?this.fetchQuery(n):(n.revalidateIfStale&&s.isStaleByTime(sl(l.staleTime,s))&&this.prefetchQuery(l),Promise.resolve(o))}getQueriesData(n){return k(this,ft).findAll(n).map(({queryKey:l,state:s})=>{const o=s.data;return[l,o]})}setQueryData(n,l,s){const o=this.defaultQueryOptions({queryKey:n}),u=k(this,ft).get(o.queryHash),d=u==null?void 0:u.state.data,h=W4(l,d);if(h!==void 0)return k(this,ft).build(this,o).setData(h,{...s,manual:!0})}setQueriesData(n,l,s){return ht.batch(()=>k(this,ft).findAll(n).map(({queryKey:o})=>[o,this.setQueryData(o,l,s)]))}getQueryState(n){var s;const l=this.defaultQueryOptions({queryKey:n});return(s=k(this,ft).get(l.queryHash))==null?void 0:s.state}removeQueries(n){const l=k(this,ft);ht.batch(()=>{l.findAll(n).forEach(s=>{l.remove(s)})})}resetQueries(n,l){const s=k(this,ft);return ht.batch(()=>(s.findAll(n).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...n},l)))}cancelQueries(n,l={}){const s={revert:!0,...l},o=ht.batch(()=>k(this,ft).findAll(n).map(u=>u.cancel(s)));return Promise.all(o).then(qt).catch(qt)}invalidateQueries(n,l={}){return ht.batch(()=>(k(this,ft).findAll(n).forEach(s=>{s.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},l)))}refetchQueries(n,l={}){const s={...l,cancelRefetch:l.cancelRefetch??!0},o=ht.batch(()=>k(this,ft).findAll(n).filter(u=>!u.isDisabled()&&!u.isStatic()).map(u=>{let d=u.fetch(void 0,s);return s.throwOnError||(d=d.catch(qt)),u.state.fetchStatus==="paused"?Promise.resolve():d}));return Promise.all(o).then(qt)}fetchQuery(n){const l=this.defaultQueryOptions(n);l.retry===void 0&&(l.retry=!1);const s=k(this,ft).build(this,l);return s.isStaleByTime(sl(l.staleTime,s))?s.fetch(l):Promise.resolve(s.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(qt).catch(qt)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(qt).catch(qt)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return tc.isOnline()?k(this,al).resumePausedMutations():Promise.resolve()}getQueryCache(){return k(this,ft)}getMutationCache(){return k(this,al)}getDefaultOptions(){return k(this,ll)}setDefaultOptions(n){fe(this,ll,n)}setQueryDefaults(n,l){k(this,ns).set(Fl(n),{queryKey:n,defaultOptions:l})}getQueryDefaults(n){const l=[...k(this,ns).values()],s={};return l.forEach(o=>{os(n,o.queryKey)&&Object.assign(s,o.defaultOptions)}),s}setMutationDefaults(n,l){k(this,as).set(Fl(n),{mutationKey:n,defaultOptions:l})}getMutationDefaults(n){const l=[...k(this,as).values()],s={};return l.forEach(o=>{os(n,o.mutationKey)&&Object.assign(s,o.defaultOptions)}),s}defaultQueryOptions(n){if(n._defaulted)return n;const l={...k(this,ll).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return l.queryHash||(l.queryHash=lh(l.queryKey,l)),l.refetchOnReconnect===void 0&&(l.refetchOnReconnect=l.networkMode!=="always"),l.throwOnError===void 0&&(l.throwOnError=!!l.suspense),!l.networkMode&&l.persister&&(l.networkMode="offlineFirst"),l.queryFn===sh&&(l.enabled=!1),l}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...k(this,ll).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){k(this,ft).clear(),k(this,al).clear()}},ft=new WeakMap,al=new WeakMap,ll=new WeakMap,ns=new WeakMap,as=new WeakMap,il=new WeakMap,ls=new WeakMap,is=new WeakMap,g0),Ov=_.createContext(void 0),cs=n=>{const l=_.useContext(Ov);if(!l)throw new Error("No QueryClient set, use QueryClientProvider to set one");return l},_E=({client:n,children:l})=>(_.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),f.jsx(Ov.Provider,{value:n,children:l})),Rv=_.createContext(!1),zv=()=>_.useContext(Rv);Rv.Provider;function wE(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}var SE=_.createContext(wE()),Dv=()=>_.useContext(SE),Uv=(n,l,s)=>{const o=s!=null&&s.state.error&&typeof n.throwOnError=="function"?oh(n.throwOnError,[s.state.error,s]):n.throwOnError;(n.suspense||n.experimental_prefetchInRender||o)&&(l.isReset()||(n.retryOnMount=!1))},Lv=n=>{_.useEffect(()=>{n.clearReset()},[n])},Bv=({result:n,errorResetBoundary:l,throwOnError:s,query:o,suspense:u})=>n.isError&&!l.isReset()&&!n.isFetching&&o&&(u&&n.data===void 0||oh(s,[n.error,o])),Hv=n=>{if(n.suspense){const s=u=>u==="static"?u:Math.max(u??1e3,1e3),o=n.staleTime;n.staleTime=typeof o=="function"?(...u)=>s(o(...u)):s(o),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},kE=(n,l)=>n.isLoading&&n.isFetching&&!l,Sf=(n,l)=>(n==null?void 0:n.suspense)&&l.isPending,kf=(n,l,s)=>l.fetchOptimistic(n).catch(()=>{s.clearReset()});function EE({queries:n,...l},s){const o=cs(),u=zv(),d=Dv(),h=_.useMemo(()=>n.map(C=>{const M=o.defaultQueryOptions(C);return M._optimisticResults=u?"isRestoring":"optimistic",M}),[n,o,u]);h.forEach(C=>{Hv(C);const M=o.getQueryCache().get(C.queryHash);Uv(C,d,M)}),Lv(d);const[p]=_.useState(()=>new bE(o,h,l)),[m,g,x]=p.getOptimisticResult(h,l.combine),b=!u&&l.subscribed!==!1;_.useSyncExternalStore(_.useCallback(C=>b?p.subscribe(ht.batchCalls(C)):qt,[p,b]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),_.useEffect(()=>{p.setQueries(h,l)},[h,l,p]);const j=m.some((C,M)=>Sf(h[M],C))?m.flatMap((C,M)=>{const R=h[M];if(R&&Sf(R,C)){const D=new rh(o,R);return kf(R,D,d)}return[]}):[];if(j.length>0)throw Promise.all(j);const T=m.find((C,M)=>{const R=h[M];return R&&Bv({result:C,errorResetBoundary:d,throwOnError:R.throwOnError,query:o.getQueryCache().get(R.queryHash),suspense:R.suspense})});if(T!=null&&T.error)throw T.error;return g(x())}function jE(n,l,s){var j,T,C,M;const o=zv(),u=Dv(),d=cs(),h=d.defaultQueryOptions(n);(T=(j=d.getDefaultOptions().queries)==null?void 0:j._experimental_beforeQuery)==null||T.call(j,h);const p=d.getQueryCache().get(h.queryHash),m=n.subscribed!==!1;h._optimisticResults=o?"isRestoring":m?"optimistic":void 0,Hv(h),Uv(h,u,p),Lv(u);const g=!d.getQueryCache().get(h.queryHash),[x]=_.useState(()=>new l(d,h)),b=x.getOptimisticResult(h),E=!o&&m;if(_.useSyncExternalStore(_.useCallback(R=>{const D=E?x.subscribe(ht.batchCalls(R)):qt;return x.updateResult(),D},[x,E]),()=>x.getCurrentResult(),()=>x.getCurrentResult()),_.useEffect(()=>{x.setOptions(h)},[h,x]),Sf(h,b))throw kf(h,x,u);if(Bv({result:b,errorResetBoundary:u,throwOnError:h.throwOnError,query:p,suspense:h.suspense}))throw b.error;if((M=(C=d.getDefaultOptions().queries)==null?void 0:C._experimental_afterQuery)==null||M.call(C,h,b),h.experimental_prefetchInRender&&!ro.isServer()&&kE(b,o)){const R=g?kf(h,x,u):p==null?void 0:p.promise;R==null||R.catch(qt).finally(()=>{x.updateResult()})}return h.notifyOnChangeProps?b:x.trackResult(b)}function en(n,l){return jE(n,rh)}function ME(n,l){const s=cs(),[o]=_.useState(()=>new yE(s,n));_.useEffect(()=>{o.setOptions(n)},[o,n]);const u=_.useSyncExternalStore(_.useCallback(h=>o.subscribe(ht.batchCalls(h)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),d=_.useCallback((h,p)=>{o.mutate(h,p).catch(qt)},[o]);if(u.error&&oh(o.options.throwOnError,[u.error]))throw u.error;return{...u,mutate:d,mutateAsync:u.mutate}}const yb=n=>{let l;const s=new Set,o=(g,x)=>{const b=typeof g=="function"?g(l):g;if(!Object.is(b,l)){const E=l;l=x??(typeof b!="object"||b===null)?b:Object.assign({},l,b),s.forEach(j=>j(l,E))}},u=()=>l,p={setState:o,getState:u,getInitialState:()=>m,subscribe:g=>(s.add(g),()=>s.delete(g))},m=l=n(o,u,p);return p},CE=(n=>n?yb(n):yb),AE=n=>n;function NE(n,l=AE){const s=Gr.useSyncExternalStore(n.subscribe,Gr.useCallback(()=>l(n.getState()),[n,l]),Gr.useCallback(()=>l(n.getInitialState()),[n,l]));return Gr.useDebugValue(s),s}const gb=n=>{const l=CE(n),s=o=>NE(l,o);return Object.assign(s,l),s},qv=(n=>n?gb(n):gb),En=qv(n=>({byKey:{},noticeByKey:{},watchedByKey:{},start:(l,s)=>n(o=>({byKey:{...o.byKey,[l]:s},noticeByKey:bb(o.noticeByKey,l),watchedByKey:{...o.watchedByKey,[l]:s.cropKey}})),finish:l=>n(s=>{if(!(l in s.byKey))return s;const o={...s.byKey};return delete o[l],{byKey:o}}),notice:(l,s)=>n(o=>o.noticeByKey[l]===s?o:{noticeByKey:{...o.noticeByKey,[l]:s}}),clearNotice:l=>n(s=>l in s.noticeByKey?{noticeByKey:bb(s.noticeByKey,l)}:s)}));function bb(n,l){if(!(l in n))return n;const s={...n};return delete s[l],s}function TE(n){return En(l=>l.noticeByKey[n])}const vb=1e3,OE=6e4;function RE({getJobStatus:n}){const l=En(s=>s.byKey);return f.jsx(f.Fragment,{children:Object.entries(l).map(([s,o])=>f.jsx(zE,{entryKey:s,entry:o,getJobStatus:n},o.jobId))})}function zE({entryKey:n,entry:l,getJobStatus:s}){var M,R;const o=En(D=>D.finish),u=En(D=>D.notice),{jobId:d,propertyId:h,cropKey:p,mobileJobId:m,mobileCropKey:g,apply:x,revert:b}=l,E=en({queryKey:["image-crop-job",h,d],queryFn:()=>s(h,d),refetchInterval:D=>{var I;const z=(I=D.state.data)==null?void 0:I.status;return z==="succeeded"||z==="failed"?!1:vb}}),j=en({queryKey:["image-crop-job",h,m],queryFn:()=>s(h,m),enabled:!!m,refetchInterval:D=>{var I;const z=(I=D.state.data)==null?void 0:I.status;return z==="succeeded"||z==="failed"?!1:vb}}),T=(M=E.data)==null?void 0:M.status,C=m?(R=j.data)==null?void 0:R.status:void 0;return _.useEffect(()=>{!(T==="succeeded"||T==="failed")||!(!m||C==="succeeded"||C==="failed")||(T==="failed"||C==="failed"?(b(),u(n,"failed"),o(n)):(x(p,m?g:void 0),o(n)))},[T,C,m,n,p,g,x,b,u,o]),_.useEffect(()=>{const D=setTimeout(()=>{u(n,"slow"),o(n)},OE);return()=>clearTimeout(D)},[n,u,o]),null}function DE(n){if(!n||typeof n!="object")return null;const l=n;return typeof l.job_id!="string"||typeof l.crop_key!="string"||!l.rect||typeof l.rect!="object"||typeof l.ar!="number"?null:l}function Gv(n,l){_.useEffect(()=>{var s,o;for(const u of n){const d=En.getState();if(u.key in d.byKey||d.watchedByKey[u.key]===u.pending.crop_key)continue;const h=l(u);d.start(u.key,{jobId:u.pending.job_id,propertyId:u.propertyId,cropKey:u.pending.crop_key,mobileJobId:(s=u.pending.mobile)==null?void 0:s.job_id,mobileCropKey:(o=u.pending.mobile)==null?void 0:o.crop_key,instanceId:u.instanceId,slotId:u.slotId,itemIndex:u.itemIndex,apply:h.apply,revert:h.revert})}})}const Jr={dimOpacity:.35,grayscale:.4,transitionMs:120,spinner:{diameter:28,stroke:3,trackColor:"rgba(20,18,13,.18)",headColor:"rgba(20,18,13,.6)",spinDurationMs:800}},UE={opacity:Jr.dimOpacity,filter:`grayscale(${Jr.grayscale})`,transition:`opacity ${Jr.transitionMs}ms`};function LE(){if(typeof document>"u"||document.getElementById("recrop-spin-kf"))return;const n=document.createElement("style");n.id="recrop-spin-kf",n.textContent="@keyframes recrop-spin{to{transform:rotate(360deg)}}",document.head.appendChild(n)}function Iv(){LE();const n=Jr.spinner;return f.jsx("div",{"data-recrop-loading":!0,role:"status","aria-label":"Re-cropping…",className:"pointer-events-none absolute inset-0 z-[5] grid place-items-center",children:f.jsx("span",{"aria-hidden":!0,style:{width:n.diameter,height:n.diameter,border:`${n.stroke}px solid ${n.trackColor}`,borderTopColor:n.headColor,borderRadius:"50%",animation:`recrop-spin ${n.spinDurationMs}ms linear infinite`}})})}function Qv(n,l,s){const o=_.useMemo(()=>[...new Set(l.filter(d=>!!d))],[l]),u=EE({queries:o.map(d=>({queryKey:["crop-url",n,d],queryFn:()=>s(n,d),enabled:!!n,staleTime:600*1e3}))});return _.useMemo(()=>{const d=new Map;return o.forEach((h,p)=>{var g;const m=(g=u[p])==null?void 0:g.data;typeof m=="string"&&d.set(h,m)}),d},[o,u])}const Vv=_.createContext(null);function BE({api:n,children:l}){return f.jsx(Vv.Provider,{value:n,children:l})}function Vn(){const n=_.useContext(Vv);if(!n)throw new Error("useMediaLibraryApi: missing MediaLibraryApiProvider");return n}const nc=[{extension:".pdf",mimeTypes:["application/pdf"],family:"pdf"},{extension:".csv",mimeTypes:["text/csv","application/vnd.ms-excel"],family:"spreadsheet"},{extension:".xlsx",mimeTypes:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],family:"spreadsheet"},{extension:".docx",mimeTypes:["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],family:"text-document"},{extension:".doc",mimeTypes:["application/msword"],family:"text-document"},{extension:".txt",mimeTypes:["text/plain"],family:"text-document"},{extension:".pptx",mimeTypes:["application/vnd.openxmlformats-officedocument.presentationml.presentation"],family:"presentation"}],Yv=new Set(nc.map(n=>n.extension)),Kv=new Set(nc.flatMap(n=>n.mimeTypes));function uc(n){const l=n.indexOf(";");return(l===-1?n:n.slice(0,l)).trim().toLowerCase()}function uh(n){const l=Math.max(n.lastIndexOf("/"),n.lastIndexOf("\\")),s=n.slice(l+1),o=s.lastIndexOf(".");return o<=0?"":s.slice(o).toLowerCase()}function HE(n){return uc(n).startsWith("image/")}function qE(n){return uc(n).startsWith("video/")}function $v(n,l){return Yv.has(uh(n))&&Kv.has(uc(l))}function GE(n,l){return HE(l)||qE(l)||$v(n,l)}function IE(n,l){const s=uh(n),o=nc.find(h=>h.extension===s);if(o)return o.family;const u=uc(l),d=nc.find(h=>h.mimeTypes.includes(u));return d?d.family:null}const QE=[...Kv,...Yv].join(","),VE="an image, a video, or a document (PDF, Word, Excel .xlsx, PowerPoint .pptx, CSV, or text)";function YE(n){switch(n){case"pdf":return{glyph:"doc",typeNoun:"PDF"};case"spreadsheet":return{glyph:"spreadsheet",typeNoun:"Spreadsheet"};case"text-document":return{glyph:"doc",typeNoun:"Document"};case"presentation":return{glyph:"presentation",typeNoun:"Presentation"}}}function KE(n,l){const s=IE(n,l),{glyph:o,typeNoun:u}=s===null?{glyph:"doc",typeNoun:"File"}:YE(s);return{glyph:o,typeNoun:u,extension:uh(n).replace(".","").toUpperCase()}}const Tn={items:[],subs:new Set};function dh(){Tn.subs.forEach(n=>n())}function $E(n){Tn.items=[n,...Tn.items],dh()}function da(n,l){Tn.items=Tn.items.map(s=>s.id===n?{...s,...l}:s),dh()}function xb(n){Tn.items=Tn.items.filter(l=>l.id!==n),dh()}function _b(){return Tn.items}function XE(){const[,n]=_.useReducer(l=>l+1,0);return _.useEffect(()=>(Tn.subs.add(n),()=>{Tn.subs.delete(n)}),[]),Tn.items}function Xv(n){return n<1024?`${n} B`:n<1048576?`${(n/1024).toFixed(0)} KB`:`${(n/1048576).toFixed(1)} MB`}const FE=qv(n=>({byPlan:{},start:(l,s,o)=>n(u=>({byPlan:{...u.byPlan,[l]:{jobId:s,propertyId:o}}})),advance:(l,s)=>n(o=>{const u=o.byPlan[l];return!u||u.jobId===s?o:{byPlan:{...o.byPlan,[l]:{...u,jobId:s}}}}),finish:l=>n(s=>{if(!(l in s.byPlan))return s;const o={...s.byPlan};return delete o[l],{byPlan:o}})})),ZE=5,wb=500*1024*1024;function Sb(n){return`${Math.round(n/(1024*1024))} MB`}function Fv(n){return n.size>wb?{ok:!1,message:`This file is ${Sb(n.size)}. The maximum upload size is ${Sb(wb)}.`}:GE(n.name,n.type)?{ok:!0}:{ok:!1,message:`This file type (${n.type||"unknown"}) isn't supported. Upload ${VE}.`}}function PE(n){const l=Fv(n);return l.ok?n.type.startsWith("image/")?{ok:!0}:{ok:!1,message:`A floor plan has to be an image. This file is ${n.type||"of an unknown type"}.`}:l}function JE(n){return n.committedUploadId?{kind:"replace",uploadId:n.committedUploadId}:n.attempt?{kind:"resume",attempt:n.attempt}:{kind:"fresh"}}function WE(n){return{id:n.id,kind:"document",name:n.name,size:n.size_bytes>0?Xv(n.size_bytes):"",src:n.preview_url,mime:n.mime}}function Zv(n){var o;const{getDocuments:l}=Vn(),s=en({queryKey:["documents",n],queryFn:()=>l(n),enabled:!!n});return{items:(((o=s.data)==null?void 0:o.documents)??[]).map(WE),isLoading:s.isLoading}}function e3(n){var s;const l=new Map;for(const o of n){const u=((s=o.source)==null?void 0:s.upload_id)??o.id;l.has(u)||l.set(u,o)}return[...l.entries()].map(([o,u])=>({id:o,kind:"plan",name:u.display_label||"Floor plan",size:"",src:u.thumbnail_url}))}function t3(n){var o;const{getFloorplans:l}=Vn(),s=en({queryKey:["floorplan-library",n],queryFn:()=>l(n),enabled:!!n});return{items:e3(((o=s.data)==null?void 0:o.floorplans)??[]),isLoading:s.isLoading}}async function n3(n,l,s){let o=0;const u=Math.max(1,Math.min(l,n.length)),d=Array.from({length:u},async()=>{for(;o<n.length;){const h=o++;try{await s(n[h],h)}catch{}}});await Promise.all(d)}function a3(n){return{id:n.id,kind:"plan",name:n.display_label,size:"",src:n.thumbnail_url,caption:null,ready:n.ready}}function Pv(n){var o;const{getFloorplans:l}=Vn(),s=en({queryKey:["floorplan-library",n],queryFn:()=>l(n),enabled:!!n});return{items:(((o=s.data)==null?void 0:o.floorplans)??[]).map(a3),isLoading:s.isLoading}}function l3(n){var o;const{getFloorplans:l}=Vn();return((o=en({queryKey:["floorplan-library",n],queryFn:()=>l(n),enabled:!!n}).data)==null?void 0:o.floorplans)??[]}function i3(n,l){n.invalidateQueries({queryKey:["floorplan-library",l]}),n.invalidateQueries({queryKey:["floorplans",l]})}function Jv(n){return n.type.startsWith("video/")?"video":$v(n.name,n.type)?"document":"photo"}function s3(n){switch(n){case"photo":case"video":case"document":return n;case"floor_plan":case"link":case null:return null}}function o3(n,l){return[`${n}s`,l]}function r3(n){const{deleteUpload:l,getUploads:s,postUploadWithProgress:o}=Vn(),u=cs(),d=XE(),h=_.useCallback((b,E,j)=>(da(b,{status:"uploading",error:void 0}),o(n,E,()=>{},{...j,onAttempt:T=>da(b,{attempt:T??void 0})}).then(T=>{da(b,{id:T.id,status:"classifying",committedUploadId:T.id})}).catch(T=>{da(b,{status:"failed",error:T instanceof Error?T.message:"Upload failed"})})),[n,o]),p=_.useCallback((b,E)=>{const j=b?Array.from(b):[],T=(E==null?void 0:E.declaredType)==="floor_plan",C=[];for(const M of j){const R=crypto.randomUUID(),D=T?PE(M):Fv(M),z=T?"plan":Jv(M);$E({id:R,kind:z,name:M.name,size:Xv(M.size),src:z==="photo"||z==="plan"?URL.createObjectURL(M):"",status:D.ok?"uploading":"failed",error:D.ok?void 0:D.message,file:M}),D.ok&&C.push({tempId:R,file:M})}n3(C,ZE,async M=>{await h(M.tempId,M.file,E)})},[h]),m=_.useCallback(b=>{const E=_b().find(C=>C.id===b);if(!E)return;const j=E.kind==="plan"?{declaredType:"floor_plan"}:void 0,T=JE(E);if(T.kind==="resume"){h(b,E.file,{...j,attempt:T.attempt});return}if(T.kind==="fresh"){h(b,E.file,j);return}da(b,{status:"uploading",error:void 0}),l(n,T.uploadId).then(()=>(da(b,{attempt:void 0,committedUploadId:void 0}),h(b,E.file,j))).catch(C=>{da(b,{status:"failed",error:C instanceof Error?C.message:"Upload failed"})})},[h,l,n]),g=d.some(b=>b.status==="classifying"),x=en({queryKey:["editor-upload-status",n],queryFn:()=>s(n),enabled:g,refetchInterval:g?1500:!1});return _.useEffect(()=>{var C;const b=(C=x.data)==null?void 0:C.uploads;if(!b)return;const E=new Map(b.map(M=>[M.id,M])),j=new Set;let T=!1;for(const M of _b()){if(M.status!=="classifying")continue;const R=E.get(M.id);if(!R)continue;if(R.status==="failed"){da(M.id,{status:"failed",error:"Processing failed"});continue}if(M.kind==="plan"){xb(M.id),T=!0;continue}if(R.status!=="ready")continue;const D=s3(R.type);if(D===null){da(M.id,{status:"not_photo",error:`Classified as ${R.type??"non-photo"}`});continue}xb(M.id),j.add(D)}for(const M of j)u.invalidateQueries({queryKey:o3(M,n)});T&&i3(u,n)},[x.data,n,u]),{items:d,addFiles:p,retry:m}}function Kr(n){return typeof n=="string"&&n.length>0?n:null}function c3(n){var s,o,u,d;const l=[];for(const h of n){const p=Kr((s=h.fields)==null?void 0:s.name),m=Kr((o=h.fields)==null?void 0:o.avatar_upload_id);m&&h.avatar_url&&l.push({id:m,kind:"library",name:p?`${p} — headshot`:"Headshot",size:"",src:h.avatar_url,caption:null});const g=Kr((u=h.fields)==null?void 0:u.logo_dark_upload_id);g&&h.logo_dark_url&&l.push({id:g,kind:"library",name:p?`${p} — logo (dark)`:"Logo (dark)",size:"",src:h.logo_dark_url,caption:null});const x=Kr((d=h.fields)==null?void 0:d.logo_light_upload_id);x&&h.logo_light_url&&l.push({id:x,kind:"library",name:p?`${p} — logo (light)`:"Logo (light)",size:"",src:h.logo_light_url,caption:null})}return l}const u3=["library-items","contact"];function Wv(){var s;const{listLibraryItems:n}=Vn(),l=en({queryKey:u3,queryFn:()=>n("contact")});return{items:c3(((s=l.data)==null?void 0:s.items)??[]),isLoading:l.isLoading}}function d3(n){return{id:n.id,kind:"video",name:n.name,size:"",src:n.poster_url,caption:n.caption??null,ready:n.ready,durationMs:n.duration_ms,videoSource:n.source,...n.provider!==null?{provider:n.provider}:{}}}function _o(n){var o;const{getVideos:l}=Vn(),s=en({queryKey:["videos",n],queryFn:()=>l(n),enabled:!!n});return{items:(((o=s.data)==null?void 0:o.videos)??[]).map(d3),isLoading:s.isLoading}}function e1(n){if(n==null||!Number.isFinite(n)||n<0)return"";const l=Math.round(n/1e3),s=Math.floor(l/60),o=l%60;return`${s}:${String(o).padStart(2,"0")}`}function f3(n){return{id:n.id,kind:"photo",name:n.name,size:"",src:n.thumbnail_url,caption:n.caption??null}}function fh(n){var o;const{getPhotos:l}=Vn(),s=en({queryKey:["photos",n],queryFn:()=>l(n),enabled:!!n});return{items:(((o=s.data)==null?void 0:o.photos)??[]).map(f3),isLoading:s.isLoading}}function dc(n){const{items:l}=fh(n),{items:s}=Pv(n),{items:o}=Wv(),{items:u}=_o(n);return _.useMemo(()=>{const d=new Map;for(const h of[...l,...s,...o,...u])h.src&&d.set(h.id,h.src);return d},[l,s,o,u])}const Ef=(n,l)=>["floorplan-source-page",n,l];function h3(n){const{recropFloorplan:l}=Vn(),s=FE(u=>u.start),o=cs();return ME({mutationFn:({planId:u,bbox:d})=>l(n,u,d),onMutate:async({planId:u,bbox:d})=>{const h=Ef(n,u);await o.cancelQueries({queryKey:h});const p=o.getQueryData(h);return o.setQueryData(h,m=>m&&{...m,source_bbox:d}),{prev:p,planId:u}},onError:(u,d,h)=>{h!=null&&h.prev&&o.setQueryData(Ef(n,h.planId),h.prev)},onSuccess:(u,d)=>s(d.planId,u.job_id,n)})}function m3(n){return{id:n.id,kind:"tour",name:n.name,size:"",src:n.poster_url,caption:n.caption??null,ready:n.ready,provider:n.provider}}function hh(n){var o;const{getTours:l}=Vn(),s=en({queryKey:["tours",n],queryFn:()=>l(n),enabled:!!n});return{items:(((o=s.data)==null?void 0:o.tours)??[]).map(m3),isLoading:s.isLoading}}function p3(n,l,s){return n&&l?{w:n,h:l}:s?{w:s.w,h:s.h}:null}function y3(n){const[l,s]=_.useState(0),[o,u]=_.useState(null);_.useEffect(()=>{if(!n)return;let p=!0;const m=new Image;return m.onload=()=>{p&&u({src:n,attempt:l,size:{w:m.naturalWidth||1,h:m.naturalHeight||1}})},m.onerror=()=>{p&&u({src:n,attempt:l,size:null})},m.src=n,()=>{p=!1}},[n,l]);const d=_.useCallback(()=>{s(p=>p+1)},[]),h=o&&o.src===n&&o.attempt===l?o:null;return{size:(h==null?void 0:h.size)??null,failed:h!==null&&h.size===null,retry:d}}const g3=16,t1="Crop floor plan",b3="Loading floor plan…",v3="Couldn't load this floor plan's source page.";function kb({tone:n,message:l,stageClassName:s,onClose:o,onRetry:u}){return f.jsxs(cn.Shell,{open:!0,variant:"page",onClose:o,children:[f.jsxs("div",{className:cn.head,children:[f.jsx("div",{className:cn.titles,children:f.jsx("h2",{className:cn.title,children:t1})}),f.jsx("button",{type:"button",className:cn.close,onClick:o,"aria-label":"Close",children:f.jsx(cn.CloseIcon,{})})]}),f.jsxs("div",{role:n==="failed"?"alert":"status",className:me(s,"flex flex-col items-center justify-center gap-3 px-6 text-center"),children:[n==="pending"&&f.jsx("span",{"aria-hidden":!0,className:"size-5 animate-spin rounded-full border-2 border-line border-t-accent [animation-duration:0.7s]"}),f.jsx("p",{className:"m-0 text-[13px] text-ink-2",children:l})]}),f.jsx("div",{className:cn.foot,children:f.jsxs("div",{className:cn.actions,children:[f.jsx("button",{type:"button",className:cn.buttonGhost,onClick:o,children:"Cancel"}),u?f.jsx("button",{type:"button",className:cn.buttonPrimary,onClick:u,children:"Try again"}):null]})})]})}function x3({propertyId:n,planId:l,getSourcePage:s,onClose:o,stageClassName:u="h-[60vh] max-h-[620px]"}){const d=en({queryKey:Ef(n,l),queryFn:()=>s(n,l)}),h=d.data,p=y3(h&&!(h.source_width&&h.source_height)?h.source_url:null),m=p3(h==null?void 0:h.source_width,h==null?void 0:h.source_height,p.size),g=h3(n);if(!d.isFetching&&(d.isError||p.failed))return f.jsx(kb,{tone:"failed",message:v3,stageClassName:u,onClose:o,onRetry:()=>{p.retry(),d.refetch()}});if(!h||!m)return f.jsx(kb,{tone:"pending",message:b3,stageClassName:u,onClose:o});const x=h.source_bbox?V4(h.source_bbox,m.w,m.h):{nx:0,ny:0,nw:1,nh:1};return f.jsx(nh,{chrome:cn,src:h.source_url,mode:"free",aspect:m.w/m.h,variant:"page",stageClassName:u,title:t1,seed:{rect:x},onClose:o,onApply:b=>{o(),g.mutate({planId:l,bbox:$4(b.rect,m.w,m.h,g3)})}})}const _3=["Basement","Ground","1st floor","2nd floor","3rd floor","4th floor","Penthouse"],w3="fixed overflow-y-auto rounded-[calc(8*var(--content))] border border-line bg-white py-1 shadow-[0_16px_38px_-12px_rgba(20,18,13,0.4)]",Hd=240,n1=me(ot,"flex w-full items-center rounded-none px-2.5 py-2 text-left text-body text-ink hover:bg-accent-soft data-[active=true]:bg-accent-soft"),S3=me(n1,"text-accent"),ao=4,Eb=140,lo=8,k3="flex w-full items-stretch rounded-[calc(5*var(--content))] border border-transparent bg-[#f3f1ea] transition-[background,border-color,box-shadow] duration-[120ms] hover:bg-[#ece9df] focus-within:border-ink-3 focus-within:bg-white focus-within:shadow-[0_0_0_3px_rgba(20,18,13,0.05)]",E3="min-w-0 flex-1 appearance-none border-0 bg-transparent px-1.75 py-1 text-[length:calc(11.5*var(--content))] font-semibold text-ink-2 placeholder:font-medium placeholder:text-ink-4";function j3({value:n,onChange:l,presets:s,label:o,placeholder:u="Label…",ariaLabel:d,compact:h=!1}){const[p,m]=_.useState(!1),[g,x]=_.useState(""),[b,E]=_.useState(0),[j,T]=_.useState(null),C=_.useId(),M=_.useRef(null),R=_.useRef(null),D=g.trim().toLowerCase(),z=p&&D?s.filter($=>$.toLowerCase().includes(D)):s,I=s.some($=>$.toLowerCase()===D),le=g.trim().length>0&&!I,ne=z.length+(le?1:0),W=_.useCallback(()=>{if(!R.current)return;const $=R.current.getBoundingClientRect(),w=window.innerHeight-$.bottom-ao-lo;T({rect:$,above:w<Hd})},[]);function L(){W(),m(!0)}function ue($){l($.trim()),de()}function de(){m(!1),x(""),E(0)}function re($){if(!p&&($.key==="ArrowDown"||$.key==="Enter")){L();return}if($.key==="Escape"){de();return}$.key==="ArrowDown"?($.preventDefault(),E(w=>Math.min(ne-1,w+1))):$.key==="ArrowUp"?($.preventDefault(),E(w=>Math.max(0,w-1))):$.key==="Enter"&&($.preventDefault(),b<z.length?ue(z[b]):le&&ue(g))}function ie($){var ee,G;const w=$.relatedTarget,F=(ee=M.current)==null?void 0:ee.contains(w),ce=(G=document.getElementById(C))==null?void 0:G.contains(w);!F&&!ce&&de()}_.useEffect(()=>{if(p)return window.addEventListener("scroll",W,!0),window.addEventListener("resize",W),()=>{window.removeEventListener("scroll",W,!0),window.removeEventListener("resize",W)}},[p,W]);const U=h?k3:me(vo,p&&"border-accent"),H=h?E3:ss;return f.jsxs("div",{className:me(!h&&Qn),ref:M,onBlurCapture:ie,children:[o&&!h&&f.jsx("span",{className:va,children:o}),f.jsx("div",{className:U,ref:R,children:f.jsx("input",{className:H,value:p?g:n,placeholder:n||u,onFocus:L,onChange:$=>{x($.target.value),p||L(),E(0)},onKeyDown:re,"aria-label":d??o??"Label","aria-expanded":p,"aria-controls":C,role:"combobox"})}),p&&ne>0&&j&&th.createPortal(f.jsxs("div",{className:w3,id:C,role:"listbox",style:{left:Math.max(lo,Math.min(j.rect.left,window.innerWidth-Math.max(j.rect.width,Eb)-lo)),...j.above?{bottom:window.innerHeight-j.rect.top+ao,maxHeight:Math.min(j.rect.top-ao-lo,Hd)}:{top:j.rect.bottom+ao,maxHeight:Math.min(window.innerHeight-j.rect.bottom-ao-lo,Hd)},minWidth:Math.max(j.rect.width,Eb),zIndex:mv+200},children:[z.map(($,w)=>f.jsx("button",{type:"button",role:"option","aria-selected":w===b,"data-active":w===b,className:n1,onMouseEnter:()=>E(w),onMouseDown:F=>F.preventDefault(),onClick:()=>ue($),children:f.jsx("span",{className:"truncate",children:$})},$)),le&&f.jsx("button",{type:"button",role:"option","aria-selected":b===z.length,"data-active":b===z.length,className:S3,onMouseEnter:()=>E(z.length),onMouseDown:$=>$.preventDefault(),onClick:()=>ue(g),children:f.jsxs("span",{className:"truncate",children:["Use “",g.trim(),"”"]})})]}),document.body)]})}const M3="group/card relative flex flex-col overflow-hidden rounded-[8px] border border-line bg-canvas transition-[border-color] duration-[120ms] hover:border-ink-4",C3="relative aspect-[4/3] touch-none select-none bg-[#fafaf6]",A3="absolute inset-0 block size-full object-contain",N3=me("absolute inset-0 grid place-items-center font-mono text-[12px] text-ink-3",cc),T3="absolute right-[5px] top-[5px] z-[4] flex gap-[3px] transition-opacity duration-[120ms]",O3="opacity-0 group-hover/card:opacity-100",qd=me(ot,"we-no-drag grid size-5 place-items-center rounded-[4px] bg-white text-ink-2 shadow-[0_1px_2px_rgba(20,18,13,0.18)] transition-[background,color] duration-[120ms] hover:bg-[#f3f1ea] hover:text-ink"),R3="hover:bg-[#fbe6e2] hover:text-[#8e2c1e]",z3="border-t border-line-soft px-[7px] py-[6px]",D3="pointer-events-none absolute bottom-[6px] right-[6px] z-[3] grid size-[22px] place-items-center rounded-full bg-[rgba(255,255,255,0.94)] text-[11px] font-bold text-ink shadow-[0_1px_3px_rgba(20,18,13,0.25)]";function U3({src:n,alt:l="",floor:s,onFloorChange:o,onCrop:u,cropTitle:d="Crop floor plan",onRemove:h,removeTitle:p="Remove from unit",include:m,badge:g,drag:x}){const b=m?!m.on:!1,E=me(T3,b?"opacity-100":O3);return f.jsxs("div",{className:me(M3,b&&"opacity-60",(x==null?void 0:x.active)&&"opacity-[0.28]"),"data-dragid":x==null?void 0:x.dataDragId,children:[f.jsxs("div",{className:me(C3,x&&"cursor-grab",(x==null?void 0:x.active)&&"cursor-grabbing"),onPointerDown:x==null?void 0:x.onPointerDown,children:[n?f.jsx("img",{className:me(A3,b&&"grayscale"),src:n,alt:l,draggable:!1}):f.jsx("div",{className:N3}),f.jsxs("span",{className:E,children:[u&&f.jsx("button",{type:"button",className:qd,title:d,onClick:u,children:f.jsx(De.crop,{})}),h&&f.jsx("button",{type:"button",className:me(qd,R3),title:p,onClick:h,children:f.jsx(De.trash,{})}),m&&f.jsx("button",{type:"button",className:qd,title:m.on?"Hide from site":"Show on site","aria-pressed":m.on,onClick:m.onToggle,children:m.on?f.jsx(De.eye,{}):f.jsx(De.eyeOff,{})})]}),g!=null&&f.jsx("span",{className:D3,children:g})]}),f.jsx("div",{className:z3,children:f.jsx(j3,{value:s,onChange:o,presets:_3,placeholder:"Floor",ariaLabel:"Floor label",compact:!0})})]})}const L3=24,B3=14;function H3(n){return n.length<=L3?n:`${n.slice(0,B3)}…${n.slice(-9)}`}function q3(n,l,s){return n?`${H3(n)}`:`Floor plan ${l}`}function G3(n){var s;if(n.fields!=null)return"row-editor";const l=(s=n.element)==null?void 0:s.type;return l==="image"||l==="video"||l==="tour"?"gallery":l==="poi"?"poi-curation":l==="document"?"document-list":"scalar-list"}function mh(n){const l=G3(n);return{editor:l,granularity:l==="row-editor"?"item":"unit"}}function a1(n){if(n!==null&&typeof n=="object"&&!Array.isArray(n)){const l=n;if(typeof l.asset_id=="string")return{asset_id:l.asset_id}}return{asset_id:""}}function I3(n){return n.map(a1).filter(l=>l.asset_id!=="")}function fc(n){switch(n.kind){case"document":return KE(n.name,n.mime??"");case"video":return{glyph:"video",typeNoun:"Video",extension:""};case"photo":case"plan":case"library":return{glyph:"image",typeNoun:"Image",extension:""};case"tour":return{glyph:"video",typeNoun:"3D tour",extension:""}}}function Q3(n){return[fc(n).typeNoun,n.size].filter(Boolean).join(" · ")}function V3(n){const l=new Map;for(const s of n)for(const o of s)l.set(o.id,o);return l}function l1(n){const{items:l}=Zv(n),{items:s}=fh(n),{items:o}=t3(n),{items:u}=_o(n),d=V3([s,o,u,l]);return h=>d.get(h)}const Y3="group/row relative flex min-h-12 items-center gap-2.5 rounded-[calc(8*var(--content))] border border-line bg-white px-2.5 py-2 [transition:border-color_.14s,box-shadow_.14s,background_.3s]",K3="flex min-w-0 flex-1 flex-col gap-px",$3="truncate text-[length:calc(13.5*var(--content))] text-ink",X3="truncate text-caption text-ink-3",F3="flex flex-col items-center gap-2 rounded-[calc(8*var(--content))] border border-dashed border-line px-3 py-4 text-center text-[length:calc(12.5*var(--content))] text-ink-4",Z3="we-no-drag flex flex-shrink-0 items-center gap-0.75",P3="flex items-center gap-0.75 opacity-0 transition-opacity duration-[120ms] group-hover/row:opacity-100",i1="grid size-6 cursor-pointer place-items-center rounded-md border-0 bg-transparent p-0 text-ink-3 outline-none hover:bg-[#f1f0ea] hover:text-ink-2",s1="relative grid size-[calc(34*var(--content))] flex-shrink-0 place-items-center overflow-hidden rounded-[calc(6*var(--content))] border border-line bg-[#f4f3ee] text-ink-3",J3="size-full object-cover",W3="absolute bottom-0 inset-x-0 truncate bg-[rgba(15,18,9,0.55)] px-0.5 text-center text-[length:calc(7.5*var(--content))] font-bold leading-[1.5] tracking-[0.02em] text-white",ej={doc:Xf,spreadsheet:Sk,presentation:W0,image:Ff,video:av};function wo({glyph:n,extension:l,size:s=16,className:o}){const u=ej[n];return f.jsxs(f.Fragment,{children:[f.jsx(u,{size:s,strokeWidth:1.5,className:o,style:{width:`calc(${s} * var(--content))`,height:`calc(${s} * var(--content))`}}),l&&f.jsx("span",{className:W3,children:l})]})}function tj({entry:n}){const{glyph:l,extension:s}=fc(n);return f.jsx("span",{className:s1,children:n.src?f.jsx("img",{className:J3,src:n.src,alt:"",draggable:!1}):f.jsx(wo,{glyph:l,extension:s})})}function o1({entry:n,trailing:l,onRemove:s,dragProps:o,dragging:u}){return f.jsxs("div",{...o,className:me(Y3,o&&"cursor-grab hover:border-[#d9d5c9]",u&&"cursor-grabbing border-transparent bg-accent-soft [&>*]:opacity-[0.25]"),children:[n?f.jsx(tj,{entry:n}):f.jsx("span",{className:s1,children:f.jsx(wo,{glyph:"doc",extension:""})}),f.jsxs("div",{className:K3,children:[f.jsx("span",{className:$3,title:n==null?void 0:n.name,children:(n==null?void 0:n.name)??"Document unavailable"}),f.jsx("span",{className:X3,children:n?Q3(n):"This file is no longer on the property"})]}),(l!==void 0||s!==void 0)&&f.jsx("div",{className:Z3,children:f.jsxs("span",{className:P3,children:[l,s&&f.jsx("button",{type:"button",className:me(i1,"hover:bg-[#fbecea] hover:text-danger"),title:"Remove",onClick:s,children:f.jsx(De.trash,{})})]})})]})}function nj({label:n,onAdd:l}){return f.jsxs("div",{className:F3,children:[f.jsx("span",{className:"text-ink-4",children:f.jsx(wo,{glyph:"doc",extension:"",size:22})}),f.jsx("span",{children:"No document yet"}),f.jsxs("button",{type:"button",className:"inline-flex h-6.5 cursor-pointer items-center gap-1.25 rounded-full border-0 bg-accent pl-2.25 pr-2.75 text-[length:calc(11.5*var(--content))] font-semibold text-white transition-[background] duration-[120ms] hover:bg-accent-ink",onClick:l,children:[f.jsx(De.plus,{})," ",n]})]})}const r1={units:{idKey:"unit_id",ownership:"property"},contacts:{idKey:"id",cap:12,min:1,ownership:"library"},comparables:{idKey:"id",ownership:"property"}};function c1(n){var s;if(((s=n.source)==null?void 0:s.kind)!=="direct")return null;const l=n.source.field;return l!==void 0&&Object.hasOwn(r1,l)?l:null}const aj=["tour","video","social","listing","file","map"],Zl={matterport:{kind:"tour",label:"Matterport",pattern:/(^|\.)matterport\.com$/i,strategy:"api"},biganto:{kind:"tour",label:"Biganto",pattern:/(^|\.)biganto\.com$/i,strategy:"opengraph"},youtube:{kind:"video",label:"YouTube",pattern:/(^|\.)(youtube\.com|youtu\.be)$/i,strategy:"oembed"},vimeo:{kind:"video",label:"Vimeo",pattern:/(^|\.)vimeo\.com$/i,strategy:"oembed"},zillow:{kind:"listing",label:"Zillow",pattern:/(^|\.)zillow\.com$/i,strategy:"none"},redfin:{kind:"listing",label:"Redfin",pattern:/(^|\.)redfin\.com$/i,strategy:"none"},dropbox:{kind:"file",label:"Dropbox",pattern:/(^|\.)dropbox\.com$/i,strategy:"none"},drive:{kind:"file",label:"Google Drive",pattern:/^drive\.google\.com$/i,strategy:"none"},maps:{kind:"map",label:"Google Maps",pattern:/(^|\.)google\.com$/i,path:/^\/maps(\/|$)/i,strategy:"none"}};function u1(n){let l;try{l=new URL(n)}catch{return null}if(l.protocol!=="http:"&&l.protocol!=="https:")return null;for(const[s,o]of Object.entries(Zl))if(o.pattern.test(l.hostname)&&!(o.path&&!o.path.test(l.pathname)))return s;return null}function jf(n,l){const s=u1(l);return s===null?!1:s===n?!0:aj.includes(n)&&Zl[s].kind===n}const d1=_.createContext(null);function lj({ports:n,children:l}){return f.jsx(d1.Provider,{value:n,children:l})}function Yn(){const n=_.useContext(d1);if(!n)throw new Error("useSlotEditorPorts: missing SlotEditorPortsProvider");return n}function Dl(n){return Yn().useEditorStore(n)}function ij(){return Yn().api}function f1(){return Yn()}function Mf(n){var l;return n===void 0?"Link":((l=Zl[n])==null?void 0:l.label)??"Link"}function ac(n){return n.kind==="tour"?Mf(n.provider):n.kind!=="video"?"":n.videoSource==="link"?Mf(n.provider):n.ready===!1?"Processing…":e1(n.durationMs)||"Video"}function ph({kind:n,size:l}){return n==="tour"?f.jsx(De.tour,{size:l}):f.jsx(De.play,{size:l})}const sj=me(ot,"inline-flex items-center gap-1.25 rounded-sm bg-[rgba(255,255,255,0.94)] px-2.5 py-1.5 text-[length:calc(11.5*var(--content))] font-semibold text-ink transition-[background] duration-[120ms] hover:bg-white"),oj="flex items-center justify-between gap-2 px-0.5 text-caption text-ink-3",rj="text-caption font-medium text-ink-4",cj="16 / 9",uj="relative block w-full overflow-hidden rounded-[calc(9*var(--content))] bg-[#e6e3da]",h1="block size-full object-cover",dj="pointer-events-none absolute bottom-1.25 left-1.25 z-[3] rounded-full bg-[rgba(15,18,9,0.72)] px-1.5 py-0.5 text-[10.5px] font-semibold tabular-nums text-white group-data-[ghost]/tile:hidden";function m1({kind:n,label:l,poster:s,hasSelection:o,addLabel:u,onPick:d,status:h,metaName:p,metaDetail:m,emptyText:g,noPosterText:x,children:b}){return f.jsxs("div",{className:Pf,children:[f.jsxs("div",{className:Qn,children:[f.jsx(Wf,{children:l}),f.jsxs("div",{className:"relative h-72.5 overflow-hidden rounded-[calc(9*var(--content))] bg-[#e6e3da]",children:[s?f.jsx("img",{className:"size-full object-cover",src:s,alt:""}):f.jsxs("div",{className:me("flex size-full flex-col items-center justify-center gap-1.5 text-small text-ink-3",cc),children:[o?f.jsx(ph,{kind:n,size:22}):f.jsx(De.up,{}),f.jsx("span",{children:o?x:g})]}),f.jsxs("div",{className:"absolute inset-x-0 bottom-0 flex items-center justify-between bg-[linear-gradient(to_top,rgba(15,18,9,0.55),transparent)] p-2.5",children:[f.jsx("button",{type:"button",className:sj,onClick:d,children:o?f.jsxs(f.Fragment,{children:[f.jsx(De.swap,{})," Replace"]}):f.jsxs(f.Fragment,{children:[f.jsx(De.up,{})," ",u]})}),h&&f.jsx("span",{className:rj,children:h})]})]})]}),p!==void 0&&f.jsxs("div",{className:oj,children:[f.jsx("span",{className:"truncate",children:p}),m&&f.jsx("span",{className:"shrink-0 tabular-nums",children:m})]}),b]})}function p1({kind:n,poster:l,index:s,ghost:o,badge:u,overlays:d,placeholderClassName:h}){return f.jsxs("span",{className:me(uj,o&&"opacity-[0.28]"),style:{aspectRatio:cj},children:[l?f.jsx("img",{className:h1,src:l,alt:"",draggable:!1}):f.jsxs("span",{className:me(h,"relative"),children:[f.jsx("span",{className:"absolute inset-0 grid place-items-center text-ink-3 opacity-40",children:f.jsx(ph,{kind:n,size:22})}),f.jsx("span",{className:"relative",children:s+1})]}),d,u&&f.jsx("span",{className:dj,children:u})]})}function y1({poster:n,index:l,placeholderClassName:s}){return n?f.jsx("img",{className:h1,src:n,alt:"",draggable:!1}):f.jsx("div",{className:s,children:l+1})}function Cf(n){if(n===void 0)return"Not a valid URL";const l=Object.entries(Zl).find(([o])=>o===n);if(l)return`Needs a ${l[1].label} link`;const s=g1(n);return s.length>0?`Needs a ${n} link (${s.join(", ")})`:`Needs a ${n} link`}function g1(n){return Object.values(Zl).filter(l=>l.kind===n).map(l=>l.label)}function fj(n){try{return new URL(n)}catch{return null}}function Af(n){const l=n.trim();return l&&(/^https?:\/\//i.test(l)?l:`https://${l}`)}function Nf(n){const l=fj(n);if(l===null||l.protocol!=="http:"&&l.protocol!=="https:")return!1;const s=l.hostname;return s.includes(".")&&!s.startsWith(".")&&!s.endsWith(".")}const hj={photo:"photos",plan:"floor plans",library:"library images",video:"videos",tour:"tours",document:"documents"},mj={photo:"Photos",plan:"Floor plans",library:"Library",video:"Videos",tour:"Tours",document:"Documents"},pj={video:"video",tour:"tour"},yj=["photo","plan","video","document"];function gj(n){return n==="video"?"video/*":n==="document"?QE:"image/*"}function Gd(n){return n.kind==="plan"&&n.ready===!1||n.kind==="tour"&&n.ready===!1?!1:!n.status||n.status==="classifying"}function bj(n,l){const s=new Set(n);return s.has(l)?s.delete(l):s.add(l),s}function b1(n){const{items:l,addFiles:s,retry:o}=r3(n),{items:u}=fh(n),{items:d}=Pv(n),{items:h}=Wv(),{items:p}=_o(n),{items:m}=hh(n),{items:g}=Zv(n),x=new Set([...u.map(E=>E.id),...d.map(E=>E.id),...p.map(E=>E.id),...m.map(E=>E.id),...g.map(E=>E.id)]);return{items:[...l.filter(E=>!x.has(E.id)),...u,...d,...h,...p,...m,...g],addFiles:s,retry:o}}function vj({entry:n}){if(n.kind==="document"){const{glyph:l,extension:s}=fc(n);return f.jsx(wo,{glyph:l,extension:s,size:30})}return f.jsx(ph,{kind:n.kind==="tour"?"tour":"video",size:18})}function xj(n){switch(n){case"uploading":return"Uploading…";case"classifying":return"Processing…";case"failed":return"Failed — retry";case"not_photo":return"Not a photo"}}function jb({primaryLabel:n,primaryDisabled:l,onPrimary:s,onClose:o}){return f.jsx("div",{className:uv,children:f.jsxs("div",{className:dv,children:[f.jsx("button",{className:hv,onClick:o,children:"Cancel"}),f.jsx("button",{className:eh,disabled:l,onClick:s,children:n})]})})}function _j({open:n,title:l,propertyId:s,onClose:o,footer:u,selectedIds:d,onCellClick:h,onCellDoubleClick:p,initialFilter:m,kinds:g,disabledKinds:x,videoSources:b,onPickOne:E}){const{items:j,addFiles:T,retry:C}=b1(s),M=cs(),{api:R,capabilities:D}=f1(),z=g??["photo","plan","library","video"],[I,le]=_.useState(""),ne=x??[],W=z.find(N=>!ne.includes(N))??z[0]??"photo",[L,ue]=_.useState(z.includes(m)&&!ne.includes(m)?m:W),de=_.useRef(null),re=(b==null?void 0:b.includes("link"))??!1,ie=L==="video"&&!re?null:pj[L]??null,U=I.trim().toLowerCase(),H=j.filter(N=>N.kind===L&&N.name.toLowerCase().includes(U)&&(re||N.videoSource!=="link")),[$,w]=_.useState(""),[F,ce]=_.useState(null),[ee,G]=_.useState(!1),S=async()=>{const N=$.trim();if(!N||ee||ie===null)return;const P=Af(N);if(!Nf(P)||!jf(ie,P)){ce(Cf(ie));return}const Q=u1(P);if(Q===null){ce(Cf(ie));return}ce(null),G(!0);try{const Z=await R.postLink(s,P);await M.invalidateQueries({queryKey:[ie==="tour"?"tours":"videos",s]}),w(""),E==null||E(ie==="tour"?{id:Z.id,kind:"tour",name:Zl[Q].label,size:"",src:"",caption:null,ready:!0,provider:Q}:{id:Z.id,kind:"video",name:Zl[Q].label,size:"",src:"",caption:null,ready:!0,durationMs:null,videoSource:"link",provider:Q})}catch{ce("Could not add that link. Try again.")}finally{G(!1)}},q=N=>{const P=N.target.files,Q=L==="plan";if(T(P,Q?{declaredType:"floor_plan"}:void 0),!Q){const Z=P==null?void 0:P[0],pe=Z?Jv(Z):"photo";z.includes(pe)&&!ne.includes(pe)&&ue(pe)}N.target.value=""},Y=N=>{if(N.status==="failed"){C(N.id);return}Gd(N)&&h(N)};return f.jsxs(gv,{open:n,variant:"pick",onClose:o,children:[f.jsxs("div",{className:sv,children:[f.jsx("div",{className:ov,children:f.jsx("h2",{className:rv,children:l})}),f.jsx("button",{className:cv,onClick:o,"aria-label":"Close",children:f.jsx(De.x,{})})]}),f.jsxs("div",{className:Zg,children:[f.jsxs("div",{className:Pg,children:[f.jsx("span",{className:Jg,children:f.jsx(De.search,{})}),f.jsx("input",{className:Wg,autoFocus:!0,placeholder:"Search file names…",value:I,onChange:N=>le(N.target.value)})]}),z.length>1&&f.jsx("div",{className:m4,children:z.map(N=>{const P=ne.includes(N);return f.jsx("button",{type:"button",className:y4(L===N,P),disabled:P,"aria-disabled":P||void 0,onClick:()=>!P&&ue(N),children:mj[N]},N)})})]}),ie!==null&&f.jsxs("div",{className:Zg,children:[f.jsxs("div",{className:Pg,children:[f.jsx("span",{className:Jg,children:f.jsx(De.link,{})}),f.jsx("input",{className:Wg,placeholder:`Paste a ${ie} link (${g1(ie).join(" or ")})…`,value:$,disabled:ee,onChange:N=>{w(N.target.value),ce(null)},onKeyDown:N=>{N.key==="Enter"&&S()}})]}),f.jsx("button",{type:"button",className:eh,disabled:ee||$.trim().length===0,onClick:()=>void S(),children:ee?"Adding…":"Add link"})]}),F&&f.jsx("div",{className:"px-4 pb-1 text-[11.5px] font-medium text-[#b4342b]",role:"alert",children:F}),f.jsx("div",{className:t4,children:f.jsxs("div",{className:n4,children:[D.upload&&yj.includes(L)&&f.jsxs("button",{className:d4,onClick:()=>{var N;return(N=de.current)==null?void 0:N.click()},children:[f.jsx("span",{className:f4,children:f.jsx(De.up,{})}),f.jsx("span",{className:h4,children:"Upload"})]}),H.length===0?f.jsxs("div",{className:a4,children:["No ",hj[L]," match"," ",U?`”${I}”`:"your search","."]}):H.map(N=>f.jsxs("button",{className:l4,"data-selected":d.has(N.id)?"":void 0,"aria-disabled":!Gd(N)&&N.status!=="failed",onClick:()=>Y(N),onDoubleClick:p&&Gd(N)?()=>p(N):void 0,children:[f.jsx("span",{className:i4,children:f.jsxs("span",{className:s4,children:[N.src?f.jsx("img",{className:N.kind==="plan"&&N.ready===!1?`${eb} opacity-40`:eb,src:N.src,alt:""}):f.jsx("span",{className:r4,children:f.jsx(vj,{entry:N})}),d.has(N.id)&&f.jsx("span",{className:o4,children:f.jsx(De.check,{})}),!N.status&&ac(N)&&f.jsx("span",{className:u4,children:ac(N)}),N.status&&f.jsx("span",{className:"absolute inset-x-0 bottom-0 bg-[rgba(15,18,9,0.6)] px-1.5 py-1 text-[10.5px] font-semibold text-white",title:N.error??void 0,children:xj(N.status)}),N.kind==="tour"&&N.ready===!1&&f.jsx("span",{className:"absolute inset-x-0 bottom-0 bg-[rgba(15,18,9,0.6)] px-1.5 py-1 text-[10.5px] font-semibold text-white",role:"status",children:"Not embeddable"}),N.kind==="plan"&&N.ready===!1&&f.jsx("span",{className:"absolute inset-x-0 bottom-0 bg-[rgba(15,18,9,0.6)] px-1.5 py-1 text-[10.5px] font-semibold text-white",role:"status",children:"Processing…"})]})}),(N.kind==="document"||N.kind==="tour")&&f.jsx("span",{className:c4,title:N.name,children:N.name})]},N.id))]})}),u,D.upload&&f.jsx("input",{ref:de,type:"file",accept:gj(L),multiple:!0,hidden:!0,onChange:q})]})}function cl(n){var M,R;const{propertyId:l,onClose:s}=n,{items:o}=b1(l),u=((M=n.kinds)==null?void 0:M.length)===1?n.kinds[0]:void 0,d=n.noun??(u==="video"||u==="tour"?u:"photo"),[h,p]=_.useState(n.mode==="single"?n.currentId??null:null),[m,g]=_.useState(()=>n.mode==="multi"?new Set(n.selectedIds.filter(Boolean)):new Set),x=D=>{n.mode==="single"?p(D.id):g(z=>bj(z,D.id))};let b,E,j,T,C;if(n.mode==="single"){const{onPick:D,currentId:z}=n,I=o.find(le=>le.id===h)??null;b=new Set(h?[h]:[]),E=le=>D(le),j=f.jsx(jb,{primaryLabel:`Use ${d}`,primaryDisabled:!I,onPrimary:()=>I&&D(I),onClose:s}),T=`Choose a ${d}`,C=((R=o.find(le=>le.id===z))==null?void 0:R.kind)??"photo"}else{const{onApply:D}=n;b=m,E=void 0,j=f.jsx(jb,{primaryLabel:"Save selection",onPrimary:()=>D(o.filter(z=>m.has(z.id))),onClose:s}),T=`Choose ${d}s`,C="photo"}return f.jsx(_j,{open:n.open,title:n.title??T,propertyId:l,onClose:s,initialFilter:n.initialFilter??C,kinds:n.kinds,disabledKinds:n.disabledKinds,videoSources:n.videoSources,onPickOne:n.mode==="single"?n.onPick:void 0,selectedIds:b,onCellClick:x,onCellDoubleClick:E,footer:j})}function wj({slot:n,value:l,onChange:s,propertyId:o}){const[u,d]=_.useState(!1),h=(l==null?void 0:l.asset_id)??"",p=l1(o),m=h?p(h):void 0;return f.jsxs("div",{className:Qn,children:[f.jsx(Wf,{children:n.label}),h?f.jsx(o1,{entry:m,trailing:f.jsx("button",{type:"button",className:i1,title:"Replace",onClick:()=>d(!0),children:f.jsx(De.swap,{})}),onRemove:()=>s(null)}):f.jsx(nj,{label:`Add ${xo(n.label,"Document")}`,onAdd:()=>d(!0)}),u&&f.jsx(cl,{mode:"single",propertyId:o,noun:"document",kinds:["document","photo","video"],initialFilter:h?void 0:"document",currentId:h||void 0,onClose:()=>d(!1),onPick:g=>{d(!1),s({asset_id:g.id})}})]})}const Sj={PanelUI:wj,applyOptimistic:null,coerce:a1};function kj(n,l,s){if(l===s||l<0||s<0)return n;const o=n.slice(),[u]=o.splice(l,1);return o.splice(s,0,u),o}const v1="data-drag-scope";function Id(n){return Array.from(n.querySelectorAll("[data-dragid]")).filter(l=>l.closest(`[${v1}]`)===n)}function x1({items:n,getKey:l,onReorder:s,onDrop:o,axis:u="xy",threshold:d=4,ignoreSelector:h=".we-no-drag"}){const[p,m]=_.useState(null),[g,x]=_.useState({w:0,h:0}),b=_.useRef(null),E=_.useRef(null),j=_.useRef({}),T=_.useRef({grabX:0,grabY:0,scale:1}),C=_.useRef({x:0,y:0}),M=_.useRef(null),R=_.useRef(null),D=_.useRef(n),z=_.useRef(l),I=_.useRef({onReorder:s,onDrop:o});_.useLayoutEffect(()=>{I.current={onReorder:s,onDrop:o}});function le(){const re=E.current,ie=b.current;if(!re||!ie)return;const U=ie.getBoundingClientRect(),H=T.current.scale||1,$=(C.current.x-U.left)/H-T.current.grabX,w=(C.current.y-U.top)/H-T.current.grabY;u!=="y"&&(re.style.left=`${$}px`),re.style.top=`${w}px`}function ne(){const re=b.current,ie=re.getBoundingClientRect(),U=T.current.scale||1,H=(C.current.x-ie.left)/U,$=(C.current.y-ie.top)/U,w=D.current;let F=0,ce=1/0;return Id(re).forEach(ee=>{const G=w.findIndex(N=>z.current(N)===ee.dataset.dragid);if(G<0)return;const S=ee.offsetLeft+ee.offsetWidth/2,q=ee.offsetTop+ee.offsetHeight/2,Y=(H-S)**2+($-q)**2;Y<ce&&(ce=Y,F=G)}),Math.max(0,Math.min(w.length-1,F))}_.useLayoutEffect(()=>{const re=b.current;if(!re)return;re.setAttribute(v1,"");const ie=j.current,U={};Id(re).forEach(H=>{const $=H.dataset.dragid,w={left:H.offsetLeft,top:H.offsetTop};U[$]=w;const F=ie[$];if(F&&$!==R.current){const ce=F.left-w.left,ee=F.top-w.top;(ce||ee)&&H.animate([{transform:`translate(${ce}px,${ee}px)`},{transform:"none"}],{duration:190,easing:"cubic-bezier(.2,.7,.3,1)"})}}),j.current=U,R.current&&le()});function W(re,ie){var F,ce,ee,G,S;const U=b.current,H=Id(U).find(q=>q.dataset.dragid===re)??null;if(!H)return;const $=H.getBoundingClientRect(),w=U.getBoundingClientRect().width/U.offsetWidth||1;T.current={grabX:(ie.clientX-$.left)/w,grabY:(ie.clientY-$.top)/w,scale:w},(ce=(F=document.activeElement)==null?void 0:F.blur)==null||ce.call(F),(S=(G=(ee=window.getSelection)==null?void 0:ee.call(window))==null?void 0:G.removeAllRanges)==null||S.call(G),C.current={x:ie.clientX,y:ie.clientY},D.current=n,z.current=l,R.current=re,x({w:H.offsetWidth,h:H.offsetHeight}),m(re)}function L(re,ie){re.button===0&&(re.target.closest(h)||(M.current={key:ie,x:re.clientX,y:re.clientY},window.addEventListener("pointermove",ue),window.addEventListener("pointerup",de)))}function ue(re){const ie=M.current;if(!ie)return;if(!R.current){if(Math.hypot(re.clientX-ie.x,re.clientY-ie.y)<d)return;W(ie.key,re)}C.current={x:re.clientX,y:re.clientY},le();const U=ne(),H=D.current,$=H.findIndex(F=>z.current(F)===R.current);if($<0||$===U)return;const w=kj(H,$,U);D.current=w,I.current.onReorder(w)}function de(){window.removeEventListener("pointermove",ue),window.removeEventListener("pointerup",de),M.current=null,R.current&&(R.current=null,m(null),I.current.onDrop(D.current))}return{containerRef:b,cloneRef:E,getItemProps:re=>({"data-dragid":re,onPointerDown:ie=>L(ie,re)}),draggingKey:p,cloneBox:g}}const Ej="flex min-h-6.5 items-center justify-between gap-2.5",jj=me(ot,"inline-flex h-6.5 items-center gap-1.25 rounded-full bg-accent pl-2.25 pr-2.75 text-[length:calc(11.5*var(--content))] font-semibold text-white transition-[background] duration-[120ms] hover:bg-accent-ink"),Mj="relative grid grid-cols-2 gap-2",Cj="[grid-column:1/-1] py-4.5 text-center text-small text-ink-3",Aj="pointer-events-none absolute z-[60] cursor-grabbing overflow-hidden rounded-[8px] bg-canvas shadow-[0_16px_38px_-8px_rgba(20,18,13,0.5)] after:absolute after:inset-0 after:rounded-[8px] after:border-2 after:border-dashed after:border-[#111] after:content-['']",Nj="relative aspect-[4/3] bg-[#fafaf6]",Tj="absolute inset-0 block size-full object-contain";function Mb(n){return Array.isArray(n)?n.map(l=>{if(typeof l!="object"||l===null)return null;const s=l;if(typeof s.key=="string")return s;const o=typeof s.id=="string"?s.id:"";return{key:w1(),id:o,uploadId:typeof s.upload_id=="string"?s.upload_id:"",url:"",alt:"",floor:typeof s.floor_label=="string"?s.floor_label:""}}).filter(l=>l!==null):[]}function Oj(n){return n.map((l,s)=>{const o=l.floor.trim();return{id:l.id,...l.uploadId?{upload_id:l.uploadId}:{},floor_label:o||null,position:s}})}function _1(n){return n.map(l=>({planId:l.id,label:l.floor}))}let Cb=0;function w1(){return Cb+=1,`pl-${Cb}`}function Qd(n){return JSON.stringify(n.map(l=>[l.id,l.floor]))}function Rj(n,l,s){const o=new Map(l.map(u=>[u.id,u]));return n.map(u=>{const d=o.get(u.planId);return d?{...d,floor:u.label}:{key:w1(),id:u.planId,uploadId:"",url:s.get(u.planId)??"",alt:"",floor:u.label}})}function zj(n){return{_key:"fp-sibling",label:n.label,beds:"",baths:"",sqft:"",price:"",plans:_1(n.plans),planExclusions:[],planFloors:{}}}function Dj({plans:n,propertyId:l,unitLabel:s,siblingUnits:o,unitIndex:u,onChange:d}){const{UnitPlanPicker:h,api:p}=f1(),[m,g]=_.useState(!1),[x,b]=_.useState(null),E=l3(l),j=_.useMemo(()=>{const H=new Map;for(const $ of E)H.set($.id,$.thumbnail_url);return H},[E]),T=H=>H.url||j.get(H.id)||"",[C,M]=_.useState(n),[R,D]=_.useState(()=>Qd(n)),z=H=>{M(H),D(Qd(H)),d(H)},{containerRef:I,cloneRef:le,getItemProps:ne,draggingKey:W,cloneBox:L}=x1({items:C,getKey:H=>H.key,onReorder:M,onDrop:z,axis:"xy"});if(!W){const H=Qd(n);H!==R&&(D(H),M(n))}const ue=(H,$)=>z(C.map(w=>w.key===H?{...w,floor:$}:w)),de=H=>z(C.filter($=>$.key!==H)),re=o==null?void 0:o.map(zj),ie=W?C.find(H=>H.key===W):null,U=ie?T(ie):"";return f.jsxs("div",{className:"flex flex-col gap-2.25",children:[f.jsxs("div",{className:Ej,children:[f.jsxs("span",{className:va,children:[C.length," floor plan",C.length===1?"":"s"]}),f.jsx("div",{className:"flex items-center gap-1.5",children:f.jsxs("button",{type:"button",className:jj,onClick:()=>g(!0),children:[f.jsx(De.plus,{})," Add"]})})]}),f.jsxs("div",{className:Mj,ref:I,children:[C.length===0&&f.jsx("div",{className:Cj,children:"No floor plans yet — use Add to choose plans."}),C.map((H,$)=>f.jsx(U3,{src:T(H)||null,floor:H.floor,onFloorChange:w=>ue(H.key,w),onCrop:()=>b(H.id),onRemove:()=>de(H.key),removeTitle:"Remove from unit",badge:$+1,drag:{dataDragId:H.key,onPointerDown:ne(H.key).onPointerDown,active:W===H.key}},H.key)),ie&&f.jsx("div",{ref:le,className:Aj,style:{width:L.w,height:L.h,left:0,top:0},children:f.jsx("div",{className:Nj,children:U&&f.jsx("img",{className:Tj,src:U,alt:"",draggable:!1})})})]}),m&&f.jsx(h,{open:!0,propertyId:l,unit:{_key:"fp-preview",label:s??"",beds:"",baths:"",sqft:"",price:"",plans:_1(C),planExclusions:[],planFloors:{}},units:re,unitIndex:u,library:E,onClose:()=>g(!1),onUnitPatch:H=>{H.plans&&z(Rj(H.plans,C,j))},onCrop:b}),x&&f.jsx(x3,{propertyId:l,planId:x,getSourcePage:p.getFloorplanSourcePage,onClose:()=>b(null)})]})}const Uj={failed:"Crop failed — the image is unchanged. Try cropping again.",slow:"This crop is still processing. It will appear as soon as it finishes."},Lj="m-0 text-caption leading-[1.4] text-ink-4";function S1({storeKey:n}){const l=TE(n),s=En(o=>o.clearNotice);return l?f.jsxs("p",{role:"alert","data-crop-notice":l,className:me(l==="failed"?Jf:Lj,"flex items-center justify-between gap-2"),children:[f.jsx("span",{children:Uj[l]}),f.jsx("button",{type:"button",className:me(ot,"shrink-0 underline"),onClick:()=>s(n),children:"Dismiss"})]}):null}const Bj=360,Hj="relative overflow-hidden rounded-[calc(9*var(--content))]";function k1({src:n,derivativeUrl:l,mode:s,slotAspect:o,sizing:u,ar:d,dimmed:h,children:p}){const m=l??n,g=s==="locked"?"cover":"contain",x=_.useRef(null),[b,E]=_.useState(null);_.useLayoutEffect(()=>{if(s!=="free")return;const D=x.current;D!=null&&D.complete&&D.naturalWidth>0&&D.naturalHeight>0&&E({src:m,aspect:D.naturalWidth/D.naturalHeight})},[m,s]);const j=D=>{if(s!=="free")return;const z=D.currentTarget;z.naturalWidth>0&&z.naturalHeight>0&&E({src:m,aspect:z.naturalWidth/z.naturalHeight})},T=b&&b.src===m?b.aspect:typeof d=="number"&&d>0?d:o,C=s==="locked"?o:T,M=h?UE:void 0,R=u==="single"?{aspectRatio:String(C),width:"100%",maxWidth:`${Bj*C}px`,marginInline:"auto"}:{aspectRatio:String(C),width:"100%"};return f.jsxs("div",{className:Hj,style:R,children:[f.jsx("img",{ref:x,className:`block size-full object-center ${g==="cover"?"object-cover":"object-contain"}`,src:m,alt:"",draggable:!1,onLoad:j,style:M}),p]})}function qj(n){var u,d;const l=ij(),o=(u=en({queryKey:["property",n],queryFn:()=>l.fetchProperty(n)}).data)==null?void 0:u.contacts;return((d=(o==null?void 0:o.find(h=>h.is_primary))??(o==null?void 0:o[0]))==null?void 0:d.library_item_id)??null}const $r=me(ot,"inline-flex items-center gap-1.25 rounded-sm bg-[rgba(255,255,255,0.94)] px-2.5 py-1.5 text-[length:calc(11.5*var(--content))] font-semibold text-ink transition-[background] duration-[120ms] hover:bg-white");function Ab(n,l,s,o){const u=()=>{const d=n.current;return d.photo_id!==o?!0:!!(d.pending_crop&&d.pending_crop.crop_key!==s.crop_key)};return{apply:(d,h)=>{u()||l({...n.current,rect:s.rect,ar:s.ar,crop_key:d,mobile:s.mobile?{rect:s.mobile.rect,crop_key:h??null,derived:s.mobile.derived}:n.current.mobile??void 0,pending_crop:null})},revert:()=>{u()||l({...n.current,pending_crop:null})}}}function Nb({value:n,onChange:l,propertyId:s,cropKey:o,cropCfg:u,contactImage:d,displayName:h}){var ee;const{api:p}=Yn(),[m,g]=_.useState(null),x=dc(s),b=Qv(s,[n.crop_key],p.getCropDerivativeUrl),E=n.crop_key?b.get(n.crop_key):void 0,j=En(G=>o in G.byKey),T=o.startsWith(`${s}:`)?o.slice(s.length+1):o,[C="",M=""]=T.split(":"),R=qj(s),D=(d==null?void 0:d.itemId)??R,z=_.useRef(null),[I,le]=_.useState(!1),ne=d!==null&&D!==null,W=ef(n),L=W?x.has(W):!1,ue=en({queryKey:["staged-upload-url",D,W],queryFn:()=>p.presignLibraryItemUpload(D,W),enabled:!!D&&!!W&&!L}),de=(W?x.get(W):void 0)??ue.data??n.url??void 0,re=_.useRef(null),ie=async G=>{if(!D||!d)return;le(!0);const S=xS(d.kind==="headshot"?{kind:"headshot"}:{kind:"logo",variant:d.variant});try{const{upload_id:q,url:Y}=await p.stageLibraryItemImage(D,G,S),N=re.current;re.current=q,l({...n,photo_id:q,url:Y,rect:null,ar:null,crop_key:null,mobile:null,pending_crop:null}),N&&N!==q&&p.deleteStagedLibraryItemImage(D,N).catch(()=>{})}catch(q){console.error("[editor] contact image stage failed",{field:S,contactId:D,err:q})}finally{le(!1)}},U=G=>{var q;const S=(q=G.target.files)==null?void 0:q[0];G.target.value="",S&&ie(S)},H=f.jsxs("button",{type:"button",className:$r,disabled:I,onClick:()=>{var G;return(G=z.current)==null?void 0:G.click()},children:[f.jsx(De.up,{})," ",I?"Saving…":"Upload"]}),$=_.useRef(n);_.useEffect(()=>{$.current=n},[n]);const w=n.pending_crop??null,F=_.useCallback(G=>Ab($,l,G.pending,$.current.photo_id),[l]);Gv(w?[{key:o,pending:w,propertyId:s,instanceId:C,slotId:M}]:[],F);const ce=async G=>{var S,q,Y;if(g(null),!!n.photo_id){if(_v(G.rect)){(n.rect||n.crop_key||n.mobile||n.pending_crop)&&l({...n,rect:null,ar:null,crop_key:null,mobile:null,pending_crop:null});return}try{const N=await p.cropImage(s,n.photo_id,G.rect,((S=G.mobile)==null?void 0:S.rect)??null),P={job_id:N.job_id,crop_key:N.crop_key,rect:G.rect,ar:G.ar,mobile:G.mobile&&N.mobile?{job_id:N.mobile.job_id,crop_key:N.mobile.crop_key,rect:G.mobile.rect,derived:G.mobile.derived}:null};l({...$.current,pending_crop:P});const Q=Ab($,l,P,n.photo_id);En.getState().start(o,{jobId:N.job_id,propertyId:s,cropKey:N.crop_key,mobileJobId:(q=N.mobile)==null?void 0:q.job_id,mobileCropKey:(Y=N.mobile)==null?void 0:Y.crop_key,instanceId:C,slotId:M,apply:Q.apply,revert:Q.revert})}catch(N){En.getState().notice(o,"failed"),console.error("[editor] image crop failed",{instanceId:C,slotId:M,err:N})}}};return f.jsxs("div",{className:Pf,children:[f.jsxs("div",{className:Qn,children:[f.jsx(Wf,{children:h??"Image"}),de?f.jsxs(k1,{src:de,derivativeUrl:E,ar:n.ar,mode:u.mode,slotAspect:u.aspect,sizing:"single",dimmed:j,children:[j&&f.jsx(Iv,{}),f.jsx("div",{className:"absolute inset-x-0 bottom-0 flex items-center justify-between bg-[linear-gradient(to_top,rgba(15,18,9,0.55),transparent)] p-2.5",children:f.jsxs("div",{className:"flex items-center gap-1.5",children:[ne?H:f.jsxs("button",{type:"button",className:$r,onClick:()=>g("pick"),children:[f.jsx(De.swap,{})," Replace"]}),f.jsxs("button",{type:"button",className:$r,onClick:()=>g("crop"),children:[f.jsx(De.crop,{})," Crop"]})]})})]}):f.jsxs("div",{className:"relative h-72.5 overflow-hidden rounded-[calc(9*var(--content))] bg-[#e6e3da]",children:[f.jsxs("div",{className:me("flex size-full flex-col items-center justify-center gap-1.5 text-small text-ink-3",cc),children:[f.jsx(De.up,{}),f.jsx("span",{children:"No image yet"})]}),f.jsx("div",{className:"absolute inset-x-0 bottom-0 flex items-center justify-between bg-[linear-gradient(to_top,rgba(15,18,9,0.55),transparent)] p-2.5",children:ne?H:f.jsxs("button",{type:"button",className:$r,onClick:()=>g("pick"),children:[f.jsx(De.up,{})," Add image"]})})]}),f.jsx(S1,{storeKey:o})]}),ne&&f.jsx("input",{ref:z,type:"file",accept:"image/*",hidden:!0,onChange:U}),m==="pick"&&f.jsx(cl,{mode:"single",propertyId:s,currentId:n.photo_id||void 0,onClose:()=>g(null),onPick:G=>{if(G.id===n.photo_id){l({...n,url:G.src}),g(null);return}l({...n,photo_id:G.id,url:G.src,alt:n.alt||G.caption||"",rect:null,ar:null,crop_key:null,pending_crop:null}),g(null)}}),m==="crop"&&de&&f.jsx(nh,{chrome:cn,src:de,mode:u.mode,aspect:u.aspect,aspectLabel:u.aspectLabel,mobileAspect:u.mobileAspect,seed:{rect:n.rect??null},mobileSeed:{rect:((ee=n.mobile)==null?void 0:ee.rect)??null},onClose:()=>g(null),onApply:G=>{ce(G)}})]})}function Gj({slot:n,instanceId:l,slotId:s,value:o,onChange:u,propertyId:d,recordContext:h}){var x;if(h){if(n.sourceFilter==="floorplans"&&d!=null){const b=(h.siblingRecords??[]).map(j=>({label:typeof j.unit_label=="string"?j.unit_label:"",plans:Mb(j.floor_plans)})),E=h.itemIndex;return f.jsx(Dj,{plans:Mb(o),propertyId:d,unitLabel:E!=null&&((x=b[E])==null?void 0:x.label)||void 0,unitIndex:E,siblingUnits:b,onChange:j=>u(Oj(j))})}if(d!=null&&l!=null&&s!=null){const b=Xg(n.source);return f.jsx(Nb,{value:o,onChange:u,propertyId:d,cropKey:`${d}:${l}:${s}:${h.fieldKey}`,cropCfg:nf(n),displayName:n.label,contactImage:b?{...b,instanceId:l,slotId:s,itemId:h.itemId}:null})}return null}const p=nf(n),m=`${d}:${l}:${s}`,g=Xg(n.source);return f.jsx(Nb,{value:o,onChange:u,propertyId:d,cropKey:m,cropCfg:p,contactImage:g?{...g,instanceId:l,slotId:s}:null,displayName:n.label})}function Ij(n,l){const s=n.querySelector("img");if(s){l.url&&s.setAttribute("src",l.url),s.setAttribute("alt",l.alt??""),s.style.transform="",s.style.transformOrigin="",s.style.objectPosition="";return}const o=n.querySelector("video");o&&(l.url?o.setAttribute("poster",l.url):o.removeAttribute("poster"))}function E1(n){if(n&&typeof n=="object"){const l=n;return{photo_id:typeof l.photo_id=="string"&&l.photo_id.length>0?l.photo_id:typeof l.asset_id=="string"?l.asset_id:"",url:typeof l.url=="string"?l.url:"",alt:typeof l.alt=="string"?l.alt:"",rect:l.rect&&typeof l.rect=="object"?l.rect:void 0,ar:typeof l.ar=="number"?l.ar:void 0,crop_key:typeof l.crop_key=="string"?l.crop_key:void 0,mobile:l.mobile&&typeof l.mobile=="object"&&l.mobile.rect?l.mobile:void 0,pending_crop:DE(l.pending_crop)??void 0}}return{photo_id:"",url:"",alt:""}}const Qj={PanelUI:Gj,applyOptimistic:Ij,coerce:n=>Array.isArray(n)?n:E1(n)},Vj=me(ot,"inline-flex h-6.5 items-center gap-1.25 rounded-full bg-accent pl-2.25 pr-2.75 text-[length:calc(11.5*var(--content))] font-semibold text-white transition-[background] duration-[120ms] hover:bg-accent-ink"),Yj="group/tile relative cursor-grab touch-none select-none",rs=me("grid size-full place-items-center font-mono text-small text-ink-3",cc),Kj="absolute right-1.25 top-1.25 z-[4] flex gap-0.75 opacity-0 transition-opacity duration-[120ms] group-hover/tile:opacity-100 group-data-[ghost]/tile:hidden",j1=me(ot,"we-no-drag grid size-5 place-items-center rounded-[calc(4*var(--content))] bg-white text-ink-2 shadow-[0_1px_2px_rgba(20,18,13,0.18)] transition-[background,color] duration-[120ms] hover:bg-[#f3f1ea] hover:text-ink"),Tb="pointer-events-none absolute bottom-1.25 right-1.25 z-[3] grid size-5.5 place-items-center rounded-full bg-[rgba(255,255,255,0.94)] text-caption font-bold text-ink shadow-[0_1px_3px_rgba(20,18,13,0.25)] group-data-[ghost]/tile:hidden",$j="pointer-events-none absolute z-[60] cursor-grabbing overflow-hidden rounded-[calc(9*var(--content))] shadow-[0_16px_38px_-8px_rgba(20,18,13,0.5)] after:absolute after:inset-0 after:rounded-[calc(9*var(--content))] after:border-2 after:border-dashed after:border-[#111] after:content-['']";function hc(n,l,s,o,u){const d=new Set(l.map(g=>g.id)),h=n.filter(g=>d.has(s(g.value))),p=new Set(h.map(g=>s(g.value))),m=l.filter(g=>!p.has(g.id)).map(g=>u(o(g)));return[...h,...m]}function yh({engine:n,noun:l,max:s,emptyText:o,onAdd:u,renderTile:d,renderClone:h,tileActions:p,children:m}){const{rows:g,atMax:x,canRemove:b}=n,{containerRef:E,cloneRef:j,getItemProps:T,draggingKey:C,cloneBox:M}=n.drag,R=C?n.indexOf(C):-1,D=R>=0?g[R]:null;return f.jsxs("div",{className:Qn,children:[f.jsxs("div",{className:"flex min-h-6.5 items-center justify-between gap-2.5",children:[f.jsxs("span",{className:va,children:[g.length," ",l,g.length===1?"":"s"]}),f.jsxs("button",{type:"button",className:Vj,onClick:u,disabled:x,title:x?`Maximum ${s} ${l}s`:`Add ${l}s`,style:x?{opacity:.5,cursor:"default"}:void 0,children:[f.jsx(De.plus,{})," Add"]})]}),f.jsxs("div",{className:"relative grid grid-cols-2 gap-2",ref:E,children:[g.length===0&&f.jsx("div",{className:"[grid-column:1/-1] py-4.5 text-center text-small text-ink-3",children:o}),g.map((z,I)=>{const le=f.jsxs(f.Fragment,{children:[f.jsxs("span",{className:Kj,children:[p==null?void 0:p(z),b&&f.jsx("button",{type:"button",className:me(j1,"hover:bg-[#FBE6E2] hover:text-[#8E2C1E]"),title:"Remove",onClick:()=>n.remove(z.key),children:f.jsx(De.trash,{})})]}),f.jsx("span",{className:Tb,children:I+1})]});return f.jsx("div",{...T(z.key),"data-ghost":C===z.key?"":void 0,className:me(Yj,C===z.key&&"cursor-grabbing"),children:d(z,I,le)},z.key)}),D&&f.jsxs("div",{ref:j,className:$j,style:{width:M.w,height:M.h,left:0,top:0},children:[h(D,R),f.jsx("span",{className:Tb,children:R+1})]})]}),m]})}let Xj=0;function Fj(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`li-${(Xj++).toString(36)}`}function Tf(n,l){return{key:(l==null?void 0:l(n))??Fj(),value:n}}function Ob(n,l){return n.map(s=>Tf(s,l))}function Vd(n){return JSON.stringify(n)}function ei({items:n,identityOf:l,min:s=0,max:o=1/0,axis:u="y",commit:d,onCommitted:h}){const[p,m]=_.useState(()=>Ob(n,l)),[g,x]=_.useState(()=>Vd(n)),b=_.useRef(p);_.useEffect(()=>{b.current=p},[p]);function E(M){b.current=M,m(M)}function j(M,R){E(M),x(Vd(M.map(D=>D.value))),d(M,R),h==null||h(M,R)}const T=x1({items:p,getKey:M=>M.key,onReorder:E,onDrop:M=>j(M,"reorder"),axis:u,threshold:5});if(!T.draggingKey){const M=Vd(n);M!==g&&(x(M),m(Ob(n,l)))}function C(M,R){const D=b.current;D.some(z=>z.key===M)&&j(D.map(z=>z.key===M?{...z,value:R(z.value)}:z),"edit")}return{rows:p,drag:T,atMax:p.length>=o,canRemove:p.length>s,add:M=>{const R=b.current;R.length>=o||j([...R,Tf(M,l)],"add")},remove:M=>{const R=b.current;R.length<=s||j(R.filter(D=>D.key!==M),"remove")},setValue:(M,R)=>C(M,()=>R),updateValue:C,replace:M=>j(M.slice(0,o),"replace"),mint:M=>Tf(M,l),indexOf:M=>p.findIndex(R=>R.key===M),keyAt:M=>{var R;return((R=p[M])==null?void 0:R.key)??null},latestRows:()=>b.current}}const Zj="block h-auto max-h-35 w-auto max-w-full group-data-[ghost]/tile:opacity-[0.28]";function Pj(n){return n.map(E1)}function Jj({itemSlot:n,min:l,max:s,instanceId:o,slotId:u,value:d,propertyId:h,selectedItemIndex:p,commit:m}){var ce;const{api:g}=Yn(),x=nf(n),b=dc(h),E=En(ee=>ee.byKey),j=ee=>`${h}:${o}:${u}:${ee}`,T=ee=>(ee.photo_id?b.get(ee.photo_id):void 0)??ee.url,C=_.useMemo(()=>Pj(d),[d]),[M,R]=_.useState(!1),[D,z]=_.useState(null),I=ei({items:C,min:l,max:s,axis:"xy",commit:m}),{rows:le}=I,ne=Qv(h,le.map(ee=>ee.value.crop_key),g.getCropDerivativeUrl),[W,L]=_.useState(null),ue=p??null;if(!I.drag.draggingKey&&ue!==W&&(L(ue),ue!=null)){const ee=I.keyAt(ue);ee&&z(ee)}const de=(ee,G,S)=>{const q=Y=>Y.photo_id!==S||!!(Y.pending_crop&&Y.pending_crop.crop_key!==G.crop_key);return{apply:(Y,N)=>I.updateValue(ee,P=>q(P)?P:{...P,rect:G.rect,ar:G.ar,crop_key:Y,mobile:G.mobile?{rect:G.mobile.rect,crop_key:N??null,derived:G.mobile.derived}:P.mobile,pending_crop:null}),revert:()=>I.updateValue(ee,Y=>q(Y)?Y:{...Y,pending_crop:null})}};Gv(le.flatMap(ee=>{const G=ee.value.pending_crop;return G?[{key:j(ee.key),pending:G,propertyId:h,instanceId:o,slotId:u,itemIndex:I.indexOf(ee.key),rowKey:ee.key,photoId:ee.value.photo_id}]:[]}),ee=>de(ee.rowKey,ee.pending,ee.photoId));const re=async ee=>{var Y,N,P;const G=D;if(z(null),!G)return;const S=le.find(Q=>Q.key===G);if(!S||!S.value.photo_id)return;if(_v(ee.rect)){(S.value.rect||S.value.crop_key||S.value.mobile||S.value.pending_crop)&&I.updateValue(G,Q=>({...Q,rect:null,ar:null,crop_key:null,mobile:null,pending_crop:null}));return}const q=I.indexOf(G);try{const Q=await g.cropImage(h,S.value.photo_id,ee.rect,((Y=ee.mobile)==null?void 0:Y.rect)??null),Z={job_id:Q.job_id,crop_key:Q.crop_key,rect:ee.rect,ar:ee.ar,mobile:ee.mobile&&Q.mobile?{job_id:Q.mobile.job_id,crop_key:Q.mobile.crop_key,rect:ee.mobile.rect,derived:ee.mobile.derived}:null};I.updateValue(G,ge=>({...ge,pending_crop:Z}));const pe=de(G,Z,S.value.photo_id);En.getState().start(j(G),{jobId:Q.job_id,propertyId:h,cropKey:Q.crop_key,mobileJobId:(N=Q.mobile)==null?void 0:N.job_id,mobileCropKey:(P=Q.mobile)==null?void 0:P.crop_key,instanceId:o,slotId:u,itemIndex:q,apply:pe.apply,revert:pe.revert})}catch(Q){En.getState().notice(j(G),"failed"),console.error("[editor] image crop failed",{instanceId:o,slotId:u,key:G,err:Q})}},ie=ee=>{I.replace(hc(le,ee,G=>G.photo_id,G=>({photo_id:G.id,url:G.src,alt:G.caption??""}),I.mint)),R(!1)},U=D?le.find(ee=>ee.key===D):null,H=U?T(U.value):"";function $(ee,G,S){const q=T(ee.value),Y=I.drag.draggingKey===ee.key;return q?f.jsxs("span",{"data-thumb":!0,className:me("block w-full",Y&&"opacity-[0.28]"),children:[f.jsxs(k1,{src:q,derivativeUrl:ee.value.crop_key?ne.get(ee.value.crop_key):void 0,ar:ee.value.ar,mode:x.mode,slotAspect:x.aspect,sizing:"tile",dimmed:j(ee.key)in E,children:[j(ee.key)in E&&f.jsx(Iv,{}),S]}),f.jsx(S1,{storeKey:j(ee.key)})]}):f.jsxs("div",{className:me(rs,"relative w-full"),style:{aspectRatio:String(x.aspect)},children:[G+1,S]})}function w(ee,G){const S=T(ee.value);return S?f.jsx("img",{className:Zj,src:S,alt:"",draggable:!1}):f.jsx("div",{className:rs,children:G+1})}function F(ee){return f.jsx("button",{type:"button",className:j1,title:"Crop",onClick:()=>z(ee.key),children:f.jsx(De.crop,{})})}return f.jsxs(yh,{engine:I,noun:"image",max:s,emptyText:"No images yet — use Add to choose photos.",onAdd:()=>R(!0),renderTile:$,renderClone:w,tileActions:F,children:[M&&f.jsx(cl,{mode:"multi",title:"Add photos",propertyId:h,selectedIds:le.map(ee=>ee.value.photo_id),onApply:ie,onClose:()=>R(!1)}),U&&H&&f.jsx(nh,{chrome:cn,src:H,mode:x.mode,aspect:x.aspect,aspectLabel:x.aspectLabel,mobileAspect:x.mobileAspect,seed:{rect:U.value.rect??null},mobileSeed:{rect:((ce=U.value.mobile)==null?void 0:ce.rect)??null},onApply:ee=>{re(ee)},onClose:()=>z(null)})]})}function Wj({slot:n,value:l,onChange:s,propertyId:o}){const[u,d]=_.useState(!1),{items:h}=hh(o),p=l.tour_id?h.find(g=>g.id===l.tour_id):void 0,m=(p==null?void 0:p.src)||l.poster;return f.jsx(m1,{kind:"tour",label:n.label,poster:m,hasSelection:!!l.tour_id,addLabel:"Add tour",onPick:()=>d(!0),metaName:p==null?void 0:p.name,metaDetail:Mf((p==null?void 0:p.provider)??l.provider),emptyText:"No tour yet",noPosterText:"No thumbnail from this provider",children:u&&f.jsx(cl,{mode:"single",title:"Choose a tour",propertyId:o,kinds:["tour"],initialFilter:"tour",noun:"tour",currentId:l.tour_id||void 0,onClose:()=>d(!1),onPick:g=>{d(!1),g.id!==l.tour_id&&s({...l,tour_id:g.id,url:"",poster:g.src,alt:l.alt||g.caption||"",...g.provider?{provider:g.provider}:{provider:void 0}})}})})}function eM(n,l){const s=n.matches("img")?n:n.querySelector("img");s&&l.poster&&s.setAttribute("src",l.poster)}function M1(n){if(n&&typeof n=="object"){const l=n;return{tour_id:typeof l.tour_id=="string"&&l.tour_id.length>0?l.tour_id:typeof l.asset_id=="string"?l.asset_id:"",url:typeof l.url=="string"?l.url:"",poster:typeof l.poster=="string"?l.poster:"",alt:typeof l.alt=="string"?l.alt:"",...typeof l.provider=="string"&&l.provider?{provider:l.provider}:{}}}return{tour_id:"",url:"",poster:"",alt:""}}const tM={PanelUI:Wj,applyOptimistic:eM,coerce:M1};function nM(n){return n.map(M1)}function aM({min:n,max:l,value:s,propertyId:o,commit:u}){const{items:d}=hh(o),h=M=>d.find(R=>R.id===M),p=M=>{var R;return(M.tour_id?(R=h(M.tour_id))==null?void 0:R.src:void 0)||M.poster},m=_.useMemo(()=>nM(s),[s]),[g,x]=_.useState(!1),b=ei({items:m,min:n,max:l,axis:"xy",commit:u}),{rows:E}=b,j=M=>{b.replace(hc(E,M,R=>R.tour_id,R=>({tour_id:R.id,url:"",poster:R.src,alt:R.caption??"",...R.provider?{provider:R.provider}:{}}),b.mint)),x(!1)};function T(M,R,D){const z=h(M.value.tour_id);return f.jsx(p1,{kind:"tour",poster:p(M.value),index:R,ghost:b.drag.draggingKey===M.key,badge:ac(z??{kind:"tour",provider:M.value.provider}),overlays:D,placeholderClassName:rs})}function C(M,R){return f.jsx(y1,{poster:p(M.value),index:R,placeholderClassName:rs})}return f.jsx(yh,{engine:b,noun:"tour",max:l,emptyText:"No tours yet — use Add to choose tours.",onAdd:()=>x(!0),renderTile:T,renderClone:C,children:g&&f.jsx(cl,{mode:"multi",title:"Add tours",propertyId:o,kinds:["tour"],initialFilter:"tour",noun:"tour",selectedIds:E.map(M=>M.value.tour_id),onApply:j,onClose:()=>x(!1)})})}function lM({slot:n,value:l,onChange:s,propertyId:o}){const[u,d]=_.useState(!1),h=dc(o),{items:p}=_o(o),m=l.video_id?p.find(E=>E.id===l.video_id):void 0,g=(l.video_id?h.get(l.video_id):void 0)??l.poster,x=(m==null?void 0:m.ready)===!1,b=e1(m==null?void 0:m.durationMs);return f.jsx(m1,{kind:"video",label:n.label,poster:g,hasSelection:!!l.video_id,addLabel:"Add video",onPick:()=>d(!0),status:x?"Processing…":null,metaName:m==null?void 0:m.name,metaDetail:b,emptyText:"No video yet",noPosterText:"Preparing poster…",children:u&&f.jsx(cl,{mode:"single",title:"Choose a video",propertyId:o,kinds:["video"],initialFilter:"video",videoSources:n.sources,currentId:l.video_id||void 0,onClose:()=>d(!1),onPick:E=>{d(!1),E.id!==l.video_id&&s({...l,video_id:E.id,url:"",poster:E.src,alt:l.alt||E.caption||"",...E.videoSource==="link"?{source:"link",...E.provider?{provider:E.provider}:{}}:{source:void 0,provider:void 0}})}})})}function Rb(n,l){return n.matches(l)?n:n.querySelector(l)}function iM(n,l){const s=Rb(n,"video");if(s){l.poster&&s.setAttribute("poster",l.poster),l.url&&s.setAttribute("src",l.url),l.alt&&s.setAttribute("aria-label",l.alt);return}const o=Rb(n,"img");o&&l.poster&&o.setAttribute("src",l.poster)}function C1(n){if(n&&typeof n=="object"){const l=n;return{video_id:typeof l.video_id=="string"&&l.video_id.length>0?l.video_id:typeof l.asset_id=="string"?l.asset_id:"",url:typeof l.url=="string"?l.url:"",poster:typeof l.poster=="string"?l.poster:"",alt:typeof l.alt=="string"?l.alt:"",width:typeof l.width=="number"?l.width:void 0,height:typeof l.height=="number"?l.height:void 0,...l.source==="link"?{source:"link"}:{},...typeof l.provider=="string"&&l.provider?{provider:l.provider}:{}}}return{video_id:"",url:"",poster:"",alt:""}}const sM={PanelUI:lM,applyOptimistic:iM,coerce:C1};function oM(n){return n.map(C1)}function rM({itemSlot:n,min:l,max:s,value:o,propertyId:u,commit:d}){const h=dc(u),{items:p}=_o(u),m=D=>p.find(z=>z.id===D),g=D=>(D.video_id?h.get(D.video_id):void 0)??D.poster,x=_.useMemo(()=>oM(o),[o]),[b,E]=_.useState(!1),j=ei({items:x,min:l,max:s,axis:"xy",commit:d}),{rows:T}=j,C=D=>{j.replace(hc(T,D,z=>z.video_id,z=>({video_id:z.id,url:"",poster:z.src,alt:z.caption??"",...z.videoSource==="link"?{source:"link",...z.provider?{provider:z.provider}:{}}:{}}),j.mint)),E(!1)};function M(D,z,I){const le=m(D.value.video_id);return f.jsx(p1,{kind:"video",poster:g(D.value),index:z,ghost:j.drag.draggingKey===D.key,badge:le?ac(le):"",overlays:I,placeholderClassName:rs})}function R(D,z){return f.jsx(y1,{poster:g(D.value),index:z,placeholderClassName:rs})}return f.jsx(yh,{engine:j,noun:"video",max:s,emptyText:"No videos yet — use Add to choose videos.",onAdd:()=>E(!0),renderTile:M,renderClone:R,children:b&&f.jsx(cl,{mode:"multi",title:"Add videos",propertyId:u,kinds:["video"],initialFilter:"video",videoSources:n.sources,selectedIds:T.map(D=>D.value.video_id),onApply:C,onClose:()=>E(!1)})})}function cM(n){const l=n.fields;if(!l)return[];const s=n.item_order;if(!s||s.length===0)return Object.entries(l);const o=new Set,u=[];for(const d of s)d in l&&!o.has(d)&&(o.add(d),u.push([d,l[d]]));for(const[d,h]of Object.entries(l))o.has(d)||u.push([d,h]);return u}function uM(n){switch(n.type){case"text":case"select":case"url":return"";case"number":case"image":case"video":case"tour":case"poi":case"document":return null;case"list":return[]}}function zb(n){const l={};for(const[s,o]of n)l[s]=uM(o);return l}function Db(n,l,s,o){var m;const u=s.title;if(!u)return`Item ${o+1}`;const d=n[u],h=typeof d=="string"?d.trim():"";if(!h)return"Untitled";const p=(m=l.find(([g])=>g===u))==null?void 0:m[1];if((p==null?void 0:p.type)!=="select")return h;for(const g of p.values??[])if(typeof g!="string"&&g.value===h)return g.label;return h}function dM(n){const{editor:l,granularity:s}=mh(n),o=l==="row-editor"?{kind:"record",entries:cM(n)}:{kind:"single",slot:n.element??{type:"text",label:n.label}};return{editor:l,granularity:s,itemContent:o,min:typeof n.min=="number"?n.min:0,max:typeof n.max=="number"?n.max:1/0,axis:l==="gallery"?"xy":"y"}}const fM="flex flex-col gap-2.75",hM="flex items-center justify-between gap-2.5",mM="relative flex flex-col gap-1.75",pM="rounded-[calc(8*var(--content))] border border-dashed border-line px-3 py-3.5 text-center text-[length:calc(12.5*var(--content))] text-ink-4",yM=me(ot,"flex h-8.5 w-full items-center justify-start gap-1.5 rounded-[calc(8*var(--content))] px-2.5 text-[length:calc(12.5*var(--content))] font-medium text-ink-3 transition-colors duration-[120ms] hover:bg-line-soft hover:text-ink disabled:cursor-default disabled:opacity-45 disabled:hover:bg-transparent"),gM="pointer-events-none absolute z-[30] flex items-center gap-2.5 rounded-[calc(8*var(--content))] border border-accent bg-white px-2.5 py-1.75 shadow-[0_14px_30px_-10px_rgba(20,18,13,0.35)]",bM="truncate text-[length:calc(13.5*var(--content))] text-ink";function vM({entry:n}){const l=n?fc(n):void 0;return f.jsx(wo,{glyph:(l==null?void 0:l.glyph)??"doc",extension:""})}function xM({slot:n,min:l,max:s,value:o,propertyId:u,commit:d}){var I;const h=_.useMemo(()=>I3(o),[o]),[p,m]=_.useState(!1),g=l1(u),x=ei({items:h,min:l,max:s,axis:"y",commit:d}),{rows:b}=x,E=le=>{x.replace(hc(b,le,ne=>ne.asset_id,ne=>({asset_id:ne.id}),x.mint)),m(!1)},{containerRef:j,cloneRef:T,getItemProps:C,draggingKey:M,cloneBox:R}=x.drag,D=M?b.find(le=>le.key===M):null,z=`Add ${xo(n.label,"Document")}`;return f.jsxs("div",{className:fM,children:[f.jsx("div",{className:hM,children:f.jsx("span",{className:va,children:n.label})}),f.jsxs("div",{className:me(mM,M&&"select-none [&_*]:select-none"),ref:j,children:[b.length===0&&f.jsx("div",{className:pM,children:"No documents yet — use Add to choose one."}),b.map(le=>f.jsx(o1,{entry:g(le.value.asset_id),onRemove:x.canRemove?()=>x.remove(le.key):void 0,dragProps:C(le.key),dragging:M===le.key},le.key)),D&&f.jsxs("div",{ref:T,className:gM,style:{width:R.w,height:R.h,left:0,top:0},children:[f.jsx(vM,{entry:g(D.value.asset_id)}),f.jsx("span",{className:bM,children:((I=g(D.value.asset_id))==null?void 0:I.name)??"Document unavailable"})]})]}),f.jsxs("button",{type:"button",className:yM,disabled:x.atMax,title:x.atMax?`Maximum ${s} documents`:void 0,onClick:()=>m(!0),children:[f.jsx(De.plus,{})," ",z]}),p&&f.jsx(cl,{mode:"multi",propertyId:u,noun:"document",kinds:["document","photo","video"],initialFilter:"document",selectedIds:b.map(le=>le.value.asset_id),onApply:E,onClose:()=>m(!1)})]})}function _M(n,l){const s=ef(n),o=ef(l);return s!=null||o!=null?s===o:n===l?!0:n==null||l==null?!1:String(n)===String(l)}function wM(n,l,s,o,u){const d=Dl(p=>p.markSlotOverridden),h=!u&&c1(n)===null;return function(m,g){h&&d(l,s,{kind:"scalar"}),o(m.map(x=>x.value))}}async function SM(n,l,s){const o=await n(`/properties/${l}/poi/search`,{method:"POST",json:{query:s}});return Array.isArray(o==null?void 0:o.results)?o.results:[]}async function A1(n,l,s){return n(`/properties/${l}/poi/${encodeURIComponent(s)}`)}async function kM(n,l,s){if(s.length===0)return{};const o=await n(`/properties/${l}/poi/photo-urls`,{method:"POST",json:{place_ids:s}});return(o==null?void 0:o.urls)??{}}function N1(n){if(n==null||!Number.isFinite(n))return null;const l=n/1609.344;return l<.1?"< 0.1 mi":`${l.toFixed(1)} mi`}let EM=0;function jM(){return`poi${++EM}${Math.random().toString(36).slice(2,6)}`}const lc=n=>typeof n=="number"&&Number.isFinite(n)?n:void 0,io=n=>typeof n=="string"&&n!==""?n:void 0;function MM(n){const l={},s=lc(n.rating);s!==void 0&&(l.rating=s);const o=lc(n.review_count);o!==void 0&&(l.review_count=o);const u=io(n.type_label);u!==void 0&&(l.type_label=u);const d=io(n.price_level);d!==void 0&&(l.price_level=d);const h=io(n.website_uri);h!==void 0&&(l.website_uri=h);const p=io(n.google_maps_uri);p!==void 0&&(l.google_maps_uri=p);const m=io(n.summary);m!==void 0&&(l.summary=m);const g=CM(n.photo);return g!==void 0&&(l.photo=g),l}function CM(n){if(!n||typeof n!="object")return;const l=n,s=lc(l.width),o=lc(l.height),u=l.attribution;if(!(s===void 0||o===void 0||typeof u!="string"))return{width:s,height:o,attribution:u}}function T1(n){if(!n||typeof n!="object")return null;const l=n;return typeof l.place_id!="string"||typeof l.name!="string"||typeof l.lat!="number"||typeof l.lng!="number"?null:{id:typeof l.id=="string"?l.id:jM(),place_id:l.place_id,name:l.name,address:typeof l.address=="string"?l.address:null,lat:l.lat,lng:l.lng,distance_m:typeof l.distance_m=="number"?l.distance_m:null,...MM(l)}}function AM(n){return n.map(T1).filter(l=>l!==null)}function NM(n){return[n.rating===void 0?null:`★ ${n.rating.toFixed(1)}${n.review_count===void 0?"":` (${n.review_count.toLocaleString()})`}`,n.type_label,N1(n.distance_m),n.address].filter(Boolean).join(" · ")}const gh="group/row relative flex min-h-10.5 items-center gap-2.5 rounded-[calc(8*var(--content))] border border-line bg-white px-2.5 py-1.75 [transition:border-color_.14s,box-shadow_.14s,background_.3s]",ic="grid w-5 flex-shrink-0 place-items-center text-ink-4",bh="flex min-w-0 flex-1 flex-col gap-px",sc="truncate text-[length:calc(13.5*var(--content))] text-ink",vh="truncate text-caption text-ink-3",O1="rounded-[calc(8*var(--content))] border border-dashed border-line px-3 py-3.5 text-center text-[length:calc(12.5*var(--content))] text-ink-4",R1="text-caption text-danger",z1="opacity-70",D1="size-[calc(14*var(--content))] flex-shrink-0 animate-[we-ml-spin_.7s_linear_infinite] rounded-full border-2 border-[#d9d5c9] border-t-accent",TM="size-[calc(26*var(--content))] flex-shrink-0 rounded-[calc(5*var(--content))] object-cover bg-[#f1f0ea]",OM="we-no-drag flex flex-shrink-0 items-center gap-0.75",RM="flex items-center gap-0.75 opacity-0 transition-opacity duration-[120ms] group-hover/row:opacity-100",zM="grid size-6 cursor-pointer place-items-center rounded-md border-0 bg-transparent p-0 text-ink-3 outline-none hover:bg-[#f1f0ea] hover:text-ink-2",U1=()=>f.jsxs("svg",{viewBox:"0 0 16 16",width:"14",height:"14",className:"w-[calc(14*var(--content))] h-[calc(14*var(--content))]",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[f.jsx("path",{d:"M8 14s4.5-4 4.5-7.5a4.5 4.5 0 0 0-9 0C3.5 10 8 14 8 14Z"}),f.jsx("circle",{cx:"8",cy:"6.4",r:"1.7"})]});function L1(n,l){const{apiFetch:s}=Yn().api,[o,u]=_.useState({}),d=l.filter(p=>p.photo).map(p=>p.place_id).sort().join(","),h=_.useRef(new Set);return _.useEffect(()=>{const m=(d===""?[]:d.split(",")).filter(g=>!h.current.has(g));m.length!==0&&(m.forEach(g=>h.current.add(g)),kM(s,n,m).then(g=>{u(x=>({...x,...g}))}).catch(()=>{m.forEach(g=>h.current.delete(g))}))},[d,n,s]),{urls:o,dropUrl:p=>u(m=>{if(!(p in m))return m;const g={...m};return delete g[p],g})}}function B1({row:n,photoUrl:l,onPhotoError:s,onRemove:o,dragProps:u,dragging:d,flashNew:h}){const p=NM(n);return f.jsxs("div",{...u,className:me(gh,u&&"cursor-grab hover:border-[#d9d5c9]",d&&"cursor-grabbing border-transparent bg-accent-soft [&>*]:opacity-[0.25]",h&&"animate-[we-ml-rowin_.26s_cubic-bezier(.2,.7,.3,1)_both]"),children:[l?f.jsx("img",{className:TM,src:l,alt:"",draggable:!1,onError:s}):f.jsx("span",{className:ic,children:f.jsx(U1,{})}),f.jsxs("div",{className:bh,children:[f.jsx("span",{className:sc,children:n.name}),p&&f.jsx("span",{className:vh,children:p})]}),o&&f.jsx("div",{className:OM,children:f.jsx("span",{className:RM,children:f.jsx("button",{type:"button",className:me(zM,"hover:bg-[#fbecea] hover:text-danger"),title:"Remove",onClick:o,children:f.jsx(De.trash,{})})})})]})}const DM="relative flex flex-col",UM="flex min-w-0 items-center gap-2 rounded-[calc(8*var(--content))] border border-line bg-white px-2.5 transition-[border-color,box-shadow] duration-[120ms] focus-within:border-accent focus-within:shadow-[0_0_0_3px_rgba(15,42,34,0.07)]",LM="grid flex-shrink-0 place-items-center text-ink-4",BM="min-w-0 flex-1 appearance-none border-0 bg-transparent py-2.25 text-[length:calc(13.5*var(--content))] text-ink placeholder:text-ink-4",HM="size-[calc(15*var(--content))] flex-shrink-0 animate-[we-ml-spin_.7s_linear_infinite] rounded-full border-2 border-[#d9d5c9] border-t-accent",qM="absolute left-0 right-0 top-[calc(100%+4*var(--content))] z-[40] overflow-hidden rounded-[calc(8*var(--content))] border border-line bg-white shadow-[0_14px_30px_-12px_rgba(20,18,13,0.28)]",GM="m-0 max-h-[calc(264*var(--content))] list-none overflow-y-auto p-1",IM=me(ot,"flex w-full flex-col gap-px rounded-md px-2 py-1.75 text-left"),QM="bg-accent-soft",VM="cursor-default opacity-55",YM="flex items-center gap-1.5 truncate text-[length:calc(13.5*var(--content))] text-ink",KM="truncate text-caption text-ink-3",Yd="px-3 py-3 text-center text-[length:calc(12.5*var(--content))] text-ink-4",$M="inline-flex flex-shrink-0 items-center gap-1 text-good",XM=2,FM=300;function H1({propertyId:n,placeholder:l,addedIds:s,disabled:o=!1,disabledHint:u,onSelect:d}){const{apiFetch:h}=Yn().api,[p,m]=_.useState(""),[g,x]=_.useState([]),[b,E]=_.useState("idle"),[j,T]=_.useState(0),[C,M]=_.useState(0),R=_.useRef(0),D=_.useId();_.useEffect(()=>{const ne=p.trim();if(ne.length<XM){++R.current,E("idle"),x([]);return}const W=++R.current;E("loading");const L=setTimeout(()=>{SM(h,n,ne).then(ue=>{W===R.current&&(x(ue),T(0),E(ue.length?"results":"empty"))}).catch(()=>{W===R.current&&E("error")})},FM);return()=>clearTimeout(L)},[p,n,C,h]);function z(ne){s.has(ne.place_id)||(d(ne),m(""),x([]),E("idle"))}function I(ne){if(ne.key==="Escape"){E("idle"),x([]);return}if(b==="results"){if(ne.key==="ArrowDown")ne.preventDefault(),T(W=>Math.min(g.length-1,W+1));else if(ne.key==="ArrowUp")ne.preventDefault(),T(W=>Math.max(0,W-1));else if(ne.key==="Enter"){ne.preventDefault();const W=g[j];W&&z(W)}}}const le=b!=="idle";return f.jsxs("div",{className:DM,onBlur:ne=>{ne.currentTarget.contains(ne.relatedTarget)||E("idle")},children:[f.jsxs("div",{className:me(UM,o&&"opacity-55"),role:"combobox","aria-expanded":le,"aria-haspopup":"listbox","aria-controls":D,children:[f.jsx("span",{className:LM,children:f.jsx(De.search,{})}),f.jsx("input",{className:BM,value:p,placeholder:l,disabled:o,title:o?u:void 0,onChange:ne=>m(ne.target.value),onKeyDown:I,"aria-label":l,"aria-autocomplete":"list","aria-activedescendant":b==="results"?`${D}-${j}`:void 0}),b==="loading"&&f.jsx("span",{className:HM})]}),le&&f.jsxs("div",{className:qM,children:[b==="loading"&&f.jsx("div",{className:Yd,children:"Searching…"}),b==="empty"&&f.jsxs("div",{className:Yd,children:["No places found for “",p.trim(),"”."]}),b==="error"&&f.jsxs("div",{className:Yd,children:["Couldn't reach search."," ",f.jsx("button",{type:"button",className:"font-semibold text-accent-ink underline",onClick:()=>M(ne=>ne+1),children:"Retry"})]}),b==="results"&&f.jsx("ul",{className:GM,role:"listbox",id:D,children:g.map((ne,W)=>{const L=s.has(ne.place_id),ue=[N1(ne.distance_m),ne.address].filter(Boolean).join(" · ");return f.jsx("li",{id:`${D}-${W}`,role:"option","aria-selected":W===j,children:f.jsxs("button",{type:"button",disabled:L,className:me(IM,W===j&&!L&&QM,L&&VM),onMouseEnter:()=>T(W),onClick:()=>z(ne),children:[f.jsxs("span",{className:YM,children:[L&&f.jsxs("span",{className:$M,children:[f.jsx(De.check,{size:12})," Added ·"]}),f.jsx("span",{className:"truncate",children:ne.name})]}),ue&&f.jsx("span",{className:KM,children:ue})]})},ne.place_id)})})]})]})}const ZM="flex flex-col gap-2.75",PM="flex items-center justify-between gap-2.5 text-[length:calc(10.5*var(--content))] font-medium text-ink-4",JM="relative flex flex-col gap-1.75",WM="pointer-events-none absolute z-[30] flex items-center gap-2.5 rounded-[calc(8*var(--content))] border border-accent bg-white px-2.5 py-1.75 shadow-[0_14px_30px_-10px_rgba(20,18,13,0.35)]",eC=400;function tC({slot:n,min:l,max:s,value:o,propertyId:u,commit:d}){const{apiFetch:h}=Yn().api,p=_.useMemo(()=>AM(o),[o]),[m,g]=_.useState(null),[x,b]=_.useState(null),[E,j]=_.useState({}),T=_.useRef({});_.useEffect(()=>()=>{Object.values(T.current).forEach(clearTimeout)},[]);const C=ei({items:p,identityOf:ie=>ie.id,min:l,max:s,axis:"y",commit:d}),{rows:M}=C,{urls:R,dropUrl:D}=L1(u,p);function z(ie){j(U=>({...U,[ie]:!0})),clearTimeout(T.current[ie]),T.current[ie]=setTimeout(()=>j(U=>{const H={...U};return delete H[ie],H}),eC)}async function I(ie){if(g(null),!C.atMax&&!C.latestRows().some(U=>U.value.place_id===ie.place_id)){b(ie);try{let U;try{U=await A1(h,u,ie.place_id)}catch{g("Couldn't add that place — try again.");return}if(C.latestRows().some(H=>H.value.place_id===U.place_id))return;C.add(U),z(U.id)}finally{b(null)}}}const{containerRef:le,cloneRef:ne,getItemProps:W,draggingKey:L,cloneBox:ue}=C.drag,de=L?M.find(ie=>ie.key===L):null,re=new Set(M.map(ie=>ie.value.place_id));return f.jsxs("div",{className:ZM,children:[f.jsx("div",{className:PM,children:f.jsx("span",{children:n.label})}),f.jsx(H1,{propertyId:u,placeholder:n.placeholder??"Search nearby…",addedIds:re,disabled:C.atMax,disabledHint:`Maximum ${s} places`,onSelect:ie=>void I(ie)}),m&&f.jsx("span",{className:R1,children:m}),f.jsxs("div",{className:me(JM,L&&"select-none [&_*]:select-none"),ref:le,children:[M.length===0&&!x&&f.jsx("div",{className:O1,children:"No places yet — search above to add one."}),M.map(ie=>f.jsx(B1,{row:ie.value,photoUrl:R[ie.value.place_id],onPhotoError:()=>D(ie.value.place_id),onRemove:C.canRemove?()=>C.remove(ie.key):void 0,dragProps:W(ie.key),dragging:L===ie.key,flashNew:E[ie.value.id]===!0},ie.key)),x&&f.jsxs("div",{className:me(gh,z1),"aria-live":"polite",children:[f.jsx("span",{className:ic,children:f.jsx("span",{className:D1})}),f.jsxs("div",{className:bh,children:[f.jsx("span",{className:sc,children:x.name}),f.jsx("span",{className:vh,children:"Adding…"})]})]}),de&&f.jsxs("div",{ref:ne,className:WM,style:{width:ue.w,height:ue.h,left:0,top:0},children:[f.jsx("span",{className:ic,children:f.jsx(U1,{})}),f.jsx("span",{className:sc,children:de.value.name})]})]})]})}const nC='input, textarea, select, button, [tabindex]:not([tabindex="-1"]), [contenteditable="true"]',Of="data-field-name";function aC(n,l){var o;const s=Array.from(n.querySelectorAll(`[${Of}]`)).find(u=>u.getAttribute(Of)===l);s&&(s.scrollIntoView({block:"nearest"}),(o=s.querySelector(nC))==null||o.focus({preventScroll:!0}))}function Rf({slot:n,instanceId:l,slotId:s,value:o,propertyId:u,onChange:d,overridden:h,selectedItemIndex:p,selectedFieldName:m,itemBaseline:g,recordContext:x}){const b=K1(n.type);if(!b)return null;const E=b.coerce(o),{PanelUI:j}=b;return f.jsx(j,{slot:n,instanceId:l,slotId:s,value:E,onChange:d,propertyId:u,selectedItemIndex:p,selectedFieldName:m,overridden:h,itemBaseline:g,recordContext:x})}function lC(n){var l,s;switch(mh(n).editor){case"gallery":return((l=n.element)==null?void 0:l.type)==="video"?Ck:((s=n.element)==null?void 0:s.type)==="tour"?Zf:Uk;case"poi-curation":return a5;case"document-list":return jk;case"row-editor":return $f;case"scalar-list":return Xk}}function iC(n){switch(n.type){case"text":return U5;case"url":return Vk;case"image":return Ff;case"video":return av;case"tour":return Zf;case"poi":return P0;case"document":return Xf;case"select":return o5;case"list":return lC(n);default:return $f}}function q1(n){const l=new Set(n.map(iC));return l.size===1?[...l][0]:$f}function sC(){return`tmp_${globalThis.crypto.randomUUID()}`}function oC(n){return typeof n=="string"&&n.startsWith("tmp_")}const rC=me(ot,"flex w-full items-center justify-start gap-2 rounded-lg p-2.75 text-body font-semibold text-ink-3 transition-colors duration-[120ms] hover:bg-line-soft hover:text-ink"),cC=me(ot,"inline-flex items-center gap-1.75 self-start h-9 px-3 rounded-lg text-body font-medium text-danger transition-[background,color] duration-[120ms] hover:bg-danger/15 focus-visible:bg-danger/15 focus-visible:ring-2 focus-visible:ring-danger/25"),uC="relative flex flex-col gap-3",dC="data-[ghost]:opacity-40",fC="pointer-events-none absolute left-0 top-0 z-50 flex items-center gap-2.5 overflow-hidden rounded border border-line bg-canvas pl-2 pr-3.5 shadow-[0_16px_38px_-8px_rgba(20,18,13,0.5)]";function Kd(n,l){return l&&typeof n[l]=="string"?{key:l,value:n[l]}:null}function hC({slot:n,entries:l,min:s,max:o,instanceId:u,slotId:d,value:h,commit:p,selectedItemIndex:m,selectedFieldName:g,itemBaseline:x}){const{Accordion:b,AccordionHeader:E}=Yn(),j=l.filter(([,Z])=>$1(Z)),T=bv(n.layout,j.map(([Z])=>Z)),C=q1(l.map(([,Z])=>Z)),M=Dl(Z=>Z.session.property_id),R=Dl(Z=>Z.select),D=Dl(Z=>Z.markSlotOverridden),z=Dl(Z=>Z.relinkSlot),I=c1(n),le=I?r1[I].idKey:null;function ne(Z){R({kind:"slot",instance_id:u,slot_id:d,item_index:Z})}const W=_.useRef(null),L=ei({items:h,identityOf:Z=>{var pe;return((pe=Kd(Z,le))==null?void 0:pe.value)??null},min:s,max:o,axis:"y",commit:p,onCommitted:(Z,pe)=>{const ge=W.current;if(pe!=="reorder"||ge==null)return;const Ee=Z.findIndex(Re=>Re.key===ge);Ee>=0&&ne(Ee)}}),{rows:ue}=L,de=m??null,re=de!=null?L.keyAt(de):null;_.useEffect(()=>{W.current=re},[re]);const ie=_.useRef(null);_.useEffect(()=>{re==null||!g||!ie.current||aC(ie.current,g)},[re,g]);function U(){R({kind:"slot",instance_id:u,slot_id:d})}function H(Z){if(re===Z)return U();const pe=L.indexOf(Z);pe<0||ne(pe)}function $(){if(L.atMax)return;const Z=I?{...zb(l),[le]:sC()}:zb(l);L.add(Z),ne(ue.length)}function w(Z){if(!L.canRemove)return;const pe=ue.find(Re=>Re.key===Z),ge=pe==null?void 0:pe.value[le??""];I!==null&&pe!=null&&typeof ge=="string"&&!oC(ge)&&D(u,d,{kind:"item_removed",item_id:ge});const Ee=L.indexOf(Z);L.remove(Z),re===Z?U():de!=null&&Ee>=0&&Ee<de&&ne(de-1)}function F(Z,pe){const ge=ue.find(Re=>Re.key===Z);if(ge==null)return;const Ee=Kd(ge.value,le);if(Ee!=null){const Re=x==null?void 0:x.find(Ue=>Ue[Ee.key]===Ee.value);for(const Ue of Object.keys(pe))if(Ue!==Ee.key){const nt=Re==null?void 0:Re[Ue];Re!=null&&_M(pe[Ue],nt)?z(u,d,{kind:"item",item_id:Ee.value,field:Ue}):D(u,d,{kind:"item",item_id:Ee.value,field:Ue})}}L.setValue(Z,{...ge.value,...pe})}const{containerRef:ce,cloneRef:ee,getItemProps:G,draggingKey:S,cloneBox:q}=L.drag,Y=S?ue.find(Z=>Z.key===S):null,N=Y?ue.indexOf(Y):-1,P=Y?Db(Y.value,l,n,N):"";function Q(){return f.jsx("div",{ref:ee,className:fC,style:{width:q.w,height:q.h},children:f.jsx(E,{icon:f.jsx(C,{size:14}),title:P,showGrip:!0,showChevron:!1})})}return f.jsxs("div",{className:"flex flex-col gap-3",children:[f.jsxs("div",{ref:ce,className:me(uC,S&&"select-none [&_*]:select-none"),children:[ue.map((Z,pe)=>{const ge=Db(Z.value,l,n,pe);return f.jsx("div",{"data-ghost":S===Z.key?"":void 0,className:dC,children:f.jsx(b,{open:S==null&&re===Z.key,onToggle:()=>H(Z.key),icon:f.jsx(C,{size:14}),title:ge,scrollKey:Z.key,dragId:Z.key,dragHandleProps:{onPointerDown:G(Z.key).onPointerDown},children:f.jsxs("div",{className:"flex flex-col gap-4",ref:re===Z.key?ie:void 0,children:[f.jsx(vv,{rows:T,items:j.map(([Ee,Re])=>{var Ue;return f.jsx("div",{[Of]:Ee,children:f.jsx(Rf,{slot:Re,instanceId:u,slotId:d,value:Z.value[Ee],propertyId:M,onChange:nt=>F(Z.key,{[Ee]:nt}),recordContext:{itemId:(Ue=Kd(Z.value,le))==null?void 0:Ue.value,itemIndex:pe,siblingRecords:ue.map(nt=>nt.value),fieldKey:Ee}})},Ee)})}),re===Z.key&&L.canRemove&&f.jsxs("button",{type:"button",className:me(cC,"max-w-full"),onClick:()=>w(Z.key),children:[f.jsx("span",{className:"inline-flex shrink-0",children:f.jsx(De.trash,{size:13})}),f.jsxs("span",{className:"min-w-0 truncate",children:["Delete ",ge]})]})]})})},Z.key)}),Y?Q():null]}),!L.atMax&&f.jsxs("button",{type:"button",className:rC,onClick:$,children:[f.jsx(De.plus,{})," Add ",xo(n.label)]})]})}const $d={listing_intent:n=>[{value:"for_sale",label:"For Sale"},{value:"for_rent",label:"For Rent"}]};function mC(n){return typeof n=="string"?{value:n,label:n}:{value:n.value,label:n.label}}function G1(n,l){var o,u;if(n.values)return n.values.map(mC);const s=(o=n.options)==null?void 0:o.source;return s!==void 0&&s!==""?((u=$d[s])==null?void 0:u.call($d,l))??[]:[]}function pC(n){return n.trim().toLowerCase().replace(/\s+/g,"-")}const yC="fixed z-[120] max-h-[calc(240*var(--content))] overflow-y-auto rounded-[calc(8*var(--content))] border border-line bg-white shadow-[0_16px_38px_-12px_rgba(20,18,13,0.4)]",I1=me(ot,"flex w-full items-center justify-between gap-2 rounded-none px-2.5 py-2 text-left text-body text-ink hover:bg-accent-soft data-[active=true]:bg-accent-soft"),gC=me(I1,"text-accent"),bC=4,Ub=160,Lb=8,vC=me(ot,"min-w-0 flex-1 cursor-text bg-transparent py-2.25 text-left text-[length:calc(13.5*var(--content))] text-ink outline-none placeholder:text-ink-4");function Bb({open:n,className:l,onMouseDown:s}){return f.jsx("span",{className:me("flex flex-shrink-0 items-center text-ink-4 transition-transform duration-[120ms]",n&&"rotate-180",l),onMouseDown:s,"aria-hidden":"true",children:f.jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:f.jsx("path",{d:"m6 9 6 6 6-6"})})})}function xC(){return f.jsx("svg",{className:"flex-shrink-0 text-ink-2",width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:f.jsx("path",{d:"M3.5 8.5l3 3 6-6.5"})})}function _C(n,l){const s=l.toLowerCase().trim();return s?n.filter(o=>o.label.toLowerCase().includes(s)):n}function wC(n,l){const s=l.toLowerCase().trim();return n.some(o=>o.label.toLowerCase()===s)}function zf({label:n,value:l,options:s,onChange:o,placeholder:u,bare:d=!1,autoOpen:h=!1,onDismiss:p,id:m,creatable:g=!1,canCreate:x}){const[b,E]=_.useState(h),[j,T]=_.useState(0),[C,M]=_.useState(null),[R,D]=_.useState(""),z=_.useId(),I=_.useRef(null),le=_.useRef(null),ne=_.useRef(null),W=s.findIndex(Q=>Q.value===l),L=W>=0?s[W]:void 0,ue=_C(s,b?R:""),de=pC(R),re=b&&de.length>0?s.find(Q=>Q.value===de):void 0,ie=re&&!ue.some(Q=>Q.value===re.value)?[...ue,re]:ue,U=g&&de.length>0&&!wC(s,R)&&!re&&((x==null?void 0:x(de))??!0),H=ie.length+(U?1:0);function $(){ne.current&&M(ne.current.getBoundingClientRect()),T(Math.max(0,W)),E(!0)}const w=_.useCallback(()=>{E(!1),D(""),p==null||p()},[p]);function F(Q){var Z;Q.value!==l&&o(Q.value),E(!1),D(""),(Z=le.current)==null||Z.focus()}function ce(Q){var Z;o(Q),E(!1),D(""),(Z=le.current)==null||Z.focus()}function ee(Q){var Z;if(!b){(Q.key==="ArrowDown"||Q.key==="Enter"||Q.key===" ")&&(Q.preventDefault(),$());return}if(Q.key==="Escape")Q.preventDefault(),(Z=le.current)==null||Z.focus(),w();else if(Q.key==="ArrowDown")Q.preventDefault(),T(pe=>Math.min(H-1,pe+1));else if(Q.key==="ArrowUp")Q.preventDefault(),T(pe=>Math.max(0,pe-1));else if(Q.key==="Enter")if(Q.preventDefault(),j<ie.length){const pe=ie[j];pe&&F(pe)}else U&&ce(de)}const G=_.useCallback(Q=>{var ge,Ee;const Z=(ge=I.current)==null?void 0:ge.contains(Q),pe=(Ee=document.getElementById(z))==null?void 0:Ee.contains(Q);return!Z&&!pe},[z]);function S(Q){b&&G(Q.relatedTarget)&&w()}_.useEffect(()=>{var Q;h&&((Q=le.current)==null||Q.focus())},[h]),_.useEffect(()=>{if(!b)return;const Q=()=>{ne.current&&M(ne.current.getBoundingClientRect())};return Q(),window.addEventListener("scroll",Q,!0),window.addEventListener("resize",Q),()=>{window.removeEventListener("scroll",Q,!0),window.removeEventListener("resize",Q)}},[b]),_.useEffect(()=>{if(!b)return;const Q=Z=>{G(Z.target)&&w()};return document.addEventListener("mousedown",Q),()=>document.removeEventListener("mousedown",Q)},[b,G,w]);const q=Q=>{Q.preventDefault(),b||$()},Y=f.jsx("input",{ref:le,id:m,className:d?vC:me(ss,"cursor-text"),value:b?R:(L==null?void 0:L.label)??l,placeholder:u??"",role:"combobox","aria-haspopup":"listbox","aria-expanded":b,"aria-controls":z,"aria-label":n,onFocus:$,onClick:()=>{b||$()},onChange:Q=>{D(Q.target.value),b||$(),T(0)},onKeyDown:ee}),N=d?f.jsxs(f.Fragment,{children:[Y,f.jsx(Bb,{open:b,className:"pl-2",onMouseDown:q})]}):f.jsxs(f.Fragment,{children:[Y,f.jsx(Bb,{open:b,className:"pl-1 pr-2.75",onMouseDown:q})]}),P=b&&C&&H>0?th.createPortal(f.jsxs("div",{className:yC,id:z,role:"listbox",style:{left:Math.max(Lb,Math.min(C.left,window.innerWidth-Math.max(C.width,Ub)-Lb)),top:C.bottom+bC,minWidth:Math.max(C.width,Ub)},children:[ie.map((Q,Z)=>f.jsxs("button",{type:"button",role:"option","aria-selected":Q.value===l,"data-active":Z===j,className:I1,onMouseEnter:()=>T(Z),onMouseDown:pe=>pe.preventDefault(),onClick:()=>F(Q),children:[f.jsx("span",{className:"truncate",children:Q.label}),Q.value===l&&f.jsx(xC,{})]},Q.value)),U&&f.jsx("button",{type:"button",role:"option","aria-selected":j===ie.length,"data-active":j===ie.length,className:gC,onMouseEnter:()=>T(ie.length),onMouseDown:Q=>Q.preventDefault(),onClick:()=>ce(de),children:f.jsxs("span",{className:"truncate",children:["Create “",de,"”"]})})]}),document.body):null;return d?f.jsxs("div",{className:"flex min-w-0 flex-1 items-center",ref:Q=>{I.current=Q,ne.current=Q},onBlurCapture:S,children:[N,P]}):f.jsxs("div",{className:Qn,ref:I,onBlurCapture:S,children:[f.jsx("span",{className:va,children:n}),f.jsx("div",{className:me(vo,b&&"border-accent"),ref:ne,children:N}),P]})}const SC="relative flex flex-col gap-2",kC="group/li flex cursor-text touch-none items-center gap-2 rounded-[calc(8*var(--content))] border border-line bg-white px-2.75 transition-[border-color,box-shadow] duration-[120ms] hover:border-[#d9d5c9] focus-within:border-accent",EC=me(ot,"we-no-drag grid size-5.5 flex-shrink-0 place-items-center rounded-[calc(5*var(--content))] text-ink-3 transition-[background,color] duration-[120ms] hover:bg-[#FBE6E2] hover:text-[#8E2C1E]"),jC="pointer-events-none absolute z-[60] flex cursor-grabbing items-center gap-2 overflow-hidden rounded-[calc(8*var(--content))] bg-white px-2.75 text-[length:calc(13.5*var(--content))] text-ink shadow-[0_16px_38px_-8px_rgba(20,18,13,0.5)] after:absolute after:inset-0 after:rounded-[calc(9*var(--content))] after:border after:border-solid after:border-[#d9d5c9] after:content-['']",MC=me(ot,"flex h-8.5 w-full items-center justify-start gap-1.5 rounded-[calc(8*var(--content))] px-2.5 text-[length:calc(12.5*var(--content))] font-medium text-ink-3 transition-colors duration-[120ms] hover:bg-line-soft hover:text-ink");function CC(n){const l=n.currentTarget.control;if(!l||n.target===l||n.target.closest("button")||(n.preventDefault(),l.focus(),!(l instanceof HTMLInputElement)))return;const o=n.clientX<l.getBoundingClientRect().left?0:l.value.length;l.setSelectionRange(o,o)}function Q1({engine:n,label:l,addLabel:s=`Add ${xo(l)}`,renderControl:o,cloneText:u,onAdd:d,renderAdd:h,addDisabled:p=!1}){const{rows:m,drag:g}=n,{containerRef:x,cloneRef:b,getItemProps:E,draggingKey:j,cloneBox:T}=g,C=j?m.find(R=>R.key===j):null,M=h==null?void 0:h(n.add);return f.jsxs("div",{className:Qn,children:[f.jsx("span",{className:va,children:l}),f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsxs("div",{className:me(SC,j&&"select-none [&_*]:select-none"),ref:x,children:[m.map(R=>f.jsxs("label",{htmlFor:R.key,onClick:CC,...E(R.key),"data-ghost":j===R.key?"":void 0,className:me(kC,j===R.key&&"cursor-grabbing border-transparent bg-accent-soft"),children:[f.jsx("span",{"aria-hidden":"true",className:"flex flex-shrink-0 cursor-grab items-center text-ink-4 transition-colors duration-[120ms] hover:text-ink-2 group-data-[ghost]/li:opacity-[0.25]",children:f.jsx(De.grip,{})}),o({id:R.key,value:R.value,onChange:D=>n.setValue(R.key,D)}),n.canRemove&&f.jsx("button",{type:"button",className:EC,title:"Remove",onClick:()=>n.remove(R.key),children:f.jsx(De.trash,{})})]},R.key)),C&&f.jsxs("div",{ref:b,className:jC,style:{width:T.w,height:T.h,left:0,top:0,position:"absolute"},children:[f.jsx("span",{"aria-hidden":"true",className:"flex flex-shrink-0 items-center text-ink-4",children:f.jsx(De.grip,{})}),f.jsx("span",{className:"min-w-0 flex-1 truncate py-2.25",children:u(C.value)})]})]}),M??(!n.atMax&&!p&&f.jsxs("button",{type:"button",className:MC,onClick:()=>d(n.add),children:[f.jsx(De.plus,{})," ",s]}))]})]})}function AC({engine:n,label:l,placeholder:s="List item",addLabel:o,maxLength:u}){return f.jsx(Q1,{engine:n,label:l,addLabel:o,cloneText:d=>d,renderControl:({id:d,value:h,onChange:p})=>f.jsx(Zr,{bare:!0,id:d,value:h,onChange:p,placeholder:s,ariaLabel:s,maxLength:u,className:"cursor-[inherit] py-2.25 text-[length:calc(13.5*var(--content))] group-data-[ghost]/li:opacity-[0.25]"}),onAdd:d=>d("")})}function NC({engine:n,label:l,options:s,unique:o=!1,creatable:u=!1}){const[d,h]=_.useState(!1),p=n.rows.map(E=>E.value),m=E=>o?s.filter(j=>j.value===E||!p.includes(j.value)):s,g=m(null),x=E=>{var j;return((j=s.find(T=>T.value===E))==null?void 0:j.label)??E},b=E=>!o||!p.includes(E);return f.jsx(Q1,{engine:n,label:l,addDisabled:!u&&g.length===0,cloneText:E=>x(E),renderControl:({id:E,value:j,onChange:T})=>f.jsx(zf,{bare:!0,id:E,label:l,value:j,options:m(j),onChange:T,creatable:u,canCreate:b}),onAdd:()=>h(!0),renderAdd:E=>d?f.jsx(zf,{bare:!0,autoOpen:!0,label:`Add ${xo(l)}`,value:"",placeholder:"Choose one",options:g,onDismiss:()=>h(!1),onChange:j=>{h(!1),E(j)},creatable:u,canCreate:b}):null})}function TC({slot:n,itemSlot:l,min:s,max:o,value:u,commit:d}){const h=Dl(m=>m.session.listing_intent),p=ei({items:u,min:s,max:o,axis:"y",commit:d});return l.type==="select"?f.jsx(NC,{engine:p,label:n.label,options:G1(l,{listingIntent:h}),creatable:l.creatable===!0,unique:n.unique===!0}):f.jsx(AC,{engine:p,label:n.label,maxLength:l.cap})}function OC(n){const{slot:l,instanceId:s,slotId:o,value:u,onChange:d,recordContext:h}=n,p=dM(l),m=wM(l,s,o,d,h!=null);if(p.itemContent.kind==="record")return f.jsx(hC,{slot:l,entries:p.itemContent.entries,min:p.min,max:p.max,instanceId:s,slotId:o,value:u,commit:m,selectedItemIndex:n.selectedItemIndex,selectedFieldName:n.selectedFieldName,itemBaseline:n.itemBaseline});const g=p.itemContent.slot;return p.editor==="gallery"?g.type==="tour"?f.jsx(aM,{min:p.min,max:p.max,value:u,propertyId:n.propertyId,commit:m}):g.type==="video"?f.jsx(rM,{itemSlot:g,min:p.min,max:p.max,value:u,propertyId:n.propertyId,commit:m}):f.jsx(Jj,{itemSlot:g,min:p.min,max:p.max,instanceId:s,slotId:o,value:u,propertyId:n.propertyId,selectedItemIndex:n.selectedItemIndex,commit:m}):p.editor==="document-list"?f.jsx(xM,{slot:l,min:p.min,max:p.max,value:u,propertyId:n.propertyId,commit:m}):p.editor==="poi-curation"?f.jsx(tC,{slot:l,min:p.min,max:p.max,value:u,propertyId:n.propertyId,commit:m}):f.jsx(TC,{slot:l,itemSlot:g,min:p.min,max:p.max,value:u,commit:m})}const RC={PanelUI:OC,applyOptimistic:null,coerce:n=>Array.isArray(n)?n:[]};function zC(n,l){const s=String(n??"").replace(/[^\d.]/g,"");if(s==="")return"";const[o,u]=s.split("."),d=Number((o||"0").replace(/[^\d]/g,"")||0).toLocaleString("en-US");return u!=null?`${d}.${u}`:d}function DC(n,l){let s=n.replace(l!=null&&l.decimals?/[^\d.]/g:/[^\d]/g,"");if(l!=null&&l.decimals){const u=s.indexOf(".");u>=0&&(s=s.slice(0,u+1)+s.slice(u+1).replace(/\./g,""))}const o=s.replace(/[^\d]/g,"");return(l==null?void 0:l.maxDigits)!=null&&o.length>l.maxDigits?null:s}function UC({label:n,value:l,onChange:s,prefix:o,suffix:u,group:d,decimals:h,maxDigits:p,placeholder:m,errorText:g}){const x=d?zC(l):l;return f.jsxs("div",{className:Qn,children:[f.jsx("span",{className:va,children:n}),f.jsxs("div",{className:me(vo,g&&"border-danger"),children:[o&&f.jsx("span",{className:me(tf,"pl-2.75"),children:o}),f.jsx("input",{className:me(ss,"[font-variant-numeric:tabular-nums]",o&&"pl-1"),inputMode:h?"decimal":"numeric",value:x,placeholder:m??"0",onChange:b=>{const E=DC(b.target.value,{decimals:h,maxDigits:p});E!=null&&s(E)}}),u&&f.jsx("span",{className:me(tf,"pr-2.75"),children:u})]}),g&&f.jsx("p",{className:Jf,children:g})]})}function LC(n){return n==null?"":String(n)}function V1(n){const l=n.trim();if(l==="")return null;const s=Number(l);return Number.isFinite(s)?s:null}function BC({slot:n,value:l,onChange:s}){return f.jsx(UC,{label:n.label,value:LC(l),onChange:o=>s(V1(o)),prefix:n.prefix,suffix:n.suffix,group:n.thousandsSep,decimals:n.decimals,maxDigits:n.maxDigits,placeholder:n.placeholder})}const HC={PanelUI:BC,applyOptimistic:null,coerce:n=>typeof n=="number"?n:V1(typeof n=="string"?n:"")},qC="flex flex-col gap-2";function GC({slot:n,value:l,onChange:s,propertyId:o}){const{apiFetch:u}=Yn().api,[d,h]=_.useState(null),[p,m]=_.useState(null),g=_.useMemo(()=>l?[l]:[],[l]),{urls:x,dropUrl:b}=L1(o,g);async function E(j){if(h(null),(l==null?void 0:l.place_id)!==j.place_id){m(j);try{const T=await A1(u,o,j.place_id);s(T)}catch{h("Couldn't add that place — try again.")}finally{m(null)}}}return f.jsxs("div",{className:qC,children:[f.jsx(H1,{propertyId:o,placeholder:n.placeholder??"Search nearby…",addedIds:l?new Set([l.place_id]):new Set,onSelect:j=>void E(j)}),d&&f.jsx("span",{className:R1,children:d}),p?f.jsxs("div",{className:me(gh,z1),"aria-live":"polite",children:[f.jsx("span",{className:ic,children:f.jsx("span",{className:D1})}),f.jsxs("div",{className:bh,children:[f.jsx("span",{className:sc,children:p.name}),f.jsx("span",{className:vh,children:"Adding…"})]})]}):l?f.jsx(B1,{row:l,photoUrl:x[l.place_id],onPhotoError:()=>b(l.place_id),onRemove:()=>s(null)}):f.jsx("div",{className:O1,children:"No place yet — search above to choose one."})]})}const IC={PanelUI:GC,applyOptimistic:null,coerce:T1};function QC({slot:n,value:l,onChange:s}){const o=Dl(d=>d.session.listing_intent),u=G1(n,{listingIntent:o});return f.jsx(zf,{label:n.label,value:l??"",options:u,creatable:n.creatable??!1,placeholder:"Choose one",onChange:s})}const VC={PanelUI:QC,applyOptimistic:null,coerce:n=>typeof n=="string"?n:null},YC="data-slot-id",Hb="data-slot-text-leaf",KC="data-slot-group",$C="data-slot-item",XC="data-slot-field",FC="data-slot-unselectable",mc="data-section-instance-id";function ZC(n,l){const s=[];n.hasAttribute(Hb)&&s.push(n),s.push(...Array.from(n.querySelectorAll(`[${Hb}]`))),s.length!==0&&s.forEach(o=>{PC(o,l)})}function PC(n,l){const s=n.ownerDocument,o=[];l.split(`
|
|
1105
|
+
`).forEach((u,d)=>{d>0&&o.push(s.createElement("br")),o.push(s.createTextNode(u))}),n.replaceChildren(...o)}function Y1(n){return typeof n=="string"?n:n==null?"":typeof n=="number"||typeof n=="boolean"?String(n):""}const JC={short:120,medium:240,long:2e3};function WC(n){return JC[n]}function eA({slot:n,value:l,onChange:s}){const o=l??"",u=n.size??"short",d=typeof n.cap=="number"?n.cap:WC(u);return u==="long"?f.jsx(Zr,{value:o,onChange:s,label:n.label,max:d,maxLength:d,placeholder:n.placeholder,multiline:!0,rows:5}):u==="medium"?f.jsx(Zr,{value:o,onChange:s,label:n.label,max:d,maxLength:d,placeholder:n.placeholder,multiline:!0,rows:2}):f.jsx(Zr,{value:o,onChange:s,label:n.label,max:d,maxLength:d,placeholder:n.placeholder??""})}const tA={PanelUI:eA,applyOptimistic:ZC,coerce:Y1};function nA({slot:n,value:l,onChange:s}){const o=l??"",[u,d]=_.useState(o),[h,p]=_.useState(o);o!==h&&(p(o),d(o));const m=Af(u),g=Nf(m),x=n.accepts,b=x===void 0||m===""||jf(x,m),E=m!==""&&(!g||!b),j=T=>{const C=Af(T);C!==""&&!Nf(C)||C!==""&&x!==void 0&&!jf(x,C)||(d(C),C!==o&&s(C))};return f.jsxs("div",{className:Qn,children:[f.jsx(iv,{label:n.label}),f.jsxs("div",{className:vo,children:[f.jsx("input",{className:ss,type:"text",inputMode:"url",value:u,placeholder:n.placeholder??"https://",spellCheck:!1,onChange:T=>d(T.target.value),onBlur:T=>j(T.target.value)}),f.jsx("span",{className:me(tf,"pr-2.75"),children:g?f.jsx("a",{href:m,target:"_blank",rel:"noopener noreferrer",className:me(ot,"flex items-center text-ink-4 hover:text-accent transition-colors duration-[120ms]"),"aria-label":"Open URL in new tab",children:f.jsx(De.external,{})}):f.jsx("span",{className:"flex items-center text-ink-4 opacity-30",children:f.jsx(De.external,{})})})]}),E&&f.jsx("p",{className:Jf,children:g?Cf(x):"Not a valid URL"})]})}const aA={PanelUI:nA,applyOptimistic:null,coerce:Y1};let qb=null;function lA(){return qb??(qb={text:tA,number:HC,select:VC,image:Qj,list:RC,poi:IC,url:aA,video:sM,tour:tM,document:Sj}),qb}function K1(n){const s=lA()[n];return s===void 0?null:s}function $1(n){const l=K1(n.type);return l?l.isEditable?l.isEditable(n):n.locked!==!0:!1}function iA(n,l){const s=n.variant;return!s||l==null?!0:s.cases.includes(l)}function sA(n){const l=Object.keys(n.slots),s=n.slot_order;if(!s||s.length===0)return l;const o=new Set,u=[];for(const d of s)d in n.slots&&!o.has(d)&&(o.add(d),u.push(d));for(const d of l)o.has(d)||u.push(d);return u}function X1(n,l){const s=[],o=new Map,u=new Map;for(const m of n.groups??[])for(const g of A4(m.members))u.set(g,{id:m.id,label:m.label});for(const m of sA(n)){const g=n.slots[m];if(!$1(g)||!iA(g,l))continue;const x=u.get(m);if(x){let b=o.get(x.id);b||(b={kind:"group",key:x.id,label:x.label,Icon:null,items:[],rows:[]},o.set(x.id,b),s.push(b)),b.items.push({slotId:m,slot:g})}else mh(g).editor==="row-editor"?s.push({kind:"record",key:m,label:g.label,Icon:null,slotId:m,slot:g}):s.push({kind:"group",key:m,label:g.label,Icon:null,items:[{slotId:m,slot:g}],rows:[]})}const d=n.groups??[],h=d.some(m=>m.members.some(g=>typeof g!="string")),p=new Map(d.map(m=>[m.id,m.members]));for(const m of s)m.kind==="group"&&(m.rows=h?bv(p.get(m.key),m.items.map(g=>g.slotId)):T4(m.items.map(g=>g.slot)),m.Icon=q1(m.items.map(g=>g.slot)));return s}function oA(n){return n==null?!0:typeof n=="string"?n.trim()==="":Array.isArray(n)?n.length===0:typeof n=="object"?Object.keys(n).length===0:!1}function rA(n,l,s){const o=[];for(const u of X1(n,l)){const d=u.kind==="group"?u.items:[{slotId:u.slotId,slot:u.slot}];for(const{slotId:h,slot:p}of d)p.variant&&oA(s(h))&&o.push(h)}return o}const cA=ye("Instagram",[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"ig-frame"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"ig-lens"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"ig-flash"}]]),uA=ye("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"fb-f"}]]),dA=ye("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"li-arm"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"li-stem"}],["circle",{cx:"4",cy:"4",r:"2",key:"li-dot"}]]),fA=ye("XLogo",[["path",{d:"M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z",transform:"translate(2 2) scale(0.8333)",fill:"currentColor",stroke:"none",key:"x-mark"}]]),hA={home:Rk,building:YS,template:qk,palette:d5,filePen:_k,library:Ik,plug:v5,helpCircle:lk,lock:Zk,creditCard:uk,settings:A5,power:w5,user:Q5,plus:J0,globe:Nk,image:Ff,fileText:Xf,users:Y5,eye:F0,eyeOff:X0,pulse:CS,search:ev,chart:FS,layout:Bk,chevDown:JS,chevRight:ek,chevSelector:nk,pencil:h5,dots:yk,grip:Z0,external:$0,copy:rk,trash:tv,archive:NS,sparkle:R5,arrowUp:qS,arrowDown:OS,arrowLeft:US,arrowRight:BS,undo:B5,redo:E5,logout:Jk,check:K0,x:lv,clock:sk,calendar:$S,mapPin:P0,userPlus:G5,mail:e5,phone:p5,share:T5,upload:nv,bookOpen:IS,newspaper:c5,presentation:W0,instagram:cA,facebook:uA,linkedin:dA,xLogo:fA};function Pl({name:n,size:l=18,stroke:s=2,fill:o,color:u,className:d,style:h}){const p=hA[n];return f.jsx(p,{size:l,strokeWidth:s,fill:o??"none",color:u,className:d,style:{flexShrink:0,width:`calc(${l} * var(--content))`,height:`calc(${l} * var(--content))`,color:u??"currentColor",...h},"aria-hidden":"true"})}function mA(){return f.jsxs("div",{className:"hp-rest-in flex min-h-0 flex-1 flex-col items-center justify-center px-8 pb-10 text-center",children:[f.jsx("span",{className:"text-ink-4","aria-hidden":"true",children:f.jsx(Pl,{name:"pencil",size:22,stroke:1.6})}),f.jsx("p",{className:"m-0 mt-3 text-body-lg font-medium text-ink-2",children:"Nothing selected"}),f.jsx("p",{className:"m-0 mt-1 max-w-[calc(220*var(--content))] text-body leading-[1.45] text-ink-4",children:"Click anything on the canvas to edit it"})]})}const Gb=1;function Ib(n){const l=new URLSearchParams;for(const[o,u]of Object.entries(n))u!=null&&u!==""&&l.set(o,u);const s=l.toString();return s===""?"":`?${s}`}const Rl={catalog:"api/catalog",render:"api/render",media:n=>`api/media${Ib({fixture:n})}`,capture:(n,l)=>`api/capture/${n}${Ib({fixture:l.fixture,format:l.format,page:l.page,canvas:l.canvas})}`,live:(n,l)=>`fixtures/${encodeURIComponent(n)}/live${l==="/"?"/":`${l}/`}`,hmr:"__hmr"},pA={source:"source:changed",stylesheet:"stylesheet:changed",fixtures:"fixtures:changed"};async function Qb(n,l){const s=(await l.text().catch(()=>"")).trim();return new Error(s===""?`${n}: HTTP ${l.status}`:s)}function yA(n,l=(s,o)=>fetch(s,o)){const s=u=>new URL(u,n).href,o=async u=>{const d=await l(s(u));if(!d.ok)throw await Qb(u,d);return await d.json()};return{base:n,async catalog(){const u=await o(Rl.catalog);if(u.wire!==Gb)throw new Error(`This playground speaks wire ${Gb}, and its host answered with wire ${String(u.wire)}.`);return u},async render(u){const d=await l(s(Rl.render),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(u)});if(!d.ok)throw await Qb(Rl.render,d);return await d.json()},media:u=>o(Rl.media(u)),captureHref:(u,d)=>s(Rl.capture(u,d)),liveHref:(u,d)=>s(Rl.live(u,d)),subscribe(u){let d;try{d=new EventSource(s(Rl.hmr))}catch{return()=>{}}const h=Object.entries(u).map(([p,m])=>{const g=pA[p],x=()=>m();return d.addEventListener(g,x),()=>d.removeEventListener(g,x)});return()=>{for(const p of h)p();d.close()}}}}let Df=null;function gA(n){Df=n}function bA(){if(Df===null)throw new Error("The playground's host is not installed yet.");return Df}let F1=null;function vA(n){F1=n}function xA(){return F1}function Vb(n,l){return`${n} ${l}${n===1?"":"s"}`}function _A(n){const l=[n.propertyType,n.listingIntent].filter(o=>o!==null).map(o=>o.replaceAll("_"," "));l.push(Vb(n.units,"unit"),Vb(n.photos,"photo"));const s=l.join(", ");return s.charAt(0).toUpperCase()+s.slice(1)}function wA(n){return`${n.label} (${_A(n.summary)})`}function SA(n,l){return`${n}${n.includes("?")?"&":"?"}v=${encodeURIComponent(l)}`}function kA(n){return{basePath:n.basePath,stylesheets:n.stylesheets.map(l=>SA(l,n.cssRev)),importMap:n.importMap,islandMap:n.islands,hostScriptSrc:n.hostScript,hostResolvesOwnImports:Object.keys(n.importMap).length===0}}function Yb(n){const l=n.sectionSchemaByInstance??{};return{markers:{sectionInstanceId:mc,slotId:YC,slotGroup:KC,slotItem:$C,slotField:XC,slotUnselectable:FC},assets:kA(n),...n.pageBox===void 0?{}:{pageBox:n.pageBox},isSlotEditable:(s,o,u)=>{var h,p,m;const d=(h=l[s])==null?void 0:h.slots[o];return d===void 0||d.locked===!0?!1:u===void 0||((m=(p=d.fields)==null?void 0:p[u])==null?void 0:m.locked)!==!0}}}const EA=/^\/properties\/[^/]+\/poi\/search$/,jA=/^\/properties\/[^/]+\/poi\/([^/]+)$/,Uf=[{place_id:"pg-coffee",name:"Bluebird Coffee",address:"88 Market St",lat:40.798,lng:-73.972,distance_m:210,rating:4.6,review_count:312,type_label:"Coffee shop",price_level:"PRICE_LEVEL_INEXPENSIVE"},{place_id:"pg-park",name:"Riverside Park",address:"500 Riverside Dr",lat:40.8,lng:-73.97,distance_m:320,type_label:"Park"},{place_id:"pg-grocer",name:"Corner Grocery",address:"45 Vine Ave",lat:40.796,lng:-73.968,distance_m:480,rating:4.1,review_count:88,type_label:"Grocery store"},{place_id:"pg-school",name:"Lincoln Elementary School",address:"12 School St",lat:40.803,lng:-73.965,distance_m:640,type_label:"Elementary school"},{place_id:"pg-transit",name:"Metro Station — 5th & Main",address:null,lat:40.799,lng:-73.975,distance_m:750,type_label:"Transit station"},{place_id:"pg-gym",name:"Eastside Fitness",address:"300 Water St",lat:40.805,lng:-73.961,distance_m:1100,rating:3.9,review_count:174,type_label:"Gym",summary:"A neighborhood gym with a lap pool and early hours."}];function MA(n){const l=typeof n=="object"&&n!==null?n.query:void 0,s=typeof l=="string"?l.trim().toLowerCase():"";return s?{results:Uf.filter(o=>{var u;return o.name.toLowerCase().includes(s)||(((u=o.address)==null?void 0:u.toLowerCase().includes(s))??!1)})}:{results:Uf}}let CA=0;function AA(n,l={}){const s=(l.method??"GET").toUpperCase();if(s==="POST"&&EA.test(n))return Promise.resolve(MA(l.json));const o=s==="GET"?jA.exec(n):null;if(o){const u=decodeURIComponent(o[1]),d=Uf.find(h=>h.place_id===u);if(d)return Promise.resolve({...d,id:`pg-row-${++CA}`})}return Promise.reject(new Error(`No API backend in the playground: ${l.method??"GET"} ${n}. This capability is served by the host application; supply a provider to use it here.`))}function NA(n,l,s){const o=Math.min(Math.max(Math.round(n.nx*l),0),Math.max(l-1,0)),u=Math.min(Math.max(Math.round(n.ny*s),0),Math.max(s-1,0)),d=Math.max(Math.min(Math.round(n.nw*l),l-o),1),h=Math.max(Math.min(Math.round(n.nh*s),s-u),1);return{sx:o,sy:u,sw:d,sh:h}}function TA(n,l){return new Promise((s,o)=>{const u=l.createElement("img");u.onload=()=>s(u),u.onerror=()=>o(new Error(`Could not load ${n} to crop it.`)),u.src=n})}async function OA(n,l,s=document){const o=await TA(n,s),{sx:u,sy:d,sw:h,sh:p}=NA(l,o.naturalWidth,o.naturalHeight),m=s.createElement("canvas");m.width=h,m.height=p;const g=m.getContext("2d");if(!g)throw new Error("No 2d canvas context; cannot crop.");g.drawImage(o,u,d,h,p,0,0,h,p);const x=await new Promise(b=>m.toBlob(b));if(!x)throw new Error("Canvas produced no blob; cannot crop.");return URL.createObjectURL(x)}const $l="2026-01-01T00:00:00.000Z",Kb=new Map;function ul(n){let l=Kb.get(n);return l===void 0&&(l=bA().media(n).then(s=>s.items).catch(()=>[]),Kb.set(n,l)),l}function RA(n,l){return l.filter(s=>s.kind==="photo").map(s=>({id:s.id,property_id:n,name:s.name,thumbnail_url:s.src,uploaded_at:$l,caption:s.caption??null}))}function zA(n,l){return l.filter(s=>s.kind==="video").map(s=>({id:s.id,property_id:n,name:s.name,poster_url:s.src,ready:s.ready??!0,duration_ms:s.durationMs??null,width:null,height:null,uploaded_at:$l,caption:s.caption??null,source:s.provider===void 0?"upload":"link",provider:s.provider??null}))}function DA(n){return n.filter(l=>l.kind==="tour").map(l=>({id:l.id,name:l.name,provider:l.provider??"",poster_url:l.src,caption:l.caption??null,ready:l.ready??!0}))}function UA(n,l){return l.filter(s=>s.kind==="document").map(s=>({id:s.id,property_id:n,name:s.name,mime:s.mime??"",size_bytes:s.sizeBytes??0,preview_url:s.src,uploaded_at:$l}))}function Z1(n,l){return{floorplans:l.filter(o=>o.kind==="plan").map(o=>({id:o.id,property_id:n,source:null,thumbnail_url:o.src,ready:!0,uploaded_at:$l,display_label:q3(o.name,1)}))}}function xh(n){return Promise.reject(new Error(`${n} is served by the host application and has no playground equivalent. A fixture's media is read-only.`))}async function LA(n){return{photos:RA(n,await ul(n))}}async function BA(n){return{videos:zA(n,await ul(n))}}async function HA(n){return{tours:DA(await ul(n))}}async function qA(n){return{documents:UA(n,await ul(n))}}async function GA(n){return Z1(n,await ul(n))}async function IA(n,l){const{floorplans:s}=Z1(n,await ul(n)),o=s.find(u=>u.id===l);if(!o)throw new Error(`The fixture's property has no floor plan ${l}.`);return{source_url:o.thumbnail_url,source_bbox:null,ai_bbox:null,source_width:null,source_height:null}}function QA(n){return xh("Upload status")}function VA(n,l,s){return xh("Re-cropping a floor plan")}function YA(n,l,s){return xh("Pasting a link")}const Lf=new Map;let $b=0;async function KA(n,l,s,o){const d=(await ul(n)).find(m=>m.id===l);if(!(d!=null&&d.src))throw new Error(`The fixture's property has no asset ${l} to crop.`);const h=`dev-crop-${++$b}`;Lf.set(h,{sourceUrl:d.src,rect:s});const p={status:"processing",job_id:h,crop_key:h};if(o){const m=`dev-crop-${++$b}`;Lf.set(m,{sourceUrl:d.src,rect:o}),p.mobile={job_id:m,crop_key:m}}return p}function $A(n,l){return Promise.resolve({id:l,kind:"image_crop",status:"succeeded",enqueued_at:$l,started_at:$l,completed_at:$l})}const Xb=new Map;function XA(n,l){const s=Lf.get(l);if(!s)return Promise.reject(new Error(`Unknown crop ${l}.`));let o=Xb.get(l);return o||(o=OA(s.sourceUrl,s.rect),Xb.set(l,o)),o}const Fb="2026-01-01T00:00:00.000Z";function FA(n){return n.endsWith("logo (dark)")?"logo_dark":n.endsWith("logo (light)")?"logo_light":"headshot"}function ZA(n,l){if(l)return l;const[s]=n.split(" — ");return s??n}function PA(n){const l=new Map;for(const s of n){if(s.kind!=="library")continue;const o=ZA(s.name,s.caption);let u=l.get(o);switch(u||(u={id:`dev-contact-${o.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}`,category:"contact",fields:{name:o},created_at:Fb,updated_at:Fb},l.set(o,u)),FA(s.name)){case"headshot":u.fields.avatar_upload_id=s.id,u.avatar_url=s.src;break;case"logo_dark":u.fields.logo_dark_upload_id=s.id,u.logo_dark_url=s.src;break;case"logo_light":u.fields.logo_light_upload_id=s.id,u.logo_light_url=s.src;break}}return[...l.values()]}async function JA(n="contact"){const l=xA();return{items:l===null?[]:PA(await ul(l))}}function _h(){return Promise.reject(new Error("Library uploads are served by the host application. The dev media pack is read-only."))}function WA(n,l){return _h()}function eN(n,l,s){return _h()}function tN(n,l){return _h()}function nN(n){return Promise.reject(new Error("There is no property in the playground: the canvas renders a template, not a listing."))}const aN=12;function lN(n,l,s,o){if(n.top>=o&&n.bottom<=l-o)return null;const d=Math.max(0,s+n.top-o);return Math.abs(d-s)<1?null:d}function P1({icon:n,title:l,subtitle:s,showGrip:o=!1,showChevron:u=!0,open:d}){return f.jsxs(f.Fragment,{children:[o?f.jsx("span",{"aria-hidden":"true",className:"-mr-1 flex flex-shrink-0 cursor-grab items-center text-ink-4 transition-colors duration-[120ms] hover:text-ink-2 active:cursor-grabbing",children:f.jsx(Pl,{name:"grip",size:14,stroke:1.8})}):null,f.jsx("span",{className:"grid size-6.5 flex-shrink-0 place-items-center rounded-md bg-accent-soft text-accent-ink","aria-hidden":"true",children:n}),s?f.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-px",children:[f.jsx("span",{className:"truncate text-[length:calc(13.5*var(--content))] font-medium text-ink-2",children:l}),f.jsx("span",{className:"truncate text-[length:calc(11.5*var(--content))] text-ink-3 [font-variant-numeric:tabular-nums]",children:s})]}):f.jsx("span",{className:"min-w-0 flex-1 truncate text-left text-[length:calc(13.5*var(--content))] font-medium text-ink-2",children:l}),u?f.jsx("span",{"data-acc-open":d,className:"grid flex-shrink-0 place-items-center text-ink-3 transition-transform duration-150 ease-[ease] data-[acc-open=true]:rotate-180","aria-hidden":"true",children:f.jsx(Pl,{name:"chevDown",size:14,stroke:1.8})}):null]})}function J1({open:n,onToggle:l,icon:s,title:o,subtitle:u,scrollKey:d,dragId:h,dragHandleProps:p,children:m}){const g=_.useRef(null);return _.useEffect(()=>{if(!n)return;const x=g.current,b=x==null?void 0:x.closest(".hp-sb-scroll");if(!x||!b)return;const E=window.matchMedia("(prefers-reduced-motion: reduce)").matches,j=()=>{const R=x.getBoundingClientRect(),D=b.getBoundingClientRect(),z=lN({top:R.top-D.top,bottom:R.bottom-D.top,height:R.height},b.clientHeight,b.scrollTop,aN);z!=null&&b.scrollTo({top:z,behavior:E?"auto":"smooth"})};if(E){const R=requestAnimationFrame(j);return()=>cancelAnimationFrame(R)}const T=new AbortController,C=()=>{T.abort(),window.clearTimeout(M),j()};x.addEventListener("transitionend",R=>{R.propertyName==="grid-template-rows"&&R.target instanceof Node&&R.target.parentNode===x&&C()},{signal:T.signal});const M=window.setTimeout(C,280);return()=>{T.abort(),window.clearTimeout(M)}},[n,d]),f.jsxs("div",{ref:g,"data-open":n,"data-dragid":h,className:me("we-acc flex-shrink-0 overflow-hidden rounded border border-line bg-canvas","origin-center [transform:scale(var(--gx,1),var(--gy,1))] [will-change:transform]","[transition:transform_.18s_cubic-bezier(.34,1.56,.64,1),box-shadow_.18s_ease,border-color_.16s_ease]","has-[>.we-acc-head:hover]:shadow-[0_4px_14px_-6px_rgba(20,24,15,0.18)]","has-[>.we-acc-head:active]:[transition-duration:.08s]","motion-reduce:[transform:none] motion-reduce:[transition:box-shadow_.18s_ease,border-color_.16s_ease]"),children:[f.jsx("button",{type:"button",className:me("we-acc-head flex w-full cursor-pointer appearance-none items-center gap-2.5 border-0 bg-transparent pr-3.5 py-3 text-left outline-none",p?"pl-2":"pl-3.5",p&&"touch-none"),onClick:l,onPointerDown:p==null?void 0:p.onPointerDown,"aria-expanded":n,children:f.jsx(P1,{icon:s,title:o,subtitle:u,showGrip:p!=null,open:n})}),f.jsx("div",{"data-acc-open":n,className:"grid grid-rows-[0fr] transition-[grid-template-rows] duration-200 ease-out data-[acc-open=true]:grid-rows-[1fr] motion-reduce:transition-none","aria-hidden":!n,children:f.jsx("div",{className:"min-h-0 overflow-hidden",children:f.jsx("div",{"data-acc-open":n,className:"bg-white px-3.5 pb-4 pt-2 opacity-0 transition-opacity duration-200 ease-out data-[acc-open=true]:opacity-100 motion-reduce:transition-none",children:m})})})]})}function iN(n,l,s){return Promise.reject(new Error("Uploading is served by the host application; the playground has no upload backend."))}function sN(n,l){return Promise.reject(new Error("Uploading is served by the host application; the playground has no upload backend."))}const oN={getPhotos:LA,getVideos:BA,getTours:HA,getDocuments:qA,getFloorplans:GA,getUploads:QA,recropFloorplan:VA,listLibraryItems:JA,postUploadWithProgress:iN,deleteUpload:sN};function rN({open:n,onClose:l}){return n?f.jsxs("div",{className:"rounded-md border border-dashed border-ink-4 bg-accent-soft px-3 py-2.5","data-testid":"unit-plan-picker-stub",role:"dialog","aria-label":"Floor-plan assignment",children:[f.jsx("p",{className:"text-caption font-medium text-ink-2",children:"Floor-plan assignment lives in the app"}),f.jsx("p",{className:"mt-1 text-caption text-ink-3",children:"Assigning a floor plan to a unit is a property-editing act, done against a real property. The playground has no property, so this picker is inert here."}),f.jsx("button",{type:"button",className:"mt-2 rounded-md border border-ink-4 px-2 py-1 text-caption text-ink-2",onClick:l,children:"Close"})]}):null}function oc(n){return n===null||typeof n!="object"?JSON.stringify(n)??"undefined":Array.isArray(n)?`[${n.map(oc).join(",")}]`:`{${Object.keys(n).sort().map(l=>`${JSON.stringify(l)}:${oc(n[l])}`).join(",")}}`}function cN(n,l,s,o){if(l===null||l.fixtureId!==s)return[];const u=[];for(const[d,h]of Object.entries(n.slots)){const p=oc(h);if(p===oc(l.slots[d]))continue;const m=o.slots[d];m!==void 0&&u.push({id:`${d}:scalar::@${p}`,kind:"scalar",label:m.label,slotId:d})}return u}const uN={fact:"border-accent/40 text-accent",computed:"border-accent/40 text-accent",authored:"border-line text-ink-2",empty:"border-dashed border-line text-ink-4",edited:"border-honey-2 bg-honey/20 text-honey-ink"};function W1(n){return f.jsx("span",{className:"inline-flex flex-shrink-0 items-center gap-1","data-testid":"provenance-chips",children:n.chips.map(l=>f.jsx("span",{"data-testid":"provenance-chip","data-provenance":l.kind,"data-slots":l.slots.map(s=>s.id).join(" "),title:`${l.kind}: ${l.slots.map(s=>s.ref===null?s.id:`${s.id} ← ${s.ref}`).join(", ")}`,className:`pointer-events-auto inline-flex h-[18px] cursor-help items-center rounded-full border bg-canvas px-1.5 font-mono text-[10px] font-normal normal-case leading-none tracking-[0.02em] ${uN[l.kind]}`,children:l.kind},l.kind))})}function dN(n){return f.jsxs("div",{className:"relative",children:[n.children,f.jsx("div",{className:"pointer-events-none absolute right-10 top-[15px]",children:f.jsx(W1,{chips:n.chips})})]})}function fN(n,l){const s=!l,o=n.required&&!s;return{hidden:s,locked:o,title:o?"Required section — cannot hide":s?"Hidden from live page":"Visible on live page"}}function ex(n){const{variant:l}=n;return l===null||l.locked||l.cases.length<2?null:l.cases}function hN(n,l){return l||(n==null?void 0:n.kind)==="session"?{kind:"edited",ref:null}:n===void 0?{kind:"empty",ref:null}:n.kind==="fact"||n.kind==="computed"?{kind:n.kind,ref:n.ref}:{kind:n.kind,ref:null}}function mN(n,l,s){const o=new Map;for(const u of n){const{kind:d,ref:h}=hN(l==null?void 0:l[u],s(u));o.set(d,[...o.get(d)??[],{id:u,ref:h}])}return[...o].map(([u,d])=>({kind:u,slots:d}))}const Zb="grid h-8 w-8 cursor-pointer place-items-center rounded-md border-0 p-0 transition-colors";function pN(n){const l=fN(n.display,n.enabled);return f.jsxs("header",{className:"flex min-h-[calc(56*var(--content))] flex-shrink-0 items-center justify-between gap-3 px-5 pb-2 pt-4","data-testid":"section-header",children:[f.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:f.jsx("h2",{className:"m-0 truncate text-body-lg font-semibold tracking-[-0.005em] text-ink",children:n.label})}),f.jsxs("div",{className:"inline-flex flex-shrink-0 items-center gap-0.5",children:[f.jsx("button",{type:"button","data-testid":"section-eye","aria-pressed":l.hidden,"aria-label":l.title,onClick:()=>!l.locked&&n.onSetEnabled(l.hidden),disabled:l.locked,title:l.title,className:`${Zb} disabled:cursor-not-allowed disabled:text-ink-4 disabled:opacity-100 ${l.hidden?"bg-[rgba(20,18,13,0.06)] text-ink [box-shadow:inset_0_0_0_1px_var(--color-line)]":"bg-transparent text-ink-2 hover:bg-[rgba(20,18,13,0.06)] hover:text-ink disabled:hover:bg-transparent disabled:hover:text-ink-4"}`,children:f.jsx(Pl,{name:l.hidden?"eyeOff":"eye",size:15,stroke:1.8})}),ex(n.display)?f.jsx("button",{type:"button","data-testid":"section-gear",onClick:n.onOpenSettings,title:"Section settings","aria-label":"Section settings",className:`${Zb} bg-transparent text-ink-2 hover:bg-[rgba(20,18,13,0.06)] hover:text-ink`,children:f.jsx(Pl,{name:"settings",size:15,stroke:1.8})}):null]})]})}const yN=me("group/case flex cursor-pointer items-center gap-2.5 rounded border border-line bg-canvas px-3 py-2.5","transition-[border-color,background-color] hover:border-[var(--color-ink-4)]","has-[:focus-visible]:border-accent","data-[selected=true]:border-accent data-[selected=true]:bg-accent-soft");function gN(n){const l=ex(n.display),s=rA(n.sectionSchema,n.variant,n.slotValue).length;return f.jsxs(f.Fragment,{children:[f.jsx("header",{className:"flex min-h-[calc(56*var(--content))] flex-shrink-0 items-center justify-between gap-3 px-5 pb-2 pt-4",children:f.jsxs("nav",{className:"inline-flex min-w-0 items-center gap-1.5 text-body-lg tracking-[-0.005em]","aria-label":"Breadcrumbs",children:[f.jsx("button",{type:"button","data-testid":"settings-back",onClick:n.onBack,className:"max-w-[calc(220*var(--content))] cursor-pointer truncate border-0 bg-transparent p-0 font-medium text-ink-3 hover:bg-transparent transition-colors hover:text-ink hover:underline hover:underline-offset-[3px]",children:n.label}),f.jsx("span",{className:"inline-grid place-items-center leading-none text-ink-4","aria-hidden":"true",children:f.jsx(Pl,{name:"chevRight",size:12,stroke:1.8})}),f.jsx("span",{className:"max-w-[calc(220*var(--content))] truncate font-semibold text-ink",children:"Settings"})]})}),f.jsx("div",{className:"hp-sb-scroll min-h-0 flex-1 overflow-y-auto px-4 pb-6 pt-2","data-testid":"section-settings",children:l?f.jsxs("section",{"aria-label":"Variation",className:"flex flex-col gap-2.5",children:[f.jsx("h3",{className:"px-1 text-[length:calc(11.5*var(--content))] font-medium uppercase tracking-[0.04em] text-ink-3",children:"Variation"}),f.jsx("div",{className:"flex flex-col gap-2",children:l.map(o=>f.jsxs("label",{"data-selected":o.value===n.variant,className:yN,children:[f.jsx("input",{type:"radio",className:"sr-only",name:`variation-${n.instanceId}`,value:o.value,checked:o.value===n.variant,onChange:()=>n.onSetVariant(o.value)}),f.jsx("span",{"aria-hidden":"true",className:"grid size-4 flex-shrink-0 place-items-center rounded-full border-[1.5px] border-ink-4 transition-colors group-data-[selected=true]/case:border-accent",children:f.jsx("span",{className:"size-2 rounded-full bg-accent opacity-0 transition-opacity group-data-[selected=true]/case:opacity-100"})}),f.jsx("span",{className:"min-w-0 flex-1 truncate text-[length:calc(13.5*var(--content))] font-medium text-ink",children:o.label})]},o.value))}),s>0?f.jsx("p",{"aria-live":"polite",className:"rounded border border-line bg-accent-soft px-3 py-2 text-[length:calc(12.5*var(--content))] leading-[1.45] text-ink-2",children:s===1?"1 empty field in this variation":`${s} empty fields in this variation`}):null]}):f.jsx("p",{className:"px-1 py-3 text-[length:calc(12.5*var(--content))] text-ink-3",children:"Nothing to configure in this section."})})]})}function bN(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Pb(n){return f.jsx("svg",{viewBox:"0 0 14 14",width:"13",height:"13",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n,children:f.jsx("path",{d:"M2.5 7h9M8 3.5 11.5 7 8 10.5"})})}function vN(n){return f.jsx("svg",{viewBox:"0 0 16 16",width:"15",height:"15",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n,children:f.jsx("path",{d:"M3.5 8.5l3 3 6-6.5"})})}function Jb(n){return f.jsx("svg",{viewBox:"0 0 14 14",width:"13",height:"13",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round","aria-hidden":"true",...n,children:f.jsx("path",{d:"M3.5 3.5l7 7M10.5 3.5l-7 7"})})}function xN({items:n,onApply:l}){const s=n??[],o=s.length,u=s.map(de=>de.id).join("|"),[d,h]=_.useState(!1),[p,m]=_.useState("idle"),[g,x]=_.useState(!1),[b,E]=_.useState(0),j=_.useRef(null),T=_.useRef(null),C=_.useRef(null),M=_.useRef(null),R=_.useRef(s),D=_.useRef(!0);_.useLayoutEffect(()=>{R.current=s});const z=_.useRef(bN()).current,I=_.useCallback(de=>{const re=j.current;if(z||document.hidden||re==null||typeof re.animate!="function"){x(!1),h(!1),m("idle"),de==null||de();return}x(!0);const ie=re.animate([{opacity:1,transform:"none"},{opacity:0,transform:"translateY(6px)"}],{duration:240,easing:"cubic-bezier(.4,0,.2,1)",fill:"forwards"});ie.onfinish=()=>{x(!1),h(!1),m("idle"),de==null||de()}},[z]);_.useEffect(()=>(T.current!=null&&clearTimeout(T.current),o>0&&p==="idle"?u!==M.current&&!d&&(T.current=setTimeout(()=>{h(!0)},550)):o===0&&d&&!g&&p==="idle"&&I(),()=>{T.current!=null&&clearTimeout(T.current)}),[o,u,d,p,g,I]),_.useLayoutEffect(()=>{if(!d||p!=="idle"||z||g)return;const de=j.current;de!=null&&typeof de.animate=="function"&&!document.hidden&&de.animate([{opacity:.45,transform:"translateY(10px)"},{opacity:1,transform:"none"}],{duration:420,easing:"cubic-bezier(.18,.82,.25,1)"})},[d,p,z,g]),_.useEffect(()=>{if(p!=="applying")return;const de=re=>{re.preventDefault(),re.returnValue=""};return window.addEventListener("beforeunload",de),()=>window.removeEventListener("beforeunload",de)},[p]),_.useEffect(()=>(D.current=!0,()=>{D.current=!1,T.current!=null&&clearTimeout(T.current),C.current!=null&&clearTimeout(C.current)}),[]);const le=()=>{const de=R.current;E(de.length),m("applying"),(async()=>{try{if(await l(de),!D.current)return;h(!1),m("success"),C.current!=null&&clearTimeout(C.current),C.current=setTimeout(()=>{I(()=>{M.current=null})},1200)}catch{if(!D.current)return;m("error")}})()},ne=()=>{M.current=u,I()};if(!d&&p!=="success"&&!g)return null;const W=p==="applying",L=W?b:o,ue=L===1?f.jsxs(f.Fragment,{children:[f.jsx("b",{className:"font-bold text-ink",children:"1"})," change to your property details"]}):f.jsxs(f.Fragment,{children:[f.jsx("b",{className:"font-bold text-ink",children:L})," changes to your property details"]});return f.jsx("div",{className:"pointer-events-none absolute bottom-[10px] left-0 right-0 z-[6]","aria-live":"polite",children:f.jsx("div",{className:"pointer-events-none",ref:j,children:f.jsx("div",{className:"pointer-events-auto relative mx-3 rounded-[calc(11*var(--content))] border border-line bg-canvas px-[calc(13*var(--content))] pb-[calc(12*var(--content))] pt-[calc(11*var(--content))] shadow-[0_8px_22px_-8px_rgba(20,18,13,.26),0_2px_6px_rgba(20,18,13,.08)] data-[done]:border-[#cfe6d4] data-[done]:bg-[#eef6ef]","data-done":p==="success"?"":void 0,children:p==="success"?f.jsxs("div",{className:"flex items-center gap-2 text-body font-semibold text-good",children:[f.jsx("span",{className:"grid flex-shrink-0 place-items-center [animation:we-ub-pop_.34s_cubic-bezier(.2,1.3,.4,1)_both]",children:f.jsx(vN,{})}),"Updated everywhere"]}):p==="error"?f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex items-start gap-[calc(9*var(--content))]",children:[f.jsxs("div",{className:"min-w-0 flex-1 text-body leading-[1.4]",children:[f.jsx("div",{className:"font-semibold text-danger",children:"Couldn't update"}),f.jsx("div",{className:"mt-0.5 text-[length:calc(11.5*var(--content))] text-ink-3",children:"Something went wrong. Please try again."})]}),f.jsx("button",{type:"button",className:"-mr-0.5 -mt-0.5 grid h-[calc(20*var(--content))] w-[calc(20*var(--content))] flex-shrink-0 cursor-pointer place-items-center rounded-[calc(5*var(--content))] text-ink-4 transition-[background-color,color] duration-[120ms] hover:bg-[rgba(20,18,13,.06)] hover:text-ink-2",onClick:ne,"aria-label":"Dismiss",children:f.jsx(Jb,{})})]}),f.jsxs("button",{type:"button","data-action":"retry",className:"mt-[calc(10*var(--content))] box-border inline-flex h-[calc(34*var(--content))] w-full cursor-pointer items-center justify-center gap-[calc(6*var(--content))] rounded-[calc(8*var(--content))] bg-accent text-[length:calc(12.5*var(--content))] font-semibold text-white transition-[background-color,transform] duration-[120ms] hover:bg-[#143a2f] active:translate-y-[0.5px]",onClick:le,children:["Retry ",f.jsx(Pb,{})]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex items-start gap-[calc(9*var(--content))]",children:[f.jsxs("div",{className:"min-w-0 flex-1 text-body leading-[1.4] text-ink-2",children:[ue,f.jsx("div",{className:"mt-0.5 text-[length:calc(11.5*var(--content))] text-ink-3",children:"Update them everywhere these details are used."})]}),f.jsx("button",{type:"button",className:"-mr-0.5 -mt-0.5 grid h-[calc(20*var(--content))] w-[calc(20*var(--content))] flex-shrink-0 cursor-pointer place-items-center rounded-[calc(5*var(--content))] text-ink-4 transition-[background-color,color] duration-[120ms] hover:bg-[rgba(20,18,13,.06)] hover:text-ink-2 disabled:cursor-default disabled:opacity-50",onClick:ne,disabled:W,"aria-label":"Dismiss",children:f.jsx(Jb,{})})]}),f.jsx("button",{type:"button","data-action":"apply",disabled:W,className:"mt-[calc(10*var(--content))] box-border inline-flex h-[calc(34*var(--content))] w-full cursor-pointer items-center justify-center gap-[calc(6*var(--content))] rounded-[calc(8*var(--content))] bg-accent text-[length:calc(12.5*var(--content))] font-semibold text-white transition-[background-color,transform] duration-[120ms] hover:bg-[#143a2f] active:translate-y-[0.5px] disabled:cursor-default disabled:hover:bg-accent disabled:active:translate-y-0",onClick:le,children:W?f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"inline-block size-[calc(14*var(--content))] animate-spin rounded-full border-2 border-white/40 border-t-white",role:"status","aria-label":"Updating"}),"Updating…"]}):f.jsxs(f.Fragment,{children:["Update everywhere ",f.jsx(Pb,{})]})})]})})})})}const _N="Real editor chrome. The playground has no linked sources, so this cannot update anything — the flow above is a preview.",wN="Nothing was updated. In the app this writes the change to every deliverable sharing the linked source.";function SN({items:n}){const[l,s]=_.useState([]),o=n.filter(h=>!l.includes(h.id)),u=l.length>0&&o.length===0,d=_.useCallback(h=>{s(p=>[...p,...h.map(m=>m.id)])},[]);return f.jsxs("div",{className:"instance-panel__we",children:[f.jsx("div",{className:"instance-panel__we-anchor",children:f.jsx(xN,{items:o,onApply:d})}),o.length>0||u?f.jsx("p",{className:"instance-panel__we-caption","data-testid":"we-caption","data-phase":u?"applied":"preview",children:u?wN:_N}):null]})}const kN={apiFetch:AA,cropImage:KA,getCropDerivativeUrl:XA,getFloorplanSourcePage:IA,postLink:YA,stageLibraryItemImage:eN,presignLibraryItemUpload:WA,deleteStagedLibraryItemImage:tN,fetchProperty:nN};function EN(n,l,s){return _.useMemo(()=>{const o={session:{property_id:n,listing_intent:null},select:u=>{if(u===null){s(null);return}if(u.kind==="section"){s({kind:"section",instanceId:u.instance_id});return}s({kind:"slot",instanceId:u.instance_id,slotId:u.slot_id,...u.item_index!==void 0?{itemIndex:u.item_index}:{}})},markSlotOverridden:()=>{},relinkSlot:()=>{}};return{useEditorStore:u=>u(o),Accordion:J1,AccordionHeader:P1,UnitPlanPicker:rN,capabilities:{upload:!1},api:kN}},[n,l,s])}function Wb(n,l){const{selection:s}=n;if((s==null?void 0:s.kind)==="slot"&&!(s.instanceId!==n.instanceId||s.slotId!==l))return s.itemIndex}function e0(n,l){var s;return mN(l,(s=n.payload)==null?void 0:s.provenance,o=>n.override.slots[o]!==void 0)}function Xd(n,l){var o;const s=n.override.slots[l];return s!==void 0?s:(o=n.payload)==null?void 0:o.resolvedProps.slots[l]}function jN(n){var p;const l=EN(n.fixture,n.selection,n.onSelect),s=_.useMemo(()=>new xE,[]),o=n.displayState.variant,u=_.useMemo(()=>X1(n.sectionSchema,o),[n.sectionSchema,o]),d=_.useMemo(()=>cN(n.override,n.baseline,n.fixture,n.sectionSchema),[n.override,n.baseline,n.fixture,n.sectionSchema]),h=((p=n.selection)==null?void 0:p.kind)==="slot"&&n.selection.instanceId===n.instanceId?n.selection.slotId:null;return f.jsxs("aside",{className:"instance-panel","data-testid":"instance-panel","data-instance-id":n.instanceId,children:[n.settingsOpen?f.jsx(gN,{instanceId:n.instanceId,label:n.label,display:n.display,sectionSchema:n.sectionSchema,variant:o,slotValue:m=>Xd(n,m),onSetVariant:n.onSetVariant,onBack:n.onCloseSettings}):f.jsx(pN,{label:n.label,display:n.display,enabled:n.displayState.enabled,onSetEnabled:n.onSetEnabled,onOpenSettings:n.onOpenSettings}),n.settingsOpen?null:n.renderError?f.jsx("p",{className:"instance-panel__error","data-testid":"render-error",children:n.renderError}):null,n.settingsOpen?null:n.payload===null?f.jsx("p",{className:"instance-panel__empty","data-testid":"panel-loading",children:"Loading…"}):f.jsx(_E,{client:s,children:f.jsx(BE,{api:oN,children:f.jsxs(lj,{ports:l,children:[f.jsx(RE,{getJobStatus:$A}),f.jsxs("div",{className:"instance-panel__dock",children:[f.jsxs("div",{className:"hp-sb-scroll instance-panel__cards","data-testid":"slot-cards","data-dirty":d.length>0?"":void 0,children:[u.map(m=>m.kind==="record"?f.jsxs("section",{"aria-label":m.label,"data-testid":"object-list-card",className:"flex flex-col gap-2.5",children:[f.jsxs("h3",{className:"flex items-center gap-1.5 px-1 text-[length:calc(11.5*var(--content))] font-medium uppercase tracking-[0.04em] text-ink-3",children:[m.Icon?f.jsx(m.Icon,{size:13}):null,m.label,f.jsx("span",{className:"ml-auto",children:f.jsx(W1,{chips:e0(n,[m.slotId])})})]}),f.jsx("div",{className:"flex flex-col gap-3",children:f.jsx(Rf,{slot:m.slot,instanceId:n.instanceId,slotId:m.slotId,value:Xd(n,m.slotId),propertyId:n.fixture,onChange:g=>n.onApplySlot(m.slotId,g),selectedItemIndex:Wb(n,m.slotId)})})]},m.key):f.jsx(dN,{chips:e0(n,m.items.map(g=>g.slotId)),children:f.jsx(J1,{open:h!=null&&m.items.some(g=>g.slotId===h),onToggle:()=>h!=null&&m.items.some(g=>g.slotId===h)?n.onSelect({kind:"section",instanceId:n.instanceId}):n.onSelect({kind:"slot",instanceId:n.instanceId,slotId:m.items[0].slotId}),icon:m.Icon?f.jsx(m.Icon,{size:14}):null,title:m.label,scrollKey:m.key,children:f.jsx(vv,{items:m.items.map(({slotId:g,slot:x})=>f.jsx(Rf,{slot:x,instanceId:n.instanceId,slotId:g,value:Xd(n,g),propertyId:n.fixture,onChange:b=>n.onApplySlot(g,b),selectedItemIndex:Wb(n,g)},g)),rows:m.rows})})},m.key)),u.length===0?f.jsx("p",{className:"instance-panel__empty","data-testid":"no-editable-slots",children:"Nothing to edit in this section."}):null]}),f.jsx(SN,{items:d})]})]})})})]})}function MN(n,l){return n.find(s=>s.pages.includes(l))??null}function CN(n,l,s,o){const u=l.endsWith("/")?l:`${l}/`;if(!n.startsWith(u))return null;const d=n.indexOf("#"),h=d===-1?null:n.slice(d+1),p=(d===-1?n:n.slice(0,d)).slice(u.length).split("/").filter(Boolean),[m,g,x,b,...E]=p;if(m!=="fixtures"||g===void 0||x!=="live"||E.length>0)return null;const j=b===void 0?"/":`/${decodeURIComponent(b)}`,T=s.find(M=>M.path===j);if(!T)return null;const C=MN(o,T.id);return C?{pageId:T.id,canvasId:C.id,anchor:h||null}:null}const Fd="box-border inline-flex h-10 w-full items-center justify-center gap-1.75 rounded-lg border text-center text-[length:calc(13.5*var(--content))] font-semibold tracking-[-0.005em]",AN="group cursor-pointer border-line bg-canvas text-ink transition-[background-color,border-color,box-shadow,color,transform] hover:border-[var(--color-ink-4)] hover:bg-[#fafaf8] active:translate-y-[0.5px]",NN="cursor-pointer border-honey-2 bg-honey text-honey-ink transition-[background-color,border-color,box-shadow,color,transform] hover:bg-honey-2 hover:shadow-[0_2px_6px_rgba(40,44,50,0.12)] active:translate-y-[0.5px]",TN="cursor-not-allowed border-line bg-[#f3f1ea] text-ink-4";function ON({host:n,templateName:l,fixture:s,output:o,format:u,canvas:d,pagePath:h}){const p=o==="website"?{href:n.liveHref(s,h??"/"),title:`Open this page as it would publish — ${l}`}:null,m=o==="image"?{href:n.captureHref("bundle",{fixture:s,format:u,canvas:d}),title:`Download every page of this canvas as a zip — ${l}`}:o==="document"?{href:n.captureHref("print",{fixture:s,format:u}),title:`Download the PDF — ${l}`}:null;return f.jsx("footer",{className:"flex-shrink-0 border-t border-line-soft bg-canvas p-3","data-testid":"panel-footer",children:f.jsxs("div",{className:m&&!p?"w-full":"grid w-full grid-cols-2 gap-2",children:[p?f.jsxs("a",{href:p.href,target:"_blank",rel:"noopener noreferrer","data-testid":"view-live",title:p.title,className:`${Fd} ${AN}`,children:[f.jsx("span",{className:"grid place-items-center text-ink-3 transition-colors group-hover:text-ink",children:f.jsx(Pl,{name:"external",size:12,stroke:1.6})}),f.jsx("span",{"data-testid":"view-live-label",children:"View live"})]}):null,m?f.jsxs("a",{href:m.href,"data-testid":"download",title:m.title,className:`${Fd} ${NN}`,children:[f.jsx(mk,{size:14,className:"h-[calc(14*var(--content))] w-[calc(14*var(--content))]"}),f.jsx("span",{"data-testid":"download-label",children:"Download"})]}):f.jsx("button",{type:"button",disabled:!0,"data-testid":"publish",title:"Publishing needs a property and a deliverable — preview publish states in the application",className:`${Fd} ${TN}`,children:f.jsx("span",{children:"Publish"})})]})})}function RN(n,l,s,o){const u=n.ownerDocument,d=[],h=new Map;for(const p of Array.from(n.children)){const m=p,g=m.getAttribute(mc);g&&h.set(g,m)}for(const p of l){const m=h.get(p.instance_id),g=(m==null?void 0:m.dataset.svId)!==p.section_version_id;m&&g&&(o==null||o(m),m.remove());const x=m&&!g,b=x?m:s(p,u);x||d.push(b),n.appendChild(b),h.delete(p.instance_id)}return h.forEach(p=>{o==null||o(p),p.remove()}),d}function tx(n){return n==null?void 0:n.__trCanvasIslands}function zN(n,l,s,o){const u=n==null?void 0:n.querySelector(`[${mc}="${s}"]`);if(!u)return!1;const d=u.querySelector(":scope > .we-section-body")??u,h=tx(l);return h==null||h.unmountRoot(u),d.innerHTML=o,h==null||h.hydrateRoot(u),!0}function DN(){return{slots:{}}}function Hn(n,l,s){var o;return((o=n[l])==null?void 0:o[s])??DN()}function wh(n,l,s,o){return{...n,[l]:{...n[l],[s]:o}}}function UN(n,l,s,o,u){const d=Hn(n,l,s);return wh(n,l,s,{...d,slots:{...d.slots,[o]:u}})}function LN(n,l,s,o){return wh(n,l,s,{...Hn(n,l,s),enabled:o})}function BN(n,l,s,o){return wh(n,l,s,{...Hn(n,l,s),variant:o})}function HN(n,l){const s=n.enabled??(l==null?void 0:l.enabled)??!0,o=n.variant??(l==null?void 0:l.variant);return o===void 0?{enabled:s}:{enabled:s,variant:o}}function qN(n){return Object.keys(n.slots).length===0?{}:{slots:n.slots}}function GN(n,l){const s={};for(const[o,u]of Object.entries(n[l]??{}))u.enabled===void 0&&u.variant===void 0||(s[o]={...u.enabled===void 0?{}:{enabled:u.enabled},...u.variant===void 0?{}:{variant:u.variant}});return s}function IN(n,l){return Object.keys(n).filter(s=>l[s]!==n[s])}function t0(n,l){if(!l.some(o=>o in n))return n;const s={...n};for(const o of l)delete s[o];return s}function n0(n,l,s,o){return{...n,[l]:{...n[l],[s]:o}}}function QN(n,l,s){const o=n[l];if(!o||!(s in o))return n;const u={...o};return delete u[s],{...n,[l]:u}}function VN(n){const{host:l,fixture:s,doc:o,resolvedDisplay:u,sessions:d,pages:h,frameFor:p}=n,{edits:m,baselines:g,setEdits:x,setBaseline:b}=d,[E,j]=_.useState({}),[T,C]=_.useState({}),M=[s,o??"",...h.map(Y=>Y.id)].join("\0"),[R,D]=_.useState(M);R!==M&&(D(M),j({}),C({}));const z=_.useRef(E);z.current=E;const I=_.useRef(p);I.current=p;const le=_.useRef(h);le.current=h;const ne=_.useRef(m);ne.current=m;const W=_.useRef(s);W.current=s;const L=_.useRef(o);L.current=o;const ue=_.useRef(new Map),de=_.useCallback(Y=>Hn(m,s,Y),[m,s]),re=_.useCallback(Y=>HN(Hn(m,s,Y),u==null?void 0:u[Y]),[m,s,u]),ie=_.useCallback((Y,N)=>{var P;return((P=T[Y])==null?void 0:P[N])??null},[T]),U=_.useCallback(Y=>{var N;for(const P of h){const Q=(N=T[P.id])==null?void 0:N[Y];if(Q!==void 0)return Q}return null},[T,h]),H=_.useCallback(Y=>{var N;for(const P of h){const Q=(N=E[P.id])==null?void 0:N[Y];if(Q)return Q}return null},[E,h]),$=_.useCallback(Y=>{var N;return((N=g[s])==null?void 0:N[Y])??null},[g,s]),w=_.useCallback(async(Y,N,P,Q)=>{const Z=Y.id,pe=W.current,ge=L.current,Ee=`${Z}\0${N}`,Re=(ue.current.get(Ee)??0)+1;ue.current.set(Ee,Re);const Ue=()=>pe!==W.current||ge!==L.current||ue.current.get(Ee)!==Re;try{const nt=await l.render({page:Z,instance:N,fixture:pe,session:qN(P),display:GN(ne.current,pe)});if(Ue()||(j(hn=>n0(hn,Z,N,nt)),Object.keys(P.slots).length===0&&P.variant===void 0&&b(pe,N,{fixtureId:pe,slots:nt.resolvedProps.slots}),C(hn=>QN(hn,Z,N)),!Q))return;const{doc:Ye,win:Te}=I.current(Z);zN(Ye,Te,N,nt.html)}catch(nt){if(Ue())return;const Ye=nt instanceof Error?nt.message:String(nt);C(Te=>n0(Te,Z,N,Ye))}},[l,b]),F=_.useCallback((Y,N)=>{var Q;if((Q=z.current[Y])!=null&&Q[N])return;const P=le.current.find(Z=>Z.id===Y);P&&w(P,N,Hn(ne.current,W.current,N),!1)},[w]),ce=_.useCallback((Y,N)=>{var P;for(const Q of le.current)((P=z.current[Q.id])==null?void 0:P[Y])!==void 0&&w(Q,Y,N,!0)},[w]),ee=_.useCallback(Y=>{ce(Y,Hn(ne.current,W.current,Y))},[ce]),G=_.useCallback((Y,N,P)=>{const Q=UN(ne.current,W.current,Y,N,P);ne.current=Q,x(Q),ce(Y,Hn(Q,W.current,Y))},[ce,x]),S=_.useCallback((Y,N)=>{const P=LN(ne.current,W.current,Y,N);ne.current=P,x(P);for(const Q of le.current)for(const Z of Object.keys(z.current[Q.id]??{}))w(Q,Z,Hn(P,W.current,Z),!0)},[w,x]),q=_.useCallback((Y,N)=>{const P=BN(ne.current,W.current,Y,N);ne.current=P,x(P),ce(Y,Hn(P,W.current,Y))},[ce,x]);return _.useMemo(()=>({overrideFor:de,displayFor:re,payloads:E,errorOn:ie,errorFor:U,payloadFor:H,baselineFor:$,ensureLoaded:F,reload:ee,applySlot:G,setEnabled:S,setVariant:q}),[de,re,E,ie,U,H,$,F,ee,G,S,q])}const YN={slots:{},slot_order:[]},KN={required:!1,variant:null},$N=[];function a0(n){return n?n.kind==="section"?{kind:"section",instance_id:n.instanceId}:{kind:"slot",instance_id:n.instanceId,slot_id:n.slotId,...n.itemIndex!==void 0?{item_index:n.itemIndex}:{}}:null}function XN(n){return n.kind==="section"?{kind:"section",instanceId:n.instance_id}:{kind:"slot",instanceId:n.instance_id,slotId:n.slot_id,...n.item_index!==void 0?{itemIndex:n.item_index}:{}}}function FN(n,l){if(!n)return[];const s=[];for(const o of n.pages){const u=l.find(d=>d.id===o);u&&s.push(u)}return s}function Xr(n,l,s,o){var m;const u=((m=l.doc)==null?void 0:m.getElementById(n))??null;if(!u||!s)return;const d=u.getBoundingClientRect(),h=Ew({top:d.top,height:d.height},l.wrapper.offsetTop,o,s.scrollTop),p=kw(h,s.clientHeight,s.scrollTop,Sw);p!==null&&s.scrollTo({top:p,behavior:"smooth"})}function l0(n,l){return n.querySelector(`[${mc}="${Xl(l)}"]`)}function Bn(n){const l=JSON.stringify(n);return _.useMemo(()=>n,[l])}function ZN(n){var jo,xa,zt;const{host:l,catalog:s,view:o,onViewChange:u,sessions:d}=n,h=_.useRef(null),p=_.useRef([]),[m,g]=_.useState({}),[x,b]=_.useState(1),[E,j]=_.useState(0),[T,C]=_.useState(!1),[M,R]=_.useState(null),D=o.fixture,z=s.fixtures.find(te=>te.id===D),I=z==null?void 0:z.doc,le=z==null?void 0:z.display,[ne,W]=_.useState(null),L=_.useCallback(te=>{W(null),u(te)},[u]);_.useEffect(()=>{vA(D)},[D]);const ue=_.useMemo(()=>new URL(l.base).pathname,[l.base]),de=Bn(s.template.pages),re=Bn(s.template.canvases),ie=Bn(s.islands.map),U=Bn(s.stylesheets),H=s.islands.hostScript,$=Bn(s.islands.importMap),w=Bn(Object.fromEntries(s.template.instances.map(te=>[te.instanceId,te.sectionSchema]))),F=Bn(Object.fromEntries(s.template.instances.map(te=>[te.instanceId,te.section]))),ce=Bn(s.template.instances),ee=s.template.output,G=ee!=="website",S=G?s.template.formats:[],q=Bn(G?S.find(te=>te.id===o.format)??S[0]??null:null),Y=q!==null&&q.bleed>0?q.bleed:null,N=_.useMemo(()=>q?{formatId:q.id,width:q.cssWidth,height:q.cssHeight,tokens:q.tokens}:void 0,[q]),P=re.find(te=>te.id===o.canvasId)??(o.canvasId===null?re[0]??null:null),Q=re.length>0&&P===null,Z=_.useMemo(()=>P?FN(P,de):$N,[P,de]),pe=_.useMemo(()=>Z.map(te=>({id:te.id})),[Z]),ge={basePath:ue,stylesheets:U,cssRev:String(E),islands:ie,hostScript:H,importMap:$},Ee=_.useMemo(()=>Ug(Yb({...ge,sectionSchemaByInstance:w,...N?{pageBox:N}:{}})),[ue,U,E,ie,H,$,w,N]),Re=_.useMemo(()=>Ug(Yb({...ge,...N?{pageBox:N}:{}})).srcdoc(),[ue,U,E,ie,H,$,N]),[Ue,nt]=_.useState(Re);Ue!==Re&&(nt(Re),g({}));const Ye=_.useCallback(te=>{const he=p.current.find(Se=>Se.key===te);return{doc:(he==null?void 0:he.doc)??null,win:(he==null?void 0:he.iframe.contentWindow)??null}},[]),Te=VN({host:l,fixture:D,doc:I,resolvedDisplay:le,sessions:d,pages:pe,frameFor:Ye}),hn=Bn(ce.map(te=>te.instanceId).filter(te=>!Te.displayFor(te).enabled)),[So,ko]=_.useState(null),ti=_.useRef(o.selection);ti.current=o.selection;const ni=_.useRef(Te);ni.current=Te;const ai=_.useRef(Z);ai.current=Z;const dl=_.useRef(x);dl.current=x;const On=_.useMemo(()=>Z.map(te=>({key:te.id,srcdoc:Re,label:te.label,title:`Canvas preview — ${te.label}`,...N?{pageBox:N}:{}})),[Z,Re,N]);_.useEffect(()=>{const te=h.current;if(!te)return;const he=xw(te,On);p.current=he;const Se=he.map(Me=>{const Be=()=>{nw(Me.doc)&&g(Ne=>({...Ne,[Me.key]:!0}))};return Me.iframe.addEventListener("load",Be),()=>Me.iframe.removeEventListener("load",Be)});return()=>{for(const Me of Se)Me()}},[On]),_.useEffect(()=>{for(const te of p.current)ww(te.overlay,T?Y:null)},[T,Y,On]),_.useEffect(()=>{const te=h.current;if(!te||typeof ResizeObserver>"u")return;const he=new ResizeObserver(Se=>{var Ne;const Me=(Ne=Se[0])==null?void 0:Ne.contentRect;if(!(Me!=null&&Me.width))return;const Be=Q_(Me.width);b(Y_(Be,{availableWidthPx:Me.width,availableHeightPx:Me.height},N?{width:N.width,height:N.height}:void 0))});return he.observe(te),()=>he.disconnect()},[N]),_.useEffect(()=>{var te;(te=h.current)==null||te.style.setProperty("--we-scale",String(x))},[x]),_.useEffect(()=>{var he;if(N)return;const te=[];for(const Se of p.current){if(!m[Se.key])continue;const Me=(he=Se.doc)==null?void 0:he.getElementById("we-page");if(!Me)continue;const Be=()=>Se.setPageHeight(Me.getBoundingClientRect().height);if(Be(),typeof ResizeObserver>"u")continue;const Ne=new ResizeObserver(Be);Ne.observe(Me),te.push(()=>Ne.disconnect())}return()=>{for(const Se of te)Se()}},[m,On,N]),_.useEffect(()=>{const te=So;if(!te)return;const he=()=>{document.documentElement.style.setProperty("--we-panel-w",`${te.offsetWidth}px`)};he();const Se=typeof ResizeObserver<"u"?new ResizeObserver(he):null;return Se==null||Se.observe(te),()=>{Se==null||Se.disconnect(),document.documentElement.style.removeProperty("--we-panel-w")}},[So]),_.useEffect(()=>{for(const te of Z)for(const he of te.instanceIds)Te.ensureLoaded(te.id,he)},[Z,Te.ensureLoaded,D,I]);const rt=_.useMemo(()=>{const te={};for(const he of Z){const Se=Te.payloads[he.id]??{};te[he.id]=he.instanceIds.filter(Me=>Se[Me]??Te.errorOn(he.id,Me)).map(Me=>{var Ne,mt;const Be=Te.errorOn(he.id,Me);return{instance_id:Me,section_version_id:D,section_key:F[Me]??Me,section_display_name:((Ne=ce.find(pt=>pt.instanceId===Me))==null?void 0:Ne.label)??null,html:((mt=Se[Me])==null?void 0:mt.html)??null,render_error:Be?{code:"render_failed",message:Be}:null}})}return te},[Z,Te.payloads,Te.errorOn,F,ce,D]);_.useEffect(()=>{let te=!1;for(const he of p.current){if(!m[he.key])continue;const Se=he.doc,Me=he.iframe.contentWindow,Be=Se==null?void 0:Se.getElementById("we-page");if(!Be)continue;const Ne=tx(Me),mt=RN(Be,rt[he.key]??[],(pt,ct)=>Ee.buildSectionWrapper(pt,ct),pt=>Ne==null?void 0:Ne.unmountRoot(pt));mt.length>0&&!Ne&&!te&&Object.keys(ie).length>0&&(te=!0,console.warn("playground: no island host on a canvas frame, so nothing will hydrate and sections stay static. Expected window.__trCanvasIslands from the canvas island host script."));for(const pt of mt)Ne==null||Ne.hydrateRoot(pt).catch(ct=>{console.error("playground: canvas hydration pass failed:",ct)})}},[m,On,rt,Ee,ie]);const Eo=_.useRef(()=>{});Eo.current=te=>{Te.setEnabled(te,!0),L({...o,selection:{kind:"section",instanceId:te}})},_.useEffect(()=>{var Se;const te=new Set(hn),he=[];for(const Me of p.current){if(!m[Me.key])continue;const Be=Me.doc;if(!Be)continue;const Ne=rt[Me.key]??[];for(const Lt of Ne)(Se=l0(Be,Lt.instance_id))==null||Se.setAttribute("data-hidden",te.has(Lt.instance_id)?"true":"false");const mt=Ne.filter(Lt=>te.has(Lt.instance_id)).map(Lt=>({instanceId:Lt.instance_id,label:Pd(Lt)})),pt=uw(Me.tabLayer,document,mt,Lt=>Eo.current(Lt)),ct=()=>dw(pt,Lt=>l0(Be,Lt),x);ct();const Dt=Be.getElementById("we-page");if(!Dt||typeof ResizeObserver>"u")continue;const Ut=new ResizeObserver(ct);Ut.observe(Dt),he.push(()=>Ut.disconnect())}return()=>{for(const Me of he)Me()}},[m,On,rt,hn,x]);const us=_.useCallback(()=>{const te=p.current,he=ti.current,Se=a0(he);for(const Ne of te)Ne.doc&&Ee.setLiveOwner(Ne.doc,Se);const Me=_w(te,Ee,Se),Be=he!==null&&hn.includes(he.instanceId);for(const Ne of te){const mt=Ne.overlay.querySelector(".we-chrome-label"),pt=he&&!Be?Me.find(ct=>ct.handle.key===Ne.key):void 0;if(!pt||!he){Tg(Ne.overlay,[],Rd),Zd(mt);continue}if(Tg(Ne.overlay,pt.els,Rd,he.kind),he.kind==="section"){const ct=(rt[Ne.key]??[]).find(Dt=>Dt.instance_id===he.instanceId);z_(mt,pt.els[0]??null,ct?Pd(ct):"")}else Zd(mt)}},[Ee,rt,hn]);_.useEffect(()=>{us();for(const te of p.current){if(!m[te.key])continue;const he=te.doc,Se=te.iframe.contentWindow;he&&Se&&Aw(Se,he,a0(o.selection))}},[m,On,o.selection,us]);const li=_.useCallback((te,he)=>{const Se=te.getAttribute("href")??"";if(!Se||Se==="#")return;const Me=h.current;if(Se.startsWith("#")){Xr(Se.slice(1),he,Me,dl.current);return}const Be=CN(Se,ue,de,re);if(!Be){window.open(Se,"_blank","noopener,noreferrer");return}if(P!==null&&Be.canvasId===P.id){const Ne=p.current.find(mt=>mt.key===Be.pageId);if(!Ne)return;Be.anchor?Xr(Be.anchor,Ne,Me,dl.current):Ne!==he&&Xr("we-page",Ne,Me,dl.current);return}L({...o,canvasId:Be.canvasId,selection:null}),Be.anchor&&R({pageId:Be.pageId,anchor:Be.anchor})},[o,L,ue,de,re,P]);_.useEffect(()=>{var he;if(!M||!m[M.pageId])return;const te=p.current.find(Se=>Se.key===M.pageId);(he=te==null?void 0:te.doc)!=null&&he.getElementById(M.anchor)&&(Xr(M.anchor,te,h.current,dl.current),R(null))},[M,m,rt]),_.useEffect(()=>{const te=[];for(const he of p.current){if(!m[he.key])continue;const Se=he.doc;if(!Se)continue;const Me=rt[he.key]??[],Be=he.overlay.querySelector(".we-chrome-ring--hover"),Ne=Dt=>{var _a;const Ut=Dt.target,Lt=Ee.resolveTarget(Ut,Me);Fr(Be);const jn=Lt?XN(Lt.selection):null,ml=((_a=Ut.closest)==null?void 0:_a.call(Ut,"a"))??null;if(ml){if(Dt.preventDefault(),(jn==null?void 0:jn.kind)==="slot"){const wa=o.selection,Mo=(wa==null?void 0:wa.kind)==="slot"&&wa.instanceId===jn.instanceId&&wa.slotId===jn.slotId&&wa.itemIndex===jn.itemIndex;L({...o,selection:jn}),Mo&&li(ml,he);return}li(ml,he);return}L({...o,selection:jn})},mt=Dt=>{const Ut=Ee.resolveTarget(Dt.target,Me);Ut?_0(Be,Ut.element,Rd):Fr(Be)},pt=()=>Fr(Be),ct=Dt=>{Dt.key==="Escape"&&L({...o,selection:null})};Se.body.addEventListener("click",Ne),Se.body.addEventListener("mouseover",mt),Se.body.addEventListener("mouseleave",pt),Se.body.addEventListener("keydown",ct),te.push(()=>{Se.body.removeEventListener("click",Ne),Se.body.removeEventListener("mouseover",mt),Se.body.removeEventListener("mouseleave",pt),Se.body.removeEventListener("keydown",ct)})}return()=>{for(const he of te)he()}},[m,On,Ee,rt,o,L,li]);const fl=s.capabilities.hmr;_.useEffect(()=>{if(!fl)return;const te=()=>{const he=new Set;for(const Se of ai.current)for(const Me of Se.instanceIds)he.has(Me)||(he.add(Me),ni.current.reload(Me))};return l.subscribe({source:te,stylesheet:()=>j(he=>he+1)})},[l,fl]);const ii=o.selection,it=(ii==null?void 0:ii.instanceId)??null,hl=Z.find(te=>it!==null&&te.instanceIds.includes(it))??Z[0]??null;return _.useEffect(()=>{it&&hl&&Te.ensureLoaded(hl.id,it)},[it,hl==null?void 0:hl.id,Te.ensureLoaded]),Q?f.jsxs("div",{className:"boot-error",children:['The template declares no canvas "',o.canvasId,'".',`
|
|
1106
|
+
`,"Declared canvases: ",re.map(te=>te.id).join(", ")]}):f.jsxs("div",{className:"canvas-mirror",children:[f.jsx("style",{children:mw}),re.length>1?f.jsx("div",{className:"canvas-bar",children:f.jsx("nav",{className:"canvas-bar__card","aria-label":"Canvases",children:re.map(te=>f.jsx("button",{type:"button",className:te.id===(P==null?void 0:P.id)?"canvas-bar__tab is-current":"canvas-bar__tab","aria-current":te.id===(P==null?void 0:P.id)?"page":void 0,onClick:()=>L({...o,canvasId:te.id,selection:null}),children:te.label},te.id))})}):null,f.jsx("div",{className:"we-canvas-stage canvas-mirror__stage",ref:h,onClick:te=>{var Se;const he=te.target;(he===h.current||(Se=he.classList)!=null&&Se.contains(Wr))&&L({...o,selection:null})}}),f.jsxs("div",{className:"canvas-mirror__sidebar",ref:ko,children:[f.jsxs("div",{className:"sidebar-template",children:[f.jsxs("label",{className:"sidebar-template__field",children:["Fixture",f.jsx("select",{"data-testid":"fixture-picker",value:D,onChange:te=>L({...o,fixture:te.target.value,selection:null}),children:s.fixtures.map(te=>f.jsx("option",{value:te.id,children:wA(te)},te.id))})]}),G&&q&&S.length>1?f.jsxs("label",{className:"sidebar-template__field",children:["Format",f.jsx("select",{"data-testid":"format-switcher",value:q.id,onChange:te=>u({...o,format:te.target.value}),children:S.map(te=>f.jsx("option",{value:te.id,children:`${te.id} — ${te.pixelWidth}×${te.pixelHeight}px${te.physical?` (${te.physical})`:""}`},te.id))})]}):null,Y!==null?f.jsxs("label",{className:"sidebar-template__toggle",children:[f.jsx("input",{type:"checkbox","data-testid":"guides-toggle",checked:T,onChange:te=>C(te.target.checked)}),"Trim & bleed guides"]}):null]}),it?f.jsx(jN,{instanceId:it,label:((jo=ce.find(te=>te.instanceId===it))==null?void 0:jo.label)??it,display:((xa=ce.find(te=>te.instanceId===it))==null?void 0:xa.display)??KN,displayState:Te.displayFor(it),settingsOpen:ne===it,onSetEnabled:te=>Te.setEnabled(it,te),onSetVariant:te=>Te.setVariant(it,te),onOpenSettings:()=>W(it),onCloseSettings:()=>W(null),fixture:D,sectionSchema:w[it]??YN,override:Te.overrideFor(it),payload:Te.payloadFor(it),baseline:Te.baselineFor(it),renderError:Te.errorFor(it),selection:ii,onSelect:te=>L({...o,selection:te}),onApplySlot:(te,he)=>Te.applySlot(it,te,he)}):f.jsx(mA,{}),s.capabilities.capture||ee==="website"?f.jsx(ON,{host:l,templateName:s.template.name,fixture:D,output:ee,format:(q==null?void 0:q.id)??null,canvas:(P==null?void 0:P.id)??null,pagePath:((zt=Z[0])==null?void 0:zt.path)??null}):null]})]})}function PN(n){const[l,s]=_.useState({}),[o,u]=_.useState({}),[d,h]=_.useState(n);if(n!==null&&n!==d){const g=d===null?[]:IN(d,n);h(n),g.length>0&&(s(x=>t0(x,g)),u(x=>t0(x,g)))}const p=_.useCallback(g=>s(g),[]),m=_.useCallback((g,x,b)=>{u(E=>({...E,[g]:{...E[g],[x]:b}}))},[]);return _.useMemo(()=>({edits:l,baselines:o,setEdits:p,setBaseline:m}),[l,o,p,m])}function i0(n){const l=M_(window.location.pathname,n.base);return l===null?null:C_(l,window.location.search)}function JN({host:n}){const[l,s]=_.useState(null),[o,u]=_.useState(null),[d,h]=_.useState(0),[p,m]=_.useState(()=>i0(n)),g=_.useMemo(()=>l===null||l.error!==void 0?null:Object.fromEntries(l.fixtures.map(T=>[T.id,T.doc])),[l]),x=PN(g);_.useEffect(()=>{let T=!0;return n.catalog().then(C=>{T&&(s(C),u(null))},C=>{T&&u(C instanceof Error?C.message:String(C))}),()=>{T=!1}},[n,d]);const b=l==null?void 0:l.template.name;_.useEffect(()=>{b&&(document.title=`${b} - Playground`)},[b]);const E=(l==null?void 0:l.capabilities.hmr)===!0;_.useEffect(()=>{if(!E)return;const T=()=>h(C=>C+1);return n.subscribe({source:T,fixtures:T})},[n,E]),_.useEffect(()=>{const T=()=>m(i0(n));return window.addEventListener("popstate",T),()=>window.removeEventListener("popstate",T)},[n]),_.useEffect(()=>{if(p!==null||l===null)return;const T=A_(l);T!==null&&(window.history.replaceState({},"",new URL(Cg(T),n.base).href),m(T))},[p,l,n]);const j=_.useCallback(T=>{window.history.replaceState({},"",new URL(Cg(T),n.base).href),m(T)},[n]);return o?f.jsxs("div",{className:"boot-error",children:["The playground could not load its catalog — ",o,`
|
|
1101
1107
|
`,"Is the server still starting? Try refreshing."]}):l?l.error!==void 0?f.jsx("div",{className:"boot-error","data-testid":"catalog-error",children:l.error}):l.fixtures.length===0?f.jsx("div",{className:"empty","data-testid":"no-fixtures",children:"No fixtures to render under. Export a defineFixture() value from a module under fixtures/."}):p?l.fixtures.some(T=>T.id===p.fixture)?f.jsx(ZN,{host:n,catalog:l,view:p,onViewChange:j,sessions:x}):f.jsxs("div",{className:"boot-error","data-testid":"unknown-fixture",children:['There is no fixture "',p.fixture,'" (have: ',l.fixtures.map(T=>T.id).join(", "),")."]}):f.jsx("div",{className:"empty",children:"loading canvas…"}):f.jsx("div",{className:"empty",children:"loading…"})}const nx=document.getElementById("root");if(!nx)throw new Error("playground: #root missing from index.html");const ax=yA(document.baseURI);gA(ax);k_.createRoot(nx).render(f.jsx(_.StrictMode,{children:f.jsx(JN,{host:ax})}));
|