@homepages/concrete 10.0.0 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/codemods/manifest.json +5 -158
- package/dist/artifact/playground/client/assets/index-ByeGGedv.js +1259 -0
- package/dist/artifact/playground/client/assets/index-CxWPYOH2.css +1 -0
- package/dist/artifact/playground/client/index.html +2 -2
- package/dist/artifact/playground/client/island-canvas-host.mjs +1 -1
- package/dist/artifact/playground/host.mjs +26 -26
- package/dist/base.css +1 -8
- package/dist/cli/build/artifact.js +1 -1
- package/dist/cli/build/fixtures.js +3 -2
- package/dist/cli/check/stages/sections.js +1 -1
- package/dist/cli/dev/workspace-reader.js +3 -2
- package/dist/css/compile.js +3 -6
- package/dist/css/rules.js +1 -51
- package/dist/design-system/format-variants.js +1 -1
- package/dist/fixtures/resolve.js +5 -1
- package/dist/fixtures/rows.js +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/packages/external/concrete/package.js +1 -1
- package/dist/packages/internal/fill-vocabulary/dist/holder.js +3 -14
- package/dist/packages/internal/media-resolution/dist/document.js +3 -3
- package/dist/packages/internal/media-resolution/dist/image.js +3 -3
- package/dist/packages/internal/media-resolution/dist/tour.js +6 -6
- package/dist/packages/internal/media-resolution/dist/video.js +9 -9
- package/dist/packages/internal/section-contracts/dist/fill-verb-contract.js +1 -0
- package/dist/packages/internal/section-contracts/dist/runners.js +1 -3
- package/dist/packages/internal/section-contracts/dist/source-contract.js +3 -3
- package/dist/packages/internal/section-contracts/dist/sources-contract.js +0 -2
- package/dist/packages/internal/template-artifact/dist/index.js +2 -2
- package/dist/packages/internal/template-artifact/dist/layout.js +11 -11
- package/dist/packages/internal/template-artifact/dist/manifest.js +1 -1
- package/dist/packages/internal/template-artifact/dist/verify.js +13 -17
- package/dist/packages/internal/template-contracts/dist/document-value.d.ts +3 -5
- package/dist/packages/internal/template-contracts/dist/fill-builders.js +2 -6
- package/dist/packages/internal/template-contracts/dist/fill-spec-schema.js +4 -1
- package/dist/packages/internal/template-contracts/dist/list.js +0 -14
- package/dist/packages/internal/template-contracts/dist/primitive-descriptors.js +1 -1
- package/dist/packages/internal/template-contracts/dist/runtime-values.d.ts +6 -7
- package/dist/packages/internal/template-contracts/dist/slot-builders.js +0 -2
- package/dist/packages/internal/template-contracts/dist/slot-ref.d.ts +6 -1
- package/dist/packages/internal/template-contracts/dist/tour-value.d.ts +2 -4
- package/dist/packages/internal/template-contracts/dist/video-value.d.ts +3 -4
- package/dist/primitives/Image.d.ts +2 -2
- package/dist/primitives/Tour.d.ts +2 -2
- package/dist/primitives/Video.d.ts +2 -2
- package/dist/primitives/slot-bindings.js +6 -13
- package/dist/primitives/slot-document.d.ts +1 -1
- package/dist/primitives/slot-download.d.ts +3 -1
- package/dist/primitives/slot-media.d.ts +5 -2
- package/dist/primitives/slot-media.js +1 -1
- package/dist/rules/registry.js +0 -6
- package/dist/schema/format-presets.d.ts +1 -1
- package/dist/schema/section-schema.d.ts +5 -5
- package/dist/styles.css +4 -4
- package/dist/template/define-template.js +0 -1
- package/guide/reference/cli/INDEX.md +2 -2
- package/guide/reference/cli/build.md +1 -1
- package/guide/reference/cli/check.md +1 -1
- package/guide/reference/cli/dev.md +1 -1
- package/guide/reference/cli/property-add.md +1 -1
- package/guide/reference/cli/property-list.md +1 -1
- package/guide/reference/cli/publish.md +1 -1
- package/guide/reference/cli/upgrade.md +1 -1
- package/guide/reference/rules/INDEX.md +1 -2
- package/package.json +2 -2
- package/codemods/fill-is-a-source.mjs +0 -533
- package/codemods/framework-namespace.mjs +0 -107
- package/codemods/list-grammar.mjs +0 -923
- package/codemods/object-form-only.mjs +0 -39
- package/codemods/platform-namespace.mjs +0 -83
- package/codemods/process-builders.mjs +0 -198
- package/codemods/reads-replace-reconcile.mjs +0 -285
- package/codemods/registry-keys-only.mjs +0 -113
- package/codemods/slot-object.mjs +0 -1097
- package/codemods/steps/content-object-fields.mjs +0 -324
- package/codemods/steps/list-object-form.mjs +0 -686
- package/codemods/steps/registry-key-reads.mjs +0 -276
- package/codemods/steps/select-object-form.mjs +0 -210
- package/codemods/table-rows.mjs +0 -568
- package/codemods/theme-collapse.mjs +0 -396
- package/codemods/unlayer-author-css.mjs +0 -194
- package/codemods/unwrap-object-fields.mjs +0 -310
- package/codemods/viewer-slot-document.mjs +0 -131
- package/codemods/write-property-as-facts-document.mjs +0 -716
- package/codemods/write-the-address-line.mjs +0 -255
- package/codemods/write-the-registry-members.mjs +0 -653
- package/codemods/write-the-select-from.mjs +0 -141
- package/codemods/write-the-sole-from.mjs +0 -369
- package/codemods/write-the-table-from.mjs +0 -267
- package/codemods/write-the-whole-item.mjs +0 -512
- package/codemods/writeback-drop.mjs +0 -168
- package/codemods/written-contact-address.mjs +0 -162
- package/codemods/written-media-category.mjs +0 -227
- package/codemods/written-ref-kinds-name-the-layer.mjs +0 -172
- package/codemods/written-uploads-replace-pool-reads.mjs +0 -454
- package/codemods/written-uploads-sort-into-lists.mjs +0 -405
- package/codemods/written-uploads-stated-in-sorted-lists.mjs +0 -295
- package/codemods/written-video-sources-drop.mjs +0 -144
- package/codemods/written-without-pick-none.mjs +0 -146
- package/codemods/written-without-retired-knowledge.mjs +0 -223
- package/codemods/written-without-the-media-key.mjs +0 -202
- package/codemods/written-without-the-property-type.mjs +0 -249
- package/dist/artifact/playground/client/assets/index-BFNHB7VM.css +0 -1
- package/dist/artifact/playground/client/assets/index-Div1yo6s.js +0 -1259
|
@@ -1,1259 +0,0 @@
|
|
|
1
|
-
var gx=e=>{throw TypeError(e)};var _m=(e,t,a)=>t.has(e)||gx("Cannot "+a);var $=(e,t,a)=>(_m(e,t,"read from private field"),a?a.call(e):t.get(e)),Ne=(e,t,a)=>t.has(e)?gx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,a),xe=(e,t,a,r)=>(_m(e,t,"write to private field"),r?r.call(e,a):t.set(e,a),a),He=(e,t,a)=>(_m(e,t,"access private method"),a);var Du=(e,t,a,r)=>({set _(l){xe(e,t,l,a)},get _(){return $(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const c of l)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(l){const c={};return l.integrity&&(c.integrity=l.integrity),l.referrerPolicy&&(c.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?c.credentials="include":l.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(l){if(l.ep)return;l.ep=!0;const c=a(l);fetch(l.href,c)}})();function uM(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jm={exports:{}},bs={};/**
|
|
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 yx;function dM(){if(yx)return bs;yx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function a(r,l,c){var u=null;if(c!==void 0&&(u=""+c),l.key!==void 0&&(u=""+l.key),"key"in l){c={};for(var m in l)m!=="key"&&(c[m]=l[m])}else c=l;return l=c.ref,{$$typeof:e,type:r,key:u,ref:l!==void 0?l:null,props:c}}return bs.Fragment=t,bs.jsx=a,bs.jsxs=a,bs}var bx;function fM(){return bx||(bx=1,jm.exports=dM()),jm.exports}var d=fM(),Om={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 vx;function hM(){if(vx)return qe;vx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),l=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"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),k=Symbol.iterator;function w(N){return N===null||typeof N!="object"?null:(N=k&&N[k]||N["@@iterator"],typeof N=="function"?N:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,_={};function C(N,q,I){this.props=N,this.context=q,this.refs=_,this.updater=I||j}C.prototype.isReactComponent={},C.prototype.setState=function(N,q){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,q,"setState")},C.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function O(){}O.prototype=C.prototype;function A(N,q,I){this.props=N,this.context=q,this.refs=_,this.updater=I||j}var D=A.prototype=new O;D.constructor=A,E(D,C.prototype),D.isPureReactComponent=!0;var R=Array.isArray;function F(){}var L={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function H(N,q,I){var P=I.ref;return{$$typeof:e,type:N,key:q,ref:P!==void 0?P:null,props:I}}function ne(N,q){return H(N.type,q,N.props)}function Y(N){return typeof N=="object"&&N!==null&&N.$$typeof===e}function le(N){var q={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(I){return q[I]})}var K=/\/+/g;function X(N,q){return typeof N=="object"&&N!==null&&N.key!=null?le(""+N.key):q.toString(36)}function ue(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(F,F):(N.status="pending",N.then(function(q){N.status==="pending"&&(N.status="fulfilled",N.value=q)},function(q){N.status==="pending"&&(N.status="rejected",N.reason=q)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function M(N,q,I,P,ee){var pe=typeof N;(pe==="undefined"||pe==="boolean")&&(N=null);var se=!1;if(N===null)se=!0;else switch(pe){case"bigint":case"string":case"number":se=!0;break;case"object":switch(N.$$typeof){case e:case t:se=!0;break;case b:return se=N._init,M(se(N._payload),q,I,P,ee)}}if(se)return ee=ee(N),se=P===""?"."+X(N,0):P,R(ee)?(I="",se!=null&&(I=se.replace(K,"$&/")+"/"),M(ee,q,I,"",function(ce){return ce})):ee!=null&&(Y(ee)&&(ee=ne(ee,I+(ee.key==null||N&&N.key===ee.key?"":(""+ee.key).replace(K,"$&/")+"/")+se)),q.push(ee)),1;se=0;var ke=P===""?".":P+":";if(R(N))for(var z=0;z<N.length;z++)P=N[z],pe=ke+X(P,z),se+=M(P,q,I,pe,ee);else if(z=w(N),typeof z=="function")for(N=z.call(N),z=0;!(P=N.next()).done;)P=P.value,pe=ke+X(P,z++),se+=M(P,q,I,pe,ee);else if(pe==="object"){if(typeof N.then=="function")return M(ue(N),q,I,P,ee);throw q=String(N),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return se}function V(N,q,I){if(N==null)return N;var P=[],ee=0;return M(N,P,"","",function(pe){return q.call(I,pe,ee++)}),P}function te(N){if(N._status===-1){var q=N._result;q=q(),q.then(function(I){(N._status===0||N._status===-1)&&(N._status=1,N._result=I)},function(I){(N._status===0||N._status===-1)&&(N._status=2,N._result=I)}),N._status===-1&&(N._status=0,N._result=q)}if(N._status===1)return N._result.default;throw N._result}var me=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=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(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},Q={map:V,forEach:function(N,q,I){V(N,function(){q.apply(this,arguments)},I)},count:function(N){var q=0;return V(N,function(){q++}),q},toArray:function(N){return V(N,function(q){return q})||[]},only:function(N){if(!Y(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return qe.Activity=v,qe.Children=Q,qe.Component=C,qe.Fragment=a,qe.Profiler=l,qe.PureComponent=A,qe.StrictMode=r,qe.Suspense=p,qe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,qe.__COMPILER_RUNTIME={__proto__:null,c:function(N){return L.H.useMemoCache(N)}},qe.cache=function(N){return function(){return N.apply(null,arguments)}},qe.cacheSignal=function(){return null},qe.cloneElement=function(N,q,I){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var P=E({},N.props),ee=N.key;if(q!=null)for(pe in q.key!==void 0&&(ee=""+q.key),q)!T.call(q,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&q.ref===void 0||(P[pe]=q[pe]);var pe=arguments.length-2;if(pe===1)P.children=I;else if(1<pe){for(var se=Array(pe),ke=0;ke<pe;ke++)se[ke]=arguments[ke+2];P.children=se}return H(N.type,ee,P)},qe.createContext=function(N){return N={$$typeof:u,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:c,_context:N},N},qe.createElement=function(N,q,I){var P,ee={},pe=null;if(q!=null)for(P in q.key!==void 0&&(pe=""+q.key),q)T.call(q,P)&&P!=="key"&&P!=="__self"&&P!=="__source"&&(ee[P]=q[P]);var se=arguments.length-2;if(se===1)ee.children=I;else if(1<se){for(var ke=Array(se),z=0;z<se;z++)ke[z]=arguments[z+2];ee.children=ke}if(N&&N.defaultProps)for(P in se=N.defaultProps,se)ee[P]===void 0&&(ee[P]=se[P]);return H(N,pe,ee)},qe.createRef=function(){return{current:null}},qe.forwardRef=function(N){return{$$typeof:m,render:N}},qe.isValidElement=Y,qe.lazy=function(N){return{$$typeof:b,_payload:{_status:-1,_result:N},_init:te}},qe.memo=function(N,q){return{$$typeof:g,type:N,compare:q===void 0?null:q}},qe.startTransition=function(N){var q=L.T,I={};L.T=I;try{var P=N(),ee=L.S;ee!==null&&ee(I,P),typeof P=="object"&&P!==null&&typeof P.then=="function"&&P.then(F,me)}catch(pe){me(pe)}finally{q!==null&&I.types!==null&&(q.types=I.types),L.T=q}},qe.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},qe.use=function(N){return L.H.use(N)},qe.useActionState=function(N,q,I){return L.H.useActionState(N,q,I)},qe.useCallback=function(N,q){return L.H.useCallback(N,q)},qe.useContext=function(N){return L.H.useContext(N)},qe.useDebugValue=function(){},qe.useDeferredValue=function(N,q){return L.H.useDeferredValue(N,q)},qe.useEffect=function(N,q){return L.H.useEffect(N,q)},qe.useEffectEvent=function(N){return L.H.useEffectEvent(N)},qe.useId=function(){return L.H.useId()},qe.useImperativeHandle=function(N,q,I){return L.H.useImperativeHandle(N,q,I)},qe.useInsertionEffect=function(N,q){return L.H.useInsertionEffect(N,q)},qe.useLayoutEffect=function(N,q){return L.H.useLayoutEffect(N,q)},qe.useMemo=function(N,q){return L.H.useMemo(N,q)},qe.useOptimistic=function(N,q){return L.H.useOptimistic(N,q)},qe.useReducer=function(N,q,I){return L.H.useReducer(N,q,I)},qe.useRef=function(N){return L.H.useRef(N)},qe.useState=function(N){return L.H.useState(N)},qe.useSyncExternalStore=function(N,q,I){return L.H.useSyncExternalStore(N,q,I)},qe.useTransition=function(){return L.H.useTransition()},qe.version="19.2.6",qe}var xx;function ug(){return xx||(xx=1,Om.exports=hM()),Om.exports}var x=ug();const za=uM(x);var Am={exports:{}},vs={},Nm={exports:{}},Mm={};/**
|
|
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 wx;function mM(){return wx||(wx=1,(function(e){function t(M,V){var te=M.length;M.push(V);e:for(;0<te;){var me=te-1>>>1,Q=M[me];if(0<l(Q,V))M[me]=V,M[te]=Q,te=me;else break e}}function a(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var V=M[0],te=M.pop();if(te!==V){M[0]=te;e:for(var me=0,Q=M.length,N=Q>>>1;me<N;){var q=2*(me+1)-1,I=M[q],P=q+1,ee=M[P];if(0>l(I,te))P<Q&&0>l(ee,I)?(M[me]=ee,M[P]=te,me=P):(M[me]=I,M[q]=te,me=q);else if(P<Q&&0>l(ee,te))M[me]=ee,M[P]=te,me=P;else break e}}return V}function l(M,V){var te=M.sortIndex-V.sortIndex;return te!==0?te:M.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=[],g=[],b=1,v=null,k=3,w=!1,j=!1,E=!1,_=!1,C=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function D(M){for(var V=a(g);V!==null;){if(V.callback===null)r(g);else if(V.startTime<=M)r(g),V.sortIndex=V.expirationTime,t(p,V);else break;V=a(g)}}function R(M){if(E=!1,D(M),!j)if(a(p)!==null)j=!0,F||(F=!0,le());else{var V=a(g);V!==null&&ue(R,V.startTime-M)}}var F=!1,L=-1,T=5,H=-1;function ne(){return _?!0:!(e.unstable_now()-H<T)}function Y(){if(_=!1,F){var M=e.unstable_now();H=M;var V=!0;try{e:{j=!1,E&&(E=!1,O(L),L=-1),w=!0;var te=k;try{t:{for(D(M),v=a(p);v!==null&&!(v.expirationTime>M&&ne());){var me=v.callback;if(typeof me=="function"){v.callback=null,k=v.priorityLevel;var Q=me(v.expirationTime<=M);if(M=e.unstable_now(),typeof Q=="function"){v.callback=Q,D(M),V=!0;break t}v===a(p)&&r(p),D(M)}else r(p);v=a(p)}if(v!==null)V=!0;else{var N=a(g);N!==null&&ue(R,N.startTime-M),V=!1}}break e}finally{v=null,k=te,w=!1}V=void 0}}finally{V?le():F=!1}}}var le;if(typeof A=="function")le=function(){A(Y)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,X=K.port2;K.port1.onmessage=Y,le=function(){X.postMessage(null)}}else le=function(){C(Y,0)};function ue(M,V){L=C(function(){M(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(M){M.callback=null},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return k},e.unstable_next=function(M){switch(k){case 1:case 2:case 3:var V=3;break;default:V=k}var te=k;k=V;try{return M()}finally{k=te}},e.unstable_requestPaint=function(){_=!0},e.unstable_runWithPriority=function(M,V){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var te=k;k=M;try{return V()}finally{k=te}},e.unstable_scheduleCallback=function(M,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,M){case 1:var Q=-1;break;case 2:Q=250;break;case 5:Q=1073741823;break;case 4:Q=1e4;break;default:Q=5e3}return Q=te+Q,M={id:b++,callback:V,priorityLevel:M,startTime:te,expirationTime:Q,sortIndex:-1},te>me?(M.sortIndex=te,t(g,M),a(p)===null&&M===a(g)&&(E?(O(L),L=-1):E=!0,ue(R,te-me))):(M.sortIndex=Q,t(p,M),j||w||(j=!0,F||(F=!0,le()))),M},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(M){var V=k;return function(){var te=k;k=V;try{return M.apply(this,arguments)}finally{k=te}}}})(Mm)),Mm}var kx;function pM(){return kx||(kx=1,Nm.exports=mM()),Nm.exports}var Cm={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 Sx;function gM(){if(Sx)return ln;Sx=1;var e=ug();function t(p){var g="https://react.dev/errors/"+p;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+g+" 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},l=Symbol.for("react.portal");function c(p,g,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:v==null?null:""+v,children:p,containerInfo:g,implementation:b}}var u=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(p,g){if(p==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return ln.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ln.createPortal=function(p,g){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(t(299));return c(p,g,null,b)},ln.flushSync=function(p){var g=u.T,b=r.p;try{if(u.T=null,r.p=2,p)return p()}finally{u.T=g,r.p=b,r.d.f()}},ln.preconnect=function(p,g){typeof p=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(p,g))},ln.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},ln.preinit=function(p,g){if(typeof p=="string"&&g&&typeof g.as=="string"){var b=g.as,v=m(b,g.crossOrigin),k=typeof g.integrity=="string"?g.integrity:void 0,w=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?r.d.S(p,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:v,integrity:k,fetchPriority:w}):b==="script"&&r.d.X(p,{crossOrigin:v,integrity:k,fetchPriority:w,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},ln.preinitModule=function(p,g){if(typeof p=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=m(g.as,g.crossOrigin);r.d.M(p,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(p)},ln.preload=function(p,g){if(typeof p=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,v=m(b,g.crossOrigin);r.d.L(p,b,{crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},ln.preloadModule=function(p,g){if(typeof p=="string")if(g){var b=m(g.as,g.crossOrigin);r.d.m(p,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(p)},ln.requestFormReset=function(p){r.d.r(p)},ln.unstable_batchedUpdates=function(p,g){return p(g)},ln.useFormState=function(p,g,b){return u.H.useFormState(p,g,b)},ln.useFormStatus=function(){return u.H.useHostTransitionStatus()},ln.version="19.2.6",ln}var Ex;function k2(){if(Ex)return Cm.exports;Ex=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(),Cm.exports=gM(),Cm.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 _x;function yM(){if(_x)return vs;_x=1;var e=pM(),t=ug(),a=k2();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 l(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 g(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,s=i;;){var f=o.return;if(f===null)break;var h=f.alternate;if(h===null){if(s=f.return,s!==null){o=s;continue}break}if(f.child===h.child){for(h=f.child;h;){if(h===o)return p(f),n;if(h===s)return p(f),i;h=h.sibling}throw Error(r(188))}if(o.return!==s.return)o=f,s=h;else{for(var y=!1,S=f.child;S;){if(S===o){y=!0,o=f,s=h;break}if(S===s){y=!0,s=f,o=h;break}S=S.sibling}if(!y){for(S=h.child;S;){if(S===o){y=!0,o=h,s=f;break}if(S===s){y=!0,s=h,o=f;break}S=S.sibling}if(!y)throw Error(r(189))}}if(o.alternate!==s)throw Error(r(190))}if(o.tag!==3)throw Error(r(188));return o.stateNode.current===o?n:i}function b(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n;for(n=n.child;n!==null;){if(i=b(n),i!==null)return i;n=n.sibling}return null}var v=Object.assign,k=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),A=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function le(n){return n===null||typeof n!="object"?null:(n=Y&&n[Y]||n["@@iterator"],typeof n=="function"?n:null)}var K=Symbol.for("react.client.reference");function X(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 E:return"Fragment";case C:return"Profiler";case _:return"StrictMode";case R:return"Suspense";case F:return"SuspenseList";case H:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case j:return"Portal";case A:return n.displayName||"Context";case O:return(n._context.displayName||"Context")+".Consumer";case D:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case L:return i=n.displayName||null,i!==null?i:X(n.type)||"Memo";case T:i=n._payload,n=n._init;try{return X(n(i))}catch{}}return null}var ue=Array.isArray,M=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=[],Q=-1;function N(n){return{current:n}}function q(n){0>Q||(n.current=me[Q],me[Q]=null,Q--)}function I(n,i){Q++,me[Q]=n.current,n.current=i}var P=N(null),ee=N(null),pe=N(null),se=N(null);function ke(n,i){switch(I(pe,i),I(ee,n),I(P,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?I1(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=I1(i),n=H1(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}q(P),I(P,n)}function z(){q(P),q(ee),q(pe)}function ce(n){n.memoizedState!==null&&I(se,n);var i=P.current,o=H1(i,n.type);i!==o&&(I(ee,n),I(P,o))}function ge(n){ee.current===n&&(q(P),q(ee)),se.current===n&&(q(se),ms._currentValue=te)}var Ee,Ue;function Le(n){if(Ee===void 0)try{throw Error()}catch(o){var i=o.stack.trim().match(/\n( *(at )?)/);Ee=i&&i[1]||"",Ue=-1<o.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Ee+n+Ue}var ye=!1;function Re(n,i){if(!n||ye)return"";ye=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={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(oe){var J=oe}Reflect.construct(n,[],he)}else{try{he.call()}catch(oe){J=oe}n.call(he.prototype)}}else{try{throw Error()}catch(oe){J=oe}(he=n())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(oe){if(oe&&J&&typeof oe.stack=="string")return[oe.stack,J.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=s.DetermineComponentFrameRoot(),y=h[0],S=h[1];if(y&&S){var U=y.split(`
|
|
44
|
-
`),W=S.split(`
|
|
45
|
-
`);for(f=s=0;s<U.length&&!U[s].includes("DetermineComponentFrameRoot");)s++;for(;f<W.length&&!W[f].includes("DetermineComponentFrameRoot");)f++;if(s===U.length||f===W.length)for(s=U.length-1,f=W.length-1;1<=s&&0<=f&&U[s]!==W[f];)f--;for(;1<=s&&0<=f;s--,f--)if(U[s]!==W[f]){if(s!==1||f!==1)do if(s--,f--,0>f||U[s]!==W[f]){var de=`
|
|
46
|
-
`+U[s].replace(" at new "," at ");return n.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",n.displayName)),de}while(1<=s&&0<=f);break}}}finally{ye=!1,Error.prepareStackTrace=o}return(o=n?n.displayName||n.name:"")?Le(o):""}function ht(n,i){switch(n.tag){case 26:case 27:case 5:return Le(n.type);case 16:return Le("Lazy");case 13:return n.child!==i&&i!==null?Le("Suspense Fallback"):Le("Suspense");case 19:return Le("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 Le("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(s){return`
|
|
47
|
-
Error generating stack: `+s.message+`
|
|
48
|
-
`+s.stack}}var Lt=Object.prototype.hasOwnProperty,st=e.unstable_scheduleCallback,Bn=e.unstable_cancelCallback,On=e.unstable_shouldYield,cn=e.unstable_requestPaint,yt=e.unstable_now,Ji=e.unstable_getCurrentPriorityLevel,ci=e.unstable_ImmediatePriority,ti=e.unstable_UserBlockingPriority,we=e.unstable_NormalPriority,Te=e.unstable_LowPriority,Ce=e.unstable_IdlePriority,Xe=e.log,at=e.unstable_setDisableYieldValue,Vt=null,ut=null;function ie(n){if(typeof Xe=="function"&&at(n),ut&&typeof ut.setStrictMode=="function")try{ut.setStrictMode(Vt,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 Be=256,kt=262144,jt=4194304;function St(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 Bt(n,i,o){var s=n.pendingLanes;if(s===0)return 0;var f=0,h=n.suspendedLanes,y=n.pingedLanes;n=n.warmLanes;var S=s&134217727;return S!==0?(s=S&~h,s!==0?f=St(s):(y&=S,y!==0?f=St(y):o||(o=S&~n,o!==0&&(f=St(o))))):(S=s&~h,S!==0?f=St(S):y!==0?f=St(y):o||(o=s&~n,o!==0&&(f=St(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 Gt(n,i){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&i)===0}function Kt(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 An(){var n=jt;return jt<<=1,(jt&62914560)===0&&(jt=4194304),n}function Si(n){for(var i=[],o=0;31>o;o++)i.push(n);return i}function ni(n,i){n.pendingLanes|=i,i!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function ui(n,i,o,s,f,h){var y=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 S=n.entanglements,U=n.expirationTimes,W=n.hiddenUpdates;for(o=y&~o;0<o;){var de=31-be(o),he=1<<de;S[de]=0,U[de]=-1;var J=W[de];if(J!==null)for(W[de]=null,de=0;de<J.length;de++){var oe=J[de];oe!==null&&(oe.lane&=-536870913)}o&=~he}s!==0&&Xr(n,s,0),h!==0&&f===0&&n.tag!==0&&(n.suspendedLanes|=h&~(y&~i))}function Xr(n,i,o){n.pendingLanes|=i,n.suspendedLanes&=~i;var s=31-be(i);n.entangledLanes|=i,n.entanglements[s]=n.entanglements[s]|1073741824|o&261930}function wc(n,i){var o=n.entangledLanes|=i;for(n=n.entanglements;o;){var s=31-be(o),f=1<<s;f&i|n[s]&i&&(n[s]|=i),o&=~f}}function re(n,i){var o=i&-i;return o=(o&42)!==0?1:Se(o),(o&(n.suspendedLanes|i))!==0?0:o}function Se(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:cx(n.type))}function nt(n,i){var o=V.p;try{return V.p=n,i()}finally{V.p=o}}var qn=Math.random().toString(36).slice(2),Ot="__reactFiber$"+qn,gn="__reactProps$"+qn,Zr="__reactContainer$"+qn,gf="__reactEvents$"+qn,JO="__reactListeners$"+qn,eA="__reactHandles$"+qn,jb="__reactResources$"+qn,Nl="__reactMarker$"+qn;function yf(n){delete n[Ot],delete n[gn],delete n[gf],delete n[JO],delete n[eA]}function Wr(n){var i=n[Ot];if(i)return i;for(var o=n.parentNode;o;){if(i=o[Zr]||o[Ot]){if(o=i.alternate,i.child!==null||o!==null&&o.child!==null)for(n=K1(n);n!==null;){if(o=n[Ot])return o;n=K1(n)}return i}n=o,o=n.parentNode}return null}function Jr(n){if(n=n[Ot]||n[Zr]){var i=n.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return n}return null}function Ml(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n.stateNode;throw Error(r(33))}function eo(n){var i=n[jb];return i||(i=n[jb]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Yt(n){n[Nl]=!0}var Ob=new Set,Ab={};function ar(n,i){to(n,i),to(n+"Capture",i)}function to(n,i){for(Ab[n]=i,n=0;n<i.length;n++)Ob.add(i[n])}var tA=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]*$"),Nb={},Mb={};function nA(n){return Lt.call(Mb,n)?!0:Lt.call(Nb,n)?!1:tA.test(n)?Mb[n]=!0:(Nb[n]=!0,!1)}function kc(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 s=i.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){n.removeAttribute(i);return}}n.setAttribute(i,""+o)}}function Sc(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 Ei(n,i,o,s){if(s===null)n.removeAttribute(o);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttributeNS(i,o,""+s)}}function Fn(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Cb(n){var i=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function iA(n,i,o){var s=Object.getOwnPropertyDescriptor(n.constructor.prototype,i);if(!n.hasOwnProperty(i)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var f=s.get,h=s.set;return Object.defineProperty(n,i,{configurable:!0,get:function(){return f.call(this)},set:function(y){o=""+y,h.call(this,y)}}),Object.defineProperty(n,i,{enumerable:s.enumerable}),{getValue:function(){return o},setValue:function(y){o=""+y},stopTracking:function(){n._valueTracker=null,delete n[i]}}}}function bf(n){if(!n._valueTracker){var i=Cb(n)?"checked":"value";n._valueTracker=iA(n,i,""+n[i])}}function Rb(n){if(!n)return!1;var i=n._valueTracker;if(!i)return!0;var o=i.getValue(),s="";return n&&(s=Cb(n)?n.checked?"true":"false":n.value),n=s,n!==o?(i.setValue(n),!0):!1}function Ec(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 aA=/[\n"\\]/g;function Pn(n){return n.replace(aA,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function vf(n,i,o,s,f,h,y,S){n.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?n.type=y:n.removeAttribute("type"),i!=null?y==="number"?(i===0&&n.value===""||n.value!=i)&&(n.value=""+Fn(i)):n.value!==""+Fn(i)&&(n.value=""+Fn(i)):y!=="submit"&&y!=="reset"||n.removeAttribute("value"),i!=null?xf(n,y,Fn(i)):o!=null?xf(n,y,Fn(o)):s!=null&&n.removeAttribute("value"),f==null&&h!=null&&(n.defaultChecked=!!h),f!=null&&(n.checked=f&&typeof f!="function"&&typeof f!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.name=""+Fn(S):n.removeAttribute("name")}function Tb(n,i,o,s,f,h,y,S){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)){bf(n);return}o=o!=null?""+Fn(o):"",i=i!=null?""+Fn(i):o,S||i===n.value||(n.value=i),n.defaultValue=i}s=s??f,s=typeof s!="function"&&typeof s!="symbol"&&!!s,n.checked=S?n.checked:!!s,n.defaultChecked=!!s,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(n.name=y),bf(n)}function xf(n,i,o){i==="number"&&Ec(n.ownerDocument)===n||n.defaultValue===""+o||(n.defaultValue=""+o)}function no(n,i,o,s){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&&s&&(n[o].defaultSelected=!0)}else{for(o=""+Fn(o),i=null,f=0;f<n.length;f++){if(n[f].value===o){n[f].selected=!0,s&&(n[f].defaultSelected=!0);return}i!==null||n[f].disabled||(i=n[f])}i!==null&&(i.selected=!0)}}function Db(n,i,o){if(i!=null&&(i=""+Fn(i),i!==n.value&&(n.value=i),o==null)){n.defaultValue!==i&&(n.defaultValue=i);return}n.defaultValue=o!=null?""+Fn(o):""}function Lb(n,i,o,s){if(i==null){if(s!=null){if(o!=null)throw Error(r(92));if(ue(s)){if(1<s.length)throw Error(r(93));s=s[0]}o=s}o==null&&(o=""),i=o}o=Fn(i),n.defaultValue=o,s=n.textContent,s===o&&s!==""&&s!==null&&(n.value=s),bf(n)}function io(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 zb(n,i,o){var s=i.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?s?n.setProperty(i,""):i==="float"?n.cssFloat="":n[i]="":s?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 $b(n,i,o){if(i!=null&&typeof i!="object")throw Error(r(62));if(n=n.style,o!=null){for(var s in o)!o.hasOwnProperty(s)||i!=null&&i.hasOwnProperty(s)||(s.indexOf("--")===0?n.setProperty(s,""):s==="float"?n.cssFloat="":n[s]="");for(var f in i)s=i[f],i.hasOwnProperty(f)&&o[f]!==s&&zb(n,f,s)}else for(var h in i)i.hasOwnProperty(h)&&zb(n,h,i[h])}function wf(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 oA=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"]]),lA=/^[\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 _c(n){return lA.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function _i(){}var kf=null;function Sf(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var ao=null,ro=null;function Ub(n){var i=Jr(n);if(i&&(n=i.stateNode)){var o=n[gn]||null;e:switch(n=i.stateNode,i.type){case"input":if(vf(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="'+Pn(""+i)+'"][type="radio"]'),i=0;i<o.length;i++){var s=o[i];if(s!==n&&s.form===n.form){var f=s[gn]||null;if(!f)throw Error(r(90));vf(s,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(i=0;i<o.length;i++)s=o[i],s.form===n.form&&Rb(s)}break e;case"textarea":Db(n,o.value,o.defaultValue);break e;case"select":i=o.value,i!=null&&no(n,!!o.multiple,i,!1)}}}var Ef=!1;function Ib(n,i,o){if(Ef)return n(i,o);Ef=!0;try{var s=n(i);return s}finally{if(Ef=!1,(ao!==null||ro!==null)&&(fu(),ao&&(i=ao,n=ro,ro=ao=null,Ub(i),n)))for(i=0;i<n.length;i++)Ub(n[i])}}function Cl(n,i){var o=n.stateNode;if(o===null)return null;var s=o[gn]||null;if(s===null)return null;o=s[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":(s=!s.disabled)||(n=n.type,s=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!s;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(r(231,i,typeof o));return o}var ji=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_f=!1;if(ji)try{var Rl={};Object.defineProperty(Rl,"passive",{get:function(){_f=!0}}),window.addEventListener("test",Rl,Rl),window.removeEventListener("test",Rl,Rl)}catch{_f=!1}var ea=null,jf=null,jc=null;function Hb(){if(jc)return jc;var n,i=jf,o=i.length,s,f="value"in ea?ea.value:ea.textContent,h=f.length;for(n=0;n<o&&i[n]===f[n];n++);var y=o-n;for(s=1;s<=y&&i[o-s]===f[h-s];s++);return jc=f.slice(n,1<s?1-s:void 0)}function Oc(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 Ac(){return!0}function Bb(){return!1}function yn(n){function i(o,s,f,h,y){this._reactName=o,this._targetInst=f,this.type=s,this.nativeEvent=h,this.target=y,this.currentTarget=null;for(var S in n)n.hasOwnProperty(S)&&(o=n[S],this[S]=o?o(h):h[S]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Ac:Bb,this.isPropagationStopped=Bb,this}return v(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=Ac)},stopPropagation:function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=Ac)},persist:function(){},isPersistent:Ac}),i}var rr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nc=yn(rr),Tl=v({},rr,{view:0,detail:0}),sA=yn(Tl),Of,Af,Dl,Mc=v({},Tl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mf,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!==Dl&&(Dl&&n.type==="mousemove"?(Of=n.screenX-Dl.screenX,Af=n.screenY-Dl.screenY):Af=Of=0,Dl=n),Of)},movementY:function(n){return"movementY"in n?n.movementY:Af}}),qb=yn(Mc),cA=v({},Mc,{dataTransfer:0}),uA=yn(cA),dA=v({},Tl,{relatedTarget:0}),Nf=yn(dA),fA=v({},rr,{animationName:0,elapsedTime:0,pseudoElement:0}),hA=yn(fA),mA=v({},rr,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),pA=yn(mA),gA=v({},rr,{data:0}),Fb=yn(gA),yA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},bA={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"},vA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xA(n){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(n):(n=vA[n])?!!i[n]:!1}function Mf(){return xA}var wA=v({},Tl,{key:function(n){if(n.key){var i=yA[n.key]||n.key;if(i!=="Unidentified")return i}return n.type==="keypress"?(n=Oc(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?bA[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mf,charCode:function(n){return n.type==="keypress"?Oc(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Oc(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),kA=yn(wA),SA=v({},Mc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pb=yn(SA),EA=v({},Tl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mf}),_A=yn(EA),jA=v({},rr,{propertyName:0,elapsedTime:0,pseudoElement:0}),OA=yn(jA),AA=v({},Mc,{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}),NA=yn(AA),MA=v({},rr,{newState:0,oldState:0}),CA=yn(MA),RA=[9,13,27,32],Cf=ji&&"CompositionEvent"in window,Ll=null;ji&&"documentMode"in document&&(Ll=document.documentMode);var TA=ji&&"TextEvent"in window&&!Ll,Vb=ji&&(!Cf||Ll&&8<Ll&&11>=Ll),Gb=" ",Kb=!1;function Yb(n,i){switch(n){case"keyup":return RA.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qb(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var oo=!1;function DA(n,i){switch(n){case"compositionend":return Qb(i);case"keypress":return i.which!==32?null:(Kb=!0,Gb);case"textInput":return n=i.data,n===Gb&&Kb?null:n;default:return null}}function LA(n,i){if(oo)return n==="compositionend"||!Cf&&Yb(n,i)?(n=Hb(),jc=jf=ea=null,oo=!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 Vb&&i.locale!=="ko"?null:i.data;default:return null}}var zA={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 Xb(n){var i=n&&n.nodeName&&n.nodeName.toLowerCase();return i==="input"?!!zA[n.type]:i==="textarea"}function Zb(n,i,o,s){ao?ro?ro.push(s):ro=[s]:ao=s,i=vu(i,"onChange"),0<i.length&&(o=new Nc("onChange","change",null,o,s),n.push({event:o,listeners:i}))}var zl=null,$l=null;function $A(n){T1(n,0)}function Cc(n){var i=Ml(n);if(Rb(i))return n}function Wb(n,i){if(n==="change")return i}var Jb=!1;if(ji){var Rf;if(ji){var Tf="oninput"in document;if(!Tf){var e0=document.createElement("div");e0.setAttribute("oninput","return;"),Tf=typeof e0.oninput=="function"}Rf=Tf}else Rf=!1;Jb=Rf&&(!document.documentMode||9<document.documentMode)}function t0(){zl&&(zl.detachEvent("onpropertychange",n0),$l=zl=null)}function n0(n){if(n.propertyName==="value"&&Cc($l)){var i=[];Zb(i,$l,n,Sf(n)),Ib($A,i)}}function UA(n,i,o){n==="focusin"?(t0(),zl=i,$l=o,zl.attachEvent("onpropertychange",n0)):n==="focusout"&&t0()}function IA(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Cc($l)}function HA(n,i){if(n==="click")return Cc(i)}function BA(n,i){if(n==="input"||n==="change")return Cc(i)}function qA(n,i){return n===i&&(n!==0||1/n===1/i)||n!==n&&i!==i}var Nn=typeof Object.is=="function"?Object.is:qA;function Ul(n,i){if(Nn(n,i))return!0;if(typeof n!="object"||n===null||typeof i!="object"||i===null)return!1;var o=Object.keys(n),s=Object.keys(i);if(o.length!==s.length)return!1;for(s=0;s<o.length;s++){var f=o[s];if(!Lt.call(i,f)||!Nn(n[f],i[f]))return!1}return!0}function i0(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function a0(n,i){var o=i0(n);n=0;for(var s;o;){if(o.nodeType===3){if(s=n+o.textContent.length,n<=i&&s>=i)return{node:o,offset:i-n};n=s}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=i0(o)}}function r0(n,i){return n&&i?n===i?!0:n&&n.nodeType===3?!1:i&&i.nodeType===3?r0(n,i.parentNode):"contains"in n?n.contains(i):n.compareDocumentPosition?!!(n.compareDocumentPosition(i)&16):!1:!1}function o0(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var i=Ec(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=Ec(n.document)}return i}function Df(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 FA=ji&&"documentMode"in document&&11>=document.documentMode,lo=null,Lf=null,Il=null,zf=!1;function l0(n,i,o){var s=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;zf||lo==null||lo!==Ec(s)||(s=lo,"selectionStart"in s&&Df(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Il&&Ul(Il,s)||(Il=s,s=vu(Lf,"onSelect"),0<s.length&&(i=new Nc("onSelect","select",null,i,o),n.push({event:i,listeners:s}),i.target=lo)))}function or(n,i){var o={};return o[n.toLowerCase()]=i.toLowerCase(),o["Webkit"+n]="webkit"+i,o["Moz"+n]="moz"+i,o}var so={animationend:or("Animation","AnimationEnd"),animationiteration:or("Animation","AnimationIteration"),animationstart:or("Animation","AnimationStart"),transitionrun:or("Transition","TransitionRun"),transitionstart:or("Transition","TransitionStart"),transitioncancel:or("Transition","TransitionCancel"),transitionend:or("Transition","TransitionEnd")},$f={},s0={};ji&&(s0=document.createElement("div").style,"AnimationEvent"in window||(delete so.animationend.animation,delete so.animationiteration.animation,delete so.animationstart.animation),"TransitionEvent"in window||delete so.transitionend.transition);function lr(n){if($f[n])return $f[n];if(!so[n])return n;var i=so[n],o;for(o in i)if(i.hasOwnProperty(o)&&o in s0)return $f[n]=i[o];return n}var c0=lr("animationend"),u0=lr("animationiteration"),d0=lr("animationstart"),PA=lr("transitionrun"),VA=lr("transitionstart"),GA=lr("transitioncancel"),f0=lr("transitionend"),h0=new Map,Uf="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(" ");Uf.push("scrollEnd");function ii(n,i){h0.set(n,i),ar(i,[n])}var Rc=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)},Vn=[],co=0,If=0;function Tc(){for(var n=co,i=If=co=0;i<n;){var o=Vn[i];Vn[i++]=null;var s=Vn[i];Vn[i++]=null;var f=Vn[i];Vn[i++]=null;var h=Vn[i];if(Vn[i++]=null,s!==null&&f!==null){var y=s.pending;y===null?f.next=f:(f.next=y.next,y.next=f),s.pending=f}h!==0&&m0(o,f,h)}}function Dc(n,i,o,s){Vn[co++]=n,Vn[co++]=i,Vn[co++]=o,Vn[co++]=s,If|=s,n.lanes|=s,n=n.alternate,n!==null&&(n.lanes|=s)}function Hf(n,i,o,s){return Dc(n,i,o,s),Lc(n)}function sr(n,i){return Dc(n,null,null,i),Lc(n)}function m0(n,i,o){n.lanes|=o;var s=n.alternate;s!==null&&(s.lanes|=o);for(var f=!1,h=n.return;h!==null;)h.childLanes|=o,s=h.alternate,s!==null&&(s.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,s=n[f],s===null?n[f]=[i]:s.push(i),i.lane=o|536870912),h):null}function Lc(n){if(50<ls)throw ls=0,Qh=null,Error(r(185));for(var i=n.return;i!==null;)n=i,i=n.return;return n.tag===3?n.stateNode:null}var uo={};function KA(n,i,o,s){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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mn(n,i,o,s){return new KA(n,i,o,s)}function Bf(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Oi(n,i){var o=n.alternate;return o===null?(o=Mn(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 p0(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 zc(n,i,o,s,f,h){var y=0;if(s=n,typeof n=="function")Bf(n)&&(y=1);else if(typeof n=="string")y=WN(n,o,P.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case H:return n=Mn(31,o,i,f),n.elementType=H,n.lanes=h,n;case E:return cr(o.children,f,h,i);case _:y=8,f|=24;break;case C:return n=Mn(12,o,i,f|2),n.elementType=C,n.lanes=h,n;case R:return n=Mn(13,o,i,f),n.elementType=R,n.lanes=h,n;case F:return n=Mn(19,o,i,f),n.elementType=F,n.lanes=h,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case A:y=10;break e;case O:y=9;break e;case D:y=11;break e;case L:y=14;break e;case T:y=16,s=null;break e}y=29,o=Error(r(130,n===null?"null":typeof n,"")),s=null}return i=Mn(y,o,i,f),i.elementType=n,i.type=s,i.lanes=h,i}function cr(n,i,o,s){return n=Mn(7,n,s,i),n.lanes=o,n}function qf(n,i,o){return n=Mn(6,n,null,i),n.lanes=o,n}function g0(n){var i=Mn(18,null,null,0);return i.stateNode=n,i}function Ff(n,i,o){return i=Mn(4,n.children!==null?n.children:[],n.key,i),i.lanes=o,i.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},i}var y0=new WeakMap;function Gn(n,i){if(typeof n=="object"&&n!==null){var o=y0.get(n);return o!==void 0?o:(i={value:n,source:i,stack:$e(i)},y0.set(n,i),i)}return{value:n,source:i,stack:$e(i)}}var fo=[],ho=0,$c=null,Hl=0,Kn=[],Yn=0,ta=null,di=1,fi="";function Ai(n,i){fo[ho++]=Hl,fo[ho++]=$c,$c=n,Hl=i}function b0(n,i,o){Kn[Yn++]=di,Kn[Yn++]=fi,Kn[Yn++]=ta,ta=n;var s=di;n=fi;var f=32-be(s)-1;s&=~(1<<f),o+=1;var h=32-be(i)+f;if(30<h){var y=f-f%5;h=(s&(1<<y)-1).toString(32),s>>=y,f-=y,di=1<<32-be(i)+f|o<<f|s,fi=h+n}else di=1<<h|o<<f|s,fi=n}function Pf(n){n.return!==null&&(Ai(n,1),b0(n,1,0))}function Vf(n){for(;n===$c;)$c=fo[--ho],fo[ho]=null,Hl=fo[--ho],fo[ho]=null;for(;n===ta;)ta=Kn[--Yn],Kn[Yn]=null,fi=Kn[--Yn],Kn[Yn]=null,di=Kn[--Yn],Kn[Yn]=null}function v0(n,i){Kn[Yn++]=di,Kn[Yn++]=fi,Kn[Yn++]=ta,di=i.id,fi=i.overflow,ta=n}var Jt=null,xt=null,et=!1,na=null,Qn=!1,Gf=Error(r(519));function ia(n){var i=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Bl(Gn(i,n)),Gf}function x0(n){var i=n.stateNode,o=n.type,s=n.memoizedProps;switch(i[Ot]=n,i[gn]=s,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<cs.length;o++)Qe(cs[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),Tb(i,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Qe("invalid",i);break;case"textarea":Qe("invalid",i),Lb(i,s.value,s.defaultValue,s.children)}o=s.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||i.textContent===""+o||s.suppressHydrationWarning===!0||$1(i.textContent,o)?(s.popover!=null&&(Qe("beforetoggle",i),Qe("toggle",i)),s.onScroll!=null&&Qe("scroll",i),s.onScrollEnd!=null&&Qe("scrollend",i),s.onClick!=null&&(i.onclick=_i),i=!0):i=!1,i||ia(n,!0)}function w0(n){for(Jt=n.return;Jt;)switch(Jt.tag){case 5:case 31:case 13:Qn=!1;return;case 27:case 3:Qn=!0;return;default:Jt=Jt.return}}function mo(n){if(n!==Jt)return!1;if(!et)return w0(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")||um(n.type,n.memoizedProps)),o=!o),o&&xt&&ia(n),w0(n),i===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));xt=G1(n)}else if(i===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));xt=G1(n)}else i===27?(i=xt,ya(n.type)?(n=pm,pm=null,xt=n):xt=i):xt=Jt?Zn(n.stateNode.nextSibling):null;return!0}function ur(){xt=Jt=null,et=!1}function Kf(){var n=na;return n!==null&&(wn===null?wn=n:wn.push.apply(wn,n),na=null),n}function Bl(n){na===null?na=[n]:na.push(n)}var Yf=N(null),dr=null,Ni=null;function aa(n,i,o){I(Yf,i._currentValue),i._currentValue=o}function Mi(n){n._currentValue=Yf.current,q(Yf)}function Qf(n,i,o){for(;n!==null;){var s=n.alternate;if((n.childLanes&i)!==i?(n.childLanes|=i,s!==null&&(s.childLanes|=i)):s!==null&&(s.childLanes&i)!==i&&(s.childLanes|=i),n===o)break;n=n.return}}function Xf(n,i,o,s){var f=n.child;for(f!==null&&(f.return=n);f!==null;){var h=f.dependencies;if(h!==null){var y=f.child;h=h.firstContext;e:for(;h!==null;){var S=h;h=f;for(var U=0;U<i.length;U++)if(S.context===i[U]){h.lanes|=o,S=h.alternate,S!==null&&(S.lanes|=o),Qf(h.return,o,n),s||(y=null);break e}h=S.next}}else if(f.tag===18){if(y=f.return,y===null)throw Error(r(341));y.lanes|=o,h=y.alternate,h!==null&&(h.lanes|=o),Qf(y,o,n),y=null}else y=f.child;if(y!==null)y.return=f;else for(y=f;y!==null;){if(y===n){y=null;break}if(f=y.sibling,f!==null){f.return=y.return,y=f;break}y=y.return}f=y}}function po(n,i,o,s){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 y=f.alternate;if(y===null)throw Error(r(387));if(y=y.memoizedProps,y!==null){var S=f.type;Nn(f.pendingProps.value,y.value)||(n!==null?n.push(S):n=[S])}}else if(f===se.current){if(y=f.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(n!==null?n.push(ms):n=[ms])}f=f.return}n!==null&&Xf(i,n,o,s),i.flags|=262144}function Uc(n){for(n=n.firstContext;n!==null;){if(!Nn(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function fr(n){dr=n,Ni=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function en(n){return k0(dr,n)}function Ic(n,i){return dr===null&&fr(n),k0(n,i)}function k0(n,i){var o=i._currentValue;if(i={context:i,memoizedValue:o,next:null},Ni===null){if(n===null)throw Error(r(308));Ni=i,n.dependencies={lanes:0,firstContext:i},n.flags|=524288}else Ni=Ni.next=i;return o}var YA=typeof AbortController<"u"?AbortController:function(){var n=[],i=this.signal={aborted:!1,addEventListener:function(o,s){n.push(s)}};this.abort=function(){i.aborted=!0,n.forEach(function(o){return o()})}},QA=e.unstable_scheduleCallback,XA=e.unstable_NormalPriority,zt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Zf(){return{controller:new YA,data:new Map,refCount:0}}function ql(n){n.refCount--,n.refCount===0&&QA(XA,function(){n.controller.abort()})}var Fl=null,Wf=0,go=0,yo=null;function ZA(n,i){if(Fl===null){var o=Fl=[];Wf=0,go=tm(),yo={status:"pending",value:void 0,then:function(s){o.push(s)}}}return Wf++,i.then(S0,S0),i}function S0(){if(--Wf===0&&Fl!==null){yo!==null&&(yo.status="fulfilled");var n=Fl;Fl=null,go=0,yo=null;for(var i=0;i<n.length;i++)(0,n[i])()}}function WA(n,i){var o=[],s={status:"pending",value:null,reason:null,then:function(f){o.push(f)}};return n.then(function(){s.status="fulfilled",s.value=i;for(var f=0;f<o.length;f++)(0,o[f])(i)},function(f){for(s.status="rejected",s.reason=f,f=0;f<o.length;f++)(0,o[f])(void 0)}),s}var E0=M.S;M.S=function(n,i){l1=yt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&ZA(n,i),E0!==null&&E0(n,i)};var hr=N(null);function Jf(){var n=hr.current;return n!==null?n:bt.pooledCache}function Hc(n,i){i===null?I(hr,hr.current):I(hr,i.pool)}function _0(){var n=Jf();return n===null?null:{parent:zt._currentValue,pool:n}}var bo=Error(r(460)),eh=Error(r(474)),Bc=Error(r(542)),qc={then:function(){}};function j0(n){return n=n.status,n==="fulfilled"||n==="rejected"}function O0(n,i,o){switch(o=n[o],o===void 0?n.push(i):o!==i&&(i.then(_i,_i),i=o),i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,N0(n),n;default:if(typeof i.status=="string")i.then(_i,_i);else{if(n=bt,n!==null&&100<n.shellSuspendCounter)throw Error(r(482));n=i,n.status="pending",n.then(function(s){if(i.status==="pending"){var f=i;f.status="fulfilled",f.value=s}},function(s){if(i.status==="pending"){var f=i;f.status="rejected",f.reason=s}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw n=i.reason,N0(n),n}throw pr=i,bo}}function mr(n){try{var i=n._init;return i(n._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(pr=o,bo):o}}var pr=null;function A0(){if(pr===null)throw Error(r(459));var n=pr;return pr=null,n}function N0(n){if(n===bo||n===Bc)throw Error(r(483))}var vo=null,Pl=0;function Fc(n){var i=Pl;return Pl+=1,vo===null&&(vo=[]),O0(vo,n,i)}function Vl(n,i){i=i.props.ref,n.ref=i!==void 0?i:null}function Pc(n,i){throw i.$$typeof===k?Error(r(525)):(n=Object.prototype.toString.call(i),Error(r(31,n==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":n)))}function M0(n){function i(G,B){if(n){var Z=G.deletions;Z===null?(G.deletions=[B],G.flags|=16):Z.push(B)}}function o(G,B){if(!n)return null;for(;B!==null;)i(G,B),B=B.sibling;return null}function s(G){for(var B=new Map;G!==null;)G.key!==null?B.set(G.key,G):B.set(G.index,G),G=G.sibling;return B}function f(G,B){return G=Oi(G,B),G.index=0,G.sibling=null,G}function h(G,B,Z){return G.index=Z,n?(Z=G.alternate,Z!==null?(Z=Z.index,Z<B?(G.flags|=67108866,B):Z):(G.flags|=67108866,B)):(G.flags|=1048576,B)}function y(G){return n&&G.alternate===null&&(G.flags|=67108866),G}function S(G,B,Z,fe){return B===null||B.tag!==6?(B=qf(Z,G.mode,fe),B.return=G,B):(B=f(B,Z),B.return=G,B)}function U(G,B,Z,fe){var De=Z.type;return De===E?de(G,B,Z.props.children,fe,Z.key):B!==null&&(B.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===T&&mr(De)===B.type)?(B=f(B,Z.props),Vl(B,Z),B.return=G,B):(B=zc(Z.type,Z.key,Z.props,null,G.mode,fe),Vl(B,Z),B.return=G,B)}function W(G,B,Z,fe){return B===null||B.tag!==4||B.stateNode.containerInfo!==Z.containerInfo||B.stateNode.implementation!==Z.implementation?(B=Ff(Z,G.mode,fe),B.return=G,B):(B=f(B,Z.children||[]),B.return=G,B)}function de(G,B,Z,fe,De){return B===null||B.tag!==7?(B=cr(Z,G.mode,fe,De),B.return=G,B):(B=f(B,Z),B.return=G,B)}function he(G,B,Z){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return B=qf(""+B,G.mode,Z),B.return=G,B;if(typeof B=="object"&&B!==null){switch(B.$$typeof){case w:return Z=zc(B.type,B.key,B.props,null,G.mode,Z),Vl(Z,B),Z.return=G,Z;case j:return B=Ff(B,G.mode,Z),B.return=G,B;case T:return B=mr(B),he(G,B,Z)}if(ue(B)||le(B))return B=cr(B,G.mode,Z,null),B.return=G,B;if(typeof B.then=="function")return he(G,Fc(B),Z);if(B.$$typeof===A)return he(G,Ic(G,B),Z);Pc(G,B)}return null}function J(G,B,Z,fe){var De=B!==null?B.key:null;if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return De!==null?null:S(G,B,""+Z,fe);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case w:return Z.key===De?U(G,B,Z,fe):null;case j:return Z.key===De?W(G,B,Z,fe):null;case T:return Z=mr(Z),J(G,B,Z,fe)}if(ue(Z)||le(Z))return De!==null?null:de(G,B,Z,fe,null);if(typeof Z.then=="function")return J(G,B,Fc(Z),fe);if(Z.$$typeof===A)return J(G,B,Ic(G,Z),fe);Pc(G,Z)}return null}function oe(G,B,Z,fe,De){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return G=G.get(Z)||null,S(B,G,""+fe,De);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case w:return G=G.get(fe.key===null?Z:fe.key)||null,U(B,G,fe,De);case j:return G=G.get(fe.key===null?Z:fe.key)||null,W(B,G,fe,De);case T:return fe=mr(fe),oe(G,B,Z,fe,De)}if(ue(fe)||le(fe))return G=G.get(Z)||null,de(B,G,fe,De,null);if(typeof fe.then=="function")return oe(G,B,Z,Fc(fe),De);if(fe.$$typeof===A)return oe(G,B,Z,Ic(B,fe),De);Pc(B,fe)}return null}function Ae(G,B,Z,fe){for(var De=null,rt=null,Me=B,Ve=B=0,We=null;Me!==null&&Ve<Z.length;Ve++){Me.index>Ve?(We=Me,Me=null):We=Me.sibling;var ot=J(G,Me,Z[Ve],fe);if(ot===null){Me===null&&(Me=We);break}n&&Me&&ot.alternate===null&&i(G,Me),B=h(ot,B,Ve),rt===null?De=ot:rt.sibling=ot,rt=ot,Me=We}if(Ve===Z.length)return o(G,Me),et&&Ai(G,Ve),De;if(Me===null){for(;Ve<Z.length;Ve++)Me=he(G,Z[Ve],fe),Me!==null&&(B=h(Me,B,Ve),rt===null?De=Me:rt.sibling=Me,rt=Me);return et&&Ai(G,Ve),De}for(Me=s(Me);Ve<Z.length;Ve++)We=oe(Me,G,Ve,Z[Ve],fe),We!==null&&(n&&We.alternate!==null&&Me.delete(We.key===null?Ve:We.key),B=h(We,B,Ve),rt===null?De=We:rt.sibling=We,rt=We);return n&&Me.forEach(function(ka){return i(G,ka)}),et&&Ai(G,Ve),De}function Ie(G,B,Z,fe){if(Z==null)throw Error(r(151));for(var De=null,rt=null,Me=B,Ve=B=0,We=null,ot=Z.next();Me!==null&&!ot.done;Ve++,ot=Z.next()){Me.index>Ve?(We=Me,Me=null):We=Me.sibling;var ka=J(G,Me,ot.value,fe);if(ka===null){Me===null&&(Me=We);break}n&&Me&&ka.alternate===null&&i(G,Me),B=h(ka,B,Ve),rt===null?De=ka:rt.sibling=ka,rt=ka,Me=We}if(ot.done)return o(G,Me),et&&Ai(G,Ve),De;if(Me===null){for(;!ot.done;Ve++,ot=Z.next())ot=he(G,ot.value,fe),ot!==null&&(B=h(ot,B,Ve),rt===null?De=ot:rt.sibling=ot,rt=ot);return et&&Ai(G,Ve),De}for(Me=s(Me);!ot.done;Ve++,ot=Z.next())ot=oe(Me,G,Ve,ot.value,fe),ot!==null&&(n&&ot.alternate!==null&&Me.delete(ot.key===null?Ve:ot.key),B=h(ot,B,Ve),rt===null?De=ot:rt.sibling=ot,rt=ot);return n&&Me.forEach(function(cM){return i(G,cM)}),et&&Ai(G,Ve),De}function gt(G,B,Z,fe){if(typeof Z=="object"&&Z!==null&&Z.type===E&&Z.key===null&&(Z=Z.props.children),typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case w:e:{for(var De=Z.key;B!==null;){if(B.key===De){if(De=Z.type,De===E){if(B.tag===7){o(G,B.sibling),fe=f(B,Z.props.children),fe.return=G,G=fe;break e}}else if(B.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===T&&mr(De)===B.type){o(G,B.sibling),fe=f(B,Z.props),Vl(fe,Z),fe.return=G,G=fe;break e}o(G,B);break}else i(G,B);B=B.sibling}Z.type===E?(fe=cr(Z.props.children,G.mode,fe,Z.key),fe.return=G,G=fe):(fe=zc(Z.type,Z.key,Z.props,null,G.mode,fe),Vl(fe,Z),fe.return=G,G=fe)}return y(G);case j:e:{for(De=Z.key;B!==null;){if(B.key===De)if(B.tag===4&&B.stateNode.containerInfo===Z.containerInfo&&B.stateNode.implementation===Z.implementation){o(G,B.sibling),fe=f(B,Z.children||[]),fe.return=G,G=fe;break e}else{o(G,B);break}else i(G,B);B=B.sibling}fe=Ff(Z,G.mode,fe),fe.return=G,G=fe}return y(G);case T:return Z=mr(Z),gt(G,B,Z,fe)}if(ue(Z))return Ae(G,B,Z,fe);if(le(Z)){if(De=le(Z),typeof De!="function")throw Error(r(150));return Z=De.call(Z),Ie(G,B,Z,fe)}if(typeof Z.then=="function")return gt(G,B,Fc(Z),fe);if(Z.$$typeof===A)return gt(G,B,Ic(G,Z),fe);Pc(G,Z)}return typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint"?(Z=""+Z,B!==null&&B.tag===6?(o(G,B.sibling),fe=f(B,Z),fe.return=G,G=fe):(o(G,B),fe=qf(Z,G.mode,fe),fe.return=G,G=fe),y(G)):o(G,B)}return function(G,B,Z,fe){try{Pl=0;var De=gt(G,B,Z,fe);return vo=null,De}catch(Me){if(Me===bo||Me===Bc)throw Me;var rt=Mn(29,Me,null,G.mode);return rt.lanes=fe,rt.return=G,rt}finally{}}}var gr=M0(!0),C0=M0(!1),ra=!1;function th(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nh(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 oa(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function la(n,i,o){var s=n.updateQueue;if(s===null)return null;if(s=s.shared,(lt&2)!==0){var f=s.pending;return f===null?i.next=i:(i.next=f.next,f.next=i),s.pending=i,i=Lc(n),m0(n,null,o),i}return Dc(n,s,i,o),Lc(n)}function Gl(n,i,o){if(i=i.updateQueue,i!==null&&(i=i.shared,(o&4194048)!==0)){var s=i.lanes;s&=n.pendingLanes,o|=s,i.lanes=o,wc(n,o)}}function ih(n,i){var o=n.updateQueue,s=n.alternate;if(s!==null&&(s=s.updateQueue,o===s)){var f=null,h=null;if(o=o.firstBaseUpdate,o!==null){do{var y={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};h===null?f=h=y:h=h.next=y,o=o.next}while(o!==null);h===null?f=h=i:h=h.next=i}else f=h=i;o={baseState:s.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:s.shared,callbacks:s.callbacks},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=i:n.next=i,o.lastBaseUpdate=i}var ah=!1;function Kl(){if(ah){var n=yo;if(n!==null)throw n}}function Yl(n,i,o,s){ah=!1;var f=n.updateQueue;ra=!1;var h=f.firstBaseUpdate,y=f.lastBaseUpdate,S=f.shared.pending;if(S!==null){f.shared.pending=null;var U=S,W=U.next;U.next=null,y===null?h=W:y.next=W,y=U;var de=n.alternate;de!==null&&(de=de.updateQueue,S=de.lastBaseUpdate,S!==y&&(S===null?de.firstBaseUpdate=W:S.next=W,de.lastBaseUpdate=U))}if(h!==null){var he=f.baseState;y=0,de=W=U=null,S=h;do{var J=S.lane&-536870913,oe=J!==S.lane;if(oe?(Ze&J)===J:(s&J)===J){J!==0&&J===go&&(ah=!0),de!==null&&(de=de.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var Ae=n,Ie=S;J=i;var gt=o;switch(Ie.tag){case 1:if(Ae=Ie.payload,typeof Ae=="function"){he=Ae.call(gt,he,J);break e}he=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=Ie.payload,J=typeof Ae=="function"?Ae.call(gt,he,J):Ae,J==null)break e;he=v({},he,J);break e;case 2:ra=!0}}J=S.callback,J!==null&&(n.flags|=64,oe&&(n.flags|=8192),oe=f.callbacks,oe===null?f.callbacks=[J]:oe.push(J))}else oe={lane:J,tag:S.tag,payload:S.payload,callback:S.callback,next:null},de===null?(W=de=oe,U=he):de=de.next=oe,y|=J;if(S=S.next,S===null){if(S=f.shared.pending,S===null)break;oe=S,S=oe.next,oe.next=null,f.lastBaseUpdate=oe,f.shared.pending=null}}while(!0);de===null&&(U=he),f.baseState=U,f.firstBaseUpdate=W,f.lastBaseUpdate=de,h===null&&(f.shared.lanes=0),fa|=y,n.lanes=y,n.memoizedState=he}}function R0(n,i){if(typeof n!="function")throw Error(r(191,n));n.call(i)}function T0(n,i){var o=n.callbacks;if(o!==null)for(n.callbacks=null,n=0;n<o.length;n++)R0(o[n],i)}var xo=N(null),Vc=N(0);function D0(n,i){n=Ii,I(Vc,n),I(xo,i),Ii=n|i.baseLanes}function rh(){I(Vc,Ii),I(xo,xo.current)}function oh(){Ii=Vc.current,q(xo),q(Vc)}var Cn=N(null),Xn=null;function sa(n){var i=n.alternate;I(Tt,Tt.current&1),I(Cn,n),Xn===null&&(i===null||xo.current!==null||i.memoizedState!==null)&&(Xn=n)}function lh(n){I(Tt,Tt.current),I(Cn,n),Xn===null&&(Xn=n)}function L0(n){n.tag===22?(I(Tt,Tt.current),I(Cn,n),Xn===null&&(Xn=n)):ca()}function ca(){I(Tt,Tt.current),I(Cn,Cn.current)}function Rn(n){q(Cn),Xn===n&&(Xn=null),q(Tt)}var Tt=N(0);function Gc(n){for(var i=n;i!==null;){if(i.tag===13){var o=i.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||hm(o)||mm(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 Ci=0,Fe=null,mt=null,$t=null,Kc=!1,wo=!1,yr=!1,Yc=0,Ql=0,ko=null,JA=0;function Nt(){throw Error(r(321))}function sh(n,i){if(i===null)return!1;for(var o=0;o<i.length&&o<n.length;o++)if(!Nn(n[o],i[o]))return!1;return!0}function ch(n,i,o,s,f,h){return Ci=h,Fe=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,M.H=n===null||n.memoizedState===null?bv:Eh,yr=!1,h=o(s,f),yr=!1,wo&&(h=$0(i,o,s,f)),z0(n),h}function z0(n){M.H=Wl;var i=mt!==null&&mt.next!==null;if(Ci=0,$t=mt=Fe=null,Kc=!1,Ql=0,ko=null,i)throw Error(r(300));n===null||Ut||(n=n.dependencies,n!==null&&Uc(n)&&(Ut=!0))}function $0(n,i,o,s){Fe=n;var f=0;do{if(wo&&(ko=null),Ql=0,wo=!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)}M.H=vv,h=i(o,s)}while(wo);return h}function eN(){var n=M.H,i=n.useState()[0];return i=typeof i.then=="function"?Xl(i):i,n=n.useState()[0],(mt!==null?mt.memoizedState:null)!==n&&(Fe.flags|=1024),i}function uh(){var n=Yc!==0;return Yc=0,n}function dh(n,i,o){i.updateQueue=n.updateQueue,i.flags&=-2053,n.lanes&=~o}function fh(n){if(Kc){for(n=n.memoizedState;n!==null;){var i=n.queue;i!==null&&(i.pending=null),n=n.next}Kc=!1}Ci=0,$t=mt=Fe=null,wo=!1,Ql=Yc=0,ko=null}function un(){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 Qc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Xl(n){var i=Ql;return Ql+=1,ko===null&&(ko=[]),n=O0(ko,n,i),i=Fe,($t===null?i.memoizedState:$t.next)===null&&(i=i.alternate,M.H=i===null||i.memoizedState===null?bv:Eh),n}function Xc(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Xl(n);if(n.$$typeof===A)return en(n)}throw Error(r(438,String(n)))}function hh(n){var i=null,o=Fe.updateQueue;if(o!==null&&(i=o.memoCache),i==null){var s=Fe.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(i={data:s.data.map(function(f){return f.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),o===null&&(o=Qc(),Fe.updateQueue=o),o.memoCache=i,o=i.data[i.index],o===void 0)for(o=i.data[i.index]=Array(n),s=0;s<n;s++)o[s]=ne;return i.index++,o}function Ri(n,i){return typeof i=="function"?i(n):i}function Zc(n){var i=Dt();return mh(i,mt,n)}function mh(n,i,o){var s=n.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=o;var f=n.baseQueue,h=s.pending;if(h!==null){if(f!==null){var y=f.next;f.next=h.next,h.next=y}i.baseQueue=f=h,s.pending=null}if(h=n.baseState,f===null)n.memoizedState=h;else{i=f.next;var S=y=null,U=null,W=i,de=!1;do{var he=W.lane&-536870913;if(he!==W.lane?(Ze&he)===he:(Ci&he)===he){var J=W.revertLane;if(J===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),he===go&&(de=!0);else if((Ci&J)===J){W=W.next,J===go&&(de=!0);continue}else he={lane:0,revertLane:W.revertLane,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},U===null?(S=U=he,y=h):U=U.next=he,Fe.lanes|=J,fa|=J;he=W.action,yr&&o(h,he),h=W.hasEagerState?W.eagerState:o(h,he)}else J={lane:he,revertLane:W.revertLane,gesture:W.gesture,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},U===null?(S=U=J,y=h):U=U.next=J,Fe.lanes|=he,fa|=he;W=W.next}while(W!==null&&W!==i);if(U===null?y=h:U.next=S,!Nn(h,n.memoizedState)&&(Ut=!0,de&&(o=yo,o!==null)))throw o;n.memoizedState=h,n.baseState=y,n.baseQueue=U,s.lastRenderedState=h}return f===null&&(s.lanes=0),[n.memoizedState,s.dispatch]}function ph(n){var i=Dt(),o=i.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=n;var s=o.dispatch,f=o.pending,h=i.memoizedState;if(f!==null){o.pending=null;var y=f=f.next;do h=n(h,y.action),y=y.next;while(y!==f);Nn(h,i.memoizedState)||(Ut=!0),i.memoizedState=h,i.baseQueue===null&&(i.baseState=h),o.lastRenderedState=h}return[h,s]}function U0(n,i,o){var s=Fe,f=Dt(),h=et;if(h){if(o===void 0)throw Error(r(407));o=o()}else o=i();var y=!Nn((mt||f).memoizedState,o);if(y&&(f.memoizedState=o,Ut=!0),f=f.queue,bh(B0.bind(null,s,f,n),[n]),f.getSnapshot!==i||y||$t!==null&&$t.memoizedState.tag&1){if(s.flags|=2048,So(9,{destroy:void 0},H0.bind(null,s,f,o,i),null),bt===null)throw Error(r(349));h||(Ci&127)!==0||I0(s,i,o)}return o}function I0(n,i,o){n.flags|=16384,n={getSnapshot:i,value:o},i=Fe.updateQueue,i===null?(i=Qc(),Fe.updateQueue=i,i.stores=[n]):(o=i.stores,o===null?i.stores=[n]:o.push(n))}function H0(n,i,o,s){i.value=o,i.getSnapshot=s,q0(i)&&F0(n)}function B0(n,i,o){return o(function(){q0(i)&&F0(n)})}function q0(n){var i=n.getSnapshot;n=n.value;try{var o=i();return!Nn(n,o)}catch{return!0}}function F0(n){var i=sr(n,2);i!==null&&kn(i,n,2)}function gh(n){var i=un();if(typeof n=="function"){var o=n;if(n=o(),yr){ie(!0);try{o()}finally{ie(!1)}}}return i.memoizedState=i.baseState=n,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ri,lastRenderedState:n},i}function P0(n,i,o,s){return n.baseState=o,mh(n,mt,typeof s=="function"?s:Ri)}function tN(n,i,o,s,f){if(eu(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(y){h.listeners.push(y)}};M.T!==null?o(!0):h.isTransition=!1,s(h),o=i.pending,o===null?(h.next=i.pending=h,V0(i,h)):(h.next=o.next,i.pending=o.next=h)}}function V0(n,i){var o=i.action,s=i.payload,f=n.state;if(i.isTransition){var h=M.T,y={};M.T=y;try{var S=o(f,s),U=M.S;U!==null&&U(y,S),G0(n,i,S)}catch(W){yh(n,i,W)}finally{h!==null&&y.types!==null&&(h.types=y.types),M.T=h}}else try{h=o(f,s),G0(n,i,h)}catch(W){yh(n,i,W)}}function G0(n,i,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(s){K0(n,i,s)},function(s){return yh(n,i,s)}):K0(n,i,o)}function K0(n,i,o){i.status="fulfilled",i.value=o,Y0(i),n.state=o,i=n.pending,i!==null&&(o=i.next,o===i?n.pending=null:(o=o.next,i.next=o,V0(n,o)))}function yh(n,i,o){var s=n.pending;if(n.pending=null,s!==null){s=s.next;do i.status="rejected",i.reason=o,Y0(i),i=i.next;while(i!==s)}n.action=null}function Y0(n){n=n.listeners;for(var i=0;i<n.length;i++)(0,n[i])()}function Q0(n,i){return i}function X0(n,i){if(et){var o=bt.formState;if(o!==null){e:{var s=Fe;if(et){if(xt){t:{for(var f=xt,h=Qn;f.nodeType!==8;){if(!h){f=null;break t}if(f=Zn(f.nextSibling),f===null){f=null;break t}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){xt=Zn(f.nextSibling),s=f.data==="F!";break e}}ia(s)}s=!1}s&&(i=o[0])}}return o=un(),o.memoizedState=o.baseState=i,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Q0,lastRenderedState:i},o.queue=s,o=pv.bind(null,Fe,s),s.dispatch=o,s=gh(!1),h=Sh.bind(null,Fe,!1,s.queue),s=un(),f={state:i,dispatch:null,action:n,pending:null},s.queue=f,o=tN.bind(null,Fe,f,h,o),f.dispatch=o,s.memoizedState=n,[i,o,!1]}function Z0(n){var i=Dt();return W0(i,mt,n)}function W0(n,i,o){if(i=mh(n,i,Q0)[0],n=Zc(Ri)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var s=Xl(i)}catch(y){throw y===bo?Bc:y}else s=i;i=Dt();var f=i.queue,h=f.dispatch;return o!==i.memoizedState&&(Fe.flags|=2048,So(9,{destroy:void 0},nN.bind(null,f,o),null)),[s,h,n]}function nN(n,i){n.action=i}function J0(n){var i=Dt(),o=mt;if(o!==null)return W0(i,o,n);Dt(),i=i.memoizedState,o=Dt();var s=o.queue.dispatch;return o.memoizedState=n,[i,s,!1]}function So(n,i,o,s){return n={tag:n,create:o,deps:s,inst:i,next:null},i=Fe.updateQueue,i===null&&(i=Qc(),Fe.updateQueue=i),o=i.lastEffect,o===null?i.lastEffect=n.next=n:(s=o.next,o.next=n,n.next=s,i.lastEffect=n),n}function ev(){return Dt().memoizedState}function Wc(n,i,o,s){var f=un();Fe.flags|=n,f.memoizedState=So(1|i,{destroy:void 0},o,s===void 0?null:s)}function Jc(n,i,o,s){var f=Dt();s=s===void 0?null:s;var h=f.memoizedState.inst;mt!==null&&s!==null&&sh(s,mt.memoizedState.deps)?f.memoizedState=So(i,h,o,s):(Fe.flags|=n,f.memoizedState=So(1|i,h,o,s))}function tv(n,i){Wc(8390656,8,n,i)}function bh(n,i){Jc(2048,8,n,i)}function iN(n){Fe.flags|=4;var i=Fe.updateQueue;if(i===null)i=Qc(),Fe.updateQueue=i,i.events=[n];else{var o=i.events;o===null?i.events=[n]:o.push(n)}}function nv(n){var i=Dt().memoizedState;return iN({ref:i,nextImpl:n}),function(){if((lt&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}function iv(n,i){return Jc(4,2,n,i)}function av(n,i){return Jc(4,4,n,i)}function rv(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 ov(n,i,o){o=o!=null?o.concat([n]):null,Jc(4,4,rv.bind(null,i,n),o)}function vh(){}function lv(n,i){var o=Dt();i=i===void 0?null:i;var s=o.memoizedState;return i!==null&&sh(i,s[1])?s[0]:(o.memoizedState=[n,i],n)}function sv(n,i){var o=Dt();i=i===void 0?null:i;var s=o.memoizedState;if(i!==null&&sh(i,s[1]))return s[0];if(s=n(),yr){ie(!0);try{n()}finally{ie(!1)}}return o.memoizedState=[s,i],s}function xh(n,i,o){return o===void 0||(Ci&1073741824)!==0&&(Ze&261930)===0?n.memoizedState=i:(n.memoizedState=o,n=c1(),Fe.lanes|=n,fa|=n,o)}function cv(n,i,o,s){return Nn(o,i)?o:xo.current!==null?(n=xh(n,o,s),Nn(n,i)||(Ut=!0),n):(Ci&42)===0||(Ci&1073741824)!==0&&(Ze&261930)===0?(Ut=!0,n.memoizedState=o):(n=c1(),Fe.lanes|=n,fa|=n,i)}function uv(n,i,o,s,f){var h=V.p;V.p=h!==0&&8>h?h:8;var y=M.T,S={};M.T=S,Sh(n,!1,i,o);try{var U=f(),W=M.S;if(W!==null&&W(S,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var de=WA(U,s);Zl(n,i,de,Ln(n))}else Zl(n,i,s,Ln(n))}catch(he){Zl(n,i,{then:function(){},status:"rejected",reason:he},Ln())}finally{V.p=h,y!==null&&S.types!==null&&(y.types=S.types),M.T=y}}function aN(){}function wh(n,i,o,s){if(n.tag!==5)throw Error(r(476));var f=dv(n).queue;uv(n,f,i,te,o===null?aN:function(){return fv(n),o(s)})}function dv(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:Ri,lastRenderedState:te},next:null};var o={};return i.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ri,lastRenderedState:o},next:null},n.memoizedState=i,n=n.alternate,n!==null&&(n.memoizedState=i),i}function fv(n){var i=dv(n);i.next===null&&(i=n.alternate.memoizedState),Zl(n,i.next.queue,{},Ln())}function kh(){return en(ms)}function hv(){return Dt().memoizedState}function mv(){return Dt().memoizedState}function rN(n){for(var i=n.return;i!==null;){switch(i.tag){case 24:case 3:var o=Ln();n=oa(o);var s=la(i,n,o);s!==null&&(kn(s,i,o),Gl(s,i,o)),i={cache:Zf()},n.payload=i;return}i=i.return}}function oN(n,i,o){var s=Ln();o={lane:s,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},eu(n)?gv(i,o):(o=Hf(n,i,o,s),o!==null&&(kn(o,n,s),yv(o,i,s)))}function pv(n,i,o){var s=Ln();Zl(n,i,o,s)}function Zl(n,i,o,s){var f={lane:s,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(eu(n))gv(i,f);else{var h=n.alternate;if(n.lanes===0&&(h===null||h.lanes===0)&&(h=i.lastRenderedReducer,h!==null))try{var y=i.lastRenderedState,S=h(y,o);if(f.hasEagerState=!0,f.eagerState=S,Nn(S,y))return Dc(n,i,f,0),bt===null&&Tc(),!1}catch{}finally{}if(o=Hf(n,i,f,s),o!==null)return kn(o,n,s),yv(o,i,s),!0}return!1}function Sh(n,i,o,s){if(s={lane:2,revertLane:tm(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},eu(n)){if(i)throw Error(r(479))}else i=Hf(n,o,s,2),i!==null&&kn(i,n,2)}function eu(n){var i=n.alternate;return n===Fe||i!==null&&i===Fe}function gv(n,i){wo=Kc=!0;var o=n.pending;o===null?i.next=i:(i.next=o.next,o.next=i),n.pending=i}function yv(n,i,o){if((o&4194048)!==0){var s=i.lanes;s&=n.pendingLanes,o|=s,i.lanes=o,wc(n,o)}}var Wl={readContext:en,use:Xc,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};Wl.useEffectEvent=Nt;var bv={readContext:en,use:Xc,useCallback:function(n,i){return un().memoizedState=[n,i===void 0?null:i],n},useContext:en,useEffect:tv,useImperativeHandle:function(n,i,o){o=o!=null?o.concat([n]):null,Wc(4194308,4,rv.bind(null,i,n),o)},useLayoutEffect:function(n,i){return Wc(4194308,4,n,i)},useInsertionEffect:function(n,i){Wc(4,2,n,i)},useMemo:function(n,i){var o=un();i=i===void 0?null:i;var s=n();if(yr){ie(!0);try{n()}finally{ie(!1)}}return o.memoizedState=[s,i],s},useReducer:function(n,i,o){var s=un();if(o!==void 0){var f=o(i);if(yr){ie(!0);try{o(i)}finally{ie(!1)}}}else f=i;return s.memoizedState=s.baseState=f,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:f},s.queue=n,n=n.dispatch=oN.bind(null,Fe,n),[s.memoizedState,n]},useRef:function(n){var i=un();return n={current:n},i.memoizedState=n},useState:function(n){n=gh(n);var i=n.queue,o=pv.bind(null,Fe,i);return i.dispatch=o,[n.memoizedState,o]},useDebugValue:vh,useDeferredValue:function(n,i){var o=un();return xh(o,n,i)},useTransition:function(){var n=gh(!1);return n=uv.bind(null,Fe,n.queue,!0,!1),un().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,i,o){var s=Fe,f=un();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||I0(s,i,o)}f.memoizedState=o;var h={value:o,getSnapshot:i};return f.queue=h,tv(B0.bind(null,s,h,n),[n]),s.flags|=2048,So(9,{destroy:void 0},H0.bind(null,s,h,o,i),null),o},useId:function(){var n=un(),i=bt.identifierPrefix;if(et){var o=fi,s=di;o=(s&~(1<<32-be(s)-1)).toString(32)+o,i="_"+i+"R_"+o,o=Yc++,0<o&&(i+="H"+o.toString(32)),i+="_"}else o=JA++,i="_"+i+"r_"+o.toString(32)+"_";return n.memoizedState=i},useHostTransitionStatus:kh,useFormState:X0,useActionState:X0,useOptimistic:function(n){var i=un();i.memoizedState=i.baseState=n;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=o,i=Sh.bind(null,Fe,!0,o),o.dispatch=i,[n,i]},useMemoCache:hh,useCacheRefresh:function(){return un().memoizedState=rN.bind(null,Fe)},useEffectEvent:function(n){var i=un(),o={impl:n};return i.memoizedState=o,function(){if((lt&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}},Eh={readContext:en,use:Xc,useCallback:lv,useContext:en,useEffect:bh,useImperativeHandle:ov,useInsertionEffect:iv,useLayoutEffect:av,useMemo:sv,useReducer:Zc,useRef:ev,useState:function(){return Zc(Ri)},useDebugValue:vh,useDeferredValue:function(n,i){var o=Dt();return cv(o,mt.memoizedState,n,i)},useTransition:function(){var n=Zc(Ri)[0],i=Dt().memoizedState;return[typeof n=="boolean"?n:Xl(n),i]},useSyncExternalStore:U0,useId:hv,useHostTransitionStatus:kh,useFormState:Z0,useActionState:Z0,useOptimistic:function(n,i){var o=Dt();return P0(o,mt,n,i)},useMemoCache:hh,useCacheRefresh:mv};Eh.useEffectEvent=nv;var vv={readContext:en,use:Xc,useCallback:lv,useContext:en,useEffect:bh,useImperativeHandle:ov,useInsertionEffect:iv,useLayoutEffect:av,useMemo:sv,useReducer:ph,useRef:ev,useState:function(){return ph(Ri)},useDebugValue:vh,useDeferredValue:function(n,i){var o=Dt();return mt===null?xh(o,n,i):cv(o,mt.memoizedState,n,i)},useTransition:function(){var n=ph(Ri)[0],i=Dt().memoizedState;return[typeof n=="boolean"?n:Xl(n),i]},useSyncExternalStore:U0,useId:hv,useHostTransitionStatus:kh,useFormState:J0,useActionState:J0,useOptimistic:function(n,i){var o=Dt();return mt!==null?P0(o,mt,n,i):(o.baseState=n,[n,o.queue.dispatch])},useMemoCache:hh,useCacheRefresh:mv};vv.useEffectEvent=nv;function _h(n,i,o,s){i=n.memoizedState,o=o(s,i),o=o==null?i:v({},i,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}var jh={enqueueSetState:function(n,i,o){n=n._reactInternals;var s=Ln(),f=oa(s);f.payload=i,o!=null&&(f.callback=o),i=la(n,f,s),i!==null&&(kn(i,n,s),Gl(i,n,s))},enqueueReplaceState:function(n,i,o){n=n._reactInternals;var s=Ln(),f=oa(s);f.tag=1,f.payload=i,o!=null&&(f.callback=o),i=la(n,f,s),i!==null&&(kn(i,n,s),Gl(i,n,s))},enqueueForceUpdate:function(n,i){n=n._reactInternals;var o=Ln(),s=oa(o);s.tag=2,i!=null&&(s.callback=i),i=la(n,s,o),i!==null&&(kn(i,n,o),Gl(i,n,o))}};function xv(n,i,o,s,f,h,y){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(s,h,y):i.prototype&&i.prototype.isPureReactComponent?!Ul(o,s)||!Ul(f,h):!0}function wv(n,i,o,s){n=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(o,s),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(o,s),i.state!==n&&jh.enqueueReplaceState(i,i.state,null)}function br(n,i){var o=i;if("ref"in i){o={};for(var s in i)s!=="ref"&&(o[s]=i[s])}if(n=n.defaultProps){o===i&&(o=v({},o));for(var f in n)o[f]===void 0&&(o[f]=n[f])}return o}function kv(n){Rc(n)}function Sv(n){console.error(n)}function Ev(n){Rc(n)}function tu(n,i){try{var o=n.onUncaughtError;o(i.value,{componentStack:i.stack})}catch(s){setTimeout(function(){throw s})}}function _v(n,i,o){try{var s=n.onCaughtError;s(o.value,{componentStack:o.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Oh(n,i,o){return o=oa(o),o.tag=3,o.payload={element:null},o.callback=function(){tu(n,i)},o}function jv(n){return n=oa(n),n.tag=3,n}function Ov(n,i,o,s){var f=o.type.getDerivedStateFromError;if(typeof f=="function"){var h=s.value;n.payload=function(){return f(h)},n.callback=function(){_v(i,o,s)}}var y=o.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(n.callback=function(){_v(i,o,s),typeof f!="function"&&(ha===null?ha=new Set([this]):ha.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})})}function lN(n,i,o,s,f){if(o.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(i=o.alternate,i!==null&&po(i,o,f,!0),o=Cn.current,o!==null){switch(o.tag){case 31:case 13:return Xn===null?hu():o.alternate===null&&Mt===0&&(Mt=3),o.flags&=-257,o.flags|=65536,o.lanes=f,s===qc?o.flags|=16384:(i=o.updateQueue,i===null?o.updateQueue=new Set([s]):i.add(s),Wh(n,s,f)),!1;case 22:return o.flags|=65536,s===qc?o.flags|=16384:(i=o.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([s])},o.updateQueue=i):(o=i.retryQueue,o===null?i.retryQueue=new Set([s]):o.add(s)),Wh(n,s,f)),!1}throw Error(r(435,o.tag))}return Wh(n,s,f),hu(),!1}if(et)return i=Cn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=f,s!==Gf&&(n=Error(r(422),{cause:s}),Bl(Gn(n,o)))):(s!==Gf&&(i=Error(r(423),{cause:s}),Bl(Gn(i,o))),n=n.current.alternate,n.flags|=65536,f&=-f,n.lanes|=f,s=Gn(s,o),f=Oh(n.stateNode,s,f),ih(n,f),Mt!==4&&(Mt=2)),!1;var h=Error(r(520),{cause:s});if(h=Gn(h,o),os===null?os=[h]:os.push(h),Mt!==4&&(Mt=2),i===null)return!0;s=Gn(s,o),o=i;do{switch(o.tag){case 3:return o.flags|=65536,n=f&-f,o.lanes|=n,n=Oh(o.stateNode,s,n),ih(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"&&(ha===null||!ha.has(h))))return o.flags|=65536,f&=-f,o.lanes|=f,f=jv(f),Ov(f,n,o,s),ih(o,f),!1}o=o.return}while(o!==null);return!1}var Ah=Error(r(461)),Ut=!1;function tn(n,i,o,s){i.child=n===null?C0(i,null,o,s):gr(i,n.child,o,s)}function Av(n,i,o,s,f){o=o.render;var h=i.ref;if("ref"in s){var y={};for(var S in s)S!=="ref"&&(y[S]=s[S])}else y=s;return fr(i),s=ch(n,i,o,y,h,f),S=uh(),n!==null&&!Ut?(dh(n,i,f),Ti(n,i,f)):(et&&S&&Pf(i),i.flags|=1,tn(n,i,s,f),i.child)}function Nv(n,i,o,s,f){if(n===null){var h=o.type;return typeof h=="function"&&!Bf(h)&&h.defaultProps===void 0&&o.compare===null?(i.tag=15,i.type=h,Mv(n,i,h,s,f)):(n=zc(o.type,null,s,i,i.mode,f),n.ref=i.ref,n.return=i,i.child=n)}if(h=n.child,!zh(n,f)){var y=h.memoizedProps;if(o=o.compare,o=o!==null?o:Ul,o(y,s)&&n.ref===i.ref)return Ti(n,i,f)}return i.flags|=1,n=Oi(h,s),n.ref=i.ref,n.return=i,i.child=n}function Mv(n,i,o,s,f){if(n!==null){var h=n.memoizedProps;if(Ul(h,s)&&n.ref===i.ref)if(Ut=!1,i.pendingProps=s=h,zh(n,f))(n.flags&131072)!==0&&(Ut=!0);else return i.lanes=n.lanes,Ti(n,i,f)}return Nh(n,i,o,s,f)}function Cv(n,i,o,s){var f=s.children,h=n!==null?n.memoizedState:null;if(n===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((i.flags&128)!==0){if(h=h!==null?h.baseLanes|o:o,n!==null){for(s=i.child=n.child,f=0;s!==null;)f=f|s.lanes|s.childLanes,s=s.sibling;s=f&~h}else s=0,i.child=null;return Rv(n,i,h,o,s)}if((o&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},n!==null&&Hc(i,h!==null?h.cachePool:null),h!==null?D0(i,h):rh(),L0(i);else return s=i.lanes=536870912,Rv(n,i,h!==null?h.baseLanes|o:o,o,s)}else h!==null?(Hc(i,h.cachePool),D0(i,h),ca(),i.memoizedState=null):(n!==null&&Hc(i,null),rh(),ca());return tn(n,i,f,o),i.child}function Jl(n,i){return n!==null&&n.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Rv(n,i,o,s,f){var h=Jf();return h=h===null?null:{parent:zt._currentValue,pool:h},i.memoizedState={baseLanes:o,cachePool:h},n!==null&&Hc(i,null),rh(),L0(i),n!==null&&po(n,i,s,!0),i.childLanes=f,null}function nu(n,i){return i=au({mode:i.mode,children:i.children},n.mode),i.ref=n.ref,n.child=i,i.return=n,i}function Tv(n,i,o){return gr(i,n.child,null,o),n=nu(i,i.pendingProps),n.flags|=2,Rn(i),i.memoizedState=null,n}function sN(n,i,o){var s=i.pendingProps,f=(i.flags&128)!==0;if(i.flags&=-129,n===null){if(et){if(s.mode==="hidden")return n=nu(i,s),i.lanes=536870912,Jl(null,n);if(lh(i),(n=xt)?(n=V1(n,Qn),n=n!==null&&n.data==="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:ta!==null?{id:di,overflow:fi}:null,retryLane:536870912,hydrationErrors:null},o=g0(n),o.return=i,i.child=o,Jt=i,xt=null)):n=null,n===null)throw ia(i);return i.lanes=536870912,null}return nu(i,s)}var h=n.memoizedState;if(h!==null){var y=h.dehydrated;if(lh(i),f)if(i.flags&256)i.flags&=-257,i=Tv(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||po(n,i,o,!1),f=(o&n.childLanes)!==0,Ut||f){if(s=bt,s!==null&&(y=re(s,o),y!==0&&y!==h.retryLane))throw h.retryLane=y,sr(n,y),kn(s,n,y),Ah;hu(),i=Tv(n,i,o)}else n=h.treeContext,xt=Zn(y.nextSibling),Jt=i,et=!0,na=null,Qn=!1,n!==null&&v0(i,n),i=nu(i,s),i.flags|=4096;return i}return n=Oi(n.child,{mode:s.mode,children:s.children}),n.ref=i.ref,i.child=n,n.return=i,n}function iu(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 Nh(n,i,o,s,f){return fr(i),o=ch(n,i,o,s,void 0,f),s=uh(),n!==null&&!Ut?(dh(n,i,f),Ti(n,i,f)):(et&&s&&Pf(i),i.flags|=1,tn(n,i,o,f),i.child)}function Dv(n,i,o,s,f,h){return fr(i),i.updateQueue=null,o=$0(i,s,o,f),z0(n),s=uh(),n!==null&&!Ut?(dh(n,i,h),Ti(n,i,h)):(et&&s&&Pf(i),i.flags|=1,tn(n,i,o,h),i.child)}function Lv(n,i,o,s,f){if(fr(i),i.stateNode===null){var h=uo,y=o.contextType;typeof y=="object"&&y!==null&&(h=en(y)),h=new o(s,h),i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=jh,i.stateNode=h,h._reactInternals=i,h=i.stateNode,h.props=s,h.state=i.memoizedState,h.refs={},th(i),y=o.contextType,h.context=typeof y=="object"&&y!==null?en(y):uo,h.state=i.memoizedState,y=o.getDerivedStateFromProps,typeof y=="function"&&(_h(i,o,y,s),h.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(y=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),y!==h.state&&jh.enqueueReplaceState(h,h.state,null),Yl(i,s,h,f),Kl(),h.state=i.memoizedState),typeof h.componentDidMount=="function"&&(i.flags|=4194308),s=!0}else if(n===null){h=i.stateNode;var S=i.memoizedProps,U=br(o,S);h.props=U;var W=h.context,de=o.contextType;y=uo,typeof de=="object"&&de!==null&&(y=en(de));var he=o.getDerivedStateFromProps;de=typeof he=="function"||typeof h.getSnapshotBeforeUpdate=="function",S=i.pendingProps!==S,de||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(S||W!==y)&&wv(i,h,s,y),ra=!1;var J=i.memoizedState;h.state=J,Yl(i,s,h,f),Kl(),W=i.memoizedState,S||J!==W||ra?(typeof he=="function"&&(_h(i,o,he,s),W=i.memoizedState),(U=ra||xv(i,o,U,s,J,W,y))?(de||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=s,i.memoizedState=W),h.props=s,h.state=W,h.context=y,s=U):(typeof h.componentDidMount=="function"&&(i.flags|=4194308),s=!1)}else{h=i.stateNode,nh(n,i),y=i.memoizedProps,de=br(o,y),h.props=de,he=i.pendingProps,J=h.context,W=o.contextType,U=uo,typeof W=="object"&&W!==null&&(U=en(W)),S=o.getDerivedStateFromProps,(W=typeof S=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(y!==he||J!==U)&&wv(i,h,s,U),ra=!1,J=i.memoizedState,h.state=J,Yl(i,s,h,f),Kl();var oe=i.memoizedState;y!==he||J!==oe||ra||n!==null&&n.dependencies!==null&&Uc(n.dependencies)?(typeof S=="function"&&(_h(i,o,S,s),oe=i.memoizedState),(de=ra||xv(i,o,de,s,J,oe,U)||n!==null&&n.dependencies!==null&&Uc(n.dependencies))?(W||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(s,oe,U),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(s,oe,U)),typeof h.componentDidUpdate=="function"&&(i.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof h.componentDidUpdate!="function"||y===n.memoizedProps&&J===n.memoizedState||(i.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===n.memoizedProps&&J===n.memoizedState||(i.flags|=1024),i.memoizedProps=s,i.memoizedState=oe),h.props=s,h.state=oe,h.context=U,s=de):(typeof h.componentDidUpdate!="function"||y===n.memoizedProps&&J===n.memoizedState||(i.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===n.memoizedProps&&J===n.memoizedState||(i.flags|=1024),s=!1)}return h=s,iu(n,i),s=(i.flags&128)!==0,h||s?(h=i.stateNode,o=s&&typeof o.getDerivedStateFromError!="function"?null:h.render(),i.flags|=1,n!==null&&s?(i.child=gr(i,n.child,null,f),i.child=gr(i,null,o,f)):tn(n,i,o,f),i.memoizedState=h.state,n=i.child):n=Ti(n,i,f),n}function zv(n,i,o,s){return ur(),i.flags|=256,tn(n,i,o,s),i.child}var Mh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ch(n){return{baseLanes:n,cachePool:_0()}}function Rh(n,i,o){return n=n!==null?n.childLanes&~o:0,i&&(n|=Dn),n}function $v(n,i,o){var s=i.pendingProps,f=!1,h=(i.flags&128)!==0,y;if((y=h)||(y=n!==null&&n.memoizedState===null?!1:(Tt.current&2)!==0),y&&(f=!0,i.flags&=-129),y=(i.flags&32)!==0,i.flags&=-33,n===null){if(et){if(f?sa(i):ca(),(n=xt)?(n=V1(n,Qn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(i.memoizedState={dehydrated:n,treeContext:ta!==null?{id:di,overflow:fi}:null,retryLane:536870912,hydrationErrors:null},o=g0(n),o.return=i,i.child=o,Jt=i,xt=null)):n=null,n===null)throw ia(i);return mm(n)?i.lanes=32:i.lanes=536870912,null}var S=s.children;return s=s.fallback,f?(ca(),f=i.mode,S=au({mode:"hidden",children:S},f),s=cr(s,f,o,null),S.return=i,s.return=i,S.sibling=s,i.child=S,s=i.child,s.memoizedState=Ch(o),s.childLanes=Rh(n,y,o),i.memoizedState=Mh,Jl(null,s)):(sa(i),Th(i,S))}var U=n.memoizedState;if(U!==null&&(S=U.dehydrated,S!==null)){if(h)i.flags&256?(sa(i),i.flags&=-257,i=Dh(n,i,o)):i.memoizedState!==null?(ca(),i.child=n.child,i.flags|=128,i=null):(ca(),S=s.fallback,f=i.mode,s=au({mode:"visible",children:s.children},f),S=cr(S,f,o,null),S.flags|=2,s.return=i,S.return=i,s.sibling=S,i.child=s,gr(i,n.child,null,o),s=i.child,s.memoizedState=Ch(o),s.childLanes=Rh(n,y,o),i.memoizedState=Mh,i=Jl(null,s));else if(sa(i),mm(S)){if(y=S.nextSibling&&S.nextSibling.dataset,y)var W=y.dgst;y=W,s=Error(r(419)),s.stack="",s.digest=y,Bl({value:s,source:null,stack:null}),i=Dh(n,i,o)}else if(Ut||po(n,i,o,!1),y=(o&n.childLanes)!==0,Ut||y){if(y=bt,y!==null&&(s=re(y,o),s!==0&&s!==U.retryLane))throw U.retryLane=s,sr(n,s),kn(y,n,s),Ah;hm(S)||hu(),i=Dh(n,i,o)}else hm(S)?(i.flags|=192,i.child=n.child,i=null):(n=U.treeContext,xt=Zn(S.nextSibling),Jt=i,et=!0,na=null,Qn=!1,n!==null&&v0(i,n),i=Th(i,s.children),i.flags|=4096);return i}return f?(ca(),S=s.fallback,f=i.mode,U=n.child,W=U.sibling,s=Oi(U,{mode:"hidden",children:s.children}),s.subtreeFlags=U.subtreeFlags&65011712,W!==null?S=Oi(W,S):(S=cr(S,f,o,null),S.flags|=2),S.return=i,s.return=i,s.sibling=S,i.child=s,Jl(null,s),s=i.child,S=n.child.memoizedState,S===null?S=Ch(o):(f=S.cachePool,f!==null?(U=zt._currentValue,f=f.parent!==U?{parent:U,pool:U}:f):f=_0(),S={baseLanes:S.baseLanes|o,cachePool:f}),s.memoizedState=S,s.childLanes=Rh(n,y,o),i.memoizedState=Mh,Jl(n.child,s)):(sa(i),o=n.child,n=o.sibling,o=Oi(o,{mode:"visible",children:s.children}),o.return=i,o.sibling=null,n!==null&&(y=i.deletions,y===null?(i.deletions=[n],i.flags|=16):y.push(n)),i.child=o,i.memoizedState=null,o)}function Th(n,i){return i=au({mode:"visible",children:i},n.mode),i.return=n,n.child=i}function au(n,i){return n=Mn(22,n,null,i),n.lanes=0,n}function Dh(n,i,o){return gr(i,n.child,null,o),n=Th(i,i.pendingProps.children),n.flags|=2,i.memoizedState=null,n}function Uv(n,i,o){n.lanes|=i;var s=n.alternate;s!==null&&(s.lanes|=i),Qf(n.return,i,o)}function Lh(n,i,o,s,f,h){var y=n.memoizedState;y===null?n.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:s,tail:o,tailMode:f,treeForkCount:h}:(y.isBackwards=i,y.rendering=null,y.renderingStartTime=0,y.last=s,y.tail=o,y.tailMode=f,y.treeForkCount=h)}function Iv(n,i,o){var s=i.pendingProps,f=s.revealOrder,h=s.tail;s=s.children;var y=Tt.current,S=(y&2)!==0;if(S?(y=y&1|2,i.flags|=128):y&=1,I(Tt,y),tn(n,i,s,o),s=et?Hl:0,!S&&n!==null&&(n.flags&128)!==0)e:for(n=i.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Uv(n,o,i);else if(n.tag===19)Uv(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&&Gc(n)===null&&(f=o),o=o.sibling;o=f,o===null?(f=i.child,i.child=null):(f=o.sibling,o.sibling=null),Lh(i,!1,f,o,h,s);break;case"backwards":case"unstable_legacy-backwards":for(o=null,f=i.child,i.child=null;f!==null;){if(n=f.alternate,n!==null&&Gc(n)===null){i.child=f;break}n=f.sibling,f.sibling=o,o=f,f=n}Lh(i,!0,o,null,h,s);break;case"together":Lh(i,!1,null,null,void 0,s);break;default:i.memoizedState=null}return i.child}function Ti(n,i,o){if(n!==null&&(i.dependencies=n.dependencies),fa|=i.lanes,(o&i.childLanes)===0)if(n!==null){if(po(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=Oi(n,n.pendingProps),i.child=o,o.return=i;n.sibling!==null;)n=n.sibling,o=o.sibling=Oi(n,n.pendingProps),o.return=i;o.sibling=null}return i.child}function zh(n,i){return(n.lanes&i)!==0?!0:(n=n.dependencies,!!(n!==null&&Uc(n)))}function cN(n,i,o){switch(i.tag){case 3:ke(i,i.stateNode.containerInfo),aa(i,zt,n.memoizedState.cache),ur();break;case 27:case 5:ce(i);break;case 4:ke(i,i.stateNode.containerInfo);break;case 10:aa(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,lh(i),null;break;case 13:var s=i.memoizedState;if(s!==null)return s.dehydrated!==null?(sa(i),i.flags|=128,null):(o&i.child.childLanes)!==0?$v(n,i,o):(sa(i),n=Ti(n,i,o),n!==null?n.sibling:null);sa(i);break;case 19:var f=(n.flags&128)!==0;if(s=(o&i.childLanes)!==0,s||(po(n,i,o,!1),s=(o&i.childLanes)!==0),f){if(s)return Iv(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),s)break;return null;case 22:return i.lanes=0,Cv(n,i,o,i.pendingProps);case 24:aa(i,zt,n.memoizedState.cache)}return Ti(n,i,o)}function Hv(n,i,o){if(n!==null)if(n.memoizedProps!==i.pendingProps)Ut=!0;else{if(!zh(n,o)&&(i.flags&128)===0)return Ut=!1,cN(n,i,o);Ut=(n.flags&131072)!==0}else Ut=!1,et&&(i.flags&1048576)!==0&&b0(i,Hl,i.index);switch(i.lanes=0,i.tag){case 16:e:{var s=i.pendingProps;if(n=mr(i.elementType),i.type=n,typeof n=="function")Bf(n)?(s=br(n,s),i.tag=1,i=Lv(null,i,n,s,o)):(i.tag=0,i=Nh(null,i,n,s,o));else{if(n!=null){var f=n.$$typeof;if(f===D){i.tag=11,i=Av(null,i,n,s,o);break e}else if(f===L){i.tag=14,i=Nv(null,i,n,s,o);break e}}throw i=X(n)||n,Error(r(306,i,""))}}return i;case 0:return Nh(n,i,i.type,i.pendingProps,o);case 1:return s=i.type,f=br(s,i.pendingProps),Lv(n,i,s,f,o);case 3:e:{if(ke(i,i.stateNode.containerInfo),n===null)throw Error(r(387));s=i.pendingProps;var h=i.memoizedState;f=h.element,nh(n,i),Yl(i,s,null,o);var y=i.memoizedState;if(s=y.cache,aa(i,zt,s),s!==h.cache&&Xf(i,[zt],o,!0),Kl(),s=y.element,h.isDehydrated)if(h={element:s,isDehydrated:!1,cache:y.cache},i.updateQueue.baseState=h,i.memoizedState=h,i.flags&256){i=zv(n,i,s,o);break e}else if(s!==f){f=Gn(Error(r(424)),i),Bl(f),i=zv(n,i,s,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=Zn(n.firstChild),Jt=i,et=!0,na=null,Qn=!0,o=C0(i,null,s,o),i.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling}else{if(ur(),s===f){i=Ti(n,i,o);break e}tn(n,i,s,o)}i=i.child}return i;case 26:return iu(n,i),n===null?(o=Z1(i.type,null,i.pendingProps,null))?i.memoizedState=o:et||(o=i.type,n=i.pendingProps,s=xu(pe.current).createElement(o),s[Ot]=i,s[gn]=n,nn(s,o,n),Yt(s),i.stateNode=s):i.memoizedState=Z1(i.type,n.memoizedProps,i.pendingProps,n.memoizedState),null;case 27:return ce(i),n===null&&et&&(s=i.stateNode=Y1(i.type,i.pendingProps,pe.current),Jt=i,Qn=!0,f=xt,ya(i.type)?(pm=f,xt=Zn(s.firstChild)):xt=f),tn(n,i,i.pendingProps.children,o),iu(n,i),n===null&&(i.flags|=4194304),i.child;case 5:return n===null&&et&&((f=s=xt)&&(s=IN(s,i.type,i.pendingProps,Qn),s!==null?(i.stateNode=s,Jt=i,xt=Zn(s.firstChild),Qn=!1,f=!0):f=!1),f||ia(i)),ce(i),f=i.type,h=i.pendingProps,y=n!==null?n.memoizedProps:null,s=h.children,um(f,h)?s=null:y!==null&&um(f,y)&&(i.flags|=32),i.memoizedState!==null&&(f=ch(n,i,eN,null,null,o),ms._currentValue=f),iu(n,i),tn(n,i,s,o),i.child;case 6:return n===null&&et&&((n=o=xt)&&(o=HN(o,i.pendingProps,Qn),o!==null?(i.stateNode=o,Jt=i,xt=null,n=!0):n=!1),n||ia(i)),null;case 13:return $v(n,i,o);case 4:return ke(i,i.stateNode.containerInfo),s=i.pendingProps,n===null?i.child=gr(i,null,s,o):tn(n,i,s,o),i.child;case 11:return Av(n,i,i.type,i.pendingProps,o);case 7:return tn(n,i,i.pendingProps,o),i.child;case 8:return tn(n,i,i.pendingProps.children,o),i.child;case 12:return tn(n,i,i.pendingProps.children,o),i.child;case 10:return s=i.pendingProps,aa(i,i.type,s.value),tn(n,i,s.children,o),i.child;case 9:return f=i.type._context,s=i.pendingProps.children,fr(i),f=en(f),s=s(f),i.flags|=1,tn(n,i,s,o),i.child;case 14:return Nv(n,i,i.type,i.pendingProps,o);case 15:return Mv(n,i,i.type,i.pendingProps,o);case 19:return Iv(n,i,o);case 31:return sN(n,i,o);case 22:return Cv(n,i,o,i.pendingProps);case 24:return fr(i),s=en(zt),n===null?(f=Jf(),f===null&&(f=bt,h=Zf(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=o),f=h),i.memoizedState={parent:s,cache:f},th(i),aa(i,zt,f)):((n.lanes&o)!==0&&(nh(n,i),Yl(i,null,null,o),Kl()),f=n.memoizedState,h=i.memoizedState,f.parent!==s?(f={parent:s,cache:s},i.memoizedState=f,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=f),aa(i,zt,s)):(s=h.cache,aa(i,zt,s),s!==f.cache&&Xf(i,[zt],o,!0))),tn(n,i,i.pendingProps.children,o),i.child;case 29:throw i.pendingProps}throw Error(r(156,i.tag))}function Di(n){n.flags|=4}function $h(n,i,o,s,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(h1())n.flags|=8192;else throw pr=qc,eh}else n.flags&=-16777217}function Bv(n,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!nx(i))if(h1())n.flags|=8192;else throw pr=qc,eh}function ru(n,i){i!==null&&(n.flags|=4),n.flags&16384&&(i=n.tag!==22?An():536870912,n.lanes|=i,Oo|=i)}function es(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 s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?i||n.tail===null?n.tail=null:n.tail.sibling=null:s.sibling=null}}function wt(n){var i=n.alternate!==null&&n.alternate.child===n.child,o=0,s=0;if(i)for(var f=n.child;f!==null;)o|=f.lanes|f.childLanes,s|=f.subtreeFlags&65011712,s|=f.flags&65011712,f.return=n,f=f.sibling;else for(f=n.child;f!==null;)o|=f.lanes|f.childLanes,s|=f.subtreeFlags,s|=f.flags,f.return=n,f=f.sibling;return n.subtreeFlags|=s,n.childLanes=o,i}function uN(n,i,o){var s=i.pendingProps;switch(Vf(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,s=null,n!==null&&(s=n.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),Mi(zt),z(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(mo(i)?Di(i):n===null||n.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Kf())),wt(i),null;case 26:var f=i.type,h=i.memoizedState;return n===null?(Di(i),h!==null?(wt(i),Bv(i,h)):(wt(i),$h(i,f,null,s,o))):h?h!==n.memoizedState?(Di(i),wt(i),Bv(i,h)):(wt(i),i.flags&=-16777217):(n=n.memoizedProps,n!==s&&Di(i),wt(i),$h(i,f,n,s,o)),null;case 27:if(ge(i),o=pe.current,f=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==s&&Di(i);else{if(!s){if(i.stateNode===null)throw Error(r(166));return wt(i),null}n=P.current,mo(i)?x0(i):(n=Y1(f,s,o),i.stateNode=n,Di(i))}return wt(i),null;case 5:if(ge(i),f=i.type,n!==null&&i.stateNode!=null)n.memoizedProps!==s&&Di(i);else{if(!s){if(i.stateNode===null)throw Error(r(166));return wt(i),null}if(h=P.current,mo(i))x0(i);else{var y=xu(pe.current);switch(h){case 1:h=y.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:h=y.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":h=y.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":h=y.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":h=y.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof s.is=="string"?y.createElement("select",{is:s.is}):y.createElement("select"),s.multiple?h.multiple=!0:s.size&&(h.size=s.size);break;default:h=typeof s.is=="string"?y.createElement(f,{is:s.is}):y.createElement(f)}}h[Ot]=i,h[gn]=s;e:for(y=i.child;y!==null;){if(y.tag===5||y.tag===6)h.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===i)break e;for(;y.sibling===null;){if(y.return===null||y.return===i)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}i.stateNode=h;e:switch(nn(h,f,s),f){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Di(i)}}return wt(i),$h(i,i.type,n===null?null:n.memoizedProps,i.pendingProps,o),null;case 6:if(n&&i.stateNode!=null)n.memoizedProps!==s&&Di(i);else{if(typeof s!="string"&&i.stateNode===null)throw Error(r(166));if(n=pe.current,mo(i)){if(n=i.stateNode,o=i.memoizedProps,s=null,f=Jt,f!==null)switch(f.tag){case 27:case 5:s=f.memoizedProps}n[Ot]=i,n=!!(n.nodeValue===o||s!==null&&s.suppressHydrationWarning===!0||$1(n.nodeValue,o)),n||ia(i,!0)}else n=xu(n).createTextNode(s),n[Ot]=i,i.stateNode=n}return wt(i),null;case 31:if(o=i.memoizedState,n===null||n.memoizedState!==null){if(s=mo(i),o!==null){if(n===null){if(!s)throw Error(r(318));if(n=i.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(557));n[Ot]=i}else ur(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;wt(i),n=!1}else o=Kf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=o),n=!0;if(!n)return i.flags&256?(Rn(i),i):(Rn(i),null);if((i.flags&128)!==0)throw Error(r(558))}return wt(i),null;case 13:if(s=i.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(f=mo(i),s!==null&&s.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 ur(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;wt(i),f=!1}else f=Kf(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=f),f=!0;if(!f)return i.flags&256?(Rn(i),i):(Rn(i),null)}return Rn(i),(i.flags&128)!==0?(i.lanes=o,i):(o=s!==null,n=n!==null&&n.memoizedState!==null,o&&(s=i.child,f=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(f=s.alternate.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==f&&(s.flags|=2048)),o!==n&&o&&(i.child.flags|=8192),ru(i,i.updateQueue),wt(i),null);case 4:return z(),n===null&&rm(i.stateNode.containerInfo),wt(i),null;case 10:return Mi(i.type),wt(i),null;case 19:if(q(Tt),s=i.memoizedState,s===null)return wt(i),null;if(f=(i.flags&128)!==0,h=s.rendering,h===null)if(f)es(s,!1);else{if(Mt!==0||n!==null&&(n.flags&128)!==0)for(n=i.child;n!==null;){if(h=Gc(n),h!==null){for(i.flags|=128,es(s,!1),n=h.updateQueue,i.updateQueue=n,ru(i,n),i.subtreeFlags=0,n=o,o=i.child;o!==null;)p0(o,n),o=o.sibling;return I(Tt,Tt.current&1|2),et&&Ai(i,s.treeForkCount),i.child}n=n.sibling}s.tail!==null&&yt()>uu&&(i.flags|=128,f=!0,es(s,!1),i.lanes=4194304)}else{if(!f)if(n=Gc(h),n!==null){if(i.flags|=128,f=!0,n=n.updateQueue,i.updateQueue=n,ru(i,n),es(s,!0),s.tail===null&&s.tailMode==="hidden"&&!h.alternate&&!et)return wt(i),null}else 2*yt()-s.renderingStartTime>uu&&o!==536870912&&(i.flags|=128,f=!0,es(s,!1),i.lanes=4194304);s.isBackwards?(h.sibling=i.child,i.child=h):(n=s.last,n!==null?n.sibling=h:i.child=h,s.last=h)}return s.tail!==null?(n=s.tail,s.rendering=n,s.tail=n.sibling,s.renderingStartTime=yt(),n.sibling=null,o=Tt.current,I(Tt,f?o&1|2:o&1),et&&Ai(i,s.treeForkCount),n):(wt(i),null);case 22:case 23:return Rn(i),oh(),s=i.memoizedState!==null,n!==null?n.memoizedState!==null!==s&&(i.flags|=8192):s&&(i.flags|=8192),s?(o&536870912)!==0&&(i.flags&128)===0&&(wt(i),i.subtreeFlags&6&&(i.flags|=8192)):wt(i),o=i.updateQueue,o!==null&&ru(i,o.retryQueue),o=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),s=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(s=i.memoizedState.cachePool.pool),s!==o&&(i.flags|=2048),n!==null&&q(hr),null;case 24:return o=null,n!==null&&(o=n.memoizedState.cache),i.memoizedState.cache!==o&&(i.flags|=2048),Mi(zt),wt(i),null;case 25:return null;case 30:return null}throw Error(r(156,i.tag))}function dN(n,i){switch(Vf(i),i.tag){case 1:return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 3:return Mi(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(Rn(i),i.alternate===null)throw Error(r(340));ur()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 13:if(Rn(i),n=i.memoizedState,n!==null&&n.dehydrated!==null){if(i.alternate===null)throw Error(r(340));ur()}return n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 19:return q(Tt),null;case 4:return z(),null;case 10:return Mi(i.type),null;case 22:case 23:return Rn(i),oh(),n!==null&&q(hr),n=i.flags,n&65536?(i.flags=n&-65537|128,i):null;case 24:return Mi(zt),null;case 25:return null;default:return null}}function qv(n,i){switch(Vf(i),i.tag){case 3:Mi(zt),z();break;case 26:case 27:case 5:ge(i);break;case 4:z();break;case 31:i.memoizedState!==null&&Rn(i);break;case 13:Rn(i);break;case 19:q(Tt);break;case 10:Mi(i.type);break;case 22:case 23:Rn(i),oh(),n!==null&&q(hr);break;case 24:Mi(zt)}}function ts(n,i){try{var o=i.updateQueue,s=o!==null?o.lastEffect:null;if(s!==null){var f=s.next;o=f;do{if((o.tag&n)===n){s=void 0;var h=o.create,y=o.inst;s=h(),y.destroy=s}o=o.next}while(o!==f)}}catch(S){ft(i,i.return,S)}}function ua(n,i,o){try{var s=i.updateQueue,f=s!==null?s.lastEffect:null;if(f!==null){var h=f.next;s=h;do{if((s.tag&n)===n){var y=s.inst,S=y.destroy;if(S!==void 0){y.destroy=void 0,f=i;var U=o,W=S;try{W()}catch(de){ft(f,U,de)}}}s=s.next}while(s!==h)}}catch(de){ft(i,i.return,de)}}function Fv(n){var i=n.updateQueue;if(i!==null){var o=n.stateNode;try{T0(i,o)}catch(s){ft(n,n.return,s)}}}function Pv(n,i,o){o.props=br(n.type,n.memoizedProps),o.state=n.memoizedState;try{o.componentWillUnmount()}catch(s){ft(n,i,s)}}function ns(n,i){try{var o=n.ref;if(o!==null){switch(n.tag){case 26:case 27:case 5:var s=n.stateNode;break;case 30:s=n.stateNode;break;default:s=n.stateNode}typeof o=="function"?n.refCleanup=o(s):o.current=s}}catch(f){ft(n,i,f)}}function hi(n,i){var o=n.ref,s=n.refCleanup;if(o!==null)if(typeof s=="function")try{s()}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 Vv(n){var i=n.type,o=n.memoizedProps,s=n.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":o.autoFocus&&s.focus();break e;case"img":o.src?s.src=o.src:o.srcSet&&(s.srcset=o.srcSet)}}catch(f){ft(n,n.return,f)}}function Uh(n,i,o){try{var s=n.stateNode;TN(s,n.type,o,i),s[gn]=i}catch(f){ft(n,n.return,f)}}function Gv(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&ya(n.type)||n.tag===4}function Ih(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Gv(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&&ya(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 Hh(n,i,o){var s=n.tag;if(s===5||s===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=_i));else if(s!==4&&(s===27&&ya(n.type)&&(o=n.stateNode,i=null),n=n.child,n!==null))for(Hh(n,i,o),n=n.sibling;n!==null;)Hh(n,i,o),n=n.sibling}function ou(n,i,o){var s=n.tag;if(s===5||s===6)n=n.stateNode,i?o.insertBefore(n,i):o.appendChild(n);else if(s!==4&&(s===27&&ya(n.type)&&(o=n.stateNode),n=n.child,n!==null))for(ou(n,i,o),n=n.sibling;n!==null;)ou(n,i,o),n=n.sibling}function Kv(n){var i=n.stateNode,o=n.memoizedProps;try{for(var s=n.type,f=i.attributes;f.length;)i.removeAttributeNode(f[0]);nn(i,s,o),i[Ot]=n,i[gn]=o}catch(h){ft(n,n.return,h)}}var Li=!1,It=!1,Bh=!1,Yv=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function fN(n,i){if(n=n.containerInfo,sm=Ou,n=o0(n),Df(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var s=o.getSelection&&o.getSelection();if(s&&s.rangeCount!==0){o=s.anchorNode;var f=s.anchorOffset,h=s.focusNode;s=s.focusOffset;try{o.nodeType,h.nodeType}catch{o=null;break e}var y=0,S=-1,U=-1,W=0,de=0,he=n,J=null;t:for(;;){for(var oe;he!==o||f!==0&&he.nodeType!==3||(S=y+f),he!==h||s!==0&&he.nodeType!==3||(U=y+s),he.nodeType===3&&(y+=he.nodeValue.length),(oe=he.firstChild)!==null;)J=he,he=oe;for(;;){if(he===n)break t;if(J===o&&++W===f&&(S=y),J===h&&++de===s&&(U=y),(oe=he.nextSibling)!==null)break;he=J,J=he.parentNode}he=oe}o=S===-1||U===-1?null:{start:S,end:U}}else o=null}o=o||{start:0,end:0}}else o=null;for(cm={focusedElem:n,selectionRange:o},Ou=!1,Qt=i;Qt!==null;)if(i=Qt,n=i.child,(i.subtreeFlags&1028)!==0&&n!==null)n.return=i,Qt=n;else for(;Qt!==null;){switch(i=Qt,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,s=o.stateNode;try{var Ae=br(o.type,f);n=s.getSnapshotBeforeUpdate(Ae,h),s.__reactInternalSnapshotBeforeUpdate=n}catch(Ie){ft(o,o.return,Ie)}}break;case 3:if((n&1024)!==0){if(n=i.stateNode.containerInfo,o=n.nodeType,o===9)fm(n);else if(o===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":fm(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,Qt=n;break}Qt=i.return}}function Qv(n,i,o){var s=o.flags;switch(o.tag){case 0:case 11:case 15:$i(n,o),s&4&&ts(5,o);break;case 1:if($i(n,o),s&4)if(n=o.stateNode,i===null)try{n.componentDidMount()}catch(y){ft(o,o.return,y)}else{var f=br(o.type,i.memoizedProps);i=i.memoizedState;try{n.componentDidUpdate(f,i,n.__reactInternalSnapshotBeforeUpdate)}catch(y){ft(o,o.return,y)}}s&64&&Fv(o),s&512&&ns(o,o.return);break;case 3:if($i(n,o),s&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{T0(n,i)}catch(y){ft(o,o.return,y)}}break;case 27:i===null&&s&4&&Kv(o);case 26:case 5:$i(n,o),i===null&&s&4&&Vv(o),s&512&&ns(o,o.return);break;case 12:$i(n,o);break;case 31:$i(n,o),s&4&&Wv(n,o);break;case 13:$i(n,o),s&4&&Jv(n,o),s&64&&(n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(o=wN.bind(null,o),BN(n,o))));break;case 22:if(s=o.memoizedState!==null||Li,!s){i=i!==null&&i.memoizedState!==null||It,f=Li;var h=It;Li=s,(It=i)&&!h?Ui(n,o,(o.subtreeFlags&8772)!==0):$i(n,o),Li=f,It=h}break;case 30:break;default:$i(n,o)}}function Xv(n){var i=n.alternate;i!==null&&(n.alternate=null,Xv(i)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(i=n.stateNode,i!==null&&yf(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 Et=null,bn=!1;function zi(n,i,o){for(o=o.child;o!==null;)Zv(n,i,o),o=o.sibling}function Zv(n,i,o){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount(Vt,o)}catch{}switch(o.tag){case 26:It||hi(o,i),zi(n,i,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:It||hi(o,i);var s=Et,f=bn;ya(o.type)&&(Et=o.stateNode,bn=!1),zi(n,i,o),ds(o.stateNode),Et=s,bn=f;break;case 5:It||hi(o,i);case 6:if(s=Et,f=bn,Et=null,zi(n,i,o),Et=s,bn=f,Et!==null)if(bn)try{(Et.nodeType===9?Et.body:Et.nodeName==="HTML"?Et.ownerDocument.body:Et).removeChild(o.stateNode)}catch(h){ft(o,i,h)}else try{Et.removeChild(o.stateNode)}catch(h){ft(o,i,h)}break;case 18:Et!==null&&(bn?(n=Et,F1(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,o.stateNode),Lo(n)):F1(Et,o.stateNode));break;case 4:s=Et,f=bn,Et=o.stateNode.containerInfo,bn=!0,zi(n,i,o),Et=s,bn=f;break;case 0:case 11:case 14:case 15:ua(2,o,i),It||ua(4,o,i),zi(n,i,o);break;case 1:It||(hi(o,i),s=o.stateNode,typeof s.componentWillUnmount=="function"&&Pv(o,i,s)),zi(n,i,o);break;case 21:zi(n,i,o);break;case 22:It=(s=It)||o.memoizedState!==null,zi(n,i,o),It=s;break;default:zi(n,i,o)}}function Wv(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Lo(n)}catch(o){ft(i,i.return,o)}}}function Jv(n,i){if(i.memoizedState===null&&(n=i.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Lo(n)}catch(o){ft(i,i.return,o)}}function hN(n){switch(n.tag){case 31:case 13:case 19:var i=n.stateNode;return i===null&&(i=n.stateNode=new Yv),i;case 22:return n=n.stateNode,i=n._retryCache,i===null&&(i=n._retryCache=new Yv),i;default:throw Error(r(435,n.tag))}}function lu(n,i){var o=hN(n);i.forEach(function(s){if(!o.has(s)){o.add(s);var f=kN.bind(null,n,s);s.then(f,f)}})}function vn(n,i){var o=i.deletions;if(o!==null)for(var s=0;s<o.length;s++){var f=o[s],h=n,y=i,S=y;e:for(;S!==null;){switch(S.tag){case 27:if(ya(S.type)){Et=S.stateNode,bn=!1;break e}break;case 5:Et=S.stateNode,bn=!1;break e;case 3:case 4:Et=S.stateNode.containerInfo,bn=!0;break e}S=S.return}if(Et===null)throw Error(r(160));Zv(h,y,f),Et=null,bn=!1,h=f.alternate,h!==null&&(h.return=null),f.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)e1(i,n),i=i.sibling}var ai=null;function e1(n,i){var o=n.alternate,s=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:vn(i,n),xn(n),s&4&&(ua(3,n,n.return),ts(3,n),ua(5,n,n.return));break;case 1:vn(i,n),xn(n),s&512&&(It||o===null||hi(o,o.return)),s&64&&Li&&(n=n.updateQueue,n!==null&&(s=n.callbacks,s!==null&&(o=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=o===null?s:o.concat(s))));break;case 26:var f=ai;if(vn(i,n),xn(n),s&512&&(It||o===null||hi(o,o.return)),s&4){var h=o!==null?o.memoizedState:null;if(s=n.memoizedState,o===null)if(s===null)if(n.stateNode===null){e:{s=n.type,o=n.memoizedProps,f=f.ownerDocument||f;t:switch(s){case"title":h=f.getElementsByTagName("title")[0],(!h||h[Nl]||h[Ot]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=f.createElement(s),f.head.insertBefore(h,f.querySelector("head > title"))),nn(h,s,o),h[Ot]=n,Yt(h),s=h;break e;case"link":var y=ex("link","href",f).get(s+(o.href||""));if(y){for(var S=0;S<y.length;S++)if(h=y[S],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)){y.splice(S,1);break t}}h=f.createElement(s),nn(h,s,o),f.head.appendChild(h);break;case"meta":if(y=ex("meta","content",f).get(s+(o.content||""))){for(S=0;S<y.length;S++)if(h=y[S],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)){y.splice(S,1);break t}}h=f.createElement(s),nn(h,s,o),f.head.appendChild(h);break;default:throw Error(r(468,s))}h[Ot]=n,Yt(h),s=h}n.stateNode=s}else tx(f,n.type,n.stateNode);else n.stateNode=J1(f,s,n.memoizedProps);else h!==s?(h===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):h.count--,s===null?tx(f,n.type,n.stateNode):J1(f,s,n.memoizedProps)):s===null&&n.stateNode!==null&&Uh(n,n.memoizedProps,o.memoizedProps)}break;case 27:vn(i,n),xn(n),s&512&&(It||o===null||hi(o,o.return)),o!==null&&s&4&&Uh(n,n.memoizedProps,o.memoizedProps);break;case 5:if(vn(i,n),xn(n),s&512&&(It||o===null||hi(o,o.return)),n.flags&32){f=n.stateNode;try{io(f,"")}catch(Ae){ft(n,n.return,Ae)}}s&4&&n.stateNode!=null&&(f=n.memoizedProps,Uh(n,f,o!==null?o.memoizedProps:f)),s&1024&&(Bh=!0);break;case 6:if(vn(i,n),xn(n),s&4){if(n.stateNode===null)throw Error(r(162));s=n.memoizedProps,o=n.stateNode;try{o.nodeValue=s}catch(Ae){ft(n,n.return,Ae)}}break;case 3:if(Su=null,f=ai,ai=wu(i.containerInfo),vn(i,n),ai=f,xn(n),s&4&&o!==null&&o.memoizedState.isDehydrated)try{Lo(i.containerInfo)}catch(Ae){ft(n,n.return,Ae)}Bh&&(Bh=!1,t1(n));break;case 4:s=ai,ai=wu(n.stateNode.containerInfo),vn(i,n),xn(n),ai=s;break;case 12:vn(i,n),xn(n);break;case 31:vn(i,n),xn(n),s&4&&(s=n.updateQueue,s!==null&&(n.updateQueue=null,lu(n,s)));break;case 13:vn(i,n),xn(n),n.child.flags&8192&&n.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(cu=yt()),s&4&&(s=n.updateQueue,s!==null&&(n.updateQueue=null,lu(n,s)));break;case 22:f=n.memoizedState!==null;var U=o!==null&&o.memoizedState!==null,W=Li,de=It;if(Li=W||f,It=de||U,vn(i,n),It=de,Li=W,xn(n),s&8192)e:for(i=n.stateNode,i._visibility=f?i._visibility&-2:i._visibility|1,f&&(o===null||U||Li||It||vr(n)),o=null,i=n;;){if(i.tag===5||i.tag===26){if(o===null){U=o=i;try{if(h=U.stateNode,f)y=h.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{S=U.stateNode;var he=U.memoizedProps.style,J=he!=null&&he.hasOwnProperty("display")?he.display:null;S.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 oe=U.stateNode;f?P1(oe,!0):P1(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}s&4&&(s=n.updateQueue,s!==null&&(o=s.retryQueue,o!==null&&(s.retryQueue=null,lu(n,o))));break;case 19:vn(i,n),xn(n),s&4&&(s=n.updateQueue,s!==null&&(n.updateQueue=null,lu(n,s)));break;case 30:break;case 21:break;default:vn(i,n),xn(n)}}function xn(n){var i=n.flags;if(i&2){try{for(var o,s=n.return;s!==null;){if(Gv(s)){o=s;break}s=s.return}if(o==null)throw Error(r(160));switch(o.tag){case 27:var f=o.stateNode,h=Ih(n);ou(n,h,f);break;case 5:var y=o.stateNode;o.flags&32&&(io(y,""),o.flags&=-33);var S=Ih(n);ou(n,S,y);break;case 3:case 4:var U=o.stateNode.containerInfo,W=Ih(n);Hh(n,W,U);break;default:throw Error(r(161))}}catch(de){ft(n,n.return,de)}n.flags&=-3}i&4096&&(n.flags&=-4097)}function t1(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var i=n;t1(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),n=n.sibling}}function $i(n,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Qv(n,i.alternate,i),i=i.sibling}function vr(n){for(n=n.child;n!==null;){var i=n;switch(i.tag){case 0:case 11:case 14:case 15:ua(4,i,i.return),vr(i);break;case 1:hi(i,i.return);var o=i.stateNode;typeof o.componentWillUnmount=="function"&&Pv(i,i.return,o),vr(i);break;case 27:ds(i.stateNode);case 26:case 5:hi(i,i.return),vr(i);break;case 22:i.memoizedState===null&&vr(i);break;case 30:vr(i);break;default:vr(i)}n=n.sibling}}function Ui(n,i,o){for(o=o&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var s=i.alternate,f=n,h=i,y=h.flags;switch(h.tag){case 0:case 11:case 15:Ui(f,h,o),ts(4,h);break;case 1:if(Ui(f,h,o),s=h,f=s.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(W){ft(s,s.return,W)}if(s=h,f=s.updateQueue,f!==null){var S=s.stateNode;try{var U=f.shared.hiddenCallbacks;if(U!==null)for(f.shared.hiddenCallbacks=null,f=0;f<U.length;f++)R0(U[f],S)}catch(W){ft(s,s.return,W)}}o&&y&64&&Fv(h),ns(h,h.return);break;case 27:Kv(h);case 26:case 5:Ui(f,h,o),o&&s===null&&y&4&&Vv(h),ns(h,h.return);break;case 12:Ui(f,h,o);break;case 31:Ui(f,h,o),o&&y&4&&Wv(f,h);break;case 13:Ui(f,h,o),o&&y&4&&Jv(f,h);break;case 22:h.memoizedState===null&&Ui(f,h,o),ns(h,h.return);break;case 30:break;default:Ui(f,h,o)}i=i.sibling}}function qh(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&&ql(o))}function Fh(n,i){n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&ql(n))}function ri(n,i,o,s){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)n1(n,i,o,s),i=i.sibling}function n1(n,i,o,s){var f=i.flags;switch(i.tag){case 0:case 11:case 15:ri(n,i,o,s),f&2048&&ts(9,i);break;case 1:ri(n,i,o,s);break;case 3:ri(n,i,o,s),f&2048&&(n=null,i.alternate!==null&&(n=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==n&&(i.refCount++,n!=null&&ql(n)));break;case 12:if(f&2048){ri(n,i,o,s),n=i.stateNode;try{var h=i.memoizedProps,y=h.id,S=h.onPostCommit;typeof S=="function"&&S(y,i.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(U){ft(i,i.return,U)}}else ri(n,i,o,s);break;case 31:ri(n,i,o,s);break;case 13:ri(n,i,o,s);break;case 23:break;case 22:h=i.stateNode,y=i.alternate,i.memoizedState!==null?h._visibility&2?ri(n,i,o,s):is(n,i):h._visibility&2?ri(n,i,o,s):(h._visibility|=2,Eo(n,i,o,s,(i.subtreeFlags&10256)!==0||!1)),f&2048&&qh(y,i);break;case 24:ri(n,i,o,s),f&2048&&Fh(i.alternate,i);break;default:ri(n,i,o,s)}}function Eo(n,i,o,s,f){for(f=f&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var h=n,y=i,S=o,U=s,W=y.flags;switch(y.tag){case 0:case 11:case 15:Eo(h,y,S,U,f),ts(8,y);break;case 23:break;case 22:var de=y.stateNode;y.memoizedState!==null?de._visibility&2?Eo(h,y,S,U,f):is(h,y):(de._visibility|=2,Eo(h,y,S,U,f)),f&&W&2048&&qh(y.alternate,y);break;case 24:Eo(h,y,S,U,f),f&&W&2048&&Fh(y.alternate,y);break;default:Eo(h,y,S,U,f)}i=i.sibling}}function is(n,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var o=n,s=i,f=s.flags;switch(s.tag){case 22:is(o,s),f&2048&&qh(s.alternate,s);break;case 24:is(o,s),f&2048&&Fh(s.alternate,s);break;default:is(o,s)}i=i.sibling}}var as=8192;function _o(n,i,o){if(n.subtreeFlags&as)for(n=n.child;n!==null;)i1(n,i,o),n=n.sibling}function i1(n,i,o){switch(n.tag){case 26:_o(n,i,o),n.flags&as&&n.memoizedState!==null&&JN(o,ai,n.memoizedState,n.memoizedProps);break;case 5:_o(n,i,o);break;case 3:case 4:var s=ai;ai=wu(n.stateNode.containerInfo),_o(n,i,o),ai=s;break;case 22:n.memoizedState===null&&(s=n.alternate,s!==null&&s.memoizedState!==null?(s=as,as=16777216,_o(n,i,o),as=s):_o(n,i,o));break;default:_o(n,i,o)}}function a1(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 rs(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var s=i[o];Qt=s,o1(s,n)}a1(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)r1(n),n=n.sibling}function r1(n){switch(n.tag){case 0:case 11:case 15:rs(n),n.flags&2048&&ua(9,n,n.return);break;case 3:rs(n);break;case 12:rs(n);break;case 22:var i=n.stateNode;n.memoizedState!==null&&i._visibility&2&&(n.return===null||n.return.tag!==13)?(i._visibility&=-3,su(n)):rs(n);break;default:rs(n)}}function su(n){var i=n.deletions;if((n.flags&16)!==0){if(i!==null)for(var o=0;o<i.length;o++){var s=i[o];Qt=s,o1(s,n)}a1(n)}for(n=n.child;n!==null;){switch(i=n,i.tag){case 0:case 11:case 15:ua(8,i,i.return),su(i);break;case 22:o=i.stateNode,o._visibility&2&&(o._visibility&=-3,su(i));break;default:su(i)}n=n.sibling}}function o1(n,i){for(;Qt!==null;){var o=Qt;switch(o.tag){case 0:case 11:case 15:ua(8,o,i);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var s=o.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:ql(o.memoizedState.cache)}if(s=o.child,s!==null)s.return=o,Qt=s;else e:for(o=n;Qt!==null;){s=Qt;var f=s.sibling,h=s.return;if(Xv(s),s===o){Qt=null;break e}if(f!==null){f.return=h,Qt=f;break e}Qt=h}}}var mN={getCacheForType:function(n){var i=en(zt),o=i.data.get(n);return o===void 0&&(o=n(),i.data.set(n,o)),o},cacheSignal:function(){return en(zt).controller.signal}},pN=typeof WeakMap=="function"?WeakMap:Map,lt=0,bt=null,Ye=null,Ze=0,dt=0,Tn=null,da=!1,jo=!1,Ph=!1,Ii=0,Mt=0,fa=0,xr=0,Vh=0,Dn=0,Oo=0,os=null,wn=null,Gh=!1,cu=0,l1=0,uu=1/0,du=null,ha=null,qt=0,ma=null,Ao=null,Hi=0,Kh=0,Yh=null,s1=null,ls=0,Qh=null;function Ln(){return(lt&2)!==0&&Ze!==0?Ze&-Ze:M.T!==null?tm():At()}function c1(){if(Dn===0)if((Ze&536870912)===0||et){var n=kt;kt<<=1,(kt&3932160)===0&&(kt=262144),Dn=n}else Dn=536870912;return n=Cn.current,n!==null&&(n.flags|=32),Dn}function kn(n,i,o){(n===bt&&(dt===2||dt===9)||n.cancelPendingCommit!==null)&&(No(n,0),pa(n,Ze,Dn,!1)),ni(n,o),((lt&2)===0||n!==bt)&&(n===bt&&((lt&2)===0&&(xr|=o),Mt===4&&pa(n,Ze,Dn,!1)),mi(n))}function u1(n,i,o){if((lt&6)!==0)throw Error(r(327));var s=!o&&(i&127)===0&&(i&n.expiredLanes)===0||Gt(n,i),f=s?bN(n,i):Zh(n,i,!0),h=s;do{if(f===0){jo&&!s&&pa(n,i,0,!1);break}else{if(o=n.current.alternate,h&&!gN(o)){f=Zh(n,i,!1),h=!1;continue}if(f===2){if(h=i,n.errorRecoveryDisabledLanes&h)var y=0;else y=n.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){i=y;e:{var S=n;f=os;var U=S.current.memoizedState.isDehydrated;if(U&&(No(S,y).flags|=256),y=Zh(S,y,!1),y!==2){if(Ph&&!U){S.errorRecoveryDisabledLanes|=h,xr|=h,f=4;break e}h=wn,wn=f,h!==null&&(wn===null?wn=h:wn.push.apply(wn,h))}f=y}if(h=!1,f!==2)continue}}if(f===1){No(n,0),pa(n,i,0,!0);break}e:{switch(s=n,h=f,h){case 0:case 1:throw Error(r(345));case 4:if((i&4194048)!==i)break;case 6:pa(s,i,Dn,!da);break e;case 2:wn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((i&62914560)===i&&(f=cu+300-yt(),10<f)){if(pa(s,i,Dn,!da),Bt(s,0,!0)!==0)break e;Hi=i,s.timeoutHandle=B1(d1.bind(null,s,o,wn,du,Gh,i,Dn,xr,Oo,da,h,"Throttled",-0,0),f);break e}d1(s,o,wn,du,Gh,i,Dn,xr,Oo,da,h,null,-0,0)}}break}while(!0);mi(n)}function d1(n,i,o,s,f,h,y,S,U,W,de,he,J,oe){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:_i},i1(i,h,he);var Ae=(h&62914560)===h?cu-yt():(h&4194048)===h?l1-yt():0;if(Ae=eM(he,Ae),Ae!==null){Hi=h,n.cancelPendingCommit=Ae(v1.bind(null,n,i,h,o,s,f,y,S,U,de,he,null,J,oe)),pa(n,h,y,!W);return}}v1(n,i,h,o,s,f,y,S,U)}function gN(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 s=0;s<o.length;s++){var f=o[s],h=f.getSnapshot;f=f.value;try{if(!Nn(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 pa(n,i,o,s){i&=~Vh,i&=~xr,n.suspendedLanes|=i,n.pingedLanes&=~i,s&&(n.warmLanes|=i),s=n.expirationTimes;for(var f=i;0<f;){var h=31-be(f),y=1<<h;s[h]=-1,f&=~y}o!==0&&Xr(n,o,i)}function fu(){return(lt&6)===0?(ss(0),!1):!0}function Xh(){if(Ye!==null){if(dt===0)var n=Ye.return;else n=Ye,Ni=dr=null,fh(n),vo=null,Pl=0,n=Ye;for(;n!==null;)qv(n.alternate,n),n=n.return;Ye=null}}function No(n,i){var o=n.timeoutHandle;o!==-1&&(n.timeoutHandle=-1,zN(o)),o=n.cancelPendingCommit,o!==null&&(n.cancelPendingCommit=null,o()),Hi=0,Xh(),bt=n,Ye=o=Oi(n.current,null),Ze=i,dt=0,Tn=null,da=!1,jo=Gt(n,i),Ph=!1,Oo=Dn=Vh=xr=fa=Mt=0,wn=os=null,Gh=!1,(i&8)!==0&&(i|=i&32);var s=n.entangledLanes;if(s!==0)for(n=n.entanglements,s&=i;0<s;){var f=31-be(s),h=1<<f;i|=n[f],s&=~h}return Ii=i,Tc(),o}function f1(n,i){Fe=null,M.H=Wl,i===bo||i===Bc?(i=A0(),dt=3):i===eh?(i=A0(),dt=4):dt=i===Ah?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Tn=i,Ye===null&&(Mt=1,tu(n,Gn(i,n.current)))}function h1(){var n=Cn.current;return n===null?!0:(Ze&4194048)===Ze?Xn===null:(Ze&62914560)===Ze||(Ze&536870912)!==0?n===Xn:!1}function m1(){var n=M.H;return M.H=Wl,n===null?Wl:n}function p1(){var n=M.A;return M.A=mN,n}function hu(){Mt=4,da||(Ze&4194048)!==Ze&&Cn.current!==null||(jo=!0),(fa&134217727)===0&&(xr&134217727)===0||bt===null||pa(bt,Ze,Dn,!1)}function Zh(n,i,o){var s=lt;lt|=2;var f=m1(),h=p1();(bt!==n||Ze!==i)&&(du=null,No(n,i)),i=!1;var y=Mt;e:do try{if(dt!==0&&Ye!==null){var S=Ye,U=Tn;switch(dt){case 8:Xh(),y=6;break e;case 3:case 2:case 9:case 6:Cn.current===null&&(i=!0);var W=dt;if(dt=0,Tn=null,Mo(n,S,U,W),o&&jo){y=0;break e}break;default:W=dt,dt=0,Tn=null,Mo(n,S,U,W)}}yN(),y=Mt;break}catch(de){f1(n,de)}while(!0);return i&&n.shellSuspendCounter++,Ni=dr=null,lt=s,M.H=f,M.A=h,Ye===null&&(bt=null,Ze=0,Tc()),y}function yN(){for(;Ye!==null;)g1(Ye)}function bN(n,i){var o=lt;lt|=2;var s=m1(),f=p1();bt!==n||Ze!==i?(du=null,uu=yt()+500,No(n,i)):jo=Gt(n,i);e:do try{if(dt!==0&&Ye!==null){i=Ye;var h=Tn;t:switch(dt){case 1:dt=0,Tn=null,Mo(n,i,h,1);break;case 2:case 9:if(j0(h)){dt=0,Tn=null,y1(i);break}i=function(){dt!==2&&dt!==9||bt!==n||(dt=7),mi(n)},h.then(i,i);break e;case 3:dt=7;break e;case 4:dt=5;break e;case 7:j0(h)?(dt=0,Tn=null,y1(i)):(dt=0,Tn=null,Mo(n,i,h,7));break;case 5:var y=null;switch(Ye.tag){case 26:y=Ye.memoizedState;case 5:case 27:var S=Ye;if(y?nx(y):S.stateNode.complete){dt=0,Tn=null;var U=S.sibling;if(U!==null)Ye=U;else{var W=S.return;W!==null?(Ye=W,mu(W)):Ye=null}break t}}dt=0,Tn=null,Mo(n,i,h,5);break;case 6:dt=0,Tn=null,Mo(n,i,h,6);break;case 8:Xh(),Mt=6;break e;default:throw Error(r(462))}}vN();break}catch(de){f1(n,de)}while(!0);return Ni=dr=null,M.H=s,M.A=f,lt=o,Ye!==null?0:(bt=null,Ze=0,Tc(),Mt)}function vN(){for(;Ye!==null&&!On();)g1(Ye)}function g1(n){var i=Hv(n.alternate,n,Ii);n.memoizedProps=n.pendingProps,i===null?mu(n):Ye=i}function y1(n){var i=n,o=i.alternate;switch(i.tag){case 15:case 0:i=Dv(o,i,i.pendingProps,i.type,void 0,Ze);break;case 11:i=Dv(o,i,i.pendingProps,i.type.render,i.ref,Ze);break;case 5:fh(i);default:qv(o,i),i=Ye=p0(i,Ii),i=Hv(o,i,Ii)}n.memoizedProps=n.pendingProps,i===null?mu(n):Ye=i}function Mo(n,i,o,s){Ni=dr=null,fh(i),vo=null,Pl=0;var f=i.return;try{if(lN(n,f,i,o,Ze)){Mt=1,tu(n,Gn(o,n.current)),Ye=null;return}}catch(h){if(f!==null)throw Ye=f,h;Mt=1,tu(n,Gn(o,n.current)),Ye=null;return}i.flags&32768?(et||s===1?n=!0:jo||(Ze&536870912)!==0?n=!1:(da=n=!0,(s===2||s===9||s===3||s===6)&&(s=Cn.current,s!==null&&s.tag===13&&(s.flags|=16384))),b1(i,n)):mu(i)}function mu(n){var i=n;do{if((i.flags&32768)!==0){b1(i,da);return}n=i.return;var o=uN(i.alternate,i,Ii);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 b1(n,i){do{var o=dN(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 v1(n,i,o,s,f,h,y,S,U){n.cancelPendingCommit=null;do pu();while(qt!==0);if((lt&6)!==0)throw Error(r(327));if(i!==null){if(i===n.current)throw Error(r(177));if(h=i.lanes|i.childLanes,h|=If,ui(n,o,h,y,S,U),n===bt&&(Ye=bt=null,Ze=0),Ao=i,ma=n,Hi=o,Kh=h,Yh=f,s1=s,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,SN(we,function(){return E1(),null})):(n.callbackNode=null,n.callbackPriority=0),s=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||s){s=M.T,M.T=null,f=V.p,V.p=2,y=lt,lt|=4;try{fN(n,i,o)}finally{lt=y,V.p=f,M.T=s}}qt=1,x1(),w1(),k1()}}function x1(){if(qt===1){qt=0;var n=ma,i=Ao,o=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||o){o=M.T,M.T=null;var s=V.p;V.p=2;var f=lt;lt|=4;try{e1(i,n);var h=cm,y=o0(n.containerInfo),S=h.focusedElem,U=h.selectionRange;if(y!==S&&S&&S.ownerDocument&&r0(S.ownerDocument.documentElement,S)){if(U!==null&&Df(S)){var W=U.start,de=U.end;if(de===void 0&&(de=W),"selectionStart"in S)S.selectionStart=W,S.selectionEnd=Math.min(de,S.value.length);else{var he=S.ownerDocument||document,J=he&&he.defaultView||window;if(J.getSelection){var oe=J.getSelection(),Ae=S.textContent.length,Ie=Math.min(U.start,Ae),gt=U.end===void 0?Ie:Math.min(U.end,Ae);!oe.extend&&Ie>gt&&(y=gt,gt=Ie,Ie=y);var G=a0(S,Ie),B=a0(S,gt);if(G&&B&&(oe.rangeCount!==1||oe.anchorNode!==G.node||oe.anchorOffset!==G.offset||oe.focusNode!==B.node||oe.focusOffset!==B.offset)){var Z=he.createRange();Z.setStart(G.node,G.offset),oe.removeAllRanges(),Ie>gt?(oe.addRange(Z),oe.extend(B.node,B.offset)):(Z.setEnd(B.node,B.offset),oe.addRange(Z))}}}}for(he=[],oe=S;oe=oe.parentNode;)oe.nodeType===1&&he.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<he.length;S++){var fe=he[S];fe.element.scrollLeft=fe.left,fe.element.scrollTop=fe.top}}Ou=!!sm,cm=sm=null}finally{lt=f,V.p=s,M.T=o}}n.current=i,qt=2}}function w1(){if(qt===2){qt=0;var n=ma,i=Ao,o=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||o){o=M.T,M.T=null;var s=V.p;V.p=2;var f=lt;lt|=4;try{Qv(n,i.alternate,i)}finally{lt=f,V.p=s,M.T=o}}qt=3}}function k1(){if(qt===4||qt===3){qt=0,cn();var n=ma,i=Ao,o=Hi,s=s1;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?qt=5:(qt=0,Ao=ma=null,S1(n,n.pendingLanes));var f=n.pendingLanes;if(f===0&&(ha=null),Pe(o),i=i.stateNode,ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot(Vt,i,void 0,(i.current.flags&128)===128)}catch{}if(s!==null){i=M.T,f=V.p,V.p=2,M.T=null;try{for(var h=n.onRecoverableError,y=0;y<s.length;y++){var S=s[y];h(S.value,{componentStack:S.stack})}}finally{M.T=i,V.p=f}}(Hi&3)!==0&&pu(),mi(n),f=n.pendingLanes,(o&261930)!==0&&(f&42)!==0?n===Qh?ls++:(ls=0,Qh=n):ls=0,ss(0)}}function S1(n,i){(n.pooledCacheLanes&=i)===0&&(i=n.pooledCache,i!=null&&(n.pooledCache=null,ql(i)))}function pu(){return x1(),w1(),k1(),E1()}function E1(){if(qt!==5)return!1;var n=ma,i=Kh;Kh=0;var o=Pe(Hi),s=M.T,f=V.p;try{V.p=32>o?32:o,M.T=null,o=Yh,Yh=null;var h=ma,y=Hi;if(qt=0,Ao=ma=null,Hi=0,(lt&6)!==0)throw Error(r(331));var S=lt;if(lt|=4,r1(h.current),n1(h,h.current,y,o),lt=S,ss(0,!1),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot(Vt,h)}catch{}return!0}finally{V.p=f,M.T=s,S1(n,i)}}function _1(n,i,o){i=Gn(o,i),i=Oh(n.stateNode,i,2),n=la(n,i,2),n!==null&&(ni(n,2),mi(n))}function ft(n,i,o){if(n.tag===3)_1(n,n,o);else for(;i!==null;){if(i.tag===3){_1(i,n,o);break}else if(i.tag===1){var s=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ha===null||!ha.has(s))){n=Gn(o,n),o=jv(2),s=la(i,o,2),s!==null&&(Ov(o,s,i,n),ni(s,2),mi(s));break}}i=i.return}}function Wh(n,i,o){var s=n.pingCache;if(s===null){s=n.pingCache=new pN;var f=new Set;s.set(i,f)}else f=s.get(i),f===void 0&&(f=new Set,s.set(i,f));f.has(o)||(Ph=!0,f.add(o),n=xN.bind(null,n,i,o),i.then(n,n))}function xN(n,i,o){var s=n.pingCache;s!==null&&s.delete(i),n.pingedLanes|=n.suspendedLanes&o,n.warmLanes&=~o,bt===n&&(Ze&o)===o&&(Mt===4||Mt===3&&(Ze&62914560)===Ze&&300>yt()-cu?(lt&2)===0&&No(n,0):Vh|=o,Oo===Ze&&(Oo=0)),mi(n)}function j1(n,i){i===0&&(i=An()),n=sr(n,i),n!==null&&(ni(n,i),mi(n))}function wN(n){var i=n.memoizedState,o=0;i!==null&&(o=i.retryLane),j1(n,o)}function kN(n,i){var o=0;switch(n.tag){case 31:case 13:var s=n.stateNode,f=n.memoizedState;f!==null&&(o=f.retryLane);break;case 19:s=n.stateNode;break;case 22:s=n.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(i),j1(n,o)}function SN(n,i){return st(n,i)}var gu=null,Co=null,Jh=!1,yu=!1,em=!1,ga=0;function mi(n){n!==Co&&n.next===null&&(Co===null?gu=Co=n:Co=Co.next=n),yu=!0,Jh||(Jh=!0,_N())}function ss(n,i){if(!em&&yu){em=!0;do for(var o=!1,s=gu;s!==null;){if(n!==0){var f=s.pendingLanes;if(f===0)var h=0;else{var y=s.suspendedLanes,S=s.pingedLanes;h=(1<<31-be(42|n)+1)-1,h&=f&~(y&~S),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(o=!0,M1(s,h))}else h=Ze,h=Bt(s,s===bt?h:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(h&3)===0||Gt(s,h)||(o=!0,M1(s,h));s=s.next}while(o);em=!1}}function EN(){O1()}function O1(){yu=Jh=!1;var n=0;ga!==0&&LN()&&(n=ga);for(var i=yt(),o=null,s=gu;s!==null;){var f=s.next,h=A1(s,i);h===0?(s.next=null,o===null?gu=f:o.next=f,f===null&&(Co=o)):(o=s,(n!==0||(h&3)!==0)&&(yu=!0)),s=f}qt!==0&&qt!==5||ss(n),ga!==0&&(ga=0)}function A1(n,i){for(var o=n.suspendedLanes,s=n.pingedLanes,f=n.expirationTimes,h=n.pendingLanes&-62914561;0<h;){var y=31-be(h),S=1<<y,U=f[y];U===-1?((S&o)===0||(S&s)!==0)&&(f[y]=Kt(S,i)):U<=i&&(n.expiredLanes|=S),h&=~S}if(i=bt,o=Ze,o=Bt(n,n===i?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),s=n.callbackNode,o===0||n===i&&(dt===2||dt===9)||n.cancelPendingCommit!==null)return s!==null&&s!==null&&Bn(s),n.callbackNode=null,n.callbackPriority=0;if((o&3)===0||Gt(n,o)){if(i=o&-o,i===n.callbackPriority)return i;switch(s!==null&&Bn(s),Pe(o)){case 2:case 8:o=ti;break;case 32:o=we;break;case 268435456:o=Ce;break;default:o=we}return s=N1.bind(null,n),o=st(o,s),n.callbackPriority=i,n.callbackNode=o,i}return s!==null&&s!==null&&Bn(s),n.callbackPriority=2,n.callbackNode=null,2}function N1(n,i){if(qt!==0&&qt!==5)return n.callbackNode=null,n.callbackPriority=0,null;var o=n.callbackNode;if(pu()&&n.callbackNode!==o)return null;var s=Ze;return s=Bt(n,n===bt?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),s===0?null:(u1(n,s,i),A1(n,yt()),n.callbackNode!=null&&n.callbackNode===o?N1.bind(null,n):null)}function M1(n,i){if(pu())return null;u1(n,i,!0)}function _N(){$N(function(){(lt&6)!==0?st(ci,EN):O1()})}function tm(){if(ga===0){var n=go;n===0&&(n=Be,Be<<=1,(Be&261888)===0&&(Be=256)),ga=n}return ga}function C1(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:_c(""+n)}function R1(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,s,f){if(i==="submit"&&o&&o.stateNode===f){var h=C1((f[gn]||null).action),y=s.submitter;y&&(i=(i=y[gn]||null)?C1(i.formAction):y.getAttribute("formAction"),i!==null&&(h=i,y=null));var S=new Nc("action","action",null,s,f);n.push({event:S,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(ga!==0){var U=y?R1(f,y):new FormData(f);wh(o,{pending:!0,data:U,method:f.method,action:h},null,U)}}else typeof h=="function"&&(S.preventDefault(),U=y?R1(f,y):new FormData(f),wh(o,{pending:!0,data:U,method:f.method,action:h},h,U))},currentTarget:f}]})}}for(var nm=0;nm<Uf.length;nm++){var im=Uf[nm],ON=im.toLowerCase(),AN=im[0].toUpperCase()+im.slice(1);ii(ON,"on"+AN)}ii(c0,"onAnimationEnd"),ii(u0,"onAnimationIteration"),ii(d0,"onAnimationStart"),ii("dblclick","onDoubleClick"),ii("focusin","onFocus"),ii("focusout","onBlur"),ii(PA,"onTransitionRun"),ii(VA,"onTransitionStart"),ii(GA,"onTransitionCancel"),ii(f0,"onTransitionEnd"),to("onMouseEnter",["mouseout","mouseover"]),to("onMouseLeave",["mouseout","mouseover"]),to("onPointerEnter",["pointerout","pointerover"]),to("onPointerLeave",["pointerout","pointerover"]),ar("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ar("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ar("onBeforeInput",["compositionend","keypress","textInput","paste"]),ar("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ar("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ar("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cs="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),NN=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(cs));function T1(n,i){i=(i&4)!==0;for(var o=0;o<n.length;o++){var s=n[o],f=s.event;s=s.listeners;e:{var h=void 0;if(i)for(var y=s.length-1;0<=y;y--){var S=s[y],U=S.instance,W=S.currentTarget;if(S=S.listener,U!==h&&f.isPropagationStopped())break e;h=S,f.currentTarget=W;try{h(f)}catch(de){Rc(de)}f.currentTarget=null,h=U}else for(y=0;y<s.length;y++){if(S=s[y],U=S.instance,W=S.currentTarget,S=S.listener,U!==h&&f.isPropagationStopped())break e;h=S,f.currentTarget=W;try{h(f)}catch(de){Rc(de)}f.currentTarget=null,h=U}}}}function Qe(n,i){var o=i[gf];o===void 0&&(o=i[gf]=new Set);var s=n+"__bubble";o.has(s)||(D1(i,n,2,!1),o.add(s))}function am(n,i,o){var s=0;i&&(s|=4),D1(o,n,s,i)}var bu="_reactListening"+Math.random().toString(36).slice(2);function rm(n){if(!n[bu]){n[bu]=!0,Ob.forEach(function(o){o!=="selectionchange"&&(NN.has(o)||am(o,!1,n),am(o,!0,n))});var i=n.nodeType===9?n:n.ownerDocument;i===null||i[bu]||(i[bu]=!0,am("selectionchange",!1,i))}}function D1(n,i,o,s){switch(cx(i)){case 2:var f=iM;break;case 8:f=aM;break;default:f=xm}o=f.bind(null,i,o,n),f=void 0,!_f||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(f=!0),s?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 om(n,i,o,s,f){var h=s;if((i&1)===0&&(i&2)===0&&s!==null)e:for(;;){if(s===null)return;var y=s.tag;if(y===3||y===4){var S=s.stateNode.containerInfo;if(S===f)break;if(y===4)for(y=s.return;y!==null;){var U=y.tag;if((U===3||U===4)&&y.stateNode.containerInfo===f)return;y=y.return}for(;S!==null;){if(y=Wr(S),y===null)return;if(U=y.tag,U===5||U===6||U===26||U===27){s=h=y;continue e}S=S.parentNode}}s=s.return}Ib(function(){var W=h,de=Sf(o),he=[];e:{var J=h0.get(n);if(J!==void 0){var oe=Nc,Ae=n;switch(n){case"keypress":if(Oc(o)===0)break e;case"keydown":case"keyup":oe=kA;break;case"focusin":Ae="focus",oe=Nf;break;case"focusout":Ae="blur",oe=Nf;break;case"beforeblur":case"afterblur":oe=Nf;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":oe=qb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=uA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=_A;break;case c0:case u0:case d0:oe=hA;break;case f0:oe=OA;break;case"scroll":case"scrollend":oe=sA;break;case"wheel":oe=NA;break;case"copy":case"cut":case"paste":oe=pA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=Pb;break;case"toggle":case"beforetoggle":oe=CA}var Ie=(i&4)!==0,gt=!Ie&&(n==="scroll"||n==="scrollend"),G=Ie?J!==null?J+"Capture":null:J;Ie=[];for(var B=W,Z;B!==null;){var fe=B;if(Z=fe.stateNode,fe=fe.tag,fe!==5&&fe!==26&&fe!==27||Z===null||G===null||(fe=Cl(B,G),fe!=null&&Ie.push(us(B,fe,Z))),gt)break;B=B.return}0<Ie.length&&(J=new oe(J,Ae,null,o,de),he.push({event:J,listeners:Ie}))}}if((i&7)===0){e:{if(J=n==="mouseover"||n==="pointerover",oe=n==="mouseout"||n==="pointerout",J&&o!==kf&&(Ae=o.relatedTarget||o.fromElement)&&(Wr(Ae)||Ae[Zr]))break e;if((oe||J)&&(J=de.window===de?de:(J=de.ownerDocument)?J.defaultView||J.parentWindow:window,oe?(Ae=o.relatedTarget||o.toElement,oe=W,Ae=Ae?Wr(Ae):null,Ae!==null&&(gt=c(Ae),Ie=Ae.tag,Ae!==gt||Ie!==5&&Ie!==27&&Ie!==6)&&(Ae=null)):(oe=null,Ae=W),oe!==Ae)){if(Ie=qb,fe="onMouseLeave",G="onMouseEnter",B="mouse",(n==="pointerout"||n==="pointerover")&&(Ie=Pb,fe="onPointerLeave",G="onPointerEnter",B="pointer"),gt=oe==null?J:Ml(oe),Z=Ae==null?J:Ml(Ae),J=new Ie(fe,B+"leave",oe,o,de),J.target=gt,J.relatedTarget=Z,fe=null,Wr(de)===W&&(Ie=new Ie(G,B+"enter",Ae,o,de),Ie.target=Z,Ie.relatedTarget=gt,fe=Ie),gt=fe,oe&&Ae)t:{for(Ie=MN,G=oe,B=Ae,Z=0,fe=G;fe;fe=Ie(fe))Z++;fe=0;for(var De=B;De;De=Ie(De))fe++;for(;0<Z-fe;)G=Ie(G),Z--;for(;0<fe-Z;)B=Ie(B),fe--;for(;Z--;){if(G===B||B!==null&&G===B.alternate){Ie=G;break t}G=Ie(G),B=Ie(B)}Ie=null}else Ie=null;oe!==null&&L1(he,J,oe,Ie,!1),Ae!==null&>!==null&&L1(he,gt,Ae,Ie,!0)}}e:{if(J=W?Ml(W):window,oe=J.nodeName&&J.nodeName.toLowerCase(),oe==="select"||oe==="input"&&J.type==="file")var rt=Wb;else if(Xb(J))if(Jb)rt=BA;else{rt=IA;var Me=UA}else oe=J.nodeName,!oe||oe.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?W&&wf(W.elementType)&&(rt=Wb):rt=HA;if(rt&&(rt=rt(n,W))){Zb(he,rt,o,de);break e}Me&&Me(n,J,W),n==="focusout"&&W&&J.type==="number"&&W.memoizedProps.value!=null&&xf(J,"number",J.value)}switch(Me=W?Ml(W):window,n){case"focusin":(Xb(Me)||Me.contentEditable==="true")&&(lo=Me,Lf=W,Il=null);break;case"focusout":Il=Lf=lo=null;break;case"mousedown":zf=!0;break;case"contextmenu":case"mouseup":case"dragend":zf=!1,l0(he,o,de);break;case"selectionchange":if(FA)break;case"keydown":case"keyup":l0(he,o,de)}var Ve;if(Cf)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 oo?Yb(n,o)&&(We="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(We="onCompositionStart");We&&(Vb&&o.locale!=="ko"&&(oo||We!=="onCompositionStart"?We==="onCompositionEnd"&&oo&&(Ve=Hb()):(ea=de,jf="value"in ea?ea.value:ea.textContent,oo=!0)),Me=vu(W,We),0<Me.length&&(We=new Fb(We,n,null,o,de),he.push({event:We,listeners:Me}),Ve?We.data=Ve:(Ve=Qb(o),Ve!==null&&(We.data=Ve)))),(Ve=TA?DA(n,o):LA(n,o))&&(We=vu(W,"onBeforeInput"),0<We.length&&(Me=new Fb("onBeforeInput","beforeinput",null,o,de),he.push({event:Me,listeners:We}),Me.data=Ve)),jN(he,n,W,o,de)}T1(he,i)})}function us(n,i,o){return{instance:n,listener:i,currentTarget:o}}function vu(n,i){for(var o=i+"Capture",s=[];n!==null;){var f=n,h=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||h===null||(f=Cl(n,o),f!=null&&s.unshift(us(n,f,h)),f=Cl(n,i),f!=null&&s.push(us(n,f,h))),n.tag===3)return s;n=n.return}return[]}function MN(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function L1(n,i,o,s,f){for(var h=i._reactName,y=[];o!==null&&o!==s;){var S=o,U=S.alternate,W=S.stateNode;if(S=S.tag,U!==null&&U===s)break;S!==5&&S!==26&&S!==27||W===null||(U=W,f?(W=Cl(o,h),W!=null&&y.unshift(us(o,W,U))):f||(W=Cl(o,h),W!=null&&y.push(us(o,W,U)))),o=o.return}y.length!==0&&n.push({event:i,listeners:y})}var CN=/\r\n?/g,RN=/\u0000|\uFFFD/g;function z1(n){return(typeof n=="string"?n:""+n).replace(CN,`
|
|
49
|
-
`).replace(RN,"")}function $1(n,i){return i=z1(i),z1(n)===i}function pt(n,i,o,s,f,h){switch(o){case"children":typeof s=="string"?i==="body"||i==="textarea"&&s===""||io(n,s):(typeof s=="number"||typeof s=="bigint")&&i!=="body"&&io(n,""+s);break;case"className":Sc(n,"class",s);break;case"tabIndex":Sc(n,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Sc(n,o,s);break;case"style":$b(n,s,h);break;case"data":if(i!=="object"){Sc(n,"data",s);break}case"src":case"href":if(s===""&&(i!=="a"||o!=="href")){n.removeAttribute(o);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){n.removeAttribute(o);break}s=_c(""+s),n.setAttribute(o,s);break;case"action":case"formAction":if(typeof s=="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(s==null||typeof s=="symbol"||typeof s=="boolean"){n.removeAttribute(o);break}s=_c(""+s),n.setAttribute(o,s);break;case"onClick":s!=null&&(n.onclick=_i);break;case"onScroll":s!=null&&Qe("scroll",n);break;case"onScrollEnd":s!=null&&Qe("scrollend",n);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(o=s.__html,o!=null){if(f.children!=null)throw Error(r(60));n.innerHTML=o}}break;case"multiple":n.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":n.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){n.removeAttribute("xlink:href");break}o=_c(""+s),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":s!=null&&typeof s!="function"&&typeof s!="symbol"?n.setAttribute(o,""+s):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":s&&typeof s!="function"&&typeof s!="symbol"?n.setAttribute(o,""):n.removeAttribute(o);break;case"capture":case"download":s===!0?n.setAttribute(o,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?n.setAttribute(o,s):n.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?n.setAttribute(o,s):n.removeAttribute(o);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?n.removeAttribute(o):n.setAttribute(o,s);break;case"popover":Qe("beforetoggle",n),Qe("toggle",n),kc(n,"popover",s);break;case"xlinkActuate":Ei(n,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Ei(n,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Ei(n,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Ei(n,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Ei(n,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Ei(n,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Ei(n,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Ei(n,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Ei(n,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":kc(n,"is",s);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=oA.get(o)||o,kc(n,o,s))}}function lm(n,i,o,s,f,h){switch(o){case"style":$b(n,s,h);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(o=s.__html,o!=null){if(f.children!=null)throw Error(r(60));n.innerHTML=o}}break;case"children":typeof s=="string"?io(n,s):(typeof s=="number"||typeof s=="bigint")&&io(n,""+s);break;case"onScroll":s!=null&&Qe("scroll",n);break;case"onScrollEnd":s!=null&&Qe("scrollend",n);break;case"onClick":s!=null&&(n.onclick=_i);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ab.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 s=="function")){typeof h!="function"&&h!==null&&(o in n?n[o]=null:n.hasAttribute(o)&&n.removeAttribute(o)),n.addEventListener(i,s,f);break e}o in n?n[o]=s:s===!0?n.setAttribute(o,""):kc(n,o,s)}}}function nn(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 s=!1,f=!1,h;for(h in o)if(o.hasOwnProperty(h)){var y=o[h];if(y!=null)switch(h){case"src":s=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:pt(n,i,h,y,o,null)}}f&&pt(n,i,"srcSet",o.srcSet,o,null),s&&pt(n,i,"src",o.src,o,null);return;case"input":Qe("invalid",n);var S=h=y=f=null,U=null,W=null;for(s in o)if(o.hasOwnProperty(s)){var de=o[s];if(de!=null)switch(s){case"name":f=de;break;case"type":y=de;break;case"checked":U=de;break;case"defaultChecked":W=de;break;case"value":h=de;break;case"defaultValue":S=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(137,i));break;default:pt(n,i,s,de,o,null)}}Tb(n,h,S,U,W,y,f,!1);return;case"select":Qe("invalid",n),s=y=h=null;for(f in o)if(o.hasOwnProperty(f)&&(S=o[f],S!=null))switch(f){case"value":h=S;break;case"defaultValue":y=S;break;case"multiple":s=S;default:pt(n,i,f,S,o,null)}i=h,o=y,n.multiple=!!s,i!=null?no(n,!!s,i,!1):o!=null&&no(n,!!s,o,!0);return;case"textarea":Qe("invalid",n),h=f=s=null;for(y in o)if(o.hasOwnProperty(y)&&(S=o[y],S!=null))switch(y){case"value":s=S;break;case"defaultValue":f=S;break;case"children":h=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(r(91));break;default:pt(n,i,y,S,o,null)}Lb(n,s,f,h);return;case"option":for(U in o)if(o.hasOwnProperty(U)&&(s=o[U],s!=null))switch(U){case"selected":n.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:pt(n,i,U,s,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(s=0;s<cs.length;s++)Qe(cs[s],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(W in o)if(o.hasOwnProperty(W)&&(s=o[W],s!=null))switch(W){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,i));default:pt(n,i,W,s,o,null)}return;default:if(wf(i)){for(de in o)o.hasOwnProperty(de)&&(s=o[de],s!==void 0&&lm(n,i,de,s,o,void 0));return}}for(S in o)o.hasOwnProperty(S)&&(s=o[S],s!=null&&pt(n,i,S,s,o,null))}function TN(n,i,o,s){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,y=null,S=null,U=null,W=null,de=null;for(oe in o){var he=o[oe];if(o.hasOwnProperty(oe)&&he!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":U=he;default:s.hasOwnProperty(oe)||pt(n,i,oe,null,s,he)}}for(var J in s){var oe=s[J];if(he=o[J],s.hasOwnProperty(J)&&(oe!=null||he!=null))switch(J){case"type":h=oe;break;case"name":f=oe;break;case"checked":W=oe;break;case"defaultChecked":de=oe;break;case"value":y=oe;break;case"defaultValue":S=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,i));break;default:oe!==he&&pt(n,i,J,oe,s,he)}}vf(n,y,S,U,W,de,h,f);return;case"select":oe=y=S=J=null;for(h in o)if(U=o[h],o.hasOwnProperty(h)&&U!=null)switch(h){case"value":break;case"multiple":oe=U;default:s.hasOwnProperty(h)||pt(n,i,h,null,s,U)}for(f in s)if(h=s[f],U=o[f],s.hasOwnProperty(f)&&(h!=null||U!=null))switch(f){case"value":J=h;break;case"defaultValue":S=h;break;case"multiple":y=h;default:h!==U&&pt(n,i,f,h,s,U)}i=S,o=y,s=oe,J!=null?no(n,!!o,J,!1):!!s!=!!o&&(i!=null?no(n,!!o,i,!0):no(n,!!o,o?[]:"",!1));return;case"textarea":oe=J=null;for(S in o)if(f=o[S],o.hasOwnProperty(S)&&f!=null&&!s.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:pt(n,i,S,null,s,f)}for(y in s)if(f=s[y],h=o[y],s.hasOwnProperty(y)&&(f!=null||h!=null))switch(y){case"value":J=f;break;case"defaultValue":oe=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:f!==h&&pt(n,i,y,f,s,h)}Db(n,J,oe);return;case"option":for(var Ae in o)if(J=o[Ae],o.hasOwnProperty(Ae)&&J!=null&&!s.hasOwnProperty(Ae))switch(Ae){case"selected":n.selected=!1;break;default:pt(n,i,Ae,null,s,J)}for(U in s)if(J=s[U],oe=o[U],s.hasOwnProperty(U)&&J!==oe&&(J!=null||oe!=null))switch(U){case"selected":n.selected=J&&typeof J!="function"&&typeof J!="symbol";break;default:pt(n,i,U,J,s,oe)}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 Ie in o)J=o[Ie],o.hasOwnProperty(Ie)&&J!=null&&!s.hasOwnProperty(Ie)&&pt(n,i,Ie,null,s,J);for(W in s)if(J=s[W],oe=o[W],s.hasOwnProperty(W)&&J!==oe&&(J!=null||oe!=null))switch(W){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,i));break;default:pt(n,i,W,J,s,oe)}return;default:if(wf(i)){for(var gt in o)J=o[gt],o.hasOwnProperty(gt)&&J!==void 0&&!s.hasOwnProperty(gt)&&lm(n,i,gt,void 0,s,J);for(de in s)J=s[de],oe=o[de],!s.hasOwnProperty(de)||J===oe||J===void 0&&oe===void 0||lm(n,i,de,J,s,oe);return}}for(var G in o)J=o[G],o.hasOwnProperty(G)&&J!=null&&!s.hasOwnProperty(G)&&pt(n,i,G,null,s,J);for(he in s)J=s[he],oe=o[he],!s.hasOwnProperty(he)||J===oe||J==null&&oe==null||pt(n,i,he,J,s,oe)}function U1(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function DN(){if(typeof performance.getEntriesByType=="function"){for(var n=0,i=0,o=performance.getEntriesByType("resource"),s=0;s<o.length;s++){var f=o[s],h=f.transferSize,y=f.initiatorType,S=f.duration;if(h&&S&&U1(y)){for(y=0,S=f.responseEnd,s+=1;s<o.length;s++){var U=o[s],W=U.startTime;if(W>S)break;var de=U.transferSize,he=U.initiatorType;de&&U1(he)&&(U=U.responseEnd,y+=de*(U<S?1:(S-W)/(U-W)))}if(--s,i+=8*(h+y)/(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 sm=null,cm=null;function xu(n){return n.nodeType===9?n:n.ownerDocument}function I1(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 H1(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 um(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 dm=null;function LN(){var n=window.event;return n&&n.type==="popstate"?n===dm?!1:(dm=n,!0):(dm=null,!1)}var B1=typeof setTimeout=="function"?setTimeout:void 0,zN=typeof clearTimeout=="function"?clearTimeout:void 0,q1=typeof Promise=="function"?Promise:void 0,$N=typeof queueMicrotask=="function"?queueMicrotask:typeof q1<"u"?function(n){return q1.resolve(null).then(n).catch(UN)}:B1;function UN(n){setTimeout(function(){throw n})}function ya(n){return n==="head"}function F1(n,i){var o=i,s=0;do{var f=o.nextSibling;if(n.removeChild(o),f&&f.nodeType===8)if(o=f.data,o==="/$"||o==="/&"){if(s===0){n.removeChild(f),Lo(i);return}s--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")s++;else if(o==="html")ds(n.ownerDocument.documentElement);else if(o==="head"){o=n.ownerDocument.head,ds(o);for(var h=o.firstChild;h;){var y=h.nextSibling,S=h.nodeName;h[Nl]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&h.rel.toLowerCase()==="stylesheet"||o.removeChild(h),h=y}}else o==="body"&&ds(n.ownerDocument.body);o=f}while(o);Lo(i)}function P1(n,i){var o=n;n=0;do{var s=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||""),s&&s.nodeType===8)if(o=s.data,o==="/$"){if(n===0)break;n--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||n++;o=s}while(o)}function fm(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":fm(o),yf(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}n.removeChild(o)}}function IN(n,i,o,s){for(;n.nodeType===1;){var f=o;if(n.nodeName.toLowerCase()!==i.toLowerCase()){if(!s&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(s){if(!n[Nl])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=Zn(n.nextSibling),n===null)break}return null}function HN(n,i,o){if(i==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=Zn(n.nextSibling),n===null))return null;return n}function V1(n,i){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!i||(n=Zn(n.nextSibling),n===null))return null;return n}function hm(n){return n.data==="$?"||n.data==="$~"}function mm(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function BN(n,i){var o=n.ownerDocument;if(n.data==="$~")n._reactRetry=i;else if(n.data!=="$?"||o.readyState!=="loading")i();else{var s=function(){i(),o.removeEventListener("DOMContentLoaded",s)};o.addEventListener("DOMContentLoaded",s),n._reactRetry=s}}function Zn(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 pm=null;function G1(n){n=n.nextSibling;for(var i=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"||o==="/&"){if(i===0)return Zn(n.nextSibling);i--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||i++}n=n.nextSibling}return null}function K1(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 Y1(n,i,o){switch(i=xu(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 ds(n){for(var i=n.attributes;i.length;)n.removeAttributeNode(i[0]);yf(n)}var Wn=new Map,Q1=new Set;function wu(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var Bi=V.d;V.d={f:qN,r:FN,D:PN,C:VN,L:GN,m:KN,X:QN,S:YN,M:XN};function qN(){var n=Bi.f(),i=fu();return n||i}function FN(n){var i=Jr(n);i!==null&&i.tag===5&&i.type==="form"?fv(i):Bi.r(n)}var Ro=typeof document>"u"?null:document;function X1(n,i,o){var s=Ro;if(s&&typeof i=="string"&&i){var f=Pn(i);f='link[rel="'+n+'"][href="'+f+'"]',typeof o=="string"&&(f+='[crossorigin="'+o+'"]'),Q1.has(f)||(Q1.add(f),n={rel:n,crossOrigin:o,href:i},s.querySelector(f)===null&&(i=s.createElement("link"),nn(i,"link",n),Yt(i),s.head.appendChild(i)))}}function PN(n){Bi.D(n),X1("dns-prefetch",n,null)}function VN(n,i){Bi.C(n,i),X1("preconnect",n,i)}function GN(n,i,o){Bi.L(n,i,o);var s=Ro;if(s&&n&&i){var f='link[rel="preload"][as="'+Pn(i)+'"]';i==="image"&&o&&o.imageSrcSet?(f+='[imagesrcset="'+Pn(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(f+='[imagesizes="'+Pn(o.imageSizes)+'"]')):f+='[href="'+Pn(n)+'"]';var h=f;switch(i){case"style":h=To(n);break;case"script":h=Do(n)}Wn.has(h)||(n=v({rel:"preload",href:i==="image"&&o&&o.imageSrcSet?void 0:n,as:i},o),Wn.set(h,n),s.querySelector(f)!==null||i==="style"&&s.querySelector(fs(h))||i==="script"&&s.querySelector(hs(h))||(i=s.createElement("link"),nn(i,"link",n),Yt(i),s.head.appendChild(i)))}}function KN(n,i){Bi.m(n,i);var o=Ro;if(o&&n){var s=i&&typeof i.as=="string"?i.as:"script",f='link[rel="modulepreload"][as="'+Pn(s)+'"][href="'+Pn(n)+'"]',h=f;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Do(n)}if(!Wn.has(h)&&(n=v({rel:"modulepreload",href:n},i),Wn.set(h,n),o.querySelector(f)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(hs(h)))return}s=o.createElement("link"),nn(s,"link",n),Yt(s),o.head.appendChild(s)}}}function YN(n,i,o){Bi.S(n,i,o);var s=Ro;if(s&&n){var f=eo(s).hoistableStyles,h=To(n);i=i||"default";var y=f.get(h);if(!y){var S={loading:0,preload:null};if(y=s.querySelector(fs(h)))S.loading=5;else{n=v({rel:"stylesheet",href:n,"data-precedence":i},o),(o=Wn.get(h))&&gm(n,o);var U=y=s.createElement("link");Yt(U),nn(U,"link",n),U._p=new Promise(function(W,de){U.onload=W,U.onerror=de}),U.addEventListener("load",function(){S.loading|=1}),U.addEventListener("error",function(){S.loading|=2}),S.loading|=4,ku(y,i,s)}y={type:"stylesheet",instance:y,count:1,state:S},f.set(h,y)}}}function QN(n,i){Bi.X(n,i);var o=Ro;if(o&&n){var s=eo(o).hoistableScripts,f=Do(n),h=s.get(f);h||(h=o.querySelector(hs(f)),h||(n=v({src:n,async:!0},i),(i=Wn.get(f))&&ym(n,i),h=o.createElement("script"),Yt(h),nn(h,"link",n),o.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(f,h))}}function XN(n,i){Bi.M(n,i);var o=Ro;if(o&&n){var s=eo(o).hoistableScripts,f=Do(n),h=s.get(f);h||(h=o.querySelector(hs(f)),h||(n=v({src:n,async:!0,type:"module"},i),(i=Wn.get(f))&&ym(n,i),h=o.createElement("script"),Yt(h),nn(h,"link",n),o.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(f,h))}}function Z1(n,i,o,s){var f=(f=pe.current)?wu(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=To(o.href),o=eo(f).hoistableStyles,s=o.get(i),s||(s={type:"style",instance:null,count:0,state:null},o.set(i,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){n=To(o.href);var h=eo(f).hoistableStyles,y=h.get(n);if(y||(f=f.ownerDocument||f,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(n,y),(h=f.querySelector(fs(n)))&&!h._p&&(y.instance=h,y.state.loading=5),Wn.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},Wn.set(n,o),h||ZN(f,n,o,y.state))),i&&s===null)throw Error(r(528,""));return y}if(i&&s!==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=Do(o),o=eo(f).hoistableScripts,s=o.get(i),s||(s={type:"script",instance:null,count:0,state:null},o.set(i,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,n))}}function To(n){return'href="'+Pn(n)+'"'}function fs(n){return'link[rel="stylesheet"]['+n+"]"}function W1(n){return v({},n,{"data-precedence":n.precedence,precedence:null})}function ZN(n,i,o,s){n.querySelector('link[rel="preload"][as="style"]['+i+"]")?s.loading=1:(i=n.createElement("link"),s.preload=i,i.addEventListener("load",function(){return s.loading|=1}),i.addEventListener("error",function(){return s.loading|=2}),nn(i,"link",o),Yt(i),n.head.appendChild(i))}function Do(n){return'[src="'+Pn(n)+'"]'}function hs(n){return"script[async]"+n}function J1(n,i,o){if(i.count++,i.instance===null)switch(i.type){case"style":var s=n.querySelector('style[data-href~="'+Pn(o.href)+'"]');if(s)return i.instance=s,Yt(s),s;var f=v({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return s=(n.ownerDocument||n).createElement("style"),Yt(s),nn(s,"style",f),ku(s,o.precedence,n),i.instance=s;case"stylesheet":f=To(o.href);var h=n.querySelector(fs(f));if(h)return i.state.loading|=4,i.instance=h,Yt(h),h;s=W1(o),(f=Wn.get(f))&&gm(s,f),h=(n.ownerDocument||n).createElement("link"),Yt(h);var y=h;return y._p=new Promise(function(S,U){y.onload=S,y.onerror=U}),nn(h,"link",s),i.state.loading|=4,ku(h,o.precedence,n),i.instance=h;case"script":return h=Do(o.src),(f=n.querySelector(hs(h)))?(i.instance=f,Yt(f),f):(s=o,(f=Wn.get(h))&&(s=v({},o),ym(s,f)),n=n.ownerDocument||n,f=n.createElement("script"),Yt(f),nn(f,"link",s),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&&(s=i.instance,i.state.loading|=4,ku(s,o.precedence,n));return i.instance}function ku(n,i,o){for(var s=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=s.length?s[s.length-1]:null,h=f,y=0;y<s.length;y++){var S=s[y];if(S.dataset.precedence===i)h=S;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 gm(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.title==null&&(n.title=i.title)}function ym(n,i){n.crossOrigin==null&&(n.crossOrigin=i.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=i.referrerPolicy),n.integrity==null&&(n.integrity=i.integrity)}var Su=null;function ex(n,i,o){if(Su===null){var s=new Map,f=Su=new Map;f.set(o,s)}else f=Su,s=f.get(o),s||(s=new Map,f.set(o,s));if(s.has(n))return s;for(s.set(n,null),o=o.getElementsByTagName(n),f=0;f<o.length;f++){var h=o[f];if(!(h[Nl]||h[Ot]||n==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var y=h.getAttribute(i)||"";y=n+y;var S=s.get(y);S?S.push(h):s.set(y,[h])}}return s}function tx(n,i,o){n=n.ownerDocument||n,n.head.insertBefore(o,i==="title"?n.querySelector("head > title"):null)}function WN(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 nx(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function JN(n,i,o,s){if(o.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var f=To(s.href),h=i.querySelector(fs(f));if(h){i=h._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(n.count++,n=Eu.bind(n),i.then(n,n)),o.state.loading|=4,o.instance=h,Yt(h);return}h=i.ownerDocument||i,s=W1(s),(f=Wn.get(f))&&gm(s,f),h=h.createElement("link"),Yt(h);var y=h;y._p=new Promise(function(S,U){y.onload=S,y.onerror=U}),nn(h,"link",s),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=Eu.bind(n),i.addEventListener("load",o),i.addEventListener("error",o))}}var bm=0;function eM(n,i){return n.stylesheets&&n.count===0&&ju(n,n.stylesheets),0<n.count||0<n.imgCount?function(o){var s=setTimeout(function(){if(n.stylesheets&&ju(n,n.stylesheets),n.unsuspend){var h=n.unsuspend;n.unsuspend=null,h()}},6e4+i);0<n.imgBytes&&bm===0&&(bm=62500*DN());var f=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&ju(n,n.stylesheets),n.unsuspend)){var h=n.unsuspend;n.unsuspend=null,h()}},(n.imgBytes>bm?50:800)+i);return n.unsuspend=o,function(){n.unsuspend=null,clearTimeout(s),clearTimeout(f)}}:null}function Eu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ju(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var _u=null;function ju(n,i){n.stylesheets=null,n.unsuspend!==null&&(n.count++,_u=new Map,i.forEach(tM,n),_u=null,Eu.call(n))}function tM(n,i){if(!(i.state.loading&4)){var o=_u.get(n);if(o)var s=o.get(null);else{o=new Map,_u.set(n,o);for(var f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<f.length;h++){var y=f[h];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(o.set(y.dataset.precedence,y),s=y)}s&&o.set(null,s)}f=i.instance,y=f.getAttribute("data-precedence"),h=o.get(y)||s,h===s&&o.set(null,f),o.set(y,f),this.count++,s=Eu.bind(this),f.addEventListener("load",s),f.addEventListener("error",s),h?h.parentNode.insertBefore(f,h.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(f,n.firstChild)),i.state.loading|=4}}var ms={$$typeof:A,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function nM(n,i,o,s,f,h,y,S,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=Si(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Si(0),this.hiddenUpdates=Si(null),this.identifierPrefix=s,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function ix(n,i,o,s,f,h,y,S,U,W,de,he){return n=new nM(n,i,o,y,U,W,de,he,S),i=1,h===!0&&(i|=24),h=Mn(3,null,null,i),n.current=h,h.stateNode=n,i=Zf(),i.refCount++,n.pooledCache=i,i.refCount++,h.memoizedState={element:s,isDehydrated:o,cache:i},th(h),n}function ax(n){return n?(n=uo,n):uo}function rx(n,i,o,s,f,h){f=ax(f),s.context===null?s.context=f:s.pendingContext=f,s=oa(i),s.payload={element:o},h=h===void 0?null:h,h!==null&&(s.callback=h),o=la(n,s,i),o!==null&&(kn(o,n,i),Gl(o,n,i))}function ox(n,i){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<i?o:i}}function vm(n,i){ox(n,i),(n=n.alternate)&&ox(n,i)}function lx(n){if(n.tag===13||n.tag===31){var i=sr(n,67108864);i!==null&&kn(i,n,67108864),vm(n,67108864)}}function sx(n){if(n.tag===13||n.tag===31){var i=Ln();i=Se(i);var o=sr(n,i);o!==null&&kn(o,n,i),vm(n,i)}}var Ou=!0;function iM(n,i,o,s){var f=M.T;M.T=null;var h=V.p;try{V.p=2,xm(n,i,o,s)}finally{V.p=h,M.T=f}}function aM(n,i,o,s){var f=M.T;M.T=null;var h=V.p;try{V.p=8,xm(n,i,o,s)}finally{V.p=h,M.T=f}}function xm(n,i,o,s){if(Ou){var f=wm(s);if(f===null)om(n,i,s,Au,o),ux(n,s);else if(oM(f,n,i,o,s))s.stopPropagation();else if(ux(n,s),i&4&&-1<rM.indexOf(n)){for(;f!==null;){var h=Jr(f);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var y=St(h.pendingLanes);if(y!==0){var S=h;for(S.pendingLanes|=2,S.entangledLanes|=2;y;){var U=1<<31-be(y);S.entanglements[1]|=U,y&=~U}mi(h),(lt&6)===0&&(uu=yt()+500,ss(0))}}break;case 31:case 13:S=sr(h,2),S!==null&&kn(S,h,2),fu(),vm(h,2)}if(h=wm(s),h===null&&om(n,i,s,Au,o),h===f)break;f=h}f!==null&&s.stopPropagation()}else om(n,i,s,null,o)}}function wm(n){return n=Sf(n),km(n)}var Au=null;function km(n){if(Au=null,n=Wr(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 Au=n,null}function cx(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(Ji()){case ci:return 2;case ti:return 8;case we:case Te:return 32;case Ce:return 268435456;default:return 32}default:return 32}}var Sm=!1,ba=null,va=null,xa=null,ps=new Map,gs=new Map,wa=[],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 ux(n,i){switch(n){case"focusin":case"focusout":ba=null;break;case"dragenter":case"dragleave":va=null;break;case"mouseover":case"mouseout":xa=null;break;case"pointerover":case"pointerout":ps.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":gs.delete(i.pointerId)}}function ys(n,i,o,s,f,h){return n===null||n.nativeEvent!==h?(n={blockedOn:i,domEventName:o,eventSystemFlags:s,nativeEvent:h,targetContainers:[f]},i!==null&&(i=Jr(i),i!==null&&lx(i)),n):(n.eventSystemFlags|=s,i=n.targetContainers,f!==null&&i.indexOf(f)===-1&&i.push(f),n)}function oM(n,i,o,s,f){switch(i){case"focusin":return ba=ys(ba,n,i,o,s,f),!0;case"dragenter":return va=ys(va,n,i,o,s,f),!0;case"mouseover":return xa=ys(xa,n,i,o,s,f),!0;case"pointerover":var h=f.pointerId;return ps.set(h,ys(ps.get(h)||null,n,i,o,s,f)),!0;case"gotpointercapture":return h=f.pointerId,gs.set(h,ys(gs.get(h)||null,n,i,o,s,f)),!0}return!1}function dx(n){var i=Wr(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(){sx(o)});return}}else if(i===31){if(i=m(o),i!==null){n.blockedOn=i,nt(n.priority,function(){sx(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 Nu(n){if(n.blockedOn!==null)return!1;for(var i=n.targetContainers;0<i.length;){var o=wm(n.nativeEvent);if(o===null){o=n.nativeEvent;var s=new o.constructor(o.type,o);kf=s,o.target.dispatchEvent(s),kf=null}else return i=Jr(o),i!==null&&lx(i),n.blockedOn=o,!1;i.shift()}return!0}function fx(n,i,o){Nu(n)&&o.delete(i)}function lM(){Sm=!1,ba!==null&&Nu(ba)&&(ba=null),va!==null&&Nu(va)&&(va=null),xa!==null&&Nu(xa)&&(xa=null),ps.forEach(fx),gs.forEach(fx)}function Mu(n,i){n.blockedOn===i&&(n.blockedOn=null,Sm||(Sm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,lM)))}var Cu=null;function hx(n){Cu!==n&&(Cu=n,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Cu===n&&(Cu=null);for(var i=0;i<n.length;i+=3){var o=n[i],s=n[i+1],f=n[i+2];if(typeof s!="function"){if(km(s||o)===null)continue;break}var h=Jr(o);h!==null&&(n.splice(i,3),i-=3,wh(h,{pending:!0,data:f,method:o.method,action:s},s,f))}}))}function Lo(n){function i(U){return Mu(U,n)}ba!==null&&Mu(ba,n),va!==null&&Mu(va,n),xa!==null&&Mu(xa,n),ps.forEach(i),gs.forEach(i);for(var o=0;o<wa.length;o++){var s=wa[o];s.blockedOn===n&&(s.blockedOn=null)}for(;0<wa.length&&(o=wa[0],o.blockedOn===null);)dx(o),o.blockedOn===null&&wa.shift();if(o=(n.ownerDocument||n).$$reactFormReplay,o!=null)for(s=0;s<o.length;s+=3){var f=o[s],h=o[s+1],y=f[gn]||null;if(typeof h=="function")y||hx(o);else if(y){var S=null;if(h&&h.hasAttribute("formAction")){if(f=h,y=h[gn]||null)S=y.formAction;else if(km(f)!==null)continue}else S=y.action;typeof S=="function"?o[s+1]=S:(o.splice(s,3),s-=3),hx(o)}}}function mx(){function n(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(y){return f=y})},focusReset:"manual",scroll:"manual"})}function i(){f!==null&&(f(),f=null),s||setTimeout(o,20)}function o(){if(!s&&!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 s=!1,f=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(o,100),function(){s=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),f!==null&&(f(),f=null)}}}function Em(n){this._internalRoot=n}Ru.prototype.render=Em.prototype.render=function(n){var i=this._internalRoot;if(i===null)throw Error(r(409));var o=i.current,s=Ln();rx(o,s,n,i,null,null)},Ru.prototype.unmount=Em.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var i=n.containerInfo;rx(n.current,2,null,n,null,null),fu(),i[Zr]=null}};function Ru(n){this._internalRoot=n}Ru.prototype.unstable_scheduleHydration=function(n){if(n){var i=At();n={blockedOn:null,target:n,priority:i};for(var o=0;o<wa.length&&i!==0&&i<wa[o].priority;o++);wa.splice(o,0,n),o===0&&dx(n)}};var px=t.version;if(px!=="19.2.6")throw Error(r(527,px,"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=g(i),n=n!==null?b(n):null,n=n===null?null:n.stateNode,n};var sM={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tu.isDisabled&&Tu.supportsFiber)try{Vt=Tu.inject(sM),ut=Tu}catch{}}return vs.createRoot=function(n,i){if(!l(n))throw Error(r(299));var o=!1,s="",f=kv,h=Sv,y=Ev;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(s=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(h=i.onCaughtError),i.onRecoverableError!==void 0&&(y=i.onRecoverableError)),i=ix(n,1,!1,null,null,o,s,null,f,h,y,mx),n[Zr]=i.current,rm(n),new Em(i)},vs.hydrateRoot=function(n,i,o){if(!l(n))throw Error(r(299));var s=!1,f="",h=kv,y=Sv,S=Ev,U=null;return o!=null&&(o.unstable_strictMode===!0&&(s=!0),o.identifierPrefix!==void 0&&(f=o.identifierPrefix),o.onUncaughtError!==void 0&&(h=o.onUncaughtError),o.onCaughtError!==void 0&&(y=o.onCaughtError),o.onRecoverableError!==void 0&&(S=o.onRecoverableError),o.formState!==void 0&&(U=o.formState)),i=ix(n,1,!0,i,o??null,s,f,U,h,y,S,mx),i.context=ax(null),o=i.current,s=Ln(),s=Se(s),f=oa(s),f.callback=null,la(o,f,s),o=s,i.current.lanes=o,ni(i,o),mi(i),n[Zr]=i.current,rm(n),new Ru(i)},vs.version="19.2.6",vs}var jx;function bM(){if(jx)return Am.exports;jx=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(),Am.exports=yM(),Am.exports}var vM=bM();function xM(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 l=t[2],c=l!==void 0?Number(l):NaN;return{kind:"slot",instanceId:a,slotId:r,...Number.isInteger(c)?{itemIndex:c}:{}}}function wM(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 kM(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 SM(e,t){const[a,r,l,c,...u]=e.split("/").filter(Boolean);if(a!=="fixtures"||!r||l!=="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:xM(m.get("sel"))}}function EM(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 Ox(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 l=wM(e.selection);l&&r.set("sel",l);const c=r.toString();return c?`${a}?${c}`:a}function S2(e,t){var a;return((a=e.parentElement)==null?void 0:a.closest(`[${t.slotId}],[${t.slotField}]`))??null}function Ki(e,t){return!e.hasAttribute(t.slotUnselectable)}function E2(e,t,a,r){const l=[];for(const c of Array.from(e.querySelectorAll(t)))S2(c,r)===a&&l.push(c);return l}function dg(e,t,a){return E2(e,`[${a.slotItem}="${String(t)}"]`,e,a)}function Ax(e,t,a,r){var c;let l=e.closest(`[${t}]`);for(;l&&a.contains(l);){if(Ki(l,r)&&S2(l,r)===a)return l;l=((c=l.parentElement)==null?void 0:c.closest(`[${t}]`))??null}return null}const Rm=1,_M=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 OM(e){const t=Cd(e);return t.width<=0||t.height<=0?!1:!AM(e,t)}function Nx(e){return e==="hidden"||e==="scroll"||e==="auto"||e==="clip"}function AM(e,t){const a=e.ownerDocument.defaultView;if(!a)return!1;let r=-1/0,l=-1/0,c=1/0,u=1/0;for(let g=e.parentElement;g;g=g.parentElement){const b=a.getComputedStyle(g),v=Nx(b.overflowX||b.overflow),k=Nx(b.overflowY||b.overflow);if(!v&&!k)continue;const w=g.getBoundingClientRect();v&&(l=Math.max(l,w.left),c=Math.min(c,w.right)),k&&(r=Math.max(r,w.top),u=Math.min(u,w.bottom))}const m=t.left+t.width<=l||t.left>=c,p=t.top+t.height<=r||t.top>=u;return m||p}function Cd(e){const t=e.getBoundingClientRect();if(t.width>0&&t.height>0)return t;let a=1/0,r=1/0,l=-1/0,c=-1/0,u=!1;for(const m of Array.from(e.children)){const p=Cd(m);p.width<=0||p.height<=0||(u=!0,a=Math.min(a,p.top),r=Math.min(r,p.left),l=Math.max(l,p.right),c=Math.max(c,p.bottom))}return u?new DOMRect(r,a,l-r,c-a):t}function _2(e,t,a,r){if(!e)return;if(!t){Yu(e);return}const l=jM(Cd(t),a);for(const[c,u]of Object.entries(l))e.style.setProperty(c,u);r&&e.setAttribute("data-kind",r),e.setAttribute("data-active","true")}function Yu(e){e&&(e.removeAttribute("data-active"),e.removeAttribute("data-kind"))}function Mx(e,t,a,r){if(!e)return[];const l=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=l.createElement("div");m.className="we-chrome-ring we-chrome-ring--selection",e.insertBefore(m,u),c.push(m)}c.forEach((m,p)=>_2(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 NM(e,t,a){if(!e)return;if(!t||!a){rp(e);return}const r=Cd(t),l=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",`${_M}px`),l&&c&&(e.removeAttribute("data-active"),e.offsetWidth),e.setAttribute("data-active","true")}function rp(e){e&&(e.removeAttribute("data-active"),e.textContent="")}function Hr(e){return typeof CSS<"u"&&CSS.escape?CSS.escape(e):e.replace(/[^a-zA-Z0-9_-]/g,t=>`\\${t}`)}function fg(e){const t=e.filter(a=>OM(a));return t.length>0?t:e.slice(0,1)}function j2(e,t,a){const r=Array.from(e.querySelectorAll(`[${a.slotId}="${Hr(t)}"]`)).filter(l=>Ki(l,a));return fg(r)}function MM(e,t,a){if(!t||t.kind!=="slot"||t.item_index==null)return[];const r=[];for(const l of e)r.push(...dg(l,t.item_index,a).filter(c=>Ki(c,a)));return fg(r)}function O2(e,t,a){if(!t)return[];const r=e.querySelector(`[${a.sectionInstanceId}="${Hr(t.instance_id)}"]`);if(!r)return[];if(t.kind==="section")return[r];const l=j2(r,t.slot_id,a);if(l.length===0)return[];if(t.item_index!=null||t.field_name){const c=t.field_name?`[${a.slotField}="${Hr(t.field_name)}"]`:null,u=[];for(const m of l){let p=[m];if(!(t.item_index!=null&&(p=dg(m,t.item_index,a).filter(g=>Ki(g,a)),p.length===0)))for(const g of p)if(c){const b=E2(g,c,m,a).filter(v=>Ki(v,a));if(b.length>0){u.push(...b);continue}g!==m&&u.push(g)}else u.push(g)}if(u.length>0)return fg(u)}return l.map(c=>{const u=c.closest(`[${a.slotGroup}]`);return u&&Ki(u,a)?u:c})}function CM(e,t,a){return O2(e,t,a)[0]??null}const Cx="we-enh-shield",RM="we-enh-shield--item",$o="data-we-live";function TM(e,t,a){if(!t||t.kind!=="slot"||t.item_index==null)return[];const r=[];for(const l of A2(e,t,a))r.push(...dg(l,t.item_index,a).filter(c=>Ki(c,a)));return r}function A2(e,t,a){if(!t||t.kind!=="slot")return[];const r=e.querySelector(`[${a.sectionInstanceId}="${Hr(t.instance_id)}"]`);return r?Array.from(r.querySelectorAll(`[${a.slotId}="${Hr(t.slot_id)}"]`)):[]}function DM(e,t,a){if(e.querySelectorAll(`[${$o}]`).forEach(l=>l.removeAttribute($o)),!t)return;const r=e.querySelector(`[${a.sectionInstanceId}="${Hr(t.instance_id)}"]`);if(r)if(t.kind==="section")r.setAttribute($o,"true");else{const l=TM(e,t,a),c=l.length>0?l:A2(e,t,a).filter(u=>Ki(u,a));for(const u of c)u.setAttribute($o,"true")}}const $r=1440,Rx=Math.round($r*9/16),N2=14,hg="we-frame-defaults";function LM(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 zM(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 ${hg} {
|
|
136
|
-
[${e}] > .we-section-body > * { flex-shrink: 0; }
|
|
137
|
-
}`}function $M(e,t){const a=t?`#we-page {
|
|
138
|
-
padding: 0;
|
|
139
|
-
}`:`#we-page {
|
|
140
|
-
width: ${$r}px;
|
|
141
|
-
min-height: ${Rx}px;
|
|
142
|
-
overflow: hidden;
|
|
143
|
-
border-radius: ${N2}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: ${Rx}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 ${hg} {
|
|
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?zM(e.sectionInstanceId):LM(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
|
-
.${Cx} {
|
|
250
|
-
position: absolute;
|
|
251
|
-
inset: 0;
|
|
252
|
-
z-index: 1;
|
|
253
|
-
cursor: pointer;
|
|
254
|
-
background: transparent;
|
|
255
|
-
}
|
|
256
|
-
.${RM} { z-index: 2; }
|
|
257
|
-
[${$o}] .${Cx} { 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([${$o}]) .tr-slider__nav { pointer-events: none; }
|
|
265
|
-
`}function UM(e,t){const r=e/$r,l=Number.POSITIVE_INFINITY;return Math.max(.05,Math.min(.9,.72*r,.1926*r+.54,l))}const IM=420,Tx=.92;function HM(e,t,a){if(!a)return e;const r=Math.max(e,IM/a.width),l=Math.min(.9,e*$r/a.width,Tx*t.availableWidthPx/a.width,Tx*t.availableHeightPx/a.height);return Math.max(.05,Math.min(r,l))}const nd="/section-assets/",M2="[A-Za-z0-9._-]+\\.[A-Za-z0-9]+",BM=new RegExp(`^${M2}$`),qM=new RegExp(`${nd.replace(/\//g,"\\/")}(${M2})`,"g");function FM(e){switch(e.kind){case"canonical":return nd;case"publishedDocument":return"/assets/";case"publishedStylesheet":return"";case"canvas":return`${e.basePath}runtime/section-asset/`}}function PM(e,t){const a=e.startsWith(nd)?e.slice(nd.length):"";if(!BM.test(a))throw new Error(`not a canonical section-asset ref: ${e}`);return`${FM(t)}${a}`}function VM(e,t){return e.replace(qM,a=>PM(a,t))}function Dx(e,t,a){var l;let r=e.closest(`[${t}]`);for(;r&&!Ki(r,a);)r=((l=r.parentElement)==null?void 0:l.closest(`[${t}]`))??null;return r}function GM(e,t,a){for(const r of Array.from(e.querySelectorAll(`[${a.markers.slotId}]`))){if(r.closest(`[${a.markers.slotGroup}]`)!==e)continue;const l=r.getAttribute(a.markers.slotId);if(l&&a.isSlotEditable(t,l))return l}return null}function KM(e,t,a){if(!e)return null;const r=e.closest(`[${a.markers.sectionInstanceId}]`),l=r==null?void 0:r.getAttribute(a.markers.sectionInstanceId);if(!r||!l)return null;const c=t.find(_=>_.instance_id===l),u={selection:{kind:"section",instance_id:l},element:r};if(!c)return u;const m=Dx(e,a.markers.slotGroup,a.markers);if(m&&r.contains(m)){const _=GM(m,l,a);return _?{selection:{kind:"slot",instance_id:l,slot_id:_},element:m}:u}const p=Dx(e,a.markers.slotId,a.markers),g=p==null?void 0:p.getAttribute(a.markers.slotId);if(!p||!g||!a.isSlotEditable(l,g))return u;const b=Ax(e,a.markers.slotItem,p,a.markers),v=b?Number(b.getAttribute(a.markers.slotItem)):NaN,k=Number.isInteger(v)?v:void 0,w=Ax(e,a.markers.slotField,p,a.markers),j=(w==null?void 0:w.getAttribute(a.markers.slotField))??null,E=j&&a.isSlotEditable(l,g,j)?j:null;return{selection:{kind:"slot",instance_id:l,slot_id:g,...k!==void 0?{item_index:k}:{},...E?{field_name:E}:{}},element:(E?w:null)??b??p}}function op(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 YM(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 C2(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 l=t.createElement("p");return l.className="we-render-error__detail",l.textContent=((c=e.render_error)==null?void 0:c.message)??"Unknown render error.",a.appendChild(r),a.appendChild(l),a}function QM(e,t,a,r){const l=t.createElement("div");l.setAttribute(a.sectionInstanceId,e.instance_id),l.setAttribute("data-section-label",op(e)),l.dataset.svId=e.section_version_id,l.dataset.htmlHash=YM(e.html);const c=t.createElement("div");return c.className="we-section-body",e.render_error||e.html===null?c.appendChild(C2(e,t)):c.innerHTML=r(e.html),l.appendChild(c),l}const XM=`(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
|
-
})();`,Sa=96,qi=72,ZM=25.4,WM=/^(\d+(?:\.\d+)?)(in|mm)$/;function Tm(e){const t=WM.exec(e),[,a,r]=t??[];if(a===void 0||r===void 0)throw new Error(`malformed physical length: "${e}"`);const l=Number.parseFloat(a);return r==="mm"?l/ZM:l}function Rd(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/Sa*qi,pointHeight:e.height/Sa*qi,bleedPoints:0,panels:1,sheetWidth:e.width,sheetHeight:e.height,sheetPointWidth:e.width/Sa*qi,sheetPointHeight:e.height/Sa*qi};const t=e,a=Tm(t.width),r=Tm(t.height),l=t.bleed===void 0?0:Tm(t.bleed),c=a*Sa,u=r*Sa,m=l*Sa,p=c+2*m,g=u+2*m,b=t.dpi/Sa,v=t.panels??1;return{frameWidth:c,frameHeight:u,bleed:m,viewportWidth:p,viewportHeight:g,deviceScaleFactor:b,pixelWidth:Math.round(p*b),pixelHeight:Math.round(g*b),pointWidth:(a+2*l)*qi,pointHeight:(r+2*l)*qi,bleedPoints:l*qi,panels:v,sheetWidth:v*c+2*m,sheetHeight:g,sheetPointWidth:(v*a+2*l)*qi,sheetPointHeight:(r+2*l)*qi}}const R2="concrete-frame",T2="concrete-sheet";function JM(e){const t=Rd(e);return{"--frame-w":`${t.frameWidth}px`,"--frame-h":`${t.frameHeight}px`,"--frame-bleed":`${t.bleed}px`}}function eC(e){const t=Rd(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 nl(e){return JSON.stringify(e).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026")}function tC(e){return D2(e.id,{...JM(e)})}function D2(e,t){const a=Object.entries(t).map(([r,l])=>`${r}:${l}`).join(";");return{class:R2,dataFormat:e,style:a}}function Lx(e,t){const a=tC(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(eC(e)).map(([r,l])=>`${r}:${l}`).join(";");return`<div class="${Je(T2)}" style="${Je(a)}">${t.join("")}</div>`}function iC(e){switch(e.destination){case"published":return aC(e);case"artifact":return rC(e);case"preview":return oC(e);case"canvas":return lC(e)}}function L2(e){return e.kind==="none"||Object.keys(e.islandMap).length===0?[]:[`<script>${XM}<\/script>`]}const z2="html, body { margin: 0; padding: 0; }";function $2(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 aC(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 l of t.icons??[])a.push($2(l));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(...pg(e.stylesheets)),a.push(...gg(e.islands)),e.prefetchUrls&&e.prefetchUrls.length>0&&a.push(`<script type="speculationrules">${nl({prefetch:[{source:"list",urls:[...e.prefetchUrls]}]})}<\/script>`);const r=e.siteConfig?`
|
|
314
|
-
<script type="application/json" id="concrete-site-config">${nl(e.siteConfig)}<\/script>`:"";return mg({lang:t.lang??"en",head:a,body:` <body class="concrete-root">
|
|
315
|
-
${e.root.bodyHtml}${r}${yg(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(...pg(e.stylesheets));const a=[z2,...dC(e.root)];return t.push(U2(a)),t.push(...L2(e.islands)),t.push(...gg(e.islands)),mg({lang:"en",head:t,body:` <body>${uC(e.root)}${yg(e.islands,"eager")}</body>`})}function oC(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?[]:[$2({rel:"icon",href:e.icon})],...pg(e.stylesheets),U2([z2,...e.extraCss??[]]),...e.capture===!0?L2(e.islands):[],...gg(e.islands)],a=(e.devScripts??[]).map(r=>`
|
|
318
|
-
${r}`).join("");return mg({lang:"en",head:t,body:` <body>
|
|
319
|
-
${e.root.bodyHtml}${yg(e.islands,e.capture===!0?"eager":"viewport")}${a}
|
|
320
|
-
</body>`})}function lC(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}${cC(e.islands)}
|
|
331
|
-
<style>${e.frameCss}</style>
|
|
332
|
-
</head>
|
|
333
|
-
<body>
|
|
334
|
-
<div id="${Je(e.root.id)}"${sC(e.root)}></div>
|
|
335
|
-
</body>
|
|
336
|
-
</html>`}function sC(e){if(!e.pageBox)return"";const t=D2(e.pageBox.formatId,e.pageBox.tokens);return` class="${Je(t.class)}" data-format="${Je(t.dataFormat)}" style="${Je(t.style)}"`}function cC(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">${nl({imports:e.importMap})}<\/script>`}
|
|
339
|
-
<script>window.__TR_ISLAND_MAP=${nl(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 mg(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 uC(e){if(e.kind==="frame")return Lx(e.format,e.sectionHtml);const t=e.pages.map(l=>Lx(e.format,l)),{panels:a}=Rd(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 l=0;l<t.length;l+=a)r.push(nC(e.format,t.slice(l,l+a)));return r.join(`
|
|
352
|
-
`)}function dC(e){if(e.kind!=="frameStack")return[];const t=Rd(e.format).panels===1?R2:T2;return[`body > .${t} { break-after: page; }`,`body > .${t}:last-child { break-after: auto; }`]}function pg(e){return e.kind==="links"?e.hrefs.map(t=>`<link rel="stylesheet" href="${Je(t)}" />`):e.css.map(t=>`<style>${t}</style>`)}function U2(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 gg(e){if(e.kind!=="bundles")return[];const t=[],a=e.reactVendorMap;if(a&&Object.keys(a).length>0&&t.push(`<script type="importmap">${nl({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 yg(e,t){if(e.kind==="none"||Object.keys(e.islandMap).length===0)return"";const a=nl(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
|
-
${fC}
|
|
359
|
-
<script>window.__TR_ISLAND_MAP = ${a};${r}<\/script>
|
|
360
|
-
<script type="module" src="${Je(e.bootstrapUrl)}"><\/script>`}const fC=`<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 hC(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 mC(e,t,a){return iC({destination:"canvas",root:{kind:"canvas",id:"we-page",...a?{pageBox:{formatId:a.formatId,tokens:a.tokens}}:{}},islands:hC(e),stylesheets:{kind:"links",hrefs:e.stylesheets},base:e.basePath,defaultsLayer:hg,frameCss:$M(t,a)})}function pC(e){return!!(e!=null&&e.getElementById("we-page"))}function zx(e){const t=a=>VM(a,{kind:"canvas",basePath:e.assets.basePath});return{srcdoc:()=>mC(e.assets,e.markers,e.pageBox),buildSectionWrapper:(a,r)=>QM(a,r,e.markers,t),buildErrorPlaceholder:C2,resolveTarget:(a,r)=>KM(a,r,e),localizeSectionAssets:t,resolveSelectionEl:(a,r)=>CM(a,r,e.markers),resolveSelectionEls:(a,r)=>O2(a,r,e.markers),resolveVisibleSlotEls:(a,r)=>j2(a,r,e.markers),resolveItemEls:(a,r)=>MM(a,r,e.markers),setLiveOwner:(a,r)=>DM(a,r,e.markers)}}const I2=(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 gC(e){return I2(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 yC(e){return I2(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 bC=42,H2=16;function vC(e,t){const a=[];for(const l of e)for(a.push({sum:l.y,n:1,items:[l]});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 l of a){const c=l.sum/l.n-(l.n-1)/2*t;l.items.forEach((u,m)=>{r[u.idx]=c+m*t})}return r}const xC=gC("we-htab-eye-off"),wC=yC("we-htab-eye-on"),lp=new WeakMap;function kC(e,t,a,r){const l=e.createElement("button");l.type="button",l.className="we-htab",l.dataset.hiddenTab=t,l.title=`Show ${a}`,l.setAttribute("aria-label",`Show ${a}`),l.innerHTML=`<span class="we-htab-eye">${xC}${wC}</span><span class="we-htab-name"></span>`;const c=l.querySelector(".we-htab-name");return c&&(c.textContent=a),lp.set(l,r),l.addEventListener("click",u=>{var m;u.stopPropagation(),(m=lp.get(l))==null||m()}),l}function SC(e,t,a,r){const l=new Map;e.querySelectorAll(".we-htab").forEach(m=>{const p=m.dataset.hiddenTab;p&&l.set(p,m)});const c=new Set,u=[];for(const m of a){let p=l.get(m.instanceId);if(!p)p=kC(t,m.instanceId,m.label,()=>r(m.instanceId)),e.appendChild(p);else{const g=p.querySelector(".we-htab-name");g&&g.textContent!==m.label&&(g.textContent=m.label),p.title=`Show ${m.label}`,p.setAttribute("aria-label",`Show ${m.label}`),lp.set(p,()=>r(m.instanceId))}c.add(m.instanceId),u.push(p)}return l.forEach((m,p)=>{c.has(p)||m.remove()}),u}function EC(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}}),l=vC(r,bC);e.forEach((c,u)=>{c.style.top=`${l[u]}px`,c.style.left=`${H2-c.offsetWidth}px`})}const _C=48,jC=30,OC=`
|
|
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, ${$r}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(${_C}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 ${$r}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, ${$r}px);
|
|
537
|
-
height: var(--we-page-h, 0px);
|
|
538
|
-
border-radius: var(--we-page-radius, ${N2}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+H2} * 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
|
-
`,AC='<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>',id="we-canvas-frame",$x="we-frame-titlebar",Ux="we-canvas-frame-label",Ix="we-htabs",Hx="we-chrome-overlay";function Dm(e,t,a){const r=e.querySelector(t);if(r)return r;const l=a();return e.appendChild(l),l}function NC(e,t){const a=e.querySelector(`:scope > .${$x}`);if(a)return a;const r=t.createElement("div");return r.className=$x,e.insertBefore(r,e.firstChild),r}function MC(e){for(let t=e.nextElementSibling;t;t=t.nextElementSibling)if(t.classList.contains(id))return t;return null}function CC(e,t){const a=e.ownerDocument,r=NC(e,a),l=t.label??"",c=r.querySelector(`:scope > .${Ux}`);if(l==="")c==null||c.remove();else{const b=c??r.insertBefore(a.createElement("div"),r.firstChild);b.className=Ux,b.textContent!==l&&(b.textContent=l)}const u=Dm(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=Dm(e,`:scope > .${Ix}`,()=>{const b=a.createElement("div");return b.className=Ix,b}),p=Dm(e,`:scope > .${Hx}`,()=>{const b=a.createElement("div");return b.className=Hx,b.setAttribute("aria-hidden","true"),b});p.childElementCount===0&&(p.innerHTML=AC);const g=t.pageBox;return g?(e.style.setProperty("--we-page-w",`${g.width}px`),e.style.setProperty("--we-page-h",`${g.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 RC(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(l){e.style.setProperty("--we-page-h",`${l}px`)}}}function TC(e,t){const a=e.ownerDocument,r=new Map;for(const p of Array.from(e.querySelectorAll(`:scope > .${id}`))){const g=p.dataset.frameKey;g!==void 0&&r.set(g,p)}const l=[],c=[],u=new Set;for(const p of t){let g=r.get(p.key);g||(g=a.createElement("div"),g.className=id,g.dataset.frameKey=p.key);const b=CC(g,p);l.push(g),u.add(p.key),c.push(RC(g,p.key,b))}let m=null;for(let p=l.length-1;p>=0;p--){const g=l[p];g&&((g.parentNode!==e||MC(g)!==m)&&e.insertBefore(g,m),m=g)}return r.forEach((p,g)=>{u.has(g)||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 DC(e,t,a){const r=[];for(const l of e){const c=l.doc;if(!c)continue;const u=t.resolveSelectionEls(c,a);u.length>0&&r.push({handle:l,els:u})}return r}function LC(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 zC=24;function $C(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 UC(e,t,a,r){const l=t+e.top*a-r,c=e.height*a;return{top:l,bottom:l+c,height:c}}const Bx="__trEditorBridge",IC=1,B2=new WeakMap;function HC(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 BC(e){const t=e[Bx];if(t)return t;const a=new Set,r={protocol:IC,selection:null,subscribe(l){return a.add(l),()=>{a.delete(l)}}};return B2.set(r,a),e[Bx]=r,r}function qC(e,t,a){if(!e||!t)return;const l=BC(e);l.selection=HC(a);for(const c of[...B2.get(l)??[]])c()}const FC=6,Er=12,PC=288,VC='[aria-modal="true"]',GC=".hp-sb-scroll";function Br(e){var u,m;const t=window.innerWidth,a=window.innerHeight,r=(u=e.closest(VC))==null?void 0:u.getBoundingClientRect(),l=r||(m=e.closest(GC))==null?void 0:m.getBoundingClientRect(),c=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)}:l?{top:Math.max(0,l.top),left:0,right:t,bottom:Math.min(a,l.bottom)}:{top:0,left:0,right:t,bottom:a};return{rect:e.getBoundingClientRect(),bounds:c,viewportHeight:a,viewportWidth:t}}function ml({rect:e,bounds:t,viewportHeight:a},{maxHeight:r=PC,minWidth:l=0,gap:c=FC,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-Er,p=e.top-t.top-c-Er,g=u??Math.min(r,220),b=m<g&&p>m,k=Math.max(0,Math.min(r,b?p:m)),w=Math.max(t.left+Er,Math.min(e.left,t.right-Math.max(e.width,l)-Er)),j={left:w,width:e.width,maxWidth:Math.max(e.width,l,t.right-w-Er),maxHeight:k};return b?{...j,bottom:a-e.top+c}:{...j,top:e.bottom+c}}function KC(e,t,a){const[r,l]=x.useState(null);return x.useEffect(()=>{if(!e)return;const c=()=>{const m=t.current;m&&l(Br(m))},u=requestAnimationFrame(c);return window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),()=>{cancelAnimationFrame(u),window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c)}},[e,t]),!e||!r?null:ml(r,a)}const q2=Symbol.for("@homepages/concrete:row:of"),F2=Symbol.for("@homepages/concrete:element:of");function bg(e){return typeof e=="object"&&e!==null&&e.kind==="sibling"&&Hn(e.of)}function YC(e,t){return e===t||Zt(e)&&Zt(t)&&e.key===t.key}function P2(e,t){const a=[...e];for(const r of t??[])a.some(l=>YC(l,r))||a.push(r);return a}function pl(e){return typeof e=="object"&&e!==null&&"section"in e&&typeof e.section=="string"&&"slot"in e&&typeof e.slot=="string"}function V2(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="row"&&"field"in e&&typeof e.field=="string"}function ic(e){if(!V2(e))return;const t=e[q2];return typeof t=="object"&&t!==null?t:void 0}function Ia(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="element"}function QC(e){if(!Ia(e))return;const t=e[F2];return typeof t=="object"&&t!==null?t:void 0}function Zt(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="home"&&"key"in e&&typeof e.key=="string"}function XC(e){return typeof e=="object"&&e!==null&&"head"in e&&typeof e.head=="object"&&"declaration"in e&&Hn(e.declaration)}function Hn(e){return typeof e=="object"&&e!==null&&"type"in e&&typeof e.type=="string"}function Lm(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:P2(e.reads,e.requires),requires:[...e.requires]}}function Ha(e){return typeof e=="object"&&e!==null&&"kind"in e&&e.kind==="compute"&&"fn"in e&&typeof e.fn=="function"}function vg(e){return typeof e=="object"&&e!==null&&e.kind==="compute"&&typeof e.fn=="function"}function ZC(e){return vg(e.source)}const WC="written-without-pick-none",JC={write:new Set(["brief","reads","requires","none"]),pick:new Set(["brief","reads","requires","unique"]),find:new Set(["brief","reads","requires","none"])};function xg(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=JC[e],l={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 \`${WC}\` 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(g=>`\`${g}\``).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&&(l[u]=u==="reads"||u==="requires"?[...m]:m)}const c=l.requires;return c!==void 0&&(l.reads=P2(l.reads??[],c)),l}function e5(e){return xg("write",e)}function t5(e){return xg("pick",e)}function n5(e){return xg("find",e)}const ki={write:e5,pick:t5,find:n5};function Ga(e,t){if(qr(e))return[e];if(!Array.isArray(e)||!e.every(l=>typeof l=="object"&&l!==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(l=>!qr(l)).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 Td(e){return qr(e)||Array.isArray(e)&&e.length>0&&e.every(qr)}function qr(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 wg=Symbol.for("@homepages/concrete:fill:declaration");function i5(e){return Td(e)?{[wg]:qr(e)?[e]:[...e]}:{}}function Ka(e){if(!(typeof e!="object"||e===null))return e[wg]}const a5=["Basement","Ground","1st floor","2nd floor","3rd floor","4th floor","Penthouse"],qx=["id","slot","index","def","value","present","enclosing"],Yr=["image","video","tour","document"];function pn(e){return Yr.includes(e)}function gl(e){return e==="media"||pn(e)}const Ya={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:{}}},G2=Object.keys(Ya),r5=G2.filter(e=>Ya[e].site==="holder");G2.filter(e=>Ya[e].site==="kind");function o5(e){return typeof e=="string"&&Object.hasOwn(Ya,e)}function K2(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;const{kind:t,verb:a}=e;return t==="process"&&o5(a)?e:null}function kg(e){const t=Ya[e.verb],a=Object.keys(t.options),r=a.length>0?`it takes ${a.map(l=>`\`${l}\``).join(", ")}`:"it takes none";for(const[l,c]of Object.entries(e)){if(l==="kind"||l==="verb"||c===void 0)continue;if(l==="reads")return`\`${e.verb}\` takes no \`reads\` — a process is about one media value, never the property`;const u=t.options[l];if(u===void 0){const m=l==="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 "${l}" — ${r}${m}`}if(u.values!==void 0){if(typeof c!="string"||!u.values.includes(c))return`\`${e.verb}\`'s \`${l}\` is one of ${u.values.map(m=>`"${m}"`).join(", ")}`;continue}if(typeof c!==u.type||typeof c=="string"&&c.trim()==="")return`\`${e.verb}\`'s \`${l}\` is a non-empty ${u.type}`}for(const[l,c]of Object.entries(t.options))if(c.required&&e[l]===void 0)return`\`${e.verb}\` requires \`${l}\``;return null}function Ba(e){const{type:t,kinds:a}=e;if(t==="media"){const r=Array.isArray(a)?a.filter(l=>typeof l=="string"&&pn(l)):[];return r.length>0?r:Yr}return typeof t=="string"&&pn(t)?[t]:[]}function Y2(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"&&pn(c)))return`declares \`kinds\` ${JSON.stringify(t)} — a non-empty list of ${Yr.join(", ")}`}if(a===void 0)return null;const r=r5.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 l=new Set;for(const c of a){const u=K2(c);if(u===null)return`processes ${JSON.stringify(c)}, which is no process (${r})`;const{verb:m}=u,p=Ya[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(l.has(m))return`processes "${m}" twice — a holder declares each process once`;l.add(m);const g=kg(u);if(g!==null)return`processes "${m}" with options that do not fit: ${g}`;const b=Ba(e).filter(v=>!p.kinds.includes(v));if(b.length>0)return`processes "${m}", which applies to ${p.kinds.join(", ")} and not to ${b.join(", ")}`}return null}const l5=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 Q2(e){const t=(e.split(";")[0]??"").trim().toLowerCase();return t.startsWith("image/")?"image":t.startsWith("video/")?"video":l5.has(t)?"document":null}function X2(e){const t=ac(e);if(t===null)return null;const a=Qa[t].kind;return a==="tour"||a==="video"?a:null}const s5=["tour","video","social","listing","file","map"],Qa={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 ac(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(Qa))if(r.pattern.test(t.hostname)&&!(r.path&&!r.path.test(t.pathname)))return a;return null}function c5(e,t){const a=ac(t);return a===null?!1:a===e?!0:s5.includes(e)&&Qa[a].kind===e}const u5=new Set(Yr.filter(e=>Object.values(Qa).some(t=>t.kind===e)));function Sg(e){return e.filter(t=>u5.has(t))}function Z2(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 d5(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 h5(e){try{return new URL(e)}catch{return null}}function Ns(e){const t=e.trim();return t&&(/^https?:\/\//i.test(t)?t:`https://${t}`)}function Eg(e){const t=h5(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 m5(e){const t=e.trim();if(!t)return null;const a=ac(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&&p5.has(a)?t:null}const p5=new Set(["biganto","iguide","kuula","momento360","cloudpano","asteroom","zillow3d"]);function W2(e,t){return[e,t].map(a=>(a??"").trim()).filter(a=>a!=="").join(", ")}const g5=["autocomplete","manual_pinned","resolved"],J2=["street","unit","city","state","postal"],_g=[...J2,"latitude","longitude"];function Dd(e){return _g.includes(e)}function xs(e){if(typeof e!="string")return null;const t=e.trim();return t===""?null:t}function Fx(e,t){return typeof e=="number"&&Number.isFinite(e)&&Math.abs(e)<=t?e:null}function xi(e){if(typeof e!="object"||e===null||Array.isArray(e))return null;const t=e,a=Fx(t.latitude,90),r=Fx(t.longitude,180),l=a!==null&&r!==null,c=t.source,u={street:xs(t.street),unit:xs(t.unit),city:xs(t.city),state:xs(t.state),postal:xs(t.postal),latitude:l?a:null,longitude:l?r:null,source:typeof c=="string"&&g5.includes(c)?c:null};return l||J2.some(m=>u[m]!==null)?u:null}function jg(e){var t;return((t=/^\s*(\d{5})-?\d{4}\s*$/.exec(e))==null?void 0:t[1])??e}function y5(e){const t=W2(e.street,e.unit),a=[e.state,e.postal===null?null:jg(e.postal)].filter(l=>l!==null).join(" "),r=[t,e.city??"",a].filter(l=>l!=="").join(", ");return r===""?null:r}function b5(e,t){const a=xi(e);return a===null?null:a[t]}const eS=["crop","cutout","mask_white","mask_black"],v5=["master","crop","cutout","mask_white","mask_black","poster","encode"];function rc(e){return e!==null&&!(e.x<=0&&e.y<=0&&e.width>=1&&e.height>=1)}function x5(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 k5(e,t){const{id:a,renditions:r,...l}=e,c=e.kind==="image";return{...l,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 S5(e){const{id:t,file:a,crop:r,name:l,renditions:c,...u}=e,{crop:m,cutout:p,mask_white:g,mask_black:b,...v}=c;return{file:{...u,id:a,renditions:v},value:{id:t,file:a,crop:r,name:l,renditions:{crop:m,cutout:p,mask_white:g,mask_black:b}}}}function Og(e,t){return k5(e,t)}function E5(e){return e.url===null?"upload":"link"}function Yi(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ld(e){if(!Yi(e))return!1;const{id:t,kind:a,renditions:r}=e;return typeof t=="string"&&typeof a=="string"&&pn(a)&&Yi(r)}function oc(e){return Yi(e)&&typeof e.id=="string"&&typeof e.file=="string"&&Yi(e.renditions)&&!("kind"in e)&&!("picked"in e)}function tS(e){return Yi(e)&&typeof e.file=="string"&&e.file!==""&&!oc(e)&&!Ld(e)}function Xa(e){return Yi(e)&&typeof e.media=="string"&&e.media!==""}function qa(e){if(Yi(e)){if(Xa(e))return e.media;if(oc(e)||Ld(e))return e.id;if(tS(e))return e.picked??e.file}}function _5(e){if(Xa(e))return e.media;if(tS(e))return e.file}function sp(e,t){if(Array.isArray(e))for(const a of e)sp(a,t);else if(oc(e))t.has(e.id)||t.set(e.id,e);else if(Yi(e)&&!Ld(e))for(const a of Object.values(e))sp(a,t)}function zd(e){const t=new Map;for(const[a,r]of Object.entries(e))a!=="files"&&sp(r,t);return t}function j5(e){return Object.hasOwn(e,"crop")||e.renditions!==void 0}function O5(e,t){const a=Object.hasOwn(t,"crop"),r=t.renditions??{},l=a?null:e.renditions,c=Object.fromEntries(eS.map(u=>[u,Object.hasOwn(r,u)?r[u]??null:(l==null?void 0:l[u])??null]));return{crop:a?t.crop??null:e.crop,renditions:c}}function Ag(e,t){return j5(t)?{...e,...O5({crop:e.crop,renditions:e.renditions},t)}:e}function ad(e){if(Array.isArray(e))return e.map(ad);if(!Yi(e))return e;if(Ld(e)||oc(e))return{media:e.id};if(Xa(e)){const{crop:a,renditions:r,...l}=e;return l}const t={};for(const[a,r]of Object.entries(e))t[a]=ad(r);return t}const rd="property.uploads";function lc(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 od(e){const t=Ba(e);if(t.length===0)return null;const a=lc(e.from);return a===void 0?{kinds:t}:{kinds:t,from:a}}function Ls(e){return{kinds:e.kinds,from:lc(e.from)??[rd]}}function nS(e){return Ls(e).from[0]}function cp(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function A5(e){if(qa(e)!==void 0||!cp(e))return e;for(const t of Object.values(e))if(qa(t)!==void 0)return t}function iS(e,t){const[a,...r]=t.split(".");if(a!=="property"||r.length===0)return null;let l=e;for(const c of r)if(l=Array.isArray(l)?l.find(u=>cp(u)&&u.id===c):cp(l)&&Object.hasOwn(l,c)?l[c]:void 0,l===void 0)return null;return Array.isArray(l)?l.flatMap(c=>{const u=A5(c),m=qa(u);return m===void 0?[]:[{id:m,value:u}]}):null}function N5(e,t){const a=zd(e),r=new Set,l=[];for(const c of lc(t.from)??[])for(const{id:u,value:m}of iS(e,c)??[]){if(r.has(u))continue;const p=a.get(u),g=p===void 0||!Object.hasOwn(e.files,p.file)?void 0:e.files[p.file];if(p===void 0||g===void 0||!t.kinds.includes(g.kind))continue;r.add(u);const b=Xa(m)?Ag(p,m):p;l.push({id:u,value:b,file:g,list:c})}return l}function M5(e,t){const a={uploads:(e[rd]??t.map(r=>r.id)).map(r=>x5(r))};for(const[r,l]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!==rd&&(a[u]=l.map(p=>({media:p})))}return{...a,files:Object.fromEntries(t.map(r=>[r.id,r]))}}function C5(e,t){const a=new Map(t.map(c=>[c.id,S5(c)])),r=M5(e,[...a.values()].map(({file:c})=>c)),l=r.uploads.map(c=>{var u;return((u=a.get(c.id))==null?void 0:u.value)??c});return{...r,uploads:l}}function R5(e){if(e===null||typeof e!="object")return null;const t=e;return t.type!=="media"||t.kinds===void 0||Y2({type:"media",kinds:t.kinds})!==null||t.from!==void 0&&(!Array.isArray(t.from)||lc(t.from)===void 0)?null:od(t)}function T5(e,t){const a=new Set(e),r=t.filter(u=>a.has(u)),l=new Set(r);let c=0;return e.map(u=>l.has(u)?r[c++]:u)}const Uo=new Map;function aS(e){Uo.set(e.home,e)}function rS(e){const t=Uo.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 oS=new Set(["text","select","email","phone","url","date"]);function Ng(e){switch(e.type){case"number":case"image":case"address":return e.type;case"list":return D5(e.element);default:return oS.has(e.type)?"text":null}}function D5(e){return e.type==="object"?"row_list":e.type==="image"?"image_list":e.type==="number"?"number_list":oS.has(e.type)?"text_list":null}function up(e){if(e.type==="list"){const a=e.element;if(a.type!=="object")return up(a);for(const r of Object.values(a.fields)){const l=up(r);if(l!==void 0)return l}return}const t=e.from===void 0?null:od(e);return(t==null?void 0:t.from)===void 0?void 0:t}function L5(e){if(e.type!=="list")return!1;const t=e.element.type;return pn(t)||t==="media"}function z5(e){return Object.entries(e.pages).flatMap(([t,a])=>L5(a.declaration)?[`${e.home}.${t}`]:[])}function $5(e){return vg(e.source)}const Px=new WeakMap;function lS(e){let t=Px.get(e);return t===void 0&&(t=U5(e),Px.set(e,t)),t}function U5(e){const t=new Map;for(const[a,r]of Object.entries(e.pages)){const l=r.declaration;if(l.type==="list")continue;const c=`${e.home}.${a}`;if(l.type==="address"){t.set(c,{declaration:l,value_type:"address"});for(const u of _g)t.set(`${c}.${u}`,{declaration:l,value_type:sS(u)});continue}t.set(c,{declaration:l,value_type:I5(c,l)})}return t}function I5(e,t){if(t.type==="image")return"image";if(pn(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 sS(e){return e==="latitude"||e==="longitude"?"number":"text"}function H5(e,t){if(t.type!=="list")return null;const a=t.element;return a.type==="object"?e:a.type==="row"?a.from.slice(a.from.indexOf(".")+1):null}let zm;function cS(){if(zm!==void 0)return zm;rS("library");const e=new Map;for(const t of Uo.values())for(const[a,r]of Object.entries(t.pages)){const l=H5(a,r.declaration);l!==null&&e.set(`${t.home}.${a}`,l)}return Uo.has("property")&&Uo.has("library")&&(zm=e),e}function B5(){return[...new Set(cS().values())]}function on(e){return typeof e=="string"?cS().get(e)??null:null}function Mg(e){return(e==null?void 0:e.kind)==="home"?on(e.key):null}function Cg(e){for(const t of Uo.values()){const a=Object.hasOwn(t.pages,e)?t.pages[e]:void 0;if((a==null?void 0:a.declaration.type)==="list"&&a.declaration.element.type==="object")return t.home}throw new Error(`fact registry: no linked registry declares a table "${e}"`)}function uS(e){return`property.${e}`}function dS(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 fS(e){return dS(rS(Cg(e)),e)}function hS(e,t){return Object.hasOwn(e,t)?e[t]:void 0}function sc(e,t){const a=hS(fS(e),t);return a===void 0?void 0:Ng(a)}function q5(e){if(typeof e!="string")return null;const t=e.lastIndexOf(".");if(t<=0)return null;const a=on(e.slice(0,t));if(a===null)return null;const r=e.slice(t+1);return sc(a,r)==="row_list"?{table:a,member:r}:null}function F5(e){if(typeof e!="string")return null;const t=e.lastIndexOf(".");if(t<=0)return null;const a=e.slice(0,t),r=on(a);if(r===null)return null;const l=e.slice(t+1);return sc(r,l)===void 0?null:{table:r,tableKey:a,member:l}}const Rg=["type","label","from","source","locked","when"],Vx=new Set(Rg),Tg=Symbol.for("@homepages/concrete:table-of");function mS(e,t){return Object.defineProperty(e,Tg,{value:t,enumerable:!1})}function Dg(e){if(typeof e!="object"||e===null)return null;const t=e[Tg];return typeof t=="string"?t:null}function P5(e){return Object.keys(fS(e))}function zs(e,t){return Object.freeze({kind:"row",field:t,[q2]:e})}function V5(e,t){return new Proxy(zs(e,t),{get(a,r,l){return typeof r=="string"&&!(r in a)&&Dd(r)?zs(e,`${t}.${r}`):Reflect.get(a,r,l)}})}const pS=Symbol.for("@homepages/concrete:row:definition");function wi(e){const t=e[pS];return typeof t=="object"&&t!==null?t:e}const G5=new Set(["then","toJSON","$$typeof","asymmetricMatch","nodeType","tagName","@@iterator"]);function K5(e,t,a=[]){const r=t===null?null:new Set(P5(t)),l=new Proxy(e,{get(c,u,m){if(u===pS)return c;if(typeof u!="string")return Reflect.get(c,u,m);if(t!==null&&r!==null){const p=[t,...a],g=p.map(v=>v===t&&!r.has(u)?void 0:sc(v,u));if(g.every(v=>v===void 0))return Reflect.get(c,u,m);const b=g.findIndex(v=>v===void 0||v!==g[0]);if(b===-1)return g[0]==="address"?V5(l,u):zs(l,u);if(u in c||Vx.has(u))return Reflect.get(c,u,m);throw new Error(`row: "${String(c.label)}" reads the member "${u}", which its \`from\` table ${p[b]} ${g[b]===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||Vx.has(u)?Reflect.get(c,u,m):G5.has(u)?void 0:zs(l,u)}});return l}function Y5(e){const t=new Proxy(e,{get(a,r,l){return typeof r=="string"&&!(r in a)&&Dd(r)?zs(t,r):Reflect.get(a,r,l)}});return t}function Gx(e,t){const a=e.map(t);return a.some((r,l)=>r!==e[l])?a:void 0}function Kx(e,t){const a=e.reads===void 0?void 0:Gx(e.reads,t),r=e.requires===void 0?void 0:Gx(e.requires,t);return a===void 0&&r===void 0?e:{...e,...a===void 0?{}:{reads:a},...r===void 0?{}:{requires:r}}}function il(e,t){const a=wi(e);let r;const l=a.source;if(l!==void 0)if(Ha(l)){const u=Kx(l,t);u!==l&&(r={...a,source:u})}else{const u=t(l);u!==l&&(r={...a,source:u})}const c=Ka(a);if(c!==void 0){let u=!1;const m=c.map(p=>{const g=Kx(p,t);return g!==p&&(u=!0),g});u&&(r={...r??a,[wg]:m})}return r??a}function Q5(e){return t=>{const a=ic(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 gS=new Set(["row","address"]);function X5(e){const t=new Map;for(const[a,r]of Object.entries(e))typeof r=="object"&&r!==null&&gS.has(r.type)&&t.set(r,a);return t}function Z5(e,t,a){const r=[e.source];il(e,l=>(r.push(l),l));for(const[l,c]of t)if(!(l===e||c===a))for(const u of Rg){const m=l[u];if(m!==void 0&&r.includes(m))return`${c}.${u}`}}function W5(e){const t=e.slice(e.indexOf(".")+1);return`reads \`${e}\`, which is the row's own \`${t}\`, not a member — a row's ${Rg.map(a=>`\`${a}\``).join(", ")} are its slot definition's, and its table has no member named \`${t}\`.`}function $s(e){return gS.has(e.type)?{...wi(e)}:e}function Lg(e,t){for(const a of Ga(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 J5(e){return pl(e)?{kind:"section",section:e.section,slot:e.slot}:Hn(e)?{kind:"sibling",of:e}:Zt(e)?{kind:"home",key:e.key}:e}function si(e){return zg(e,J5)}function e4(e,t,a){if(!(t!==!0||a===void 0)){if(Ha(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(pl(a)||Hn(a)||bg(a))throw new Error(`${e} is \`required\` and mirrors another slot — a mirror requires its upstream; mark that slot \`required\` instead.`)}}function zg(e,t){const a=e.source;e4(e.label??"a slot",e.required,a);const r=a!==void 0&&Ga(a,e.label??"a slot")===void 0;return{...e.locked===!0?{locked:!0}:{},...e.required===!0?{required:!0}:{},...r?{source:t(a)}:{},...i5(a),...e.label!==void 0?{label:e.label}:{},...e.placeholder!==void 0?{placeholder:e.placeholder}:{},...e.when!==void 0?{when:e.when}:{}}}function $m(e){return t=>({type:"text",size:e,...si(t),...t.cap!==void 0?{cap:t.cap}:{}})}const mn={short:$m("short"),medium:$m("medium"),long:$m("long")};function rn(e){return{type:"number",...si(e),...e.thousandsSep!==void 0?{thousandsSep:e.thousandsSep}:{},...e.decimals!==void 0?{decimals:e.decimals}:{},...e.maxDigits!==void 0?{maxDigits:e.maxDigits}:{}}}function t4(e){return{type:"select",...si(e),...e.creatable!==void 0?{creatable:e.creatable}:{}}}function n4(e){if(Zt(e.source))throw new Error(`select: "${e.label}" declares both \`from\` and a fact \`source\` — a select takes exactly one set of choices.`);return Lg(`select: "${e.label}"`,e.source),{type:"select",...si(e),values:[...e.from],...e.creatable!==void 0?{creatable:e.creatable}:{}}}function i4(e,t){if(qr(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 Lg("select: a display entry",t.source),{cases:[...e],...t.locked===!0?{locked:!0}:{},...t.source!==void 0?{source:t.source}:{}}}function a4(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?n4(e):t4(e)}const ld=a4;function zo(e){return{type:"url",...si(e),...e.accepts!==void 0?{accepts:e.accepts}:{}}}function yS(e){return{type:"date",...si(e)}}function r4(e){return{type:"email",...si(e)}}function o4(e){return{type:"phone",...si(e)}}function $g(e={}){return Y5({type:"address",...si(e)})}function bS(e,t){const a=`${e}: "${t.label??e}"`;if(Lg(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 media 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=Y2({type:e,kinds:t.kinds,process:t.process});if(r!==null)throw new Error(`${a} ${r}.`);const l=Ga(t.source,a),c=t.source!==void 0&&l===void 0&&!Ha(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||Ha(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((l==null?void 0:l.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 media.`);const u=l4(a,e,t.kinds,t.from),m=u==null?void 0:u.map(p=>Zt(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 l4(e,t,a,r){if(r===void 0)return;const l=Array.isArray(r)?r:[r];if(l.length===0)throw new Error(`${e} declares \`from: []\` — name the media list it picks from, or omit \`from\` and the declaration owns its media.`);const c=Ba({type:t,kinds:a}),u=new Set;for(const m of l){const p=typeof m=="object"&&m!==null&&!Zt(m),g=Zt(m)?m.key:p&&"declaration"in m?m.declaration:m;if(u.has(g))throw new Error(`${e} picks \`from\` one media list twice — each list is named once; a media value two lists hold is one candidate, attributed to the first.`);if(u.add(g),!p)continue;const b=Ba(g.element);if(b.length>0&&!c.some(v=>b.includes(v)))throw new Error(`${e} picks \`from\` a list of ${b.join(", ")}, whose items can never be ${c.join(" or ")} — each list it picks from holds items of its kinds.`)}return l}function $a(e={}){return{type:"image",...si(e),...e.crop!==void 0?{crop:e.crop}:{},...bS("image",e)}}function Ug(e={}){return{type:"media",...si(e),...e.kinds!==void 0?{kinds:[...e.kinds]}:{},...bS("media",e)}}const Ig=Symbol.for("@homepages/concrete:object:declared-fields");function yl(e){return e[Ig]}function vS(e,t){const a=yl(t);return a!==void 0&&Object.defineProperty(e,Ig,{value:a,enumerable:!1}),e}const xS="a label is a source, as a text slot takes one",dp="`label: text.short({ cap: 60, source: fill.write({ reads, brief }) })`",s4=new Set(["type","size","cap","locked"]);function c4(e,t,a){if(typeof t=="string")throw new Error(`${e} declares the label ${JSON.stringify(t)} — ${xS}: write \`label: compute(() => ${JSON.stringify(t)})\`.`);if(Hn(t)){const r=Object.entries(a).find(([,l])=>l===t);if(r===void 0)return u4(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(Td(t)){const r=qr(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: ${dp}.`)}return mn.short({locked:!0,source:t})}function u4(e,t){const a=Ka(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 — ${xS}: write what that slot read as the label (\`label: comp.address.street\`, \`label: compute(() => "Listing agent")\`), a written label as ${dp}; a title the user edits is a field, which the label names by its const.`);const r=Object.keys(t).filter(u=>!s4.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: ${dp}; a title the user edits is a field, which the label names by its const.`);const{size:l,cap:c}=t;return mn[l]({locked:!0,source:a.length===1?a[0]:a,...c!==void 0?{cap:c}:{}})}function d4(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 f4(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 Ms="declare the list at the top level instead";function f4(e){const t=Ka(e);if(t!==void 0&&t.some(l=>l.verb!=="pick")||t===void 0&&Td(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; ${Ms}`;const a=e.source;if(Zt(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; ${Ms}`;if(pl(a)||bg(a)||Hn(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; ${Ms}`;const r=e.element.fields;for(const[l,c]of Object.entries(r)){const u=h4(c,r);if(u!==void 0)return`a list of objects whose item field "${l}" is ${u}`}}function h4(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(Ka(e)!==void 0)return`filled — no fill writes into a list inside an object; ${Ms}`;const a=e.source;if(a===void 0)return;if(Ha(a))return`a \`compute()\` — an item of a list inside an object reads its element, or a row \`from\` its member; ${Ms}`;const{kind:r,slot:l}=a;if(r==="element"&&e.type==="row"&&on(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 l=="string"&&((u=t[l])==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 cc(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=qx.find(b=>Object.hasOwn(e.fields,b));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 ${qx.map(b=>`\`${b}\``).join(", ")}. Rename the field.`);const r=e.label===void 0?void 0:c4(t,e.label,e.fields),l=r!==void 0&&!("type"in r)?r:void 0,c={...r===void 0||l!==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[b,v]of Object.entries(c)){const k=d4(v);if(k!==void 0)throw new Error(`${t} field "${b}" is ${k}.`);if(b!=="label"&&v.label===void 0)throw new Error(`${t} field "${b}" declares no \`label\` — every field of an object states the name the editor shows it by.`)}const u=X5(c);for(const[b,v]of Object.entries(c)){const k=Z5(v,u);if(k!==void 0)throw new Error(`${t} field "${b}" ${W5(k)}`)}const m=Q5(u),p={};for(const[b,v]of Object.entries(c))p[b]=$s(il(v,m));const g={type:"object",...e.locked===!0?{locked:!0}:{},...l!==void 0?{label:l}:{},fields:p,...e.when!==void 0?{when:e.when}:{}};return Object.defineProperty(g,Ig,{value:c,enumerable:!1}),g}function m4(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:l}=t;return a==="section"&&typeof r=="string"&&typeof l=="string"?{kind:"section",section:r,slot:l}:null}const uc=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function Hg(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"||!uc(r.fields))return;const l=t.slice(a+1);return Object.hasOwn(r.fields,l)?r.fields[l]:void 0}function wS(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=Hg(e,a);return r===void 0?void 0:{path:a,def:r,sibling:!1}}function p4(e){return e==="row"||e==="address"}function g4(e,t,a){const r=wS(e,t,a);if(!(r===void 0||!p4(r.def.type)))return{...r,kind:r.def.type}}function y4(e){return on(e.from)}function Us(e){if(!Array.isArray(e.from)){const t=y4(e);return t===null?[]:[t]}return e.from.flatMap(t=>on(t)??[])}function b4(e,t){const a=new Set,r=[];for(const l of t){const c=e[l];for(const u of c){const m=sd(u.id);m===null||a.has(m)||(a.add(m),r.push({id:m,table:l}))}}return r}function v4(e,t,a){if(t.length>1&&a!==null){const r=b4(e,t).find(l=>l.id===a);if(r!==void 0)return r.table}return t[0]??null}function kS(e){if(e===void 0)return;if(Yx(e.source))return e;if(e.type!=="object"||!uc(e.fields))return;const t=Object.values(e.fields).filter(a=>Yx(a.source));return t.length===1?t[0]:void 0}function SS(e){const t=kS(e);return(t==null?void 0:t.type)==="row"?Us(t):[]}function Yx(e){return uc(e)&&e.kind==="element"}function x4(e,t){return ES(e,e.section,e.slots,t,new Set)}function Qx(e,t,a,r,l){const c=`${t??""}\0${r}`;if(l.has(c))return[];l.add(c);const u=Hg(a,r);return(u==null?void 0:u.type)==="row"?Us(u):(u==null?void 0:u.type)==="list"?ES(e,t,a,u,l):[]}function ES(e,t,a,r,l){var v;const c=uc(r.source)?r.source:void 0;if(c===void 0||c.kind==="authored"||c.kind==="derived")return SS(r.element);const u=Mg(c);if(u!==null)return[u];const{kind:m,section:p,slot:g}=c;if(m!=="section"||typeof p!="string"||typeof g!="string")return[];if(p===t)return Qx(e,t,a,g,l);const b=(v=e.sectionSlots)==null?void 0:v.call(e,p);return b===void 0?[]:Qx(e,p,b,g,l)}const sd=e=>typeof e=="string"&&e!==""?e:null;function w4(e,t=null){if(typeof e=="string")return t===null?null:sd(e);const a=k4(e);return a===null?null:sd(e[a])}function k4(e){return uc(e)?["id","media","file"].find(t=>sd(e[t])!==null)??null:null}function S4(e,t){if(Zt(e)){if(on(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(pl(e))return{kind:"section",section:e.section,slot:e.slot};if(Hn(e))return{kind:"sibling",of:e};if(ic(e)!==void 0||Ha(e))return e;throw new Error(`list: "${t}" declares a source that is no list.`)}function _S(e){return Zt(e)?on(e.key):Hn(e)&&e.type==="list"?Dg(e):null}const E4=new Set(["label","locked","placeholder","when","source"]);function _4(e){const t={};for(const[a,r]of Object.entries(e))E4.has(a)||(t[a]=r);return t}function j4(e,t){if(Zt(e)&&on(e.key)!==null)return{type:"row",from:e.key,source:{kind:"element"}};for(const r of Ga(e,`list: "${t}"`)??[]){if(r.verb==="write")throw new Error(jS(t,"declares no `item`"));if(r.verb==="pick")throw new Error(fp(t,"declares no `item`"))}if(Td(e))return{type:"poi"};if(Hn(e)&&e.type==="list")return O4(e,t);const a=ic(e);if(a!==void 0){const r=Dg(a);if(r!==null&&sc(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 jS(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 OS(e){if(typeof e!="object"||e===null||e.type!=="object")return!1;const t=e.fields??{};return!Object.values(t).some(a=>Ia(a.source))}function Xx(e,t){if(e.type!=="object")return;const a=Object.entries(e.fields).filter(([,r])=>{var l;return r.type!=="row"&&((l=r.source)==null?void 0:l.kind)==="element"});if(a.length!==1)throw new Error(jS(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 O4(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"}}:_4(a)}function fp(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 hp(e){const t=wi(e);return t.type==="row"?typeof t.from=="string":t.type==="select"?Array.isArray(t.values):typeof t.type=="string"&&(pn(t.type)||t.type==="media")&&t.from!==void 0}function mp(e){return wi(e).source===void 0&&Ka(e)===void 0}function AS(e,t){if(e.type!=="object")return hp(e)&&mp(e)?null:void 0;const a=yl(e)??e.fields??{},r=Object.entries(a).filter(([,u])=>typeof u=="object"&&u!==null&&hp(u)&&mp(u)),l=r.filter(([,u])=>wi(u).type!=="select"),c=l.length>0?l: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 Zx(e){return{...$s(e),source:{kind:"element"}}}function Um(e,t){if(t===void 0)return null;const a=t===null?e:(yl(e)??e.fields)[t],r=wi(a);return r.type==="row"?on(r.from):null}function A4(e,t){if(t===null)return Zx(e);const a=e,r=(yl(e)??a.fields)[t],l=u=>u===r||typeof u=="object"&&u!==null&&wi(u)===wi(r)?{kind:"element"}:u,c={};for(const[u,m]of Object.entries(a.fields))c[u]=u===t?Zx(m):il(m,l);return vS({...a,fields:c},a)}function N4(e,t,a){const r=c=>{if(!Ia(c))return c;if(QC(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,g]of Object.entries(c.fields))u[p]=$s(il(g,r)),u[p]!==g&&(m=!0);return m?vS({...c,fields:u},c):c}return $s(il(e,r))}function NS(e,t){const a=e.type==="object"?Object.entries(e.fields):[["",e]];for(const[r,l]of a){const c=l.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 M4(e,t){if(e.item===void 0)return j4(e.source,t);const a=new Set((Ga(e.source,`list: "${t}"`)??[]).map(p=>p.verb));if(a.has("pick")){const p=C4(e.item,t);return a.has("write")&&Xx(p,t),p}const r={},l=Object.freeze({kind:"element",[F2]:r,[Tg]:_S(e.source)}),c=typeof e.item=="function"?e.item(l):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"&&Ka(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.`);NS(c,t);const u=N4(c,r,t);if(a.has("write")&&!OS(e.item)&&Xx(u,t),u.type==="object"||u.type==="row")return u;const m={...u};return delete m.locked,m}function C4(e,t){if(typeof e=="function")throw new Error(fp(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=AS(e,t);if(a===void 0)throw new Error(fp(t,"its item declares no field with `from` and no source"));NS(e,t);const r=A4(e,a);if(r.type==="object"||r.type==="row")return r;const l={...r};return delete l.locked,l}function R4(e,t){const a=e.source;if(!(a===void 0||(Ga(a,"list")??[]).some(c=>c.verb==="pick"))||typeof e.item!="object"||e.item===null)return _S(a);const l=e.item;if(a===void 0){if(l.type!=="object")return Um(l,hp(l)?null:void 0);const c=Object.entries(yl(l)??{}).filter(([,u])=>wi(u).type==="row"&&mp(u));return c.length===1?Um(l,c[0][0]):null}return Um(l,AS(l,t))}function ei(e){const t=e.label??"list";for(const g of["fields","title","unique","count"]){if(e[g]===void 0)continue;const b={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 \`${g}\`, which a list no longer takes — ${b[g]}.`)}const a=e.source,r=Ga(a,`list: "${t}"`),l=OS(e.item),c=(r==null?void 0:r.every(g=>g.verb==="pick"||g.verb==="write"&&l))===!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 g of r??[])if(g.verb==="pick"&&g.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",...zg(e,g=>S4(g,t)),element:M4(e,t),...e.min!==void 0?{min:e.min}:{},...e.max!==void 0?{max:e.max}:{}},m=Ha(a)?SS(u.element):void 0,p=m===void 0?R4(e,t):m.length===1?m[0]:null;return mS(u,p)}function $d(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[l,c]of Object.entries(t??{}))c!==void 0&&(a[l]=c);const r=kg(a);if(r!==null)throw new Error(`process.${e}(): ${r}.`);return a}function T4(e){return $d("cutout",e)}function D4(e){return $d("autocrop",e)}function Xi(e,t){return $d(e,t)}function L4(e){return Xi("probe",e)}function z4(e){return Xi("understand",e)}function $4(e){return Xi("preview",e)}function U4(e){return Xi("ladder",e)}function I4(e){return Xi("transcode",e)}function H4(e){return Xi("poster",e)}function B4(e){return Xi("rasterize",e)}function q4(e){return Xi("fetch",e)}function F4(e){return Xi("tour_details",e)}function P4(e){return $d("crop",e)}const V4={cutout:T4,autocrop:D4},_t={...V4,probe:L4,understand:z4,preview:$4,ladder:U4,transcode:I4,poster:H4,rasterize:B4,fetch:q4,tour_details:F4,crop:P4};function G4(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 K4(e,t){if(Zt(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(pl(e))return{kind:"section",section:e.section,slot:e.slot};if(Hn(e))return{kind:"sibling",of:e};if(Ia(e)||Ha(e))return Object.freeze({...e});throw new Error(`row: "${t}" declares a source that is no element, slot, compute or pick.`)}function Y4(e,t){if(Array.isArray(e))return Q4(e,t);const a=Zt(e)?on(e.key):null;if(a!==null)return{key:e.key,tables:[a]};const r=ic(e);if(r!==void 0){const l=`${String(wi(r).from)}.${e.field}`;if(q5(l)!==null)return{key:l,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 ${Zt(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 Q4(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 l of e){const c=Zt(l)?on(l.key):null;if(c===null)throw new Error(`row: "${t}"'s \`from\` lists ${Zt(l)?`the fact "${l.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.includes(c))throw new Error(`row: "${t}" names the ${c} table twice in \`from\` — each table is named once.`);a.push(l.key),r.push(c)}return{key:a.length===1?a[0]:a,tables:r}}function X4(e,t,a){const r=Dg(Hn(e)||Ia(e)?e:void 0);if(!(r===null||t.includes(r)))throw new Error(`row: "${a}" is \`from\` the ${t.join(", ")} table${t.length===1?"":"s"} but its source holds a row of ${r} — a row's source yields a row of its own \`from\`.`)}function Z4(e){const{key:t,tables:a}=Y4(e.from,e.label),r=a[0]??null;if(r===null&&!Ia(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(Hn(e.source)&&e.source.type==="list")throw new Error(G4(`row: "${e.label}"`));const l=Ga(e.source,`row: "${e.label}"`);for(const m of l??[]){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\`.`)}l===void 0&&e.source!==void 0&&r!==null&&X4(e.source,a,e.label);const c=zg(e,m=>K4(m,e.label)),u=mS({type:"row",from:t,...c},r);return K5(u,r,a.slice(1))}const MS=["property","library"];function Is(e){const t=e.indexOf("."),a=t===-1?"":e.slice(0,t);if(!MS.includes(a))throw new Error(`fact registry: "${e}" names no home's list fact`);return{home:a,key:e.slice(t+1)}}function W4(e){return e.type==="row"?e:null}function J4(e){if(e.type!=="object")return null;for(const[t,a]of Object.entries(e.fields)){const r=a.source;if(pn(a.type)&&typeof r=="object"&&r!==null&&r.kind==="element")return t}return null}function Bg(e){return(Array.isArray(e.from)?e.from:[e.from]).filter(a=>typeof a=="string")}function cd(e){const t=CS(e);return t===null?null:t.label??null}function CS(e){const t=Is(e),a=t.home==="library"?bl.pages:Wa.pages,[r,...l]=t.key.split(".");let c=r!==void 0&&Object.hasOwn(a,r)?a[r].declaration:void 0;for(const u of l)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 Fr(e){const t=[];let a=e;for(;a!==void 0&&!t.includes(a);){const r=CS(a);if(r===null)break;t.push(a),a=RS(r.element)}return t}function RS(e){const t=W4(e);if(t!==null)return Bg(t)[0];const a=e.type==="object"?J4(e):null,r=e.type==="object"&&a!==null?e.fields[a]:e;if(!pn(r.type)&&r.type!=="media")return;const l=r.from,c=Array.isArray(l)?l[0]:l;return typeof c=="string"&&c!==""?c:void 0}function e3(e){const t=typeof e=="string"?[e]:[...e],a=t[0];return a===void 0?[]:[...Fr(a).slice(1).filter(l=>!t.includes(l)).reverse().map(l=>[l]),t]}function t3(e){return e.head!==null}function Zi(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 n3=new Set(["home","item"]);function pp(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(XC(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 l=bg(t)?t.of:t;if(Hn(l)){const u=(c=a.fields)==null?void 0:c.get(l);if(u===void 0)throw new Error(`${e} reads the declaration "${l.label??l.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(Zt(t)&&[...a.pages.values()].some(u=>t.key===`${a.home}.${u}`))return{kind:"home",key:t.key};if(Zt(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(pl(t))throw new Error(`${e} reads a section's slot — a registry reads no section.`);if(Ia(t)&&a.picked===!0)return{kind:"element"};if(Ia(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(ic(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(V2(t)&&typeof t.slot=="string")return{kind:"row",slot:t.slot,field:t.field};if(typeof t=="object"&&t!==null&&n3.has(String(t.kind)))return t;throw new Error(`${e} declares a read a registry cannot answer.`)}function i3(e,t,a){return Array.isArray(t)?t.length===1?Im(e,t[0],a):t.map(r=>Im(e,r,a)):Im(e,t,a)}function Im(e,t,a){const r=typeof t=="object"&&t!==null?a.pages.get(t):void 0,l=typeof t=="string"?t:r===void 0?void 0:`${a.home}.${r}`;if(l===void 0||!a.mediaLists.has(l))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 media.`);return l}function gp(e,t,a){const r=t.reads.map(l=>pp(e,l,a));return t.requires===void 0?{kind:"compute",fn:t.fn,reads:r}:{kind:"compute",fn:t.fn,reads:r,requires:t.requires.map(l=>pp(e,l,a))}}function a3(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 r3(e,t,a){const r=Ka(a)??[];if(t==="library"&&r.length>0)throw new Error(`${e} declares a fill — a library's facts are the org's own, and nothing fills them.`);if(r.some(l=>l.verb==="find"))throw new Error(`${e} declares a \`find\` — a home's fact is answered, written or picked, never looked up.`)}function o3(e,t){const{type:a,fields:r}=t;if(a!=="object"||r===void 0)return;const l=Object.entries(r).filter(([,c])=>c.type==="row");if(l.length>0)throw new Error(`${e} holds a picked row in ${l.map(([c])=>`"${c}"`).join(", ")} — a list picking rows declares the row as its item (\`item: row({ from })\`), whose members are the row's.`)}function l3(e){const t=new Map,a=e.fields;for(const r of[a,yl(e)??{}])for(const[l,c]of Object.entries(r))typeof c=="object"&&c!==null&&t.set(c,l);return t}function yp(e,t,a){var l;a3(e,t),r3(e,a.home,t);let r=$s(il(t,c=>pp(e,c,a)));switch(r.from!==void 0&&(pn(String(r.type))||r.type==="media")&&(r={...r,from:i3(e,t.from,a)}),r.type){case"object":{const c={},u={...a,fields:l3(r)};for(const[m,p]of Object.entries(r.fields))c[m]=yp(`${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=((l=Ka(t))==null?void 0:l.some(g=>g.verb==="pick"))===!0,p=yp(`${e}[]`,r.element,m?{...u,picked:!0}:u);o3(`${e}[]`,p),r={...r,element:p,...vg(c)?{max:gp(`${e}.max`,c,u)}:{}};break}}return r}function s3(e,t,a,r){const l=`${e}.${t}`,c=yp(l,a.declaration,r);if(c.type==="object")throw new Error(`${l} 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(`${l} 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:gp(`${l}.title`,u,r),description:typeof m=="string"?m:gp(`${l}.description`,m,r)},declaration:c}}const c3=["home","pages"];function u3(e){return"head"in e&&"declaration"in e}function d3(e){const t=e.element;return e.type==="list"&&typeof(t==null?void 0:t.type)=="string"&&(pn(t.type)||t.type==="media")}function TS(e,t){if(!MS.includes(e))throw new Error(`fact registry: "${e}" is not a home`);const a=new Map,r=new Set,l={};for(const[p,g]of Object.entries(t)){if(c3.includes(p))throw new Error(`fact registry: ${e} declares a page keyed "${p}", a registry's own key`);a.set(g,p);const b=u3(g)?g:{head:null,declaration:g};l[p]=b,d3(b.declaration)&&r.add(`${e}.${p}`)}const c={home:e,pages:a,mediaLists:r},u={};for(const[p,g]of Object.entries(l))u[p]=s3(e,p,g,c);const m={home:e,pages:u};for(const p of Object.keys(t))m[p]={kind:"home",key:`${e}.${p}`};return m}function f3(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 h3=[{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."}],m3=["sold","active"],p3=["total","monthly"];function g3(e){return e==null?"active":"sold"}function y3(e){return e==="for_rent"?"monthly":"total"}const b3=6371e3;function v3(e,t,a,r){const l=p=>p*Math.PI/180,c=l(a-e),u=l(r-t),m=Math.sin(c/2)**2+Math.cos(l(e))*Math.cos(l(a))*Math.sin(u/2)**2;return 2*b3*Math.asin(Math.sqrt(m))}function x3(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(v3(t.latitude,t.longitude,e.latitude,e.longitude))}const w3=Zi({title:"Your contacts",description:"The people your listings name, with the headshots and logos they carry."},ei({label:"Contacts",item:()=>{const e=mn.short({label:"Name",cap:256});return cc({label:e,fields:{headshot:$a({label:"Headshot"}),name:e,title:mn.short({label:"Title",cap:128}),org_name:mn.short({label:"Organization",cap:256}),email:r4({label:"Email"}),phone:o4({label:"Phone"}),website:zo({label:"Website"}),address:$g({label:"Address"}),bio:mn.long({label:"Bio",cap:4e3}),logo_dark:$a({label:"Logo for light backgrounds",process:[_t.cutout()]}),logo_light:$a({label:"Logo for dark backgrounds",process:[_t.cutout()]}),instagram:zo({label:"Instagram"}),linkedin:zo({label:"LinkedIn"}),x:zo({label:"X"}),facebook:zo({label:"Facebook"})}})}})),bl=TS("library",{contacts:w3});aS(bl);const bp=Zi({title:"What’s the address?",description:"We’ll build your map and neighborhood details from this."},$g({label:"Address"})),DS=Zi({title:"For sale or for rent?",description:"This adjusts the pricing details we ask for."},ld({label:"Listing intent",from:[...h3]})),Za=Zi({title:"Add photos, docs, and links",description:"Everything you add helps fill and enrich your website."},ei({label:"Uploads",item:Ug()})),qg=ei({label:"Media",item:Ug({kinds:["image","video","tour"],from:Za}),source:ki.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."})}),LS=ei({label:"Floor plans",item:$a({label:"Floor plan",from:Za,process:[_t.cutout({enclosed:"keep"})]}),source:ki.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."})}),k3=ei({label:"Documents",item:Ug({kinds:["document","image","video"],from:Za}),source:ki.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."})}),S3=$a({label:"Hero",from:qg,source:ki.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."})}),E3=zo({label:"Website"}),_3=`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.`,j3=`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.`,O3=[`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 commercial space, 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: a feature this dwelling has that the other dwellings in its building do not, in a few words as an upload states it, such as "Private roof deck", "Corner unit", "Harbor views". Check each one against the other dwellings: a feature printed for two of them, or for the building, is the building's and goes on no dwelling, however a sheet praises it; a routine fitting or finish, a note printed on a plan, or what its other members already say sets nothing apart. Most dwellings have none. Leave the list empty when nothing is this one's alone.`,"When the uploads present no dwelling with its own specs printed, return no items."].join(`
|
|
778
|
-
|
|
779
|
-
`),Lu=mn.short({label:"Unit"}),A3=rn({label:"Beds"}),N3=rn({label:"Baths",decimals:!0}),zS=rn({label:"Sq ft",thousandsSep:!0}),$S=mn.short({label:"Price",cap:40}),US=mn.short({label:"Building floor(s)",cap:20}),IS=rn({label:"Parking spaces"}),HS=ei({label:"Amenities",max:12,item:mn.short({cap:40})});function BS(e,t){return ei({label:"Floor plans",source:ki.pick({reads:[e],brief:t}),item:cc({fields:{image:$a({label:"Floor plan",from:LS}),floor:ld({label:"Floor",from:[...a5],creatable:!0})}})})}function qS(e,t){return ei({label:"Photos",source:ki.pick({reads:[e],brief:t}),item:$a({label:"Photo",from:qg})})}const M3=Zi({title:"Tell us about the units",description:"Add each unit’s details and floor plans so they appear on your website."},ei({label:"Units",source:ki.write({reads:[Za],brief:O3}),item:cc({label:Lu,fields:{label:Lu,beds:A3,baths:N3,sqft:zS,price:$S,floor:US,hoa_monthly:rn({label:"Monthly HOA fee"}),parking:IS,lot_sqft:rn({label:"Lot sq ft",thousandsSep:!0}),amenities:HS,floor_plans:BS(Lu,_3),photos:qS(Lu,j3)}})})),C3=`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.`,R3=`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.`,T3=["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: a feature this space has that the other spaces in its building do not, in a few words as an upload states it, such as "Corner frontage", "Drive-thru", "Grease trap". Check each one against the other spaces: a feature printed for two of them, or for the building, is the building's and goes on no space, however a sheet praises it; a routine fitting or finish, a note printed on a plan, or what its other members already say sets nothing apart. Most spaces have none. Leave the list empty when nothing is this one's alone.`,"When the uploads present no commercial space with its own specs printed, return no items."].join(`
|
|
780
|
-
|
|
781
|
-
`),zu=mn.short({label:"Space"}),D3=Zi({title:"Tell us about the commercial spaces",description:"Add each space’s details and floor plans so they appear on your website."},ei({label:"Commercial spaces",source:ki.write({reads:[Za],brief:T3}),item:cc({label:zu,fields:{label:zu,use:mn.short({label:"Use",cap:40}),sqft:zS,price:$S,floor:US,parking:IS,amenities:HS,floor_plans:BS(zu,C3),photos:qS(zu,R3)}})})),L3="The uploads may present comparable properties: other properties an upload sets beside the subject for comparison. The subject is the property the uploads are marketing, at the read address; in a building, that is the building and every unit the uploads market in it. Find every comparable and return it as an item. A property is a comparable because an upload compares it with the subject, and it 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. An upload presenting the subject or one of its units for itself, such as its listing sheet, brochure, price list or market history, presents the subject, whatever unit line it prints beside the read street. 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. Never return the subject, even where it appears in a comparables table or at the centre of a comparables map. Another unit of the subject's building is a comparable only where an upload sets it beside the subject as one, such as a sister unit's earlier sale in a comps table. Do not return a market, submarket or area average, a portfolio total, or anything that is not an individual property. When no upload compares another property with the subject, return no items.",Hm=$g({label:"Address"}),Wx=yS({label:"Sale date"}),z3=Zi({title:"Which properties compare?",description:"Recently sold or listed homes like this one shape the pricing story."},ei({label:"Comparables",max:50,source:ki.write({reads:[Za,bp],brief:L3}),item:cc({label:Hm,fields:{address:Hm,price:rn({label:"Price"}),sale_date:Wx,beds:rn({label:"Beds"}),baths:rn({label:"Baths",decimals:!0}),sqft:rn({label:"Sq ft"}),photo:$a({label:"Photo"}),year_built:rn({label:"Year built"}),lot_sqft:rn({label:"Lot sq ft"}),stories:rn({label:"Stories",decimals:!0}),units:rn({label:"Units"}),hoa_monthly:rn({label:"HOA per month"}),list_price:rn({label:"List price"}),listed_date:yS({label:"Listed date"}),mls_number:mn.short({label:"MLS number"}),description:mn.long({label:"Description"}),status:ld({label:"Status",from:[...m3],locked:!0,source:Lm({reads:[Wx]},e=>g3(e))}),distance_m:rn({label:"Distance (m)",locked:!0,source:Lm({reads:[Hm,bp]},(e,t)=>x3(e,t))}),price_period:ld({label:"Price period",from:[...p3],locked:!0,source:Lm({reads:[DS]},e=>y3(e))})}})})),$3=Zi({title:"Who’s on this listing?",description:"Add the contacts for this property, and drag them into the order your marketing shows them."},ei({label:"Contacts",min:1,max:12,source:ki.pick({reads:[Za],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:Z4({label:"Contact",from:bl.contacts})})),Wa=TS("property",{address:bp,listing_intent:DS,description:Zi({title:"Describe the property",description:"Talk it up like you would to a buyer, and our AI writes your website copy."},mn.long({label:"Description"})),uploads:Za,property_media:qg,floor_plans:LS,property_documents:k3,hero:S3,site_url:E3,units:M3,commercial_spaces:D3,contacts:$3,comparables:z3});aS(Wa);const U3=["text","number","select","url","email","phone","date"],I3=new Set(U3);function Fg(e){return I3.has(e)}function FS(e){return e.type===void 0||!Fg(e.type)?!1:e.type!=="text"||e.size===void 0||e.size==="short"}const vp=new Set(["image","video","tour","document"]);function PS(e){return!(e!==null&&typeof e=="object"&&e.locked===!0)}function Pg(e){const t=Object.values(e).filter(PS).map(l=>l!==null&&typeof l=="object"?l:{}),a=t.filter(l=>l.type!==void 0&&vp.has(l.type)),r=t.filter(l=>!(l.type!==void 0&&vp.has(l.type)));return a.length===1&&r.length<=2&&r.every(FS)}function H3(e){var a;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 VS(e,t){var l,c;const a=H3(e);if(a!==null)return Pg(a)?"annotated-media":"object";const r=(l=e.element)==null?void 0:l.type;return r!==void 0&&vp.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 B3={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 q3(e,t,a){const r=VS(e,a),l=r==="object"||r==="annotated-media"?"item":"unit";return{itemKind:r,view:B3[r][t],granularity:l}}function F3(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 GS(e){return/^[A-Z][A-Z]/.test(e)?e:e.charAt(0).toLowerCase()+e.slice(1)}function Ja(e){const t=GS((e??"").trim());if(t==="")return{singular:"item",plural:"items"};const a=t.search(/\S+$/);return{singular:t.slice(0,a)+F3(t.slice(a)),plural:t}}function Vg(e){return e.charAt(0).toUpperCase()+e.slice(1)}const P3=["verb","unique","brief","none","reads"];new Set(P3);function Jx(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function V3(e){return!Jx(e)||!Array.isArray(e.fills)?[]:e.fills.filter(Jx).map(t=>({...t,kind:"fill"}))}function Gg(e){return e!==null&&typeof e=="object"?e:null}function dc(e){const t=Gg(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 KS(e){return Object.entries(e??{}).filter(([,t])=>{var a;return t.type==="row"&&((a=Gg(t.source))==null?void 0:a.kind)==="element"}).map(([t])=>t)}function G3(e){const t=new Set(KS(e)),a={};for(const[r,l]of Object.entries(e??{})){const c=dc(l.source);c!==null&&t.has(c.slot)&&(a[r]=c.field)}return a}function ud(e){var t;if(((t=e.element)==null?void 0:t.type)==="object")return e.element.fields}function K3(e){return ud(e)!==void 0}function Y3(e){const t=Gg(e.source);if(t===null||t.kind==="authored")return{kind:"none"};const{kind:a,key:r,section:l,slot:c,transform:u}=t;if(a==="home"&&typeof r=="string"){const m=on(r);if(m!==null)return{kind:"table",table:m}}return a==="section"&&typeof l=="string"&&typeof c=="string"?{kind:"section",section:l,slot:c}:a==="derived"&&typeof u=="string"?{kind:"derived",transform:u}:{kind:"other"}}function dd(e){return lS(Wa).has(e)}function YS(e){const t=lS(Wa).get(e);if(t===void 0)throw new Error(`fact registry: "${e}" names no property fact`);return t}function QS(e){return YS(e).value_type}function Q3(){return z5(Wa)}function X3(e){return typeof e=="string"&&Q3().includes(e)}function Z3(e){if(!dd(e))return;const t=YS(e).declaration;return t.type==="select"?t.values:void 0}function W3(e){return typeof e=="string"?e:null}function J3(e){const t=qa(e);return t===void 0?null:{media:t}}function eR(e,t){const[,a="",r]=e.split("."),l=t[a];switch(QS(`property.${a}`)){case"address":{const c=xi(l);return r===void 0?c:c===null?null:c[r]}case"image":return J3(l);case"number":return typeof l=="number"?l:null;case"text":return W3(l)}}function Kg(e){return dS(Cg(e)==="library"?bl:Wa,e)}function XS(e,t){return hS(Kg(e),t)}function ew(e){return Object.keys(Kg(e))}function ZS(e,t){if(t==="id")return{kind:"identity"};const a=t.indexOf("."),r=a===-1?t:t.slice(0,a),l=sc(e,r)??null;if(l===null)return{kind:"unknown",offers:ew(e)};if(a!==-1){const c=t.slice(a+1);return l!=="address"?{kind:"unknown",offers:ew(e)}:Dd(c)?{kind:"member",value_type:sS(c),storable:tw(e,t)}:{kind:"unknown",offers:_g.map(u=>`${r}.${u}`)}}return{kind:"member",value_type:l,storable:tw(e,t)}}function tw(e,t){if(t===void 0){if(on(e)!==null)return!0;if(!dd(e))return!1;const r=e.slice(0,e.lastIndexOf("."));return!(dd(r)&&QS(r)==="address")}if(!B5().includes(e))return!1;const a=XS(e,t);return a!==void 0&&!$5(a)}function tR(e,t){const a=t.source;return(a==null?void 0:a.kind)!=="row"||typeof a.field!="string"||ZS(e,a.field).kind==="unknown"?null:a.field}function Yg(e,t){if(t==null)return null;const a=tR(t,e);if(a===null)return null;const r=XS(t,a),l=r===void 0?null:Ng(r);if(r===void 0||l==null)return null;const c=up(r);return{table:t,member:a,value_type:l,...c!==void 0?{filter:c}:{}}}const Ud={kind:"owned"};function nw(e){return e===null?Ud:{kind:"picked",filter:e}}function al(e,t){if(e.from!==void 0)return nw(od(e));const a=Yg(e,t);return a===null?null:a.filter===void 0?Ud:nw(od({type:e.type,from:a.filter.from}))}function Id(e,t){return al(e,t)??Ud}function nR(e,t,a){return al(t,a)??al({...t,source:e.source},a)}function iR(e,t,a){var l;const r=al(t,a.itemTable);return r!==null?r:a.picksBy!==null&&((l=t.source)==null?void 0:l.kind)==="element"?{kind:"picked",filter:a.picksBy}:al({...t,source:e.source},a.listTable)??Ud}const iw=1e-6;function aR(e,t){return e.w/e.h>t?{w:e.h*t,h:e.h}:{w:e.w,h:e.w/t}}function rR(e,t){const a=Math.max(e.w,e.h*t);return{w:a,h:a/t}}function oR(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 aw(e,t,a){const r=(l,c,u)=>Math.min(Math.max(l-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 lR(e,t,a,r){const l=rR(e,r);return l.w<=a.width+iw&&l.h<=a.height+iw?aw(oR(l,a),{x:e.x+e.w/2,y:e.y+e.h/2},a):aw(aR({w:a.width,h:a.height},r),t,a)}const rw=16/10;function ow(e){if(e===null||typeof e!="object")return null;const t=e,[a,r,l,c]=["x","y","width","height"].map(u=>t[u]);return![a,r,l,c].every(u=>typeof u=="number"&&Number.isFinite(u))||a===0&&r===0&&l===1&&c===1?null:{x:a,y:r,width:l,height:c}}function WS(e){var c;if(e===null||typeof e!="object")return{mode:"free",aspect:rw};const t=e,a=typeof t.aspect=="number"&&t.aspect>0?t.aspect:rw,r=(c=t.mobile)==null?void 0:c.aspect,l=typeof r=="number"&&r>0&&Math.abs(r-a)>1e-4?r:void 0;return{mode:t.mode==="free"?"free":"locked",aspect:a,...l===void 0?{}:{mobileAspect:l}}}function rl(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 sR(e,t,a){const{width:r,height:l}=t,c={x:e.x*r,y:e.y*l,w:e.width*r,h:e.height*l},u=lR(c,{x:c.x+c.w/2,y:c.y+c.h/2},t,a),m={x:u.x/r,y:u.y/l,width:u.w/r,height:u.h/l};return rl(m,{x:0,y:0,width:1,height:1})?null:m}function lw(e,t,a){return e===null||a===null?e:t===null?null:sR(e,t,a)}function JS(e,t){if(e===null||!(e>0)||!(t>0))return null;const a=Math.min(1,t/e),r=Math.min(1,e/t),l={x:(1-a)/2,y:0,width:a,height:r};return rl(l,{x:0,y:0,width:1,height:1})?null:l}function cR(e,t,a){var u,m;const r=zd(e).get(a);if(r===void 0)return;const l=lc(t)??[rd],c=[...l,...Fr(l[0]).slice(1).filter(p=>!l.includes(p))];for(const p of c){const g=(m=(u=iS(e,p))==null?void 0:u.find(({id:b})=>b===a))==null?void 0:m.value;if(g!==void 0)return Xa(g)?Ag(r,g):r}return r}function uR(e,t,a){const r=t.width!==null&&t.height!==null&&t.width>0&&t.height>0?{width:t.width,height:t.height}:null,l=lw(e.crop,r,a.mode==="free"?null:a.aspect),c=l===null||a.mobileAspect===void 0?null:lw(e.crop,r,a.mobileAspect),u=Object.values(e.renditions).some(m=>m!==null);return{file:e.file,picked:e.id,name:e.name,...l===null?{}:{crop:l},...r===null?{}:{ar:r.width/r.height},...c===null?{}:{mobile:{crop:c,derived:!0}},...u?{renditions:e.renditions}:{}}}function Qg(e){var l;const{mode:t,aspect:a,mobileAspect:r}=WS(e.crop);return{mode:t,aspect:a,aspectLabel:(l=e.crop)==null?void 0:l.aspectLabel,mobileAspect:r}}function ol(e){return e==null?null:{nx:e.x,ny:e.y,nw:e.width,nh:e.height}}function xp(e){return dR(e)?null:{x:e.nx,y:e.ny,width:e.nw,height:e.nh}}function fd(e,t,a){if(e==="free")return{nx:0,ny:0,nw:1,nh:1};const r=JS(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 sw(e,t,a){const r=e.nx+e.nw/2,l=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:l-m/2,nw:u,nh:m}}function dR(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 fR(e,t,a,r){const l=e==null?void 0:e.rect;return l&&l.nw&&l.nh?{nx:l.nx,ny:l.ny,nw:l.nw,nh:l.nh}:fd(t,a,r)}const ja=52,hR=1,mR=6,pR=.94,an=(e,t,a)=>a<t?t:Math.max(t,Math.min(a,e));function $u(e,t,a,r,l,c,u){e=Math.max(ja,e);const m=l>0?u.r-a:a-u.l;e=Math.min(e,m);let p=e/t;const g=c>0?u.b-r:r-u.t;return p>g&&(p=g,e=p*t),{w:Math.max(ja,e),h:Math.max(ja,e/t)}}function gR({src:e,mode:t,aspect:a,seed:r}){const l=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}),g=x.useRef({x:0,y:0,w:0,h:0}),b=x.useRef(!1),v=x.useRef(r??null),[k,w]=x.useState(null),j=()=>{const K=u.current,X=m.current;if(!K||!X.w)return{w:0,h:0};const ue=Math.min(X.w/K.w,X.h/K.h)*pR;return{w:K.w*ue,h:K.h*ue}},E=()=>{const K=j(),X=p.current,ue=K.w*X.z,M=K.h*X.z;return{l:X.icx-ue/2,t:X.icy-M/2,r:X.icx+ue/2,b:X.icy+M/2,w:ue,h:M}},_=()=>{const K=E(),X=m.current;return{l:Math.max(K.l,0),t:Math.max(K.t,0),r:Math.min(K.r,X.w),b:Math.min(K.b,X.h)}},C=()=>{const K=E(),X=g.current,ue=p.current,M=K.w/2,V=K.h/2;K.w>=X.w&&(ue.icx=an(ue.icx,X.x+X.w-M,X.x+M)),K.h>=X.h&&(ue.icy=an(ue.icy,X.y+X.h-V,X.y+V))},O=()=>{const K=g.current,X=_(),ue=X.r-X.l,M=X.b-X.t;if(t==="locked"){let V=Math.min(K.w,ue),te=V/a;te>M&&(te=M,V=te*a),K.w=V,K.h=te}else K.w=Math.min(K.w,ue),K.h=Math.min(K.h,M);K.x=an(K.x,X.l,X.r-K.w),K.y=an(K.y,X.t,X.b-K.h)},A=()=>{O(),C(),O()},D=K=>{const X=m.current;if(!X.w||!u.current)return;p.current={z:1,icx:X.w/2,icy:X.h/2};const ue=E(),M=u.current.w/u.current.h,V=K?fR(v.current,t,M,a):fd(t,M,a);g.current={x:ue.l+V.nx*ue.w,y:ue.t+V.ny*ue.h,w:V.nw*ue.w,h:V.nh*ue.h},A(),b.current=!0,c()};x.useEffect(()=>{b.current=!1,u.current=null,c();const K=new Image;K.onload=()=>{u.current={w:K.naturalWidth||1,h:K.naturalHeight||1},D(!0)},K.src=e},[e]),x.useEffect(()=>{v.current=r??null},[r]),x.useEffect(()=>{u.current&&D(!1)},[t,a]),x.useLayoutEffect(()=>{const K=l.current;if(!K)return;const X=()=>{const M=K.getBoundingClientRect(),V=m.current.w;m.current={w:M.width,h:M.height},!V&&u.current?D(!0):V&&(A(),c())};X();const ue=new ResizeObserver(X);return ue.observe(K),()=>ue.disconnect()},[]);const R=K=>{const X=l.current.getBoundingClientRect();return{x:K.clientX-X.left,y:K.clientY-X.top}},F=K=>{var te,me;if(K.button)return;K.stopPropagation(),(me=(te=K.currentTarget).setPointerCapture)==null||me.call(te,K.pointerId),w("move");const X=R(K),ue={...g.current},M=Q=>{const N=R(Q),q=_(),I=g.current;I.x=an(ue.x+(N.x-X.x),q.l,q.r-I.w),I.y=an(ue.y+(N.y-X.y),q.t,q.b-I.h),c()},V=()=>{window.removeEventListener("pointermove",M),window.removeEventListener("pointerup",V),window.removeEventListener("pointercancel",V),w(null)};window.addEventListener("pointermove",M),window.addEventListener("pointerup",V),window.addEventListener("pointercancel",V)},L=K=>X=>{var Q,N;if(X.button)return;X.stopPropagation(),(N=(Q=X.currentTarget).setPointerCapture)==null||N.call(Q,X.pointerId),w(K);const ue=g.current,M={l:ue.x,t:ue.y,r:ue.x+ue.w,b:ue.y+ue.h},V=R(X),te=q=>{const I=R(q),P=_(),ee=I.x-V.x,pe=I.y-V.y;let se=M.l,ke=M.t,z=M.r,ce=M.b;if(t==="free")K.includes("w")&&(se=an(M.l+ee,P.l,z-ja)),K.includes("e")&&(z=an(M.r+ee,se+ja,P.r)),K.includes("n")&&(ke=an(M.t+pe,P.t,ce-ja)),K.includes("s")&&(ce=an(M.b+pe,ke+ja,P.b));else{const ge=a;if(K==="se"){const Ee=$u(M.r+ee-M.l,ge,M.l,M.t,1,1,P);se=M.l,ke=M.t,z=se+Ee.w,ce=ke+Ee.h}else if(K==="nw"){const Ee=$u(M.r-(M.l+ee),ge,M.r,M.b,-1,-1,P);z=M.r,ce=M.b,se=z-Ee.w,ke=ce-Ee.h}else if(K==="ne"){const Ee=$u(M.r+ee-M.l,ge,M.l,M.b,1,-1,P);se=M.l,ce=M.b,z=se+Ee.w,ke=ce-Ee.h}else if(K==="sw"){const Ee=$u(M.r-(M.l+ee),ge,M.r,M.t,-1,1,P);z=M.r,ke=M.t,se=z-Ee.w,ce=ke+Ee.h}else{const Ee=(M.l+M.r)/2,Ue=(M.t+M.b)/2;let Le=ue.w,ye=ue.h;K==="e"?Le=(M.r+ee-Ee)*2:K==="w"?Le=(Ee-(M.l+ee))*2:K==="s"?(ye=(M.b+pe-Ue)*2,Le=ye*ge):K==="n"&&(ye=(Ue-(M.t+pe))*2,Le=ye*ge),Le=Math.max(ja,Le),ye=Le/ge,Le=Math.min(Le,P.r-P.l),ye=Le/ge,ye>P.b-P.t&&(ye=P.b-P.t,Le=ye*ge),se=an(Ee-Le/2,P.l,P.r-Le),ke=an(Ue-ye/2,P.t,P.b-ye),z=se+Le,ce=ke+ye}}g.current={x:se,y:ke,w:z-se,h:ce-ke},c()},me=()=>{window.removeEventListener("pointermove",te),window.removeEventListener("pointerup",me),window.removeEventListener("pointercancel",me),w(null)};window.addEventListener("pointermove",te),window.addEventListener("pointerup",me),window.addEventListener("pointercancel",me)},T=(K,X,ue)=>{const M=p.current;K=an(K,hR,mR);const V=K/M.z;M.icx=X+(M.icx-X)*V,M.icy=ue+(M.icy-ue)*V,M.z=K,A(),c()},H=K=>{const X=m.current;T(p.current.z*K,X.w/2,X.h/2)},ne=x.useRef(()=>{});ne.current=K=>{K.preventDefault();const X=m.current,ue=Math.exp(-K.deltaY*.0015*(K.ctrlKey?2.6:1));T(p.current.z*ue,X.w/2,X.h/2)},x.useEffect(()=>{const K=l.current;if(!K)return;const X=ue=>ne.current(ue);return K.addEventListener("wheel",X,{passive:!1}),()=>K.removeEventListener("wheel",X)},[]);const Y=()=>D(!1),le=()=>{const K=E(),X=g.current;return K.w?{nx:an((X.x-K.l)/K.w,0,1),ny:an((X.y-K.t)/K.h,0,1),nw:an(X.w/K.w,0,1),nh:an(X.h/K.h,0,1)}:{nx:0,ny:0,nw:1,nh:1}};return{stageRef:l,ready:b.current,activeHandle:k,imgRect:E,box:g.current,view:p.current,onBoxDown:F,onHandleDown:L,zoomBy:H,reset:Y,cropValue:le,natAspect:u.current?u.current.w/u.current.h:null}}function yR({chrome:e,pct:t,onZoomOut:a,onZoomIn:r,resetSlot:l,children:c}){return d.jsxs("div",{className:e.foot,children:[d.jsxs("div",{className:"flex items-center gap-3",children:[l,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 bR=["n","s","e","w"],vR=["nw","ne","sw","se"];function xR({cr:e,mode:t,src:a,stageClassName:r}){const l=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:l.l,top:l.t,width:l.w,height:l.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",{})]}),bR.map(m=>d.jsx("div",{"data-crop-handle":m,className:`we-cs-h edge ${m}`,onPointerDown:e.onHandleDown(m)},m)),vR.map(m=>d.jsx("div",{"data-crop-handle":m,className:`we-cs-h corner ${m}`,onPointerDown:e.onHandleDown(m)},m))]})]})})}const wR=x.forwardRef(function({chrome:t,src:a,mode:r,aspect:l,seed:c,stageClassName:u="h-[412px]",footerActions:m,onUserEdit:p},g){const b=gR({src:a,mode:r,aspect:l,seed:c});x.useImperativeHandle(g,()=>({cropValue:()=>b.cropValue(),natAspect:()=>b.natAspect}),[b]);const v=Math.round(b.view.z*100)+"%",k=x.useRef(!1),w=x.useRef(!1),j=()=>{w.current=!0},E=()=>{w.current&&!k.current&&(k.current=!0,p==null||p())},_=()=>{w.current=!1};return d.jsxs(d.Fragment,{children:[d.jsx("div",{onPointerDownCapture:j,onPointerMoveCapture:E,onPointerUpCapture:_,children:d.jsx(xR,{cr:b,mode:r,src:a,stageClassName:u})}),d.jsx(yR,{chrome:t,pct:v,onZoomOut:()=>b.zoomBy(1/1.25),onZoomIn:()=>b.zoomBy(1.25),resetSlot:d.jsx("button",{type:"button",className:t.buttonLink,onClick:b.reset,children:"Reset"}),children:m})]})});function eE(e){var t,a,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(a=eE(e[t]))&&(r&&(r+=" "),r+=a)}else for(a in e)e[a]&&(r&&(r+=" "),r+=a);return r}function Xg(){for(var e,t,a=0,r="",l=arguments.length;a<l;a++)(e=arguments[a])&&(t=eE(e))&&(r&&(r+=" "),r+=t);return r}const kR=(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},SR=(e,t)=>({classGroupId:e,validator:t}),tE=(e=new Map,t=null,a)=>({nextPart:e,validators:t,classGroupId:a}),hd="-",cw=[],ER="arbitrary..",_R=e=>{const t=OR(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return jR(u);const m=u.split(hd),p=m[0]===""&&m.length>1?1:0;return nE(m,p,t)},getConflictingClassGroupIds:(u,m)=>{if(m){const p=r[u],g=a[u];return p?g?kR(g,p):p:g||cw}return a[u]||cw}}},nE=(e,t,a)=>{if(e.length-t===0)return a.classGroupId;const l=e[t],c=a.nextPart.get(l);if(c){const g=nE(e,t+1,c);if(g)return g}const u=a.validators;if(u===null)return;const m=t===0?e.join(hd):e.slice(t).join(hd),p=u.length;for(let g=0;g<p;g++){const b=u[g];if(b.validator(m))return b.classGroupId}},jR=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?ER+r:void 0})(),OR=e=>{const{theme:t,classGroups:a}=e;return AR(a,t)},AR=(e,t)=>{const a=tE();for(const r in e){const l=e[r];Zg(l,a,r,t)}return a},Zg=(e,t,a,r)=>{const l=e.length;for(let c=0;c<l;c++){const u=e[c];NR(u,t,a,r)}},NR=(e,t,a,r)=>{if(typeof e=="string"){MR(e,t,a);return}if(typeof e=="function"){CR(e,t,a,r);return}RR(e,t,a,r)},MR=(e,t,a)=>{const r=e===""?t:iE(t,e);r.classGroupId=a},CR=(e,t,a,r)=>{if(TR(e)){Zg(e(r),t,a,r);return}t.validators===null&&(t.validators=[]),t.validators.push(SR(a,e))},RR=(e,t,a,r)=>{const l=Object.entries(e),c=l.length;for(let u=0;u<c;u++){const[m,p]=l[u];Zg(p,iE(t,m),a,r)}},iE=(e,t)=>{let a=e;const r=t.split(hd),l=r.length;for(let c=0;c<l;c++){const u=r[c];let m=a.nextPart.get(u);m||(m=tE(),a.nextPart.set(u,m)),a=m}return a},TR=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,DR=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=Object.create(null),r=Object.create(null);const l=(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 l(c,u),u},set(c,u){c in a?a[c]=u:l(c,u)}}},wp="!",uw=":",LR=[],dw=(e,t,a,r,l)=>({modifiers:e,hasImportantModifier:t,baseClassName:a,maybePostfixModifierPosition:r,isExternal:l}),zR=e=>{const{prefix:t,experimentalParseClassName:a}=e;let r=l=>{const c=[];let u=0,m=0,p=0,g;const b=l.length;for(let E=0;E<b;E++){const _=l[E];if(u===0&&m===0){if(_===uw){c.push(l.slice(p,E)),p=E+1;continue}if(_==="/"){g=E;continue}}_==="["?u++:_==="]"?u--:_==="("?m++:_===")"&&m--}const v=c.length===0?l:l.slice(p);let k=v,w=!1;v.endsWith(wp)?(k=v.slice(0,-1),w=!0):v.startsWith(wp)&&(k=v.slice(1),w=!0);const j=g&&g>p?g-p:void 0;return dw(c,w,k,j)};if(t){const l=t+uw,c=r;r=u=>u.startsWith(l)?c(u.slice(l.length)):dw(LR,!1,u,void 0,!0)}if(a){const l=r;r=c=>a({className:c,parseClassName:l})}return r},$R=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((a,r)=>{t.set(a,1e6+r)}),a=>{const r=[];let l=[];for(let c=0;c<a.length;c++){const u=a[c],m=u[0]==="[",p=t.has(u);m||p?(l.length>0&&(l.sort(),r.push(...l),l=[]),r.push(u)):l.push(u)}return l.length>0&&(l.sort(),r.push(...l)),r}},UR=e=>({cache:DR(e.cacheSize),parseClassName:zR(e),sortModifiers:$R(e),postfixLookupClassGroupIds:IR(e),..._R(e)}),IR=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},HR=/\s+/,BR=(e,t)=>{const{parseClassName:a,getClassGroupId:r,getConflictingClassGroupIds:l,sortModifiers:c,postfixLookupClassGroupIds:u}=t,m=[],p=e.trim().split(HR);let g="";for(let b=p.length-1;b>=0;b-=1){const v=p[b],{isExternal:k,modifiers:w,hasImportantModifier:j,baseClassName:E,maybePostfixModifierPosition:_}=a(v);if(k){g=v+(g.length>0?" "+g:g);continue}let C=!!_,O;if(C){const L=E.substring(0,_);O=r(L);const T=O&&u[O]?r(E):void 0;T&&T!==O&&(O=T,C=!1)}else O=r(E);if(!O){if(!C){g=v+(g.length>0?" "+g:g);continue}if(O=r(E),!O){g=v+(g.length>0?" "+g:g);continue}C=!1}const A=w.length===0?"":w.length===1?w[0]:c(w).join(":"),D=j?A+wp:A,R=D+O;if(m.indexOf(R)>-1)continue;m.push(R);const F=l(O,C);for(let L=0;L<F.length;++L){const T=F[L];m.push(D+T)}g=v+(g.length>0?" "+g:g)}return g},qR=(...e)=>{let t=0,a,r,l="";for(;t<e.length;)(a=e[t++])&&(r=aE(a))&&(l&&(l+=" "),l+=r);return l},aE=e=>{if(typeof e=="string")return e;let t,a="";for(let r=0;r<e.length;r++)e[r]&&(t=aE(e[r]))&&(a&&(a+=" "),a+=t);return a},FR=(e,...t)=>{let a,r,l,c;const u=p=>{const g=t.reduce((b,v)=>v(b),e());return a=UR(g),r=a.cache.get,l=a.cache.set,c=m,m(p)},m=p=>{const g=r(p);if(g)return g;const b=BR(p,a);return l(p,b),b};return c=u,(...p)=>c(qR(...p))},PR=[],Ft=e=>{const t=a=>a[e]||PR;return t.isThemeGetter=!0,t},rE=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,oE=/^\((?:(\w[\w-]*):)?(.+)\)$/i,VR=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,GR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,KR=/\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$/,YR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,QR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,XR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ea=e=>VR.test(e),Ke=e=>!!e&&!Number.isNaN(Number(e)),pi=e=>!!e&&Number.isInteger(Number(e)),Bm=e=>e.endsWith("%")&&Ke(e.slice(0,-1)),Fi=e=>GR.test(e),lE=()=>!0,ZR=e=>KR.test(e)&&!YR.test(e),Wg=()=>!1,WR=e=>QR.test(e),JR=e=>XR.test(e),eT=e=>!_e(e)&&!je(e),tT=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)),nT=e=>er(e,uE,Wg),_e=e=>rE.test(e),wr=e=>er(e,dE,ZR),fw=e=>er(e,uT,Ke),iT=e=>er(e,hE,lE),aT=e=>er(e,fE,Wg),hw=e=>er(e,sE,Wg),rT=e=>er(e,cE,JR),Uu=e=>er(e,mE,WR),je=e=>oE.test(e),ws=e=>Qr(e,dE),oT=e=>Qr(e,fE),mw=e=>Qr(e,sE),lT=e=>Qr(e,uE),sT=e=>Qr(e,cE),Iu=e=>Qr(e,mE,!0),cT=e=>Qr(e,hE,!0),er=(e,t,a)=>{const r=rE.exec(e);return r?r[1]?t(r[1]):a(r[2]):!1},Qr=(e,t,a=!1)=>{const r=oE.exec(e);return r?r[1]?t(r[1]):a:!1},sE=e=>e==="position"||e==="percentage",cE=e=>e==="image"||e==="url",uE=e=>e==="length"||e==="size"||e==="bg-size",dE=e=>e==="length",uT=e=>e==="number",fE=e=>e==="family-name",hE=e=>e==="number"||e==="weight",mE=e=>e==="shadow",dT=()=>{const e=Ft("color"),t=Ft("font"),a=Ft("text"),r=Ft("font-weight"),l=Ft("tracking"),c=Ft("leading"),u=Ft("breakpoint"),m=Ft("container"),p=Ft("spacing"),g=Ft("radius"),b=Ft("shadow"),v=Ft("inset-shadow"),k=Ft("text-shadow"),w=Ft("drop-shadow"),j=Ft("blur"),E=Ft("perspective"),_=Ft("aspect"),C=Ft("ease"),O=Ft("animate"),A=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],R=()=>[...D(),je,_e],F=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],T=()=>[je,_e,p],H=()=>[Ea,"full","auto",...T()],ne=()=>[pi,"none","subgrid",je,_e],Y=()=>["auto",{span:["full",pi,je,_e]},pi,je,_e],le=()=>[pi,"auto",je,_e],K=()=>["auto","min","max","fr",je,_e],X=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ue=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...T()],V=()=>[Ea,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...T()],te=()=>[Ea,"screen","full","dvw","lvw","svw","min","max","fit",...T()],me=()=>[Ea,"screen","full","lh","dvh","lvh","svh","min","max","fit",...T()],Q=()=>[e,je,_e],N=()=>[...D(),mw,hw,{position:[je,_e]}],q=()=>["no-repeat",{repeat:["","x","y","space","round"]}],I=()=>["auto","cover","contain",lT,nT,{size:[je,_e]}],P=()=>[Bm,ws,wr],ee=()=>["","none","full",g,je,_e],pe=()=>["",Ke,ws,wr],se=()=>["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,Bm,mw,hw],ce=()=>["","none",j,je,_e],ge=()=>["none",Ke,je,_e],Ee=()=>["none",Ke,je,_e],Ue=()=>[Ke,je,_e],Le=()=>[Ea,"full",...T()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fi],breakpoint:[Fi],color:[lE],container:[Fi],"drop-shadow":[Fi],ease:["in","out","in-out"],font:[eT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fi],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fi],shadow:[Fi],spacing:["px",Ke],text:[Fi],"text-shadow":[Fi],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ea,_e,je,_]}],container:["container"],"container-type":[{"@container":["","normal","size",je,_e]}],"container-named":[tT],columns:[{columns:[Ke,_e,je,m]}],"break-after":[{"break-after":A()}],"break-before":[{"break-before":A()}],"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:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:H()}],"inset-x":[{"inset-x":H()}],"inset-y":[{"inset-y":H()}],start:[{"inset-s":H(),start:H()}],end:[{"inset-e":H(),end:H()}],"inset-bs":[{"inset-bs":H()}],"inset-be":[{"inset-be":H()}],top:[{top:H()}],right:[{right:H()}],bottom:[{bottom:H()}],left:[{left:H()}],visibility:["visible","invisible","collapse"],z:[{z:[pi,"auto",je,_e]}],basis:[{basis:[Ea,"full","auto",m,...T()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ke,Ea,"auto","initial","none",_e]}],grow:[{grow:["",Ke,je,_e]}],shrink:[{shrink:["",Ke,je,_e]}],order:[{order:[pi,"first","last","none",je,_e]}],"grid-cols":[{"grid-cols":ne()}],"col-start-end":[{col:Y()}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":ne()}],"row-start-end":[{row:Y()}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":K()}],"auto-rows":[{"auto-rows":K()}],gap:[{gap:T()}],"gap-x":[{"gap-x":T()}],"gap-y":[{"gap-y":T()}],"justify-content":[{justify:[...X(),"normal"]}],"justify-items":[{"justify-items":[...ue(),"normal"]}],"justify-self":[{"justify-self":["auto",...ue()]}],"align-content":[{content:["normal",...X()]}],"align-items":[{items:[...ue(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ue(),{baseline:["","last"]}]}],"place-content":[{"place-content":X()}],"place-items":[{"place-items":[...ue(),"baseline"]}],"place-self":[{"place-self":["auto",...ue()]}],p:[{p:T()}],px:[{px:T()}],py:[{py:T()}],ps:[{ps:T()}],pe:[{pe:T()}],pbs:[{pbs:T()}],pbe:[{pbe:T()}],pt:[{pt:T()}],pr:[{pr:T()}],pb:[{pb:T()}],pl:[{pl:T()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":T()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":T()}],"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,ws,wr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,cT,iT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Bm,_e]}],"font-family":[{font:[oT,aT,t]}],"font-features":[{"font-features":[_e]}],"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:[l,je,_e]}],"line-clamp":[{"line-clamp":[Ke,"none",je,fw]}],leading:[{leading:[c,...T()]}],"list-image":[{"list-image":["none",je,_e]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",je,_e]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Q()}],"text-color":[{text:Q()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ke,"from-font","auto",je,wr]}],"text-decoration-color":[{decoration:Q()}],"underline-offset":[{"underline-offset":[Ke,"auto",je,_e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:T()}],"tab-size":[{tab:[pi,je,_e]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",je,_e]}],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,_e]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:N()}],"bg-repeat":[{bg:q()}],"bg-size":[{bg:I()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pi,je,_e],radial:["",je,_e],conic:[pi,je,_e]},sT,rT]}],"bg-color":[{bg:Q()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:Q()}],"gradient-via":[{via:Q()}],"gradient-to":[{to:Q()}],rounded:[{rounded:ee()}],"rounded-s":[{"rounded-s":ee()}],"rounded-e":[{"rounded-e":ee()}],"rounded-t":[{"rounded-t":ee()}],"rounded-r":[{"rounded-r":ee()}],"rounded-b":[{"rounded-b":ee()}],"rounded-l":[{"rounded-l":ee()}],"rounded-ss":[{"rounded-ss":ee()}],"rounded-se":[{"rounded-se":ee()}],"rounded-ee":[{"rounded-ee":ee()}],"rounded-es":[{"rounded-es":ee()}],"rounded-tl":[{"rounded-tl":ee()}],"rounded-tr":[{"rounded-tr":ee()}],"rounded-br":[{"rounded-br":ee()}],"rounded-bl":[{"rounded-bl":ee()}],"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:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:Q()}],"border-color-x":[{"border-x":Q()}],"border-color-y":[{"border-y":Q()}],"border-color-s":[{"border-s":Q()}],"border-color-e":[{"border-e":Q()}],"border-color-bs":[{"border-bs":Q()}],"border-color-be":[{"border-be":Q()}],"border-color-t":[{"border-t":Q()}],"border-color-r":[{"border-r":Q()}],"border-color-b":[{"border-b":Q()}],"border-color-l":[{"border-l":Q()}],"divide-color":[{divide:Q()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ke,je,_e]}],"outline-w":[{outline:["",Ke,ws,wr]}],"outline-color":[{outline:Q()}],shadow:[{shadow:["","none",b,Iu,Uu]}],"shadow-color":[{shadow:Q()}],"inset-shadow":[{"inset-shadow":["none",v,Iu,Uu]}],"inset-shadow-color":[{"inset-shadow":Q()}],"ring-w":[{ring:pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Q()}],"ring-offset-w":[{"ring-offset":[Ke,wr]}],"ring-offset-color":[{"ring-offset":Q()}],"inset-ring-w":[{"inset-ring":pe()}],"inset-ring-color":[{"inset-ring":Q()}],"text-shadow":[{"text-shadow":["none",k,Iu,Uu]}],"text-shadow-color":[{"text-shadow":Q()}],opacity:[{opacity:[Ke,je,_e]}],"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":Q()}],"mask-image-linear-to-color":[{"mask-linear-to":Q()}],"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":Q()}],"mask-image-t-to-color":[{"mask-t-to":Q()}],"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":Q()}],"mask-image-r-to-color":[{"mask-r-to":Q()}],"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":Q()}],"mask-image-b-to-color":[{"mask-b-to":Q()}],"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":Q()}],"mask-image-l-to-color":[{"mask-l-to":Q()}],"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":Q()}],"mask-image-x-to-color":[{"mask-x-to":Q()}],"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":Q()}],"mask-image-y-to-color":[{"mask-y-to":Q()}],"mask-image-radial":[{"mask-radial":[je,_e]}],"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":Q()}],"mask-image-radial-to-color":[{"mask-radial-to":Q()}],"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":D()}],"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":Q()}],"mask-image-conic-to-color":[{"mask-conic-to":Q()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:N()}],"mask-repeat":[{mask:q()}],"mask-size":[{mask:I()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",je,_e]}],filter:[{filter:["","none",je,_e]}],blur:[{blur:ce()}],brightness:[{brightness:[Ke,je,_e]}],contrast:[{contrast:[Ke,je,_e]}],"drop-shadow":[{"drop-shadow":["","none",w,Iu,Uu]}],"drop-shadow-color":[{"drop-shadow":Q()}],grayscale:[{grayscale:["",Ke,je,_e]}],"hue-rotate":[{"hue-rotate":[Ke,je,_e]}],invert:[{invert:["",Ke,je,_e]}],saturate:[{saturate:[Ke,je,_e]}],sepia:[{sepia:["",Ke,je,_e]}],"backdrop-filter":[{"backdrop-filter":["","none",je,_e]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[Ke,je,_e]}],"backdrop-contrast":[{"backdrop-contrast":[Ke,je,_e]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ke,je,_e]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ke,je,_e]}],"backdrop-invert":[{"backdrop-invert":["",Ke,je,_e]}],"backdrop-opacity":[{"backdrop-opacity":[Ke,je,_e]}],"backdrop-saturate":[{"backdrop-saturate":[Ke,je,_e]}],"backdrop-sepia":[{"backdrop-sepia":["",Ke,je,_e]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":T()}],"border-spacing-x":[{"border-spacing-x":T()}],"border-spacing-y":[{"border-spacing-y":T()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",je,_e]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ke,"initial",je,_e]}],ease:[{ease:["linear","initial",C,je,_e]}],delay:[{delay:[Ke,je,_e]}],animate:[{animate:["none",O,je,_e]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[E,je,_e]}],"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:Ee()}],"scale-x":[{"scale-x":Ee()}],"scale-y":[{"scale-y":Ee()}],"scale-z":[{"scale-z":Ee()}],"scale-3d":["scale-3d"],skew:[{skew:Ue()}],"skew-x":[{"skew-x":Ue()}],"skew-y":[{"skew-y":Ue()}],transform:[{transform:[je,_e,"","none","gpu","cpu"]}],"transform-origin":[{origin:R()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Le()}],"translate-x":[{"translate-x":Le()}],"translate-y":[{"translate-y":Le()}],"translate-z":[{"translate-z":Le()}],"translate-none":["translate-none"],zoom:[{zoom:[pi,je,_e]}],accent:[{accent:Q()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Q()}],"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,_e]}],"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":Q()}],"scrollbar-track-color":[{"scrollbar-track":Q()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-me":[{"scroll-me":T()}],"scroll-mbs":[{"scroll-mbs":T()}],"scroll-mbe":[{"scroll-mbe":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pbs":[{"scroll-pbs":T()}],"scroll-pbe":[{"scroll-pbe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"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,_e]}],fill:[{fill:["none",...Q()]}],"stroke-w":[{stroke:[Ke,ws,wr,fw]}],stroke:[{stroke:["none",...Q()]}],"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"]}},Jg=FR(dT);function pw(...e){return Jg(Xg(e))}function fT({view:e,onChange:t,className:a}){const r=(l,c,u)=>d.jsx("button",{type:"button","aria-label":c,"aria-pressed":e===l,onClick:()=>t(l),className:pw("flex h-7 w-8 items-center justify-center rounded-[6px] transition-[background,color] duration-[120ms]",e===l?"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:pw("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 hT=(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 ey({chrome:e,open:t=!0,src:a,mode:r,aspect:l,mobileAspect:c,seed:u,mobileSeed:m,onApply:p,onClose:g,title:b="Crop photo",subtitle:v,variant:k="crop",stageClassName:w="h-[412px]"}){const[j]=x.useState(a),E=c!=null&&Math.abs(c-l)>1e-4,[_,C]=x.useState("desktop"),[O,A]=x.useState({desktop:(u==null?void 0:u.rect)??null,mobile:(m==null?void 0:m.rect)??null}),D=x.useRef(!(m!=null&&m.rect)),R=x.useRef(null),F=X=>X==="mobile"?c??l:l,L=()=>{var X;return((X=R.current)==null?void 0:X.natAspect())??l},T=X=>!(u!=null&&u.rect)&&(X===null||hT(X,fd(r,L(),l))),H=X=>({rect:X==="desktop"?O.desktop:O.mobile}),ne=()=>{var X;return((X=R.current)==null?void 0:X.cropValue())??null},Y=X=>{if(X===_)return;const ue=ne();A(M=>{const V={...M,[_]:ue??M[_]};if(_==="desktop"&&D.current){const te=V.desktop??ue;V.mobile=te&&!T(te)?sw(te,c??l,L()):null}return V}),C(X)},le=()=>{_==="mobile"&&(D.current=!1)},K=()=>{const X=ne(),ue=L(),M=(_==="desktop"?X:O.desktop)??X??{nx:0,ny:0,nw:1,nh:1};let V={rect:M,ar:ue};if(E){let te=_==="mobile"?X:O.mobile;te||(te=T(M)?fd(r,ue,c??l):sw(M,c??l,ue)),V={...V,mobile:{rect:te,derived:D.current}}}p(V)};return d.jsxs(e.Shell,{open:t,variant:k,onClose:g,children:[d.jsxs("div",{className:e.head,children:[d.jsxs("div",{className:e.titles,children:[d.jsx("h2",{className:e.title,children:b}),v?d.jsx("span",{className:e.subtitle,children:v}):null]}),d.jsx("button",{className:e.close,onClick:g,"aria-label":"Close",children:d.jsx(e.CloseIcon,{})})]}),d.jsxs("div",{className:"relative",children:[E&&d.jsx(fT,{view:_,onChange:Y,className:"absolute right-3 top-3 z-10"}),d.jsx(wR,{ref:R,chrome:e,src:j,mode:r,aspect:F(_),seed:H(_),stageClassName:w,onUserEdit:le,footerActions:d.jsxs(d.Fragment,{children:[d.jsx("button",{className:e.buttonGhost,onClick:g,children:"Cancel"}),d.jsx("button",{className:e.buttonPrimary,onClick:K,children:"Apply crop"})]})},_)]})]})}const gw=e=>{let t;const a=new Set,r=(g,b)=>{const v=typeof g=="function"?g(t):g;if(!Object.is(v,t)){const k=t;t=b??(typeof v!="object"||v===null)?v:Object.assign({},t,v),a.forEach(w=>w(t,k))}},l=()=>t,m={setState:r,getState:l,getInitialState:()=>p,subscribe:g=>(a.add(g),()=>a.delete(g))},p=t=e(r,l,m);return m},mT=(e=>e?gw(e):gw),pT=e=>e;function gT(e,t=pT){const a=za.useSyncExternalStore(e.subscribe,za.useCallback(()=>t(e.getState()),[e,t]),za.useCallback(()=>t(e.getInitialState()),[e,t]));return za.useDebugValue(a),a}const yw=e=>{const t=mT(e),a=r=>gT(t,r);return Object.assign(a,t),a},pE=(e=>e?yw(e):yw),ty=pE(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 yT(e){return ty(t=>t.noticeByKey[e])}const bT=12e4;function Pr(e){return`${e.holder}#${e.mediaId}`}const Os=pE((e,t)=>({byPlace:{},start:(a,r,l)=>{const c=Pr(a),u={propertyId:r,place:a,crop:l};e(m=>({byPlace:{...m.byPlace,[c]:u}})),setTimeout(()=>{t().byPlace[c]===u&&t().settle(a)},bT)},settle:a=>e(r=>{const l=Pr(a);if(!(l in r.byPlace))return r;const c={...r.byPlace};return delete c[l],{byPlace:c}})})),Qu={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}},gE={opacity:Qu.dimOpacity,filter:`grayscale(${Qu.grayscale})`,transition:`opacity ${Qu.transitionMs}ms`};function vT(){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 ny({label:e="Re-cropping…"}={}){vT();const t=Qu.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 vl=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(){}},Or,Oa,Bo,d2,xT=(d2=class extends vl{constructor(){super();Ne(this,Or);Ne(this,Oa);Ne(this,Bo);xe(this,Bo,t=>{if(typeof window<"u"&&window.addEventListener){const a=()=>t();return window.addEventListener("visibilitychange",a,!1),()=>{window.removeEventListener("visibilitychange",a)}}})}onSubscribe(){$(this,Oa)||this.setEventListener($(this,Bo))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Oa))==null||t.call(this),xe(this,Oa,void 0))}setEventListener(t){var a;xe(this,Bo,t),(a=$(this,Oa))==null||a.call(this),xe(this,Oa,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){$(this,Or)!==t&&(xe(this,Or,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(a=>{a(t)})}isFocused(){var t;return typeof $(this,Or)=="boolean"?$(this,Or):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Or=new WeakMap,Oa=new WeakMap,Bo=new WeakMap,d2),iy=new xT,wT={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Aa,cg,f2,kT=(f2=class{constructor(){Ne(this,Aa,wT);Ne(this,cg,!1)}setTimeoutProvider(e){xe(this,Aa,e)}setTimeout(e,t){return $(this,Aa).setTimeout(e,t)}clearTimeout(e){$(this,Aa).clearTimeout(e)}setInterval(e,t){return $(this,Aa).setInterval(e,t)}clearInterval(e){$(this,Aa).clearInterval(e)}},Aa=new WeakMap,cg=new WeakMap,f2),_r=new kT;function ST(e){setTimeout(e,0)}var ET=typeof window>"u"||"Deno"in globalThis;function hn(){}function _T(e,t){return typeof e=="function"?e(t):e}function kp(e){return typeof e=="number"&&e>=0&&e!==1/0}function yE(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ua(e,t){return typeof e=="function"?e(t):e}function Un(e,t){return typeof e=="function"?e(t):e}function bw(e,t){const{type:a="all",exact:r,fetchStatus:l,predicate:c,queryKey:u,stale:m}=e;if(u){if(r){if(t.queryHash!==ay(u,t.options))return!1}else if(!ll(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||l&&l!==t.state.fetchStatus||c&&!c(t))}function vw(e,t){const{exact:a,status:r,predicate:l,mutationKey:c}=e;if(c){if(!t.options.mutationKey)return!1;if(a){if(Hs(t.options.mutationKey)!==Hs(c))return!1}else if(!ll(t.options.mutationKey,c))return!1}return!(r&&t.state.status!==r||l&&!l(t))}function ay(e,t){return((t==null?void 0:t.queryKeyHashFn)||Hs)(e)}function Hs(e){return JSON.stringify(e,(t,a)=>Sp(a)?Object.keys(a).sort().reduce((r,l)=>(r[l]=a[l],r),{}):a)}function ll(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(!ll(e[r],t[r]))return!1;return!0}const a=Object.keys(t);for(const r of a)if(!ll(e[r],t[r]))return!1;return!0}return!1}var jT=Object.prototype.hasOwnProperty;function ry(e,t,a=0){if(e===t)return e;if(a>500)return t;const r=xw(e)&&xw(t);if(!r&&!(Sp(e)&&Sp(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 g=0;for(let b=0;b<m;b++){const v=r?b:u[b],k=e[v],w=t[v];if(k===w){p[v]=k,(r?b<c:jT.call(e,v))&&g++;continue}if(k===null||w===null||typeof k!="object"||typeof w!="object"){p[v]=w;continue}const j=ry(k,w,a+1);p[v]=j,j===k&&g++}return c===m&&g===c?e:p}function md(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 xw(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Sp(e){if(!ww(e))return!1;const t=e.constructor;if(t===void 0)return!0;const a=t.prototype;return!(!ww(a)||!a.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function ww(e){return Object.prototype.toString.call(e)==="[object Object]"}function OT(e){return new Promise(t=>{_r.setTimeout(t,e)})}function Ep(e,t,a){return typeof a.structuralSharing=="function"?a.structuralSharing(e,t):a.structuralSharing!==!1?ry(e,t):t}function AT(e,t,a=0){const r=[...e,t];return a&&r.length>a?r.slice(1):r}function NT(e,t,a=0){const r=[t,...e];return a&&r.length>a?r.slice(0,-1):r}var oy=Symbol();function bE(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===oy?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function vE(e,t){return typeof e=="function"?e(...t):!!e}function MT(e,t,a){let r=!1,l;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(l??(l=t()),r||(r=!0,l.aborted?a():l.addEventListener("abort",a,{once:!0})),l)}),e}var Bs=(()=>{let e=()=>ET;return{isServer(){return e()},setIsServer(t){e=t}}})();function _p(){let e,t;const a=new Promise((l,c)=>{e=l,t=c});a.status="pending",a.catch(()=>{});function r(l){Object.assign(a,l),delete a.resolve,delete a.reject}return a.resolve=l=>{r({status:"fulfilled",value:l}),e(l)},a.reject=l=>{r({status:"rejected",reason:l}),t(l)},a}var CT=ST;function RT(){let e=[],t=0,a=m=>{m()},r=m=>{m()},l=CT;const c=m=>{t?e.push(m):l(()=>{a(m)})},u=()=>{const m=e;e=[],m.length&&l(()=>{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=>{l=m}}}var Ht=RT(),qo,Na,Fo,h2,TT=(h2=class extends vl{constructor(){super();Ne(this,qo,!0);Ne(this,Na);Ne(this,Fo);xe(this,Fo,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,Na)||this.setEventListener($(this,Fo))}onUnsubscribe(){var t;this.hasListeners()||((t=$(this,Na))==null||t.call(this),xe(this,Na,void 0))}setEventListener(t){var a;xe(this,Fo,t),(a=$(this,Na))==null||a.call(this),xe(this,Na,t(this.setOnline.bind(this)))}setOnline(t){$(this,qo)!==t&&(xe(this,qo,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return $(this,qo)}},qo=new WeakMap,Na=new WeakMap,Fo=new WeakMap,h2),pd=new TT;function DT(e){return Math.min(1e3*2**e,3e4)}function xE(e){return(e??"online")==="online"?pd.isOnline():!0}var jp=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function wE(e){let t=!1,a=0,r;const l=_p(),c=()=>l.status!=="pending",u=E=>{var _;if(!c()){const C=new jp(E);k(C),(_=e.onCancel)==null||_.call(e,C)}},m=()=>{t=!0},p=()=>{t=!1},g=()=>iy.isFocused()&&(e.networkMode==="always"||pd.isOnline())&&e.canRun(),b=()=>xE(e.networkMode)&&e.canRun(),v=E=>{c()||(r==null||r(),l.resolve(E))},k=E=>{c()||(r==null||r(),l.reject(E))},w=()=>new Promise(E=>{var _;r=C=>{(c()||g())&&E(C)},(_=e.onPause)==null||_.call(e)}).then(()=>{var E;r=void 0,c()||(E=e.onContinue)==null||E.call(e)}),j=()=>{if(c())return;let E;const _=a===0?e.initialPromise:void 0;try{E=_??e.fn()}catch(C){E=Promise.reject(C)}Promise.resolve(E).then(v).catch(C=>{var F;if(c())return;const O=e.retry??(Bs.isServer()?0:3),A=e.retryDelay??DT,D=typeof A=="function"?A(a,C):A,R=O===!0||typeof O=="number"&&a<O||typeof O=="function"&&O(a,C);if(t||!R){k(C);return}a++,(F=e.onFail)==null||F.call(e,a,C),OT(D).then(()=>g()?void 0:w()).then(()=>{t?k(C):j()})})};return{promise:l,status:()=>l.status,cancel:u,continue:()=>(r==null||r(),l),cancelRetry:m,continueRetry:p,canStart:b,start:()=>(b()?j():w().then(j),l)}}var Ar,m2,kE=(m2=class{constructor(){Ne(this,Ar)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),kp(this.gcTime)&&xe(this,Ar,_r.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Bs.isServer()?1/0:300*1e3))}clearGcTimeout(){$(this,Ar)!==void 0&&(_r.clearTimeout($(this,Ar)),xe(this,Ar,void 0))}},Ar=new WeakMap,m2);function LT(e){return{onFetch:(t,a)=>{var b,v,k,w,j;const r=t.options,l=(k=(v=(b=t.fetchOptions)==null?void 0:b.meta)==null?void 0:v.fetchMore)==null?void 0:k.direction,c=((w=t.state.data)==null?void 0:w.pages)||[],u=((j=t.state.data)==null?void 0:j.pageParams)||[];let m={pages:[],pageParams:[]},p=0;const g=async()=>{let E=!1;const _=A=>{MT(A,()=>t.signal,()=>E=!0)},C=bE(t.options,t.fetchOptions),O=async(A,D,R)=>{if(E)return Promise.reject(t.signal.reason);if(D==null&&A.pages.length)return Promise.resolve(A);const L=(()=>{const Y={client:t.client,queryKey:t.queryKey,pageParam:D,direction:R?"backward":"forward",meta:t.options.meta};return _(Y),Y})(),T=await C(L),{maxPages:H}=t.options,ne=R?NT:AT;return{pages:ne(A.pages,T,H),pageParams:ne(A.pageParams,D,H)}};if(l&&c.length){const A=l==="backward",D=A?zT:kw,R={pages:c,pageParams:u},F=D(r,R);m=await O(R,F,A)}else{const A=e??c.length;do{const D=p===0?u[0]??r.initialPageParam:kw(r,m);if(p>0&&D==null)break;m=await O(m,D),p++}while(p<A)}return m};t.options.persister?t.fetchFn=()=>{var E,_;return(_=(E=t.options).persister)==null?void 0:_.call(E,g,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},a)}:t.fetchFn=g}}}function kw(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 zT(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 Po,Nr,Vo,Jn,Mr,Xt,Ys,Cr,$n,SE,Pi,p2,$T=(p2=class extends kE{constructor(t){super();Ne(this,$n);Ne(this,Po);Ne(this,Nr);Ne(this,Vo);Ne(this,Jn);Ne(this,Mr);Ne(this,Xt);Ne(this,Ys);Ne(this,Cr);xe(this,Cr,!1),xe(this,Ys,t.defaultOptions),this.setOptions(t.options),this.observers=[],xe(this,Mr,t.client),xe(this,Jn,$(this,Mr).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,xe(this,Nr,Ew(this.options)),this.state=t.state??$(this,Nr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return $(this,Po)}get promise(){var t;return(t=$(this,Xt))==null?void 0:t.promise}setOptions(t){if(this.options={...$(this,Ys),...t},t!=null&&t._type&&xe(this,Po,t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const a=Ew(this.options);a.data!==void 0&&(this.setState(Sw(a.data,a.dataUpdatedAt)),xe(this,Nr,a))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&$(this,Jn).remove(this)}setData(t,a){const r=Ep(this.state.data,t,this.options);return He(this,$n,Pi).call(this,{data:r,type:"success",dataUpdatedAt:a==null?void 0:a.updatedAt,manual:a==null?void 0:a.manual}),r}setState(t){He(this,$n,Pi).call(this,{type:"setState",state:t})}cancel(t){var r,l;const a=(r=$(this,Xt))==null?void 0:r.promise;return(l=$(this,Xt))==null||l.cancel(t),a?a.then(hn).catch(hn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return $(this,Nr)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Un(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===oy||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ua(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:!yE(this.state.dataUpdatedAt,t)}onFocus(){var a;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(a=$(this,Xt))==null||a.continue()}onOnline(){var a;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(a=$(this,Xt))==null||a.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),$(this,Jn).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,Xt)&&($(this,Cr)||He(this,$n,SE).call(this)?$(this,Xt).cancel({revert:!0}):$(this,Xt).cancelRetry()),this.scheduleGc()),$(this,Jn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||He(this,$n,Pi).call(this,{type:"invalidate"})}async fetch(t,a){var g,b,v,k,w,j,E,_,C,O,A;if(this.state.fetchStatus!=="idle"&&((g=$(this,Xt))==null?void 0:g.status())!=="rejected"){if(this.state.data!==void 0&&(a!=null&&a.cancelRefetch))this.cancel({silent:!0});else if($(this,Xt))return $(this,Xt).continueRetry(),$(this,Xt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const D=this.observers.find(R=>R.options.queryFn);D&&this.setOptions(D.options)}const r=new AbortController,l=D=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>(xe(this,Cr,!0),r.signal)})},c=()=>{const D=bE(this.options,a),F=(()=>{const L={client:$(this,Mr),queryKey:this.queryKey,meta:this.meta};return l(L),L})();return xe(this,Cr,!1),this.options.persister?this.options.persister(D,F,this):D(F)},m=(()=>{const D={fetchOptions:a,options:this.options,queryKey:this.queryKey,client:$(this,Mr),state:this.state,fetchFn:c};return l(D),D})(),p=$(this,Po)==="infinite"?LT(this.options.pages):this.options.behavior;p==null||p.onFetch(m,this),xe(this,Vo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=m.fetchOptions)==null?void 0:b.meta))&&He(this,$n,Pi).call(this,{type:"fetch",meta:(v=m.fetchOptions)==null?void 0:v.meta}),xe(this,Xt,wE({initialPromise:a==null?void 0:a.initialPromise,fn:m.fetchFn,onCancel:D=>{D instanceof jp&&D.revert&&this.setState({...$(this,Vo),fetchStatus:"idle"}),r.abort()},onFail:(D,R)=>{He(this,$n,Pi).call(this,{type:"failed",failureCount:D,error:R})},onPause:()=>{He(this,$n,Pi).call(this,{type:"pause"})},onContinue:()=>{He(this,$n,Pi).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0}));try{const D=await $(this,Xt).start();if(D===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(D),(w=(k=$(this,Jn).config).onSuccess)==null||w.call(k,D,this),(E=(j=$(this,Jn).config).onSettled)==null||E.call(j,D,this.state.error,this),D}catch(D){if(D instanceof jp){if(D.silent)return $(this,Xt).promise;if(D.revert){if(this.state.data===void 0)throw D;return this.state.data}}throw He(this,$n,Pi).call(this,{type:"error",error:D}),(C=(_=$(this,Jn).config).onError)==null||C.call(_,D,this),(A=(O=$(this,Jn).config).onSettled)==null||A.call(O,this.state.data,D,this),D}finally{this.scheduleGc()}}},Po=new WeakMap,Nr=new WeakMap,Vo=new WeakMap,Jn=new WeakMap,Mr=new WeakMap,Xt=new WeakMap,Ys=new WeakMap,Cr=new WeakMap,$n=new WeakSet,SE=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Pi=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,...EE(r.data,this.options),fetchMeta:t.meta??null};case"success":const l={...r,...Sw(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return xe(this,Vo,t.manual?l:void 0),l;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,Jn).notify({query:this,type:"updated",action:t})})},p2);function EE(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:xE(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Sw(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ew(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,Qs,fn,Rr,Go,Vi,Ma,Xs,Ko,Yo,Tr,Dr,Ca,Qo,ct,As,Op,Ap,Np,Mp,Cp,Rp,Tp,_E,g2,ly=(g2=class extends vl{constructor(t,a){super();Ne(this,ct);Ne(this,Sn);Ne(this,tt);Ne(this,Qs);Ne(this,fn);Ne(this,Rr);Ne(this,Go);Ne(this,Vi);Ne(this,Ma);Ne(this,Xs);Ne(this,Ko);Ne(this,Yo);Ne(this,Tr);Ne(this,Dr);Ne(this,Ca);Ne(this,Qo,new Set);this.options=a,xe(this,Sn,t),xe(this,Ma,null),xe(this,Vi,_p()),this.bindMethods(),this.setOptions(a)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&($(this,tt).addObserver(this),_w($(this,tt),this.options)?He(this,ct,As).call(this):this.updateResult(),He(this,ct,Mp).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Dp($(this,tt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Dp($(this,tt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,He(this,ct,Cp).call(this),He(this,ct,Rp).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 Un(this.options.enabled,$(this,tt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");He(this,ct,Tp).call(this),$(this,tt).setOptions(this.options),a._defaulted&&!md(this.options,a)&&$(this,Sn).getQueryCache().notify({type:"observerOptionsUpdated",query:$(this,tt),observer:this});const l=this.hasListeners();l&&jw($(this,tt),r,this.options,a)&&He(this,ct,As).call(this),this.updateResult(),l&&($(this,tt)!==r||Un(this.options.enabled,$(this,tt))!==Un(a.enabled,$(this,tt))||Ua(this.options.staleTime,$(this,tt))!==Ua(a.staleTime,$(this,tt)))&&He(this,ct,Op).call(this);const c=He(this,ct,Ap).call(this);l&&($(this,tt)!==r||Un(this.options.enabled,$(this,tt))!==Un(a.enabled,$(this,tt))||c!==$(this,Ca))&&He(this,ct,Np).call(this,c)}getOptimisticResult(t){const a=$(this,Sn).getQueryCache().build($(this,Sn),t),r=this.createResult(a,t);return IT(this,r)&&(xe(this,fn,r),xe(this,Go,this.options),xe(this,Rr,$(this,tt).state)),r}getCurrentResult(){return $(this,fn)}trackResult(t,a){return new Proxy(t,{get:(r,l)=>(this.trackProp(l),a==null||a(l),l==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&$(this,Vi).status==="pending"&&$(this,Vi).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,l))})}trackProp(t){$(this,Qo).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 He(this,ct,As).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),$(this,fn)))}createResult(t,a){var H;const r=$(this,tt),l=this.options,c=$(this,fn),u=$(this,Rr),m=$(this,Go),g=t!==r?t.state:$(this,Qs),{state:b}=t;let v={...b},k=!1,w;if(a._optimisticResults){const ne=this.hasListeners(),Y=!ne&&_w(t,a),le=ne&&jw(t,r,a,l);(Y||le)&&(v={...v,...EE(b.data,t.options)}),a._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:j,errorUpdatedAt:E,status:_}=v;w=v.data;let C=!1;if(a.placeholderData!==void 0&&w===void 0&&_==="pending"){let ne;c!=null&&c.isPlaceholderData&&a.placeholderData===(m==null?void 0:m.placeholderData)?(ne=c.data,C=!0):ne=typeof a.placeholderData=="function"?a.placeholderData((H=$(this,Yo))==null?void 0:H.state.data,$(this,Yo)):a.placeholderData,ne!==void 0&&(_="success",w=Ep(c==null?void 0:c.data,ne,a),k=!0)}if(a.select&&w!==void 0&&!C)if(c&&w===(u==null?void 0:u.data)&&a.select===$(this,Xs))w=$(this,Ko);else try{xe(this,Xs,a.select),w=a.select(w),w=Ep(c==null?void 0:c.data,w,a),xe(this,Ko,w),xe(this,Ma,null)}catch(ne){xe(this,Ma,ne)}$(this,Ma)&&(j=$(this,Ma),w=$(this,Ko),E=Date.now(),_="error");const O=v.fetchStatus==="fetching",A=_==="pending",D=_==="error",R=A&&O,F=w!==void 0,T={status:_,fetchStatus:v.fetchStatus,isPending:A,isSuccess:_==="success",isError:D,isInitialLoading:R,isLoading:R,data:w,dataUpdatedAt:v.dataUpdatedAt,error:j,errorUpdatedAt:E,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:v.dataUpdateCount>g.dataUpdateCount||v.errorUpdateCount>g.errorUpdateCount,isFetching:O,isRefetching:O&&!A,isLoadingError:D&&!F,isPaused:v.fetchStatus==="paused",isPlaceholderData:k,isRefetchError:D&&F,isStale:sy(t,a),refetch:this.refetch,promise:$(this,Vi),isEnabled:Un(a.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const ne=T.data!==void 0,Y=T.status==="error"&&!ne,le=ue=>{Y?ue.reject(T.error):ne&&ue.resolve(T.data)},K=()=>{const ue=xe(this,Vi,T.promise=_p());le(ue)},X=$(this,Vi);switch(X.status){case"pending":t.queryHash===r.queryHash&&le(X);break;case"fulfilled":(Y||T.data!==X.value)&&K();break;case"rejected":(!Y||T.error!==X.reason)&&K();break}}return T}updateResult(){const t=$(this,fn),a=this.createResult($(this,tt),this.options);if(xe(this,Rr,$(this,tt).state),xe(this,Go,this.options),$(this,Rr).data!==void 0&&xe(this,Yo,$(this,tt)),md(a,t))return;xe(this,fn,a);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:l}=this.options,c=typeof l=="function"?l():l;if(c==="all"||!c&&!$(this,Qo).size)return!0;const u=new Set(c??$(this,Qo));return this.options.throwOnError&&u.add("error"),Object.keys($(this,fn)).some(m=>{const p=m;return $(this,fn)[p]!==t[p]&&u.has(p)})};He(this,ct,_E).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&He(this,ct,Mp).call(this)}},Sn=new WeakMap,tt=new WeakMap,Qs=new WeakMap,fn=new WeakMap,Rr=new WeakMap,Go=new WeakMap,Vi=new WeakMap,Ma=new WeakMap,Xs=new WeakMap,Ko=new WeakMap,Yo=new WeakMap,Tr=new WeakMap,Dr=new WeakMap,Ca=new WeakMap,Qo=new WeakMap,ct=new WeakSet,As=function(t){He(this,ct,Tp).call(this);let a=$(this,tt).fetch(this.options,t);return t!=null&&t.throwOnError||(a=a.catch(hn)),a},Op=function(){He(this,ct,Cp).call(this);const t=Ua(this.options.staleTime,$(this,tt));if(Bs.isServer()||$(this,fn).isStale||!kp(t))return;const r=yE($(this,fn).dataUpdatedAt,t)+1;xe(this,Tr,_r.setTimeout(()=>{$(this,fn).isStale||this.updateResult()},r))},Ap=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval($(this,tt)):this.options.refetchInterval)??!1},Np=function(t){He(this,ct,Rp).call(this),xe(this,Ca,t),!(Bs.isServer()||Un(this.options.enabled,$(this,tt))===!1||!kp($(this,Ca))||$(this,Ca)===0)&&xe(this,Dr,_r.setInterval(()=>{(this.options.refetchIntervalInBackground||iy.isFocused())&&He(this,ct,As).call(this)},$(this,Ca)))},Mp=function(){He(this,ct,Op).call(this),He(this,ct,Np).call(this,He(this,ct,Ap).call(this))},Cp=function(){$(this,Tr)!==void 0&&(_r.clearTimeout($(this,Tr)),xe(this,Tr,void 0))},Rp=function(){$(this,Dr)!==void 0&&(_r.clearInterval($(this,Dr)),xe(this,Dr,void 0))},Tp=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,Qs,t.state),this.hasListeners()&&(a==null||a.removeObserver(this),t.addObserver(this))},_E=function(t){Ht.batch(()=>{t.listeners&&this.listeners.forEach(a=>{a($(this,fn))}),$(this,Sn).getQueryCache().notify({query:$(this,tt),type:"observerResultsUpdated"})})},g2);function UT(e,t){return Un(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Un(t.retryOnMount,e)===!1)}function _w(e,t){return UT(e,t)||e.state.data!==void 0&&Dp(e,t,t.refetchOnMount)}function Dp(e,t,a){if(Un(t.enabled,e)!==!1&&Ua(t.staleTime,e)!=="static"){const r=typeof a=="function"?a(e):a;return r==="always"||r!==!1&&sy(e,t)}return!1}function jw(e,t,a,r){return(e!==t||Un(r.enabled,e)===!1)&&(!a.suspense||e.state.status!=="error")&&sy(e,a)}function sy(e,t){return Un(t.enabled,e)!==!1&&e.isStaleByTime(Ua(t.staleTime,e))}function IT(e,t){return!md(e.getCurrentResult(),t)}var Zs,yi,sn,Lr,bi,_a,y2,HT=(y2=class extends kE{constructor(t){super();Ne(this,bi);Ne(this,Zs);Ne(this,yi);Ne(this,sn);Ne(this,Lr);xe(this,Zs,t.client),this.mutationId=t.mutationId,xe(this,sn,t.mutationCache),xe(this,yi,[]),this.state=t.state||BT(),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,yi).includes(t)||($(this,yi).push(t),this.clearGcTimeout(),$(this,sn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){xe(this,yi,$(this,yi).filter(a=>a!==t)),this.scheduleGc(),$(this,sn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){$(this,yi).length||(this.state.status==="pending"?this.scheduleGc():$(this,sn).remove(this))}continue(){var t;return((t=$(this,Lr))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var u,m,p,g,b,v,k,w,j,E,_,C,O,A,D,R,F,L;const a=()=>{He(this,bi,_a).call(this,{type:"continue"})},r={client:$(this,Zs),meta:this.options.meta,mutationKey:this.options.mutationKey};xe(this,Lr,wE({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(T,H)=>{He(this,bi,_a).call(this,{type:"failed",failureCount:T,error:H})},onPause:()=>{He(this,bi,_a).call(this,{type:"pause"})},onContinue:a,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>$(this,sn).canRun(this)}));const l=this.state.status==="pending",c=!$(this,Lr).canStart();try{if(l)a();else{He(this,bi,_a).call(this,{type:"pending",variables:t,isPaused:c}),$(this,sn).config.onMutate&&await $(this,sn).config.onMutate(t,this,r);const H=await((m=(u=this.options).onMutate)==null?void 0:m.call(u,t,r));H!==this.state.context&&He(this,bi,_a).call(this,{type:"pending",context:H,variables:t,isPaused:c})}const T=await $(this,Lr).start();return await((g=(p=$(this,sn).config).onSuccess)==null?void 0:g.call(p,T,t,this.state.context,this,r)),await((v=(b=this.options).onSuccess)==null?void 0:v.call(b,T,t,this.state.context,r)),await((w=(k=$(this,sn).config).onSettled)==null?void 0:w.call(k,T,null,this.state.variables,this.state.context,this,r)),await((E=(j=this.options).onSettled)==null?void 0:E.call(j,T,null,t,this.state.context,r)),He(this,bi,_a).call(this,{type:"success",data:T}),T}catch(T){try{await((C=(_=$(this,sn).config).onError)==null?void 0:C.call(_,T,t,this.state.context,this,r))}catch(H){Promise.reject(H)}try{await((A=(O=this.options).onError)==null?void 0:A.call(O,T,t,this.state.context,r))}catch(H){Promise.reject(H)}try{await((R=(D=$(this,sn).config).onSettled)==null?void 0:R.call(D,void 0,T,this.state.variables,this.state.context,this,r))}catch(H){Promise.reject(H)}try{await((L=(F=this.options).onSettled)==null?void 0:L.call(F,void 0,T,t,this.state.context,r))}catch(H){Promise.reject(H)}throw He(this,bi,_a).call(this,{type:"error",error:T}),T}finally{$(this,sn).runNext(this)}}},Zs=new WeakMap,yi=new WeakMap,sn=new WeakMap,Lr=new WeakMap,bi=new WeakSet,_a=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,yi).forEach(r=>{r.onMutationUpdate(t)}),$(this,sn).notify({mutation:this,type:"updated",action:t})})},y2);function BT(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Gi,oi,Ws,b2,qT=(b2=class extends vl{constructor(t={}){super();Ne(this,Gi);Ne(this,oi);Ne(this,Ws);this.config=t,xe(this,Gi,new Set),xe(this,oi,new Map),xe(this,Ws,0)}build(t,a,r){const l=new HT({client:t,mutationCache:this,mutationId:++Du(this,Ws)._,options:t.defaultMutationOptions(a),state:r});return this.add(l),l}add(t){$(this,Gi).add(t);const a=Hu(t);if(typeof a=="string"){const r=$(this,oi).get(a);r?r.push(t):$(this,oi).set(a,[t])}this.notify({type:"added",mutation:t})}remove(t){if($(this,Gi).delete(t)){const a=Hu(t);if(typeof a=="string"){const r=$(this,oi).get(a);if(r)if(r.length>1){const l=r.indexOf(t);l!==-1&&r.splice(l,1)}else r[0]===t&&$(this,oi).delete(a)}}this.notify({type:"removed",mutation:t})}canRun(t){const a=Hu(t);if(typeof a=="string"){const r=$(this,oi).get(a),l=r==null?void 0:r.find(c=>c.state.status==="pending");return!l||l===t}else return!0}runNext(t){var r;const a=Hu(t);if(typeof a=="string"){const l=(r=$(this,oi).get(a))==null?void 0:r.find(c=>c!==t&&c.state.isPaused);return(l==null?void 0:l.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ht.batch(()=>{$(this,Gi).forEach(t=>{this.notify({type:"removed",mutation:t})}),$(this,Gi).clear(),$(this,oi).clear()})}getAll(){return Array.from($(this,Gi))}find(t){const a={exact:!0,...t};return this.getAll().find(r=>vw(a,r))}findAll(t={}){return this.getAll().filter(a=>vw(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(hn))))}},Gi=new WeakMap,oi=new WeakMap,Ws=new WeakMap,b2);function Hu(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Ow(e,t){const a=new Set(t);return e.filter(r=>!a.has(r))}function FT(e,t,a){const r=e.slice(0);return r[t]=a,r}var Xo,En,Zo,zr,zn,Ra,Js,ec,tc,nc,Pt,Lp,zp,jE,$p,Up,Ip,v2,PT=(v2=class extends vl{constructor(t,a,r){super();Ne(this,Pt);Ne(this,Xo);Ne(this,En);Ne(this,Zo);Ne(this,zr);Ne(this,zn);Ne(this,Ra);Ne(this,Js);Ne(this,ec);Ne(this,tc);Ne(this,nc,[]);xe(this,Xo,t),xe(this,zr,r),xe(this,Zo,[]),xe(this,zn,[]),xe(this,En,[]),this.setQueries(a)}onSubscribe(){this.listeners.size===1&&$(this,zn).forEach(t=>{t.subscribe(a=>{He(this,Pt,Up).call(this,t,a)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,$(this,zn).forEach(t=>{t.destroy()})}setQueries(t,a){xe(this,Zo,t),xe(this,zr,a),Ht.batch(()=>{const r=$(this,zn),l=He(this,Pt,$p).call(this,$(this,Zo));l.forEach(v=>v.observer.setOptions(v.defaultedQueryOptions));const c=l.map(v=>v.observer),u=c.map(v=>v.getCurrentResult()),m=r.length!==c.length,p=c.some((v,k)=>v!==r[k]),g=m||p,b=g?!0:u.some((v,k)=>{const w=$(this,En)[k];return!w||!md(v,w)});!g&&!b||(g&&(xe(this,nc,l),xe(this,zn,c)),xe(this,En,u),this.hasListeners()&&(g&&(Ow(r,c).forEach(v=>{v.destroy()}),Ow(c,r).forEach(v=>{v.subscribe(k=>{He(this,Pt,Up).call(this,v,k)})})),He(this,Pt,Ip).call(this)))})}getCurrentResult(){return $(this,En)}getQueries(){return $(this,zn).map(t=>t.getCurrentQuery())}getObservers(){return $(this,zn)}getOptimisticResult(t,a){const r=He(this,Pt,$p).call(this,t),l=r.map(u=>u.observer.getOptimisticResult(u.defaultedQueryOptions)),c=r.map(u=>u.defaultedQueryOptions.queryHash);return[l,u=>He(this,Pt,zp).call(this,u??l,a,c),()=>He(this,Pt,Lp).call(this,l,r)]}},Xo=new WeakMap,En=new WeakMap,Zo=new WeakMap,zr=new WeakMap,zn=new WeakMap,Ra=new WeakMap,Js=new WeakMap,ec=new WeakMap,tc=new WeakMap,nc=new WeakMap,Pt=new WeakSet,Lp=function(t,a){return a.map((r,l)=>{const c=t[l];return r.defaultedQueryOptions.notifyOnChangeProps?c:r.observer.trackResult(c,u=>{a.forEach(m=>{m.observer.trackProp(u)})})})},zp=function(t,a,r){if(a){const l=$(this,tc),c=r!==void 0&&l!==void 0&&(l.length!==r.length||r.some((u,m)=>u!==l[m]));return(!$(this,Ra)||$(this,En)!==$(this,ec)||c||a!==$(this,Js))&&(xe(this,Js,a),xe(this,ec,$(this,En)),r!==void 0&&xe(this,tc,r),xe(this,Ra,ry($(this,Ra),a(t)))),$(this,Ra)}return t},jE=function(){var t;return((t=$(this,zr))==null?void 0:t.combine)!==void 0&&$(this,zn).some((a,r)=>{var l;return a.options.suspense&&((l=$(this,En)[r])==null?void 0:l.data)===void 0})},$p=function(t){const a=new Map;$(this,zn).forEach(l=>{const c=l.options.queryHash;if(!c)return;const u=a.get(c);u?u.push(l):a.set(c,[l])});const r=[];return t.forEach(l=>{var p;const c=$(this,Xo).defaultQueryOptions(l),m=((p=a.get(c.queryHash))==null?void 0:p.shift())??new ly($(this,Xo),c);r.push({defaultedQueryOptions:c,observer:m})}),r},Up=function(t,a){const r=$(this,zn).indexOf(t);r!==-1&&(xe(this,En,FT($(this,En),r,a)),He(this,Pt,Ip).call(this))},Ip=function(){var t;if(this.hasListeners()){const a=He(this,Pt,Lp).call(this,$(this,En),$(this,nc)),r=He(this,Pt,jE).call(this),l=$(this,Ra),c=r?l:He(this,Pt,zp).call(this,a,(t=$(this,zr))==null?void 0:t.combine);(r||l!==c)&&Ht.batch(()=>{this.listeners.forEach(u=>{u($(this,En))})})}},v2),vi,x2,VT=(x2=class extends vl{constructor(t={}){super();Ne(this,vi);this.config=t,xe(this,vi,new Map)}build(t,a,r){const l=a.queryKey,c=a.queryHash??ay(l,a);let u=this.get(c);return u||(u=new $T({client:t,queryKey:l,queryHash:c,options:t.defaultQueryOptions(a),state:r,defaultOptions:t.getQueryDefaults(l)}),this.add(u)),u}add(t){$(this,vi).has(t.queryHash)||($(this,vi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const a=$(this,vi).get(t.queryHash);a&&(t.destroy(),a===t&&$(this,vi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ht.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return $(this,vi).get(t)}getAll(){return[...$(this,vi).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()})})}},vi=new WeakMap,x2),Ct,Ta,Da,Wo,Jo,La,el,tl,w2,GT=(w2=class{constructor(e={}){Ne(this,Ct);Ne(this,Ta);Ne(this,Da);Ne(this,Wo);Ne(this,Jo);Ne(this,La);Ne(this,el);Ne(this,tl);xe(this,Ct,e.queryCache||new VT),xe(this,Ta,e.mutationCache||new qT),xe(this,Da,e.defaultOptions||{}),xe(this,Wo,new Map),xe(this,Jo,new Map),xe(this,La,0)}mount(){Du(this,La)._++,$(this,La)===1&&(xe(this,el,iy.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,Ct).onFocus())})),xe(this,tl,pd.subscribe(async e=>{e&&(await this.resumePausedMutations(),$(this,Ct).onOnline())})))}unmount(){var e,t;Du(this,La)._--,$(this,La)===0&&((e=$(this,el))==null||e.call(this),xe(this,el,void 0),(t=$(this,tl))==null||t.call(this),xe(this,tl,void 0))}isFetching(e){return $(this,Ct).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return $(this,Ta).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(Ua(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}),l=$(this,Ct).get(r.queryHash),c=l==null?void 0:l.state.data,u=_T(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(l=>l.cancel(a)));return Promise.all(r).then(hn).catch(hn)}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(l=>!l.isDisabled()&&!l.isStatic()).map(l=>{let c=l.fetch(void 0,a);return a.throwOnError||(c=c.catch(hn)),l.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(hn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const a=$(this,Ct).build(this,t);return a.isStaleByTime(Ua(t.staleTime,a))?a.fetch(t):Promise.resolve(a.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(hn).catch(hn)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(hn).catch(hn)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return pd.isOnline()?$(this,Ta).resumePausedMutations():Promise.resolve()}getQueryCache(){return $(this,Ct)}getMutationCache(){return $(this,Ta)}getDefaultOptions(){return $(this,Da)}setDefaultOptions(e){xe(this,Da,e)}setQueryDefaults(e,t){$(this,Wo).set(Hs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...$(this,Wo).values()],a={};return t.forEach(r=>{ll(e,r.queryKey)&&Object.assign(a,r.defaultOptions)}),a}setMutationDefaults(e,t){$(this,Jo).set(Hs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...$(this,Jo).values()],a={};return t.forEach(r=>{ll(e,r.mutationKey)&&Object.assign(a,r.defaultOptions)}),a}defaultQueryOptions(e){if(e._defaulted)return e;const t={...$(this,Da).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ay(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===oy&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...$(this,Da).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){$(this,Ct).clear(),$(this,Ta).clear()}},Ct=new WeakMap,Ta=new WeakMap,Da=new WeakMap,Wo=new WeakMap,Jo=new WeakMap,La=new WeakMap,el=new WeakMap,tl=new WeakMap,w2),OE=x.createContext(void 0),Hd=e=>{const t=x.useContext(OE);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},KT=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(OE.Provider,{value:e,children:t})),AE=x.createContext(!1),NE=()=>x.useContext(AE);AE.Provider;function YT(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var QT=x.createContext(YT()),ME=()=>x.useContext(QT),CE=(e,t,a)=>{const r=a!=null&&a.state.error&&typeof e.throwOnError=="function"?vE(e.throwOnError,[a.state.error,a]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},RE=e=>{x.useEffect(()=>{e.clearReset()},[e])},TE=({result:e,errorResetBoundary:t,throwOnError:a,query:r,suspense:l})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(l&&e.data===void 0||vE(a,[e.error,r])),DE=e=>{if(e.suspense){const a=l=>l==="static"?l:Math.max(l??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...l)=>a(r(...l)):a(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},XT=(e,t)=>e.isLoading&&e.isFetching&&!t,Hp=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Bp=(e,t,a)=>t.fetchOptimistic(e).catch(()=>{a.clearReset()});function ZT({queries:e,...t},a){const r=Hd(),l=NE(),c=ME(),u=x.useMemo(()=>e.map(E=>{const _=r.defaultQueryOptions(E);return _._optimisticResults=l?"isRestoring":"optimistic",_}),[e,r,l]);u.forEach(E=>{DE(E);const _=r.getQueryCache().get(E.queryHash);CE(E,c,_)}),RE(c);const[m]=x.useState(()=>new PT(r,u,t)),[p,g,b]=m.getOptimisticResult(u,t.combine),v=!l&&t.subscribed!==!1;x.useSyncExternalStore(x.useCallback(E=>v?m.subscribe(Ht.batchCalls(E)):hn,[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),x.useEffect(()=>{m.setQueries(u,t)},[u,t,m]);const w=p.some((E,_)=>Hp(u[_],E))?p.flatMap((E,_)=>{const C=u[_];if(C&&Hp(C,E)){const O=new ly(r,C);return Bp(C,O,c)}return[]}):[];if(w.length>0)throw Promise.all(w);const j=p.find((E,_)=>{const C=u[_];return C&&TE({result:E,errorResetBoundary:c,throwOnError:C.throwOnError,query:r.getQueryCache().get(C.queryHash),suspense:C.suspense})});if(j!=null&&j.error)throw j.error;return g(b())}function WT(e,t,a){var w,j,E,_;const r=NE(),l=ME(),c=Hd(),u=c.defaultQueryOptions(e);(j=(w=c.getDefaultOptions().queries)==null?void 0:w._experimental_beforeQuery)==null||j.call(w,u);const m=c.getQueryCache().get(u.queryHash),p=e.subscribed!==!1;u._optimisticResults=r?"isRestoring":p?"optimistic":void 0,DE(u),CE(u,l,m),RE(l);const g=!c.getQueryCache().get(u.queryHash),[b]=x.useState(()=>new t(c,u)),v=b.getOptimisticResult(u),k=!r&&p;if(x.useSyncExternalStore(x.useCallback(C=>{const O=k?b.subscribe(Ht.batchCalls(C)):hn;return b.updateResult(),O},[b,k]),()=>b.getCurrentResult(),()=>b.getCurrentResult()),x.useEffect(()=>{b.setOptions(u)},[u,b]),Hp(u,v))throw Bp(u,b,l);if(TE({result:v,errorResetBoundary:l,throwOnError:u.throwOnError,query:m,suspense:u.suspense}))throw v.error;if((_=(E=c.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||_.call(E,u,v),u.experimental_prefetchInRender&&!Bs.isServer()&&XT(v,r)){const C=g?Bp(u,b,l):m==null?void 0:m.promise;C==null||C.catch(hn).finally(()=>{b.updateResult()})}return u.notifyOnChangeProps?v:b.trackResult(v)}function Bd(e,t){return WT(e,ly)}const JT=600*1e3,eD=(e,t,a)=>({queryKey:["crop-url",e,t],queryFn:()=>a(e,t),staleTime:JT});function LE(e,t,a){const r=x.useMemo(()=>[...new Set(t.filter(c=>!!c))],[t]),l=ZT({queries:r.map(c=>({...eD(e,c,a),enabled:!!e}))});return x.useMemo(()=>{const c=new Map;return r.forEach((u,m)=>{var g;const p=(g=l[m])==null?void 0:g.data;typeof p=="string"&&c.set(u,p)}),c},[r,l])}/**
|
|
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 zE=(...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 tD=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 nD=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 Aw=e=>{const t=nD(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 qm={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 iD=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},aD=x.createContext({}),rD=()=>x.useContext(aD),oD=x.forwardRef(({color:e,size:t,strokeWidth:a,absoluteStrokeWidth:r,className:l="",children:c,iconNode:u,...m},p)=>{const{size:g=24,strokeWidth:b=2,absoluteStrokeWidth:v=!1,color:k="currentColor",className:w=""}=rD()??{},j=r??v?Number(a??b)*24/Number(t??g):a??b;return x.createElement("svg",{ref:p,...qm,width:t??g??qm.width,height:t??g??qm.height,stroke:e??k,strokeWidth:j,className:zE("lucide",w,l),...!c&&!iD(m)&&{"aria-hidden":"true"},...m},[...u.map(([E,_])=>x.createElement(E,_)),...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,...l},c)=>x.createElement(oD,{ref:c,iconNode:t,className:zE(`lucide-${tD(Aw(e))}`,`lucide-${e}`,r),...l}));return a.displayName=Aw(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 lD=[["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"}]],sD=ve("activity",lD);/**
|
|
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 cD=[["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"}]],uD=ve("archive",cD);/**
|
|
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 dD=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],fD=ve("arrow-down",dD);/**
|
|
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 hD=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],mD=ve("arrow-left",hD);/**
|
|
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 pD=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],gD=ve("arrow-right",pD);/**
|
|
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 yD=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],$E=ve("arrow-up-right",yD);/**
|
|
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 bD=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],vD=ve("arrow-up",bD);/**
|
|
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 xD=[["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"}]],wD=ve("book-open",xD);/**
|
|
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 kD=[["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"}]],cy=ve("box",kD);/**
|
|
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 SD=[["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"}]],ED=ve("building-2",SD);/**
|
|
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 _D=[["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"}]],jD=ve("building",_D);/**
|
|
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 OD=[["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"}]],AD=ve("calendar-days",OD);/**
|
|
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 ND=[["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"}]],MD=ve("calendar",ND);/**
|
|
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 CD=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],RD=ve("chart-line",CD);/**
|
|
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 TD=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],qd=ve("check",TD);/**
|
|
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 DD=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],uy=ve("chevron-down",DD);/**
|
|
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 LD=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],UE=ve("chevron-left",LD);/**
|
|
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 zD=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],dy=ve("chevron-right",zD);/**
|
|
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 $D=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],UD=ve("chevrons-up-down",$D);/**
|
|
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 ID=[["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"}]],HD=ve("circle-question-mark",ID);/**
|
|
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 BD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],qD=ve("clock",BD);/**
|
|
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 FD=[["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"}]],fy=ve("cloud-upload",FD);/**
|
|
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 PD=[["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"}]],VD=ve("copy",PD);/**
|
|
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 GD=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],KD=ve("credit-card",GD);/**
|
|
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 YD=[["path",{d:"M6 2v14a2 2 0 0 0 2 2h14",key:"ron5a4"}],["path",{d:"M18 22V8a2 2 0 0 0-2-2H2",key:"7s9ehn"}]],QD=ve("crop",YD);/**
|
|
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 XD=[["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"}]],ZD=ve("database",XD);/**
|
|
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 WD=[["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"}]],IE=ve("download",WD);/**
|
|
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 JD=[["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"}]],e6=ve("ellipsis-vertical",JD);/**
|
|
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 t6=[["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"}]],n6=ve("ellipsis",t6);/**
|
|
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 i6=[["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"}]],HE=ve("external-link",i6);/**
|
|
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 a6=[["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"}]],r6=ve("eye-off",a6);/**
|
|
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 o6=[["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"}]],BE=ve("eye",o6);/**
|
|
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 l6=[["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"}]],s6=ve("file-pen-line",l6);/**
|
|
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 c6=[["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"}]],qE=ve("file-spreadsheet",c6);/**
|
|
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 u6=[["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"}]],Fd=ve("file-text",u6);/**
|
|
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 d6=[["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"}]],Fm=ve("files",d6);/**
|
|
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 f6=[["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"}]],h6=ve("file",f6);/**
|
|
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 m6=[["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"}]],p6=ve("film",m6);/**
|
|
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 g6=[["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"}]],y6=ve("globe",g6);/**
|
|
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 b6=[["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"}]],hy=ve("grip-vertical",b6);/**
|
|
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 v6=[["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"}]],x6=ve("house",v6);/**
|
|
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 w6=[["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"}]],Pd=ve("image",w6);/**
|
|
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 k6=[["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"}]],qp=ve("images",k6);/**
|
|
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 S6=[["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"}]],E6=ve("key-round",S6);/**
|
|
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 _6=[["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"}]],FE=ve("layout-grid",_6);/**
|
|
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 j6=[["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"}]],O6=ve("layout-template",j6);/**
|
|
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 A6=[["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"}]],N6=ve("library-big",A6);/**
|
|
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 M6=[["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"}]],my=ve("link-2",M6);/**
|
|
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 C6=[["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"}]],R6=ve("link",C6);/**
|
|
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 T6=[["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"}]],PE=ve("list",T6);/**
|
|
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 D6=[["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"}]],L6=ve("lock",D6);/**
|
|
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 z6=[["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",z6);/**
|
|
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 U6=[["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"}]],I6=ve("mail",U6);/**
|
|
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 H6=[["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"}]],B6=ve("map-pin-house",H6);/**
|
|
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 q6=[["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"}]],VE=ve("map-pin",q6);/**
|
|
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 F6=[["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"}]],P6=ve("map-pinned",F6);/**
|
|
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 V6=[["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"}]],G6=ve("maximize-2",V6);/**
|
|
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 K6=[["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"}]],Y6=ve("mic",K6);/**
|
|
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 Q6=[["path",{d:"M5 12h14",key:"1ays0h"}]],X6=ve("minus",Q6);/**
|
|
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 Z6=[["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"}]],W6=ve("mouse-pointer-click",Z6);/**
|
|
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 J6=[["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"}]],eL=ve("newspaper",J6);/**
|
|
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 tL=[["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"}]],nL=ve("palette",tL);/**
|
|
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 iL=[["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"}]],py=ve("pencil",iL);/**
|
|
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 aL=[["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"}]],rL=ve("phone",aL);/**
|
|
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 oL=[["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"}]],GE=ve("play",oL);/**
|
|
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 lL=[["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"}]],sL=ve("plug",lL);/**
|
|
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 cL=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Vd=ve("plus",cL);/**
|
|
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 uL=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],dL=ve("power",uL);/**
|
|
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 fL=[["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"}]],gy=ve("presentation",fL);/**
|
|
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 hL=[["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"}]],mL=ve("redo-2",hL);/**
|
|
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 pL=[["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"}]],yy=ve("rotate-3d",pL);/**
|
|
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 gL=[["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"}]],yL=ve("rotate-cw",gL);/**
|
|
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 bL=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],by=ve("search",bL);/**
|
|
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 vL=[["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"}]],xL=ve("settings",vL);/**
|
|
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 wL=[["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"}]],kL=ve("share",wL);/**
|
|
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 SL=[["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"}]],EL=ve("sparkles",SL);/**
|
|
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 _L=[["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"}]],jL=ve("tag",_L);/**
|
|
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 OL=[["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"}]],xl=ve("trash-2",OL);/**
|
|
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 AL=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],NL=ve("trending-up",AL);/**
|
|
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 ML=[["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"}]],CL=ve("triangle-alert",ML);/**
|
|
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 RL=[["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"}]],TL=ve("type",RL);/**
|
|
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 DL=[["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"}]],LL=ve("undo-2",DL);/**
|
|
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 zL=[["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"}]],Gd=ve("upload",zL);/**
|
|
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 $L=[["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"}]],UL=ve("user-plus",$L);/**
|
|
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 IL=[["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"}]],HL=ve("user",IL);/**
|
|
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 BL=[["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"}]],qL=ve("users",BL);/**
|
|
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 FL=[["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"}]],vy=ve("video",FL);/**
|
|
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 PL=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xy=ve("x",PL);function ae(...e){return Jg(Xg(e))}const VL="flex flex-col gap-3.5 pt-1",Vr="flex flex-col gap-1",KE="text-[length:calc(11*var(--content))] font-medium text-ink-4 pl-0.5",wl="m-0 text-caption leading-[1.4] text-danger",YE="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",GL="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)]",KL="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",kl=ae("data-[attention=required]:border-danger data-[attention=required]:bg-danger-soft","data-[attention=invalid]:border-danger data-[attention=invalid]:bg-danger-soft");function Sl(e,t){return e===null||e==="required"&&!t?{}:{"data-attention":e}}const QE="flex items-center text-[length:calc(12.5*var(--content))] text-ink-4",YL=ae(vt,"min-w-0 flex-1 bg-transparent text-ink outline-none placeholder:text-ink-4"),QL="py-2.25",XL="text-[length:calc(13.5*var(--content))]",XE=ae(QL,XL),ZE="font-mono text-[length:calc(10.5*var(--content))] [font-feature-settings:'tnum'] shrink-0",WE="text-[#7a5a14]";function ZL(e,t){const a=ae(ZE,"text-ink-4");return t==null?a:e>t?ae(a,"text-danger"):e>=t*.9?ae(a,WE):a}function WL({children:e}){return d.jsx("span",{className:KE,children:e})}function JL({value:e,onChange:t,placeholder:a,inputMode:r,maxLength:l,spellCheck:c,className:u,ariaLabel:m,id:p}){return d.jsx("input",{id:p,className:ae(YL,u),value:e,placeholder:a,inputMode:r,maxLength:l,spellCheck:c,"aria-label":m,onChange:g=>t(g.target.value)})}function dn(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:dn(xl,11),plus:dn(Vd,14),up:dn(Gd,15),link:dn(R6,13),play:({size:e=20}={})=>d.jsx(GE,{size:e,strokeWidth:0,fill:"currentColor",style:{width:`calc(${e} * var(--content))`,height:`calc(${e} * var(--content))`}}),tour:dn(yy,18),search:dn(by,14),x:dn(xy,15),check:dn(qd,13),minus:dn(X6,16),external:dn(HE,11),grip:dn(hy,13,1.8),calendar:dn(AD,14),chevL:dn(UE,15),chevR:dn(dy,15),chevD:dn(uy,13)},Kd=x.createContext(null);function e8({ports:e,children:t}){return d.jsx(Kd.Provider,{value:e,children:t})}function Wt(){const e=x.useContext(Kd);if(!e)throw new Error("useSlotEditorPorts: missing SlotEditorPortsProvider");return e}function t8(){var e;return(e=x.useContext(Kd))==null?void 0:e.fillMark}function n8(){var e;return(e=x.useContext(Kd))==null?void 0:e.isMediaProcessing}function Io(e){return Wt().useEditorStore(e)}const i8="size-[calc(6*var(--content))] shrink-0 rounded-full bg-honey-ink";function qs(e,t){const a=w4(t);return e===void 0||a===null?void 0:`${e}.${a}`}function Fs(e,t){return e===void 0?void 0:`${e}.${t}`}function JE(e){return e==="list"||e==="media"||pn(e)}function a8(e){const t=t8();return t===void 0||e===void 0?null:t(e)}function r8({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:i8,"aria-hidden":"true"}),e]})}var Wi=k2();function o8(...e){return Jg(Xg(e))}const Yd=1e3,Fa=Yd+200,l8=Yd+500;let s8=0;const Pa=[];let e_="",t_="";function c8(){if(Pa.length!==1||typeof document>"u")return;const e=document.body;e_=e.style.overflow,t_=e.style.paddingRight;const t=window.innerWidth-document.documentElement.clientWidth;e.style.overflow="hidden",t>0&&(e.style.paddingRight=`${t}px`)}function u8(){Pa.length===0&&(typeof document>"u"||(document.body.style.overflow=e_,document.body.style.paddingRight=t_))}function n_(){const e=++s8;return Pa.push(e),c8(),e}function Fp(e){const t=Pa.indexOf(e);t!==-1&&Pa.splice(t,1),u8()}function i_(e){const t=Pa.indexOf(e);return Yd+(t===-1?0:t)*10}function Nw(e){return Pa[Pa.length-1]===e}const d8="(prefers-reduced-motion: reduce)";function f8(){const[e,t]=x.useState(!1);return x.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const a=window.matchMedia(d8);t(a.matches);const r=l=>t(l.matches);return a.addEventListener("change",r),()=>a.removeEventListener("change",r)},[]),e}const h8={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)]"},m8='a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';function wy({open:e,onClose:t,className:a,size:r,closeOnBackdrop:l=!0,closeOnEsc:c=!0,labelledBy:u,ariaLabel:m,children:p}){const[g,b]=x.useState("closed"),v=x.useRef(null),k=x.useRef(null),w=x.useRef(null),[j,E]=x.useState(1e3),_=f8(),[C,O]=x.useState(p);e&&C!==p&&O(p),x.useEffect(()=>{e&&g==="closed"?b("open"):!e&&g==="open"&&b(_?"closed":"closing")},[e,g,_]),x.useEffect(()=>{var R;if(g==="open"&&v.current===null){w.current=document.activeElement??null;const F=n_();v.current=F,E(i_(F)),(R=k.current)==null||R.focus()}},[g]),x.useEffect(()=>{var R,F;g==="closed"&&v.current!==null&&(Fp(v.current),v.current=null,(F=(R=w.current)==null?void 0:R.focus)==null||F.call(R),w.current=null)},[g]),x.useEffect(()=>()=>{v.current!==null&&(Fp(v.current),v.current=null)},[]),x.useEffect(()=>{if(g!=="closing")return;const R=setTimeout(()=>b("closed"),400);return()=>clearTimeout(R)},[g]),x.useEffect(()=>{if(g!=="open"||!c)return;const R=F=>{F.key==="Escape"&&(v.current===null||!Nw(v.current)||(F.stopPropagation(),t()))};return document.addEventListener("keydown",R,!0),()=>document.removeEventListener("keydown",R,!0)},[g,c,t]),x.useEffect(()=>{if(g!=="open")return;const R=F=>{if(F.key!=="Tab"||v.current===null||!Nw(v.current))return;const L=k.current;if(!L)return;const T=L.querySelectorAll(m8);if(T.length===0){F.preventDefault();return}const H=T[0],ne=T[T.length-1];F.shiftKey&&document.activeElement===H?(F.preventDefault(),ne==null||ne.focus()):!F.shiftKey&&document.activeElement===ne&&(F.preventDefault(),H==null||H.focus())};return document.addEventListener("keydown",R,!0),()=>document.removeEventListener("keydown",R,!0)},[g]);const A=x.useCallback(R=>{R.target===R.currentTarget&&g==="closing"&&b("closed")},[g]);if(g==="closed"||typeof document>"u")return null;const D=g==="closing"?"closing":"open";return Wi.createPortal(d.jsx("div",{className:"hp-modal-backdrop","data-state":D,inert:D==="closing",style:{zIndex:j},onMouseDown:l?t:void 0,children:d.jsx("div",{ref:k,className:o8("hp-modal-panel",r?h8[r]:void 0,a),"data-state":D,role:"dialog","aria-modal":"true","aria-labelledby":u,"aria-label":m,tabIndex:-1,onMouseDown:R=>R.stopPropagation(),onAnimationEnd:A,children:e?p:C})}),document.body)}function a_(){const[e,t]=x.useState(Yd);return x.useEffect(()=>{const a=n_();return t(i_(a)),()=>Fp(a)},[]),e}const p8={youtube:"video",vimeo:"video"};function r_(e){const t=ac(e.startsWith("http")?e:`https://${e}`);if(t!==null){const a=Qa[t],r=a.kind==="tour"||a.kind==="video"?a.kind:void 0;return{key:t,name:a.label,kind:p8[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 ky="bg-[#f7f6f2]",_n="bg-[#eceae3]",g8="[mask-image:var(--fade-down)]",y8="[background-image:var(--wash-soft)]";function fc({className:e,children:t}){return d.jsx("div",{"aria-hidden":"true",className:ae("pointer-events-none absolute inset-0 select-none overflow-hidden",g8,e),children:t})}function gd({icon:e,headline:t,line:a,lifted:r=!1}){return d.jsx("div",{className:ae("absolute inset-0 flex items-center justify-center-safe overflow-y-auto px-6 py-8",y8),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 Sy="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",Ey="border-line bg-canvas text-ink-2 hover:bg-[#f6f5f1] hover:text-ink",Qd="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)]",o_="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",Mw=ae(Sy,Ey,"font-semibold text-ink focus-visible:bg-[#f6f5f1] aria-expanded:bg-[#f6f5f1]"),b8={large:Mw,compact:ae(Mw,"h-8")},v8="size-[calc(15*var(--content))] shrink-0";function yd({add:e,size:t,onClick:a,buttonRef:r,expanded:l}){return d.jsxs("button",{ref:r,type:"button",...l!==void 0?{"aria-haspopup":"dialog","aria-expanded":l}:{},"data-list-verb":e.verb,className:b8[t],onClick:a,children:[d.jsx(e.icon,{"aria-hidden":"true",strokeWidth:2.4,className:v8}),e.label]})}function hc({size:e,add:t,onAdd:a,newChip:r,choose:l}){const c=l!==void 0?d.jsx(yd,{add:l.choose,size:e,onClick:l.onChoose}):r??(a!==null?d.jsx(yd,{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 l_=x.createContext(null);function x8({api:e,children:t}){return d.jsx(l_.Provider,{value:e,children:t})}function _y(){const e=x.useContext(l_);if(!e)throw new Error("useMediaLibraryApi: missing MediaLibraryApiProvider");return e}async function w8(e,t,a){let r=0;const l=Math.max(1,Math.min(t,e.length)),c=Array.from({length:l},async()=>{for(;r<e.length;){const u=r++;try{await a(e[u],u)}catch{}}});await Promise.all(c)}const Cw=500*1024*1024,bd=[{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"}],s_=new Set(bd.map(e=>e.extension)),c_=new Set(bd.flatMap(e=>e.mimeTypes));function Xd(e){const t=e.indexOf(";");return(t===-1?e:e.slice(0,t)).trim().toLowerCase()}function jy(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 k8(e){return Xd(e).startsWith("image/")}function S8(e){return Xd(e).startsWith("video/")}function E8(e,t){return s_.has(jy(e))&&c_.has(Xd(t))}function _8(e,t){return k8(t)||S8(t)||E8(e,t)}function j8(e,t){const a=jy(e),r=bd.find(u=>u.extension===a);if(r)return r.family;const l=Xd(t),c=bd.find(u=>u.mimeTypes.includes(l));return c?c.family:null}const O8=[...c_,...s_].join(","),A8="an image, a video, or a document (PDF, Word, Excel .xlsx, PowerPoint .pptx, CSV, or text)";function N8(e){return e.replace(/^https?:\/\//i,"").replace(/\/$/,"")}function M8(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 u_(e,t){const a=j8(e,t),{glyph:r,typeNoun:l}=a===null?{glyph:"doc",typeNoun:"File"}:M8(a);return{glyph:r,typeNoun:l,extension:jy(e).replace(".","").toUpperCase()}}function C8(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(0)} KB`:`${(e/1048576).toFixed(1)} MB`}function vd(e){var t;return((t=e.renditions.poster)==null?void 0:t.url)??(e.kind==="image"?e.file_url:null)}function R8(e){var t;return e.kind!=="image"?vd(e):(rc(e.crop)?(t=e.renditions.crop)==null?void 0:t.url:void 0)??vd(e)}function d_(e){if(e.kind!=="image"||e.state==="failed")return!1;const{crop:t,cutout:a}=e.renditions;return t!==null&&rc(e.crop)&&!rl(t.over.crop,e.crop)?!0:a!==null&&!rl(a.over.crop,e.crop)}function T8(e){return e.url!==null||e.renditions.encode!==null}function f_(e){return e.url!==null&&m5(e.url)!==null}function Zd({renditions:e={},...t}){const a=new Set(eS),r=l=>{const c=e[l];if(c===void 0)return null;const u={key:c,mime:null,width:null,height:null,bytes:null,url:c};return a.has(l)?{...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(v5.map(l=>[l,r(l)]))}}function h_(e){var t,a,r,l;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)??vd(e)??""};case"video":return{id:e.id,kind:"video",name:e.name,size:"",src:((a=e.renditions.poster)==null?void 0:a.url)??"",ready:T8(e),durationMs:e.renditions.encode===null?null:e.duration_ms,videoSource:E5(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:f_(e),provider:e.provider??""};case"document":return{id:e.id,kind:"document",name:e.name,size:e.bytes!==null&&e.bytes>0?C8(e.bytes):"",src:((l=e.renditions.poster)==null?void 0:l.url)??"",mime:e.mime??""}}}function D8(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 L8=5;function Rw(e){return`${Math.round(e/(1024*1024))} MB`}function z8(e){return e.size>Cw?{ok:!1,message:`This file is ${Rw(e.size)}. The maximum upload size is ${Rw(Cw)}.`}:_8(e.name,e.type)?{ok:!0}:{ok:!1,message:`This file type (${e.type||"unknown"}) isn't supported. Upload ${A8}.`}}function $8(e){return e.attempt?{kind:"resume",attempt:e.attempt}:{kind:"fresh"}}function Wd(e){const{mediaFactsQuery:t}=_y(),a=t(e??"");return Bd({...a,select:r=>r.facts,enabled:!!e}).data}async function Pp(e,t,a){await e.invalidateQueries({queryKey:t.mediaFactsQuery(a).queryKey})}const U8=new Map;function I8(e){if(e===void 0)return U8;const t=new Map;for(const[a,r]of zd(e)){if(!Object.hasOwn(e.files,r.file))continue;const l=e.files[r.file];"renditions"in l&&t.set(a,Og(l,r))}return t}function El(e){const t=Wd(e===""?null:e);return x.useMemo(()=>I8(t),[t])}const H8={search:by,chevd:uy,chevr:dy,chevl:UE,grid:FE,list:PE,plus:Vd,choose:$E,cloud:fy,dots:e6,trash:xl,down:IE,x:xy,check:qd,warn:CL,recheck:yL,play:GE,eye:BE,pencil:py,crop:QD,image:Pd,doc:Fd,spreadsheet:qE,presentation:gy,file:h6,video:vy,tour:cy,upload:Gd};function it({name:e,size:t=14,stroke:a=1.8}){const r=H8[e];if(!r)return null;const l={width:`calc(${t} * var(--content))`,height:`calc(${t} * var(--content))`};return e==="play"?d.jsx(r,{size:t,strokeWidth:a,fill:"currentColor",style:l}):d.jsx(r,{size:t,strokeWidth:a,style:l})}const Oy={image:{process:[_t.probe(),_t.understand(),_t.preview(),_t.ladder()],gates:["probe","understand"],publishes:["preview","ladder"]},video:{process:[_t.probe(),_t.transcode(),_t.poster(),_t.understand(),_t.preview(),_t.ladder(),_t.fetch()],gates:["probe","understand"],publishes:["transcode","poster","preview","ladder"]},document:{process:[_t.probe(),_t.understand(),_t.poster(),_t.rasterize(),_t.preview(),_t.ladder()],gates:["probe","understand"],publishes:["poster","preview","ladder"]},tour:{process:[_t.fetch(),_t.tour_details(),_t.understand()],gates:["understand"],publishes:[]}};function B8(e){for(const t of Yr){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 l of a.process){const c=K2(l);if(c===null||typeof l!="object")return`${t}'s row lists ${JSON.stringify(l)}, which is no process binding`;const u=Ya[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=kg(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 l of a.gates)if(!r.has(l))return`${t}'s row gates on "${l}", which is not on its row`;for(const l of a.publishes)if(!r.has(l))return`${t}'s row publishes on "${l}", which is not on its row`}return null}const Tw=B8(Oy);if(Tw!==null)throw new Error(`KIND_TABLE ${Tw}.`);const q8={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},F8={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 P8(e,t){const a=F8[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 m_={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 Yr){const t=Oy[e].process.map(a=>a.verb);for(const{before:a,after:r}of m_[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 Dw=new Map,V8={image:[_t.crop()],video:[],document:[],tour:[]};for(const e of Yr)for(const t of V8[e]){const a=Ya[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 G8(e){const t=Dw.get(e);if(t!==void 0)return t;const a=Oy[e],r=a.process.map(c=>{const u=P8(c.verb,e);return{verb:c.verb,binding:c,input:u,present:q8[u],gates:a.gates.includes(c.verb),publishes:a.publishes.includes(c.verb)}}),l={kind:e,entries:r,edges:m_[e],gates:a.gates};return Dw.set(e,l),l}const mc={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]"}},xd=Object.keys(mc);function jn(e){return"send"in e}function p_(e){return jn(e)?e.id:e.record.id}function K8(e){return e.renditions.poster!==null||e.state==="failed"?!1:e.url!==null?e.state==="processing":G8(e.kind).entries.some(t=>t.verb==="poster"&&t.present(e))}function Y8(e){return e.url!==null&&e.state==="failed"}function Cs(e){return e.url!==null}function g_(e){return X2(/^https?:\/\//i.test(e)?e:`https://${e}`)}const Q8=()=>0;function X8({record:e,list:t,tier:a},r){const l=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:R8(e),addedAt:Date.parse(e.added_at),previewPending:K8(e),linkUnreachable:Y8(e),inFlight:!1,error:null,list:t,tier:a??l,upstream:l>0}}function Z8(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 W8(e,t=Q8){return jn(e)?Z8(e):X8(e,t)}function Lw(e){return e.kind===null?xd.length:xd.indexOf(e.kind)}const J8={name:(e,t)=>e.name.localeCompare(t.name),kind:(e,t)=>Lw(e)-Lw(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 ez(e,t,a){const r=t==="all"?[...e]:e.filter(c=>c.kind===t),l=J8[a];return r.sort((c,u)=>c.tier-u.tier||l(c,u))}function tz(e){const t={all:e.length};for(const a of xd)t[a]=0;for(const a of e)a.kind&&(t[a.kind]+=1);return t}function y_(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 b_(e,t=Date.now()){const a=new Date(e),r=new Date(t),l=u=>new Date(u.getFullYear(),u.getMonth(),u.getDate()).getTime(),c=Math.round((l(r)-l(a))/864e5);return c<=0?"Today":c===1?"Yesterday":a.toLocaleDateString("en-US",{month:"short",day:"numeric"})}function nz(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 l=new Image,c=()=>{r&&a(e)};return l.onload=c,l.onerror=c,l.src=e,()=>{r=!1,l.onload=null,l.onerror=null}},[e,t]),e===null?null:t}const iz="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]",az={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 Gr({kind:e,size:t="mark",glyph:a,decorative:r=!1}){const l=mc[e],c=az[t];return d.jsx("span",{className:ae("inline-grid shrink-0 place-items-center text-white",c.box,l.solid),...r?{"aria-hidden":!0}:{role:"img","aria-label":l.label},children:d.jsx(it,{name:a??l.icon,size:c.glyph,stroke:2})})}function v_({file:e}){if(e.kind===null)return null;const t=mc[e.kind];return d.jsxs("span",{className:ae(iz,t.soft),children:[d.jsx(it,{name:t.icon,size:10,stroke:2.2}),t.label]})}function rz(e){const t=e.url!==null?r_(e.url).name:e.bytes!==null?y_(e.bytes):"",a=b_(e.addedAt);return t?`${t} · ${a}`:a}function oz(e){return u_(e.name,e.mime??"").glyph}function lz(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 sz={row:"thumb",card:"logo",lightbox:"hero"};function Ay({file:e,face:t="card"}){const a=nz(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 ${lz(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"?oz(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(Gr,{kind:e.kind,size:sz[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 Bu="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]",x_="Can’t be reached",Vp="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 w_({file:e,compact:t=!1,onRetry:a,onRecheck:r}){if(e.state==="uploading"){const l=e.progress??0;return d.jsx("div",{className:t?qu:Bu,children:d.jsx("span",{role:"progressbar","aria-label":"Uploading","aria-valuenow":Math.round(l),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:`${l}%`}})})})}return e.state==="processing"?d.jsx("div",{className:t?qu:Bu,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:`${Bu} 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:l=>{l.stopPropagation(),a()},children:"Retry"}):null]}):e.linkUnreachable&&t?d.jsx("div",{className:`${qu} text-warn`,title:Vp,children:d.jsx(it,{name:"warn",size:13})}):e.linkUnreachable?d.jsxs("div",{className:`${Bu} text-[length:calc(11.5*var(--content))] font-semibold text-warn`,title:Vp,children:[d.jsx(it,{name:"warn",size:15}),d.jsx("span",{className:"max-w-[90%]",children:x_}),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:l=>{l.stopPropagation(),r()},children:[d.jsx(it,{name:"recheck",size:11}),"Re-check"]}):null]}):null}function pc(e,t,a,r){x.useEffect(()=>{if(!t)return;const l=u=>{var p,g;const m=u.target;!((p=e.current)!=null&&p.contains(m))&&!((g=r==null?void 0:r.current)!=null&&g.contains(m))&&a()},c=u=>{u.key!=="Escape"||u.defaultPrevented||(u.preventDefault(),a())};return document.addEventListener("pointerdown",l,!0),document.addEventListener("keydown",c),window.addEventListener("blur",a),()=>{document.removeEventListener("pointerdown",l,!0),document.removeEventListener("keydown",c),window.removeEventListener("blur",a)}},[e,t,a,r])}function k_({inputRef:e,accept:t,onFiles:a,disabled:r,multiple:l=!0}){return d.jsx("input",{ref:e,type:"file",multiple:l,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 wd(e,t="or"){return e.length<2?e[0]??"":`${e.slice(0,-1).join(", ")} ${t} ${e.at(-1)}`}const S_=["tour","video"],cz={tour:"3D tour",video:"video"};function Ny(e){return S_.filter(t=>e.includes(t)).flatMap(t=>cz[t]??[])}function uz(e,t){const a=l=>e.includes(l);if(t.accept!==null){const l=[...a("image")?["photos"]:[],...a("image")&&a("document")?["floor plans"]:[],...a("document")?["documents"]:[],...a("video")?["video"]:[]];return l.length===0?null:`Drop ${wd(l)} anywhere here`}if(!t.onLink)return null;const r=Ny(e);return r.length===0?null:`Paste a link to a ${wd(r)}`}function dz(e,t){const a=e.trim();if(!a)return{state:"empty"};const r=g_(a);return r===null||!t.includes(r)?{state:"refused"}:{state:"ok",kind:r,provider:r_(a).name}}function fz(e,t,a){const[r,l]=x.useState(""),c=dz(r,a),u=!t&&c.state==="ok";return{value:r,setValue:l,verdict:c,canAdd:u,submit:p=>{p.preventDefault(),p.stopPropagation(),u&&(e(r.trim()),l(""))},kinds:a}}function hz({verdict:e,kinds:t,className:a}){return d.jsx("div",{className:ae("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(Gr,{kind:e.kind,decorative:!0}),d.jsxs("span",{className:"font-medium text-ink-2",children:[e.provider," ",mc[e.kind].label.toLowerCase()]})]}):e.state==="refused"?d.jsxs("span",{className:"text-warn",children:["Only ",wd(Ny(t),"and")," links can be added."]}):null})}const mz="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 pz({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(my,{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 ${wd(Ny(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:ae(mz,"h-8 rounded-md px-3 text-[length:calc(12.5*var(--content))]"),children:"New link"})]})}function gz({add:e,kinds:t,dragging:a}){if(e===null)return d.jsx(gd,{icon:d.jsx(qp,{size:25,strokeWidth:1.8}),headline:"Nothing here yet"});const r=uz(t,e);return d.jsx(gd,{icon:e.accept!==null?d.jsx(fy,{size:25,strokeWidth:1.8}):d.jsx(my,{size:24,strokeWidth:1.8}),headline:a?"Drop to upload":"Nothing uploaded yet",...r!==null?{line:r}:{},lifted:a})}function yz({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(fy,{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 bz({onAdd:e,disabled:t,kinds:a}){const r=fz(e,t,a);return d.jsxs("div",{className:"flex flex-col gap-2 px-1 pb-1",children:[d.jsx(pz,{draft:r}),d.jsx(hz,{verdict:r.verdict,kinds:a,className:"px-0.5 empty:hidden"})]})}function E_({add:e,onBrowse:t,onLinked:a,uploadDetail:r}){return d.jsxs(d.Fragment,{children:[e.accept!==null?d.jsx(yz,{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(bz,{onAdd:l=>{e.onLink(l),a()},disabled:e.disabled,kinds:e.linkKinds??S_})]})}function vz({add:e,verb:t}){const{accept:a,onFiles:r,onLink:l,disabled:c}=e,[u,m]=x.useState(!1),p=x.useRef(null),g=x.useRef(null),b=x.useCallback(()=>m(!1),[]);pc(p,u,b);const v=()=>{var w;b(),(w=g.current)==null||w.click()},k=()=>{u?b():l?m(!0):v()};return d.jsxs("div",{className:"relative",ref:p,onClick:w=>w.stopPropagation(),children:[a!==null?d.jsx(k_,{inputRef:g,accept:a,onFiles:r,disabled:c}):null,d.jsx(yd,{add:t,size:"large",onClick:k,...l?{expanded:u}:{}}),u&&l?d.jsx("div",{className:`${Qd} 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(E_,{add:{...e,onLink:l},onBrowse:v,onLinked:b,uploadDetail:"Photos, floor plans, documents or video"})}):null]})}function __(e,t,a,r=!0){const{accept:l,onFiles:c,onLink:u,disabled:m}=e,[p,g]=x.useState(!1),[b,v]=x.useState(null),k=x.useRef(null),w=x.useRef(null),j=x.useCallback(()=>{g(!1),v(null)},[]);pc(a,p,j,k),x.useLayoutEffect(()=>{if(!p)return;const C=()=>{const O=a.current,A=k.current;if(!O||!A)return;const D=A.offsetHeight,R=ml(Br(O),{height:D,maxHeight:D,minWidth:A.offsetWidth});v(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 E=()=>{var C;j(),(C=w.current)==null||C.click()},_=d.jsxs(d.Fragment,{children:[l!==null?d.jsx(k_,{inputRef:w,accept:l,onFiles:c,disabled:m,multiple:r}):null,p&&u?Wi.createPortal(d.jsx("div",{ref:k,className:`we-no-drag ${Qd} flex w-[calc(360*var(--frame))] flex-col gap-1.5 p-1.5`,style:b?{position:"fixed",...b,zIndex:Fa}:{position:"fixed",top:0,left:0,zIndex:Fa,opacity:0,pointerEvents:"none"},role:"dialog","aria-label":t,onClick:C=>C.stopPropagation(),children:d.jsx(E_,{add:{...e,onLink:u},onBrowse:E,onLinked:j})}),document.body):null]});return{start:()=>{u?p?j():g(!0):E()},...u?{expanded:p}:{},node:_}}function xz({add:e,intake:t,trigger:a}){const r=x.useRef(null),l=__(t,e.label,r);return d.jsxs(d.Fragment,{children:[l.node,a({buttonRef:r,...l.expanded!==void 0?{expanded:l.expanded}:{},onClick:l.start})]})}const wz="relative cursor-grab touch-none select-none",kz="relative grid grid-cols-[repeat(auto-fill,minmax(calc(150*var(--frame)),1fr))] gap-2.5",Sz={compact:"flex flex-col gap-2.5",large:"flex flex-col gap-3"},zw=new Set;function My(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 _l(e,t,a,r,l){const c=new Set(t.map(g=>g.id)),u=e.filter(g=>{const b=a(g.value);return b===null||c.has(b)}),m=new Set(u.map(g=>a(g.value)));return[...t.filter(g=>!m.has(g.id)).map(g=>l(r(g))),...u]}function Cy({engine:e,label:t,noun:a,size:r,onAdd:l,add:c,choose:u,renderTile:m,tileActions:p,onRemove:g,children:b}){const{rows:v,canAdd:k,canRemove:w}=e,{containerRef:j,getItemProps:E}=e.drag,[_,C]=x.useState(zw),O=v.filter(H=>_.has(H.key)),A=O.map(H=>H.key),D=H=>C(ne=>{const Y=new Set(ne);return Y.has(H)?Y.delete(H):Y.add(H),Y}),R=()=>C(zw),F=H=>{g?g(H):e.removeMany(H.map(ne=>ne.key)),R()},L=H=>{if(!w)return null;const ne=_.has(H.key)&&O.length>1?O:null;return ne?{label:`Remove ${ne.length} ${a}s`,glyph:"trash",danger:!0,onSelect:()=>F(ne)}:{label:"Remove",glyph:"trash",danger:!0,onSelect:()=>F([H])}},T=k?d.jsx(hc,{size:r,add:c,onAdd:(l==null?void 0:l.kind)==="choose"?l.open:null,...(l==null?void 0:l.kind)==="take"?{newChip:d.jsx(xz,{add:c,intake:l.intake,trigger:H=>d.jsx(yd,{add:c,size:r,...H})})}:{},choose:u}):null;return d.jsxs("div",{className:Vr,children:[d.jsxs("div",{className:Sz[r],children:[T,v.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:kz,ref:j,onClick:H=>{H.target===H.currentTarget&&R()},children:d.jsx("div",{className:"contents",role:"listbox","aria-multiselectable":!0,"aria-label":t,onKeyDown:H=>{H.key!=="Escape"||A.length===0||(H.stopPropagation(),R())},children:v.map((H,ne)=>{const Y=L(H),le={selected:_.has(H.key),onToggleSelect:()=>D(H.key),actions:[...(p==null?void 0:p(H))??[],...Y?[Y]:[]]},K=_.has(H.key)&&A.length>1?A:void 0;return d.jsx("div",{...E(H.key,K),className:wz,children:m(H,ne,le)},H.key)})})})]}),b]})}const Ez="data-drag-clone",$w="0 16px 38px -8px rgba(20,18,13,0.5)",_z=["id","for","name","data-dragid","data-drag-scope"];function Xu(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 jz(e){for(let t=e;t;t=t.parentElement){const a=getComputedStyle(t).backgroundColor;if(Xu(a))return a}return"#fff"}function Uw(e){for(let t=e;t;){const a=getComputedStyle(t).borderRadius;if(Oz(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 Oz(e){return e!==""&&!/^(0(px)?\s*)+$/.test(e)}function Az(e){const t=e.cloneNode(!0),a=[e,...e.querySelectorAll("*")],r=[t,...t.querySelectorAll("*")];a.forEach((l,c)=>{const u=r[c];if(!(!u||u.tagName!==l.tagName))switch(l.tagName){case"INPUT":u.value=l.value,u.checked=l.checked;break;case"TEXTAREA":case"SELECT":u.value=l.value;break;case"VIDEO":u.muted=!0,u.autoplay=!1;break}});for(const l of r)for(const c of _z)l.removeAttribute(c);return t.setAttribute(Ez,""),t.setAttribute("aria-hidden","true"),t.inert=!0,t}function Nz(e,t,a){if(t===a||t<0||a<0)return e;const r=e.slice(),[l]=r.splice(t,1);return r.splice(a,0,l),r}const j_="data-drag-scope";function Pm(e){return Array.from(e.querySelectorAll("[data-dragid]")).filter(t=>t.closest(`[${j_}]`)===e)}function Mz(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,l]=t[1]?[a[12],a[13]]:[a[4],a[5]];return{x:r||0,y:l||0}}const Iw=190,Hw=220,Vm="cubic-bezier(.2,.7,.3,1)",Cz="0.4",Rz="0",Tz="1",Dz="2",Lz="60",kd="data-drag-active",Bw="hp-drag-reorder-active",zz=`html[${kd}], html[${kd}] * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }`;function Gm(e){const t=document.documentElement;if(!e){t.removeAttribute(kd);return}if(!document.getElementById(Bw)){const a=document.createElement("style");a.id=Bw,a.textContent=zz,document.head.appendChild(a)}t.setAttribute(kd,"")}function qw(e){return!e||typeof e.animate!="function"?!1:!(typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)}function $z(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 Uz="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 Iz(e,t,a){const r=e.filter(c=>a.has(t(c))),l=r[0];return{collapsed:e.filter(c=>c===l||!a.has(t(c))),members:r}}function Hz(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 O_({items:e,getKey:t,onReorder:a,onDrop:r,axis:l="xy",threshold:c=4,ignoreSelector:u=".we-no-drag"}){const[m,p]=x.useState(null),g=x.useRef(null),b=x.useRef({}),v=x.useRef({grabX:0,grabY:0,scale:1,originLeft:0}),k=x.useRef({x:0,y:0}),w=x.useRef(null),j=x.useRef(null),E=x.useRef(null),_=x.useRef(null),C=x.useRef("#fff"),O=x.useRef(new Set),A=x.useRef(new Map),D=x.useRef(new WeakMap),R=x.useRef(null),F=x.useRef(null),L=x.useRef(e),T=x.useRef(t),H=x.useRef({onReorder:a,onDrop:r});x.useLayoutEffect(()=>{H.current={onReorder:a,onDrop:r}}),x.useEffect(()=>()=>{var ee;const I=R.current;R.current=null,I&&H.current.onDrop(I);const P=F.current;P&&(window.removeEventListener("pointermove",P.move),window.removeEventListener("pointerup",P.end),window.removeEventListener("pointercancel",P.end)),(ee=_.current)==null||ee.remove(),E.current&&Gm(!1)},[]);function ne(I){const P=I.getBoundingClientRect(),ee=v.current.scale||1;return{x:(k.current.x-P.left)/ee-I.clientLeft,y:(k.current.y-P.top)/ee-I.clientTop}}function Y(){const I=_.current,P=g.current;if(!I||!P)return;const ee=ne(P);I.style.left=`${l==="y"?v.current.originLeft:ee.x-v.current.grabX}px`,I.style.top=`${ee.y-v.current.grabY}px`}function le(){const I=g.current,{x:P,y:ee}=ne(I),pe=L.current;let se=0,ke=1/0;return Pm(I).forEach(z=>{const ce=pe.findIndex(Le=>T.current(Le)===z.dataset.dragid);if(ce<0)return;const ge=z.offsetLeft+z.offsetWidth/2,Ee=z.offsetTop+z.offsetHeight/2,Ue=(P-ge)**2+(ee-Ee)**2;Ue<ke&&(ke=Ue,se=ce)}),Math.max(0,Math.min(pe.length-1,se))}function K(I,P,ee){const pe=!A.current.has(I),se=A.current.get(I)??{position:I.style.position,zIndex:I.style.zIndex,opacity:I.style.opacity,borderRadius:I.style.borderRadius};A.current.set(I,se),getComputedStyle(I).position==="static"&&(I.style.position="relative"),pe&&(I.style.borderRadius=Uw(I)??se.borderRadius),I.style.zIndex=P,I.style.opacity=ee?Cz:se.opacity,ee?I.setAttribute("data-ghost",""):I.removeAttribute("data-ghost")}function X(I){const P=A.current.get(I);P&&(I.style.position=P.position,I.style.zIndex=P.zIndex,I.style.opacity=P.opacity,I.style.borderRadius=P.borderRadius,I.removeAttribute("data-ghost"),A.current.delete(I))}function ue(I,P){var z;C.current=jz(I);const ee=getComputedStyle(P).backgroundColor,pe=Uw(P),se=Az(P);pe&&(se.style.borderRadius=pe),Object.assign(se.style,{position:"absolute",left:"0px",top:"0px",width:`${P.offsetWidth}px`,margin:"0",zIndex:Lz,pointerEvents:"none",transform:"none",opacity:"1",transition:"none",animation:"none",boxShadow:$w,backgroundColor:Xu(ee)?ee:C.current}),v.current.originLeft=P.offsetLeft;const ke=((z=j.current)==null?void 0:z.length)??1;if(ke>1){const ce=document.createElement("span");ce.className=Uz,ce.textContent=String(ke),se.appendChild(ce)}I.appendChild(se),_.current=se}function M(I,P,ee,pe){if(P.left===ee.left&&P.top===ee.top)return;const se=D.current.get(I),ke=(se==null?void 0:se.playState)==="running"?Mz(getComputedStyle(I).transform):{x:0,y:0};se==null||se.cancel();const z=P.left+ke.x-ee.left,ce=P.top+ke.y-ee.top;if(!z&&!ce)return;D.current.set(I,I.animate([{transform:`translate(${z}px,${ce}px)`},{transform:"none"}],{duration:Iw,easing:Vm}));const ge=C.current;pe&&!Xu(getComputedStyle(I).backgroundColor)&&I.animate([{backgroundColor:ge},{backgroundColor:ge}],{duration:Iw})}function V(I,P,ee){var Ee;(Ee=D.current.get(I))==null||Ee.cancel();const pe=P.left-ee.left,se=P.top-ee.top;if(!pe&&!se)return;const ke=getComputedStyle(I),z=Xu(ke.backgroundColor)?ke.backgroundColor:C.current;K(I,Dz,!1);const ce=I.animate([{transform:`translate(${pe}px,${se}px)`},{transform:"none"}],{duration:Hw,easing:Vm});I.animate([{boxShadow:$w,backgroundColor:z},{boxShadow:ke.boxShadow,backgroundColor:z}],{duration:Hw,easing:Vm}),D.current.set(I,ce);const ge=()=>{E.current||X(I)};ce.onfinish=ge,ce.oncancel=ge}x.useLayoutEffect(()=>{const I=g.current;if(!I)return;I.setAttribute(j_,"");const P=E.current,ee=O.current;O.current=new Set;const pe=Pm(I);if(P&&!_.current){const ce=pe.find(ge=>ge.dataset.dragid===P);ce&&ue(I,ce)}if(!P)for(const ce of[...A.current.keys()])X(ce);const se=qw(I),ke=b.current,z={};pe.forEach(ce=>{const ge=ce.dataset.dragid,Ee={left:ce.offsetLeft,top:ce.offsetTop};z[ge]=Ee,P&&K(ce,ge===P?Rz:Tz,ge===P);const Ue=ke[ge];!Ue||!se||(ee.has(ge)?V(ce,Ue,Ee):M(ce,Ue,Ee,P!==null&&ge!==P))}),b.current=z,P&&Y()});function te(){const I=R.current;R.current=null,I&&H.current.onDrop(I)}function me(I,P,ee){var ge,Ee,Ue,Le,ye;te();const pe=g.current,se=Pm(pe).find(Re=>Re.dataset.dragid===I)??null;if(!se)return;const ke=se.getBoundingClientRect(),z=pe.getBoundingClientRect().width/pe.offsetWidth||1;v.current={grabX:(ee.clientX-ke.left)/z,grabY:(ee.clientY-ke.top)/z,scale:z,originLeft:se.offsetLeft},(Ee=(ge=document.activeElement)==null?void 0:ge.blur)==null||Ee.call(ge),(ye=(Le=(Ue=window.getSelection)==null?void 0:Ue.call(window))==null?void 0:Le.removeAllRanges)==null||ye.call(Le),Gm(!0),k.current={x:ee.clientX,y:ee.clientY},L.current=e,T.current=t,j.current=null;let ce=I;if(P&&P.length>1&&P.includes(I)){const{collapsed:Re,members:ht}=Iz(e,t,new Set(P)),$e=ht[0];ht.length>1&&$e!==void 0&&(j.current=ht,ce=t($e),L.current=Re,H.current.onReorder(Re))}E.current=ce,p(ce)}function Q(I,P,ee){I.button===0&&(I.target.closest(u)||(w.current={key:P,x:I.clientX,y:I.clientY,group:ee},F.current={move:N,end:q},window.addEventListener("pointermove",N),window.addEventListener("pointerup",q),window.addEventListener("pointercancel",q)))}function N(I){const P=w.current;if(!P)return;if(!E.current){if(Math.hypot(I.clientX-P.x,I.clientY-P.y)<c)return;me(P.key,P.group,I)}k.current={x:I.clientX,y:I.clientY},Y();const ee=le(),pe=L.current,se=pe.findIndex(z=>T.current(z)===E.current);if(se<0||se===ee)return;const ke=Nz(pe,se,ee);L.current=ke,H.current.onReorder(ke)}function q(){window.removeEventListener("pointermove",N),window.removeEventListener("pointerup",q),window.removeEventListener("pointercancel",q),F.current=null,w.current=null;const I=E.current;if(!I)return;const P=j.current;j.current=null;const ee=P?P.map(se=>T.current(se)):[I];if(P){const se=Hz(L.current,P);L.current=se,H.current.onReorder(se)}const pe=_.current;if(pe){for(const se of ee)b.current[se]={left:pe.offsetLeft,top:pe.offsetTop};O.current=new Set(ee),pe.remove(),_.current=null}$z(g.current),E.current=null,Gm(!1),p(null),R.current=L.current,qw(g.current)?requestAnimationFrame(()=>setTimeout(te,0)):te()}return{containerRef:g,getItemProps:(I,P)=>({"data-dragid":I,onPointerDown:ee=>Q(ee,I,P)}),draggingKey:m}}let Bz=0;function qz(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`li-${(Bz++).toString(36)}`}function Sd(e,t){return{key:(t==null?void 0:t(e))??qz(),value:e}}function Fz(e,t){return e.map(a=>Sd(a,t))}function Pz(e,t,a){return t.map((r,l)=>{const c=e[l];return c!==void 0&&JSON.stringify(c.value)===JSON.stringify(r)?{key:c.key,value:r}:Sd(r,a)})}function Km(e){return JSON.stringify(e)}function tr({items:e,identityOf:t,fixed:a=!1,axis:r="y",commit:l,onCommitted:c}){const[u,m]=x.useState(()=>Fz(e,t)),[p,g]=x.useState(()=>Km(e)),b=x.useRef(u);x.useEffect(()=>{b.current=u},[u]);function v(_){b.current=_,m(_)}function k(_,C){v(_),g(Km(_.map(O=>O.value))),l(_,C),c==null||c(_,C)}const w=O_({items:u,getKey:_=>_.key,onReorder:v,onDrop:_=>k(_,"reorder"),axis:r,threshold:5});if(!w.draggingKey){const _=Km(e);_!==p&&(g(_),m(Pz(u,e,t)))}function j(_,C){const O=b.current;O.some(A=>A.key===_)&&k(O.map(A=>A.key===_?{...A,value:C(A.value)}:A),"edit")}function E(_,C=0){if(a)return;const O=b.current,A=Math.min(Math.max(C,0),O.length);k([...O.slice(0,A),_,...O.slice(A)],"add")}return{rows:u,drag:w,canAdd:!a,canRemove:!a,add:(_,C)=>E(Sd(_,t),C),insert:E,remove:_=>{a||k(b.current.filter(C=>C.key!==_),"remove")},removeMany:_=>{const C=b.current,O=C.filter(A=>!_.includes(A.key));a||O.length===C.length||k(O,"remove")},setValue:(_,C)=>j(_,()=>C),updateValue:j,replace:_=>k(_,"replace"),mint:_=>Sd(_,t),indexOf:_=>u.findIndex(C=>C.key===_),keyAt:_=>{var C;return((C=u[_])==null?void 0:C.key)??null},latestRows:()=>b.current}}function nr(e,t,a,r){return e.isEmpty(a)?r?"required":null:e.isInvalid(a,t)?"invalid":null}const Vz={failed:"Crop failed. The image is unchanged. Try cropping again."};function Gz({storeKey:e}){const t=yT(e),a=ty(r=>r.clearNotice);return t?d.jsxs("p",{role:"alert","data-crop-notice":t,className:ae(wl,"flex items-center justify-between gap-2"),children:[d.jsx("span",{children:Vz[t]}),d.jsx("button",{type:"button",className:ae(vt,"shrink-0 underline"),onClick:()=>a(e),children:"Dismiss"})]}):null}const A_=["photo_id","video_id","tour_id"];function Qi(e){if(typeof e!="object"||e===null)return null;const t=_5(e);if(t!==void 0)return t;const a=e;for(const r of A_){const l=a[r];if(typeof l=="string"&&l.length>0)return l}return qa(e)??null}function sl(e){if(typeof e!="object"||e===null)return;const t=e.picked;return typeof t=="string"||t===null?t:Xa(e)?e.media:void 0}function Kz(e){if(typeof e!="object"||e===null)return!1;const t=e;return["file","media",...A_].some(a=>typeof t[a]=="string")||qa(e)!==void 0}function N_(e){if(e!==null&&typeof e=="object"&&!Array.isArray(e)){const t=Qi(e),a=sl(e);if(t!==null)return{file:t,...a===void 0?{}:{picked:a}}}return{file:""}}function Yz(e){return e.map(N_).filter(t=>t.file!=="")}function M_(e){switch(e.kind){case"document":return u_(e.name,e.mime??"");case"video":return{glyph:"video",typeNoun:"Video",extension:""};case"photo":return{glyph:"image",typeNoun:"Image",extension:""};case"tour":return{glyph:"video",typeNoun:"3D tour",extension:""}}}function Qz(e){return[M_(e).typeNoun,e.size].filter(Boolean).join(" · ")}function Xz(e){const t=El(e);return a=>{const r=t.get(a);return r===void 0?void 0:h_(r)}}const Zz={page:"expanded",panel:"compact",cell:"compact"};function Wz(e){return Zz[e]}const C_=x.createContext(null);function Jd({place:e,children:t}){return d.jsx(C_.Provider,{value:e,children:t})}function Ry(){const e=x.useContext(C_);if(e===null)throw new Error("[slot-editors] a slot editor was drawn outside a place: its container mounts <SlotPlaceProvider>.");return e}const Jz=x.createContext(!1);function jl(){return x.useContext(Jz)}const e$=ae("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)]",kl),t$="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",n$=ae("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)]",kl),R_={"data-card-fields":""},i$="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",a$={page:{frame:ae(Vr,"gap-1.5"),shell:e$,inner:t$,adornEnd:"pr-3.5",multiline:"resize-none leading-[1.5]",inline:!1},panel:{frame:Vr,shell:ae(GL,kl),inner:KL,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:n$,inner:i$,adornEnd:"pr-2.5",multiline:"resize-none overflow-hidden whitespace-nowrap",inline:!0}};function ir(){return T_(Ry())}function T_(e){return{place:e,...a$[e]}}function r$({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)?WE:"text-ink-4"}}const o$=ae("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"),l$="pointer-events-none absolute inset-y-0 right-0 flex items-center",s$=ae("flex h-0 basis-full items-end justify-end overflow-hidden","transition-[height] duration-200 ease-out motion-reduce:transition-none"),c$={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 Kr({attention:e,count:t,className:a,ref:r,children:l}){const c=ir(),u=jl(),[m,p]=x.useState(!1),g=t!==void 0&&!c.inline,b=g&&m?r$(t):null,v=g&&t.multiline,k=b!==null&&d.jsxs("span",{"data-field-count":"",className:ae(ZE,b.tone,"leading-none transition-[opacity,transform] duration-200 ease-out starting:translate-y-1 starting:opacity-0 motion-reduce:transition-none"),children:[b.left,d.jsx("span",{className:"sr-only",children:" characters left"})]});return d.jsxs("div",{ref:r,className:ae(c.shell,g&&o$,a),...Sl(e,u),"data-count-room":g?v?"band":"end":void 0,"data-count-open":b!==null?"":void 0,onFocus:g?()=>p(!0):void 0,onBlur:g?()=>p(!1):void 0,children:[l,v?d.jsx("div",{className:ae(s$,c$[c.place],c.adornEnd),"data-open":b!==null?"":void 0,children:k}):b!==null&&d.jsx("div",{className:ae(l$,c.adornEnd),children:k})]})}function D_({attention:e,message:t}){const a=ir();return e!=="invalid"||a.inline?null:d.jsx("p",{className:wl,children:t})}const L_="h-[var(--list-display-h,clamp(280px,calc(100cqh-var(--list-display-clear,32px)),calc(560*var(--frame))))]",u$="h-[var(--list-display-h,clamp(280px,calc(100cqh-var(--list-display-clear,32px)),calc(480*var(--frame))))]",Ty="data-upstream:opacity-55 data-upstream:hover:opacity-100 data-upstream:focus-within:opacity-100",d$="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)]",z_="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))]",f$=`${z_} text-ink-2 hover:bg-accent-soft hover:text-ink`,$_="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)]",U_="select-none";function h$(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}),Cs(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 I_({file:e,handlers:t,shown:a=!1}){return d.jsx(B_,{name:e.name,actions:h$(e,t),shown:a})}function H_(e){return{plain:e.filter(t=>!t.foot&&!t.danger),foot:[...e.filter(t=>t.foot&&!t.danger),...e.filter(t=>t.danger)]}}const Fw=4;function B_({name:e,actions:t,shown:a=!1,scale:r="card"}){const[l,c]=x.useState(!1),u=x.useRef(null),m=x.useRef(null),p=x.useRef(null),[g,b]=x.useState(null),v=x.useCallback(()=>{c(!1),b(null)},[]);pc(u,l,v,p),x.useLayoutEffect(()=>{if(!l)return;const E=()=>{const _=m.current,C=p.current;if(!_||!C)return;const O=Br(_),A=C.offsetHeight,D=ml(O,{height:A,maxHeight:A,gap:Fw});if(!D){b(null);return}const R=document.documentElement.clientWidth-O.rect.right;if(D.maxHeight>=A){b({top:D.top,bottom:D.bottom,right:R});return}const{rect:F,bounds:L}=O,T=L.bottom-Er-A,H=Math.max(L.top+Er,Math.min(F.bottom+Fw,T));b({top:H,right:R})};return E(),window.addEventListener("scroll",E,!0),window.addEventListener("resize",E),()=>{window.removeEventListener("scroll",E,!0),window.removeEventListener("resize",E)}},[l]);const{plain:k,foot:w}=H_(t),j=E=>d.jsxs("button",{type:"button",role:"menuitem",className:E.danger?`${z_} text-danger hover:bg-accent-soft`:f$,onClick:()=>{v(),E.onSelect()},children:[d.jsx(it,{name:E.glyph,size:13}),E.label]},E.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"} ${l||a?"opacity-100":"opacity-0"}`,"aria-label":`Actions for ${e}`,"aria-haspopup":"menu","aria-expanded":l,onClick:E=>{E.stopPropagation(),c(_=>!_)},onDoubleClick:E=>E.stopPropagation(),children:d.jsx(it,{name:"dots",size:r==="compact"?13:14})}),l?Wi.createPortal(d.jsxs("div",{ref:p,className:`we-no-drag ${d$} w-[calc(188*var(--frame))] p-1.25`,style:g?{position:"fixed",...g,zIndex:Fa}:{position:"fixed",top:0,right:0,zIndex:Fa,visibility:"hidden"},role:"menu",onClick:E=>E.stopPropagation(),onDoubleClick:E=>E.stopPropagation(),children:[k.map(j),w.length>0?d.jsxs(d.Fragment,{children:[k.length>0?d.jsx("div",{className:"mx-0 my-1 h-px bg-line-soft"}):null,w.map(j)]}):null]}),document.body):null]})}function q_({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:l=>l.target.select(),onClick:l=>l.stopPropagation(),onDoubleClick:l=>l.stopPropagation(),onChange:l=>r(l.target.value),onKeyDown:l=>{l.key==="Enter"&&t(a.trim()),l.key==="Escape"&&t(null),l.stopPropagation()},onBlur:()=>t(a.trim())})}function F_(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 Ur={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"}},m$="we-no-drag flex cursor-auto flex-col gap-2 px-2 pt-2";function P_({kind:e,name:t,selected:a,select:r,onToggleSelect:l,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(Gr,{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(),l()},onDoubleClick:m=>m.stopPropagation(),children:d.jsx(it,{name:"check",size:u?10:12,stroke:2.6})})]})}function p$({file:e,selected:t,renaming:a,onClick:r,onDoubleClick:l,onToggleSelect:c,select:u,listChip:m,onRetry:p,onRecheck:g,onRenameCommit:b,handlers:v,drag:k,beneath:w}){return d.jsxs("div",{...k,role:"option","aria-selected":t,"aria-disabled":u.disabled||void 0,"data-upstream":e.upstream||void 0,tabIndex:0,className:`${F_(t)} ${Ty} ${k?U_:""}`,onClick:r,onDoubleClick:l,onKeyDown:j=>{j.target===j.currentTarget&&j.key==="Enter"&&(j.stopPropagation(),v.onPreview())},children:[d.jsxs("div",{className:Ur.card.bar,children:[d.jsx(P_,{kind:e.kind,name:e.name,selected:t,select:u,onToggleSelect:c}),a?d.jsx(q_,{name:e.name,onCommit:b}):d.jsx("span",{className:Ur.card.name,title:e.name,children:e.name}),d.jsx(I_,{file:e,handlers:v,shown:!0})]}),d.jsxs("div",{className:Ur.card.thumb,children:[d.jsx(Ay,{file:e}),d.jsx(w_,{file:e,onRetry:p,onRecheck:g}),m!==null?d.jsx("span",{className:`absolute right-2 top-2 z-[3] max-w-[calc(100%-16px)] ${$_}`,"data-list-chip":"",children:m}):null]}),w?d.jsx("div",{className:m$,...R_,onClick:j=>j.stopPropagation(),onDoubleClick:j=>j.stopPropagation(),children:w}):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:rz(e)})})]})}function g$(){return d.jsxs("div",{className:`flex flex-col rounded-2xl ${ky}`,children:[d.jsxs("div",{className:Ur.card.bar,children:[d.jsx("span",{className:`h-4.5 w-4.5 shrink-0 rounded-md ${_n}`}),d.jsx("span",{className:"min-w-0 flex-1",children:d.jsx("span",{className:`block h-2.5 w-3/5 rounded-full ${_n}`})}),d.jsx("span",{className:`mr-1.5 h-1.5 w-4 shrink-0 rounded-full ${_n}`})]}),d.jsx("div",{className:ae(Ur.card.thumb,_n)}),d.jsx("div",{className:"flex h-11 items-center px-3.5",children:d.jsx("span",{className:`h-2 w-2/5 rounded-full ${_n}`})})]})}const V_="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",Pw="flex shrink-0 items-center gap-1.5 whitespace-nowrap text-[length:calc(11.5*var(--content))] font-medium";function y$(){return d.jsxs("div",{role:"row",className:`${V_} 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 b$({file:e,onRetry:t,onRecheck:a}){return e.state==="failed"?d.jsxs("span",{className:`${Pw} 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:`${Pw} text-warn`,title:Vp,children:[x_,a?d.jsx("button",{type:"button",className:"font-semibold text-ink underline",onClick:r=>{r.stopPropagation(),a()},children:"Re-check"}):null]}):null}function v$({file:e,selected:t,renaming:a,onClick:r,onDoubleClick:l,onToggleSelect:c,select:u,listChip:m,onRetry:p,onRecheck:g,onRenameCommit:b,handlers:v,drag:k}){return d.jsxs("div",{...k,role:"row","aria-selected":t,"aria-disabled":u.disabled||void 0,"data-upstream":e.upstream||void 0,className:`group ${V_} ${Ty} 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]"} ${k?U_:""}`,onClick:r,onDoubleClick:l,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:w=>{w.stopPropagation(),c()},onDoubleClick:w=>w.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(Ay,{file:e,face:"row"}),d.jsx(w_,{file:e,compact:!0})]}),d.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[a?d.jsx(q_,{name:e.name,onCommit:b}):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(b$,{file:e,onRetry:p,onRecheck:g}),m!==null?d.jsx("span",{className:`shrink-0 ${$_}`,"data-list-chip":"",children:m}):null]}),d.jsx("span",{className:"inline-flex",children:d.jsx(v_,{file:e})}),d.jsx("span",{className:"whitespace-nowrap text-xs text-ink-3",children:y_(e.bytes)}),d.jsx("span",{className:"whitespace-nowrap text-xs text-ink-3",children:b_(e.addedAt)}),d.jsx(I_,{file:e,handlers:v})]})}const x$={control:"checkbox",disabled:!1},{bar:w$,name:k$,thumb:S$}=Ur.compact,E$="we-no-drag flex cursor-auto flex-col gap-1.5 px-1.5 pt-1.5";function _$({kind:e,name:t,chrome:a,thumb:r,below:l,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:F_(u,"compact"),onClick:m,onKeyDown:g=>{g.target===g.currentTarget&&(g.key===" "||g.key==="Enter")&&(g.preventDefault(),m())},children:[d.jsxs("div",{className:w$,children:[d.jsx(P_,{kind:e,name:t,selected:u,select:x$,onToggleSelect:m,scale:"compact"}),d.jsx("span",{className:k$,title:t,children:t}),p.length>0&&d.jsx(B_,{name:t,actions:p,shown:!0,scale:"compact"})]}),d.jsx("div",{className:S$,"data-thumb":!0,"data-media-tile":e,children:r}),l,c?d.jsx("div",{className:E$,...R_,onClick:g=>g.stopPropagation(),children:c}):null,d.jsx("div",{className:"h-1.5"})]})}function Dy(e,t){const a=e!=null&&e.cut?e.derivativeUrl:t,[r,l]=x.useState(a);return a!==void 0&&a!==r&&l(a),a??r??t}const Ly="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)]",j$="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",O$=ae(Ly,j$),A$="max-h-[min(calc(100vh-120px),max(680px,72vh))] w-[clamp(560px,38vw,960px)] max-w-full max-md:w-full",G_="px-[clamp(18px,1.4vw,40px)]",zy="px-[clamp(20px,1.75vw,36px)]",N$=ae("flex flex-shrink-0 items-center gap-[14px] pb-3 pt-[clamp(18px,1.6vw,30px)]",zy),M$=ae("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",zy),$y="mr-auto flex min-w-0 flex-col gap-0.5",Uy="m-0 text-[16px] font-semibold tracking-[-0.01em]",C$="text-[12px] text-ink-3",Iy=ae(vt,"grid size-8 flex-shrink-0 place-items-center rounded-[8px] text-ink-3 hover:bg-[#f1f0ea] hover:text-ink"),K_="px-[18px] py-[13px]",R$=ae("flex flex-shrink-0 items-center gap-[14px]",K_),T$=ae("flex flex-shrink-0 items-center justify-between gap-3 border-t border-line-soft",K_),D$="ml-auto flex gap-2",Y_=ae(vt,"inline-flex h-9 items-center gap-1.5 rounded-[9px] border border-transparent px-4 text-[13px] font-semibold"),L$=ae(Y_,"border-line bg-white text-ink hover:bg-[#faf9f6]"),z$=ae(Y_,"border-honey-2 bg-honey text-honey-ink hover:bg-honey-2 disabled:cursor-default disabled:opacity-45"),$$=ae(vt,"inline-flex h-9 items-center px-1 font-medium text-ink-2 hover:text-ink"),U$={page:"max-w-[920px]",crop:"max-w-[680px]"};function I$({open:e=!0,variant:t,onClose:a,children:r}){return d.jsx(wy,{open:e,onClose:a,className:ae(Ly,U$[t]),children:r})}const Hy={Shell:I$,head:R$,titles:$y,title:Uy,subtitle:C$,close:Iy,CloseIcon:Rt.x,foot:T$,actions:D$,buttonGhost:L$,buttonPrimary:z$,buttonLink:$$,ZoomOutIcon:Rt.minus,ZoomInIcon:Rt.plus},Vw=e=>e!==null&&typeof e=="object"&&!Array.isArray(e);function H$(e,t){let a=e;for(const r of t.holder.split("."))Array.isArray(a)?a=a.find(l=>Vw(l)&&l.id===r):a=Vw(a)?a[r]:void 0;return Array.isArray(a)?a.find(r=>qa(r)===t.mediaId):qa(a)===t.mediaId?a:void 0}function B$(e,t,a){if(e===void 0)return;const r=H$(e,a),l=r===void 0?void 0:t.get(a.mediaId),c=l===void 0||!Object.hasOwn(e.files,l.file)?void 0:e.files[l.file];if(l===void 0||c===void 0)return;const u=Xa(r)?Ag(l,r):l;return Og(c,u)}const q$=16/10;function Gw(e){return e.slice(e.indexOf(".")+1)}function Kw(e,t){return e.state==="failed"?!0:!rl(e.crop,t)||d_(e)?!1:!rc(t)||e.renditions.crop!==null}function Q_({propertyId:e,recordAt:t,write:a,onFailed:r,onArrived:l}){const c=Os(k=>k.byPlace),[u,m]=x.useState(null),p=k=>{const w=t(k),j=c[Pr(k)];return j!==void 0?w===void 0||!Kw(w,j.crop):w!==void 0&&d_(w)};x.useEffect(()=>{const k=Object.values(c).filter(w=>{const j=w.propertyId===e?t(w.place):void 0;return j!==void 0&&Kw(j,w.crop)});if(k.length!==0){for(const w of k)Os.getState().settle(w.place);l==null||l()}},[c,t,e,l]);const g=async(k,w,j)=>{if(m(null),a===void 0)return;const E=xp(j);if(!rl(E,w.crop)){Os.getState().start(k,e,E);try{await a(k,ol(E))}catch(_){Os.getState().settle(k),r==null||r(k),console.error("[media] home crop failed",{place:k,err:_})}}},b=u===null?void 0:t(u),v=(b==null?void 0:b.file_url)??null;return{offers:k=>{const w=t(k);return e!==""&&a!==void 0&&(w==null?void 0:w.kind)==="image"&&w.url===null&&w.file_url!==null},open:m,isOpen:b!==void 0&&v!==null,recropping:p,modal:u!==null&&b!==void 0&&v!==null?d.jsx(ey,{chrome:Hy,src:v,mode:"free",aspect:q$,seed:{rect:ol(b.crop)},onClose:()=>m(null),onApply:k=>void g(u,b,k.rect)}):null}}const F$=1500;function P$(e){const t=Wd(e===""?null:e);return x.useMemo(()=>{const a=t===void 0?new Map:zd(t);return r=>B$(t,a,r)},[t])}function X_(e,t){const a=_y(),r=Hd(),l=P$(e),{cropMedia:c}=a,u=x.useMemo(()=>c===void 0?void 0:async(v,k)=>{await c(e,v.mediaId,k,v.holder),await Pp(r,a,e)},[c,e,r,a]),m=x.useMemo(()=>()=>void Pp(r,a,e),[r,a,e]),p=Q_({propertyId:e,recordAt:l,write:u,onFailed:t,onArrived:m}),g=Os(v=>v.byPlace),b=Object.values(g).some(v=>v.propertyId===e&&p.recropping(v.place));return Bd({...a.mediaFactsQuery(e),enabled:e!==""&&b,refetchInterval:b?F$:!1}),p}function V$(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 cl(e){var t;return((t=e.renditions.cutout)==null?void 0:t.url)??vd(e)??""}function By(e,t,a,r,l){const c=cl(e);if(e.file===t.file)return{...t,url:c};const u=a===void 0?void 0:cR(a,l,e.id);return u===void 0||a===void 0?{file:e.file,url:c,alt:t.alt,picked:e.id}:{...uR(u,V$(a.files[u.file]),r),url:c,alt:t.alt}}const Z_={New:Vd,Choose:$E,Upload:Gd};function Ps(e,t){return`${e} ${t}`}function qy(e,t,a){const r=Ja(t),l=a&&e==="New"?r.singular:r.plural;return{verb:e,icon:Z_[e],label:Ps(e,l),empty:`No ${r.plural} yet`}}function G$(e,t,a,r){const l=a.flatMap(u=>{const m=W_(u,r);return m===null?[]:[Ja(m)[t?"plural":"singular"]]}),c=qy("Choose",e,t);return l.length===0?c:{...c,label:Ps("Choose",[...new Set(l)].join(" or "))}}const K$={property:"Property",library:"Library"};function W_(e,t){if(!/^(?:property|library)\./.test(e))return null;const a=cd(e);if(a===null)return null;const{home:r}=Is(e);return r===t?a:`${K$[r]} ${a.charAt(0).toLowerCase()}${a.slice(1)}`}function ef(e,t={}){return e.locked===!0||!Y$(e)?null:Fy(e,t)}function Y$(e){const t=e.type;return t==="list"||t==="row"||gl(e.type)}function Fy(e,t={}){const a=e.type==="list",r=X$(e,t);return{add:qy(!a&&gl(e.type)?"Upload":"New",e.label,a),choose:r===null?null:G$(e.label,a,r.lists,r.home)}}function Q$(e){const[t]=e,a=e.length===1&&t!==void 0?cd(t)??void 0:void 0;return qy("New",a,!0)}function J_(e){return e.choose??e.add}function X$(e,t){const a=W$(e,t.table);if(a!==null&&Fr(a).length>0){const c=Fr(a)[1];return c===void 0?null:{lists:[c],home:Is(a).home}}const r=Z$(e,t),l=t.membership;if((l==null?void 0:l.kind)==="pick-row"||(l==null?void 0:l.kind)==="pick-media"){const c=l.kind==="pick-row"?l.tables.map(u=>uS(u)):jr(l.filter.from);return{lists:r!==null&&r.length>0?r:c,home:"property"}}return r===null?null:{lists:r,home:"property"}}function Z$(e,t){if(e.type==="list")return e.element===void 0?null:e7(e.element);if(e.type==="row")return jr(e.from);if(!gl(e.type))return null;const a=al(e,t.table);return(a==null?void 0:a.kind)==="picked"?jr(a.filter.from):null}function jr(e){return Bg({from:e}).filter(t=>/^(?:property|library)\./.test(t))}function W$(e,t){const a=e.source;if((a==null?void 0:a.kind)==="home"&&typeof a.key=="string")return/^(?:property|library)\./.test(a.key)?a.key:null;const r=(a==null?void 0:a.kind)==="row"?a.field:void 0;return typeof r!="string"||r===""||t==null?null:`${uS(t)}.${J$}.${r}`}const J$="_";function e7(e){const t=e.fields??{};if(RS(e)!==void 0)return e.from!==void 0?jr(e.from):Object.values(t).flatMap(l=>jr(l.from));if(e.type!=="object")return null;const a=kS(e);if((a==null?void 0:a.type)==="row"&&a.from!==void 0)return jr(a.from);if(!Pg(t))return null;const r=Object.values(t).filter(l=>gl(l.type)&&l.locked!==!0&&l.from!==void 0);return r.length===0?null:r.flatMap(l=>jr(l.from))}const Py={image:"image/*",video:"video/*",tour:null,document:O8};function Vy(e){const t=e.flatMap(a=>Py[a]??[]);return t.length===0?null:t.join(",")}function gc(e){return[...Vy(e)!==null?["file"]:[],...Sg(e).length>0?["link"]:[]]}const t7=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"}]]),n7=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"}]]),i7=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"}]]),a7=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"}]]),r7={home:x6,building:ED,apartments:jD,trendUp:NL,tag:jL,key:E6,template:O6,palette:nL,filePen:s6,library:N6,plug:sL,helpCircle:HD,lock:L6,creditCard:KD,settings:xL,power:dL,user:HL,plus:Vd,globe:y6,image:Pd,fileText:Fd,users:qL,eye:BE,eyeOff:r6,pulse:sD,search:by,chart:RD,layout:FE,chevDown:uy,chevRight:dy,chevSelector:UD,pencil:py,dots:n6,grip:hy,external:HE,copy:VD,trash:xl,archive:uD,sparkle:EL,arrowUp:vD,arrowDown:fD,arrowLeft:mD,arrowRight:gD,undo:LL,redo:mL,logout:$6,check:qd,x:xy,clock:qD,calendar:MD,mapPin:VE,userPlus:UL,mail:I6,phone:rL,share:kL,upload:Gd,bookOpen:wD,newspaper:eL,presentation:gy,instagram:t7,facebook:n7,linkedin:i7,xLogo:a7};function li({name:e,size:t=18,stroke:a=2,fill:r,color:l,className:c,style:u}){const m=r7[e];return d.jsx(m,{size:t,strokeWidth:a,fill:r??"none",color:l,className:c,style:{flexShrink:0,width:`calc(${t} * var(--content))`,height:`calc(${t} * var(--content))`,color:l??"currentColor",...u},"aria-hidden":"true"})}function o7(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 Ym="inline-flex flex-shrink-0 items-center gap-1.5 whitespace-nowrap p-1 text-[length:calc(12.5*var(--content))] font-medium";function l7({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:ae(Ym,"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:ae(Ym,"text-ink-2"),children:[d.jsx(li,{name:"x",size:13,stroke:2.4,className:"text-danger"}),d.jsx("span",{children:"Not saved"})]}):d.jsxs("div",{className:ae(Ym,"text-ink-3"),children:[d.jsx(li,{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:o7(e.savedAt)})]})]})}const s7=x.createContext(null);function ej(){const e=x.useContext(s7);return e===null?null:d.jsx(l7,{status:e})}function c7({open:e=!0,onClose:t,title:a,notice:r,children:l}){return d.jsxs(wy,{open:e,onClose:t,ariaLabel:a,className:O$,children:[d.jsxs("div",{className:N$,children:[d.jsx("div",{className:$y,children:d.jsx("h2",{className:ae(Uy,"truncate"),children:a})}),d.jsx(ej,{}),d.jsx("button",{type:"button",className:Iy,onClick:t,"aria-label":"Close",children:d.jsx(Rt.x,{})})]}),r,d.jsx("div",{className:M$,children:l})]})}function u7(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=Bd({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=a_(),m=e.ids.length;return Wi.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 Fu="grid h-8 w-8 place-items-center rounded-full text-white/85 hover:bg-white/[0.12] hover:text-white",Yw="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 d7({file:e,index:t,total:a,onClose:r,onPrev:l,onNext:c,onDownload:u,onDelete:m,onCrop:p}){const g=e.thumbnailUrl!==null,b=a_();return Wi.createPortal(d.jsxs("div",{className:"fixed inset-0 flex flex-col bg-black/80",style:{zIndex:b},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:v=>v.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(v_,{file:e}),d.jsxs("div",{className:"ml-auto flex items-center gap-1",children:[p?d.jsx("button",{type:"button",className:Fu,title:"Crop","aria-label":`Crop ${e.name}`,onClick:v=>{v.stopPropagation(),p()},children:d.jsx(it,{name:"crop",size:15})}):null,u&&!Cs(e)?d.jsx("button",{type:"button",className:Fu,title:"Download",onClick:v=>{v.stopPropagation(),u()},children:d.jsx(it,{name:"down",size:15})}):null,m?d.jsx("button",{type:"button",className:Fu,title:"Delete",onClick:v=>{v.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:Fu,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:`${Yw} left-5`,"aria-label":"Previous",onClick:v=>{v.stopPropagation(),l()},children:d.jsx(it,{name:"chevl",size:16})}):null,g?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:v=>v.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:v=>v.stopPropagation(),children:d.jsx(Ay,{file:e,face:"lightbox"})}),a>1?d.jsx("button",{type:"button",className:`${Yw} right-5`,"aria-label":"Next",onClick:v=>{v.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 f7(e){return[{id:"all",label:"All"},...xd.filter(t=>e.includes(t)).map(t=>({id:t,label:mc[t].plural}))]}const Qw=[{id:"custom",label:"Custom"},{id:"date",label:"Date added"},{id:"name",label:"Name"},{id:"kind",label:"Kind"},{id:"size",label:"Size"}],h7="ml-auto inline-flex text-ink-3";function m7({filter:e,setFilter:t,counts:a,kinds:r}){const l=f7(r),[c,u]=x.useState(!1),m=x.useRef(null),p=x.useCallback(()=>u(!1),[]);pc(m,c,p);const g=e!=="all",b=l.find(v=>v.id===e)??{label:"All"};return d.jsxs("div",{className:"relative",ref:m,children:[d.jsxs("button",{type:"button","aria-expanded":c,onClick:()=>u(v=>!v),className:`${Sy} ${g?"border-accent bg-accent-soft text-accent-ink":Ey}`,children:[e==="all"?null:d.jsx(Gr,{kind:e,decorative:!0}),d.jsx("span",{className:g?"text-accent-ink opacity-70":"text-ink-3",children:"Kind:"}),d.jsx("span",{className:"font-semibold",children:b.label}),d.jsx("span",{className:`inline-flex ${g?"text-accent-ink":"text-ink-3"}`,children:d.jsx(it,{name:"chevd",size:13})})]}),c?d.jsx("div",{className:`${Qd} right-0 top-[calc(100%+6*var(--content))] min-w-[calc(210*var(--frame))] p-1.5`,role:"menu",children:l.map(v=>d.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":e===v.id,className:o_,onClick:()=>{t(v.id),u(!1)},children:[v.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(Gr,{kind:v.id,decorative:!0}),d.jsx("span",{children:v.label}),d.jsx("span",{className:"ml-auto text-[length:calc(11.5*var(--content))] font-medium text-ink-4",children:a[v.id]}),d.jsx("span",{className:`inline-flex w-3 text-ink-3 ${e===v.id?"":"invisible"}`,children:d.jsx(it,{name:"check",size:12,stroke:2.4})})]},v.id))}):null]})}function p7({sort:e,setSort:t}){var m;const[a,r]=x.useState(!1),l=x.useRef(null),c=x.useCallback(()=>r(!1),[]);pc(l,a,c);const u=((m=Qw.find(p=>p.id===e))==null?void 0:m.label)??"Custom";return d.jsxs("span",{className:"relative inline-flex",ref:l,children:[d.jsxs("button",{type:"button",className:`${Sy} ${Ey}`,"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:`${Qd} right-0 top-[calc(100%+6*var(--content))] w-[calc(170*var(--frame))] p-1.5`,role:"menu",children:Qw.map(p=>d.jsxs("button",{type:"button",role:"menuitemradio","aria-checked":e===p.id,className:o_,onClick:()=>{t(p.id),r(!1)},children:[p.label,e===p.id?d.jsx("span",{className:h7,children:d.jsx(it,{name:"check",size:12,stroke:2.4})}):null]},p.id))}):null]})}function g7({view:e,setView:t}){const a=(r,l)=>{const c=e===r;return d.jsxs("button",{type:"button","aria-label":l,"aria-pressed":c,title:l,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 y7({lead:e,selectionPill:t,filter:a,setFilter:r,counts:l,kinds:c,sort:u,setSort:m,view:p,setView:g}){return d.jsxs("div",{className:"flex min-h-9 shrink-0 flex-wrap items-center gap-2",onClick:b=>b.stopPropagation(),children:[e,t,d.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[d.jsx(m7,{filter:a,setFilter:r,counts:l,kinds:c}),d.jsx(p7,{sort:u,setSort:m}),d.jsx(g7,{view:p,setView:g})]})]})}function b7({count:e,onClear:t,onDownload:a,onDelete:r}){const l="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:`${l} text-accent`,onClick:a,children:[d.jsx(it,{name:"down",size:13}),"Download"]}),r?d.jsxs("button",{type:"button",className:`${l} text-danger`,onClick:r,children:[d.jsx(it,{name:"trash",size:13}),"Delete"]}):null]})}function Gy(e,t,a=new Set){const r=e.includes(t);return{checked:r,disabled:!r&&a.has(t)}}function tj(e,t,a,r){const{checked:l,disabled:c}=Gy(e,t,r);return a==="radio"?l||c?e:[t]:l?e.filter(u=>u!==t):c?e:[t,...e]}const Xw="hp-uploads-view",v7=new Set;function x7({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 w7=ae(L_,"flex flex-col gap-3"),k7="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",S7=ae(L_,"flex flex-col rounded-2xl border border-line bg-canvas items-center justify-center text-center text-body text-ink-3"),Zw="grid grid-cols-[repeat(auto-fill,minmax(calc(200*var(--frame)),1fr))] gap-4 p-4",E7=8;function _7({filter:e,selection:t,host:a,beneathOf:r,tiers:l}){const{capabilities:c,preparing:u}=a,{kinds:m,from:p}=Ls(e),g=x.useMemo(()=>{const re=new Map((l??[]).flatMap((Se,Pe)=>Se.map(At=>[At,Pe])));return Se=>re.get(Se)??0},[l]),b=(l==null?void 0:l.flat())??p,v=c.upload?Vy(m):null,k=c.upload&&Sg(m).length>0,w=x.useRef(null),j=x.useRef(new Set),E=re=>{t.mode!=="all"&&(w.current??(w.current=Date.now())),a.addFiles(re)},_=re=>{t.mode!=="all"&&(w.current??(w.current=Date.now())),a.addLink(re)},C=Q$(p),O=v!==null||k?{accept:v,onFiles:E,...k?{onLink:_}:{},disabled:u}:null,[A,D]=x.useState(()=>new Set),[R,F]=x.useState(()=>t.mode==="multi"?t.selectedIds:[]),[L,T]=x.useState("all"),[H,ne]=x.useState("custom"),[Y,le]=x.useState(null),[K,X]=x.useState(null),[ue,M]=x.useState(()=>{if(typeof window>"u")return"grid";try{return window.localStorage.getItem(Xw)==="list"?"list":"grid"}catch{return"grid"}}),[V,te]=x.useState(null),[me,Q]=x.useState(null),[N,q]=x.useState(!1),[I,P]=x.useState(null),[ee,pe]=x.useState(null),se=x.useRef(0),ke=x.useRef(null);x.useEffect(()=>{try{window.localStorage.setItem(Xw,ue)}catch{}},[ue]),x.useEffect(()=>()=>{ke.current&&clearTimeout(ke.current)},[]);const z=x.useCallback(re=>{P(re),ke.current&&clearTimeout(ke.current),ke.current=setTimeout(()=>P(null),2400)},[]),ce=x.useMemo(()=>new Map(a.items.flatMap(re=>jn(re)?[]:[[re.record.id,re.record]])),[a.items]),ge=x.useMemo(()=>new Map(a.items.flatMap(re=>jn(re)?[]:[[Pr({holder:Gw(re.list),mediaId:re.record.id}),re.record]])),[a.items]),Ee=x.useCallback(re=>ge.get(Pr(re)),[ge]),Ue=Q_({propertyId:t.mode==="all"?a.scope:"",recordAt:Ee,write:a.crop,onFailed:()=>z("Couldn't crop")}),Le=re=>({holder:Gw(re.list),mediaId:re.id}),ye=re=>t.mode==="all"&&c.manage&&re.kind==="image"&&!re.inFlight&&Ue.offers(Le(re))?{onCrop:()=>Ue.open(Le(re))}:{},Re=a.items.filter(re=>{const Se=jn(re)?re.kind:re.record.kind;return b.includes(re.list)&&(Se===null||m.includes(Se))}).map(re=>W8(re,g)).map(re=>re.state==="ready"&&Ue.recropping(Le(re))?{...re,state:"processing"}:re),ht=x.useMemo(()=>new Set(a.items.filter(jn).map(p_)),[a.items]),$e=tz(Re),Lt=Y===null?Re:[...Re].sort((re,Se)=>Y.indexOf(re.id)-Y.indexOf(Se.id)),st=ez(Lt,L,H),[Bn]=p,On=a.reorder,cn=t.mode==="all"&&c.manage&&On!==void 0&&H==="custom"&&p.length===1&&V===null,yt=cn?st.filter(re=>!re.inFlight):[],Ji=re=>{X(null);const Se=re.map(nt=>nt.id),Pe=Lt.filter(nt=>!nt.inFlight).map(nt=>nt.id),At=T5(Pe,Se);On===void 0||Bn===void 0||At.every((nt,qn)=>nt===Pe[qn])||(le(At),On(Bn,Se).then(()=>le(null),()=>{le(null),z("Couldn't reorder")}))},{containerRef:ci,getItemProps:ti}=O_({items:yt,getKey:re=>re.id,onReorder:X,onDrop:Ji,axis:ue==="list"?"y":"xy",threshold:5}),we=K===null?st:[...st.filter(re=>re.inFlight),...K],Te=x.useCallback(()=>D(new Set),[]),Ce=x.useMemo(()=>t.mode==="all"?v7:new Set([...t.disabledIds??[],...ht]),[t,ht]),Xe=t.mode==="single"?t.selectedId===null?[]:[t.selectedId]:R,at=re=>{if(t.mode==="all")return;if(t.mode==="single"){const Pe=Ce.has(re)?void 0:ce.get(re);Pe&&t.onPick(Pe);return}const Se=tj(Xe,re,"checkbox",Ce);Se!==Xe&&(F(Se),t.onChange(Se.flatMap(Pe=>ce.get(Pe)??[])))};x.useEffect(()=>{const re=w.current;if(re===null||t.mode==="all")return;for(const nt of a.items)jn(nt)&&nt.addedAt>=re&&j.current.add(nt.id);const Se=[...j.current].filter(nt=>ce.has(nt)&&!Ce.has(nt)),[Pe]=Se;if(Pe===void 0)return;for(const nt of Se)j.current.delete(nt);if(t.mode==="single"){at(Pe);return}const At=[...Se.filter(nt=>!Xe.includes(nt)),...Xe];At.length!==Xe.length&&(F(At),t.onChange(At.flatMap(nt=>ce.get(nt)??[])))},[a.items]);const Vt=re=>{if(t.mode==="all")return{selected:A.has(re),control:"checkbox",disabled:!1};const{checked:Se,disabled:Pe}=Gy(Xe,re,Ce);return{selected:Se,control:t.mode==="single"?"radio":"checkbox",disabled:Pe}},ut=re=>{if(t.mode!=="all"){at(re);return}D(Se=>{const Pe=new Set(Se);return Pe.has(re)?Pe.delete(re):Pe.add(re),Pe})},ie=st.findIndex(re=>re.id===me),be=ie>=0?st[ie]:void 0,Oe=re=>{var Pe;if(st.length===0)return;const Se=(Math.max(ie,0)+re+st.length)%st.length;Q(((Pe=st[Se])==null?void 0:Pe.id)??null)},ze=re=>{if(!me||!re.includes(me))return;const Se=st.findIndex(nt=>nt.id===me),At=[...st.slice(Se+1),...st.slice(0,Math.max(Se,0))].find(nt=>!re.includes(nt.id));Q(At?At.id:null)};x.useEffect(()=>{const re=Se=>{if(Ue.isOpen)return;const Pe=Se.target instanceof HTMLElement?Se.target.tagName:"";if(!(Pe==="INPUT"||Pe==="TEXTAREA")){if(ee){Se.key==="Escape"&&pe(null),(Se.key==="Escape"||Se.key==="Enter")&&Se.preventDefault();return}if(Se.key==="Escape"){if(me)Q(null);else if(A.size>0)Te();else return;Se.preventDefault()}else me&&Se.key==="ArrowRight"?Oe(1):me&&Se.key==="ArrowLeft"?Oe(-1):me&&Se.key==="Enter"&&Se.preventDefault()}};return document.addEventListener("keydown",re),()=>document.removeEventListener("keydown",re)});const Ge=re=>{ze(re),D(Se=>{const Pe=new Set(Se);return re.forEach(At=>Pe.delete(At)),Pe}),a.remove(re).then(Se=>{Se>0?z(`Couldn't delete ${Se}`):z(`Deleted ${re.length} object${re.length===1?"":"s"}`)})},Be=()=>{ee&&(pe(null),Ge(ee))},kt=re=>{Cs(re)||re.inFlight||(z("Preparing download…"),a.download(re.id).catch(()=>z("Couldn't download")))},jt=()=>{const re=Re.filter(Se=>A.has(Se.id)&&!Cs(Se)&&!Se.inFlight);re.length!==0&&(z("Preparing download…"),re.forEach(Se=>void a.download(Se.id).catch(()=>z("Couldn't download"))))},St=(re,Se)=>{te(null),!(Se===null||!Se||Se===re.name)&&a.rename(re.id,Se).catch(()=>z("Couldn't rename"))},Bt=v!==null&&!u,Gt=re=>{re.preventDefault(),!(!Bt||!Array.from(re.dataTransfer.types).includes("Files"))&&(se.current+=1,q(!0))},Kt=re=>{re.preventDefault(),se.current-=1,se.current<=0&&(se.current=0,q(!1))},An=re=>{re.preventDefault(),se.current=0,q(!1),Bt&&re.dataTransfer.files.length>0&&E(Array.from(re.dataTransfer.files))},Si=re=>t.mode==="all"&&A.has(re)&&A.size>1?st.filter(Se=>A.has(Se.id)).map(Se=>Se.id):null,ni=re=>{const{selected:Se,control:Pe,disabled:At}=Vt(re.id),nt=Si(re.id),qn=nt==null?void 0:nt.filter(Ot=>!ht.has(Ot));return{file:re,selected:Se,select:{control:Pe,disabled:At},listChip:p.length<2||re.upstream?null:cd(re.list)??re.list,renaming:V===re.id,onClick:Ot=>{Ot.stopPropagation(),ut(re.id)},onDoubleClick:()=>t.mode==="single"?at(re.id):Q(re.id),onToggleSelect:()=>ut(re.id),...re.state==="failed"&&a.canRetry(re.id)?{onRetry:()=>a.retry(re.id)}:{},...re.linkUnreachable?{onRecheck:()=>void a.recheck(re.id)}:{},onRenameCommit:Ot=>St(re,Ot),handlers:{onPreview:()=>Q(re.id),onDownload:()=>kt(re),...ye(re),...c.manage?{onRenameStart:()=>te(re.id),onDelete:()=>pe(nt??[re.id]),...nt!==null?{deleteLabel:`Delete ${nt.length} objects`}:{}}:{}},...cn&&!re.inFlight?{drag:ti(re.id,qn)}:{}}},ui=re=>{const Se=new Set(Re.filter(At=>re.includes(At.id)).map(At=>At.list)),[Pe]=Se;return Se.size!==1||Pe===void 0||Fr(Pe).at(-1)===Pe?{}:{removeFrom:cd(Pe)??Pe}},Xr=[...A],wc=Re.length===0;return d.jsxs("div",{className:"flex flex-col",onClick:Te,onDragEnter:Gt,onDragOver:re=>re.preventDefault(),onDragLeave:Kt,onDrop:An,children:[a.loading?d.jsx("div",{className:S7,children:"Loading…"}):d.jsxs("div",{className:w7,children:[d.jsx(y7,{lead:d.jsx(hc,{size:"large",add:C,onAdd:null,...O!==null?{newChip:d.jsx(vz,{add:O,verb:C})}:{}}),selectionPill:A.size>0?d.jsx(b7,{count:A.size,onClear:Te,onDownload:jt,...c.manage?{onDelete:()=>pe(Xr)}:{}}):null,filter:L,setFilter:T,counts:$e,kinds:m,sort:H,setSort:ne,view:ue,setView:M}),d.jsx("div",{className:k7,"data-dragging":N||void 0,children:wc?d.jsxs("div",{className:"relative min-h-0 flex-1",children:[d.jsx(fc,{children:d.jsx("div",{className:Zw,children:Array.from({length:E7},(re,Se)=>d.jsx(g$,{},Se))})}),d.jsx(gz,{add:O,kinds:m,dragging:N})]}):st.length===0?d.jsx(x7,{onReset:()=>T("all")}):d.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:ue==="grid"?d.jsx("div",{ref:ci,className:ae("relative",Zw),role:"listbox","aria-multiselectable":t.mode!=="single","aria-label":"Uploaded objects",children:we.map(re=>d.jsx(p$,{...ni(re),beneath:r==null?void 0:r(re)},re.id))}):d.jsxs("div",{ref:ci,className:"relative pt-1",role:"table","aria-label":"Uploaded objects",children:[d.jsx(y$,{}),we.map(re=>d.jsx(v$,{...ni(re)},re.id))]})})})]}),be?d.jsx(d7,{file:be,index:ie,total:st.length,onClose:()=>Q(null),onPrev:()=>Oe(-1),onNext:()=>Oe(1),...!Cs(be)&&!be.inFlight?{onDownload:()=>kt(be)}:{},...c.manage?{onDelete:()=>pe([be.id])}:{},...ye(be)}):null,Ue.modal,ee&&!u?d.jsx(u7,{scope:a.scope,ids:ee,inFlightIds:ht,holders:a.holders,...ui(ee),onCancel:()=>pe(null),onConfirm:Be}):null,I?d.jsx("div",{role:"status",style:{zIndex:l8},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 Ky(){return Wt()}function j7(e){const t=Is(e[0]).home;return e3(e).flatMap(a=>{const[r,...l]=a;return r===void 0?[]:[{lists:[r,...l],label:a.map(c=>W_(c,t)??Is(c).key).join(" + ")}]}).reverse()}const Gp=new Map,Zu=new Map,Kp=new Set,Yp=[],Wu=new Map,Ww=new Set,ul=new Map;function O7(e,t){var a;(a=ul.get(e))==null||a.onStored(t),ul.delete(e)}function Qm(e,t){var a;(a=ul.get(e))==null||a.onFailed(t),ul.delete(e)}function nj(){for(const e of Kp)e()}function ij(e){return Kp.add(e),()=>{Kp.delete(e)}}function Yy(e,t){t.length===0?Gp.delete(e):Gp.set(e,t),nj()}function Ir(e){return Gp.get(e)??Yp}function Jw(e,t){t.length!==0&&Yy(e,[...t,...Ir(e)])}function Qp(e,t,a){const r=Ir(e);r.some(l=>l.inFlight.id===t)&&Yy(e,r.map(l=>l.inFlight.id===t?a(l):l))}function ek(e,t){var c;const a=new Set(t),r=Ir(e),l=r.filter(u=>a.has(u.inFlight.id));if(l.length!==0){for(const u of l)(c=u.inFlight.preview)!=null&&c.startsWith("blob:")&&URL.revokeObjectURL(u.inFlight.preview);Yy(e,r.filter(u=>!a.has(u.inFlight.id)))}}function tk(e,t,a,r){const l=Zu.get(e)??Wu,c=l.get(t)??[];if(c.includes(a)===r)return;const u=new Map(l),m=r?[...c,a]:c.filter(p=>p!==a);m.length===0?u.delete(t):u.set(t,m),u.size===0?Zu.delete(e):Zu.set(e,u),nj()}function A7(e){return x.useSyncExternalStore(ij,()=>e===null?Yp:Ir(e),()=>Yp)}function N7(e){return x.useSyncExternalStore(ij,()=>e===null?Wu:Zu.get(e)??Wu,()=>Wu)}function M7(e,t,a){const r=e.get(t);if(r===void 0)return!1;const l=Fr(a).at(-1)??a;return r.includes(a)||r.includes(l)}function C7(e,t,a){return e.flatMap(({inFlight:r})=>{if(a.has(r.id))return[];const l=Fr(r.list),c=t.find(u=>l.includes(u));return c===void 0?[]:[{...r,list:c}]})}const aj="local-",rj=()=>`${aj}${Math.random().toString(36).slice(2,10)}`,R7=e=>e.startsWith(aj);function nk(e,t){return e instanceof Error&&"problem"in e&&e.message!==""?e.message:t}function T7(e,t){const a=z8(t);return{inFlight:{id:rj(),list:e,kind:Q2(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 ks(e,t,a){Qp(e,t,r=>({...r,inFlight:{...r.inFlight,send:a}}))}function D7(e,t,a){const{postListUploadWithProgress:r,postListLink:l,withdrawListItem:c,holdListItem:u}=e,m=O=>Pp(t,e,O),p=async(O,A,D)=>{tk(O,D,A,!0);try{await c(O,A,D)}catch(R){throw tk(O,D,A,!1),m(O),R}m(O)},g=async(O,A,D,R)=>{if(Ww.delete(A)){Qm(A,"Removed while sending"),p(O,R,D).catch(()=>{});return}Qp(O,A,F=>({...F,inFlight:{...F.inFlight,id:D,send:{state:"saving"}}})),await m(O),ek(O,[D]),O7(A,D)},b=async(O,A,D,R,F)=>{let L;try{L=(await r(O,D,R,H=>ks(O,A,{state:"uploading",progress:H}),{attempt:F,onAttempt:H=>Qp(O,A,ne=>({...ne,baggage:{...ne.baggage,attempt:H??void 0}}))})).id}catch(T){console.error("media.upload.failed",{itemId:A,propertyId:O,into:D,name:R.name,size:R.size,mime:R.type,error:T});const H=nk(T,"Upload failed");ks(O,A,{state:"failed",error:H}),Qm(A,H);return}await g(O,A,L,D)},v=async(O,A,D,R,F)=>{let L;try{L=(await l(O,D,R,F)).id}catch(T){console.error("media.link.create_failed",{itemId:A,propertyId:O,into:D,url:R,error:T});const H=nk(T,"Couldn’t add link");ks(O,A,{state:"failed",error:H}),Qm(A,H);return}await g(O,A,L,D)},k=(O,A,D)=>{if(a===null)return;const R=O.filter(Boolean).map(L=>T7(A,L));Jw(a,R);for(const L of R){if(D===void 0)continue;const{send:T}=L.inFlight;T.state==="failed"?D.onFailed(T.error):ul.set(L.inFlight.id,D)}const F=R.filter(L=>L.inFlight.send.state==="uploading");w8(F,L8,async L=>{L.baggage.file&&await b(a,L.inFlight.id,A,L.baggage.file)})},w=(O,A,D)=>{if(a===null)return;const R=/^https?:\/\//i.test(O)?O:`https://${O}`,F=crypto.randomUUID(),L={inFlight:{id:rj(),list:A,kind:g_(R),name:N8(R),bytes:null,mime:null,url:R,addedAt:Date.now(),preview:null,send:{state:"saving"}},baggage:{link:{url:R,idempotencyKey:F}}};Jw(a,[L]),D!==void 0&&ul.set(L.inFlight.id,D),v(a,L.inFlight.id,A,R,F)},j=O=>{if(a===null)return!1;const A=Ir(a).find(D=>D.inFlight.id===O);return A!==void 0&&A.inFlight.send.state==="failed"&&(A.baggage.file!==void 0||A.baggage.link!==void 0)},E=O=>{if(a===null)return;const A=Ir(a).find(R=>R.inFlight.id===O);if(A===void 0)return;const D=A.inFlight.list;if(A.baggage.link){const{url:R,idempotencyKey:F}=A.baggage.link;ks(a,O,{state:"saving"}),v(a,O,D,R,F);return}if(A.baggage.file){const R=$8({attempt:A.baggage.attempt});ks(a,O,{state:"uploading",progress:0}),b(a,O,D,A.baggage.file,R.kind==="resume"?R.attempt:void 0)}},_=async(O,A)=>{if(a===null)return 0;const D=new Set(O);for(const L of Ir(a))D.has(L.inFlight.id)&&L.inFlight.send.state==="uploading"&&Ww.add(L.inFlight.id);ek(a,O);const R=O.filter(L=>!R7(L));return(await Promise.allSettled(R.map(L=>p(a,A,L)))).filter(L=>L.status==="rejected").length},C=u===void 0||a===null?void 0:async(O,A)=>{await u(a,A,O),await m(a)};return{addFiles:k,addLink:w,canRetry:j,retry:E,remove:_,...C!==void 0?{hold:C}:{}}}function L7(e){const t=_y(),a=Hd();return x.useMemo(()=>D7(t,a,e),[t,a,e])}function z7(e,t,a,r){const l=Ls(t),c=e===void 0?[]:N5(e,l).filter(({id:p,list:g})=>!M7(r,p,g)),u=c.map(({value:p,file:g,list:b})=>({record:Og(g,p),list:b}));return[...C7(a,l.from,new Set(c.map(({id:p})=>p))),...u]}function $7(e,t,a,r){const l=A7(e),c=N7(e),u=L7(e),m=x.useMemo(()=>z7(a,t,l,c),[a,t,l,c]),p=r??nS(t),g=x.useCallback(j=>u.addFiles(j,p),[u,p]),b=x.useCallback(j=>u.addLink(j,p),[u,p]),v=x.useCallback(async j=>{const E=new Map;for(const C of m){const O=p_(C);j.includes(O)&&E.set(C.list,[...E.get(C.list)??[],O])}return(await Promise.all([...E].map(([C,O])=>u.remove(O,C)))).reduce((C,O)=>C+O,0)},[m,u]),{hold:k}=u,w=x.useMemo(()=>k===void 0||r===void 0?void 0:j=>k(j,r),[k,r]);return{items:m,sent:l,deleting:c,addFiles:g,addLink:b,remove:v,canRetry:u.canRetry,retry:u.retry,...w!==void 0?{land:w}:{}}}function yc(e){const{MediaPicker:t}=Ky();return d.jsx(t,{...e})}function U7(e){return new Set(e.flatMap(t=>{if(jn(t))return[];const{record:a}=t;return a.state!=="ready"||a.kind==="tour"&&!f_(a)?[a.id]:[]}))}const ik=ae("m-0 py-1 text-caption text-ink-3",zy);function I7({useHost:e,filter:t,propertyId:a,...r}){var K;const{onClose:l}=r,c=x.useMemo(()=>j7(Ls(t).from),[t]),u=x.useMemo(()=>c.map(({lists:X})=>X),[c]),m=x.useMemo(()=>({kinds:t.kinds,from:[...Ls(t).from,...u.slice(1).flat()]}),[t,u]),p=e(a,m,nS(t)),{land:g}=p,b=x.useMemo(()=>new Map(u.flatMap((X,ue)=>X.map(M=>[M,ue]))),[u]),[v,k]=x.useState(()=>new Set),w=x.useRef(null),j=x.useMemo(()=>{if(p.loading)return p.items;const X=new Map;for(const te of p.items){if(jn(te)||v.has(te.record.id))continue;const me=X.get(te.record.id);(me===void 0||(b.get(te.list)??0)<(b.get(me.list)??0))&&X.set(te.record.id,te)}const ue=[...X.values()],M=w.current??(w.current=new Map(ue.map((te,me)=>[te.record.id,{tier:b.get(te.list)??0,rank:me}])));for(const te of ue)M.has(te.record.id)||M.set(te.record.id,{tier:b.get(te.list)??0,rank:-M.size});const V=te=>M.get(te.record.id)??{tier:0,rank:0};return[...p.items.filter(jn),...ue.map(te=>({...te,tier:V(te).tier})).sort((te,me)=>V(te).rank-V(me).rank)]},[p.items,p.loading,b,v]),{remove:E}=p,_=x.useMemo(()=>({...p,items:j,remove:async ue=>{const M=ue.filter(te=>j.some(me=>!jn(me)&&me.record.id===te&&(b.get(me.list)??0)===0)),V=await E(ue);return V===0&&M.length>0&&k(te=>new Set([...te,...M])),V}}),[p,j,E,b]),C=x.useMemo(()=>U7(j),[j]),O=x.useMemo(()=>new Set(j.flatMap(X=>!jn(X)&&(b.get(X.list)??0)>0?[X.record.id]:[])),[j,b]),[A,D]=x.useState("idle"),[R,F]=x.useState(0),L=x.useRef(Promise.resolve()),T=x.useRef(0),H=x.useRef(new Set);if(t.kinds.length===0)return null;const ne=(X,ue)=>{const M=g===void 0?[]:X.filter(V=>O.has(V)&&!H.current.has(V));if(M.length===0&&T.current===0){ue();return}T.current+=1,L.current=L.current.then(async()=>{try{if(g===void 0||M.length===0){ue();return}D("landing");try{for(const V of M)await g(V),H.current.add(V)}catch{D("failed"),F(V=>V+1);return}D("idle"),ue()}finally{T.current-=1}})},Y=r.mode==="single"?{mode:"single",selectedId:r.currentId??null,disabledIds:C,onPick:X=>ne([X.id],()=>r.onPick(X))}:{mode:"multi",selectedIds:r.selectedIds.filter(Boolean),disabledIds:C,onChange:X=>{const ue=r.selectedIds;ne(X.filter(({id:M})=>!ue.includes(M)).map(({id:M})=>M),()=>r.onChange(X))}},le=((K=c[0])==null?void 0:K.label)??"";return d.jsx(c7,{onClose:l,title:le,notice:A==="landing"?d.jsxs("p",{role:"status",className:ik,children:["Adding to ",le,"…"]}):A==="failed"?d.jsxs("p",{role:"alert",className:ae(ik,"text-danger"),children:["Couldn't add it to ",le,". Try again."]}):null,children:d.jsx(_7,{filter:t,selection:Y,host:_,...g!==void 0?{tiers:u}:{}},R)})}function H7(e){return function(a,r,l){const c=Wd(a),u=$7(a,r,c,l),{items:m}=u,p=x.useCallback(g=>{const b=m.find(k=>!jn(k)&&k.record.id===g),v=b===void 0||jn(b)?null:b.record.file_url;return v&&window.open(v,"_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 B7({capabilities:e,...t}){const{upload:a,manage:r}=e,l=x.useMemo(()=>H7({upload:a,manage:r}),[a,r]);return d.jsx(I7,{...t,useHost:l})}function Qy(e,t){const a=n8();return e!==void 0&&t!==""&&a!==void 0&&a(e,t)}const tf=ae(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"),Xy="hover:bg-[#fbe6e2] hover:text-danger",q7="size-[calc(13*var(--content))]",F7="we-no-drag h-[calc(36*var(--content))] shrink-0",oj="flex shrink-0 items-center";function nf({icon:e,label:t,title:a,tone:r="neutral",onClick:l}){return d.jsx("button",{type:"button",className:ae(tf,F7,r==="remove"&&Xy),"aria-label":t,title:a,onClick:l,children:za.createElement(e,{className:q7})})}const P7={card:"rounded-2xl",compact:"rounded-xl"},V7={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}},G7="text-ink-3",K7={card:"mx-2 rounded-xl",compact:"mx-1.5 rounded-lg"},Y7=ae("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]",YE),Q7="border-honey-2 bg-honey-soft";function ak({kind:e,name:t,empty:a,scale:r,actions:l,attention:c,drop:u,children:m}){const p=jl(),g=Ur[r],b=V7[r],{plain:v,foot:k}=H_(l),w=(u==null?void 0:u.over)??!1;return d.jsxs("div",{"data-media-slot-card":"",className:ae("relative flex flex-col border border-transparent bg-[#f3f2ed] transition-[background-color,box-shadow] duration-[140ms]",P7[r],kl,w&&!a&&"ring-2 ring-honey-2"),...Sl(c,p),...u==null?void 0:u.handlers,"data-media-drop":u?"":void 0,children:[d.jsxs("div",{className:b.bar,children:[d.jsx("span",{className:ae("grid shrink-0 place-items-center",b.mark),children:d.jsx(Gr,{kind:e,size:r==="compact"?"mark":"lead"})}),d.jsx("span",{className:ae(b.name,a&&"font-normal text-ink-4"),title:t,children:t}),l.length>0&&d.jsx("span",{className:"we-no-drag flex shrink-0 items-center gap-0.5",children:[...v,...k].map(j=>d.jsx("button",{type:"button",className:ae(tf,G7,b.button,j.danger&&Xy),"aria-label":j.label,title:j.label,onClick:j.onSelect,children:d.jsx(it,{name:j.glyph,size:b.glyph})},j.label))})]}),a?d.jsx("div",{className:ae(Y7,K7[r],w&&Q7),"data-thumb":"",children:m}):d.jsx("div",{className:g.thumb,"data-thumb":"","data-media-tile":e,children:m}),d.jsx("div",{className:r==="compact"?"h-1.5":"h-2"})]})}function Xp(e){var t;return e===void 0?"Link":((t=Qa[e])==null?void 0:t.label)??"Link"}function X7(e){return e.kind==="tour"?Xp(e.provider):e.kind!=="video"?"":e.videoSource==="link"?Xp(e.provider):e.ready===!1?"Processing…":D8(e.durationMs)||"Video"}function Z7({kind:e,size:t}){return e==="tour"?d.jsx(Rt.tour,{size:t}):d.jsx(Rt.play,{size:t})}const W7="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",J7={doc:Fd,spreadsheet:qE,presentation:gy,image:Pd,video:vy};function eU({glyph:e,extension:t,size:a=16,className:r}){const l=J7[e];return d.jsxs(d.Fragment,{children:[d.jsx(l,{size:a,strokeWidth:1.5,className:r,style:{width:`calc(${a} * var(--content))`,height:`calc(${a} * var(--content))`}}),t&&d.jsx("span",{className:W7,children:t})]})}const tU=new Set(["image","video","tour","document","media"]);function nU(e){return Ba(e).length>0}function lj(e,t){const a=Yg(e,t);return a!==null?!tU.has(a.value_type)||a.filter!==void 0?null:{holder:"home",table:a.table,field:a.member}:!nU(e)||typeof e.from=="string"||e.source!==void 0&&e.source.kind!=="authored"?null:{holder:"section"}}function sj(){return`tmp_${globalThis.crypto.randomUUID()}`}function af(e){return typeof e=="string"&&e.startsWith("tmp_")}function iU(e,t,a,r){const l=Cg(a.table)==="library"?{home:"library"}:{home:"property",propertyId:t},c=`${a.table}.${r}.${a.field}`;return{place:`${l.home}:${c}`,take:u=>e.stageOwnedMedia(l,c,u),presign:u=>e.ownedMediaUrl(l,c,u),discard:u=>e.discardStagedMedia(l,c,u)}}function cj(e,t,a){return{place:`content:${a.deliverableId}:${a.instanceId}:${a.slotId}`,take:r=>e.uploadContentMedia(t,a,r),presign:r=>e.contentMediaUrl(t,a,r),discard:null}}function aU(e,t){return e?e.itemId??null:t??null}function uj({props:e,table:t,ownerSlot:a,mediaId:r,inLibrary:l}){const{slot:c,propertyId:u,instanceId:m,recordContext:p,boundRowId:g,onUpload:b}=e,{api:v,useEditorStore:k}=Wt(),w=k(L=>L.session.deliverable_id),j=b===void 0?lj(a??c,t):null,E=(j==null?void 0:j.holder)==="home"?j:null,_=E===null?null:aU(p,g),C=af(_),O=E===null||C?null:_;let A=null;E!==null&&O!==null&&(A=iU(v,u,E,O)),((j==null?void 0:j.holder)==="section"||C)&&w!==void 0&&(A=cj(v,u,{deliverableId:w,instanceId:m,slotId:dj(e)}));const D=Bd({queryKey:["owned-media-url",A==null?void 0:A.place,r],queryFn:()=>A.presign(r),enabled:A!==null&&r!==""&&!l,retry:!1}),R=x.useRef(null);return{upload:A===null?null:async L=>{const T=await A.take(L),H=R.current;return R.current=T.media_id,A.discard!==null&&H!==null&&H!==T.media_id&&A.discard(H).catch(()=>{}),fj(T,L)},previewUrl:D.data}}function dj(e){var a;const t=(a=e.recordContext)==null?void 0:a.fieldKey;return t?`${e.slotId}.${t}`:e.slotId}function fj(e,t){const a=e.provider??("link"in t?ac(e.url)??void 0:void 0);return a===void 0?e:{...e,provider:a}}function Zy(e,t){var u;const{api:a,useEditorStore:r}=Wt(),l=r(m=>m.session.deliverable_id);if(l===void 0||((u=lj(e))==null?void 0:u.holder)!=="section")return null;const c=cj(a,t.propertyId,{deliverableId:l,instanceId:t.instanceId,slotId:t.slotId});return async m=>fj(await c.take(m),m)}function Rs(e,t){return e===void 0||e===""||t===""?null:{holder:e,mediaId:t}}function hj(e,t){const{capabilities:a}=Ky(),r=a.framingCrop!==!1,l=!r&&t==="image",c=x.useRef(new Map),u=X_(l?e:"",m=>{const p=c.current.get(Pr(m));p!==void 0&&ty.getState().notice(p,"failed")});return{framing:r&&t==="image",offers:m=>r?t==="image":l&&m!==null&&u.offers(m),recrop:(m,p)=>{c.current.set(Pr(m),p),u.open(m)},recropping:m=>l&&m!==null&&u.recropping(m),modal:u.modal}}function mj(e,t,a,r){const l=t.file===""?void 0:e.get(t.file),u=((l==null?void 0:l.kind)==="image"?l.file_url??"":"")||r||t.url;if(t.crop)return{src:u,seed:ol(t.crop),inherited:!1};const m=(l==null?void 0:l.kind)==="image"&&a!=="locked"?l.crop:null;return m===null||!rc(m)?{src:u,seed:null,inherited:!1}:{src:u,seed:ol(m),inherited:!0}}function pj(e,t){if(!e.inherited||e.seed===null)return!1;const a=l=>Math.round(l*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 gj(e,t){var l;const a=xp(t.rect);if(a===null){if(!e.crop&&!e.mobile)return null;const c=e.renditions?{renditions:{...e.renditions,crop:null}}:{};return{...e,crop:null,ar:null,mobile:null,...c}}const r=(l=e.mobile)!=null&&l.renditions?{renditions:e.mobile.renditions}:{};return{...e,crop:a,ar:t.ar,mobile:t.mobile?{crop:xp(t.mobile.rect),derived:t.mobile.derived,...r}:e.mobile??null}}function rU(e,t){return e.crop?rc(e.crop):(t==null?void 0:t.mode)!=="locked"?!1:typeof e.ar!="number"||JS(e.ar,t.aspect)!==null}function Zp(e,t){var l,c,u,m;if(!rU(e,t))return null;const a=(c=(l=e.renditions)==null?void 0:l.cutout)==null?void 0:c.key;if(typeof a=="string"&&a.startsWith(`processed/cutout/${e.file}/`))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.file}/`)?r:null}function oU({value:e,onChange:t,propertyId:a,cropCfg:r}){const{api:l}=Wt(),c=El(a),[u,m]=x.useState(!1),p=Zp(e,r),g=LE(a,[p],l.getCropDerivativeUrl),b=p?g.get(p):void 0,v=k=>{var j;if(!u)return null;const w=mj(c,e,r.mode,k);return w.src?d.jsx(ey,{chrome:Hy,src:w.src,mode:r.mode,aspect:r.aspect,aspectLabel:r.aspectLabel,mobileAspect:r.mobileAspect,seed:{rect:w.seed},mobileSeed:{rect:ol((j=e.mobile)==null?void 0:j.crop)},onClose:()=>m(!1),onApply:E=>{if(m(!1),!e.file||!E.mobile&&pj(w,E.rect))return;const _=gj(e,E);_!==null&&t(_)}}):null};return{cropCfg:r,ar:e.ar??null,cut:p,derivativeUrl:b,open:()=>m(!0),modal:v}}function Wy({propertyId:e,children:t}){return d.jsx(d.Fragment,{children:t(Wd(e))})}function Jy(e,t){const a=El(t).get(e);return a===void 0?void 0:h_(a)}function lU(e){return e==null||e===""?void 0:e}function rk(e){return{file:e.file,url:e.url,alt:e.alt}}const sU={noun:"image",takes:gc(["image"]),fileIdOf:e=>e.file,fromPicked:(e,t)=>e.file===t.file?{...t,url:cl(e)}:{...rk(t),file:e.file,url:cl(e),alt:t.alt,picked:e.id},fromUploaded:(e,t)=>({...rk(t),file:e.media_id,url:e.url,picked:null}),cleared:{file:"",url:"",alt:""},usePreview:function(t,a){const r=Jy(t.file,a);return{src:(r==null?void 0:r.src)||t.url,name:lU(t.name)??(r==null?void 0:r.name)}}},cU={noun:"video",takes:gc(["video"]),fileIdOf:e=>e.file,fromPicked:(e,t)=>({...t,file:e.file,url:"",poster:cl(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,file:e.media_id,url:"",poster:e.poster??"",source:e.provider!==void 0?"link":void 0,provider:e.provider,picked:null}),cleared:{file:"",url:"",poster:"",alt:""},usePreview:function(t,a){const r=Jy(t.file,a);return{src:(r==null?void 0:r.src)||t.poster,name:r==null?void 0:r.name,detail:r?X7(r):void 0}}},uU={noun:"tour",takes:gc(["tour"]),fileIdOf:e=>e.file,fromPicked:(e,t)=>({...t,file:e.file,url:"",poster:cl(e),provider:e.provider??void 0,picked:e.id}),fromUploaded:(e,t)=>({...t,file:e.media_id,url:"",poster:e.poster??"",provider:e.provider,picked:null}),cleared:{file:"",url:"",poster:"",alt:""},usePreview:function(t,a){const r=Jy(t.file,a);return{src:(r==null?void 0:r.src)||t.poster,name:r==null?void 0:r.name,detail:t.file?Xp((r==null?void 0:r.provider)??t.provider):void 0}}},dU={noun:"document",takes:gc(["document"]),fileIdOf:e=>(e==null?void 0:e.file)??"",fromPicked:e=>({file:e.file,picked:e.id}),fromUploaded:e=>({file:e.media_id,picked:null}),cleared:null,usePreview:function(t,a){const r=Xz(a),l=(t==null?void 0:t.file)??"";if(!l)return{src:""};const c=r(l);return c?{src:c.src,name:c.name,detail:Qz(c),attachment:M_(c)}:{src:"",name:"Document unavailable"}}},fU={image:sU,video:cU,tour:uU,document:dU};function In(e){return fU[e]}function dl(e){return e.recordContext?e.recordContext.table??null:e.boundRowTable??null}const hU="text-[length:calc(11.5*var(--content))] text-ink-3",mU=ae(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"),pU="flex w-full max-w-90 items-center gap-1.5",gU="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",yU=ae(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",kl);function ok(e){return e.kind==="image"?d.jsx(bU,{...e}):d.jsx(yj,{...e})}function yj(e){const t=In(e.kind),a=uj({props:e.props,table:dl(e.props),mediaId:t.fileIdOf(e.props.value),inLibrary:!0});return d.jsx(wj,{...e,extras:{crop:null,pick:null,ownerUpload:a.upload,ownerPreview:void 0}})}function bj(e){const{slot:t,value:a,onChange:r,propertyId:l,factPath:c}=e,u=oU({value:a,onChange:r,propertyId:l,cropCfg:Qg(t)}),m=Ky().capabilities.framingCrop===!1,p=X_(m?l:"");if(!m)return{...u,offered:!0,recropping:!1};const g=Rs(c,a.file);return{...u,cut:null,derivativeUrl:void 0,open:()=>{g!==null&&p.open(g)},modal:()=>p.modal,offered:g!==null&&p.offers(g),recropping:g!==null&&p.recropping(g)}}function bU(e){const t=bj(e.props),a=El(e.props.propertyId),r=e.props.value.file,l=(u,m,p)=>{e.props.onChange(By(u,e.props.value,m,t.cropCfg,p))},c=uj({props:e.props,table:dl(e.props),mediaId:r,inLibrary:r!==""&&a.has(r)});return d.jsx(wj,{...e,extras:{crop:t,pick:l,ownerUpload:c.upload,ownerPreview:c.previewUrl}})}function vj(e){return e.kind==="image"?d.jsx(vU,{...e}):d.jsx(xj,{...e,crop:null})}function vU(e){return d.jsx(xj,{...e,crop:bj(e.props)})}function xj({kind:e,model:t,props:a,onOpen:r,crop:l}){const{slot:c,value:u,propertyId:m,required:p}=a,g=In(e),b=g.usePreview(u,m),v=Id(c,dl(a)),k=ef(c,{table:dl(a)}),w=Qy(a.factPath,g.fileIdOf(u));return d.jsx(kU,{kind:e,offer:v.kind,noun:g.noun,label:c.label,emptyName:k===null?c.label:J_(k).label,preview:b,empty:t.isEmpty(u),crop:l,processing:w,attention:nr(t,c,u,p??!1),onOpen:r})}function wj({kind:e,face:t,model:a,props:r,extras:l,open:c}){var se,ke;const{slot:u,value:m,onChange:p,propertyId:g,onUpload:b,required:v}=r,{crop:k,pick:w,ownerUpload:j,ownerPreview:E}=l,_=In(e),C=_.usePreview(m,g),O=E?{...C,src:E}:C,A=b!==void 0?{kind:"owned"}:Id(u,dl(r)),D=a.isEmpty(m),R=nr(a,u,m,v??!1),F=Qy(r.factPath,_.fileIdOf(m))||((k==null?void 0:k.recropping)??!1),[L,T]=x.useState(!1),H=b??j??void 0,ne=xU(H,(z,ce)=>c?c.onUploaded(z,ce):p(_.fromUploaded(z,m))),Y=x.useRef(null),le=c?c.accept:Py[e]??void 0,K=c&&D?c.noun:_.noun,X=((ke=(se=ef(u,{table:dl(r)}))==null?void 0:se.choose)==null?void 0:ke.label)??Ps("Choose",K),ue=(c==null?void 0:c.takes)??_.takes,M=A.kind==="owned"&&H!==void 0,V=(z,ce)=>{c?c.onPicked(z):w?w(z,ce,A.kind==="picked"?A.filter.from:void 0):p(_.fromPicked(z,m))},te=ne,me=M&&ue.includes("file"),Q=M&&ue.includes("link"),N=Ps("Upload",K),q=__({accept:me?le??"":null,onFiles:([z])=>{z&&te.takeFile(z)},...Q?{onLink:te.takeLink,...c?{}:{linkKinds:[e]}}:{},disabled:te.busy},N,Y,!1),I=me||Q,P=A.kind==="picked"?[{label:X,glyph:"choose",run:()=>T(!0)}]:I?[{label:N,glyph:"upload",run:q.start}]:[],ee=k!=null&&k.offered&&!D&&O.src?k.open:null,pe=D?null:()=>p(_.cleared);return d.jsxs("div",{ref:Y,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":A.kind,children:[d.jsx(wU,{scale:t==="expanded"?"card":"compact",kind:e,noun:K,label:u.label,preview:O,empty:D,crop:k,sources:P,onCrop:ee,onRemove:pe,drop:me?te.takeFile:null,link:Q?te.takeLink:null,busy:te.busy,processing:F,attention:R}),te.error&&d.jsx("p",{className:wl,children:te.error}),q.node,L&&A.kind==="picked"&&d.jsx(Wy,{propertyId:g,children:z=>d.jsx(yc,{mode:"single",propertyId:g,filter:A.filter,currentId:_.fileIdOf(m)||void 0,onClose:()=>T(!1),onPick:ce=>V(ce,z)})}),k==null?void 0:k.modal(E)]})}function xU(e,t){const[a,r]=x.useState(!1),[l,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:l,takeFile:m=>u({file:m}),takeLink:m=>u({link:m})}}function kj({kind:e,preview:t,size:a}){var r,l;return e==="document"?d.jsx(eU,{glyph:((r=t.attachment)==null?void 0:r.glyph)??"doc",extension:((l=t.attachment)==null?void 0:l.extension)??"",size:a}):e==="video"||e==="tour"?d.jsx(Z7,{kind:e,size:a}):d.jsx(Rt.up,{})}function wU({scale:e,kind:t,noun:a,label:r,preview:l,empty:c,crop:u,sources:m,onCrop:p,onRemove:g,drop:b,link:v,busy:k,processing:w,attention:j}){const[E,_]=x.useState(!1),[C,O]=x.useState(""),A=Dy(u,l.src),D=b?{over:E,handlers:{onDragOver:F=>{F.preventDefault(),_(!0)},onDragLeave:F=>{F.currentTarget.contains(F.relatedTarget)||_(!1)},onDrop:F=>{var T;F.preventDefault(),_(!1);const L=(T=F.dataTransfer.files)==null?void 0:T[0];L&&b(L)}}}:null,R=[];if(p&&R.push({label:"Crop",glyph:"crop",onSelect:p}),!k)for(const F of m)R.push({label:F.label,glyph:F.glyph,onSelect:F.run,foot:!0});return g&&R.push({label:"Remove",glyph:"trash",onSelect:g,danger:!0}),c?d.jsxs(ak,{kind:t,name:`No ${a}`,empty:!0,scale:e,actions:R,attention:j,drop:D,children:[d.jsx("span",{className:"text-ink-4",children:d.jsx(kj,{kind:t,preview:l,size:24})}),(k||b)&&d.jsx("span",{className:hU,children:k?"Uploading…":E?`Drop to add this ${a}`:"Drop a file here"}),v&&d.jsxs("form",{className:pU,onSubmit:F=>{F.preventDefault(),C.trim()&&v(C.trim()),O("")},children:[d.jsx("input",{className:gU,value:C,onChange:F=>O(F.target.value),placeholder:`Paste a ${a} link`,"aria-label":`${r} link`}),d.jsxs("button",{type:"submit",className:mU,disabled:k||!C.trim(),children:[d.jsx(Rt.link,{})," Add"]})]})]}):d.jsx(ak,{kind:t,name:l.name??`Untitled ${a}`,empty:!1,scale:e,actions:R,attention:j,drop:D,children:d.jsx(Sj,{kind:t,src:A,preview:l,dimmed:k||w,children:k?d.jsx(ny,{label:"Uploading…"}):w&&d.jsx(eb,{})})})}function eb(){return d.jsx(ny,{label:"Processing…"})}function kU({kind:e,offer:t,noun:a,label:r,emptyName:l,preview:c,empty:u,crop:m,processing:p,attention:g,onOpen:b}){const v=jl(),k=Dy(m,c.src),w=e==="image"?null:c.name??(u?null:`Untitled ${a}`),j=k?d.jsx("img",{className:"absolute inset-0 size-full object-cover object-top",src:k,alt:"",draggable:!1,style:p?gE:void 0}):u?d.jsx(Rt.plus,{}):d.jsx(kj,{kind:e,preview:c,size:16});return d.jsxs("button",{type:"button",className:yU,"data-media-summary":"","data-media-kind":e,"data-media-offer":t,"data-empty":u?"":void 0,...Sl(g,v),"aria-label":u?l:`${r}: ${w??a}`,disabled:b===void 0,onClick:b,children:[j,p&&d.jsx(eb,{})]})}const SU="block size-full object-cover object-top",EU="flex size-full items-center justify-center bg-canvas",_U="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",jU="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 Sj({kind:e,src:t,preview:a,dimmed:r,children:l}){return d.jsxs(d.Fragment,{children:[t?d.jsx("img",{className:SU,src:t,alt:"",draggable:!1,style:r?gE:void 0}):d.jsx("span",{className:EU,children:d.jsx(Gr,{kind:e,size:"logo",decorative:!0,...e==="document"&&a.attachment?{glyph:a.attachment.glyph}:{}})}),e==="video"&&t&&d.jsx("span",{className:jU,children:d.jsx(it,{name:"play",size:14})}),l,a.detail&&d.jsx("span",{className:_U,children:a.detail})]})}function tb({kind:e,value:t,propertyId:a,frame:r,holderPath:l}){const c=In(e),u=c.usePreview(t,a),m=Qy(l,c.fileIdOf(t)),{chrome:p,crop:g,beneath:b}=r,v=Dy(g,u.src),k=(g==null?void 0:g.cropping)??!1,w=u.name??(c.fileIdOf(t)?`Untitled ${c.noun}`:`No ${c.noun}`);return d.jsx(_$,{kind:e,name:w,chrome:p,thumb:d.jsx(Sj,{kind:e,src:v,preview:u,dimmed:k||m,children:k?d.jsx(ny,{}):m&&d.jsx(eb,{})}),below:g&&d.jsx(Gz,{storeKey:g.storeKey}),beneath:b})}function rf(e,t){function a(l){return d.jsx(ok,{kind:e,face:"expanded",model:t.model,props:l})}a.displayName=`MediaExpandedFace(${e})`;function r(l){return d.jsx(ok,{kind:e,face:"compact",model:t.model,props:l})}return r.displayName=`MediaCompactFace(${e})`,{model:t.model,faces:{expanded:a,compact:r},applyOptimistic:t.applyOptimistic}}function OU(e,t){const a=El(t).get(e);return a===void 0?null:a.kind}function nb(e,t,a){const r=OU((e==null?void 0:e.kind)===void 0?(e==null?void 0:e.file)??"":"",a);return(e==null?void 0:e.kind)??r??t[0]??"image"}function of(e,t){return t===null||In(e).fileIdOf(t)===""?null:{...t,kind:e}}function lk(e,t,a,r){const l=In(e),c=t===e?a:l.cleared;return of(e,r(l,c))}function AU(e){const t=e.map(a=>Py[a]).filter(a=>a!==null);return{takes:gc(e),accept:t.length>0?t.join(","):void 0}}function Ju(e){return"file"in e?Q2(e.file.type):X2(e.link)}function NU(e){const{kind:t}=e;return of(t,In(t).fromPicked(e,In(t).cleared))}function MU(e,t,a,r){return{noun:e.length===1?In(t).noun:"media",...AU(e),onPicked:l=>r(lk(l.kind,t,a,(c,u)=>c.fromPicked(l,u))),onUploaded:(l,c)=>{const u=Ju(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(lk(u,t,a,(m,p)=>m.fromUploaded(l,p)))}}}function sk({face:e,models:t,props:a}){const r=Ba(a.slot),l=nb(a.value,r,a.propertyId);return d.jsx(CU,{kind:l,kinds:r,face:e,models:t,props:a},l)}function Ej(e,t,a){const r=a.value===null?In(e).cleared:t.coerce(a.value);return{...a,value:r,onChange:l=>a.onChange(of(e,l))}}function CU({kind:e,kinds:t,face:a,models:r,props:l}){const c=r[e],u=Ej(e,c,l);return d.jsx(yj,{kind:e,face:a,model:c,props:u,open:MU(t,e,u.value,l.onChange)})}function RU({models:e,props:t,onOpen:a}){const r=nb(t.value,Ba(t.slot),t.propertyId);return d.jsx(TU,{kind:r,models:e,props:t,onOpen:a},r)}function TU({kind:e,models:t,props:a,onOpen:r}){const l=t[e];return d.jsx(vj,{kind:e,model:l,onOpen:r,props:Ej(e,l,a)})}function DU(e){function t(r){return d.jsx(sk,{face:"expanded",models:e.models(),props:r})}function a(r){return d.jsx(sk,{face:"compact",models:e.models(),props:r})}return{model:e.model,faces:{expanded:t,compact:a},applyOptimistic:null}}function LU(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 _j(e){if(e&&typeof e=="object"){const t=e,a=ow(t.crop),r=sl(e);return{file:Qi(t)??"",url:typeof t.url=="string"?t.url:"",alt:typeof t.alt=="string"?t.alt:"",crop:a??void 0,ar:typeof t.ar=="number"?t.ar:void 0,mobile:t.mobile&&typeof t.mobile=="object"&&ow(t.mobile.crop)!==null?t.mobile:void 0,...t.renditions&&typeof t.renditions=="object"?{renditions:t.renditions}:{},...r===void 0?{}:{picked:r},...typeof t.name=="string"||t.name===null?{name:t.name}:{}}}return{file:"",url:"",alt:""}}const jj=rf("image",{model:{defaultValue:{file:"",url:"",alt:""},coerce:_j,isEmpty:e=>e.file===""&&e.url==="",isInvalid:()=>!1},applyOptimistic:LU});function zU(e,t){const a=e.matches("img")?e:e.querySelector("img");a&&t.poster&&a.setAttribute("src",t.poster)}function Oj(e){if(e&&typeof e=="object"){const t=e;return{file:Qi(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}:{},...sl(e)===void 0?{}:{picked:sl(e)}}}return{file:"",url:"",poster:"",alt:""}}const Aj=rf("tour",{model:{defaultValue:{file:"",url:"",poster:"",alt:""},coerce:Oj,isEmpty:e=>e.file===""&&e.url==="",isInvalid:()=>!1},applyOptimistic:zU});function Nj({engine:e,lens:t,propertyId:a,instanceId:r,slotId:l,cropCfg:c}){const{api:u}=Wt(),m=El(a),{rows:p}=e,[g,b]=x.useState(null),v=C=>`${a}:${r}:${l}:${C}`,k=C=>t.get(C.value),w=LE(a,p.map(C=>{const O=k(C);return O===null?null:Zp(O,c)}),u.getCropDerivativeUrl),j=(C,O)=>{const A=g;b(null),A&&(!O.mobile&&pj(C,O.rect)||e.updateValue(A,D=>{const R=t.get(D);if(R===null||!R.file)return D;const F=gj(R,O);return F===null?D:t.set(D,F)}))},E=()=>{var D;const C=g?p.find(R=>R.key===g):null,O=C?k(C):null;if(!C||!O)return null;const A=mj(m,O,c.mode);return A.src?d.jsx(ey,{chrome:Hy,src:A.src,mode:c.mode,aspect:c.aspect,aspectLabel:c.aspectLabel,mobileAspect:c.mobileAspect,seed:{rect:A.seed},mobileSeed:{rect:ol((D=O.mobile)==null?void 0:D.crop)},onApply:R=>j(A,R),onClose:()=>b(null)}):null},_=C=>{const O=k(C);return O===null?null:Zp(O,c)};return{keyOf:v,cutOf:_,derivativeOf:C=>{const O=_(C);return O?w.get(O):void 0},open:b,modal:E}}function ck(e,t){return e.matches(t)?e:e.querySelector(t)}function $U(e,t){const a=ck(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=ck(e,"img");r&&t.poster&&r.setAttribute("src",t.poster)}function Mj(e){if(e&&typeof e=="object"){const t=e;return{file:Qi(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}:{},...sl(e)===void 0?{}:{picked:sl(e)}}}return{file:"",url:"",poster:"",alt:""}}const Cj=rf("video",{model:{defaultValue:{file:"",url:"",poster:"",alt:""},coerce:Mj,isEmpty:e=>e.file===""&&e.url==="",isInvalid:()=>!1},applyOptimistic:$U});function UU(e,t){switch(e){case"image":return t.map(_j);case"video":return t.map(Mj);case"tour":return t.map(Oj);case"document":return Yz(t)}}function IU(e){return{get:t=>e==="image"?t:null,set:(t,a)=>a}}function HU({kind:e,label:t,itemSlot:a,offer:r,verbs:l,fixed:c,instanceId:u,slotId:m,ownerSlotId:p=m,value:g,propertyId:b,commit:v,onUpload:k,factPath:w,size:j}){const E=In(e),_=Qg(a),C=x.useMemo(()=>UU(e,g),[e,g]),[O,A]=x.useState(!1),D=tr({items:C,fixed:c,axis:"xy",commit:v}),{rows:R}=D,F=x.useMemo(()=>IU(e),[e]),L=Nj({engine:D,lens:F,propertyId:b,instanceId:u,slotId:m,cropCfg:_}),T=hj(b,e),H=Zy(a,{propertyId:b,instanceId:u,slotId:p}),ne=k??H??void 0,Y=Rj(ne,me=>D.add(E.fromUploaded(me,E.cleared))),le=r.kind==="owned"&&ne!==void 0,K=(me,Q)=>e==="image"?By(me,E.cleared,Q,_,r.kind==="picked"?r.filter.from:void 0):E.fromPicked(me,E.cleared),X=(me,Q)=>{D.replace(_l(R,me,E.fileIdOf,N=>K(N,Q),D.mint))},{add:ue,onAdd:M,choose:V}=My(l,r.kind==="picked"?()=>A(!0):null,r.kind==="owned"&&le?ib([e],Y):null),te=Y.error;return d.jsxs(Cy,{engine:D,label:t,noun:E.noun,size:j,onAdd:M,add:ue,choose:V,renderTile:(me,Q,N)=>d.jsx(tb,{kind:e,value:me.value,propertyId:b,holderPath:w,frame:{chrome:N,crop:e==="image"?{cfg:_,cut:L.cutOf(me),derivativeUrl:L.derivativeOf(me),cropping:T.recropping(Rs(w,E.fileIdOf(me.value))),storeKey:L.keyOf(me.key)}:null}}),tileActions:me=>e==="image"&&T.offers(Rs(w,E.fileIdOf(me.value)))?[{label:"Crop",glyph:"crop",onSelect:()=>T.framing?L.open(me.key):T.recrop(Rs(w,E.fileIdOf(me.value)),L.keyOf(me.key))}]:[],children:[te&&d.jsx("p",{className:wl,children:te}),O&&r.kind==="picked"&&d.jsx(Wy,{propertyId:b,children:me=>d.jsx(yc,{mode:"multi",propertyId:b,filter:r.filter,selectedIds:R.map(Q=>E.fileIdOf(Q.value)),onChange:Q=>X(Q,me),onClose:()=>A(!1)})}),T.framing&&L.modal(),T.modal]})}function Rj(e,t){const[a,r]=x.useState(!1),[l,c]=x.useState(null);return{busy:a,error:l,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 ib(e,t){const a=Sg(e);return{accept:Vy(e),onFiles:r=>t.take(r.map(l=>({file:l}))),...a.length>0?{onLink:r=>t.take([{link:r}]),linkKinds:a}:{},disabled:t.busy}}const uk="label";function ed(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function lf(e){var c;const t=ed(e);if((t==null?void 0:t.type)!=="object")return null;const a=ed(t.fields);if(a===null)return null;const r=(c=ed(t.label))==null?void 0:c.field,l=t.item_order;return{...typeof r=="string"?{labelField:r}:{},fields:a,...Array.isArray(l)?{item_order:l.filter(u=>typeof u=="string")}:{}}}function Va(e){return lf(e.element)}function Ol(e){const{fields:t}=e,a=e.item_order;if(!a||a.length===0)return Object.entries(t);const r=new Set,l=[];for(const c of a)c in t&&!r.has(c)&&(r.add(c),l.push([c,t[c]]));for(const[c,u]of Object.entries(t))r.has(c)||l.push([c,u]);return l}function fl(e,t){return e.labelField!==void 0&&e.fields[e.labelField]?{kind:"field",field:e.labelField}:e.fields[uk]?{kind:"field",field:uk}:{kind:"text",text:t}}function sf(e,t,a){var u;if(e.kind==="text")return e.text;const r=(u=ed(a))==null?void 0:u[e.field],l=t.fields[e.field];if((l==null?void 0:l.type)==="address"){const m=xi(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((l==null?void 0:l.type)!=="select")return c;for(const m of l.values??[])if(typeof m!="string"&&m.value===c)return m.label;return c}function BU(e){const t=Va(e);return t?Ol(t):[]}function qU(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 Ho(e){const t={};for(const[a,r]of e)t[a]=qU(r);return t}const FU=["street","unit","city","state","postal"],Tj={street:null,unit:null,city:null,state:null,postal:null,latitude:null,longitude:null,source:null};function PU(e,t){const a=e??Tj,r=xi({...a,...t}),l=FU.filter(c=>((r==null?void 0:r[c])??null)!==a[c]);return l.length===0?e:l.every(c=>c==="unit")?r:r===null?null:xi({...r,latitude:null,longitude:null,source:null})}function dk(e,t,a){return PU(e,{[t]:a})}function VU(e){return xi({...e,source:"autocomplete"})}function GU(e,t){return xi({...e??Tj,...t,source:"manual_pinned"})}function Dj(e){return e!==null&&e.latitude!==null&&e.longitude!==null}function Lj(e){return e!==null&&!Dj(e)}function KU(e,t,a){const r=a===void 0||a.size===0?t!=="unit":a.has(t);return e!==null&&r&&e[t]===null}function YU(e){return Lj(e)||(e==null?void 0:e.source)==="manual_pinned"}const zj={defaultValue:null,coerce:xi,isEmpty:e=>e===null,isInvalid:()=>!1},Wp=[{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 Pu(e){const t=e.trim().toLowerCase();if(t==="")return[...Wp];const a=r=>{const l=r.name.toLowerCase();return r.code.toLowerCase()===t||l===t?0:l.startsWith(t)?1:l.includes(` ${t}`)?2:l.includes(t)?3:-1};return Wp.map(r=>({state:r,rank:a(r)})).filter(({rank:r})=>r>=0).sort((r,l)=>r.rank-l.rank).map(({state:r})=>r)}function QU(e){const t=e.trim().toLowerCase();return t===""?null:Wp.find(a=>a.code.toLowerCase()===t||a.name.toLowerCase()===t)??null}const XU="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)]",ZU=ae(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"),WU="ml-auto text-caption font-medium text-ink-4",JU=4,e9=280,fk=220;function t9({value:e,onCommit:t,ariaLabel:a,placeholder:r,shellClassName:l,attention:c,inputClassName:u}){const m=e??"",[p,g]=x.useState(null),[b,v]=x.useState(0),[k,w]=x.useState(null),j=x.useId(),E=x.useRef(null),_=x.useRef(null),C=p!==null,O=C&&p!==m,A=Pu(O?p:""),D=x.useCallback(()=>{E.current&&w(Br(E.current))},[]);x.useEffect(()=>{if(C)return window.addEventListener("scroll",D,!0),window.addEventListener("resize",D),()=>{window.removeEventListener("scroll",D,!0),window.removeEventListener("resize",D)}},[C,D]),x.useEffect(()=>{var Y,le;(le=(Y=_.current)==null?void 0:Y.querySelector('[data-active="true"]'))==null||le.scrollIntoView({block:"nearest"})},[b,C]);function R(){D(),g(m);const Y=Pu("").findIndex(le=>le.code===m);v(Math.max(0,Y))}function F(){g(null),w(null)}function L(Y){F(),Y!==e&&t(Y)}function T(Y){if(Y===m)return F();if(Y.trim()==="")return L(null);const le=QU(Y);if(le)return L(le.code);const K=Pu(Y);if(K.length===1)return L(K[0].code);F()}function H(Y){if(!C){(Y.key==="ArrowDown"||Y.key==="ArrowUp")&&(Y.preventDefault(),R());return}switch(Y.key){case"ArrowDown":Y.preventDefault(),v(le=>Math.min(A.length-1,le+1));return;case"ArrowUp":Y.preventDefault(),v(le=>Math.max(0,le-1));return;case"Enter":{Y.preventDefault(),Y.stopPropagation();const le=A[b];le?L(le.code):T(p);return}case"Tab":{const le=O?A[b]:void 0;le?L(le.code):T(p);return}case"Escape":Y.preventDefault(),F();return}}const ne=k?ml(k,{maxHeight:e9,minWidth:fk,gap:JU}):null;return d.jsxs("div",{className:l,ref:E,...c,children:[d.jsx("input",{className:u,type:"text",role:"combobox","aria-label":a,"aria-expanded":C,"aria-controls":j,"aria-autocomplete":"list",autoComplete:"address-level1",placeholder:r,value:C?p:m,onFocus:Y=>{R(),Y.currentTarget.select()},onChange:Y=>{C||D(),g(Y.target.value),v(0)},onKeyDown:H,onBlur:()=>{C&&T(p)}}),C&&ne&&A.length>0&&typeof document<"u"&&Wi.createPortal(d.jsx("div",{ref:_,id:j,role:"listbox","aria-label":`${a} options`,className:XU,style:{left:ne.left,top:ne.top,bottom:ne.bottom,maxHeight:ne.maxHeight,minWidth:Math.max(ne.width,fk),zIndex:Fa},children:A.map((Y,le)=>d.jsxs("button",{type:"button",role:"option",tabIndex:-1,"aria-selected":Y.code===m,"data-active":le===b,"data-state-option":Y.code,className:ZU,onMouseEnter:()=>v(le),onMouseDown:K=>{K.preventDefault(),L(Y.code)},children:[d.jsx("span",{className:"truncate",children:Y.name}),d.jsx("span",{className:WU,children:Y.code})]},Y.code))}),document.body)]})}const n9=x.createContext(null);function $j(e){const t=x.useContext(n9);return t!==null&&e!==void 0&&t.factPath===e?t.fields:void 0}const i9={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"}},a9={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}},r9=250,o9=2e3;function l9(e){const t=YU(e),[a,r]=x.useState(!1),[l,c]=x.useState(t);!a&&l!==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]),g=x.useCallback(()=>{m(),r(!0),u.current=setTimeout(()=>{u.current=null,r(!1)},o9)},[m]);return{show:a?l:t,hold:g,settle:p}}function s9(){const[e,t]=x.useState({});return{shown:(a,r)=>e[a]??r,type:(a,r)=>t(l=>({...l,[a]:r})),settle:a=>t(({[a]:r,...l})=>l),settleAll:()=>t({})}}function c9(e){const t=Wt().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 u9({value:e,onPin:t,place:a}){const r=Wt().address;if(!r)return null;const l=Dj(e)?{latitude:e.latitude,longitude:e.longitude}:null;return d.jsx(r.PinMap,{pin:l,postal:(e==null?void 0:e.postal)??null,place:a,onPin:t})}function d9({value:e,show:t,onChange:a,place:r}){const[l,c]=x.useState(t);return t&&!l&&c(!0),x.useEffect(()=>{if(t)return;const u=setTimeout(()=>c(!1),r9);return()=>clearTimeout(u)},[t]),l?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(u9,{value:e,onPin:u=>a(GU(e,u)),place:r})})})}):null}function f9({value:e,onChange:t,place:a,fields:r,hold:l}){const c=s9(),u=jl(),m=T_(a),p=a9[a],g=ae(m.inner,"w-full"),b=v=>{const k=i9[v],w=Sl(KU(e,v,r==null?void 0:r.required)?"required":null,u),j=p.labelled?k.placeholder:k.panelPlaceholder,E=(e==null?void 0:e[v])??"",_=v==="postal"?jg(E):E,C=A=>{c.type(v,A),l.hold(),t(dk(e,v,A))};let O;return v==="street"?O=d.jsx("div",{className:m.shell,...w,children:d.jsx(c9,{className:g,value:c.shown(v,_),placeholder:j,ariaLabel:k.label,onChange:C,onPick:A=>{c.settleAll(),l.settle(),t(VU(A))},onBlur:()=>c.settle(v)})}):v==="state"?O=d.jsx(t9,{value:(e==null?void 0:e.state)??null,onCommit:A=>{l.hold(),t(dk(e,"state",A??""))},ariaLabel:k.label,placeholder:j,shellClassName:m.shell,attention:w,inputClassName:g}):O=d.jsx("div",{className:m.shell,...w,children:d.jsx("input",{className:g,type:"text",value:c.shown(v,_),placeholder:j,"aria-label":k.label,autoComplete:"off",inputMode:v==="postal"?"numeric":void 0,maxLength:v==="postal"?10:void 0,onChange:A=>C(A.target.value),onBlur:()=>c.settle(v)})}),d.jsxs("label",{className:ae(m.frame,"min-w-0",p.span[v]),children:[p.labelled&&d.jsx("span",{className:KE,children:k.label}),O]},v)};return d.jsx("div",{className:p.grid,children:h9.filter(v=>r===void 0||r.used.has(v)).map(b)})}const h9=["street","unit","city","state","postal"];function m9(e){return e===void 0||e.used.has("latitude")||e.used.has("longitude")}function Uj({slot:e,value:t,onChange:a,factPath:r,place:l}){const c=$j(r)??void 0,u=l9(t),m=g=>{g.relatedTarget instanceof Node&&g.currentTarget.contains(g.relatedTarget)||u.settle()},p=g=>{u.settle(),a(g)};return d.jsxs("div",{className:"flex flex-col",role:"group","aria-label":e.label,onBlur:m,children:[d.jsx(f9,{value:t,onChange:a,place:l,fields:c,hold:u}),m9(c)&&d.jsx(d9,{value:t,show:u.show,onChange:p,place:l})]})}function p9(e){return d.jsx(Uj,{...e,place:"page"})}function g9(e){return d.jsx(Uj,{...e,place:"panel"})}const y9={model:zj,faces:{expanded:p9,compact:g9},applyOptimistic:null},hk=["January","February","March","April","May","June","July","August","September","October","November","December"],b9=["Su","Mo","Tu","We","Th","Fr","Sa"],mk=e=>String(e).padStart(2,"0");function Ij(e,t,a){return`${String(e).padStart(4,"0")}-${mk(t+1)}-${mk(a)}`}function v9(e=new Date){return Ij(e.getFullYear(),e.getMonth(),e.getDate())}function pk(e){return{year:Number(e.slice(0,4)),month:Number(e.slice(5,7))-1}}function x9(e,t){const a=e.year*12+e.month+t;return{year:Math.floor(a/12),month:(a%12+12)%12}}function w9(e){const t=new Date(Date.UTC(e.year,e.month,1)).getUTCDay();return Array.from({length:42},(a,r)=>{const l=new Date(Date.UTC(e.year,e.month,1+r-t));return{iso:Ij(l.getUTCFullYear(),l.getUTCMonth(),l.getUTCDate()),inMonth:l.getUTCMonth()===e.month,day:l.getUTCDate()}})}const k9="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)]",gk=ae(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"),S9=ae(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"),Hj=ae(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"),yk=ae(Hj,"h-[calc(40*var(--content))]"),bk=12,E9=4,_9=4;function j9({anchorRef:e,ownerRef:t,value:a,label:r,onPick:l,onClose:c}){const[u,m]=x.useState(()=>pk(a??v9())),[p,g]=x.useState("days"),[b,v]=x.useState(0),[k,w]=x.useState(null),j=x.useRef(null),[E,_]=x.useState(a);a!==E&&(_(a),a!==null&&m(pk(a))),x.useLayoutEffect(()=>{const R=()=>{const F=e.current,L=j.current;!F||!L||w(ml(Br(F),{height:L.offsetHeight,minWidth:L.offsetWidth,gap:_9}))};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=T=>{var ne,Y;const H=T.target;(ne=j.current)!=null&&ne.contains(H)||(Y=t.current)!=null&&Y.contains(H)||c()},F=()=>c(),L=T=>{T.key!=="Escape"||T.defaultPrevented||(T.preventDefault(),c())};return document.addEventListener("pointerdown",R,!0),document.addEventListener("keydown",L),window.addEventListener("blur",F),()=>{document.removeEventListener("pointerdown",R,!0),document.removeEventListener("keydown",L),window.removeEventListener("blur",F)}},[t,c]);const C=R=>{R==="years"&&v(u.year-E9),g(p===R?"days":R)},O=R=>{p==="years"?v(b+R*bk):m(x9(u,R))},A=p==="years"?"years":"month",D=(R,F,L)=>d.jsxs("button",{type:"button",className:S9,"aria-label":L,"aria-expanded":p===R,"data-open":p===R,onClick:()=>C(R),children:[F,d.jsx("span",{className:ae("text-ink-4 transition-transform",p===R&&"rotate-180"),children:d.jsx(Rt.chevD,{})})]});return Wi.createPortal(d.jsxs("div",{ref:j,role:"dialog","aria-label":`${r} calendar`,className:k9,style:{left:(k==null?void 0:k.left)??0,top:k?k.top:0,bottom:k==null?void 0:k.bottom,visibility:k?void 0:"hidden",zIndex:Fa},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:[D("months",hk[u.month]??"","Choose month"),D("years",String(u.year),"Choose year")]}),p!=="months"&&d.jsxs("div",{className:"flex items-center",children:[d.jsx("button",{type:"button",className:gk,"aria-label":`Previous ${A}`,onClick:()=>O(-1),children:d.jsx(Rt.chevL,{})}),d.jsx("button",{type:"button",className:gk,"aria-label":`Next ${A}`,onClick:()=>O(1),children:d.jsx(Rt.chevR,{})})]})]}),p==="days"?d.jsxs("div",{className:"grid grid-cols-7 gap-0.5",children:[b9.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)),w9(u).map(R=>d.jsx("button",{type:"button",className:Hj,"aria-label":R.iso,"aria-pressed":R.iso===a,"data-outside":!R.inMonth,"data-selected":R.iso===a,onClick:()=>l(R.iso),children:R.day},R.iso))]}):p==="months"?d.jsx("div",{className:"grid grid-cols-3 gap-1",children:hk.map((R,F)=>d.jsx("button",{type:"button",className:yk,"aria-pressed":F===u.month,"data-selected":F===u.month,onClick:()=>{m({year:u.year,month:F}),g("days")},children:R.slice(0,3)},R))}):d.jsx("div",{className:"grid grid-cols-3 gap-1",children:Array.from({length:bk},(R,F)=>b+F).map(R=>d.jsx("button",{type:"button",className:yk,"aria-pressed":R===u.year,"data-selected":R===u.year,onClick:()=>{m({year:R,month:u.month}),g("days")},children:R},R))})]}),document.body)}const Bj={defaultValue:null,coerce:e=>typeof e=="string"&&e!==""?e:null,isEmpty:e=>e===null,isInvalid:e=>!Z2(e)};function vk({slot:e,value:t,onChange:a,required:r=!1}){const[l,c]=x.useState(!1),[u,m]=x.useState(!1),p=x.useRef(null),g=x.useRef(null),b=x.useRef(null),v=l||t!==null,k=nr(Bj,e,t,r),w=ir(),j=t!==null&&Z2(t)?t:null;x.useEffect(()=>{var C;l&&((C=p.current)==null||C.focus())},[l]);const E=x.useCallback(()=>{var C;m(!1),document.activeElement!==p.current&&((C=p.current)==null?void 0:C.value)===""&&c(!1)},[]),_=v?d.jsxs(Kr,{attention:k,className:u?"border-accent":void 0,ref:b,children:[d.jsx("input",{ref:p,className:ae(w.inner,"[font-variant-numeric:tabular-nums] [&::-webkit-calendar-picker-indicator]:hidden"),type:"date","aria-label":e.label,"aria-invalid":k==="invalid"||void 0,value:j??"",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:ae(QE,w.adornEnd),children:d.jsx("button",{type:"button",className:ae(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?E():m(!0),children:d.jsx(Rt.calendar,{})})})]}):d.jsx(Kr,{attention:k,children:d.jsx("button",{type:"button",className:ae(vt,w.inner,"cursor-pointer text-left text-ink-4"),"aria-label":e.label,onClick:()=>{c(!0),m(!0)},children:"None"})});return d.jsxs("div",{className:w.frame,ref:g,children:[_,v&&u&&d.jsx(j9,{anchorRef:b,ownerRef:g,value:j,label:e.label,onPick:C=>{var O;a(C),m(!1),(O=p.current)==null||O.focus()},onClose:E}),d.jsx(D_,{attention:k,message:"Not a real date. Pick one"})]})}const O9={model:Bj,faces:{expanded:vk,compact:vk},applyOptimistic:null},qj=rf("document",{model:{defaultValue:{file:""},coerce:N_,isEmpty:e=>e===null||e.file==="",isInvalid:()=>!1},applyOptimistic:null}),A9="data-slot-id",xk="data-slot-text-leaf",N9="data-slot-group",M9="data-slot-item",C9="data-slot-field",R9="data-slot-unselectable",cf="data-section-instance-id";function Fj(e,t){const a=[];e.hasAttribute(xk)&&a.push(e),a.push(...Array.from(e.querySelectorAll(`[${xk}]`))),a.length!==0&&a.forEach(r=>{T9(r,t)})}function T9(e,t){const a=e.ownerDocument,r=[];t.split(`
|
|
1257
|
-
`).forEach((l,c)=>{c>0&&r.push(a.createElement("br")),r.push(a.createTextNode(l))}),e.replaceChildren(...r)}function bc(e){return typeof e=="string"?e:e==null?"":typeof e=="number"||typeof e=="boolean"?String(e):""}function D9(e){const[t,a]=x.useState(e),[r,l]=x.useState(e);return e!==r&&(l(e),a(e)),[t,a]}function ab({kind:e,slot:t,value:a,onChange:r,required:l=!1}){var k;const c=a??"",[u,m]=D9(c),p=nr(e.model,t,u,l),g=e.invalidMessage(u,t),b=w=>{if(!e.model.isEmpty(w)&&e.model.isInvalid(w,t))return;const E=e.model.isEmpty(w)?"":e.normalize(w);m(E),E!==c&&r(E)},v=ir();return d.jsxs("div",{className:v.frame,children:[d.jsxs(Kr,{attention:p,children:[d.jsx("input",{className:v.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":v.inline&&p==="invalid"?g:void 0,onChange:w=>m(w.target.value),onBlur:w=>b(w.target.value)}),!v.inline&&((k=e.adornment)==null?void 0:k.call(e,u))]}),d.jsx(D_,{attention:p,message:g})]})}const Pj={model:{defaultValue:"",coerce:bc,isEmpty:e=>e.trim()==="",isInvalid:e=>!d5(e.trim())},normalize:e=>e.trim(),invalidMessage:()=>"Not a valid email address",inputType:"email",inputMode:"email",autoComplete:"email",placeholder:"name@example.com"};function wk(e){return d.jsx(ab,{kind:Pj,...e})}const L9={model:Pj.model,faces:{expanded:wk,compact:wk},applyOptimistic:null},Vj="section";function Gj(e,t){const{itemKind:a,view:r,granularity:l}=q3(e,t,Vj),c=a==="object"||a==="annotated-media"?{kind:"record",entries:BU(e)}:{kind:"single",slot:e.element??{type:"text",label:e.label}};return{itemKind:a,view:r,granularity:l,itemContent:c,axis:r==="gallery"||r==="annotated-gallery"?"xy":"y"}}function Jp(e,t){const a=Qi(e),r=Qi(t);if(a!=null||r!=null)return a===r;if(e===t||e==null&&t==null)return!0;if(e==null||t==null)return!1;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((l,c)=>Jp(l,t[c]));if(typeof e=="object"||typeof t=="object"){if(typeof e!="object"||typeof t!="object")return!1;const l=e,c=t;return[...new Set([...Object.keys(l),...Object.keys(c)])].every(m=>Jp(l[m],c[m]))}return kk(e)===kk(t)}function kk(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"?String(e):null}function z9(e,t,a,r,l){const c=Io(m=>m.markSlotOverridden),u=!l&&!K3(e);return function(p,g){u&&c(t,a,{kind:"scalar"}),r(p.map(b=>b.value))}}function Vs(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function $9(e){var t;return((t=Vs(e.element))==null?void 0:t.type)==="row"}function U9(e,t){var r;const a=(r=Vs(e))==null?void 0:r.decisions;if(Array.isArray(a))return a.find(l=>{var u;const c=(u=Vs(l))==null?void 0:u.produces;return Array.isArray(c)&&c[0]===t})}function Kj(e,t,a){const r=Vs(t),l=V3(r).some(b=>b.verb==="pick")||$9(e),c=x4({slots:{},...a===void 0?{}:{sectionSlots:a}},e);switch(Y3(e).kind){case"table":{const b=Mg(e.source);return b===null?{kind:"owned"}:{kind:"table",table:b}}case"section":case"derived":return c.length===0?{kind:"follows"}:{kind:"follows",tables:c}}if(!l)return{kind:"owned"};const[m,...p]=c;if(m!==void 0)return{kind:"pick-row",tables:[m,...p]};const g=R5(r==null?void 0:r.of);return g===null?{kind:"owned"}:{kind:"pick-media",filter:g}}function rb(e){switch(e.kind){case"table":return[e.table];case"pick-row":return e.tables;case"follows":return e.tables??[];case"pick-media":case"owned":return[]}}function Yj(e){const t=rb(e);return t.length===1?t[0]:null}const ob="id";function Qj(e){const[t,...a]=[...new Set(e)];return t===void 0?null:[t,...a]}function lb(e){return Qj(rb(e))}const I9=()=>null;function uf(e){const t=Qj(Us(e));return t===null?{kind:"none"}:e.source===void 0?{kind:"table",tables:t}:{kind:"table",tables:t,inert:!0}}function Sk(e,t,a){const r=lb(t);if(r!==null)return{kind:"table",tables:r};const l=Vs(e.source);return t.kind==="follows"&&(l==null?void 0:l.kind)==="section"?H9(l,a):{kind:"none"}}function H9(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}))??I9}}function Ed(e,t){const a=e[t];return typeof a=="string"&&a!==""?a:null}function Xj({instanceId:e,slotId:t,membership:a,itemBaseline:r,insideRecord:l}){const c=Io(k=>k.markSlotOverridden),u=Io(k=>k.relinkSlot),m=ob,p=Yj(a)===null&&a.kind!=="follows",g=a.kind==="table"||a.kind==="follows",b=k=>Ed(k,m),v=k=>b(k.value)??(p?k.key:null);return{identityKey:m,identityOf:b,stamp:k=>p?k.map(w=>b(w.value)===null?{key:w.key,value:{...w.value,[m]:w.key}}:w):k,markerIdentity:v,markFields:(k,w)=>{if(l)return;const j=v(k);if(j===null){c(e,t,{kind:"scalar"});return}const E=r==null?void 0:r.find(_=>_[m]===j);for(const _ of Object.keys(w))_!==m&&(E!=null&&Jp(w[_],E[_])?u(e,t,{kind:"item",item_id:j,field:_}):c(e,t,{kind:"item",item_id:j,field:_}))},markRemoved:k=>{if(l||a.kind!=="table")return;const w=b(k.value);w!==null&&!af(w)&&c(e,t,{kind:"item_removed",item_id:w})},markOrder:k=>{if(l||!g||r===void 0)return;const w=k.map(O=>b(O.value)).filter(O=>O!==null),j=new Set(w),E=r.map(O=>Ed(O,m)).filter(O=>O!==null&&j.has(O)),_=new Set(E);w.filter(O=>_.has(O)).every((O,A)=>O===E[A])?u(e,t,{kind:"order"}):c(e,t,{kind:"order"})}}}async function B9(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 Zj(e,t,a){return e(`/properties/${t}/poi/${encodeURIComponent(a)}`)}async function q9(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 Wj(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 F9=0;function P9(){return`poi${++F9}${Math.random().toString(36).slice(2,6)}`}const _d=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,Ss=e=>typeof e=="string"&&e!==""?e:void 0;function V9(e){const t={},a=_d(e.rating);a!==void 0&&(t.rating=a);const r=_d(e.review_count);r!==void 0&&(t.review_count=r);const l=Ss(e.type_label);l!==void 0&&(t.type_label=l);const c=Ss(e.price_level);c!==void 0&&(t.price_level=c);const u=Ss(e.website_uri);u!==void 0&&(t.website_uri=u);const m=Ss(e.google_maps_uri);m!==void 0&&(t.google_maps_uri=m);const p=Ss(e.summary);p!==void 0&&(t.summary=p);const g=G9(e.photo);return g!==void 0&&(t.photo=g),t}function G9(e){if(!e||typeof e!="object")return;const t=e,a=_d(t.width),r=_d(t.height),l=t.attribution;if(!(a===void 0||r===void 0||typeof l!="string"))return{width:a,height:r,attribution:l}}function sb(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:P9(),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,...V9(t)}}function K9(e){return e.map(sb).filter(t=>t!==null)}function Y9(e){return[e.rating===void 0?null:`★ ${e.rating.toFixed(1)}${e.review_count===void 0?"":` (${e.review_count.toLocaleString()})`}`,e.type_label,Wj(e.distance_m),e.address].filter(Boolean).join(" · ")}const cb="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]",ub="grid w-5 flex-shrink-0 place-items-center text-ink-4",db="flex min-w-0 flex-1 flex-col gap-px",fb="truncate text-[length:calc(13.5*var(--content))] text-ink",hb="truncate text-caption text-ink-3",Q9="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",Jj="text-caption text-danger",eO="opacity-70",tO="size-[calc(14*var(--content))] flex-shrink-0 animate-[we-ml-spin_.7s_linear_infinite] rounded-full border-2 border-[#d9d5c9] border-t-accent",X9="size-[calc(26*var(--content))] flex-shrink-0 rounded-[calc(5*var(--content))] object-cover bg-[#f1f0ea]",Z9="we-no-drag flex flex-shrink-0 items-center gap-0.75",W9="flex items-center gap-0.75 opacity-0 transition-opacity duration-[120ms] group-hover/row:opacity-100",J9="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",eI=()=>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 nO(e,t){const{apiFetch:a}=Wt().api,[r,l]=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(g=>!u.current.has(g));p.length!==0&&(p.forEach(g=>u.current.add(g)),q9(a,e,p).then(g=>{l(b=>({...b,...g}))}).catch(()=>{p.forEach(g=>u.current.delete(g))}))},[c,e,a]),{urls:r,dropUrl:m=>l(p=>{if(!(m in p))return p;const g={...p};return delete g[m],g})}}function iO({row:e,photoUrl:t,onPhotoError:a,onRemove:r,dragProps:l,flashNew:c}){const u=Y9(e);return d.jsxs("div",{...l,className:ae(cb,l&&"cursor-grab hover:border-[#d9d5c9]",c&&"animate-[we-ml-rowin_.26s_cubic-bezier(.2,.7,.3,1)_both]"),children:[t?d.jsx("img",{className:X9,src:t,alt:"",draggable:!1,onError:a}):d.jsx("span",{className:ub,children:d.jsx(eI,{})}),d.jsxs("div",{className:db,children:[d.jsx("span",{className:fb,children:e.name}),u&&d.jsx("span",{className:hb,children:u})]}),r&&d.jsx("div",{className:Z9,children:d.jsx("span",{className:W9,children:d.jsx("button",{type:"button",className:ae(J9,"hover:bg-[#fbecea] hover:text-danger"),title:"Remove",onClick:r,children:d.jsx(Rt.trash,{})})})})]})}const tI="relative flex flex-col",nI="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)]",iI="grid flex-shrink-0 place-items-center text-ink-4",aI="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",rI="size-[calc(15*var(--content))] flex-shrink-0 animate-[we-ml-spin_.7s_linear_infinite] rounded-full border-2 border-[#d9d5c9] border-t-accent",oI="fixed flex flex-col overflow-hidden rounded-[calc(8*var(--content))] border border-line bg-white shadow-[0_14px_30px_-12px_rgba(20,18,13,0.28)]",lI="m-0 min-h-0 list-none overflow-y-auto p-1",sI={maxHeight:264,gap:4},cI=ae(vt,"flex w-full flex-col gap-px rounded-md px-2 py-1.75 text-left"),uI="bg-accent-soft",dI="cursor-default opacity-55",fI="flex items-center gap-1.5 truncate text-[length:calc(13.5*var(--content))] text-ink",hI="truncate text-caption text-ink-3",Xm="px-3 py-3 text-center text-[length:calc(12.5*var(--content))] text-ink-4",mI="inline-flex flex-shrink-0 items-center gap-1 text-good",pI=2,gI=300;function aO({propertyId:e,placeholder:t,addedIds:a,disabled:r=!1,disabledHint:l,onSelect:c}){const{apiFetch:u}=Wt().api,[m,p]=x.useState(""),[g,b]=x.useState([]),[v,k]=x.useState("idle"),[w,j]=x.useState(0),[E,_]=x.useState(0),C=x.useRef(0),O=x.useId(),A=x.useRef(null),D=x.useRef(null);x.useEffect(()=>{const H=m.trim();if(H.length<pI){++C.current,k("idle"),b([]);return}const ne=++C.current;k("loading");const Y=setTimeout(()=>{B9(u,e,H).then(le=>{ne===C.current&&(b(le),j(0),k(le.length?"results":"empty"))}).catch(()=>{ne===C.current&&k("error")})},gI);return()=>clearTimeout(Y)},[m,e,E,u]);function R(H){a.has(H.place_id)||(c(H),p(""),b([]),k("idle"))}function F(H){if(H.key==="Escape"){k("idle"),b([]);return}if(v==="results"){if(H.key==="ArrowDown")H.preventDefault(),j(ne=>Math.min(g.length-1,ne+1));else if(H.key==="ArrowUp")H.preventDefault(),j(ne=>Math.max(0,ne-1));else if(H.key==="Enter"){H.preventDefault();const ne=g[w];ne&&R(ne)}}}const L=v!=="idle",T=KC(L,A,sI);return d.jsxs("div",{className:tI,onBlur:H=>{var Y;const ne=H.relatedTarget;!H.currentTarget.contains(ne)&&!((Y=D.current)!=null&&Y.contains(ne))&&k("idle")},children:[d.jsxs("div",{ref:A,className:ae(nI,r&&"opacity-55"),role:"combobox","aria-expanded":L,"aria-haspopup":"listbox","aria-controls":O,children:[d.jsx("span",{className:iI,children:d.jsx(Rt.search,{})}),d.jsx("input",{className:aI,value:m,placeholder:t,disabled:r,title:r?l:void 0,onChange:H=>p(H.target.value),onKeyDown:F,"aria-label":t,"aria-autocomplete":"list","aria-activedescendant":v==="results"?`${O}-${w}`:void 0}),v==="loading"&&d.jsx("span",{className:rI})]}),L&&T&&Wi.createPortal(d.jsxs("div",{ref:D,className:oI,style:{left:T.left,top:T.top,bottom:T.bottom,width:T.width,maxHeight:T.maxHeight,zIndex:Fa},onMouseDown:H=>H.preventDefault(),children:[v==="loading"&&d.jsx("div",{className:Xm,children:"Searching…"}),v==="empty"&&d.jsxs("div",{className:Xm,children:["No places found for “",m.trim(),"”."]}),v==="error"&&d.jsxs("div",{className:Xm,children:["Couldn't reach search."," ",d.jsx("button",{type:"button",className:"font-semibold text-accent-ink underline",onClick:()=>_(H=>H+1),children:"Retry"})]}),v==="results"&&d.jsx("ul",{className:lI,role:"listbox",id:O,children:g.map((H,ne)=>{const Y=a.has(H.place_id),le=[Wj(H.distance_m),H.address].filter(Boolean).join(" · ");return d.jsx("li",{id:`${O}-${ne}`,role:"option","aria-selected":ne===w,children:d.jsxs("button",{type:"button",disabled:Y,className:ae(cI,ne===w&&!Y&&uI,Y&&dI),onMouseEnter:()=>j(ne),onClick:()=>R(H),children:[d.jsxs("span",{className:fI,children:[Y&&d.jsxs("span",{className:mI,children:[d.jsx(Rt.check,{size:12})," Added ·"]}),d.jsx("span",{className:"truncate",children:H.name})]}),le&&d.jsx("span",{className:hI,children:le})]})},H.place_id)})})]}),document.body)]})}const yI="flex flex-col gap-2.75",bI="relative flex flex-col gap-1.75",vI=400;function xI({slot:e,fixed:t,value:a,propertyId:r,commit:l}){const{apiFetch:c}=Wt().api,u=x.useMemo(()=>K9(a),[a]),[m,p]=x.useState(null),[g,b]=x.useState(null),[v,k]=x.useState({}),w=x.useRef({});x.useEffect(()=>()=>{Object.values(w.current).forEach(clearTimeout)},[]);const j=tr({items:u,identityOf:L=>L.id,fixed:t,axis:"y",commit:l}),{rows:E}=j,{urls:_,dropUrl:C}=nO(r,u);function O(L){k(T=>({...T,[L]:!0})),clearTimeout(w.current[L]),w.current[L]=setTimeout(()=>k(T=>{const H={...T};return delete H[L],H}),vI)}async function A(L){if(p(null),!!j.canAdd&&!j.latestRows().some(T=>T.value.place_id===L.place_id)){b(L);try{let T;try{T=await Zj(c,r,L.place_id)}catch{p("Couldn't add that place. Try again.");return}if(j.latestRows().some(H=>H.value.place_id===T.place_id))return;j.add(T),O(T.id)}finally{b(null)}}}const{containerRef:D,getItemProps:R}=j.drag,F=new Set(E.map(L=>L.value.place_id));return d.jsxs("div",{className:yI,role:"group","aria-label":e.label,children:[d.jsx(aO,{propertyId:r,placeholder:e.placeholder??"Search nearby…",addedIds:F,disabled:!j.canAdd,disabledHint:"Set by its source",onSelect:L=>void A(L)}),m&&d.jsx("span",{className:Jj,children:m}),(E.length>0||g)&&d.jsxs("div",{className:bI,ref:D,children:[g&&d.jsxs("div",{className:ae(cb,eO),"aria-live":"polite",children:[d.jsx("span",{className:ub,children:d.jsx("span",{className:tO})}),d.jsxs("div",{className:db,children:[d.jsx("span",{className:fb,children:g.name}),d.jsx("span",{className:hb,children:"Adding…"})]})]}),E.map(L=>d.jsx(iO,{row:L.value,photoUrl:_[L.value.place_id],onPhotoError:()=>C(L.value.place_id),onRemove:j.canRemove?()=>j.remove(L.key):void 0,dragProps:R(L.key),flashNew:v[L.value.id]===!0},L.key))]})]})}const wI={property:"this property's",library:"your"},kI={property:Wa.pages,library:bl.pages};function Es(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}function Ek(e){return Bg({from:e.from??[]}).filter(t=>t!=="")}function SI(e){var r;const t=Es(e.source);if(Mg(t)!==null)return[String(t==null?void 0:t.key)];const a=Es(e.element);if(a===null)return[];if(a.type==="row"||a.type==="media"||typeof a.type=="string"&&gl(a.type))return Ek(a);for(const l of Object.values(Es(a.fields)??{})){const c=Es(l);if(c!==null&&((r=Es(c.source))==null?void 0:r.kind)==="element")return Ek(c)}return[]}function EI(e){const t=e.indexOf("."),a=e.slice(0,t);if(a!=="property"&&a!=="library")return null;const r=kI[a],l=e.slice(t+1),c=Object.hasOwn(r,l)?r[l]:null;return c!==null&&t3(c)&&c.declaration.type==="list"?{home:a,label:f3(c)}:null}function rO(e){const t=[...new Set(SI(e))],a=t.length===1?EI(t[0]):null;return a===null?null:`From ${wI[a.home]} ${Ja(a.label).plural}`}function _I(e,t){var a;return((a=e==null?void 0:e.scalar)==null?void 0:a[t])===!0}function oO(e,t){return`${e}.${t}`}function vc(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 td(e,t){const a=vc(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 jI(e,t,a){const r=vc(t);if(r===null)return{...e,[t]:a};const l=e[r.object],c=l!==null&&typeof l=="object"&&!Array.isArray(l)?l:{};return{...e,[r.object]:{...c,[r.field]:a}}}function OI(e,t,a,r){var l,c,u;return _I(e,t)||((u=(c=(l=e==null?void 0:e.items)==null?void 0:l[t])==null?void 0:c[a])==null?void 0:u[r])===!0}function AI(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:null}const lO=e=>{var t;return(t=AI(e))==null?void 0:t.source};function NI(e,t){return Object.entries(e).flatMap(([a,r])=>{const l=dc(lO(r));return l!==null&&l.slot===t?[{key:a,member:l.field}]:[]})}function MI(e,t){var l;const a=dc(lO(e));if(a===null)return!1;const r=t.fields===void 0?{}:{siblings:t.fields};return((l=wS(t.slots??{},r,a.slot))==null?void 0:l.def.type)==="address"}function hl(e){var t;return((t=e.source)==null?void 0:t.kind)==="element"}function sO(e){return e.type==="row"}function cO(e,t,a){const r={};for(const l of NI(Object.fromEntries(e),t))Object.hasOwn(a,l.member)&&(r[l.key]=a[l.member]);return r}function mb(e,t,a,r){const l=Ho(e);for(const[c,u]of e)hl(u)&&(l[c]=a,r&&Object.assign(l,cO(e,c,r)));return l[t]=a,l}function uO(e,t,a){var c;const r=(c=t.find(([,u])=>sO(u)&&hl(u)))==null?void 0:c[0],l=r!==void 0?e[r]:void 0;return typeof l=="string"&&l!==""?l:Ed(e,a)}function jd(e,t,a){return e.flatMap(r=>uO(r,t,a)??[])}function CI(e,t){return e.map(a=>{const r=t.get(a);return r===void 0?{id:a}:{id:a,members:r}})}function dO(e,t,a,r,l,c){return _l(e,CI(r,l),u=>uO(u,t,a),u=>mb(t,a,u.id,u.members),c)}function RI(e,t,a,r,l){const c=e.map((m,p)=>({key:String(p),value:m}));return dO(c,t,a,r,l,m=>({key:"",value:m})).map(m=>m.value)}function TI(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 DI="flex min-w-0 flex-1 items-center gap-[calc(12*var(--content))]",LI={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))]"},fO={bar:"text-[length:calc(15*var(--content))]",cell:"text-[length:calc(12.5*var(--content))]"},zI={bar:"text-[length:calc(13.5*var(--content))]",cell:"text-[length:calc(12*var(--content))]"};function Zm({face:e,imageUrl:t,size:a="bar"}){return d.jsxs("span",{className:DI,"data-row-face":"",children:[e.image!==null&&d.jsx("span",{className:ae("relative grid shrink-0 place-items-center overflow-hidden bg-line-soft font-semibold text-ink-3",LI[a]),"data-row-face-thumb":"",children:t?d.jsx("img",{src:t,alt:"",className:"absolute inset-0 size-full object-cover object-top"}):TI(e.title)}),d.jsxs("span",{className:"flex min-w-0 items-baseline gap-[calc(8*var(--content))]",children:[d.jsx("span",{className:ae("min-w-0 shrink truncate font-medium text-ink",fO[a]),children:e.title}),e.supporting!==null&&d.jsx("span",{className:ae("min-w-0 shrink-[2] truncate text-ink-3",zI[a]),children:e.supporting})]})]})}function Wm({children:e,size:t="bar"}){return d.jsx("span",{className:ae("min-w-0 flex-1 truncate text-ink-4",fO[t]),children:e})}const $I="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",_k={contacts:"Contact",units:"Unit",comparables:"Comparable",commercial_spaces:"Commercial space"};function Gs(e){return typeof e=="string"&&e!==""?e:null}function UI(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 l=Gs(a[t]);return l===null?[]:[l]})}function II({slot:e,value:t,onChange:a,onRowPick:r,recordContext:l,...c}){var j;const{TablePicker:u}=Wt(),[m,p]=x.useState(null),g=c.rowTable??uf(e),b=g.kind==="table"&&g.inert!==!0?g.tables:null,v=!hl(e),k=(E,_)=>{E!==t&&(r?r(E,_):a(E))},w=GS(e.label);return d.jsxs("div",{className:Vr,role:"group","aria-label":e.label,children:[d.jsxs("div",{className:$I,children:[d.jsx(pb,{rowTable:g,value:t}),b!==null&&u!==void 0&&d.jsxs("span",{className:oj,children:[t!==null&&!af(t)&&d.jsx(hO,{label:`Edit ${w}`,onClick:()=>p("record")}),v&&d.jsx(HI,{label:((j=Fy(e).choose)==null?void 0:j.label)??Ps("Choose",w),onClick:()=>p("pick")}),v&&t!==null&&d.jsx(nf,{icon:xl,label:`Remove ${w}`,title:"Remove",tone:"remove",onClick:()=>k(null,{})})]})]}),m==="record"&&t!==null&&b!==null&&u!==void 0&&d.jsx(u,{open:!0,mode:"record",tables:b,rowId:t,onClose:()=>p(null)}),m==="pick"&&b!==null&&u!==void 0&&d.jsx(u,{open:!0,mode:"single",tables:b,selectedId:t,disabledIds:UI(l),onPick:k,onClose:()=>p(null)})]})}function hO({label:e,onClick:t}){return d.jsx(nf,{icon:py,label:e,title:"Edit",onClick:t})}function HI({label:e,onClick:t}){return d.jsx(nf,{icon:Z_.Choose,label:e,title:"Choose",onClick:t})}function pb({rowTable:e,value:t,size:a="bar"}){const{TableRowSummary:r}=Wt();switch(e.kind){case"table":{if(af(t))return d.jsx(Zm,{face:{title:`New ${_k[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 l=_k[e.tables[0]];return t===null?d.jsxs(Wm,{size:a,children:["No ",l.toLowerCase()," chosen"]}):d.jsx(Zm,{face:{title:l,supporting:null,image:null},size:a})}case"content":return t===null?d.jsx(Wm,{size:a,children:"None"}):d.jsx(Zm,{face:{title:e.labelOf(t)??"Untitled",supporting:null,image:null},size:a});case"none":return d.jsx(Wm,{size:a,children:"Set automatically"})}}const BI={model:{defaultValue:null,coerce:Gs,isEmpty:e=>e===null,isInvalid:()=>!1},faces:{compact:II},applyOptimistic:null};function qI(e){var t,a,r,l;switch(VS(e,Vj)){case"media":return((t=e.element)==null?void 0:t.type)==="media"?Fm:((a=e.element)==null?void 0:a.type)==="video"?p6:((r=e.element)==null?void 0:r.type)==="tour"?yy:((l=e.element)==null?void 0:l.type)==="document"?Fm:qp;case"upload":return Fm;case"poi":return P6;case"annotated-media":return qp;case"object":case"row":return ZD;case"scalar":return PE}}function df(e){switch(e.type){case"text":return TL;case"url":return my;case"image":case"media":return Pd;case"video":return vy;case"tour":return yy;case"poi":return VE;case"address":return B6;case"document":return Fd;case"select":return W6;case"list":return qI(e);default:return cy}}function mO(e){const t=new Set(e.map(df));return t.size===1?[...t][0]:cy}const FI="relative flex flex-col gap-2",PI={large:"gap-3",compact:"gap-2"},VI="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",GI={field:"cursor-text",bar:"cursor-grab pr-2"},KI=ae(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 YI(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 gb({engine:e,itemKind:t="field",label:a,add:r,choose:l,size:c,renderControl:u,renderActions:m,onAdd:p,renderAdd:g,addUnbound:b=!1,empty:v}){const{rows:k,drag:w}=e,{containerRef:j,getItemProps:E}=w,_=g==null?void 0:g(e.add),C=k.length===0&&v!==void 0&&_==null;return d.jsx("div",{className:Vr,role:"group","aria-label":a,children:d.jsxs("div",{className:ae("flex flex-col",PI[c]),children:[e.canAdd&&d.jsx(hc,{size:c,add:r,onAdd:b?null:()=>p(e.add),choose:l}),C&&v,_,k.length>0&&d.jsx("div",{className:FI,ref:j,children:k.map(O=>d.jsxs("label",{htmlFor:O.key,onClick:YI,...E(O.key),className:ae(VI,GI[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:O.key,value:O.value,onChange:A=>e.setValue(O.key,A)}),t==="bar"&&d.jsxs("span",{className:oj,children:[m==null?void 0:m({id:O.key,value:O.value}),e.canRemove&&d.jsx(nf,{icon:xl,label:`Remove ${Ja(a).singular}`,title:"Remove",tone:"remove",onClick:()=>e.remove(O.key)})]}),e.canRemove&&t==="field"&&d.jsx("button",{type:"button",className:KI,title:"Remove",onClick:()=>e.remove(O.key),children:d.jsx(Rt.trash,{})})]},O.key))})]})})}function QI({engine:e,label:t,add:a,placeholder:r="List item",maxLength:l,size:c}){return d.jsx(gb,{engine:e,label:t,add:a,size:c,renderControl:({id:u,value:m,onChange:p})=>d.jsx(JL,{id:u,value:m,onChange:p,placeholder:r,ariaLabel:r,maxLength:l,className:ae("cursor-[inherit]",XE)}),onAdd:u=>u("")})}const XI="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",ZI="relative h-[calc(280*var(--frame))]",WI=5,JI=ae("flex items-center gap-2 rounded-[calc(8*var(--content))] px-2.75 py-[calc(7*var(--content))] pr-2",ky),eH=ae("block size-[calc(13*var(--content))] rounded-[calc(3*var(--content))]",_n),jk=["w-[28%]","w-[22%]","w-[34%]"];function tH({position:e}){return d.jsxs("div",{className:JI,children:[d.jsx("span",{className:"grid w-3.5 shrink-0 place-items-center",children:d.jsx("span",{className:ae("block h-[calc(14*var(--content))] w-[calc(6*var(--content))] rounded-full",_n)})}),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:ae("block size-[calc(32*var(--content))] shrink-0 rounded-[calc(7*var(--content))]",_n)}),d.jsx("span",{className:ae("block h-[calc(10*var(--content))] rounded-full",_n,jk[e%jk.length])}),d.jsx("span",{className:ae("block h-[calc(8*var(--content))] w-[16%] rounded-full",_n)})]}),[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:eH})},t))]})}function nH(e){return Gs(typeof e=="object"&&e!==null?e.id:e)}function iH({slot:e,face:t,rowTable:a,verbs:r,fixed:l,value:c,commit:u}){const{TablePicker:m,TableCreate:p}=Wt(),g=tr({items:c.map(nH),fixed:l,axis:"y",commit:u}),[b,v]=x.useState(!1),[k,w]=x.useState(!1),[j,E]=x.useState(null),_=a.kind==="table"&&a.inert!==!0?a.tables:null,C=_!==null?m:void 0,O=_!==null?p:void 0,A=Ja(e.label).singular,D=()=>v(!0),R=C!==void 0&&r.choose!==null?{choose:r.choose,onChoose:D}:void 0,F=r.add,L=()=>w(!0),T=O!==void 0,H=g.rows.flatMap(Y=>Y.value!==null?[Y.value]:[]),ne=t==="expanded"&&g.rows.length===0?rO(e):null;return d.jsxs(d.Fragment,{children:[d.jsx(gb,{engine:g,itemKind:"bar",label:e.label,add:F,...R!==void 0?{choose:R}:{},size:t==="expanded"?"large":"compact",addUnbound:!T,onAdd:L,...t==="expanded"?{empty:d.jsxs("div",{className:ZI,children:[d.jsx(fc,{className:"flex flex-col gap-2",children:Array.from({length:WI},(Y,le)=>d.jsx(tH,{position:le},le))}),d.jsx(gd,{icon:za.createElement(df(e),{size:25,strokeWidth:1.8}),headline:F.empty,...ne!==null?{line:ne}:{}})]})}:{},renderControl:({id:Y,value:le})=>d.jsx("div",{id:Y,className:XI,children:d.jsx(pb,{rowTable:a,value:le})}),renderActions:({value:Y})=>C!==void 0&&Y!==null&&d.jsx(hO,{label:`Edit ${A}`,onClick:()=>E(Y)})}),j!==null&&C!==void 0&&_!==null&&d.jsx(C,{open:!0,mode:"record",tables:_,rowId:j,onClose:()=>E(null)}),k&&O!==void 0&&_!==null&&d.jsx(O,{tables:_,onCreated:Y=>{w(!1),g.rows.some(le=>le.value===Y)||g.add(Y)},onClose:()=>w(!1)}),b&&C!==void 0&&_!==null&&d.jsx(C,{open:!0,mode:"multi",tables:_,selectedIds:H,onChange:Y=>g.replace(_l(g.rows,Y.map(le=>({id:le})),le=>le,le=>le.id,g.mint)),onClose:()=>v(!1)})]})}const aH=12;function rH(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 oH({icon:e,title:t,subtitle:a,showGrip:r=!1,open:l}){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(li,{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(lH,{open:l})]})}function lH({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(li,{name:"chevDown",size:14,stroke:1.8})})}const _s=new WeakSet;function pO({open:e,onToggle:t,icon:a,title:r,subtitle:l,scrollKey:c,dragId:u,dragHandleProps:m,children:p}){const g=x.useRef(null);return x.useEffect(()=>{if(!e)return;const b=g.current,v=b==null?void 0:b.closest(".hp-sb-scroll");if(!b||!v||Array.from(b.querySelectorAll(".we-acc")).some(C=>_s.has(C)))return;_s.add(b);const k=window.matchMedia("(prefers-reduced-motion: reduce)").matches,w=()=>{_s.delete(b);const C=b.getBoundingClientRect(),O=v.getBoundingClientRect(),A=rH({top:C.top-O.top,bottom:C.bottom-O.top,height:C.height},v.clientHeight,v.scrollTop,aH);A!=null&&v.scrollTo({top:A,behavior:k?"auto":"smooth"})};if(k){const C=requestAnimationFrame(w);return()=>{cancelAnimationFrame(C),_s.delete(b)}}const j=new AbortController,E=()=>{j.abort(),window.clearTimeout(_),w()};b.addEventListener("transitionend",C=>{C.propertyName==="grid-template-rows"&&C.target instanceof Node&&C.target.parentNode===b&&E()},{signal:j.signal});const _=window.setTimeout(E,280);return()=>{j.abort(),window.clearTimeout(_),_s.delete(b)}},[e,c]),d.jsxs("div",{ref:g,"data-open":e,"data-dragid":u,className:ae("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:ae("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(oH,{icon:a,title:r,subtitle:l,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",inert:!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 Ok(e){return FS(e)}function sH(e){const t=[];for(let a=0;a<e.length;a++){const r=e[a+1];Ok(e[a])&&r!==void 0&&Ok(r)?(t.push({kind:"pair",indices:[a,a+1]}),a++):t.push({kind:"single",index:a})}return t}function cH({items:e,rows:t}){const a=r=>r&&d.jsxs("div",{className:`${Vr} min-w-0`,...r.attrs,children:[r.label!==null?d.jsx(WL,{children:r.label}):null,r.node]},r.key);return d.jsx("div",{className:VL,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 uH='input, textarea, select, button, [tabindex]:not([tabindex="-1"]), [contenteditable="true"]',Od="data-field-name",yb="data-field-scope";function dH(e,t){var r;const a=(r=e.parentElement)==null?void 0:r.closest(`[${yb}]`);return a==null||a===t||!t.contains(a)}function gO(e,t){var r;const a=Array.from(e.querySelectorAll(`[${Od}]`)).find(l=>l.getAttribute(Od)===t&&dH(l,e));a&&(a.scrollIntoView({block:"nearest"}),(r=a.querySelector(uH))==null||r.focus({preventScroll:!0}))}function fH(e){const t={fields:Object.fromEntries(e)};return e.filter(([,a])=>Nd(a,t)&&!ZC(a))}const hH="data-object-fields";function bb({fields:e,lone:t=!1,reveal:a,renderField:r}){const l=Ry(),c=fH(e),u=x.useRef(null);return x.useEffect(()=>{if(!a)return;const m=requestAnimationFrame(()=>{u.current&&gO(u.current,a)});return()=>cancelAnimationFrame(m)},[a]),d.jsx("div",{ref:u,[hH]:l,[yb]:"",children:d.jsx(cH,{rows:sH(c.map(([,m])=>m)),items:c.map(([m,p])=>({key:m,label:t?null:p.label||m,attrs:{[Od]:m},node:r(m,p)}))})})}function xc({slot:e,instanceId:t,slotId:a,value:r,propertyId:l,onChange:c,required:u,overridden:m,selectedItemIndex:p,selectedFieldName:g,itemBaseline:b,boundRowId:v,boundRowTable:k,membership:w,rowTable:j,onRowPick:E,onUpload:_,recordContext:C,factPath:O}){const A=Ry(),D=a8(e.type==="list"?void 0:O),R=Al(e.type);if(!R)return null;const F=Wz(A),L=R.faces[F];if(!L)return null;const T=R.model.coerce(r),H=d.jsx(L,{slot:e,instanceId:t,slotId:a,value:T,onChange:c,required:u,propertyId:l,selectedItemIndex:p,selectedFieldName:g,overridden:m,itemBaseline:b,boundRowId:v,boundRowTable:k,membership:w,rowTable:j,onRowPick:E,onUpload:_,recordContext:C,factPath:O});return D===null?H:d.jsxs("div",{className:"flex flex-col gap-[calc(6*var(--content))]",children:[H,d.jsx(r8,{mark:D})]})}const mH=ae(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"),pH="relative flex flex-col gap-3";function gH(e,t){return hl(e)?t:uf(e)}function yH({slot:e,entries:t,fixed:a,instanceId:r,slotId:l,value:c,commit:u,membership:m,verbs:p,selectedItemIndex:g,selectedFieldName:b,itemBaseline:v,rowTable:k,insideRecord:w=!1,factPath:j}){var ti;const{TablePicker:E,TableCreate:_}=Wt(),C=mO(t.map(([,we])=>we)),O=Io(we=>we.session.property_id),A=Io(we=>we.select),D=Io(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,F=Xj({instanceId:r,slotId:l,membership:m,itemBaseline:v,insideRecord:w}),{identityKey:L}=F,T=Va(e)??{fields:Object.fromEntries(t)},H=Vg(Ja(e.label).singular),{add:ne}=p,Y=(we,Te)=>sf(fl(T,`${H} ${Te+1}`),T,we),le=fl(T,""),K=le.kind==="field"?le.field:void 0,[X,ue]=x.useState(!1),[M,V]=x.useState(!1),[te,me]=x.useState(null);function Q(we){A({kind:"slot",instance_id:r,slot_id:l,item_index:we})}const N=x.useRef(null),q=tr({items:c,identityOf:F.identityOf,fixed:a,axis:"y",commit:(we,Te)=>{F.markOrder(we),u(F.stamp(we),Te)},onCommitted:(we,Te)=>{const Ce=N.current;if(w||Te!=="reorder"&&Te!=="replace"||Ce==null)return;const Xe=we.findIndex(at=>at.key===Ce);Xe<0?A({kind:"slot",instance_id:r,slot_id:l}):(Te==="reorder"||Xe!==q.indexOf(Ce))&&Q(Xe)}}),{rows:I}=q,P=w?te:g!=null?q.keyAt(g):null,ee=P!=null?q.indexOf(P):-1;x.useEffect(()=>{N.current=P},[P]);function pe(we){if(w){me(we);return}const Te=q.indexOf(we);Te<0||Q(Te)}function se(){w?me(null):A({kind:"slot",instance_id:r,slot_id:l})}function ke(we){P===we?se():pe(we)}const z=m.kind==="pick-row"||m.kind==="table"?lb(m):null,ce=q.canAdd&&(m.kind!=="pick-row"||_!==void 0),ge=p.choose!==null&&q.canAdd&&(z!==null&&E!==void 0||m.kind==="pick-media"),Ee=(ti=t.find(([,we])=>hl(we)))==null?void 0:ti[0];function Ue(we){const Te=q.mint(we);q.insert(Te),w?me(Te.key):Q(0)}function Le(){ge&&ue(!0)}function ye(){if(ce){if(m.kind==="pick-row"){V(!0);return}if(m.kind==="pick-media"){ue(!0);return}Ue(R?{...Ho(t),[L]:sj()}:Ho(t))}}function Re(we,Te){q.replace(dO(I,t,L,we,Te,q.mint))}function ht(we,Te){const Ce=Ho(t);for(const[Xe,at]of t)hl(at)&&(Ce[Xe]=at.type==="image"?By(we,{file:"",url:"",alt:""},Te,WS(at.crop),m.kind==="pick-media"?m.filter.from:void 0):{file:we.file,url:cl(we),alt:""});return Ce}function $e(we){var Ce;const Te=Ee===void 0||(Ce=we[Ee])==null?void 0:Ce.file;return typeof Te=="string"&&Te!==""?Te:null}function Lt(we,Te){const Ce=_l(I,we,$e,at=>ht(at,Te),q.mint),Xe=new Set(Ce.map(at=>at.key));for(const at of I)Xe.has(at.key)||F.markRemoved(at);q.replace(Ce)}function st(we){if(!q.canRemove)return;const Te=I.find(Xe=>Xe.key===we);Te&&F.markRemoved(Te);const Ce=q.indexOf(we);q.remove(we),P===we?se():!w&&ee>=0&&Ce>=0&&Ce<ee&&Q(ee-1)}function Bn(we,Te,Ce={}){const Xe=I.find(at=>at.key===we);Xe!=null&&(F.markFields(Xe,Te),q.setValue(we,{...Xe.value,...Ce,...Te}))}function On(we,Te,Ce,Xe){const at=I.find(ie=>ie.key===we);if(at==null)return;const Vt=F.markerIdentity(at),ut=Ce===null?{}:cO(t,Te,Xe);if(Vt!==null)for(const ie of Object.keys(ut))OI(D,l,Vt,ie)&&delete ut[ie];Bn(we,{[Te]:Ce},ut)}const{containerRef:cn,getItemProps:yt,draggingKey:Ji}=q.drag,ci=ge&&p.choose!==null?{choose:p.choose,onChoose:Le}:void 0;return d.jsxs("div",{className:"flex flex-col gap-3",children:[d.jsx(hc,{size:"compact",add:ne,onAdd:ce?ye:null,choose:ci}),I.length>0&&d.jsx("div",{ref:cn,className:pH,children:I.map((we,Te)=>{const Ce=Y(we.value,Te),Xe=P===we.key;return d.jsx("div",{children:d.jsx(pO,{open:Ji==null&&Xe,onToggle:()=>ke(we.key),icon:d.jsx(C,{size:14}),title:Ce,scrollKey:we.key,dragId:we.key,dragHandleProps:{onPointerDown:yt(we.key).onPointerDown},children:d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsx(bb,{fields:t,reveal:!w&&Xe?b:void 0,renderField:(at,Vt)=>d.jsx(xc,{slot:Vt,instanceId:r,slotId:l,value:we.value[at],propertyId:O,onChange:ut=>Bn(we.key,{[at]:ut}),...JE(Vt.type)?{factPath:Fs(qs(j,we.value),at)}:{},...sO(Vt)?{rowTable:gH(Vt,k),onRowPick:(ut,ie)=>On(we.key,at,ut,ie)}:{},recordContext:{...R?{itemId:Ed(we.value,L)??void 0}:{},itemIndex:Te,siblingRecords:I.map(ut=>ut.value),fieldKey:at,table:R,...K?{titleKey:K}:{},membership:m}})}),Xe&&q.canRemove&&d.jsxs("button",{type:"button",className:ae(mH,"max-w-full"),onClick:()=>st(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)})}),M&&z!==null&&_!==void 0&&d.jsx(_,{tables:z,onCreated:(we,Te)=>{V(!1),jd(I.map(Ce=>Ce.value),t,L).includes(we)||Ue(mb(t,L,we,Te))},onClose:()=>V(!1)}),X&&z!==null&&E&&d.jsx(E,{open:!0,mode:"multi",tables:z,selectedIds:jd(I.map(we=>we.value),t,L),onChange:Re,onClose:()=>ue(!1)}),X&&m.kind==="pick-media"&&d.jsx(Wy,{propertyId:O,children:we=>d.jsx(yc,{mode:"multi",propertyId:O,filter:m.filter,selectedIds:I.flatMap(Te=>$e(Te.value)??[]),onChange:Te=>Lt(Te,we),onClose:()=>ue(!1)})})]})}function Ak(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 yO(e){var a;if(e.values)return e.values.map(Ak);const t=((a=e.source)==null?void 0:a.kind)==="home"?e.source.key:void 0;return t===void 0?[]:(Z3(t)??[]).map(Ak)}function Ts(e){return e.trim().toLowerCase().replace(/\s+/g,"-")}const bH=["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"],vH=new Set(bH);function bO(e){return typeof e=="string"&&vH.has(e)}const xH="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)]",vO=ae(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"),wH=ae(vO,"text-accent"),kH=4,Nk=160,Mk=240,SH=ae(vt,XE,"min-w-0 flex-1 cursor-text bg-transparent text-left text-ink outline-none placeholder:text-ink-4");function Ck({open:e,className:t,onMouseDown:a}){return d.jsx("span",{className:ae("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 EH(){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 _H({option:e}){const t=bO(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(li,{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 jH(e,t){const a=t.toLowerCase().trim();return a?e.filter(r=>r.label.toLowerCase().includes(a)):e}function OH(e,t){const a=Ts(t);if(a.length!==0)return e.find(r=>Ts(r.value)===a||Ts(r.label)===a)}function eg({label:e,value:t,options:a,onChange:r,placeholder:l,bare:c=!1,autoOpen:u=!1,onDismiss:m,id:p,creatable:g=!1,canCreate:b,attention:v=null}){const k=ir(),[w,j]=x.useState(u),[E,_]=x.useState(0),[C,O]=x.useState(null),[A,D]=x.useState(""),R=x.useId(),F=x.useRef(null),L=x.useRef(null),T=x.useRef(null),H=a.findIndex(z=>z.value===t),ne=H>=0?a[H]:void 0,Y=jH(a,w?A:""),le=A.trim(),K=w?OH(a,A):void 0,X=K&&!Y.some(z=>z.value===K.value)?[...Y,K]:Y,ue=g&&le.length>0&&!K&&((b==null?void 0:b(le))??!0),M=X.length+(ue?1:0);function V(){T.current&&O(Br(T.current)),_(Math.max(0,H)),j(!0)}const te=x.useCallback(()=>{j(!1),D(""),m==null||m()},[m]);function me(z){var ce;z.value!==t&&r(z.value),j(!1),D(""),(ce=L.current)==null||ce.focus()}function Q(z){var ce;r(z),j(!1),D(""),(ce=L.current)==null||ce.focus()}function N(z){var ce;if(!w){(z.key==="ArrowDown"||z.key==="Enter"||z.key===" ")&&(z.preventDefault(),V());return}if(z.key==="Escape")z.preventDefault(),(ce=L.current)==null||ce.focus(),te();else if(z.key==="ArrowDown")z.preventDefault(),_(ge=>Math.min(M-1,ge+1));else if(z.key==="ArrowUp")z.preventDefault(),_(ge=>Math.max(0,ge-1));else if(z.key==="Enter")if(z.preventDefault(),E<X.length){const ge=X[E];ge&&me(ge)}else ue&&Q(le)}const q=x.useCallback(z=>{var Ee,Ue;const ce=(Ee=F.current)==null?void 0:Ee.contains(z),ge=(Ue=document.getElementById(R))==null?void 0:Ue.contains(z);return!ce&&!ge},[R]);function I(z){w&&q(z.relatedTarget)&&te()}x.useEffect(()=>{var z;u&&((z=L.current)==null||z.focus())},[u]),x.useEffect(()=>{if(!w)return;const z=()=>{T.current&&O(Br(T.current))};return z(),window.addEventListener("scroll",z,!0),window.addEventListener("resize",z),()=>{window.removeEventListener("scroll",z,!0),window.removeEventListener("resize",z)}},[w]),x.useEffect(()=>{if(!w)return;const z=ce=>{q(ce.target)&&te()};return document.addEventListener("mousedown",z),()=>document.removeEventListener("mousedown",z)},[w,q,te]);const P=z=>{z.preventDefault(),w||V()},ee=d.jsx("input",{ref:L,id:p,className:c?SH:ae(k.inner,"cursor-text"),value:w?A:(ne==null?void 0:ne.label)??t,placeholder:l??"",role:"combobox","aria-haspopup":"listbox","aria-expanded":w,"aria-controls":R,"aria-label":e,onFocus:V,onClick:()=>{w||V()},onChange:z=>{D(z.target.value),w||V(),_(0)},onKeyDown:N}),pe=c?d.jsxs(d.Fragment,{children:[ee,d.jsx(Ck,{open:w,className:"pl-2",onMouseDown:P})]}):d.jsxs(d.Fragment,{children:[ee,d.jsx(Ck,{open:w,className:"pl-1 pr-2.75",onMouseDown:P})]}),se=w&&C?ml(C,{maxHeight:Mk*2,minWidth:Nk,gap:kH}):null,ke=w&&se&&M>0?Wi.createPortal(d.jsxs("div",{className:xH,id:R,role:"listbox",style:{left:se.left,top:se.top,bottom:se.bottom,minWidth:Math.max(se.width,Nk),maxHeight:`min(${se.maxHeight}px, calc(${Mk}*var(--content)))`,zIndex:Fa},children:[X.map((z,ce)=>d.jsxs("button",{type:"button",role:"option","aria-selected":z.value===t,"data-active":ce===E,className:vO,onMouseEnter:()=>_(ce),onMouseDown:ge=>ge.preventDefault(),onClick:()=>me(z),children:[d.jsx(_H,{option:z}),z.value===t&&d.jsx(EH,{})]},z.value)),ue&&d.jsx("button",{type:"button",role:"option","aria-selected":E===X.length,"data-active":E===X.length,className:wH,onMouseEnter:()=>_(X.length),onMouseDown:z=>z.preventDefault(),onClick:()=>Q(le),children:d.jsxs("span",{className:"truncate",children:["Create “",le,"”"]})})]}),document.body):null;return c?d.jsxs("div",{className:"flex min-w-0 flex-1 items-center",ref:z=>{F.current=z,T.current=z},onBlurCapture:I,children:[pe,ke]}):d.jsxs("div",{className:k.frame,ref:F,onBlurCapture:I,children:[d.jsx(Kr,{attention:v,className:w?"border-accent":void 0,ref:T,children:pe}),ke]})}function AH({engine:e,label:t,add:a,options:r,unique:l=!1,creatable:c=!1,size:u}){const[m,p]=x.useState(!1),g=e.rows.map(j=>j.value),b=j=>l?r.filter(E=>E.value===j||!g.includes(E.value)):r,v=b(null),k=j=>!l||!g.some(E=>Ts(E)===Ts(j)),w=v.length>0?v:r;return d.jsx(gb,{engine:e,label:t,add:a,size:u,renderControl:({id:j,value:E,onChange:_})=>d.jsx(eg,{bare:!0,id:j,label:t,value:E,options:b(E),onChange:_,creatable:c,canCreate:k}),onAdd:()=>p(!0),renderAdd:j=>m?d.jsx(eg,{bare:!0,autoOpen:!0,label:a.label,value:"",placeholder:"Choose one",options:w,onDismiss:()=>p(!1),onChange:E=>{p(!1),k(E)&&j(E)},creatable:c,canCreate:k}):null})}function NH({slot:e,itemSlot:t,add:a,fixed:r,value:l,commit:c,size:u}){const m=tr({items:l,fixed:r,axis:"y",commit:c});return t.type==="select"?d.jsx(AH,{engine:m,label:e.label,add:a,options:yO(t),creatable:t.creatable===!0,unique:e.unique===!0,size:u}):d.jsx(QI,{engine:m,label:e.label,add:a,maxLength:t.cap,size:u})}const Rk="grid size-[calc(18*var(--content))] shrink-0 place-items-center border-[1.5px] bg-canvas transition-[border-color,background-color] duration-[120ms]";function MH({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:ae(vt,"flex w-full items-center justify-center",t.disabled?"cursor-not-allowed":"cursor-pointer"),onClick:l=>{l.stopPropagation(),r()},children:e==="radio"?d.jsx("span",{"aria-hidden":"true",className:ae(Rk,"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:ae(Rk,"rounded-[calc(5*var(--content))]",t.checked?"border-ink bg-ink text-canvas":"border-ink-4 text-transparent"),children:d.jsx(qd,{className:"size-[calc(11*var(--content))]",strokeWidth:3})})})}function CH(e){return e.derived!==void 0}const RH=new Set(["image","video","tour","document","media"]);function TH(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 DH(e){const t=TH(e),a=RH.has(e.type),r=`calc(${t}*var(--content))`;return{track:a?r:`minmax(${r},${t/100}fr)`,minPx:t}}function LH(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 xO(e){return e.reduce((t,a)=>t+a.minPx,0)}function zH(e,t,a=Number.POSITIVE_INFINITY){const r=Va(e);if(r===null)return[];const l=fl(r,""),c=l.kind==="field"?l.field:null,u=[];for(const[b,v]of Ol(r)){if(CH(v)||v.locked===!0||!t.used.has(b))continue;const k=b===c,w=t.required.has(b),j={key:b,slot:v,header:v.label||b,required:w,title:k,...DH(v)};u.push({column:j,pinned:k||w})}let m=a-xO(u.filter(b=>b.pinned).map(b=>b.column)),p=!1;const g=[];for(const{column:b,pinned:v}of u)v?g.push(b):!p&&b.minPx<=m?(m-=b.minPx,g.push(b)):p=!0;return g}function wO(e){if(e===null||typeof e!="object")return null;const t=Qi(e);if(t===null||t==="")return null;if(oc(e)||Xa(e))return{file:t,picked:t};const{kind:a,...r}=e;return{...r,file:t,...typeof a=="string"&&pn(a)?{kind:a}:{}}}function vb(){return{image:jj.model,video:Cj.model,tour:Aj.model,document:qj.model}}const $H=DU({model:{defaultValue:null,coerce:wO,isEmpty:e=>e===null||e.file==="",isInvalid:()=>!1},models:vb}),UH=ae(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",kl),IH="inline-flex size-[calc(16*var(--content))] shrink-0 items-center justify-center opacity-80",HH="min-w-0 truncate";function ff({slot:e,reading:t,readingText:a,attention:r,scope:l,onOpen:c}){const u=jl(),m=t===null,p=m?ef(e,l):null,g=p!==null?J_(p):null,b=g!==null?g.label:a!==void 0?`${e.label}: ${a}`:`Open ${e.label}`;return d.jsxs("button",{type:"button",className:UH,"data-summary-pill":e.type,"data-empty":m?"":void 0,...Sl(r,u),"aria-label":b,disabled:c===void 0,onClick:c,children:[d.jsx("span",{className:IH,children:za.createElement(g!==null?g.icon:df(e),{size:14})}),d.jsx("span",{className:HH,children:m?e.label:t})]})}function hf({slot:e,value:t,required:a}){const r=Al(e.type);return r===null?null:nr(r.model,e,r.model.coerce(t),a??!1)}function BH(e){var a;const t=Array.isArray(e.value)?e.value.length:0;return d.jsx(ff,{slot:e.slot,reading:t===0?null:`${t} ${e.slot.label}`,readingText:String(t),attention:hf(e),scope:{table:((a=e.recordContext)==null?void 0:a.table)??null},onOpen:e.onOpen})}function qH(e){const t=zj.coerce(e.value),a=W2((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:jg(t.postal)].filter(Boolean).join(", "),l=a!==""?a:r!==""?r:null;return d.jsx(ff,{slot:e.slot,reading:l,readingText:l??void 0,attention:hf(e)??(Lj(t)?"required":null),onOpen:e.onOpen})}function FH(e){const t=sb(e.value);return d.jsx(ff,{slot:e.slot,reading:(t==null?void 0:t.name)??null,readingText:t==null?void 0:t.name,attention:hf(e),onOpen:e.onOpen})}function PH(e){const t=Gs(e.value);return d.jsx(ff,{slot:e.slot,reading:t===null?null:d.jsx(pb,{rowTable:uf(e.slot),value:t,size:"cell"}),attention:hf(e),onOpen:e.onOpen})}function Vu(e){const t=e.slot.type,a=Al(t).model;return d.jsx(vj,{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 VH(e){const t=Al("media").model;return d.jsx(RU,{models:vb(),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 GH={list:BH,image:Vu,video:Vu,tour:Vu,document:Vu,media:VH,address:qH,poi:FH,row:PH};function KH(e){const a=GH[e.slot.type];return a?d.jsx(a,{...e}):null}const xb=24,kO=36,YH=36,QH=8,Jm=e=>`calc(${e}*var(--content))`,SO=ae(u$,"flex flex-col gap-3"),EO="flex min-h-0 flex-1 flex-col overflow-hidden rounded-[calc(12*var(--content))] border border-line bg-canvas",XH="-mb-px min-h-0 flex-1 overflow-auto",ZH="transition-[background-color,opacity] duration-100 hover:bg-[#fbfaf6] focus-within:bg-[#faf8f1]",wb="h-[calc(44*var(--content))]",kr="flex min-w-0 items-stretch p-[calc(4*var(--content))]",WH=ae(tf,Xy),JH="[data-table-cell] > *, input, textarea, select, button, a, [contenteditable], [role='button'], [role='checkbox'], [role='radio'], [tabindex]:not([tabindex='-1'])",kb="[:where(&)_:where([data-table-cell]>*,input,textarea,select,button,a,[contenteditable],[role=button],[role=checkbox],[role=radio],[tabindex]:not([tabindex='-1']))]:cursor-auto",eB=ae("cursor-grab",kb),tB=ae("cursor-pointer",kb),Tk=e=>e.closest(JH)!==null,_O=11,Ad=["w-3/5","w-2/5","w-1/2","w-[70%]"],jO=ae("block h-[calc(9*var(--content))] rounded-full",_n),nB=ae("block h-[calc(22*var(--content))] w-[calc(76*var(--content))] rounded-full",_n),iB=ae("block size-[calc(13*var(--content))] rounded-[calc(3*var(--content))]",_n);function OO(e){return QH+YH*(e?2:1)}function AO(e,t){return xb+(e?kO:0)+OO(t)}function aB(e,t,a){const r=OO(a),l=[Jm(xb),...t?[Jm(kO)]:[],...e.map(u=>u.track),Jm(r)],c=AO(t,a)+xO(e);return{style:{gridTemplateColumns:l.join(" "),minWidth:c},selection:t,actionsPx:r}}function rB({columns:e,layout:t,position:a,marks:r}){return d.jsxs("div",{className:ae("grid items-center border-b border-line-soft",wb),style:t.style,children:[d.jsx("span",{}),t.selection&&d.jsx("span",{}),e.map((l,c)=>d.jsx("span",{className:"min-w-0 px-[calc(18*var(--content))]",children:d.jsx("span",{className:Fg(l.slot.type)?ae(jO,Ad[(a+c)%Ad.length]):nB})},l.key)),d.jsx("span",{className:"flex justify-end pr-[calc(4*var(--content))]",children:Array.from({length:r},(l,c)=>d.jsx("span",{className:"grid w-[calc(36*var(--content))] place-items-center",children:d.jsx("span",{className:iB})},c))})]})}const oB=3,lB=ae("grid items-center border-b border-line-soft","grid-cols-[calc(24*var(--content))_repeat(3,minmax(0,1fr))_calc(44*var(--content))]",wb);function sB(){return d.jsx("div",{className:SO,"data-table-pending":"",children:d.jsx("div",{className:EO,children:d.jsx("div",{className:"relative min-h-0 flex-1",children:d.jsx(fc,{children:Array.from({length:_O},(e,t)=>d.jsxs("div",{className:lB,children:[d.jsx("span",{}),Array.from({length:oB},(a,r)=>d.jsx("span",{className:"min-w-0 px-[calc(18*var(--content))]",children:d.jsx("span",{className:ae(jO,Ad[(t+r)%Ad.length])})},r)),d.jsx("span",{})]},t))})})})})}function cB(){const e=x.useRef(null),t=x.useRef(null),[a,r]=x.useState(Number.POSITIVE_INFINITY);return x.useLayoutEffect(()=>{const l=e.current;if(l===null||typeof ResizeObserver>"u")return;const c=()=>{var g;const m=((g=t.current)==null?void 0:g.getBoundingClientRect().width)??0,p=l.clientWidth;m<=0||p<=0||r(p/(m/xb))};c();const u=new ResizeObserver(c);return u.observe(l),()=>u.disconnect()},[]),{box:e,grip:t,widthPx:a}}const Dk=new Set;function uB(e,t){const a=e[t];return typeof a=="string"&&a!==""?a:null}function ep(e,t,a){return e.rowId?e.rowId(t,a):uB(t,e.idKey)}function dB(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{}}const fB="input:not([disabled]), textarea:not([disabled]), select:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex='-1'])";function NO(e){return e instanceof HTMLTextAreaElement?!0:e instanceof HTMLInputElement?!["button","checkbox","radio","submit","reset","file","image","color","range"].includes(e.type):!1}function Lk(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 hB(e,t){if(!NO(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 mB(e){const{fields:t}=e;return t===null?d.jsx(sB,{}):d.jsx(pB,{...e,fields:t})}function pB({declaration:e,value:t,onChange:a,propertyId:r,instanceId:l="",slotId:c="",selection:u,onOpenRecord:m,onAdd:p,newRowStamp:g,fixed:b=!1,orderable:v=!0,add:k=Fy(e).add,choose:w,factPath:j,fields:E}){const _=e,{itemContent:C}=Gj(_,"expanded"),O=C.kind==="record"?C.entries:[],{box:A,grip:D,widthPx:R}=cB(),F=zH(_,E,R-AO(u!==void 0,m!==void 0)),L=Va(_),T=L?fl(L,""):null,H=(T==null?void 0:T.kind)==="field"?T.field:void 0,ne=aB(F,u!==void 0,m!==void 0),Y=Array.isArray(t)?t.map(dB):[],le=tr({items:Y,fixed:b,axis:"y",commit:(z,ce)=>a(z.map(ge=>ge.value),ce)}),{drag:K}=le,X=le.rows,ue=p!==null&&le.canAdd,M=X.map(z=>({key:z.key,index:le.indexOf(z.key),value:z.value})),V=M.length===0,te=V?rO(_):null,me=x.useRef(null);x.useLayoutEffect(()=>{const z=me.current;z&&(me.current=null,Q(z.row,z.col))});function Q(z,ce){var Ue;const ge=K.containerRef.current,Ee=ge==null?void 0:ge.querySelector(`[data-table-cell][data-row="${z}"][data-col="${ce}"]`);(Ue=Ee==null?void 0:Ee.querySelector(fB))==null||Ue.focus()}function N(z,ce="top"){if(p){p();return}const ge=ce==="top"?0:le.rows.length;me.current={row:ge,col:z},le.add({...Ho(O),...g==null?void 0:g()},ge)}function q(z,ce,ge){le.updateValue(z,Ee=>({...Ee,[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 Ee=Number(ge.dataset.row),Ue=Number(ge.dataset.col),Le=M.length-1;switch(z.key){case"Enter":{if(z.shiftKey||!NO(ce))return;z.preventDefault(),Ee<Le?Q(Ee+1,Ue):ue&&N(Ue,"below");return}case"ArrowDown":case"ArrowUp":{if(Lk(ce))return;const ye=z.key==="ArrowDown"?Ee+1:Ee-1;if(ye<0||ye>Le)return;z.preventDefault(),Q(ye,Ue);return}case"ArrowLeft":case"ArrowRight":{if(Lk(ce))return;const ye=z.key==="ArrowLeft",Re=ye?Ue-1:Ue+1;if(Re<0||Re>=F.length||!hB(ce,ye?"start":"end"))return;z.preventDefault(),Q(Ee,Re);return}}}function P(z){const ce=`${Vg(Ja(e.label).singular)} ${z.index+1}`;if(!L||(T==null?void 0:T.kind)!=="field")return ce;const ge=sf(T,L,z.value);return ge==="Untitled"?ce:ge}const ee=u?u.control:null;function pe(z){if(!u)return null;const ce=ep(u,z.value,z.index);return ce===null?{checked:!1,disabled:!0}:Gy(u.ids,ce,u.held??Dk)}function se(z){const ce=u?ep(u,z.value,z.index):null;if(!u||ce===null)return;const ge=tj(u.ids,ce,u.control,u.held??Dk);ge!==u.ids&&u.onChange(ge)}function ke(z,ce){var ht;const ge=pe(z),Ee=K.getItemProps(z.key),Ue=P(z),Le=qs(j,z.value),ye=ge!==null&&!ge.disabled,Re=u?ep(u,z.value,z.index):null;return d.jsxs("div",{role:"row","data-dragid":Ee["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:v?$e=>{Tk($e.target)||Ee.onPointerDown($e)}:void 0,onClick:ye?$e=>{Tk($e.target)||se(z)}:void 0,className:ae("group/row grid items-stretch border-b border-line-soft data-[disabled=true]:opacity-50 data-[disabled=true]:focus-within:opacity-100",Ty,wb,ZH,ye?tB:v?eB:kb),style:ne.style,children:[d.jsx("div",{role:"cell",className:ae(kr,"items-center justify-center"),children:v&&d.jsx("span",{"aria-hidden":"true",className:ae("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(hy,{className:"size-[calc(14*var(--content))]",strokeWidth:1.8})})}),ee&&d.jsx("div",{role:"cell",className:kr,children:ge&&d.jsx(MH,{control:ee,state:ge,label:`Select ${Ue}`,onToggle:()=>se(z)})}),F.map(($e,Lt)=>d.jsx("div",{role:"cell","data-table-cell":"","data-row":ce,"data-col":Lt,"data-field":$e.key,className:kr,children:Fg($e.slot.type)?d.jsx(xc,{slot:$e.slot,instanceId:l,slotId:c,propertyId:r,value:z.value[$e.key],required:$e.required,onChange:st=>q(z.key,$e.key,st),recordContext:{itemIndex:z.index,fieldKey:$e.key,...H?{titleKey:H}:{}}}):d.jsx(KH,{slot:$e.slot,instanceId:l,slotId:c,propertyId:r,value:z.value[$e.key],required:$e.required,onChange:st=>q(z.key,$e.key,st),recordContext:{itemIndex:z.index,fieldKey:$e.key,...H?{titleKey:H}:{}},factPath:Fs(Le,$e.key),onOpen:m?()=>m(z.index,$e.key):void 0})},$e.key)),d.jsxs("div",{role:"cell",className:ae(kr,"justify-end"),children:[m&&d.jsx("button",{type:"button",className:tf,"aria-label":`Open ${Ue}`,onClick:()=>m(z.index),children:d.jsx(G6,{className:"size-[calc(13*var(--content))]"})}),le.canRemove&&d.jsx("button",{type:"button",className:WH,"aria-label":`Remove ${Ue}`,onClick:()=>le.remove(z.key),children:d.jsx(xl,{className:"size-[calc(13*var(--content))]"})})]})]},z.key)}return d.jsxs("div",{className:SO,children:[le.canAdd&&d.jsx(hc,{size:"large",add:k,onAdd:ue?()=>N(0):null,choose:w}),d.jsx("div",{className:EO,children:d.jsxs("div",{ref:A,className:ae(XH,V&&"flex flex-col"),role:"table","aria-rowcount":M.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:ne.style,children:[d.jsx("div",{ref:D,role:"columnheader",className:kr}),ne.selection&&d.jsx("div",{role:"columnheader",className:kr}),F.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:kr})]}),d.jsx("div",{ref:K.containerRef,className:"relative",onKeyDown:I,children:d.jsx(Jd,{place:"cell",children:M.map((z,ce)=>ke(z,ce))})}),V&&d.jsxs("div",{className:"relative min-h-0 flex-1",children:[d.jsx(fc,{children:Array.from({length:_O},(z,ce)=>d.jsx(rB,{columns:F,layout:ne,position:ce,marks:(m?1:0)+(le.canRemove?1:0)},ce))}),d.jsx(gd,{icon:za.createElement(df(_),{size:25,strokeWidth:1.8}),headline:k.empty,...te!==null?{line:te}:{}})]})]})})]})}function gB({object:e,row:t,reveal:a,withRecordContext:r=!1,onField:l,host:c,fieldProps:u}){const{fields:m}=c;return m===null?d.jsx(xB,{}):d.jsx(bb,{fields:Ol(e).filter(([p])=>m.used.has(p)),reveal:a,renderField:(p,g)=>d.jsx(xc,{slot:g,instanceId:c.instanceId,slotId:`${c.slotId}.${p}`,propertyId:c.propertyId,value:t[p],required:m.required.has(p),onChange:b=>l(p,b),...JE(g.type)?{factPath:Fs(c.factPath,p)}:{},...r?{recordContext:{fieldKey:p}}:{},...u==null?void 0:u(p,g)})})}const yB=5,bB=ae("block h-[calc(9*var(--content))] w-1/4 rounded-full",_n),vB=ae("block h-[calc(40*var(--content))] w-full rounded-[calc(10*var(--content))]",ky);function xB(){return d.jsx("div",{className:"relative h-[calc(360*var(--content))]","data-record-pending":"",children:d.jsx(fc,{className:"flex flex-col gap-[calc(20*var(--content))]",children:Array.from({length:yB},(e,t)=>d.jsxs("span",{className:"flex flex-col gap-[calc(8*var(--content))]",children:[d.jsx("span",{className:bB}),d.jsx("span",{className:vB})]},t))})})}const wB=ae("relative z-[1] flex flex-shrink-0 items-center gap-[14px] py-3",G_);function kB(e){const{open:t,onClose:a}=e;return d.jsx(wy,{open:t,onClose:a,ariaLabel:e.fallbackTitle,className:ae(Ly,A$),children:t?d.jsx(SB,{...e}):null})}function SB({object:e,row:t,fallbackTitle:a,onChange:r,onClose:l,propertyId:c,instanceId:u,slotId:m,factPath:p,fields:g,revealFieldName:b,fieldProps:v}){const k=fl(e,a),w=sf(k,e,t),j=w==="Untitled"?a:w,E=x.useRef(t);x.useEffect(()=>{E.current=t},[t]);const _=(C,O)=>{E.current={...E.current,[C]:O},r(E.current)};return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:wB,children:[d.jsx("div",{className:$y,children:d.jsx("h2",{className:ae(Uy,"truncate"),children:j})}),d.jsx(ej,{}),d.jsx("button",{type:"button",className:Iy,"aria-label":"Close",onClick:l,children:d.jsx(Rt.x,{size:14})})]}),d.jsx("div",{className:ae("min-h-0 flex-1 overflow-y-auto py-[clamp(16px,1.2vw,28px)]",G_),children:d.jsx(Jd,{place:"panel",children:d.jsx(gB,{object:e,row:t,reveal:b,withRecordContext:!0,onField:_,host:{propertyId:c,instanceId:u,slotId:m,factPath:p,fields:g},fieldProps:v})})})]})}const EB=new Set(["image","video","tour","document"]);function _B(e){var t;return((t=e.source)==null?void 0:t.kind)==="row"}function MO(e){return EB.has(e.type)&&Id(e).kind==="owned"}function jB(e,t){return Ol(e).some(([a,r])=>MO(r)&&!_B(r)&&t.required.has(a))}function OB({slot:e,value:t,onChange:a,propertyId:r,instanceId:l,slotId:c,selection:u,onRecordAdded:m,onAdd:p,newRowStamp:g,fixed:b,orderable:v,add:k,choose:w,factPath:j,record:E,fields:_}){const[C,O]=x.useState(null),A=E!==void 0?{index:E.index,added:E.added===!0}:C,{ownedUpload:D}=Wt(),R=Va(e),F=t,L=A===null?void 0:F[A.index]??{},T=R!==null&&_!==null&&jB(R,_),H=x.useRef({open:A,rows:F});x.useEffect(()=>{H.current={open:A,rows:F}});const ne=()=>{const M=H.current.rows,V=[(g==null?void 0:g())??{},...M],te={index:0,added:!0};H.current={open:te,rows:V},a(V,"add"),O(te)},Y=M=>{const{open:V,rows:te}=H.current;if(V===null)return;const me=te.map((Q,N)=>N===V.index?M:Q);H.current={open:V,rows:me},a(me,"edit")},le=()=>{if(E!==void 0){E.onClose();return}(A==null?void 0:A.added)===!0&&(m==null||m(A.index)),O(null)},K=(M,V)=>{const te=H.current.open;return!D||te===null?Promise.reject(new Error("list-table-view: no record is open")):D({slotId:c,itemIndex:te.index,field:M},V)},X=D&&A!==null?(M,V)=>MO(V)?{onUpload:te=>K(M,te)}:{}:void 0,ue=Ja(e.label).singular;return d.jsxs(d.Fragment,{children:[E===void 0&&d.jsx(mB,{declaration:e,value:t,onChange:(M,V)=>a(M,V),propertyId:r,instanceId:l,slotId:c,selection:u,...k!==void 0?{add:k}:{},...w!==void 0?{choose:w}:{},...b!==void 0?{fixed:b}:{},...v!==void 0?{orderable:v}:{},onOpenRecord:R?(M,V)=>O({index:M,added:!1,field:V}):void 0,onAdd:p!==void 0?p:T?ne:void 0,...g!==void 0?{newRowStamp:g}:{},factPath:j,fields:_}),R&&d.jsx(kB,{open:L!==void 0,object:R,row:L??{},fallbackTitle:(A==null?void 0:A.added)===!0?`New ${ue}`:`${Vg(ue)} ${((A==null?void 0:A.index)??0)+1}`,propertyId:r,instanceId:l,slotId:c,fieldProps:X,factPath:qs(j,L),fields:_,revealFieldName:A==null?void 0:A.field,onChange:Y,onClose:le})]})}function AB(e){return e.map(wO).filter(t=>t!==null)}function NB({label:e,itemSlot:t,offer:a,verbs:r,fixed:l,instanceId:c,slotId:u,ownerSlotId:m=u,value:p,propertyId:g,commit:b,onUpload:v,factPath:k,size:w}){const j=Ba(t),E=x.useMemo(()=>AB(p),[p]),[_,C]=x.useState(!1),O=tr({items:E,fixed:l,axis:"xy",commit:b}),{rows:A}=O,D=Zy(t,{propertyId:g,instanceId:c,slotId:m}),R=a.kind==="owned"?v??D??void 0:void 0,F=CB(R,j,O.add),{add:L,onAdd:T,choose:H}=My(r,a.kind==="picked"?()=>C(!0):null,R!==void 0?ib(j,F):null),ne=F.error;return d.jsxs(Cy,{engine:O,label:e,noun:"item",size:w,onAdd:T,add:L,choose:H,renderTile:(Y,le,K)=>d.jsx(RB,{value:Y.value,kinds:j,propertyId:g,holderPath:k,frame:{chrome:K,crop:null}}),children:[ne&&d.jsx("p",{className:wl,children:ne}),_&&a.kind==="picked"&&d.jsx(yc,{mode:"multi",propertyId:g,filter:a.filter,selectedIds:A.map(Y=>Y.value.file),onChange:Y=>O.replace(_l(A,Y,le=>le.file,MB,O.mint)),onClose:()=>C(!1)})]})}function MB(e){return NU(e)??{file:e.file}}function CB(e,t,a){const[r,l]=x.useState(!1),[c,u]=x.useState(null);return{busy:r,error:c,take:p=>{if(!e||p.length===0)return;const g=p.filter(v=>!zk(t,Ju(v)));u(g.length>0?`Only ${t.join(", ")} can be added here.`:null);const b=p.filter(v=>zk(t,Ju(v)));b.length!==0&&(l(!0),(async()=>{try{for(const v of b){const k=Ju(v),w=In(k),j=of(k,w.fromUploaded(await e(v),w.cleared));j!==null&&a(j)}}catch(v){console.error("[editor] media upload failed",v),u("Upload failed. Try again.")}finally{l(!1)}})())}}}function zk(e,t){return t!==null&&e.includes(t)}function RB({value:e,kinds:t,propertyId:a,frame:r,holderPath:l}){const c=nb(e,t,a);return d.jsx(tb,{kind:c,value:TB(c,e),propertyId:a,frame:r,holderPath:l},c)}function TB(e,t){return vb()[e].coerce(t)}function CO({face:e,...t}){const{slot:a,instanceId:r,slotId:l,value:c,onChange:u,recordContext:m}=t,p=Gj(a,e),g=z9(a,r,l,u,m!=null),b=t.membership??Kj(a,void 0),v=Array.isArray(c)?c:[],k=dj({slotId:l,recordContext:m}),w=m?m.table??null:dc(a.source)!==null?t.boundRowTable??null:null,j=x.useMemo(()=>p.view==="gallery"?Sq(a,w):null,[p.view,a,w]),E=b.kind==="follows",{itemContent:_}=p,C=e==="compact"?"compact":"large",O=ef(a,{table:w,membership:b});if(O===null)return null;switch(p.view){case"table":return d.jsx(LB,{slot:a,items:v,onChange:u,membership:b,verbs:O,entries:_.kind==="record"?_.entries:null,fixed:E,propertyId:t.propertyId,instanceId:r,slotId:l,factPath:t.factPath});case"annotated-gallery":{const A=_.kind==="record"?FO(_.entries):null;return A===null?null:d.jsx(zB,{list:a,label:a.label,face:e,annotated:A,listTable:w,membership:b,verbs:O,itemBaseline:t.itemBaseline,insideRecord:m!=null,fixed:E,instanceId:r,slotId:l,mediaSlotId:`${k}.${A.mediaKey}`,value:v,propertyId:t.propertyId,table:(m==null?void 0:m.table)??Yj(b),selectedItemIndex:t.selectedItemIndex,selectedFieldName:t.selectedFieldName,commit:g,onUpload:t.onUpload,factPath:t.factPath,size:C})}case"accordion":return _.kind!=="record"?null:d.jsx(yH,{slot:a,entries:_.entries,fixed:E,instanceId:r,slotId:l,value:c,commit:g,membership:b,verbs:O,rowTable:t.rowTable??Sk(a,b),selectedItemIndex:t.selectedItemIndex,selectedFieldName:t.selectedFieldName,itemBaseline:t.itemBaseline,insideRecord:m!=null,factPath:t.factPath});case"gallery":{if(_.kind!=="single"||!gl(_.slot.type))return null;if(j!==null)return d.jsx($B,{label:a.label,member:j,verbs:O,fixed:E,instanceId:r,slotId:l,mediaSlotId:k,value:c,propertyId:t.propertyId,selectedItemIndex:t.selectedItemIndex,commit:g,onUpload:t.onUpload,size:C});const A=_.slot,D=_.slot.type,R=nR(a,A,w)??{kind:"owned"};if(D==="media")return d.jsx(NB,{label:a.label,itemSlot:A,offer:R,verbs:O,fixed:E,instanceId:r,slotId:l,ownerSlotId:k,value:v,propertyId:t.propertyId,commit:g,onUpload:t.onUpload,factPath:t.factPath,size:C});const F=D;return d.jsx(HU,{kind:F,label:a.label,itemSlot:A,offer:R,verbs:O,fixed:E,instanceId:r,slotId:l,ownerSlotId:k,value:v,propertyId:t.propertyId,commit:g,onUpload:t.onUpload,factPath:t.factPath,size:C},F)}case"media-manager":return null;case"poi-curation":return d.jsx(xI,{slot:a,fixed:E,value:c,propertyId:t.propertyId,commit:g});case"bullet-list":return _.kind!=="single"?null:d.jsx(NH,{slot:a,itemSlot:_.slot,add:O.add,fixed:E,value:c,commit:g,size:C});case"row-bar":{const A=Sk(a,b),D=_.kind==="single"?uf(_.slot):DB,R=t.rowTable??(A.kind!=="none"?A:D);return d.jsx(iH,{slot:a,face:e,rowTable:b.kind==="follows"&&R.kind==="table"?{...R,inert:!0}:R,verbs:O,fixed:E,value:v,commit:g})}}}const DB={kind:"none"};function LB({slot:e,items:t,onChange:a,membership:r,verbs:l,entries:c,fixed:u,propertyId:m,instanceId:p,slotId:g,factPath:b}){const{TablePicker:v,TableCreate:k}=Wt(),w=$j(b),j=w!==void 0?w:LH(Va(e)??{fields:{}}),[E,_]=x.useState(!1),[C,O]=x.useState(!1),A=r.kind==="pick-row"&&c!==null?lb(r):null,D=ob,R=t,F=x.useRef(R);x.useEffect(()=>{F.current=R});const L=v===void 0?null:()=>_(!0),T=A!==null&&L!==null&&l.choose!==null?{choose:l.choose,onChoose:L}:void 0,H=A===null?void 0:k===void 0?null:()=>O(!0),ne=r.kind==="table"?()=>({[D]:sj()}):void 0;return d.jsxs(d.Fragment,{children:[d.jsx(OB,{slot:e,value:t,onChange:Y=>a(Y),propertyId:m,instanceId:p,slotId:g,factPath:b,fields:j,fixed:u,...H!==void 0?{onAdd:H}:{},...ne!==void 0?{newRowStamp:ne}:{},add:l.add,...T!==void 0?{choose:T}:{}}),C&&A!==null&&c!==null&&k!==void 0&&d.jsx(k,{tables:A,onCreated:(Y,le)=>{if(O(!1),jd(F.current,c,D).includes(Y))return;const K=[mb(c,D,Y,le),...F.current];F.current=K,a(K)},onClose:()=>O(!1)}),E&&A!==null&&c!==null&&v!==void 0&&d.jsx(v,{open:!0,mode:"multi",tables:A,selectedIds:jd(R,c,D),onChange:(Y,le)=>{const K=RI(F.current,c,D,Y,le);F.current=K,a(K)},onClose:()=>_(!1)})]})}function zB({list:e,face:t,annotated:a,listTable:r,membership:l,itemBaseline:c,insideRecord:u,table:m,...p}){const g=Xj({instanceId:p.instanceId,slotId:p.slotId,membership:l,itemBaseline:c,insideRecord:u});return d.jsx(PO,{...p,annotated:a,offer:iR(e,a.mediaSlot,{itemTable:m,listTable:r,picksBy:l.kind==="pick-media"?l.filter:null}),markers:t==="compact"?g:null,table:m})}function $B({member:e,value:t,commit:a,...r}){const l=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(PO,{...r,annotated:e.annotated,offer:Id(e.annotated.mediaSlot,null),markers:null,value:l,table:null,commit:c})}function UB(e){return d.jsx(CO,{face:"expanded",...e})}function IB(e){return d.jsx(CO,{face:"compact",...e})}const HB={model:{defaultValue:[],coerce:e=>Array.isArray(e)?e:[],isEmpty:e=>e.length===0,isInvalid:()=>!1},faces:{expanded:UB,compact:IB},applyOptimistic:null};function BB(e,t){return e.toLocaleString("en-US",{useGrouping:t.thousandsSep===!0,maximumFractionDigits:t.decimals===!0?20:0})}function qB(e,t){const a=String(e??"").replace(/[^\d.]/g,"");if(a==="")return"";const[r,l]=a.split("."),c=(r??"").replace(/\B(?=(\d{3})+(?!\d))/g,",");return l!=null?`${c}.${l}`:c}function FB(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 $k(e,t,a){e.value=t,e.setSelectionRange(a,a)}function Uk(e,t){let a=e.replace(t!=null&&t.decimals?/[^\d.]/g:/[^\d]/g,"");if(t!=null&&t.decimals){const l=a.indexOf(".");l>=0&&(a=a.slice(0,l+1)+a.slice(l+1).replace(/\./g,""))}const r=a.replace(/[^\d]/g,"");return(t==null?void 0:t.maxDigits)!=null&&r.length>t.maxDigits?null:a}function PB({label:e,value:t,onChange:a,group:r,decimals:l,maxDigits:c,placeholder:u,onBlur:m,attention:p=null}){const g=k=>r?qB(k):k,b=g(t),v=ir();return d.jsx("div",{className:v.frame,children:d.jsx(Kr,{attention:p,children:d.jsx("input",{className:ae(v.inner,"[font-variant-numeric:tabular-nums]"),"aria-label":e,inputMode:l?"decimal":"numeric",value:b,placeholder:u??"0",onBlur:m,onChange:k=>{var A;const w=k.currentTarget,j=w.value,E=w.selectionStart??j.length,_=Uk(j,{decimals:l,maxDigits:c});if(_==null){const D=E-(j.length-b.length);$k(w,b,Math.min(Math.max(D,0),b.length));return}const C=g(_),O=((A=Uk(j.slice(0,E),{decimals:l}))==null?void 0:A.length)??0;$k(w,C,FB(C,O)),a(_)}})})})}function tp(e){return e==null?"":String(e)}function tg(e){const t=e.trim();if(t==="")return null;const a=Number(t);return Number.isFinite(a)?a:null}const RO={defaultValue:null,coerce:e=>typeof e=="number"?e:tg(typeof e=="string"?e:""),isEmpty:e=>e===null,isInvalid:()=>!1};function Ik({slot:e,value:t,onChange:a,required:r=!1}){const[l,c]=x.useState(()=>tp(t)),u=tg(l)===t?l:tp(t);return d.jsx(PB,{attention:nr(RO,e,t,r),label:e.label,value:u,onChange:m=>{c(m);const p=tg(m);p!==t&&a(p)},onBlur:()=>c(tp(t)),group:e.thousandsSep,decimals:e.decimals,maxDigits:e.maxDigits,placeholder:e.placeholder})}const VB={model:RO,faces:{expanded:Ik,compact:Ik},applyOptimistic:(e,t,a)=>Fj(e,t==null?"":BB(t,a))},TO={model:{defaultValue:"",coerce:bc,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 Hk(e){return d.jsx(ab,{kind:TO,...e})}const GB={model:TO.model,faces:{expanded:Hk,compact:Hk},applyOptimistic:null},KB="flex flex-col gap-2";function YB({slot:e,value:t,onChange:a,propertyId:r}){const{apiFetch:l}=Wt().api,[c,u]=x.useState(null),[m,p]=x.useState(null),g=x.useMemo(()=>t?[t]:[],[t]),{urls:b,dropUrl:v}=nO(r,g);async function k(w){if(u(null),(t==null?void 0:t.place_id)!==w.place_id){p(w);try{const j=await Zj(l,r,w.place_id);a(j)}catch{u("Couldn't add that place. Try again.")}finally{p(null)}}}return d.jsxs("div",{className:KB,children:[d.jsx(aO,{propertyId:r,placeholder:e.placeholder??"Search nearby…",addedIds:t?new Set([t.place_id]):new Set,onSelect:w=>void k(w)}),c&&d.jsx("span",{className:Jj,children:c}),m?d.jsxs("div",{className:ae(cb,eO),"aria-live":"polite",children:[d.jsx("span",{className:ub,children:d.jsx("span",{className:tO})}),d.jsxs("div",{className:db,children:[d.jsx("span",{className:fb,children:m.name}),d.jsx("span",{className:hb,children:"Adding…"})]})]}):t?d.jsx(iO,{row:t,photoUrl:b[t.place_id],onPhotoError:()=>v(t.place_id),onRemove:()=>a(null)}):d.jsx("div",{className:Q9,children:"No place yet. Search above to choose one."})]})}const QB={model:{defaultValue:null,coerce:sb,isEmpty:e=>e===null,isInvalid:()=>!1},faces:{compact:YB},applyOptimistic:null},XB=ae(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"),ZB=ae("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 WB(e){return e.length>0&&e.every(t=>t.description!==void 0)}function JB({label:e,value:t,options:a,onChange:r,attention:l}){const c=jl();return d.jsx("div",{className:ae(Vr,"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=bO(u.icon)?u.icon:null;return d.jsxs("button",{type:"button",role:"radio","aria-checked":u.value===t,className:XB,...Sl(l,c),onClick:()=>{u.value!==t&&r(u.value)},children:[m!==null&&d.jsx("span",{className:ZB,children:d.jsx(li,{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 DO={defaultValue:null,coerce:e=>typeof e=="string"?e:null,isEmpty:e=>e===null||e==="",isInvalid:()=>!1};function LO({cards:e,slot:t,value:a,onChange:r,required:l=!1}){const c=yO(t),u=t.creatable??!1,m=nr(DO,t,a,l);return e&&!u&&WB(c)?d.jsx(JB,{label:t.label,value:a,options:c,onChange:r,attention:m}):d.jsx(eg,{attention:m,label:t.label,value:a??"",options:c,creatable:u,placeholder:"Choose one",onChange:r})}function eq(e){return d.jsx(LO,{cards:!0,...e})}function tq(e){return d.jsx(LO,{cards:!1,...e})}const nq={model:DO,faces:{expanded:eq,compact:tq},applyOptimistic:null};function zO(){const e=window;return e.SpeechRecognition??e.webkitSpeechRecognition??null}function iq(){return x.useSyncExternalStore(()=>()=>{},()=>zO()!==null,()=>!1)}function aq({value:e,onChange:t,recording:a,onRecordingChange:r,onEnd:l}){const c=iq(),[u,m]=x.useState(0),p=x.useRef(null),g=x.useRef(""),b=x.useRef(""),v=x.useRef(t),k=x.useRef(l);x.useEffect(()=>{v.current=t,k.current=l},[t,l]),x.useEffect(()=>{if(!a)return;const E=setInterval(()=>m(_=>_+1),1e3);return()=>clearInterval(E)},[a]),x.useEffect(()=>()=>{var E;(E=p.current)==null||E.abort(),p.current=null},[]);const w=x.useCallback(()=>{const E=zO();if(!E||p.current)return;const _=new E;_.continuous=!0,_.interimResults=!0,_.lang=typeof navigator<"u"&&navigator.language||"en-US",g.current=e,b.current="",_.onresult=C=>{let O="",A="";for(let L=C.resultIndex;L<C.results.length;L++){const T=C.results[L];if(T===void 0)continue;const H=T[0].transcript;T.isFinal?O+=H:A+=H}O&&(b.current+=O);const D=b.current+A,R=g.current,F=!R||/\s$/.test(R)||/^\s/.test(D)?"":" ";v.current(R+F+D)},_.onerror=()=>{},_.onend=()=>{var C;p.current=null,r(!1),m(0),(C=k.current)==null||C.call(k)},p.current=_,m(0),r(!0);try{_.start()}catch{p.current=null,r(!1)}},[r,e]),j=x.useCallback(()=>{var E;(E=p.current)==null||E.stop()},[]);return{canDictate:c,seconds:u,start:w,stop:j}}function rq(e){return`${String(Math.floor(e/60)).padStart(2,"0")}:${String(Math.floor(e%60)).padStart(2,"0")}`}const oq={short:120,medium:240,long:2e3};function lq(e){return oq[e]}const $O={defaultValue:"",coerce:bc,isEmpty:e=>e.trim()==="",isInvalid:()=>!1};function UO(e){const t=e.slot.size??"short";return{size:t,cap:typeof e.slot.cap=="number"?e.slot.cap:lq(t)}}function IO({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 HO({slot:e,value:t,required:a=!1}){return nr($O,e,t,a)}const sq={medium:2,long:5};function BO(e){const{slot:t,value:a,onChange:r}=e,{size:l,cap:c}=UO(e),u=ir(),m={value:a,maxLength:c,placeholder:IO(e),"aria-label":t.label};return d.jsx("div",{className:u.frame,children:d.jsx(Kr,{attention:HO(e),count:{count:a.length,max:c,multiline:l!=="short"},children:l==="short"?d.jsx("input",{className:u.inner,...m,onChange:p=>r(p.target.value)}):d.jsx("textarea",{className:ae(u.inner,u.multiline),rows:u.inline?1:sq[l],...m,onChange:p=>r(p.target.value)})})})}function cq(e){return UO(e).size==="long"?d.jsx(uq,{...e,cap:typeof e.slot.cap=="number"?e.slot.cap:null}):d.jsx(BO,{...e})}function uq(e){const{slot:t,value:a,onChange:r,cap:l}=e,c=ir(),u=x.useRef(null),[m,p]=x.useState(!1),g=x.useCallback(()=>requestAnimationFrame(()=>{var w;return(w=u.current)==null?void 0:w.focus()}),[]),b=x.useCallback(w=>r(l===null?w:w.slice(0,l)),[r,l]),v=aq({value:a,onChange:b,recording:m,onRecordingChange:p,onEnd:g}),k=m?null:a.length>0?l===null?`${a.length.toLocaleString()} character${a.length===1?"":"s"}`:`${a.length.toLocaleString()} / ${l.toLocaleString()}`:v.canDictate?"Type, or tap the mic to dictate":"Type to fill this in";return d.jsx("div",{className:c.frame,children:d.jsxs(Kr,{attention:HO(e),className:"flex-col overflow-hidden",children:[d.jsx("textarea",{ref:u,className:ae(c.inner,"min-h-[calc(160*var(--content))] resize-none whitespace-pre-wrap pt-3.5 leading-[1.55]"),value:a,maxLength:l??void 0,placeholder:IO(e),"aria-label":t.label,onChange:w=>r(w.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:rq(v.seconds)}),"Listening…"]}):d.jsx("span",{className:ae(ZL(a.length,l??void 0),"font-sans text-caption"),children:k}),v.canDictate&&d.jsx("button",{type:"button",className:ae(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?v.stop:v.start,children:m?d.jsx("span",{className:"block size-2.75 rounded-[2px] bg-white","aria-hidden":"true"}):d.jsx(Y6,{size:16})})]})]})})}const dq={model:$O,faces:{expanded:cq,compact:BO},applyOptimistic:(e,t)=>Fj(e,bc(t))};function fq(e){if(e===void 0)return"Not a valid URL";const t=Object.entries(Qa).find(([r])=>r===e);if(t)return`Needs a ${t[1].label} link`;const a=hq(e);return a.length>0?`Needs a ${e} link (${a.join(", ")})`:`Needs a ${e} link`}function hq(e){return Object.values(Qa).filter(t=>t.kind===e).map(t=>t.label)}function mq(e,t){const a=Ns(e);return a===""?!1:Eg(a)?t.accepts!==void 0&&!c5(t.accepts,a):!0}const qO={model:{defaultValue:"",coerce:bc,isEmpty:e=>Ns(e)==="",isInvalid:mq},normalize:Ns,invalidMessage:(e,t)=>Eg(Ns(e))?fq(t.accepts):"Not a valid URL",inputType:"text",inputMode:"url",autoComplete:"url",placeholder:"https://",adornment:e=>d.jsx(pq,{draft:e})};function pq({draft:e}){const t=Ns(e);return d.jsx("span",{className:ae(QE,"pr-2.75"),children:Eg(t)?d.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:ae(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 Bk(e){return d.jsx(ab,{kind:qO,...e})}const gq={model:qO.model,faces:{expanded:Bk,compact:Bk},applyOptimistic:null};let qk=null;function yq(){return qk??(qk={text:dq,number:VB,select:nq,url:gq,email:L9,phone:GB,date:O9,image:jj,list:HB,poi:QB,video:Cj,tour:Aj,document:qj,media:$H,address:y9}),qk}function bq(){return BI}function Al(e){if(e==="row")return bq();const a=yq()[e];return a===void 0?null:a}function Nd(e,t={}){const a=lf(e);if(a!==null){const l={...t,fields:a.fields};return e.locked!==!0&&Object.values(a.fields).some(c=>Nd(c,l))}if(MI(e,t))return!1;const r=Al(e.type);return r?r.isEditable?r.isEditable(e):e.locked!==!0:!1}function FO(e){const t=e.filter(([,r])=>PS(r)),a=t.find(([,r])=>pn(r.type));return a?{mediaKey:a[0],mediaSlot:a[1],fields:t.filter(([r])=>r!==a[0])}:null}const vq="flex flex-col gap-1.5",xq="flex flex-col";function PO({label:e,annotated:t,offer:a,verbs:r,markers:l,fixed:c,instanceId:u,slotId:m,mediaSlotId:p,value:g,propertyId:b,table:v,selectedItemIndex:k,selectedFieldName:w,commit:j,onUpload:E,factPath:_,size:C}){const{mediaKey:O,mediaSlot:A,fields:D}=t,R=p??`${m}.${O}`,F=A.type,L=In(F),T=Qg(A),H=x.useMemo(()=>[[O,A],...D],[O,A,D]),ne=x.useMemo(()=>g.map(ye=>ye!==null&&typeof ye=="object"?{...ye}:{}),[g]),Y=tr({items:ne,...l?{identityOf:l.identityOf}:{},fixed:c,axis:"xy",commit:(ye,Re)=>{l==null||l.markOrder(ye),j(l?l.stamp(ye):ye,Re)}}),{rows:le}=Y,K=ye=>{var Re;return((Re=Al(F))==null?void 0:Re.model.coerce(ye[O]))??L.cleared},X=(ye,Re)=>({...ye,[O]:Re}),ue=(ye,Re,ht)=>{const $e=le.find(Lt=>Lt.key===ye);$e&&(l==null||l.markFields($e,{[Re]:ht($e.value)}),Y.updateValue(ye,Lt=>({...Lt,[Re]:ht(Lt)})))},M=ye=>{for(const Re of ye)l==null||l.markRemoved(Re);Y.removeMany(ye.map(Re=>Re.key))},V=ye=>X(Ho(H),ye),te=x.useMemo(()=>({get:ye=>F==="image"?K(ye):null,set:(ye,Re)=>X(ye,Re)}),[F,O]),me=w!==void 0&&w!==O,Q=Nj({engine:Y,lens:te,propertyId:b,instanceId:u,slotId:m,cropCfg:T}),N=hj(b,F),q=ye=>Rs(Fs(qs(_,ye),O),L.fileIdOf(K(ye))),I=x.useRef(null);x.useEffect(()=>{me&&I.current&&gO(I.current,w)},[me,w,k]);const[P,ee]=x.useState(!1),pe=Zy(A,{propertyId:b,instanceId:u,slotId:R}),se=E??pe??void 0,ke=a.kind==="owned"&&se!==void 0,z=Rj(se,ye=>Y.add(V(L.fromUploaded(ye,L.cleared)))),ce=ye=>{const Re=_l(le,ye,$e=>L.fileIdOf(K($e)),$e=>V(L.fromPicked($e,L.cleared)),Y.mint),ht=new Set(Re.map($e=>$e.key));for(const $e of le)ht.has($e.key)||l==null||l.markRemoved($e);Y.replace(Re)},{add:ge,onAdd:Ee,choose:Ue}=My(r,a.kind==="picked"?()=>ee(!0):null,a.kind==="owned"&&ke?ib([F],z):null),Le=z.error;return d.jsxs(Cy,{engine:Y,label:e,noun:L.noun,size:C,onAdd:Ee,add:ge,choose:Ue,renderTile:(ye,Re,ht)=>d.jsx("div",{className:xq,"data-annotated-item":Re,children:d.jsx(tb,{kind:F,value:K(ye.value),propertyId:b,holderPath:Fs(qs(_,ye.value),O),frame:{chrome:ht,beneath:D.length>0&&d.jsx("div",{className:vq,ref:Re===k?I:void 0,[yb]:"",children:d.jsx(Jd,{place:"cell",children:D.map(([$e,Lt])=>d.jsx("div",{[Od]:$e,children:d.jsx(xc,{slot:Lt,instanceId:u,slotId:m,value:ye.value[$e],propertyId:b,onChange:st=>ue(ye.key,$e,()=>st),recordContext:{itemIndex:Re,fieldKey:$e,table:v}})},$e))})}),crop:F==="image"?{cfg:T,cut:Q.cutOf(ye),derivativeUrl:Q.derivativeOf(ye),cropping:N.recropping(q(ye.value)),storeKey:Q.keyOf(ye.key)}:null}})}),onRemove:M,tileActions:ye=>{const Re=q(ye.value),ht=[];return N.offers(Re)&&ht.push({label:"Crop",glyph:"crop",onSelect:()=>N.framing?Q.open(ye.key):N.recrop(Re,Q.keyOf(ye.key))}),ht},children:[Le&&d.jsx("p",{className:wl,children:Le}),P&&a.kind==="picked"&&d.jsx(yc,{mode:"multi",propertyId:b,filter:a.filter,selectedIds:le.map(ye=>L.fileIdOf(K(ye.value))),onChange:ce,onClose:()=>ee(!1)}),N.framing&&Q.modal(),N.modal]})}const wq={floor:"floor_label"},np=e=>wq[e]??e;function kq(e){const a={...bl.pages,...Wa.pages}[e];return a?a.declaration:null}function Sq(e,t){const a=Yg(e,t);if(a===null)return null;const r=kq(a.table),l=r?Va(r):null,c=l==null?void 0:l.fields[a.member],u=c?Va(c):null;if(!u||!Pg(u.fields))return null;const m=FO(Ol(u));if(m===null)return null;const{mediaKey:p,fields:g}=m,b=new Set(g.map(([v])=>np(v)));return{annotated:m,toItem:v=>{const k=v!==null&&typeof v=="object"?v:{},w={};for(const[E,_]of Object.entries(k))b.has(E)||(w[E]=_);const j={[p]:w};for(const[E]of g)j[E]=k[np(E)]??null;return j},toStored:v=>{const k=v[p],w=k!==null&&typeof k=="object"?{...k}:{};for(const[j]of g){const E=v[j];w[np(j)]=typeof E=="string"&&E.trim()===""?null:E??null}return w}}}const Eq=ae(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");ae(Eq,"text-accent");ae("absolute inset-0 grid place-items-center font-mono text-[12px] text-ink-3",YE);ae(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 ng(e,t){const a=e.variant;return!a||t==null?!0:a.cases.includes(t)}const Fk=new WeakMap;function ig(e,t){const a=e.element;if((a==null?void 0:a.fields)===void 0)return e;const r=Fk.get(e)??new Map;Fk.set(e,r);const l=r.get(t);if(l!==void 0)return l;const c=_q(a.fields,t),u=c===a.fields?e:{...e,element:{...a,fields:c}};return r.set(t,u),u}function _q(e,t){let a=!1;const r={};for(const[l,c]of Object.entries(e)){if(!ng(c,t)){a=!0;continue}const u=ig(c,t);u!==c&&(a=!0),r[l]=u}return a?r:e}function jq(e){const t=Object.keys(e.slots),a=e.slot_order;if(!a||a.length===0)return t;const r=new Set,l=[];for(const c of a)c in e.slots&&!r.has(c)&&(r.add(c),l.push(c));for(const c of t)r.has(c)||l.push(c);return l}function Pk(e,t,a,r,l=!1){return{kind:"object",key:e,header:t,Icon:mO(a.map(c=>c.slot)),fields:a,selectSlotId:r,lone:l}}function VO(e,t){const a=[];for(const r of jq(e)){const l=e.slots[r];if(!ng(l,t)||!Nd(l,{slots:e.slots}))continue;const c=lf(l);if(c!==null){const u={slots:e.slots,fields:c.fields},m=Ol(c).filter(([,p])=>Nd(p,u)&&ng(p,t)).map(([p,g])=>({slotId:oO(r,p),slot:ig(g,t)}));if(m.length===0)continue;a.push(Pk(r,fl(c,r),m,r));continue}a.push(Pk(r,{kind:"text",text:l.label},[{slotId:r,slot:ig(l,t)}],r,!0))}return a}function Oq(e,t,a){if(e.header.kind==="text")return e.header.text;const r=lf(t.slots[e.key]);return r===null?e.key:sf(e.header,r,a(e.key))}function Vk(e){var t;return((t=vc(e.slotId))==null?void 0:t.field)??e.slotId}function Gk(e,t){return e.key===t||e.fields.some(a=>a.slotId===t)}function Aq(e){return e.fields.map(t=>t.slotId)}function Nq(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 Mq(e,t,a){const r=[];for(const l of VO(e,t))for(const{slotId:c,slot:u}of l.fields)u.variant&&Nq(a(c))&&r.push(c);return r}function Md(e,t){const a=Object.entries(Kg(e)).filter(([,l])=>Ng(l)==="address").map(([l])=>l);return t[e].map(l=>{const c={...l};for(const u of a)c[u]=xi(l[u]);return c})}function ag(e,t,a){const r=ZS(e,a);if(r.kind==="identity")return t.id??null;if(r.kind==="unknown")return null;const l=a.indexOf(".");if(l===-1)return t[a]??null;const c=a.slice(l+1);return Dd(c)?b5(t[a.slice(0,l)],c):null}function GO(e,t,a){return Md(e,a).find(r=>r.id===t)}function Cq(e,t,a,r){const l=GO(e,t,r);return l===void 0?null:ag(e,l,a)}function rg(e,t,a,r={},l){const c=KS(a);return Rq(e,t,G3(a),c,r,l)}function Rq(e,t,a,r,l,c){return(c===void 0?Md(e,t):c.flatMap(m=>{const p=GO(e,m,t);return p===void 0?[]:[p]})).map(m=>{const p={id:m.id};for(const g of r)p[g]=m.id;for(const[g,b]of Object.entries(a))p[g]=ag(e,m,b);for(const[g,b]of Object.entries(l))p[g]=b(v=>ag(e,m,v),m.id);return p})}function Tq(e,t){if(dd(t))return eR(t,e);if(X3(t))return e[t.slice(9)];const a=on(t);if(a!==null)return Md(a,e);const r=F5(t);if(r!==null)return Md(r.table,e).map(l=>l[r.member]??null)}function Dq(e,t,a,r){const l=on(e);return ad(l!==null?rg(l,t,a,r):Tq(t,e)??null)}function Lq(e,t,a,r,l){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 Dq(a.key,c,ud(e));if(a.kind==="member"){const u=l(a.holder);if(typeof u!="string"||u==="")return;const m=v4(c,a.tables,u);return m===null?void 0:Cq(m,u,a.member,c)}}}function zq(e,t,a,r){if(a.kind==="computed"){const c=Object.hasOwn(r.computed,t)?r.computed[t]:void 0;return Array.isArray(c)?c.filter($q):void 0}const{facts:l}=r;if(l!==null){if(a.kind==="fact")return a.table===null?void 0:rg(a.table,l,ud(e));if(a.kind==="rows")return a.tables.flatMap(c=>rg(c,l,ud(e)))}}function $q(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Uq(){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(li,{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 Iq(e){const t=e.source;return t==null?void 0:t.kind}function Kk(e,t,a,r,l){const c=r.type;if(c==="row")return{kind:"row",tables:Us(r)};const u=dc(r.source);if(u!==null){const p=g4(e,t,u.slot);return(p==null?void 0:p.kind)==="row"?{kind:"member",holder:p.path,tables:Us(p.def),member:u.field}:null}if(c==="list"){const p=U9(l.fillSpec,a),g=Kj(r,p,l.sectionSlots),[b,...v]=g.kind==="table"?[]:rb(g);if(b!==void 0)return{kind:"rows",tables:[b,...v]}}if(m4(r)!==null)return{kind:"slot"};const m=Iq(r);if(m==="home"){const p=r.source.key;return typeof p=="string"&&p!==""?{kind:"fact",key:p,table:on(p)}:null}return m==="derived"?{kind:"computed"}:null}function Hq(e,t={}){const a=[];for(const[r,l]of Object.entries(e)){if(l.type==="object"){const u=l.fields??{},m={container:r,siblings:u};for(const[p,g]of Object.entries(u)){const b=oO(r,p),v=Kk(e,m,b,g,t);v!==null&&a.push([b,v])}continue}const c=Kk(e,{},r,l,t);c!==null&&a.push([r,c])}return a}function Bq(e){return e.kind==="member"||e.kind==="fact"||e.kind==="rows"}function KO(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"?Qk(e)===Qk(t):Yk(e)===Yk(t)}function Yk(e){return typeof e=="string"?e:typeof e=="number"||typeof e=="boolean"||typeof e=="bigint"?String(e):JSON.stringify(e)??""}function Qk(e){const t=xi(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(([l],[c])=>l.localeCompare(c))):r)}const ip=2.5,qq=1;function Gu(e){return e?e.closest(".we-acc-head"):null}function js(e){return e.closest(".we-acc")}function Xk(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 Fq(e){e.style.removeProperty("--gx"),e.style.removeProperty("--gy")}function Pq(){x.useEffect(()=>{var g;if(typeof window>"u"||(g=window.matchMedia)!=null&&g.call(window,"(prefers-reduced-motion: reduce)").matches)return;let e=null,t=ip;const a=typeof ResizeObserver<"u"?new ResizeObserver(()=>{e&&Xk(e,t)}):null,r=(b,v)=>{b&&(e&&e!==b&&l(e),e=b,t=v,Xk(b,v),a==null||a.observe(b))},l=b=>{b&&(a==null||a.unobserve(b),Fq(b),e===b&&(e=null))},c=b=>{const v=Gu(b.target);v&&r(js(v),ip)},u=b=>{const v=Gu(b.target);if(!v)return;const k=b.relatedTarget;k&&v.contains(k)||l(js(v))},m=b=>{const v=Gu(b.target);v&&r(js(v),qq)},p=b=>{const v=Gu(b.target);v&&(v.matches(":hover")?r(js(v),ip):l(js(v)))};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 Zk=2;function Wk(e){const t=new URLSearchParams;for(const[r,l]of Object.entries(e))l!=null&&l!==""&&t.set(r,l);const a=t.toString();return a===""?"":`?${a}`}const Sr={catalog:"api/catalog",render:"api/render",media:e=>`api/media${Wk({fixture:e})}`,capture:(e,t)=>`api/capture/${e}${Wk({fixture:t.fixture,format:t.format,page:t.page,canvas:t.canvas})}`,live:(e,t)=>`fixtures/${encodeURIComponent(e)}/live${t==="/"?"/":`${t}/`}`,hmr:"__hmr"},Vq={source:"source:changed",stylesheet:"stylesheet:changed",fixtures:"fixtures:changed"};async function Jk(e,t){const a=(await t.text().catch(()=>"")).trim();return new Error(a===""?`${e}: HTTP ${t.status}`:a)}function Gq(e,t=(a,r)=>fetch(a,r)){const a=l=>new URL(l,e).href,r=async l=>{const c=await t(a(l));if(!c.ok)throw await Jk(l,c);return await c.json()};return{base:e,async catalog(){const l=await r(Sr.catalog);if(l.wire!==Zk)throw new Error(`This playground speaks wire ${Zk}, and its host answered with wire ${String(l.wire)}.`);return l},async render(l){const c=await t(a(Sr.render),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(l)});if(!c.ok)throw await Jk(Sr.render,c);return await c.json()},media:l=>r(Sr.media(l)),captureHref:(l,c)=>a(Sr.capture(l,c)),liveHref:(l,c)=>a(Sr.live(l,c)),subscribe(l){let c;try{c=new EventSource(a(Sr.hmr))}catch{return()=>{}}const u=Object.entries(l).map(([m,p])=>{const g=Vq[m],b=()=>p();return c.addEventListener(g,b),()=>c.removeEventListener(g,b)});return()=>{for(const m of u)m();c.close()}}}}let og=null;function Kq(e){og=e}function Yq(){if(og===null)throw new Error("The playground's host is not installed yet.");return og}let YO=null;function Qq(e){YO=e}function Xq(){return YO}function e2(e,t){return`${e} ${t}${e===1?"":"s"}`}function Zq(e){const t=[e.listingIntent].filter(r=>r!==null).map(r=>r.replaceAll("_"," "));t.push(e2(e.units,"unit"),e2(e.photos,"photo"));const a=t.join(", ");return a.charAt(0).toUpperCase()+a.slice(1)}function Wq(e){return`${e.label} (${Zq(e.summary)})`}const Jq={sectionInstanceId:cf,slotId:A9,slotGroup:N9,slotItem:M9,slotField:C9,slotUnselectable:R9};function eF(e,t){return`${e}${e.includes("?")?"&":"?"}v=${encodeURIComponent(t)}`}function tF(e){return{basePath:e.basePath,stylesheets:e.stylesheets.map(t=>eF(t,e.cssRev)),importMap:e.importMap,islandMap:e.islands,hostScriptSrc:e.hostScript,hostResolvesOwnImports:Object.keys(e.importMap).length===0}}function t2(e){const t=e.sectionSchemaByInstance??{};return{markers:Jq,assets:tF(e),...e.pageBox===void 0?{}:{pageBox:e.pageBox},isSlotEditable:(a,r,l)=>{var u,m,p,g;const c=(u=t[a])==null?void 0:u.slots[r];return c===void 0||c.locked===!0?!1:l===void 0||((g=(p=c.fields??((m=c.element)==null?void 0:m.fields))==null?void 0:p[l])==null?void 0:g.locked)!==!0}}}const nF=/^\/properties\/[^/]+\/poi\/search$/,iF=/^\/properties\/[^/]+\/poi\/([^/]+)$/,lg=[{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 aF(e){const t=typeof e=="object"&&e!==null?e.query:void 0,a=typeof t=="string"?t.trim().toLowerCase():"";return a?{results:lg.filter(r=>{var l;return r.name.toLowerCase().includes(a)||(((l=r.address)==null?void 0:l.toLowerCase().includes(a))??!1)})}:{results:lg}}let rF=0;function oF(e,t={}){const a=(t.method??"GET").toUpperCase();if(a==="POST"&&nF.test(e))return Promise.resolve(aF(t.json));const r=a==="GET"?iF.exec(e):null;if(r){const l=decodeURIComponent(r[1]),c=lg.find(u=>u.place_id===l);if(c)return Promise.resolve({...c,id:`pg-row-${++rF}`})}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 lF(e,t,a){const r=Math.min(Math.max(Math.round(e.nx*t),0),Math.max(t-1,0)),l=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-l),1);return{sx:r,sy:l,sw:c,sh:u}}function sF(e,t){return new Promise((a,r)=>{const l=t.createElement("img");l.onload=()=>a(l),l.onerror=()=>r(new Error(`Could not load ${e} to crop it.`)),l.src=e})}async function cF(e,t,a=document){const r=await sF(e,a),{sx:l,sy:c,sw:u,sh:m}=lF(t,r.naturalWidth,r.naturalHeight),p=a.createElement("canvas");p.width=u,p.height=m;const g=p.getContext("2d");if(!g)throw new Error("No 2d canvas context; cannot crop.");g.drawImage(r,l,c,u,m,0,0,u,m);const b=await new Promise(v=>p.toBlob(v));if(!b)throw new Error("Canvas produced no blob; cannot crop.");return URL.createObjectURL(b)}const mf="2026-01-01T00:00:00.000Z",n2=new Map;function Sb(e){let t=n2.get(e);return t===void 0&&(t=Yq().media(e).catch(()=>({items:[],contacts:[],lists:{}})),n2.set(e,t)),t}async function uF(e){const{items:t,lists:a}=await Sb(e);return C5(a,dF(t))}function dF(e){return[...mF(e),...pF(e),...gF(e),...yF(e)]}async function fF(e){return(await Sb(e)).contacts}async function hF(e,t){var c;const{items:a,contacts:r}=await Sb(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 mF(e){return e.filter(t=>t.kind==="photo").map(t=>Zd({id:t.id,kind:"image",name:t.name,added_at:mf,file_url:t.src}))}function pF(e){return e.filter(t=>t.kind==="video").map(t=>{const a=t.provider!==void 0,r=t.src===""?{}:{poster:t.src},l=!a&&(t.ready??!0)?{encode:t.src}:{};return Zd({id:t.id,kind:"video",name:t.name,added_at:mf,duration_ms:t.durationMs??null,url:a?"":null,provider:t.provider??null,renditions:{...r,...l}})})}function gF(e){return e.filter(t=>t.kind==="tour").map(t=>Zd({id:t.id,kind:"tour",name:t.name,added_at:mf,url:t.url??"",provider:t.provider??null,renditions:t.src===""?{}:{poster:t.src}}))}function yF(e){return e.filter(t=>t.kind==="document").map(t=>Zd({id:t.id,kind:"document",name:t.name,added_at:mf,mime:t.mime??null,bytes:t.sizeBytes??null,renditions:t.src===""?{}:{poster:t.src}}))}function bF(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 vF(e){return uF(e)}function xF(e,t,a){return bF("Pasting a link")}const wF=/^processed\/crops\/([^/]+)\/(-?[\d.e-]+)_(-?[\d.e-]+)_(-?[\d.e-]+)_(-?[\d.e-]+)$/,i2=new Map;function kF(e,t){const a=wF.exec(t);if(a===null)return Promise.reject(new Error(`Unknown crop ${t}.`));const[,r,l,c,u,m]=a,p={nx:Number(l),ny:Number(c),nw:Number(u),nh:Number(m)};let g=i2.get(t);return g||(g=hF(e,r).then(b=>{if(!b)throw new Error(`The fixture's property has no media ${r} to crop.`);return cF(b,p)}),i2.set(t,g)),g}async function SF(e,t,a){var p;const[r,l]=t.split(".");if(e.home!=="library"||r!=="contacts")throw new Error(`The fixture holds no owned media at '${t}'.`);const c=Xq(),m=(p=(c===null?[]:await fF(c)).find(g=>g.id===l))==null?void 0:p.images[a];if(m===void 0)throw new Error(`The fixture's contact ${l} has no image ${a}.`);return m}function pf(){return Promise.reject(new Error("Uploads are served by the host application. The dev media pack is read-only."))}function EF(e,t,a){return pf()}function _F(e,t,a){return pf()}function jF(e,t,a){return pf()}function OF(e,t,a){return pf()}const Eb="Uploading is served by the host application; the playground has no upload backend.";function AF(e,t,a,r){return Promise.reject(new Error(Eb))}function NF(e,t,a,r){return Promise.reject(new Error(Eb))}function MF(e,t,a){return Promise.reject(new Error(Eb))}const CF={postListUploadWithProgress:AF,postListLink:NF,withdrawListItem:MF,mediaFactsQuery:e=>({queryKey:["media-facts",e],queryFn:async()=>({facts:await vF(e)})})};function sg(e){return e===null||typeof e!="object"?JSON.stringify(e)??"undefined":Array.isArray(e)?`[${e.map(sg).join(",")}]`:`{${Object.keys(e).sort().map(t=>`${JSON.stringify(t)}:${sg(e[t])}`).join(",")}}`}function RF(e){return Array.isArray(e)?e.filter(t=>t!==null&&typeof t=="object"&&!Array.isArray(t)):[]}function TF(e,t,a){const r=new Map(t.map(l=>[l[a],l]));return RF(e).some(l=>{const c=r.get(l[a]);return c!==void 0&&Object.keys(c).some(u=>u in l&&!KO(l[u],c[u]))})}function DF(e,t,a,r,l,c){if(a.kind==="rows"){const m=zq(e,t,a,l);return m!==void 0&&TF(r,m,ob)}const u=Lq(e,t,a,l,c);return u===void 0?!1:Kz(r)?Qi(r)!==Qi(u):!KO(r,u)}function LF(e,t,a){if(t===null)return[];const r={facts:t.facts,computed:t.computed},l=u=>td(e.slots,u)??td(t.resolvedProps.slots,u),c=[];for(const[u,m]of Hq(a.slots)){if(!Bq(m))continue;const p=td(e.slots,u),g=Hg(a.slots,u);p===void 0||g===void 0||!DF(g,u,m,p,r,l)||c.push({id:`${u}:scalar::@${sg(p)}`,kind:"scalar",label:g.label,slotId:u})}return c}const zF={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 $F(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] ${zF[t.kind]}`,children:t.kind},t.kind))})}function UF(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($F,{chips:e.chips})})]})}function IF(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 QO(e){const{variant:t}=e;return t===null||t.locked||t.cases.length<2?null:t.cases}function HF(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 BF(e,t,a){const r=new Map;for(const l of e){const{kind:c,ref:u}=HF(t==null?void 0:t[l],a(l));r.set(c,[...r.get(c)??[],{id:l,ref:u}])}return[...r].map(([l,c])=>({kind:l,slots:c}))}const a2="grid h-8 w-8 cursor-pointer place-items-center rounded-md border-0 p-0 transition-colors";function qF(e){const t=IF(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:`${a2} 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(li,{name:t.hidden?"eyeOff":"eye",size:15,stroke:1.8})}),QO(e.display)?d.jsx("button",{type:"button","data-testid":"section-gear",onClick:e.onOpenSettings,title:"Section settings","aria-label":"Section settings",className:`${a2} bg-transparent text-ink-2 hover:bg-[rgba(20,18,13,0.06)] hover:text-ink`,children:d.jsx(li,{name:"settings",size:15,stroke:1.8})}):null]})]})}const FF=ae("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 PF(e){const t=QO(e.display),a=Mq(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(li,{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:FF,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 VF(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function r2(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 GF(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 o2(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 KF({items:e,onApply:t}){const a=e??[],r=a.length,l=a.map(ne=>ne.id).join("|"),[c,u]=x.useState(!1),[m,p]=x.useState("idle"),[g,b]=x.useState(!1),[v,k]=x.useState(0),w=x.useRef(null),j=x.useRef(null),E=x.useRef(null),_=x.useRef(null),C=x.useRef(a),O=x.useRef(!0);x.useLayoutEffect(()=>{C.current=a});const A=x.useRef(VF()).current,D=x.useCallback(ne=>{const Y=w.current;if(A||document.hidden||Y==null||typeof Y.animate!="function"){b(!1),u(!1),p("idle"),ne==null||ne();return}b(!0);const le=Y.animate([{opacity:1,transform:"none"},{opacity:0,transform:"translateY(6px)"}],{duration:240,easing:"cubic-bezier(.4,0,.2,1)",fill:"forwards"});le.onfinish=()=>{b(!1),u(!1),p("idle"),ne==null||ne()}},[A]);x.useEffect(()=>(j.current!=null&&clearTimeout(j.current),r>0&&m==="idle"?l!==_.current&&!c&&(j.current=setTimeout(()=>{u(!0)},550)):r===0&&c&&!g&&m==="idle"&&D(),()=>{j.current!=null&&clearTimeout(j.current)}),[r,l,c,m,g,D]),x.useLayoutEffect(()=>{if(!c||m!=="idle"||A||g)return;const ne=w.current;ne!=null&&typeof ne.animate=="function"&&!document.hidden&&ne.animate([{opacity:.45,transform:"translateY(10px)"},{opacity:1,transform:"none"}],{duration:420,easing:"cubic-bezier(.18,.82,.25,1)"})},[c,m,A,g]),x.useEffect(()=>{if(m!=="applying")return;const ne=Y=>{Y.preventDefault(),Y.returnValue=""};return window.addEventListener("beforeunload",ne),()=>window.removeEventListener("beforeunload",ne)},[m]),x.useEffect(()=>(O.current=!0,()=>{O.current=!1,j.current!=null&&clearTimeout(j.current),E.current!=null&&clearTimeout(E.current)}),[]);const R=()=>{const ne=C.current;k(ne.length),p("applying"),(async()=>{try{if(await t(ne),!O.current)return;u(!1),p("success"),E.current!=null&&clearTimeout(E.current),E.current=setTimeout(()=>{D(()=>{_.current=null})},1200)}catch{if(!O.current)return;p("error")}})()},F=()=>{_.current=l,D()};if(!c&&m!=="success"&&!g)return null;const L=m==="applying",T=L?v:r,H=T===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:T})," 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:w,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(GF,{})}),"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:F,"aria-label":"Dismiss",children:d.jsx(o2,{})})]}),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(r2,{})]})]}):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:[H,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:F,disabled:L,"aria-label":"Dismiss",children:d.jsx(o2,{})})]}),d.jsx("button",{type:"button","data-action":"apply",disabled:L,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:L?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(r2,{})]})})]})})})})}const YF="Real editor chrome. The playground has no linked sources, so this cannot update anything — the flow above is a preview.",QF="Nothing was updated. In the app this writes the change to every deliverable sharing the linked source.";function XF({items:e}){const[t,a]=x.useState([]),r=e.filter(u=>!t.includes(u.id)),l=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(KF,{items:r,onApply:c})}),r.length>0||l?d.jsx("p",{className:"instance-panel__we-caption","data-testid":"we-caption","data-phase":l?"applied":"preview",children:l?QF:YF}):null]})}const ZF={apiFetch:oF,getCropDerivativeUrl:kF,postLink:xF,stageOwnedMedia:EF,ownedMediaUrl:SF,discardStagedMedia:_F,uploadContentMedia:jF,contentMediaUrl:OF};function WF(e,t,a){return x.useMemo(()=>{const r={session:{property_id:e,listing_intent:null},select:l=>{if(l===null){a(null);return}if(l.kind==="section"){a({kind:"section",instanceId:l.instance_id});return}a({kind:"slot",instanceId:l.instance_id,slotId:l.slot_id,...l.item_index!==void 0?{itemIndex:l.item_index}:{}})},markSlotOverridden:()=>{},relinkSlot:()=>{}};return{useEditorStore:l=>l(r),capabilities:{},api:ZF,MediaPicker:JF}},[e,t,a])}function JF(e){return d.jsx(B7,{...e,capabilities:{upload:!1,manage:!1}})}function eP(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 tP(e,t){var a;return BF(t,(a=e.payload)==null?void 0:a.provenance,r=>e.override.slots[r]!==void 0)}function Ds(e,t){var l;const a=vc(t);if(a!==null)return td({[a.object]:Ds(e,a.object)},t);const r=e.override.slots[t];return r!==void 0?r:(l=e.payload)==null?void 0:l.resolvedProps.slots[t]}function nP(e,t,a){const r=vc(t);if(r===null)return e.onApplySlot(t,a);const l=jI({[r.object]:Ds(e,r.object)},t,a)[r.object];e.onApplySlot(r.object,l)}function iP(e){var m;const t=WF(e.fixture,e.selection,e.onSelect);Pq();const a=x.useMemo(()=>new GT,[]),r=e.displayState.variant,l=x.useMemo(()=>VO(e.sectionSchema,r),[e.sectionSchema,r]),c=x.useMemo(()=>LF(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(PF,{instanceId:e.instanceId,label:e.label,display:e.display,sectionSchema:e.sectionSchema,variant:r,slotValue:p=>Ds(e,p),onSetVariant:e.onSetVariant,onBack:e.onCloseSettings}):d.jsx(qF,{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(KT,{client:a,children:d.jsx(x8,{api:CF,children:d.jsx(e8,{ports:t,children:d.jsx(Jd,{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:[l.map(p=>d.jsx(UF,{chips:tP(e,Aq(p)),children:d.jsx(pO,{open:u!=null&&Gk(p,u),onToggle:()=>u!=null&&Gk(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:Oq(p,e.sectionSchema,g=>Ds(e,g)),scrollKey:p.key,children:d.jsx(bb,{fields:p.fields.map(g=>[Vk(g),g.slot]),lone:p.lone,renderField:(g,b)=>{const v=p.fields.find(k=>Vk(k)===g).slotId;return d.jsx(xc,{slot:b,instanceId:e.instanceId,slotId:v,value:Ds(e,v),propertyId:e.fixture,onChange:k=>nP(e,v,k),selectedItemIndex:eP(e,v)})}})})},p.key)),l.length===0?d.jsx("p",{className:"instance-panel__empty","data-testid":"no-editable-slots",children:"Nothing to edit in this section."}):null]}),d.jsx(XF,{items:c})]})})})})})]})}function aP(e,t){return e.find(a=>a.pages.includes(t))??null}function rP(e,t,a,r){const l=t.endsWith("/")?t:`${t}/`;if(!e.startsWith(l))return null;const c=e.indexOf("#"),u=c===-1?null:e.slice(c+1),m=(c===-1?e:e.slice(0,c)).slice(l.length).split("/").filter(Boolean),[p,g,b,v,...k]=m;if(p!=="fixtures"||g===void 0||b!=="live"||k.length>0)return null;const w=v===void 0?"/":`/${decodeURIComponent(v)}`,j=a.find(_=>_.path===w);if(!j)return null;const E=aP(r,j.id);return E?{pageId:j.id,canvasId:E.id,anchor:u||null}:null}const ap="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]",oP="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]",lP="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]",sP="cursor-not-allowed border-line bg-[#f3f1ea] text-ink-4";function cP({host:e,templateName:t,fixture:a,output:r,format:l,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:l,canvas:c}),title:`Download every page of this canvas as a zip — ${t}`}:r==="document"?{href:e.captureHref("print",{fixture:a,format:l}),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:`${ap} ${oP}`,children:[d.jsx("span",{className:"grid place-items-center text-ink-3 transition-colors group-hover:text-ink",children:d.jsx(li,{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:`${ap} ${lP}`,children:[d.jsx(IE,{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:`${ap} ${sP}`,children:d.jsx("span",{children:"Publish"})})]})})}function uP(e,t,a,r){const l=e.ownerDocument,c=[],u=new Map;for(const m of Array.from(e.children)){const p=m,g=p.getAttribute(cf);g&&u.set(g,p)}for(const m of t){const p=u.get(m.instance_id),g=(p==null?void 0:p.dataset.svId)!==m.section_version_id;p&&g&&(r==null||r(p),p.remove());const b=p&&!g,v=b?p:a(m,l);b||c.push(v),e.appendChild(v),u.delete(m.instance_id)}return u.forEach(m=>{r==null||r(m),m.remove()}),c}function XO(e){return e==null?void 0:e.__trCanvasIslands}function dP(e,t,a,r){const l=e==null?void 0:e.querySelector(`[${cf}="${a}"]`);if(!l)return!1;const c=l.querySelector(":scope > .we-section-body")??l,u=XO(t);return u==null||u.unmountRoot(l),c.innerHTML=r,u==null||u.hydrateRoot(l),!0}function fP(){return{slots:{}}}function Ks(e,t,a){var r;return((r=e[t])==null?void 0:r[a])??fP()}function _b(e,t,a,r){return{...e,[t]:{...e[t],[a]:r}}}function hP(e,t,a,r,l){const c=Ks(e,t,a);return _b(e,t,a,{...c,slots:{...c.slots,[r]:l}})}function mP(e,t,a,r){return _b(e,t,a,{...Ks(e,t,a),enabled:r})}function pP(e,t,a,r){return _b(e,t,a,{...Ks(e,t,a),variant:r})}function gP(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 yP(e,t){const a={};for(const[r,l]of Object.entries(e[t]??{}))Object.keys(l.slots).length>0&&(a[r]={slots:l.slots});return a}function bP(e,t){const a={};for(const[r,l]of Object.entries(e[t]??{}))l.enabled===void 0&&l.variant===void 0||(a[r]={...l.enabled===void 0?{}:{enabled:l.enabled},...l.variant===void 0?{}:{variant:l.variant}});return a}function vP(e,t){return Object.keys(e).filter(a=>t[a]!==e[a])}function xP(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 l2(e,t,a,r){return{...e,[t]:{...e[t],[a]:r}}}function wP(e,t,a){const r=e[t];if(!r||!(a in r))return e;const l={...r};return delete l[a],{...e,[t]:l}}function kP(e){const{host:t,fixture:a,doc:r,resolvedDisplay:l,sessions:c,pages:u,frameFor:m}=e,{edits:p,setEdits:g}=c,[b,v]=x.useState({}),[k,w]=x.useState({}),j=[a,r??"",...u.map(Q=>Q.id)].join("\0"),[E,_]=x.useState(j);E!==j&&(_(j),v({}),w({}));const C=x.useRef(b);C.current=b;const O=x.useRef(m);O.current=m;const A=x.useRef(u);A.current=u;const D=x.useRef(p);D.current=p;const R=x.useRef(a);R.current=a;const F=x.useRef(r);F.current=r;const L=x.useRef(new Map),T=x.useCallback(Q=>Ks(p,a,Q),[p,a]),H=x.useCallback((Q,N)=>{var q;return((q=k[Q])==null?void 0:q[N])??null},[k]),ne=x.useCallback(Q=>{var N;for(const q of u){const I=(N=k[q.id])==null?void 0:N[Q];if(I!==void 0)return I}return null},[k,u]),Y=x.useCallback(Q=>{var N;for(const q of u){const I=(N=b[q.id])==null?void 0:N[Q];if(I)return I}return null},[b,u]),le=x.useCallback(Q=>{var N;return gP(Ks(p,a,Q),((N=Y(Q))==null?void 0:N.display)??(l==null?void 0:l[Q]))},[p,a,Y,l]),K=x.useCallback(async(Q,N,q)=>{var z;const I=Q.id,P=R.current,ee=F.current,pe=`${I}\0${N}`,se=(L.current.get(pe)??0)+1;L.current.set(pe,se);const ke=()=>P!==R.current||ee!==F.current||L.current.get(pe)!==se;try{const ce=await t.render({page:I,instance:N,fixture:P,session:yP(D.current,P),display:bP(D.current,P)});if(ke())return;const ge=(z=C.current[I])==null?void 0:z[N];if(v(Le=>l2(Le,I,N,ce)),w(Le=>wP(Le,I,N)),!q||(ge==null?void 0:ge.html)===ce.html)return;const{doc:Ee,win:Ue}=O.current(I);dP(Ee,Ue,N,ce.html)}catch(ce){if(ke())return;const ge=ce instanceof Error?ce.message:String(ce);w(Ee=>l2(Ee,I,N,ge))}},[t]),X=x.useCallback((Q,N)=>{var I;if((I=C.current[Q])!=null&&I[N])return;const q=A.current.find(P=>P.id===Q);q&&K(q,N,!1)},[K]),ue=x.useCallback(Q=>{var N;for(const q of A.current)((N=C.current[q.id])==null?void 0:N[Q])!==void 0&&K(q,Q,!0)},[K]),M=x.useCallback(Q=>{D.current=Q,g(Q);for(const N of A.current)for(const q of Object.keys(C.current[N.id]??{}))K(N,q,!0)},[K,g]),V=x.useCallback((Q,N,q)=>{M(hP(D.current,R.current,Q,N,q))},[M]),te=x.useCallback((Q,N)=>{M(mP(D.current,R.current,Q,N))},[M]),me=x.useCallback((Q,N)=>{M(pP(D.current,R.current,Q,N))},[M]);return x.useMemo(()=>({overrideFor:T,displayFor:le,payloads:b,errorOn:H,errorFor:ne,payloadFor:Y,ensureLoaded:X,reload:ue,applySlot:V,setEnabled:te,setVariant:me}),[T,le,b,H,ne,Y,X,ue,V,te,me])}const SP={slots:{},slot_order:[]},EP={required:!1,variant:null},_P=[];function s2(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 jP(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 OP(e,t){if(!e)return[];const a=[];for(const r of e.pages){const l=t.find(c=>c.id===r);l&&a.push(l)}return a}function Ku(e,t,a,r){var p;const l=((p=t.doc)==null?void 0:p.getElementById(e))??null;if(!l||!a)return;const c=l.getBoundingClientRect(),u=UC({top:c.top,height:c.height},t.wrapper.offsetTop,r,a.scrollTop),m=$C(u,a.clientHeight,a.scrollTop,zC);m!==null&&a.scrollTo({top:m,behavior:"smooth"})}function c2(e,t){return e.querySelector(`[${cf}="${Hr(t)}"]`)}function gi(e){const t=JSON.stringify(e);return x.useMemo(()=>e,[t])}function AP(e){var at,Vt,ut;const{host:t,catalog:a,view:r,onViewChange:l,sessions:c}=e,u=x.useRef(null),m=x.useRef([]),[p,g]=x.useState({}),[b,v]=x.useState(1),[k,w]=x.useState(0),[j,E]=x.useState(!1),[_,C]=x.useState(null),O=r.fixture,A=a.fixtures.find(ie=>ie.id===O),D=A==null?void 0:A.doc,R=A==null?void 0:A.display,[F,L]=x.useState(null),T=x.useCallback(ie=>{L(null),l(ie)},[l]);x.useEffect(()=>{Qq(O)},[O]);const H=x.useMemo(()=>new URL(t.base).pathname,[t.base]),ne=gi(a.template.pages),Y=gi(a.template.canvases),le=gi(a.islands.map),K=gi(a.stylesheets),X=a.islands.hostScript,ue=gi(a.islands.importMap),M=gi(Object.fromEntries(a.template.instances.map(ie=>[ie.instanceId,ie.sectionSchema]))),V=gi(Object.fromEntries(a.template.instances.map(ie=>[ie.instanceId,ie.section]))),te=gi(a.template.instances),me=a.template.output,Q=me!=="website",N=Q?a.template.formats:[],q=gi(Q?N.find(ie=>ie.id===r.format)??N[0]??null:null),I=q!==null&&q.bleed>0?q.bleed:null,P=x.useMemo(()=>q?{formatId:q.id,width:q.cssWidth,height:q.cssHeight,tokens:q.tokens}:void 0,[q]),ee=Y.find(ie=>ie.id===r.canvasId)??(r.canvasId===null?Y[0]??null:null),pe=Y.length>0&&ee===null,se=x.useMemo(()=>ee?OP(ee,ne):_P,[ee,ne]),ke=x.useMemo(()=>se.map(ie=>({id:ie.id})),[se]),z={basePath:H,stylesheets:K,cssRev:String(k),islands:le,hostScript:X,importMap:ue},ce=x.useMemo(()=>zx(t2({...z,sectionSchemaByInstance:M,...P?{pageBox:P}:{}})),[H,K,k,le,X,ue,M,P]),ge=x.useMemo(()=>zx(t2({...z,...P?{pageBox:P}:{}})).srcdoc(),[H,K,k,le,X,ue,P]),[Ee,Ue]=x.useState(ge);Ee!==ge&&(Ue(ge),g({}));const Le=x.useCallback(ie=>{const be=m.current.find(Oe=>Oe.key===ie);return{doc:(be==null?void 0:be.doc)??null,win:(be==null?void 0:be.iframe.contentWindow)??null}},[]),ye=kP({host:t,fixture:O,doc:D,resolvedDisplay:R,sessions:c,pages:ke,frameFor:Le}),Re=gi(te.map(ie=>ie.instanceId).filter(ie=>!ye.displayFor(ie).enabled)),[ht,$e]=x.useState(null),Lt=x.useRef(r.selection);Lt.current=r.selection;const st=x.useRef(ye);st.current=ye;const Bn=x.useRef(se);Bn.current=se;const On=x.useRef(b);On.current=b;const cn=x.useMemo(()=>se.map(ie=>({key:ie.id,srcdoc:ge,label:ie.label,title:`Canvas preview — ${ie.label}`,...P?{pageBox:P}:{}})),[se,ge,P]);x.useEffect(()=>{const ie=u.current;if(!ie)return;const be=TC(ie,cn);m.current=be;const Oe=be.map(ze=>{const Ge=()=>{pC(ze.doc)&&g(Be=>({...Be,[ze.key]:!0}))};return ze.iframe.addEventListener("load",Ge),()=>ze.iframe.removeEventListener("load",Ge)});return()=>{for(const ze of Oe)ze()}},[cn]),x.useEffect(()=>{for(const ie of m.current)LC(ie.overlay,j?I:null)},[j,I,cn]),x.useEffect(()=>{const ie=u.current;if(!ie||typeof ResizeObserver>"u")return;const be=new ResizeObserver(Oe=>{var Be;const ze=(Be=Oe[0])==null?void 0:Be.contentRect;if(!(ze!=null&&ze.width))return;const Ge=UM(ze.width);v(HM(Ge,{availableWidthPx:ze.width,availableHeightPx:ze.height},P?{width:P.width,height:P.height}:void 0))});return be.observe(ie),()=>be.disconnect()},[P]),x.useEffect(()=>{var ie;(ie=u.current)==null||ie.style.setProperty("--we-scale",String(b))},[b]),x.useEffect(()=>{var be;if(P)return;const ie=[];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 Be=new ResizeObserver(Ge);Be.observe(ze),ie.push(()=>Be.disconnect())}return()=>{for(const Oe of ie)Oe()}},[p,cn,P]),x.useEffect(()=>{const ie=ht;if(!ie)return;const be=()=>{document.documentElement.style.setProperty("--we-panel-w",`${ie.offsetWidth}px`)};be();const Oe=typeof ResizeObserver<"u"?new ResizeObserver(be):null;return Oe==null||Oe.observe(ie),()=>{Oe==null||Oe.disconnect(),document.documentElement.style.removeProperty("--we-panel-w")}},[ht]),x.useEffect(()=>{for(const ie of se)for(const be of ie.instanceIds)ye.ensureLoaded(ie.id,be)},[se,ye.ensureLoaded,O,D]);const yt=x.useMemo(()=>{const ie={};for(const be of se){const Oe=ye.payloads[be.id]??{};ie[be.id]=be.instanceIds.filter(ze=>Oe[ze]??ye.errorOn(be.id,ze)).map(ze=>{var Be,kt;const Ge=ye.errorOn(be.id,ze);return{instance_id:ze,section_version_id:O,section_key:V[ze]??ze,section_display_name:((Be=te.find(jt=>jt.instanceId===ze))==null?void 0:Be.label)??null,html:((kt=Oe[ze])==null?void 0:kt.html)??null,render_error:Ge?{code:"render_failed",message:Ge}:null}})}return ie},[se,ye.payloads,ye.errorOn,V,te,O]);x.useEffect(()=>{let ie=!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 Be=XO(ze),kt=uP(Ge,yt[be.key]??[],(jt,St)=>ce.buildSectionWrapper(jt,St),jt=>Be==null?void 0:Be.unmountRoot(jt));kt.length>0&&!Be&&!ie&&Object.keys(le).length>0&&(ie=!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)Be==null||Be.hydrateRoot(jt).catch(St=>{console.error("playground: canvas hydration pass failed:",St)})}},[p,cn,yt,ce,le]);const Ji=x.useRef(()=>{});Ji.current=ie=>{ye.setEnabled(ie,!0),T({...r,selection:{kind:"section",instanceId:ie}})},x.useEffect(()=>{var Oe;const ie=new Set(Re),be=[];for(const ze of m.current){if(!p[ze.key])continue;const Ge=ze.doc;if(!Ge)continue;const Be=yt[ze.key]??[];for(const Kt of Be)(Oe=c2(Ge,Kt.instance_id))==null||Oe.setAttribute("data-hidden",ie.has(Kt.instance_id)?"true":"false");const kt=Be.filter(Kt=>ie.has(Kt.instance_id)).map(Kt=>({instanceId:Kt.instance_id,label:op(Kt)})),jt=SC(ze.tabLayer,document,kt,Kt=>Ji.current(Kt)),St=()=>EC(jt,Kt=>c2(Ge,Kt),b);St();const Bt=Ge.getElementById("we-page");if(!Bt||typeof ResizeObserver>"u")continue;const Gt=new ResizeObserver(St);Gt.observe(Bt),be.push(()=>Gt.disconnect())}return()=>{for(const ze of be)ze()}},[p,cn,yt,Re,b]);const ci=x.useCallback(()=>{const ie=m.current,be=Lt.current,Oe=s2(be);for(const Be of ie)Be.doc&&ce.setLiveOwner(Be.doc,Oe);const ze=DC(ie,ce,Oe),Ge=be!==null&&Re.includes(be.instanceId);for(const Be of ie){const kt=Be.overlay.querySelector(".we-chrome-label"),jt=be&&!Ge?ze.find(St=>St.handle.key===Be.key):void 0;if(!jt||!be){Mx(Be.overlay,[],Rm),rp(kt);continue}if(Mx(Be.overlay,jt.els,Rm,be.kind),be.kind==="section"){const St=(yt[Be.key]??[]).find(Bt=>Bt.instance_id===be.instanceId);NM(kt,jt.els[0]??null,St?op(St):"")}else rp(kt)}},[ce,yt,Re]);x.useEffect(()=>{ci();for(const ie of m.current){if(!p[ie.key])continue;const be=ie.doc,Oe=ie.iframe.contentWindow;be&&Oe&&qC(Oe,be,s2(r.selection))}},[p,cn,r.selection,ci]);const ti=x.useCallback((ie,be)=>{const Oe=ie.getAttribute("href")??"";if(!Oe||Oe==="#")return;const ze=u.current;if(Oe.startsWith("#")){Ku(Oe.slice(1),be,ze,On.current);return}const Ge=rP(Oe,H,ne,Y);if(!Ge){window.open(Oe,"_blank","noopener,noreferrer");return}if(ee!==null&&Ge.canvasId===ee.id){const Be=m.current.find(kt=>kt.key===Ge.pageId);if(!Be)return;Ge.anchor?Ku(Ge.anchor,Be,ze,On.current):Be!==be&&Ku("we-page",Be,ze,On.current);return}T({...r,canvasId:Ge.canvasId,selection:null}),Ge.anchor&&C({pageId:Ge.pageId,anchor:Ge.anchor})},[r,T,H,ne,Y,ee]);x.useEffect(()=>{var be;if(!_||!p[_.pageId])return;const ie=m.current.find(Oe=>Oe.key===_.pageId);(be=ie==null?void 0:ie.doc)!=null&&be.getElementById(_.anchor)&&(Ku(_.anchor,ie,u.current,On.current),C(null))},[_,p,yt]),x.useEffect(()=>{const ie=[];for(const be of m.current){if(!p[be.key])continue;const Oe=be.doc;if(!Oe)continue;const ze=yt[be.key]??[],Ge=be.overlay.querySelector(".we-chrome-ring--hover"),Be=Bt=>{var ni;const Gt=Bt.target,Kt=ce.resolveTarget(Gt,ze);Yu(Ge);const An=Kt?jP(Kt.selection):null,Si=((ni=Gt.closest)==null?void 0:ni.call(Gt,"a"))??null;if(Si){if(Bt.preventDefault(),(An==null?void 0:An.kind)==="slot"){const ui=r.selection,Xr=(ui==null?void 0:ui.kind)==="slot"&&ui.instanceId===An.instanceId&&ui.slotId===An.slotId&&ui.itemIndex===An.itemIndex;T({...r,selection:An}),Xr&&ti(Si,be);return}ti(Si,be);return}T({...r,selection:An})},kt=Bt=>{const Gt=ce.resolveTarget(Bt.target,ze);Gt?_2(Ge,Gt.element,Rm):Yu(Ge)},jt=()=>Yu(Ge),St=Bt=>{Bt.key==="Escape"&&T({...r,selection:null})};Oe.body.addEventListener("click",Be),Oe.body.addEventListener("mouseover",kt),Oe.body.addEventListener("mouseleave",jt),Oe.body.addEventListener("keydown",St),ie.push(()=>{Oe.body.removeEventListener("click",Be),Oe.body.removeEventListener("mouseover",kt),Oe.body.removeEventListener("mouseleave",jt),Oe.body.removeEventListener("keydown",St)})}return()=>{for(const be of ie)be()}},[p,cn,ce,yt,r,T,ti]);const we=a.capabilities.hmr;x.useEffect(()=>{if(!we)return;const ie=()=>{const be=new Set;for(const Oe of Bn.current)for(const ze of Oe.instanceIds)be.has(ze)||(be.add(ze),st.current.reload(ze))};return t.subscribe({source:ie,stylesheet:()=>w(be=>be+1)})},[t,we]);const Te=r.selection,Ce=(Te==null?void 0:Te.instanceId)??null,Xe=se.find(ie=>Ce!==null&&ie.instanceIds.includes(Ce))??se[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: ",Y.map(ie=>ie.id).join(", ")]}):d.jsxs("div",{className:"canvas-mirror",children:[d.jsx("style",{children:OC}),Y.length>1?d.jsx("div",{className:"canvas-bar",children:d.jsx("nav",{className:"canvas-bar__card","aria-label":"Canvases",children:Y.map(ie=>d.jsx("button",{type:"button",className:ie.id===(ee==null?void 0:ee.id)?"canvas-bar__tab is-current":"canvas-bar__tab","aria-current":ie.id===(ee==null?void 0:ee.id)?"page":void 0,onClick:()=>T({...r,canvasId:ie.id,selection:null}),children:ie.label},ie.id))})}):null,d.jsx("div",{className:"we-canvas-stage canvas-mirror__stage",ref:u,onClick:ie=>{var Oe;const be=ie.target;(be===u.current||(Oe=be.classList)!=null&&Oe.contains(id))&&T({...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:O,onChange:ie=>T({...r,fixture:ie.target.value,selection:null}),children:a.fixtures.map(ie=>d.jsx("option",{value:ie.id,children:Wq(ie)},ie.id))})]}),Q&&q&&N.length>1?d.jsxs("label",{className:"sidebar-template__field",children:["Format",d.jsx("select",{"data-testid":"format-switcher",value:q.id,onChange:ie=>l({...r,format:ie.target.value}),children:N.map(ie=>d.jsx("option",{value:ie.id,children:`${ie.id} — ${ie.pixelWidth}×${ie.pixelHeight}px${ie.physical?` (${ie.physical})`:""}`},ie.id))})]}):null,I!==null?d.jsxs("label",{className:"sidebar-template__toggle",children:[d.jsx("input",{type:"checkbox","data-testid":"guides-toggle",checked:j,onChange:ie=>E(ie.target.checked)}),"Trim & bleed guides"]}):null]}),Ce?d.jsx(iP,{instanceId:Ce,label:((at=te.find(ie=>ie.instanceId===Ce))==null?void 0:at.label)??Ce,display:((Vt=te.find(ie=>ie.instanceId===Ce))==null?void 0:Vt.display)??EP,displayState:ye.displayFor(Ce),settingsOpen:F===Ce,onSetEnabled:ie=>ye.setEnabled(Ce,ie),onSetVariant:ie=>ye.setVariant(Ce,ie),onOpenSettings:()=>L(Ce),onCloseSettings:()=>L(null),fixture:O,sectionSchema:M[Ce]??SP,override:ye.overrideFor(Ce),payload:ye.payloadFor(Ce),renderError:ye.errorFor(Ce),selection:Te,onSelect:ie=>T({...r,selection:ie}),onApplySlot:(ie,be)=>ye.applySlot(Ce,ie,be)}):d.jsx(Uq,{}),a.capabilities.capture||me==="website"?d.jsx(cP,{host:t,templateName:a.template.name,fixture:O,output:me,format:(q==null?void 0:q.id)??null,canvas:(ee==null?void 0:ee.id)??null,pagePath:((ut=se[0])==null?void 0:ut.path)??null}):null]})]})}function NP(e){const[t,a]=x.useState({}),[r,l]=x.useState(e);if(e!==null&&e!==r){const u=r===null?[]:vP(r,e);l(e),u.length>0&&a(m=>xP(m,u))}const c=x.useCallback(u=>a(u),[]);return x.useMemo(()=>({edits:t,setEdits:c}),[t,c])}function u2(e){const t=kM(window.location.pathname,e.base);return t===null?null:SM(t,window.location.search)}function MP({host:e}){const[t,a]=x.useState(null),[r,l]=x.useState(null),[c,u]=x.useState(0),[m,p]=x.useState(()=>u2(e)),g=x.useMemo(()=>t===null||t.error!==void 0?null:Object.fromEntries(t.fixtures.map(j=>[j.id,j.doc])),[t]),b=NP(g);x.useEffect(()=>{let j=!0;return e.catalog().then(E=>{j&&(a(E),l(null))},E=>{j&&l(E instanceof Error?E.message:String(E))}),()=>{j=!1}},[e,c]);const v=t==null?void 0:t.template.name;x.useEffect(()=>{v&&(document.title=`${v} - Playground`)},[v]);const k=(t==null?void 0:t.capabilities.hmr)===!0;x.useEffect(()=>{if(!k)return;const j=()=>u(E=>E+1);return e.subscribe({source:j,fixtures:j})},[e,k]),x.useEffect(()=>{const j=()=>p(u2(e));return window.addEventListener("popstate",j),()=>window.removeEventListener("popstate",j)},[e]),x.useEffect(()=>{if(m!==null||t===null)return;const j=EM(t);j!==null&&(window.history.replaceState({},"",new URL(Ox(j),e.base).href),p(j))},[m,t,e]);const w=x.useCallback(j=>{window.history.replaceState({},"",new URL(Ox(j),e.base).href),p(j)},[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(j=>j.id===m.fixture)?d.jsx(AP,{host:e,catalog:t,view:m,onViewChange:w,sessions:b}):d.jsxs("div",{className:"boot-error","data-testid":"unknown-fixture",children:['There is no fixture "',m.fixture,'" (have: ',t.fixtures.map(j=>j.id).join(", "),")."]}):d.jsx("div",{className:"empty",children:"loading canvas…"}):d.jsx("div",{className:"empty",children:"loading…"})}const ZO=document.getElementById("root");if(!ZO)throw new Error("playground: #root missing from index.html");const WO=Gq(document.baseURI);Kq(WO);vM.createRoot(ZO).render(d.jsx(x.StrictMode,{children:d.jsx(MP,{host:WO})}));
|