@homepages/concrete 9.0.0 → 9.1.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 +17 -0
- package/README.md +2 -2
- package/codemods/manifest.json +4 -0
- package/dist/artifact/playground/client/assets/index-BOYbgBnP.js +1259 -0
- package/dist/artifact/playground/client/index.html +1 -1
- package/dist/artifact/playground/host.mjs +24 -24
- package/dist/cli/check/stages/workspace.js +2 -0
- package/dist/cli/check/template-key.js +16 -0
- package/dist/fixtures/resolve.js +4 -7
- package/dist/packages/external/concrete/package.js +1 -1
- package/dist/packages/internal/capture-settle/dist/island-markers.d.ts +1 -1
- package/dist/packages/internal/fill-bake/dist/bake-property-ref.js +8 -22
- package/dist/packages/internal/fill-bake/dist/compute-reads.js +4 -8
- package/dist/packages/internal/fill-bake/dist/derive-source.js +7 -14
- package/dist/packages/internal/fill-bake/dist/index.js +3 -2
- package/dist/packages/internal/fill-bake/dist/item-merge.js +4 -10
- package/dist/packages/internal/fill-bake/dist/item-overrides.js +1 -28
- package/dist/packages/internal/fill-bake/dist/linked-merge.js +1 -3
- package/dist/packages/internal/fill-bake/dist/list-grammar.js +10 -11
- package/dist/packages/internal/fill-bake/dist/stored-row-reader.js +1 -0
- package/dist/packages/internal/fill-vocabulary/dist/resolved-decision.js +11 -38
- package/dist/packages/internal/fill-vocabulary/dist/verbs.js +2 -17
- package/dist/packages/internal/media-resolution/dist/image.js +6 -8
- package/dist/packages/internal/media-resolution/dist/list.js +1 -1
- package/dist/packages/internal/media-resolution/dist/slot.js +4 -1
- package/dist/packages/internal/media-resolution/dist/tour.js +1 -1
- package/dist/packages/internal/media-resolution/dist/video.js +1 -1
- package/dist/packages/internal/property-facts/dist/registry-facts.js +2 -1
- package/dist/packages/internal/section-contracts/dist/catalog.js +1 -5
- package/dist/packages/internal/section-contracts/dist/directly-linked-list-contract.js +4 -10
- package/dist/packages/internal/section-contracts/dist/fill-spec-view.js +1 -5
- package/dist/packages/internal/section-contracts/dist/fill-verb-contract.js +2 -2
- package/dist/packages/internal/section-contracts/dist/grammar-scope.js +1 -1
- package/dist/packages/internal/section-contracts/dist/index.js +0 -1
- package/dist/packages/internal/section-contracts/dist/list-fill-contract.js +0 -29
- package/dist/packages/internal/section-contracts/dist/list-scalar-contract.js +2 -16
- package/dist/packages/internal/section-contracts/dist/nested-slot-contract.js +6 -6
- package/dist/packages/internal/section-contracts/dist/poi-curation-contract.js +6 -2
- package/dist/packages/internal/section-contracts/dist/row-fill-contract.js +0 -14
- package/dist/packages/internal/section-contracts/dist/row-rule-contract.js +3 -6
- package/dist/packages/internal/section-contracts/dist/runners.js +4 -9
- package/dist/packages/internal/section-contracts/dist/source-contract.js +10 -73
- package/dist/packages/internal/section-contracts/dist/writer-reads-fact-contract.js +5 -10
- package/dist/packages/internal/source-resolution/dist/index.js +7 -8
- package/dist/packages/internal/template-contracts/dist/decision-fills.js +2 -6
- package/dist/packages/internal/template-contracts/dist/fact-registry.js +4 -4
- package/dist/packages/internal/template-contracts/dist/fill-spec-schema.js +3 -68
- package/dist/packages/internal/template-contracts/dist/list-editing.js +0 -1
- package/dist/packages/internal/template-contracts/dist/media-candidates.js +1 -1
- package/dist/packages/internal/template-contracts/dist/primitive-descriptors.js +2 -2
- package/dist/packages/internal/template-contracts/dist/read-graph.js +9 -19
- package/dist/packages/internal/template-contracts/dist/ref-locate.js +8 -24
- package/dist/packages/internal/template-contracts/dist/registry-facts.d.ts +2 -0
- package/dist/packages/internal/template-contracts/dist/row-ref.d.ts +2 -8
- package/dist/packages/internal/template-contracts/dist/row-sources.js +3 -13
- package/dist/packages/internal/template-contracts/dist/slot-catalog.d.ts +1 -32
- package/dist/packages/internal/template-contracts/dist/slot-catalog.js +0 -4
- package/dist/packages/internal/template-contracts/dist/slot-types.js +1 -2
- package/dist/packages/internal/template-contracts/dist/slot-value.d.ts +7 -9
- package/dist/primitives/slot-bindings.js +2 -2
- package/dist/rules/registry.js +6 -0
- package/dist/section/section.d.ts +2 -2
- package/guide/reference/rules/INDEX.md +2 -2
- package/package.json +1 -1
- package/dist/artifact/playground/client/assets/index-BUmdDDX5.js +0 -1259
- package/dist/packages/internal/fill-vocabulary/dist/row-reads.js +0 -15
- package/dist/packages/internal/section-contracts/dist/group-contract.js +0 -19
|
@@ -1,1259 +0,0 @@
|
|
|
1
|
-
var Tx=e=>{throw TypeError(e)};var Tm=(e,t,a)=>t.has(e)||Tx("Cannot "+a);var $=(e,t,a)=>(Tm(e,t,"read from private field"),a?a.call(e):t.get(e)),Ne=(e,t,a)=>t.has(e)?Tx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,a),xe=(e,t,a,r)=>(Tm(e,t,"write to private field"),r?r.call(e,a):t.set(e,a),a),Be=(e,t,a)=>(Tm(e,t,"access private method"),a);var Hu=(e,t,a,r)=>({set _(s){xe(e,t,s,a)},get _(){return $(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&r(u)}).observe(document,{childList:!0,subtree:!0});function a(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(s){if(s.ep)return;s.ep=!0;const c=a(s);fetch(s.href,c)}})();function $M(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Dm={exports:{}},jl={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Dx;function UM(){if(Dx)return jl;Dx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function a(r,s,c){var u=null;if(c!==void 0&&(u=""+c),s.key!==void 0&&(u=""+s.key),"key"in s){c={};for(var m in s)m!=="key"&&(c[m]=s[m])}else c=s;return s=c.ref,{$$typeof:e,type:r,key:u,ref:s!==void 0?s:null,props:c}}return jl.Fragment=t,jl.jsx=a,jl.jsxs=a,jl}var Lx;function IM(){return Lx||(Lx=1,Dm.exports=UM()),Dm.exports}var d=IM(),Lm={exports:{}},qe={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var zx;function BM(){if(zx)return qe;zx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),w=Symbol.iterator;function k(M){return M===null||typeof M!="object"?null:(M=w&&M[w]||M["@@iterator"],typeof M=="function"?M:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,j={};function C(M,H,I){this.props=M,this.context=H,this.refs=j,this.updater=I||E}C.prototype.isReactComponent={},C.prototype.setState=function(M,H){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,H,"setState")},C.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function A(){}A.prototype=C.prototype;function O(M,H,I){this.props=M,this.context=H,this.refs=j,this.updater=I||E}var T=O.prototype=new A;T.constructor=O,S(T,C.prototype),T.isPureReactComponent=!0;var R=Array.isArray;function B(){}var D={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function P(M,H,I){var F=I.ref;return{$$typeof:e,type:M,key:H,ref:F!==void 0?F:null,props:I}}function le(M,H){return P(M.type,H,M.props)}function ee(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function de(M){var H={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(I){return H[I]})}var K=/\/+/g;function Q(M,H){return typeof M=="object"&&M!==null&&M.key!=null?de(""+M.key):H.toString(36)}function se(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(B,B):(M.status="pending",M.then(function(H){M.status==="pending"&&(M.status="fulfilled",M.value=H)},function(H){M.status==="pending"&&(M.status="rejected",M.reason=H)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function N(M,H,I,F,W){var pe=typeof M;(pe==="undefined"||pe==="boolean")&&(M=null);var oe=!1;if(M===null)oe=!0;else switch(pe){case"bigint":case"string":case"number":oe=!0;break;case"object":switch(M.$$typeof){case e:case t:oe=!0;break;case v:return oe=M._init,N(oe(M._payload),H,I,F,W)}}if(oe)return W=W(M),oe=F===""?"."+Q(M,0):F,R(W)?(I="",oe!=null&&(I=oe.replace(K,"$&/")+"/"),N(W,H,I,"",function(ce){return ce})):W!=null&&(ee(W)&&(W=le(W,I+(W.key==null||M&&M.key===W.key?"":(""+W.key).replace(K,"$&/")+"/")+oe)),H.push(W)),1;oe=0;var ke=F===""?".":F+":";if(R(M))for(var z=0;z<M.length;z++)F=M[z],pe=ke+Q(F,z),oe+=N(F,H,I,pe,W);else if(z=k(M),typeof z=="function")for(M=z.call(M),z=0;!(F=M.next()).done;)F=F.value,pe=ke+Q(F,z++),oe+=N(F,H,I,pe,W);else if(pe==="object"){if(typeof M.then=="function")return N(se(M),H,I,F,W);throw H=String(M),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return oe}function V(M,H,I){if(M==null)return M;var F=[],W=0;return N(M,F,"","",function(pe){return H.call(I,pe,W++)}),F}function te(M){if(M._status===-1){var H=M._result;H=H(),H.then(function(I){(M._status===0||M._status===-1)&&(M._status=1,M._result=I)},function(I){(M._status===0||M._status===-1)&&(M._status=2,M._result=I)}),M._status===-1&&(M._status=0,M._result=H)}if(M._status===1)return M._result.default;throw M._result}var me=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},Y={map:V,forEach:function(M,H,I){V(M,function(){H.apply(this,arguments)},I)},count:function(M){var H=0;return V(M,function(){H++}),H},toArray:function(M){return V(M,function(H){return H})||[]},only:function(M){if(!ee(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return qe.Activity=g,qe.Children=Y,qe.Component=C,qe.Fragment=a,qe.Profiler=s,qe.PureComponent=O,qe.StrictMode=r,qe.Suspense=p,qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,qe.__COMPILER_RUNTIME={__proto__:null,c:function(M){return D.H.useMemoCache(M)}},qe.cache=function(M){return function(){return M.apply(null,arguments)}},qe.cacheSignal=function(){return null},qe.cloneElement=function(M,H,I){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var F=S({},M.props),W=M.key;if(H!=null)for(pe in H.key!==void 0&&(W=""+H.key),H)!L.call(H,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&H.ref===void 0||(F[pe]=H[pe]);var pe=arguments.length-2;if(pe===1)F.children=I;else if(1<pe){for(var oe=Array(pe),ke=0;ke<pe;ke++)oe[ke]=arguments[ke+2];F.children=oe}return P(M.type,W,F)},qe.createContext=function(M){return M={$$typeof:u,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:c,_context:M},M},qe.createElement=function(M,H,I){var F,W={},pe=null;if(H!=null)for(F in H.key!==void 0&&(pe=""+H.key),H)L.call(H,F)&&F!=="key"&&F!=="__self"&&F!=="__source"&&(W[F]=H[F]);var oe=arguments.length-2;if(oe===1)W.children=I;else if(1<oe){for(var ke=Array(oe),z=0;z<oe;z++)ke[z]=arguments[z+2];W.children=ke}if(M&&M.defaultProps)for(F in oe=M.defaultProps,oe)W[F]===void 0&&(W[F]=oe[F]);return P(M,pe,W)},qe.createRef=function(){return{current:null}},qe.forwardRef=function(M){return{$$typeof:m,render:M}},qe.isValidElement=ee,qe.lazy=function(M){return{$$typeof:v,_payload:{_status:-1,_result:M},_init:te}},qe.memo=function(M,H){return{$$typeof:y,type:M,compare:H===void 0?null:H}},qe.startTransition=function(M){var H=D.T,I={};D.T=I;try{var F=M(),W=D.S;W!==null&&W(I,F),typeof F=="object"&&F!==null&&typeof F.then=="function"&&F.then(B,me)}catch(pe){me(pe)}finally{H!==null&&I.types!==null&&(H.types=I.types),D.T=H}},qe.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},qe.use=function(M){return D.H.use(M)},qe.useActionState=function(M,H,I){return D.H.useActionState(M,H,I)},qe.useCallback=function(M,H){return D.H.useCallback(M,H)},qe.useContext=function(M){return D.H.useContext(M)},qe.useDebugValue=function(){},qe.useDeferredValue=function(M,H){return D.H.useDeferredValue(M,H)},qe.useEffect=function(M,H){return D.H.useEffect(M,H)},qe.useEffectEvent=function(M){return D.H.useEffectEvent(M)},qe.useId=function(){return D.H.useId()},qe.useImperativeHandle=function(M,H,I){return D.H.useImperativeHandle(M,H,I)},qe.useInsertionEffect=function(M,H){return D.H.useInsertionEffect(M,H)},qe.useLayoutEffect=function(M,H){return D.H.useLayoutEffect(M,H)},qe.useMemo=function(M,H){return D.H.useMemo(M,H)},qe.useOptimistic=function(M,H){return D.H.useOptimistic(M,H)},qe.useReducer=function(M,H,I){return D.H.useReducer(M,H,I)},qe.useRef=function(M){return D.H.useRef(M)},qe.useState=function(M){return D.H.useState(M)},qe.useSyncExternalStore=function(M,H,I){return D.H.useSyncExternalStore(M,H,I)},qe.useTransition=function(){return D.H.useTransition()},qe.version="19.2.6",qe}var $x;function Sy(){return $x||($x=1,Lm.exports=BM()),Lm.exports}var x=Sy();const Ha=$M(x);var zm={exports:{}},Ol={},$m={exports:{}},Um={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var Ux;function HM(){return Ux||(Ux=1,(function(e){function t(N,V){var te=N.length;N.push(V);e:for(;0<te;){var me=te-1>>>1,Y=N[me];if(0<s(Y,V))N[me]=V,N[te]=Y,te=me;else break e}}function a(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var V=N[0],te=N.pop();if(te!==V){N[0]=te;e:for(var me=0,Y=N.length,M=Y>>>1;me<M;){var H=2*(me+1)-1,I=N[H],F=H+1,W=N[F];if(0>s(I,te))F<Y&&0>s(W,I)?(N[me]=W,N[F]=te,me=F):(N[me]=I,N[H]=te,me=H);else if(F<Y&&0>s(W,te))N[me]=W,N[F]=te,me=F;else break e}}return V}function s(N,V){var te=N.sortIndex-V.sortIndex;return te!==0?te:N.id-V.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,m=u.now();e.unstable_now=function(){return u.now()-m}}var p=[],y=[],v=1,g=null,w=3,k=!1,E=!1,S=!1,j=!1,C=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,O=typeof setImmediate<"u"?setImmediate:null;function T(N){for(var V=a(y);V!==null;){if(V.callback===null)r(y);else if(V.startTime<=N)r(y),V.sortIndex=V.expirationTime,t(p,V);else break;V=a(y)}}function R(N){if(S=!1,T(N),!E)if(a(p)!==null)E=!0,B||(B=!0,de());else{var V=a(y);V!==null&&se(R,V.startTime-N)}}var B=!1,D=-1,L=5,P=-1;function le(){return j?!0:!(e.unstable_now()-P<L)}function ee(){if(j=!1,B){var N=e.unstable_now();P=N;var V=!0;try{e:{E=!1,S&&(S=!1,A(D),D=-1),k=!0;var te=w;try{t:{for(T(N),g=a(p);g!==null&&!(g.expirationTime>N&&le());){var me=g.callback;if(typeof me=="function"){g.callback=null,w=g.priorityLevel;var Y=me(g.expirationTime<=N);if(N=e.unstable_now(),typeof Y=="function"){g.callback=Y,T(N),V=!0;break t}g===a(p)&&r(p),T(N)}else r(p);g=a(p)}if(g!==null)V=!0;else{var M=a(y);M!==null&&se(R,M.startTime-N),V=!1}}break e}finally{g=null,w=te,k=!1}V=void 0}}finally{V?de():B=!1}}}var de;if(typeof O=="function")de=function(){O(ee)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,Q=K.port2;K.port1.onmessage=ee,de=function(){Q.postMessage(null)}}else de=function(){C(ee,0)};function se(N,V){D=C(function(){N(e.unstable_now())},V)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(N){N.callback=null},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return w},e.unstable_next=function(N){switch(w){case 1:case 2:case 3:var V=3;break;default:V=w}var te=w;w=V;try{return N()}finally{w=te}},e.unstable_requestPaint=function(){j=!0},e.unstable_runWithPriority=function(N,V){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var te=w;w=N;try{return V()}finally{w=te}},e.unstable_scheduleCallback=function(N,V,te){var me=e.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?me+te:me):te=me,N){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=te+Y,N={id:v++,callback:V,priorityLevel:N,startTime:te,expirationTime:Y,sortIndex:-1},te>me?(N.sortIndex=te,t(y,N),a(p)===null&&N===a(y)&&(S?(A(D),D=-1):S=!0,se(R,te-me))):(N.sortIndex=Y,t(p,N),E||k||(E=!0,B||(B=!0,de()))),N},e.unstable_shouldYield=le,e.unstable_wrapCallback=function(N){var V=w;return function(){var te=w;w=V;try{return N.apply(this,arguments)}finally{w=te}}}})(Um)),Um}var Ix;function qM(){return Ix||(Ix=1,$m.exports=HM()),$m.exports}var Im={exports:{}},ln={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Bx;function FM(){if(Bx)return ln;Bx=1;var e=Sy();function t(p){var y="https://react.dev/errors/"+p;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)y+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+p+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var r={d:{f:a,r:function(){throw Error(t(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},s=Symbol.for("react.portal");function c(p,y,v){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:p,containerInfo:y,implementation:v}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(p,y){if(p==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return ln.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ln.createPortal=function(p,y){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(t(299));return c(p,y,null,v)},ln.flushSync=function(p){var y=u.T,v=r.p;try{if(u.T=null,r.p=2,p)return p()}finally{u.T=y,r.p=v,r.d.f()}},ln.preconnect=function(p,y){typeof p=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,r.d.C(p,y))},ln.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},ln.preinit=function(p,y){if(typeof p=="string"&&y&&typeof y.as=="string"){var v=y.as,g=m(v,y.crossOrigin),w=typeof y.integrity=="string"?y.integrity:void 0,k=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;v==="style"?r.d.S(p,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:g,integrity:w,fetchPriority:k}):v==="script"&&r.d.X(p,{crossOrigin:g,integrity:w,fetchPriority:k,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},ln.preinitModule=function(p,y){if(typeof p=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var v=m(y.as,y.crossOrigin);r.d.M(p,{crossOrigin:v,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&r.d.M(p)},ln.preload=function(p,y){if(typeof p=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var v=y.as,g=m(v,y.crossOrigin);r.d.L(p,v,{crossOrigin:g,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},ln.preloadModule=function(p,y){if(typeof p=="string")if(y){var v=m(y.as,y.crossOrigin);r.d.m(p,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:v,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else r.d.m(p)},ln.requestFormReset=function(p){r.d.r(p)},ln.unstable_batchedUpdates=function(p,y){return p(y)},ln.useFormState=function(p,y,v){return u.H.useFormState(p,y,v)},ln.useFormStatus=function(){return u.H.useHostTransitionStatus()},ln.version="19.2.6",ln}var Hx;function P2(){if(Hx)return Im.exports;Hx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Im.exports=FM(),Im.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-dom-client.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var qx;function PM(){if(qx)return Ol;qx=1;var e=qM(),t=Sy(),a=P2();function r(n){var i="https://react.dev/errors/"+n;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)i+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+n+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function c(n){var i=n,o=n;if(n.alternate)for(;i.return;)i=i.return;else{n=i;do i=n,(i.flags&4098)!==0&&(o=i.return),n=i.return;while(n)}return i.tag===3?o:null}function u(n){if(n.tag===13){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function m(n){if(n.tag===31){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}function p(n){if(c(n)!==n)throw Error(r(188))}function y(n){var i=n.alternate;if(!i){if(i=c(n),i===null)throw Error(r(188));return i!==n?null:n}for(var o=n,l=i;;){var f=o.return;if(f===null)break;var h=f.alternate;if(h===null){if(l=f.return,l!==null){o=l;continue}break}if(f.child===h.child){for(h=f.child;h;){if(h===o)return p(f),n;if(h===l)return p(f),i;h=h.sibling}throw Error(r(188))}if(o.return!==l.return)o=f,l=h;else{for(var b=!1,_=f.child;_;){if(_===o){b=!0,o=f,l=h;break}if(_===l){b=!0,l=f,o=h;break}_=_.sibling}if(!b){for(_=h.child;_;){if(_===o){b=!0,o=h,l=f;break}if(_===l){b=!0,l=h,o=f;break}_=_.sibling}if(!b)throw Error(r(189))}}if(o.alternate!==l)throw Error(r(190))}if(o.tag!==3)throw Error(r(188));return o.stateNode.current===o?n:i}function v(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n;for(n=n.child;n!==null;){if(i=v(n),i!==null)return i;n=n.sibling}return null}var g=Object.assign,w=Symbol.for("react.element"),k=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),O=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function de(n){return n===null||typeof n!="object"?null:(n=ee&&n[ee]||n["@@iterator"],typeof n=="function"?n:null)}var K=Symbol.for("react.client.reference");function Q(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===K?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case S:return"Fragment";case C:return"Profiler";case j:return"StrictMode";case R:return"Suspense";case B:return"SuspenseList";case P:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case E:return"Portal";case O:return n.displayName||"Context";case A:return(n._context.displayName||"Context")+".Consumer";case T:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case D:return i=n.displayName||null,i!==null?i:Q(n.type)||"Memo";case L:i=n._payload,n=n._init;try{return Q(n(i))}catch{}}return null}var se=Array.isArray,N=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},me=[],Y=-1;function M(n){return{current:n}}function H(n){0>Y||(n.current=me[Y],me[Y]=null,Y--)}function I(n,i){Y++,me[Y]=n.current,n.current=i}var F=M(null),W=M(null),pe=M(null),oe=M(null);function ke(n,i){switch(I(pe,i),I(W,n),I(F,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?nx(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=nx(i),n=ix(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}H(F),I(F,n)}function z(){H(F),H(W),H(pe)}function ce(n){n.memoizedState!==null&&I(oe,n);var i=F.current,o=ix(i,n.type);i!==o&&(I(W,n),I(F,o))}function ge(n){W.current===n&&(H(F),H(W)),oe.current===n&&(H(oe),kl._currentValue=te)}var Se,Le;function Ie(n){if(Se===void 0)try{throw Error()}catch(o){var i=o.stack.trim().match(/\n( *(at )?)/);Se=i&&i[1]||"",Le=-1<o.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Se+n+Le}var ye=!1;function Re(n,i){if(!n||ye)return"";ye=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(i){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(re){var J=re}Reflect.construct(n,[],he)}else{try{he.call()}catch(re){J=re}n.call(he.prototype)}}else{try{throw Error()}catch(re){J=re}(he=n())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(re){if(re&&J&&typeof re.stack=="string")return[re.stack,J.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=l.DetermineComponentFrameRoot(),b=h[0],_=h[1];if(b&&_){var U=b.split(`
|
|
44
|
-
`),Z=_.split(`
|
|
45
|
-
`);for(f=l=0;l<U.length&&!U[l].includes("DetermineComponentFrameRoot");)l++;for(;f<Z.length&&!Z[f].includes("DetermineComponentFrameRoot");)f++;if(l===U.length||f===Z.length)for(l=U.length-1,f=Z.length-1;1<=l&&0<=f&&U[l]!==Z[f];)f--;for(;1<=l&&0<=f;l--,f--)if(U[l]!==Z[f]){if(l!==1||f!==1)do if(l--,f--,0>f||U[l]!==Z[f]){var ue=`
|
|
46
|
-
`+U[l].replace(" at new "," at ");return n.displayName&&ue.includes("<anonymous>")&&(ue=ue.replace("<anonymous>",n.displayName)),ue}while(1<=l&&0<=f);break}}}finally{ye=!1,Error.prepareStackTrace=o}return(o=n?n.displayName||n.name:"")?Ie(o):""}function ht(n,i){switch(n.tag){case 26:case 27:case 5:return Ie(n.type);case 16:return Ie("Lazy");case 13:return n.child!==i&&i!==null?Ie("Suspense Fallback"):Ie("Suspense");case 19:return Ie("SuspenseList");case 0:case 15:return Re(n.type,!1);case 11:return Re(n.type.render,!1);case 1:return Re(n.type,!0);case 31:return Ie("Activity");default:return""}}function $e(n){try{var i="",o=null;do i+=ht(n,o),o=n,n=n.return;while(n);return i}catch(l){return`
|
|
47
|
-
Error generating stack: `+l.message+`
|
|
48
|
-
`+l.stack}}var Lt=Object.prototype.hasOwnProperty,lt=e.unstable_scheduleCallback,Fn=e.unstable_cancelCallback,An=e.unstable_shouldYield,un=e.unstable_requestPaint,gt=e.unstable_now,aa=e.unstable_getCurrentPriorityLevel,di=e.unstable_ImmediatePriority,ii=e.unstable_UserBlockingPriority,we=e.unstable_NormalPriority,Te=e.unstable_LowPriority,Ce=e.unstable_IdlePriority,Xe=e.log,at=e.unstable_setDisableYieldValue,Qt=null,ut=null;function ne(n){if(typeof Xe=="function"&&at(n),ut&&typeof ut.setStrictMode=="function")try{ut.setStrictMode(Qt,n)}catch{}}var be=Math.clz32?Math.clz32:Ge,Oe=Math.log,ze=Math.LN2;function Ge(n){return n>>>=0,n===0?32:31-(Oe(n)/ze|0)|0}var He=256,kt=262144,jt=4194304;function _t(n){var i=n&42;if(i!==0)return i;switch(n&-n){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 n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function Ft(n,i,o){var l=n.pendingLanes;if(l===0)return 0;var f=0,h=n.suspendedLanes,b=n.pingedLanes;n=n.warmLanes;var _=l&134217727;return _!==0?(l=_&~h,l!==0?f=_t(l):(b&=_,b!==0?f=_t(b):o||(o=_&~n,o!==0&&(f=_t(o))))):(_=l&~h,_!==0?f=_t(_):b!==0?f=_t(b):o||(o=l&~n,o!==0&&(f=_t(o)))),f===0?0:i!==0&&i!==f&&(i&h)===0&&(h=f&-f,o=i&-i,h>=o||h===32&&(o&4194048)!==0)?i:f}function Xt(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function Zt(n,i){switch(n){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 Nn(){var n=jt;return jt<<=1,(jt&62914560)===0&&(jt=4194304),n}function Oi(n){for(var i=[],o=0;31>o;o++)i.push(n);return i}function ai(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function fi(n,i,o,l,f,h){var b=n.pendingLanes;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=o,n.entangledLanes&=o,n.errorRecoveryDisabledLanes&=o,n.shellSuspendCounter=0;var _=n.entanglements,U=n.expirationTimes,Z=n.hiddenUpdates;for(o=b&~o;0<o;){var ue=31-be(o),he=1<<ue;_[ue]=0,U[ue]=-1;var J=Z[ue];if(J!==null)for(Z[ue]=null,ue=0;ue<J.length;ue++){var re=J[ue];re!==null&&(re.lane&=-536870913)}o&=~he}l!==0&&io(n,l,0),h!==0&&f===0&&n.tag!==0&&(n.suspendedLanes|=h&~(b&~i))}function io(n,i,o){n.pendingLanes|=i,n.suspendedLanes&=~i;var l=31-be(i);n.entangledLanes|=i,n.entanglements[l]=n.entanglements[l]|1073741824|o&261930}function Ac(n,i){var o=n.entangledLanes|=i;for(n=n.entanglements;o;){var l=31-be(o),f=1<<l;f&i|n[l]&i&&(n[l]|=i),o&=~f}}function ae(n,i){var o=i&-i;return o=(o&42)!==0?1:_e(o),(o&(n.suspendedLanes|i))!==0?0:o}function _e(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=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:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Pe(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function At(){var n=V.p;return n!==0?n:(n=window.event,n===void 0?32:jx(n.type))}function nt(n,i){var o=V.p;try{return V.p=n,i()}finally{V.p=o}}var Pn=Math.random().toString(36).slice(2),Ot="__reactFiber$"+Pn,gn="__reactProps$"+Pn,ao="__reactContainer$"+Pn,Sf="__reactEvents$"+Pn,jA="__reactListeners$"+Pn,OA="__reactHandles$"+Pn,Fb="__reactResources$"+Pn,$s="__reactMarker$"+Pn;function Ef(n){delete n[Ot],delete n[gn],delete n[Sf],delete n[jA],delete n[OA]}function ro(n){var i=n[Ot];if(i)return i;for(var o=n.parentNode;o;){if(i=o[ao]||o[Ot]){if(o=i.alternate,i.child!==null||o!==null&&o.child!==null)for(n=ux(n);n!==null;){if(o=n[Ot])return o;n=ux(n)}return i}n=o,o=n.parentNode}return null}function oo(n){if(n=n[Ot]||n[ao]){var i=n.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return n}return null}function Us(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n.stateNode;throw Error(r(33))}function so(n){var i=n[Fb];return i||(i=n[Fb]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Wt(n){n[$s]=!0}var Pb=new Set,Vb={};function lr(n,i){lo(n,i),lo(n+"Capture",i)}function lo(n,i){for(Vb[n]=i,n=0;n<i.length;n++)Pb.add(i[n])}var AA=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]*$"),Gb={},Kb={};function NA(n){return Lt.call(Kb,n)?!0:Lt.call(Gb,n)?!1:AA.test(n)?Kb[n]=!0:(Gb[n]=!0,!1)}function Nc(n,i,o){if(NA(i))if(o===null)n.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":n.removeAttribute(i);return;case"boolean":var l=i.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){n.removeAttribute(i);return}}n.setAttribute(i,""+o)}}function Mc(n,i,o){if(o===null)n.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(i);return}n.setAttribute(i,""+o)}}function Ai(n,i,o,l){if(l===null)n.removeAttribute(o);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttributeNS(i,o,""+l)}}function Vn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Yb(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function MA(n,i,o){var l=Object.getOwnPropertyDescriptor(n.constructor.prototype,i);if(!n.hasOwnProperty(i)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var f=l.get,h=l.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return f.call(this)},set:function(b){o=""+b,h.call(this,b)}}),Object.defineProperty(n,i,{enumerable:l.enumerable}),{getValue:function(){return o},setValue:function(b){o=""+b},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function jf(n){if(!n._valueTracker){var i=Yb(n)?"checked":"value";n._valueTracker=MA(n,i,""+n[i])}}function Qb(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var o=i.getValue(),l="";return n&&(l=Yb(n)?n.checked?"true":"false":n.value),n=l,n!==o?(i.setValue(n),!0):!1}function Cc(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var CA=/[\n"\\]/g;function Gn(n){return n.replace(CA,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function Of(n,i,o,l,f,h,b,_){n.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?n.type=b:n.removeAttribute("type"),i!=null?b==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+Vn(i)):n.value!==""+Vn(i)&&(n.value=""+Vn(i)):b!=="submit"&&b!=="reset"||n.removeAttribute("value"),i!=null?Af(n,b,Vn(i)):o!=null?Af(n,b,Vn(o)):l!=null&&n.removeAttribute("value"),f==null&&h!=null&&(n.defaultChecked=!!h),f!=null&&(n.checked=f&&typeof f!="function"&&typeof f!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?n.name=""+Vn(_):n.removeAttribute("name")}function Xb(n,i,o,l,f,h,b,_){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(n.type=h),i!=null||o!=null){if(!(h!=="submit"&&h!=="reset"||i!=null)){jf(n);return}o=o!=null?""+Vn(o):"",i=i!=null?""+Vn(i):o,_||i===n.value||(n.value=i),n.defaultValue=i}l=l??f,l=typeof l!="function"&&typeof l!="symbol"&&!!l,n.checked=_?n.checked:!!l,n.defaultChecked=!!l,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(n.name=b),jf(n)}function Af(n,i,o){i==="number"&&Cc(n.ownerDocument)===n||n.defaultValue===""+o||(n.defaultValue=""+o)}function co(n,i,o,l){if(n=n.options,i){i={};for(var f=0;f<o.length;f++)i["$"+o[f]]=!0;for(o=0;o<n.length;o++)f=i.hasOwnProperty("$"+n[o].value),n[o].selected!==f&&(n[o].selected=f),f&&l&&(n[o].defaultSelected=!0)}else{for(o=""+Vn(o),i=null,f=0;f<n.length;f++){if(n[f].value===o){n[f].selected=!0,l&&(n[f].defaultSelected=!0);return}i!==null||n[f].disabled||(i=n[f])}i!==null&&(i.selected=!0)}}function Zb(n,i,o){if(i!=null&&(i=""+Vn(i),i!==n.value&&(n.value=i),o==null)){n.defaultValue!==i&&(n.defaultValue=i);return}n.defaultValue=o!=null?""+Vn(o):""}function Wb(n,i,o,l){if(i==null){if(l!=null){if(o!=null)throw Error(r(92));if(se(l)){if(1<l.length)throw Error(r(93));l=l[0]}o=l}o==null&&(o=""),i=o}o=Vn(i),n.defaultValue=o,l=n.textContent,l===o&&l!==""&&l!==null&&(n.value=l),jf(n)}function uo(n,i){if(i){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=i;return}}n.textContent=i}var RA=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 Jb(n,i,o){var l=i.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?l?n.setProperty(i,""):i==="float"?n.cssFloat="":n[i]="":l?n.setProperty(i,o):typeof o!="number"||o===0||RA.has(i)?i==="float"?n.cssFloat=o:n[i]=(""+o).trim():n[i]=o+"px"}function e0(n,i,o){if(i!=null&&typeof i!="object")throw Error(r(62));if(n=n.style,o!=null){for(var l in o)!o.hasOwnProperty(l)||i!=null&&i.hasOwnProperty(l)||(l.indexOf("--")===0?n.setProperty(l,""):l==="float"?n.cssFloat="":n[l]="");for(var f in i)l=i[f],i.hasOwnProperty(f)&&o[f]!==l&&Jb(n,f,l)}else for(var h in i)i.hasOwnProperty(h)&&Jb(n,h,i[h])}function Nf(n){if(n.indexOf("-")===-1)return!1;switch(n){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 TA=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"]]),DA=/^[\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 Rc(n){return DA.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function Ni(){}var Mf=null;function Cf(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var fo=null,ho=null;function t0(n){var i=oo(n);if(i&&(n=i.stateNode)){var o=n[gn]||null;e:switch(n=i.stateNode,i.type){case"input":if(Of(n,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),i=o.name,o.type==="radio"&&i!=null){for(o=n;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+Gn(""+i)+'"][type="radio"]'),i=0;i<o.length;i++){var l=o[i];if(l!==n&&l.form===n.form){var f=l[gn]||null;if(!f)throw Error(r(90));Of(l,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(i=0;i<o.length;i++)l=o[i],l.form===n.form&&Qb(l)}break e;case"textarea":Zb(n,o.value,o.defaultValue);break e;case"select":i=o.value,i!=null&&co(n,!!o.multiple,i,!1)}}}var Rf=!1;function n0(n,i,o){if(Rf)return n(i,o);Rf=!0;try{var l=n(i);return l}finally{if(Rf=!1,(fo!==null||ho!==null)&&(vu(),fo&&(i=fo,n=ho,ho=fo=null,t0(i),n)))for(i=0;i<n.length;i++)t0(n[i])}}function Is(n,i){var o=n.stateNode;if(o===null)return null;var l=o[gn]||null;if(l===null)return null;o=l[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(n=n.type,l=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!l;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(r(231,i,typeof o));return o}var Mi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Tf=!1;if(Mi)try{var Bs={};Object.defineProperty(Bs,"passive",{get:function(){Tf=!0}}),window.addEventListener("test",Bs,Bs),window.removeEventListener("test",Bs,Bs)}catch{Tf=!1}var ra=null,Df=null,Tc=null;function i0(){if(Tc)return Tc;var n,i=Df,o=i.length,l,f="value"in ra?ra.value:ra.textContent,h=f.length;for(n=0;n<o&&i[n]===f[n];n++);var b=o-n;for(l=1;l<=b&&i[o-l]===f[h-l];l++);return Tc=f.slice(n,1<l?1-l:void 0)}function Dc(n){var i=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&i===13&&(n=13)):n=i,n===10&&(n=13),32<=n||n===13?n:0}function Lc(){return!0}function a0(){return!1}function bn(n){function i(o,l,f,h,b){this._reactName=o,this._targetInst=f,this.type=l,this.nativeEvent=h,this.target=b,this.currentTarget=null;for(var _ in n)n.hasOwnProperty(_)&&(o=n[_],this[_]=o?o(h):h[_]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Lc:a0,this.isPropagationStopped=a0,this}return g(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=Lc)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Lc)},persist:function(){},isPersistent:Lc}),i}var cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zc=bn(cr),Hs=g({},cr,{view:0,detail:0}),LA=bn(Hs),Lf,zf,qs,$c=g({},Hs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Uf,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==qs&&(qs&&n.type==="mousemove"?(Lf=n.screenX-qs.screenX,zf=n.screenY-qs.screenY):zf=Lf=0,qs=n),Lf)},movementY:function(n){return"movementY"in n?n.movementY:zf}}),r0=bn($c),zA=g({},$c,{dataTransfer:0}),$A=bn(zA),UA=g({},Hs,{relatedTarget:0}),$f=bn(UA),IA=g({},cr,{animationName:0,elapsedTime:0,pseudoElement:0}),BA=bn(IA),HA=g({},cr,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),qA=bn(HA),FA=g({},cr,{data:0}),o0=bn(FA),PA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},VA={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"},GA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function KA(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=GA[n])?!!i[n]:!1}function Uf(){return KA}var YA=g({},Hs,{key:function(n){if(n.key){var i=PA[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=Dc(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?VA[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Uf,charCode:function(n){return n.type==="keypress"?Dc(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Dc(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),QA=bn(YA),XA=g({},$c,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),s0=bn(XA),ZA=g({},Hs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Uf}),WA=bn(ZA),JA=g({},cr,{propertyName:0,elapsedTime:0,pseudoElement:0}),eN=bn(JA),tN=g({},$c,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),nN=bn(tN),iN=g({},cr,{newState:0,oldState:0}),aN=bn(iN),rN=[9,13,27,32],If=Mi&&"CompositionEvent"in window,Fs=null;Mi&&"documentMode"in document&&(Fs=document.documentMode);var oN=Mi&&"TextEvent"in window&&!Fs,l0=Mi&&(!If||Fs&&8<Fs&&11>=Fs),c0=" ",u0=!1;function d0(n,i){switch(n){case"keyup":return rN.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function f0(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var mo=!1;function sN(n,i){switch(n){case"compositionend":return f0(i);case"keypress":return i.which!==32?null:(u0=!0,c0);case"textInput":return n=i.data,n===c0&&u0?null:n;default:return null}}function lN(n,i){if(mo)return n==="compositionend"||!If&&d0(n,i)?(n=i0(),Tc=Df=ra=null,mo=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return l0&&i.locale!=="ko"?null:i.data;default:return null}}var cN={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 h0(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!cN[n.type]:i==="textarea"}function m0(n,i,o,l){fo?ho?ho.push(l):ho=[l]:fo=l,i=ju(i,"onChange"),0<i.length&&(o=new zc("onChange","change",null,o,l),n.push({event:o,listeners:i}))}var Ps=null,Vs=null;function uN(n){X1(n,0)}function Uc(n){var i=Us(n);if(Qb(i))return n}function p0(n,i){if(n==="change")return i}var y0=!1;if(Mi){var Bf;if(Mi){var Hf="oninput"in document;if(!Hf){var g0=document.createElement("div");g0.setAttribute("oninput","return;"),Hf=typeof g0.oninput=="function"}Bf=Hf}else Bf=!1;y0=Bf&&(!document.documentMode||9<document.documentMode)}function b0(){Ps&&(Ps.detachEvent("onpropertychange",v0),Vs=Ps=null)}function v0(n){if(n.propertyName==="value"&&Uc(Vs)){var i=[];m0(i,Vs,n,Cf(n)),n0(uN,i)}}function dN(n,i,o){n==="focusin"?(b0(),Ps=i,Vs=o,Ps.attachEvent("onpropertychange",v0)):n==="focusout"&&b0()}function fN(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Uc(Vs)}function hN(n,i){if(n==="click")return Uc(i)}function mN(n,i){if(n==="input"||n==="change")return Uc(i)}function pN(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var Mn=typeof Object.is=="function"?Object.is:pN;function Gs(n,i){if(Mn(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var o=Object.keys(n),l=Object.keys(i);if(o.length!==l.length)return!1;for(l=0;l<o.length;l++){var f=o[l];if(!Lt.call(i,f)||!Mn(n[f],i[f]))return!1}return!0}function x0(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function w0(n,i){var o=x0(n);n=0;for(var l;o;){if(o.nodeType===3){if(l=n+o.textContent.length,n<=i&&l>=i)return{node:o,offset:i-n};n=l}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=x0(o)}}function k0(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?k0(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function _0(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=Cc(n.document);i instanceof n.HTMLIFrameElement;){try{var o=typeof i.contentWindow.location.href=="string"}catch{o=!1}if(o)n=i.contentWindow;else break;i=Cc(n.document)}return i}function qf(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i&&(i==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||i==="textarea"||n.contentEditable==="true")}var yN=Mi&&"documentMode"in document&&11>=document.documentMode,po=null,Ff=null,Ks=null,Pf=!1;function S0(n,i,o){var l=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Pf||po==null||po!==Cc(l)||(l=po,"selectionStart"in l&&qf(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Ks&&Gs(Ks,l)||(Ks=l,l=ju(Ff,"onSelect"),0<l.length&&(i=new zc("onSelect","select",null,i,o),n.push({event:i,listeners:l}),i.target=po)))}function ur(n,i){var o={};return o[n.toLowerCase()]=i.toLowerCase(),o["Webkit"+n]="webkit"+i,o["Moz"+n]="moz"+i,o}var yo={animationend:ur("Animation","AnimationEnd"),animationiteration:ur("Animation","AnimationIteration"),animationstart:ur("Animation","AnimationStart"),transitionrun:ur("Transition","TransitionRun"),transitionstart:ur("Transition","TransitionStart"),transitioncancel:ur("Transition","TransitionCancel"),transitionend:ur("Transition","TransitionEnd")},Vf={},E0={};Mi&&(E0=document.createElement("div").style,"AnimationEvent"in window||(delete yo.animationend.animation,delete yo.animationiteration.animation,delete yo.animationstart.animation),"TransitionEvent"in window||delete yo.transitionend.transition);function dr(n){if(Vf[n])return Vf[n];if(!yo[n])return n;var i=yo[n],o;for(o in i)if(i.hasOwnProperty(o)&&o in E0)return Vf[n]=i[o];return n}var j0=dr("animationend"),O0=dr("animationiteration"),A0=dr("animationstart"),gN=dr("transitionrun"),bN=dr("transitionstart"),vN=dr("transitioncancel"),N0=dr("transitionend"),M0=new Map,Gf="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(" ");Gf.push("scrollEnd");function ri(n,i){M0.set(n,i),lr(i,[n])}var Ic=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},Kn=[],go=0,Kf=0;function Bc(){for(var n=go,i=Kf=go=0;i<n;){var o=Kn[i];Kn[i++]=null;var l=Kn[i];Kn[i++]=null;var f=Kn[i];Kn[i++]=null;var h=Kn[i];if(Kn[i++]=null,l!==null&&f!==null){var b=l.pending;b===null?f.next=f:(f.next=b.next,b.next=f),l.pending=f}h!==0&&C0(o,f,h)}}function Hc(n,i,o,l){Kn[go++]=n,Kn[go++]=i,Kn[go++]=o,Kn[go++]=l,Kf|=l,n.lanes|=l,n=n.alternate,n!==null&&(n.lanes|=l)}function Yf(n,i,o,l){return Hc(n,i,o,l),qc(n)}function fr(n,i){return Hc(n,null,null,i),qc(n)}function C0(n,i,o){n.lanes|=o;var l=n.alternate;l!==null&&(l.lanes|=o);for(var f=!1,h=n.return;h!==null;)h.childLanes|=o,l=h.alternate,l!==null&&(l.childLanes|=o),h.tag===22&&(n=h.stateNode,n===null||n._visibility&1||(f=!0)),n=h,h=h.return;return n.tag===3?(h=n.stateNode,f&&i!==null&&(f=31-be(o),n=h.hiddenUpdates,l=n[f],l===null?n[f]=[i]:l.push(i),i.lane=o|536870912),h):null}function qc(n){if(50<pl)throw pl=0,im=null,Error(r(185));for(var i=n.return;i!==null;)n=i,i=n.return;return n.tag===3?n.stateNode:null}var bo={};function xN(n,i,o,l){this.tag=n,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cn(n,i,o,l){return new xN(n,i,o,l)}function Qf(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Ci(n,i){var o=n.alternate;return o===null?(o=Cn(n.tag,i,n.key,n.mode),o.elementType=n.elementType,o.type=n.type,o.stateNode=n.stateNode,o.alternate=n,n.alternate=o):(o.pendingProps=i,o.type=n.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=n.flags&65011712,o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue,i=n.dependencies,o.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},o.sibling=n.sibling,o.index=n.index,o.ref=n.ref,o.refCleanup=n.refCleanup,o}function R0(n,i){n.flags&=65011714;var o=n.alternate;return o===null?(n.childLanes=0,n.lanes=i,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=o.childLanes,n.lanes=o.lanes,n.child=o.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=o.memoizedProps,n.memoizedState=o.memoizedState,n.updateQueue=o.updateQueue,n.type=o.type,i=o.dependencies,n.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),n}function Fc(n,i,o,l,f,h){var b=0;if(l=n,typeof n=="function")Qf(n)&&(b=1);else if(typeof n=="string")b=EM(n,o,F.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case P:return n=Cn(31,o,i,f),n.elementType=P,n.lanes=h,n;case S:return hr(o.children,f,h,i);case j:b=8,f|=24;break;case C:return n=Cn(12,o,i,f|2),n.elementType=C,n.lanes=h,n;case R:return n=Cn(13,o,i,f),n.elementType=R,n.lanes=h,n;case B:return n=Cn(19,o,i,f),n.elementType=B,n.lanes=h,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case O:b=10;break e;case A:b=9;break e;case T:b=11;break e;case D:b=14;break e;case L:b=16,l=null;break e}b=29,o=Error(r(130,n===null?"null":typeof n,"")),l=null}return i=Cn(b,o,i,f),i.elementType=n,i.type=l,i.lanes=h,i}function hr(n,i,o,l){return n=Cn(7,n,l,i),n.lanes=o,n}function Xf(n,i,o){return n=Cn(6,n,null,i),n.lanes=o,n}function T0(n){var i=Cn(18,null,null,0);return i.stateNode=n,i}function Zf(n,i,o){return i=Cn(4,n.children!==null?n.children:[],n.key,i),i.lanes=o,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}var D0=new WeakMap;function Yn(n,i){if(typeof n=="object"&&n!==null){var o=D0.get(n);return o!==void 0?o:(i={value:n,source:i,stack:$e(i)},D0.set(n,i),i)}return{value:n,source:i,stack:$e(i)}}var vo=[],xo=0,Pc=null,Ys=0,Qn=[],Xn=0,oa=null,hi=1,mi="";function Ri(n,i){vo[xo++]=Ys,vo[xo++]=Pc,Pc=n,Ys=i}function L0(n,i,o){Qn[Xn++]=hi,Qn[Xn++]=mi,Qn[Xn++]=oa,oa=n;var l=hi;n=mi;var f=32-be(l)-1;l&=~(1<<f),o+=1;var h=32-be(i)+f;if(30<h){var b=f-f%5;h=(l&(1<<b)-1).toString(32),l>>=b,f-=b,hi=1<<32-be(i)+f|o<<f|l,mi=h+n}else hi=1<<h|o<<f|l,mi=n}function Wf(n){n.return!==null&&(Ri(n,1),L0(n,1,0))}function Jf(n){for(;n===Pc;)Pc=vo[--xo],vo[xo]=null,Ys=vo[--xo],vo[xo]=null;for(;n===oa;)oa=Qn[--Xn],Qn[Xn]=null,mi=Qn[--Xn],Qn[Xn]=null,hi=Qn[--Xn],Qn[Xn]=null}function z0(n,i){Qn[Xn++]=hi,Qn[Xn++]=mi,Qn[Xn++]=oa,hi=i.id,mi=i.overflow,oa=n}var tn=null,xt=null,et=!1,sa=null,Zn=!1,eh=Error(r(519));function la(n){var i=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Qs(Yn(i,n)),eh}function $0(n){var i=n.stateNode,o=n.type,l=n.memoizedProps;switch(i[Ot]=n,i[gn]=l,o){case"dialog":Qe("cancel",i),Qe("close",i);break;case"iframe":case"object":case"embed":Qe("load",i);break;case"video":case"audio":for(o=0;o<gl.length;o++)Qe(gl[o],i);break;case"source":Qe("error",i);break;case"img":case"image":case"link":Qe("error",i),Qe("load",i);break;case"details":Qe("toggle",i);break;case"input":Qe("invalid",i),Xb(i,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Qe("invalid",i);break;case"textarea":Qe("invalid",i),Wb(i,l.value,l.defaultValue,l.children)}o=l.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||i.textContent===""+o||l.suppressHydrationWarning===!0||ex(i.textContent,o)?(l.popover!=null&&(Qe("beforetoggle",i),Qe("toggle",i)),l.onScroll!=null&&Qe("scroll",i),l.onScrollEnd!=null&&Qe("scrollend",i),l.onClick!=null&&(i.onclick=Ni),i=!0):i=!1,i||la(n,!0)}function U0(n){for(tn=n.return;tn;)switch(tn.tag){case 5:case 31:case 13:Zn=!1;return;case 27:case 3:Zn=!0;return;default:tn=tn.return}}function wo(n){if(n!==tn)return!1;if(!et)return U0(n),et=!0,!1;var i=n.tag,o;if((o=i!==3&&i!==27)&&((o=i===5)&&(o=n.type,o=!(o!=="form"&&o!=="button")||bm(n.type,n.memoizedProps)),o=!o),o&&xt&&la(n),U0(n),i===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));xt=cx(n)}else if(i===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));xt=cx(n)}else i===27?(i=xt,ka(n.type)?(n=_m,_m=null,xt=n):xt=i):xt=tn?Jn(n.stateNode.nextSibling):null;return!0}function mr(){xt=tn=null,et=!1}function th(){var n=sa;return n!==null&&(kn===null?kn=n:kn.push.apply(kn,n),sa=null),n}function Qs(n){sa===null?sa=[n]:sa.push(n)}var nh=M(null),pr=null,Ti=null;function ca(n,i,o){I(nh,i._currentValue),i._currentValue=o}function Di(n){n._currentValue=nh.current,H(nh)}function ih(n,i,o){for(;n!==null;){var l=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,l!==null&&(l.childLanes|=i)):l!==null&&(l.childLanes&i)!==i&&(l.childLanes|=i),n===o)break;n=n.return}}function ah(n,i,o,l){var f=n.child;for(f!==null&&(f.return=n);f!==null;){var h=f.dependencies;if(h!==null){var b=f.child;h=h.firstContext;e:for(;h!==null;){var _=h;h=f;for(var U=0;U<i.length;U++)if(_.context===i[U]){h.lanes|=o,_=h.alternate,_!==null&&(_.lanes|=o),ih(h.return,o,n),l||(b=null);break e}h=_.next}}else if(f.tag===18){if(b=f.return,b===null)throw Error(r(341));b.lanes|=o,h=b.alternate,h!==null&&(h.lanes|=o),ih(b,o,n),b=null}else b=f.child;if(b!==null)b.return=f;else for(b=f;b!==null;){if(b===n){b=null;break}if(f=b.sibling,f!==null){f.return=b.return,b=f;break}b=b.return}f=b}}function ko(n,i,o,l){n=null;for(var f=i,h=!1;f!==null;){if(!h){if((f.flags&524288)!==0)h=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var b=f.alternate;if(b===null)throw Error(r(387));if(b=b.memoizedProps,b!==null){var _=f.type;Mn(f.pendingProps.value,b.value)||(n!==null?n.push(_):n=[_])}}else if(f===oe.current){if(b=f.alternate,b===null)throw Error(r(387));b.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(n!==null?n.push(kl):n=[kl])}f=f.return}n!==null&&ah(i,n,o,l),i.flags|=262144}function Vc(n){for(n=n.firstContext;n!==null;){if(!Mn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function yr(n){pr=n,Ti=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function nn(n){return I0(pr,n)}function Gc(n,i){return pr===null&&yr(n),I0(n,i)}function I0(n,i){var o=i._currentValue;if(i={context:i,memoizedValue:o,next:null},Ti===null){if(n===null)throw Error(r(308));Ti=i,n.dependencies={lanes:0,firstContext:i},n.flags|=524288}else Ti=Ti.next=i;return o}var wN=typeof AbortController<"u"?AbortController:function(){var n=[],i=this.signal={aborted:!1,addEventListener:function(o,l){n.push(l)}};this.abort=function(){i.aborted=!0,n.forEach(function(o){return o()})}},kN=e.unstable_scheduleCallback,_N=e.unstable_NormalPriority,zt={$$typeof:O,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function rh(){return{controller:new wN,data:new Map,refCount:0}}function Xs(n){n.refCount--,n.refCount===0&&kN(_N,function(){n.controller.abort()})}var Zs=null,oh=0,_o=0,So=null;function SN(n,i){if(Zs===null){var o=Zs=[];oh=0,_o=cm(),So={status:"pending",value:void 0,then:function(l){o.push(l)}}}return oh++,i.then(B0,B0),i}function B0(){if(--oh===0&&Zs!==null){So!==null&&(So.status="fulfilled");var n=Zs;Zs=null,_o=0,So=null;for(var i=0;i<n.length;i++)(0,n[i])()}}function EN(n,i){var o=[],l={status:"pending",value:null,reason:null,then:function(f){o.push(f)}};return n.then(function(){l.status="fulfilled",l.value=i;for(var f=0;f<o.length;f++)(0,o[f])(i)},function(f){for(l.status="rejected",l.reason=f,f=0;f<o.length;f++)(0,o[f])(void 0)}),l}var H0=N.S;N.S=function(n,i){S1=gt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&SN(n,i),H0!==null&&H0(n,i)};var gr=M(null);function sh(){var n=gr.current;return n!==null?n:bt.pooledCache}function Kc(n,i){i===null?I(gr,gr.current):I(gr,i.pool)}function q0(){var n=sh();return n===null?null:{parent:zt._currentValue,pool:n}}var Eo=Error(r(460)),lh=Error(r(474)),Yc=Error(r(542)),Qc={then:function(){}};function F0(n){return n=n.status,n==="fulfilled"||n==="rejected"}function P0(n,i,o){switch(o=n[o],o===void 0?n.push(i):o!==i&&(i.then(Ni,Ni),i=o),i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,G0(n),n;default:if(typeof i.status=="string")i.then(Ni,Ni);else{if(n=bt,n!==null&&100<n.shellSuspendCounter)throw Error(r(482));n=i,n.status="pending",n.then(function(l){if(i.status==="pending"){var f=i;f.status="fulfilled",f.value=l}},function(l){if(i.status==="pending"){var f=i;f.status="rejected",f.reason=l}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,G0(n),n}throw vr=i,Eo}}function br(n){try{var i=n._init;return i(n._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(vr=o,Eo):o}}var vr=null;function V0(){if(vr===null)throw Error(r(459));var n=vr;return vr=null,n}function G0(n){if(n===Eo||n===Yc)throw Error(r(483))}var jo=null,Ws=0;function Xc(n){var i=Ws;return Ws+=1,jo===null&&(jo=[]),P0(jo,n,i)}function Js(n,i){i=i.props.ref,n.ref=i!==void 0?i:null}function Zc(n,i){throw i.$$typeof===w?Error(r(525)):(n=Object.prototype.toString.call(i),Error(r(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n)))}function K0(n){function i(G,q){if(n){var X=G.deletions;X===null?(G.deletions=[q],G.flags|=16):X.push(q)}}function o(G,q){if(!n)return null;for(;q!==null;)i(G,q),q=q.sibling;return null}function l(G){for(var q=new Map;G!==null;)G.key!==null?q.set(G.key,G):q.set(G.index,G),G=G.sibling;return q}function f(G,q){return G=Ci(G,q),G.index=0,G.sibling=null,G}function h(G,q,X){return G.index=X,n?(X=G.alternate,X!==null?(X=X.index,X<q?(G.flags|=67108866,q):X):(G.flags|=67108866,q)):(G.flags|=1048576,q)}function b(G){return n&&G.alternate===null&&(G.flags|=67108866),G}function _(G,q,X,fe){return q===null||q.tag!==6?(q=Xf(X,G.mode,fe),q.return=G,q):(q=f(q,X),q.return=G,q)}function U(G,q,X,fe){var De=X.type;return De===S?ue(G,q,X.props.children,fe,X.key):q!==null&&(q.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===L&&br(De)===q.type)?(q=f(q,X.props),Js(q,X),q.return=G,q):(q=Fc(X.type,X.key,X.props,null,G.mode,fe),Js(q,X),q.return=G,q)}function Z(G,q,X,fe){return q===null||q.tag!==4||q.stateNode.containerInfo!==X.containerInfo||q.stateNode.implementation!==X.implementation?(q=Zf(X,G.mode,fe),q.return=G,q):(q=f(q,X.children||[]),q.return=G,q)}function ue(G,q,X,fe,De){return q===null||q.tag!==7?(q=hr(X,G.mode,fe,De),q.return=G,q):(q=f(q,X),q.return=G,q)}function he(G,q,X){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=Xf(""+q,G.mode,X),q.return=G,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case k:return X=Fc(q.type,q.key,q.props,null,G.mode,X),Js(X,q),X.return=G,X;case E:return q=Zf(q,G.mode,X),q.return=G,q;case L:return q=br(q),he(G,q,X)}if(se(q)||de(q))return q=hr(q,G.mode,X,null),q.return=G,q;if(typeof q.then=="function")return he(G,Xc(q),X);if(q.$$typeof===O)return he(G,Gc(G,q),X);Zc(G,q)}return null}function J(G,q,X,fe){var De=q!==null?q.key:null;if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return De!==null?null:_(G,q,""+X,fe);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case k:return X.key===De?U(G,q,X,fe):null;case E:return X.key===De?Z(G,q,X,fe):null;case L:return X=br(X),J(G,q,X,fe)}if(se(X)||de(X))return De!==null?null:ue(G,q,X,fe,null);if(typeof X.then=="function")return J(G,q,Xc(X),fe);if(X.$$typeof===O)return J(G,q,Gc(G,X),fe);Zc(G,X)}return null}function re(G,q,X,fe,De){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return G=G.get(X)||null,_(q,G,""+fe,De);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case k:return G=G.get(fe.key===null?X:fe.key)||null,U(q,G,fe,De);case E:return G=G.get(fe.key===null?X:fe.key)||null,Z(q,G,fe,De);case L:return fe=br(fe),re(G,q,X,fe,De)}if(se(fe)||de(fe))return G=G.get(X)||null,ue(q,G,fe,De,null);if(typeof fe.then=="function")return re(G,q,X,Xc(fe),De);if(fe.$$typeof===O)return re(G,q,X,Gc(q,fe),De);Zc(q,fe)}return null}function Ae(G,q,X,fe){for(var De=null,rt=null,Me=q,Ve=q=0,We=null;Me!==null&&Ve<X.length;Ve++){Me.index>Ve?(We=Me,Me=null):We=Me.sibling;var ot=J(G,Me,X[Ve],fe);if(ot===null){Me===null&&(Me=We);break}n&&Me&&ot.alternate===null&&i(G,Me),q=h(ot,q,Ve),rt===null?De=ot:rt.sibling=ot,rt=ot,Me=We}if(Ve===X.length)return o(G,Me),et&&Ri(G,Ve),De;if(Me===null){for(;Ve<X.length;Ve++)Me=he(G,X[Ve],fe),Me!==null&&(q=h(Me,q,Ve),rt===null?De=Me:rt.sibling=Me,rt=Me);return et&&Ri(G,Ve),De}for(Me=l(Me);Ve<X.length;Ve++)We=re(Me,G,Ve,X[Ve],fe),We!==null&&(n&&We.alternate!==null&&Me.delete(We.key===null?Ve:We.key),q=h(We,q,Ve),rt===null?De=We:rt.sibling=We,rt=We);return n&&Me.forEach(function(Oa){return i(G,Oa)}),et&&Ri(G,Ve),De}function Ue(G,q,X,fe){if(X==null)throw Error(r(151));for(var De=null,rt=null,Me=q,Ve=q=0,We=null,ot=X.next();Me!==null&&!ot.done;Ve++,ot=X.next()){Me.index>Ve?(We=Me,Me=null):We=Me.sibling;var Oa=J(G,Me,ot.value,fe);if(Oa===null){Me===null&&(Me=We);break}n&&Me&&Oa.alternate===null&&i(G,Me),q=h(Oa,q,Ve),rt===null?De=Oa:rt.sibling=Oa,rt=Oa,Me=We}if(ot.done)return o(G,Me),et&&Ri(G,Ve),De;if(Me===null){for(;!ot.done;Ve++,ot=X.next())ot=he(G,ot.value,fe),ot!==null&&(q=h(ot,q,Ve),rt===null?De=ot:rt.sibling=ot,rt=ot);return et&&Ri(G,Ve),De}for(Me=l(Me);!ot.done;Ve++,ot=X.next())ot=re(Me,G,Ve,ot.value,fe),ot!==null&&(n&&ot.alternate!==null&&Me.delete(ot.key===null?Ve:ot.key),q=h(ot,q,Ve),rt===null?De=ot:rt.sibling=ot,rt=ot);return n&&Me.forEach(function(zM){return i(G,zM)}),et&&Ri(G,Ve),De}function yt(G,q,X,fe){if(typeof X=="object"&&X!==null&&X.type===S&&X.key===null&&(X=X.props.children),typeof X=="object"&&X!==null){switch(X.$$typeof){case k:e:{for(var De=X.key;q!==null;){if(q.key===De){if(De=X.type,De===S){if(q.tag===7){o(G,q.sibling),fe=f(q,X.props.children),fe.return=G,G=fe;break e}}else if(q.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===L&&br(De)===q.type){o(G,q.sibling),fe=f(q,X.props),Js(fe,X),fe.return=G,G=fe;break e}o(G,q);break}else i(G,q);q=q.sibling}X.type===S?(fe=hr(X.props.children,G.mode,fe,X.key),fe.return=G,G=fe):(fe=Fc(X.type,X.key,X.props,null,G.mode,fe),Js(fe,X),fe.return=G,G=fe)}return b(G);case E:e:{for(De=X.key;q!==null;){if(q.key===De)if(q.tag===4&&q.stateNode.containerInfo===X.containerInfo&&q.stateNode.implementation===X.implementation){o(G,q.sibling),fe=f(q,X.children||[]),fe.return=G,G=fe;break e}else{o(G,q);break}else i(G,q);q=q.sibling}fe=Zf(X,G.mode,fe),fe.return=G,G=fe}return b(G);case L:return X=br(X),yt(G,q,X,fe)}if(se(X))return Ae(G,q,X,fe);if(de(X)){if(De=de(X),typeof De!="function")throw Error(r(150));return X=De.call(X),Ue(G,q,X,fe)}if(typeof X.then=="function")return yt(G,q,Xc(X),fe);if(X.$$typeof===O)return yt(G,q,Gc(G,X),fe);Zc(G,X)}return typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint"?(X=""+X,q!==null&&q.tag===6?(o(G,q.sibling),fe=f(q,X),fe.return=G,G=fe):(o(G,q),fe=Xf(X,G.mode,fe),fe.return=G,G=fe),b(G)):o(G,q)}return function(G,q,X,fe){try{Ws=0;var De=yt(G,q,X,fe);return jo=null,De}catch(Me){if(Me===Eo||Me===Yc)throw Me;var rt=Cn(29,Me,null,G.mode);return rt.lanes=fe,rt.return=G,rt}finally{}}}var xr=K0(!0),Y0=K0(!1),ua=!1;function ch(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function uh(n,i){n=n.updateQueue,i.updateQueue===n&&(i.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function da(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function fa(n,i,o){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(st&2)!==0){var f=l.pending;return f===null?i.next=i:(i.next=f.next,f.next=i),l.pending=i,i=qc(n),C0(n,null,o),i}return Hc(n,l,i,o),qc(n)}function el(n,i,o){if(i=i.updateQueue,i!==null&&(i=i.shared,(o&4194048)!==0)){var l=i.lanes;l&=n.pendingLanes,o|=l,i.lanes=o,Ac(n,o)}}function dh(n,i){var o=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,o===l)){var f=null,h=null;if(o=o.firstBaseUpdate,o!==null){do{var b={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};h===null?f=h=b:h=h.next=b,o=o.next}while(o!==null);h===null?f=h=i:h=h.next=i}else f=h=i;o={baseState:l.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:l.shared,callbacks:l.callbacks},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=i:n.next=i,o.lastBaseUpdate=i}var fh=!1;function tl(){if(fh){var n=So;if(n!==null)throw n}}function nl(n,i,o,l){fh=!1;var f=n.updateQueue;ua=!1;var h=f.firstBaseUpdate,b=f.lastBaseUpdate,_=f.shared.pending;if(_!==null){f.shared.pending=null;var U=_,Z=U.next;U.next=null,b===null?h=Z:b.next=Z,b=U;var ue=n.alternate;ue!==null&&(ue=ue.updateQueue,_=ue.lastBaseUpdate,_!==b&&(_===null?ue.firstBaseUpdate=Z:_.next=Z,ue.lastBaseUpdate=U))}if(h!==null){var he=f.baseState;b=0,ue=Z=U=null,_=h;do{var J=_.lane&-536870913,re=J!==_.lane;if(re?(Ze&J)===J:(l&J)===J){J!==0&&J===_o&&(fh=!0),ue!==null&&(ue=ue.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var Ae=n,Ue=_;J=i;var yt=o;switch(Ue.tag){case 1:if(Ae=Ue.payload,typeof Ae=="function"){he=Ae.call(yt,he,J);break e}he=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=Ue.payload,J=typeof Ae=="function"?Ae.call(yt,he,J):Ae,J==null)break e;he=g({},he,J);break e;case 2:ua=!0}}J=_.callback,J!==null&&(n.flags|=64,re&&(n.flags|=8192),re=f.callbacks,re===null?f.callbacks=[J]:re.push(J))}else re={lane:J,tag:_.tag,payload:_.payload,callback:_.callback,next:null},ue===null?(Z=ue=re,U=he):ue=ue.next=re,b|=J;if(_=_.next,_===null){if(_=f.shared.pending,_===null)break;re=_,_=re.next,re.next=null,f.lastBaseUpdate=re,f.shared.pending=null}}while(!0);ue===null&&(U=he),f.baseState=U,f.firstBaseUpdate=Z,f.lastBaseUpdate=ue,h===null&&(f.shared.lanes=0),ga|=b,n.lanes=b,n.memoizedState=he}}function Q0(n,i){if(typeof n!="function")throw Error(r(191,n));n.call(i)}function X0(n,i){var o=n.callbacks;if(o!==null)for(n.callbacks=null,n=0;n<o.length;n++)Q0(o[n],i)}var Oo=M(null),Wc=M(0);function Z0(n,i){n=Fi,I(Wc,n),I(Oo,i),Fi=n|i.baseLanes}function hh(){I(Wc,Fi),I(Oo,Oo.current)}function mh(){Fi=Wc.current,H(Oo),H(Wc)}var Rn=M(null),Wn=null;function ha(n){var i=n.alternate;I(Tt,Tt.current&1),I(Rn,n),Wn===null&&(i===null||Oo.current!==null||i.memoizedState!==null)&&(Wn=n)}function ph(n){I(Tt,Tt.current),I(Rn,n),Wn===null&&(Wn=n)}function W0(n){n.tag===22?(I(Tt,Tt.current),I(Rn,n),Wn===null&&(Wn=n)):ma()}function ma(){I(Tt,Tt.current),I(Rn,Rn.current)}function Tn(n){H(Rn),Wn===n&&(Wn=null),H(Tt)}var Tt=M(0);function Jc(n){for(var i=n;i!==null;){if(i.tag===13){var o=i.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||wm(o)||km(o)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Li=0,Fe=null,mt=null,$t=null,eu=!1,Ao=!1,wr=!1,tu=0,il=0,No=null,jN=0;function Nt(){throw Error(r(321))}function yh(n,i){if(i===null)return!1;for(var o=0;o<i.length&&o<n.length;o++)if(!Mn(n[o],i[o]))return!1;return!0}function gh(n,i,o,l,f,h){return Li=h,Fe=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,N.H=n===null||n.memoizedState===null?Lv:Rh,wr=!1,h=o(l,f),wr=!1,Ao&&(h=ev(i,o,l,f)),J0(n),h}function J0(n){N.H=ol;var i=mt!==null&&mt.next!==null;if(Li=0,$t=mt=Fe=null,eu=!1,il=0,No=null,i)throw Error(r(300));n===null||Ut||(n=n.dependencies,n!==null&&Vc(n)&&(Ut=!0))}function ev(n,i,o,l){Fe=n;var f=0;do{if(Ao&&(No=null),il=0,Ao=!1,25<=f)throw Error(r(301));if(f+=1,$t=mt=null,n.updateQueue!=null){var h=n.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}N.H=zv,h=i(o,l)}while(Ao);return h}function ON(){var n=N.H,i=n.useState()[0];return i=typeof i.then=="function"?al(i):i,n=n.useState()[0],(mt!==null?mt.memoizedState:null)!==n&&(Fe.flags|=1024),i}function bh(){var n=tu!==0;return tu=0,n}function vh(n,i,o){i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~o}function xh(n){if(eu){for(n=n.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}eu=!1}Li=0,$t=mt=Fe=null,Ao=!1,il=tu=0,No=null}function dn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?Fe.memoizedState=$t=n:$t=$t.next=n,$t}function Dt(){if(mt===null){var n=Fe.alternate;n=n!==null?n.memoizedState:null}else n=mt.next;var i=$t===null?Fe.memoizedState:$t.next;if(i!==null)$t=i,mt=n;else{if(n===null)throw Fe.alternate===null?Error(r(467)):Error(r(310));mt=n,n={memoizedState:mt.memoizedState,baseState:mt.baseState,baseQueue:mt.baseQueue,queue:mt.queue,next:null},$t===null?Fe.memoizedState=$t=n:$t=$t.next=n}return $t}function nu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function al(n){var i=il;return il+=1,No===null&&(No=[]),n=P0(No,n,i),i=Fe,($t===null?i.memoizedState:$t.next)===null&&(i=i.alternate,N.H=i===null||i.memoizedState===null?Lv:Rh),n}function iu(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return al(n);if(n.$$typeof===O)return nn(n)}throw Error(r(438,String(n)))}function wh(n){var i=null,o=Fe.updateQueue;if(o!==null&&(i=o.memoCache),i==null){var l=Fe.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(i={data:l.data.map(function(f){return f.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),o===null&&(o=nu(),Fe.updateQueue=o),o.memoCache=i,o=i.data[i.index],o===void 0)for(o=i.data[i.index]=Array(n),l=0;l<n;l++)o[l]=le;return i.index++,o}function zi(n,i){return typeof i=="function"?i(n):i}function au(n){var i=Dt();return kh(i,mt,n)}function kh(n,i,o){var l=n.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=o;var f=n.baseQueue,h=l.pending;if(h!==null){if(f!==null){var b=f.next;f.next=h.next,h.next=b}i.baseQueue=f=h,l.pending=null}if(h=n.baseState,f===null)n.memoizedState=h;else{i=f.next;var _=b=null,U=null,Z=i,ue=!1;do{var he=Z.lane&-536870913;if(he!==Z.lane?(Ze&he)===he:(Li&he)===he){var J=Z.revertLane;if(J===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),he===_o&&(ue=!0);else if((Li&J)===J){Z=Z.next,J===_o&&(ue=!0);continue}else he={lane:0,revertLane:Z.revertLane,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},U===null?(_=U=he,b=h):U=U.next=he,Fe.lanes|=J,ga|=J;he=Z.action,wr&&o(h,he),h=Z.hasEagerState?Z.eagerState:o(h,he)}else J={lane:he,revertLane:Z.revertLane,gesture:Z.gesture,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},U===null?(_=U=J,b=h):U=U.next=J,Fe.lanes|=he,ga|=he;Z=Z.next}while(Z!==null&&Z!==i);if(U===null?b=h:U.next=_,!Mn(h,n.memoizedState)&&(Ut=!0,ue&&(o=So,o!==null)))throw o;n.memoizedState=h,n.baseState=b,n.baseQueue=U,l.lastRenderedState=h}return f===null&&(l.lanes=0),[n.memoizedState,l.dispatch]}function _h(n){var i=Dt(),o=i.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=n;var l=o.dispatch,f=o.pending,h=i.memoizedState;if(f!==null){o.pending=null;var b=f=f.next;do h=n(h,b.action),b=b.next;while(b!==f);Mn(h,i.memoizedState)||(Ut=!0),i.memoizedState=h,i.baseQueue===null&&(i.baseState=h),o.lastRenderedState=h}return[h,l]}function tv(n,i,o){var l=Fe,f=Dt(),h=et;if(h){if(o===void 0)throw Error(r(407));o=o()}else o=i();var b=!Mn((mt||f).memoizedState,o);if(b&&(f.memoizedState=o,Ut=!0),f=f.queue,jh(av.bind(null,l,f,n),[n]),f.getSnapshot!==i||b||$t!==null&&$t.memoizedState.tag&1){if(l.flags|=2048,Mo(9,{destroy:void 0},iv.bind(null,l,f,o,i),null),bt===null)throw Error(r(349));h||(Li&127)!==0||nv(l,i,o)}return o}function nv(n,i,o){n.flags|=16384,n={getSnapshot:i,value:o},i=Fe.updateQueue,i===null?(i=nu(),Fe.updateQueue=i,i.stores=[n]):(o=i.stores,o===null?i.stores=[n]:o.push(n))}function iv(n,i,o,l){i.value=o,i.getSnapshot=l,rv(i)&&ov(n)}function av(n,i,o){return o(function(){rv(i)&&ov(n)})}function rv(n){var i=n.getSnapshot;n=n.value;try{var o=i();return!Mn(n,o)}catch{return!0}}function ov(n){var i=fr(n,2);i!==null&&_n(i,n,2)}function Sh(n){var i=dn();if(typeof n=="function"){var o=n;if(n=o(),wr){ne(!0);try{o()}finally{ne(!1)}}}return i.memoizedState=i.baseState=n,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:n},i}function sv(n,i,o,l){return n.baseState=o,kh(n,mt,typeof l=="function"?l:zi)}function AN(n,i,o,l,f){if(su(n))throw Error(r(485));if(n=i.action,n!==null){var h={payload:f,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){h.listeners.push(b)}};N.T!==null?o(!0):h.isTransition=!1,l(h),o=i.pending,o===null?(h.next=i.pending=h,lv(i,h)):(h.next=o.next,i.pending=o.next=h)}}function lv(n,i){var o=i.action,l=i.payload,f=n.state;if(i.isTransition){var h=N.T,b={};N.T=b;try{var _=o(f,l),U=N.S;U!==null&&U(b,_),cv(n,i,_)}catch(Z){Eh(n,i,Z)}finally{h!==null&&b.types!==null&&(h.types=b.types),N.T=h}}else try{h=o(f,l),cv(n,i,h)}catch(Z){Eh(n,i,Z)}}function cv(n,i,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(l){uv(n,i,l)},function(l){return Eh(n,i,l)}):uv(n,i,o)}function uv(n,i,o){i.status="fulfilled",i.value=o,dv(i),n.state=o,i=n.pending,i!==null&&(o=i.next,o===i?n.pending=null:(o=o.next,i.next=o,lv(n,o)))}function Eh(n,i,o){var l=n.pending;if(n.pending=null,l!==null){l=l.next;do i.status="rejected",i.reason=o,dv(i),i=i.next;while(i!==l)}n.action=null}function dv(n){n=n.listeners;for(var i=0;i<n.length;i++)(0,n[i])()}function fv(n,i){return i}function hv(n,i){if(et){var o=bt.formState;if(o!==null){e:{var l=Fe;if(et){if(xt){t:{for(var f=xt,h=Zn;f.nodeType!==8;){if(!h){f=null;break t}if(f=Jn(f.nextSibling),f===null){f=null;break t}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){xt=Jn(f.nextSibling),l=f.data==="F!";break e}}la(l)}l=!1}l&&(i=o[0])}}return o=dn(),o.memoizedState=o.baseState=i,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fv,lastRenderedState:i},o.queue=l,o=Rv.bind(null,Fe,l),l.dispatch=o,l=Sh(!1),h=Ch.bind(null,Fe,!1,l.queue),l=dn(),f={state:i,dispatch:null,action:n,pending:null},l.queue=f,o=AN.bind(null,Fe,f,h,o),f.dispatch=o,l.memoizedState=n,[i,o,!1]}function mv(n){var i=Dt();return pv(i,mt,n)}function pv(n,i,o){if(i=kh(n,i,fv)[0],n=au(zi)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var l=al(i)}catch(b){throw b===Eo?Yc:b}else l=i;i=Dt();var f=i.queue,h=f.dispatch;return o!==i.memoizedState&&(Fe.flags|=2048,Mo(9,{destroy:void 0},NN.bind(null,f,o),null)),[l,h,n]}function NN(n,i){n.action=i}function yv(n){var i=Dt(),o=mt;if(o!==null)return pv(i,o,n);Dt(),i=i.memoizedState,o=Dt();var l=o.queue.dispatch;return o.memoizedState=n,[i,l,!1]}function Mo(n,i,o,l){return n={tag:n,create:o,deps:l,inst:i,next:null},i=Fe.updateQueue,i===null&&(i=nu(),Fe.updateQueue=i),o=i.lastEffect,o===null?i.lastEffect=n.next=n:(l=o.next,o.next=n,n.next=l,i.lastEffect=n),n}function gv(){return Dt().memoizedState}function ru(n,i,o,l){var f=dn();Fe.flags|=n,f.memoizedState=Mo(1|i,{destroy:void 0},o,l===void 0?null:l)}function ou(n,i,o,l){var f=Dt();l=l===void 0?null:l;var h=f.memoizedState.inst;mt!==null&&l!==null&&yh(l,mt.memoizedState.deps)?f.memoizedState=Mo(i,h,o,l):(Fe.flags|=n,f.memoizedState=Mo(1|i,h,o,l))}function bv(n,i){ru(8390656,8,n,i)}function jh(n,i){ou(2048,8,n,i)}function MN(n){Fe.flags|=4;var i=Fe.updateQueue;if(i===null)i=nu(),Fe.updateQueue=i,i.events=[n];else{var o=i.events;o===null?i.events=[n]:o.push(n)}}function vv(n){var i=Dt().memoizedState;return MN({ref:i,nextImpl:n}),function(){if((st&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}function xv(n,i){return ou(4,2,n,i)}function wv(n,i){return ou(4,4,n,i)}function kv(n,i){if(typeof i=="function"){n=n();var o=i(n);return function(){typeof o=="function"?o():i(null)}}if(i!=null)return n=n(),i.current=n,function(){i.current=null}}function _v(n,i,o){o=o!=null?o.concat([n]):null,ou(4,4,kv.bind(null,i,n),o)}function Oh(){}function Sv(n,i){var o=Dt();i=i===void 0?null:i;var l=o.memoizedState;return i!==null&&yh(i,l[1])?l[0]:(o.memoizedState=[n,i],n)}function Ev(n,i){var o=Dt();i=i===void 0?null:i;var l=o.memoizedState;if(i!==null&&yh(i,l[1]))return l[0];if(l=n(),wr){ne(!0);try{n()}finally{ne(!1)}}return o.memoizedState=[l,i],l}function Ah(n,i,o){return o===void 0||(Li&1073741824)!==0&&(Ze&261930)===0?n.memoizedState=i:(n.memoizedState=o,n=j1(),Fe.lanes|=n,ga|=n,o)}function jv(n,i,o,l){return Mn(o,i)?o:Oo.current!==null?(n=Ah(n,o,l),Mn(n,i)||(Ut=!0),n):(Li&42)===0||(Li&1073741824)!==0&&(Ze&261930)===0?(Ut=!0,n.memoizedState=o):(n=j1(),Fe.lanes|=n,ga|=n,i)}function Ov(n,i,o,l,f){var h=V.p;V.p=h!==0&&8>h?h:8;var b=N.T,_={};N.T=_,Ch(n,!1,i,o);try{var U=f(),Z=N.S;if(Z!==null&&Z(_,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var ue=EN(U,l);rl(n,i,ue,zn(n))}else rl(n,i,l,zn(n))}catch(he){rl(n,i,{then:function(){},status:"rejected",reason:he},zn())}finally{V.p=h,b!==null&&_.types!==null&&(b.types=_.types),N.T=b}}function CN(){}function Nh(n,i,o,l){if(n.tag!==5)throw Error(r(476));var f=Av(n).queue;Ov(n,f,i,te,o===null?CN:function(){return Nv(n),o(l)})}function Av(n){var i=n.memoizedState;if(i!==null)return i;i={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:te},next:null};var o={};return i.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zi,lastRenderedState:o},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function Nv(n){var i=Av(n);i.next===null&&(i=n.alternate.memoizedState),rl(n,i.next.queue,{},zn())}function Mh(){return nn(kl)}function Mv(){return Dt().memoizedState}function Cv(){return Dt().memoizedState}function RN(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var o=zn();n=da(o);var l=fa(i,n,o);l!==null&&(_n(l,i,o),el(l,i,o)),i={cache:rh()},n.payload=i;return}i=i.return}}function TN(n,i,o){var l=zn();o={lane:l,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},su(n)?Tv(i,o):(o=Yf(n,i,o,l),o!==null&&(_n(o,n,l),Dv(o,i,l)))}function Rv(n,i,o){var l=zn();rl(n,i,o,l)}function rl(n,i,o,l){var f={lane:l,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(su(n))Tv(i,f);else{var h=n.alternate;if(n.lanes===0&&(h===null||h.lanes===0)&&(h=i.lastRenderedReducer,h!==null))try{var b=i.lastRenderedState,_=h(b,o);if(f.hasEagerState=!0,f.eagerState=_,Mn(_,b))return Hc(n,i,f,0),bt===null&&Bc(),!1}catch{}finally{}if(o=Yf(n,i,f,l),o!==null)return _n(o,n,l),Dv(o,i,l),!0}return!1}function Ch(n,i,o,l){if(l={lane:2,revertLane:cm(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},su(n)){if(i)throw Error(r(479))}else i=Yf(n,o,l,2),i!==null&&_n(i,n,2)}function su(n){var i=n.alternate;return n===Fe||i!==null&&i===Fe}function Tv(n,i){Ao=eu=!0;var o=n.pending;o===null?i.next=i:(i.next=o.next,o.next=i),n.pending=i}function Dv(n,i,o){if((o&4194048)!==0){var l=i.lanes;l&=n.pendingLanes,o|=l,i.lanes=o,Ac(n,o)}}var ol={readContext:nn,use:iu,useCallback:Nt,useContext:Nt,useEffect:Nt,useImperativeHandle:Nt,useLayoutEffect:Nt,useInsertionEffect:Nt,useMemo:Nt,useReducer:Nt,useRef:Nt,useState:Nt,useDebugValue:Nt,useDeferredValue:Nt,useTransition:Nt,useSyncExternalStore:Nt,useId:Nt,useHostTransitionStatus:Nt,useFormState:Nt,useActionState:Nt,useOptimistic:Nt,useMemoCache:Nt,useCacheRefresh:Nt};ol.useEffectEvent=Nt;var Lv={readContext:nn,use:iu,useCallback:function(n,i){return dn().memoizedState=[n,i===void 0?null:i],n},useContext:nn,useEffect:bv,useImperativeHandle:function(n,i,o){o=o!=null?o.concat([n]):null,ru(4194308,4,kv.bind(null,i,n),o)},useLayoutEffect:function(n,i){return ru(4194308,4,n,i)},useInsertionEffect:function(n,i){ru(4,2,n,i)},useMemo:function(n,i){var o=dn();i=i===void 0?null:i;var l=n();if(wr){ne(!0);try{n()}finally{ne(!1)}}return o.memoizedState=[l,i],l},useReducer:function(n,i,o){var l=dn();if(o!==void 0){var f=o(i);if(wr){ne(!0);try{o(i)}finally{ne(!1)}}}else f=i;return l.memoizedState=l.baseState=f,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:f},l.queue=n,n=n.dispatch=TN.bind(null,Fe,n),[l.memoizedState,n]},useRef:function(n){var i=dn();return n={current:n},i.memoizedState=n},useState:function(n){n=Sh(n);var i=n.queue,o=Rv.bind(null,Fe,i);return i.dispatch=o,[n.memoizedState,o]},useDebugValue:Oh,useDeferredValue:function(n,i){var o=dn();return Ah(o,n,i)},useTransition:function(){var n=Sh(!1);return n=Ov.bind(null,Fe,n.queue,!0,!1),dn().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,o){var l=Fe,f=dn();if(et){if(o===void 0)throw Error(r(407));o=o()}else{if(o=i(),bt===null)throw Error(r(349));(Ze&127)!==0||nv(l,i,o)}f.memoizedState=o;var h={value:o,getSnapshot:i};return f.queue=h,bv(av.bind(null,l,h,n),[n]),l.flags|=2048,Mo(9,{destroy:void 0},iv.bind(null,l,h,o,i),null),o},useId:function(){var n=dn(),i=bt.identifierPrefix;if(et){var o=mi,l=hi;o=(l&~(1<<32-be(l)-1)).toString(32)+o,i="_"+i+"R_"+o,o=tu++,0<o&&(i+="H"+o.toString(32)),i+="_"}else o=jN++,i="_"+i+"r_"+o.toString(32)+"_";return n.memoizedState=i},useHostTransitionStatus:Mh,useFormState:hv,useActionState:hv,useOptimistic:function(n){var i=dn();i.memoizedState=i.baseState=n;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=o,i=Ch.bind(null,Fe,!0,o),o.dispatch=i,[n,i]},useMemoCache:wh,useCacheRefresh:function(){return dn().memoizedState=RN.bind(null,Fe)},useEffectEvent:function(n){var i=dn(),o={impl:n};return i.memoizedState=o,function(){if((st&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}},Rh={readContext:nn,use:iu,useCallback:Sv,useContext:nn,useEffect:jh,useImperativeHandle:_v,useInsertionEffect:xv,useLayoutEffect:wv,useMemo:Ev,useReducer:au,useRef:gv,useState:function(){return au(zi)},useDebugValue:Oh,useDeferredValue:function(n,i){var o=Dt();return jv(o,mt.memoizedState,n,i)},useTransition:function(){var n=au(zi)[0],i=Dt().memoizedState;return[typeof n=="boolean"?n:al(n),i]},useSyncExternalStore:tv,useId:Mv,useHostTransitionStatus:Mh,useFormState:mv,useActionState:mv,useOptimistic:function(n,i){var o=Dt();return sv(o,mt,n,i)},useMemoCache:wh,useCacheRefresh:Cv};Rh.useEffectEvent=vv;var zv={readContext:nn,use:iu,useCallback:Sv,useContext:nn,useEffect:jh,useImperativeHandle:_v,useInsertionEffect:xv,useLayoutEffect:wv,useMemo:Ev,useReducer:_h,useRef:gv,useState:function(){return _h(zi)},useDebugValue:Oh,useDeferredValue:function(n,i){var o=Dt();return mt===null?Ah(o,n,i):jv(o,mt.memoizedState,n,i)},useTransition:function(){var n=_h(zi)[0],i=Dt().memoizedState;return[typeof n=="boolean"?n:al(n),i]},useSyncExternalStore:tv,useId:Mv,useHostTransitionStatus:Mh,useFormState:yv,useActionState:yv,useOptimistic:function(n,i){var o=Dt();return mt!==null?sv(o,mt,n,i):(o.baseState=n,[n,o.queue.dispatch])},useMemoCache:wh,useCacheRefresh:Cv};zv.useEffectEvent=vv;function Th(n,i,o,l){i=n.memoizedState,o=o(l,i),o=o==null?i:g({},i,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}var Dh={enqueueSetState:function(n,i,o){n=n._reactInternals;var l=zn(),f=da(l);f.payload=i,o!=null&&(f.callback=o),i=fa(n,f,l),i!==null&&(_n(i,n,l),el(i,n,l))},enqueueReplaceState:function(n,i,o){n=n._reactInternals;var l=zn(),f=da(l);f.tag=1,f.payload=i,o!=null&&(f.callback=o),i=fa(n,f,l),i!==null&&(_n(i,n,l),el(i,n,l))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var o=zn(),l=da(o);l.tag=2,i!=null&&(l.callback=i),i=fa(n,l,o),i!==null&&(_n(i,n,o),el(i,n,o))}};function $v(n,i,o,l,f,h,b){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(l,h,b):i.prototype&&i.prototype.isPureReactComponent?!Gs(o,l)||!Gs(f,h):!0}function Uv(n,i,o,l){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(o,l),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(o,l),i.state!==n&&Dh.enqueueReplaceState(i,i.state,null)}function kr(n,i){var o=i;if("ref"in i){o={};for(var l in i)l!=="ref"&&(o[l]=i[l])}if(n=n.defaultProps){o===i&&(o=g({},o));for(var f in n)o[f]===void 0&&(o[f]=n[f])}return o}function Iv(n){Ic(n)}function Bv(n){console.error(n)}function Hv(n){Ic(n)}function lu(n,i){try{var o=n.onUncaughtError;o(i.value,{componentStack:i.stack})}catch(l){setTimeout(function(){throw l})}}function qv(n,i,o){try{var l=n.onCaughtError;l(o.value,{componentStack:o.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Lh(n,i,o){return o=da(o),o.tag=3,o.payload={element:null},o.callback=function(){lu(n,i)},o}function Fv(n){return n=da(n),n.tag=3,n}function Pv(n,i,o,l){var f=o.type.getDerivedStateFromError;if(typeof f=="function"){var h=l.value;n.payload=function(){return f(h)},n.callback=function(){qv(i,o,l)}}var b=o.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(n.callback=function(){qv(i,o,l),typeof f!="function"&&(ba===null?ba=new Set([this]):ba.add(this));var _=l.stack;this.componentDidCatch(l.value,{componentStack:_!==null?_:""})})}function DN(n,i,o,l,f){if(o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(i=o.alternate,i!==null&&ko(i,o,f,!0),o=Rn.current,o!==null){switch(o.tag){case 31:case 13:return Wn===null?xu():o.alternate===null&&Mt===0&&(Mt=3),o.flags&=-257,o.flags|=65536,o.lanes=f,l===Qc?o.flags|=16384:(i=o.updateQueue,i===null?o.updateQueue=new Set([l]):i.add(l),om(n,l,f)),!1;case 22:return o.flags|=65536,l===Qc?o.flags|=16384:(i=o.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([l])},o.updateQueue=i):(o=i.retryQueue,o===null?i.retryQueue=new Set([l]):o.add(l)),om(n,l,f)),!1}throw Error(r(435,o.tag))}return om(n,l,f),xu(),!1}if(et)return i=Rn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=f,l!==eh&&(n=Error(r(422),{cause:l}),Qs(Yn(n,o)))):(l!==eh&&(i=Error(r(423),{cause:l}),Qs(Yn(i,o))),n=n.current.alternate,n.flags|=65536,f&=-f,n.lanes|=f,l=Yn(l,o),f=Lh(n.stateNode,l,f),dh(n,f),Mt!==4&&(Mt=2)),!1;var h=Error(r(520),{cause:l});if(h=Yn(h,o),ml===null?ml=[h]:ml.push(h),Mt!==4&&(Mt=2),i===null)return!0;l=Yn(l,o),o=i;do{switch(o.tag){case 3:return o.flags|=65536,n=f&-f,o.lanes|=n,n=Lh(o.stateNode,l,n),dh(o,n),!1;case 1:if(i=o.type,h=o.stateNode,(o.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(ba===null||!ba.has(h))))return o.flags|=65536,f&=-f,o.lanes|=f,f=Fv(f),Pv(f,n,o,l),dh(o,f),!1}o=o.return}while(o!==null);return!1}var zh=Error(r(461)),Ut=!1;function an(n,i,o,l){i.child=n===null?Y0(i,null,o,l):xr(i,n.child,o,l)}function Vv(n,i,o,l,f){o=o.render;var h=i.ref;if("ref"in l){var b={};for(var _ in l)_!=="ref"&&(b[_]=l[_])}else b=l;return yr(i),l=gh(n,i,o,b,h,f),_=bh(),n!==null&&!Ut?(vh(n,i,f),$i(n,i,f)):(et&&_&&Wf(i),i.flags|=1,an(n,i,l,f),i.child)}function Gv(n,i,o,l,f){if(n===null){var h=o.type;return typeof h=="function"&&!Qf(h)&&h.defaultProps===void 0&&o.compare===null?(i.tag=15,i.type=h,Kv(n,i,h,l,f)):(n=Fc(o.type,null,l,i,i.mode,f),n.ref=i.ref,n.return=i,i.child=n)}if(h=n.child,!Ph(n,f)){var b=h.memoizedProps;if(o=o.compare,o=o!==null?o:Gs,o(b,l)&&n.ref===i.ref)return $i(n,i,f)}return i.flags|=1,n=Ci(h,l),n.ref=i.ref,n.return=i,i.child=n}function Kv(n,i,o,l,f){if(n!==null){var h=n.memoizedProps;if(Gs(h,l)&&n.ref===i.ref)if(Ut=!1,i.pendingProps=l=h,Ph(n,f))(n.flags&131072)!==0&&(Ut=!0);else return i.lanes=n.lanes,$i(n,i,f)}return $h(n,i,o,l,f)}function Yv(n,i,o,l){var f=l.children,h=n!==null?n.memoizedState:null;if(n===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((i.flags&128)!==0){if(h=h!==null?h.baseLanes|o:o,n!==null){for(l=i.child=n.child,f=0;l!==null;)f=f|l.lanes|l.childLanes,l=l.sibling;l=f&~h}else l=0,i.child=null;return Qv(n,i,h,o,l)}if((o&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},n!==null&&Kc(i,h!==null?h.cachePool:null),h!==null?Z0(i,h):hh(),W0(i);else return l=i.lanes=536870912,Qv(n,i,h!==null?h.baseLanes|o:o,o,l)}else h!==null?(Kc(i,h.cachePool),Z0(i,h),ma(),i.memoizedState=null):(n!==null&&Kc(i,null),hh(),ma());return an(n,i,f,o),i.child}function sl(n,i){return n!==null&&n.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Qv(n,i,o,l,f){var h=sh();return h=h===null?null:{parent:zt._currentValue,pool:h},i.memoizedState={baseLanes:o,cachePool:h},n!==null&&Kc(i,null),hh(),W0(i),n!==null&&ko(n,i,l,!0),i.childLanes=f,null}function cu(n,i){return i=du({mode:i.mode,children:i.children},n.mode),i.ref=n.ref,n.child=i,i.return=n,i}function Xv(n,i,o){return xr(i,n.child,null,o),n=cu(i,i.pendingProps),n.flags|=2,Tn(i),i.memoizedState=null,n}function LN(n,i,o){var l=i.pendingProps,f=(i.flags&128)!==0;if(i.flags&=-129,n===null){if(et){if(l.mode==="hidden")return n=cu(i,l),i.lanes=536870912,sl(null,n);if(ph(i),(n=xt)?(n=lx(n,Zn),n=n!==null&&n.data==="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:oa!==null?{id:hi,overflow:mi}:null,retryLane:536870912,hydrationErrors:null},o=T0(n),o.return=i,i.child=o,tn=i,xt=null)):n=null,n===null)throw la(i);return i.lanes=536870912,null}return cu(i,l)}var h=n.memoizedState;if(h!==null){var b=h.dehydrated;if(ph(i),f)if(i.flags&256)i.flags&=-257,i=Xv(n,i,o);else if(i.memoizedState!==null)i.child=n.child,i.flags|=128,i=null;else throw Error(r(558));else if(Ut||ko(n,i,o,!1),f=(o&n.childLanes)!==0,Ut||f){if(l=bt,l!==null&&(b=ae(l,o),b!==0&&b!==h.retryLane))throw h.retryLane=b,fr(n,b),_n(l,n,b),zh;xu(),i=Xv(n,i,o)}else n=h.treeContext,xt=Jn(b.nextSibling),tn=i,et=!0,sa=null,Zn=!1,n!==null&&z0(i,n),i=cu(i,l),i.flags|=4096;return i}return n=Ci(n.child,{mode:l.mode,children:l.children}),n.ref=i.ref,i.child=n,n.return=i,n}function uu(n,i){var o=i.ref;if(o===null)n!==null&&n.ref!==null&&(i.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(r(284));(n===null||n.ref!==o)&&(i.flags|=4194816)}}function $h(n,i,o,l,f){return yr(i),o=gh(n,i,o,l,void 0,f),l=bh(),n!==null&&!Ut?(vh(n,i,f),$i(n,i,f)):(et&&l&&Wf(i),i.flags|=1,an(n,i,o,f),i.child)}function Zv(n,i,o,l,f,h){return yr(i),i.updateQueue=null,o=ev(i,l,o,f),J0(n),l=bh(),n!==null&&!Ut?(vh(n,i,h),$i(n,i,h)):(et&&l&&Wf(i),i.flags|=1,an(n,i,o,h),i.child)}function Wv(n,i,o,l,f){if(yr(i),i.stateNode===null){var h=bo,b=o.contextType;typeof b=="object"&&b!==null&&(h=nn(b)),h=new o(l,h),i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Dh,i.stateNode=h,h._reactInternals=i,h=i.stateNode,h.props=l,h.state=i.memoizedState,h.refs={},ch(i),b=o.contextType,h.context=typeof b=="object"&&b!==null?nn(b):bo,h.state=i.memoizedState,b=o.getDerivedStateFromProps,typeof b=="function"&&(Th(i,o,b,l),h.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(b=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),b!==h.state&&Dh.enqueueReplaceState(h,h.state,null),nl(i,l,h,f),tl(),h.state=i.memoizedState),typeof h.componentDidMount=="function"&&(i.flags|=4194308),l=!0}else if(n===null){h=i.stateNode;var _=i.memoizedProps,U=kr(o,_);h.props=U;var Z=h.context,ue=o.contextType;b=bo,typeof ue=="object"&&ue!==null&&(b=nn(ue));var he=o.getDerivedStateFromProps;ue=typeof he=="function"||typeof h.getSnapshotBeforeUpdate=="function",_=i.pendingProps!==_,ue||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(_||Z!==b)&&Uv(i,h,l,b),ua=!1;var J=i.memoizedState;h.state=J,nl(i,l,h,f),tl(),Z=i.memoizedState,_||J!==Z||ua?(typeof he=="function"&&(Th(i,o,he,l),Z=i.memoizedState),(U=ua||$v(i,o,U,l,J,Z,b))?(ue||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(i.flags|=4194308)):(typeof h.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=l,i.memoizedState=Z),h.props=l,h.state=Z,h.context=b,l=U):(typeof h.componentDidMount=="function"&&(i.flags|=4194308),l=!1)}else{h=i.stateNode,uh(n,i),b=i.memoizedProps,ue=kr(o,b),h.props=ue,he=i.pendingProps,J=h.context,Z=o.contextType,U=bo,typeof Z=="object"&&Z!==null&&(U=nn(Z)),_=o.getDerivedStateFromProps,(Z=typeof _=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(b!==he||J!==U)&&Uv(i,h,l,U),ua=!1,J=i.memoizedState,h.state=J,nl(i,l,h,f),tl();var re=i.memoizedState;b!==he||J!==re||ua||n!==null&&n.dependencies!==null&&Vc(n.dependencies)?(typeof _=="function"&&(Th(i,o,_,l),re=i.memoizedState),(ue=ua||$v(i,o,ue,l,J,re,U)||n!==null&&n.dependencies!==null&&Vc(n.dependencies))?(Z||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(l,re,U),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(l,re,U)),typeof h.componentDidUpdate=="function"&&(i.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof h.componentDidUpdate!="function"||b===n.memoizedProps&&J===n.memoizedState||(i.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||b===n.memoizedProps&&J===n.memoizedState||(i.flags|=1024),i.memoizedProps=l,i.memoizedState=re),h.props=l,h.state=re,h.context=U,l=ue):(typeof h.componentDidUpdate!="function"||b===n.memoizedProps&&J===n.memoizedState||(i.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||b===n.memoizedProps&&J===n.memoizedState||(i.flags|=1024),l=!1)}return h=l,uu(n,i),l=(i.flags&128)!==0,h||l?(h=i.stateNode,o=l&&typeof o.getDerivedStateFromError!="function"?null:h.render(),i.flags|=1,n!==null&&l?(i.child=xr(i,n.child,null,f),i.child=xr(i,null,o,f)):an(n,i,o,f),i.memoizedState=h.state,n=i.child):n=$i(n,i,f),n}function Jv(n,i,o,l){return mr(),i.flags|=256,an(n,i,o,l),i.child}var Uh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ih(n){return{baseLanes:n,cachePool:q0()}}function Bh(n,i,o){return n=n!==null?n.childLanes&~o:0,i&&(n|=Ln),n}function e1(n,i,o){var l=i.pendingProps,f=!1,h=(i.flags&128)!==0,b;if((b=h)||(b=n!==null&&n.memoizedState===null?!1:(Tt.current&2)!==0),b&&(f=!0,i.flags&=-129),b=(i.flags&32)!==0,i.flags&=-33,n===null){if(et){if(f?ha(i):ma(),(n=xt)?(n=lx(n,Zn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:oa!==null?{id:hi,overflow:mi}:null,retryLane:536870912,hydrationErrors:null},o=T0(n),o.return=i,i.child=o,tn=i,xt=null)):n=null,n===null)throw la(i);return km(n)?i.lanes=32:i.lanes=536870912,null}var _=l.children;return l=l.fallback,f?(ma(),f=i.mode,_=du({mode:"hidden",children:_},f),l=hr(l,f,o,null),_.return=i,l.return=i,_.sibling=l,i.child=_,l=i.child,l.memoizedState=Ih(o),l.childLanes=Bh(n,b,o),i.memoizedState=Uh,sl(null,l)):(ha(i),Hh(i,_))}var U=n.memoizedState;if(U!==null&&(_=U.dehydrated,_!==null)){if(h)i.flags&256?(ha(i),i.flags&=-257,i=qh(n,i,o)):i.memoizedState!==null?(ma(),i.child=n.child,i.flags|=128,i=null):(ma(),_=l.fallback,f=i.mode,l=du({mode:"visible",children:l.children},f),_=hr(_,f,o,null),_.flags|=2,l.return=i,_.return=i,l.sibling=_,i.child=l,xr(i,n.child,null,o),l=i.child,l.memoizedState=Ih(o),l.childLanes=Bh(n,b,o),i.memoizedState=Uh,i=sl(null,l));else if(ha(i),km(_)){if(b=_.nextSibling&&_.nextSibling.dataset,b)var Z=b.dgst;b=Z,l=Error(r(419)),l.stack="",l.digest=b,Qs({value:l,source:null,stack:null}),i=qh(n,i,o)}else if(Ut||ko(n,i,o,!1),b=(o&n.childLanes)!==0,Ut||b){if(b=bt,b!==null&&(l=ae(b,o),l!==0&&l!==U.retryLane))throw U.retryLane=l,fr(n,l),_n(b,n,l),zh;wm(_)||xu(),i=qh(n,i,o)}else wm(_)?(i.flags|=192,i.child=n.child,i=null):(n=U.treeContext,xt=Jn(_.nextSibling),tn=i,et=!0,sa=null,Zn=!1,n!==null&&z0(i,n),i=Hh(i,l.children),i.flags|=4096);return i}return f?(ma(),_=l.fallback,f=i.mode,U=n.child,Z=U.sibling,l=Ci(U,{mode:"hidden",children:l.children}),l.subtreeFlags=U.subtreeFlags&65011712,Z!==null?_=Ci(Z,_):(_=hr(_,f,o,null),_.flags|=2),_.return=i,l.return=i,l.sibling=_,i.child=l,sl(null,l),l=i.child,_=n.child.memoizedState,_===null?_=Ih(o):(f=_.cachePool,f!==null?(U=zt._currentValue,f=f.parent!==U?{parent:U,pool:U}:f):f=q0(),_={baseLanes:_.baseLanes|o,cachePool:f}),l.memoizedState=_,l.childLanes=Bh(n,b,o),i.memoizedState=Uh,sl(n.child,l)):(ha(i),o=n.child,n=o.sibling,o=Ci(o,{mode:"visible",children:l.children}),o.return=i,o.sibling=null,n!==null&&(b=i.deletions,b===null?(i.deletions=[n],i.flags|=16):b.push(n)),i.child=o,i.memoizedState=null,o)}function Hh(n,i){return i=du({mode:"visible",children:i},n.mode),i.return=n,n.child=i}function du(n,i){return n=Cn(22,n,null,i),n.lanes=0,n}function qh(n,i,o){return xr(i,n.child,null,o),n=Hh(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function t1(n,i,o){n.lanes|=i;var l=n.alternate;l!==null&&(l.lanes|=i),ih(n.return,i,o)}function Fh(n,i,o,l,f,h){var b=n.memoizedState;b===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:l,tail:o,tailMode:f,treeForkCount:h}:(b.isBackwards=i,b.rendering=null,b.renderingStartTime=0,b.last=l,b.tail=o,b.tailMode=f,b.treeForkCount=h)}function n1(n,i,o){var l=i.pendingProps,f=l.revealOrder,h=l.tail;l=l.children;var b=Tt.current,_=(b&2)!==0;if(_?(b=b&1|2,i.flags|=128):b&=1,I(Tt,b),an(n,i,l,o),l=et?Ys:0,!_&&n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&t1(n,o,i);else if(n.tag===19)t1(n,o,i);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===i)break e;for(;n.sibling===null;){if(n.return===null||n.return===i)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(f){case"forwards":for(o=i.child,f=null;o!==null;)n=o.alternate,n!==null&&Jc(n)===null&&(f=o),o=o.sibling;o=f,o===null?(f=i.child,i.child=null):(f=o.sibling,o.sibling=null),Fh(i,!1,f,o,h,l);break;case"backwards":case"unstable_legacy-backwards":for(o=null,f=i.child,i.child=null;f!==null;){if(n=f.alternate,n!==null&&Jc(n)===null){i.child=f;break}n=f.sibling,f.sibling=o,o=f,f=n}Fh(i,!0,o,null,h,l);break;case"together":Fh(i,!1,null,null,void 0,l);break;default:i.memoizedState=null}return i.child}function $i(n,i,o){if(n!==null&&(i.dependencies=n.dependencies),ga|=i.lanes,(o&i.childLanes)===0)if(n!==null){if(ko(n,i,o,!1),(o&i.childLanes)===0)return null}else return null;if(n!==null&&i.child!==n.child)throw Error(r(153));if(i.child!==null){for(n=i.child,o=Ci(n,n.pendingProps),i.child=o,o.return=i;n.sibling!==null;)n=n.sibling,o=o.sibling=Ci(n,n.pendingProps),o.return=i;o.sibling=null}return i.child}function Ph(n,i){return(n.lanes&i)!==0?!0:(n=n.dependencies,!!(n!==null&&Vc(n)))}function zN(n,i,o){switch(i.tag){case 3:ke(i,i.stateNode.containerInfo),ca(i,zt,n.memoizedState.cache),mr();break;case 27:case 5:ce(i);break;case 4:ke(i,i.stateNode.containerInfo);break;case 10:ca(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,ph(i),null;break;case 13:var l=i.memoizedState;if(l!==null)return l.dehydrated!==null?(ha(i),i.flags|=128,null):(o&i.child.childLanes)!==0?e1(n,i,o):(ha(i),n=$i(n,i,o),n!==null?n.sibling:null);ha(i);break;case 19:var f=(n.flags&128)!==0;if(l=(o&i.childLanes)!==0,l||(ko(n,i,o,!1),l=(o&i.childLanes)!==0),f){if(l)return n1(n,i,o);i.flags|=128}if(f=i.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),I(Tt,Tt.current),l)break;return null;case 22:return i.lanes=0,Yv(n,i,o,i.pendingProps);case 24:ca(i,zt,n.memoizedState.cache)}return $i(n,i,o)}function i1(n,i,o){if(n!==null)if(n.memoizedProps!==i.pendingProps)Ut=!0;else{if(!Ph(n,o)&&(i.flags&128)===0)return Ut=!1,zN(n,i,o);Ut=(n.flags&131072)!==0}else Ut=!1,et&&(i.flags&1048576)!==0&&L0(i,Ys,i.index);switch(i.lanes=0,i.tag){case 16:e:{var l=i.pendingProps;if(n=br(i.elementType),i.type=n,typeof n=="function")Qf(n)?(l=kr(n,l),i.tag=1,i=Wv(null,i,n,l,o)):(i.tag=0,i=$h(null,i,n,l,o));else{if(n!=null){var f=n.$$typeof;if(f===T){i.tag=11,i=Vv(null,i,n,l,o);break e}else if(f===D){i.tag=14,i=Gv(null,i,n,l,o);break e}}throw i=Q(n)||n,Error(r(306,i,""))}}return i;case 0:return $h(n,i,i.type,i.pendingProps,o);case 1:return l=i.type,f=kr(l,i.pendingProps),Wv(n,i,l,f,o);case 3:e:{if(ke(i,i.stateNode.containerInfo),n===null)throw Error(r(387));l=i.pendingProps;var h=i.memoizedState;f=h.element,uh(n,i),nl(i,l,null,o);var b=i.memoizedState;if(l=b.cache,ca(i,zt,l),l!==h.cache&&ah(i,[zt],o,!0),tl(),l=b.element,h.isDehydrated)if(h={element:l,isDehydrated:!1,cache:b.cache},i.updateQueue.baseState=h,i.memoizedState=h,i.flags&256){i=Jv(n,i,l,o);break e}else if(l!==f){f=Yn(Error(r(424)),i),Qs(f),i=Jv(n,i,l,o);break e}else{switch(n=i.stateNode.containerInfo,n.nodeType){case 9:n=n.body;break;default:n=n.nodeName==="HTML"?n.ownerDocument.body:n}for(xt=Jn(n.firstChild),tn=i,et=!0,sa=null,Zn=!0,o=Y0(i,null,l,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(mr(),l===f){i=$i(n,i,o);break e}an(n,i,l,o)}i=i.child}return i;case 26:return uu(n,i),n===null?(o=mx(i.type,null,i.pendingProps,null))?i.memoizedState=o:et||(o=i.type,n=i.pendingProps,l=Ou(pe.current).createElement(o),l[Ot]=i,l[gn]=n,rn(l,o,n),Wt(l),i.stateNode=l):i.memoizedState=mx(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return ce(i),n===null&&et&&(l=i.stateNode=dx(i.type,i.pendingProps,pe.current),tn=i,Zn=!0,f=xt,ka(i.type)?(_m=f,xt=Jn(l.firstChild)):xt=f),an(n,i,i.pendingProps.children,o),uu(n,i),n===null&&(i.flags|=4194304),i.child;case 5:return n===null&&et&&((f=l=xt)&&(l=fM(l,i.type,i.pendingProps,Zn),l!==null?(i.stateNode=l,tn=i,xt=Jn(l.firstChild),Zn=!1,f=!0):f=!1),f||la(i)),ce(i),f=i.type,h=i.pendingProps,b=n!==null?n.memoizedProps:null,l=h.children,bm(f,h)?l=null:b!==null&&bm(f,b)&&(i.flags|=32),i.memoizedState!==null&&(f=gh(n,i,ON,null,null,o),kl._currentValue=f),uu(n,i),an(n,i,l,o),i.child;case 6:return n===null&&et&&((n=o=xt)&&(o=hM(o,i.pendingProps,Zn),o!==null?(i.stateNode=o,tn=i,xt=null,n=!0):n=!1),n||la(i)),null;case 13:return e1(n,i,o);case 4:return ke(i,i.stateNode.containerInfo),l=i.pendingProps,n===null?i.child=xr(i,null,l,o):an(n,i,l,o),i.child;case 11:return Vv(n,i,i.type,i.pendingProps,o);case 7:return an(n,i,i.pendingProps,o),i.child;case 8:return an(n,i,i.pendingProps.children,o),i.child;case 12:return an(n,i,i.pendingProps.children,o),i.child;case 10:return l=i.pendingProps,ca(i,i.type,l.value),an(n,i,l.children,o),i.child;case 9:return f=i.type._context,l=i.pendingProps.children,yr(i),f=nn(f),l=l(f),i.flags|=1,an(n,i,l,o),i.child;case 14:return Gv(n,i,i.type,i.pendingProps,o);case 15:return Kv(n,i,i.type,i.pendingProps,o);case 19:return n1(n,i,o);case 31:return LN(n,i,o);case 22:return Yv(n,i,o,i.pendingProps);case 24:return yr(i),l=nn(zt),n===null?(f=sh(),f===null&&(f=bt,h=rh(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=o),f=h),i.memoizedState={parent:l,cache:f},ch(i),ca(i,zt,f)):((n.lanes&o)!==0&&(uh(n,i),nl(i,null,null,o),tl()),f=n.memoizedState,h=i.memoizedState,f.parent!==l?(f={parent:l,cache:l},i.memoizedState=f,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=f),ca(i,zt,l)):(l=h.cache,ca(i,zt,l),l!==f.cache&&ah(i,[zt],o,!0))),an(n,i,i.pendingProps.children,o),i.child;case 29:throw i.pendingProps}throw Error(r(156,i.tag))}function Ui(n){n.flags|=4}function Vh(n,i,o,l,f){if((i=(n.mode&32)!==0)&&(i=!1),i){if(n.flags|=16777216,(f&335544128)===f)if(n.stateNode.complete)n.flags|=8192;else if(M1())n.flags|=8192;else throw vr=Qc,lh}else n.flags&=-16777217}function a1(n,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!vx(i))if(M1())n.flags|=8192;else throw vr=Qc,lh}function fu(n,i){i!==null&&(n.flags|=4),n.flags&16384&&(i=n.tag!==22?Nn():536870912,n.lanes|=i,Do|=i)}function ll(n,i){if(!et)switch(n.tailMode){case"hidden":i=n.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?n.tail=null:o.sibling=null;break;case"collapsed":o=n.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.sibling;l===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:l.sibling=null}}function wt(n){var i=n.alternate!==null&&n.alternate.child===n.child,o=0,l=0;if(i)for(var f=n.child;f!==null;)o|=f.lanes|f.childLanes,l|=f.subtreeFlags&65011712,l|=f.flags&65011712,f.return=n,f=f.sibling;else for(f=n.child;f!==null;)o|=f.lanes|f.childLanes,l|=f.subtreeFlags,l|=f.flags,f.return=n,f=f.sibling;return n.subtreeFlags|=l,n.childLanes=o,i}function $N(n,i,o){var l=i.pendingProps;switch(Jf(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wt(i),null;case 1:return wt(i),null;case 3:return o=i.stateNode,l=null,n!==null&&(l=n.memoizedState.cache),i.memoizedState.cache!==l&&(i.flags|=2048),Di(zt),z(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(wo(i)?Ui(i):n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,th())),wt(i),null;case 26:var f=i.type,h=i.memoizedState;return n===null?(Ui(i),h!==null?(wt(i),a1(i,h)):(wt(i),Vh(i,f,null,l,o))):h?h!==n.memoizedState?(Ui(i),wt(i),a1(i,h)):(wt(i),i.flags&=-16777217):(n=n.memoizedProps,n!==l&&Ui(i),wt(i),Vh(i,f,n,l,o)),null;case 27:if(ge(i),o=pe.current,f=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==l&&Ui(i);else{if(!l){if(i.stateNode===null)throw Error(r(166));return wt(i),null}n=F.current,wo(i)?$0(i):(n=dx(f,l,o),i.stateNode=n,Ui(i))}return wt(i),null;case 5:if(ge(i),f=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==l&&Ui(i);else{if(!l){if(i.stateNode===null)throw Error(r(166));return wt(i),null}if(h=F.current,wo(i))$0(i);else{var b=Ou(pe.current);switch(h){case 1:h=b.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:h=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":h=b.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":h=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":h=b.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof l.is=="string"?b.createElement("select",{is:l.is}):b.createElement("select"),l.multiple?h.multiple=!0:l.size&&(h.size=l.size);break;default:h=typeof l.is=="string"?b.createElement(f,{is:l.is}):b.createElement(f)}}h[Ot]=i,h[gn]=l;e:for(b=i.child;b!==null;){if(b.tag===5||b.tag===6)h.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===i)break e;for(;b.sibling===null;){if(b.return===null||b.return===i)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}i.stateNode=h;e:switch(rn(h,f,l),f){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Ui(i)}}return wt(i),Vh(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,o),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==l&&Ui(i);else{if(typeof l!="string"&&i.stateNode===null)throw Error(r(166));if(n=pe.current,wo(i)){if(n=i.stateNode,o=i.memoizedProps,l=null,f=tn,f!==null)switch(f.tag){case 27:case 5:l=f.memoizedProps}n[Ot]=i,n=!!(n.nodeValue===o||l!==null&&l.suppressHydrationWarning===!0||ex(n.nodeValue,o)),n||la(i,!0)}else n=Ou(n).createTextNode(l),n[Ot]=i,i.stateNode=n}return wt(i),null;case 31:if(o=i.memoizedState,n===null||n.memoizedState!==null){if(l=wo(i),o!==null){if(n===null){if(!l)throw Error(r(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(557));n[Ot]=i}else mr(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;wt(i),n=!1}else o=th(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=o),n=!0;if(!n)return i.flags&256?(Tn(i),i):(Tn(i),null);if((i.flags&128)!==0)throw Error(r(558))}return wt(i),null;case 13:if(l=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(f=wo(i),l!==null&&l.dehydrated!==null){if(n===null){if(!f)throw Error(r(318));if(f=i.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[Ot]=i}else mr(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;wt(i),f=!1}else f=th(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=f),f=!0;if(!f)return i.flags&256?(Tn(i),i):(Tn(i),null)}return Tn(i),(i.flags&128)!==0?(i.lanes=o,i):(o=l!==null,n=n!==null&&n.memoizedState!==null,o&&(l=i.child,f=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(f=l.alternate.memoizedState.cachePool.pool),h=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(h=l.memoizedState.cachePool.pool),h!==f&&(l.flags|=2048)),o!==n&&o&&(i.child.flags|=8192),fu(i,i.updateQueue),wt(i),null);case 4:return z(),n===null&&hm(i.stateNode.containerInfo),wt(i),null;case 10:return Di(i.type),wt(i),null;case 19:if(H(Tt),l=i.memoizedState,l===null)return wt(i),null;if(f=(i.flags&128)!==0,h=l.rendering,h===null)if(f)ll(l,!1);else{if(Mt!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(h=Jc(n),h!==null){for(i.flags|=128,ll(l,!1),n=h.updateQueue,i.updateQueue=n,fu(i,n),i.subtreeFlags=0,n=o,o=i.child;o!==null;)R0(o,n),o=o.sibling;return I(Tt,Tt.current&1|2),et&&Ri(i,l.treeForkCount),i.child}n=n.sibling}l.tail!==null&>()>gu&&(i.flags|=128,f=!0,ll(l,!1),i.lanes=4194304)}else{if(!f)if(n=Jc(h),n!==null){if(i.flags|=128,f=!0,n=n.updateQueue,i.updateQueue=n,fu(i,n),ll(l,!0),l.tail===null&&l.tailMode==="hidden"&&!h.alternate&&!et)return wt(i),null}else 2*gt()-l.renderingStartTime>gu&&o!==536870912&&(i.flags|=128,f=!0,ll(l,!1),i.lanes=4194304);l.isBackwards?(h.sibling=i.child,i.child=h):(n=l.last,n!==null?n.sibling=h:i.child=h,l.last=h)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=gt(),n.sibling=null,o=Tt.current,I(Tt,f?o&1|2:o&1),et&&Ri(i,l.treeForkCount),n):(wt(i),null);case 22:case 23:return Tn(i),mh(),l=i.memoizedState!==null,n!==null?n.memoizedState!==null!==l&&(i.flags|=8192):l&&(i.flags|=8192),l?(o&536870912)!==0&&(i.flags&128)===0&&(wt(i),i.subtreeFlags&6&&(i.flags|=8192)):wt(i),o=i.updateQueue,o!==null&&fu(i,o.retryQueue),o=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),l=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),l!==o&&(i.flags|=2048),n!==null&&H(gr),null;case 24:return o=null,n!==null&&(o=n.memoizedState.cache),i.memoizedState.cache!==o&&(i.flags|=2048),Di(zt),wt(i),null;case 25:return null;case 30:return null}throw Error(r(156,i.tag))}function UN(n,i){switch(Jf(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return Di(zt),z(),n=i.flags,(n&65536)!==0&&(n&128)===0?(i.flags=n&-65537|128,i):null;case 26:case 27:case 5:return ge(i),null;case 31:if(i.memoizedState!==null){if(Tn(i),i.alternate===null)throw Error(r(340));mr()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 13:if(Tn(i),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(r(340));mr()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return H(Tt),null;case 4:return z(),null;case 10:return Di(i.type),null;case 22:case 23:return Tn(i),mh(),n!==null&&H(gr),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return Di(zt),null;case 25:return null;default:return null}}function r1(n,i){switch(Jf(i),i.tag){case 3:Di(zt),z();break;case 26:case 27:case 5:ge(i);break;case 4:z();break;case 31:i.memoizedState!==null&&Tn(i);break;case 13:Tn(i);break;case 19:H(Tt);break;case 10:Di(i.type);break;case 22:case 23:Tn(i),mh(),n!==null&&H(gr);break;case 24:Di(zt)}}function cl(n,i){try{var o=i.updateQueue,l=o!==null?o.lastEffect:null;if(l!==null){var f=l.next;o=f;do{if((o.tag&n)===n){l=void 0;var h=o.create,b=o.inst;l=h(),b.destroy=l}o=o.next}while(o!==f)}}catch(_){ft(i,i.return,_)}}function pa(n,i,o){try{var l=i.updateQueue,f=l!==null?l.lastEffect:null;if(f!==null){var h=f.next;l=h;do{if((l.tag&n)===n){var b=l.inst,_=b.destroy;if(_!==void 0){b.destroy=void 0,f=i;var U=o,Z=_;try{Z()}catch(ue){ft(f,U,ue)}}}l=l.next}while(l!==h)}}catch(ue){ft(i,i.return,ue)}}function o1(n){var i=n.updateQueue;if(i!==null){var o=n.stateNode;try{X0(i,o)}catch(l){ft(n,n.return,l)}}}function s1(n,i,o){o.props=kr(n.type,n.memoizedProps),o.state=n.memoizedState;try{o.componentWillUnmount()}catch(l){ft(n,i,l)}}function ul(n,i){try{var o=n.ref;if(o!==null){switch(n.tag){case 26:case 27:case 5:var l=n.stateNode;break;case 30:l=n.stateNode;break;default:l=n.stateNode}typeof o=="function"?n.refCleanup=o(l):o.current=l}}catch(f){ft(n,i,f)}}function pi(n,i){var o=n.ref,l=n.refCleanup;if(o!==null)if(typeof l=="function")try{l()}catch(f){ft(n,i,f)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(f){ft(n,i,f)}else o.current=null}function l1(n){var i=n.type,o=n.memoizedProps,l=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":o.autoFocus&&l.focus();break e;case"img":o.src?l.src=o.src:o.srcSet&&(l.srcset=o.srcSet)}}catch(f){ft(n,n.return,f)}}function Gh(n,i,o){try{var l=n.stateNode;oM(l,n.type,o,i),l[gn]=i}catch(f){ft(n,n.return,f)}}function c1(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&ka(n.type)||n.tag===4}function Kh(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||c1(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&ka(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Yh(n,i,o){var l=n.tag;if(l===5||l===6)n=n.stateNode,i?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(n,i):(i=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,i.appendChild(n),o=o._reactRootContainer,o!=null||i.onclick!==null||(i.onclick=Ni));else if(l!==4&&(l===27&&ka(n.type)&&(o=n.stateNode,i=null),n=n.child,n!==null))for(Yh(n,i,o),n=n.sibling;n!==null;)Yh(n,i,o),n=n.sibling}function hu(n,i,o){var l=n.tag;if(l===5||l===6)n=n.stateNode,i?o.insertBefore(n,i):o.appendChild(n);else if(l!==4&&(l===27&&ka(n.type)&&(o=n.stateNode),n=n.child,n!==null))for(hu(n,i,o),n=n.sibling;n!==null;)hu(n,i,o),n=n.sibling}function u1(n){var i=n.stateNode,o=n.memoizedProps;try{for(var l=n.type,f=i.attributes;f.length;)i.removeAttributeNode(f[0]);rn(i,l,o),i[Ot]=n,i[gn]=o}catch(h){ft(n,n.return,h)}}var Ii=!1,It=!1,Qh=!1,d1=typeof WeakSet=="function"?WeakSet:Set,Jt=null;function IN(n,i){if(n=n.containerInfo,ym=Du,n=_0(n),qf(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var l=o.getSelection&&o.getSelection();if(l&&l.rangeCount!==0){o=l.anchorNode;var f=l.anchorOffset,h=l.focusNode;l=l.focusOffset;try{o.nodeType,h.nodeType}catch{o=null;break e}var b=0,_=-1,U=-1,Z=0,ue=0,he=n,J=null;t:for(;;){for(var re;he!==o||f!==0&&he.nodeType!==3||(_=b+f),he!==h||l!==0&&he.nodeType!==3||(U=b+l),he.nodeType===3&&(b+=he.nodeValue.length),(re=he.firstChild)!==null;)J=he,he=re;for(;;){if(he===n)break t;if(J===o&&++Z===f&&(_=b),J===h&&++ue===l&&(U=b),(re=he.nextSibling)!==null)break;he=J,J=he.parentNode}he=re}o=_===-1||U===-1?null:{start:_,end:U}}else o=null}o=o||{start:0,end:0}}else o=null;for(gm={focusedElem:n,selectionRange:o},Du=!1,Jt=i;Jt!==null;)if(i=Jt,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,Jt=n;else for(;Jt!==null;){switch(i=Jt,h=i.alternate,n=i.flags,i.tag){case 0:if((n&4)!==0&&(n=i.updateQueue,n=n!==null?n.events:null,n!==null))for(o=0;o<n.length;o++)f=n[o],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&h!==null){n=void 0,o=i,f=h.memoizedProps,h=h.memoizedState,l=o.stateNode;try{var Ae=kr(o.type,f);n=l.getSnapshotBeforeUpdate(Ae,h),l.__reactInternalSnapshotBeforeUpdate=n}catch(Ue){ft(o,o.return,Ue)}}break;case 3:if((n&1024)!==0){if(n=i.stateNode.containerInfo,o=n.nodeType,o===9)xm(n);else if(o===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":xm(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(r(163))}if(n=i.sibling,n!==null){n.return=i.return,Jt=n;break}Jt=i.return}}function f1(n,i,o){var l=o.flags;switch(o.tag){case 0:case 11:case 15:Hi(n,o),l&4&&cl(5,o);break;case 1:if(Hi(n,o),l&4)if(n=o.stateNode,i===null)try{n.componentDidMount()}catch(b){ft(o,o.return,b)}else{var f=kr(o.type,i.memoizedProps);i=i.memoizedState;try{n.componentDidUpdate(f,i,n.__reactInternalSnapshotBeforeUpdate)}catch(b){ft(o,o.return,b)}}l&64&&o1(o),l&512&&ul(o,o.return);break;case 3:if(Hi(n,o),l&64&&(n=o.updateQueue,n!==null)){if(i=null,o.child!==null)switch(o.child.tag){case 27:case 5:i=o.child.stateNode;break;case 1:i=o.child.stateNode}try{X0(n,i)}catch(b){ft(o,o.return,b)}}break;case 27:i===null&&l&4&&u1(o);case 26:case 5:Hi(n,o),i===null&&l&4&&l1(o),l&512&&ul(o,o.return);break;case 12:Hi(n,o);break;case 31:Hi(n,o),l&4&&p1(n,o);break;case 13:Hi(n,o),l&4&&y1(n,o),l&64&&(n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(o=YN.bind(null,o),mM(n,o))));break;case 22:if(l=o.memoizedState!==null||Ii,!l){i=i!==null&&i.memoizedState!==null||It,f=Ii;var h=It;Ii=l,(It=i)&&!h?qi(n,o,(o.subtreeFlags&8772)!==0):Hi(n,o),Ii=f,It=h}break;case 30:break;default:Hi(n,o)}}function h1(n){var i=n.alternate;i!==null&&(n.alternate=null,h1(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&Ef(i)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var St=null,vn=!1;function Bi(n,i,o){for(o=o.child;o!==null;)m1(n,i,o),o=o.sibling}function m1(n,i,o){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount(Qt,o)}catch{}switch(o.tag){case 26:It||pi(o,i),Bi(n,i,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:It||pi(o,i);var l=St,f=vn;ka(o.type)&&(St=o.stateNode,vn=!1),Bi(n,i,o),vl(o.stateNode),St=l,vn=f;break;case 5:It||pi(o,i);case 6:if(l=St,f=vn,St=null,Bi(n,i,o),St=l,vn=f,St!==null)if(vn)try{(St.nodeType===9?St.body:St.nodeName==="HTML"?St.ownerDocument.body:St).removeChild(o.stateNode)}catch(h){ft(o,i,h)}else try{St.removeChild(o.stateNode)}catch(h){ft(o,i,h)}break;case 18:St!==null&&(vn?(n=St,ox(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,o.stateNode),qo(n)):ox(St,o.stateNode));break;case 4:l=St,f=vn,St=o.stateNode.containerInfo,vn=!0,Bi(n,i,o),St=l,vn=f;break;case 0:case 11:case 14:case 15:pa(2,o,i),It||pa(4,o,i),Bi(n,i,o);break;case 1:It||(pi(o,i),l=o.stateNode,typeof l.componentWillUnmount=="function"&&s1(o,i,l)),Bi(n,i,o);break;case 21:Bi(n,i,o);break;case 22:It=(l=It)||o.memoizedState!==null,Bi(n,i,o),It=l;break;default:Bi(n,i,o)}}function p1(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{qo(n)}catch(o){ft(i,i.return,o)}}}function y1(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{qo(n)}catch(o){ft(i,i.return,o)}}function BN(n){switch(n.tag){case 31:case 13:case 19:var i=n.stateNode;return i===null&&(i=n.stateNode=new d1),i;case 22:return n=n.stateNode,i=n._retryCache,i===null&&(i=n._retryCache=new d1),i;default:throw Error(r(435,n.tag))}}function mu(n,i){var o=BN(n);i.forEach(function(l){if(!o.has(l)){o.add(l);var f=QN.bind(null,n,l);l.then(f,f)}})}function xn(n,i){var o=i.deletions;if(o!==null)for(var l=0;l<o.length;l++){var f=o[l],h=n,b=i,_=b;e:for(;_!==null;){switch(_.tag){case 27:if(ka(_.type)){St=_.stateNode,vn=!1;break e}break;case 5:St=_.stateNode,vn=!1;break e;case 3:case 4:St=_.stateNode.containerInfo,vn=!0;break e}_=_.return}if(St===null)throw Error(r(160));m1(h,b,f),St=null,vn=!1,h=f.alternate,h!==null&&(h.return=null),f.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)g1(i,n),i=i.sibling}var oi=null;function g1(n,i){var o=n.alternate,l=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:xn(i,n),wn(n),l&4&&(pa(3,n,n.return),cl(3,n),pa(5,n,n.return));break;case 1:xn(i,n),wn(n),l&512&&(It||o===null||pi(o,o.return)),l&64&&Ii&&(n=n.updateQueue,n!==null&&(l=n.callbacks,l!==null&&(o=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=o===null?l:o.concat(l))));break;case 26:var f=oi;if(xn(i,n),wn(n),l&512&&(It||o===null||pi(o,o.return)),l&4){var h=o!==null?o.memoizedState:null;if(l=n.memoizedState,o===null)if(l===null)if(n.stateNode===null){e:{l=n.type,o=n.memoizedProps,f=f.ownerDocument||f;t:switch(l){case"title":h=f.getElementsByTagName("title")[0],(!h||h[$s]||h[Ot]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=f.createElement(l),f.head.insertBefore(h,f.querySelector("head > title"))),rn(h,l,o),h[Ot]=n,Wt(h),l=h;break e;case"link":var b=gx("link","href",f).get(l+(o.href||""));if(b){for(var _=0;_<b.length;_++)if(h=b[_],h.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&h.getAttribute("rel")===(o.rel==null?null:o.rel)&&h.getAttribute("title")===(o.title==null?null:o.title)&&h.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){b.splice(_,1);break t}}h=f.createElement(l),rn(h,l,o),f.head.appendChild(h);break;case"meta":if(b=gx("meta","content",f).get(l+(o.content||""))){for(_=0;_<b.length;_++)if(h=b[_],h.getAttribute("content")===(o.content==null?null:""+o.content)&&h.getAttribute("name")===(o.name==null?null:o.name)&&h.getAttribute("property")===(o.property==null?null:o.property)&&h.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&h.getAttribute("charset")===(o.charSet==null?null:o.charSet)){b.splice(_,1);break t}}h=f.createElement(l),rn(h,l,o),f.head.appendChild(h);break;default:throw Error(r(468,l))}h[Ot]=n,Wt(h),l=h}n.stateNode=l}else bx(f,n.type,n.stateNode);else n.stateNode=yx(f,l,n.memoizedProps);else h!==l?(h===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):h.count--,l===null?bx(f,n.type,n.stateNode):yx(f,l,n.memoizedProps)):l===null&&n.stateNode!==null&&Gh(n,n.memoizedProps,o.memoizedProps)}break;case 27:xn(i,n),wn(n),l&512&&(It||o===null||pi(o,o.return)),o!==null&&l&4&&Gh(n,n.memoizedProps,o.memoizedProps);break;case 5:if(xn(i,n),wn(n),l&512&&(It||o===null||pi(o,o.return)),n.flags&32){f=n.stateNode;try{uo(f,"")}catch(Ae){ft(n,n.return,Ae)}}l&4&&n.stateNode!=null&&(f=n.memoizedProps,Gh(n,f,o!==null?o.memoizedProps:f)),l&1024&&(Qh=!0);break;case 6:if(xn(i,n),wn(n),l&4){if(n.stateNode===null)throw Error(r(162));l=n.memoizedProps,o=n.stateNode;try{o.nodeValue=l}catch(Ae){ft(n,n.return,Ae)}}break;case 3:if(Mu=null,f=oi,oi=Au(i.containerInfo),xn(i,n),oi=f,wn(n),l&4&&o!==null&&o.memoizedState.isDehydrated)try{qo(i.containerInfo)}catch(Ae){ft(n,n.return,Ae)}Qh&&(Qh=!1,b1(n));break;case 4:l=oi,oi=Au(n.stateNode.containerInfo),xn(i,n),wn(n),oi=l;break;case 12:xn(i,n),wn(n);break;case 31:xn(i,n),wn(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,mu(n,l)));break;case 13:xn(i,n),wn(n),n.child.flags&8192&&n.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(yu=gt()),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,mu(n,l)));break;case 22:f=n.memoizedState!==null;var U=o!==null&&o.memoizedState!==null,Z=Ii,ue=It;if(Ii=Z||f,It=ue||U,xn(i,n),It=ue,Ii=Z,wn(n),l&8192)e:for(i=n.stateNode,i._visibility=f?i._visibility&-2:i._visibility|1,f&&(o===null||U||Ii||It||_r(n)),o=null,i=n;;){if(i.tag===5||i.tag===26){if(o===null){U=o=i;try{if(h=U.stateNode,f)b=h.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{_=U.stateNode;var he=U.memoizedProps.style,J=he!=null&&he.hasOwnProperty("display")?he.display:null;_.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(Ae){ft(U,U.return,Ae)}}}else if(i.tag===6){if(o===null){U=i;try{U.stateNode.nodeValue=f?"":U.memoizedProps}catch(Ae){ft(U,U.return,Ae)}}}else if(i.tag===18){if(o===null){U=i;try{var re=U.stateNode;f?sx(re,!0):sx(U.stateNode,!1)}catch(Ae){ft(U,U.return,Ae)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===n)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===n)break e;for(;i.sibling===null;){if(i.return===null||i.return===n)break e;o===i&&(o=null),i=i.return}o===i&&(o=null),i.sibling.return=i.return,i=i.sibling}l&4&&(l=n.updateQueue,l!==null&&(o=l.retryQueue,o!==null&&(l.retryQueue=null,mu(n,o))));break;case 19:xn(i,n),wn(n),l&4&&(l=n.updateQueue,l!==null&&(n.updateQueue=null,mu(n,l)));break;case 30:break;case 21:break;default:xn(i,n),wn(n)}}function wn(n){var i=n.flags;if(i&2){try{for(var o,l=n.return;l!==null;){if(c1(l)){o=l;break}l=l.return}if(o==null)throw Error(r(160));switch(o.tag){case 27:var f=o.stateNode,h=Kh(n);hu(n,h,f);break;case 5:var b=o.stateNode;o.flags&32&&(uo(b,""),o.flags&=-33);var _=Kh(n);hu(n,_,b);break;case 3:case 4:var U=o.stateNode.containerInfo,Z=Kh(n);Yh(n,Z,U);break;default:throw Error(r(161))}}catch(ue){ft(n,n.return,ue)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function b1(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var i=n;b1(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),n=n.sibling}}function Hi(n,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)f1(n,i.alternate,i),i=i.sibling}function _r(n){for(n=n.child;n!==null;){var i=n;switch(i.tag){case 0:case 11:case 14:case 15:pa(4,i,i.return),_r(i);break;case 1:pi(i,i.return);var o=i.stateNode;typeof o.componentWillUnmount=="function"&&s1(i,i.return,o),_r(i);break;case 27:vl(i.stateNode);case 26:case 5:pi(i,i.return),_r(i);break;case 22:i.memoizedState===null&&_r(i);break;case 30:_r(i);break;default:_r(i)}n=n.sibling}}function qi(n,i,o){for(o=o&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var l=i.alternate,f=n,h=i,b=h.flags;switch(h.tag){case 0:case 11:case 15:qi(f,h,o),cl(4,h);break;case 1:if(qi(f,h,o),l=h,f=l.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(Z){ft(l,l.return,Z)}if(l=h,f=l.updateQueue,f!==null){var _=l.stateNode;try{var U=f.shared.hiddenCallbacks;if(U!==null)for(f.shared.hiddenCallbacks=null,f=0;f<U.length;f++)Q0(U[f],_)}catch(Z){ft(l,l.return,Z)}}o&&b&64&&o1(h),ul(h,h.return);break;case 27:u1(h);case 26:case 5:qi(f,h,o),o&&l===null&&b&4&&l1(h),ul(h,h.return);break;case 12:qi(f,h,o);break;case 31:qi(f,h,o),o&&b&4&&p1(f,h);break;case 13:qi(f,h,o),o&&b&4&&y1(f,h);break;case 22:h.memoizedState===null&&qi(f,h,o),ul(h,h.return);break;case 30:break;default:qi(f,h,o)}i=i.sibling}}function Xh(n,i){var o=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),n=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(n=i.memoizedState.cachePool.pool),n!==o&&(n!=null&&n.refCount++,o!=null&&Xs(o))}function Zh(n,i){n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&Xs(n))}function si(n,i,o,l){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)v1(n,i,o,l),i=i.sibling}function v1(n,i,o,l){var f=i.flags;switch(i.tag){case 0:case 11:case 15:si(n,i,o,l),f&2048&&cl(9,i);break;case 1:si(n,i,o,l);break;case 3:si(n,i,o,l),f&2048&&(n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&Xs(n)));break;case 12:if(f&2048){si(n,i,o,l),n=i.stateNode;try{var h=i.memoizedProps,b=h.id,_=h.onPostCommit;typeof _=="function"&&_(b,i.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(U){ft(i,i.return,U)}}else si(n,i,o,l);break;case 31:si(n,i,o,l);break;case 13:si(n,i,o,l);break;case 23:break;case 22:h=i.stateNode,b=i.alternate,i.memoizedState!==null?h._visibility&2?si(n,i,o,l):dl(n,i):h._visibility&2?si(n,i,o,l):(h._visibility|=2,Co(n,i,o,l,(i.subtreeFlags&10256)!==0||!1)),f&2048&&Xh(b,i);break;case 24:si(n,i,o,l),f&2048&&Zh(i.alternate,i);break;default:si(n,i,o,l)}}function Co(n,i,o,l,f){for(f=f&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var h=n,b=i,_=o,U=l,Z=b.flags;switch(b.tag){case 0:case 11:case 15:Co(h,b,_,U,f),cl(8,b);break;case 23:break;case 22:var ue=b.stateNode;b.memoizedState!==null?ue._visibility&2?Co(h,b,_,U,f):dl(h,b):(ue._visibility|=2,Co(h,b,_,U,f)),f&&Z&2048&&Xh(b.alternate,b);break;case 24:Co(h,b,_,U,f),f&&Z&2048&&Zh(b.alternate,b);break;default:Co(h,b,_,U,f)}i=i.sibling}}function dl(n,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var o=n,l=i,f=l.flags;switch(l.tag){case 22:dl(o,l),f&2048&&Xh(l.alternate,l);break;case 24:dl(o,l),f&2048&&Zh(l.alternate,l);break;default:dl(o,l)}i=i.sibling}}var fl=8192;function Ro(n,i,o){if(n.subtreeFlags&fl)for(n=n.child;n!==null;)x1(n,i,o),n=n.sibling}function x1(n,i,o){switch(n.tag){case 26:Ro(n,i,o),n.flags&fl&&n.memoizedState!==null&&jM(o,oi,n.memoizedState,n.memoizedProps);break;case 5:Ro(n,i,o);break;case 3:case 4:var l=oi;oi=Au(n.stateNode.containerInfo),Ro(n,i,o),oi=l;break;case 22:n.memoizedState===null&&(l=n.alternate,l!==null&&l.memoizedState!==null?(l=fl,fl=16777216,Ro(n,i,o),fl=l):Ro(n,i,o));break;default:Ro(n,i,o)}}function w1(n){var i=n.alternate;if(i!==null&&(n=i.child,n!==null)){i.child=null;do i=n.sibling,n.sibling=null,n=i;while(n!==null)}}function hl(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var l=i[o];Jt=l,_1(l,n)}w1(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)k1(n),n=n.sibling}function k1(n){switch(n.tag){case 0:case 11:case 15:hl(n),n.flags&2048&&pa(9,n,n.return);break;case 3:hl(n);break;case 12:hl(n);break;case 22:var i=n.stateNode;n.memoizedState!==null&&i._visibility&2&&(n.return===null||n.return.tag!==13)?(i._visibility&=-3,pu(n)):hl(n);break;default:hl(n)}}function pu(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var l=i[o];Jt=l,_1(l,n)}w1(n)}for(n=n.child;n!==null;){switch(i=n,i.tag){case 0:case 11:case 15:pa(8,i,i.return),pu(i);break;case 22:o=i.stateNode,o._visibility&2&&(o._visibility&=-3,pu(i));break;default:pu(i)}n=n.sibling}}function _1(n,i){for(;Jt!==null;){var o=Jt;switch(o.tag){case 0:case 11:case 15:pa(8,o,i);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var l=o.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Xs(o.memoizedState.cache)}if(l=o.child,l!==null)l.return=o,Jt=l;else e:for(o=n;Jt!==null;){l=Jt;var f=l.sibling,h=l.return;if(h1(l),l===o){Jt=null;break e}if(f!==null){f.return=h,Jt=f;break e}Jt=h}}}var HN={getCacheForType:function(n){var i=nn(zt),o=i.data.get(n);return o===void 0&&(o=n(),i.data.set(n,o)),o},cacheSignal:function(){return nn(zt).controller.signal}},qN=typeof WeakMap=="function"?WeakMap:Map,st=0,bt=null,Ye=null,Ze=0,dt=0,Dn=null,ya=!1,To=!1,Wh=!1,Fi=0,Mt=0,ga=0,Sr=0,Jh=0,Ln=0,Do=0,ml=null,kn=null,em=!1,yu=0,S1=0,gu=1/0,bu=null,ba=null,Pt=0,va=null,Lo=null,Pi=0,tm=0,nm=null,E1=null,pl=0,im=null;function zn(){return(st&2)!==0&&Ze!==0?Ze&-Ze:N.T!==null?cm():At()}function j1(){if(Ln===0)if((Ze&536870912)===0||et){var n=kt;kt<<=1,(kt&3932160)===0&&(kt=262144),Ln=n}else Ln=536870912;return n=Rn.current,n!==null&&(n.flags|=32),Ln}function _n(n,i,o){(n===bt&&(dt===2||dt===9)||n.cancelPendingCommit!==null)&&(zo(n,0),xa(n,Ze,Ln,!1)),ai(n,o),((st&2)===0||n!==bt)&&(n===bt&&((st&2)===0&&(Sr|=o),Mt===4&&xa(n,Ze,Ln,!1)),yi(n))}function O1(n,i,o){if((st&6)!==0)throw Error(r(327));var l=!o&&(i&127)===0&&(i&n.expiredLanes)===0||Xt(n,i),f=l?VN(n,i):rm(n,i,!0),h=l;do{if(f===0){To&&!l&&xa(n,i,0,!1);break}else{if(o=n.current.alternate,h&&!FN(o)){f=rm(n,i,!1),h=!1;continue}if(f===2){if(h=i,n.errorRecoveryDisabledLanes&h)var b=0;else b=n.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){i=b;e:{var _=n;f=ml;var U=_.current.memoizedState.isDehydrated;if(U&&(zo(_,b).flags|=256),b=rm(_,b,!1),b!==2){if(Wh&&!U){_.errorRecoveryDisabledLanes|=h,Sr|=h,f=4;break e}h=kn,kn=f,h!==null&&(kn===null?kn=h:kn.push.apply(kn,h))}f=b}if(h=!1,f!==2)continue}}if(f===1){zo(n,0),xa(n,i,0,!0);break}e:{switch(l=n,h=f,h){case 0:case 1:throw Error(r(345));case 4:if((i&4194048)!==i)break;case 6:xa(l,i,Ln,!ya);break e;case 2:kn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((i&62914560)===i&&(f=yu+300-gt(),10<f)){if(xa(l,i,Ln,!ya),Ft(l,0,!0)!==0)break e;Pi=i,l.timeoutHandle=ax(A1.bind(null,l,o,kn,bu,em,i,Ln,Sr,Do,ya,h,"Throttled",-0,0),f);break e}A1(l,o,kn,bu,em,i,Ln,Sr,Do,ya,h,null,-0,0)}}break}while(!0);yi(n)}function A1(n,i,o,l,f,h,b,_,U,Z,ue,he,J,re){if(n.timeoutHandle=-1,he=i.subtreeFlags,he&8192||(he&16785408)===16785408){he={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ni},x1(i,h,he);var Ae=(h&62914560)===h?yu-gt():(h&4194048)===h?S1-gt():0;if(Ae=OM(he,Ae),Ae!==null){Pi=h,n.cancelPendingCommit=Ae(z1.bind(null,n,i,h,o,l,f,b,_,U,ue,he,null,J,re)),xa(n,h,b,!Z);return}}z1(n,i,h,o,l,f,b,_,U)}function FN(n){for(var i=n;;){var o=i.tag;if((o===0||o===11||o===15)&&i.flags&16384&&(o=i.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var l=0;l<o.length;l++){var f=o[l],h=f.getSnapshot;f=f.value;try{if(!Mn(h(),f))return!1}catch{return!1}}if(o=i.child,i.subtreeFlags&16384&&o!==null)o.return=i,i=o;else{if(i===n)break;for(;i.sibling===null;){if(i.return===null||i.return===n)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function xa(n,i,o,l){i&=~Jh,i&=~Sr,n.suspendedLanes|=i,n.pingedLanes&=~i,l&&(n.warmLanes|=i),l=n.expirationTimes;for(var f=i;0<f;){var h=31-be(f),b=1<<h;l[h]=-1,f&=~b}o!==0&&io(n,o,i)}function vu(){return(st&6)===0?(yl(0),!1):!0}function am(){if(Ye!==null){if(dt===0)var n=Ye.return;else n=Ye,Ti=pr=null,xh(n),jo=null,Ws=0,n=Ye;for(;n!==null;)r1(n.alternate,n),n=n.return;Ye=null}}function zo(n,i){var o=n.timeoutHandle;o!==-1&&(n.timeoutHandle=-1,cM(o)),o=n.cancelPendingCommit,o!==null&&(n.cancelPendingCommit=null,o()),Pi=0,am(),bt=n,Ye=o=Ci(n.current,null),Ze=i,dt=0,Dn=null,ya=!1,To=Xt(n,i),Wh=!1,Do=Ln=Jh=Sr=ga=Mt=0,kn=ml=null,em=!1,(i&8)!==0&&(i|=i&32);var l=n.entangledLanes;if(l!==0)for(n=n.entanglements,l&=i;0<l;){var f=31-be(l),h=1<<f;i|=n[f],l&=~h}return Fi=i,Bc(),o}function N1(n,i){Fe=null,N.H=ol,i===Eo||i===Yc?(i=V0(),dt=3):i===lh?(i=V0(),dt=4):dt=i===zh?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Dn=i,Ye===null&&(Mt=1,lu(n,Yn(i,n.current)))}function M1(){var n=Rn.current;return n===null?!0:(Ze&4194048)===Ze?Wn===null:(Ze&62914560)===Ze||(Ze&536870912)!==0?n===Wn:!1}function C1(){var n=N.H;return N.H=ol,n===null?ol:n}function R1(){var n=N.A;return N.A=HN,n}function xu(){Mt=4,ya||(Ze&4194048)!==Ze&&Rn.current!==null||(To=!0),(ga&134217727)===0&&(Sr&134217727)===0||bt===null||xa(bt,Ze,Ln,!1)}function rm(n,i,o){var l=st;st|=2;var f=C1(),h=R1();(bt!==n||Ze!==i)&&(bu=null,zo(n,i)),i=!1;var b=Mt;e:do try{if(dt!==0&&Ye!==null){var _=Ye,U=Dn;switch(dt){case 8:am(),b=6;break e;case 3:case 2:case 9:case 6:Rn.current===null&&(i=!0);var Z=dt;if(dt=0,Dn=null,$o(n,_,U,Z),o&&To){b=0;break e}break;default:Z=dt,dt=0,Dn=null,$o(n,_,U,Z)}}PN(),b=Mt;break}catch(ue){N1(n,ue)}while(!0);return i&&n.shellSuspendCounter++,Ti=pr=null,st=l,N.H=f,N.A=h,Ye===null&&(bt=null,Ze=0,Bc()),b}function PN(){for(;Ye!==null;)T1(Ye)}function VN(n,i){var o=st;st|=2;var l=C1(),f=R1();bt!==n||Ze!==i?(bu=null,gu=gt()+500,zo(n,i)):To=Xt(n,i);e:do try{if(dt!==0&&Ye!==null){i=Ye;var h=Dn;t:switch(dt){case 1:dt=0,Dn=null,$o(n,i,h,1);break;case 2:case 9:if(F0(h)){dt=0,Dn=null,D1(i);break}i=function(){dt!==2&&dt!==9||bt!==n||(dt=7),yi(n)},h.then(i,i);break e;case 3:dt=7;break e;case 4:dt=5;break e;case 7:F0(h)?(dt=0,Dn=null,D1(i)):(dt=0,Dn=null,$o(n,i,h,7));break;case 5:var b=null;switch(Ye.tag){case 26:b=Ye.memoizedState;case 5:case 27:var _=Ye;if(b?vx(b):_.stateNode.complete){dt=0,Dn=null;var U=_.sibling;if(U!==null)Ye=U;else{var Z=_.return;Z!==null?(Ye=Z,wu(Z)):Ye=null}break t}}dt=0,Dn=null,$o(n,i,h,5);break;case 6:dt=0,Dn=null,$o(n,i,h,6);break;case 8:am(),Mt=6;break e;default:throw Error(r(462))}}GN();break}catch(ue){N1(n,ue)}while(!0);return Ti=pr=null,N.H=l,N.A=f,st=o,Ye!==null?0:(bt=null,Ze=0,Bc(),Mt)}function GN(){for(;Ye!==null&&!An();)T1(Ye)}function T1(n){var i=i1(n.alternate,n,Fi);n.memoizedProps=n.pendingProps,i===null?wu(n):Ye=i}function D1(n){var i=n,o=i.alternate;switch(i.tag){case 15:case 0:i=Zv(o,i,i.pendingProps,i.type,void 0,Ze);break;case 11:i=Zv(o,i,i.pendingProps,i.type.render,i.ref,Ze);break;case 5:xh(i);default:r1(o,i),i=Ye=R0(i,Fi),i=i1(o,i,Fi)}n.memoizedProps=n.pendingProps,i===null?wu(n):Ye=i}function $o(n,i,o,l){Ti=pr=null,xh(i),jo=null,Ws=0;var f=i.return;try{if(DN(n,f,i,o,Ze)){Mt=1,lu(n,Yn(o,n.current)),Ye=null;return}}catch(h){if(f!==null)throw Ye=f,h;Mt=1,lu(n,Yn(o,n.current)),Ye=null;return}i.flags&32768?(et||l===1?n=!0:To||(Ze&536870912)!==0?n=!1:(ya=n=!0,(l===2||l===9||l===3||l===6)&&(l=Rn.current,l!==null&&l.tag===13&&(l.flags|=16384))),L1(i,n)):wu(i)}function wu(n){var i=n;do{if((i.flags&32768)!==0){L1(i,ya);return}n=i.return;var o=$N(i.alternate,i,Fi);if(o!==null){Ye=o;return}if(i=i.sibling,i!==null){Ye=i;return}Ye=i=n}while(i!==null);Mt===0&&(Mt=5)}function L1(n,i){do{var o=UN(n.alternate,n);if(o!==null){o.flags&=32767,Ye=o;return}if(o=n.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!i&&(n=n.sibling,n!==null)){Ye=n;return}Ye=n=o}while(n!==null);Mt=6,Ye=null}function z1(n,i,o,l,f,h,b,_,U){n.cancelPendingCommit=null;do ku();while(Pt!==0);if((st&6)!==0)throw Error(r(327));if(i!==null){if(i===n.current)throw Error(r(177));if(h=i.lanes|i.childLanes,h|=Kf,fi(n,o,h,b,_,U),n===bt&&(Ye=bt=null,Ze=0),Lo=i,va=n,Pi=o,tm=h,nm=f,E1=l,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,XN(we,function(){return H1(),null})):(n.callbackNode=null,n.callbackPriority=0),l=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||l){l=N.T,N.T=null,f=V.p,V.p=2,b=st,st|=4;try{IN(n,i,o)}finally{st=b,V.p=f,N.T=l}}Pt=1,$1(),U1(),I1()}}function $1(){if(Pt===1){Pt=0;var n=va,i=Lo,o=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||o){o=N.T,N.T=null;var l=V.p;V.p=2;var f=st;st|=4;try{g1(i,n);var h=gm,b=_0(n.containerInfo),_=h.focusedElem,U=h.selectionRange;if(b!==_&&_&&_.ownerDocument&&k0(_.ownerDocument.documentElement,_)){if(U!==null&&qf(_)){var Z=U.start,ue=U.end;if(ue===void 0&&(ue=Z),"selectionStart"in _)_.selectionStart=Z,_.selectionEnd=Math.min(ue,_.value.length);else{var he=_.ownerDocument||document,J=he&&he.defaultView||window;if(J.getSelection){var re=J.getSelection(),Ae=_.textContent.length,Ue=Math.min(U.start,Ae),yt=U.end===void 0?Ue:Math.min(U.end,Ae);!re.extend&&Ue>yt&&(b=yt,yt=Ue,Ue=b);var G=w0(_,Ue),q=w0(_,yt);if(G&&q&&(re.rangeCount!==1||re.anchorNode!==G.node||re.anchorOffset!==G.offset||re.focusNode!==q.node||re.focusOffset!==q.offset)){var X=he.createRange();X.setStart(G.node,G.offset),re.removeAllRanges(),Ue>yt?(re.addRange(X),re.extend(q.node,q.offset)):(X.setEnd(q.node,q.offset),re.addRange(X))}}}}for(he=[],re=_;re=re.parentNode;)re.nodeType===1&&he.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<he.length;_++){var fe=he[_];fe.element.scrollLeft=fe.left,fe.element.scrollTop=fe.top}}Du=!!ym,gm=ym=null}finally{st=f,V.p=l,N.T=o}}n.current=i,Pt=2}}function U1(){if(Pt===2){Pt=0;var n=va,i=Lo,o=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||o){o=N.T,N.T=null;var l=V.p;V.p=2;var f=st;st|=4;try{f1(n,i.alternate,i)}finally{st=f,V.p=l,N.T=o}}Pt=3}}function I1(){if(Pt===4||Pt===3){Pt=0,un();var n=va,i=Lo,o=Pi,l=E1;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Pt=5:(Pt=0,Lo=va=null,B1(n,n.pendingLanes));var f=n.pendingLanes;if(f===0&&(ba=null),Pe(o),i=i.stateNode,ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot(Qt,i,void 0,(i.current.flags&128)===128)}catch{}if(l!==null){i=N.T,f=V.p,V.p=2,N.T=null;try{for(var h=n.onRecoverableError,b=0;b<l.length;b++){var _=l[b];h(_.value,{componentStack:_.stack})}}finally{N.T=i,V.p=f}}(Pi&3)!==0&&ku(),yi(n),f=n.pendingLanes,(o&261930)!==0&&(f&42)!==0?n===im?pl++:(pl=0,im=n):pl=0,yl(0)}}function B1(n,i){(n.pooledCacheLanes&=i)===0&&(i=n.pooledCache,i!=null&&(n.pooledCache=null,Xs(i)))}function ku(){return $1(),U1(),I1(),H1()}function H1(){if(Pt!==5)return!1;var n=va,i=tm;tm=0;var o=Pe(Pi),l=N.T,f=V.p;try{V.p=32>o?32:o,N.T=null,o=nm,nm=null;var h=va,b=Pi;if(Pt=0,Lo=va=null,Pi=0,(st&6)!==0)throw Error(r(331));var _=st;if(st|=4,k1(h.current),v1(h,h.current,b,o),st=_,yl(0,!1),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot(Qt,h)}catch{}return!0}finally{V.p=f,N.T=l,B1(n,i)}}function q1(n,i,o){i=Yn(o,i),i=Lh(n.stateNode,i,2),n=fa(n,i,2),n!==null&&(ai(n,2),yi(n))}function ft(n,i,o){if(n.tag===3)q1(n,n,o);else for(;i!==null;){if(i.tag===3){q1(i,n,o);break}else if(i.tag===1){var l=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ba===null||!ba.has(l))){n=Yn(o,n),o=Fv(2),l=fa(i,o,2),l!==null&&(Pv(o,l,i,n),ai(l,2),yi(l));break}}i=i.return}}function om(n,i,o){var l=n.pingCache;if(l===null){l=n.pingCache=new qN;var f=new Set;l.set(i,f)}else f=l.get(i),f===void 0&&(f=new Set,l.set(i,f));f.has(o)||(Wh=!0,f.add(o),n=KN.bind(null,n,i,o),i.then(n,n))}function KN(n,i,o){var l=n.pingCache;l!==null&&l.delete(i),n.pingedLanes|=n.suspendedLanes&o,n.warmLanes&=~o,bt===n&&(Ze&o)===o&&(Mt===4||Mt===3&&(Ze&62914560)===Ze&&300>gt()-yu?(st&2)===0&&zo(n,0):Jh|=o,Do===Ze&&(Do=0)),yi(n)}function F1(n,i){i===0&&(i=Nn()),n=fr(n,i),n!==null&&(ai(n,i),yi(n))}function YN(n){var i=n.memoizedState,o=0;i!==null&&(o=i.retryLane),F1(n,o)}function QN(n,i){var o=0;switch(n.tag){case 31:case 13:var l=n.stateNode,f=n.memoizedState;f!==null&&(o=f.retryLane);break;case 19:l=n.stateNode;break;case 22:l=n.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(i),F1(n,o)}function XN(n,i){return lt(n,i)}var _u=null,Uo=null,sm=!1,Su=!1,lm=!1,wa=0;function yi(n){n!==Uo&&n.next===null&&(Uo===null?_u=Uo=n:Uo=Uo.next=n),Su=!0,sm||(sm=!0,WN())}function yl(n,i){if(!lm&&Su){lm=!0;do for(var o=!1,l=_u;l!==null;){if(n!==0){var f=l.pendingLanes;if(f===0)var h=0;else{var b=l.suspendedLanes,_=l.pingedLanes;h=(1<<31-be(42|n)+1)-1,h&=f&~(b&~_),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(o=!0,K1(l,h))}else h=Ze,h=Ft(l,l===bt?h:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(h&3)===0||Xt(l,h)||(o=!0,K1(l,h));l=l.next}while(o);lm=!1}}function ZN(){P1()}function P1(){Su=sm=!1;var n=0;wa!==0&&lM()&&(n=wa);for(var i=gt(),o=null,l=_u;l!==null;){var f=l.next,h=V1(l,i);h===0?(l.next=null,o===null?_u=f:o.next=f,f===null&&(Uo=o)):(o=l,(n!==0||(h&3)!==0)&&(Su=!0)),l=f}Pt!==0&&Pt!==5||yl(n),wa!==0&&(wa=0)}function V1(n,i){for(var o=n.suspendedLanes,l=n.pingedLanes,f=n.expirationTimes,h=n.pendingLanes&-62914561;0<h;){var b=31-be(h),_=1<<b,U=f[b];U===-1?((_&o)===0||(_&l)!==0)&&(f[b]=Zt(_,i)):U<=i&&(n.expiredLanes|=_),h&=~_}if(i=bt,o=Ze,o=Ft(n,n===i?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l=n.callbackNode,o===0||n===i&&(dt===2||dt===9)||n.cancelPendingCommit!==null)return l!==null&&l!==null&&Fn(l),n.callbackNode=null,n.callbackPriority=0;if((o&3)===0||Xt(n,o)){if(i=o&-o,i===n.callbackPriority)return i;switch(l!==null&&Fn(l),Pe(o)){case 2:case 8:o=ii;break;case 32:o=we;break;case 268435456:o=Ce;break;default:o=we}return l=G1.bind(null,n),o=lt(o,l),n.callbackPriority=i,n.callbackNode=o,i}return l!==null&&l!==null&&Fn(l),n.callbackPriority=2,n.callbackNode=null,2}function G1(n,i){if(Pt!==0&&Pt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var o=n.callbackNode;if(ku()&&n.callbackNode!==o)return null;var l=Ze;return l=Ft(n,n===bt?l:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),l===0?null:(O1(n,l,i),V1(n,gt()),n.callbackNode!=null&&n.callbackNode===o?G1.bind(null,n):null)}function K1(n,i){if(ku())return null;O1(n,i,!0)}function WN(){uM(function(){(st&6)!==0?lt(di,ZN):P1()})}function cm(){if(wa===0){var n=_o;n===0&&(n=He,He<<=1,(He&261888)===0&&(He=256)),wa=n}return wa}function Y1(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Rc(""+n)}function Q1(n,i){var o=i.ownerDocument.createElement("input");return o.name=i.name,o.value=i.value,n.id&&o.setAttribute("form",n.id),i.parentNode.insertBefore(o,i),n=new FormData(n),o.parentNode.removeChild(o),n}function JN(n,i,o,l,f){if(i==="submit"&&o&&o.stateNode===f){var h=Y1((f[gn]||null).action),b=l.submitter;b&&(i=(i=b[gn]||null)?Y1(i.formAction):b.getAttribute("formAction"),i!==null&&(h=i,b=null));var _=new zc("action","action",null,l,f);n.push({event:_,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(wa!==0){var U=b?Q1(f,b):new FormData(f);Nh(o,{pending:!0,data:U,method:f.method,action:h},null,U)}}else typeof h=="function"&&(_.preventDefault(),U=b?Q1(f,b):new FormData(f),Nh(o,{pending:!0,data:U,method:f.method,action:h},h,U))},currentTarget:f}]})}}for(var um=0;um<Gf.length;um++){var dm=Gf[um],eM=dm.toLowerCase(),tM=dm[0].toUpperCase()+dm.slice(1);ri(eM,"on"+tM)}ri(j0,"onAnimationEnd"),ri(O0,"onAnimationIteration"),ri(A0,"onAnimationStart"),ri("dblclick","onDoubleClick"),ri("focusin","onFocus"),ri("focusout","onBlur"),ri(gN,"onTransitionRun"),ri(bN,"onTransitionStart"),ri(vN,"onTransitionCancel"),ri(N0,"onTransitionEnd"),lo("onMouseEnter",["mouseout","mouseover"]),lo("onMouseLeave",["mouseout","mouseover"]),lo("onPointerEnter",["pointerout","pointerover"]),lo("onPointerLeave",["pointerout","pointerover"]),lr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),lr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),lr("onBeforeInput",["compositionend","keypress","textInput","paste"]),lr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),lr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),lr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gl="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(" "),nM=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(gl));function X1(n,i){i=(i&4)!==0;for(var o=0;o<n.length;o++){var l=n[o],f=l.event;l=l.listeners;e:{var h=void 0;if(i)for(var b=l.length-1;0<=b;b--){var _=l[b],U=_.instance,Z=_.currentTarget;if(_=_.listener,U!==h&&f.isPropagationStopped())break e;h=_,f.currentTarget=Z;try{h(f)}catch(ue){Ic(ue)}f.currentTarget=null,h=U}else for(b=0;b<l.length;b++){if(_=l[b],U=_.instance,Z=_.currentTarget,_=_.listener,U!==h&&f.isPropagationStopped())break e;h=_,f.currentTarget=Z;try{h(f)}catch(ue){Ic(ue)}f.currentTarget=null,h=U}}}}function Qe(n,i){var o=i[Sf];o===void 0&&(o=i[Sf]=new Set);var l=n+"__bubble";o.has(l)||(Z1(i,n,2,!1),o.add(l))}function fm(n,i,o){var l=0;i&&(l|=4),Z1(o,n,l,i)}var Eu="_reactListening"+Math.random().toString(36).slice(2);function hm(n){if(!n[Eu]){n[Eu]=!0,Pb.forEach(function(o){o!=="selectionchange"&&(nM.has(o)||fm(o,!1,n),fm(o,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[Eu]||(i[Eu]=!0,fm("selectionchange",!1,i))}}function Z1(n,i,o,l){switch(jx(i)){case 2:var f=MM;break;case 8:f=CM;break;default:f=Am}o=f.bind(null,i,o,n),f=void 0,!Tf||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(f=!0),l?f!==void 0?n.addEventListener(i,o,{capture:!0,passive:f}):n.addEventListener(i,o,!0):f!==void 0?n.addEventListener(i,o,{passive:f}):n.addEventListener(i,o,!1)}function mm(n,i,o,l,f){var h=l;if((i&1)===0&&(i&2)===0&&l!==null)e:for(;;){if(l===null)return;var b=l.tag;if(b===3||b===4){var _=l.stateNode.containerInfo;if(_===f)break;if(b===4)for(b=l.return;b!==null;){var U=b.tag;if((U===3||U===4)&&b.stateNode.containerInfo===f)return;b=b.return}for(;_!==null;){if(b=ro(_),b===null)return;if(U=b.tag,U===5||U===6||U===26||U===27){l=h=b;continue e}_=_.parentNode}}l=l.return}n0(function(){var Z=h,ue=Cf(o),he=[];e:{var J=M0.get(n);if(J!==void 0){var re=zc,Ae=n;switch(n){case"keypress":if(Dc(o)===0)break e;case"keydown":case"keyup":re=QA;break;case"focusin":Ae="focus",re=$f;break;case"focusout":Ae="blur",re=$f;break;case"beforeblur":case"afterblur":re=$f;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=r0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=$A;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=WA;break;case j0:case O0:case A0:re=BA;break;case N0:re=eN;break;case"scroll":case"scrollend":re=LA;break;case"wheel":re=nN;break;case"copy":case"cut":case"paste":re=qA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=s0;break;case"toggle":case"beforetoggle":re=aN}var Ue=(i&4)!==0,yt=!Ue&&(n==="scroll"||n==="scrollend"),G=Ue?J!==null?J+"Capture":null:J;Ue=[];for(var q=Z,X;q!==null;){var fe=q;if(X=fe.stateNode,fe=fe.tag,fe!==5&&fe!==26&&fe!==27||X===null||G===null||(fe=Is(q,G),fe!=null&&Ue.push(bl(q,fe,X))),yt)break;q=q.return}0<Ue.length&&(J=new re(J,Ae,null,o,ue),he.push({event:J,listeners:Ue}))}}if((i&7)===0){e:{if(J=n==="mouseover"||n==="pointerover",re=n==="mouseout"||n==="pointerout",J&&o!==Mf&&(Ae=o.relatedTarget||o.fromElement)&&(ro(Ae)||Ae[ao]))break e;if((re||J)&&(J=ue.window===ue?ue:(J=ue.ownerDocument)?J.defaultView||J.parentWindow:window,re?(Ae=o.relatedTarget||o.toElement,re=Z,Ae=Ae?ro(Ae):null,Ae!==null&&(yt=c(Ae),Ue=Ae.tag,Ae!==yt||Ue!==5&&Ue!==27&&Ue!==6)&&(Ae=null)):(re=null,Ae=Z),re!==Ae)){if(Ue=r0,fe="onMouseLeave",G="onMouseEnter",q="mouse",(n==="pointerout"||n==="pointerover")&&(Ue=s0,fe="onPointerLeave",G="onPointerEnter",q="pointer"),yt=re==null?J:Us(re),X=Ae==null?J:Us(Ae),J=new Ue(fe,q+"leave",re,o,ue),J.target=yt,J.relatedTarget=X,fe=null,ro(ue)===Z&&(Ue=new Ue(G,q+"enter",Ae,o,ue),Ue.target=X,Ue.relatedTarget=yt,fe=Ue),yt=fe,re&&Ae)t:{for(Ue=iM,G=re,q=Ae,X=0,fe=G;fe;fe=Ue(fe))X++;fe=0;for(var De=q;De;De=Ue(De))fe++;for(;0<X-fe;)G=Ue(G),X--;for(;0<fe-X;)q=Ue(q),fe--;for(;X--;){if(G===q||q!==null&&G===q.alternate){Ue=G;break t}G=Ue(G),q=Ue(q)}Ue=null}else Ue=null;re!==null&&W1(he,J,re,Ue,!1),Ae!==null&&yt!==null&&W1(he,yt,Ae,Ue,!0)}}e:{if(J=Z?Us(Z):window,re=J.nodeName&&J.nodeName.toLowerCase(),re==="select"||re==="input"&&J.type==="file")var rt=p0;else if(h0(J))if(y0)rt=mN;else{rt=fN;var Me=dN}else re=J.nodeName,!re||re.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?Z&&Nf(Z.elementType)&&(rt=p0):rt=hN;if(rt&&(rt=rt(n,Z))){m0(he,rt,o,ue);break e}Me&&Me(n,J,Z),n==="focusout"&&Z&&J.type==="number"&&Z.memoizedProps.value!=null&&Af(J,"number",J.value)}switch(Me=Z?Us(Z):window,n){case"focusin":(h0(Me)||Me.contentEditable==="true")&&(po=Me,Ff=Z,Ks=null);break;case"focusout":Ks=Ff=po=null;break;case"mousedown":Pf=!0;break;case"contextmenu":case"mouseup":case"dragend":Pf=!1,S0(he,o,ue);break;case"selectionchange":if(yN)break;case"keydown":case"keyup":S0(he,o,ue)}var Ve;if(If)e:{switch(n){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else mo?d0(n,o)&&(We="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(We="onCompositionStart");We&&(l0&&o.locale!=="ko"&&(mo||We!=="onCompositionStart"?We==="onCompositionEnd"&&mo&&(Ve=i0()):(ra=ue,Df="value"in ra?ra.value:ra.textContent,mo=!0)),Me=ju(Z,We),0<Me.length&&(We=new o0(We,n,null,o,ue),he.push({event:We,listeners:Me}),Ve?We.data=Ve:(Ve=f0(o),Ve!==null&&(We.data=Ve)))),(Ve=oN?sN(n,o):lN(n,o))&&(We=ju(Z,"onBeforeInput"),0<We.length&&(Me=new o0("onBeforeInput","beforeinput",null,o,ue),he.push({event:Me,listeners:We}),Me.data=Ve)),JN(he,n,Z,o,ue)}X1(he,i)})}function bl(n,i,o){return{instance:n,listener:i,currentTarget:o}}function ju(n,i){for(var o=i+"Capture",l=[];n!==null;){var f=n,h=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||h===null||(f=Is(n,o),f!=null&&l.unshift(bl(n,f,h)),f=Is(n,i),f!=null&&l.push(bl(n,f,h))),n.tag===3)return l;n=n.return}return[]}function iM(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function W1(n,i,o,l,f){for(var h=i._reactName,b=[];o!==null&&o!==l;){var _=o,U=_.alternate,Z=_.stateNode;if(_=_.tag,U!==null&&U===l)break;_!==5&&_!==26&&_!==27||Z===null||(U=Z,f?(Z=Is(o,h),Z!=null&&b.unshift(bl(o,Z,U))):f||(Z=Is(o,h),Z!=null&&b.push(bl(o,Z,U)))),o=o.return}b.length!==0&&n.push({event:i,listeners:b})}var aM=/\r\n?/g,rM=/\u0000|\uFFFD/g;function J1(n){return(typeof n=="string"?n:""+n).replace(aM,`
|
|
49
|
-
`).replace(rM,"")}function ex(n,i){return i=J1(i),J1(n)===i}function pt(n,i,o,l,f,h){switch(o){case"children":typeof l=="string"?i==="body"||i==="textarea"&&l===""||uo(n,l):(typeof l=="number"||typeof l=="bigint")&&i!=="body"&&uo(n,""+l);break;case"className":Mc(n,"class",l);break;case"tabIndex":Mc(n,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Mc(n,o,l);break;case"style":e0(n,l,h);break;case"data":if(i!=="object"){Mc(n,"data",l);break}case"src":case"href":if(l===""&&(i!=="a"||o!=="href")){n.removeAttribute(o);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(o);break}l=Rc(""+l),n.setAttribute(o,l);break;case"action":case"formAction":if(typeof l=="function"){n.setAttribute(o,"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 h=="function"&&(o==="formAction"?(i!=="input"&&pt(n,i,"name",f.name,f,null),pt(n,i,"formEncType",f.formEncType,f,null),pt(n,i,"formMethod",f.formMethod,f,null),pt(n,i,"formTarget",f.formTarget,f,null)):(pt(n,i,"encType",f.encType,f,null),pt(n,i,"method",f.method,f,null),pt(n,i,"target",f.target,f,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){n.removeAttribute(o);break}l=Rc(""+l),n.setAttribute(o,l);break;case"onClick":l!=null&&(n.onclick=Ni);break;case"onScroll":l!=null&&Qe("scroll",n);break;case"onScrollEnd":l!=null&&Qe("scrollend",n);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(o=l.__html,o!=null){if(f.children!=null)throw Error(r(60));n.innerHTML=o}}break;case"multiple":n.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":n.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){n.removeAttribute("xlink:href");break}o=Rc(""+l),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(o,""+l):n.removeAttribute(o);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":l&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(o,""):n.removeAttribute(o);break;case"capture":case"download":l===!0?n.setAttribute(o,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?n.setAttribute(o,l):n.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?n.setAttribute(o,l):n.removeAttribute(o);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?n.removeAttribute(o):n.setAttribute(o,l);break;case"popover":Qe("beforetoggle",n),Qe("toggle",n),Nc(n,"popover",l);break;case"xlinkActuate":Ai(n,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Ai(n,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Ai(n,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Ai(n,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Ai(n,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Ai(n,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Ai(n,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Ai(n,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Ai(n,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Nc(n,"is",l);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=TA.get(o)||o,Nc(n,o,l))}}function pm(n,i,o,l,f,h){switch(o){case"style":e0(n,l,h);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(o=l.__html,o!=null){if(f.children!=null)throw Error(r(60));n.innerHTML=o}}break;case"children":typeof l=="string"?uo(n,l):(typeof l=="number"||typeof l=="bigint")&&uo(n,""+l);break;case"onScroll":l!=null&&Qe("scroll",n);break;case"onScrollEnd":l!=null&&Qe("scrollend",n);break;case"onClick":l!=null&&(n.onclick=Ni);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Vb.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(f=o.endsWith("Capture"),i=o.slice(2,f?o.length-7:void 0),h=n[gn]||null,h=h!=null?h[o]:null,typeof h=="function"&&n.removeEventListener(i,h,f),typeof l=="function")){typeof h!="function"&&h!==null&&(o in n?n[o]=null:n.hasAttribute(o)&&n.removeAttribute(o)),n.addEventListener(i,l,f);break e}o in n?n[o]=l:l===!0?n.setAttribute(o,""):Nc(n,o,l)}}}function rn(n,i,o){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",n),Qe("load",n);var l=!1,f=!1,h;for(h in o)if(o.hasOwnProperty(h)){var b=o[h];if(b!=null)switch(h){case"src":l=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:pt(n,i,h,b,o,null)}}f&&pt(n,i,"srcSet",o.srcSet,o,null),l&&pt(n,i,"src",o.src,o,null);return;case"input":Qe("invalid",n);var _=h=b=f=null,U=null,Z=null;for(l in o)if(o.hasOwnProperty(l)){var ue=o[l];if(ue!=null)switch(l){case"name":f=ue;break;case"type":b=ue;break;case"checked":U=ue;break;case"defaultChecked":Z=ue;break;case"value":h=ue;break;case"defaultValue":_=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(r(137,i));break;default:pt(n,i,l,ue,o,null)}}Xb(n,h,_,U,Z,b,f,!1);return;case"select":Qe("invalid",n),l=b=h=null;for(f in o)if(o.hasOwnProperty(f)&&(_=o[f],_!=null))switch(f){case"value":h=_;break;case"defaultValue":b=_;break;case"multiple":l=_;default:pt(n,i,f,_,o,null)}i=h,o=b,n.multiple=!!l,i!=null?co(n,!!l,i,!1):o!=null&&co(n,!!l,o,!0);return;case"textarea":Qe("invalid",n),h=f=l=null;for(b in o)if(o.hasOwnProperty(b)&&(_=o[b],_!=null))switch(b){case"value":l=_;break;case"defaultValue":f=_;break;case"children":h=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(91));break;default:pt(n,i,b,_,o,null)}Wb(n,l,f,h);return;case"option":for(U in o)if(o.hasOwnProperty(U)&&(l=o[U],l!=null))switch(U){case"selected":n.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:pt(n,i,U,l,o,null)}return;case"dialog":Qe("beforetoggle",n),Qe("toggle",n),Qe("cancel",n),Qe("close",n);break;case"iframe":case"object":Qe("load",n);break;case"video":case"audio":for(l=0;l<gl.length;l++)Qe(gl[l],n);break;case"image":Qe("error",n),Qe("load",n);break;case"details":Qe("toggle",n);break;case"embed":case"source":case"link":Qe("error",n),Qe("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Z in o)if(o.hasOwnProperty(Z)&&(l=o[Z],l!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:pt(n,i,Z,l,o,null)}return;default:if(Nf(i)){for(ue in o)o.hasOwnProperty(ue)&&(l=o[ue],l!==void 0&&pm(n,i,ue,l,o,void 0));return}}for(_ in o)o.hasOwnProperty(_)&&(l=o[_],l!=null&&pt(n,i,_,l,o,null))}function oM(n,i,o,l){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,h=null,b=null,_=null,U=null,Z=null,ue=null;for(re in o){var he=o[re];if(o.hasOwnProperty(re)&&he!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":U=he;default:l.hasOwnProperty(re)||pt(n,i,re,null,l,he)}}for(var J in l){var re=l[J];if(he=o[J],l.hasOwnProperty(J)&&(re!=null||he!=null))switch(J){case"type":h=re;break;case"name":f=re;break;case"checked":Z=re;break;case"defaultChecked":ue=re;break;case"value":b=re;break;case"defaultValue":_=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(r(137,i));break;default:re!==he&&pt(n,i,J,re,l,he)}}Of(n,b,_,U,Z,ue,h,f);return;case"select":re=b=_=J=null;for(h in o)if(U=o[h],o.hasOwnProperty(h)&&U!=null)switch(h){case"value":break;case"multiple":re=U;default:l.hasOwnProperty(h)||pt(n,i,h,null,l,U)}for(f in l)if(h=l[f],U=o[f],l.hasOwnProperty(f)&&(h!=null||U!=null))switch(f){case"value":J=h;break;case"defaultValue":_=h;break;case"multiple":b=h;default:h!==U&&pt(n,i,f,h,l,U)}i=_,o=b,l=re,J!=null?co(n,!!o,J,!1):!!l!=!!o&&(i!=null?co(n,!!o,i,!0):co(n,!!o,o?[]:"",!1));return;case"textarea":re=J=null;for(_ in o)if(f=o[_],o.hasOwnProperty(_)&&f!=null&&!l.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:pt(n,i,_,null,l,f)}for(b in l)if(f=l[b],h=o[b],l.hasOwnProperty(b)&&(f!=null||h!=null))switch(b){case"value":J=f;break;case"defaultValue":re=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:f!==h&&pt(n,i,b,f,l,h)}Zb(n,J,re);return;case"option":for(var Ae in o)if(J=o[Ae],o.hasOwnProperty(Ae)&&J!=null&&!l.hasOwnProperty(Ae))switch(Ae){case"selected":n.selected=!1;break;default:pt(n,i,Ae,null,l,J)}for(U in l)if(J=l[U],re=o[U],l.hasOwnProperty(U)&&J!==re&&(J!=null||re!=null))switch(U){case"selected":n.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:pt(n,i,U,J,l,re)}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 Ue in o)J=o[Ue],o.hasOwnProperty(Ue)&&J!=null&&!l.hasOwnProperty(Ue)&&pt(n,i,Ue,null,l,J);for(Z in l)if(J=l[Z],re=o[Z],l.hasOwnProperty(Z)&&J!==re&&(J!=null||re!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,i));break;default:pt(n,i,Z,J,l,re)}return;default:if(Nf(i)){for(var yt in o)J=o[yt],o.hasOwnProperty(yt)&&J!==void 0&&!l.hasOwnProperty(yt)&&pm(n,i,yt,void 0,l,J);for(ue in l)J=l[ue],re=o[ue],!l.hasOwnProperty(ue)||J===re||J===void 0&&re===void 0||pm(n,i,ue,J,l,re);return}}for(var G in o)J=o[G],o.hasOwnProperty(G)&&J!=null&&!l.hasOwnProperty(G)&&pt(n,i,G,null,l,J);for(he in l)J=l[he],re=o[he],!l.hasOwnProperty(he)||J===re||J==null&&re==null||pt(n,i,he,J,l,re)}function tx(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sM(){if(typeof performance.getEntriesByType=="function"){for(var n=0,i=0,o=performance.getEntriesByType("resource"),l=0;l<o.length;l++){var f=o[l],h=f.transferSize,b=f.initiatorType,_=f.duration;if(h&&_&&tx(b)){for(b=0,_=f.responseEnd,l+=1;l<o.length;l++){var U=o[l],Z=U.startTime;if(Z>_)break;var ue=U.transferSize,he=U.initiatorType;ue&&tx(he)&&(U=U.responseEnd,b+=ue*(U<_?1:(_-Z)/(U-Z)))}if(--l,i+=8*(h+b)/(f.duration/1e3),n++,10<n)break}}if(0<n)return i/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var ym=null,gm=null;function Ou(n){return n.nodeType===9?n:n.ownerDocument}function nx(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function ix(n,i){if(n===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&i==="foreignObject"?0:n}function bm(n,i){return n==="textarea"||n==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var vm=null;function lM(){var n=window.event;return n&&n.type==="popstate"?n===vm?!1:(vm=n,!0):(vm=null,!1)}var ax=typeof setTimeout=="function"?setTimeout:void 0,cM=typeof clearTimeout=="function"?clearTimeout:void 0,rx=typeof Promise=="function"?Promise:void 0,uM=typeof queueMicrotask=="function"?queueMicrotask:typeof rx<"u"?function(n){return rx.resolve(null).then(n).catch(dM)}:ax;function dM(n){setTimeout(function(){throw n})}function ka(n){return n==="head"}function ox(n,i){var o=i,l=0;do{var f=o.nextSibling;if(n.removeChild(o),f&&f.nodeType===8)if(o=f.data,o==="/$"||o==="/&"){if(l===0){n.removeChild(f),qo(i);return}l--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")l++;else if(o==="html")vl(n.ownerDocument.documentElement);else if(o==="head"){o=n.ownerDocument.head,vl(o);for(var h=o.firstChild;h;){var b=h.nextSibling,_=h.nodeName;h[$s]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&h.rel.toLowerCase()==="stylesheet"||o.removeChild(h),h=b}}else o==="body"&&vl(n.ownerDocument.body);o=f}while(o);qo(i)}function sx(n,i){var o=n;n=0;do{var l=o.nextSibling;if(o.nodeType===1?i?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(i?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),l&&l.nodeType===8)if(o=l.data,o==="/$"){if(n===0)break;n--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||n++;o=l}while(o)}function xm(n){var i=n.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var o=i;switch(i=i.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":xm(o),Ef(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}n.removeChild(o)}}function fM(n,i,o,l){for(;n.nodeType===1;){var f=o;if(n.nodeName.toLowerCase()!==i.toLowerCase()){if(!l&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(l){if(!n[$s])switch(i){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(h=n.getAttribute("rel"),h==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(h!==f.rel||n.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||n.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||n.getAttribute("title")!==(f.title==null?null:f.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(h=n.getAttribute("src"),(h!==(f.src==null?null:f.src)||n.getAttribute("type")!==(f.type==null?null:f.type)||n.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&h&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(i==="input"&&n.type==="hidden"){var h=f.name==null?null:""+f.name;if(f.type==="hidden"&&n.getAttribute("name")===h)return n}else return n;if(n=Jn(n.nextSibling),n===null)break}return null}function hM(n,i,o){if(i==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=Jn(n.nextSibling),n===null))return null;return n}function lx(n,i){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=Jn(n.nextSibling),n===null))return null;return n}function wm(n){return n.data==="$?"||n.data==="$~"}function km(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function mM(n,i){var o=n.ownerDocument;if(n.data==="$~")n._reactRetry=i;else if(n.data!=="$?"||o.readyState!=="loading")i();else{var l=function(){i(),o.removeEventListener("DOMContentLoaded",l)};o.addEventListener("DOMContentLoaded",l),n._reactRetry=l}}function Jn(n){for(;n!=null;n=n.nextSibling){var i=n.nodeType;if(i===1||i===3)break;if(i===8){if(i=n.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return n}var _m=null;function cx(n){n=n.nextSibling;for(var i=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"||o==="/&"){if(i===0)return Jn(n.nextSibling);i--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||i++}n=n.nextSibling}return null}function ux(n){n=n.previousSibling;for(var i=0;n;){if(n.nodeType===8){var o=n.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(i===0)return n;i--}else o!=="/$"&&o!=="/&"||i++}n=n.previousSibling}return null}function dx(n,i,o){switch(i=Ou(o),n){case"html":if(n=i.documentElement,!n)throw Error(r(452));return n;case"head":if(n=i.head,!n)throw Error(r(453));return n;case"body":if(n=i.body,!n)throw Error(r(454));return n;default:throw Error(r(451))}}function vl(n){for(var i=n.attributes;i.length;)n.removeAttributeNode(i[0]);Ef(n)}var ei=new Map,fx=new Set;function Au(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Vi=V.d;V.d={f:pM,r:yM,D:gM,C:bM,L:vM,m:xM,X:kM,S:wM,M:_M};function pM(){var n=Vi.f(),i=vu();return n||i}function yM(n){var i=oo(n);i!==null&&i.tag===5&&i.type==="form"?Nv(i):Vi.r(n)}var Io=typeof document>"u"?null:document;function hx(n,i,o){var l=Io;if(l&&typeof i=="string"&&i){var f=Gn(i);f='link[rel="'+n+'"][href="'+f+'"]',typeof o=="string"&&(f+='[crossorigin="'+o+'"]'),fx.has(f)||(fx.add(f),n={rel:n,crossOrigin:o,href:i},l.querySelector(f)===null&&(i=l.createElement("link"),rn(i,"link",n),Wt(i),l.head.appendChild(i)))}}function gM(n){Vi.D(n),hx("dns-prefetch",n,null)}function bM(n,i){Vi.C(n,i),hx("preconnect",n,i)}function vM(n,i,o){Vi.L(n,i,o);var l=Io;if(l&&n&&i){var f='link[rel="preload"][as="'+Gn(i)+'"]';i==="image"&&o&&o.imageSrcSet?(f+='[imagesrcset="'+Gn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(f+='[imagesizes="'+Gn(o.imageSizes)+'"]')):f+='[href="'+Gn(n)+'"]';var h=f;switch(i){case"style":h=Bo(n);break;case"script":h=Ho(n)}ei.has(h)||(n=g({rel:"preload",href:i==="image"&&o&&o.imageSrcSet?void 0:n,as:i},o),ei.set(h,n),l.querySelector(f)!==null||i==="style"&&l.querySelector(xl(h))||i==="script"&&l.querySelector(wl(h))||(i=l.createElement("link"),rn(i,"link",n),Wt(i),l.head.appendChild(i)))}}function xM(n,i){Vi.m(n,i);var o=Io;if(o&&n){var l=i&&typeof i.as=="string"?i.as:"script",f='link[rel="modulepreload"][as="'+Gn(l)+'"][href="'+Gn(n)+'"]',h=f;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Ho(n)}if(!ei.has(h)&&(n=g({rel:"modulepreload",href:n},i),ei.set(h,n),o.querySelector(f)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(wl(h)))return}l=o.createElement("link"),rn(l,"link",n),Wt(l),o.head.appendChild(l)}}}function wM(n,i,o){Vi.S(n,i,o);var l=Io;if(l&&n){var f=so(l).hoistableStyles,h=Bo(n);i=i||"default";var b=f.get(h);if(!b){var _={loading:0,preload:null};if(b=l.querySelector(xl(h)))_.loading=5;else{n=g({rel:"stylesheet",href:n,"data-precedence":i},o),(o=ei.get(h))&&Sm(n,o);var U=b=l.createElement("link");Wt(U),rn(U,"link",n),U._p=new Promise(function(Z,ue){U.onload=Z,U.onerror=ue}),U.addEventListener("load",function(){_.loading|=1}),U.addEventListener("error",function(){_.loading|=2}),_.loading|=4,Nu(b,i,l)}b={type:"stylesheet",instance:b,count:1,state:_},f.set(h,b)}}}function kM(n,i){Vi.X(n,i);var o=Io;if(o&&n){var l=so(o).hoistableScripts,f=Ho(n),h=l.get(f);h||(h=o.querySelector(wl(f)),h||(n=g({src:n,async:!0},i),(i=ei.get(f))&&Em(n,i),h=o.createElement("script"),Wt(h),rn(h,"link",n),o.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},l.set(f,h))}}function _M(n,i){Vi.M(n,i);var o=Io;if(o&&n){var l=so(o).hoistableScripts,f=Ho(n),h=l.get(f);h||(h=o.querySelector(wl(f)),h||(n=g({src:n,async:!0,type:"module"},i),(i=ei.get(f))&&Em(n,i),h=o.createElement("script"),Wt(h),rn(h,"link",n),o.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},l.set(f,h))}}function mx(n,i,o,l){var f=(f=pe.current)?Au(f):null;if(!f)throw Error(r(446));switch(n){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(i=Bo(o.href),o=so(f).hoistableStyles,l=o.get(i),l||(l={type:"style",instance:null,count:0,state:null},o.set(i,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){n=Bo(o.href);var h=so(f).hoistableStyles,b=h.get(n);if(b||(f=f.ownerDocument||f,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(n,b),(h=f.querySelector(xl(n)))&&!h._p&&(b.instance=h,b.state.loading=5),ei.has(n)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},ei.set(n,o),h||SM(f,n,o,b.state))),i&&l===null)throw Error(r(528,""));return b}if(i&&l!==null)throw Error(r(529,""));return null;case"script":return i=o.async,o=o.src,typeof o=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Ho(o),o=so(f).hoistableScripts,l=o.get(i),l||(l={type:"script",instance:null,count:0,state:null},o.set(i,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,n))}}function Bo(n){return'href="'+Gn(n)+'"'}function xl(n){return'link[rel="stylesheet"]['+n+"]"}function px(n){return g({},n,{"data-precedence":n.precedence,precedence:null})}function SM(n,i,o,l){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?l.loading=1:(i=n.createElement("link"),l.preload=i,i.addEventListener("load",function(){return l.loading|=1}),i.addEventListener("error",function(){return l.loading|=2}),rn(i,"link",o),Wt(i),n.head.appendChild(i))}function Ho(n){return'[src="'+Gn(n)+'"]'}function wl(n){return"script[async]"+n}function yx(n,i,o){if(i.count++,i.instance===null)switch(i.type){case"style":var l=n.querySelector('style[data-href~="'+Gn(o.href)+'"]');if(l)return i.instance=l,Wt(l),l;var f=g({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return l=(n.ownerDocument||n).createElement("style"),Wt(l),rn(l,"style",f),Nu(l,o.precedence,n),i.instance=l;case"stylesheet":f=Bo(o.href);var h=n.querySelector(xl(f));if(h)return i.state.loading|=4,i.instance=h,Wt(h),h;l=px(o),(f=ei.get(f))&&Sm(l,f),h=(n.ownerDocument||n).createElement("link"),Wt(h);var b=h;return b._p=new Promise(function(_,U){b.onload=_,b.onerror=U}),rn(h,"link",l),i.state.loading|=4,Nu(h,o.precedence,n),i.instance=h;case"script":return h=Ho(o.src),(f=n.querySelector(wl(h)))?(i.instance=f,Wt(f),f):(l=o,(f=ei.get(h))&&(l=g({},o),Em(l,f)),n=n.ownerDocument||n,f=n.createElement("script"),Wt(f),rn(f,"link",l),n.head.appendChild(f),i.instance=f);case"void":return null;default:throw Error(r(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(l=i.instance,i.state.loading|=4,Nu(l,o.precedence,n));return i.instance}function Nu(n,i,o){for(var l=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=l.length?l[l.length-1]:null,h=f,b=0;b<l.length;b++){var _=l[b];if(_.dataset.precedence===i)h=_;else if(h!==f)break}h?h.parentNode.insertBefore(n,h.nextSibling):(i=o.nodeType===9?o.head:o,i.insertBefore(n,i.firstChild))}function Sm(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.title==null&&(n.title=i.title)}function Em(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.integrity==null&&(n.integrity=i.integrity)}var Mu=null;function gx(n,i,o){if(Mu===null){var l=new Map,f=Mu=new Map;f.set(o,l)}else f=Mu,l=f.get(o),l||(l=new Map,f.set(o,l));if(l.has(n))return l;for(l.set(n,null),o=o.getElementsByTagName(n),f=0;f<o.length;f++){var h=o[f];if(!(h[$s]||h[Ot]||n==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var b=h.getAttribute(i)||"";b=n+b;var _=l.get(b);_?_.push(h):l.set(b,[h])}}return l}function bx(n,i,o){n=n.ownerDocument||n,n.head.insertBefore(o,i==="title"?n.querySelector("head > title"):null)}function EM(n,i,o){if(o===1||i.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return n=i.disabled,typeof i.precedence=="string"&&n==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function vx(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function jM(n,i,o,l){if(o.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var f=Bo(l.href),h=i.querySelector(xl(f));if(h){i=h._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=Cu.bind(n),i.then(n,n)),o.state.loading|=4,o.instance=h,Wt(h);return}h=i.ownerDocument||i,l=px(l),(f=ei.get(f))&&Sm(l,f),h=h.createElement("link"),Wt(h);var b=h;b._p=new Promise(function(_,U){b.onload=_,b.onerror=U}),rn(h,"link",l),o.instance=h}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(o,i),(i=o.state.preload)&&(o.state.loading&3)===0&&(n.count++,o=Cu.bind(n),i.addEventListener("load",o),i.addEventListener("error",o))}}var jm=0;function OM(n,i){return n.stylesheets&&n.count===0&&Tu(n,n.stylesheets),0<n.count||0<n.imgCount?function(o){var l=setTimeout(function(){if(n.stylesheets&&Tu(n,n.stylesheets),n.unsuspend){var h=n.unsuspend;n.unsuspend=null,h()}},6e4+i);0<n.imgBytes&&jm===0&&(jm=62500*sM());var f=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Tu(n,n.stylesheets),n.unsuspend)){var h=n.unsuspend;n.unsuspend=null,h()}},(n.imgBytes>jm?50:800)+i);return n.unsuspend=o,function(){n.unsuspend=null,clearTimeout(l),clearTimeout(f)}}:null}function Cu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Tu(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Ru=null;function Tu(n,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Ru=new Map,i.forEach(AM,n),Ru=null,Cu.call(n))}function AM(n,i){if(!(i.state.loading&4)){var o=Ru.get(n);if(o)var l=o.get(null);else{o=new Map,Ru.set(n,o);for(var f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<f.length;h++){var b=f[h];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(o.set(b.dataset.precedence,b),l=b)}l&&o.set(null,l)}f=i.instance,b=f.getAttribute("data-precedence"),h=o.get(b)||l,h===l&&o.set(null,f),o.set(b,f),this.count++,l=Cu.bind(this),f.addEventListener("load",l),f.addEventListener("error",l),h?h.parentNode.insertBefore(f,h.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(f,n.firstChild)),i.state.loading|=4}}var kl={$$typeof:O,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function NM(n,i,o,l,f,h,b,_,U){this.tag=1,this.containerInfo=n,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=Oi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oi(0),this.hiddenUpdates=Oi(null),this.identifierPrefix=l,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function xx(n,i,o,l,f,h,b,_,U,Z,ue,he){return n=new NM(n,i,o,b,U,Z,ue,he,_),i=1,h===!0&&(i|=24),h=Cn(3,null,null,i),n.current=h,h.stateNode=n,i=rh(),i.refCount++,n.pooledCache=i,i.refCount++,h.memoizedState={element:l,isDehydrated:o,cache:i},ch(h),n}function wx(n){return n?(n=bo,n):bo}function kx(n,i,o,l,f,h){f=wx(f),l.context===null?l.context=f:l.pendingContext=f,l=da(i),l.payload={element:o},h=h===void 0?null:h,h!==null&&(l.callback=h),o=fa(n,l,i),o!==null&&(_n(o,n,i),el(o,n,i))}function _x(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<i?o:i}}function Om(n,i){_x(n,i),(n=n.alternate)&&_x(n,i)}function Sx(n){if(n.tag===13||n.tag===31){var i=fr(n,67108864);i!==null&&_n(i,n,67108864),Om(n,67108864)}}function Ex(n){if(n.tag===13||n.tag===31){var i=zn();i=_e(i);var o=fr(n,i);o!==null&&_n(o,n,i),Om(n,i)}}var Du=!0;function MM(n,i,o,l){var f=N.T;N.T=null;var h=V.p;try{V.p=2,Am(n,i,o,l)}finally{V.p=h,N.T=f}}function CM(n,i,o,l){var f=N.T;N.T=null;var h=V.p;try{V.p=8,Am(n,i,o,l)}finally{V.p=h,N.T=f}}function Am(n,i,o,l){if(Du){var f=Nm(l);if(f===null)mm(n,i,l,Lu,o),Ox(n,l);else if(TM(f,n,i,o,l))l.stopPropagation();else if(Ox(n,l),i&4&&-1<RM.indexOf(n)){for(;f!==null;){var h=oo(f);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var b=_t(h.pendingLanes);if(b!==0){var _=h;for(_.pendingLanes|=2,_.entangledLanes|=2;b;){var U=1<<31-be(b);_.entanglements[1]|=U,b&=~U}yi(h),(st&6)===0&&(gu=gt()+500,yl(0))}}break;case 31:case 13:_=fr(h,2),_!==null&&_n(_,h,2),vu(),Om(h,2)}if(h=Nm(l),h===null&&mm(n,i,l,Lu,o),h===f)break;f=h}f!==null&&l.stopPropagation()}else mm(n,i,l,null,o)}}function Nm(n){return n=Cf(n),Mm(n)}var Lu=null;function Mm(n){if(Lu=null,n=ro(n),n!==null){var i=c(n);if(i===null)n=null;else{var o=i.tag;if(o===13){if(n=u(i),n!==null)return n;n=null}else if(o===31){if(n=m(i),n!==null)return n;n=null}else if(o===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;n=null}else i!==n&&(n=null)}}return Lu=n,null}function jx(n){switch(n){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(aa()){case di:return 2;case ii:return 8;case we:case Te:return 32;case Ce:return 268435456;default:return 32}default:return 32}}var Cm=!1,_a=null,Sa=null,Ea=null,_l=new Map,Sl=new Map,ja=[],RM="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 Ox(n,i){switch(n){case"focusin":case"focusout":_a=null;break;case"dragenter":case"dragleave":Sa=null;break;case"mouseover":case"mouseout":Ea=null;break;case"pointerover":case"pointerout":_l.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Sl.delete(i.pointerId)}}function El(n,i,o,l,f,h){return n===null||n.nativeEvent!==h?(n={blockedOn:i,domEventName:o,eventSystemFlags:l,nativeEvent:h,targetContainers:[f]},i!==null&&(i=oo(i),i!==null&&Sx(i)),n):(n.eventSystemFlags|=l,i=n.targetContainers,f!==null&&i.indexOf(f)===-1&&i.push(f),n)}function TM(n,i,o,l,f){switch(i){case"focusin":return _a=El(_a,n,i,o,l,f),!0;case"dragenter":return Sa=El(Sa,n,i,o,l,f),!0;case"mouseover":return Ea=El(Ea,n,i,o,l,f),!0;case"pointerover":var h=f.pointerId;return _l.set(h,El(_l.get(h)||null,n,i,o,l,f)),!0;case"gotpointercapture":return h=f.pointerId,Sl.set(h,El(Sl.get(h)||null,n,i,o,l,f)),!0}return!1}function Ax(n){var i=ro(n.target);if(i!==null){var o=c(i);if(o!==null){if(i=o.tag,i===13){if(i=u(o),i!==null){n.blockedOn=i,nt(n.priority,function(){Ex(o)});return}}else if(i===31){if(i=m(o),i!==null){n.blockedOn=i,nt(n.priority,function(){Ex(o)});return}}else if(i===3&&o.stateNode.current.memoizedState.isDehydrated){n.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}n.blockedOn=null}function zu(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var o=Nm(n.nativeEvent);if(o===null){o=n.nativeEvent;var l=new o.constructor(o.type,o);Mf=l,o.target.dispatchEvent(l),Mf=null}else return i=oo(o),i!==null&&Sx(i),n.blockedOn=o,!1;i.shift()}return!0}function Nx(n,i,o){zu(n)&&o.delete(i)}function DM(){Cm=!1,_a!==null&&zu(_a)&&(_a=null),Sa!==null&&zu(Sa)&&(Sa=null),Ea!==null&&zu(Ea)&&(Ea=null),_l.forEach(Nx),Sl.forEach(Nx)}function $u(n,i){n.blockedOn===i&&(n.blockedOn=null,Cm||(Cm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,DM)))}var Uu=null;function Mx(n){Uu!==n&&(Uu=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Uu===n&&(Uu=null);for(var i=0;i<n.length;i+=3){var o=n[i],l=n[i+1],f=n[i+2];if(typeof l!="function"){if(Mm(l||o)===null)continue;break}var h=oo(o);h!==null&&(n.splice(i,3),i-=3,Nh(h,{pending:!0,data:f,method:o.method,action:l},l,f))}}))}function qo(n){function i(U){return $u(U,n)}_a!==null&&$u(_a,n),Sa!==null&&$u(Sa,n),Ea!==null&&$u(Ea,n),_l.forEach(i),Sl.forEach(i);for(var o=0;o<ja.length;o++){var l=ja[o];l.blockedOn===n&&(l.blockedOn=null)}for(;0<ja.length&&(o=ja[0],o.blockedOn===null);)Ax(o),o.blockedOn===null&&ja.shift();if(o=(n.ownerDocument||n).$$reactFormReplay,o!=null)for(l=0;l<o.length;l+=3){var f=o[l],h=o[l+1],b=f[gn]||null;if(typeof h=="function")b||Mx(o);else if(b){var _=null;if(h&&h.hasAttribute("formAction")){if(f=h,b=h[gn]||null)_=b.formAction;else if(Mm(f)!==null)continue}else _=b.action;typeof _=="function"?o[l+1]=_:(o.splice(l,3),l-=3),Mx(o)}}}function Cx(){function n(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(b){return f=b})},focusReset:"manual",scroll:"manual"})}function i(){f!==null&&(f(),f=null),l||setTimeout(o,20)}function o(){if(!l&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,f=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(o,100),function(){l=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),f!==null&&(f(),f=null)}}}function Rm(n){this._internalRoot=n}Iu.prototype.render=Rm.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(r(409));var o=i.current,l=zn();kx(o,l,n,i,null,null)},Iu.prototype.unmount=Rm.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;kx(n.current,2,null,n,null,null),vu(),i[ao]=null}};function Iu(n){this._internalRoot=n}Iu.prototype.unstable_scheduleHydration=function(n){if(n){var i=At();n={blockedOn:null,target:n,priority:i};for(var o=0;o<ja.length&&i!==0&&i<ja[o].priority;o++);ja.splice(o,0,n),o===0&&Ax(n)}};var Rx=t.version;if(Rx!=="19.2.6")throw Error(r(527,Rx,"19.2.6"));V.findDOMNode=function(n){var i=n._reactInternals;if(i===void 0)throw typeof n.render=="function"?Error(r(188)):(n=Object.keys(n).join(","),Error(r(268,n)));return n=y(i),n=n!==null?v(n):null,n=n===null?null:n.stateNode,n};var LM={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bu.isDisabled&&Bu.supportsFiber)try{Qt=Bu.inject(LM),ut=Bu}catch{}}return Ol.createRoot=function(n,i){if(!s(n))throw Error(r(299));var o=!1,l="",f=Iv,h=Bv,b=Hv;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(l=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(h=i.onCaughtError),i.onRecoverableError!==void 0&&(b=i.onRecoverableError)),i=xx(n,1,!1,null,null,o,l,null,f,h,b,Cx),n[ao]=i.current,hm(n),new Rm(i)},Ol.hydrateRoot=function(n,i,o){if(!s(n))throw Error(r(299));var l=!1,f="",h=Iv,b=Bv,_=Hv,U=null;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onUncaughtError!==void 0&&(h=o.onUncaughtError),o.onCaughtError!==void 0&&(b=o.onCaughtError),o.onRecoverableError!==void 0&&(_=o.onRecoverableError),o.formState!==void 0&&(U=o.formState)),i=xx(n,1,!0,i,o??null,l,f,U,h,b,_,Cx),i.context=wx(null),o=i.current,l=zn(),l=_e(l),f=da(l),f.callback=null,fa(o,f,l),o=l,i.current.lanes=o,ai(i,o),yi(i),n[ao]=i.current,hm(n),new Iu(i)},Ol.version="19.2.6",Ol}var Fx;function VM(){if(Fx)return zm.exports;Fx=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),zm.exports=PM(),zm.exports}var GM=VM();function KM(e){if(!e)return null;const t=e.split("~"),a=t[0];if(!a)return null;if(t.length===1)return{kind:"section",instanceId:a};const r=t[1];if(!r)return null;const s=t[2],c=s!==void 0?Number(s):NaN;return{kind:"slot",instanceId:a,slotId:r,...Number.isInteger(c)?{itemIndex:c}:{}}}function YM(e){if(!e)return null;if(e.kind==="section")return e.instanceId;const t=`${e.instanceId}~${e.slotId}`;return e.itemIndex!==void 0?`${t}~${e.itemIndex}`:t}function QM(e,t){const a=new URL(t).pathname,r=a.endsWith("/")?a:`${a}/`;return`${e}/`===r?"":e.startsWith(r)?e.slice(r.length):null}function XM(e,t){const[a,r,s,c,...u]=e.split("/").filter(Boolean);if(a!=="fixtures"||!r||s!=="canvas"||u.length>0)return null;const m=new URLSearchParams(t);return{fixture:decodeURIComponent(r),canvasId:c?decodeURIComponent(c):null,format:m.get("format"),selection:KM(m.get("sel"))}}function ZM(e){var a;const t=e.fixtures[0];return t===void 0?null:{fixture:t.id,canvasId:((a=e.template.canvases[0])==null?void 0:a.id)??null,format:null,selection:null}}function Px(e){const t=e.canvasId===null?"canvas":`canvas/${encodeURIComponent(e.canvasId)}`,a=`fixtures/${encodeURIComponent(e.fixture)}/${t}`,r=new URLSearchParams;e.format!==null&&r.set("format",e.format);const s=YM(e.selection);s&&r.set("sel",s);const c=r.toString();return c?`${a}?${c}`:a}function V2(e,t){var a;return((a=e.parentElement)==null?void 0:a.closest(`[${t.slotId}],[${t.slotField}]`))??null}function Zi(e,t){return!e.hasAttribute(t.slotUnselectable)}function G2(e,t,a,r){const s=[];for(const c of Array.from(e.querySelectorAll(t)))V2(c,r)===a&&s.push(c);return s}function Ey(e,t,a){return G2(e,`[${a.slotItem}="${String(t)}"]`,e,a)}function Vx(e,t,a,r){var c;let s=e.closest(`[${t}]`);for(;s&&a.contains(s);){if(Zi(s,r)&&V2(s,r)===a)return s;s=((c=s.parentElement)==null?void 0:c.closest(`[${t}]`))??null}return null}const Bm=1,WM=12;function JM(e,t){return{"--we-r-top":`${e.top}px`,"--we-r-left":`${e.left}px`,"--we-r-w":`${e.width}px`,"--we-r-h":`${e.height}px`,"--we-r-off":`${t}px`}}function eC(e){const t=zd(e);return t.width<=0||t.height<=0?!1:!tC(e,t)}function Gx(e){return e==="hidden"||e==="scroll"||e==="auto"||e==="clip"}function tC(e,t){const a=e.ownerDocument.defaultView;if(!a)return!1;let r=-1/0,s=-1/0,c=1/0,u=1/0;for(let y=e.parentElement;y;y=y.parentElement){const v=a.getComputedStyle(y),g=Gx(v.overflowX||v.overflow),w=Gx(v.overflowY||v.overflow);if(!g&&!w)continue;const k=y.getBoundingClientRect();g&&(s=Math.max(s,k.left),c=Math.min(c,k.right)),w&&(r=Math.max(r,k.top),u=Math.min(u,k.bottom))}const m=t.left+t.width<=s||t.left>=c,p=t.top+t.height<=r||t.top>=u;return m||p}function zd(e){const t=e.getBoundingClientRect();if(t.width>0&&t.height>0)return t;let a=1/0,r=1/0,s=-1/0,c=-1/0,u=!1;for(const m of Array.from(e.children)){const p=zd(m);p.width<=0||p.height<=0||(u=!0,a=Math.min(a,p.top),r=Math.min(r,p.left),s=Math.max(s,p.right),c=Math.max(c,p.bottom))}return u?new DOMRect(r,a,s-r,c-a):t}function K2(e,t,a,r){if(!e)return;if(!t){td(e);return}const s=JM(zd(t),a);for(const[c,u]of Object.entries(s))e.style.setProperty(c,u);r&&e.setAttribute("data-kind",r),e.setAttribute("data-active","true")}function td(e){e&&(e.removeAttribute("data-active"),e.removeAttribute("data-kind"))}function Kx(e,t,a,r){if(!e)return[];const s=e.ownerDocument,c=Array.from(e.querySelectorAll(".we-chrome-ring--selection")),u=e.querySelector(":scope > .we-chrome-label");for(;c.length<t.length;){const m=s.createElement("div");m.className="we-chrome-ring we-chrome-ring--selection",e.insertBefore(m,u),c.push(m)}c.forEach((m,p)=>K2(m,t[p]??null,a,r));for(const m of c.slice(Math.max(t.length,1)))m.remove();return c.slice(0,t.length)}function nC(e,t,a){if(!e)return;if(!t||!a){gp(e);return}const r=zd(t),s=e.getAttribute("data-active")==="true",c=e.textContent!==a;e.textContent=a,e.style.setProperty("--we-l-top",`${r.top}px`),e.style.setProperty("--we-l-left",`${r.left}px`),e.style.setProperty("--we-l-indent",`${WM}px`),s&&c&&(e.removeAttribute("data-active"),e.offsetWidth),e.setAttribute("data-active","true")}function gp(e){e&&(e.removeAttribute("data-active"),e.textContent="")}function Pr(e){return typeof CSS<"u"&&CSS.escape?CSS.escape(e):e.replace(/[^a-zA-Z0-9_-]/g,t=>`\\${t}`)}function jy(e){const t=e.filter(a=>eC(a));return t.length>0?t:e.slice(0,1)}function Y2(e,t,a){const r=Array.from(e.querySelectorAll(`[${a.slotId}="${Pr(t)}"]`)).filter(s=>Zi(s,a));return jy(r)}function iC(e,t,a){if(!t||t.kind!=="slot"||t.item_index==null)return[];const r=[];for(const s of e)r.push(...Ey(s,t.item_index,a).filter(c=>Zi(c,a)));return jy(r)}function Q2(e,t,a){if(!t)return[];const r=e.querySelector(`[${a.sectionInstanceId}="${Pr(t.instance_id)}"]`);if(!r)return[];if(t.kind==="section")return[r];const s=Y2(r,t.slot_id,a);if(s.length===0)return[];if(t.item_index!=null||t.field_name){const c=t.field_name?`[${a.slotField}="${Pr(t.field_name)}"]`:null,u=[];for(const m of s){let p=[m];if(!(t.item_index!=null&&(p=Ey(m,t.item_index,a).filter(y=>Zi(y,a)),p.length===0)))for(const y of p)if(c){const v=G2(y,c,m,a).filter(g=>Zi(g,a));if(v.length>0){u.push(...v);continue}y!==m&&u.push(y)}else u.push(y)}if(u.length>0)return jy(u)}return s.map(c=>{const u=c.closest(`[${a.slotGroup}]`);return u&&Zi(u,a)?u:c})}function aC(e,t,a){return Q2(e,t,a)[0]??null}const Yx="we-enh-shield",rC="we-enh-shield--item",Vo="data-we-live";function oC(e,t,a){if(!t||t.kind!=="slot"||t.item_index==null)return[];const r=[];for(const s of X2(e,t,a))r.push(...Ey(s,t.item_index,a).filter(c=>Zi(c,a)));return r}function X2(e,t,a){if(!t||t.kind!=="slot")return[];const r=e.querySelector(`[${a.sectionInstanceId}="${Pr(t.instance_id)}"]`);return r?Array.from(r.querySelectorAll(`[${a.slotId}="${Pr(t.slot_id)}"]`)):[]}function sC(e,t,a){if(e.querySelectorAll(`[${Vo}]`).forEach(s=>s.removeAttribute(Vo)),!t)return;const r=e.querySelector(`[${a.sectionInstanceId}="${Pr(t.instance_id)}"]`);if(r)if(t.kind==="section")r.setAttribute(Vo,"true");else{const s=oC(e,t,a),c=s.length>0?s:X2(e,t,a).filter(u=>Zi(u,a));for(const u of c)u.setAttribute(Vo,"true")}}const Hr=1440,Qx=Math.round(Hr*9/16),Z2=14,Oy="we-frame-defaults";function lC(e){return`
|
|
50
|
-
/* Section wrapper -- structure only. No selection chrome here;
|
|
51
|
-
rings are painted by the host's overlay. Zero margin
|
|
52
|
-
+ padding means sections butt edge-to-edge, matching publisher. */
|
|
53
|
-
[${e}] {
|
|
54
|
-
position: relative;
|
|
55
|
-
margin: 0;
|
|
56
|
-
padding: 0;
|
|
57
|
-
cursor: pointer;
|
|
58
|
-
display: grid;
|
|
59
|
-
grid-template-rows: 1fr;
|
|
60
|
-
/* Reveal transition — governs the hidden→visible direction because
|
|
61
|
-
CSS uses the destination state's transition property. Spring easing
|
|
62
|
-
gives a snappy entrance. */
|
|
63
|
-
transition:
|
|
64
|
-
grid-template-rows 200ms cubic-bezier(0.16, 1, 0.3, 1),
|
|
65
|
-
opacity 180ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/* Hidden state -- collapse the section out of the page so it reflows shut.
|
|
69
|
-
The 0-height wrapper stays in flow as the anchor for the section's
|
|
70
|
-
floating edge tab (built by the host in its own document). */
|
|
71
|
-
[${e}][data-hidden="true"] {
|
|
72
|
-
grid-template-rows: 0fr;
|
|
73
|
-
opacity: 0;
|
|
74
|
-
pointer-events: none;
|
|
75
|
-
/* Collapse transition — governs the visible→hidden direction.
|
|
76
|
-
Faster + accelerating so the hide feels decisive. */
|
|
77
|
-
transition:
|
|
78
|
-
grid-template-rows 150ms cubic-bezier(0.4, 0, 1, 1),
|
|
79
|
-
opacity 120ms cubic-bezier(0.4, 0, 1, 1);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/* Per-section body holds the API HTML.
|
|
83
|
-
1. position:relative gives the body a positioning context for any
|
|
84
|
-
body-scoped chrome or future body-only effects.
|
|
85
|
-
2. isolation:isolate SEALS the section's z-index hierarchy
|
|
86
|
-
inside this stacking context. Without it, any positioned
|
|
87
|
-
descendant with z-index > 0 (the header's sticky+z-50, a
|
|
88
|
-
dropdown's z-40, a sticky CTA) creates a stacking context
|
|
89
|
-
that escapes upward. Sections never need to know the
|
|
90
|
-
editor chrome exists -- internal z-index is unconstrained. */
|
|
91
|
-
/* overflow:hidden clips section content as the grid row collapses;
|
|
92
|
-
min-height:0 lets the grid child shrink below its content size.
|
|
93
|
-
Constraint: overflow:hidden is permanent (not just during animation), so
|
|
94
|
-
section content must not overflow its section-body boundary — sticky
|
|
95
|
-
elements, absolutely-positioned dropdowns, or shadows that bleed outside
|
|
96
|
-
the section edge will be silently clipped. Template sections are
|
|
97
|
-
self-contained blocks; this is safe in practice. */
|
|
98
|
-
.we-section-body { position: relative; isolation: isolate; overflow: hidden; min-height: 0; }`}function cC(e){return`
|
|
99
|
-
[${e}] {
|
|
100
|
-
display: contents;
|
|
101
|
-
/* Computed even while boxless, so the collapse below has a 1fr start
|
|
102
|
-
value to animate from the instant the hidden box appears. */
|
|
103
|
-
grid-template-rows: 1fr;
|
|
104
|
-
cursor: pointer;
|
|
105
|
-
}
|
|
106
|
-
[${e}] > .we-section-body { display: contents; }
|
|
107
|
-
|
|
108
|
-
/* Hidden state -- the wrapper takes a real box again: a zero-height grid
|
|
109
|
-
item in the frame column, collapsing the section out of the page while
|
|
110
|
-
staying in flow as the anchor for its edge tab. display is not
|
|
111
|
-
transitioned, so the box appears at 1fr immediately and the collapse
|
|
112
|
-
animates its full run; the reveal returns to display:contents at once —
|
|
113
|
-
a boxless wrapper has nothing to animate, so re-entry is instant by
|
|
114
|
-
design. */
|
|
115
|
-
[${e}][data-hidden="true"] {
|
|
116
|
-
display: grid;
|
|
117
|
-
grid-template-rows: 0fr;
|
|
118
|
-
opacity: 0;
|
|
119
|
-
pointer-events: none;
|
|
120
|
-
transition:
|
|
121
|
-
grid-template-rows 150ms cubic-bezier(0.4, 0, 1, 1),
|
|
122
|
-
opacity 120ms cubic-bezier(0.4, 0, 1, 1);
|
|
123
|
-
}
|
|
124
|
-
[${e}][data-hidden="true"] > .we-section-body {
|
|
125
|
-
display: block;
|
|
126
|
-
overflow: hidden;
|
|
127
|
-
min-height: 0;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/* The frame stylesheet imposes flex-shrink:0 on the column's items from
|
|
131
|
-
outside the section; with the wrapper boxless the section IS that item,
|
|
132
|
-
so the same imposition lands here. Layered so an author utility on the
|
|
133
|
-
section root still wins, exactly as it does against the stylesheet's own
|
|
134
|
-
copy of this rule. */
|
|
135
|
-
@layer ${Oy} {
|
|
136
|
-
[${e}] > .we-section-body > * { flex-shrink: 0; }
|
|
137
|
-
}`}function uC(e,t){const a=t?`#we-page {
|
|
138
|
-
padding: 0;
|
|
139
|
-
}`:`#we-page {
|
|
140
|
-
width: ${Hr}px;
|
|
141
|
-
min-height: ${Qx}px;
|
|
142
|
-
overflow: hidden;
|
|
143
|
-
border-radius: ${Z2}px;
|
|
144
|
-
background: #f5f3ee;
|
|
145
|
-
padding: 0;
|
|
146
|
-
}
|
|
147
|
-
/* The window this card stands for. The card's WIDTH is a real viewport, so
|
|
148
|
-
vw units and width queries need nothing from us; its HEIGHT is the page's
|
|
149
|
-
own measurement, which makes 100svh circular here — a section sized from it
|
|
150
|
-
asks for a window its own height is what produced, and climbs on every
|
|
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 Concrete's own
|
|
156
|
-
declaration of the token is unlayered too. A page box takes none of this —
|
|
157
|
-
a frame document is given the window its format declares, so 100svh there
|
|
158
|
-
is already the truth. */
|
|
159
|
-
:root {
|
|
160
|
-
--concrete-window-h: ${Qx}px;
|
|
161
|
-
}`;return`
|
|
162
|
-
html, body {
|
|
163
|
-
margin: 0;
|
|
164
|
-
/* The host owns the scroll container; this document never scrolls —
|
|
165
|
-
not even programmatically (overflow: clip pins scrollTop to 0), so a
|
|
166
|
-
transient gap while the host syncs the iframe's height to the page
|
|
167
|
-
can never flash a scrollbar or shift a measured rect. */
|
|
168
|
-
overflow: clip;
|
|
169
|
-
}
|
|
170
|
-
/* Document defaults, NOT document truth: the theme's own body mapping is
|
|
171
|
-
what the published page renders with, so it must win here too — fonts and
|
|
172
|
-
wraps in the frame diverge from capture otherwise. The layer (pre-declared
|
|
173
|
-
by the srcdoc, see FRAME_DEFAULTS_LAYER) is what makes these lose to any
|
|
174
|
-
template declaration. */
|
|
175
|
-
@layer ${Oy} {
|
|
176
|
-
html, body {
|
|
177
|
-
background: transparent;
|
|
178
|
-
}
|
|
179
|
-
body {
|
|
180
|
-
color: #14180F;
|
|
181
|
-
font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
${a}
|
|
185
|
-
${t?cC(e.sectionInstanceId):lC(e.sectionInstanceId)}
|
|
186
|
-
|
|
187
|
-
/* Slot wrapper -- structure only. No outline here; the host's overlay
|
|
188
|
-
ring handles slot hover + selection too. */
|
|
189
|
-
[${e.slotId}] {
|
|
190
|
-
cursor: pointer;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/* Slot-group container -- the gaps between grouped members (dividers,
|
|
194
|
-
padding) carry no slot id, so give the group container itself
|
|
195
|
-
the pointer cursor: the whole group reads as one clickable unit, and
|
|
196
|
-
the overlay ring outlines this container. */
|
|
197
|
-
[${e.slotGroup}],
|
|
198
|
-
[${e.slotItem}] {
|
|
199
|
-
cursor: pointer;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/* Deliberately NO position default on the marker elements: published pages
|
|
203
|
-
and captured artifacts set no position on them, so an unpositioned slot
|
|
204
|
-
must compute static here too — a relative default (even layered, losing
|
|
205
|
-
to author utilities) re-anchored an author's absolutely positioned
|
|
206
|
-
descendant to the slot on this surface while the published page anchored
|
|
207
|
-
it farther up, and could shift stacking the same way. Nothing in the
|
|
208
|
-
chrome needs it: rings measure client rects from the host overlay, and
|
|
209
|
-
everything that mounts absolute chrome inside the frame (island shields,
|
|
210
|
-
the crop spinner) checks the surface's computed position and forces an
|
|
211
|
-
inline relative itself. */
|
|
212
|
-
|
|
213
|
-
@media (prefers-reduced-motion: reduce) {
|
|
214
|
-
[${e.sectionInstanceId}] {
|
|
215
|
-
transition: none !important;
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/* Render-error placeholder ------------------------------------- */
|
|
220
|
-
.we-render-error {
|
|
221
|
-
margin: 8px 0;
|
|
222
|
-
padding: 24px 16px;
|
|
223
|
-
border-radius: 6px;
|
|
224
|
-
border: 1px dashed #ebebe6;
|
|
225
|
-
background: #ffffff;
|
|
226
|
-
color: #8a877e;
|
|
227
|
-
font-size: 12.5px;
|
|
228
|
-
}
|
|
229
|
-
.we-render-error__title {
|
|
230
|
-
margin: 0;
|
|
231
|
-
color: #4a4842;
|
|
232
|
-
font-weight: 500;
|
|
233
|
-
}
|
|
234
|
-
.we-render-error__detail {
|
|
235
|
-
margin: 4px 0 0 0;
|
|
236
|
-
color: #b9b6ab;
|
|
237
|
-
font-size: 11.5px;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
/* Island interaction shield: a transparent click layer derived from a live
|
|
241
|
-
island's own markup (island-shields.ts) — a base shield per island root box,
|
|
242
|
-
an item shield per rendered list-item copy. Present until the shield's
|
|
243
|
-
owner carries the live-owner stamp; a click on a shield falls through to the
|
|
244
|
-
editor's resolver, which selects the nearest marked ancestor. Base z-index 1
|
|
245
|
-
sits on the island content's plane but below floating content that must stay
|
|
246
|
-
clickable at z-index 2 (e.g. the neighborhood card over the map canvas). Item
|
|
247
|
-
shields ride one plane above the base, so a click over an item copy hits the
|
|
248
|
-
ITEM's shield and one click selects that item. */
|
|
249
|
-
.${Yx} {
|
|
250
|
-
position: absolute;
|
|
251
|
-
inset: 0;
|
|
252
|
-
z-index: 1;
|
|
253
|
-
cursor: pointer;
|
|
254
|
-
background: transparent;
|
|
255
|
-
}
|
|
256
|
-
.${rC} { z-index: 2; }
|
|
257
|
-
[${Vo}] .${Yx} { display: none; }
|
|
258
|
-
|
|
259
|
-
/* Image slider: until the slider's \`images\` slot is the live selection, its
|
|
260
|
-
z-index:2 nav arrows would paint above the z-index:1 shield and stay
|
|
261
|
-
clickable, escaping the select-first gate. Disable them so the shield
|
|
262
|
-
catches the first click; restored once .tr-slider carries data-we-live.
|
|
263
|
-
Editor-only — deliberately not in published tokens.css. */
|
|
264
|
-
.tr-slider:not([${Vo}]) .tr-slider__nav { pointer-events: none; }
|
|
265
|
-
`}function dC(e,t){const r=e/Hr,s=Number.POSITIVE_INFINITY;return Math.max(.05,Math.min(.9,.72*r,.1926*r+.54,s))}const fC=420,Xx=.92;function hC(e,t,a){if(!a)return e;const r=Math.max(e,fC/a.width),s=Math.min(.9,e*Hr/a.width,Xx*t.availableWidthPx/a.width,Xx*t.availableHeightPx/a.height);return Math.max(.05,Math.min(r,s))}const cd="/section-assets/",W2="[A-Za-z0-9._-]+\\.[A-Za-z0-9]+",mC=new RegExp(`^${W2}$`),pC=new RegExp(`${cd.replace(/\//g,"\\/")}(${W2})`,"g");function yC(e){switch(e.kind){case"canonical":return cd;case"publishedDocument":return"/assets/";case"publishedStylesheet":return"";case"canvas":return`${e.basePath}runtime/section-asset/`}}function gC(e,t){const a=e.startsWith(cd)?e.slice(cd.length):"";if(!mC.test(a))throw new Error(`not a canonical section-asset ref: ${e}`);return`${yC(t)}${a}`}function bC(e,t){return e.replace(pC,a=>gC(a,t))}function Zx(e,t,a){var s;let r=e.closest(`[${t}]`);for(;r&&!Zi(r,a);)r=((s=r.parentElement)==null?void 0:s.closest(`[${t}]`))??null;return r}function vC(e,t,a){for(const r of Array.from(e.querySelectorAll(`[${a.markers.slotId}]`))){if(r.closest(`[${a.markers.slotGroup}]`)!==e)continue;const s=r.getAttribute(a.markers.slotId);if(s&&a.isSlotEditable(t,s))return s}return null}function xC(e,t,a){if(!e)return null;const r=e.closest(`[${a.markers.sectionInstanceId}]`),s=r==null?void 0:r.getAttribute(a.markers.sectionInstanceId);if(!r||!s)return null;const c=t.find(j=>j.instance_id===s),u={selection:{kind:"section",instance_id:s},element:r};if(!c)return u;const m=Zx(e,a.markers.slotGroup,a.markers);if(m&&r.contains(m)){const j=vC(m,s,a);return j?{selection:{kind:"slot",instance_id:s,slot_id:j},element:m}:u}const p=Zx(e,a.markers.slotId,a.markers),y=p==null?void 0:p.getAttribute(a.markers.slotId);if(!p||!y||!a.isSlotEditable(s,y))return u;const v=Vx(e,a.markers.slotItem,p,a.markers),g=v?Number(v.getAttribute(a.markers.slotItem)):NaN,w=Number.isInteger(g)?g:void 0,k=Vx(e,a.markers.slotField,p,a.markers),E=(k==null?void 0:k.getAttribute(a.markers.slotField))??null,S=E&&a.isSlotEditable(s,y,E)?E:null;return{selection:{kind:"slot",instance_id:s,slot_id:y,...w!==void 0?{item_index:w}:{},...S?{field_name:S}:{}},element:(S?k:null)??v??p}}function bp(e){return e.section_display_name?e.section_display_name:e.section_key.split("-").map(t=>t&&t[0].toUpperCase()+t.slice(1)).join(" ")}function wC(e){if(!e)return"null";let t=2166136261;for(let a=0;a<e.length;a++)t^=e.charCodeAt(a),t=Math.imul(t,16777619);return(t>>>0).toString(16)}function J2(e,t){var c;const a=t.createElement("div");a.className="we-render-error";const r=t.createElement("p");r.className="we-render-error__title",r.textContent="Couldn’t render this section.";const s=t.createElement("p");return s.className="we-render-error__detail",s.textContent=((c=e.render_error)==null?void 0:c.message)??"Unknown render error.",a.appendChild(r),a.appendChild(s),a}function kC(e,t,a,r){const s=t.createElement("div");s.setAttribute(a.sectionInstanceId,e.instance_id),s.setAttribute("data-section-label",bp(e)),s.dataset.svId=e.section_version_id,s.dataset.htmlHash=wC(e.html);const c=t.createElement("div");return c.className="we-section-body",e.render_error||e.html===null?c.appendChild(J2(e,t)):c.innerHTML=r(e.html),s.appendChild(c),s}const _C=`(function () {
|
|
266
|
-
function CaptureIntersectionObserver(callback, options) {
|
|
267
|
-
var opts = options || {};
|
|
268
|
-
this.root = opts.root || null;
|
|
269
|
-
this.rootMargin = opts.rootMargin || "0px";
|
|
270
|
-
var threshold = opts.threshold;
|
|
271
|
-
this.thresholds = Object.freeze(
|
|
272
|
-
Array.isArray(threshold) ? threshold.slice() : [typeof threshold === "number" ? threshold : 0],
|
|
273
|
-
);
|
|
274
|
-
this._callback = callback;
|
|
275
|
-
this._queued = [];
|
|
276
|
-
this._scheduled = false;
|
|
277
|
-
}
|
|
278
|
-
CaptureIntersectionObserver.prototype._flush = function () {
|
|
279
|
-
this._scheduled = false;
|
|
280
|
-
var entries = this._queued;
|
|
281
|
-
this._queued = [];
|
|
282
|
-
if (entries.length === 0) return;
|
|
283
|
-
this._callback(entries, this);
|
|
284
|
-
};
|
|
285
|
-
CaptureIntersectionObserver.prototype.observe = function (target) {
|
|
286
|
-
var rect = target.getBoundingClientRect();
|
|
287
|
-
this._queued.push({
|
|
288
|
-
target: target,
|
|
289
|
-
isIntersecting: true,
|
|
290
|
-
intersectionRatio: 1,
|
|
291
|
-
boundingClientRect: rect,
|
|
292
|
-
intersectionRect: rect,
|
|
293
|
-
rootBounds: new DOMRectReadOnly(0, 0, window.innerWidth, window.innerHeight),
|
|
294
|
-
time: performance.now(),
|
|
295
|
-
});
|
|
296
|
-
if (this._scheduled) return;
|
|
297
|
-
this._scheduled = true;
|
|
298
|
-
var observer = this;
|
|
299
|
-
Promise.resolve().then(function () {
|
|
300
|
-
observer._flush();
|
|
301
|
-
});
|
|
302
|
-
};
|
|
303
|
-
CaptureIntersectionObserver.prototype.unobserve = function () {};
|
|
304
|
-
CaptureIntersectionObserver.prototype.disconnect = function () {
|
|
305
|
-
this._queued = [];
|
|
306
|
-
};
|
|
307
|
-
CaptureIntersectionObserver.prototype.takeRecords = function () {
|
|
308
|
-
var entries = this._queued;
|
|
309
|
-
this._queued = [];
|
|
310
|
-
return entries;
|
|
311
|
-
};
|
|
312
|
-
window.IntersectionObserver = CaptureIntersectionObserver;
|
|
313
|
-
})();`,Aa=96,Gi=72,SC=25.4,EC=/^(\d+(?:\.\d+)?)(in|mm)$/;function Hm(e){const t=EC.exec(e),[,a,r]=t??[];if(a===void 0||r===void 0)throw new Error(`malformed physical length: "${e}"`);const s=Number.parseFloat(a);return r==="mm"?s/SC:s}function $d(e){if(typeof e.width=="number"&&typeof e.height=="number")return{frameWidth:e.width,frameHeight:e.height,bleed:0,viewportWidth:e.width,viewportHeight:e.height,deviceScaleFactor:1,pixelWidth:e.width,pixelHeight:e.height,pointWidth:e.width/Aa*Gi,pointHeight:e.height/Aa*Gi,bleedPoints:0,panels:1,sheetWidth:e.width,sheetHeight:e.height,sheetPointWidth:e.width/Aa*Gi,sheetPointHeight:e.height/Aa*Gi};const t=e,a=Hm(t.width),r=Hm(t.height),s=t.bleed===void 0?0:Hm(t.bleed),c=a*Aa,u=r*Aa,m=s*Aa,p=c+2*m,y=u+2*m,v=t.dpi/Aa,g=t.panels??1;return{frameWidth:c,frameHeight:u,bleed:m,viewportWidth:p,viewportHeight:y,deviceScaleFactor:v,pixelWidth:Math.round(p*v),pixelHeight:Math.round(y*v),pointWidth:(a+2*s)*Gi,pointHeight:(r+2*s)*Gi,bleedPoints:s*Gi,panels:g,sheetWidth:g*c+2*m,sheetHeight:y,sheetPointWidth:(g*a+2*s)*Gi,sheetPointHeight:(r+2*s)*Gi}}const e_="concrete-frame",t_="concrete-sheet";function jC(e){const t=$d(e);return{"--frame-w":`${t.frameWidth}px`,"--frame-h":`${t.frameHeight}px`,"--frame-bleed":`${t.bleed}px`}}function OC(e){const t=$d(e);return{"--sheet-w":`${t.panels*t.frameWidth}px`,"--sheet-h":`${t.frameHeight}px`,"--frame-bleed":`${t.bleed}px`}}function Je(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function ls(e){return JSON.stringify(e).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026")}function AC(e){return n_(e.id,{...jC(e)})}function n_(e,t){const a=Object.entries(t).map(([r,s])=>`${r}:${s}`).join(";");return{class:e_,dataFormat:e,style:a}}function Wx(e,t){const a=AC(e);return`<div class="${Je(a.class)}" data-format="${Je(a.dataFormat)}" style="${Je(a.style)}">${t.join("")}</div>`}function NC(e,t){const a=Object.entries(OC(e)).map(([r,s])=>`${r}:${s}`).join(";");return`<div class="${Je(t_)}" style="${Je(a)}">${t.join("")}</div>`}function MC(e){switch(e.destination){case"published":return CC(e);case"artifact":return RC(e);case"preview":return TC(e);case"canvas":return DC(e)}}function i_(e){return e.kind==="none"||Object.keys(e.islandMap).length===0?[]:[`<script>${_C}<\/script>`]}const a_="html, body { margin: 0; padding: 0; }";function r_(e){const t=[`rel="${e.rel}"`,`href="${Je(e.href)}"`];return e.sizes!==void 0&&t.push(`sizes="${Je(e.sizes)}"`),e.type!==void 0&&t.push(`type="${Je(e.type)}"`),`<link ${t.join(" ")} />`}function CC(e){const{meta:t}=e,a=['<meta charset="utf-8" />','<meta name="viewport" content="width=device-width, initial-scale=1" />',`<title>${Je(t.title)}</title>`,`<meta name="description" content="${Je(t.description)}" />`];t.canonical&&a.push(`<link rel="canonical" href="${Je(t.canonical)}" />`);for(const s of t.icons??[])a.push(r_(s));a.push('<meta property="og:type" content="website" />'),t.siteName&&a.push(`<meta property="og:site_name" content="${Je(t.siteName)}" />`),a.push(`<meta property="og:title" content="${Je(t.title)}" />`),a.push(`<meta property="og:description" content="${Je(t.description)}" />`),t.ogUrl&&a.push(`<meta property="og:url" content="${Je(t.ogUrl)}" />`),t.ogImage&&(a.push(`<meta property="og:image" content="${Je(t.ogImage)}" />`),t.ogImageWidth&&a.push(`<meta property="og:image:width" content="${t.ogImageWidth}" />`),t.ogImageHeight&&a.push(`<meta property="og:image:height" content="${t.ogImageHeight}" />`),t.ogImageType&&a.push(`<meta property="og:image:type" content="${Je(t.ogImageType)}" />`),t.ogImageAlt&&a.push(`<meta property="og:image:alt" content="${Je(t.ogImageAlt)}" />`),a.push('<meta name="twitter:card" content="summary_large_image" />'),a.push(`<meta name="twitter:title" content="${Je(t.title)}" />`),a.push(`<meta name="twitter:description" content="${Je(t.description)}" />`),a.push(`<meta name="twitter:image" content="${Je(t.ogImage)}" />`)),a.push(...Ny(e.stylesheets)),a.push(...My(e.islands)),e.prefetchUrls&&e.prefetchUrls.length>0&&a.push(`<script type="speculationrules">${ls({prefetch:[{source:"list",urls:[...e.prefetchUrls]}]})}<\/script>`);const r=e.siteConfig?`
|
|
314
|
-
<script type="application/json" id="concrete-site-config">${ls(e.siteConfig)}<\/script>`:"";return Ay({lang:t.lang??"en",head:a,body:` <body class="concrete-root">
|
|
315
|
-
${e.root.bodyHtml}${r}${Cy(e.islands,"viewport")}
|
|
316
|
-
<script type="module" src="${Je(e.analyticsJs.url)}"><\/script>
|
|
317
|
-
</body>`})}function RC(e){const t=['<meta charset="utf-8" />'];e.title!==void 0&&t.push(`<title>${Je(e.title)}</title>`),t.push(...Ny(e.stylesheets));const a=[a_,...UC(e.root)];return t.push(o_(a)),t.push(...i_(e.islands)),t.push(...My(e.islands)),Ay({lang:"en",head:t,body:` <body>${$C(e.root)}${Cy(e.islands,"eager")}</body>`})}function TC(e){const t=['<meta charset="utf-8" />','<meta name="viewport" content="width=device-width, initial-scale=1" />',`<title>${Je(e.title)}</title>`,...e.icon===void 0?[]:[r_({rel:"icon",href:e.icon})],...Ny(e.stylesheets),o_([a_,...e.extraCss??[]]),...e.capture===!0?i_(e.islands):[],...My(e.islands)],a=(e.devScripts??[]).map(r=>`
|
|
318
|
-
${r}`).join("");return Ay({lang:"en",head:t,body:` <body>
|
|
319
|
-
${e.root.bodyHtml}${Cy(e.islands,e.capture===!0?"eager":"viewport")}${a}
|
|
320
|
-
</body>`})}function DC(e){const t=e.stylesheets.hrefs.map(a=>`<link rel="stylesheet" href="${Je(a)}">`).join("");return`<!doctype html>
|
|
321
|
-
<html>
|
|
322
|
-
<head>
|
|
323
|
-
<meta charset="utf-8">
|
|
324
|
-
<base href="${Je(e.base)}">
|
|
325
|
-
<!-- Cascade-layer order is fixed by FIRST declaration, document-wide. The
|
|
326
|
-
kernel's document defaults must lose to everything a template declares,
|
|
327
|
-
so their layer is pre-declared here, before any template stylesheet,
|
|
328
|
-
pinning it below every layer those go on to declare. -->
|
|
329
|
-
<style>@layer ${e.defaultsLayer};</style>
|
|
330
|
-
${t}${zC(e.islands)}
|
|
331
|
-
<style>${e.frameCss}</style>
|
|
332
|
-
</head>
|
|
333
|
-
<body>
|
|
334
|
-
<div id="${Je(e.root.id)}"${LC(e.root)}></div>
|
|
335
|
-
</body>
|
|
336
|
-
</html>`}function LC(e){if(!e.pageBox)return"";const t=n_(e.pageBox.formatId,e.pageBox.tokens);return` class="${Je(t.class)}" data-format="${Je(t.dataFormat)}" style="${Je(t.style)}"`}function zC(e){if(e.kind==="none"||Object.keys(e.islandMap).length===0)return"";const t=e.hostScriptSrc?`
|
|
337
|
-
<script id="tr-island-host" type="module" src="${Je(e.hostScriptSrc)}"><\/script>`:"";return`${Object.keys(e.importMap).length===0?"":`
|
|
338
|
-
<script type="importmap">${ls({imports:e.importMap})}<\/script>`}
|
|
339
|
-
<script>window.__TR_ISLAND_MAP=${ls(e.islandMap)};<\/script>
|
|
340
|
-
<!-- id is the contract the host's readiness gate keys off — it waits on THIS
|
|
341
|
-
element's load event, not a timeout, so a slow cold first load still
|
|
342
|
-
activates without a refresh. -->${t}`}function Ay(e){const t=e.head.map(a=>` ${a}`).join(`
|
|
343
|
-
`);return`<!doctype html>
|
|
344
|
-
<html lang="${Je(e.lang)}">
|
|
345
|
-
<head>
|
|
346
|
-
${t}
|
|
347
|
-
</head>
|
|
348
|
-
${e.body}
|
|
349
|
-
</html>
|
|
350
|
-
`}function $C(e){if(e.kind==="frame")return Wx(e.format,e.sectionHtml);const t=e.pages.map(s=>Wx(e.format,s)),{panels:a}=$d(e.format);if(a===1)return t.join(`
|
|
351
|
-
`);if(t.length%a!==0)throw new Error(`page-shell: format "${e.format.id}" folds ${a} panels to a sheet, but the stack has ${t.length} pages, not a whole number of sheets`);const r=[];for(let s=0;s<t.length;s+=a)r.push(NC(e.format,t.slice(s,s+a)));return r.join(`
|
|
352
|
-
`)}function UC(e){if(e.kind!=="frameStack")return[];const t=$d(e.format).panels===1?e_:t_;return[`body > .${t} { break-after: page; }`,`body > .${t}:last-child { break-after: auto; }`]}function Ny(e){return e.kind==="links"?e.hrefs.map(t=>`<link rel="stylesheet" href="${Je(t)}" />`):e.css.map(t=>`<style>${t}</style>`)}function o_(e){const[t,...a]=e;return t===void 0?"<style></style>":a.length===0?`<style>${t}</style>`:`<style>${t}
|
|
353
|
-
${a.join(`
|
|
354
|
-
`)}
|
|
355
|
-
</style>`}function My(e){if(e.kind!=="bundles")return[];const t=[],a=e.reactVendorMap;if(a&&Object.keys(a).length>0&&t.push(`<script type="importmap">${ls({imports:a})}<\/script>`),Object.keys(e.islandMap).length===0)return t;for(const r of[e.runtime.url,...Object.values(a??{}),...e.reactVendorCore?[e.reactVendorCore.url]:[]])t.push(`<link rel="modulepreload" href="${Je(r)}" />`);return t}function Cy(e,t){if(e.kind==="none"||Object.keys(e.islandMap).length===0)return"";const a=ls(e.islandMap),r=t==="eager"?' window.__TR_ISLAND_SCHEDULE = "eager";':"";return e.kind==="bundles"?`
|
|
356
|
-
<script>window.__TR_ISLAND_MAP=${a};${r}<\/script>
|
|
357
|
-
<script type="module" src="${Je(e.runtime.url)}"><\/script>`:`
|
|
358
|
-
${IC}
|
|
359
|
-
<script>window.__TR_ISLAND_MAP = ${a};${r}<\/script>
|
|
360
|
-
<script type="module" src="${Je(e.bootstrapUrl)}"><\/script>`}const IC=`<script type="module">
|
|
361
|
-
import RefreshRuntime from "/@react-refresh";
|
|
362
|
-
RefreshRuntime.injectIntoGlobalHook(window);
|
|
363
|
-
window.$RefreshReg$ = () => {};
|
|
364
|
-
window.$RefreshSig$ = () => (type) => type;
|
|
365
|
-
window.__vite_plugin_react_preamble_installed__ = true;
|
|
366
|
-
<\/script>`;function BC(e){return Object.keys(e.islandMap).length===0?{kind:"none"}:Object.keys(e.importMap).length===0&&!e.hostResolvesOwnImports?(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."),{kind:"none"}):{kind:"editorHost",islandMap:e.islandMap,importMap:e.importMap,hostScriptSrc:e.hostScriptSrc}}function HC(e,t,a){return MC({destination:"canvas",root:{kind:"canvas",id:"we-page",...a?{pageBox:{formatId:a.formatId,tokens:a.tokens}}:{}},islands:BC(e),stylesheets:{kind:"links",hrefs:e.stylesheets},base:e.basePath,defaultsLayer:Oy,frameCss:uC(t,a)})}function qC(e){return!!(e!=null&&e.getElementById("we-page"))}function Jx(e){const t=a=>bC(a,{kind:"canvas",basePath:e.assets.basePath});return{srcdoc:()=>HC(e.assets,e.markers,e.pageBox),buildSectionWrapper:(a,r)=>kC(a,r,e.markers,t),buildErrorPlaceholder:J2,resolveTarget:(a,r)=>xC(a,r,e),localizeSectionAssets:t,resolveSelectionEl:(a,r)=>aC(a,r,e.markers),resolveSelectionEls:(a,r)=>Q2(a,r,e.markers),resolveVisibleSlotEls:(a,r)=>Y2(a,r,e.markers),resolveItemEls:(a,r)=>iC(a,r,e.markers),setLiveOwner:(a,r)=>sC(a,r,e.markers)}}const s_=(e,t)=>`<svg class="${e}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${t}</svg>`;function FC(e){return s_(e,'<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 PC(e){return s_(e,'<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 VC=42,l_=16;function GC(e,t){const a=[];for(const s of e)for(a.push({sum:s.y,n:1,items:[s]});a.length>1;){const c=a[a.length-1],u=a[a.length-2];if(!c||!u)break;const m=c.sum/c.n-(c.n-1)/2*t,p=u.sum/u.n+(u.n-1)/2*t;if(m-p<t)a.splice(a.length-2,2,{sum:u.sum+c.sum,n:u.n+c.n,items:u.items.concat(c.items)});else break}const r={};for(const s of a){const c=s.sum/s.n-(s.n-1)/2*t;s.items.forEach((u,m)=>{r[u.idx]=c+m*t})}return r}const KC=FC("we-htab-eye-off"),YC=PC("we-htab-eye-on"),vp=new WeakMap;function QC(e,t,a,r){const s=e.createElement("button");s.type="button",s.className="we-htab",s.dataset.hiddenTab=t,s.title=`Show ${a}`,s.setAttribute("aria-label",`Show ${a}`),s.innerHTML=`<span class="we-htab-eye">${KC}${YC}</span><span class="we-htab-name"></span>`;const c=s.querySelector(".we-htab-name");return c&&(c.textContent=a),vp.set(s,r),s.addEventListener("click",u=>{var m;u.stopPropagation(),(m=vp.get(s))==null||m()}),s}function XC(e,t,a,r){const s=new Map;e.querySelectorAll(".we-htab").forEach(m=>{const p=m.dataset.hiddenTab;p&&s.set(p,m)});const c=new Set,u=[];for(const m of a){let p=s.get(m.instanceId);if(!p)p=QC(t,m.instanceId,m.label,()=>r(m.instanceId)),e.appendChild(p);else{const y=p.querySelector(".we-htab-name");y&&y.textContent!==m.label&&(y.textContent=m.label),p.title=`Show ${m.label}`,p.setAttribute("aria-label",`Show ${m.label}`),vp.set(p,()=>r(m.instanceId))}c.add(m.instanceId),u.push(p)}return s.forEach((m,p)=>{c.has(p)||m.remove()}),u}function ZC(e,t,a){const r=e.map((c,u)=>{const m=t(c.dataset.hiddenTab??""),p=m?m.getBoundingClientRect().top*a:0;return{idx:u,y:p}}),s=GC(r,VC);e.forEach((c,u)=>{c.style.top=`${s[u]}px`,c.style.left=`${l_-c.offsetWidth}px`})}const WC=48,JC=30,e5=`
|
|
367
|
-
@property --we-scale {
|
|
368
|
-
syntax: "<number>";
|
|
369
|
-
inherits: true;
|
|
370
|
-
initial-value: 1;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
/* The scroll container + dotted canvas surface. The host lays this element
|
|
374
|
-
out — position and size are the host's (it must both bound the height and
|
|
375
|
-
be positioned, so the frame wrapper's offset parent is the stage);
|
|
376
|
-
everything inside is kernel-defined. Declaring position here would win
|
|
377
|
-
the cascade over a host's own positioning utility classes (this sheet
|
|
378
|
-
loads after theirs), which is how the app's absolutely-positioned stage
|
|
379
|
-
once silently became in-flow and unscrollable.
|
|
380
|
-
background-attachment: local makes the grid scroll together with
|
|
381
|
-
the page card so the canvas + website read as one scene being panned, not
|
|
382
|
-
a card sliding over a fixed grid. Padding aligns the page card with the
|
|
383
|
-
floating panel: top/bottom/left 20px; the right constant (40px) covers the
|
|
384
|
-
panel's right inset (20px) plus an equal 20px gap. Fallback 436px matches
|
|
385
|
-
the panel's base CSS width.
|
|
386
|
-
The top padding also carries the label lane: a page-title row is drawn
|
|
387
|
-
ABOVE its frame's box, so the topmost frame's row would otherwise sit in
|
|
388
|
-
the 20px margin. --we-frame-label-lane is set by the stage reconciler only
|
|
389
|
-
when some frame is labeled, so a canvas whose pages declare no label keeps
|
|
390
|
-
the original 20px exactly. */
|
|
391
|
-
.we-canvas-stage {
|
|
392
|
-
overflow: auto;
|
|
393
|
-
padding: calc(20px + var(--we-frame-label-lane, 0px))
|
|
394
|
-
calc(var(--we-panel-w, 436px) + 40px) 20px 20px;
|
|
395
|
-
transition: --we-scale 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
396
|
-
background-image: radial-gradient(rgba(20, 18, 13, 0.13) 1px, transparent 1.2px);
|
|
397
|
-
background-size: 20px 20px;
|
|
398
|
-
background-position: 10px 10px;
|
|
399
|
-
background-attachment: local;
|
|
400
|
-
scrollbar-width: none;
|
|
401
|
-
-ms-overflow-style: none;
|
|
402
|
-
}
|
|
403
|
-
.we-canvas-stage::-webkit-scrollbar { width: 0; height: 0; display: none; }
|
|
404
|
-
|
|
405
|
-
/* The scaled page card's layout box: exactly the iframe's visual footprint,
|
|
406
|
-
so the stage scrolls and centers the card correctly. Auto inline margins
|
|
407
|
-
rather than flex centering: they collapse to 0 when the card overflows the
|
|
408
|
-
stage, keeping the left edge reachable by scroll at high zoom.
|
|
409
|
-
|
|
410
|
-
isolation:isolate SEALS the canvas's own stacking hierarchy (tab layer,
|
|
411
|
-
page card, chrome overlay) into this element, so those z-indexes are
|
|
412
|
-
ordered only against each other and the whole card paints at the stage's
|
|
413
|
-
position in the HOST's DOM order. Without it the overlay competed
|
|
414
|
-
directly with the host's floating chrome -- a panel, a zoom toolbar, a
|
|
415
|
-
notice banner -- and a hover outline drew straight over the controls.
|
|
416
|
-
Same reasoning as the section wrappers' isolate in the frame document. */
|
|
417
|
-
.we-canvas-frame {
|
|
418
|
-
position: relative;
|
|
419
|
-
width: calc(var(--we-page-w, ${Hr}px) * var(--we-scale, 1));
|
|
420
|
-
height: calc(var(--we-page-h, 0px) * var(--we-scale, 1));
|
|
421
|
-
margin-inline: auto;
|
|
422
|
-
isolation: isolate;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
/* The multi-frame stack: one frame per row, in the canvas's page order, each
|
|
426
|
-
centered on the same axis a lone page card already used (the auto inline
|
|
427
|
-
margins above), separated by a constant host-px gap plus whatever lane the
|
|
428
|
-
label chips need. Expressed as an adjacent-sibling rule so a single-frame
|
|
429
|
-
canvas matches no selector at all and lays out byte-identically to what it
|
|
430
|
-
did before frames could stack. The gap does NOT ride --we-scale: it is
|
|
431
|
-
chrome between two artifacts, not a part of either, so it stays the same
|
|
432
|
-
distance at any zoom. */
|
|
433
|
-
.we-canvas-frame + .we-canvas-frame {
|
|
434
|
-
margin-top: calc(${WC}px + var(--we-frame-label-lane, 0px));
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
/* Page-title row -- "Front", "Back": which page of the canvas this frame
|
|
438
|
-
is, with the visibility toggle seated directly beside the name it acts
|
|
439
|
-
on (one group, never split across the page's corners). Drawn ABOVE the
|
|
440
|
-
frame's box (bottom: 100%, in the lane the stage padding and the
|
|
441
|
-
inter-frame gap reserve) so it never covers artwork, and sized in
|
|
442
|
-
--we-content like the edge tabs: constant visual size at any zoom,
|
|
443
|
-
because it names the page rather than belonging to it.
|
|
444
|
-
pointer-events:none at the row so the lane's empty run stays stage
|
|
445
|
-
surface (a deselect click must fall through); the toggle re-enables its
|
|
446
|
-
own. */
|
|
447
|
-
.we-frame-titlebar {
|
|
448
|
-
position: absolute;
|
|
449
|
-
bottom: 100%;
|
|
450
|
-
left: 0;
|
|
451
|
-
right: 0;
|
|
452
|
-
margin-bottom: calc(4 * var(--we-content, 1px));
|
|
453
|
-
display: flex;
|
|
454
|
-
align-items: center;
|
|
455
|
-
gap: calc(6 * var(--we-content, 1px));
|
|
456
|
-
pointer-events: none;
|
|
457
|
-
}
|
|
458
|
-
/* Quiet by design: the row annotates the artwork below it, so it reads in
|
|
459
|
-
a light gray that cedes attention to the page — the ink weights are
|
|
460
|
-
reserved for the states that earn them (hover, the engaged toggle). */
|
|
461
|
-
.we-canvas-frame-label {
|
|
462
|
-
min-width: 0;
|
|
463
|
-
overflow: hidden;
|
|
464
|
-
text-overflow: ellipsis;
|
|
465
|
-
white-space: nowrap;
|
|
466
|
-
color: #a09d94;
|
|
467
|
-
font-size: calc(13 * var(--we-content, 1px));
|
|
468
|
-
font-weight: 500;
|
|
469
|
-
letter-spacing: -0.01em;
|
|
470
|
-
line-height: 1;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
/* Page-visibility toggle -- the eye beside the page title, resting in the
|
|
474
|
-
title's own gray so the row reads as one quiet group. Rendered only
|
|
475
|
-
for pages the composition marks optional (frame-visibility.ts). */
|
|
476
|
-
.we-frame-toggle {
|
|
477
|
-
flex: 0 0 auto;
|
|
478
|
-
display: grid;
|
|
479
|
-
place-items: center;
|
|
480
|
-
width: calc(24 * var(--we-content, 1px));
|
|
481
|
-
height: calc(22 * var(--we-content, 1px));
|
|
482
|
-
padding: 0;
|
|
483
|
-
border: 0;
|
|
484
|
-
border-radius: calc(6 * var(--we-content, 1px));
|
|
485
|
-
background: transparent;
|
|
486
|
-
color: #a09d94;
|
|
487
|
-
cursor: pointer;
|
|
488
|
-
pointer-events: auto;
|
|
489
|
-
transition: background-color 0.15s, color 0.15s;
|
|
490
|
-
}
|
|
491
|
-
.we-frame-toggle svg {
|
|
492
|
-
width: calc(14 * var(--we-content, 1px));
|
|
493
|
-
height: calc(14 * var(--we-content, 1px));
|
|
494
|
-
}
|
|
495
|
-
.we-frame-toggle:hover {
|
|
496
|
-
background: rgba(20, 18, 13, 0.06);
|
|
497
|
-
color: #14180F;
|
|
498
|
-
}
|
|
499
|
-
.we-frame-toggle:focus-visible {
|
|
500
|
-
outline: none;
|
|
501
|
-
background: rgba(20, 18, 13, 0.06);
|
|
502
|
-
color: #14180F;
|
|
503
|
-
box-shadow: 0 0 0 2px rgba(15, 42, 34, 0.5);
|
|
504
|
-
}
|
|
505
|
-
/* Hidden state reads as an engaged control (the section eye's hidden
|
|
506
|
-
treatment): filled box, full-ink glyph. */
|
|
507
|
-
.we-frame-toggle[data-page-visibility="hidden"] {
|
|
508
|
-
background: rgba(20, 18, 13, 0.06);
|
|
509
|
-
color: #14180F;
|
|
510
|
-
box-shadow: inset 0 0 0 1px #ebebe6;
|
|
511
|
-
}
|
|
512
|
-
/* Hidden page -- tinted to a clear deactivated state, in place and at full
|
|
513
|
-
footprint (a page never collapses the way a hidden section does), still
|
|
514
|
-
fully interactive: the tint says "excluded from the artifact", not
|
|
515
|
-
"locked". The title strikes through and lightens, the same reading as a
|
|
516
|
-
fully-hidden canvas's bar tab. The stamp is written by
|
|
517
|
-
frame-visibility.ts. */
|
|
518
|
-
.we-canvas-frame[data-page-hidden="true"] > iframe {
|
|
519
|
-
filter: grayscale(1) opacity(0.55);
|
|
520
|
-
}
|
|
521
|
-
.we-canvas-frame[data-page-hidden="true"] > .we-frame-titlebar > .we-canvas-frame-label {
|
|
522
|
-
text-decoration: line-through;
|
|
523
|
-
color: #b6b3aa;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
/* The frame document: unscaled ${Hr}px layout, scaled here as an
|
|
527
|
-
element. The border-radius matches #we-page inside, so the card shadow
|
|
528
|
-
follows the content's silhouette; both radius and shadow ride the
|
|
529
|
-
transform, exactly as they rode the old in-document scaling. z-index 2
|
|
530
|
-
stacks the card above the edge tabs (z-index 1) so the shadow falls over a
|
|
531
|
-
tab's tucked-under inner edge, nestling it against the page. */
|
|
532
|
-
.we-canvas-frame > iframe {
|
|
533
|
-
display: block;
|
|
534
|
-
border: 0;
|
|
535
|
-
background: transparent;
|
|
536
|
-
width: var(--we-page-w, ${Hr}px);
|
|
537
|
-
height: var(--we-page-h, 0px);
|
|
538
|
-
border-radius: var(--we-page-radius, ${Z2}px);
|
|
539
|
-
box-shadow:
|
|
540
|
-
0 1px 0 rgba(20,18,13,0.06),
|
|
541
|
-
0 2px 6px -2px rgba(20,18,13,0.10),
|
|
542
|
-
0 12px 28px -8px rgba(20,18,13,0.18),
|
|
543
|
-
0 32px 64px -20px rgba(20,18,13,0.28);
|
|
544
|
-
transform: scale(var(--we-scale, 1));
|
|
545
|
-
transform-origin: 0 0;
|
|
546
|
-
position: relative;
|
|
547
|
-
z-index: 2;
|
|
548
|
-
transition: filter 0.2s ease;
|
|
549
|
-
}
|
|
550
|
-
|
|
551
|
-
/* Chrome overlay -- sized to the frame wrapper, i.e. the scaled page card,
|
|
552
|
-
so x=0/y=0 is the page's top-left corner. overflow stays visible: a ring
|
|
553
|
-
at the page boundary or a label straddling the top border extends past
|
|
554
|
-
the card and must not clip. pointer-events:none so clicks pass through to
|
|
555
|
-
the iframe underneath.
|
|
556
|
-
|
|
557
|
-
Positioning contract: chrome.ts measures a target in the FRAME document
|
|
558
|
-
(layout truth — that document never scales or scrolls) and writes the
|
|
559
|
-
rect as custom properties on the ring/label; the formulas here scale it
|
|
560
|
-
into host space. Keeping the formula in the stylesheet and the data in
|
|
561
|
-
properties is what lets a transitioned --we-scale move every ring in
|
|
562
|
-
lockstep with the iframe's own animated transform. The ring's offset
|
|
563
|
-
(its inflation past the target's edge) stays OUTSIDE the multiplication:
|
|
564
|
-
constant host px at any zoom.
|
|
565
|
-
|
|
566
|
-
z-index 3 -- one step above the page card, and nothing more: the frame's
|
|
567
|
-
isolate is what keeps the chrome under the host's own UI, so a large
|
|
568
|
-
value here would buy nothing and read as an escape hatch.
|
|
569
|
-
|
|
570
|
-
A CLASS, not an id: every frame on the stage carries one of these, and the
|
|
571
|
-
chrome functions are handed the overlay rather than resolving it by
|
|
572
|
-
document-global id. */
|
|
573
|
-
.we-chrome-overlay {
|
|
574
|
-
position: absolute;
|
|
575
|
-
inset: 0;
|
|
576
|
-
pointer-events: none;
|
|
577
|
-
z-index: 3;
|
|
578
|
-
}
|
|
579
|
-
.we-chrome-ring {
|
|
580
|
-
position: absolute;
|
|
581
|
-
pointer-events: none;
|
|
582
|
-
border: 2px solid transparent;
|
|
583
|
-
border-radius: 6px;
|
|
584
|
-
opacity: 0;
|
|
585
|
-
box-sizing: border-box;
|
|
586
|
-
top: calc(var(--we-r-top, 0px) * var(--we-scale, 1) - var(--we-r-off, 0px));
|
|
587
|
-
left: calc(var(--we-r-left, 0px) * var(--we-scale, 1) - var(--we-r-off, 0px));
|
|
588
|
-
width: calc(var(--we-r-w, 0px) * var(--we-scale, 1) + 2 * var(--we-r-off, 0px));
|
|
589
|
-
height: calc(var(--we-r-h, 0px) * var(--we-scale, 1) + 2 * var(--we-r-off, 0px));
|
|
590
|
-
}
|
|
591
|
-
/* Hover ring -- instant on cursor arrival, fades out on leave.
|
|
592
|
-
Position updates instantly (no top/left transition) so dragging
|
|
593
|
-
across elements never flickers. Ink stroke + white drop-shadow
|
|
594
|
-
halo keeps the ring readable on both light sections and dark ones. */
|
|
595
|
-
.we-chrome-ring--hover {
|
|
596
|
-
border-color: rgba(15,42,34,0.85);
|
|
597
|
-
filter: drop-shadow(0 0 1px rgba(255,255,255,0.95));
|
|
598
|
-
transition: opacity 70ms ease-in;
|
|
599
|
-
}
|
|
600
|
-
.we-chrome-ring--hover[data-active="true"] {
|
|
601
|
-
opacity: 1;
|
|
602
|
-
transition: opacity 100ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
603
|
-
}
|
|
604
|
-
/* Selection ring -- appears instantly (continuous with hover),
|
|
605
|
-
then morphs ink → gold. No position transition so resize
|
|
606
|
-
tracking stays tight. Same ink + white halo as hover. */
|
|
607
|
-
.we-chrome-ring--selection {
|
|
608
|
-
border-color: rgba(15,42,34,0.85);
|
|
609
|
-
filter: drop-shadow(0 0 1px rgba(255,255,255,0.95));
|
|
610
|
-
transform: scale(1);
|
|
611
|
-
box-shadow: none;
|
|
612
|
-
transition:
|
|
613
|
-
opacity 50ms ease-in,
|
|
614
|
-
border-color 160ms cubic-bezier(0.2, 0, 0, 1),
|
|
615
|
-
box-shadow 160ms cubic-bezier(0.2, 0, 0, 1);
|
|
616
|
-
}
|
|
617
|
-
.we-chrome-ring--selection[data-active="true"] {
|
|
618
|
-
opacity: 1;
|
|
619
|
-
/* Instant show on select; only border + glow animate */
|
|
620
|
-
transition:
|
|
621
|
-
opacity 0ms,
|
|
622
|
-
border-color 180ms cubic-bezier(0.2, 0, 0, 1),
|
|
623
|
-
box-shadow 180ms cubic-bezier(0.2, 0, 0, 1);
|
|
624
|
-
}
|
|
625
|
-
.we-chrome-ring--selection[data-kind="section"],
|
|
626
|
-
.we-chrome-ring--selection[data-kind="slot"] {
|
|
627
|
-
border-color: #E5B832;
|
|
628
|
-
filter: drop-shadow(0 0 1px rgba(255,255,255,0.95));
|
|
629
|
-
box-shadow: 0 0 0 1px rgba(229,184,50,0.25), 0 8px 24px -10px rgba(229,184,50,0.35);
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
/* Geometry guides -- the trim line and the bleed region for a rendered-class
|
|
633
|
-
page. The overlay is the page (bleed) box exactly, so insetting all four
|
|
634
|
-
sides by the declared bleed gives the trim box with no arithmetic: the
|
|
635
|
-
border draws the trim line and the shadow's spread fills the band between
|
|
636
|
-
trim and page edge. Data/formula split as for the rings — guides.ts writes
|
|
637
|
-
--we-g-bleed in frame space, the multiplication happens here, so a
|
|
638
|
-
transitioned zoom moves the guides with the card. The 1px line itself
|
|
639
|
-
stays OUTSIDE the multiplication: constant host px at any zoom, like the
|
|
640
|
-
ring's offset.
|
|
641
|
-
|
|
642
|
-
Magenta rather than the chrome's ink/gold: a guide is an instrument about
|
|
643
|
-
the artifact, never a selection, and the print convention reads instantly.
|
|
644
|
-
The inset white hairline keeps the line legible over dark artwork, the
|
|
645
|
-
role the rings' drop-shadow halo plays for them. First child of the
|
|
646
|
-
overlay, so rings and the title pill paint above it. */
|
|
647
|
-
.we-guide {
|
|
648
|
-
position: absolute;
|
|
649
|
-
box-sizing: border-box;
|
|
650
|
-
pointer-events: none;
|
|
651
|
-
opacity: 0;
|
|
652
|
-
top: calc(var(--we-g-bleed, 0px) * var(--we-scale, 1));
|
|
653
|
-
right: calc(var(--we-g-bleed, 0px) * var(--we-scale, 1));
|
|
654
|
-
bottom: calc(var(--we-g-bleed, 0px) * var(--we-scale, 1));
|
|
655
|
-
left: calc(var(--we-g-bleed, 0px) * var(--we-scale, 1));
|
|
656
|
-
border: 1px solid rgba(214,32,140,0.9);
|
|
657
|
-
box-shadow:
|
|
658
|
-
inset 0 0 0 1px rgba(255,255,255,0.55),
|
|
659
|
-
0 0 0 calc(var(--we-g-bleed, 0px) * var(--we-scale, 1)) rgba(214,32,140,0.16);
|
|
660
|
-
transition: opacity 90ms ease-in;
|
|
661
|
-
}
|
|
662
|
-
.we-guide[data-active="true"] { opacity: 1; }
|
|
663
|
-
|
|
664
|
-
/* Section title pill -- straddles the selection's top border; geometry set
|
|
665
|
-
by chrome.ts as custom properties, same contract as the rings. The left
|
|
666
|
-
indent is constant host px. Sections only; slots get the outline ring but
|
|
667
|
-
no on-canvas label. */
|
|
668
|
-
.we-chrome-label {
|
|
669
|
-
position: absolute;
|
|
670
|
-
top: calc(var(--we-l-top, 0px) * var(--we-scale, 1));
|
|
671
|
-
left: calc(var(--we-l-left, 0px) * var(--we-scale, 1) + var(--we-l-indent, 0px));
|
|
672
|
-
pointer-events: none;
|
|
673
|
-
z-index: 1;
|
|
674
|
-
background: rgba(229,184,50,0.95);
|
|
675
|
-
color: #282c32;
|
|
676
|
-
padding: 3px 8px;
|
|
677
|
-
border-radius: 4px;
|
|
678
|
-
font-size: 10.5px;
|
|
679
|
-
font-weight: 600;
|
|
680
|
-
line-height: 1;
|
|
681
|
-
white-space: nowrap;
|
|
682
|
-
opacity: 0;
|
|
683
|
-
transform: translateY(calc(-50% - 4px)) scale(0.96);
|
|
684
|
-
transition:
|
|
685
|
-
opacity 60ms ease-in,
|
|
686
|
-
transform 60ms ease-in;
|
|
687
|
-
}
|
|
688
|
-
.we-chrome-label[data-active="true"] {
|
|
689
|
-
opacity: 1;
|
|
690
|
-
transform: translateY(-50%) scale(1);
|
|
691
|
-
transition:
|
|
692
|
-
opacity 130ms cubic-bezier(0.16, 1, 0.3, 1) 50ms,
|
|
693
|
-
transform 130ms cubic-bezier(0.16, 1, 0.3, 1) 50ms;
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
/* Hidden-section edge tabs -------------------------------------
|
|
697
|
-
One dim chip-tab per hidden section, pinned to the page card's left edge
|
|
698
|
-
at the collapsed wrapper's reflow seam. Built + positioned by the host
|
|
699
|
-
orchestrator; de-collided via placeTabs. Constant visual size at any zoom
|
|
700
|
-
— the layer sits outside the scaled iframe. --we-content is the host's
|
|
701
|
-
interior scaling unit (its large-screen chrome scale); a host without one
|
|
702
|
-
leaves the 1px fallback in force. A class for the same reason the overlay
|
|
703
|
-
is one: one tab layer per frame, addressed through that frame's handle. */
|
|
704
|
-
.we-htabs {
|
|
705
|
-
position: absolute;
|
|
706
|
-
inset: 0;
|
|
707
|
-
pointer-events: none;
|
|
708
|
-
z-index: 1;
|
|
709
|
-
}
|
|
710
|
-
.we-htab {
|
|
711
|
-
position: absolute;
|
|
712
|
-
transform: translateY(-50%);
|
|
713
|
-
display: flex;
|
|
714
|
-
align-items: center;
|
|
715
|
-
gap: calc(9 * var(--we-content, 1px));
|
|
716
|
-
height: calc(34 * var(--we-content, 1px));
|
|
717
|
-
padding: 0 calc(${12+l_} * var(--we-content, 1px)) 0 calc(13 * var(--we-content, 1px));
|
|
718
|
-
background: #ffffff;
|
|
719
|
-
border: 1px solid #ebebe6;
|
|
720
|
-
border-radius: calc(9 * var(--we-content, 1px)) 0 0 calc(9 * var(--we-content, 1px));
|
|
721
|
-
box-shadow: 0 10px 24px -12px rgba(20,18,13,0.34);
|
|
722
|
-
color: #4a4842;
|
|
723
|
-
font: inherit;
|
|
724
|
-
cursor: pointer;
|
|
725
|
-
opacity: 1;
|
|
726
|
-
pointer-events: auto;
|
|
727
|
-
transition: transform 0.2s cubic-bezier(0.2,0.7,0.3,1),
|
|
728
|
-
border-color 0.18s, box-shadow 0.18s;
|
|
729
|
-
}
|
|
730
|
-
.we-htab-eye {
|
|
731
|
-
display: grid;
|
|
732
|
-
place-items: center;
|
|
733
|
-
flex: 0 0 auto;
|
|
734
|
-
color: #8a877e;
|
|
735
|
-
transition: color 0.18s;
|
|
736
|
-
}
|
|
737
|
-
.we-htab-eye svg { width: calc(14 * var(--we-content, 1px)); height: calc(14 * var(--we-content, 1px)); }
|
|
738
|
-
.we-htab-name {
|
|
739
|
-
font-size: calc(13 * var(--we-content, 1px));
|
|
740
|
-
font-weight: 600;
|
|
741
|
-
letter-spacing: -0.01em;
|
|
742
|
-
color: #14180F;
|
|
743
|
-
white-space: nowrap;
|
|
744
|
-
}
|
|
745
|
-
.we-htab:hover {
|
|
746
|
-
transform: translateY(-50%) scale(1.07);
|
|
747
|
-
border-color: rgba(15,42,34,0.5);
|
|
748
|
-
box-shadow: 0 13px 30px -12px rgba(15,42,34,0.45);
|
|
749
|
-
}
|
|
750
|
-
.we-htab:hover .we-htab-eye { color: #0F2A22; }
|
|
751
|
-
.we-htab:focus-visible {
|
|
752
|
-
outline: none;
|
|
753
|
-
transform: translateY(-50%) scale(1.07);
|
|
754
|
-
border-color: #0F2A22;
|
|
755
|
-
box-shadow: 0 0 0 3px #F3F6EF, 0 13px 30px -12px rgba(15,42,34,0.45);
|
|
756
|
-
}
|
|
757
|
-
/* Hover/focus swaps the eye-off glyph to the eye glyph in place — no width
|
|
758
|
-
change, no sliding label. Only one glyph is in flow at a time, so the eye
|
|
759
|
-
slot's grid keeps the shown glyph centered. */
|
|
760
|
-
.we-htab-eye-on { display: none; }
|
|
761
|
-
.we-htab:hover .we-htab-eye-off,
|
|
762
|
-
.we-htab:focus-visible .we-htab-eye-off { display: none; }
|
|
763
|
-
.we-htab:hover .we-htab-eye-on,
|
|
764
|
-
.we-htab:focus-visible .we-htab-eye-on { display: block; }
|
|
765
|
-
|
|
766
|
-
@media (prefers-reduced-motion: reduce) {
|
|
767
|
-
.we-canvas-stage,
|
|
768
|
-
.we-canvas-frame > iframe,
|
|
769
|
-
.we-chrome-ring,
|
|
770
|
-
.we-chrome-label,
|
|
771
|
-
.we-guide,
|
|
772
|
-
.we-htab,
|
|
773
|
-
.we-frame-toggle {
|
|
774
|
-
transition: none !important;
|
|
775
|
-
}
|
|
776
|
-
}
|
|
777
|
-
`,t5='<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>',ud="we-canvas-frame",ew="we-frame-titlebar",tw="we-canvas-frame-label",nw="we-htabs",iw="we-chrome-overlay";function qm(e,t,a){const r=e.querySelector(t);if(r)return r;const s=a();return e.appendChild(s),s}function n5(e,t){const a=e.querySelector(`:scope > .${ew}`);if(a)return a;const r=t.createElement("div");return r.className=ew,e.insertBefore(r,e.firstChild),r}function i5(e){for(let t=e.nextElementSibling;t;t=t.nextElementSibling)if(t.classList.contains(ud))return t;return null}function a5(e,t){const a=e.ownerDocument,r=n5(e,a),s=t.label??"",c=r.querySelector(`:scope > .${tw}`);if(s==="")c==null||c.remove();else{const v=c??r.insertBefore(a.createElement("div"),r.firstChild);v.className=tw,v.textContent!==s&&(v.textContent=s)}const u=qm(e,":scope > iframe",()=>a.createElement("iframe"));t.title!==void 0&&u.title!==t.title&&(u.title=t.title),t.sandbox!==void 0&&u.getAttribute("sandbox")!==t.sandbox&&u.setAttribute("sandbox",t.sandbox),u.getAttribute("srcdoc")!==t.srcdoc&&u.setAttribute("srcdoc",t.srcdoc);const m=qm(e,`:scope > .${nw}`,()=>{const v=a.createElement("div");return v.className=nw,v}),p=qm(e,`:scope > .${iw}`,()=>{const v=a.createElement("div");return v.className=iw,v.setAttribute("aria-hidden","true"),v});p.childElementCount===0&&(p.innerHTML=t5);const y=t.pageBox;return y?(e.style.setProperty("--we-page-w",`${y.width}px`),e.style.setProperty("--we-page-h",`${y.height}px`),e.style.setProperty("--we-page-radius","0px")):(e.style.removeProperty("--we-page-w"),e.style.removeProperty("--we-page-radius")),{iframe:u,overlay:p,tabLayer:m}}function r5(e,t,a){const{iframe:r}=a;return{key:t,wrapper:e,iframe:r,overlay:a.overlay,tabLayer:a.tabLayer,get doc(){return r.contentDocument},setPageHeight(s){e.style.setProperty("--we-page-h",`${s}px`)}}}function o5(e,t){const a=e.ownerDocument,r=new Map;for(const p of Array.from(e.querySelectorAll(`:scope > .${ud}`))){const y=p.dataset.frameKey;y!==void 0&&r.set(y,p)}const s=[],c=[],u=new Set;for(const p of t){let y=r.get(p.key);y||(y=a.createElement("div"),y.className=ud,y.dataset.frameKey=p.key);const v=a5(y,p);s.push(y),u.add(p.key),c.push(r5(y,p.key,v))}let m=null;for(let p=s.length-1;p>=0;p--){const y=s[p];y&&((y.parentNode!==e||i5(y)!==m)&&e.insertBefore(y,m),m=y)}return r.forEach((p,y)=>{u.has(y)||p.remove()}),t.some(p=>(p.label??"")!=="")?e.style.setProperty("--we-frame-label-lane",`${JC}px`):e.style.removeProperty("--we-frame-label-lane"),c}function s5(e,t,a){const r=[];for(const s of e){const c=s.doc;if(!c)continue;const u=t.resolveSelectionEls(c,a);u.length>0&&r.push({handle:s,els:u})}return r}function l5(e,t){const a=e==null?void 0:e.querySelector(":scope > .we-guide");if(a){if(t===null){a.removeAttribute("data-active");return}a.style.setProperty("--we-g-bleed",`${t}px`),a.setAttribute("data-active","true")}}const c5=24;function u5(e,t,a,r){if(e.height+2*r<=t)return e.top>=r&&e.bottom<=t-r?null:e.top<r?Math.max(0,a+e.top-r):Math.max(0,a+e.bottom-(t-r));const c=Math.max(0,a+e.top-r);return Math.abs(c-a)<1?null:c}function d5(e,t,a,r){const s=t+e.top*a-r,c=e.height*a;return{top:s,bottom:s+c,height:c}}const aw="__trEditorBridge",f5=1,c_=new WeakMap;function h5(e){return e?e.kind==="section"?{kind:"section",instanceId:e.instance_id}:{kind:"slot",instanceId:e.instance_id,slotId:e.slot_id,...e.item_index!==void 0?{itemIndex:e.item_index}:{},...e.field_name!==void 0?{fieldName:e.field_name}:{}}:null}function m5(e){const t=e[aw];if(t)return t;const a=new Set,r={protocol:f5,selection:null,subscribe(s){return a.add(s),()=>{a.delete(s)}}};return c_.set(r,a),e[aw]=r,r}function p5(e,t,a){if(!e||!t)return;const s=m5(e);s.selection=h5(a);for(const c of[...c_.get(s)??[]])c()}const y5=6,Ar=12,g5=288,b5='[aria-modal="true"]';function cs(e){var c;const t=window.innerWidth,a=window.innerHeight,r=(c=e.closest(b5))==null?void 0:c.getBoundingClientRect(),s=r?{top:Math.max(0,r.top),left:Math.max(0,r.left),right:Math.min(t,r.right),bottom:Math.min(a,r.bottom)}:{top:0,left:0,right:t,bottom:a};return{rect:e.getBoundingClientRect(),bounds:s,viewportHeight:a,viewportWidth:t}}function uc({rect:e,bounds:t,viewportHeight:a},{maxHeight:r=g5,minWidth:s=0,gap:c=y5,height:u}={}){if(e.bottom<t.top||e.top>t.bottom||e.right<t.left||e.left>t.right)return null;const m=t.bottom-e.bottom-c-Ar,p=e.top-t.top-c-Ar,y=u??Math.min(r,220),v=m<y&&p>m,w=Math.max(0,Math.min(r,v?p:m)),k=Math.max(t.left+Ar,Math.min(e.left,t.right-Math.max(e.width,s)-Ar)),E={left:k,width:e.width,maxWidth:Math.max(e.width,s,t.right-k-Ar),maxHeight:w};return v?{...E,bottom:a-e.top+c}:{...E,top:e.bottom+c}}const u_=Symbol.for("@homepages/concrete:row:of"),d_=Symbol.for("@homepages/concrete:element:of");function Ry(e){return typeof e=="object"&&e!==null&&e.kind==="sibling"&&qn(e.of)}function v5(e,t){return e===t||Gt(e)&&Gt(t)&&e.key===t.key}function f_(e,t){const a=[...e];for(const r of t??[])a.some(s=>v5(s,r))||a.push(r);return a}function vs(e){return typeof e=="object"&&e!==null&&"section"in e&&typeof e.section=="string"&&"slot"in e&&typeof e.slot=="string"}function h_(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="row"&&"field"in e&&typeof e.field=="string"}function dc(e){if(!h_(e))return;const t=e[u_];return typeof t=="object"&&t!==null?t:void 0}function Va(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="element"}function x5(e){if(!Va(e))return;const t=e[d_];return typeof t=="object"&&t!==null?t:void 0}function Gt(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="home"&&"key"in e&&typeof e.key=="string"}function w5(e){return typeof e=="object"&&e!==null&&"head"in e&&typeof e.head=="object"&&"declaration"in e&&qn(e.declaration)}function qn(e){return typeof e=="object"&&e!==null&&"type"in e&&typeof e.type=="string"}function Fm(e,t){if(typeof e=="function")return{kind:"compute",fn:e,reads:[]};const a=t;if(e.requires===void 0)return{kind:"compute",fn:a,reads:[...e.reads]};if(!Array.isArray(e.requires)||e.requires.length===0)throw new Error("compute(): `requires` names at least one read — omit it when the value needs none.");return{kind:"compute",fn:a,reads:f_(e.reads,e.requires),requires:[...e.requires]}}function Ga(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="compute"&&"fn"in e&&typeof e.fn=="function"}function Ty(e){return typeof e=="object"&&e!==null&&e.kind==="compute"&&typeof e.fn=="function"}function k5(e){return Ty(e.source)}const _5="written-without-pick-none",S5={write:new Set(["brief","reads","requires","none"]),pick:new Set(["brief","reads","requires","unique"]),find:new Set(["brief","reads","requires","none"])};function Dy(e,t){const a=`fill.${e}()`;if(typeof t.brief!="string"||t.brief.trim()==="")throw new Error(`${a}: \`brief\` is required — it is the whole instruction the model is given.`);const r=S5[e],s={kind:"fill",verb:e};for(const[u,m]of Object.entries(t)){if(!r.has(u)){const p=u==="none"&&e==="pick"?` A pick judges every candidate, so selecting none is already an outcome its brief steers — \`concrete upgrade\` drops \`none\` from every \`fill.pick\` (the \`${_5}\` codemod).`:u==="count"?" A fill takes no count: the list's own `min` and `max` bound how many items it fills.":u==="cap"?" A write's budget is its holder's `cap` — a text slot's own, or a list's `item: text.short({ cap })`.":u==="of"&&e==="find"?" A find names no candidates: the platform's lookup for its holder's kind supplies the value.":u==="of"&&e==="pick"?" A pick chooses from its holder's candidates — a select's values, a media slot's `from` list of its kinds, a row's table, a list's item's.":u==="of"?" The kind a write produces is its holder's — a text slot's own, a list's `item`, a label's text slot.":"";throw new Error(`${a}: "${u}" is not an option — it takes ${[...r].map(y=>`\`${y}\``).join(", ")}, and everything the model should know goes in the brief.${p}`)}if(u==="none"&&m!==void 0&&m!==!0)throw new Error(`${a}: \`none\` is \`true\` or absent — it admits the empty answer, and the brief's last sentence says when nothing is right.`);if(u==="unique"&&m!==void 0&&typeof m!="boolean")throw new Error(`${a}: \`unique\` is a boolean — \`false\` lets a pick repeat an element.`);if(u==="requires"&&m!==void 0&&(!Array.isArray(m)||m.length===0))throw new Error(`${a}: \`requires\` names at least one read — omit it when the fill needs none.`);m!==void 0&&(s[u]=u==="reads"||u==="requires"?[...m]:m)}const c=s.requires;return c!==void 0&&(s.reads=f_(s.reads??[],c)),s}function E5(e){return Dy("write",e)}function j5(e){return Dy("pick",e)}function O5(e){return Dy("find",e)}const ji={write:E5,pick:j5,find:O5};function Za(e,t){if(Vr(e))return[e];if(!Array.isArray(e)||!e.every(s=>typeof s=="object"&&s!==null))return;if(e.length===0)throw new Error(`${t} declares \`source: []\` — a list of fills names at least one fill, and a holder nothing fills declares no \`source\`.`);const a=e.filter(s=>!Vr(s)).length;if(a===0)return e;const r=a<e.length?"a derivation beside a fill":a>1?"several derivations":"a derivation in a list";throw new Error(`${t}'s \`source\` lists ${r} — \`source\` takes one derivation (a fact, a slot, a row's member, the element, a \`compute()\`) or an ordered list of fills: a holder has one write path, and a derived value has no writer beside it.`)}function Ud(e){return Vr(e)||Array.isArray(e)&&e.length>0&&e.every(Vr)}function Vr(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="fill"&&"verb"in e&&(e.verb==="write"||e.verb==="pick"||e.verb==="find")&&"brief"in e&&typeof e.brief=="string"}const Ly=Symbol.for("@homepages/concrete:fill:declaration");function A5(e){return Ud(e)?{[Ly]:Vr(e)?[e]:[...e]}:{}}function Jr(e){if(!(typeof e!="object"||e===null))return e[Ly]}const N5=["Basement","Ground","1st floor","2nd floor","3rd floor","4th floor","Penthouse"],rw=["id","slot","index","def","value","present","enclosing"],eo=["image","video","tour","document"];function yn(e){return eo.includes(e)}function xs(e){return e==="media"||yn(e)}const Wa={cutout:{label:"Background removed",kinds:["image"],site:"holder",options:{enclosed:{required:!1,type:"string",values:["clear","keep"]}}},autocrop:{label:"Cropped to its subject",kinds:["image"],site:"holder",options:{brief:{required:!0,type:"string"}}},probe:{label:"Probed",kinds:["image","video","document"],site:"kind",options:{}},understand:{label:"Understood",kinds:["image","video","document","tour"],site:"kind",options:{}},preview:{label:"Preview",kinds:["image","video","document"],site:"kind",options:{}},ladder:{label:"Renditions",kinds:["image","video","document"],site:"kind",options:{}},transcode:{label:"Transcoded",kinds:["video"],site:"kind",options:{}},poster:{label:"Poster",kinds:["video","document"],site:"kind",options:{}},rasterize:{label:"Pages rasterized",kinds:["document"],site:"kind",options:{}},fetch:{label:"Link fetched",kinds:["video","tour"],site:"kind",options:{}},tour_details:{label:"Tour details",kinds:["tour"],site:"kind",options:{}},crop:{label:"Cut to its crop",kinds:["image"],site:"place",options:{}}},m_=Object.keys(Wa),M5=m_.filter(e=>Wa[e].site==="holder");m_.filter(e=>Wa[e].site==="kind");function ow(e){return typeof e=="string"&&Object.hasOwn(Wa,e)}function p_(e){if(typeof e=="string")return ow(e)?{kind:"process",verb:e}:null;if(typeof e!="object"||e===null||Array.isArray(e))return null;const{kind:t,verb:a}=e;return t==="process"&&ow(a)?e:null}function zy(e){const t=Wa[e.verb],a=Object.keys(t.options),r=a.length>0?`it takes ${a.map(s=>`\`${s}\``).join(", ")}`:"it takes none";for(const[s,c]of Object.entries(e)){if(s==="kind"||s==="verb"||c===void 0)continue;if(s==="reads")return`\`${e.verb}\` takes no \`reads\` — a process is about one asset, never the property`;const u=t.options[s];if(u===void 0){const m=s==="aspect"&&e.verb==="autocrop"?"; its aspect is the holder's `crop` — the aspect it locks, free form where it locks none":"";return`\`${e.verb}\` takes no option "${s}" — ${r}${m}`}if(u.values!==void 0){if(typeof c!="string"||!u.values.includes(c))return`\`${e.verb}\`'s \`${s}\` is one of ${u.values.map(m=>`"${m}"`).join(", ")}`;continue}if(typeof c!==u.type||typeof c=="string"&&c.trim()==="")return`\`${e.verb}\`'s \`${s}\` is a non-empty ${u.type}`}for(const[s,c]of Object.entries(t.options))if(c.required&&e[s]===void 0)return`\`${e.verb}\` requires \`${s}\``;return null}function Ka(e){const{type:t,kinds:a}=e;if(t==="media"){const r=Array.isArray(a)?a.filter(s=>typeof s=="string"&&yn(s)):[];return r.length>0?r:eo}return typeof t=="string"&&yn(t)?[t]:[]}function y_(e){const{kinds:t,process:a}=e;if(t!==void 0){if(e.type!=="media")return"declares `kinds` — only `media()` leaves its kind open; a kind's own builder fixes it";if(!Array.isArray(t)||t.length===0||!t.every(c=>typeof c=="string"&&yn(c)))return`declares \`kinds\` ${JSON.stringify(t)} — a non-empty list of ${eo.join(", ")}`}if(a===void 0)return null;const r=M5.map(c=>`process.${c}()`).join(", ");if(!Array.isArray(a)||a.length===0)return`declares \`process\` ${JSON.stringify(a)} — a non-empty list of processes (${r})`;const s=new Set;for(const c of a){const u=p_(c);if(u===null)return`processes ${JSON.stringify(c)}, which is no process (${r})`;const{verb:m}=u,p=Wa[m];if(p.site==="kind")return`processes "${m}", which every ${p.kinds.join(", ")} gets from birth on its kind's row — never a holder's to declare`;if(p.site==="place")return`processes "${m}", which every ${p.kinds.join(", ")} place gets wherever its value carries a crop — never a holder's to declare`;if(s.has(m))return`processes "${m}" twice — a holder declares each process once`;s.add(m);const y=zy(u);if(y!==null)return`processes "${m}" with options that do not fit: ${y}`;const v=Ka(e).filter(g=>!p.kinds.includes(g));if(v.length>0)return`processes "${m}", which applies to ${p.kinds.join(", ")} and not to ${v.join(", ")}`}return null}const C5=new Set(["application/pdf","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/msword","application/vnd.ms-excel","application/vnd.ms-powerpoint","text/plain","text/csv"]);function g_(e){const t=(e.split(";")[0]??"").trim().toLowerCase();return t.startsWith("image/")?"image":t.startsWith("video/")?"video":C5.has(t)?"document":null}function b_(e){const t=fc(e);if(t===null)return null;const a=Ja[t].kind;return a==="tour"||a==="video"?a:null}const R5=["name","title","org_name","email","phone","website","instagram","linkedin","x","facebook","headshot","logo_dark","logo_light"],T5=["headshot","logo_dark","logo_light"],v_={property:{latitude:"lat",longitude:"lon"},contact:{address:"contact_address"}},D5={address:{role:"bindable",container:"property",value_type:"text",fields:{display:{value_type:"text"},street:{value_type:"text"},street_no_type:{value_type:"text"},city:{value_type:"text"},state:{value_type:"text"},postal:{value_type:"text"},unit:{value_type:"text"}}},address_street:{role:"bindable",container:"property",value_type:"text"},address_unit:{role:"bindable",container:"property",value_type:"text"},address_city:{role:"bindable",container:"property",value_type:"text"},address_state:{role:"bindable",container:"property",value_type:"text"},address_postal:{role:"bindable",container:"property",value_type:"text"},listing_intent:{role:"bindable",container:"property",value_type:"text",writeback:{kind:"property",column:"listing_intent"}},lat:{role:"bindable",container:"property",value_type:"number"},lon:{role:"bindable",container:"property",value_type:"number"}},x_={units:{role:"bindable",container:"property",value_type:"unit_list",row:{unit_id:{path:"unit_id",value_type:"text"},position:{path:"position",value_type:"number"},floor_plans:{path:"floor_plans",value_type:"image_list",row:{id:{value_type:"text"},floor_label:{value_type:"text"},position:{value_type:"number"}}},unit_label:{path:"unit_label",value_type:"text",primary:!0,writeback:{column:"unit_label"}},beds:{path:"beds",value_type:"number",primary:!0,writeback:{column:"beds"}},baths:{path:"baths",value_type:"number",primary:!0,writeback:{column:"baths"}},sqft:{path:"sqft",value_type:"number",primary:!0,writeback:{column:"sqft"}},price:{path:"price",value_type:"text",primary:!0,writeback:{column:"price"}}}},comparables:{role:"bindable",container:"property",value_type:"comparable_list",row:{id:{path:"id",value_type:"text"},address_street:{path:"address_street",value_type:"text"},address_city:{path:"address_city",value_type:"text"},address_state:{path:"address_state",value_type:"text"},address_postal:{path:"address_postal",value_type:"text"},address:{path:"address",value_type:"text"},lat:{path:"lat",value_type:"number"},lng:{path:"lng",value_type:"number"},distance_m:{path:"distance_m",value_type:"number"},status:{path:"status",value_type:"text"},price:{path:"price",value_type:"number",writeback:{column:"price"}},price_period:{path:"price_period",value_type:"text"},sale_date:{path:"sale_date",value_type:"text",writeback:{column:"sale_date"}},beds:{path:"beds",value_type:"number",writeback:{column:"beds"}},baths:{path:"baths",value_type:"number",writeback:{column:"baths"}},sqft:{path:"sqft",value_type:"number",writeback:{column:"sqft"}},photo:{path:"photo_upload_id",value_type:"image"},year_built:{path:"year_built",value_type:"number"},lot_sqft:{path:"lot_sqft",value_type:"number"},stories:{path:"stories",value_type:"number"},units:{path:"units",value_type:"number"},hoa_monthly:{path:"hoa_monthly",value_type:"number"},list_price:{path:"list_price",value_type:"number"},listed_date:{path:"listed_date",value_type:"text"},mls_number:{path:"mls_number",value_type:"text"},description:{path:"description",value_type:"text"}}},contacts:{role:"bindable",container:"property",value_type:"contact_list",row:{id:{path:"id",value_type:"text"},primary:{path:"primary",value_type:"boolean"},name:{path:"name",value_type:"text",primary:!0,writeback:{column:"name"}},title:{path:"title",value_type:"text",primary:!0,writeback:{column:"title"}},org_name:{path:"org_name",value_type:"text",primary:!0,writeback:{column:"org_name"}},bio:{path:"bio",value_type:"text",primary:!0,writeback:{column:"bio"}},address:{path:"address",value_type:"text",primary:!0},email:{path:"email",value_type:"text",primary:!0,writeback:{column:"email"}},phone:{path:"phone",value_type:"text",primary:!0,writeback:{column:"phone"}},website:{path:"website_url",value_type:"text",primary:!0,writeback:{column:"website"}},instagram:{path:"instagram_url",value_type:"text",primary:!0,writeback:{column:"socials.instagram"}},linkedin:{path:"linkedin_url",value_type:"text",primary:!0,writeback:{column:"socials.linkedin"}},x:{path:"x_url",value_type:"text",primary:!0,writeback:{column:"socials.x"}},facebook:{path:"facebook_url",value_type:"text",primary:!0,writeback:{column:"socials.facebook"}},headshot:{path:"avatar_upload_id",value_type:"image",primary:!0},logo_dark:{path:"logo_dark_upload_id",value_type:"image",primary:!0},logo_light:{path:"logo_light_upload_id",value_type:"image",primary:!0}}}},w_={description:{role:"readable",path:"narrative.description",value_type:"text"},unit:{role:"readable",path:"units",value_type:"row",primary_of:"units"},contact:{role:"readable",path:"contacts",value_type:"row",primary_of:"contacts"}};function sw(e){const t=x_[w_[e].primary_of],a=v_[e]??{},r={};for(const[s,c]of Object.entries(t.row)){if(c.primary!==!0)continue;const u={role:"bindable",container:e,value_type:c.value_type};c.value_type==="image"&&(u.image=!0),c.writeback!==void 0&&(u.writeback=e==="unit"?{kind:"unit",column:c.writeback.column}:{kind:"contact",field:c.writeback.column}),r[a[s]??s]=u}return r}function L5(){return{...D5,...sw("unit"),...x_,...sw("contact"),...w_}}const ea=L5();function z5(e){const t={};for(const[a,r]of Object.entries(e)){if(r.role!=="bindable")continue;const s={container:r.container,value_type:r.value_type};r.image===!0&&(s.image=!0),r.writeback!==void 0&&(s.writeback=r.writeback),t[a]=s}return t}const xp=z5(ea),ta={units:{idKey:"unit_id",ownership:"property"},contacts:{idKey:"id",cap:12,min:1,ownership:"library"},comparables:{idKey:"id",ownership:"property"}},Gr={units:"property.units",contacts:"property.contacts",comparables:"property.comparables",commercial_spaces:"property.commercial_spaces"},k_={contacts:"library.contacts"};function Ya(e){return Object.hasOwn(ta,e)}const lw=Object.fromEntries([...Object.entries(Gr),...Object.entries(k_)].map(([e,t])=>[t,e]));function qt(e){if(typeof e!="string")return null;if(Object.hasOwn(ta,e))return{table:e,reading:"legacy"};const t=Object.hasOwn(lw,e)?lw[e]:void 0;return t===void 0?null:{table:t,reading:"registry"}}function Id(e){return(e==null?void 0:e.kind)==="home"?qt(e.key):null}function $5(e,t){var r;return((r=ea[e].row[t])==null?void 0:r.writeback)??null}function U5(e,t){const a=ea[e].row;return Object.hasOwn(a,t)?a[t]??null:null}const I5=["tour","video","social","listing","file","map"],Ja={matterport:{kind:"tour",label:"Matterport",pattern:/(^|\.)matterport\.com$/i,strategy:"api"},biganto:{kind:"tour",label:"Biganto",pattern:/(^|\.)biganto\.com$/i,strategy:"opengraph"},iguide:{kind:"tour",label:"iGUIDE",pattern:/(^|\.)youriguide\.com$/i,strategy:"opengraph"},kuula:{kind:"tour",label:"Kuula",pattern:/(^|\.)kuula\.co$/i,strategy:"opengraph"},momento360:{kind:"tour",label:"Momento360",pattern:/(^|\.)momento360\.com$/i,strategy:"opengraph"},cloudpano:{kind:"tour",label:"CloudPano",pattern:/(^|\.)cloudpano\.com$/i,strategy:"none"},asteroom:{kind:"tour",label:"Asteroom",pattern:/(^|\.)asteroom\.com$/i,strategy:"none"},zillow3d:{kind:"tour",label:"Zillow 3D Home",pattern:/(^|\.)zillow\.com$/i,path:/^\/view-3d-home\//i,strategy:"none"},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 fc(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!=="http:"&&t.protocol!=="https:")return null;for(const[a,r]of Object.entries(Ja))if(r.pattern.test(t.hostname)&&!(r.path&&!r.path.test(t.pathname)))return a;return null}function B5(e,t){const a=fc(t);return a===null?!1:a===e?!0:I5.includes(e)&&Ja[a].kind===e}const H5=new Set(eo.filter(e=>Object.values(Ja).some(t=>t.kind===e)));function $y(e){return e.filter(t=>H5.has(t))}function __(e){if(typeof e!="string"||!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;const t=new Date(`${e}T00:00:00Z`);return!Number.isNaN(t.getTime())&&t.toISOString().slice(0,10)===e}function q5(e){return typeof e=="string"&&/^[^\s@]+@[^\s@.]+(\.[^\s@.]+)+$/.test(e)}function F5(e){if(typeof e!="string"||!/^\+?[\d\s().-]+$/.test(e))return!1;const t=e.replace(/\D/g,"").length;return t>=7&&t<=15}function P5(e){try{return new URL(e)}catch{return null}}function zl(e){const t=e.trim();return t&&(/^https?:\/\//i.test(t)?t:`https://${t}`)}function Uy(e){const t=P5(e);if(t===null||t.protocol!=="http:"&&t.protocol!=="https:"||t.username!==""||t.password!=="")return!1;const a=t.hostname;return a.includes(".")&&!a.startsWith(".")&&!a.endsWith(".")}function V5(e){const t=e.trim();if(!t)return null;const a=fc(t);if(a==="matterport"){const r=new URL(t).searchParams.get("m");return r!==null&&/^[A-Za-z0-9]+$/.test(r)?`https://my.matterport.com/show/?m=${r}&nt=1`:null}return a!==null&&G5.has(a)?t:null}const G5=new Set(["biganto","iguide","kuula","momento360","cloudpano","asteroom","zillow3d"]);function S_(e,t){return[e,t].map(a=>(a??"").trim()).filter(a=>a!=="").join(", ")}const K5=["autocomplete","manual_pinned","resolved"],E_=["street","unit","city","state","postal"],Iy=[...E_,"latitude","longitude"];function Bd(e){return Iy.includes(e)}function Al(e){if(typeof e!="string")return null;const t=e.trim();return t===""?null:t}function cw(e,t){return typeof e=="number"&&Number.isFinite(e)&&Math.abs(e)<=t?e:null}function _i(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;const t=e,a=cw(t.latitude,90),r=cw(t.longitude,180),s=a!==null&&r!==null,c=t.source,u={street:Al(t.street),unit:Al(t.unit),city:Al(t.city),state:Al(t.state),postal:Al(t.postal),latitude:s?a:null,longitude:s?r:null,source:typeof c=="string"&&K5.includes(c)?c:null};return s||E_.some(m=>u[m]!==null)?u:null}function By(e){var t;return((t=/^\s*(\d{5})-?\d{4}\s*$/.exec(e))==null?void 0:t[1])??e}function Y5(e){const t=S_(e.street,e.unit),a=[e.state,e.postal===null?null:By(e.postal)].filter(s=>s!==null).join(" "),r=[t,e.city??"",a].filter(s=>s!=="").join(", ");return r===""?null:r}function Q5(e,t){const a=_i(e);return a===null?null:a[t]}const j_=["crop","cutout","mask_white","mask_black"],X5=["master","crop","cutout","mask_white","mask_black","poster","encode"];function Hd(e){return e!==null&&!(e.x<=0&&e.y<=0&&e.width>=1&&e.height>=1)}function Z5(e,t=e){return{id:t,file:e,crop:null,name:null,renditions:{crop:null,cutout:null,mask_white:null,mask_black:null}}}function W5(e){var t;return e.url!==null?e.url.replace(/^[a-z][a-z0-9+.-]*:\/\//i,""):((t=e.key)==null?void 0:t.split("/").pop())??e.id}function J5(e,t){const{id:a,renditions:r,...s}=e,c=e.kind==="image";return{...s,id:t.id,file:t.file,crop:c?t.crop:null,name:t.name!==null&&t.name!==""?t.name:W5(e),renditions:{...r,crop:c?t.renditions.crop:null,cutout:c?t.renditions.cutout:null,mask_white:c?t.renditions.mask_white:null,mask_black:c?t.renditions.mask_black:null}}}function e4(e){const{id:t,file:a,crop:r,name:s,renditions:c,...u}=e,{crop:m,cutout:p,mask_white:y,mask_black:v,...g}=c;return{file:{...u,id:a,renditions:g},value:{id:t,file:a,crop:r,name:s,renditions:{crop:m,cutout:p,mask_white:y,mask_black:v}}}}function Hy(e,t){return J5(e,t)}function t4(e){return e.url===null?"upload":"link"}function Si(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function qy(e){if(!Si(e))return!1;const{id:t,kind:a,renditions:r}=e;return typeof t=="string"&&typeof a=="string"&&yn(a)&&Si(r)}function qd(e){return Si(e)&&typeof e.id=="string"&&typeof e.file=="string"&&Si(e.renditions)&&!("kind"in e)}function n4(e){return Si(e)&&typeof e.file=="string"&&"picked"in e&&Si(e.renditions)&&!("id"in e)}function ws(e){return Si(e)&&typeof e.media=="string"&&e.media!==""}function i4(e){const t=e.asset_id;return typeof t=="string"&&t!==""?t:void 0}function Wi(e){if(Si(e))return ws(e)?e.media:qd(e)||qy(e)?e.id:n4(e)?e.picked??e.file:i4(e)}function wp(e,t){if(Array.isArray(e))for(const a of e)wp(a,t);else if(qd(e))t.has(e.id)||t.set(e.id,e);else if(Si(e)&&!qy(e))for(const a of Object.values(e))wp(a,t)}function Fd(e){const t=new Map;for(const[a,r]of Object.entries(e))a!=="files"&&wp(r,t);return t}function a4(e){return Object.hasOwn(e,"crop")||e.renditions!==void 0}function r4(e,t){const a=Object.hasOwn(t,"crop"),r=t.renditions??{},s=a?null:e.renditions,c=Object.fromEntries(j_.map(u=>[u,Object.hasOwn(r,u)?r[u]??null:(s==null?void 0:s[u])??null]));return{crop:a?t.crop??null:e.crop,renditions:c}}function Fy(e,t){return a4(t)?{...e,...r4({crop:e.crop,renditions:e.renditions},t)}:e}function dd(e){if(Array.isArray(e))return e.map(dd);if(!Si(e))return e;if(qy(e)||qd(e))return{asset_id:e.id};if(ws(e))return{asset_id:e.media};const t={};for(const[a,r]of Object.entries(e))t[a]=dd(r);return t}const fd="property.uploads";function hc(e){if(typeof e=="string"&&e!=="")return[e];if(!(!Array.isArray(e)||e.length===0||!e.every(t=>typeof t=="string"&&t!=="")))return[...e]}function hd(e){const t=Ka(e);if(t.length===0)return null;const a=hc(e.from);return a===void 0?{kinds:t}:{kinds:t,from:a}}function Fl(e){return{kinds:e.kinds,from:hc(e.from)??[fd]}}function O_(e){return Fl(e).from[0]}function kp(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function o4(e){if(Wi(e)!==void 0||!kp(e))return e;for(const t of Object.values(e))if(Wi(t)!==void 0)return t}function A_(e,t){const[a,...r]=t.split(".");if(a!=="property"||r.length===0)return null;let s=e;for(const c of r)if(s=Array.isArray(s)?s.find(u=>kp(u)&&u.id===c):kp(s)&&Object.hasOwn(s,c)?s[c]:void 0,s===void 0)return null;return Array.isArray(s)?s.flatMap(c=>{const u=o4(c),m=Wi(u);return m===void 0?[]:[{id:m,value:u}]}):null}function s4(e,t){const a=Fd(e),r=new Set,s=[];for(const c of hc(t.from)??[])for(const{id:u,value:m}of A_(e,c)??[]){if(r.has(u))continue;const p=a.get(u),y=p===void 0||!Object.hasOwn(e.files,p.file)?void 0:e.files[p.file];if(p===void 0||y===void 0||!t.kinds.includes(y.kind))continue;r.add(u);const v=ws(m)?Fy(p,m):p;s.push({id:u,value:v,file:y,list:c})}return s}function l4(e,t){const a={uploads:(e[fd]??t.map(r=>r.id)).map(r=>Z5(r))};for(const[r,s]of Object.entries(e)){const[c,u,...m]=r.split(".");if(c!=="property"||u===void 0||m.length>0)throw new Error(`media candidates: "${r}" names no top-level property list`);r!==fd&&(a[u]=s.map(p=>({media:p})))}return{...a,files:Object.fromEntries(t.map(r=>[r.id,r]))}}function c4(e,t){const a=new Map(t.map(c=>[c.id,e4(c)])),r=l4(e,[...a.values()].map(({file:c})=>c)),s=r.uploads.map(c=>{var u;return((u=a.get(c.id))==null?void 0:u.value)??c});return{...r,uploads:s}}function u4(e){if(e===null||typeof e!="object")return null;const t=e;return t.type!=="media"||t.kinds===void 0||y_({type:"media",kinds:t.kinds})!==null||t.from!==void 0&&hc(t.from)===void 0?null:hd(t)}function d4(e,t){const a=new Set(e),r=t.filter(u=>a.has(u)),s=new Set(r);let c=0;return e.map(u=>s.has(u)?r[c++]:u)}const N_=new Map;function M_(e){N_.set(e.home,e)}function f4(e){const t=N_.get(e);if(t===void 0)throw new Error(`fact registry: the ${e} registry is not declared yet — import @homepages/template-contracts/fact-registry (or ./fact-keys, ./table-members) before reading it.`);return t}const C_=new Set(["text","select","email","phone","url","date"]);function to(e){switch(e.type){case"number":case"image":case"address":return e.type;case"list":return h4(e.element);default:return C_.has(e.type)?"text":null}}function h4(e){return e.type==="object"?"row_list":e.type==="image"?"image_list":e.type==="number"?"number_list":C_.has(e.type)?"text_list":null}function _p(e){if(e.type==="list"){const a=e.element;if(a.type!=="object")return _p(a);for(const r of Object.values(a.fields)){const s=_p(r);if(s!==void 0)return s}return}const t=e.from===void 0?null:hd(e);return(t==null?void 0:t.from)===void 0?void 0:t}function m4(e){if(e.type!=="list")return!1;const t=e.element.type;return yn(t)||t==="media"}function p4(e){return Object.entries(e.pages).flatMap(([t,a])=>m4(a.declaration)?[`${e.home}.${t}`]:[])}function y4(e){return Ty(e.source)}const uw=new WeakMap;function R_(e){let t=uw.get(e);return t===void 0&&(t=g4(e),uw.set(e,t)),t}function g4(e){const t=new Map;for(const[a,r]of Object.entries(e.pages)){const s=r.declaration;if(s.type==="list")continue;const c=`${e.home}.${a}`;if(s.type==="address"){t.set(c,{declaration:s,value_type:"address"});for(const u of Iy)t.set(`${c}.${u}`,{declaration:s,value_type:T_(u)});continue}t.set(c,{declaration:s,value_type:b4(c,s)})}return t}function b4(e,t){if(t.type==="image")return"image";if(yn(t.type)||t.type==="media")throw new Error(`fact registry: ${e} is a single ${t.type} — a top-level media fact is an image, the one media value a slot binds.`);return t.type==="number"?"number":"text"}function T_(e){return e==="latitude"||e==="longitude"?"number":"text"}function D_(e){return Object.hasOwn(k_,e)?"library":"property"}function L_(e,t){const a=e.pages[t],r=(a==null?void 0:a.declaration.type)==="list"?a.declaration.element:void 0;if((r==null?void 0:r.type)!=="object")throw new Error(`fact registry: the ${e.home} registry declares no list of objects "${t}"`);return r.fields}function ks(e){return L_(f4(D_(e)),e)}function _s(e,t){return Object.hasOwn(e,t)?e[t]:void 0}function v4(e){if(typeof e!="string")return null;const t=e.lastIndexOf(".");if(t<=0)return null;const a=qt(e.slice(0,t));if((a==null?void 0:a.reading)!=="registry")return null;const r=e.slice(t+1),s=_s(ks(a.table),r);return s!==void 0&&to(s)==="row_list"?{table:a,member:r}:null}function x4(e){if(typeof e!="string")return null;const t=e.lastIndexOf(".");if(t<=0)return null;const a=e.slice(0,t),r=qt(a);if((r==null?void 0:r.reading)!=="registry")return null;const s=e.slice(t+1);return _s(ks(r.table),s)===void 0?null:{table:r.table,tableKey:a,member:s}}const Py=["type","label","from","source","locked","when"],Sp=new Set(Py),Vy=Symbol.for("@homepages/concrete:table-of");function z_(e,t){return Object.defineProperty(e,Vy,{value:t,enumerable:!1})}function Gy(e){if(typeof e!="object"||e===null)return null;const t=e[Vy];return typeof t=="object"&&t!==null?t:null}function w4(e){if(e.reading==="registry")return Object.keys(ks(e.table));const t=ea[e.table].row;return Object.keys(t).filter(a=>a!==ta[e.table].idKey&&!Sp.has(a))}function Pl(e,t){return Object.freeze({kind:"row",field:t,[u_]:e})}function k4(e,t){return new Proxy(Pl(e,t),{get(a,r,s){return typeof r=="string"&&!(r in a)&&Bd(r)?Pl(e,`${t}.${r}`):Reflect.get(a,r,s)}})}const $_=Symbol.for("@homepages/concrete:row:definition");function Ei(e){const t=e[$_];return typeof t=="object"&&t!==null?t:e}function _4(e,t){if(e.reading==="legacy")return!1;const a=_s(ks(e.table),t);return a!==void 0&&to(a)==="address"}function dw(e,t){if(e.reading==="legacy"){const r=ea[e.table].row;return Object.hasOwn(r,t)?String(r[t].value_type):void 0}const a=_s(ks(e.table),t);return a===void 0?void 0:String(to(a)??"")}const S4=new Set(["then","toJSON","$$typeof","asymmetricMatch","nodeType","tagName","@@iterator"]);function E4(e,t,a=[]){const r=t===null?null:new Set(w4(t)),s=new Proxy(e,{get(c,u,m){if(u===$_)return c;if(typeof u!="string")return Reflect.get(c,u,m);if(t!==null&&r!==null){const p=[t,...a],y=p.map(g=>g===t?r.has(u)?dw(t,u):void 0:dw(g,u));if(y.every(g=>g===void 0))return Reflect.get(c,u,m);const v=y.findIndex(g=>g===void 0||g!==y[0]);if(v===-1)return _4(t,u)?k4(s,u):Pl(s,u);if(u in c||Sp.has(u))return Reflect.get(c,u,m);throw new Error(`row: "${String(c.label)}" reads the member "${u}", which its \`from\` table ${p[v].table} ${y[v]===void 0?"lacks":"holds at another kind"} — every table a row names carries every member its readers read, at one kind.`)}return u in c||Sp.has(u)?Reflect.get(c,u,m):S4.has(u)?void 0:Pl(s,u)}});return s}function j4(e){const t=new Proxy(e,{get(a,r,s){return typeof r=="string"&&!(r in a)&&Bd(r)?Pl(t,r):Reflect.get(a,r,s)}});return t}function fw(e,t){const a=e.map(t);return a.some((r,s)=>r!==e[s])?a:void 0}function hw(e,t){const a=e.reads===void 0?void 0:fw(e.reads,t),r=e.requires===void 0?void 0:fw(e.requires,t);return a===void 0&&r===void 0?e:{...e,...a===void 0?{}:{reads:a},...r===void 0?{}:{requires:r}}}function us(e,t){const a=Ei(e);let r;const s=a.source;if(s!==void 0)if(Ga(s)){const u=hw(s,t);u!==s&&(r={...a,source:u})}else{const u=t(s);u!==s&&(r={...a,source:u})}const c=Jr(a);if(c!==void 0){let u=!1;const m=c.map(p=>{const y=hw(p,t);return y!==p&&(u=!0),y});u&&(r={...r??a,[Ly]:m})}return r??a}function O4(e){return t=>{const a=dc(t);if(a===void 0)return t;const r=e.get(a);return r===void 0?t:{kind:"row",slot:r,field:t.field}}}const U_=new Set(["row","address"]);function A4(e){const t=new Map;for(const[a,r]of Object.entries(e))typeof r=="object"&&r!==null&&U_.has(r.type)&&t.set(r,a);return t}function N4(e,t,a){const r=[e.source];us(e,s=>(r.push(s),s));for(const[s,c]of t)if(!(s===e||c===a))for(const u of Py){const m=s[u];if(m!==void 0&&r.includes(m))return`${c}.${u}`}}function M4(e){const t=e.slice(e.indexOf(".")+1);return`reads \`${e}\`, which is the row's own \`${t}\`, not a member — a row's ${Py.map(a=>`\`${a}\``).join(", ")} are its slot definition's, and its table has no member named \`${t}\`.`}function Vl(e){return U_.has(e.type)?{...Ei(e)}:e}const C4={"property.listing_intent":"listing_intent","property.description":"description","property.address":"address","property.address.street":"address_street","property.address.unit":"address_unit","property.address.city":"address_city","property.address.state":"address_state","property.address.postal":"address_postal","property.address.latitude":"lat","property.address.longitude":"lon"},I_={units:{label:"unit_label",beds:"beds",baths:"baths",sqft:"sqft",price:"price"},contacts:{headshot:"headshot",name:"name",title:"title",org_name:"org_name",email:"email",phone:"phone",website:"website",bio:"bio",logo_dark:"logo_dark",logo_light:"logo_light",instagram:"instagram",linkedin:"linkedin",x:"x",facebook:"facebook"},comparables:{price:"price",sale_date:"sale_date",beds:"beds",baths:"baths",sqft:"sqft",photo:"photo",year_built:"year_built",lot_sqft:"lot_sqft",stories:"stories",units:"units",hoa_monthly:"hoa_monthly",list_price:"list_price",listed_date:"listed_date",mls_number:"mls_number",description:"description",status:"status",distance_m:"distance_m",price_period:"price_period"}};function R4(e,t){const a=I_[e];return Object.hasOwn(a,t)?a[t]:null}function T4(e,t){const a=I_[e];return Object.keys(a).find(r=>a[r]===t)??null}function D4(e){var r;const t=C4;if(Object.hasOwn(t,e))return t[e];const a=(r=qt(e))==null?void 0:r.table;return a!==void 0&&Ya(a)?a:e}function Ky(e,t){for(const a of Za(t,e)??[])if(!(a.verb!=="pick"||a.of===void 0))throw new Error(`${e}'s \`fill.pick\` states \`of\` — a pick chooses from its holder's \`from\`; remove \`of\` and name the candidates in \`from\`.`)}function L4(e){return vs(e)?{kind:"section",section:e.section,slot:e.slot}:qn(e)?{kind:"sibling",of:e}:Gt(e)?{kind:"home",key:e.key}:e}function ui(e){return Yy(e,L4)}function z4(e,t,a){if(!(t!==!0||a===void 0)){if(Ga(a)){if(a.requires!==void 0&&a.requires.length>0)return;throw new Error(`${e} is \`required\` and sourced by a \`compute()\` naming no \`requires\` — nothing to require. Name the reads the value cannot do without: \`compute({ reads, requires: [fact.property.address] }, …)\`.`)}if(vs(a)||qn(a)||Ry(a))throw new Error(`${e} is \`required\` and mirrors another slot — a mirror requires its upstream; mark that slot \`required\` instead.`)}}function Yy(e,t){const a=e.source;z4(e.label??"a slot",e.required,a);const r=a!==void 0&&Za(a,e.label??"a slot")===void 0;return{...e.locked===!0?{locked:!0}:{},...e.required===!0?{required:!0}:{},...r?{source:t(a)}:{},...A5(a),...e.label!==void 0?{label:e.label}:{},...e.placeholder!==void 0?{placeholder:e.placeholder}:{},...e.when!==void 0?{when:e.when}:{}}}function Pm(e){return t=>({type:"text",size:e,...ui(t),...t.cap!==void 0?{cap:t.cap}:{}})}const pn={short:Pm("short"),medium:Pm("medium"),long:Pm("long")};function sn(e){return{type:"number",...ui(e),...e.thousandsSep!==void 0?{thousandsSep:e.thousandsSep}:{},...e.decimals!==void 0?{decimals:e.decimals}:{},...e.maxDigits!==void 0?{maxDigits:e.maxDigits}:{}}}function $4(e){const t=e.source;return{type:"select",...ui(e),...Gt(t)?{options:{source:D4(t.key)}}:{},...e.creatable!==void 0?{creatable:e.creatable}:{}}}function U4(e){if(Gt(e.source))throw new Error(`select: "${e.label}" declares both \`from\` and a fact \`source\` — a select takes exactly one set of choices.`);return Ky(`select: "${e.label}"`,e.source),{type:"select",...ui(e),values:[...e.from],...e.creatable!==void 0?{creatable:e.creatable}:{}}}function I4(e,t){if(Vr(t.source)&&t.source.verb!=="pick")throw new Error(`select: a display entry is filled by \`fill.pick\` — the model picks one of its cases — never \`fill.${t.source.verb}\`.`);return Ky("select: a display entry",t.source),{cases:[...e],...t.locked===!0?{locked:!0}:{},...t.source!==void 0?{source:t.source}:{}}}function B4(e){if(Array.isArray(e))throw new Error("select: takes one options object — write the choices as `from`: `select({ from: [...], … })`.");if(e.options!==void 0)throw new Error("select: declares `options` — a select names its choices in `from`: `select({ from: [...], … })`.");return e.label===void 0&&Array.isArray(e.from)?I4(e.from,e):e.from!==void 0?U4(e):$4(e)}const md=B4;function Po(e){return{type:"url",...ui(e),...e.accepts!==void 0?{accepts:e.accepts}:{}}}function B_(e){return{type:"date",...ui(e)}}function H4(e){return{type:"email",...ui(e)}}function q4(e){return{type:"phone",...ui(e)}}function Qy(e={}){return j4({type:"address",...ui(e)})}function H_(e,t){const a=`${e}: "${t.label??e}"`;if(Ky(a,t.source),"category"in t)throw new Error(`${a} declares \`category\` — a media declaration names the list it picks from in \`from\` (\`from: fact.property.property_media\`, \`fact.property.floor_plans\`, \`fact.property.uploads\`), or owns its asset without one.`);if("sources"in t)throw new Error(`${a} declares \`sources\` — a media slot takes a pasted link wherever a link provider claims its kind (a video, a tour), and declares nothing for it. \`concrete upgrade\` removes it.`);const r=y_({type:e,kinds:t.kinds,process:t.process});if(r!==null)throw new Error(`${a} ${r}.`);const s=Za(t.source,a),c=t.source!==void 0&&s===void 0&&!Ga(t.source);if(c&&t.from!==void 0)throw new Error(`${a} picks \`from\` a media list and declares a \`source\` — a slot bound to a fact holds what that fact holds.`);if((c||Ga(t.source))&&t.process!==void 0)throw new Error(`${a} declares \`process\` beside a \`source\` that derives its value — a derived slot holds what it derives from, processed where that is declared.`);if((s==null?void 0:s.some(p=>p.verb==="pick"))===!0&&t.from===void 0)throw new Error(`${a} is picked by a \`fill.pick\` and names no \`from\` — a pick chooses from its holder's \`from\` (\`from: fact.property.property_media\`); a media declaration without one owns its asset.`);const u=F4(a,e,t.kinds,t.from),m=u==null?void 0:u.map(p=>Gt(p)?p.key:p);return{...m!==void 0?{from:m.length===1?m[0]:m}:{},...t.process!==void 0?{process:t.process.map(p=>({...p}))}:{}}}function F4(e,t,a,r){if(r===void 0)return;const s=Array.isArray(r)?r:[r];if(s.length===0)throw new Error(`${e} declares \`from: []\` — name the media list it picks from, or omit \`from\` and the declaration owns its asset.`);const c=Ka({type:t,kinds:a}),u=new Set;for(const m of s){const p=typeof m=="object"&&m!==null&&!Gt(m),y=Gt(m)?m.key:p&&"declaration"in m?m.declaration:m;if(u.has(y))throw new Error(`${e} picks \`from\` one media list twice — each list is named once; an asset two lists hold is one candidate, attributed to the first.`);if(u.add(y),!p)continue;const v=Ka(y.element);if(v.length>0&&!c.some(g=>v.includes(g)))throw new Error(`${e} picks \`from\` a list of ${v.join(", ")}, whose items can never be ${c.join(" or ")} — each list it picks from holds items of its kinds.`)}return s}function qa(e={}){return{type:"image",...ui(e),...e.crop!==void 0?{crop:e.crop}:{},...H_("image",e)}}function Xy(e={}){return{type:"media",...ui(e),...e.kinds!==void 0?{kinds:[...e.kinds]}:{},...H_("media",e)}}const Zy=Symbol.for("@homepages/concrete:object:declared-fields");function Ss(e){return e[Zy]}function q_(e,t){const a=Ss(t);return a!==void 0&&Object.defineProperty(e,Zy,{value:a,enumerable:!1}),e}const F_="a label is a source, as a text slot takes one",Ep="`label: text.short({ cap: 60, source: fill.write({ reads, brief }) })`",P4=new Set(["type","size","cap","locked"]);function V4(e,t,a){if(typeof t=="string")throw new Error(`${e} declares the label ${JSON.stringify(t)} — ${F_}: write \`label: compute(() => ${JSON.stringify(t)})\`.`);if(qn(t)){const r=Object.entries(a).find(([,s])=>s===t);if(r===void 0)return G4(e,t);if(t.type!=="text"&&t.type!=="address")throw new Error(`${e} label names its field "${r[0]}", a "${t.type}" — a label names a text or an address field.`);return{field:r[0]}}if(Ud(t)){const r=Vr(t)?`\`fill.${t.verb}\``:"list of fills";throw new Error(`${e} label is a bare ${r} — the label is the fill's holder, so it states the kind the fill writes: ${Ep}.`)}return pn.short({locked:!0,source:t})}function G4(e,t){const a=Jr(t);if(a===void 0||a.some(u=>u.verb!=="write")||t.type!=="text")throw new Error(`${e} declares a slot as its label that is none of its fields — ${F_}: write what that slot read as the label (\`label: comp.address.street\`, \`label: compute(() => "Listing agent")\`), a written label as ${Ep}; a title the user edits is a field, which the label names by its const.`);const r=Object.keys(t).filter(u=>!P4.has(u));if(r.length>0)throw new Error(`${e} label is a written text slot declaring ${r.map(u=>`\`${u}\``).join(", ")} — a label states only its kind and cap: ${Ep}; a title the user edits is a field, which the label names by its const.`);const{size:s,cap:c}=t;return pn[s]({locked:!0,source:a.length===1?a[0]:a,...c!==void 0?{cap:c}:{}})}function K4(e){const{type:t,element:a}=e;if(t==="object")return"an object — an object never holds another; flatten its fields into this one";if(t==="list"&&(a==null?void 0:a.type)==="object")return Y4(e);if(t==="list"&&(a==null?void 0:a.type)==="row")return"a list of rows — declare the selection at the top level instead"}const $l="declare the list at the top level instead";function Y4(e){const t=Jr(e);if(t!==void 0&&t.some(s=>s.verb!=="pick")||t===void 0&&Ud(e.source))return`a list of objects declaring a fill other than a pick — no fill but a pick writes a list inside an object; ${$l}`;const a=e.source;if(Gt(a))return`a list of objects sourced by the fact "${a.key}" — its items carry their own minted ids, so it lists a row's member, a \`compute()\` or authored items; ${$l}`;if(vs(a)||Ry(a)||qn(a))return`a list of objects sourced by another list slot — its items carry their own minted ids, so it lists a row's member, a \`compute()\` or authored items; ${$l}`;const r=e.element.fields;for(const[s,c]of Object.entries(r)){const u=Q4(c,r);if(u!==void 0)return`a list of objects whose item field "${s}" is ${u}`}}function Q4(e,t){var c,u;if(e.type==="list"&&((c=e.element)==null?void 0:c.type)==="object")return"a list of objects — a list of objects nests one level; flatten the inner list's fields into this item or declare it beside the outer list";if(Jr(e)!==void 0)return`filled — no fill writes into a list inside an object; ${$l}`;const a=e.source;if(a===void 0)return;if(Ga(a))return`a \`compute()\` — an item of a list inside an object reads its element, or a row \`from\` its member; ${$l}`;const{kind:r,slot:s}=a;if(r==="element"&&e.type==="row"&&qt(e.from)!==null)return"a table's row holding the element — the element of a list inside an object is a member's item: hold it in a row `from` that member (`row({ label, from: unit.floor_plans, source: entry })`)";if(r!=="element"&&!(e.type!=="row"&&r==="row"&&typeof s=="string"&&((u=t[s])==null?void 0:u.type)==="row"))return"bound to something outside its item — an item of a list inside an object reads its element, a row `from` its member, or a row beside it"}function mc(e){const t="object";if(e.source!==void 0)throw new Error(`${t} declares \`source\`, but an object is a pure container with no value of its own — declare it on the field that holds the value.`);if(Object.hasOwn(e.fields,"label")&&e.fields.label!==e.label)throw new Error(`${t} declares a field keyed "label" — the key is reserved for the object's label: write its source as \`label\`, beside \`fields\`.`);const a=rw.find(v=>Object.hasOwn(e.fields,v));if(a!==void 0)throw new Error(`${t} field "${a}" is named like its binding's own \`${a}\` — a field is read straight off its object's binding, which owns ${rw.map(v=>`\`${v}\``).join(", ")}. Rename the field.`);const r=e.label===void 0?void 0:V4(t,e.label,e.fields),s=r!==void 0&&!("type"in r)?r:void 0,c={...r===void 0||s!==void 0?{}:{label:r},...e.fields};if(Object.keys(c).length===0)throw new Error(`${t} declares no fields — an object groups at least one.`);for(const[v,g]of Object.entries(c)){const w=K4(g);if(w!==void 0)throw new Error(`${t} field "${v}" is ${w}.`);if(v!=="label"&&g.label===void 0)throw new Error(`${t} field "${v}" declares no \`label\` — every field of an object states the name the editor shows it by.`)}const u=A4(c);for(const[v,g]of Object.entries(c)){const w=N4(g,u);if(w!==void 0)throw new Error(`${t} field "${v}" ${M4(w)}`)}const m=O4(u),p={};for(const[v,g]of Object.entries(c))p[v]=Vl(us(g,m));const y={type:"object",...e.locked===!0?{locked:!0}:{},...s!==void 0?{label:s}:{},fields:p,...e.when!==void 0?{when:e.when}:{}};return Object.defineProperty(y,Zy,{value:c,enumerable:!1}),y}function X4(e){if(e.type==="object")return null;const t=e.source;if(t===null||typeof t!="object")return null;const{kind:a,section:r,slot:s}=t;return a==="section"&&typeof r=="string"&&typeof s=="string"?{kind:"section",section:r,slot:s}:null}const Es=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function Wy(e,t){if(Object.hasOwn(e,t))return e[t];const a=t.indexOf(".");if(a<=0)return;const r=e[t.slice(0,a)];if((r==null?void 0:r.type)!=="object"||!Es(r.fields))return;const s=t.slice(a+1);return Object.hasOwn(r.fields,s)?r.fields[s]:void 0}function P_(e,t,a){if(t.siblings!==void 0&&Object.hasOwn(t.siblings,a))return{path:t.container===void 0?a:`${t.container}.${a}`,def:t.siblings[a],sibling:!0};if(t.nested===!0)return;const r=Wy(e,a);return r===void 0?void 0:{path:a,def:r,sibling:!1}}function Z4(e){return e==="row"||e==="address"}function W4(e,t,a){const r=P_(e,t,a);if(!(r===void 0||!Z4(r.def.type)))return{...r,kind:r.def.type}}function J4(e){return qt(e.from)}function Gl(e){if(!Array.isArray(e.from)){const t=J4(e);return t===null?[]:[t]}return e.from.flatMap(t=>qt(t)??[])}function eR(e,t){const a=new Set,r=[];for(const s of t){const c=e[s.table];for(const u of c){const m=pd(u.id);m===null||a.has(m)||(a.add(m),r.push({id:m,table:s}))}}return r}function tR(e,t,a){if(t.length>1&&a!==null){const r=eR(e,t).find(s=>s.id===a);if(r!==void 0)return r.table}return t[0]??null}function V_(e){if(e===void 0)return;if(mw(e.source))return e;if(e.type!=="object"||!Es(e.fields))return;const t=Object.values(e.fields).filter(a=>mw(a.source));return t.length===1?t[0]:void 0}function G_(e){const t=V_(e);return(t==null?void 0:t.type)==="row"?Gl(t):[]}function mw(e){return Es(e)&&e.kind==="element"}function nR(e,t,a){return t.fields!==void 0&&t.source===void 0?iR(a):K_(e,e.section,e.slots,t,new Set)}function iR(e){return(Array.isArray(e)?e:[e]).flatMap(a=>Es(a)?Id(a)??[]:[])}function pw(e,t,a,r,s){const c=`${t??""}\0${r}`;if(s.has(c))return[];s.add(c);const u=Wy(a,r);return(u==null?void 0:u.type)==="row"?Gl(u):(u==null?void 0:u.type)==="list"?K_(e,t,a,u,s):[]}function K_(e,t,a,r,s){var g;const c=Es(r.source)?r.source:void 0;if(c===void 0||c.kind==="authored"||c.kind==="derived")return G_(r.element);const u=Id(c);if(u!==null)return[u];const{kind:m,section:p,slot:y}=c;if(m!=="section"||typeof p!="string"||typeof y!="string")return[];if(p===t)return pw(e,t,a,y,s);const v=(g=e.sectionSlots)==null?void 0:g.call(e,p);return v===void 0?[]:pw(e,p,v,y,s)}const pd=e=>typeof e=="string"&&e!==""?e:null;function Pd(e){return e===null||!Ya(e)?"id":ta[e].idKey}const aR=[...new Set(Object.values(ta).map(e=>e.idKey))].filter(e=>e!=="id");function rR(e,t=null){if(typeof e=="string")return t===null?null:pd(e);const a=oR(e,t);return a===null?null:pd(e[a])}function oR(e,t=null){return Es(e)?(t===null?["id","asset_id",...aR]:[Pd(t.table),"id","asset_id"]).find(r=>pd(e[r])!==null)??null:null}function sR(e,t){if(Gt(e)){if(qt(e.key)===null)throw new Error(`list: "${t}" is sourced by the fact "${e.key}", which is no table — a list's source is a table, a list slot, a list-valued member, a \`compute()\` or a fill; a list of the property's media is picked (\`fill.pick\`) from its item's \`from\`, or computed over a media list (\`compute({ reads: [fact.property.property_media] }, …)\`).`);return{kind:"home",key:e.key}}if(vs(e))return{kind:"section",section:e.section,slot:e.slot};if(qn(e))return{kind:"sibling",of:e};if(dc(e)!==void 0||Ga(e))return e;throw new Error(`list: "${t}" declares a source that is no list.`)}function Y_(e){return Gt(e)?qt(e.key):qn(e)&&e.type==="list"?Gy(e):null}const lR=new Set(["label","locked","placeholder","when","source"]);function cR(e){const t={};for(const[a,r]of Object.entries(e))lR.has(a)||(t[a]=r);return t}function uR(e,t){if(Gt(e)&&qt(e.key)!==null)return{type:"row",from:e.key,source:{kind:"element"}};for(const r of Za(e,`list: "${t}"`)??[]){if(r.verb==="write")throw new Error(Q_(t,"declares no `item`"));if(r.verb==="pick")throw new Error(jp(t,"declares no `item`"))}if(Ud(e))return{type:"poi"};if(qn(e)&&e.type==="list")return fR(e,t);const a=dc(e);if(a!==void 0){const r=Gy(a);if(r!==null&&dR(r,e.field)==="image_list")return{type:"image"}}throw new Error(`list: "${t}" declares no \`item\`, and its source does not say what its elements are — declare \`item\`: a plain slot (\`item: image()\`), or a function of the element (\`item: (el) => object({ … })\`).`)}function dR(e,t){if(e.reading==="legacy"){const r=ea[e.table].row;return Object.hasOwn(r,t)?r[t].value_type:void 0}const a=_s(ks(e.table),t);return a===void 0?void 0:to(a)??void 0}function Q_(e,t){return`list: "${e}" is written by a \`fill.write\` and ${t} — the item is the kind every written element is: a value slot (\`item: text.short({ cap: 80 })\`), an object exactly one field of which holds the element (\`question: text.medium({ label: "Question", cap: 48, source: el })\`), or an object declared plainly whose members the write answers (\`item: object({ label: text.short({ label: "Unit" }), fields: { … } })\`).`}function X_(e){if(typeof e!="object"||e===null||e.type!=="object")return!1;const t=e.fields??{};return!Object.values(t).some(a=>Va(a.source))}function yw(e,t){if(e.type!=="object")return;const a=Object.entries(e.fields).filter(([,r])=>{var s;return r.type!=="row"&&((s=r.source)==null?void 0:s.kind)==="element"});if(a.length!==1)throw new Error(Q_(t,a.length===0?"its object item holds the element in no field":`its object item holds the element in ${String(a.length)} fields (${a.map(([r])=>`"${r}"`).join(", ")}) — one field holds it`))}function fR(e,t){const a=e.element;if(a===void 0||a.type==="object")throw new Error(`list: "${t}" lists the items of a list of objects — declare \`item\` to say what each item holds.`);return a.type==="row"?{type:"row",from:a.from,source:{kind:"element"}}:cR(a)}function jp(e,t){return`list: "${e}" is picked by a \`fill.pick\` and ${t} — the item holds the pick in the field holding its candidates: a candidate holder itself (\`item: image({ from: fact.property.property_media })\`, \`item: row({ label: "Agent", from: fact.property.contacts })\`), or an object exactly one field of which holds candidates and no source, which its siblings read by its const (\`const photo = image({ label: "Photo", from: fact.property.property_media }); object({ fields: { photo, caption: text.short({ label: "Caption", source: fill.write({ reads: [photo], brief }) }) } })\`).`}function Op(e){const t=Ei(e);return t.type==="row"?typeof t.from=="string":t.type==="select"?Array.isArray(t.values):typeof t.type=="string"&&(yn(t.type)||t.type==="media")&&t.from!==void 0}function Ap(e){return Ei(e).source===void 0&&Jr(e)===void 0}function Z_(e,t){if(e.type!=="object")return Op(e)&&Ap(e)?null:void 0;const a=Ss(e)??e.fields??{},r=Object.entries(a).filter(([,u])=>typeof u=="object"&&u!==null&&Op(u)&&Ap(u)),s=r.filter(([,u])=>Ei(u).type!=="select"),c=s.length>0?s:r;if(c.length>1)throw new Error(`list: "${t}"'s item declares ${String(c.length)} fields with \`from\` and no source (${c.map(([u])=>`"${u}"`).join(", ")}) — a picked list's item holds its pick in exactly one; give the others a source of their own.`);return c.length===1?c[0][0]:void 0}function gw(e){return{...Vl(e),source:{kind:"element"}}}function Vm(e,t){if(t===void 0)return null;const a=t===null?e:(Ss(e)??e.fields)[t],r=Ei(a);return r.type==="row"?qt(r.from):null}function hR(e,t){if(t===null)return gw(e);const a=e,r=(Ss(e)??a.fields)[t],s=u=>u===r||typeof u=="object"&&u!==null&&Ei(u)===Ei(r)?{kind:"element"}:u,c={};for(const[u,m]of Object.entries(a.fields))c[u]=u===t?gw(m):us(m,s);return q_({...a,fields:c},a)}function mR(e,t,a){const r=c=>{if(!Va(c))return c;if(x5(c)!==t)throw new Error(`list: "${a}"'s item reads the element of another list — an element is read only inside its own list's item.`);return{kind:"element"}};if(e.type==="object"){const c=e,u={};let m=!1;for(const[p,y]of Object.entries(c.fields))u[p]=Vl(us(y,r)),u[p]!==y&&(m=!0);return m?q_({...c,fields:u},c):c}return Vl(us(e,r))}function W_(e,t){const a=e.type==="object"?Object.entries(e.fields):[["",e]];for(const[r,s]of a){const c=s.source;if((c==null?void 0:c.kind)==="home")throw new Error(`list: "${t}"'s item${r===""?"":` field "${r}"`} is bound to the fact "${String(c.key)}", which is the same value in every item — read the element or a row's member instead; a property fact belongs in a fill's or a \`compute()\`'s \`reads\`.`)}}function pR(e,t){if(e.item===void 0)return uR(e.source,t);const a=new Set((Za(e.source,`list: "${t}"`)??[]).map(p=>p.verb));if(a.has("pick")){const p=yR(e.item,t);return a.has("write")&&yw(p,t),p}const r={},s=Object.freeze({kind:"element",[d_]:r,[Vy]:Y_(e.source)}),c=typeof e.item=="function"?e.item(s):e.item;if(typeof c!="object"||c===null||typeof c.type!="string")throw new Error(`list: "${t}"'s item is no slot — return a value slot, a row or an object.`);if(c.type==="list")throw new Error(`list: "${t}"'s item is a list — a list's item is a value slot, a row or an object; a list never holds lists.`);if(c.type!=="object"&&Jr(c)!==void 0)throw new Error(`list: "${t}"'s item declares a fill — one decision produces the whole list, so the fill belongs on the list's \`source:\`; a field of an object item may carry its own.`);W_(c,t);const u=mR(c,r,t);if(a.has("write")&&!X_(e.item)&&yw(u,t),u.type==="object"||u.type==="row")return u;const m={...u};return delete m.locked,m}function yR(e,t){if(typeof e=="function")throw new Error(jp(t,"declares its item as a function"));if(typeof e!="object"||e===null||typeof e.type!="string")throw new Error(`list: "${t}"'s item is no slot — return a value slot, a row or an object.`);const a=Z_(e,t);if(a===void 0)throw new Error(jp(t,"its item declares no field with `from` and no source"));W_(e,t);const r=hR(e,a);if(r.type==="object"||r.type==="row")return r;const s={...r};return delete s.locked,s}function gR(e,t){const a=e.source;if(!(a===void 0||(Za(a,"list")??[]).some(c=>c.verb==="pick"))||typeof e.item!="object"||e.item===null)return Y_(a);const s=e.item;if(a===void 0){if(s.type!=="object")return Vm(s,Op(s)?null:void 0);const c=Object.entries(Ss(s)??{}).filter(([,u])=>Ei(u).type==="row"&&Ap(u));return c.length===1?Vm(s,c[0][0]):null}return Vm(s,Z_(s,t))}function ni(e){const t=e.label??"list";for(const y of["fields","title","unique","count"]){if(e[y]===void 0)continue;const v={fields:"declare `item: (el) => object({ fields })` — an item function returning an object",title:"give the item's object a `label` — a string, or a text slot",unique:"a pick is unique by default (`fill.pick({ unique: false })` lifts it)",count:"`min` and `max` bound how many items any source yields"};throw new Error(`list: "${t}" declares \`${y}\`, which a list no longer takes — ${v[y]}.`)}const a=e.source,r=Za(a,`list: "${t}"`),s=X_(e.item),c=(r==null?void 0:r.every(y=>y.verb==="pick"||y.verb==="write"&&s))===!0;if(r!==void 0&&e.max===void 0&&!c)throw new Error(`list: "${t}" is filled but declares no \`max\` — a fill is an open supply, so the list bounds it.`);for(const y of r??[])if(y.verb==="pick"&&y.of!==void 0)throw new Error(`list: "${t}"'s \`fill.pick\` states \`of\` — a list's pick chooses from its item's \`from\`; remove \`of\`.`);const u={type:"list",...Yy(e,y=>sR(y,t)),element:pR(e,t),...e.min!==void 0?{min:e.min}:{},...e.max!==void 0?{max:e.max}:{}},m=Ga(a)?G_(u.element):void 0,p=m===void 0?gR(e,t):m.length===1?m[0]:null;return z_(u,p)}function Vd(e,t){if(t!==void 0&&(typeof t!="object"||t===null||Array.isArray(t)))throw new Error(`process.${e}(): takes an options object, or nothing.`);const a={kind:"process",verb:e};for(const[s,c]of Object.entries(t??{}))c!==void 0&&(a[s]=c);const r=zy(a);if(r!==null)throw new Error(`process.${e}(): ${r}.`);return a}function bR(e){return Vd("cutout",e)}function vR(e){return Vd("autocrop",e)}function na(e,t){return Vd(e,t)}function xR(e){return na("probe",e)}function wR(e){return na("understand",e)}function kR(e){return na("preview",e)}function _R(e){return na("ladder",e)}function SR(e){return na("transcode",e)}function ER(e){return na("poster",e)}function jR(e){return na("rasterize",e)}function OR(e){return na("fetch",e)}function AR(e){return na("tour_details",e)}function NR(e){return Vd("crop",e)}const MR={cutout:bR,autocrop:vR},Et={...MR,probe:xR,understand:wR,preview:kR,ladder:_R,transcode:SR,poster:ER,rasterize:jR,fetch:OR,tour_details:AR,crop:NR};function CR(e,t="a list"){return`${e} is sourced by ${t} — a row's slot source names a row, which it mirrors. A list's first row is a \`compute()\` over the list: \`source: compute({ reads: [list] }, (rows) => rows[0] ?? null)\`.`}function RR(e,t){if(Gt(e))throw new Error(`row: "${t}" is sourced by the fact "${e.key}" — a table is a row's \`from\`, never its source: \`row({ label, from: fact.${e.key} })\` holds its first row, which the user may re-pick.`);if(vs(e))return{kind:"section",section:e.section,slot:e.slot};if(qn(e))return{kind:"sibling",of:e};if(Va(e)||Ga(e))return Object.freeze({...e});throw new Error(`row: "${t}" declares a source that is no element, slot, compute or pick.`)}function TR(e,t){if(Array.isArray(e))return DR(e,t);const a=Gt(e)?qt(e.key):null;if(a!==null)return{key:e.key,tables:[a]};const r=dc(e);if(r!==void 0){const s=`${String(Ei(r).from)}.${e.field}`;if(v4(s)!==null)return{key:s,tables:[]}}throw new Error(e===void 0?`row: "${t}" declares no \`from\` — a row names its fact data: a table (\`row({ label, from: fact.property.contacts })\`) or a row's list-valued member (\`from: unit.floor_plans\`).`:`row: "${t}"'s \`from\` is ${Gt(e)?`the fact "${e.key}", which is not a table`:"no table or list-valued member"} — a row's \`from\` is a fact table (\`fact.property.contacts\`) or a table row's list-valued member (\`unit.floor_plans\`).`)}function DR(e,t){if(e.length===0)throw new Error(`row: "${t}" declares \`from: []\` — a row names the table it is a row of.`);const a=[],r=[];for(const s of e){const c=Gt(s)?qt(s.key):null;if(c===null)throw new Error(`row: "${t}"'s \`from\` lists ${Gt(s)?`the fact "${s.key}", which is not a table`:"something that is no table"} — a row's list of \`from\` names tables (\`[fact.property.contacts, …]\`); a list-valued member is a row's only \`from\`.`);if(r.some(u=>u.table===c.table))throw new Error(`row: "${t}" names the ${c.table} table twice in \`from\` — each table is named once.`);a.push(s.key),r.push(c)}return{key:a.length===1?a[0]:a,tables:r}}function LR(e,t,a){const r=Gy(qn(e)||Va(e)?e:void 0);if(!(r===null||t.some(s=>r.table===s.table)))throw new Error(`row: "${a}" is \`from\` the ${t.map(s=>s.table).join(", ")} table${t.length===1?"":"s"} but its source holds a row of ${r.table} — a row's source yields a row of its own \`from\`.`)}function zR(e){const{key:t,tables:a}=TR(e.from,e.label),r=a[0]??null;if(r===null&&!Va(e.source))throw new Error(`row: "${e.label}" is \`from\` the list-valued member "${t}" but its source is no element — a row from a member holds an item of it, the element of the list over that member: \`source: entry\`.`);if(qn(e.source)&&e.source.type==="list")throw new Error(CR(`row: "${e.label}"`));const s=Za(e.source,`row: "${e.label}"`);for(const m of s??[]){if(m.verb!=="pick")throw new Error(`row: "${e.label}" is filled by \`fill.${m.verb}\` — a row holds a row that exists, which only a \`fill.pick({ brief })\` out of its \`from\` yields.`);if(m.of!==void 0)throw new Error(`row: "${e.label}"'s \`fill.pick\` states \`of\` — a row's pick chooses from its \`from\`; remove \`of\`.`)}s===void 0&&e.source!==void 0&&r!==null&&LR(e.source,a,e.label);const c=Yy(e,m=>RR(m,e.label)),u=z_({type:"row",from:t,...c},r);return E4(u,r,a.slice(1))}const J_=["property","library"];function Kl(e){const t=e.indexOf("."),a=t===-1?"":e.slice(0,t);if(!J_.includes(a))throw new Error(`fact registry: "${e}" names no home's list fact`);return{home:a,key:e.slice(t+1)}}function $R(e){return e.type==="row"?e:null}function UR(e){if(e.type!=="object")return null;for(const[t,a]of Object.entries(e.fields)){const r=a.source;if(yn(a.type)&&typeof r=="object"&&r!==null&&r.kind==="element")return t}return null}function Jy(e){return(Array.isArray(e.from)?e.from:[e.from]).filter(a=>typeof a=="string")}function yd(e){const t=eS(e);return t===null?null:t.label??null}function eS(e){const t=Kl(e),a=t.home==="library"?js.pages:tr.pages,[r,...s]=t.key.split(".");let c=r!==void 0&&Object.hasOwn(a,r)?a[r].declaration:void 0;for(const u of s)if((c==null?void 0:c.type)==="list")c=c.element;else if((c==null?void 0:c.type)==="object")c=Object.hasOwn(c.fields,u)?c.fields[u]:void 0;else return null;return(c==null?void 0:c.type)==="list"?c:null}function Kr(e){const t=[];let a=e;for(;a!==void 0&&!t.includes(a);){const r=eS(a);if(r===null)break;t.push(a),a=tS(r.element)}return t}function tS(e){const t=$R(e);if(t!==null)return Jy(t)[0];const a=e.type==="object"?UR(e):null,r=e.type==="object"&&a!==null?e.fields[a]:e;if(!yn(r.type)&&r.type!=="media")return;const s=r.from,c=Array.isArray(s)?s[0]:s;return typeof c=="string"&&c!==""?c:void 0}function IR(e){const t=typeof e=="string"?[e]:[...e],a=t[0];return a===void 0?[]:[...Kr(a).slice(1).filter(s=>!t.includes(s)).reverse().map(s=>[s]),t]}function BR(e){return e.head!==null}function ia(e,t){if("label"in e)throw new Error("fact registry: a page head holds no `label` — the declaration states the fact's name");for(const a of["title","description"]){const r=e[a];if(typeof r=="string"&&r.trim()==="")throw new Error(`fact registry: a page declares an empty ${a}`)}return{head:e,declaration:t}}const HR=new Set(["home","item"]);function Np(e,t,a){var c;const r=typeof t=="object"&&t!==null?a.pages.get(t):void 0;if(r!==void 0)return{kind:"home",key:`${a.home}.${r}`};if(w5(t)){const u=a.pages.get(t);if(u===void 0)throw new Error(`${e} reads a page that is not one of this registry's — a registry reads its own facts by their page's const.`);return{kind:"home",key:`${a.home}.${u}`}}const s=Ry(t)?t.of:t;if(qn(s)){const u=(c=a.fields)==null?void 0:c.get(s);if(u===void 0)throw new Error(`${e} reads the declaration "${s.label??s.type}", which is not a field of the same item — a field reads its siblings by their consts, and a top-level fact by its page's const.`);return{kind:"item",field:u}}if(Gt(t)&&[...a.pages.values()].some(u=>t.key===`${a.home}.${u}`))return{kind:"home",key:t.key};if(Gt(t))throw new Error(`${e} is bound to the fact "${t.key}" — a registry declares the facts; it reads a sibling page by its const and binds none.`);if(vs(t))throw new Error(`${e} reads a section's slot — a registry reads no section.`);if(Va(t)&&a.picked===!0)return{kind:"element"};if(Va(t))throw new Error(`${e} reads the element — a registry's list nothing picks is built by the user, so its item's fields read one another by const.`);if(dc(t)!==void 0)throw new Error(`${e} reads the member "${t.field}" of a row that is not a field of the same item.`);if(h_(t)&&typeof t.slot=="string")return{kind:"row",slot:t.slot,field:t.field};if(typeof t=="object"&&t!==null&&HR.has(String(t.kind)))return t;throw new Error(`${e} declares a read a registry cannot answer.`)}function qR(e,t,a){return Array.isArray(t)?t.length===1?Gm(e,t[0],a):t.map(r=>Gm(e,r,a)):Gm(e,t,a)}function Gm(e,t,a){const r=typeof t=="object"&&t!==null?a.pages.get(t):void 0,s=typeof t=="string"?t:r===void 0?void 0:`${a.home}.${r}`;if(s===void 0||!a.mediaLists.has(s))throw new Error(`${e} picks \`from\` something other than one of this registry's media lists — a media field picks from a list of media (the \`uploads\` page, a sorted list), by its const, or owns its asset.`);return s}function Mp(e,t,a){const r=t.reads.map(s=>Np(e,s,a));return t.requires===void 0?{kind:"compute",fn:t.fn,reads:r}:{kind:"compute",fn:t.fn,reads:r,requires:t.requires.map(s=>Np(e,s,a))}}function FR(e,t){if(t.when!==void 0)throw new Error(`${e} declares \`when\` — a registry has no display variant; a page is drawn when a template reads it.`);if(t.required!==void 0)throw new Error(`${e} declares \`required\` — a fact requires nothing on its own account; what a property must answer is what its templates require.`);if(t.type==="poi")throw new Error(`${e} is a poi — a place the platform builds is no fact.`)}function PR(e,t){const{type:a,fields:r}=t;if(a!=="object"||r===void 0)return;const s=Object.entries(r).filter(([,c])=>c.type==="row");if(s.length>0)throw new Error(`${e} holds a picked row in ${s.map(([c])=>`"${c}"`).join(", ")} — a list picking rows declares the row as its item (\`item: row({ from })\`), whose members are the row's.`)}function VR(e){const t=new Map,a=e.fields;for(const r of[a,Ss(e)??{}])for(const[s,c]of Object.entries(r))typeof c=="object"&&c!==null&&t.set(c,s);return t}function Cp(e,t,a){var s;FR(e,t);let r=Vl(us(t,c=>Np(e,c,a)));switch(r.from!==void 0&&(yn(String(r.type))||r.type==="media")&&(r={...r,from:qR(e,t.from,a)}),r.type){case"object":{const c={},u={...a,fields:VR(r)};for(const[m,p]of Object.entries(r.fields))c[m]=Cp(`${e}.${m}`,p,u);r={...r,fields:c};break}case"list":{const c=r.max,u={home:a.home,pages:a.pages,mediaLists:a.mediaLists},m=((s=Jr(t))==null?void 0:s.some(y=>y.verb==="pick"))===!0,p=Cp(`${e}[]`,r.element,m?{...u,picked:!0}:u);PR(`${e}[]`,p),r={...r,element:p,...Ty(c)?{max:Mp(`${e}.max`,c,u)}:{}};break}}return r}function GR(e,t,a,r){const s=`${e}.${t}`,c=Cp(s,a.declaration,r);if(c.type==="object")throw new Error(`${s} is an object — a top-level fact is a value or a list; a group of fields is a list's item.`);if(c.label===void 0)throw new Error(`${s} declares no \`label\` — a top-level fact states the name its page and its Details section show it by.`);if(a.head===null)return{head:null,declaration:c};const{title:u,description:m}=a.head;return{head:{title:typeof u=="string"?u:Mp(`${s}.title`,u,r),description:typeof m=="string"?m:Mp(`${s}.description`,m,r)},declaration:c}}const KR=["home","pages"];function YR(e){return"head"in e&&"declaration"in e}function QR(e){const t=e.element;return e.type==="list"&&typeof(t==null?void 0:t.type)=="string"&&(yn(t.type)||t.type==="media")}function nS(e,t){if(!J_.includes(e))throw new Error(`fact registry: "${e}" is not a home`);const a=new Map,r=new Set,s={};for(const[p,y]of Object.entries(t)){if(KR.includes(p))throw new Error(`fact registry: ${e} declares a page keyed "${p}", a registry's own key`);a.set(y,p);const v=YR(y)?y:{head:null,declaration:y};s[p]=v,QR(v.declaration)&&r.add(`${e}.${p}`)}const c={home:e,pages:a,mediaLists:r},u={};for(const[p,y]of Object.entries(s))u[p]=GR(e,p,y,c);const m={home:e,pages:u};for(const p of Object.keys(t))m[p]={kind:"home",key:`${e}.${p}`};return m}function XR(e){const t=e.declaration.label;if(typeof t!="string")throw new Error("fact registry: a page's declaration states no label");return t}const ZR=[{value:"for_sale",label:"For sale",icon:"tag",description:"List price, finance details, and a sold-ready layout."},{value:"for_rent",label:"For rent",icon:"key",description:"Monthly rent, lease terms, pets, and utilities."}],WR=["sold","active"],JR=["total","monthly"];function e3(e){return e==null?"active":"sold"}function t3(e){return e==="for_rent"?"monthly":"total"}const n3=6371e3;function i3(e,t,a,r){const s=p=>p*Math.PI/180,c=s(a-e),u=s(r-t),m=Math.sin(c/2)**2+Math.cos(s(e))*Math.cos(s(a))*Math.sin(u/2)**2;return 2*n3*Math.asin(Math.sqrt(m))}function a3(e,t){return(e==null?void 0:e.latitude)==null||e.longitude==null||(t==null?void 0:t.latitude)==null||t.longitude==null?null:Math.round(i3(t.latitude,t.longitude,e.latitude,e.longitude))}const js=nS("library",{contacts:ia({title:"Your contacts",description:"The people your listings name, with the headshots and logos they carry."},ni({label:"Contacts",item:()=>{const e=pn.short({label:"Name",cap:256});return mc({label:e,fields:{headshot:qa({label:"Headshot"}),name:e,title:pn.short({label:"Title",cap:128}),org_name:pn.short({label:"Organization",cap:256}),email:H4({label:"Email"}),phone:q4({label:"Phone"}),website:Po({label:"Website"}),address:Qy({label:"Address"}),bio:pn.long({label:"Bio",cap:4e3}),logo_dark:qa({label:"Logo for light backgrounds",process:[Et.cutout()]}),logo_light:qa({label:"Logo for dark backgrounds",process:[Et.cutout()]}),instagram:Po({label:"Instagram"}),linkedin:Po({label:"LinkedIn"}),x:Po({label:"X"}),facebook:Po({label:"Facebook"})}})}}))});M_(js);const Rp=ia({title:"What’s the address?",description:"We’ll build your map and neighborhood details from this."},Qy({label:"Address"})),iS=ia({title:"For sale or for rent?",description:"This adjusts the pricing details we ask for."},md({label:"Listing intent",from:[...ZR]})),er=ia({title:"Add photos, docs, and links",description:"Everything you add helps fill and enrich your website."},ni({label:"Uploads",item:Xy()})),eg=ni({label:"Media",item:Xy({kinds:["image","video","tour"],from:er}),source:ji.pick({brief:"Does this upload show the property? It belongs when its name or account says it is a photograph, a rendering, a video or a virtual tour of the property: its building, rooms, grounds, amenities, surroundings or views. It does not belong when its name or account says it is a floor plan or another diagram; a logo, wordmark or brand graphic; a headshot, portrait or other photograph of a person or people; a flyer, ad, business card, slide or other image that is mostly text; a screenshot; a map; or a scanned document page. When neither its name nor its account says what it is, you cannot tell. Order what belongs as a walk through the property: aerial and street views first, then the approach and entry, then the interiors room by room (living spaces, kitchen and dining, bedrooms, bathrooms), then outdoor spaces, amenities, surroundings and views, with every shot of one space together. A video or tour sits with the space it shows, and one of the whole property comes first."})}),aS=ni({label:"Floor plans",item:qa({label:"Floor plan",from:er,process:[Et.cutout({enclosed:"keep"})]}),source:ji.pick({brief:"Is this upload exactly one floor plan? A floor plan is a top-down view of one floor of a dwelling's rooms and walls — drawn or rendered, flat or in 3D, at any size. It belongs when its name or account says it shows one floor plan, whatever title, figures or text are printed around it. It does not belong when its name or account says it holds two or more plans, or says it is something else: a building key or locator diagram (the building's outline with one unit shaded), a site, plot, parking or driveway diagram, a standalone legend, scale bar or north arrow, a logo, a photograph, or plain text. When neither its name nor its account says what it is, or how many plans it holds, you cannot tell. Order what belongs from the lowest floor to the highest; plans of several units go in the order the units are numbered, each unit's floors together."})}),r3=ni({label:"Documents",item:Xy({kinds:["document","image","video"],from:er}),source:ji.pick({brief:"Does this upload set out the property's specifics? It belongs when its name or account says it records its figures, finances, terms, legal record, condition or plans: an offering memorandum, brochure, listing sheet, rent roll, financials, comparables, lease, survey, site plan, plan set, disclosure or report. It does not belong when its name or account says it is a photograph, rendering, video or tour showing the property; an image of floor plans or elevations; a logo; a photograph of people; an ad, sign or announcement; a map; or notes for whoever makes the marketing. When neither its name nor its account says what it is, you cannot tell. Order what belongs as a buyer reads it: the offering memorandum, brochure or listing sheet first, then the financials, rent roll and comparables, then the leases, legal record and disclosures, then the reports, surveys and plans."})}),o3=qa({label:"Hero",from:eg,source:ji.pick({brief:"Choose the single cover photo for the property's page. The cover is a wide banner above the property's address, so it must stand for the whole property at a glance. Only an image whose name or account says it is a photograph of the property can be chosen. Never choose a logo, wordmark or other brand graphic; an agent, team or company headshot; a flyer, ad, business card, slide or any image that is mostly text; a screenshot; a map; a scanned document or brochure page; or a floor plan or other diagram — nor an image whose name and account do not say what it is. Among the photographs of the property prefer, in order: a front exterior of the building; another exterior or aerial view; the widest, brightest shot of the main living space. Rank close-up details, bathrooms, utility spaces, empty rooms and anything that reads as a fragment rather than a place last: they are weaker covers, never excluded, so when they are the only photographs of the property, choose the best of them. If not one candidate is a photograph of the property, choose none: no banner beats a banner that is not the property."})}),s3=Po({label:"Website"}),l3=`Is this floor plan labelled for this unit? Its label is read from its name and the text printed on it, never from the rooms drawn or any figures. It belongs when its label names this unit: the unit's label or a plain variant of it ("Unit 3", "#3", "Apt 3" and "Residence 3" all label "Unit 3"); a descriptor the unit's label carries in brackets, like "(PH)", may be left off. A plan labelling several units, such as a shared floor printed "Unit 1/2/3", belongs to each of them. It is excluded when it labels other units and not this one. When it labels no unit, you cannot tell. Order what belongs from the lowest floor to the highest.`,c3=`Is this photo labelled for this unit? Its label is read from its name, the text printed on it and a caption its account records, never from the rooms it shows, any figures, how much it looks like the unit or where it falls among the uploads. It belongs when its label names this unit: the unit's label or a plain variant of it ("Unit 3", "#3", "Apt 3" and "Residence 3" all label "Unit 3"); a descriptor the unit's label carries in brackets, like "(PH)", may be left off. A photo labelled for several units belongs to each of them. It is excluded when it labels other units and not this one. When it labels no unit, you cannot tell.`,u3=[`List every dwelling the uploads present with its own specs printed — its beds, baths, square feet, asking price or rent written out for that dwelling: the home a listing describes, or each unit a building's documents name or number. A dwelling the uploads only name, picture or mark with a status, with no specs of its own, is not listed. A plan or row printed for several units ("Unit 4/6") lists each of those units, each with what is printed for it. A dwelling named in several uploads, or on several pages, is one item carrying everything they print for it. A unit-mix row standing for several unnamed units is not a dwelling; neither is a whole building, a comparable property, a market average or a portfolio total.`,"Every member is what an upload prints as text for that dwelling, and nothing else. An upload's own text, as its account quotes it (a document's or a sheet's content, an image's printed words), is what it prints; the account's description of what a drawing, a photo or a map shows (the rooms, the doors, the spaces) is never a member's source. Never count rooms; never compute, round or convert a figure; never carry one across from another dwelling, a unit-mix average or the building's totals; never add what is usual for a dwelling of its kind. A figure printed for a neighbourhood, a development or the building is never a dwelling's, and a count or fee is 0 only where the uploads print none for that dwelling. A member no upload prints for that dwelling is null, and a null is always better than a guess.",`label: the unit's own name as printed — its unit number or name ("201", "Residence 201", "4B", "Penthouse 501"), without a word marking its status ("model", "available") — and never its street address. A dwelling presented alone, with no unit name, is always labelled "Home", whatever name the uploads print for the home itself.`,"beds, baths, sqft: exactly as printed for that dwelling; a studio has one bedroom.",'price: the asking price or monthly rent as written for that dwelling, or its status word ("Sold", "Leased", "Request for Info").','floor: the floor of its building the dwelling sits on, as printed ("3", "PH", "Ground", "3 to 4"); never read off its unit number.',"hoa_monthly: the HOA, condo or strata fee printed per month for that dwelling. A fee printed for another period, or for the building, is null.",'parking: the number of parking spaces printed for that dwelling ("1 deeded space" is 1, "two-car garage" is 2). Parking printed with no count, or for the building, is null.',"lot_sqft: the lot size printed in square feet for that dwelling: a home's own lot. A lot in another unit, or the lot of a building several dwellings share, is null.",'amenities: the real selling points of that dwelling, the qualitative features a client would notice that its beds, baths, size, floor, parking and price do not already say, such as "Private roof deck", "Harbor views", "Corner exposure". Name only what an upload says about that dwelling, in a few words. Never make one up and never add one just to fill the list: a feature the whole building shares, a routine fitting or finish, a note printed on a plan (which way a door opens, extra space) or a restated size is not a selling point. Most dwellings have none to three; leave the list empty when nothing stands out.',"When the uploads present no dwelling with its own specs printed, return no items."].join(`
|
|
778
|
-
|
|
779
|
-
`),qu=pn.short({label:"Unit"}),d3=sn({label:"Beds"}),f3=sn({label:"Baths",decimals:!0}),rS=sn({label:"Sq ft",thousandsSep:!0}),oS=pn.short({label:"Price",cap:40}),sS=pn.short({label:"Building floor(s)",cap:20}),lS=sn({label:"Parking spaces"}),cS=ni({label:"Amenities",max:12,item:pn.short({cap:40})});function uS(e,t){return ni({label:"Floor plans",source:ji.pick({reads:[e],brief:t}),item:mc({fields:{image:qa({label:"Floor plan",from:aS}),floor:md({label:"Floor",from:[...N5],creatable:!0})}})})}function dS(e,t){return ni({label:"Photos",source:ji.pick({reads:[e],brief:t}),item:qa({label:"Photo",from:eg})})}const h3=ia({title:"Tell us about the units",description:"Add each unit’s details and floor plans so they appear on your website."},ni({label:"Units",source:ji.write({reads:[er],brief:u3}),item:mc({label:qu,fields:{label:qu,beds:d3,baths:f3,sqft:rS,price:oS,floor:sS,hoa_monthly:sn({label:"Monthly HOA fee"}),parking:lS,lot_sqft:sn({label:"Lot sq ft",thousandsSep:!0}),amenities:cS,floor_plans:uS(qu,l3),photos:dS(qu,c3)}})})),m3=`Is this floor plan labelled for this space? Its label is read from its name and the text printed on it, never from the rooms drawn or any figures. It belongs when its label names this space: the space's label or a plain variant of it ("Suite 200", "Ste 200" and "#200" all label "Suite 200"); a descriptor the space's label carries in brackets may be left off. A plan labelling several spaces belongs to each of them. It is excluded when it labels other spaces and not this one. When it labels no space, you cannot tell. Order what belongs from the lowest floor to the highest.`,p3=`Is this photo labelled for this space? Its label is read from its name, the text printed on it and a caption its account records, never from what it shows, any figures, how much it looks like the space or where it falls among the uploads. It belongs when its label names this space: the space's label or a plain variant of it ("Suite 200", "Ste 200" and "#200" all label "Suite 200"); a descriptor the space's label carries in brackets may be left off. A photo labelled for several spaces belongs to each of them. It is excluded when it labels other spaces and not this one. When it labels no space, you cannot tell.`,y3=["List every commercial space the uploads present with its own specs printed — its use, square feet, rent or price written out for that space: each shop, office suite, restaurant or other non-residential space a building's documents name or number. A space the uploads only name, picture or mark with a status, with no specs of its own, is not listed. A space named in several uploads, or on several pages, is one item carrying everything they print for it. A dwelling is never a commercial space; neither is a whole building, a comparable property, a market average or a portfolio total.","Every member is what an upload prints as text for that space, and nothing else. An upload's own text, as its account quotes it (a document's or a sheet's content, an image's printed words), is what it prints; the account's description of what a drawing, a photo or a map shows is never a member's source. Never compute, round or convert a figure; never carry one across from another space or the building's totals; never add what is usual for a space of its kind. A member no upload prints for that space is null, and a null is always better than a guess.",`label: the space's own name as printed ("Retail A", "Suite 200", "Ground-floor restaurant"), without a word marking its status ("available", "leased"), and never its street address.`,'use: what the space is for, as printed ("Retail", "Office", "Restaurant").',"sqft: the square feet printed for that space.",'price: the rent or price as written for that space ("$45/SF/yr", "$8,500/mo"), or its status word ("Leased", "Call for pricing").','floor: the floor of its building the space sits on, as printed ("1", "Ground", "Mezzanine"); never read off its suite number.',"parking: the number of parking spaces printed for that space. Parking printed with no count, or for the building, is null.",'amenities: the real selling points of that space, the qualitative features a tenant would notice that its use, size, floor, parking and price do not already say, such as "Corner frontage", "Drive-thru", "Grease trap". Name only what an upload says about that space, in a few words. Never make one up and never add one just to fill the list: a feature the whole building shares, a routine fitting or finish, a note printed on a plan or a restated size is not a selling point. Most spaces have none to three; leave the list empty when nothing stands out.',"When the uploads present no commercial space with its own specs printed, return no items."].join(`
|
|
780
|
-
|
|
781
|
-
`),Fu=pn.short({label:"Space"}),g3=ia({title:"Tell us about the commercial spaces",description:"Add each space’s details and floor plans so they appear on your website."},ni({label:"Commercial spaces",source:ji.write({reads:[er],brief:y3}),item:mc({label:Fu,fields:{label:Fu,use:pn.short({label:"Use",cap:40}),sqft:rS,price:oS,floor:sS,parking:lS,amenities:cS,floor_plans:uS(Fu,m3),photos:dS(Fu,p3)}})})),b3="The uploads may present comparable properties — other properties set beside the one being marketed for comparison. Find every one and return it as an item. A comparable may appear as a row in a sales or rent comparables table, as a panel with its own photo and figures, as a numbered pin in a map legend, or as a line in a survey of recent trades. Read every upload whole, including tables that continue from one page to the next. Copy each figure exactly as an upload states it for that property, and each listing's remarks word for word. Specs come only from what is printed as text: never count rooms or take a figure from what a floor plan drawing, a photo or a map shows; a studio has one bedroom. Never compute one: not by multiplying a price per unit by a unit count, not by dividing a price by a size, not by counting the days between two dates, not by converting a yearly fee to a monthly one, not by averaging rows, and never by carrying a figure across from a neighbouring row, a summary or the subject. If a property is listed in more than one place — on several pages, or in several uploads — return one item carrying every figure those places state. A figure no upload states for that property is null; a null is always better than a guess. Do not return the subject property — the one at the read address, which the uploads are marketing — even where it appears in a comparables table or at the centre of a comparables map, and do not return a market, submarket or area average, a portfolio total, or anything that is not an individual property. When no upload presents a comparable property, return no items.",Km=Qy({label:"Address"}),bw=B_({label:"Sale date"}),v3=ia({title:"Which properties compare?",description:"Recently sold or listed homes like this one shape the pricing story."},ni({label:"Comparables",max:50,source:ji.write({reads:[er,Rp],brief:b3}),item:mc({label:Km,fields:{address:Km,price:sn({label:"Price"}),sale_date:bw,beds:sn({label:"Beds"}),baths:sn({label:"Baths",decimals:!0}),sqft:sn({label:"Sq ft"}),photo:qa({label:"Photo"}),year_built:sn({label:"Year built"}),lot_sqft:sn({label:"Lot sq ft"}),stories:sn({label:"Stories",decimals:!0}),units:sn({label:"Units"}),hoa_monthly:sn({label:"HOA per month"}),list_price:sn({label:"List price"}),listed_date:B_({label:"Listed date"}),mls_number:pn.short({label:"MLS number"}),description:pn.long({label:"Description"}),status:md({label:"Status",from:[...WR],locked:!0,source:Fm({reads:[bw]},e=>e3(e))}),distance_m:sn({label:"Distance (m)",locked:!0,source:Fm({reads:[Km,Rp]},(e,t)=>a3(e,t))}),price_period:md({label:"Price period",from:[...JR],locked:!0,source:Fm({reads:[iS]},e=>t3(e))})}})})),x3=ia({title:"Who’s on this listing?",description:"Add the contacts for this property, and drag them into the order your marketing shows them."},ni({label:"Contacts",min:1,max:12,source:ji.pick({reads:[er],brief:"Choose this listing's contacts from the library's contacts, judging each one's name, title, organisation, email and phone against the read uploads' names and accounts. A contact may be chosen only when an upload's name or account says it prints their email or phone, or their full name, as a contact for this listing — an agent, broker, or sales or leasing contact. A contact the uploads leave out, where their accounts name the listing's contacts, is not chosen. A shared organisation, a matching first name, or a name printed in another role (an architect, a photographer, a seller) is not evidence. When no upload's account names any contact, choose none. Order those chosen as the uploads present them for this listing, the first or most prominent first."}),item:zR({label:"Contact",from:js.contacts})})),tr=nS("property",{address:Rp,listing_intent:iS,description:ia({title:"Describe the property",description:"Talk it up like you would to a buyer, and our AI writes your website copy."},pn.long({label:"Description"})),uploads:er,property_media:eg,floor_plans:aS,property_documents:r3,hero:o3,site_url:s3,units:h3,commercial_spaces:g3,contacts:x3,comparables:v3});M_(tr);const w3=["text","number","select","url","email","phone","date"],k3=new Set(w3);function tg(e){return k3.has(e)}function fS(e){return e.type===void 0||!tg(e.type)?!1:e.type!=="text"||e.size===void 0||e.size==="short"}const Tp=new Set(["image","video","tour","document"]);function hS(e){return!(e!==null&&typeof e=="object"&&e.locked===!0)}function ng(e){const t=Object.values(e).filter(hS).map(s=>s!==null&&typeof s=="object"?s:{}),a=t.filter(s=>s.type!==void 0&&Tp.has(s.type)),r=t.filter(s=>!(s.type!==void 0&&Tp.has(s.type)));return a.length===1&&r.length<=2&&r.every(fS)}function _3(e){var a;if(e.fields!=null)return e.fields;if(((a=e.element)==null?void 0:a.type)!=="object")return null;const t=e.element.fields;return t!==null&&typeof t=="object"?t:{}}function mS(e,t){var s,c;const a=_3(e);if(a!==null)return ng(a)?"annotated-media":"object";const r=(s=e.element)==null?void 0:s.type;return r!==void 0&&Tp.has(r)?"media":r==="media"?((c=e.element)==null?void 0:c.from)===void 0&&t==="home"?"upload":"media":r==="row"?"row":r==="poi"?"poi":"scalar"}const S3={scalar:{expanded:"bullet-list",compact:"bullet-list"},media:{expanded:"gallery",compact:"gallery"},upload:{expanded:"media-manager",compact:"media-manager"},"annotated-media":{expanded:"annotated-gallery",compact:"annotated-gallery"},object:{expanded:"table",compact:"accordion"},row:{expanded:"row-bar",compact:"row-bar"},poi:{expanded:"poi-curation",compact:"poi-curation"}};function E3(e,t,a){const r=mS(e,a),s=r==="object"||r==="annotated-media"?"item":"unit";return{itemKind:r,view:S3[r][t],granularity:s}}const pS=["verb","unique","brief","none","reads"];new Set(pS);function Dp(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function j3(e){if(!Dp(e))return[];if(Array.isArray(e.fills))return e.fills.filter(Dp).map(a=>({...a,kind:"fill"}));if(e.verb===void 0&&e.brief===void 0)return[];const t={kind:"fill"};for(const a of pS)e[a]!==void 0&&(t[a]=e[a]);return[t]}function vw(e){return Dp(e)&&e.kind==="home"&&typeof e.key=="string"}function O3(e){if(vw(e))return[e.key];if(!(!Array.isArray(e)||e.length===0||!e.every(vw)))return e.map(t=>t.key)}function Gd(e){return e!==null&&typeof e=="object"?e:null}function A3(e){const t=Gd(e);return(t==null?void 0:t.kind)!=="row"||"slot"in t?null:typeof t.field=="string"?t.field:null}function pc(e){const t=Gd(e);if((t==null?void 0:t.kind)!=="row")return null;const{slot:a,field:r}=t;return typeof a!="string"||a===""||typeof r!="string"||r===""?null:{slot:a,field:r}}function yS(e){return Object.entries(e??{}).filter(([,t])=>{var a;return t.type==="row"&&((a=Gd(t.source))==null?void 0:a.kind)==="element"}).map(([t])=>t)}function N3(e){const t=new Set(yS(e)),a={};for(const[r,s]of Object.entries(e??{})){const c=A3(s.source)??M3(s.source,t);c!==null&&(a[r]=c)}return a}function M3(e,t){const a=pc(e);return a!==null&&t.has(a.slot)?a.field:null}function gd(e){var t;if(e.fields!==void 0)return e.fields;if(((t=e.element)==null?void 0:t.type)==="object")return e.element.fields}function C3(e){return gd(e)!==void 0}function R3(e){const t=Gd(e.source);if(t===null||t.kind==="authored")return{kind:"none"};const{kind:a,key:r,section:s,slot:c,transform:u}=t;if(a==="home"&&typeof r=="string"){const m=qt(r);if(m!==null)return{kind:"table",table:m.table}}return a==="section"&&typeof s=="string"&&typeof c=="string"?{kind:"section",section:s,slot:c}:a==="derived"&&typeof u=="string"?{kind:"derived",transform:u}:{kind:"other"}}function bd(e){return R_(tr).has(e)}function T3(e){const t=R_(tr).get(e);if(t===void 0)throw new Error(`fact registry: "${e}" names no property fact`);return t}function D3(e){return T3(e).value_type}function L3(){return p4(tr)}function z3(e){return typeof e=="string"&&L3().includes(e)}function $3(e){return{address:e.address,lat:e.address.latitude,lon:e.address.longitude,listing_intent:e.listing_intent,description:e.description,hero:e.hero,site_url:e.site_url}}function Ym(e){return typeof e=="string"?e:null}function U3(e){const t=Wi(e);return t===void 0?null:{media:t}}function I3(e,t){switch(e){case"property.listing_intent":return Ym(t.listing_intent);case"property.description":return Ym(t.description);case"property.hero":return U3(t.hero);case"property.site_url":return Ym(t.site_url);default:{const a=t.address!==null&&typeof t.address=="object"?t.address:{},r=_i({...a,latitude:t.lat,longitude:t.lon});return e==="property.address"?r:r===null?null:r[e.slice(17)]}}}function ig(e){return L_(D_(e)==="library"?js:tr,e)}function ag(e,t){return _s(ig(e),t)}function xw(e){return Object.keys(ig(e))}function rg(e){return e.reading==="legacy"?ta[e.table].idKey:"id"}function B3(e,t){const a=ea[e].row,r=Object.hasOwn(a,t)?a[t]:void 0;if(r===void 0)return{kind:"unknown",offers:Object.keys(a).filter(c=>c!==ta[e].idKey)};const s=r.writeback??null;return{kind:"member",value_type:r.value_type,legacy:t,writeback:s,storable:s!==null}}function H3(e,t){const a=t.indexOf("."),r=a===-1?t:t.slice(0,a),s=ag(e,r),c=s===void 0?null:to(s);if(c===null)return{kind:"unknown",offers:xw(e)};if(a!==-1){const m=t.slice(a+1);return c!=="address"?{kind:"unknown",offers:xw(e)}:Bd(m)?{kind:"member",value_type:T_(m),legacy:null,writeback:null,storable:ww(e,t)}:{kind:"unknown",offers:Iy.map(p=>`${r}.${p}`)}}const u=Ya(e)?R4(e,t):null;return{kind:"member",value_type:c,legacy:u,writeback:u===null||!Ya(e)?null:$5(e,u),storable:ww(e,t)}}function gS(e,t){return t===rg(e)?{kind:"identity"}:e.reading==="legacy"?B3(e.table,t):H3(e.table,t)}function ww(e,t){var r;if(t===void 0){if(((r=qt(e))==null?void 0:r.reading)==="registry")return!0;if(!bd(e))return!1;const s=e.slice(0,e.lastIndexOf("."));return!(bd(s)&&D3(s)==="address")}if(!Object.hasOwn(Gr,e))return!1;const a=ag(e,t);return a!==void 0&&!y4(a)}function kw(e,t){const a=t.source;return(a==null?void 0:a.kind)!=="row"||typeof a.field!="string"||gS(e,a.field).kind==="unknown"?null:a.field}const q3={unit:"units",contact:"contacts"};function og(e,t){if(t!=null){const c=(Ya(t)?kw({table:t,reading:"legacy"},e):null)??kw({table:t,reading:"registry"},e);if(c!==null)return _w(t,c,"scope")}const a=e.source;if((a==null?void 0:a.kind)!=="home"||!Object.hasOwn(xp,a.key))return null;const r=xp[a.key].container,s=q3[r];return s!==void 0?_w(s,a.key,"primary"):null}function _w(e,t,a){const r=ag(e,t),s=Ya(e)?U5(e,t):null,c=(s==null?void 0:s.value_type)??(r===void 0?null:to(r));if(c==null)return null;const u=r===void 0?void 0:_p(r);return{table:e,member:t,value_type:c,...u!==void 0?{filter:u}:{},row:a}}const Kd={kind:"owned"};function Sw(e){return e===null?Kd:{kind:"picked",filter:e}}function ds(e,t){if(e.from!==void 0)return Sw(hd(e));const a=og(e,t);return a===null?null:a.filter===void 0?Kd:Sw(hd({type:e.type,from:a.filter.from}))}function Yd(e,t){return ds(e,t)??Kd}function F3(e,t,a){return ds(t,a)??ds({...t,source:e.source},a)}function P3(e,t,a){var s;const r=ds(t,a.itemTable);return r!==null?r:a.picksBy!==null&&((s=t.source)==null?void 0:s.kind)==="element"?{kind:"picked",filter:a.picksBy}:ds({...t,source:e.source},a.listTable)??Kd}const Ew=1e-6;function V3(e,t){return e.w/e.h>t?{w:e.h*t,h:e.h}:{w:e.w,h:e.w/t}}function G3(e,t){const a=Math.max(e.w,e.h*t);return{w:a,h:a/t}}function K3(e,t){const a=Math.min(1,t.width/e.w,t.height/e.h);return{w:e.w*a,h:e.h*a}}function jw(e,t,a){const r=(s,c,u)=>Math.min(Math.max(s-c/2,0),u-c);return{x:r(t.x,e.w,a.width),y:r(t.y,e.h,a.height),w:e.w,h:e.h}}function Y3(e,t,a,r){const s=G3(e,r);return s.w<=a.width+Ew&&s.h<=a.height+Ew?jw(K3(s,a),{x:e.x+e.w/2,y:e.y+e.h/2},a):jw(V3({w:a.width,h:a.height},r),t,a)}const Ow=16/10;function bS(e){var c;if(e===null||typeof e!="object")return{mode:"free",aspect:Ow};const t=e,a=typeof t.aspect=="number"&&t.aspect>0?t.aspect:Ow,r=(c=t.mobile)==null?void 0:c.aspect,s=typeof r=="number"&&r>0&&Math.abs(r-a)>1e-4?r:void 0;return{mode:t.mode==="free"?"free":"locked",aspect:a,...s===void 0?{}:{mobileAspect:s}}}function Aw(e){return{nx:e.x,ny:e.y,nw:e.width,nh:e.height}}function fs(e,t){if(e===null||t===null)return e===t;const a=r=>Math.round(r*1e4)/1e4;return a(e.x)===a(t.x)&&a(e.y)===a(t.y)&&a(e.width)===a(t.width)&&a(e.height)===a(t.height)}function Q3(e,t,a){const{width:r,height:s}=t,c={x:e.x*r,y:e.y*s,w:e.width*r,h:e.height*s},u=Y3(c,{x:c.x+c.w/2,y:c.y+c.h/2},t,a),m={x:u.x/r,y:u.y/s,width:u.w/r,height:u.h/s};return fs(m,{x:0,y:0,width:1,height:1})?null:m}function Nw(e,t,a){return e===null||a===null?e:t===null?null:Q3(e,t,a)}function vS(e,t){if(e===null||!(e>0)||!(t>0))return null;const a=Math.min(1,t/e),r=Math.min(1,e/t),s={x:(1-a)/2,y:0,width:a,height:r};return fs(s,{x:0,y:0,width:1,height:1})?null:s}function X3(e,t,a){var u,m;const r=Fd(e).get(a);if(r===void 0)return;const s=hc(t)??[fd],c=[...s,...Kr(s[0]).slice(1).filter(p=>!s.includes(p))];for(const p of c){const y=(m=(u=A_(e,p))==null?void 0:u.find(({id:v})=>v===a))==null?void 0:m.value;if(y!==void 0)return ws(y)?Fy(r,y):r}return r}function Z3(e,t,a){const r=t.width!==null&&t.height!==null&&t.width>0&&t.height>0?{width:t.width,height:t.height}:null,s=Nw(e.crop,r,a.mode==="free"?null:a.aspect),c=s===null||a.mobileAspect===void 0?null:Nw(e.crop,r,a.mobileAspect),u=Object.values(e.renditions).some(m=>m!==null);return{asset_id:e.file,picked:e.id,name:e.name,...s===null?{}:{rect:Aw(s)},...r===null?{}:{ar:r.width/r.height},...c===null?{}:{mobile:{rect:Aw(c),derived:!0}},...u?{renditions:e.renditions}:{}}}function sg(e){var s;const{mode:t,aspect:a,mobileAspect:r}=bS(e.crop);return{mode:t,aspect:a,aspectLabel:(s=e.crop)==null?void 0:s.aspectLabel,mobileAspect:r}}function vd(e,t,a){if(e==="free")return{nx:0,ny:0,nw:1,nh:1};const r=vS(t,a);return r===null?{nx:0,ny:0,nw:1,nh:1}:{nx:r.x,ny:r.y,nw:r.width,nh:r.height}}function Mw(e,t,a){const r=e.nx+e.nw/2,s=e.ny+e.nh/2;if(!t||!a)return{...e};const c=t/a;let u=e.nw,m=u/c;return m>e.nh&&(m=e.nh,u=m*c),{nx:r-u/2,ny:s-m/2,nw:u,nh:m}}function lg(e){const t=a=>Math.round(a*1e4)/1e4;return t(e.nx)===0&&t(e.ny)===0&&t(e.nw)===1&&t(e.nh)===1}function W3(e,t,a,r){const s=e==null?void 0:e.rect;return s&&s.nw&&s.nh?{nx:s.nx,ny:s.ny,nw:s.nw,nh:s.nh}:vd(t,a,r)}const Ca=52,J3=1,eT=6,tT=.94,on=(e,t,a)=>a<t?t:Math.max(t,Math.min(a,e));function Pu(e,t,a,r,s,c,u){e=Math.max(Ca,e);const m=s>0?u.r-a:a-u.l;e=Math.min(e,m);let p=e/t;const y=c>0?u.b-r:r-u.t;return p>y&&(p=y,e=p*t),{w:Math.max(Ca,e),h:Math.max(Ca,e/t)}}function nT({src:e,mode:t,aspect:a,seed:r}){const s=x.useRef(null),[,c]=x.useReducer(K=>K+1,0),u=x.useRef(null),m=x.useRef({w:0,h:0}),p=x.useRef({z:1,icx:0,icy:0}),y=x.useRef({x:0,y:0,w:0,h:0}),v=x.useRef(!1),g=x.useRef(r??null),[w,k]=x.useState(null),E=()=>{const K=u.current,Q=m.current;if(!K||!Q.w)return{w:0,h:0};const se=Math.min(Q.w/K.w,Q.h/K.h)*tT;return{w:K.w*se,h:K.h*se}},S=()=>{const K=E(),Q=p.current,se=K.w*Q.z,N=K.h*Q.z;return{l:Q.icx-se/2,t:Q.icy-N/2,r:Q.icx+se/2,b:Q.icy+N/2,w:se,h:N}},j=()=>{const K=S(),Q=m.current;return{l:Math.max(K.l,0),t:Math.max(K.t,0),r:Math.min(K.r,Q.w),b:Math.min(K.b,Q.h)}},C=()=>{const K=S(),Q=y.current,se=p.current,N=K.w/2,V=K.h/2;K.w>=Q.w&&(se.icx=on(se.icx,Q.x+Q.w-N,Q.x+N)),K.h>=Q.h&&(se.icy=on(se.icy,Q.y+Q.h-V,Q.y+V))},A=()=>{const K=y.current,Q=j(),se=Q.r-Q.l,N=Q.b-Q.t;if(t==="locked"){let V=Math.min(K.w,se),te=V/a;te>N&&(te=N,V=te*a),K.w=V,K.h=te}else K.w=Math.min(K.w,se),K.h=Math.min(K.h,N);K.x=on(K.x,Q.l,Q.r-K.w),K.y=on(K.y,Q.t,Q.b-K.h)},O=()=>{A(),C(),A()},T=K=>{const Q=m.current;if(!Q.w||!u.current)return;p.current={z:1,icx:Q.w/2,icy:Q.h/2};const se=S(),N=u.current.w/u.current.h,V=K?W3(g.current,t,N,a):vd(t,N,a);y.current={x:se.l+V.nx*se.w,y:se.t+V.ny*se.h,w:V.nw*se.w,h:V.nh*se.h},O(),v.current=!0,c()};x.useEffect(()=>{v.current=!1,u.current=null,c();const K=new Image;K.onload=()=>{u.current={w:K.naturalWidth||1,h:K.naturalHeight||1},T(!0)},K.src=e},[e]),x.useEffect(()=>{g.current=r??null},[r]),x.useEffect(()=>{u.current&&T(!1)},[t,a]),x.useLayoutEffect(()=>{const K=s.current;if(!K)return;const Q=()=>{const N=K.getBoundingClientRect(),V=m.current.w;m.current={w:N.width,h:N.height},!V&&u.current?T(!0):V&&(O(),c())};Q();const se=new ResizeObserver(Q);return se.observe(K),()=>se.disconnect()},[]);const R=K=>{const Q=s.current.getBoundingClientRect();return{x:K.clientX-Q.left,y:K.clientY-Q.top}},B=K=>{var te,me;if(K.button)return;K.stopPropagation(),(me=(te=K.currentTarget).setPointerCapture)==null||me.call(te,K.pointerId),k("move");const Q=R(K),se={...y.current},N=Y=>{const M=R(Y),H=j(),I=y.current;I.x=on(se.x+(M.x-Q.x),H.l,H.r-I.w),I.y=on(se.y+(M.y-Q.y),H.t,H.b-I.h),c()},V=()=>{window.removeEventListener("pointermove",N),window.removeEventListener("pointerup",V),window.removeEventListener("pointercancel",V),k(null)};window.addEventListener("pointermove",N),window.addEventListener("pointerup",V),window.addEventListener("pointercancel",V)},D=K=>Q=>{var Y,M;if(Q.button)return;Q.stopPropagation(),(M=(Y=Q.currentTarget).setPointerCapture)==null||M.call(Y,Q.pointerId),k(K);const se=y.current,N={l:se.x,t:se.y,r:se.x+se.w,b:se.y+se.h},V=R(Q),te=H=>{const I=R(H),F=j(),W=I.x-V.x,pe=I.y-V.y;let oe=N.l,ke=N.t,z=N.r,ce=N.b;if(t==="free")K.includes("w")&&(oe=on(N.l+W,F.l,z-Ca)),K.includes("e")&&(z=on(N.r+W,oe+Ca,F.r)),K.includes("n")&&(ke=on(N.t+pe,F.t,ce-Ca)),K.includes("s")&&(ce=on(N.b+pe,ke+Ca,F.b));else{const ge=a;if(K==="se"){const Se=Pu(N.r+W-N.l,ge,N.l,N.t,1,1,F);oe=N.l,ke=N.t,z=oe+Se.w,ce=ke+Se.h}else if(K==="nw"){const Se=Pu(N.r-(N.l+W),ge,N.r,N.b,-1,-1,F);z=N.r,ce=N.b,oe=z-Se.w,ke=ce-Se.h}else if(K==="ne"){const Se=Pu(N.r+W-N.l,ge,N.l,N.b,1,-1,F);oe=N.l,ce=N.b,z=oe+Se.w,ke=ce-Se.h}else if(K==="sw"){const Se=Pu(N.r-(N.l+W),ge,N.r,N.t,-1,1,F);z=N.r,ke=N.t,oe=z-Se.w,ce=ke+Se.h}else{const Se=(N.l+N.r)/2,Le=(N.t+N.b)/2;let Ie=se.w,ye=se.h;K==="e"?Ie=(N.r+W-Se)*2:K==="w"?Ie=(Se-(N.l+W))*2:K==="s"?(ye=(N.b+pe-Le)*2,Ie=ye*ge):K==="n"&&(ye=(Le-(N.t+pe))*2,Ie=ye*ge),Ie=Math.max(Ca,Ie),ye=Ie/ge,Ie=Math.min(Ie,F.r-F.l),ye=Ie/ge,ye>F.b-F.t&&(ye=F.b-F.t,Ie=ye*ge),oe=on(Se-Ie/2,F.l,F.r-Ie),ke=on(Le-ye/2,F.t,F.b-ye),z=oe+Ie,ce=ke+ye}}y.current={x:oe,y:ke,w:z-oe,h:ce-ke},c()},me=()=>{window.removeEventListener("pointermove",te),window.removeEventListener("pointerup",me),window.removeEventListener("pointercancel",me),k(null)};window.addEventListener("pointermove",te),window.addEventListener("pointerup",me),window.addEventListener("pointercancel",me)},L=(K,Q,se)=>{const N=p.current;K=on(K,J3,eT);const V=K/N.z;N.icx=Q+(N.icx-Q)*V,N.icy=se+(N.icy-se)*V,N.z=K,O(),c()},P=K=>{const Q=m.current;L(p.current.z*K,Q.w/2,Q.h/2)},le=x.useRef(()=>{});le.current=K=>{K.preventDefault();const Q=m.current,se=Math.exp(-K.deltaY*.0015*(K.ctrlKey?2.6:1));L(p.current.z*se,Q.w/2,Q.h/2)},x.useEffect(()=>{const K=s.current;if(!K)return;const Q=se=>le.current(se);return K.addEventListener("wheel",Q,{passive:!1}),()=>K.removeEventListener("wheel",Q)},[]);const ee=()=>T(!1),de=()=>{const K=S(),Q=y.current;return K.w?{nx:on((Q.x-K.l)/K.w,0,1),ny:on((Q.y-K.t)/K.h,0,1),nw:on(Q.w/K.w,0,1),nh:on(Q.h/K.h,0,1)}:{nx:0,ny:0,nw:1,nh:1}};return{stageRef:s,ready:v.current,activeHandle:w,imgRect:S,box:y.current,view:p.current,onBoxDown:B,onHandleDown:D,zoomBy:P,reset:ee,cropValue:de,natAspect:u.current?u.current.w/u.current.h:null}}function iT({chrome:e,pct:t,onZoomOut:a,onZoomIn:r,resetSlot:s,children:c}){return d.jsxs("div",{className:e.foot,children:[d.jsxs("div",{className:"flex items-center gap-3",children:[s,d.jsxs("div",{className:"flex h-9 items-center overflow-hidden rounded-[9px] border border-line",children:[d.jsx("button",{type:"button",className:"grid size-9 place-items-center text-ink-2 hover:bg-[#f1f0ea] hover:text-ink",onClick:a,"aria-label":"Zoom out",children:d.jsx(e.ZoomOutIcon,{})}),d.jsx("span",{className:"grid h-9 min-w-[54px] place-items-center border-x border-line font-mono text-[12px] text-ink-2",children:t}),d.jsx("button",{type:"button",className:"grid size-9 place-items-center text-ink-2 hover:bg-[#f1f0ea] hover:text-ink",onClick:r,"aria-label":"Zoom in",children:d.jsx(e.ZoomInIcon,{})})]})]}),d.jsx("div",{className:e.actions,children:c})]})}const aT=["n","s","e","w"],rT=["nw","ne","sw","se"];function oT({cr:e,mode:t,src:a,stageClassName:r}){const s=e.imgRect(),c=e.box,u=e.activeHandle!==null;return d.jsx("div",{className:`we-cs-stage ${r}`,ref:e.stageRef,children:e.ready&&d.jsxs(d.Fragment,{children:[d.jsx("img",{className:"we-cs-img",src:a,alt:"",draggable:!1,style:{left:s.l,top:s.t,width:s.w,height:s.h}}),d.jsxs("div",{className:`we-cs-box${u?" live":""}`,"data-mode":t,"data-crop-box":!0,style:{left:c.x,top:c.y,width:c.w,height:c.h},onPointerDown:e.onBoxDown,children:[d.jsx("div",{className:"we-cs-ring"}),d.jsxs("div",{className:"we-cs-thirds",children:[d.jsx("i",{}),d.jsx("i",{}),d.jsx("i",{}),d.jsx("i",{})]}),aT.map(m=>d.jsx("div",{"data-crop-handle":m,className:`we-cs-h edge ${m}`,onPointerDown:e.onHandleDown(m)},m)),rT.map(m=>d.jsx("div",{"data-crop-handle":m,className:`we-cs-h corner ${m}`,onPointerDown:e.onHandleDown(m)},m))]})]})})}const sT=x.forwardRef(function({chrome:t,src:a,mode:r,aspect:s,seed:c,stageClassName:u="h-[412px]",footerActions:m,onUserEdit:p},y){const v=nT({src:a,mode:r,aspect:s,seed:c});x.useImperativeHandle(y,()=>({cropValue:()=>v.cropValue(),natAspect:()=>v.natAspect}),[v]);const g=Math.round(v.view.z*100)+"%",w=x.useRef(!1),k=x.useRef(!1),E=()=>{k.current=!0},S=()=>{k.current&&!w.current&&(w.current=!0,p==null||p())},j=()=>{k.current=!1};return d.jsxs(d.Fragment,{children:[d.jsx("div",{onPointerDownCapture:E,onPointerMoveCapture:S,onPointerUpCapture:j,children:d.jsx(oT,{cr:v,mode:r,src:a,stageClassName:u})}),d.jsx(iT,{chrome:t,pct:g,onZoomOut:()=>v.zoomBy(1/1.25),onZoomIn:()=>v.zoomBy(1.25),resetSlot:d.jsx("button",{type:"button",className:t.buttonLink,onClick:v.reset,children:"Reset"}),children:m})]})});function xS(e){var t,a,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(a=xS(e[t]))&&(r&&(r+=" "),r+=a)}else for(a in e)e[a]&&(r&&(r+=" "),r+=a);return r}function cg(){for(var e,t,a=0,r="",s=arguments.length;a<s;a++)(e=arguments[a])&&(t=xS(e))&&(r&&(r+=" "),r+=t);return r}const lT=(e,t)=>{const a=new Array(e.length+t.length);for(let r=0;r<e.length;r++)a[r]=e[r];for(let r=0;r<t.length;r++)a[e.length+r]=t[r];return a},cT=(e,t)=>({classGroupId:e,validator:t}),wS=(e=new Map,t=null,a)=>({nextPart:e,validators:t,classGroupId:a}),xd="-",Cw=[],uT="arbitrary..",dT=e=>{const t=hT(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return fT(u);const m=u.split(xd),p=m[0]===""&&m.length>1?1:0;return kS(m,p,t)},getConflictingClassGroupIds:(u,m)=>{if(m){const p=r[u],y=a[u];return p?y?lT(y,p):p:y||Cw}return a[u]||Cw}}},kS=(e,t,a)=>{if(e.length-t===0)return a.classGroupId;const s=e[t],c=a.nextPart.get(s);if(c){const y=kS(e,t+1,c);if(y)return y}const u=a.validators;if(u===null)return;const m=t===0?e.join(xd):e.slice(t).join(xd),p=u.length;for(let y=0;y<p;y++){const v=u[y];if(v.validator(m))return v.classGroupId}},fT=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),a=t.indexOf(":"),r=t.slice(0,a);return r?uT+r:void 0})(),hT=e=>{const{theme:t,classGroups:a}=e;return mT(a,t)},mT=(e,t)=>{const a=wS();for(const r in e){const s=e[r];ug(s,a,r,t)}return a},ug=(e,t,a,r)=>{const s=e.length;for(let c=0;c<s;c++){const u=e[c];pT(u,t,a,r)}},pT=(e,t,a,r)=>{if(typeof e=="string"){yT(e,t,a);return}if(typeof e=="function"){gT(e,t,a,r);return}bT(e,t,a,r)},yT=(e,t,a)=>{const r=e===""?t:_S(t,e);r.classGroupId=a},gT=(e,t,a,r)=>{if(vT(e)){ug(e(r),t,a,r);return}t.validators===null&&(t.validators=[]),t.validators.push(cT(a,e))},bT=(e,t,a,r)=>{const s=Object.entries(e),c=s.length;for(let u=0;u<c;u++){const[m,p]=s[u];ug(p,_S(t,m),a,r)}},_S=(e,t)=>{let a=e;const r=t.split(xd),s=r.length;for(let c=0;c<s;c++){const u=r[c];let m=a.nextPart.get(u);m||(m=wS(),a.nextPart.set(u,m)),a=m}return a},vT=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,xT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=Object.create(null),r=Object.create(null);const s=(c,u)=>{a[c]=u,t++,t>e&&(t=0,r=a,a=Object.create(null))};return{get(c){let u=a[c];if(u!==void 0)return u;if((u=r[c])!==void 0)return s(c,u),u},set(c,u){c in a?a[c]=u:s(c,u)}}},Lp="!",Rw=":",wT=[],Tw=(e,t,a,r,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:a,maybePostfixModifierPosition:r,isExternal:s}),kT=e=>{const{prefix:t,experimentalParseClassName:a}=e;let r=s=>{const c=[];let u=0,m=0,p=0,y;const v=s.length;for(let S=0;S<v;S++){const j=s[S];if(u===0&&m===0){if(j===Rw){c.push(s.slice(p,S)),p=S+1;continue}if(j==="/"){y=S;continue}}j==="["?u++:j==="]"?u--:j==="("?m++:j===")"&&m--}const g=c.length===0?s:s.slice(p);let w=g,k=!1;g.endsWith(Lp)?(w=g.slice(0,-1),k=!0):g.startsWith(Lp)&&(w=g.slice(1),k=!0);const E=y&&y>p?y-p:void 0;return Tw(c,k,w,E)};if(t){const s=t+Rw,c=r;r=u=>u.startsWith(s)?c(u.slice(s.length)):Tw(wT,!1,u,void 0,!0)}if(a){const s=r;r=c=>a({className:c,parseClassName:s})}return r},_T=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((a,r)=>{t.set(a,1e6+r)}),a=>{const r=[];let s=[];for(let c=0;c<a.length;c++){const u=a[c],m=u[0]==="[",p=t.has(u);m||p?(s.length>0&&(s.sort(),r.push(...s),s=[]),r.push(u)):s.push(u)}return s.length>0&&(s.sort(),r.push(...s)),r}},ST=e=>({cache:xT(e.cacheSize),parseClassName:kT(e),sortModifiers:_T(e),postfixLookupClassGroupIds:ET(e),...dT(e)}),ET=e=>{const t=Object.create(null),a=e.postfixLookupClassGroups;if(a)for(let r=0;r<a.length;r++)t[a[r]]=!0;return t},jT=/\s+/,OT=(e,t)=>{const{parseClassName:a,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:c,postfixLookupClassGroupIds:u}=t,m=[],p=e.trim().split(jT);let y="";for(let v=p.length-1;v>=0;v-=1){const g=p[v],{isExternal:w,modifiers:k,hasImportantModifier:E,baseClassName:S,maybePostfixModifierPosition:j}=a(g);if(w){y=g+(y.length>0?" "+y:y);continue}let C=!!j,A;if(C){const D=S.substring(0,j);A=r(D);const L=A&&u[A]?r(S):void 0;L&&L!==A&&(A=L,C=!1)}else A=r(S);if(!A){if(!C){y=g+(y.length>0?" "+y:y);continue}if(A=r(S),!A){y=g+(y.length>0?" "+y:y);continue}C=!1}const O=k.length===0?"":k.length===1?k[0]:c(k).join(":"),T=E?O+Lp:O,R=T+A;if(m.indexOf(R)>-1)continue;m.push(R);const B=s(A,C);for(let D=0;D<B.length;++D){const L=B[D];m.push(T+L)}y=g+(y.length>0?" "+y:y)}return y},AT=(...e)=>{let t=0,a,r,s="";for(;t<e.length;)(a=e[t++])&&(r=SS(a))&&(s&&(s+=" "),s+=r);return s},SS=e=>{if(typeof e=="string")return e;let t,a="";for(let r=0;r<e.length;r++)e[r]&&(t=SS(e[r]))&&(a&&(a+=" "),a+=t);return a},NT=(e,...t)=>{let a,r,s,c;const u=p=>{const y=t.reduce((v,g)=>g(v),e());return a=ST(y),r=a.cache.get,s=a.cache.set,c=m,m(p)},m=p=>{const y=r(p);if(y)return y;const v=OT(p,a);return s(p,v),v};return c=u,(...p)=>c(AT(...p))},MT=[],Vt=e=>{const t=a=>a[e]||MT;return t.isThemeGetter=!0,t},ES=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jS=/^\((?:(\w[\w-]*):)?(.+)\)$/i,CT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,RT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,TT=/\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$/,DT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,LT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Na=e=>CT.test(e),Ke=e=>!!e&&!Number.isNaN(Number(e)),gi=e=>!!e&&Number.isInteger(Number(e)),Qm=e=>e.endsWith("%")&&Ke(e.slice(0,-1)),Ki=e=>RT.test(e),OS=()=>!0,$T=e=>TT.test(e)&&!DT.test(e),dg=()=>!1,UT=e=>LT.test(e),IT=e=>zT.test(e),BT=e=>!Ee(e)&&!je(e),HT=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),qT=e=>nr(e,MS,dg),Ee=e=>ES.test(e),Er=e=>nr(e,CS,$T),Dw=e=>nr(e,XT,Ke),FT=e=>nr(e,TS,OS),PT=e=>nr(e,RS,dg),Lw=e=>nr(e,AS,dg),VT=e=>nr(e,NS,IT),Vu=e=>nr(e,DS,UT),je=e=>jS.test(e),Nl=e=>no(e,CS),GT=e=>no(e,RS),zw=e=>no(e,AS),KT=e=>no(e,MS),YT=e=>no(e,NS),Gu=e=>no(e,DS,!0),QT=e=>no(e,TS,!0),nr=(e,t,a)=>{const r=ES.exec(e);return r?r[1]?t(r[1]):a(r[2]):!1},no=(e,t,a=!1)=>{const r=jS.exec(e);return r?r[1]?t(r[1]):a:!1},AS=e=>e==="position"||e==="percentage",NS=e=>e==="image"||e==="url",MS=e=>e==="length"||e==="size"||e==="bg-size",CS=e=>e==="length",XT=e=>e==="number",RS=e=>e==="family-name",TS=e=>e==="number"||e==="weight",DS=e=>e==="shadow",ZT=()=>{const e=Vt("color"),t=Vt("font"),a=Vt("text"),r=Vt("font-weight"),s=Vt("tracking"),c=Vt("leading"),u=Vt("breakpoint"),m=Vt("container"),p=Vt("spacing"),y=Vt("radius"),v=Vt("shadow"),g=Vt("inset-shadow"),w=Vt("text-shadow"),k=Vt("drop-shadow"),E=Vt("blur"),S=Vt("perspective"),j=Vt("aspect"),C=Vt("ease"),A=Vt("animate"),O=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...T(),je,Ee],B=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto","contain","none"],L=()=>[je,Ee,p],P=()=>[Na,"full","auto",...L()],le=()=>[gi,"none","subgrid",je,Ee],ee=()=>["auto",{span:["full",gi,je,Ee]},gi,je,Ee],de=()=>[gi,"auto",je,Ee],K=()=>["auto","min","max","fr",je,Ee],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],se=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...L()],V=()=>[Na,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],te=()=>[Na,"screen","full","dvw","lvw","svw","min","max","fit",...L()],me=()=>[Na,"screen","full","lh","dvh","lvh","svh","min","max","fit",...L()],Y=()=>[e,je,Ee],M=()=>[...T(),zw,Lw,{position:[je,Ee]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],I=()=>["auto","cover","contain",KT,qT,{size:[je,Ee]}],F=()=>[Qm,Nl,Er],W=()=>["","none","full",y,je,Ee],pe=()=>["",Ke,Nl,Er],oe=()=>["solid","dashed","dotted","double"],ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],z=()=>[Ke,Qm,zw,Lw],ce=()=>["","none",E,je,Ee],ge=()=>["none",Ke,je,Ee],Se=()=>["none",Ke,je,Ee],Le=()=>[Ke,je,Ee],Ie=()=>[Na,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ki],breakpoint:[Ki],color:[OS],container:[Ki],"drop-shadow":[Ki],ease:["in","out","in-out"],font:[BT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ki],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ki],shadow:[Ki],spacing:["px",Ke],text:[Ki],"text-shadow":[Ki],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Na,Ee,je,j]}],container:["container"],"container-type":[{"@container":["","normal","size",je,Ee]}],"container-named":[HT],columns:[{columns:[Ke,Ee,je,m]}],"break-after":[{"break-after":O()}],"break-before":[{"break-before":O()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:R()}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{"inset-s":P(),start:P()}],end:[{"inset-e":P(),end:P()}],"inset-bs":[{"inset-bs":P()}],"inset-be":[{"inset-be":P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[gi,"auto",je,Ee]}],basis:[{basis:[Na,"full","auto",m,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ke,Na,"auto","initial","none",Ee]}],grow:[{grow:["",Ke,je,Ee]}],shrink:[{shrink:["",Ke,je,Ee]}],order:[{order:[gi,"first","last","none",je,Ee]}],"grid-cols":[{"grid-cols":le()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":de()}],"col-end":[{"col-end":de()}],"grid-rows":[{"grid-rows":le()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":de()}],"row-end":[{"row-end":de()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...se(),"normal"]}],"justify-self":[{"justify-self":["auto",...se()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...se(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...se(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...se(),"baseline"]}],"place-self":[{"place-self":["auto",...se()]}],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:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:V()}],"inline-size":[{inline:["auto",...te()]}],"min-inline-size":[{"min-inline":["auto",...te()]}],"max-inline-size":[{"max-inline":["none",...te()]}],"block-size":[{block:["auto",...me()]}],"min-block-size":[{"min-block":["auto",...me()]}],"max-block-size":[{"max-block":["none",...me()]}],w:[{w:[m,"screen",...V()]}],"min-w":[{"min-w":[m,"screen","none",...V()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[u]},...V()]}],h:[{h:["screen","lh",...V()]}],"min-h":[{"min-h":["screen","lh","none",...V()]}],"max-h":[{"max-h":["screen","lh",...V()]}],"font-size":[{text:["base",a,Nl,Er]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,QT,FT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Qm,Ee]}],"font-family":[{font:[GT,PT,t]}],"font-features":[{"font-features":[Ee]}],"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:[s,je,Ee]}],"line-clamp":[{"line-clamp":[Ke,"none",je,Dw]}],leading:[{leading:[c,...L()]}],"list-image":[{"list-image":["none",je,Ee]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",je,Ee]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...oe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ke,"from-font","auto",je,Er]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[Ke,"auto",je,Ee]}],"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:[gi,je,Ee]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je,Ee]}],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",je,Ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:I()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},gi,je,Ee],radial:["",je,Ee],conic:[gi,je,Ee]},YT,VT]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:W()}],"rounded-s":[{"rounded-s":W()}],"rounded-e":[{"rounded-e":W()}],"rounded-t":[{"rounded-t":W()}],"rounded-r":[{"rounded-r":W()}],"rounded-b":[{"rounded-b":W()}],"rounded-l":[{"rounded-l":W()}],"rounded-ss":[{"rounded-ss":W()}],"rounded-se":[{"rounded-se":W()}],"rounded-ee":[{"rounded-ee":W()}],"rounded-es":[{"rounded-es":W()}],"rounded-tl":[{"rounded-tl":W()}],"rounded-tr":[{"rounded-tr":W()}],"rounded-br":[{"rounded-br":W()}],"rounded-bl":[{"rounded-bl":W()}],"border-w":[{border:pe()}],"border-w-x":[{"border-x":pe()}],"border-w-y":[{"border-y":pe()}],"border-w-s":[{"border-s":pe()}],"border-w-e":[{"border-e":pe()}],"border-w-bs":[{"border-bs":pe()}],"border-w-be":[{"border-be":pe()}],"border-w-t":[{"border-t":pe()}],"border-w-r":[{"border-r":pe()}],"border-w-b":[{"border-b":pe()}],"border-w-l":[{"border-l":pe()}],"divide-x":[{"divide-x":pe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":pe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...oe(),"hidden","none"]}],"divide-style":[{divide:[...oe(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-bs":[{"border-bs":Y()}],"border-color-be":[{"border-be":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...oe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ke,je,Ee]}],"outline-w":[{outline:["",Ke,Nl,Er]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",v,Gu,Vu]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",g,Gu,Vu]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[Ke,Er]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":pe()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",w,Gu,Vu]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[Ke,je,Ee]}],"mix-blend":[{"mix-blend":[...ke(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ke()}],"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":[Ke]}],"mask-image-linear-from-pos":[{"mask-linear-from":z()}],"mask-image-linear-to-pos":[{"mask-linear-to":z()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":z()}],"mask-image-t-to-pos":[{"mask-t-to":z()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":z()}],"mask-image-r-to-pos":[{"mask-r-to":z()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":z()}],"mask-image-b-to-pos":[{"mask-b-to":z()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":z()}],"mask-image-l-to-pos":[{"mask-l-to":z()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":z()}],"mask-image-x-to-pos":[{"mask-x-to":z()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":z()}],"mask-image-y-to-pos":[{"mask-y-to":z()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[je,Ee]}],"mask-image-radial-from-pos":[{"mask-radial-from":z()}],"mask-image-radial-to-pos":[{"mask-radial-to":z()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"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":T()}],"mask-image-conic-pos":[{"mask-conic":[Ke]}],"mask-image-conic-from-pos":[{"mask-conic-from":z()}],"mask-image-conic-to-pos":[{"mask-conic-to":z()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:I()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",je,Ee]}],filter:[{filter:["","none",je,Ee]}],blur:[{blur:ce()}],brightness:[{brightness:[Ke,je,Ee]}],contrast:[{contrast:[Ke,je,Ee]}],"drop-shadow":[{"drop-shadow":["","none",k,Gu,Vu]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",Ke,je,Ee]}],"hue-rotate":[{"hue-rotate":[Ke,je,Ee]}],invert:[{invert:["",Ke,je,Ee]}],saturate:[{saturate:[Ke,je,Ee]}],sepia:[{sepia:["",Ke,je,Ee]}],"backdrop-filter":[{"backdrop-filter":["","none",je,Ee]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[Ke,je,Ee]}],"backdrop-contrast":[{"backdrop-contrast":[Ke,je,Ee]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ke,je,Ee]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ke,je,Ee]}],"backdrop-invert":[{"backdrop-invert":["",Ke,je,Ee]}],"backdrop-opacity":[{"backdrop-opacity":[Ke,je,Ee]}],"backdrop-saturate":[{"backdrop-saturate":[Ke,je,Ee]}],"backdrop-sepia":[{"backdrop-sepia":["",Ke,je,Ee]}],"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",je,Ee]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ke,"initial",je,Ee]}],ease:[{ease:["linear","initial",C,je,Ee]}],delay:[{delay:[Ke,je,Ee]}],animate:[{animate:["none",A,je,Ee]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,je,Ee]}],"perspective-origin":[{"perspective-origin":R()}],rotate:[{rotate:ge()}],"rotate-x":[{"rotate-x":ge()}],"rotate-y":[{"rotate-y":ge()}],"rotate-z":[{"rotate-z":ge()}],scale:[{scale:Se()}],"scale-x":[{"scale-x":Se()}],"scale-y":[{"scale-y":Se()}],"scale-z":[{"scale-z":Se()}],"scale-3d":["scale-3d"],skew:[{skew:Le()}],"skew-x":[{"skew-x":Le()}],"skew-y":[{"skew-y":Le()}],transform:[{transform:[je,Ee,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ie()}],"translate-x":[{"translate-x":Ie()}],"translate-y":[{"translate-y":Ie()}],"translate-z":[{"translate-z":Ie()}],"translate-none":["translate-none"],zoom:[{zoom:[gi,je,Ee]}],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"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",je,Ee]}],"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":Y()}],"scrollbar-track-color":[{"scrollbar-track":Y()}],"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",je,Ee]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[Ke,Nl,Er,Dw]}],stroke:[{stroke:["none",...Y()]}],"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"]}},fg=NT(ZT);function $w(...e){return fg(cg(e))}function WT({view:e,onChange:t,className:a}){const r=(s,c,u)=>d.jsx("button",{type:"button","aria-label":c,"aria-pressed":e===s,onClick:()=>t(s),className:$w("flex h-7 w-8 items-center justify-center rounded-[6px] transition-[background,color] duration-[120ms]",e===s?"bg-white text-ink shadow-sm":"text-white/85 hover:text-white"),children:d.jsx("svg",{viewBox:"0 0 24 24",className:"h-4 w-4",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:d.jsx("path",{d:u})})});return d.jsxs("div",{className:$w("inline-flex gap-0.5 rounded-[8px] bg-[rgba(15,18,9,0.55)] p-0.5 backdrop-blur",a),children:[r("desktop","Desktop crop","M3 5h18v11H3zM8 20h8M12 16v4"),r("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")]})}const JT=(e,t)=>{const a=r=>Math.round(r*1e4)/1e4;return a(e.nx)===a(t.nx)&&a(e.ny)===a(t.ny)&&a(e.nw)===a(t.nw)&&a(e.nh)===a(t.nh)};function hg({chrome:e,open:t=!0,src:a,mode:r,aspect:s,mobileAspect:c,seed:u,mobileSeed:m,onApply:p,onClose:y,title:v="Crop photo",subtitle:g,variant:w="crop",stageClassName:k="h-[412px]"}){const[E]=x.useState(a),S=c!=null&&Math.abs(c-s)>1e-4,[j,C]=x.useState("desktop"),[A,O]=x.useState({desktop:(u==null?void 0:u.rect)??null,mobile:(m==null?void 0:m.rect)??null}),T=x.useRef(!(m!=null&&m.rect)),R=x.useRef(null),B=Q=>Q==="mobile"?c??s:s,D=()=>{var Q;return((Q=R.current)==null?void 0:Q.natAspect())??s},L=Q=>!(u!=null&&u.rect)&&(Q===null||JT(Q,vd(r,D(),s))),P=Q=>({rect:Q==="desktop"?A.desktop:A.mobile}),le=()=>{var Q;return((Q=R.current)==null?void 0:Q.cropValue())??null},ee=Q=>{if(Q===j)return;const se=le();O(N=>{const V={...N,[j]:se??N[j]};if(j==="desktop"&&T.current){const te=V.desktop??se;V.mobile=te&&!L(te)?Mw(te,c??s,D()):null}return V}),C(Q)},de=()=>{j==="mobile"&&(T.current=!1)},K=()=>{const Q=le(),se=D(),N=(j==="desktop"?Q:A.desktop)??Q??{nx:0,ny:0,nw:1,nh:1};let V={rect:N,ar:se};if(S){let te=j==="mobile"?Q:A.mobile;te||(te=L(N)?vd(r,se,c??s):Mw(N,c??s,se)),V={...V,mobile:{rect:te,derived:T.current}}}p(V)};return d.jsxs(e.Shell,{open:t,variant:w,onClose:y,children:[d.jsxs("div",{className:e.head,children:[d.jsxs("div",{className:e.titles,children:[d.jsx("h2",{className:e.title,children:v}),g?d.jsx("span",{className:e.subtitle,children:g}):null]}),d.jsx("button",{className:e.close,onClick:y,"aria-label":"Close",children:d.jsx(e.CloseIcon,{})})]}),d.jsxs("div",{className:"relative",children:[S&&d.jsx(WT,{view:j,onChange:ee,className:"absolute right-3 top-3 z-10"}),d.jsx(sT,{ref:R,chrome:e,src:E,mode:r,aspect:B(j),seed:P(j),stageClassName:k,onUserEdit:de,footerActions:d.jsxs(d.Fragment,{children:[d.jsx("button",{className:e.buttonGhost,onClick:y,children:"Cancel"}),d.jsx("button",{className:e.buttonPrimary,onClick:K,children:"Apply crop"})]})},j)]})]})}const Uw=e=>{let t;const a=new Set,r=(y,v)=>{const g=typeof y=="function"?y(t):y;if(!Object.is(g,t)){const w=t;t=v??(typeof g!="object"||g===null)?g:Object.assign({},t,g),a.forEach(k=>k(t,w))}},s=()=>t,m={setState:r,getState:s,getInitialState:()=>p,subscribe:y=>(a.add(y),()=>a.delete(y))},p=t=e(r,s,m);return m},eD=(e=>e?Uw(e):Uw),tD=e=>e;function nD(e,t=tD){const a=Ha.useSyncExternalStore(e.subscribe,Ha.useCallback(()=>t(e.getState()),[e,t]),Ha.useCallback(()=>t(e.getInitialState()),[e,t]));return Ha.useDebugValue(a),a}const Iw=e=>{const t=eD(e),a=r=>nD(t,r);return Object.assign(a,t),a},LS=(e=>e?Iw(e):Iw),mg=LS(e=>({noticeByKey:{},notice:(t,a)=>e(r=>r.noticeByKey[t]===a?r:{noticeByKey:{...r.noticeByKey,[t]:a}}),clearNotice:t=>e(a=>{if(!(t in a.noticeByKey))return a;const r={...a.noticeByKey};return delete r[t],{noticeByKey:r}})}));function iD(e){return mg(t=>t.noticeByKey[e])}const aD=12e4;function Yr(e){return`${e.holder}#${e.mediaId}`}const Dl=LS((e,t)=>({byPlace:{},start:(a,r,s)=>{const c=Yr(a),u={propertyId:r,place:a,crop:s};e(m=>({byPlace:{...m.byPlace,[c]:u}})),setTimeout(()=>{t().byPlace[c]===u&&t().settle(a)},aD)},settle:a=>e(r=>{const s=Yr(a);if(!(s in r.byPlace))return r;const c={...r.byPlace};return delete c[s],{byPlace:c}})})),nd={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}},zS={opacity:nd.dimOpacity,filter:`grayscale(${nd.grayscale})`,transition:`opacity ${nd.transitionMs}ms`};function rD(){if(typeof document>"u"||document.getElementById("recrop-spin-kf"))return;const e=document.createElement("style");e.id="recrop-spin-kf",e.textContent="@keyframes recrop-spin{to{transform:rotate(360deg)}}",document.head.appendChild(e)}function pg({label:e="Re-cropping…"}={}){rD();const t=nd.spinner;return d.jsx("div",{"data-recrop-loading":!0,role:"status","aria-label":e,className:"pointer-events-none absolute inset-0 z-[5] grid place-items-center",children:d.jsx("span",{"aria-hidden":!0,style:{width:t.diameter,height:t.diameter,border:`${t.stroke}px solid ${t.trackColor}`,borderTopColor:t.headColor,borderRadius:"50%",animation:`recrop-spin ${t.spinDurationMs}ms linear infinite`}})})}var Os=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Cr,Ra,Ko,T2,oD=(T2=class extends Os{constructor(){super();Ne(this,Cr);Ne(this,Ra);Ne(this,Ko);xe(this,Ko,t=>{if(typeof window<"u"&&window.addEventListener){const a=()=>t();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}})}onSubscribe(){$(this,Ra)||this.setEventListener($(this,Ko))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Ra))==null||t.call(this),xe(this,Ra,void 0))}setEventListener(t){var a;xe(this,Ko,t),(a=$(this,Ra))==null||a.call(this),xe(this,Ra,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){$(this,Cr)!==t&&(xe(this,Cr,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(a=>{a(t)})}isFocused(){var t;return typeof $(this,Cr)=="boolean"?$(this,Cr):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Cr=new WeakMap,Ra=new WeakMap,Ko=new WeakMap,T2),yg=new oD,sD={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ta,_y,D2,lD=(D2=class{constructor(){Ne(this,Ta,sD);Ne(this,_y,!1)}setTimeoutProvider(e){xe(this,Ta,e)}setTimeout(e,t){return $(this,Ta).setTimeout(e,t)}clearTimeout(e){$(this,Ta).clearTimeout(e)}setInterval(e,t){return $(this,Ta).setInterval(e,t)}clearInterval(e){$(this,Ta).clearInterval(e)}},Ta=new WeakMap,_y=new WeakMap,D2),Nr=new lD;function cD(e){setTimeout(e,0)}var uD=typeof window>"u"||"Deno"in globalThis;function mn(){}function dD(e,t){return typeof e=="function"?e(t):e}function zp(e){return typeof e=="number"&&e>=0&&e!==1/0}function $S(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Fa(e,t){return typeof e=="function"?e(t):e}function In(e,t){return typeof e=="function"?e(t):e}function Bw(e,t){const{type:a="all",exact:r,fetchStatus:s,predicate:c,queryKey:u,stale:m}=e;if(u){if(r){if(t.queryHash!==gg(u,t.options))return!1}else if(!hs(t.queryKey,u))return!1}if(a!=="all"){const p=t.isActive();if(a==="active"&&!p||a==="inactive"&&p)return!1}return!(typeof m=="boolean"&&t.isStale()!==m||s&&s!==t.state.fetchStatus||c&&!c(t))}function Hw(e,t){const{exact:a,status:r,predicate:s,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(a){if(Yl(t.options.mutationKey)!==Yl(c))return!1}else if(!hs(t.options.mutationKey,c))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function gg(e,t){return((t==null?void 0:t.queryKeyHashFn)||Yl)(e)}function Yl(e){return JSON.stringify(e,(t,a)=>$p(a)?Object.keys(a).sort().reduce((r,s)=>(r[s]=a[s],r),{}):a)}function hs(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(Array.isArray(e)&&Array.isArray(t)){for(let r=0;r<t.length;r++)if(!hs(e[r],t[r]))return!1;return!0}const a=Object.keys(t);for(const r of a)if(!hs(e[r],t[r]))return!1;return!0}return!1}var fD=Object.prototype.hasOwnProperty;function bg(e,t,a=0){if(e===t)return e;if(a>500)return t;const r=qw(e)&&qw(t);if(!r&&!($p(e)&&$p(t)))return t;const c=(r?e:Object.keys(e)).length,u=r?t:Object.keys(t),m=u.length,p=r?new Array(m):{};let y=0;for(let v=0;v<m;v++){const g=r?v:u[v],w=e[g],k=t[g];if(w===k){p[g]=w,(r?v<c:fD.call(e,g))&&y++;continue}if(w===null||k===null||typeof w!="object"||typeof k!="object"){p[g]=k;continue}const E=bg(w,k,a+1);p[g]=E,E===w&&y++}return c===m&&y===c?e:p}function wd(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const a in e)if(e[a]!==t[a])return!1;return!0}function qw(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function $p(e){if(!Fw(e))return!1;const t=e.constructor;if(t===void 0)return!0;const a=t.prototype;return!(!Fw(a)||!a.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Fw(e){return Object.prototype.toString.call(e)==="[object Object]"}function hD(e){return new Promise(t=>{Nr.setTimeout(t,e)})}function Up(e,t,a){return typeof a.structuralSharing=="function"?a.structuralSharing(e,t):a.structuralSharing!==!1?bg(e,t):t}function mD(e,t,a=0){const r=[...e,t];return a&&r.length>a?r.slice(1):r}function pD(e,t,a=0){const r=[t,...e];return a&&r.length>a?r.slice(0,-1):r}var vg=Symbol();function US(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===vg?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function IS(e,t){return typeof e=="function"?e(...t):!!e}function yD(e,t,a){let r=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),r||(r=!0,s.aborted?a():s.addEventListener("abort",a,{once:!0})),s)}),e}var Ql=(()=>{let e=()=>uD;return{isServer(){return e()},setIsServer(t){e=t}}})();function Ip(){let e,t;const a=new Promise((s,c)=>{e=s,t=c});a.status="pending",a.catch(()=>{});function r(s){Object.assign(a,s),delete a.resolve,delete a.reject}return a.resolve=s=>{r({status:"fulfilled",value:s}),e(s)},a.reject=s=>{r({status:"rejected",reason:s}),t(s)},a}var gD=cD;function bD(){let e=[],t=0,a=m=>{m()},r=m=>{m()},s=gD;const c=m=>{t?e.push(m):s(()=>{a(m)})},u=()=>{const m=e;e=[],m.length&&s(()=>{r(()=>{m.forEach(p=>{a(p)})})})};return{batch:m=>{let p;t++;try{p=m()}finally{t--,t||u()}return p},batchCalls:m=>(...p)=>{c(()=>{m(...p)})},schedule:c,setNotifyFunction:m=>{a=m},setBatchNotifyFunction:m=>{r=m},setScheduler:m=>{s=m}}}var Ht=bD(),Yo,Da,Qo,L2,vD=(L2=class extends Os{constructor(){super();Ne(this,Yo,!0);Ne(this,Da);Ne(this,Qo);xe(this,Qo,t=>{if(typeof window<"u"&&window.addEventListener){const a=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",a,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",a),window.removeEventListener("offline",r)}}})}onSubscribe(){$(this,Da)||this.setEventListener($(this,Qo))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Da))==null||t.call(this),xe(this,Da,void 0))}setEventListener(t){var a;xe(this,Qo,t),(a=$(this,Da))==null||a.call(this),xe(this,Da,t(this.setOnline.bind(this)))}setOnline(t){$(this,Yo)!==t&&(xe(this,Yo,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return $(this,Yo)}},Yo=new WeakMap,Da=new WeakMap,Qo=new WeakMap,L2),kd=new vD;function xD(e){return Math.min(1e3*2**e,3e4)}function BS(e){return(e??"online")==="online"?kd.isOnline():!0}var Bp=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function HS(e){let t=!1,a=0,r;const s=Ip(),c=()=>s.status!=="pending",u=S=>{var j;if(!c()){const C=new Bp(S);w(C),(j=e.onCancel)==null||j.call(e,C)}},m=()=>{t=!0},p=()=>{t=!1},y=()=>yg.isFocused()&&(e.networkMode==="always"||kd.isOnline())&&e.canRun(),v=()=>BS(e.networkMode)&&e.canRun(),g=S=>{c()||(r==null||r(),s.resolve(S))},w=S=>{c()||(r==null||r(),s.reject(S))},k=()=>new Promise(S=>{var j;r=C=>{(c()||y())&&S(C)},(j=e.onPause)==null||j.call(e)}).then(()=>{var S;r=void 0,c()||(S=e.onContinue)==null||S.call(e)}),E=()=>{if(c())return;let S;const j=a===0?e.initialPromise:void 0;try{S=j??e.fn()}catch(C){S=Promise.reject(C)}Promise.resolve(S).then(g).catch(C=>{var B;if(c())return;const A=e.retry??(Ql.isServer()?0:3),O=e.retryDelay??xD,T=typeof O=="function"?O(a,C):O,R=A===!0||typeof A=="number"&&a<A||typeof A=="function"&&A(a,C);if(t||!R){w(C);return}a++,(B=e.onFail)==null||B.call(e,a,C),hD(T).then(()=>y()?void 0:k()).then(()=>{t?w(C):E()})})};return{promise:s,status:()=>s.status,cancel:u,continue:()=>(r==null||r(),s),cancelRetry:m,continueRetry:p,canStart:v,start:()=>(v()?E():k().then(E),s)}}var Rr,z2,qS=(z2=class{constructor(){Ne(this,Rr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),zp(this.gcTime)&&xe(this,Rr,Nr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ql.isServer()?1/0:300*1e3))}clearGcTimeout(){$(this,Rr)!==void 0&&(Nr.clearTimeout($(this,Rr)),xe(this,Rr,void 0))}},Rr=new WeakMap,z2);function wD(e){return{onFetch:(t,a)=>{var v,g,w,k,E;const r=t.options,s=(w=(g=(v=t.fetchOptions)==null?void 0:v.meta)==null?void 0:g.fetchMore)==null?void 0:w.direction,c=((k=t.state.data)==null?void 0:k.pages)||[],u=((E=t.state.data)==null?void 0:E.pageParams)||[];let m={pages:[],pageParams:[]},p=0;const y=async()=>{let S=!1;const j=O=>{yD(O,()=>t.signal,()=>S=!0)},C=US(t.options,t.fetchOptions),A=async(O,T,R)=>{if(S)return Promise.reject(t.signal.reason);if(T==null&&O.pages.length)return Promise.resolve(O);const D=(()=>{const ee={client:t.client,queryKey:t.queryKey,pageParam:T,direction:R?"backward":"forward",meta:t.options.meta};return j(ee),ee})(),L=await C(D),{maxPages:P}=t.options,le=R?pD:mD;return{pages:le(O.pages,L,P),pageParams:le(O.pageParams,T,P)}};if(s&&c.length){const O=s==="backward",T=O?kD:Pw,R={pages:c,pageParams:u},B=T(r,R);m=await A(R,B,O)}else{const O=e??c.length;do{const T=p===0?u[0]??r.initialPageParam:Pw(r,m);if(p>0&&T==null)break;m=await A(m,T),p++}while(p<O)}return m};t.options.persister?t.fetchFn=()=>{var S,j;return(j=(S=t.options).persister)==null?void 0:j.call(S,y,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},a)}:t.fetchFn=y}}}function Pw(e,{pages:t,pageParams:a}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,a[r],a):void 0}function kD(e,{pages:t,pageParams:a}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,a[0],a):void 0}var Xo,Tr,Zo,ti,Dr,en,tc,Lr,Un,FS,Yi,$2,_D=($2=class extends qS{constructor(t){super();Ne(this,Un);Ne(this,Xo);Ne(this,Tr);Ne(this,Zo);Ne(this,ti);Ne(this,Dr);Ne(this,en);Ne(this,tc);Ne(this,Lr);xe(this,Lr,!1),xe(this,tc,t.defaultOptions),this.setOptions(t.options),this.observers=[],xe(this,Dr,t.client),xe(this,ti,$(this,Dr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,xe(this,Tr,Gw(this.options)),this.state=t.state??$(this,Tr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return $(this,Xo)}get promise(){var t;return(t=$(this,en))==null?void 0:t.promise}setOptions(t){if(this.options={...$(this,tc),...t},t!=null&&t._type&&xe(this,Xo,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=Gw(this.options);a.data!==void 0&&(this.setState(Vw(a.data,a.dataUpdatedAt)),xe(this,Tr,a))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&$(this,ti).remove(this)}setData(t,a){const r=Up(this.state.data,t,this.options);return Be(this,Un,Yi).call(this,{data:r,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt,manual:a==null?void 0:a.manual}),r}setState(t){Be(this,Un,Yi).call(this,{type:"setState",state:t})}cancel(t){var r,s;const a=(r=$(this,en))==null?void 0:r.promise;return(s=$(this,en))==null||s.cancel(t),a?a.then(mn).catch(mn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return $(this,Tr)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>In(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===vg||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Fa(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!$S(this.state.dataUpdatedAt,t)}onFocus(){var a;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(a=$(this,en))==null||a.continue()}onOnline(){var a;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(a=$(this,en))==null||a.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),$(this,ti).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(a=>a!==t),this.observers.length||($(this,en)&&($(this,Lr)||Be(this,Un,FS).call(this)?$(this,en).cancel({revert:!0}):$(this,en).cancelRetry()),this.scheduleGc()),$(this,ti).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Be(this,Un,Yi).call(this,{type:"invalidate"})}async fetch(t,a){var y,v,g,w,k,E,S,j,C,A,O;if(this.state.fetchStatus!=="idle"&&((y=$(this,en))==null?void 0:y.status())!=="rejected"){if(this.state.data!==void 0&&(a!=null&&a.cancelRefetch))this.cancel({silent:!0});else if($(this,en))return $(this,en).continueRetry(),$(this,en).promise}if(t&&this.setOptions(t),!this.options.queryFn){const T=this.observers.find(R=>R.options.queryFn);T&&this.setOptions(T.options)}const r=new AbortController,s=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(xe(this,Lr,!0),r.signal)})},c=()=>{const T=US(this.options,a),B=(()=>{const D={client:$(this,Dr),queryKey:this.queryKey,meta:this.meta};return s(D),D})();return xe(this,Lr,!1),this.options.persister?this.options.persister(T,B,this):T(B)},m=(()=>{const T={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:$(this,Dr),state:this.state,fetchFn:c};return s(T),T})(),p=$(this,Xo)==="infinite"?wD(this.options.pages):this.options.behavior;p==null||p.onFetch(m,this),xe(this,Zo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=m.fetchOptions)==null?void 0:v.meta))&&Be(this,Un,Yi).call(this,{type:"fetch",meta:(g=m.fetchOptions)==null?void 0:g.meta}),xe(this,en,HS({initialPromise:a==null?void 0:a.initialPromise,fn:m.fetchFn,onCancel:T=>{T instanceof Bp&&T.revert&&this.setState({...$(this,Zo),fetchStatus:"idle"}),r.abort()},onFail:(T,R)=>{Be(this,Un,Yi).call(this,{type:"failed",failureCount:T,error:R})},onPause:()=>{Be(this,Un,Yi).call(this,{type:"pause"})},onContinue:()=>{Be(this,Un,Yi).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0}));try{const T=await $(this,en).start();if(T===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(T),(k=(w=$(this,ti).config).onSuccess)==null||k.call(w,T,this),(S=(E=$(this,ti).config).onSettled)==null||S.call(E,T,this.state.error,this),T}catch(T){if(T instanceof Bp){if(T.silent)return $(this,en).promise;if(T.revert){if(this.state.data===void 0)throw T;return this.state.data}}throw Be(this,Un,Yi).call(this,{type:"error",error:T}),(C=(j=$(this,ti).config).onError)==null||C.call(j,T,this),(O=(A=$(this,ti).config).onSettled)==null||O.call(A,this.state.data,T,this),T}finally{this.scheduleGc()}}},Xo=new WeakMap,Tr=new WeakMap,Zo=new WeakMap,ti=new WeakMap,Dr=new WeakMap,en=new WeakMap,tc=new WeakMap,Lr=new WeakMap,Un=new WeakSet,FS=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Yi=function(t){const a=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...PS(r.data,this.options),fetchMeta:t.meta??null};case"success":const s={...r,...Vw(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return xe(this,Zo,t.manual?s:void 0),s;case"error":const c=t.error;return{...r,error:c,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:c,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=a(this.state),Ht.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),$(this,ti).notify({query:this,type:"updated",action:t})})},$2);function PS(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:BS(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Vw(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Gw(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,a=t!==void 0,r=a?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:a?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:a?"success":"pending",fetchStatus:"idle"}}var Sn,tt,nc,hn,zr,Wo,Qi,La,ic,Jo,es,$r,Ur,za,ts,ct,Ll,Hp,qp,Fp,Pp,Vp,Gp,Kp,VS,U2,xg=(U2=class extends Os{constructor(t,a){super();Ne(this,ct);Ne(this,Sn);Ne(this,tt);Ne(this,nc);Ne(this,hn);Ne(this,zr);Ne(this,Wo);Ne(this,Qi);Ne(this,La);Ne(this,ic);Ne(this,Jo);Ne(this,es);Ne(this,$r);Ne(this,Ur);Ne(this,za);Ne(this,ts,new Set);this.options=a,xe(this,Sn,t),xe(this,La,null),xe(this,Qi,Ip()),this.bindMethods(),this.setOptions(a)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&($(this,tt).addObserver(this),Kw($(this,tt),this.options)?Be(this,ct,Ll).call(this):this.updateResult(),Be(this,ct,Pp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Yp($(this,tt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Yp($(this,tt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Be(this,ct,Vp).call(this),Be(this,ct,Gp).call(this),$(this,tt).removeObserver(this)}setOptions(t){const a=this.options,r=$(this,tt);if(this.options=$(this,Sn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof In(this.options.enabled,$(this,tt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Be(this,ct,Kp).call(this),$(this,tt).setOptions(this.options),a._defaulted&&!wd(this.options,a)&&$(this,Sn).getQueryCache().notify({type:"observerOptionsUpdated",query:$(this,tt),observer:this});const s=this.hasListeners();s&&Yw($(this,tt),r,this.options,a)&&Be(this,ct,Ll).call(this),this.updateResult(),s&&($(this,tt)!==r||In(this.options.enabled,$(this,tt))!==In(a.enabled,$(this,tt))||Fa(this.options.staleTime,$(this,tt))!==Fa(a.staleTime,$(this,tt)))&&Be(this,ct,Hp).call(this);const c=Be(this,ct,qp).call(this);s&&($(this,tt)!==r||In(this.options.enabled,$(this,tt))!==In(a.enabled,$(this,tt))||c!==$(this,za))&&Be(this,ct,Fp).call(this,c)}getOptimisticResult(t){const a=$(this,Sn).getQueryCache().build($(this,Sn),t),r=this.createResult(a,t);return ED(this,r)&&(xe(this,hn,r),xe(this,Wo,this.options),xe(this,zr,$(this,tt).state)),r}getCurrentResult(){return $(this,hn)}trackResult(t,a){return new Proxy(t,{get:(r,s)=>(this.trackProp(s),a==null||a(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&$(this,Qi).status==="pending"&&$(this,Qi).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,s))})}trackProp(t){$(this,ts).add(t)}getCurrentQuery(){return $(this,tt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const a=$(this,Sn).defaultQueryOptions(t),r=$(this,Sn).getQueryCache().build($(this,Sn),a);return r.fetch().then(()=>this.createResult(r,a))}fetch(t){return Be(this,ct,Ll).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),$(this,hn)))}createResult(t,a){var P;const r=$(this,tt),s=this.options,c=$(this,hn),u=$(this,zr),m=$(this,Wo),y=t!==r?t.state:$(this,nc),{state:v}=t;let g={...v},w=!1,k;if(a._optimisticResults){const le=this.hasListeners(),ee=!le&&Kw(t,a),de=le&&Yw(t,r,a,s);(ee||de)&&(g={...g,...PS(v.data,t.options)}),a._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:E,errorUpdatedAt:S,status:j}=g;k=g.data;let C=!1;if(a.placeholderData!==void 0&&k===void 0&&j==="pending"){let le;c!=null&&c.isPlaceholderData&&a.placeholderData===(m==null?void 0:m.placeholderData)?(le=c.data,C=!0):le=typeof a.placeholderData=="function"?a.placeholderData((P=$(this,es))==null?void 0:P.state.data,$(this,es)):a.placeholderData,le!==void 0&&(j="success",k=Up(c==null?void 0:c.data,le,a),w=!0)}if(a.select&&k!==void 0&&!C)if(c&&k===(u==null?void 0:u.data)&&a.select===$(this,ic))k=$(this,Jo);else try{xe(this,ic,a.select),k=a.select(k),k=Up(c==null?void 0:c.data,k,a),xe(this,Jo,k),xe(this,La,null)}catch(le){xe(this,La,le)}$(this,La)&&(E=$(this,La),k=$(this,Jo),S=Date.now(),j="error");const A=g.fetchStatus==="fetching",O=j==="pending",T=j==="error",R=O&&A,B=k!==void 0,L={status:j,fetchStatus:g.fetchStatus,isPending:O,isSuccess:j==="success",isError:T,isInitialLoading:R,isLoading:R,data:k,dataUpdatedAt:g.dataUpdatedAt,error:E,errorUpdatedAt:S,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>y.dataUpdateCount||g.errorUpdateCount>y.errorUpdateCount,isFetching:A,isRefetching:A&&!O,isLoadingError:T&&!B,isPaused:g.fetchStatus==="paused",isPlaceholderData:w,isRefetchError:T&&B,isStale:wg(t,a),refetch:this.refetch,promise:$(this,Qi),isEnabled:In(a.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const le=L.data!==void 0,ee=L.status==="error"&&!le,de=se=>{ee?se.reject(L.error):le&&se.resolve(L.data)},K=()=>{const se=xe(this,Qi,L.promise=Ip());de(se)},Q=$(this,Qi);switch(Q.status){case"pending":t.queryHash===r.queryHash&&de(Q);break;case"fulfilled":(ee||L.data!==Q.value)&&K();break;case"rejected":(!ee||L.error!==Q.reason)&&K();break}}return L}updateResult(){const t=$(this,hn),a=this.createResult($(this,tt),this.options);if(xe(this,zr,$(this,tt).state),xe(this,Wo,this.options),$(this,zr).data!==void 0&&xe(this,es,$(this,tt)),wd(a,t))return;xe(this,hn,a);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,c=typeof s=="function"?s():s;if(c==="all"||!c&&!$(this,ts).size)return!0;const u=new Set(c??$(this,ts));return this.options.throwOnError&&u.add("error"),Object.keys($(this,hn)).some(m=>{const p=m;return $(this,hn)[p]!==t[p]&&u.has(p)})};Be(this,ct,VS).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Be(this,ct,Pp).call(this)}},Sn=new WeakMap,tt=new WeakMap,nc=new WeakMap,hn=new WeakMap,zr=new WeakMap,Wo=new WeakMap,Qi=new WeakMap,La=new WeakMap,ic=new WeakMap,Jo=new WeakMap,es=new WeakMap,$r=new WeakMap,Ur=new WeakMap,za=new WeakMap,ts=new WeakMap,ct=new WeakSet,Ll=function(t){Be(this,ct,Kp).call(this);let a=$(this,tt).fetch(this.options,t);return t!=null&&t.throwOnError||(a=a.catch(mn)),a},Hp=function(){Be(this,ct,Vp).call(this);const t=Fa(this.options.staleTime,$(this,tt));if(Ql.isServer()||$(this,hn).isStale||!zp(t))return;const r=$S($(this,hn).dataUpdatedAt,t)+1;xe(this,$r,Nr.setTimeout(()=>{$(this,hn).isStale||this.updateResult()},r))},qp=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval($(this,tt)):this.options.refetchInterval)??!1},Fp=function(t){Be(this,ct,Gp).call(this),xe(this,za,t),!(Ql.isServer()||In(this.options.enabled,$(this,tt))===!1||!zp($(this,za))||$(this,za)===0)&&xe(this,Ur,Nr.setInterval(()=>{(this.options.refetchIntervalInBackground||yg.isFocused())&&Be(this,ct,Ll).call(this)},$(this,za)))},Pp=function(){Be(this,ct,Hp).call(this),Be(this,ct,Fp).call(this,Be(this,ct,qp).call(this))},Vp=function(){$(this,$r)!==void 0&&(Nr.clearTimeout($(this,$r)),xe(this,$r,void 0))},Gp=function(){$(this,Ur)!==void 0&&(Nr.clearInterval($(this,Ur)),xe(this,Ur,void 0))},Kp=function(){const t=$(this,Sn).getQueryCache().build($(this,Sn),this.options);if(t===$(this,tt))return;const a=$(this,tt);xe(this,tt,t),xe(this,nc,t.state),this.hasListeners()&&(a==null||a.removeObserver(this),t.addObserver(this))},VS=function(t){Ht.batch(()=>{t.listeners&&this.listeners.forEach(a=>{a($(this,hn))}),$(this,Sn).getQueryCache().notify({query:$(this,tt),type:"observerResultsUpdated"})})},U2);function SD(e,t){return In(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&In(t.retryOnMount,e)===!1)}function Kw(e,t){return SD(e,t)||e.state.data!==void 0&&Yp(e,t,t.refetchOnMount)}function Yp(e,t,a){if(In(t.enabled,e)!==!1&&Fa(t.staleTime,e)!=="static"){const r=typeof a=="function"?a(e):a;return r==="always"||r!==!1&&wg(e,t)}return!1}function Yw(e,t,a,r){return(e!==t||In(r.enabled,e)===!1)&&(!a.suspense||e.state.status!=="error")&&wg(e,a)}function wg(e,t){return In(t.enabled,e)!==!1&&e.isStaleByTime(Fa(t.staleTime,e))}function ED(e,t){return!wd(e.getCurrentResult(),t)}var ac,xi,cn,Ir,wi,Ma,I2,jD=(I2=class extends qS{constructor(t){super();Ne(this,wi);Ne(this,ac);Ne(this,xi);Ne(this,cn);Ne(this,Ir);xe(this,ac,t.client),this.mutationId=t.mutationId,xe(this,cn,t.mutationCache),xe(this,xi,[]),this.state=t.state||OD(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){$(this,xi).includes(t)||($(this,xi).push(t),this.clearGcTimeout(),$(this,cn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){xe(this,xi,$(this,xi).filter(a=>a!==t)),this.scheduleGc(),$(this,cn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){$(this,xi).length||(this.state.status==="pending"?this.scheduleGc():$(this,cn).remove(this))}continue(){var t;return((t=$(this,Ir))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,m,p,y,v,g,w,k,E,S,j,C,A,O,T,R,B,D;const a=()=>{Be(this,wi,Ma).call(this,{type:"continue"})},r={client:$(this,ac),meta:this.options.meta,mutationKey:this.options.mutationKey};xe(this,Ir,HS({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(L,P)=>{Be(this,wi,Ma).call(this,{type:"failed",failureCount:L,error:P})},onPause:()=>{Be(this,wi,Ma).call(this,{type:"pause"})},onContinue:a,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>$(this,cn).canRun(this)}));const s=this.state.status==="pending",c=!$(this,Ir).canStart();try{if(s)a();else{Be(this,wi,Ma).call(this,{type:"pending",variables:t,isPaused:c}),$(this,cn).config.onMutate&&await $(this,cn).config.onMutate(t,this,r);const P=await((m=(u=this.options).onMutate)==null?void 0:m.call(u,t,r));P!==this.state.context&&Be(this,wi,Ma).call(this,{type:"pending",context:P,variables:t,isPaused:c})}const L=await $(this,Ir).start();return await((y=(p=$(this,cn).config).onSuccess)==null?void 0:y.call(p,L,t,this.state.context,this,r)),await((g=(v=this.options).onSuccess)==null?void 0:g.call(v,L,t,this.state.context,r)),await((k=(w=$(this,cn).config).onSettled)==null?void 0:k.call(w,L,null,this.state.variables,this.state.context,this,r)),await((S=(E=this.options).onSettled)==null?void 0:S.call(E,L,null,t,this.state.context,r)),Be(this,wi,Ma).call(this,{type:"success",data:L}),L}catch(L){try{await((C=(j=$(this,cn).config).onError)==null?void 0:C.call(j,L,t,this.state.context,this,r))}catch(P){Promise.reject(P)}try{await((O=(A=this.options).onError)==null?void 0:O.call(A,L,t,this.state.context,r))}catch(P){Promise.reject(P)}try{await((R=(T=$(this,cn).config).onSettled)==null?void 0:R.call(T,void 0,L,this.state.variables,this.state.context,this,r))}catch(P){Promise.reject(P)}try{await((D=(B=this.options).onSettled)==null?void 0:D.call(B,void 0,L,t,this.state.context,r))}catch(P){Promise.reject(P)}throw Be(this,wi,Ma).call(this,{type:"error",error:L}),L}finally{$(this,cn).runNext(this)}}},ac=new WeakMap,xi=new WeakMap,cn=new WeakMap,Ir=new WeakMap,wi=new WeakSet,Ma=function(t){const a=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=a(this.state),Ht.batch(()=>{$(this,xi).forEach(r=>{r.onMutationUpdate(t)}),$(this,cn).notify({mutation:this,type:"updated",action:t})})},I2);function OD(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Xi,li,rc,B2,AD=(B2=class extends Os{constructor(t={}){super();Ne(this,Xi);Ne(this,li);Ne(this,rc);this.config=t,xe(this,Xi,new Set),xe(this,li,new Map),xe(this,rc,0)}build(t,a,r){const s=new jD({client:t,mutationCache:this,mutationId:++Hu(this,rc)._,options:t.defaultMutationOptions(a),state:r});return this.add(s),s}add(t){$(this,Xi).add(t);const a=Ku(t);if(typeof a=="string"){const r=$(this,li).get(a);r?r.push(t):$(this,li).set(a,[t])}this.notify({type:"added",mutation:t})}remove(t){if($(this,Xi).delete(t)){const a=Ku(t);if(typeof a=="string"){const r=$(this,li).get(a);if(r)if(r.length>1){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}else r[0]===t&&$(this,li).delete(a)}}this.notify({type:"removed",mutation:t})}canRun(t){const a=Ku(t);if(typeof a=="string"){const r=$(this,li).get(a),s=r==null?void 0:r.find(c=>c.state.status==="pending");return!s||s===t}else return!0}runNext(t){var r;const a=Ku(t);if(typeof a=="string"){const s=(r=$(this,li).get(a))==null?void 0:r.find(c=>c!==t&&c.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ht.batch(()=>{$(this,Xi).forEach(t=>{this.notify({type:"removed",mutation:t})}),$(this,Xi).clear(),$(this,li).clear()})}getAll(){return Array.from($(this,Xi))}find(t){const a={exact:!0,...t};return this.getAll().find(r=>Hw(a,r))}findAll(t={}){return this.getAll().filter(a=>Hw(t,a))}notify(t){Ht.batch(()=>{this.listeners.forEach(a=>{a(t)})})}resumePausedMutations(){const t=this.getAll().filter(a=>a.state.isPaused);return Ht.batch(()=>Promise.all(t.map(a=>a.continue().catch(mn))))}},Xi=new WeakMap,li=new WeakMap,rc=new WeakMap,B2);function Ku(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Qw(e,t){const a=new Set(t);return e.filter(r=>!a.has(r))}function ND(e,t,a){const r=e.slice(0);return r[t]=a,r}var ns,En,is,Br,$n,$a,oc,sc,lc,cc,Kt,Qp,Xp,GS,Zp,Wp,Jp,H2,MD=(H2=class extends Os{constructor(t,a,r){super();Ne(this,Kt);Ne(this,ns);Ne(this,En);Ne(this,is);Ne(this,Br);Ne(this,$n);Ne(this,$a);Ne(this,oc);Ne(this,sc);Ne(this,lc);Ne(this,cc,[]);xe(this,ns,t),xe(this,Br,r),xe(this,is,[]),xe(this,$n,[]),xe(this,En,[]),this.setQueries(a)}onSubscribe(){this.listeners.size===1&&$(this,$n).forEach(t=>{t.subscribe(a=>{Be(this,Kt,Wp).call(this,t,a)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,$(this,$n).forEach(t=>{t.destroy()})}setQueries(t,a){xe(this,is,t),xe(this,Br,a),Ht.batch(()=>{const r=$(this,$n),s=Be(this,Kt,Zp).call(this,$(this,is));s.forEach(g=>g.observer.setOptions(g.defaultedQueryOptions));const c=s.map(g=>g.observer),u=c.map(g=>g.getCurrentResult()),m=r.length!==c.length,p=c.some((g,w)=>g!==r[w]),y=m||p,v=y?!0:u.some((g,w)=>{const k=$(this,En)[w];return!k||!wd(g,k)});!y&&!v||(y&&(xe(this,cc,s),xe(this,$n,c)),xe(this,En,u),this.hasListeners()&&(y&&(Qw(r,c).forEach(g=>{g.destroy()}),Qw(c,r).forEach(g=>{g.subscribe(w=>{Be(this,Kt,Wp).call(this,g,w)})})),Be(this,Kt,Jp).call(this)))})}getCurrentResult(){return $(this,En)}getQueries(){return $(this,$n).map(t=>t.getCurrentQuery())}getObservers(){return $(this,$n)}getOptimisticResult(t,a){const r=Be(this,Kt,Zp).call(this,t),s=r.map(u=>u.observer.getOptimisticResult(u.defaultedQueryOptions)),c=r.map(u=>u.defaultedQueryOptions.queryHash);return[s,u=>Be(this,Kt,Xp).call(this,u??s,a,c),()=>Be(this,Kt,Qp).call(this,s,r)]}},ns=new WeakMap,En=new WeakMap,is=new WeakMap,Br=new WeakMap,$n=new WeakMap,$a=new WeakMap,oc=new WeakMap,sc=new WeakMap,lc=new WeakMap,cc=new WeakMap,Kt=new WeakSet,Qp=function(t,a){return a.map((r,s)=>{const c=t[s];return r.defaultedQueryOptions.notifyOnChangeProps?c:r.observer.trackResult(c,u=>{a.forEach(m=>{m.observer.trackProp(u)})})})},Xp=function(t,a,r){if(a){const s=$(this,lc),c=r!==void 0&&s!==void 0&&(s.length!==r.length||r.some((u,m)=>u!==s[m]));return(!$(this,$a)||$(this,En)!==$(this,sc)||c||a!==$(this,oc))&&(xe(this,oc,a),xe(this,sc,$(this,En)),r!==void 0&&xe(this,lc,r),xe(this,$a,bg($(this,$a),a(t)))),$(this,$a)}return t},GS=function(){var t;return((t=$(this,Br))==null?void 0:t.combine)!==void 0&&$(this,$n).some((a,r)=>{var s;return a.options.suspense&&((s=$(this,En)[r])==null?void 0:s.data)===void 0})},Zp=function(t){const a=new Map;$(this,$n).forEach(s=>{const c=s.options.queryHash;if(!c)return;const u=a.get(c);u?u.push(s):a.set(c,[s])});const r=[];return t.forEach(s=>{var p;const c=$(this,ns).defaultQueryOptions(s),m=((p=a.get(c.queryHash))==null?void 0:p.shift())??new xg($(this,ns),c);r.push({defaultedQueryOptions:c,observer:m})}),r},Wp=function(t,a){const r=$(this,$n).indexOf(t);r!==-1&&(xe(this,En,ND($(this,En),r,a)),Be(this,Kt,Jp).call(this))},Jp=function(){var t;if(this.hasListeners()){const a=Be(this,Kt,Qp).call(this,$(this,En),$(this,cc)),r=Be(this,Kt,GS).call(this),s=$(this,$a),c=r?s:Be(this,Kt,Xp).call(this,a,(t=$(this,Br))==null?void 0:t.combine);(r||s!==c)&&Ht.batch(()=>{this.listeners.forEach(u=>{u($(this,En))})})}},H2),ki,q2,CD=(q2=class extends Os{constructor(t={}){super();Ne(this,ki);this.config=t,xe(this,ki,new Map)}build(t,a,r){const s=a.queryKey,c=a.queryHash??gg(s,a);let u=this.get(c);return u||(u=new _D({client:t,queryKey:s,queryHash:c,options:t.defaultQueryOptions(a),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(u)),u}add(t){$(this,ki).has(t.queryHash)||($(this,ki).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const a=$(this,ki).get(t.queryHash);a&&(t.destroy(),a===t&&$(this,ki).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ht.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return $(this,ki).get(t)}getAll(){return[...$(this,ki).values()]}find(t){const a={exact:!0,...t};return this.getAll().find(r=>Bw(a,r))}findAll(t={}){const a=this.getAll();return Object.keys(t).length>0?a.filter(r=>Bw(t,r)):a}notify(t){Ht.batch(()=>{this.listeners.forEach(a=>{a(t)})})}onFocus(){Ht.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ht.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ki=new WeakMap,q2),Ct,Ua,Ia,as,rs,Ba,os,ss,F2,RD=(F2=class{constructor(e={}){Ne(this,Ct);Ne(this,Ua);Ne(this,Ia);Ne(this,as);Ne(this,rs);Ne(this,Ba);Ne(this,os);Ne(this,ss);xe(this,Ct,e.queryCache||new CD),xe(this,Ua,e.mutationCache||new AD),xe(this,Ia,e.defaultOptions||{}),xe(this,as,new Map),xe(this,rs,new Map),xe(this,Ba,0)}mount(){Hu(this,Ba)._++,$(this,Ba)===1&&(xe(this,os,yg.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,Ct).onFocus())})),xe(this,ss,kd.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,Ct).onOnline())})))}unmount(){var e,t;Hu(this,Ba)._--,$(this,Ba)===0&&((e=$(this,os))==null||e.call(this),xe(this,os,void 0),(t=$(this,ss))==null||t.call(this),xe(this,ss,void 0))}isFetching(e){return $(this,Ct).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return $(this,Ua).findAll({...e,status:"pending"}).length}getQueryData(e){var a;const t=this.defaultQueryOptions({queryKey:e});return(a=$(this,Ct).get(t.queryHash))==null?void 0:a.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),a=$(this,Ct).build(this,t),r=a.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&a.isStaleByTime(Fa(t.staleTime,a))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return $(this,Ct).findAll(e).map(({queryKey:t,state:a})=>{const r=a.data;return[t,r]})}setQueryData(e,t,a){const r=this.defaultQueryOptions({queryKey:e}),s=$(this,Ct).get(r.queryHash),c=s==null?void 0:s.state.data,u=dD(t,c);if(u!==void 0)return $(this,Ct).build(this,r).setData(u,{...a,manual:!0})}setQueriesData(e,t,a){return Ht.batch(()=>$(this,Ct).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,a)]))}getQueryState(e){var a;const t=this.defaultQueryOptions({queryKey:e});return(a=$(this,Ct).get(t.queryHash))==null?void 0:a.state}removeQueries(e){const t=$(this,Ct);Ht.batch(()=>{t.findAll(e).forEach(a=>{t.remove(a)})})}resetQueries(e,t){const a=$(this,Ct);return Ht.batch(()=>(a.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const a={revert:!0,...t},r=Ht.batch(()=>$(this,Ct).findAll(e).map(s=>s.cancel(a)));return Promise.all(r).then(mn).catch(mn)}invalidateQueries(e,t={}){return Ht.batch(()=>($(this,Ct).findAll(e).forEach(a=>{a.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const a={...t,cancelRefetch:t.cancelRefetch??!0},r=Ht.batch(()=>$(this,Ct).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let c=s.fetch(void 0,a);return a.throwOnError||(c=c.catch(mn)),s.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(mn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const a=$(this,Ct).build(this,t);return a.isStaleByTime(Fa(t.staleTime,a))?a.fetch(t):Promise.resolve(a.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(mn).catch(mn)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(mn).catch(mn)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return kd.isOnline()?$(this,Ua).resumePausedMutations():Promise.resolve()}getQueryCache(){return $(this,Ct)}getMutationCache(){return $(this,Ua)}getDefaultOptions(){return $(this,Ia)}setDefaultOptions(e){xe(this,Ia,e)}setQueryDefaults(e,t){$(this,as).set(Yl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...$(this,as).values()],a={};return t.forEach(r=>{hs(e,r.queryKey)&&Object.assign(a,r.defaultOptions)}),a}setMutationDefaults(e,t){$(this,rs).set(Yl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...$(this,rs).values()],a={};return t.forEach(r=>{hs(e,r.mutationKey)&&Object.assign(a,r.defaultOptions)}),a}defaultQueryOptions(e){if(e._defaulted)return e;const t={...$(this,Ia).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=gg(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===vg&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...$(this,Ia).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){$(this,Ct).clear(),$(this,Ua).clear()}},Ct=new WeakMap,Ua=new WeakMap,Ia=new WeakMap,as=new WeakMap,rs=new WeakMap,Ba=new WeakMap,os=new WeakMap,ss=new WeakMap,F2),KS=x.createContext(void 0),Qd=e=>{const t=x.useContext(KS);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},TD=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(KS.Provider,{value:e,children:t})),YS=x.createContext(!1),QS=()=>x.useContext(YS);YS.Provider;function DD(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var LD=x.createContext(DD()),XS=()=>x.useContext(LD),ZS=(e,t,a)=>{const r=a!=null&&a.state.error&&typeof e.throwOnError=="function"?IS(e.throwOnError,[a.state.error,a]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},WS=e=>{x.useEffect(()=>{e.clearReset()},[e])},JS=({result:e,errorResetBoundary:t,throwOnError:a,query:r,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||IS(a,[e.error,r])),eE=e=>{if(e.suspense){const a=s=>s==="static"?s:Math.max(s??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...s)=>a(r(...s)):a(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},zD=(e,t)=>e.isLoading&&e.isFetching&&!t,ey=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,ty=(e,t,a)=>t.fetchOptimistic(e).catch(()=>{a.clearReset()});function $D({queries:e,...t},a){const r=Qd(),s=QS(),c=XS(),u=x.useMemo(()=>e.map(S=>{const j=r.defaultQueryOptions(S);return j._optimisticResults=s?"isRestoring":"optimistic",j}),[e,r,s]);u.forEach(S=>{eE(S);const j=r.getQueryCache().get(S.queryHash);ZS(S,c,j)}),WS(c);const[m]=x.useState(()=>new MD(r,u,t)),[p,y,v]=m.getOptimisticResult(u,t.combine),g=!s&&t.subscribed!==!1;x.useSyncExternalStore(x.useCallback(S=>g?m.subscribe(Ht.batchCalls(S)):mn,[m,g]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),x.useEffect(()=>{m.setQueries(u,t)},[u,t,m]);const k=p.some((S,j)=>ey(u[j],S))?p.flatMap((S,j)=>{const C=u[j];if(C&&ey(C,S)){const A=new xg(r,C);return ty(C,A,c)}return[]}):[];if(k.length>0)throw Promise.all(k);const E=p.find((S,j)=>{const C=u[j];return C&&JS({result:S,errorResetBoundary:c,throwOnError:C.throwOnError,query:r.getQueryCache().get(C.queryHash),suspense:C.suspense})});if(E!=null&&E.error)throw E.error;return y(v())}function UD(e,t,a){var k,E,S,j;const r=QS(),s=XS(),c=Qd(),u=c.defaultQueryOptions(e);(E=(k=c.getDefaultOptions().queries)==null?void 0:k._experimental_beforeQuery)==null||E.call(k,u);const m=c.getQueryCache().get(u.queryHash),p=e.subscribed!==!1;u._optimisticResults=r?"isRestoring":p?"optimistic":void 0,eE(u),ZS(u,s,m),WS(s);const y=!c.getQueryCache().get(u.queryHash),[v]=x.useState(()=>new t(c,u)),g=v.getOptimisticResult(u),w=!r&&p;if(x.useSyncExternalStore(x.useCallback(C=>{const A=w?v.subscribe(Ht.batchCalls(C)):mn;return v.updateResult(),A},[v,w]),()=>v.getCurrentResult(),()=>v.getCurrentResult()),x.useEffect(()=>{v.setOptions(u)},[u,v]),ey(u,g))throw ty(u,v,s);if(JS({result:g,errorResetBoundary:s,throwOnError:u.throwOnError,query:m,suspense:u.suspense}))throw g.error;if((j=(S=c.getDefaultOptions().queries)==null?void 0:S._experimental_afterQuery)==null||j.call(S,u,g),u.experimental_prefetchInRender&&!Ql.isServer()&&zD(g,r)){const C=y?ty(u,v,s):m==null?void 0:m.promise;C==null||C.catch(mn).finally(()=>{v.updateResult()})}return u.notifyOnChangeProps?g:v.trackResult(g)}function yc(e,t){return UD(e,xg)}const ID=600*1e3,BD=(e,t,a)=>({queryKey:["crop-url",e,t],queryFn:()=>a(e,t),staleTime:ID});function tE(e,t,a){const r=x.useMemo(()=>[...new Set(t.filter(c=>!!c))],[t]),s=$D({queries:r.map(c=>({...BD(e,c,a),enabled:!!e}))});return x.useMemo(()=>{const c=new Map;return r.forEach((u,m)=>{var y;const p=(y=s[m])==null?void 0:y.data;typeof p=="string"&&c.set(u,p)}),c},[r,s])}/**
|
|
782
|
-
* @license lucide-react v1.28.0 - ISC
|
|
783
|
-
*
|
|
784
|
-
* This source code is licensed under the ISC license.
|
|
785
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
786
|
-
*/const nE=(...e)=>e.filter((t,a,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===a).join(" ").trim();/**
|
|
787
|
-
* @license lucide-react v1.28.0 - ISC
|
|
788
|
-
*
|
|
789
|
-
* This source code is licensed under the ISC license.
|
|
790
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
791
|
-
*/const HD=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
792
|
-
* @license lucide-react v1.28.0 - ISC
|
|
793
|
-
*
|
|
794
|
-
* This source code is licensed under the ISC license.
|
|
795
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
796
|
-
*/const qD=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,a,r)=>r?r.toUpperCase():a.toLowerCase());/**
|
|
797
|
-
* @license lucide-react v1.28.0 - ISC
|
|
798
|
-
*
|
|
799
|
-
* This source code is licensed under the ISC license.
|
|
800
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
801
|
-
*/const Xw=e=>{const t=qD(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
802
|
-
* @license lucide-react v1.28.0 - ISC
|
|
803
|
-
*
|
|
804
|
-
* This source code is licensed under the ISC license.
|
|
805
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
806
|
-
*/var Xm={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"};/**
|
|
807
|
-
* @license lucide-react v1.28.0 - ISC
|
|
808
|
-
*
|
|
809
|
-
* This source code is licensed under the ISC license.
|
|
810
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
811
|
-
*/const FD=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},PD=x.createContext({}),VD=()=>x.useContext(PD),GD=x.forwardRef(({color:e,size:t,strokeWidth:a,absoluteStrokeWidth:r,className:s="",children:c,iconNode:u,...m},p)=>{const{size:y=24,strokeWidth:v=2,absoluteStrokeWidth:g=!1,color:w="currentColor",className:k=""}=VD()??{},E=r??g?Number(a??v)*24/Number(t??y):a??v;return x.createElement("svg",{ref:p,...Xm,width:t??y??Xm.width,height:t??y??Xm.height,stroke:e??w,strokeWidth:E,className:nE("lucide",k,s),...!c&&!FD(m)&&{"aria-hidden":"true"},...m},[...u.map(([S,j])=>x.createElement(S,j)),...Array.isArray(c)?c:[c]])});/**
|
|
812
|
-
* @license lucide-react v1.28.0 - ISC
|
|
813
|
-
*
|
|
814
|
-
* This source code is licensed under the ISC license.
|
|
815
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
816
|
-
*/const ve=(e,t)=>{const a=x.forwardRef(({className:r,...s},c)=>x.createElement(GD,{ref:c,iconNode:t,className:nE(`lucide-${HD(Xw(e))}`,`lucide-${e}`,r),...s}));return a.displayName=Xw(e),a};/**
|
|
817
|
-
* @license lucide-react v1.28.0 - ISC
|
|
818
|
-
*
|
|
819
|
-
* This source code is licensed under the ISC license.
|
|
820
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
821
|
-
*/const KD=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],YD=ve("activity",KD);/**
|
|
822
|
-
* @license lucide-react v1.28.0 - ISC
|
|
823
|
-
*
|
|
824
|
-
* This source code is licensed under the ISC license.
|
|
825
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
826
|
-
*/const QD=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],XD=ve("archive",QD);/**
|
|
827
|
-
* @license lucide-react v1.28.0 - ISC
|
|
828
|
-
*
|
|
829
|
-
* This source code is licensed under the ISC license.
|
|
830
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
831
|
-
*/const ZD=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],WD=ve("arrow-down",ZD);/**
|
|
832
|
-
* @license lucide-react v1.28.0 - ISC
|
|
833
|
-
*
|
|
834
|
-
* This source code is licensed under the ISC license.
|
|
835
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
836
|
-
*/const JD=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],eL=ve("arrow-left",JD);/**
|
|
837
|
-
* @license lucide-react v1.28.0 - ISC
|
|
838
|
-
*
|
|
839
|
-
* This source code is licensed under the ISC license.
|
|
840
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
841
|
-
*/const tL=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],nL=ve("arrow-right",tL);/**
|
|
842
|
-
* @license lucide-react v1.28.0 - ISC
|
|
843
|
-
*
|
|
844
|
-
* This source code is licensed under the ISC license.
|
|
845
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
846
|
-
*/const iL=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],iE=ve("arrow-up-right",iL);/**
|
|
847
|
-
* @license lucide-react v1.28.0 - ISC
|
|
848
|
-
*
|
|
849
|
-
* This source code is licensed under the ISC license.
|
|
850
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
851
|
-
*/const aL=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],rL=ve("arrow-up",aL);/**
|
|
852
|
-
* @license lucide-react v1.28.0 - ISC
|
|
853
|
-
*
|
|
854
|
-
* This source code is licensed under the ISC license.
|
|
855
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
856
|
-
*/const oL=[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]],sL=ve("book-open",oL);/**
|
|
857
|
-
* @license lucide-react v1.28.0 - ISC
|
|
858
|
-
*
|
|
859
|
-
* This source code is licensed under the ISC license.
|
|
860
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
861
|
-
*/const lL=[["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"}]],kg=ve("box",lL);/**
|
|
862
|
-
* @license lucide-react v1.28.0 - ISC
|
|
863
|
-
*
|
|
864
|
-
* This source code is licensed under the ISC license.
|
|
865
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
866
|
-
*/const cL=[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]],uL=ve("building-2",cL);/**
|
|
867
|
-
* @license lucide-react v1.28.0 - ISC
|
|
868
|
-
*
|
|
869
|
-
* This source code is licensed under the ISC license.
|
|
870
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
871
|
-
*/const dL=[["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3",key:"cabbwy"}],["rect",{x:"4",y:"2",width:"16",height:"20",rx:"2",key:"1uxh74"}]],fL=ve("building",dL);/**
|
|
872
|
-
* @license lucide-react v1.28.0 - ISC
|
|
873
|
-
*
|
|
874
|
-
* This source code is licensed under the ISC license.
|
|
875
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
876
|
-
*/const hL=[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M8 13h.01",key:"1sbv64"}],["path",{d:"M12 13h.01",key:"y0uutt"}],["path",{d:"M16 13h.01",key:"wip0gl"}],["path",{d:"M8 17h.01",key:"p3bg7i"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M16 17h.01",key:"ql8jdd"}]],mL=ve("calendar-days",hL);/**
|
|
877
|
-
* @license lucide-react v1.28.0 - ISC
|
|
878
|
-
*
|
|
879
|
-
* This source code is licensed under the ISC license.
|
|
880
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
881
|
-
*/const pL=[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}]],yL=ve("calendar",pL);/**
|
|
882
|
-
* @license lucide-react v1.28.0 - ISC
|
|
883
|
-
*
|
|
884
|
-
* This source code is licensed under the ISC license.
|
|
885
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
886
|
-
*/const gL=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],bL=ve("chart-line",gL);/**
|
|
887
|
-
* @license lucide-react v1.28.0 - ISC
|
|
888
|
-
*
|
|
889
|
-
* This source code is licensed under the ISC license.
|
|
890
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
891
|
-
*/const vL=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Xd=ve("check",vL);/**
|
|
892
|
-
* @license lucide-react v1.28.0 - ISC
|
|
893
|
-
*
|
|
894
|
-
* This source code is licensed under the ISC license.
|
|
895
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
896
|
-
*/const xL=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],_g=ve("chevron-down",xL);/**
|
|
897
|
-
* @license lucide-react v1.28.0 - ISC
|
|
898
|
-
*
|
|
899
|
-
* This source code is licensed under the ISC license.
|
|
900
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
901
|
-
*/const wL=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],aE=ve("chevron-left",wL);/**
|
|
902
|
-
* @license lucide-react v1.28.0 - ISC
|
|
903
|
-
*
|
|
904
|
-
* This source code is licensed under the ISC license.
|
|
905
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
906
|
-
*/const kL=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Sg=ve("chevron-right",kL);/**
|
|
907
|
-
* @license lucide-react v1.28.0 - ISC
|
|
908
|
-
*
|
|
909
|
-
* This source code is licensed under the ISC license.
|
|
910
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
911
|
-
*/const _L=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],SL=ve("chevrons-up-down",_L);/**
|
|
912
|
-
* @license lucide-react v1.28.0 - ISC
|
|
913
|
-
*
|
|
914
|
-
* This source code is licensed under the ISC license.
|
|
915
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
916
|
-
*/const EL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],jL=ve("circle-question-mark",EL);/**
|
|
917
|
-
* @license lucide-react v1.28.0 - ISC
|
|
918
|
-
*
|
|
919
|
-
* This source code is licensed under the ISC license.
|
|
920
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
921
|
-
*/const OL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],AL=ve("clock",OL);/**
|
|
922
|
-
* @license lucide-react v1.28.0 - ISC
|
|
923
|
-
*
|
|
924
|
-
* This source code is licensed under the ISC license.
|
|
925
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
926
|
-
*/const NL=[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]],Eg=ve("cloud-upload",NL);/**
|
|
927
|
-
* @license lucide-react v1.28.0 - ISC
|
|
928
|
-
*
|
|
929
|
-
* This source code is licensed under the ISC license.
|
|
930
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
931
|
-
*/const ML=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],CL=ve("copy",ML);/**
|
|
932
|
-
* @license lucide-react v1.28.0 - ISC
|
|
933
|
-
*
|
|
934
|
-
* This source code is licensed under the ISC license.
|
|
935
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
936
|
-
*/const RL=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],TL=ve("credit-card",RL);/**
|
|
937
|
-
* @license lucide-react v1.28.0 - ISC
|
|
938
|
-
*
|
|
939
|
-
* This source code is licensed under the ISC license.
|
|
940
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
941
|
-
*/const DL=[["path",{d:"M6 2v14a2 2 0 0 0 2 2h14",key:"ron5a4"}],["path",{d:"M18 22V8a2 2 0 0 0-2-2H2",key:"7s9ehn"}]],LL=ve("crop",DL);/**
|
|
942
|
-
* @license lucide-react v1.28.0 - ISC
|
|
943
|
-
*
|
|
944
|
-
* This source code is licensed under the ISC license.
|
|
945
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
946
|
-
*/const zL=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],$L=ve("database",zL);/**
|
|
947
|
-
* @license lucide-react v1.28.0 - ISC
|
|
948
|
-
*
|
|
949
|
-
* This source code is licensed under the ISC license.
|
|
950
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
951
|
-
*/const UL=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],rE=ve("download",UL);/**
|
|
952
|
-
* @license lucide-react v1.28.0 - ISC
|
|
953
|
-
*
|
|
954
|
-
* This source code is licensed under the ISC license.
|
|
955
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
956
|
-
*/const IL=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],BL=ve("ellipsis-vertical",IL);/**
|
|
957
|
-
* @license lucide-react v1.28.0 - ISC
|
|
958
|
-
*
|
|
959
|
-
* This source code is licensed under the ISC license.
|
|
960
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
961
|
-
*/const HL=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],qL=ve("ellipsis",HL);/**
|
|
962
|
-
* @license lucide-react v1.28.0 - ISC
|
|
963
|
-
*
|
|
964
|
-
* This source code is licensed under the ISC license.
|
|
965
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
966
|
-
*/const FL=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],oE=ve("external-link",FL);/**
|
|
967
|
-
* @license lucide-react v1.28.0 - ISC
|
|
968
|
-
*
|
|
969
|
-
* This source code is licensed under the ISC license.
|
|
970
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
971
|
-
*/const PL=[["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",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["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",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],VL=ve("eye-off",PL);/**
|
|
972
|
-
* @license lucide-react v1.28.0 - ISC
|
|
973
|
-
*
|
|
974
|
-
* This source code is licensed under the ISC license.
|
|
975
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
976
|
-
*/const GL=[["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",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],sE=ve("eye",GL);/**
|
|
977
|
-
* @license lucide-react v1.28.0 - ISC
|
|
978
|
-
*
|
|
979
|
-
* This source code is licensed under the ISC license.
|
|
980
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
981
|
-
*/const KL=[["path",{d:"M14.364 13.634a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506l4.013-4.009a1 1 0 0 0-3.004-3.004z",key:"ukzhwg"}],["path",{d:"M14.487 7.858A1 1 0 0 1 14 7V2",key:"1klhew"}],["path",{d:"M20 19.645V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l2.516 2.516",key:"rxaxab"}],["path",{d:"M8 18h1",key:"13wk12"}]],YL=ve("file-pen-line",KL);/**
|
|
982
|
-
* @license lucide-react v1.28.0 - ISC
|
|
983
|
-
*
|
|
984
|
-
* This source code is licensed under the ISC license.
|
|
985
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
986
|
-
*/const QL=[["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:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],lE=ve("file-spreadsheet",QL);/**
|
|
987
|
-
* @license lucide-react v1.28.0 - ISC
|
|
988
|
-
*
|
|
989
|
-
* This source code is licensed under the ISC license.
|
|
990
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
991
|
-
*/const XL=[["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"}]],Zd=ve("file-text",XL);/**
|
|
992
|
-
* @license lucide-react v1.28.0 - ISC
|
|
993
|
-
*
|
|
994
|
-
* This source code is licensed under the ISC license.
|
|
995
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
996
|
-
*/const ZL=[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]],Zm=ve("files",ZL);/**
|
|
997
|
-
* @license lucide-react v1.28.0 - ISC
|
|
998
|
-
*
|
|
999
|
-
* This source code is licensed under the ISC license.
|
|
1000
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1001
|
-
*/const WL=[["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"}]],JL=ve("file",WL);/**
|
|
1002
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1003
|
-
*
|
|
1004
|
-
* This source code is licensed under the ISC license.
|
|
1005
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1006
|
-
*/const e6=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M3 7.5h4",key:"zfgn84"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 16.5h4",key:"1230mu"}],["path",{d:"M17 3v18",key:"in4fa5"}],["path",{d:"M17 7.5h4",key:"myr1c1"}],["path",{d:"M17 16.5h4",key:"go4c1d"}]],t6=ve("film",e6);/**
|
|
1007
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1008
|
-
*
|
|
1009
|
-
* This source code is licensed under the ISC license.
|
|
1010
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1011
|
-
*/const n6=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],i6=ve("globe",n6);/**
|
|
1012
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1013
|
-
*
|
|
1014
|
-
* This source code is licensed under the ISC license.
|
|
1015
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1016
|
-
*/const a6=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],jg=ve("grip-vertical",a6);/**
|
|
1017
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1018
|
-
*
|
|
1019
|
-
* This source code is licensed under the ISC license.
|
|
1020
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1021
|
-
*/const r6=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],o6=ve("house",r6);/**
|
|
1022
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1023
|
-
*
|
|
1024
|
-
* This source code is licensed under the ISC license.
|
|
1025
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1026
|
-
*/const s6=[["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"}]],Wd=ve("image",s6);/**
|
|
1027
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1028
|
-
*
|
|
1029
|
-
* This source code is licensed under the ISC license.
|
|
1030
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1031
|
-
*/const l6=[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",key:"9kzy35"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2",key:"1t0f0t"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor",key:"1obus6"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2",key:"1gvhby"}]],ny=ve("images",l6);/**
|
|
1032
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1033
|
-
*
|
|
1034
|
-
* This source code is licensed under the ISC license.
|
|
1035
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1036
|
-
*/const c6=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],u6=ve("key-round",c6);/**
|
|
1037
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1038
|
-
*
|
|
1039
|
-
* This source code is licensed under the ISC license.
|
|
1040
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1041
|
-
*/const d6=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],cE=ve("layout-grid",d6);/**
|
|
1042
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1043
|
-
*
|
|
1044
|
-
* This source code is licensed under the ISC license.
|
|
1045
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1046
|
-
*/const f6=[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]],h6=ve("layout-template",f6);/**
|
|
1047
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1048
|
-
*
|
|
1049
|
-
* This source code is licensed under the ISC license.
|
|
1050
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1051
|
-
*/const m6=[["rect",{width:"8",height:"18",x:"3",y:"3",rx:"1",key:"oynpb5"}],["path",{d:"M7 3v18",key:"bbkbws"}],["path",{d:"M20.4 18.9c.2.5-.1 1.1-.6 1.3l-1.9.7c-.5.2-1.1-.1-1.3-.6L11.1 5.1c-.2-.5.1-1.1.6-1.3l1.9-.7c.5-.2 1.1.1 1.3.6Z",key:"1qboyk"}]],p6=ve("library-big",m6);/**
|
|
1052
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1053
|
-
*
|
|
1054
|
-
* This source code is licensed under the ISC license.
|
|
1055
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1056
|
-
*/const y6=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],Og=ve("link-2",y6);/**
|
|
1057
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1058
|
-
*
|
|
1059
|
-
* This source code is licensed under the ISC license.
|
|
1060
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1061
|
-
*/const g6=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],b6=ve("link",g6);/**
|
|
1062
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1063
|
-
*
|
|
1064
|
-
* This source code is licensed under the ISC license.
|
|
1065
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1066
|
-
*/const v6=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],uE=ve("list",v6);/**
|
|
1067
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1068
|
-
*
|
|
1069
|
-
* This source code is licensed under the ISC license.
|
|
1070
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1071
|
-
*/const x6=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],w6=ve("lock",x6);/**
|
|
1072
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1073
|
-
*
|
|
1074
|
-
* This source code is licensed under the ISC license.
|
|
1075
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1076
|
-
*/const k6=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],_6=ve("log-out",k6);/**
|
|
1077
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1078
|
-
*
|
|
1079
|
-
* This source code is licensed under the ISC license.
|
|
1080
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1081
|
-
*/const S6=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],E6=ve("mail",S6);/**
|
|
1082
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1083
|
-
*
|
|
1084
|
-
* This source code is licensed under the ISC license.
|
|
1085
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1086
|
-
*/const j6=[["path",{d:"M15 22a1 1 0 0 1-1-1v-4a1 1 0 0 1 .445-.832l3-2a1 1 0 0 1 1.11 0l3 2A1 1 0 0 1 22 17v4a1 1 0 0 1-1 1z",key:"1p1rcz"}],["path",{d:"M18 10a8 8 0 0 0-16 0c0 4.993 5.539 10.193 7.399 11.799a1 1 0 0 0 .601.2",key:"mcbcs9"}],["path",{d:"M18 22v-3",key:"1t1ugv"}],["circle",{cx:"10",cy:"10",r:"3",key:"1ns7v1"}]],O6=ve("map-pin-house",j6);/**
|
|
1087
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1088
|
-
*
|
|
1089
|
-
* This source code is licensed under the ISC license.
|
|
1090
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1091
|
-
*/const A6=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],dE=ve("map-pin",A6);/**
|
|
1092
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1093
|
-
*
|
|
1094
|
-
* This source code is licensed under the ISC license.
|
|
1095
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1096
|
-
*/const N6=[["path",{d:"M18 8c0 3.613-3.869 7.429-5.393 8.795a1 1 0 0 1-1.214 0C9.87 15.429 6 11.613 6 8a6 6 0 0 1 12 0",key:"11u0oz"}],["circle",{cx:"12",cy:"8",r:"2",key:"1822b1"}],["path",{d:"M8.714 14h-3.71a1 1 0 0 0-.948.683l-2.004 6A1 1 0 0 0 3 22h18a1 1 0 0 0 .948-1.316l-2-6a1 1 0 0 0-.949-.684h-3.712",key:"q8zwxj"}]],M6=ve("map-pinned",N6);/**
|
|
1097
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1098
|
-
*
|
|
1099
|
-
* This source code is licensed under the ISC license.
|
|
1100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1101
|
-
*/const C6=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],R6=ve("maximize-2",C6);/**
|
|
1102
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1103
|
-
*
|
|
1104
|
-
* This source code is licensed under the ISC license.
|
|
1105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1106
|
-
*/const T6=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],D6=ve("mic",T6);/**
|
|
1107
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1108
|
-
*
|
|
1109
|
-
* This source code is licensed under the ISC license.
|
|
1110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1111
|
-
*/const L6=[["path",{d:"M5 12h14",key:"1ays0h"}]],z6=ve("minus",L6);/**
|
|
1112
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1113
|
-
*
|
|
1114
|
-
* This source code is licensed under the ISC license.
|
|
1115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1116
|
-
*/const $6=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]],U6=ve("mouse-pointer-click",$6);/**
|
|
1117
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1118
|
-
*
|
|
1119
|
-
* This source code is licensed under the ISC license.
|
|
1120
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1121
|
-
*/const I6=[["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-4 0v-9a2 2 0 0 1 2-2h2",key:"39pd36"}],["rect",{width:"8",height:"4",x:"10",y:"6",rx:"1",key:"aywv1n"}]],B6=ve("newspaper",I6);/**
|
|
1122
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1123
|
-
*
|
|
1124
|
-
* This source code is licensed under the ISC license.
|
|
1125
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1126
|
-
*/const H6=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],q6=ve("palette",H6);/**
|
|
1127
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1128
|
-
*
|
|
1129
|
-
* This source code is licensed under the ISC license.
|
|
1130
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1131
|
-
*/const F6=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Ag=ve("pencil",F6);/**
|
|
1132
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1133
|
-
*
|
|
1134
|
-
* This source code is licensed under the ISC license.
|
|
1135
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1136
|
-
*/const P6=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],V6=ve("phone",P6);/**
|
|
1137
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1138
|
-
*
|
|
1139
|
-
* This source code is licensed under the ISC license.
|
|
1140
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1141
|
-
*/const G6=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],fE=ve("play",G6);/**
|
|
1142
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1143
|
-
*
|
|
1144
|
-
* This source code is licensed under the ISC license.
|
|
1145
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1146
|
-
*/const K6=[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]],Y6=ve("plug",K6);/**
|
|
1147
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1148
|
-
*
|
|
1149
|
-
* This source code is licensed under the ISC license.
|
|
1150
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1151
|
-
*/const Q6=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Jd=ve("plus",Q6);/**
|
|
1152
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1153
|
-
*
|
|
1154
|
-
* This source code is licensed under the ISC license.
|
|
1155
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1156
|
-
*/const X6=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],Z6=ve("power",X6);/**
|
|
1157
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1158
|
-
*
|
|
1159
|
-
* This source code is licensed under the ISC license.
|
|
1160
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1161
|
-
*/const W6=[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]],Ng=ve("presentation",W6);/**
|
|
1162
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1163
|
-
*
|
|
1164
|
-
* This source code is licensed under the ISC license.
|
|
1165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1166
|
-
*/const J6=[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]],e8=ve("redo-2",J6);/**
|
|
1167
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1168
|
-
*
|
|
1169
|
-
* This source code is licensed under the ISC license.
|
|
1170
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1171
|
-
*/const t8=[["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"}]],Mg=ve("rotate-3d",t8);/**
|
|
1172
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1173
|
-
*
|
|
1174
|
-
* This source code is licensed under the ISC license.
|
|
1175
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1176
|
-
*/const n8=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],i8=ve("rotate-cw",n8);/**
|
|
1177
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1178
|
-
*
|
|
1179
|
-
* This source code is licensed under the ISC license.
|
|
1180
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1181
|
-
*/const a8=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Cg=ve("search",a8);/**
|
|
1182
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1183
|
-
*
|
|
1184
|
-
* This source code is licensed under the ISC license.
|
|
1185
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1186
|
-
*/const r8=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],o8=ve("settings",r8);/**
|
|
1187
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1188
|
-
*
|
|
1189
|
-
* This source code is licensed under the ISC license.
|
|
1190
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1191
|
-
*/const s8=[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]],l8=ve("share",s8);/**
|
|
1192
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1193
|
-
*
|
|
1194
|
-
* This source code is licensed under the ISC license.
|
|
1195
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1196
|
-
*/const c8=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],u8=ve("sparkles",c8);/**
|
|
1197
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1198
|
-
*
|
|
1199
|
-
* This source code is licensed under the ISC license.
|
|
1200
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1201
|
-
*/const d8=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],f8=ve("tag",d8);/**
|
|
1202
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1203
|
-
*
|
|
1204
|
-
* This source code is licensed under the ISC license.
|
|
1205
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1206
|
-
*/const h8=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],As=ve("trash-2",h8);/**
|
|
1207
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1208
|
-
*
|
|
1209
|
-
* This source code is licensed under the ISC license.
|
|
1210
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1211
|
-
*/const m8=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],p8=ve("trending-up",m8);/**
|
|
1212
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1213
|
-
*
|
|
1214
|
-
* This source code is licensed under the ISC license.
|
|
1215
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1216
|
-
*/const y8=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],g8=ve("triangle-alert",y8);/**
|
|
1217
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1218
|
-
*
|
|
1219
|
-
* This source code is licensed under the ISC license.
|
|
1220
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1221
|
-
*/const b8=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],v8=ve("type",b8);/**
|
|
1222
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1223
|
-
*
|
|
1224
|
-
* This source code is licensed under the ISC license.
|
|
1225
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1226
|
-
*/const x8=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],w8=ve("undo-2",x8);/**
|
|
1227
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1228
|
-
*
|
|
1229
|
-
* This source code is licensed under the ISC license.
|
|
1230
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1231
|
-
*/const k8=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],ef=ve("upload",k8);/**
|
|
1232
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1233
|
-
*
|
|
1234
|
-
* This source code is licensed under the ISC license.
|
|
1235
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1236
|
-
*/const _8=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],S8=ve("user-plus",_8);/**
|
|
1237
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1238
|
-
*
|
|
1239
|
-
* This source code is licensed under the ISC license.
|
|
1240
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1241
|
-
*/const E8=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],j8=ve("user",E8);/**
|
|
1242
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1243
|
-
*
|
|
1244
|
-
* This source code is licensed under the ISC license.
|
|
1245
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1246
|
-
*/const O8=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],A8=ve("users",O8);/**
|
|
1247
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1248
|
-
*
|
|
1249
|
-
* This source code is licensed under the ISC license.
|
|
1250
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1251
|
-
*/const N8=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],Rg=ve("video",N8);/**
|
|
1252
|
-
* @license lucide-react v1.28.0 - ISC
|
|
1253
|
-
*
|
|
1254
|
-
* This source code is licensed under the ISC license.
|
|
1255
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
1256
|
-
*/const M8=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Tg=ve("x",M8);function ie(...e){return fg(cg(e))}const C8="flex flex-col gap-3.5 pt-1",Qr="flex flex-col gap-1",hE="text-[length:calc(11*var(--content))] font-medium text-ink-4 pl-0.5",Ns="m-0 text-caption leading-[1.4] text-danger",mE="bg-[repeating-linear-gradient(135deg,rgba(20,18,13,0.05)_0_1px,transparent_1px_9px)]",vt="appearance-none cursor-pointer border-0 bg-transparent p-0 m-0 outline-none",R8="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)]",T8="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",Ms=ie("data-[attention=required]:border-danger data-[attention=required]:bg-danger-soft","data-[attention=invalid]:border-danger data-[attention=invalid]:bg-danger-soft");function Cs(e,t){return e===null||e==="required"&&!t?{}:{"data-attention":e}}const pE="flex items-center text-[length:calc(12.5*var(--content))] text-ink-4",D8=ie(vt,"min-w-0 flex-1 bg-transparent text-ink outline-none placeholder:text-ink-4"),L8="py-2.25",z8="text-[length:calc(13.5*var(--content))]",yE=ie(L8,z8),gE="font-mono text-[length:calc(10.5*var(--content))] [font-feature-settings:'tnum'] shrink-0",bE="text-[#7a5a14]";function $8(e,t){const a=ie(gE,"text-ink-4");return t==null?a:e>t?ie(a,"text-danger"):e>=t*.9?ie(a,bE):a}function U8({children:e}){return d.jsx("span",{className:hE,children:e})}function I8({value:e,onChange:t,placeholder:a,inputMode:r,maxLength:s,spellCheck:c,className:u,ariaLabel:m,id:p}){return d.jsx("input",{id:p,className:ie(D8,u),value:e,placeholder:a,inputMode:r,maxLength:s,spellCheck:c,"aria-label":m,onChange:y=>t(y.target.value)})}function fn(e,t,a=1.5){const r=e;return function({size:c=t}={}){return d.jsx(r,{size:c,strokeWidth:a,style:{width:`calc(${c} * var(--content))`,height:`calc(${c} * var(--content))`}})}}const Rt={trash:fn(As,11),plus:fn(Jd,14),up:fn(ef,15),link:fn(b6,13),play:({size:e=20}={})=>d.jsx(fE,{size:e,strokeWidth:0,fill:"currentColor",style:{width:`calc(${e} * var(--content))`,height:`calc(${e} * var(--content))`}}),tour:fn(Mg,18),search:fn(Cg,14),x:fn(Tg,15),check:fn(Xd,13),minus:fn(z6,16),external:fn(oE,11),grip:fn(jg,13,1.8),calendar:fn(mL,14),chevL:fn(aE,15),chevR:fn(Sg,15),chevD:fn(_g,13)},tf=x.createContext(null);function B8({ports:e,children:t}){return d.jsx(tf.Provider,{value:e,children:t})}function Yt(){const e=x.useContext(tf);if(!e)throw new Error("useSlotEditorPorts: missing SlotEditorPortsProvider");return e}function H8(){var e;return(e=x.useContext(tf))==null?void 0:e.fillMark}function q8(){var e;return(e=x.useContext(tf))==null?void 0:e.isAssetProcessing}function Pa(e){return Yt().useEditorStore(e)}function F8(){return Yt().api}const P8="size-[calc(6*var(--content))] shrink-0 rounded-full bg-honey-ink";function Xl(e,t){const a=rR(t);return e===void 0||a===null?void 0:`${e}.${a}`}function Zl(e,t){return e===void 0?void 0:`${e}.${t}`}function vE(e){return e==="list"||e==="media"||yn(e)}function V8(e){const t=H8();return t===void 0||e===void 0?null:t(e)}function G8({mark:e}){return e===null?null:d.jsxs("span",{"data-fill-mark":"line",className:"inline-flex items-center gap-[calc(6*var(--content))] text-[length:calc(11.5*var(--content))] text-ink-3",children:[d.jsx("span",{className:P8,"aria-hidden":"true"}),e]})}var ir=P2();function K8(...e){return fg(cg(e))}const nf=1e3,Xr=nf+200,Y8=nf+500;let Q8=0;const Qa=[];let xE="",wE="";function X8(){if(Qa.length!==1||typeof document>"u")return;const e=document.body;xE=e.style.overflow,wE=e.style.paddingRight;const t=window.innerWidth-document.documentElement.clientWidth;e.style.overflow="hidden",t>0&&(e.style.paddingRight=`${t}px`)}function Z8(){Qa.length===0&&(typeof document>"u"||(document.body.style.overflow=xE,document.body.style.paddingRight=wE))}function kE(){const e=++Q8;return Qa.push(e),X8(),e}function iy(e){const t=Qa.indexOf(e);t!==-1&&Qa.splice(t,1),Z8()}function _E(e){const t=Qa.indexOf(e);return nf+(t===-1?0:t)*10}function Zw(e){return Qa[Qa.length-1]===e}const W8="(prefers-reduced-motion: reduce)";function J8(){const[e,t]=x.useState(!1);return x.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const a=window.matchMedia(W8);t(a.matches);const r=s=>t(s.matches);return a.addEventListener("change",r),()=>a.removeEventListener("change",r)},[]),e}const ez={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)]"},tz='a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';function Dg({open:e,onClose:t,className:a,size:r,closeOnBackdrop:s=!0,closeOnEsc:c=!0,labelledBy:u,ariaLabel:m,children:p}){const[y,v]=x.useState("closed"),g=x.useRef(null),w=x.useRef(null),k=x.useRef(null),[E,S]=x.useState(1e3),j=J8(),[C,A]=x.useState(p);e&&C!==p&&A(p),x.useEffect(()=>{e&&y==="closed"?v("open"):!e&&y==="open"&&v(j?"closed":"closing")},[e,y,j]),x.useEffect(()=>{var R;if(y==="open"&&g.current===null){k.current=document.activeElement??null;const B=kE();g.current=B,S(_E(B)),(R=w.current)==null||R.focus()}},[y]),x.useEffect(()=>{var R,B;y==="closed"&&g.current!==null&&(iy(g.current),g.current=null,(B=(R=k.current)==null?void 0:R.focus)==null||B.call(R),k.current=null)},[y]),x.useEffect(()=>()=>{g.current!==null&&(iy(g.current),g.current=null)},[]),x.useEffect(()=>{if(y!=="closing")return;const R=setTimeout(()=>v("closed"),400);return()=>clearTimeout(R)},[y]),x.useEffect(()=>{if(y!=="open"||!c)return;const R=B=>{B.key==="Escape"&&(g.current===null||!Zw(g.current)||(B.stopPropagation(),t()))};return document.addEventListener("keydown",R,!0),()=>document.removeEventListener("keydown",R,!0)},[y,c,t]),x.useEffect(()=>{if(y!=="open")return;const R=B=>{if(B.key!=="Tab"||g.current===null||!Zw(g.current))return;const D=w.current;if(!D)return;const L=D.querySelectorAll(tz);if(L.length===0){B.preventDefault();return}const P=L[0],le=L[L.length-1];B.shiftKey&&document.activeElement===P?(B.preventDefault(),le==null||le.focus()):!B.shiftKey&&document.activeElement===le&&(B.preventDefault(),P==null||P.focus())};return document.addEventListener("keydown",R,!0),()=>document.removeEventListener("keydown",R,!0)},[y]);const O=x.useCallback(R=>{R.target===R.currentTarget&&y==="closing"&&v("closed")},[y]);if(y==="closed"||typeof document>"u")return null;const T=y==="closing"?"closing":"open";return ir.createPortal(d.jsx("div",{className:"hp-modal-backdrop","data-state":T,inert:T==="closing",style:{zIndex:E},onMouseDown:s?t:void 0,children:d.jsx("div",{ref:w,className:K8("hp-modal-panel",r?ez[r]:void 0,a),"data-state":T,role:"dialog","aria-modal":"true","aria-labelledby":u,"aria-label":m,tabIndex:-1,onMouseDown:R=>R.stopPropagation(),onAnimationEnd:O,children:e?p:C})}),document.body)}function SE(){const[e,t]=x.useState(nf);return x.useEffect(()=>{const a=kE();return t(_E(a)),()=>iy(a)},[]),e}const nz={youtube:"video",vimeo:"video"};function EE(e){const t=fc(e.startsWith("http")?e:`https://${e}`);if(t!==null){const a=Ja[t],r=a.kind==="tour"||a.kind==="video"?a.kind:void 0;return{key:t,name:a.label,kind:nz[t]??"link",...r?{media:r}:{}}}try{return{key:"web",name:new URL(e.startsWith("http")?e:`https://${e}`).hostname.replace(/^www\./,""),kind:"link"}}catch{return{key:"web",name:"Link",kind:"link"}}}const Lg="bg-[#f7f6f2]",jn="bg-[#eceae3]",iz="[mask-image:var(--fade-down)]",az="[background-image:var(--wash-soft)]";function gc({className:e,children:t}){return d.jsx("div",{"aria-hidden":"true",className:ie("pointer-events-none absolute inset-0 select-none overflow-hidden",iz,e),children:t})}function _d({icon:e,headline:t,line:a,lifted:r=!1}){return d.jsx("div",{className:ie("absolute inset-0 flex items-center justify-center-safe overflow-y-auto px-6 py-8",az),children:d.jsxs("div",{className:"flex max-w-full flex-col items-center text-center",children:[d.jsx("span",{"data-lifted":r||void 0,className:"grid h-14 w-14 place-items-center rounded-full bg-[#f3f2ed] text-ink-2 transition-[translate] duration-200 ease-settle data-lifted:-translate-y-0.5 motion-reduce:transition-none","aria-hidden":"true",children:e}),d.jsx("div",{className:"mt-4 text-[length:calc(17*var(--content))] font-semibold tracking-[-0.01em] text-ink",children:t}),a?d.jsx("div",{className:"mt-1.5 text-[length:calc(14*var(--content))] text-ink-3",children:a}):null]})})}const zg="inline-flex h-9 cursor-pointer items-center gap-1.5 whitespace-nowrap rounded-lg border px-3 text-[length:calc(12.5*var(--content))] font-medium transition-colors duration-150",$g="border-line bg-canvas text-ink-2 hover:bg-[#f6f5f1] hover:text-ink",af="hp-anim-menu absolute z-[80] rounded-xl border border-line bg-canvas shadow-[0_1px_2px_rgba(20,18,13,0.04),0_12px_32px_-8px_rgba(20,18,13,0.16)]",jE="flex w-full cursor-pointer items-center gap-2.5 rounded-lg px-2.5 py-2 text-left text-[length:calc(12.5*var(--content))] text-ink-2 hover:bg-[#f6f5f1] hover:text-ink",Ww=ie(zg,$g,"font-semibold text-ink focus-visible:bg-[#f6f5f1] aria-expanded:bg-[#f6f5f1]"),rz={large:Ww,compact:ie(Ww,"h-8")},oz="size-[calc(15*var(--content))] shrink-0";function Sd({add:e,size:t,onClick:a,buttonRef:r,expanded:s}){return d.jsxs("button",{ref:r,type:"button",...s!==void 0?{"aria-haspopup":"dialog","aria-expanded":s}:{},"data-list-verb":e.verb,className:rz[t],onClick:a,children:[d.jsx(e.icon,{"aria-hidden":"true",strokeWidth:2.4,className:oz}),e.label]})}function bc({size:e,add:t,onAdd:a,newChip:r,choose:s}){const c=s!==void 0?d.jsx(Sd,{add:s.choose,size:e,onClick:s.onChoose}):r??(a!==null?d.jsx(Sd,{add:t,size:e,onClick:a}):null);return c===null?null:d.jsx("div",{"data-list-verbs":"",className:"flex flex-wrap items-center gap-2",children:c})}const OE=x.createContext(null);function sz({api:e,children:t}){return d.jsx(OE.Provider,{value:e,children:t})}function Ug(){const e=x.useContext(OE);if(!e)throw new Error("useMediaLibraryApi: missing MediaLibraryApiProvider");return e}async function lz(e,t,a){let r=0;const s=Math.max(1,Math.min(t,e.length)),c=Array.from({length:s},async()=>{for(;r<e.length;){const u=r++;try{await a(e[u],u)}catch{}}});await Promise.all(c)}const Jw=500*1024*1024,Ed=[{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"}],AE=new Set(Ed.map(e=>e.extension)),NE=new Set(Ed.flatMap(e=>e.mimeTypes));function rf(e){const t=e.indexOf(";");return(t===-1?e:e.slice(0,t)).trim().toLowerCase()}function Ig(e){const t=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\")),a=e.slice(t+1),r=a.lastIndexOf(".");return r<=0?"":a.slice(r).toLowerCase()}function cz(e){return rf(e).startsWith("image/")}function uz(e){return rf(e).startsWith("video/")}function dz(e,t){return AE.has(Ig(e))&&NE.has(rf(t))}function fz(e,t){return cz(t)||uz(t)||dz(e,t)}function hz(e,t){const a=Ig(e),r=Ed.find(u=>u.extension===a);if(r)return r.family;const s=rf(t),c=Ed.find(u=>u.mimeTypes.includes(s));return c?c.family:null}const mz=[...NE,...AE].join(","),pz="an image, a video, or a document (PDF, Word, Excel .xlsx, PowerPoint .pptx, CSV, or text)";function yz(e){return e.replace(/^https?:\/\//i,"").replace(/\/$/,"")}function gz(e){switch(e){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 ME(e,t){const a=hz(e,t),{glyph:r,typeNoun:s}=a===null?{glyph:"doc",typeNoun:"File"}:gz(a);return{glyph:r,typeNoun:s,extension:Ig(e).replace(".","").toUpperCase()}}function bz(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(0)} KB`:`${(e/1048576).toFixed(1)} MB`}function jd(e){var t;return((t=e.renditions.poster)==null?void 0:t.url)??(e.kind==="image"?e.file_url:null)}function vz(e){var t;return e.kind!=="image"?jd(e):(Hd(e.crop)?(t=e.renditions.crop)==null?void 0:t.url:void 0)??jd(e)}function CE(e){if(e.kind!=="image"||e.state==="failed")return!1;const{crop:t,cutout:a}=e.renditions;return t!==null&&Hd(e.crop)&&!fs(t.over.crop,e.crop)?!0:a!==null&&!fs(a.over.crop,e.crop)}function xz(e){return e.url!==null||e.renditions.encode!==null}function RE(e){return e.url!==null&&V5(e.url)!==null}function vc({renditions:e={},...t}){const a=new Set(j_),r=s=>{const c=e[s];if(c===void 0)return null;const u={key:c,mime:null,width:null,height:null,bytes:null,url:c};return a.has(s)?{...u,over:{crop:t.crop??null,options:{}}}:u};return{crop:null,key:t.file_url??null,mime:null,bytes:null,url:null,provider:null,added_at:"1970-01-01T00:00:00.000Z",account:null,page_count:null,duration_ms:null,width:null,height:null,captured_at:null,scan_count:null,poster_at_ms:null,state:"ready",file_url:null,file:t.id,...t,renditions:Object.fromEntries(X5.map(s=>[s,r(s)]))}}function TE(e){var t,a,r,s;switch(e.kind){case"image":return{id:e.id,kind:"photo",name:e.name,size:"",src:((t=e.renditions.cutout)==null?void 0:t.url)??jd(e)??""};case"video":return{id:e.id,kind:"video",name:e.name,size:"",src:((a=e.renditions.poster)==null?void 0:a.url)??"",ready:xz(e),durationMs:e.renditions.encode===null?null:e.duration_ms,videoSource:t4(e),...e.provider!==null?{provider:e.provider}:{}};case"tour":return{id:e.id,kind:"tour",name:e.name,size:"",src:((r=e.renditions.poster)==null?void 0:r.url)??"",ready:RE(e),provider:e.provider??""};case"document":return{id:e.id,kind:"document",name:e.name,size:e.bytes!==null&&e.bytes>0?bz(e.bytes):"",src:((s=e.renditions.poster)==null?void 0:s.url)??"",mime:e.mime??""}}}function wz(e){if(e==null||!Number.isFinite(e)||e<0)return"";const t=Math.round(e/1e3),a=Math.floor(t/60),r=t%60;return`${a}:${String(r).padStart(2,"0")}`}const kz=5;function ek(e){return`${Math.round(e/(1024*1024))} MB`}function _z(e){return e.size>Jw?{ok:!1,message:`This file is ${ek(e.size)}. The maximum upload size is ${ek(Jw)}.`}:fz(e.name,e.type)?{ok:!0}:{ok:!1,message:`This file type (${e.type||"unknown"}) isn't supported. Upload ${pz}.`}}function Sz(e){return e.attempt?{kind:"resume",attempt:e.attempt}:{kind:"fresh"}}function of(e){const{mediaFactsQuery:t}=Ug(),a=t(e??"");return yc({...a,select:r=>r.facts,enabled:!!e}).data}async function ay(e,t,a){await e.invalidateQueries({queryKey:t.mediaFactsQuery(a).queryKey})}const Ez=new Map;function jz(e){if(e===void 0)return Ez;const t=new Map;for(const[a,r]of Fd(e)){if(!Object.hasOwn(e.files,r.file))continue;const s=e.files[r.file];"renditions"in s&&t.set(a,Hy(s,r))}return t}function Rs(e){const t=of(e===""?null:e);return x.useMemo(()=>jz(t),[t])}const Oz={search:Cg,chevd:_g,chevr:Sg,chevl:aE,grid:cE,list:uE,plus:Jd,choose:iE,cloud:Eg,dots:BL,trash:As,down:rE,x:Tg,check:Xd,warn:g8,recheck:i8,play:fE,eye:sE,pencil:Ag,crop:LL,image:Wd,doc:Zd,spreadsheet:lE,presentation:Ng,file:JL,video:Rg,tour:kg,upload:ef};function it({name:e,size:t=14,stroke:a=1.8}){const r=Oz[e];if(!r)return null;const s={width:`calc(${t} * var(--content))`,height:`calc(${t} * var(--content))`};return e==="play"?d.jsx(r,{size:t,strokeWidth:a,fill:"currentColor",style:s}):d.jsx(r,{size:t,strokeWidth:a,style:s})}const Bg={image:{process:[Et.probe(),Et.understand(),Et.preview(),Et.ladder()],gates:["probe","understand"],publishes:["preview","ladder"]},video:{process:[Et.probe(),Et.transcode(),Et.poster(),Et.understand(),Et.preview(),Et.ladder(),Et.fetch()],gates:["probe","understand"],publishes:["transcode","poster","preview","ladder"]},document:{process:[Et.probe(),Et.understand(),Et.poster(),Et.rasterize(),Et.preview(),Et.ladder()],gates:["probe","understand"],publishes:["poster","preview","ladder"]},tour:{process:[Et.fetch(),Et.tour_details(),Et.understand()],gates:["understand"],publishes:[]}};function Az(e){for(const t of eo){const a=e[t];if(a===void 0)return`has no row for ${t} — every media kind has one`;const r=new Set;for(const s of a.process){const c=p_(s);if(c===null||typeof s!="object")return`${t}'s row lists ${JSON.stringify(s)}, which is no process binding`;const u=Wa[c.verb];if(u.site!=="kind")return`${t}'s row lists "${c.verb}", a holder's process — a row lists kind-site processes only`;if(!u.kinds.includes(t))return`${t}'s row lists "${c.verb}", which applies to ${u.kinds.join(", ")} and not to ${t}`;const m=zy(c);if(m!==null)return`${t}'s row lists "${c.verb}" with options that do not fit: ${m}`;if(r.has(c.verb))return`${t}'s row lists "${c.verb}" twice — a row runs each process once`;r.add(c.verb)}for(const s of a.gates)if(!r.has(s))return`${t}'s row gates on "${s}", which is not on its row`;for(const s of a.publishes)if(!r.has(s))return`${t}'s row publishes on "${s}", which is not on its row`}return null}const tk=Az(Bg);if(tk!==null)throw new Error(`KIND_TABLE ${tk}.`);const Nz={original:e=>e.key!==null,"pageable original":e=>e.key!==null&&e.mime==="application/pdf",master:e=>e.key!==null,poster:e=>e.renditions.poster!==null,link:e=>e.url!==null&&e.provider!==null,"any original":e=>e.key!==null||e.url!==null&&e.provider!==null},Mz={probe:"original",understand:"any original",transcode:"original",poster:{video:"original",document:"pageable original"},rasterize:"pageable original",preview:{image:"master",video:"poster",document:"poster"},ladder:{image:"master",video:"poster",document:"poster"},fetch:"link",tour_details:"link"};function Cz(e,t){const a=Mz[e];if(typeof a=="string")return a;const r=a[t];if(r===void 0)throw new Error(`kindRow(${t}): "${e}" names no input for ${t}.`);return r}const DE={image:[],video:[{before:"poster",after:"preview"},{before:"poster",after:"ladder"},{before:"fetch",after:"understand"}],document:[{before:"poster",after:"preview"},{before:"poster",after:"ladder"}],tour:[{before:"fetch",after:"tour_details"},{before:"fetch",after:"understand"}]};for(const e of eo){const t=Bg[e].process.map(a=>a.verb);for(const{before:a,after:r}of DE[e])if(!t.includes(a)||!t.includes(r))throw new Error(`KIND_TABLE: ${e}'s edge ${a} → ${r} names a verb not on its row.`)}const nk=new Map,Rz={image:[Et.crop()],video:[],document:[],tour:[]};for(const e of eo)for(const t of Rz[e]){const a=Wa[t.verb];if(a.site!=="place"||!a.kinds.includes(e))throw new Error(`PLACE_TABLE: ${e}'s row lists "${t.verb}", which is no place process of ${e}.`)}function Tz(e){const t=nk.get(e);if(t!==void 0)return t;const a=Bg[e],r=a.process.map(c=>{const u=Cz(c.verb,e);return{verb:c.verb,binding:c,input:u,present:Nz[u],gates:a.gates.includes(c.verb),publishes:a.publishes.includes(c.verb)}}),s={kind:e,entries:r,edges:DE[e],gates:a.gates};return nk.set(e,s),s}const xc={image:{label:"Image",plural:"Images",icon:"image",solid:"bg-[#2F8A5B]",soft:"bg-[#E6F2EA] text-[#1F6440]"},video:{label:"Video",plural:"Videos",icon:"video",solid:"bg-[#D2463A]",soft:"bg-[#FBE8E5] text-[#9A2C20]"},document:{label:"Document",plural:"Documents",icon:"doc",solid:"bg-[#3F73D3]",soft:"bg-[#E7EEFB] text-[#2A55A5]"},tour:{label:"Tour",plural:"Tours",icon:"tour",solid:"bg-[#7C5BC9]",soft:"bg-[#EFEAFA] text-[#5A3EA0]"}},Od=Object.keys(xc);function On(e){return"send"in e}function LE(e){return On(e)?e.id:e.asset.id}function Dz(e){return e.renditions.poster!==null||e.state==="failed"?!1:e.url!==null?e.state==="processing":Tz(e.kind).entries.some(t=>t.verb==="poster"&&t.present(e))}function Lz(e){return e.url!==null&&e.state==="failed"}function Ul(e){return e.url!==null}function zE(e){return b_(/^https?:\/\//i.test(e)?e:`https://${e}`)}const zz=()=>0;function $z({asset:e,list:t,tier:a},r){const s=r(t);return{id:e.id,kind:e.kind,state:e.state==="processing"?"processing":"ready",name:e.name,bytes:e.bytes,mime:e.mime,url:e.url,thumbnailUrl:vz(e),addedAt:Date.parse(e.added_at),previewPending:Dz(e),linkUnreachable:Lz(e),inFlight:!1,error:null,list:t,tier:a??s,upstream:s>0}}function Uz(e){const{send:t}=e;return{id:e.id,kind:e.kind,state:t.state==="uploading"?"uploading":t.state==="saving"?"processing":"failed",name:e.name,bytes:e.bytes,mime:e.mime,url:e.url,thumbnailUrl:e.preview,addedAt:e.addedAt,previewPending:!1,linkUnreachable:!1,inFlight:!0,...t.state==="uploading"?{progress:t.progress}:{},error:t.state==="failed"?t.error:null,list:e.list,tier:0,upstream:!1}}function Iz(e,t=zz){return On(e)?Uz(e):$z(e,t)}function ik(e){return e.kind===null?Od.length:Od.indexOf(e.kind)}const Bz={name:(e,t)=>e.name.localeCompare(t.name),kind:(e,t)=>ik(e)-ik(t)||t.addedAt-e.addedAt,size:(e,t)=>(t.bytes??0)-(e.bytes??0),date:(e,t)=>t.addedAt-e.addedAt,custom:(e,t)=>Number(t.inFlight)-Number(e.inFlight)};function Hz(e,t,a){const r=t==="all"?[...e]:e.filter(c=>c.kind===t),s=Bz[a];return r.sort((c,u)=>c.tier-u.tier||s(c,u))}function qz(e){const t={all:e.length};for(const a of Od)t[a]=0;for(const a of e)a.kind&&(t[a.kind]+=1);return t}function $E(e){return e===null?"":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(0)} KB`:e<1024*1024*1024?`${(e/(1024*1024)).toFixed(1)} MB`:`${(e/(1024*1024*1024)).toFixed(1)} GB`}function UE(e,t=Date.now()){const a=new Date(e),r=new Date(t),s=u=>new Date(u.getFullYear(),u.getMonth(),u.getDate()).getTime(),c=Math.round((s(r)-s(a))/864e5);return c<=0?"Today":c===1?"Yesterday":a.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function Fz(e){const[t,a]=x.useState(e);return(e===null||t===null)&&t!==e&&a(e),x.useEffect(()=>{if(e===null||t===null||e===t)return;let r=!0;const s=new Image,c=()=>{r&&a(e)};return s.onload=c,s.onerror=c,s.src=e,()=>{r=!1,s.onload=null,s.onerror=null}},[e,t]),e===null?null:t}const Pz="inline-flex items-center gap-1 whitespace-nowrap rounded-full px-2 py-0.75 text-[length:calc(10.5*var(--content))] font-semibold tracking-[0.01em]",Vz={dot:{box:"h-4 w-4 rounded-[calc(4*var(--content))]",glyph:10},mark:{box:"h-5 w-5 rounded-md",glyph:12},lead:{box:"h-6 w-6 rounded-md",glyph:14},thumb:{box:"h-5.5 w-5.5 rounded-md",glyph:13},logo:{box:"h-14 w-14 rounded-2xl",glyph:28},hero:{box:"h-20 w-20 rounded-[calc(22*var(--content))]",glyph:40}};function Zr({kind:e,size:t="mark",glyph:a,decorative:r=!1}){const s=xc[e],c=Vz[t];return d.jsx("span",{className:ie("inline-grid shrink-0 place-items-center text-white",c.box,s.solid),...r?{"aria-hidden":!0}:{role:"img","aria-label":s.label},children:d.jsx(it,{name:a??s.icon,size:c.glyph,stroke:2})})}function IE({file:e}){if(e.kind===null)return null;const t=xc[e.kind];return d.jsxs("span",{className:ie(Pz,t.soft),children:[d.jsx(it,{name:t.icon,size:10,stroke:2.2}),t.label]})}function Gz(e){const t=e.url!==null?EE(e.url).name:e.bytes!==null?$E(e.bytes):"",a=UE(e.addedAt);return t?`${t} · ${a}`:a}function Kz(e){return ME(e.name,e.mime??"").glyph}function Yz(e){return`flex items-center justify-center rounded-full border-[1.5px] border-white/85 bg-[rgba(10,12,10,0.55)] pl-0.5 text-white backdrop-blur-[2px] ${e?"h-13 w-13":"h-9 w-9"}`}const Qz={row:"thumb",card:"logo",lightbox:"hero"};function Hg({file:e,face:t="card"}){const a=Fz(e.thumbnailUrl);if(a)return d.jsx("div",{"data-preview":"image",className:"relative h-full w-full bg-cover bg-top",style:{backgroundImage:`url("${a}")`},children:e.kind==="video"?d.jsx("span",{className:`absolute inset-0 m-auto ${Yz(t==="lightbox")}`,children:d.jsx(it,{name:"play",size:t==="lightbox"?20:14})}):null});if(e.previewPending)return d.jsx("div",{"data-preview":"skeleton",className:"h-full w-full animate-pulse bg-line-soft/40"});const r=e.kind==="document"?Kz(e):void 0;return d.jsxs("div",{"data-preview":"fallback",className:"flex h-full w-full flex-col items-center justify-center gap-4 bg-canvas px-4 text-center",children:[e.kind===null?d.jsx("span",{className:"text-ink-4",children:d.jsx(it,{name:"file",size:t==="row"?16:32,stroke:1.6})}):d.jsx(Zr,{kind:e.kind,size:Qz[t],decorative:!0,...r===void 0?{}:{glyph:r}}),t==="lightbox"?d.jsx("span",{className:"line-clamp-2 max-w-[80%] text-body text-ink-3",children:e.name}):null]})}const Yu="absolute inset-0 z-[2] flex flex-col items-center justify-center gap-2 bg-[rgba(252,252,250,0.82)] p-2 text-center backdrop-blur-[2px]",BE="Can’t be reached",ry="We couldn’t load this link. It may be private, unpublished, or mistyped. Fix it at the provider, then re-check.",Qu="absolute inset-0 z-[2] flex items-center justify-center bg-[rgba(252,252,250,0.82)] px-1";function HE({file:e,compact:t=!1,onRetry:a,onRecheck:r}){if(e.state==="uploading"){const s=e.progress??0;return d.jsx("div",{className:t?Qu:Yu,children:d.jsx("span",{role:"progressbar","aria-label":"Uploading","aria-valuenow":Math.round(s),className:`h-1 overflow-hidden rounded-full bg-[#e3e0d2] ${t?"w-full":"w-[62%]"}`,children:d.jsx("span",{className:"block h-full rounded-full bg-accent transition-[width] duration-[180ms]",style:{width:`${s}%`}})})})}return e.state==="processing"?d.jsx("div",{className:t?Qu:Yu,children:d.jsx("span",{role:"progressbar","aria-label":"Loading",className:"h-3.5 w-3.5 animate-spin rounded-full border-2 border-[#d9d5c6] border-t-accent [animation-duration:0.7s]"})}):e.state==="failed"&&t?d.jsx("div",{className:`${Qu} text-danger`,title:e.error??void 0,children:d.jsx(it,{name:"warn",size:13})}):e.state==="failed"?d.jsxs("div",{className:`${Yu} text-[length:calc(11.5*var(--content))] font-semibold text-danger`,children:[d.jsx(it,{name:"warn",size:15}),d.jsx("span",{className:"max-w-[85%] truncate",children:e.error}),a?d.jsx("button",{type:"button",className:"rounded-full border border-line bg-canvas px-2.75 py-1 text-[length:calc(11*var(--content))] font-semibold text-ink hover:border-[#d9d6cb]",onClick:s=>{s.stopPropagation(),a()},children:"Retry"}):null]}):e.linkUnreachable&&t?d.jsx("div",{className:`${Qu} text-warn`,title:ry,children:d.jsx(it,{name:"warn",size:13})}):e.linkUnreachable?d.jsxs("div",{className:`${Yu} text-[length:calc(11.5*var(--content))] font-semibold text-warn`,title:ry,children:[d.jsx(it,{name:"warn",size:15}),d.jsx("span",{className:"max-w-[90%]",children:BE}),r?d.jsxs("button",{type:"button",className:"inline-flex items-center gap-1.5 rounded-full border border-line bg-canvas px-2.75 py-1 text-[length:calc(11*var(--content))] font-semibold text-ink hover:border-[#d9d6cb]",onClick:s=>{s.stopPropagation(),r()},children:[d.jsx(it,{name:"recheck",size:11}),"Re-check"]}):null]}):null}function wc(e,t,a,r){x.useEffect(()=>{if(!t)return;const s=u=>{var p,y;const m=u.target;!((p=e.current)!=null&&p.contains(m))&&!((y=r==null?void 0:r.current)!=null&&y.contains(m))&&a()},c=u=>{u.key!=="Escape"||u.defaultPrevented||(u.preventDefault(),a())};return document.addEventListener("pointerdown",s,!0),document.addEventListener("keydown",c),window.addEventListener("blur",a),()=>{document.removeEventListener("pointerdown",s,!0),document.removeEventListener("keydown",c),window.removeEventListener("blur",a)}},[e,t,a,r])}function qE({inputRef:e,accept:t,onFiles:a,disabled:r,multiple:s=!0}){return d.jsx("input",{ref:e,type:"file",multiple:s,hidden:!0,accept:t,onChange:c=>{!r&&c.target.files&&c.target.files.length>0&&a(Array.from(c.target.files)),c.target.value=""}})}function Ad(e,t="or"){return e.length<2?e[0]??"":`${e.slice(0,-1).join(", ")} ${t} ${e.at(-1)}`}const FE=["tour","video"],Xz={tour:"3D tour",video:"video"};function qg(e){return FE.filter(t=>e.includes(t)).flatMap(t=>Xz[t]??[])}function Zz(e,t){const a=s=>e.includes(s);if(t.accept!==null){const s=[...a("image")?["photos"]:[],...a("image")&&a("document")?["floor plans"]:[],...a("document")?["documents"]:[],...a("video")?["video"]:[]];return s.length===0?null:`Drop ${Ad(s)} anywhere here`}if(!t.onLink)return null;const r=qg(e);return r.length===0?null:`Paste a link to a ${Ad(r)}`}function Wz(e,t){const a=e.trim();if(!a)return{state:"empty"};const r=zE(a);return r===null||!t.includes(r)?{state:"refused"}:{state:"ok",kind:r,provider:EE(a).name}}function Jz(e,t,a){const[r,s]=x.useState(""),c=Wz(r,a),u=!t&&c.state==="ok";return{value:r,setValue:s,verdict:c,canAdd:u,submit:p=>{p.preventDefault(),p.stopPropagation(),u&&(e(r.trim()),s(""))},kinds:a}}function e$({verdict:e,kinds:t,className:a}){return d.jsx("div",{className:ie("flex items-center gap-2 text-[length:calc(11.5*var(--content))]",a),"aria-live":"polite",children:e.state==="ok"?d.jsxs(d.Fragment,{children:[d.jsx(Zr,{kind:e.kind,decorative:!0}),d.jsxs("span",{className:"font-medium text-ink-2",children:[e.provider," ",xc[e.kind].label.toLowerCase()]})]}):e.state==="refused"?d.jsxs("span",{className:"text-warn",children:["Only ",Ad(qg(t),"and")," links can be added."]}):null})}const t$="shrink-0 cursor-pointer border border-honey-2 bg-honey font-semibold text-honey-ink transition-colors duration-150 hover:bg-honey-2 disabled:cursor-default disabled:border-line disabled:bg-[#f0efe9] disabled:text-ink-4";function n$({draft:e}){return d.jsxs("div",{className:"flex h-10 items-center rounded-lg border border-line bg-canvas py-1 pl-3 pr-1 transition-[border-color,box-shadow] duration-150 hover:border-ink-4 focus-within:border-ink-3 focus-within:shadow-[0_0_0_3px_rgba(20,18,13,0.05)]",children:[d.jsx("span",{className:"grid shrink-0 place-items-center text-ink-3","aria-hidden":"true",children:d.jsx(Og,{size:15})}),d.jsx("input",{className:"h-full min-w-0 flex-1 appearance-none border-0 bg-transparent px-2.5 py-0 text-body text-ink placeholder:text-ink-4",type:"url",inputMode:"url",placeholder:`Paste a ${Ad(qg(e.kinds))} link`,"aria-label":"Link URL",autoFocus:!0,value:e.value,onChange:t=>e.setValue(t.target.value),onKeyDown:t=>{t.key==="Enter"&&e.submit(t)}}),d.jsx("button",{type:"button",disabled:!e.canAdd,onClick:e.submit,className:ie(t$,"h-8 rounded-md px-3 text-[length:calc(12.5*var(--content))]"),children:"New link"})]})}function i$({add:e,kinds:t,dragging:a}){if(e===null)return d.jsx(_d,{icon:d.jsx(ny,{size:25,strokeWidth:1.8}),headline:"Nothing here yet"});const r=Zz(t,e);return d.jsx(_d,{icon:e.accept!==null?d.jsx(Eg,{size:25,strokeWidth:1.8}):d.jsx(Og,{size:24,strokeWidth:1.8}),headline:a?"Drop to upload":"Nothing uploaded yet",...r!==null?{line:r}:{},lifted:a})}function a$({onChoose:e,detail:t}){return d.jsxs("button",{type:"button",onClick:e,className:"group flex w-full cursor-pointer items-center gap-3 rounded-lg border-0 bg-transparent px-2.5 py-2.5 text-left hover:bg-[#f6f5f1] focus-visible:bg-[#f6f5f1]",children:[d.jsx("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg bg-[#f3f2ed] text-ink-2 transition-colors duration-150 group-hover:bg-canvas group-hover:text-ink group-focus-visible:bg-canvas group-focus-visible:text-ink","aria-hidden":"true",children:d.jsx(Eg,{size:18,strokeWidth:1.9})}),d.jsxs("span",{className:"flex min-w-0 flex-col",children:[d.jsx("span",{className:"text-body font-semibold text-ink",children:"Upload files"}),t!==void 0?d.jsx("span",{className:"text-[length:calc(11.5*var(--content))] text-ink-3",children:t}):null]})]})}function r$({onAdd:e,disabled:t,kinds:a}){const r=Jz(e,t,a);return d.jsxs("div",{className:"flex flex-col gap-2 px-1 pb-1",children:[d.jsx(n$,{draft:r}),d.jsx(e$,{verdict:r.verdict,kinds:a,className:"px-0.5 empty:hidden"})]})}function PE({add:e,onBrowse:t,onLinked:a,uploadDetail:r}){return d.jsxs(d.Fragment,{children:[e.accept!==null?d.jsx(a$,{onChoose:t,...r!==void 0?{detail:r}:{}}):d.jsx("div",{className:"px-1.5 pb-0.5 pt-1 text-body font-semibold text-ink",children:"New link"}),d.jsx(r$,{onAdd:s=>{e.onLink(s),a()},disabled:e.disabled,kinds:e.linkKinds??FE})]})}function o$({add:e,verb:t}){const{accept:a,onFiles:r,onLink:s,disabled:c}=e,[u,m]=x.useState(!1),p=x.useRef(null),y=x.useRef(null),v=x.useCallback(()=>m(!1),[]);wc(p,u,v);const g=()=>{var k;v(),(k=y.current)==null||k.click()},w=()=>{u?v():s?m(!0):g()};return d.jsxs("div",{className:"relative",ref:p,onClick:k=>k.stopPropagation(),children:[a!==null?d.jsx(qE,{inputRef:y,accept:a,onFiles:r,disabled:c}):null,d.jsx(Sd,{add:t,size:"large",onClick:w,...s?{expanded:u}:{}}),u&&s?d.jsx("div",{className:`${af} left-0 top-[calc(100%+6*var(--content))] flex w-[calc(360*var(--frame))] flex-col gap-1.5 p-1.5`,role:"dialog","aria-label":t.verb,children:d.jsx(PE,{add:{...e,onLink:s},onBrowse:g,onLinked:v,uploadDetail:"Photos, floor plans, documents or video"})}):null]})}function VE(e,t,a,r=!0){const{accept:s,onFiles:c,onLink:u,disabled:m}=e,[p,y]=x.useState(!1),[v,g]=x.useState(null),w=x.useRef(null),k=x.useRef(null),E=x.useCallback(()=>{y(!1),g(null)},[]);wc(a,p,E,w),x.useLayoutEffect(()=>{if(!p)return;const C=()=>{const A=a.current,O=w.current;if(!A||!O)return;const T=O.offsetHeight,R=uc(cs(A),{height:T,maxHeight:T,minWidth:O.offsetWidth});g(R?{left:R.left,top:R.top,bottom:R.bottom}:null)};return C(),window.addEventListener("scroll",C,!0),window.addEventListener("resize",C),()=>{window.removeEventListener("scroll",C,!0),window.removeEventListener("resize",C)}},[p,a]);const S=()=>{var C;E(),(C=k.current)==null||C.click()},j=d.jsxs(d.Fragment,{children:[s!==null?d.jsx(qE,{inputRef:k,accept:s,onFiles:c,disabled:m,multiple:r}):null,p&&u?ir.createPortal(d.jsx("div",{ref:w,className:`we-no-drag ${af} flex w-[calc(360*var(--frame))] flex-col gap-1.5 p-1.5`,style:v?{position:"fixed",...v,zIndex:Xr}:{position:"fixed",top:0,left:0,zIndex:Xr,opacity:0,pointerEvents:"none"},role:"dialog","aria-label":t,onClick:C=>C.stopPropagation(),children:d.jsx(PE,{add:{...e,onLink:u},onBrowse:S,onLinked:E})}),document.body):null]});return{start:()=>{u?p?E():y(!0):S()},...u?{expanded:p}:{},node:j}}function s$({add:e,intake:t,trigger:a}){const r=x.useRef(null),s=VE(t,e.label,r);return d.jsxs(d.Fragment,{children:[s.node,a({buttonRef:r,...s.expanded!==void 0?{expanded:s.expanded}:{},onClick:s.start})]})}const l$="relative cursor-grab touch-none select-none",c$="relative grid grid-cols-[repeat(auto-fill,minmax(calc(150*var(--frame)),1fr))] gap-2.5",u$={compact:"flex flex-col gap-2.5",large:"flex flex-col gap-3"},ak=new Set;function Fg(e,t,a){const r=a!==null?{kind:"take",intake:a}:t!==null?{kind:"choose",open:t}:null;return{add:e.add,onAdd:r,choose:e.choose!==null&&t!==null?{choose:e.choose,onChoose:t}:void 0}}function Ts(e,t,a,r,s){const c=new Set(t.map(y=>y.id)),u=e.filter(y=>{const v=a(y.value);return v===null||c.has(v)}),m=new Set(u.map(y=>a(y.value)));return[...t.filter(y=>!m.has(y.id)).map(y=>s(r(y))),...u]}function Pg({engine:e,label:t,noun:a,size:r,onAdd:s,add:c,choose:u,renderTile:m,tileActions:p,onRemove:y,children:v}){const{rows:g,canAdd:w,canRemove:k}=e,{containerRef:E,getItemProps:S}=e.drag,[j,C]=x.useState(ak),A=g.filter(P=>j.has(P.key)),O=A.map(P=>P.key),T=P=>C(le=>{const ee=new Set(le);return ee.has(P)?ee.delete(P):ee.add(P),ee}),R=()=>C(ak),B=P=>{y?y(P):e.removeMany(P.map(le=>le.key)),R()},D=P=>{if(!k)return null;const le=j.has(P.key)&&A.length>1?A:null;return le?{label:`Remove ${le.length} ${a}s`,glyph:"trash",danger:!0,onSelect:()=>B(le)}:{label:"Remove",glyph:"trash",danger:!0,onSelect:()=>B([P])}},L=w?d.jsx(bc,{size:r,add:c,onAdd:(s==null?void 0:s.kind)==="choose"?s.open:null,...(s==null?void 0:s.kind)==="take"?{newChip:d.jsx(s$,{add:c,intake:s.intake,trigger:P=>d.jsx(Sd,{add:c,size:r,...P})})}:{},choose:u}):null;return d.jsxs("div",{className:Qr,children:[d.jsxs("div",{className:u$[r],children:[L,g.length===0?r==="large"&&d.jsx("div",{className:"py-4.5 text-center text-small text-ink-3",children:c.empty}):d.jsx("div",{className:c$,ref:E,onClick:P=>{P.target===P.currentTarget&&R()},children:d.jsx("div",{className:"contents",role:"listbox","aria-multiselectable":!0,"aria-label":t,onKeyDown:P=>{P.key!=="Escape"||O.length===0||(P.stopPropagation(),R())},children:g.map((P,le)=>{const ee=D(P),de={selected:j.has(P.key),onToggleSelect:()=>T(P.key),actions:[...(p==null?void 0:p(P))??[],...ee?[ee]:[]]},K=j.has(P.key)&&O.length>1?O:void 0;return d.jsx("div",{...S(P.key,K),className:l$,children:m(P,le,de)},P.key)})})})]}),v]})}const d$="data-drag-clone",rk="0 16px 38px -8px rgba(20,18,13,0.5)",f$=["id","for","name","data-dragid","data-drag-scope"];function id(e){if(!e||e==="transparent")return!1;const t=/^rgba\([^,]+,[^,]+,[^,]+,\s*([\d.]+)\s*\)$/.exec(e);if(t)return Number(t[1])>=1;const a=/\/\s*([\d.]+)(%?)\s*\)$/.exec(e);return a?Number(a[1])>=(a[2]?100:1):!0}function h$(e){for(let t=e;t;t=t.parentElement){const a=getComputedStyle(t).backgroundColor;if(id(a))return a}return"#fff"}function ok(e){for(let t=e;t;){const a=getComputedStyle(t).borderRadius;if(m$(a))return a;const r=t.children.length===1?t.children[0]:null;t=r&&r.offsetWidth===e.offsetWidth&&r.offsetHeight===e.offsetHeight?r:null}return null}function m$(e){return e!==""&&!/^(0(px)?\s*)+$/.test(e)}function p$(e){const t=e.cloneNode(!0),a=[e,...e.querySelectorAll("*")],r=[t,...t.querySelectorAll("*")];a.forEach((s,c)=>{const u=r[c];if(!(!u||u.tagName!==s.tagName))switch(s.tagName){case"INPUT":u.value=s.value,u.checked=s.checked;break;case"TEXTAREA":case"SELECT":u.value=s.value;break;case"VIDEO":u.muted=!0,u.autoplay=!1;break}});for(const s of r)for(const c of f$)s.removeAttribute(c);return t.setAttribute(d$,""),t.setAttribute("aria-hidden","true"),t.inert=!0,t}function y$(e,t,a){if(t===a||t<0||a<0)return e;const r=e.slice(),[s]=r.splice(t,1);return r.splice(a,0,s),r}const GE="data-drag-scope";function Wm(e){return Array.from(e.querySelectorAll("[data-dragid]")).filter(t=>t.closest(`[${GE}]`)===e)}function g$(e){const t=/^matrix(3d)?\(([^)]+)\)$/.exec(e.trim());if(!(t!=null&&t[2]))return{x:0,y:0};const a=t[2].split(",").map(Number),[r,s]=t[1]?[a[12],a[13]]:[a[4],a[5]];return{x:r||0,y:s||0}}const sk=190,lk=220,Jm="cubic-bezier(.2,.7,.3,1)",b$="0.4",v$="0",x$="1",w$="2",k$="60",Nd="data-drag-active",ck="hp-drag-reorder-active",_$=`html[${Nd}], html[${Nd}] * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }`;function ep(e){const t=document.documentElement;if(!e){t.removeAttribute(Nd);return}if(!document.getElementById(ck)){const a=document.createElement("style");a.id=ck,a.textContent=_$,document.head.appendChild(a)}t.setAttribute(Nd,"")}function uk(e){return!e||typeof e.animate!="function"?!1:!(typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)}function S$(e){if(!e)return;const t=a=>{a.target!==null&&e.contains(a.target)&&(a.stopPropagation(),a.preventDefault()),window.removeEventListener("click",t,!0)};window.addEventListener("click",t,!0),setTimeout(()=>window.removeEventListener("click",t,!0),0)}const E$="pointer-events-none absolute -right-1.5 -top-1.5 z-[5] grid h-6 min-w-6 place-items-center rounded-full bg-accent px-1.5 text-[length:calc(11.5*var(--content))] font-bold tabular-nums text-white shadow-[0_1px_3px_rgba(20,18,13,0.3)]";function j$(e,t,a){const r=e.filter(c=>a.has(t(c))),s=r[0];return{collapsed:e.filter(c=>c===s||!a.has(t(c))),members:r}}function O$(e,t){const a=t[0]===void 0?-1:e.indexOf(t[0]);return a<0?e:[...e.slice(0,a),...t,...e.slice(a+1)]}function KE({items:e,getKey:t,onReorder:a,onDrop:r,axis:s="xy",threshold:c=4,ignoreSelector:u=".we-no-drag"}){const[m,p]=x.useState(null),y=x.useRef(null),v=x.useRef({}),g=x.useRef({grabX:0,grabY:0,scale:1,originLeft:0}),w=x.useRef({x:0,y:0}),k=x.useRef(null),E=x.useRef(null),S=x.useRef(null),j=x.useRef(null),C=x.useRef("#fff"),A=x.useRef(new Set),O=x.useRef(new Map),T=x.useRef(new WeakMap),R=x.useRef(null),B=x.useRef(null),D=x.useRef(e),L=x.useRef(t),P=x.useRef({onReorder:a,onDrop:r});x.useLayoutEffect(()=>{P.current={onReorder:a,onDrop:r}}),x.useEffect(()=>()=>{var W;const I=R.current;R.current=null,I&&P.current.onDrop(I);const F=B.current;F&&(window.removeEventListener("pointermove",F.move),window.removeEventListener("pointerup",F.end),window.removeEventListener("pointercancel",F.end)),(W=j.current)==null||W.remove(),S.current&&ep(!1)},[]);function le(I){const F=I.getBoundingClientRect(),W=g.current.scale||1;return{x:(w.current.x-F.left)/W-I.clientLeft,y:(w.current.y-F.top)/W-I.clientTop}}function ee(){const I=j.current,F=y.current;if(!I||!F)return;const W=le(F);I.style.left=`${s==="y"?g.current.originLeft:W.x-g.current.grabX}px`,I.style.top=`${W.y-g.current.grabY}px`}function de(){const I=y.current,{x:F,y:W}=le(I),pe=D.current;let oe=0,ke=1/0;return Wm(I).forEach(z=>{const ce=pe.findIndex(Ie=>L.current(Ie)===z.dataset.dragid);if(ce<0)return;const ge=z.offsetLeft+z.offsetWidth/2,Se=z.offsetTop+z.offsetHeight/2,Le=(F-ge)**2+(W-Se)**2;Le<ke&&(ke=Le,oe=ce)}),Math.max(0,Math.min(pe.length-1,oe))}function K(I,F,W){const pe=!O.current.has(I),oe=O.current.get(I)??{position:I.style.position,zIndex:I.style.zIndex,opacity:I.style.opacity,borderRadius:I.style.borderRadius};O.current.set(I,oe),getComputedStyle(I).position==="static"&&(I.style.position="relative"),pe&&(I.style.borderRadius=ok(I)??oe.borderRadius),I.style.zIndex=F,I.style.opacity=W?b$:oe.opacity,W?I.setAttribute("data-ghost",""):I.removeAttribute("data-ghost")}function Q(I){const F=O.current.get(I);F&&(I.style.position=F.position,I.style.zIndex=F.zIndex,I.style.opacity=F.opacity,I.style.borderRadius=F.borderRadius,I.removeAttribute("data-ghost"),O.current.delete(I))}function se(I,F){var z;C.current=h$(I);const W=getComputedStyle(F).backgroundColor,pe=ok(F),oe=p$(F);pe&&(oe.style.borderRadius=pe),Object.assign(oe.style,{position:"absolute",left:"0px",top:"0px",width:`${F.offsetWidth}px`,margin:"0",zIndex:k$,pointerEvents:"none",transform:"none",opacity:"1",transition:"none",animation:"none",boxShadow:rk,backgroundColor:id(W)?W:C.current}),g.current.originLeft=F.offsetLeft;const ke=((z=E.current)==null?void 0:z.length)??1;if(ke>1){const ce=document.createElement("span");ce.className=E$,ce.textContent=String(ke),oe.appendChild(ce)}I.appendChild(oe),j.current=oe}function N(I,F,W,pe){if(F.left===W.left&&F.top===W.top)return;const oe=T.current.get(I),ke=(oe==null?void 0:oe.playState)==="running"?g$(getComputedStyle(I).transform):{x:0,y:0};oe==null||oe.cancel();const z=F.left+ke.x-W.left,ce=F.top+ke.y-W.top;if(!z&&!ce)return;T.current.set(I,I.animate([{transform:`translate(${z}px,${ce}px)`},{transform:"none"}],{duration:sk,easing:Jm}));const ge=C.current;pe&&!id(getComputedStyle(I).backgroundColor)&&I.animate([{backgroundColor:ge},{backgroundColor:ge}],{duration:sk})}function V(I,F,W){var Se;(Se=T.current.get(I))==null||Se.cancel();const pe=F.left-W.left,oe=F.top-W.top;if(!pe&&!oe)return;const ke=getComputedStyle(I),z=id(ke.backgroundColor)?ke.backgroundColor:C.current;K(I,w$,!1);const ce=I.animate([{transform:`translate(${pe}px,${oe}px)`},{transform:"none"}],{duration:lk,easing:Jm});I.animate([{boxShadow:rk,backgroundColor:z},{boxShadow:ke.boxShadow,backgroundColor:z}],{duration:lk,easing:Jm}),T.current.set(I,ce);const ge=()=>{S.current||Q(I)};ce.onfinish=ge,ce.oncancel=ge}x.useLayoutEffect(()=>{const I=y.current;if(!I)return;I.setAttribute(GE,"");const F=S.current,W=A.current;A.current=new Set;const pe=Wm(I);if(F&&!j.current){const ce=pe.find(ge=>ge.dataset.dragid===F);ce&&se(I,ce)}if(!F)for(const ce of[...O.current.keys()])Q(ce);const oe=uk(I),ke=v.current,z={};pe.forEach(ce=>{const ge=ce.dataset.dragid,Se={left:ce.offsetLeft,top:ce.offsetTop};z[ge]=Se,F&&K(ce,ge===F?v$:x$,ge===F);const Le=ke[ge];!Le||!oe||(W.has(ge)?V(ce,Le,Se):N(ce,Le,Se,F!==null&&ge!==F))}),v.current=z,F&&ee()});function te(){const I=R.current;R.current=null,I&&P.current.onDrop(I)}function me(I,F,W){var ge,Se,Le,Ie,ye;te();const pe=y.current,oe=Wm(pe).find(Re=>Re.dataset.dragid===I)??null;if(!oe)return;const ke=oe.getBoundingClientRect(),z=pe.getBoundingClientRect().width/pe.offsetWidth||1;g.current={grabX:(W.clientX-ke.left)/z,grabY:(W.clientY-ke.top)/z,scale:z,originLeft:oe.offsetLeft},(Se=(ge=document.activeElement)==null?void 0:ge.blur)==null||Se.call(ge),(ye=(Ie=(Le=window.getSelection)==null?void 0:Le.call(window))==null?void 0:Ie.removeAllRanges)==null||ye.call(Ie),ep(!0),w.current={x:W.clientX,y:W.clientY},D.current=e,L.current=t,E.current=null;let ce=I;if(F&&F.length>1&&F.includes(I)){const{collapsed:Re,members:ht}=j$(e,t,new Set(F)),$e=ht[0];ht.length>1&&$e!==void 0&&(E.current=ht,ce=t($e),D.current=Re,P.current.onReorder(Re))}S.current=ce,p(ce)}function Y(I,F,W){I.button===0&&(I.target.closest(u)||(k.current={key:F,x:I.clientX,y:I.clientY,group:W},B.current={move:M,end:H},window.addEventListener("pointermove",M),window.addEventListener("pointerup",H),window.addEventListener("pointercancel",H)))}function M(I){const F=k.current;if(!F)return;if(!S.current){if(Math.hypot(I.clientX-F.x,I.clientY-F.y)<c)return;me(F.key,F.group,I)}w.current={x:I.clientX,y:I.clientY},ee();const W=de(),pe=D.current,oe=pe.findIndex(z=>L.current(z)===S.current);if(oe<0||oe===W)return;const ke=y$(pe,oe,W);D.current=ke,P.current.onReorder(ke)}function H(){window.removeEventListener("pointermove",M),window.removeEventListener("pointerup",H),window.removeEventListener("pointercancel",H),B.current=null,k.current=null;const I=S.current;if(!I)return;const F=E.current;E.current=null;const W=F?F.map(oe=>L.current(oe)):[I];if(F){const oe=O$(D.current,F);D.current=oe,P.current.onReorder(oe)}const pe=j.current;if(pe){for(const oe of W)v.current[oe]={left:pe.offsetLeft,top:pe.offsetTop};A.current=new Set(W),pe.remove(),j.current=null}S$(y.current),S.current=null,ep(!1),p(null),R.current=D.current,uk(y.current)?requestAnimationFrame(()=>setTimeout(te,0)):te()}return{containerRef:y,getItemProps:(I,F)=>({"data-dragid":I,onPointerDown:W=>Y(W,I,F)}),draggingKey:m}}let A$=0;function N$(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`li-${(A$++).toString(36)}`}function Md(e,t){return{key:(t==null?void 0:t(e))??N$(),value:e}}function M$(e,t){return e.map(a=>Md(a,t))}function C$(e,t,a){return t.map((r,s)=>{const c=e[s];return c!==void 0&&JSON.stringify(c.value)===JSON.stringify(r)?{key:c.key,value:r}:Md(r,a)})}function tp(e){return JSON.stringify(e)}function ar({items:e,identityOf:t,fixed:a=!1,axis:r="y",commit:s,onCommitted:c}){const[u,m]=x.useState(()=>M$(e,t)),[p,y]=x.useState(()=>tp(e)),v=x.useRef(u);x.useEffect(()=>{v.current=u},[u]);function g(j){v.current=j,m(j)}function w(j,C){g(j),y(tp(j.map(A=>A.value))),s(j,C),c==null||c(j,C)}const k=KE({items:u,getKey:j=>j.key,onReorder:g,onDrop:j=>w(j,"reorder"),axis:r,threshold:5});if(!k.draggingKey){const j=tp(e);j!==p&&(y(j),m(C$(u,e,t)))}function E(j,C){const A=v.current;A.some(O=>O.key===j)&&w(A.map(O=>O.key===j?{...O,value:C(O.value)}:O),"edit")}function S(j,C=0){if(a)return;const A=v.current,O=Math.min(Math.max(C,0),A.length);w([...A.slice(0,O),j,...A.slice(O)],"add")}return{rows:u,drag:k,canAdd:!a,canRemove:!a,add:(j,C)=>S(Md(j,t),C),insert:S,remove:j=>{a||w(v.current.filter(C=>C.key!==j),"remove")},removeMany:j=>{const C=v.current,A=C.filter(O=>!j.includes(O.key));a||A.length===C.length||w(A,"remove")},setValue:(j,C)=>E(j,()=>C),updateValue:E,replace:j=>w(j,"replace"),mint:j=>Md(j,t),indexOf:j=>u.findIndex(C=>C.key===j),keyAt:j=>{var C;return((C=u[j])==null?void 0:C.key)??null},latestRows:()=>v.current}}function Vg(e,t){const a=q8();return e!==void 0&&t!==""&&a!==void 0&&a(e,t)}function rr(e,t,a,r){return e.isEmpty(a)?r?"required":null:e.isInvalid(a,t)?"invalid":null}const R$={failed:"Crop failed. The image is unchanged. Try cropping again."};function T$({storeKey:e}){const t=iD(e),a=mg(r=>r.clearNotice);return t?d.jsxs("p",{role:"alert","data-crop-notice":t,className:ie(Ns,"flex items-center justify-between gap-2"),children:[d.jsx("span",{children:R$[t]}),d.jsx("button",{type:"button",className:ie(vt,"shrink-0 underline"),onClick:()=>a(e),children:"Dismiss"})]}):null}const YE=["asset_id","photo_id","video_id","tour_id"];function Ji(e){if(typeof e!="object"||e===null)return null;const t=e;for(const a of YE){const r=t[a];if(typeof r=="string"&&r.length>0)return r}return Wi(e)??null}function D$(e){if(typeof e!="object"||e===null)return!1;const t=e;return YE.some(a=>typeof t[a]=="string")||Wi(e)!==void 0}function QE(e){if(e!==null&&typeof e=="object"&&!Array.isArray(e)){const t=Ji(e),a=e.picked;if(t!==null)return{asset_id:t,...typeof a=="string"||a===null?{picked:a}:{}}}return{asset_id:""}}function L$(e){return e.map(QE).filter(t=>t.asset_id!=="")}function XE(e){switch(e.kind){case"document":return ME(e.name,e.mime??"");case"video":return{glyph:"video",typeNoun:"Video",extension:""};case"photo":case"plan":return{glyph:"image",typeNoun:"Image",extension:""};case"tour":return{glyph:"video",typeNoun:"3D tour",extension:""}}}function z$(e){return[XE(e).typeNoun,e.size].filter(Boolean).join(" · ")}function $$(e){const t=Rs(e);return a=>{const r=t.get(a);return r===void 0?void 0:TE(r)}}const U$={page:"expanded",panel:"compact",cell:"compact"};function I$(e){return U$[e]}const ZE=x.createContext(null);function sf({place:e,children:t}){return d.jsx(ZE.Provider,{value:e,children:t})}function Gg(){const e=x.useContext(ZE);if(e===null)throw new Error("[slot-editors] a slot editor was drawn outside a place: its container mounts <SlotPlaceProvider>.");return e}const B$=x.createContext(!1);function Ds(){return x.useContext(B$)}const H$=ie("flex w-full items-stretch rounded-[calc(10*var(--content))] border-[1.5px] border-line bg-canvas","transition-[border-color,box-shadow,background-color] duration-[120ms]","focus-within:border-ink focus-within:shadow-[0_0_0_4px_rgba(20,18,13,0.05)]",Ms),q$="min-w-0 flex-1 appearance-none border-0 bg-transparent px-3.5 py-2.75 text-[length:calc(15*var(--content))] text-ink outline-none placeholder:text-ink-4",F$=ie("flex w-full min-w-0 flex-1 items-stretch rounded-[calc(6*var(--content))] border border-transparent bg-transparent","in-data-[card-fields]:bg-white","transition-[border-color,box-shadow,background-color] duration-100","group-hover/row:border-line group-hover/row:bg-white group-focus-within/row:border-line group-focus-within/row:bg-white","focus-within:border-ink focus-within:bg-white focus-within:shadow-[0_0_0_3px_rgba(20,18,13,0.05)]",Ms),WE={"data-card-fields":""},P$="min-w-0 flex-1 appearance-none truncate border-0 bg-transparent px-2.5 py-2 text-[length:calc(13.5*var(--content))] leading-[1.2] text-ink outline-none placeholder:text-ink-4",V$={page:{frame:ie(Qr,"gap-1.5"),shell:H$,inner:q$,adornEnd:"pr-3.5",multiline:"resize-none leading-[1.5]",inline:!1},panel:{frame:Qr,shell:ie(R8,Ms),inner:T8,adornEnd:"pr-2.75",multiline:"min-h-[calc(76*var(--content))] resize-none leading-[1.5]",inline:!1},cell:{frame:"flex w-full min-w-0 flex-col",shell:F$,inner:P$,adornEnd:"pr-2.5",multiline:"resize-none overflow-hidden whitespace-nowrap",inline:!0}};function or(){return JE(Gg())}function JE(e){return{place:e,...V$[e]}}function G$({count:e,max:t}){const a=t-e;return a>Math.ceil(t/5)?null:a<=0?{left:0,tone:"text-danger"}:{left:a,tone:a<=Math.ceil(t/10)?bE:"text-ink-4"}}const K$=ie("relative","[&>input]:transition-[padding] [&>input]:duration-200 [&>input]:ease-out motion-reduce:[&>input]:transition-none","[&[data-count-open]>input]:pr-10","[&[data-count-room=band]]:flex-wrap"),Y$="pointer-events-none absolute inset-y-0 right-0 flex items-center",Q$=ie("flex h-0 basis-full items-end justify-end overflow-hidden","transition-[height] duration-200 ease-out motion-reduce:transition-none"),X$={page:"data-[open]:h-[calc(22*var(--content))] data-[open]:pb-2.75",panel:"data-[open]:h-[calc(20*var(--content))] data-[open]:pb-2.25",cell:""};function Wr({attention:e,count:t,className:a,ref:r,children:s}){const c=or(),u=Ds(),[m,p]=x.useState(!1),y=t!==void 0&&!c.inline,v=y&&m?G$(t):null,g=y&&t.multiline,w=v!==null&&d.jsxs("span",{"data-field-count":"",className:ie(gE,v.tone,"leading-none transition-[opacity,transform] duration-200 ease-out starting:translate-y-1 starting:opacity-0 motion-reduce:transition-none"),children:[v.left,d.jsx("span",{className:"sr-only",children:" characters left"})]});return d.jsxs("div",{ref:r,className:ie(c.shell,y&&K$,a),...Cs(e,u),"data-count-room":y?g?"band":"end":void 0,"data-count-open":v!==null?"":void 0,onFocus:y?()=>p(!0):void 0,onBlur:y?()=>p(!1):void 0,children:[s,g?d.jsx("div",{className:ie(Q$,X$[c.place],c.adornEnd),"data-open":v!==null?"":void 0,children:w}):v!==null&&d.jsx("div",{className:ie(Y$,c.adornEnd),children:w})]})}function ej({attention:e,message:t}){const a=or();return e!=="invalid"||a.inline?null:d.jsx("p",{className:Ns,children:t})}const tj="h-[var(--list-display-h,clamp(280px,calc(100cqh-var(--list-display-clear,32px)),calc(560*var(--frame))))]",Z$="h-[var(--list-display-h,clamp(280px,calc(100cqh-var(--list-display-clear,32px)),calc(480*var(--frame))))]",Kg="data-upstream:opacity-55 data-upstream:hover:opacity-100 data-upstream:focus-within:opacity-100",W$="hp-anim-menu rounded border border-line bg-canvas shadow-[0_1px_2px_rgba(20,18,13,0.04),0_8px_24px_-8px_rgba(20,18,13,0.08)]",nj="flex w-full cursor-pointer items-center gap-2.5 rounded-md px-2.5 py-1.75 text-left text-[length:calc(12.5*var(--content))]",J$=`${nj} text-ink-2 hover:bg-accent-soft hover:text-ink`,ij="truncate rounded-full bg-white/90 px-1.5 py-0.5 text-[length:calc(10.5*var(--content))] font-semibold text-ink-2 shadow-[0_1px_3px_rgba(0,0,0,0.18)]",aj="select-none";function e7(e,t){const a=[{label:"Preview",glyph:"eye",onSelect:t.onPreview}];return t.onRenameStart&&a.push({label:"Rename",glyph:"pencil",onSelect:t.onRenameStart}),t.onCrop&&a.push({label:"Crop",glyph:"crop",onSelect:t.onCrop}),Ul(e)||a.push({label:"Download",glyph:"down",onSelect:t.onDownload}),t.onDelete&&a.push({label:t.deleteLabel??"Delete",glyph:"trash",onSelect:t.onDelete,danger:!0}),a}function rj({file:e,handlers:t,shown:a=!1}){return d.jsx(sj,{name:e.name,actions:e7(e,t),shown:a})}function oj(e){return{plain:e.filter(t=>!t.foot&&!t.danger),foot:[...e.filter(t=>t.foot&&!t.danger),...e.filter(t=>t.danger)]}}const dk=4;function sj({name:e,actions:t,shown:a=!1,scale:r="card"}){const[s,c]=x.useState(!1),u=x.useRef(null),m=x.useRef(null),p=x.useRef(null),[y,v]=x.useState(null),g=x.useCallback(()=>{c(!1),v(null)},[]);wc(u,s,g,p),x.useLayoutEffect(()=>{if(!s)return;const S=()=>{const j=m.current,C=p.current;if(!j||!C)return;const A=cs(j),O=C.offsetHeight,T=uc(A,{height:O,maxHeight:O,gap:dk});if(!T){v(null);return}const R=document.documentElement.clientWidth-A.rect.right;if(T.maxHeight>=O){v({top:T.top,bottom:T.bottom,right:R});return}const{rect:B,bounds:D}=A,L=D.bottom-Ar-O,P=Math.max(D.top+Ar,Math.min(B.bottom+dk,L));v({top:P,right:R})};return S(),window.addEventListener("scroll",S,!0),window.addEventListener("resize",S),()=>{window.removeEventListener("scroll",S,!0),window.removeEventListener("resize",S)}},[s]);const{plain:w,foot:k}=oj(t),E=S=>d.jsxs("button",{type:"button",role:"menuitem",className:S.danger?`${nj} text-danger hover:bg-accent-soft`:J$,onClick:()=>{g(),S.onSelect()},children:[d.jsx(it,{name:S.glyph,size:13}),S.label]},S.label);return d.jsxs("span",{className:"we-no-drag relative inline-flex",ref:u,children:[d.jsx("button",{ref:m,type:"button",className:`grid shrink-0 cursor-pointer place-items-center rounded-full text-ink-3 transition-opacity duration-[120ms] hover:bg-[rgba(20,18,13,0.07)] hover:text-ink focus-visible:opacity-100 group-hover:opacity-100 group-aria-selected:opacity-100 ${a?r==="compact"?"h-6 w-6":"h-8 w-8":"h-5.5 w-5.5"} ${s||a?"opacity-100":"opacity-0"}`,"aria-label":`Actions for ${e}`,"aria-haspopup":"menu","aria-expanded":s,onClick:S=>{S.stopPropagation(),c(j=>!j)},onDoubleClick:S=>S.stopPropagation(),children:d.jsx(it,{name:"dots",size:r==="compact"?13:14})}),s?ir.createPortal(d.jsxs("div",{ref:p,className:`we-no-drag ${W$} w-[calc(188*var(--frame))] p-1.25`,style:y?{position:"fixed",...y,zIndex:Xr}:{position:"fixed",top:0,right:0,zIndex:Xr,visibility:"hidden"},role:"menu",onClick:S=>S.stopPropagation(),onDoubleClick:S=>S.stopPropagation(),children:[w.map(E),k.length>0?d.jsxs(d.Fragment,{children:[w.length>0?d.jsx("div",{className:"mx-0 my-1 h-px bg-line-soft"}):null,k.map(E)]}):null]}),document.body):null]})}function lj({name:e,onCommit:t}){const[a,r]=x.useState(e);return d.jsx("input",{className:"we-no-drag min-w-0 flex-1 rounded-md border border-accent bg-canvas px-1.5 py-0.5 text-[length:calc(12.5*var(--content))] font-medium text-ink",value:a,autoFocus:!0,"aria-label":`Rename ${e}`,onFocus:s=>s.target.select(),onClick:s=>s.stopPropagation(),onDoubleClick:s=>s.stopPropagation(),onChange:s=>r(s.target.value),onKeyDown:s=>{s.key==="Enter"&&t(a.trim()),s.key==="Escape"&&t(null),s.stopPropagation()},onBlur:()=>t(a.trim())})}function cj(e,t="card"){return`group/card relative flex cursor-pointer flex-col aria-disabled:cursor-not-allowed ${t==="compact"?"rounded-xl":"rounded-2xl"} outline-none transition-[background-color,box-shadow,opacity] duration-[140ms] ${e?"bg-accent-tint ring-2 ring-accent":"bg-[#f3f2ed] hover:bg-[#ebe9e2] focus-visible:ring-2 focus-visible:ring-accent"}`}const qr={card:{bar:"flex h-12 min-w-0 items-center gap-2.5 pl-3.5 pr-2",name:"min-w-0 flex-1 truncate text-[length:calc(13*var(--content))] font-medium text-ink",thumb:"relative mx-2 aspect-[16/11] overflow-hidden rounded-xl bg-canvas"},compact:{bar:"flex h-8.5 min-w-0 items-center gap-1.5 pl-2.5 pr-1",name:"min-w-0 flex-1 truncate text-[length:calc(12*var(--content))] font-medium text-ink",thumb:"relative mx-1.5 aspect-[16/11] overflow-hidden rounded-lg bg-canvas"}},t7="we-no-drag flex cursor-auto flex-col gap-2 px-2 pt-2";function uj({kind:e,name:t,selected:a,select:r,onToggleSelect:s,scale:c="card"}){const u=c==="compact";return d.jsxs("span",{className:`relative grid shrink-0 place-items-center ${u?"h-4 w-4":"h-5 w-5"}`,children:[d.jsx("span",{className:`grid place-items-center transition-opacity duration-[120ms] ${a?"opacity-0":r.disabled?"":"group-hover/card:opacity-0"}`,children:e===null?d.jsx("span",{className:"text-ink-3",children:d.jsx(it,{name:"file",size:u?13:16})}):d.jsx(Zr,{kind:e,size:u?"dot":"mark"})}),d.jsx("button",{type:"button",role:r.control,"aria-checked":a,disabled:r.disabled,className:`we-no-drag absolute inset-0 grid cursor-pointer place-items-center border-[1.5px] transition-opacity duration-[120ms] disabled:cursor-not-allowed disabled:opacity-0 ${r.control==="radio"?"rounded-full":u?"rounded-[calc(4*var(--content))]":"rounded-md"} ${a?"border-accent bg-accent text-white opacity-100":"border-[rgba(20,18,13,0.45)] bg-canvas text-transparent opacity-0 group-hover/card:opacity-100 focus-visible:opacity-100"}`,"aria-label":a?`Deselect ${t}`:`Select ${t}`,onClick:m=>{m.stopPropagation(),s()},onDoubleClick:m=>m.stopPropagation(),children:d.jsx(it,{name:"check",size:u?10:12,stroke:2.6})})]})}function n7({file:e,selected:t,renaming:a,onClick:r,onDoubleClick:s,onToggleSelect:c,select:u,listChip:m,onRetry:p,onRecheck:y,onRenameCommit:v,handlers:g,drag:w,beneath:k}){return d.jsxs("div",{...w,role:"option","aria-selected":t,"aria-disabled":u.disabled||void 0,"data-upstream":e.upstream||void 0,tabIndex:0,className:`${cj(t)} ${Kg} ${w?aj:""}`,onClick:r,onDoubleClick:s,onKeyDown:E=>{E.target===E.currentTarget&&E.key==="Enter"&&(E.stopPropagation(),g.onPreview())},children:[d.jsxs("div",{className:qr.card.bar,children:[d.jsx(uj,{kind:e.kind,name:e.name,selected:t,select:u,onToggleSelect:c}),a?d.jsx(lj,{name:e.name,onCommit:v}):d.jsx("span",{className:qr.card.name,title:e.name,children:e.name}),d.jsx(rj,{file:e,handlers:g,shown:!0})]}),d.jsxs("div",{className:qr.card.thumb,children:[d.jsx(Hg,{file:e}),d.jsx(HE,{file:e,onRetry:p,onRecheck:y}),m!==null?d.jsx("span",{className:`absolute right-2 top-2 z-[3] max-w-[calc(100%-16px)] ${ij}`,"data-list-chip":"",children:m}):null]}),k?d.jsx("div",{className:t7,...WE,onClick:E=>E.stopPropagation(),onDoubleClick:E=>E.stopPropagation(),children:k}):null,d.jsx("div",{className:"flex h-11 min-w-0 items-center px-3.5",children:d.jsx("span",{className:"truncate text-[length:calc(11.5*var(--content))] text-ink-3",children:Gz(e)})})]})}function i7(){return d.jsxs("div",{className:`flex flex-col rounded-2xl ${Lg}`,children:[d.jsxs("div",{className:qr.card.bar,children:[d.jsx("span",{className:`h-4.5 w-4.5 shrink-0 rounded-md ${jn}`}),d.jsx("span",{className:"min-w-0 flex-1",children:d.jsx("span",{className:`block h-2.5 w-3/5 rounded-full ${jn}`})}),d.jsx("span",{className:`mr-1.5 h-1.5 w-4 shrink-0 rounded-full ${jn}`})]}),d.jsx("div",{className:ie(qr.card.thumb,jn)}),d.jsx("div",{className:"flex h-11 items-center px-3.5",children:d.jsx("span",{className:`h-2 w-2/5 rounded-full ${jn}`})})]})}const dj="grid grid-cols-[calc(28*var(--frame))_calc(44*var(--frame))_1fr_calc(110*var(--frame))_calc(80*var(--frame))_calc(90*var(--frame))_calc(36*var(--frame))] items-center gap-2.5 px-3",fk="flex shrink-0 items-center gap-1.5 whitespace-nowrap text-[length:calc(11.5*var(--content))] font-medium";function a7(){return d.jsxs("div",{role:"row",className:`${dj} h-9.5 text-[length:calc(11*var(--content))] font-semibold tracking-[0.02em] text-ink-3`,children:[d.jsx("span",{}),d.jsx("span",{}),d.jsx("span",{children:"Name"}),d.jsx("span",{children:"Kind"}),d.jsx("span",{children:"Size"}),d.jsx("span",{children:"Added"}),d.jsx("span",{})]})}function r7({file:e,onRetry:t,onRecheck:a}){return e.state==="failed"?d.jsxs("span",{className:`${fk} text-danger`,children:[e.error,t?d.jsx("button",{type:"button",className:"font-semibold text-ink underline",onClick:r=>{r.stopPropagation(),t()},children:"Retry"}):null]}):e.linkUnreachable?d.jsxs("span",{className:`${fk} text-warn`,title:ry,children:[BE,a?d.jsx("button",{type:"button",className:"font-semibold text-ink underline",onClick:r=>{r.stopPropagation(),a()},children:"Re-check"}):null]}):null}function o7({file:e,selected:t,renaming:a,onClick:r,onDoubleClick:s,onToggleSelect:c,select:u,listChip:m,onRetry:p,onRecheck:y,onRenameCommit:v,handlers:g,drag:w}){return d.jsxs("div",{...w,role:"row","aria-selected":t,"aria-disabled":u.disabled||void 0,"data-upstream":e.upstream||void 0,className:`group ${dj} ${Kg} h-12 cursor-pointer border-t border-line-soft transition-opacity duration-[140ms] aria-disabled:cursor-not-allowed last:rounded-b-[calc(11*var(--content))] ${t?"bg-accent-soft":"hover:bg-[#fbfaf7]"} ${w?aj:""}`,onClick:r,onDoubleClick:s,children:[d.jsx("button",{type:"button",role:u.control,"aria-checked":t,disabled:u.disabled,className:`grid h-4 w-4 cursor-pointer place-items-center border-[1.5px] disabled:cursor-not-allowed disabled:opacity-40 ${u.control==="radio"?"rounded-full":"rounded-[calc(5*var(--content))]"} ${t?"border-accent bg-accent text-white":"border-[#cfccc0] bg-canvas text-transparent group-hover:border-[#b3b0a3]"}`,"aria-label":t?`Deselect ${e.name}`:`Select ${e.name}`,onClick:k=>{k.stopPropagation(),c()},onDoubleClick:k=>k.stopPropagation(),children:t?d.jsx(it,{name:"check",size:10,stroke:3}):null}),d.jsxs("span",{className:"relative block h-7.5 w-11 overflow-hidden rounded-md border border-line-soft bg-[#f4f3ee]",children:[d.jsx(Hg,{file:e,face:"row"}),d.jsx(HE,{file:e,compact:!0})]}),d.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[a?d.jsx(lj,{name:e.name,onCommit:v}):d.jsx("span",{className:"min-w-0 truncate text-[length:calc(12.5*var(--content))] font-medium text-ink",title:e.name,children:e.name}),d.jsx(r7,{file:e,onRetry:p,onRecheck:y}),m!==null?d.jsx("span",{className:`shrink-0 ${ij}`,"data-list-chip":"",children:m}):null]}),d.jsx("span",{className:"inline-flex",children:d.jsx(IE,{file:e})}),d.jsx("span",{className:"whitespace-nowrap text-xs text-ink-3",children:$E(e.bytes)}),d.jsx("span",{className:"whitespace-nowrap text-xs text-ink-3",children:UE(e.addedAt)}),d.jsx(rj,{file:e,handlers:g})]})}const s7={control:"checkbox",disabled:!1},{bar:l7,name:c7,thumb:u7}=qr.compact,d7="we-no-drag flex cursor-auto flex-col gap-1.5 px-1.5 pt-1.5";function f7({kind:e,name:t,chrome:a,thumb:r,below:s,beneath:c}){const{selected:u,onToggleSelect:m,actions:p}=a;return d.jsxs("div",{role:"option","aria-selected":u,tabIndex:0,"data-gallery-card":"",className:cj(u,"compact"),onClick:m,onKeyDown:y=>{y.target===y.currentTarget&&(y.key===" "||y.key==="Enter")&&(y.preventDefault(),m())},children:[d.jsxs("div",{className:l7,children:[d.jsx(uj,{kind:e,name:t,selected:u,select:s7,onToggleSelect:m,scale:"compact"}),d.jsx("span",{className:c7,title:t,children:t}),p.length>0&&d.jsx(sj,{name:t,actions:p,shown:!0,scale:"compact"})]}),d.jsx("div",{className:u7,"data-thumb":!0,"data-media-tile":e,children:r}),s,c?d.jsx("div",{className:d7,...WE,onClick:y=>y.stopPropagation(),children:c}):null,d.jsx("div",{className:"h-1.5"})]})}function Yg(e,t){const a=e!=null&&e.cut?e.derivativeUrl:t,[r,s]=x.useState(a);return a!==void 0&&a!==r&&s(a),a??r??t}const Qg="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)]",h7="h-[min(88vh,max(560px,calc(min(80vw,1440px)*0.625)))] max-h-full w-[min(80vw,1440px)] max-md:h-full max-md:w-full",m7=ie(Qg,h7),p7="max-h-[min(calc(100vh-120px),max(680px,72vh))] w-[clamp(560px,38vw,960px)] max-w-full max-md:w-full",fj="px-[clamp(18px,1.4vw,40px)]",Xg="px-[clamp(20px,1.75vw,36px)]",y7=ie("flex flex-shrink-0 items-center gap-[14px] pb-3 pt-[clamp(18px,1.6vw,30px)]",Xg),g7=ie("flex min-h-0 flex-1 flex-col overflow-y-auto pb-[clamp(20px,1.75vw,36px)] pt-3 [container-type:size] [--list-display-h:100cqh] [&>*]:shrink-0",Xg),Zg="mr-auto flex min-w-0 flex-col gap-0.5",Wg="m-0 text-[16px] font-semibold tracking-[-0.01em]",b7="text-[12px] text-ink-3",Jg=ie(vt,"grid size-8 flex-shrink-0 place-items-center rounded-[8px] text-ink-3 hover:bg-[#f1f0ea] hover:text-ink"),hj="px-[18px] py-[13px]",v7=ie("flex flex-shrink-0 items-center gap-[14px]",hj),x7=ie("flex flex-shrink-0 items-center justify-between gap-3 border-t border-line-soft",hj),w7="ml-auto flex gap-2",mj=ie(vt,"inline-flex h-9 items-center gap-1.5 rounded-[9px] border border-transparent px-4 text-[13px] font-semibold"),k7=ie(mj,"border-line bg-white text-ink hover:bg-[#faf9f6]"),_7=ie(mj,"border-honey-2 bg-honey text-honey-ink hover:bg-honey-2 disabled:cursor-default disabled:opacity-45"),S7=ie(vt,"inline-flex h-9 items-center px-1 font-medium text-ink-2 hover:text-ink"),E7={page:"max-w-[920px]",crop:"max-w-[680px]"};function j7({open:e=!0,variant:t,onClose:a,children:r}){return d.jsx(Dg,{open:e,onClose:a,className:ie(Qg,E7[t]),children:r})}const eb={Shell:j7,head:v7,titles:Zg,title:Wg,subtitle:b7,close:Jg,CloseIcon:Rt.x,foot:x7,actions:w7,buttonGhost:k7,buttonPrimary:_7,buttonLink:S7,ZoomOutIcon:Rt.minus,ZoomInIcon:Rt.plus},hk=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function O7(e,t){let a=e;for(const r of t.holder.split("."))Array.isArray(a)?a=a.find(s=>hk(s)&&s.id===r):a=hk(a)?a[r]:void 0;return Array.isArray(a)?a.find(r=>Wi(r)===t.mediaId):Wi(a)===t.mediaId?a:void 0}function A7(e,t,a){if(e===void 0)return;const r=O7(e,a),s=r===void 0?void 0:t.get(a.mediaId),c=s===void 0||!Object.hasOwn(e.files,s.file)?void 0:e.files[s.file];if(s===void 0||c===void 0)return;const u=ws(r)?Fy(s,r):s;return Hy(c,u)}const N7=16/10;function mk(e){return e.slice(e.indexOf(".")+1)}function pk(e){return e===null?null:{nx:e.x,ny:e.y,nw:e.width,nh:e.height}}function M7(e){return lg(e)?null:{x:e.nx,y:e.ny,width:e.nw,height:e.nh}}function yk(e,t){return e.state==="failed"?!0:!fs(e.crop,t)||CE(e)?!1:!Hd(t)||e.renditions.crop!==null}function pj({propertyId:e,recordAt:t,write:a,onFailed:r,onArrived:s}){const c=Dl(w=>w.byPlace),[u,m]=x.useState(null),p=w=>{const k=t(w),E=c[Yr(w)];return E!==void 0?k===void 0||!yk(k,E.crop):k!==void 0&&CE(k)};x.useEffect(()=>{const w=Object.values(c).filter(k=>{const E=k.propertyId===e?t(k.place):void 0;return E!==void 0&&yk(E,k.crop)});if(w.length!==0){for(const k of w)Dl.getState().settle(k.place);s==null||s()}},[c,t,e,s]);const y=async(w,k,E)=>{if(m(null),a===void 0)return;const S=M7(E);if(!fs(S,k.crop)){Dl.getState().start(w,e,S);try{await a(w,pk(S))}catch(j){Dl.getState().settle(w),r==null||r(w),console.error("[media] home crop failed",{place:w,err:j})}}},v=u===null?void 0:t(u),g=(v==null?void 0:v.file_url)??null;return{offers:w=>{const k=t(w);return e!==""&&a!==void 0&&(k==null?void 0:k.kind)==="image"&&k.url===null&&k.file_url!==null},open:m,isOpen:v!==void 0&&g!==null,recropping:p,modal:u!==null&&v!==void 0&&g!==null?d.jsx(hg,{chrome:eb,src:g,mode:"free",aspect:N7,seed:{rect:pk(v.crop)},onClose:()=>m(null),onApply:w=>void y(u,v,w.rect)}):null}}const C7=1500;function R7(e){const t=of(e===""?null:e);return x.useMemo(()=>{const a=t===void 0?new Map:Fd(t);return r=>A7(t,a,r)},[t])}function yj(e,t){const a=Ug(),r=Qd(),s=R7(e),{cropMedia:c}=a,u=x.useMemo(()=>c===void 0?void 0:async(g,w)=>{await c(e,g.mediaId,w,g.holder),await ay(r,a,e)},[c,e,r,a]),m=x.useMemo(()=>()=>void ay(r,a,e),[r,a,e]),p=pj({propertyId:e,recordAt:s,write:u,onFailed:t,onArrived:m}),y=Dl(g=>g.byPlace),v=Object.values(y).some(g=>g.propertyId===e&&p.recropping(g.place));return yc({...a.mediaFactsQuery(e),enabled:e!==""&&v,refetchInterval:v?C7:!1}),p}function T7(e){const{width:t,height:a}=e!==null&&typeof e=="object"?e:{};return{width:typeof t=="number"?t:null,height:typeof a=="number"?a:null}}function ms(e){var t;return((t=e.renditions.cutout)==null?void 0:t.url)??jd(e)??""}function tb(e,t,a,r,s){const c=ms(e);if(e.id===t.asset_id)return{...t,url:c};const u=a===void 0?void 0:X3(a,s,e.id);return u===void 0||a===void 0?{asset_id:e.id,url:c,alt:t.alt,picked:e.id}:{...Z3(u,T7(a.files[u.file]),r),url:c,alt:t.alt}}const gj={New:Jd,Choose:iE,Upload:ef};function D7(e){return/[^aeiou]ies$/i.test(e)?e.slice(0,-3)+"y":/(?:ss|x|z|ch|sh)es$/i.test(e)?e.slice(0,-2):/[^s]s$/i.test(e)?e.slice(0,-1):e}function bj(e){return/^[A-Z][A-Z]/.test(e)?e:e.charAt(0).toLowerCase()+e.slice(1)}function sr(e){const t=bj((e??"").trim());if(t==="")return{singular:"item",plural:"items"};const a=t.search(/\S+$/);return{singular:t.slice(0,a)+D7(t.slice(a)),plural:t}}function nb(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Wl(e,t){return`${e} ${t}`}function ib(e,t,a){const r=sr(t),s=a&&e==="New"?r.singular:r.plural;return{verb:e,icon:gj[e],label:Wl(e,s),empty:`No ${r.plural} yet`}}function L7(e,t,a,r){const s=a.flatMap(u=>{const m=vj(u,r);return m===null?[]:[sr(m)[t?"plural":"singular"]]}),c=ib("Choose",e,t);return s.length===0?c:{...c,label:Wl("Choose",[...new Set(s)].join(" or "))}}const z7={property:"Property",library:"Library"};function vj(e,t){if(!/^(?:property|library)\./.test(e))return null;const a=yd(e);if(a===null)return null;const{home:r}=Kl(e);return r===t?a:`${z7[r]} ${a.charAt(0).toLowerCase()}${a.slice(1)}`}function lf(e,t={}){return e.locked===!0||!$7(e)?null:ab(e,t)}function $7(e){const t=e.type;return t==="list"||t==="row"||xs(e.type)}function ab(e,t={}){const a=e.type==="list",r=I7(e,t);return{add:ib(!a&&xs(e.type)?"Upload":"New",e.label,a),choose:r===null?null:L7(e.label,a,r.lists,r.home)}}function U7(e){const[t]=e,a=e.length===1&&t!==void 0?yd(t)??void 0:void 0;return ib("New",a,!0)}function xj(e){return e.choose??e.add}function I7(e,t){const a=H7(e,t.table);if(a!==null&&Kr(a).length>0){const c=Kr(a)[1];return c===void 0?null:{lists:[c],home:Kl(a).home}}const r=B7(e,t),s=t.membership;if((s==null?void 0:s.kind)==="pick-row"||(s==null?void 0:s.kind)==="pick-media"){const c=s.kind==="pick-row"?s.tables.map(u=>Gr[u.table]):Mr(s.filter.from);return{lists:r!==null&&r.length>0?r:c,home:"property"}}return r===null?null:{lists:r,home:"property"}}function B7(e,t){if(e.type==="list")return e.element===void 0?null:F7(e.element);if(e.type==="row")return Mr(e.from);if(!xs(e.type))return null;const a=ds(e,t.table);return(a==null?void 0:a.kind)==="picked"?Mr(a.filter.from):null}function Mr(e){return Jy({from:e}).flatMap(t=>{if(/^(?:property|library)\./.test(t))return[t];const a=qt(t);return a===null?[]:[Gr[a.table]]})}function H7(e,t){const a=e.source;if((a==null?void 0:a.kind)==="home"&&typeof a.key=="string"){if(/^(?:property|library)\./.test(a.key))return a.key;const s=qt(a.key);return s===null?null:Gr[s.table]}const r=(a==null?void 0:a.kind)==="row"?a.field:void 0;return typeof r!="string"||r===""||t==null?null:`${Gr[t]}.${q7}.${r}`}const q7="_";function F7(e){const t=e.fields??{};if(tS(e)!==void 0)return e.from!==void 0?Mr(e.from):Object.values(t).flatMap(s=>Mr(s.from));if(e.type!=="object")return null;const a=V_(e);if((a==null?void 0:a.type)==="row"&&a.from!==void 0)return Mr(a.from);if(!ng(t))return null;const r=Object.values(t).filter(s=>xs(s.type)&&s.locked!==!0&&s.from!==void 0);return r.length===0?null:r.flatMap(s=>Mr(s.from))}const rb={image:"image/*",video:"video/*",tour:null,document:mz};function ob(e){const t=e.flatMap(a=>rb[a]??[]);return t.length===0?null:t.join(",")}function kc(e){return[...ob(e)!==null?["file"]:[],...$y(e).length>0?["link"]:[]]}const P7=ve("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"}]]),V7=ve("Facebook",[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"fb-f"}]]),G7=ve("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"}]]),K7=ve("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"}]]),Y7={home:o6,building:uL,apartments:fL,trendUp:p8,tag:f8,key:u6,template:h6,palette:q6,filePen:YL,library:p6,plug:Y6,helpCircle:jL,lock:w6,creditCard:TL,settings:o8,power:Z6,user:j8,plus:Jd,globe:i6,image:Wd,fileText:Zd,users:A8,eye:sE,eyeOff:VL,pulse:YD,search:Cg,chart:bL,layout:cE,chevDown:_g,chevRight:Sg,chevSelector:SL,pencil:Ag,dots:qL,grip:jg,external:oE,copy:CL,trash:As,archive:XD,sparkle:u8,arrowUp:rL,arrowDown:WD,arrowLeft:eL,arrowRight:nL,undo:w8,redo:e8,logout:_6,check:Xd,x:Tg,clock:AL,calendar:yL,mapPin:dE,userPlus:S8,mail:E6,phone:V6,share:l8,upload:ef,bookOpen:sL,newspaper:B6,presentation:Ng,instagram:P7,facebook:V7,linkedin:G7,xLogo:K7};function ci({name:e,size:t=18,stroke:a=2,fill:r,color:s,className:c,style:u}){const m=Y7[e];return d.jsx(m,{size:t,strokeWidth:a,fill:r??"none",color:s,className:c,style:{flexShrink:0,width:`calc(${t} * var(--content))`,height:`calc(${t} * var(--content))`,color:s??"currentColor",...u},"aria-hidden":"true"})}function Q7(e,t=Date.now()){const a=Math.floor((t-e)/1e3);return a<5?"just now":a<60?`${a}s ago`:a<3600?`${Math.floor(a/60)}m ago`:`${Math.floor(a/3600)}h ago`}const np="inline-flex flex-shrink-0 items-center gap-1.5 whitespace-nowrap p-1 text-[length:calc(12.5*var(--content))] font-medium";function X7({status:e}){const[,t]=x.useReducer(a=>a+1,0);return x.useEffect(()=>{const a=setInterval(t,15e3);return()=>clearInterval(a)},[]),e.state==="saving"?d.jsxs("div",{className:ie(np,"text-ink-2"),children:[d.jsx("span",{className:"size-3 animate-spin rounded-full border-[1.6px] border-ink-4 border-t-accent [animation-duration:0.8s]","aria-hidden":"true"}),d.jsx("span",{children:"Saving…"})]}):e.state==="error"?d.jsxs("div",{role:"status",className:ie(np,"text-ink-2"),children:[d.jsx(ci,{name:"x",size:13,stroke:2.4,className:"text-danger"}),d.jsx("span",{children:"Not saved"})]}):d.jsxs("div",{className:ie(np,"text-ink-3"),children:[d.jsx(ci,{name:"check",size:13,stroke:2.4,className:"text-good"}),d.jsxs("span",{children:["Saved"," ",d.jsx("span",{className:"ml-0.5 font-normal text-ink-4 [font-variant-numeric:tabular-nums]",children:Q7(e.savedAt)})]})]})}const Z7=x.createContext(null);function wj(){const e=x.useContext(Z7);return e===null?null:d.jsx(X7,{status:e})}function W7({open:e=!0,onClose:t,title:a,notice:r,children:s}){return d.jsxs(Dg,{open:e,onClose:t,ariaLabel:a,className:m7,children:[d.jsxs("div",{className:y7,children:[d.jsx("div",{className:Zg,children:d.jsx("h2",{className:ie(Wg,"truncate"),children:a})}),d.jsx(wj,{}),d.jsx("button",{type:"button",className:Jg,onClick:t,"aria-label":"Close",children:d.jsx(Rt.x,{})})]}),r,d.jsx("div",{className:g7,children:s})]})}function J7(e){const[t]=e.ids,{removeFrom:a}=e,r=a===void 0&&e.ids.length===1&&t!==void 0&&!e.inFlightIds.has(t)?t:null,c=yc({queryKey:["media-holders",e.scope,r],queryFn:()=>{if(r===null)throw new Error("holder read disabled without a single listed id");return e.holders(r)},enabled:r!==null}).data??[],u=SE(),m=e.ids.length;return ir.createPortal(d.jsx("div",{className:"fixed inset-0 flex items-center justify-center bg-black/40",style:{zIndex:u},onClick:e.onCancel,children:d.jsxs("div",{className:"w-[calc(400*var(--frame))] rounded-lg border border-line bg-canvas p-5 shadow-xl",role:"alertdialog","aria-modal":"true",onClick:p=>p.stopPropagation(),children:[d.jsxs("div",{className:"text-[length:calc(15*var(--content))] font-semibold text-ink",children:[a===void 0?"Delete":"Remove"," ",m===1?"this object":`${m} objects`,a===void 0?"":` from ${a}`,"?"]}),a!==void 0?d.jsx("p",{className:"mt-1.5 text-body leading-[1.5] text-ink-2",children:m===1?"It stays in your uploads.":"They stay in your uploads."}):c.length>0?d.jsxs(d.Fragment,{children:[d.jsx("p",{className:"mt-1.5 text-body leading-[1.5] text-ink-2",children:"Deleting it also removes it from:"}),d.jsx("ul",{className:"mt-1.5 max-h-[calc(160*var(--content))] overflow-y-auto text-body leading-[1.5] text-ink","aria-label":"Where this object is used",children:c.map(p=>d.jsx("li",{className:"truncate before:mr-1.5 before:text-ink-2 before:content-['•']",children:p.name},p.id))})]}):d.jsx("p",{className:"mt-1.5 text-body leading-[1.5] text-ink-2",children:m===1?"This permanently removes the file.":`This permanently removes ${m} objects.`}),d.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[d.jsx("button",{type:"button",className:"rounded-[calc(8*var(--content))] border border-line px-3 py-1.5 text-body font-medium text-ink hover:bg-accent-soft",onClick:e.onCancel,children:"Cancel"}),d.jsx("button",{type:"button",className:"rounded-[calc(8*var(--content))] bg-danger px-3 py-1.5 text-body font-medium text-white hover:opacity-90",onClick:e.onConfirm,children:a===void 0?"Delete":"Remove"})]})]})}),document.body)}const Xu="grid h-8 w-8 place-items-center rounded-full text-white/85 hover:bg-white/[0.12] hover:text-white",gk="absolute top-1/2 z-[2] grid h-10 w-10 -translate-y-1/2 place-items-center rounded-full bg-white/10 text-white hover:bg-white/[0.22]";function eU({file:e,index:t,total:a,onClose:r,onPrev:s,onNext:c,onDownload:u,onDelete:m,onCrop:p}){const y=e.thumbnailUrl!==null,v=SE();return ir.createPortal(d.jsxs("div",{className:"fixed inset-0 flex flex-col bg-black/80",style:{zIndex:v},role:"dialog","aria-modal":"true","aria-label":`Preview: ${e.name}`,onClick:r,children:[d.jsxs("div",{className:"flex shrink-0 items-center gap-2.5 px-4.5 py-3.25",onClick:g=>g.stopPropagation(),children:[d.jsx("span",{className:"max-w-[44vw] truncate text-[length:calc(13.5*var(--content))] font-semibold text-white",title:e.name,children:e.name}),d.jsx(IE,{file:e}),d.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[p?d.jsx("button",{type:"button",className:Xu,title:"Crop","aria-label":`Crop ${e.name}`,onClick:g=>{g.stopPropagation(),p()},children:d.jsx(it,{name:"crop",size:15})}):null,u&&!Ul(e)?d.jsx("button",{type:"button",className:Xu,title:"Download",onClick:g=>{g.stopPropagation(),u()},children:d.jsx(it,{name:"down",size:15})}):null,m?d.jsx("button",{type:"button",className:Xu,title:"Delete",onClick:g=>{g.stopPropagation(),m()},children:d.jsx(it,{name:"trash",size:14})}):null,d.jsx("span",{className:"mx-2 h-4.5 w-px bg-white/[0.18]"}),d.jsx("button",{type:"button",className:Xu,title:"Close","aria-label":"Close preview",onClick:r,children:d.jsx(it,{name:"x",size:15})})]})]}),d.jsxs("div",{className:"relative grid min-h-0 flex-1 place-items-center px-19",children:[a>1?d.jsx("button",{type:"button",className:`${gk} left-5`,"aria-label":"Previous",onClick:g=>{g.stopPropagation(),s()},children:d.jsx(it,{name:"chevl",size:16})}):null,y?d.jsx("div",{className:"relative h-[min(560px,100%)] w-[min(880px,100%)] rounded bg-contain bg-center bg-no-repeat shadow-[0_30px_80px_-20px_rgba(0,0,0,0.6)]",style:{backgroundImage:`url("${e.thumbnailUrl??""}")`},onClick:g=>g.stopPropagation(),children:e.kind==="video"?d.jsx("span",{className:"absolute inset-0 m-auto flex h-13 w-13 items-center justify-center rounded-full border-[1.5px] border-white/85 bg-[rgba(10,12,10,0.55)] pl-0.5 text-white backdrop-blur-[2px]",children:d.jsx(it,{name:"play",size:20})}):null}):d.jsx("div",{className:"relative h-[min(420px,100%)] w-[min(560px,100%)] overflow-hidden rounded shadow-[0_30px_80px_-20px_rgba(0,0,0,0.6)]",onClick:g=>g.stopPropagation(),children:d.jsx(Hg,{file:e,face:"lightbox"})}),a>1?d.jsx("button",{type:"button",className:`${gk} right-5`,"aria-label":"Next",onClick:g=>{g.stopPropagation(),c()},children:d.jsx(it,{name:"chevr",size:16})}):null]}),d.jsxs("div",{className:"shrink-0 p-3.25 text-center text-xs font-medium text-white/55",children:[t+1," of ",a]})]}),document.body)}function tU(e){return[{id:"all",label:"All"},...Od.filter(t=>e.includes(t)).map(t=>({id:t,label:xc[t].plural}))]}const bk=[{id:"custom",label:"Custom"},{id:"date",label:"Date added"},{id:"name",label:"Name"},{id:"kind",label:"Kind"},{id:"size",label:"Size"}],nU="ml-auto inline-flex text-ink-3";function iU({filter:e,setFilter:t,counts:a,kinds:r}){const s=tU(r),[c,u]=x.useState(!1),m=x.useRef(null),p=x.useCallback(()=>u(!1),[]);wc(m,c,p);const y=e!=="all",v=s.find(g=>g.id===e)??{label:"All"};return d.jsxs("div",{className:"relative",ref:m,children:[d.jsxs("button",{type:"button","aria-expanded":c,onClick:()=>u(g=>!g),className:`${zg} ${y?"border-accent bg-accent-soft text-accent-ink":$g}`,children:[e==="all"?null:d.jsx(Zr,{kind:e,decorative:!0}),d.jsx("span",{className:y?"text-accent-ink opacity-70":"text-ink-3",children:"Kind:"}),d.jsx("span",{className:"font-semibold",children:v.label}),d.jsx("span",{className:`inline-flex ${y?"text-accent-ink":"text-ink-3"}`,children:d.jsx(it,{name:"chevd",size:13})})]}),c?d.jsx("div",{className:`${af} right-0 top-[calc(100%+6*var(--content))] min-w-[calc(210*var(--frame))] p-1.5`,role:"menu",children:s.map(g=>d.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":e===g.id,className:jE,onClick:()=>{t(g.id),u(!1)},children:[g.id==="all"?d.jsx("span",{className:"grid h-5 w-5 place-items-center text-ink-3","aria-hidden":"true",children:d.jsx(it,{name:"grid",size:13})}):d.jsx(Zr,{kind:g.id,decorative:!0}),d.jsx("span",{children:g.label}),d.jsx("span",{className:"ml-auto text-[length:calc(11.5*var(--content))] font-medium text-ink-4",children:a[g.id]}),d.jsx("span",{className:`inline-flex w-3 text-ink-3 ${e===g.id?"":"invisible"}`,children:d.jsx(it,{name:"check",size:12,stroke:2.4})})]},g.id))}):null]})}function aU({sort:e,setSort:t}){var m;const[a,r]=x.useState(!1),s=x.useRef(null),c=x.useCallback(()=>r(!1),[]);wc(s,a,c);const u=((m=bk.find(p=>p.id===e))==null?void 0:m.label)??"Custom";return d.jsxs("span",{className:"relative inline-flex",ref:s,children:[d.jsxs("button",{type:"button",className:`${zg} ${$g}`,"aria-expanded":a,onClick:()=>r(p=>!p),children:[d.jsx("span",{className:"text-ink-3",children:"Sort:"}),d.jsx("span",{className:"font-semibold",children:u}),d.jsx("span",{className:"inline-flex text-ink-3",children:d.jsx(it,{name:"chevd",size:13})})]}),a?d.jsx("div",{className:`${af} right-0 top-[calc(100%+6*var(--content))] w-[calc(170*var(--frame))] p-1.5`,role:"menu",children:bk.map(p=>d.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":e===p.id,className:jE,onClick:()=>{t(p.id),r(!1)},children:[p.label,e===p.id?d.jsx("span",{className:nU,children:d.jsx(it,{name:"check",size:12,stroke:2.4})}):null]},p.id))}):null]})}function rU({view:e,setView:t}){const a=(r,s)=>{const c=e===r;return d.jsxs("button",{type:"button","aria-label":s,"aria-pressed":c,title:s,onClick:()=>t(r),className:`flex h-full cursor-pointer items-center gap-1 px-3 transition-colors duration-150 ${c?"bg-accent-soft text-accent-ink":"text-ink-3 hover:bg-[#f6f5f1] hover:text-ink"} ${r==="list"?"border-l border-line":""}`,children:[c?d.jsx(it,{name:"check",size:13,stroke:2.4}):null,d.jsx(it,{name:r,size:15})]})};return d.jsxs("div",{className:"flex h-9 shrink-0 overflow-hidden rounded-lg border border-line bg-canvas",role:"group","aria-label":"View",children:[a("list","List view"),a("grid","Grid view")]})}function oU({lead:e,selectionPill:t,filter:a,setFilter:r,counts:s,kinds:c,sort:u,setSort:m,view:p,setView:y}){return d.jsxs("div",{className:"flex min-h-9 shrink-0 flex-wrap items-center gap-2",onClick:v=>v.stopPropagation(),children:[e,t,d.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[d.jsx(iU,{filter:a,setFilter:r,counts:s,kinds:c}),d.jsx(aU,{sort:u,setSort:m}),d.jsx(rU,{view:p,setView:y})]})]})}function sU({count:e,onClear:t,onDownload:a,onDelete:r}){const s="inline-flex h-7 cursor-pointer items-center gap-1.5 rounded-md px-2 text-[length:calc(12.5*var(--content))] font-semibold hover:bg-[rgba(15,42,34,0.08)]";return d.jsxs("div",{role:"toolbar","aria-label":"Selection",className:"flex h-9 max-w-[calc(420*var(--frame))] items-center gap-0.5 overflow-hidden whitespace-nowrap rounded-lg border border-[#d5e0cf] bg-accent-soft pl-1 pr-1 opacity-100 transition-[max-width,opacity] duration-300 ease-out starting:max-w-0 starting:opacity-0",onClick:c=>c.stopPropagation(),children:[d.jsx("button",{type:"button",className:"grid h-7 w-7 shrink-0 cursor-pointer place-items-center rounded-md text-ink-2 hover:bg-[rgba(15,42,34,0.08)]","aria-label":"Clear selection",onClick:t,children:d.jsx(it,{name:"x",size:14})}),d.jsxs("span",{className:"ml-0.5 mr-1.5 text-[length:calc(12.5*var(--content))] font-semibold text-ink",children:[e," selected"]}),d.jsx("span",{className:"mx-1 h-4 w-px shrink-0 bg-[rgba(15,42,34,0.16)]"}),d.jsxs("button",{type:"button",className:`${s} text-accent`,onClick:a,children:[d.jsx(it,{name:"down",size:13}),"Download"]}),r?d.jsxs("button",{type:"button",className:`${s} text-danger`,onClick:r,children:[d.jsx(it,{name:"trash",size:13}),"Delete"]}):null]})}function sb(e,t,a=new Set){const r=e.includes(t);return{checked:r,disabled:!r&&a.has(t)}}function kj(e,t,a,r){const{checked:s,disabled:c}=sb(e,t,r);return a==="radio"?s||c?e:[t]:s?e.filter(u=>u!==t):c?e:[t,...e]}const vk="hp-uploads-view",lU=new Set;function cU({onReset:e}){return d.jsxs("div",{className:"flex min-h-0 flex-1 flex-col items-center justify-center-safe gap-3 overflow-y-auto px-6 py-12 text-center",children:[d.jsx("span",{className:"text-base font-semibold tracking-[-0.01em] text-ink",children:"Nothing matches this filter"}),d.jsx("button",{type:"button",className:"inline-flex h-8 items-center justify-center rounded-lg border border-line bg-canvas px-3 text-[length:calc(12.5*var(--content))] font-medium text-ink hover:bg-[#f6f5f1]",onClick:e,children:"Show everything"})]})}const uU=ie(tj,"flex flex-col gap-3"),dU="flex min-h-0 flex-1 flex-col overflow-hidden rounded-2xl border border-line bg-canvas transition-[box-shadow,background-color] duration-150 data-dragging:bg-accent-soft/40 data-dragging:ring-2 data-dragging:ring-accent",fU=ie(tj,"flex flex-col rounded-2xl border border-line bg-canvas items-center justify-center text-center text-body text-ink-3"),xk="grid grid-cols-[repeat(auto-fill,minmax(calc(200*var(--frame)),1fr))] gap-4 p-4",hU=8;function mU({filter:e,selection:t,host:a,beneathOf:r,tiers:s}){const{capabilities:c,preparing:u}=a,{kinds:m,from:p}=Fl(e),y=x.useMemo(()=>{const ae=new Map((s??[]).flatMap((_e,Pe)=>_e.map(At=>[At,Pe])));return _e=>ae.get(_e)??0},[s]),v=(s==null?void 0:s.flat())??p,g=c.upload?ob(m):null,w=c.upload&&$y(m).length>0,k=x.useRef(null),E=x.useRef(new Set),S=ae=>{t.mode!=="all"&&(k.current??(k.current=Date.now())),a.addFiles(ae)},j=ae=>{t.mode!=="all"&&(k.current??(k.current=Date.now())),a.addLink(ae)},C=U7(p),A=g!==null||w?{accept:g,onFiles:S,...w?{onLink:j}:{},disabled:u}:null,[O,T]=x.useState(()=>new Set),[R,B]=x.useState(()=>t.mode==="multi"?t.selectedIds:[]),[D,L]=x.useState("all"),[P,le]=x.useState("custom"),[ee,de]=x.useState(null),[K,Q]=x.useState(null),[se,N]=x.useState(()=>{if(typeof window>"u")return"grid";try{return window.localStorage.getItem(vk)==="list"?"list":"grid"}catch{return"grid"}}),[V,te]=x.useState(null),[me,Y]=x.useState(null),[M,H]=x.useState(!1),[I,F]=x.useState(null),[W,pe]=x.useState(null),oe=x.useRef(0),ke=x.useRef(null);x.useEffect(()=>{try{window.localStorage.setItem(vk,se)}catch{}},[se]),x.useEffect(()=>()=>{ke.current&&clearTimeout(ke.current)},[]);const z=x.useCallback(ae=>{F(ae),ke.current&&clearTimeout(ke.current),ke.current=setTimeout(()=>F(null),2400)},[]),ce=x.useMemo(()=>new Map(a.items.flatMap(ae=>On(ae)?[]:[[ae.asset.id,ae.asset]])),[a.items]),ge=x.useMemo(()=>new Map(a.items.flatMap(ae=>On(ae)?[]:[[Yr({holder:mk(ae.list),mediaId:ae.asset.id}),ae.asset]])),[a.items]),Se=x.useCallback(ae=>ge.get(Yr(ae)),[ge]),Le=pj({propertyId:t.mode==="all"?a.scope:"",recordAt:Se,write:a.crop,onFailed:()=>z("Couldn't crop")}),Ie=ae=>({holder:mk(ae.list),mediaId:ae.id}),ye=ae=>t.mode==="all"&&c.manage&&ae.kind==="image"&&!ae.inFlight&&Le.offers(Ie(ae))?{onCrop:()=>Le.open(Ie(ae))}:{},Re=a.items.filter(ae=>{const _e=On(ae)?ae.kind:ae.asset.kind;return v.includes(ae.list)&&(_e===null||m.includes(_e))}).map(ae=>Iz(ae,y)).map(ae=>ae.state==="ready"&&Le.recropping(Ie(ae))?{...ae,state:"processing"}:ae),ht=x.useMemo(()=>new Set(a.items.filter(On).map(LE)),[a.items]),$e=qz(Re),Lt=ee===null?Re:[...Re].sort((ae,_e)=>ee.indexOf(ae.id)-ee.indexOf(_e.id)),lt=Hz(Lt,D,P),[Fn]=p,An=a.reorder,un=t.mode==="all"&&c.manage&&An!==void 0&&P==="custom"&&p.length===1&&V===null,gt=un?lt.filter(ae=>!ae.inFlight):[],aa=ae=>{Q(null);const _e=ae.map(nt=>nt.id),Pe=Lt.filter(nt=>!nt.inFlight).map(nt=>nt.id),At=d4(Pe,_e);An===void 0||Fn===void 0||At.every((nt,Pn)=>nt===Pe[Pn])||(de(At),An(Fn,_e).then(()=>de(null),()=>{de(null),z("Couldn't reorder")}))},{containerRef:di,getItemProps:ii}=KE({items:gt,getKey:ae=>ae.id,onReorder:Q,onDrop:aa,axis:se==="list"?"y":"xy",threshold:5}),we=K===null?lt:[...lt.filter(ae=>ae.inFlight),...K],Te=x.useCallback(()=>T(new Set),[]),Ce=x.useMemo(()=>t.mode==="all"?lU:new Set([...t.disabledIds??[],...ht]),[t,ht]),Xe=t.mode==="single"?t.selectedId===null?[]:[t.selectedId]:R,at=ae=>{if(t.mode==="all")return;if(t.mode==="single"){const Pe=Ce.has(ae)?void 0:ce.get(ae);Pe&&t.onPick(Pe);return}const _e=kj(Xe,ae,"checkbox",Ce);_e!==Xe&&(B(_e),t.onChange(_e.flatMap(Pe=>ce.get(Pe)??[])))};x.useEffect(()=>{const ae=k.current;if(ae===null||t.mode==="all")return;for(const nt of a.items)On(nt)&&nt.addedAt>=ae&&E.current.add(nt.id);const _e=[...E.current].filter(nt=>ce.has(nt)&&!Ce.has(nt)),[Pe]=_e;if(Pe===void 0)return;for(const nt of _e)E.current.delete(nt);if(t.mode==="single"){at(Pe);return}const At=[..._e.filter(nt=>!Xe.includes(nt)),...Xe];At.length!==Xe.length&&(B(At),t.onChange(At.flatMap(nt=>ce.get(nt)??[])))},[a.items]);const Qt=ae=>{if(t.mode==="all")return{selected:O.has(ae),control:"checkbox",disabled:!1};const{checked:_e,disabled:Pe}=sb(Xe,ae,Ce);return{selected:_e,control:t.mode==="single"?"radio":"checkbox",disabled:Pe}},ut=ae=>{if(t.mode!=="all"){at(ae);return}T(_e=>{const Pe=new Set(_e);return Pe.has(ae)?Pe.delete(ae):Pe.add(ae),Pe})},ne=lt.findIndex(ae=>ae.id===me),be=ne>=0?lt[ne]:void 0,Oe=ae=>{var Pe;if(lt.length===0)return;const _e=(Math.max(ne,0)+ae+lt.length)%lt.length;Y(((Pe=lt[_e])==null?void 0:Pe.id)??null)},ze=ae=>{if(!me||!ae.includes(me))return;const _e=lt.findIndex(nt=>nt.id===me),At=[...lt.slice(_e+1),...lt.slice(0,Math.max(_e,0))].find(nt=>!ae.includes(nt.id));Y(At?At.id:null)};x.useEffect(()=>{const ae=_e=>{if(Le.isOpen)return;const Pe=_e.target instanceof HTMLElement?_e.target.tagName:"";if(!(Pe==="INPUT"||Pe==="TEXTAREA")){if(W){_e.key==="Escape"&&pe(null),(_e.key==="Escape"||_e.key==="Enter")&&_e.preventDefault();return}if(_e.key==="Escape"){if(me)Y(null);else if(O.size>0)Te();else return;_e.preventDefault()}else me&&_e.key==="ArrowRight"?Oe(1):me&&_e.key==="ArrowLeft"?Oe(-1):me&&_e.key==="Enter"&&_e.preventDefault()}};return document.addEventListener("keydown",ae),()=>document.removeEventListener("keydown",ae)});const Ge=ae=>{ze(ae),T(_e=>{const Pe=new Set(_e);return ae.forEach(At=>Pe.delete(At)),Pe}),a.remove(ae).then(_e=>{_e>0?z(`Couldn't delete ${_e}`):z(`Deleted ${ae.length} object${ae.length===1?"":"s"}`)})},He=()=>{W&&(pe(null),Ge(W))},kt=ae=>{Ul(ae)||ae.inFlight||(z("Preparing download…"),a.download(ae.id).catch(()=>z("Couldn't download")))},jt=()=>{const ae=Re.filter(_e=>O.has(_e.id)&&!Ul(_e)&&!_e.inFlight);ae.length!==0&&(z("Preparing download…"),ae.forEach(_e=>void a.download(_e.id).catch(()=>z("Couldn't download"))))},_t=(ae,_e)=>{te(null),!(_e===null||!_e||_e===ae.name)&&a.rename(ae.id,_e).catch(()=>z("Couldn't rename"))},Ft=g!==null&&!u,Xt=ae=>{ae.preventDefault(),!(!Ft||!Array.from(ae.dataTransfer.types).includes("Files"))&&(oe.current+=1,H(!0))},Zt=ae=>{ae.preventDefault(),oe.current-=1,oe.current<=0&&(oe.current=0,H(!1))},Nn=ae=>{ae.preventDefault(),oe.current=0,H(!1),Ft&&ae.dataTransfer.files.length>0&&S(Array.from(ae.dataTransfer.files))},Oi=ae=>t.mode==="all"&&O.has(ae)&&O.size>1?lt.filter(_e=>O.has(_e.id)).map(_e=>_e.id):null,ai=ae=>{const{selected:_e,control:Pe,disabled:At}=Qt(ae.id),nt=Oi(ae.id),Pn=nt==null?void 0:nt.filter(Ot=>!ht.has(Ot));return{file:ae,selected:_e,select:{control:Pe,disabled:At},listChip:p.length<2||ae.upstream?null:yd(ae.list)??ae.list,renaming:V===ae.id,onClick:Ot=>{Ot.stopPropagation(),ut(ae.id)},onDoubleClick:()=>t.mode==="single"?at(ae.id):Y(ae.id),onToggleSelect:()=>ut(ae.id),...ae.state==="failed"&&a.canRetry(ae.id)?{onRetry:()=>a.retry(ae.id)}:{},...ae.linkUnreachable?{onRecheck:()=>void a.recheck(ae.id)}:{},onRenameCommit:Ot=>_t(ae,Ot),handlers:{onPreview:()=>Y(ae.id),onDownload:()=>kt(ae),...ye(ae),...c.manage?{onRenameStart:()=>te(ae.id),onDelete:()=>pe(nt??[ae.id]),...nt!==null?{deleteLabel:`Delete ${nt.length} objects`}:{}}:{}},...un&&!ae.inFlight?{drag:ii(ae.id,Pn)}:{}}},fi=ae=>{const _e=new Set(Re.filter(At=>ae.includes(At.id)).map(At=>At.list)),[Pe]=_e;return _e.size!==1||Pe===void 0||Kr(Pe).at(-1)===Pe?{}:{removeFrom:yd(Pe)??Pe}},io=[...O],Ac=Re.length===0;return d.jsxs("div",{className:"flex flex-col",onClick:Te,onDragEnter:Xt,onDragOver:ae=>ae.preventDefault(),onDragLeave:Zt,onDrop:Nn,children:[a.loading?d.jsx("div",{className:fU,children:"Loading…"}):d.jsxs("div",{className:uU,children:[d.jsx(oU,{lead:d.jsx(bc,{size:"large",add:C,onAdd:null,...A!==null?{newChip:d.jsx(o$,{add:A,verb:C})}:{}}),selectionPill:O.size>0?d.jsx(sU,{count:O.size,onClear:Te,onDownload:jt,...c.manage?{onDelete:()=>pe(io)}:{}}):null,filter:D,setFilter:L,counts:$e,kinds:m,sort:P,setSort:le,view:se,setView:N}),d.jsx("div",{className:dU,"data-dragging":M||void 0,children:Ac?d.jsxs("div",{className:"relative min-h-0 flex-1",children:[d.jsx(gc,{children:d.jsx("div",{className:xk,children:Array.from({length:hU},(ae,_e)=>d.jsx(i7,{},_e))})}),d.jsx(i$,{add:A,kinds:m,dragging:M})]}):lt.length===0?d.jsx(cU,{onReset:()=>L("all")}):d.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:se==="grid"?d.jsx("div",{ref:di,className:ie("relative",xk),role:"listbox","aria-multiselectable":t.mode!=="single","aria-label":"Uploaded objects",children:we.map(ae=>d.jsx(n7,{...ai(ae),beneath:r==null?void 0:r(ae)},ae.id))}):d.jsxs("div",{ref:di,className:"relative pt-1",role:"table","aria-label":"Uploaded objects",children:[d.jsx(a7,{}),we.map(ae=>d.jsx(o7,{...ai(ae)},ae.id))]})})})]}),be?d.jsx(eU,{file:be,index:ne,total:lt.length,onClose:()=>Y(null),onPrev:()=>Oe(-1),onNext:()=>Oe(1),...!Ul(be)&&!be.inFlight?{onDownload:()=>kt(be)}:{},...c.manage?{onDelete:()=>pe([be.id])}:{},...ye(be)}):null,Le.modal,W&&!u?d.jsx(J7,{scope:a.scope,ids:W,inFlightIds:ht,holders:a.holders,...fi(W),onCancel:()=>pe(null),onConfirm:He}):null,I?d.jsx("div",{role:"status",style:{zIndex:Y8},className:"fixed bottom-6 left-1/2 -translate-x-1/2 rounded-full bg-ink px-4 py-2 text-body font-semibold text-canvas shadow-[0_14px_34px_-10px_rgba(10,12,10,0.5)]",children:I}):null]})}function lb(){return Yt()}function pU(e){const t=Kl(e[0]).home;return IR(e).flatMap(a=>{const[r,...s]=a;return r===void 0?[]:[{lists:[r,...s],label:a.map(c=>vj(c,t)??Kl(c).key).join(" + ")}]}).reverse()}const oy=new Map,ad=new Map,sy=new Set,ly=[],rd=new Map,wk=new Set,ps=new Map;function yU(e,t){var a;(a=ps.get(e))==null||a.onStored(t),ps.delete(e)}function ip(e,t){var a;(a=ps.get(e))==null||a.onFailed(t),ps.delete(e)}function _j(){for(const e of sy)e()}function Sj(e){return sy.add(e),()=>{sy.delete(e)}}function cb(e,t){t.length===0?oy.delete(e):oy.set(e,t),_j()}function Fr(e){return oy.get(e)??ly}function kk(e,t){t.length!==0&&cb(e,[...t,...Fr(e)])}function cy(e,t,a){const r=Fr(e);r.some(s=>s.inFlight.id===t)&&cb(e,r.map(s=>s.inFlight.id===t?a(s):s))}function _k(e,t){var c;const a=new Set(t),r=Fr(e),s=r.filter(u=>a.has(u.inFlight.id));if(s.length!==0){for(const u of s)(c=u.inFlight.preview)!=null&&c.startsWith("blob:")&&URL.revokeObjectURL(u.inFlight.preview);cb(e,r.filter(u=>!a.has(u.inFlight.id)))}}function Sk(e,t,a,r){const s=ad.get(e)??rd,c=s.get(t)??[];if(c.includes(a)===r)return;const u=new Map(s),m=r?[...c,a]:c.filter(p=>p!==a);m.length===0?u.delete(t):u.set(t,m),u.size===0?ad.delete(e):ad.set(e,u),_j()}function gU(e){return x.useSyncExternalStore(Sj,()=>e===null?ly:Fr(e),()=>ly)}function bU(e){return x.useSyncExternalStore(Sj,()=>e===null?rd:ad.get(e)??rd,()=>rd)}function vU(e,t,a){const r=e.get(t);if(r===void 0)return!1;const s=Kr(a).at(-1)??a;return r.includes(a)||r.includes(s)}function xU(e,t,a){return e.flatMap(({inFlight:r})=>{if(a.has(r.id))return[];const s=Kr(r.list),c=t.find(u=>s.includes(u));return c===void 0?[]:[{...r,list:c}]})}const Ej="local-",jj=()=>`${Ej}${Math.random().toString(36).slice(2,10)}`,wU=e=>e.startsWith(Ej);function Ek(e,t){return e instanceof Error&&"problem"in e&&e.message!==""?e.message:t}function kU(e,t){const a=_z(t);return{inFlight:{id:jj(),list:e,kind:g_(t.type),name:t.name,bytes:t.size,mime:t.type,url:null,addedAt:Date.now(),preview:a.ok&&t.type.startsWith("image/")?URL.createObjectURL(t):null,send:a.ok?{state:"uploading",progress:0}:{state:"failed",error:a.message}},baggage:{file:t}}}function Ml(e,t,a){cy(e,t,r=>({...r,inFlight:{...r.inFlight,send:a}}))}function _U(e,t,a){const{postListUploadWithProgress:r,postListLink:s,withdrawListItem:c,holdListItem:u}=e,m=A=>ay(t,e,A),p=async(A,O,T)=>{Sk(A,T,O,!0);try{await c(A,O,T)}catch(R){throw Sk(A,T,O,!1),m(A),R}m(A)},y=async(A,O,T,R)=>{if(wk.delete(O)){ip(O,"Removed while sending"),p(A,R,T).catch(()=>{});return}cy(A,O,B=>({...B,inFlight:{...B.inFlight,id:T,send:{state:"saving"}}})),await m(A),_k(A,[T]),yU(O,T)},v=async(A,O,T,R,B)=>{let D;try{D=(await r(A,T,R,P=>Ml(A,O,{state:"uploading",progress:P}),{attempt:B,onAttempt:P=>cy(A,O,le=>({...le,baggage:{...le.baggage,attempt:P??void 0}}))})).id}catch(L){console.error("media.upload.failed",{itemId:O,propertyId:A,into:T,name:R.name,size:R.size,mime:R.type,error:L});const P=Ek(L,"Upload failed");Ml(A,O,{state:"failed",error:P}),ip(O,P);return}await y(A,O,D,T)},g=async(A,O,T,R,B)=>{let D;try{D=(await s(A,T,R,B)).id}catch(L){console.error("media.link.create_failed",{itemId:O,propertyId:A,into:T,url:R,error:L});const P=Ek(L,"Couldn’t add link");Ml(A,O,{state:"failed",error:P}),ip(O,P);return}await y(A,O,D,T)},w=(A,O,T)=>{if(a===null)return;const R=A.filter(Boolean).map(D=>kU(O,D));kk(a,R);for(const D of R){if(T===void 0)continue;const{send:L}=D.inFlight;L.state==="failed"?T.onFailed(L.error):ps.set(D.inFlight.id,T)}const B=R.filter(D=>D.inFlight.send.state==="uploading");lz(B,kz,async D=>{D.baggage.file&&await v(a,D.inFlight.id,O,D.baggage.file)})},k=(A,O,T)=>{if(a===null)return;const R=/^https?:\/\//i.test(A)?A:`https://${A}`,B=crypto.randomUUID(),D={inFlight:{id:jj(),list:O,kind:zE(R),name:yz(R),bytes:null,mime:null,url:R,addedAt:Date.now(),preview:null,send:{state:"saving"}},baggage:{link:{url:R,idempotencyKey:B}}};kk(a,[D]),T!==void 0&&ps.set(D.inFlight.id,T),g(a,D.inFlight.id,O,R,B)},E=A=>{if(a===null)return!1;const O=Fr(a).find(T=>T.inFlight.id===A);return O!==void 0&&O.inFlight.send.state==="failed"&&(O.baggage.file!==void 0||O.baggage.link!==void 0)},S=A=>{if(a===null)return;const O=Fr(a).find(R=>R.inFlight.id===A);if(O===void 0)return;const T=O.inFlight.list;if(O.baggage.link){const{url:R,idempotencyKey:B}=O.baggage.link;Ml(a,A,{state:"saving"}),g(a,A,T,R,B);return}if(O.baggage.file){const R=Sz({attempt:O.baggage.attempt});Ml(a,A,{state:"uploading",progress:0}),v(a,A,T,O.baggage.file,R.kind==="resume"?R.attempt:void 0)}},j=async(A,O)=>{if(a===null)return 0;const T=new Set(A);for(const D of Fr(a))T.has(D.inFlight.id)&&D.inFlight.send.state==="uploading"&&wk.add(D.inFlight.id);_k(a,A);const R=A.filter(D=>!wU(D));return(await Promise.allSettled(R.map(D=>p(a,O,D)))).filter(D=>D.status==="rejected").length},C=u===void 0||a===null?void 0:async(A,O)=>{await u(a,O,A),await m(a)};return{addFiles:w,addLink:k,canRetry:E,retry:S,remove:j,...C!==void 0?{hold:C}:{}}}function SU(e){const t=Ug(),a=Qd();return x.useMemo(()=>_U(t,a,e),[t,a,e])}function EU(e,t,a,r){const s=Fl(t),c=e===void 0?[]:s4(e,s).filter(({id:p,list:y})=>!vU(r,p,y)),u=c.map(({value:p,file:y,list:v})=>({asset:Hy(y,p),list:v}));return[...xU(a,s.from,new Set(c.map(({id:p})=>p))),...u]}function jU(e,t,a,r){const s=gU(e),c=bU(e),u=SU(e),m=x.useMemo(()=>EU(a,t,s,c),[a,t,s,c]),p=r??O_(t),y=x.useCallback(E=>u.addFiles(E,p),[u,p]),v=x.useCallback(E=>u.addLink(E,p),[u,p]),g=x.useCallback(async E=>{const S=new Map;for(const C of m){const A=LE(C);E.includes(A)&&S.set(C.list,[...S.get(C.list)??[],A])}return(await Promise.all([...S].map(([C,A])=>u.remove(A,C)))).reduce((C,A)=>C+A,0)},[m,u]),{hold:w}=u,k=x.useMemo(()=>w===void 0||r===void 0?void 0:E=>w(E,r),[w,r]);return{items:m,sent:s,deleting:c,addFiles:y,addLink:v,remove:g,canRetry:u.canRetry,retry:u.retry,...k!==void 0?{land:k}:{}}}function _c(e){const{MediaPicker:t}=lb();return d.jsx(t,{...e})}function OU(e){return new Set(e.flatMap(t=>{if(On(t))return[];const{asset:a}=t;return a.state!=="ready"||a.kind==="tour"&&!RE(a)?[a.id]:[]}))}const jk=ie("m-0 py-1 text-caption text-ink-3",Xg);function AU({useHost:e,filter:t,propertyId:a,...r}){var K;const{onClose:s}=r,c=x.useMemo(()=>pU(Fl(t).from),[t]),u=x.useMemo(()=>c.map(({lists:Q})=>Q),[c]),m=x.useMemo(()=>({kinds:t.kinds,from:[...Fl(t).from,...u.slice(1).flat()]}),[t,u]),p=e(a,m,O_(t)),{land:y}=p,v=x.useMemo(()=>new Map(u.flatMap((Q,se)=>Q.map(N=>[N,se]))),[u]),[g,w]=x.useState(()=>new Set),k=x.useRef(null),E=x.useMemo(()=>{if(p.loading)return p.items;const Q=new Map;for(const te of p.items){if(On(te)||g.has(te.asset.id))continue;const me=Q.get(te.asset.id);(me===void 0||(v.get(te.list)??0)<(v.get(me.list)??0))&&Q.set(te.asset.id,te)}const se=[...Q.values()],N=k.current??(k.current=new Map(se.map((te,me)=>[te.asset.id,{tier:v.get(te.list)??0,rank:me}])));for(const te of se)N.has(te.asset.id)||N.set(te.asset.id,{tier:v.get(te.list)??0,rank:-N.size});const V=te=>N.get(te.asset.id)??{tier:0,rank:0};return[...p.items.filter(On),...se.map(te=>({...te,tier:V(te).tier})).sort((te,me)=>V(te).rank-V(me).rank)]},[p.items,p.loading,v,g]),{remove:S}=p,j=x.useMemo(()=>({...p,items:E,remove:async se=>{const N=se.filter(te=>E.some(me=>!On(me)&&me.asset.id===te&&(v.get(me.list)??0)===0)),V=await S(se);return V===0&&N.length>0&&w(te=>new Set([...te,...N])),V}}),[p,E,S,v]),C=x.useMemo(()=>OU(E),[E]),A=x.useMemo(()=>new Set(E.flatMap(Q=>!On(Q)&&(v.get(Q.list)??0)>0?[Q.asset.id]:[])),[E,v]),[O,T]=x.useState("idle"),[R,B]=x.useState(0),D=x.useRef(Promise.resolve()),L=x.useRef(0),P=x.useRef(new Set);if(t.kinds.length===0)return null;const le=(Q,se)=>{const N=y===void 0?[]:Q.filter(V=>A.has(V)&&!P.current.has(V));if(N.length===0&&L.current===0){se();return}L.current+=1,D.current=D.current.then(async()=>{try{if(y===void 0||N.length===0){se();return}T("landing");try{for(const V of N)await y(V),P.current.add(V)}catch{T("failed"),B(V=>V+1);return}T("idle"),se()}finally{L.current-=1}})},ee=r.mode==="single"?{mode:"single",selectedId:r.currentId??null,disabledIds:C,onPick:Q=>le([Q.id],()=>r.onPick(Q))}:{mode:"multi",selectedIds:r.selectedIds.filter(Boolean),disabledIds:C,onChange:Q=>{const se=r.selectedIds;le(Q.filter(({id:N})=>!se.includes(N)).map(({id:N})=>N),()=>r.onChange(Q))}},de=((K=c[0])==null?void 0:K.label)??"";return d.jsx(W7,{onClose:s,title:de,notice:O==="landing"?d.jsxs("p",{role:"status",className:jk,children:["Adding to ",de,"…"]}):O==="failed"?d.jsxs("p",{role:"alert",className:ie(jk,"text-danger"),children:["Couldn't add it to ",de,". Try again."]}):null,children:d.jsx(mU,{filter:t,selection:ee,host:j,...y!==void 0?{tiers:u}:{}},R)})}function NU(e){return function(a,r,s){const c=of(a),u=jU(a,r,c,s),{items:m}=u,p=x.useCallback(y=>{const v=m.find(w=>!On(w)&&w.asset.id===y),g=v===void 0||On(v)?null:v.asset.file_url;return g&&window.open(g,"_blank","noopener"),Promise.resolve()},[m]);return{items:m,loading:c===void 0,capabilities:e,preparing:!1,scope:a,addFiles:u.addFiles,addLink:u.addLink,remove:u.remove,rename:()=>Promise.resolve(),canRetry:u.canRetry,retry:u.retry,recheck:()=>Promise.resolve(),download:p,holders:()=>Promise.resolve([]),...u.land!==void 0?{land:u.land}:{}}}}function MU({capabilities:e,...t}){const{upload:a,manage:r}=e,s=x.useMemo(()=>NU({upload:a,manage:r}),[a,r]);return d.jsx(AU,{...t,useHost:s})}const cf=ie(vt,"grid h-full w-[calc(36*var(--content))] cursor-pointer place-items-center rounded-[calc(6*var(--content))] text-ink-4","transition-[color,background-color] duration-[120ms] group-hover/row:text-ink-3 hover:bg-[rgba(20,18,13,.06)] hover:text-ink-2","focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ink"),ub="hover:bg-[#fbe6e2] hover:text-danger",CU="size-[calc(13*var(--content))]",RU="we-no-drag h-[calc(36*var(--content))] shrink-0",Oj="flex shrink-0 items-center";function uf({icon:e,label:t,title:a,tone:r="neutral",onClick:s}){return d.jsx("button",{type:"button",className:ie(cf,RU,r==="remove"&&ub),"aria-label":t,title:a,onClick:s,children:Ha.createElement(e,{className:CU})})}const TU={card:"rounded-2xl",compact:"rounded-xl"},DU={card:{bar:"flex h-14 min-w-0 items-center gap-3 pl-4 pr-2.5",name:"min-w-0 flex-1 truncate text-[length:calc(15*var(--content))] font-medium text-ink",mark:"h-6 w-6",button:"h-9 w-9",glyph:16},compact:{bar:"flex h-10 min-w-0 items-center gap-2 pl-3 pr-1.5",name:"min-w-0 flex-1 truncate text-[length:calc(13.5*var(--content))] font-medium text-ink",mark:"h-5 w-5",button:"h-8 w-8",glyph:15}},LU="text-ink-3",zU={card:"mx-2 rounded-xl",compact:"mx-1.5 rounded-lg"},$U=ie("flex aspect-[16/11] flex-col items-center justify-center gap-2 border-[1.5px] border-dashed border-line bg-canvas px-3 py-4 text-center","transition-[border-color,background-color] duration-[120ms]",mE),UU="border-honey-2 bg-honey-soft";function Ok({kind:e,name:t,empty:a,scale:r,actions:s,attention:c,drop:u,children:m}){const p=Ds(),y=qr[r],v=DU[r],{plain:g,foot:w}=oj(s),k=(u==null?void 0:u.over)??!1;return d.jsxs("div",{"data-media-slot-card":"",className:ie("relative flex flex-col border border-transparent bg-[#f3f2ed] transition-[background-color,box-shadow] duration-[140ms]",TU[r],Ms,k&&!a&&"ring-2 ring-honey-2"),...Cs(c,p),...u==null?void 0:u.handlers,"data-media-drop":u?"":void 0,children:[d.jsxs("div",{className:v.bar,children:[d.jsx("span",{className:ie("grid shrink-0 place-items-center",v.mark),children:d.jsx(Zr,{kind:e,size:r==="compact"?"mark":"lead"})}),d.jsx("span",{className:ie(v.name,a&&"font-normal text-ink-4"),title:t,children:t}),s.length>0&&d.jsx("span",{className:"we-no-drag flex shrink-0 items-center gap-0.5",children:[...g,...w].map(E=>d.jsx("button",{type:"button",className:ie(cf,LU,v.button,E.danger&&ub),"aria-label":E.label,title:E.label,onClick:E.onSelect,children:d.jsx(it,{name:E.glyph,size:v.glyph})},E.label))})]}),a?d.jsx("div",{className:ie($U,zU[r],k&&UU),"data-thumb":"",children:m}):d.jsx("div",{className:y.thumb,"data-thumb":"","data-media-tile":e,children:m}),d.jsx("div",{className:r==="compact"?"h-1.5":"h-2"})]})}function uy(e){var t;return e===void 0?"Link":((t=Ja[e])==null?void 0:t.label)??"Link"}function IU(e){return e.kind==="tour"?uy(e.provider):e.kind!=="video"?"":e.videoSource==="link"?uy(e.provider):e.ready===!1?"Processing…":wz(e.durationMs)||"Video"}function BU({kind:e,size:t}){return e==="tour"?d.jsx(Rt.tour,{size:t}):d.jsx(Rt.play,{size:t})}const HU="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",qU={doc:Zd,spreadsheet:lE,presentation:Ng,image:Wd,video:Rg};function FU({glyph:e,extension:t,size:a=16,className:r}){const s=qU[e];return d.jsxs(d.Fragment,{children:[d.jsx(s,{size:a,strokeWidth:1.5,className:r,style:{width:`calc(${a} * var(--content))`,height:`calc(${a} * var(--content))`}}),t&&d.jsx("span",{className:HU,children:t})]})}const PU=new Set(["image","video","tour","document","media"]);function VU(e){return Ka(e).length>0}function Aj(e,t){const a=og(e,t);return a!==null?!PU.has(a.value_type)||a.filter!==void 0?null:{holder:"home",table:a.table,field:(Ya(a.table)?T4(a.table,a.member):null)??a.member,row:a.row}:!VU(e)||typeof e.from=="string"||e.source!==void 0&&e.source.kind!=="authored"?null:{holder:"section"}}function Nj(){return`tmp_${globalThis.crypto.randomUUID()}`}function df(e){return typeof e=="string"&&e.startsWith("tmp_")}function GU(e,t=!0){var s,c,u;const a=F8();return((u=(c=(s=yc({queryKey:["property",e],queryFn:()=>a.fetchProperty(e),enabled:t}).data)==null?void 0:s.contacts)==null?void 0:c[0])==null?void 0:u.library_item_id)??null}function KU(e,t,a,r){const s=Ya(a.table)&&ta[a.table].ownership==="library"?{home:"library"}:{home:"property",propertyId:t},c=`${a.table}.${r}.${a.field}`;return{place:`${s.home}:${c}`,take:u=>e.stageOwnedAsset(s,c,u),presign:u=>e.ownedAssetUrl(s,c,u),discard:u=>e.discardStagedAsset(s,c,u)}}function Mj(e,t,a){return{place:`content:${a.deliverableId}:${a.instanceId}:${a.slotId}`,take:r=>e.uploadContentAsset(t,a,r),presign:r=>e.contentAssetUrl(t,a,r),discard:null}}function YU(e,t,a){if(e.row!=="primary")return t?t.itemId:a??null}function Cj({props:e,table:t,ownerSlot:a,assetId:r,inLibrary:s}){const{slot:c,propertyId:u,instanceId:m,recordContext:p,boundRowId:y,onUpload:v}=e,{api:g,useEditorStore:w}=Yt(),k=w(L=>L.session.deliverable_id),E=v===void 0?Aj(a??c,t):null,S=(E==null?void 0:E.holder)==="home"?E:null,j=S===null?null:YU(S,p,y),C=df(j),A=GU(u,(S==null?void 0:S.table)==="contacts"&&j===void 0),O=S===null||C?null:j!==void 0?j:S.table==="contacts"?A:null;let T=null;S!==null&&O!==null&&(T=KU(g,u,S,O)),((E==null?void 0:E.holder)==="section"||C)&&k!==void 0&&(T=Mj(g,u,{deliverableId:k,instanceId:m,slotId:Rj(e)}));const R=yc({queryKey:["owned-media-url",T==null?void 0:T.place,r],queryFn:()=>T.presign(r),enabled:T!==null&&r!==""&&!s,retry:!1}),B=x.useRef(null);return{upload:T===null?null:async L=>{const P=await T.take(L),le=B.current;return B.current=P.asset_id,T.discard!==null&&le!==null&&le!==P.asset_id&&T.discard(le).catch(()=>{}),Tj(P,L)},previewUrl:R.data}}function Rj(e){var a;const t=(a=e.recordContext)==null?void 0:a.fieldKey;return t?`${e.slotId}.${t}`:e.slotId}function Tj(e,t){const a=e.provider??("link"in t?fc(e.url)??void 0:void 0);return a===void 0?e:{...e,provider:a}}function db(e,t){var u;const{api:a,useEditorStore:r}=Yt(),s=r(m=>m.session.deliverable_id);if(s===void 0||((u=Aj(e))==null?void 0:u.holder)!=="section")return null;const c=Mj(a,t.propertyId,{deliverableId:s,instanceId:t.instanceId,slotId:t.slotId});return async m=>Tj(await c.take(m),m)}function Il(e,t){return e===void 0||e===""||t===""?null:{holder:e,mediaId:t}}function Dj(e,t){const{capabilities:a}=lb(),r=a.framingCrop!==!1,s=!r&&t==="image",c=x.useRef(new Map),u=yj(s?e:"",m=>{const p=c.current.get(Yr(m));p!==void 0&&mg.getState().notice(p,"failed")});return{framing:r&&t==="image",offers:m=>r?t==="image":s&&m!==null&&u.offers(m),recrop:(m,p)=>{c.current.set(Yr(m),p),u.open(m)},recropping:m=>s&&m!==null&&u.recropping(m),modal:u.modal}}function Lj(e,t,a,r){const s=t.asset_id===""?void 0:e.get(t.asset_id),u=((s==null?void 0:s.kind)==="image"?s.file_url??"":"")||r||t.url;if(t.rect)return{src:u,seed:t.rect,inherited:!1};const m=(s==null?void 0:s.kind)==="image"&&a!=="locked"?s.crop:null;return m===null||!Hd(m)?{src:u,seed:null,inherited:!1}:{src:u,seed:{nx:m.x,ny:m.y,nw:m.width,nh:m.height},inherited:!0}}function zj(e,t){if(!e.inherited||e.seed===null)return!1;const a=s=>Math.round(s*1e4)/1e4,{seed:r}=e;return a(t.nx)===a(r.nx)&&a(t.ny)===a(r.ny)&&a(t.nw)===a(r.nw)&&a(t.nh)===a(r.nh)}function $j(e,t){var r;if(lg(t.rect)){if(!e.rect&&!e.mobile)return null;const s=e.renditions?{renditions:{...e.renditions,crop:null}}:{};return{...e,rect:null,ar:null,mobile:null,...s}}const a=(r=e.mobile)!=null&&r.renditions?{renditions:e.mobile.renditions}:{};return{...e,rect:t.rect,ar:t.ar,mobile:t.mobile?{rect:t.mobile.rect,derived:t.mobile.derived,...a}:e.mobile??null}}function QU(e,t){return e.rect?!lg(e.rect):(t==null?void 0:t.mode)!=="locked"?!1:typeof e.ar!="number"||vS(e.ar,t.aspect)!==null}function dy(e,t){var s,c,u,m;if(!QU(e,t))return null;const a=(c=(s=e.renditions)==null?void 0:s.cutout)==null?void 0:c.key;if(typeof a=="string"&&a.startsWith(`processed/cutout/${e.asset_id}/`))return a;const r=(m=(u=e.renditions)==null?void 0:u.crop)==null?void 0:m.key;return typeof r=="string"&&r.startsWith(`processed/crops/${e.asset_id}/`)?r:null}function XU({value:e,onChange:t,propertyId:a,cropCfg:r}){const{api:s}=Yt(),c=Rs(a),[u,m]=x.useState(!1),p=dy(e,r),y=tE(a,[p],s.getCropDerivativeUrl),v=p?y.get(p):void 0,g=w=>{var E;if(!u)return null;const k=Lj(c,e,r.mode,w);return k.src?d.jsx(hg,{chrome:eb,src:k.src,mode:r.mode,aspect:r.aspect,aspectLabel:r.aspectLabel,mobileAspect:r.mobileAspect,seed:{rect:k.seed},mobileSeed:{rect:((E=e.mobile)==null?void 0:E.rect)??null},onClose:()=>m(!1),onApply:S=>{if(m(!1),!e.asset_id||!S.mobile&&zj(k,S.rect))return;const j=$j(e,S);j!==null&&t(j)}}):null};return{cropCfg:r,ar:e.ar??null,cut:p,derivativeUrl:v,open:()=>m(!0),modal:g}}function fb({propertyId:e,children:t}){return d.jsx(d.Fragment,{children:t(of(e))})}function hb(e,t){const a=Rs(t).get(e);return a===void 0?void 0:TE(a)}function ZU(e){return e==null||e===""?void 0:e}function Ak(e){return{asset_id:e.asset_id,url:e.url,alt:e.alt}}const WU={noun:"image",takes:kc(["image"]),assetIdOf:e=>e.asset_id,fromPicked:(e,t)=>e.id===t.asset_id?{...t,url:ms(e)}:{...Ak(t),asset_id:e.id,url:ms(e),alt:t.alt,picked:e.id},fromUploaded:(e,t)=>({...Ak(t),asset_id:e.asset_id,url:e.url,picked:null}),cleared:{asset_id:"",url:"",alt:""},usePreview:function(t,a){const r=hb(t.asset_id,a);return{src:(r==null?void 0:r.src)||t.url,name:ZU(t.name)??(r==null?void 0:r.name)}}},JU={noun:"video",takes:kc(["video"]),assetIdOf:e=>e.asset_id,fromPicked:(e,t)=>({...t,asset_id:e.id,url:"",poster:ms(e),source:e.url!==null?"link":void 0,provider:e.url!==null?e.provider??void 0:void 0,picked:e.id}),fromUploaded:(e,t)=>({...t,asset_id:e.asset_id,url:"",poster:e.poster??"",source:e.provider!==void 0?"link":void 0,provider:e.provider,picked:null}),cleared:{asset_id:"",url:"",poster:"",alt:""},usePreview:function(t,a){const r=hb(t.asset_id,a);return{src:(r==null?void 0:r.src)||t.poster,name:r==null?void 0:r.name,detail:r?IU(r):void 0}}},e9={noun:"tour",takes:kc(["tour"]),assetIdOf:e=>e.asset_id,fromPicked:(e,t)=>({...t,asset_id:e.id,url:"",poster:ms(e),provider:e.provider??void 0,picked:e.id}),fromUploaded:(e,t)=>({...t,asset_id:e.asset_id,url:"",poster:e.poster??"",provider:e.provider,picked:null}),cleared:{asset_id:"",url:"",poster:"",alt:""},usePreview:function(t,a){const r=hb(t.asset_id,a);return{src:(r==null?void 0:r.src)||t.poster,name:r==null?void 0:r.name,detail:t.asset_id?uy((r==null?void 0:r.provider)??t.provider):void 0}}},t9={noun:"document",takes:kc(["document"]),assetIdOf:e=>(e==null?void 0:e.asset_id)??"",fromPicked:e=>({asset_id:e.id,picked:e.id}),fromUploaded:e=>({asset_id:e.asset_id,picked:null}),cleared:null,usePreview:function(t,a){const r=$$(a),s=(t==null?void 0:t.asset_id)??"";if(!s)return{src:""};const c=r(s);return c?{src:c.src,name:c.name,detail:z$(c),attachment:XE(c)}:{src:"",name:"Document unavailable"}}},n9={image:WU,video:JU,tour:e9,document:t9};function Hn(e){return n9[e]}function ys(e){return e.recordContext?e.recordContext.table??null:e.boundRowTable??null}const i9="text-[length:calc(11.5*var(--content))] text-ink-3",a9=ie(vt,"inline-flex items-center gap-1.5 rounded-full bg-accent px-3 py-1.5 text-[length:calc(12*var(--content))] font-semibold text-white transition-[background] duration-[120ms] hover:bg-accent-ink"),r9="flex w-full max-w-90 items-center gap-1.5",o9="min-w-0 flex-1 rounded-lg border border-line bg-white px-2.5 py-1.75 text-[length:calc(12.5*var(--content))] text-ink outline-none placeholder:text-ink-4 focus:border-ink",s9=ie(vt,"relative ml-[calc(10*var(--content))] grid aspect-square h-full shrink-0 cursor-pointer place-items-center overflow-hidden rounded-[calc(6*var(--content))] border border-line bg-[#e6e3da] text-ink-3","transition-[border-color,color] duration-[120ms] hover:border-ink-4 disabled:cursor-default disabled:hover:border-line","data-[empty]:border-dashed data-[empty]:not-data-[attention]:bg-transparent hover:data-[empty]:text-ink-2","focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ink",Ms);function Nk(e){return e.kind==="image"?d.jsx(l9,{...e}):d.jsx(Uj,{...e})}function Uj(e){const t=Hn(e.kind),a=Cj({props:e.props,table:ys(e.props),assetId:t.assetIdOf(e.props.value),inLibrary:!0});return d.jsx(qj,{...e,extras:{crop:null,pick:null,ownerUpload:a.upload,ownerPreview:void 0}})}function Ij(e){const{slot:t,value:a,onChange:r,propertyId:s,factPath:c}=e,u=XU({value:a,onChange:r,propertyId:s,cropCfg:sg(t)}),m=lb().capabilities.framingCrop===!1,p=yj(m?s:"");if(!m)return{...u,offered:!0,recropping:!1};const y=Il(c,a.asset_id);return{...u,cut:null,derivativeUrl:void 0,open:()=>{y!==null&&p.open(y)},modal:()=>p.modal,offered:y!==null&&p.offers(y),recropping:y!==null&&p.recropping(y)}}function l9(e){const t=Ij(e.props),a=Rs(e.props.propertyId),r=e.props.value.asset_id,s=(u,m,p)=>{e.props.onChange(tb(u,e.props.value,m,t.cropCfg,p))},c=Cj({props:e.props,table:ys(e.props),assetId:r,inLibrary:r!==""&&a.has(r)});return d.jsx(qj,{...e,extras:{crop:t,pick:s,ownerUpload:c.upload,ownerPreview:c.previewUrl}})}function Bj(e){return e.kind==="image"?d.jsx(c9,{...e}):d.jsx(Hj,{...e,crop:null})}function c9(e){return d.jsx(Hj,{...e,crop:Ij(e.props)})}function Hj({kind:e,model:t,props:a,onOpen:r,crop:s}){const{slot:c,value:u,propertyId:m,required:p}=a,y=Hn(e),v=y.usePreview(u,m),g=Yd(c,ys(a)),w=lf(c,{table:ys(a)}),k=Vg(a.factPath,y.assetIdOf(u));return d.jsx(f9,{kind:e,offer:g.kind,noun:y.noun,label:c.label,emptyName:w===null?c.label:xj(w).label,preview:v,empty:t.isEmpty(u),crop:s,processing:k,attention:rr(t,c,u,p??!1),onOpen:r})}function qj({kind:e,face:t,model:a,props:r,extras:s,open:c}){var oe,ke;const{slot:u,value:m,onChange:p,propertyId:y,onUpload:v,required:g}=r,{crop:w,pick:k,ownerUpload:E,ownerPreview:S}=s,j=Hn(e),C=j.usePreview(m,y),A=S?{...C,src:S}:C,O=v!==void 0?{kind:"owned"}:Yd(u,ys(r)),T=a.isEmpty(m),R=rr(a,u,m,g??!1),B=Vg(r.factPath,j.assetIdOf(m))||((w==null?void 0:w.recropping)??!1),[D,L]=x.useState(!1),P=v??E??void 0,le=u9(P,(z,ce)=>c?c.onUploaded(z,ce):p(j.fromUploaded(z,m))),ee=x.useRef(null),de=c?c.accept:rb[e]??void 0,K=c&&T?c.noun:j.noun,Q=((ke=(oe=lf(u,{table:ys(r)}))==null?void 0:oe.choose)==null?void 0:ke.label)??Wl("Choose",K),se=(c==null?void 0:c.takes)??j.takes,N=O.kind==="owned"&&P!==void 0,V=(z,ce)=>{c?c.onPicked(z):k?k(z,ce,O.kind==="picked"?O.filter.from:void 0):p(j.fromPicked(z,m))},te=le,me=N&&se.includes("file"),Y=N&&se.includes("link"),M=Wl("Upload",K),H=VE({accept:me?de??"":null,onFiles:([z])=>{z&&te.takeFile(z)},...Y?{onLink:te.takeLink,...c?{}:{linkKinds:[e]}}:{},disabled:te.busy},M,ee,!1),I=me||Y,F=O.kind==="picked"?[{label:Q,glyph:"choose",run:()=>L(!0)}]:I?[{label:M,glyph:"upload",run:H.start}]:[],W=w!=null&&w.offered&&!T&&A.src?w.open:null,pe=T?null:()=>p(j.cleared);return d.jsxs("div",{ref:ee,className:"flex min-w-0 flex-col gap-1",role:"group","aria-label":u.label,"data-media-face":t,"data-media-kind":e,"data-media-offer":O.kind,children:[d.jsx(d9,{scale:t==="expanded"?"card":"compact",kind:e,noun:K,label:u.label,preview:A,empty:T,crop:w,sources:F,onCrop:W,onRemove:pe,drop:me?te.takeFile:null,link:Y?te.takeLink:null,busy:te.busy,processing:B,attention:R}),te.error&&d.jsx("p",{className:Ns,children:te.error}),H.node,D&&O.kind==="picked"&&d.jsx(fb,{propertyId:y,children:z=>d.jsx(_c,{mode:"single",propertyId:y,filter:O.filter,currentId:j.assetIdOf(m)||void 0,onClose:()=>L(!1),onPick:ce=>V(ce,z)})}),w==null?void 0:w.modal(S)]})}function u9(e,t){const[a,r]=x.useState(!1),[s,c]=x.useState(null),u=m=>{e&&(r(!0),c(null),e(m).then(p=>t(p,m)).catch(p=>{console.error("[editor] media upload failed",p),c("Upload failed. Try again.")}).finally(()=>r(!1)))};return{busy:a,error:s,takeFile:m=>u({file:m}),takeLink:m=>u({link:m})}}function Fj({kind:e,preview:t,size:a}){var r,s;return e==="document"?d.jsx(FU,{glyph:((r=t.attachment)==null?void 0:r.glyph)??"doc",extension:((s=t.attachment)==null?void 0:s.extension)??"",size:a}):e==="video"||e==="tour"?d.jsx(BU,{kind:e,size:a}):d.jsx(Rt.up,{})}function d9({scale:e,kind:t,noun:a,label:r,preview:s,empty:c,crop:u,sources:m,onCrop:p,onRemove:y,drop:v,link:g,busy:w,processing:k,attention:E}){const[S,j]=x.useState(!1),[C,A]=x.useState(""),O=Yg(u,s.src),T=v?{over:S,handlers:{onDragOver:B=>{B.preventDefault(),j(!0)},onDragLeave:B=>{B.currentTarget.contains(B.relatedTarget)||j(!1)},onDrop:B=>{var L;B.preventDefault(),j(!1);const D=(L=B.dataTransfer.files)==null?void 0:L[0];D&&v(D)}}}:null,R=[];if(p&&R.push({label:"Crop",glyph:"crop",onSelect:p}),!w)for(const B of m)R.push({label:B.label,glyph:B.glyph,onSelect:B.run,foot:!0});return y&&R.push({label:"Remove",glyph:"trash",onSelect:y,danger:!0}),c?d.jsxs(Ok,{kind:t,name:`No ${a}`,empty:!0,scale:e,actions:R,attention:E,drop:T,children:[d.jsx("span",{className:"text-ink-4",children:d.jsx(Fj,{kind:t,preview:s,size:24})}),(w||v)&&d.jsx("span",{className:i9,children:w?"Uploading…":S?`Drop to add this ${a}`:"Drop a file here"}),g&&d.jsxs("form",{className:r9,onSubmit:B=>{B.preventDefault(),C.trim()&&g(C.trim()),A("")},children:[d.jsx("input",{className:o9,value:C,onChange:B=>A(B.target.value),placeholder:`Paste a ${a} link`,"aria-label":`${r} link`}),d.jsxs("button",{type:"submit",className:a9,disabled:w||!C.trim(),children:[d.jsx(Rt.link,{})," Add"]})]})]}):d.jsx(Ok,{kind:t,name:s.name??`Untitled ${a}`,empty:!1,scale:e,actions:R,attention:E,drop:T,children:d.jsx(Pj,{kind:t,src:O,preview:s,dimmed:w||k,children:w?d.jsx(pg,{label:"Uploading…"}):k&&d.jsx(mb,{})})})}function mb(){return d.jsx(pg,{label:"Processing…"})}function f9({kind:e,offer:t,noun:a,label:r,emptyName:s,preview:c,empty:u,crop:m,processing:p,attention:y,onOpen:v}){const g=Ds(),w=Yg(m,c.src),k=e==="image"?null:c.name??(u?null:`Untitled ${a}`),E=w?d.jsx("img",{className:"absolute inset-0 size-full object-cover object-top",src:w,alt:"",draggable:!1,style:p?zS:void 0}):u?d.jsx(Rt.plus,{}):d.jsx(Fj,{kind:e,preview:c,size:16});return d.jsxs("button",{type:"button",className:s9,"data-media-summary":"","data-media-kind":e,"data-media-offer":t,"data-empty":u?"":void 0,...Cs(y,g),"aria-label":u?s:`${r}: ${k??a}`,disabled:v===void 0,onClick:v,children:[E,p&&d.jsx(mb,{})]})}const h9="block size-full object-cover object-top",m9="flex size-full items-center justify-center bg-canvas",p9="pointer-events-none absolute bottom-1.5 left-1.5 z-[3] max-w-[80%] truncate rounded-full bg-[rgba(15,18,9,0.72)] px-1.5 py-0.5 text-[length:calc(10.5*var(--content))] font-semibold tabular-nums text-white",y9="pointer-events-none absolute inset-0 m-auto flex h-9 w-9 items-center justify-center rounded-full border-[1.5px] border-white/85 bg-[rgba(10,12,10,0.55)] pl-0.5 text-white backdrop-blur-[2px]";function Pj({kind:e,src:t,preview:a,dimmed:r,children:s}){return d.jsxs(d.Fragment,{children:[t?d.jsx("img",{className:h9,src:t,alt:"",draggable:!1,style:r?zS:void 0}):d.jsx("span",{className:m9,children:d.jsx(Zr,{kind:e,size:"logo",decorative:!0,...e==="document"&&a.attachment?{glyph:a.attachment.glyph}:{}})}),e==="video"&&t&&d.jsx("span",{className:y9,children:d.jsx(it,{name:"play",size:14})}),s,a.detail&&d.jsx("span",{className:p9,children:a.detail})]})}function pb({kind:e,value:t,propertyId:a,frame:r,holderPath:s}){const c=Hn(e),u=c.usePreview(t,a),m=Vg(s,c.assetIdOf(t)),{chrome:p,crop:y,beneath:v}=r,g=Yg(y,u.src),w=(y==null?void 0:y.cropping)??!1,k=u.name??(c.assetIdOf(t)?`Untitled ${c.noun}`:`No ${c.noun}`);return d.jsx(f7,{kind:e,name:k,chrome:p,thumb:d.jsx(Pj,{kind:e,src:g,preview:u,dimmed:w||m,children:w?d.jsx(pg,{}):m&&d.jsx(mb,{})}),below:y&&d.jsx(T$,{storeKey:y.storeKey}),beneath:v})}function ff(e,t){function a(s){return d.jsx(Nk,{kind:e,face:"expanded",model:t.model,props:s})}a.displayName=`MediaExpandedFace(${e})`;function r(s){return d.jsx(Nk,{kind:e,face:"compact",model:t.model,props:s})}return r.displayName=`MediaCompactFace(${e})`,{model:t.model,faces:{expanded:a,compact:r},applyOptimistic:t.applyOptimistic}}function g9(e,t){const a=Rs(t).get(e);return a===void 0?null:a.kind}function yb(e,t,a){const r=g9((e==null?void 0:e.kind)===void 0?(e==null?void 0:e.asset_id)??"":"",a);return(e==null?void 0:e.kind)??r??t[0]??"image"}function hf(e,t){return t===null||Hn(e).assetIdOf(t)===""?null:{...t,kind:e}}function Mk(e,t,a,r){const s=Hn(e),c=t===e?a:s.cleared;return hf(e,r(s,c))}function b9(e){const t=e.map(a=>rb[a]).filter(a=>a!==null);return{takes:kc(e),accept:t.length>0?t.join(","):void 0}}function od(e){return"file"in e?g_(e.file.type):b_(e.link)}function v9(e){const{kind:t}=e;return hf(t,Hn(t).fromPicked(e,Hn(t).cleared))}function x9(e,t,a,r){return{noun:e.length===1?Hn(t).noun:"media",...b9(e),onPicked:s=>r(Mk(s.kind,t,a,(c,u)=>c.fromPicked(s,u))),onUploaded:(s,c)=>{const u=od(c);if(u===null||!e.includes(u))throw new Error(`a ${u??"file of no media kind"} is not among this field's ${e.join(", ")}`);r(Mk(u,t,a,(m,p)=>m.fromUploaded(s,p)))}}}function Ck({face:e,models:t,props:a}){const r=Ka(a.slot),s=yb(a.value,r,a.propertyId);return d.jsx(w9,{kind:s,kinds:r,face:e,models:t,props:a},s)}function Vj(e,t,a){const r=a.value===null?Hn(e).cleared:t.coerce(a.value);return{...a,value:r,onChange:s=>a.onChange(hf(e,s))}}function w9({kind:e,kinds:t,face:a,models:r,props:s}){const c=r[e],u=Vj(e,c,s);return d.jsx(Uj,{kind:e,face:a,model:c,props:u,open:x9(t,e,u.value,s.onChange)})}function k9({models:e,props:t,onOpen:a}){const r=yb(t.value,Ka(t.slot),t.propertyId);return d.jsx(_9,{kind:r,models:e,props:t,onOpen:a},r)}function _9({kind:e,models:t,props:a,onOpen:r}){const s=t[e];return d.jsx(Bj,{kind:e,model:s,onOpen:r,props:Vj(e,s,a)})}function S9(e){function t(r){return d.jsx(Ck,{face:"expanded",models:e.models(),props:r})}function a(r){return d.jsx(Ck,{face:"compact",models:e.models(),props:r})}return{model:e.model,faces:{expanded:t,compact:a},applyOptimistic:null}}function E9(e,t){const a=e.querySelector("img");if(a){t.url&&a.setAttribute("src",t.url),a.setAttribute("alt",t.alt??""),a.style.transform="",a.style.transformOrigin="",a.style.objectPosition="";return}const r=e.querySelector("video");r&&(t.url?r.setAttribute("poster",t.url):r.removeAttribute("poster"))}function Gj(e){if(e&&typeof e=="object"){const t=e;return{asset_id:Ji(t)??"",url:typeof t.url=="string"?t.url:"",alt:typeof t.alt=="string"?t.alt:"",rect:t.rect&&typeof t.rect=="object"?t.rect:void 0,ar:typeof t.ar=="number"?t.ar:void 0,mobile:t.mobile&&typeof t.mobile=="object"&&t.mobile.rect?t.mobile:void 0,...t.renditions&&typeof t.renditions=="object"?{renditions:t.renditions}:{},...typeof t.picked=="string"||t.picked===null?{picked:t.picked}:{},...typeof t.name=="string"||t.name===null?{name:t.name}:{}}}return{asset_id:"",url:"",alt:""}}const Kj=ff("image",{model:{defaultValue:{asset_id:"",url:"",alt:""},coerce:Gj,isEmpty:e=>e.asset_id===""&&e.url==="",isInvalid:()=>!1},applyOptimistic:E9});function j9(e,t){const a=e.matches("img")?e:e.querySelector("img");a&&t.poster&&a.setAttribute("src",t.poster)}function Yj(e){if(e&&typeof e=="object"){const t=e;return{asset_id:Ji(t)??"",url:typeof t.url=="string"?t.url:"",poster:typeof t.poster=="string"?t.poster:"",alt:typeof t.alt=="string"?t.alt:"",...typeof t.provider=="string"&&t.provider?{provider:t.provider}:{},...typeof t.picked=="string"||t.picked===null?{picked:t.picked}:{}}}return{asset_id:"",url:"",poster:"",alt:""}}const Qj=ff("tour",{model:{defaultValue:{asset_id:"",url:"",poster:"",alt:""},coerce:Yj,isEmpty:e=>e.asset_id===""&&e.url==="",isInvalid:()=>!1},applyOptimistic:j9});function Xj({engine:e,lens:t,propertyId:a,instanceId:r,slotId:s,cropCfg:c}){const{api:u}=Yt(),m=Rs(a),{rows:p}=e,[y,v]=x.useState(null),g=C=>`${a}:${r}:${s}:${C}`,w=C=>t.get(C.value),k=tE(a,p.map(C=>{const A=w(C);return A===null?null:dy(A,c)}),u.getCropDerivativeUrl),E=(C,A)=>{const O=y;v(null),O&&(!A.mobile&&zj(C,A.rect)||e.updateValue(O,T=>{const R=t.get(T);if(R===null||!R.asset_id)return T;const B=$j(R,A);return B===null?T:t.set(T,B)}))},S=()=>{var T;const C=y?p.find(R=>R.key===y):null,A=C?w(C):null;if(!C||!A)return null;const O=Lj(m,A,c.mode);return O.src?d.jsx(hg,{chrome:eb,src:O.src,mode:c.mode,aspect:c.aspect,aspectLabel:c.aspectLabel,mobileAspect:c.mobileAspect,seed:{rect:O.seed},mobileSeed:{rect:((T=A.mobile)==null?void 0:T.rect)??null},onApply:R=>E(O,R),onClose:()=>v(null)}):null},j=C=>{const A=w(C);return A===null?null:dy(A,c)};return{keyOf:g,cutOf:j,derivativeOf:C=>{const A=j(C);return A?k.get(A):void 0},open:v,modal:S}}function Rk(e,t){return e.matches(t)?e:e.querySelector(t)}function O9(e,t){const a=Rk(e,"video");if(a){t.poster&&a.setAttribute("poster",t.poster),t.url&&a.setAttribute("src",t.url),t.alt&&a.setAttribute("aria-label",t.alt);return}const r=Rk(e,"img");r&&t.poster&&r.setAttribute("src",t.poster)}function Zj(e){if(e&&typeof e=="object"){const t=e;return{asset_id:Ji(t)??"",url:typeof t.url=="string"?t.url:"",poster:typeof t.poster=="string"?t.poster:"",alt:typeof t.alt=="string"?t.alt:"",width:typeof t.width=="number"?t.width:void 0,height:typeof t.height=="number"?t.height:void 0,...t.source==="link"?{source:"link"}:{},...typeof t.provider=="string"&&t.provider?{provider:t.provider}:{},...typeof t.picked=="string"||t.picked===null?{picked:t.picked}:{}}}return{asset_id:"",url:"",poster:"",alt:""}}const Wj=ff("video",{model:{defaultValue:{asset_id:"",url:"",poster:"",alt:""},coerce:Zj,isEmpty:e=>e.asset_id===""&&e.url==="",isInvalid:()=>!1},applyOptimistic:O9});function A9(e,t){switch(e){case"image":return t.map(Gj);case"video":return t.map(Zj);case"tour":return t.map(Yj);case"document":return L$(t)}}function N9(e){return{get:t=>e==="image"?t:null,set:(t,a)=>a}}function M9({kind:e,label:t,itemSlot:a,offer:r,verbs:s,fixed:c,instanceId:u,slotId:m,ownerSlotId:p=m,value:y,propertyId:v,commit:g,onUpload:w,factPath:k,size:E}){const S=Hn(e),j=sg(a),C=x.useMemo(()=>A9(e,y),[e,y]),[A,O]=x.useState(!1),T=ar({items:C,fixed:c,axis:"xy",commit:g}),{rows:R}=T,B=x.useMemo(()=>N9(e),[e]),D=Xj({engine:T,lens:B,propertyId:v,instanceId:u,slotId:m,cropCfg:j}),L=Dj(v,e),P=db(a,{propertyId:v,instanceId:u,slotId:p}),le=w??P??void 0,ee=Jj(le,me=>T.add(S.fromUploaded(me,S.cleared))),de=r.kind==="owned"&&le!==void 0,K=(me,Y)=>e==="image"?tb(me,S.cleared,Y,j,r.kind==="picked"?r.filter.from:void 0):S.fromPicked(me,S.cleared),Q=(me,Y)=>{T.replace(Ts(R,me,S.assetIdOf,M=>K(M,Y),T.mint))},{add:se,onAdd:N,choose:V}=Fg(s,r.kind==="picked"?()=>O(!0):null,r.kind==="owned"&&de?gb([e],ee):null),te=ee.error;return d.jsxs(Pg,{engine:T,label:t,noun:S.noun,size:E,onAdd:N,add:se,choose:V,renderTile:(me,Y,M)=>d.jsx(pb,{kind:e,value:me.value,propertyId:v,holderPath:k,frame:{chrome:M,crop:e==="image"?{cfg:j,cut:D.cutOf(me),derivativeUrl:D.derivativeOf(me),cropping:L.recropping(Il(k,S.assetIdOf(me.value))),storeKey:D.keyOf(me.key)}:null}}),tileActions:me=>e==="image"&&L.offers(Il(k,S.assetIdOf(me.value)))?[{label:"Crop",glyph:"crop",onSelect:()=>L.framing?D.open(me.key):L.recrop(Il(k,S.assetIdOf(me.value)),D.keyOf(me.key))}]:[],children:[te&&d.jsx("p",{className:Ns,children:te}),A&&r.kind==="picked"&&d.jsx(fb,{propertyId:v,children:me=>d.jsx(_c,{mode:"multi",propertyId:v,filter:r.filter,selectedIds:R.map(Y=>S.assetIdOf(Y.value)),onChange:Y=>Q(Y,me),onClose:()=>O(!1)})}),L.framing&&D.modal(),L.modal]})}function Jj(e,t){const[a,r]=x.useState(!1),[s,c]=x.useState(null);return{busy:a,error:s,take:m=>{!e||m.length===0||(r(!0),c(null),(async()=>{try{for(const p of m)t(await e(p),p)}catch(p){console.error("[editor] media upload failed",p),c("Upload failed. Try again.")}finally{r(!1)}})())}}}function gb(e,t){const a=$y(e);return{accept:ob(e),onFiles:r=>t.take(r.map(s=>({file:s}))),...a.length>0?{onLink:r=>t.take([{link:r}]),linkKinds:a}:{},disabled:t.busy}}const Tk="label";function sd(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function mf(e){var u;const t=sd(e);if((t==null?void 0:t.type)!=="object")return null;const a=sd(t.fields);if(a===null)return null;const r=t.label,s=(u=sd(r))==null?void 0:u.field,c=t.item_order;return{...typeof r=="string"?{label:r}:{},...typeof s=="string"?{labelField:s}:{},fields:a,...Array.isArray(c)?{item_order:c.filter(m=>typeof m=="string")}:{}}}function Xa(e){return e.fields?{fields:e.fields,...e.item_order?{item_order:e.item_order}:{},...e.title?{titleKey:e.title}:{}}:mf(e.element)}function Ls(e){const{fields:t}=e,a=e.item_order;if(!a||a.length===0)return Object.entries(t);const r=new Set,s=[];for(const c of a)c in t&&!r.has(c)&&(r.add(c),s.push([c,t[c]]));for(const[c,u]of Object.entries(t))r.has(c)||s.push([c,u]);return s}function gs(e,t){return e.labelField!==void 0&&e.fields[e.labelField]?{kind:"field",field:e.labelField}:e.fields[Tk]?{kind:"field",field:Tk}:e.label?{kind:"text",text:e.label}:e.titleKey?{kind:"field",field:e.titleKey}:{kind:"text",text:t}}function pf(e,t,a){var u;if(e.kind==="text")return e.text;const r=(u=sd(a))==null?void 0:u[e.field],s=t.fields[e.field];if((s==null?void 0:s.type)==="address"){const m=_i(r);return(m===null?null:Y5(m))??"Untitled"}const c=typeof r=="string"?r.trim():typeof r=="number"?String(r):"";if(!c)return"Untitled";if((s==null?void 0:s.type)!=="select")return c;for(const m of s.values??[])if(typeof m!="string"&&m.value===c)return m.label;return c}function C9(e){const t=Xa(e);return t?Ls(t):[]}function R9(e){switch(e.type){case"text":case"select":case"url":case"email":case"phone":return"";case"number":case"date":case"image":case"video":case"tour":case"poi":case"document":case"address":case"media":return null;case"list":return[]}}function Go(e){const t={};for(const[a,r]of e)t[a]=R9(r);return t}const T9=["street","unit","city","state","postal"],eO={street:null,unit:null,city:null,state:null,postal:null,latitude:null,longitude:null,source:null};function D9(e,t){const a=e??eO,r=_i({...a,...t}),s=T9.filter(c=>((r==null?void 0:r[c])??null)!==a[c]);return s.length===0?e:s.every(c=>c==="unit")?r:r===null?null:_i({...r,latitude:null,longitude:null,source:null})}function Dk(e,t,a){return D9(e,{[t]:a})}function L9(e){return _i({...e,source:"autocomplete"})}function z9(e,t){return _i({...e??eO,...t,source:"manual_pinned"})}function tO(e){return e!==null&&e.latitude!==null&&e.longitude!==null}function nO(e){return e!==null&&!tO(e)}function $9(e,t,a){const r=a===void 0||a.size===0?t!=="unit":a.has(t);return e!==null&&r&&e[t]===null}function U9(e){return nO(e)||(e==null?void 0:e.source)==="manual_pinned"}const iO={defaultValue:null,coerce:_i,isEmpty:e=>e===null,isInvalid:()=>!1},fy=[{code:"AL",name:"Alabama"},{code:"AK",name:"Alaska"},{code:"AZ",name:"Arizona"},{code:"AR",name:"Arkansas"},{code:"CA",name:"California"},{code:"CO",name:"Colorado"},{code:"CT",name:"Connecticut"},{code:"DE",name:"Delaware"},{code:"DC",name:"District of Columbia"},{code:"FL",name:"Florida"},{code:"GA",name:"Georgia"},{code:"HI",name:"Hawaii"},{code:"ID",name:"Idaho"},{code:"IL",name:"Illinois"},{code:"IN",name:"Indiana"},{code:"IA",name:"Iowa"},{code:"KS",name:"Kansas"},{code:"KY",name:"Kentucky"},{code:"LA",name:"Louisiana"},{code:"ME",name:"Maine"},{code:"MD",name:"Maryland"},{code:"MA",name:"Massachusetts"},{code:"MI",name:"Michigan"},{code:"MN",name:"Minnesota"},{code:"MS",name:"Mississippi"},{code:"MO",name:"Missouri"},{code:"MT",name:"Montana"},{code:"NE",name:"Nebraska"},{code:"NV",name:"Nevada"},{code:"NH",name:"New Hampshire"},{code:"NJ",name:"New Jersey"},{code:"NM",name:"New Mexico"},{code:"NY",name:"New York"},{code:"NC",name:"North Carolina"},{code:"ND",name:"North Dakota"},{code:"OH",name:"Ohio"},{code:"OK",name:"Oklahoma"},{code:"OR",name:"Oregon"},{code:"PA",name:"Pennsylvania"},{code:"RI",name:"Rhode Island"},{code:"SC",name:"South Carolina"},{code:"SD",name:"South Dakota"},{code:"TN",name:"Tennessee"},{code:"TX",name:"Texas"},{code:"UT",name:"Utah"},{code:"VT",name:"Vermont"},{code:"VA",name:"Virginia"},{code:"WA",name:"Washington"},{code:"WV",name:"West Virginia"},{code:"WI",name:"Wisconsin"},{code:"WY",name:"Wyoming"},{code:"AS",name:"American Samoa"},{code:"GU",name:"Guam"},{code:"MP",name:"Northern Mariana Islands"},{code:"PR",name:"Puerto Rico"},{code:"VI",name:"U.S. Virgin Islands"}];function Zu(e){const t=e.trim().toLowerCase();if(t==="")return[...fy];const a=r=>{const s=r.name.toLowerCase();return r.code.toLowerCase()===t||s===t?0:s.startsWith(t)?1:s.includes(` ${t}`)?2:s.includes(t)?3:-1};return fy.map(r=>({state:r,rank:a(r)})).filter(({rank:r})=>r>=0).sort((r,s)=>r.rank-s.rank).map(({state:r})=>r)}function I9(e){const t=e.trim().toLowerCase();return t===""?null:fy.find(a=>a.code.toLowerCase()===t||a.name.toLowerCase()===t)??null}const B9="fixed overflow-y-auto rounded-[calc(10*var(--content))] border border-line bg-white p-1.5 shadow-[0_16px_38px_-12px_rgba(20,18,13,0.4)]",H9=ie(vt,"flex w-full items-center gap-3 rounded-[calc(7*var(--content))] px-2.5 py-2 text-left text-body text-ink data-[active=true]:bg-accent-soft"),q9="ml-auto text-caption font-medium text-ink-4",F9=4,P9=280,Lk=220;function V9({value:e,onCommit:t,ariaLabel:a,placeholder:r,shellClassName:s,attention:c,inputClassName:u}){const m=e??"",[p,y]=x.useState(null),[v,g]=x.useState(0),[w,k]=x.useState(null),E=x.useId(),S=x.useRef(null),j=x.useRef(null),C=p!==null,A=C&&p!==m,O=Zu(A?p:""),T=x.useCallback(()=>{S.current&&k(cs(S.current))},[]);x.useEffect(()=>{if(C)return window.addEventListener("scroll",T,!0),window.addEventListener("resize",T),()=>{window.removeEventListener("scroll",T,!0),window.removeEventListener("resize",T)}},[C,T]),x.useEffect(()=>{var ee,de;(de=(ee=j.current)==null?void 0:ee.querySelector('[data-active="true"]'))==null||de.scrollIntoView({block:"nearest"})},[v,C]);function R(){T(),y(m);const ee=Zu("").findIndex(de=>de.code===m);g(Math.max(0,ee))}function B(){y(null),k(null)}function D(ee){B(),ee!==e&&t(ee)}function L(ee){if(ee===m)return B();if(ee.trim()==="")return D(null);const de=I9(ee);if(de)return D(de.code);const K=Zu(ee);if(K.length===1)return D(K[0].code);B()}function P(ee){if(!C){(ee.key==="ArrowDown"||ee.key==="ArrowUp")&&(ee.preventDefault(),R());return}switch(ee.key){case"ArrowDown":ee.preventDefault(),g(de=>Math.min(O.length-1,de+1));return;case"ArrowUp":ee.preventDefault(),g(de=>Math.max(0,de-1));return;case"Enter":{ee.preventDefault(),ee.stopPropagation();const de=O[v];de?D(de.code):L(p);return}case"Tab":{const de=A?O[v]:void 0;de?D(de.code):L(p);return}case"Escape":ee.preventDefault(),B();return}}const le=w?uc(w,{maxHeight:P9,minWidth:Lk,gap:F9}):null;return d.jsxs("div",{className:s,ref:S,...c,children:[d.jsx("input",{className:u,type:"text",role:"combobox","aria-label":a,"aria-expanded":C,"aria-controls":E,"aria-autocomplete":"list",autoComplete:"address-level1",placeholder:r,value:C?p:m,onFocus:ee=>{R(),ee.currentTarget.select()},onChange:ee=>{C||T(),y(ee.target.value),g(0)},onKeyDown:P,onBlur:()=>{C&&L(p)}}),C&&le&&O.length>0&&typeof document<"u"&&ir.createPortal(d.jsx("div",{ref:j,id:E,role:"listbox","aria-label":`${a} options`,className:B9,style:{left:le.left,top:le.top,bottom:le.bottom,maxHeight:le.maxHeight,minWidth:Math.max(le.width,Lk),zIndex:Xr},children:O.map((ee,de)=>d.jsxs("button",{type:"button",role:"option",tabIndex:-1,"aria-selected":ee.code===m,"data-active":de===v,"data-state-option":ee.code,className:H9,onMouseEnter:()=>g(de),onMouseDown:K=>{K.preventDefault(),D(ee.code)},children:[d.jsx("span",{className:"truncate",children:ee.name}),d.jsx("span",{className:q9,children:ee.code})]},ee.code))}),document.body)]})}const G9=x.createContext(null);function aO(e){const t=x.useContext(G9);return t!==null&&e!==void 0&&t.factPath===e?t.fields:void 0}const K9={street:{label:"Street address",placeholder:"123 Main St",panelPlaceholder:"Street address"},unit:{label:"Address 2",placeholder:"Unit 4B",panelPlaceholder:"Unit"},city:{label:"City",placeholder:"Boulder",panelPlaceholder:"City"},state:{label:"State",placeholder:"CO",panelPlaceholder:"State"},postal:{label:"ZIP",placeholder:"80301",panelPlaceholder:"ZIP"}},Y9={page:{grid:"grid grid-cols-12 gap-x-3 gap-y-4",span:{street:"col-span-8",unit:"col-span-4",city:"col-span-6",state:"col-span-2",postal:"col-span-4"},labelled:!0},panel:{grid:"grid grid-cols-[1fr_3rem_1.5rem_5.5rem] gap-1.5",span:{street:"col-span-2",unit:"col-span-2",city:"",state:"col-span-2",postal:""},labelled:!1}},Q9=250,X9=2e3;function Z9(e){const t=U9(e),[a,r]=x.useState(!1),[s,c]=x.useState(t);!a&&s!==t&&c(t);const u=x.useRef(null),m=x.useCallback(()=>{u.current!==null&&clearTimeout(u.current),u.current=null},[]);x.useEffect(()=>m,[m]);const p=x.useCallback(()=>{m(),r(!1)},[m]),y=x.useCallback(()=>{m(),r(!0),u.current=setTimeout(()=>{u.current=null,r(!1)},X9)},[m]);return{show:a?s:t,hold:y,settle:p}}function W9(){const[e,t]=x.useState({});return{shown:(a,r)=>e[a]??r,type:(a,r)=>t(s=>({...s,[a]:r})),settle:a=>t(({[a]:r,...s})=>s),settleAll:()=>t({})}}function J9(e){const t=Yt().address;return t?d.jsx(t.Input,{...e}):d.jsx("input",{className:e.className,type:"text",value:e.value,placeholder:e.placeholder,"aria-label":e.ariaLabel,autoComplete:"off",onChange:a=>e.onChange(a.target.value),onBlur:e.onBlur})}function eI({value:e,onPin:t,place:a}){const r=Yt().address;if(!r)return null;const s=tO(e)?{latitude:e.latitude,longitude:e.longitude}:null;return d.jsx(r.PinMap,{pin:s,postal:(e==null?void 0:e.postal)??null,place:a,onPin:t})}function tI({value:e,show:t,onChange:a,place:r}){const[s,c]=x.useState(t);return t&&!s&&c(!0),x.useEffect(()=>{if(t)return;const u=setTimeout(()=>c(!1),Q9);return()=>clearTimeout(u)},[t]),s?d.jsx("div",{"data-pin-map-reveal":!0,"data-open":t,"aria-hidden":!t,className:"grid grid-rows-[1fr] opacity-100 transition-[grid-template-rows,opacity] duration-250 ease-out starting:grid-rows-[0fr] starting:opacity-0 data-[open=false]:grid-rows-[0fr] data-[open=false]:opacity-0 motion-reduce:transition-none",children:d.jsx("div",{className:"min-h-0 overflow-hidden",children:d.jsx("div",{className:r==="page"?"pt-4":"pt-1.5",children:d.jsx(eI,{value:e,onPin:u=>a(z9(e,u)),place:r})})})}):null}function nI({value:e,onChange:t,place:a,fields:r,hold:s}){const c=W9(),u=Ds(),m=JE(a),p=Y9[a],y=ie(m.inner,"w-full"),v=g=>{const w=K9[g],k=Cs($9(e,g,r==null?void 0:r.required)?"required":null,u),E=p.labelled?w.placeholder:w.panelPlaceholder,S=(e==null?void 0:e[g])??"",j=g==="postal"?By(S):S,C=O=>{c.type(g,O),s.hold(),t(Dk(e,g,O))};let A;return g==="street"?A=d.jsx("div",{className:m.shell,...k,children:d.jsx(J9,{className:y,value:c.shown(g,j),placeholder:E,ariaLabel:w.label,onChange:C,onPick:O=>{c.settleAll(),s.settle(),t(L9(O))},onBlur:()=>c.settle(g)})}):g==="state"?A=d.jsx(V9,{value:(e==null?void 0:e.state)??null,onCommit:O=>{s.hold(),t(Dk(e,"state",O??""))},ariaLabel:w.label,placeholder:E,shellClassName:m.shell,attention:k,inputClassName:y}):A=d.jsx("div",{className:m.shell,...k,children:d.jsx("input",{className:y,type:"text",value:c.shown(g,j),placeholder:E,"aria-label":w.label,autoComplete:"off",inputMode:g==="postal"?"numeric":void 0,maxLength:g==="postal"?10:void 0,onChange:O=>C(O.target.value),onBlur:()=>c.settle(g)})}),d.jsxs("label",{className:ie(m.frame,"min-w-0",p.span[g]),children:[p.labelled&&d.jsx("span",{className:hE,children:w.label}),A]},g)};return d.jsx("div",{className:p.grid,children:iI.filter(g=>r===void 0||r.used.has(g)).map(v)})}const iI=["street","unit","city","state","postal"];function aI(e){return e===void 0||e.used.has("latitude")||e.used.has("longitude")}function rO({slot:e,value:t,onChange:a,factPath:r,place:s}){const c=aO(r)??void 0,u=Z9(t),m=y=>{y.relatedTarget instanceof Node&&y.currentTarget.contains(y.relatedTarget)||u.settle()},p=y=>{u.settle(),a(y)};return d.jsxs("div",{className:"flex flex-col",role:"group","aria-label":e.label,onBlur:m,children:[d.jsx(nI,{value:t,onChange:a,place:s,fields:c,hold:u}),aI(c)&&d.jsx(tI,{value:t,show:u.show,onChange:p,place:s})]})}function rI(e){return d.jsx(rO,{...e,place:"page"})}function oI(e){return d.jsx(rO,{...e,place:"panel"})}const sI={model:iO,faces:{expanded:rI,compact:oI},applyOptimistic:null},zk=["January","February","March","April","May","June","July","August","September","October","November","December"],lI=["Su","Mo","Tu","We","Th","Fr","Sa"],$k=e=>String(e).padStart(2,"0");function oO(e,t,a){return`${String(e).padStart(4,"0")}-${$k(t+1)}-${$k(a)}`}function cI(e=new Date){return oO(e.getFullYear(),e.getMonth(),e.getDate())}function Uk(e){return{year:Number(e.slice(0,4)),month:Number(e.slice(5,7))-1}}function uI(e,t){const a=e.year*12+e.month+t;return{year:Math.floor(a/12),month:(a%12+12)%12}}function dI(e){const t=new Date(Date.UTC(e.year,e.month,1)).getUTCDay();return Array.from({length:42},(a,r)=>{const s=new Date(Date.UTC(e.year,e.month,1+r-t));return{iso:oO(s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()),inMonth:s.getUTCMonth()===e.month,day:s.getUTCDate()}})}const fI="fixed w-[calc(260*var(--content))] rounded-[calc(10*var(--content))] border border-line bg-white p-2.5 shadow-[0_16px_38px_-12px_rgba(20,18,13,0.4)]",Ik=ie(vt,"grid size-[calc(28*var(--content))] place-items-center rounded-[calc(7*var(--content))] text-ink-3 hover:bg-accent-soft hover:text-ink"),hI=ie(vt,"flex items-center gap-1 rounded-[calc(7*var(--content))] px-2 py-1 text-[length:calc(13.5*var(--content))] font-semibold text-ink hover:bg-accent-soft data-[open=true]:bg-accent-soft"),sO=ie(vt,"grid h-[calc(32*var(--content))] place-items-center rounded-[calc(7*var(--content))] text-[length:calc(13*var(--content))] [font-variant-numeric:tabular-nums]","text-ink hover:bg-accent-soft data-[outside=true]:text-ink-4","data-[selected=true]:bg-accent data-[selected=true]:font-semibold data-[selected=true]:text-white data-[selected=true]:hover:bg-accent"),Bk=ie(sO,"h-[calc(40*var(--content))]"),Hk=12,mI=4,pI=4;function yI({anchorRef:e,ownerRef:t,value:a,label:r,onPick:s,onClose:c}){const[u,m]=x.useState(()=>Uk(a??cI())),[p,y]=x.useState("days"),[v,g]=x.useState(0),[w,k]=x.useState(null),E=x.useRef(null),[S,j]=x.useState(a);a!==S&&(j(a),a!==null&&m(Uk(a))),x.useLayoutEffect(()=>{const R=()=>{const B=e.current,D=E.current;!B||!D||k(uc(cs(B),{height:D.offsetHeight,minWidth:D.offsetWidth,gap:pI}))};return R(),window.addEventListener("scroll",R,!0),window.addEventListener("resize",R),()=>{window.removeEventListener("scroll",R,!0),window.removeEventListener("resize",R)}},[e,p]),x.useEffect(()=>{const R=L=>{var le,ee;const P=L.target;(le=E.current)!=null&&le.contains(P)||(ee=t.current)!=null&&ee.contains(P)||c()},B=()=>c(),D=L=>{L.key!=="Escape"||L.defaultPrevented||(L.preventDefault(),c())};return document.addEventListener("pointerdown",R,!0),document.addEventListener("keydown",D),window.addEventListener("blur",B),()=>{document.removeEventListener("pointerdown",R,!0),document.removeEventListener("keydown",D),window.removeEventListener("blur",B)}},[t,c]);const C=R=>{R==="years"&&g(u.year-mI),y(p===R?"days":R)},A=R=>{p==="years"?g(v+R*Hk):m(uI(u,R))},O=p==="years"?"years":"month",T=(R,B,D)=>d.jsxs("button",{type:"button",className:hI,"aria-label":D,"aria-expanded":p===R,"data-open":p===R,onClick:()=>C(R),children:[B,d.jsx("span",{className:ie("text-ink-4 transition-transform",p===R&&"rotate-180"),children:d.jsx(Rt.chevD,{})})]});return ir.createPortal(d.jsxs("div",{ref:E,role:"dialog","aria-label":`${r} calendar`,className:fI,style:{left:(w==null?void 0:w.left)??0,top:w?w.top:0,bottom:w==null?void 0:w.bottom,visibility:w?void 0:"hidden",zIndex:Xr},onMouseDown:R=>R.preventDefault(),children:[d.jsxs("div",{className:"mb-1.5 flex h-[calc(28*var(--content))] items-center justify-between",children:[d.jsxs("div",{className:"flex items-center",children:[T("months",zk[u.month]??"","Choose month"),T("years",String(u.year),"Choose year")]}),p!=="months"&&d.jsxs("div",{className:"flex items-center",children:[d.jsx("button",{type:"button",className:Ik,"aria-label":`Previous ${O}`,onClick:()=>A(-1),children:d.jsx(Rt.chevL,{})}),d.jsx("button",{type:"button",className:Ik,"aria-label":`Next ${O}`,onClick:()=>A(1),children:d.jsx(Rt.chevR,{})})]})]}),p==="days"?d.jsxs("div",{className:"grid grid-cols-7 gap-0.5",children:[lI.map(R=>d.jsx("span",{className:"grid h-[calc(24*var(--content))] place-items-center text-[length:calc(11*var(--content))] font-medium text-ink-4",children:R},R)),dI(u).map(R=>d.jsx("button",{type:"button",className:sO,"aria-label":R.iso,"aria-pressed":R.iso===a,"data-outside":!R.inMonth,"data-selected":R.iso===a,onClick:()=>s(R.iso),children:R.day},R.iso))]}):p==="months"?d.jsx("div",{className:"grid grid-cols-3 gap-1",children:zk.map((R,B)=>d.jsx("button",{type:"button",className:Bk,"aria-pressed":B===u.month,"data-selected":B===u.month,onClick:()=>{m({year:u.year,month:B}),y("days")},children:R.slice(0,3)},R))}):d.jsx("div",{className:"grid grid-cols-3 gap-1",children:Array.from({length:Hk},(R,B)=>v+B).map(R=>d.jsx("button",{type:"button",className:Bk,"aria-pressed":R===u.year,"data-selected":R===u.year,onClick:()=>{m({year:R,month:u.month}),y("days")},children:R},R))})]}),document.body)}const lO={defaultValue:null,coerce:e=>typeof e=="string"&&e!==""?e:null,isEmpty:e=>e===null,isInvalid:e=>!__(e)};function qk({slot:e,value:t,onChange:a,required:r=!1}){const[s,c]=x.useState(!1),[u,m]=x.useState(!1),p=x.useRef(null),y=x.useRef(null),v=x.useRef(null),g=s||t!==null,w=rr(lO,e,t,r),k=or(),E=t!==null&&__(t)?t:null;x.useEffect(()=>{var C;s&&((C=p.current)==null||C.focus())},[s]);const S=x.useCallback(()=>{var C;m(!1),document.activeElement!==p.current&&((C=p.current)==null?void 0:C.value)===""&&c(!1)},[]),j=g?d.jsxs(Wr,{attention:w,className:u?"border-accent":void 0,ref:v,children:[d.jsx("input",{ref:p,className:ie(k.inner,"[font-variant-numeric:tabular-nums] [&::-webkit-calendar-picker-indicator]:hidden"),type:"date","aria-label":e.label,"aria-invalid":w==="invalid"||void 0,value:E??"",onFocus:()=>c(!0),onChange:C=>a(C.target.value===""?null:C.target.value),onBlur:C=>{m(!1),C.target.value===""&&c(!1)}}),d.jsx("span",{className:ie(pE,k.adornEnd),children:d.jsx("button",{type:"button",className:ie(vt,"flex items-center text-ink-4 hover:text-ink-2 data-[open=true]:text-accent"),"aria-label":`Choose ${e.label}`,"aria-haspopup":"dialog","aria-expanded":u,"data-open":u,onMouseDown:C=>C.preventDefault(),onClick:()=>u?S():m(!0),children:d.jsx(Rt.calendar,{})})})]}):d.jsx(Wr,{attention:w,children:d.jsx("button",{type:"button",className:ie(vt,k.inner,"cursor-pointer text-left text-ink-4"),"aria-label":e.label,onClick:()=>{c(!0),m(!0)},children:"None"})});return d.jsxs("div",{className:k.frame,ref:y,children:[j,g&&u&&d.jsx(yI,{anchorRef:v,ownerRef:y,value:E,label:e.label,onPick:C=>{var A;a(C),m(!1),(A=p.current)==null||A.focus()},onClose:S}),d.jsx(ej,{attention:w,message:"Not a real date. Pick one"})]})}const gI={model:lO,faces:{expanded:qk,compact:qk},applyOptimistic:null},cO=ff("document",{model:{defaultValue:{asset_id:""},coerce:QE,isEmpty:e=>e===null||e.asset_id==="",isInvalid:()=>!1},applyOptimistic:null}),bI="data-slot-id",Fk="data-slot-text-leaf",vI="data-slot-group",xI="data-slot-item",wI="data-slot-field",kI="data-slot-unselectable",yf="data-section-instance-id";function uO(e,t){const a=[];e.hasAttribute(Fk)&&a.push(e),a.push(...Array.from(e.querySelectorAll(`[${Fk}]`))),a.length!==0&&a.forEach(r=>{_I(r,t)})}function _I(e,t){const a=e.ownerDocument,r=[];t.split(`
|
|
1257
|
-
`).forEach((s,c)=>{c>0&&r.push(a.createElement("br")),r.push(a.createTextNode(s))}),e.replaceChildren(...r)}function Sc(e){return typeof e=="string"?e:e==null?"":typeof e=="number"||typeof e=="boolean"?String(e):""}function SI(e){const[t,a]=x.useState(e),[r,s]=x.useState(e);return e!==r&&(s(e),a(e)),[t,a]}function bb({kind:e,slot:t,value:a,onChange:r,required:s=!1}){var w;const c=a??"",[u,m]=SI(c),p=rr(e.model,t,u,s),y=e.invalidMessage(u,t),v=k=>{if(!e.model.isEmpty(k)&&e.model.isInvalid(k,t))return;const S=e.model.isEmpty(k)?"":e.normalize(k);m(S),S!==c&&r(S)},g=or();return d.jsxs("div",{className:g.frame,children:[d.jsxs(Wr,{attention:p,children:[d.jsx("input",{className:g.inner,type:e.inputType,inputMode:e.inputMode,autoComplete:e.autoComplete,value:u,placeholder:t.placeholder??e.placeholder,spellCheck:!1,"aria-label":t.label,"aria-invalid":p==="invalid"||void 0,"aria-description":g.inline&&p==="invalid"?y:void 0,onChange:k=>m(k.target.value),onBlur:k=>v(k.target.value)}),!g.inline&&((w=e.adornment)==null?void 0:w.call(e,u))]}),d.jsx(ej,{attention:p,message:y})]})}const dO={model:{defaultValue:"",coerce:Sc,isEmpty:e=>e.trim()==="",isInvalid:e=>!q5(e.trim())},normalize:e=>e.trim(),invalidMessage:()=>"Not a valid email address",inputType:"email",inputMode:"email",autoComplete:"email",placeholder:"name@example.com"};function Pk(e){return d.jsx(bb,{kind:dO,...e})}const EI={model:dO.model,faces:{expanded:Pk,compact:Pk},applyOptimistic:null},fO="section";function hO(e,t){const{itemKind:a,view:r,granularity:s}=E3(e,t,fO),c=a==="object"||a==="annotated-media"?{kind:"record",entries:C9(e)}:{kind:"single",slot:e.element??{type:"text",label:e.label}};return{itemKind:a,view:r,granularity:s,itemContent:c,axis:r==="gallery"||r==="annotated-gallery"?"xy":"y"}}function jI(e,t){const a=Ji(e),r=Ji(t);return a!=null||r!=null?a===r:e===t?!0:e==null||t==null?!1:String(e)===String(t)}function OI(e,t,a,r,s){const c=Pa(m=>m.markSlotOverridden),u=!s&&!C3(e);return function(p,y){u&&c(t,a,{kind:"scalar"}),r(p.map(v=>v.value))}}function Jl(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function AI(e){var t;return((t=Jl(e.element))==null?void 0:t.type)==="row"}function NI(e,t){var r;const a=(r=Jl(e))==null?void 0:r.decisions;if(Array.isArray(a))return a.find(s=>{var u;const c=(u=Jl(s))==null?void 0:u.produces;return Array.isArray(c)&&c[0]===t})}function mO(e,t,a){const r=Jl(t),s=j3(r).some(w=>w.verb==="pick")||AI(e),c=s?O3(r==null?void 0:r.of):void 0,u=s?(c==null?void 0:c.length)===1?{kind:"home",key:c[0]}:r==null?void 0:r.of:void 0,m=nR({slots:{},...a===void 0?{}:{sectionSlots:a}},e,u);switch(R3(e).kind){case"table":{const w=Id(e.source);return w===null?{kind:"owned"}:{kind:"table",...w}}case"section":case"derived":return m.length===0?{kind:"follows"}:{kind:"follows",tables:m}}if(!s)return{kind:"owned"};const[y,...v]=m;if(y!==void 0)return{kind:"pick-row",tables:[y,...v]};const g=u4(r==null?void 0:r.of);return g===null?{kind:"owned"}:{kind:"pick-media",filter:g}}function gf(e){switch(e.kind){case"table":return[e.reading==="legacy"?{table:e.table,reading:"legacy"}:{table:e.table,reading:"registry"}];case"pick-row":return e.tables;case"follows":return e.tables??[];case"pick-media":case"owned":return[]}}function MI(e){const t=gf(e);return t.length===1?t[0]:null}function pO(e){var t;return((t=MI(e))==null?void 0:t.table)??null}function yO(e){return vb(gf(e))}function vb(e){return Pd(e.length===1?e[0].table:null)}function gO(e){const[t,...a]=[...new Set(e.map(r=>r.table))];return t===void 0?null:[t,...a]}function xb(e){return gO(gf(e))}const CI=()=>null;function bf(e){const t=gO(Gl(e));return t===null?{kind:"none"}:e.source===void 0?{kind:"table",tables:t}:{kind:"table",tables:t,inert:!0}}function Vk(e,t,a){const r=xb(t);if(r!==null)return{kind:"table",tables:r};const s=Jl(e.source);return t.kind==="follows"&&(s==null?void 0:s.kind)==="section"?RI(s,a):{kind:"none"}}function RI(e,t){const a=e.section,r=e.slot;return typeof a!="string"||typeof r!="string"?{kind:"none"}:{kind:"content",labelOf:(t==null?void 0:t({section:a,slot:r}))??CI}}function wb(e,t){const a=e[t];return typeof a=="string"&&a!==""?a:null}function bO({instanceId:e,slotId:t,membership:a,itemBaseline:r,insideRecord:s}){const c=Pa(g=>g.markSlotOverridden),u=Pa(g=>g.relinkSlot),m=yO(a),p=pO(a)===null&&a.kind!=="follows",y=g=>wb(g,m),v=g=>y(g.value)??(p?g.key:null);return{identityKey:m,identityOf:y,stamp:g=>p?g.map(w=>y(w.value)===null?{key:w.key,value:{...w.value,[m]:w.key}}:w):g,markerIdentity:v,markFields:(g,w)=>{if(s)return;const k=v(g);if(k===null){c(e,t,{kind:"scalar"});return}const E=r==null?void 0:r.find(S=>S[m]===k);for(const S of Object.keys(w))S!==m&&(E!=null&&jI(w[S],E[S])?u(e,t,{kind:"item",item_id:k,field:S}):c(e,t,{kind:"item",item_id:k,field:S}))},markRemoved:g=>{if(s||a.kind!=="table")return;const w=y(g.value);w!==null&&!df(w)&&c(e,t,{kind:"item_removed",item_id:w})}}}async function TI(e,t,a){const r=await e(`/properties/${t}/poi/search`,{method:"POST",json:{query:a}});return Array.isArray(r==null?void 0:r.results)?r.results:[]}async function vO(e,t,a){return e(`/properties/${t}/poi/${encodeURIComponent(a)}`)}async function DI(e,t,a){if(a.length===0)return{};const r=await e(`/properties/${t}/poi/photo-urls`,{method:"POST",json:{place_ids:a}});return(r==null?void 0:r.urls)??{}}function xO(e){if(e==null||!Number.isFinite(e))return null;const t=e/1609.344;return t<.1?"< 0.1 mi":`${t.toFixed(1)} mi`}let LI=0;function zI(){return`poi${++LI}${Math.random().toString(36).slice(2,6)}`}const Cd=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,Cl=e=>typeof e=="string"&&e!==""?e:void 0;function $I(e){const t={},a=Cd(e.rating);a!==void 0&&(t.rating=a);const r=Cd(e.review_count);r!==void 0&&(t.review_count=r);const s=Cl(e.type_label);s!==void 0&&(t.type_label=s);const c=Cl(e.price_level);c!==void 0&&(t.price_level=c);const u=Cl(e.website_uri);u!==void 0&&(t.website_uri=u);const m=Cl(e.google_maps_uri);m!==void 0&&(t.google_maps_uri=m);const p=Cl(e.summary);p!==void 0&&(t.summary=p);const y=UI(e.photo);return y!==void 0&&(t.photo=y),t}function UI(e){if(!e||typeof e!="object")return;const t=e,a=Cd(t.width),r=Cd(t.height),s=t.attribution;if(!(a===void 0||r===void 0||typeof s!="string"))return{width:a,height:r,attribution:s}}function kb(e){if(!e||typeof e!="object")return null;const t=e;return typeof t.place_id!="string"||typeof t.name!="string"||typeof t.lat!="number"||typeof t.lng!="number"?null:{id:typeof t.id=="string"?t.id:zI(),place_id:t.place_id,name:t.name,address:typeof t.address=="string"?t.address:null,lat:t.lat,lng:t.lng,distance_m:typeof t.distance_m=="number"?t.distance_m:null,...$I(t)}}function II(e){return e.map(kb).filter(t=>t!==null)}function BI(e){return[e.rating===void 0?null:`★ ${e.rating.toFixed(1)}${e.review_count===void 0?"":` (${e.review_count.toLocaleString()})`}`,e.type_label,xO(e.distance_m),e.address].filter(Boolean).join(" · ")}const _b="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]",Sb="grid w-5 flex-shrink-0 place-items-center text-ink-4",Eb="flex min-w-0 flex-1 flex-col gap-px",jb="truncate text-[length:calc(13.5*var(--content))] text-ink",Ob="truncate text-caption text-ink-3",HI="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",wO="text-caption text-danger",kO="opacity-70",_O="size-[calc(14*var(--content))] flex-shrink-0 animate-[we-ml-spin_.7s_linear_infinite] rounded-full border-2 border-[#d9d5c9] border-t-accent",qI="size-[calc(26*var(--content))] flex-shrink-0 rounded-[calc(5*var(--content))] object-cover bg-[#f1f0ea]",FI="we-no-drag flex flex-shrink-0 items-center gap-0.75",PI="flex items-center gap-0.75 opacity-0 transition-opacity duration-[120ms] group-hover/row:opacity-100",VI="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",GI=()=>d.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:[d.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"}),d.jsx("circle",{cx:"8",cy:"6.4",r:"1.7"})]});function SO(e,t){const{apiFetch:a}=Yt().api,[r,s]=x.useState({}),c=t.filter(m=>m.photo).map(m=>m.place_id).sort().join(","),u=x.useRef(new Set);return x.useEffect(()=>{const p=(c===""?[]:c.split(",")).filter(y=>!u.current.has(y));p.length!==0&&(p.forEach(y=>u.current.add(y)),DI(a,e,p).then(y=>{s(v=>({...v,...y}))}).catch(()=>{p.forEach(y=>u.current.delete(y))}))},[c,e,a]),{urls:r,dropUrl:m=>s(p=>{if(!(m in p))return p;const y={...p};return delete y[m],y})}}function EO({row:e,photoUrl:t,onPhotoError:a,onRemove:r,dragProps:s,flashNew:c}){const u=BI(e);return d.jsxs("div",{...s,className:ie(_b,s&&"cursor-grab hover:border-[#d9d5c9]",c&&"animate-[we-ml-rowin_.26s_cubic-bezier(.2,.7,.3,1)_both]"),children:[t?d.jsx("img",{className:qI,src:t,alt:"",draggable:!1,onError:a}):d.jsx("span",{className:Sb,children:d.jsx(GI,{})}),d.jsxs("div",{className:Eb,children:[d.jsx("span",{className:jb,children:e.name}),u&&d.jsx("span",{className:Ob,children:u})]}),r&&d.jsx("div",{className:FI,children:d.jsx("span",{className:PI,children:d.jsx("button",{type:"button",className:ie(VI,"hover:bg-[#fbecea] hover:text-danger"),title:"Remove",onClick:r,children:d.jsx(Rt.trash,{})})})})]})}const KI="relative flex flex-col",YI="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)]",QI="grid flex-shrink-0 place-items-center text-ink-4",XI="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",ZI="size-[calc(15*var(--content))] flex-shrink-0 animate-[we-ml-spin_.7s_linear_infinite] rounded-full border-2 border-[#d9d5c9] border-t-accent",WI="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)]",JI="m-0 max-h-[calc(264*var(--content))] list-none overflow-y-auto p-1",eB=ie(vt,"flex w-full flex-col gap-px rounded-md px-2 py-1.75 text-left"),tB="bg-accent-soft",nB="cursor-default opacity-55",iB="flex items-center gap-1.5 truncate text-[length:calc(13.5*var(--content))] text-ink",aB="truncate text-caption text-ink-3",ap="px-3 py-3 text-center text-[length:calc(12.5*var(--content))] text-ink-4",rB="inline-flex flex-shrink-0 items-center gap-1 text-good",oB=2,sB=300;function jO({propertyId:e,placeholder:t,addedIds:a,disabled:r=!1,disabledHint:s,onSelect:c}){const{apiFetch:u}=Yt().api,[m,p]=x.useState(""),[y,v]=x.useState([]),[g,w]=x.useState("idle"),[k,E]=x.useState(0),[S,j]=x.useState(0),C=x.useRef(0),A=x.useId();x.useEffect(()=>{const B=m.trim();if(B.length<oB){++C.current,w("idle"),v([]);return}const D=++C.current;w("loading");const L=setTimeout(()=>{TI(u,e,B).then(P=>{D===C.current&&(v(P),E(0),w(P.length?"results":"empty"))}).catch(()=>{D===C.current&&w("error")})},sB);return()=>clearTimeout(L)},[m,e,S,u]);function O(B){a.has(B.place_id)||(c(B),p(""),v([]),w("idle"))}function T(B){if(B.key==="Escape"){w("idle"),v([]);return}if(g==="results"){if(B.key==="ArrowDown")B.preventDefault(),E(D=>Math.min(y.length-1,D+1));else if(B.key==="ArrowUp")B.preventDefault(),E(D=>Math.max(0,D-1));else if(B.key==="Enter"){B.preventDefault();const D=y[k];D&&O(D)}}}const R=g!=="idle";return d.jsxs("div",{className:KI,onBlur:B=>{B.currentTarget.contains(B.relatedTarget)||w("idle")},children:[d.jsxs("div",{className:ie(YI,r&&"opacity-55"),role:"combobox","aria-expanded":R,"aria-haspopup":"listbox","aria-controls":A,children:[d.jsx("span",{className:QI,children:d.jsx(Rt.search,{})}),d.jsx("input",{className:XI,value:m,placeholder:t,disabled:r,title:r?s:void 0,onChange:B=>p(B.target.value),onKeyDown:T,"aria-label":t,"aria-autocomplete":"list","aria-activedescendant":g==="results"?`${A}-${k}`:void 0}),g==="loading"&&d.jsx("span",{className:ZI})]}),R&&d.jsxs("div",{className:WI,children:[g==="loading"&&d.jsx("div",{className:ap,children:"Searching…"}),g==="empty"&&d.jsxs("div",{className:ap,children:["No places found for “",m.trim(),"”."]}),g==="error"&&d.jsxs("div",{className:ap,children:["Couldn't reach search."," ",d.jsx("button",{type:"button",className:"font-semibold text-accent-ink underline",onClick:()=>j(B=>B+1),children:"Retry"})]}),g==="results"&&d.jsx("ul",{className:JI,role:"listbox",id:A,children:y.map((B,D)=>{const L=a.has(B.place_id),P=[xO(B.distance_m),B.address].filter(Boolean).join(" · ");return d.jsx("li",{id:`${A}-${D}`,role:"option","aria-selected":D===k,children:d.jsxs("button",{type:"button",disabled:L,className:ie(eB,D===k&&!L&&tB,L&&nB),onMouseEnter:()=>E(D),onClick:()=>O(B),children:[d.jsxs("span",{className:iB,children:[L&&d.jsxs("span",{className:rB,children:[d.jsx(Rt.check,{size:12})," Added ·"]}),d.jsx("span",{className:"truncate",children:B.name})]}),P&&d.jsx("span",{className:aB,children:P})]})},B.place_id)})})]})]})}const lB="flex flex-col gap-2.75",cB="relative flex flex-col gap-1.75",uB=400;function dB({slot:e,fixed:t,value:a,propertyId:r,commit:s}){const{apiFetch:c}=Yt().api,u=x.useMemo(()=>II(a),[a]),[m,p]=x.useState(null),[y,v]=x.useState(null),[g,w]=x.useState({}),k=x.useRef({});x.useEffect(()=>()=>{Object.values(k.current).forEach(clearTimeout)},[]);const E=ar({items:u,identityOf:D=>D.id,fixed:t,axis:"y",commit:s}),{rows:S}=E,{urls:j,dropUrl:C}=SO(r,u);function A(D){w(L=>({...L,[D]:!0})),clearTimeout(k.current[D]),k.current[D]=setTimeout(()=>w(L=>{const P={...L};return delete P[D],P}),uB)}async function O(D){if(p(null),!!E.canAdd&&!E.latestRows().some(L=>L.value.place_id===D.place_id)){v(D);try{let L;try{L=await vO(c,r,D.place_id)}catch{p("Couldn't add that place. Try again.");return}if(E.latestRows().some(P=>P.value.place_id===L.place_id))return;E.add(L),A(L.id)}finally{v(null)}}}const{containerRef:T,getItemProps:R}=E.drag,B=new Set(S.map(D=>D.value.place_id));return d.jsxs("div",{className:lB,role:"group","aria-label":e.label,children:[d.jsx(jO,{propertyId:r,placeholder:e.placeholder??"Search nearby…",addedIds:B,disabled:!E.canAdd,disabledHint:"Set by its source",onSelect:D=>void O(D)}),m&&d.jsx("span",{className:wO,children:m}),(S.length>0||y)&&d.jsxs("div",{className:cB,ref:T,children:[y&&d.jsxs("div",{className:ie(_b,kO),"aria-live":"polite",children:[d.jsx("span",{className:Sb,children:d.jsx("span",{className:_O})}),d.jsxs("div",{className:Eb,children:[d.jsx("span",{className:jb,children:y.name}),d.jsx("span",{className:Ob,children:"Adding…"})]})]}),S.map(D=>d.jsx(EO,{row:D.value,photoUrl:j[D.value.place_id],onPhotoError:()=>C(D.value.place_id),onRemove:E.canRemove?()=>E.remove(D.key):void 0,dragProps:R(D.key),flashNew:g[D.value.id]===!0},D.key))]})]})}const fB={property:"this property's",library:"your"},hB={property:tr.pages,library:js.pages};function Fo(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function Gk(e){return Jy({from:e.from??[]}).filter(t=>t!=="")}function mB(e){var r,s;const t=Id(Fo(e.source));if(t!==null){const c=(r=Fo(e.source))==null?void 0:r.key;return[t.reading==="registry"&&typeof c=="string"?c:Gr[t.table]]}const a=Fo(e.element);if(a===null)return[];if(a.type==="row"||a.type==="media"||typeof a.type=="string"&&xs(a.type))return Gk(a);for(const c of Object.values(Fo(a.fields)??{})){const u=Fo(c);if(u!==null&&((s=Fo(u.source))==null?void 0:s.kind)==="element")return Gk(u)}return[]}function pB(e){const t=e.indexOf("."),a=e.slice(0,t);if(a!=="property"&&a!=="library")return null;const r=hB[a],s=e.slice(t+1),c=Object.hasOwn(r,s)?r[s]:null;return c!==null&&BR(c)&&c.declaration.type==="list"?{home:a,label:XR(c)}:null}function OO(e){const t=[...new Set(mB(e))],a=t.length===1?pB(t[0]):null;return a===null?null:`From ${fB[a.home]} ${sr(a.label).plural}`}function yB(e,t){var a;return((a=e==null?void 0:e.scalar)==null?void 0:a[t])===!0}function AO(e,t){return`${e}.${t}`}function Ec(e){const t=e.indexOf(".");return t<=0||t===e.length-1||e.includes(".",t+1)?null:{object:e.slice(0,t),field:e.slice(t+1)}}function ld(e,t){const a=Ec(t);if(a===null)return e[t];const r=e[a.object];return r!==null&&typeof r=="object"&&!Array.isArray(r)?r[a.field]:void 0}function gB(e,t,a){const r=Ec(t);if(r===null)return{...e,[t]:a};const s=e[r.object],c=s!==null&&typeof s=="object"&&!Array.isArray(s)?s:{};return{...e,[r.object]:{...c,[r.field]:a}}}function bB(e,t,a,r){var s,c,u;return yB(e,t)||((u=(c=(s=e==null?void 0:e.items)==null?void 0:s[t])==null?void 0:c[a])==null?void 0:u[r])===!0}function vB(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}const NO=e=>{var t;return(t=vB(e))==null?void 0:t.source};function xB(e,t){return Object.entries(e).flatMap(([a,r])=>{const s=pc(NO(r));return s!==null&&s.slot===t?[{key:a,member:s.field}]:[]})}function wB(e,t){var s;const a=pc(NO(e));if(a===null)return!1;const r=t.fields===void 0?{}:{siblings:t.fields};return((s=P_(t.slots??{},r,a.slot))==null?void 0:s.def.type)==="address"}function bs(e){var t;return((t=e.source)==null?void 0:t.kind)==="element"}function MO(e){return e.type==="row"}function CO(e,t,a){const r={};for(const s of xB(Object.fromEntries(e),t))Object.hasOwn(a,s.member)&&(r[s.key]=a[s.member]);return r}function Ab(e,t,a,r){const s=Go(e);for(const[c,u]of e)bs(u)&&(s[c]=a,r&&Object.assign(s,CO(e,c,r)));return s[t]=a,s}function RO(e,t,a){var c;const r=(c=t.find(([,u])=>MO(u)&&bs(u)))==null?void 0:c[0],s=r!==void 0?e[r]:void 0;return typeof s=="string"&&s!==""?s:wb(e,a)}function Rd(e,t,a){return e.flatMap(r=>RO(r,t,a)??[])}function kB(e,t){return e.map(a=>{const r=t.get(a);return r===void 0?{id:a}:{id:a,members:r}})}function TO(e,t,a,r,s,c){return Ts(e,kB(r,s),u=>RO(u,t,a),u=>Ab(t,a,u.id,u.members),c)}function _B(e,t,a,r,s){const c=e.map((m,p)=>({key:String(p),value:m}));return TO(c,t,a,r,s,m=>({key:"",value:m})).map(m=>m.value)}function SB(e){const t=e.split(/\s+/).filter(r=>/[\p{L}\p{N}]/u.test(r));return(t.length>1?[t[0][0],t[t.length-1][0]]:[...(t[0]??"").slice(0,2)]).join("").toUpperCase()}const EB="flex min-w-0 flex-1 items-center gap-[calc(12*var(--content))]",jB={bar:"size-[calc(32*var(--content))] rounded-[calc(7*var(--content))] text-[length:calc(12*var(--content))]",cell:"size-[calc(22*var(--content))] rounded-[calc(5*var(--content))] text-[length:calc(9.5*var(--content))]"},DO={bar:"text-[length:calc(15*var(--content))]",cell:"text-[length:calc(12.5*var(--content))]"},OB={bar:"text-[length:calc(13.5*var(--content))]",cell:"text-[length:calc(12*var(--content))]"};function rp({face:e,imageUrl:t,size:a="bar"}){return d.jsxs("span",{className:EB,"data-row-face":"",children:[e.image!==null&&d.jsx("span",{className:ie("relative grid shrink-0 place-items-center overflow-hidden bg-line-soft font-semibold text-ink-3",jB[a]),"data-row-face-thumb":"",children:t?d.jsx("img",{src:t,alt:"",className:"absolute inset-0 size-full object-cover object-top"}):SB(e.title)}),d.jsxs("span",{className:"flex min-w-0 items-baseline gap-[calc(8*var(--content))]",children:[d.jsx("span",{className:ie("min-w-0 shrink truncate font-medium text-ink",DO[a]),children:e.title}),e.supporting!==null&&d.jsx("span",{className:ie("min-w-0 shrink-[2] truncate text-ink-3",OB[a]),children:e.supporting})]})]})}function op({children:e,size:t="bar"}){return d.jsx("span",{className:ie("min-w-0 flex-1 truncate text-ink-4",DO[t]),children:e})}const AB="flex w-full items-center gap-2.5 rounded-[calc(8*var(--content))] border border-line bg-white py-[calc(7*var(--content))] pl-[calc(10*var(--content))] pr-[calc(7*var(--content))] text-ink",Kk={contacts:"Contact",units:"Unit",comparables:"Comparable",commercial_spaces:"Commercial space"};function ec(e){return typeof e=="string"&&e!==""?e:null}function NB(e){const t=e==null?void 0:e.fieldKey;return e===void 0||t===void 0?[]:(e.siblingRecords??[]).flatMap((a,r)=>{if(r===e.itemIndex)return[];const s=ec(a[t]);return s===null?[]:[s]})}function MB({slot:e,value:t,onChange:a,onRowPick:r,recordContext:s,...c}){var E;const{TablePicker:u}=Yt(),[m,p]=x.useState(null),y=c.rowTable??bf(e),v=y.kind==="table"&&y.inert!==!0?y.tables:null,g=!bs(e),w=(S,j)=>{S!==t&&(r?r(S,j):a(S))},k=bj(e.label);return d.jsxs("div",{className:Qr,role:"group","aria-label":e.label,children:[d.jsxs("div",{className:AB,children:[d.jsx(Nb,{rowTable:y,value:t}),v!==null&&u!==void 0&&d.jsxs("span",{className:Oj,children:[t!==null&&!df(t)&&d.jsx(LO,{label:`Edit ${k}`,onClick:()=>p("record")}),g&&d.jsx(CB,{label:((E=ab(e).choose)==null?void 0:E.label)??Wl("Choose",k),onClick:()=>p("pick")}),g&&t!==null&&d.jsx(uf,{icon:As,label:`Remove ${k}`,title:"Remove",tone:"remove",onClick:()=>w(null,{})})]})]}),m==="record"&&t!==null&&v!==null&&u!==void 0&&d.jsx(u,{open:!0,mode:"record",tables:v,rowId:t,onClose:()=>p(null)}),m==="pick"&&v!==null&&u!==void 0&&d.jsx(u,{open:!0,mode:"single",tables:v,selectedId:t,disabledIds:NB(s),onPick:w,onClose:()=>p(null)})]})}function LO({label:e,onClick:t}){return d.jsx(uf,{icon:Ag,label:e,title:"Edit",onClick:t})}function CB({label:e,onClick:t}){return d.jsx(uf,{icon:gj.Choose,label:e,title:"Choose",onClick:t})}function Nb({rowTable:e,value:t,size:a="bar"}){const{TableRowSummary:r}=Yt();switch(e.kind){case"table":{if(df(t))return d.jsx(rp,{face:{title:`New ${Kk[e.tables[0]].toLowerCase()}`,supporting:null,image:null},size:a});if(r)return d.jsx("span",{className:"flex min-w-0 flex-1",children:d.jsx(r,{tables:e.tables,rowId:t,size:a})});const s=Kk[e.tables[0]];return t===null?d.jsxs(op,{size:a,children:["No ",s.toLowerCase()," chosen"]}):d.jsx(rp,{face:{title:s,supporting:null,image:null},size:a})}case"content":return t===null?d.jsx(op,{size:a,children:"None"}):d.jsx(rp,{face:{title:e.labelOf(t)??"Untitled",supporting:null,image:null},size:a});case"none":return d.jsx(op,{size:a,children:"Set automatically"})}}const RB={model:{defaultValue:null,coerce:ec,isEmpty:e=>e===null,isInvalid:()=>!1},faces:{compact:MB},applyOptimistic:null};function TB(e){var t,a,r,s;switch(mS(e,fO)){case"media":return((t=e.element)==null?void 0:t.type)==="media"?Zm:((a=e.element)==null?void 0:a.type)==="video"?t6:((r=e.element)==null?void 0:r.type)==="tour"?Mg:((s=e.element)==null?void 0:s.type)==="document"?Zm:ny;case"upload":return Zm;case"poi":return M6;case"annotated-media":return ny;case"object":case"row":return $L;case"scalar":return uE}}function vf(e){switch(e.type){case"text":return v8;case"url":return Og;case"image":case"media":return Wd;case"video":return Rg;case"tour":return Mg;case"poi":return dE;case"address":return O6;case"document":return Zd;case"select":return U6;case"list":return TB(e);default:return kg}}function Mb(e){const t=new Set(e.map(vf));return t.size===1?[...t][0]:kg}const DB="relative flex flex-col gap-2",LB={large:"gap-3",compact:"gap-2"},zB="group/li flex 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-line-strong focus-within:border-accent",$B={field:"cursor-text",bar:"cursor-grab pr-2"},UB=ie(vt,"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]");function IB(e){const t=e.currentTarget.control;if(!t||e.target===t||e.target.closest("button")||(e.preventDefault(),t.focus(),!(t instanceof HTMLInputElement)))return;const r=e.clientX<t.getBoundingClientRect().left?0:t.value.length;t.setSelectionRange(r,r)}function Cb({engine:e,itemKind:t="field",label:a,add:r,choose:s,size:c,renderControl:u,renderActions:m,onAdd:p,renderAdd:y,addUnbound:v=!1,empty:g}){const{rows:w,drag:k}=e,{containerRef:E,getItemProps:S}=k,j=y==null?void 0:y(e.add),C=w.length===0&&g!==void 0&&j==null;return d.jsx("div",{className:Qr,role:"group","aria-label":a,children:d.jsxs("div",{className:ie("flex flex-col",LB[c]),children:[e.canAdd&&d.jsx(bc,{size:c,add:r,onAdd:v?null:()=>p(e.add),choose:s}),C&&g,j,w.length>0&&d.jsx("div",{className:DB,ref:E,children:w.map(A=>d.jsxs("label",{htmlFor:A.key,onClick:IB,...S(A.key),className:ie(zB,$B[t]),children:[d.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",children:d.jsx(Rt.grip,{})}),u({id:A.key,value:A.value,onChange:O=>e.setValue(A.key,O)}),t==="bar"&&d.jsxs("span",{className:Oj,children:[m==null?void 0:m({id:A.key,value:A.value}),e.canRemove&&d.jsx(uf,{icon:As,label:`Remove ${sr(a).singular}`,title:"Remove",tone:"remove",onClick:()=>e.remove(A.key)})]}),e.canRemove&&t==="field"&&d.jsx("button",{type:"button",className:UB,title:"Remove",onClick:()=>e.remove(A.key),children:d.jsx(Rt.trash,{})})]},A.key))})]})})}function BB({engine:e,label:t,add:a,placeholder:r="List item",maxLength:s,size:c}){return d.jsx(Cb,{engine:e,label:t,add:a,size:c,renderControl:({id:u,value:m,onChange:p})=>d.jsx(I8,{id:u,value:m,onChange:p,placeholder:r,ariaLabel:r,maxLength:s,className:ie("cursor-[inherit]",yE)}),onAdd:u=>u("")})}const HB="flex min-w-0 flex-1 cursor-[inherit] items-center gap-2.5 py-[calc(7*var(--content))] pl-[calc(2*var(--content))] text-ink",qB="relative h-[calc(280*var(--frame))]",FB=5,PB=ie("flex items-center gap-2 rounded-[calc(8*var(--content))] px-2.75 py-[calc(7*var(--content))] pr-2",Lg),VB=ie("block size-[calc(13*var(--content))] rounded-[calc(3*var(--content))]",jn),Yk=["w-[28%]","w-[22%]","w-[34%]"];function GB({position:e}){return d.jsxs("div",{className:PB,children:[d.jsx("span",{className:"grid w-3.5 shrink-0 place-items-center",children:d.jsx("span",{className:ie("block h-[calc(14*var(--content))] w-[calc(6*var(--content))] rounded-full",jn)})}),d.jsxs("span",{className:"flex min-w-0 flex-1 items-center gap-[calc(12*var(--content))] pl-[calc(2*var(--content))]",children:[d.jsx("span",{className:ie("block size-[calc(32*var(--content))] shrink-0 rounded-[calc(7*var(--content))]",jn)}),d.jsx("span",{className:ie("block h-[calc(10*var(--content))] rounded-full",jn,Yk[e%Yk.length])}),d.jsx("span",{className:ie("block h-[calc(8*var(--content))] w-[16%] rounded-full",jn)})]}),[0,1].map(t=>d.jsx("span",{className:"grid h-[calc(36*var(--content))] w-[calc(36*var(--content))] shrink-0 place-items-center",children:d.jsx("span",{className:VB})},t))]})}function KB(e){return ec(typeof e=="object"&&e!==null?e.id:e)}function YB({slot:e,face:t,rowTable:a,verbs:r,fixed:s,value:c,commit:u}){const{TablePicker:m,TableCreate:p}=Yt(),y=ar({items:c.map(KB),fixed:s,axis:"y",commit:u}),[v,g]=x.useState(!1),[w,k]=x.useState(!1),[E,S]=x.useState(null),j=a.kind==="table"&&a.inert!==!0?a.tables:null,C=j!==null?m:void 0,A=j!==null?p:void 0,O=sr(e.label).singular,T=()=>g(!0),R=C!==void 0&&r.choose!==null?{choose:r.choose,onChoose:T}:void 0,B=r.add,D=()=>k(!0),L=A!==void 0,P=y.rows.flatMap(ee=>ee.value!==null?[ee.value]:[]),le=t==="expanded"&&y.rows.length===0?OO(e):null;return d.jsxs(d.Fragment,{children:[d.jsx(Cb,{engine:y,itemKind:"bar",label:e.label,add:B,...R!==void 0?{choose:R}:{},size:t==="expanded"?"large":"compact",addUnbound:!L,onAdd:D,...t==="expanded"?{empty:d.jsxs("div",{className:qB,children:[d.jsx(gc,{className:"flex flex-col gap-2",children:Array.from({length:FB},(ee,de)=>d.jsx(GB,{position:de},de))}),d.jsx(_d,{icon:Ha.createElement(vf(e),{size:25,strokeWidth:1.8}),headline:B.empty,...le!==null?{line:le}:{}})]})}:{},renderControl:({id:ee,value:de})=>d.jsx("div",{id:ee,className:HB,children:d.jsx(Nb,{rowTable:a,value:de})}),renderActions:({value:ee})=>C!==void 0&&ee!==null&&d.jsx(LO,{label:`Edit ${O}`,onClick:()=>S(ee)})}),E!==null&&C!==void 0&&j!==null&&d.jsx(C,{open:!0,mode:"record",tables:j,rowId:E,onClose:()=>S(null)}),w&&A!==void 0&&j!==null&&d.jsx(A,{tables:j,onCreated:ee=>{k(!1),y.rows.some(de=>de.value===ee)||y.add(ee)},onClose:()=>k(!1)}),v&&C!==void 0&&j!==null&&d.jsx(C,{open:!0,mode:"multi",tables:j,selectedIds:P,onChange:ee=>y.replace(Ts(y.rows,ee.map(de=>({id:de})),de=>de,de=>de.id,y.mint)),onClose:()=>g(!1)})]})}const QB=12;function XB(e,t,a,r){if(e.top>=r&&e.bottom<=t-r)return null;const c=Math.max(0,a+e.top-r);return Math.abs(c-a)<1?null:c}function ZB({icon:e,title:t,subtitle:a,showGrip:r=!1,open:s}){return d.jsxs(d.Fragment,{children:[r?d.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:d.jsx(ci,{name:"grip",size:14,stroke:1.8})}):null,d.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:e}),a?d.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-px",children:[d.jsx("span",{className:"truncate text-[length:calc(13.5*var(--content))] font-medium text-ink-2",children:t}),d.jsx("span",{className:"truncate text-[length:calc(11.5*var(--content))] text-ink-3 [font-variant-numeric:tabular-nums]",children:a})]}):d.jsx("span",{className:"min-w-0 flex-1 truncate text-left text-[length:calc(13.5*var(--content))] font-medium text-ink-2",children:t}),d.jsx(WB,{open:s})]})}function WB({open:e}){return d.jsx("span",{"data-acc-open":e,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:d.jsx(ci,{name:"chevDown",size:14,stroke:1.8})})}const Rl=new WeakSet;function zO({open:e,onToggle:t,icon:a,title:r,subtitle:s,scrollKey:c,dragId:u,dragHandleProps:m,children:p}){const y=x.useRef(null);return x.useEffect(()=>{if(!e)return;const v=y.current,g=v==null?void 0:v.closest(".hp-sb-scroll");if(!v||!g||Array.from(v.querySelectorAll(".we-acc")).some(C=>Rl.has(C)))return;Rl.add(v);const w=window.matchMedia("(prefers-reduced-motion: reduce)").matches,k=()=>{Rl.delete(v);const C=v.getBoundingClientRect(),A=g.getBoundingClientRect(),O=XB({top:C.top-A.top,bottom:C.bottom-A.top,height:C.height},g.clientHeight,g.scrollTop,QB);O!=null&&g.scrollTo({top:O,behavior:w?"auto":"smooth"})};if(w){const C=requestAnimationFrame(k);return()=>{cancelAnimationFrame(C),Rl.delete(v)}}const E=new AbortController,S=()=>{E.abort(),window.clearTimeout(j),k()};v.addEventListener("transitionend",C=>{C.propertyName==="grid-template-rows"&&C.target instanceof Node&&C.target.parentNode===v&&S()},{signal:E.signal});const j=window.setTimeout(S,280);return()=>{E.abort(),window.clearTimeout(j),Rl.delete(v)}},[e,c]),d.jsxs("div",{ref:y,"data-open":e,"data-dragid":u,className:ie("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:[d.jsx("button",{type:"button",className:ie("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",m?"pl-2":"pl-3.5",m&&"touch-none"),onClick:t,onPointerDown:m==null?void 0:m.onPointerDown,"aria-expanded":e,children:d.jsx(ZB,{icon:a,title:r,subtitle:s,showGrip:m!=null,open:e})}),d.jsx("div",{"data-acc-open":e,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":!e,children:d.jsx("div",{className:"min-h-0 overflow-hidden",children:d.jsx("div",{"data-acc-open":e,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:p})})})]})}function Qk(e){return fS(e)}function JB(e){const t=[];for(let a=0;a<e.length;a++){const r=e[a+1];Qk(e[a])&&r!==void 0&&Qk(r)?(t.push({kind:"pair",indices:[a,a+1]}),a++):t.push({kind:"single",index:a})}return t}function eH({items:e,rows:t}){const a=r=>r&&d.jsxs("div",{className:`${Qr} min-w-0`,...r.attrs,children:[r.label!==null?d.jsx(U8,{children:r.label}):null,r.node]},r.key);return d.jsx("div",{className:C8,children:t.map(r=>r.kind==="pair"?d.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[a(e[r.indices[0]]),a(e[r.indices[1]])]},`p${r.indices[0]}`):d.jsx("div",{children:a(e[r.index])},`s${r.index}`))})}const tH='input, textarea, select, button, [tabindex]:not([tabindex="-1"]), [contenteditable="true"]',Td="data-field-name",Rb="data-field-scope";function nH(e,t){var r;const a=(r=e.parentElement)==null?void 0:r.closest(`[${Rb}]`);return a==null||a===t||!t.contains(a)}function $O(e,t){var r;const a=Array.from(e.querySelectorAll(`[${Td}]`)).find(s=>s.getAttribute(Td)===t&&nH(s,e));a&&(a.scrollIntoView({block:"nearest"}),(r=a.querySelector(tH))==null||r.focus({preventScroll:!0}))}function iH(e){const t={fields:Object.fromEntries(e)};return e.filter(([,a])=>Ld(a,t)&&!k5(a))}const aH="data-object-fields";function Tb({fields:e,lone:t=!1,reveal:a,renderField:r}){const s=Gg(),c=iH(e),u=x.useRef(null);return x.useEffect(()=>{if(!a)return;const m=requestAnimationFrame(()=>{u.current&&$O(u.current,a)});return()=>cancelAnimationFrame(m)},[a]),d.jsx("div",{ref:u,[aH]:s,[Rb]:"",children:d.jsx(eH,{rows:JB(c.map(([,m])=>m)),items:c.map(([m,p])=>({key:m,label:t?null:p.label||m,attrs:{[Td]:m},node:r(m,p)}))})})}function jc({slot:e,instanceId:t,slotId:a,value:r,propertyId:s,onChange:c,required:u,overridden:m,selectedItemIndex:p,selectedFieldName:y,itemBaseline:v,boundRowId:g,boundRowTable:w,membership:k,rowTable:E,onRowPick:S,onUpload:j,recordContext:C,factPath:A}){const O=Gg(),T=V8(e.type==="list"?void 0:A),R=zs(e.type);if(!R)return null;const B=I$(O),D=R.faces[B];if(!D)return null;const L=R.model.coerce(r),P=d.jsx(D,{slot:e,instanceId:t,slotId:a,value:L,onChange:c,required:u,propertyId:s,selectedItemIndex:p,selectedFieldName:y,overridden:m,itemBaseline:v,boundRowId:g,boundRowTable:w,membership:k,rowTable:E,onRowPick:S,onUpload:j,recordContext:C,factPath:A});return T===null?P:d.jsxs("div",{className:"flex flex-col gap-[calc(6*var(--content))]",children:[P,d.jsx(G8,{mark:T})]})}const rH=ie(vt,"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"),oH="relative flex flex-col gap-3";function sH(e,t){return bs(e)?t:bf(e)}function lH({slot:e,entries:t,fixed:a,instanceId:r,slotId:s,value:c,commit:u,membership:m,verbs:p,selectedItemIndex:y,selectedFieldName:v,itemBaseline:g,rowTable:w,insideRecord:k=!1,factPath:E}){var ii;const{TablePicker:S,TableCreate:j}=Yt(),C=Mb(t.map(([,we])=>we)),A=Pa(we=>we.session.property_id),O=Pa(we=>we.select),T=Pa(we=>{var Te,Ce;return(Ce=(Te=we.content_doc)==null?void 0:Te.instances.find(Xe=>Xe.instance_id===r))==null?void 0:Ce.slot_overrides}),R=m.kind==="table"?m.table:null,B=bO({instanceId:r,slotId:s,membership:m,itemBaseline:g,insideRecord:k}),{identityKey:D}=B,L=Xa(e)??{fields:Object.fromEntries(t)},P=nb(sr(e.label).singular),{add:le}=p,ee=(we,Te)=>pf(gs(L,`${P} ${Te+1}`),L,we),de=gs(L,""),K=de.kind==="field"?de.field:void 0,[Q,se]=x.useState(!1),[N,V]=x.useState(!1),[te,me]=x.useState(null);function Y(we){O({kind:"slot",instance_id:r,slot_id:s,item_index:we})}const M=x.useRef(null),H=ar({items:c,identityOf:B.identityOf,fixed:a,axis:"y",commit:(we,Te)=>u(B.stamp(we),Te),onCommitted:(we,Te)=>{const Ce=M.current;if(k||Te!=="reorder"&&Te!=="replace"||Ce==null)return;const Xe=we.findIndex(at=>at.key===Ce);Xe<0?O({kind:"slot",instance_id:r,slot_id:s}):(Te==="reorder"||Xe!==H.indexOf(Ce))&&Y(Xe)}}),{rows:I}=H,F=k?te:y!=null?H.keyAt(y):null,W=F!=null?H.indexOf(F):-1;x.useEffect(()=>{M.current=F},[F]);function pe(we){if(k){me(we);return}const Te=H.indexOf(we);Te<0||Y(Te)}function oe(){k?me(null):O({kind:"slot",instance_id:r,slot_id:s})}function ke(we){F===we?oe():pe(we)}const z=m.kind==="pick-row"||m.kind==="table"?xb(m):null,ce=H.canAdd&&(m.kind!=="pick-row"||j!==void 0),ge=p.choose!==null&&H.canAdd&&(z!==null&&S!==void 0||m.kind==="pick-media"),Se=(ii=t.find(([,we])=>bs(we)))==null?void 0:ii[0];function Le(we){const Te=H.mint(we);H.insert(Te),k?me(Te.key):Y(0)}function Ie(){ge&&se(!0)}function ye(){if(ce){if(m.kind==="pick-row"){V(!0);return}if(m.kind==="pick-media"){se(!0);return}Le(R?{...Go(t),[D]:Nj()}:Go(t))}}function Re(we,Te){H.replace(TO(I,t,D,we,Te,H.mint))}function ht(we,Te){const Ce=Go(t);for(const[Xe,at]of t)bs(at)&&(Ce[Xe]=at.type==="image"?tb(we,{asset_id:"",url:"",alt:""},Te,bS(at.crop),m.kind==="pick-media"?m.filter.from:void 0):{asset_id:we.id,url:ms(we),alt:""});return Ce}function $e(we){var Ce;const Te=Se===void 0||(Ce=we[Se])==null?void 0:Ce.asset_id;return typeof Te=="string"&&Te!==""?Te:null}function Lt(we,Te){const Ce=Ts(I,we,$e,at=>ht(at,Te),H.mint),Xe=new Set(Ce.map(at=>at.key));for(const at of I)Xe.has(at.key)||B.markRemoved(at);H.replace(Ce)}function lt(we){if(!H.canRemove)return;const Te=I.find(Xe=>Xe.key===we);Te&&B.markRemoved(Te);const Ce=H.indexOf(we);H.remove(we),F===we?oe():!k&&W>=0&&Ce>=0&&Ce<W&&Y(W-1)}function Fn(we,Te,Ce={}){const Xe=I.find(at=>at.key===we);Xe!=null&&(B.markFields(Xe,Te),H.setValue(we,{...Xe.value,...Ce,...Te}))}function An(we,Te,Ce,Xe){const at=I.find(ne=>ne.key===we);if(at==null)return;const Qt=B.markerIdentity(at),ut=Ce===null?{}:CO(t,Te,Xe);if(Qt!==null)for(const ne of Object.keys(ut))bB(T,s,Qt,ne)&&delete ut[ne];Fn(we,{[Te]:Ce},ut)}const{containerRef:un,getItemProps:gt,draggingKey:aa}=H.drag,di=ge&&p.choose!==null?{choose:p.choose,onChoose:Ie}:void 0;return d.jsxs("div",{className:"flex flex-col gap-3",children:[d.jsx(bc,{size:"compact",add:le,onAdd:ce?ye:null,choose:di}),I.length>0&&d.jsx("div",{ref:un,className:oH,children:I.map((we,Te)=>{const Ce=ee(we.value,Te),Xe=F===we.key;return d.jsx("div",{children:d.jsx(zO,{open:aa==null&&Xe,onToggle:()=>ke(we.key),icon:d.jsx(C,{size:14}),title:Ce,scrollKey:we.key,dragId:we.key,dragHandleProps:{onPointerDown:gt(we.key).onPointerDown},children:d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx(Tb,{fields:t,reveal:!k&&Xe?v:void 0,renderField:(at,Qt)=>d.jsx(jc,{slot:Qt,instanceId:r,slotId:s,value:we.value[at],propertyId:A,onChange:ut=>Fn(we.key,{[at]:ut}),...vE(Qt.type)?{factPath:Zl(Xl(E,we.value),at)}:{},...MO(Qt)?{rowTable:sH(Qt,w),onRowPick:(ut,ne)=>An(we.key,at,ut,ne)}:{},recordContext:{...R?{itemId:wb(we.value,D)??void 0}:{},itemIndex:Te,siblingRecords:I.map(ut=>ut.value),fieldKey:at,table:R,...K?{titleKey:K}:{},membership:m}})}),Xe&&H.canRemove&&d.jsxs("button",{type:"button",className:ie(rH,"max-w-full"),onClick:()=>lt(we.key),children:[d.jsx("span",{className:"inline-flex shrink-0",children:d.jsx(Rt.trash,{size:13})}),d.jsxs("span",{className:"min-w-0 truncate",children:["Delete ",Ce]})]})]})})},we.key)})}),N&&z!==null&&j!==void 0&&d.jsx(j,{tables:z,onCreated:(we,Te)=>{V(!1),Rd(I.map(Ce=>Ce.value),t,D).includes(we)||Le(Ab(t,D,we,Te))},onClose:()=>V(!1)}),Q&&z!==null&&S&&d.jsx(S,{open:!0,mode:"multi",tables:z,selectedIds:Rd(I.map(we=>we.value),t,D),onChange:Re,onClose:()=>se(!1)}),Q&&m.kind==="pick-media"&&d.jsx(fb,{propertyId:A,children:we=>d.jsx(_c,{mode:"multi",propertyId:A,filter:m.filter,selectedIds:I.flatMap(Te=>$e(Te.value)??[]),onChange:Te=>Lt(Te,we),onClose:()=>se(!1)})})]})}const sp={listing_intent:e=>[{value:"for_sale",label:"For Sale"},{value:"for_rent",label:"For Rent"}]};function cH(e){return typeof e=="string"?{value:e,label:e}:{value:e.value,label:e.label,...e.icon!==void 0?{icon:e.icon}:{},...e.description!==void 0?{description:e.description}:{}}}function UO(e,t){var r,s;if(e.values)return e.values.map(cH);const a=(r=e.options)==null?void 0:r.source;return a!==void 0&&a!==""?((s=sp[a])==null?void 0:s.call(sp,t))??[]:[]}function Bl(e){return e.trim().toLowerCase().replace(/\s+/g,"-")}const uH=["home","building","apartments","trendUp","tag","key","template","palette","filePen","library","plug","helpCircle","lock","creditCard","settings","power","user","plus","globe","image","fileText","users","eye","eyeOff","pulse","search","chart","layout","chevDown","chevRight","chevSelector","pencil","dots","grip","external","copy","trash","archive","sparkle","arrowUp","arrowDown","arrowLeft","arrowRight","undo","redo","logout","check","x","clock","calendar","mapPin","userPlus","mail","phone","share","upload","bookOpen","newspaper","presentation","instagram","facebook","linkedin","xLogo"],dH=new Set(uH);function IO(e){return typeof e=="string"&&dH.has(e)}const fH="fixed overflow-y-auto rounded-[calc(8*var(--content))] border border-line bg-white shadow-[0_16px_38px_-12px_rgba(20,18,13,0.4)]",BO=ie(vt,"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"),hH=ie(BO,"text-accent"),mH=4,Xk=160,Zk=240,pH=ie(vt,yE,"min-w-0 flex-1 cursor-text bg-transparent text-left text-ink outline-none placeholder:text-ink-4");function Wk({open:e,className:t,onMouseDown:a}){return d.jsx("span",{className:ie("flex flex-shrink-0 items-center text-ink-4 transition-transform duration-[120ms]",e&&"rotate-180",t),onMouseDown:a,"aria-hidden":"true",children:d.jsx("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:d.jsx("path",{d:"m6 9 6 6 6-6"})})})}function yH(){return d.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:d.jsx("path",{d:"M3.5 8.5l3 3 6-6.5"})})}function gH({option:e}){const t=IO(e.icon)?e.icon:null;return t===null&&e.description===void 0?d.jsx("span",{className:"truncate",children:e.label}):d.jsxs("span",{className:"flex min-w-0 items-start gap-2",children:[t!==null&&d.jsx(ci,{name:t,size:15,stroke:1.7,className:"mt-[calc(2*var(--content))] text-ink-3"}),d.jsxs("span",{className:"flex min-w-0 flex-col",children:[d.jsx("span",{className:"truncate",children:e.label}),e.description!==void 0&&d.jsx("span",{className:"text-caption leading-[1.35] text-ink-3",children:e.description})]})]})}function bH(e,t){const a=t.toLowerCase().trim();return a?e.filter(r=>r.label.toLowerCase().includes(a)):e}function vH(e,t){const a=Bl(t);if(a.length!==0)return e.find(r=>Bl(r.value)===a||Bl(r.label)===a)}function hy({label:e,value:t,options:a,onChange:r,placeholder:s,bare:c=!1,autoOpen:u=!1,onDismiss:m,id:p,creatable:y=!1,canCreate:v,attention:g=null}){const w=or(),[k,E]=x.useState(u),[S,j]=x.useState(0),[C,A]=x.useState(null),[O,T]=x.useState(""),R=x.useId(),B=x.useRef(null),D=x.useRef(null),L=x.useRef(null),P=a.findIndex(z=>z.value===t),le=P>=0?a[P]:void 0,ee=bH(a,k?O:""),de=O.trim(),K=k?vH(a,O):void 0,Q=K&&!ee.some(z=>z.value===K.value)?[...ee,K]:ee,se=y&&de.length>0&&!K&&((v==null?void 0:v(de))??!0),N=Q.length+(se?1:0);function V(){L.current&&A(cs(L.current)),j(Math.max(0,P)),E(!0)}const te=x.useCallback(()=>{E(!1),T(""),m==null||m()},[m]);function me(z){var ce;z.value!==t&&r(z.value),E(!1),T(""),(ce=D.current)==null||ce.focus()}function Y(z){var ce;r(z),E(!1),T(""),(ce=D.current)==null||ce.focus()}function M(z){var ce;if(!k){(z.key==="ArrowDown"||z.key==="Enter"||z.key===" ")&&(z.preventDefault(),V());return}if(z.key==="Escape")z.preventDefault(),(ce=D.current)==null||ce.focus(),te();else if(z.key==="ArrowDown")z.preventDefault(),j(ge=>Math.min(N-1,ge+1));else if(z.key==="ArrowUp")z.preventDefault(),j(ge=>Math.max(0,ge-1));else if(z.key==="Enter")if(z.preventDefault(),S<Q.length){const ge=Q[S];ge&&me(ge)}else se&&Y(de)}const H=x.useCallback(z=>{var Se,Le;const ce=(Se=B.current)==null?void 0:Se.contains(z),ge=(Le=document.getElementById(R))==null?void 0:Le.contains(z);return!ce&&!ge},[R]);function I(z){k&&H(z.relatedTarget)&&te()}x.useEffect(()=>{var z;u&&((z=D.current)==null||z.focus())},[u]),x.useEffect(()=>{if(!k)return;const z=()=>{L.current&&A(cs(L.current))};return z(),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z),()=>{window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z)}},[k]),x.useEffect(()=>{if(!k)return;const z=ce=>{H(ce.target)&&te()};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[k,H,te]);const F=z=>{z.preventDefault(),k||V()},W=d.jsx("input",{ref:D,id:p,className:c?pH:ie(w.inner,"cursor-text"),value:k?O:(le==null?void 0:le.label)??t,placeholder:s??"",role:"combobox","aria-haspopup":"listbox","aria-expanded":k,"aria-controls":R,"aria-label":e,onFocus:V,onClick:()=>{k||V()},onChange:z=>{T(z.target.value),k||V(),j(0)},onKeyDown:M}),pe=c?d.jsxs(d.Fragment,{children:[W,d.jsx(Wk,{open:k,className:"pl-2",onMouseDown:F})]}):d.jsxs(d.Fragment,{children:[W,d.jsx(Wk,{open:k,className:"pl-1 pr-2.75",onMouseDown:F})]}),oe=k&&C?uc(C,{maxHeight:Zk*2,minWidth:Xk,gap:mH}):null,ke=k&&oe&&N>0?ir.createPortal(d.jsxs("div",{className:fH,id:R,role:"listbox",style:{left:oe.left,top:oe.top,bottom:oe.bottom,minWidth:Math.max(oe.width,Xk),maxHeight:`min(${oe.maxHeight}px, calc(${Zk}*var(--content)))`,zIndex:Xr},children:[Q.map((z,ce)=>d.jsxs("button",{type:"button",role:"option","aria-selected":z.value===t,"data-active":ce===S,className:BO,onMouseEnter:()=>j(ce),onMouseDown:ge=>ge.preventDefault(),onClick:()=>me(z),children:[d.jsx(gH,{option:z}),z.value===t&&d.jsx(yH,{})]},z.value)),se&&d.jsx("button",{type:"button",role:"option","aria-selected":S===Q.length,"data-active":S===Q.length,className:hH,onMouseEnter:()=>j(Q.length),onMouseDown:z=>z.preventDefault(),onClick:()=>Y(de),children:d.jsxs("span",{className:"truncate",children:["Create “",de,"”"]})})]}),document.body):null;return c?d.jsxs("div",{className:"flex min-w-0 flex-1 items-center",ref:z=>{B.current=z,L.current=z},onBlurCapture:I,children:[pe,ke]}):d.jsxs("div",{className:w.frame,ref:B,onBlurCapture:I,children:[d.jsx(Wr,{attention:g,className:k?"border-accent":void 0,ref:L,children:pe}),ke]})}function xH({engine:e,label:t,add:a,options:r,unique:s=!1,creatable:c=!1,size:u}){const[m,p]=x.useState(!1),y=e.rows.map(E=>E.value),v=E=>s?r.filter(S=>S.value===E||!y.includes(S.value)):r,g=v(null),w=E=>!s||!y.some(S=>Bl(S)===Bl(E)),k=g.length>0?g:r;return d.jsx(Cb,{engine:e,label:t,add:a,size:u,renderControl:({id:E,value:S,onChange:j})=>d.jsx(hy,{bare:!0,id:E,label:t,value:S,options:v(S),onChange:j,creatable:c,canCreate:w}),onAdd:()=>p(!0),renderAdd:E=>m?d.jsx(hy,{bare:!0,autoOpen:!0,label:a.label,value:"",placeholder:"Choose one",options:k,onDismiss:()=>p(!1),onChange:S=>{p(!1),w(S)&&E(S)},creatable:c,canCreate:w}):null})}function wH({slot:e,itemSlot:t,add:a,fixed:r,value:s,commit:c,size:u}){const m=Pa(y=>y.session.listing_intent),p=ar({items:s,fixed:r,axis:"y",commit:c});return t.type==="select"?d.jsx(xH,{engine:p,label:e.label,add:a,options:UO(t,{listingIntent:m}),creatable:t.creatable===!0,unique:e.unique===!0,size:u}):d.jsx(BB,{engine:p,label:e.label,add:a,maxLength:t.cap,size:u})}const Jk="grid size-[calc(18*var(--content))] shrink-0 place-items-center border-[1.5px] bg-canvas transition-[border-color,background-color] duration-[120ms]";function kH({control:e,state:t,label:a,onToggle:r}){return d.jsx("button",{type:"button",role:e,"aria-checked":t.checked,"aria-label":a,disabled:t.disabled,className:ie(vt,"flex w-full items-center justify-center",t.disabled?"cursor-not-allowed":"cursor-pointer"),onClick:s=>{s.stopPropagation(),r()},children:e==="radio"?d.jsx("span",{"aria-hidden":"true",className:ie(Jk,"rounded-full",t.checked?"border-ink":"border-ink-4"),children:t.checked&&d.jsx("span",{className:"size-[calc(8*var(--content))] rounded-full bg-ink"})}):d.jsx("span",{"aria-hidden":"true",className:ie(Jk,"rounded-[calc(5*var(--content))]",t.checked?"border-ink bg-ink text-canvas":"border-ink-4 text-transparent"),children:d.jsx(Xd,{className:"size-[calc(11*var(--content))]",strokeWidth:3})})})}function _H(e){return e.derived!==void 0}const SH=new Set(["image","video","tour","document","media"]);function EH(e){switch(e.type){case"number":return 96;case"date":case"select":return 140;case"phone":return 150;case"url":case"email":return 200;case"address":return 260;case"image":case"video":case"tour":case"document":case"media":return 88;case"text":return e.size==="medium"||e.size==="long"?220:160;case"list":case"poi":return 140}}function jH(e){const t=EH(e),a=SH.has(e.type),r=`calc(${t}*var(--content))`;return{track:a?r:`minmax(${r},${t/100}fr)`,minPx:t}}function OH(e){const t=Object.entries(e.fields);return{used:new Set(t.map(([a])=>a)),required:new Set(t.filter(([,a])=>a.required===!0).map(([a])=>a))}}function HO(e){return e.reduce((t,a)=>t+a.minPx,0)}function AH(e,t,a=Number.POSITIVE_INFINITY){const r=Xa(e);if(r===null)return[];const s=gs(r,""),c=s.kind==="field"?s.field:null,u=[];for(const[v,g]of Ls(r)){if(_H(g)||g.locked===!0||!t.used.has(v))continue;const w=v===c,k=t.required.has(v),E={key:v,slot:g,header:g.label||v,required:k,title:w,...jH(g)};u.push({column:E,pinned:w||k})}let m=a-HO(u.filter(v=>v.pinned).map(v=>v.column)),p=!1;const y=[];for(const{column:v,pinned:g}of u)g?y.push(v):!p&&v.minPx<=m?(m-=v.minPx,y.push(v)):p=!0;return y}function qO(e){if(e===null||typeof e!="object")return null;const t=Ji(e);if(t===null||t==="")return null;if(qd(e)||ws(e))return{asset_id:t};const{kind:a,...r}=e;return{...r,asset_id:t,...typeof a=="string"&&yn(a)?{kind:a}:{}}}function Db(){return{image:Kj.model,video:Wj.model,tour:Qj.model,document:cO.model}}const NH=S9({model:{defaultValue:null,coerce:qO,isEmpty:e=>e===null||e.asset_id==="",isInvalid:()=>!1},models:Db}),MH=ie(vt,"inline-flex self-stretch w-auto max-w-full min-w-0 cursor-pointer items-center gap-[calc(10*var(--content))] rounded-[calc(7*var(--content))] border px-[calc(11*var(--content))]","text-[length:calc(12.5*var(--content))] font-medium transition-[background,border-color,color] duration-[120ms]","data-[empty]:border-dashed data-[empty]:text-ink-3 hover:data-[empty]:border-ink-4 hover:data-[empty]:text-ink-2","border-line text-ink-2 hover:border-ink-4 disabled:cursor-default",Ms),CH="inline-flex size-[calc(16*var(--content))] shrink-0 items-center justify-center opacity-80",RH="min-w-0 truncate";function xf({slot:e,reading:t,readingText:a,attention:r,scope:s,onOpen:c}){const u=Ds(),m=t===null,p=m?lf(e,s):null,y=p!==null?xj(p):null,v=y!==null?y.label:a!==void 0?`${e.label}: ${a}`:`Open ${e.label}`;return d.jsxs("button",{type:"button",className:MH,"data-summary-pill":e.type,"data-empty":m?"":void 0,...Cs(r,u),"aria-label":v,disabled:c===void 0,onClick:c,children:[d.jsx("span",{className:CH,children:Ha.createElement(y!==null?y.icon:vf(e),{size:14})}),d.jsx("span",{className:RH,children:m?e.label:t})]})}function wf({slot:e,value:t,required:a}){const r=zs(e.type);return r===null?null:rr(r.model,e,r.model.coerce(t),a??!1)}function TH(e){var a;const t=Array.isArray(e.value)?e.value.length:0;return d.jsx(xf,{slot:e.slot,reading:t===0?null:`${t} ${e.slot.label}`,readingText:String(t),attention:wf(e),scope:{table:((a=e.recordContext)==null?void 0:a.table)??null},onOpen:e.onOpen})}function DH(e){const t=iO.coerce(e.value),a=S_((t==null?void 0:t.street)??null,(t==null?void 0:t.unit)??null),r=[t==null?void 0:t.city,t==null?void 0:t.state,(t==null?void 0:t.postal)==null?null:By(t.postal)].filter(Boolean).join(", "),s=a!==""?a:r!==""?r:null;return d.jsx(xf,{slot:e.slot,reading:s,readingText:s??void 0,attention:wf(e)??(nO(t)?"required":null),onOpen:e.onOpen})}function LH(e){const t=kb(e.value);return d.jsx(xf,{slot:e.slot,reading:(t==null?void 0:t.name)??null,readingText:t==null?void 0:t.name,attention:wf(e),onOpen:e.onOpen})}function zH(e){const t=ec(e.value);return d.jsx(xf,{slot:e.slot,reading:t===null?null:d.jsx(Nb,{rowTable:bf(e.slot),value:t,size:"cell"}),attention:wf(e),onOpen:e.onOpen})}function Wu(e){const t=e.slot.type,a=zs(t).model;return d.jsx(Bj,{kind:t,model:a,onOpen:e.onOpen,props:{slot:e.slot,instanceId:e.instanceId,slotId:e.slotId,value:a.coerce(e.value),onChange:e.onChange,required:e.required,propertyId:e.propertyId,recordContext:e.recordContext,factPath:e.factPath}})}function $H(e){const t=zs("media").model;return d.jsx(k9,{models:Db(),onOpen:e.onOpen,props:{slot:e.slot,instanceId:e.instanceId,slotId:e.slotId,value:t.coerce(e.value),onChange:e.onChange,required:e.required,propertyId:e.propertyId,recordContext:e.recordContext,factPath:e.factPath}})}const UH={list:TH,image:Wu,video:Wu,tour:Wu,document:Wu,media:$H,address:DH,poi:LH,row:zH};function IH(e){const a=UH[e.slot.type];return a?d.jsx(a,{...e}):null}const Lb=24,FO=36,BH=36,HH=8,lp=e=>`calc(${e}*var(--content))`,PO=ie(Z$,"flex flex-col gap-3"),VO="flex min-h-0 flex-1 flex-col overflow-hidden rounded-[calc(12*var(--content))] border border-line bg-canvas",qH="-mb-px min-h-0 flex-1 overflow-auto",FH="transition-[background-color,opacity] duration-100 hover:bg-[#fbfaf6] focus-within:bg-[#faf8f1]",zb="h-[calc(44*var(--content))]",jr="flex min-w-0 items-stretch p-[calc(4*var(--content))]",PH=ie(cf,ub),VH="[data-table-cell] > *, input, textarea, select, button, a, [contenteditable], [role='button'], [role='checkbox'], [role='radio'], [tabindex]:not([tabindex='-1'])",$b="[:where(&)_:where([data-table-cell]>*,input,textarea,select,button,a,[contenteditable],[role=button],[role=checkbox],[role=radio],[tabindex]:not([tabindex='-1']))]:cursor-auto",GH=ie("cursor-grab",$b),KH=ie("cursor-pointer",$b),e2=e=>e.closest(VH)!==null,GO=11,Dd=["w-3/5","w-2/5","w-1/2","w-[70%]"],KO=ie("block h-[calc(9*var(--content))] rounded-full",jn),YH=ie("block h-[calc(22*var(--content))] w-[calc(76*var(--content))] rounded-full",jn),QH=ie("block size-[calc(13*var(--content))] rounded-[calc(3*var(--content))]",jn);function YO(e){return HH+BH*(e?2:1)}function QO(e,t){return Lb+(e?FO:0)+YO(t)}function XH(e,t,a){const r=YO(a),s=[lp(Lb),...t?[lp(FO)]:[],...e.map(u=>u.track),lp(r)],c=QO(t,a)+HO(e);return{style:{gridTemplateColumns:s.join(" "),minWidth:c},selection:t,actionsPx:r}}function ZH({columns:e,layout:t,position:a,marks:r}){return d.jsxs("div",{className:ie("grid items-center border-b border-line-soft",zb),style:t.style,children:[d.jsx("span",{}),t.selection&&d.jsx("span",{}),e.map((s,c)=>d.jsx("span",{className:"min-w-0 px-[calc(18*var(--content))]",children:d.jsx("span",{className:tg(s.slot.type)?ie(KO,Dd[(a+c)%Dd.length]):YH})},s.key)),d.jsx("span",{className:"flex justify-end pr-[calc(4*var(--content))]",children:Array.from({length:r},(s,c)=>d.jsx("span",{className:"grid w-[calc(36*var(--content))] place-items-center",children:d.jsx("span",{className:QH})},c))})]})}const WH=3,JH=ie("grid items-center border-b border-line-soft","grid-cols-[calc(24*var(--content))_repeat(3,minmax(0,1fr))_calc(44*var(--content))]",zb);function eq(){return d.jsx("div",{className:PO,"data-table-pending":"",children:d.jsx("div",{className:VO,children:d.jsx("div",{className:"relative min-h-0 flex-1",children:d.jsx(gc,{children:Array.from({length:GO},(e,t)=>d.jsxs("div",{className:JH,children:[d.jsx("span",{}),Array.from({length:WH},(a,r)=>d.jsx("span",{className:"min-w-0 px-[calc(18*var(--content))]",children:d.jsx("span",{className:ie(KO,Dd[(t+r)%Dd.length])})},r)),d.jsx("span",{})]},t))})})})})}function tq(){const e=x.useRef(null),t=x.useRef(null),[a,r]=x.useState(Number.POSITIVE_INFINITY);return x.useLayoutEffect(()=>{const s=e.current;if(s===null||typeof ResizeObserver>"u")return;const c=()=>{var y;const m=((y=t.current)==null?void 0:y.getBoundingClientRect().width)??0,p=s.clientWidth;m<=0||p<=0||r(p/(m/Lb))};c();const u=new ResizeObserver(c);return u.observe(s),()=>u.disconnect()},[]),{box:e,grip:t,widthPx:a}}const t2=new Set;function nq(e,t){const a=e[t];return typeof a=="string"&&a!==""?a:null}function cp(e,t,a){return e.rowId?e.rowId(t,a):nq(t,e.idKey)}function iq(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{}}const aq="input:not([disabled]), textarea:not([disabled]), select:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex='-1'])";function XO(e){return e instanceof HTMLTextAreaElement?!0:e instanceof HTMLInputElement?!["button","checkbox","radio","submit","reset","file","image","color","range"].includes(e.type):!1}function n2(e){return e instanceof HTMLSelectElement||e.getAttribute("aria-expanded")==="true"?!0:e instanceof HTMLInputElement&&["date","datetime-local","month","time","week","number","range"].includes(e.type)}function rq(e,t){if(!XO(e))return!0;let a,r;try{a=e.selectionStart,r=e.selectionEnd}catch{return!0}return a===null||r===null?!0:t==="start"?a===0&&r===0:a===e.value.length&&r===e.value.length}function oq(e){const{fields:t}=e;return t===null?d.jsx(eq,{}):d.jsx(sq,{...e,fields:t})}function sq({declaration:e,value:t,onChange:a,propertyId:r,instanceId:s="",slotId:c="",selection:u,onOpenRecord:m,onAdd:p,newRowStamp:y,fixed:v=!1,orderable:g=!0,add:w=ab(e).add,choose:k,factPath:E,fields:S}){const j=e,{itemContent:C}=hO(j,"expanded"),A=C.kind==="record"?C.entries:[],{box:O,grip:T,widthPx:R}=tq(),B=AH(j,S,R-QO(u!==void 0,m!==void 0)),D=Xa(j),L=D?gs(D,""):null,P=(L==null?void 0:L.kind)==="field"?L.field:void 0,le=XH(B,u!==void 0,m!==void 0),ee=Array.isArray(t)?t.map(iq):[],de=ar({items:ee,fixed:v,axis:"y",commit:(z,ce)=>a(z.map(ge=>ge.value),ce)}),{drag:K}=de,Q=de.rows,se=p!==null&&de.canAdd,N=Q.map(z=>({key:z.key,index:de.indexOf(z.key),value:z.value})),V=N.length===0,te=V?OO(j):null,me=x.useRef(null);x.useLayoutEffect(()=>{const z=me.current;z&&(me.current=null,Y(z.row,z.col))});function Y(z,ce){var Le;const ge=K.containerRef.current,Se=ge==null?void 0:ge.querySelector(`[data-table-cell][data-row="${z}"][data-col="${ce}"]`);(Le=Se==null?void 0:Se.querySelector(aq))==null||Le.focus()}function M(z,ce="top"){if(p){p();return}const ge=ce==="top"?0:de.rows.length;me.current={row:ge,col:z},de.add({...Go(A),...y==null?void 0:y()},ge)}function H(z,ce,ge){de.updateValue(z,Se=>({...Se,[ce]:ge}))}function I(z){if(z.defaultPrevented||z.altKey||z.ctrlKey||z.metaKey||z.nativeEvent.isComposing)return;const ce=z.target,ge=ce.closest("[data-table-cell]");if(!ge)return;const Se=Number(ge.dataset.row),Le=Number(ge.dataset.col),Ie=N.length-1;switch(z.key){case"Enter":{if(z.shiftKey||!XO(ce))return;z.preventDefault(),Se<Ie?Y(Se+1,Le):se&&M(Le,"below");return}case"ArrowDown":case"ArrowUp":{if(n2(ce))return;const ye=z.key==="ArrowDown"?Se+1:Se-1;if(ye<0||ye>Ie)return;z.preventDefault(),Y(ye,Le);return}case"ArrowLeft":case"ArrowRight":{if(n2(ce))return;const ye=z.key==="ArrowLeft",Re=ye?Le-1:Le+1;if(Re<0||Re>=B.length||!rq(ce,ye?"start":"end"))return;z.preventDefault(),Y(Se,Re);return}}}function F(z){const ce=`${nb(sr(e.label).singular)} ${z.index+1}`;if(!D||(L==null?void 0:L.kind)!=="field")return ce;const ge=pf(L,D,z.value);return ge==="Untitled"?ce:ge}const W=u?u.control:null;function pe(z){if(!u)return null;const ce=cp(u,z.value,z.index);return ce===null?{checked:!1,disabled:!0}:sb(u.ids,ce,u.held??t2)}function oe(z){const ce=u?cp(u,z.value,z.index):null;if(!u||ce===null)return;const ge=kj(u.ids,ce,u.control,u.held??t2);ge!==u.ids&&u.onChange(ge)}function ke(z,ce){var ht;const ge=pe(z),Se=K.getItemProps(z.key),Le=F(z),Ie=Xl(E,z.value),ye=ge!==null&&!ge.disabled,Re=u?cp(u,z.value,z.index):null;return d.jsxs("div",{role:"row","data-dragid":Se["data-dragid"],"data-disabled":(ge==null?void 0:ge.disabled)||void 0,"data-upstream":Re!==null&&((ht=u==null?void 0:u.upstream)==null?void 0:ht.has(Re))||void 0,onPointerDown:g?$e=>{e2($e.target)||Se.onPointerDown($e)}:void 0,onClick:ye?$e=>{e2($e.target)||oe(z)}:void 0,className:ie("group/row grid items-stretch border-b border-line-soft data-[disabled=true]:opacity-50 data-[disabled=true]:focus-within:opacity-100",Kg,zb,FH,ye?KH:g?GH:$b),style:le.style,children:[d.jsx("div",{role:"cell",className:ie(jr,"items-center justify-center"),children:g&&d.jsx("span",{"aria-hidden":"true",className:ie("flex w-full touch-none items-center justify-center","text-ink-4 opacity-0 transition-[opacity,color] duration-[120ms] group-hover/row:opacity-100 hover:text-ink-2","group-data-[drag-clone]/row:text-ink-2 group-data-[drag-clone]/row:opacity-100"),children:d.jsx(jg,{className:"size-[calc(14*var(--content))]",strokeWidth:1.8})})}),W&&d.jsx("div",{role:"cell",className:jr,children:ge&&d.jsx(kH,{control:W,state:ge,label:`Select ${Le}`,onToggle:()=>oe(z)})}),B.map(($e,Lt)=>d.jsx("div",{role:"cell","data-table-cell":"","data-row":ce,"data-col":Lt,"data-field":$e.key,className:jr,children:tg($e.slot.type)?d.jsx(jc,{slot:$e.slot,instanceId:s,slotId:c,propertyId:r,value:z.value[$e.key],required:$e.required,onChange:lt=>H(z.key,$e.key,lt),recordContext:{itemIndex:z.index,fieldKey:$e.key,...P?{titleKey:P}:{}}}):d.jsx(IH,{slot:$e.slot,instanceId:s,slotId:c,propertyId:r,value:z.value[$e.key],required:$e.required,onChange:lt=>H(z.key,$e.key,lt),recordContext:{itemIndex:z.index,fieldKey:$e.key,...P?{titleKey:P}:{}},factPath:Zl(Ie,$e.key),onOpen:m?()=>m(z.index,$e.key):void 0})},$e.key)),d.jsxs("div",{role:"cell",className:ie(jr,"justify-end"),children:[m&&d.jsx("button",{type:"button",className:cf,"aria-label":`Open ${Le}`,onClick:()=>m(z.index),children:d.jsx(R6,{className:"size-[calc(13*var(--content))]"})}),de.canRemove&&d.jsx("button",{type:"button",className:PH,"aria-label":`Remove ${Le}`,onClick:()=>de.remove(z.key),children:d.jsx(As,{className:"size-[calc(13*var(--content))]"})})]})]},z.key)}return d.jsxs("div",{className:PO,children:[de.canAdd&&d.jsx(bc,{size:"large",add:w,onAdd:se?()=>M(0):null,choose:k}),d.jsx("div",{className:VO,children:d.jsxs("div",{ref:O,className:ie(qH,V&&"flex flex-col"),role:"table","aria-rowcount":N.length+1,children:[d.jsxs("div",{role:"row",className:"sticky top-0 z-[1] grid items-stretch border-b border-line bg-canvas text-[length:calc(12*var(--content))] font-medium text-ink-3",style:le.style,children:[d.jsx("div",{ref:T,role:"columnheader",className:jr}),le.selection&&d.jsx("div",{role:"columnheader",className:jr}),B.map(z=>d.jsx("div",{role:"columnheader","data-field":z.key,className:"min-w-0 px-[calc(14*var(--content))] py-[calc(10*var(--content))]",children:d.jsx("span",{className:"block truncate",children:z.header})},z.key)),d.jsx("div",{role:"columnheader",className:jr})]}),d.jsx("div",{ref:K.containerRef,className:"relative",onKeyDown:I,children:d.jsx(sf,{place:"cell",children:N.map((z,ce)=>ke(z,ce))})}),V&&d.jsxs("div",{className:"relative min-h-0 flex-1",children:[d.jsx(gc,{children:Array.from({length:GO},(z,ce)=>d.jsx(ZH,{columns:B,layout:le,position:ce,marks:(m?1:0)+(de.canRemove?1:0)},ce))}),d.jsx(_d,{icon:Ha.createElement(vf(j),{size:25,strokeWidth:1.8}),headline:w.empty,...te!==null?{line:te}:{}})]})]})})]})}function lq({object:e,row:t,reveal:a,withRecordContext:r=!1,onField:s,host:c,fieldProps:u}){const{fields:m}=c;return m===null?d.jsx(fq,{}):d.jsx(Tb,{fields:Ls(e).filter(([p])=>m.used.has(p)),reveal:a,renderField:(p,y)=>d.jsx(jc,{slot:y,instanceId:c.instanceId,slotId:`${c.slotId}.${p}`,propertyId:c.propertyId,value:t[p],required:m.required.has(p),onChange:v=>s(p,v),...vE(y.type)?{factPath:Zl(c.factPath,p)}:{},...r?{recordContext:{fieldKey:p}}:{},...u==null?void 0:u(p,y)})})}const cq=5,uq=ie("block h-[calc(9*var(--content))] w-1/4 rounded-full",jn),dq=ie("block h-[calc(40*var(--content))] w-full rounded-[calc(10*var(--content))]",Lg);function fq(){return d.jsx("div",{className:"relative h-[calc(360*var(--content))]","data-record-pending":"",children:d.jsx(gc,{className:"flex flex-col gap-[calc(20*var(--content))]",children:Array.from({length:cq},(e,t)=>d.jsxs("span",{className:"flex flex-col gap-[calc(8*var(--content))]",children:[d.jsx("span",{className:uq}),d.jsx("span",{className:dq})]},t))})})}const hq=ie("relative z-[1] flex flex-shrink-0 items-center gap-[14px] py-3",fj);function mq(e){const{open:t,onClose:a}=e;return d.jsx(Dg,{open:t,onClose:a,ariaLabel:e.fallbackTitle,className:ie(Qg,p7),children:t?d.jsx(pq,{...e}):null})}function pq({object:e,row:t,fallbackTitle:a,onChange:r,onClose:s,propertyId:c,instanceId:u,slotId:m,factPath:p,fields:y,revealFieldName:v,fieldProps:g}){const w=gs(e,a),k=pf(w,e,t),E=k==="Untitled"?a:k,S=x.useRef(t);x.useEffect(()=>{S.current=t},[t]);const j=(C,A)=>{S.current={...S.current,[C]:A},r(S.current)};return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:hq,children:[d.jsx("div",{className:Zg,children:d.jsx("h2",{className:ie(Wg,"truncate"),children:E})}),d.jsx(wj,{}),d.jsx("button",{type:"button",className:Jg,"aria-label":"Close",onClick:s,children:d.jsx(Rt.x,{size:14})})]}),d.jsx("div",{className:ie("min-h-0 flex-1 overflow-y-auto py-[clamp(16px,1.2vw,28px)]",fj),children:d.jsx(sf,{place:"panel",children:d.jsx(lq,{object:e,row:t,reveal:v,withRecordContext:!0,onField:j,host:{propertyId:c,instanceId:u,slotId:m,factPath:p,fields:y},fieldProps:g})})})]})}const yq=new Set(["image","video","tour","document"]);function gq(e){var t;return((t=e.source)==null?void 0:t.kind)==="row"}function ZO(e){return yq.has(e.type)&&Yd(e).kind==="owned"}function bq(e,t){return Ls(e).some(([a,r])=>ZO(r)&&!gq(r)&&t.required.has(a))}function vq({slot:e,value:t,onChange:a,propertyId:r,instanceId:s,slotId:c,selection:u,onRecordAdded:m,onAdd:p,newRowStamp:y,fixed:v,orderable:g,add:w,choose:k,factPath:E,record:S,fields:j}){const[C,A]=x.useState(null),O=S!==void 0?{index:S.index,added:S.added===!0}:C,{ownedUpload:T}=Yt(),R=Xa(e),B=t,D=O===null?void 0:B[O.index]??{},L=R!==null&&j!==null&&bq(R,j),P=x.useRef({open:O,rows:B});x.useEffect(()=>{P.current={open:O,rows:B}});const le=()=>{const N=P.current.rows,V=[(y==null?void 0:y())??{},...N],te={index:0,added:!0};P.current={open:te,rows:V},a(V,"add"),A(te)},ee=N=>{const{open:V,rows:te}=P.current;if(V===null)return;const me=te.map((Y,M)=>M===V.index?N:Y);P.current={open:V,rows:me},a(me,"edit")},de=()=>{if(S!==void 0){S.onClose();return}(O==null?void 0:O.added)===!0&&(m==null||m(O.index)),A(null)},K=(N,V)=>{const te=P.current.open;return!T||te===null?Promise.reject(new Error("list-table-view: no record is open")):T({slotId:c,itemIndex:te.index,field:N},V)},Q=T&&O!==null?(N,V)=>ZO(V)?{onUpload:te=>K(N,te)}:{}:void 0,se=sr(e.label).singular;return d.jsxs(d.Fragment,{children:[S===void 0&&d.jsx(oq,{declaration:e,value:t,onChange:(N,V)=>a(N,V),propertyId:r,instanceId:s,slotId:c,selection:u,...w!==void 0?{add:w}:{},...k!==void 0?{choose:k}:{},...v!==void 0?{fixed:v}:{},...g!==void 0?{orderable:g}:{},onOpenRecord:R?(N,V)=>A({index:N,added:!1,field:V}):void 0,onAdd:p!==void 0?p:L?le:void 0,...y!==void 0?{newRowStamp:y}:{},factPath:E,fields:j}),R&&d.jsx(mq,{open:D!==void 0,object:R,row:D??{},fallbackTitle:(O==null?void 0:O.added)===!0?`New ${se}`:`${nb(se)} ${((O==null?void 0:O.index)??0)+1}`,propertyId:r,instanceId:s,slotId:c,fieldProps:Q,factPath:Xl(E,D),fields:j,revealFieldName:O==null?void 0:O.field,onChange:ee,onClose:de})]})}function xq(e){return e.map(qO).filter(t=>t!==null)}function wq({label:e,itemSlot:t,offer:a,verbs:r,fixed:s,instanceId:c,slotId:u,ownerSlotId:m=u,value:p,propertyId:y,commit:v,onUpload:g,factPath:w,size:k}){const E=Ka(t),S=x.useMemo(()=>xq(p),[p]),[j,C]=x.useState(!1),A=ar({items:S,fixed:s,axis:"xy",commit:v}),{rows:O}=A,T=db(t,{propertyId:y,instanceId:c,slotId:m}),R=a.kind==="owned"?g??T??void 0:void 0,B=_q(R,E,A.add),{add:D,onAdd:L,choose:P}=Fg(r,a.kind==="picked"?()=>C(!0):null,R!==void 0?gb(E,B):null),le=B.error;return d.jsxs(Pg,{engine:A,label:e,noun:"item",size:k,onAdd:L,add:D,choose:P,renderTile:(ee,de,K)=>d.jsx(Sq,{value:ee.value,kinds:E,propertyId:y,holderPath:w,frame:{chrome:K,crop:null}}),children:[le&&d.jsx("p",{className:Ns,children:le}),j&&a.kind==="picked"&&d.jsx(_c,{mode:"multi",propertyId:y,filter:a.filter,selectedIds:O.map(ee=>ee.value.asset_id),onChange:ee=>A.replace(Ts(O,ee,de=>de.asset_id,kq,A.mint)),onClose:()=>C(!1)})]})}function kq(e){return v9(e)??{asset_id:e.id}}function _q(e,t,a){const[r,s]=x.useState(!1),[c,u]=x.useState(null);return{busy:r,error:c,take:p=>{if(!e||p.length===0)return;const y=p.filter(g=>!i2(t,od(g)));u(y.length>0?`Only ${t.join(", ")} can be added here.`:null);const v=p.filter(g=>i2(t,od(g)));v.length!==0&&(s(!0),(async()=>{try{for(const g of v){const w=od(g),k=Hn(w),E=hf(w,k.fromUploaded(await e(g),k.cleared));E!==null&&a(E)}}catch(g){console.error("[editor] media upload failed",g),u("Upload failed. Try again.")}finally{s(!1)}})())}}}function i2(e,t){return t!==null&&e.includes(t)}function Sq({value:e,kinds:t,propertyId:a,frame:r,holderPath:s}){const c=yb(e,t,a);return d.jsx(pb,{kind:c,value:Eq(c,e),propertyId:a,frame:r,holderPath:s},c)}function Eq(e,t){return Db()[e].coerce(t)}function WO({face:e,...t}){const{slot:a,instanceId:r,slotId:s,value:c,onChange:u,recordContext:m}=t,p=hO(a,e),y=OI(a,r,s,u,m!=null),v=t.membership??mO(a,void 0),g=Array.isArray(c)?c:[],w=Rj({slotId:s,recordContext:m}),k=m?m.table??null:pc(a.source)!==null?t.boundRowTable??null:null,E=x.useMemo(()=>p.view==="gallery"?pF(a,k):null,[p.view,a,k]),S=v.kind==="follows",{itemContent:j}=p,C=e==="compact"?"compact":"large",A=lf(a,{table:k,membership:v});if(A===null)return null;switch(p.view){case"table":return d.jsx(Oq,{slot:a,items:g,onChange:u,membership:v,verbs:A,entries:j.kind==="record"?j.entries:null,fixed:S,propertyId:t.propertyId,instanceId:r,slotId:s,factPath:t.factPath});case"annotated-gallery":{const O=j.kind==="record"?uA(j.entries):null;return O===null?null:d.jsx(Aq,{list:a,label:a.label,face:e,annotated:O,listTable:k,membership:v,verbs:A,itemBaseline:t.itemBaseline,insideRecord:m!=null,fixed:S,instanceId:r,slotId:s,mediaSlotId:`${w}.${O.mediaKey}`,value:g,propertyId:t.propertyId,table:(m==null?void 0:m.table)??pO(v),selectedItemIndex:t.selectedItemIndex,selectedFieldName:t.selectedFieldName,commit:y,onUpload:t.onUpload,factPath:t.factPath,size:C})}case"accordion":return j.kind!=="record"?null:d.jsx(lH,{slot:a,entries:j.entries,fixed:S,instanceId:r,slotId:s,value:c,commit:y,membership:v,verbs:A,rowTable:t.rowTable??Vk(a,v),selectedItemIndex:t.selectedItemIndex,selectedFieldName:t.selectedFieldName,itemBaseline:t.itemBaseline,insideRecord:m!=null,factPath:t.factPath});case"gallery":{if(j.kind!=="single"||!xs(j.slot.type))return null;if(E!==null)return d.jsx(Nq,{label:a.label,member:E,verbs:A,fixed:S,instanceId:r,slotId:s,mediaSlotId:w,value:c,propertyId:t.propertyId,selectedItemIndex:t.selectedItemIndex,commit:y,onUpload:t.onUpload,size:C});const O=j.slot,T=j.slot.type,R=F3(a,O,k)??{kind:"owned"};if(T==="media")return d.jsx(wq,{label:a.label,itemSlot:O,offer:R,verbs:A,fixed:S,instanceId:r,slotId:s,ownerSlotId:w,value:g,propertyId:t.propertyId,commit:y,onUpload:t.onUpload,factPath:t.factPath,size:C});const B=T;return d.jsx(M9,{kind:B,label:a.label,itemSlot:O,offer:R,verbs:A,fixed:S,instanceId:r,slotId:s,ownerSlotId:w,value:g,propertyId:t.propertyId,commit:y,onUpload:t.onUpload,factPath:t.factPath,size:C},B)}case"media-manager":return null;case"poi-curation":return d.jsx(dB,{slot:a,fixed:S,value:c,propertyId:t.propertyId,commit:y});case"bullet-list":return j.kind!=="single"?null:d.jsx(wH,{slot:a,itemSlot:j.slot,add:A.add,fixed:S,value:c,commit:y,size:C});case"row-bar":{const O=Vk(a,v),T=j.kind==="single"?bf(j.slot):jq,R=t.rowTable??(O.kind!=="none"?O:T);return d.jsx(YB,{slot:a,face:e,rowTable:v.kind==="follows"&&R.kind==="table"?{...R,inert:!0}:R,verbs:A,fixed:S,value:g,commit:y})}}}const jq={kind:"none"};function Oq({slot:e,items:t,onChange:a,membership:r,verbs:s,entries:c,fixed:u,propertyId:m,instanceId:p,slotId:y,factPath:v}){const{TablePicker:g,TableCreate:w}=Yt(),k=aO(v),E=k!==void 0?k:OH(Xa(e)??{fields:{}}),[S,j]=x.useState(!1),[C,A]=x.useState(!1),O=r.kind==="pick-row"&&c!==null?xb(r):null,T=yO(r),R=t,B=x.useRef(R);x.useEffect(()=>{B.current=R});const D=g===void 0?null:()=>j(!0),L=O!==null&&D!==null&&s.choose!==null?{choose:s.choose,onChoose:D}:void 0,P=O===null?void 0:w===void 0?null:()=>A(!0),le=r.kind==="table"?()=>({[T]:Nj()}):void 0;return d.jsxs(d.Fragment,{children:[d.jsx(vq,{slot:e,value:t,onChange:ee=>a(ee),propertyId:m,instanceId:p,slotId:y,factPath:v,fields:E,fixed:u,...P!==void 0?{onAdd:P}:{},...le!==void 0?{newRowStamp:le}:{},add:s.add,...L!==void 0?{choose:L}:{}}),C&&O!==null&&c!==null&&w!==void 0&&d.jsx(w,{tables:O,onCreated:(ee,de)=>{if(A(!1),Rd(B.current,c,T).includes(ee))return;const K=[Ab(c,T,ee,de),...B.current];B.current=K,a(K)},onClose:()=>A(!1)}),S&&O!==null&&c!==null&&g!==void 0&&d.jsx(g,{open:!0,mode:"multi",tables:O,selectedIds:Rd(R,c,T),onChange:(ee,de)=>{const K=_B(B.current,c,T,ee,de);B.current=K,a(K)},onClose:()=>j(!1)})]})}function Aq({list:e,face:t,annotated:a,listTable:r,membership:s,itemBaseline:c,insideRecord:u,table:m,...p}){const y=bO({instanceId:p.instanceId,slotId:p.slotId,membership:s,itemBaseline:c,insideRecord:u});return d.jsx(dA,{...p,annotated:a,offer:P3(e,a.mediaSlot,{itemTable:m,listTable:r,picksBy:s.kind==="pick-media"?s.filter:null}),markers:t==="compact"?y:null,table:m})}function Nq({member:e,value:t,commit:a,...r}){const s=x.useMemo(()=>Array.isArray(t)?t.map(e.toItem):[],[t,e]),c=(u,m)=>a(u.map(p=>({key:p.key,value:e.toStored(p.value)})),m);return d.jsx(dA,{...r,annotated:e.annotated,offer:Yd(e.annotated.mediaSlot,null),markers:null,value:s,table:null,commit:c})}function Mq(e){return d.jsx(WO,{face:"expanded",...e})}function Cq(e){return d.jsx(WO,{face:"compact",...e})}const Rq={model:{defaultValue:[],coerce:e=>Array.isArray(e)?e:[],isEmpty:e=>e.length===0,isInvalid:()=>!1},faces:{expanded:Mq,compact:Cq},applyOptimistic:null};function Tq(e,t){return e.toLocaleString("en-US",{useGrouping:t.thousandsSep===!0,maximumFractionDigits:t.decimals===!0?20:0})}function Dq(e,t){const a=String(e??"").replace(/[^\d.]/g,"");if(a==="")return"";const[r,s]=a.split("."),c=(r??"").replace(/\B(?=(\d{3})+(?!\d))/g,",");return s!=null?`${c}.${s}`:c}function Lq(e,t){if(t<=0)return 0;let a=0;for(let r=0;r<e.length;r++)if(e[r]!==","&&a++,a===t)return r+1;return e.length}function a2(e,t,a){e.value=t,e.setSelectionRange(a,a)}function r2(e,t){let a=e.replace(t!=null&&t.decimals?/[^\d.]/g:/[^\d]/g,"");if(t!=null&&t.decimals){const s=a.indexOf(".");s>=0&&(a=a.slice(0,s+1)+a.slice(s+1).replace(/\./g,""))}const r=a.replace(/[^\d]/g,"");return(t==null?void 0:t.maxDigits)!=null&&r.length>t.maxDigits?null:a}function zq({label:e,value:t,onChange:a,group:r,decimals:s,maxDigits:c,placeholder:u,onBlur:m,attention:p=null}){const y=w=>r?Dq(w):w,v=y(t),g=or();return d.jsx("div",{className:g.frame,children:d.jsx(Wr,{attention:p,children:d.jsx("input",{className:ie(g.inner,"[font-variant-numeric:tabular-nums]"),"aria-label":e,inputMode:s?"decimal":"numeric",value:v,placeholder:u??"0",onBlur:m,onChange:w=>{var O;const k=w.currentTarget,E=k.value,S=k.selectionStart??E.length,j=r2(E,{decimals:s,maxDigits:c});if(j==null){const T=S-(E.length-v.length);a2(k,v,Math.min(Math.max(T,0),v.length));return}const C=y(j),A=((O=r2(E.slice(0,S),{decimals:s}))==null?void 0:O.length)??0;a2(k,C,Lq(C,A)),a(j)}})})})}function up(e){return e==null?"":String(e)}function my(e){const t=e.trim();if(t==="")return null;const a=Number(t);return Number.isFinite(a)?a:null}const JO={defaultValue:null,coerce:e=>typeof e=="number"?e:my(typeof e=="string"?e:""),isEmpty:e=>e===null,isInvalid:()=>!1};function o2({slot:e,value:t,onChange:a,required:r=!1}){const[s,c]=x.useState(()=>up(t)),u=my(s)===t?s:up(t);return d.jsx(zq,{attention:rr(JO,e,t,r),label:e.label,value:u,onChange:m=>{c(m);const p=my(m);p!==t&&a(p)},onBlur:()=>c(up(t)),group:e.thousandsSep,decimals:e.decimals,maxDigits:e.maxDigits,placeholder:e.placeholder})}const $q={model:JO,faces:{expanded:o2,compact:o2},applyOptimistic:(e,t,a)=>uO(e,t==null?"":Tq(t,a))},eA={model:{defaultValue:"",coerce:Sc,isEmpty:e=>e.trim()==="",isInvalid:e=>!F5(e.trim())},normalize:e=>e.trim(),invalidMessage:()=>"Not a valid phone number",inputType:"tel",inputMode:"tel",autoComplete:"tel",placeholder:"(555) 555-0100"};function s2(e){return d.jsx(bb,{kind:eA,...e})}const Uq={model:eA.model,faces:{expanded:s2,compact:s2},applyOptimistic:null},Iq="flex flex-col gap-2";function Bq({slot:e,value:t,onChange:a,propertyId:r}){const{apiFetch:s}=Yt().api,[c,u]=x.useState(null),[m,p]=x.useState(null),y=x.useMemo(()=>t?[t]:[],[t]),{urls:v,dropUrl:g}=SO(r,y);async function w(k){if(u(null),(t==null?void 0:t.place_id)!==k.place_id){p(k);try{const E=await vO(s,r,k.place_id);a(E)}catch{u("Couldn't add that place. Try again.")}finally{p(null)}}}return d.jsxs("div",{className:Iq,children:[d.jsx(jO,{propertyId:r,placeholder:e.placeholder??"Search nearby…",addedIds:t?new Set([t.place_id]):new Set,onSelect:k=>void w(k)}),c&&d.jsx("span",{className:wO,children:c}),m?d.jsxs("div",{className:ie(_b,kO),"aria-live":"polite",children:[d.jsx("span",{className:Sb,children:d.jsx("span",{className:_O})}),d.jsxs("div",{className:Eb,children:[d.jsx("span",{className:jb,children:m.name}),d.jsx("span",{className:Ob,children:"Adding…"})]})]}):t?d.jsx(EO,{row:t,photoUrl:v[t.place_id],onPhotoError:()=>g(t.place_id),onRemove:()=>a(null)}):d.jsx("div",{className:HI,children:"No place yet. Search above to choose one."})]})}const Hq={model:{defaultValue:null,coerce:kb,isEmpty:e=>e===null,isInvalid:()=>!1},faces:{compact:Bq},applyOptimistic:null},qq=ie(vt,"group box-border flex flex-col items-start gap-2.5 rounded-[calc(12*var(--content))] border-[1.5px] p-4.5 text-left","transition-[background-color,border-color] duration-[120ms]","border-line bg-canvas hover:border-ink-4","aria-checked:border-honey-2 aria-checked:bg-honey-soft","data-[attention=required]:border-danger data-[attention=required]:bg-danger-soft","data-[attention=invalid]:border-danger data-[attention=invalid]:bg-danger-soft"),Fq=ie("grid size-9.5 place-items-center rounded-[calc(10*var(--content))] bg-line-soft text-ink-2","transition-[background-color,color] duration-[120ms]","group-aria-checked:bg-honey group-aria-checked:text-honey-ink");function Pq(e){return e.length>0&&e.every(t=>t.description!==void 0)}function Vq({label:e,value:t,options:a,onChange:r,attention:s}){const c=Ds();return d.jsx("div",{className:ie(Qr,"gap-1.5"),children:d.jsx("div",{className:"grid grid-cols-2 gap-2.5",role:"radiogroup","aria-label":e,children:a.map(u=>{const m=IO(u.icon)?u.icon:null;return d.jsxs("button",{type:"button",role:"radio","aria-checked":u.value===t,className:qq,...Cs(s,c),onClick:()=>{u.value!==t&&r(u.value)},children:[m!==null&&d.jsx("span",{className:Fq,children:d.jsx(ci,{name:m,size:18,stroke:1.7})}),d.jsx("span",{className:"text-[length:calc(15.5*var(--content))] font-semibold text-ink",children:u.label}),d.jsx("span",{className:"text-caption leading-[1.4] text-ink-3",children:u.description})]},u.value)})})})}const tA={defaultValue:null,coerce:e=>typeof e=="string"?e:null,isEmpty:e=>e===null||e==="",isInvalid:()=>!1};function nA({cards:e,slot:t,value:a,onChange:r,required:s=!1}){const c=Pa(y=>y.session.listing_intent),u=UO(t,{listingIntent:c}),m=t.creatable??!1,p=rr(tA,t,a,s);return e&&!m&&Pq(u)?d.jsx(Vq,{label:t.label,value:a,options:u,onChange:r,attention:p}):d.jsx(hy,{attention:p,label:t.label,value:a??"",options:u,creatable:m,placeholder:"Choose one",onChange:r})}function Gq(e){return d.jsx(nA,{cards:!0,...e})}function Kq(e){return d.jsx(nA,{cards:!1,...e})}const Yq={model:tA,faces:{expanded:Gq,compact:Kq},applyOptimistic:null};function iA(){const e=window;return e.SpeechRecognition??e.webkitSpeechRecognition??null}function Qq(){return x.useSyncExternalStore(()=>()=>{},()=>iA()!==null,()=>!1)}function Xq({value:e,onChange:t,recording:a,onRecordingChange:r,onEnd:s}){const c=Qq(),[u,m]=x.useState(0),p=x.useRef(null),y=x.useRef(""),v=x.useRef(""),g=x.useRef(t),w=x.useRef(s);x.useEffect(()=>{g.current=t,w.current=s},[t,s]),x.useEffect(()=>{if(!a)return;const S=setInterval(()=>m(j=>j+1),1e3);return()=>clearInterval(S)},[a]),x.useEffect(()=>()=>{var S;(S=p.current)==null||S.abort(),p.current=null},[]);const k=x.useCallback(()=>{const S=iA();if(!S||p.current)return;const j=new S;j.continuous=!0,j.interimResults=!0,j.lang=typeof navigator<"u"&&navigator.language||"en-US",y.current=e,v.current="",j.onresult=C=>{let A="",O="";for(let D=C.resultIndex;D<C.results.length;D++){const L=C.results[D];if(L===void 0)continue;const P=L[0].transcript;L.isFinal?A+=P:O+=P}A&&(v.current+=A);const T=v.current+O,R=y.current,B=!R||/\s$/.test(R)||/^\s/.test(T)?"":" ";g.current(R+B+T)},j.onerror=()=>{},j.onend=()=>{var C;p.current=null,r(!1),m(0),(C=w.current)==null||C.call(w)},p.current=j,m(0),r(!0);try{j.start()}catch{p.current=null,r(!1)}},[r,e]),E=x.useCallback(()=>{var S;(S=p.current)==null||S.stop()},[]);return{canDictate:c,seconds:u,start:k,stop:E}}function Zq(e){return`${String(Math.floor(e/60)).padStart(2,"0")}:${String(Math.floor(e%60)).padStart(2,"0")}`}const Wq={short:120,medium:240,long:2e3};function Jq(e){return Wq[e]}const aA={defaultValue:"",coerce:Sc,isEmpty:e=>e.trim()==="",isInvalid:()=>!1};function rA(e){const t=e.slot.size??"short";return{size:t,cap:typeof e.slot.cap=="number"?e.slot.cap:Jq(t)}}function oA({slot:e}){if(e.placeholder!==void 0||e.size!=="long")return e.placeholder;const t=typeof e.label=="string"?e.label.trim().toLowerCase():"";return t===""?"Start typing…":`Write the ${t} here…`}function sA({slot:e,value:t,required:a=!1}){return rr(aA,e,t,a)}const eF={medium:2,long:5};function lA(e){const{slot:t,value:a,onChange:r}=e,{size:s,cap:c}=rA(e),u=or(),m={value:a,maxLength:c,placeholder:oA(e),"aria-label":t.label};return d.jsx("div",{className:u.frame,children:d.jsx(Wr,{attention:sA(e),count:{count:a.length,max:c,multiline:s!=="short"},children:s==="short"?d.jsx("input",{className:u.inner,...m,onChange:p=>r(p.target.value)}):d.jsx("textarea",{className:ie(u.inner,u.multiline),rows:u.inline?1:eF[s],...m,onChange:p=>r(p.target.value)})})})}function tF(e){return rA(e).size==="long"?d.jsx(nF,{...e,cap:typeof e.slot.cap=="number"?e.slot.cap:null}):d.jsx(lA,{...e})}function nF(e){const{slot:t,value:a,onChange:r,cap:s}=e,c=or(),u=x.useRef(null),[m,p]=x.useState(!1),y=x.useCallback(()=>requestAnimationFrame(()=>{var k;return(k=u.current)==null?void 0:k.focus()}),[]),v=x.useCallback(k=>r(s===null?k:k.slice(0,s)),[r,s]),g=Xq({value:a,onChange:v,recording:m,onRecordingChange:p,onEnd:y}),w=m?null:a.length>0?s===null?`${a.length.toLocaleString()} character${a.length===1?"":"s"}`:`${a.length.toLocaleString()} / ${s.toLocaleString()}`:g.canDictate?"Type, or tap the mic to dictate":"Type to fill this in";return d.jsx("div",{className:c.frame,children:d.jsxs(Wr,{attention:sA(e),className:"flex-col overflow-hidden",children:[d.jsx("textarea",{ref:u,className:ie(c.inner,"min-h-[calc(160*var(--content))] resize-none whitespace-pre-wrap pt-3.5 leading-[1.55]"),value:a,maxLength:s??void 0,placeholder:oA(e),"aria-label":t.label,onChange:k=>r(k.target.value)}),d.jsxs("div",{className:"flex items-center justify-between gap-3 py-2 pr-2.5 pl-3.5",children:[m?d.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2.5 text-caption text-ink-2",role:"status",children:[d.jsx("span",{className:"size-2 shrink-0 animate-pulse rounded-full bg-danger","aria-hidden":"true"}),d.jsx("span",{className:"font-mono font-semibold text-ink [font-feature-settings:'tnum']",children:Zq(g.seconds)}),"Listening…"]}):d.jsx("span",{className:ie($8(a.length,s??void 0),"font-sans text-caption"),children:w}),g.canDictate&&d.jsx("button",{type:"button",className:ie(vt,"grid size-9 shrink-0 place-items-center rounded-full bg-ink text-canvas transition-[background-color,transform] duration-[120ms] hover:scale-[1.04] hover:bg-ink-2"),"aria-label":m?"Stop dictation":"Dictate with your voice",onClick:m?g.stop:g.start,children:m?d.jsx("span",{className:"block size-2.75 rounded-[2px] bg-white","aria-hidden":"true"}):d.jsx(D6,{size:16})})]})]})})}const iF={model:aA,faces:{expanded:tF,compact:lA},applyOptimistic:(e,t)=>uO(e,Sc(t))};function aF(e){if(e===void 0)return"Not a valid URL";const t=Object.entries(Ja).find(([r])=>r===e);if(t)return`Needs a ${t[1].label} link`;const a=rF(e);return a.length>0?`Needs a ${e} link (${a.join(", ")})`:`Needs a ${e} link`}function rF(e){return Object.values(Ja).filter(t=>t.kind===e).map(t=>t.label)}function oF(e,t){const a=zl(e);return a===""?!1:Uy(a)?t.accepts!==void 0&&!B5(t.accepts,a):!0}const cA={model:{defaultValue:"",coerce:Sc,isEmpty:e=>zl(e)==="",isInvalid:oF},normalize:zl,invalidMessage:(e,t)=>Uy(zl(e))?aF(t.accepts):"Not a valid URL",inputType:"text",inputMode:"url",autoComplete:"url",placeholder:"https://",adornment:e=>d.jsx(sF,{draft:e})};function sF({draft:e}){const t=zl(e);return d.jsx("span",{className:ie(pE,"pr-2.75"),children:Uy(t)?d.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:ie(vt,"flex items-center text-ink-4 hover:text-accent transition-colors duration-[120ms]"),"aria-label":"Open URL in new tab",children:d.jsx(Rt.external,{})}):d.jsx("span",{className:"flex items-center text-ink-4 opacity-30",children:d.jsx(Rt.external,{})})})}function l2(e){return d.jsx(bb,{kind:cA,...e})}const lF={model:cA.model,faces:{expanded:l2,compact:l2},applyOptimistic:null};let c2=null;function cF(){return c2??(c2={text:iF,number:$q,select:Yq,url:lF,email:EI,phone:Uq,date:gI,image:Kj,list:Rq,poi:Hq,video:Wj,tour:Qj,document:cO,media:NH,address:sI}),c2}function uF(){return RB}function zs(e){if(e==="row")return uF();const a=cF()[e];return a===void 0?null:a}function Ld(e,t={}){const a=mf(e);if(a!==null){const s={...t,fields:a.fields};return e.locked!==!0&&Object.values(a.fields).some(c=>Ld(c,s))}if(wB(e,t))return!1;const r=zs(e.type);return r?r.isEditable?r.isEditable(e):e.locked!==!0:!1}function uA(e){const t=e.filter(([,r])=>hS(r)),a=t.find(([,r])=>yn(r.type));return a?{mediaKey:a[0],mediaSlot:a[1],fields:t.filter(([r])=>r!==a[0])}:null}const dF="flex flex-col gap-1.5",fF="flex flex-col";function dA({label:e,annotated:t,offer:a,verbs:r,markers:s,fixed:c,instanceId:u,slotId:m,mediaSlotId:p,value:y,propertyId:v,table:g,selectedItemIndex:w,selectedFieldName:k,commit:E,onUpload:S,factPath:j,size:C}){const{mediaKey:A,mediaSlot:O,fields:T}=t,R=p??`${m}.${A}`,B=O.type,D=Hn(B),L=sg(O),P=x.useMemo(()=>[[A,O],...T],[A,O,T]),le=x.useMemo(()=>y.map(ye=>ye!==null&&typeof ye=="object"?{...ye}:{}),[y]),ee=ar({items:le,...s?{identityOf:s.identityOf}:{},fixed:c,axis:"xy",commit:(ye,Re)=>E(s?s.stamp(ye):ye,Re)}),{rows:de}=ee,K=ye=>{var Re;return((Re=zs(B))==null?void 0:Re.model.coerce(ye[A]))??D.cleared},Q=(ye,Re)=>({...ye,[A]:Re}),se=(ye,Re,ht)=>{const $e=de.find(Lt=>Lt.key===ye);$e&&(s==null||s.markFields($e,{[Re]:ht($e.value)}),ee.updateValue(ye,Lt=>({...Lt,[Re]:ht(Lt)})))},N=ye=>{for(const Re of ye)s==null||s.markRemoved(Re);ee.removeMany(ye.map(Re=>Re.key))},V=ye=>Q(Go(P),ye),te=x.useMemo(()=>({get:ye=>B==="image"?K(ye):null,set:(ye,Re)=>Q(ye,Re)}),[B,A]),me=k!==void 0&&k!==A,Y=Xj({engine:ee,lens:te,propertyId:v,instanceId:u,slotId:m,cropCfg:L}),M=Dj(v,B),H=ye=>Il(Zl(Xl(j,ye),A),D.assetIdOf(K(ye))),I=x.useRef(null);x.useEffect(()=>{me&&I.current&&$O(I.current,k)},[me,k,w]);const[F,W]=x.useState(!1),pe=db(O,{propertyId:v,instanceId:u,slotId:R}),oe=S??pe??void 0,ke=a.kind==="owned"&&oe!==void 0,z=Jj(oe,ye=>ee.add(V(D.fromUploaded(ye,D.cleared)))),ce=ye=>{const Re=Ts(de,ye,$e=>D.assetIdOf(K($e)),$e=>V(D.fromPicked($e,D.cleared)),ee.mint),ht=new Set(Re.map($e=>$e.key));for(const $e of de)ht.has($e.key)||s==null||s.markRemoved($e);ee.replace(Re)},{add:ge,onAdd:Se,choose:Le}=Fg(r,a.kind==="picked"?()=>W(!0):null,a.kind==="owned"&&ke?gb([B],z):null),Ie=z.error;return d.jsxs(Pg,{engine:ee,label:e,noun:D.noun,size:C,onAdd:Se,add:ge,choose:Le,renderTile:(ye,Re,ht)=>d.jsx("div",{className:fF,"data-annotated-item":Re,children:d.jsx(pb,{kind:B,value:K(ye.value),propertyId:v,holderPath:Zl(Xl(j,ye.value),A),frame:{chrome:ht,beneath:T.length>0&&d.jsx("div",{className:dF,ref:Re===w?I:void 0,[Rb]:"",children:d.jsx(sf,{place:"cell",children:T.map(([$e,Lt])=>d.jsx("div",{[Td]:$e,children:d.jsx(jc,{slot:Lt,instanceId:u,slotId:m,value:ye.value[$e],propertyId:v,onChange:lt=>se(ye.key,$e,()=>lt),recordContext:{itemIndex:Re,fieldKey:$e,table:g}})},$e))})}),crop:B==="image"?{cfg:L,cut:Y.cutOf(ye),derivativeUrl:Y.derivativeOf(ye),cropping:M.recropping(H(ye.value)),storeKey:Y.keyOf(ye.key)}:null}})}),onRemove:N,tileActions:ye=>{const Re=H(ye.value),ht=[];return M.offers(Re)&&ht.push({label:"Crop",glyph:"crop",onSelect:()=>M.framing?Y.open(ye.key):M.recrop(Re,Y.keyOf(ye.key))}),ht},children:[Ie&&d.jsx("p",{className:Ns,children:Ie}),F&&a.kind==="picked"&&d.jsx(_c,{mode:"multi",propertyId:v,filter:a.filter,selectedIds:de.map(ye=>D.assetIdOf(K(ye.value))),onChange:ce,onClose:()=>W(!1)}),M.framing&&Y.modal(),M.modal]})}const hF={floor:"floor_label"},dp=e=>hF[e]??e;function mF(e){const a={...js.pages,...tr.pages}[e];return a?a.declaration:null}function pF(e,t){const a=og(e,t);if(a===null)return null;const r=mF(a.table),s=r?Xa(r):null,c=s==null?void 0:s.fields[a.member],u=c?Xa(c):null;if(!u||!ng(u.fields))return null;const m=uA(Ls(u));if(m===null)return null;const{mediaKey:p,fields:y}=m,v=new Set(y.map(([g])=>dp(g)));return{annotated:m,toItem:g=>{const w=g!==null&&typeof g=="object"?g:{},k={};for(const[S,j]of Object.entries(w))v.has(S)||(k[S]=j);const E={[p]:k};for(const[S]of y)E[S]=w[dp(S)]??null;return E},toStored:g=>{const w=g[p],k=w!==null&&typeof w=="object"?{...w}:{};for(const[E]of y){const S=g[E];k[dp(E)]=typeof S=="string"&&S.trim()===""?null:S??null}return k}}}const yF=ie(vt,"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");ie(yF,"text-accent");ie("absolute inset-0 grid place-items-center font-mono text-[12px] text-ink-3",mE);ie(vt,"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");function u2(e,t){const a=e.variant;return!a||t==null?!0:a.cases.includes(t)}function gF(e){const t=Object.keys(e.slots),a=e.slot_order;if(!a||a.length===0)return t;const r=new Set,s=[];for(const c of a)c in e.slots&&!r.has(c)&&(r.add(c),s.push(c));for(const c of t)r.has(c)||s.push(c);return s}function fp(e,t,a,r,s=!1){return{kind:"object",key:e,header:t,Icon:Mb(a.map(c=>c.slot)),fields:a,selectSlotId:r,lone:s}}function fA(e,t){const a=[],r=new Map,s=new Map;for(const c of e.groups??[])for(const u of c.members.flat())s.set(u,{id:c.id,label:c.label});for(const c of gF(e)){const u=e.slots[c];if(!u2(u,t)||!Ld(u,{slots:e.slots}))continue;const m=mf(u);if(m!==null){const y={slots:e.slots,fields:m.fields},v=Ls(m).filter(([,g])=>Ld(g,y)&&u2(g,t)).map(([g,w])=>({slotId:AO(c,g),slot:w}));if(v.length===0)continue;a.push(fp(c,gs(m,c),v,c));continue}const p=s.get(c);if(p){const y=r.get(p.id);if(y)y.fields.push({slotId:c,slot:u});else{const v=fp(p.id,{kind:"text",text:p.label},[{slotId:c,slot:u}],c);r.set(p.id,v),a.push(v)}}else a.push(fp(c,{kind:"text",text:u.label},[{slotId:c,slot:u}],c,!0))}for(const c of r.values())c.Icon=Mb(c.fields.map(u=>u.slot));return a}function bF(e,t,a){if(e.header.kind==="text")return e.header.text;const r=mf(t.slots[e.key]);return r===null?e.key:pf(e.header,r,a(e.key))}function d2(e){var t;return((t=Ec(e.slotId))==null?void 0:t.field)??e.slotId}function f2(e,t){return e.key===t||e.fields.some(a=>a.slotId===t)}function vF(e){return e.fields.map(t=>t.slotId)}function xF(e){return e==null?!0:typeof e=="string"?e.trim()==="":Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}function wF(e,t,a){const r=[];for(const s of fA(e,t))for(const{slotId:c,slot:u}of s.fields)u.variant&&xF(a(c))&&r.push(c);return r}function kF(e,t){const a=(e??"").trim(),r=(t??"").trim();return a===""||r===""?e:`${a}, ${r}`}function _F(e){const t=r=>(r??"").trim(),a=[t(e.address_state),t(e.address_postal)].filter(r=>r!=="").join(" ");return[t(e.address_street),t(e.address_city),a].filter(r=>r!=="").join(", ")}function hA(e,t){return Ub[t](e)}function py(e,t){const a=NF[t];return a===void 0?void 0:a(e)}function Bn(e){return e??""}function h2(e){return e??0}function Hl(e){return Wi(e)??null}function SF(e){return{display:Bn(e.display),street:Bn(e.street),street_no_type:Bn(e.street_no_type),city:Bn(e.city),state:Bn(e.state),postal:Bn(e.postal),unit:Bn(e.unit)}}function EF(e){return e.flatMap((t,a)=>{const r=Hl(t.image);return r===null?[]:[{id:r,floor_label:t.floor,position:a}]})}function m2(e){return kF(e.address.street,e.address.unit)}function hp(e,t){return a=>e(a).map((r,s)=>Object.fromEntries(Object.entries(t).map(([c,u])=>[c,u(r,s,a)])))}const jF={unit_id:e=>e.id,position:(e,t)=>t,floor_plans:e=>EF(e.floor_plans),unit_label:e=>e.label,beds:e=>h2(e.beds),baths:e=>h2(e.baths),sqft:e=>e.sqft,price:e=>e.price},OF={id:e=>e.id,primary:(e,t)=>t===0,name:e=>e.name,title:e=>e.title,org_name:e=>e.org_name,bio:e=>e.bio,address:e=>e.address.display,email:e=>e.email,phone:e=>e.phone,website:e=>e.website,instagram:e=>e.instagram,linkedin:e=>e.linkedin,x:e=>e.x,facebook:e=>e.facebook,headshot:e=>Hl(e.headshot),logo_dark:e=>Hl(e.logo_dark),logo_light:e=>Hl(e.logo_light)},AF={id:e=>e.id,address_street:m2,address_city:e=>e.address.city,address_state:e=>e.address.state,address_postal:e=>e.address.postal,address:e=>_F({address_street:m2(e),address_city:e.address.city,address_state:e.address.state,address_postal:e.address.postal}),lat:e=>e.address.latitude,lng:e=>e.address.longitude,distance_m:e=>e.distance_m,status:e=>e.status,price:e=>e.price,price_period:e=>e.price_period,sale_date:e=>e.sale_date,beds:e=>e.beds,baths:e=>e.baths,sqft:e=>e.sqft,photo:e=>Hl(e.photo),year_built:e=>e.year_built,lot_sqft:e=>e.lot_sqft,stories:e=>e.stories,units:e=>e.units,hoa_monthly:e=>e.hoa_monthly,list_price:e=>e.list_price,listed_date:e=>e.listed_date,mls_number:e=>e.mls_number,description:e=>e.description},Ub={units:hp(e=>e.units,jF),contacts:hp(e=>e.contacts,OF),comparables:hp(e=>e.comparables,AF)};function yy(e){return t=>Ub[e](t)[0]??null}function Bt(e,t){return a=>{const r=yy(e)(a);return r===null?null:r[t]}}function mp(e){return t=>Ub[e](t)}const NF={address:e=>SF(e.address),address_street:e=>Bn(e.address.street),address_unit:e=>Bn(e.address.unit),address_city:e=>Bn(e.address.city),address_state:e=>Bn(e.address.state),address_postal:e=>Bn(e.address.postal),listing_intent:e=>e.listing_intent,lat:e=>e.address.latitude,lon:e=>e.address.longitude,unit_label:Bt("units","unit_label"),beds:Bt("units","beds"),baths:Bt("units","baths"),sqft:Bt("units","sqft"),price:Bt("units","price"),units:mp("units"),comparables:mp("comparables"),contacts:mp("contacts"),name:Bt("contacts","name"),title:Bt("contacts","title"),org_name:Bt("contacts","org_name"),bio:Bt("contacts","bio"),contact_address:Bt("contacts","address"),email:Bt("contacts","email"),phone:Bt("contacts","phone"),website:Bt("contacts","website"),instagram:Bt("contacts","instagram"),linkedin:Bt("contacts","linkedin"),x:Bt("contacts","x"),facebook:Bt("contacts","facebook"),headshot:Bt("contacts","headshot"),logo_dark:Bt("contacts","logo_dark"),logo_light:Bt("contacts","logo_light"),description:e=>Bn(e.description),unit:yy("units"),contact:yy("contacts")};function kf(e){return typeof e=="string"?{table:e,reading:"legacy"}:e}function gy(e,t){const a=Object.entries(ig(e)).filter(([,s])=>to(s)==="address").map(([s])=>s);return t[e].map(s=>{const c={...s};for(const u of a)c[u]=_i(s[u]);return c})}function mA(e){return hA(e,"contacts")}const pA=new Set(R5),MF=new Set(T5),CF={logo_dark:{other:"logo_light",mask:"black"},logo_light:{other:"logo_dark",mask:"white"}};function RF(e,t){if(!pA.has(t))return null;const a=(e==null?void 0:e[t])??null;if(MF.has(t)){const r=typeof a=="string"&&a.trim().length>0?a.trim():null;if(r!==null)return{asset_id:r};const s=CF[t];if(s!==void 0){const c=(e==null?void 0:e[s.other])??null,u=typeof c=="string"&&c.trim().length>0?c.trim():null;if(u!==null)return{asset_id:u,mask:s.mask}}return null}return a==null?"":typeof a=="string"?a:String(a)}const TF={primary_contact_name:"name",primary_contact_title:"title",primary_contact_bio:"bio",primary_contact_email:"email",primary_contact_phone:"phone",primary_contact_address:"address",primary_contact_website_url:"website",primary_contact_avatar_upload_id:"headshot",primary_contact_logo_dark_upload_id:"logo_dark",primary_contact_logo_light_upload_id:"logo_light",primary_contact_instagram_url:"instagram",primary_contact_linkedin_url:"linkedin",primary_contact_x_url:"x",primary_contact_facebook_url:"facebook"};function DF(e,t){var s;const a=TF[t];if(a===void 0)return;const r=((s=mA(e)[0])==null?void 0:s[a])??null;return typeof r=="string"?r:null}function Ib(e,t){const a=kf(e);return a.reading==="legacy"?hA(t,a.table):gy(a.table,t)}const yA=Object.fromEntries(Object.entries(ea.contacts.row).filter(([,e])=>e.primary===!0).map(([e])=>[e,v_.contact[e]??e]));function gA(e){if(typeof e!="string")return null;const t=e.trim();return t.length>0?{asset_id:t}:null}function LF(e){return Array.isArray(e)?[...e].sort((t,a)=>(typeof t.position=="number"?t.position:0)-(typeof a.position=="number"?a.position:0)).flatMap(t=>{const a=gA(t.id);return a===null?[]:("floor_label"in t&&(a.floor_label=typeof t.floor_label=="string"?t.floor_label:null),[a])}):[]}function by(e,t,a){const r=kf(e);return r.reading==="legacy"?zF(r.table,t,a):$F(r.table,t,a)}function zF(e,t,a){const r=ea[e].row[a];if(r===void 0)return null;if(e==="contacts"){const c=yA[a];if(c!==void 0)return vA(t,c)}const s=t[a]??null;return r.value_type==="image"?gA(s):r.value_type==="image_list"?LF(s):s}function $F(e,t,a){const r=gS({table:e,reading:"registry"},a);if(r.kind==="identity")return t.id??null;if(r.kind==="unknown")return null;const s=a.indexOf(".");if(s===-1)return t[a]??null;const c=a.slice(s+1);return Bd(c)?Q5(t[a.slice(0,s)],c):null}function bA(e,t,a){const r=rg(kf(e));return Ib(e,a).find(s=>s[r]===t)}function UF(e,t,a,r){const s=bA(e,t,r);return s===void 0?null:by(e,s,a)}function vy(e,t,a,r={},s){const c=kf(e),u=Pd(c.table),m=rg(c),p=N3(a),y=yS(a);return(s===void 0?Ib(e,t):s.flatMap(g=>{const w=bA(e,g,t);return w===void 0?[]:[w]})).map(g=>{const w={[u]:g[m]};for(const k of y)w[k]=g[m];for(const[k,E]of Object.entries(p))w[k]=by(c,g,E);for(const[k,E]of Object.entries(r))w[k]=E(S=>by(c,g,S),g[m]);return w})}function IF(e){return Ib("units",e)[0]}function BF(e,t){switch(t){case"beds":return(e==null?void 0:e.beds)??null;case"baths":return(e==null?void 0:e.baths)??null;case"sqft":return(e==null?void 0:e.sqft)??null;case"price":return(e==null?void 0:e.price)??null;case"unit_label":return(e==null?void 0:e.unit_label)??null;default:return null}}function HF(e,t){const a=py(e,"address");if(t==="address")return a&&typeof a=="object"?a.display??null:a;const r=VF[t];if(r!==void 0)return GF(a,r);const s=DF(e,t);return s!==void 0?s:py(e,t)}const qF=Object.fromEntries(Object.entries(yA).map(([e,t])=>[t,e]));function vA(e,t){if(pA.has(t))return RF(e,t);const a=qF[t];if(a===void 0)return null;const r=(e==null?void 0:e[a])??null;if(typeof r!="string")return null;const s=r.trim();return s.length>0?s:null}function FF(e,t){if(bd(t))return I3(t,$3(e));if(z3(t))return e[t.slice(9)];const a=qt(t);if((a==null?void 0:a.reading)==="registry")return gy(a.table,e);const r=x4(t);return r!==null?gy(r.table,e).map(s=>s[r.member]??null):py(e,t)}function PF(e,t){if(bd(e))return FF(t.facts,e);const a=xp[e];return!a||Object.hasOwn(ta,e)?null:a.container==="contact"?vA(t.contact??mA(t.facts)[0],e):a.container==="unit"?BF(t.unit??IF(t.facts),e):HF(t.facts,e)}const VF={address_street:"street",address_unit:"unit",address_city:"city",address_state:"state",address_postal:"postal"};function GF(e,t){if(!e||typeof e!="object")return null;const r=(e[t]??"").trim();return r.length>0?r:null}function KF(e,t,a,r){const s=qt(e);return dd(s!==null?vy(s,t,a,r):PF(e,{facts:t}))}function YF(e,t,a,r,s){if(a.kind==="computed")return Object.hasOwn(r.computed,t)?r.computed[t]:void 0;const{facts:c}=r;if(c!==null){if(a.kind==="fact")return KF(a.key,c,gd(e));if(a.kind==="member"){const u=s(a.holder);if(typeof u!="string"||u==="")return;const m=tR(c,a.tables,u);return m===null?void 0:UF(m,u,a.member,c)}}}function QF(e,t,a,r){if(a.kind==="computed"){const u=Object.hasOwn(r.computed,t)?r.computed[t]:void 0;return Array.isArray(u)?u.filter(XF):void 0}const{facts:s}=r;if(s===null)return;if(a.kind==="fact")return a.table===null?void 0:vy(a.table,s,gd(e));if(a.kind!=="rows")return;const c=vb(a.tables);return a.tables.flatMap(u=>vy(u,s,gd(e)).map(m=>{const p=Pd(u.table);return p===c?m:{[c]:m[p],...m}}))}function XF(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function ZF(){return d.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:[d.jsx("span",{className:"text-ink-4","aria-hidden":"true",children:d.jsx(ci,{name:"pencil",size:22,stroke:1.6})}),d.jsx("p",{className:"m-0 mt-3 text-body-lg font-medium text-ink-2",children:"Nothing selected"}),d.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"})]})}function WF(e){const t=e.source;return t==null?void 0:t.kind}function p2(e,t,a,r,s){const c=r.type;if(c==="row")return{kind:"row",tables:Gl(r)};const u=pc(r.source);if(u!==null){const p=W4(e,t,u.slot);return(p==null?void 0:p.kind)==="row"?{kind:"member",holder:p.path,tables:Gl(p.def),member:u.field}:null}if(c==="list"){const p=NI(s.fillSpec,a),y=mO(r,p,s.sectionSlots),[v,...g]=y.kind==="table"?[]:gf(y);if(v!==void 0)return{kind:"rows",tables:[v,...g]}}if(X4(r)!==null)return{kind:"slot"};const m=WF(r);if(m==="home"){const p=r.source.key;return typeof p=="string"&&p!==""?{kind:"fact",key:p,table:qt(p)}:null}return m==="derived"?{kind:"computed"}:null}function JF(e,t={}){const a=[];for(const[r,s]of Object.entries(e)){if(s.type==="object"){const u=s.fields??{},m={container:r,siblings:u};for(const[p,y]of Object.entries(u)){const v=AO(r,p),g=p2(e,m,v,y,t);g!==null&&a.push([v,g])}continue}const c=p2(e,{},r,s,t);c!==null&&a.push([r,c])}return a}function eP(e){return e.kind==="member"||e.kind==="fact"||e.kind==="rows"}function xA(e,t){const a=e==null||e==="",r=t==null||t==="";return a||r?a&&r:e===t?!0:typeof e=="object"||typeof t=="object"?g2(e)===g2(t):y2(e)===y2(t)}function y2(e){return typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"?String(e):JSON.stringify(e)??""}function g2(e){const t=_i(e);if(t!==null){const{source:a,...r}=t;return JSON.stringify(r)}return JSON.stringify(e,(a,r)=>r!==null&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r).sort(([s],[c])=>s.localeCompare(c))):r)}const pp=2.5,tP=1;function Ju(e){return e?e.closest(".we-acc-head"):null}function Tl(e){return e.closest(".we-acc")}function b2(e,t){const a=e.offsetWidth,r=e.offsetHeight;!a||!r||(e.style.setProperty("--gx",((a+t*2)/a).toFixed(5)),e.style.setProperty("--gy",((r+t*2)/r).toFixed(5)))}function nP(e){e.style.removeProperty("--gx"),e.style.removeProperty("--gy")}function iP(){x.useEffect(()=>{var y;if(typeof window>"u"||(y=window.matchMedia)!=null&&y.call(window,"(prefers-reduced-motion: reduce)").matches)return;let e=null,t=pp;const a=typeof ResizeObserver<"u"?new ResizeObserver(()=>{e&&b2(e,t)}):null,r=(v,g)=>{v&&(e&&e!==v&&s(e),e=v,t=g,b2(v,g),a==null||a.observe(v))},s=v=>{v&&(a==null||a.unobserve(v),nP(v),e===v&&(e=null))},c=v=>{const g=Ju(v.target);g&&r(Tl(g),pp)},u=v=>{const g=Ju(v.target);if(!g)return;const w=v.relatedTarget;w&&g.contains(w)||s(Tl(g))},m=v=>{const g=Ju(v.target);g&&r(Tl(g),tP)},p=v=>{const g=Ju(v.target);g&&(g.matches(":hover")?r(Tl(g),pp):s(Tl(g)))};return document.addEventListener("pointerover",c),document.addEventListener("pointerout",u),document.addEventListener("pointerdown",m),document.addEventListener("pointerup",p),()=>{document.removeEventListener("pointerover",c),document.removeEventListener("pointerout",u),document.removeEventListener("pointerdown",m),document.removeEventListener("pointerup",p),a==null||a.disconnect()}},[])}const v2=1;function x2(e){const t=new URLSearchParams;for(const[r,s]of Object.entries(e))s!=null&&s!==""&&t.set(r,s);const a=t.toString();return a===""?"":`?${a}`}const Or={catalog:"api/catalog",render:"api/render",media:e=>`api/media${x2({fixture:e})}`,capture:(e,t)=>`api/capture/${e}${x2({fixture:t.fixture,format:t.format,page:t.page,canvas:t.canvas})}`,live:(e,t)=>`fixtures/${encodeURIComponent(e)}/live${t==="/"?"/":`${t}/`}`,hmr:"__hmr"},aP={source:"source:changed",stylesheet:"stylesheet:changed",fixtures:"fixtures:changed"};async function w2(e,t){const a=(await t.text().catch(()=>"")).trim();return new Error(a===""?`${e}: HTTP ${t.status}`:a)}function rP(e,t=(a,r)=>fetch(a,r)){const a=s=>new URL(s,e).href,r=async s=>{const c=await t(a(s));if(!c.ok)throw await w2(s,c);return await c.json()};return{base:e,async catalog(){const s=await r(Or.catalog);if(s.wire!==v2)throw new Error(`This playground speaks wire ${v2}, and its host answered with wire ${String(s.wire)}.`);return s},async render(s){const c=await t(a(Or.render),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(s)});if(!c.ok)throw await w2(Or.render,c);return await c.json()},media:s=>r(Or.media(s)),captureHref:(s,c)=>a(Or.capture(s,c)),liveHref:(s,c)=>a(Or.live(s,c)),subscribe(s){let c;try{c=new EventSource(a(Or.hmr))}catch{return()=>{}}const u=Object.entries(s).map(([m,p])=>{const y=aP[m],v=()=>p();return c.addEventListener(y,v),()=>c.removeEventListener(y,v)});return()=>{for(const m of u)m();c.close()}}}}let xy=null;function oP(e){xy=e}function sP(){if(xy===null)throw new Error("The playground's host is not installed yet.");return xy}let wA=null;function lP(e){wA=e}function cP(){return wA}function k2(e,t){return`${e} ${t}${e===1?"":"s"}`}function uP(e){const t=[e.listingIntent].filter(r=>r!==null).map(r=>r.replaceAll("_"," "));t.push(k2(e.units,"unit"),k2(e.photos,"photo"));const a=t.join(", ");return a.charAt(0).toUpperCase()+a.slice(1)}function dP(e){return`${e.label} (${uP(e.summary)})`}const fP={sectionInstanceId:yf,slotId:bI,slotGroup:vI,slotItem:xI,slotField:wI,slotUnselectable:kI};function hP(e,t){return`${e}${e.includes("?")?"&":"?"}v=${encodeURIComponent(t)}`}function mP(e){return{basePath:e.basePath,stylesheets:e.stylesheets.map(t=>hP(t,e.cssRev)),importMap:e.importMap,islandMap:e.islands,hostScriptSrc:e.hostScript,hostResolvesOwnImports:Object.keys(e.importMap).length===0}}function _2(e){const t=e.sectionSchemaByInstance??{};return{markers:fP,assets:mP(e),...e.pageBox===void 0?{}:{pageBox:e.pageBox},isSlotEditable:(a,r,s)=>{var u,m,p,y;const c=(u=t[a])==null?void 0:u.slots[r];return c===void 0||c.locked===!0?!1:s===void 0||((y=(p=c.fields??((m=c.element)==null?void 0:m.fields))==null?void 0:p[s])==null?void 0:y.locked)!==!0}}}const pP=/^\/properties\/[^/]+\/poi\/search$/,yP=/^\/properties\/[^/]+\/poi\/([^/]+)$/,wy=[{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 gP(e){const t=typeof e=="object"&&e!==null?e.query:void 0,a=typeof t=="string"?t.trim().toLowerCase():"";return a?{results:wy.filter(r=>{var s;return r.name.toLowerCase().includes(a)||(((s=r.address)==null?void 0:s.toLowerCase().includes(a))??!1)})}:{results:wy}}let bP=0;function vP(e,t={}){const a=(t.method??"GET").toUpperCase();if(a==="POST"&&pP.test(e))return Promise.resolve(gP(t.json));const r=a==="GET"?yP.exec(e):null;if(r){const s=decodeURIComponent(r[1]),c=wy.find(u=>u.place_id===s);if(c)return Promise.resolve({...c,id:`pg-row-${++bP}`})}return Promise.reject(new Error(`No API backend in the playground: ${t.method??"GET"} ${e}. This capability is served by the host application; supply a provider to use it here.`))}function xP(e,t,a){const r=Math.min(Math.max(Math.round(e.nx*t),0),Math.max(t-1,0)),s=Math.min(Math.max(Math.round(e.ny*a),0),Math.max(a-1,0)),c=Math.max(Math.min(Math.round(e.nw*t),t-r),1),u=Math.max(Math.min(Math.round(e.nh*a),a-s),1);return{sx:r,sy:s,sw:c,sh:u}}function wP(e,t){return new Promise((a,r)=>{const s=t.createElement("img");s.onload=()=>a(s),s.onerror=()=>r(new Error(`Could not load ${e} to crop it.`)),s.src=e})}async function kP(e,t,a=document){const r=await wP(e,a),{sx:s,sy:c,sw:u,sh:m}=xP(t,r.naturalWidth,r.naturalHeight),p=a.createElement("canvas");p.width=u,p.height=m;const y=p.getContext("2d");if(!y)throw new Error("No 2d canvas context; cannot crop.");y.drawImage(r,s,c,u,m,0,0,u,m);const v=await new Promise(g=>p.toBlob(g));if(!v)throw new Error("Canvas produced no blob; cannot crop.");return URL.createObjectURL(v)}const Oc="2026-01-01T00:00:00.000Z",S2=new Map;function Bb(e){let t=S2.get(e);return t===void 0&&(t=sP().media(e).catch(()=>({items:[],contacts:[],lists:{}})),S2.set(e,t)),t}async function _P(e){const{items:t,lists:a}=await Bb(e);return c4(a,SP(t))}function SP(e){return[...OP(e),...CP(e),...AP(e),...NP(e),...MP(e)]}async function EP(e){return(await Bb(e)).contacts}async function jP(e,t){var c;const{items:a,contacts:r}=await Bb(e);return((c=a.find(u=>u.id===t))==null?void 0:c.src)||r.map(u=>u.images[t]).find(u=>u!==void 0)}function OP(e){return e.filter(t=>t.kind==="photo").map(t=>vc({id:t.id,kind:"image",name:t.name,added_at:Oc,file_url:t.src}))}function AP(e){return e.filter(t=>t.kind==="video").map(t=>{const a=t.provider!==void 0,r=t.src===""?{}:{poster:t.src},s=!a&&(t.ready??!0)?{encode:t.src}:{};return vc({id:t.id,kind:"video",name:t.name,added_at:Oc,duration_ms:t.durationMs??null,url:a?"":null,provider:t.provider??null,renditions:{...r,...s}})})}function NP(e){return e.filter(t=>t.kind==="tour").map(t=>vc({id:t.id,kind:"tour",name:t.name,added_at:Oc,url:t.url??"",provider:t.provider??null,renditions:t.src===""?{}:{poster:t.src}}))}function MP(e){return e.filter(t=>t.kind==="document").map(t=>vc({id:t.id,kind:"document",name:t.name,added_at:Oc,mime:t.mime??null,bytes:t.sizeBytes??null,renditions:t.src===""?{}:{poster:t.src}}))}function CP(e){return e.filter(t=>t.kind==="plan").map(t=>vc({id:t.id,kind:"image",name:t.name,added_at:Oc,file_url:t.src}))}function RP(e){return Promise.reject(new Error(`${e} is served by the host application and has no playground equivalent. A fixture's media is read-only.`))}function TP(e){return _P(e)}function DP(e,t,a){return RP("Pasting a link")}const LP=/^processed\/crops\/([^/]+)\/(-?[\d.e-]+)_(-?[\d.e-]+)_(-?[\d.e-]+)_(-?[\d.e-]+)$/,E2=new Map;function zP(e,t){const a=LP.exec(t);if(a===null)return Promise.reject(new Error(`Unknown crop ${t}.`));const[,r,s,c,u,m]=a,p={nx:Number(s),ny:Number(c),nw:Number(u),nh:Number(m)};let y=E2.get(t);return y||(y=jP(e,r).then(v=>{if(!v)throw new Error(`The fixture's property has no asset ${r} to crop.`);return kP(v,p)}),E2.set(t,y)),y}async function $P(e,t,a){var p;const[r,s]=t.split(".");if(e.home!=="library"||r!=="contacts")throw new Error(`The fixture holds no owned asset at '${t}'.`);const c=cP(),m=(p=(c===null?[]:await EP(c)).find(y=>y.id===s))==null?void 0:p.images[a];if(m===void 0)throw new Error(`The fixture's contact ${s} has no image ${a}.`);return m}function _f(){return Promise.reject(new Error("Uploads are served by the host application. The dev media pack is read-only."))}function UP(e,t,a){return _f()}function IP(e,t,a){return _f()}function BP(e,t,a){return _f()}function HP(e,t,a){return _f()}function qP(e){return Promise.reject(new Error("There is no property in the playground: the canvas renders a template, not a listing."))}const Hb="Uploading is served by the host application; the playground has no upload backend.";function FP(e,t,a,r){return Promise.reject(new Error(Hb))}function PP(e,t,a,r){return Promise.reject(new Error(Hb))}function VP(e,t,a){return Promise.reject(new Error(Hb))}const GP={postListUploadWithProgress:FP,postListLink:PP,withdrawListItem:VP,mediaFactsQuery:e=>({queryKey:["media-facts",e],queryFn:async()=>({facts:await TP(e)})})};function ky(e){return e===null||typeof e!="object"?JSON.stringify(e)??"undefined":Array.isArray(e)?`[${e.map(ky).join(",")}]`:`{${Object.keys(e).sort().map(t=>`${JSON.stringify(t)}:${ky(e[t])}`).join(",")}}`}function KP(e){return Array.isArray(e)?e.filter(t=>t!==null&&typeof t=="object"&&!Array.isArray(t)):[]}function YP(e,t,a){const r=new Map(t.map(s=>[s[a],s]));return KP(e).some(s=>{const c=r.get(s[a]);return c!==void 0&&Object.keys(c).some(u=>u in s&&!xA(s[u],c[u]))})}function QP(e,t,a,r,s,c){if(a.kind==="rows"){const m=QF(e,t,a,s);return m!==void 0&&YP(r,m,vb(a.tables))}const u=YF(e,t,a,s,c);return u===void 0?!1:D$(r)?Ji(r)!==Ji(u):!xA(r,u)}function XP(e,t,a){if(t===null)return[];const r={facts:t.facts,computed:t.computed},s=u=>ld(e.slots,u)??ld(t.resolvedProps.slots,u),c=[];for(const[u,m]of JF(a.slots)){if(!eP(m))continue;const p=ld(e.slots,u),y=Wy(a.slots,u);p===void 0||y===void 0||!QP(y,u,m,p,r,s)||c.push({id:`${u}:scalar::@${ky(p)}`,kind:"scalar",label:y.label,slotId:u})}return c}const ZP={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 WP(e){return d.jsx("span",{className:"inline-flex flex-shrink-0 items-center gap-1","data-testid":"provenance-chips",children:e.chips.map(t=>d.jsx("span",{"data-testid":"provenance-chip","data-provenance":t.kind,"data-slots":t.slots.map(a=>a.id).join(" "),title:`${t.kind}: ${t.slots.map(a=>a.ref===null?a.id:`${a.id} ← ${a.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] ${ZP[t.kind]}`,children:t.kind},t.kind))})}function JP(e){return d.jsxs("div",{className:"relative",children:[e.children,d.jsx("div",{className:"pointer-events-none absolute right-10 top-[15px]",children:d.jsx(WP,{chips:e.chips})})]})}function eV(e,t){const a=!t,r=e.required&&!a;return{hidden:a,locked:r,title:r?"Required section — cannot hide":a?"Hidden from live page":"Visible on live page"}}function kA(e){const{variant:t}=e;return t===null||t.locked||t.cases.length<2?null:t.cases}function tV(e,t){return t||(e==null?void 0:e.kind)==="session"?{kind:"edited",ref:null}:e===void 0?{kind:"empty",ref:null}:e.kind==="fact"||e.kind==="computed"?{kind:e.kind,ref:e.ref}:{kind:e.kind,ref:null}}function nV(e,t,a){const r=new Map;for(const s of e){const{kind:c,ref:u}=tV(t==null?void 0:t[s],a(s));r.set(c,[...r.get(c)??[],{id:s,ref:u}])}return[...r].map(([s,c])=>({kind:s,slots:c}))}const j2="grid h-8 w-8 cursor-pointer place-items-center rounded-md border-0 p-0 transition-colors";function iV(e){const t=eV(e.display,e.enabled);return d.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:[d.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:d.jsx("h2",{className:"m-0 truncate text-body-lg font-semibold tracking-[-0.005em] text-ink",children:e.label})}),d.jsxs("div",{className:"inline-flex flex-shrink-0 items-center gap-0.5",children:[d.jsx("button",{type:"button","data-testid":"section-eye","aria-pressed":t.hidden,"aria-label":t.title,onClick:()=>!t.locked&&e.onSetEnabled(t.hidden),disabled:t.locked,title:t.title,className:`${j2} disabled:cursor-not-allowed disabled:text-ink-4 disabled:opacity-100 ${t.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:d.jsx(ci,{name:t.hidden?"eyeOff":"eye",size:15,stroke:1.8})}),kA(e.display)?d.jsx("button",{type:"button","data-testid":"section-gear",onClick:e.onOpenSettings,title:"Section settings","aria-label":"Section settings",className:`${j2} bg-transparent text-ink-2 hover:bg-[rgba(20,18,13,0.06)] hover:text-ink`,children:d.jsx(ci,{name:"settings",size:15,stroke:1.8})}):null]})]})}const aV=ie("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 rV(e){const t=kA(e.display),a=wF(e.sectionSchema,e.variant,e.slotValue).length;return d.jsxs(d.Fragment,{children:[d.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:d.jsxs("nav",{className:"inline-flex min-w-0 items-center gap-1.5 text-body-lg tracking-[-0.005em]","aria-label":"Breadcrumbs",children:[d.jsx("button",{type:"button","data-testid":"settings-back",onClick:e.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:e.label}),d.jsx("span",{className:"inline-grid place-items-center leading-none text-ink-4","aria-hidden":"true",children:d.jsx(ci,{name:"chevRight",size:12,stroke:1.8})}),d.jsx("span",{className:"max-w-[calc(220*var(--content))] truncate font-semibold text-ink",children:"Settings"})]})}),d.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:t?d.jsxs("section",{"aria-label":"Variation",className:"flex flex-col gap-2.5",children:[d.jsx("h3",{className:"px-1 text-[length:calc(11.5*var(--content))] font-medium uppercase tracking-[0.04em] text-ink-3",children:"Variation"}),d.jsx("div",{className:"flex flex-col gap-2",children:t.map(r=>d.jsxs("label",{"data-selected":r.value===e.variant,className:aV,children:[d.jsx("input",{type:"radio",className:"sr-only",name:`variation-${e.instanceId}`,value:r.value,checked:r.value===e.variant,onChange:()=>e.onSetVariant(r.value)}),d.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:d.jsx("span",{className:"size-2 rounded-full bg-accent opacity-0 transition-opacity group-data-[selected=true]/case:opacity-100"})}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-[length:calc(13.5*var(--content))] font-medium text-ink",children:r.label})]},r.value))}),a>0?d.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:a===1?"1 empty field in this variation":`${a} empty fields in this variation`}):null]}):d.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 oV(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function O2(e){return d.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",...e,children:d.jsx("path",{d:"M2.5 7h9M8 3.5 11.5 7 8 10.5"})})}function sV(e){return d.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",...e,children:d.jsx("path",{d:"M3.5 8.5l3 3 6-6.5"})})}function A2(e){return d.jsx("svg",{viewBox:"0 0 14 14",width:"13",height:"13",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round","aria-hidden":"true",...e,children:d.jsx("path",{d:"M3.5 3.5l7 7M10.5 3.5l-7 7"})})}function lV({items:e,onApply:t}){const a=e??[],r=a.length,s=a.map(le=>le.id).join("|"),[c,u]=x.useState(!1),[m,p]=x.useState("idle"),[y,v]=x.useState(!1),[g,w]=x.useState(0),k=x.useRef(null),E=x.useRef(null),S=x.useRef(null),j=x.useRef(null),C=x.useRef(a),A=x.useRef(!0);x.useLayoutEffect(()=>{C.current=a});const O=x.useRef(oV()).current,T=x.useCallback(le=>{const ee=k.current;if(O||document.hidden||ee==null||typeof ee.animate!="function"){v(!1),u(!1),p("idle"),le==null||le();return}v(!0);const de=ee.animate([{opacity:1,transform:"none"},{opacity:0,transform:"translateY(6px)"}],{duration:240,easing:"cubic-bezier(.4,0,.2,1)",fill:"forwards"});de.onfinish=()=>{v(!1),u(!1),p("idle"),le==null||le()}},[O]);x.useEffect(()=>(E.current!=null&&clearTimeout(E.current),r>0&&m==="idle"?s!==j.current&&!c&&(E.current=setTimeout(()=>{u(!0)},550)):r===0&&c&&!y&&m==="idle"&&T(),()=>{E.current!=null&&clearTimeout(E.current)}),[r,s,c,m,y,T]),x.useLayoutEffect(()=>{if(!c||m!=="idle"||O||y)return;const le=k.current;le!=null&&typeof le.animate=="function"&&!document.hidden&&le.animate([{opacity:.45,transform:"translateY(10px)"},{opacity:1,transform:"none"}],{duration:420,easing:"cubic-bezier(.18,.82,.25,1)"})},[c,m,O,y]),x.useEffect(()=>{if(m!=="applying")return;const le=ee=>{ee.preventDefault(),ee.returnValue=""};return window.addEventListener("beforeunload",le),()=>window.removeEventListener("beforeunload",le)},[m]),x.useEffect(()=>(A.current=!0,()=>{A.current=!1,E.current!=null&&clearTimeout(E.current),S.current!=null&&clearTimeout(S.current)}),[]);const R=()=>{const le=C.current;w(le.length),p("applying"),(async()=>{try{if(await t(le),!A.current)return;u(!1),p("success"),S.current!=null&&clearTimeout(S.current),S.current=setTimeout(()=>{T(()=>{j.current=null})},1200)}catch{if(!A.current)return;p("error")}})()},B=()=>{j.current=s,T()};if(!c&&m!=="success"&&!y)return null;const D=m==="applying",L=D?g:r,P=L===1?d.jsxs(d.Fragment,{children:[d.jsx("b",{className:"font-bold text-ink",children:"1"})," change to your property details"]}):d.jsxs(d.Fragment,{children:[d.jsx("b",{className:"font-bold text-ink",children:L})," changes to your property details"]});return d.jsx("div",{className:"pointer-events-none absolute bottom-[10px] left-0 right-0 z-[6]","aria-live":"polite",children:d.jsx("div",{className:"pointer-events-none",ref:k,children:d.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":m==="success"?"":void 0,children:m==="success"?d.jsxs("div",{className:"flex items-center gap-2 text-body font-semibold text-good",children:[d.jsx("span",{className:"grid flex-shrink-0 place-items-center [animation:we-ub-pop_.34s_cubic-bezier(.2,1.3,.4,1)_both]",children:d.jsx(sV,{})}),"Updated everywhere"]}):m==="error"?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-start gap-[calc(9*var(--content))]",children:[d.jsxs("div",{className:"min-w-0 flex-1 text-body leading-[1.4]",children:[d.jsx("div",{className:"font-semibold text-danger",children:"Couldn't update"}),d.jsx("div",{className:"mt-0.5 text-[length:calc(11.5*var(--content))] text-ink-3",children:"Something went wrong. Please try again."})]}),d.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:B,"aria-label":"Dismiss",children:d.jsx(A2,{})})]}),d.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:R,children:["Retry ",d.jsx(O2,{})]})]}):d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-start gap-[calc(9*var(--content))]",children:[d.jsxs("div",{className:"min-w-0 flex-1 text-body leading-[1.4] text-ink-2",children:[P,d.jsx("div",{className:"mt-0.5 text-[length:calc(11.5*var(--content))] text-ink-3",children:"Update them everywhere these details are used."})]}),d.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:B,disabled:D,"aria-label":"Dismiss",children:d.jsx(A2,{})})]}),d.jsx("button",{type:"button","data-action":"apply",disabled:D,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:R,children:D?d.jsxs(d.Fragment,{children:[d.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…"]}):d.jsxs(d.Fragment,{children:["Update everywhere ",d.jsx(O2,{})]})})]})})})})}const cV="Real editor chrome. The playground has no linked sources, so this cannot update anything — the flow above is a preview.",uV="Nothing was updated. In the app this writes the change to every deliverable sharing the linked source.";function dV({items:e}){const[t,a]=x.useState([]),r=e.filter(u=>!t.includes(u.id)),s=t.length>0&&r.length===0,c=x.useCallback(u=>{a(m=>[...m,...u.map(p=>p.id)])},[]);return d.jsxs("div",{className:"instance-panel__we",children:[d.jsx("div",{className:"instance-panel__we-anchor",children:d.jsx(lV,{items:r,onApply:c})}),r.length>0||s?d.jsx("p",{className:"instance-panel__we-caption","data-testid":"we-caption","data-phase":s?"applied":"preview",children:s?uV:cV}):null]})}const fV={apiFetch:vP,getCropDerivativeUrl:zP,postLink:DP,stageOwnedAsset:UP,ownedAssetUrl:$P,discardStagedAsset:IP,uploadContentAsset:BP,contentAssetUrl:HP,fetchProperty:qP};function hV(e,t,a){return x.useMemo(()=>{const r={session:{property_id:e,listing_intent:null},select:s=>{if(s===null){a(null);return}if(s.kind==="section"){a({kind:"section",instanceId:s.instance_id});return}a({kind:"slot",instanceId:s.instance_id,slotId:s.slot_id,...s.item_index!==void 0?{itemIndex:s.item_index}:{}})},markSlotOverridden:()=>{},relinkSlot:()=>{}};return{useEditorStore:s=>s(r),capabilities:{},api:fV,MediaPicker:mV}},[e,t,a])}function mV(e){return d.jsx(MU,{...e,capabilities:{upload:!1,manage:!1}})}function pV(e,t){const{selection:a}=e;if((a==null?void 0:a.kind)==="slot"&&!(a.instanceId!==e.instanceId||a.slotId!==t))return a.itemIndex}function yV(e,t){var a;return nV(t,(a=e.payload)==null?void 0:a.provenance,r=>e.override.slots[r]!==void 0)}function ql(e,t){var s;const a=Ec(t);if(a!==null)return ld({[a.object]:ql(e,a.object)},t);const r=e.override.slots[t];return r!==void 0?r:(s=e.payload)==null?void 0:s.resolvedProps.slots[t]}function gV(e,t,a){const r=Ec(t);if(r===null)return e.onApplySlot(t,a);const s=gB({[r.object]:ql(e,r.object)},t,a)[r.object];e.onApplySlot(r.object,s)}function bV(e){var m;const t=hV(e.fixture,e.selection,e.onSelect);iP();const a=x.useMemo(()=>new RD,[]),r=e.displayState.variant,s=x.useMemo(()=>fA(e.sectionSchema,r),[e.sectionSchema,r]),c=x.useMemo(()=>XP(e.override,e.payload,e.sectionSchema),[e.override,e.payload,e.sectionSchema]),u=((m=e.selection)==null?void 0:m.kind)==="slot"&&e.selection.instanceId===e.instanceId?e.selection.slotId:null;return d.jsxs("aside",{className:"instance-panel","data-testid":"instance-panel","data-instance-id":e.instanceId,children:[e.settingsOpen?d.jsx(rV,{instanceId:e.instanceId,label:e.label,display:e.display,sectionSchema:e.sectionSchema,variant:r,slotValue:p=>ql(e,p),onSetVariant:e.onSetVariant,onBack:e.onCloseSettings}):d.jsx(iV,{label:e.label,display:e.display,enabled:e.displayState.enabled,onSetEnabled:e.onSetEnabled,onOpenSettings:e.onOpenSettings}),e.settingsOpen?null:e.renderError?d.jsx("p",{className:"instance-panel__error","data-testid":"render-error",children:e.renderError}):null,e.settingsOpen?null:e.payload===null?d.jsx("p",{className:"instance-panel__empty","data-testid":"panel-loading",children:"Loading…"}):d.jsx(TD,{client:a,children:d.jsx(sz,{api:GP,children:d.jsx(B8,{ports:t,children:d.jsx(sf,{place:"panel",children:d.jsxs("div",{className:"instance-panel__dock",children:[d.jsxs("div",{className:"hp-sb-scroll instance-panel__cards","data-testid":"slot-cards","data-dirty":c.length>0?"":void 0,children:[s.map(p=>d.jsx(JP,{chips:yV(e,vF(p)),children:d.jsx(zO,{open:u!=null&&f2(p,u),onToggle:()=>u!=null&&f2(p,u)?e.onSelect({kind:"section",instanceId:e.instanceId}):e.onSelect({kind:"slot",instanceId:e.instanceId,slotId:p.selectSlotId}),icon:p.Icon?d.jsx(p.Icon,{size:14}):null,title:bF(p,e.sectionSchema,y=>ql(e,y)),scrollKey:p.key,children:d.jsx(Tb,{fields:p.fields.map(y=>[d2(y),y.slot]),lone:p.lone,renderField:(y,v)=>{const g=p.fields.find(w=>d2(w)===y).slotId;return d.jsx(jc,{slot:v,instanceId:e.instanceId,slotId:g,value:ql(e,g),propertyId:e.fixture,onChange:w=>gV(e,g,w),selectedItemIndex:pV(e,g)})}})})},p.key)),s.length===0?d.jsx("p",{className:"instance-panel__empty","data-testid":"no-editable-slots",children:"Nothing to edit in this section."}):null]}),d.jsx(dV,{items:c})]})})})})})]})}function vV(e,t){return e.find(a=>a.pages.includes(t))??null}function xV(e,t,a,r){const s=t.endsWith("/")?t:`${t}/`;if(!e.startsWith(s))return null;const c=e.indexOf("#"),u=c===-1?null:e.slice(c+1),m=(c===-1?e:e.slice(0,c)).slice(s.length).split("/").filter(Boolean),[p,y,v,g,...w]=m;if(p!=="fixtures"||y===void 0||v!=="live"||w.length>0)return null;const k=g===void 0?"/":`/${decodeURIComponent(g)}`,E=a.find(j=>j.path===k);if(!E)return null;const S=vV(r,E.id);return S?{pageId:E.id,canvasId:S.id,anchor:u||null}:null}const yp="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]",wV="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]",kV="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]",_V="cursor-not-allowed border-line bg-[#f3f1ea] text-ink-4";function SV({host:e,templateName:t,fixture:a,output:r,format:s,canvas:c,pagePath:u}){const m=r==="website"?{href:e.liveHref(a,u??"/"),title:`Open this page as it would publish — ${t}`}:null,p=r==="image"?{href:e.captureHref("bundle",{fixture:a,format:s,canvas:c}),title:`Download every page of this canvas as a zip — ${t}`}:r==="document"?{href:e.captureHref("print",{fixture:a,format:s}),title:`Download the PDF — ${t}`}:null;return d.jsx("footer",{className:"flex-shrink-0 border-t border-line-soft bg-canvas p-3","data-testid":"panel-footer",children:d.jsxs("div",{className:p&&!m?"w-full":"grid w-full grid-cols-2 gap-2",children:[m?d.jsxs("a",{href:m.href,target:"_blank",rel:"noopener noreferrer","data-testid":"view-live",title:m.title,className:`${yp} ${wV}`,children:[d.jsx("span",{className:"grid place-items-center text-ink-3 transition-colors group-hover:text-ink",children:d.jsx(ci,{name:"external",size:12,stroke:1.6})}),d.jsx("span",{"data-testid":"view-live-label",children:"View live"})]}):null,p?d.jsxs("a",{href:p.href,"data-testid":"download",title:p.title,className:`${yp} ${kV}`,children:[d.jsx(rE,{size:14,className:"h-[calc(14*var(--content))] w-[calc(14*var(--content))]"}),d.jsx("span",{"data-testid":"download-label",children:"Download"})]}):d.jsx("button",{type:"button",disabled:!0,"data-testid":"publish",title:"Publishing needs a property and a deliverable — preview publish states in the application",className:`${yp} ${_V}`,children:d.jsx("span",{children:"Publish"})})]})})}function EV(e,t,a,r){const s=e.ownerDocument,c=[],u=new Map;for(const m of Array.from(e.children)){const p=m,y=p.getAttribute(yf);y&&u.set(y,p)}for(const m of t){const p=u.get(m.instance_id),y=(p==null?void 0:p.dataset.svId)!==m.section_version_id;p&&y&&(r==null||r(p),p.remove());const v=p&&!y,g=v?p:a(m,s);v||c.push(g),e.appendChild(g),u.delete(m.instance_id)}return u.forEach(m=>{r==null||r(m),m.remove()}),c}function _A(e){return e==null?void 0:e.__trCanvasIslands}function jV(e,t,a,r){const s=e==null?void 0:e.querySelector(`[${yf}="${a}"]`);if(!s)return!1;const c=s.querySelector(":scope > .we-section-body")??s,u=_A(t);return u==null||u.unmountRoot(s),c.innerHTML=r,u==null||u.hydrateRoot(s),!0}function OV(){return{slots:{}}}function vi(e,t,a){var r;return((r=e[t])==null?void 0:r[a])??OV()}function qb(e,t,a,r){return{...e,[t]:{...e[t],[a]:r}}}function AV(e,t,a,r,s){const c=vi(e,t,a);return qb(e,t,a,{...c,slots:{...c.slots,[r]:s}})}function NV(e,t,a,r){return qb(e,t,a,{...vi(e,t,a),enabled:r})}function MV(e,t,a,r){return qb(e,t,a,{...vi(e,t,a),variant:r})}function CV(e,t){const a=e.enabled??(t==null?void 0:t.enabled)??!0,r=e.variant??(t==null?void 0:t.variant);return r===void 0?{enabled:a}:{enabled:a,variant:r}}function RV(e){return Object.keys(e.slots).length===0?{}:{slots:e.slots}}function TV(e,t){const a={};for(const[r,s]of Object.entries(e[t]??{}))s.enabled===void 0&&s.variant===void 0||(a[r]={...s.enabled===void 0?{}:{enabled:s.enabled},...s.variant===void 0?{}:{variant:s.variant}});return a}function DV(e,t){return Object.keys(e).filter(a=>t[a]!==e[a])}function LV(e,t){if(!t.some(r=>r in e))return e;const a={...e};for(const r of t)delete a[r];return a}function N2(e,t,a,r){return{...e,[t]:{...e[t],[a]:r}}}function zV(e,t,a){const r=e[t];if(!r||!(a in r))return e;const s={...r};return delete s[a],{...e,[t]:s}}function $V(e){const{host:t,fixture:a,doc:r,resolvedDisplay:s,sessions:c,pages:u,frameFor:m}=e,{edits:p,setEdits:y}=c,[v,g]=x.useState({}),[w,k]=x.useState({}),E=[a,r??"",...u.map(Y=>Y.id)].join("\0"),[S,j]=x.useState(E);S!==E&&(j(E),g({}),k({}));const C=x.useRef(v);C.current=v;const A=x.useRef(m);A.current=m;const O=x.useRef(u);O.current=u;const T=x.useRef(p);T.current=p;const R=x.useRef(a);R.current=a;const B=x.useRef(r);B.current=r;const D=x.useRef(new Map),L=x.useCallback(Y=>vi(p,a,Y),[p,a]),P=x.useCallback(Y=>CV(vi(p,a,Y),s==null?void 0:s[Y]),[p,a,s]),le=x.useCallback((Y,M)=>{var H;return((H=w[Y])==null?void 0:H[M])??null},[w]),ee=x.useCallback(Y=>{var M;for(const H of u){const I=(M=w[H.id])==null?void 0:M[Y];if(I!==void 0)return I}return null},[w,u]),de=x.useCallback(Y=>{var M;for(const H of u){const I=(M=v[H.id])==null?void 0:M[Y];if(I)return I}return null},[v,u]),K=x.useCallback(async(Y,M,H,I)=>{const F=Y.id,W=R.current,pe=B.current,oe=`${F}\0${M}`,ke=(D.current.get(oe)??0)+1;D.current.set(oe,ke);const z=()=>W!==R.current||pe!==B.current||D.current.get(oe)!==ke;try{const ce=await t.render({page:F,instance:M,fixture:W,session:RV(H),display:TV(T.current,W)});if(z()||(g(Le=>N2(Le,F,M,ce)),k(Le=>zV(Le,F,M)),!I))return;const{doc:ge,win:Se}=A.current(F);jV(ge,Se,M,ce.html)}catch(ce){if(z())return;const ge=ce instanceof Error?ce.message:String(ce);k(Se=>N2(Se,F,M,ge))}},[t]),Q=x.useCallback((Y,M)=>{var I;if((I=C.current[Y])!=null&&I[M])return;const H=O.current.find(F=>F.id===Y);H&&K(H,M,vi(T.current,R.current,M),!1)},[K]),se=x.useCallback((Y,M)=>{var H;for(const I of O.current)((H=C.current[I.id])==null?void 0:H[Y])!==void 0&&K(I,Y,M,!0)},[K]),N=x.useCallback(Y=>{se(Y,vi(T.current,R.current,Y))},[se]),V=x.useCallback((Y,M,H)=>{const I=AV(T.current,R.current,Y,M,H);T.current=I,y(I),se(Y,vi(I,R.current,Y))},[se,y]),te=x.useCallback((Y,M)=>{const H=NV(T.current,R.current,Y,M);T.current=H,y(H);for(const I of O.current)for(const F of Object.keys(C.current[I.id]??{}))K(I,F,vi(H,R.current,F),!0)},[K,y]),me=x.useCallback((Y,M)=>{const H=MV(T.current,R.current,Y,M);T.current=H,y(H),se(Y,vi(H,R.current,Y))},[se,y]);return x.useMemo(()=>({overrideFor:L,displayFor:P,payloads:v,errorOn:le,errorFor:ee,payloadFor:de,ensureLoaded:Q,reload:N,applySlot:V,setEnabled:te,setVariant:me}),[L,P,v,le,ee,de,Q,N,V,te,me])}const UV={slots:{},slot_order:[]},IV={required:!1,variant:null},BV=[];function M2(e){return e?e.kind==="section"?{kind:"section",instance_id:e.instanceId}:{kind:"slot",instance_id:e.instanceId,slot_id:e.slotId,...e.itemIndex!==void 0?{item_index:e.itemIndex}:{}}:null}function HV(e){return e.kind==="section"?{kind:"section",instanceId:e.instance_id}:{kind:"slot",instanceId:e.instance_id,slotId:e.slot_id,...e.item_index!==void 0?{itemIndex:e.item_index}:{}}}function qV(e,t){if(!e)return[];const a=[];for(const r of e.pages){const s=t.find(c=>c.id===r);s&&a.push(s)}return a}function ed(e,t,a,r){var p;const s=((p=t.doc)==null?void 0:p.getElementById(e))??null;if(!s||!a)return;const c=s.getBoundingClientRect(),u=d5({top:c.top,height:c.height},t.wrapper.offsetTop,r,a.scrollTop),m=u5(u,a.clientHeight,a.scrollTop,c5);m!==null&&a.scrollTo({top:m,behavior:"smooth"})}function C2(e,t){return e.querySelector(`[${yf}="${Pr(t)}"]`)}function bi(e){const t=JSON.stringify(e);return x.useMemo(()=>e,[t])}function FV(e){var at,Qt,ut;const{host:t,catalog:a,view:r,onViewChange:s,sessions:c}=e,u=x.useRef(null),m=x.useRef([]),[p,y]=x.useState({}),[v,g]=x.useState(1),[w,k]=x.useState(0),[E,S]=x.useState(!1),[j,C]=x.useState(null),A=r.fixture,O=a.fixtures.find(ne=>ne.id===A),T=O==null?void 0:O.doc,R=O==null?void 0:O.display,[B,D]=x.useState(null),L=x.useCallback(ne=>{D(null),s(ne)},[s]);x.useEffect(()=>{lP(A)},[A]);const P=x.useMemo(()=>new URL(t.base).pathname,[t.base]),le=bi(a.template.pages),ee=bi(a.template.canvases),de=bi(a.islands.map),K=bi(a.stylesheets),Q=a.islands.hostScript,se=bi(a.islands.importMap),N=bi(Object.fromEntries(a.template.instances.map(ne=>[ne.instanceId,ne.sectionSchema]))),V=bi(Object.fromEntries(a.template.instances.map(ne=>[ne.instanceId,ne.section]))),te=bi(a.template.instances),me=a.template.output,Y=me!=="website",M=Y?a.template.formats:[],H=bi(Y?M.find(ne=>ne.id===r.format)??M[0]??null:null),I=H!==null&&H.bleed>0?H.bleed:null,F=x.useMemo(()=>H?{formatId:H.id,width:H.cssWidth,height:H.cssHeight,tokens:H.tokens}:void 0,[H]),W=ee.find(ne=>ne.id===r.canvasId)??(r.canvasId===null?ee[0]??null:null),pe=ee.length>0&&W===null,oe=x.useMemo(()=>W?qV(W,le):BV,[W,le]),ke=x.useMemo(()=>oe.map(ne=>({id:ne.id})),[oe]),z={basePath:P,stylesheets:K,cssRev:String(w),islands:de,hostScript:Q,importMap:se},ce=x.useMemo(()=>Jx(_2({...z,sectionSchemaByInstance:N,...F?{pageBox:F}:{}})),[P,K,w,de,Q,se,N,F]),ge=x.useMemo(()=>Jx(_2({...z,...F?{pageBox:F}:{}})).srcdoc(),[P,K,w,de,Q,se,F]),[Se,Le]=x.useState(ge);Se!==ge&&(Le(ge),y({}));const Ie=x.useCallback(ne=>{const be=m.current.find(Oe=>Oe.key===ne);return{doc:(be==null?void 0:be.doc)??null,win:(be==null?void 0:be.iframe.contentWindow)??null}},[]),ye=$V({host:t,fixture:A,doc:T,resolvedDisplay:R,sessions:c,pages:ke,frameFor:Ie}),Re=bi(te.map(ne=>ne.instanceId).filter(ne=>!ye.displayFor(ne).enabled)),[ht,$e]=x.useState(null),Lt=x.useRef(r.selection);Lt.current=r.selection;const lt=x.useRef(ye);lt.current=ye;const Fn=x.useRef(oe);Fn.current=oe;const An=x.useRef(v);An.current=v;const un=x.useMemo(()=>oe.map(ne=>({key:ne.id,srcdoc:ge,label:ne.label,title:`Canvas preview — ${ne.label}`,...F?{pageBox:F}:{}})),[oe,ge,F]);x.useEffect(()=>{const ne=u.current;if(!ne)return;const be=o5(ne,un);m.current=be;const Oe=be.map(ze=>{const Ge=()=>{qC(ze.doc)&&y(He=>({...He,[ze.key]:!0}))};return ze.iframe.addEventListener("load",Ge),()=>ze.iframe.removeEventListener("load",Ge)});return()=>{for(const ze of Oe)ze()}},[un]),x.useEffect(()=>{for(const ne of m.current)l5(ne.overlay,E?I:null)},[E,I,un]),x.useEffect(()=>{const ne=u.current;if(!ne||typeof ResizeObserver>"u")return;const be=new ResizeObserver(Oe=>{var He;const ze=(He=Oe[0])==null?void 0:He.contentRect;if(!(ze!=null&&ze.width))return;const Ge=dC(ze.width);g(hC(Ge,{availableWidthPx:ze.width,availableHeightPx:ze.height},F?{width:F.width,height:F.height}:void 0))});return be.observe(ne),()=>be.disconnect()},[F]),x.useEffect(()=>{var ne;(ne=u.current)==null||ne.style.setProperty("--we-scale",String(v))},[v]),x.useEffect(()=>{var be;if(F)return;const ne=[];for(const Oe of m.current){if(!p[Oe.key])continue;const ze=(be=Oe.doc)==null?void 0:be.getElementById("we-page");if(!ze)continue;const Ge=()=>Oe.setPageHeight(ze.getBoundingClientRect().height);if(Ge(),typeof ResizeObserver>"u")continue;const He=new ResizeObserver(Ge);He.observe(ze),ne.push(()=>He.disconnect())}return()=>{for(const Oe of ne)Oe()}},[p,un,F]),x.useEffect(()=>{const ne=ht;if(!ne)return;const be=()=>{document.documentElement.style.setProperty("--we-panel-w",`${ne.offsetWidth}px`)};be();const Oe=typeof ResizeObserver<"u"?new ResizeObserver(be):null;return Oe==null||Oe.observe(ne),()=>{Oe==null||Oe.disconnect(),document.documentElement.style.removeProperty("--we-panel-w")}},[ht]),x.useEffect(()=>{for(const ne of oe)for(const be of ne.instanceIds)ye.ensureLoaded(ne.id,be)},[oe,ye.ensureLoaded,A,T]);const gt=x.useMemo(()=>{const ne={};for(const be of oe){const Oe=ye.payloads[be.id]??{};ne[be.id]=be.instanceIds.filter(ze=>Oe[ze]??ye.errorOn(be.id,ze)).map(ze=>{var He,kt;const Ge=ye.errorOn(be.id,ze);return{instance_id:ze,section_version_id:A,section_key:V[ze]??ze,section_display_name:((He=te.find(jt=>jt.instanceId===ze))==null?void 0:He.label)??null,html:((kt=Oe[ze])==null?void 0:kt.html)??null,render_error:Ge?{code:"render_failed",message:Ge}:null}})}return ne},[oe,ye.payloads,ye.errorOn,V,te,A]);x.useEffect(()=>{let ne=!1;for(const be of m.current){if(!p[be.key])continue;const Oe=be.doc,ze=be.iframe.contentWindow,Ge=Oe==null?void 0:Oe.getElementById("we-page");if(!Ge)continue;const He=_A(ze),kt=EV(Ge,gt[be.key]??[],(jt,_t)=>ce.buildSectionWrapper(jt,_t),jt=>He==null?void 0:He.unmountRoot(jt));kt.length>0&&!He&&!ne&&Object.keys(de).length>0&&(ne=!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 jt of kt)He==null||He.hydrateRoot(jt).catch(_t=>{console.error("playground: canvas hydration pass failed:",_t)})}},[p,un,gt,ce,de]);const aa=x.useRef(()=>{});aa.current=ne=>{ye.setEnabled(ne,!0),L({...r,selection:{kind:"section",instanceId:ne}})},x.useEffect(()=>{var Oe;const ne=new Set(Re),be=[];for(const ze of m.current){if(!p[ze.key])continue;const Ge=ze.doc;if(!Ge)continue;const He=gt[ze.key]??[];for(const Zt of He)(Oe=C2(Ge,Zt.instance_id))==null||Oe.setAttribute("data-hidden",ne.has(Zt.instance_id)?"true":"false");const kt=He.filter(Zt=>ne.has(Zt.instance_id)).map(Zt=>({instanceId:Zt.instance_id,label:bp(Zt)})),jt=XC(ze.tabLayer,document,kt,Zt=>aa.current(Zt)),_t=()=>ZC(jt,Zt=>C2(Ge,Zt),v);_t();const Ft=Ge.getElementById("we-page");if(!Ft||typeof ResizeObserver>"u")continue;const Xt=new ResizeObserver(_t);Xt.observe(Ft),be.push(()=>Xt.disconnect())}return()=>{for(const ze of be)ze()}},[p,un,gt,Re,v]);const di=x.useCallback(()=>{const ne=m.current,be=Lt.current,Oe=M2(be);for(const He of ne)He.doc&&ce.setLiveOwner(He.doc,Oe);const ze=s5(ne,ce,Oe),Ge=be!==null&&Re.includes(be.instanceId);for(const He of ne){const kt=He.overlay.querySelector(".we-chrome-label"),jt=be&&!Ge?ze.find(_t=>_t.handle.key===He.key):void 0;if(!jt||!be){Kx(He.overlay,[],Bm),gp(kt);continue}if(Kx(He.overlay,jt.els,Bm,be.kind),be.kind==="section"){const _t=(gt[He.key]??[]).find(Ft=>Ft.instance_id===be.instanceId);nC(kt,jt.els[0]??null,_t?bp(_t):"")}else gp(kt)}},[ce,gt,Re]);x.useEffect(()=>{di();for(const ne of m.current){if(!p[ne.key])continue;const be=ne.doc,Oe=ne.iframe.contentWindow;be&&Oe&&p5(Oe,be,M2(r.selection))}},[p,un,r.selection,di]);const ii=x.useCallback((ne,be)=>{const Oe=ne.getAttribute("href")??"";if(!Oe||Oe==="#")return;const ze=u.current;if(Oe.startsWith("#")){ed(Oe.slice(1),be,ze,An.current);return}const Ge=xV(Oe,P,le,ee);if(!Ge){window.open(Oe,"_blank","noopener,noreferrer");return}if(W!==null&&Ge.canvasId===W.id){const He=m.current.find(kt=>kt.key===Ge.pageId);if(!He)return;Ge.anchor?ed(Ge.anchor,He,ze,An.current):He!==be&&ed("we-page",He,ze,An.current);return}L({...r,canvasId:Ge.canvasId,selection:null}),Ge.anchor&&C({pageId:Ge.pageId,anchor:Ge.anchor})},[r,L,P,le,ee,W]);x.useEffect(()=>{var be;if(!j||!p[j.pageId])return;const ne=m.current.find(Oe=>Oe.key===j.pageId);(be=ne==null?void 0:ne.doc)!=null&&be.getElementById(j.anchor)&&(ed(j.anchor,ne,u.current,An.current),C(null))},[j,p,gt]),x.useEffect(()=>{const ne=[];for(const be of m.current){if(!p[be.key])continue;const Oe=be.doc;if(!Oe)continue;const ze=gt[be.key]??[],Ge=be.overlay.querySelector(".we-chrome-ring--hover"),He=Ft=>{var ai;const Xt=Ft.target,Zt=ce.resolveTarget(Xt,ze);td(Ge);const Nn=Zt?HV(Zt.selection):null,Oi=((ai=Xt.closest)==null?void 0:ai.call(Xt,"a"))??null;if(Oi){if(Ft.preventDefault(),(Nn==null?void 0:Nn.kind)==="slot"){const fi=r.selection,io=(fi==null?void 0:fi.kind)==="slot"&&fi.instanceId===Nn.instanceId&&fi.slotId===Nn.slotId&&fi.itemIndex===Nn.itemIndex;L({...r,selection:Nn}),io&&ii(Oi,be);return}ii(Oi,be);return}L({...r,selection:Nn})},kt=Ft=>{const Xt=ce.resolveTarget(Ft.target,ze);Xt?K2(Ge,Xt.element,Bm):td(Ge)},jt=()=>td(Ge),_t=Ft=>{Ft.key==="Escape"&&L({...r,selection:null})};Oe.body.addEventListener("click",He),Oe.body.addEventListener("mouseover",kt),Oe.body.addEventListener("mouseleave",jt),Oe.body.addEventListener("keydown",_t),ne.push(()=>{Oe.body.removeEventListener("click",He),Oe.body.removeEventListener("mouseover",kt),Oe.body.removeEventListener("mouseleave",jt),Oe.body.removeEventListener("keydown",_t)})}return()=>{for(const be of ne)be()}},[p,un,ce,gt,r,L,ii]);const we=a.capabilities.hmr;x.useEffect(()=>{if(!we)return;const ne=()=>{const be=new Set;for(const Oe of Fn.current)for(const ze of Oe.instanceIds)be.has(ze)||(be.add(ze),lt.current.reload(ze))};return t.subscribe({source:ne,stylesheet:()=>k(be=>be+1)})},[t,we]);const Te=r.selection,Ce=(Te==null?void 0:Te.instanceId)??null,Xe=oe.find(ne=>Ce!==null&&ne.instanceIds.includes(Ce))??oe[0]??null;return x.useEffect(()=>{Ce&&Xe&&ye.ensureLoaded(Xe.id,Ce)},[Ce,Xe==null?void 0:Xe.id,ye.ensureLoaded]),pe?d.jsxs("div",{className:"boot-error",children:['The template declares no canvas "',r.canvasId,'".',`
|
|
1258
|
-
`,"Declared canvases: ",ee.map(ne=>ne.id).join(", ")]}):d.jsxs("div",{className:"canvas-mirror",children:[d.jsx("style",{children:e5}),ee.length>1?d.jsx("div",{className:"canvas-bar",children:d.jsx("nav",{className:"canvas-bar__card","aria-label":"Canvases",children:ee.map(ne=>d.jsx("button",{type:"button",className:ne.id===(W==null?void 0:W.id)?"canvas-bar__tab is-current":"canvas-bar__tab","aria-current":ne.id===(W==null?void 0:W.id)?"page":void 0,onClick:()=>L({...r,canvasId:ne.id,selection:null}),children:ne.label},ne.id))})}):null,d.jsx("div",{className:"we-canvas-stage canvas-mirror__stage",ref:u,onClick:ne=>{var Oe;const be=ne.target;(be===u.current||(Oe=be.classList)!=null&&Oe.contains(ud))&&L({...r,selection:null})}}),d.jsxs("div",{className:"canvas-mirror__sidebar",ref:$e,children:[d.jsxs("div",{className:"sidebar-template",children:[d.jsxs("label",{className:"sidebar-template__field",children:["Fixture",d.jsx("select",{"data-testid":"fixture-picker",value:A,onChange:ne=>L({...r,fixture:ne.target.value,selection:null}),children:a.fixtures.map(ne=>d.jsx("option",{value:ne.id,children:dP(ne)},ne.id))})]}),Y&&H&&M.length>1?d.jsxs("label",{className:"sidebar-template__field",children:["Format",d.jsx("select",{"data-testid":"format-switcher",value:H.id,onChange:ne=>s({...r,format:ne.target.value}),children:M.map(ne=>d.jsx("option",{value:ne.id,children:`${ne.id} — ${ne.pixelWidth}×${ne.pixelHeight}px${ne.physical?` (${ne.physical})`:""}`},ne.id))})]}):null,I!==null?d.jsxs("label",{className:"sidebar-template__toggle",children:[d.jsx("input",{type:"checkbox","data-testid":"guides-toggle",checked:E,onChange:ne=>S(ne.target.checked)}),"Trim & bleed guides"]}):null]}),Ce?d.jsx(bV,{instanceId:Ce,label:((at=te.find(ne=>ne.instanceId===Ce))==null?void 0:at.label)??Ce,display:((Qt=te.find(ne=>ne.instanceId===Ce))==null?void 0:Qt.display)??IV,displayState:ye.displayFor(Ce),settingsOpen:B===Ce,onSetEnabled:ne=>ye.setEnabled(Ce,ne),onSetVariant:ne=>ye.setVariant(Ce,ne),onOpenSettings:()=>D(Ce),onCloseSettings:()=>D(null),fixture:A,sectionSchema:N[Ce]??UV,override:ye.overrideFor(Ce),payload:ye.payloadFor(Ce),renderError:ye.errorFor(Ce),selection:Te,onSelect:ne=>L({...r,selection:ne}),onApplySlot:(ne,be)=>ye.applySlot(Ce,ne,be)}):d.jsx(ZF,{}),a.capabilities.capture||me==="website"?d.jsx(SV,{host:t,templateName:a.template.name,fixture:A,output:me,format:(H==null?void 0:H.id)??null,canvas:(W==null?void 0:W.id)??null,pagePath:((ut=oe[0])==null?void 0:ut.path)??null}):null]})]})}function PV(e){const[t,a]=x.useState({}),[r,s]=x.useState(e);if(e!==null&&e!==r){const u=r===null?[]:DV(r,e);s(e),u.length>0&&a(m=>LV(m,u))}const c=x.useCallback(u=>a(u),[]);return x.useMemo(()=>({edits:t,setEdits:c}),[t,c])}function R2(e){const t=QM(window.location.pathname,e.base);return t===null?null:XM(t,window.location.search)}function VV({host:e}){const[t,a]=x.useState(null),[r,s]=x.useState(null),[c,u]=x.useState(0),[m,p]=x.useState(()=>R2(e)),y=x.useMemo(()=>t===null||t.error!==void 0?null:Object.fromEntries(t.fixtures.map(E=>[E.id,E.doc])),[t]),v=PV(y);x.useEffect(()=>{let E=!0;return e.catalog().then(S=>{E&&(a(S),s(null))},S=>{E&&s(S instanceof Error?S.message:String(S))}),()=>{E=!1}},[e,c]);const g=t==null?void 0:t.template.name;x.useEffect(()=>{g&&(document.title=`${g} - Playground`)},[g]);const w=(t==null?void 0:t.capabilities.hmr)===!0;x.useEffect(()=>{if(!w)return;const E=()=>u(S=>S+1);return e.subscribe({source:E,fixtures:E})},[e,w]),x.useEffect(()=>{const E=()=>p(R2(e));return window.addEventListener("popstate",E),()=>window.removeEventListener("popstate",E)},[e]),x.useEffect(()=>{if(m!==null||t===null)return;const E=ZM(t);E!==null&&(window.history.replaceState({},"",new URL(Px(E),e.base).href),p(E))},[m,t,e]);const k=x.useCallback(E=>{window.history.replaceState({},"",new URL(Px(E),e.base).href),p(E)},[e]);return r?d.jsxs("div",{className:"boot-error",children:["The playground could not load its catalog — ",r,`
|
|
1259
|
-
`,"Is the server still starting? Try refreshing."]}):t?t.error!==void 0?d.jsx("div",{className:"boot-error","data-testid":"catalog-error",children:t.error}):t.fixtures.length===0?d.jsx("div",{className:"empty","data-testid":"no-fixtures",children:"No fixtures to render under. Export a defineFixture() value from a module under fixtures/."}):m?t.fixtures.some(E=>E.id===m.fixture)?d.jsx(FV,{host:e,catalog:t,view:m,onViewChange:k,sessions:v}):d.jsxs("div",{className:"boot-error","data-testid":"unknown-fixture",children:['There is no fixture "',m.fixture,'" (have: ',t.fixtures.map(E=>E.id).join(", "),")."]}):d.jsx("div",{className:"empty",children:"loading canvas…"}):d.jsx("div",{className:"empty",children:"loading…"})}const SA=document.getElementById("root");if(!SA)throw new Error("playground: #root missing from index.html");const EA=rP(document.baseURI);oP(EA);GM.createRoot(SA).render(d.jsx(x.StrictMode,{children:d.jsx(VV,{host:EA})}));
|