@olonjs/core 1.0.99 → 1.0.100

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.
@@ -1,4 +1,4 @@
1
- (function(ae,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react"),require("react-router-dom"),require("zod"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-router-dom","zod","react-dom"],g):(ae=typeof globalThis<"u"?globalThis:ae||self,g(ae.OlonJsCore={},ae.React,ae.ReactRouterDOM,ae.z,ae.ReactDOM))})(this,(function(ae,g,Je,Te,gt){"use strict";function zi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const b=zi(g),Kr=zi(gt);function Pi(e,t){return t.header!=null&&e["global-header"]!==!1}const xe={UPDATE_DRAFTS:"jsonpages:update-drafts",SYNC_SELECTION:"jsonpages:sync-selection",SECTION_SELECT:"jsonpages:section-select",INLINE_FIELD_UPDATE:"jsonpages:inline-field-update",INLINE_FLUSHED:"jsonpages:inline-flushed",REQUEST_SCROLL_TO_SECTION:"jsonpages:request-scroll-to-section",REQUEST_INLINE_FLUSH:"jsonpages:request-inline-flush",ACTIVE_SECTION_CHANGED:"jsonpages:active-section-changed",STAGE_READY:"jsonpages:stage-ready",WEBMCP_TOOL_CALL:"olonjs:webmcp:tool-call",WEBMCP_TOOL_RESULT:"olonjs:webmcp:tool-result"};function Oi(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Oi(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Mc(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Oi(e))&&(n&&(n+=" "),n+=t);return n}const Rc=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},Lc=(e,t)=>({classGroupId:e,validator:t}),Ii=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Gr="-",Di=[],$c="arbitrary..",Fc=e=>{const t=Uc(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Wc(s);const a=s.split(Gr),l=a[0]===""&&a.length>1?1:0;return _i(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=n[s],d=r[s];return l?d?Rc(d,l):l:d||Di}return r[s]||Di}}},_i=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],i=r.nextPart.get(o);if(i){const d=_i(e,t+1,i);if(d)return d}const s=r.validators;if(s===null)return;const a=t===0?e.join(Gr):e.slice(t).join(Gr),l=s.length;for(let d=0;d<l;d++){const u=s[d];if(u.validator(a))return u.classGroupId}},Wc=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?$c+n:void 0})(),Uc=e=>{const{theme:t,classGroups:r}=e;return Bc(r,t)},Bc=(e,t)=>{const r=Ii();for(const n in e){const o=e[n];oo(o,r,n,t)}return r},oo=(e,t,r,n)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Hc(s,t,r,n)}},Hc=(e,t,r,n)=>{if(typeof e=="string"){Vc(e,t,r);return}if(typeof e=="function"){Kc(e,t,r,n);return}Gc(e,t,r,n)},Vc=(e,t,r)=>{const n=e===""?t:Mi(t,e);n.classGroupId=r},Kc=(e,t,r,n)=>{if(Yc(e)){oo(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(Lc(r,e))},Gc=(e,t,r,n)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];oo(l,Mi(t,a),r,n)}},Mi=(e,t)=>{let r=e;const n=t.split(Gr),o=n.length;for(let i=0;i<o;i++){const s=n[i];let a=r.nextPart.get(s);a||(a=Ii(),r.nextPart.set(s,a)),r=a}return r},Yc=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,qc=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(i,s)=>{r[i]=s,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(i){let s=r[i];if(s!==void 0)return s;if((s=n[i])!==void 0)return o(i,s),s},set(i,s){i in r?r[i]=s:o(i,s)}}},io="!",Ri=":",Xc=[],Li=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),Jc=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const i=[];let s=0,a=0,l=0,d;const u=o.length;for(let m=0;m<u;m++){const v=o[m];if(s===0&&a===0){if(v===Ri){i.push(o.slice(l,m)),l=m+1;continue}if(v==="/"){d=m;continue}}v==="["?s++:v==="]"?s--:v==="("?a++:v===")"&&a--}const f=i.length===0?o:o.slice(l);let h=f,p=!1;f.endsWith(io)?(h=f.slice(0,-1),p=!0):f.startsWith(io)&&(h=f.slice(1),p=!0);const w=d&&d>l?d-l:void 0;return Li(i,p,h,w)};if(t){const o=t+Ri,i=n;n=s=>s.startsWith(o)?i(s.slice(o.length)):Li(Xc,!1,s,void 0,!0)}if(r){const o=n;n=i=>r({className:i,parseClassName:o})}return n},Zc=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let i=0;i<r.length;i++){const s=r[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(s)):o.push(s)}return o.length>0&&(o.sort(),n.push(...o)),n}},Qc=e=>({cache:qc(e.cacheSize),parseClassName:Jc(e),sortModifiers:Zc(e),...Fc(e)}),ed=/\s+/,td=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(ed);let l="";for(let d=a.length-1;d>=0;d-=1){const u=a[d],{isExternal:f,modifiers:h,hasImportantModifier:p,baseClassName:w,maybePostfixModifierPosition:m}=r(u);if(f){l=u+(l.length>0?" "+l:l);continue}let v=!!m,y=n(v?w.substring(0,m):w);if(!y){if(!v){l=u+(l.length>0?" "+l:l);continue}if(y=n(w),!y){l=u+(l.length>0?" "+l:l);continue}v=!1}const k=h.length===0?"":h.length===1?h[0]:i(h).join(":"),x=p?k+io:k,S=x+y;if(s.indexOf(S)>-1)continue;s.push(S);const C=o(y,v);for(let j=0;j<C.length;++j){const N=C[j];s.push(x+N)}l=u+(l.length>0?" "+l:l)}return l},rd=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=$i(r))&&(o&&(o+=" "),o+=n);return o},$i=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=$i(e[n]))&&(r&&(r+=" "),r+=t);return r},nd=(e,...t)=>{let r,n,o,i;const s=l=>{const d=t.reduce((u,f)=>f(u),e());return r=Qc(d),n=r.cache.get,o=r.cache.set,i=a,a(l)},a=l=>{const d=n(l);if(d)return d;const u=td(l,r);return o(l,u),u};return i=s,(...l)=>i(rd(...l))},od=[],Ae=e=>{const t=r=>r[e]||od;return t.isThemeGetter=!0,t},Fi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Wi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,id=/^\d+\/\d+$/,sd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ad=/\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$/,ld=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,cd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$t=e=>id.test(e),le=e=>!!e&&!Number.isNaN(Number(e)),bt=e=>!!e&&Number.isInteger(Number(e)),so=e=>e.endsWith("%")&&le(e.slice(0,-1)),ut=e=>sd.test(e),ud=()=>!0,fd=e=>ad.test(e)&&!ld.test(e),Ui=()=>!1,pd=e=>cd.test(e),hd=e=>dd.test(e),md=e=>!H(e)&&!V(e),gd=e=>Ft(e,Gi,Ui),H=e=>Fi.test(e),zt=e=>Ft(e,Yi,fd),ao=e=>Ft(e,yd,le),Bi=e=>Ft(e,Vi,Ui),bd=e=>Ft(e,Ki,hd),Yr=e=>Ft(e,qi,pd),V=e=>Wi.test(e),dr=e=>Wt(e,Yi),vd=e=>Wt(e,kd),Hi=e=>Wt(e,Vi),xd=e=>Wt(e,Gi),wd=e=>Wt(e,Ki),qr=e=>Wt(e,qi,!0),Ft=(e,t,r)=>{const n=Fi.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Wt=(e,t,r=!1)=>{const n=Wi.exec(e);return n?n[1]?t(n[1]):r:!1},Vi=e=>e==="position"||e==="percentage",Ki=e=>e==="image"||e==="url",Gi=e=>e==="length"||e==="size"||e==="bg-size",Yi=e=>e==="length",yd=e=>e==="number",kd=e=>e==="family-name",qi=e=>e==="shadow",Sd=nd(()=>{const e=Ae("color"),t=Ae("font"),r=Ae("text"),n=Ae("font-weight"),o=Ae("tracking"),i=Ae("leading"),s=Ae("breakpoint"),a=Ae("container"),l=Ae("spacing"),d=Ae("radius"),u=Ae("shadow"),f=Ae("inset-shadow"),h=Ae("text-shadow"),p=Ae("drop-shadow"),w=Ae("blur"),m=Ae("perspective"),v=Ae("aspect"),y=Ae("ease"),k=Ae("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...S(),V,H],j=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],E=()=>[V,H,l],D=()=>[$t,"full","auto",...E()],R=()=>[bt,"none","subgrid",V,H],I=()=>["auto",{span:["full",bt,V,H]},bt,V,H],L=()=>[bt,"auto",V,H],_=()=>["auto","min","max","fr",V,H],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...E()],U=()=>[$t,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],z=()=>[e,V,H],X=()=>[...S(),Hi,Bi,{position:[V,H]}],re=()=>["no-repeat",{repeat:["","x","y","space","round"]}],T=()=>["auto","cover","contain",xd,gd,{size:[V,H]}],$=()=>[so,dr,zt],Y=()=>["","none","full",d,V,H],K=()=>["",le,dr,zt],ge=()=>["solid","dashed","dotted","double"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>[le,so,Hi,Bi],J=()=>["","none",w,V,H],ee=()=>["none",le,V,H],W=()=>["none",le,V,H],ne=()=>[le,V,H],te=()=>[$t,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ut],breakpoint:[ut],color:[ud],container:[ut],"drop-shadow":[ut],ease:["in","out","in-out"],font:[md],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ut],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ut],shadow:[ut],spacing:["px",le],text:[ut],"text-shadow":[ut],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",$t,H,V,v]}],container:["container"],columns:[{columns:[le,H,V,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:C()}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{start:D()}],end:[{end:D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[bt,"auto",V,H]}],basis:[{basis:[$t,"full","auto",a,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[le,$t,"auto","initial","none",H]}],grow:[{grow:["",le,V,H]}],shrink:[{shrink:["",le,V,H]}],order:[{order:[bt,"first","last","none",V,H]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":_()}],"auto-rows":[{"auto-rows":_()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[a,"screen",...U()]}],"min-w":[{"min-w":[a,"screen","none",...U()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",r,dr,zt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,V,ao]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",so,H]}],"font-family":[{font:[vd,H,t]}],"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:[o,V,H]}],"line-clamp":[{"line-clamp":[le,"none",V,ao]}],leading:[{leading:[i,...E()]}],"list-image":[{"list-image":["none",V,H]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",V,H]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:z()}],"text-color":[{text:z()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[le,"from-font","auto",V,zt]}],"text-decoration-color":[{decoration:z()}],"underline-offset":[{"underline-offset":[le,"auto",V,H]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",V,H]}],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",V,H]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:X()}],"bg-repeat":[{bg:re()}],"bg-size":[{bg:T()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},bt,V,H],radial:["",V,H],conic:[bt,V,H]},wd,bd]}],"bg-color":[{bg:z()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:z()}],"gradient-via":[{via:z()}],"gradient-to":[{to:z()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:K()}],"border-w-x":[{"border-x":K()}],"border-w-y":[{"border-y":K()}],"border-w-s":[{"border-s":K()}],"border-w-e":[{"border-e":K()}],"border-w-t":[{"border-t":K()}],"border-w-r":[{"border-r":K()}],"border-w-b":[{"border-b":K()}],"border-w-l":[{"border-l":K()}],"divide-x":[{"divide-x":K()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":K()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ge(),"hidden","none"]}],"divide-style":[{divide:[...ge(),"hidden","none"]}],"border-color":[{border:z()}],"border-color-x":[{"border-x":z()}],"border-color-y":[{"border-y":z()}],"border-color-s":[{"border-s":z()}],"border-color-e":[{"border-e":z()}],"border-color-t":[{"border-t":z()}],"border-color-r":[{"border-r":z()}],"border-color-b":[{"border-b":z()}],"border-color-l":[{"border-l":z()}],"divide-color":[{divide:z()}],"outline-style":[{outline:[...ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[le,V,H]}],"outline-w":[{outline:["",le,dr,zt]}],"outline-color":[{outline:z()}],shadow:[{shadow:["","none",u,qr,Yr]}],"shadow-color":[{shadow:z()}],"inset-shadow":[{"inset-shadow":["none",f,qr,Yr]}],"inset-shadow-color":[{"inset-shadow":z()}],"ring-w":[{ring:K()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:z()}],"ring-offset-w":[{"ring-offset":[le,zt]}],"ring-offset-color":[{"ring-offset":z()}],"inset-ring-w":[{"inset-ring":K()}],"inset-ring-color":[{"inset-ring":z()}],"text-shadow":[{"text-shadow":["none",h,qr,Yr]}],"text-shadow-color":[{"text-shadow":z()}],opacity:[{opacity:[le,V,H]}],"mix-blend":[{"mix-blend":[...se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[le]}],"mask-image-linear-from-pos":[{"mask-linear-from":P()}],"mask-image-linear-to-pos":[{"mask-linear-to":P()}],"mask-image-linear-from-color":[{"mask-linear-from":z()}],"mask-image-linear-to-color":[{"mask-linear-to":z()}],"mask-image-t-from-pos":[{"mask-t-from":P()}],"mask-image-t-to-pos":[{"mask-t-to":P()}],"mask-image-t-from-color":[{"mask-t-from":z()}],"mask-image-t-to-color":[{"mask-t-to":z()}],"mask-image-r-from-pos":[{"mask-r-from":P()}],"mask-image-r-to-pos":[{"mask-r-to":P()}],"mask-image-r-from-color":[{"mask-r-from":z()}],"mask-image-r-to-color":[{"mask-r-to":z()}],"mask-image-b-from-pos":[{"mask-b-from":P()}],"mask-image-b-to-pos":[{"mask-b-to":P()}],"mask-image-b-from-color":[{"mask-b-from":z()}],"mask-image-b-to-color":[{"mask-b-to":z()}],"mask-image-l-from-pos":[{"mask-l-from":P()}],"mask-image-l-to-pos":[{"mask-l-to":P()}],"mask-image-l-from-color":[{"mask-l-from":z()}],"mask-image-l-to-color":[{"mask-l-to":z()}],"mask-image-x-from-pos":[{"mask-x-from":P()}],"mask-image-x-to-pos":[{"mask-x-to":P()}],"mask-image-x-from-color":[{"mask-x-from":z()}],"mask-image-x-to-color":[{"mask-x-to":z()}],"mask-image-y-from-pos":[{"mask-y-from":P()}],"mask-image-y-to-pos":[{"mask-y-to":P()}],"mask-image-y-from-color":[{"mask-y-from":z()}],"mask-image-y-to-color":[{"mask-y-to":z()}],"mask-image-radial":[{"mask-radial":[V,H]}],"mask-image-radial-from-pos":[{"mask-radial-from":P()}],"mask-image-radial-to-pos":[{"mask-radial-to":P()}],"mask-image-radial-from-color":[{"mask-radial-from":z()}],"mask-image-radial-to-color":[{"mask-radial-to":z()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[le]}],"mask-image-conic-from-pos":[{"mask-conic-from":P()}],"mask-image-conic-to-pos":[{"mask-conic-to":P()}],"mask-image-conic-from-color":[{"mask-conic-from":z()}],"mask-image-conic-to-color":[{"mask-conic-to":z()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:X()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:T()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",V,H]}],filter:[{filter:["","none",V,H]}],blur:[{blur:J()}],brightness:[{brightness:[le,V,H]}],contrast:[{contrast:[le,V,H]}],"drop-shadow":[{"drop-shadow":["","none",p,qr,Yr]}],"drop-shadow-color":[{"drop-shadow":z()}],grayscale:[{grayscale:["",le,V,H]}],"hue-rotate":[{"hue-rotate":[le,V,H]}],invert:[{invert:["",le,V,H]}],saturate:[{saturate:[le,V,H]}],sepia:[{sepia:["",le,V,H]}],"backdrop-filter":[{"backdrop-filter":["","none",V,H]}],"backdrop-blur":[{"backdrop-blur":J()}],"backdrop-brightness":[{"backdrop-brightness":[le,V,H]}],"backdrop-contrast":[{"backdrop-contrast":[le,V,H]}],"backdrop-grayscale":[{"backdrop-grayscale":["",le,V,H]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[le,V,H]}],"backdrop-invert":[{"backdrop-invert":["",le,V,H]}],"backdrop-opacity":[{"backdrop-opacity":[le,V,H]}],"backdrop-saturate":[{"backdrop-saturate":[le,V,H]}],"backdrop-sepia":[{"backdrop-sepia":["",le,V,H]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",V,H]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[le,"initial",V,H]}],ease:[{ease:["linear","initial",y,V,H]}],delay:[{delay:[le,V,H]}],animate:[{animate:["none",k,V,H]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,V,H]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:W()}],"scale-x":[{"scale-x":W()}],"scale-y":[{"scale-y":W()}],"scale-z":[{"scale-z":W()}],"scale-3d":["scale-3d"],skew:[{skew:ne()}],"skew-x":[{"skew-x":ne()}],"skew-y":[{"skew-y":ne()}],transform:[{transform:[V,H,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:te()}],"translate-x":[{"translate-x":te()}],"translate-y":[{"translate-y":te()}],"translate-z":[{"translate-z":te()}],"translate-none":["translate-none"],accent:[{accent:z()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:z()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",V,H]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",V,H]}],fill:[{fill:["none",...z()]}],"stroke-w":[{stroke:[le,dr,zt,ao]}],stroke:[{stroke:["none",...z()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function oe(...e){return Sd(Mc(e))}var Xr={exports:{}},ur={};/**
1
+ (function(ce,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react"),require("react-router-dom"),require("zod"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-router-dom","zod","react-dom"],g):(ce=typeof globalThis<"u"?globalThis:ce||self,g(ce.OlonJsCore={},ce.React,ce.ReactRouterDOM,ce.z,ce.ReactDOM))})(this,(function(ce,g,Je,Pe,vt){"use strict";function zi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const b=zi(g),Kr=zi(vt);function Pi(e,t){return t.header!=null&&e["global-header"]!==!1}const ye={UPDATE_DRAFTS:"jsonpages:update-drafts",SYNC_SELECTION:"jsonpages:sync-selection",SECTION_SELECT:"jsonpages:section-select",INLINE_FIELD_UPDATE:"jsonpages:inline-field-update",INLINE_FLUSHED:"jsonpages:inline-flushed",REQUEST_SCROLL_TO_SECTION:"jsonpages:request-scroll-to-section",REQUEST_INLINE_FLUSH:"jsonpages:request-inline-flush",ACTIVE_SECTION_CHANGED:"jsonpages:active-section-changed",STAGE_READY:"jsonpages:stage-ready",WEBMCP_TOOL_CALL:"olonjs:webmcp:tool-call",WEBMCP_TOOL_RESULT:"olonjs:webmcp:tool-result"};function Oi(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Oi(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Mc(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Oi(e))&&(n&&(n+=" "),n+=t);return n}const Rc=(e,t)=>{const r=new Array(e.length+t.length);for(let n=0;n<e.length;n++)r[n]=e[n];for(let n=0;n<t.length;n++)r[e.length+n]=t[n];return r},Lc=(e,t)=>({classGroupId:e,validator:t}),Ii=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r}),Gr="-",Di=[],$c="arbitrary..",Fc=e=>{const t=Uc(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return Wc(s);const a=s.split(Gr),l=a[0]===""&&a.length>1?1:0;return _i(a,l,t)},getConflictingClassGroupIds:(s,a)=>{if(a){const l=n[s],d=r[s];return l?d?Rc(d,l):l:d||Di}return r[s]||Di}}},_i=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;const o=e[t],i=r.nextPart.get(o);if(i){const d=_i(e,t+1,i);if(d)return d}const s=r.validators;if(s===null)return;const a=t===0?e.join(Gr):e.slice(t).join(Gr),l=s.length;for(let d=0;d<l;d++){const u=s[d];if(u.validator(a))return u.classGroupId}},Wc=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),r=t.indexOf(":"),n=t.slice(0,r);return n?$c+n:void 0})(),Uc=e=>{const{theme:t,classGroups:r}=e;return Bc(r,t)},Bc=(e,t)=>{const r=Ii();for(const n in e){const o=e[n];oo(o,r,n,t)}return r},oo=(e,t,r,n)=>{const o=e.length;for(let i=0;i<o;i++){const s=e[i];Hc(s,t,r,n)}},Hc=(e,t,r,n)=>{if(typeof e=="string"){Vc(e,t,r);return}if(typeof e=="function"){Kc(e,t,r,n);return}Gc(e,t,r,n)},Vc=(e,t,r)=>{const n=e===""?t:Mi(t,e);n.classGroupId=r},Kc=(e,t,r,n)=>{if(Yc(e)){oo(e(n),t,r,n);return}t.validators===null&&(t.validators=[]),t.validators.push(Lc(r,e))},Gc=(e,t,r,n)=>{const o=Object.entries(e),i=o.length;for(let s=0;s<i;s++){const[a,l]=o[s];oo(l,Mi(t,a),r,n)}},Mi=(e,t)=>{let r=e;const n=t.split(Gr),o=n.length;for(let i=0;i<o;i++){const s=n[i];let a=r.nextPart.get(s);a||(a=Ii(),r.nextPart.set(s,a)),r=a}return r},Yc=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,qc=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),n=Object.create(null);const o=(i,s)=>{r[i]=s,t++,t>e&&(t=0,n=r,r=Object.create(null))};return{get(i){let s=r[i];if(s!==void 0)return s;if((s=n[i])!==void 0)return o(i,s),s},set(i,s){i in r?r[i]=s:o(i,s)}}},io="!",Ri=":",Xc=[],Li=(e,t,r,n,o)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),Jc=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=o=>{const i=[];let s=0,a=0,l=0,d;const u=o.length;for(let m=0;m<u;m++){const v=o[m];if(s===0&&a===0){if(v===Ri){i.push(o.slice(l,m)),l=m+1;continue}if(v==="/"){d=m;continue}}v==="["?s++:v==="]"?s--:v==="("?a++:v===")"&&a--}const f=i.length===0?o:o.slice(l);let h=f,p=!1;f.endsWith(io)?(h=f.slice(0,-1),p=!0):f.startsWith(io)&&(h=f.slice(1),p=!0);const w=d&&d>l?d-l:void 0;return Li(i,p,h,w)};if(t){const o=t+Ri,i=n;n=s=>s.startsWith(o)?i(s.slice(o.length)):Li(Xc,!1,s,void 0,!0)}if(r){const o=n;n=i=>r({className:i,parseClassName:o})}return n},Zc=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((r,n)=>{t.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let i=0;i<r.length;i++){const s=r[i],a=s[0]==="[",l=t.has(s);a||l?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(s)):o.push(s)}return o.length>0&&(o.sort(),n.push(...o)),n}},Qc=e=>({cache:qc(e.cacheSize),parseClassName:Jc(e),sortModifiers:Zc(e),...Fc(e)}),ed=/\s+/,td=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i}=t,s=[],a=e.trim().split(ed);let l="";for(let d=a.length-1;d>=0;d-=1){const u=a[d],{isExternal:f,modifiers:h,hasImportantModifier:p,baseClassName:w,maybePostfixModifierPosition:m}=r(u);if(f){l=u+(l.length>0?" "+l:l);continue}let v=!!m,y=n(v?w.substring(0,m):w);if(!y){if(!v){l=u+(l.length>0?" "+l:l);continue}if(y=n(w),!y){l=u+(l.length>0?" "+l:l);continue}v=!1}const k=h.length===0?"":h.length===1?h[0]:i(h).join(":"),x=p?k+io:k,S=x+y;if(s.indexOf(S)>-1)continue;s.push(S);const C=o(y,v);for(let E=0;E<C.length;++E){const N=C[E];s.push(x+N)}l=u+(l.length>0?" "+l:l)}return l},rd=(...e)=>{let t=0,r,n,o="";for(;t<e.length;)(r=e[t++])&&(n=$i(r))&&(o&&(o+=" "),o+=n);return o},$i=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=$i(e[n]))&&(r&&(r+=" "),r+=t);return r},nd=(e,...t)=>{let r,n,o,i;const s=l=>{const d=t.reduce((u,f)=>f(u),e());return r=Qc(d),n=r.cache.get,o=r.cache.set,i=a,a(l)},a=l=>{const d=n(l);if(d)return d;const u=td(l,r);return o(l,u),u};return i=s,(...l)=>i(rd(...l))},od=[],Oe=e=>{const t=r=>r[e]||od;return t.isThemeGetter=!0,t},Fi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Wi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,id=/^\d+\/\d+$/,sd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ad=/\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$/,ld=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,cd=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,dd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Lt=e=>id.test(e),de=e=>!!e&&!Number.isNaN(Number(e)),xt=e=>!!e&&Number.isInteger(Number(e)),so=e=>e.endsWith("%")&&de(e.slice(0,-1)),pt=e=>sd.test(e),ud=()=>!0,fd=e=>ad.test(e)&&!ld.test(e),Ui=()=>!1,pd=e=>cd.test(e),hd=e=>dd.test(e),md=e=>!H(e)&&!V(e),gd=e=>$t(e,Gi,Ui),H=e=>Fi.test(e),zt=e=>$t(e,Yi,fd),ao=e=>$t(e,yd,de),Bi=e=>$t(e,Vi,Ui),bd=e=>$t(e,Ki,hd),Yr=e=>$t(e,qi,pd),V=e=>Wi.test(e),ur=e=>Ft(e,Yi),vd=e=>Ft(e,kd),Hi=e=>Ft(e,Vi),xd=e=>Ft(e,Gi),wd=e=>Ft(e,Ki),qr=e=>Ft(e,qi,!0),$t=(e,t,r)=>{const n=Fi.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},Ft=(e,t,r=!1)=>{const n=Wi.exec(e);return n?n[1]?t(n[1]):r:!1},Vi=e=>e==="position"||e==="percentage",Ki=e=>e==="image"||e==="url",Gi=e=>e==="length"||e==="size"||e==="bg-size",Yi=e=>e==="length",yd=e=>e==="number",kd=e=>e==="family-name",qi=e=>e==="shadow",Sd=nd(()=>{const e=Oe("color"),t=Oe("font"),r=Oe("text"),n=Oe("font-weight"),o=Oe("tracking"),i=Oe("leading"),s=Oe("breakpoint"),a=Oe("container"),l=Oe("spacing"),d=Oe("radius"),u=Oe("shadow"),f=Oe("inset-shadow"),h=Oe("text-shadow"),p=Oe("drop-shadow"),w=Oe("blur"),m=Oe("perspective"),v=Oe("aspect"),y=Oe("ease"),k=Oe("animate"),x=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...S(),V,H],E=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],j=()=>[V,H,l],D=()=>[Lt,"full","auto",...j()],M=()=>[xt,"none","subgrid",V,H],I=()=>["auto",{span:["full",xt,V,H]},xt,V,H],R=()=>[xt,"auto",V,H],L=()=>["auto","min","max","fr",V,H],K=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],B=()=>["start","end","center","stretch","center-safe","end-safe"],W=()=>["auto",...j()],U=()=>[Lt,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],A=()=>[e,V,H],J=()=>[...S(),Hi,Bi,{position:[V,H]}],oe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],T=()=>["auto","cover","contain",xd,gd,{size:[V,H]}],F=()=>[so,ur,zt],X=()=>["","none","full",d,V,H],G=()=>["",de,ur,zt],ve=()=>["solid","dashed","dotted","double"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>[de,so,Hi,Bi],Q=()=>["","none",w,V,H],ee=()=>["none",de,V,H],$=()=>["none",de,V,H],ie=()=>[de,V,H],te=()=>[Lt,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[pt],breakpoint:[pt],color:[ud],container:[pt],"drop-shadow":[pt],ease:["in","out","in-out"],font:[md],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[pt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[pt],shadow:[pt],spacing:["px",de],text:[pt],"text-shadow":[pt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Lt,H,V,v]}],container:["container"],columns:[{columns:[de,H,V,a]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:C()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{start:D()}],end:[{end:D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[xt,"auto",V,H]}],basis:[{basis:[Lt,"full","auto",a,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[de,Lt,"auto","initial","none",H]}],grow:[{grow:["",de,V,H]}],shrink:[{shrink:["",de,V,H]}],order:[{order:[xt,"first","last","none",V,H]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":R()}],"col-end":[{"col-end":R()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":R()}],"row-end":[{"row-end":R()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":L()}],"auto-rows":[{"auto-rows":L()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...K(),"normal"]}],"justify-items":[{"justify-items":[...B(),"normal"]}],"justify-self":[{"justify-self":["auto",...B()]}],"align-content":[{content:["normal",...K()]}],"align-items":[{items:[...B(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...B(),{baseline:["","last"]}]}],"place-content":[{"place-content":K()}],"place-items":[{"place-items":[...B(),"baseline"]}],"place-self":[{"place-self":["auto",...B()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:W()}],mx:[{mx:W()}],my:[{my:W()}],ms:[{ms:W()}],me:[{me:W()}],mt:[{mt:W()}],mr:[{mr:W()}],mb:[{mb:W()}],ml:[{ml:W()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],w:[{w:[a,"screen",...U()]}],"min-w":[{"min-w":[a,"screen","none",...U()]}],"max-w":[{"max-w":[a,"screen","none","prose",{screen:[s]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",r,ur,zt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,V,ao]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",so,H]}],"font-family":[{font:[vd,H,t]}],"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:[o,V,H]}],"line-clamp":[{"line-clamp":[de,"none",V,ao]}],leading:[{leading:[i,...j()]}],"list-image":[{"list-image":["none",V,H]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",V,H]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[de,"from-font","auto",V,zt]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[de,"auto",V,H]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",V,H]}],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",V,H]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:J()}],"bg-repeat":[{bg:oe()}],"bg-size":[{bg:T()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},xt,V,H],radial:["",V,H],conic:[xt,V,H]},wd,bd]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:X()}],"rounded-s":[{"rounded-s":X()}],"rounded-e":[{"rounded-e":X()}],"rounded-t":[{"rounded-t":X()}],"rounded-r":[{"rounded-r":X()}],"rounded-b":[{"rounded-b":X()}],"rounded-l":[{"rounded-l":X()}],"rounded-ss":[{"rounded-ss":X()}],"rounded-se":[{"rounded-se":X()}],"rounded-ee":[{"rounded-ee":X()}],"rounded-es":[{"rounded-es":X()}],"rounded-tl":[{"rounded-tl":X()}],"rounded-tr":[{"rounded-tr":X()}],"rounded-br":[{"rounded-br":X()}],"rounded-bl":[{"rounded-bl":X()}],"border-w":[{border:G()}],"border-w-x":[{"border-x":G()}],"border-w-y":[{"border-y":G()}],"border-w-s":[{"border-s":G()}],"border-w-e":[{"border-e":G()}],"border-w-t":[{"border-t":G()}],"border-w-r":[{"border-r":G()}],"border-w-b":[{"border-b":G()}],"border-w-l":[{"border-l":G()}],"divide-x":[{"divide-x":G()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":G()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[de,V,H]}],"outline-w":[{outline:["",de,ur,zt]}],"outline-color":[{outline:A()}],shadow:[{shadow:["","none",u,qr,Yr]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":["none",f,qr,Yr]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[de,zt]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":G()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":["none",h,qr,Yr]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[de,V,H]}],"mix-blend":[{"mix-blend":[...le(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":le()}],"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":[de]}],"mask-image-linear-from-pos":[{"mask-linear-from":P()}],"mask-image-linear-to-pos":[{"mask-linear-to":P()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":P()}],"mask-image-t-to-pos":[{"mask-t-to":P()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":P()}],"mask-image-r-to-pos":[{"mask-r-to":P()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":P()}],"mask-image-b-to-pos":[{"mask-b-to":P()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":P()}],"mask-image-l-to-pos":[{"mask-l-to":P()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":P()}],"mask-image-x-to-pos":[{"mask-x-to":P()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":P()}],"mask-image-y-to-pos":[{"mask-y-to":P()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[V,H]}],"mask-image-radial-from-pos":[{"mask-radial-from":P()}],"mask-image-radial-to-pos":[{"mask-radial-to":P()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"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":S()}],"mask-image-conic-pos":[{"mask-conic":[de]}],"mask-image-conic-from-pos":[{"mask-conic-from":P()}],"mask-image-conic-to-pos":[{"mask-conic-to":P()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:J()}],"mask-repeat":[{mask:oe()}],"mask-size":[{mask:T()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",V,H]}],filter:[{filter:["","none",V,H]}],blur:[{blur:Q()}],brightness:[{brightness:[de,V,H]}],contrast:[{contrast:[de,V,H]}],"drop-shadow":[{"drop-shadow":["","none",p,qr,Yr]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:["",de,V,H]}],"hue-rotate":[{"hue-rotate":[de,V,H]}],invert:[{invert:["",de,V,H]}],saturate:[{saturate:[de,V,H]}],sepia:[{sepia:["",de,V,H]}],"backdrop-filter":[{"backdrop-filter":["","none",V,H]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[de,V,H]}],"backdrop-contrast":[{"backdrop-contrast":[de,V,H]}],"backdrop-grayscale":[{"backdrop-grayscale":["",de,V,H]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[de,V,H]}],"backdrop-invert":[{"backdrop-invert":["",de,V,H]}],"backdrop-opacity":[{"backdrop-opacity":[de,V,H]}],"backdrop-saturate":[{"backdrop-saturate":[de,V,H]}],"backdrop-sepia":[{"backdrop-sepia":["",de,V,H]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",V,H]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[de,"initial",V,H]}],ease:[{ease:["linear","initial",y,V,H]}],delay:[{delay:[de,V,H]}],animate:[{animate:["none",k,V,H]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,V,H]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:ee()}],"rotate-x":[{"rotate-x":ee()}],"rotate-y":[{"rotate-y":ee()}],"rotate-z":[{"rotate-z":ee()}],scale:[{scale:$()}],"scale-x":[{"scale-x":$()}],"scale-y":[{"scale-y":$()}],"scale-z":[{"scale-z":$()}],"scale-3d":["scale-3d"],skew:[{skew:ie()}],"skew-x":[{"skew-x":ie()}],"skew-y":[{"skew-y":ie()}],transform:[{transform:[V,H,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:te()}],"translate-x":[{"translate-x":te()}],"translate-y":[{"translate-y":te()}],"translate-z":[{"translate-z":te()}],"translate-none":["translate-none"],accent:[{accent:A()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:A()}],"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",V,H]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",V,H]}],fill:[{fill:["none",...A()]}],"stroke-w":[{stroke:[de,ur,zt,ao]}],stroke:[{stroke:["none",...A()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-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-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-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-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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function se(...e){return Sd(Mc(e))}var Xr={exports:{}},fr={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Xi;function Cd(){if(Xi)return ur;Xi=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,o,i){var s=null;if(i!==void 0&&(s=""+i),o.key!==void 0&&(s=""+o.key),"key"in o){i={};for(var a in o)a!=="key"&&(i[a]=o[a])}else i=o;return o=i.ref,{$$typeof:e,type:n,key:s,ref:o!==void 0?o:null,props:i}}return ur.Fragment=t,ur.jsx=r,ur.jsxs=r,ur}var fr={};/**
9
+ */var Xi;function Cd(){if(Xi)return fr;Xi=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,o,i){var s=null;if(i!==void 0&&(s=""+i),o.key!==void 0&&(s=""+o.key),"key"in o){i={};for(var a in o)a!=="key"&&(i[a]=o[a])}else i=o;return o=i.ref,{$$typeof:e,type:n,key:s,ref:o!==void 0?o:null,props:i}}return fr.Fragment=t,fr.jsx=r,fr.jsxs=r,fr}var pr={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,12 +14,12 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Ji;function Ed(){return Ji||(Ji=1,process.env.NODE_ENV!=="production"&&(function(){function e(T){if(T==null)return null;if(typeof T=="function")return T.$$typeof===I?null:T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case v:return"Fragment";case k:return"Profiler";case y:return"StrictMode";case j:return"Suspense";case N:return"SuspenseList";case R:return"Activity"}if(typeof T=="object")switch(typeof T.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),T.$$typeof){case m:return"Portal";case S:return T.displayName||"Context";case x:return(T._context.displayName||"Context")+".Consumer";case C:var $=T.render;return T=T.displayName,T||(T=$.displayName||$.name||"",T=T!==""?"ForwardRef("+T+")":"ForwardRef"),T;case E:return $=T.displayName||null,$!==null?$:e(T.type)||"Memo";case D:$=T._payload,T=T._init;try{return e(T($))}catch{}}return null}function t(T){return""+T}function r(T){try{t(T);var $=!1}catch{$=!0}if($){$=console;var Y=$.error,K=typeof Symbol=="function"&&Symbol.toStringTag&&T[Symbol.toStringTag]||T.constructor.name||"Object";return Y.call($,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",K),t(T)}}function n(T){if(T===v)return"<>";if(typeof T=="object"&&T!==null&&T.$$typeof===D)return"<...>";try{var $=e(T);return $?"<"+$+">":"<...>"}catch{return"<...>"}}function o(){var T=L.A;return T===null?null:T.getOwner()}function i(){return Error("react-stack-top-frame")}function s(T){if(_.call(T,"key")){var $=Object.getOwnPropertyDescriptor(T,"key").get;if($&&$.isReactWarning)return!1}return T.key!==void 0}function a(T,$){function Y(){F||(F=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",$))}Y.isReactWarning=!0,Object.defineProperty(T,"key",{get:Y,configurable:!0})}function l(){var T=e(this.type);return U[T]||(U[T]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),T=this.props.ref,T!==void 0?T:null}function d(T,$,Y,K,ge,se){var P=Y.ref;return T={$$typeof:w,type:T,key:$,props:Y,_owner:K},(P!==void 0?P:null)!==null?Object.defineProperty(T,"ref",{enumerable:!1,get:l}):Object.defineProperty(T,"ref",{enumerable:!1,value:null}),T._store={},Object.defineProperty(T._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(T,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(T,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ge}),Object.defineProperty(T,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:se}),Object.freeze&&(Object.freeze(T.props),Object.freeze(T)),T}function u(T,$,Y,K,ge,se){var P=$.children;if(P!==void 0)if(K)if(G(P)){for(K=0;K<P.length;K++)f(P[K]);Object.freeze&&Object.freeze(P)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(P);if(_.call($,"key")){P=e(T);var J=Object.keys($).filter(function(W){return W!=="key"});K=0<J.length?"{key: someKey, "+J.join(": ..., ")+": ...}":"{key: someKey}",re[P+K]||(J=0<J.length?"{"+J.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
17
+ */var Ji;function Ed(){return Ji||(Ji=1,process.env.NODE_ENV!=="production"&&(function(){function e(T){if(T==null)return null;if(typeof T=="function")return T.$$typeof===I?null:T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case v:return"Fragment";case k:return"Profiler";case y:return"StrictMode";case E:return"Suspense";case N:return"SuspenseList";case M:return"Activity"}if(typeof T=="object")switch(typeof T.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),T.$$typeof){case m:return"Portal";case S:return T.displayName||"Context";case x:return(T._context.displayName||"Context")+".Consumer";case C:var F=T.render;return T=T.displayName,T||(T=F.displayName||F.name||"",T=T!==""?"ForwardRef("+T+")":"ForwardRef"),T;case j:return F=T.displayName||null,F!==null?F:e(T.type)||"Memo";case D:F=T._payload,T=T._init;try{return e(T(F))}catch{}}return null}function t(T){return""+T}function r(T){try{t(T);var F=!1}catch{F=!0}if(F){F=console;var X=F.error,G=typeof Symbol=="function"&&Symbol.toStringTag&&T[Symbol.toStringTag]||T.constructor.name||"Object";return X.call(F,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",G),t(T)}}function n(T){if(T===v)return"<>";if(typeof T=="object"&&T!==null&&T.$$typeof===D)return"<...>";try{var F=e(T);return F?"<"+F+">":"<...>"}catch{return"<...>"}}function o(){var T=R.A;return T===null?null:T.getOwner()}function i(){return Error("react-stack-top-frame")}function s(T){if(L.call(T,"key")){var F=Object.getOwnPropertyDescriptor(T,"key").get;if(F&&F.isReactWarning)return!1}return T.key!==void 0}function a(T,F){function X(){W||(W=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",F))}X.isReactWarning=!0,Object.defineProperty(T,"key",{get:X,configurable:!0})}function l(){var T=e(this.type);return U[T]||(U[T]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),T=this.props.ref,T!==void 0?T:null}function d(T,F,X,G,ve,le){var P=X.ref;return T={$$typeof:w,type:T,key:F,props:X,_owner:G},(P!==void 0?P:null)!==null?Object.defineProperty(T,"ref",{enumerable:!1,get:l}):Object.defineProperty(T,"ref",{enumerable:!1,value:null}),T._store={},Object.defineProperty(T._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(T,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(T,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:ve}),Object.defineProperty(T,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:le}),Object.freeze&&(Object.freeze(T.props),Object.freeze(T)),T}function u(T,F,X,G,ve,le){var P=F.children;if(P!==void 0)if(G)if(K(P)){for(G=0;G<P.length;G++)f(P[G]);Object.freeze&&Object.freeze(P)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(P);if(L.call(F,"key")){P=e(T);var Q=Object.keys(F).filter(function($){return $!=="key"});G=0<Q.length?"{key: someKey, "+Q.join(": ..., ")+": ...}":"{key: someKey}",oe[P+G]||(Q=0<Q.length?"{"+Q.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
18
18
  let props = %s;
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,K,P,J,P),re[P+K]=!0)}if(P=null,Y!==void 0&&(r(Y),P=""+Y),s($)&&(r($.key),P=""+$.key),"key"in $){Y={};for(var ee in $)ee!=="key"&&(Y[ee]=$[ee])}else Y=$;return P&&a(Y,typeof T=="function"?T.displayName||T.name||"Unknown":T),d(T,P,Y,o(),ge,se)}function f(T){h(T)?T._store&&(T._store.validated=1):typeof T=="object"&&T!==null&&T.$$typeof===D&&(T._payload.status==="fulfilled"?h(T._payload.value)&&T._payload.value._store&&(T._payload.value._store.validated=1):T._store&&(T._store.validated=1))}function h(T){return typeof T=="object"&&T!==null&&T.$$typeof===w}var p=g,w=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),S=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),j=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),R=Symbol.for("react.activity"),I=Symbol.for("react.client.reference"),L=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_=Object.prototype.hasOwnProperty,G=Array.isArray,B=console.createTask?console.createTask:function(){return null};p={react_stack_bottom_frame:function(T){return T()}};var F,U={},z=p.react_stack_bottom_frame.bind(p,i)(),X=B(n(i)),re={};fr.Fragment=v,fr.jsx=function(T,$,Y){var K=1e4>L.recentlyCreatedOwnerStacks++;return u(T,$,Y,!1,K?Error("react-stack-top-frame"):z,K?B(n(T)):X)},fr.jsxs=function(T,$,Y){var K=1e4>L.recentlyCreatedOwnerStacks++;return u(T,$,Y,!0,K?Error("react-stack-top-frame"):z,K?B(n(T)):X)}})()),fr}var Zi;function jd(){return Zi||(Zi=1,process.env.NODE_ENV==="production"?Xr.exports=Cd():Xr.exports=Ed()),Xr.exports}var c=jd();const Qi=g.createContext(void 0),es=({config:e,children:t})=>c.jsx(Qi.Provider,{value:{registry:e.registry,schemas:e.schemas,tenantId:e.tenantId,assets:e.assets,overlayDisabledSectionTypes:e.overlayDisabledSectionTypes},children:t});function pr(){const e=g.useContext(Qi);if(e===void 0)throw new Error("useConfig must be used within ConfigProvider");return e}const ts=g.createContext(void 0),Jr=({mode:e,children:t})=>(g.useEffect(()=>{if(e!=="studio")return;const r=new MutationObserver(n=>{n.forEach(o=>{o.addedNodes.forEach(i=>{i instanceof HTMLElement&&i.hasAttribute("data-radix-portal")&&i.setAttribute("data-jp-studio-portal","true")})})});return r.observe(document.body,{childList:!0}),()=>r.disconnect()},[e]),c.jsx(ts.Provider,{value:{mode:e},children:t})),rs=()=>{const e=g.useContext(ts);if(e===void 0)throw new Error("useStudio must be used within a StudioProvider");return e};/**
22
+ <%s key={someKey} {...props} />`,G,P,Q,P),oe[P+G]=!0)}if(P=null,X!==void 0&&(r(X),P=""+X),s(F)&&(r(F.key),P=""+F.key),"key"in F){X={};for(var ee in F)ee!=="key"&&(X[ee]=F[ee])}else X=F;return P&&a(X,typeof T=="function"?T.displayName||T.name||"Unknown":T),d(T,P,X,o(),ve,le)}function f(T){h(T)?T._store&&(T._store.validated=1):typeof T=="object"&&T!==null&&T.$$typeof===D&&(T._payload.status==="fulfilled"?h(T._payload.value)&&T._payload.value._store&&(T._payload.value._store.validated=1):T._store&&(T._store.validated=1))}function h(T){return typeof T=="object"&&T!==null&&T.$$typeof===w}var p=g,w=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),S=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),N=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),D=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),I=Symbol.for("react.client.reference"),R=p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,K=Array.isArray,B=console.createTask?console.createTask:function(){return null};p={react_stack_bottom_frame:function(T){return T()}};var W,U={},A=p.react_stack_bottom_frame.bind(p,i)(),J=B(n(i)),oe={};pr.Fragment=v,pr.jsx=function(T,F,X){var G=1e4>R.recentlyCreatedOwnerStacks++;return u(T,F,X,!1,G?Error("react-stack-top-frame"):A,G?B(n(T)):J)},pr.jsxs=function(T,F,X){var G=1e4>R.recentlyCreatedOwnerStacks++;return u(T,F,X,!0,G?Error("react-stack-top-frame"):A,G?B(n(T)):J)}})()),pr}var Zi;function jd(){return Zi||(Zi=1,process.env.NODE_ENV==="production"?Xr.exports=Cd():Xr.exports=Ed()),Xr.exports}var c=jd();const Qi=g.createContext(void 0),es=({config:e,children:t})=>c.jsx(Qi.Provider,{value:{registry:e.registry,schemas:e.schemas,tenantId:e.tenantId,assets:e.assets,overlayDisabledSectionTypes:e.overlayDisabledSectionTypes},children:t});function hr(){const e=g.useContext(Qi);if(e===void 0)throw new Error("useConfig must be used within ConfigProvider");return e}const ts=g.createContext(void 0),Jr=({mode:e,children:t})=>(g.useEffect(()=>{if(e!=="studio")return;const r=new MutationObserver(n=>{n.forEach(o=>{o.addedNodes.forEach(i=>{i instanceof HTMLElement&&i.hasAttribute("data-radix-portal")&&i.setAttribute("data-jp-studio-portal","true")})})});return r.observe(document.body,{childList:!0}),()=>r.disconnect()},[e]),c.jsx(ts.Provider,{value:{mode:e},children:t})),rs=()=>{const e=g.useContext(ts);if(e===void 0)throw new Error("useStudio must be used within a StudioProvider");return e};/**
23
23
  * @license lucide-react v0.474.0 - ISC
24
24
  *
25
25
  * This source code is licensed under the ISC license.
@@ -39,156 +39,156 @@ React keys must be passed directly to JSX without using spread:
39
39
  *
40
40
  * This source code is licensed under the ISC license.
41
41
  * See the LICENSE file in the root directory of this source tree.
42
- */const me=(e,t)=>{const r=g.forwardRef(({className:n,...o},i)=>g.createElement(Ad,{ref:i,iconNode:t,className:ns(`lucide-${Nd(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
42
+ */const be=(e,t)=>{const r=g.forwardRef(({className:n,...o},i)=>g.createElement(Ad,{ref:i,iconNode:t,className:ns(`lucide-${Nd(e)}`,n),...o}));return r.displayName=`${e}`,r};/**
43
43
  * @license lucide-react v0.474.0 - ISC
44
44
  *
45
45
  * This source code is licensed under the ISC license.
46
46
  * See the LICENSE file in the root directory of this source tree.
47
- */const zd=me("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
47
+ */const zd=be("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
48
48
  * @license lucide-react v0.474.0 - ISC
49
49
  *
50
50
  * This source code is licensed under the ISC license.
51
51
  * See the LICENSE file in the root directory of this source tree.
52
- */const Pd=me("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
52
+ */const Pd=be("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
53
53
  * @license lucide-react v0.474.0 - ISC
54
54
  *
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
- */const Od=me("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
57
+ */const Od=be("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
58
58
  * @license lucide-react v0.474.0 - ISC
59
59
  *
60
60
  * This source code is licensed under the ISC license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
- */const Id=me("Box",[["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"}]]);/**
62
+ */const Id=be("Box",[["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"}]]);/**
63
63
  * @license lucide-react v0.474.0 - ISC
64
64
  *
65
65
  * This source code is licensed under the ISC license.
66
66
  * See the LICENSE file in the root directory of this source tree.
67
- */const lo=me("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
67
+ */const lo=be("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
68
68
  * @license lucide-react v0.474.0 - ISC
69
69
  *
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
- */const Zr=me("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
72
+ */const Zr=be("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
73
73
  * @license lucide-react v0.474.0 - ISC
74
74
  *
75
75
  * This source code is licensed under the ISC license.
76
76
  * See the LICENSE file in the root directory of this source tree.
77
- */const Dd=me("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
77
+ */const Dd=be("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
78
78
  * @license lucide-react v0.474.0 - ISC
79
79
  *
80
80
  * This source code is licensed under the ISC license.
81
81
  * See the LICENSE file in the root directory of this source tree.
82
- */const co=me("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
82
+ */const co=be("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
83
83
  * @license lucide-react v0.474.0 - ISC
84
84
  *
85
85
  * This source code is licensed under the ISC license.
86
86
  * See the LICENSE file in the root directory of this source tree.
87
- */const _d=me("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
87
+ */const _d=be("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
88
88
  * @license lucide-react v0.474.0 - ISC
89
89
  *
90
90
  * This source code is licensed under the ISC license.
91
91
  * See the LICENSE file in the root directory of this source tree.
92
- */const Md=me("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
92
+ */const Md=be("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
93
93
  * @license lucide-react v0.474.0 - ISC
94
94
  *
95
95
  * This source code is licensed under the ISC license.
96
96
  * See the LICENSE file in the root directory of this source tree.
97
- */const Rd=me("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/**
97
+ */const Rd=be("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/**
98
98
  * @license lucide-react v0.474.0 - ISC
99
99
  *
100
100
  * This source code is licensed under the ISC license.
101
101
  * See the LICENSE file in the root directory of this source tree.
102
- */const os=me("GripVertical",[["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"}]]);/**
102
+ */const os=be("GripVertical",[["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"}]]);/**
103
103
  * @license lucide-react v0.474.0 - ISC
104
104
  *
105
105
  * This source code is licensed under the ISC license.
106
106
  * See the LICENSE file in the root directory of this source tree.
107
- */const Qr=me("Image",[["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"}]]);/**
107
+ */const Qr=be("Image",[["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"}]]);/**
108
108
  * @license lucide-react v0.474.0 - ISC
109
109
  *
110
110
  * This source code is licensed under the ISC license.
111
111
  * See the LICENSE file in the root directory of this source tree.
112
- */const uo=me("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
112
+ */const uo=be("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);/**
113
113
  * @license lucide-react v0.474.0 - ISC
114
114
  *
115
115
  * This source code is licensed under the ISC license.
116
116
  * See the LICENSE file in the root directory of this source tree.
117
- */const is=me("Link2",[["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"}]]);/**
117
+ */const is=be("Link2",[["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"}]]);/**
118
118
  * @license lucide-react v0.474.0 - ISC
119
119
  *
120
120
  * This source code is licensed under the ISC license.
121
121
  * See the LICENSE file in the root directory of this source tree.
122
- */const Ld=me("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
122
+ */const Ld=be("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
123
123
  * @license lucide-react v0.474.0 - ISC
124
124
  *
125
125
  * This source code is licensed under the ISC license.
126
126
  * See the LICENSE file in the root directory of this source tree.
127
- */const $d=me("Pencil",[["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"}]]);/**
127
+ */const $d=be("Pencil",[["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"}]]);/**
128
128
  * @license lucide-react v0.474.0 - ISC
129
129
  *
130
130
  * This source code is licensed under the ISC license.
131
131
  * See the LICENSE file in the root directory of this source tree.
132
- */const fo=me("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
132
+ */const fo=be("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
133
133
  * @license lucide-react v0.474.0 - ISC
134
134
  *
135
135
  * This source code is licensed under the ISC license.
136
136
  * See the LICENSE file in the root directory of this source tree.
137
- */const ss=me("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
137
+ */const ss=be("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
138
138
  * @license lucide-react v0.474.0 - ISC
139
139
  *
140
140
  * This source code is licensed under the ISC license.
141
141
  * See the LICENSE file in the root directory of this source tree.
142
- */const Fd=me("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
142
+ */const Fd=be("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
143
143
  * @license lucide-react v0.474.0 - ISC
144
144
  *
145
145
  * This source code is licensed under the ISC license.
146
146
  * See the LICENSE file in the root directory of this source tree.
147
- */const Wd=me("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
147
+ */const Wd=be("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
148
148
  * @license lucide-react v0.474.0 - ISC
149
149
  *
150
150
  * This source code is licensed under the ISC license.
151
151
  * See the LICENSE file in the root directory of this source tree.
152
- */const Ud=me("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
152
+ */const Ud=be("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
153
153
  * @license lucide-react v0.474.0 - ISC
154
154
  *
155
155
  * This source code is licensed under the ISC license.
156
156
  * See the LICENSE file in the root directory of this source tree.
157
- */const Bd=me("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
157
+ */const Bd=be("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
158
158
  * @license lucide-react v0.474.0 - ISC
159
159
  *
160
160
  * This source code is licensed under the ISC license.
161
161
  * See the LICENSE file in the root directory of this source tree.
162
- */const en=me("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
162
+ */const en=be("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
163
163
  * @license lucide-react v0.474.0 - ISC
164
164
  *
165
165
  * This source code is licensed under the ISC license.
166
166
  * See the LICENSE file in the root directory of this source tree.
167
- */const Hd=me("TriangleAlert",[["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"}]]);/**
167
+ */const Hd=be("TriangleAlert",[["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"}]]);/**
168
168
  * @license lucide-react v0.474.0 - ISC
169
169
  *
170
170
  * This source code is licensed under the ISC license.
171
171
  * See the LICENSE file in the root directory of this source tree.
172
- */const as=me("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
172
+ */const as=be("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
173
173
  * @license lucide-react v0.474.0 - ISC
174
174
  *
175
175
  * This source code is licensed under the ISC license.
176
176
  * See the LICENSE file in the root directory of this source tree.
177
- */const Ut=me("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
177
+ */const Wt=be("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
178
178
  * @license lucide-react v0.474.0 - ISC
179
179
  *
180
180
  * This source code is licensed under the ISC license.
181
181
  * See the LICENSE file in the root directory of this source tree.
182
- */const Vd=me("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);class Kd extends g.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,r){console.error(`[JsonPages] Component Crash [${this.props.type}]:`,t,r)}render(){return this.state.hasError?c.jsxs("div",{className:"p-8 m-4 bg-amber-500/5 border-2 border-dashed border-amber-500/20 rounded-xl flex flex-col items-center text-center gap-3",children:[c.jsx(Hd,{className:"text-amber-500",size:32}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("h4",{className:"text-sm font-bold text-amber-200 uppercase tracking-tight",children:"Component Error"}),c.jsxs("p",{className:"text-xs text-amber-500/70 font-mono",children:["Type: ",this.props.type]})]}),c.jsx("p",{className:"text-xs text-zinc-400 max-w-[280px] leading-relaxed",children:"This section failed to render. Check the console for details or verify the JSON data structure."})]}):this.props.children}}const Gd=({type:e,scope:t,isSelected:r,sectionId:n,sectionIndex:o=0,totalSections:i=0,onReorder:s})=>{const a=typeof o=="number"&&o>0&&s,l=typeof o=="number"&&o<i-1&&s;return c.jsx("div",{"data-jp-section-overlay":!0,"aria-hidden":!0,className:oe("absolute inset-0 pointer-events-none transition-all duration-200 z-[50]","border-2 border-transparent group-hover:border-blue-400/50 group-hover:border-dashed",r&&"border-2 border-blue-600 border-solid bg-blue-500/5"),children:c.jsxs("div",{className:oe("absolute top-0 right-0 flex flex-nowrap items-center gap-1 pl-1 pr-2 py-1 text-[9px] font-black uppercase tracking-widest transition-opacity pointer-events-auto","bg-blue-600 text-white",r||"group-hover:opacity-100 opacity-0"),children:[s&&n!=null&&c.jsxs("span",{className:"shrink-0 flex items-center gap-0.5",children:[c.jsx("button",{type:"button",onClick:d=>{d.stopPropagation(),a&&s(n,o-1)},disabled:!a,className:"inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",title:"Move section up","aria-label":"Move section up",children:c.jsx(co,{size:12,strokeWidth:2.5})}),c.jsx("button",{type:"button",onClick:d=>{d.stopPropagation(),l&&s(n,o+2)},disabled:!l,className:"inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",title:"Move section down","aria-label":"Move section down",children:c.jsx(Zr,{size:12,strokeWidth:2.5})})]}),c.jsx("span",{className:"shrink-0",children:e}),c.jsx("span",{className:"opacity-50 shrink-0",children:"|"}),c.jsx("span",{className:"shrink-0",children:t})]})})},hr=({section:e,menu:t,selectedId:r,reorderable:n,sectionIndex:o,totalSections:i,onReorder:s})=>{var k,x;const{mode:a}=rs(),{registry:l,overlayDisabledSectionTypes:d}=pr(),u=a==="studio",f=u&&r===e.id,h=l[e.type],p=e.type==="header"||e.type==="footer"?"global":"local",w=Array.isArray(d)?d.includes(e.type):!1,m=e.type==="header"&&((k=e.settings)==null?void 0:k.sticky);if(!h)return c.jsxs("div",{className:"p-6 m-4 bg-red-500/10 text-red-400 border border-red-500/20 rounded-lg text-sm font-mono",children:[c.jsx("strong",{children:"Missing Component:"})," ",e.type]});const v=()=>{const S=h;return e.type==="header"&&t?c.jsx(S,{data:e.data,settings:e.settings,menu:t}):c.jsx(S,{data:e.data,settings:e.settings})},y=(x=e.data)==null?void 0:x.anchorId;return c.jsxs("div",{id:y||void 0,"data-section-id":u?e.id:void 0,"data-section-type":u?e.type:void 0,"data-section-scope":u?p:void 0,...u&&f?{"data-jp-selected":!0}:{},className:oe("relative w-full",u&&!w&&"group cursor-pointer",u&&m?"sticky top-0 z-[60]":e.type==="header"?"relative":"relative z-0",f&&"z-[70]"),children:[c.jsx("div",{className:e.type==="header"?"relative":"relative z-0",children:c.jsx(Kd,{type:e.type,children:v()})}),u&&!w&&c.jsx(Gd,{type:e.type,scope:p,isSelected:!!f,sectionId:n&&p==="local"?e.id:void 0,sectionIndex:n&&p==="local"?o:void 0,totalSections:n&&p==="local"?i:void 0,onReorder:n&&p==="local"?s:void 0})]})},Yd=e=>{g.useEffect(()=>{document.title=e.title;let t=document.querySelector('meta[name="description"]');t||(t=document.createElement("meta"),t.setAttribute("name","description"),document.head.appendChild(t)),t.setAttribute("content",e.description)},[e.title,e.description])};function mr(e){return typeof e=="object"&&e!==null}function tn(e){if(!mr(e))return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function qd(e){return mr(e)&&typeof e.$ref=="string"&&e.$ref.trim().length>0}function Xd(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function ls(e,t){if(!t||t==="#")return e;const r=t.startsWith("#")?t.slice(1):t;if(!r||r==="/")return e;let n=e;for(const o of r.replace(/^\//,"").split("/")){const i=Xd(o);if(Array.isArray(n)){const s=Number(i);if(!Number.isInteger(s)||s<0||s>=n.length)return;n=n[s];continue}if(!mr(n)||!(i in n))return;n=n[i]}return n}function Bt(e){const n=e.trim().replace(/\\/g,"/").replace(/^\/+/,"").split("/"),o=[];for(const i of n)if(!(!i||i===".")){if(i===".."){o.length>0&&o.pop();continue}o.push(i)}return o.join("/")}function Jd(e){const t=Bt(e),r=t.lastIndexOf("/");return r===-1?"":t.slice(0,r)}function Zd(e,t){const r=new Set,n=Bt(e);n&&r.add(n);const o=Jd(t),i=Bt(o?`${o}/${e}`:e);return i&&r.add(i),Array.from(r)}function gr(e){return Array.isArray(e)?e.map(t=>gr(t)):tn(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,gr(r)])):e}function br(e,t,r){for(const n of t){const o=Bt(n);o&&e.set(o,r)}}function Qd({pages:e,siteConfig:t,themeConfig:r,menuConfig:n,refDocuments:o}){const i=new Map;br(i,["site.json","config/site.json","src/data/config/site.json"],t),br(i,["theme.json","config/theme.json","src/data/config/theme.json"],r),br(i,["menu.json","config/menu.json","src/data/config/menu.json"],n);for(const[s,a]of Object.entries(e)){const l=s.replace(/^\/+|\/+$/g,"")||"home";br(i,[`pages/${l}.json`,`src/data/pages/${l}.json`],a)}for(const[s,a]of Object.entries(o??{}))br(i,[s],a);return i}function eu(e,t,r){const[n,o=""]=e.split("#"),i=o?`/${o.replace(/^\//,"")}`:"";if(!n){const s=Bt(t),a=r.documents.get(s);if(a===void 0)return null;const l=ls(a,i);return l===void 0?null:{value:l,documentPath:s}}for(const s of Zd(n,t)){const a=r.documents.get(s);if(a===void 0)continue;const l=ls(a,i);if(l!==void 0)return{value:l,documentPath:s}}return null}function Pt(e,t,r){if(Array.isArray(e))return e.map(n=>Pt(n,t,r));if(!tn(e))return e;if(qd(e)){const n=`${Bt(t)}::${e.$ref}`;if(r.stack.includes(n))return console.warn("[JsonPages] Circular $ref skipped",e.$ref),gr(e);if(r.cache.has(n)){const l=gr(r.cache.get(n)),d=Object.entries(e).filter(([f])=>f!=="$ref");if(d.length===0)return l;const u=Object.fromEntries(d.map(([f,h])=>[f,Pt(h,t,r)]));return tn(l)?{...l,...u}:l}const o=eu(e.$ref,t,r);if(!o)return console.warn("[JsonPages] Unresolved $ref",e.$ref),Object.fromEntries(Object.entries(e).map(([l,d])=>[l,Pt(d,t,r)]));r.stack.push(n);const i=Pt(o.value,o.documentPath,r);r.stack.pop(),r.cache.set(n,gr(i));const s=Object.entries(e).filter(([l])=>l!=="$ref");if(s.length===0)return i;const a=Object.fromEntries(s.map(([l,d])=>[l,Pt(d,t,r)]));return tn(i)?{...i,...a}:i}return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,Pt(o,t,r)]))}function rn(e,t,r){return Pt(e,t,{documents:r,cache:new Map,stack:[]})}function po(e){return mr(e)?typeof e.label=="string"&&typeof e.href=="string":!1}function tu(e){if(!mr(e))return null;const t=e.links;if(Array.isArray(t)&&t.every(po))return t;const r=e.menu;if(Array.isArray(r)&&r.every(po))return r;const n=e.menuConfig;return Array.isArray(n)&&n.every(po)?n:null}function nn(e,t){const r=tu(e);return r||(Array.isArray(t)?t:[])}function on(e,t){if(e.type==="header")return nn(e.data,t)}function Ot(e){const t=Qd(e);return{pages:Object.fromEntries(Object.entries(e.pages).map(([r,n])=>[r,rn(n,`pages/${r.replace(/^\/+|\/+$/g,"")||"home"}.json`,t)])),siteConfig:rn(e.siteConfig,"config/site.json",t),themeConfig:rn(e.themeConfig,"config/theme.json",t),menuConfig:rn(e.menuConfig,"config/menu.json",t)}}const ru="application/json",ho=({pageConfig:e,siteConfig:t,menuConfig:r,selectedId:n,onReorder:o,scrollToSectionId:i,onActiveSectionChange:s})=>{var y,k;Yd(e.meta);const[a,l]=g.useState(null),d=g.useRef({}),u=g.useRef(s);u.current=s;const f=Pi(e,t),h=x=>{var S;(S=u.current)==null||S.call(u,x)};g.useEffect(()=>{if(!i)return;const x=d.current[i];x&&x.scrollIntoView({behavior:"smooth",block:"center"})},[i]),g.useEffect(()=>{if(!u.current)return;const S=[...f&&t.header?[t.header.id]:[],...e.sections.map(E=>E.id),...t.footer?[t.footer.id]:[]],C=new IntersectionObserver(E=>{E.forEach(D=>{var R;if(D.isIntersecting&&D.intersectionRatio>.5){const I=D.target.getAttribute("data-section-id");I&&((R=u.current)==null||R.call(u,I))}})},{threshold:[0,.5,1],rootMargin:"-20% 0px -20% 0px"});let j=!1;const N=requestAnimationFrame(()=>{j||S.forEach(E=>{const D=d.current[E];D&&C.observe(D)})});return()=>{j=!0,cancelAnimationFrame(N),C.disconnect()}},[e.sections,e["global-header"],f,(y=t.header)==null?void 0:y.id,(k=t.footer)==null?void 0:k.id]);const p=(x,S)=>{x.preventDefault(),x.dataTransfer.dropEffect="move",l(S)},w=()=>{l(null)},m=(x,S)=>{if(x.preventDefault(),l(null),!!o)try{const C=x.dataTransfer.getData(ru),{sectionId:j}=JSON.parse(C);typeof j=="string"&&o(j,S)}catch{}},v=()=>{const x=typeof o=="function",S=e.sections.map((C,j)=>{const N=a===j;return x?c.jsxs("div",{ref:E=>{d.current[C.id]=E},"data-section-id":C.id,style:{position:"relative"},onMouseEnter:()=>h(C.id),children:[c.jsx("div",{"data-jp-drop-zone":!0,style:{position:"absolute",left:0,right:0,top:-1,height:12,zIndex:55,pointerEvents:"auto",backgroundColor:N?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:N?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:E=>p(E,j),onDragLeave:w,onDrop:E=>m(E,j)}),c.jsx(hr,{section:C,menu:on(C,r.main),selectedId:n,reorderable:!0,sectionIndex:j,totalSections:e.sections.length,onReorder:o})]},C.id):c.jsx("div",{ref:E=>{d.current[C.id]=E},"data-section-id":C.id,onMouseEnter:()=>h(C.id),children:c.jsx(hr,{section:C,menu:on(C,r.main),selectedId:n})},C.id)});if(x&&S.length>0){const C=e.sections.length,j=a===C;S.push(c.jsx("div",{"data-jp-drop-zone":!0,style:{position:"relative",left:0,right:0,height:24,minHeight:24,zIndex:55,pointerEvents:"auto",backgroundColor:j?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:j?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:N=>p(N,C),onDragLeave:w,onDrop:N=>m(N,C)},"jp-drop-after-last"))}return S};return c.jsxs("div",{className:"min-h-screen flex flex-col bg-[var(--color-background)]",children:[f&&t.header!=null&&c.jsx("div",{ref:x=>{d.current[t.header.id]=x},"data-section-id":t.header.id,onMouseEnter:()=>h(t.header.id),children:c.jsx(hr,{section:t.header,menu:on(t.header,r.main),selectedId:n})}),c.jsx("main",{className:"flex-1",children:v()}),t.footer!=null&&c.jsx("div",{ref:x=>{d.current[t.footer.id]=x},"data-section-id":t.footer.id,onMouseEnter:()=>h(t.footer.id),children:c.jsx(hr,{section:t.footer,selectedId:n})})]})},sn=({mode:e,tenantCss:t,adminCss:r,children:n})=>(g.useLayoutEffect(()=>{const o=`jp-theme-${e}`,i=e==="tenant"?t:r;if(!document.getElementById(o)&&i){const s=document.createElement("style");s.id=o,s.innerHTML=i,document.head.appendChild(s)}return()=>{const s=document.getElementById(o);s&&s.remove()}},[e,t,r]),c.jsx(c.Fragment,{children:n}));function nu(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.useMemo(()=>n=>{t.forEach(o=>o(n))},t)}const an=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ht(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function mo(e){return"nodeType"in e}function Fe(e){var t,r;return e?Ht(e)?e:mo(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function go(e){const{Document:t}=Fe(e);return e instanceof t}function vr(e){return Ht(e)?!1:e instanceof Fe(e).HTMLElement}function cs(e){return e instanceof Fe(e).SVGElement}function Vt(e){return e?Ht(e)?e.document:mo(e)?go(e)?e:vr(e)||cs(e)?e.ownerDocument:document:document:document}const Qe=an?g.useLayoutEffect:g.useEffect;function ln(e){const t=g.useRef(e);return Qe(()=>{t.current=e}),g.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}function ou(){const e=g.useRef(null),t=g.useCallback((n,o)=>{e.current=setInterval(n,o)},[]),r=g.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function xr(e,t){t===void 0&&(t=[e]);const r=g.useRef(e);return Qe(()=>{r.current!==e&&(r.current=e)},t),r}function wr(e,t){const r=g.useRef();return g.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function cn(e){const t=ln(e),r=g.useRef(null),n=g.useCallback(o=>{o!==r.current&&(t==null||t(o,r.current)),r.current=o},[]);return[r,n]}function dn(e){const t=g.useRef();return g.useEffect(()=>{t.current=e},[e]),t.current}let bo={};function yr(e,t){return g.useMemo(()=>{if(t)return t;const r=bo[e]==null?0:bo[e]+1;return bo[e]=r,e+"-"+r},[e,t])}function ds(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return n.reduce((i,s)=>{const a=Object.entries(s);for(const[l,d]of a){const u=i[l];u!=null&&(i[l]=u+e*d)}return i},{...t})}}const Kt=ds(1),kr=ds(-1);function iu(e){return"clientX"in e&&"clientY"in e}function un(e){if(!e)return!1;const{KeyboardEvent:t}=Fe(e.target);return t&&e instanceof t}function su(e){if(!e)return!1;const{TouchEvent:t}=Fe(e.target);return t&&e instanceof t}function fn(e){if(su(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return iu(e)?{x:e.clientX,y:e.clientY}:null}const vt=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[vt.Translate.toString(e),vt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),us="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function au(e){return e.matches(us)?e:e.querySelector(us)}const lu={display:"none"};function cu(e){let{id:t,value:r}=e;return g.createElement("div",{id:t,style:lu},r)}function du(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return g.createElement("div",{id:t,style:o,role:"status","aria-live":n,"aria-atomic":!0},r)}function uu(){const[e,t]=g.useState("");return{announce:g.useCallback(n=>{n!=null&&t(n)},[]),announcement:e}}const fs=g.createContext(null);function fu(e){const t=g.useContext(fs);g.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function pu(){const[e]=g.useState(()=>new Set),t=g.useCallback(n=>(e.add(n),()=>e.delete(n)),[e]);return[g.useCallback(n=>{let{type:o,event:i}=n;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const hu={draggable:`
182
+ */const Vd=be("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);class Kd extends g.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,r){console.error(`[JsonPages] Component Crash [${this.props.type}]:`,t,r)}render(){return this.state.hasError?c.jsxs("div",{className:"p-8 m-4 bg-amber-500/5 border-2 border-dashed border-amber-500/20 rounded-xl flex flex-col items-center text-center gap-3",children:[c.jsx(Hd,{className:"text-amber-500",size:32}),c.jsxs("div",{className:"space-y-1",children:[c.jsx("h4",{className:"text-sm font-bold text-amber-200 uppercase tracking-tight",children:"Component Error"}),c.jsxs("p",{className:"text-xs text-amber-500/70 font-mono",children:["Type: ",this.props.type]})]}),c.jsx("p",{className:"text-xs text-zinc-400 max-w-[280px] leading-relaxed",children:"This section failed to render. Check the console for details or verify the JSON data structure."})]}):this.props.children}}const Gd=({type:e,scope:t,isSelected:r,sectionId:n,sectionIndex:o=0,totalSections:i=0,onReorder:s})=>{const a=typeof o=="number"&&o>0&&s,l=typeof o=="number"&&o<i-1&&s;return c.jsx("div",{"data-jp-section-overlay":!0,"aria-hidden":!0,className:se("absolute inset-0 pointer-events-none transition-all duration-200 z-[50]","border-2 border-transparent group-hover:border-blue-400/50 group-hover:border-dashed",r&&"border-2 border-blue-600 border-solid bg-blue-500/5"),children:c.jsxs("div",{className:se("absolute top-0 right-0 flex flex-nowrap items-center gap-1 pl-1 pr-2 py-1 text-[9px] font-black uppercase tracking-widest transition-opacity pointer-events-auto","bg-blue-600 text-white",r||"group-hover:opacity-100 opacity-0"),children:[s&&n!=null&&c.jsxs("span",{className:"shrink-0 flex items-center gap-0.5",children:[c.jsx("button",{type:"button",onClick:d=>{d.stopPropagation(),a&&s(n,o-1)},disabled:!a,className:"inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",title:"Move section up","aria-label":"Move section up",children:c.jsx(co,{size:12,strokeWidth:2.5})}),c.jsx("button",{type:"button",onClick:d=>{d.stopPropagation(),l&&s(n,o+2)},disabled:!l,className:"inline-flex items-center justify-center min-w-[18px] min-h-[18px] rounded bg-white/20 hover:bg-white/30 disabled:opacity-30 disabled:pointer-events-none",title:"Move section down","aria-label":"Move section down",children:c.jsx(Zr,{size:12,strokeWidth:2.5})})]}),c.jsx("span",{className:"shrink-0",children:e}),c.jsx("span",{className:"opacity-50 shrink-0",children:"|"}),c.jsx("span",{className:"shrink-0",children:t})]})})},mr=({section:e,menu:t,selectedId:r,reorderable:n,sectionIndex:o,totalSections:i,onReorder:s})=>{var k,x;const{mode:a}=rs(),{registry:l,overlayDisabledSectionTypes:d}=hr(),u=a==="studio",f=u&&r===e.id,h=l[e.type],p=e.type==="header"||e.type==="footer"?"global":"local",w=Array.isArray(d)?d.includes(e.type):!1,m=e.type==="header"&&((k=e.settings)==null?void 0:k.sticky);if(!h)return c.jsxs("div",{className:"p-6 m-4 bg-red-500/10 text-red-400 border border-red-500/20 rounded-lg text-sm font-mono",children:[c.jsx("strong",{children:"Missing Component:"})," ",e.type]});const v=()=>{const S=h;return e.type==="header"&&t?c.jsx(S,{data:e.data,settings:e.settings,menu:t}):c.jsx(S,{data:e.data,settings:e.settings})},y=(x=e.data)==null?void 0:x.anchorId;return c.jsxs("div",{id:y||void 0,"data-section-id":u?e.id:void 0,"data-section-type":u?e.type:void 0,"data-section-scope":u?p:void 0,...u&&f?{"data-jp-selected":!0}:{},className:se("relative w-full",u&&!w&&"group cursor-pointer",u&&m?"sticky top-0 z-[60]":e.type==="header"?"relative":"relative z-0",f&&"z-[70]"),children:[c.jsx("div",{className:e.type==="header"?"relative":"relative z-0",children:c.jsx(Kd,{type:e.type,children:v()})}),u&&!w&&c.jsx(Gd,{type:e.type,scope:p,isSelected:!!f,sectionId:n&&p==="local"?e.id:void 0,sectionIndex:n&&p==="local"?o:void 0,totalSections:n&&p==="local"?i:void 0,onReorder:n&&p==="local"?s:void 0})]})},Yd=e=>{g.useEffect(()=>{document.title=e.title;let t=document.querySelector('meta[name="description"]');t||(t=document.createElement("meta"),t.setAttribute("name","description"),document.head.appendChild(t)),t.setAttribute("content",e.description)},[e.title,e.description])};function gr(e){return typeof e=="object"&&e!==null}function tn(e){if(!gr(e))return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function qd(e){return gr(e)&&typeof e.$ref=="string"&&e.$ref.trim().length>0}function Xd(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function ls(e,t){if(!t||t==="#")return e;const r=t.startsWith("#")?t.slice(1):t;if(!r||r==="/")return e;let n=e;for(const o of r.replace(/^\//,"").split("/")){const i=Xd(o);if(Array.isArray(n)){const s=Number(i);if(!Number.isInteger(s)||s<0||s>=n.length)return;n=n[s];continue}if(!gr(n)||!(i in n))return;n=n[i]}return n}function Ut(e){const n=e.trim().replace(/\\/g,"/").replace(/^\/+/,"").split("/"),o=[];for(const i of n)if(!(!i||i===".")){if(i===".."){o.length>0&&o.pop();continue}o.push(i)}return o.join("/")}function Jd(e){const t=Ut(e),r=t.lastIndexOf("/");return r===-1?"":t.slice(0,r)}function Zd(e,t){const r=new Set,n=Ut(e);n&&r.add(n);const o=Jd(t),i=Ut(o?`${o}/${e}`:e);return i&&r.add(i),Array.from(r)}function br(e){return Array.isArray(e)?e.map(t=>br(t)):tn(e)?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,br(r)])):e}function vr(e,t,r){for(const n of t){const o=Ut(n);o&&e.set(o,r)}}function Qd({pages:e,siteConfig:t,themeConfig:r,menuConfig:n,refDocuments:o}){const i=new Map;vr(i,["site.json","config/site.json","src/data/config/site.json"],t),vr(i,["theme.json","config/theme.json","src/data/config/theme.json"],r),vr(i,["menu.json","config/menu.json","src/data/config/menu.json"],n);for(const[s,a]of Object.entries(e)){const l=s.replace(/^\/+|\/+$/g,"")||"home";vr(i,[`pages/${l}.json`,`src/data/pages/${l}.json`],a)}for(const[s,a]of Object.entries(o??{}))vr(i,[s],a);return i}function eu(e,t,r){const[n,o=""]=e.split("#"),i=o?`/${o.replace(/^\//,"")}`:"";if(!n){const s=Ut(t),a=r.documents.get(s);if(a===void 0)return null;const l=ls(a,i);return l===void 0?null:{value:l,documentPath:s}}for(const s of Zd(n,t)){const a=r.documents.get(s);if(a===void 0)continue;const l=ls(a,i);if(l!==void 0)return{value:l,documentPath:s}}return null}function Pt(e,t,r){if(Array.isArray(e))return e.map(n=>Pt(n,t,r));if(!tn(e))return e;if(qd(e)){const n=`${Ut(t)}::${e.$ref}`;if(r.stack.includes(n))return console.warn("[JsonPages] Circular $ref skipped",e.$ref),br(e);if(r.cache.has(n)){const l=br(r.cache.get(n)),d=Object.entries(e).filter(([f])=>f!=="$ref");if(d.length===0)return l;const u=Object.fromEntries(d.map(([f,h])=>[f,Pt(h,t,r)]));return tn(l)?{...l,...u}:l}const o=eu(e.$ref,t,r);if(!o)return console.warn("[JsonPages] Unresolved $ref",e.$ref),Object.fromEntries(Object.entries(e).map(([l,d])=>[l,Pt(d,t,r)]));r.stack.push(n);const i=Pt(o.value,o.documentPath,r);r.stack.pop(),r.cache.set(n,br(i));const s=Object.entries(e).filter(([l])=>l!=="$ref");if(s.length===0)return i;const a=Object.fromEntries(s.map(([l,d])=>[l,Pt(d,t,r)]));return tn(i)?{...i,...a}:i}return Object.fromEntries(Object.entries(e).map(([n,o])=>[n,Pt(o,t,r)]))}function rn(e,t,r){return Pt(e,t,{documents:r,cache:new Map,stack:[]})}function po(e){return gr(e)?typeof e.label=="string"&&typeof e.href=="string":!1}function tu(e){if(!gr(e))return null;const t=e.links;if(Array.isArray(t)&&t.every(po))return t;const r=e.menu;if(Array.isArray(r)&&r.every(po))return r;const n=e.menuConfig;return Array.isArray(n)&&n.every(po)?n:null}function nn(e,t){const r=tu(e);return r||(Array.isArray(t)?t:[])}function on(e,t){if(e.type==="header")return nn(e.data,t)}function Ot(e){const t=Qd(e);return{pages:Object.fromEntries(Object.entries(e.pages).map(([r,n])=>[r,rn(n,`pages/${r.replace(/^\/+|\/+$/g,"")||"home"}.json`,t)])),siteConfig:rn(e.siteConfig,"config/site.json",t),themeConfig:rn(e.themeConfig,"config/theme.json",t),menuConfig:rn(e.menuConfig,"config/menu.json",t)}}const ru="application/json",ho=({pageConfig:e,siteConfig:t,menuConfig:r,selectedId:n,onReorder:o,scrollToSectionId:i,onActiveSectionChange:s})=>{var y,k;Yd(e.meta);const[a,l]=g.useState(null),d=g.useRef({}),u=g.useRef(s);u.current=s;const f=Pi(e,t),h=x=>{var S;(S=u.current)==null||S.call(u,x)};g.useEffect(()=>{if(!i)return;const x=d.current[i];x&&x.scrollIntoView({behavior:"smooth",block:"center"})},[i]),g.useEffect(()=>{if(!u.current)return;const S=[...f&&t.header?[t.header.id]:[],...e.sections.map(j=>j.id),...t.footer?[t.footer.id]:[]],C=new IntersectionObserver(j=>{j.forEach(D=>{var M;if(D.isIntersecting&&D.intersectionRatio>.5){const I=D.target.getAttribute("data-section-id");I&&((M=u.current)==null||M.call(u,I))}})},{threshold:[0,.5,1],rootMargin:"-20% 0px -20% 0px"});let E=!1;const N=requestAnimationFrame(()=>{E||S.forEach(j=>{const D=d.current[j];D&&C.observe(D)})});return()=>{E=!0,cancelAnimationFrame(N),C.disconnect()}},[e.sections,e["global-header"],f,(y=t.header)==null?void 0:y.id,(k=t.footer)==null?void 0:k.id]);const p=(x,S)=>{x.preventDefault(),x.dataTransfer.dropEffect="move",l(S)},w=()=>{l(null)},m=(x,S)=>{if(x.preventDefault(),l(null),!!o)try{const C=x.dataTransfer.getData(ru),{sectionId:E}=JSON.parse(C);typeof E=="string"&&o(E,S)}catch{}},v=()=>{const x=typeof o=="function",S=e.sections.map((C,E)=>{const N=a===E;return x?c.jsxs("div",{ref:j=>{d.current[C.id]=j},"data-section-id":C.id,style:{position:"relative"},onMouseEnter:()=>h(C.id),children:[c.jsx("div",{"data-jp-drop-zone":!0,style:{position:"absolute",left:0,right:0,top:-1,height:12,zIndex:55,pointerEvents:"auto",backgroundColor:N?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:N?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:j=>p(j,E),onDragLeave:w,onDrop:j=>m(j,E)}),c.jsx(mr,{section:C,menu:on(C,r.main),selectedId:n,reorderable:!0,sectionIndex:E,totalSections:e.sections.length,onReorder:o})]},C.id):c.jsx("div",{ref:j=>{d.current[C.id]=j},"data-section-id":C.id,onMouseEnter:()=>h(C.id),children:c.jsx(mr,{section:C,menu:on(C,r.main),selectedId:n})},C.id)});if(x&&S.length>0){const C=e.sections.length,E=a===C;S.push(c.jsx("div",{"data-jp-drop-zone":!0,style:{position:"relative",left:0,right:0,height:24,minHeight:24,zIndex:55,pointerEvents:"auto",backgroundColor:E?"rgba(59, 130, 246, 0.4)":"transparent",borderTop:E?"2px solid rgb(96, 165, 250)":"2px solid transparent"},onDragOver:N=>p(N,C),onDragLeave:w,onDrop:N=>m(N,C)},"jp-drop-after-last"))}return S};return c.jsxs("div",{className:"min-h-screen flex flex-col bg-[var(--color-background)]",children:[f&&t.header!=null&&c.jsx("div",{ref:x=>{d.current[t.header.id]=x},"data-section-id":t.header.id,onMouseEnter:()=>h(t.header.id),children:c.jsx(mr,{section:t.header,menu:on(t.header,r.main),selectedId:n})}),c.jsx("main",{className:"flex-1",children:v()}),t.footer!=null&&c.jsx("div",{ref:x=>{d.current[t.footer.id]=x},"data-section-id":t.footer.id,onMouseEnter:()=>h(t.footer.id),children:c.jsx(mr,{section:t.footer,selectedId:n})})]})},sn=({mode:e,tenantCss:t,adminCss:r,children:n})=>(g.useLayoutEffect(()=>{const o=`jp-theme-${e}`,i=e==="tenant"?t:r;if(!document.getElementById(o)&&i){const s=document.createElement("style");s.id=o,s.innerHTML=i,document.head.appendChild(s)}return()=>{const s=document.getElementById(o);s&&s.remove()}},[e,t,r]),c.jsx(c.Fragment,{children:n}));function nu(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.useMemo(()=>n=>{t.forEach(o=>o(n))},t)}const an=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Bt(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function mo(e){return"nodeType"in e}function We(e){var t,r;return e?Bt(e)?e:mo(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function go(e){const{Document:t}=We(e);return e instanceof t}function xr(e){return Bt(e)?!1:e instanceof We(e).HTMLElement}function cs(e){return e instanceof We(e).SVGElement}function Ht(e){return e?Bt(e)?e.document:mo(e)?go(e)?e:xr(e)||cs(e)?e.ownerDocument:document:document:document}const et=an?g.useLayoutEffect:g.useEffect;function ln(e){const t=g.useRef(e);return et(()=>{t.current=e}),g.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}function ou(){const e=g.useRef(null),t=g.useCallback((n,o)=>{e.current=setInterval(n,o)},[]),r=g.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function wr(e,t){t===void 0&&(t=[e]);const r=g.useRef(e);return et(()=>{r.current!==e&&(r.current=e)},t),r}function yr(e,t){const r=g.useRef();return g.useMemo(()=>{const n=e(r.current);return r.current=n,n},[...t])}function cn(e){const t=ln(e),r=g.useRef(null),n=g.useCallback(o=>{o!==r.current&&(t==null||t(o,r.current)),r.current=o},[]);return[r,n]}function dn(e){const t=g.useRef();return g.useEffect(()=>{t.current=e},[e]),t.current}let bo={};function kr(e,t){return g.useMemo(()=>{if(t)return t;const r=bo[e]==null?0:bo[e]+1;return bo[e]=r,e+"-"+r},[e,t])}function ds(e){return function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return n.reduce((i,s)=>{const a=Object.entries(s);for(const[l,d]of a){const u=i[l];u!=null&&(i[l]=u+e*d)}return i},{...t})}}const Vt=ds(1),Sr=ds(-1);function iu(e){return"clientX"in e&&"clientY"in e}function un(e){if(!e)return!1;const{KeyboardEvent:t}=We(e.target);return t&&e instanceof t}function su(e){if(!e)return!1;const{TouchEvent:t}=We(e.target);return t&&e instanceof t}function fn(e){if(su(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return iu(e)?{x:e.clientX,y:e.clientY}:null}const wt=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[wt.Translate.toString(e),wt.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:n}=e;return t+" "+r+"ms "+n}}}),us="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function au(e){return e.matches(us)?e:e.querySelector(us)}const lu={display:"none"};function cu(e){let{id:t,value:r}=e;return g.createElement("div",{id:t,style:lu},r)}function du(e){let{id:t,announcement:r,ariaLiveType:n="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return g.createElement("div",{id:t,style:o,role:"status","aria-live":n,"aria-atomic":!0},r)}function uu(){const[e,t]=g.useState("");return{announce:g.useCallback(n=>{n!=null&&t(n)},[]),announcement:e}}const fs=g.createContext(null);function fu(e){const t=g.useContext(fs);g.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function pu(){const[e]=g.useState(()=>new Set),t=g.useCallback(n=>(e.add(n),()=>e.delete(n)),[e]);return[g.useCallback(n=>{let{type:o,event:i}=n;e.forEach(s=>{var a;return(a=s[o])==null?void 0:a.call(s,i)})},[e]),t]}const hu={draggable:`
183
183
  To pick up a draggable item, press the space bar.
184
184
  While dragging, use the arrow keys to move the item.
185
185
  Press space again to drop the item in its new position, or press escape to cancel.
186
- `},mu={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function gu(e){let{announcements:t=mu,container:r,hiddenTextDescribedById:n,screenReaderInstructions:o=hu}=e;const{announce:i,announcement:s}=uu(),a=yr("DndLiveRegion"),[l,d]=g.useState(!1);if(g.useEffect(()=>{d(!0)},[]),fu(g.useMemo(()=>({onDragStart(f){let{active:h}=f;i(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:p}=f;t.onDragMove&&i(t.onDragMove({active:h,over:p}))},onDragOver(f){let{active:h,over:p}=f;i(t.onDragOver({active:h,over:p}))},onDragEnd(f){let{active:h,over:p}=f;i(t.onDragEnd({active:h,over:p}))},onDragCancel(f){let{active:h,over:p}=f;i(t.onDragCancel({active:h,over:p}))}}),[i,t])),!l)return null;const u=g.createElement(g.Fragment,null,g.createElement(cu,{id:n,value:o.draggable}),g.createElement(du,{id:a,announcement:s}));return r?gt.createPortal(u,r):u}var ze;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ze||(ze={}));function pn(){}function vo(e,t){return g.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function bu(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const et=Object.freeze({x:0,y:0});function ps(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function vu(e,t){const r=fn(e);if(!r)return"0 0";const n={x:(r.x-t.left)/t.width*100,y:(r.y-t.top)/t.height*100};return n.x+"% "+n.y+"%"}function hs(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function xu(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function ms(e){let{left:t,top:r,height:n,width:o}=e;return[{x:t,y:r},{x:t+o,y:r},{x:t,y:r+n},{x:t+o,y:r+n}]}function gs(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function bs(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const wu=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=bs(t,t.left,t.top),i=[];for(const s of n){const{id:a}=s,l=r.get(a);if(l){const d=ps(bs(l),o);i.push({id:a,data:{droppableContainer:s,value:d}})}}return i.sort(hs)},yu=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=ms(t),i=[];for(const s of n){const{id:a}=s,l=r.get(a);if(l){const d=ms(l),u=o.reduce((h,p,w)=>h+ps(d[w],p),0),f=Number((u/4).toFixed(4));i.push({id:a,data:{droppableContainer:s,value:f}})}}return i.sort(hs)};function ku(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),s=o-n,a=i-r;if(n<o&&r<i){const l=t.width*t.height,d=e.width*e.height,u=s*a,f=u/(l+d-u);return Number(f.toFixed(4))}return 0}const Su=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=[];for(const i of n){const{id:s}=i,a=r.get(s);if(a){const l=ku(a,t);l>0&&o.push({id:s,data:{droppableContainer:i,value:l}})}}return o.sort(xu)};function Cu(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function vs(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:et}function Eu(e){return function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return o.reduce((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...r})}}const ju=Eu(1);function xs(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Nu(e,t,r){const n=xs(t);if(!n)return e;const{scaleX:o,scaleY:i,x:s,y:a}=n,l=e.left-s-(1-o)*parseFloat(r),d=e.top-a-(1-i)*parseFloat(r.slice(r.indexOf(" ")+1)),u=o?e.width/o:e.width,f=i?e.height/i:e.height;return{width:u,height:f,top:d,right:l+u,bottom:d+f,left:l}}const Tu={ignoreTransform:!1};function Gt(e,t){t===void 0&&(t=Tu);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:d,transformOrigin:u}=Fe(e).getComputedStyle(e);d&&(r=Nu(r,d,u))}const{top:n,left:o,width:i,height:s,bottom:a,right:l}=r;return{top:n,left:o,width:i,height:s,bottom:a,right:l}}function ws(e){return Gt(e,{ignoreTransform:!0})}function Au(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function zu(e,t){return t===void 0&&(t=Fe(e).getComputedStyle(e)),t.position==="fixed"}function Pu(e,t){t===void 0&&(t=Fe(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=t[o];return typeof i=="string"?r.test(i):!1})}function hn(e,t){const r=[];function n(o){if(t!=null&&r.length>=t||!o)return r;if(go(o)&&o.scrollingElement!=null&&!r.includes(o.scrollingElement))return r.push(o.scrollingElement),r;if(!vr(o)||cs(o)||r.includes(o))return r;const i=Fe(e).getComputedStyle(o);return o!==e&&Pu(o,i)&&r.push(o),zu(o,i)?r:n(o.parentNode)}return e?n(e):r}function ys(e){const[t]=hn(e,1);return t??null}function xo(e){return!an||!e?null:Ht(e)?e:mo(e)?go(e)||e===Vt(e).scrollingElement?window:vr(e)?e:null:null}function ks(e){return Ht(e)?e.scrollX:e.scrollLeft}function Ss(e){return Ht(e)?e.scrollY:e.scrollTop}function wo(e){return{x:ks(e),y:Ss(e)}}var Ie;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ie||(Ie={}));function Cs(e){return!an||!e?!1:e===document.scrollingElement}function Es(e){const t={x:0,y:0},r=Cs(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},o=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,s=e.scrollTop>=n.y,a=e.scrollLeft>=n.x;return{isTop:o,isLeft:i,isBottom:s,isRight:a,maxScroll:n,minScroll:t}}const Ou={x:.2,y:.2};function Iu(e,t,r,n,o){let{top:i,left:s,right:a,bottom:l}=r;n===void 0&&(n=10),o===void 0&&(o=Ou);const{isTop:d,isBottom:u,isLeft:f,isRight:h}=Es(e),p={x:0,y:0},w={x:0,y:0},m={height:t.height*o.y,width:t.width*o.x};return!d&&i<=t.top+m.height?(p.y=Ie.Backward,w.y=n*Math.abs((t.top+m.height-i)/m.height)):!u&&l>=t.bottom-m.height&&(p.y=Ie.Forward,w.y=n*Math.abs((t.bottom-m.height-l)/m.height)),!h&&a>=t.right-m.width?(p.x=Ie.Forward,w.x=n*Math.abs((t.right-m.width-a)/m.width)):!f&&s<=t.left+m.width&&(p.x=Ie.Backward,w.x=n*Math.abs((t.left+m.width-s)/m.width)),{direction:p,speed:w}}function Du(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:s}=window;return{top:0,left:0,right:i,bottom:s,width:i,height:s}}const{top:t,left:r,right:n,bottom:o}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:o,width:e.clientWidth,height:e.clientHeight}}function js(e){return e.reduce((t,r)=>Kt(t,wo(r)),et)}function _u(e){return e.reduce((t,r)=>t+ks(r),0)}function Mu(e){return e.reduce((t,r)=>t+Ss(r),0)}function Ns(e,t){if(t===void 0&&(t=Gt),!e)return;const{top:r,left:n,bottom:o,right:i}=t(e);ys(e)&&(o<=0||i<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Ru=[["x",["left","right"],_u],["y",["top","bottom"],Mu]];class yo{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=hn(r),o=js(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,s,a]of Ru)for(const l of s)Object.defineProperty(this,l,{get:()=>{const d=a(n),u=o[i]-d;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Sr{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var o;(o=this.target)==null||o.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function Lu(e){const{EventTarget:t}=Fe(e);return e instanceof t?e:Vt(e)}function ko(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var Ze;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Ze||(Ze={}));function Ts(e){e.preventDefault()}function $u(e){e.stopPropagation()}var ue;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(ue||(ue={}));const As={start:[ue.Space,ue.Enter],cancel:[ue.Esc],end:[ue.Space,ue.Enter,ue.Tab]},Fu=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case ue.Right:return{...r,x:r.x+25};case ue.Left:return{...r,x:r.x-25};case ue.Down:return{...r,y:r.y+25};case ue.Up:return{...r,y:r.y-25}}};class So{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new Sr(Vt(r)),this.windowListeners=new Sr(Fe(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ze.Resize,this.handleCancel),this.windowListeners.add(Ze.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ze.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&Ns(n),r(et)}handleKeyDown(t){if(un(t)){const{active:r,context:n,options:o}=this.props,{keyboardCodes:i=As,coordinateGetter:s=Fu,scrollBehavior:a="smooth"}=o,{code:l}=t;if(i.end.includes(l)){this.handleEnd(t);return}if(i.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:d}=n.current,u=d?{x:d.left,y:d.top}:et;this.referenceCoordinates||(this.referenceCoordinates=u);const f=s(t,{active:r,context:n.current,currentCoordinates:u});if(f){const h=kr(f,u),p={x:0,y:0},{scrollableAncestors:w}=n.current;for(const m of w){const v=t.code,{isTop:y,isRight:k,isLeft:x,isBottom:S,maxScroll:C,minScroll:j}=Es(m),N=Du(m),E={x:Math.min(v===ue.Right?N.right-N.width/2:N.right,Math.max(v===ue.Right?N.left:N.left+N.width/2,f.x)),y:Math.min(v===ue.Down?N.bottom-N.height/2:N.bottom,Math.max(v===ue.Down?N.top:N.top+N.height/2,f.y))},D=v===ue.Right&&!k||v===ue.Left&&!x,R=v===ue.Down&&!S||v===ue.Up&&!y;if(D&&E.x!==f.x){const I=m.scrollLeft+h.x,L=v===ue.Right&&I<=C.x||v===ue.Left&&I>=j.x;if(L&&!h.y){m.scrollTo({left:I,behavior:a});return}L?p.x=m.scrollLeft-I:p.x=v===ue.Right?m.scrollLeft-C.x:m.scrollLeft-j.x,p.x&&m.scrollBy({left:-p.x,behavior:a});break}else if(R&&E.y!==f.y){const I=m.scrollTop+h.y,L=v===ue.Down&&I<=C.y||v===ue.Up&&I>=j.y;if(L&&!h.x){m.scrollTo({top:I,behavior:a});return}L?p.y=m.scrollTop-I:p.y=v===ue.Down?m.scrollTop-C.y:m.scrollTop-j.y,p.y&&m.scrollBy({top:-p.y,behavior:a});break}}this.handleMove(t,Kt(kr(f,this.referenceCoordinates),p))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}So.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=As,onActivation:o}=t,{active:i}=r;const{code:s}=e.nativeEvent;if(n.start.includes(s)){const a=i.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function zs(e){return!!(e&&"distance"in e)}function Ps(e){return!!(e&&"delay"in e)}class Co{constructor(t,r,n){var o;n===void 0&&(n=Lu(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:i}=t,{target:s}=i;this.props=t,this.events=r,this.document=Vt(s),this.documentListeners=new Sr(this.document),this.listeners=new Sr(n),this.windowListeners=new Sr(Fe(s)),this.initialCoordinates=(o=fn(i))!=null?o:et,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Ze.Resize,this.handleCancel),this.windowListeners.add(Ze.DragStart,Ts),this.windowListeners.add(Ze.VisibilityChange,this.handleCancel),this.windowListeners.add(Ze.ContextMenu,Ts),this.documentListeners.add(Ze.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ps(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(zs(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:n,onPending:o}=this.props;o(n,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(Ze.Click,$u,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ze.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:o,props:i}=this,{onMove:s,options:{activationConstraint:a}}=i;if(!o)return;const l=(r=fn(t))!=null?r:et,d=kr(o,l);if(!n&&a){if(zs(a)){if(a.tolerance!=null&&ko(d,a.tolerance))return this.handleCancel();if(ko(d,a.distance))return this.handleStart()}if(Ps(a)&&ko(d,a.tolerance))return this.handleCancel();this.handlePending(a,d);return}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===ue.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Wu={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Eo extends Co{constructor(t){const{event:r}=t,n=Vt(r.target);super(t,Wu,n)}}Eo.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n==null||n({event:r}),!0)}}];const Uu={move:{name:"mousemove"},end:{name:"mouseup"}};var jo;(function(e){e[e.RightClick=2]="RightClick"})(jo||(jo={}));class Bu extends Co{constructor(t){super(t,Uu,Vt(t.event.target))}}Bu.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===jo.RightClick?!1:(n==null||n({event:r}),!0)}}];const No={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Os extends Co{constructor(t){super(t,No)}static setup(){return window.addEventListener(No.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(No.move.name,t)};function t(){}}}Os.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:o}=r;return o.length>1?!1:(n==null||n({event:r}),!0)}}];var Cr;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Cr||(Cr={}));var mn;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(mn||(mn={}));function Hu(e){let{acceleration:t,activator:r=Cr.Pointer,canScroll:n,draggingRect:o,enabled:i,interval:s=5,order:a=mn.TreeOrder,pointerCoordinates:l,scrollableAncestors:d,scrollableAncestorRects:u,delta:f,threshold:h}=e;const p=Ku({delta:f,disabled:!i}),[w,m]=ou(),v=g.useRef({x:0,y:0}),y=g.useRef({x:0,y:0}),k=g.useMemo(()=>{switch(r){case Cr.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Cr.DraggableRect:return o}},[r,o,l]),x=g.useRef(null),S=g.useCallback(()=>{const j=x.current;if(!j)return;const N=v.current.x*y.current.x,E=v.current.y*y.current.y;j.scrollBy(N,E)},[]),C=g.useMemo(()=>a===mn.TreeOrder?[...d].reverse():d,[a,d]);g.useEffect(()=>{if(!i||!d.length||!k){m();return}for(const j of C){if((n==null?void 0:n(j))===!1)continue;const N=d.indexOf(j),E=u[N];if(!E)continue;const{direction:D,speed:R}=Iu(j,E,k,t,h);for(const I of["x","y"])p[I][D[I]]||(R[I]=0,D[I]=0);if(R.x>0||R.y>0){m(),x.current=j,w(S,s),v.current=R,y.current=D;return}}v.current={x:0,y:0},y.current={x:0,y:0},m()},[t,S,n,m,i,s,JSON.stringify(k),JSON.stringify(p),w,d,C,u,JSON.stringify(h)])}const Vu={x:{[Ie.Backward]:!1,[Ie.Forward]:!1},y:{[Ie.Backward]:!1,[Ie.Forward]:!1}};function Ku(e){let{delta:t,disabled:r}=e;const n=dn(t);return wr(o=>{if(r||!n||!o)return Vu;const i={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[Ie.Backward]:o.x[Ie.Backward]||i.x===-1,[Ie.Forward]:o.x[Ie.Forward]||i.x===1},y:{[Ie.Backward]:o.y[Ie.Backward]||i.y===-1,[Ie.Forward]:o.y[Ie.Forward]||i.y===1}}},[r,t,n])}function Gu(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return wr(o=>{var i;return t==null?null:(i=n??o)!=null?i:null},[n,t])}function Yu(e,t){return g.useMemo(()=>e.reduce((r,n)=>{const{sensor:o}=n,i=o.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,n)}));return[...r,...i]},[]),[e,t])}var Er;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Er||(Er={}));var To;(function(e){e.Optimized="optimized"})(To||(To={}));const Is=new Map;function qu(e,t){let{dragging:r,dependencies:n,config:o}=t;const[i,s]=g.useState(null),{frequency:a,measure:l,strategy:d}=o,u=g.useRef(e),f=v(),h=xr(f),p=g.useCallback(function(y){y===void 0&&(y=[]),!h.current&&s(k=>k===null?y:k.concat(y.filter(x=>!k.includes(x))))},[h]),w=g.useRef(null),m=wr(y=>{if(f&&!r)return Is;if(!y||y===Is||u.current!==e||i!=null){const k=new Map;for(let x of e){if(!x)continue;if(i&&i.length>0&&!i.includes(x.id)&&x.rect.current){k.set(x.id,x.rect.current);continue}const S=x.node.current,C=S?new yo(l(S),S):null;x.rect.current=C,C&&k.set(x.id,C)}return k}return y},[e,i,r,f,l]);return g.useEffect(()=>{u.current=e},[e]),g.useEffect(()=>{f||p()},[r,f]),g.useEffect(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),g.useEffect(()=>{f||typeof a!="number"||w.current!==null||(w.current=setTimeout(()=>{p(),w.current=null},a))},[a,f,p,...n]),{droppableRects:m,measureDroppableContainers:p,measuringScheduled:i!=null};function v(){switch(d){case Er.Always:return!1;case Er.BeforeDragging:return r;default:return!r}}}function Ao(e,t){return wr(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function Xu(e,t){return Ao(e,t)}function Ju(e){let{callback:t,disabled:r}=e;const n=ln(t),o=g.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(n)},[n,r]);return g.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function gn(e){let{callback:t,disabled:r}=e;const n=ln(t),o=g.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(n)},[r]);return g.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Zu(e){return new yo(Gt(e),e)}function Ds(e,t,r){t===void 0&&(t=Zu);const[n,o]=g.useState(null);function i(){o(l=>{if(!e)return null;if(e.isConnected===!1){var d;return(d=l??r)!=null?d:null}const u=t(e);return JSON.stringify(l)===JSON.stringify(u)?l:u})}const s=Ju({callback(l){if(e)for(const d of l){const{type:u,target:f}=d;if(u==="childList"&&f instanceof HTMLElement&&f.contains(e)){i();break}}}}),a=gn({callback:i});return Qe(()=>{i(),e?(a==null||a.observe(e),s==null||s.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),s==null||s.disconnect())},[e]),n}function Qu(e){const t=Ao(e);return vs(e,t)}const _s=[];function ef(e){const t=g.useRef(e),r=wr(n=>e?n&&n!==_s&&e&&t.current&&e.parentNode===t.current.parentNode?n:hn(e):_s,[e]);return g.useEffect(()=>{t.current=e},[e]),r}function tf(e){const[t,r]=g.useState(null),n=g.useRef(e),o=g.useCallback(i=>{const s=xo(i.target);s&&r(a=>a?(a.set(s,wo(s)),new Map(a)):null)},[]);return g.useEffect(()=>{const i=n.current;if(e!==i){s(i);const a=e.map(l=>{const d=xo(l);return d?(d.addEventListener("scroll",o,{passive:!0}),[d,wo(d)]):null}).filter(l=>l!=null);r(a.length?new Map(a):null),n.current=e}return()=>{s(e),s(i)};function s(a){a.forEach(l=>{const d=xo(l);d==null||d.removeEventListener("scroll",o)})}},[o,e]),g.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,s)=>Kt(i,s),et):js(e):et,[e,t])}function Ms(e,t){t===void 0&&(t=[]);const r=g.useRef(null);return g.useEffect(()=>{r.current=null},t),g.useEffect(()=>{const n=e!==et;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?kr(e,r.current):et}function rf(e){g.useEffect(()=>{if(!an)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r==null||r()}},e.map(t=>{let{sensor:r}=t;return r}))}function nf(e,t){return g.useMemo(()=>e.reduce((r,n)=>{let{eventName:o,handler:i}=n;return r[o]=s=>{i(s,t)},r},{}),[e,t])}function Rs(e){return g.useMemo(()=>e?Au(e):null,[e])}const Ls=[];function of(e,t){t===void 0&&(t=Gt);const[r]=e,n=Rs(r?Fe(r):null),[o,i]=g.useState(Ls);function s(){i(()=>e.length?e.map(l=>Cs(l)?n:new yo(t(l),l)):Ls)}const a=gn({callback:s});return Qe(()=>{a==null||a.disconnect(),s(),e.forEach(l=>a==null?void 0:a.observe(l))},[e]),o}function $s(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return vr(t)?t:e}function sf(e){let{measure:t}=e;const[r,n]=g.useState(null),o=g.useCallback(d=>{for(const{target:u}of d)if(vr(u)){n(f=>{const h=t(u);return f?{...f,width:h.width,height:h.height}:h});break}},[t]),i=gn({callback:o}),s=g.useCallback(d=>{const u=$s(d);i==null||i.disconnect(),u&&(i==null||i.observe(u)),n(u?t(u):null)},[t,i]),[a,l]=cn(s);return g.useMemo(()=>({nodeRef:a,rect:r,setRef:l}),[r,a,l])}const af=[{sensor:Eo,options:{}},{sensor:So,options:{}}],lf={current:{}},bn={draggable:{measure:ws},droppable:{measure:ws,strategy:Er.WhileDragging,frequency:To.Optimized},dragOverlay:{measure:Gt}};class jr extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}const cf={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new jr,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:pn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:bn,measureDroppableContainers:pn,windowRect:null,measuringScheduled:!1},Fs={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:pn,draggableNodes:new Map,over:null,measureDroppableContainers:pn},Nr=g.createContext(Fs),Ws=g.createContext(cf);function df(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new jr}}}function uf(e,t){switch(t.type){case ze.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ze.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case ze.DragEnd:case ze.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ze.RegisterDroppable:{const{element:r}=t,{id:n}=r,o=new jr(e.droppable.containers);return o.set(n,r),{...e,droppable:{...e.droppable,containers:o}}}case ze.SetDroppableDisabled:{const{id:r,key:n,disabled:o}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const s=new jr(e.droppable.containers);return s.set(r,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case ze.UnregisterDroppable:{const{id:r,key:n}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const i=new jr(e.droppable.containers);return i.delete(r),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function ff(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:o}=g.useContext(Nr),i=dn(n),s=dn(r==null?void 0:r.id);return g.useEffect(()=>{if(!t&&!n&&i&&s!=null){if(!un(i)||document.activeElement===i.target)return;const a=o.get(s);if(!a)return;const{activatorNode:l,node:d}=a;if(!l.current&&!d.current)return;requestAnimationFrame(()=>{for(const u of[l.current,d.current]){if(!u)continue;const f=au(u);if(f){f.focus();break}}})}},[n,t,o,s,i]),null}function Us(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...n}),r):r}function pf(e){return g.useMemo(()=>({draggable:{...bn.draggable,...e==null?void 0:e.draggable},droppable:{...bn.droppable,...e==null?void 0:e.droppable},dragOverlay:{...bn.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function hf(e){let{activeNode:t,measure:r,initialRect:n,config:o=!0}=e;const i=g.useRef(!1),{x:s,y:a}=typeof o=="boolean"?{x:o,y:o}:o;Qe(()=>{if(!s&&!a||!t){i.current=!1;return}if(i.current||!n)return;const d=t==null?void 0:t.node.current;if(!d||d.isConnected===!1)return;const u=r(d),f=vs(u,n);if(s||(f.x=0),a||(f.y=0),i.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=ys(d);h&&h.scrollBy({top:f.y,left:f.x})}},[t,s,a,n,r])}const vn=g.createContext({...et,scaleX:1,scaleY:1});var xt;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(xt||(xt={}));const mf=g.memo(function(t){var r,n,o,i;let{id:s,accessibility:a,autoScroll:l=!0,children:d,sensors:u=af,collisionDetection:f=Su,measuring:h,modifiers:p,...w}=t;const m=g.useReducer(uf,void 0,df),[v,y]=m,[k,x]=pu(),[S,C]=g.useState(xt.Uninitialized),j=S===xt.Initialized,{draggable:{active:N,nodes:E,translate:D},droppable:{containers:R}}=v,I=N!=null?E.get(N):null,L=g.useRef({initial:null,translated:null}),_=g.useMemo(()=>{var de;return N!=null?{id:N,data:(de=I==null?void 0:I.data)!=null?de:lf,rect:L}:null},[N,I]),G=g.useRef(null),[B,F]=g.useState(null),[U,z]=g.useState(null),X=xr(w,Object.values(w)),re=yr("DndDescribedBy",s),T=g.useMemo(()=>R.getEnabled(),[R]),$=pf(h),{droppableRects:Y,measureDroppableContainers:K,measuringScheduled:ge}=qu(T,{dragging:j,dependencies:[D.x,D.y],config:$.droppable}),se=Gu(E,N),P=g.useMemo(()=>U?fn(U):null,[U]),J=je(),ee=Xu(se,$.draggable.measure);hf({activeNode:N!=null?E.get(N):null,config:J.layoutShiftCompensation,initialRect:ee,measure:$.draggable.measure});const W=Ds(se,$.draggable.measure,ee),ne=Ds(se?se.parentElement:null),te=g.useRef({activatorEvent:null,active:null,activeNode:se,collisionRect:null,collisions:null,droppableRects:Y,draggableNodes:E,draggingNode:null,draggingNodeRect:null,droppableContainers:R,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),we=R.getNodeFor((r=te.current.over)==null?void 0:r.id),be=sf({measure:$.dragOverlay.measure}),Pe=(n=be.nodeRef.current)!=null?n:se,De=j?(o=be.rect)!=null?o:W:null,Ue=!!(be.nodeRef.current&&be.rect),jt=Qu(Ue?null:W),qe=Rs(Pe?Fe(Pe):null),Be=ef(j?we??se:null),He=of(Be),ht=Us(p,{transform:{x:D.x-jt.x,y:D.y-jt.y,scaleX:1,scaleY:1},activatorEvent:U,active:_,activeNodeRect:W,containerNodeRect:ne,draggingNodeRect:De,over:te.current.over,overlayNodeRect:be.rect,scrollableAncestors:Be,scrollableAncestorRects:He,windowRect:qe}),Xe=P?Kt(P,D):null,Nt=tf(Be),Ur=Ms(Nt),M=Ms(Nt,[W]),Z=Kt(ht,Ur),ie=De?ju(De,ht):null,fe=_&&ie?f({active:_,collisionRect:ie,droppableRects:Y,droppableContainers:T,pointerCoordinates:Xe}):null,_e=gs(fe,"id"),[Se,Oe]=g.useState(null),Lt=Ue?ht:Kt(ht,M),A=Cu(Lt,(i=Se==null?void 0:Se.rect)!=null?i:null,W),O=g.useRef(null),q=g.useCallback((de,Le)=>{let{sensor:$e,options:Ce}=Le;if(G.current==null)return;const Ne=E.get(G.current);if(!Ne)return;const Me=de.nativeEvent,Ve=new $e({active:G.current,activeNode:Ne,event:Me,options:Ce,context:te,onAbort(ve){if(!E.get(ve))return;const{onDragAbort:dt}=X.current,mt={id:ve};dt==null||dt(mt),k({type:"onDragAbort",event:mt})},onPending(ve,Tt,dt,mt){if(!E.get(ve))return;const{onDragPending:Hr}=X.current,At={id:ve,constraint:Tt,initialCoordinates:dt,offset:mt};Hr==null||Hr(At),k({type:"onDragPending",event:At})},onStart(ve){const Tt=G.current;if(Tt==null)return;const dt=E.get(Tt);if(!dt)return;const{onDragStart:mt}=X.current,Br={activatorEvent:Me,active:{id:Tt,data:dt.data,rect:L}};gt.unstable_batchedUpdates(()=>{mt==null||mt(Br),C(xt.Initializing),y({type:ze.DragStart,initialCoordinates:ve,active:Tt}),k({type:"onDragStart",event:Br}),F(O.current),z(Me)})},onMove(ve){y({type:ze.DragMove,coordinates:ve})},onEnd:ct(ze.DragEnd),onCancel:ct(ze.DragCancel)});O.current=Ve;function ct(ve){return async function(){const{active:dt,collisions:mt,over:Br,scrollAdjustedTranslate:Hr}=te.current;let At=null;if(dt&&Hr){const{cancelDrop:Vr}=X.current;At={activatorEvent:Me,active:dt,collisions:mt,delta:Hr,over:Br},ve===ze.DragEnd&&typeof Vr=="function"&&await Promise.resolve(Vr(At))&&(ve=ze.DragCancel)}G.current=null,gt.unstable_batchedUpdates(()=>{y({type:ve}),C(xt.Uninitialized),Oe(null),F(null),z(null),O.current=null;const Vr=ve===ze.DragEnd?"onDragEnd":"onDragCancel";if(At){const Ai=X.current[Vr];Ai==null||Ai(At),k({type:Vr,event:At})}})}}},[E]),Q=g.useCallback((de,Le)=>($e,Ce)=>{const Ne=$e.nativeEvent,Me=E.get(Ce);if(G.current!==null||!Me||Ne.dndKit||Ne.defaultPrevented)return;const Ve={active:Me};de($e,Le.options,Ve)===!0&&(Ne.dndKit={capturedBy:Le.sensor},G.current=Ce,q($e,Le))},[E,q]),ce=Yu(u,Q);rf(u),Qe(()=>{W&&S===xt.Initializing&&C(xt.Initialized)},[W,S]),g.useEffect(()=>{const{onDragMove:de}=X.current,{active:Le,activatorEvent:$e,collisions:Ce,over:Ne}=te.current;if(!Le||!$e)return;const Me={active:Le,activatorEvent:$e,collisions:Ce,delta:{x:Z.x,y:Z.y},over:Ne};gt.unstable_batchedUpdates(()=>{de==null||de(Me),k({type:"onDragMove",event:Me})})},[Z.x,Z.y]),g.useEffect(()=>{const{active:de,activatorEvent:Le,collisions:$e,droppableContainers:Ce,scrollAdjustedTranslate:Ne}=te.current;if(!de||G.current==null||!Le||!Ne)return;const{onDragOver:Me}=X.current,Ve=Ce.get(_e),ct=Ve&&Ve.rect.current?{id:Ve.id,rect:Ve.rect.current,data:Ve.data,disabled:Ve.disabled}:null,ve={active:de,activatorEvent:Le,collisions:$e,delta:{x:Ne.x,y:Ne.y},over:ct};gt.unstable_batchedUpdates(()=>{Oe(ct),Me==null||Me(ve),k({type:"onDragOver",event:ve})})},[_e]),Qe(()=>{te.current={activatorEvent:U,active:_,activeNode:se,collisionRect:ie,collisions:fe,droppableRects:Y,draggableNodes:E,draggingNode:Pe,draggingNodeRect:De,droppableContainers:R,over:Se,scrollableAncestors:Be,scrollAdjustedTranslate:Z},L.current={initial:De,translated:ie}},[_,se,fe,ie,E,Pe,De,Y,R,Se,Be,Z]),Hu({...J,delta:D,draggingRect:ie,pointerCoordinates:Xe,scrollableAncestors:Be,scrollableAncestorRects:He});const pe=g.useMemo(()=>({active:_,activeNode:se,activeNodeRect:W,activatorEvent:U,collisions:fe,containerNodeRect:ne,dragOverlay:be,draggableNodes:E,droppableContainers:R,droppableRects:Y,over:Se,measureDroppableContainers:K,scrollableAncestors:Be,scrollableAncestorRects:He,measuringConfiguration:$,measuringScheduled:ge,windowRect:qe}),[_,se,W,U,fe,ne,be,E,R,Y,Se,K,Be,He,$,ge,qe]),ye=g.useMemo(()=>({activatorEvent:U,activators:ce,active:_,activeNodeRect:W,ariaDescribedById:{draggable:re},dispatch:y,draggableNodes:E,over:Se,measureDroppableContainers:K}),[U,ce,_,W,y,re,E,Se,K]);return g.createElement(fs.Provider,{value:x},g.createElement(Nr.Provider,{value:ye},g.createElement(Ws.Provider,{value:pe},g.createElement(vn.Provider,{value:A},d)),g.createElement(ff,{disabled:(a==null?void 0:a.restoreFocus)===!1})),g.createElement(gu,{...a,hiddenTextDescribedById:re}));function je(){const de=(B==null?void 0:B.autoScrollEnabled)===!1,Le=typeof l=="object"?l.enabled===!1:l===!1,$e=j&&!de&&!Le;return typeof l=="object"?{...l,enabled:$e}:{enabled:$e}}}),gf=g.createContext(null),Bs="button",bf="Draggable";function vf(e){let{id:t,data:r,disabled:n=!1,attributes:o}=e;const i=yr(bf),{activators:s,activatorEvent:a,active:l,activeNodeRect:d,ariaDescribedById:u,draggableNodes:f,over:h}=g.useContext(Nr),{role:p=Bs,roleDescription:w="draggable",tabIndex:m=0}=o??{},v=(l==null?void 0:l.id)===t,y=g.useContext(v?vn:gf),[k,x]=cn(),[S,C]=cn(),j=nf(s,t),N=xr(r);Qe(()=>(f.set(t,{id:t,key:i,node:k,activatorNode:S,data:N}),()=>{const D=f.get(t);D&&D.key===i&&f.delete(t)}),[f,t]);const E=g.useMemo(()=>({role:p,tabIndex:m,"aria-disabled":n,"aria-pressed":v&&p===Bs?!0:void 0,"aria-roledescription":w,"aria-describedby":u.draggable}),[n,p,m,v,w,u.draggable]);return{active:l,activatorEvent:a,activeNodeRect:d,attributes:E,isDragging:v,listeners:n?void 0:j,node:k,over:h,setNodeRef:x,setActivatorNodeRef:C,transform:y}}function Hs(){return g.useContext(Ws)}const xf="Droppable",wf={timeout:25};function yf(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:o}=e;const i=yr(xf),{active:s,dispatch:a,over:l,measureDroppableContainers:d}=g.useContext(Nr),u=g.useRef({disabled:r}),f=g.useRef(!1),h=g.useRef(null),p=g.useRef(null),{disabled:w,updateMeasurementsFor:m,timeout:v}={...wf,...o},y=xr(m??n),k=g.useCallback(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{d(Array.isArray(y.current)?y.current:[y.current]),p.current=null},v)},[v]),x=gn({callback:k,disabled:w||!s}),S=g.useCallback((E,D)=>{x&&(D&&(x.unobserve(D),f.current=!1),E&&x.observe(E))},[x]),[C,j]=cn(S),N=xr(t);return g.useEffect(()=>{!x||!C.current||(x.disconnect(),f.current=!1,x.observe(C.current))},[C,x]),g.useEffect(()=>(a({type:ze.RegisterDroppable,element:{id:n,key:i,disabled:r,node:C,rect:h,data:N}}),()=>a({type:ze.UnregisterDroppable,key:i,id:n})),[n]),g.useEffect(()=>{r!==u.current.disabled&&(a({type:ze.SetDroppableDisabled,id:n,key:i,disabled:r}),u.current.disabled=r)},[n,i,r,a]),{active:s,rect:h,isOver:(l==null?void 0:l.id)===n,node:C,over:l,setNodeRef:j}}function kf(e){let{animation:t,children:r}=e;const[n,o]=g.useState(null),[i,s]=g.useState(null),a=dn(r);return!r&&!n&&a&&o(a),Qe(()=>{if(!i)return;const l=n==null?void 0:n.key,d=n==null?void 0:n.props.id;if(l==null||d==null){o(null);return}Promise.resolve(t(d,i)).then(()=>{o(null)})},[t,n,i]),g.createElement(g.Fragment,null,r,n?g.cloneElement(n,{ref:s}):null)}const Sf={x:0,y:0,scaleX:1,scaleY:1};function Cf(e){let{children:t}=e;return g.createElement(Nr.Provider,{value:Fs},g.createElement(vn.Provider,{value:Sf},t))}const Ef={position:"fixed",touchAction:"none"},jf=e=>un(e)?"transform 250ms ease":void 0,Nf=g.forwardRef((e,t)=>{let{as:r,activatorEvent:n,adjustScale:o,children:i,className:s,rect:a,style:l,transform:d,transition:u=jf}=e;if(!a)return null;const f=o?d:{...d,scaleX:1,scaleY:1},h={...Ef,width:a.width,height:a.height,top:a.top,left:a.left,transform:vt.Transform.toString(f),transformOrigin:o&&n?vu(n,a):void 0,transition:typeof u=="function"?u(n):u,...l};return g.createElement(r,{className:s,style:h,ref:t},i)}),Tf={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:r}}=e;return[{transform:vt.Transform.toString(t)},{transform:vt.Transform.toString(r)}]},sideEffects:(e=>t=>{let{active:r,dragOverlay:n}=t;const o={},{styles:i,className:s}=e;if(i!=null&&i.active)for(const[a,l]of Object.entries(i.active))l!==void 0&&(o[a]=r.node.style.getPropertyValue(a),r.node.style.setProperty(a,l));if(i!=null&&i.dragOverlay)for(const[a,l]of Object.entries(i.dragOverlay))l!==void 0&&n.node.style.setProperty(a,l);return s!=null&&s.active&&r.node.classList.add(s.active),s!=null&&s.dragOverlay&&n.node.classList.add(s.dragOverlay),function(){for(const[l,d]of Object.entries(o))r.node.style.setProperty(l,d);s!=null&&s.active&&r.node.classList.remove(s.active)}})({styles:{active:{opacity:"0"}}})};function Af(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:o}=e;return ln((i,s)=>{if(t===null)return;const a=r.get(i);if(!a)return;const l=a.node.current;if(!l)return;const d=$s(s);if(!d)return;const{transform:u}=Fe(s).getComputedStyle(s),f=xs(u);if(!f)return;const h=typeof t=="function"?t:zf(t);return Ns(l,o.draggable.measure),h({active:{id:i,data:a.data,node:l,rect:o.draggable.measure(l)},draggableNodes:r,dragOverlay:{node:s,rect:o.dragOverlay.measure(d)},droppableContainers:n,measuringConfiguration:o,transform:f})})}function zf(e){const{duration:t,easing:r,sideEffects:n,keyframes:o}={...Tf,...e};return i=>{let{active:s,dragOverlay:a,transform:l,...d}=i;if(!t)return;const u={x:a.rect.left-s.rect.left,y:a.rect.top-s.rect.top},f={scaleX:l.scaleX!==1?s.rect.width*l.scaleX/a.rect.width:1,scaleY:l.scaleY!==1?s.rect.height*l.scaleY/a.rect.height:1},h={x:l.x-u.x,y:l.y-u.y,...f},p=o({...d,active:s,dragOverlay:a,transform:{initial:l,final:h}}),[w]=p,m=p[p.length-1];if(JSON.stringify(w)===JSON.stringify(m))return;const v=n==null?void 0:n({active:s,dragOverlay:a,...d}),y=a.node.animate(p,{duration:t,easing:r,fill:"forwards"});return new Promise(k=>{y.onfinish=()=>{v==null||v(),k()}})}}let Vs=0;function Pf(e){return g.useMemo(()=>{if(e!=null)return Vs++,Vs},[e])}const Of=g.memo(e=>{let{adjustScale:t=!1,children:r,dropAnimation:n,style:o,transition:i,modifiers:s,wrapperElement:a="div",className:l,zIndex:d=999}=e;const{activatorEvent:u,active:f,activeNodeRect:h,containerNodeRect:p,draggableNodes:w,droppableContainers:m,dragOverlay:v,over:y,measuringConfiguration:k,scrollableAncestors:x,scrollableAncestorRects:S,windowRect:C}=Hs(),j=g.useContext(vn),N=Pf(f==null?void 0:f.id),E=Us(s,{activatorEvent:u,active:f,activeNodeRect:h,containerNodeRect:p,draggingNodeRect:v.rect,over:y,overlayNodeRect:v.rect,scrollableAncestors:x,scrollableAncestorRects:S,transform:j,windowRect:C}),D=Ao(h),R=Af({config:n,draggableNodes:w,droppableContainers:m,measuringConfiguration:k}),I=D?v.setRef:void 0;return g.createElement(Cf,null,g.createElement(kf,{animation:R},f&&N?g.createElement(Nf,{key:N,id:f.id,ref:I,as:a,activatorEvent:u,adjustScale:t,className:l,transition:i,rect:D,style:{zIndex:d,...o},transform:E},r):null))}),If=e=>{let{transform:t}=e;return{...t,x:0}};function Ks(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function Df(e,t){return e.reduce((r,n,o)=>{const i=t.get(n);return i&&(r[o]=i),r},Array(e.length))}function xn(e){return e!==null&&e>=0}function _f(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function Mf(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Gs=e=>{let{rects:t,activeIndex:r,overIndex:n,index:o}=e;const i=Ks(t,n,r),s=t[o],a=i[o];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},wn={scaleX:1,scaleY:1},Rf=e=>{var t;let{activeIndex:r,activeNodeRect:n,index:o,rects:i,overIndex:s}=e;const a=(t=i[r])!=null?t:n;if(!a)return null;if(o===r){const d=i[s];return d?{x:0,y:r<s?d.top+d.height-(a.top+a.height):d.top-a.top,...wn}:null}const l=Lf(i,o,r);return o>r&&o<=s?{x:0,y:-a.height-l,...wn}:o<r&&o>=s?{x:0,y:a.height+l,...wn}:{x:0,y:0,...wn}};function Lf(e,t,r){const n=e[t],o=e[t-1],i=e[t+1];return n?r<t?o?n.top-(o.top+o.height):i?i.top-(n.top+n.height):0:i?i.top-(n.top+n.height):o?n.top-(o.top+o.height):0:0}const Ys="Sortable",qs=g.createContext({activeIndex:-1,containerId:Ys,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Gs,disabled:{draggable:!1,droppable:!1}});function $f(e){let{children:t,id:r,items:n,strategy:o=Gs,disabled:i=!1}=e;const{active:s,dragOverlay:a,droppableRects:l,over:d,measureDroppableContainers:u}=Hs(),f=yr(Ys,r),h=a.rect!==null,p=g.useMemo(()=>n.map(j=>typeof j=="object"&&"id"in j?j.id:j),[n]),w=s!=null,m=s?p.indexOf(s.id):-1,v=d?p.indexOf(d.id):-1,y=g.useRef(p),k=!_f(p,y.current),x=v!==-1&&m===-1||k,S=Mf(i);Qe(()=>{k&&w&&u(p)},[k,p,w,u]),g.useEffect(()=>{y.current=p},[p]);const C=g.useMemo(()=>({activeIndex:m,containerId:f,disabled:S,disableTransforms:x,items:p,overIndex:v,useDragOverlay:h,sortedRects:Df(p,l),strategy:o}),[m,f,S.draggable,S.droppable,x,p,v,l,h,o]);return g.createElement(qs.Provider,{value:C},t)}const Ff=e=>{let{id:t,items:r,activeIndex:n,overIndex:o}=e;return Ks(r,n,o).indexOf(t)},Wf=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:o,items:i,newIndex:s,previousItems:a,previousContainerId:l,transition:d}=e;return!d||!n||a!==i&&o===s?!1:r?!0:s!==o&&t===l},Uf={duration:200,easing:"ease"},Xs="transform",Bf=vt.Transition.toString({property:Xs,duration:0,easing:"linear"}),Hf={roleDescription:"sortable"};function Vf(e){let{disabled:t,index:r,node:n,rect:o}=e;const[i,s]=g.useState(null),a=g.useRef(r);return Qe(()=>{if(!t&&r!==a.current&&n.current){const l=o.current;if(l){const d=Gt(n.current,{ignoreTransform:!0}),u={x:l.left-d.left,y:l.top-d.top,scaleX:l.width/d.width,scaleY:l.height/d.height};(u.x||u.y)&&s(u)}}r!==a.current&&(a.current=r)},[t,r,n,o]),g.useEffect(()=>{i&&s(null)},[i]),i}function Kf(e){let{animateLayoutChanges:t=Wf,attributes:r,disabled:n,data:o,getNewIndex:i=Ff,id:s,strategy:a,resizeObserverConfig:l,transition:d=Uf}=e;const{items:u,containerId:f,activeIndex:h,disabled:p,disableTransforms:w,sortedRects:m,overIndex:v,useDragOverlay:y,strategy:k}=g.useContext(qs),x=Gf(n,p),S=u.indexOf(s),C=g.useMemo(()=>({sortable:{containerId:f,index:S,items:u},...o}),[f,o,S,u]),j=g.useMemo(()=>u.slice(u.indexOf(s)),[u,s]),{rect:N,node:E,isOver:D,setNodeRef:R}=yf({id:s,data:C,disabled:x.droppable,resizeObserverConfig:{updateMeasurementsFor:j,...l}}),{active:I,activatorEvent:L,activeNodeRect:_,attributes:G,setNodeRef:B,listeners:F,isDragging:U,over:z,setActivatorNodeRef:X,transform:re}=vf({id:s,data:C,attributes:{...Hf,...r},disabled:x.draggable}),T=nu(R,B),$=!!I,Y=$&&!w&&xn(h)&&xn(v),K=!y&&U,ge=K&&Y?re:null,P=Y?ge??(a??k)({rects:m,activeNodeRect:_,activeIndex:h,overIndex:v,index:S}):null,J=xn(h)&&xn(v)?i({id:s,items:u,activeIndex:h,overIndex:v}):S,ee=I==null?void 0:I.id,W=g.useRef({activeId:ee,items:u,newIndex:J,containerId:f}),ne=u!==W.current.items,te=t({active:I,containerId:f,isDragging:U,isSorting:$,id:s,index:S,items:u,newIndex:W.current.newIndex,previousItems:W.current.items,previousContainerId:W.current.containerId,transition:d,wasDragging:W.current.activeId!=null}),we=Vf({disabled:!te,index:S,node:E,rect:N});return g.useEffect(()=>{$&&W.current.newIndex!==J&&(W.current.newIndex=J),f!==W.current.containerId&&(W.current.containerId=f),u!==W.current.items&&(W.current.items=u)},[$,J,f,u]),g.useEffect(()=>{if(ee===W.current.activeId)return;if(ee!=null&&W.current.activeId==null){W.current.activeId=ee;return}const Pe=setTimeout(()=>{W.current.activeId=ee},50);return()=>clearTimeout(Pe)},[ee]),{active:I,activeIndex:h,attributes:G,data:C,rect:N,index:S,newIndex:J,items:u,isOver:D,isSorting:$,isDragging:U,listeners:F,node:E,overIndex:v,over:z,setNodeRef:T,setActivatorNodeRef:X,setDroppableNodeRef:R,setDraggableNodeRef:B,transform:we??P,transition:be()};function be(){if(we||ne&&W.current.newIndex===S)return Bf;if(!(K&&!un(L)||!d)&&($||te))return vt.Transition.toString({...d,property:Xs})}}function Gf(e,t){var r,n;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e==null?void 0:e.draggable)!=null?r:t.draggable,droppable:(n=e==null?void 0:e.droppable)!=null?n:t.droppable}}function yn(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Yf=[ue.Down,ue.Right,ue.Up,ue.Left],qf=(e,t)=>{let{context:{active:r,collisionRect:n,droppableRects:o,droppableContainers:i,over:s,scrollableAncestors:a}}=t;if(Yf.includes(e.code)){if(e.preventDefault(),!r||!n)return;const l=[];i.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const h=o.get(f.id);if(h)switch(e.code){case ue.Down:n.top<h.top&&l.push(f);break;case ue.Up:n.top>h.top&&l.push(f);break;case ue.Left:n.left>h.left&&l.push(f);break;case ue.Right:n.left<h.left&&l.push(f);break}});const d=yu({collisionRect:n,droppableRects:o,droppableContainers:l});let u=gs(d,"id");if(u===(s==null?void 0:s.id)&&d.length>1&&(u=d[1].id),u!=null){const f=i.get(r.id),h=i.get(u),p=h?o.get(h.id):null,w=h==null?void 0:h.node.current;if(w&&p&&f&&h){const v=hn(w).some((j,N)=>a[N]!==j),y=Js(f,h),k=Xf(f,h),x=v||!y?{x:0,y:0}:{x:k?n.width-p.width:0,y:k?n.height-p.height:0},S={x:p.left,y:p.top};return x.x&&x.y?S:kr(S,x)}}}};function Js(e,t){return!yn(e)||!yn(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Xf(e,t){return!yn(e)||!yn(t)||!Js(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function zo({className:e,type:t,...r}){return c.jsx("input",{type:t,className:oe("h-8 rounded-lg border border-zinc-800 bg-zinc-900/50 px-2.5 py-1 text-sm outline-none transition-colors focus:ring-2 focus:ring-blue-600",e),...r})}function Jf({className:e,...t}){return c.jsx("textarea",{className:oe("min-h-16 w-full rounded-lg border border-zinc-800 bg-zinc-900/50 px-2.5 py-2 text-sm outline-none transition-colors focus:ring-2 focus:ring-blue-600 resize-none",e),...t})}function Zf({className:e,checked:t,onCheckedChange:r,...n}){return c.jsx("input",{type:"checkbox",checked:t,onChange:o=>r==null?void 0:r(o.target.checked),className:oe("size-4 rounded border border-zinc-700 bg-zinc-900 text-blue-600 focus:ring-2 focus:ring-blue-600",e),...n})}function It({className:e,...t}){return c.jsx("label",{className:oe("text-sm font-medium leading-none select-none",e),...t})}function Zs(e,[t,r]){return Math.min(r,Math.max(t,e))}function he(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Tr(e,t=[]){let r=[];function n(i,s){const a=b.createContext(s),l=r.length;r=[...r,s];const d=f=>{var y;const{scope:h,children:p,...w}=f,m=((y=h==null?void 0:h[e])==null?void 0:y[l])||a,v=b.useMemo(()=>w,Object.values(w));return c.jsx(m.Provider,{value:v,children:p})};d.displayName=i+"Provider";function u(f,h){var m;const p=((m=h==null?void 0:h[e])==null?void 0:m[l])||a,w=b.useContext(p);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[d,u]}const o=()=>{const i=r.map(s=>b.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[n,Qf(o,...t)]}function Qf(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=n.reduce((a,{useScope:l,scopeName:d})=>{const f=l(i)[`__scope${d}`];return{...a,...f}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function Qs(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ea(...e){return t=>{let r=!1;const n=e.map(o=>{const i=Qs(o,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let o=0;o<n.length;o++){const i=n[o];typeof i=="function"?i():Qs(e[o],null)}}}}function Ee(...e){return b.useCallback(ea(...e),e)}function Yt(e){const t=tp(e),r=b.forwardRef((n,o)=>{const{children:i,...s}=n,a=b.Children.toArray(i),l=a.find(np);if(l){const d=l.props.children,u=a.map(f=>f===l?b.Children.count(d)>1?b.Children.only(null):b.isValidElement(d)?d.props.children:null:f);return c.jsx(t,{...s,ref:o,children:b.isValidElement(d)?b.cloneElement(d,void 0,u):null})}return c.jsx(t,{...s,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}var ep=Yt("Slot");function tp(e){const t=b.forwardRef((r,n)=>{const{children:o,...i}=r;if(b.isValidElement(o)){const s=ip(o),a=op(i,o.props);return o.type!==b.Fragment&&(a.ref=n?ea(n,s):s),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ta=Symbol("radix.slottable");function rp(e){const t=({children:r})=>c.jsx(c.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=ta,t}function np(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ta}function op(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function ip(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function sp(e){const t=e+"CollectionProvider",[r,n]=Tr(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:v,children:y}=m,k=g.useRef(null),x=g.useRef(new Map).current;return c.jsx(o,{scope:v,itemMap:x,collectionRef:k,children:y})};s.displayName=t;const a=e+"CollectionSlot",l=Yt(a),d=g.forwardRef((m,v)=>{const{scope:y,children:k}=m,x=i(a,y),S=Ee(v,x.collectionRef);return c.jsx(l,{ref:S,children:k})});d.displayName=a;const u=e+"CollectionItemSlot",f="data-radix-collection-item",h=Yt(u),p=g.forwardRef((m,v)=>{const{scope:y,children:k,...x}=m,S=g.useRef(null),C=Ee(v,S),j=i(u,y);return g.useEffect(()=>(j.itemMap.set(S,{ref:S,...x}),()=>void j.itemMap.delete(S))),c.jsx(h,{[f]:"",ref:C,children:k})});p.displayName=u;function w(m){const v=i(e+"CollectionConsumer",m);return g.useCallback(()=>{const k=v.collectionRef.current;if(!k)return[];const x=Array.from(k.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((j,N)=>x.indexOf(j.ref.current)-x.indexOf(N.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:d,ItemSlot:p},w,n]}var ap=b.createContext(void 0);function lp(e){const t=b.useContext(ap);return e||t||"ltr"}var cp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ke=cp.reduce((e,t)=>{const r=Yt(`Primitive.${t}`),n=b.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function dp(e,t){e&&Kr.flushSync(()=>e.dispatchEvent(t))}function Dt(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function up(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e);b.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var fp="DismissableLayer",Po="dismissableLayer.update",pp="dismissableLayer.pointerDownOutside",hp="dismissableLayer.focusOutside",ra,na=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kn=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,d=b.useContext(na),[u,f]=b.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=b.useState({}),w=Ee(t,N=>f(N)),m=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(v),k=u?m.indexOf(u):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=k>=y,C=bp(N=>{const E=N.target,D=[...d.branches].some(R=>R.contains(E));!S||D||(o==null||o(N),s==null||s(N),N.defaultPrevented||a==null||a())},h),j=vp(N=>{const E=N.target;[...d.branches].some(R=>R.contains(E))||(i==null||i(N),s==null||s(N),N.defaultPrevented||a==null||a())},h);return up(N=>{k===d.layers.size-1&&(n==null||n(N),!N.defaultPrevented&&a&&(N.preventDefault(),a()))},h),b.useEffect(()=>{if(u)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(ra=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),oa(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=ra)}},[u,h,r,d]),b.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),oa())},[u,d]),b.useEffect(()=>{const N=()=>p({});return document.addEventListener(Po,N),()=>document.removeEventListener(Po,N)},[]),c.jsx(ke.div,{...l,ref:w,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:he(e.onFocusCapture,j.onFocusCapture),onBlurCapture:he(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:he(e.onPointerDownCapture,C.onPointerDownCapture)})});kn.displayName=fp;var mp="DismissableLayerBranch",gp=b.forwardRef((e,t)=>{const r=b.useContext(na),n=b.useRef(null),o=Ee(t,n);return b.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),c.jsx(ke.div,{...e,ref:o})});gp.displayName=mp;function bp(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e),n=b.useRef(!1),o=b.useRef(()=>{});return b.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){ia(pp,r,d,{discrete:!0})};const d={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function vp(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e),n=b.useRef(!1);return b.useEffect(()=>{const o=i=>{i.target&&!n.current&&ia(hp,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function oa(){const e=new CustomEvent(Po);document.dispatchEvent(e)}function ia(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?dp(o,i):o.dispatchEvent(i)}var Oo=0;function sa(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??aa()),document.body.insertAdjacentElement("beforeend",e[1]??aa()),Oo++,()=>{Oo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Oo--}},[])}function aa(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Io="focusScope.autoFocusOnMount",Do="focusScope.autoFocusOnUnmount",la={bubbles:!1,cancelable:!0},xp="FocusScope",_o=b.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=b.useState(null),d=Dt(o),u=Dt(i),f=b.useRef(null),h=Ee(t,m=>l(m)),p=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(n){let m=function(x){if(p.paused||!a)return;const S=x.target;a.contains(S)?f.current=S:wt(f.current,{select:!0})},v=function(x){if(p.paused||!a)return;const S=x.relatedTarget;S!==null&&(a.contains(S)||wt(f.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const C of x)C.removedNodes.length>0&&wt(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const k=new MutationObserver(y);return a&&k.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),k.disconnect()}}},[n,a,p.paused]),b.useEffect(()=>{if(a){ua.add(p);const m=document.activeElement;if(!a.contains(m)){const y=new CustomEvent(Io,la);a.addEventListener(Io,d),a.dispatchEvent(y),y.defaultPrevented||(wp(Ep(ca(a)),{select:!0}),document.activeElement===m&&wt(a))}return()=>{a.removeEventListener(Io,d),setTimeout(()=>{const y=new CustomEvent(Do,la);a.addEventListener(Do,u),a.dispatchEvent(y),y.defaultPrevented||wt(m??document.body,{select:!0}),a.removeEventListener(Do,u),ua.remove(p)},0)}}},[a,d,u,p]);const w=b.useCallback(m=>{if(!r&&!n||p.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(v&&y){const k=m.currentTarget,[x,S]=yp(k);x&&S?!m.shiftKey&&y===S?(m.preventDefault(),r&&wt(x,{select:!0})):m.shiftKey&&y===x&&(m.preventDefault(),r&&wt(S,{select:!0})):y===k&&m.preventDefault()}},[r,n,p.paused]);return c.jsx(ke.div,{tabIndex:-1,...s,ref:h,onKeyDown:w})});_o.displayName=xp;function wp(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(wt(n,{select:t}),document.activeElement!==r)return}function yp(e){const t=ca(e),r=da(t,e),n=da(t.reverse(),e);return[r,n]}function ca(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function da(e,t){for(const r of e)if(!kp(r,{upTo:t}))return r}function kp(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Sp(e){return e instanceof HTMLInputElement&&"select"in e}function wt(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Sp(e)&&t&&e.select()}}var ua=Cp();function Cp(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=fa(e,t),e.unshift(t)},remove(t){var r;e=fa(e,t),(r=e[0])==null||r.resume()}}}function fa(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Ep(e){return e.filter(t=>t.tagName!=="A")}var Re=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},jp=b[" useId ".trim().toString()]||(()=>{}),Np=0;function Ar(e){const[t,r]=b.useState(jp());return Re(()=>{r(n=>n??String(Np++))},[e]),t?`radix-${t}`:""}const Tp=["top","right","bottom","left"],yt=Math.min,Ke=Math.max,Sn=Math.round,Cn=Math.floor,ot=e=>({x:e,y:e}),Ap={left:"right",right:"left",bottom:"top",top:"bottom"},zp={start:"end",end:"start"};function Mo(e,t,r){return Ke(e,yt(t,r))}function ft(e,t){return typeof e=="function"?e(t):e}function pt(e){return e.split("-")[0]}function qt(e){return e.split("-")[1]}function Ro(e){return e==="x"?"y":"x"}function Lo(e){return e==="y"?"height":"width"}const Pp=new Set(["top","bottom"]);function it(e){return Pp.has(pt(e))?"y":"x"}function $o(e){return Ro(it(e))}function Op(e,t,r){r===void 0&&(r=!1);const n=qt(e),o=$o(e),i=Lo(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=En(s)),[s,En(s)]}function Ip(e){const t=En(e);return[Fo(e),t,Fo(t)]}function Fo(e){return e.replace(/start|end/g,t=>zp[t])}const pa=["left","right"],ha=["right","left"],Dp=["top","bottom"],_p=["bottom","top"];function Mp(e,t,r){switch(e){case"top":case"bottom":return r?t?ha:pa:t?pa:ha;case"left":case"right":return t?Dp:_p;default:return[]}}function Rp(e,t,r,n){const o=qt(e);let i=Mp(pt(e),r==="start",n);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Fo)))),i}function En(e){return e.replace(/left|right|bottom|top/g,t=>Ap[t])}function Lp(e){return{top:0,right:0,bottom:0,left:0,...e}}function ma(e){return typeof e!="number"?Lp(e):{top:e,right:e,bottom:e,left:e}}function jn(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function ga(e,t,r){let{reference:n,floating:o}=e;const i=it(t),s=$o(t),a=Lo(s),l=pt(t),d=i==="y",u=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,h=n[a]/2-o[a]/2;let p;switch(l){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-o.width,y:f};break;default:p={x:n.x,y:n.y}}switch(qt(t)){case"start":p[s]-=h*(r&&d?-1:1);break;case"end":p[s]+=h*(r&&d?-1:1);break}return p}async function $p(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=ft(t,e),w=ma(p),v=a[h?f==="floating"?"reference":"floating":f],y=jn(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(v)))==null||r?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:d,rootBoundary:u,strategy:l})),k=f==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},C=jn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:k,offsetParent:x,strategy:l}):k);return{top:(y.top-C.top+w.top)/S.y,bottom:(C.bottom-y.bottom+w.bottom)/S.y,left:(y.left-C.left+w.left)/S.x,right:(C.right-y.right+w.right)/S.x}}const Fp=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=ga(d,n,l),h=n,p={},w=0;for(let v=0;v<a.length;v++){var m;const{name:y,fn:k}=a[v],{x,y:S,data:C,reset:j}=await k({x:u,y:f,initialPlacement:n,placement:h,strategy:o,middlewareData:p,rects:d,platform:{...s,detectOverflow:(m=s.detectOverflow)!=null?m:$p},elements:{reference:e,floating:t}});u=x??u,f=S??f,p={...p,[y]:{...p[y],...C}},j&&w<=50&&(w++,typeof j=="object"&&(j.placement&&(h=j.placement),j.rects&&(d=j.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):j.rects),{x:u,y:f}=ga(d,h,l)),v=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:p}},Wp=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:d,padding:u=0}=ft(e,t)||{};if(d==null)return{};const f=ma(u),h={x:r,y:n},p=$o(o),w=Lo(p),m=await s.getDimensions(d),v=p==="y",y=v?"top":"left",k=v?"bottom":"right",x=v?"clientHeight":"clientWidth",S=i.reference[w]+i.reference[p]-h[p]-i.floating[w],C=h[p]-i.reference[p],j=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let N=j?j[x]:0;(!N||!await(s.isElement==null?void 0:s.isElement(j)))&&(N=a.floating[x]||i.floating[w]);const E=S/2-C/2,D=N/2-m[w]/2-1,R=yt(f[y],D),I=yt(f[k],D),L=R,_=N-m[w]-I,G=N/2-m[w]/2+E,B=Mo(L,G,_),F=!l.arrow&&qt(o)!=null&&G!==B&&i.reference[w]/2-(G<L?R:I)-m[w]/2<0,U=F?G<L?G-L:G-_:0;return{[p]:h[p]+U,data:{[p]:B,centerOffset:G-B-U,...F&&{alignmentOffset:U}},reset:F}}}),Up=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:d}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...v}=ft(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const y=pt(o),k=it(a),x=pt(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(d.floating)),C=h||(x||!m?[En(a)]:Ip(a)),j=w!=="none";!h&&j&&C.push(...Rp(a,m,w,S));const N=[a,...C],E=await l.detectOverflow(t,v),D=[];let R=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&D.push(E[y]),f){const G=Op(o,s,S);D.push(E[G[0]],E[G[1]])}if(R=[...R,{placement:o,overflows:D}],!D.every(G=>G<=0)){var I,L;const G=(((I=i.flip)==null?void 0:I.index)||0)+1,B=N[G];if(B&&(!(f==="alignment"?k!==it(B):!1)||R.every(z=>it(z.placement)===k?z.overflows[0]>0:!0)))return{data:{index:G,overflows:R},reset:{placement:B}};let F=(L=R.filter(U=>U.overflows[0]<=0).sort((U,z)=>U.overflows[1]-z.overflows[1])[0])==null?void 0:L.placement;if(!F)switch(p){case"bestFit":{var _;const U=(_=R.filter(z=>{if(j){const X=it(z.placement);return X===k||X==="y"}return!0}).map(z=>[z.placement,z.overflows.filter(X=>X>0).reduce((X,re)=>X+re,0)]).sort((z,X)=>z[1]-X[1])[0])==null?void 0:_[0];U&&(F=U);break}case"initialPlacement":F=a;break}if(o!==F)return{reset:{placement:F}}}return{}}}};function ba(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function va(e){return Tp.some(t=>e[t]>=0)}const Bp=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:o="referenceHidden",...i}=ft(e,t);switch(o){case"referenceHidden":{const s=await n.detectOverflow(t,{...i,elementContext:"reference"}),a=ba(s,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:va(a)}}}case"escaped":{const s=await n.detectOverflow(t,{...i,altBoundary:!0}),a=ba(s,r.floating);return{data:{escapedOffsets:a,escaped:va(a)}}}default:return{}}}}},xa=new Set(["left","top"]);async function Hp(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=pt(r),a=qt(r),l=it(r)==="y",d=xa.has(s)?-1:1,u=i&&l?-1:1,f=ft(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof w=="number"&&(p=a==="end"?w*-1:w),l?{x:p*u,y:h*d}:{x:h*d,y:p*u}}const Vp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await Hp(t,e);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Kp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x:k,y:x}=y;return{x:k,y:x}}},...d}=ft(e,t),u={x:r,y:n},f=await i.detectOverflow(t,d),h=it(pt(o)),p=Ro(h);let w=u[p],m=u[h];if(s){const y=p==="y"?"top":"left",k=p==="y"?"bottom":"right",x=w+f[y],S=w-f[k];w=Mo(x,w,S)}if(a){const y=h==="y"?"top":"left",k=h==="y"?"bottom":"right",x=m+f[y],S=m-f[k];m=Mo(x,m,S)}const v=l.fn({...t,[p]:w,[h]:m});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[p]:s,[h]:a}}}}}},Gp=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:d=!0}=ft(e,t),u={x:r,y:n},f=it(o),h=Ro(f);let p=u[h],w=u[f];const m=ft(a,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=h==="y"?"height":"width",S=i.reference[h]-i.floating[x]+v.mainAxis,C=i.reference[h]+i.reference[x]-v.mainAxis;p<S?p=S:p>C&&(p=C)}if(d){var y,k;const x=h==="y"?"width":"height",S=xa.has(pt(o)),C=i.reference[f]-i.floating[x]+(S&&((y=s.offset)==null?void 0:y[f])||0)+(S?0:v.crossAxis),j=i.reference[f]+i.reference[x]+(S?0:((k=s.offset)==null?void 0:k[f])||0)-(S?v.crossAxis:0);w<C?w=C:w>j&&(w=j)}return{[h]:p,[f]:w}}}},Yp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...d}=ft(e,t),u=await s.detectOverflow(t,d),f=pt(o),h=qt(o),p=it(o)==="y",{width:w,height:m}=i.floating;let v,y;f==="top"||f==="bottom"?(v=f,y=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,v=h==="end"?"top":"bottom");const k=m-u.top-u.bottom,x=w-u.left-u.right,S=yt(m-u[v],k),C=yt(w-u[y],x),j=!t.middlewareData.shift;let N=S,E=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(E=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=k),j&&!h){const R=Ke(u.left,0),I=Ke(u.right,0),L=Ke(u.top,0),_=Ke(u.bottom,0);p?E=w-2*(R!==0||I!==0?R+I:Ke(u.left,u.right)):N=m-2*(L!==0||_!==0?L+_:Ke(u.top,u.bottom))}await l({...t,availableWidth:E,availableHeight:N});const D=await s.getDimensions(a.floating);return w!==D.width||m!==D.height?{reset:{rects:!0}}:{}}}};function Nn(){return typeof window<"u"}function Xt(e){return wa(e)?(e.nodeName||"").toLowerCase():"#document"}function Ge(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function st(e){var t;return(t=(wa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wa(e){return Nn()?e instanceof Node||e instanceof Ge(e).Node:!1}function tt(e){return Nn()?e instanceof Element||e instanceof Ge(e).Element:!1}function at(e){return Nn()?e instanceof HTMLElement||e instanceof Ge(e).HTMLElement:!1}function ya(e){return!Nn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ge(e).ShadowRoot}const qp=new Set(["inline","contents"]);function zr(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=rt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!qp.has(o)}const Xp=new Set(["table","td","th"]);function Jp(e){return Xp.has(Xt(e))}const Zp=[":popover-open",":modal"];function Tn(e){return Zp.some(t=>{try{return e.matches(t)}catch{return!1}})}const Qp=["transform","translate","scale","rotate","perspective"],eh=["transform","translate","scale","rotate","perspective","filter"],th=["paint","layout","strict","content"];function Wo(e){const t=Uo(),r=tt(e)?rt(e):e;return Qp.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||eh.some(n=>(r.willChange||"").includes(n))||th.some(n=>(r.contain||"").includes(n))}function rh(e){let t=kt(e);for(;at(t)&&!Jt(t);){if(Wo(t))return t;if(Tn(t))return null;t=kt(t)}return null}function Uo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const nh=new Set(["html","body","#document"]);function Jt(e){return nh.has(Xt(e))}function rt(e){return Ge(e).getComputedStyle(e)}function An(e){return tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function kt(e){if(Xt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ya(e)&&e.host||st(e);return ya(t)?t.host:t}function ka(e){const t=kt(e);return Jt(t)?e.ownerDocument?e.ownerDocument.body:e.body:at(t)&&zr(t)?t:ka(t)}function Pr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=ka(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),s=Ge(o);if(i){const a=Bo(s);return t.concat(s,s.visualViewport||[],zr(o)?o:[],a&&r?Pr(a):[])}return t.concat(o,Pr(o,[],r))}function Bo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Sa(e){const t=rt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=at(e),i=o?e.offsetWidth:r,s=o?e.offsetHeight:n,a=Sn(r)!==i||Sn(n)!==s;return a&&(r=i,n=s),{width:r,height:n,$:a}}function Ho(e){return tt(e)?e:e.contextElement}function Zt(e){const t=Ho(e);if(!at(t))return ot(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=Sa(t);let s=(i?Sn(r.width):r.width)/n,a=(i?Sn(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const oh=ot(0);function Ca(e){const t=Ge(e);return!Uo()||!t.visualViewport?oh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ih(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Ge(e)?!1:t}function _t(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=Ho(e);let s=ot(1);t&&(n?tt(n)&&(s=Zt(n)):s=Zt(e));const a=ih(i,r,n)?Ca(i):ot(0);let l=(o.left+a.x)/s.x,d=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){const h=Ge(i),p=n&&tt(n)?Ge(n):n;let w=h,m=Bo(w);for(;m&&n&&p!==w;){const v=Zt(m),y=m.getBoundingClientRect(),k=rt(m),x=y.left+(m.clientLeft+parseFloat(k.paddingLeft))*v.x,S=y.top+(m.clientTop+parseFloat(k.paddingTop))*v.y;l*=v.x,d*=v.y,u*=v.x,f*=v.y,l+=x,d+=S,w=Ge(m),m=Bo(w)}}return jn({width:u,height:f,x:l,y:d})}function zn(e,t){const r=An(e).scrollLeft;return t?t.left+r:_t(st(e)).left+r}function Ea(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-zn(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function sh(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",s=st(n),a=t?Tn(t.floating):!1;if(n===s||a&&i)return r;let l={scrollLeft:0,scrollTop:0},d=ot(1);const u=ot(0),f=at(n);if((f||!f&&!i)&&((Xt(n)!=="body"||zr(s))&&(l=An(n)),at(n))){const p=_t(n);d=Zt(n),u.x=p.x+n.clientLeft,u.y=p.y+n.clientTop}const h=s&&!f&&!i?Ea(s,l):ot(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-l.scrollLeft*d.x+u.x+h.x,y:r.y*d.y-l.scrollTop*d.y+u.y+h.y}}function ah(e){return Array.from(e.getClientRects())}function lh(e){const t=st(e),r=An(e),n=e.ownerDocument.body,o=Ke(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Ke(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+zn(e);const a=-r.scrollTop;return rt(n).direction==="rtl"&&(s+=Ke(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}const ja=25;function ch(e,t){const r=Ge(e),n=st(e),o=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Uo();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const d=zn(n);if(d<=0){const u=n.ownerDocument,f=u.body,h=getComputedStyle(f),p=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(n.clientWidth-f.clientWidth-p);w<=ja&&(i-=w)}else d<=ja&&(i+=d);return{width:i,height:s,x:a,y:l}}const dh=new Set(["absolute","fixed"]);function uh(e,t){const r=_t(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=at(e)?Zt(e):ot(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,d=n*i.y;return{width:s,height:a,x:l,y:d}}function Na(e,t,r){let n;if(t==="viewport")n=ch(e,r);else if(t==="document")n=lh(st(e));else if(tt(t))n=uh(t,r);else{const o=Ca(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return jn(n)}function Ta(e,t){const r=kt(e);return r===t||!tt(r)||Jt(r)?!1:rt(r).position==="fixed"||Ta(r,t)}function fh(e,t){const r=t.get(e);if(r)return r;let n=Pr(e,[],!1).filter(a=>tt(a)&&Xt(a)!=="body"),o=null;const i=rt(e).position==="fixed";let s=i?kt(e):e;for(;tt(s)&&!Jt(s);){const a=rt(s),l=Wo(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&dh.has(o.position)||zr(s)&&!l&&Ta(e,s))?n=n.filter(u=>u!==s):o=a,s=kt(s)}return t.set(e,n),n}function ph(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?Tn(t)?[]:fh(t,this._c):[].concat(r),n],a=s[0],l=s.reduce((d,u)=>{const f=Na(t,u,o);return d.top=Ke(f.top,d.top),d.right=yt(f.right,d.right),d.bottom=yt(f.bottom,d.bottom),d.left=Ke(f.left,d.left),d},Na(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function hh(e){const{width:t,height:r}=Sa(e);return{width:t,height:r}}function mh(e,t,r){const n=at(t),o=st(t),i=r==="fixed",s=_t(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=ot(0);function d(){l.x=zn(o)}if(n||!n&&!i)if((Xt(t)!=="body"||zr(o))&&(a=An(t)),n){const p=_t(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&d();i&&!n&&o&&d();const u=o&&!n&&!i?Ea(o,a):ot(0),f=s.left+a.scrollLeft-l.x-u.x,h=s.top+a.scrollTop-l.y-u.y;return{x:f,y:h,width:s.width,height:s.height}}function Vo(e){return rt(e).position==="static"}function Aa(e,t){if(!at(e)||rt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return st(e)===r&&(r=r.ownerDocument.body),r}function za(e,t){const r=Ge(e);if(Tn(e))return r;if(!at(e)){let o=kt(e);for(;o&&!Jt(o);){if(tt(o)&&!Vo(o))return o;o=kt(o)}return r}let n=Aa(e,t);for(;n&&Jp(n)&&Vo(n);)n=Aa(n,t);return n&&Jt(n)&&Vo(n)&&!Wo(n)?r:n||rh(e)||r}const gh=async function(e){const t=this.getOffsetParent||za,r=this.getDimensions,n=await r(e.floating);return{reference:mh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function bh(e){return rt(e).direction==="rtl"}const vh={convertOffsetParentRelativeRectToViewportRelativeRect:sh,getDocumentElement:st,getClippingRect:ph,getOffsetParent:za,getElementRects:gh,getClientRects:ah,getDimensions:hh,getScale:Zt,isElement:tt,isRTL:bh};function Pa(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xh(e,t){let r=null,n;const o=st(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const d=e.getBoundingClientRect(),{left:u,top:f,width:h,height:p}=d;if(a||t(),!h||!p)return;const w=Cn(f),m=Cn(o.clientWidth-(u+h)),v=Cn(o.clientHeight-(f+p)),y=Cn(u),x={rootMargin:-w+"px "+-m+"px "+-v+"px "+-y+"px",threshold:Ke(0,yt(1,l))||1};let S=!0;function C(j){const N=j[0].intersectionRatio;if(N!==l){if(!S)return s();N?s(!1,N):n=setTimeout(()=>{s(!1,1e-7)},1e3)}N===1&&!Pa(d,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(C,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(C,x)}r.observe(e)}return s(!0),i}function wh(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,d=Ho(e),u=o||i?[...d?Pr(d):[],...Pr(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),i&&y.addEventListener("resize",r)});const f=d&&a?xh(d,r):null;let h=-1,p=null;s&&(p=new ResizeObserver(y=>{let[k]=y;k&&k.target===d&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),r()}),d&&!l&&p.observe(d),p.observe(t));let w,m=l?_t(e):null;l&&v();function v(){const y=_t(e);m&&!Pa(m,y)&&r(),m=y,w=requestAnimationFrame(v)}return r(),()=>{var y;u.forEach(k=>{o&&k.removeEventListener("scroll",r),i&&k.removeEventListener("resize",r)}),f==null||f(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(w)}}const yh=Vp,kh=Kp,Sh=Up,Ch=Yp,Eh=Bp,Oa=Wp,jh=Gp,Nh=(e,t,r)=>{const n=new Map,o={platform:vh,...r},i={...o.platform,_c:n};return Fp(e,t,{...o,platform:i})};var Th=typeof document<"u",Ah=function(){},Pn=Th?g.useLayoutEffect:Ah;function On(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!On(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!On(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ia(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Da(e,t){const r=Ia(e);return Math.round(t*r)/r}function Ko(e){const t=b.useRef(e);return Pn(()=>{t.current=e}),t}function zh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:d}=e,[u,f]=b.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=b.useState(n);On(h,n)||p(n);const[w,m]=b.useState(null),[v,y]=b.useState(null),k=b.useCallback(z=>{z!==j.current&&(j.current=z,m(z))},[]),x=b.useCallback(z=>{z!==N.current&&(N.current=z,y(z))},[]),S=i||w,C=s||v,j=b.useRef(null),N=b.useRef(null),E=b.useRef(u),D=l!=null,R=Ko(l),I=Ko(o),L=Ko(d),_=b.useCallback(()=>{if(!j.current||!N.current)return;const z={placement:t,strategy:r,middleware:h};I.current&&(z.platform=I.current),Nh(j.current,N.current,z).then(X=>{const re={...X,isPositioned:L.current!==!1};G.current&&!On(E.current,re)&&(E.current=re,Kr.flushSync(()=>{f(re)}))})},[h,t,r,I,L]);Pn(()=>{d===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,f(z=>({...z,isPositioned:!1})))},[d]);const G=b.useRef(!1);Pn(()=>(G.current=!0,()=>{G.current=!1}),[]),Pn(()=>{if(S&&(j.current=S),C&&(N.current=C),S&&C){if(R.current)return R.current(S,C,_);_()}},[S,C,_,R,D]);const B=b.useMemo(()=>({reference:j,floating:N,setReference:k,setFloating:x}),[k,x]),F=b.useMemo(()=>({reference:S,floating:C}),[S,C]),U=b.useMemo(()=>{const z={position:r,left:0,top:0};if(!F.floating)return z;const X=Da(F.floating,u.x),re=Da(F.floating,u.y);return a?{...z,transform:"translate("+X+"px, "+re+"px)",...Ia(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:X,top:re}},[r,a,F.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:_,refs:B,elements:F,floatingStyles:U}),[u,_,B,F,U])}const Ph=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Oa({element:n.current,padding:o}).fn(r):{}:n?Oa({element:n,padding:o}).fn(r):{}}}},Oh=(e,t)=>({...yh(e),options:[e,t]}),Ih=(e,t)=>({...kh(e),options:[e,t]}),Dh=(e,t)=>({...jh(e),options:[e,t]}),_h=(e,t)=>({...Sh(e),options:[e,t]}),Mh=(e,t)=>({...Ch(e),options:[e,t]}),Rh=(e,t)=>({...Eh(e),options:[e,t]}),Lh=(e,t)=>({...Ph(e),options:[e,t]});var $h="Arrow",_a=b.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return c.jsx(ke.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});_a.displayName=$h;var Fh=_a;function Wh(e){const[t,r]=b.useState(void 0);return Re(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,d=Array.isArray(l)?l[0]:l;s=d.inlineSize,a=d.blockSize}else s=e.offsetWidth,a=e.offsetHeight;r({width:s,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Go="Popper",[Ma,Qt]=Tr(Go),[Uh,Ra]=Ma(Go),La=e=>{const{__scopePopper:t,children:r}=e,[n,o]=b.useState(null);return c.jsx(Uh,{scope:t,anchor:n,onAnchorChange:o,children:r})};La.displayName=Go;var $a="PopperAnchor",Fa=b.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=Ra($a,r),s=b.useRef(null),a=Ee(t,s),l=b.useRef(null);return b.useEffect(()=>{const d=l.current;l.current=(n==null?void 0:n.current)||s.current,d!==l.current&&i.onAnchorChange(l.current)}),n?null:c.jsx(ke.div,{...o,ref:a})});Fa.displayName=$a;var Yo="PopperContent",[Bh,Hh]=Ma(Yo),Wa=b.forwardRef((e,t)=>{var P,J,ee,W,ne,te;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:w,...m}=e,v=Ra(Yo,r),[y,k]=b.useState(null),x=Ee(t,we=>k(we)),[S,C]=b.useState(null),j=Wh(S),N=(j==null?void 0:j.width)??0,E=(j==null?void 0:j.height)??0,D=n+(i!=="center"?"-"+i:""),R=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},I=Array.isArray(d)?d:[d],L=I.length>0,_={padding:R,boundary:I.filter(Kh),altBoundary:L},{refs:G,floatingStyles:B,placement:F,isPositioned:U,middlewareData:z}=zh({strategy:"fixed",placement:D,whileElementsMounted:(...we)=>wh(...we,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[Oh({mainAxis:o+E,alignmentAxis:s}),l&&Ih({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Dh():void 0,..._}),l&&_h({..._}),Mh({..._,apply:({elements:we,rects:be,availableWidth:Pe,availableHeight:De})=>{const{width:Ue,height:jt}=be.reference,qe=we.floating.style;qe.setProperty("--radix-popper-available-width",`${Pe}px`),qe.setProperty("--radix-popper-available-height",`${De}px`),qe.setProperty("--radix-popper-anchor-width",`${Ue}px`),qe.setProperty("--radix-popper-anchor-height",`${jt}px`)}}),S&&Lh({element:S,padding:a}),Gh({arrowWidth:N,arrowHeight:E}),h&&Rh({strategy:"referenceHidden",..._})]}),[X,re]=Ha(F),T=Dt(w);Re(()=>{U&&(T==null||T())},[U,T]);const $=(P=z.arrow)==null?void 0:P.x,Y=(J=z.arrow)==null?void 0:J.y,K=((ee=z.arrow)==null?void 0:ee.centerOffset)!==0,[ge,se]=b.useState();return Re(()=>{y&&se(window.getComputedStyle(y).zIndex)},[y]),c.jsx("div",{ref:G.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:U?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ge,"--radix-popper-transform-origin":[(W=z.transformOrigin)==null?void 0:W.x,(ne=z.transformOrigin)==null?void 0:ne.y].join(" "),...((te=z.hide)==null?void 0:te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(Bh,{scope:r,placedSide:X,onArrowChange:C,arrowX:$,arrowY:Y,shouldHideArrow:K,children:c.jsx(ke.div,{"data-side":X,"data-align":re,...m,ref:x,style:{...m.style,animation:U?void 0:"none"}})})})});Wa.displayName=Yo;var Ua="PopperArrow",Vh={top:"bottom",right:"left",bottom:"top",left:"right"},Ba=b.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=Hh(Ua,n),s=Vh[i.placedSide];return c.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:c.jsx(Fh,{...o,ref:r,style:{...o.style,display:"block"}})})});Ba.displayName=Ua;function Kh(e){return e!==null}var Gh=e=>({name:"transformOrigin",options:e,fn(t){var v,y,k;const{placement:r,rects:n,middlewareData:o}=t,s=((v=o.arrow)==null?void 0:v.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[d,u]=Ha(r),f={start:"0%",center:"50%",end:"100%"}[u],h=(((y=o.arrow)==null?void 0:y.x)??0)+a/2,p=(((k=o.arrow)==null?void 0:k.y)??0)+l/2;let w="",m="";return d==="bottom"?(w=s?f:`${h}px`,m=`${-l}px`):d==="top"?(w=s?f:`${h}px`,m=`${n.floating.height+l}px`):d==="right"?(w=`${-l}px`,m=s?f:`${p}px`):d==="left"&&(w=`${n.floating.width+l}px`,m=s?f:`${p}px`),{data:{x:w,y:m}}}});function Ha(e){const[t,r="center"]=e.split("-");return[t,r]}var qo=La,In=Fa,Xo=Wa,Jo=Ba,Yh="Portal",Dn=b.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[o,i]=b.useState(!1);Re(()=>i(!0),[]);const s=r||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?gt.createPortal(c.jsx(ke.div,{...n,ref:t}),s):null});Dn.displayName=Yh;var qh=b[" useInsertionEffect ".trim().toString()]||Re;function _n({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,i,s]=Xh({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:o;{const u=b.useRef(e!==void 0);b.useEffect(()=>{const f=u.current;f!==a&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,n])}const d=b.useCallback(u=>{var f;if(a){const h=Jh(u)?u(e):u;h!==e&&((f=s.current)==null||f.call(s,h))}else i(u)},[a,e,i,s]);return[l,d]}function Xh({defaultProp:e,onChange:t}){const[r,n]=b.useState(e),o=b.useRef(r),i=b.useRef(t);return qh(()=>{i.current=t},[t]),b.useEffect(()=>{var s;o.current!==r&&((s=i.current)==null||s.call(i,r),o.current=r)},[r,o]),[r,n,i]}function Jh(e){return typeof e=="function"}function Zh(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Va=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Qh="VisuallyHidden",Ka=b.forwardRef((e,t)=>c.jsx(ke.span,{...e,ref:t,style:{...Va,...e.style}}));Ka.displayName=Qh;var em=Ka,tm=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},er=new WeakMap,Mn=new WeakMap,Rn={},Zo=0,Ga=function(e){return e&&(e.host||Ga(e.parentNode))},rm=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Ga(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},nm=function(e,t,r,n){var o=rm(t,Array.isArray(e)?e:[e]);Rn[r]||(Rn[r]=new WeakMap);var i=Rn[r],s=[],a=new Set,l=new Set(o),d=function(f){!f||a.has(f)||(a.add(f),d(f.parentNode))};o.forEach(d);var u=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(a.has(h))u(h);else try{var p=h.getAttribute(n),w=p!==null&&p!=="false",m=(er.get(h)||0)+1,v=(i.get(h)||0)+1;er.set(h,m),i.set(h,v),s.push(h),m===1&&w&&Mn.set(h,!0),v===1&&h.setAttribute(r,"true"),w||h.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return u(t),a.clear(),Zo++,function(){s.forEach(function(f){var h=er.get(f)-1,p=i.get(f)-1;er.set(f,h),i.set(f,p),h||(Mn.has(f)||f.removeAttribute(n),Mn.delete(f)),p||f.removeAttribute(r)}),Zo--,Zo||(er=new WeakMap,er=new WeakMap,Mn=new WeakMap,Rn={})}},Ya=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=tm(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),nm(n,o,r,"aria-hidden")):function(){return null}},lt=function(){return lt=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},lt.apply(this,arguments)};function qa(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function om(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ln="right-scroll-bar-position",$n="width-before-scroll-bar",im="with-scroll-bars-hidden",sm="--removed-body-scroll-bar-size";function Qo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function am(e,t){var r=g.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var lm=typeof window<"u"?b.useLayoutEffect:b.useEffect,Xa=new WeakMap;function cm(e,t){var r=am(null,function(n){return e.forEach(function(o){return Qo(o,n)})});return lm(function(){var n=Xa.get(r);if(n){var o=new Set(n),i=new Set(e),s=r.current;o.forEach(function(a){i.has(a)||Qo(a,null)}),i.forEach(function(a){o.has(a)||Qo(a,s)})}Xa.set(r,e)},[e]),r}function dm(e){return e}function um(e,t){t===void 0&&(t=dm);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var s=t(i,n);return r.push(s),function(){r=r.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(n=!0;r.length;){var s=r;r=[],s.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var s=[];if(r.length){var a=r;r=[],a.forEach(i),s=r}var l=function(){var u=s;s=[],u.forEach(i)},d=function(){return Promise.resolve().then(l)};d(),r={push:function(u){s.push(u),d()},filter:function(u){return s=s.filter(u),r}}}};return o}function fm(e){e===void 0&&(e={});var t=um(null);return t.options=lt({async:!0,ssr:!1},e),t}var Ja=function(e){var t=e.sideCar,r=qa(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return b.createElement(n,lt({},r))};Ja.isSideCarExport=!0;function pm(e,t){return e.useMedium(t),Ja}var Za=fm(),ei=function(){},Fn=b.forwardRef(function(e,t){var r=b.useRef(null),n=b.useState({onScrollCapture:ei,onWheelCapture:ei,onTouchMoveCapture:ei}),o=n[0],i=n[1],s=e.forwardProps,a=e.children,l=e.className,d=e.removeScrollBar,u=e.enabled,f=e.shards,h=e.sideCar,p=e.noRelative,w=e.noIsolation,m=e.inert,v=e.allowPinchZoom,y=e.as,k=y===void 0?"div":y,x=e.gapMode,S=qa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=h,j=cm([r,t]),N=lt(lt({},S),o);return b.createElement(b.Fragment,null,u&&b.createElement(C,{sideCar:Za,removeScrollBar:d,shards:f,noRelative:p,noIsolation:w,inert:m,setCallbacks:i,allowPinchZoom:!!v,lockRef:r,gapMode:x}),s?b.cloneElement(b.Children.only(a),lt(lt({},N),{ref:j})):b.createElement(k,lt({},N,{className:l,ref:j}),a))});Fn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Fn.classNames={fullWidth:$n,zeroRight:Ln};var hm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function mm(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=hm();return t&&e.setAttribute("nonce",t),e}function gm(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function bm(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var vm=function(){var e=0,t=null;return{add:function(r){e==0&&(t=mm())&&(gm(t,r),bm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},xm=function(){var e=vm();return function(t,r){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Qa=function(){var e=xm(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},wm={left:0,top:0,right:0,gap:0},ti=function(e){return parseInt(e||"",10)||0},ym=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ti(r),ti(n),ti(o)]},km=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return wm;var t=ym(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Sm=Qa(),tr="data-scroll-locked",Cm=function(e,t,r,n){var o=e.left,i=e.top,s=e.right,a=e.gap;return r===void 0&&(r="margin"),`
186
+ `},mu={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function gu(e){let{announcements:t=mu,container:r,hiddenTextDescribedById:n,screenReaderInstructions:o=hu}=e;const{announce:i,announcement:s}=uu(),a=kr("DndLiveRegion"),[l,d]=g.useState(!1);if(g.useEffect(()=>{d(!0)},[]),fu(g.useMemo(()=>({onDragStart(f){let{active:h}=f;i(t.onDragStart({active:h}))},onDragMove(f){let{active:h,over:p}=f;t.onDragMove&&i(t.onDragMove({active:h,over:p}))},onDragOver(f){let{active:h,over:p}=f;i(t.onDragOver({active:h,over:p}))},onDragEnd(f){let{active:h,over:p}=f;i(t.onDragEnd({active:h,over:p}))},onDragCancel(f){let{active:h,over:p}=f;i(t.onDragCancel({active:h,over:p}))}}),[i,t])),!l)return null;const u=g.createElement(g.Fragment,null,g.createElement(cu,{id:n,value:o.draggable}),g.createElement(du,{id:a,announcement:s}));return r?vt.createPortal(u,r):u}var Ie;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Ie||(Ie={}));function pn(){}function vo(e,t){return g.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function bu(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return g.useMemo(()=>[...t].filter(n=>n!=null),[...t])}const tt=Object.freeze({x:0,y:0});function ps(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function vu(e,t){const r=fn(e);if(!r)return"0 0";const n={x:(r.x-t.left)/t.width*100,y:(r.y-t.top)/t.height*100};return n.x+"% "+n.y+"%"}function hs(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return r-n}function xu(e,t){let{data:{value:r}}=e,{data:{value:n}}=t;return n-r}function ms(e){let{left:t,top:r,height:n,width:o}=e;return[{x:t,y:r},{x:t+o,y:r},{x:t,y:r+n},{x:t+o,y:r+n}]}function gs(e,t){if(!e||e.length===0)return null;const[r]=e;return r[t]}function bs(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}const wu=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=bs(t,t.left,t.top),i=[];for(const s of n){const{id:a}=s,l=r.get(a);if(l){const d=ps(bs(l),o);i.push({id:a,data:{droppableContainer:s,value:d}})}}return i.sort(hs)},yu=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=ms(t),i=[];for(const s of n){const{id:a}=s,l=r.get(a);if(l){const d=ms(l),u=o.reduce((h,p,w)=>h+ps(d[w],p),0),f=Number((u/4).toFixed(4));i.push({id:a,data:{droppableContainer:s,value:f}})}}return i.sort(hs)};function ku(e,t){const r=Math.max(t.top,e.top),n=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),i=Math.min(t.top+t.height,e.top+e.height),s=o-n,a=i-r;if(n<o&&r<i){const l=t.width*t.height,d=e.width*e.height,u=s*a,f=u/(l+d-u);return Number(f.toFixed(4))}return 0}const Su=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:n}=e;const o=[];for(const i of n){const{id:s}=i,a=r.get(s);if(a){const l=ku(a,t);l>0&&o.push({id:s,data:{droppableContainer:i,value:l}})}}return o.sort(xu)};function Cu(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function vs(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:tt}function Eu(e){return function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return o.reduce((s,a)=>({...s,top:s.top+e*a.y,bottom:s.bottom+e*a.y,left:s.left+e*a.x,right:s.right+e*a.x}),{...r})}}const ju=Eu(1);function xs(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Nu(e,t,r){const n=xs(t);if(!n)return e;const{scaleX:o,scaleY:i,x:s,y:a}=n,l=e.left-s-(1-o)*parseFloat(r),d=e.top-a-(1-i)*parseFloat(r.slice(r.indexOf(" ")+1)),u=o?e.width/o:e.width,f=i?e.height/i:e.height;return{width:u,height:f,top:d,right:l+u,bottom:d+f,left:l}}const Tu={ignoreTransform:!1};function Kt(e,t){t===void 0&&(t=Tu);let r=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:d,transformOrigin:u}=We(e).getComputedStyle(e);d&&(r=Nu(r,d,u))}const{top:n,left:o,width:i,height:s,bottom:a,right:l}=r;return{top:n,left:o,width:i,height:s,bottom:a,right:l}}function ws(e){return Kt(e,{ignoreTransform:!0})}function Au(e){const t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function zu(e,t){return t===void 0&&(t=We(e).getComputedStyle(e)),t.position==="fixed"}function Pu(e,t){t===void 0&&(t=We(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const i=t[o];return typeof i=="string"?r.test(i):!1})}function hn(e,t){const r=[];function n(o){if(t!=null&&r.length>=t||!o)return r;if(go(o)&&o.scrollingElement!=null&&!r.includes(o.scrollingElement))return r.push(o.scrollingElement),r;if(!xr(o)||cs(o)||r.includes(o))return r;const i=We(e).getComputedStyle(o);return o!==e&&Pu(o,i)&&r.push(o),zu(o,i)?r:n(o.parentNode)}return e?n(e):r}function ys(e){const[t]=hn(e,1);return t??null}function xo(e){return!an||!e?null:Bt(e)?e:mo(e)?go(e)||e===Ht(e).scrollingElement?window:xr(e)?e:null:null}function ks(e){return Bt(e)?e.scrollX:e.scrollLeft}function Ss(e){return Bt(e)?e.scrollY:e.scrollTop}function wo(e){return{x:ks(e),y:Ss(e)}}var Me;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Me||(Me={}));function Cs(e){return!an||!e?!1:e===document.scrollingElement}function Es(e){const t={x:0,y:0},r=Cs(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},n={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},o=e.scrollTop<=t.y,i=e.scrollLeft<=t.x,s=e.scrollTop>=n.y,a=e.scrollLeft>=n.x;return{isTop:o,isLeft:i,isBottom:s,isRight:a,maxScroll:n,minScroll:t}}const Ou={x:.2,y:.2};function Iu(e,t,r,n,o){let{top:i,left:s,right:a,bottom:l}=r;n===void 0&&(n=10),o===void 0&&(o=Ou);const{isTop:d,isBottom:u,isLeft:f,isRight:h}=Es(e),p={x:0,y:0},w={x:0,y:0},m={height:t.height*o.y,width:t.width*o.x};return!d&&i<=t.top+m.height?(p.y=Me.Backward,w.y=n*Math.abs((t.top+m.height-i)/m.height)):!u&&l>=t.bottom-m.height&&(p.y=Me.Forward,w.y=n*Math.abs((t.bottom-m.height-l)/m.height)),!h&&a>=t.right-m.width?(p.x=Me.Forward,w.x=n*Math.abs((t.right-m.width-a)/m.width)):!f&&s<=t.left+m.width&&(p.x=Me.Backward,w.x=n*Math.abs((t.left+m.width-s)/m.width)),{direction:p,speed:w}}function Du(e){if(e===document.scrollingElement){const{innerWidth:i,innerHeight:s}=window;return{top:0,left:0,right:i,bottom:s,width:i,height:s}}const{top:t,left:r,right:n,bottom:o}=e.getBoundingClientRect();return{top:t,left:r,right:n,bottom:o,width:e.clientWidth,height:e.clientHeight}}function js(e){return e.reduce((t,r)=>Vt(t,wo(r)),tt)}function _u(e){return e.reduce((t,r)=>t+ks(r),0)}function Mu(e){return e.reduce((t,r)=>t+Ss(r),0)}function Ns(e,t){if(t===void 0&&(t=Kt),!e)return;const{top:r,left:n,bottom:o,right:i}=t(e);ys(e)&&(o<=0||i<=0||r>=window.innerHeight||n>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const Ru=[["x",["left","right"],_u],["y",["top","bottom"],Mu]];class yo{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=hn(r),o=js(n);this.rect={...t},this.width=t.width,this.height=t.height;for(const[i,s,a]of Ru)for(const l of s)Object.defineProperty(this,l,{get:()=>{const d=a(n),u=o[i]-d;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Cr{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var n;return(n=this.target)==null?void 0:n.removeEventListener(...r)})},this.target=t}add(t,r,n){var o;(o=this.target)==null||o.addEventListener(t,r,n),this.listeners.push([t,r,n])}}function Lu(e){const{EventTarget:t}=We(e);return e instanceof t?e:Ht(e)}function ko(e,t){const r=Math.abs(e.x),n=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+n**2)>t:"x"in t&&"y"in t?r>t.x&&n>t.y:"x"in t?r>t.x:"y"in t?n>t.y:!1}var Ze;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Ze||(Ze={}));function Ts(e){e.preventDefault()}function $u(e){e.stopPropagation()}var fe;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(fe||(fe={}));const As={start:[fe.Space,fe.Enter],cancel:[fe.Esc],end:[fe.Space,fe.Enter,fe.Tab]},Fu=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case fe.Right:return{...r,x:r.x+25};case fe.Left:return{...r,x:r.x-25};case fe.Down:return{...r,y:r.y+25};case fe.Up:return{...r,y:r.y-25}}};class So{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:r}}=t;this.props=t,this.listeners=new Cr(Ht(r)),this.windowListeners=new Cr(We(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ze.Resize,this.handleCancel),this.windowListeners.add(Ze.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ze.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:r}=this.props,n=t.node.current;n&&Ns(n),r(tt)}handleKeyDown(t){if(un(t)){const{active:r,context:n,options:o}=this.props,{keyboardCodes:i=As,coordinateGetter:s=Fu,scrollBehavior:a="smooth"}=o,{code:l}=t;if(i.end.includes(l)){this.handleEnd(t);return}if(i.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:d}=n.current,u=d?{x:d.left,y:d.top}:tt;this.referenceCoordinates||(this.referenceCoordinates=u);const f=s(t,{active:r,context:n.current,currentCoordinates:u});if(f){const h=Sr(f,u),p={x:0,y:0},{scrollableAncestors:w}=n.current;for(const m of w){const v=t.code,{isTop:y,isRight:k,isLeft:x,isBottom:S,maxScroll:C,minScroll:E}=Es(m),N=Du(m),j={x:Math.min(v===fe.Right?N.right-N.width/2:N.right,Math.max(v===fe.Right?N.left:N.left+N.width/2,f.x)),y:Math.min(v===fe.Down?N.bottom-N.height/2:N.bottom,Math.max(v===fe.Down?N.top:N.top+N.height/2,f.y))},D=v===fe.Right&&!k||v===fe.Left&&!x,M=v===fe.Down&&!S||v===fe.Up&&!y;if(D&&j.x!==f.x){const I=m.scrollLeft+h.x,R=v===fe.Right&&I<=C.x||v===fe.Left&&I>=E.x;if(R&&!h.y){m.scrollTo({left:I,behavior:a});return}R?p.x=m.scrollLeft-I:p.x=v===fe.Right?m.scrollLeft-C.x:m.scrollLeft-E.x,p.x&&m.scrollBy({left:-p.x,behavior:a});break}else if(M&&j.y!==f.y){const I=m.scrollTop+h.y,R=v===fe.Down&&I<=C.y||v===fe.Up&&I>=E.y;if(R&&!h.x){m.scrollTo({top:I,behavior:a});return}R?p.y=m.scrollTop-I:p.y=v===fe.Down?m.scrollTop-C.y:m.scrollTop-E.y,p.y&&m.scrollBy({top:-p.y,behavior:a});break}}this.handleMove(t,Vt(Sr(f,this.referenceCoordinates),p))}}}handleMove(t,r){const{onMove:n}=this.props;t.preventDefault(),n(r)}handleEnd(t){const{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){const{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}So.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:n=As,onActivation:o}=t,{active:i}=r;const{code:s}=e.nativeEvent;if(n.start.includes(s)){const a=i.activatorNode.current;return a&&e.target!==a?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function zs(e){return!!(e&&"distance"in e)}function Ps(e){return!!(e&&"delay"in e)}class Co{constructor(t,r,n){var o;n===void 0&&(n=Lu(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;const{event:i}=t,{target:s}=i;this.props=t,this.events=r,this.document=Ht(s),this.documentListeners=new Cr(this.document),this.listeners=new Cr(n),this.windowListeners=new Cr(We(s)),this.initialCoordinates=(o=fn(i))!=null?o:tt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(Ze.Resize,this.handleCancel),this.windowListeners.add(Ze.DragStart,Ts),this.windowListeners.add(Ze.VisibilityChange,this.handleCancel),this.windowListeners.add(Ze.ContextMenu,Ts),this.documentListeners.add(Ze.Keydown,this.handleKeydown),r){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ps(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(zs(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){const{active:n,onPending:o}=this.props;o(n,t,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(Ze.Click,$u,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ze.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;const{activated:n,initialCoordinates:o,props:i}=this,{onMove:s,options:{activationConstraint:a}}=i;if(!o)return;const l=(r=fn(t))!=null?r:tt,d=Sr(o,l);if(!n&&a){if(zs(a)){if(a.tolerance!=null&&ko(d,a.tolerance))return this.handleCancel();if(ko(d,a.distance))return this.handleStart()}if(Ps(a)&&ko(d,a.tolerance))return this.handleCancel();this.handlePending(a,d);return}t.cancelable&&t.preventDefault(),s(l)}handleEnd(){const{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){const{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===fe.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const Wu={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Eo extends Co{constructor(t){const{event:r}=t,n=Ht(r.target);super(t,Wu,n)}}Eo.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return!r.isPrimary||r.button!==0?!1:(n==null||n({event:r}),!0)}}];const Uu={move:{name:"mousemove"},end:{name:"mouseup"}};var jo;(function(e){e[e.RightClick=2]="RightClick"})(jo||(jo={}));class Bu extends Co{constructor(t){super(t,Uu,Ht(t.event.target))}}Bu.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;return r.button===jo.RightClick?!1:(n==null||n({event:r}),!0)}}];const No={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class Os extends Co{constructor(t){super(t,No)}static setup(){return window.addEventListener(No.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(No.move.name,t)};function t(){}}}Os.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:n}=t;const{touches:o}=r;return o.length>1?!1:(n==null||n({event:r}),!0)}}];var Er;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Er||(Er={}));var mn;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(mn||(mn={}));function Hu(e){let{acceleration:t,activator:r=Er.Pointer,canScroll:n,draggingRect:o,enabled:i,interval:s=5,order:a=mn.TreeOrder,pointerCoordinates:l,scrollableAncestors:d,scrollableAncestorRects:u,delta:f,threshold:h}=e;const p=Ku({delta:f,disabled:!i}),[w,m]=ou(),v=g.useRef({x:0,y:0}),y=g.useRef({x:0,y:0}),k=g.useMemo(()=>{switch(r){case Er.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case Er.DraggableRect:return o}},[r,o,l]),x=g.useRef(null),S=g.useCallback(()=>{const E=x.current;if(!E)return;const N=v.current.x*y.current.x,j=v.current.y*y.current.y;E.scrollBy(N,j)},[]),C=g.useMemo(()=>a===mn.TreeOrder?[...d].reverse():d,[a,d]);g.useEffect(()=>{if(!i||!d.length||!k){m();return}for(const E of C){if((n==null?void 0:n(E))===!1)continue;const N=d.indexOf(E),j=u[N];if(!j)continue;const{direction:D,speed:M}=Iu(E,j,k,t,h);for(const I of["x","y"])p[I][D[I]]||(M[I]=0,D[I]=0);if(M.x>0||M.y>0){m(),x.current=E,w(S,s),v.current=M,y.current=D;return}}v.current={x:0,y:0},y.current={x:0,y:0},m()},[t,S,n,m,i,s,JSON.stringify(k),JSON.stringify(p),w,d,C,u,JSON.stringify(h)])}const Vu={x:{[Me.Backward]:!1,[Me.Forward]:!1},y:{[Me.Backward]:!1,[Me.Forward]:!1}};function Ku(e){let{delta:t,disabled:r}=e;const n=dn(t);return yr(o=>{if(r||!n||!o)return Vu;const i={x:Math.sign(t.x-n.x),y:Math.sign(t.y-n.y)};return{x:{[Me.Backward]:o.x[Me.Backward]||i.x===-1,[Me.Forward]:o.x[Me.Forward]||i.x===1},y:{[Me.Backward]:o.y[Me.Backward]||i.y===-1,[Me.Forward]:o.y[Me.Forward]||i.y===1}}},[r,t,n])}function Gu(e,t){const r=t!=null?e.get(t):void 0,n=r?r.node.current:null;return yr(o=>{var i;return t==null?null:(i=n??o)!=null?i:null},[n,t])}function Yu(e,t){return g.useMemo(()=>e.reduce((r,n)=>{const{sensor:o}=n,i=o.activators.map(s=>({eventName:s.eventName,handler:t(s.handler,n)}));return[...r,...i]},[]),[e,t])}var jr;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(jr||(jr={}));var To;(function(e){e.Optimized="optimized"})(To||(To={}));const Is=new Map;function qu(e,t){let{dragging:r,dependencies:n,config:o}=t;const[i,s]=g.useState(null),{frequency:a,measure:l,strategy:d}=o,u=g.useRef(e),f=v(),h=wr(f),p=g.useCallback(function(y){y===void 0&&(y=[]),!h.current&&s(k=>k===null?y:k.concat(y.filter(x=>!k.includes(x))))},[h]),w=g.useRef(null),m=yr(y=>{if(f&&!r)return Is;if(!y||y===Is||u.current!==e||i!=null){const k=new Map;for(let x of e){if(!x)continue;if(i&&i.length>0&&!i.includes(x.id)&&x.rect.current){k.set(x.id,x.rect.current);continue}const S=x.node.current,C=S?new yo(l(S),S):null;x.rect.current=C,C&&k.set(x.id,C)}return k}return y},[e,i,r,f,l]);return g.useEffect(()=>{u.current=e},[e]),g.useEffect(()=>{f||p()},[r,f]),g.useEffect(()=>{i&&i.length>0&&s(null)},[JSON.stringify(i)]),g.useEffect(()=>{f||typeof a!="number"||w.current!==null||(w.current=setTimeout(()=>{p(),w.current=null},a))},[a,f,p,...n]),{droppableRects:m,measureDroppableContainers:p,measuringScheduled:i!=null};function v(){switch(d){case jr.Always:return!1;case jr.BeforeDragging:return r;default:return!r}}}function Ao(e,t){return yr(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function Xu(e,t){return Ao(e,t)}function Ju(e){let{callback:t,disabled:r}=e;const n=ln(t),o=g.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:i}=window;return new i(n)},[n,r]);return g.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function gn(e){let{callback:t,disabled:r}=e;const n=ln(t),o=g.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:i}=window;return new i(n)},[r]);return g.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Zu(e){return new yo(Kt(e),e)}function Ds(e,t,r){t===void 0&&(t=Zu);const[n,o]=g.useState(null);function i(){o(l=>{if(!e)return null;if(e.isConnected===!1){var d;return(d=l??r)!=null?d:null}const u=t(e);return JSON.stringify(l)===JSON.stringify(u)?l:u})}const s=Ju({callback(l){if(e)for(const d of l){const{type:u,target:f}=d;if(u==="childList"&&f instanceof HTMLElement&&f.contains(e)){i();break}}}}),a=gn({callback:i});return et(()=>{i(),e?(a==null||a.observe(e),s==null||s.observe(document.body,{childList:!0,subtree:!0})):(a==null||a.disconnect(),s==null||s.disconnect())},[e]),n}function Qu(e){const t=Ao(e);return vs(e,t)}const _s=[];function ef(e){const t=g.useRef(e),r=yr(n=>e?n&&n!==_s&&e&&t.current&&e.parentNode===t.current.parentNode?n:hn(e):_s,[e]);return g.useEffect(()=>{t.current=e},[e]),r}function tf(e){const[t,r]=g.useState(null),n=g.useRef(e),o=g.useCallback(i=>{const s=xo(i.target);s&&r(a=>a?(a.set(s,wo(s)),new Map(a)):null)},[]);return g.useEffect(()=>{const i=n.current;if(e!==i){s(i);const a=e.map(l=>{const d=xo(l);return d?(d.addEventListener("scroll",o,{passive:!0}),[d,wo(d)]):null}).filter(l=>l!=null);r(a.length?new Map(a):null),n.current=e}return()=>{s(e),s(i)};function s(a){a.forEach(l=>{const d=xo(l);d==null||d.removeEventListener("scroll",o)})}},[o,e]),g.useMemo(()=>e.length?t?Array.from(t.values()).reduce((i,s)=>Vt(i,s),tt):js(e):tt,[e,t])}function Ms(e,t){t===void 0&&(t=[]);const r=g.useRef(null);return g.useEffect(()=>{r.current=null},t),g.useEffect(()=>{const n=e!==tt;n&&!r.current&&(r.current=e),!n&&r.current&&(r.current=null)},[e]),r.current?Sr(e,r.current):tt}function rf(e){g.useEffect(()=>{if(!an)return;const t=e.map(r=>{let{sensor:n}=r;return n.setup==null?void 0:n.setup()});return()=>{for(const r of t)r==null||r()}},e.map(t=>{let{sensor:r}=t;return r}))}function nf(e,t){return g.useMemo(()=>e.reduce((r,n)=>{let{eventName:o,handler:i}=n;return r[o]=s=>{i(s,t)},r},{}),[e,t])}function Rs(e){return g.useMemo(()=>e?Au(e):null,[e])}const Ls=[];function of(e,t){t===void 0&&(t=Kt);const[r]=e,n=Rs(r?We(r):null),[o,i]=g.useState(Ls);function s(){i(()=>e.length?e.map(l=>Cs(l)?n:new yo(t(l),l)):Ls)}const a=gn({callback:s});return et(()=>{a==null||a.disconnect(),s(),e.forEach(l=>a==null?void 0:a.observe(l))},[e]),o}function $s(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return xr(t)?t:e}function sf(e){let{measure:t}=e;const[r,n]=g.useState(null),o=g.useCallback(d=>{for(const{target:u}of d)if(xr(u)){n(f=>{const h=t(u);return f?{...f,width:h.width,height:h.height}:h});break}},[t]),i=gn({callback:o}),s=g.useCallback(d=>{const u=$s(d);i==null||i.disconnect(),u&&(i==null||i.observe(u)),n(u?t(u):null)},[t,i]),[a,l]=cn(s);return g.useMemo(()=>({nodeRef:a,rect:r,setRef:l}),[r,a,l])}const af=[{sensor:Eo,options:{}},{sensor:So,options:{}}],lf={current:{}},bn={draggable:{measure:ws},droppable:{measure:ws,strategy:jr.WhileDragging,frequency:To.Optimized},dragOverlay:{measure:Kt}};class Nr extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,n;return(r=(n=this.get(t))==null?void 0:n.node.current)!=null?r:void 0}}const cf={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Nr,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:pn},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:bn,measureDroppableContainers:pn,windowRect:null,measuringScheduled:!1},Fs={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:pn,draggableNodes:new Map,over:null,measureDroppableContainers:pn},Tr=g.createContext(Fs),Ws=g.createContext(cf);function df(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Nr}}}function uf(e,t){switch(t.type){case Ie.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Ie.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Ie.DragEnd:case Ie.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ie.RegisterDroppable:{const{element:r}=t,{id:n}=r,o=new Nr(e.droppable.containers);return o.set(n,r),{...e,droppable:{...e.droppable,containers:o}}}case Ie.SetDroppableDisabled:{const{id:r,key:n,disabled:o}=t,i=e.droppable.containers.get(r);if(!i||n!==i.key)return e;const s=new Nr(e.droppable.containers);return s.set(r,{...i,disabled:o}),{...e,droppable:{...e.droppable,containers:s}}}case Ie.UnregisterDroppable:{const{id:r,key:n}=t,o=e.droppable.containers.get(r);if(!o||n!==o.key)return e;const i=new Nr(e.droppable.containers);return i.delete(r),{...e,droppable:{...e.droppable,containers:i}}}default:return e}}function ff(e){let{disabled:t}=e;const{active:r,activatorEvent:n,draggableNodes:o}=g.useContext(Tr),i=dn(n),s=dn(r==null?void 0:r.id);return g.useEffect(()=>{if(!t&&!n&&i&&s!=null){if(!un(i)||document.activeElement===i.target)return;const a=o.get(s);if(!a)return;const{activatorNode:l,node:d}=a;if(!l.current&&!d.current)return;requestAnimationFrame(()=>{for(const u of[l.current,d.current]){if(!u)continue;const f=au(u);if(f){f.focus();break}}})}},[n,t,o,s,i]),null}function Us(e,t){let{transform:r,...n}=t;return e!=null&&e.length?e.reduce((o,i)=>i({transform:o,...n}),r):r}function pf(e){return g.useMemo(()=>({draggable:{...bn.draggable,...e==null?void 0:e.draggable},droppable:{...bn.droppable,...e==null?void 0:e.droppable},dragOverlay:{...bn.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function hf(e){let{activeNode:t,measure:r,initialRect:n,config:o=!0}=e;const i=g.useRef(!1),{x:s,y:a}=typeof o=="boolean"?{x:o,y:o}:o;et(()=>{if(!s&&!a||!t){i.current=!1;return}if(i.current||!n)return;const d=t==null?void 0:t.node.current;if(!d||d.isConnected===!1)return;const u=r(d),f=vs(u,n);if(s||(f.x=0),a||(f.y=0),i.current=!0,Math.abs(f.x)>0||Math.abs(f.y)>0){const h=ys(d);h&&h.scrollBy({top:f.y,left:f.x})}},[t,s,a,n,r])}const vn=g.createContext({...tt,scaleX:1,scaleY:1});var yt;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(yt||(yt={}));const mf=g.memo(function(t){var r,n,o,i;let{id:s,accessibility:a,autoScroll:l=!0,children:d,sensors:u=af,collisionDetection:f=Su,measuring:h,modifiers:p,...w}=t;const m=g.useReducer(uf,void 0,df),[v,y]=m,[k,x]=pu(),[S,C]=g.useState(yt.Uninitialized),E=S===yt.Initialized,{draggable:{active:N,nodes:j,translate:D},droppable:{containers:M}}=v,I=N!=null?j.get(N):null,R=g.useRef({initial:null,translated:null}),L=g.useMemo(()=>{var pe;return N!=null?{id:N,data:(pe=I==null?void 0:I.data)!=null?pe:lf,rect:R}:null},[N,I]),K=g.useRef(null),[B,W]=g.useState(null),[U,A]=g.useState(null),J=wr(w,Object.values(w)),oe=kr("DndDescribedBy",s),T=g.useMemo(()=>M.getEnabled(),[M]),F=pf(h),{droppableRects:X,measureDroppableContainers:G,measuringScheduled:ve}=qu(T,{dragging:E,dependencies:[D.x,D.y],config:F.droppable}),le=Gu(j,N),P=g.useMemo(()=>U?fn(U):null,[U]),Q=ge(),ee=Xu(le,F.draggable.measure);hf({activeNode:N!=null?j.get(N):null,config:Q.layoutShiftCompensation,initialRect:ee,measure:F.draggable.measure});const $=Ds(le,F.draggable.measure,ee),ie=Ds(le?le.parentElement:null),te=g.useRef({activatorEvent:null,active:null,activeNode:le,collisionRect:null,collisions:null,droppableRects:X,draggableNodes:j,draggingNode:null,draggingNodeRect:null,droppableContainers:M,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ke=M.getNodeFor((r=te.current.over)==null?void 0:r.id),we=sf({measure:F.dragOverlay.measure}),De=(n=we.nodeRef.current)!=null?n:le,Re=E?(o=we.rect)!=null?o:$:null,Be=!!(we.nodeRef.current&&we.rect),Ne=Qu(Be?null:$),Xe=Rs(De?We(De):null),He=ef(E?ke??le:null),Ve=of(He),gt=Us(p,{transform:{x:D.x-Ne.x,y:D.y-Ne.y,scaleX:1,scaleY:1},activatorEvent:U,active:L,activeNodeRect:$,containerNodeRect:ie,draggingNodeRect:Re,over:te.current.over,overlayNodeRect:we.rect,scrollableAncestors:He,scrollableAncestorRects:Ve,windowRect:Xe}),Tt=P?Vt(P,D):null,Qe=tf(He),cr=Ms(Qe),_=Ms(Qe,[$]),re=Vt(gt,cr),ne=Re?ju(Re,gt):null,he=L&&ne?f({active:L,collisionRect:ne,droppableRects:X,droppableContainers:T,pointerCoordinates:Tt}):null,Le=gs(he,"id"),[Ce,_e]=g.useState(null),dr=Be?gt:Vt(gt,_),Ee=Cu(dr,(i=Ce==null?void 0:Ce.rect)!=null?i:null,$),z=g.useRef(null),O=g.useCallback((pe,ue)=>{let{sensor:ze,options:it}=ue;if(K.current==null)return;const xe=j.get(K.current);if(!xe)return;const Te=pe.nativeEvent,Ke=new ze({active:K.current,activeNode:xe,event:Te,options:it,context:te,onAbort(Ae){if(!j.get(Ae))return;const{onDragAbort:ft}=J.current,bt={id:Ae};ft==null||ft(bt),k({type:"onDragAbort",event:bt})},onPending(Ae,$e,ft,bt){if(!j.get(Ae))return;const{onDragPending:Hr}=J.current,At={id:Ae,constraint:$e,initialCoordinates:ft,offset:bt};Hr==null||Hr(At),k({type:"onDragPending",event:At})},onStart(Ae){const $e=K.current;if($e==null)return;const ft=j.get($e);if(!ft)return;const{onDragStart:bt}=J.current,Br={activatorEvent:Te,active:{id:$e,data:ft.data,rect:R}};vt.unstable_batchedUpdates(()=>{bt==null||bt(Br),C(yt.Initializing),y({type:Ie.DragStart,initialCoordinates:Ae,active:$e}),k({type:"onDragStart",event:Br}),W(z.current),A(Te)})},onMove(Ae){y({type:Ie.DragMove,coordinates:Ae})},onEnd:ut(Ie.DragEnd),onCancel:ut(Ie.DragCancel)});z.current=Ke;function ut(Ae){return async function(){const{active:ft,collisions:bt,over:Br,scrollAdjustedTranslate:Hr}=te.current;let At=null;if(ft&&Hr){const{cancelDrop:Vr}=J.current;At={activatorEvent:Te,active:ft,collisions:bt,delta:Hr,over:Br},Ae===Ie.DragEnd&&typeof Vr=="function"&&await Promise.resolve(Vr(At))&&(Ae=Ie.DragCancel)}K.current=null,vt.unstable_batchedUpdates(()=>{y({type:Ae}),C(yt.Uninitialized),_e(null),W(null),A(null),z.current=null;const Vr=Ae===Ie.DragEnd?"onDragEnd":"onDragCancel";if(At){const Ai=J.current[Vr];Ai==null||Ai(At),k({type:Vr,event:At})}})}}},[j]),Y=g.useCallback((pe,ue)=>(ze,it)=>{const xe=ze.nativeEvent,Te=j.get(it);if(K.current!==null||!Te||xe.dndKit||xe.defaultPrevented)return;const Ke={active:Te};pe(ze,ue.options,Ke)===!0&&(xe.dndKit={capturedBy:ue.sensor},K.current=it,O(ze,ue))},[j,O]),q=Yu(u,Y);rf(u),et(()=>{$&&S===yt.Initializing&&C(yt.Initialized)},[$,S]),g.useEffect(()=>{const{onDragMove:pe}=J.current,{active:ue,activatorEvent:ze,collisions:it,over:xe}=te.current;if(!ue||!ze)return;const Te={active:ue,activatorEvent:ze,collisions:it,delta:{x:re.x,y:re.y},over:xe};vt.unstable_batchedUpdates(()=>{pe==null||pe(Te),k({type:"onDragMove",event:Te})})},[re.x,re.y]),g.useEffect(()=>{const{active:pe,activatorEvent:ue,collisions:ze,droppableContainers:it,scrollAdjustedTranslate:xe}=te.current;if(!pe||K.current==null||!ue||!xe)return;const{onDragOver:Te}=J.current,Ke=it.get(Le),ut=Ke&&Ke.rect.current?{id:Ke.id,rect:Ke.rect.current,data:Ke.data,disabled:Ke.disabled}:null,Ae={active:pe,activatorEvent:ue,collisions:ze,delta:{x:xe.x,y:xe.y},over:ut};vt.unstable_batchedUpdates(()=>{_e(ut),Te==null||Te(Ae),k({type:"onDragOver",event:Ae})})},[Le]),et(()=>{te.current={activatorEvent:U,active:L,activeNode:le,collisionRect:ne,collisions:he,droppableRects:X,draggableNodes:j,draggingNode:De,draggingNodeRect:Re,droppableContainers:M,over:Ce,scrollableAncestors:He,scrollAdjustedTranslate:re},R.current={initial:Re,translated:ne}},[L,le,he,ne,j,De,Re,X,M,Ce,He,re]),Hu({...Q,delta:D,draggingRect:ne,pointerCoordinates:Tt,scrollableAncestors:He,scrollableAncestorRects:Ve});const Z=g.useMemo(()=>({active:L,activeNode:le,activeNodeRect:$,activatorEvent:U,collisions:he,containerNodeRect:ie,dragOverlay:we,draggableNodes:j,droppableContainers:M,droppableRects:X,over:Ce,measureDroppableContainers:G,scrollableAncestors:He,scrollableAncestorRects:Ve,measuringConfiguration:F,measuringScheduled:ve,windowRect:Xe}),[L,le,$,U,he,ie,we,j,M,X,Ce,G,He,Ve,F,ve,Xe]),ae=g.useMemo(()=>({activatorEvent:U,activators:q,active:L,activeNodeRect:$,ariaDescribedById:{draggable:oe},dispatch:y,draggableNodes:j,over:Ce,measureDroppableContainers:G}),[U,q,L,$,y,oe,j,Ce,G]);return g.createElement(fs.Provider,{value:x},g.createElement(Tr.Provider,{value:ae},g.createElement(Ws.Provider,{value:Z},g.createElement(vn.Provider,{value:Ee},d)),g.createElement(ff,{disabled:(a==null?void 0:a.restoreFocus)===!1})),g.createElement(gu,{...a,hiddenTextDescribedById:oe}));function ge(){const pe=(B==null?void 0:B.autoScrollEnabled)===!1,ue=typeof l=="object"?l.enabled===!1:l===!1,ze=E&&!pe&&!ue;return typeof l=="object"?{...l,enabled:ze}:{enabled:ze}}}),gf=g.createContext(null),Bs="button",bf="Draggable";function vf(e){let{id:t,data:r,disabled:n=!1,attributes:o}=e;const i=kr(bf),{activators:s,activatorEvent:a,active:l,activeNodeRect:d,ariaDescribedById:u,draggableNodes:f,over:h}=g.useContext(Tr),{role:p=Bs,roleDescription:w="draggable",tabIndex:m=0}=o??{},v=(l==null?void 0:l.id)===t,y=g.useContext(v?vn:gf),[k,x]=cn(),[S,C]=cn(),E=nf(s,t),N=wr(r);et(()=>(f.set(t,{id:t,key:i,node:k,activatorNode:S,data:N}),()=>{const D=f.get(t);D&&D.key===i&&f.delete(t)}),[f,t]);const j=g.useMemo(()=>({role:p,tabIndex:m,"aria-disabled":n,"aria-pressed":v&&p===Bs?!0:void 0,"aria-roledescription":w,"aria-describedby":u.draggable}),[n,p,m,v,w,u.draggable]);return{active:l,activatorEvent:a,activeNodeRect:d,attributes:j,isDragging:v,listeners:n?void 0:E,node:k,over:h,setNodeRef:x,setActivatorNodeRef:C,transform:y}}function Hs(){return g.useContext(Ws)}const xf="Droppable",wf={timeout:25};function yf(e){let{data:t,disabled:r=!1,id:n,resizeObserverConfig:o}=e;const i=kr(xf),{active:s,dispatch:a,over:l,measureDroppableContainers:d}=g.useContext(Tr),u=g.useRef({disabled:r}),f=g.useRef(!1),h=g.useRef(null),p=g.useRef(null),{disabled:w,updateMeasurementsFor:m,timeout:v}={...wf,...o},y=wr(m??n),k=g.useCallback(()=>{if(!f.current){f.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{d(Array.isArray(y.current)?y.current:[y.current]),p.current=null},v)},[v]),x=gn({callback:k,disabled:w||!s}),S=g.useCallback((j,D)=>{x&&(D&&(x.unobserve(D),f.current=!1),j&&x.observe(j))},[x]),[C,E]=cn(S),N=wr(t);return g.useEffect(()=>{!x||!C.current||(x.disconnect(),f.current=!1,x.observe(C.current))},[C,x]),g.useEffect(()=>(a({type:Ie.RegisterDroppable,element:{id:n,key:i,disabled:r,node:C,rect:h,data:N}}),()=>a({type:Ie.UnregisterDroppable,key:i,id:n})),[n]),g.useEffect(()=>{r!==u.current.disabled&&(a({type:Ie.SetDroppableDisabled,id:n,key:i,disabled:r}),u.current.disabled=r)},[n,i,r,a]),{active:s,rect:h,isOver:(l==null?void 0:l.id)===n,node:C,over:l,setNodeRef:E}}function kf(e){let{animation:t,children:r}=e;const[n,o]=g.useState(null),[i,s]=g.useState(null),a=dn(r);return!r&&!n&&a&&o(a),et(()=>{if(!i)return;const l=n==null?void 0:n.key,d=n==null?void 0:n.props.id;if(l==null||d==null){o(null);return}Promise.resolve(t(d,i)).then(()=>{o(null)})},[t,n,i]),g.createElement(g.Fragment,null,r,n?g.cloneElement(n,{ref:s}):null)}const Sf={x:0,y:0,scaleX:1,scaleY:1};function Cf(e){let{children:t}=e;return g.createElement(Tr.Provider,{value:Fs},g.createElement(vn.Provider,{value:Sf},t))}const Ef={position:"fixed",touchAction:"none"},jf=e=>un(e)?"transform 250ms ease":void 0,Nf=g.forwardRef((e,t)=>{let{as:r,activatorEvent:n,adjustScale:o,children:i,className:s,rect:a,style:l,transform:d,transition:u=jf}=e;if(!a)return null;const f=o?d:{...d,scaleX:1,scaleY:1},h={...Ef,width:a.width,height:a.height,top:a.top,left:a.left,transform:wt.Transform.toString(f),transformOrigin:o&&n?vu(n,a):void 0,transition:typeof u=="function"?u(n):u,...l};return g.createElement(r,{className:s,style:h,ref:t},i)}),Tf={duration:250,easing:"ease",keyframes:e=>{let{transform:{initial:t,final:r}}=e;return[{transform:wt.Transform.toString(t)},{transform:wt.Transform.toString(r)}]},sideEffects:(e=>t=>{let{active:r,dragOverlay:n}=t;const o={},{styles:i,className:s}=e;if(i!=null&&i.active)for(const[a,l]of Object.entries(i.active))l!==void 0&&(o[a]=r.node.style.getPropertyValue(a),r.node.style.setProperty(a,l));if(i!=null&&i.dragOverlay)for(const[a,l]of Object.entries(i.dragOverlay))l!==void 0&&n.node.style.setProperty(a,l);return s!=null&&s.active&&r.node.classList.add(s.active),s!=null&&s.dragOverlay&&n.node.classList.add(s.dragOverlay),function(){for(const[l,d]of Object.entries(o))r.node.style.setProperty(l,d);s!=null&&s.active&&r.node.classList.remove(s.active)}})({styles:{active:{opacity:"0"}}})};function Af(e){let{config:t,draggableNodes:r,droppableContainers:n,measuringConfiguration:o}=e;return ln((i,s)=>{if(t===null)return;const a=r.get(i);if(!a)return;const l=a.node.current;if(!l)return;const d=$s(s);if(!d)return;const{transform:u}=We(s).getComputedStyle(s),f=xs(u);if(!f)return;const h=typeof t=="function"?t:zf(t);return Ns(l,o.draggable.measure),h({active:{id:i,data:a.data,node:l,rect:o.draggable.measure(l)},draggableNodes:r,dragOverlay:{node:s,rect:o.dragOverlay.measure(d)},droppableContainers:n,measuringConfiguration:o,transform:f})})}function zf(e){const{duration:t,easing:r,sideEffects:n,keyframes:o}={...Tf,...e};return i=>{let{active:s,dragOverlay:a,transform:l,...d}=i;if(!t)return;const u={x:a.rect.left-s.rect.left,y:a.rect.top-s.rect.top},f={scaleX:l.scaleX!==1?s.rect.width*l.scaleX/a.rect.width:1,scaleY:l.scaleY!==1?s.rect.height*l.scaleY/a.rect.height:1},h={x:l.x-u.x,y:l.y-u.y,...f},p=o({...d,active:s,dragOverlay:a,transform:{initial:l,final:h}}),[w]=p,m=p[p.length-1];if(JSON.stringify(w)===JSON.stringify(m))return;const v=n==null?void 0:n({active:s,dragOverlay:a,...d}),y=a.node.animate(p,{duration:t,easing:r,fill:"forwards"});return new Promise(k=>{y.onfinish=()=>{v==null||v(),k()}})}}let Vs=0;function Pf(e){return g.useMemo(()=>{if(e!=null)return Vs++,Vs},[e])}const Of=g.memo(e=>{let{adjustScale:t=!1,children:r,dropAnimation:n,style:o,transition:i,modifiers:s,wrapperElement:a="div",className:l,zIndex:d=999}=e;const{activatorEvent:u,active:f,activeNodeRect:h,containerNodeRect:p,draggableNodes:w,droppableContainers:m,dragOverlay:v,over:y,measuringConfiguration:k,scrollableAncestors:x,scrollableAncestorRects:S,windowRect:C}=Hs(),E=g.useContext(vn),N=Pf(f==null?void 0:f.id),j=Us(s,{activatorEvent:u,active:f,activeNodeRect:h,containerNodeRect:p,draggingNodeRect:v.rect,over:y,overlayNodeRect:v.rect,scrollableAncestors:x,scrollableAncestorRects:S,transform:E,windowRect:C}),D=Ao(h),M=Af({config:n,draggableNodes:w,droppableContainers:m,measuringConfiguration:k}),I=D?v.setRef:void 0;return g.createElement(Cf,null,g.createElement(kf,{animation:M},f&&N?g.createElement(Nf,{key:N,id:f.id,ref:I,as:a,activatorEvent:u,adjustScale:t,className:l,transition:i,rect:D,style:{zIndex:d,...o},transform:j},r):null))}),If=e=>{let{transform:t}=e;return{...t,x:0}};function Ks(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function Df(e,t){return e.reduce((r,n,o)=>{const i=t.get(n);return i&&(r[o]=i),r},Array(e.length))}function xn(e){return e!==null&&e>=0}function _f(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function Mf(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const Gs=e=>{let{rects:t,activeIndex:r,overIndex:n,index:o}=e;const i=Ks(t,n,r),s=t[o],a=i[o];return!a||!s?null:{x:a.left-s.left,y:a.top-s.top,scaleX:a.width/s.width,scaleY:a.height/s.height}},wn={scaleX:1,scaleY:1},Rf=e=>{var t;let{activeIndex:r,activeNodeRect:n,index:o,rects:i,overIndex:s}=e;const a=(t=i[r])!=null?t:n;if(!a)return null;if(o===r){const d=i[s];return d?{x:0,y:r<s?d.top+d.height-(a.top+a.height):d.top-a.top,...wn}:null}const l=Lf(i,o,r);return o>r&&o<=s?{x:0,y:-a.height-l,...wn}:o<r&&o>=s?{x:0,y:a.height+l,...wn}:{x:0,y:0,...wn}};function Lf(e,t,r){const n=e[t],o=e[t-1],i=e[t+1];return n?r<t?o?n.top-(o.top+o.height):i?i.top-(n.top+n.height):0:i?i.top-(n.top+n.height):o?n.top-(o.top+o.height):0:0}const Ys="Sortable",qs=g.createContext({activeIndex:-1,containerId:Ys,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Gs,disabled:{draggable:!1,droppable:!1}});function $f(e){let{children:t,id:r,items:n,strategy:o=Gs,disabled:i=!1}=e;const{active:s,dragOverlay:a,droppableRects:l,over:d,measureDroppableContainers:u}=Hs(),f=kr(Ys,r),h=a.rect!==null,p=g.useMemo(()=>n.map(E=>typeof E=="object"&&"id"in E?E.id:E),[n]),w=s!=null,m=s?p.indexOf(s.id):-1,v=d?p.indexOf(d.id):-1,y=g.useRef(p),k=!_f(p,y.current),x=v!==-1&&m===-1||k,S=Mf(i);et(()=>{k&&w&&u(p)},[k,p,w,u]),g.useEffect(()=>{y.current=p},[p]);const C=g.useMemo(()=>({activeIndex:m,containerId:f,disabled:S,disableTransforms:x,items:p,overIndex:v,useDragOverlay:h,sortedRects:Df(p,l),strategy:o}),[m,f,S.draggable,S.droppable,x,p,v,l,h,o]);return g.createElement(qs.Provider,{value:C},t)}const Ff=e=>{let{id:t,items:r,activeIndex:n,overIndex:o}=e;return Ks(r,n,o).indexOf(t)},Wf=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:o,items:i,newIndex:s,previousItems:a,previousContainerId:l,transition:d}=e;return!d||!n||a!==i&&o===s?!1:r?!0:s!==o&&t===l},Uf={duration:200,easing:"ease"},Xs="transform",Bf=wt.Transition.toString({property:Xs,duration:0,easing:"linear"}),Hf={roleDescription:"sortable"};function Vf(e){let{disabled:t,index:r,node:n,rect:o}=e;const[i,s]=g.useState(null),a=g.useRef(r);return et(()=>{if(!t&&r!==a.current&&n.current){const l=o.current;if(l){const d=Kt(n.current,{ignoreTransform:!0}),u={x:l.left-d.left,y:l.top-d.top,scaleX:l.width/d.width,scaleY:l.height/d.height};(u.x||u.y)&&s(u)}}r!==a.current&&(a.current=r)},[t,r,n,o]),g.useEffect(()=>{i&&s(null)},[i]),i}function Kf(e){let{animateLayoutChanges:t=Wf,attributes:r,disabled:n,data:o,getNewIndex:i=Ff,id:s,strategy:a,resizeObserverConfig:l,transition:d=Uf}=e;const{items:u,containerId:f,activeIndex:h,disabled:p,disableTransforms:w,sortedRects:m,overIndex:v,useDragOverlay:y,strategy:k}=g.useContext(qs),x=Gf(n,p),S=u.indexOf(s),C=g.useMemo(()=>({sortable:{containerId:f,index:S,items:u},...o}),[f,o,S,u]),E=g.useMemo(()=>u.slice(u.indexOf(s)),[u,s]),{rect:N,node:j,isOver:D,setNodeRef:M}=yf({id:s,data:C,disabled:x.droppable,resizeObserverConfig:{updateMeasurementsFor:E,...l}}),{active:I,activatorEvent:R,activeNodeRect:L,attributes:K,setNodeRef:B,listeners:W,isDragging:U,over:A,setActivatorNodeRef:J,transform:oe}=vf({id:s,data:C,attributes:{...Hf,...r},disabled:x.draggable}),T=nu(M,B),F=!!I,X=F&&!w&&xn(h)&&xn(v),G=!y&&U,ve=G&&X?oe:null,P=X?ve??(a??k)({rects:m,activeNodeRect:L,activeIndex:h,overIndex:v,index:S}):null,Q=xn(h)&&xn(v)?i({id:s,items:u,activeIndex:h,overIndex:v}):S,ee=I==null?void 0:I.id,$=g.useRef({activeId:ee,items:u,newIndex:Q,containerId:f}),ie=u!==$.current.items,te=t({active:I,containerId:f,isDragging:U,isSorting:F,id:s,index:S,items:u,newIndex:$.current.newIndex,previousItems:$.current.items,previousContainerId:$.current.containerId,transition:d,wasDragging:$.current.activeId!=null}),ke=Vf({disabled:!te,index:S,node:j,rect:N});return g.useEffect(()=>{F&&$.current.newIndex!==Q&&($.current.newIndex=Q),f!==$.current.containerId&&($.current.containerId=f),u!==$.current.items&&($.current.items=u)},[F,Q,f,u]),g.useEffect(()=>{if(ee===$.current.activeId)return;if(ee!=null&&$.current.activeId==null){$.current.activeId=ee;return}const De=setTimeout(()=>{$.current.activeId=ee},50);return()=>clearTimeout(De)},[ee]),{active:I,activeIndex:h,attributes:K,data:C,rect:N,index:S,newIndex:Q,items:u,isOver:D,isSorting:F,isDragging:U,listeners:W,node:j,overIndex:v,over:A,setNodeRef:T,setActivatorNodeRef:J,setDroppableNodeRef:M,setDraggableNodeRef:B,transform:ke??P,transition:we()};function we(){if(ke||ie&&$.current.newIndex===S)return Bf;if(!(G&&!un(R)||!d)&&(F||te))return wt.Transition.toString({...d,property:Xs})}}function Gf(e,t){var r,n;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e==null?void 0:e.draggable)!=null?r:t.draggable,droppable:(n=e==null?void 0:e.droppable)!=null?n:t.droppable}}function yn(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const Yf=[fe.Down,fe.Right,fe.Up,fe.Left],qf=(e,t)=>{let{context:{active:r,collisionRect:n,droppableRects:o,droppableContainers:i,over:s,scrollableAncestors:a}}=t;if(Yf.includes(e.code)){if(e.preventDefault(),!r||!n)return;const l=[];i.getEnabled().forEach(f=>{if(!f||f!=null&&f.disabled)return;const h=o.get(f.id);if(h)switch(e.code){case fe.Down:n.top<h.top&&l.push(f);break;case fe.Up:n.top>h.top&&l.push(f);break;case fe.Left:n.left>h.left&&l.push(f);break;case fe.Right:n.left<h.left&&l.push(f);break}});const d=yu({collisionRect:n,droppableRects:o,droppableContainers:l});let u=gs(d,"id");if(u===(s==null?void 0:s.id)&&d.length>1&&(u=d[1].id),u!=null){const f=i.get(r.id),h=i.get(u),p=h?o.get(h.id):null,w=h==null?void 0:h.node.current;if(w&&p&&f&&h){const v=hn(w).some((E,N)=>a[N]!==E),y=Js(f,h),k=Xf(f,h),x=v||!y?{x:0,y:0}:{x:k?n.width-p.width:0,y:k?n.height-p.height:0},S={x:p.left,y:p.top};return x.x&&x.y?S:Sr(S,x)}}}};function Js(e,t){return!yn(e)||!yn(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Xf(e,t){return!yn(e)||!yn(t)||!Js(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}function zo({className:e,type:t,...r}){return c.jsx("input",{type:t,className:se("h-8 rounded-lg border border-zinc-800 bg-zinc-900/50 px-2.5 py-1 text-sm outline-none transition-colors focus:ring-2 focus:ring-blue-600",e),...r})}function Jf({className:e,...t}){return c.jsx("textarea",{className:se("min-h-16 w-full rounded-lg border border-zinc-800 bg-zinc-900/50 px-2.5 py-2 text-sm outline-none transition-colors focus:ring-2 focus:ring-blue-600 resize-none",e),...t})}function Zf({className:e,checked:t,onCheckedChange:r,...n}){return c.jsx("input",{type:"checkbox",checked:t,onChange:o=>r==null?void 0:r(o.target.checked),className:se("size-4 rounded border border-zinc-700 bg-zinc-900 text-blue-600 focus:ring-2 focus:ring-blue-600",e),...n})}function It({className:e,...t}){return c.jsx("label",{className:se("text-sm font-medium leading-none select-none",e),...t})}function Zs(e,[t,r]){return Math.min(r,Math.max(t,e))}function me(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Ar(e,t=[]){let r=[];function n(i,s){const a=b.createContext(s),l=r.length;r=[...r,s];const d=f=>{var y;const{scope:h,children:p,...w}=f,m=((y=h==null?void 0:h[e])==null?void 0:y[l])||a,v=b.useMemo(()=>w,Object.values(w));return c.jsx(m.Provider,{value:v,children:p})};d.displayName=i+"Provider";function u(f,h){var m;const p=((m=h==null?void 0:h[e])==null?void 0:m[l])||a,w=b.useContext(p);if(w)return w;if(s!==void 0)return s;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[d,u]}const o=()=>{const i=r.map(s=>b.createContext(s));return function(a){const l=(a==null?void 0:a[e])||i;return b.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[n,Qf(o,...t)]}function Qf(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const s=n.reduce((a,{useScope:l,scopeName:d})=>{const f=l(i)[`__scope${d}`];return{...a,...f}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function Qs(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ea(...e){return t=>{let r=!1;const n=e.map(o=>{const i=Qs(o,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let o=0;o<n.length;o++){const i=n[o];typeof i=="function"?i():Qs(e[o],null)}}}}function je(...e){return b.useCallback(ea(...e),e)}function Gt(e){const t=tp(e),r=b.forwardRef((n,o)=>{const{children:i,...s}=n,a=b.Children.toArray(i),l=a.find(np);if(l){const d=l.props.children,u=a.map(f=>f===l?b.Children.count(d)>1?b.Children.only(null):b.isValidElement(d)?d.props.children:null:f);return c.jsx(t,{...s,ref:o,children:b.isValidElement(d)?b.cloneElement(d,void 0,u):null})}return c.jsx(t,{...s,ref:o,children:i})});return r.displayName=`${e}.Slot`,r}var ep=Gt("Slot");function tp(e){const t=b.forwardRef((r,n)=>{const{children:o,...i}=r;if(b.isValidElement(o)){const s=ip(o),a=op(i,o.props);return o.type!==b.Fragment&&(a.ref=n?ea(n,s):s),b.cloneElement(o,a)}return b.Children.count(o)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ta=Symbol("radix.slottable");function rp(e){const t=({children:r})=>c.jsx(c.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=ta,t}function np(e){return b.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ta}function op(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...a)=>{const l=i(...a);return o(...a),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}function ip(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function sp(e){const t=e+"CollectionProvider",[r,n]=Ar(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:v,children:y}=m,k=g.useRef(null),x=g.useRef(new Map).current;return c.jsx(o,{scope:v,itemMap:x,collectionRef:k,children:y})};s.displayName=t;const a=e+"CollectionSlot",l=Gt(a),d=g.forwardRef((m,v)=>{const{scope:y,children:k}=m,x=i(a,y),S=je(v,x.collectionRef);return c.jsx(l,{ref:S,children:k})});d.displayName=a;const u=e+"CollectionItemSlot",f="data-radix-collection-item",h=Gt(u),p=g.forwardRef((m,v)=>{const{scope:y,children:k,...x}=m,S=g.useRef(null),C=je(v,S),E=i(u,y);return g.useEffect(()=>(E.itemMap.set(S,{ref:S,...x}),()=>void E.itemMap.delete(S))),c.jsx(h,{[f]:"",ref:C,children:k})});p.displayName=u;function w(m){const v=i(e+"CollectionConsumer",m);return g.useCallback(()=>{const k=v.collectionRef.current;if(!k)return[];const x=Array.from(k.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((E,N)=>x.indexOf(E.ref.current)-x.indexOf(N.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:d,ItemSlot:p},w,n]}var ap=b.createContext(void 0);function lp(e){const t=b.useContext(ap);return e||t||"ltr"}var cp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Se=cp.reduce((e,t)=>{const r=Gt(`Primitive.${t}`),n=b.forwardRef((o,i)=>{const{asChild:s,...a}=o,l=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),c.jsx(l,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function dp(e,t){e&&Kr.flushSync(()=>e.dispatchEvent(t))}function Dt(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function up(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e);b.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var fp="DismissableLayer",Po="dismissableLayer.update",pp="dismissableLayer.pointerDownOutside",hp="dismissableLayer.focusOutside",ra,na=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kn=b.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:a,...l}=e,d=b.useContext(na),[u,f]=b.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=b.useState({}),w=je(t,N=>f(N)),m=Array.from(d.layers),[v]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(v),k=u?m.indexOf(u):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,S=k>=y,C=bp(N=>{const j=N.target,D=[...d.branches].some(M=>M.contains(j));!S||D||(o==null||o(N),s==null||s(N),N.defaultPrevented||a==null||a())},h),E=vp(N=>{const j=N.target;[...d.branches].some(M=>M.contains(j))||(i==null||i(N),s==null||s(N),N.defaultPrevented||a==null||a())},h);return up(N=>{k===d.layers.size-1&&(n==null||n(N),!N.defaultPrevented&&a&&(N.preventDefault(),a()))},h),b.useEffect(()=>{if(u)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(ra=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(u)),d.layers.add(u),oa(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=ra)}},[u,h,r,d]),b.useEffect(()=>()=>{u&&(d.layers.delete(u),d.layersWithOutsidePointerEventsDisabled.delete(u),oa())},[u,d]),b.useEffect(()=>{const N=()=>p({});return document.addEventListener(Po,N),()=>document.removeEventListener(Po,N)},[]),c.jsx(Se.div,{...l,ref:w,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:me(e.onFocusCapture,E.onFocusCapture),onBlurCapture:me(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:me(e.onPointerDownCapture,C.onPointerDownCapture)})});kn.displayName=fp;var mp="DismissableLayerBranch",gp=b.forwardRef((e,t)=>{const r=b.useContext(na),n=b.useRef(null),o=je(t,n);return b.useEffect(()=>{const i=n.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),c.jsx(Se.div,{...e,ref:o})});gp.displayName=mp;function bp(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e),n=b.useRef(!1),o=b.useRef(()=>{});return b.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let l=function(){ia(pp,r,d,{discrete:!0})};const d={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function vp(e,t=globalThis==null?void 0:globalThis.document){const r=Dt(e),n=b.useRef(!1);return b.useEffect(()=>{const o=i=>{i.target&&!n.current&&ia(hp,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function oa(){const e=new CustomEvent(Po);document.dispatchEvent(e)}function ia(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?dp(o,i):o.dispatchEvent(i)}var Oo=0;function sa(){b.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??aa()),document.body.insertAdjacentElement("beforeend",e[1]??aa()),Oo++,()=>{Oo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Oo--}},[])}function aa(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Io="focusScope.autoFocusOnMount",Do="focusScope.autoFocusOnUnmount",la={bubbles:!1,cancelable:!0},xp="FocusScope",_o=b.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...s}=e,[a,l]=b.useState(null),d=Dt(o),u=Dt(i),f=b.useRef(null),h=je(t,m=>l(m)),p=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(n){let m=function(x){if(p.paused||!a)return;const S=x.target;a.contains(S)?f.current=S:kt(f.current,{select:!0})},v=function(x){if(p.paused||!a)return;const S=x.relatedTarget;S!==null&&(a.contains(S)||kt(f.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const C of x)C.removedNodes.length>0&&kt(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",v);const k=new MutationObserver(y);return a&&k.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",v),k.disconnect()}}},[n,a,p.paused]),b.useEffect(()=>{if(a){ua.add(p);const m=document.activeElement;if(!a.contains(m)){const y=new CustomEvent(Io,la);a.addEventListener(Io,d),a.dispatchEvent(y),y.defaultPrevented||(wp(Ep(ca(a)),{select:!0}),document.activeElement===m&&kt(a))}return()=>{a.removeEventListener(Io,d),setTimeout(()=>{const y=new CustomEvent(Do,la);a.addEventListener(Do,u),a.dispatchEvent(y),y.defaultPrevented||kt(m??document.body,{select:!0}),a.removeEventListener(Do,u),ua.remove(p)},0)}}},[a,d,u,p]);const w=b.useCallback(m=>{if(!r&&!n||p.paused)return;const v=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,y=document.activeElement;if(v&&y){const k=m.currentTarget,[x,S]=yp(k);x&&S?!m.shiftKey&&y===S?(m.preventDefault(),r&&kt(x,{select:!0})):m.shiftKey&&y===x&&(m.preventDefault(),r&&kt(S,{select:!0})):y===k&&m.preventDefault()}},[r,n,p.paused]);return c.jsx(Se.div,{tabIndex:-1,...s,ref:h,onKeyDown:w})});_o.displayName=xp;function wp(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(kt(n,{select:t}),document.activeElement!==r)return}function yp(e){const t=ca(e),r=da(t,e),n=da(t.reverse(),e);return[r,n]}function ca(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function da(e,t){for(const r of e)if(!kp(r,{upTo:t}))return r}function kp(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Sp(e){return e instanceof HTMLInputElement&&"select"in e}function kt(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Sp(e)&&t&&e.select()}}var ua=Cp();function Cp(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=fa(e,t),e.unshift(t)},remove(t){var r;e=fa(e,t),(r=e[0])==null||r.resume()}}}function fa(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Ep(e){return e.filter(t=>t.tagName!=="A")}var Fe=globalThis!=null&&globalThis.document?b.useLayoutEffect:()=>{},jp=b[" useId ".trim().toString()]||(()=>{}),Np=0;function zr(e){const[t,r]=b.useState(jp());return Fe(()=>{r(n=>n??String(Np++))},[e]),t?`radix-${t}`:""}const Tp=["top","right","bottom","left"],St=Math.min,Ge=Math.max,Sn=Math.round,Cn=Math.floor,st=e=>({x:e,y:e}),Ap={left:"right",right:"left",bottom:"top",top:"bottom"},zp={start:"end",end:"start"};function Mo(e,t,r){return Ge(e,St(t,r))}function ht(e,t){return typeof e=="function"?e(t):e}function mt(e){return e.split("-")[0]}function Yt(e){return e.split("-")[1]}function Ro(e){return e==="x"?"y":"x"}function Lo(e){return e==="y"?"height":"width"}const Pp=new Set(["top","bottom"]);function at(e){return Pp.has(mt(e))?"y":"x"}function $o(e){return Ro(at(e))}function Op(e,t,r){r===void 0&&(r=!1);const n=Yt(e),o=$o(e),i=Lo(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=En(s)),[s,En(s)]}function Ip(e){const t=En(e);return[Fo(e),t,Fo(t)]}function Fo(e){return e.replace(/start|end/g,t=>zp[t])}const pa=["left","right"],ha=["right","left"],Dp=["top","bottom"],_p=["bottom","top"];function Mp(e,t,r){switch(e){case"top":case"bottom":return r?t?ha:pa:t?pa:ha;case"left":case"right":return t?Dp:_p;default:return[]}}function Rp(e,t,r,n){const o=Yt(e);let i=Mp(mt(e),r==="start",n);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(Fo)))),i}function En(e){return e.replace(/left|right|bottom|top/g,t=>Ap[t])}function Lp(e){return{top:0,right:0,bottom:0,left:0,...e}}function ma(e){return typeof e!="number"?Lp(e):{top:e,right:e,bottom:e,left:e}}function jn(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function ga(e,t,r){let{reference:n,floating:o}=e;const i=at(t),s=$o(t),a=Lo(s),l=mt(t),d=i==="y",u=n.x+n.width/2-o.width/2,f=n.y+n.height/2-o.height/2,h=n[a]/2-o[a]/2;let p;switch(l){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:f};break;case"left":p={x:n.x-o.width,y:f};break;default:p={x:n.x,y:n.y}}switch(Yt(t)){case"start":p[s]-=h*(r&&d?-1:1);break;case"end":p[s]+=h*(r&&d?-1:1);break}return p}async function $p(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=ht(t,e),w=ma(p),v=a[h?f==="floating"?"reference":"floating":f],y=jn(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(v)))==null||r?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:d,rootBoundary:u,strategy:l})),k=f==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},C=jn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:k,offsetParent:x,strategy:l}):k);return{top:(y.top-C.top+w.top)/S.y,bottom:(C.bottom-y.bottom+w.bottom)/S.y,left:(y.left-C.left+w.left)/S.x,right:(C.right-y.right+w.right)/S.x}}const Fp=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:s}=r,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let d=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=ga(d,n,l),h=n,p={},w=0;for(let v=0;v<a.length;v++){var m;const{name:y,fn:k}=a[v],{x,y:S,data:C,reset:E}=await k({x:u,y:f,initialPlacement:n,placement:h,strategy:o,middlewareData:p,rects:d,platform:{...s,detectOverflow:(m=s.detectOverflow)!=null?m:$p},elements:{reference:e,floating:t}});u=x??u,f=S??f,p={...p,[y]:{...p[y],...C}},E&&w<=50&&(w++,typeof E=="object"&&(E.placement&&(h=E.placement),E.rects&&(d=E.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:u,y:f}=ga(d,h,l)),v=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:p}},Wp=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:d,padding:u=0}=ht(e,t)||{};if(d==null)return{};const f=ma(u),h={x:r,y:n},p=$o(o),w=Lo(p),m=await s.getDimensions(d),v=p==="y",y=v?"top":"left",k=v?"bottom":"right",x=v?"clientHeight":"clientWidth",S=i.reference[w]+i.reference[p]-h[p]-i.floating[w],C=h[p]-i.reference[p],E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let N=E?E[x]:0;(!N||!await(s.isElement==null?void 0:s.isElement(E)))&&(N=a.floating[x]||i.floating[w]);const j=S/2-C/2,D=N/2-m[w]/2-1,M=St(f[y],D),I=St(f[k],D),R=M,L=N-m[w]-I,K=N/2-m[w]/2+j,B=Mo(R,K,L),W=!l.arrow&&Yt(o)!=null&&K!==B&&i.reference[w]/2-(K<R?M:I)-m[w]/2<0,U=W?K<R?K-R:K-L:0;return{[p]:h[p]+U,data:{[p]:B,centerOffset:K-B-U,...W&&{alignmentOffset:U}},reset:W}}}),Up=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:d}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:m=!0,...v}=ht(e,t);if((r=i.arrow)!=null&&r.alignmentOffset)return{};const y=mt(o),k=at(a),x=mt(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(d.floating)),C=h||(x||!m?[En(a)]:Ip(a)),E=w!=="none";!h&&E&&C.push(...Rp(a,m,w,S));const N=[a,...C],j=await l.detectOverflow(t,v),D=[];let M=((n=i.flip)==null?void 0:n.overflows)||[];if(u&&D.push(j[y]),f){const K=Op(o,s,S);D.push(j[K[0]],j[K[1]])}if(M=[...M,{placement:o,overflows:D}],!D.every(K=>K<=0)){var I,R;const K=(((I=i.flip)==null?void 0:I.index)||0)+1,B=N[K];if(B&&(!(f==="alignment"?k!==at(B):!1)||M.every(A=>at(A.placement)===k?A.overflows[0]>0:!0)))return{data:{index:K,overflows:M},reset:{placement:B}};let W=(R=M.filter(U=>U.overflows[0]<=0).sort((U,A)=>U.overflows[1]-A.overflows[1])[0])==null?void 0:R.placement;if(!W)switch(p){case"bestFit":{var L;const U=(L=M.filter(A=>{if(E){const J=at(A.placement);return J===k||J==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(J=>J>0).reduce((J,oe)=>J+oe,0)]).sort((A,J)=>A[1]-J[1])[0])==null?void 0:L[0];U&&(W=U);break}case"initialPlacement":W=a;break}if(o!==W)return{reset:{placement:W}}}return{}}}};function ba(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function va(e){return Tp.some(t=>e[t]>=0)}const Bp=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r,platform:n}=t,{strategy:o="referenceHidden",...i}=ht(e,t);switch(o){case"referenceHidden":{const s=await n.detectOverflow(t,{...i,elementContext:"reference"}),a=ba(s,r.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:va(a)}}}case"escaped":{const s=await n.detectOverflow(t,{...i,altBoundary:!0}),a=ba(s,r.floating);return{data:{escapedOffsets:a,escaped:va(a)}}}default:return{}}}}},xa=new Set(["left","top"]);async function Hp(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=mt(r),a=Yt(r),l=at(r)==="y",d=xa.has(s)?-1:1,u=i&&l?-1:1,f=ht(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof w=="number"&&(p=a==="end"?w*-1:w),l?{x:p*u,y:h*d}:{x:h*d,y:p*u}}const Vp=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await Hp(t,e);return s===((r=a.offset)==null?void 0:r.placement)&&(n=a.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},Kp=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o,platform:i}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x:k,y:x}=y;return{x:k,y:x}}},...d}=ht(e,t),u={x:r,y:n},f=await i.detectOverflow(t,d),h=at(mt(o)),p=Ro(h);let w=u[p],m=u[h];if(s){const y=p==="y"?"top":"left",k=p==="y"?"bottom":"right",x=w+f[y],S=w-f[k];w=Mo(x,w,S)}if(a){const y=h==="y"?"top":"left",k=h==="y"?"bottom":"right",x=m+f[y],S=m-f[k];m=Mo(x,m,S)}const v=l.fn({...t,[p]:w,[h]:m});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[p]:s,[h]:a}}}}}},Gp=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:s}=t,{offset:a=0,mainAxis:l=!0,crossAxis:d=!0}=ht(e,t),u={x:r,y:n},f=at(o),h=Ro(f);let p=u[h],w=u[f];const m=ht(a,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const x=h==="y"?"height":"width",S=i.reference[h]-i.floating[x]+v.mainAxis,C=i.reference[h]+i.reference[x]-v.mainAxis;p<S?p=S:p>C&&(p=C)}if(d){var y,k;const x=h==="y"?"width":"height",S=xa.has(mt(o)),C=i.reference[f]-i.floating[x]+(S&&((y=s.offset)==null?void 0:y[f])||0)+(S?0:v.crossAxis),E=i.reference[f]+i.reference[x]+(S?0:((k=s.offset)==null?void 0:k[f])||0)-(S?v.crossAxis:0);w<C?w=C:w>E&&(w=E)}return{[h]:p,[f]:w}}}},Yp=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...d}=ht(e,t),u=await s.detectOverflow(t,d),f=mt(o),h=Yt(o),p=at(o)==="y",{width:w,height:m}=i.floating;let v,y;f==="top"||f==="bottom"?(v=f,y=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(y=f,v=h==="end"?"top":"bottom");const k=m-u.top-u.bottom,x=w-u.left-u.right,S=St(m-u[v],k),C=St(w-u[y],x),E=!t.middlewareData.shift;let N=S,j=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(j=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(N=k),E&&!h){const M=Ge(u.left,0),I=Ge(u.right,0),R=Ge(u.top,0),L=Ge(u.bottom,0);p?j=w-2*(M!==0||I!==0?M+I:Ge(u.left,u.right)):N=m-2*(R!==0||L!==0?R+L:Ge(u.top,u.bottom))}await l({...t,availableWidth:j,availableHeight:N});const D=await s.getDimensions(a.floating);return w!==D.width||m!==D.height?{reset:{rects:!0}}:{}}}};function Nn(){return typeof window<"u"}function qt(e){return wa(e)?(e.nodeName||"").toLowerCase():"#document"}function Ye(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function lt(e){var t;return(t=(wa(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wa(e){return Nn()?e instanceof Node||e instanceof Ye(e).Node:!1}function rt(e){return Nn()?e instanceof Element||e instanceof Ye(e).Element:!1}function ct(e){return Nn()?e instanceof HTMLElement||e instanceof Ye(e).HTMLElement:!1}function ya(e){return!Nn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ye(e).ShadowRoot}const qp=new Set(["inline","contents"]);function Pr(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=nt(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!qp.has(o)}const Xp=new Set(["table","td","th"]);function Jp(e){return Xp.has(qt(e))}const Zp=[":popover-open",":modal"];function Tn(e){return Zp.some(t=>{try{return e.matches(t)}catch{return!1}})}const Qp=["transform","translate","scale","rotate","perspective"],eh=["transform","translate","scale","rotate","perspective","filter"],th=["paint","layout","strict","content"];function Wo(e){const t=Uo(),r=rt(e)?nt(e):e;return Qp.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||eh.some(n=>(r.willChange||"").includes(n))||th.some(n=>(r.contain||"").includes(n))}function rh(e){let t=Ct(e);for(;ct(t)&&!Xt(t);){if(Wo(t))return t;if(Tn(t))return null;t=Ct(t)}return null}function Uo(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const nh=new Set(["html","body","#document"]);function Xt(e){return nh.has(qt(e))}function nt(e){return Ye(e).getComputedStyle(e)}function An(e){return rt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ct(e){if(qt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ya(e)&&e.host||lt(e);return ya(t)?t.host:t}function ka(e){const t=Ct(e);return Xt(t)?e.ownerDocument?e.ownerDocument.body:e.body:ct(t)&&Pr(t)?t:ka(t)}function Or(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=ka(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),s=Ye(o);if(i){const a=Bo(s);return t.concat(s,s.visualViewport||[],Pr(o)?o:[],a&&r?Or(a):[])}return t.concat(o,Or(o,[],r))}function Bo(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Sa(e){const t=nt(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=ct(e),i=o?e.offsetWidth:r,s=o?e.offsetHeight:n,a=Sn(r)!==i||Sn(n)!==s;return a&&(r=i,n=s),{width:r,height:n,$:a}}function Ho(e){return rt(e)?e:e.contextElement}function Jt(e){const t=Ho(e);if(!ct(t))return st(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=Sa(t);let s=(i?Sn(r.width):r.width)/n,a=(i?Sn(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const oh=st(0);function Ca(e){const t=Ye(e);return!Uo()||!t.visualViewport?oh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ih(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Ye(e)?!1:t}function _t(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=Ho(e);let s=st(1);t&&(n?rt(n)&&(s=Jt(n)):s=Jt(e));const a=ih(i,r,n)?Ca(i):st(0);let l=(o.left+a.x)/s.x,d=(o.top+a.y)/s.y,u=o.width/s.x,f=o.height/s.y;if(i){const h=Ye(i),p=n&&rt(n)?Ye(n):n;let w=h,m=Bo(w);for(;m&&n&&p!==w;){const v=Jt(m),y=m.getBoundingClientRect(),k=nt(m),x=y.left+(m.clientLeft+parseFloat(k.paddingLeft))*v.x,S=y.top+(m.clientTop+parseFloat(k.paddingTop))*v.y;l*=v.x,d*=v.y,u*=v.x,f*=v.y,l+=x,d+=S,w=Ye(m),m=Bo(w)}}return jn({width:u,height:f,x:l,y:d})}function zn(e,t){const r=An(e).scrollLeft;return t?t.left+r:_t(lt(e)).left+r}function Ea(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-zn(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function sh(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i=o==="fixed",s=lt(n),a=t?Tn(t.floating):!1;if(n===s||a&&i)return r;let l={scrollLeft:0,scrollTop:0},d=st(1);const u=st(0),f=ct(n);if((f||!f&&!i)&&((qt(n)!=="body"||Pr(s))&&(l=An(n)),ct(n))){const p=_t(n);d=Jt(n),u.x=p.x+n.clientLeft,u.y=p.y+n.clientTop}const h=s&&!f&&!i?Ea(s,l):st(0);return{width:r.width*d.x,height:r.height*d.y,x:r.x*d.x-l.scrollLeft*d.x+u.x+h.x,y:r.y*d.y-l.scrollTop*d.y+u.y+h.y}}function ah(e){return Array.from(e.getClientRects())}function lh(e){const t=lt(e),r=An(e),n=e.ownerDocument.body,o=Ge(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=Ge(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+zn(e);const a=-r.scrollTop;return nt(n).direction==="rtl"&&(s+=Ge(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:a}}const ja=25;function ch(e,t){const r=Ye(e),n=lt(e),o=r.visualViewport;let i=n.clientWidth,s=n.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const u=Uo();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const d=zn(n);if(d<=0){const u=n.ownerDocument,f=u.body,h=getComputedStyle(f),p=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(n.clientWidth-f.clientWidth-p);w<=ja&&(i-=w)}else d<=ja&&(i+=d);return{width:i,height:s,x:a,y:l}}const dh=new Set(["absolute","fixed"]);function uh(e,t){const r=_t(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=ct(e)?Jt(e):st(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,d=n*i.y;return{width:s,height:a,x:l,y:d}}function Na(e,t,r){let n;if(t==="viewport")n=ch(e,r);else if(t==="document")n=lh(lt(e));else if(rt(t))n=uh(t,r);else{const o=Ca(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return jn(n)}function Ta(e,t){const r=Ct(e);return r===t||!rt(r)||Xt(r)?!1:nt(r).position==="fixed"||Ta(r,t)}function fh(e,t){const r=t.get(e);if(r)return r;let n=Or(e,[],!1).filter(a=>rt(a)&&qt(a)!=="body"),o=null;const i=nt(e).position==="fixed";let s=i?Ct(e):e;for(;rt(s)&&!Xt(s);){const a=nt(s),l=Wo(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&dh.has(o.position)||Pr(s)&&!l&&Ta(e,s))?n=n.filter(u=>u!==s):o=a,s=Ct(s)}return t.set(e,n),n}function ph(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?Tn(t)?[]:fh(t,this._c):[].concat(r),n],a=s[0],l=s.reduce((d,u)=>{const f=Na(t,u,o);return d.top=Ge(f.top,d.top),d.right=St(f.right,d.right),d.bottom=St(f.bottom,d.bottom),d.left=Ge(f.left,d.left),d},Na(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function hh(e){const{width:t,height:r}=Sa(e);return{width:t,height:r}}function mh(e,t,r){const n=ct(t),o=lt(t),i=r==="fixed",s=_t(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=st(0);function d(){l.x=zn(o)}if(n||!n&&!i)if((qt(t)!=="body"||Pr(o))&&(a=An(t)),n){const p=_t(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&d();i&&!n&&o&&d();const u=o&&!n&&!i?Ea(o,a):st(0),f=s.left+a.scrollLeft-l.x-u.x,h=s.top+a.scrollTop-l.y-u.y;return{x:f,y:h,width:s.width,height:s.height}}function Vo(e){return nt(e).position==="static"}function Aa(e,t){if(!ct(e)||nt(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return lt(e)===r&&(r=r.ownerDocument.body),r}function za(e,t){const r=Ye(e);if(Tn(e))return r;if(!ct(e)){let o=Ct(e);for(;o&&!Xt(o);){if(rt(o)&&!Vo(o))return o;o=Ct(o)}return r}let n=Aa(e,t);for(;n&&Jp(n)&&Vo(n);)n=Aa(n,t);return n&&Xt(n)&&Vo(n)&&!Wo(n)?r:n||rh(e)||r}const gh=async function(e){const t=this.getOffsetParent||za,r=this.getDimensions,n=await r(e.floating);return{reference:mh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function bh(e){return nt(e).direction==="rtl"}const vh={convertOffsetParentRelativeRectToViewportRelativeRect:sh,getDocumentElement:lt,getClippingRect:ph,getOffsetParent:za,getElementRects:gh,getClientRects:ah,getDimensions:hh,getScale:Jt,isElement:rt,isRTL:bh};function Pa(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xh(e,t){let r=null,n;const o=lt(e);function i(){var a;clearTimeout(n),(a=r)==null||a.disconnect(),r=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const d=e.getBoundingClientRect(),{left:u,top:f,width:h,height:p}=d;if(a||t(),!h||!p)return;const w=Cn(f),m=Cn(o.clientWidth-(u+h)),v=Cn(o.clientHeight-(f+p)),y=Cn(u),x={rootMargin:-w+"px "+-m+"px "+-v+"px "+-y+"px",threshold:Ge(0,St(1,l))||1};let S=!0;function C(E){const N=E[0].intersectionRatio;if(N!==l){if(!S)return s();N?s(!1,N):n=setTimeout(()=>{s(!1,1e-7)},1e3)}N===1&&!Pa(d,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(C,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(C,x)}r.observe(e)}return s(!0),i}function wh(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,d=Ho(e),u=o||i?[...d?Or(d):[],...Or(t)]:[];u.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),i&&y.addEventListener("resize",r)});const f=d&&a?xh(d,r):null;let h=-1,p=null;s&&(p=new ResizeObserver(y=>{let[k]=y;k&&k.target===d&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),r()}),d&&!l&&p.observe(d),p.observe(t));let w,m=l?_t(e):null;l&&v();function v(){const y=_t(e);m&&!Pa(m,y)&&r(),m=y,w=requestAnimationFrame(v)}return r(),()=>{var y;u.forEach(k=>{o&&k.removeEventListener("scroll",r),i&&k.removeEventListener("resize",r)}),f==null||f(),(y=p)==null||y.disconnect(),p=null,l&&cancelAnimationFrame(w)}}const yh=Vp,kh=Kp,Sh=Up,Ch=Yp,Eh=Bp,Oa=Wp,jh=Gp,Nh=(e,t,r)=>{const n=new Map,o={platform:vh,...r},i={...o.platform,_c:n};return Fp(e,t,{...o,platform:i})};var Th=typeof document<"u",Ah=function(){},Pn=Th?g.useLayoutEffect:Ah;function On(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!On(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!On(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ia(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Da(e,t){const r=Ia(e);return Math.round(t*r)/r}function Ko(e){const t=b.useRef(e);return Pn(()=>{t.current=e}),t}function zh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:l,open:d}=e,[u,f]=b.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=b.useState(n);On(h,n)||p(n);const[w,m]=b.useState(null),[v,y]=b.useState(null),k=b.useCallback(A=>{A!==E.current&&(E.current=A,m(A))},[]),x=b.useCallback(A=>{A!==N.current&&(N.current=A,y(A))},[]),S=i||w,C=s||v,E=b.useRef(null),N=b.useRef(null),j=b.useRef(u),D=l!=null,M=Ko(l),I=Ko(o),R=Ko(d),L=b.useCallback(()=>{if(!E.current||!N.current)return;const A={placement:t,strategy:r,middleware:h};I.current&&(A.platform=I.current),Nh(E.current,N.current,A).then(J=>{const oe={...J,isPositioned:R.current!==!1};K.current&&!On(j.current,oe)&&(j.current=oe,Kr.flushSync(()=>{f(oe)}))})},[h,t,r,I,R]);Pn(()=>{d===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,f(A=>({...A,isPositioned:!1})))},[d]);const K=b.useRef(!1);Pn(()=>(K.current=!0,()=>{K.current=!1}),[]),Pn(()=>{if(S&&(E.current=S),C&&(N.current=C),S&&C){if(M.current)return M.current(S,C,L);L()}},[S,C,L,M,D]);const B=b.useMemo(()=>({reference:E,floating:N,setReference:k,setFloating:x}),[k,x]),W=b.useMemo(()=>({reference:S,floating:C}),[S,C]),U=b.useMemo(()=>{const A={position:r,left:0,top:0};if(!W.floating)return A;const J=Da(W.floating,u.x),oe=Da(W.floating,u.y);return a?{...A,transform:"translate("+J+"px, "+oe+"px)",...Ia(W.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:J,top:oe}},[r,a,W.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:L,refs:B,elements:W,floatingStyles:U}),[u,L,B,W,U])}const Ph=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Oa({element:n.current,padding:o}).fn(r):{}:n?Oa({element:n,padding:o}).fn(r):{}}}},Oh=(e,t)=>({...yh(e),options:[e,t]}),Ih=(e,t)=>({...kh(e),options:[e,t]}),Dh=(e,t)=>({...jh(e),options:[e,t]}),_h=(e,t)=>({...Sh(e),options:[e,t]}),Mh=(e,t)=>({...Ch(e),options:[e,t]}),Rh=(e,t)=>({...Eh(e),options:[e,t]}),Lh=(e,t)=>({...Ph(e),options:[e,t]});var $h="Arrow",_a=b.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return c.jsx(Se.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:c.jsx("polygon",{points:"0,0 30,0 15,10"})})});_a.displayName=$h;var Fh=_a;function Wh(e){const[t,r]=b.useState(void 0);return Fe(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let s,a;if("borderBoxSize"in i){const l=i.borderBoxSize,d=Array.isArray(l)?l[0]:l;s=d.inlineSize,a=d.blockSize}else s=e.offsetWidth,a=e.offsetHeight;r({width:s,height:a})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Go="Popper",[Ma,Zt]=Ar(Go),[Uh,Ra]=Ma(Go),La=e=>{const{__scopePopper:t,children:r}=e,[n,o]=b.useState(null);return c.jsx(Uh,{scope:t,anchor:n,onAnchorChange:o,children:r})};La.displayName=Go;var $a="PopperAnchor",Fa=b.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=Ra($a,r),s=b.useRef(null),a=je(t,s),l=b.useRef(null);return b.useEffect(()=>{const d=l.current;l.current=(n==null?void 0:n.current)||s.current,d!==l.current&&i.onAnchorChange(l.current)}),n?null:c.jsx(Se.div,{...o,ref:a})});Fa.displayName=$a;var Yo="PopperContent",[Bh,Hh]=Ma(Yo),Wa=b.forwardRef((e,t)=>{var P,Q,ee,$,ie,te;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:i="center",alignOffset:s=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:w,...m}=e,v=Ra(Yo,r),[y,k]=b.useState(null),x=je(t,ke=>k(ke)),[S,C]=b.useState(null),E=Wh(S),N=(E==null?void 0:E.width)??0,j=(E==null?void 0:E.height)??0,D=n+(i!=="center"?"-"+i:""),M=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},I=Array.isArray(d)?d:[d],R=I.length>0,L={padding:M,boundary:I.filter(Kh),altBoundary:R},{refs:K,floatingStyles:B,placement:W,isPositioned:U,middlewareData:A}=zh({strategy:"fixed",placement:D,whileElementsMounted:(...ke)=>wh(...ke,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[Oh({mainAxis:o+j,alignmentAxis:s}),l&&Ih({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Dh():void 0,...L}),l&&_h({...L}),Mh({...L,apply:({elements:ke,rects:we,availableWidth:De,availableHeight:Re})=>{const{width:Be,height:Ne}=we.reference,Xe=ke.floating.style;Xe.setProperty("--radix-popper-available-width",`${De}px`),Xe.setProperty("--radix-popper-available-height",`${Re}px`),Xe.setProperty("--radix-popper-anchor-width",`${Be}px`),Xe.setProperty("--radix-popper-anchor-height",`${Ne}px`)}}),S&&Lh({element:S,padding:a}),Gh({arrowWidth:N,arrowHeight:j}),h&&Rh({strategy:"referenceHidden",...L})]}),[J,oe]=Ha(W),T=Dt(w);Fe(()=>{U&&(T==null||T())},[U,T]);const F=(P=A.arrow)==null?void 0:P.x,X=(Q=A.arrow)==null?void 0:Q.y,G=((ee=A.arrow)==null?void 0:ee.centerOffset)!==0,[ve,le]=b.useState();return Fe(()=>{y&&le(window.getComputedStyle(y).zIndex)},[y]),c.jsx("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:U?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ve,"--radix-popper-transform-origin":[($=A.transformOrigin)==null?void 0:$.x,(ie=A.transformOrigin)==null?void 0:ie.y].join(" "),...((te=A.hide)==null?void 0:te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:c.jsx(Bh,{scope:r,placedSide:J,onArrowChange:C,arrowX:F,arrowY:X,shouldHideArrow:G,children:c.jsx(Se.div,{"data-side":J,"data-align":oe,...m,ref:x,style:{...m.style,animation:U?void 0:"none"}})})})});Wa.displayName=Yo;var Ua="PopperArrow",Vh={top:"bottom",right:"left",bottom:"top",left:"right"},Ba=b.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=Hh(Ua,n),s=Vh[i.placedSide];return c.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:c.jsx(Fh,{...o,ref:r,style:{...o.style,display:"block"}})})});Ba.displayName=Ua;function Kh(e){return e!==null}var Gh=e=>({name:"transformOrigin",options:e,fn(t){var v,y,k;const{placement:r,rects:n,middlewareData:o}=t,s=((v=o.arrow)==null?void 0:v.centerOffset)!==0,a=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[d,u]=Ha(r),f={start:"0%",center:"50%",end:"100%"}[u],h=(((y=o.arrow)==null?void 0:y.x)??0)+a/2,p=(((k=o.arrow)==null?void 0:k.y)??0)+l/2;let w="",m="";return d==="bottom"?(w=s?f:`${h}px`,m=`${-l}px`):d==="top"?(w=s?f:`${h}px`,m=`${n.floating.height+l}px`):d==="right"?(w=`${-l}px`,m=s?f:`${p}px`):d==="left"&&(w=`${n.floating.width+l}px`,m=s?f:`${p}px`),{data:{x:w,y:m}}}});function Ha(e){const[t,r="center"]=e.split("-");return[t,r]}var qo=La,In=Fa,Xo=Wa,Jo=Ba,Yh="Portal",Dn=b.forwardRef((e,t)=>{var a;const{container:r,...n}=e,[o,i]=b.useState(!1);Fe(()=>i(!0),[]);const s=r||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return s?vt.createPortal(c.jsx(Se.div,{...n,ref:t}),s):null});Dn.displayName=Yh;var qh=b[" useInsertionEffect ".trim().toString()]||Fe;function _n({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,i,s]=Xh({defaultProp:t,onChange:r}),a=e!==void 0,l=a?e:o;{const u=b.useRef(e!==void 0);b.useEffect(()=>{const f=u.current;f!==a&&console.warn(`${n} is changing from ${f?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=a},[a,n])}const d=b.useCallback(u=>{var f;if(a){const h=Jh(u)?u(e):u;h!==e&&((f=s.current)==null||f.call(s,h))}else i(u)},[a,e,i,s]);return[l,d]}function Xh({defaultProp:e,onChange:t}){const[r,n]=b.useState(e),o=b.useRef(r),i=b.useRef(t);return qh(()=>{i.current=t},[t]),b.useEffect(()=>{var s;o.current!==r&&((s=i.current)==null||s.call(i,r),o.current=r)},[r,o]),[r,n,i]}function Jh(e){return typeof e=="function"}function Zh(e){const t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Va=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Qh="VisuallyHidden",Ka=b.forwardRef((e,t)=>c.jsx(Se.span,{...e,ref:t,style:{...Va,...e.style}}));Ka.displayName=Qh;var em=Ka,tm=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Qt=new WeakMap,Mn=new WeakMap,Rn={},Zo=0,Ga=function(e){return e&&(e.host||Ga(e.parentNode))},rm=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Ga(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},nm=function(e,t,r,n){var o=rm(t,Array.isArray(e)?e:[e]);Rn[r]||(Rn[r]=new WeakMap);var i=Rn[r],s=[],a=new Set,l=new Set(o),d=function(f){!f||a.has(f)||(a.add(f),d(f.parentNode))};o.forEach(d);var u=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(a.has(h))u(h);else try{var p=h.getAttribute(n),w=p!==null&&p!=="false",m=(Qt.get(h)||0)+1,v=(i.get(h)||0)+1;Qt.set(h,m),i.set(h,v),s.push(h),m===1&&w&&Mn.set(h,!0),v===1&&h.setAttribute(r,"true"),w||h.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return u(t),a.clear(),Zo++,function(){s.forEach(function(f){var h=Qt.get(f)-1,p=i.get(f)-1;Qt.set(f,h),i.set(f,p),h||(Mn.has(f)||f.removeAttribute(n),Mn.delete(f)),p||f.removeAttribute(r)}),Zo--,Zo||(Qt=new WeakMap,Qt=new WeakMap,Mn=new WeakMap,Rn={})}},Ya=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=tm(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),nm(n,o,r,"aria-hidden")):function(){return null}},dt=function(){return dt=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},dt.apply(this,arguments)};function qa(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function om(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ln="right-scroll-bar-position",$n="width-before-scroll-bar",im="with-scroll-bars-hidden",sm="--removed-body-scroll-bar-size";function Qo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function am(e,t){var r=g.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var lm=typeof window<"u"?b.useLayoutEffect:b.useEffect,Xa=new WeakMap;function cm(e,t){var r=am(null,function(n){return e.forEach(function(o){return Qo(o,n)})});return lm(function(){var n=Xa.get(r);if(n){var o=new Set(n),i=new Set(e),s=r.current;o.forEach(function(a){i.has(a)||Qo(a,null)}),i.forEach(function(a){o.has(a)||Qo(a,s)})}Xa.set(r,e)},[e]),r}function dm(e){return e}function um(e,t){t===void 0&&(t=dm);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var s=t(i,n);return r.push(s),function(){r=r.filter(function(a){return a!==s})}},assignSyncMedium:function(i){for(n=!0;r.length;){var s=r;r=[],s.forEach(i)}r={push:function(a){return i(a)},filter:function(){return r}}},assignMedium:function(i){n=!0;var s=[];if(r.length){var a=r;r=[],a.forEach(i),s=r}var l=function(){var u=s;s=[],u.forEach(i)},d=function(){return Promise.resolve().then(l)};d(),r={push:function(u){s.push(u),d()},filter:function(u){return s=s.filter(u),r}}}};return o}function fm(e){e===void 0&&(e={});var t=um(null);return t.options=dt({async:!0,ssr:!1},e),t}var Ja=function(e){var t=e.sideCar,r=qa(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return b.createElement(n,dt({},r))};Ja.isSideCarExport=!0;function pm(e,t){return e.useMedium(t),Ja}var Za=fm(),ei=function(){},Fn=b.forwardRef(function(e,t){var r=b.useRef(null),n=b.useState({onScrollCapture:ei,onWheelCapture:ei,onTouchMoveCapture:ei}),o=n[0],i=n[1],s=e.forwardProps,a=e.children,l=e.className,d=e.removeScrollBar,u=e.enabled,f=e.shards,h=e.sideCar,p=e.noRelative,w=e.noIsolation,m=e.inert,v=e.allowPinchZoom,y=e.as,k=y===void 0?"div":y,x=e.gapMode,S=qa(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=h,E=cm([r,t]),N=dt(dt({},S),o);return b.createElement(b.Fragment,null,u&&b.createElement(C,{sideCar:Za,removeScrollBar:d,shards:f,noRelative:p,noIsolation:w,inert:m,setCallbacks:i,allowPinchZoom:!!v,lockRef:r,gapMode:x}),s?b.cloneElement(b.Children.only(a),dt(dt({},N),{ref:E})):b.createElement(k,dt({},N,{className:l,ref:E}),a))});Fn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Fn.classNames={fullWidth:$n,zeroRight:Ln};var hm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function mm(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=hm();return t&&e.setAttribute("nonce",t),e}function gm(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function bm(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var vm=function(){var e=0,t=null;return{add:function(r){e==0&&(t=mm())&&(gm(t,r),bm(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},xm=function(){var e=vm();return function(t,r){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Qa=function(){var e=xm(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},wm={left:0,top:0,right:0,gap:0},ti=function(e){return parseInt(e||"",10)||0},ym=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[ti(r),ti(n),ti(o)]},km=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return wm;var t=ym(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Sm=Qa(),er="data-scroll-locked",Cm=function(e,t,r,n){var o=e.left,i=e.top,s=e.right,a=e.gap;return r===void 0&&(r="margin"),`
187
187
  .`.concat(im,` {
188
188
  overflow: hidden `).concat(n,`;
189
189
  padding-right: `).concat(a,"px ").concat(n,`;
190
190
  }
191
- body[`).concat(tr,`] {
191
+ body[`).concat(er,`] {
192
192
  overflow: hidden `).concat(n,`;
193
193
  overscroll-behavior: contain;
194
194
  `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
@@ -217,10 +217,10 @@ React keys must be passed directly to JSX without using spread:
217
217
  margin-right: 0 `).concat(n,`;
218
218
  }
219
219
 
220
- body[`).concat(tr,`] {
220
+ body[`).concat(er,`] {
221
221
  `).concat(sm,": ").concat(a,`px;
222
222
  }
223
- `)},el=function(){var e=parseInt(document.body.getAttribute(tr)||"0",10);return isFinite(e)?e:0},Em=function(){b.useEffect(function(){return document.body.setAttribute(tr,(el()+1).toString()),function(){var e=el()-1;e<=0?document.body.removeAttribute(tr):document.body.setAttribute(tr,e.toString())}},[])},jm=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Em();var i=b.useMemo(function(){return km(o)},[o]);return b.createElement(Sm,{styles:Cm(i,!t,o,r?"":"!important")})},ri=!1;if(typeof window<"u")try{var Wn=Object.defineProperty({},"passive",{get:function(){return ri=!0,!0}});window.addEventListener("test",Wn,Wn),window.removeEventListener("test",Wn,Wn)}catch{ri=!1}var rr=ri?{passive:!1}:!1,Nm=function(e){return e.tagName==="TEXTAREA"},tl=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Nm(e)&&r[t]==="visible")},Tm=function(e){return tl(e,"overflowY")},Am=function(e){return tl(e,"overflowX")},rl=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=nl(e,n);if(o){var i=ol(e,n),s=i[1],a=i[2];if(s>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},zm=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Pm=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},nl=function(e,t){return e==="v"?Tm(t):Am(t)},ol=function(e,t){return e==="v"?zm(t):Pm(t)},Om=function(e,t){return e==="h"&&t==="rtl"?-1:1},Im=function(e,t,r,n,o){var i=Om(e,window.getComputedStyle(t).direction),s=i*n,a=r.target,l=t.contains(a),d=!1,u=s>0,f=0,h=0;do{if(!a)break;var p=ol(e,a),w=p[0],m=p[1],v=p[2],y=m-v-i*w;(w||y)&&nl(e,a)&&(f+=y,h+=w);var k=a.parentNode;a=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&Math.abs(f)<1||!u&&Math.abs(h)<1)&&(d=!0),d},Un=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},il=function(e){return[e.deltaX,e.deltaY]},sl=function(e){return e&&"current"in e?e.current:e},Dm=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_m=function(e){return`
223
+ `)},el=function(){var e=parseInt(document.body.getAttribute(er)||"0",10);return isFinite(e)?e:0},Em=function(){b.useEffect(function(){return document.body.setAttribute(er,(el()+1).toString()),function(){var e=el()-1;e<=0?document.body.removeAttribute(er):document.body.setAttribute(er,e.toString())}},[])},jm=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n;Em();var i=b.useMemo(function(){return km(o)},[o]);return b.createElement(Sm,{styles:Cm(i,!t,o,r?"":"!important")})},ri=!1;if(typeof window<"u")try{var Wn=Object.defineProperty({},"passive",{get:function(){return ri=!0,!0}});window.addEventListener("test",Wn,Wn),window.removeEventListener("test",Wn,Wn)}catch{ri=!1}var tr=ri?{passive:!1}:!1,Nm=function(e){return e.tagName==="TEXTAREA"},tl=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Nm(e)&&r[t]==="visible")},Tm=function(e){return tl(e,"overflowY")},Am=function(e){return tl(e,"overflowX")},rl=function(e,t){var r=t.ownerDocument,n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var o=nl(e,n);if(o){var i=ol(e,n),s=i[1],a=i[2];if(s>a)return!0}n=n.parentNode}while(n&&n!==r.body);return!1},zm=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Pm=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},nl=function(e,t){return e==="v"?Tm(t):Am(t)},ol=function(e,t){return e==="v"?zm(t):Pm(t)},Om=function(e,t){return e==="h"&&t==="rtl"?-1:1},Im=function(e,t,r,n,o){var i=Om(e,window.getComputedStyle(t).direction),s=i*n,a=r.target,l=t.contains(a),d=!1,u=s>0,f=0,h=0;do{if(!a)break;var p=ol(e,a),w=p[0],m=p[1],v=p[2],y=m-v-i*w;(w||y)&&nl(e,a)&&(f+=y,h+=w);var k=a.parentNode;a=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&Math.abs(f)<1||!u&&Math.abs(h)<1)&&(d=!0),d},Un=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},il=function(e){return[e.deltaX,e.deltaY]},sl=function(e){return e&&"current"in e?e.current:e},Dm=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_m=function(e){return`
224
224
  .block-interactivity-`.concat(e,` {pointer-events: none;}
225
225
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
226
- `)},Mm=0,nr=[];function Rm(e){var t=b.useRef([]),r=b.useRef([0,0]),n=b.useRef(),o=b.useState(Mm++)[0],i=b.useState(Qa)[0],s=b.useRef(e);b.useEffect(function(){s.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=om([e.lockRef.current],(e.shards||[]).map(sl),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=b.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var y=Un(m),k=r.current,x="deltaX"in m?m.deltaX:k[0]-y[0],S="deltaY"in m?m.deltaY:k[1]-y[1],C,j=m.target,N=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in m&&N==="h"&&j.type==="range")return!1;var E=window.getSelection(),D=E&&E.anchorNode,R=D?D===j||D.contains(j):!1;if(R)return!1;var I=rl(N,j);if(!I)return!0;if(I?C=N:(C=N==="v"?"h":"v",I=rl(N,j)),!I)return!1;if(!n.current&&"changedTouches"in m&&(x||S)&&(n.current=C),!C)return!0;var L=n.current||C;return Im(L,v,m,L==="h"?x:S)},[]),l=b.useCallback(function(m){var v=m;if(!(!nr.length||nr[nr.length-1]!==i)){var y="deltaY"in v?il(v):Un(v),k=t.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&Dm(C.delta,y)})[0];if(k&&k.should){v.cancelable&&v.preventDefault();return}if(!k){var x=(s.current.shards||[]).map(sl).filter(Boolean).filter(function(C){return C.contains(v.target)}),S=x.length>0?a(v,x[0]):!s.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),d=b.useCallback(function(m,v,y,k){var x={name:m,delta:v,target:y,should:k,shadowParent:Lm(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),u=b.useCallback(function(m){r.current=Un(m),n.current=void 0},[]),f=b.useCallback(function(m){d(m.type,il(m),m.target,a(m,e.lockRef.current))},[]),h=b.useCallback(function(m){d(m.type,Un(m),m.target,a(m,e.lockRef.current))},[]);b.useEffect(function(){return nr.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,rr),document.addEventListener("touchmove",l,rr),document.addEventListener("touchstart",u,rr),function(){nr=nr.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,rr),document.removeEventListener("touchmove",l,rr),document.removeEventListener("touchstart",u,rr)}},[]);var p=e.removeScrollBar,w=e.inert;return b.createElement(b.Fragment,null,w?b.createElement(i,{styles:_m(o)}):null,p?b.createElement(jm,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Lm(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const $m=pm(Za,Rm);var ni=b.forwardRef(function(e,t){return b.createElement(Fn,lt({},e,{ref:t,sideCar:$m}))});ni.classNames=Fn.classNames;var Fm=[" ","Enter","ArrowUp","ArrowDown"],Wm=[" ","Enter"],Mt="Select",[Bn,Hn,Um]=sp(Mt),[or]=Tr(Mt,[Um,Qt]),Vn=Qt(),[Bm,St]=or(Mt),[Hm,Vm]=or(Mt),al=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:i,value:s,defaultValue:a,onValueChange:l,dir:d,name:u,autoComplete:f,disabled:h,required:p,form:w}=e,m=Vn(t),[v,y]=b.useState(null),[k,x]=b.useState(null),[S,C]=b.useState(!1),j=lp(d),[N,E]=_n({prop:n,defaultProp:o??!1,onChange:i,caller:Mt}),[D,R]=_n({prop:s,defaultProp:a,onChange:l,caller:Mt}),I=b.useRef(null),L=v?w||!!v.closest("form"):!0,[_,G]=b.useState(new Set),B=Array.from(_).map(F=>F.props.value).join(";");return c.jsx(qo,{...m,children:c.jsxs(Bm,{required:p,scope:t,trigger:v,onTriggerChange:y,valueNode:k,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:Ar(),value:D,onValueChange:R,open:N,onOpenChange:E,dir:j,triggerPointerDownPosRef:I,disabled:h,children:[c.jsx(Bn.Provider,{scope:t,children:c.jsx(Hm,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(F=>{G(U=>new Set(U).add(F))},[]),onNativeOptionRemove:b.useCallback(F=>{G(U=>{const z=new Set(U);return z.delete(F),z})},[]),children:r})}),L?c.jsxs(Nl,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:f,value:D,onChange:F=>R(F.target.value),disabled:h,form:w,children:[D===void 0?c.jsx("option",{value:""}):null,Array.from(_)]},B):null]})})};al.displayName=Mt;var ll="SelectTrigger",cl=b.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,i=Vn(r),s=St(ll,r),a=s.disabled||n,l=Ee(t,s.onTriggerChange),d=Hn(r),u=b.useRef("touch"),[f,h,p]=Al(m=>{const v=d().filter(x=>!x.disabled),y=v.find(x=>x.value===s.value),k=zl(v,m,y);k!==void 0&&s.onValueChange(k.value)}),w=m=>{a||(s.onOpenChange(!0),p()),m&&(s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return c.jsx(In,{asChild:!0,...i,children:c.jsx(ke.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Tl(s.value)?"":void 0,...o,ref:l,onClick:he(o.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&w(m)}),onPointerDown:he(o.onPointerDown,m=>{u.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(w(m),m.preventDefault())}),onKeyDown:he(o.onKeyDown,m=>{const v=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(v&&m.key===" ")&&Fm.includes(m.key)&&(w(),m.preventDefault())})})})});cl.displayName=ll;var dl="SelectValue",ul=b.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:s="",...a}=e,l=St(dl,r),{onValueNodeHasChildrenChange:d}=l,u=i!==void 0,f=Ee(t,l.onValueNodeChange);return Re(()=>{d(u)},[d,u]),c.jsx(ke.span,{...a,ref:f,style:{pointerEvents:"none"},children:Tl(l.value)?c.jsx(c.Fragment,{children:s}):i})});ul.displayName=dl;var Km="SelectIcon",fl=b.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return c.jsx(ke.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});fl.displayName=Km;var Gm="SelectPortal",pl=e=>c.jsx(Dn,{asChild:!0,...e});pl.displayName=Gm;var Rt="SelectContent",hl=b.forwardRef((e,t)=>{const r=St(Rt,e.__scopeSelect),[n,o]=b.useState();if(Re(()=>{o(new DocumentFragment)},[]),!r.open){const i=n;return i?Kr.createPortal(c.jsx(ml,{scope:e.__scopeSelect,children:c.jsx(Bn.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),i):null}return c.jsx(gl,{...e,ref:t})});hl.displayName=Rt;var nt=10,[ml,Ct]=or(Rt),Ym="SelectContentImpl",qm=Yt("SelectContent.RemoveScroll"),gl=b.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:a,sideOffset:l,align:d,alignOffset:u,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:w,hideWhenDetached:m,avoidCollisions:v,...y}=e,k=St(Rt,r),[x,S]=b.useState(null),[C,j]=b.useState(null),N=Ee(t,P=>S(P)),[E,D]=b.useState(null),[R,I]=b.useState(null),L=Hn(r),[_,G]=b.useState(!1),B=b.useRef(!1);b.useEffect(()=>{if(x)return Ya(x)},[x]),sa();const F=b.useCallback(P=>{const[J,...ee]=L().map(te=>te.ref.current),[W]=ee.slice(-1),ne=document.activeElement;for(const te of P)if(te===ne||(te==null||te.scrollIntoView({block:"nearest"}),te===J&&C&&(C.scrollTop=0),te===W&&C&&(C.scrollTop=C.scrollHeight),te==null||te.focus(),document.activeElement!==ne))return},[L,C]),U=b.useCallback(()=>F([E,x]),[F,E,x]);b.useEffect(()=>{_&&U()},[_,U]);const{onOpenChange:z,triggerPointerDownPosRef:X}=k;b.useEffect(()=>{if(x){let P={x:0,y:0};const J=W=>{var ne,te;P={x:Math.abs(Math.round(W.pageX)-(((ne=X.current)==null?void 0:ne.x)??0)),y:Math.abs(Math.round(W.pageY)-(((te=X.current)==null?void 0:te.y)??0))}},ee=W=>{P.x<=10&&P.y<=10?W.preventDefault():x.contains(W.target)||z(!1),document.removeEventListener("pointermove",J),X.current=null};return X.current!==null&&(document.addEventListener("pointermove",J),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",ee,{capture:!0})}}},[x,z,X]),b.useEffect(()=>{const P=()=>z(!1);return window.addEventListener("blur",P),window.addEventListener("resize",P),()=>{window.removeEventListener("blur",P),window.removeEventListener("resize",P)}},[z]);const[re,T]=Al(P=>{const J=L().filter(ne=>!ne.disabled),ee=J.find(ne=>ne.ref.current===document.activeElement),W=zl(J,P,ee);W&&setTimeout(()=>W.ref.current.focus())}),$=b.useCallback((P,J,ee)=>{const W=!B.current&&!ee;(k.value!==void 0&&k.value===J||W)&&(D(P),W&&(B.current=!0))},[k.value]),Y=b.useCallback(()=>x==null?void 0:x.focus(),[x]),K=b.useCallback((P,J,ee)=>{const W=!B.current&&!ee;(k.value!==void 0&&k.value===J||W)&&I(P)},[k.value]),ge=n==="popper"?oi:bl,se=ge===oi?{side:a,sideOffset:l,align:d,alignOffset:u,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:w,hideWhenDetached:m,avoidCollisions:v}:{};return c.jsx(ml,{scope:r,content:x,viewport:C,onViewportChange:j,itemRefCallback:$,selectedItem:E,onItemLeave:Y,itemTextRefCallback:K,focusSelectedItem:U,selectedItemText:R,position:n,isPositioned:_,searchRef:re,children:c.jsx(ni,{as:qm,allowPinchZoom:!0,children:c.jsx(_o,{asChild:!0,trapped:k.open,onMountAutoFocus:P=>{P.preventDefault()},onUnmountAutoFocus:he(o,P=>{var J;(J=k.trigger)==null||J.focus({preventScroll:!0}),P.preventDefault()}),children:c.jsx(kn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:P=>P.preventDefault(),onDismiss:()=>k.onOpenChange(!1),children:c.jsx(ge,{role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:P=>P.preventDefault(),...y,...se,onPlaced:()=>G(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:he(y.onKeyDown,P=>{const J=P.ctrlKey||P.altKey||P.metaKey;if(P.key==="Tab"&&P.preventDefault(),!J&&P.key.length===1&&T(P.key),["ArrowUp","ArrowDown","Home","End"].includes(P.key)){let W=L().filter(ne=>!ne.disabled).map(ne=>ne.ref.current);if(["ArrowUp","End"].includes(P.key)&&(W=W.slice().reverse()),["ArrowUp","ArrowDown"].includes(P.key)){const ne=P.target,te=W.indexOf(ne);W=W.slice(te+1)}setTimeout(()=>F(W)),P.preventDefault()}})})})})})})});gl.displayName=Ym;var Xm="SelectItemAlignedPosition",bl=b.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,i=St(Rt,r),s=Ct(Rt,r),[a,l]=b.useState(null),[d,u]=b.useState(null),f=Ee(t,N=>u(N)),h=Hn(r),p=b.useRef(!1),w=b.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:y,focusSelectedItem:k}=s,x=b.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&d&&m&&v&&y){const N=i.trigger.getBoundingClientRect(),E=d.getBoundingClientRect(),D=i.valueNode.getBoundingClientRect(),R=y.getBoundingClientRect();if(i.dir!=="rtl"){const ne=R.left-E.left,te=D.left-ne,we=N.left-te,be=N.width+we,Pe=Math.max(be,E.width),De=window.innerWidth-nt,Ue=Zs(te,[nt,Math.max(nt,De-Pe)]);a.style.minWidth=be+"px",a.style.left=Ue+"px"}else{const ne=E.right-R.right,te=window.innerWidth-D.right-ne,we=window.innerWidth-N.right-te,be=N.width+we,Pe=Math.max(be,E.width),De=window.innerWidth-nt,Ue=Zs(te,[nt,Math.max(nt,De-Pe)]);a.style.minWidth=be+"px",a.style.right=Ue+"px"}const I=h(),L=window.innerHeight-nt*2,_=m.scrollHeight,G=window.getComputedStyle(d),B=parseInt(G.borderTopWidth,10),F=parseInt(G.paddingTop,10),U=parseInt(G.borderBottomWidth,10),z=parseInt(G.paddingBottom,10),X=B+F+_+z+U,re=Math.min(v.offsetHeight*5,X),T=window.getComputedStyle(m),$=parseInt(T.paddingTop,10),Y=parseInt(T.paddingBottom,10),K=N.top+N.height/2-nt,ge=L-K,se=v.offsetHeight/2,P=v.offsetTop+se,J=B+F+P,ee=X-J;if(J<=K){const ne=I.length>0&&v===I[I.length-1].ref.current;a.style.bottom="0px";const te=d.clientHeight-m.offsetTop-m.offsetHeight,we=Math.max(ge,se+(ne?Y:0)+te+U),be=J+we;a.style.height=be+"px"}else{const ne=I.length>0&&v===I[0].ref.current;a.style.top="0px";const we=Math.max(K,B+m.offsetTop+(ne?$:0)+se)+ee;a.style.height=we+"px",m.scrollTop=J-K+m.offsetTop}a.style.margin=`${nt}px 0`,a.style.minHeight=re+"px",a.style.maxHeight=L+"px",n==null||n(),requestAnimationFrame(()=>p.current=!0)}},[h,i.trigger,i.valueNode,a,d,m,v,y,i.dir,n]);Re(()=>x(),[x]);const[S,C]=b.useState();Re(()=>{d&&C(window.getComputedStyle(d).zIndex)},[d]);const j=b.useCallback(N=>{N&&w.current===!0&&(x(),k==null||k(),w.current=!1)},[x,k]);return c.jsx(Zm,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:j,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:c.jsx(ke.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});bl.displayName=Xm;var Jm="SelectPopperPosition",oi=b.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=nt,...i}=e,s=Vn(r);return c.jsx(Xo,{...s,...i,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});oi.displayName=Jm;var[Zm,ii]=or(Rt,{}),si="SelectViewport",vl=b.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,i=Ct(si,r),s=ii(si,r),a=Ee(t,i.onViewportChange),l=b.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),c.jsx(Bn.Slot,{scope:r,children:c.jsx(ke.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:he(o.onScroll,d=>{const u=d.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&f){const p=Math.abs(l.current-u.scrollTop);if(p>0){const w=window.innerHeight-nt*2,m=parseFloat(f.style.minHeight),v=parseFloat(f.style.height),y=Math.max(m,v);if(y<w){const k=y+p,x=Math.min(w,k),S=k-x;f.style.height=x+"px",f.style.bottom==="0px"&&(u.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});vl.displayName=si;var xl="SelectGroup",[Qm,eg]=or(xl),tg=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Ar();return c.jsx(Qm,{scope:r,id:o,children:c.jsx(ke.div,{role:"group","aria-labelledby":o,...n,ref:t})})});tg.displayName=xl;var wl="SelectLabel",rg=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=eg(wl,r);return c.jsx(ke.div,{id:o.id,...n,ref:t})});rg.displayName=wl;var Kn="SelectItem",[ng,yl]=or(Kn),kl=b.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:i,...s}=e,a=St(Kn,r),l=Ct(Kn,r),d=a.value===n,[u,f]=b.useState(i??""),[h,p]=b.useState(!1),w=Ee(t,k=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,k,n,o)}),m=Ar(),v=b.useRef("touch"),y=()=>{o||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(ng,{scope:r,value:n,disabled:o,textId:m,isSelected:d,onItemTextChange:b.useCallback(k=>{f(x=>x||((k==null?void 0:k.textContent)??"").trim())},[]),children:c.jsx(Bn.ItemSlot,{scope:r,value:n,disabled:o,textValue:u,children:c.jsx(ke.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:w,onFocus:he(s.onFocus,()=>p(!0)),onBlur:he(s.onBlur,()=>p(!1)),onClick:he(s.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:he(s.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:he(s.onPointerDown,k=>{v.current=k.pointerType}),onPointerMove:he(s.onPointerMove,k=>{var x;v.current=k.pointerType,o?(x=l.onItemLeave)==null||x.call(l):v.current==="mouse"&&k.currentTarget.focus({preventScroll:!0})}),onPointerLeave:he(s.onPointerLeave,k=>{var x;k.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:he(s.onKeyDown,k=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&k.key===" "||(Wm.includes(k.key)&&y(),k.key===" "&&k.preventDefault())})})})})});kl.displayName=Kn;var Or="SelectItemText",Sl=b.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...i}=e,s=St(Or,r),a=Ct(Or,r),l=yl(Or,r),d=Vm(Or,r),[u,f]=b.useState(null),h=Ee(t,y=>f(y),l.onItemTextChange,y=>{var k;return(k=a.itemTextRefCallback)==null?void 0:k.call(a,y,l.value,l.disabled)}),p=u==null?void 0:u.textContent,w=b.useMemo(()=>c.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=d;return Re(()=>(m(w),()=>v(w)),[m,v,w]),c.jsxs(c.Fragment,{children:[c.jsx(ke.span,{id:l.textId,...i,ref:h}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Kr.createPortal(i.children,s.valueNode):null]})});Sl.displayName=Or;var Cl="SelectItemIndicator",El=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return yl(Cl,r).isSelected?c.jsx(ke.span,{"aria-hidden":!0,...n,ref:t}):null});El.displayName=Cl;var ai="SelectScrollUpButton",og=b.forwardRef((e,t)=>{const r=Ct(ai,e.__scopeSelect),n=ii(ai,e.__scopeSelect),[o,i]=b.useState(!1),s=Ee(t,n.onScrollButtonChange);return Re(()=>{if(r.viewport&&r.isPositioned){let a=function(){const d=l.scrollTop>0;i(d)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),o?c.jsx(jl,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});og.displayName=ai;var li="SelectScrollDownButton",ig=b.forwardRef((e,t)=>{const r=Ct(li,e.__scopeSelect),n=ii(li,e.__scopeSelect),[o,i]=b.useState(!1),s=Ee(t,n.onScrollButtonChange);return Re(()=>{if(r.viewport&&r.isPositioned){let a=function(){const d=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<d;i(u)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),o?c.jsx(jl,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});ig.displayName=li;var jl=b.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,i=Ct("SelectScrollButton",r),s=b.useRef(null),a=Hn(r),l=b.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return b.useEffect(()=>()=>l(),[l]),Re(()=>{var u;const d=a().find(f=>f.ref.current===document.activeElement);(u=d==null?void 0:d.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),c.jsx(ke.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:he(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(n,50))}),onPointerMove:he(o.onPointerMove,()=>{var d;(d=i.onItemLeave)==null||d.call(i),s.current===null&&(s.current=window.setInterval(n,50))}),onPointerLeave:he(o.onPointerLeave,()=>{l()})})}),sg="SelectSeparator",ag=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return c.jsx(ke.div,{"aria-hidden":!0,...n,ref:t})});ag.displayName=sg;var ci="SelectArrow",lg=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Vn(r),i=St(ci,r),s=Ct(ci,r);return i.open&&s.position==="popper"?c.jsx(Jo,{...o,...n,ref:t}):null});lg.displayName=ci;var cg="SelectBubbleInput",Nl=b.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=b.useRef(null),i=Ee(n,o),s=Zh(t);return b.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&u){const f=new Event("change",{bubbles:!0});u.call(a,t),a.dispatchEvent(f)}},[s,t]),c.jsx(ke.select,{...r,style:{...Va,...r.style},ref:i,defaultValue:t})});Nl.displayName=cg;function Tl(e){return e===""||e===void 0}function Al(e){const t=Dt(e),r=b.useRef(""),n=b.useRef(0),o=b.useCallback(s=>{const a=r.current+s;t(a),(function l(d){r.current=d,window.clearTimeout(n.current),d!==""&&(n.current=window.setTimeout(()=>l(""),1e3))})(a)},[t]),i=b.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,i]}function zl(e,t,r){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let s=dg(e,Math.max(i,0));o.length===1&&(s=s.filter(d=>d!==r));const l=s.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function dg(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var ug=al,Pl=cl,fg=ul,pg=fl,hg=pl,Ol=hl,mg=vl,Il=kl,gg=Sl,bg=El;const vg=ug,xg=fg,Dl=b.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(Pl,{ref:n,className:oe("flex h-8 w-full items-center justify-between gap-2 rounded-md border border-zinc-800 bg-black px-3 py-1.5 text-left text-xs font-medium text-white outline-none","hover:bg-zinc-900 focus-visible:ring-2 focus-visible:ring-blue-500/80 focus-visible:ring-inset focus-visible:border-zinc-600","disabled:pointer-events-none disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:flex [&>span]:items-center [&>span]:gap-2",e),style:{boxShadow:"none",WebkitBoxShadow:"none",MozBoxShadow:"none"},...r,children:[t,c.jsx(pg,{asChild:!0,children:c.jsx(Zr,{className:"h-3 w-3 shrink-0 text-zinc-400",strokeWidth:2})})]}));Dl.displayName=Pl.displayName;const _l=b.forwardRef(({className:e,children:t,position:r="popper",...n},o)=>c.jsx(hg,{children:c.jsx(Ol,{ref:o,className:oe("relative z-[9999] max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-zinc-800 bg-zinc-950 text-white shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:c.jsx(mg,{className:oe("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));_l.displayName=Ol.displayName;const Ml=b.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(Il,{ref:n,className:oe("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-xs outline-none","focus:bg-zinc-800 focus:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(bg,{children:c.jsx(lo,{className:"h-3 w-3",strokeWidth:2})})}),c.jsx(gg,{children:t})]}));Ml.displayName=Il.displayName;const Rl=b.createContext(null);function Ll(){const e=b.useContext(Rl);if(!e)throw new Error("Dialog components must be used within Dialog");return e}function $l({open:e,onOpenChange:t,children:r}){const[n,o]=b.useState(!1),i=e!==void 0,s=i?e:n,a=b.useCallback(d=>{i||o(d),t==null||t(d)},[i,t]),l=b.useMemo(()=>({open:s,onOpenChange:a}),[s,a]);return c.jsx(Rl.Provider,{value:l,children:r})}function wg({asChild:e,children:t}){const{onOpenChange:r}=Ll(),n=b.Children.only(t);return e&&b.isValidElement(n)?b.cloneElement(n,{onClick:o=>{var i,s;(s=(i=n.props).onClick)==null||s.call(i,o),r(!0)}}):c.jsx("button",{type:"button",onClick:()=>r(!0),children:t})}function Fl({className:e,children:t,preventCloseOnBackdropClick:r,...n}){const{open:o,onOpenChange:i}=Ll();if(b.useEffect(()=>{const a=l=>{l.key==="Escape"&&i(!1)};return o&&(document.addEventListener("keydown",a),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",a),document.body.style.overflow=""}},[o,i]),!o)return null;const s=a=>{a.preventDefault(),a.stopPropagation()};return gt.createPortal(c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-[9998] bg-black/60","aria-hidden":!0,onClick:()=>!r&&i(!1),onDragOver:s,onDrop:s}),c.jsx("div",{role:"dialog","aria-modal":!0,className:oe("fixed left-1/2 top-1/2 z-[9999] w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-lg border border-zinc-700 bg-zinc-900 p-4 shadow-xl",e),onClick:a=>a.stopPropagation(),...n,children:t})]}),document.body)}function Wl({className:e,...t}){return c.jsx("div",{className:oe("flex flex-col gap-1.5 pb-4",e),...t})}function yg({className:e,...t}){return c.jsx("div",{className:oe("flex justify-end gap-2 pt-4",e),...t})}function Ul({className:e,...t}){return c.jsx("h2",{className:oe("text-sm font-semibold text-white",e),...t})}function Bl({className:e,...t}){return c.jsx("p",{className:oe("text-xs text-zinc-400",e),...t})}const Ye=b.forwardRef(({className:e,variant:t="default",size:r="default",asChild:n=!1,...o},i)=>{const s="inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:shrink-0 cursor-pointer",a={default:"bg-primary text-primary-foreground shadow-lg shadow-primary/20 hover:bg-primary/90",outline:"border border-zinc-700 bg-zinc-900 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600",ghost:"text-zinc-500 hover:text-zinc-200 hover:bg-zinc-800",destructive:"bg-destructive/15 text-destructive hover:bg-destructive/25"},l={sm:"h-7 px-2.5 text-[11px]",default:"h-8 px-3 py-1.5 text-xs",lg:"h-9 px-5 text-sm",icon:"h-8 w-8","icon-sm":"h-7 w-7","icon-xs":"h-6 w-6"},d=n?ep:"button";return c.jsx(d,{ref:i,type:"button",className:oe(s,a[t],l[r],e),...o})});Ye.displayName="Button";const kg=["library","upload","url"];function Sg({library:e,selectedId:t,onSelect:r}){const[n,o]=g.useState(""),[i,s]=g.useState("all"),a=["all",...new Set(e.flatMap(d=>d.tags??[]))],l=e.filter(d=>{const u=i==="all"||(d.tags??[]).includes(i),f=!n||(d.alt??"").toLowerCase().includes(n.toLowerCase());return u&&f});return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"relative",children:[c.jsx(Fd,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-zinc-600 pointer-events-none"}),c.jsx(zo,{value:n,onChange:d=>o(d.target.value),placeholder:"Cerca immagini...",className:"pl-9 h-8 text-xs bg-zinc-900/50 border-zinc-800"})]}),c.jsx("div",{className:"flex flex-wrap gap-1.5",children:a.map(d=>c.jsx("button",{type:"button",onClick:()=>s(d),className:oe("px-2.5 py-1 rounded text-[10px] font-medium border transition-colors",i===d?"border-blue-500 bg-blue-500/20 text-blue-400":"border-zinc-700 text-zinc-500 hover:border-zinc-600 hover:text-zinc-400"),children:d==="all"?"Tutte":d},d))}),l.length>0?c.jsx("div",{className:"grid grid-cols-3 gap-2.5 max-h-[45vh] overflow-y-auto",children:l.map(d=>{const u=t===d.id;return c.jsxs("button",{type:"button",onClick:()=>r(u?null:d.id),className:oe("group relative aspect-[4/3] rounded-lg overflow-hidden","ring-1 transition-all duration-150",u?"ring-blue-500 ring-2 ring-offset-1 ring-offset-zinc-900":"ring-zinc-800 hover:ring-zinc-600 hover:scale-[1.02]"),children:[c.jsx("img",{src:d.url,alt:d.alt,loading:"lazy",className:oe("w-full h-full object-cover transition-[filter] duration-150",u?"brightness-[0.6]":"brightness-[0.85] group-hover:brightness-100")}),c.jsx("div",{className:oe("absolute inset-x-0 bottom-0 px-2 py-1.5","bg-gradient-to-t from-black/70 to-transparent","opacity-0 group-hover:opacity-100 transition-opacity",u&&"opacity-100"),children:c.jsx("span",{className:"text-[10px] text-white font-medium leading-tight line-clamp-2",children:d.alt})}),u&&c.jsx("div",{className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-blue-600 flex items-center justify-center",children:c.jsx(lo,{size:14,className:"text-white"})})]},d.id)})}):c.jsx("div",{className:"text-center py-12 text-zinc-600 text-xs",children:"Nessuna immagine in libreria. Configura assets.assetsManifest nel tenant (es. da public/assets)."})]})}function Cg({preview:e,onPreviewChange:t,onAssetUpload:r}){const[n,o]=g.useState(!1),i=g.useRef(null),s=g.useCallback(async u=>{if(fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:handleFile",message:"handleFile called",data:{fileName:u.name,hasOnAssetUpload:!!r},timestamp:Date.now(),hypothesisId:"H5"})}).catch(()=>{}),!u.type.startsWith("image/"))return;if(r){try{const h=await r(u);fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:handleFile",message:"onAssetUpload resolved",data:{url:h==null?void 0:h.slice(0,50)},timestamp:Date.now(),hypothesisId:"H2,H5"})}).catch(()=>{}),t({name:u.name,size:u.size,dataUrl:h})}catch{const h=new FileReader;h.onload=p=>{var w;t({name:u.name,size:u.size,dataUrl:(w=p.target)==null?void 0:w.result})},h.readAsDataURL(u)}return}const f=new FileReader;f.onload=h=>{var p;t({name:u.name,size:u.size,dataUrl:(p=h.target)==null?void 0:p.result})},f.readAsDataURL(u)},[t,r]),a=g.useCallback(u=>{var h,p;u.preventDefault(),u.stopPropagation(),o(!1);const f=(p=(h=u.dataTransfer)==null?void 0:h.files)==null?void 0:p[0];f&&s(f)},[s]),l=g.useCallback(u=>{u.preventDefault(),u.stopPropagation(),o(!0)},[]),d=g.useCallback(u=>{var h;const f=(h=u.target.files)==null?void 0:h[0];f&&s(f)},[s]);return c.jsxs("div",{onDragOver:l,onDragEnter:l,onDragLeave:u=>{u.preventDefault(),u.stopPropagation(),o(!1)},onDrop:a,onClick:()=>{var u;return!e&&((u=i.current)==null?void 0:u.click())},className:oe("rounded-xl border-2 border-dashed transition-all min-h-[240px]","flex flex-col items-center justify-center overflow-hidden cursor-pointer relative",n?"border-blue-500/50 bg-blue-500/[0.04]":e?"border-zinc-800 bg-transparent cursor-default":"border-zinc-800 bg-white/[0.01] hover:border-zinc-600 hover:bg-white/[0.02]"),children:[e?c.jsxs(c.Fragment,{children:[c.jsx("img",{src:e.dataUrl,alt:"Upload preview",className:"w-full max-h-[320px] object-contain"}),c.jsxs("div",{className:"absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/80 to-transparent p-4 flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-xs font-medium text-white",children:e.name}),c.jsxs("p",{className:"text-[10px] text-zinc-400",children:[(e.size/1024).toFixed(1)," KB"]})]}),c.jsx(Ye,{type:"button",variant:"ghost",className:"text-zinc-400 hover:text-red-400 hover:bg-red-500/10 h-8 w-8 p-0",onClick:u=>{u.stopPropagation(),t(null)},children:c.jsx(en,{size:14})})]})]}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/10 flex items-center justify-center text-blue-500 mb-3",children:c.jsx(as,{size:22})}),c.jsx("p",{className:"text-sm font-medium text-white mb-1",children:"Trascina un'immagine qui"}),c.jsx("p",{className:"text-[11px] text-zinc-500 mb-3",children:"oppure clicca per selezionare un file"}),c.jsx("span",{className:"text-[10px] text-zinc-600 bg-white/[0.03] px-3 py-1 rounded",children:"PNG, JPG, WebP — max 5MB"})]}),c.jsx("input",{ref:i,type:"file",accept:"image/*",className:"hidden",onChange:d})]})}function Eg({urlPreview:e,onUrlPreviewChange:t}){const[r,n]=g.useState(""),[o,i]=g.useState(!1),s=()=>{if(r.trim())try{new URL(r),t(r),i(!1)}catch{i(!0),t(null)}};return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx(It,{className:"block text-[10px] font-bold uppercase tracking-[0.08em] text-zinc-500 mb-1.5",children:"URL immagine"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(zo,{value:r,onChange:a=>{n(a.target.value),i(!1)},onKeyDown:a=>a.key==="Enter"&&s(),placeholder:"https://images.unsplash.com/photo-...",className:oe("h-8 text-xs bg-zinc-900/50 border-zinc-800",o&&"border-red-500/50")}),c.jsx(Ye,{type:"button",variant:"outline",onClick:s,className:"shrink-0 h-8",children:"Anteprima"})]}),o&&c.jsx("p",{className:"text-[11px] text-red-400 mt-1.5",children:"URL non valido. Inserisci un URL completo (https://…)"})]}),e?c.jsxs("div",{className:"rounded-lg overflow-hidden ring-1 ring-zinc-800",children:[c.jsx("img",{src:e,alt:"URL preview",className:"w-full max-h-[320px] object-contain bg-black/30",onError:()=>{i(!0),t(null)}}),c.jsxs("div",{className:"px-3.5 py-2.5 bg-white/[0.02] border-t border-zinc-800 flex items-center gap-2",children:[c.jsx(lo,{size:14,className:"text-emerald-400"}),c.jsx("span",{className:"text-[11px] text-zinc-500",children:"Immagine caricata correttamente"})]})]}):o?null:c.jsxs("div",{className:"flex flex-col items-center py-12 text-zinc-600",children:[c.jsx(is,{size:32,className:"mb-3 opacity-40"}),c.jsx("p",{className:"text-xs",children:"Incolla un URL e premi Anteprima per verificare"})]})]})}const jg=({open:e,onOpenChange:t,onSelect:r})=>{const{assets:n}=pr(),o=(n==null?void 0:n.assetsManifest)??[],[i,s]=g.useState("library"),[a,l]=g.useState(null),[d,u]=g.useState(null),[f,h]=g.useState(null);g.useEffect(()=>{e&&(s("library"),l(null),u(null),h(null))},[e]),g.useEffect(()=>{if(!e||i!=="upload")return;const y=()=>{fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:beforeunload",message:"beforeunload fired",data:{},timestamp:Date.now(),hypothesisId:"H1"})}).catch(()=>{})};return window.addEventListener("beforeunload",y),()=>window.removeEventListener("beforeunload",y)},[e,i]),g.useEffect(()=>{if(!e||i!=="upload")return;const y=x=>{x.preventDefault()},k={capture:!0};return document.addEventListener("dragover",y,k),document.addEventListener("drop",y,k),window.addEventListener("dragover",y,k),window.addEventListener("drop",y,k),()=>{document.removeEventListener("dragover",y,k),document.removeEventListener("drop",y,k),window.removeEventListener("dragover",y,k),window.removeEventListener("drop",y,k)}},[e,i]);const p=i==="library"&&a!=null||i==="upload"&&d!=null||i==="url"&&f!=null,w=()=>{if(i==="library"&&a){const y=o.find(k=>k.id===a);y&&r({url:y.url,alt:y.alt})}else i==="upload"&&d?r({url:d.dataUrl,alt:d.name}):i==="url"&&f&&r({url:f,alt:""});setTimeout(()=>t(!1),0)},m=i==="library"&&a?"1 immagine selezionata":i==="upload"&&d?d.name:i==="url"&&f?"URL pronto":"Nessuna selezione",v=y=>{y.preventDefault(),y.stopPropagation()};return c.jsx($l,{open:e,onOpenChange:t,children:c.jsxs(Fl,{className:"max-w-2xl p-0 gap-0 max-h-[90vh] flex flex-col",preventCloseOnBackdropClick:i==="upload",onDragOver:v,onDrop:v,children:[c.jsxs(Wl,{className:"px-5 py-4 flex flex-row items-start justify-between gap-4 border-b border-zinc-800",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/15 text-blue-500",children:c.jsx(Qr,{size:18})}),c.jsxs("div",{children:[c.jsx(Ul,{children:"Image Picker"}),c.jsx(Bl,{children:"Scegli dalla libreria, carica dal disco o inserisci un link"})]})]}),c.jsx("button",{type:"button",onClick:()=>t(!1),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Chiudi",children:c.jsx(Ut,{size:18})})]}),c.jsx("div",{className:"flex border-b border-zinc-800",children:kg.map(y=>c.jsxs("button",{type:"button",onClick:()=>s(y),className:oe("flex items-center gap-2 px-4 py-3 text-xs font-medium border-b-2 transition-colors",i===y?"border-blue-500 text-blue-400":"border-transparent text-zinc-500 hover:text-zinc-300"),children:[y==="library"&&c.jsx(Qr,{size:14}),y==="upload"&&c.jsx(as,{size:14}),y==="url"&&c.jsx(is,{size:14}),y==="library"?"Libreria":y==="upload"?"Upload":"URL"]},y))}),c.jsxs("div",{className:"flex-1 overflow-y-auto p-5 min-h-0",children:[i==="library"&&c.jsx(Sg,{library:o,selectedId:a,onSelect:l}),i==="upload"&&c.jsx(Cg,{preview:d,onPreviewChange:u,onAssetUpload:n==null?void 0:n.onAssetUpload}),i==="url"&&c.jsx(Eg,{urlPreview:f,onUrlPreviewChange:h})]}),c.jsxs(yg,{className:"px-5 py-4 border-t border-zinc-800 flex-row justify-between",children:[c.jsx("span",{className:"text-[10px] uppercase tracking-[0.05em] text-zinc-600",children:m}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(Ye,{type:"button",variant:"outline",size:"sm",onClick:()=>t(!1),children:"Annulla"}),c.jsx(Ye,{type:"button",size:"sm",disabled:!p,onClick:w,className:oe(!p&&"opacity-40"),children:"Inserisci immagine"})]})]})]})})},Hl=(e,t="default")=>{if(e.startsWith("http")||e.startsWith("data:")||e.startsWith("#")||e.startsWith("/assets/"))return e;if(e.startsWith("assets/"))return`/${e}`;if(e.startsWith("/uploaded-assets/"))return e;if(!/\.(jpg|jpeg|png|gif|svg|pdf|webp|mp4|webm|ogg)$/i.test(e))return e.startsWith("/")?e:`/${e}`;const n=e.replace(/^\//,"");return`/assets/${t}/${n}`},Ng=({value:e,onChange:t,label:r="IMAGE",className:n})=>{const{tenantId:o="default"}=pr(),[i,s]=g.useState(!1),[a,l]=g.useState(!1),d=!!(e!=null&&e.url),u=e!=null&&e.url?Hl(e.url,o):"",f=p=>{t(p),s(!1)},h=p=>{p.stopPropagation(),t({url:"",alt:""})};return c.jsxs("div",{className:oe("space-y-1.5",n),children:[c.jsx(It,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:r}),d?c.jsxs("div",{role:"button",tabIndex:0,onClick:()=>s(!0),onKeyDown:p=>p.key==="Enter"&&s(!0),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),className:oe("relative rounded-lg overflow-hidden cursor-pointer","ring-1 ring-zinc-800 transition-all",a&&"ring-blue-500/40"),children:[c.jsx("img",{src:u,alt:(e==null?void 0:e.alt)??"",className:"w-full h-40 object-cover block",onError:p=>{p.target.style.display="none"}}),c.jsx("div",{className:oe("absolute inset-0 flex items-center justify-center gap-2 transition-all duration-150",a?"bg-black/50":"bg-black/0"),children:a&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center gap-1.5 bg-white/15 backdrop-blur-md rounded-lg px-3.5 py-2 text-white text-xs font-medium",children:[c.jsx($d,{size:13}),c.jsx("span",{children:"Cambia"})]}),c.jsx(Ye,{type:"button",variant:"ghost",className:"h-8 w-8 p-0 bg-red-500/15 backdrop-blur-md text-red-300 hover:text-red-200 hover:bg-red-500/25",onClick:h,children:c.jsx(en,{size:13})})]})}),c.jsx("div",{className:"px-2.5 py-1.5 bg-black/50 text-[10px] text-zinc-500 truncate",children:((e==null?void 0:e.url)??"").length>50?"…"+((e==null?void 0:e.url)??"").slice(-47):(e==null?void 0:e.url)??""})]}):c.jsxs("button",{type:"button",onClick:()=>s(!0),className:oe("w-full rounded-lg border-2 border-dashed border-zinc-800 py-7","flex flex-col items-center gap-2","bg-white/[0.01] transition-all","hover:border-blue-500/30 hover:bg-blue-500/[0.03]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500"),children:[c.jsx("div",{className:"w-9 h-9 rounded-lg bg-blue-500/10 flex items-center justify-center text-blue-500",children:c.jsx(Qr,{size:18})}),c.jsx("span",{className:"text-xs text-zinc-400 font-medium",children:"Clicca per aggiungere un'immagine"}),c.jsx("span",{className:"text-[10px] text-zinc-600",children:"Libreria · Upload · URL"})]}),c.jsx(jg,{open:i,onOpenChange:s,onSelect:f})]})},Vl=[{name:"layers",Icon:uo},{name:"github",Icon:Rd},{name:"arrow-right",Icon:Pd},{name:"box",Icon:Id},{name:"terminal",Icon:Bd},{name:"chevron-right",Icon:Dd},{name:"menu",Icon:Ld},{name:"x",Icon:Ut},{name:"sparkles",Icon:Ud},{name:"zap",Icon:Vd}],Gn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,t=>t.toUpperCase()),ir={"ui:text":({label:e,value:t,onChange:r})=>c.jsxs("div",{className:"grid w-full items-center gap-2 mb-4",children:[c.jsx(It,{className:"text-[11px] font-semibold tracking-[0.02em] text-zinc-300",children:Gn(e)}),c.jsx(zo,{type:"text",className:"h-9 text-[13px] bg-zinc-900/50 border-zinc-700 focus-visible:ring-blue-600",value:t||"",onChange:n=>r(n.target.value)})]}),"ui:textarea":({label:e,value:t,onChange:r})=>c.jsxs("div",{className:"grid w-full gap-2 mb-4",children:[c.jsx(It,{className:"text-[11px] font-semibold tracking-[0.02em] text-zinc-300",children:Gn(e)}),c.jsx(Jf,{className:"min-h-[96px] text-[13px] bg-zinc-900/50 border-zinc-700 focus-visible:ring-blue-600 resize-none",value:t||"",onChange:n=>r(n.target.value)})]}),"ui:select":({label:e,value:t,onChange:r,options:n=[]})=>c.jsxs("div",{className:"grid w-full gap-2 mb-4",children:[c.jsx(It,{className:"text-[11px] font-semibold tracking-[0.02em] text-zinc-300",children:Gn(e)}),c.jsxs(vg,{value:t||"",onValueChange:r,children:[c.jsx(Dl,{className:"w-full h-9 text-[13px] bg-zinc-900/50 border-zinc-700 focus:ring-blue-600",children:c.jsx(xg,{placeholder:"Select..."})}),c.jsx(_l,{className:"dark",children:n.map(o=>c.jsx(Ml,{value:o,className:"text-[13px]",children:o},o))})]})]}),"ui:checkbox":({label:e,value:t,onChange:r})=>c.jsxs("div",{className:"flex items-center space-x-2 mb-4 p-2.5 rounded border border-zinc-700/60 bg-zinc-900/20",children:[c.jsx(Zf,{id:e,checked:!!t,onCheckedChange:n=>r(n===!0)}),c.jsx(It,{htmlFor:e,className:"text-[13px] font-medium cursor-pointer select-none text-zinc-200",children:Gn(e)})]}),"ui:image-picker":({label:e,value:t,onChange:r})=>{const n=t!=null&&typeof t=="object"&&"url"in t?{url:String(t.url??""),alt:String(t.alt??"")}:{url:typeof t=="string"?t:"",alt:""},o=i=>{r(i)};return c.jsx("div",{className:"mb-4",children:c.jsx(Ng,{label:e,value:n,onChange:o})})},"ui:icon-picker":({label:e,value:t,onChange:r})=>{const[n,o]=g.useState(!1),i=Vl.find(s=>s.name===(t||""));return c.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[c.jsx(It,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),c.jsxs($l,{open:n,onOpenChange:o,children:[c.jsx(wg,{asChild:!0,children:c.jsx(Ye,{variant:"outline",className:"w-full h-9 rounded-md border border-zinc-800 bg-zinc-900/50 hover:bg-zinc-800/50 flex items-center gap-2 text-left",children:i?c.jsxs(c.Fragment,{children:[c.jsx(i.Icon,{size:16,className:"text-zinc-400 shrink-0"}),c.jsx("span",{className:"text-[11px] text-zinc-300 capitalize truncate",children:i.name})]}):c.jsxs(c.Fragment,{children:[c.jsx(Qr,{size:16,className:"text-zinc-500 shrink-0"}),c.jsx("span",{className:"text-[11px] text-zinc-500",children:"Choose icon..."})]})})}),c.jsxs(Fl,{className:"sm:max-w-[280px] p-4",children:[c.jsxs(Wl,{children:[c.jsx(Ul,{className:"text-sm",children:"Choose icon"}),c.jsx(Bl,{className:"text-xs",children:"Click an icon to select it."})]}),c.jsx("div",{className:"grid grid-cols-5 gap-2 py-2",children:Vl.map(({name:s,Icon:a})=>c.jsx("button",{type:"button",onClick:()=>{r(s),o(!1)},className:oe("flex items-center justify-center w-10 h-10 rounded-md border transition-colors",t===s?"border-blue-500 bg-blue-500/20 text-blue-400":"border-zinc-800 bg-zinc-900/50 hover:bg-zinc-800/50 text-zinc-400 hover:text-zinc-200"),title:s,children:c.jsx(a,{size:20})},s))})]})]})]})}},di=e=>{if(e instanceof Te.z.ZodOptional||e instanceof Te.z.ZodDefault)return di(e._def.innerType);if(e instanceof Te.z.ZodObject){const t={id:crypto.randomUUID()};for(const r in e.shape)r!=="id"&&(t[r]=di(e.shape[r]));return t}return e instanceof Te.z.ZodArray?[]:e instanceof Te.z.ZodString?"":e instanceof Te.z.ZodNumber?0:e instanceof Te.z.ZodBoolean?!1:e instanceof Te.z.ZodEnum?e._def.values[0]:null},Yn=e=>e instanceof Te.z.ZodOptional||e instanceof Te.z.ZodDefault||e instanceof Te.z.ZodNullable?Yn(e._def.innerType):e,Kl=e=>{var n;const t=e;if(typeof e.description=="string"&&e.description.length>0)return e.description;if(typeof((n=t._def)==null?void 0:n.description)=="string"&&t._def.description.length>0)return t._def.description;const r=Yn(e);return r!==e?Kl(r):null},qn=(e,t)=>e&&!t?"opacity-10":"opacity-100",sr=(e,t)=>e!=null&&t.toLowerCase()===e.toLowerCase(),ui=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,t=>t.toUpperCase()),Ir=({schema:e,data:t,onChange:r,keys:n,expandedItemPath:o,onSidebarExpandedItemChange:i})=>{const s=e.shape,a=n!=null?Object.keys(s).filter(f=>n.includes(f)):Object.keys(s),l=o==null?void 0:o[0],d=(l==null?void 0:l.fieldKey)??null,u=d!=null;return c.jsx("div",{className:"space-y-4",children:a.map(f=>{const h=s[f];if(!h)return null;const p=Yn(h),w=Kl(h)||"ui:text",m=t[f];if(w==="ui:editorial-markdown")return null;if(w==="ui:image-picker"&&p instanceof Te.z.ZodObject){const S=sr(d,f),C=ir["ui:image-picker"]||ir["ui:text"];return c.jsx("div",{className:`transition-opacity duration-200 ${qn(u,S)}`,...S?{"data-jp-focused-field":f}:{},children:c.jsx(C,{label:f,value:m,onChange:j=>r({...t,[f]:j})})},f)}if(p instanceof Te.z.ZodObject){const S=m||{},C=sr(d,f);return c.jsxs("div",{className:`group/obj mb-6 p-4 border border-zinc-800 rounded-lg bg-zinc-900/20 hover:border-zinc-700 transition-[border-color,opacity] duration-200 ${qn(u,C)}`,...C?{"data-jp-focused-field":f}:{},children:[c.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[c.jsx("div",{className:"w-1 h-3 bg-blue-500 rounded-full"}),c.jsx("h4",{className:"text-[11px] font-semibold text-zinc-300 tracking-[0.02em]",children:ui(f)})]}),c.jsx(Ir,{schema:p,data:S,onChange:j=>r({...t,[f]:j}),expandedItemPath:o&&sr(l==null?void 0:l.fieldKey,f)?o.slice(1):void 0})]},f)}if(p instanceof Te.z.ZodArray){const S=Array.isArray(m)?m:[],C=Yn(p.element),j=(R,I)=>{if(I<0||I>=S.length)return;const L=[...S],[_]=L.splice(R,1);L.splice(I,0,_),r({...t,[f]:L})},N=sr(d,f),D=sr(l==null?void 0:l.fieldKey,f)?l==null?void 0:l.itemId:void 0;return c.jsxs("div",{className:`mb-8 transition-opacity duration-200 ${qn(u,N)}`,...N?{"data-jp-focused-field":f}:{},children:[c.jsxs("div",{className:"flex items-center justify-between mb-3",children:[c.jsxs("label",{className:"text-[12px] font-semibold text-zinc-300 tracking-[0.01em]",children:[ui(f)," (",S.length,")"]}),c.jsxs("button",{type:"button",onClick:()=>{const R=di(C);r({...t,[f]:[...S,R]})},className:"flex items-center gap-1 px-2.5 py-1.5 bg-blue-600/10 hover:bg-blue-600/20 text-blue-400 rounded text-[11px] font-semibold transition-colors",children:[c.jsx(fo,{size:12})," Add Item"]})]}),c.jsx("div",{className:"space-y-2",children:S.map((R,I)=>{const L=R,_=L.id||`legacy-${I}`,G=(typeof L.title=="string"?L.title:null)||(typeof L.label=="string"?L.label:null)||(typeof L.name=="string"?L.name:null)||(typeof L.content=="string"?L.content:null)||(typeof L.text=="string"?L.text:null)||`${ui(f)} #${I+1}`,B=D,F=String(L.id??_),U=B!=null&&String(B)===F,z=U&&o&&o.length>1?o.slice(1):void 0,X=u&&N&&B!=null&&!U;return c.jsx(Tg,{itemId:F,openItemId:B!=null?String(B):void 0,isFaded:X,index:I,isFirst:I===0,isLast:I===S.length-1,label:G,onExpandedChange:i?re=>i(re?{fieldKey:f,itemId:F}:null):void 0,onRemove:()=>{const re=S.filter((T,$)=>$!==I);r({...t,[f]:re})},onMoveUp:()=>j(I,I-1),onMoveDown:()=>j(I,I+1),children:C instanceof Te.z.ZodObject?c.jsx(Ir,{schema:C,data:L||{},expandedItemPath:z,onChange:re=>{const T=[...S];T[I]=re,r({...t,[f]:T})}}):c.jsx("div",{className:"text-[10px] text-red-400",children:"Primitive arrays not supported."})},_)})})]},f)}const v=w in ir?w:"ui:text",y=ir[v]||ir["ui:text"],k=p instanceof Te.z.ZodEnum?p._def.values:void 0,x=sr(d,f);return c.jsx("div",{className:`transition-opacity duration-200 ${qn(u,x)}`,...x?{"data-jp-focused-field":f}:{},children:c.jsx(y,{label:f,value:m,options:k,onChange:S=>r({...t,[f]:S})})},f)})})},Tg=({itemId:e,openItemId:t,isFaded:r=!1,label:n,onExpandedChange:o,onRemove:i,onMoveUp:s,onMoveDown:a,isFirst:l,isLast:d,children:u})=>{const f=t!=null&&String(t)===String(e),[h,p]=g.useState(f);g.useEffect(()=>{t!=null&&(f&&!h&&p(!0),!f&&h&&p(!1))},[t,f,h]);const w=()=>{const v=!h;p(v),o==null||o(v)},m=f&&h;return c.jsxs("div",{className:`border border-zinc-800 rounded-md bg-zinc-900/40 overflow-hidden transition-opacity duration-200 ${r?"opacity-10":"opacity-100"}`,...m?{"data-jp-expanded-item":e}:{},children:[c.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-zinc-900/60",children:[c.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:c.jsxs("button",{type:"button",onClick:w,className:"flex items-center gap-2 text-[12px] font-semibold text-zinc-200 tracking-[0.01em] truncate",children:[h?c.jsx(co,{size:12,className:"shrink-0"}):c.jsx(Zr,{size:12,className:"shrink-0"}),c.jsx("span",{className:"truncate",children:n})]})}),c.jsxs("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[c.jsx("button",{type:"button",disabled:l,onClick:s,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:c.jsx(Od,{size:12})}),c.jsx("button",{type:"button",disabled:d,onClick:a,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:c.jsx(zd,{size:12})}),c.jsx("div",{className:"w-px h-3 bg-zinc-800 mx-1"}),c.jsx("button",{type:"button",onClick:i,className:"text-zinc-600 hover:text-red-500 transition-colors p-1",children:c.jsx(en,{size:12})})]})]}),h&&c.jsx("div",{className:"p-4 border-t border-zinc-800 bg-black/20",children:u})]})};function Ag(e,t){return b.useReducer((r,n)=>t[r][n]??r,e)}var Dr=e=>{const{present:t,children:r}=e,n=zg(t),o=typeof r=="function"?r({present:n.isPresent}):b.Children.only(r),i=Ee(n.ref,Pg(o));return typeof r=="function"||n.isPresent?b.cloneElement(o,{ref:i}):null};Dr.displayName="Presence";function zg(e){const[t,r]=b.useState(),n=b.useRef(null),o=b.useRef(e),i=b.useRef("none"),s=e?"mounted":"unmounted",[a,l]=Ag(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const d=Xn(n.current);i.current=a==="mounted"?d:"none"},[a]),Re(()=>{const d=n.current,u=o.current;if(u!==e){const h=i.current,p=Xn(d);e?l("MOUNT"):p==="none"||(d==null?void 0:d.display)==="none"?l("UNMOUNT"):l(u&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Re(()=>{if(t){let d;const u=t.ownerDocument.defaultView??window,f=p=>{const m=Xn(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",d=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=p=>{p.target===t&&(i.current=Xn(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(d=>{n.current=d?getComputedStyle(d):null,r(d)},[])}}function Xn(e){return(e==null?void 0:e.animationName)||"none"}function Pg(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var[Jn]=Tr("Tooltip",[Qt]),Zn=Qt(),Gl="TooltipProvider",Og=700,fi="tooltip.open",[Ig,pi]=Jn(Gl),Yl=e=>{const{__scopeTooltip:t,delayDuration:r=Og,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=e,s=b.useRef(!0),a=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const d=l.current;return()=>window.clearTimeout(d)},[]),c.jsx(Ig,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:b.useCallback(d=>{a.current=d},[]),disableHoverableContent:o,children:i})};Yl.displayName=Gl;var _r="Tooltip",[Dg,Mr]=Jn(_r),ql=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,l=pi(_r,e.__scopeTooltip),d=Zn(t),[u,f]=b.useState(null),h=Ar(),p=b.useRef(0),w=s??l.disableHoverableContent,m=a??l.delayDuration,v=b.useRef(!1),[y,k]=_n({prop:n,defaultProp:o??!1,onChange:N=>{N?(l.onOpen(),document.dispatchEvent(new CustomEvent(fi))):l.onClose(),i==null||i(N)},caller:_r}),x=b.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),S=b.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v.current=!1,k(!0)},[k]),C=b.useCallback(()=>{window.clearTimeout(p.current),p.current=0,k(!1)},[k]),j=b.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{v.current=!0,k(!0),p.current=0},m)},[m,k]);return b.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),c.jsx(qo,{...d,children:c.jsx(Dg,{scope:t,contentId:h,open:y,stateAttribute:x,trigger:u,onTriggerChange:f,onTriggerEnter:b.useCallback(()=>{l.isOpenDelayedRef.current?j():S()},[l.isOpenDelayedRef,j,S]),onTriggerLeave:b.useCallback(()=>{w?C():(window.clearTimeout(p.current),p.current=0)},[C,w]),onOpen:S,onClose:C,disableHoverableContent:w,children:r})})};ql.displayName=_r;var hi="TooltipTrigger",Xl=b.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Mr(hi,r),i=pi(hi,r),s=Zn(r),a=b.useRef(null),l=Ee(t,a,o.onTriggerChange),d=b.useRef(!1),u=b.useRef(!1),f=b.useCallback(()=>d.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),c.jsx(In,{asChild:!0,...s,children:c.jsx(ke.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:he(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:he(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:he(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:he(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:he(e.onBlur,o.onClose),onClick:he(e.onClick,o.onClose)})})});Xl.displayName=hi;var mi="TooltipPortal",[_g,Mg]=Jn(mi,{forceMount:void 0}),Jl=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,i=Mr(mi,t);return c.jsx(_g,{scope:t,forceMount:r,children:c.jsx(Dr,{present:r||i.open,children:c.jsx(Dn,{asChild:!0,container:o,children:n})})})};Jl.displayName=mi;var ar="TooltipContent",Zl=b.forwardRef((e,t)=>{const r=Mg(ar,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...i}=e,s=Mr(ar,e.__scopeTooltip);return c.jsx(Dr,{present:n||s.open,children:s.disableHoverableContent?c.jsx(Ql,{side:o,...i,ref:t}):c.jsx(Rg,{side:o,...i,ref:t})})}),Rg=b.forwardRef((e,t)=>{const r=Mr(ar,e.__scopeTooltip),n=pi(ar,e.__scopeTooltip),o=b.useRef(null),i=Ee(t,o),[s,a]=b.useState(null),{trigger:l,onClose:d}=r,u=o.current,{onPointerInTransitChange:f}=n,h=b.useCallback(()=>{a(null),f(!1)},[f]),p=b.useCallback((w,m)=>{const v=w.currentTarget,y={x:w.clientX,y:w.clientY},k=Ug(y,v.getBoundingClientRect()),x=Bg(y,k),S=Hg(m.getBoundingClientRect()),C=Kg([...x,...S]);a(C),f(!0)},[f]);return b.useEffect(()=>()=>h(),[h]),b.useEffect(()=>{if(l&&u){const w=v=>p(v,u),m=v=>p(v,l);return l.addEventListener("pointerleave",w),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",w),u.removeEventListener("pointerleave",m)}}},[l,u,p,h]),b.useEffect(()=>{if(s){const w=m=>{const v=m.target,y={x:m.clientX,y:m.clientY},k=(l==null?void 0:l.contains(v))||(u==null?void 0:u.contains(v)),x=!Vg(y,s);k?h():x&&(h(),d())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,u,s,d,h]),c.jsx(Ql,{...e,ref:i})}),[Lg,$g]=Jn(_r,{isInside:!1}),Fg=rp("TooltipContent"),Ql=b.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=Mr(ar,r),d=Zn(r),{onClose:u}=l;return b.useEffect(()=>(document.addEventListener(fi,u),()=>document.removeEventListener(fi,u)),[u]),b.useEffect(()=>{if(l.trigger){const f=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,u]),c.jsx(kn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:c.jsxs(Xo,{"data-state":l.stateAttribute,...d,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(Fg,{children:n}),c.jsx(Lg,{scope:r,isInside:!0,children:c.jsx(em,{id:l.contentId,role:"tooltip",children:o||n})})]})})});Zl.displayName=ar;var ec="TooltipArrow",Wg=b.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Zn(r);return $g(ec,r).isInside?null:c.jsx(Jo,{...o,...n,ref:t})});Wg.displayName=ec;function Ug(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,o,i)){case i:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Bg(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Hg(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function Vg(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],l=t[s],d=a.x,u=a.y,f=l.x,h=l.y;u>n!=h>n&&r<(f-d)*(n-u)/(h-u)+d&&(o=!o)}return o}function Kg(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Gg(t)}function Gg(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const i=r[r.length-1],s=r[r.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Yg=Yl,qg=ql,Xg=Xl,Jg=Jl,tc=Zl;const Zg=Yg,Rr=qg,Lr=Xg,lr=b.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(Jg,{children:c.jsx(tc,{ref:n,sideOffset:t,className:oe("z-50 rounded-md bg-zinc-800 px-2.5 py-1.5 text-[11px] text-zinc-200 shadow-md","animate-in fade-in-0 zoom-in-95",e),...r})}));lr.displayName=tc.displayName;var Qn="Popover",[rc]=Tr(Qn,[Qt]),$r=Qt(),[Qg,Et]=rc(Qn),nc=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,a=$r(t),l=b.useRef(null),[d,u]=b.useState(!1),[f,h]=_n({prop:n,defaultProp:o??!1,onChange:i,caller:Qn});return c.jsx(qo,{...a,children:c.jsx(Qg,{scope:t,contentId:Ar(),triggerRef:l,open:f,onOpenChange:h,onOpenToggle:b.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:d,onCustomAnchorAdd:b.useCallback(()=>u(!0),[]),onCustomAnchorRemove:b.useCallback(()=>u(!1),[]),modal:s,children:r})})};nc.displayName=Qn;var oc="PopoverAnchor",e0=b.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Et(oc,r),i=$r(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=o;return b.useEffect(()=>(s(),()=>a()),[s,a]),c.jsx(In,{...i,...n,ref:t})});e0.displayName=oc;var ic="PopoverTrigger",sc=b.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Et(ic,r),i=$r(r),s=Ee(t,o.triggerRef),a=c.jsx(ke.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":uc(o.open),...n,ref:s,onClick:he(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:c.jsx(In,{asChild:!0,...i,children:a})});sc.displayName=ic;var gi="PopoverPortal",[t0,r0]=rc(gi,{forceMount:void 0}),ac=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=Et(gi,t);return c.jsx(t0,{scope:t,forceMount:r,children:c.jsx(Dr,{present:r||i.open,children:c.jsx(Dn,{asChild:!0,container:o,children:n})})})};ac.displayName=gi;var cr="PopoverContent",lc=b.forwardRef((e,t)=>{const r=r0(cr,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=Et(cr,e.__scopePopover);return c.jsx(Dr,{present:n||i.open,children:i.modal?c.jsx(o0,{...o,ref:t}):c.jsx(i0,{...o,ref:t})})});lc.displayName=cr;var n0=Yt("PopoverContent.RemoveScroll"),o0=b.forwardRef((e,t)=>{const r=Et(cr,e.__scopePopover),n=b.useRef(null),o=Ee(t,n),i=b.useRef(!1);return b.useEffect(()=>{const s=n.current;if(s)return Ya(s)},[]),c.jsx(ni,{as:n0,allowPinchZoom:!0,children:c.jsx(cc,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:he(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),i.current||(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:he(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,d=a.button===2||l;i.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:he(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),i0=b.forwardRef((e,t)=>{const r=Et(cr,e.__scopePopover),n=b.useRef(!1),o=b.useRef(!1);return c.jsx(cc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),i.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:i=>{var l,d;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((d=r.triggerRef.current)==null?void 0:d.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),cc=b.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:u,...f}=e,h=Et(cr,r),p=$r(r);return sa(),c.jsx(_o,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:c.jsx(kn,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1),children:c.jsx(Xo,{"data-state":uc(h.open),role:"dialog",id:h.contentId,...p,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),dc="PopoverClose",s0=b.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Et(dc,r);return c.jsx(ke.button,{type:"button",...n,ref:t,onClick:he(e.onClick,()=>o.onOpenChange(!1))})});s0.displayName=dc;var a0="PopoverArrow",l0=b.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=$r(r);return c.jsx(Jo,{...o,...n,ref:t})});l0.displayName=a0;function uc(e){return e?"open":"closed"}var c0=nc,d0=sc,u0=ac,fc=lc;const f0=c0,p0=d0,pc=b.forwardRef(({className:e,align:t="start",sideOffset:r=6,...n},o)=>c.jsx(u0,{children:c.jsx(fc,{ref:o,align:t,sideOffset:r,className:oe("z-50 w-[var(--radix-popover-trigger-width)] rounded-lg border border-zinc-700/80 bg-zinc-950 p-1 text-white shadow-xl shadow-black/30","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2",e),...n})}));pc.displayName=fc.displayName;const hc=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"Select page",h0=({pageSlugs:e,currentSlug:t,onPageChange:r,sectionCount:n,onNewPage:o,className:i,currentPageLabel:s})=>{const[a,l]=g.useState(!1),d=s??hc(t),u=f=>{r(f),l(!1)};return c.jsx("div",{className:oe("mx-3 mt-2 mb-2",i),children:c.jsxs(f0,{open:a,onOpenChange:l,children:[c.jsx(p0,{asChild:!0,children:c.jsxs("button",{type:"button","aria-haspopup":"listbox","aria-label":`Select page, current: ${d}`,className:oe("flex items-center gap-2 w-full pl-3 pr-4 py-2 rounded-lg border text-left transition-all duration-150 cursor-pointer","bg-transparent border-zinc-800 text-zinc-400 hover:text-zinc-200 hover:bg-zinc-800/50 hover:border-zinc-700","data-[state=open]:bg-zinc-950 data-[state=open]:border-zinc-800 data-[state=open]:text-zinc-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-zinc-950"),children:[c.jsx(Md,{size:14,className:"shrink-0 text-zinc-500","aria-hidden":!0}),c.jsx("span",{className:"text-xs font-medium flex-1 truncate",children:d}),c.jsx(Zr,{size:13,className:"shrink-0 text-zinc-500","aria-hidden":!0})]})}),c.jsxs(pc,{align:"start",sideOffset:4,className:"min-w-[var(--radix-popover-trigger-width)] bg-zinc-950 border-zinc-800 p-1",role:"listbox","aria-label":"Page list",children:[e.map(f=>{const h=f===t,p=hc(f);return c.jsxs("button",{type:"button",role:"option","aria-selected":h,onClick:()=>u(f),className:oe("flex items-center justify-between w-full px-2.5 py-2 rounded-md text-xs transition-colors cursor-pointer",h?"bg-primary/10 text-primary font-semibold":"text-zinc-400 hover:bg-zinc-800 hover:text-zinc-200"),children:[c.jsx("span",{children:p}),n!=null&&c.jsxs("span",{className:"text-[10px] text-zinc-600 tabular-nums","aria-hidden":!0,children:[n,"s"]})]},f)}),o!=null&&c.jsx("div",{className:"border-t border-zinc-800 mt-1 pt-1",children:c.jsxs("button",{type:"button",onClick:()=>{o(),l(!1)},className:"flex items-center gap-1.5 w-full px-2.5 py-2 rounded-md text-[11px] text-zinc-600 hover:text-zinc-300 hover:bg-zinc-800 transition-colors cursor-pointer","aria-label":"New page",children:[c.jsx(fo,{size:12,"aria-hidden":!0}),c.jsx("span",{children:"New page"})]})})]})]})})},bi=new Set(["anchorId","paddingTop","paddingBottom","theme","container"]),mc=new Set(["ui:editorial-markdown"]),gc=e=>e instanceof Te.z.ZodOptional||e instanceof Te.z.ZodDefault||e instanceof Te.z.ZodNullable?gc(e._def.innerType):e,vi=e=>{var i;if(!e)return"";const t=e,r=typeof e.description=="string"?e.description:null;if(r)return r;const n=typeof((i=t._def)==null?void 0:i.description)=="string"?t._def.description:null;if(n)return n;const o=gc(e);return o!==e?vi(o):""},xi=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,t=>t.toUpperCase()),m0={activationConstraint:{distance:8}},g0={activationConstraint:{delay:200,tolerance:5}};function wi({layer:e,opts:t,dragHandleProps:r}){const{isSelected:n,isActive:o,isDragging:i,canDelete:s,onSelect:a,onOpenSettings:l,onDelete:d}=t,u=!!r;return c.jsxs("div",{className:oe("group flex items-center gap-2 pl-1 pr-2 py-2.5 rounded-lg text-left transition-all duration-200 cursor-pointer border-l-2",n?"bg-primary/[0.08] border-primary":o?"bg-zinc-800/30 border-emerald-500/60":"border-transparent hover:bg-zinc-800/40",i&&"opacity-50 shadow-lg",u?"cursor-grab active:cursor-grabbing":"cursor-default"),children:[u?c.jsx("span",{className:"shrink-0 w-5 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-150 cursor-grab touch-none","aria-label":"Trascina per riordinare",...r,children:c.jsx(os,{size:12,className:"text-zinc-600"})}):c.jsx("span",{className:"shrink-0 w-5 flex items-center justify-center opacity-0 group-hover:opacity-100 pointer-events-none",children:c.jsx(os,{size:12,className:"text-zinc-600/50"})}),c.jsxs("button",{type:"button",onClick:a,className:"flex-1 min-w-0 text-left",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:oe("text-xs font-bold uppercase tracking-[0.06em] truncate",n?"text-primary":"text-zinc-500"),children:e.type}),o&&c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),c.jsx("span",{className:"text-[11px] text-zinc-600 block truncate leading-snug mt-0.5",children:e.title??`${e.type} section`})]}),c.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity duration-150",children:[c.jsxs(Rr,{children:[c.jsx(Lr,{asChild:!0,children:c.jsx(Ye,{variant:"ghost",size:"icon-xs",className:"text-zinc-600 hover:text-zinc-300",onClick:f=>{f.stopPropagation(),l(f)},children:c.jsx(Wd,{size:12})})}),c.jsx(lr,{children:"Settings"})]}),s&&c.jsxs(Rr,{children:[c.jsx(Lr,{asChild:!0,children:c.jsx(Ye,{variant:"ghost",size:"icon-xs",className:"text-zinc-600 hover:text-destructive",onClick:f=>{f.stopPropagation(),d()},children:c.jsx(en,{size:12})})}),c.jsx(lr,{children:"Delete section"})]})]})]})}function b0({layer:e,opts:t}){const{attributes:r,listeners:n,setNodeRef:o,transform:i,transition:s,isDragging:a}=Kf({id:e.id,disabled:!t.canReorder}),l={transform:vt.Transform.toString(i),transition:s};return c.jsx("div",{ref:o,style:l,className:oe(a&&"z-10"),children:c.jsx(wi,{layer:e,opts:{...t,isDragging:a},dragHandleProps:t.canReorder?{...r,...n,"aria-roledescription":"elemento trascinabile"}:void 0})})}const bc=({selectedSection:e,pageData:t,allSectionsData:r=[],onUpdate:n,onUpdateSection:o,onClose:i,expandedItemPath:s=null,onReorderSection:a,allLayers:l=[],activeSectionId:d,onRequestScrollToSection:u,onDeleteSection:f,onAddSection:h,hasChanges:p=!1,onSaveToFile:w,onHotSave:m,saveSuccessFeedback:v=!1,hotSaveSuccessFeedback:y=!1,hotSaveInProgress:k=!1,showLegacySave:x=!0,showHotSave:S=!1,onResetToFile:C,showResetToFile:j=!1,pageSlugs:N=[],currentSlug:E="home",onPageChange:D})=>{const{schemas:R}=pr(),[I,L]=g.useState(!0),[_,G]=g.useState(null),[B,F]=g.useState(null),[U,z]=g.useState(null),[X,re]=g.useState(null),T=g.useRef(null),$=g.useRef(null),Y=bu(vo(Eo,m0),vo(Os,g0),vo(So,{coordinateGetter:qf})),K=g.useDeferredValue(e),ge=e!=null&&(K==null?void 0:K.id)!==e.id,se=s&&s.length>0?s:U?[U]:null,P=se!=null&&se.length?{fieldKey:se[se.length-1].fieldKey,itemId:se[se.length-1].itemId}:null,J=g.useRef(s);g.useEffect(()=>{J.current!=null&&s==null&&z(null),J.current=s},[s]),g.useEffect(()=>{(e==null?void 0:e.id)!=null&&L(!1)},[e==null?void 0:e.id]);const ee=()=>{const M=requestAnimationFrame(()=>{requestAnimationFrame(()=>{const Z=T.current;Z&&Z.scrollTo({top:0,behavior:"smooth"})})});return()=>cancelAnimationFrame(M)},W=g.useRef(I);g.useEffect(()=>{if(I&&!W.current){const M=ee();return W.current=I,M}W.current=I},[I]),g.useEffect(()=>{if(!P)return;const M=T.current;if(!M)return;const Z=requestAnimationFrame(()=>{const ie=M.querySelector("[data-jp-expanded-item]")??M.querySelector("[data-jp-focused-field]");ie&&ie.scrollIntoView({behavior:"smooth",block:"start"})});return()=>cancelAnimationFrame(Z)},[P]);const ne=M=>{L(!1),u==null||u(M)},te=()=>{L(M=>{const Z=!M;return Z&&ee(),Z})},we=(M,Z)=>{Z.stopPropagation(),r.length>0&&o?re(M):(L(!1),u==null||u(M))};g.useEffect(()=>{if(X==null)return;const M=Z=>{Z.key==="Escape"&&re(null)};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[X]);const be=M=>{_===M?(f==null||f(M),G(null)):(G(M),setTimeout(()=>G(null),3e3))},Pe=g.useMemo(()=>l.filter(M=>M.scope==="local").map(M=>M.id),[l]),De=!!a&&Pe.length>0,Ue=M=>{F(M.active.id)},jt=M=>{F(null);const{active:Z,over:ie}=M;if(!ie||Z.id===ie.id||!a)return;const fe=l.findIndex(Oe=>Oe.id===Z.id),_e=l.findIndex(Oe=>Oe.id===ie.id);if(fe===-1||_e===-1)return;const Se=fe<_e?_e:_e-1;a(Z.id,Se)},qe=e?t.sections.find(M=>M.id===e.id):void 0,Be=K?t.sections.find(M=>M.id===K.id):void 0,He=K?R[K.type]:void 0,ht=g.useMemo(()=>{if(!He)return!1;const M=He.shape,Z=Object.keys(M).filter(ie=>!bi.has(ie));return Z.length===0?!1:Z.every(ie=>mc.has(vi(M[ie])))},[He]);g.useEffect(()=>{(e==null?void 0:e.id)!=null&&ht&&L(!0)},[e==null?void 0:e.id,ht]);const Xe=l.length>0&&(I||!e),Nt=E?E.charAt(0).toUpperCase()+E.slice(1):"Select page",Ur=g.useMemo(()=>{const M=[];let Z=null;for(const ie of l){const fe=ie.type.toUpperCase(),_e=Z!==null&&(Z==="HEADER"&&fe!=="HEADER"||Z!=="HEADER"&&Z!=="FOOTER"&&fe==="FOOTER");M.push({layer:ie,showSeparatorAbove:_e}),Z=fe}return M},[l]);return c.jsx(Zg,{children:c.jsxs("aside",{className:"relative w-full h-full bg-zinc-950 border-l border-zinc-800 flex flex-col shadow-2xl shrink-0 min-w-0 animate-in slide-in-from-right duration-300",children:[c.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("h2",{className:"text-sm font-bold text-white",children:"Inspector"}),c.jsx("p",{className:"text-[10px] tracking-[0.06em] text-zinc-600 mt-0.5",children:e?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"text-primary font-bold",children:e.type}),c.jsx("span",{className:"text-zinc-700 mx-1.5",children:"|"}),c.jsx("span",{className:"uppercase",children:e.scope})]}):c.jsxs("span",{className:"text-zinc-600",children:[Nt," · ",l.length," sections"]})})]}),c.jsx(Ye,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":"Close Inspector",children:c.jsx(Ut,{size:14})})]}),N.length>0&&D&&c.jsx(h0,{pageSlugs:N,currentSlug:E,onPageChange:D,sectionCount:l.length,currentPageLabel:Nt}),l.length>0&&c.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-t border-zinc-800/50",children:[c.jsxs("button",{type:"button",onClick:te,className:"flex items-center gap-2 flex-1 cursor-pointer min-w-0 text-left","aria-expanded":Xe,"aria-label":Xe?"Collapse Page Layers":"Expand Page Layers",children:[c.jsx(uo,{size:14,className:"text-zinc-500 shrink-0"}),c.jsx("span",{className:"text-[11px] font-semibold tracking-[0.04em] text-zinc-400",children:"Page Layers"}),c.jsxs("span",{className:"text-[10px] text-zinc-600",children:["(",l.length,")"]}),c.jsx(co,{size:13,className:oe("ml-auto text-zinc-600 transition-transform duration-200 shrink-0",!I&&"rotate-180")})]}),h!=null&&c.jsxs(Rr,{children:[c.jsx(Lr,{asChild:!0,children:c.jsx(Ye,{variant:"ghost",size:"icon-sm",className:"text-zinc-500 hover:text-primary",onClick:h,children:c.jsx(fo,{size:14})})}),c.jsx(lr,{children:"Add section"})]})]}),c.jsx("div",{className:"relative flex-1 min-h-0 min-w-0 flex flex-col overflow-hidden",children:c.jsxs("div",{ref:T,className:"min-h-0 min-w-0 flex-1 overflow-y-auto overflow-x-hidden flex flex-col",role:"region","aria-label":"Inspector content",children:[c.jsx("div",{className:"flex flex-col min-h-0",children:Xe&&c.jsxs("div",{className:"py-1",children:[c.jsxs(mf,{sensors:Y,collisionDetection:wu,modifiers:[If],onDragStart:Ue,onDragEnd:jt,accessibility:{announcements:{onDragStart:()=>"Sezione presa in carico. Usa i tasti freccia per spostare, Spazio per rilasciare.",onDragOver:({over:M})=>M?`Posizione ${Pe.indexOf(String(M.id))+1} di ${Pe.length}.`:void 0,onDragEnd:({over:M})=>M?"Sezione rilasciata in nuova posizione.":"Riposizionamento annullato.",onDragCancel:()=>"Riposizionamento annullato."}},children:[c.jsx($f,{items:Pe,strategy:Rf,children:c.jsx("div",{className:"px-2 space-y-0.5",children:Ur.map(({layer:M,showSeparatorAbove:Z})=>c.jsxs(g.Fragment,{children:[Z&&c.jsx("div",{className:"mx-3 border-t border-zinc-800/60 my-1"}),M.scope==="local"&&De?c.jsx(b0,{layer:M,opts:{isSelected:(e==null?void 0:e.id)===M.id,isActive:d===M.id,isDragging:!1,canReorder:!0,canDelete:!!f,deleteConfirm:_===M.id,onSelect:()=>ne(M.id),onDelete:()=>be(M.id),onOpenSettings:ie=>we(M.id,ie)}}):c.jsx("div",{children:c.jsx(wi,{layer:M,opts:{isSelected:(e==null?void 0:e.id)===M.id,isActive:d===M.id,isDragging:!1,canDelete:M.scope==="local"&&!!f,deleteConfirm:_===M.id,onSelect:()=>ne(M.id),onDelete:()=>be(M.id),onOpenSettings:ie=>we(M.id,ie)}})})]},M.id))})}),c.jsx(Of,{dropAnimation:{duration:200,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:B?(()=>{const M=l.find(Z=>Z.id===B);return M?c.jsx("div",{className:"px-2 w-full max-w-[var(--inspector-width,280px)]",children:c.jsx(wi,{layer:M,opts:{isSelected:!1,isActive:!1,isDragging:!0,canDelete:!1,deleteConfirm:!1,onSelect:()=>{},onDelete:()=>{},onOpenSettings:()=>{}},dragHandleProps:{"aria-hidden":!0}})}):null})():null})]}),_&&c.jsxs("div",{className:"flex items-center gap-2 py-2 px-3 mt-1 mx-2 rounded-md bg-amber-500/10 border border-amber-500/30",children:[c.jsx(_d,{size:12,className:"text-amber-500 shrink-0"}),c.jsx("p",{className:"text-[10px] text-amber-500 font-medium",children:"Click delete again to confirm"})]})]})}),P&&qe&&(()=>{const M=qe.data||{};let Z;if(se&&se.length>0){let ie=M;for(const Se of se){const Oe=ie==null?void 0:ie[Se.fieldKey];Se.itemId!=null&&Array.isArray(Oe)?ie=Oe.find(A=>String(A==null?void 0:A.id)===String(Se.itemId))??null:ie=Oe}const fe=ie||{},_e=P.fieldKey;Z=(typeof fe.name=="string"?fe.name:null)??(typeof fe.title=="string"?fe.title:null)??(typeof fe.label=="string"?fe.label:null)??xi(_e)}else{const ie=P.fieldKey;if(P.itemId!=null){const Se=(Array.isArray(M[ie])?M[ie]:[]).find(Oe=>String(Oe==null?void 0:Oe.id)===String(P.itemId))||{};Z=(typeof Se.name=="string"?Se.name:null)??(typeof Se.title=="string"?Se.title:null)??(typeof Se.label=="string"?Se.label:null)??xi(ie)}else Z=xi(ie)}return c.jsxs("div",{className:"px-4 py-2 border-b border-zinc-800 bg-zinc-900/50",children:[c.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-zinc-500",children:"Editing"}),c.jsx("p",{className:"text-xs font-medium text-white truncate mt-0.5",children:Z})]})})(),c.jsx("div",{className:"flex-1 p-4",onFocusCapture:()=>e!=null&&L(!1),children:e?ge?c.jsxs("div",{className:"space-y-4 animate-pulse",role:"status","aria-label":"Loading form",children:[c.jsx("div",{className:"h-4 w-3/4 rounded bg-zinc-800"}),c.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),c.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),c.jsx("div",{className:"h-20 rounded bg-zinc-800/80"}),c.jsx("div",{className:"h-10 rounded bg-zinc-800/60"})]}):He?(()=>{const Z=Object.keys(He.shape).filter(fe=>!bi.has(fe)&&!mc.has(vi(He.shape[fe]))),ie=(Be==null?void 0:Be.data)||{};return Z.length===0?c.jsx("p",{className:"text-xs text-zinc-500",children:"Inline editorial section: edit content directly on the canvas."}):c.jsx(Ir,{schema:He,data:ie,onChange:fe=>n(fe),keys:Z,expandedItemPath:se,onSidebarExpandedItemChange:z})})():c.jsxs("div",{className:"text-xs text-red-400 p-4 border border-dashed border-red-900/30 rounded bg-red-900/10",children:["No schema found for ",(K==null?void 0:K.type)??e.type]}):c.jsx("p",{className:"text-xs text-zinc-600 text-center py-10",children:"Select a layer above or on the stage to edit."})})]})}),c.jsx("div",{className:"px-4 py-2.5 border-t border-zinc-800 bg-zinc-900/50 flex items-center justify-between gap-3 opacity-100 shrink-0",children:(x&&w!=null||S&&m!=null||C!=null)&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[c.jsx("div",{className:oe("w-2 h-2 rounded-full transition-colors duration-300 shrink-0",p?"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.5)]":"bg-emerald-500")}),c.jsx("span",{className:oe("text-sm font-medium transition-colors duration-300 truncate",v||y?"text-emerald-400":p?"text-amber-500":"text-zinc-500"),children:v||y?"Saved":p?"Unsaved Changes":"All Changes Saved"})]}),x&&w!=null&&c.jsxs(Rr,{children:[c.jsx(Lr,{asChild:!0,children:c.jsxs(Ye,{size:"default",disabled:!p,className:"h-9 min-w-[156px] px-5 text-sm gap-2 ml-auto",onClick:M=>{M.preventDefault(),M.stopPropagation(),w()},children:[c.jsx(ss,{size:14}),c.jsx("span",{children:"Save"})]})}),c.jsx(lr,{children:"Save to file"})]}),S&&m!=null&&c.jsxs(Rr,{children:[c.jsx(Lr,{asChild:!0,children:c.jsxs(Ye,{size:"default",disabled:!p||k,className:"h-9 min-w-[156px] px-5 text-sm gap-2 ml-auto",onClick:M=>{M.preventDefault(),M.stopPropagation(),m()},children:[c.jsx(ss,{size:14}),c.jsx("span",{children:k?"Saving...":"Hot Save"})]})}),c.jsx(lr,{children:"Hot save to edge"})]}),C!=null&&j&&c.jsx("button",{type:"button",onClick:C,className:"shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all border border-zinc-700 bg-zinc-900 text-zinc-400 hover:bg-zinc-800 hover:border-zinc-600 hover:text-zinc-300",title:"Ripristina la pagina dal file (elimina le modifiche in memoria)",children:c.jsx("span",{children:"Ripristina da file"})})]})}),X!=null&&r.length>0&&o!=null&&(()=>{const M=r.find(A=>A.id===X),Z=l.find(A=>A.id===X);if(!M)return null;const ie=(Z==null?void 0:Z.scope)==="global"?"global":"local",fe=M.type,_e=R[fe],Oe=(_e?Object.keys(_e.shape):[]).filter(A=>bi.has(A)),Lt=M.data??{};return Oe.length===0?c.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"section-settings-modal-title",onClick:()=>re(null),children:c.jsxs("div",{ref:$,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full overflow-hidden",onClick:A=>A.stopPropagation(),children:[c.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800",children:[c.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",fe]}),c.jsx("button",{type:"button",onClick:()=>re(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings",children:c.jsx(Ut,{size:18})})]}),c.jsx("div",{className:"p-4",children:c.jsx("p",{className:"text-xs text-zinc-500",children:"No settings fields for this section."})})]})}):c.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"section-settings-modal-title",onClick:A=>A.target===A.currentTarget&&re(null),children:c.jsxs("div",{ref:$,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full max-h-[85vh] flex flex-col overflow-hidden",onClick:A=>A.stopPropagation(),children:[c.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[c.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",fe]}),c.jsx("button",{type:"button",onClick:()=>re(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings (Escape)",children:c.jsx(Ut,{size:18})})]}),c.jsx("div",{className:"flex-1 overflow-y-auto p-4 custom-scrollbar",children:c.jsx(Ir,{schema:_e,data:Lt,onChange:A=>{const O={...M.data,...A};o(X,ie,fe,O)},keys:Oe})})]})})})()]})})},vc=({draft:e,globalDraft:t,menuConfig:r,themeConfig:n,slug:o,selectedId:i,scrollToSectionId:s,onScrollRequested:a})=>{const l=g.useRef(null),d=g.useCallback(()=>{var u;(u=l.current)!=null&&u.contentWindow&&l.current.contentWindow.postMessage({type:xe.UPDATE_DRAFTS,draft:e,globalDraft:t,menuConfig:r,themeConfig:n},"*")},[e,t,r,n]);return g.useEffect(()=>{d()},[d]),g.useEffect(()=>{const u=f=>{f.data.type===xe.STAGE_READY&&d()};return window.addEventListener("message",u),()=>window.removeEventListener("message",u)},[d]),g.useEffect(()=>{var u;(u=l.current)!=null&&u.contentWindow&&l.current.contentWindow.postMessage({type:xe.SYNC_SELECTION,selectedId:i},"*")},[i]),g.useEffect(()=>{var u;!s||!((u=l.current)!=null&&u.contentWindow)||(l.current.contentWindow.postMessage({type:xe.REQUEST_SCROLL_TO_SECTION,sectionId:s},"*"),a==null||a())},[s,a]),c.jsx("div",{className:"w-full h-full bg-background overflow-hidden",children:c.jsx("iframe",{ref:l,src:`/admin/preview/${o}`,className:"w-full h-full border-none",title:"JsonPages Stage"})})},yi=new Set;function v0(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function xc(e,t=[],r={}){return Object.entries(e).forEach(([n,o])=>{const i=[...t,v0(n)];if(typeof o=="string"||typeof o=="number"){r[`--theme-${i.join("-")}`]=String(o);return}o&&typeof o=="object"&&!Array.isArray(o)&&xc(o,i,r)}),r}function We(e,t,r,n){n&&(e[t]=`var(${r})`)}function x0(e){const t=xc(e.tokens),r={...t};return We(r,"--theme-primary","--theme-colors-primary",t["--theme-colors-primary"]),We(r,"--theme-secondary","--theme-colors-secondary",t["--theme-colors-secondary"]),We(r,"--theme-accent","--theme-colors-accent",t["--theme-colors-accent"]),We(r,"--theme-background","--theme-colors-background",t["--theme-colors-background"]),We(r,"--theme-surface","--theme-colors-surface",t["--theme-colors-surface"]),We(r,"--theme-surface-alt","--theme-colors-surface-alt",t["--theme-colors-surface-alt"]),We(r,"--theme-text","--theme-colors-text",t["--theme-colors-text"]),We(r,"--theme-text-muted","--theme-colors-text-muted",t["--theme-colors-text-muted"]),We(r,"--theme-border","--theme-colors-border",t["--theme-colors-border"]),We(r,"--theme-font-primary","--theme-typography-font-family-primary",t["--theme-typography-font-family-primary"]),We(r,"--theme-font-mono","--theme-typography-font-family-mono",t["--theme-typography-font-family-mono"]),We(r,"--theme-font-display","--theme-typography-font-family-display",t["--theme-typography-font-family-display"]),We(r,"--theme-radius-sm","--theme-border-radius-sm",t["--theme-border-radius-sm"]),We(r,"--theme-radius-md","--theme-border-radius-md",t["--theme-border-radius-md"]),We(r,"--theme-radius-lg","--theme-border-radius-lg",t["--theme-border-radius-lg"]),r}const eo={setTheme:e=>{const t=document.documentElement,r=x0(e);yi.forEach(n=>{t.style.removeProperty(n)}),yi.clear(),Object.entries(r).forEach(([n,o])=>{t.style.setProperty(n,o),yi.add(n)})}};function w0(e,t){if(!t)return e;const r=e[e.length-1];return r&&r.itemId==null&&r.fieldKey===t?e:[...e,{fieldKey:t}]}function wc(e,t){var i,s,a;const r=[];let n=null,o=e;for(;o&&o!==t;){const l=(i=o.getAttribute)==null?void 0:i.call(o,"data-jp-item-id"),d=(s=o.getAttribute)==null?void 0:s.call(o,"data-jp-item-field");if(l&&d&&r.push({fieldKey:d,itemId:l}),n==null){const u=(a=o.getAttribute)==null?void 0:a.call(o,"data-jp-field");u&&(n=u)}o=o.parentElement}return r.reverse(),w0(r,n)}const y0='[data-jp-ignore-select="true"],[data-jp-interactive="true"],.ProseMirror,[contenteditable="true"],button,input,textarea,select,[role="button"],[role="menuitem"]',k0="[data-jp-field],[data-jp-item-id],[data-jp-item-field]",yc=()=>{var h;const[e,t]=g.useState(null),[r,n]=g.useState(null),[o,i]=g.useState({main:[]}),[s,a]=g.useState(null),[l,d]=g.useState(null);if(g.useEffect(()=>{const p=w=>{var m;if(!(w.origin!==window.location.origin||w.source!==window.parent)&&(w.data.type===xe.UPDATE_DRAFTS&&(t(w.data.draft),n(w.data.globalDraft),(m=w.data.menuConfig)!=null&&m.main&&i({main:w.data.menuConfig.main}),w.data.themeConfig&&eo.setTheme(w.data.themeConfig)),w.data.type===xe.SYNC_SELECTION&&a(w.data.selectedId),w.data.type===xe.REQUEST_SCROLL_TO_SECTION&&d(w.data.sectionId??null),w.data.type===xe.REQUEST_INLINE_FLUSH)){const v=typeof w.data.requestId=="string"?w.data.requestId:null;window.dispatchEvent(new CustomEvent(xe.REQUEST_INLINE_FLUSH,{detail:{requestId:v}})),setTimeout(()=>{window.parent.postMessage({type:xe.INLINE_FLUSHED,requestId:v},window.location.origin)},0)}};return window.addEventListener("message",p),window.parent.postMessage({type:xe.STAGE_READY},"*"),()=>window.removeEventListener("message",p)},[]),g.useEffect(()=>{const p=v=>!!v.closest(k0),w=v=>!!(v.closest('[data-jp-ignore-select="true"]')||v.closest(y0)&&!p(v)||v.closest("a[href]")&&!p(v)),m=v=>{var _,G,B;const y=v.target;if(w(y)){y.closest("a[href]")&&v.preventDefault();return}const k=v.clientX,x=v.clientY;let S=null,C=y;for(;C&&C!==document.body;){const F=(_=C.getAttribute)==null?void 0:_.call(C,"data-section-id"),U=(G=C.getAttribute)==null?void 0:G.call(C,"data-section-type"),z=(B=C.getAttribute)==null?void 0:B.call(C,"data-section-scope");if(F&&U&&z){S=C;break}C=C.parentElement}if(!S)return;v.preventDefault(),v.stopPropagation();const j=S.getAttribute("data-section-id"),N=S.getAttribute("data-section-type"),E=S.getAttribute("data-section-scope");if(!j||!N||!E)return;const D={id:j,type:N,scope:E};if(y===S){window.parent.postMessage({type:xe.SECTION_SELECT,section:D},"*");return}const R=document.elementFromPoint(k,x)??y;if(!R||!S.contains(R)){window.parent.postMessage({type:xe.SECTION_SELECT,section:D},"*");return}if(R===S){window.parent.postMessage({type:xe.SECTION_SELECT,section:D},"*");return}let I=wc(R,S);if(I.length===0&&R){let F=null;const U=z=>{var re,T;const X=z.getBoundingClientRect();if(X.left<=k&&k<=X.right&&X.top<=x&&x<=X.bottom){for(let $=0;$<z.children.length;$++)U(z.children[$]);((re=z.getAttribute)!=null&&re.call(z,"data-jp-item-id")||(T=z.getAttribute)!=null&&T.call(z,"data-jp-field"))&&(F=z)}};U(R),F&&(I=wc(F,S))}const L={type:xe.SECTION_SELECT,section:D};I.length>0&&(L.itemPath=I),window.parent.postMessage(L,"*")};return document.addEventListener("click",m,!0),()=>document.removeEventListener("click",m,!0)},[]),g.useEffect(()=>{if(!l)return;const p=setTimeout(()=>d(null),600);return()=>clearTimeout(p)},[l]),!e||!r)return c.jsx("div",{className:"flex items-center justify-center h-screen w-full bg-zinc-950 text-zinc-500 font-mono text-xs uppercase tracking-widest animate-pulse",children:"Waiting for Studio Signal..."});const u={main:nn((h=r.header)==null?void 0:h.data,o.main)},f=p=>{window.parent.postMessage({type:xe.ACTIVE_SECTION_CHANGED,activeSectionId:p},"*")};return c.jsx(Jr,{mode:"studio",children:c.jsx("div",{className:"jp-ice-active",children:c.jsx(ho,{pageConfig:e,siteConfig:r,menuConfig:u,selectedId:s,scrollToSectionId:l,onActiveSectionChange:f})})})};function S0(e){return e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}const kc=({open:e,onClose:t,sectionTypes:r,sectionTypeLabels:n,onSelect:o})=>{if(g.useEffect(()=>{if(!e)return;const s=a=>{a.key==="Escape"&&t()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[e,t]),!e)return null;const i=s=>(n==null?void 0:n[s])??S0(s);return c.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":"jp-add-section-title",children:[c.jsx("div",{className:"absolute inset-0 bg-zinc-950/80 backdrop-blur-sm",onClick:t,"aria-hidden":"true"}),c.jsxs("div",{className:"relative w-full max-w-md max-h-[85vh] flex flex-col rounded-xl border border-zinc-700 bg-zinc-900 shadow-2xl overflow-hidden",children:[c.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-zinc-800 shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/20 text-blue-400",children:c.jsx(uo,{size:18})}),c.jsx("h2",{id:"jp-add-section-title",className:"text-sm font-bold text-white",children:"Add section"})]}),c.jsx("button",{type:"button",onClick:t,className:"p-1.5 rounded-md text-zinc-400 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close",children:c.jsx(Ut,{size:18})})]}),c.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:r.length===0?c.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"No section types available. Configure addableSectionTypes or schemas."}):c.jsx("ul",{className:"grid gap-2",role:"listbox",children:r.map(s=>c.jsx("li",{role:"option",children:c.jsxs("button",{type:"button",onClick:()=>{o(s),t()},className:oe("w-full flex items-center gap-3 px-4 py-3 rounded-lg text-left","border border-zinc-700/80 bg-zinc-800/50","hover:border-blue-500/40 hover:bg-zinc-800 transition-colors","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:ring-offset-2 focus:ring-offset-zinc-900"),children:[c.jsx("span",{className:"flex items-center justify-center w-9 h-9 rounded-md bg-zinc-700/80 text-zinc-400 text-xs font-mono shrink-0",children:s}),c.jsx("span",{className:"text-sm font-medium text-zinc-200",children:i(s)})]})},s))})}),c.jsx("div",{className:"px-5 py-3 border-t border-zinc-800 shrink-0",children:c.jsx("p",{className:"text-[10px] text-zinc-500 uppercase tracking-wider",children:"Choose a section type to add to the bottom of this page"})})]})]})},Sc=()=>c.jsxs("div",{style:{"--local-bg":"var(--color-background)","--local-text":"var(--color-text)","--local-text-muted":"var(--color-text-muted)","--local-primary":"var(--color-primary)","--local-radius-md":"var(--radius-md)"},className:"min-h-screen flex flex-col items-center justify-center bg-[var(--local-bg)] px-6",children:[c.jsx("h1",{className:"text-6xl font-bold text-[var(--local-text)] mb-4",children:"404"}),c.jsx("p",{className:"text-xl text-[var(--local-text-muted)] mb-8",children:"Page not found"}),c.jsx("a",{href:"/",className:"inline-flex items-center gap-2 px-6 py-3 rounded-[var(--local-radius-md)] bg-[var(--local-primary)] text-[var(--local-bg)] font-semibold text-sm hover:opacity-90 transition-opacity",children:"Back to Home"})]});function ki(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Cc(e){return e==null?e:JSON.parse(JSON.stringify(e))}function Ec(){if(typeof window>"u")return null;const e=window;return e.__olonWebMcpTools__||(e.__olonWebMcpTools__=new Map),e.__olonWebMcpTools__}const Fr="update-section-draft",to="save-project-state";function jc(){return{type:"object",additionalProperties:!1,properties:{slug:{type:"string"},sectionId:{type:"string",description:"The unique ID of the section to update (found via data-jp-section-id or MCP read)."},sectionType:{type:"string",description:'The type of the section being updated (e.g. "olon-hero"). Used to pick the correct validation schema.'},scope:{type:"string",enum:["local","global"],default:"local"},data:{type:"object",description:"Full replacement payload validated against the section's schema."},itemPath:{type:"array",description:"Optional root-to-leaf path for targeted field updates.",items:{type:"object",additionalProperties:!1,properties:{fieldKey:{type:"string"},itemId:{type:"string"}},required:["fieldKey"]}},fieldKey:{type:"string",description:"Shorthand for a top-level scalar field update when itemPath is omitted."},value:{description:"Value written to the targeted field or array item."}},required:["sectionId"],oneOf:[{required:["data"]},{required:["itemPath","value"]},{required:["fieldKey","value"]}]}}function Nc(){return{type:"object",additionalProperties:!1,properties:{message:{type:"string",description:"Optional save reason or commit message equivalent."}}}}function Si(e,t,r){if(t.length===0)throw new Error("Selection path is empty.");const n=Cc(e);let o=n;for(let i=0;i<t.length;i+=1){const s=t[i],a=i===t.length-1;if(!ki(o))throw new Error(`Cannot navigate path segment "${s.fieldKey}" on a non-object value.`);if(s.itemId!=null){const l=o[s.fieldKey];if(!Array.isArray(l))throw new Error(`Field "${s.fieldKey}" is not an array.`);const d=l.findIndex(u=>ki(u)&&String(u.id??"")===String(s.itemId));if(d===-1)throw new Error(`Array item "${s.itemId}" not found under "${s.fieldKey}".`);if(a)return l[d]=r,n;o=l[d];continue}if(a)return o[s.fieldKey]=r,n;o=o[s.fieldKey]}return n}function Ci(e,t){if(t.data&&ki(t.data))return Cc(t.data);if(Array.isArray(t.itemPath)&&t.itemPath.length>0)return Si(e,t.itemPath,t.value);if(typeof t.fieldKey=="string"&&t.fieldKey.trim().length>0)return Si(e,[{fieldKey:t.fieldKey}],t.value);throw new Error('WebMCP mutation requires either "data", "itemPath", or "fieldKey".')}async function Tc(e){if(e.startsWith("olon://pages/")){const t=e.replace("olon://pages/",""),r=window.location.pathname.replace(/\/admin(\/.*)?$/,"").replace(/\/$/,""),n=await fetch(`${r}/pages/${t}.json`);if(!n.ok)throw new Error(`Resource not found: ${e} (at ${r}/pages/${t}.json)`);return await n.json()}throw new Error(`Unsupported URI scheme: ${e}`)}function ro(){if(typeof window>"u"||typeof navigator>"u")return;const e=Ec();if(!e)return;const t=navigator;t.modelContext||(t.modelContext={}),t.modelContext.registerTool=function(r){e.set(r.name,r)},t.modelContext.unregisterTool=function(r){e.delete(r)},t.modelContext.readResource=Tc,t.modelContextProtocol||(t.modelContextProtocol={}),t.modelContextProtocol.listTools=function(){return Array.from(e.values()).map(({execute:r,...n})=>n)},t.modelContextProtocol.executeTool=async function(r,n){const o=e.get(r);if(!o)throw new Error(`Unknown WebMCP tool: ${r}`);const i=n?JSON.parse(n):{},s=await o.execute(i);return JSON.stringify(s)},t.modelContextProtocol.readResource=async function(r){const n=await Tc(r);return JSON.stringify(n)}}function Ei(e){var n,o;if(typeof navigator>"u")return()=>{};ro();const t=navigator,r=Ec();return!t.modelContext||!r?()=>{}:((o=(n=t.modelContext).registerTool)==null||o.call(n,e),r.set(e.name,e),()=>{var i,s;r.delete(e.name),(s=(i=t.modelContext)==null?void 0:i.unregisterTool)==null||s.call(i,e.name)})}const C0='/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-900:oklch(39.6% .141 25.723);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-zinc-950:oklch(14.1% .005 285.823);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-black:900;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:var(--background);--color-foreground:var(--foreground);--color-primary:var(--primary);--color-primary-foreground:var(--primary-foreground);--color-destructive:var(--destructive);--color-ring:var(--ring)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border)}body{background-color:var(--background);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-3{left:calc(var(--spacing)*3)}.z-0{z-index:0}.z-10{z-index:10}.z-50,.z-\\[50\\]{z-index:50}.z-\\[60\\]{z-index:60}.z-\\[70\\]{z-index:70}.z-\\[100\\]{z-index:100}.z-\\[9998\\]{z-index:9998}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-4{margin:calc(var(--spacing)*4)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-1\\.5{margin-inline:calc(var(--spacing)*1.5)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-3{margin-inline:calc(var(--spacing)*3)}.my-1{margin-block:calc(var(--spacing)*1)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.aspect-\\[4\\/3\\]{aspect-ratio:4/3}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-20{height:calc(var(--spacing)*20)}.h-40{height:calc(var(--spacing)*40)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-screen{height:100vh}.max-h-96{max-height:calc(var(--spacing)*96)}.max-h-\\[45vh\\]{max-height:45vh}.max-h-\\[85vh\\]{max-height:85vh}.max-h-\\[90vh\\]{max-height:90vh}.max-h-\\[320px\\]{max-height:320px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-16{min-height:calc(var(--spacing)*16)}.min-h-\\[18px\\]{min-height:18px}.min-h-\\[96px\\]{min-height:96px}.min-h-\\[240px\\]{min-height:240px}.min-h-screen{min-height:100vh}.w-1{width:calc(var(--spacing)*1)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-3\\/4{width:75%}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)}.w-\\[var\\(--radix-popover-trigger-width\\)\\]{width:var(--radix-popover-trigger-width)}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[var\\(--inspector-width\\,280px\\)\\]{max-width:var(--inspector-width,280px)}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[18px\\]{min-width:18px}.min-w-\\[156px\\]{min-width:156px}.min-w-\\[var\\(--radix-popover-trigger-width\\)\\]{min-width:var(--radix-popover-trigger-width)}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0\\.5{--tw-translate-x:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-3{--tw-translate-x:calc(var(--spacing)*3);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize-none{resize:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing)*0)}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-\\[var\\(--local-radius-md\\)\\]{border-radius:var(--local-radius-md)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-amber-500\\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\\/20{border-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\\/30{border-color:color-mix(in oklab,var(--color-amber-500)30%,transparent)}}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-500\\/50{border-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.border-blue-500\\/50{border-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.border-blue-600{border-color:var(--color-blue-600)}.border-emerald-500\\/60{border-color:#00bb7f99}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\\/60{border-color:color-mix(in oklab,var(--color-emerald-500)60%,transparent)}}.border-primary{border-color:var(--color-primary)}.border-red-500\\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/20{border-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.border-red-500\\/50{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/50{border-color:color-mix(in oklab,var(--color-red-500)50%,transparent)}}.border-red-900\\/30{border-color:#82181a4d}@supports (color:color-mix(in lab,red,red)){.border-red-900\\/30{border-color:color-mix(in oklab,var(--color-red-900)30%,transparent)}}.border-transparent{border-color:#0000}.border-zinc-700{border-color:var(--color-zinc-700)}.border-zinc-700\\/60{border-color:#3f3f4699}@supports (color:color-mix(in lab,red,red)){.border-zinc-700\\/60{border-color:color-mix(in oklab,var(--color-zinc-700)60%,transparent)}}.border-zinc-700\\/80{border-color:#3f3f46cc}@supports (color:color-mix(in lab,red,red)){.border-zinc-700\\/80{border-color:color-mix(in oklab,var(--color-zinc-700)80%,transparent)}}.border-zinc-800{border-color:var(--color-zinc-800)}.border-zinc-800\\/50{border-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/50{border-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.border-zinc-800\\/60{border-color:#27272a99}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/60{border-color:color-mix(in oklab,var(--color-zinc-800)60%,transparent)}}.border-l-transparent{border-left-color:#0000}.bg-\\[var\\(--color-background\\)\\]{background-color:var(--color-background)}.bg-\\[var\\(--local-bg\\)\\]{background-color:var(--local-bg)}.bg-\\[var\\(--local-primary\\)\\]{background-color:var(--local-primary)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/5{background-color:color-mix(in oklab,var(--color-amber-500)5%,transparent)}}.bg-amber-500\\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/10{background-color:color-mix(in oklab,var(--color-amber-500)10%,transparent)}}.bg-background{background-color:var(--color-background)}.bg-black{background-color:var(--color-black)}.bg-black\\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.bg-black\\/0{background-color:color-mix(in oklab,var(--color-black)0%,transparent)}}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\\/30{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\\/60{background-color:color-mix(in oklab,var(--color-black)60%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/5{background-color:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/5{background-color:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.bg-blue-500\\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/10{background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.bg-blue-500\\/15{background-color:#3080ff26}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/15{background-color:color-mix(in oklab,var(--color-blue-500)15%,transparent)}}.bg-blue-500\\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.bg-blue-500\\/\\[0\\.04\\]{background-color:#3080ff0a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/\\[0\\.04\\]{background-color:color-mix(in oklab,var(--color-blue-500)4%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-blue-600\\/10{background-color:#155dfc1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-600\\/10{background-color:color-mix(in oklab,var(--color-blue-600)10%,transparent)}}.bg-destructive\\/15{background-color:var(--color-destructive)}@supports (color:color-mix(in lab,red,red)){.bg-destructive\\/15{background-color:color-mix(in oklab,var(--color-destructive)15%,transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-primary,.bg-primary\\/10{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/10{background-color:color-mix(in oklab,var(--color-primary)10%,transparent)}}.bg-primary\\/\\[0\\.08\\]{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/\\[0\\.08\\]{background-color:color-mix(in oklab,var(--color-primary)8%,transparent)}}.bg-red-500\\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-red-500\\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/15{background-color:color-mix(in oklab,var(--color-red-500)15%,transparent)}}.bg-red-900\\/10{background-color:#82181a1a}@supports (color:color-mix(in lab,red,red)){.bg-red-900\\/10{background-color:color-mix(in oklab,var(--color-red-900)10%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/15{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.bg-white\\/15{background-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-white\\/\\[0\\.01\\]{background-color:#ffffff03}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.01\\]{background-color:color-mix(in oklab,var(--color-white)1%,transparent)}}.bg-white\\/\\[0\\.02\\]{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.02\\]{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.bg-white\\/\\[0\\.03\\]{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.03\\]{background-color:color-mix(in oklab,var(--color-white)3%,transparent)}}.bg-zinc-700{background-color:var(--color-zinc-700)}.bg-zinc-700\\/80{background-color:#3f3f46cc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-700\\/80{background-color:color-mix(in oklab,var(--color-zinc-700)80%,transparent)}}.bg-zinc-800{background-color:var(--color-zinc-800)}.bg-zinc-800\\/30{background-color:#27272a4d}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/30{background-color:color-mix(in oklab,var(--color-zinc-800)30%,transparent)}}.bg-zinc-800\\/50{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/50{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.bg-zinc-800\\/60{background-color:#27272a99}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/60{background-color:color-mix(in oklab,var(--color-zinc-800)60%,transparent)}}.bg-zinc-800\\/80{background-color:#27272acc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/80{background-color:color-mix(in oklab,var(--color-zinc-800)80%,transparent)}}.bg-zinc-900{background-color:var(--color-zinc-900)}.bg-zinc-900\\/20{background-color:#18181b33}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/20{background-color:color-mix(in oklab,var(--color-zinc-900)20%,transparent)}}.bg-zinc-900\\/40{background-color:#18181b66}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/40{background-color:color-mix(in oklab,var(--color-zinc-900)40%,transparent)}}.bg-zinc-900\\/50{background-color:#18181b80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/50{background-color:color-mix(in oklab,var(--color-zinc-900)50%,transparent)}}.bg-zinc-900\\/60{background-color:#18181b99}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/60{background-color:color-mix(in oklab,var(--color-zinc-900)60%,transparent)}}.bg-zinc-950{background-color:var(--color-zinc-950)}.bg-zinc-950\\/80{background-color:#09090bcc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-950\\/80{background-color:color-mix(in oklab,var(--color-zinc-950)80%,transparent)}}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-black\\/70{--tw-gradient-from:#000000b3}@supports (color:color-mix(in lab,red,red)){.from-black\\/70{--tw-gradient-from:color-mix(in oklab,var(--color-black)70%,transparent)}}.from-black\\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-black\\/80{--tw-gradient-from:#000c}@supports (color:color-mix(in lab,red,red)){.from-black\\/80{--tw-gradient-from:color-mix(in oklab,var(--color-black)80%,transparent)}}.from-black\\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2\\.5{padding:calc(var(--spacing)*2.5)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.p-px{padding:1px}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-3\\.5{padding-inline:calc(var(--spacing)*3.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-7{padding-block:calc(var(--spacing)*7)}.py-8{padding-block:calc(var(--spacing)*8)}.py-10{padding-block:calc(var(--spacing)*10)}.py-12{padding-block:calc(var(--spacing)*12)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-4{padding-right:calc(var(--spacing)*4)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-8{padding-left:calc(var(--spacing)*8)}.pl-9{padding-left:calc(var(--spacing)*9)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.01em\\]{--tw-tracking:.01em;letter-spacing:.01em}.tracking-\\[0\\.02em\\]{--tw-tracking:.02em;letter-spacing:.02em}.tracking-\\[0\\.04em\\]{--tw-tracking:.04em;letter-spacing:.04em}.tracking-\\[0\\.05em\\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\\[0\\.06em\\]{--tw-tracking:.06em;letter-spacing:.06em}.tracking-\\[0\\.08em\\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.whitespace-nowrap{white-space:nowrap}.text-\\[var\\(--local-bg\\)\\]{color:var(--local-bg)}.text-\\[var\\(--local-text\\)\\]{color:var(--local-text)}.text-\\[var\\(--local-text-muted\\)\\]{color:var(--local-text-muted)}.text-amber-200{color:var(--color-amber-200)}.text-amber-500{color:var(--color-amber-500)}.text-amber-500\\/70{color:#f99c00b3}@supports (color:color-mix(in lab,red,red)){.text-amber-500\\/70{color:color-mix(in oklab,var(--color-amber-500)70%,transparent)}}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-destructive{color:var(--color-destructive)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground{color:var(--color-foreground)}.text-primary{color:var(--color-primary)}.text-primary-foreground{color:var(--color-primary-foreground)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-white{color:var(--color-white)}.text-zinc-200{color:var(--color-zinc-200)}.text-zinc-300{color:var(--color-zinc-300)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.text-zinc-600\\/50{color:#52525c80}@supports (color:color-mix(in lab,red,red)){.text-zinc-600\\/50{color:color-mix(in oklab,var(--color-zinc-600)50%,transparent)}}.text-zinc-700{color:var(--color-zinc-700)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_8px_rgba\\(245\\,158\\,11\\,0\\.5\\)\\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#f59e0b80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-black\\/30{--tw-shadow-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.shadow-black\\/30{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-black)30%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-primary\\/20{--tw-shadow-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.shadow-primary\\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-primary)20%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-blue-500{--tw-ring-color:var(--color-blue-500)}.ring-blue-500\\/40{--tw-ring-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.ring-blue-500\\/40{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.ring-zinc-800{--tw-ring-color:var(--color-zinc-800)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-zinc-900{--tw-ring-offset-color:var(--color-zinc-900)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.brightness-\\[0\\.6\\]{--tw-brightness:brightness(.6);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.brightness-\\[0\\.85\\]{--tw-brightness:brightness(.85);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition-\\[border-color\\,opacity\\]{transition-property:border-color,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[filter\\]{transition-property:filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:border-dashed:is(:where(.group):hover *){--tw-border-style:dashed;border-style:dashed}.group-hover\\:border-blue-400\\/50:is(:where(.group):hover *){border-color:#54a2ff80}@supports (color:color-mix(in lab,red,red)){.group-hover\\:border-blue-400\\/50:is(:where(.group):hover *){border-color:color-mix(in oklab,var(--color-blue-400)50%,transparent)}}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\\:brightness-100:is(:where(.group):hover *){--tw-brightness:brightness(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.hover\\:scale-\\[1\\.02\\]:hover{scale:1.02}.hover\\:border-blue-500\\/30:hover{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.hover\\:border-blue-500\\/30:hover{border-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}.hover\\:border-blue-500\\/40:hover{border-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.hover\\:border-blue-500\\/40:hover{border-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.hover\\:border-zinc-600:hover{border-color:var(--color-zinc-600)}.hover\\:border-zinc-700:hover{border-color:var(--color-zinc-700)}.hover\\:bg-blue-500\\/\\[0\\.03\\]:hover{background-color:#3080ff08}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-500\\/\\[0\\.03\\]:hover{background-color:color-mix(in oklab,var(--color-blue-500)3%,transparent)}}.hover\\:bg-blue-600\\/20:hover{background-color:#155dfc33}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-600\\/20:hover{background-color:color-mix(in oklab,var(--color-blue-600)20%,transparent)}}.hover\\:bg-destructive\\/25:hover{background-color:var(--color-destructive)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-destructive\\/25:hover{background-color:color-mix(in oklab,var(--color-destructive)25%,transparent)}}.hover\\:bg-primary\\/40:hover{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/40:hover{background-color:color-mix(in oklab,var(--color-primary)40%,transparent)}}.hover\\:bg-primary\\/90:hover{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--color-primary)90%,transparent)}}.hover\\:bg-red-500\\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/10:hover{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.hover\\:bg-red-500\\/25:hover{background-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/25:hover{background-color:color-mix(in oklab,var(--color-red-500)25%,transparent)}}.hover\\:bg-white\\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/30:hover{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.hover\\:bg-zinc-600:hover{background-color:var(--color-zinc-600)}.hover\\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.hover\\:bg-zinc-800\\/40:hover{background-color:#27272a66}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/40:hover{background-color:color-mix(in oklab,var(--color-zinc-800)40%,transparent)}}.hover\\:bg-zinc-800\\/50:hover{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/50:hover{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.hover\\:bg-zinc-900:hover{background-color:var(--color-zinc-900)}.hover\\:text-blue-400:hover{color:var(--color-blue-400)}.hover\\:text-destructive:hover{color:var(--color-destructive)}.hover\\:text-primary:hover{color:var(--color-primary)}.hover\\:text-red-200:hover{color:var(--color-red-200)}.hover\\:text-red-400:hover{color:var(--color-red-400)}.hover\\:text-red-500:hover{color:var(--color-red-500)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:text-zinc-200:hover{color:var(--color-zinc-200)}.hover\\:text-zinc-300:hover{color:var(--color-zinc-300)}.hover\\:text-zinc-400:hover{color:var(--color-zinc-400)}.hover\\:opacity-90:hover{opacity:.9}.hover\\:ring-zinc-600:hover{--tw-ring-color:var(--color-zinc-600)}}.focus\\:bg-zinc-800:focus{background-color:var(--color-zinc-800)}.focus\\:text-white:focus{color:var(--color-white)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-blue-500\\/50:focus{--tw-ring-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.focus\\:ring-blue-500\\/50:focus{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.focus\\:ring-blue-600:focus{--tw-ring-color:var(--color-blue-600)}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:ring-offset-zinc-900:focus{--tw-ring-offset-color:var(--color-zinc-900)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:border-zinc-600:focus-visible{border-color:var(--color-zinc-600)}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-blue-500:focus-visible{--tw-ring-color:var(--color-blue-500)}.focus-visible\\:ring-blue-500\\/80:focus-visible{--tw-ring-color:#3080ffcc}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-blue-500\\/80:focus-visible{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)80%,transparent)}}.focus-visible\\:ring-blue-600:focus-visible{--tw-ring-color:var(--color-blue-600)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color:var(--color-ring)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-zinc-900:focus-visible{--tw-ring-offset-color:var(--color-zinc-900)}.focus-visible\\:ring-offset-zinc-950:focus-visible{--tw-ring-offset-color:var(--color-zinc-950)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-inset:focus-visible{--tw-ring-inset:inset}.active\\:cursor-grabbing:active{cursor:grabbing}.active\\:bg-primary\\/60:active{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.active\\:bg-primary\\/60:active{background-color:color-mix(in oklab,var(--color-primary)60%,transparent)}}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-20:disabled{opacity:.2}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-50:disabled{opacity:.5}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[state\\=open\\]\\:border-zinc-800[data-state=open]{border-color:var(--color-zinc-800)}.data-\\[state\\=open\\]\\:bg-zinc-950[data-state=open]{background-color:var(--color-zinc-950)}.data-\\[state\\=open\\]\\:text-zinc-100[data-state=open]{color:var(--color-zinc-100)}@media(min-width:40rem){.sm\\:max-w-\\[280px\\]{max-width:280px}}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&\\>span\\]\\:line-clamp-1>span{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\\[\\&\\>span\\]\\:flex>span{display:flex}.\\[\\&\\>span\\]\\:items-center>span{align-items:center}.\\[\\&\\>span\\]\\:gap-2>span{gap:calc(var(--spacing)*2)}}:root{--background:oklch(14.1% .005 285.823);--foreground:oklch(98.5% 0 0);--card:oklch(21% .006 285.885);--card-foreground:oklch(98.5% 0 0);--popover:oklch(21% .006 285.885);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(42% .18 266);--primary-foreground:oklch(97% .014 254.604);--secondary:oklch(27.4% .006 286.033);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(27.4% .006 286.033);--muted-foreground:oklch(70.5% .015 286.067);--accent:oklch(42% .18 266);--accent-foreground:oklch(97% .014 254.604);--destructive:oklch(70.4% .191 22.216);--destructive-foreground:oklch(97% .014 254.604);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.2% .016 285.938);--radius:.5rem;--jp-inspector-label-size:11px;--jp-inspector-field-size:13px;font-family:ui-sans-serif,system-ui,sans-serif}[data-radix-portal]{z-index:9999!important}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}';class E0 extends g.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("[JsonPages Engine]",t,r)}render(){return this.state.hasError&&this.state.error?c.jsxs("div",{style:{minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:24,backgroundColor:"#0f172a",color:"#e2e8f0",fontFamily:"ui-sans-serif, system-ui, sans-serif"},children:[c.jsx("h1",{style:{fontSize:"1.25rem",fontWeight:700,marginBottom:8},children:"JsonPages Engine Error"}),c.jsx("pre",{style:{maxWidth:"100%",overflow:"auto",padding:16,backgroundColor:"rgba(0,0,0,0.3)",borderRadius:8,fontSize:12,marginTop:8},children:this.state.error.message})]}):this.props.children}}function Wr(e){return e.split("/").map(t=>t.trim()).filter(Boolean).join("/")}function Ac(e,t=""){const r=Wr(t);let o=e.replace(/\/+/g,"/");if(r){const s=`/${r}`;o===s?o="/":o.startsWith(`${s}/`)&&(o=o.slice(s.length))}return Wr(o)||"home"}function ji(e,t){const r=Wr(t)||"home";return e[r]}function Ni(e,t){return nn(e,t)}function Ti(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function no(e,t){if(typeof document>"u")return;const r=`link[rel="${e}"]`;let n=document.head.querySelector(r);n||(n=document.createElement("link"),n.rel=e,document.head.appendChild(n)),n.href=t}function zc(e,t,r){if(typeof document>"u")return;const n="olonjs-webmcp-jsonld";let o=document.getElementById(n);o||(o=document.createElement("script"),o.type="application/ld+json",o.id=n,document.head.appendChild(o)),o.textContent=JSON.stringify({"@context":"https://schema.org","@type":"WebPage",name:e,description:t,url:r})}function Pc(e){return`/mcp-manifests/${e}.json`}function Oc(e){return`/schemas/${e}.schema.json`}const Ic=({pageRegistry:e,siteConfig:t,menuConfig:r,themeConfig:n,refDocuments:o,tenantCss:i,adminCss:s,NotFoundComponent:a})=>{const l=Je.useLocation(),d=Ac(l.pathname),u=g.useMemo(()=>Ot({pages:e,siteConfig:t,themeConfig:n,menuConfig:r,refDocuments:o}),[e,t,n,r,o]),f=ji(u.pages,d);return g.useEffect(()=>{var h;try{(h=u.themeConfig)!=null&&h.tokens&&eo.setTheme(u.themeConfig)}catch(p){console.warn("[JsonPages] visitor theme resolution failed",p)}},[u.themeConfig]),g.useEffect(()=>{var w,m;if(!f)return;const h=typeof((w=f.meta)==null?void 0:w.title)=="string"?f.meta.title:d,p=typeof((m=f.meta)==null?void 0:m.description)=="string"?f.meta.description:"";no("mcp-manifest",Pc(d)),no("olon-contract",Oc(d)),zc(h,p,d==="home"?"/":`/${d}`)},[f,d]),f?c.jsx(sn,{mode:"tenant",tenantCss:i,adminCss:s,children:c.jsx(Jr,{mode:"visitor",children:c.jsx(ho,{pageConfig:f,siteConfig:u.siteConfig,menuConfig:u.menuConfig})})}):c.jsx(a,{})},Dc=({pageRegistry:e,schemas:t,siteConfig:r,menuConfig:n,themeConfig:o,refDocuments:i,tenantCss:s,adminCss:a,addSectionConfig:l,addableSectionTypes:d,webMcp:u,saveToFile:f,hotSave:h,showLegacySave:p=!0,showHotSave:w=!1})=>{var Lt;const m=Je.useLocation(),v=Ac(m.pathname,"admin"),y=Je.useNavigate(),k=Object.keys(e).sort((A,O)=>A==="home"?-1:O==="home"?1:A.localeCompare(O)),[x,S]=g.useState(null),[C,j]=g.useState(!1),[N,E]=g.useState(!1),[D,R]=g.useState(!1),[I,L]=g.useState(!1),[_,G]=g.useState(()=>{try{const A=JSON.parse(JSON.stringify(r??{}));return A.identity||(A.identity={title:"Site"}),A.pages||(A.pages=[]),A}catch{return{identity:{title:"Site"},pages:[]}}}),[B,F]=g.useState(null),[U,z]=g.useState(null),[X,re]=g.useState(null),[T,$]=g.useState(null),[Y,K]=g.useState(!1),[ge,se]=g.useState(400),P=g.useMemo(()=>Ot({pages:x?{[v]:x}:{},siteConfig:_,themeConfig:o,menuConfig:n,refDocuments:i}),[x,_,o,n,i,v]),J=x?P.pages[v]??x:null,ee=g.useRef(x),W=g.useRef(_),ne=360,te=920;g.useEffect(()=>{ee.current=x},[x]),g.useEffect(()=>{W.current=_},[_]);const we=g.useCallback(A=>{A.preventDefault();const O=A.currentTarget;O.setPointerCapture(A.pointerId);const q=A.clientX,Q=ge,ce=ye=>{const je=q-ye.clientX,de=Math.min(te,Math.max(ne,Q+je));se(de)},pe=()=>{O.releasePointerCapture(A.pointerId),O.removeEventListener("pointermove",ce),O.removeEventListener("pointerup",pe),O.removeEventListener("pointercancel",pe),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",O.addEventListener("pointermove",ce),O.addEventListener("pointerup",pe),O.addEventListener("pointercancel",pe)},[ge]),be=x?[..._.header?[{id:_.header.id,type:_.header.type,scope:"global",title:"Header"}]:[],...x.sections.map(A=>{var O,q;return{id:A.id,type:A.type,scope:"local",title:((O=A.data)==null?void 0:O.title)??((q=A.data)==null?void 0:q.titleHighlight)}}),..._.footer?[{id:_.footer.id,type:_.footer.type,scope:"global",title:"Footer"}]:[]]:[];g.useEffect(()=>{const A=ji(e,v);A&&S(JSON.parse(JSON.stringify(A))),F(null),z(null),j(!1)},[v,e]);const Pe=g.useCallback(()=>{const A=ji(e,v);A&&S(JSON.parse(JSON.stringify(A))),F(null),z(null),j(!1)},[v,e]),De=g.useCallback((A,O,q)=>{const Q=[...q.sections],ce=Q.findIndex(je=>je.id===A);if(ce===-1||O<0||O>=Q.length)return;const[pe]=Q.splice(ce,1),ye=O>ce?O-1:O;Q.splice(Math.min(ye,Q.length),0,pe),S({...q,sections:Q}),j(!0)},[]),Ue=g.useCallback(A=>{if(A.origin===window.location.origin){if(A.data.type===xe.SECTION_SELECT){F(A.data.section);const O=A.data.itemPath;Array.isArray(O)&&O.length>0?z(O.map(q=>({fieldKey:q.fieldKey,...q.itemId!=null?{itemId:String(q.itemId)}:{}}))):z(null)}if(A.data.type===xe.INLINE_FIELD_UPDATE){const O=typeof A.data.sectionId=="string"?A.data.sectionId:null,q=typeof A.data.fieldKey=="string"?A.data.fieldKey:null;O&&q&&(S(Q=>{if(!Q)return Q;const ce={...Q,sections:Q.sections.map(pe=>pe.id===O?{...pe,data:{...pe.data,[q]:A.data.value}}:pe)};return ee.current=ce,ce}),j(!0))}if(A.data.type===xe.ACTIVE_SECTION_CHANGED&&re(A.data.activeSectionId??null),A.data.type==="jsonpages:section-reorder"&&ee.current){const{sectionId:O,newIndex:q}=A.data;typeof O=="string"&&typeof q=="number"&&q>=0&&De(O,q,ee.current)}if(A.data.type===xe.WEBMCP_TOOL_CALL){const O=typeof A.data.requestId=="string"?A.data.requestId:crypto.randomUUID(),q=typeof A.data.toolName=="string"?A.data.toolName:"";Z(q,A.data.args).then(Q=>{window.postMessage({type:xe.WEBMCP_TOOL_RESULT,requestId:O,toolName:q,result:Q,ok:!0},window.location.origin)}).catch(Q=>{const ce=Q instanceof Error?Q.message:String(Q);window.postMessage({type:xe.WEBMCP_TOOL_RESULT,requestId:O,toolName:q,ok:!1,error:ce},window.location.origin)})}}},[De,Z]);g.useEffect(()=>(window.addEventListener("message",Ue),()=>window.removeEventListener("message",Ue)),[Ue]),g.useEffect(()=>{if(!(u!=null&&u.enabled)||(ro(),!ee.current))return;const O=Ei({name:Fr,description:`Update any section in OlonJS Studio's in-memory draft state. Does NOT persist to disk. Use "sectionType" in input args to ensure correct schema validation.`,inputSchema:jc(),execute:Q=>Z(Fr,Q)}),q=Ei({name:to,description:`Persist the current in-memory draft state to disk. Call this after making one or more updates via ${Fr}.`,inputSchema:Nc(),execute:Q=>Z(to,Q)});return()=>{O(),q()}},[u==null?void 0:u.enabled,v,x,_,Z]);const jt=g.useCallback(A=>{const O=be.find(q=>q.id===A);O&&F({id:O.id,type:O.type,scope:O.scope}),z(null),$(A)},[be]),qe=g.useCallback(()=>{$(null)},[]),Be=g.useCallback(A=>{S(O=>O&&{...O,sections:O.sections.filter(q=>q.id!==A)}),j(!0),F(O=>(O==null?void 0:O.id)===A?null:O)},[]),He=A=>{if(!(!B||!x))if(j(!0),B.scope==="global")B.type==="header"&&_.header!=null?G({..._,header:{..._.header,data:A}}):B.type==="footer"&&_.footer!=null&&G({..._,footer:{..._.footer,data:A}});else{const O=x.sections.map(q=>q.id===B.id?{...q,data:A}:q);S({...x,sections:O})}},ht=g.useCallback((A,O,q,Q)=>{var ce,pe;if(j(!0),O==="global")((ce=_.header)==null?void 0:ce.id)===A?G({..._,header:{..._.header,data:Q}}):((pe=_.footer)==null?void 0:pe.id)===A&&G({..._,footer:{..._.footer,data:Q}});else if(x){const ye=x.sections.map(je=>je.id===A?{...je,data:Q}:je);S({...x,sections:ye})}},[x,_]),Xe=g.useCallback(async()=>{const A=document.querySelector("iframe");if(!(A!=null&&A.contentWindow))return;const O=crypto.randomUUID();await new Promise(q=>{var pe;let Q=!1;const ce=ye=>{var je,de;ye.origin===window.location.origin&&((je=ye.data)==null?void 0:je.type)===xe.INLINE_FLUSHED&&((de=ye.data)==null?void 0:de.requestId)===O&&(Q=!0,window.removeEventListener("message",ce),q())};window.addEventListener("message",ce),(pe=A.contentWindow)==null||pe.postMessage({type:xe.REQUEST_INLINE_FLUSH,requestId:O},"*"),window.setTimeout(()=>{Q||(window.removeEventListener("message",ce),q())},400)})},[]),Nt=g.useCallback(async(A,O)=>{var pe;if(!f)throw new Error("saveToFile is not configured for this tenant.");const q=Ot({pages:{[v]:A},siteConfig:O,themeConfig:o,menuConfig:n,refDocuments:i}),Q=(pe=q.siteConfig.header)==null?void 0:pe.data,ce={page:A,site:O,menu:{main:Ni(Q,n.main)},theme:q.themeConfig};await f(ce,v),j(!1),E(!0),typeof window<"u"&&window.setTimeout(()=>E(!1),2500)},[f,v,o,n,i]),Ur=g.useCallback(async A=>{var Le,$e;if(!f)throw new Error("WebMCP requires saveToFile persistence in Studio mode.");if(!Ti(A)||typeof A.sectionId!="string")throw new Error("WebMCP mutation requires a sectionId.");const O=A,q=typeof O.slug=="string"?Wr(O.slug):v;if(q!==v)throw new Error(`WebMCP slug mismatch. Active Studio slug is "${v}", received "${q}".`);await Xe();const Q=ee.current,ce=W.current;if(!Q)throw new Error("Studio draft is not ready yet.");const pe=O.scope==="global"?"global":"local";let ye=Q,je=ce,de=O.sectionType;if(pe==="global"){const Ce=((Le=ce.header)==null?void 0:Le.id)===O.sectionId?ce.header:(($e=ce.footer)==null?void 0:$e.id)===O.sectionId?ce.footer:null;if(!Ce)throw new Error(`Global section "${O.sectionId}" was not found.`);if(!de)de=Ce.type;else if(Ce.type!==de)throw new Error(`Section "${O.sectionId}" is type "${Ce.type}", not "${de}".`);const Ne=t[de];if(!Ne||typeof Ne.parse!="function")throw new Error(`Missing schema for section type "${de}".`);const Me=Ti(Ce.data)?Ce.data:{},Ve=Ci(Me,O),ct=Ne.parse(Ve),ve={...Ce,data:ct};je={...ce,...Ce.type==="header"?{header:ve}:{footer:ve}},W.current=je,G(je)}else{const Ce=Q.sections.find(ve=>ve.id===O.sectionId);if(!Ce)throw new Error(`Local section "${O.sectionId}" was not found in page "${v}".`);if(!de)de=Ce.type;else if(Ce.type!==de)throw new Error(`Section "${O.sectionId}" is type "${Ce.type}", not "${de}".`);const Ne=t[de];if(!Ne||typeof Ne.parse!="function")throw new Error(`Missing schema for section type "${de}".`);const Me=Ti(Ce.data)?Ce.data:{},Ve=Ci(Me,O),ct=Ne.parse(Ve);ye={...Q,sections:Q.sections.map(ve=>ve.id===O.sectionId?{...ve,data:ct}:ve)},ee.current=ye,S(ye)}return F({id:O.sectionId,type:de,scope:pe}),z(Array.isArray(O.itemPath)?O.itemPath:null),j(!0),{content:[{type:"text",text:JSON.stringify({ok:!0,slug:v,sectionId:O.sectionId,sectionType:de,scope:pe,action:"draft_updated"})}],isError:!1}},[f,v,Xe,t]),M=g.useCallback(async A=>{if(!f)throw new Error("WebMCP requires saveToFile persistence in Studio mode.");await Xe();const O=ee.current,q=W.current;if(!O)throw new Error("Studio draft is not ready yet.");return await Nt(O,q),{content:[{type:"text",text:JSON.stringify({ok:!0,slug:v,action:"saved_to_disk"})}],isError:!1}},[f,v,Xe,Nt]);async function Z(A,O){if(A===Fr)return Ur(O);if(A===to)return M(O);throw new Error(`Unknown WebMCP tool "${A}".`)}const ie=async()=>{var pe;if(!f)return;await Xe();const A=ee.current,O=W.current;if(!A)return;const q=Ot({pages:{[v]:A},siteConfig:O,themeConfig:o,menuConfig:n,refDocuments:i}),Q=(pe=q.siteConfig.header)==null?void 0:pe.data,ce={page:A,site:O,menu:{main:Ni(Q,n.main)},theme:q.themeConfig};f(ce,v).then(()=>{j(!1),E(!0),typeof window<"u"&&window.setTimeout(()=>E(!1),2500)}).catch(ye=>{console.error("[JsonPages] saveToFile failed",ye);const je=ye instanceof Error?ye.message:String(ye);alert(`Save to file failed: ${je}`)})},fe=async()=>{var pe;if(!h)return;await Xe();const A=ee.current,O=W.current;if(!A)return;const q=Ot({pages:{[v]:A},siteConfig:O,themeConfig:o,menuConfig:n,refDocuments:i}),Q=(pe=q.siteConfig.header)==null?void 0:pe.data,ce={page:A,site:O,menu:{main:Ni(Q,n.main)},theme:q.themeConfig};L(!0),h(ce,v).then(()=>{j(!1),R(!0),typeof window<"u"&&window.setTimeout(()=>R(!1),2500)}).catch(ye=>{console.error("[JsonPages] hotSave failed",ye);const je=ye instanceof Error?ye.message:String(ye);alert(`Hot save failed: ${je}`)}).finally(()=>{L(!1)})},_e=A=>{var Q;if(!x)return;const O=((Q=l==null?void 0:l.getDefaultSectionData)==null?void 0:Q.call(l,A))??{},q={id:crypto.randomUUID(),type:A,data:O,settings:void 0};S({...x,sections:[...x.sections,q]}),j(!0),F({id:q.id,type:A,scope:"local"})};if(g.useEffect(()=>{var Q,ce;const A=J??x,O=typeof((Q=A==null?void 0:A.meta)==null?void 0:Q.title)=="string"?A.meta.title:v,q=typeof((ce=A==null?void 0:A.meta)==null?void 0:ce.description)=="string"?A.meta.description:"";no("mcp-manifest",Pc(v)),no("olon-contract",Oc(v)),zc(O,q,`/admin${v==="home"?"":`/${v}`}`)},[x,J,v]),!x)return c.jsx("div",{children:"Loading Studio..."});const Se=(B==null?void 0:B.scope)==="global"?{sections:[P.siteConfig.header,P.siteConfig.footer].filter(A=>A!=null)}:J??x,Oe=[...P.siteConfig.header?[P.siteConfig.header]:[],...((Lt=J??x)==null?void 0:Lt.sections)??[],...P.siteConfig.footer?[P.siteConfig.footer]:[]];return c.jsx(sn,{mode:"admin",tenantCss:s,adminCss:a,children:c.jsx(Jr,{mode:"studio",children:c.jsxs("div",{className:"flex flex-col h-screen w-screen bg-background text-foreground overflow-hidden",children:[c.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[c.jsx("main",{className:"flex-1 min-w-0 relative bg-zinc-900/50 overflow-hidden",children:c.jsx(vc,{draft:J??x,globalDraft:P.siteConfig,menuConfig:P.menuConfig,themeConfig:P.themeConfig,slug:v,selectedId:B==null?void 0:B.id,scrollToSectionId:T,onScrollRequested:qe})}),c.jsxs("div",{className:"flex shrink-0 relative h-full z-10",style:{width:ge,minWidth:ne,maxWidth:te},children:[c.jsx("div",{role:"separator","aria-label":"Resize inspector",className:"absolute left-0 top-0 bottom-0 w-1.5 cursor-col-resize hover:bg-primary/40 active:bg-primary/60 transition-colors shrink-0",style:{zIndex:9999},onPointerDown:we}),c.jsx(bc,{selectedSection:B,pageData:Se,allSectionsData:Oe,onUpdate:He,onUpdateSection:ht,onClose:()=>{F(null),z(null)},expandedItemPath:U,onReorderSection:x?(A,O)=>De(A,O,x):void 0,allLayers:be,activeSectionId:X,onRequestScrollToSection:jt,onDeleteSection:x?Be:void 0,onAddSection:d.length>0?()=>K(!0):void 0,hasChanges:C,onSaveToFile:f!=null?ie:void 0,saveSuccessFeedback:N,onHotSave:h!=null?fe:void 0,hotSaveSuccessFeedback:D,hotSaveInProgress:I,showLegacySave:p,showHotSave:w,onResetToFile:Pe,pageSlugs:k,currentSlug:v,onPageChange:k.length>1?A=>{const O=Wr(A);y(O==="home"?"/admin":`/admin/${O}`)}:void 0})]})]}),c.jsx(kc,{open:Y,onClose:()=>K(!1),sectionTypes:d,sectionTypeLabels:l==null?void 0:l.sectionTypeLabels,onSelect:_e})]})})})},_c=({tenantCss:e,adminCss:t})=>c.jsx(sn,{mode:"tenant",tenantCss:e,adminCss:t,children:c.jsx(yc,{})});function j0({config:e}){var k,x,S,C,j;const{registry:t={},schemas:r={},pages:n={},siteConfig:o,themeConfig:i,menuConfig:s,refDocuments:a,themeCss:l,addSection:d,NotFoundComponent:u=Sc}=e,f=(d==null?void 0:d.addableSectionTypes)??Object.keys(r).filter(N=>N!=="header"&&N!=="footer"),h={saveToFile:(k=e.persistence)==null?void 0:k.saveToFile,hotSave:(x=e.persistence)==null?void 0:x.hotSave,showLegacySave:((S=e.persistence)==null?void 0:S.showLegacySave)??!0,showHotSave:((C=e.persistence)==null?void 0:C.showHotSave)??!1},p=typeof(l==null?void 0:l.tenant)=="string"?l.tenant:"",w=typeof(l==null?void 0:l.admin)=="string"?l.admin:C0,m=g.useMemo(()=>Ot({pages:n,siteConfig:o,themeConfig:i,menuConfig:s,refDocuments:a}),[n,o,i,s,a]),[v,y]=g.useState(!1);return g.useEffect(()=>{var N,E;try{(N=m.themeConfig)!=null&&N.tokens&&eo.setTheme(m.themeConfig)}catch(D){console.warn("[JsonPages] setTheme failed",D)}(E=e.webmcp)!=null&&E.enabled&&ro(),y(!0)},[m.themeConfig,(j=e.webmcp)==null?void 0:j.enabled]),v?c.jsx(E0,{children:c.jsx(es,{config:{registry:t,schemas:r,tenantId:e.tenantId??"default",assets:e.assets,overlayDisabledSectionTypes:e.overlayDisabledSectionTypes},children:c.jsx(Je.BrowserRouter,{children:c.jsxs(Je.Routes,{children:[c.jsx(Je.Route,{path:"/",element:c.jsx(Ic,{pageRegistry:n,siteConfig:o,menuConfig:s,themeConfig:m.themeConfig,refDocuments:a,tenantCss:p,adminCss:w,NotFoundComponent:u})}),c.jsx(Je.Route,{path:"/*",element:c.jsx(Ic,{pageRegistry:n,siteConfig:o,menuConfig:s,themeConfig:m.themeConfig,refDocuments:a,tenantCss:p,adminCss:w,NotFoundComponent:u})}),c.jsx(Je.Route,{path:"/admin",element:c.jsx(Dc,{pageRegistry:n,schemas:r,siteConfig:o,menuConfig:s,themeConfig:m.themeConfig,refDocuments:a,tenantCss:p,adminCss:w,addSectionConfig:d,addableSectionTypes:f,webMcp:e.webmcp,saveToFile:h.saveToFile,hotSave:h.hotSave,showLegacySave:h.showLegacySave,showHotSave:h.showHotSave})}),c.jsx(Je.Route,{path:"/admin/*",element:c.jsx(Dc,{pageRegistry:n,schemas:r,siteConfig:o,menuConfig:s,themeConfig:m.themeConfig,refDocuments:a,tenantCss:p,adminCss:w,addSectionConfig:d,addableSectionTypes:f,webMcp:e.webmcp,saveToFile:h.saveToFile,hotSave:h.hotSave,showLegacySave:h.showLegacySave,showHotSave:h.showHotSave})}),c.jsx(Je.Route,{path:"/admin/preview",element:c.jsx(_c,{tenantCss:p,adminCss:w})}),c.jsx(Je.Route,{path:"/admin/preview/*",element:c.jsx(_c,{tenantCss:p,adminCss:w})}),c.jsx(Je.Route,{path:"*",element:c.jsx(u,{})})]})})})}):c.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#0f172a",color:"#94a3b8",fontFamily:"ui-sans-serif, system-ui, sans-serif",fontSize:14},children:"Loading..."})}ae.AddSectionLibrary=kc,ae.AdminSidebar=bc,ae.ConfigProvider=es,ae.DefaultNotFound=Sc,ae.FormFactory=Ir,ae.InputWidgets=ir,ae.JsonPagesEngine=j0,ae.PageRenderer=ho,ae.PreviewEntry=yc,ae.STUDIO_EVENTS=xe,ae.SectionRenderer=hr,ae.StudioProvider=Jr,ae.StudioStage=vc,ae.ThemeLoader=sn,ae.WEBMCP_TOOL_SAVE=to,ae.WEBMCP_TOOL_UPDATE=Fr,ae.applyValueAtSelectionPath=Si,ae.cn=oe,ae.createWebMcpSaveToolInputSchema=Nc,ae.createWebMcpUpdateToolInputSchema=jc,ae.ensureWebMcpRuntime=ro,ae.registerWebMcpTool=Ei,ae.resolveAssetUrl=Hl,ae.resolveHeaderMenuItems=nn,ae.resolveRuntimeConfig=Ot,ae.resolveSectionMenuItems=on,ae.resolveWebMcpMutationData=Ci,ae.shouldRenderSiteGlobalHeader=Pi,ae.themeManager=eo,ae.useConfig=pr,ae.useStudio=rs,Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"})}));
226
+ `)},Mm=0,rr=[];function Rm(e){var t=b.useRef([]),r=b.useRef([0,0]),n=b.useRef(),o=b.useState(Mm++)[0],i=b.useState(Qa)[0],s=b.useRef(e);b.useEffect(function(){s.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=om([e.lockRef.current],(e.shards||[]).map(sl),!0).filter(Boolean);return m.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=b.useCallback(function(m,v){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var y=Un(m),k=r.current,x="deltaX"in m?m.deltaX:k[0]-y[0],S="deltaY"in m?m.deltaY:k[1]-y[1],C,E=m.target,N=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in m&&N==="h"&&E.type==="range")return!1;var j=window.getSelection(),D=j&&j.anchorNode,M=D?D===E||D.contains(E):!1;if(M)return!1;var I=rl(N,E);if(!I)return!0;if(I?C=N:(C=N==="v"?"h":"v",I=rl(N,E)),!I)return!1;if(!n.current&&"changedTouches"in m&&(x||S)&&(n.current=C),!C)return!0;var R=n.current||C;return Im(R,v,m,R==="h"?x:S)},[]),l=b.useCallback(function(m){var v=m;if(!(!rr.length||rr[rr.length-1]!==i)){var y="deltaY"in v?il(v):Un(v),k=t.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&Dm(C.delta,y)})[0];if(k&&k.should){v.cancelable&&v.preventDefault();return}if(!k){var x=(s.current.shards||[]).map(sl).filter(Boolean).filter(function(C){return C.contains(v.target)}),S=x.length>0?a(v,x[0]):!s.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),d=b.useCallback(function(m,v,y,k){var x={name:m,delta:v,target:y,should:k,shadowParent:Lm(y)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),u=b.useCallback(function(m){r.current=Un(m),n.current=void 0},[]),f=b.useCallback(function(m){d(m.type,il(m),m.target,a(m,e.lockRef.current))},[]),h=b.useCallback(function(m){d(m.type,Un(m),m.target,a(m,e.lockRef.current))},[]);b.useEffect(function(){return rr.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,tr),document.addEventListener("touchmove",l,tr),document.addEventListener("touchstart",u,tr),function(){rr=rr.filter(function(m){return m!==i}),document.removeEventListener("wheel",l,tr),document.removeEventListener("touchmove",l,tr),document.removeEventListener("touchstart",u,tr)}},[]);var p=e.removeScrollBar,w=e.inert;return b.createElement(b.Fragment,null,w?b.createElement(i,{styles:_m(o)}):null,p?b.createElement(jm,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Lm(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const $m=pm(Za,Rm);var ni=b.forwardRef(function(e,t){return b.createElement(Fn,dt({},e,{ref:t,sideCar:$m}))});ni.classNames=Fn.classNames;var Fm=[" ","Enter","ArrowUp","ArrowDown"],Wm=[" ","Enter"],Mt="Select",[Bn,Hn,Um]=sp(Mt),[nr]=Ar(Mt,[Um,Zt]),Vn=Zt(),[Bm,Et]=nr(Mt),[Hm,Vm]=nr(Mt),al=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:i,value:s,defaultValue:a,onValueChange:l,dir:d,name:u,autoComplete:f,disabled:h,required:p,form:w}=e,m=Vn(t),[v,y]=b.useState(null),[k,x]=b.useState(null),[S,C]=b.useState(!1),E=lp(d),[N,j]=_n({prop:n,defaultProp:o??!1,onChange:i,caller:Mt}),[D,M]=_n({prop:s,defaultProp:a,onChange:l,caller:Mt}),I=b.useRef(null),R=v?w||!!v.closest("form"):!0,[L,K]=b.useState(new Set),B=Array.from(L).map(W=>W.props.value).join(";");return c.jsx(qo,{...m,children:c.jsxs(Bm,{required:p,scope:t,trigger:v,onTriggerChange:y,valueNode:k,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:zr(),value:D,onValueChange:M,open:N,onOpenChange:j,dir:E,triggerPointerDownPosRef:I,disabled:h,children:[c.jsx(Bn.Provider,{scope:t,children:c.jsx(Hm,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(W=>{K(U=>new Set(U).add(W))},[]),onNativeOptionRemove:b.useCallback(W=>{K(U=>{const A=new Set(U);return A.delete(W),A})},[]),children:r})}),R?c.jsxs(Nl,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:f,value:D,onChange:W=>M(W.target.value),disabled:h,form:w,children:[D===void 0?c.jsx("option",{value:""}):null,Array.from(L)]},B):null]})})};al.displayName=Mt;var ll="SelectTrigger",cl=b.forwardRef((e,t)=>{const{__scopeSelect:r,disabled:n=!1,...o}=e,i=Vn(r),s=Et(ll,r),a=s.disabled||n,l=je(t,s.onTriggerChange),d=Hn(r),u=b.useRef("touch"),[f,h,p]=Al(m=>{const v=d().filter(x=>!x.disabled),y=v.find(x=>x.value===s.value),k=zl(v,m,y);k!==void 0&&s.onValueChange(k.value)}),w=m=>{a||(s.onOpenChange(!0),p()),m&&(s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return c.jsx(In,{asChild:!0,...i,children:c.jsx(Se.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Tl(s.value)?"":void 0,...o,ref:l,onClick:me(o.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&w(m)}),onPointerDown:me(o.onPointerDown,m=>{u.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(w(m),m.preventDefault())}),onKeyDown:me(o.onKeyDown,m=>{const v=f.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&h(m.key),!(v&&m.key===" ")&&Fm.includes(m.key)&&(w(),m.preventDefault())})})})});cl.displayName=ll;var dl="SelectValue",ul=b.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,children:i,placeholder:s="",...a}=e,l=Et(dl,r),{onValueNodeHasChildrenChange:d}=l,u=i!==void 0,f=je(t,l.onValueNodeChange);return Fe(()=>{d(u)},[d,u]),c.jsx(Se.span,{...a,ref:f,style:{pointerEvents:"none"},children:Tl(l.value)?c.jsx(c.Fragment,{children:s}):i})});ul.displayName=dl;var Km="SelectIcon",fl=b.forwardRef((e,t)=>{const{__scopeSelect:r,children:n,...o}=e;return c.jsx(Se.span,{"aria-hidden":!0,...o,ref:t,children:n||"▼"})});fl.displayName=Km;var Gm="SelectPortal",pl=e=>c.jsx(Dn,{asChild:!0,...e});pl.displayName=Gm;var Rt="SelectContent",hl=b.forwardRef((e,t)=>{const r=Et(Rt,e.__scopeSelect),[n,o]=b.useState();if(Fe(()=>{o(new DocumentFragment)},[]),!r.open){const i=n;return i?Kr.createPortal(c.jsx(ml,{scope:e.__scopeSelect,children:c.jsx(Bn.Slot,{scope:e.__scopeSelect,children:c.jsx("div",{children:e.children})})}),i):null}return c.jsx(gl,{...e,ref:t})});hl.displayName=Rt;var ot=10,[ml,jt]=nr(Rt),Ym="SelectContentImpl",qm=Gt("SelectContent.RemoveScroll"),gl=b.forwardRef((e,t)=>{const{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:a,sideOffset:l,align:d,alignOffset:u,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:w,hideWhenDetached:m,avoidCollisions:v,...y}=e,k=Et(Rt,r),[x,S]=b.useState(null),[C,E]=b.useState(null),N=je(t,P=>S(P)),[j,D]=b.useState(null),[M,I]=b.useState(null),R=Hn(r),[L,K]=b.useState(!1),B=b.useRef(!1);b.useEffect(()=>{if(x)return Ya(x)},[x]),sa();const W=b.useCallback(P=>{const[Q,...ee]=R().map(te=>te.ref.current),[$]=ee.slice(-1),ie=document.activeElement;for(const te of P)if(te===ie||(te==null||te.scrollIntoView({block:"nearest"}),te===Q&&C&&(C.scrollTop=0),te===$&&C&&(C.scrollTop=C.scrollHeight),te==null||te.focus(),document.activeElement!==ie))return},[R,C]),U=b.useCallback(()=>W([j,x]),[W,j,x]);b.useEffect(()=>{L&&U()},[L,U]);const{onOpenChange:A,triggerPointerDownPosRef:J}=k;b.useEffect(()=>{if(x){let P={x:0,y:0};const Q=$=>{var ie,te;P={x:Math.abs(Math.round($.pageX)-(((ie=J.current)==null?void 0:ie.x)??0)),y:Math.abs(Math.round($.pageY)-(((te=J.current)==null?void 0:te.y)??0))}},ee=$=>{P.x<=10&&P.y<=10?$.preventDefault():x.contains($.target)||A(!1),document.removeEventListener("pointermove",Q),J.current=null};return J.current!==null&&(document.addEventListener("pointermove",Q),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",ee,{capture:!0})}}},[x,A,J]),b.useEffect(()=>{const P=()=>A(!1);return window.addEventListener("blur",P),window.addEventListener("resize",P),()=>{window.removeEventListener("blur",P),window.removeEventListener("resize",P)}},[A]);const[oe,T]=Al(P=>{const Q=R().filter(ie=>!ie.disabled),ee=Q.find(ie=>ie.ref.current===document.activeElement),$=zl(Q,P,ee);$&&setTimeout(()=>$.ref.current.focus())}),F=b.useCallback((P,Q,ee)=>{const $=!B.current&&!ee;(k.value!==void 0&&k.value===Q||$)&&(D(P),$&&(B.current=!0))},[k.value]),X=b.useCallback(()=>x==null?void 0:x.focus(),[x]),G=b.useCallback((P,Q,ee)=>{const $=!B.current&&!ee;(k.value!==void 0&&k.value===Q||$)&&I(P)},[k.value]),ve=n==="popper"?oi:bl,le=ve===oi?{side:a,sideOffset:l,align:d,alignOffset:u,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:w,hideWhenDetached:m,avoidCollisions:v}:{};return c.jsx(ml,{scope:r,content:x,viewport:C,onViewportChange:E,itemRefCallback:F,selectedItem:j,onItemLeave:X,itemTextRefCallback:G,focusSelectedItem:U,selectedItemText:M,position:n,isPositioned:L,searchRef:oe,children:c.jsx(ni,{as:qm,allowPinchZoom:!0,children:c.jsx(_o,{asChild:!0,trapped:k.open,onMountAutoFocus:P=>{P.preventDefault()},onUnmountAutoFocus:me(o,P=>{var Q;(Q=k.trigger)==null||Q.focus({preventScroll:!0}),P.preventDefault()}),children:c.jsx(kn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:P=>P.preventDefault(),onDismiss:()=>k.onOpenChange(!1),children:c.jsx(ve,{role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:P=>P.preventDefault(),...y,...le,onPlaced:()=>K(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:me(y.onKeyDown,P=>{const Q=P.ctrlKey||P.altKey||P.metaKey;if(P.key==="Tab"&&P.preventDefault(),!Q&&P.key.length===1&&T(P.key),["ArrowUp","ArrowDown","Home","End"].includes(P.key)){let $=R().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);if(["ArrowUp","End"].includes(P.key)&&($=$.slice().reverse()),["ArrowUp","ArrowDown"].includes(P.key)){const ie=P.target,te=$.indexOf(ie);$=$.slice(te+1)}setTimeout(()=>W($)),P.preventDefault()}})})})})})})});gl.displayName=Ym;var Xm="SelectItemAlignedPosition",bl=b.forwardRef((e,t)=>{const{__scopeSelect:r,onPlaced:n,...o}=e,i=Et(Rt,r),s=jt(Rt,r),[a,l]=b.useState(null),[d,u]=b.useState(null),f=je(t,N=>u(N)),h=Hn(r),p=b.useRef(!1),w=b.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:y,focusSelectedItem:k}=s,x=b.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&d&&m&&v&&y){const N=i.trigger.getBoundingClientRect(),j=d.getBoundingClientRect(),D=i.valueNode.getBoundingClientRect(),M=y.getBoundingClientRect();if(i.dir!=="rtl"){const ie=M.left-j.left,te=D.left-ie,ke=N.left-te,we=N.width+ke,De=Math.max(we,j.width),Re=window.innerWidth-ot,Be=Zs(te,[ot,Math.max(ot,Re-De)]);a.style.minWidth=we+"px",a.style.left=Be+"px"}else{const ie=j.right-M.right,te=window.innerWidth-D.right-ie,ke=window.innerWidth-N.right-te,we=N.width+ke,De=Math.max(we,j.width),Re=window.innerWidth-ot,Be=Zs(te,[ot,Math.max(ot,Re-De)]);a.style.minWidth=we+"px",a.style.right=Be+"px"}const I=h(),R=window.innerHeight-ot*2,L=m.scrollHeight,K=window.getComputedStyle(d),B=parseInt(K.borderTopWidth,10),W=parseInt(K.paddingTop,10),U=parseInt(K.borderBottomWidth,10),A=parseInt(K.paddingBottom,10),J=B+W+L+A+U,oe=Math.min(v.offsetHeight*5,J),T=window.getComputedStyle(m),F=parseInt(T.paddingTop,10),X=parseInt(T.paddingBottom,10),G=N.top+N.height/2-ot,ve=R-G,le=v.offsetHeight/2,P=v.offsetTop+le,Q=B+W+P,ee=J-Q;if(Q<=G){const ie=I.length>0&&v===I[I.length-1].ref.current;a.style.bottom="0px";const te=d.clientHeight-m.offsetTop-m.offsetHeight,ke=Math.max(ve,le+(ie?X:0)+te+U),we=Q+ke;a.style.height=we+"px"}else{const ie=I.length>0&&v===I[0].ref.current;a.style.top="0px";const ke=Math.max(G,B+m.offsetTop+(ie?F:0)+le)+ee;a.style.height=ke+"px",m.scrollTop=Q-G+m.offsetTop}a.style.margin=`${ot}px 0`,a.style.minHeight=oe+"px",a.style.maxHeight=R+"px",n==null||n(),requestAnimationFrame(()=>p.current=!0)}},[h,i.trigger,i.valueNode,a,d,m,v,y,i.dir,n]);Fe(()=>x(),[x]);const[S,C]=b.useState();Fe(()=>{d&&C(window.getComputedStyle(d).zIndex)},[d]);const E=b.useCallback(N=>{N&&w.current===!0&&(x(),k==null||k(),w.current=!1)},[x,k]);return c.jsx(Zm,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:E,children:c.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:c.jsx(Se.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});bl.displayName=Xm;var Jm="SelectPopperPosition",oi=b.forwardRef((e,t)=>{const{__scopeSelect:r,align:n="start",collisionPadding:o=ot,...i}=e,s=Vn(r);return c.jsx(Xo,{...s,...i,ref:t,align:n,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});oi.displayName=Jm;var[Zm,ii]=nr(Rt,{}),si="SelectViewport",vl=b.forwardRef((e,t)=>{const{__scopeSelect:r,nonce:n,...o}=e,i=jt(si,r),s=ii(si,r),a=je(t,i.onViewportChange),l=b.useRef(0);return c.jsxs(c.Fragment,{children:[c.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:n}),c.jsx(Bn.Slot,{scope:r,children:c.jsx(Se.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:me(o.onScroll,d=>{const u=d.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=s;if(h!=null&&h.current&&f){const p=Math.abs(l.current-u.scrollTop);if(p>0){const w=window.innerHeight-ot*2,m=parseFloat(f.style.minHeight),v=parseFloat(f.style.height),y=Math.max(m,v);if(y<w){const k=y+p,x=Math.min(w,k),S=k-x;f.style.height=x+"px",f.style.bottom==="0px"&&(u.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});vl.displayName=si;var xl="SelectGroup",[Qm,eg]=nr(xl),tg=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=zr();return c.jsx(Qm,{scope:r,id:o,children:c.jsx(Se.div,{role:"group","aria-labelledby":o,...n,ref:t})})});tg.displayName=xl;var wl="SelectLabel",rg=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=eg(wl,r);return c.jsx(Se.div,{id:o.id,...n,ref:t})});rg.displayName=wl;var Kn="SelectItem",[ng,yl]=nr(Kn),kl=b.forwardRef((e,t)=>{const{__scopeSelect:r,value:n,disabled:o=!1,textValue:i,...s}=e,a=Et(Kn,r),l=jt(Kn,r),d=a.value===n,[u,f]=b.useState(i??""),[h,p]=b.useState(!1),w=je(t,k=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,k,n,o)}),m=zr(),v=b.useRef("touch"),y=()=>{o||(a.onValueChange(n),a.onOpenChange(!1))};if(n==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return c.jsx(ng,{scope:r,value:n,disabled:o,textId:m,isSelected:d,onItemTextChange:b.useCallback(k=>{f(x=>x||((k==null?void 0:k.textContent)??"").trim())},[]),children:c.jsx(Bn.ItemSlot,{scope:r,value:n,disabled:o,textValue:u,children:c.jsx(Se.div,{role:"option","aria-labelledby":m,"data-highlighted":h?"":void 0,"aria-selected":d&&h,"data-state":d?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:w,onFocus:me(s.onFocus,()=>p(!0)),onBlur:me(s.onBlur,()=>p(!1)),onClick:me(s.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:me(s.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:me(s.onPointerDown,k=>{v.current=k.pointerType}),onPointerMove:me(s.onPointerMove,k=>{var x;v.current=k.pointerType,o?(x=l.onItemLeave)==null||x.call(l):v.current==="mouse"&&k.currentTarget.focus({preventScroll:!0})}),onPointerLeave:me(s.onPointerLeave,k=>{var x;k.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:me(s.onKeyDown,k=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&k.key===" "||(Wm.includes(k.key)&&y(),k.key===" "&&k.preventDefault())})})})})});kl.displayName=Kn;var Ir="SelectItemText",Sl=b.forwardRef((e,t)=>{const{__scopeSelect:r,className:n,style:o,...i}=e,s=Et(Ir,r),a=jt(Ir,r),l=yl(Ir,r),d=Vm(Ir,r),[u,f]=b.useState(null),h=je(t,y=>f(y),l.onItemTextChange,y=>{var k;return(k=a.itemTextRefCallback)==null?void 0:k.call(a,y,l.value,l.disabled)}),p=u==null?void 0:u.textContent,w=b.useMemo(()=>c.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=d;return Fe(()=>(m(w),()=>v(w)),[m,v,w]),c.jsxs(c.Fragment,{children:[c.jsx(Se.span,{id:l.textId,...i,ref:h}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Kr.createPortal(i.children,s.valueNode):null]})});Sl.displayName=Ir;var Cl="SelectItemIndicator",El=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return yl(Cl,r).isSelected?c.jsx(Se.span,{"aria-hidden":!0,...n,ref:t}):null});El.displayName=Cl;var ai="SelectScrollUpButton",og=b.forwardRef((e,t)=>{const r=jt(ai,e.__scopeSelect),n=ii(ai,e.__scopeSelect),[o,i]=b.useState(!1),s=je(t,n.onScrollButtonChange);return Fe(()=>{if(r.viewport&&r.isPositioned){let a=function(){const d=l.scrollTop>0;i(d)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),o?c.jsx(jl,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});og.displayName=ai;var li="SelectScrollDownButton",ig=b.forwardRef((e,t)=>{const r=jt(li,e.__scopeSelect),n=ii(li,e.__scopeSelect),[o,i]=b.useState(!1),s=je(t,n.onScrollButtonChange);return Fe(()=>{if(r.viewport&&r.isPositioned){let a=function(){const d=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<d;i(u)};const l=r.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[r.viewport,r.isPositioned]),o?c.jsx(jl,{...e,ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=r;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});ig.displayName=li;var jl=b.forwardRef((e,t)=>{const{__scopeSelect:r,onAutoScroll:n,...o}=e,i=jt("SelectScrollButton",r),s=b.useRef(null),a=Hn(r),l=b.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return b.useEffect(()=>()=>l(),[l]),Fe(()=>{var u;const d=a().find(f=>f.ref.current===document.activeElement);(u=d==null?void 0:d.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),c.jsx(Se.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:me(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(n,50))}),onPointerMove:me(o.onPointerMove,()=>{var d;(d=i.onItemLeave)==null||d.call(i),s.current===null&&(s.current=window.setInterval(n,50))}),onPointerLeave:me(o.onPointerLeave,()=>{l()})})}),sg="SelectSeparator",ag=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e;return c.jsx(Se.div,{"aria-hidden":!0,...n,ref:t})});ag.displayName=sg;var ci="SelectArrow",lg=b.forwardRef((e,t)=>{const{__scopeSelect:r,...n}=e,o=Vn(r),i=Et(ci,r),s=jt(ci,r);return i.open&&s.position==="popper"?c.jsx(Jo,{...o,...n,ref:t}):null});lg.displayName=ci;var cg="SelectBubbleInput",Nl=b.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{const o=b.useRef(null),i=je(n,o),s=Zh(t);return b.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&u){const f=new Event("change",{bubbles:!0});u.call(a,t),a.dispatchEvent(f)}},[s,t]),c.jsx(Se.select,{...r,style:{...Va,...r.style},ref:i,defaultValue:t})});Nl.displayName=cg;function Tl(e){return e===""||e===void 0}function Al(e){const t=Dt(e),r=b.useRef(""),n=b.useRef(0),o=b.useCallback(s=>{const a=r.current+s;t(a),(function l(d){r.current=d,window.clearTimeout(n.current),d!==""&&(n.current=window.setTimeout(()=>l(""),1e3))})(a)},[t]),i=b.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,i]}function zl(e,t,r){const o=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let s=dg(e,Math.max(i,0));o.length===1&&(s=s.filter(d=>d!==r));const l=s.find(d=>d.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function dg(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var ug=al,Pl=cl,fg=ul,pg=fl,hg=pl,Ol=hl,mg=vl,Il=kl,gg=Sl,bg=El;const vg=ug,xg=fg,Dl=b.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(Pl,{ref:n,className:se("flex h-8 w-full items-center justify-between gap-2 rounded-md border border-zinc-800 bg-black px-3 py-1.5 text-left text-xs font-medium text-white outline-none","hover:bg-zinc-900 focus-visible:ring-2 focus-visible:ring-blue-500/80 focus-visible:ring-inset focus-visible:border-zinc-600","disabled:pointer-events-none disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:flex [&>span]:items-center [&>span]:gap-2",e),style:{boxShadow:"none",WebkitBoxShadow:"none",MozBoxShadow:"none"},...r,children:[t,c.jsx(pg,{asChild:!0,children:c.jsx(Zr,{className:"h-3 w-3 shrink-0 text-zinc-400",strokeWidth:2})})]}));Dl.displayName=Pl.displayName;const _l=b.forwardRef(({className:e,children:t,position:r="popper",...n},o)=>c.jsx(hg,{children:c.jsx(Ol,{ref:o,className:se("relative z-[9999] max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-zinc-800 bg-zinc-950 text-white shadow-lg","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:c.jsx(mg,{className:se("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));_l.displayName=Ol.displayName;const Ml=b.forwardRef(({className:e,children:t,...r},n)=>c.jsxs(Il,{ref:n,className:se("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-xs outline-none","focus:bg-zinc-800 focus:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[c.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:c.jsx(bg,{children:c.jsx(lo,{className:"h-3 w-3",strokeWidth:2})})}),c.jsx(gg,{children:t})]}));Ml.displayName=Il.displayName;const Rl=b.createContext(null);function Ll(){const e=b.useContext(Rl);if(!e)throw new Error("Dialog components must be used within Dialog");return e}function $l({open:e,onOpenChange:t,children:r}){const[n,o]=b.useState(!1),i=e!==void 0,s=i?e:n,a=b.useCallback(d=>{i||o(d),t==null||t(d)},[i,t]),l=b.useMemo(()=>({open:s,onOpenChange:a}),[s,a]);return c.jsx(Rl.Provider,{value:l,children:r})}function wg({asChild:e,children:t}){const{onOpenChange:r}=Ll(),n=b.Children.only(t);return e&&b.isValidElement(n)?b.cloneElement(n,{onClick:o=>{var i,s;(s=(i=n.props).onClick)==null||s.call(i,o),r(!0)}}):c.jsx("button",{type:"button",onClick:()=>r(!0),children:t})}function Fl({className:e,children:t,preventCloseOnBackdropClick:r,...n}){const{open:o,onOpenChange:i}=Ll();if(b.useEffect(()=>{const a=l=>{l.key==="Escape"&&i(!1)};return o&&(document.addEventListener("keydown",a),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",a),document.body.style.overflow=""}},[o,i]),!o)return null;const s=a=>{a.preventDefault(),a.stopPropagation()};return vt.createPortal(c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"fixed inset-0 z-[9998] bg-black/60","aria-hidden":!0,onClick:()=>!r&&i(!1),onDragOver:s,onDrop:s}),c.jsx("div",{role:"dialog","aria-modal":!0,className:se("fixed left-1/2 top-1/2 z-[9999] w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 rounded-lg border border-zinc-700 bg-zinc-900 p-4 shadow-xl",e),onClick:a=>a.stopPropagation(),...n,children:t})]}),document.body)}function Wl({className:e,...t}){return c.jsx("div",{className:se("flex flex-col gap-1.5 pb-4",e),...t})}function yg({className:e,...t}){return c.jsx("div",{className:se("flex justify-end gap-2 pt-4",e),...t})}function Ul({className:e,...t}){return c.jsx("h2",{className:se("text-sm font-semibold text-white",e),...t})}function Bl({className:e,...t}){return c.jsx("p",{className:se("text-xs text-zinc-400",e),...t})}const qe=b.forwardRef(({className:e,variant:t="default",size:r="default",asChild:n=!1,...o},i)=>{const s="inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:shrink-0 cursor-pointer",a={default:"bg-primary text-primary-foreground shadow-lg shadow-primary/20 hover:bg-primary/90",outline:"border border-zinc-700 bg-zinc-900 text-zinc-200 hover:bg-zinc-800 hover:border-zinc-600",ghost:"text-zinc-500 hover:text-zinc-200 hover:bg-zinc-800",destructive:"bg-destructive/15 text-destructive hover:bg-destructive/25"},l={sm:"h-7 px-2.5 text-[11px]",default:"h-8 px-3 py-1.5 text-xs",lg:"h-9 px-5 text-sm",icon:"h-8 w-8","icon-sm":"h-7 w-7","icon-xs":"h-6 w-6"},d=n?ep:"button";return c.jsx(d,{ref:i,type:"button",className:se(s,a[t],l[r],e),...o})});qe.displayName="Button";const kg=["library","upload","url"];function Sg({library:e,selectedId:t,onSelect:r}){const[n,o]=g.useState(""),[i,s]=g.useState("all"),a=["all",...new Set(e.flatMap(d=>d.tags??[]))],l=e.filter(d=>{const u=i==="all"||(d.tags??[]).includes(i),f=!n||(d.alt??"").toLowerCase().includes(n.toLowerCase());return u&&f});return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{className:"relative",children:[c.jsx(Fd,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-zinc-600 pointer-events-none"}),c.jsx(zo,{value:n,onChange:d=>o(d.target.value),placeholder:"Cerca immagini...",className:"pl-9 h-8 text-xs bg-zinc-900/50 border-zinc-800"})]}),c.jsx("div",{className:"flex flex-wrap gap-1.5",children:a.map(d=>c.jsx("button",{type:"button",onClick:()=>s(d),className:se("px-2.5 py-1 rounded text-[10px] font-medium border transition-colors",i===d?"border-blue-500 bg-blue-500/20 text-blue-400":"border-zinc-700 text-zinc-500 hover:border-zinc-600 hover:text-zinc-400"),children:d==="all"?"Tutte":d},d))}),l.length>0?c.jsx("div",{className:"grid grid-cols-3 gap-2.5 max-h-[45vh] overflow-y-auto",children:l.map(d=>{const u=t===d.id;return c.jsxs("button",{type:"button",onClick:()=>r(u?null:d.id),className:se("group relative aspect-[4/3] rounded-lg overflow-hidden","ring-1 transition-all duration-150",u?"ring-blue-500 ring-2 ring-offset-1 ring-offset-zinc-900":"ring-zinc-800 hover:ring-zinc-600 hover:scale-[1.02]"),children:[c.jsx("img",{src:d.url,alt:d.alt,loading:"lazy",className:se("w-full h-full object-cover transition-[filter] duration-150",u?"brightness-[0.6]":"brightness-[0.85] group-hover:brightness-100")}),c.jsx("div",{className:se("absolute inset-x-0 bottom-0 px-2 py-1.5","bg-gradient-to-t from-black/70 to-transparent","opacity-0 group-hover:opacity-100 transition-opacity",u&&"opacity-100"),children:c.jsx("span",{className:"text-[10px] text-white font-medium leading-tight line-clamp-2",children:d.alt})}),u&&c.jsx("div",{className:"absolute top-2 right-2 w-6 h-6 rounded-full bg-blue-600 flex items-center justify-center",children:c.jsx(lo,{size:14,className:"text-white"})})]},d.id)})}):c.jsx("div",{className:"text-center py-12 text-zinc-600 text-xs",children:"Nessuna immagine in libreria. Configura assets.assetsManifest nel tenant (es. da public/assets)."})]})}function Cg({preview:e,onPreviewChange:t,onAssetUpload:r}){const[n,o]=g.useState(!1),i=g.useRef(null),s=g.useCallback(async u=>{if(fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:handleFile",message:"handleFile called",data:{fileName:u.name,hasOnAssetUpload:!!r},timestamp:Date.now(),hypothesisId:"H5"})}).catch(()=>{}),!u.type.startsWith("image/"))return;if(r){try{const h=await r(u);fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:handleFile",message:"onAssetUpload resolved",data:{url:h==null?void 0:h.slice(0,50)},timestamp:Date.now(),hypothesisId:"H2,H5"})}).catch(()=>{}),t({name:u.name,size:u.size,dataUrl:h})}catch{const h=new FileReader;h.onload=p=>{var w;t({name:u.name,size:u.size,dataUrl:(w=p.target)==null?void 0:w.result})},h.readAsDataURL(u)}return}const f=new FileReader;f.onload=h=>{var p;t({name:u.name,size:u.size,dataUrl:(p=h.target)==null?void 0:p.result})},f.readAsDataURL(u)},[t,r]),a=g.useCallback(u=>{var h,p;u.preventDefault(),u.stopPropagation(),o(!1);const f=(p=(h=u.dataTransfer)==null?void 0:h.files)==null?void 0:p[0];f&&s(f)},[s]),l=g.useCallback(u=>{u.preventDefault(),u.stopPropagation(),o(!0)},[]),d=g.useCallback(u=>{var h;const f=(h=u.target.files)==null?void 0:h[0];f&&s(f)},[s]);return c.jsxs("div",{onDragOver:l,onDragEnter:l,onDragLeave:u=>{u.preventDefault(),u.stopPropagation(),o(!1)},onDrop:a,onClick:()=>{var u;return!e&&((u=i.current)==null?void 0:u.click())},className:se("rounded-xl border-2 border-dashed transition-all min-h-[240px]","flex flex-col items-center justify-center overflow-hidden cursor-pointer relative",n?"border-blue-500/50 bg-blue-500/[0.04]":e?"border-zinc-800 bg-transparent cursor-default":"border-zinc-800 bg-white/[0.01] hover:border-zinc-600 hover:bg-white/[0.02]"),children:[e?c.jsxs(c.Fragment,{children:[c.jsx("img",{src:e.dataUrl,alt:"Upload preview",className:"w-full max-h-[320px] object-contain"}),c.jsxs("div",{className:"absolute bottom-0 inset-x-0 bg-gradient-to-t from-black/80 to-transparent p-4 flex items-center justify-between",children:[c.jsxs("div",{children:[c.jsx("p",{className:"text-xs font-medium text-white",children:e.name}),c.jsxs("p",{className:"text-[10px] text-zinc-400",children:[(e.size/1024).toFixed(1)," KB"]})]}),c.jsx(qe,{type:"button",variant:"ghost",className:"text-zinc-400 hover:text-red-400 hover:bg-red-500/10 h-8 w-8 p-0",onClick:u=>{u.stopPropagation(),t(null)},children:c.jsx(en,{size:14})})]})]}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"w-12 h-12 rounded-xl bg-blue-500/10 flex items-center justify-center text-blue-500 mb-3",children:c.jsx(as,{size:22})}),c.jsx("p",{className:"text-sm font-medium text-white mb-1",children:"Trascina un'immagine qui"}),c.jsx("p",{className:"text-[11px] text-zinc-500 mb-3",children:"oppure clicca per selezionare un file"}),c.jsx("span",{className:"text-[10px] text-zinc-600 bg-white/[0.03] px-3 py-1 rounded",children:"PNG, JPG, WebP — max 5MB"})]}),c.jsx("input",{ref:i,type:"file",accept:"image/*",className:"hidden",onChange:d})]})}function Eg({urlPreview:e,onUrlPreviewChange:t}){const[r,n]=g.useState(""),[o,i]=g.useState(!1),s=()=>{if(r.trim())try{new URL(r),t(r),i(!1)}catch{i(!0),t(null)}};return c.jsxs("div",{className:"space-y-4",children:[c.jsxs("div",{children:[c.jsx(It,{className:"block text-[10px] font-bold uppercase tracking-[0.08em] text-zinc-500 mb-1.5",children:"URL immagine"}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(zo,{value:r,onChange:a=>{n(a.target.value),i(!1)},onKeyDown:a=>a.key==="Enter"&&s(),placeholder:"https://images.unsplash.com/photo-...",className:se("h-8 text-xs bg-zinc-900/50 border-zinc-800",o&&"border-red-500/50")}),c.jsx(qe,{type:"button",variant:"outline",onClick:s,className:"shrink-0 h-8",children:"Anteprima"})]}),o&&c.jsx("p",{className:"text-[11px] text-red-400 mt-1.5",children:"URL non valido. Inserisci un URL completo (https://…)"})]}),e?c.jsxs("div",{className:"rounded-lg overflow-hidden ring-1 ring-zinc-800",children:[c.jsx("img",{src:e,alt:"URL preview",className:"w-full max-h-[320px] object-contain bg-black/30",onError:()=>{i(!0),t(null)}}),c.jsxs("div",{className:"px-3.5 py-2.5 bg-white/[0.02] border-t border-zinc-800 flex items-center gap-2",children:[c.jsx(lo,{size:14,className:"text-emerald-400"}),c.jsx("span",{className:"text-[11px] text-zinc-500",children:"Immagine caricata correttamente"})]})]}):o?null:c.jsxs("div",{className:"flex flex-col items-center py-12 text-zinc-600",children:[c.jsx(is,{size:32,className:"mb-3 opacity-40"}),c.jsx("p",{className:"text-xs",children:"Incolla un URL e premi Anteprima per verificare"})]})]})}const jg=({open:e,onOpenChange:t,onSelect:r})=>{const{assets:n}=hr(),o=(n==null?void 0:n.assetsManifest)??[],[i,s]=g.useState("library"),[a,l]=g.useState(null),[d,u]=g.useState(null),[f,h]=g.useState(null);g.useEffect(()=>{e&&(s("library"),l(null),u(null),h(null))},[e]),g.useEffect(()=>{if(!e||i!=="upload")return;const y=()=>{fetch("http://127.0.0.1:7588/ingest/86d71502-47e1-433c-9b6d-5a1390d00813",{method:"POST",headers:{"Content-Type":"application/json","X-Debug-Session-Id":"34bba5"},body:JSON.stringify({sessionId:"34bba5",location:"ImagePickerDialog.tsx:beforeunload",message:"beforeunload fired",data:{},timestamp:Date.now(),hypothesisId:"H1"})}).catch(()=>{})};return window.addEventListener("beforeunload",y),()=>window.removeEventListener("beforeunload",y)},[e,i]),g.useEffect(()=>{if(!e||i!=="upload")return;const y=x=>{x.preventDefault()},k={capture:!0};return document.addEventListener("dragover",y,k),document.addEventListener("drop",y,k),window.addEventListener("dragover",y,k),window.addEventListener("drop",y,k),()=>{document.removeEventListener("dragover",y,k),document.removeEventListener("drop",y,k),window.removeEventListener("dragover",y,k),window.removeEventListener("drop",y,k)}},[e,i]);const p=i==="library"&&a!=null||i==="upload"&&d!=null||i==="url"&&f!=null,w=()=>{if(i==="library"&&a){const y=o.find(k=>k.id===a);y&&r({url:y.url,alt:y.alt})}else i==="upload"&&d?r({url:d.dataUrl,alt:d.name}):i==="url"&&f&&r({url:f,alt:""});setTimeout(()=>t(!1),0)},m=i==="library"&&a?"1 immagine selezionata":i==="upload"&&d?d.name:i==="url"&&f?"URL pronto":"Nessuna selezione",v=y=>{y.preventDefault(),y.stopPropagation()};return c.jsx($l,{open:e,onOpenChange:t,children:c.jsxs(Fl,{className:"max-w-2xl p-0 gap-0 max-h-[90vh] flex flex-col",preventCloseOnBackdropClick:i==="upload",onDragOver:v,onDrop:v,children:[c.jsxs(Wl,{className:"px-5 py-4 flex flex-row items-start justify-between gap-4 border-b border-zinc-800",children:[c.jsxs("div",{className:"flex items-center gap-3",children:[c.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/15 text-blue-500",children:c.jsx(Qr,{size:18})}),c.jsxs("div",{children:[c.jsx(Ul,{children:"Image Picker"}),c.jsx(Bl,{children:"Scegli dalla libreria, carica dal disco o inserisci un link"})]})]}),c.jsx("button",{type:"button",onClick:()=>t(!1),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Chiudi",children:c.jsx(Wt,{size:18})})]}),c.jsx("div",{className:"flex border-b border-zinc-800",children:kg.map(y=>c.jsxs("button",{type:"button",onClick:()=>s(y),className:se("flex items-center gap-2 px-4 py-3 text-xs font-medium border-b-2 transition-colors",i===y?"border-blue-500 text-blue-400":"border-transparent text-zinc-500 hover:text-zinc-300"),children:[y==="library"&&c.jsx(Qr,{size:14}),y==="upload"&&c.jsx(as,{size:14}),y==="url"&&c.jsx(is,{size:14}),y==="library"?"Libreria":y==="upload"?"Upload":"URL"]},y))}),c.jsxs("div",{className:"flex-1 overflow-y-auto p-5 min-h-0",children:[i==="library"&&c.jsx(Sg,{library:o,selectedId:a,onSelect:l}),i==="upload"&&c.jsx(Cg,{preview:d,onPreviewChange:u,onAssetUpload:n==null?void 0:n.onAssetUpload}),i==="url"&&c.jsx(Eg,{urlPreview:f,onUrlPreviewChange:h})]}),c.jsxs(yg,{className:"px-5 py-4 border-t border-zinc-800 flex-row justify-between",children:[c.jsx("span",{className:"text-[10px] uppercase tracking-[0.05em] text-zinc-600",children:m}),c.jsxs("div",{className:"flex gap-2",children:[c.jsx(qe,{type:"button",variant:"outline",size:"sm",onClick:()=>t(!1),children:"Annulla"}),c.jsx(qe,{type:"button",size:"sm",disabled:!p,onClick:w,className:se(!p&&"opacity-40"),children:"Inserisci immagine"})]})]})]})})},Hl=(e,t="default")=>{if(e.startsWith("http")||e.startsWith("data:")||e.startsWith("#")||e.startsWith("/assets/"))return e;if(e.startsWith("assets/"))return`/${e}`;if(e.startsWith("/uploaded-assets/"))return e;if(!/\.(jpg|jpeg|png|gif|svg|pdf|webp|mp4|webm|ogg)$/i.test(e))return e.startsWith("/")?e:`/${e}`;const n=e.replace(/^\//,"");return`/assets/${t}/${n}`},Ng=({value:e,onChange:t,label:r="IMAGE",className:n})=>{const{tenantId:o="default"}=hr(),[i,s]=g.useState(!1),[a,l]=g.useState(!1),d=!!(e!=null&&e.url),u=e!=null&&e.url?Hl(e.url,o):"",f=p=>{t(p),s(!1)},h=p=>{p.stopPropagation(),t({url:"",alt:""})};return c.jsxs("div",{className:se("space-y-1.5",n),children:[c.jsx(It,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:r}),d?c.jsxs("div",{role:"button",tabIndex:0,onClick:()=>s(!0),onKeyDown:p=>p.key==="Enter"&&s(!0),onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),className:se("relative rounded-lg overflow-hidden cursor-pointer","ring-1 ring-zinc-800 transition-all",a&&"ring-blue-500/40"),children:[c.jsx("img",{src:u,alt:(e==null?void 0:e.alt)??"",className:"w-full h-40 object-cover block",onError:p=>{p.target.style.display="none"}}),c.jsx("div",{className:se("absolute inset-0 flex items-center justify-center gap-2 transition-all duration-150",a?"bg-black/50":"bg-black/0"),children:a&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center gap-1.5 bg-white/15 backdrop-blur-md rounded-lg px-3.5 py-2 text-white text-xs font-medium",children:[c.jsx($d,{size:13}),c.jsx("span",{children:"Cambia"})]}),c.jsx(qe,{type:"button",variant:"ghost",className:"h-8 w-8 p-0 bg-red-500/15 backdrop-blur-md text-red-300 hover:text-red-200 hover:bg-red-500/25",onClick:h,children:c.jsx(en,{size:13})})]})}),c.jsx("div",{className:"px-2.5 py-1.5 bg-black/50 text-[10px] text-zinc-500 truncate",children:((e==null?void 0:e.url)??"").length>50?"…"+((e==null?void 0:e.url)??"").slice(-47):(e==null?void 0:e.url)??""})]}):c.jsxs("button",{type:"button",onClick:()=>s(!0),className:se("w-full rounded-lg border-2 border-dashed border-zinc-800 py-7","flex flex-col items-center gap-2","bg-white/[0.01] transition-all","hover:border-blue-500/30 hover:bg-blue-500/[0.03]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500"),children:[c.jsx("div",{className:"w-9 h-9 rounded-lg bg-blue-500/10 flex items-center justify-center text-blue-500",children:c.jsx(Qr,{size:18})}),c.jsx("span",{className:"text-xs text-zinc-400 font-medium",children:"Clicca per aggiungere un'immagine"}),c.jsx("span",{className:"text-[10px] text-zinc-600",children:"Libreria · Upload · URL"})]}),c.jsx(jg,{open:i,onOpenChange:s,onSelect:f})]})},Vl=[{name:"layers",Icon:uo},{name:"github",Icon:Rd},{name:"arrow-right",Icon:Pd},{name:"box",Icon:Id},{name:"terminal",Icon:Bd},{name:"chevron-right",Icon:Dd},{name:"menu",Icon:Ld},{name:"x",Icon:Wt},{name:"sparkles",Icon:Ud},{name:"zap",Icon:Vd}],Gn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,t=>t.toUpperCase()),or={"ui:text":({label:e,value:t,onChange:r})=>c.jsxs("div",{className:"grid w-full items-center gap-2 mb-4",children:[c.jsx(It,{className:"text-[11px] font-semibold tracking-[0.02em] text-zinc-300",children:Gn(e)}),c.jsx(zo,{type:"text",className:"h-9 text-[13px] bg-zinc-900/50 border-zinc-700 focus-visible:ring-blue-600",value:t||"",onChange:n=>r(n.target.value)})]}),"ui:textarea":({label:e,value:t,onChange:r})=>c.jsxs("div",{className:"grid w-full gap-2 mb-4",children:[c.jsx(It,{className:"text-[11px] font-semibold tracking-[0.02em] text-zinc-300",children:Gn(e)}),c.jsx(Jf,{className:"min-h-[96px] text-[13px] bg-zinc-900/50 border-zinc-700 focus-visible:ring-blue-600 resize-none",value:t||"",onChange:n=>r(n.target.value)})]}),"ui:select":({label:e,value:t,onChange:r,options:n=[]})=>c.jsxs("div",{className:"grid w-full gap-2 mb-4",children:[c.jsx(It,{className:"text-[11px] font-semibold tracking-[0.02em] text-zinc-300",children:Gn(e)}),c.jsxs(vg,{value:t||"",onValueChange:r,children:[c.jsx(Dl,{className:"w-full h-9 text-[13px] bg-zinc-900/50 border-zinc-700 focus:ring-blue-600",children:c.jsx(xg,{placeholder:"Select..."})}),c.jsx(_l,{className:"dark",children:n.map(o=>c.jsx(Ml,{value:o,className:"text-[13px]",children:o},o))})]})]}),"ui:checkbox":({label:e,value:t,onChange:r})=>c.jsxs("div",{className:"flex items-center space-x-2 mb-4 p-2.5 rounded border border-zinc-700/60 bg-zinc-900/20",children:[c.jsx(Zf,{id:e,checked:!!t,onCheckedChange:n=>r(n===!0)}),c.jsx(It,{htmlFor:e,className:"text-[13px] font-medium cursor-pointer select-none text-zinc-200",children:Gn(e)})]}),"ui:image-picker":({label:e,value:t,onChange:r})=>{const n=t!=null&&typeof t=="object"&&"url"in t?{url:String(t.url??""),alt:String(t.alt??"")}:{url:typeof t=="string"?t:"",alt:""},o=i=>{r(i)};return c.jsx("div",{className:"mb-4",children:c.jsx(Ng,{label:e,value:n,onChange:o})})},"ui:icon-picker":({label:e,value:t,onChange:r})=>{const[n,o]=g.useState(!1),i=Vl.find(s=>s.name===(t||""));return c.jsxs("div",{className:"grid w-full gap-1.5 mb-4",children:[c.jsx(It,{className:"text-[9px] uppercase font-black tracking-widest text-zinc-500",children:e}),c.jsxs($l,{open:n,onOpenChange:o,children:[c.jsx(wg,{asChild:!0,children:c.jsx(qe,{variant:"outline",className:"w-full h-9 rounded-md border border-zinc-800 bg-zinc-900/50 hover:bg-zinc-800/50 flex items-center gap-2 text-left",children:i?c.jsxs(c.Fragment,{children:[c.jsx(i.Icon,{size:16,className:"text-zinc-400 shrink-0"}),c.jsx("span",{className:"text-[11px] text-zinc-300 capitalize truncate",children:i.name})]}):c.jsxs(c.Fragment,{children:[c.jsx(Qr,{size:16,className:"text-zinc-500 shrink-0"}),c.jsx("span",{className:"text-[11px] text-zinc-500",children:"Choose icon..."})]})})}),c.jsxs(Fl,{className:"sm:max-w-[280px] p-4",children:[c.jsxs(Wl,{children:[c.jsx(Ul,{className:"text-sm",children:"Choose icon"}),c.jsx(Bl,{className:"text-xs",children:"Click an icon to select it."})]}),c.jsx("div",{className:"grid grid-cols-5 gap-2 py-2",children:Vl.map(({name:s,Icon:a})=>c.jsx("button",{type:"button",onClick:()=>{r(s),o(!1)},className:se("flex items-center justify-center w-10 h-10 rounded-md border transition-colors",t===s?"border-blue-500 bg-blue-500/20 text-blue-400":"border-zinc-800 bg-zinc-900/50 hover:bg-zinc-800/50 text-zinc-400 hover:text-zinc-200"),title:s,children:c.jsx(a,{size:20})},s))})]})]})]})}},di=e=>{if(e instanceof Pe.z.ZodOptional||e instanceof Pe.z.ZodDefault)return di(e._def.innerType);if(e instanceof Pe.z.ZodObject){const t={id:crypto.randomUUID()};for(const r in e.shape)r!=="id"&&(t[r]=di(e.shape[r]));return t}return e instanceof Pe.z.ZodArray?[]:e instanceof Pe.z.ZodString?"":e instanceof Pe.z.ZodNumber?0:e instanceof Pe.z.ZodBoolean?!1:e instanceof Pe.z.ZodEnum?e._def.values[0]:null},Yn=e=>e instanceof Pe.z.ZodOptional||e instanceof Pe.z.ZodDefault||e instanceof Pe.z.ZodNullable?Yn(e._def.innerType):e,Kl=e=>{var n;const t=e;if(typeof e.description=="string"&&e.description.length>0)return e.description;if(typeof((n=t._def)==null?void 0:n.description)=="string"&&t._def.description.length>0)return t._def.description;const r=Yn(e);return r!==e?Kl(r):null},qn=(e,t)=>e&&!t?"opacity-10":"opacity-100",ir=(e,t)=>e!=null&&t.toLowerCase()===e.toLowerCase(),ui=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,t=>t.toUpperCase()),Dr=({schema:e,data:t,onChange:r,keys:n,expandedItemPath:o,onSidebarExpandedItemChange:i})=>{const s=e.shape,a=n!=null?Object.keys(s).filter(f=>n.includes(f)):Object.keys(s),l=o==null?void 0:o[0],d=(l==null?void 0:l.fieldKey)??null,u=d!=null;return c.jsx("div",{className:"space-y-4",children:a.map(f=>{const h=s[f];if(!h)return null;const p=Yn(h),w=Kl(h)||"ui:text",m=t[f];if(w==="ui:editorial-markdown")return null;if(w==="ui:image-picker"&&p instanceof Pe.z.ZodObject){const S=ir(d,f),C=or["ui:image-picker"]||or["ui:text"];return c.jsx("div",{className:`transition-opacity duration-200 ${qn(u,S)}`,...S?{"data-jp-focused-field":f}:{},children:c.jsx(C,{label:f,value:m,onChange:E=>r({...t,[f]:E})})},f)}if(p instanceof Pe.z.ZodObject){const S=m||{},C=ir(d,f);return c.jsxs("div",{className:`group/obj mb-6 p-4 border border-zinc-800 rounded-lg bg-zinc-900/20 hover:border-zinc-700 transition-[border-color,opacity] duration-200 ${qn(u,C)}`,...C?{"data-jp-focused-field":f}:{},children:[c.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[c.jsx("div",{className:"w-1 h-3 bg-blue-500 rounded-full"}),c.jsx("h4",{className:"text-[11px] font-semibold text-zinc-300 tracking-[0.02em]",children:ui(f)})]}),c.jsx(Dr,{schema:p,data:S,onChange:E=>r({...t,[f]:E}),expandedItemPath:o&&ir(l==null?void 0:l.fieldKey,f)?o.slice(1):void 0})]},f)}if(p instanceof Pe.z.ZodArray){const S=Array.isArray(m)?m:[],C=Yn(p.element),E=(M,I)=>{if(I<0||I>=S.length)return;const R=[...S],[L]=R.splice(M,1);R.splice(I,0,L),r({...t,[f]:R})},N=ir(d,f),D=ir(l==null?void 0:l.fieldKey,f)?l==null?void 0:l.itemId:void 0;return c.jsxs("div",{className:`mb-8 transition-opacity duration-200 ${qn(u,N)}`,...N?{"data-jp-focused-field":f}:{},children:[c.jsxs("div",{className:"flex items-center justify-between mb-3",children:[c.jsxs("label",{className:"text-[12px] font-semibold text-zinc-300 tracking-[0.01em]",children:[ui(f)," (",S.length,")"]}),c.jsxs("button",{type:"button",onClick:()=>{const M=di(C);r({...t,[f]:[...S,M]})},className:"flex items-center gap-1 px-2.5 py-1.5 bg-blue-600/10 hover:bg-blue-600/20 text-blue-400 rounded text-[11px] font-semibold transition-colors",children:[c.jsx(fo,{size:12})," Add Item"]})]}),c.jsx("div",{className:"space-y-2",children:S.map((M,I)=>{const R=M,L=R.id||`legacy-${I}`,K=(typeof R.title=="string"?R.title:null)||(typeof R.label=="string"?R.label:null)||(typeof R.name=="string"?R.name:null)||(typeof R.content=="string"?R.content:null)||(typeof R.text=="string"?R.text:null)||`${ui(f)} #${I+1}`,B=D,W=String(R.id??L),U=B!=null&&String(B)===W,A=U&&o&&o.length>1?o.slice(1):void 0,J=u&&N&&B!=null&&!U;return c.jsx(Tg,{itemId:W,openItemId:B!=null?String(B):void 0,isFaded:J,index:I,isFirst:I===0,isLast:I===S.length-1,label:K,onExpandedChange:i?oe=>i(oe?{fieldKey:f,itemId:W}:null):void 0,onRemove:()=>{const oe=S.filter((T,F)=>F!==I);r({...t,[f]:oe})},onMoveUp:()=>E(I,I-1),onMoveDown:()=>E(I,I+1),children:C instanceof Pe.z.ZodObject?c.jsx(Dr,{schema:C,data:R||{},expandedItemPath:A,onChange:oe=>{const T=[...S];T[I]=oe,r({...t,[f]:T})}}):c.jsx("div",{className:"text-[10px] text-red-400",children:"Primitive arrays not supported."})},L)})})]},f)}const v=w in or?w:"ui:text",y=or[v]||or["ui:text"],k=p instanceof Pe.z.ZodEnum?p._def.values:void 0,x=ir(d,f);return c.jsx("div",{className:`transition-opacity duration-200 ${qn(u,x)}`,...x?{"data-jp-focused-field":f}:{},children:c.jsx(y,{label:f,value:m,options:k,onChange:S=>r({...t,[f]:S})})},f)})})},Tg=({itemId:e,openItemId:t,isFaded:r=!1,label:n,onExpandedChange:o,onRemove:i,onMoveUp:s,onMoveDown:a,isFirst:l,isLast:d,children:u})=>{const f=t!=null&&String(t)===String(e),[h,p]=g.useState(f);g.useEffect(()=>{t!=null&&(f&&!h&&p(!0),!f&&h&&p(!1))},[t,f,h]);const w=()=>{const v=!h;p(v),o==null||o(v)},m=f&&h;return c.jsxs("div",{className:`border border-zinc-800 rounded-md bg-zinc-900/40 overflow-hidden transition-opacity duration-200 ${r?"opacity-10":"opacity-100"}`,...m?{"data-jp-expanded-item":e}:{},children:[c.jsxs("div",{className:"flex items-center justify-between px-3 py-2 bg-zinc-900/60",children:[c.jsx("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:c.jsxs("button",{type:"button",onClick:w,className:"flex items-center gap-2 text-[12px] font-semibold text-zinc-200 tracking-[0.01em] truncate",children:[h?c.jsx(co,{size:12,className:"shrink-0"}):c.jsx(Zr,{size:12,className:"shrink-0"}),c.jsx("span",{className:"truncate",children:n})]})}),c.jsxs("div",{className:"flex items-center gap-1 shrink-0 ml-2",children:[c.jsx("button",{type:"button",disabled:l,onClick:s,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:c.jsx(Od,{size:12})}),c.jsx("button",{type:"button",disabled:d,onClick:a,className:"text-zinc-500 hover:text-blue-400 disabled:opacity-20 p-1 transition-colors",children:c.jsx(zd,{size:12})}),c.jsx("div",{className:"w-px h-3 bg-zinc-800 mx-1"}),c.jsx("button",{type:"button",onClick:i,className:"text-zinc-600 hover:text-red-500 transition-colors p-1",children:c.jsx(en,{size:12})})]})]}),h&&c.jsx("div",{className:"p-4 border-t border-zinc-800 bg-black/20",children:u})]})};function Ag(e,t){return b.useReducer((r,n)=>t[r][n]??r,e)}var _r=e=>{const{present:t,children:r}=e,n=zg(t),o=typeof r=="function"?r({present:n.isPresent}):b.Children.only(r),i=je(n.ref,Pg(o));return typeof r=="function"||n.isPresent?b.cloneElement(o,{ref:i}):null};_r.displayName="Presence";function zg(e){const[t,r]=b.useState(),n=b.useRef(null),o=b.useRef(e),i=b.useRef("none"),s=e?"mounted":"unmounted",[a,l]=Ag(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return b.useEffect(()=>{const d=Xn(n.current);i.current=a==="mounted"?d:"none"},[a]),Fe(()=>{const d=n.current,u=o.current;if(u!==e){const h=i.current,p=Xn(d);e?l("MOUNT"):p==="none"||(d==null?void 0:d.display)==="none"?l("UNMOUNT"):l(u&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Fe(()=>{if(t){let d;const u=t.ownerDocument.defaultView??window,f=p=>{const m=Xn(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",d=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=p=>{p.target===t&&(i.current=Xn(n.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(d),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:b.useCallback(d=>{n.current=d?getComputedStyle(d):null,r(d)},[])}}function Xn(e){return(e==null?void 0:e.animationName)||"none"}function Pg(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var[Jn]=Ar("Tooltip",[Zt]),Zn=Zt(),Gl="TooltipProvider",Og=700,fi="tooltip.open",[Ig,pi]=Jn(Gl),Yl=e=>{const{__scopeTooltip:t,delayDuration:r=Og,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=e,s=b.useRef(!0),a=b.useRef(!1),l=b.useRef(0);return b.useEffect(()=>{const d=l.current;return()=>window.clearTimeout(d)},[]),c.jsx(Ig,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:b.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:b.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,n)},[n]),isPointerInTransitRef:a,onPointerInTransitChange:b.useCallback(d=>{a.current=d},[]),disableHoverableContent:o,children:i})};Yl.displayName=Gl;var Mr="Tooltip",[Dg,Rr]=Jn(Mr),ql=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:i,disableHoverableContent:s,delayDuration:a}=e,l=pi(Mr,e.__scopeTooltip),d=Zn(t),[u,f]=b.useState(null),h=zr(),p=b.useRef(0),w=s??l.disableHoverableContent,m=a??l.delayDuration,v=b.useRef(!1),[y,k]=_n({prop:n,defaultProp:o??!1,onChange:N=>{N?(l.onOpen(),document.dispatchEvent(new CustomEvent(fi))):l.onClose(),i==null||i(N)},caller:Mr}),x=b.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),S=b.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v.current=!1,k(!0)},[k]),C=b.useCallback(()=>{window.clearTimeout(p.current),p.current=0,k(!1)},[k]),E=b.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{v.current=!0,k(!0),p.current=0},m)},[m,k]);return b.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),c.jsx(qo,{...d,children:c.jsx(Dg,{scope:t,contentId:h,open:y,stateAttribute:x,trigger:u,onTriggerChange:f,onTriggerEnter:b.useCallback(()=>{l.isOpenDelayedRef.current?E():S()},[l.isOpenDelayedRef,E,S]),onTriggerLeave:b.useCallback(()=>{w?C():(window.clearTimeout(p.current),p.current=0)},[C,w]),onOpen:S,onClose:C,disableHoverableContent:w,children:r})})};ql.displayName=Mr;var hi="TooltipTrigger",Xl=b.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Rr(hi,r),i=pi(hi,r),s=Zn(r),a=b.useRef(null),l=je(t,a,o.onTriggerChange),d=b.useRef(!1),u=b.useRef(!1),f=b.useCallback(()=>d.current=!1,[]);return b.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),c.jsx(In,{asChild:!0,...s,children:c.jsx(Se.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:me(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:me(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:me(e.onPointerDown,()=>{o.open&&o.onClose(),d.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:me(e.onFocus,()=>{d.current||o.onOpen()}),onBlur:me(e.onBlur,o.onClose),onClick:me(e.onClick,o.onClose)})})});Xl.displayName=hi;var mi="TooltipPortal",[_g,Mg]=Jn(mi,{forceMount:void 0}),Jl=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,i=Rr(mi,t);return c.jsx(_g,{scope:t,forceMount:r,children:c.jsx(_r,{present:r||i.open,children:c.jsx(Dn,{asChild:!0,container:o,children:n})})})};Jl.displayName=mi;var sr="TooltipContent",Zl=b.forwardRef((e,t)=>{const r=Mg(sr,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...i}=e,s=Rr(sr,e.__scopeTooltip);return c.jsx(_r,{present:n||s.open,children:s.disableHoverableContent?c.jsx(Ql,{side:o,...i,ref:t}):c.jsx(Rg,{side:o,...i,ref:t})})}),Rg=b.forwardRef((e,t)=>{const r=Rr(sr,e.__scopeTooltip),n=pi(sr,e.__scopeTooltip),o=b.useRef(null),i=je(t,o),[s,a]=b.useState(null),{trigger:l,onClose:d}=r,u=o.current,{onPointerInTransitChange:f}=n,h=b.useCallback(()=>{a(null),f(!1)},[f]),p=b.useCallback((w,m)=>{const v=w.currentTarget,y={x:w.clientX,y:w.clientY},k=Ug(y,v.getBoundingClientRect()),x=Bg(y,k),S=Hg(m.getBoundingClientRect()),C=Kg([...x,...S]);a(C),f(!0)},[f]);return b.useEffect(()=>()=>h(),[h]),b.useEffect(()=>{if(l&&u){const w=v=>p(v,u),m=v=>p(v,l);return l.addEventListener("pointerleave",w),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",w),u.removeEventListener("pointerleave",m)}}},[l,u,p,h]),b.useEffect(()=>{if(s){const w=m=>{const v=m.target,y={x:m.clientX,y:m.clientY},k=(l==null?void 0:l.contains(v))||(u==null?void 0:u.contains(v)),x=!Vg(y,s);k?h():x&&(h(),d())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,u,s,d,h]),c.jsx(Ql,{...e,ref:i})}),[Lg,$g]=Jn(Mr,{isInside:!1}),Fg=rp("TooltipContent"),Ql=b.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:s,...a}=e,l=Rr(sr,r),d=Zn(r),{onClose:u}=l;return b.useEffect(()=>(document.addEventListener(fi,u),()=>document.removeEventListener(fi,u)),[u]),b.useEffect(()=>{if(l.trigger){const f=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,u]),c.jsx(kn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:c.jsxs(Xo,{"data-state":l.stateAttribute,...d,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[c.jsx(Fg,{children:n}),c.jsx(Lg,{scope:r,isInside:!0,children:c.jsx(em,{id:l.contentId,role:"tooltip",children:o||n})})]})})});Zl.displayName=sr;var ec="TooltipArrow",Wg=b.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Zn(r);return $g(ec,r).isInside?null:c.jsx(Jo,{...o,...n,ref:t})});Wg.displayName=ec;function Ug(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,o,i)){case i:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function Bg(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function Hg(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function Vg(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,s=t.length-1;i<t.length;s=i++){const a=t[i],l=t[s],d=a.x,u=a.y,f=l.x,h=l.y;u>n!=h>n&&r<(f-d)*(n-u)/(h-u)+d&&(o=!o)}return o}function Kg(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),Gg(t)}function Gg(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const i=t[t.length-1],s=t[t.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const i=r[r.length-1],s=r[r.length-2];if((i.x-s.x)*(o.y-s.y)>=(i.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Yg=Yl,qg=ql,Xg=Xl,Jg=Jl,tc=Zl;const Zg=Yg,Lr=qg,$r=Xg,ar=b.forwardRef(({className:e,sideOffset:t=4,...r},n)=>c.jsx(Jg,{children:c.jsx(tc,{ref:n,sideOffset:t,className:se("z-50 rounded-md bg-zinc-800 px-2.5 py-1.5 text-[11px] text-zinc-200 shadow-md","animate-in fade-in-0 zoom-in-95",e),...r})}));ar.displayName=tc.displayName;var Qn="Popover",[rc]=Ar(Qn,[Zt]),Fr=Zt(),[Qg,Nt]=rc(Qn),nc=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,a=Fr(t),l=b.useRef(null),[d,u]=b.useState(!1),[f,h]=_n({prop:n,defaultProp:o??!1,onChange:i,caller:Qn});return c.jsx(qo,{...a,children:c.jsx(Qg,{scope:t,contentId:zr(),triggerRef:l,open:f,onOpenChange:h,onOpenToggle:b.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:d,onCustomAnchorAdd:b.useCallback(()=>u(!0),[]),onCustomAnchorRemove:b.useCallback(()=>u(!1),[]),modal:s,children:r})})};nc.displayName=Qn;var oc="PopoverAnchor",e0=b.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Nt(oc,r),i=Fr(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:a}=o;return b.useEffect(()=>(s(),()=>a()),[s,a]),c.jsx(In,{...i,...n,ref:t})});e0.displayName=oc;var ic="PopoverTrigger",sc=b.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Nt(ic,r),i=Fr(r),s=je(t,o.triggerRef),a=c.jsx(Se.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":uc(o.open),...n,ref:s,onClick:me(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:c.jsx(In,{asChild:!0,...i,children:a})});sc.displayName=ic;var gi="PopoverPortal",[t0,r0]=rc(gi,{forceMount:void 0}),ac=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,i=Nt(gi,t);return c.jsx(t0,{scope:t,forceMount:r,children:c.jsx(_r,{present:r||i.open,children:c.jsx(Dn,{asChild:!0,container:o,children:n})})})};ac.displayName=gi;var lr="PopoverContent",lc=b.forwardRef((e,t)=>{const r=r0(lr,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,i=Nt(lr,e.__scopePopover);return c.jsx(_r,{present:n||i.open,children:i.modal?c.jsx(o0,{...o,ref:t}):c.jsx(i0,{...o,ref:t})})});lc.displayName=lr;var n0=Gt("PopoverContent.RemoveScroll"),o0=b.forwardRef((e,t)=>{const r=Nt(lr,e.__scopePopover),n=b.useRef(null),o=je(t,n),i=b.useRef(!1);return b.useEffect(()=>{const s=n.current;if(s)return Ya(s)},[]),c.jsx(ni,{as:n0,allowPinchZoom:!0,children:c.jsx(cc,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:me(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),i.current||(a=r.triggerRef.current)==null||a.focus()}),onPointerDownOutside:me(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,d=a.button===2||l;i.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:me(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),i0=b.forwardRef((e,t)=>{const r=Nt(lr,e.__scopePopover),n=b.useRef(!1),o=b.useRef(!1);return c.jsx(cc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s,a;(s=e.onCloseAutoFocus)==null||s.call(e,i),i.defaultPrevented||(n.current||(a=r.triggerRef.current)==null||a.focus(),i.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:i=>{var l,d;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=i.target;((d=r.triggerRef.current)==null?void 0:d.contains(s))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),cc=b.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:u,...f}=e,h=Nt(lr,r),p=Fr(r);return sa(),c.jsx(_o,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i,children:c.jsx(kn,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>h.onOpenChange(!1),children:c.jsx(Xo,{"data-state":uc(h.open),role:"dialog",id:h.contentId,...p,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),dc="PopoverClose",s0=b.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Nt(dc,r);return c.jsx(Se.button,{type:"button",...n,ref:t,onClick:me(e.onClick,()=>o.onOpenChange(!1))})});s0.displayName=dc;var a0="PopoverArrow",l0=b.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Fr(r);return c.jsx(Jo,{...o,...n,ref:t})});l0.displayName=a0;function uc(e){return e?"open":"closed"}var c0=nc,d0=sc,u0=ac,fc=lc;const f0=c0,p0=d0,pc=b.forwardRef(({className:e,align:t="start",sideOffset:r=6,...n},o)=>c.jsx(u0,{children:c.jsx(fc,{ref:o,align:t,sideOffset:r,className:se("z-50 w-[var(--radix-popover-trigger-width)] rounded-lg border border-zinc-700/80 bg-zinc-950 p-1 text-white shadow-xl shadow-black/30","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2",e),...n})}));pc.displayName=fc.displayName;const hc=e=>e?e.charAt(0).toUpperCase()+e.slice(1):"Select page",h0=({pageSlugs:e,currentSlug:t,onPageChange:r,sectionCount:n,onNewPage:o,className:i,currentPageLabel:s})=>{const[a,l]=g.useState(!1),d=s??hc(t),u=f=>{r(f),l(!1)};return c.jsx("div",{className:se("mx-3 mt-2 mb-2",i),children:c.jsxs(f0,{open:a,onOpenChange:l,children:[c.jsx(p0,{asChild:!0,children:c.jsxs("button",{type:"button","aria-haspopup":"listbox","aria-label":`Select page, current: ${d}`,className:se("flex items-center gap-2 w-full pl-3 pr-4 py-2 rounded-lg border text-left transition-all duration-150 cursor-pointer","bg-transparent border-zinc-800 text-zinc-400 hover:text-zinc-200 hover:bg-zinc-800/50 hover:border-zinc-700","data-[state=open]:bg-zinc-950 data-[state=open]:border-zinc-800 data-[state=open]:text-zinc-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-zinc-950"),children:[c.jsx(Md,{size:14,className:"shrink-0 text-zinc-500","aria-hidden":!0}),c.jsx("span",{className:"text-xs font-medium flex-1 truncate",children:d}),c.jsx(Zr,{size:13,className:"shrink-0 text-zinc-500","aria-hidden":!0})]})}),c.jsxs(pc,{align:"start",sideOffset:4,className:"min-w-[var(--radix-popover-trigger-width)] bg-zinc-950 border-zinc-800 p-1",role:"listbox","aria-label":"Page list",children:[e.map(f=>{const h=f===t,p=hc(f);return c.jsxs("button",{type:"button",role:"option","aria-selected":h,onClick:()=>u(f),className:se("flex items-center justify-between w-full px-2.5 py-2 rounded-md text-xs transition-colors cursor-pointer",h?"bg-primary/10 text-primary font-semibold":"text-zinc-400 hover:bg-zinc-800 hover:text-zinc-200"),children:[c.jsx("span",{children:p}),n!=null&&c.jsxs("span",{className:"text-[10px] text-zinc-600 tabular-nums","aria-hidden":!0,children:[n,"s"]})]},f)}),o!=null&&c.jsx("div",{className:"border-t border-zinc-800 mt-1 pt-1",children:c.jsxs("button",{type:"button",onClick:()=>{o(),l(!1)},className:"flex items-center gap-1.5 w-full px-2.5 py-2 rounded-md text-[11px] text-zinc-600 hover:text-zinc-300 hover:bg-zinc-800 transition-colors cursor-pointer","aria-label":"New page",children:[c.jsx(fo,{size:12,"aria-hidden":!0}),c.jsx("span",{children:"New page"})]})})]})]})})},bi=new Set(["anchorId","paddingTop","paddingBottom","theme","container"]),mc=new Set(["ui:editorial-markdown"]),gc=e=>e instanceof Pe.z.ZodOptional||e instanceof Pe.z.ZodDefault||e instanceof Pe.z.ZodNullable?gc(e._def.innerType):e,vi=e=>{var i;if(!e)return"";const t=e,r=typeof e.description=="string"?e.description:null;if(r)return r;const n=typeof((i=t._def)==null?void 0:i.description)=="string"?t._def.description:null;if(n)return n;const o=gc(e);return o!==e?vi(o):""},xi=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/[_-]+/g," ").replace(/\s+/g," ").trim().replace(/\b\w/g,t=>t.toUpperCase()),m0={activationConstraint:{distance:8}},g0={activationConstraint:{delay:200,tolerance:5}};function wi({layer:e,opts:t,dragHandleProps:r}){const{isSelected:n,isActive:o,isDragging:i,canDelete:s,onSelect:a,onOpenSettings:l,onDelete:d}=t,u=!!r;return c.jsxs("div",{className:se("group flex items-center gap-2 pl-1 pr-2 py-2.5 rounded-lg text-left transition-all duration-200 cursor-pointer border-l-2",n?"bg-primary/[0.08] border-primary":o?"bg-zinc-800/30 border-emerald-500/60":"border-transparent hover:bg-zinc-800/40",i&&"opacity-50 shadow-lg",u?"cursor-grab active:cursor-grabbing":"cursor-default"),children:[u?c.jsx("span",{className:"shrink-0 w-5 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity duration-150 cursor-grab touch-none","aria-label":"Trascina per riordinare",...r,children:c.jsx(os,{size:12,className:"text-zinc-600"})}):c.jsx("span",{className:"shrink-0 w-5 flex items-center justify-center opacity-0 group-hover:opacity-100 pointer-events-none",children:c.jsx(os,{size:12,className:"text-zinc-600/50"})}),c.jsxs("button",{type:"button",onClick:a,className:"flex-1 min-w-0 text-left",children:[c.jsxs("div",{className:"flex items-center gap-1.5",children:[c.jsx("span",{className:se("text-xs font-bold uppercase tracking-[0.06em] truncate",n?"text-primary":"text-zinc-500"),children:e.type}),o&&c.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-500 shrink-0","aria-hidden":!0})]}),c.jsx("span",{className:"text-[11px] text-zinc-600 block truncate leading-snug mt-0.5",children:e.title??`${e.type} section`})]}),c.jsxs("div",{className:"flex items-center gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity duration-150",children:[c.jsxs(Lr,{children:[c.jsx($r,{asChild:!0,children:c.jsx(qe,{variant:"ghost",size:"icon-xs",className:"text-zinc-600 hover:text-zinc-300",onClick:f=>{f.stopPropagation(),l(f)},children:c.jsx(Wd,{size:12})})}),c.jsx(ar,{children:"Settings"})]}),s&&c.jsxs(Lr,{children:[c.jsx($r,{asChild:!0,children:c.jsx(qe,{variant:"ghost",size:"icon-xs",className:"text-zinc-600 hover:text-destructive",onClick:f=>{f.stopPropagation(),d()},children:c.jsx(en,{size:12})})}),c.jsx(ar,{children:"Delete section"})]})]})]})}function b0({layer:e,opts:t}){const{attributes:r,listeners:n,setNodeRef:o,transform:i,transition:s,isDragging:a}=Kf({id:e.id,disabled:!t.canReorder}),l={transform:wt.Transform.toString(i),transition:s};return c.jsx("div",{ref:o,style:l,className:se(a&&"z-10"),children:c.jsx(wi,{layer:e,opts:{...t,isDragging:a},dragHandleProps:t.canReorder?{...r,...n,"aria-roledescription":"elemento trascinabile"}:void 0})})}const bc=({selectedSection:e,pageData:t,allSectionsData:r=[],onUpdate:n,onUpdateSection:o,onClose:i,expandedItemPath:s=null,onReorderSection:a,allLayers:l=[],activeSectionId:d,onRequestScrollToSection:u,onDeleteSection:f,onAddSection:h,hasChanges:p=!1,onSaveToFile:w,onHotSave:m,saveSuccessFeedback:v=!1,hotSaveSuccessFeedback:y=!1,hotSaveInProgress:k=!1,showLegacySave:x=!0,showHotSave:S=!1,onResetToFile:C,showResetToFile:E=!1,pageSlugs:N=[],currentSlug:j="home",onPageChange:D})=>{const{schemas:M}=hr(),[I,R]=g.useState(!0),[L,K]=g.useState(null),[B,W]=g.useState(null),[U,A]=g.useState(null),[J,oe]=g.useState(null),T=g.useRef(null),F=g.useRef(null),X=bu(vo(Eo,m0),vo(Os,g0),vo(So,{coordinateGetter:qf})),G=g.useDeferredValue(e),ve=e!=null&&(G==null?void 0:G.id)!==e.id,le=s&&s.length>0?s:U?[U]:null,P=le!=null&&le.length?{fieldKey:le[le.length-1].fieldKey,itemId:le[le.length-1].itemId}:null,Q=g.useRef(s);g.useEffect(()=>{Q.current!=null&&s==null&&A(null),Q.current=s},[s]),g.useEffect(()=>{(e==null?void 0:e.id)!=null&&R(!1)},[e==null?void 0:e.id]);const ee=()=>{const _=requestAnimationFrame(()=>{requestAnimationFrame(()=>{const re=T.current;re&&re.scrollTo({top:0,behavior:"smooth"})})});return()=>cancelAnimationFrame(_)},$=g.useRef(I);g.useEffect(()=>{if(I&&!$.current){const _=ee();return $.current=I,_}$.current=I},[I]),g.useEffect(()=>{if(!P)return;const _=T.current;if(!_)return;const re=requestAnimationFrame(()=>{const ne=_.querySelector("[data-jp-expanded-item]")??_.querySelector("[data-jp-focused-field]");ne&&ne.scrollIntoView({behavior:"smooth",block:"start"})});return()=>cancelAnimationFrame(re)},[P]);const ie=_=>{R(!1),u==null||u(_)},te=()=>{R(_=>{const re=!_;return re&&ee(),re})},ke=(_,re)=>{re.stopPropagation(),r.length>0&&o?oe(_):(R(!1),u==null||u(_))};g.useEffect(()=>{if(J==null)return;const _=re=>{re.key==="Escape"&&oe(null)};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[J]);const we=_=>{L===_?(f==null||f(_),K(null)):(K(_),setTimeout(()=>K(null),3e3))},De=g.useMemo(()=>l.filter(_=>_.scope==="local").map(_=>_.id),[l]),Re=!!a&&De.length>0,Be=_=>{W(_.active.id)},Ne=_=>{W(null);const{active:re,over:ne}=_;if(!ne||re.id===ne.id||!a)return;const he=l.findIndex(_e=>_e.id===re.id),Le=l.findIndex(_e=>_e.id===ne.id);if(he===-1||Le===-1)return;const Ce=he<Le?Le:Le-1;a(re.id,Ce)},Xe=e?t.sections.find(_=>_.id===e.id):void 0,He=G?t.sections.find(_=>_.id===G.id):void 0,Ve=G?M[G.type]:void 0,gt=g.useMemo(()=>{if(!Ve)return!1;const _=Ve.shape,re=Object.keys(_).filter(ne=>!bi.has(ne));return re.length===0?!1:re.every(ne=>mc.has(vi(_[ne])))},[Ve]);g.useEffect(()=>{(e==null?void 0:e.id)!=null&&gt&&R(!0)},[e==null?void 0:e.id,gt]);const Tt=l.length>0&&(I||!e),Qe=j?j.charAt(0).toUpperCase()+j.slice(1):"Select page",cr=g.useMemo(()=>{const _=[];let re=null;for(const ne of l){const he=ne.type.toUpperCase(),Le=re!==null&&(re==="HEADER"&&he!=="HEADER"||re!=="HEADER"&&re!=="FOOTER"&&he==="FOOTER");_.push({layer:ne,showSeparatorAbove:Le}),re=he}return _},[l]);return c.jsx(Zg,{children:c.jsxs("aside",{className:"relative w-full h-full bg-zinc-950 border-l border-zinc-800 flex flex-col shadow-2xl shrink-0 min-w-0 animate-in slide-in-from-right duration-300",children:[c.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[c.jsxs("div",{className:"min-w-0",children:[c.jsx("h2",{className:"text-sm font-bold text-white",children:"Inspector"}),c.jsx("p",{className:"text-[10px] tracking-[0.06em] text-zinc-600 mt-0.5",children:e?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"text-primary font-bold",children:e.type}),c.jsx("span",{className:"text-zinc-700 mx-1.5",children:"|"}),c.jsx("span",{className:"uppercase",children:e.scope})]}):c.jsxs("span",{className:"text-zinc-600",children:[Qe," · ",l.length," sections"]})})]}),c.jsx(qe,{variant:"ghost",size:"icon-sm",onClick:i,"aria-label":"Close Inspector",children:c.jsx(Wt,{size:14})})]}),N.length>0&&D&&c.jsx(h0,{pageSlugs:N,currentSlug:j,onPageChange:D,sectionCount:l.length,currentPageLabel:Qe}),l.length>0&&c.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border-t border-zinc-800/50",children:[c.jsxs("button",{type:"button",onClick:te,className:"flex items-center gap-2 flex-1 cursor-pointer min-w-0 text-left","aria-expanded":Tt,"aria-label":Tt?"Collapse Page Layers":"Expand Page Layers",children:[c.jsx(uo,{size:14,className:"text-zinc-500 shrink-0"}),c.jsx("span",{className:"text-[11px] font-semibold tracking-[0.04em] text-zinc-400",children:"Page Layers"}),c.jsxs("span",{className:"text-[10px] text-zinc-600",children:["(",l.length,")"]}),c.jsx(co,{size:13,className:se("ml-auto text-zinc-600 transition-transform duration-200 shrink-0",!I&&"rotate-180")})]}),h!=null&&c.jsxs(Lr,{children:[c.jsx($r,{asChild:!0,children:c.jsx(qe,{variant:"ghost",size:"icon-sm",className:"text-zinc-500 hover:text-primary",onClick:h,children:c.jsx(fo,{size:14})})}),c.jsx(ar,{children:"Add section"})]})]}),c.jsx("div",{className:"relative flex-1 min-h-0 min-w-0 flex flex-col overflow-hidden",children:c.jsxs("div",{ref:T,className:"min-h-0 min-w-0 flex-1 overflow-y-auto overflow-x-hidden flex flex-col",role:"region","aria-label":"Inspector content",children:[c.jsx("div",{className:"flex flex-col min-h-0",children:Tt&&c.jsxs("div",{className:"py-1",children:[c.jsxs(mf,{sensors:X,collisionDetection:wu,modifiers:[If],onDragStart:Be,onDragEnd:Ne,accessibility:{announcements:{onDragStart:()=>"Sezione presa in carico. Usa i tasti freccia per spostare, Spazio per rilasciare.",onDragOver:({over:_})=>_?`Posizione ${De.indexOf(String(_.id))+1} di ${De.length}.`:void 0,onDragEnd:({over:_})=>_?"Sezione rilasciata in nuova posizione.":"Riposizionamento annullato.",onDragCancel:()=>"Riposizionamento annullato."}},children:[c.jsx($f,{items:De,strategy:Rf,children:c.jsx("div",{className:"px-2 space-y-0.5",children:cr.map(({layer:_,showSeparatorAbove:re})=>c.jsxs(g.Fragment,{children:[re&&c.jsx("div",{className:"mx-3 border-t border-zinc-800/60 my-1"}),_.scope==="local"&&Re?c.jsx(b0,{layer:_,opts:{isSelected:(e==null?void 0:e.id)===_.id,isActive:d===_.id,isDragging:!1,canReorder:!0,canDelete:!!f,deleteConfirm:L===_.id,onSelect:()=>ie(_.id),onDelete:()=>we(_.id),onOpenSettings:ne=>ke(_.id,ne)}}):c.jsx("div",{children:c.jsx(wi,{layer:_,opts:{isSelected:(e==null?void 0:e.id)===_.id,isActive:d===_.id,isDragging:!1,canDelete:_.scope==="local"&&!!f,deleteConfirm:L===_.id,onSelect:()=>ie(_.id),onDelete:()=>we(_.id),onOpenSettings:ne=>ke(_.id,ne)}})})]},_.id))})}),c.jsx(Of,{dropAnimation:{duration:200,easing:"cubic-bezier(0.18, 0.67, 0.6, 1.22)"},children:B?(()=>{const _=l.find(re=>re.id===B);return _?c.jsx("div",{className:"px-2 w-full max-w-[var(--inspector-width,280px)]",children:c.jsx(wi,{layer:_,opts:{isSelected:!1,isActive:!1,isDragging:!0,canDelete:!1,deleteConfirm:!1,onSelect:()=>{},onDelete:()=>{},onOpenSettings:()=>{}},dragHandleProps:{"aria-hidden":!0}})}):null})():null})]}),L&&c.jsxs("div",{className:"flex items-center gap-2 py-2 px-3 mt-1 mx-2 rounded-md bg-amber-500/10 border border-amber-500/30",children:[c.jsx(_d,{size:12,className:"text-amber-500 shrink-0"}),c.jsx("p",{className:"text-[10px] text-amber-500 font-medium",children:"Click delete again to confirm"})]})]})}),P&&Xe&&(()=>{const _=Xe.data||{};let re;if(le&&le.length>0){let ne=_;for(const Ce of le){const _e=ne==null?void 0:ne[Ce.fieldKey];Ce.itemId!=null&&Array.isArray(_e)?ne=_e.find(Ee=>String(Ee==null?void 0:Ee.id)===String(Ce.itemId))??null:ne=_e}const he=ne||{},Le=P.fieldKey;re=(typeof he.name=="string"?he.name:null)??(typeof he.title=="string"?he.title:null)??(typeof he.label=="string"?he.label:null)??xi(Le)}else{const ne=P.fieldKey;if(P.itemId!=null){const Ce=(Array.isArray(_[ne])?_[ne]:[]).find(_e=>String(_e==null?void 0:_e.id)===String(P.itemId))||{};re=(typeof Ce.name=="string"?Ce.name:null)??(typeof Ce.title=="string"?Ce.title:null)??(typeof Ce.label=="string"?Ce.label:null)??xi(ne)}else re=xi(ne)}return c.jsxs("div",{className:"px-4 py-2 border-b border-zinc-800 bg-zinc-900/50",children:[c.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-zinc-500",children:"Editing"}),c.jsx("p",{className:"text-xs font-medium text-white truncate mt-0.5",children:re})]})})(),c.jsx("div",{className:"flex-1 p-4",onFocusCapture:()=>e!=null&&R(!1),children:e?ve?c.jsxs("div",{className:"space-y-4 animate-pulse",role:"status","aria-label":"Loading form",children:[c.jsx("div",{className:"h-4 w-3/4 rounded bg-zinc-800"}),c.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),c.jsx("div",{className:"h-10 rounded bg-zinc-800/80"}),c.jsx("div",{className:"h-20 rounded bg-zinc-800/80"}),c.jsx("div",{className:"h-10 rounded bg-zinc-800/60"})]}):Ve?(()=>{const re=Object.keys(Ve.shape).filter(he=>!bi.has(he)&&!mc.has(vi(Ve.shape[he]))),ne=(He==null?void 0:He.data)||{};return re.length===0?c.jsx("p",{className:"text-xs text-zinc-500",children:"Inline editorial section: edit content directly on the canvas."}):c.jsx(Dr,{schema:Ve,data:ne,onChange:he=>n(he),keys:re,expandedItemPath:le,onSidebarExpandedItemChange:A})})():c.jsxs("div",{className:"text-xs text-red-400 p-4 border border-dashed border-red-900/30 rounded bg-red-900/10",children:["No schema found for ",(G==null?void 0:G.type)??e.type]}):c.jsx("p",{className:"text-xs text-zinc-600 text-center py-10",children:"Select a layer above or on the stage to edit."})})]})}),c.jsx("div",{className:"px-4 py-2.5 border-t border-zinc-800 bg-zinc-900/50 flex items-center justify-between gap-3 opacity-100 shrink-0",children:(x&&w!=null||S&&m!=null||C!=null)&&c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[c.jsx("div",{className:se("w-2 h-2 rounded-full transition-colors duration-300 shrink-0",p?"bg-amber-500 shadow-[0_0_8px_rgba(245,158,11,0.5)]":"bg-emerald-500")}),c.jsx("span",{className:se("text-sm font-medium transition-colors duration-300 truncate",v||y?"text-emerald-400":p?"text-amber-500":"text-zinc-500"),children:v||y?"Saved":p?"Unsaved Changes":"All Changes Saved"})]}),x&&w!=null&&c.jsxs(Lr,{children:[c.jsx($r,{asChild:!0,children:c.jsxs(qe,{size:"default",disabled:!p,className:"h-9 min-w-[156px] px-5 text-sm gap-2 ml-auto",onClick:_=>{_.preventDefault(),_.stopPropagation(),w()},children:[c.jsx(ss,{size:14}),c.jsx("span",{children:"Save"})]})}),c.jsx(ar,{children:"Save to file"})]}),S&&m!=null&&c.jsxs(Lr,{children:[c.jsx($r,{asChild:!0,children:c.jsxs(qe,{size:"default",disabled:!p||k,className:"h-9 min-w-[156px] px-5 text-sm gap-2 ml-auto",onClick:_=>{_.preventDefault(),_.stopPropagation(),m()},children:[c.jsx(ss,{size:14}),c.jsx("span",{children:k?"Saving...":"Hot Save"})]})}),c.jsx(ar,{children:"Hot save to edge"})]}),C!=null&&E&&c.jsx("button",{type:"button",onClick:C,className:"shrink-0 flex items-center gap-1.5 px-2 py-1 rounded text-[11px] font-medium transition-all border border-zinc-700 bg-zinc-900 text-zinc-400 hover:bg-zinc-800 hover:border-zinc-600 hover:text-zinc-300",title:"Ripristina la pagina dal file (elimina le modifiche in memoria)",children:c.jsx("span",{children:"Ripristina da file"})})]})}),J!=null&&r.length>0&&o!=null&&(()=>{const _=r.find(Ee=>Ee.id===J),re=l.find(Ee=>Ee.id===J);if(!_)return null;const ne=(re==null?void 0:re.scope)==="global"?"global":"local",he=_.type,Le=M[he],_e=(Le?Object.keys(Le.shape):[]).filter(Ee=>bi.has(Ee)),dr=_.data??{};return _e.length===0?c.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"section-settings-modal-title",onClick:()=>oe(null),children:c.jsxs("div",{ref:F,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full overflow-hidden",onClick:Ee=>Ee.stopPropagation(),children:[c.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800",children:[c.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",he]}),c.jsx("button",{type:"button",onClick:()=>oe(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings",children:c.jsx(Wt,{size:18})})]}),c.jsx("div",{className:"p-4",children:c.jsx("p",{className:"text-xs text-zinc-500",children:"No settings fields for this section."})})]})}):c.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 p-4",role:"dialog","aria-modal":"true","aria-labelledby":"section-settings-modal-title",onClick:Ee=>Ee.target===Ee.currentTarget&&oe(null),children:c.jsxs("div",{ref:F,className:"relative rounded-lg border border-zinc-700 bg-zinc-900 shadow-xl max-w-md w-full max-h-[85vh] flex flex-col overflow-hidden",onClick:Ee=>Ee.stopPropagation(),children:[c.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-zinc-800 shrink-0",children:[c.jsxs("h2",{id:"section-settings-modal-title",className:"text-sm font-bold text-white",children:["Settings — ",he]}),c.jsx("button",{type:"button",onClick:()=>oe(null),className:"p-1.5 rounded text-zinc-500 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close settings (Escape)",children:c.jsx(Wt,{size:18})})]}),c.jsx("div",{className:"flex-1 overflow-y-auto p-4 custom-scrollbar",children:c.jsx(Dr,{schema:Le,data:dr,onChange:Ee=>{const z={..._.data,...Ee};o(J,ne,he,z)},keys:_e})})]})})})()]})})},vc=({draft:e,globalDraft:t,menuConfig:r,themeConfig:n,slug:o,selectedId:i,scrollToSectionId:s,onScrollRequested:a})=>{const l=g.useRef(null),d=g.useCallback(()=>{var u;(u=l.current)!=null&&u.contentWindow&&l.current.contentWindow.postMessage({type:ye.UPDATE_DRAFTS,draft:e,globalDraft:t,menuConfig:r,themeConfig:n},"*")},[e,t,r,n]);return g.useEffect(()=>{d()},[d]),g.useEffect(()=>{const u=f=>{f.data.type===ye.STAGE_READY&&d()};return window.addEventListener("message",u),()=>window.removeEventListener("message",u)},[d]),g.useEffect(()=>{var u;(u=l.current)!=null&&u.contentWindow&&l.current.contentWindow.postMessage({type:ye.SYNC_SELECTION,selectedId:i},"*")},[i]),g.useEffect(()=>{var u;!s||!((u=l.current)!=null&&u.contentWindow)||(l.current.contentWindow.postMessage({type:ye.REQUEST_SCROLL_TO_SECTION,sectionId:s},"*"),a==null||a())},[s,a]),c.jsx("div",{className:"w-full h-full bg-background overflow-hidden",children:c.jsx("iframe",{ref:l,src:`/admin/preview/${o}`,className:"w-full h-full border-none",title:"JsonPages Stage"})})},yi=new Set;function v0(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function xc(e,t=[],r={}){return Object.entries(e).forEach(([n,o])=>{const i=[...t,v0(n)];if(typeof o=="string"||typeof o=="number"){r[`--theme-${i.join("-")}`]=String(o);return}o&&typeof o=="object"&&!Array.isArray(o)&&xc(o,i,r)}),r}function Ue(e,t,r,n){n&&(e[t]=`var(${r})`)}function x0(e){const t=xc(e.tokens),r={...t};return Ue(r,"--theme-primary","--theme-colors-primary",t["--theme-colors-primary"]),Ue(r,"--theme-secondary","--theme-colors-secondary",t["--theme-colors-secondary"]),Ue(r,"--theme-accent","--theme-colors-accent",t["--theme-colors-accent"]),Ue(r,"--theme-background","--theme-colors-background",t["--theme-colors-background"]),Ue(r,"--theme-surface","--theme-colors-surface",t["--theme-colors-surface"]),Ue(r,"--theme-surface-alt","--theme-colors-surface-alt",t["--theme-colors-surface-alt"]),Ue(r,"--theme-text","--theme-colors-text",t["--theme-colors-text"]),Ue(r,"--theme-text-muted","--theme-colors-text-muted",t["--theme-colors-text-muted"]),Ue(r,"--theme-border","--theme-colors-border",t["--theme-colors-border"]),Ue(r,"--theme-font-primary","--theme-typography-font-family-primary",t["--theme-typography-font-family-primary"]),Ue(r,"--theme-font-mono","--theme-typography-font-family-mono",t["--theme-typography-font-family-mono"]),Ue(r,"--theme-font-display","--theme-typography-font-family-display",t["--theme-typography-font-family-display"]),Ue(r,"--theme-radius-sm","--theme-border-radius-sm",t["--theme-border-radius-sm"]),Ue(r,"--theme-radius-md","--theme-border-radius-md",t["--theme-border-radius-md"]),Ue(r,"--theme-radius-lg","--theme-border-radius-lg",t["--theme-border-radius-lg"]),r}const eo={setTheme:e=>{const t=document.documentElement,r=x0(e);yi.forEach(n=>{t.style.removeProperty(n)}),yi.clear(),Object.entries(r).forEach(([n,o])=>{t.style.setProperty(n,o),yi.add(n)})}};function w0(e,t){if(!t)return e;const r=e[e.length-1];return r&&r.itemId==null&&r.fieldKey===t?e:[...e,{fieldKey:t}]}function wc(e,t){var i,s,a;const r=[];let n=null,o=e;for(;o&&o!==t;){const l=(i=o.getAttribute)==null?void 0:i.call(o,"data-jp-item-id"),d=(s=o.getAttribute)==null?void 0:s.call(o,"data-jp-item-field");if(l&&d&&r.push({fieldKey:d,itemId:l}),n==null){const u=(a=o.getAttribute)==null?void 0:a.call(o,"data-jp-field");u&&(n=u)}o=o.parentElement}return r.reverse(),w0(r,n)}const y0='[data-jp-ignore-select="true"],[data-jp-interactive="true"],.ProseMirror,[contenteditable="true"],button,input,textarea,select,[role="button"],[role="menuitem"]',k0="[data-jp-field],[data-jp-item-id],[data-jp-item-field]",yc=()=>{var h;const[e,t]=g.useState(null),[r,n]=g.useState(null),[o,i]=g.useState({main:[]}),[s,a]=g.useState(null),[l,d]=g.useState(null);if(g.useEffect(()=>{const p=w=>{var m;if(!(w.origin!==window.location.origin||w.source!==window.parent)&&(w.data.type===ye.UPDATE_DRAFTS&&(t(w.data.draft),n(w.data.globalDraft),(m=w.data.menuConfig)!=null&&m.main&&i({main:w.data.menuConfig.main}),w.data.themeConfig&&eo.setTheme(w.data.themeConfig)),w.data.type===ye.SYNC_SELECTION&&a(w.data.selectedId),w.data.type===ye.REQUEST_SCROLL_TO_SECTION&&d(w.data.sectionId??null),w.data.type===ye.REQUEST_INLINE_FLUSH)){const v=typeof w.data.requestId=="string"?w.data.requestId:null;window.dispatchEvent(new CustomEvent(ye.REQUEST_INLINE_FLUSH,{detail:{requestId:v}})),setTimeout(()=>{window.parent.postMessage({type:ye.INLINE_FLUSHED,requestId:v},window.location.origin)},0)}};return window.addEventListener("message",p),window.parent.postMessage({type:ye.STAGE_READY},"*"),()=>window.removeEventListener("message",p)},[]),g.useEffect(()=>{const p=v=>!!v.closest(k0),w=v=>!!(v.closest('[data-jp-ignore-select="true"]')||v.closest(y0)&&!p(v)||v.closest("a[href]")&&!p(v)),m=v=>{var L,K,B;const y=v.target;if(w(y)){y.closest("a[href]")&&v.preventDefault();return}const k=v.clientX,x=v.clientY;let S=null,C=y;for(;C&&C!==document.body;){const W=(L=C.getAttribute)==null?void 0:L.call(C,"data-section-id"),U=(K=C.getAttribute)==null?void 0:K.call(C,"data-section-type"),A=(B=C.getAttribute)==null?void 0:B.call(C,"data-section-scope");if(W&&U&&A){S=C;break}C=C.parentElement}if(!S)return;v.preventDefault(),v.stopPropagation();const E=S.getAttribute("data-section-id"),N=S.getAttribute("data-section-type"),j=S.getAttribute("data-section-scope");if(!E||!N||!j)return;const D={id:E,type:N,scope:j};if(y===S){window.parent.postMessage({type:ye.SECTION_SELECT,section:D},"*");return}const M=document.elementFromPoint(k,x)??y;if(!M||!S.contains(M)){window.parent.postMessage({type:ye.SECTION_SELECT,section:D},"*");return}if(M===S){window.parent.postMessage({type:ye.SECTION_SELECT,section:D},"*");return}let I=wc(M,S);if(I.length===0&&M){let W=null;const U=A=>{var oe,T;const J=A.getBoundingClientRect();if(J.left<=k&&k<=J.right&&J.top<=x&&x<=J.bottom){for(let F=0;F<A.children.length;F++)U(A.children[F]);((oe=A.getAttribute)!=null&&oe.call(A,"data-jp-item-id")||(T=A.getAttribute)!=null&&T.call(A,"data-jp-field"))&&(W=A)}};U(M),W&&(I=wc(W,S))}const R={type:ye.SECTION_SELECT,section:D};I.length>0&&(R.itemPath=I),window.parent.postMessage(R,"*")};return document.addEventListener("click",m,!0),()=>document.removeEventListener("click",m,!0)},[]),g.useEffect(()=>{if(!l)return;const p=setTimeout(()=>d(null),600);return()=>clearTimeout(p)},[l]),!e||!r)return c.jsx("div",{className:"flex items-center justify-center h-screen w-full bg-zinc-950 text-zinc-500 font-mono text-xs uppercase tracking-widest animate-pulse",children:"Waiting for Studio Signal..."});const u={main:nn((h=r.header)==null?void 0:h.data,o.main)},f=p=>{window.parent.postMessage({type:ye.ACTIVE_SECTION_CHANGED,activeSectionId:p},"*")};return c.jsx(Jr,{mode:"studio",children:c.jsx("div",{className:"jp-ice-active",children:c.jsx(ho,{pageConfig:e,siteConfig:r,menuConfig:u,selectedId:s,scrollToSectionId:l,onActiveSectionChange:f})})})};function S0(e){return e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}const kc=({open:e,onClose:t,sectionTypes:r,sectionTypeLabels:n,onSelect:o})=>{if(g.useEffect(()=>{if(!e)return;const s=a=>{a.key==="Escape"&&t()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[e,t]),!e)return null;const i=s=>(n==null?void 0:n[s])??S0(s);return c.jsxs("div",{className:"fixed inset-0 z-[100] flex items-center justify-center p-4",role:"dialog","aria-modal":"true","aria-labelledby":"jp-add-section-title",children:[c.jsx("div",{className:"absolute inset-0 bg-zinc-950/80 backdrop-blur-sm",onClick:t,"aria-hidden":"true"}),c.jsxs("div",{className:"relative w-full max-w-md max-h-[85vh] flex flex-col rounded-xl border border-zinc-700 bg-zinc-900 shadow-2xl overflow-hidden",children:[c.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-zinc-800 shrink-0",children:[c.jsxs("div",{className:"flex items-center gap-2",children:[c.jsx("div",{className:"p-1.5 rounded-lg bg-blue-500/20 text-blue-400",children:c.jsx(uo,{size:18})}),c.jsx("h2",{id:"jp-add-section-title",className:"text-sm font-bold text-white",children:"Add section"})]}),c.jsx("button",{type:"button",onClick:t,className:"p-1.5 rounded-md text-zinc-400 hover:text-white hover:bg-zinc-800 transition-colors","aria-label":"Close",children:c.jsx(Wt,{size:18})})]}),c.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:r.length===0?c.jsx("p",{className:"text-xs text-zinc-500 text-center py-8",children:"No section types available. Configure addableSectionTypes or schemas."}):c.jsx("ul",{className:"grid gap-2",role:"listbox",children:r.map(s=>c.jsx("li",{role:"option",children:c.jsxs("button",{type:"button",onClick:()=>{o(s),t()},className:se("w-full flex items-center gap-3 px-4 py-3 rounded-lg text-left","border border-zinc-700/80 bg-zinc-800/50","hover:border-blue-500/40 hover:bg-zinc-800 transition-colors","focus:outline-none focus:ring-2 focus:ring-blue-500/50 focus:ring-offset-2 focus:ring-offset-zinc-900"),children:[c.jsx("span",{className:"flex items-center justify-center w-9 h-9 rounded-md bg-zinc-700/80 text-zinc-400 text-xs font-mono shrink-0",children:s}),c.jsx("span",{className:"text-sm font-medium text-zinc-200",children:i(s)})]})},s))})}),c.jsx("div",{className:"px-5 py-3 border-t border-zinc-800 shrink-0",children:c.jsx("p",{className:"text-[10px] text-zinc-500 uppercase tracking-wider",children:"Choose a section type to add to the bottom of this page"})})]})]})},Sc=()=>c.jsxs("div",{style:{"--local-bg":"var(--color-background)","--local-text":"var(--color-text)","--local-text-muted":"var(--color-text-muted)","--local-primary":"var(--color-primary)","--local-radius-md":"var(--radius-md)"},className:"min-h-screen flex flex-col items-center justify-center bg-[var(--local-bg)] px-6",children:[c.jsx("h1",{className:"text-6xl font-bold text-[var(--local-text)] mb-4",children:"404"}),c.jsx("p",{className:"text-xl text-[var(--local-text-muted)] mb-8",children:"Page not found"}),c.jsx("a",{href:"/",className:"inline-flex items-center gap-2 px-6 py-3 rounded-[var(--local-radius-md)] bg-[var(--local-primary)] text-[var(--local-bg)] font-semibold text-sm hover:opacity-90 transition-opacity",children:"Back to Home"})]});function ki(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Cc(e){return e==null?e:JSON.parse(JSON.stringify(e))}function Ec(){if(typeof window>"u")return null;const e=window;return e.__olonWebMcpTools__||(e.__olonWebMcpTools__=new Map),e.__olonWebMcpTools__}const Wr="update-section-draft",to="save-project-state";function jc(){return{type:"object",additionalProperties:!1,properties:{slug:{type:"string"},sectionId:{type:"string",description:"The unique ID of the section to update (found via data-jp-section-id or MCP read)."},sectionType:{type:"string",description:'The type of the section being updated (e.g. "olon-hero"). Used to pick the correct validation schema.'},scope:{type:"string",enum:["local","global"],default:"local"},data:{type:"object",description:"Full replacement payload validated against the section's schema."},itemPath:{type:"array",description:"Optional root-to-leaf path for targeted field updates.",items:{type:"object",additionalProperties:!1,properties:{fieldKey:{type:"string"},itemId:{type:"string"}},required:["fieldKey"]}},fieldKey:{type:"string",description:"Shorthand for a top-level scalar field update when itemPath is omitted."},value:{description:"Value written to the targeted field or array item."}},required:["sectionId"],oneOf:[{required:["data"]},{required:["itemPath","value"]},{required:["fieldKey","value"]}]}}function Nc(){return{type:"object",additionalProperties:!1,properties:{message:{type:"string",description:"Optional save reason or commit message equivalent."}}}}function Si(e,t,r){if(t.length===0)throw new Error("Selection path is empty.");const n=Cc(e);let o=n;for(let i=0;i<t.length;i+=1){const s=t[i],a=i===t.length-1;if(!ki(o))throw new Error(`Cannot navigate path segment "${s.fieldKey}" on a non-object value.`);if(s.itemId!=null){const l=o[s.fieldKey];if(!Array.isArray(l))throw new Error(`Field "${s.fieldKey}" is not an array.`);const d=l.findIndex(u=>ki(u)&&String(u.id??"")===String(s.itemId));if(d===-1)throw new Error(`Array item "${s.itemId}" not found under "${s.fieldKey}".`);if(a)return l[d]=r,n;o=l[d];continue}if(a)return o[s.fieldKey]=r,n;o=o[s.fieldKey]}return n}function Ci(e,t){if(t.data&&ki(t.data))return Cc(t.data);if(Array.isArray(t.itemPath)&&t.itemPath.length>0)return Si(e,t.itemPath,t.value);if(typeof t.fieldKey=="string"&&t.fieldKey.trim().length>0)return Si(e,[{fieldKey:t.fieldKey}],t.value);throw new Error('WebMCP mutation requires either "data", "itemPath", or "fieldKey".')}async function Tc(e){if(e.startsWith("olon://pages/")){const t=e.replace("olon://pages/",""),r=window.location.pathname.replace(/\/admin(\/.*)?$/,"").replace(/\/$/,""),n=await fetch(`${r}/pages/${t}.json`);if(!n.ok)throw new Error(`Resource not found: ${e} (at ${r}/pages/${t}.json)`);return await n.json()}throw new Error(`Unsupported URI scheme: ${e}`)}function ro(){if(typeof window>"u"||typeof navigator>"u")return;const e=Ec();if(!e)return;const t=navigator;t.modelContext||(t.modelContext={}),t.modelContext.registerTool=function(r){e.set(r.name,r)},t.modelContext.unregisterTool=function(r){e.delete(r)},t.modelContext.readResource=Tc,t.modelContextProtocol||(t.modelContextProtocol={}),t.modelContextProtocol.listTools=function(){return Array.from(e.values()).map(({execute:r,...n})=>n)},t.modelContextProtocol.executeTool=async function(r,n){const o=e.get(r);if(!o)throw new Error(`Unknown WebMCP tool: ${r}`);const i=n?JSON.parse(n):{},s=await o.execute(i);return JSON.stringify(s)},t.modelContextProtocol.readResource=async function(r){const n=await Tc(r);return JSON.stringify(n)}}function Ei(e){var n,o;if(typeof navigator>"u")return()=>{};ro();const t=navigator,r=Ec();return!t.modelContext||!r?()=>{}:((o=(n=t.modelContext).registerTool)==null||o.call(n,e),r.set(e.name,e),()=>{var i,s;r.delete(e.name),(s=(i=t.modelContext)==null?void 0:i.unregisterTool)==null||s.call(i,e.name)})}function C0(e){if(typeof window>"u")return{emitUpdate:()=>{},disconnect:()=>{}};let t=null,r=!1,n;const i="ws://localhost:5174",s=()=>{if(!r)try{t=new WebSocket(i),t.onopen=()=>{console.debug("[OlonJs WebMCP] Socket connected")},t.onmessage=d=>{try{const u=JSON.parse(d.data);u.type==="SYNC_DRAFT_UPDATE"&&u.draft&&u.globalDraft&&e(u.draft,u.globalDraft)}catch(u){console.warn("[OlonJs WebMCP] Failed to parse socket message",u)}},t.onerror=()=>{},t.onclose=()=>{r||(n=window.setTimeout(s,3e3))}}catch(d){console.warn("[OlonJs WebMCP] Socket connection failed",d),r||(n=window.setTimeout(s,3e3))}};return s(),{emitUpdate:(d,u)=>{(t==null?void 0:t.readyState)===WebSocket.OPEN&&t.send(JSON.stringify({type:"SYNC_DRAFT_UPDATE",draft:d,globalDraft:u}))},disconnect:()=>{r=!0,n&&clearTimeout(n),t&&(t.close(),t=null)}}}const E0='/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-900:oklch(39.6% .141 25.723);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-zinc-950:oklch(14.1% .005 285.823);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-black:900;--tracking-tight:-.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:var(--background);--color-foreground:var(--foreground);--color-primary:var(--primary);--color-primary-foreground:var(--primary-foreground);--color-destructive:var(--destructive);--color-ring:var(--ring)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border)}body{background-color:var(--background);color:var(--foreground);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.right-0{right:calc(var(--spacing)*0)}.right-2{right:calc(var(--spacing)*2)}.bottom-0{bottom:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-3{left:calc(var(--spacing)*3)}.z-0{z-index:0}.z-10{z-index:10}.z-50,.z-\\[50\\]{z-index:50}.z-\\[60\\]{z-index:60}.z-\\[70\\]{z-index:70}.z-\\[100\\]{z-index:100}.z-\\[9998\\]{z-index:9998}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-4{margin:calc(var(--spacing)*4)}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-1\\.5{margin-inline:calc(var(--spacing)*1.5)}.mx-2{margin-inline:calc(var(--spacing)*2)}.mx-3{margin-inline:calc(var(--spacing)*3)}.my-1{margin-block:calc(var(--spacing)*1)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.aspect-\\[4\\/3\\]{aspect-ratio:4/3}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-12{height:calc(var(--spacing)*12)}.h-20{height:calc(var(--spacing)*20)}.h-40{height:calc(var(--spacing)*40)}.h-\\[var\\(--radix-select-trigger-height\\)\\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-screen{height:100vh}.max-h-96{max-height:calc(var(--spacing)*96)}.max-h-\\[45vh\\]{max-height:45vh}.max-h-\\[85vh\\]{max-height:85vh}.max-h-\\[90vh\\]{max-height:90vh}.max-h-\\[320px\\]{max-height:320px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-16{min-height:calc(var(--spacing)*16)}.min-h-\\[18px\\]{min-height:18px}.min-h-\\[96px\\]{min-height:96px}.min-h-\\[240px\\]{min-height:240px}.min-h-screen{min-height:100vh}.w-1{width:calc(var(--spacing)*1)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-3\\/4{width:75%}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)}.w-\\[var\\(--radix-popover-trigger-width\\)\\]{width:var(--radix-popover-trigger-width)}.w-full{width:100%}.w-px{width:1px}.w-screen{width:100vw}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[var\\(--inspector-width\\,280px\\)\\]{max-width:var(--inspector-width,280px)}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[8rem\\]{min-width:8rem}.min-w-\\[18px\\]{min-width:18px}.min-w-\\[156px\\]{min-width:156px}.min-w-\\[var\\(--radix-popover-trigger-width\\)\\]{min-width:var(--radix-popover-trigger-width)}.min-w-\\[var\\(--radix-select-trigger-width\\)\\]{min-width:var(--radix-select-trigger-width)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0\\.5{--tw-translate-x:calc(var(--spacing)*.5);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-3{--tw-translate-x:calc(var(--spacing)*3);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize-none{resize:none}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-nowrap{flex-wrap:nowrap}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing)*0)}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing)*2)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-x-reverse)))}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-\\[var\\(--local-radius-md\\)\\]{border-radius:var(--local-radius-md)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-amber-500\\/20{border-color:#f99c0033}@supports (color:color-mix(in lab,red,red)){.border-amber-500\\/20{border-color:color-mix(in oklab,var(--color-amber-500)20%,transparent)}}.border-amber-500\\/30{border-color:#f99c004d}@supports (color:color-mix(in lab,red,red)){.border-amber-500\\/30{border-color:color-mix(in oklab,var(--color-amber-500)30%,transparent)}}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-500\\/50{border-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.border-blue-500\\/50{border-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.border-blue-600{border-color:var(--color-blue-600)}.border-emerald-500\\/60{border-color:#00bb7f99}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\\/60{border-color:color-mix(in oklab,var(--color-emerald-500)60%,transparent)}}.border-primary{border-color:var(--color-primary)}.border-red-500\\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/20{border-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.border-red-500\\/50{border-color:#fb2c3680}@supports (color:color-mix(in lab,red,red)){.border-red-500\\/50{border-color:color-mix(in oklab,var(--color-red-500)50%,transparent)}}.border-red-900\\/30{border-color:#82181a4d}@supports (color:color-mix(in lab,red,red)){.border-red-900\\/30{border-color:color-mix(in oklab,var(--color-red-900)30%,transparent)}}.border-transparent{border-color:#0000}.border-zinc-700{border-color:var(--color-zinc-700)}.border-zinc-700\\/60{border-color:#3f3f4699}@supports (color:color-mix(in lab,red,red)){.border-zinc-700\\/60{border-color:color-mix(in oklab,var(--color-zinc-700)60%,transparent)}}.border-zinc-700\\/80{border-color:#3f3f46cc}@supports (color:color-mix(in lab,red,red)){.border-zinc-700\\/80{border-color:color-mix(in oklab,var(--color-zinc-700)80%,transparent)}}.border-zinc-800{border-color:var(--color-zinc-800)}.border-zinc-800\\/50{border-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/50{border-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.border-zinc-800\\/60{border-color:#27272a99}@supports (color:color-mix(in lab,red,red)){.border-zinc-800\\/60{border-color:color-mix(in oklab,var(--color-zinc-800)60%,transparent)}}.border-l-transparent{border-left-color:#0000}.bg-\\[var\\(--color-background\\)\\]{background-color:var(--color-background)}.bg-\\[var\\(--local-bg\\)\\]{background-color:var(--local-bg)}.bg-\\[var\\(--local-primary\\)\\]{background-color:var(--local-primary)}.bg-amber-500{background-color:var(--color-amber-500)}.bg-amber-500\\/5{background-color:#f99c000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/5{background-color:color-mix(in oklab,var(--color-amber-500)5%,transparent)}}.bg-amber-500\\/10{background-color:#f99c001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-500\\/10{background-color:color-mix(in oklab,var(--color-amber-500)10%,transparent)}}.bg-background{background-color:var(--color-background)}.bg-black{background-color:var(--color-black)}.bg-black\\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.bg-black\\/0{background-color:color-mix(in oklab,var(--color-black)0%,transparent)}}.bg-black\\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\\/30{background-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.bg-black\\/30{background-color:color-mix(in oklab,var(--color-black)30%,transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\\/60{background-color:color-mix(in oklab,var(--color-black)60%,transparent)}}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-500\\/5{background-color:#3080ff0d}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/5{background-color:color-mix(in oklab,var(--color-blue-500)5%,transparent)}}.bg-blue-500\\/10{background-color:#3080ff1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/10{background-color:color-mix(in oklab,var(--color-blue-500)10%,transparent)}}.bg-blue-500\\/15{background-color:#3080ff26}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/15{background-color:color-mix(in oklab,var(--color-blue-500)15%,transparent)}}.bg-blue-500\\/20{background-color:#3080ff33}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/20{background-color:color-mix(in oklab,var(--color-blue-500)20%,transparent)}}.bg-blue-500\\/\\[0\\.04\\]{background-color:#3080ff0a}@supports (color:color-mix(in lab,red,red)){.bg-blue-500\\/\\[0\\.04\\]{background-color:color-mix(in oklab,var(--color-blue-500)4%,transparent)}}.bg-blue-600{background-color:var(--color-blue-600)}.bg-blue-600\\/10{background-color:#155dfc1a}@supports (color:color-mix(in lab,red,red)){.bg-blue-600\\/10{background-color:color-mix(in oklab,var(--color-blue-600)10%,transparent)}}.bg-destructive\\/15{background-color:var(--color-destructive)}@supports (color:color-mix(in lab,red,red)){.bg-destructive\\/15{background-color:color-mix(in oklab,var(--color-destructive)15%,transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-primary,.bg-primary\\/10{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/10{background-color:color-mix(in oklab,var(--color-primary)10%,transparent)}}.bg-primary\\/\\[0\\.08\\]{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/\\[0\\.08\\]{background-color:color-mix(in oklab,var(--color-primary)8%,transparent)}}.bg-red-500\\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-red-500\\/15{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.bg-red-500\\/15{background-color:color-mix(in oklab,var(--color-red-500)15%,transparent)}}.bg-red-900\\/10{background-color:#82181a1a}@supports (color:color-mix(in lab,red,red)){.bg-red-900\\/10{background-color:color-mix(in oklab,var(--color-red-900)10%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/15{background-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.bg-white\\/15{background-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.bg-white\\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\\/20{background-color:color-mix(in oklab,var(--color-white)20%,transparent)}}.bg-white\\/\\[0\\.01\\]{background-color:#ffffff03}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.01\\]{background-color:color-mix(in oklab,var(--color-white)1%,transparent)}}.bg-white\\/\\[0\\.02\\]{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.02\\]{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.bg-white\\/\\[0\\.03\\]{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.bg-white\\/\\[0\\.03\\]{background-color:color-mix(in oklab,var(--color-white)3%,transparent)}}.bg-zinc-700{background-color:var(--color-zinc-700)}.bg-zinc-700\\/80{background-color:#3f3f46cc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-700\\/80{background-color:color-mix(in oklab,var(--color-zinc-700)80%,transparent)}}.bg-zinc-800{background-color:var(--color-zinc-800)}.bg-zinc-800\\/30{background-color:#27272a4d}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/30{background-color:color-mix(in oklab,var(--color-zinc-800)30%,transparent)}}.bg-zinc-800\\/50{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/50{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.bg-zinc-800\\/60{background-color:#27272a99}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/60{background-color:color-mix(in oklab,var(--color-zinc-800)60%,transparent)}}.bg-zinc-800\\/80{background-color:#27272acc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-800\\/80{background-color:color-mix(in oklab,var(--color-zinc-800)80%,transparent)}}.bg-zinc-900{background-color:var(--color-zinc-900)}.bg-zinc-900\\/20{background-color:#18181b33}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/20{background-color:color-mix(in oklab,var(--color-zinc-900)20%,transparent)}}.bg-zinc-900\\/40{background-color:#18181b66}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/40{background-color:color-mix(in oklab,var(--color-zinc-900)40%,transparent)}}.bg-zinc-900\\/50{background-color:#18181b80}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/50{background-color:color-mix(in oklab,var(--color-zinc-900)50%,transparent)}}.bg-zinc-900\\/60{background-color:#18181b99}@supports (color:color-mix(in lab,red,red)){.bg-zinc-900\\/60{background-color:color-mix(in oklab,var(--color-zinc-900)60%,transparent)}}.bg-zinc-950{background-color:var(--color-zinc-950)}.bg-zinc-950\\/80{background-color:#09090bcc}@supports (color:color-mix(in lab,red,red)){.bg-zinc-950\\/80{background-color:color-mix(in oklab,var(--color-zinc-950)80%,transparent)}}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-black\\/70{--tw-gradient-from:#000000b3}@supports (color:color-mix(in lab,red,red)){.from-black\\/70{--tw-gradient-from:color-mix(in oklab,var(--color-black)70%,transparent)}}.from-black\\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-black\\/80{--tw-gradient-from:#000c}@supports (color:color-mix(in lab,red,red)){.from-black\\/80{--tw-gradient-from:color-mix(in oklab,var(--color-black)80%,transparent)}}.from-black\\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2\\.5{padding:calc(var(--spacing)*2.5)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.p-px{padding:1px}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-3\\.5{padding-inline:calc(var(--spacing)*3.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-7{padding-block:calc(var(--spacing)*7)}.py-8{padding-block:calc(var(--spacing)*8)}.py-10{padding-block:calc(var(--spacing)*10)}.py-12{padding-block:calc(var(--spacing)*12)}.pt-1{padding-top:calc(var(--spacing)*1)}.pt-4{padding-top:calc(var(--spacing)*4)}.pr-2{padding-right:calc(var(--spacing)*2)}.pr-4{padding-right:calc(var(--spacing)*4)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pl-1{padding-left:calc(var(--spacing)*1)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-8{padding-left:calc(var(--spacing)*8)}.pl-9{padding-left:calc(var(--spacing)*9)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[0\\.01em\\]{--tw-tracking:.01em;letter-spacing:.01em}.tracking-\\[0\\.02em\\]{--tw-tracking:.02em;letter-spacing:.02em}.tracking-\\[0\\.04em\\]{--tw-tracking:.04em;letter-spacing:.04em}.tracking-\\[0\\.05em\\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\\[0\\.06em\\]{--tw-tracking:.06em;letter-spacing:.06em}.tracking-\\[0\\.08em\\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.whitespace-nowrap{white-space:nowrap}.text-\\[var\\(--local-bg\\)\\]{color:var(--local-bg)}.text-\\[var\\(--local-text\\)\\]{color:var(--local-text)}.text-\\[var\\(--local-text-muted\\)\\]{color:var(--local-text-muted)}.text-amber-200{color:var(--color-amber-200)}.text-amber-500{color:var(--color-amber-500)}.text-amber-500\\/70{color:#f99c00b3}@supports (color:color-mix(in lab,red,red)){.text-amber-500\\/70{color:color-mix(in oklab,var(--color-amber-500)70%,transparent)}}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-destructive{color:var(--color-destructive)}.text-emerald-400{color:var(--color-emerald-400)}.text-foreground{color:var(--color-foreground)}.text-primary{color:var(--color-primary)}.text-primary-foreground{color:var(--color-primary-foreground)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-white{color:var(--color-white)}.text-zinc-200{color:var(--color-zinc-200)}.text-zinc-300{color:var(--color-zinc-300)}.text-zinc-400{color:var(--color-zinc-400)}.text-zinc-500{color:var(--color-zinc-500)}.text-zinc-600{color:var(--color-zinc-600)}.text-zinc-600\\/50{color:#52525c80}@supports (color:color-mix(in lab,red,red)){.text-zinc-600\\/50{color:color-mix(in oklab,var(--color-zinc-600)50%,transparent)}}.text-zinc-700{color:var(--color-zinc-700)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.opacity-10{opacity:.1}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_0_8px_rgba\\(245\\,158\\,11\\,0\\.5\\)\\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#f59e0b80);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(0px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-black\\/30{--tw-shadow-color:#0000004d}@supports (color:color-mix(in lab,red,red)){.shadow-black\\/30{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-black)30%,transparent)var(--tw-shadow-alpha),transparent)}}.shadow-primary\\/20{--tw-shadow-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.shadow-primary\\/20{--tw-shadow-color:color-mix(in oklab,color-mix(in oklab,var(--color-primary)20%,transparent)var(--tw-shadow-alpha),transparent)}}.ring-blue-500{--tw-ring-color:var(--color-blue-500)}.ring-blue-500\\/40{--tw-ring-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.ring-blue-500\\/40{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.ring-zinc-800{--tw-ring-color:var(--color-zinc-800)}.ring-offset-1{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-zinc-900{--tw-ring-offset-color:var(--color-zinc-900)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.brightness-\\[0\\.6\\]{--tw-brightness:brightness(.6);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.brightness-\\[0\\.85\\]{--tw-brightness:brightness(.85);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition-\\[border-color\\,opacity\\]{transition-property:border-color,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[filter\\]{transition-property:filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\\:border-dashed:is(:where(.group):hover *){--tw-border-style:dashed;border-style:dashed}.group-hover\\:border-blue-400\\/50:is(:where(.group):hover *){border-color:#54a2ff80}@supports (color:color-mix(in lab,red,red)){.group-hover\\:border-blue-400\\/50:is(:where(.group):hover *){border-color:color-mix(in oklab,var(--color-blue-400)50%,transparent)}}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\\:brightness-100:is(:where(.group):hover *){--tw-brightness:brightness(100%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.hover\\:scale-\\[1\\.02\\]:hover{scale:1.02}.hover\\:border-blue-500\\/30:hover{border-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.hover\\:border-blue-500\\/30:hover{border-color:color-mix(in oklab,var(--color-blue-500)30%,transparent)}}.hover\\:border-blue-500\\/40:hover{border-color:#3080ff66}@supports (color:color-mix(in lab,red,red)){.hover\\:border-blue-500\\/40:hover{border-color:color-mix(in oklab,var(--color-blue-500)40%,transparent)}}.hover\\:border-zinc-600:hover{border-color:var(--color-zinc-600)}.hover\\:border-zinc-700:hover{border-color:var(--color-zinc-700)}.hover\\:bg-blue-500\\/\\[0\\.03\\]:hover{background-color:#3080ff08}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-500\\/\\[0\\.03\\]:hover{background-color:color-mix(in oklab,var(--color-blue-500)3%,transparent)}}.hover\\:bg-blue-600\\/20:hover{background-color:#155dfc33}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-blue-600\\/20:hover{background-color:color-mix(in oklab,var(--color-blue-600)20%,transparent)}}.hover\\:bg-destructive\\/25:hover{background-color:var(--color-destructive)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-destructive\\/25:hover{background-color:color-mix(in oklab,var(--color-destructive)25%,transparent)}}.hover\\:bg-primary\\/40:hover{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/40:hover{background-color:color-mix(in oklab,var(--color-primary)40%,transparent)}}.hover\\:bg-primary\\/90:hover{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-primary\\/90:hover{background-color:color-mix(in oklab,var(--color-primary)90%,transparent)}}.hover\\:bg-red-500\\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/10:hover{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.hover\\:bg-red-500\\/25:hover{background-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-red-500\\/25:hover{background-color:color-mix(in oklab,var(--color-red-500)25%,transparent)}}.hover\\:bg-white\\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/30:hover{background-color:color-mix(in oklab,var(--color-white)30%,transparent)}}.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-white\\/\\[0\\.02\\]:hover{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.hover\\:bg-zinc-600:hover{background-color:var(--color-zinc-600)}.hover\\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.hover\\:bg-zinc-800\\/40:hover{background-color:#27272a66}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/40:hover{background-color:color-mix(in oklab,var(--color-zinc-800)40%,transparent)}}.hover\\:bg-zinc-800\\/50:hover{background-color:#27272a80}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-zinc-800\\/50:hover{background-color:color-mix(in oklab,var(--color-zinc-800)50%,transparent)}}.hover\\:bg-zinc-900:hover{background-color:var(--color-zinc-900)}.hover\\:text-blue-400:hover{color:var(--color-blue-400)}.hover\\:text-destructive:hover{color:var(--color-destructive)}.hover\\:text-primary:hover{color:var(--color-primary)}.hover\\:text-red-200:hover{color:var(--color-red-200)}.hover\\:text-red-400:hover{color:var(--color-red-400)}.hover\\:text-red-500:hover{color:var(--color-red-500)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:text-zinc-200:hover{color:var(--color-zinc-200)}.hover\\:text-zinc-300:hover{color:var(--color-zinc-300)}.hover\\:text-zinc-400:hover{color:var(--color-zinc-400)}.hover\\:opacity-90:hover{opacity:.9}.hover\\:ring-zinc-600:hover{--tw-ring-color:var(--color-zinc-600)}}.focus\\:bg-zinc-800:focus{background-color:var(--color-zinc-800)}.focus\\:text-white:focus{color:var(--color-white)}.focus\\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-blue-500\\/50:focus{--tw-ring-color:#3080ff80}@supports (color:color-mix(in lab,red,red)){.focus\\:ring-blue-500\\/50:focus{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)50%,transparent)}}.focus\\:ring-blue-600:focus{--tw-ring-color:var(--color-blue-600)}.focus\\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus\\:ring-offset-zinc-900:focus{--tw-ring-offset-color:var(--color-zinc-900)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\\:border-zinc-600:focus-visible{border-color:var(--color-zinc-600)}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-blue-500:focus-visible{--tw-ring-color:var(--color-blue-500)}.focus-visible\\:ring-blue-500\\/80:focus-visible{--tw-ring-color:#3080ffcc}@supports (color:color-mix(in lab,red,red)){.focus-visible\\:ring-blue-500\\/80:focus-visible{--tw-ring-color:color-mix(in oklab,var(--color-blue-500)80%,transparent)}}.focus-visible\\:ring-blue-600:focus-visible{--tw-ring-color:var(--color-blue-600)}.focus-visible\\:ring-ring:focus-visible{--tw-ring-color:var(--color-ring)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-zinc-900:focus-visible{--tw-ring-offset-color:var(--color-zinc-900)}.focus-visible\\:ring-offset-zinc-950:focus-visible{--tw-ring-offset-color:var(--color-zinc-950)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.focus-visible\\:ring-inset:focus-visible{--tw-ring-inset:inset}.active\\:cursor-grabbing:active{cursor:grabbing}.active\\:bg-primary\\/60:active{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.active\\:bg-primary\\/60:active{background-color:color-mix(in oklab,var(--color-primary)60%,transparent)}}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-20:disabled{opacity:.2}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-50:disabled{opacity:.5}.data-\\[disabled\\]\\:pointer-events-none[data-disabled]{pointer-events:none}.data-\\[disabled\\]\\:opacity-50[data-disabled]{opacity:.5}.data-\\[side\\=bottom\\]\\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=left\\]\\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=right\\]\\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[side\\=top\\]\\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.data-\\[state\\=open\\]\\:border-zinc-800[data-state=open]{border-color:var(--color-zinc-800)}.data-\\[state\\=open\\]\\:bg-zinc-950[data-state=open]{background-color:var(--color-zinc-950)}.data-\\[state\\=open\\]\\:text-zinc-100[data-state=open]{color:var(--color-zinc-100)}@media(min-width:40rem){.sm\\:max-w-\\[280px\\]{max-width:280px}}.\\[\\&_svg\\]\\:shrink-0 svg{flex-shrink:0}.\\[\\&\\>span\\]\\:line-clamp-1>span{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\\[\\&\\>span\\]\\:flex>span{display:flex}.\\[\\&\\>span\\]\\:items-center>span{align-items:center}.\\[\\&\\>span\\]\\:gap-2>span{gap:calc(var(--spacing)*2)}}:root{--background:oklch(14.1% .005 285.823);--foreground:oklch(98.5% 0 0);--card:oklch(21% .006 285.885);--card-foreground:oklch(98.5% 0 0);--popover:oklch(21% .006 285.885);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(42% .18 266);--primary-foreground:oklch(97% .014 254.604);--secondary:oklch(27.4% .006 286.033);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(27.4% .006 286.033);--muted-foreground:oklch(70.5% .015 286.067);--accent:oklch(42% .18 266);--accent-foreground:oklch(97% .014 254.604);--destructive:oklch(70.4% .191 22.216);--destructive-foreground:oklch(97% .014 254.604);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.2% .016 285.938);--radius:.5rem;--jp-inspector-label-size:11px;--jp-inspector-field-size:13px;font-family:ui-sans-serif,system-ui,sans-serif}[data-radix-portal]{z-index:9999!important}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}';class j0 extends g.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("[JsonPages Engine]",t,r)}render(){return this.state.hasError&&this.state.error?c.jsxs("div",{style:{minHeight:"100vh",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:24,backgroundColor:"#0f172a",color:"#e2e8f0",fontFamily:"ui-sans-serif, system-ui, sans-serif"},children:[c.jsx("h1",{style:{fontSize:"1.25rem",fontWeight:700,marginBottom:8},children:"JsonPages Engine Error"}),c.jsx("pre",{style:{maxWidth:"100%",overflow:"auto",padding:16,backgroundColor:"rgba(0,0,0,0.3)",borderRadius:8,fontSize:12,marginTop:8},children:this.state.error.message})]}):this.props.children}}function Ur(e){return e.split("/").map(t=>t.trim()).filter(Boolean).join("/")}function Ac(e,t=""){const r=Ur(t);let o=e.replace(/\/+/g,"/");if(r){const s=`/${r}`;o===s?o="/":o.startsWith(`${s}/`)&&(o=o.slice(s.length))}return Ur(o)||"home"}function ji(e,t){const r=Ur(t)||"home";return e[r]}function Ni(e,t){return nn(e,t)}function Ti(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function no(e,t){if(typeof document>"u")return;const r=`link[rel="${e}"]`;let n=document.head.querySelector(r);n||(n=document.createElement("link"),n.rel=e,document.head.appendChild(n)),n.href=t}function zc(e,t,r){if(typeof document>"u")return;const n="olonjs-webmcp-jsonld";let o=document.getElementById(n);o||(o=document.createElement("script"),o.type="application/ld+json",o.id=n,document.head.appendChild(o)),o.textContent=JSON.stringify({"@context":"https://schema.org","@type":"WebPage",name:e,description:t,url:r})}function Pc(e){return`/mcp-manifests/${e}.json`}function Oc(e){return`/schemas/${e}.schema.json`}const Ic=({pageRegistry:e,siteConfig:t,menuConfig:r,themeConfig:n,refDocuments:o,tenantCss:i,adminCss:s,NotFoundComponent:a})=>{const l=Je.useLocation(),d=Ac(l.pathname),u=g.useMemo(()=>Ot({pages:e,siteConfig:t,themeConfig:n,menuConfig:r,refDocuments:o}),[e,t,n,r,o]),f=ji(u.pages,d);return g.useEffect(()=>{var h;try{(h=u.themeConfig)!=null&&h.tokens&&eo.setTheme(u.themeConfig)}catch(p){console.warn("[JsonPages] visitor theme resolution failed",p)}},[u.themeConfig]),g.useEffect(()=>{var w,m;if(!f)return;const h=typeof((w=f.meta)==null?void 0:w.title)=="string"?f.meta.title:d,p=typeof((m=f.meta)==null?void 0:m.description)=="string"?f.meta.description:"";no("mcp-manifest",Pc(d)),no("olon-contract",Oc(d)),zc(h,p,d==="home"?"/":`/${d}`)},[f,d]),f?c.jsx(sn,{mode:"tenant",tenantCss:i,adminCss:s,children:c.jsx(Jr,{mode:"visitor",children:c.jsx(ho,{pageConfig:f,siteConfig:u.siteConfig,menuConfig:u.menuConfig})})}):c.jsx(a,{})},Dc=({pageRegistry:e,schemas:t,siteConfig:r,menuConfig:n,themeConfig:o,refDocuments:i,tenantCss:s,adminCss:a,addSectionConfig:l,addableSectionTypes:d,webMcp:u,saveToFile:f,hotSave:h,showLegacySave:p=!0,showHotSave:w=!1})=>{var Ee;const m=Je.useLocation(),v=Ac(m.pathname,"admin"),y=Je.useNavigate(),k=Object.keys(e).sort((z,O)=>z==="home"?-1:O==="home"?1:z.localeCompare(O)),[x,S]=g.useState(null),[C,E]=g.useState(!1),[N,j]=g.useState(!1),[D,M]=g.useState(!1),[I,R]=g.useState(!1),[L,K]=g.useState(()=>{try{const z=JSON.parse(JSON.stringify(r??{}));return z.identity||(z.identity={title:"Site"}),z.pages||(z.pages=[]),z}catch{return{identity:{title:"Site"},pages:[]}}}),[B,W]=g.useState(null),[U,A]=g.useState(null),[J,oe]=g.useState(null),[T,F]=g.useState(null),[X,G]=g.useState(!1),[ve,le]=g.useState(400),P=g.useMemo(()=>Ot({pages:x?{[v]:x}:{},siteConfig:L,themeConfig:o,menuConfig:n,refDocuments:i}),[x,L,o,n,i,v]),Q=x?P.pages[v]??x:null,ee=g.useRef(x),$=g.useRef(L),ie=360,te=920;g.useEffect(()=>{ee.current=x},[x]),g.useEffect(()=>{$.current=L},[L]);const ke=g.useCallback(z=>{z.preventDefault();const O=z.currentTarget;O.setPointerCapture(z.pointerId);const Y=z.clientX,q=ve,Z=ge=>{const pe=Y-ge.clientX,ue=Math.min(te,Math.max(ie,q+pe));le(ue)},ae=()=>{O.releasePointerCapture(z.pointerId),O.removeEventListener("pointermove",Z),O.removeEventListener("pointerup",ae),O.removeEventListener("pointercancel",ae),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",O.addEventListener("pointermove",Z),O.addEventListener("pointerup",ae),O.addEventListener("pointercancel",ae)},[ve]),we=x?[...L.header?[{id:L.header.id,type:L.header.type,scope:"global",title:"Header"}]:[],...x.sections.map(z=>{var O,Y;return{id:z.id,type:z.type,scope:"local",title:((O=z.data)==null?void 0:O.title)??((Y=z.data)==null?void 0:Y.titleHighlight)}}),...L.footer?[{id:L.footer.id,type:L.footer.type,scope:"global",title:"Footer"}]:[]]:[];g.useEffect(()=>{const z=ji(e,v);z&&S(JSON.parse(JSON.stringify(z))),W(null),A(null),E(!1)},[v,e]);const De=g.useCallback(()=>{const z=ji(e,v);z&&S(JSON.parse(JSON.stringify(z))),W(null),A(null),E(!1)},[v,e]),Re=g.useCallback((z,O,Y)=>{const q=[...Y.sections],Z=q.findIndex(ue=>ue.id===z);if(Z===-1||O<0||O>=q.length)return;const[ae]=q.splice(Z,1),ge=O>Z?O-1:O;q.splice(Math.min(ge,q.length),0,ae);const pe={...Y,sections:q};S(pe),E(!0),Ne.current&&Ne.current.emitUpdate(pe,$.current)},[]),Be=g.useCallback(z=>{if(z.origin!==window.location.origin)return;if(z.data.type===ye.SECTION_SELECT){W(z.data.section);const Y=z.data.itemPath;Array.isArray(Y)&&Y.length>0?A(Y.map(q=>({fieldKey:q.fieldKey,...q.itemId!=null?{itemId:String(q.itemId)}:{}}))):A(null)}const O=(Y,q)=>{Ne.current&&Y&&Ne.current.emitUpdate(Y,q)};if(z.data.type===ye.INLINE_FIELD_UPDATE){const Y=typeof z.data.sectionId=="string"?z.data.sectionId:null,q=typeof z.data.fieldKey=="string"?z.data.fieldKey:null;Y&&q&&(S(Z=>{if(!Z)return Z;const ae={...Z,sections:Z.sections.map(ge=>ge.id===Y?{...ge,data:{...ge.data,[q]:z.data.value}}:ge)};return ee.current=ae,O(ae,$.current),ae}),E(!0))}if(z.data.type===ye.ACTIVE_SECTION_CHANGED&&oe(z.data.activeSectionId??null),z.data.type==="jsonpages:section-reorder"&&ee.current){const{sectionId:Y,newIndex:q}=z.data;typeof Y=="string"&&typeof q=="number"&&q>=0&&Re(Y,q,ee.current)}if(z.data.type===ye.WEBMCP_TOOL_CALL){const Y=typeof z.data.requestId=="string"?z.data.requestId:crypto.randomUUID(),q=typeof z.data.toolName=="string"?z.data.toolName:"";ne(q,z.data.args).then(Z=>{window.postMessage({type:ye.WEBMCP_TOOL_RESULT,requestId:Y,toolName:q,result:Z,ok:!0},window.location.origin)}).catch(Z=>{const ae=Z instanceof Error?Z.message:String(Z);window.postMessage({type:ye.WEBMCP_TOOL_RESULT,requestId:Y,toolName:q,ok:!1,error:ae},window.location.origin)})}},[Re,ne]);g.useEffect(()=>(window.addEventListener("message",Be),()=>window.removeEventListener("message",Be)),[Be]);const Ne=g.useRef(null);g.useEffect(()=>{if(!(u!=null&&u.enabled))return;const{emitUpdate:z,disconnect:O}=C0((Y,q)=>{S(Y),K(q),E(!0)});return Ne.current={emitUpdate:z,disconnect:O},()=>{O(),Ne.current=null}},[u==null?void 0:u.enabled]),g.useEffect(()=>{if(!(u!=null&&u.enabled)||(ro(),!ee.current))return;const O=Ei({name:Wr,description:`Update any section in OlonJS Studio's in-memory draft state. Does NOT persist to disk. Use "sectionType" in input args to ensure correct schema validation.`,inputSchema:jc(),execute:q=>ne(Wr,q)}),Y=Ei({name:to,description:`Persist the current in-memory draft state to disk. Call this after making one or more updates via ${Wr}.`,inputSchema:Nc(),execute:q=>ne(to,q)});return()=>{O(),Y()}},[u==null?void 0:u.enabled,v,x,L,ne]);const Xe=g.useCallback(z=>{const O=we.find(Y=>Y.id===z);O&&W({id:O.id,type:O.type,scope:O.scope}),A(null),F(z)},[we]),He=g.useCallback(()=>{F(null)},[]),Ve=g.useCallback(z=>{S(O=>{if(!O)return O;const Y={...O,sections:O.sections.filter(q=>q.id!==z)};return Ne.current&&Ne.current.emitUpdate(Y,$.current),Y}),E(!0),W(O=>(O==null?void 0:O.id)===z?null:O)},[]),gt=z=>{if(!B||!x)return;E(!0);let O=x,Y=L;if(B.scope==="global")B.type==="header"&&L.header!=null?(Y={...L,header:{...L.header,data:z}},K(Y)):B.type==="footer"&&L.footer!=null&&(Y={...L,footer:{...L.footer,data:z}},K(Y));else{const q=x.sections.map(Z=>Z.id===B.id?{...Z,data:z}:Z);O={...x,sections:q},S(O)}Ne.current&&Ne.current.emitUpdate(O,Y)},Tt=g.useCallback((z,O,Y,q)=>{var ge,pe;E(!0);let Z=ee.current,ae=$.current;if(O==="global")((ge=ae.header)==null?void 0:ge.id)===z?(ae={...ae,header:{...ae.header,data:q}},K(ae)):((pe=ae.footer)==null?void 0:pe.id)===z&&(ae={...ae,footer:{...ae.footer,data:q}},K(ae));else if(Z){const ue=Z.sections.map(ze=>ze.id===z?{...ze,data:q}:ze);Z={...Z,sections:ue},S(Z)}Ne.current&&Z&&Ne.current.emitUpdate(Z,ae)},[]),Qe=g.useCallback(async()=>{const z=document.querySelector("iframe");if(!(z!=null&&z.contentWindow))return;const O=crypto.randomUUID();await new Promise(Y=>{var ae;let q=!1;const Z=ge=>{var pe,ue;ge.origin===window.location.origin&&((pe=ge.data)==null?void 0:pe.type)===ye.INLINE_FLUSHED&&((ue=ge.data)==null?void 0:ue.requestId)===O&&(q=!0,window.removeEventListener("message",Z),Y())};window.addEventListener("message",Z),(ae=z.contentWindow)==null||ae.postMessage({type:ye.REQUEST_INLINE_FLUSH,requestId:O},"*"),window.setTimeout(()=>{q||(window.removeEventListener("message",Z),Y())},400)})},[]),cr=g.useCallback(async(z,O)=>{var ae;if(!f)throw new Error("saveToFile is not configured for this tenant.");const Y=Ot({pages:{[v]:z},siteConfig:O,themeConfig:o,menuConfig:n,refDocuments:i}),q=(ae=Y.siteConfig.header)==null?void 0:ae.data,Z={page:z,site:O,menu:{main:Ni(q,n.main)},theme:Y.themeConfig};await f(Z,v),E(!1),j(!0),typeof window<"u"&&window.setTimeout(()=>j(!1),2500)},[f,v,o,n,i]),_=g.useCallback(async z=>{var ze,it;if(!f)throw new Error("WebMCP requires saveToFile persistence in Studio mode.");if(!Ti(z)||typeof z.sectionId!="string")throw new Error("WebMCP mutation requires a sectionId.");const O=z,Y=typeof O.slug=="string"?Ur(O.slug):v;if(Y!==v)throw new Error(`WebMCP slug mismatch. Active Studio slug is "${v}", received "${Y}".`);await Qe();const q=ee.current,Z=$.current;if(!q)throw new Error("Studio draft is not ready yet.");const ae=O.scope==="global"?"global":"local";let ge=q,pe=Z,ue=O.sectionType;if(ae==="global"){const xe=((ze=Z.header)==null?void 0:ze.id)===O.sectionId?Z.header:((it=Z.footer)==null?void 0:it.id)===O.sectionId?Z.footer:null;if(!xe)throw new Error(`Global section "${O.sectionId}" was not found.`);if(!ue)ue=xe.type;else if(xe.type!==ue)throw new Error(`Section "${O.sectionId}" is type "${xe.type}", not "${ue}".`);const Te=t[ue];if(!Te||typeof Te.parse!="function")throw new Error(`Missing schema for section type "${ue}".`);const Ke=Ti(xe.data)?xe.data:{},ut=Ci(Ke,O),Ae=Te.parse(ut),$e={...xe,data:Ae};pe={...Z,...xe.type==="header"?{header:$e}:{footer:$e}},$.current=pe,K(pe)}else{const xe=q.sections.find($e=>$e.id===O.sectionId);if(!xe)throw new Error(`Local section "${O.sectionId}" was not found in page "${v}".`);if(!ue)ue=xe.type;else if(xe.type!==ue)throw new Error(`Section "${O.sectionId}" is type "${xe.type}", not "${ue}".`);const Te=t[ue];if(!Te||typeof Te.parse!="function")throw new Error(`Missing schema for section type "${ue}".`);const Ke=Ti(xe.data)?xe.data:{},ut=Ci(Ke,O),Ae=Te.parse(ut);ge={...q,sections:q.sections.map($e=>$e.id===O.sectionId?{...$e,data:Ae}:$e)},ee.current=ge,S(ge)}return W({id:O.sectionId,type:ue,scope:ae}),A(Array.isArray(O.itemPath)?O.itemPath:null),E(!0),{content:[{type:"text",text:JSON.stringify({ok:!0,slug:v,sectionId:O.sectionId,sectionType:ue,scope:ae,action:"draft_updated"})}],isError:!1}},[f,v,Qe,t]),re=g.useCallback(async z=>{if(!f)throw new Error("WebMCP requires saveToFile persistence in Studio mode.");await Qe();const O=ee.current,Y=$.current;if(!O)throw new Error("Studio draft is not ready yet.");return await cr(O,Y),{content:[{type:"text",text:JSON.stringify({ok:!0,slug:v,action:"saved_to_disk"})}],isError:!1}},[f,v,Qe,cr]);async function ne(z,O){if(z===Wr)return _(O);if(z===to)return re(O);throw new Error(`Unknown WebMCP tool "${z}".`)}const he=async()=>{var ae;if(!f)return;await Qe();const z=ee.current,O=$.current;if(!z)return;const Y=Ot({pages:{[v]:z},siteConfig:O,themeConfig:o,menuConfig:n,refDocuments:i}),q=(ae=Y.siteConfig.header)==null?void 0:ae.data,Z={page:z,site:O,menu:{main:Ni(q,n.main)},theme:Y.themeConfig};f(Z,v).then(()=>{E(!1),j(!0),typeof window<"u"&&window.setTimeout(()=>j(!1),2500)}).catch(ge=>{console.error("[JsonPages] saveToFile failed",ge);const pe=ge instanceof Error?ge.message:String(ge);alert(`Save to file failed: ${pe}`)})},Le=async()=>{var ae;if(!h)return;await Qe();const z=ee.current,O=$.current;if(!z)return;const Y=Ot({pages:{[v]:z},siteConfig:O,themeConfig:o,menuConfig:n,refDocuments:i}),q=(ae=Y.siteConfig.header)==null?void 0:ae.data,Z={page:z,site:O,menu:{main:Ni(q,n.main)},theme:Y.themeConfig};R(!0),h(Z,v).then(()=>{E(!1),M(!0),typeof window<"u"&&window.setTimeout(()=>M(!1),2500)}).catch(ge=>{console.error("[JsonPages] hotSave failed",ge);const pe=ge instanceof Error?ge.message:String(ge);alert(`Hot save failed: ${pe}`)}).finally(()=>{R(!1)})},Ce=z=>{var Z;if(!x)return;const O=((Z=l==null?void 0:l.getDefaultSectionData)==null?void 0:Z.call(l,z))??{},Y={id:crypto.randomUUID(),type:z,data:O,settings:void 0},q={...x,sections:[...x.sections,Y]};S(q),E(!0),W({id:Y.id,type:z,scope:"local"}),Ne.current&&Ne.current.emitUpdate(q,$.current)};if(g.useEffect(()=>{var q,Z;const z=Q??x,O=typeof((q=z==null?void 0:z.meta)==null?void 0:q.title)=="string"?z.meta.title:v,Y=typeof((Z=z==null?void 0:z.meta)==null?void 0:Z.description)=="string"?z.meta.description:"";no("mcp-manifest",Pc(v)),no("olon-contract",Oc(v)),zc(O,Y,`/admin${v==="home"?"":`/${v}`}`)},[x,Q,v]),!x)return c.jsx("div",{children:"Loading Studio..."});const _e=(B==null?void 0:B.scope)==="global"?{sections:[P.siteConfig.header,P.siteConfig.footer].filter(z=>z!=null)}:Q??x,dr=[...P.siteConfig.header?[P.siteConfig.header]:[],...((Ee=Q??x)==null?void 0:Ee.sections)??[],...P.siteConfig.footer?[P.siteConfig.footer]:[]];return c.jsx(sn,{mode:"admin",tenantCss:s,adminCss:a,children:c.jsx(Jr,{mode:"studio",children:c.jsxs("div",{className:"flex flex-col h-screen w-screen bg-background text-foreground overflow-hidden",children:[c.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[c.jsx("main",{className:"flex-1 min-w-0 relative bg-zinc-900/50 overflow-hidden",children:c.jsx(vc,{draft:Q??x,globalDraft:P.siteConfig,menuConfig:P.menuConfig,themeConfig:P.themeConfig,slug:v,selectedId:B==null?void 0:B.id,scrollToSectionId:T,onScrollRequested:He})}),c.jsxs("div",{className:"flex shrink-0 relative h-full z-10",style:{width:ve,minWidth:ie,maxWidth:te},children:[c.jsx("div",{role:"separator","aria-label":"Resize inspector",className:"absolute left-0 top-0 bottom-0 w-1.5 cursor-col-resize hover:bg-primary/40 active:bg-primary/60 transition-colors shrink-0",style:{zIndex:9999},onPointerDown:ke}),c.jsx(bc,{selectedSection:B,pageData:_e,allSectionsData:dr,onUpdate:gt,onUpdateSection:Tt,onClose:()=>{W(null),A(null)},expandedItemPath:U,onReorderSection:x?(z,O)=>Re(z,O,x):void 0,allLayers:we,activeSectionId:J,onRequestScrollToSection:Xe,onDeleteSection:x?Ve:void 0,onAddSection:d.length>0?()=>G(!0):void 0,hasChanges:C,onSaveToFile:f!=null?he:void 0,saveSuccessFeedback:N,onHotSave:h!=null?Le:void 0,hotSaveSuccessFeedback:D,hotSaveInProgress:I,showLegacySave:p,showHotSave:w,onResetToFile:De,pageSlugs:k,currentSlug:v,onPageChange:k.length>1?z=>{const O=Ur(z);y(O==="home"?"/admin":`/admin/${O}`)}:void 0})]})]}),c.jsx(kc,{open:X,onClose:()=>G(!1),sectionTypes:d,sectionTypeLabels:l==null?void 0:l.sectionTypeLabels,onSelect:Ce})]})})})},_c=({tenantCss:e,adminCss:t})=>c.jsx(sn,{mode:"tenant",tenantCss:e,adminCss:t,children:c.jsx(yc,{})});function N0({config:e}){var k,x,S,C,E;const{registry:t={},schemas:r={},pages:n={},siteConfig:o,themeConfig:i,menuConfig:s,refDocuments:a,themeCss:l,addSection:d,NotFoundComponent:u=Sc}=e,f=(d==null?void 0:d.addableSectionTypes)??Object.keys(r).filter(N=>N!=="header"&&N!=="footer"),h={saveToFile:(k=e.persistence)==null?void 0:k.saveToFile,hotSave:(x=e.persistence)==null?void 0:x.hotSave,showLegacySave:((S=e.persistence)==null?void 0:S.showLegacySave)??!0,showHotSave:((C=e.persistence)==null?void 0:C.showHotSave)??!1},p=typeof(l==null?void 0:l.tenant)=="string"?l.tenant:"",w=typeof(l==null?void 0:l.admin)=="string"?l.admin:E0,m=g.useMemo(()=>Ot({pages:n,siteConfig:o,themeConfig:i,menuConfig:s,refDocuments:a}),[n,o,i,s,a]),[v,y]=g.useState(!1);return g.useEffect(()=>{var N,j;try{(N=m.themeConfig)!=null&&N.tokens&&eo.setTheme(m.themeConfig)}catch(D){console.warn("[JsonPages] setTheme failed",D)}(j=e.webmcp)!=null&&j.enabled&&ro(),y(!0)},[m.themeConfig,(E=e.webmcp)==null?void 0:E.enabled]),v?c.jsx(j0,{children:c.jsx(es,{config:{registry:t,schemas:r,tenantId:e.tenantId??"default",assets:e.assets,overlayDisabledSectionTypes:e.overlayDisabledSectionTypes},children:c.jsx(Je.BrowserRouter,{children:c.jsxs(Je.Routes,{children:[c.jsx(Je.Route,{path:"/",element:c.jsx(Ic,{pageRegistry:n,siteConfig:o,menuConfig:s,themeConfig:m.themeConfig,refDocuments:a,tenantCss:p,adminCss:w,NotFoundComponent:u})}),c.jsx(Je.Route,{path:"/*",element:c.jsx(Ic,{pageRegistry:n,siteConfig:o,menuConfig:s,themeConfig:m.themeConfig,refDocuments:a,tenantCss:p,adminCss:w,NotFoundComponent:u})}),c.jsx(Je.Route,{path:"/admin",element:c.jsx(Dc,{pageRegistry:n,schemas:r,siteConfig:o,menuConfig:s,themeConfig:m.themeConfig,refDocuments:a,tenantCss:p,adminCss:w,addSectionConfig:d,addableSectionTypes:f,webMcp:e.webmcp,saveToFile:h.saveToFile,hotSave:h.hotSave,showLegacySave:h.showLegacySave,showHotSave:h.showHotSave})}),c.jsx(Je.Route,{path:"/admin/*",element:c.jsx(Dc,{pageRegistry:n,schemas:r,siteConfig:o,menuConfig:s,themeConfig:m.themeConfig,refDocuments:a,tenantCss:p,adminCss:w,addSectionConfig:d,addableSectionTypes:f,webMcp:e.webmcp,saveToFile:h.saveToFile,hotSave:h.hotSave,showLegacySave:h.showLegacySave,showHotSave:h.showHotSave})}),c.jsx(Je.Route,{path:"/admin/preview",element:c.jsx(_c,{tenantCss:p,adminCss:w})}),c.jsx(Je.Route,{path:"/admin/preview/*",element:c.jsx(_c,{tenantCss:p,adminCss:w})}),c.jsx(Je.Route,{path:"*",element:c.jsx(u,{})})]})})})}):c.jsx("div",{style:{minHeight:"100vh",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"#0f172a",color:"#94a3b8",fontFamily:"ui-sans-serif, system-ui, sans-serif",fontSize:14},children:"Loading..."})}ce.AddSectionLibrary=kc,ce.AdminSidebar=bc,ce.ConfigProvider=es,ce.DefaultNotFound=Sc,ce.FormFactory=Dr,ce.InputWidgets=or,ce.JsonPagesEngine=N0,ce.PageRenderer=ho,ce.PreviewEntry=yc,ce.STUDIO_EVENTS=ye,ce.SectionRenderer=mr,ce.StudioProvider=Jr,ce.StudioStage=vc,ce.ThemeLoader=sn,ce.WEBMCP_TOOL_SAVE=to,ce.WEBMCP_TOOL_UPDATE=Wr,ce.applyValueAtSelectionPath=Si,ce.cn=se,ce.createWebMcpSaveToolInputSchema=Nc,ce.createWebMcpUpdateToolInputSchema=jc,ce.ensureWebMcpRuntime=ro,ce.registerWebMcpTool=Ei,ce.resolveAssetUrl=Hl,ce.resolveHeaderMenuItems=nn,ce.resolveRuntimeConfig=Ot,ce.resolveSectionMenuItems=on,ce.resolveWebMcpMutationData=Ci,ce.shouldRenderSiteGlobalHeader=Pi,ce.themeManager=eo,ce.useConfig=hr,ce.useStudio=rs,Object.defineProperty(ce,Symbol.toStringTag,{value:"Module"})}));