gazetta 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/admin-dist/assets/index-C-xOOPUK.js +604 -0
- package/admin-dist/assets/index-CKOOkleR.css +1 -0
- package/admin-dist/assets/rolldown-runtime-COnpUsM8.js +1 -0
- package/admin-dist/assets/vendor-primevue-BNJTiXAs.js +1670 -0
- package/admin-dist/assets/vendor-react-BipDVGow.js +9 -0
- package/admin-dist/assets/vendor-rjsf-HKBAjOmQ.js +32 -0
- package/admin-dist/assets/vendor-tiptap-IyO99U4R.js +142 -0
- package/admin-dist/assets/vendor-vue-GhBrpzPN.js +1 -0
- package/admin-dist/index.html +8 -7
- package/dist/admin-api/index.d.ts.map +1 -1
- package/dist/admin-api/index.js +2 -0
- package/dist/admin-api/index.js.map +1 -1
- package/dist/admin-api/routes/compare.d.ts +4 -0
- package/dist/admin-api/routes/compare.d.ts.map +1 -0
- package/dist/admin-api/routes/compare.js +51 -0
- package/dist/admin-api/routes/compare.js.map +1 -0
- package/dist/admin-api/routes/publish.d.ts.map +1 -1
- package/dist/admin-api/routes/publish.js +22 -3
- package/dist/admin-api/routes/publish.js.map +1 -1
- package/dist/cli/index.js +66 -13
- package/dist/cli/index.js.map +1 -1
- package/dist/compare.d.ts +37 -0
- package/dist/compare.d.ts.map +1 -0
- package/dist/compare.js +86 -0
- package/dist/compare.js.map +1 -0
- package/dist/hash.d.ts +16 -0
- package/dist/hash.d.ts.map +1 -0
- package/dist/hash.js +57 -0
- package/dist/hash.js.map +1 -0
- package/dist/index.d.ts +3 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/manifest.d.ts.map +1 -1
- package/dist/publish-rendered.d.ts +3 -5
- package/dist/publish-rendered.d.ts.map +1 -1
- package/dist/publish-rendered.js +37 -5
- package/dist/publish-rendered.js.map +1 -1
- package/dist/scope.d.ts +0 -4
- package/dist/scope.d.ts.map +1 -1
- package/dist/scope.js +0 -5
- package/dist/scope.js.map +1 -1
- package/dist/targets.d.ts +0 -2
- package/dist/targets.d.ts.map +1 -1
- package/dist/targets.js +0 -4
- package/dist/targets.js.map +1 -1
- package/dist/template-loader.d.ts.map +1 -1
- package/dist/template-loader.js +10 -13
- package/dist/template-loader.js.map +1 -1
- package/dist/templates-scan-worker.d.ts +2 -0
- package/dist/templates-scan-worker.d.ts.map +1 -0
- package/dist/templates-scan-worker.js +42 -0
- package/dist/templates-scan-worker.js.map +1 -0
- package/dist/templates-scan.d.ts +35 -0
- package/dist/templates-scan.d.ts.map +1 -0
- package/dist/templates-scan.js +146 -0
- package/dist/templates-scan.js.map +1 -0
- package/package.json +8 -8
- package/admin-dist/assets/index-BSOUexkw.css +0 -1
- package/admin-dist/assets/index-KgruFGS7.js +0 -617
- package/admin-dist/assets/vendor-primevue-zs1PFA6i.js +0 -1597
- package/admin-dist/assets/vendor-react-CqfEBl6C.js +0 -49
- package/admin-dist/assets/vendor-rjsf-Ci-RPpeZ.js +0 -40
- package/admin-dist/assets/vendor-tiptap-yFEgrmP-.js +0 -158
- package/admin-dist/assets/vendor-vue-CeoltKL-.js +0 -29
|
@@ -0,0 +1,604 @@
|
|
|
1
|
+
import{a as e,t}from"./rolldown-runtime-COnpUsM8.js";import{A as n,D as r,F as i,H as a,J as o,M as s,N as c,O as l,P as u,Q as d,S as f,U as p,X as m,Y as h,Z as g,_,a as v,b as y,c as b,d as x,f as S,g as C,h as w,i as T,k as E,l as D,m as O,n as k,o as ee,p as A,r as j,s as M,t as N,u as te,v as P,x as F,y as I}from"./vendor-primevue-BNJTiXAs.js";import{a as ne,i as re,n as ie,o as L,r as ae,t as oe}from"./vendor-vue-GhBrpzPN.js";import{i as se,n as ce,r as le,t as ue}from"./vendor-react-BipDVGow.js";import{n as de,t as fe}from"./vendor-rjsf-HKBAjOmQ.js";import{a as pe,i as me,n as he,o as ge,r as _e,t as ve}from"./vendor-tiptap-IyO99U4R.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var ye={root:{transitionDuration:`{transition.duration}`},panel:{borderWidth:`0 0 1px 0`,borderColor:`{content.border.color}`},header:{color:`{text.muted.color}`,hoverColor:`{text.color}`,activeColor:`{text.color}`,activeHoverColor:`{text.color}`,padding:`1.125rem`,fontWeight:`600`,borderRadius:`0`,borderWidth:`0`,borderColor:`{content.border.color}`,background:`{content.background}`,hoverBackground:`{content.background}`,activeBackground:`{content.background}`,activeHoverBackground:`{content.background}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`-1px`,shadow:`{focus.ring.shadow}`},toggleIcon:{color:`{text.muted.color}`,hoverColor:`{text.color}`,activeColor:`{text.color}`,activeHoverColor:`{text.color}`},first:{topBorderRadius:`{content.border.radius}`,borderWidth:`0`},last:{bottomBorderRadius:`{content.border.radius}`,activeBottomBorderRadius:`0`}},content:{borderWidth:`0`,borderColor:`{content.border.color}`,background:`{content.background}`,color:`{text.color}`,padding:`0 1.125rem 1.125rem 1.125rem`}},be={root:{background:`{form.field.background}`,disabledBackground:`{form.field.disabled.background}`,filledBackground:`{form.field.filled.background}`,filledHoverBackground:`{form.field.filled.hover.background}`,filledFocusBackground:`{form.field.filled.focus.background}`,borderColor:`{form.field.border.color}`,hoverBorderColor:`{form.field.hover.border.color}`,focusBorderColor:`{form.field.focus.border.color}`,invalidBorderColor:`{form.field.invalid.border.color}`,color:`{form.field.color}`,disabledColor:`{form.field.disabled.color}`,placeholderColor:`{form.field.placeholder.color}`,invalidPlaceholderColor:`{form.field.invalid.placeholder.color}`,shadow:`{form.field.shadow}`,paddingX:`{form.field.padding.x}`,paddingY:`{form.field.padding.y}`,borderRadius:`{form.field.border.radius}`,focusRing:{width:`{form.field.focus.ring.width}`,style:`{form.field.focus.ring.style}`,color:`{form.field.focus.ring.color}`,offset:`{form.field.focus.ring.offset}`,shadow:`{form.field.focus.ring.shadow}`},transitionDuration:`{form.field.transition.duration}`},overlay:{background:`{overlay.select.background}`,borderColor:`{overlay.select.border.color}`,borderRadius:`{overlay.select.border.radius}`,color:`{overlay.select.color}`,shadow:`{overlay.select.shadow}`},list:{padding:`{list.padding}`,gap:`{list.gap}`},option:{focusBackground:`{list.option.focus.background}`,selectedBackground:`{list.option.selected.background}`,selectedFocusBackground:`{list.option.selected.focus.background}`,color:`{list.option.color}`,focusColor:`{list.option.focus.color}`,selectedColor:`{list.option.selected.color}`,selectedFocusColor:`{list.option.selected.focus.color}`,padding:`{list.option.padding}`,borderRadius:`{list.option.border.radius}`},optionGroup:{background:`{list.option.group.background}`,color:`{list.option.group.color}`,fontWeight:`{list.option.group.font.weight}`,padding:`{list.option.group.padding}`},dropdown:{width:`2.5rem`,sm:{width:`2rem`},lg:{width:`3rem`},borderColor:`{form.field.border.color}`,hoverBorderColor:`{form.field.border.color}`,activeBorderColor:`{form.field.border.color}`,borderRadius:`{form.field.border.radius}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},chip:{borderRadius:`{border.radius.sm}`},emptyMessage:{padding:`{list.option.padding}`},colorScheme:{light:{chip:{focusBackground:`{surface.200}`,focusColor:`{surface.800}`},dropdown:{background:`{surface.100}`,hoverBackground:`{surface.200}`,activeBackground:`{surface.300}`,color:`{surface.600}`,hoverColor:`{surface.700}`,activeColor:`{surface.800}`}},dark:{chip:{focusBackground:`{surface.700}`,focusColor:`{surface.0}`},dropdown:{background:`{surface.800}`,hoverBackground:`{surface.700}`,activeBackground:`{surface.600}`,color:`{surface.300}`,hoverColor:`{surface.200}`,activeColor:`{surface.100}`}}}},xe={root:{width:`2rem`,height:`2rem`,fontSize:`1rem`,background:`{content.border.color}`,color:`{content.color}`,borderRadius:`{content.border.radius}`},icon:{size:`1rem`},group:{borderColor:`{content.background}`,offset:`-0.75rem`},lg:{width:`3rem`,height:`3rem`,fontSize:`1.5rem`,icon:{size:`1.5rem`},group:{offset:`-1rem`}},xl:{width:`4rem`,height:`4rem`,fontSize:`2rem`,icon:{size:`2rem`},group:{offset:`-1.5rem`}}},Se={root:{borderRadius:`{border.radius.md}`,padding:`0 0.5rem`,fontSize:`0.75rem`,fontWeight:`700`,minWidth:`1.5rem`,height:`1.5rem`},dot:{size:`0.5rem`},sm:{fontSize:`0.625rem`,minWidth:`1.25rem`,height:`1.25rem`},lg:{fontSize:`0.875rem`,minWidth:`1.75rem`,height:`1.75rem`},xl:{fontSize:`1rem`,minWidth:`2rem`,height:`2rem`},colorScheme:{light:{primary:{background:`{primary.color}`,color:`{primary.contrast.color}`},secondary:{background:`{surface.100}`,color:`{surface.600}`},success:{background:`{green.500}`,color:`{surface.0}`},info:{background:`{sky.500}`,color:`{surface.0}`},warn:{background:`{orange.500}`,color:`{surface.0}`},danger:{background:`{red.500}`,color:`{surface.0}`},contrast:{background:`{surface.950}`,color:`{surface.0}`}},dark:{primary:{background:`{primary.color}`,color:`{primary.contrast.color}`},secondary:{background:`{surface.800}`,color:`{surface.300}`},success:{background:`{green.400}`,color:`{green.950}`},info:{background:`{sky.400}`,color:`{sky.950}`},warn:{background:`{orange.400}`,color:`{orange.950}`},danger:{background:`{red.400}`,color:`{red.950}`},contrast:{background:`{surface.0}`,color:`{surface.950}`}}}},Ce={primitive:{borderRadius:{none:`0`,xs:`2px`,sm:`4px`,md:`6px`,lg:`8px`,xl:`12px`},emerald:{50:`#ecfdf5`,100:`#d1fae5`,200:`#a7f3d0`,300:`#6ee7b7`,400:`#34d399`,500:`#10b981`,600:`#059669`,700:`#047857`,800:`#065f46`,900:`#064e3b`,950:`#022c22`},green:{50:`#f0fdf4`,100:`#dcfce7`,200:`#bbf7d0`,300:`#86efac`,400:`#4ade80`,500:`#22c55e`,600:`#16a34a`,700:`#15803d`,800:`#166534`,900:`#14532d`,950:`#052e16`},lime:{50:`#f7fee7`,100:`#ecfccb`,200:`#d9f99d`,300:`#bef264`,400:`#a3e635`,500:`#84cc16`,600:`#65a30d`,700:`#4d7c0f`,800:`#3f6212`,900:`#365314`,950:`#1a2e05`},red:{50:`#fef2f2`,100:`#fee2e2`,200:`#fecaca`,300:`#fca5a5`,400:`#f87171`,500:`#ef4444`,600:`#dc2626`,700:`#b91c1c`,800:`#991b1b`,900:`#7f1d1d`,950:`#450a0a`},orange:{50:`#fff7ed`,100:`#ffedd5`,200:`#fed7aa`,300:`#fdba74`,400:`#fb923c`,500:`#f97316`,600:`#ea580c`,700:`#c2410c`,800:`#9a3412`,900:`#7c2d12`,950:`#431407`},amber:{50:`#fffbeb`,100:`#fef3c7`,200:`#fde68a`,300:`#fcd34d`,400:`#fbbf24`,500:`#f59e0b`,600:`#d97706`,700:`#b45309`,800:`#92400e`,900:`#78350f`,950:`#451a03`},yellow:{50:`#fefce8`,100:`#fef9c3`,200:`#fef08a`,300:`#fde047`,400:`#facc15`,500:`#eab308`,600:`#ca8a04`,700:`#a16207`,800:`#854d0e`,900:`#713f12`,950:`#422006`},teal:{50:`#f0fdfa`,100:`#ccfbf1`,200:`#99f6e4`,300:`#5eead4`,400:`#2dd4bf`,500:`#14b8a6`,600:`#0d9488`,700:`#0f766e`,800:`#115e59`,900:`#134e4a`,950:`#042f2e`},cyan:{50:`#ecfeff`,100:`#cffafe`,200:`#a5f3fc`,300:`#67e8f9`,400:`#22d3ee`,500:`#06b6d4`,600:`#0891b2`,700:`#0e7490`,800:`#155e75`,900:`#164e63`,950:`#083344`},sky:{50:`#f0f9ff`,100:`#e0f2fe`,200:`#bae6fd`,300:`#7dd3fc`,400:`#38bdf8`,500:`#0ea5e9`,600:`#0284c7`,700:`#0369a1`,800:`#075985`,900:`#0c4a6e`,950:`#082f49`},blue:{50:`#eff6ff`,100:`#dbeafe`,200:`#bfdbfe`,300:`#93c5fd`,400:`#60a5fa`,500:`#3b82f6`,600:`#2563eb`,700:`#1d4ed8`,800:`#1e40af`,900:`#1e3a8a`,950:`#172554`},indigo:{50:`#eef2ff`,100:`#e0e7ff`,200:`#c7d2fe`,300:`#a5b4fc`,400:`#818cf8`,500:`#6366f1`,600:`#4f46e5`,700:`#4338ca`,800:`#3730a3`,900:`#312e81`,950:`#1e1b4b`},violet:{50:`#f5f3ff`,100:`#ede9fe`,200:`#ddd6fe`,300:`#c4b5fd`,400:`#a78bfa`,500:`#8b5cf6`,600:`#7c3aed`,700:`#6d28d9`,800:`#5b21b6`,900:`#4c1d95`,950:`#2e1065`},purple:{50:`#faf5ff`,100:`#f3e8ff`,200:`#e9d5ff`,300:`#d8b4fe`,400:`#c084fc`,500:`#a855f7`,600:`#9333ea`,700:`#7e22ce`,800:`#6b21a8`,900:`#581c87`,950:`#3b0764`},fuchsia:{50:`#fdf4ff`,100:`#fae8ff`,200:`#f5d0fe`,300:`#f0abfc`,400:`#e879f9`,500:`#d946ef`,600:`#c026d3`,700:`#a21caf`,800:`#86198f`,900:`#701a75`,950:`#4a044e`},pink:{50:`#fdf2f8`,100:`#fce7f3`,200:`#fbcfe8`,300:`#f9a8d4`,400:`#f472b6`,500:`#ec4899`,600:`#db2777`,700:`#be185d`,800:`#9d174d`,900:`#831843`,950:`#500724`},rose:{50:`#fff1f2`,100:`#ffe4e6`,200:`#fecdd3`,300:`#fda4af`,400:`#fb7185`,500:`#f43f5e`,600:`#e11d48`,700:`#be123c`,800:`#9f1239`,900:`#881337`,950:`#4c0519`},slate:{50:`#f8fafc`,100:`#f1f5f9`,200:`#e2e8f0`,300:`#cbd5e1`,400:`#94a3b8`,500:`#64748b`,600:`#475569`,700:`#334155`,800:`#1e293b`,900:`#0f172a`,950:`#020617`},gray:{50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#1f2937`,900:`#111827`,950:`#030712`},zinc:{50:`#fafafa`,100:`#f4f4f5`,200:`#e4e4e7`,300:`#d4d4d8`,400:`#a1a1aa`,500:`#71717a`,600:`#52525b`,700:`#3f3f46`,800:`#27272a`,900:`#18181b`,950:`#09090b`},neutral:{50:`#fafafa`,100:`#f5f5f5`,200:`#e5e5e5`,300:`#d4d4d4`,400:`#a3a3a3`,500:`#737373`,600:`#525252`,700:`#404040`,800:`#262626`,900:`#171717`,950:`#0a0a0a`},stone:{50:`#fafaf9`,100:`#f5f5f4`,200:`#e7e5e4`,300:`#d6d3d1`,400:`#a8a29e`,500:`#78716c`,600:`#57534e`,700:`#44403c`,800:`#292524`,900:`#1c1917`,950:`#0c0a09`}},semantic:{transitionDuration:`0.2s`,focusRing:{width:`1px`,style:`solid`,color:`{primary.color}`,offset:`2px`,shadow:`none`},disabledOpacity:`0.6`,iconSize:`1rem`,anchorGutter:`2px`,primary:{50:`{emerald.50}`,100:`{emerald.100}`,200:`{emerald.200}`,300:`{emerald.300}`,400:`{emerald.400}`,500:`{emerald.500}`,600:`{emerald.600}`,700:`{emerald.700}`,800:`{emerald.800}`,900:`{emerald.900}`,950:`{emerald.950}`},formField:{paddingX:`0.75rem`,paddingY:`0.5rem`,sm:{fontSize:`0.875rem`,paddingX:`0.625rem`,paddingY:`0.375rem`},lg:{fontSize:`1.125rem`,paddingX:`0.875rem`,paddingY:`0.625rem`},borderRadius:`{border.radius.md}`,focusRing:{width:`0`,style:`none`,color:`transparent`,offset:`0`,shadow:`none`},transitionDuration:`{transition.duration}`},list:{padding:`0.25rem 0.25rem`,gap:`2px`,header:{padding:`0.5rem 1rem 0.25rem 1rem`},option:{padding:`0.5rem 0.75rem`,borderRadius:`{border.radius.sm}`},optionGroup:{padding:`0.5rem 0.75rem`,fontWeight:`600`}},content:{borderRadius:`{border.radius.md}`},mask:{transitionDuration:`0.3s`},navigation:{list:{padding:`0.25rem 0.25rem`,gap:`2px`},item:{padding:`0.5rem 0.75rem`,borderRadius:`{border.radius.sm}`,gap:`0.5rem`},submenuLabel:{padding:`0.5rem 0.75rem`,fontWeight:`600`},submenuIcon:{size:`0.875rem`}},overlay:{select:{borderRadius:`{border.radius.md}`,shadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`},popover:{borderRadius:`{border.radius.md}`,padding:`0.75rem`,shadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`},modal:{borderRadius:`{border.radius.xl}`,padding:`1.25rem`,shadow:`0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)`},navigation:{shadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`}},colorScheme:{light:{surface:{0:`#ffffff`,50:`{slate.50}`,100:`{slate.100}`,200:`{slate.200}`,300:`{slate.300}`,400:`{slate.400}`,500:`{slate.500}`,600:`{slate.600}`,700:`{slate.700}`,800:`{slate.800}`,900:`{slate.900}`,950:`{slate.950}`},primary:{color:`{primary.500}`,contrastColor:`#ffffff`,hoverColor:`{primary.600}`,activeColor:`{primary.700}`},highlight:{background:`{primary.50}`,focusBackground:`{primary.100}`,color:`{primary.700}`,focusColor:`{primary.800}`},mask:{background:`rgba(0,0,0,0.4)`,color:`{surface.200}`},formField:{background:`{surface.0}`,disabledBackground:`{surface.200}`,filledBackground:`{surface.50}`,filledHoverBackground:`{surface.50}`,filledFocusBackground:`{surface.50}`,borderColor:`{surface.300}`,hoverBorderColor:`{surface.400}`,focusBorderColor:`{primary.color}`,invalidBorderColor:`{red.400}`,color:`{surface.700}`,disabledColor:`{surface.500}`,placeholderColor:`{surface.500}`,invalidPlaceholderColor:`{red.600}`,floatLabelColor:`{surface.500}`,floatLabelFocusColor:`{primary.600}`,floatLabelActiveColor:`{surface.500}`,floatLabelInvalidColor:`{form.field.invalid.placeholder.color}`,iconColor:`{surface.400}`,shadow:`0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)`},text:{color:`{surface.700}`,hoverColor:`{surface.800}`,mutedColor:`{surface.500}`,hoverMutedColor:`{surface.600}`},content:{background:`{surface.0}`,hoverBackground:`{surface.100}`,borderColor:`{surface.200}`,color:`{text.color}`,hoverColor:`{text.hover.color}`},overlay:{select:{background:`{surface.0}`,borderColor:`{surface.200}`,color:`{text.color}`},popover:{background:`{surface.0}`,borderColor:`{surface.200}`,color:`{text.color}`},modal:{background:`{surface.0}`,borderColor:`{surface.200}`,color:`{text.color}`}},list:{option:{focusBackground:`{surface.100}`,selectedBackground:`{highlight.background}`,selectedFocusBackground:`{highlight.focus.background}`,color:`{text.color}`,focusColor:`{text.hover.color}`,selectedColor:`{highlight.color}`,selectedFocusColor:`{highlight.focus.color}`,icon:{color:`{surface.400}`,focusColor:`{surface.500}`}},optionGroup:{background:`transparent`,color:`{text.muted.color}`}},navigation:{item:{focusBackground:`{surface.100}`,activeBackground:`{surface.100}`,color:`{text.color}`,focusColor:`{text.hover.color}`,activeColor:`{text.hover.color}`,icon:{color:`{surface.400}`,focusColor:`{surface.500}`,activeColor:`{surface.500}`}},submenuLabel:{background:`transparent`,color:`{text.muted.color}`},submenuIcon:{color:`{surface.400}`,focusColor:`{surface.500}`,activeColor:`{surface.500}`}}},dark:{surface:{0:`#ffffff`,50:`{zinc.50}`,100:`{zinc.100}`,200:`{zinc.200}`,300:`{zinc.300}`,400:`{zinc.400}`,500:`{zinc.500}`,600:`{zinc.600}`,700:`{zinc.700}`,800:`{zinc.800}`,900:`{zinc.900}`,950:`{zinc.950}`},primary:{color:`{primary.400}`,contrastColor:`{surface.900}`,hoverColor:`{primary.300}`,activeColor:`{primary.200}`},highlight:{background:`color-mix(in srgb, {primary.400}, transparent 84%)`,focusBackground:`color-mix(in srgb, {primary.400}, transparent 76%)`,color:`rgba(255,255,255,.87)`,focusColor:`rgba(255,255,255,.87)`},mask:{background:`rgba(0,0,0,0.6)`,color:`{surface.200}`},formField:{background:`{surface.950}`,disabledBackground:`{surface.700}`,filledBackground:`{surface.800}`,filledHoverBackground:`{surface.800}`,filledFocusBackground:`{surface.800}`,borderColor:`{surface.600}`,hoverBorderColor:`{surface.500}`,focusBorderColor:`{primary.color}`,invalidBorderColor:`{red.300}`,color:`{surface.0}`,disabledColor:`{surface.400}`,placeholderColor:`{surface.400}`,invalidPlaceholderColor:`{red.400}`,floatLabelColor:`{surface.400}`,floatLabelFocusColor:`{primary.color}`,floatLabelActiveColor:`{surface.400}`,floatLabelInvalidColor:`{form.field.invalid.placeholder.color}`,iconColor:`{surface.400}`,shadow:`0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)`},text:{color:`{surface.0}`,hoverColor:`{surface.0}`,mutedColor:`{surface.400}`,hoverMutedColor:`{surface.300}`},content:{background:`{surface.900}`,hoverBackground:`{surface.800}`,borderColor:`{surface.700}`,color:`{text.color}`,hoverColor:`{text.hover.color}`},overlay:{select:{background:`{surface.900}`,borderColor:`{surface.700}`,color:`{text.color}`},popover:{background:`{surface.900}`,borderColor:`{surface.700}`,color:`{text.color}`},modal:{background:`{surface.900}`,borderColor:`{surface.700}`,color:`{text.color}`}},list:{option:{focusBackground:`{surface.800}`,selectedBackground:`{highlight.background}`,selectedFocusBackground:`{highlight.focus.background}`,color:`{text.color}`,focusColor:`{text.hover.color}`,selectedColor:`{highlight.color}`,selectedFocusColor:`{highlight.focus.color}`,icon:{color:`{surface.500}`,focusColor:`{surface.400}`}},optionGroup:{background:`transparent`,color:`{text.muted.color}`}},navigation:{item:{focusBackground:`{surface.800}`,activeBackground:`{surface.800}`,color:`{text.color}`,focusColor:`{text.hover.color}`,activeColor:`{text.hover.color}`,icon:{color:`{surface.500}`,focusColor:`{surface.400}`,activeColor:`{surface.400}`}},submenuLabel:{background:`transparent`,color:`{text.muted.color}`},submenuIcon:{color:`{surface.500}`,focusColor:`{surface.400}`,activeColor:`{surface.400}`}}}}}},we={root:{borderRadius:`{content.border.radius}`}},Te={root:{padding:`1rem`,background:`{content.background}`,gap:`0.5rem`,transitionDuration:`{transition.duration}`},item:{color:`{text.muted.color}`,hoverColor:`{text.color}`,borderRadius:`{content.border.radius}`,gap:`{navigation.item.gap}`,icon:{color:`{navigation.item.icon.color}`,hoverColor:`{navigation.item.icon.focus.color}`},focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},separator:{color:`{navigation.item.icon.color}`}},Ee={root:{borderRadius:`{form.field.border.radius}`,roundedBorderRadius:`2rem`,gap:`0.5rem`,paddingX:`{form.field.padding.x}`,paddingY:`{form.field.padding.y}`,iconOnlyWidth:`2.5rem`,sm:{fontSize:`{form.field.sm.font.size}`,paddingX:`{form.field.sm.padding.x}`,paddingY:`{form.field.sm.padding.y}`,iconOnlyWidth:`2rem`},lg:{fontSize:`{form.field.lg.font.size}`,paddingX:`{form.field.lg.padding.x}`,paddingY:`{form.field.lg.padding.y}`,iconOnlyWidth:`3rem`},label:{fontWeight:`500`},raisedShadow:`0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,offset:`{focus.ring.offset}`},badgeSize:`1rem`,transitionDuration:`{form.field.transition.duration}`},colorScheme:{light:{root:{primary:{background:`{primary.color}`,hoverBackground:`{primary.hover.color}`,activeBackground:`{primary.active.color}`,borderColor:`{primary.color}`,hoverBorderColor:`{primary.hover.color}`,activeBorderColor:`{primary.active.color}`,color:`{primary.contrast.color}`,hoverColor:`{primary.contrast.color}`,activeColor:`{primary.contrast.color}`,focusRing:{color:`{primary.color}`,shadow:`none`}},secondary:{background:`{surface.100}`,hoverBackground:`{surface.200}`,activeBackground:`{surface.300}`,borderColor:`{surface.100}`,hoverBorderColor:`{surface.200}`,activeBorderColor:`{surface.300}`,color:`{surface.600}`,hoverColor:`{surface.700}`,activeColor:`{surface.800}`,focusRing:{color:`{surface.600}`,shadow:`none`}},info:{background:`{sky.500}`,hoverBackground:`{sky.600}`,activeBackground:`{sky.700}`,borderColor:`{sky.500}`,hoverBorderColor:`{sky.600}`,activeBorderColor:`{sky.700}`,color:`#ffffff`,hoverColor:`#ffffff`,activeColor:`#ffffff`,focusRing:{color:`{sky.500}`,shadow:`none`}},success:{background:`{green.500}`,hoverBackground:`{green.600}`,activeBackground:`{green.700}`,borderColor:`{green.500}`,hoverBorderColor:`{green.600}`,activeBorderColor:`{green.700}`,color:`#ffffff`,hoverColor:`#ffffff`,activeColor:`#ffffff`,focusRing:{color:`{green.500}`,shadow:`none`}},warn:{background:`{orange.500}`,hoverBackground:`{orange.600}`,activeBackground:`{orange.700}`,borderColor:`{orange.500}`,hoverBorderColor:`{orange.600}`,activeBorderColor:`{orange.700}`,color:`#ffffff`,hoverColor:`#ffffff`,activeColor:`#ffffff`,focusRing:{color:`{orange.500}`,shadow:`none`}},help:{background:`{purple.500}`,hoverBackground:`{purple.600}`,activeBackground:`{purple.700}`,borderColor:`{purple.500}`,hoverBorderColor:`{purple.600}`,activeBorderColor:`{purple.700}`,color:`#ffffff`,hoverColor:`#ffffff`,activeColor:`#ffffff`,focusRing:{color:`{purple.500}`,shadow:`none`}},danger:{background:`{red.500}`,hoverBackground:`{red.600}`,activeBackground:`{red.700}`,borderColor:`{red.500}`,hoverBorderColor:`{red.600}`,activeBorderColor:`{red.700}`,color:`#ffffff`,hoverColor:`#ffffff`,activeColor:`#ffffff`,focusRing:{color:`{red.500}`,shadow:`none`}},contrast:{background:`{surface.950}`,hoverBackground:`{surface.900}`,activeBackground:`{surface.800}`,borderColor:`{surface.950}`,hoverBorderColor:`{surface.900}`,activeBorderColor:`{surface.800}`,color:`{surface.0}`,hoverColor:`{surface.0}`,activeColor:`{surface.0}`,focusRing:{color:`{surface.950}`,shadow:`none`}}},outlined:{primary:{hoverBackground:`{primary.50}`,activeBackground:`{primary.100}`,borderColor:`{primary.200}`,color:`{primary.color}`},secondary:{hoverBackground:`{surface.50}`,activeBackground:`{surface.100}`,borderColor:`{surface.200}`,color:`{surface.500}`},success:{hoverBackground:`{green.50}`,activeBackground:`{green.100}`,borderColor:`{green.200}`,color:`{green.500}`},info:{hoverBackground:`{sky.50}`,activeBackground:`{sky.100}`,borderColor:`{sky.200}`,color:`{sky.500}`},warn:{hoverBackground:`{orange.50}`,activeBackground:`{orange.100}`,borderColor:`{orange.200}`,color:`{orange.500}`},help:{hoverBackground:`{purple.50}`,activeBackground:`{purple.100}`,borderColor:`{purple.200}`,color:`{purple.500}`},danger:{hoverBackground:`{red.50}`,activeBackground:`{red.100}`,borderColor:`{red.200}`,color:`{red.500}`},contrast:{hoverBackground:`{surface.50}`,activeBackground:`{surface.100}`,borderColor:`{surface.700}`,color:`{surface.950}`},plain:{hoverBackground:`{surface.50}`,activeBackground:`{surface.100}`,borderColor:`{surface.200}`,color:`{surface.700}`}},text:{primary:{hoverBackground:`{primary.50}`,activeBackground:`{primary.100}`,color:`{primary.color}`},secondary:{hoverBackground:`{surface.50}`,activeBackground:`{surface.100}`,color:`{surface.500}`},success:{hoverBackground:`{green.50}`,activeBackground:`{green.100}`,color:`{green.500}`},info:{hoverBackground:`{sky.50}`,activeBackground:`{sky.100}`,color:`{sky.500}`},warn:{hoverBackground:`{orange.50}`,activeBackground:`{orange.100}`,color:`{orange.500}`},help:{hoverBackground:`{purple.50}`,activeBackground:`{purple.100}`,color:`{purple.500}`},danger:{hoverBackground:`{red.50}`,activeBackground:`{red.100}`,color:`{red.500}`},contrast:{hoverBackground:`{surface.50}`,activeBackground:`{surface.100}`,color:`{surface.950}`},plain:{hoverBackground:`{surface.50}`,activeBackground:`{surface.100}`,color:`{surface.700}`}},link:{color:`{primary.color}`,hoverColor:`{primary.color}`,activeColor:`{primary.color}`}},dark:{root:{primary:{background:`{primary.color}`,hoverBackground:`{primary.hover.color}`,activeBackground:`{primary.active.color}`,borderColor:`{primary.color}`,hoverBorderColor:`{primary.hover.color}`,activeBorderColor:`{primary.active.color}`,color:`{primary.contrast.color}`,hoverColor:`{primary.contrast.color}`,activeColor:`{primary.contrast.color}`,focusRing:{color:`{primary.color}`,shadow:`none`}},secondary:{background:`{surface.800}`,hoverBackground:`{surface.700}`,activeBackground:`{surface.600}`,borderColor:`{surface.800}`,hoverBorderColor:`{surface.700}`,activeBorderColor:`{surface.600}`,color:`{surface.300}`,hoverColor:`{surface.200}`,activeColor:`{surface.100}`,focusRing:{color:`{surface.300}`,shadow:`none`}},info:{background:`{sky.400}`,hoverBackground:`{sky.300}`,activeBackground:`{sky.200}`,borderColor:`{sky.400}`,hoverBorderColor:`{sky.300}`,activeBorderColor:`{sky.200}`,color:`{sky.950}`,hoverColor:`{sky.950}`,activeColor:`{sky.950}`,focusRing:{color:`{sky.400}`,shadow:`none`}},success:{background:`{green.400}`,hoverBackground:`{green.300}`,activeBackground:`{green.200}`,borderColor:`{green.400}`,hoverBorderColor:`{green.300}`,activeBorderColor:`{green.200}`,color:`{green.950}`,hoverColor:`{green.950}`,activeColor:`{green.950}`,focusRing:{color:`{green.400}`,shadow:`none`}},warn:{background:`{orange.400}`,hoverBackground:`{orange.300}`,activeBackground:`{orange.200}`,borderColor:`{orange.400}`,hoverBorderColor:`{orange.300}`,activeBorderColor:`{orange.200}`,color:`{orange.950}`,hoverColor:`{orange.950}`,activeColor:`{orange.950}`,focusRing:{color:`{orange.400}`,shadow:`none`}},help:{background:`{purple.400}`,hoverBackground:`{purple.300}`,activeBackground:`{purple.200}`,borderColor:`{purple.400}`,hoverBorderColor:`{purple.300}`,activeBorderColor:`{purple.200}`,color:`{purple.950}`,hoverColor:`{purple.950}`,activeColor:`{purple.950}`,focusRing:{color:`{purple.400}`,shadow:`none`}},danger:{background:`{red.400}`,hoverBackground:`{red.300}`,activeBackground:`{red.200}`,borderColor:`{red.400}`,hoverBorderColor:`{red.300}`,activeBorderColor:`{red.200}`,color:`{red.950}`,hoverColor:`{red.950}`,activeColor:`{red.950}`,focusRing:{color:`{red.400}`,shadow:`none`}},contrast:{background:`{surface.0}`,hoverBackground:`{surface.100}`,activeBackground:`{surface.200}`,borderColor:`{surface.0}`,hoverBorderColor:`{surface.100}`,activeBorderColor:`{surface.200}`,color:`{surface.950}`,hoverColor:`{surface.950}`,activeColor:`{surface.950}`,focusRing:{color:`{surface.0}`,shadow:`none`}}},outlined:{primary:{hoverBackground:`color-mix(in srgb, {primary.color}, transparent 96%)`,activeBackground:`color-mix(in srgb, {primary.color}, transparent 84%)`,borderColor:`{primary.700}`,color:`{primary.color}`},secondary:{hoverBackground:`rgba(255,255,255,0.04)`,activeBackground:`rgba(255,255,255,0.16)`,borderColor:`{surface.700}`,color:`{surface.400}`},success:{hoverBackground:`color-mix(in srgb, {green.400}, transparent 96%)`,activeBackground:`color-mix(in srgb, {green.400}, transparent 84%)`,borderColor:`{green.700}`,color:`{green.400}`},info:{hoverBackground:`color-mix(in srgb, {sky.400}, transparent 96%)`,activeBackground:`color-mix(in srgb, {sky.400}, transparent 84%)`,borderColor:`{sky.700}`,color:`{sky.400}`},warn:{hoverBackground:`color-mix(in srgb, {orange.400}, transparent 96%)`,activeBackground:`color-mix(in srgb, {orange.400}, transparent 84%)`,borderColor:`{orange.700}`,color:`{orange.400}`},help:{hoverBackground:`color-mix(in srgb, {purple.400}, transparent 96%)`,activeBackground:`color-mix(in srgb, {purple.400}, transparent 84%)`,borderColor:`{purple.700}`,color:`{purple.400}`},danger:{hoverBackground:`color-mix(in srgb, {red.400}, transparent 96%)`,activeBackground:`color-mix(in srgb, {red.400}, transparent 84%)`,borderColor:`{red.700}`,color:`{red.400}`},contrast:{hoverBackground:`{surface.800}`,activeBackground:`{surface.700}`,borderColor:`{surface.500}`,color:`{surface.0}`},plain:{hoverBackground:`{surface.800}`,activeBackground:`{surface.700}`,borderColor:`{surface.600}`,color:`{surface.0}`}},text:{primary:{hoverBackground:`color-mix(in srgb, {primary.color}, transparent 96%)`,activeBackground:`color-mix(in srgb, {primary.color}, transparent 84%)`,color:`{primary.color}`},secondary:{hoverBackground:`{surface.800}`,activeBackground:`{surface.700}`,color:`{surface.400}`},success:{hoverBackground:`color-mix(in srgb, {green.400}, transparent 96%)`,activeBackground:`color-mix(in srgb, {green.400}, transparent 84%)`,color:`{green.400}`},info:{hoverBackground:`color-mix(in srgb, {sky.400}, transparent 96%)`,activeBackground:`color-mix(in srgb, {sky.400}, transparent 84%)`,color:`{sky.400}`},warn:{hoverBackground:`color-mix(in srgb, {orange.400}, transparent 96%)`,activeBackground:`color-mix(in srgb, {orange.400}, transparent 84%)`,color:`{orange.400}`},help:{hoverBackground:`color-mix(in srgb, {purple.400}, transparent 96%)`,activeBackground:`color-mix(in srgb, {purple.400}, transparent 84%)`,color:`{purple.400}`},danger:{hoverBackground:`color-mix(in srgb, {red.400}, transparent 96%)`,activeBackground:`color-mix(in srgb, {red.400}, transparent 84%)`,color:`{red.400}`},contrast:{hoverBackground:`{surface.800}`,activeBackground:`{surface.700}`,color:`{surface.0}`},plain:{hoverBackground:`{surface.800}`,activeBackground:`{surface.700}`,color:`{surface.0}`}},link:{color:`{primary.color}`,hoverColor:`{primary.color}`,activeColor:`{primary.color}`}}}},De={root:{background:`{content.background}`,borderRadius:`{border.radius.xl}`,color:`{content.color}`,shadow:`0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)`},body:{padding:`1.25rem`,gap:`0.5rem`},caption:{gap:`0.5rem`},title:{fontSize:`1.25rem`,fontWeight:`500`},subtitle:{color:`{text.muted.color}`}},Oe={root:{transitionDuration:`{transition.duration}`},content:{gap:`0.25rem`},indicatorList:{padding:`1rem`,gap:`0.5rem`},indicator:{width:`2rem`,height:`0.5rem`,borderRadius:`{content.border.radius}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},colorScheme:{light:{indicator:{background:`{surface.200}`,hoverBackground:`{surface.300}`,activeBackground:`{primary.color}`}},dark:{indicator:{background:`{surface.700}`,hoverBackground:`{surface.600}`,activeBackground:`{primary.color}`}}}},ke={root:{background:`{form.field.background}`,disabledBackground:`{form.field.disabled.background}`,filledBackground:`{form.field.filled.background}`,filledHoverBackground:`{form.field.filled.hover.background}`,filledFocusBackground:`{form.field.filled.focus.background}`,borderColor:`{form.field.border.color}`,hoverBorderColor:`{form.field.hover.border.color}`,focusBorderColor:`{form.field.focus.border.color}`,invalidBorderColor:`{form.field.invalid.border.color}`,color:`{form.field.color}`,disabledColor:`{form.field.disabled.color}`,placeholderColor:`{form.field.placeholder.color}`,invalidPlaceholderColor:`{form.field.invalid.placeholder.color}`,shadow:`{form.field.shadow}`,paddingX:`{form.field.padding.x}`,paddingY:`{form.field.padding.y}`,borderRadius:`{form.field.border.radius}`,focusRing:{width:`{form.field.focus.ring.width}`,style:`{form.field.focus.ring.style}`,color:`{form.field.focus.ring.color}`,offset:`{form.field.focus.ring.offset}`,shadow:`{form.field.focus.ring.shadow}`},transitionDuration:`{form.field.transition.duration}`,sm:{fontSize:`{form.field.sm.font.size}`,paddingX:`{form.field.sm.padding.x}`,paddingY:`{form.field.sm.padding.y}`},lg:{fontSize:`{form.field.lg.font.size}`,paddingX:`{form.field.lg.padding.x}`,paddingY:`{form.field.lg.padding.y}`}},dropdown:{width:`2.5rem`,color:`{form.field.icon.color}`},overlay:{background:`{overlay.select.background}`,borderColor:`{overlay.select.border.color}`,borderRadius:`{overlay.select.border.radius}`,color:`{overlay.select.color}`,shadow:`{overlay.select.shadow}`},list:{padding:`{list.padding}`,gap:`{list.gap}`,mobileIndent:`1rem`},option:{focusBackground:`{list.option.focus.background}`,selectedBackground:`{list.option.selected.background}`,selectedFocusBackground:`{list.option.selected.focus.background}`,color:`{list.option.color}`,focusColor:`{list.option.focus.color}`,selectedColor:`{list.option.selected.color}`,selectedFocusColor:`{list.option.selected.focus.color}`,padding:`{list.option.padding}`,borderRadius:`{list.option.border.radius}`,icon:{color:`{list.option.icon.color}`,focusColor:`{list.option.icon.focus.color}`,size:`0.875rem`}},clearIcon:{color:`{form.field.icon.color}`}},Ae={root:{borderRadius:`{border.radius.sm}`,width:`1.25rem`,height:`1.25rem`,background:`{form.field.background}`,checkedBackground:`{primary.color}`,checkedHoverBackground:`{primary.hover.color}`,disabledBackground:`{form.field.disabled.background}`,filledBackground:`{form.field.filled.background}`,borderColor:`{form.field.border.color}`,hoverBorderColor:`{form.field.hover.border.color}`,focusBorderColor:`{form.field.border.color}`,checkedBorderColor:`{primary.color}`,checkedHoverBorderColor:`{primary.hover.color}`,checkedFocusBorderColor:`{primary.color}`,checkedDisabledBorderColor:`{form.field.border.color}`,invalidBorderColor:`{form.field.invalid.border.color}`,shadow:`{form.field.shadow}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`},transitionDuration:`{form.field.transition.duration}`,sm:{width:`1rem`,height:`1rem`},lg:{width:`1.5rem`,height:`1.5rem`}},icon:{size:`0.875rem`,color:`{form.field.color}`,checkedColor:`{primary.contrast.color}`,checkedHoverColor:`{primary.contrast.color}`,disabledColor:`{form.field.disabled.color}`,sm:{size:`0.75rem`},lg:{size:`1rem`}}},je={root:{borderRadius:`16px`,paddingX:`0.75rem`,paddingY:`0.5rem`,gap:`0.5rem`,transitionDuration:`{transition.duration}`},image:{width:`2rem`,height:`2rem`},icon:{size:`1rem`},removeIcon:{size:`1rem`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{form.field.focus.ring.shadow}`}},colorScheme:{light:{root:{background:`{surface.100}`,color:`{surface.800}`},icon:{color:`{surface.800}`},removeIcon:{color:`{surface.800}`}},dark:{root:{background:`{surface.800}`,color:`{surface.0}`},icon:{color:`{surface.0}`},removeIcon:{color:`{surface.0}`}}}},Me={root:{transitionDuration:`{transition.duration}`},preview:{width:`1.5rem`,height:`1.5rem`,borderRadius:`{form.field.border.radius}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},panel:{shadow:`{overlay.popover.shadow}`,borderRadius:`{overlay.popover.borderRadius}`},colorScheme:{light:{panel:{background:`{surface.800}`,borderColor:`{surface.900}`},handle:{color:`{surface.0}`}},dark:{panel:{background:`{surface.900}`,borderColor:`{surface.700}`},handle:{color:`{surface.0}`}}}},Ne={icon:{size:`2rem`,color:`{overlay.modal.color}`},content:{gap:`1rem`}},Pe={root:{background:`{overlay.popover.background}`,borderColor:`{overlay.popover.border.color}`,color:`{overlay.popover.color}`,borderRadius:`{overlay.popover.border.radius}`,shadow:`{overlay.popover.shadow}`,gutter:`10px`,arrowOffset:`1.25rem`},content:{padding:`{overlay.popover.padding}`,gap:`1rem`},icon:{size:`1.5rem`,color:`{overlay.popover.color}`},footer:{gap:`0.5rem`,padding:`0 {overlay.popover.padding} {overlay.popover.padding} {overlay.popover.padding}`}},Fe={root:{background:`{content.background}`,borderColor:`{content.border.color}`,color:`{content.color}`,borderRadius:`{content.border.radius}`,shadow:`{overlay.navigation.shadow}`,transitionDuration:`{transition.duration}`},list:{padding:`{navigation.list.padding}`,gap:`{navigation.list.gap}`},item:{focusBackground:`{navigation.item.focus.background}`,activeBackground:`{navigation.item.active.background}`,color:`{navigation.item.color}`,focusColor:`{navigation.item.focus.color}`,activeColor:`{navigation.item.active.color}`,padding:`{navigation.item.padding}`,borderRadius:`{navigation.item.border.radius}`,gap:`{navigation.item.gap}`,icon:{color:`{navigation.item.icon.color}`,focusColor:`{navigation.item.icon.focus.color}`,activeColor:`{navigation.item.icon.active.color}`}},submenu:{mobileIndent:`1rem`},submenuIcon:{size:`{navigation.submenu.icon.size}`,color:`{navigation.submenu.icon.color}`,focusColor:`{navigation.submenu.icon.focus.color}`,activeColor:`{navigation.submenu.icon.active.color}`},separator:{borderColor:`{content.border.color}`}},Ie=`
|
|
2
|
+
li.p-autocomplete-option,
|
|
3
|
+
div.p-cascadeselect-option-content,
|
|
4
|
+
li.p-listbox-option,
|
|
5
|
+
li.p-multiselect-option,
|
|
6
|
+
li.p-select-option,
|
|
7
|
+
li.p-listbox-option,
|
|
8
|
+
div.p-tree-node-content,
|
|
9
|
+
li.p-datatable-filter-constraint,
|
|
10
|
+
.p-datatable .p-datatable-tbody > tr,
|
|
11
|
+
.p-treetable .p-treetable-tbody > tr,
|
|
12
|
+
div.p-menu-item-content,
|
|
13
|
+
div.p-tieredmenu-item-content,
|
|
14
|
+
div.p-contextmenu-item-content,
|
|
15
|
+
div.p-menubar-item-content,
|
|
16
|
+
div.p-megamenu-item-content,
|
|
17
|
+
div.p-panelmenu-header-content,
|
|
18
|
+
div.p-panelmenu-item-content,
|
|
19
|
+
th.p-datatable-header-cell,
|
|
20
|
+
th.p-treetable-header-cell,
|
|
21
|
+
thead.p-datatable-thead > tr > th,
|
|
22
|
+
.p-treetable thead.p-treetable-thead>tr>th {
|
|
23
|
+
transition: none;
|
|
24
|
+
}
|
|
25
|
+
`,Le={root:{transitionDuration:`{transition.duration}`},header:{background:`{content.background}`,borderColor:`{datatable.border.color}`,color:`{content.color}`,borderWidth:`0 0 1px 0`,padding:`0.75rem 1rem`,sm:{padding:`0.375rem 0.5rem`},lg:{padding:`1rem 1.25rem`}},headerCell:{background:`{content.background}`,hoverBackground:`{content.hover.background}`,selectedBackground:`{highlight.background}`,borderColor:`{datatable.border.color}`,color:`{content.color}`,hoverColor:`{content.hover.color}`,selectedColor:`{highlight.color}`,gap:`0.5rem`,padding:`0.75rem 1rem`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`-1px`,shadow:`{focus.ring.shadow}`},sm:{padding:`0.375rem 0.5rem`},lg:{padding:`1rem 1.25rem`}},columnTitle:{fontWeight:`600`},row:{background:`{content.background}`,hoverBackground:`{content.hover.background}`,selectedBackground:`{highlight.background}`,color:`{content.color}`,hoverColor:`{content.hover.color}`,selectedColor:`{highlight.color}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`-1px`,shadow:`{focus.ring.shadow}`}},bodyCell:{borderColor:`{datatable.border.color}`,padding:`0.75rem 1rem`,sm:{padding:`0.375rem 0.5rem`},lg:{padding:`1rem 1.25rem`}},footerCell:{background:`{content.background}`,borderColor:`{datatable.border.color}`,color:`{content.color}`,padding:`0.75rem 1rem`,sm:{padding:`0.375rem 0.5rem`},lg:{padding:`1rem 1.25rem`}},columnFooter:{fontWeight:`600`},footer:{background:`{content.background}`,borderColor:`{datatable.border.color}`,color:`{content.color}`,borderWidth:`0 0 1px 0`,padding:`0.75rem 1rem`,sm:{padding:`0.375rem 0.5rem`},lg:{padding:`1rem 1.25rem`}},dropPoint:{color:`{primary.color}`},columnResizer:{width:`0.5rem`},resizeIndicator:{width:`1px`,color:`{primary.color}`},sortIcon:{color:`{text.muted.color}`,hoverColor:`{text.hover.muted.color}`,size:`0.875rem`},loadingIcon:{size:`2rem`},rowToggleButton:{hoverBackground:`{content.hover.background}`,selectedHoverBackground:`{content.background}`,color:`{text.muted.color}`,hoverColor:`{text.color}`,selectedHoverColor:`{primary.color}`,size:`1.75rem`,borderRadius:`50%`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},filter:{inlineGap:`0.5rem`,overlaySelect:{background:`{overlay.select.background}`,borderColor:`{overlay.select.border.color}`,borderRadius:`{overlay.select.border.radius}`,color:`{overlay.select.color}`,shadow:`{overlay.select.shadow}`},overlayPopover:{background:`{overlay.popover.background}`,borderColor:`{overlay.popover.border.color}`,borderRadius:`{overlay.popover.border.radius}`,color:`{overlay.popover.color}`,shadow:`{overlay.popover.shadow}`,padding:`{overlay.popover.padding}`,gap:`0.5rem`},rule:{borderColor:`{content.border.color}`},constraintList:{padding:`{list.padding}`,gap:`{list.gap}`},constraint:{focusBackground:`{list.option.focus.background}`,selectedBackground:`{list.option.selected.background}`,selectedFocusBackground:`{list.option.selected.focus.background}`,color:`{list.option.color}`,focusColor:`{list.option.focus.color}`,selectedColor:`{list.option.selected.color}`,selectedFocusColor:`{list.option.selected.focus.color}`,separator:{borderColor:`{content.border.color}`},padding:`{list.option.padding}`,borderRadius:`{list.option.border.radius}`}},paginatorTop:{borderColor:`{datatable.border.color}`,borderWidth:`0 0 1px 0`},paginatorBottom:{borderColor:`{datatable.border.color}`,borderWidth:`0 0 1px 0`},colorScheme:{light:{root:{borderColor:`{content.border.color}`},row:{stripedBackground:`{surface.50}`},bodyCell:{selectedBorderColor:`{primary.100}`}},dark:{root:{borderColor:`{surface.800}`},row:{stripedBackground:`{surface.950}`},bodyCell:{selectedBorderColor:`{primary.900}`}}},css:`
|
|
26
|
+
.p-datatable-mask.p-overlay-mask {
|
|
27
|
+
--px-mask-background: light-dark(rgba(255,255,255,0.5),rgba(0,0,0,0.3));
|
|
28
|
+
}
|
|
29
|
+
`},Re={root:{borderColor:`transparent`,borderWidth:`0`,borderRadius:`0`,padding:`0`},header:{background:`{content.background}`,color:`{content.color}`,borderColor:`{content.border.color}`,borderWidth:`0 0 1px 0`,padding:`0.75rem 1rem`,borderRadius:`0`},content:{background:`{content.background}`,color:`{content.color}`,borderColor:`transparent`,borderWidth:`0`,padding:`0`,borderRadius:`0`},footer:{background:`{content.background}`,color:`{content.color}`,borderColor:`{content.border.color}`,borderWidth:`1px 0 0 0`,padding:`0.75rem 1rem`,borderRadius:`0`},paginatorTop:{borderColor:`{content.border.color}`,borderWidth:`0 0 1px 0`},paginatorBottom:{borderColor:`{content.border.color}`,borderWidth:`1px 0 0 0`}},ze={root:{transitionDuration:`{transition.duration}`},panel:{background:`{content.background}`,borderColor:`{content.border.color}`,color:`{content.color}`,borderRadius:`{content.border.radius}`,shadow:`{overlay.popover.shadow}`,padding:`{overlay.popover.padding}`},header:{background:`{content.background}`,borderColor:`{content.border.color}`,color:`{content.color}`,padding:`0 0 0.5rem 0`},title:{gap:`0.5rem`,fontWeight:`500`},dropdown:{width:`2.5rem`,sm:{width:`2rem`},lg:{width:`3rem`},borderColor:`{form.field.border.color}`,hoverBorderColor:`{form.field.border.color}`,activeBorderColor:`{form.field.border.color}`,borderRadius:`{form.field.border.radius}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},inputIcon:{color:`{form.field.icon.color}`},selectMonth:{hoverBackground:`{content.hover.background}`,color:`{content.color}`,hoverColor:`{content.hover.color}`,padding:`0.25rem 0.5rem`,borderRadius:`{content.border.radius}`},selectYear:{hoverBackground:`{content.hover.background}`,color:`{content.color}`,hoverColor:`{content.hover.color}`,padding:`0.25rem 0.5rem`,borderRadius:`{content.border.radius}`},group:{borderColor:`{content.border.color}`,gap:`{overlay.popover.padding}`},dayView:{margin:`0.5rem 0 0 0`},weekDay:{padding:`0.25rem`,fontWeight:`500`,color:`{content.color}`},date:{hoverBackground:`{content.hover.background}`,selectedBackground:`{primary.color}`,rangeSelectedBackground:`{highlight.background}`,color:`{content.color}`,hoverColor:`{content.hover.color}`,selectedColor:`{primary.contrast.color}`,rangeSelectedColor:`{highlight.color}`,width:`2rem`,height:`2rem`,borderRadius:`50%`,padding:`0.25rem`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},monthView:{margin:`0.5rem 0 0 0`},month:{padding:`0.375rem`,borderRadius:`{content.border.radius}`},yearView:{margin:`0.5rem 0 0 0`},year:{padding:`0.375rem`,borderRadius:`{content.border.radius}`},buttonbar:{padding:`0.5rem 0 0 0`,borderColor:`{content.border.color}`},timePicker:{padding:`0.5rem 0 0 0`,borderColor:`{content.border.color}`,gap:`0.5rem`,buttonGap:`0.25rem`},colorScheme:{light:{dropdown:{background:`{surface.100}`,hoverBackground:`{surface.200}`,activeBackground:`{surface.300}`,color:`{surface.600}`,hoverColor:`{surface.700}`,activeColor:`{surface.800}`},today:{background:`{surface.200}`,color:`{surface.900}`}},dark:{dropdown:{background:`{surface.800}`,hoverBackground:`{surface.700}`,activeBackground:`{surface.600}`,color:`{surface.300}`,hoverColor:`{surface.200}`,activeColor:`{surface.100}`},today:{background:`{surface.700}`,color:`{surface.0}`}}}},Be={root:{background:`{overlay.modal.background}`,borderColor:`{overlay.modal.border.color}`,color:`{overlay.modal.color}`,borderRadius:`{overlay.modal.border.radius}`,shadow:`{overlay.modal.shadow}`},header:{padding:`{overlay.modal.padding}`,gap:`0.5rem`},title:{fontSize:`1.25rem`,fontWeight:`600`},content:{padding:`0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}`},footer:{padding:`0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}`,gap:`0.5rem`}},Ve={root:{borderColor:`{content.border.color}`},content:{background:`{content.background}`,color:`{text.color}`},horizontal:{margin:`1rem 0`,padding:`0 1rem`,content:{padding:`0 0.5rem`}},vertical:{margin:`0 1rem`,padding:`0.5rem 0`,content:{padding:`0.5rem 0`}}},He={root:{background:`rgba(255, 255, 255, 0.1)`,borderColor:`rgba(255, 255, 255, 0.2)`,padding:`0.5rem`,borderRadius:`{border.radius.xl}`},item:{borderRadius:`{content.border.radius}`,padding:`0.5rem`,size:`3rem`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}}},Ue={root:{background:`{overlay.modal.background}`,borderColor:`{overlay.modal.border.color}`,color:`{overlay.modal.color}`,shadow:`{overlay.modal.shadow}`},header:{padding:`{overlay.modal.padding}`},title:{fontSize:`1.5rem`,fontWeight:`600`},content:{padding:`0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}`},footer:{padding:`{overlay.modal.padding}`}},We={toolbar:{background:`{content.background}`,borderColor:`{content.border.color}`,borderRadius:`{content.border.radius}`},toolbarItem:{color:`{text.muted.color}`,hoverColor:`{text.color}`,activeColor:`{primary.color}`},overlay:{background:`{overlay.select.background}`,borderColor:`{overlay.select.border.color}`,borderRadius:`{overlay.select.border.radius}`,color:`{overlay.select.color}`,shadow:`{overlay.select.shadow}`,padding:`{list.padding}`},overlayOption:{focusBackground:`{list.option.focus.background}`,color:`{list.option.color}`,focusColor:`{list.option.focus.color}`,padding:`{list.option.padding}`,borderRadius:`{list.option.border.radius}`},content:{background:`{content.background}`,borderColor:`{content.border.color}`,color:`{content.color}`,borderRadius:`{content.border.radius}`}},Ge={root:{background:`{content.background}`,borderColor:`{content.border.color}`,borderRadius:`{content.border.radius}`,color:`{content.color}`,padding:`0 1.125rem 1.125rem 1.125rem`,transitionDuration:`{transition.duration}`},legend:{background:`{content.background}`,hoverBackground:`{content.hover.background}`,color:`{content.color}`,hoverColor:`{content.hover.color}`,borderRadius:`{content.border.radius}`,borderWidth:`1px`,borderColor:`transparent`,padding:`0.5rem 0.75rem`,gap:`0.5rem`,fontWeight:`600`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},toggleIcon:{color:`{text.muted.color}`,hoverColor:`{text.hover.muted.color}`},content:{padding:`0`}},Ke={root:{background:`{content.background}`,borderColor:`{content.border.color}`,color:`{content.color}`,borderRadius:`{content.border.radius}`,transitionDuration:`{transition.duration}`},header:{background:`transparent`,color:`{text.color}`,padding:`1.125rem`,borderColor:`unset`,borderWidth:`0`,borderRadius:`0`,gap:`0.5rem`},content:{highlightBorderColor:`{primary.color}`,padding:`0 1.125rem 1.125rem 1.125rem`,gap:`1rem`},file:{padding:`1rem`,gap:`1rem`,borderColor:`{content.border.color}`,info:{gap:`0.5rem`}},fileList:{gap:`0.5rem`},progressbar:{height:`0.25rem`},basic:{gap:`0.5rem`}},qe={root:{color:`{form.field.float.label.color}`,focusColor:`{form.field.float.label.focus.color}`,activeColor:`{form.field.float.label.active.color}`,invalidColor:`{form.field.float.label.invalid.color}`,transitionDuration:`0.2s`,positionX:`{form.field.padding.x}`,positionY:`{form.field.padding.y}`,fontWeight:`500`,active:{fontSize:`0.75rem`,fontWeight:`400`}},over:{active:{top:`-1.25rem`}},in:{input:{paddingTop:`1.5rem`,paddingBottom:`{form.field.padding.y}`},active:{top:`{form.field.padding.y}`}},on:{borderRadius:`{border.radius.xs}`,active:{background:`{form.field.background}`,padding:`0 0.125rem`}}},Je={root:{borderWidth:`1px`,borderColor:`{content.border.color}`,borderRadius:`{content.border.radius}`,transitionDuration:`{transition.duration}`},navButton:{background:`rgba(255, 255, 255, 0.1)`,hoverBackground:`rgba(255, 255, 255, 0.2)`,color:`{surface.100}`,hoverColor:`{surface.0}`,size:`3rem`,gutter:`0.5rem`,prev:{borderRadius:`50%`},next:{borderRadius:`50%`},focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},navIcon:{size:`1.5rem`},thumbnailsContent:{background:`{content.background}`,padding:`1rem 0.25rem`},thumbnailNavButton:{size:`2rem`,borderRadius:`{content.border.radius}`,gutter:`0.5rem`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},thumbnailNavButtonIcon:{size:`1rem`},caption:{background:`rgba(0, 0, 0, 0.5)`,color:`{surface.100}`,padding:`1rem`},indicatorList:{gap:`0.5rem`,padding:`1rem`},indicatorButton:{width:`1rem`,height:`1rem`,activeBackground:`{primary.color}`,borderRadius:`50%`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},insetIndicatorList:{background:`rgba(0, 0, 0, 0.5)`},insetIndicatorButton:{background:`rgba(255, 255, 255, 0.4)`,hoverBackground:`rgba(255, 255, 255, 0.6)`,activeBackground:`rgba(255, 255, 255, 0.9)`},closeButton:{size:`3rem`,gutter:`0.5rem`,background:`rgba(255, 255, 255, 0.1)`,hoverBackground:`rgba(255, 255, 255, 0.2)`,color:`{surface.50}`,hoverColor:`{surface.0}`,borderRadius:`50%`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},closeButtonIcon:{size:`1.5rem`},colorScheme:{light:{thumbnailNavButton:{hoverBackground:`{surface.100}`,color:`{surface.600}`,hoverColor:`{surface.700}`},indicatorButton:{background:`{surface.200}`,hoverBackground:`{surface.300}`}},dark:{thumbnailNavButton:{hoverBackground:`{surface.700}`,color:`{surface.400}`,hoverColor:`{surface.0}`},indicatorButton:{background:`{surface.700}`,hoverBackground:`{surface.600}`}}}},Ye={icon:{color:`{form.field.icon.color}`}},Xe={root:{color:`{form.field.float.label.color}`,focusColor:`{form.field.float.label.focus.color}`,invalidColor:`{form.field.float.label.invalid.color}`,transitionDuration:`0.2s`,positionX:`{form.field.padding.x}`,top:`{form.field.padding.y}`,fontSize:`0.75rem`,fontWeight:`400`},input:{paddingTop:`1.5rem`,paddingBottom:`{form.field.padding.y}`}},Ze={root:{transitionDuration:`{transition.duration}`},preview:{icon:{size:`1.5rem`},mask:{background:`{mask.background}`,color:`{mask.color}`}},toolbar:{position:{left:`auto`,right:`1rem`,top:`1rem`,bottom:`auto`},blur:`8px`,background:`rgba(255,255,255,0.1)`,borderColor:`rgba(255,255,255,0.2)`,borderWidth:`1px`,borderRadius:`30px`,padding:`.5rem`,gap:`0.5rem`},action:{hoverBackground:`rgba(255,255,255,0.1)`,color:`{surface.50}`,hoverColor:`{surface.0}`,size:`3rem`,iconSize:`1.5rem`,borderRadius:`50%`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}}},Qe={handle:{size:`15px`,hoverSize:`30px`,background:`rgba(255,255,255,0.3)`,hoverBackground:`rgba(255,255,255,0.3)`,borderColor:`unset`,hoverBorderColor:`unset`,borderWidth:`0`,borderRadius:`50%`,transitionDuration:`{transition.duration}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`rgba(255,255,255,0.3)`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}}},$e={root:{padding:`{form.field.padding.y} {form.field.padding.x}`,borderRadius:`{content.border.radius}`,gap:`0.5rem`},text:{fontWeight:`500`},icon:{size:`1rem`},colorScheme:{light:{info:{background:`color-mix(in srgb, {blue.50}, transparent 5%)`,borderColor:`{blue.200}`,color:`{blue.600}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)`},success:{background:`color-mix(in srgb, {green.50}, transparent 5%)`,borderColor:`{green.200}`,color:`{green.600}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)`},warn:{background:`color-mix(in srgb,{yellow.50}, transparent 5%)`,borderColor:`{yellow.200}`,color:`{yellow.600}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)`},error:{background:`color-mix(in srgb, {red.50}, transparent 5%)`,borderColor:`{red.200}`,color:`{red.600}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)`},secondary:{background:`{surface.100}`,borderColor:`{surface.200}`,color:`{surface.600}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)`},contrast:{background:`{surface.900}`,borderColor:`{surface.950}`,color:`{surface.50}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)`}},dark:{info:{background:`color-mix(in srgb, {blue.500}, transparent 84%)`,borderColor:`color-mix(in srgb, {blue.700}, transparent 64%)`,color:`{blue.500}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)`},success:{background:`color-mix(in srgb, {green.500}, transparent 84%)`,borderColor:`color-mix(in srgb, {green.700}, transparent 64%)`,color:`{green.500}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)`},warn:{background:`color-mix(in srgb, {yellow.500}, transparent 84%)`,borderColor:`color-mix(in srgb, {yellow.700}, transparent 64%)`,color:`{yellow.500}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)`},error:{background:`color-mix(in srgb, {red.500}, transparent 84%)`,borderColor:`color-mix(in srgb, {red.700}, transparent 64%)`,color:`{red.500}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)`},secondary:{background:`{surface.800}`,borderColor:`{surface.700}`,color:`{surface.300}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)`},contrast:{background:`{surface.0}`,borderColor:`{surface.100}`,color:`{surface.950}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)`}}}},et={root:{padding:`{form.field.padding.y} {form.field.padding.x}`,borderRadius:`{content.border.radius}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`},transitionDuration:`{transition.duration}`},display:{hoverBackground:`{content.hover.background}`,hoverColor:`{content.hover.color}`}},tt={root:{background:`{form.field.background}`,disabledBackground:`{form.field.disabled.background}`,filledBackground:`{form.field.filled.background}`,filledFocusBackground:`{form.field.filled.focus.background}`,borderColor:`{form.field.border.color}`,hoverBorderColor:`{form.field.hover.border.color}`,focusBorderColor:`{form.field.focus.border.color}`,invalidBorderColor:`{form.field.invalid.border.color}`,color:`{form.field.color}`,disabledColor:`{form.field.disabled.color}`,placeholderColor:`{form.field.placeholder.color}`,shadow:`{form.field.shadow}`,paddingX:`{form.field.padding.x}`,paddingY:`{form.field.padding.y}`,borderRadius:`{form.field.border.radius}`,focusRing:{width:`{form.field.focus.ring.width}`,style:`{form.field.focus.ring.style}`,color:`{form.field.focus.ring.color}`,offset:`{form.field.focus.ring.offset}`,shadow:`{form.field.focus.ring.shadow}`},transitionDuration:`{form.field.transition.duration}`},chip:{borderRadius:`{border.radius.sm}`},colorScheme:{light:{chip:{focusBackground:`{surface.200}`,color:`{surface.800}`}},dark:{chip:{focusBackground:`{surface.700}`,color:`{surface.0}`}}}},nt={addon:{background:`{form.field.background}`,borderColor:`{form.field.border.color}`,color:`{form.field.icon.color}`,borderRadius:`{form.field.border.radius}`,padding:`0.5rem`,minWidth:`2.5rem`}},rt={root:{transitionDuration:`{transition.duration}`},button:{width:`2.5rem`,borderRadius:`{form.field.border.radius}`,verticalPadding:`{form.field.padding.y}`},colorScheme:{light:{button:{background:`transparent`,hoverBackground:`{surface.100}`,activeBackground:`{surface.200}`,borderColor:`{form.field.border.color}`,hoverBorderColor:`{form.field.border.color}`,activeBorderColor:`{form.field.border.color}`,color:`{surface.400}`,hoverColor:`{surface.500}`,activeColor:`{surface.600}`}},dark:{button:{background:`transparent`,hoverBackground:`{surface.800}`,activeBackground:`{surface.700}`,borderColor:`{form.field.border.color}`,hoverBorderColor:`{form.field.border.color}`,activeBorderColor:`{form.field.border.color}`,color:`{surface.400}`,hoverColor:`{surface.300}`,activeColor:`{surface.200}`}}}},it={root:{gap:`0.5rem`},input:{width:`2.5rem`,sm:{width:`2rem`},lg:{width:`3rem`}}},at={root:{background:`{form.field.background}`,disabledBackground:`{form.field.disabled.background}`,filledBackground:`{form.field.filled.background}`,filledHoverBackground:`{form.field.filled.hover.background}`,filledFocusBackground:`{form.field.filled.focus.background}`,borderColor:`{form.field.border.color}`,hoverBorderColor:`{form.field.hover.border.color}`,focusBorderColor:`{form.field.focus.border.color}`,invalidBorderColor:`{form.field.invalid.border.color}`,color:`{form.field.color}`,disabledColor:`{form.field.disabled.color}`,placeholderColor:`{form.field.placeholder.color}`,invalidPlaceholderColor:`{form.field.invalid.placeholder.color}`,shadow:`{form.field.shadow}`,paddingX:`{form.field.padding.x}`,paddingY:`{form.field.padding.y}`,borderRadius:`{form.field.border.radius}`,focusRing:{width:`{form.field.focus.ring.width}`,style:`{form.field.focus.ring.style}`,color:`{form.field.focus.ring.color}`,offset:`{form.field.focus.ring.offset}`,shadow:`{form.field.focus.ring.shadow}`},transitionDuration:`{form.field.transition.duration}`,sm:{fontSize:`{form.field.sm.font.size}`,paddingX:`{form.field.sm.padding.x}`,paddingY:`{form.field.sm.padding.y}`},lg:{fontSize:`{form.field.lg.font.size}`,paddingX:`{form.field.lg.padding.x}`,paddingY:`{form.field.lg.padding.y}`}}},ot={root:{transitionDuration:`{transition.duration}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},value:{background:`{primary.color}`},range:{background:`{content.border.color}`},text:{color:`{text.muted.color}`}},st={root:{background:`{form.field.background}`,disabledBackground:`{form.field.disabled.background}`,borderColor:`{form.field.border.color}`,invalidBorderColor:`{form.field.invalid.border.color}`,color:`{form.field.color}`,disabledColor:`{form.field.disabled.color}`,shadow:`{form.field.shadow}`,borderRadius:`{form.field.border.radius}`,transitionDuration:`{form.field.transition.duration}`},list:{padding:`{list.padding}`,gap:`{list.gap}`,header:{padding:`{list.header.padding}`}},option:{focusBackground:`{list.option.focus.background}`,selectedBackground:`{list.option.selected.background}`,selectedFocusBackground:`{list.option.selected.focus.background}`,color:`{list.option.color}`,focusColor:`{list.option.focus.color}`,selectedColor:`{list.option.selected.color}`,selectedFocusColor:`{list.option.selected.focus.color}`,padding:`{list.option.padding}`,borderRadius:`{list.option.border.radius}`},optionGroup:{background:`{list.option.group.background}`,color:`{list.option.group.color}`,fontWeight:`{list.option.group.font.weight}`,padding:`{list.option.group.padding}`},checkmark:{color:`{list.option.color}`,gutterStart:`-0.375rem`,gutterEnd:`0.375rem`},emptyMessage:{padding:`{list.option.padding}`},colorScheme:{light:{option:{stripedBackground:`{surface.50}`}},dark:{option:{stripedBackground:`{surface.900}`}}}},ct={root:{background:`{content.background}`,borderColor:`{content.border.color}`,borderRadius:`{content.border.radius}`,color:`{content.color}`,gap:`0.5rem`,verticalOrientation:{padding:`{navigation.list.padding}`,gap:`{navigation.list.gap}`},horizontalOrientation:{padding:`0.5rem 0.75rem`,gap:`0.5rem`},transitionDuration:`{transition.duration}`},baseItem:{borderRadius:`{content.border.radius}`,padding:`{navigation.item.padding}`},item:{focusBackground:`{navigation.item.focus.background}`,activeBackground:`{navigation.item.active.background}`,color:`{navigation.item.color}`,focusColor:`{navigation.item.focus.color}`,activeColor:`{navigation.item.active.color}`,padding:`{navigation.item.padding}`,borderRadius:`{navigation.item.border.radius}`,gap:`{navigation.item.gap}`,icon:{color:`{navigation.item.icon.color}`,focusColor:`{navigation.item.icon.focus.color}`,activeColor:`{navigation.item.icon.active.color}`}},overlay:{padding:`0`,background:`{content.background}`,borderColor:`{content.border.color}`,borderRadius:`{content.border.radius}`,color:`{content.color}`,shadow:`{overlay.navigation.shadow}`,gap:`0.5rem`},submenu:{padding:`{navigation.list.padding}`,gap:`{navigation.list.gap}`},submenuLabel:{padding:`{navigation.submenu.label.padding}`,fontWeight:`{navigation.submenu.label.font.weight}`,background:`{navigation.submenu.label.background}`,color:`{navigation.submenu.label.color}`},submenuIcon:{size:`{navigation.submenu.icon.size}`,color:`{navigation.submenu.icon.color}`,focusColor:`{navigation.submenu.icon.focus.color}`,activeColor:`{navigation.submenu.icon.active.color}`},separator:{borderColor:`{content.border.color}`},mobileButton:{borderRadius:`50%`,size:`1.75rem`,color:`{text.muted.color}`,hoverColor:`{text.hover.muted.color}`,hoverBackground:`{content.hover.background}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}}},lt={root:{background:`{content.background}`,borderColor:`{content.border.color}`,color:`{content.color}`,borderRadius:`{content.border.radius}`,shadow:`{overlay.navigation.shadow}`,transitionDuration:`{transition.duration}`},list:{padding:`{navigation.list.padding}`,gap:`{navigation.list.gap}`},item:{focusBackground:`{navigation.item.focus.background}`,color:`{navigation.item.color}`,focusColor:`{navigation.item.focus.color}`,padding:`{navigation.item.padding}`,borderRadius:`{navigation.item.border.radius}`,gap:`{navigation.item.gap}`,icon:{color:`{navigation.item.icon.color}`,focusColor:`{navigation.item.icon.focus.color}`}},submenuLabel:{padding:`{navigation.submenu.label.padding}`,fontWeight:`{navigation.submenu.label.font.weight}`,background:`{navigation.submenu.label.background}`,color:`{navigation.submenu.label.color}`},separator:{borderColor:`{content.border.color}`}},ut={root:{background:`{content.background}`,borderColor:`{content.border.color}`,borderRadius:`{content.border.radius}`,color:`{content.color}`,gap:`0.5rem`,padding:`0.5rem 0.75rem`,transitionDuration:`{transition.duration}`},baseItem:{borderRadius:`{content.border.radius}`,padding:`{navigation.item.padding}`},item:{focusBackground:`{navigation.item.focus.background}`,activeBackground:`{navigation.item.active.background}`,color:`{navigation.item.color}`,focusColor:`{navigation.item.focus.color}`,activeColor:`{navigation.item.active.color}`,padding:`{navigation.item.padding}`,borderRadius:`{navigation.item.border.radius}`,gap:`{navigation.item.gap}`,icon:{color:`{navigation.item.icon.color}`,focusColor:`{navigation.item.icon.focus.color}`,activeColor:`{navigation.item.icon.active.color}`}},submenu:{padding:`{navigation.list.padding}`,gap:`{navigation.list.gap}`,background:`{content.background}`,borderColor:`{content.border.color}`,borderRadius:`{content.border.radius}`,shadow:`{overlay.navigation.shadow}`,mobileIndent:`1rem`,icon:{size:`{navigation.submenu.icon.size}`,color:`{navigation.submenu.icon.color}`,focusColor:`{navigation.submenu.icon.focus.color}`,activeColor:`{navigation.submenu.icon.active.color}`}},separator:{borderColor:`{content.border.color}`},mobileButton:{borderRadius:`50%`,size:`1.75rem`,color:`{text.muted.color}`,hoverColor:`{text.hover.muted.color}`,hoverBackground:`{content.hover.background}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}}},dt={root:{borderRadius:`{content.border.radius}`,borderWidth:`1px`,transitionDuration:`{transition.duration}`},content:{padding:`0.5rem 0.75rem`,gap:`0.5rem`,sm:{padding:`0.375rem 0.625rem`},lg:{padding:`0.625rem 0.875rem`}},text:{fontSize:`1rem`,fontWeight:`500`,sm:{fontSize:`0.875rem`},lg:{fontSize:`1.125rem`}},icon:{size:`1.125rem`,sm:{size:`1rem`},lg:{size:`1.25rem`}},closeButton:{width:`1.75rem`,height:`1.75rem`,borderRadius:`50%`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,offset:`{focus.ring.offset}`}},closeIcon:{size:`1rem`,sm:{size:`0.875rem`},lg:{size:`1.125rem`}},outlined:{root:{borderWidth:`1px`}},simple:{content:{padding:`0`}},colorScheme:{light:{info:{background:`color-mix(in srgb, {blue.50}, transparent 5%)`,borderColor:`{blue.200}`,color:`{blue.600}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)`,closeButton:{hoverBackground:`{blue.100}`,focusRing:{color:`{blue.600}`,shadow:`none`}},outlined:{color:`{blue.600}`,borderColor:`{blue.600}`},simple:{color:`{blue.600}`}},success:{background:`color-mix(in srgb, {green.50}, transparent 5%)`,borderColor:`{green.200}`,color:`{green.600}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)`,closeButton:{hoverBackground:`{green.100}`,focusRing:{color:`{green.600}`,shadow:`none`}},outlined:{color:`{green.600}`,borderColor:`{green.600}`},simple:{color:`{green.600}`}},warn:{background:`color-mix(in srgb,{yellow.50}, transparent 5%)`,borderColor:`{yellow.200}`,color:`{yellow.600}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)`,closeButton:{hoverBackground:`{yellow.100}`,focusRing:{color:`{yellow.600}`,shadow:`none`}},outlined:{color:`{yellow.600}`,borderColor:`{yellow.600}`},simple:{color:`{yellow.600}`}},error:{background:`color-mix(in srgb, {red.50}, transparent 5%)`,borderColor:`{red.200}`,color:`{red.600}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)`,closeButton:{hoverBackground:`{red.100}`,focusRing:{color:`{red.600}`,shadow:`none`}},outlined:{color:`{red.600}`,borderColor:`{red.600}`},simple:{color:`{red.600}`}},secondary:{background:`{surface.100}`,borderColor:`{surface.200}`,color:`{surface.600}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)`,closeButton:{hoverBackground:`{surface.200}`,focusRing:{color:`{surface.600}`,shadow:`none`}},outlined:{color:`{surface.500}`,borderColor:`{surface.500}`},simple:{color:`{surface.500}`}},contrast:{background:`{surface.900}`,borderColor:`{surface.950}`,color:`{surface.50}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)`,closeButton:{hoverBackground:`{surface.800}`,focusRing:{color:`{surface.50}`,shadow:`none`}},outlined:{color:`{surface.950}`,borderColor:`{surface.950}`},simple:{color:`{surface.950}`}}},dark:{info:{background:`color-mix(in srgb, {blue.500}, transparent 84%)`,borderColor:`color-mix(in srgb, {blue.700}, transparent 64%)`,color:`{blue.500}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)`,closeButton:{hoverBackground:`rgba(255, 255, 255, 0.05)`,focusRing:{color:`{blue.500}`,shadow:`none`}},outlined:{color:`{blue.500}`,borderColor:`{blue.500}`},simple:{color:`{blue.500}`}},success:{background:`color-mix(in srgb, {green.500}, transparent 84%)`,borderColor:`color-mix(in srgb, {green.700}, transparent 64%)`,color:`{green.500}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)`,closeButton:{hoverBackground:`rgba(255, 255, 255, 0.05)`,focusRing:{color:`{green.500}`,shadow:`none`}},outlined:{color:`{green.500}`,borderColor:`{green.500}`},simple:{color:`{green.500}`}},warn:{background:`color-mix(in srgb, {yellow.500}, transparent 84%)`,borderColor:`color-mix(in srgb, {yellow.700}, transparent 64%)`,color:`{yellow.500}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)`,closeButton:{hoverBackground:`rgba(255, 255, 255, 0.05)`,focusRing:{color:`{yellow.500}`,shadow:`none`}},outlined:{color:`{yellow.500}`,borderColor:`{yellow.500}`},simple:{color:`{yellow.500}`}},error:{background:`color-mix(in srgb, {red.500}, transparent 84%)`,borderColor:`color-mix(in srgb, {red.700}, transparent 64%)`,color:`{red.500}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)`,closeButton:{hoverBackground:`rgba(255, 255, 255, 0.05)`,focusRing:{color:`{red.500}`,shadow:`none`}},outlined:{color:`{red.500}`,borderColor:`{red.500}`},simple:{color:`{red.500}`}},secondary:{background:`{surface.800}`,borderColor:`{surface.700}`,color:`{surface.300}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)`,closeButton:{hoverBackground:`{surface.700}`,focusRing:{color:`{surface.300}`,shadow:`none`}},outlined:{color:`{surface.400}`,borderColor:`{surface.400}`},simple:{color:`{surface.400}`}},contrast:{background:`{surface.0}`,borderColor:`{surface.100}`,color:`{surface.950}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)`,closeButton:{hoverBackground:`{surface.100}`,focusRing:{color:`{surface.950}`,shadow:`none`}},outlined:{color:`{surface.0}`,borderColor:`{surface.0}`},simple:{color:`{surface.0}`}}}}},ft={root:{borderRadius:`{content.border.radius}`,gap:`1rem`},meters:{background:`{content.border.color}`,size:`0.5rem`},label:{gap:`0.5rem`},labelMarker:{size:`0.5rem`},labelIcon:{size:`1rem`},labelList:{verticalGap:`0.5rem`,horizontalGap:`1rem`}},pt={root:{background:`{form.field.background}`,disabledBackground:`{form.field.disabled.background}`,filledBackground:`{form.field.filled.background}`,filledHoverBackground:`{form.field.filled.hover.background}`,filledFocusBackground:`{form.field.filled.focus.background}`,borderColor:`{form.field.border.color}`,hoverBorderColor:`{form.field.hover.border.color}`,focusBorderColor:`{form.field.focus.border.color}`,invalidBorderColor:`{form.field.invalid.border.color}`,color:`{form.field.color}`,disabledColor:`{form.field.disabled.color}`,placeholderColor:`{form.field.placeholder.color}`,invalidPlaceholderColor:`{form.field.invalid.placeholder.color}`,shadow:`{form.field.shadow}`,paddingX:`{form.field.padding.x}`,paddingY:`{form.field.padding.y}`,borderRadius:`{form.field.border.radius}`,focusRing:{width:`{form.field.focus.ring.width}`,style:`{form.field.focus.ring.style}`,color:`{form.field.focus.ring.color}`,offset:`{form.field.focus.ring.offset}`,shadow:`{form.field.focus.ring.shadow}`},transitionDuration:`{form.field.transition.duration}`,sm:{fontSize:`{form.field.sm.font.size}`,paddingX:`{form.field.sm.padding.x}`,paddingY:`{form.field.sm.padding.y}`},lg:{fontSize:`{form.field.lg.font.size}`,paddingX:`{form.field.lg.padding.x}`,paddingY:`{form.field.lg.padding.y}`}},dropdown:{width:`2.5rem`,color:`{form.field.icon.color}`},overlay:{background:`{overlay.select.background}`,borderColor:`{overlay.select.border.color}`,borderRadius:`{overlay.select.border.radius}`,color:`{overlay.select.color}`,shadow:`{overlay.select.shadow}`},list:{padding:`{list.padding}`,gap:`{list.gap}`,header:{padding:`{list.header.padding}`}},option:{focusBackground:`{list.option.focus.background}`,selectedBackground:`{list.option.selected.background}`,selectedFocusBackground:`{list.option.selected.focus.background}`,color:`{list.option.color}`,focusColor:`{list.option.focus.color}`,selectedColor:`{list.option.selected.color}`,selectedFocusColor:`{list.option.selected.focus.color}`,padding:`{list.option.padding}`,borderRadius:`{list.option.border.radius}`,gap:`0.5rem`},optionGroup:{background:`{list.option.group.background}`,color:`{list.option.group.color}`,fontWeight:`{list.option.group.font.weight}`,padding:`{list.option.group.padding}`},chip:{borderRadius:`{border.radius.sm}`},clearIcon:{color:`{form.field.icon.color}`},emptyMessage:{padding:`{list.option.padding}`}},mt={root:{gap:`1.125rem`},controls:{gap:`0.5rem`}},ht={root:{gutter:`0.75rem`,transitionDuration:`{transition.duration}`},node:{background:`{content.background}`,hoverBackground:`{content.hover.background}`,selectedBackground:`{highlight.background}`,borderColor:`{content.border.color}`,color:`{content.color}`,selectedColor:`{highlight.color}`,hoverColor:`{content.hover.color}`,padding:`0.75rem 1rem`,toggleablePadding:`0.75rem 1rem 1.25rem 1rem`,borderRadius:`{content.border.radius}`},nodeToggleButton:{background:`{content.background}`,hoverBackground:`{content.hover.background}`,borderColor:`{content.border.color}`,color:`{text.muted.color}`,hoverColor:`{text.color}`,size:`1.5rem`,borderRadius:`50%`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},connector:{color:`{content.border.color}`,borderRadius:`{content.border.radius}`,height:`24px`}},gt={root:{outline:{width:`2px`,color:`{content.background}`}}},_t={root:{padding:`0.5rem 1rem`,gap:`0.25rem`,borderRadius:`{content.border.radius}`,background:`{content.background}`,color:`{content.color}`,transitionDuration:`{transition.duration}`},navButton:{background:`transparent`,hoverBackground:`{content.hover.background}`,selectedBackground:`{highlight.background}`,color:`{text.muted.color}`,hoverColor:`{text.hover.muted.color}`,selectedColor:`{highlight.color}`,width:`2.5rem`,height:`2.5rem`,borderRadius:`50%`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},currentPageReport:{color:`{text.muted.color}`},jumpToPageInput:{maxWidth:`2.5rem`}},vt={root:{background:`{content.background}`,borderColor:`{content.border.color}`,color:`{content.color}`,borderRadius:`{content.border.radius}`},header:{background:`transparent`,color:`{text.color}`,padding:`1.125rem`,borderColor:`{content.border.color}`,borderWidth:`0`,borderRadius:`0`},toggleableHeader:{padding:`0.375rem 1.125rem`},title:{fontWeight:`600`},content:{padding:`0 1.125rem 1.125rem 1.125rem`},footer:{padding:`0 1.125rem 1.125rem 1.125rem`}},yt={root:{gap:`0.5rem`,transitionDuration:`{transition.duration}`},panel:{background:`{content.background}`,borderColor:`{content.border.color}`,borderWidth:`1px`,color:`{content.color}`,padding:`0.25rem 0.25rem`,borderRadius:`{content.border.radius}`,first:{borderWidth:`1px`,topBorderRadius:`{content.border.radius}`},last:{borderWidth:`1px`,bottomBorderRadius:`{content.border.radius}`}},item:{focusBackground:`{navigation.item.focus.background}`,color:`{navigation.item.color}`,focusColor:`{navigation.item.focus.color}`,gap:`0.5rem`,padding:`{navigation.item.padding}`,borderRadius:`{content.border.radius}`,icon:{color:`{navigation.item.icon.color}`,focusColor:`{navigation.item.icon.focus.color}`}},submenu:{indent:`1rem`},submenuIcon:{color:`{navigation.submenu.icon.color}`,focusColor:`{navigation.submenu.icon.focus.color}`}},bt={meter:{background:`{content.border.color}`,borderRadius:`{content.border.radius}`,height:`.75rem`},icon:{color:`{form.field.icon.color}`},overlay:{background:`{overlay.popover.background}`,borderColor:`{overlay.popover.border.color}`,borderRadius:`{overlay.popover.border.radius}`,color:`{overlay.popover.color}`,padding:`{overlay.popover.padding}`,shadow:`{overlay.popover.shadow}`},content:{gap:`0.5rem`},colorScheme:{light:{strength:{weakBackground:`{red.500}`,mediumBackground:`{amber.500}`,strongBackground:`{green.500}`}},dark:{strength:{weakBackground:`{red.400}`,mediumBackground:`{amber.400}`,strongBackground:`{green.400}`}}}},xt={root:{gap:`1.125rem`},controls:{gap:`0.5rem`}},St={root:{background:`{overlay.popover.background}`,borderColor:`{overlay.popover.border.color}`,color:`{overlay.popover.color}`,borderRadius:`{overlay.popover.border.radius}`,shadow:`{overlay.popover.shadow}`,gutter:`10px`,arrowOffset:`1.25rem`},content:{padding:`{overlay.popover.padding}`}},Ct={root:{background:`{content.border.color}`,borderRadius:`{content.border.radius}`,height:`1.25rem`},value:{background:`{primary.color}`},label:{color:`{primary.contrast.color}`,fontSize:`0.75rem`,fontWeight:`600`}},wt={colorScheme:{light:{root:{colorOne:`{red.500}`,colorTwo:`{blue.500}`,colorThree:`{green.500}`,colorFour:`{yellow.500}`}},dark:{root:{colorOne:`{red.400}`,colorTwo:`{blue.400}`,colorThree:`{green.400}`,colorFour:`{yellow.400}`}}}},Tt={root:{width:`1.25rem`,height:`1.25rem`,background:`{form.field.background}`,checkedBackground:`{primary.color}`,checkedHoverBackground:`{primary.hover.color}`,disabledBackground:`{form.field.disabled.background}`,filledBackground:`{form.field.filled.background}`,borderColor:`{form.field.border.color}`,hoverBorderColor:`{form.field.hover.border.color}`,focusBorderColor:`{form.field.border.color}`,checkedBorderColor:`{primary.color}`,checkedHoverBorderColor:`{primary.hover.color}`,checkedFocusBorderColor:`{primary.color}`,checkedDisabledBorderColor:`{form.field.border.color}`,invalidBorderColor:`{form.field.invalid.border.color}`,shadow:`{form.field.shadow}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`},transitionDuration:`{form.field.transition.duration}`,sm:{width:`1rem`,height:`1rem`},lg:{width:`1.5rem`,height:`1.5rem`}},icon:{size:`0.75rem`,checkedColor:`{primary.contrast.color}`,checkedHoverColor:`{primary.contrast.color}`,disabledColor:`{form.field.disabled.color}`,sm:{size:`0.5rem`},lg:{size:`1rem`}}},Et={root:{gap:`0.25rem`,transitionDuration:`{transition.duration}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},icon:{size:`1rem`,color:`{text.muted.color}`,hoverColor:`{primary.color}`,activeColor:`{primary.color}`}},Dt={colorScheme:{light:{root:{background:`rgba(0,0,0,0.1)`}},dark:{root:{background:`rgba(255,255,255,0.3)`}}}},Ot={root:{transitionDuration:`{transition.duration}`},bar:{size:`9px`,borderRadius:`{border.radius.sm}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},colorScheme:{light:{bar:{background:`{surface.100}`}},dark:{bar:{background:`{surface.800}`}}}},kt={root:{background:`{form.field.background}`,disabledBackground:`{form.field.disabled.background}`,filledBackground:`{form.field.filled.background}`,filledHoverBackground:`{form.field.filled.hover.background}`,filledFocusBackground:`{form.field.filled.focus.background}`,borderColor:`{form.field.border.color}`,hoverBorderColor:`{form.field.hover.border.color}`,focusBorderColor:`{form.field.focus.border.color}`,invalidBorderColor:`{form.field.invalid.border.color}`,color:`{form.field.color}`,disabledColor:`{form.field.disabled.color}`,placeholderColor:`{form.field.placeholder.color}`,invalidPlaceholderColor:`{form.field.invalid.placeholder.color}`,shadow:`{form.field.shadow}`,paddingX:`{form.field.padding.x}`,paddingY:`{form.field.padding.y}`,borderRadius:`{form.field.border.radius}`,focusRing:{width:`{form.field.focus.ring.width}`,style:`{form.field.focus.ring.style}`,color:`{form.field.focus.ring.color}`,offset:`{form.field.focus.ring.offset}`,shadow:`{form.field.focus.ring.shadow}`},transitionDuration:`{form.field.transition.duration}`,sm:{fontSize:`{form.field.sm.font.size}`,paddingX:`{form.field.sm.padding.x}`,paddingY:`{form.field.sm.padding.y}`},lg:{fontSize:`{form.field.lg.font.size}`,paddingX:`{form.field.lg.padding.x}`,paddingY:`{form.field.lg.padding.y}`}},dropdown:{width:`2.5rem`,color:`{form.field.icon.color}`},overlay:{background:`{overlay.select.background}`,borderColor:`{overlay.select.border.color}`,borderRadius:`{overlay.select.border.radius}`,color:`{overlay.select.color}`,shadow:`{overlay.select.shadow}`},list:{padding:`{list.padding}`,gap:`{list.gap}`,header:{padding:`{list.header.padding}`}},option:{focusBackground:`{list.option.focus.background}`,selectedBackground:`{list.option.selected.background}`,selectedFocusBackground:`{list.option.selected.focus.background}`,color:`{list.option.color}`,focusColor:`{list.option.focus.color}`,selectedColor:`{list.option.selected.color}`,selectedFocusColor:`{list.option.selected.focus.color}`,padding:`{list.option.padding}`,borderRadius:`{list.option.border.radius}`},optionGroup:{background:`{list.option.group.background}`,color:`{list.option.group.color}`,fontWeight:`{list.option.group.font.weight}`,padding:`{list.option.group.padding}`},clearIcon:{color:`{form.field.icon.color}`},checkmark:{color:`{list.option.color}`,gutterStart:`-0.375rem`,gutterEnd:`0.375rem`},emptyMessage:{padding:`{list.option.padding}`}},At={root:{borderRadius:`{form.field.border.radius}`},colorScheme:{light:{root:{invalidBorderColor:`{form.field.invalid.border.color}`}},dark:{root:{invalidBorderColor:`{form.field.invalid.border.color}`}}}},jt={root:{borderRadius:`{content.border.radius}`},colorScheme:{light:{root:{background:`{surface.200}`,animationBackground:`rgba(255,255,255,0.4)`}},dark:{root:{background:`rgba(255, 255, 255, 0.06)`,animationBackground:`rgba(255, 255, 255, 0.04)`}}}},Mt={root:{transitionDuration:`{transition.duration}`},track:{background:`{content.border.color}`,borderRadius:`{content.border.radius}`,size:`3px`},range:{background:`{primary.color}`},handle:{width:`20px`,height:`20px`,borderRadius:`50%`,background:`{content.border.color}`,hoverBackground:`{content.border.color}`,content:{borderRadius:`50%`,hoverBackground:`{content.background}`,width:`16px`,height:`16px`,shadow:`0px 0.5px 0px 0px rgba(0, 0, 0, 0.08), 0px 1px 1px 0px rgba(0, 0, 0, 0.14)`},focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},colorScheme:{light:{handle:{content:{background:`{surface.0}`}}},dark:{handle:{content:{background:`{surface.950}`}}}}},Nt={root:{gap:`0.5rem`,transitionDuration:`{transition.duration}`}},Pt={root:{borderRadius:`{form.field.border.radius}`,roundedBorderRadius:`2rem`,raisedShadow:`0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)`}},Ft={root:{background:`{content.background}`,borderColor:`{content.border.color}`,color:`{content.color}`,transitionDuration:`{transition.duration}`},gutter:{background:`{content.border.color}`},handle:{size:`24px`,background:`transparent`,borderRadius:`{content.border.radius}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}}},It={root:{transitionDuration:`{transition.duration}`},separator:{background:`{content.border.color}`,activeBackground:`{primary.color}`,margin:`0 0 0 1.625rem`,size:`2px`},step:{padding:`0.5rem`,gap:`1rem`},stepHeader:{padding:`0`,borderRadius:`{content.border.radius}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`},gap:`0.5rem`},stepTitle:{color:`{text.muted.color}`,activeColor:`{primary.color}`,fontWeight:`500`},stepNumber:{background:`{content.background}`,activeBackground:`{content.background}`,borderColor:`{content.border.color}`,activeBorderColor:`{content.border.color}`,color:`{text.muted.color}`,activeColor:`{primary.color}`,size:`2rem`,fontSize:`1.143rem`,fontWeight:`500`,borderRadius:`50%`,shadow:`0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)`},steppanels:{padding:`0.875rem 0.5rem 1.125rem 0.5rem`},steppanel:{background:`{content.background}`,color:`{content.color}`,padding:`0`,indent:`1rem`}},Lt={root:{transitionDuration:`{transition.duration}`},separator:{background:`{content.border.color}`},itemLink:{borderRadius:`{content.border.radius}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`},gap:`0.5rem`},itemLabel:{color:`{text.muted.color}`,activeColor:`{primary.color}`,fontWeight:`500`},itemNumber:{background:`{content.background}`,activeBackground:`{content.background}`,borderColor:`{content.border.color}`,activeBorderColor:`{content.border.color}`,color:`{text.muted.color}`,activeColor:`{primary.color}`,size:`2rem`,fontSize:`1.143rem`,fontWeight:`500`,borderRadius:`50%`,shadow:`0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)`}},Rt={root:{transitionDuration:`{transition.duration}`},tablist:{borderWidth:`0 0 1px 0`,background:`{content.background}`,borderColor:`{content.border.color}`},item:{background:`transparent`,hoverBackground:`transparent`,activeBackground:`transparent`,borderWidth:`0 0 1px 0`,borderColor:`{content.border.color}`,hoverBorderColor:`{content.border.color}`,activeBorderColor:`{primary.color}`,color:`{text.muted.color}`,hoverColor:`{text.color}`,activeColor:`{primary.color}`,padding:`1rem 1.125rem`,fontWeight:`600`,margin:`0 0 -1px 0`,gap:`0.5rem`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},itemIcon:{color:`{text.muted.color}`,hoverColor:`{text.color}`,activeColor:`{primary.color}`},activeBar:{height:`1px`,bottom:`-1px`,background:`{primary.color}`}},zt={root:{transitionDuration:`{transition.duration}`},tablist:{borderWidth:`0 0 1px 0`,background:`{content.background}`,borderColor:`{content.border.color}`},tab:{background:`transparent`,hoverBackground:`transparent`,activeBackground:`transparent`,borderWidth:`0 0 1px 0`,borderColor:`{content.border.color}`,hoverBorderColor:`{content.border.color}`,activeBorderColor:`{primary.color}`,color:`{text.muted.color}`,hoverColor:`{text.color}`,activeColor:`{primary.color}`,padding:`1rem 1.125rem`,fontWeight:`600`,margin:`0 0 -1px 0`,gap:`0.5rem`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`-1px`,shadow:`{focus.ring.shadow}`}},tabpanel:{background:`{content.background}`,color:`{content.color}`,padding:`0.875rem 1.125rem 1.125rem 1.125rem`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`inset {focus.ring.shadow}`}},navButton:{background:`{content.background}`,color:`{text.muted.color}`,hoverColor:`{text.color}`,width:`2.5rem`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`-1px`,shadow:`{focus.ring.shadow}`}},activeBar:{height:`1px`,bottom:`-1px`,background:`{primary.color}`},colorScheme:{light:{navButton:{shadow:`0px 0px 10px 50px rgba(255, 255, 255, 0.6)`}},dark:{navButton:{shadow:`0px 0px 10px 50px color-mix(in srgb, {content.background}, transparent 50%)`}}}},Bt={root:{transitionDuration:`{transition.duration}`},tabList:{background:`{content.background}`,borderColor:`{content.border.color}`},tab:{borderColor:`{content.border.color}`,activeBorderColor:`{primary.color}`,color:`{text.muted.color}`,hoverColor:`{text.color}`,activeColor:`{primary.color}`},tabPanel:{background:`{content.background}`,color:`{content.color}`},navButton:{background:`{content.background}`,color:`{text.muted.color}`,hoverColor:`{text.color}`},colorScheme:{light:{navButton:{shadow:`0px 0px 10px 50px rgba(255, 255, 255, 0.6)`}},dark:{navButton:{shadow:`0px 0px 10px 50px color-mix(in srgb, {content.background}, transparent 50%)`}}}},Vt={root:{fontSize:`0.875rem`,fontWeight:`700`,padding:`0.25rem 0.5rem`,gap:`0.25rem`,borderRadius:`{content.border.radius}`,roundedBorderRadius:`{border.radius.xl}`},icon:{size:`0.75rem`},colorScheme:{light:{primary:{background:`{primary.100}`,color:`{primary.700}`},secondary:{background:`{surface.100}`,color:`{surface.600}`},success:{background:`{green.100}`,color:`{green.700}`},info:{background:`{sky.100}`,color:`{sky.700}`},warn:{background:`{orange.100}`,color:`{orange.700}`},danger:{background:`{red.100}`,color:`{red.700}`},contrast:{background:`{surface.950}`,color:`{surface.0}`}},dark:{primary:{background:`color-mix(in srgb, {primary.500}, transparent 84%)`,color:`{primary.300}`},secondary:{background:`{surface.800}`,color:`{surface.300}`},success:{background:`color-mix(in srgb, {green.500}, transparent 84%)`,color:`{green.300}`},info:{background:`color-mix(in srgb, {sky.500}, transparent 84%)`,color:`{sky.300}`},warn:{background:`color-mix(in srgb, {orange.500}, transparent 84%)`,color:`{orange.300}`},danger:{background:`color-mix(in srgb, {red.500}, transparent 84%)`,color:`{red.300}`},contrast:{background:`{surface.0}`,color:`{surface.950}`}}}},Ht={root:{background:`{form.field.background}`,borderColor:`{form.field.border.color}`,color:`{form.field.color}`,height:`18rem`,padding:`{form.field.padding.y} {form.field.padding.x}`,borderRadius:`{form.field.border.radius}`},prompt:{gap:`0.25rem`},commandResponse:{margin:`2px 0`}},Ut={root:{background:`{form.field.background}`,disabledBackground:`{form.field.disabled.background}`,filledBackground:`{form.field.filled.background}`,filledHoverBackground:`{form.field.filled.hover.background}`,filledFocusBackground:`{form.field.filled.focus.background}`,borderColor:`{form.field.border.color}`,hoverBorderColor:`{form.field.hover.border.color}`,focusBorderColor:`{form.field.focus.border.color}`,invalidBorderColor:`{form.field.invalid.border.color}`,color:`{form.field.color}`,disabledColor:`{form.field.disabled.color}`,placeholderColor:`{form.field.placeholder.color}`,invalidPlaceholderColor:`{form.field.invalid.placeholder.color}`,shadow:`{form.field.shadow}`,paddingX:`{form.field.padding.x}`,paddingY:`{form.field.padding.y}`,borderRadius:`{form.field.border.radius}`,focusRing:{width:`{form.field.focus.ring.width}`,style:`{form.field.focus.ring.style}`,color:`{form.field.focus.ring.color}`,offset:`{form.field.focus.ring.offset}`,shadow:`{form.field.focus.ring.shadow}`},transitionDuration:`{form.field.transition.duration}`,sm:{fontSize:`{form.field.sm.font.size}`,paddingX:`{form.field.sm.padding.x}`,paddingY:`{form.field.sm.padding.y}`},lg:{fontSize:`{form.field.lg.font.size}`,paddingX:`{form.field.lg.padding.x}`,paddingY:`{form.field.lg.padding.y}`}}},Wt={root:{background:`{content.background}`,borderColor:`{content.border.color}`,color:`{content.color}`,borderRadius:`{content.border.radius}`,shadow:`{overlay.navigation.shadow}`,transitionDuration:`{transition.duration}`},list:{padding:`{navigation.list.padding}`,gap:`{navigation.list.gap}`},item:{focusBackground:`{navigation.item.focus.background}`,activeBackground:`{navigation.item.active.background}`,color:`{navigation.item.color}`,focusColor:`{navigation.item.focus.color}`,activeColor:`{navigation.item.active.color}`,padding:`{navigation.item.padding}`,borderRadius:`{navigation.item.border.radius}`,gap:`{navigation.item.gap}`,icon:{color:`{navigation.item.icon.color}`,focusColor:`{navigation.item.icon.focus.color}`,activeColor:`{navigation.item.icon.active.color}`}},submenu:{mobileIndent:`1rem`},submenuIcon:{size:`{navigation.submenu.icon.size}`,color:`{navigation.submenu.icon.color}`,focusColor:`{navigation.submenu.icon.focus.color}`,activeColor:`{navigation.submenu.icon.active.color}`},separator:{borderColor:`{content.border.color}`}},Gt={event:{minHeight:`5rem`},horizontal:{eventContent:{padding:`1rem 0`}},vertical:{eventContent:{padding:`0 1rem`}},eventMarker:{size:`1.125rem`,borderRadius:`50%`,borderWidth:`2px`,background:`{content.background}`,borderColor:`{content.border.color}`,content:{borderRadius:`50%`,size:`0.375rem`,background:`{primary.color}`,insetShadow:`0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)`}},eventConnector:{color:`{content.border.color}`,size:`2px`}},Kt={root:{width:`25rem`,borderRadius:`{content.border.radius}`,borderWidth:`1px`,transitionDuration:`{transition.duration}`},icon:{size:`1.125rem`},content:{padding:`{overlay.popover.padding}`,gap:`0.5rem`},text:{gap:`0.5rem`},summary:{fontWeight:`500`,fontSize:`1rem`},detail:{fontWeight:`500`,fontSize:`0.875rem`},closeButton:{width:`1.75rem`,height:`1.75rem`,borderRadius:`50%`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,offset:`{focus.ring.offset}`}},closeIcon:{size:`1rem`},colorScheme:{light:{root:{blur:`1.5px`},info:{background:`color-mix(in srgb, {blue.50}, transparent 5%)`,borderColor:`{blue.200}`,color:`{blue.600}`,detailColor:`{surface.700}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)`,closeButton:{hoverBackground:`{blue.100}`,focusRing:{color:`{blue.600}`,shadow:`none`}}},success:{background:`color-mix(in srgb, {green.50}, transparent 5%)`,borderColor:`{green.200}`,color:`{green.600}`,detailColor:`{surface.700}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)`,closeButton:{hoverBackground:`{green.100}`,focusRing:{color:`{green.600}`,shadow:`none`}}},warn:{background:`color-mix(in srgb,{yellow.50}, transparent 5%)`,borderColor:`{yellow.200}`,color:`{yellow.600}`,detailColor:`{surface.700}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)`,closeButton:{hoverBackground:`{yellow.100}`,focusRing:{color:`{yellow.600}`,shadow:`none`}}},error:{background:`color-mix(in srgb, {red.50}, transparent 5%)`,borderColor:`{red.200}`,color:`{red.600}`,detailColor:`{surface.700}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)`,closeButton:{hoverBackground:`{red.100}`,focusRing:{color:`{red.600}`,shadow:`none`}}},secondary:{background:`{surface.100}`,borderColor:`{surface.200}`,color:`{surface.600}`,detailColor:`{surface.700}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)`,closeButton:{hoverBackground:`{surface.200}`,focusRing:{color:`{surface.600}`,shadow:`none`}}},contrast:{background:`{surface.900}`,borderColor:`{surface.950}`,color:`{surface.50}`,detailColor:`{surface.0}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)`,closeButton:{hoverBackground:`{surface.800}`,focusRing:{color:`{surface.50}`,shadow:`none`}}}},dark:{root:{blur:`10px`},info:{background:`color-mix(in srgb, {blue.500}, transparent 84%)`,borderColor:`color-mix(in srgb, {blue.700}, transparent 64%)`,color:`{blue.500}`,detailColor:`{surface.0}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)`,closeButton:{hoverBackground:`rgba(255, 255, 255, 0.05)`,focusRing:{color:`{blue.500}`,shadow:`none`}}},success:{background:`color-mix(in srgb, {green.500}, transparent 84%)`,borderColor:`color-mix(in srgb, {green.700}, transparent 64%)`,color:`{green.500}`,detailColor:`{surface.0}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)`,closeButton:{hoverBackground:`rgba(255, 255, 255, 0.05)`,focusRing:{color:`{green.500}`,shadow:`none`}}},warn:{background:`color-mix(in srgb, {yellow.500}, transparent 84%)`,borderColor:`color-mix(in srgb, {yellow.700}, transparent 64%)`,color:`{yellow.500}`,detailColor:`{surface.0}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)`,closeButton:{hoverBackground:`rgba(255, 255, 255, 0.05)`,focusRing:{color:`{yellow.500}`,shadow:`none`}}},error:{background:`color-mix(in srgb, {red.500}, transparent 84%)`,borderColor:`color-mix(in srgb, {red.700}, transparent 64%)`,color:`{red.500}`,detailColor:`{surface.0}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)`,closeButton:{hoverBackground:`rgba(255, 255, 255, 0.05)`,focusRing:{color:`{red.500}`,shadow:`none`}}},secondary:{background:`{surface.800}`,borderColor:`{surface.700}`,color:`{surface.300}`,detailColor:`{surface.0}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)`,closeButton:{hoverBackground:`{surface.700}`,focusRing:{color:`{surface.300}`,shadow:`none`}}},contrast:{background:`{surface.0}`,borderColor:`{surface.100}`,color:`{surface.950}`,detailColor:`{surface.950}`,shadow:`0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)`,closeButton:{hoverBackground:`{surface.100}`,focusRing:{color:`{surface.950}`,shadow:`none`}}}}}},qt={root:{padding:`0.25rem`,borderRadius:`{content.border.radius}`,gap:`0.5rem`,fontWeight:`500`,disabledBackground:`{form.field.disabled.background}`,disabledBorderColor:`{form.field.disabled.background}`,disabledColor:`{form.field.disabled.color}`,invalidBorderColor:`{form.field.invalid.border.color}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`},transitionDuration:`{form.field.transition.duration}`,sm:{fontSize:`{form.field.sm.font.size}`,padding:`0.25rem`},lg:{fontSize:`{form.field.lg.font.size}`,padding:`0.25rem`}},icon:{disabledColor:`{form.field.disabled.color}`},content:{padding:`0.25rem 0.75rem`,borderRadius:`{content.border.radius}`,checkedShadow:`0px 1px 2px 0px rgba(0, 0, 0, 0.02), 0px 1px 2px 0px rgba(0, 0, 0, 0.04)`,sm:{padding:`0.25rem 0.75rem`},lg:{padding:`0.25rem 0.75rem`}},colorScheme:{light:{root:{background:`{surface.100}`,checkedBackground:`{surface.100}`,hoverBackground:`{surface.100}`,borderColor:`{surface.100}`,color:`{surface.500}`,hoverColor:`{surface.700}`,checkedColor:`{surface.900}`,checkedBorderColor:`{surface.100}`},content:{checkedBackground:`{surface.0}`},icon:{color:`{surface.500}`,hoverColor:`{surface.700}`,checkedColor:`{surface.900}`}},dark:{root:{background:`{surface.950}`,checkedBackground:`{surface.950}`,hoverBackground:`{surface.950}`,borderColor:`{surface.950}`,color:`{surface.400}`,hoverColor:`{surface.300}`,checkedColor:`{surface.0}`,checkedBorderColor:`{surface.950}`},content:{checkedBackground:`{surface.800}`},icon:{color:`{surface.400}`,hoverColor:`{surface.300}`,checkedColor:`{surface.0}`}}}},Jt={root:{width:`2.5rem`,height:`1.5rem`,borderRadius:`30px`,gap:`0.25rem`,shadow:`{form.field.shadow}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`},borderWidth:`1px`,borderColor:`transparent`,hoverBorderColor:`transparent`,checkedBorderColor:`transparent`,checkedHoverBorderColor:`transparent`,invalidBorderColor:`{form.field.invalid.border.color}`,transitionDuration:`{form.field.transition.duration}`,slideDuration:`0.2s`},handle:{borderRadius:`50%`,size:`1rem`},colorScheme:{light:{root:{background:`{surface.300}`,disabledBackground:`{form.field.disabled.background}`,hoverBackground:`{surface.400}`,checkedBackground:`{primary.color}`,checkedHoverBackground:`{primary.hover.color}`},handle:{background:`{surface.0}`,disabledBackground:`{form.field.disabled.color}`,hoverBackground:`{surface.0}`,checkedBackground:`{surface.0}`,checkedHoverBackground:`{surface.0}`,color:`{text.muted.color}`,hoverColor:`{text.color}`,checkedColor:`{primary.color}`,checkedHoverColor:`{primary.hover.color}`}},dark:{root:{background:`{surface.700}`,disabledBackground:`{surface.600}`,hoverBackground:`{surface.600}`,checkedBackground:`{primary.color}`,checkedHoverBackground:`{primary.hover.color}`},handle:{background:`{surface.400}`,disabledBackground:`{surface.900}`,hoverBackground:`{surface.300}`,checkedBackground:`{surface.900}`,checkedHoverBackground:`{surface.900}`,color:`{surface.900}`,hoverColor:`{surface.800}`,checkedColor:`{primary.color}`,checkedHoverColor:`{primary.hover.color}`}}}},Yt={root:{background:`{content.background}`,borderColor:`{content.border.color}`,borderRadius:`{content.border.radius}`,color:`{content.color}`,gap:`0.5rem`,padding:`0.75rem`}},Xt={root:{maxWidth:`12.5rem`,gutter:`0.25rem`,shadow:`{overlay.popover.shadow}`,padding:`0.5rem 0.75rem`,borderRadius:`{overlay.popover.border.radius}`},colorScheme:{light:{root:{background:`{surface.700}`,color:`{surface.0}`}},dark:{root:{background:`{surface.700}`,color:`{surface.0}`}}}},Zt={root:{background:`{content.background}`,color:`{content.color}`,padding:`1rem`,gap:`2px`,indent:`1rem`,transitionDuration:`{transition.duration}`},node:{padding:`0.25rem 0.5rem`,borderRadius:`{content.border.radius}`,hoverBackground:`{content.hover.background}`,selectedBackground:`{highlight.background}`,color:`{text.color}`,hoverColor:`{text.hover.color}`,selectedColor:`{highlight.color}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`-1px`,shadow:`{focus.ring.shadow}`},gap:`0.25rem`},nodeIcon:{color:`{text.muted.color}`,hoverColor:`{text.hover.muted.color}`,selectedColor:`{highlight.color}`},nodeToggleButton:{borderRadius:`50%`,size:`1.75rem`,hoverBackground:`{content.hover.background}`,selectedHoverBackground:`{content.background}`,color:`{text.muted.color}`,hoverColor:`{text.hover.muted.color}`,selectedHoverColor:`{primary.color}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},loadingIcon:{size:`2rem`},filter:{margin:`0 0 0.5rem 0`},css:`
|
|
30
|
+
.p-tree-mask.p-overlay-mask {
|
|
31
|
+
--px-mask-background: light-dark(rgba(255,255,255,0.5),rgba(0,0,0,0.3));
|
|
32
|
+
}
|
|
33
|
+
`},Qt={root:{background:`{form.field.background}`,disabledBackground:`{form.field.disabled.background}`,filledBackground:`{form.field.filled.background}`,filledHoverBackground:`{form.field.filled.hover.background}`,filledFocusBackground:`{form.field.filled.focus.background}`,borderColor:`{form.field.border.color}`,hoverBorderColor:`{form.field.hover.border.color}`,focusBorderColor:`{form.field.focus.border.color}`,invalidBorderColor:`{form.field.invalid.border.color}`,color:`{form.field.color}`,disabledColor:`{form.field.disabled.color}`,placeholderColor:`{form.field.placeholder.color}`,invalidPlaceholderColor:`{form.field.invalid.placeholder.color}`,shadow:`{form.field.shadow}`,paddingX:`{form.field.padding.x}`,paddingY:`{form.field.padding.y}`,borderRadius:`{form.field.border.radius}`,focusRing:{width:`{form.field.focus.ring.width}`,style:`{form.field.focus.ring.style}`,color:`{form.field.focus.ring.color}`,offset:`{form.field.focus.ring.offset}`,shadow:`{form.field.focus.ring.shadow}`},transitionDuration:`{form.field.transition.duration}`,sm:{fontSize:`{form.field.sm.font.size}`,paddingX:`{form.field.sm.padding.x}`,paddingY:`{form.field.sm.padding.y}`},lg:{fontSize:`{form.field.lg.font.size}`,paddingX:`{form.field.lg.padding.x}`,paddingY:`{form.field.lg.padding.y}`}},dropdown:{width:`2.5rem`,color:`{form.field.icon.color}`},overlay:{background:`{overlay.select.background}`,borderColor:`{overlay.select.border.color}`,borderRadius:`{overlay.select.border.radius}`,color:`{overlay.select.color}`,shadow:`{overlay.select.shadow}`},tree:{padding:`{list.padding}`},emptyMessage:{padding:`{list.option.padding}`},chip:{borderRadius:`{border.radius.sm}`},clearIcon:{color:`{form.field.icon.color}`}},$t={root:{transitionDuration:`{transition.duration}`},header:{background:`{content.background}`,borderColor:`{treetable.border.color}`,color:`{content.color}`,borderWidth:`0 0 1px 0`,padding:`0.75rem 1rem`},headerCell:{background:`{content.background}`,hoverBackground:`{content.hover.background}`,selectedBackground:`{highlight.background}`,borderColor:`{treetable.border.color}`,color:`{content.color}`,hoverColor:`{content.hover.color}`,selectedColor:`{highlight.color}`,gap:`0.5rem`,padding:`0.75rem 1rem`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`-1px`,shadow:`{focus.ring.shadow}`}},columnTitle:{fontWeight:`600`},row:{background:`{content.background}`,hoverBackground:`{content.hover.background}`,selectedBackground:`{highlight.background}`,color:`{content.color}`,hoverColor:`{content.hover.color}`,selectedColor:`{highlight.color}`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`-1px`,shadow:`{focus.ring.shadow}`}},bodyCell:{borderColor:`{treetable.border.color}`,padding:`0.75rem 1rem`,gap:`0.5rem`},footerCell:{background:`{content.background}`,borderColor:`{treetable.border.color}`,color:`{content.color}`,padding:`0.75rem 1rem`},columnFooter:{fontWeight:`600`},footer:{background:`{content.background}`,borderColor:`{treetable.border.color}`,color:`{content.color}`,borderWidth:`0 0 1px 0`,padding:`0.75rem 1rem`},columnResizer:{width:`0.5rem`},resizeIndicator:{width:`1px`,color:`{primary.color}`},sortIcon:{color:`{text.muted.color}`,hoverColor:`{text.hover.muted.color}`,size:`0.875rem`},loadingIcon:{size:`2rem`},nodeToggleButton:{hoverBackground:`{content.hover.background}`,selectedHoverBackground:`{content.background}`,color:`{text.muted.color}`,hoverColor:`{text.color}`,selectedHoverColor:`{primary.color}`,size:`1.75rem`,borderRadius:`50%`,focusRing:{width:`{focus.ring.width}`,style:`{focus.ring.style}`,color:`{focus.ring.color}`,offset:`{focus.ring.offset}`,shadow:`{focus.ring.shadow}`}},paginatorTop:{borderColor:`{content.border.color}`,borderWidth:`0 0 1px 0`},paginatorBottom:{borderColor:`{content.border.color}`,borderWidth:`0 0 1px 0`},colorScheme:{light:{root:{borderColor:`{content.border.color}`},bodyCell:{selectedBorderColor:`{primary.100}`}},dark:{root:{borderColor:`{surface.800}`},bodyCell:{selectedBorderColor:`{primary.900}`}}},css:`
|
|
34
|
+
.p-treetable-mask.p-overlay-mask {
|
|
35
|
+
--px-mask-background: light-dark(rgba(255,255,255,0.5),rgba(0,0,0,0.3));
|
|
36
|
+
}
|
|
37
|
+
`},en={loader:{mask:{background:`{content.background}`,color:`{text.muted.color}`},icon:{size:`2rem`}}},tn=Object.defineProperty,nn=Object.defineProperties,rn=Object.getOwnPropertyDescriptors,an=Object.getOwnPropertySymbols,on=Object.prototype.hasOwnProperty,sn=Object.prototype.propertyIsEnumerable,cn=(e,t,n)=>t in e?tn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ln,un=(ln=((e,t)=>{for(var n in t||={})on.call(t,n)&&cn(e,n,t[n]);if(an)for(var n of an(t))sn.call(t,n)&&cn(e,n,t[n]);return e})({},Ce),nn(ln,rn({components:{accordion:ye,autocomplete:be,avatar:xe,badge:Se,blockui:we,breadcrumb:Te,button:Ee,card:De,carousel:Oe,cascadeselect:ke,checkbox:Ae,chip:je,colorpicker:Me,confirmdialog:Ne,confirmpopup:Pe,contextmenu:Fe,datatable:Le,dataview:Re,datepicker:ze,dialog:Be,divider:Ve,dock:He,drawer:Ue,editor:We,fieldset:Ge,fileupload:Ke,floatlabel:qe,galleria:Je,iconfield:Ye,iftalabel:Xe,image:Ze,imagecompare:Qe,inlinemessage:$e,inplace:et,inputchips:tt,inputgroup:nt,inputnumber:rt,inputotp:it,inputtext:at,knob:ot,listbox:st,megamenu:ct,menu:lt,menubar:ut,message:dt,metergroup:ft,multiselect:pt,orderlist:mt,organizationchart:ht,overlaybadge:gt,paginator:_t,panel:vt,panelmenu:yt,password:bt,picklist:xt,popover:St,progressbar:Ct,progressspinner:wt,radiobutton:Tt,rating:Et,ripple:Dt,scrollpanel:Ot,select:kt,selectbutton:At,skeleton:jt,slider:Mt,speeddial:Nt,splitbutton:Pt,splitter:Ft,stepper:It,steps:Lt,tabmenu:Rt,tabs:zt,tabview:Bt,tag:Vt,terminal:Ht,textarea:Ut,tieredmenu:Wt,timeline:Gt,toast:Kt,togglebutton:qt,toggleswitch:Jt,toolbar:Yt,tooltip:Xt,tree:Zt,treeselect:Qt,treetable:$t,virtualscroller:en},css:Ie}))),dn=`/admin/`.replace(/\/$/,``)+`/api`;async function R(e,t){let n=sessionStorage.getItem(`gazetta_token`),r={"Content-Type":`application/json`};n&&(r.Authorization=`Bearer ${n}`);let i=await fetch(`${dn}${e}`,{...t,headers:{...r,...t?.headers}});if(!i.ok){let e=await i.json().catch(()=>({error:i.statusText}));throw Error(e.error??`Request failed: ${i.status}`)}return i.json()}var z={getSite:()=>R(`/site`),getPages:()=>R(`/pages`),getPage:(e,t)=>R(`/pages/${e}`,t),createPage:e=>R(`/pages`,{method:`POST`,body:JSON.stringify(e)}),deletePage:e=>R(`/pages/${e}`,{method:`DELETE`}),updatePage:(e,t)=>R(`/pages/${e}`,{method:`PUT`,body:JSON.stringify(t)}),getFragments:()=>R(`/fragments`),getFragment:(e,t)=>R(`/fragments/${e}`,t),createFragment:e=>R(`/fragments`,{method:`POST`,body:JSON.stringify(e)}),deleteFragment:e=>R(`/fragments/${e}`,{method:`DELETE`}),updateFragment:(e,t)=>R(`/fragments/${e}`,{method:`PUT`,body:JSON.stringify(t)}),getTemplates:()=>R(`/templates`),getTemplateSchema:e=>R(`/templates/${e}/schema`),getFields:()=>R(`/fields`),getTargets:()=>R(`/targets`),publish:(e,t)=>R(`/publish`,{method:`POST`,body:JSON.stringify({items:e,targets:t})}),compare:(e,t)=>R(`/compare?target=${encodeURIComponent(e)}`,t),fetchFromTarget:(e,t)=>R(`/fetch`,{method:`POST`,body:JSON.stringify({source:e,items:t})})},fn=L(`site`,()=>{let e=p(null),t=p([]),n=p([]),r=p(!1),i=p(null),a=null;async function o(){if(!(e.value&&!i.value))return a||s()}async function s(e=5){return a||(a=c(e),a)}async function c(o=5){r.value=!0,i.value=null;for(let a=0;a<=o;a++)try{let[i,a,o]=await Promise.all([z.getSite(),z.getPages(),z.getFragments()]);e.value=i,t.value=a,n.value=o,r.value=!1;return}catch(e){let t=e.message;if(a<o&&(t.includes(`502`)||t.includes(`Failed to fetch`)||t.includes(`not ready`))){await new Promise(e=>setTimeout(e,1e3));continue}i.value=t}r.value=!1,a=null}return{manifest:e,pages:t,fragments:n,loading:r,error:i,load:s,ensureLoaded:o}}),pn=L(`theme`,()=>{let e=p(!0);function t(){let t=localStorage.getItem(`gazetta_theme`);e.value=t?t===`dark`:!0,r()}function n(){e.value=!e.value,localStorage.setItem(`gazetta_theme`,e.value?`dark`:`light`),r()}function r(){document.documentElement.classList.toggle(`dark`,e.value)}return{dark:e,init:t,toggle:n}}),mn=L(`toast`,()=>{let e=p(null);function t(t,n){e.value={message:t,type:n?.type??`success`,link:n?.link},setTimeout(()=>{e.value=null},n?.duration??3e3)}function n(e,n){t((e instanceof Error?e.message:n).replace(/^Request failed: (\d+)$/,`Server error ($1)`).replace(/^Failed to fetch$/,`Cannot connect to server`),{type:`error`})}return{current:e,show:t,showError:n}}),hn=L(`preview`,()=>{let e=p(0),t=p(0);function n(){e.value++}function r(){t.value++}return{version:e,draftVersion:t,invalidate:n,invalidateDraft:r}}),gn=L(`selection`,()=>{let e=mn(),t=p(null),n=p(null),r=null,i=w(()=>t.value?.type??null),a=w(()=>t.value?.name??null),o=w(()=>t.value?.detail??null),s=w(()=>fn().pages.filter(e=>!e.route.includes(`:`))),c=w(()=>t.value?.type===`page`?t.value.detail.route:t.value?.type===`fragment`?n.value?n.value.route:`/@${t.value.name}`:null);function l(){let e=s.value;n.value=e.find(e=>e.route===`/`)??e[0]??null}function u(e){let t=s.value.find(t=>t.name===e);t&&(n.value=t,hn().invalidate())}async function d(i){r?.abort(),r=new AbortController;let{signal:a}=r;try{t.value={type:`page`,name:i,detail:await z.getPage(i,{signal:a})},n.value=null,hn().invalidate()}catch(t){if(t.name===`AbortError`)return;e.showError(t,`Failed to load page "${i}"`)}}async function f(i){r?.abort(),r=new AbortController;let{signal:a}=r;try{t.value={type:`fragment`,name:i,detail:await z.getFragment(i,{signal:a})},n.value||l(),hn().invalidate()}catch(t){if(t.name===`AbortError`)return;e.showError(t,`Failed to load fragment "${i}"`)}}async function m(){if(t.value)try{if(t.value.type===`page`){let e=await z.getPage(t.value.name);t.value={type:`page`,name:t.value.name,detail:e}}else{let e=await z.getFragment(t.value.name);t.value={type:`fragment`,name:t.value.name,detail:e}}}catch(t){e.showError(t,`Failed to reload`)}}async function h(n){if(t.value)try{t.value.type===`page`?await z.updatePage(t.value.name,{components:n}):await z.updateFragment(t.value.name,{components:n}),await m(),hn().invalidate()}catch(t){e.showError(t,`Failed to update components`)}}return{selection:t,type:i,name:a,detail:o,previewRoute:c,fragmentHostPage:n,staticPages:s,selectPage:d,selectFragment:f,setFragmentHostPage:u,reload:m,updateComponents:h}}),_n=`modulepreload`,vn=function(e){return`/admin/`+e},yn={},bn=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=vn(t,n),t in yn)return;yn[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:_n,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};function xn(e){return JSON.parse(JSON.stringify(e))}var Sn=L(`editing`,()=>{let e=mn(),t=p(null),n=p(null),r=p(null),i=p(!1),o=p(null),s=p(null),c=p(0),l=p(null),u=null,d=a(new Map),f=w(()=>t.value?.template??null),m=w(()=>t.value?.path??null),h=w(()=>t.value?.schema??null),g=w(()=>!n.value||!r.value?!1:JSON.stringify(n.value)!==JSON.stringify(r.value)),_=w(()=>d.size+ +!!g.value),v=w(()=>_.value>0),y=w(()=>{let e={};for(let[t,n]of d)e[t]=n.editedContent;return m.value&&n.value&&g.value&&(e[m.value]=n.value),e});function b(e){return d.has(e)}function x(){u&&=(clearInterval(u),null)}function S(){g.value&&t.value&&n.value&&d.set(t.value.path,{target:t.value,editedContent:xn(n.value)})}async function C(e){let{hasEditor:t,editorUrl:n,fieldsBaseUrl:r,...i}=await z.getTemplateSchema(e);return{schema:i,hasEditor:!!t,editorUrl:n,fieldsBaseUrl:r}}async function T(e,a){if(x(),s.value=null,t.value=e,n.value=xn(a||e.content),r.value=xn(e.content),i.value=!1,o.value=null,l.value=null,e.hasEditor&&e.editorUrl)try{let t=await bn(()=>import(e.editorUrl),[]);l.value=t.default??t}catch(t){console.warn(`Custom editor for "${e.template}" failed to load:`,t)}c.value++,hn().invalidateDraft()}function E(e){return async t=>{let n=gn(),r=n.detail;if(!r||!n.selection)return;let i=xn(r.components??[]),a=e.split(`/`),o=i;for(let e=0;e<a.length;e++){let n=o.findIndex(t=>typeof t==`object`&&t.name===a[e]);if(n===-1)return;let r=o[n];e===a.length-1?r.content=t:o=r.components??[]}n.selection.type===`page`?await z.updatePage(n.selection.name,{components:i}):await z.updateFragment(n.selection.name,{components:i})}}function D(e){let t=gn().detail;if(!t?.components)return null;let n=e.split(`/`),r=t.components;for(let e=0;e<n.length;e++){let t=r.find(t=>typeof t==`object`&&t.name===n[e]);if(!t||typeof t==`string`)return null;if(e===n.length-1)return{template:t.template,content:t.content??{}};r=t.components??[]}return null}async function O(e,n){x(),S();let r=d.get(e);if(r){d.delete(e),await T(r.target,r.editedContent);return}try{let t=D(e);if(!t)throw Error(`Component "${e}" not found in page manifest`);let{schema:r,hasEditor:i,editorUrl:a,fieldsBaseUrl:o}=await C(n);await T({template:n,path:e,content:t.content,schema:r,hasEditor:i,editorUrl:a,fieldsBaseUrl:o,save:E(e)})}catch(r){t.value=null,s.value=`Failed to load "${n}": ${r.message}`,u=setInterval(()=>O(e,n),3e3)}}async function k(){x(),S();let e=gn(),n=e.detail,r=e.selection;if(!n||!r)return;let i=`_root`,a=d.get(i);if(a){d.delete(i),await T(a.target,a.editedContent);return}try{let e=n.content??{},{schema:t,hasEditor:a,editorUrl:o,fieldsBaseUrl:s}=await C(n.template),c=r.type===`page`?e=>z.updatePage(r.name,{content:e}).then(()=>{}):e=>z.updateFragment(r.name,{content:e}).then(()=>{});await T({template:n.template,path:i,content:e,schema:t,hasEditor:a,editorUrl:o,fieldsBaseUrl:s,save:c})}catch(e){t.value=null,s.value=`Failed to load "${n.template}": ${e.message}`,u=setInterval(()=>k(),3e3)}}async function ee(e){x(),S();let n=`@${e}`,r=d.get(n);if(r){d.delete(n),await T(r.target,r.editedContent);return}try{let t=await z.getFragment(e),r=t.content??{},{schema:i,hasEditor:a,editorUrl:o,fieldsBaseUrl:s}=await C(t.template);await T({template:t.template,path:n,content:r,schema:i,hasEditor:a,editorUrl:o,fieldsBaseUrl:s,save:t=>z.updateFragment(e,{content:t}).then(()=>{})})}catch(n){t.value=null,s.value=`Failed to load fragment "${e}": ${n.message}`,u=setInterval(()=>ee(e),3e3)}}function A(){x(),s.value=null,t.value=null,n.value=null,r.value=null,i.value=!1,o.value=null,d.clear()}typeof window<`u`&&window.addEventListener(`beforeunload`,e=>{v.value&&(e.preventDefault(),e.returnValue=``)});function j(e){n.value=e,hn().invalidateDraft()}function M(e){d.delete(e),hn().invalidateDraft()}function N(){!t.value||!r.value||(n.value=xn(r.value),c.value++,hn().invalidateDraft())}async function te(){if(!(!t.value&&d.size===0)){i.value=!0,o.value=null;try{t.value&&n.value&&(await t.value.save(n.value),r.value=xn(n.value));for(let e of d.values())await e.target.save(e.editedContent);d.clear(),hn().invalidate(),e.show(`Saved`)}catch(t){o.value=t.message,e.showError(t,`Failed to save`)}finally{i.value=!1}}}return{target:t,content:n,saved:r,saving:i,lastSaveError:o,template:f,path:m,schema:h,dirty:g,loadError:s,mountVersion:c,customEditorMount:l,pendingEdits:d,pendingCount:_,hasPendingEdits:v,allOverrides:y,open:T,openComponent:O,openPageRoot:k,openFragment:ee,clear:A,markDirty:j,discard:N,revertStashed:M,save:te,hasPendingEdit:b}}),Cn=L(`componentFocus`,()=>{let e=p(null),t=p(null),n=p(null),r=p(null);function i(t){e.value=t}function a(e){t.value=e}function o(e){n.value=e}function s(e){r.value=e}function c(){r.value=null}return{highlightGzId:e,previewHoverGzId:t,selectedGzId:n,pendingGzId:r,highlight:i,previewHover:a,select:o,setPending:s,clearPending:c}}),wn=L(`uiMode`,()=>{let e=p(`browse`),t=`browse`;function n(){e.value=`edit`}function r(){Sn().clear();let t=Cn();t.select(null),t.clearPending(),e.value=`browse`}function i(){e.value===`fullscreen`?e.value=t:(t=e.value,e.value=`fullscreen`)}return{mode:e,enterEdit:n,enterBrowse:r,toggleFullscreen:i}}),Tn={class:`publish-content`},En={class:`publish-item`,"data-testid":`publish-current-item`},Dn={key:0,class:`publish-empty`},On={class:`publish-targets`},kn=[`for`],An={key:0,class:`publish-warning`,"data-testid":`publish-compare-error`},jn={key:1,class:`publish-firstpublish`,"data-testid":`publish-first-publish`},Mn={key:2,class:`publish-changes`},Nn={class:`publish-label`},Pn={key:0,class:`publish-label-hint`},Fn={key:1,class:`publish-label-hint`},In={key:0,class:`publish-nochanges`},Ln={key:1,class:`publish-changes-list`},Rn=[`data-testid`],zn={class:`publish-change-label`},Bn={key:2,class:`publish-results`},Vn={class:`result-target`},Hn={key:0,class:`result-detail`},Un={key:1,class:`result-detail`},Wn=f({__name:`PublishDialog`,props:{visible:{type:Boolean},itemType:{},itemName:{}},emits:[`close`],setup(e,{emit:t}){let r=e,a=t,o=w(()=>`${r.itemType}/${r.itemName}`),c=p([]),f=p([]),g=p(!1),x=p(null),S=p(new Map),T=p(new Map),D=p(new Set),k=new Map,A=p(new Set([o.value]));l(async()=>{try{c.value=await z.getTargets()}catch{c.value=[]}}),E(()=>j());function j(){for(let e of k.values())e.abort();k.clear()}u(f,(e,t)=>{let n=e.filter(e=>!t?.includes(e)),r=(t??[]).filter(t=>!e.includes(t));for(let e of r)k.get(e)?.abort(),k.delete(e),D.value.delete(e),S.value.delete(e),T.value.delete(e);for(let e of n){let t=new AbortController;k.set(e,t),D.value.add(e),T.value.delete(e),z.compare(e,{signal:t.signal}).then(n=>{t.signal.aborted||(S.value.set(e,n),D.value.delete(e),S.value=new Map(S.value),D.value=new Set(D.value))}).catch(n=>{t.signal.aborted||n.name===`AbortError`||(T.value.set(e,n.message),D.value.delete(e),T.value=new Map(T.value),D.value=new Set(D.value))})}});let N=w(()=>{let e=new Map;for(let t of f.value){let n=S.value.get(t);if(n){for(let t of n.added)e.set(t,{path:t,change:`added`});for(let t of n.modified)e.has(t)||e.set(t,{path:t,change:`modified`})}}return[...e.values()].sort((e,t)=>e.path.localeCompare(t.path))}),te=w(()=>D.value.size>0),ne=w(()=>S.value.size>0),re=w(()=>{for(let e of f.value)if(S.value.get(e)?.firstPublish)return!0;return!1}),ie=w(()=>{for(let e of f.value){let t=T.value.get(e);if(t)return t}return null});u(N,e=>{let t=new Set(e.map(e=>e.path)),n=new Set;for(let e of A.value)(t.has(e)||e===o.value)&&n.add(e);n.add(o.value),A.value=n});function L(e){let t=new Set(A.value);t.has(e)?t.delete(e):t.add(e),A.value=t}async function ae(){if(f.value.length!==0){j(),g.value=!0,x.value=null;try{let e;if(re.value){let t=f.value.find(e=>S.value.get(e)?.firstPublish),n=t?S.value.get(t):null;e=n?n.added:[o.value]}else !ne.value||ie.value?e=[o.value]:(e=[...A.value],e.length===0&&(e=[o.value]));x.value=(await z.publish(e,f.value)).results}catch(e){x.value=[{target:`(all)`,success:!1,error:e.message,copiedFiles:0}]}finally{g.value=!1}}}function oe(e){return e.startsWith(`pages/`)?`pi pi-file`:`pi pi-share-alt`}function se(e){return e.startsWith(`pages/`)?e.slice(6):e.startsWith(`fragments/`)?`@${e.slice(10)}`:e}function ce(e){return e===`added`?`+`:`●`}function le(){j(),a(`close`)}return(e,t)=>(n(),_(h(M),{visible:r.visible,"onUpdate:visible":le,modal:``,header:`Publish`,style:{width:`32rem`}},{footer:i(()=>[x.value?(n(),_(h(b),{key:0,label:`Done`,"data-testid":`publish-done`,onClick:le})):(n(),I(O,{key:1},[F(h(b),{label:`Cancel`,severity:`secondary`,text:``,onClick:le}),F(h(b),{label:`Publish`,icon:`pi pi-cloud-upload`,loading:g.value,"data-testid":`publish-submit`,disabled:f.value.length===0,onClick:ae},null,8,[`loading`,`disabled`])],64))]),default:i(()=>[C(`div`,Tn,[C(`p`,En,[C(`i`,{class:m(oe(o.value))},null,2),y(` `+d(se(o.value)),1)]),c.value.length===0?(n(),I(`div`,Dn,` No targets configured in site.yaml `)):x.value?(n(),I(`div`,Bn,[(n(!0),I(O,null,s(x.value,e=>(n(),I(`div`,{key:e.target,class:m([`publish-result`,{success:e.success,error:!e.success}])},[C(`i`,{class:m(e.success?`pi pi-check-circle`:`pi pi-exclamation-circle`)},null,2),C(`span`,Vn,d(e.target),1),e.success?(n(),I(`span`,Hn,d(e.copiedFiles)+` files`,1)):(n(),I(`span`,Un,d(e.error),1))],2))),128))])):(n(),I(O,{key:1},[C(`div`,On,[t[1]||=C(`p`,{class:`publish-label`},`Select targets`,-1),(n(!0),I(O,null,s(c.value,e=>(n(),I(`div`,{key:e,class:`publish-target`},[F(h(ee),{modelValue:f.value,"onUpdate:modelValue":t[0]||=e=>f.value=e,inputId:e,value:e,"data-testid":`publish-target-${e}`},null,8,[`modelValue`,`inputId`,`value`,`data-testid`]),C(`label`,{for:e},d(e),9,kn),D.value.has(e)?(n(),_(h(v),{key:0,style:{width:`14px`,height:`14px`},strokeWidth:`6`})):P(``,!0)]))),128))]),ie.value?(n(),I(`div`,An,[t[2]||=C(`i`,{class:`pi pi-exclamation-triangle`},null,-1),C(`span`,null,`Couldn't load changes: `+d(ie.value),1)])):re.value?(n(),I(`div`,jn,[...t[3]||=[C(`i`,{class:`pi pi-info-circle`},null,-1),C(`span`,null,`First publish — everything will be published.`,-1)]])):f.value.length>0?(n(),I(`div`,Mn,[C(`p`,Nn,[t[4]||=y(` Your changes `,-1),te.value?(n(),I(`span`,Pn,`loading…`)):N.value.length?(n(),I(`span`,Fn,d(N.value.length),1)):P(``,!0)]),!te.value&&N.value.length===0?(n(),I(`div`,In,` No changes to publish. `)):(n(),I(`div`,Ln,[(n(!0),I(O,null,s(N.value,e=>(n(),I(`label`,{key:e.path,class:`publish-change-row`,"data-testid":`publish-change-${e.path}`},[F(h(ee),{modelValue:A.value.has(e.path),binary:!0,"onUpdate:modelValue":t=>L(e.path)},null,8,[`modelValue`,`onUpdate:modelValue`]),C(`span`,{class:m([`publish-change-mark`,e.change])},d(ce(e.change)),3),C(`i`,{class:m([oe(e.path),`publish-change-icon`])},null,2),C(`span`,zn,d(se(e.path)),1)],8,Rn))),128))]))])):P(``,!0)],64))])]),_:1},8,[`visible`]))}}),B=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n},Gn=B(Wn,[[`__scopeId`,`data-v-23b50a2c`]]),Kn={class:`fetch-content`},qn={key:0,class:`fetch-empty`},Jn={key:1,class:`fetch-select`},Yn={key:2,class:`fetch-result success`},Xn={class:`fetch-items`},Zn={key:3,class:`fetch-result error`},Qn=B(f({__name:`FetchDialog`,props:{visible:{type:Boolean}},emits:[`close`],setup(e,{emit:t}){let r=e,a=t,o=fn(),s=p([]),c=p(null),u=p(!1),f=p(null),m=p(null);l(async()=>{try{s.value=await z.getTargets()}catch{s.value=[]}});async function g(){if(c.value){u.value=!0,f.value=null,m.value=null;try{f.value=await z.fetchFromTarget(c.value),await o.load()}catch(e){m.value=e.message}finally{u.value=!1}}}return(e,t)=>(n(),_(h(M),{visible:r.visible,"onUpdate:visible":t[3]||=e=>a(`close`),modal:``,header:`Fetch from Target`,style:{width:`28rem`}},{footer:i(()=>[f.value||m.value?(n(),_(h(b),{key:0,label:`Done`,onClick:t[1]||=e=>a(`close`)})):(n(),I(O,{key:1},[F(h(b),{label:`Cancel`,severity:`secondary`,text:``,onClick:t[2]||=e=>a(`close`)}),F(h(b),{label:`Fetch`,icon:`pi pi-cloud-download`,loading:u.value,disabled:!c.value,onClick:g},null,8,[`loading`,`disabled`])],64))]),default:i(()=>[C(`div`,Kn,[s.value.length===0?(n(),I(`div`,qn,` No targets configured in site.yaml `)):!f.value&&!m.value?(n(),I(`div`,Jn,[t[4]||=C(`p`,{class:`fetch-label`},`Pull content from a target into the working copy:`,-1),F(h(j),{modelValue:c.value,"onUpdate:modelValue":t[0]||=e=>c.value=e,options:s.value.map(e=>({name:e})),optionLabel:`name`,optionValue:`name`,class:`fetch-list`},null,8,[`modelValue`,`options`])])):f.value?(n(),I(`div`,Yn,[t[6]||=C(`i`,{class:`pi pi-check-circle`},null,-1),C(`div`,null,[C(`p`,null,[C(`strong`,null,d(f.value.copiedFiles),1),t[5]||=y(` files fetched from `,-1),C(`strong`,null,d(c.value),1)]),C(`p`,Xn,d(f.value.items.join(`, `)),1)])])):m.value?(n(),I(`div`,Zn,[t[7]||=C(`i`,{class:`pi pi-exclamation-circle`},null,-1),C(`p`,null,d(m.value),1)])):P(``,!0)])]),_:1},8,[`visible`]))}}),[[`__scopeId`,`data-v-359a5f85`]]),$n={key:2,class:`cms-site-name`},er={key:0,class:`cms-toast cms-toast-error`},tr=B(f({__name:`CmsToolbar`,setup(e){let t=ae(),r=re(),a=w(()=>t.name===`dev`),o=fn(),s=gn(),c=Sn(),l=pn(),u=wn(),f=p(!1),m=p(!1),g=w(()=>s.type===`page`?`pages`:`fragments`),v=w(()=>s.name??``),S=w(()=>s.name&&!c.hasPendingEdits);function T(){let e=s.type===`page`?`/pages`:`/fragments`;r.push(`${e}/${s.name}`)}return(e,t)=>(n(),I(O,null,[F(h(D),{class:`cms-toolbar`},{start:i(()=>[h(u).mode===`edit`&&!a.value?(n(),_(h(b),{key:0,icon:`pi pi-arrow-left`,text:``,rounded:``,"data-testid":`back-to-browse`,onClick:T,size:`small`,class:`cms-btn`})):P(``,!0),a.value?(n(),_(h(b),{key:1,icon:`pi pi-arrow-left`,text:``,rounded:``,"data-testid":`back-to-editor`,onClick:t[0]||=e=>h(r).back(),size:`small`,class:`cms-btn`})):P(``,!0),t[8]||=C(`span`,{class:`cms-logo`},[C(`i`,{class:`pi pi-objects-column`}),y(` Gazetta `)],-1),h(o).manifest?(n(),I(`span`,$n,d(h(o).manifest.name),1)):P(``,!0)]),center:i(()=>[F(x,{name:`fade`},{default:i(()=>[h(c).lastSaveError?(n(),I(`span`,er,[t[9]||=C(`i`,{class:`pi pi-exclamation-circle`},null,-1),y(` `+d(h(c).lastSaveError),1)])):P(``,!0)]),_:1})]),end:i(()=>[a.value?P(``,!0):(n(),_(h(b),{key:0,icon:`pi pi-code`,text:``,rounded:``,title:`Dev Playground`,"data-testid":`dev-playground-link`,onClick:t[1]||=e=>h(r).push(`/dev`),size:`small`,class:`cms-btn`})),F(h(b),{icon:h(l).dark?`pi pi-sun`:`pi pi-moon`,text:``,rounded:``,"data-testid":`theme-toggle`,onClick:t[2]||=e=>h(l).toggle(),size:`small`,class:`cms-btn`},null,8,[`icon`]),h(u).mode===`edit`?(n(),_(h(b),{key:1,label:`Save`,icon:`pi pi-save`,severity:`primary`,loading:h(c).saving,"data-testid":`save-btn`,disabled:!h(c).hasPendingEdits,onClick:t[3]||=e=>h(c).save(),size:`small`,class:`cms-btn`},null,8,[`loading`,`disabled`])):P(``,!0),F(h(b),{label:`Fetch`,icon:`pi pi-cloud-download`,severity:`info`,"data-testid":`fetch-btn`,onClick:t[4]||=e=>m.value=!0,size:`small`,class:`cms-btn`}),F(h(b),{label:`Publish`,icon:`pi pi-cloud-upload`,severity:`success`,"data-testid":`publish-btn`,disabled:!S.value,onClick:t[5]||=e=>f.value=!0,size:`small`,class:`cms-btn`},null,8,[`disabled`])]),_:1}),f.value?(n(),_(Gn,{key:0,visible:f.value,itemType:g.value,itemName:v.value,onClose:t[6]||=e=>f.value=!1},null,8,[`visible`,`itemType`,`itemName`])):P(``,!0),m.value?(n(),_(Qn,{key:1,visible:m.value,onClose:t[7]||=e=>m.value=!1},null,8,[`visible`])):P(``,!0)],64))}}),[[`__scopeId`,`data-v-19233328`]]),nr=L(`unsavedGuard`,()=>{let e=p(!1),t=null;function n(){return t?new Promise(e=>e(`cancel`)):(e.value=!0,new Promise(e=>{t={resolve:e}}))}function r(n){e.value=!1,t?.resolve(n),t=null}return{visible:e,guard:n,respond:r}}),rr={class:`unsaved-message`},ir={class:`unsaved-actions`},ar=B(f({__name:`UnsavedDialog`,setup(e){let t=nr(),r=gn();function a(e){e.key===`Escape`&&(e.stopPropagation(),t.respond(`cancel`))}return(e,o)=>(n(),_(h(M),{visible:h(t).visible,modal:``,header:`Unsaved Changes`,closable:!1,style:{width:`26rem`},pt:{mask:{style:`backdrop-filter: blur(2px)`}},onKeydown:a},{footer:i(()=>[C(`div`,ir,[F(h(b),{label:`Don't Save`,severity:`danger`,text:``,onClick:o[0]||=e=>h(t).respond(`discard`)}),F(h(b),{label:`Cancel`,severity:`secondary`,text:``,onClick:o[1]||=e=>h(t).respond(`cancel`)}),F(h(b),{label:`Save`,icon:`pi pi-check`,autofocus:``,onClick:o[2]||=e=>h(t).respond(`save`)})])]),default:i(()=>[C(`p`,rr,[o[3]||=y(` You have unsaved changes on `,-1),C(`strong`,null,d(h(r).name),1),o[4]||=y(`. `,-1)])]),_:1},8,[`visible`]))}}),[[`__scopeId`,`data-v-70fd0516`]]),or={class:`cms-app`},sr={key:0,class:`cms-error`},cr={key:1,class:`cms-loading`},lr=[`href`],ur=f({__name:`App`,setup(e){let t=fn(),r=pn(),a=mn();return l(()=>{r.init()}),(e,r)=>{let o=c(`router-view`);return n(),I(`div`,or,[F(tr),h(t).error?(n(),I(`div`,sr,d(h(t).error),1)):h(t).loading?(n(),I(`div`,cr,`Loading site...`)):(n(),_(o,{key:2})),F(ar),F(x,{name:`toast`},{default:i(()=>[h(a).current?(n(),I(`div`,{key:0,class:m([`global-toast`,h(a).current.type===`error`?`toast-error`:`toast-success`])},[C(`i`,{class:m(h(a).current.type===`error`?`pi pi-exclamation-circle`:`pi pi-check-circle`)},null,2),h(a).current.link?(n(),I(`a`,{key:0,href:h(a).current.link,target:`_blank`,rel:`noopener`,class:`toast-link`},d(h(a).current.message),9,lr)):(n(),I(O,{key:1},[y(d(h(a).current.message),1)],64))],2)):P(``,!0)]),_:1})])}}}),dr=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var fr=Object.prototype.toString,pr=e=>fr.call(e)===`[object Object]`,mr=()=>{};function hr(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return n}var gr=e=>e();function _r(e,t={}){let n,r,i=mr,a=e=>{clearTimeout(e),i(),i=mr},s;return c=>{let l=o(e),u=o(t.maxWait);return n&&a(n),l<=0||u!==void 0&&u<=0?(r&&=(a(r),void 0),Promise.resolve(c())):new Promise((e,o)=>{i=t.rejectOnCancel?o:e,s=c,u&&!r&&(r=setTimeout(()=>{n&&a(n),r=void 0,e(s())},u)),n=setTimeout(()=>{r&&a(r),r=void 0,e(c())},l)})}}function vr(e){return Array.isArray(e)?e:[e]}function yr(e,t,n={}){let{eventFilter:r=gr,...i}=n;return u(e,hr(r,t),i)}function br(e,t,n={}){let{debounce:r=0,maxWait:i=void 0,...a}=n;return yr(e,t,{...a,eventFilter:_r(r,{maxWait:i})})}function xr(e,t,n){return u(e,t,{...n,immediate:!0})}var Sr=dr?window:void 0;dr&&window.document,dr&&window.navigator,dr&&window.location;function Cr(e){let t=o(e);return t?.$el??t}function wr(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=w(()=>{let t=vr(o(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return xr(()=>[n.value?.map(e=>Cr(e))??[Sr].filter(e=>e!=null),vr(o(n.value?e[1]:e[0])),vr(h(n.value?e[2]:e[1])),o(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=pr(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function Tr(e){return typeof e==`function`?e:typeof e==`string`?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Er(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]==`object`?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);let{target:i=Sr,eventName:a=`keydown`,passive:s=!1,dedupe:c=!1}=r,l=Tr(t);return wr(i,a,e=>{e.repeat&&o(c)||l(e)&&n(e)},s)}var Dr={class:`create-content`},Or={class:`create-field`},kr={key:0,class:`create-hint`},Ar={class:`create-field`},jr={key:0,class:`create-error`},Mr=B(f({__name:`CreatePageDialog`,props:{visible:{type:Boolean}},emits:[`close`],setup(e,{emit:t}){let r=e,a=t,o=fn(),s=p([]),c=p(null),u=p(``),f=p(!1),m=p(null),g=w(()=>{let e=u.value.trim().toLowerCase().replace(/\s+/g,`-`);return!e||e===`home`?`/`:`/${e}`});l(async()=>{s.value=await z.getTemplates()});async function v(){if(!(!c.value||!u.value.trim())){f.value=!0,m.value=null;try{let e=u.value.trim().toLowerCase().replace(/\s+/g,`-`).replace(/\/+/g,`/`);await z.createPage({name:e,template:c.value}),await o.load(),a(`close`)}catch(e){m.value=e.message}finally{f.value=!1}}}return(e,t)=>(n(),_(h(M),{visible:r.visible,"onUpdate:visible":t[3]||=e=>a(`close`),modal:``,header:`New Page`,style:{width:`24rem`}},{footer:i(()=>[F(h(b),{label:`Cancel`,severity:`secondary`,text:``,onClick:t[2]||=e=>a(`close`)}),F(h(b),{label:`Create`,icon:`pi pi-plus`,loading:f.value,disabled:!c.value||!u.value.trim(),onClick:v},null,8,[`loading`,`disabled`])]),default:i(()=>[C(`div`,Dr,[C(`div`,Or,[t[4]||=C(`label`,null,`Page name`,-1),F(h(T),{modelValue:u.value,"onUpdate:modelValue":t[0]||=e=>u.value=e,placeholder:`e.g. contact or blog/my-post`,class:`create-input`},null,8,[`modelValue`]),u.value.trim()?(n(),I(`span`,kr,`Route: `+d(g.value),1)):P(``,!0)]),C(`div`,Ar,[t[5]||=C(`label`,null,`Page template`,-1),F(h(j),{modelValue:c.value,"onUpdate:modelValue":t[1]||=e=>c.value=e,options:s.value,optionLabel:`name`,optionValue:`name`,class:`create-list`,style:{maxHeight:`200px`}},null,8,[`modelValue`,`options`])]),m.value?(n(),I(`p`,jr,d(m.value),1)):P(``,!0)])]),_:1},8,[`visible`]))}}),[[`__scopeId`,`data-v-b4d1c25e`]]),Nr={class:`create-content`},Pr={class:`create-field`},Fr={class:`create-field`},Ir={key:0,class:`create-error`},Lr=B(f({__name:`CreateFragmentDialog`,props:{visible:{type:Boolean}},emits:[`close`],setup(e,{emit:t}){let r=e,a=t,o=fn(),s=p([]),c=p(null),u=p(``),f=p(!1),m=p(null);l(async()=>{s.value=await z.getTemplates()});async function g(){if(!(!c.value||!u.value.trim())){f.value=!0,m.value=null;try{let e=u.value.trim().toLowerCase().replace(/\s+/g,`-`);await z.createFragment({name:e,template:c.value}),await o.load(),a(`close`)}catch(e){m.value=e.message}finally{f.value=!1}}}return(e,t)=>(n(),_(h(M),{visible:r.visible,"onUpdate:visible":t[3]||=e=>a(`close`),modal:``,header:`New Fragment`,style:{width:`24rem`}},{footer:i(()=>[F(h(b),{label:`Cancel`,severity:`secondary`,text:``,onClick:t[2]||=e=>a(`close`)}),F(h(b),{label:`Create`,icon:`pi pi-plus`,loading:f.value,disabled:!c.value||!u.value.trim(),onClick:g},null,8,[`loading`,`disabled`])]),default:i(()=>[C(`div`,Nr,[C(`div`,Pr,[t[4]||=C(`label`,null,`Fragment name`,-1),F(h(T),{modelValue:u.value,"onUpdate:modelValue":t[0]||=e=>u.value=e,placeholder:`e.g. sidebar, newsletter`,class:`create-input`},null,8,[`modelValue`])]),C(`div`,Fr,[t[5]||=C(`label`,null,`Template`,-1),F(h(j),{modelValue:c.value,"onUpdate:modelValue":t[1]||=e=>c.value=e,options:s.value,optionLabel:`name`,optionValue:`name`,class:`create-list`,style:{maxHeight:`200px`}},null,8,[`modelValue`,`options`])]),m.value?(n(),I(`p`,Ir,d(m.value),1)):P(``,!0)])]),_:1},8,[`visible`]))}}),[[`__scopeId`,`data-v-0b98775c`]]),Rr={class:`site-tree`},zr=[`data-testid`,`onClick`],Br={class:`node-label`},Vr=[`data-testid`,`onClick`],Hr={class:`node-label`},Ur=[`data-testid`,`onClick`],Wr={class:`node-label`},Gr={class:`new-btns`},Kr=B(f({__name:`SiteTree`,setup(e){let t=re(),r=fn(),i=gn(),a=Sn(),o=mn(),c=p(null),l=p(!1),f=p(!1);u(()=>i.selection,e=>{e?c.value=`${e.type}:${e.name}`:c.value=null},{immediate:!0});let g=w(()=>new Set(r.manifest?.systemPages??[])),v=w(()=>[...r.pages].filter(e=>!g.value.has(e.name)).sort((e,t)=>e.route.localeCompare(t.route)).map(e=>({key:`page:${e.name}`,label:e.name,type:`page`,name:e.name,icon:`pi pi-file`}))),y=w(()=>[...r.pages].filter(e=>g.value.has(e.name)).sort((e,t)=>e.route.localeCompare(t.route)).map(e=>({key:`page:${e.name}`,label:e.name,type:`page`,name:e.name,icon:`pi pi-file`}))),x=w(()=>r.fragments.map(e=>({key:`fragment:${e.name}`,label:e.name,type:`fragment`,name:e.name,icon:`pi pi-share-alt`})).sort((e,t)=>e.label.localeCompare(t.label)));function S(e){let n=e.type===`page`?`/pages`:`/fragments`;t.push(`${n}/${e.name}`)}async function T(e,t){if(t.stopPropagation(),confirm(`Delete ${e.type} "${e.name}"? This cannot be undone.`))try{e.type===`page`?await z.deletePage(e.name):await z.deleteFragment(e.name),i.type===e.type&&i.name===e.name&&a.clear(),await r.load()}catch(t){o.showError(t,`Failed to delete "${e.name}"`)}}return(e,t)=>(n(),I(`div`,Rr,[t[5]||=C(`div`,{class:`section-label`},`Pages`,-1),(n(!0),I(O,null,s(v.value,e=>(n(),I(`div`,{key:e.key,class:m([`node-item`,{selected:c.value===e.key}]),"data-testid":`site-${e.type}-${e.name}`,onClick:t=>S(e)},[C(`i`,{class:m([e.icon,`node-icon`])},null,2),C(`span`,Br,d(e.label),1),F(h(b),{icon:`pi pi-trash`,text:``,rounded:``,size:`small`,severity:`danger`,class:`node-delete`,"data-testid":`delete-${e.type}-${e.name}`,onClick:t=>T(e,t)},null,8,[`data-testid`,`onClick`])],10,zr))),128)),y.value.length?(n(),I(O,{key:0},[t[4]||=C(`div`,{class:`section-divider`},null,-1),(n(!0),I(O,null,s(y.value,e=>(n(),I(`div`,{key:e.key,class:m([`node-item`,{selected:c.value===e.key}]),"data-testid":`site-${e.type}-${e.name}`,onClick:t=>S(e)},[C(`i`,{class:m([e.icon,`node-icon`])},null,2),C(`span`,Hr,d(e.label),1),F(h(b),{icon:`pi pi-trash`,text:``,rounded:``,size:`small`,severity:`danger`,class:`node-delete`,"data-testid":`delete-${e.type}-${e.name}`,onClick:t=>T(e,t)},null,8,[`data-testid`,`onClick`])],10,Vr))),128))],64)):P(``,!0),t[6]||=C(`div`,{class:`section-label`,style:{"margin-top":`12px`}},`Fragments`,-1),(n(!0),I(O,null,s(x.value,e=>(n(),I(`div`,{key:e.key,class:m([`node-item`,{selected:c.value===e.key}]),"data-testid":`site-${e.type}-${e.name}`,onClick:t=>S(e)},[C(`i`,{class:m([e.icon,`node-icon`])},null,2),C(`span`,Wr,d(e.label),1),F(h(b),{icon:`pi pi-trash`,text:``,rounded:``,size:`small`,severity:`danger`,class:`node-delete`,"data-testid":`delete-${e.type}-${e.name}`,onClick:t=>T(e,t)},null,8,[`data-testid`,`onClick`])],10,Ur))),128)),C(`div`,Gr,[F(h(b),{icon:`pi pi-plus`,label:`New page`,text:``,size:`small`,"data-testid":`new-page`,onClick:t[0]||=e=>l.value=!0}),F(h(b),{icon:`pi pi-plus`,label:`New fragment`,text:``,size:`small`,"data-testid":`new-fragment`,onClick:t[1]||=e=>f.value=!0})]),l.value?(n(),_(Mr,{key:1,visible:l.value,onClose:t[2]||=e=>l.value=!1},null,8,[`visible`])):P(``,!0),f.value?(n(),_(Lr,{key:2,visible:f.value,onClose:t[3]||=e=>f.value=!1},null,8,[`visible`])):P(``,!0)]))}}),[[`__scopeId`,`data-v-37e45114`]]),qr={class:`add-content`},Jr={class:`add-field`},Yr={class:`add-field`},Xr={key:0,class:`add-error`},Zr=B(f({__name:`AddComponentDialog`,props:{visible:{type:Boolean}},emits:[`close`,`add`],setup(e,{emit:t}){let r=e,a=t,o=p([]),s=p(null),c=p(``),u=p(!1),f=p(null);l(async()=>{o.value=await z.getTemplates()});async function m(){if(!(!s.value||!c.value.trim())){u.value=!0,f.value=null;try{a(`add`,c.value.trim().toLowerCase().replace(/\s+/g,`-`),s.value),a(`close`)}catch(e){f.value=e.message}finally{u.value=!1}}}return(e,t)=>(n(),_(h(M),{visible:r.visible,"onUpdate:visible":t[3]||=e=>a(`close`),modal:``,header:`Add Component`,style:{width:`24rem`}},{footer:i(()=>[F(h(b),{label:`Cancel`,severity:`secondary`,text:``,onClick:t[2]||=e=>a(`close`),"data-testid":`add-component-cancel`}),F(h(b),{label:`Add`,icon:`pi pi-plus`,loading:u.value,disabled:!s.value||!c.value.trim(),onClick:m,"data-testid":`add-component-submit`},null,8,[`loading`,`disabled`])]),default:i(()=>[C(`div`,qr,[C(`div`,Jr,[t[4]||=C(`label`,null,`Name`,-1),F(h(T),{modelValue:c.value,"onUpdate:modelValue":t[0]||=e=>c.value=e,placeholder:`e.g. hero, sidebar, cta`,class:`add-input`,"data-testid":`add-component-name`},null,8,[`modelValue`])]),C(`div`,Yr,[t[5]||=C(`label`,null,`Template`,-1),F(h(j),{modelValue:s.value,"onUpdate:modelValue":t[1]||=e=>s.value=e,options:o.value,optionLabel:`name`,optionValue:`name`,class:`add-list`,style:{maxHeight:`200px`}},null,8,[`modelValue`,`options`])]),f.value?(n(),I(`p`,Xr,d(f.value),1)):P(``,!0)])]),_:1},8,[`visible`]))}}),[[`__scopeId`,`data-v-de3d43d5`]]),Qr={key:0,class:`component-tree`},$r=[`data-testid`,`onClick`,`onMouseenter`],ei={key:0,class:`pi pi-exclamation-triangle node-icon node-error-icon`},ti={key:2,class:`node-dirty-dot`},ni={class:`node-label`},ri={key:4,class:`node-actions`},ii={key:1,class:`empty`},ai=B(f({__name:`ComponentTree`,setup(e){function t(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=t*16777619>>>0;return t.toString(16).padStart(8,`0`)}let r=gn(),i=Sn(),a=mn(),o=Cn(),c=nr(),l=p(null),f=p(null),v=p([]),y=p(!1),x=w(()=>r.detail),S=w(()=>x.value?.components?.length??0),T=p(new Map);async function E(e,n,r,i){if(typeof e==`string`){let a=e.slice(1),o=r?`${r}/${e}`:e,s=t(o);i.set(s,{isFragment:!0,fragName:a});try{let t=await z.getFragment(a),r=t.components?await Promise.all(t.components.map((e,t)=>E(e,t,o,i))):[];return{key:`frag:${a}:${n}`,label:e,data:{isFragment:!0,fragName:a,treePath:o,path:o,template:t.template,index:n,isTopLevel:!0},children:r}}catch(t){return{key:`frag:${a}:${n}`,label:e,data:{isFragment:!0,fragName:a,treePath:o,index:n,isTopLevel:!0,error:t.message},children:[]}}}let a=r?`${r}/${e.name}`:e.name,o=t(a),s=e.components?await Promise.all(e.components.map((e,t)=>E(e,t,a,i))):[];return i.set(o,{path:a,template:e.template}),{key:`comp:${a}:${n}`,label:e.name,data:{path:a,template:e.template,treePath:a,isFragment:!1,index:n,isTopLevel:!0},children:s.map(e=>({...e,data:{...e.data,isTopLevel:!1}}))}}u(x,async e=>{if(!e){v.value=[],T.value=new Map;return}let n=new Map,i=r.type===`fragment`?`@${r.name}`:``,a=e.components?await Promise.all(e.components.map((e,t)=>E(e,t,i,n))):[],o={key:`root:${r.name}`,label:r.name??``,data:{isPage:!0,path:e.dir,template:e.template,treePath:i},children:a};i&&r.type===`fragment`&&r.name&&n.set(t(i),{isFragment:!0,fragName:r.name}),v.value=[o],T.value=n,D()},{immediate:!0});function D(){o.pendingGzId&&T.value.size>0&&(ie(o.pendingGzId),o.clearPending())}u(()=>o.pendingGzId,()=>D()),u(()=>o.previewHoverGzId,e=>{if(!e){f.value=null;return}f.value=re(v.value,n=>n.treePath?t(n.treePath)===e:!1)?.key??null});let k=w(()=>{let e=[];function t(n,r){for(let i of n)e.push({node:i,depth:r}),i.children.length&&t(i.children,r+1)}return v.value[0]&&(e.push({node:v.value[0],depth:-1}),t(v.value[0].children,0)),e});function ee(e,t){return t===-1?r.type===`page`?`pi pi-file`:`pi pi-share-alt`:e.data.isFragment?`pi pi-share-alt`:`pi pi-box`}function j(e){if(!(e<=0))return{paddingLeft:e*10+`px`}}function M(e){i.path===e?i.discard():i.revertStashed(e)}function N(e){e.data.treePath&&o.highlight(t(e.data.treePath))}function te(){o.highlight(null)}async function ne(e){if(!e.data)return;l.value=e.key,o.clearPending();let n=e.data.treePath;if(o.select(n?t(n):null),e.data.isFragment&&e.data.fragName){i.openFragment(e.data.fragName);return}if(e.data.isPage){i.openPageRoot();return}e.data.path&&i.openComponent(e.data.path,e.data.template??``)}function re(e,t){for(let n of e){if(n.data&&t(n.data))return n;if(n.children.length){let e=re(n.children,t);if(e)return e}}return null}function ie(e){let t=T.value.get(e);if(!t)return;if(o.select(e),`isFragment`in t){let e=re(v.value,e=>e.fragName===t.fragName);e&&(l.value=e.key),i.openFragment(t.fragName);return}let n=re(v.value,e=>e.path===t.path);n&&(l.value=n.key),i.openComponent(t.path,t.template)}async function L(e,t){let n=x.value;if(!n?.components)return;let i=e+t;if(i<0||i>=n.components.length)return;let a=[...n.components],[o]=a.splice(e,1);a.splice(i,0,o),await r.updateComponents(a)}async function ae(e){let t=x.value;if(!t?.components)return;if(i.dirty){let e=await c.guard();if(e===`cancel`)return;e===`save`&&await i.save()}let n=[...t.components],o=n.splice(e,1)[0],s=typeof o==`string`?o:o.name;i.clear(),await r.updateComponents(n),a.show(`Removed "${s}"`)}async function oe(e,t){let n=x.value;if(n)try{let i={name:e,template:t,content:{}},o=[...n.components??[],i];await r.updateComponents(o),a.show(`Added "${e}"`)}catch(t){a.showError(t,`Failed to add component "${e}"`)}}return(e,t)=>x.value?(n(),I(`div`,Qr,[k.value.length?(n(!0),I(O,{key:0},s(k.value,({node:e,depth:r})=>(n(),I(`div`,{key:e.key,class:m([`node-item`,{"node-root":r===-1,selected:l.value===e.key,hovered:f.value===e.key}]),style:g(j(r)),"data-testid":`component-${e.data?.isFragment?e.data.fragName:e.label}`,onClick:t=>ne(e),onMouseenter:t=>N(e),onMouseleave:t[0]||=e=>te()},[e.data?.error?(n(),I(`i`,ei)):(n(),I(`i`,{key:1,class:m([ee(e,r),`node-icon`])},null,2)),e.data?.path&&(h(i).hasPendingEdit(e.data.path)||h(i).dirty&&h(i).path===e.data.path)?(n(),I(`span`,ti)):P(``,!0),C(`span`,ni,d(e.label),1),e.data?.path&&(h(i).hasPendingEdit(e.data.path)||h(i).dirty&&h(i).path===e.data.path)?(n(),_(h(b),{key:3,icon:`pi pi-undo`,text:``,rounded:``,size:`small`,class:`node-revert`,title:`Discard changes`,onClick:A(t=>M(e.data.path),[`stop`])},null,8,[`onClick`])):P(``,!0),e.data?.isTopLevel&&r!==-1?(n(),I(`span`,ri,[F(h(b),{icon:`pi pi-arrow-up`,text:``,rounded:``,size:`small`,"data-testid":`move-up-${e.label}`,disabled:e.data.index===0,onClick:A(t=>L(e.data.index,-1),[`stop`])},null,8,[`data-testid`,`disabled`,`onClick`]),F(h(b),{icon:`pi pi-arrow-down`,text:``,rounded:``,size:`small`,"data-testid":`move-down-${e.label}`,disabled:e.data.index===S.value-1,onClick:A(t=>L(e.data.index,1),[`stop`])},null,8,[`data-testid`,`disabled`,`onClick`]),F(h(b),{icon:`pi pi-trash`,text:``,rounded:``,size:`small`,severity:`danger`,"data-testid":`remove-${e.label}`,onClick:A(t=>ae(e.data.index),[`stop`])},null,8,[`data-testid`,`onClick`])])):P(``,!0)],46,$r))),128)):(n(),I(`p`,ii,`No components`)),F(h(b),{icon:`pi pi-plus`,label:`Add component`,text:``,size:`small`,class:`add-btn`,"data-testid":`add-component`,onClick:t[1]||=e=>y.value=!0}),y.value?(n(),_(Zr,{key:2,visible:y.value,onClose:t[2]||=e=>y.value=!1,onAdd:oe},null,8,[`visible`])):P(``,!0)])):P(``,!0)}}),[[`__scopeId`,`data-v-f5714bd7`]]);function oi(e,t,n,i,a,o,s,c){let l=null;function d(){if(!e.value||!t.value||!n.value||!i.value)return;l&&f();let r=t.value,s=e.value;r.mount(s,{content:n.value,schema:i.value,theme:a.value,onChange:o,fieldsBaseUrl:c?.value}),l={mount:r,el:s}}function f(){if(l){try{l.mount.unmount(l.el)}catch{}l=null}}u(s?[e,t,s]:[e,t],()=>{e.value&&t.value&&n.value?d():f()},{immediate:!0}),r(f)}var V=se(),H=e(le(),1),si=e(ce()),ci=ue();function U(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var li=typeof Symbol==`function`&&Symbol.observable||`@@observable`,ui=()=>Math.random().toString(36).substring(7).split(``).join(`.`),di={INIT:`@@redux/INIT${ui()}`,REPLACE:`@@redux/REPLACE${ui()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ui()}`};function fi(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function pi(e,t,n){if(typeof e!=`function`)throw Error(U(2));if(typeof t==`function`&&typeof n==`function`||typeof n==`function`&&typeof arguments[3]==`function`)throw Error(U(0));if(typeof t==`function`&&n===void 0&&(n=t,t=void 0),n!==void 0){if(typeof n!=`function`)throw Error(U(1));return n(pi)(e,t)}let r=e,i=t,a=new Map,o=a,s=0,c=!1;function l(){o===a&&(o=new Map,a.forEach((e,t)=>{o.set(t,e)}))}function u(){if(c)throw Error(U(3));return i}function d(e){if(typeof e!=`function`)throw Error(U(4));if(c)throw Error(U(5));let t=!0;l();let n=s++;return o.set(n,e),function(){if(t){if(c)throw Error(U(6));t=!1,l(),o.delete(n),a=null}}}function f(e){if(!fi(e))throw Error(U(7));if(e.type===void 0)throw Error(U(8));if(typeof e.type!=`string`)throw Error(U(17));if(c)throw Error(U(9));try{c=!0,i=r(i,e)}finally{c=!1}return(a=o).forEach(e=>{e()}),e}function p(e){if(typeof e!=`function`)throw Error(U(10));r=e,f({type:di.REPLACE})}function m(){let e=d;return{subscribe(t){if(typeof t!=`object`||!t)throw Error(U(11));function n(){let e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[li](){return this}}}return f({type:di.INIT}),{dispatch:f,subscribe:d,getState:u,replaceReducer:p,[li]:m}}function mi(e,t){return function(...n){return t(e.apply(this,n))}}function hi(e,t){if(typeof e==`function`)return mi(e,t);if(typeof e!=`object`||!e)throw Error(U(16));let n={};for(let r in e){let i=e[r];typeof i==`function`&&(n[r]=mi(i,t))}return n}function gi(...e){return e.length===0?e=>e:e.length===1?e[0]:e.reduce((e,t)=>(...n)=>e(t(...n)))}function _i(...e){return t=>(n,r)=>{let i=t(n,r),a=()=>{throw Error(U(15))},o={getState:i.getState,dispatch:(e,...t)=>a(e,...t)};return a=gi(...e.map(e=>e(o)))(i.dispatch),{...i,dispatch:a}}}var vi=t((e=>{var t=le();t.useSyncExternalStore,t.useRef,t.useEffect,t.useMemo,t.useDebugValue}));t(((e,t)=>{t.exports=vi()}))();var yi=Symbol.for(`react.transitional.element`),bi=Symbol.for(`react.portal`),xi=Symbol.for(`react.fragment`),Si=Symbol.for(`react.strict_mode`),Ci=Symbol.for(`react.profiler`),wi=Symbol.for(`react.consumer`),Ti=Symbol.for(`react.context`),Ei=Symbol.for(`react.forward_ref`),Di=Symbol.for(`react.suspense`),Oi=Symbol.for(`react.suspense_list`),ki=Symbol.for(`react.memo`),Ai=Symbol.for(`react.lazy`),ji=Ei,Mi=ki;function Ni(e){if(typeof e==`object`&&e){let{$$typeof:t}=e;switch(t){case yi:switch(e=e.type,e){case xi:case Ci:case Si:case Di:case Oi:return e;default:switch(e&&=e.$$typeof,e){case Ti:case Ei:case Ai:case ki:return e;case wi:return e;default:return t}}case bi:return t}}}function Pi(e){return Ni(e)===ki}function Fi(e,t,n,r,{areStatesEqual:i,areOwnPropsEqual:a,areStatePropsEqual:o}){let s=!1,c,l,u,d,f;function p(i,a){return c=i,l=a,u=e(c,l),d=t(r,l),f=n(u,d,l),s=!0,f}function m(){return u=e(c,l),t.dependsOnOwnProps&&(d=t(r,l)),f=n(u,d,l),f}function h(){return e.dependsOnOwnProps&&(u=e(c,l)),t.dependsOnOwnProps&&(d=t(r,l)),f=n(u,d,l),f}function g(){let t=e(c,l),r=!o(t,u);return u=t,r&&(f=n(u,d,l)),f}function _(e,t){let n=!a(t,l),r=!i(e,c,t,l);return c=e,l=t,n&&r?m():n?h():r?g():f}return function(e,t){return s?_(e,t):p(e,t)}}function Ii(e,{initMapStateToProps:t,initMapDispatchToProps:n,initMergeProps:r,...i}){return Fi(t(e,i),n(e,i),r(e,i),e,i)}function Li(e,t){let n={};for(let r in e){let i=e[r];typeof i==`function`&&(n[r]=(...e)=>t(i(...e)))}return n}function Ri(e){return function(t){let n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function zi(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function Bi(e,t){return function(t,{displayName:n}){let r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e,void 0)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=zi(e);let i=r(t,n);return typeof i==`function`&&(r.mapToProps=i,r.dependsOnOwnProps=zi(i),i=r(t,n)),i},r}}function Vi(e,t){return(n,r)=>{throw Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function Hi(e){return e&&typeof e==`object`?Ri(t=>Li(e,t)):e?typeof e==`function`?Bi(e,`mapDispatchToProps`):Vi(e,`mapDispatchToProps`):Ri(e=>({dispatch:e}))}function Ui(e){return e?typeof e==`function`?Bi(e,`mapStateToProps`):Vi(e,`mapStateToProps`):Ri(()=>({}))}function Wi(e,t,n){return{...n,...e,...t}}function Gi(e){return function(t,{displayName:n,areMergedPropsEqual:r}){let i=!1,a;return function(t,n,o){let s=e(t,n,o);return i?r(s,a)||(a=s):(i=!0,a=s),a}}}function Ki(e){return e?typeof e==`function`?Gi(e):Vi(e,`mergeProps`):()=>Wi}function qi(e){e()}function Ji(){let e=null,t=null;return{clear(){e=null,t=null},notify(){qi(()=>{let t=e;for(;t;)t.callback(),t=t.next})},get(){let t=[],n=e;for(;n;)t.push(n),n=n.next;return t},subscribe(n){let r=!0,i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var Yi={notify(){},get:()=>[]};function Xi(e,t){let n,r=Yi,i=0,a=!1;function o(e){u();let t=r.subscribe(e),n=!1;return()=>{n||(n=!0,t(),d())}}function s(){r.notify()}function c(){m.onStateChange&&m.onStateChange()}function l(){return a}function u(){i++,n||(n=t?t.addNestedSub(c):e.subscribe(c),r=Ji())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=Yi)}function f(){a||(a=!0,u())}function p(){a&&(a=!1,d())}let m={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:c,isSubscribed:l,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return m}var Zi=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Qi=typeof navigator<`u`&&navigator.product===`ReactNative`,$i=Zi||Qi?H.useLayoutEffect:H.useEffect;function ea(e,t){return e===t?e!==0||t!==0||1/e==1/t:e!==e&&t!==t}function ta(e,t){if(ea(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!ea(e[n[r]],t[n[r]]))return!1;return!0}var na={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ra={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},ia={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},aa={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},oa={[ji]:ia,[Mi]:aa};function sa(e){return Pi(e)?aa:oa[e.$$typeof]||na}var ca=Object.defineProperty,la=Object.getOwnPropertyNames,ua=Object.getOwnPropertySymbols,da=Object.getOwnPropertyDescriptor,fa=Object.getPrototypeOf,pa=Object.prototype;function ma(e,t){if(typeof t!=`string`){if(pa){let n=fa(t);n&&n!==pa&&ma(e,n)}let n=la(t);ua&&(n=n.concat(ua(t)));let r=sa(e),i=sa(t);for(let a=0;a<n.length;++a){let o=n[a];if(!ra[o]&&!(i&&i[o])&&!(r&&r[o])){let n=da(t,o);try{ca(e,o,n)}catch{}}}}return e}var ha=Symbol.for(`react-redux-context`),ga=typeof globalThis<`u`?globalThis:{};function _a(){if(!H.createContext)return{};let e=ga[ha]??=new Map,t=e.get(H.createContext);return t||(t=H.createContext(null),e.set(H.createContext,t)),t}var va=_a(),ya=[null,null];function ba(e,t,n){$i(()=>e(...t),n)}function xa(e,t,n,r,i,a){e.current=r,n.current=!1,i.current&&(i.current=null,a())}function Sa(e,t,n,r,i,a,o,s,c,l,u){if(!e)return()=>{};let d=!1,f=null,p=()=>{if(d||!s.current)return;let e=t.getState(),n,p;try{n=r(e,i.current)}catch(e){p=e,f=e}p||(f=null),n===a.current?o.current||l():(a.current=n,c.current=n,o.current=!0,u())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,f)throw f}}function Ca(e,t){return e===t}function wa(e,t,n,{pure:r,areStatesEqual:i=Ca,areOwnPropsEqual:a=ta,areStatePropsEqual:o=ta,areMergedPropsEqual:s=ta,forwardRef:c=!1,context:l=va}={}){let u=l,d=Ui(e),f=Hi(t),p=Ki(n),m=!!e;return e=>{let t=e.displayName||e.name||`Component`,n=`Connect(${t})`,r={shouldHandleStateChanges:m,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:d,initMapDispatchToProps:f,initMergeProps:p,areStatesEqual:i,areStatePropsEqual:o,areOwnPropsEqual:a,areMergedPropsEqual:s};function l(t){let[n,i,a]=H.useMemo(()=>{let{reactReduxForwardedRef:e,...n}=t;return[t.context,e,n]},[t]),o=H.useMemo(()=>{let e=u;return n?.Consumer,e},[n,u]),s=H.useContext(o),c=!!t.store&&!!t.store.getState&&!!t.store.dispatch,l=!!s&&!!s.store,d=c?t.store:s.store,f=l?s.getServerState:d.getState,p=H.useMemo(()=>Ii(d.dispatch,r),[d]),[h,g]=H.useMemo(()=>{if(!m)return ya;let e=Xi(d,c?void 0:s.subscription);return[e,e.notifyNestedSubs.bind(e)]},[d,c,s]),_=H.useMemo(()=>c?s:{...s,subscription:h},[c,s,h]),v=H.useRef(void 0),y=H.useRef(a),b=H.useRef(void 0),x=H.useRef(!1),S=H.useRef(!1),C=H.useRef(void 0);$i(()=>(S.current=!0,()=>{S.current=!1}),[]);let w=H.useMemo(()=>()=>b.current&&a===y.current?b.current:p(d.getState(),a),[d,a]),T=H.useMemo(()=>e=>h?Sa(m,d,h,p,y,v,x,S,b,g,e):()=>{},[h]);ba(xa,[y,v,x,a,b,g]);let E;try{E=H.useSyncExternalStore(T,w,f?()=>p(f(),a):w)}catch(e){throw C.current&&(e.message+=`
|
|
38
|
+
The error may be correlated with this previous error:
|
|
39
|
+
${C.current.stack}
|
|
40
|
+
|
|
41
|
+
`),e}$i(()=>{C.current=void 0,b.current=void 0,v.current=E});let D=H.useMemo(()=>H.createElement(e,{...E,ref:i}),[i,e,E]);return H.useMemo(()=>m?H.createElement(o.Provider,{value:_},D):D,[o,D,_])}let h=H.memo(l);if(h.WrappedComponent=e,h.displayName=l.displayName=n,c){let t=H.forwardRef(function(e,t){return H.createElement(h,{...e,reactReduxForwardedRef:t})});return t.displayName=n,t.WrappedComponent=e,ma(t,e)}return ma(h,e)}}var Ta=wa;function Ea(e){let{children:t,context:n,serverState:r,store:i}=e,a=H.useMemo(()=>({store:i,subscription:Xi(i),getServerState:r?()=>r:void 0}),[i,r]),o=H.useMemo(()=>i.getState(),[i]);$i(()=>{let{subscription:e}=a;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),o!==i.getState()&&e.notifyNestedSubs(),()=>{e.tryUnsubscribe(),e.onStateChange=void 0}},[a,o]);let s=n||va;return H.createElement(s.Provider,{value:a},t)}var Da=Ea,Oa=!0,ka=`Invariant failed`;function Aa(e,t){if(!e){if(Oa)throw Error(ka);var n=typeof t==`function`?t():t,r=n?`${ka}: ${n}`:ka;throw Error(r)}}var ja=function(e){var t=e.top,n=e.right,r=e.bottom,i=e.left;return{top:t,right:n,bottom:r,left:i,width:n-i,height:r-t,x:i,y:t,center:{x:(n+i)/2,y:(r+t)/2}}},Ma=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},Na=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},Pa=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},Fa={top:0,right:0,bottom:0,left:0},Ia=function(e){var t=e.borderBox,n=e.margin,r=n===void 0?Fa:n,i=e.border,a=i===void 0?Fa:i,o=e.padding,s=o===void 0?Fa:o,c=ja(Ma(t,r)),l=ja(Na(t,a)),u=ja(Na(l,s));return{marginBox:c,borderBox:ja(t),paddingBox:l,contentBox:u,margin:r,border:a,padding:s}},La=function(e){var t=e.slice(0,-2);if(e.slice(-2)!==`px`)return 0;var n=Number(t);return isNaN(n)&&Aa(!1),n},Ra=function(){return{x:window.pageXOffset,y:window.pageYOffset}},za=function(e,t){var n=e.borderBox,r=e.border,i=e.margin,a=e.padding;return Ia({borderBox:Pa(n,t),border:r,margin:i,padding:a})},Ba=function(e,t){return t===void 0&&(t=Ra()),za(e,t)},Va=function(e,t){return Ia({borderBox:e,margin:{top:La(t.marginTop),right:La(t.marginRight),bottom:La(t.marginBottom),left:La(t.marginLeft)},padding:{top:La(t.paddingTop),right:La(t.paddingRight),bottom:La(t.paddingBottom),left:La(t.paddingLeft)},border:{top:La(t.borderTopWidth),right:La(t.borderRightWidth),bottom:La(t.borderBottomWidth),left:La(t.borderLeftWidth)}})},Ha=function(e){return Va(e.getBoundingClientRect(),window.getComputedStyle(e))},Ua=function(e){var t=[],n=null,r=function(){t=[...arguments],!n&&(n=requestAnimationFrame(function(){n=null,e.apply(void 0,t)}))};return r.cancel=function(){n&&=(cancelAnimationFrame(n),null)},r};function Wa(){return Wa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wa.apply(null,arguments)}function Ga(e,t){}Ga.bind(null,`warn`),Ga.bind(null,`error`);function Ka(){}function qa(e,t){return{...e,...t}}function Ja(e,t,n){let r=t.map(t=>{let r=qa(n,t.options);return e.addEventListener(t.eventName,t.fn,r),function(){e.removeEventListener(t.eventName,t.fn,r)}});return function(){r.forEach(e=>{e()})}}var Ya=`Invariant failed`,Xa=class extends Error{};Xa.prototype.toString=function(){return this.message};function W(e,t){throw new Xa(Ya)}var Za=class extends H.Component{constructor(...e){super(...e),this.callbacks=null,this.unbind=Ka,this.onWindowError=e=>{let t=this.getCallbacks();t.isDragging()&&t.tryAbort(),e.error instanceof Xa&&e.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw Error(`Unable to find AppCallbacks in <ErrorBoundary/>`);return this.callbacks},this.setCallbacks=e=>{this.callbacks=e}}componentDidMount(){this.unbind=Ja(window,[{eventName:`error`,fn:this.onWindowError}])}componentDidCatch(e){if(e instanceof Xa){this.setState({});return}throw e}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}},Qa=`
|
|
42
|
+
Press space bar to start a drag.
|
|
43
|
+
When dragging you can use the arrow keys to move the item around and escape to cancel.
|
|
44
|
+
Some screen readers may require you to be in focus mode or to use your pass through key
|
|
45
|
+
`,$a=e=>e+1,eo=e=>`
|
|
46
|
+
You have lifted an item in position ${$a(e.source.index)}
|
|
47
|
+
`,to=(e,t)=>{let n=e.droppableId===t.droppableId,r=$a(e.index),i=$a(t.index);return n?`
|
|
48
|
+
You have moved the item from position ${r}
|
|
49
|
+
to position ${i}
|
|
50
|
+
`:`
|
|
51
|
+
You have moved the item from position ${r}
|
|
52
|
+
in list ${e.droppableId}
|
|
53
|
+
to list ${t.droppableId}
|
|
54
|
+
in position ${i}
|
|
55
|
+
`},no=(e,t,n)=>t.droppableId===n.droppableId?`
|
|
56
|
+
The item ${e}
|
|
57
|
+
has been combined with ${n.draggableId}`:`
|
|
58
|
+
The item ${e}
|
|
59
|
+
in list ${t.droppableId}
|
|
60
|
+
has been combined with ${n.draggableId}
|
|
61
|
+
in list ${n.droppableId}
|
|
62
|
+
`,ro=e=>{let t=e.destination;if(t)return to(e.source,t);let n=e.combine;return n?no(e.draggableId,e.source,n):`You are over an area that cannot be dropped on`},io=e=>`
|
|
63
|
+
The item has returned to its starting position
|
|
64
|
+
of ${$a(e.index)}
|
|
65
|
+
`,ao={dragHandleUsageInstructions:Qa,onDragStart:eo,onDragUpdate:ro,onDragEnd:e=>{if(e.reason===`CANCEL`)return`
|
|
66
|
+
Movement cancelled.
|
|
67
|
+
${io(e.source)}
|
|
68
|
+
`;let t=e.destination,n=e.combine;return t?`
|
|
69
|
+
You have dropped the item.
|
|
70
|
+
${to(e.source,t)}
|
|
71
|
+
`:n?`
|
|
72
|
+
You have dropped the item.
|
|
73
|
+
${no(e.draggableId,e.source,n)}
|
|
74
|
+
`:`
|
|
75
|
+
The item has been dropped while not over a drop area.
|
|
76
|
+
${io(e.source)}
|
|
77
|
+
`}};function oo(e,t){return!!(e===t||Number.isNaN(e)&&Number.isNaN(t))}function so(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!oo(e[n],t[n]))return!1;return!0}function G(e,t){let n=(0,H.useState)(()=>({inputs:t,result:e()}))[0],r=(0,H.useRef)(!0),i=(0,H.useRef)(n),a=r.current||t&&i.current.inputs&&so(t,i.current.inputs)?i.current:{inputs:t,result:e()};return(0,H.useEffect)(()=>{r.current=!1,i.current=a},[a]),a.result}function K(e,t){return G(()=>e,t)}var q={x:0,y:0},J=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),Y=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),co=(e,t)=>e.x===t.x&&e.y===t.y,lo=e=>({x:e.x===0?0:-e.x,y:e.y===0?0:-e.y}),uo=(e,t,n=0)=>e===`x`?{x:t,y:n}:{x:n,y:t},fo=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),po=(e,t)=>Math.min(...t.map(t=>fo(e,t))),mo=e=>t=>({x:e(t.x),y:e(t.y)}),ho=(e,t)=>{let n=ja({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n},go=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),_o=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],vo={top:0,right:0,bottom:0,left:0},yo=(e,t)=>t?go(e,t.scroll.diff.displacement):e,bo=(e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e,xo=(e,t)=>t&&t.shouldClipSubject?ho(t.pageMarginBox,e):ja(e),So=({page:e,withPlaceholder:t,axis:n,frame:r})=>({page:e,withPlaceholder:t,active:xo(bo(yo(e.marginBox,r),n,t),r)}),Co=(e,t)=>{!e.frame&&W();let n=e.frame,r=Y(t,n.scroll.initial),i=lo(r),a={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}},o=So({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:a});return{...e,frame:a,subject:o}};function X(e,t=so){let n=null;function r(...r){if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;let i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}var wo=X(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),To=X(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),Eo=X(e=>Object.values(e)),Do=X(e=>Object.values(e)),Oo=X((e,t)=>Do(t).filter(t=>e===t.descriptor.droppableId).sort((e,t)=>e.descriptor.index-t.descriptor.index));function ko(e){return e.at&&e.at.type===`REORDER`?e.at.destination:null}function Ao(e){return e.at&&e.at.type===`COMBINE`?e.at.combine:null}var jo=X((e,t)=>t.filter(t=>t.descriptor.id!==e.descriptor.id)),Mo=({isMovingForward:e,draggable:t,destination:n,insideDestination:r,previousImpact:i})=>{if(!n.isCombineEnabled||!ko(i))return null;function a(e){let t={type:`COMBINE`,combine:{draggableId:e,droppableId:n.descriptor.id}};return{...i,at:t}}let o=i.displaced.all,s=o.length?o[0]:null;if(e)return s?a(s):null;let c=jo(t,r);if(!s){if(!c.length)return null;let e=c[c.length-1];return a(e.descriptor.id)}let l=c.findIndex(e=>e.descriptor.id===s);l===-1&&W();let u=l-1;if(u<0)return null;let d=c[u];return a(d.descriptor.id)},No=(e,t)=>e.descriptor.droppableId===t.descriptor.id,Po={point:q,value:0},Fo={invisible:{},visible:{},all:[]},Io={displaced:Fo,displacedBy:Po,at:null},Lo=(e,t)=>n=>e<=n&&n<=t,Ro=e=>{let t=Lo(e.top,e.bottom),n=Lo(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;let i=t(r.top)||t(r.bottom),a=n(r.left)||n(r.right);if(i&&a)return!0;let o=r.top<e.top&&r.bottom>e.bottom,s=r.left<e.left&&r.right>e.right;return o&&s?!0:o&&a||s&&i}},zo=e=>{let t=Lo(e.top,e.bottom),n=Lo(e.left,e.right);return e=>t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)},Bo={direction:`vertical`,line:`y`,crossAxisLine:`x`,start:`top`,end:`bottom`,size:`height`,crossAxisStart:`left`,crossAxisEnd:`right`,crossAxisSize:`width`},Vo={direction:`horizontal`,line:`x`,crossAxisLine:`y`,start:`left`,end:`right`,size:`width`,crossAxisStart:`top`,crossAxisEnd:`bottom`,crossAxisSize:`height`},Ho=e=>t=>{let n=Lo(t.top,t.bottom),r=Lo(t.left,t.right);return t=>e===Bo?n(t.top)&&n(t.bottom):r(t.left)&&r(t.right)},Uo=(e,t)=>go(e,t.frame?t.frame.scroll.diff.displacement:q),Wo=(e,t,n)=>t.subject.active?n(t.subject.active)(e):!1,Go=(e,t,n)=>n(t)(e),Ko=({target:e,destination:t,viewport:n,withDroppableDisplacement:r,isVisibleThroughFrameFn:i})=>{let a=r?Uo(e,t):e;return Wo(a,t,i)&&Go(a,n,i)},qo=e=>Ko({...e,isVisibleThroughFrameFn:Ro}),Jo=e=>Ko({...e,isVisibleThroughFrameFn:zo}),Yo=e=>Ko({...e,isVisibleThroughFrameFn:Ho(e.destination.axis)}),Xo=(e,t,n)=>{if(typeof n==`boolean`)return n;if(!t)return!0;let{invisible:r,visible:i}=t;if(r[e])return!1;let a=i[e];return a?a.shouldAnimate:!0};function Zo(e,t){let n=e.page.marginBox;return ja(Ma(n,{top:t.point.y,right:0,bottom:0,left:t.point.x}))}function Qo({afterDragging:e,destination:t,displacedBy:n,viewport:r,forceShouldAnimate:i,last:a}){return e.reduce(function(e,o){let s=Zo(o,n),c=o.descriptor.id;if(e.all.push(c),!qo({target:s,destination:t,viewport:r,withDroppableDisplacement:!0}))return e.invisible[o.descriptor.id]=!0,e;let l={draggableId:c,shouldAnimate:Xo(c,a,i)};return e.visible[c]=l,e},{all:[],visible:{},invisible:{}})}function $o(e,t){if(!e.length)return 0;let n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function es({insideDestination:e,inHomeList:t,displacedBy:n,destination:r}){let i=$o(e,{inHomeList:t});return{displaced:Fo,displacedBy:n,at:{type:`REORDER`,destination:{droppableId:r.descriptor.id,index:i}}}}function ts({draggable:e,insideDestination:t,destination:n,viewport:r,displacedBy:i,last:a,index:o,forceShouldAnimate:s}){let c=No(e,n);if(o==null)return es({insideDestination:t,inHomeList:c,displacedBy:i,destination:n});let l=t.find(e=>e.descriptor.index===o);if(!l)return es({insideDestination:t,inHomeList:c,displacedBy:i,destination:n});let u=jo(e,t),d=t.indexOf(l);return{displaced:Qo({afterDragging:u.slice(d),destination:n,displacedBy:i,last:a,viewport:r.frame,forceShouldAnimate:s}),displacedBy:i,at:{type:`REORDER`,destination:{droppableId:n.descriptor.id,index:o}}}}function ns(e,t){return!!t.effected[e]}var rs=({isMovingForward:e,destination:t,draggables:n,combine:r,afterCritical:i})=>{if(!t.isCombineEnabled)return null;let a=r.draggableId,o=n[a].descriptor.index;return ns(a,i)?e?o:o-1:e?o+1:o},is=({isMovingForward:e,isInHomeList:t,insideDestination:n,location:r})=>{if(!n.length)return null;let i=r.index,a=e?i+1:i-1,o=n[0].descriptor.index,s=n[n.length-1].descriptor.index,c=t?s:s+1;return a<o||a>c?null:a},as=({isMovingForward:e,isInHomeList:t,draggable:n,draggables:r,destination:i,insideDestination:a,previousImpact:o,viewport:s,afterCritical:c})=>{let l=o.at;if(!l&&W(),l.type===`REORDER`){let r=is({isMovingForward:e,isInHomeList:t,location:l.destination,insideDestination:a});return r==null?null:ts({draggable:n,insideDestination:a,destination:i,viewport:s,last:o.displaced,displacedBy:o.displacedBy,index:r})}let u=rs({isMovingForward:e,destination:i,displaced:o.displaced,draggables:r,combine:l.combine,afterCritical:c});return u==null?null:ts({draggable:n,insideDestination:a,destination:i,viewport:s,last:o.displaced,displacedBy:o.displacedBy,index:u})},os=({displaced:e,afterCritical:t,combineWith:n,displacedBy:r})=>{let i=!!(e.visible[n]||e.invisible[n]);return ns(n,t)?i?q:lo(r.point):i?r.point:q},ss=({afterCritical:e,impact:t,draggables:n})=>{let r=Ao(t);!r&&W();let i=r.draggableId,a=n[i].page.borderBox.center;return J(a,os({displaced:t.displaced,afterCritical:e,combineWith:i,displacedBy:t.displacedBy}))},cs=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,ls=(e,t)=>t.margin[e.end]+t.borderBox[e.size]/2,us=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,ds=({axis:e,moveRelativeTo:t,isMoving:n})=>uo(e.line,t.marginBox[e.end]+cs(e,n),us(e,t.marginBox,n)),fs=({axis:e,moveRelativeTo:t,isMoving:n})=>uo(e.line,t.marginBox[e.start]-ls(e,n),us(e,t.marginBox,n)),ps=({axis:e,moveInto:t,isMoving:n})=>uo(e.line,t.contentBox[e.start]+cs(e,n),us(e,t.contentBox,n)),ms=({impact:e,draggable:t,draggables:n,droppable:r,afterCritical:i})=>{let a=Oo(r.descriptor.id,n),o=t.page,s=r.axis;if(!a.length)return ps({axis:s,moveInto:r.page,isMoving:o});let{displaced:c,displacedBy:l}=e,u=c.all[0];if(u){let e=n[u];return ns(u,i)?fs({axis:s,moveRelativeTo:e.page,isMoving:o}):fs({axis:s,moveRelativeTo:za(e.page,l.point),isMoving:o})}let d=a[a.length-1];return d.descriptor.id===t.descriptor.id?o.borderBox.center:ns(d.descriptor.id,i)?ds({axis:s,moveRelativeTo:za(d.page,lo(i.displacedBy.point)),isMoving:o}):ds({axis:s,moveRelativeTo:d.page,isMoving:o})},hs=(e,t)=>{let n=e.frame;return n?J(t,n.scroll.diff.displacement):t},gs=({impact:e,draggable:t,droppable:n,draggables:r,afterCritical:i})=>{let a=t.page.borderBox.center,o=e.at;return!n||!o?a:o.type===`REORDER`?ms({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:i}):ss({impact:e,draggables:r,afterCritical:i})},_s=e=>{let t=gs(e),n=e.droppable;return n?hs(n,t):t},vs=(e,t)=>{let n=Y(t,e.scroll.initial),r=lo(n);return{frame:ja({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function ys(e,t){return e.map(e=>t[e])}function bs(e,t){for(let n=0;n<t.length;n++){let r=t[n].visible[e];if(r)return r}return null}var xs=({impact:e,viewport:t,destination:n,draggables:r,maxScrollChange:i})=>{let a=vs(t,J(t.scroll.current,i)),o=n.frame?Co(n,J(n.frame.scroll.current,i)):n,s=e.displaced,c=Qo({afterDragging:ys(s.all,r),destination:n,displacedBy:e.displacedBy,viewport:a.frame,last:s,forceShouldAnimate:!1}),l=Qo({afterDragging:ys(s.all,r),destination:o,displacedBy:e.displacedBy,viewport:t.frame,last:s,forceShouldAnimate:!1}),u={},d={},f=[s,c,l];return s.all.forEach(e=>{let t=bs(e,f);if(t){d[e]=t;return}u[e]=!0}),{...e,displaced:{all:s.all,invisible:u,visible:d}}},Ss=(e,t)=>J(e.scroll.diff.displacement,t),Cs=({pageBorderBoxCenter:e,draggable:t,viewport:n})=>{let r=Y(Ss(n,e),t.page.borderBox.center);return J(t.client.borderBox.center,r)},ws=({draggable:e,destination:t,newPageBorderBoxCenter:n,viewport:r,withDroppableDisplacement:i,onlyOnMainAxis:a=!1})=>{let o=Y(n,e.page.borderBox.center),s={target:go(e.page.borderBox,o),destination:t,withDroppableDisplacement:i,viewport:r};return a?Yo(s):Jo(s)},Ts=({isMovingForward:e,draggable:t,destination:n,draggables:r,previousImpact:i,viewport:a,previousPageBorderBoxCenter:o,previousClientSelection:s,afterCritical:c})=>{if(!n.isEnabled)return null;let l=Oo(n.descriptor.id,r),u=No(t,n),d=Mo({isMovingForward:e,draggable:t,destination:n,insideDestination:l,previousImpact:i})||as({isMovingForward:e,isInHomeList:u,draggable:t,draggables:r,destination:n,insideDestination:l,previousImpact:i,viewport:a,afterCritical:c});if(!d)return null;let f=_s({impact:d,draggable:t,droppable:n,draggables:r,afterCritical:c});if(ws({draggable:t,destination:n,newPageBorderBoxCenter:f,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:Cs({pageBorderBoxCenter:f,draggable:t,viewport:a}),impact:d,scrollJumpRequest:null};let p=Y(f,o);return{clientSelection:s,impact:xs({impact:d,viewport:a,destination:n,draggables:r,maxScrollChange:p}),scrollJumpRequest:p}},Z=e=>{let t=e.subject.active;return!t&&W(),t},Es=({isMovingForward:e,pageBorderBoxCenter:t,source:n,droppables:r,viewport:i})=>{let a=n.subject.active;if(!a)return null;let o=n.axis,s=Lo(a[o.start],a[o.end]),c=Eo(r).filter(e=>e!==n).filter(e=>e.isEnabled).filter(e=>!!e.subject.active).filter(e=>Ro(i.frame)(Z(e))).filter(t=>{let n=Z(t);return e?a[o.crossAxisEnd]<n[o.crossAxisEnd]:n[o.crossAxisStart]<a[o.crossAxisStart]}).filter(e=>{let t=Z(e),n=Lo(t[o.start],t[o.end]);return s(t[o.start])||s(t[o.end])||n(a[o.start])||n(a[o.end])}).sort((t,n)=>{let r=Z(t)[o.crossAxisStart],i=Z(n)[o.crossAxisStart];return e?r-i:i-r}).filter((e,t,n)=>Z(e)[o.crossAxisStart]===Z(n[0])[o.crossAxisStart]);if(!c.length)return null;if(c.length===1)return c[0];let l=c.filter(e=>Lo(Z(e)[o.start],Z(e)[o.end])(t[o.line]));return l.length===1?l[0]:l.length>1?l.sort((e,t)=>Z(e)[o.start]-Z(t)[o.start])[0]:c.sort((e,n)=>{let r=po(t,_o(Z(e))),i=po(t,_o(Z(n)));return r===i?Z(e)[o.start]-Z(n)[o.start]:r-i})[0]},Ds=(e,t)=>{let n=e.page.borderBox.center;return ns(e.descriptor.id,t)?Y(n,t.displacedBy.point):n},Os=(e,t)=>{let n=e.page.borderBox;return ns(e.descriptor.id,t)?go(n,lo(t.displacedBy.point)):n},ks=({pageBorderBoxCenter:e,viewport:t,destination:n,insideDestination:r,afterCritical:i})=>r.filter(e=>Jo({target:Os(e,i),destination:n,viewport:t.frame,withDroppableDisplacement:!0})).sort((t,r)=>{let a=fo(e,hs(n,Ds(t,i))),o=fo(e,hs(n,Ds(r,i)));return a<o?-1:o<a?1:t.descriptor.index-r.descriptor.index})[0]||null,As=X(function(e,t){let n=t[e.line];return{value:n,point:uo(e.line,n)}}),js=(e,t,n)=>{let r=e.axis;if(e.descriptor.mode===`virtual`)return uo(r.line,t[r.line]);let i=e.subject.page.contentBox[r.size],a=Oo(e.descriptor.id,n).reduce((e,t)=>e+t.client.marginBox[r.size],0)+t[r.line]-i;return a<=0?null:uo(r.line,a)},Ms=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),Ns=(e,t,n)=>{let r=e.frame;No(t,e)&&W(),e.subject.withPlaceholder&&W();let i=As(e.axis,t.displaceBy).point,a=js(e,i,n),o={placeholderSize:i,increasedBy:a,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){let t=So({page:e.subject.page,withPlaceholder:o,axis:e.axis,frame:e.frame});return{...e,subject:t}}let s=Ms(r,a?J(r.scroll.max,a):r.scroll.max),c=So({page:e.subject.page,withPlaceholder:o,axis:e.axis,frame:s});return{...e,subject:c,frame:s}},Ps=e=>{let t=e.subject.withPlaceholder;!t&&W();let n=e.frame;if(!n){let t=So({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:t}}let r=t.oldFrameMaxScroll;!r&&W();let i=Ms(n,r),a=So({page:e.subject.page,axis:e.axis,frame:i,withPlaceholder:null});return{...e,subject:a,frame:i}},Fs=({previousPageBorderBoxCenter:e,moveRelativeTo:t,insideDestination:n,draggable:r,draggables:i,destination:a,viewport:o,afterCritical:s})=>{if(!t){if(n.length)return null;let e={displaced:Fo,displacedBy:Po,at:{type:`REORDER`,destination:{droppableId:a.descriptor.id,index:0}}},t=_s({impact:e,draggable:r,droppable:a,draggables:i,afterCritical:s});return ws({draggable:r,destination:No(r,a)?a:Ns(a,r,i),newPageBorderBoxCenter:t,viewport:o.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?e:null}let c=e[a.axis.line]<=t.page.borderBox.center[a.axis.line],l=(()=>{let e=t.descriptor.index;return t.descriptor.id===r.descriptor.id||c?e:e+1})();return ts({draggable:r,insideDestination:n,destination:a,viewport:o,displacedBy:As(a.axis,r.displaceBy),last:Fo,index:l})},Is=({isMovingForward:e,previousPageBorderBoxCenter:t,draggable:n,isOver:r,draggables:i,droppables:a,viewport:o,afterCritical:s})=>{let c=Es({isMovingForward:e,pageBorderBoxCenter:t,source:r,droppables:a,viewport:o});if(!c)return null;let l=Oo(c.descriptor.id,i),u=Fs({previousPageBorderBoxCenter:t,destination:c,draggable:n,draggables:i,moveRelativeTo:ks({pageBorderBoxCenter:t,viewport:o,destination:c,insideDestination:l,afterCritical:s}),insideDestination:l,viewport:o,afterCritical:s});return u?{clientSelection:Cs({pageBorderBoxCenter:_s({impact:u,draggable:n,droppable:c,draggables:i,afterCritical:s}),draggable:n,viewport:o}),impact:u,scrollJumpRequest:null}:null},Ls=e=>{let t=e.at;return t?t.type===`REORDER`?t.destination.droppableId:t.combine.droppableId:null},Rs=(e,t)=>{let n=Ls(e);return n?t[n]:null},zs=({state:e,type:t})=>{let n=Rs(e.impact,e.dimensions.droppables),r=!!n,i=e.dimensions.droppables[e.critical.droppable.id],a=n||i,o=a.axis.direction,s=o===`vertical`&&(t===`MOVE_UP`||t===`MOVE_DOWN`)||o===`horizontal`&&(t===`MOVE_LEFT`||t===`MOVE_RIGHT`);if(s&&!r)return null;let c=t===`MOVE_DOWN`||t===`MOVE_RIGHT`,l=e.dimensions.draggables[e.critical.draggable.id],u=e.current.page.borderBoxCenter,{draggables:d,droppables:f}=e.dimensions;return s?Ts({isMovingForward:c,previousPageBorderBoxCenter:u,draggable:l,destination:a,draggables:d,viewport:e.viewport,previousClientSelection:e.current.client.selection,previousImpact:e.impact,afterCritical:e.afterCritical}):Is({isMovingForward:c,previousPageBorderBoxCenter:u,draggable:l,isOver:a,draggables:d,droppables:f,viewport:e.viewport,afterCritical:e.afterCritical})};function Bs(e){return e.phase===`DRAGGING`||e.phase===`COLLECTING`}function Vs(e){let t=Lo(e.top,e.bottom),n=Lo(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}function Hs(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function Us({pageBorderBox:e,draggable:t,candidates:n}){let r=t.page.borderBox.center,i=n.map(t=>{let n=t.axis,i=uo(t.axis.line,e.center[n.line],t.page.borderBox.center[n.crossAxisLine]);return{id:t.descriptor.id,distance:fo(r,i)}}).sort((e,t)=>t.distance-e.distance);return i[0]?i[0].id:null}function Ws({pageBorderBox:e,draggable:t,droppables:n}){let r=Eo(n).filter(t=>{if(!t.isEnabled)return!1;let n=t.subject.active;if(!n||!Hs(e,n))return!1;if(Vs(n)(e.center))return!0;let r=t.axis,i=n.center[r.crossAxisLine],a=e[r.crossAxisStart],o=e[r.crossAxisEnd],s=Lo(n[r.crossAxisStart],n[r.crossAxisEnd]),c=s(a),l=s(o);return!c&&!l?!0:c?a<i:o>i});return r.length?r.length===1?r[0].descriptor.id:Us({pageBorderBox:e,draggable:t,candidates:r}):null}var Gs=(e,t)=>ja(go(e,t)),Ks=(e,t)=>{let n=e.frame;return n?Gs(t,n.scroll.diff.value):t};function qs({displaced:e,id:t}){return!!(e.visible[t]||e.invisible[t])}function Js({draggable:e,closest:t,inHomeList:n}){return t?n&&t.descriptor.index>e.descriptor.index?t.descriptor.index-1:t.descriptor.index:null}var Ys=({pageBorderBoxWithDroppableScroll:e,draggable:t,destination:n,insideDestination:r,last:i,viewport:a,afterCritical:o})=>{let s=n.axis,c=As(n.axis,t.displaceBy),l=c.value,u=e[s.start],d=e[s.end];return ts({draggable:t,insideDestination:r,destination:n,viewport:a,last:i,displacedBy:c,index:Js({draggable:t,closest:jo(t,r).find(e=>{let t=e.descriptor.id,n=e.page.borderBox.center[s.line],r=ns(t,o),a=qs({displaced:i,id:t});return r?a?d<=n:u<n-l:a?d<=n+l:u<n})||null,inHomeList:No(t,n)})})},Xs=4,Zs=({draggable:e,pageBorderBoxWithDroppableScroll:t,previousImpact:n,destination:r,insideDestination:i,afterCritical:a})=>{if(!r.isCombineEnabled)return null;let o=r.axis,s=As(r.axis,e.displaceBy),c=s.value,l=t[o.start],u=t[o.end],d=jo(e,i).find(e=>{let t=e.descriptor.id,r=e.page.borderBox,i=r[o.size]/Xs,s=ns(t,a),d=qs({displaced:n.displaced,id:t});return s?d?u>r[o.start]+i&&u<r[o.end]-i:l>r[o.start]-c+i&&l<r[o.end]-c-i:d?u>r[o.start]+c+i&&u<r[o.end]+c-i:l>r[o.start]+i&&l<r[o.end]-i});return d?{displacedBy:s,displaced:n.displaced,at:{type:`COMBINE`,combine:{draggableId:d.descriptor.id,droppableId:r.descriptor.id}}}:null},Qs=({pageOffset:e,draggable:t,draggables:n,droppables:r,previousImpact:i,viewport:a,afterCritical:o})=>{let s=Gs(t.page.borderBox,e),c=Ws({pageBorderBox:s,draggable:t,droppables:r});if(!c)return Io;let l=r[c],u=Oo(l.descriptor.id,n),d=Ks(l,s);return Zs({pageBorderBoxWithDroppableScroll:d,draggable:t,previousImpact:i,destination:l,insideDestination:u,afterCritical:o})||Ys({pageBorderBoxWithDroppableScroll:d,draggable:t,destination:l,insideDestination:u,last:i.displaced,viewport:a,afterCritical:o})},$s=(e,t)=>({...e,[t.descriptor.id]:t}),ec=({previousImpact:e,impact:t,droppables:n})=>{let r=Ls(e),i=Ls(t);if(!r||r===i)return n;let a=n[r];return a.subject.withPlaceholder?$s(n,Ps(a)):n},tc=({draggable:e,draggables:t,droppables:n,previousImpact:r,impact:i})=>{let a=ec({previousImpact:r,impact:i,droppables:n}),o=Ls(i);if(!o)return a;let s=n[o];return No(e,s)||s.subject.withPlaceholder?a:$s(a,Ns(s,e,t))},nc=({state:e,clientSelection:t,dimensions:n,viewport:r,impact:i,scrollJumpRequest:a})=>{let o=r||e.viewport,s=n||e.dimensions,c=t||e.current.client.selection,l=Y(c,e.initial.client.selection),u={offset:l,selection:c,borderBoxCenter:J(e.initial.client.borderBoxCenter,l)},d={selection:J(u.selection,o.scroll.current),borderBoxCenter:J(u.borderBoxCenter,o.scroll.current),offset:J(u.offset,o.scroll.diff.value)},f={client:u,page:d};if(e.phase===`COLLECTING`)return{...e,dimensions:s,viewport:o,current:f};let p=s.draggables[e.critical.draggable.id],m=i||Qs({pageOffset:d.offset,draggable:p,draggables:s.draggables,droppables:s.droppables,previousImpact:e.impact,viewport:o,afterCritical:e.afterCritical}),h=tc({draggable:p,impact:m,previousImpact:e.impact,draggables:s.draggables,droppables:s.droppables});return{...e,current:f,dimensions:{draggables:s.draggables,droppables:h},impact:m,viewport:o,scrollJumpRequest:a||null,forceShouldAnimate:a?!1:null}};function rc(e,t){return e.map(e=>t[e])}var ic=({impact:e,viewport:t,draggables:n,destination:r,forceShouldAnimate:i})=>{let a=e.displaced,o=Qo({afterDragging:rc(a.all,n),destination:r,displacedBy:e.displacedBy,viewport:t.frame,forceShouldAnimate:i,last:a});return{...e,displaced:o}},ac=({impact:e,draggable:t,droppable:n,draggables:r,viewport:i,afterCritical:a})=>Cs({pageBorderBoxCenter:_s({impact:e,draggable:t,draggables:r,droppable:n,afterCritical:a}),draggable:t,viewport:i}),oc=({state:e,dimensions:t,viewport:n})=>{e.movementMode!==`SNAP`&&W();let r=e.impact,i=n||e.viewport,a=t||e.dimensions,{draggables:o,droppables:s}=a,c=o[e.critical.draggable.id],l=Ls(r);!l&&W();let u=s[l],d=ic({impact:r,viewport:i,destination:u,draggables:o});return nc({impact:d,clientSelection:ac({impact:d,draggable:c,droppable:u,draggables:o,viewport:i,afterCritical:e.afterCritical}),state:e,dimensions:a,viewport:i})},sc=e=>({index:e.index,droppableId:e.droppableId}),cc=({draggable:e,home:t,draggables:n,viewport:r})=>{let i=As(t.axis,e.displaceBy),a=Oo(t.descriptor.id,n),o=a.indexOf(e);o===-1&&W();let s=a.slice(o+1),c=s.reduce((e,t)=>(e[t.descriptor.id]=!0,e),{}),l={inVirtualList:t.descriptor.mode===`virtual`,displacedBy:i,effected:c};return{impact:{displaced:Qo({afterDragging:s,destination:t,displacedBy:i,last:null,viewport:r.frame,forceShouldAnimate:!1}),displacedBy:i,at:{type:`REORDER`,destination:sc(e.descriptor)}},afterCritical:l}},lc=(e,t)=>({draggables:e.draggables,droppables:$s(e.droppables,t)}),uc=({draggable:e,offset:t,initialWindowScroll:n})=>{let r=za(e.client,t),i=Ba(r,n);return{...e,placeholder:{...e.placeholder,client:r},client:r,page:i}},dc=e=>{let t=e.frame;return!t&&W(),t},fc=({additions:e,updatedDroppables:t,viewport:n})=>{let r=n.scroll.diff.value;return e.map(e=>{let i=t[e.descriptor.droppableId],a=dc(i).scroll.diff.value;return uc({draggable:e,offset:J(r,a),initialWindowScroll:n.scroll.initial})})},pc=({state:e,published:t})=>{let n=t.modified.map(t=>{let n=e.dimensions.droppables[t.droppableId];return Co(n,t.scroll)}),r={...e.dimensions.droppables,...wo(n)},i=To(fc({additions:t.additions,updatedDroppables:r,viewport:e.viewport})),a={...e.dimensions.draggables,...i};t.removals.forEach(e=>{delete a[e]});let o={droppables:r,draggables:a},s=Ls(e.impact),c=s?o.droppables[s]:null,l=o.draggables[e.critical.draggable.id],u=o.droppables[e.critical.droppable.id],{impact:d,afterCritical:f}=cc({draggable:l,home:u,draggables:a,viewport:e.viewport}),p=c&&c.isCombineEnabled?e.impact:d,m=Qs({pageOffset:e.current.page.offset,draggable:o.draggables[e.critical.draggable.id],draggables:o.draggables,droppables:o.droppables,previousImpact:p,viewport:e.viewport,afterCritical:f}),h={...e,phase:`DRAGGING`,impact:m,onLiftImpact:d,dimensions:o,afterCritical:f,forceShouldAnimate:!1};return e.phase===`COLLECTING`?h:{...h,phase:`DROP_PENDING`,reason:e.reason,isWaiting:!1}},mc=e=>e.movementMode===`SNAP`,hc=(e,t,n)=>{let r=lc(e.dimensions,t);return!mc(e)||n?nc({state:e,dimensions:r}):oc({state:e,dimensions:r})};function gc(e){return e.isDragging&&e.movementMode===`SNAP`?{...e,scrollJumpRequest:null}:e}var _c={phase:`IDLE`,completed:null,shouldFlush:!1},vc=(e=_c,t)=>{if(t.type===`FLUSH`)return{..._c,shouldFlush:!0};if(t.type===`INITIAL_PUBLISH`){e.phase!==`IDLE`&&W();let{critical:n,clientSelection:r,viewport:i,dimensions:a,movementMode:o}=t.payload,s=a.draggables[n.draggable.id],c=a.droppables[n.droppable.id],l={selection:r,borderBoxCenter:s.client.borderBox.center,offset:q},u={client:l,page:{selection:J(l.selection,i.scroll.initial),borderBoxCenter:J(l.selection,i.scroll.initial),offset:J(l.selection,i.scroll.diff.value)}},d=Eo(a.droppables).every(e=>!e.isFixedOnPage),{impact:f,afterCritical:p}=cc({draggable:s,home:c,draggables:a.draggables,viewport:i});return{phase:`DRAGGING`,isDragging:!0,critical:n,movementMode:o,dimensions:a,initial:u,current:u,isWindowScrollAllowed:d,impact:f,afterCritical:p,onLiftImpact:f,viewport:i,scrollJumpRequest:null,forceShouldAnimate:null}}if(t.type===`COLLECTION_STARTING`)return e.phase===`COLLECTING`||e.phase===`DROP_PENDING`?e:(e.phase!==`DRAGGING`&&W(),{...e,phase:`COLLECTING`});if(t.type===`PUBLISH_WHILE_DRAGGING`)return!(e.phase===`COLLECTING`||e.phase===`DROP_PENDING`)&&W(),pc({state:e,published:t.payload});if(t.type===`MOVE`){if(e.phase===`DROP_PENDING`)return e;!Bs(e)&&W();let{client:n}=t.payload;return co(n,e.current.client.selection)?e:nc({state:e,clientSelection:n,impact:mc(e)?e.impact:null})}if(t.type===`UPDATE_DROPPABLE_SCROLL`){if(e.phase===`DROP_PENDING`||e.phase===`COLLECTING`)return gc(e);!Bs(e)&&W();let{id:n,newScroll:r}=t.payload,i=e.dimensions.droppables[n];return i?hc(e,Co(i,r),!1):e}if(t.type===`UPDATE_DROPPABLE_IS_ENABLED`){if(e.phase===`DROP_PENDING`)return e;!Bs(e)&&W();let{id:n,isEnabled:r}=t.payload,i=e.dimensions.droppables[n];return!i&&W(),i.isEnabled===r&&W(),hc(e,{...i,isEnabled:r},!0)}if(t.type===`UPDATE_DROPPABLE_IS_COMBINE_ENABLED`){if(e.phase===`DROP_PENDING`)return e;!Bs(e)&&W();let{id:n,isCombineEnabled:r}=t.payload,i=e.dimensions.droppables[n];return!i&&W(),i.isCombineEnabled===r&&W(),hc(e,{...i,isCombineEnabled:r},!0)}if(t.type===`MOVE_BY_WINDOW_SCROLL`){if(e.phase===`DROP_PENDING`||e.phase===`DROP_ANIMATING`)return e;!Bs(e)&&W(),!e.isWindowScrollAllowed&&W();let n=t.payload.newScroll;if(co(e.viewport.scroll.current,n))return gc(e);let r=vs(e.viewport,n);return mc(e)?oc({state:e,viewport:r}):nc({state:e,viewport:r})}if(t.type===`UPDATE_VIEWPORT_MAX_SCROLL`){if(!Bs(e))return e;let n=t.payload.maxScroll;if(co(n,e.viewport.scroll.max))return e;let r={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:r}}if(t.type===`MOVE_UP`||t.type===`MOVE_DOWN`||t.type===`MOVE_LEFT`||t.type===`MOVE_RIGHT`){if(e.phase===`COLLECTING`||e.phase===`DROP_PENDING`)return e;e.phase!==`DRAGGING`&&W();let n=zs({state:e,type:t.type});return n?nc({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if(t.type===`DROP_PENDING`){let n=t.payload.reason;return e.phase!==`COLLECTING`&&W(),{...e,phase:`DROP_PENDING`,isWaiting:!0,reason:n}}if(t.type===`DROP_ANIMATE`){let{completed:n,dropDuration:r,newHomeClientOffset:i}=t.payload;return!(e.phase===`DRAGGING`||e.phase===`DROP_PENDING`)&&W(),{phase:`DROP_ANIMATING`,completed:n,dropDuration:r,newHomeClientOffset:i,dimensions:e.dimensions}}if(t.type===`DROP_COMPLETE`){let{completed:e}=t.payload;return{phase:`IDLE`,completed:e,shouldFlush:!1}}return e};function Q(e,t){return e instanceof Object&&`type`in e&&e.type===t}var yc=e=>({type:`BEFORE_INITIAL_CAPTURE`,payload:e}),bc=e=>({type:`LIFT`,payload:e}),xc=e=>({type:`INITIAL_PUBLISH`,payload:e}),Sc=e=>({type:`PUBLISH_WHILE_DRAGGING`,payload:e}),Cc=()=>({type:`COLLECTION_STARTING`,payload:null}),wc=e=>({type:`UPDATE_DROPPABLE_SCROLL`,payload:e}),Tc=e=>({type:`UPDATE_DROPPABLE_IS_ENABLED`,payload:e}),Ec=e=>({type:`UPDATE_DROPPABLE_IS_COMBINE_ENABLED`,payload:e}),Dc=e=>({type:`MOVE`,payload:e}),Oc=e=>({type:`MOVE_BY_WINDOW_SCROLL`,payload:e}),kc=e=>({type:`UPDATE_VIEWPORT_MAX_SCROLL`,payload:e}),Ac=()=>({type:`MOVE_UP`,payload:null}),jc=()=>({type:`MOVE_DOWN`,payload:null}),Mc=()=>({type:`MOVE_RIGHT`,payload:null}),Nc=()=>({type:`MOVE_LEFT`,payload:null}),Pc=()=>({type:`FLUSH`,payload:null}),Fc=e=>({type:`DROP_ANIMATE`,payload:e}),Ic=e=>({type:`DROP_COMPLETE`,payload:e}),Lc=e=>({type:`DROP`,payload:e}),Rc=e=>({type:`DROP_PENDING`,payload:e}),zc=()=>({type:`DROP_ANIMATION_FINISHED`,payload:null}),Bc=e=>({getState:t,dispatch:n})=>r=>i=>{if(!Q(i,`LIFT`)){r(i);return}let{id:a,clientSelection:o,movementMode:s}=i.payload,c=t();c.phase===`DROP_ANIMATING`&&n(Ic({completed:c.completed})),t().phase!==`IDLE`&&W(),n(Pc()),n(yc({draggableId:a,movementMode:s}));let l={draggableId:a,scrollOptions:{shouldPublishImmediately:s===`SNAP`}},{critical:u,dimensions:d,viewport:f}=e.startPublishing(l);n(xc({critical:u,dimensions:d,clientSelection:o,movementMode:s,viewport:f}))},Vc=e=>()=>t=>n=>{Q(n,`INITIAL_PUBLISH`)&&e.dragging(),Q(n,`DROP_ANIMATE`)&&e.dropping(n.payload.completed.result.reason),(Q(n,`FLUSH`)||Q(n,`DROP_COMPLETE`))&&e.resting(),t(n)},Hc={outOfTheWay:`cubic-bezier(0.2, 0, 0, 1)`,drop:`cubic-bezier(.2,1,.1,1)`},Uc={opacity:{drop:0,combining:.7},scale:{drop:.75}},Wc={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Gc=`${Wc.outOfTheWay}s ${Hc.outOfTheWay}`,Kc={fluid:`opacity ${Gc}`,snap:`transform ${Gc}, opacity ${Gc}`,drop:e=>{let t=`${e}s ${Hc.drop}`;return`transform ${t}, opacity ${t}`},outOfTheWay:`transform ${Gc}`,placeholder:`height ${Gc}, width ${Gc}, margin ${Gc}`},qc=e=>co(e,q)?void 0:`translate(${e.x}px, ${e.y}px)`,Jc={moveTo:qc,drop:(e,t)=>{let n=qc(e);if(n)return t?`${n} scale(${Uc.scale.drop})`:n}},{minDropTime:Yc,maxDropTime:Xc}=Wc,Zc=Xc-Yc,Qc=1500,$c=.6,el=({current:e,destination:t,reason:n})=>{let r=fo(e,t);if(r<=0)return Yc;if(r>=Qc)return Xc;let i=Yc+r/Qc*Zc,a=n===`CANCEL`?i*$c:i;return Number(a.toFixed(2))},tl=({impact:e,draggable:t,dimensions:n,viewport:r,afterCritical:i})=>{let{draggables:a,droppables:o}=n,s=Ls(e),c=s?o[s]:null,l=o[t.descriptor.droppableId];return Y(ac({impact:e,draggable:t,draggables:a,afterCritical:i,droppable:c||l,viewport:r}),t.client.borderBox.center)},nl=({draggables:e,reason:t,lastImpact:n,home:r,viewport:i,onLiftImpact:a})=>!n.at||t!==`DROP`?{impact:ic({draggables:e,impact:a,destination:r,viewport:i,forceShouldAnimate:!0}),didDropInsideDroppable:!1}:n.at.type===`REORDER`?{impact:n,didDropInsideDroppable:!0}:{impact:{...n,displaced:Fo},didDropInsideDroppable:!0},rl=({getState:e,dispatch:t})=>n=>r=>{if(!Q(r,`DROP`)){n(r);return}let i=e(),a=r.payload.reason;if(i.phase===`COLLECTING`){t(Rc({reason:a}));return}if(i.phase===`IDLE`)return;i.phase===`DROP_PENDING`&&i.isWaiting&&W(),!(i.phase===`DRAGGING`||i.phase===`DROP_PENDING`)&&W();let o=i.critical,s=i.dimensions,c=s.draggables[i.critical.draggable.id],{impact:l,didDropInsideDroppable:u}=nl({reason:a,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),d=u?ko(l):null,f=u?Ao(l):null,p={index:o.draggable.index,droppableId:o.droppable.id},m={draggableId:c.descriptor.id,type:c.descriptor.type,source:p,reason:a,mode:i.movementMode,destination:d,combine:f},h=tl({impact:l,draggable:c,dimensions:s,viewport:i.viewport,afterCritical:i.afterCritical}),g={critical:i.critical,afterCritical:i.afterCritical,result:m,impact:l};if(!(!co(i.current.client.offset,h)||m.combine)){t(Ic({completed:g}));return}t(Fc({newHomeClientOffset:h,dropDuration:el({current:i.current.client.offset,destination:h,reason:a}),completed:g}))},il=()=>({x:window.pageXOffset,y:window.pageYOffset});function al(e){return{eventName:`scroll`,options:{passive:!0,capture:!1},fn:t=>{t.target!==window&&t.target!==window.document||e()}}}function ol({onWindowScroll:e}){function t(){e(il())}let n=Ua(t),r=al(n),i=Ka;function a(){return i!==Ka}function o(){a()&&W(),i=Ja(window,[r])}function s(){!a()&&W(),n.cancel(),i(),i=Ka}return{start:o,stop:s,isActive:a}}var sl=e=>Q(e,`DROP_COMPLETE`)||Q(e,`DROP_ANIMATE`)||Q(e,`FLUSH`),cl=e=>{let t=ol({onWindowScroll:t=>{e.dispatch(Oc({newScroll:t}))}});return e=>n=>{!t.isActive()&&Q(n,`INITIAL_PUBLISH`)&&t.start(),t.isActive()&&sl(n)&&t.stop(),e(n)}},ll=e=>{let t=!1,n=!1,r=setTimeout(()=>{n=!0}),i=i=>{t||n||(t=!0,e(i),clearTimeout(r))};return i.wasCalled=()=>t,i},ul=()=>{let e=[],t=t=>{let n=e.findIndex(e=>e.timerId===t);n===-1&&W();let[r]=e.splice(n,1);r.callback()};return{add:n=>{let r=setTimeout(()=>t(r)),i={timerId:r,callback:n};e.push(i)},flush:()=>{if(!e.length)return;let t=[...e];e.length=0,t.forEach(e=>{clearTimeout(e.timerId),e.callback()})}}},dl=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.droppableId===t.droppableId&&e.index===t.index,fl=(e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.draggableId===t.draggableId&&e.droppableId===t.droppableId,pl=(e,t)=>{if(e===t)return!0;let n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r},ml=(e,t)=>{t()},hl=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function gl(e,t,n,r){if(!e){n(r(t));return}let i=ll(n);e(t,{announce:i}),i.wasCalled()||n(r(t))}var _l=(e,t)=>{let n=ul(),r=null,i=(t,n)=>{r&&W(),ml(`onBeforeCapture`,()=>{let r=e().onBeforeCapture;r&&r({draggableId:t,mode:n})})},a=(t,n)=>{r&&W(),ml(`onBeforeDragStart`,()=>{let r=e().onBeforeDragStart;r&&r(hl(t,n))})},o=(i,a)=>{r&&W();let o=hl(i,a);r={mode:a,lastCritical:i,lastLocation:o.source,lastCombine:null},n.add(()=>{ml(`onDragStart`,()=>gl(e().onDragStart,o,t,ao.onDragStart))})},s=(i,a)=>{let o=ko(a),s=Ao(a);!r&&W();let c=!pl(i,r.lastCritical);c&&(r.lastCritical=i);let l=!dl(r.lastLocation,o);l&&(r.lastLocation=o);let u=!fl(r.lastCombine,s);if(u&&(r.lastCombine=s),!c&&!l&&!u)return;let d={...hl(i,r.mode),combine:s,destination:o};n.add(()=>{ml(`onDragUpdate`,()=>gl(e().onDragUpdate,d,t,ao.onDragUpdate))})},c=()=>{!r&&W(),n.flush()},l=n=>{!r&&W(),r=null,ml(`onDragEnd`,()=>gl(e().onDragEnd,n,t,ao.onDragEnd))};return{beforeCapture:i,beforeStart:a,start:o,update:s,flush:c,drop:l,abort:()=>{r&&l({...hl(r.lastCritical,r.mode),combine:null,destination:null,reason:`CANCEL`})}}},vl=(e,t)=>{let n=_l(e,t);return e=>t=>r=>{if(Q(r,`BEFORE_INITIAL_CAPTURE`)){n.beforeCapture(r.payload.draggableId,r.payload.movementMode);return}if(Q(r,`INITIAL_PUBLISH`)){let e=r.payload.critical;n.beforeStart(e,r.payload.movementMode),t(r),n.start(e,r.payload.movementMode);return}if(Q(r,`DROP_COMPLETE`)){let e=r.payload.completed.result;n.flush(),t(r),n.drop(e);return}if(t(r),Q(r,`FLUSH`)){n.abort();return}let i=e.getState();i.phase===`DRAGGING`&&n.update(i.critical,i.impact)}},yl=e=>t=>n=>{if(!Q(n,`DROP_ANIMATION_FINISHED`)){t(n);return}let r=e.getState();r.phase!==`DROP_ANIMATING`&&W(),e.dispatch(Ic({completed:r.completed}))},bl=e=>{let t=null,n=null;function r(){n&&=(cancelAnimationFrame(n),null),t&&=(t(),null)}return i=>a=>{if((Q(a,`FLUSH`)||Q(a,`DROP_COMPLETE`)||Q(a,`DROP_ANIMATION_FINISHED`))&&r(),i(a),!Q(a,`DROP_ANIMATE`))return;let o={eventName:`scroll`,options:{capture:!0,passive:!1,once:!0},fn:function(){e.getState().phase===`DROP_ANIMATING`&&e.dispatch(zc())}};n=requestAnimationFrame(()=>{n=null,t=Ja(window,[o])})}},xl=e=>()=>t=>n=>{(Q(n,`DROP_COMPLETE`)||Q(n,`FLUSH`)||Q(n,`DROP_ANIMATE`))&&e.stopPublishing(),t(n)},Sl=e=>{let t=!1;return()=>n=>r=>{if(Q(r,`INITIAL_PUBLISH`)){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),t){if(Q(r,`FLUSH`)){t=!1,e.tryRestoreFocusRecorded();return}if(Q(r,`DROP_COMPLETE`)){t=!1;let n=r.payload.completed.result;n.combine&&e.tryShiftRecord(n.draggableId,n.combine.draggableId),e.tryRestoreFocusRecorded()}}}},Cl=e=>Q(e,`DROP_COMPLETE`)||Q(e,`DROP_ANIMATE`)||Q(e,`FLUSH`),wl=e=>t=>n=>r=>{if(Cl(r)){e.stop(),n(r);return}if(Q(r,`INITIAL_PUBLISH`)){n(r);let i=t.getState();i.phase!==`DRAGGING`&&W(),e.start(i);return}n(r),e.scroll(t.getState())},Tl=e=>t=>n=>{if(t(n),!Q(n,`PUBLISH_WHILE_DRAGGING`))return;let r=e.getState();r.phase===`DROP_PENDING`&&(r.isWaiting||e.dispatch(Lc({reason:r.reason})))},El=gi,Dl=({dimensionMarshal:e,focusMarshal:t,styleMarshal:n,getResponders:r,announce:i,autoScroller:a})=>pi(vc,El(_i(Vc(n),xl(e),Bc(e),rl,yl,bl,Tl,wl(a),cl,Sl(t),vl(r,i)))),Ol=()=>({additions:{},removals:{},modified:{}});function kl({registry:e,callbacks:t}){let n=Ol(),r=null,i=()=>{r||=(t.collectionStarting(),requestAnimationFrame(()=>{r=null;let{additions:i,removals:a,modified:o}=n,s=Object.keys(i).map(t=>e.draggable.getById(t).getDimension(q)).sort((e,t)=>e.descriptor.index-t.descriptor.index),c=Object.keys(o).map(t=>({droppableId:t,scroll:e.droppable.getById(t).callbacks.getScrollWhileDragging()})),l={additions:s,removals:Object.keys(a),modified:c};n=Ol(),t.publish(l)}))};return{add:e=>{let t=e.descriptor.id;n.additions[t]=e,n.modified[e.descriptor.droppableId]=!0,n.removals[t]&&delete n.removals[t],i()},remove:e=>{let t=e.descriptor;n.removals[t.id]=!0,n.modified[t.droppableId]=!0,n.additions[t.id]&&delete n.additions[t.id],i()},stop:()=>{r&&(cancelAnimationFrame(r),r=null,n=Ol())}}}var Al=({scrollHeight:e,scrollWidth:t,height:n,width:r})=>{let i=Y({x:t,y:e},{x:r,y:n});return{x:Math.max(0,i.x),y:Math.max(0,i.y)}},jl=()=>{let e=document.documentElement;return!e&&W(),e},Ml=()=>{let e=jl();return Al({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},Nl=()=>{let e=il(),t=Ml(),n=e.y,r=e.x,i=jl(),a=i.clientWidth,o=i.clientHeight;return{frame:ja({top:n,left:r,right:r+a,bottom:n+o}),scroll:{initial:e,current:e,max:t,diff:{value:q,displacement:q}}}},Pl=({critical:e,scrollOptions:t,registry:n})=>{let r=Nl(),i=r.scroll.current,a=e.droppable,o=n.droppable.getAllByType(a.type).map(e=>e.callbacks.getDimensionAndWatchScroll(i,t));return{dimensions:{draggables:To(n.draggable.getAllByType(e.draggable.type).map(e=>e.getDimension(i))),droppables:wo(o)},critical:e,viewport:r}};function Fl(e,t,n){return!(n.descriptor.id===t.id||n.descriptor.type!==t.type||e.droppable.getById(n.descriptor.droppableId).descriptor.mode!==`virtual`)}var Il=(e,t)=>{let n=null,r=kl({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=(r,i)=>{!e.droppable.exists(r)&&W(),n&&t.updateDroppableIsEnabled({id:r,isEnabled:i})},a=(r,i)=>{n&&(!e.droppable.exists(r)&&W(),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:i}))},o=(r,i)=>{n&&(!e.droppable.exists(r)&&W(),t.updateDroppableScroll({id:r,newScroll:i}))},s=(t,r)=>{n&&e.droppable.getById(t).callbacks.scroll(r)},c=()=>{if(!n)return;r.stop();let t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach(e=>e.callbacks.dragStopped()),n.unsubscribe(),n=null},l=t=>{!n&&W();let i=n.critical.draggable;t.type===`ADDITION`&&Fl(e,i,t.value)&&r.add(t.value),t.type===`REMOVAL`&&Fl(e,i,t.value)&&r.remove(t.value)};return{updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:a,scrollDroppable:s,updateDroppableScroll:o,startPublishing:t=>{n&&W();let r=e.draggable.getById(t.draggableId),i=e.droppable.getById(r.descriptor.droppableId),a={draggable:r.descriptor,droppable:i.descriptor};return n={critical:a,unsubscribe:e.subscribe(l)},Pl({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:c}},Ll=(e,t)=>e.phase===`IDLE`?!0:e.phase!==`DROP_ANIMATING`||e.completed.result.draggableId===t?!1:e.completed.result.reason===`DROP`,Rl=e=>{window.scrollBy(e.x,e.y)},zl=X(e=>Eo(e).filter(e=>!(!e.isEnabled||!e.frame))),Bl=(e,t)=>zl(t).find(t=>(!t.frame&&W(),Vs(t.frame.pageMarginBox)(e)))||null,Vl=({center:e,destination:t,droppables:n})=>{if(t){let e=n[t];return e.frame?e:null}return Bl(e,n)},Hl={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1},Ul=(e,t,n=()=>Hl)=>{let r=n();return{startScrollingFrom:e[t.size]*r.startFromPercentage,maxScrollValueAt:e[t.size]*r.maxScrollAtPercentage}},Wl=({startOfRange:e,endOfRange:t,current:n})=>{let r=t-e;return r===0?0:(n-e)/r},Gl=1,Kl=(e,t,n=()=>Hl)=>{let r=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return r.maxPixelScroll;if(e===t.startScrollingFrom)return Gl;let i=1-Wl({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),a=r.maxPixelScroll*r.ease(i);return Math.ceil(a)},ql=(e,t,n)=>{let r=n(),i=r.durationDampening.accelerateAt,a=r.durationDampening.stopDampeningAt,o=t,s=a,c=Date.now()-o;if(c>=a)return e;if(c<i)return Gl;let l=Wl({startOfRange:i,endOfRange:s,current:c}),u=e*r.ease(l);return Math.ceil(u)},Jl=({distanceToEdge:e,thresholds:t,dragStartTime:n,shouldUseTimeDampening:r,getAutoScrollerOptions:i})=>{let a=Kl(e,t,i);return a===0?0:r?Math.max(ql(a,n,i),Gl):a},Yl=({container:e,distanceToEdges:t,dragStartTime:n,axis:r,shouldUseTimeDampening:i,getAutoScrollerOptions:a})=>{let o=Ul(e,r,a);return t[r.end]<t[r.start]?Jl({distanceToEdge:t[r.end],thresholds:o,dragStartTime:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a}):-1*Jl({distanceToEdge:t[r.start],thresholds:o,dragStartTime:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a})},Xl=({container:e,subject:t,proposedScroll:n})=>{let r=t.height>e.height,i=t.width>e.width;return!i&&!r?n:i&&r?null:{x:i?0:n.x,y:r?0:n.y}},Zl=mo(e=>e===0?0:e),Ql=({dragStartTime:e,container:t,subject:n,center:r,shouldUseTimeDampening:i,getAutoScrollerOptions:a})=>{let o={top:r.y-t.top,right:t.right-r.x,bottom:t.bottom-r.y,left:r.x-t.left},s=Yl({container:t,distanceToEdges:o,dragStartTime:e,axis:Bo,shouldUseTimeDampening:i,getAutoScrollerOptions:a}),c=Zl({x:Yl({container:t,distanceToEdges:o,dragStartTime:e,axis:Vo,shouldUseTimeDampening:i,getAutoScrollerOptions:a}),y:s});if(co(c,q))return null;let l=Xl({container:t,subject:n,proposedScroll:c});return l?co(l,q)?null:l:null},$l=mo(e=>e===0?0:e>0?1:-1),eu=(()=>{let e=(e,t)=>e<0?e:e>t?e-t:0;return({current:t,max:n,change:r})=>{let i=J(t,r),a={x:e(i.x,n.x),y:e(i.y,n.y)};return co(a,q)?null:a}})(),tu=({max:e,current:t,change:n})=>{let r={x:Math.max(t.x,e.x),y:Math.max(t.y,e.y)},i=$l(n),a=eu({max:r,current:t,change:i});return!a||i.x!==0&&a.x===0||i.y!==0&&a.y===0},nu=(e,t)=>tu({current:e.scroll.current,max:e.scroll.max,change:t}),ru=(e,t)=>{if(!nu(e,t))return null;let n=e.scroll.max,r=e.scroll.current;return eu({current:r,max:n,change:t})},iu=(e,t)=>{let n=e.frame;return n?tu({current:n.scroll.current,max:n.scroll.max,change:t}):!1},au=(e,t)=>{let n=e.frame;return!n||!iu(e,t)?null:eu({current:n.scroll.current,max:n.scroll.max,change:t})},ou=({viewport:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:i,getAutoScrollerOptions:a})=>{let o=Ql({dragStartTime:r,container:e.frame,subject:t,center:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a});return o&&nu(e,o)?o:null},su=({droppable:e,subject:t,center:n,dragStartTime:r,shouldUseTimeDampening:i,getAutoScrollerOptions:a})=>{let o=e.frame;if(!o)return null;let s=Ql({dragStartTime:r,container:o.pageMarginBox,subject:t,center:n,shouldUseTimeDampening:i,getAutoScrollerOptions:a});return s&&iu(e,s)?s:null},cu=({state:e,dragStartTime:t,shouldUseTimeDampening:n,scrollWindow:r,scrollDroppable:i,getAutoScrollerOptions:a})=>{let o=e.current.page.borderBoxCenter,s=e.dimensions.draggables[e.critical.draggable.id].page.marginBox;if(e.isWindowScrollAllowed){let i=e.viewport,c=ou({dragStartTime:t,viewport:i,subject:s,center:o,shouldUseTimeDampening:n,getAutoScrollerOptions:a});if(c){r(c);return}}let c=Vl({center:o,destination:Ls(e.impact),droppables:e.dimensions.droppables});if(!c)return;let l=su({dragStartTime:t,droppable:c,subject:s,center:o,shouldUseTimeDampening:n,getAutoScrollerOptions:a});l&&i(c.descriptor.id,l)},lu=({scrollWindow:e,scrollDroppable:t,getAutoScrollerOptions:n=()=>Hl})=>{let r=Ua(e),i=Ua(t),a=null,o=e=>{!a&&W();let{shouldUseTimeDampening:t,dragStartTime:o}=a;cu({state:e,scrollWindow:r,scrollDroppable:i,dragStartTime:o,shouldUseTimeDampening:t,getAutoScrollerOptions:n})};return{start:e=>{a&&W();let t=Date.now(),r=!1,i=()=>{r=!0};cu({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:i,scrollDroppable:i,getAutoScrollerOptions:n}),a={dragStartTime:t,shouldUseTimeDampening:r},r&&o(e)},stop:()=>{a&&=(r.cancel(),i.cancel(),null)},scroll:o}},uu=({move:e,scrollDroppable:t,scrollWindow:n})=>{let r=(t,n)=>{e({client:J(t.current.client.selection,n)})},i=(e,n)=>{if(!iu(e,n))return n;let r=au(e,n);if(!r)return t(e.descriptor.id,n),null;let i=Y(n,r);return t(e.descriptor.id,i),Y(n,i)},a=(e,t,r)=>{if(!e||!nu(t,r))return r;let i=ru(t,r);if(!i)return n(r),null;let a=Y(r,i);return n(a),Y(r,a)};return e=>{let t=e.scrollJumpRequest;if(!t)return;let n=Ls(e.impact);!n&&W();let o=i(e.dimensions.droppables[n],t);if(!o)return;let s=e.viewport,c=a(e.isWindowScrollAllowed,s,o);c&&r(e,c)}},du=({scrollDroppable:e,scrollWindow:t,move:n,getAutoScrollerOptions:r})=>{let i=lu({scrollWindow:t,scrollDroppable:e,getAutoScrollerOptions:r}),a=uu({move:n,scrollWindow:t,scrollDroppable:e});return{scroll:e=>{if(!(r().disabled||e.phase!==`DRAGGING`)){if(e.movementMode===`FLUID`){i.scroll(e);return}e.scrollJumpRequest&&a(e)}},start:i.start,stop:i.stop}},fu=`data-rfd`,pu=(()=>{let e=`${fu}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),mu=(()=>{let e=`${fu}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),hu=(()=>{let e=`${fu}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),gu={contextId:`${fu}-scroll-container-context-id`},_u=e=>t=>`[${t}="${e}"]`,vu=(e,t)=>e.map(e=>{let n=e.styles[t];return n?`${e.selector} { ${n} }`:``}).join(` `),yu=`pointer-events: none;`,bu=e=>{let t=_u(e),n=(()=>{let e=`
|
|
78
|
+
cursor: -webkit-grab;
|
|
79
|
+
cursor: grab;
|
|
80
|
+
`;return{selector:t(pu.contextId),styles:{always:`
|
|
81
|
+
-webkit-touch-callout: none;
|
|
82
|
+
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
83
|
+
touch-action: manipulation;
|
|
84
|
+
`,resting:e,dragging:yu,dropAnimating:e}}})(),r=[(()=>{let e=`
|
|
85
|
+
transition: ${Kc.outOfTheWay};
|
|
86
|
+
`;return{selector:t(mu.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}})(),n,{selector:t(hu.contextId),styles:{always:`overflow-anchor: none;`}},{selector:`body`,styles:{dragging:`
|
|
87
|
+
cursor: grabbing;
|
|
88
|
+
cursor: -webkit-grabbing;
|
|
89
|
+
user-select: none;
|
|
90
|
+
-webkit-user-select: none;
|
|
91
|
+
-moz-user-select: none;
|
|
92
|
+
-ms-user-select: none;
|
|
93
|
+
overflow-anchor: none;
|
|
94
|
+
`}}];return{always:vu(r,`always`),resting:vu(r,`resting`),dragging:vu(r,`dragging`),dropAnimating:vu(r,`dropAnimating`),userCancel:vu(r,`userCancel`)}},xu=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0?H.useLayoutEffect:H.useEffect,Su=()=>{let e=document.querySelector(`head`);return!e&&W(),e},Cu=e=>{let t=document.createElement(`style`);return e&&t.setAttribute(`nonce`,e),t.type=`text/css`,t};function wu(e,t){let n=G(()=>bu(e),[e]),r=(0,H.useRef)(null),i=(0,H.useRef)(null),a=K(X(e=>{let t=i.current;!t&&W(),t.textContent=e}),[]),o=K(e=>{let t=r.current;!t&&W(),t.textContent=e},[]);xu(()=>{!(!r.current&&!i.current)&&W();let s=Cu(t),c=Cu(t);return r.current=s,i.current=c,s.setAttribute(`${fu}-always`,e),c.setAttribute(`${fu}-dynamic`,e),Su().appendChild(s),Su().appendChild(c),o(n.always),a(n.resting),()=>{let e=e=>{let t=e.current;!t&&W(),Su().removeChild(t),e.current=null};e(r),e(i)}},[t,o,a,n.always,n.resting,e]);let s=K(()=>a(n.dragging),[a,n.dragging]),c=K(e=>{if(e===`DROP`){a(n.dropAnimating);return}a(n.userCancel)},[a,n.dropAnimating,n.userCancel]),l=K(()=>{i.current&&a(n.resting)},[a,n.resting]);return G(()=>({dragging:s,dropping:c,resting:l}),[s,c,l])}function Tu(e,t){return Array.from(e.querySelectorAll(t))}var Eu=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function Du(e){return e instanceof Eu(e).HTMLElement}function Ou(e,t){let n=`[${pu.contextId}="${e}"]`,r=Tu(document,n);if(!r.length)return null;let i=r.find(e=>e.getAttribute(pu.draggableId)===t);return!i||!Du(i)?null:i}function ku(e){let t=(0,H.useRef)({}),n=(0,H.useRef)(null),r=(0,H.useRef)(null),i=(0,H.useRef)(!1),a=K(function(e,n){let r={id:e,focus:n};return t.current[e]=r,function(){let n=t.current;n[e]!==r&&delete n[e]}},[]),o=K(function(t){let n=Ou(e,t);n&&n!==document.activeElement&&n.focus()},[e]),s=K(function(e,t){n.current===e&&(n.current=t)},[]),c=K(function(){r.current||i.current&&(r.current=requestAnimationFrame(()=>{r.current=null;let e=n.current;e&&o(e)}))},[o]),l=K(function(e){n.current=null;let t=document.activeElement;t&&t.getAttribute(pu.draggableId)===e&&(n.current=e)},[]);return xu(()=>(i.current=!0,function(){i.current=!1;let e=r.current;e&&cancelAnimationFrame(e)}),[]),G(()=>({register:a,tryRecordFocus:l,tryRestoreFocusRecorded:c,tryShiftRecord:s}),[a,l,c,s])}function Au(){let e={draggables:{},droppables:{}},t=[];function n(e){return t.push(e),function(){let n=t.indexOf(e);n!==-1&&t.splice(n,1)}}function r(e){t.length&&t.forEach(t=>t(e))}function i(t){return e.draggables[t]||null}function a(e){let t=i(e);return!t&&W(),t}let o={register:t=>{e.draggables[t.descriptor.id]=t,r({type:`ADDITION`,value:t})},update:(t,n)=>{let r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:t=>{let n=t.descriptor.id,a=i(n);a&&t.uniqueId===a.uniqueId&&(delete e.draggables[n],e.droppables[t.descriptor.droppableId]&&r({type:`REMOVAL`,value:t}))},getById:a,findById:i,exists:e=>!!i(e),getAllByType:t=>Object.values(e.draggables).filter(e=>e.descriptor.type===t)};function s(t){return e.droppables[t]||null}function c(e){let t=s(e);return!t&&W(),t}let l={register:t=>{e.droppables[t.descriptor.id]=t},unregister:t=>{let n=s(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:c,findById:s,exists:e=>!!s(e),getAllByType:t=>Object.values(e.droppables).filter(e=>e.descriptor.type===t)};function u(){e.draggables={},e.droppables={},t.length=0}return{draggable:o,droppable:l,subscribe:n,clean:u}}function ju(){let e=G(Au,[]);return(0,H.useEffect)(()=>function(){e.clean()},[e]),e}var Mu=H.createContext(null),Nu=()=>{let e=document.body;return!e&&W(),e},Pu={position:`absolute`,width:`1px`,height:`1px`,margin:`-1px`,border:`0`,padding:`0`,overflow:`hidden`,clip:`rect(0 0 0 0)`,"clip-path":`inset(100%)`},Fu=e=>`rfd-announcement-${e}`;function Iu(e){let t=G(()=>Fu(e),[e]),n=(0,H.useRef)(null);return(0,H.useEffect)(function(){let e=document.createElement(`div`);return n.current=e,e.id=t,e.setAttribute(`aria-live`,`assertive`),e.setAttribute(`aria-atomic`,`true`),Wa(e.style,Pu),Nu().appendChild(e),function(){setTimeout(function(){let t=Nu();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)})}},[t]),K(e=>{let t=n.current;if(t){t.textContent=e;return}},[])}var Lu={separator:`::`};function Ru(e,t=Lu){let n=H.useId();return G(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}function zu({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}function Bu({contextId:e,text:t}){let n=Ru(`hidden-text`,{separator:`-`}),r=G(()=>zu({contextId:e,uniqueId:n}),[n,e]);return(0,H.useEffect)(function(){let e=document.createElement(`div`);return e.id=r,e.textContent=t,e.style.display=`none`,Nu().appendChild(e),function(){let t=Nu();t.contains(e)&&t.removeChild(e)}},[r,t]),r}var Vu=H.createContext(null);function Hu(e){let t=(0,H.useRef)(e);return(0,H.useEffect)(()=>{t.current=e}),t}function Uu(){let e=null;function t(){return!!e}function n(t){return t===e}function r(t){e&&W();let n={abandon:t};return e=n,n}function i(){!e&&W(),e=null}function a(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:a}}function Wu(e){return e.phase===`IDLE`||e.phase===`DROP_ANIMATING`?!1:e.isDragging}var Gu=9,Ku=13,qu=27,Ju=32,Yu=33,Xu=34,Zu=35,Qu=36,$u=37,ed=38,td=39,nd=40,rd={[Ku]:!0,[Gu]:!0},id=e=>{rd[e.keyCode]&&e.preventDefault()},ad=(()=>{let e=`visibilitychange`;return typeof document>`u`?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(e=>`on${e}`in document)||e})(),od=0,sd=5;function cd(e,t){return Math.abs(t.x-e.x)>=sd||Math.abs(t.y-e.y)>=sd}var ld={type:`IDLE`};function ud({cancel:e,completed:t,getPhase:n,setPhase:r}){return[{eventName:`mousemove`,fn:e=>{let{button:t,clientX:i,clientY:a}=e;if(t!==od)return;let o={x:i,y:a},s=n();if(s.type===`DRAGGING`){e.preventDefault(),s.actions.move(o);return}s.type!==`PENDING`&&W();let c=s.point;cd(c,o)&&(e.preventDefault(),r({type:`DRAGGING`,actions:s.actions.fluidLift(o)}))}},{eventName:`mouseup`,fn:r=>{let i=n();if(i.type!==`DRAGGING`){e();return}r.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:`mousedown`,fn:t=>{n().type===`DRAGGING`&&t.preventDefault(),e()}},{eventName:`keydown`,fn:t=>{if(n().type===`PENDING`){e();return}if(t.keyCode===qu){t.preventDefault(),e();return}id(t)}},{eventName:`resize`,fn:e},{eventName:`scroll`,options:{passive:!0,capture:!1},fn:()=>{n().type===`PENDING`&&e()}},{eventName:`webkitmouseforcedown`,fn:t=>{let r=n();if(r.type===`IDLE`&&W(),r.actions.shouldRespectForcePress()){e();return}t.preventDefault()}},{eventName:ad,fn:e}]}function dd(e){let t=(0,H.useRef)(ld),n=(0,H.useRef)(Ka),r=G(()=>({eventName:`mousedown`,fn:function(t){if(t.defaultPrevented||t.button!==od||t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)return;let r=e.findClosestDraggableId(t);if(!r)return;let i=e.tryGetLock(r,o,{sourceEvent:t});if(!i)return;t.preventDefault();let a={x:t.clientX,y:t.clientY};n.current(),l(i,a)}}),[e]),i=G(()=>({eventName:`webkitmouseforcewillbegin`,fn:t=>{if(t.defaultPrevented)return;let n=e.findClosestDraggableId(t);if(!n)return;let r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}),[e]),a=K(function(){n.current=Ja(window,[i,r],{passive:!1,capture:!0})},[i,r]),o=K(()=>{t.current.type!==`IDLE`&&(t.current=ld,n.current(),a())},[a]),s=K(()=>{let e=t.current;o(),e.type===`DRAGGING`&&e.actions.cancel({shouldBlockNextClick:!0}),e.type===`PENDING`&&e.actions.abort()},[o]),c=K(function(){let e={capture:!0,passive:!1},r=ud({cancel:s,completed:o,getPhase:()=>t.current,setPhase:e=>{t.current=e}});n.current=Ja(window,r,e)},[s,o]),l=K(function(e,n){t.current.type!==`IDLE`&&W(),t.current={type:`PENDING`,point:n,actions:e},c()},[c]);xu(function(){return a(),function(){n.current()}},[a])}function fd(){}var pd={[Xu]:!0,[Yu]:!0,[Qu]:!0,[Zu]:!0};function md(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:`keydown`,fn:t=>{if(t.keyCode===qu){t.preventDefault(),n();return}if(t.keyCode===Ju){t.preventDefault(),r();return}if(t.keyCode===nd){t.preventDefault(),e.moveDown();return}if(t.keyCode===ed){t.preventDefault(),e.moveUp();return}if(t.keyCode===td){t.preventDefault(),e.moveRight();return}if(t.keyCode===$u){t.preventDefault(),e.moveLeft();return}if(pd[t.keyCode]){t.preventDefault();return}id(t)}},{eventName:`mousedown`,fn:n},{eventName:`mouseup`,fn:n},{eventName:`click`,fn:n},{eventName:`touchstart`,fn:n},{eventName:`resize`,fn:n},{eventName:`wheel`,fn:n,options:{passive:!0}},{eventName:ad,fn:n}]}function hd(e){let t=(0,H.useRef)(fd),n=G(()=>({eventName:`keydown`,fn:function(n){if(n.defaultPrevented||n.keyCode!==Ju)return;let i=e.findClosestDraggableId(n);if(!i)return;let a=e.tryGetLock(i,c,{sourceEvent:n});if(!a)return;n.preventDefault();let o=!0,s=a.snapLift();t.current();function c(){!o&&W(),o=!1,t.current(),r()}t.current=Ja(window,md(s,c),{capture:!0,passive:!1})}}),[e]),r=K(function(){t.current=Ja(window,[n],{passive:!1,capture:!0})},[n]);xu(function(){return r(),function(){t.current()}},[r])}var gd={type:`IDLE`},_d=120,vd=.15;function yd({cancel:e,getPhase:t}){return[{eventName:`orientationchange`,fn:e},{eventName:`resize`,fn:e},{eventName:`contextmenu`,fn:e=>{e.preventDefault()}},{eventName:`keydown`,fn:n=>{if(t().type!==`DRAGGING`){e();return}n.keyCode===qu&&n.preventDefault(),e()}},{eventName:ad,fn:e}]}function bd({cancel:e,completed:t,getPhase:n}){return[{eventName:`touchmove`,options:{capture:!1},fn:t=>{let r=n();if(r.type!==`DRAGGING`){e();return}r.hasMoved=!0;let{clientX:i,clientY:a}=t.touches[0],o={x:i,y:a};t.preventDefault(),r.actions.move(o)}},{eventName:`touchend`,fn:r=>{let i=n();if(i.type!==`DRAGGING`){e();return}r.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:`touchcancel`,fn:t=>{if(n().type!==`DRAGGING`){e();return}t.preventDefault(),e()}},{eventName:`touchforcechange`,fn:t=>{let r=n();r.type===`IDLE`&&W();let i=t.touches[0];if(!i||!(i.force>=vd))return;let a=r.actions.shouldRespectForcePress();if(r.type===`PENDING`){a&&e();return}if(a){if(r.hasMoved){t.preventDefault();return}e();return}t.preventDefault()}},{eventName:ad,fn:e}]}function xd(e){let t=(0,H.useRef)(gd),n=(0,H.useRef)(Ka),r=K(function(){return t.current},[]),i=K(function(e){t.current=e},[]),a=G(()=>({eventName:`touchstart`,fn:function(t){if(t.defaultPrevented)return;let r=e.findClosestDraggableId(t);if(!r)return;let i=e.tryGetLock(r,s,{sourceEvent:t});if(!i)return;let{clientX:a,clientY:o}=t.touches[0],c={x:a,y:o};n.current(),d(i,c)}}),[e]),o=K(function(){n.current=Ja(window,[a],{capture:!0,passive:!1})},[a]),s=K(()=>{let e=t.current;e.type!==`IDLE`&&(e.type===`PENDING`&&clearTimeout(e.longPressTimerId),i(gd),n.current(),o())},[o,i]),c=K(()=>{let e=t.current;s(),e.type===`DRAGGING`&&e.actions.cancel({shouldBlockNextClick:!0}),e.type===`PENDING`&&e.actions.abort()},[s]),l=K(function(){let e={capture:!0,passive:!1},t={cancel:c,completed:s,getPhase:r},i=Ja(window,bd(t),e),a=Ja(window,yd(t),e);n.current=function(){i(),a()}},[c,r,s]),u=K(function(){let e=r();e.type!==`PENDING`&&W(),i({type:`DRAGGING`,actions:e.actions.fluidLift(e.point),hasMoved:!1})},[r,i]),d=K(function(e,t){r().type!==`IDLE`&&W(),i({type:`PENDING`,point:t,actions:e,longPressTimerId:setTimeout(u,_d)}),l()},[l,r,i,u]);xu(function(){return o(),function(){n.current();let e=r();e.type===`PENDING`&&(clearTimeout(e.longPressTimerId),i(gd))}},[r,o,i]),xu(function(){return Ja(window,[{eventName:`touchmove`,fn:()=>{},options:{capture:!1,passive:!1}}])},[])}var Sd=[`input`,`button`,`textarea`,`select`,`option`,`optgroup`,`video`,`audio`];function Cd(e,t){if(t==null)return!1;if(Sd.includes(t.tagName.toLowerCase()))return!0;let n=t.getAttribute(`contenteditable`);return n===`true`||n===``?!0:t===e?!1:Cd(e,t.parentElement)}function wd(e,t){let n=t.target;return Du(n)?Cd(e,n):!1}var Td=e=>ja(e.getBoundingClientRect()).center;function Ed(e){return e instanceof Eu(e).Element}var Dd=(()=>{let e=`matches`;return typeof document>`u`?e:[e,`msMatchesSelector`,`webkitMatchesSelector`].find(e=>e in Element.prototype)||e})();function Od(e,t){return e==null?null:e[Dd](t)?e:Od(e.parentElement,t)}function kd(e,t){return e.closest?e.closest(t):Od(e,t)}function Ad(e){return`[${pu.contextId}="${e}"]`}function jd(e,t){let n=t.target;if(!Ed(n))return null;let r=kd(n,Ad(e));return!r||!Du(r)?null:r}function Md(e,t){let n=jd(e,t);return n?n.getAttribute(pu.draggableId):null}function Nd(e,t){let n=`[${mu.contextId}="${e}"]`,r=Tu(document,n).find(e=>e.getAttribute(mu.id)===t);return!r||!Du(r)?null:r}function Pd(e){e.preventDefault()}function Fd({expected:e,phase:t,isLockActive:n,shouldWarn:r}){return!(!n()||e!==t)}function Id({lockAPI:e,store:t,registry:n,draggableId:r}){if(e.isClaimed())return!1;let i=n.draggable.findById(r);return!(!i||!i.options.isEnabled||!Ll(t.getState(),r))}function Ld({lockAPI:e,contextId:t,store:n,registry:r,draggableId:i,forceSensorStop:a,sourceEvent:o}){if(!Id({lockAPI:e,store:n,registry:r,draggableId:i}))return null;let s=r.draggable.getById(i),c=Nd(t,s.descriptor.id);if(!c||o&&!s.options.canDragInteractiveElements&&wd(c,o))return null;let l=e.claim(a||Ka),u=`PRE_DRAG`;function d(){return s.options.shouldRespectForcePress}function f(){return e.isActive(l)}function p(e,t){Fd({expected:e,phase:u,isLockActive:f,shouldWarn:!0})&&n.dispatch(t())}let m=p.bind(null,`DRAGGING`);function h(t){function r(){e.release(),u=`COMPLETED`}u!==`PRE_DRAG`&&(r(),W()),n.dispatch(bc(t.liftActionArgs)),u=`DRAGGING`;function i(e,i={shouldBlockNextClick:!1}){if(t.cleanup(),i.shouldBlockNextClick){let e=Ja(window,[{eventName:`click`,fn:Pd,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(e)}r(),n.dispatch(Lc({reason:e}))}return{isActive:()=>Fd({expected:`DRAGGING`,phase:u,isLockActive:f,shouldWarn:!1}),shouldRespectForcePress:d,drop:e=>i(`DROP`,e),cancel:e=>i(`CANCEL`,e),...t.actions}}function g(e){let t=Ua(e=>{m(()=>Dc({client:e}))});return{...h({liftActionArgs:{id:i,clientSelection:e,movementMode:`FLUID`},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}}function _(){return h({liftActionArgs:{id:i,clientSelection:Td(c),movementMode:`SNAP`},cleanup:Ka,actions:{moveUp:()=>m(Ac),moveRight:()=>m(Mc),moveDown:()=>m(jc),moveLeft:()=>m(Nc)}})}function v(){Fd({expected:`PRE_DRAG`,phase:u,isLockActive:f,shouldWarn:!0})&&e.release()}return{isActive:()=>Fd({expected:`PRE_DRAG`,phase:u,isLockActive:f,shouldWarn:!1}),shouldRespectForcePress:d,fluidLift:g,snapLift:_,abort:v}}var Rd=[dd,hd,xd];function zd({contextId:e,store:t,registry:n,customSensors:r,enableDefaultSensors:i}){let a=[...i?Rd:[],...r||[]],o=(0,H.useState)(()=>Uu())[0],s=K(function(e,t){Wu(e)&&!Wu(t)&&o.tryAbandon()},[o]);xu(function(){let e=t.getState();return t.subscribe(()=>{let n=t.getState();s(e,n),e=n})},[o,t,s]),xu(()=>o.tryAbandon,[o.tryAbandon]);let c=K(e=>Id({lockAPI:o,registry:n,store:t,draggableId:e}),[o,n,t]),l=K((r,i,a)=>Ld({lockAPI:o,registry:n,contextId:e,store:t,draggableId:r,forceSensorStop:i||null,sourceEvent:a&&a.sourceEvent?a.sourceEvent:null}),[e,o,n,t]),u=K(t=>Md(e,t),[e]),d=K(e=>{let t=n.draggable.findById(e);return t?t.options:null},[n.draggable]),f=K(function(){o.isClaimed()&&(o.tryAbandon(),t.getState().phase!==`IDLE`&&t.dispatch(Pc()))},[o,t]),p=K(()=>o.isClaimed(),[o]),m=G(()=>({canGetLock:c,tryGetLock:l,findClosestDraggableId:u,findOptionsForDraggable:d,tryReleaseLock:f,isLockClaimed:p}),[c,l,u,d,f,p]);for(let e=0;e<a.length;e++)a[e](m)}var Bd=e=>({onBeforeCapture:t=>{(0,si.flushSync)(()=>{e.onBeforeCapture&&e.onBeforeCapture(t)})},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),Vd=e=>({...Hl,...e.autoScrollerOptions,durationDampening:{...Hl.durationDampening,...e.autoScrollerOptions}});function Hd(e){return!e.current&&W(),e.current}function Ud(e){let{contextId:t,setCallbacks:n,sensors:r,nonce:i,dragHandleUsageInstructions:a}=e,o=(0,H.useRef)(null),s=Hu(e),c=K(()=>Bd(s.current),[s]),l=K(()=>Vd(s.current),[s]),u=Iu(t),d=Bu({contextId:t,text:a}),f=wu(t,i),p=K(e=>{Hd(o).dispatch(e)},[]),m=G(()=>hi({publishWhileDragging:Sc,updateDroppableScroll:wc,updateDroppableIsEnabled:Tc,updateDroppableIsCombineEnabled:Ec,collectionStarting:Cc},p),[p]),h=ju(),g=G(()=>Il(h,m),[h,m]),_=G(()=>du({scrollWindow:Rl,scrollDroppable:g.scrollDroppable,getAutoScrollerOptions:l,...hi({move:Dc},p)}),[g.scrollDroppable,p,l]),v=ku(t),y=G(()=>Dl({announce:u,autoScroller:_,dimensionMarshal:g,focusMarshal:v,getResponders:c,styleMarshal:f}),[u,_,g,v,c,f]);o.current=y;let b=K(()=>{let e=Hd(o);e.getState().phase!==`IDLE`&&e.dispatch(Pc())},[]),x=K(()=>{let e=Hd(o).getState();return e.phase===`DROP_ANIMATING`?!0:e.phase===`IDLE`?!1:e.isDragging},[]);n(G(()=>({isDragging:x,tryAbort:b}),[x,b]));let S=K(e=>Ll(Hd(o).getState(),e),[]),C=K(()=>Bs(Hd(o).getState()),[]),w=G(()=>({marshal:g,focus:v,contextId:t,canLift:S,isMovementAllowed:C,dragHandleUsageInstructionsId:d,registry:h}),[t,g,d,v,S,C,h]);return zd({contextId:t,store:y,registry:h,customSensors:r||null,enableDefaultSensors:e.enableDefaultSensors!==!1}),(0,H.useEffect)(()=>b,[b]),H.createElement(Vu.Provider,{value:w},H.createElement(Da,{context:Mu,store:y},e.children))}function Wd(){return H.useId()}function Gd(e){let t=Wd(),n=e.dragHandleUsageInstructions||ao.dragHandleUsageInstructions;return H.createElement(Za,null,r=>H.createElement(Ud,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}var Kd={dragging:5e3,dropAnimating:4500},qd=(e,t)=>t?Kc.drop(t.duration):e?Kc.snap:Kc.fluid,Jd=(e,t)=>{if(e)return t?Uc.opacity.drop:Uc.opacity.combining},Yd=e=>e.forceShouldAnimate==null?e.mode===`SNAP`:e.forceShouldAnimate;function Xd(e){let t=e.dimension.client,{offset:n,combineWith:r,dropping:i}=e,a=!!r,o=Yd(e),s=!!i,c=s?Jc.drop(n,a):Jc.moveTo(n);return{position:`fixed`,top:t.marginBox.top,left:t.marginBox.left,boxSizing:`border-box`,width:t.borderBox.width,height:t.borderBox.height,transition:qd(o,i),transform:c,opacity:Jd(a,s),zIndex:s?Kd.dropAnimating:Kd.dragging,pointerEvents:`none`}}function Zd(e){return{transform:Jc.moveTo(e.offset),transition:e.shouldAnimateDisplacement?void 0:`none`}}function Qd(e){return e.type===`DRAGGING`?Xd(e):Zd(e)}function $d(e,t,n=q){let r=window.getComputedStyle(t),i=Va(t.getBoundingClientRect(),r),a=Ba(i,n);return{descriptor:e,placeholder:{client:i,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:i.marginBox.width,y:i.marginBox.height},client:i,page:a}}function ef(e){let t=Ru(`draggable`),{descriptor:n,registry:r,getDraggableRef:i,canDragInteractiveElements:a,shouldRespectForcePress:o,isEnabled:s}=e,c=G(()=>({canDragInteractiveElements:a,shouldRespectForcePress:o,isEnabled:s}),[a,s,o]),l=K(e=>{let t=i();return!t&&W(),$d(n,t,e)},[n,i]),u=G(()=>({uniqueId:t,descriptor:n,options:c,getDimension:l}),[n,l,c,t]),d=(0,H.useRef)(u),f=(0,H.useRef)(!0);xu(()=>(r.draggable.register(d.current),()=>r.draggable.unregister(d.current)),[r.draggable]),xu(()=>{if(f.current){f.current=!1;return}let e=d.current;d.current=u,r.draggable.update(u,e)},[u,r.draggable])}var tf=H.createContext(null);function nf(e){let t=(0,H.useContext)(e);return!t&&W(),t}function rf(e){e.preventDefault()}var af=e=>{let t=(0,H.useRef)(null),n=K((e=null)=>{t.current=e},[]),r=K(()=>t.current,[]),{contextId:i,dragHandleUsageInstructionsId:a,registry:o}=nf(Vu),{type:s,droppableId:c}=nf(tf),l=G(()=>({id:e.draggableId,index:e.index,type:s,droppableId:c}),[e.draggableId,e.index,s,c]),{children:u,draggableId:d,isEnabled:f,shouldRespectForcePress:p,canDragInteractiveElements:m,isClone:h,mapped:g,dropAnimationFinished:_}=e;h||ef(G(()=>({descriptor:l,registry:o,getDraggableRef:r,canDragInteractiveElements:m,shouldRespectForcePress:p,isEnabled:f}),[l,o,r,m,p,f]));let v=G(()=>f?{tabIndex:0,role:`button`,"aria-describedby":a,"data-rfd-drag-handle-draggable-id":d,"data-rfd-drag-handle-context-id":i,draggable:!1,onDragStart:rf}:null,[i,a,d,f]),y=K(e=>{g.type===`DRAGGING`&&g.dropping&&e.propertyName===`transform`&&(0,si.flushSync)(_)},[_,g]),b=G(()=>({innerRef:n,draggableProps:{"data-rfd-draggable-context-id":i,"data-rfd-draggable-id":d,style:Qd(g),onTransitionEnd:g.type===`DRAGGING`&&g.dropping?y:void 0},dragHandleProps:v}),[i,v,d,g,y,n]),x=G(()=>({draggableId:l.id,type:l.type,source:{index:l.index,droppableId:l.droppableId}}),[l.droppableId,l.id,l.index,l.type]);return H.createElement(H.Fragment,null,u(b,g.snapshot,x))},of=(e,t)=>e===t,sf=e=>{let{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null},cf=e=>e.combine?e.combine.draggableId:null,lf=e=>e.at&&e.at.type===`COMBINE`?e.at.combine.draggableId:null;function uf(){let e=X((e,t)=>({x:e,y:t})),t=X((e,t,n=null,r=null,i=null)=>({isDragging:!0,isClone:t,isDropAnimating:!!i,dropAnimation:i,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null})),n=X((e,n,r,i,a=null,o=null,s=null)=>({mapped:{type:`DRAGGING`,dropping:null,draggingOver:a,combineWith:o,mode:n,offset:e,dimension:r,forceShouldAnimate:s,snapshot:t(n,i,a,o,null)}}));return(r,i)=>{if(Wu(r)){if(r.critical.draggable.id!==i.draggableId)return null;let t=r.current.client.offset,a=r.dimensions.draggables[i.draggableId],o=Ls(r.impact),s=lf(r.impact),c=r.forceShouldAnimate;return n(e(t.x,t.y),r.movementMode,a,i.isClone,o,s,c)}if(r.phase===`DROP_ANIMATING`){let e=r.completed;if(e.result.draggableId!==i.draggableId)return null;let n=i.isClone,a=r.dimensions.draggables[i.draggableId],o=e.result,s=o.mode,c=sf(o),l=cf(o),u={duration:r.dropDuration,curve:Hc.drop,moveTo:r.newHomeClientOffset,opacity:l?Uc.opacity.drop:null,scale:l?Uc.scale.drop:null};return{mapped:{type:`DRAGGING`,offset:r.newHomeClientOffset,dimension:a,dropping:u,draggingOver:c,combineWith:l,mode:s,forceShouldAnimate:null,snapshot:t(s,n,c,l,u)}}}return null}}function df(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var ff={mapped:{type:`SECONDARY`,offset:q,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:df(null)}};function pf(){let e=X((e,t)=>({x:e,y:t})),t=X(df),n=X((e,n=null,r)=>({mapped:{type:`SECONDARY`,offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}})),r=e=>e?n(q,e,!0):null,i=(t,i,a,o)=>{let s=a.displaced.visible[t],c=!!(o.inVirtualList&&o.effected[t]),l=Ao(a),u=l&&l.draggableId===t?i:null;if(!s){if(!c)return r(u);if(a.displaced.invisible[t])return null;let i=lo(o.displacedBy.point);return n(e(i.x,i.y),u,!0)}if(c)return r(u);let d=a.displacedBy.point;return n(e(d.x,d.y),u,s.shouldAnimate)};return(e,t)=>{if(Wu(e))return e.critical.draggable.id===t.draggableId?null:i(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if(e.phase===`DROP_ANIMATING`){let n=e.completed;return n.result.draggableId===t.draggableId?null:i(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}var mf=Ta(()=>{let e=uf(),t=pf();return(n,r)=>e(n,r)||t(n,r)||ff},{dropAnimationFinished:zc},null,{context:Mu,areStatePropsEqual:of})(af);function hf(e){return nf(tf).isUsingCloneFor===e.draggableId&&!e.isClone?null:H.createElement(mf,e)}function gf(e){let t=typeof e.isDragDisabled==`boolean`?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return H.createElement(hf,Wa({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}var _f=e=>t=>e===t,vf=_f(`scroll`),yf=_f(`auto`),bf=(e,t)=>t(e.overflowX)||t(e.overflowY),xf=e=>{let t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return bf(n,vf)||bf(n,yf)},Sf=()=>!1,Cf=e=>e==null?null:e===document.body?Sf()?e:null:e===document.documentElement?null:xf(e)?e:Cf(e.parentElement),wf=e=>({x:e.scrollLeft,y:e.scrollTop}),Tf=e=>e?window.getComputedStyle(e).position===`fixed`?!0:Tf(e.parentElement):!1,Ef=e=>({closestScrollable:Cf(e),isFixedOnPage:Tf(e)}),Df=({descriptor:e,isEnabled:t,isCombineEnabled:n,isFixedOnPage:r,direction:i,client:a,page:o,closest:s})=>{let c=(()=>{if(!s)return null;let{scrollSize:e,client:t}=s,n=Al({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:n,diff:{value:q,displacement:q}}}})(),l=i===`vertical`?Bo:Vo;return{descriptor:e,isCombineEnabled:n,isFixedOnPage:r,axis:l,isEnabled:t,client:a,page:o,frame:c,subject:So({page:o,withPlaceholder:null,axis:l,frame:c})}},Of=(e,t)=>{let n=Ha(e);if(!t||e!==t)return n;let r=n.paddingBox.top-t.scrollTop,i=n.paddingBox.left-t.scrollLeft,a=r+t.scrollHeight;return Ia({borderBox:Ma({top:r,right:i+t.scrollWidth,bottom:a,left:i},n.border),margin:n.margin,border:n.border,padding:n.padding})},kf=({ref:e,descriptor:t,env:n,windowScroll:r,direction:i,isDropDisabled:a,isCombineEnabled:o,shouldClipSubject:s})=>{let c=n.closestScrollable,l=Of(e,c),u=Ba(l,r),d=(()=>{if(!c)return null;let e=Ha(c),t={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth};return{client:e,page:Ba(e,r),scroll:wf(c),scrollSize:t,shouldClipSubject:s}})();return Df({descriptor:t,isEnabled:!a,isCombineEnabled:o,isFixedOnPage:n.isFixedOnPage,direction:i,client:l,page:u,closest:d})},Af={passive:!1},jf={passive:!0},Mf=e=>e.shouldPublishImmediately?Af:jf,Nf=e=>e&&e.env.closestScrollable||null;function Pf(e){let t=(0,H.useRef)(null),n=nf(Vu),r=Ru(`droppable`),{registry:i,marshal:a}=n,o=Hu(e),s=G(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),c=(0,H.useRef)(s),l=G(()=>X((e,n)=>{!t.current&&W();let r={x:e,y:n};a.updateDroppableScroll(s.id,r)}),[s.id,a]),u=K(()=>{let e=t.current;return!e||!e.env.closestScrollable?q:wf(e.env.closestScrollable)},[]),d=K(()=>{let e=u();l(e.x,e.y)},[u,l]),f=G(()=>Ua(d),[d]),p=K(()=>{let e=t.current,n=Nf(e);if(!(e&&n)&&W(),e.scrollOptions.shouldPublishImmediately){d();return}f()},[f,d]),m=K((e,r)=>{t.current&&W();let i=o.current,a=i.getDroppableRef();!a&&W();let c=Ef(a),l={ref:a,descriptor:s,env:c,scrollOptions:r};t.current=l;let u=kf({ref:a,descriptor:s,env:c,windowScroll:e,direction:i.direction,isDropDisabled:i.isDropDisabled,isCombineEnabled:i.isCombineEnabled,shouldClipSubject:!i.ignoreContainerClipping}),d=c.closestScrollable;return d&&(d.setAttribute(gu.contextId,n.contextId),d.addEventListener(`scroll`,p,Mf(l.scrollOptions))),u},[n.contextId,s,p,o]),h=K(()=>{let e=t.current,n=Nf(e);return!(e&&n)&&W(),wf(n)},[]),g=K(()=>{let e=t.current;!e&&W();let n=Nf(e);t.current=null,n&&(f.cancel(),n.removeAttribute(gu.contextId),n.removeEventListener(`scroll`,p,Mf(e.scrollOptions)))},[p,f]),_=K(e=>{let n=t.current;!n&&W();let r=Nf(n);!r&&W(),r.scrollTop+=e.y,r.scrollLeft+=e.x},[]),v=G(()=>({getDimensionAndWatchScroll:m,getScrollWhileDragging:h,dragStopped:g,scroll:_}),[g,m,h,_]),y=G(()=>({uniqueId:r,descriptor:s,callbacks:v}),[v,s,r]);xu(()=>(c.current=y.descriptor,i.droppable.register(y),()=>{t.current&&g(),i.droppable.unregister(y)}),[v,s,g,y,a,i.droppable]),xu(()=>{t.current&&a.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)},[e.isDropDisabled,a]),xu(()=>{t.current&&a.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)},[e.isCombineEnabled,a])}function Ff(){}var If={width:0,height:0,margin:vo},Lf=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>e||n===`close`?If:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin},Rf=({isAnimatingOpenOnMount:e,placeholder:t,animate:n})=>{let r=Lf({isAnimatingOpenOnMount:e,placeholder:t,animate:n});return{display:t.display,boxSizing:`border-box`,width:r.width,height:r.height,marginTop:r.margin.top,marginRight:r.margin.right,marginBottom:r.margin.bottom,marginLeft:r.margin.left,flexShrink:`0`,flexGrow:`0`,pointerEvents:`none`,transition:n===`none`?null:Kc.placeholder}},zf=H.memo(e=>{let t=(0,H.useRef)(null),n=K(()=>{t.current&&=(clearTimeout(t.current),null)},[]),{animate:r,onTransitionEnd:i,onClose:a,contextId:o}=e,[s,c]=(0,H.useState)(e.animate===`open`);(0,H.useEffect)(()=>s?r===`open`?t.current?Ff:(t.current=setTimeout(()=>{t.current=null,c(!1)}),n):(n(),c(!1),Ff):Ff,[r,s,n]);let l=K(e=>{e.propertyName===`height`&&(i(),r===`close`&&a())},[r,a,i]),u=Rf({isAnimatingOpenOnMount:s,animate:e.animate,placeholder:e.placeholder});return H.createElement(e.placeholder.tagName,{style:u,"data-rfd-placeholder-context-id":o,onTransitionEnd:l,ref:e.innerRef})}),Bf=class extends H.PureComponent{constructor(...e){super(...e),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?`open`:`none`},this.onClose=()=>{this.state.animate===`close`&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:`open`}:t.isVisible?{isVisible:!0,data:t.data,animate:`close`}:{isVisible:!1,animate:`close`,data:null}:{isVisible:!!e.on,data:e.on,animate:`none`}}render(){if(!this.state.isVisible)return null;let e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)}},Vf=e=>{let t=(0,H.useContext)(Vu);!t&&W();let{contextId:n,isMovementAllowed:r}=t,i=(0,H.useRef)(null),a=(0,H.useRef)(null),{children:o,droppableId:s,type:c,mode:l,direction:u,ignoreContainerClipping:d,isDropDisabled:f,isCombineEnabled:p,snapshot:m,useClone:h,updateViewportMaxScroll:g,getContainerForClone:_}=e,v=K(()=>i.current,[]),y=K((e=null)=>{i.current=e},[]);K(()=>a.current,[]);let b=K((e=null)=>{a.current=e},[]),x=K(()=>{r()&&g({maxScroll:Ml()})},[r,g]);Pf({droppableId:s,type:c,mode:l,direction:u,isDropDisabled:f,isCombineEnabled:p,ignoreContainerClipping:d,getDroppableRef:v});let S=G(()=>H.createElement(Bf,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:e,data:t,animate:r})=>H.createElement(zf,{placeholder:t,onClose:e,innerRef:b,animate:r,contextId:n,onTransitionEnd:x})),[n,x,e.placeholder,e.shouldAnimatePlaceholder,b]),C=G(()=>({innerRef:y,placeholder:S,droppableProps:{"data-rfd-droppable-id":s,"data-rfd-droppable-context-id":n}}),[n,s,S,y]),w=h?h.dragging.draggableId:null,T=G(()=>({droppableId:s,type:c,isUsingCloneFor:w}),[s,w,c]);function E(){if(!h)return null;let{dragging:e,render:t}=h,n=H.createElement(hf,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(n,r)=>t(n,r,e));return si.createPortal(n,_())}return H.createElement(tf.Provider,{value:T},o(C,m),E())};function Hf(){return!document.body&&W(),document.body}var Uf={mode:`standard`,type:`DEFAULT`,direction:`vertical`,isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:Hf},Wf=e=>{let t={...e},n;for(n in Uf)e[n]===void 0&&(t={...t,[n]:Uf[n]});return t},Gf=(e,t)=>e===t.droppable.type,Kf=(e,t)=>t.draggables[e.draggable.id],qf=Ta(()=>{let e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=X(e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}})),r=X((r,i,a,o,s,c)=>{let l=s.descriptor.id;if(s.descriptor.droppableId===r){let e=c?{render:c,dragging:n(s.descriptor)}:null,t={isDraggingOver:a,draggingOverWith:a?l:null,draggingFromThisWith:l,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!1,snapshot:t,useClone:e}}if(!i)return t;if(!o)return e;let u={isDraggingOver:a,draggingOverWith:l,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:s.placeholder,shouldAnimatePlaceholder:!0,snapshot:u,useClone:null}});return(n,i)=>{let a=Wf(i),o=a.droppableId,s=a.type,c=!a.isDropDisabled,l=a.renderClone;if(Wu(n)){let e=n.critical;if(!Gf(s,e))return t;let i=Kf(e,n.dimensions),a=Ls(n.impact)===o;return r(o,c,a,a,i,l)}if(n.phase===`DROP_ANIMATING`){let e=n.completed;if(!Gf(s,e.critical))return t;let i=Kf(e.critical,n.dimensions);return r(o,c,sf(e.result)===o,Ls(e.impact)===o,i,l)}if(n.phase===`IDLE`&&n.completed&&!n.shouldFlush){let r=n.completed;if(!Gf(s,r.critical))return t;let i=Ls(r.impact)===o,a=!!(r.impact.at&&r.impact.at.type===`COMBINE`),c=r.critical.droppable.id===o;return i?a?e:t:c?e:t}return t}},{updateViewportMaxScroll:kc},(e,t,n)=>({...Wf(n),...e,...t}),{context:Mu,areStatePropsEqual:of})(Vf),Jf=new WeakMap,Yf=`
|
|
95
|
+
/* Theme — CSS variables set by the host (EditorPanel.vue) */
|
|
96
|
+
/* Base */
|
|
97
|
+
.gz-editor {
|
|
98
|
+
font-family: system-ui, -apple-system, sans-serif; font-size: 0.875rem;
|
|
99
|
+
color: var(--gz-text, #e0e0e0);
|
|
100
|
+
transition: color 0.2s, background-color 0.2s;
|
|
101
|
+
}
|
|
102
|
+
.gz-editor * { box-sizing: border-box; }
|
|
103
|
+
.gz-editor .form-group { margin-bottom: 1rem; }
|
|
104
|
+
.gz-editor label {
|
|
105
|
+
display: block; font-weight: 600; font-size: 0.6875rem; text-transform: uppercase;
|
|
106
|
+
letter-spacing: 0.05em; color: var(--gz-text-label, #8888a0); margin-bottom: 0.375rem;
|
|
107
|
+
}
|
|
108
|
+
.gz-editor .field-description { font-size: 0.75rem; color: var(--gz-text-hint, #666680); margin-bottom: 0.375rem; line-height: 1.4; }
|
|
109
|
+
|
|
110
|
+
/* Inputs */
|
|
111
|
+
.gz-editor input[type="text"], .gz-editor input[type="number"], .gz-editor input[type="url"],
|
|
112
|
+
.gz-editor input[type="email"], .gz-editor input[type="password"],
|
|
113
|
+
.gz-editor textarea, .gz-editor select {
|
|
114
|
+
width: 100%; padding: 0.5rem 0.75rem; font-size: 0.875rem; font-family: inherit;
|
|
115
|
+
background: var(--gz-bg-input, #161622); color: var(--gz-text, #e0e0e0); border: 1px solid var(--gz-border, #2a2a3a); border-radius: 6px;
|
|
116
|
+
outline: none; transition: border-color 0.15s, box-shadow 0.15s, background-color 0.2s, color 0.2s;
|
|
117
|
+
}
|
|
118
|
+
.gz-editor input:focus, .gz-editor textarea:focus, .gz-editor select:focus {
|
|
119
|
+
border-color: var(--gz-accent, #667eea); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gz-accent, #667eea) 15%, transparent);
|
|
120
|
+
}
|
|
121
|
+
.gz-editor textarea { min-height: 5rem; resize: vertical; line-height: 1.5; }
|
|
122
|
+
.gz-editor select {
|
|
123
|
+
appearance: none; cursor: pointer;
|
|
124
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
|
|
125
|
+
background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2rem;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* Hide rjsf chrome */
|
|
129
|
+
.gz-editor .btn { display: none; }
|
|
130
|
+
.gz-editor fieldset { border: none; padding: 0; margin: 0; }
|
|
131
|
+
.gz-editor legend { display: none; }
|
|
132
|
+
|
|
133
|
+
/* Errors */
|
|
134
|
+
.gz-editor .error-detail, .gz-editor .text-danger { color: var(--gz-error, #f87171); font-size: 0.75rem; margin-top: 0.25rem; }
|
|
135
|
+
.gz-editor .has-error input, .gz-editor .has-error textarea, .gz-editor .has-error select { border-color: color-mix(in srgb, var(--gz-error, #f87171) 50%, transparent); }
|
|
136
|
+
|
|
137
|
+
/* Required marker */
|
|
138
|
+
.gz-editor label .required { color: var(--gz-error, #f87171); margin-left: 0.125rem; }
|
|
139
|
+
|
|
140
|
+
/* ---- Toggle ---- */
|
|
141
|
+
.gz-editor .gz-toggle { display: flex; align-items: center; gap: 0.625rem; cursor: pointer; user-select: none; padding: 0.25rem 0; }
|
|
142
|
+
.gz-editor .gz-toggle-track {
|
|
143
|
+
position: relative; width: 36px; height: 20px; border-radius: 10px;
|
|
144
|
+
background: var(--gz-border, #2a2a3a); transition: background 0.2s; flex-shrink: 0;
|
|
145
|
+
}
|
|
146
|
+
.gz-editor .gz-toggle-track.on { background: var(--gz-accent, #667eea); }
|
|
147
|
+
.gz-editor .gz-toggle-thumb {
|
|
148
|
+
position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
|
|
149
|
+
background: #fff; transition: transform 0.2s ease;
|
|
150
|
+
}
|
|
151
|
+
.gz-editor .gz-toggle-track.on .gz-toggle-thumb { transform: translateX(16px); }
|
|
152
|
+
.gz-editor .gz-toggle-label { font-size: 0.8125rem; color: var(--gz-text-secondary, #ccc); font-weight: 400; text-transform: none; letter-spacing: 0; }
|
|
153
|
+
|
|
154
|
+
/* ---- Color ---- */
|
|
155
|
+
.gz-editor .gz-color-widget { display: flex; align-items: center; gap: 0.5rem; }
|
|
156
|
+
.gz-editor .gz-color-widget input[type="color"] {
|
|
157
|
+
width: 36px; height: 36px; border: 1px solid var(--gz-border, #2a2a3a); border-radius: 6px;
|
|
158
|
+
padding: 2px; cursor: pointer; background: transparent;
|
|
159
|
+
}
|
|
160
|
+
.gz-editor .gz-color-widget input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
|
|
161
|
+
.gz-editor .gz-color-widget input[type="color"]::-webkit-color-swatch { border-radius: 3px; border: none; }
|
|
162
|
+
.gz-editor .gz-color-widget input[type="text"] { flex: 1; }
|
|
163
|
+
|
|
164
|
+
/* ---- Tags ---- */
|
|
165
|
+
.gz-editor .gz-tags {
|
|
166
|
+
display: flex; flex-wrap: wrap; gap: 0.375rem; padding: 0.375rem 0.5rem;
|
|
167
|
+
background: var(--gz-bg-input, #161622); border: 1px solid var(--gz-border, #2a2a3a); border-radius: 6px;
|
|
168
|
+
min-height: 2.5rem; align-items: center; cursor: text; transition: border-color 0.15s, box-shadow 0.15s;
|
|
169
|
+
}
|
|
170
|
+
.gz-editor .gz-tags:focus-within { border-color: var(--gz-accent, #667eea); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gz-accent, #667eea) 15%, transparent); }
|
|
171
|
+
.gz-editor .gz-tag {
|
|
172
|
+
display: inline-flex; align-items: center; gap: 0.25rem;
|
|
173
|
+
padding: 0.1875rem 0.5rem 0.1875rem 0.625rem;
|
|
174
|
+
background: var(--gz-bg-chip, #252538); border: 1px solid var(--gz-border, #2a2a3a); border-radius: 4px;
|
|
175
|
+
font-size: 0.8125rem; color: var(--gz-text-secondary, #ccc); transition: background 0.1s;
|
|
176
|
+
}
|
|
177
|
+
.gz-editor .gz-tag:hover { background: var(--gz-bg-chip, #252538); filter: brightness(1.1); }
|
|
178
|
+
.gz-editor .gz-tag-remove {
|
|
179
|
+
background: none; border: none; color: var(--gz-text-hint, #666); cursor: pointer; font-size: 1rem;
|
|
180
|
+
padding: 0; line-height: 1; display: flex; align-items: center;
|
|
181
|
+
}
|
|
182
|
+
.gz-editor .gz-tag-remove:hover { color: var(--gz-error, #f87171); }
|
|
183
|
+
.gz-editor .gz-tags-input {
|
|
184
|
+
border: none !important; background: transparent !important; color: var(--gz-text, #e0e0e0); font-size: 0.8125rem;
|
|
185
|
+
outline: none !important; min-width: 80px; flex: 1; padding: 0.125rem 0;
|
|
186
|
+
box-shadow: none !important;
|
|
187
|
+
}
|
|
188
|
+
.gz-editor .gz-tags-empty { color: var(--gz-text-hint, #444); font-size: 0.75rem; padding: 0.25rem 0; }
|
|
189
|
+
|
|
190
|
+
/* ---- Image ---- */
|
|
191
|
+
.gz-editor .gz-image-preview {
|
|
192
|
+
margin-top: 0.5rem; border-radius: 6px; overflow: hidden;
|
|
193
|
+
background: var(--gz-bg-input, #161622); border: 1px dashed var(--gz-border, #2a2a3a); transition: border-color 0.15s;
|
|
194
|
+
}
|
|
195
|
+
.gz-editor .gz-image-preview.has-image { border-style: solid; }
|
|
196
|
+
.gz-editor .gz-image-preview img { display: block; max-width: 100%; max-height: 200px; object-fit: contain; margin: 0 auto; }
|
|
197
|
+
.gz-editor .gz-image-preview-empty {
|
|
198
|
+
padding: 2rem; text-align: center; color: var(--gz-text-hint, #444); font-size: 0.75rem;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/* ---- Slug ---- */
|
|
202
|
+
.gz-editor .gz-slug-widget input {
|
|
203
|
+
font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.8125rem; letter-spacing: 0.02em;
|
|
204
|
+
}
|
|
205
|
+
.gz-editor .gz-slug-hint { font-size: 0.6875rem; color: var(--gz-text-hint, #444); margin-top: 0.25rem; }
|
|
206
|
+
|
|
207
|
+
/* ---- Code ---- */
|
|
208
|
+
.gz-editor .gz-code-widget textarea {
|
|
209
|
+
font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.8125rem;
|
|
210
|
+
line-height: 1.6; min-height: 10rem; tab-size: 2;
|
|
211
|
+
}
|
|
212
|
+
.gz-editor .gz-code-hint { font-size: 0.6875rem; color: var(--gz-text-hint, #444); margin-top: 0.25rem; }
|
|
213
|
+
|
|
214
|
+
/* ---- JSON ---- */
|
|
215
|
+
.gz-editor .gz-json-widget textarea {
|
|
216
|
+
font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.8125rem;
|
|
217
|
+
line-height: 1.6; min-height: 8rem; tab-size: 2;
|
|
218
|
+
}
|
|
219
|
+
.gz-editor .gz-json-error { font-size: 0.6875rem; color: var(--gz-error, #f87171); margin-top: 0.25rem; }
|
|
220
|
+
.gz-editor .gz-json-valid { font-size: 0.6875rem; color: var(--gz-success, #4ade80); margin-top: 0.25rem; }
|
|
221
|
+
|
|
222
|
+
/* ---- Markdown ---- */
|
|
223
|
+
.gz-editor .gz-markdown textarea {
|
|
224
|
+
min-height: 12rem; font-family: 'JetBrains Mono', 'Fira Code', monospace;
|
|
225
|
+
font-size: 0.8125rem; line-height: 1.6;
|
|
226
|
+
}
|
|
227
|
+
.gz-editor .gz-markdown-hint { font-size: 0.6875rem; color: var(--gz-text-hint, #444); margin-top: 0.25rem; }
|
|
228
|
+
|
|
229
|
+
/* ---- Rich text (Tiptap) ---- */
|
|
230
|
+
.gz-editor .gz-richtext {
|
|
231
|
+
border: 1px solid var(--gz-border, #2a2a3a); border-radius: 6px; overflow: hidden;
|
|
232
|
+
background: var(--gz-bg-input, #161622); transition: border-color 0.15s, box-shadow 0.15s;
|
|
233
|
+
}
|
|
234
|
+
.gz-editor .gz-richtext:focus-within { border-color: var(--gz-accent, #667eea); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gz-accent, #667eea) 15%, transparent); }
|
|
235
|
+
.gz-editor .gz-richtext-toolbar {
|
|
236
|
+
display: flex; flex-wrap: wrap; gap: 1px; padding: 0.25rem;
|
|
237
|
+
border-bottom: 1px solid var(--gz-border-subtle, #1e1e2e); background: var(--gz-bg-toolbar, #1a1a2a);
|
|
238
|
+
}
|
|
239
|
+
.gz-editor .gz-rt-btn {
|
|
240
|
+
background: none; border: 1px solid transparent; border-radius: 4px;
|
|
241
|
+
color: var(--gz-text-hint, #777); cursor: pointer; padding: 0.3125rem 0.5rem; font-size: 0.6875rem;
|
|
242
|
+
font-family: inherit; line-height: 1; font-weight: 600; transition: all 0.1s;
|
|
243
|
+
display: flex; align-items: center; justify-content: center; min-width: 28px;
|
|
244
|
+
}
|
|
245
|
+
.gz-editor .gz-rt-btn:hover { color: var(--gz-text-secondary, #ccc); background: var(--gz-bg-chip, #252538); }
|
|
246
|
+
.gz-editor .gz-rt-btn.active { color: var(--gz-accent, #667eea); background: var(--gz-bg-chip, #252538); border-color: color-mix(in srgb, var(--gz-accent, #667eea) 20%, transparent); }
|
|
247
|
+
.gz-editor .gz-rt-sep { width: 1px; background: var(--gz-bg-chip, #252538); margin: 0.125rem 0.25rem; align-self: stretch; }
|
|
248
|
+
|
|
249
|
+
/* Tiptap content area */
|
|
250
|
+
.gz-editor .gz-richtext .tiptap { outline: none; padding: 0.75rem; min-height: 10rem; color: var(--gz-text, #e0e0e0); font-size: 0.875rem; line-height: 1.7; }
|
|
251
|
+
.gz-editor .gz-richtext .tiptap p { margin: 0.25rem 0; }
|
|
252
|
+
.gz-editor .gz-richtext .tiptap h2 { font-size: 1.25rem; font-weight: 700; margin: 1rem 0 0.25rem; color: var(--gz-text, #e0e0e0); }
|
|
253
|
+
.gz-editor .gz-richtext .tiptap h3 { font-size: 1.1rem; font-weight: 600; margin: 0.75rem 0 0.25rem; color: var(--gz-text, #e0e0e0); }
|
|
254
|
+
.gz-editor .gz-richtext .tiptap ul, .gz-editor .gz-richtext .tiptap ol { padding-left: 1.25rem; margin: 0.25rem 0; }
|
|
255
|
+
.gz-editor .gz-richtext .tiptap li { margin: 0.125rem 0; }
|
|
256
|
+
.gz-editor .gz-richtext .tiptap blockquote {
|
|
257
|
+
border-left: 3px solid color-mix(in srgb, var(--gz-accent, #667eea) 25%, transparent); padding-left: 0.875rem; margin: 0.5rem 0;
|
|
258
|
+
color: var(--gz-text-secondary, #999); font-style: italic;
|
|
259
|
+
}
|
|
260
|
+
.gz-editor .gz-richtext .tiptap code {
|
|
261
|
+
background: var(--gz-bg-chip, #252538); padding: 0.125rem 0.375rem; border-radius: 3px;
|
|
262
|
+
font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.8125rem;
|
|
263
|
+
}
|
|
264
|
+
.gz-editor .gz-richtext .tiptap pre {
|
|
265
|
+
background: var(--gz-bg-code, #12121e); padding: 0.875rem; border-radius: 6px; overflow-x: auto; margin: 0.5rem 0;
|
|
266
|
+
}
|
|
267
|
+
.gz-editor .gz-richtext .tiptap pre code { background: none; padding: 0; }
|
|
268
|
+
.gz-editor .gz-richtext .tiptap a { color: var(--gz-accent, #667eea); text-decoration: underline; cursor: pointer; }
|
|
269
|
+
.gz-editor .gz-richtext .tiptap hr { border: none; border-top: 1px solid var(--gz-border, #2a2a3a); margin: 1rem 0; }
|
|
270
|
+
.gz-editor .gz-richtext .tiptap p.is-editor-empty:first-child::before {
|
|
271
|
+
content: attr(data-placeholder); float: left; color: var(--gz-text-hint, #444); pointer-events: none; height: 0;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/* Bubble menu */
|
|
275
|
+
.gz-editor .gz-bubble {
|
|
276
|
+
display: flex; gap: 1px; background: var(--gz-bg-toolbar, #1a1a2a); border: 1px solid var(--gz-border, #2a2a3a);
|
|
277
|
+
border-radius: 6px; padding: 0.1875rem; box-shadow: 0 4px 16px #0008;
|
|
278
|
+
}
|
|
279
|
+
.gz-editor .gz-bubble .gz-rt-btn { padding: 0.25rem 0.4375rem; font-size: 0.625rem; }
|
|
280
|
+
|
|
281
|
+
/* ---- Array ---- */
|
|
282
|
+
.gz-editor .gz-array { margin-bottom: 0.25rem; }
|
|
283
|
+
.gz-editor .gz-array-header {
|
|
284
|
+
display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; padding-bottom: 0.375rem;
|
|
285
|
+
border-bottom: 1px solid var(--gz-border-subtle, #1e1e2e);
|
|
286
|
+
}
|
|
287
|
+
.gz-editor .gz-array-title {
|
|
288
|
+
font-size: 0.6875rem; font-weight: 600; text-transform: uppercase;
|
|
289
|
+
letter-spacing: 0.05em; color: var(--gz-text-label, #8888a0);
|
|
290
|
+
}
|
|
291
|
+
.gz-editor .gz-array-count {
|
|
292
|
+
font-size: 0.625rem; color: var(--gz-text-hint, #555); background: var(--gz-border-subtle, #1e1e2e);
|
|
293
|
+
padding: 0.0625rem 0.4375rem; border-radius: 8px; font-weight: 600;
|
|
294
|
+
}
|
|
295
|
+
.gz-editor .gz-array-add {
|
|
296
|
+
margin-left: auto; background: none; border: 1px solid color-mix(in srgb, var(--gz-accent, #667eea) 20%, transparent);
|
|
297
|
+
color: var(--gz-accent, #667eea); cursor: pointer; font-size: 0.6875rem; font-weight: 600;
|
|
298
|
+
padding: 0.25rem 0.625rem; border-radius: 4px; transition: all 0.15s;
|
|
299
|
+
}
|
|
300
|
+
.gz-editor .gz-array-add:hover { background: color-mix(in srgb, var(--gz-accent, #667eea) 8%, transparent); border-color: color-mix(in srgb, var(--gz-accent, #667eea) 30%, transparent); }
|
|
301
|
+
.gz-editor .gz-array-items { display: flex; flex-direction: column; gap: 0.25rem; }
|
|
302
|
+
|
|
303
|
+
/* Array items — collapsible */
|
|
304
|
+
.gz-editor .gz-array-item {
|
|
305
|
+
background: var(--gz-bg-card, #1a1a28); border-radius: 6px; border: 1px solid var(--gz-border-subtle, #1e1e2e);
|
|
306
|
+
transition: border-color 0.15s;
|
|
307
|
+
}
|
|
308
|
+
.gz-editor .gz-array-item:hover { border-color: var(--gz-border, #2a2a3a); }
|
|
309
|
+
.gz-editor .gz-array-item.dragging { opacity: 0.9; box-shadow: 0 4px 20px #0006; border-color: color-mix(in srgb, var(--gz-accent, #667eea) 25%, transparent); }
|
|
310
|
+
.gz-editor .gz-array-item-header {
|
|
311
|
+
display: flex; align-items: center; gap: 0.375rem; padding: 0.5rem 0.625rem;
|
|
312
|
+
cursor: pointer; user-select: none; min-height: 36px;
|
|
313
|
+
}
|
|
314
|
+
.gz-editor .gz-array-item-handle {
|
|
315
|
+
color: var(--gz-text-hint, #444); font-size: 0.625rem; cursor: grab; flex-shrink: 0; padding: 0.25rem 0.125rem;
|
|
316
|
+
opacity: 0; transition: opacity 0.1s; display: flex; align-items: center; letter-spacing: 1px;
|
|
317
|
+
}
|
|
318
|
+
.gz-editor .gz-array-item:hover .gz-array-item-handle { opacity: 1; }
|
|
319
|
+
.gz-editor .gz-array-item-handle:active { cursor: grabbing; color: var(--gz-accent, #667eea); }
|
|
320
|
+
.gz-editor .gz-array-item-chevron {
|
|
321
|
+
color: var(--gz-text-hint, #444); font-size: 0.5rem; transition: transform 0.15s ease; flex-shrink: 0; width: 12px; text-align: center;
|
|
322
|
+
}
|
|
323
|
+
.gz-editor .gz-array-item-chevron.open { transform: rotate(90deg); }
|
|
324
|
+
.gz-editor .gz-array-item-summary {
|
|
325
|
+
flex: 1; font-size: 0.8125rem; color: var(--gz-text-secondary, #999); white-space: nowrap;
|
|
326
|
+
overflow: hidden; text-overflow: ellipsis; min-width: 0;
|
|
327
|
+
}
|
|
328
|
+
.gz-editor .gz-array-item-summary.empty { color: var(--gz-text-hint, #444); font-style: italic; }
|
|
329
|
+
.gz-editor .gz-array-item-idx {
|
|
330
|
+
font-size: 0.625rem; color: var(--gz-text-hint, #444); font-weight: 600; flex-shrink: 0;
|
|
331
|
+
min-width: 1rem; text-align: center;
|
|
332
|
+
}
|
|
333
|
+
.gz-editor .gz-array-item-actions { display: flex; gap: 1px; flex-shrink: 0; opacity: 0; transition: opacity 0.1s; }
|
|
334
|
+
.gz-editor .gz-array-item:hover .gz-array-item-actions { opacity: 1; }
|
|
335
|
+
.gz-editor .gz-array-item-body {
|
|
336
|
+
padding: 0 0.75rem 0.75rem; overflow: hidden;
|
|
337
|
+
transition: max-height 0.2s ease, opacity 0.15s ease, padding 0.2s ease;
|
|
338
|
+
}
|
|
339
|
+
.gz-editor .gz-array-item-body.collapsed { max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; }
|
|
340
|
+
.gz-editor .gz-array-item-body.expanded { max-height: 2000px; opacity: 1; }
|
|
341
|
+
.gz-editor .gz-array-item-body .form-group:last-child { margin-bottom: 0; }
|
|
342
|
+
.gz-editor .gz-array-item-body fieldset > .form-group:last-child { margin-bottom: 0; }
|
|
343
|
+
|
|
344
|
+
/* Icon buttons */
|
|
345
|
+
.gz-editor .gz-btn-icon {
|
|
346
|
+
width: 24px; height: 24px; display: flex; align-items: center; justify-content: center;
|
|
347
|
+
background: transparent; border: none; border-radius: 3px; color: var(--gz-text-hint, #555); cursor: pointer;
|
|
348
|
+
font-size: 0.6875rem; padding: 0; transition: all 0.1s;
|
|
349
|
+
}
|
|
350
|
+
.gz-editor .gz-btn-icon:hover { background: var(--gz-bg-chip, #252538); color: var(--gz-text-secondary, #ccc); }
|
|
351
|
+
.gz-editor .gz-btn-icon:disabled { opacity: 0.25; cursor: default; }
|
|
352
|
+
.gz-editor .gz-btn-icon:disabled:hover { background: transparent; color: var(--gz-text-hint, #555); }
|
|
353
|
+
.gz-editor .gz-btn-icon.gz-btn-remove:hover { background: color-mix(in srgb, var(--gz-error, #f87171) 15%, transparent); color: var(--gz-error, #f87171); }
|
|
354
|
+
|
|
355
|
+
/* Array empty state */
|
|
356
|
+
.gz-editor .gz-array-empty {
|
|
357
|
+
padding: 1.5rem; text-align: center; border: 1px dashed var(--gz-border-subtle, #1e1e2e); border-radius: 6px;
|
|
358
|
+
color: var(--gz-text-hint, #444); font-size: 0.8125rem;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/* Nested objects in arrays */
|
|
362
|
+
.gz-editor .gz-object-inline { }
|
|
363
|
+
.gz-editor .gz-object-inline > .form-group { margin-bottom: 0.625rem; }
|
|
364
|
+
`,Xf=new Set([`body`,`description`,`text`,`content`,`bio`,`summary`,`message`,`notes`,`output`]),Zf=new Set([`href`,`url`,`link`,`src`]),Qf=new Set([`background`,`color`]);function $f(e){let t={"ui:submitButtonOptions":{norender:!0}},n=e.properties;if(!n)return t;for(let[e,r]of Object.entries(n)){let n=r.format,i=r.type,a=r.field;if(a){t[e]={"ui:widget":`custom-field:${a}`};continue}if(n===`markdown`||n===`richtext`||n===`image`||n===`link`||n===`slug`||n===`code`||n===`json`){t[e]={"ui:widget":n};continue}if(n===`color`){t[e]={"ui:widget":`color`};continue}i===`string`&&!n&&(Xf.has(e)?t[e]={"ui:widget":`textarea`,"ui:options":{rows:5}}:Zf.has(e)?t[e]={"ui:options":{inputType:`url`}}:Qf.has(e)&&(t[e]={"ui:widget":`color`})),i===`boolean`&&(t[e]={"ui:widget":`toggle`}),i===`array`&&r.items?.type===`string`&&(t[e]={"ui:widget":`tags`})}return t}function ep(e){if(!e||typeof e!=`object`)return String(e??``);let t=e;for(let e of[`title`,`name`,`label`,`heading`,`text`,`quote`,`command`])if(typeof t[e]==`string`&&t[e])return t[e];for(let e of Object.values(t))if(typeof e==`string`&&e.trim())return e.trim();return``}function tp(e){return(0,V.jsxs)(`div`,{className:`gz-markdown`,children:[(0,V.jsx)(`textarea`,{value:e.value??``,onChange:t=>e.onChange(t.target.value),placeholder:`Write markdown here...`,rows:12}),(0,V.jsx)(`div`,{className:`gz-markdown-hint`,children:`Markdown supported`})]})}function np(e){let t=!!e.value;return(0,V.jsxs)(`div`,{className:`gz-toggle`,onClick:()=>!e.disabled&&!e.readonly&&e.onChange(!t),role:`switch`,"aria-checked":t,children:[(0,V.jsx)(`div`,{className:`gz-toggle-track${t?` on`:``}`,children:(0,V.jsx)(`div`,{className:`gz-toggle-thumb`})}),e.label&&(0,V.jsx)(`span`,{className:`gz-toggle-label`,children:e.label})]})}function rp(e){let t=e.value??``;return(0,V.jsxs)(`div`,{className:`gz-color-widget`,children:[(0,V.jsx)(`input`,{type:`color`,value:t||`#667eea`,onChange:t=>e.onChange(t.target.value)}),(0,V.jsx)(`input`,{type:`text`,value:t,onChange:t=>e.onChange(t.target.value),placeholder:`#667eea`})]})}function ip(e){let t=Array.isArray(e.value)?e.value:[],[n,r]=H.useState(``),i=H.useRef(null),a=n=>{let i=n.trim();i&&!t.includes(i)&&e.onChange([...t,i]),r(``)},o=n=>e.onChange(t.filter((e,t)=>t!==n));return(0,V.jsxs)(`div`,{className:`gz-tags`,onClick:()=>i.current?.focus(),children:[t.map((e,t)=>(0,V.jsxs)(`span`,{className:`gz-tag`,children:[e,(0,V.jsx)(`button`,{type:`button`,className:`gz-tag-remove`,onClick:e=>{e.stopPropagation(),o(t)},"aria-label":`Remove ${e}`,children:`×`})]},`${e}-${t}`)),(0,V.jsx)(`input`,{ref:i,className:`gz-tags-input`,value:n,onChange:e=>r(e.target.value),onKeyDown:e=>{e.key===`Enter`||e.key===`,`?(e.preventDefault(),a(n)):e.key===`Backspace`&&!n&&t.length>0&&o(t.length-1)},onBlur:()=>{n&&a(n)},placeholder:t.length===0?`Type and press Enter...`:``})]})}function ap(e){let t=e.value??``,[n,r]=H.useState(!1);return H.useEffect(()=>{r(!1)},[t]),(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`input`,{type:`text`,value:t,onChange:t=>e.onChange(t.target.value),placeholder:`https://example.com/image.png`}),(0,V.jsx)(`div`,{className:`gz-image-preview${t&&!n?` has-image`:``}`,children:t&&!n?(0,V.jsx)(`img`,{src:t,alt:`Preview`,onError:()=>r(!0)}):(0,V.jsx)(`div`,{className:`gz-image-preview-empty`,children:t?`Image failed to load`:`Paste an image URL above`})})]})}function op(e){return(0,V.jsx)(`input`,{type:`url`,value:e.value??``,onChange:t=>e.onChange(t.target.value),placeholder:`https://...`})}function sp(e){let t=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``);return(0,V.jsxs)(`div`,{className:`gz-slug-widget`,children:[(0,V.jsx)(`input`,{type:`text`,value:e.value??``,onChange:n=>e.onChange(t(n.target.value)),placeholder:`my-page-slug`}),(0,V.jsx)(`div`,{className:`gz-slug-hint`,children:`URL-safe identifier — lowercase, hyphens only`})]})}function cp(e){let t=e.schema.language;return(0,V.jsxs)(`div`,{className:`gz-code-widget`,children:[(0,V.jsx)(`textarea`,{value:e.value??``,onChange:t=>e.onChange(t.target.value),placeholder:e.placeholder,rows:15,spellCheck:!1}),t&&(0,V.jsx)(`div`,{className:`gz-code-hint`,children:t})]})}function lp(e){let[t,n]=H.useState(null),[r,i]=H.useState(()=>e.value==null?``:typeof e.value==`string`?e.value:JSON.stringify(e.value,null,2)),a=()=>{if(!r.trim()){n(null);return}try{JSON.parse(r),n(null)}catch{n(`Invalid JSON`)}},o=t=>{i(t);try{let r=JSON.parse(t);n(null),e.onChange(r)}catch{}};return(0,V.jsxs)(`div`,{className:`gz-json-widget`,children:[(0,V.jsx)(`textarea`,{value:r,onChange:e=>o(e.target.value),onBlur:a,placeholder:`{ "key": "value" }`,rows:10,spellCheck:!1}),t&&(0,V.jsx)(`div`,{className:`gz-json-error`,children:t})]})}function up(e){let t=H.useRef(e.onChange);t.current=e.onChange;let n=ge({extensions:[he.configure({heading:{levels:[2,3]},codeBlock:{HTMLAttributes:{spellcheck:`false`}}}),_e.configure({openOnClick:!1,HTMLAttributes:{rel:`noopener noreferrer`}}),ve.configure({placeholder:`Start writing...`})],content:e.value||``,onUpdate:({editor:e})=>t.current(e.getHTML()),immediatelyRender:!0});if(!n)return null;let r=({active:e,onClick:t,children:n})=>(0,V.jsx)(`button`,{type:`button`,className:`gz-rt-btn${e?` active`:``}`,onMouseDown:e=>{e.preventDefault(),t()},children:n}),i=()=>{let e=n.getAttributes(`link`).href,t=prompt(`URL:`,e??`https://`);if(t!==null){if(t===``){n.chain().focus().extendMarkRange(`link`).unsetLink().run();return}n.chain().focus().extendMarkRange(`link`).setLink({href:t}).run()}};return(0,V.jsxs)(`div`,{className:`gz-richtext`,children:[(0,V.jsxs)(`div`,{className:`gz-richtext-toolbar`,children:[(0,V.jsx)(r,{active:n.isActive(`bold`),onClick:()=>n.chain().focus().toggleBold().run(),children:`B`}),(0,V.jsx)(r,{active:n.isActive(`italic`),onClick:()=>n.chain().focus().toggleItalic().run(),children:`I`}),(0,V.jsx)(r,{active:n.isActive(`strike`),onClick:()=>n.chain().focus().toggleStrike().run(),children:`S`}),(0,V.jsx)(r,{active:n.isActive(`code`),onClick:()=>n.chain().focus().toggleCode().run(),children:`</>`}),(0,V.jsx)(`div`,{className:`gz-rt-sep`}),(0,V.jsx)(r,{active:n.isActive(`heading`,{level:2}),onClick:()=>n.chain().focus().toggleHeading({level:2}).run(),children:`H2`}),(0,V.jsx)(r,{active:n.isActive(`heading`,{level:3}),onClick:()=>n.chain().focus().toggleHeading({level:3}).run(),children:`H3`}),(0,V.jsx)(`div`,{className:`gz-rt-sep`}),(0,V.jsx)(r,{active:n.isActive(`bulletList`),onClick:()=>n.chain().focus().toggleBulletList().run(),children:`•`}),(0,V.jsx)(r,{active:n.isActive(`orderedList`),onClick:()=>n.chain().focus().toggleOrderedList().run(),children:`1.`}),(0,V.jsx)(r,{active:n.isActive(`blockquote`),onClick:()=>n.chain().focus().toggleBlockquote().run(),children:`“`}),(0,V.jsx)(`div`,{className:`gz-rt-sep`}),(0,V.jsx)(r,{active:n.isActive(`link`),onClick:i,children:`Link`}),(0,V.jsx)(r,{onClick:()=>n.chain().focus().setHorizontalRule().run(),children:`—`}),(0,V.jsx)(r,{active:n.isActive(`codeBlock`),onClick:()=>n.chain().focus().toggleCodeBlock().run(),children:`Code`})]}),(0,V.jsx)(me,{editor:n,children:(0,V.jsxs)(`div`,{className:`gz-bubble`,children:[(0,V.jsx)(r,{active:n.isActive(`bold`),onClick:()=>n.chain().focus().toggleBold().run(),children:`B`}),(0,V.jsx)(r,{active:n.isActive(`italic`),onClick:()=>n.chain().focus().toggleItalic().run(),children:`I`}),(0,V.jsx)(r,{active:n.isActive(`strike`),onClick:()=>n.chain().focus().toggleStrike().run(),children:`S`}),(0,V.jsx)(r,{active:n.isActive(`code`),onClick:()=>n.chain().focus().toggleCode().run(),children:`</>`}),(0,V.jsx)(r,{active:n.isActive(`link`),onClick:i,children:`Link`})]})}),(0,V.jsx)(pe,{editor:n})]})}function dp(e){let t=e.registry.formContext,n=e.fieldPathId?.$id??``;return e.items.length===0?(0,V.jsxs)(`div`,{className:`gz-array`,children:[(0,V.jsxs)(`div`,{className:`gz-array-header`,children:[e.title&&(0,V.jsx)(`span`,{className:`gz-array-title`,children:e.title}),(0,V.jsx)(`span`,{className:`gz-array-count`,children:`0`})]}),(0,V.jsxs)(`div`,{className:`gz-array-empty`,children:[`No items yet`,e.canAdd&&(0,V.jsx)(`div`,{style:{marginTop:`0.5rem`},children:(0,V.jsx)(`button`,{type:`button`,className:`gz-array-add`,onClick:e.onAddClick,children:`+ Add first item`})})]})]}):(0,V.jsxs)(`div`,{className:`gz-array`,children:[(0,V.jsxs)(`div`,{className:`gz-array-header`,children:[e.title&&(0,V.jsx)(`span`,{className:`gz-array-title`,children:e.title}),(0,V.jsx)(`span`,{className:`gz-array-count`,children:e.items.length}),e.canAdd&&(0,V.jsx)(`button`,{type:`button`,className:`gz-array-add`,onClick:e.onAddClick,children:`+ Add`})]}),(0,V.jsx)(Gd,{onDragEnd:e=>{!e.destination||e.source.index===e.destination.index||t?.reorderArray(n,e.source.index,e.destination.index)},children:(0,V.jsx)(qf,{droppableId:n||`array`,children:t=>(0,V.jsxs)(`div`,{className:`gz-array-items`,ref:t.innerRef,...t.droppableProps,children:[e.items,t.placeholder]})})})]})}function fp(e){let[t,n]=H.useState(!0),r=ep(e.formData);return(0,V.jsx)(gf,{draggableId:`${e.buttonsProps.fieldPathId?.$id??`item`}-${e.index}`,index:e.index,children:(i,a)=>(0,V.jsxs)(`div`,{className:`gz-array-item${a.isDragging?` dragging`:``}`,ref:i.innerRef,...i.draggableProps,children:[(0,V.jsxs)(`div`,{className:`gz-array-item-header`,onClick:()=>n(!t),children:[(0,V.jsx)(`span`,{className:`gz-array-item-handle`,...i.dragHandleProps,onClick:e=>e.stopPropagation(),children:`⠁⠁`}),(0,V.jsx)(`span`,{className:`gz-array-item-chevron${t?` open`:``}`,children:`▶`}),(0,V.jsx)(`span`,{className:`gz-array-item-idx`,children:e.index+1}),!t&&(0,V.jsx)(`span`,{className:`gz-array-item-summary${r?``:` empty`}`,children:r||`Empty item`}),(0,V.jsx)(`div`,{className:`gz-array-item-actions`,onClick:e=>e.stopPropagation(),children:(0,V.jsx)(pp,{...e.buttonsProps})})]}),(0,V.jsx)(`div`,{className:`gz-array-item-body ${t?`expanded`:`collapsed`}`,children:e.children})]})})}function pp(e){return(0,V.jsxs)(V.Fragment,{children:[e.hasMoveUp&&(0,V.jsx)(`button`,{type:`button`,className:`gz-btn-icon`,onClick:e.onMoveUpItem,title:`Move up`,children:`↑`}),e.hasMoveDown&&(0,V.jsx)(`button`,{type:`button`,className:`gz-btn-icon`,onClick:e.onMoveDownItem,title:`Move down`,children:`↓`}),e.hasRemove&&(0,V.jsx)(`button`,{type:`button`,className:`gz-btn-icon gz-btn-remove`,onClick:e.onRemoveItem,title:`Remove`,children:`×`})]})}function mp(e){return e.fieldPathId?.$id===`root`?(0,V.jsx)(V.Fragment,{children:e.properties.map(e=>e.content)}):(0,V.jsx)(`div`,{className:`gz-object-inline`,children:e.properties.map(e=>e.content)})}function hp(e){return(0,V.jsx)(`button`,{type:`button`,className:`gz-array-add`,onClick:e.onClick,disabled:e.disabled,children:`+ Add`})}var gp=new Map;function _p(e){let t=gp.get(e);if(t)return t;let n=t=>{let n=H.useRef(null),r=H.useRef(null),i=H.useRef(!1),[a,o]=H.useState(!0),[s,c]=H.useState(null),l=t.registry?.formContext;return H.useEffect(()=>{if(!l?.fieldsBaseUrl){c(`No fields base URL configured`),o(!1);return}let t=`${l.fieldsBaseUrl}/${e}`;(async()=>{for(let e of[`.tsx`,`.ts`,`.js`])try{let n=await bn(()=>import(`${t}${e}`),[]);r.current=n.default??n,o(!1);return}catch{}c(`Failed to load field "${e}"`),o(!1)})()},[l?.fieldsBaseUrl]),H.useEffect(()=>{if(a||!n.current||!r.current)return;let e=n.current,o=r.current;return o.mount(e,{value:t.value,schema:t.schema,theme:l?.theme??`dark`,onChange:e=>t.onChange(e)}),i.current=!0,()=>{o.unmount(e),i.current=!1}},[a]),H.useEffect(()=>{!i.current||!n.current||!r.current||r.current.mount(n.current,{value:t.value,schema:t.schema,theme:l?.theme??`dark`,onChange:e=>t.onChange(e)})},[t.value]),a?(0,V.jsxs)(`div`,{style:{color:`var(--gz-text-hint)`,fontSize:`0.75rem`,padding:`0.5rem 0`},children:[`Loading `,e,`...`]}):s?(0,V.jsx)(`div`,{style:{color:`var(--gz-error)`,fontSize:`0.75rem`},children:s}):(0,V.jsx)(`div`,{ref:n})};return gp.set(e,n),n}var vp={markdown:tp,toggle:np,color:rp,tags:ip,richtext:up,image:ap,link:op,slug:sp,code:cp,json:lp};function yp(e){let t={...vp},n=e.properties;if(!n)return t;for(let e of Object.values(n)){let n=e.field;n&&(t[`custom-field:${n}`]=_p(n))}return t}var bp={ArrayFieldTemplate:dp,ArrayFieldItemTemplate:fp,ArrayFieldItemButtonsTemplate:pp,ObjectFieldTemplate:mp,ButtonTemplates:{AddButton:hp}};function xp({schema:e,content:t,onChange:n,fieldsBaseUrl:r,theme:i}){let a=H.useMemo(()=>$f(e),[e]),o=H.useMemo(()=>yp(e),[e]),[s,c]=H.useState(t),l=H.useRef(s);l.current=s;let u=H.useRef([]),d=H.useRef([]),f=H.useRef(!1),p=e=>{f.current||(u.current.push(e),u.current.length>50&&u.current.shift(),d.current=[])},m=e=>{c(e),n(e)},h=e=>{p(l.current),c(e.formData),n(e.formData)};H.useEffect(()=>{let e=e=>{if((e.metaKey||e.ctrlKey)&&e.key===`z`)if(e.preventDefault(),e.shiftKey){if(d.current.length===0)return;let e=d.current.pop();u.current.push(l.current),f.current=!0,m(e),f.current=!1}else{if(u.current.length===0)return;let e=u.current.pop();d.current.push(l.current),f.current=!0,m(e),f.current=!1}};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[]);let g=H.useCallback((e,t,r)=>{c(i=>{p(i);let a=e.replace(/^root_/,``).split(`_`)[0],o=i[a];if(!Array.isArray(o))return i;let s=[...o],[c]=s.splice(t,1);s.splice(r,0,c);let l={...i,[a]:s};return n(l),l})},[n]),_=H.useMemo(()=>({reorderArray:g,fieldsBaseUrl:r,theme:i}),[g,r,i]);return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`style`,{children:Yf}),(0,V.jsx)(`div`,{className:`gz-editor`,children:(0,V.jsx)(fe,{schema:e,uiSchema:a,formData:s,onChange:h,validator:de,widgets:o,templates:bp,formContext:_,liveValidate:!1,omitExtraData:!0,noHtml5Validate:!0,autoComplete:`off`})})]})}function Sp(e){return{mount(t,{content:n,schema:r,theme:i,onChange:a,fieldsBaseUrl:o}){let s=Jf.get(t);s&&s.unmount();let c=(0,ci.createRoot)(t);Jf.set(t,c),c.render((0,V.jsx)(xp,{schema:r??e,content:n,theme:i,fieldsBaseUrl:o,onChange:a}))},unmount(e){let t=Jf.get(e);t&&(t.unmount(),Jf.delete(e))}}}var Cp={key:0,class:`editor-error`,"data-testid":`editor-error`},wp={key:1,class:`editor-empty`,"data-testid":`editor-empty`},Tp={key:2},Ep={key:1,class:`editor-no-schema`},Dp=B(f({__name:`EditorPanel`,setup(e){let t=Sn(),r=pn(),i=p(null),a=w(()=>{let e=t.schema;if(!e)return!1;let n=e.properties;return n&&Object.keys(n).length>0}),o=w(()=>!t.schema||!a.value?null:t.customEditorMount?t.customEditorMount:Sp(t.schema)),s=w(()=>t.content),c=w(()=>t.schema),l=w(()=>r.dark?`dark`:`light`),u=w(()=>t.mountVersion),f=w(()=>t.target?.fieldsBaseUrl);function m(e){t.markDirty(e)}oi(i,o,s,c,l,m,u,f),Er(`s`,e=>{(e.metaKey||e.ctrlKey)&&(e.preventDefault(),t.dirty&&t.save())});let _=w(()=>r.dark?{"--gz-bg-input":`#161622`,"--gz-bg-card":`#1a1a28`,"--gz-bg-toolbar":`#1a1a2a`,"--gz-bg-chip":`#252538`,"--gz-bg-code":`#12121e`,"--gz-text":`#e0e0e0`,"--gz-text-secondary":`#ccc`,"--gz-text-label":`#8888a0`,"--gz-text-hint":`#444`,"--gz-border":`#2a2a3a`,"--gz-border-subtle":`#1e1e2e`,"--gz-accent":`#667eea`,"--gz-error":`#f87171`,"--gz-success":`#4ade80`}:{"--gz-bg-input":`#ffffff`,"--gz-bg-card":`#f9fafb`,"--gz-bg-toolbar":`#f3f4f6`,"--gz-bg-chip":`#e5e7eb`,"--gz-bg-code":`#f1f5f9`,"--gz-text":`#1a1a1a`,"--gz-text-secondary":`#4b5563`,"--gz-text-label":`#6b7280`,"--gz-text-hint":`#9ca3af`,"--gz-border":`#e5e7eb`,"--gz-border-subtle":`#f3f4f6`,"--gz-accent":`#667eea`,"--gz-error":`#dc2626`,"--gz-success":`#16a34a`});return(e,r)=>(n(),I(`div`,{class:`editor-panel`,"data-testid":`editor-panel`,style:g(_.value)},[h(t).loadError?(n(),I(`div`,Cp,[r[0]||=C(`i`,{class:`pi pi-exclamation-triangle`},null,-1),C(`p`,null,d(h(t).loadError),1)])):h(t).path?(n(),I(`div`,Tp,[C(`h3`,null,d(h(t).template),1),a.value?(n(),I(`div`,{ref_key:`containerRef`,ref:i,class:`editor-container`,"data-testid":`editor-container`,key:h(t).path})):(n(),I(`p`,Ep,`No editable content. Edit its children instead.`))])):(n(),I(`div`,wp,[...r[1]||=[C(`i`,{class:`pi pi-pencil`,style:{"font-size":`2rem`,opacity:`0.3`,"margin-bottom":`0.5rem`}},null,-1),C(`p`,null,`Select a component to edit`,-1)]]))],4))}}),[[`__scopeId`,`data-v-568555bd`]]),Op=11;function kp(e,t){var n=t.attributes,r,i,a,o,s;if(!(t.nodeType===Op||e.nodeType===Op)){for(var c=n.length-1;c>=0;c--)r=n[c],i=r.name,a=r.namespaceURI,o=r.value,a?(i=r.localName||i,s=e.getAttributeNS(a,i),s!==o&&(r.prefix===`xmlns`&&(i=r.name),e.setAttributeNS(a,i,o))):(s=e.getAttribute(i),s!==o&&e.setAttribute(i,o));for(var l=e.attributes,u=l.length-1;u>=0;u--)r=l[u],i=r.name,a=r.namespaceURI,a?(i=r.localName||i,t.hasAttributeNS(a,i)||e.removeAttributeNS(a,i)):t.hasAttribute(i)||e.removeAttribute(i)}}var Ap,jp=`http://www.w3.org/1999/xhtml`,$=typeof document>`u`?void 0:document,Mp=!!$&&`content`in $.createElement(`template`),Np=!!$&&$.createRange&&`createContextualFragment`in $.createRange();function Pp(e){var t=$.createElement(`template`);return t.innerHTML=e,t.content.childNodes[0]}function Fp(e){return Ap||(Ap=$.createRange(),Ap.selectNode($.body)),Ap.createContextualFragment(e).childNodes[0]}function Ip(e){var t=$.createElement(`body`);return t.innerHTML=e,t.childNodes[0]}function Lp(e){return e=e.trim(),Mp?Pp(e):Np?Fp(e):Ip(e)}function Rp(e,t){var n=e.nodeName,r=t.nodeName,i,a;return n===r?!0:(i=n.charCodeAt(0),a=r.charCodeAt(0),i<=90&&a>=97?n===r.toUpperCase():a<=90&&i>=97?r===n.toUpperCase():!1)}function zp(e,t){return!t||t===jp?$.createElement(e):$.createElementNS(t,e)}function Bp(e,t){for(var n=e.firstChild;n;){var r=n.nextSibling;t.appendChild(n),n=r}return t}function Vp(e,t,n){e[n]!==t[n]&&(e[n]=t[n],e[n]?e.setAttribute(n,``):e.removeAttribute(n))}var Hp={OPTION:function(e,t){var n=e.parentNode;if(n){var r=n.nodeName.toUpperCase();r===`OPTGROUP`&&(n=n.parentNode,r=n&&n.nodeName.toUpperCase()),r===`SELECT`&&!n.hasAttribute(`multiple`)&&(e.hasAttribute(`selected`)&&!t.selected&&(e.setAttribute(`selected`,`selected`),e.removeAttribute(`selected`)),n.selectedIndex=-1)}Vp(e,t,`selected`)},INPUT:function(e,t){Vp(e,t,`checked`),Vp(e,t,`disabled`),e.value!==t.value&&(e.value=t.value),t.hasAttribute(`value`)||e.removeAttribute(`value`)},TEXTAREA:function(e,t){var n=t.value;e.value!==n&&(e.value=n);var r=e.firstChild;if(r){var i=r.nodeValue;if(i==n||!n&&i==e.placeholder)return;r.nodeValue=n}},SELECT:function(e,t){if(!t.hasAttribute(`multiple`)){for(var n=-1,r=0,i=e.firstChild,a,o;i;)if(o=i.nodeName&&i.nodeName.toUpperCase(),o===`OPTGROUP`)a=i,i=a.firstChild,i||(i=a.nextSibling,a=null);else{if(o===`OPTION`){if(i.hasAttribute(`selected`)){n=r;break}r++}i=i.nextSibling,!i&&a&&(i=a.nextSibling,a=null)}e.selectedIndex=n}}},Up=1,Wp=11,Gp=3,Kp=8;function qp(){}function Jp(e){if(e)return e.getAttribute&&e.getAttribute(`id`)||e.id}function Yp(e){return function(t,n,r){if(r||={},typeof n==`string`)if(t.nodeName===`#document`||t.nodeName===`HTML`){var i=n;n=$.createElement(`html`),n.innerHTML=i}else if(t.nodeName===`BODY`){var a=n;n=$.createElement(`html`),n.innerHTML=a;var o=n.querySelector(`body`);o&&(n=o)}else n=Lp(n);else n.nodeType===Wp&&(n=n.firstElementChild);var s=r.getNodeKey||Jp,c=r.onBeforeNodeAdded||qp,l=r.onNodeAdded||qp,u=r.onBeforeElUpdated||qp,d=r.onElUpdated||qp,f=r.onBeforeNodeDiscarded||qp,p=r.onNodeDiscarded||qp,m=r.onBeforeElChildrenUpdated||qp,h=r.skipFromChildren||qp,g=r.addChild||function(e,t){return e.appendChild(t)},_=r.childrenOnly===!0,v=Object.create(null),y=[];function b(e){y.push(e)}function x(e,t){if(e.nodeType===Up)for(var n=e.firstChild;n;){var r=void 0;t&&(r=s(n))?b(r):(p(n),n.firstChild&&x(n,t)),n=n.nextSibling}}function S(e,t,n){f(e)!==!1&&(t&&t.removeChild(e),p(e),x(e,n))}function C(e){if(e.nodeType===Up||e.nodeType===Wp)for(var t=e.firstChild;t;){var n=s(t);n&&(v[n]=t),C(t),t=t.nextSibling}}C(t);function w(e){l(e);for(var t=e.firstChild;t;){var n=t.nextSibling,r=s(t);if(r){var i=v[r];i&&Rp(t,i)?(t.parentNode.replaceChild(i,t),E(i,t)):w(t)}else w(t);t=n}}function T(e,t,n){for(;t;){var r=t.nextSibling;(n=s(t))?b(n):S(t,e,!0),t=r}}function E(t,n,r){var i=s(n);if(i&&delete v[i],!r){var a=u(t,n);if(a===!1||(a instanceof HTMLElement&&(t=a,C(t)),e(t,n),d(t),m(t,n)===!1))return}t.nodeName===`TEXTAREA`?Hp.TEXTAREA(t,n):D(t,n)}function D(e,t){var n=h(e,t),r=t.firstChild,i=e.firstChild,a,o,l,u,d;outer:for(;r;){for(u=r.nextSibling,a=s(r);!n&&i;){if(l=i.nextSibling,r.isSameNode&&r.isSameNode(i)){r=u,i=l;continue outer}o=s(i);var f=i.nodeType,p=void 0;if(f===r.nodeType&&(f===Up?(a?a!==o&&((d=v[a])?l===d?p=!1:(e.insertBefore(d,i),o?b(o):S(i,e,!0),i=d,o=s(i)):p=!1):o&&(p=!1),p=p!==!1&&Rp(i,r),p&&E(i,r)):(f===Gp||f==Kp)&&(p=!0,i.nodeValue!==r.nodeValue&&(i.nodeValue=r.nodeValue))),p){r=u,i=l;continue outer}o?b(o):S(i,e,!0),i=l}if(a&&(d=v[a])&&Rp(d,r))n||g(e,d),E(d,r);else{var m=c(r);m!==!1&&(m&&(r=m),r.actualize&&(r=r.actualize(e.ownerDocument||$)),g(e,r),w(r))}r=u,i=l}T(e,i,o);var _=Hp[e.nodeName];_&&_(e,t)}var O=t,k=O.nodeType,ee=n.nodeType;if(!_){if(k===Up)ee===Up?Rp(t,n)||(p(t),O=Bp(t,zp(n.nodeName,n.namespaceURI))):O=n;else if(k===Gp||k===Kp){if(ee===k)return O.nodeValue!==n.nodeValue&&(O.nodeValue=n.nodeValue),O;O=n}}if(O===n)p(t);else{if(n.isSameNode&&n.isSameNode(O))return;if(E(O,n,_),y)for(var A=0,j=y.length;A<j;A++){var M=v[y[A]];M&&S(M,M.parentNode,!1)}}return!_&&O!==t&&t.parentNode&&(O.actualize&&(O=O.actualize(t.ownerDocument||$)),t.parentNode.replaceChild(O,t)),O}}var Xp=Yp(kp),Zp={key:0,class:`preview-empty`,"data-testid":`preview-empty`},Qp={class:`preview-toolbar`},$p={class:`preview-devices`},em=[`title`,`onClick`],tm={class:`preview-route`},nm={class:`preview-actions`},rm=[`value`],im=[`value`],am=[`title`],om=[`title`],sm={class:`preview-frame-wrapper`},cm=`
|
|
365
|
+
<script>
|
|
366
|
+
(function() {
|
|
367
|
+
// Hover overlay — transient, subtle, fades
|
|
368
|
+
var hoverOvl = document.createElement('div');
|
|
369
|
+
hoverOvl.id = 'gz-hover';
|
|
370
|
+
hoverOvl.style.cssText = 'position:fixed;pointer-events:none;border:1px solid rgba(167,139,250,0.5);border-radius:4px;z-index:100000;transition:opacity 0.2s;display:none;opacity:0;';
|
|
371
|
+
document.body.appendChild(hoverOvl);
|
|
372
|
+
|
|
373
|
+
// Selection overlay — persistent, solid green
|
|
374
|
+
var selectOvl = document.createElement('div');
|
|
375
|
+
selectOvl.id = 'gz-select';
|
|
376
|
+
selectOvl.style.cssText = 'position:fixed;pointer-events:none;border:2px solid #22c55e;border-radius:4px;z-index:99999;display:none;';
|
|
377
|
+
document.body.appendChild(selectOvl);
|
|
378
|
+
|
|
379
|
+
// Fullscreen hides all overlays via CSS (preserves state for restore)
|
|
380
|
+
var gzStyle = document.createElement('style');
|
|
381
|
+
gzStyle.textContent = '[data-gz-mode="fullscreen"] #gz-hover, [data-gz-mode="fullscreen"] #gz-select, [data-gz-mode="fullscreen"] #gz-dim { display: none !important }';
|
|
382
|
+
document.head.appendChild(gzStyle);
|
|
383
|
+
|
|
384
|
+
// Dim overlay — fragment scope backdrop
|
|
385
|
+
var dimOverlay = document.createElement('div');
|
|
386
|
+
dimOverlay.id = 'gz-dim';
|
|
387
|
+
dimOverlay.style.cssText = 'position:fixed;inset:0;background:rgba(0,0,0,0.3);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);z-index:99998;pointer-events:none;display:none;transition:opacity 0.2s;opacity:0;';
|
|
388
|
+
document.body.appendChild(dimOverlay);
|
|
389
|
+
|
|
390
|
+
var hoveredEl = null;
|
|
391
|
+
var selectedEl = null;
|
|
392
|
+
var highlightScrollTimer = null;
|
|
393
|
+
var mode = 'browse';
|
|
394
|
+
var highlight = true;
|
|
395
|
+
var scopedEl = null;
|
|
396
|
+
var scopedOrigPos = '';
|
|
397
|
+
|
|
398
|
+
function findGz(el) {
|
|
399
|
+
while (el && el !== document.body) {
|
|
400
|
+
if (el.dataset && el.dataset.gz) return el;
|
|
401
|
+
el = el.parentElement;
|
|
402
|
+
}
|
|
403
|
+
return null;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
function isInteractive(el) {
|
|
407
|
+
var tag = el.tagName;
|
|
408
|
+
if (tag === 'BUTTON' || tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT' || tag === 'LABEL' || tag === 'A' || el.isContentEditable) return true;
|
|
409
|
+
var role = el.getAttribute && el.getAttribute('role');
|
|
410
|
+
return role === 'button' || role === 'link' || role === 'menuitem' || role === 'tab' || role === 'switch' || role === 'checkbox' || role === 'radio' || role === 'textbox' || role === 'combobox';
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
function positionOverlay(ovl, el) {
|
|
414
|
+
var rect = el.getBoundingClientRect();
|
|
415
|
+
ovl.style.display = 'block';
|
|
416
|
+
ovl.style.top = rect.top + 'px';
|
|
417
|
+
ovl.style.left = rect.left + 'px';
|
|
418
|
+
ovl.style.width = rect.width + 'px';
|
|
419
|
+
ovl.style.height = rect.height + 'px';
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
function refreshOverlays() {
|
|
423
|
+
if (hoveredEl && hoveredEl.isConnected) positionOverlay(hoverOvl, hoveredEl);
|
|
424
|
+
else { hoveredEl = null; hoverOvl.style.display = 'none'; }
|
|
425
|
+
if (selectedEl && selectedEl.isConnected) positionOverlay(selectOvl, selectedEl);
|
|
426
|
+
else { selectedEl = null; selectOvl.style.display = 'none'; }
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
function showSelect(el) {
|
|
430
|
+
selectedEl = el;
|
|
431
|
+
positionOverlay(selectOvl, el);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
function clearSelect() {
|
|
435
|
+
selectedEl = null;
|
|
436
|
+
selectOvl.style.display = 'none';
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
function showHover(el) {
|
|
440
|
+
hoveredEl = el;
|
|
441
|
+
positionOverlay(hoverOvl, el);
|
|
442
|
+
hoverOvl.style.opacity = '1';
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
function clearHover() {
|
|
446
|
+
hoverOvl.style.opacity = '0';
|
|
447
|
+
setTimeout(function() { if (!hoveredEl) hoverOvl.style.display = 'none'; }, 200);
|
|
448
|
+
hoveredEl = null;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
function scrollIfOffscreen(el) {
|
|
452
|
+
var rect = el.getBoundingClientRect();
|
|
453
|
+
if (rect.top < 0 || rect.bottom > window.innerHeight) {
|
|
454
|
+
el.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
function applyScope(gzId) {
|
|
459
|
+
if (scopedEl) {
|
|
460
|
+
scopedEl.style.position = scopedOrigPos;
|
|
461
|
+
scopedEl.style.zIndex = '';
|
|
462
|
+
scopedEl.style.cursor = '';
|
|
463
|
+
scopedEl = null;
|
|
464
|
+
}
|
|
465
|
+
dimOverlay.style.opacity = '0';
|
|
466
|
+
setTimeout(function() { if (!scopedEl) dimOverlay.style.display = 'none'; }, 200);
|
|
467
|
+
|
|
468
|
+
if (!gzId) {
|
|
469
|
+
if (mode === 'edit' && highlight) document.body.style.cursor = 'crosshair';
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
var el = document.querySelector('[data-gz="' + gzId + '"]');
|
|
473
|
+
if (!el) return;
|
|
474
|
+
|
|
475
|
+
scopedOrigPos = el.style.position;
|
|
476
|
+
if (getComputedStyle(el).position === 'static') el.style.position = 'relative';
|
|
477
|
+
el.style.zIndex = '99999';
|
|
478
|
+
scopedEl = el;
|
|
479
|
+
if (mode === 'edit' && highlight) {
|
|
480
|
+
document.body.style.cursor = '';
|
|
481
|
+
el.style.cursor = 'crosshair';
|
|
482
|
+
}
|
|
483
|
+
el.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
484
|
+
dimOverlay.style.display = 'block';
|
|
485
|
+
dimOverlay.offsetHeight;
|
|
486
|
+
dimOverlay.style.opacity = '1';
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
window.addEventListener('scroll', refreshOverlays, true);
|
|
490
|
+
window.addEventListener('resize', refreshOverlays);
|
|
491
|
+
|
|
492
|
+
function isInScope(el) {
|
|
493
|
+
return !scopedEl || scopedEl.contains(el);
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
// Clear hover when mouse leaves the iframe
|
|
497
|
+
document.addEventListener('mouseleave', function() {
|
|
498
|
+
if (hoveredEl) { clearHover(); window.parent.postMessage({ type: 'gazetta:hover', gzId: null }, '*'); }
|
|
499
|
+
});
|
|
500
|
+
|
|
501
|
+
// Edit mode: mousemove hover highlight in preview
|
|
502
|
+
document.addEventListener('mousemove', function(e) {
|
|
503
|
+
if (mode !== 'edit' || !highlight) {
|
|
504
|
+
if (hoveredEl) { clearHover(); window.parent.postMessage({ type: 'gazetta:hover', gzId: null }, '*'); }
|
|
505
|
+
return;
|
|
506
|
+
}
|
|
507
|
+
var target = findGz(e.target);
|
|
508
|
+
if (target && target !== hoveredEl && isInScope(target)) {
|
|
509
|
+
showHover(target);
|
|
510
|
+
window.parent.postMessage({ type: 'gazetta:hover', gzId: target.dataset.gz }, '*');
|
|
511
|
+
} else if (!target || !isInScope(target)) {
|
|
512
|
+
if (hoveredEl) { clearHover(); window.parent.postMessage({ type: 'gazetta:hover', gzId: null }, '*'); }
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
|
|
516
|
+
document.addEventListener('click', function(e) {
|
|
517
|
+
var link = e.target.closest ? e.target.closest('a[href]') : null;
|
|
518
|
+
if (link) {
|
|
519
|
+
var href = link.getAttribute('href');
|
|
520
|
+
if (href) {
|
|
521
|
+
e.preventDefault();
|
|
522
|
+
e.stopPropagation();
|
|
523
|
+
if (href.startsWith('/') || href.startsWith(location.origin)) {
|
|
524
|
+
var path = href.startsWith('/') ? href : new URL(href).pathname;
|
|
525
|
+
window.parent.postMessage({ type: 'gazetta:navigate', route: path }, '*');
|
|
526
|
+
} else {
|
|
527
|
+
window.parent.postMessage({ type: 'gazetta:external', url: href }, '*');
|
|
528
|
+
}
|
|
529
|
+
return;
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
if (mode === 'fullscreen') return;
|
|
534
|
+
if (isInteractive(e.target)) return;
|
|
535
|
+
|
|
536
|
+
var target = findGz(e.target);
|
|
537
|
+
if (!target || !isInScope(target)) return;
|
|
538
|
+
|
|
539
|
+
e.preventDefault();
|
|
540
|
+
e.stopPropagation();
|
|
541
|
+
|
|
542
|
+
window.parent.postMessage({ type: 'gazetta:select', gzId: target.dataset.gz }, '*');
|
|
543
|
+
}, true);
|
|
544
|
+
|
|
545
|
+
document.addEventListener('keydown', function(e) {
|
|
546
|
+
if (e.key === 'Escape') window.parent.postMessage({ type: 'gazetta:escape' }, '*');
|
|
547
|
+
});
|
|
548
|
+
|
|
549
|
+
window.addEventListener('message', function(e) {
|
|
550
|
+
if (e.data && e.data.type === 'gazetta:mode') {
|
|
551
|
+
mode = e.data.mode || 'browse';
|
|
552
|
+
highlight = e.data.highlight !== false;
|
|
553
|
+
document.body.setAttribute('data-gz-mode', mode);
|
|
554
|
+
if (hoveredEl) clearHover();
|
|
555
|
+
refreshOverlays();
|
|
556
|
+
var cursorTarget = scopedEl || document.body;
|
|
557
|
+
document.body.style.cursor = '';
|
|
558
|
+
if (scopedEl) scopedEl.style.cursor = '';
|
|
559
|
+
cursorTarget.style.cursor = (mode === 'edit' && highlight) ? 'crosshair' : '';
|
|
560
|
+
}
|
|
561
|
+
if (e.data && e.data.type === 'gazetta:highlight') {
|
|
562
|
+
if (highlightScrollTimer) { clearTimeout(highlightScrollTimer); highlightScrollTimer = null; }
|
|
563
|
+
if (e.data.gzId) {
|
|
564
|
+
var el = document.querySelector('[data-gz="' + e.data.gzId + '"]');
|
|
565
|
+
if (el) {
|
|
566
|
+
showHover(el);
|
|
567
|
+
highlightScrollTimer = setTimeout(function() { scrollIfOffscreen(el); }, 150);
|
|
568
|
+
}
|
|
569
|
+
} else {
|
|
570
|
+
clearHover();
|
|
571
|
+
highlightScrollTimer = setTimeout(function() {
|
|
572
|
+
if (selectedEl) scrollIfOffscreen(selectedEl);
|
|
573
|
+
else window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
574
|
+
}, 150);
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
if (e.data && e.data.type === 'gazetta:showSelect') {
|
|
578
|
+
if (e.data.gzId) {
|
|
579
|
+
var sel = document.querySelector('[data-gz="' + e.data.gzId + '"]');
|
|
580
|
+
if (sel) showSelect(sel);
|
|
581
|
+
else clearSelect();
|
|
582
|
+
} else {
|
|
583
|
+
clearSelect();
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
if (e.data && e.data.type === 'gazetta:scrollTo') {
|
|
587
|
+
if (e.data.gzId) {
|
|
588
|
+
var scrollEl = document.querySelector('[data-gz="' + e.data.gzId + '"]');
|
|
589
|
+
if (scrollEl) scrollIfOffscreen(scrollEl);
|
|
590
|
+
} else {
|
|
591
|
+
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
if (e.data && e.data.type === 'gazetta:scope') {
|
|
595
|
+
applyScope(e.data.gzId);
|
|
596
|
+
}
|
|
597
|
+
});
|
|
598
|
+
})();
|
|
599
|
+
<\/script>
|
|
600
|
+
`,lm=B(f({__name:`PreviewPanel`,setup(e){function t(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=t*16777619>>>0;return t.toString(16).padStart(8,`0`)}let r=gn(),i=Sn(),a=hn(),o=mn(),c=fn(),f=wn(),_=re(),v=p(null),b=p(!1),x=``,S=null,T=Cn();function D(){f.mode!==`fullscreen`&&v.value?.contentWindow?.postMessage({type:`gazetta:highlight`,gzId:T.highlightGzId??null},`*`)}u(()=>T.highlightGzId,D);function k(){f.mode!==`fullscreen`&&v.value?.contentWindow?.postMessage({type:`gazetta:showSelect`,gzId:T.selectedGzId??null},`*`)}u(()=>T.selectedGzId,k);let ee=`/admin/`.replace(/\/$/,``),A=w(()=>r.previewRoute?`${ee}/preview${r.previewRoute}`:null),j=w(()=>r.type!==`fragment`||!r.name||!r.fragmentHostPage?null:t(`@${r.name}`)),M=[{label:`Desktop`,width:`100%`,icon:`pi pi-desktop`},{label:`Tablet`,width:`768px`,icon:`pi pi-tablet`},{label:`Mobile`,width:`375px`,icon:`pi pi-mobile`}],N=p(0),te=w(()=>M[N.value].width),F=p(!0);function ne(){v.value?.contentWindow?.postMessage({type:`gazetta:mode`,mode:f.mode,highlight:F.value},`*`)}u(()=>f.mode,ne),u(F,ne);function ie(){v.value?.contentWindow?.postMessage({type:`gazetta:scope`,gzId:j.value},`*`)}u(j,ie);function L(e){return e.replace(/<script>new EventSource\([^)]+\)[^<]*<\/script>/g,``).replace(`</body>`,`${cm}\n</body>`)}async function ae(e){if(e.data?.type===`gazetta:escape`&&f.mode===`fullscreen`&&f.toggleFullscreen(),e.data?.type===`gazetta:select`&&e.data.gzId){if(v.value?.contentWindow?.postMessage({type:`gazetta:showSelect`,gzId:e.data.gzId},`*`),T.setPending(e.data.gzId),r.name){let e=r.type===`page`?`/pages`:`/fragments`;_.push(`${e}/${r.name}/edit`)}v.value?.blur()}if(e.data?.type===`gazetta:navigate`&&e.data.route){let t=c.pages.find(t=>t.route===e.data.route);t?_.push(`/pages/${t.name}`):o.show(`No page found for route ${e.data.route}`,{type:`error`})}e.data?.type===`gazetta:hover`&&(T.previewHover(e.data.gzId??null),S&&=(clearTimeout(S),null),e.data.gzId||(S=setTimeout(()=>{v.value?.contentWindow?.postMessage({type:`gazetta:scrollTo`,gzId:T.selectedGzId??null},`*`),S=null},300))),e.data?.type===`gazetta:external`&&e.data.url&&o.show(e.data.url,{link:e.data.url,duration:5e3})}wr(window,`message`,ae);let oe=null;l(()=>{try{oe=new EventSource(`/__reload`),oe.onmessage=()=>se(!0),oe.onerror=()=>{oe?.close(),oe=null}}catch{}}),E(()=>{oe?.close()});async function se(e=!0){if(!A.value){x=``;return}b.value=!0;try{let t=i.allOverrides,n=Object.keys(t).length>0,r;r=n?await fetch(A.value,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({overrides:t})}):await fetch(A.value),ce(L(await r.text()),e),setTimeout(()=>{ne(),ie()},100)}catch{ce(`<pre style="color:red;padding:2rem">Failed to load preview</pre>`,!1)}finally{b.value=!1}}function ce(e,t){let n=v.value;if(n){if(!t||!x||!n.contentDocument?.body?.innerHTML){n.srcdoc=e,x=e;return}try{let t=n.contentDocument;if(!t){n.srcdoc=e,x=e;return}let r=new DOMParser().parseFromString(e,`text/html`);Xp(t.body,r.body,{onBeforeNodeDiscarded(e){let t=e.id;return!(t===`gz-hover`||t===`gz-select`||t===`gz-dim`)},onBeforeElUpdated(e,t){return!(e.id===`gz-hover`||e.id===`gz-select`||e.id===`gz-dim`||e.isEqualNode(t))}});let i=t.head.querySelectorAll(`style`),a=r.head.querySelectorAll(`style`);i.forEach((e,t)=>{a[t]&&e.textContent!==a[t].textContent&&(e.textContent=a[t].textContent)}),x=e}catch{n.srcdoc=e,x=e}}}return u(()=>a.version,()=>se(!0)),u(A,()=>se(!1),{immediate:!0}),br(()=>a.draftVersion,()=>se(!0),{debounce:300}),(e,t)=>(n(),I(`div`,{class:m([`preview-panel`,{fullscreen:h(f).mode===`fullscreen`}]),"data-testid":`preview-panel`},[A.value?(n(),I(O,{key:1},[C(`div`,Qp,[C(`div`,$p,[(n(),I(O,null,s(M,(e,t)=>C(`button`,{key:e.label,class:m([`device-btn`,{active:N.value===t}]),title:e.label,onClick:e=>N.value=t},[C(`i`,{class:m(e.icon)},null,2)],10,em)),64)),h(f).mode===`fullscreen`&&h(r).previewRoute?(n(),I(O,{key:0},[t[5]||=C(`span`,{class:`preview-separator`},null,-1),C(`span`,tm,[t[4]||=C(`i`,{class:`pi pi-globe`},null,-1),y(d(h(r).previewRoute),1)])],64)):P(``,!0)]),C(`div`,nm,[h(r).type===`fragment`&&h(r).staticPages.length>1&&h(f).mode!==`fullscreen`?(n(),I(`select`,{key:0,class:`host-page-select`,"data-testid":`host-page-select`,value:h(r).fragmentHostPage?.name??``,onChange:t[0]||=e=>h(r).setFragmentHostPage(e.target.value)},[(n(!0),I(O,null,s(h(r).staticPages,e=>(n(),I(`option`,{key:e.name,value:e.name},d(e.name),9,im))),128))],40,rm)):P(``,!0),h(f).mode===`edit`?(n(),I(`button`,{key:1,class:m([`device-btn`,{active:F.value}]),title:F.value?`Hide highlights`:`Show highlights`,"data-testid":`highlight-toggle`,onClick:t[1]||=e=>F.value=!F.value},[...t[6]||=[C(`i`,{class:`pi pi-eye`},null,-1)]],10,am)):P(``,!0),C(`button`,{class:`device-btn`,title:h(f).mode===`fullscreen`?`Exit fullscreen`:`Fullscreen`,"data-testid":`fullscreen-toggle`,onClick:t[2]||=e=>h(f).toggleFullscreen()},[C(`i`,{class:m(h(f).mode===`fullscreen`?`pi pi-window-minimize`:`pi pi-window-maximize`)},null,2)],8,om)])]),C(`div`,sm,[C(`iframe`,{ref_key:`iframeRef`,ref:v,class:`preview-iframe`,"data-testid":`preview-iframe`,style:g({width:te.value,maxWidth:`100%`})},null,4)])],64)):(n(),I(`div`,Zp,[...t[3]||=[C(`i`,{class:`pi pi-eye`,style:{"font-size":`2rem`,color:`#ddd`,"margin-bottom":`0.5rem`}},null,-1),C(`p`,null,`Select a page or fragment to preview`,-1)]]))],2))}}),[[`__scopeId`,`data-v-4aacb015`]]),um={class:`cms-editor`},dm={key:0,class:`cms-panel-content`},fm={class:`cms-panel-content`},pm={class:`cms-panel-content`},mm={class:`cms-preview`},hm=B(f({__name:`EditorView`,setup(e){let t=re(),r=wn(),a=gn(),o=nr();return Er(`Escape`,()=>{if(o.visible)return;if(r.mode===`fullscreen`){r.toggleFullscreen();return}if(r.mode!==`edit`)return;let e=document.activeElement;if(e&&(e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.tagName===`SELECT`||e.isContentEditable)){e.blur();return}if(!a.name)return;let n=a.type===`page`?`/pages`:`/fragments`;t.push(`${n}/${a.name}`)}),(e,t)=>(n(),I(`div`,um,[C(`div`,{class:m([`cms-left`,{"cms-left-wide":h(r).mode===`edit`}])},[h(r).mode===`browse`?(n(),I(`div`,dm,[F(Kr)])):(n(),_(h(k),{key:1,class:`cms-splitter`},{default:i(()=>[F(h(N),{size:35,minSize:25,class:`cms-panel`},{default:i(()=>[C(`div`,fm,[F(ai)])]),_:1}),F(h(N),{size:65,minSize:35,class:`cms-panel`},{default:i(()=>[C(`div`,pm,[F(Dp)])]),_:1})]),_:1}))],2),C(`div`,mm,[F(lm)])]))}}),[[`__scopeId`,`data-v-f9c0172b`]]),gm={class:`playground`,"data-testid":`dev-playground`},_m={class:`playground-sidebar`},vm={key:0,class:`sidebar-loading`},ym={key:0,class:`sidebar-section`},bm=[`data-testid`,`onClick`],xm={class:`item-name`},Sm={key:1,class:`sidebar-section`},Cm=[`data-testid`,`onClick`],wm={class:`item-name`},Tm={class:`sidebar-section`},Em=[`data-testid`,`onClick`],Dm={class:`item-name`},Om={key:2,class:`sidebar-empty`},km={class:`playground-main`},Am={key:0,class:`main-empty`},jm={key:1,class:`main-empty`},Mm={class:`main-toolbar`},Nm={class:`toolbar-label`},Pm={class:`toolbar-type`},Fm={key:0,class:`toolbar-hint`},Im={class:`main-body`},Lm={key:0,class:`mount-error`},Rm={key:0,class:`value-inspector`,"data-testid":`playground-inspector`},zm=[`innerHTML`],Bm=B(f({__name:`DevPlayground`,setup(e){let t=pn(),i=re(),a=ae();Er(`Escape`,()=>{let e=document.activeElement;if(e&&(e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.tagName===`SELECT`||e.isContentEditable)){e.blur();return}i.back()});let o=p([]),c=p([]),l=p(!0),f=p(null),h=p(!1),_=p(null),v=p(!1),b=p(null),x=p(!0),S=p(null),T=null;async function E(){l.value=!0;try{let[e,t]=await Promise.all([z.getTemplates(),z.getFields()]),n=[];for(let t of e)try{let e=await z.getTemplateSchema(t.name);n.push({name:t.name,hasEditor:!!e.hasEditor})}catch{n.push({name:t.name,hasEditor:!1})}o.value=n,c.value=t}catch(e){console.error(`Failed to load playground items:`,e)}finally{l.value=!1}}E().then(()=>{let e=a.params.editor,t=a.params.field;e&&o.value.some(t=>t.name===e)?N(e):t&&c.value.some(e=>e.name===t)&&te(t)});let D=w(()=>o.value.filter(e=>e.hasEditor)),k=w(()=>o.value.filter(e=>!e.hasEditor)),ee=w(()=>t.dark?`dark`:`light`),A=w(()=>{try{return M(b.value)}catch{return j(String(b.value))}});function j(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function M(e,t=0){let n=` `.repeat(t);if(e===null)return`<span class="jv-null">null</span>`;if(typeof e==`boolean`)return`<span class="jv-bool">${e}</span>`;if(typeof e==`number`)return`<span class="jv-num">${e}</span>`;if(typeof e==`string`)return e.includes(`
|
|
601
|
+
`)?`<span class="jv-str">"${e.split(`
|
|
602
|
+
`).map(e=>j(e)).join(`<br>${n} `)}"</span>`:`<span class="jv-str">"${j(e)}"</span>`;if(Array.isArray(e))return e.length===0?`[]`:`[\n${e.map(e=>`${n} ${M(e,t+1)}`).join(`,
|
|
603
|
+
`)}\n${n}]`;if(typeof e==`object`){let r=Object.entries(e);return r.length===0?`{}`:`{\n${r.map(([e,r])=>`${n} <span class="jv-key">"${j(e)}"</span>: ${M(r,t+1)}`).join(`,
|
|
604
|
+
`)}\n${n}}`}return j(String(e))}async function N(e){h.value=!0,_.value=null;try{let{hasEditor:t,editorUrl:n,fieldsBaseUrl:r,...a}=await z.getTemplateSchema(e),o=await F(e);f.value={type:`editor`,name:e,hasEditor:!!t,editorUrl:n,fieldsBaseUrl:r,schema:a,realContent:o},i.replace(`/dev/editor/${e}`)}catch(t){_.value=`Failed to load schema for "${e}": ${t.message}`,f.value=null}finally{h.value=!1}}async function te(e){let t=``;if(o.value.length)try{t=(await z.getTemplateSchema(o.value[0].name)).fieldsBaseUrl??``}catch{}if(!t){_.value=`No fieldsBaseUrl available`;return}f.value={type:`field`,name:e,fieldsBaseUrl:t},i.replace(`/dev/field/${e}`)}async function F(e){try{let[t,n]=await Promise.all([z.getPages(),z.getFragments()]);for(let n of t)if(n.template===e){let e=await z.getPage(n.name);if(e.content&&Object.keys(e.content).length>0)return e.content}for(let t of n)if(t.template===e){let e=await z.getFragment(t.name);if(e.content&&Object.keys(e.content).length>0)return e.content}function r(e,t){for(let n of e)if(typeof n!=`string`){if(n.template===t&&n.content)return n.content;if(n.components){let e=r(n.components,t);if(e)return e}}}for(let n of t){let t=await z.getPage(n.name);if(!t.components)continue;let i=r(t.components,e);if(i)return i}for(let t of n){let n=await z.getFragment(t.name);if(!n.components)continue;let i=r(n.components,e);if(i)return i}}catch{}}function ne(){if(T&&S.value){try{T.unmount(S.value)}catch{}T=null}_.value=null}async function ie(){if(ne(),!f.value||!S.value)return;let e=S.value;try{if(f.value.type===`editor`){let t=f.value,n=t.realContent??oe(t.schema);if(b.value=n,t.hasEditor&&t.editorUrl){let r=await bn(()=>import(t.editorUrl),[]),i=r.default??r;i.mount(e,{content:n,schema:t.schema,theme:ee.value,onChange:e=>{b.value=e},fieldsBaseUrl:t.fieldsBaseUrl}),T=i}else{let r=Sp(t.schema);r.mount(e,{content:n,schema:t.schema,theme:ee.value,onChange:e=>{b.value=e},fieldsBaseUrl:t.fieldsBaseUrl}),T=r}}else{let t=f.value;b.value=``;let n=`${t.fieldsBaseUrl}/${t.name}.tsx`,r;try{r=await bn(()=>import(n),[])}catch{r=await bn(()=>import(`${t.fieldsBaseUrl}/${t.name}.ts`),[])}let i=r.default??r;i.mount(e,{value:``,schema:{},theme:ee.value,onChange:e=>{b.value=e}}),T=i}}catch(e){_.value=e.message}}function L(){f.value&&ie()}u(f,()=>ie(),{flush:`post`}),r(()=>ne());function oe(e){let t=e.properties;if(!t)return{};let n={};for(let[e,r]of Object.entries(t)){let t=r.type;t===`string`?n[e]=r.default??`Sample ${e}`:t===`number`||t===`integer`?n[e]=42:t===`boolean`?n[e]=!1:t===`array`?n[e]=[]:t===`object`&&(n[e]={})}return n}let se=w(()=>t.dark?{"--gz-bg-input":`#161622`,"--gz-bg-card":`#1a1a28`,"--gz-bg-toolbar":`#1a1a2a`,"--gz-bg-chip":`#252538`,"--gz-bg-code":`#12121e`,"--gz-text":`#e0e0e0`,"--gz-text-secondary":`#ccc`,"--gz-text-label":`#8888a0`,"--gz-text-hint":`#444`,"--gz-border":`#2a2a3a`,"--gz-border-subtle":`#1e1e2e`,"--gz-accent":`#667eea`,"--gz-error":`#f87171`,"--gz-success":`#4ade80`}:{"--gz-bg-input":`#ffffff`,"--gz-bg-card":`#f9fafb`,"--gz-bg-toolbar":`#f3f4f6`,"--gz-bg-chip":`#e5e7eb`,"--gz-bg-code":`#f1f5f9`,"--gz-text":`#1a1a1a`,"--gz-text-secondary":`#4b5563`,"--gz-text-label":`#6b7280`,"--gz-text-hint":`#9ca3af`,"--gz-border":`#e5e7eb`,"--gz-border-subtle":`#f3f4f6`,"--gz-accent":`#667eea`,"--gz-error":`#dc2626`,"--gz-success":`#16a34a`});return(e,t)=>(n(),I(`div`,gm,[C(`div`,_m,[t[8]||=C(`div`,{class:`sidebar-header`},`Dev Playground`,-1),l.value?(n(),I(`div`,vm,`Loading...`)):o.value.length||c.value.length?(n(),I(O,{key:1},[D.value.length?(n(),I(`div`,ym,[t[3]||=C(`div`,{class:`section-label`},`Custom Editors`,-1),(n(!0),I(O,null,s(D.value,e=>(n(),I(`div`,{key:`ce:`+e.name,class:m([`sidebar-item`,{active:f.value?.type===`editor`&&f.value.name===e.name}]),"data-testid":`playground-editor-${e.name}`,onClick:t=>N(e.name)},[t[2]||=C(`i`,{class:`pi pi-pencil item-icon`},null,-1),C(`span`,xm,d(e.name),1)],10,bm))),128))])):P(``,!0),c.value.length?(n(),I(`div`,Sm,[t[5]||=C(`div`,{class:`section-label`},`Custom Fields`,-1),(n(!0),I(O,null,s(c.value,e=>(n(),I(`div`,{key:`f:`+e.name,class:m([`sidebar-item`,{active:f.value?.type===`field`&&f.value.name===e.name}]),"data-testid":`playground-field-${e.name}`,onClick:t=>te(e.name)},[t[4]||=C(`i`,{class:`pi pi-sliders-h item-icon`},null,-1),C(`span`,wm,d(e.name),1)],10,Cm))),128))])):P(``,!0),C(`div`,Tm,[C(`div`,{class:`section-label section-label-toggle`,onClick:t[0]||=e=>v.value=!v.value},[C(`i`,{class:m([v.value?`pi pi-chevron-down`:`pi pi-chevron-right`,`toggle-icon`])},null,2),y(` All Templates (`+d(o.value.length)+`) `,1)]),v.value?(n(!0),I(O,{key:0},s(k.value,e=>(n(),I(`div`,{key:`te:`+e.name,class:m([`sidebar-item`,{active:f.value?.type===`editor`&&f.value.name===e.name}]),"data-testid":`playground-editor-${e.name}`,onClick:t=>N(e.name)},[t[6]||=C(`i`,{class:`pi pi-file item-icon`},null,-1),C(`span`,Dm,d(e.name),1)],10,Em))),128)):P(``,!0)])],64)):(n(),I(`div`,Om,[...t[7]||=[C(`p`,null,`No custom editors or fields yet.`,-1),C(`p`,{class:`hint`},[y(`Create an editor:`),C(`br`),C(`code`,null,`admin/editors/{name}.tsx`)],-1),C(`p`,{class:`hint`},[y(`Create a field:`),C(`br`),C(`code`,null,`admin/fields/{name}.tsx`)],-1)]]))]),C(`div`,km,[!f.value&&!h.value?(n(),I(`div`,Am,[...t[9]||=[C(`i`,{class:`pi pi-code`,style:{"font-size":`2rem`,opacity:`0.3`,"margin-bottom":`0.5rem`}},null,-1),C(`p`,null,`Select an editor or field to preview`,-1)]])):h.value?(n(),I(`div`,jm,[...t[10]||=[C(`p`,null,`Loading schema...`,-1)]])):f.value?(n(),I(O,{key:2},[C(`div`,Mm,[C(`span`,Nm,[C(`span`,Pm,d(f.value.type===`editor`?`Editor`:`Field`),1),C(`strong`,null,d(f.value.name),1),f.value.type===`editor`&&f.value.realContent?(n(),I(`span`,Fm,`using real content`)):P(``,!0)]),C(`button`,{class:`toolbar-btn`,"data-testid":`playground-reset`,onClick:L,title:`Reset to initial state`},[...t[11]||=[C(`i`,{class:`pi pi-refresh`},null,-1),y(` Reset `,-1)]]),C(`button`,{class:`toolbar-btn`,"data-testid":`playground-toggle-inspector`,onClick:t[1]||=e=>x.value=!x.value},[t[12]||=C(`i`,{class:`pi pi-code`},null,-1),y(` `+d(x.value?`Hide`:`Show`)+` Value `,1)])]),C(`div`,Im,[C(`div`,{class:`main-content`,style:g(se.value)},[_.value?(n(),I(`div`,Lm,d(_.value),1)):P(``,!0),C(`div`,{ref_key:`mountRef`,ref:S,class:`mount-container`,"data-testid":`playground-mount`},null,512)],4),x.value?(n(),I(`div`,Rm,[t[13]||=C(`div`,{class:`inspector-header`},`Value`,-1),C(`pre`,{class:`inspector-value`,innerHTML:A.value},null,8,zm)])):P(``,!0)])],64)):P(``,!0)])]))}}),[[`__scopeId`,`data-v-7ebe49af`]]);function Vm(){let e=oe({history:ie(`/admin/`),routes:[{path:`/`,component:hm,name:`home`},{path:`/pages/:name`,component:hm,name:`page-browse`},{path:`/pages/:name/edit`,component:hm,name:`page-edit`},{path:`/fragments/:name`,component:hm,name:`fragment-browse`},{path:`/fragments/:name/edit`,component:hm,name:`fragment-edit`},{path:`/dev`,component:Bm,name:`dev`},{path:`/dev/editor/:editor`,component:Bm,name:`dev-editor`},{path:`/dev/field/:field`,component:Bm,name:`dev-field`},{path:`/:pathMatch(.*)*`,redirect:`/`}]});return e.beforeEach(async(e,t)=>{await fn().ensureLoaded();let n=e=>e?.toString().startsWith(`dev`),r=!n(e.name?.toString())&&e.name!==`home`;if(t.name&&!n(t.name.toString())&&t.name!==`home`){let n=Sn(),i=t.params.name,a=e.params.name,o=t.name?.toString().startsWith(`page`)?`page`:`fragment`,s=e.name?.toString().startsWith(`page`)?`page`:`fragment`,c=t.name?.toString().endsWith(`-edit`),l=e.name?.toString().endsWith(`-edit`);if((!r||i!==a||o!==s||c&&!l)&&n.hasPendingEdits){let e=await nr().guard();if(e===`cancel`)return!1;e===`save`&&await n.save(),n.clear()}}if(r){let t=gn(),n=wn(),r=e.params.name,i=e.name?.toString().startsWith(`page`)?`page`:`fragment`,a=e.name?.toString().endsWith(`-edit`);(t.type!==i||t.name!==r)&&(i===`page`?await t.selectPage(r):await t.selectFragment(r)),a&&n.mode!==`edit`?n.enterEdit():!a&&n.mode===`edit`&&n.enterBrowse()}else if(e.name===`home`){let e=wn();e.mode===`edit`&&e.enterBrowse()}}),e}var Hm=S(ur);Hm.use(ne()),Hm.use(te,{theme:{preset:un,options:{darkModeSelector:`.dark`}}}),Hm.use(Vm()),Hm.mount(`#app`);
|