grab 0.1.47-dev.b6ea6cc → 0.1.47-dev.c098270
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/dist/copy-content-C4LKBdXd.cjs +10 -0
- package/dist/copy-content-C6qARBKL.js +10 -0
- package/dist/{copy-content-D8CqvhtV.d.ts → copy-content-DXzvuc3V.d.cts} +22 -6
- package/dist/{copy-content-pjGQdIH0.d.cts → copy-content-DivSW5d4.d.ts} +22 -6
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/core-CPzy6jsJ.js +14 -0
- package/dist/core-CQRcBX2J.cjs +14 -0
- package/dist/create-pointer-move-prompt-handoff-DmeObFbc.js +9 -0
- package/dist/create-pointer-move-prompt-handoff-o-V3L-1m.cjs +9 -0
- package/dist/freeze-updates-BcyakRmS.js +51 -0
- package/dist/freeze-updates-CS_40G4X.cjs +51 -0
- package/dist/{index-olf-8IUn.d.cts → index-BE4DABkc.d.cts} +1 -1
- package/dist/{index-CxCZZDDI.d.ts → index-C8LFk5Ka.d.ts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.global.js +18 -19
- package/dist/index.js +1 -1
- package/dist/primitives.cjs +2 -2
- package/dist/primitives.d.cts +1 -1
- package/dist/primitives.d.ts +1 -1
- package/dist/primitives.js +2 -2
- package/dist/renderer-BjIDhGbM.js +9 -0
- package/dist/renderer-CrnYlO_u.cjs +9 -0
- package/dist/styles.css +1 -1
- package/package.json +2 -2
- package/dist/action-shortcuts-BqmHTJsE.js +0 -9
- package/dist/action-shortcuts-D_6zs8Id.cjs +0 -9
- package/dist/copy-content--Yz8PL-c.cjs +0 -10
- package/dist/copy-content-B05mupeS.js +0 -10
- package/dist/core-DRAwS5Dm.cjs +0 -15
- package/dist/core-jtLmGAEq.js +0 -15
- package/dist/freeze-updates-B-1eLMby.js +0 -51
- package/dist/freeze-updates-Cpkuwjzh.cjs +0 -51
- package/dist/renderer-BpjTGy0G.js +0 -9
- package/dist/renderer-CpKmihUN.cjs +0 -9
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 Aiden Bai
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
const e=require(`./create-pointer-move-prompt-handoff-o-V3L-1m.cjs`),t=require(`./freeze-updates-CS_40G4X.cjs`),n=require(`./copy-content-C4LKBdXd.cjs`);var r=`/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
10
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial}}}@layer theme{:root,:host{--font-sans:"Geist", ui-sans-serif, system-ui, sans-serif;--font-serif:ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-500:oklch(63.7% .237 25.331);--spacing:4px;--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--radius-sm:4px;--ease-out:cubic-bezier(0, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--ease-drawer:cubic-bezier(.32, .72, 0, 1);--ease-spring:cubic-bezier(.34, 1.56, .64, 1)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.a11y-hitbox{position:relative}.a11y-hitbox:before{content:"";pointer-events:auto;width:100%;min-width:24px;height:100%;min-height:24px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.top-0{top:calc(var(--spacing) * 0)}.top-1\\/2{top:50%}.top-\\[2px\\]{top:2px}.top-full{top:100%}.right-0{right:calc(var(--spacing) * 0)}.right-full{right:100%}.bottom-\\[2px\\]{bottom:2px}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing) * 0)}.left-full{left:100%}.z-1{z-index:1}.z-10{z-index:10}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.-m-0\\.5{margin:calc(var(--spacing) * -.5)}.-m-4{margin:calc(var(--spacing) * -4)}.m-0{margin:calc(var(--spacing) * 0)}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.-my-1\\.5{margin-block:calc(var(--spacing) * -1.5)}.-mt-\\[8px\\]{margin-top:-8px}.mt-2\\.5{margin-top:calc(var(--spacing) * 2.5)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-1\\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2\\.5{margin-right:calc(var(--spacing) * 2.5)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2\\.5{margin-bottom:calc(var(--spacing) * 2.5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2\\.5{margin-left:calc(var(--spacing) * 2.5)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-auto{margin-left:auto}.ml-px{margin-left:1px}.no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.no-scrollbar::-webkit-scrollbar{width:0;height:0;display:none}.line-clamp-5{-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.list-item{display:list-item}.size-0{width:calc(var(--spacing) * 0);height:calc(var(--spacing) * 0)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-\\[12px\\]{width:12px;height:12px}.size-\\[16px\\]{width:16px;height:16px}.h-\\[8px\\]{height:8px}.h-\\[17px\\]{height:17px}.h-\\[20px\\]{height:20px}.h-\\[24px\\]{height:24px}.h-fit{height:fit-content}.max-h-\\[var\\(--rg-edit-list-max-h\\)\\]{max-height:var(--rg-edit-list-max-h)}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-\\[28px\\]{min-height:28px}.w-\\[2px\\]{width:2px}.w-\\[calc\\(100\\%\\+16px\\)\\]{width:calc(100% + 16px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-px{width:1px}.max-w-\\[280px\\]{max-width:280px}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\\[36px\\]{min-width:36px}.min-w-\\[100px\\]{min-width:100px}.min-w-\\[150px\\]{min-width:150px}.flex-1{flex:1}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.-rotate-90{rotate:-90deg}.rotate-0{rotate:0deg}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.interactive-scale{transition:transform .4s cubic-bezier(.34,1.56,.64,1)}@media (hover:hover) and (pointer:fine){.interactive-scale:hover{transform:scale(1.05)}}.interactive-scale:active{transition:transform 60ms cubic-bezier(0,0,.2,1);transform:scale(.96)}.press-scale{transition:transform .4s cubic-bezier(.34,1.56,.64,1)}.press-scale:active{transition:transform 60ms cubic-bezier(0,0,.2,1);transform:scale(.97)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.resize{resize:both}.resize-none{resize:none}.grid-cols-\\[0fr\\]{grid-template-columns:0fr}.grid-cols-\\[1fr\\]{grid-template-columns:1fr}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0{gap:calc(var(--spacing) * 0)}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-\\[5px\\]{gap:5px}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:4px}.rounded-\\[1px\\]{border-radius:1px}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[6px\\]{border-radius:6px}.rounded-\\[13px\\]{border-radius:13px}.rounded-\\[14px\\]{border-radius:14px}.rounded-full{border-radius:3.40282e38px}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t{border-top-left-radius:4px;border-top-right-radius:4px}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.rounded-l{border-top-left-radius:4px;border-bottom-left-radius:4px}.rounded-l-\\[10px\\]{border-top-left-radius:10px;border-bottom-left-radius:10px}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-tl{border-top-left-radius:4px}.rounded-r{border-top-right-radius:4px;border-bottom-right-radius:4px}.rounded-r-\\[10px\\]{border-top-right-radius:10px;border-bottom-right-radius:10px}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-tr{border-top-right-radius:4px}.rounded-b{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.rounded-b-\\[6px\\]{border-bottom-right-radius:6px;border-bottom-left-radius:6px}.rounded-b-\\[10px\\]{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.rounded-br{border-bottom-right-radius:4px}.rounded-bl{border-bottom-left-radius:4px}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.\\[border-width\\:0\\.5px\\]{border-width:.5px}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-4{border-top-style:var(--tw-border-style);border-top-width:4px}.\\[border-top-width\\:0\\.5px\\]{border-top-width:.5px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-dotted{--tw-border-style:dotted;border-style:dotted}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-\\[var\\(--rg-border-button\\)\\]{border-color:var(--rg-border-button)}.border-t-\\[var\\(--rg-border-subtle\\)\\]{border-top-color:var(--rg-border-subtle)}.bg-\\[\\#f00\\]{background-color:red}.bg-\\[var\\(--rg-error-bg\\)\\]{background-color:var(--rg-error-bg)}.bg-\\[var\\(--rg-panel-bg\\)\\]{background-color:var(--rg-panel-bg)}.bg-\\[var\\(--rg-submit-bg\\)\\]{background-color:var(--rg-submit-bg)}.bg-\\[var\\(--rg-surface-active\\)\\]{background-color:var(--rg-surface-active)}.bg-\\[var\\(--rg-surface-hover\\)\\]{background-color:var(--rg-surface-hover)}.bg-\\[var\\(--rg-text-primary\\)\\]{background-color:var(--rg-text-primary)}.bg-\\[var\\(--rg-text-secondary\\)\\]{background-color:var(--rg-text-secondary)}.bg-red-500{background-color:var(--color-red-500)}.bg-transparent{background-color:#0000}.p-0{padding:calc(var(--spacing) * 0)}.p-1{padding:calc(var(--spacing) * 1)}.p-6{padding:calc(var(--spacing) * 6)}.px-0{padding-inline:calc(var(--spacing) * 0)}.px-0\\.25{padding-inline:calc(var(--spacing) * .25)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-\\[3px\\]{padding-inline:3px}.py-0{padding-block:calc(var(--spacing) * 0)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-0\\.25{padding-block:calc(var(--spacing) * .25)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-px{padding-block:1px}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.text-center{text-align:center}.text-justify{text-align:justify}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.font-serif{font-family:var(--font-serif)}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.leading-3\\.5{--tw-leading:calc(var(--spacing) * 3.5);line-height:calc(var(--spacing) * 3.5)}.leading-4{--tw-leading:calc(var(--spacing) * 4);line-height:calc(var(--spacing) * 4)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-extralight{--tw-font-weight:var(--font-weight-extralight);font-weight:var(--font-weight-extralight)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.font-thin{--tw-font-weight:var(--font-weight-thin);font-weight:var(--font-weight-thin)}.break-normal{overflow-wrap:normal;word-break:normal}.break-words,.wrap-break-word{overflow-wrap:break-word}.break-all{word-break:break-all}.break-keep{word-break:keep-all}.text-ellipsis{text-overflow:ellipsis}.whitespace-break-spaces{white-space:break-spaces}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-\\[var\\(--rg-error-text\\)\\]{color:var(--rg-error-text)}.text-\\[var\\(--rg-submit-fg\\)\\]{color:var(--rg-submit-fg)}.text-\\[var\\(--rg-text-primary\\)\\]{color:var(--rg-text-primary)}.text-\\[var\\(--rg-text-primary-85\\)\\]{color:var(--rg-text-primary-85)}.text-\\[var\\(--rg-text-secondary\\)\\]{color:var(--rg-text-secondary)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.not-italic{font-style:normal}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.\\[box-shadow\\:var\\(--rg-shadow\\)\\]{box-shadow:var(--rg-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.\\[filter\\:var\\(--rg-drop-shadow\\)\\]{filter:var(--rg-drop-shadow)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-columns\\]{transition-property:grid-template-columns;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\]{transition-property:grid-template-rows;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[padding\\,border-radius\\,transform\\]{transition-property:padding,border-radius,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[top\\,left\\,width\\,height\\,opacity\\,border-radius\\]{transition-property:top,left,width,height,opacity,border-radius;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,color\\]{transition-property:transform,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.delay-\\[80ms\\]{transition-delay:80ms}.duration-60{--tw-duration:60ms;transition-duration:60ms}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-120{--tw-duration:.12s;transition-duration:.12s}.duration-140{--tw-duration:.14s;transition-duration:.14s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-180{--tw-duration:.18s;transition-duration:.18s}.duration-220{--tw-duration:.22s;transition-duration:.22s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-400{--tw-duration:.4s;transition-duration:.4s}.ease-\\[cubic-bezier\\(0\\,0\\,0\\.2\\,1\\)\\]{--tw-ease:cubic-bezier(0,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-drawer{--tw-ease:var(--ease-drawer);transition-timing-function:var(--ease-drawer)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.ease-spring{--tw-ease:var(--ease-spring);transition-timing-function:var(--ease-spring)}.will-change-\\[opacity\\,transform\\]{will-change:opacity,transform}.will-change-transform{will-change:transform}.contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,) var(--tw-contain-layout,) var(--tw-contain-paint,) var(--tw-contain-style,)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[corner-shape\\:superellipse\\(1\\.25\\)\\]{corner-shape:superellipse(1.25)}.\\[font-synthesis\\:none\\]{font-synthesis:none}@media (hover:hover){.group-hover\\:text-\\[var\\(--rg-text-primary\\)\\]:is(:where(.group):hover *){color:var(--rg-text-primary)}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}.hover\\:bg-\\[var\\(--rg-error-bg-hover\\)\\]:hover{background-color:var(--rg-error-bg-hover)}.hover\\:bg-\\[var\\(--rg-surface-active\\)\\]:hover{background-color:var(--rg-surface-active)}.hover\\:bg-\\[var\\(--rg-surface-hover\\)\\]:hover{background-color:var(--rg-surface-hover)}.hover\\:text-\\[var\\(--rg-text-primary\\)\\]:hover{color:var(--rg-text-primary)}}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:opacity-40:disabled{opacity:.4}}:host{all:initial;direction:ltr}:host,[data-rg-theme=dark]{--rg-panel-bg:#161616;--rg-text-primary:#fff;--rg-text-secondary:#a7a7a7;--rg-surface-hover:#ffffff1a;--rg-surface-active:#ffffff26;--rg-border-subtle:#ffffff1a;--rg-border-button:#fff3;--rg-submit-bg:#fff;--rg-submit-fg:#161616;--rg-error-text:#f87171;--rg-error-bg:#3d1515;--rg-error-bg-hover:#4d1f1f;--rg-shadow:0 2px 8px #00000014;--rg-drop-shadow:drop-shadow(0px 2px 8px #00000014);--rg-shimmer-from:#a1a1aa;--rg-shimmer-to:#d4d4d8;--rg-text-primary-85:#ffffffd9}@media (prefers-color-scheme:dark){:host:not([data-rg-theme]){--rg-panel-bg:#fff;--rg-text-primary:#171717;--rg-text-secondary:#737373;--rg-surface-hover:#0000000d;--rg-surface-active:#00000014;--rg-border-subtle:#00000014;--rg-border-button:#00000026;--rg-submit-bg:#171717;--rg-submit-fg:#fff;--rg-error-text:#dc2626;--rg-error-bg:#fee2e2;--rg-error-bg-hover:#fecaca;--rg-shadow:0 2px 12px #0000001a;--rg-drop-shadow:drop-shadow(0px 2px 12px #0000001a);--rg-shimmer-from:#71717a;--rg-shimmer-to:#a1a1aa;--rg-text-primary-85:#171717d9}}:host([data-rg-theme=light]),[data-rg-theme=light]{--rg-panel-bg:#fff;--rg-text-primary:#171717;--rg-text-secondary:#737373;--rg-surface-hover:#0000000d;--rg-surface-active:#00000014;--rg-border-subtle:#00000014;--rg-border-button:#00000026;--rg-submit-bg:#171717;--rg-submit-fg:#fff;--rg-error-text:#dc2626;--rg-error-bg:#fee2e2;--rg-error-bg-hover:#fecaca;--rg-shadow:0 2px 12px #0000001a;--rg-drop-shadow:drop-shadow(0px 2px 12px #0000001a);--rg-shimmer-from:#71717a;--rg-shimmer-to:#a1a1aa;--rg-text-primary-85:#171717d9}@keyframes rg-slot-enter-up{0%{filter:blur(2px);opacity:0;transform:translateY(.5em)scale(.5)}to{filter:blur();opacity:1;transform:translateY(0)scale(1)}}@keyframes rg-slot-exit-up{0%{filter:blur();opacity:1;transform:translateY(0)scale(1)}to{filter:blur(2px);opacity:0;transform:translateY(-.5em)scale(.5)}}@keyframes rg-slot-enter-down{0%{filter:blur(2px);opacity:0;transform:translateY(-.5em)scale(.5)}to{filter:blur();opacity:1;transform:translateY(0)scale(1)}}@keyframes rg-slot-exit-down{0%{filter:blur();opacity:1;transform:translateY(0)scale(1)}to{filter:blur(2px);opacity:0;transform:translateY(.5em)scale(.5)}}@keyframes rg-slot-enter-fade{0%{filter:blur(2px);opacity:0;transform:scale(.5)}to{filter:blur();opacity:1;transform:scale(1)}}@keyframes rg-slot-exit-fade{0%{filter:blur();opacity:1;transform:scale(1)}to{filter:blur(2px);opacity:0;transform:scale(.5)}}.rg-slot-column{vertical-align:top;display:inline-block;position:relative}.rg-slot-sizer{visibility:hidden;white-space:pre;display:inline-block}.rg-slot-cell{white-space:pre;will-change:transform, filter, opacity;animation-duration:var(--rg-slot-dur,.35s);animation-timing-function:var(--rg-slot-ease,cubic-bezier(.34, 1.56, .64, 1));animation-fill-mode:both;display:inline-block;position:absolute;top:0;left:0}.rg-slot-cell.rg-slot-enter[data-dir="1"]{animation-name:rg-slot-enter-up}.rg-slot-cell.rg-slot-enter[data-dir="-1"]{animation-name:rg-slot-enter-down}.rg-slot-cell.rg-slot-enter[data-dir="0"]{animation-name:rg-slot-enter-fade}.rg-slot-cell.rg-slot-exit[data-dir="1"]{animation-name:rg-slot-exit-up}.rg-slot-cell.rg-slot-exit[data-dir="-1"]{animation-name:rg-slot-exit-down}.rg-slot-cell.rg-slot-exit[data-dir="0"]{animation-name:rg-slot-exit-fade}@media (prefers-reduced-motion:reduce){:host,:host *,:host :before,:host :after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}:host :focus,:host :focus-visible{box-shadow:none!important;outline:none!important}@keyframes shake{0%,to{translate:0}15%,45%{translate:calc(-3px * var(--rg-shake-x,1)) calc(-3px * var(--rg-shake-y,0))}30%,60%{translate:calc(3px * var(--rg-shake-x,1)) calc(3px * var(--rg-shake-y,0))}75%{translate:calc(-2px * var(--rg-shake-x,1)) calc(-2px * var(--rg-shake-y,0))}90%{translate:calc(2px * var(--rg-shake-x,1)) calc(2px * var(--rg-shake-y,0))}}@keyframes icon-loader-spin{0%{opacity:1}50%{opacity:.5}to{opacity:.2}}.icon-loader-bar{animation:.5s linear infinite icon-loader-spin}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.shimmer-text{background:linear-gradient(90deg, var(--rg-shimmer-from) 0%, var(--rg-shimmer-to) 25%, var(--rg-shimmer-from) 50%, var(--rg-shimmer-to) 75%, var(--rg-shimmer-from) 100%);color:#0000;background-size:200% 100%;-webkit-background-clip:text;background-clip:text;animation:2.5s linear infinite shimmer}.animate-shake,.animate-shake-vertical{will-change:translate;animation:.3s ease-out shake}@keyframes tooltip-fade-in{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}.animate-tooltip-fade-in{will-change:transform, opacity;animation:.1s ease-out tooltip-fade-in}.animate-shake-vertical{--rg-shake-x:0;--rg-shake-y:1}@supports (-webkit-touch-callout:none){textarea[data-react-grab-input]{font-size:16px}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}`;function i(e){return typeof e==`object`&&!!e&&(Object.getPrototypeOf(e)===Object.prototype||Array.isArray(e))}function a(e,t,n,r){!r&&e[t]===n||(n===void 0?delete e[t]:e[t]=n)}function o(e,t,n){let r=Object.keys(t);for(let i=0;i<r.length;i+=1){let o=r[i];a(e,o,t[o],n)}}function s(e,t){if(typeof t==`function`&&(t=t(e)),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){let r=t[n];e[n]!==r&&a(e,n,r)}a(e,`length`,r)}else o(e,t)}function c(e,t,n=[]){let r,s=e;if(t.length>1){r=t.shift();let i=typeof r,a=Array.isArray(e);if(Array.isArray(r)){for(let i=0;i<r.length;i++)c(e,[r[i]].concat(t),n);return}else if(a&&i===`function`){for(let i=0;i<e.length;i++)r(e[i],i)&&c(e,[i].concat(t),n);return}else if(a&&i===`object`){let{from:i=0,to:a=e.length-1,by:o=1}=r;for(let r=i;r<=a;r+=o)c(e,[r].concat(t),n);return}else if(t.length>1){c(e[r],t,[r].concat(n));return}s=e[r],n=[r].concat(n)}let l=t[0];typeof l==`function`&&(l=l(s,n),l===s)||r===void 0&&l==null||(r===void 0||i(s)&&i(l)&&!Array.isArray(l)?o(s,l):a(e,r,l))}function l(e){let t=Array.isArray(e);function n(...n){t&&n.length===1?s(e,n[0]):c(e,n)}return[e,n]}function u(e){return t=>(i(t)&&e(t),t)}let d=new WeakMap,f=new WeakMap;const p=()=>{d=new WeakMap,f=new WeakMap},m=(e,t,n)=>{let r=f.get(e);if(r&&n-r.timestamp<200)return r.borderRadius;let i=(t??window.getComputedStyle(e)).borderRadius||`0px`;return f.set(e,{borderRadius:i,timestamp:n}),i},h=e=>{let t=performance.now(),n=d.get(e);if(n&&t-n.timestamp<16)return n.bounds;let r=e.getBoundingClientRect(),i={borderRadius:m(e,null,t),height:r.height,width:r.width,x:r.left,y:r.top};return d.set(e,{bounds:i,timestamp:t}),i},g=e=>({x:e.x+e.width/2,y:e.y+e.height/2}),_=e=>({selectionInteractionLockDepth:0,wasActivatedByToggle:!1,pendingCommentMode:!1,keyHoldDuration:e.keyHoldDuration,dragStart:{x:t.ht,y:t.ht},copyStart:{x:t.ht,y:t.ht},copyOffsetFromCenterX:0,detectedElement:null,frozenElement:null,frozenElements:[],frozenDragRect:null,lastGrabbedElement:null,selectionFilePath:null,selectionLineNumber:null,inputText:``,grabbedBoxes:[],labelInstances:[],isTouchMode:!1,activationTimestamp:null,previouslyFocusedElement:null,contextMenuPosition:null,contextMenuElement:null,contextMenuClickOffset:null}),v=n=>{let[r,i]=l(_(n)),[a,o]=e._t({x:t.ht,y:t.ht}),[s,c]=e._t(0),[d,f]=e._t({state:`idle`}),p=e=>{i(u(t=>{e(t),t.frozenElement=t.frozenElements.length>0?t.frozenElements[0]:null,t.frozenDragRect=null}))},m=()=>{p(e=>{e.frozenElements=[]})},v=e=>{f(t=>t.state===`active`?{...t,phase:e}:t)},y={startHold:e=>{e!==void 0&&i(`keyHoldDuration`,e),f({state:`holding`,startedAt:Date.now()})},releaseHold:()=>{d().state===`holding`&&f({state:`idle`})},activate:()=>{e.lt(()=>{f({state:`active`,phase:`hovering`,isPromptMode:!1,isPendingDismiss:!1}),i(`activationTimestamp`,Date.now()),i(`previouslyFocusedElement`,document.activeElement)})},deactivate:()=>{e.lt(()=>{f({state:`idle`}),i(u(e=>{e.wasActivatedByToggle=!1,e.pendingCommentMode=!1,e.inputText=``,e.frozenElement=null,e.frozenElements=[],e.frozenDragRect=null,e.activationTimestamp=null,e.previouslyFocusedElement=null,e.contextMenuPosition=null,e.contextMenuElement=null,e.contextMenuClickOffset=null,e.isTouchMode&&(e.detectedElement=null)}))})},toggle:()=>{r.activationTimestamp===null?(i(`wasActivatedByToggle`,!0),y.activate()):y.deactivate()},freeze:()=>{if(d().state===`active`){let e=r.frozenElement??r.detectedElement;e&&i(`frozenElement`,e),v(`frozen`)}},unfreeze:()=>{d().state===`active`&&e.lt(()=>{i(u(e=>{e.frozenElement=null,e.frozenElements=[],e.frozenDragRect=null})),v(`hovering`)})},startDrag:(t,n)=>{d().state===`active`&&e.lt(()=>{n||m(),i(`dragStart`,{x:t.x+window.scrollX,y:t.y+window.scrollY}),v(`dragging-select`)})},startDragReposition:()=>{let e=d();e.state===`active`&&e.phase===`dragging-select`&&v(`dragging-reposition`)},stopDragReposition:()=>{let e=d();e.state===`active`&&e.phase===`dragging-reposition`&&v(`dragging-select`)},shiftDragStart:e=>{let t=d();t.state===`active`&&t.phase===`dragging-reposition`&&i(`dragStart`,t=>({x:t.x+e.x,y:t.y+e.y}))},endDrag:()=>{let n=d();n.state===`active`&&(n.phase===`dragging-select`||n.phase===`dragging-reposition`)&&e.lt(()=>{i(`dragStart`,{x:t.ht,y:t.ht}),v(`justDragged`)})},cancelDrag:()=>{let n=d();n.state===`active`&&(n.phase===`dragging-select`||n.phase===`dragging-reposition`)&&e.lt(()=>{i(`dragStart`,{x:t.ht,y:t.ht}),v(`hovering`)})},finishJustDragged:()=>{let e=d();e.state===`active`&&e.phase===`justDragged`&&v(`hovering`)},startCopy:()=>{let e=d().state===`active`;f({state:`copying`,startedAt:Date.now(),wasActive:e})},completeCopy:()=>{let e=d(),t=e.state===`copying`?e.wasActive:!1;f({state:`justCopied`,copiedAt:Date.now(),wasActive:t})},finishJustCopied:()=>{let t=d();t.state===`justCopied`&&(t.wasActive&&!r.wasActivatedByToggle?e.lt(()=>{m(),f({state:`active`,phase:`hovering`,isPromptMode:!1,isPendingDismiss:!1})}):y.deactivate())},enterPromptMode:(t,n)=>{let{x:r}=g(h(n));e.lt(()=>{i(`copyStart`,t),i(`copyOffsetFromCenterX`,t.x-r),o(t),i(`frozenElement`,n),i(`wasActivatedByToggle`,!0),d().state===`active`?f(e=>e.state===`active`?{...e,isPromptMode:!0,phase:`frozen`}:e):(f({state:`active`,phase:`frozen`,isPromptMode:!0,isPendingDismiss:!1}),i(`activationTimestamp`,Date.now()),i(`previouslyFocusedElement`,document.activeElement))})},exitPromptMode:()=>{f(e=>e.state===`active`?{...e,isPromptMode:!1,isPendingDismiss:!1}:e)},setInputText:e=>{i(`inputText`,e)},clearInputText:()=>{i(`inputText`,``)},setPendingDismiss:e=>{f(t=>t.state===`active`?{...t,isPendingDismiss:e}:t)},setPointer:e=>{o(t=>t.x===e.x&&t.y===e.y?t:e)},setDetectedElement:e=>{i(`detectedElement`,e)},setFrozenElement:e=>{p(t=>{t.frozenElements=[e]})},setFrozenElements:e=>{p(t=>{t.frozenElements=e})},toggleFrozenElement:e=>{p(t=>{let n=t.frozenElements.indexOf(e);n>=0?t.frozenElements.splice(n,1):t.frozenElements.push(e)})},addFrozenElements:e=>{p(t=>{for(let n of e)t.frozenElements.includes(n)||t.frozenElements.push(n)})},setFrozenDragRect:e=>{i(`frozenDragRect`,e)},setCopyStart:(e,t)=>{let{x:n}=g(h(t));i(`copyStart`,e),i(`copyOffsetFromCenterX`,e.x-n)},setLastGrabbed:e=>{i(`lastGrabbedElement`,e)},setWasActivatedByToggle:e=>{i(`wasActivatedByToggle`,e)},setPendingCommentMode:e=>{i(`pendingCommentMode`,e)},setTouchMode:e=>{i(`isTouchMode`,e)},incrementSelectionInteractionLockDepth:()=>{i(`selectionInteractionLockDepth`,e=>e+1)},decrementSelectionInteractionLockDepth:()=>{i(`selectionInteractionLockDepth`,e=>Math.max(0,e-1))},setSelectionSource:(t,n)=>{e.lt(()=>{i(`selectionFilePath`,t),i(`selectionLineNumber`,n)})},incrementViewportVersion:()=>{c(e=>e+1)},addGrabbedBox:e=>{i(`grabbedBoxes`,t=>[...t,e])},removeGrabbedBox:e=>{i(`grabbedBoxes`,t=>t.filter(t=>t.id!==e))},clearGrabbedBoxes:()=>{i(`grabbedBoxes`,[])},addLabelInstance:e=>{i(`labelInstances`,t=>[...t,e])},updateLabelInstance:(t,n,a)=>{let o=r.labelInstances.findIndex(e=>e.id===t);o!==-1&&e.lt(()=>{i(`labelInstances`,o,`status`,n),a!==void 0&&i(`labelInstances`,o,`errorMessage`,a)})},removeLabelInstance:e=>{i(`labelInstances`,t=>t.filter(t=>t.id!==e))},clearLabelInstances:()=>{i(`labelInstances`,[])},showContextMenu:(t,n)=>{let{x:r,y:a}=g(h(n));e.lt(()=>{i(`contextMenuPosition`,t),i(`contextMenuElement`,n),i(`contextMenuClickOffset`,{x:t.x-r,y:t.y-a})})},hideContextMenu:()=>{e.lt(()=>{i(`contextMenuPosition`,null),i(`contextMenuElement`,null),i(`contextMenuClickOffset`,null)})},updateContextMenuPosition:()=>{let t=r.contextMenuElement,n=r.contextMenuClickOffset;if(!t||!n||!e.W(t))return;let{x:a,y:o}=g(h(t));i(`contextMenuPosition`,{x:a+n.x,y:o+n.y})}};return{store:r,actions:y,pointer:a,viewportVersion:s,current:d}},y=e=>{if(!document.body)return;let n=document.querySelectorAll(`[${t.Bt}]`);for(let t of n)t!==e&&t.parentNode!==e&&(t.shadowRoot||t.remove());document.body.appendChild(e)},b=e=>{if(document.body){y(e);return}let t=()=>{document.removeEventListener(`DOMContentLoaded`,t),y(e)};document.addEventListener(`DOMContentLoaded`,t,{once:!0})},ee=e=>{let n=document.querySelectorAll(`[${t.Bt}]`);for(let e of n){let n=e.shadowRoot?.querySelector(`[${t.Bt}]`);if(n instanceof HTMLDivElement)return{root:n,host:e};e.remove()}let r=document.createElement(`div`);r.setAttribute(t.Bt,`true`),t.P(r),r.style.zIndex=String(t.Rt),r.style.position=`fixed`,r.style.inset=`0`,r.style.pointerEvents=`none`,r.style.contain=`strict`;let i=r.attachShadow({mode:`open`}),a=document.createElement(`style`),o=t.F();o&&(a.nonce=o),a.textContent=`@import url("https://fonts.googleapis.com/css2?family=Geist:wght@500&display=swap");\n${e??``}`,i.appendChild(a);let s=document.createElement(`div`);return s.setAttribute(t.Bt,`true`),i.appendChild(s),b(r),setTimeout(()=>{y(r)},t.pt),{root:s,host:r}},te=t=>{let[r,i]=e._t(void 0),a=0;return e.ft(e.bt(t,e=>{let t=++a;if(!e){i(void 0);return}let r=n.r(e)??void 0;i(r),n.a(e).then(e=>{a===t&&i(e??r)}).catch(()=>{a===t&&i(r)})})),[r,i]},ne=[`data-theme`,`data-mode`,`data-color-scheme`,`data-bs-theme`,`data-mui-color-scheme`,`data-mantine-color-scheme`],re=[{attribute:`data-dark`,theme:`dark`},{attribute:`data-light`,theme:`light`}],ie=(e,t,n)=>{let[r,i,a]=[e,t,n].map(e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return .2126*r+.7152*i+.0722*a},x=(t,n=0)=>{let r=e.R(t),i=r?e.B(r):null;return!i||i.alpha<=n?null:ie(i.red,i.green,i.blue)},S=e=>{let t=x(e);return t===null?null:t<.18?`dark`:`light`},ae=e=>S(getComputedStyle(e).backgroundColor),C=()=>{let e=x(getComputedStyle(document.documentElement).color,t._t);return e===null?null:e>.6?`dark`:null},oe=()=>{let e=document.createElement(`div`);e.style.cssText=`position:fixed;width:0;height:0;background-color:Canvas!important`,document.documentElement.appendChild(e);let t=S(getComputedStyle(e).backgroundColor);return e.remove(),t},se=e=>{let t=e.toLowerCase();return t===`dark`?`dark`:t===`light`?`light`:null},w=e=>{let t=e.style.colorScheme||getComputedStyle(e).colorScheme;return t?t.trim().toLowerCase().split(/\s+/):[]},ce=e=>{let t=w(e),n=t.includes(`dark`);return n===t.includes(`light`)?null:n?`dark`:`light`},T=e=>{if(e.classList.contains(`dark`))return`dark`;if(e.classList.contains(`light`))return`light`;for(let t of ne){let n=e.getAttribute(t);if(!n)continue;let r=se(n);if(r)return r}for(let{attribute:t,theme:n}of re)if(e.hasAttribute(t))return n;return null},le=(e,t)=>{for(let n of e){if(!n)continue;let e=t(n);if(e)return e}return null},ue=()=>{let e=[document.documentElement,document.body],t=[document.body,document.documentElement];return le(e,T)??le(e,ce)??le(t,ae)??C()??oe()??`light`},de=e=>e===`dark`?`light`:`dark`,fe={attributes:!0,attributeFilter:[`class`,`style`,...ne,...re.map(({attribute:e})=>e)]},pe=(e,n)=>{let r=null,i=null,a=()=>{let t=de(ue());return t!==r&&(r=t,e.setAttribute(`data-rg-theme`,t),n?.(t)),t},o=()=>{i===null&&(i=t._(()=>{i=null,a()}))},s=a(),c=new MutationObserver(o);c.observe(document.documentElement,fe);let l=null;document.body?c.observe(document.body,fe):(l=new MutationObserver(()=>{document.body&&(l.disconnect(),l=null,c.observe(document.body,fe),a())}),l.observe(document.documentElement,{childList:!0}));let u=window.matchMedia(`(prefers-color-scheme: dark)`);return u.addEventListener(`change`,o),{theme:s,cleanup:()=>{l?.disconnect(),c.disconnect(),u.removeEventListener(`change`,o),i!==null&&t.g(i)}}},E=()=>{},D=()=>({activate:E,deactivate:E,toggle:E,comment:E,isActive:()=>!1,isEnabled:()=>!1,setEnabled:E,getToolbarState:()=>null,setToolbarState:E,onToolbarStateChange:()=>E,reset:E,dispose:E,copyElement:()=>Promise.resolve(!1),getSource:()=>Promise.resolve(null),getStackContext:()=>Promise.resolve(``),getState:()=>({isActive:!1,isDragging:!1,isCopying:!1,isPromptMode:!1,isSelectionBoxVisible:!1,isDragBoxVisible:!1,targetElement:null,dragBounds:null,grabbedBoxes:[],labelInstances:[],selectionFilePath:null,toolbarState:null}),setOptions:E,registerPlugin:E,unregisterPlugin:E,getPlugins:()=>[],getDisplayName:()=>null}),me=()=>{let e=new AbortController;return{signal:e.signal,abort:()=>e.abort(),addWindowListener:(t,n,r={})=>{window.addEventListener(t,n,{...r,signal:e.signal})},addDocumentListener:(t,n,r={})=>{document.addEventListener(t,n,{...r,signal:e.signal})}}},he=(e,t=`Unknown error`)=>e instanceof Error&&e.message?e.message:t,ge=e=>e instanceof Error?e:Error(String(e)),_e=e=>({functionName:e.functionName,fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,isServer:e.isServer,isSymbolicated:e.isSymbolicated}),ve=async(e,r)=>{let i={maxLines:r},[a,o,s,c]=await Promise.all([n.i(e,i),n.s(e,i),n.c(e),n.o(e)]);return{tagName:t.I(e),componentName:s?.componentName??void 0,content:`[${a}]`,source:s,stackContext:o,frames:(c??[]).map(_e)}},ye=async(e,t)=>{let n=await Promise.all(e.map(e=>ve(e,t))),r=new Map;for(let e of n)r.has(e.content)||r.set(e.content,e);let i=[...r.values()];return i.length>0?{content:i.map(e=>e.content).join(`
|
|
11
|
+
`),entries:i}:null},be=(e,t,n)=>{if(e?.entries)return t===e.content?e.entries:e.entries.length===1?[{...e.entries[0],content:t,commentText:n}]:e.entries.map(e=>({...e,commentText:n}))},xe=async(e,t,r,i)=>{await t.onBeforeCopy(r);let a=!1,o=``;try{let s=e.getContent?{content:await e.getContent(r)}:await ye(r,e.maxContextLines),c=s?.content;if(c?.trim()){let l=await t.transformCopyContent(c,r);o=i?`${i}\n${l}`:l,a=n.t(o,{componentName:e.componentName,entries:be(s,o,i)})}}catch(e){t.onCopyError(ge(e))}return a&&t.onCopySuccess(r,o),t.onAfterCopy(r,a),a},Se=(e,t)=>{let n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),i=Math.min(e.right,t.right),a=Math.min(e.bottom,t.bottom);return Math.max(0,i-n)*Math.max(0,a-r)},Ce=(e,t)=>e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top,we=e=>e.sort((e,t)=>{if(e===t)return 0;let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0}),Te=t=>{if(t.width<=0||t.height<=0)return[];let n=window.innerWidth,r=window.innerHeight,i=t.x,a=t.y,o=t.x+t.width,s=t.y+t.height,c=i+t.width/2,l=a+t.height/2,u=e.L(Math.ceil(t.width/32),3,20),d=e.L(Math.ceil(t.height/32),3,20),f=u*d,p=f>100?Math.sqrt(100/f):1,m=e.L(Math.floor(u*p),3,20),h=e.L(Math.floor(d*p),3,20),g=new Set,_=[],v=(t,i)=>{let a=e.L(Math.round(t),0,n-1),o=e.L(Math.round(i),0,r-1),s=`${a}:${o}`;g.has(s)||(g.add(s),_.push({x:a,y:o}))};v(i+1,a+1),v(o-1,a+1),v(i+1,s-1),v(o-1,s-1),v(c,a+1),v(c,s-1),v(i+1,l),v(o-1,l),v(c,l);for(let e=0;e<m;e+=1){let n=i+(e+.5)/m*t.width;for(let e=0;e<h;e+=1)v(n,a+(e+.5)/h*t.height)}return _},Ee=(e,n,r)=>{let i={left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height},a=new Set,o=Te(e);t.f();try{for(let e of o){let t=document.elementsFromPoint(e.x,e.y);for(let e of t)a.add(e)}}finally{t.d()}let s=[];for(let e of a)!r&&t.h(e)||t.Ut(e)&&n(e)&&s.push(e);let c=new Map;for(let e of s)c.set(e,e.getBoundingClientRect());let l=[];for(let e of s){let t=c.get(e);if(t.width<=0||t.height<=0)continue;let n={left:t.left,top:t.top,right:t.left+t.width,bottom:t.top+t.height};if(r){let r=Se(i,n),a=t.width*t.height;a>0&&r/a>=.75&&l.push(e)}else Ce(n,i)&&l.push(e)}return we(l)},O=e=>{let t=new Set(e);return e.filter(e=>{for(let n=e.parentElement;n;n=n.parentElement)if(t.has(n))return!1;return!0})},De=(e,t,n=!0)=>O(Ee(e,t,n)),Oe=(t,n)=>t.width<=0?0:e.L((n.x-t.x)/t.width,0,1),ke=()=>{p(),t.c(),t.p()},Ae=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.pageX-window.scrollX,y:e.pageY-window.scrollY}),je=e=>({pageX:e.x+window.scrollX,pageY:e.y+window.scrollY,width:e.width,height:e.height}),Me=e=>({borderRadius:`0px`,height:e.height,width:e.width,x:e.x,y:e.y}),Ne=(e,t,n)=>{let r=(e,t,n,r)=>{let i=[],a=e,o=0;for(;a&&i.length<n&&o<100;)r(a)&&i.push(a),a=t(a),o+=1;return i},i=r(e.parentElement,e=>e.parentElement,6,t);i.reverse();let a=i.map((e,t)=>({element:e,depth:t,isLast:!0})),o=i.length,s=r(e.previousElementSibling,e=>e.previousElementSibling,7,n),c=r(e.nextElementSibling,e=>e.nextElementSibling,7,n),l=Math.min(s.length,Math.max(3,7-c.length)),u=Math.min(c.length,7-l),d=[...s.slice(0,l).reverse(),e,...c.slice(0,u)],f=r(e.firstElementChild,e=>e.nextElementSibling,6,t),p=d.length-1,m=f.length-1;return d.forEach((t,n)=>{a.push({element:t,depth:o,isLast:n===p}),t===e&&f.forEach((e,t)=>{a.push({element:e,depth:o+1,isLast:t===m})})}),a},k=e=>e instanceof SVGElement&&!(e instanceof SVGSVGElement),Pe=e=>{let t=e.getBoundingClientRect();return t.width>=16||t.height>=16},Fe=(e,t)=>t(e)&&!k(e)&&Pe(e),Ie=new Set([`c`,`C`,`с`,`С`,`ȼ`,`Ȼ`,`ↄ`,`Ↄ`,`ᴄ`,`ᶜ`,`ⱼ`,`ⅽ`,`Ⅽ`,`ç`,`Ç`,`ć`,`Ć`,`č`,`Č`,`ĉ`,`Ĉ`,`ċ`,`Ċ`]),Le=(e,t)=>t===`KeyC`?!0:!e||e.length!==1?!1:Ie.has(e),A=(e,t)=>{if(!e||!t)return!1;let n=e.toLowerCase();return t===`Space`?n===`space`||n===` `:t.startsWith(`Key`)?t.slice(3).toLowerCase()===n:t.startsWith(`Digit`)?t.slice(5)===n:!1},j={meta:`metaKey`,cmd:`metaKey`,command:`metaKey`,win:`metaKey`,windows:`metaKey`,ctrl:`ctrlKey`,control:`ctrlKey`,shift:`shiftKey`,alt:`altKey`,option:`altKey`,opt:`altKey`},Re=e=>{let t=e.split(`+`).map(e=>e.trim().toLowerCase()),n={metaKey:!1,ctrlKey:!1,shiftKey:!1,altKey:!1,key:null};for(let e of t){let t=j[e];t?n[t]=!0:n.key=e}return n},ze=e=>{if(typeof e==`function`)return e;let t=Re(e),n=t.key;return e=>{if(n===null){let n=t.metaKey?e.metaKey||e.key===`Meta`:!0,r=t.ctrlKey?e.ctrlKey||e.key===`Control`:!0,i=t.shiftKey?e.shiftKey||e.key===`Shift`:!0,a=t.altKey?e.altKey||e.key===`Alt`:!0,o=n&&r&&i&&a,s=[t.metaKey,t.ctrlKey,t.shiftKey,t.altKey].filter(Boolean).length,c=[e.metaKey||e.key===`Meta`,e.ctrlKey||e.key===`Control`,e.shiftKey||e.key===`Shift`,e.altKey||e.key===`Alt`].filter(Boolean).length;return o&&c>=s}let r=e.key?.toLowerCase()===n||A(n,e.code),i=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey?(t.metaKey?e.metaKey:!0)&&(t.ctrlKey?e.ctrlKey:!0)&&(t.shiftKey?e.shiftKey:!0)&&(t.altKey?e.altKey:!0):!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey;return r&&i}},Be=t=>!t||typeof t==`function`?{metaKey:e.I(),ctrlKey:!e.I(),shiftKey:!1,altKey:!1,key:null}:Re(t),Ve=(t,n)=>{if(n.activationKey)return ze(n.activationKey)(t);let r=(e.I()?t.metaKey:t.ctrlKey)&&!t.shiftKey&&!t.altKey;return!!(t.key&&r&&Le(t.key,t.code))},He=e=>{if(e.length===0)return{x:0,y:0,width:0,height:0};if(e.length===1)return e[0];let t=1/0,n=1/0,r=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),n=Math.min(n,a.y),r=Math.max(r,a.x+a.width),i=Math.max(i,a.y+a.height);return{x:t,y:n,width:r-t,height:i-n}},M=t=>{let n=getComputedStyle(t),r={};for(let t of e.A)r[t]=n.getPropertyValue(t);return r},Ue=t=>{let n={};for(let r of e.b)n[r]=t.getPropertyValue(r);return n},We=e=>{try{let t=e.parentElement;if(!t)return null;let n=e.namespaceURI,r=e.tagName.toLowerCase(),i=n&&n!==`http://www.w3.org/1999/xhtml`?e.ownerDocument.createElementNS(n,r):e.ownerDocument.createElement(r),a=`style`in i?i.style:null;a instanceof CSSStyleDeclaration&&a.setProperty(`display`,`none`,`important`),t.appendChild(i);try{return Ue(getComputedStyle(i))}finally{i.remove()}}catch{return null}},Ge=new Set([`display`,`width`,`height`]),Ke=(e,t,n)=>e.kind===`color`?!1:e.cssProperties.some(e=>Ge.has(e))?qe(e):e.cssProperties.every(e=>{let r=t[e],i=n[e];return r===void 0||i===void 0?!1:r===i}),qe=t=>{if(t.kind===`color`)return!1;if(t.kind===`enum`)return t.key===`font-weight`?t.original===`400`:t.options[0]?.value===t.original;let{key:n,original:r}=t;return n.startsWith(`padding`)||n.startsWith(`margin`)||n.includes(`gap`)||n===`border-width`||n.endsWith(`-radius`)||n===`border-radius`?r===0:n===`opacity`?r===100:n===`letter-spacing`||n===`z-index`?r===0:e.E.has(n)?!1:!!(n===`width`||n===`height`||n===`width,height`||n.startsWith(`max-`)||n.startsWith(`min-`)||n===`line-height`)},N=e=>{let t=e.trim();if(!t||t===`auto`||t===`normal`||t===`none`)return null;let n=Number.parseFloat(t);return Number.isFinite(n)?t.endsWith(`%`)?{value:n,unit:`%`}:t.endsWith(`rem`)||t.endsWith(`em`)?{value:n*16,unit:`px`}:t.endsWith(`px`)?{value:n,unit:`px`}:{value:n,unit:``}:null},Je=(n,r)=>{let i=N(n[r]);if(i)return i;if(r===`line-height`){let r=N(n[`font-size`]);return r?{value:e._(r.value*t.at),unit:r.unit||`px`}:null}return e.C.has(r)?{value:0,unit:`px`}:null},Ye=(e,t)=>{let n=Je(e,t[0]);if(!n)return null;for(let r=1;r<t.length;r++){let i=Je(e,t[r]);if(!i||i.unit!==n.unit||Math.abs(i.value-n.value)>=.5)return null}return n},Xe=(t,n)=>t===`opacity`?{value:Math.round(n.value*100),unit:`%`}:e.j.has(t)?{value:e._(n.value),unit:``}:{value:e._(n.value),unit:n.unit||`px`},P=e=>e!==null,F=(e,t)=>{let n=t.map(t=>{let n=t.longhands.length===1?Je(e,t.longhands[0]):Ye(e,t.longhands);return n?{definition:t,value:n}:null}).filter(P),r=new Map;for(let e of n)for(let t of e.definition.longhands){let n=r.get(t);(!n||e.definition.longhands.length>n.definition.longhands.length)&&r.set(t,e)}let i=new Set(r.values());return n.map(e=>({...e,isCanonical:i.has(e)}))},Ze=(t,n,r)=>t===`opacity`?{min:0,max:100}:t===`z-index`?{min:e.N,max:e.M}:t===`letter-spacing`?{min:-10,max:20}:t===`font-size`?{min:8,max:96}:t===`line-height`?{min:0,max:120}:t.includes(`radius`)?{min:0,max:96}:t===`width`||t===`height`||t===`width,height`||t.startsWith(`min-`)||t.startsWith(`max-`)?{min:0,max:Math.max(512,Math.ceil(n*2))}:e.E.has(t)?{min:e.D,max:512}:r===`%`?{min:0,max:100}:{min:t.startsWith(`margin`)?e.T:0,max:e.k},Qe=(t,n,r)=>{let i=Xe(t.key,n),a=i.unit===`px`&&Math.abs(i.value)>1e7,o=Ze(t.key,a?0:i.value,i.unit),s=i.value<0?o.min:o.max,c=a?s:i.value;return{kind:`numeric`,key:t.key,label:t.label,cssProperties:t.longhands,min:o.min,max:o.max,value:c,original:c,unit:i.unit,tailwindAliases:e.s(t.key),isPrioritized:!1,isDefault:!1,isCanonical:r}},$e=(n,r,i,a=!1)=>{let o=e.R(i),s=o?e.B(o):null,c=s!==null&&s.alpha!==0;if(!c&&!a)return null;let l=c&&o?o:t.nt;return{kind:`color`,key:n,label:r,cssProperties:[n],value:l,original:l,tailwindAliases:e.s(n),isPrioritized:a,isDefault:!1,isCanonical:!0}},I=(t,n,r)=>{let i=n.trim(),a=r??t.options;return!a||!a.some(e=>e.value===i)?null:{kind:`enum`,key:t.key,label:t.label,cssProperties:[t.key],value:i,original:i,options:a,tailwindAliases:e.s(t.key),isPrioritized:!1,isDefault:!1,isCanonical:!0}},L=new Map(`background-color.color.padding.padding-left,padding-right.padding-top,padding-bottom.padding-top.padding-right.padding-bottom.padding-left.margin.margin-left,margin-right.margin-top,margin-bottom.margin-top.margin-right.margin-bottom.margin-left.font-family.font-size.font-weight.font-style.line-height.letter-spacing.text-transform.text-align.text-decoration-line.white-space.word-break.overflow-wrap.font-variant-numeric.border-radius.border-top-left-radius,border-top-right-radius.border-bottom-left-radius,border-bottom-right-radius.border-top-left-radius,border-bottom-left-radius.border-top-right-radius,border-bottom-right-radius.border-top-left-radius.border-top-right-radius.border-bottom-left-radius.border-bottom-right-radius.width,height.width.height.max-width.max-height.min-width.min-height.opacity.gap.row-gap.column-gap.border-width.border-top-width.border-right-width.border-bottom-width.border-left-width.border-color.align-items.justify-content.top,right,bottom,left.left,right.top,bottom.top.right.bottom.left.z-index`.split(`.`).map((e,t)=>[e,t])),R=e=>L.get(e.key)??1/0,z=e=>e.map((e,t)=>({property:e,index:t})).sort((e,t)=>{let n=R(e.property)-R(t.property);return n===0?e.index-t.index:n}).map(e=>e.property),et=t=>{let n=M(t),r=getComputedStyle(t),i=Ue(r),a=We(t),o=[],s=new Set,c=e=>{s.has(e.key)||(o.push(e),s.add(e.key))};for(let t of e.v)for(let e of F(n,t))c(Qe(e.definition,e.value,e.isCanonical));for(let t of e.O){let e=Je(n,t.key);e&&c(Qe({key:t.key,label:t.label,longhands:[t.key]},e,!0))}for(let{key:t,label:n,alwaysShow:i}of e.x){let a=r.getPropertyValue(t);if(!i&&(!a||e.z(a)))continue;let o=$e(t,n,a,i);o&&c(o)}let l=r.getPropertyValue(e.w.key);if(l){let t=I(e.w,l,e.P(l));t&&c(t)}for(let t of e.S){let e=r.getPropertyValue(t.key);if(!e)continue;let n=I(t,e);n&&c(n)}return tt(o,e.o(t),i,a)},tt=(e,t,n,r)=>{let i=[],a=[];for(let o of e)if(o.isPrioritized||t.has(o.key))i.push({...o,isPrioritized:!0,isDefault:!1});else{let e=r?Ke(o,n,r):qe(o);a.push({...o,isDefault:e})}return[...z(i),...z(a)]},nt=[{keyword:`letter`,family:`letter-spacing`},{keyword:`tracking`,family:`letter-spacing`},{keyword:`leading`,family:`line-height`},{keyword:`line-height`,family:`line-height`},{keyword:`lineheight`,family:`line-height`},{keyword:`radius`,family:`radius`},{keyword:`rounded`,family:`radius`},{keyword:`corner`,family:`radius`},{keyword:`font-size`,family:`font-size`},{keyword:`fontsize`,family:`font-size`},{keyword:`text`,family:`font-size`},{keyword:`stroke`,family:`border-width`},{keyword:`border-width`,family:`border-width`},{keyword:`borderwidth`,family:`border-width`},{keyword:`space`,family:`spacing`},{keyword:`gap`,family:`spacing`},{keyword:`gutter`,family:`spacing`},{keyword:`inset`,family:`spacing`},{keyword:`padding`,family:`spacing`},{keyword:`margin`,family:`spacing`},{keyword:`size`,family:`size`},{keyword:`width`,family:`size`},{keyword:`height`,family:`size`}],B=e=>{let t=e.toLowerCase();for(let{keyword:e,family:n}of nt)if(t.includes(e))return n;return null},rt=e=>e.includes(`radius`)?`radius`:e.endsWith(`-width`)&&e.includes(`border`)?`border-width`:e===`font-size`?`font-size`:e===`line-height`?`line-height`:e===`letter-spacing`?`letter-spacing`:e.startsWith(`padding`)||e.startsWith(`margin`)||e.endsWith(`gap`)||e===`top`||e===`right`||e===`bottom`||e===`left`||e.startsWith(`inset`)?`spacing`:e===`width`||e===`height`||e.startsWith(`min-`)||e.startsWith(`max-`)?`size`:null,it=t=>{let n=N(t);return!n||n.unit!==`px`?null:e._(n.value)},at=(e,t)=>t===null?!0:e.length===t.length?e<t:e.length<t.length,V=(e,t,n)=>{if(n===1){for(let n of e)if(n>t)return n;return null}for(let n=e.length-1;n>=0;n--)if(e[n]<t)return e[n];return null},H=(e,t,n)=>{let r=(t===1?Math.floor(e/n)+1:Math.ceil(e/n)-1)*n;return r<0?null:r};let U=null;const ot=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),st=()=>{let e=Array.from(document.adoptedStyleSheets??[]),t=document.styleSheets.length;if(U&&U.documentSheetCount===t&&ot(U.adoptedSheets,e))return U.names;let n=new Set;for(let t of[...document.styleSheets,...e]){let e;try{e=t.cssRules}catch{continue}W(e,n)}return U={documentSheetCount:t,adoptedSheets:e,names:n},n},W=(e,t)=>{for(let n of Array.from(e))if(n instanceof CSSStyleRule){let e=n.style;for(let n=0;n<e.length;n++){let r=e.item(n);r.startsWith(`--`)&&t.add(r)}}else n instanceof CSSGroupingRule&&W(n.cssRules,t)},ct={hasTokens:!1,matchColor:()=>null,matchLength:()=>null,stepLength:()=>null},lt=t=>{if(typeof document>`u`)return ct;let n=st();if(n.size===0)return ct;let r=getComputedStyle(t),i=new Map,a=new Map,o=new Map,s=null;for(let t of n){let n=r.getPropertyValue(t).trim();if(!n)continue;let c=it(n);if(c!==null){t===`--spacing`&&c>0&&(s=c);let e=B(t);if(e!==null){let n=a.get(c);n?n.push({name:t,family:e}):a.set(c,[{name:t,family:e}]);let r=o.get(e);r?r.add(c):o.set(e,new Set([c]))}continue}let l=e.R(n);if(l){let e=l.toLowerCase();at(t,i.get(e)??null)&&i.set(e,t)}}if(i.size===0&&a.size===0)return ct;let c=new Map;for(let[e,t]of o)c.set(e,Array.from(t).sort((e,t)=>e-t));return{hasTokens:!0,matchColor:t=>{let n=e.R(t)?.toLowerCase();return n?i.get(n)??null:null},matchLength:(e,t)=>{let n=rt(t);if(n===null)return null;let r=a.get(Math.round(e));if(!r)return null;let i=null;for(let e of r)e.family===n&&at(e.name,i)&&(i=e.name);return i},stepLength:(e,t,n)=>{let r=rt(n);if(r===null)return null;let i=Math.round(e),a=c.get(r);return a&&a.length>=2?V(a,i,t):(r===`spacing`||r===`size`)&&s?H(i,t,s):a?V(a,i,t):null}}},ut=t=>t.kind===`color`||t.kind===`enum`?t.value:t.key===`opacity`&&t.unit===`%`?e.h(t.value/100):`${e.h(t.value)}${t.unit}`,dt=(e,t,n)=>{if(!n?.hasTokens)return null;let{edit:r}=t;return r.kind===`color`?n.matchColor(r.value):r.kind===`numeric`&&r.unit===`px`?n.matchLength(r.value,e):null},ft=e=>{let t=new Map;for(let n of e.edits){let e=ut(n);for(let r of n.cssProperties)t.set(r,{edit:n,cssValue:e})}let n=!1;return{lines:Array.from(t,([t,r])=>{let i=dt(t,r,e.designTokens);i&&(n=!0);let a=i?` /* var(${i}) */`:``;return`${t}: ${r.cssValue};${a}`}),usesToken:n}},pt=e=>e.filePath?`${e.filePath}:${e.lineNumber}`:``,mt=e=>["```css",...e,"```"].join(`
|
|
12
|
+
`),G=e=>{if(e.length===0)return``;let t=e.map(e=>{let{lines:t,usesToken:n}=ft(e);return{header:pt(e),cssLines:t,usesToken:n}}),n=[`Apply these style changes canonically (CSS = visual intent; choose the source change that best expresses the underlying layout intent):`];if(t.some(e=>e.usesToken)&&n.push("Prefer the design token shown in each `/* var(--token) */` comment over the raw value when it matches the project's intent."),t.length===1){let[e]=t;return e.header&&n.push(`\n${e.header}`),n.push(mt(e.cssLines)),n.join(`
|
|
13
|
+
`)}for(let e of t)n.push(e.header?`\n${e.header}`:``),n.push(mt(e.cssLines));return n.join(`
|
|
14
|
+
`)},K=e=>`style`in e&&e.style instanceof CSSStyleDeclaration,ht=e=>{let t=new Map,n=K(e)?e:null;return{apply:(e,r)=>{if(n)for(let i of e)t.has(i)||t.set(i,{value:n.style.getPropertyValue(i),priority:n.style.getPropertyPriority(i)}),n.style.setProperty(i,r)},restore:()=>{if(!n){t.clear();return}for(let[e,{value:r,priority:i}]of t)r?n.style.setProperty(e,r,i):n.style.removeProperty(e);t.clear()},hasAppliedStyles:()=>t.size>0}},gt=(e,t)=>{for(let n of t){let t=e.edits.findIndex(e=>e.key===n.key);t>=0?e.edits[t]=n:e.edits.push(n)}},_t=(e,t)=>({element:e.element,preview:e.preview,filePath:e.filePath??``,lineNumber:e.lineNumber??0,edits:t,designTokens:e.designTokens}),vt=r=>{let[i,a]=e._t(null),[o,s]=e._t(!1),c=[],l=[],u=e=>{l=e},d=()=>{let e=i()!==null;a(null),s(!1),c=[],l=[],e&&r.onClose?.()},f=()=>{i()?.preview.restore();for(let e=c.length-1;e>=0;e--)c[e].preview.restore();d()},p=e=>{n.a(e).then(t=>{t&&a(n=>!n||n.element!==e||n.componentName?n:{...n,componentName:t})})},m=(e,n,o={})=>{if(i()!==null)return!1;let s=et(e);if(s.length===0)return!1;let c=o.filePath??r.store.selectionFilePath??void 0,l=o.lineNumber??r.store.selectionLineNumber??void 0;return a({element:e,position:n,selectionBounds:h(e),properties:s,preview:ht(e),filePath:c,lineNumber:l,componentName:o.componentName,tagName:o.tagName??t.I(e),initialSearchQuery:o.initialSearchQuery,designTokens:lt(e)}),p(e),r.isActivated()||r.activateRenderer(),r.actions.setPointer(n),r.actions.setFrozenElement(e),r.actions.freeze(),r.onOpen?.(),!0},g=(e,o)=>{let s=i();if(!s||s.element===e)return!1;let u=et(e);return u.length===0?!1:((l.length>0||s.preview.hasAppliedStyles())&&c.push(_t(s,l)),l=[],a({element:e,position:o,selectionBounds:h(e),properties:u,preview:ht(e),tagName:t.I(e),hasSessionEdits:c.some(e=>e.edits.length>0),designTokens:lt(e)}),n.c(e).then(t=>{if(t){for(let n of c)n.element===e&&!n.filePath&&(n.filePath=t.filePath,n.lineNumber=t.lineNumber??0);a(n=>!n||n.element!==e||n.filePath?n:{...n,filePath:t.filePath,lineNumber:t.lineNumber??void 0})}}).catch(()=>void 0),p(e),r.actions.setPointer(o),r.actions.setFrozenElement(e),!0)},_=(e,t)=>[...c,_t(e,t)],v=e=>{let t=new Map;for(let n of e){if(n.edits.length===0)continue;let e=t.get(n.element);if(e){!e.filePath&&n.filePath&&(e.filePath=n.filePath,e.lineNumber=n.lineNumber),gt(e,n.edits);continue}t.set(n.element,{filePath:n.filePath,lineNumber:n.lineNumber,edits:[...n.edits],designTokens:n.designTokens})}return Array.from(t.values())},y=e=>{let t=new Set;for(let n of e)n.edits.length>0&&t.add(n.element);for(let n=e.length-1;n>=0;n--){let r=e[n];r.edits.length===0&&!t.has(r.element)&&r.preview.restore()}};return{state:i,trigger:m,switchToElement:g,setPendingEdits:u,dismiss:()=>{i()!==null&&(f(),r.store.wasActivatedByToggle?r.deactivateRenderer():r.actions.unfreeze())},closePreservingRenderer:()=>{i()!==null&&(f(),r.actions.unfreeze())},submit:e=>{let t=i();if(!t)return;let n=t.element,a=_(t,e),o=G(v(a));y(a),d(),r.store.wasActivatedByToggle||r.actions.unfreeze(),r.performCopyWithLabel({element:n,cursorX:t.position.x,extraPrompt:o||void 0,shouldDeactivateAfter:r.store.wasActivatedByToggle})},resetWithDiscard:f,isOpen:()=>i()!==null,isInteracting:o,setInteracting:s}},q={enabled:!0,hue:0,selectionBox:{enabled:!0},dragBox:{enabled:!0},grabbedBoxes:{enabled:!0},elementLabel:{enabled:!0},toolbar:{enabled:!0}},yt=(e,t)=>({enabled:t.enabled??e.enabled,hue:t.hue??e.hue,selectionBox:{enabled:t.selectionBox?.enabled??e.selectionBox.enabled},dragBox:{enabled:t.dragBox?.enabled??e.dragBox.enabled},grabbedBoxes:{enabled:t.grabbedBoxes?.enabled??e.grabbedBoxes.enabled},elementLabel:{enabled:t.elementLabel?.enabled??e.elementLabel.enabled},toolbar:{enabled:t.toolbar?.enabled??e.toolbar.enabled}}),bt={activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,activationKey:void 0,getContent:void 0,maxContextLines:3,freezeReactUpdates:!0},xt=(e={})=>{let t=new Map,n={},[r,i]=l({theme:q,options:{...bt,...e},actions:[]}),a=()=>{let r=q,a={...bt,...e},o=[];for(let{config:e}of t.values())if(e.theme&&(r=yt(r,e.theme)),e.options&&(a={...a,...e.options}),e.actions)for(let t of e.actions)o.push(t);a={...a,...n},i(`theme`,r),i(`options`,a),i(`actions`,o)},o=(e,t)=>{n[e]=t,i(`options`,e,t)},s=[`activationMode`,`keyHoldDuration`,`allowActivationInsideInput`,`activationKey`,`getContent`,`maxContextLines`,`freezeReactUpdates`],c=e=>{for(let t of s)e[t]!==void 0&&o(t,e[t])},u=(e,n)=>{t.has(e.name)&&d(e.name);let r=e.setup?.(n,v)??{};e.theme&&(r.theme=r.theme?yt(yt(q,e.theme),r.theme):e.theme),e.actions&&(r.actions=[...e.actions,...r.actions??[]]),e.hooks&&(r.hooks=r.hooks?{...e.hooks,...r.hooks}:e.hooks),e.options&&(r.options=r.options?{...e.options,...r.options}:e.options),t.set(e.name,{plugin:e,config:r}),a()},d=e=>{let n=t.get(e);n&&(n.config.cleanup&&n.config.cleanup(),t.delete(e),a())},f=()=>Array.from(t.keys()),p=(e,...n)=>{for(let{config:r}of t.values()){let t=r.hooks?.[e];t&&t(...n)}},m=(e,...n)=>{let r=!1;for(let{config:i}of t.values()){let t=i.hooks?.[e];t&&t(...n)===!0&&(r=!0)}return r},h=async(e,...n)=>{for(let{config:r}of t.values()){let t=r.hooks?.[e];t&&await t(...n)}},g=async(e,n,...r)=>{let i=n;for(let{config:n}of t.values()){let t=n.hooks?.[e];t&&(i=await t(i,...r))}return i},_=(e,n,...r)=>{let i=n;for(let{config:n}of t.values()){let t=n.hooks?.[e];t&&(i=t(i,...r))}return i},v={onActivate:()=>p(`onActivate`),onDeactivate:()=>p(`onDeactivate`),onElementHover:e=>p(`onElementHover`,e),onElementSelect:e=>{let n=!1,r;for(let{config:i}of t.values()){let t=i.hooks?.onElementSelect;if(t){let i=t(e);i===!0?n=!0:i instanceof Promise&&(n=!0,r=i)}}return{wasIntercepted:n,pendingResult:r}},onDragStart:(e,t)=>p(`onDragStart`,e,t),onDragEnd:(e,t)=>p(`onDragEnd`,e,t),onBeforeCopy:async e=>h(`onBeforeCopy`,e),transformCopyContent:async(e,t)=>g(`transformCopyContent`,e,t),onAfterCopy:(e,t)=>p(`onAfterCopy`,e,t),onCopySuccess:(e,t)=>p(`onCopySuccess`,e,t),onCopyError:e=>p(`onCopyError`,e),onStateChange:e=>p(`onStateChange`,e),onPromptModeChange:(e,t)=>p(`onPromptModeChange`,e,t),onSelectionBox:(e,t,n)=>p(`onSelectionBox`,e,t,n),onDragBox:(e,t)=>p(`onDragBox`,e,t),onGrabbedBox:(e,t)=>p(`onGrabbedBox`,e,t),onElementLabel:(e,t,n)=>p(`onElementLabel`,e,t,n),onContextMenu:(e,t)=>p(`onContextMenu`,e,t),onOpenFile:(e,t)=>m(`onOpenFile`,e,t),transformHtmlContent:async(e,t)=>g(`transformHtmlContent`,e,t),transformAgentContext:async(e,t)=>g(`transformAgentContext`,e,t),transformActionContext:e=>_(`transformActionContext`,e),transformOpenFileUrl:(e,t,n)=>_(`transformOpenFileUrl`,e,t,n)};return{register:u,unregister:d,getPluginNames:f,setOptions:c,store:r,hooks:v}},St=e=>`${e}-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,Ct=e=>{let t=e.bounds.x+e.bounds.width/2,n=e.bounds.width/2,r=e.mouseX===void 0?void 0:e.mouseX-t;return{id:St(`label`),bounds:e.bounds,boundsMultiple:e.boundsMultiple,tagName:e.tagName,componentName:e.componentName,status:e.status,createdAt:Date.now(),element:e.element,elements:e.elements,mouseX:e.mouseX,mouseXOffsetFromCenter:r,mouseXOffsetRatio:r!==void 0&&n>0?r/n:void 0,hideArrow:e.hideArrow}},wt=(e,n)=>{let r=new Map,i=e=>{let t=r.get(e);t!==void 0&&(window.clearTimeout(t),r.delete(e))},a=()=>{for(let e of r.values())window.clearTimeout(e);r.clear()},o=()=>{a(),e.clearLabelInstances()},s=n=>{i(n);let a=window.setTimeout(()=>{e.updateLabelInstance(n,`fading`);let t=window.setTimeout(()=>{r.delete(n),e.removeLabelInstance(n)},125);r.set(n,t)},t.it);r.set(n,a)};return{createInstance:(t,n,r,i,a)=>{o();let s=Ct({bounds:t,tagName:n,componentName:r,status:i,element:a?.element,mouseX:a?.mouseX,elements:a?.elements,boundsMultiple:a?.boundsMultiple,hideArrow:a?.hideArrow});return e.addLabelInstance(s),s.id},createPerElementInstances:(t,n)=>{o();let r=[];for(let i of t){let t=Ct({bounds:h(i.element),tagName:i.tagName,componentName:i.componentName,status:n,element:i.element,mouseX:i.mouseX});e.addLabelInstance(t),r.push(t.id)}return r},updateAfterCopy:(t,n,r)=>{n?e.updateLabelInstance(t,`copied`):e.updateLabelInstance(t,`error`,r||`Unknown error`),s(t)},cancelAllFades:a,clearAll:o,handleHoverChange:(e,t)=>{if(t){i(e);return}let r=n().find(t=>t.id===e);r&&(r.status===`copied`||r.status===`error`||r.status===`fading`)&&s(e)}}},Tt=e=>{let t=window.innerWidth,n=window.innerHeight,r=Math.max(0,e.x),i=Math.min(t,e.x+e.width),a=Math.max(0,e.y),o=Math.min(n,e.y+e.height);return{x:(r+i)/2,y:(a+o)/2}},Et=(n,r,i)=>{let a=[],o=(e,r)=>{let a=Tt(i(e)),o=t.u(a.x,a.y).filter(n),s=o.indexOf(e);return s===-1?null:o[s+r]??null},s=e=>{let t=o(e,1);return t&&(a.push(e),a.length>50&&(a=a.slice(-50))),t},c=t=>{if(a.length>0){let t=a.pop();if(e.W(t))return t}return o(t,-1)},l=(e,t)=>{let n=e=>t?e.nextElementSibling:e.previousElementSibling,i=n(e);for(;i;){if(r(i))return a=[],i;i=n(i)}return null};return{findNext:(e,t)=>{switch(e){case`ArrowUp`:return s(t);case`ArrowDown`:return c(t);case`ArrowRight`:return l(t,!0);case`ArrowLeft`:return l(t,!1);default:return null}},clearHistory:()=>{a=[]}}},Dt=e=>{let{metaKey:t,ctrlKey:n,shiftKey:r,altKey:i}=Be(e.activationKey);return{metaKey:t,ctrlKey:n,shiftKey:r,altKey:i}},Ot=()=>{let e=new WeakSet,t=Object.getOwnPropertyDescriptor(KeyboardEvent.prototype,`key`),n=!1;if(t?.get&&!t.get.__reactGrabPatched){n=!0;let r=t.get,i=function(){return e.has(this)?``:r.call(this)};i.__reactGrabPatched=!0,Object.defineProperty(KeyboardEvent.prototype,`key`,{get:i,configurable:!0})}return{claimedEvents:e,originalKeyDescriptor:t,restore:()=>{n&&t&&Object.defineProperty(KeyboardEvent.prototype,`key`,t)}}},kt=(e,t)=>({top:t<25,bottom:t>window.innerHeight-25,left:e<25,right:e>window.innerWidth-25}),At=(e,n,r)=>{let i=null,a=()=>{if(!n()){o();return}let s=e(),c=kt(s.x,s.y),l=0,u=0;if(c.top&&(u-=10),c.bottom&&(u+=10),c.left&&(l-=10),c.right&&(l+=10),l!==0||u!==0){let e=window.scrollX,t=window.scrollY;window.scrollBy(l,u);let n=window.scrollX-e,i=window.scrollY-t;(n!==0||i!==0)&&r?.({x:n,y:i})}i=c.top||c.bottom||c.left||c.right?t._(a):null},o=()=>{i!==null&&(t.g(i),i=null)};return{start:a,stop:o,isActive:()=>i!==null}},jt=()=>{let e=globalThis;return!!(e.chrome?.runtime?.id||e.browser?.runtime?.id)},Mt=e=>{try{let t=`0.1.47-dev.c098270`,n=`data:image/svg+xml;base64,${btoa(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 294 294"><path fill="#ff40e0" d="M145 47c25-20 50-27 67-17 16 9 23 30 20 60 0 2-1 5-1 7l-2 13h-1l-12-4c-8-3-17-5-25-6l-17-3c-10-1-20-1-29-1-10 0-20 0-29 1-6 8-11 16-16 24-5 9-9 17-13 26 4 9 8 18 13 26s10 16 16 24l11 14c5 7 11 13 18 19l10 8s-1 0 0 0l-11 9c-17 14-35 22-49 22-6 0-13-2-18-5-16-9-23-30-20-59 1-3 1-5 1-8-30-12-48-29-48-50 0-18 14-35 41-47 2-1 5-2 7-3 0-2 0-5-1-7-3-30 4-51 20-60 18-10 42-3 68 17M71 201c-1 2-1 4-1 5-2 24 3 41 13 47h1c11 7 30 1 51-15-10-9-18-18-26-29-13-1-26-4-38-8m9-38c-3 9-5 17-7 26 8 2 17 4 25 6-3-5-6-10-9-16-3-5-6-10-9-16m-19-53c-2 1-3 1-5 2-21 10-34 23-34 35 0 13 14 27 39 37 3-12 7-25 12-37-5-12-9-24-12-37m37-10c-8 1-17 3-25 6 2 8 4 16 7 25 3-5 6-11 9-16zm-3-61c-4-1-8 0-12 2-10 7-15 24-13 47 0 2 0 3 1 5 12-4 25-6 38-8 8-10 16-20 26-29-15-11-29-17-40-17m111 2c-4-2-8-3-12-2-11 0-25 5-40 17 10 9 19 19 26 29 13 2 26 4 39 8v-5c3-23-2-40-13-47m-61 23c-7 6-13 13-19 19h37c-6-6-12-13-18-19"/><mask id="a"><path fill="#fff" d="m235 85-133 27 28 133 133-27Z"/></mask><path fill="#ff40e0" d="m137 130 76 11c8 1 9 11 3 15l-28 16-4 32c-1 8-10 10-14 4l-41-66c-3-6 1-13 8-12" mask="url(#a)"/></svg>`)}`;console.log(`%cReact Grab${` v${t}`}%c\nhttps://react-grab.com`,`background: #330039; color: #ffffff; border: 1px solid #d75fcb; padding: 4px 4px 4px 24px; border-radius: 4px; background-image: url("${n}"); background-size: 16px 16px; background-repeat: no-repeat; background-position: 4px center; display: inline-block; margin-bottom: 4px;`,``),e&&navigator.onLine&&!jt()&&fetch(`https://www.react-grab.com/api/version?source=browser&v=${t}&t=${Date.now()}`,{referrerPolicy:`origin`,keepalive:!0,priority:`low`,cache:`no-store`}).then(e=>e.text()).then(e=>{e&&e!==t&&console.warn(`[React Grab] v${t} is outdated (latest: v${e}). Run \`npx grab@latest upgrade\` to upgrade.`)}).catch(()=>null)}catch{}},J=e=>typeof e==`object`&&!!e,Nt=e=>{if(!J(e))return null;let t={};return typeof e.enabled==`boolean`&&(t.enabled=e.enabled),(e.activationMode===`toggle`||e.activationMode===`hold`)&&(t.activationMode=e.activationMode),typeof e.keyHoldDuration==`number`&&Number.isFinite(e.keyHoldDuration)&&(t.keyHoldDuration=e.keyHoldDuration),typeof e.allowActivationInsideInput==`boolean`&&(t.allowActivationInsideInput=e.allowActivationInsideInput),typeof e.activationKey==`string`&&(t.activationKey=e.activationKey),typeof e.maxContextLines==`number`&&Number.isFinite(e.maxContextLines)&&(t.maxContextLines=e.maxContextLines),typeof e.freezeReactUpdates==`boolean`&&(t.freezeReactUpdates=e.freezeReactUpdates),typeof e.telemetry==`boolean`&&(t.telemetry=e.telemetry),Object.keys(t).length===0?null:t},Pt=()=>{if(typeof window>`u`)return null;try{let e=(document.currentScript instanceof HTMLScriptElement?document.currentScript:null)?.getAttribute(`data-options`);return e?Nt(JSON.parse(e)):null}catch{return null}},Ft=e=>e===`Enter`||e===`NumpadEnter`,It=(e,t)=>e.x>=t.x&&e.x<=t.x+t.width&&e.y>=t.y&&e.y<=t.y+t.height,Lt=(e=>({name:e.name,setup:(t,n)=>({actions:[typeof e.contextMenuAction==`function`?e.contextMenuAction(t,n):e.contextMenuAction],cleanup:e.cleanup})}))({name:`copy`,contextMenuAction:{id:`copy`,label:`Copy`,shortcut:`C`,showInToolbarMenu:!0,onAction:e=>{e.copy?.()}}}),Rt={name:`comment`,setup:()=>({actions:[{id:`comment`,label:`Comment`,shortcut:`Enter`,shortcutModifier:!1,showInToolbarMenu:!0,onAction:e=>{e.enterPromptMode?.()}}]})},zt={name:`edit`,setup:()=>({actions:[{id:`edit`,label:`Style`,shortcut:`S`,shortcutModifier:!1,showInToolbarMenu:!0,onAction:e=>{e.enterEditMode?.()}}]})},Bt={name:`open`,actions:[{id:`open`,label:`Open`,shortcut:`O`,enabled:e=>!!e.filePath,onAction:e=>{e.filePath&&(e.hooks.onOpenFile(e.filePath,e.lineNumber)||t.s(e.filePath,e.lineNumber,e.hooks.transformOpenFileUrl),e.hideContextMenu(),e.cleanup())}}]},Vt=e=>{let t=e.left+e.width/2,n=e.top+e.height/2,r=n,i=window.innerHeight-n,a=t,o=window.innerWidth-t,s=Math.min(r,i,a,o);return s===r?`top`:s===a?`left`:s===o?`right`:`bottom`},Ht=()=>{let[t,n]=e._t(!1),[r,i]=e._t(null),a=e.t(),o=()=>{let t=r();return e.W(t)?t:null},s=()=>{i(null),a.clear(),n(!1)};return{selectedElement:o,isPendingDismiss:t,select:(e,t)=>{i(e),n(!1),t?.shouldPromptBeforeMouseHandoff?a.arm():a.clear()},clear:s,consumeMouseHandoff:()=>a.consume()&&o()!==null,showDismissPrompt:()=>o()?t()?!1:(n(!0),!0):(s(),!1),takeSelection:t=>{let n=o()??(e.W(t)?t:null);return s(),n}}},Ut=async(e,t={})=>(await Promise.allSettled(e.map(e=>n.n(e,t)))).map(e=>e.status===`fulfilled`?e.value:``),Wt=[Lt,zt,Rt,Bt];let Gt=!1;const Kt=new Set,qt=i=>{if(typeof window>`u`)return D();let a={enabled:!0,activationMode:`toggle`,keyHoldDuration:100,allowActivationInsideInput:!0,...Pt(),...i};if(a.enabled===!1||Gt)return D();Gt=!0,t.Wt(a.container??null),Mt(a.telemetry!==!1);let{enabled:o,telemetry:s,container:c,...l}=a;return e.gt(i=>{let a=!1,o,s=xt(l),{store:c,actions:u,pointer:d,viewportVersion:f,current:p}=v({keyHoldDuration:s.store.options.keyHoldDuration??100}),m=e.pt(()=>p().state===`holding`),_=e.pt(()=>p().state===`active`),y=e.pt(()=>{let e=p();return e.state===`active`&&e.phase===`frozen`}),b=e.pt(()=>{let e=p();return e.state===`active`&&(e.phase===`dragging-select`||e.phase===`dragging-reposition`)}),ne=e.pt(()=>{if(!b())return!1;let e=Math.abs(d().x+window.scrollX-c.dragStart.x),t=Math.abs(d().y+window.scrollY-c.dragStart.y);return e>2||t>2}),re=e.pt(()=>{let e=p();return e.state===`active`&&e.phase===`dragging-reposition`}),ie=e.pt(()=>{let e=p();return e.state===`active`&&e.phase===`justDragged`}),x=e.pt(()=>p().state===`copying`),S=e.pt(()=>c.selectionInteractionLockDepth>0),ae=e.pt(()=>p().state===`justCopied`),C=e.pt(()=>{let e=p();return e.state===`active`&&!!e.isPromptMode}),oe=e.pt(()=>c.pendingCommentMode||C()),se=e.pt(()=>{let e=p();return e.state===`active`&&!!e.isPromptMode&&!!e.isPendingDismiss}),w=(e,t)=>{document.body.style[e]=t};e.ft(e.bt(_,(e,n)=>{e&&!n?(t.r(d().x,d().y),w(`touchAction`,`none`)):!e&&n&&(t.i(),w(`touchAction`,``))}));let ce=e.i(),[T,le]=e._t(ce?!ce.collapsed:!0),[ue,de]=e._t(0),[fe,E]=e._t(0),[D,ge]=e._t(ce),[_e,ve]=e._t(!1),ye=e.r(e=>e.shiftKey),[be,Se]=e._t(null),[Ce,we]=e._t(null),[Te,Ee]=e._t(null),O=vt({store:c,actions:u,isActivated:_,activateRenderer:()=>vn(),deactivateRenderer:()=>X(),performCopyWithLabel:e=>jt(e),onOpen:()=>{Zr(),j?.(),j=Xr(Yr,we)},onClose:()=>{j?.(),j=null,we(null)}}),k=e.pt(()=>c.contextMenuPosition!==null||O.isOpen()),Pe=e.pt(()=>k()||be()!==null),Ie,A=null,j=null,Re=!1,Be=new WeakMap,M=Ht(),Ue=()=>!T()||C()||S()||k()||M.isPendingDismiss(),We=()=>{Be=new WeakMap},Ge=()=>{et(!1),We()},Ke=t=>{let n=D()??e.i(),r={edge:n?.edge??`bottom`,ratio:n?.ratio??.5,collapsed:n?.collapsed??!1,enabled:n?.enabled??!0,defaultAction:n?.defaultAction??`copy`,...t};e.a(r),ge(r);for(let e of Kt)e(r)},qe=()=>{L.timerId!==null&&(clearTimeout(L.timerId),L.timerId=null)},N=()=>{L.copyWaiting=!1,L.holdTimerFired=!1,L.startTimestamp=null};e.ft(()=>{if(p().state!==`holding`){qe();return}L.startTimestamp=Date.now(),L.timerId=window.setTimeout(()=>{if(L.timerId=null,L.copyWaiting){L.holdTimerFired=!0;return}u.activate()},c.keyHoldDuration),e.xt(qe)}),e.ft(()=>{let n=p();if(n.state!==`active`||n.phase!==`justDragged`)return;let r=setTimeout(()=>{u.finishJustDragged()},t.it);e.xt(()=>clearTimeout(r))}),e.ft(()=>{if(p().state!==`justCopied`)return;let n=setTimeout(()=>{u.finishJustCopied()},t.it);e.xt(()=>clearTimeout(n))}),e.ft(e.bt(m,(e,t=!1)=>{!t||e||!_()||(s.store.options.activationMode!==`hold`&&u.setWasActivatedByToggle(!0),s.hooks.onActivate())}));let Je=(e,t,n)=>{Xe(e,t,n),u.clearInputText()},Ye=()=>{let e=c.frozenElement||J();e&&u.enterPromptMode({x:d().x,y:d().y},e)},Xe=(e,t,n)=>{u.setCopyStart({x:t,y:n},e)},P={lastDetectionTimestamp:0,pendingDetectionScheduledAt:0,latestPointerX:0,latestPointerY:0},F=null,[Ze,Qe]=e._t(null),$e=(e,t)=>{F!==null&&clearTimeout(F),Qe(null),F=window.setTimeout(()=>{Qe({x:e,y:t}),F=null},32)},I=null,L={timerId:null,startTimestamp:null,copyWaiting:!1,holdTimerFired:!1},R=null,[z,et]=e._t(!1),tt=0,nt=!1,B=null,rt=()=>{nt=!0,B!==null&&window.clearTimeout(B),B=window.setTimeout(()=>{nt=!1,B=null},t.it)},it=()=>{B!==null&&(window.clearTimeout(B),B=null),nt=!1},at=0,V=null,H=null,[U,ot]=e._t(!1),[st,W]=e._t(null),[ct,lt]=e._t(null),[ut,dt]=te(ct),ft=e.pt(()=>O.isOpen()?t.q:oe()?t.B:U()?st():_()?t.H:null),pt=e=>Fe(e,t.m),mt=Et(t.m,pt,h),G=At(d,()=>b(),e=>{if(re()){if(u.shiftDragStart(e),R){R={x:R.x+e.x,y:R.y+e.y};return}let{pageX:t,pageY:n}=$t(d().x,d().y);R={x:t,y:n}}}),K=e.pt(()=>_()&&!x()),ht=new Map,gt=(e,n)=>{let r=St(`grabbed`),i={id:r,bounds:e,createdAt:Date.now(),element:n};u.addGrabbedBox(i),s.hooks.onGrabbedBox(e,n);let a=window.setTimeout(()=>{ht.delete(r),u.removeGrabbedBox(r)},t.it);ht.set(r,a)},_t=async e=>{let r=await Promise.all(e.map(async e=>{let r=await n.c(e),i=r?.componentName??null,a=r?.filePath,o=r?.lineNumber??void 0,s=r?.columnNumber??void 0;i||=n.r(e);let c=e instanceof HTMLElement?e.innerText?.slice(0,100):void 0;return{tagName:t.I(e),id:e.id||void 0,className:e.getAttribute(`class`)||void 0,textContent:c,componentName:i??void 0,filePath:a,lineNumber:o,columnNumber:s}}));window.dispatchEvent(new CustomEvent(`react-grab:element-selected`,{detail:{elements:r}}))},q=wt(u,()=>c.labelInstances),yt=async(e,t,n)=>{it(),p().state!==`copying`&&u.startCopy();let r=!1,i;try{r=await e(),r||(i=`Failed to copy`)}catch(e){i=he(e,`Action failed`)}if(t)for(let e of t)q.updateAfterCopy(e,r,i);p().state===`copying`&&(r&&u.completeCopy(),n?X():r?(u.activate(),rt()):u.unfreeze())},bt=(e,r,i)=>{let a=e[0],o=i??(a?n.r(a):null),c=a?t.I(a):null,l=o??c??void 0;return xe({getContent:s.store.options.getContent,componentName:l,maxContextLines:s.store.options.maxContextLines},s.hooks,e,r)},Ct=async(e,r,i)=>{if(e.length===0)return!1;let a=[],o=[];for(let t of e){let{wasIntercepted:e,pendingResult:n}=s.hooks.onElementSelect(t);e||a.push(t),n&&o.push(n),s.store.theme.grabbedBoxes.enabled&>(h(t),t)}await t.v();let c=!0;if(a.length>0&&(c=await bt(a,r,i)),o.length>0&&!(await Promise.all(o)).every(Boolean))throw new n.d;return _t(e),c},Tt=e=>{n.a(e.primaryElement).then(async t=>{await yt(()=>Ct(e.targetElements,e.extraPrompt,t??void 0),e.labelInstanceIds.length>0?e.labelInstanceIds:null,e.shouldDeactivateAfter),e.onComplete?.()}).catch(t=>{let n=he(t,`Action failed`);for(let t of e.labelInstanceIds)q.updateAfterCopy(t,!1,n);p().state===`copying`&&u.unfreeze()})},jt=e=>{let{element:n,cursorX:r,selectedElements:i,extraPrompt:a,shouldDeactivateAfter:o,onComplete:s,dragRect:l}=e,d=i??[n],f=l??c.frozenDragRect,p=d.length>1,m=!p&&n===Ut()?Qt():void 0,g=f&&p?Ae(f):m??h(n),_=p?g.x+g.width/2:r,v=t.I(n);it(),u.startCopy();let y=v?q.createInstance(g,v,void 0,`copying`,{element:n,mouseX:_,elements:i}):null;Tt({primaryElement:n,targetElements:d,labelInstanceIds:y?[y]:[],extraPrompt:a,shouldDeactivateAfter:o,onComplete:s})},Mt=e=>{let{elements:t,labelEntries:n,shouldDeactivateAfter:r,onComplete:i}=e,a=t[0];it(),u.startCopy(),Tt({primaryElement:a,targetElements:t,labelInstanceIds:q.createPerElementInstances(n,`copying`),shouldDeactivateAfter:r,onComplete:i})},J=e.pt(()=>{if(f(),!K()||ne()||S()||M.isPendingDismiss())return null;let t=c.detectedElement;return e.W(t)?t:null}),Nt=e.pt(()=>c.frozenElement||(y()?null:J())),Pt=e.pt(()=>!_()||C()||z()||x()||Pe()||M.isPendingDismiss()?null:ye()?y()?Nt():J()??c.frozenElement:M.selectedElement()),Lt=e.pt(()=>{let e=Pt();return e?Ne(e,t.m,pt):[]}),Rt=e.pt(()=>{let e=Pt();return e?Math.max(0,Lt().findIndex(t=>t.element===e)):0}),zt=e.pt(()=>Pt()!==null);e.ft(()=>{let t=c.detectedElement;if(!t)return;let n=setInterval(()=>{e.W(t)||u.setDetectedElement(null)},100);e.xt(()=>clearInterval(n))}),e.ft(e.bt(Nt,e=>{if(V!==null&&(clearTimeout(V),V=null),!e){lt(null);return}V=window.setTimeout(()=>{V=null,lt(e)},100)})),e.xt(()=>{V!==null&&(clearTimeout(V),V=null)}),e.ft(()=>{let n=c.frozenElements;e.xt(t.o(n))}),e.ft(e.bt(_,n=>{n&&s.store.options.freezeReactUpdates&&e.xt(t.t())}));let Bt=()=>{if(c.isTouchMode&&b()){let e=c.detectedElement;return!e||t.h(e)?void 0:e}let e=Nt();if(!(!e||t.h(e)))return e},Ut=e.pt(()=>Bt()),qt=()=>Ut()?c.isTouchMode&&b()?K():K()&&!ne():!1,Jt=e.vt(()=>c.frozenElements,t=>e.pt(()=>(f(),h(t)))),Yt=e.pt(()=>{let e=c.frozenElements;if(e.length===0)return[];let t=c.frozenDragRect;return t&&e.length>1?[Ae(t)]:Jt().map(e=>e())}),Xt=e.pt(()=>{if(!z()||c.pendingCommentMode||U())return null;let n=c.detectedElement;return!e.W(n)||t.h(n)||c.frozenElements.includes(n)?null:n}),Zt=e.pt(()=>{f();let e=Xt();if(e)return h(e)}),Qt=e.pt(()=>{f();let e=c.frozenElements;if(e.length>0){let t=Yt();if(e.length===1){let e=t[0];if(e)return e}let n=c.frozenDragRect;return n?t[0]??Ae(n):Me(He(t))}let t=Ut();if(t)return h(t)}),$t=(e,t)=>({pageX:e+window.scrollX,pageY:t+window.scrollY}),en=(e,t)=>{let{pageX:n,pageY:r}=$t(e,t);return{x:Math.abs(n-c.dragStart.x),y:Math.abs(r-c.dragStart.y)}},tn=e.pt(()=>{if(!b())return!1;let e=en(d().x,d().y);return e.x>2||e.y>2}),nn=(e,t)=>{let{pageX:n,pageY:r}=$t(e,t),i=Math.min(c.dragStart.x,n),a=Math.min(c.dragStart.y,r),o=Math.abs(n-c.dragStart.x),s=Math.abs(r-c.dragStart.y);return{x:i-window.scrollX,y:a-window.scrollY,width:o,height:s}},rn=e=>e.code===`Space`||e.key===` `,an=()=>{if(!b())return;u.startDragReposition();let{pageX:e,pageY:t}=$t(d().x,d().y);R={x:e,y:t}},on=()=>{u.stopDragReposition(),R=null},sn=e.pt(()=>{if(f(),tn())return Me(nn(d().x,d().y))}),cn=e.pt(()=>{if(f(),!tn())return[];let e=Ze();if(!e)return[];let n=nn(e.x,e.y),r=De(n,t.m);return(r.length>0?r:De(n,t.m,!1)).map(e=>h(e))}),ln=e.pt(()=>{let e=cn();if(e.length>0)return e;let t=Zt();return t?[...Yt(),t]:Yt()}),un=e.vt(()=>c.frozenElements,r=>{let i=t.I(r)||`element`,a=n.r(r)??void 0;return e.pt(()=>{if(f(),!e.W(r))return null;let t=h(r),n=Be.get(r);return{tagName:i,componentName:a,bounds:t,mouseX:n===void 0?void 0:t.x+t.width*n}})}),dn=e.pt(()=>{if(C()||c.frozenElements.length<2)return[];let e=[];for(let t of un()){let n=t();n!==null&&e.push(n)}return e}),fn=e.pt(()=>{if(C())return null;let e=Xt();return e?(f(),{tagName:t.I(e)||`element`,componentName:n.r(e)??void 0,bounds:h(e),mouseX:d().x}):null}),pn=e.pt(()=>{if(x()||C()){f();let e=c.frozenElement||J();return e?{x:g(h(e)).x+c.copyOffsetFromCenterX,y:c.copyStart.y}:{x:c.copyStart.x,y:c.copyStart.y}}return{x:d().x,y:d().y}}),mn=e.pt(()=>{if(!z()||c.frozenElements.length!==1)return;f();let t=c.frozenElements[0];if(!e.W(t))return;let n=Be.get(t);if(n===void 0)return;let r=h(t);return r.x+r.width*n});e.ft(e.bt(()=>[J(),c.lastGrabbedElement],([e,t])=>{t&&e&&t!==e&&u.setLastGrabbed(null),e&&s.hooks.onElementHover(e)})),e.ft(e.bt(()=>J(),e=>{let t=++at,r=()=>{at===t&&u.setSelectionSource(null,null)};if(!e){r();return}n.c(e).then(e=>{if(at===t){if(!e){r();return}u.setSelectionSource(e.filePath,e.lineNumber)}}).catch(()=>{at===t&&u.setSelectionSource(null,null)})}));let hn=e.pt(()=>c.grabbedBoxes.map(e=>({id:e.id,bounds:e.bounds,createdAt:e.createdAt}))),gn=e.pt(()=>c.labelInstances.map(e=>({id:e.id,status:e.status,tagName:e.tagName,componentName:e.componentName,createdAt:e.createdAt})));e.ft(e.bt(e.pt(()=>{let e=_(),t=b(),n=x(),r=C(),i=J(),a=sn(),o=s.store.theme.enabled,l=s.store.theme.selectionBox.enabled,u=s.store.theme.dragBox.enabled,d=tn(),f=Nt(),p=ae();return{isActive:e,isDragging:t,isCopying:n,isPromptMode:r,isSelectionBoxVisible:!!(o&&l&&e&&!n&&!p&&!t&&f!=null),isDragBoxVisible:!!(o&&u&&e&&!n&&d),targetElement:i,dragBounds:a?{x:a.x,y:a.y,width:a.width,height:a.height}:null,grabbedBoxes:[...hn()],labelInstances:[...gn()],selectionFilePath:c.selectionFilePath,toolbarState:D()}}),e=>{s.hooks.onStateChange(e)})),e.ft(e.bt(()=>{let t=C();return{inputMode:t,position:t?d():e.wt(d),target:t?J():e.wt(J)}},({inputMode:e,position:t,target:n})=>{s.hooks.onPromptModeChange(e,{x:t.x,y:t.y,targetElement:n})})),e.ft(e.bt(()=>[Dr(),Qt(),J()],([e,t,n])=>{s.hooks.onSelectionBox(!!e,t??null,n)})),e.ft(e.bt(()=>[Pr(),sn()],([e,t])=>{s.hooks.onDragBox(!!e,t??null)})),e.ft(e.bt(()=>{let t=Ir();return[t,Fr(),t?pn():e.wt(pn),t?J():e.wt(J),c.selectionFilePath,c.selectionLineNumber]},([e,n,r,i,a,o])=>{s.hooks.onElementLabel(e,n,{x:r.x,y:r.y,content:``,element:i??void 0,tagName:i&&t.I(i)||void 0,filePath:a??void 0,lineNumber:o??void 0})}));let Y=null,_n=e=>{if(e){if(!Y){Y=document.createElement(`style`),Y.setAttribute(`data-react-grab-cursor`,``);let e=t.F();e&&(Y.nonce=e),t.P(Y),document.head.appendChild(Y)}Y.textContent=`* { cursor: ${e} !important; }`}else Y&&=(Y.remove(),null)};e.ft(e.bt(()=>[_(),x(),C()],([e,t,n])=>{_n(t?`progress`:e&&!n?`crosshair`:null)}));let vn=()=>{let e=m();u.activate(),e||s.hooks.onActivate()},X=()=>{let t=b(),n=c.previouslyFocusedElement;on(),u.deactivate(),O.resetWithDiscard(),Zr(),Ge(),qn(),M.clear(),ot(!1),W(null),t&&w(`userSelect`,``),I&&window.clearTimeout(I),G.stop(),n instanceof HTMLElement&&n!==document.body&&n!==document.activeElement&&e.W(n)&&n.focus({preventScroll:!0}),s.hooks.onDeactivate()},yn=()=>{m()&&u.releaseHold(),_()&&X(),it()},bn=()=>{u.setWasActivatedByToggle(!0),vn()},xn=()=>{let e=[...c.frozenElements],t=c.frozenElement||J(),n=C()?c.inputText.trim():``;if(!t){X();return}let r=e.length>0?e:[t],i=r.map(e=>h(e))[0],{x:a,y:o}=g(i),s=a+c.copyOffsetFromCenterX;u.setPointer({x:a,y:o}),u.exitPromptMode(),u.clearInputText(),jt({element:t,cursorX:s,selectedElements:r,extraPrompt:n||void 0,shouldDeactivateAfter:!0})},Sn=()=>{if(C()){if(se()){u.clearInputText(),X();return}u.setPendingDismiss(!0),E(e=>e+1)}},Cn=()=>{if(M.isPendingDismiss()){Xn();return}u.clearInputText(),X()},wn=()=>{u.setPendingDismiss(!1)},Tn=()=>{if(O.isOpen()){O.dismiss();return}let e=c.frozenElement||J();e&&En(e,{x:d().x,y:d().y})},En=(e,t,n={})=>O.trigger(e,t,n),Dn=(e,n)=>{if(!O.isOpen()||c.contextMenuPosition!==null)return!1;let r=t.u(e,n).find(t.m);if(!r)return!1;let i=O.switchToElement(r,{x:e,y:n});return i&&t.a([r]),i},On=e=>({filePath:c.selectionFilePath??void 0,lineNumber:c.selectionLineNumber??void 0,componentName:ut(),tagName:t.I(e)||void 0}),Z=()=>{H=null,ot(!1),u.setPendingCommentMode(!1),W(null)},kn=e=>{let n=c.frozenElement||J();if(!n)return!1;let r={x:d().x,y:d().y},i=s.store.actions.find(t=>t.id===e);return i?e===`edit`?En(n,r,On(n))?(u.clearInputText(),u.exitPromptMode(),Z(),!0):!0:(u.clearInputText(),u.exitPromptMode(),Z(),i.onAction(nr(n,r)),!0):(u.clearInputText(),u.exitPromptMode(),Z(),ei(t.H),Nn(n,r),!0)},An=e=>{if(_()){if(ft()!==e&&C()&&kn(e))return;if(ft()!==e&&c.pendingCommentMode){u.setPendingCommentMode(!1),H=e,W(e),ot(!0);return}if(ft()!==e&&U()){H=e,W(e);return}X();return}T()&&(H=e,W(e),ot(!0),bn())},jn=()=>{An(D()?.defaultAction??`copy`)},Mn=(e,t,n)=>{Z(),u.clearInputText(),u.enterPromptMode({x:t,y:n},e)},Nn=(e,t)=>{Ge(),Qr(),u.showContextMenu(t,e),qn(),s.hooks.onContextMenu(e,t)},Pn=(e,n)=>{let r=H;if(H=null,W(null),!r)return;if(r===`edit`){En(e,n,On(e));return}let i=s.store.actions.find(e=>e.id===r);if(!i){ei(t.H),Nn(e,n);return}i.onAction(nr(e,n))},Fn=()=>{if(T()){if(_()&&oe()){X();return}u.setPendingCommentMode(!0),_()||bn()}},In=(e,n,r)=>{let i=r&&z()&&!b()&&!c.pendingCommentMode&&!U();if(Ue()||y()&&!i)return;if(u.setPointer({x:e,y:n}),P.latestPointerX=e,P.latestPointerY=n,i){let r=t.l(e,n);r!==c.detectedElement&&u.setDetectedElement(r);return}let a=performance.now(),o=P.pendingDetectionScheduledAt>0&&a-P.pendingDetectionScheduledAt<200;if(a-P.lastDetectionTimestamp>=32&&!o&&(P.lastDetectionTimestamp=a,P.pendingDetectionScheduledAt=a,setTimeout(()=>{if(Ue()){P.pendingDetectionScheduledAt=0;return}let e=t.l(P.latestPointerX,P.latestPointerY);e!==c.detectedElement&&u.setDetectedElement(e),P.pendingDetectionScheduledAt=0})),b()){if(re()){let{pageX:t,pageY:r}=$t(e,n);R&&u.shiftDragStart({x:t-R.x,y:r-R.y}),R={x:t,y:r}}$e(e,n);let t=kt(e,n),r=t.top||t.bottom||t.left||t.right;r&&!G.isActive()?G.start():!r&&G.isActive()&&G.stop()}},Ln=(e,t,n)=>{if(!K()||S())return!1;!n&&z()&&Ge();let r=M.selectedElement()!==null;return u.startDrag({x:e,y:t},n||r),u.setPointer({x:e,y:t}),w(`userSelect`,`none`),$e(e,t),s.hooks.onDragStart(e+window.scrollX,t+window.scrollY),!0},Rn=(e,r)=>{let i=c.frozenElements.includes(e),a=c.frozenElements.length===0;if(!i){let t=Oe(h(e),r);Be.set(e,t),a&&dt(n.r(e)??void 0)}u.toggleFrozenElement(e),t.c();let o=c.frozenElements.includes(e);if(o||Be.delete(e),c.frozenElements.length===0){Ge(),u.unfreeze();return}t.a(c.frozenElements),et(!0),u.setPointer(r),u.setLastGrabbed(o?e:c.frozenElements[c.frozenElements.length-1]),u.freeze(),qn()},zn=()=>{let r=c.frozenElements.filter(e.W),i=r.map(e=>{let r=t.I(e)||`element`,i=n.r(e)??void 0,a=Be.get(e),o=h(e);return{element:e,tagName:r,componentName:i,mouseX:a===void 0?o.x+o.width/2:o.x+o.width*a}});if(Ge(),r.length===0){u.unfreeze();return}if(r.length===1){jt({element:r[0],cursorX:i[0].mouseX,selectedElements:r,shouldDeactivateAfter:c.wasActivatedByToggle});return}Mt({elements:r,labelEntries:i,shouldDeactivateAfter:c.wasActivatedByToggle})},Bn=(e,n,r)=>{let i=De(e,t.m),a=i.length>0?i:De(e,t.m,!1);if(a.length===0)return;let o=r&&!c.pendingCommentMode&&!U();if(o&&u.addFrozenElements(a),t.a(o?c.frozenElements:a),s.hooks.onDragEnd(a,e),o){let e=a[a.length-1];et(!0),t.c(),u.setPointer(g(h(e))),u.setLastGrabbed(e),u.freeze(),qn();return}let l=a[0],d=g(h(l));u.setPointer(d),u.setFrozenElements(a);let f=je(e);if(u.setFrozenDragRect(f),u.freeze(),u.setLastGrabbed(l),c.pendingCommentMode){Mn(l,d.x,d.y);return}if(U()){ot(!1),H?Pn(l,d):Nn(l,d);return}let p=c.wasActivatedByToggle&&!n;jt({element:l,cursorX:d.x,selectedElements:a,shouldDeactivateAfter:p,dragRect:f})},Vn=t=>{for(let n of c.frozenElements)if(e.W(n)&&It(t,h(n)))return n;return null},Hn=(n,r,i,a)=>{let o=e.W(c.frozenElement)?c.frozenElement:null,l=M.selectedElement(),f=()=>t.u(n,r).find(t.m)??null;if(a&&!c.pendingCommentMode&&!U()){let e=f();e!==null&&Rn(e,{x:n,y:r});return}let p=f()??(e.W(c.detectedElement)?c.detectedElement:null),m=l??p??o;if(!m)return;let _,v,y=p===null&&o===m,b=l===m;if(y)_=d().x,v=d().y;else if(b){let e=g(h(m));_=e.x,v=e.y}else _=n,v=r;if(c.pendingCommentMode){Mn(m,_,v),M.clear();return}if(U()){ot(!1);let{wasIntercepted:e}=s.hooks.onElementSelect(m);if(e)return;M.clear(),t.a([m]),u.setFrozenElement(m);let n={x:_,y:v};u.setPointer(n),u.freeze(),H?Pn(m,n):Nn(m,n);return}let ee=c.wasActivatedByToggle&&!i;u.setLastGrabbed(m),jt({element:m,cursorX:_,shouldDeactivateAfter:ee}),M.clear()},Un=()=>{b()&&(on(),u.cancelDrag(),G.stop(),w(`userSelect`,``))},Wn=(e,t,n,r)=>{if(!b())return;F!==null&&(clearTimeout(F),F=null),Qe(null);let i=en(e,t),a=i.x>2||i.y>2,o=a?nn(e,t):null;a?u.endDrag():u.cancelDrag(),on(),G.stop(),w(`userSelect`,``),o?Bn(o,n,r):Hn(e,t,n,r)},Q=me(),Gn=Ot(),Kn=t=>{let n;try{n=Gn.originalKeyDescriptor?.get?Gn.originalKeyDescriptor.get.call(t):t.key}catch{return!1}let r=n===`Enter`||Ft(t.code),i=_()||m();return r&&i&&!C()&&!M.isPendingDismiss()&&!c.wasActivatedByToggle?e.F(t,`data-react-grab-input`)?!1:(Gn.claimedEvents.add(t),t.preventDefault(),t.stopImmediatePropagation(),!0):!1};Q.addDocumentListener(`keydown`,t.Ht(Kn),{capture:!0}),Q.addDocumentListener(`keyup`,t.Ht(Kn),{capture:!0}),Q.addDocumentListener(`keypress`,t.Ht(Kn),{capture:!0});let qn=()=>{mt.clearHistory(),M.clear()},Jn=(e,t=!1)=>{u.setFrozenElement(e),u.freeze(),M.select(e,{shouldPromptBeforeMouseHandoff:t});let n=g(h(e));u.setPointer(n),c.contextMenuPosition!==null&&u.showContextMenu(n,e)},Yn=()=>{M.showDismissPrompt()&&E(e=>e+1)},Xn=()=>{M.clear(),u.unfreeze(),qn()},Zn=()=>{let e=M.takeSelection(c.frozenElement);if(!e){Xn();return}let t=g(h(e));qn(),u.setLastGrabbed(e),jt({element:e,cursorX:t.x,shouldDeactivateAfter:c.wasActivatedByToggle})},Qn=e=>t.L.has(e.key)?e.key:e.key===`Tab`?e.shiftKey?`ArrowLeft`:`ArrowRight`:null,$n=(e,n={})=>{if(!_()||C()||z()||M.isPendingDismiss()&&!n.allowPendingKeyboardSelection)return!1;let r=Qn(e);if(!r||Pe())return!1;let i=Nt(),a=!i;if(!i){let e=t.Vt()?.getBoundingClientRect();i=e?t.l(e.left+e.width/2,e.top+e.height/2):t.l(window.innerWidth/2,window.innerHeight/2)}if(!i)return!1;let o=r===`ArrowUp`||r===`ArrowDown`,s=mt.findNext(r,i);if(!s&&!o&&!a)return!1;let c=s??i;return e.preventDefault(),e.stopPropagation(),Jn(c,!0),!0},er=t=>t.metaKey||t.ctrlKey||t.altKey||t.repeat||e.U(t)||!_()||x()||S()||Pe()?null:c.frozenElement||J(),tr=t=>{let n=er(t);if(!n)return null;let r=e.n(s.store.actions,t);return r?{element:n,action:r}:null},nr=(e,n)=>{let r=h(e);return Gr({element:e,filePath:c.selectionFilePath??void 0,lineNumber:c.selectionLineNumber??void 0,tagName:t.I(e)||void 0,componentName:ut(),position:n,shouldDeferHideContextMenu:!1,performWithFeedbackOptions:{fallbackBounds:r,fallbackSelectionBounds:[r],position:n}})},rr=/^[a-zA-Z0-9-]$/,ir=e=>{if(!e.key||e.key.length!==1||!rr.test(e.key))return!1;let t=er(e);return!t||!O.trigger(t,{x:d().x,y:d().y},{initialSearchQuery:e.key})?!1:(Z(),e.preventDefault(),e.stopImmediatePropagation(),!0)},ar=e=>{let t=tr(e);if(!t)return!1;let{element:n,action:r}=t;if(C())return kn(r.id)?(e.preventDefault(),e.stopImmediatePropagation(),!0):!1;let i={x:d().x,y:d().y};return r.onAction(nr(n,i)),e.preventDefault(),e.stopImmediatePropagation(),!0},or=e=>{if(e.key?.toLowerCase()!==`o`||!_()||!(e.metaKey||e.ctrlKey))return!1;let n=c.selectionFilePath,r=c.selectionLineNumber;return n?(e.preventDefault(),e.stopPropagation(),s.hooks.onOpenFile(n,r??void 0)||t.s(n,r??void 0,s.hooks.transformOpenFileUrl),!0):!1},sr=e=>{if(!_()||x()||c.contextMenuPosition!==null||O.isOpen())return!1;let n=e.key===`F10`&&e.shiftKey,r=e.key===`ContextMenu`;if(!n&&!r)return!1;let i=c.frozenElements,a=i.length>1,o=(a?i[0]:null)||c.frozenElement||J();if(!o)return!1;e.preventDefault(),e.stopPropagation();let s=g(h(o));return a?t.a(i):(t.a([o]),u.setFrozenElement(o)),u.setPointer(s),u.freeze(),Nn(o,s),!0},cr=e.pt(()=>Lt().map(e=>({tagName:t.I(e.element)||`element`,componentName:n.r(e.element)??void 0,depth:e.depth,isLast:e.isLast}))),lr=e.pt(()=>({items:cr(),activeIndex:Rt()})),ur=n=>{if(!(!s.store.options.allowActivationInsideInput&&e.U(n))&&!(!Ve(n,s.store.options)&&((n.metaKey||n.ctrlKey)&&!t.ft.includes(n.key)&&!Ft(n.code)&&(_()&&!c.wasActivatedByToggle?X():m()&&(qe(),N(),u.releaseHold())),!Ft(n.code)||!m()))){if((_()||m())&&!C()&&(n.preventDefault(),Ft(n.code)&&n.stopImmediatePropagation()),_()){if(c.wasActivatedByToggle&&s.store.options.activationMode!==`hold`||n.repeat)return;I!==null&&window.clearTimeout(I),I=window.setTimeout(()=>{X()},200);return}if(m()&&n.repeat){if(L.copyWaiting){let e=L.holdTimerFired;N(),e&&u.activate()}return}if(!(x()||ae())&&!m()){let t=s.store.options.keyHoldDuration??100;e.U(n)?e.V(n)?t+=600:t+=400:e.H()&&(t+=600),N(),u.startHold(t)}}},dr=e=>{if(!M.isPendingDismiss())return!1;if(Ft(e.code))return!0;let n=t.L.has(e.key),r=tr(e)!==null;return!n&&!r?!1:n?$n(e,{allowPendingKeyboardSelection:!0}):ar(e)?(qn(),!0):!1};Q.addWindowListener(`keydown`,t.Ht(n=>{if(Qn(n)&&e.U(n)||dr(n))return;if(Kn(n),!T()){Ve(n,s.store.options)&&!n.repeat&&de(e=>e+1);return}let r=Ft(n.code)&&m()&&!C(),i=e.F(n,t.Ot);if(C()&&Ve(n,s.store.options)&&!n.repeat&&!i){n.preventDefault(),n.stopPropagation(),Sn();return}if(n.key===`Escape`&&Pe()){be()!==null&&Zr();return}let a=e.F(n,`data-react-grab-ignore-events`)&&!r;if(C()||a)return C()&&!i&&ar(n)||(n.key===`Escape`&&(C()?Sn():c.wasActivatedByToggle&&X()),a&&t.L.has(n.key)&&$n(n)),void 0;if(b()&&rn(n)){n.repeat||an(),n.preventDefault(),n.stopPropagation();return}if(n.key===`Escape`&&(m()||c.wasActivatedByToggle)){X();return}_()&&!t.ft.includes(n.key)&&n.preventDefault();let o=Date.now()-tt<200;$n(n)||or(n)||sr(n)||ar(n)||ir(n)||o||ur(n)}),{capture:!0}),Q.addWindowListener(`keyup`,t.Ht(t=>{if(Kn(t))return;if(rn(t)&&re()&&(on(),t.preventDefault(),t.stopPropagation()),t.key===`Shift`&&z()){b()&&Un(),zn();return}if(e.F(t,`data-react-grab-ignore-events`))return;let n=Dt(s.store.options),r=n.metaKey||n.ctrlKey?e.I()?!t.metaKey:!t.ctrlKey:n.shiftKey&&!t.shiftKey||n.altKey&&!t.altKey,i=s.store.options.activationKey?typeof s.store.options.activationKey==`function`?s.store.options.activationKey(t):ze(s.store.options.activationKey)(t):Le(t.key,t.code);if(ae()||nt){(i||r)&&(it(),X());return}if(!m()&&!_()||C())return;let a=!!s.store.options.activationKey,o=s.store.options.activationMode===`hold`,l=b();if(_()){let e=k();if(r){if(c.wasActivatedByToggle&&s.store.options.activationMode!==`hold`||e)return;X()}else if(o&&i){if(I!==null&&(window.clearTimeout(I),I=null),e||l)return;X()}else !a&&i&&I!==null&&(window.clearTimeout(I),I=null);return}if(i||r){if(c.wasActivatedByToggle&&s.store.options.activationMode!==`hold`)return;if(m()||L.holdTimerFired&&r){qe();let n=(L.startTimestamp?Date.now()-L.startTimestamp:0)>=200,r=L.holdTimerFired&&n&&(s.store.options.allowActivationInsideInput||!e.U(t));N(),r?u.activate():u.releaseHold()}else X()}}),{capture:!0}),Q.addDocumentListener(`copy`,()=>{m()&&(L.copyWaiting=!0)}),Q.addWindowListener(`keypress`,t.Ht(Kn),{capture:!0}),Q.addWindowListener(`pointermove`,t.Ht(t=>{if(!t.isPrimary)return;let n=t.pointerType===`touch`;if(u.setTouchMode(n),!e.F(t,`data-react-grab-ignore-events`)&&!Ue()&&!(n&&!m()&&!_())){if((n?m():_())&&!C()&&y()&&!t.shiftKey&&!z()){if(M.consumeMouseHandoff()){Yn();return}u.unfreeze(),qn()}In(t.clientX,t.clientY,t.shiftKey)}}),{passive:!0}),Q.addWindowListener(`pointerdown`,t.Ht(t=>{if(t.button===0&&t.isPrimary&&(u.setTouchMode(t.pointerType===`touch`),Re=!1,!e.F(t,`data-react-grab-ignore-events`))){if(k()){Dn(t.clientX,t.clientY)&&(Re=!0,t.preventDefault(),t.stopImmediatePropagation());return}if(C()){let e=Qt();e&&t.clientX>=e.x&&t.clientX<=e.x+e.width&&t.clientY>=e.y&&t.clientY<=e.y+e.height?xn():Sn();return}if(M.isPendingDismiss()){t.preventDefault(),t.stopImmediatePropagation();return}if(S()){t.preventDefault(),t.stopImmediatePropagation();return}Ln(t.clientX,t.clientY,t.shiftKey)&&(t.pointerId!==void 0&&document.documentElement.setPointerCapture(t.pointerId),t.preventDefault(),t.stopImmediatePropagation())}}),{capture:!0}),Q.addWindowListener(`pointerup`,t.Ht(t=>{if(t.button!==0||!t.isPrimary||e.F(t,`data-react-grab-ignore-events`)||k())return;let n=K()||S()||b(),r=t.metaKey||t.ctrlKey;Wn(t.clientX,t.clientY,r,t.shiftKey),n&&(t.preventDefault(),t.stopImmediatePropagation())}),{capture:!0}),Q.addWindowListener(`contextmenu`,t.Ht(n=>{if(!K()||x()||C()||O.isOpen())return;let r=e.F(n,`data-react-grab-ignore-events`),i={x:n.clientX,y:n.clientY},a=r&&c.frozenElements.length>1?Vn(i):null,o=M.isPendingDismiss();if(r&&!a&&!o&&!zt())return;if(k()){n.preventDefault();return}n.preventDefault(),n.stopPropagation();let s=a??t.l(n.clientX,n.clientY);if(!s)return;let l=c.frozenElements;l.length>1&&l.includes(s)?t.a(l):(t.a([s]),u.setFrozenElement(s)),u.setPointer(i),u.freeze(),Nn(s,i)}),{capture:!0}),Q.addWindowListener(`pointercancel`,t.Ht(e=>{e.isPrimary&&Un()})),Q.addWindowListener(`click`,t.Ht(t=>{if(!e.F(t,`data-react-grab-ignore-events`)){if(Re){Re=!1,t.preventDefault(),t.stopImmediatePropagation();return}k()||(K()||ie())&&(t.preventDefault(),t.stopImmediatePropagation(),c.wasActivatedByToggle&&!C()&&!t.shiftKey&&(m()?u.setWasActivatedByToggle(!1):X()))}}),{capture:!0}),Q.addDocumentListener(`visibilitychange`,()=>{if(document.hidden){u.clearGrabbedBoxes();let e=c.activationTimestamp;_()&&!C()&&e!==null&&Date.now()-e>500&&X()}}),Q.addWindowListener(`blur`,()=>{Un(),m()&&(qe(),u.releaseHold(),N()),Ge()}),Q.addWindowListener(`focus`,()=>{tt=Date.now()}),Q.addWindowListener(`focusin`,n=>{e.F(n,t.Bt)&&n.stopPropagation()},{capture:!0});let fr=()=>{if(!(c.isTouchMode&&!m()&&!_())&&!Ue()&&!y()&&!b()&&c.frozenElements.length===0){let e=t.l(d().x,d().y);u.setDetectedElement(e)}},pr=null,$=null,mr=()=>{ke(),fr(),u.incrementViewportVersion(),u.updateContextMenuPosition()};Q.addWindowListener(`scroll`,mr,{capture:!0});let hr=window.innerWidth,gr=window.innerHeight;Q.addWindowListener(`resize`,()=>{let e=window.innerWidth,n=window.innerHeight;if(hr>0&&gr>0){let r=e/hr,i=n/gr,a=Math.abs(r-i)<t.Lt,o=Math.abs(r-1)>t.Lt;a&&o&&u.setPointer({x:d().x*r,y:d().y*i})}hr=e,gr=n,mr()});let _r=window.visualViewport;if(_r){let{signal:e}=Q;_r.addEventListener(`resize`,mr,{signal:e}),_r.addEventListener(`scroll`,mr,{signal:e})}let vr=()=>{$===null&&($=t._(()=>{$=null,u.incrementViewportVersion()}))};e.ft(()=>{if(s.store.theme.enabled&&(_()||x()||c.labelInstances.length>0||c.grabbedBoxes.length>0)){if(pr!==null)return;pr=window.setInterval(()=>{vr()},100);return}pr!==null&&(window.clearInterval(pr),pr=null),$!==null&&(t.g($),$=null)}),e.xt(()=>{pr!==null&&window.clearInterval(pr),$!==null&&t.g($)}),Q.addDocumentListener(`copy`,t.Ht(t=>{C()||e.F(t,`data-react-grab-ignore-events`)||K()&&t.preventDefault()}),{capture:!0}),e.xt(()=>{Q.abort(),F!==null&&window.clearTimeout(F),I&&window.clearTimeout(I),it(),A?.(),A=null,j?.(),j=null,ht.forEach(e=>window.clearTimeout(e)),ht.clear(),q.cancelAllFades(),G.stop(),w(`userSelect`,``),w(`touchAction`,``),_n(null),Gn.restore(),t.Wt(null)});let{root:yr,host:br}=ee(r);e.xt(pe(br).cleanup);let xr=e.pt(()=>s.store.theme.enabled),Sr=e.pt(()=>s.store.theme.selectionBox.enabled),Cr=e.pt(()=>s.store.theme.elementLabel.enabled),wr=e.pt(()=>s.store.theme.dragBox.enabled),Tr=e.pt(()=>ae()||_e()&&!y()||O.isInteracting()),Er=e.pt(()=>cn().length>0),Dr=e.pt(()=>!xr()||!Sr()||Tr()?!1:Er()?!0:qt()),Or=e.pt(()=>{let e=Ut();if(e)return t.I(e)||void 0}),kr=e.pt(()=>!xr()||k()||!Cr()||Tr()?!1:qt()),Ar=new Map,jr=t=>{let n=t.elements?.filter(e.W)??[],r=t.element,i=null;n.length>0?i=n.map(h):r&&e.W(r)&&(i=[h(r)]);let a=t.bounds,o=t.boundsMultiple;i&&(a=i.length>1?Me(He(i)):i[0],t.boundsMultiple!==void 0&&(o=t.boundsMultiple.length>1&&t.boundsMultiple.length===t.elements?.length?i:[a]));let s=Ar.get(t.id),c=s?.boundsMultiple,l=c===o||c!==void 0&&o!==void 0&&c.length===o.length&&c.every((e,t)=>e.x===o[t].x&&e.y===o[t].y&&e.width===o[t].width&&e.height===o[t].height);if(s&&s.status===t.status&&s.errorMessage===t.errorMessage&&s.bounds.x===a.x&&s.bounds.y===a.y&&s.bounds.width===a.width&&s.bounds.height===a.height&&l)return s;let u=a.x+a.width/2,d=a.width/2,f;f=t.mouseXOffsetRatio!==void 0&&d>0?u+t.mouseXOffsetRatio*d:t.mouseXOffsetFromCenter===void 0?t.mouseX??u:u+t.mouseXOffsetFromCenter;let p={...t,bounds:a,boundsMultiple:o,mouseX:f};return Ar.set(t.id,p),p},Mr=e.pt(()=>{if(!xr()||!s.store.theme.grabbedBoxes.enabled)return[];f();let e=new Set(c.labelInstances.map(e=>e.id));for(let t of Ar.keys())e.has(t)||Ar.delete(t);return c.labelInstances.map(jr)}),Nr=e.pt(()=>!xr()||!s.store.theme.grabbedBoxes.enabled?[]:(f(),c.grabbedBoxes.map(e=>!e.element||!document.body.contains(e.element)?e:{...e,bounds:h(e.element)}))),Pr=e.pt(()=>xr()&&wr()&&K()&&tn()),Fr=e.pt(()=>x()?`processing`:`hover`),Ir=e.pt(()=>{if(!xr())return!1;let e=Cr(),t=C(),n=x(),r=K(),i=b(),a=!!Nt(),o=_e(),s=y();return!e||t||o&&!s?!1:n?!0:r&&!i&&a}),Lr=e.pt(()=>{f();let e=c.contextMenuElement;return e?h(e):null}),Rr=e.pt(()=>(f(),c.contextMenuPosition)),zr=e.pt(()=>{let e=c.contextMenuElement;if(!e)return;let n=c.frozenElements.length;return n>1?`${n} elements`:t.I(e)||void 0}),[Br]=te(()=>c.frozenElements.length>1?null:c.contextMenuElement),[Vr]=e.ht(()=>c.contextMenuElement,async e=>e?n.c(e):null),Hr=async e=>{u.incrementSelectionInteractionLockDepth();try{return await e()}finally{u.decrementSelectionInteractionLockDepth()}},Ur=(e,t,n,r,i)=>async a=>{await Hr(async()=>{let o=i?.fallbackBounds??null,s=i?.fallbackSelectionBounds??[],l=i?.position??c.contextMenuPosition??d(),f=Yt(),p=Lr()??o,m=t.length>1,h=m?Me(He(f)):p,g=c.wasActivatedByToggle,_;if(_=m?f:p?[p]:s,u.hideContextMenu(),h){let i=m?h.x+h.width/2:l.x,o=q.createInstance(h,n||`element`,r,`copying`,{element:e,mouseX:i,elements:m?t:void 0,boundsMultiple:_}),s=!1,c;try{s=await a(),s||(c=`Failed to copy`)}catch(e){c=he(e,`Action failed`)}q.updateAfterCopy(o,s,c)}else try{await a()}catch{}g?X():u.unfreeze()})},Wr=()=>{setTimeout(()=>{u.hideContextMenu()},0)},Gr=e=>{let{element:t,filePath:n,lineNumber:r,tagName:i,componentName:a,position:o,performWithFeedbackOptions:l,shouldDeferHideContextMenu:d,onBeforeCopy:f,onBeforePrompt:p,customEnterPromptMode:m}=e,h=c.frozenElements.length>0?c.frozenElements:[t],g=d?Wr:u.hideContextMenu,v={element:t,elements:h,filePath:n,lineNumber:r,componentName:a,tagName:i,enterPromptMode:m??(()=>{q.clearAll(),Z(),p?.(),Je(t,o.x,o.y),u.setPointer({x:o.x,y:o.y}),u.setFrozenElement(t),Ye(),_()||vn(),g()}),enterEditMode:()=>{En(t,o,{filePath:n,lineNumber:r,componentName:a,tagName:i})&&Z(),g()},copy:()=>{Z(),f?.(),jt({element:t,cursorX:o.x,selectedElements:h.length>1?h:void 0,shouldDeactivateAfter:c.wasActivatedByToggle}),g()},hooks:{transformHtmlContent:s.hooks.transformHtmlContent,onOpenFile:s.hooks.onOpenFile,transformOpenFileUrl:s.hooks.transformOpenFileUrl},performWithFeedback:Ur(t,h,i,a,l),hideContextMenu:g,cleanup:()=>{c.wasActivatedByToggle?X():u.unfreeze()}},y=s.hooks.transformActionContext(v);return{...v,...y}},Kr=e.pt(()=>{let e=c.contextMenuElement;if(!e)return;let t=Vr(),n=c.contextMenuPosition??d();return Gr({element:e,filePath:t?.filePath,lineNumber:t?.lineNumber??void 0,tagName:zr(),componentName:Br(),position:n,shouldDeferHideContextMenu:!0,onBeforeCopy:()=>{M.clear()},customEnterPromptMode:()=>{q.clearAll(),Z(),u.clearInputText(),u.enterPromptMode(n,e),Wr()}})}),qr=()=>{setTimeout(()=>{u.hideContextMenu(),X()},0)},Jr=()=>{if(!Ie)return null;let e=Ie.getBoundingClientRect(),t=Vt(e);return t===`left`||t===`right`?{x:t===`left`?e.right:e.left,y:e.top+e.height/2,edge:t}:{x:e.left+e.width/2,y:t===`top`?e.bottom:e.top,edge:t}},Yr=()=>{let e=Jr();if(e)return e;let t=O.state();return t?{x:t.position.x,y:t.position.y,edge:`bottom`}:null},Xr=(e,n)=>{let r=null,i=()=>{let a=e();a&&n(a),r=t._(i)};return i(),()=>{r!==null&&(t.g(r),r=null)}};e.ft(()=>{if(!zt())return;let t=Xr(Jr,Ee);e.xt(()=>{t(),Ee(null)})});let Zr=()=>{A?.(),A=null,Se(null)},Qr=()=>{u.hideContextMenu(),Zr(),O.dismiss()},$r=()=>{be()===null?(u.hideContextMenu(),O.isOpen()&&O.closePreservingRenderer(),A?.(),A=Xr(Jr,Se)):Zr()},ei=e=>{Ke({defaultAction:e})},ti=t=>{let n=c.labelInstances.find(e=>e.id===t);if(!n?.element||!e.W(n.element))return;let r=n.element,i=g(h(r)),a={x:n.mouseX??i.x,y:i.y},o=n.elements&&n.elements.length>0?n.elements.filter(t=>e.W(t)):[r];setTimeout(()=>{Zr(),O.isOpen()&&O.closePreservingRenderer(),_()||(u.setWasActivatedByToggle(!0),vn()),u.setPointer(a),u.setFrozenElements(o),o.length>1&&n.bounds&&u.setFrozenDragRect(je(n.bounds)),u.freeze(),u.showContextMenu(a,r)},0)};e.ft(()=>{let e=s.store.theme.hue;e===0?yr.style.filter=``:yr.style.filter=`hue-rotate(${e}deg)`}),s.store.theme.enabled&&Promise.resolve().then(()=>require(`./renderer-CrnYlO_u.cjs`)).then(({ReactGrabRenderer:t})=>{a||(o=e.Z(()=>e.ut(t,{get selectionVisible(){return Dr()},get selectionBounds(){return Qt()},get selectionBoundsMultiple(){return ln()},get selectionShouldSnap(){return c.frozenElements.length>0||cn().length>0},get selectionElementsCount(){return c.frozenElements.length},get frozenLabelEntries(){return dn()},get pendingShiftPreviewEntry(){return fn()??void 0},get selectionFilePath(){return c.selectionFilePath??void 0},get selectionLineNumber(){return c.selectionLineNumber??void 0},get selectionTagName(){return Or()},get selectionComponentName(){return ut()},get selectionLabelVisible(){return kr()},selectionLabelStatus:`idle`,get hierarchyState(){return lr()},get hierarchyMenuPosition(){return Te()},get labelInstances(){return Mr()},get dragVisible(){return Pr()},get dragBounds(){return sn()},get grabbedBoxes(){return Nr()},get mouseX(){return e.X(()=>c.frozenElements.length>1)()?void 0:mn()??pn().x},get isFrozen(){return y()||_()||_e()},get inputValue(){return c.inputText},get isPromptMode(){return C()},onShowContextMenuInstance:ti,get onLabelInstanceHoverChange(){return q.handleHoverChange},get onInputChange(){return u.setInputText},onInputSubmit:()=>void xn(),onToggleExpand:Tn,get selectionLabelShakeCount(){return fe()},onConfirmDismiss:Cn,get discardPrompt(){return e.X(()=>!!M.isPendingDismiss())()?{isKeyboardSelection:!0,onConfirm:Cn,onCopy:Zn}:se()?{onConfirm:Cn,onCancel:wn}:void 0},get toolbarVisible(){return s.store.theme.toolbar.enabled},get isActive(){return _()},onToggleActive:jn,onActivateAction:An,get activeActionId(){return ft()},get enabled(){return T()},get shakeCount(){return ue()},onToolbarStateChange:e=>{ge(e),e.enabled!==T()&&(le(e.enabled),e.enabled||(yn(),Qr())),Kt.forEach(t=>t(e))},onSubscribeToToolbarStateChanges:e=>(Kt.add(e),()=>{Kt.delete(e)}),onToolbarSelectHoverChange:ve,onToolbarRef:e=>{Ie=e},get contextMenuPosition(){return Rr()},get contextMenuBounds(){return Lr()},get contextMenuTagName(){return zr()},get contextMenuComponentName(){return Br()},get contextMenuHasFilePath(){return!!Vr()?.filePath},get actions(){return s.store.actions},get actionContext(){return Kr()},onContextMenuDismiss:qr,onContextMenuHide:Wr,get toolbarMenuPosition(){return be()},get toolbarMenuActions(){return s.store.actions.filter(e=>e.showInToolbarMenu===!0)},get defaultActionId(){return D()?.defaultAction??`copy`},onSetDefaultAction:ei,onToggleToolbarMenu:$r,onToolbarMenuDismiss:Zr,get editPanelState(){return O.state()},get editPanelPosition(){return Ce()},get onEditPanelDismiss(){return O.dismiss},get onEditPanelSubmit(){return O.submit},get onEditPanelPendingEditsChange(){return O.setPendingEdits},get onEditPanelInteractingChange(){return O.setInteracting}}),yr))}).catch(e=>{console.warn(`[react-grab] Failed to load renderer:`,e)});let ni={activate:()=>{u.setPendingCommentMode(!1),!_()&&T()&&bn()},deactivate:()=>{(_()||x())&&X()},toggle:()=>{_()?X():T()&&bn()},comment:Fn,isActive:()=>_(),isEnabled:()=>T(),setEnabled:e=>{e!==T()&&(le(e),Ke({enabled:e,collapsed:!e}),e||(yn(),Qr()))},getToolbarState:()=>D()??e.i(),setToolbarState:t=>{let n=D()??e.i(),r=t.collapsed??n?.collapsed??!1,i={edge:t.edge??n?.edge??`bottom`,ratio:t.ratio??n?.ratio??.5,collapsed:r,enabled:t.enabled??!r,defaultAction:t.defaultAction??n?.defaultAction??`copy`};e.a(i),ge(i),i.enabled!==T()&&(le(i.enabled),i.enabled||(yn(),Qr())),Kt.forEach(e=>e(i))},onToolbarStateChange:e=>(Kt.add(e),()=>{Kt.delete(e)}),reset:()=>{yn(),Qr(),u.clearGrabbedBoxes(),u.clearLabelInstances(),u.setSelectionSource(null,null)},dispose:()=>{a=!0,Gt=!1,o?.(),A?.(),A=null,j?.(),j=null,Kt.clear(),i()},copyElement:async e=>{let t=Array.isArray(e)?e:[e];return t.length===0?!1:await bt(t)},getSource:async e=>{let t=await n.c(e);return t?{filePath:t.filePath,lineNumber:t.lineNumber,componentName:t.componentName}:null},getStackContext:e=>n.s(e,{maxLines:s.store.options.maxContextLines}),getState:()=>({isActive:_(),isDragging:b(),isCopying:x(),isPromptMode:C(),isSelectionBoxVisible:!!Dr(),isDragBoxVisible:!!Pr(),targetElement:J(),dragBounds:sn()??null,grabbedBoxes:[...hn()],labelInstances:[...gn()],selectionFilePath:c.selectionFilePath,toolbarState:D()}),setOptions:e=>{s.setOptions(e)},registerPlugin:e=>{s.register(e,ni)},unregisterPlugin:e=>{s.unregister(e)},getPlugins:()=>s.getPluginNames(),getDisplayName:n.r};for(let e of Wt)s.register(e,ni);return setTimeout(()=>{t.b(!0)},t.mt),ni})};Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Rt}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return Ut}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return Bt}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return qt}});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 Aiden Bai
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import{Ft as e,H as t,Ht as n,I as r,nt as i}from"./freeze-updates-BcyakRmS.js";const a={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return o(this.context.count)},getNextContextId(){return o(this.context.count++)}};function o(e){let t=String(e),n=t.length-1;return a.context.id+(n?String.fromCharCode(96+n):``)+t}function s(e){a.context=e}const c=(e,t)=>e===t,l=Symbol(`solid-proxy`),u=typeof Proxy==`function`,d=Symbol(`solid-track`),f={equals:c};let p=he;const m={owned:null,cleanups:null,context:null,owner:null},h={};var g=null;let _=null,v=null,y=null,b=null,x=0;function S(e,t){let n=v,r=g,i=e.length===0,a=t===void 0?r:t,o=i?m:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>E(()=>L(o)));g=o,v=null;try{return F(s,!0)}finally{v=n,g=r}}function C(e,t){t=t?Object.assign({},f,t):f;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[de.bind(n),e=>(typeof e==`function`&&(e=_&&_.running&&_.sources.has(n)?e(n.tValue):e(n.value)),fe(n,e))]}function ee(e,t,n){M(N(e,t,!0,1))}function w(e,t,n){M(N(e,t,!1,1))}function te(e,t,n){p=ge;let r=N(e,t,!1,1),i=j&&le(j);i&&(r.suspense=i),(!n||!n.render)&&(r.user=!0),b?b.push(r):M(r)}function T(e,t,n){n=n?Object.assign({},f,n):f;let r=N(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,M(r),de.bind(r)}function ne(e){return e&&typeof e==`object`&&`then`in e}function re(e,t,n){let r,i,o;typeof t==`function`?(r=e,i=t,o=n||{}):(r=!0,i=e,o=t||{});let s=null,c=h,l=null,u=!1,d=!1,f=`initialValue`in o,p=typeof r==`function`&&T(r),m=new Set,[y,b]=(o.storage||C)(o.initialValue),[x,S]=C(void 0),[w,te]=C(void 0,{equals:!1}),[re,ie]=C(f?`ready`:`unresolved`);a.context&&(l=a.getNextContextId(),o.ssrLoadFrom===`initial`?c=o.initialValue:a.load&&a.has(l)&&(c=a.load(l)));function D(e,t,n,r){return s===e&&(s=null,r!==void 0&&(f=!0),(e===c||t===c)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(r,{value:t})),c=h,_&&e&&u?(_.promises.delete(e),u=!1,F(()=>{_.running=!0,O(t,n)},!1)):O(t,n)),t}function O(e,t){F(()=>{t===void 0&&b(()=>e),ie(t===void 0?f?`ready`:`unresolved`:`errored`),S(t);for(let e of m.keys())e.decrement();m.clear()},!1)}function k(){let e=j&&le(j),t=y(),n=x();if(n!==void 0&&!s)throw n;return v&&!v.user&&e&&ee(()=>{w(),s&&(e.resolved&&_&&u?_.promises.add(s):m.has(e)||(e.increment(),m.add(e)))}),t}function A(e=!0){if(e!==!1&&d)return;d=!1;let t=p?p():r;if(u=_&&_.running,t==null||t===!1){D(s,E(y));return}_&&s&&_.promises.delete(s);let n,a=c===h?E(()=>{try{return i(t,{value:y(),refetching:e})}catch(e){n=e}}):c;if(n!==void 0){D(s,void 0,R(n),t);return}else if(!ne(a))return D(s,a,void 0,t),a;return s=a,`v`in a?(a.s===1?D(s,a.v,void 0,t):D(s,void 0,R(a.v),t),a):(d=!0,queueMicrotask(()=>d=!1),F(()=>{ie(f?`refreshing`:`pending`),te()},!1),a.then(e=>D(a,e,void 0,t),e=>D(a,void 0,R(e),t)))}Object.defineProperties(k,{state:{get:()=>re()},error:{get:()=>x()},loading:{get(){let e=re();return e===`pending`||e===`refreshing`}},latest:{get(){if(!f)return k();let e=x();if(e&&!s)throw e;return y()}}});let oe=g;return p?ee(()=>(oe=g,A(!1))):A(!1),[k,{refetch:e=>ae(oe,()=>A(e)),mutate:b}]}function ie(e){return F(e,!1)}function E(e){if(v===null)return e();let t=v;v=null;try{return e()}finally{v=t}}function D(e,t,n){let r=Array.isArray(e),i,a=n&&n.defer;return n=>{let o;if(r){o=Array(e.length);for(let t=0;t<e.length;t++)o[t]=e[t]()}else o=e();if(a)return a=!1,n;let s=E(()=>t(o,i,n));return i=o,s}}function O(e){te(()=>E(e))}function k(e){return g===null||(g.cleanups===null?g.cleanups=[e]:g.cleanups.push(e)),e}function A(){return v}function ae(e,t){let n=g,r=v;g=e,v=null;try{return F(t,!0)}catch(e){z(e)}finally{g=n,v=r}}const[oe,se]=C(!1);function ce(e,t){let n=Symbol(`context`);return{id:n,Provider:ye(n),defaultValue:e}}function le(e){let t;return g&&g.context&&(t=g.context[e.id])!==void 0?t:e.defaultValue}function ue(e){let t=T(e),n=T(()=>B(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}let j;function de(){let e=_&&_.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===1)M(this);else{let e=y;y=null,F(()=>I(this),!1),y=e}if(v){let e=this.observers?this.observers.length:0;v.sources?(v.sources.push(this),v.sourceSlots.push(e)):(v.sources=[this],v.sourceSlots=[e]),this.observers?(this.observers.push(v),this.observerSlots.push(v.sources.length-1)):(this.observers=[v],this.observerSlots=[v.sources.length-1])}return e&&_.sources.has(this)?this.tValue:this.value}function fe(e,t,n){let r=_&&_.running&&_.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(_){let r=_.running;(r||!n&&_.sources.has(e))&&(_.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&F(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=_&&_.running;r&&_.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?y.push(n):b.push(n),n.observers&&_e(n)),r?n.tState=1:n.state=1)}if(y.length>1e6)throw y=[],Error()},!1)}return t}function M(e){if(!e.fn)return;L(e);let t=x;pe(e,_&&_.running&&_.sources.has(e)?e.tValue:e.value,t),_&&!_.running&&_.sources.has(e)&&queueMicrotask(()=>{F(()=>{_&&(_.running=!0),v=g=e,pe(e,e.tValue,t),v=g=null},!1)})}function pe(e,t,n){let r,i=g,a=v;v=g=e;try{r=e.fn(t)}catch(t){return e.pure&&(_&&_.running?(e.tState=1,e.tOwned&&e.tOwned.forEach(L),e.tOwned=void 0):(e.state=1,e.owned&&e.owned.forEach(L),e.owned=null)),e.updatedAt=n+1,z(t)}finally{v=a,g=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?fe(e,r,!0):_&&_.running&&e.pure?(_.sources.has(e)||(e.value=r),_.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function N(e,t,n,r=1,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:g,context:g?g.context:null,pure:n};return _&&_.running&&(a.state=0,a.tState=r),g===null||g!==m&&(_&&_.running&&g.pure?g.tOwned?g.tOwned.push(a):g.tOwned=[a]:g.owned?g.owned.push(a):g.owned=[a]),a}function P(e){let t=_&&_.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===2)return I(e);if(e.suspense&&E(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<x);){if(t&&_.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(_.disposed.has(t))return}if((t?e.tState:e.state)===1)M(e);else if((t?e.tState:e.state)===2){let t=y;y=null,F(()=>I(e,n[0]),!1),y=t}}}function F(e,t){if(y)return e();let n=!1;t||(y=[]),b?n=!0:b=[],x++;try{let t=e();return me(n),t}catch(e){n||(b=null),y=null,z(e)}}function me(e){if(y&&=(he(y),null),e)return;let t;if(_){if(!_.promises.size&&!_.queue.size){let e=_.sources,n=_.disposed;b.push.apply(b,_.effects),t=_.resolve;for(let e of b)`tState`in e&&(e.state=e.tState),delete e.tState;_=null,F(()=>{for(let e of n)L(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)L(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}se(!1)},!1)}else if(_.running){_.running=!1,_.effects.push.apply(_.effects,b),b=null,se(!0);return}}let n=b;b=null,n.length&&F(()=>p(n),!1),t&&t()}function he(e){for(let t=0;t<e.length;t++)P(e[t])}function ge(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:P(r)}if(a.context){if(a.count){a.effects||=[],a.effects.push(...e.slice(0,n));return}s()}for(a.effects&&(a.done||!a.count)&&(e=[...a.effects,...e],n+=a.effects.length,delete a.effects),t=0;t<n;t++)P(e[t])}function I(e,t){let n=_&&_.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let e=n?i.tState:i.state;e===1?i!==t&&(!i.updatedAt||i.updatedAt<x)&&P(i):e===2&&I(i,t)}}}function _e(e){let t=_&&_.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=2:r.state=2,r.pure?y.push(r):b.push(r),r.observers&&_e(r))}}function L(e){let t;if(e.sources)for(;e.sources.length;){let t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){let e=r.pop(),i=t.observerSlots.pop();n<r.length&&(e.sourceSlots[i]=n,r[n]=e,t.observerSlots[n]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)L(e.tOwned[t]);delete e.tOwned}if(_&&_.running&&e.pure)ve(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)L(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}_&&_.running?e.tState=0:e.state=0}function ve(e,t){if(t||(e.tState=0,_.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)ve(e.owned[t])}function R(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function z(e,t=g){throw R(e)}function B(e){if(typeof e==`function`&&!e.length)return B(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=B(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function ye(e,t){return function(t){let n;return w(()=>n=E(()=>(g.context={...g.context,[e]:t.value},ue(()=>t.children))),void 0),n}}const V=Symbol(`fallback`);function H(e){for(let t=0;t<e.length;t++)e[t]()}function be(e,t,n={}){let r=[],i=[],a=[],o=0,s=t.length>1?[]:null;return k(()=>H(a)),()=>{let c=e()||[],l=c.length,u,f;return c[d],E(()=>{let e,t,d,m,h,g,_,v,y;if(l===0)o!==0&&(H(a),a=[],r=[],i=[],o=0,s&&=[]),n.fallback&&(r=[V],i[0]=S(e=>(a[0]=e,n.fallback())),o=1);else if(o===0){for(i=Array(l),f=0;f<l;f++)r[f]=c[f],i[f]=S(p);o=l}else{for(d=Array(l),m=Array(l),s&&(h=Array(l)),g=0,_=Math.min(o,l);g<_&&r[g]===c[g];g++);for(_=o-1,v=l-1;_>=g&&v>=g&&r[_]===c[v];_--,v--)d[v]=i[_],m[v]=a[_],s&&(h[v]=s[_]);for(e=new Map,t=Array(v+1),f=v;f>=g;f--)y=c[f],u=e.get(y),t[f]=u===void 0?-1:u,e.set(y,f);for(u=g;u<=_;u++)y=r[u],f=e.get(y),f!==void 0&&f!==-1?(d[f]=i[u],m[f]=a[u],s&&(h[f]=s[u]),f=t[f],e.set(y,f)):a[u]();for(f=g;f<l;f++)f in d?(i[f]=d[f],a[f]=m[f],s&&(s[f]=h[f],s[f](f))):i[f]=S(p);i=i.slice(0,o=l),r=c.slice(0)}return i});function p(e){if(a[f]=e,s){let[e,n]=C(f);return s[f]=n,t(c[f],e)}return t(c[f])}}}function xe(e,t,n={}){let r=[],i=[],a=[],o=[],s=0,c;return k(()=>H(a)),()=>{let l=e()||[],u=l.length;return l[d],E(()=>{if(u===0)return s!==0&&(H(a),a=[],r=[],i=[],s=0,o=[]),n.fallback&&(r=[V],i[0]=S(e=>(a[0]=e,n.fallback())),s=1),i;for(r[0]===V&&(a[0](),a=[],r=[],i=[],s=0),c=0;c<u;c++)c<r.length&&r[c]!==l[c]?o[c](()=>l[c]):c>=r.length&&(i[c]=S(f));for(;c<r.length;c++)a[c]();return s=o.length=a.length=u,r=l.slice(0),i=i.slice(0,s)});function f(e){a[c]=e;let[n,r]=C(l[c]);return o[c]=r,t(n,c)}}}function Se(e,t){return E(()=>e(t||{}))}function U(){return!0}const Ce={get(e,t,n){return t===l?n:e.get(t)},has(e,t){return t===l?!0:e.has(t)},set:U,deleteProperty:U,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:U,deleteProperty:U}},ownKeys(e){return e.keys()}};function we(e){return(e=typeof e==`function`?e():e)?e:{}}function Te(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function Ee(...e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];t||=!!r&&l in r,e[n]=typeof r==`function`?(t=!0,T(r)):r}if(u&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=we(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in we(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(we(e[n])));return[...new Set(t)]}},Ce);let n={},r=Object.create(null);for(let t=e.length-1;t>=0;t--){let i=e[t];if(!i)continue;let a=Object.getOwnPropertyNames(i);for(let e=a.length-1;e>=0;e--){let t=a[e];if(t===`__proto__`||t===`constructor`)continue;let o=Object.getOwnPropertyDescriptor(i,t);if(!r[t])r[t]=o.get?{enumerable:!0,configurable:!0,get:Te.bind(n[t]=[o.get.bind(i)])}:o.value===void 0?void 0:o;else{let e=n[t];e&&(o.get?e.push(o.get.bind(i)):o.value!==void 0&&e.push(()=>o.value))}}}let i={},a=Object.keys(r);for(let e=a.length-1;e>=0;e--){let t=a[e],n=r[t];n&&n.get?Object.defineProperty(i,t,n):i[t]=n?n.value:void 0}return i}function De(e,...t){let n=t.length;if(u&&l in e){let r=n>1?t.flat():t[0],i=t.map(t=>new Proxy({get(n){return t.includes(n)?e[n]:void 0},has(n){return t.includes(n)&&n in e},keys(){return t.filter(t=>t in e)}},Ce));return i.push(new Proxy({get(t){return r.includes(t)?void 0:e[t]},has(t){return r.includes(t)?!1:t in e},keys(){return Object.keys(e).filter(e=>!r.includes(e))}},Ce)),i}let r=[];for(let e=0;e<=n;e++)r[e]={};for(let i of Object.getOwnPropertyNames(e)){let a=n;for(let e=0;e<t.length;e++)if(t[e].includes(i)){a=e;break}let o=Object.getOwnPropertyDescriptor(e,i);!o.get&&!o.set&&o.enumerable&&o.writable&&o.configurable?r[a][i]=o.value:Object.defineProperty(r[a],i,o)}return r}const Oe=e=>`Stale read from <${e}>.`;function ke(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return T(be(()=>e.each,e.children,t||void 0))}function Ae(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return T(xe(()=>e.each,e.children,t||void 0))}function je(e){let t=e.keyed,n=T(()=>e.when,void 0,void 0),r=t?n:T(n,void 0,{equals:(e,t)=>!e==!t});return T(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?E(()=>a(t?i:()=>{if(!E(r))throw Oe(`Show`);return n()})):a}return e.fallback},void 0,void 0)}function Me(e){let t=ue(()=>e.children),n=T(()=>{let e=t(),n=Array.isArray(e)?e:[e],r=()=>void 0;for(let e=0;e<n.length;e++){let t=e,i=n[e],a=r,o=T(()=>a()?void 0:i.when,void 0,void 0),s=i.keyed?o:T(o,void 0,{equals:(e,t)=>!e==!t});r=()=>a()||(s()?[t,o,i]:void 0)}return r});return T(()=>{let t=n()();if(!t)return e.fallback;let[r,i,a]=t,o=a.children;return typeof o==`function`&&o.length>0?E(()=>o(a.keyed?i():()=>{if(E(n)()?.[0]!==r)throw Oe(`Match`);return i()})):o},void 0,void 0)}function Ne(e){return e}const Pe=new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,...`allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable`.split(`.`)]),Fe=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),Ie=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),Le=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function Re(e,t){let n=Le[e];return typeof n==`object`?n[t]?n.$:void 0:n}const ze=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),Be={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},Ve=e=>T(()=>e());function He(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null)if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&!((d=l.get(t[c]))==null||d!==r+u);)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++;else t[o++].remove()}}}const Ue=`_$DX_DELEGATE`;function We(e,t,n,r={}){let i;return S(r=>{i=r,t===document?e():nt(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function Ge(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>E(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function Ke(e,t=window.document){let n=t[Ue]||(t[Ue]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,st))}}function W(e,t,n){G(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function qe(e,t,n,r){G(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Je(e,t,n){G(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function Ye(e,t){G(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function Xe(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function Ze(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;a<o;a++){let r=i[a];!r||r===`undefined`||t[r]||(at(e,r,!1),delete n[r])}for(a=0,o=r.length;a<o;a++){let i=r[a],o=!!t[i];!i||i===`undefined`||n[i]===o||!o||(at(e,i,!0),n[i]=o)}return n}function Qe(e,t,n){if(!t)return n?W(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||={},t||={};let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function $e(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function et(e,t={},n,r){let i={};return r||w(()=>i.children=K(e,t.children,i.children)),w(()=>typeof t.ref==`function`&&tt(t.ref,e)),w(()=>rt(e,t,n,!0,i,!0)),i}function tt(e,t,n){return E(()=>e(t,n))}function nt(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return K(e,t,r,n);w(r=>K(e,t(),r,n),r)}function rt(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=ot(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||K(e,t.children);continue}let s=t[o];i[o]=ot(e,o,s,i[o],n,a,t)}}function G(e){return!!a.context&&!a.done&&(!e||e.isConnected)}function it(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function at(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t<i;t++)e.classList.toggle(r[t],n)}function ot(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return Qe(e,n,r);if(t===`classList`)return Ze(e,n,r);if(n===r)return r;if(t===`ref`)a||n(e);else if(t.slice(0,3)===`on:`){let i=t.slice(3);r&&e.removeEventListener(i,r,typeof r!=`function`&&r),n&&e.addEventListener(i,n,typeof n!=`function`&&n)}else if(t.slice(0,10)===`oncapture:`){let i=t.slice(10);r&&e.removeEventListener(i,r,!0),n&&e.addEventListener(i,n,!0)}else if(t.slice(0,2)===`on`){let i=t.slice(2).toLowerCase(),a=ze.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(Xe(e,i,n,a),a&&Ke([i]))}else if(t.slice(0,5)===`attr:`)W(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)Je(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=Fe.has(t))||!i&&((u=Re(t,e.tagName))||(c=Pe.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(G(e))return n;t===`class`||t===`className`?Ye(e,n):s&&!c&&!l?e[it(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&Be[t.split(`:`)[0]];r?qe(e,r,t,n):W(e,Ie[t]||t,n)}return n}function st(e){if(a.registry&&a.events&&a.events.find(([t,n])=>n===e))return;let t=e.target,n=`$$${e.type}`,r=e.target,i=e.currentTarget,o=t=>Object.defineProperty(e,`target`,{configurable:!0,value:t}),s=()=>{let r=t[n];if(r&&!t.disabled){let i=t[`${n}Data`];if(i===void 0?r.call(t,e):r.call(t,i,e),e.cancelBubble)return}return t.host&&typeof t.host!=`string`&&!t.host._$host&&t.contains(e.target)&&o(t.host),!0},c=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,`currentTarget`,{configurable:!0,get(){return t||document}}),a.registry&&!a.done&&(a.done=_$HY.done=!0),e.composedPath){let n=e.composedPath();o(n[0]);for(let e=0;e<n.length-2&&(t=n[e],s());e++){if(t._$host){t=t._$host,c();break}if(t.parentNode===i)break}}else c();o(r)}function K(e,t,n,r,i){let a=G(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=q(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=q(e,n,r)}else if(o===`function`)return w(()=>{let i=t();for(;typeof i==`function`;)i=i();n=K(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(ct(o,t,n,i))return w(()=>n=K(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=q(e,n,r),s)return n}else c?n.length===0?lt(e,o,r):He(e,n,o):(n&&q(e),lt(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=q(e,n,r,t);q(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function ct(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(!(o==null||o===!0||o===!1))if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=ct(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=ct(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0;else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}return i}function lt(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function q(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}const ut=e=>!!(e?.isConnected??e?.ownerDocument?.contains(e)),dt=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`,`combobox`],ft=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},pt=e=>{if(document.designMode===`on`)return!0;let t=ft(e);if(!t)return!1;if(t.isContentEditable)return!0;let n=r(t);return dt.some(e=>e===n||e===t.role)},mt=e=>{let t=e.target;if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){let e=t.selectionStart??0;return(t.selectionEnd??0)-e>0}return!1},ht=()=>{let e=window.getSelection();return e?e.toString().length>0:!1},gt=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+%?))?\s*\)$/,J=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`),_t=(e,t,n,r=1)=>{let i=J(e),a=J(t),o=J(n);return r>=1?`#${i}${a}${o}`:`#${i}${a}${o}${J(r*255)}`},vt=e=>{if(!e.startsWith(`#`))return null;let t=e.slice(1);if(t.length!==6&&t.length!==8)return null;let n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16),a=t.length===8?parseInt(t.slice(6,8),16)/255:1;return!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)?null:{red:n,green:r,blue:i,alpha:a}},yt=e=>{let t=e.match(gt);if(!t)return null;let n=1;if(t[4]!==void 0){let e=t[4];n=e.endsWith(`%`)?Number(e.slice(0,-1))/100:Number(e)}return _t(Number(t[1]),Number(t[2]),Number(t[3]),n)},bt=e=>{let t=e.match(gt);return!t||t[4]===void 0?!1:(t[4].endsWith(`%`)?Number(t[4].slice(0,-1))/100:Number(t[4]))===0},xt=/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,St=e=>{let t=e.match(xt);if(!t)return null;let n=t[1];return n.length===3?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`:n.length===4?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}${n[3]}${n[3]}`:`#${n}`},Ct=`rgba(0, 0, 0, 0)`,wt=/^oklch\(\s*([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+)(deg|grad|rad|turn)?(?:\s*\/\s*([+-]?\d*\.?\d+%?))?\s*\)$/i,Tt=180/Math.PI,Et=(e,t)=>e.endsWith(`%`)?Number(e.slice(0,-1))/100*t:Number(e),Dt=(e,t)=>{let n=Number(e);return t===`grad`?n*.9:t===`rad`?n*Tt:t===`turn`?n*360:n},Ot=e=>{let t=Math.max(0,Math.min(1,e));return(t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055)*255},kt=e=>{let t=e.match(wt);if(!t)return null;let n=Et(t[1],1),r=Et(t[2],.4),i=Dt(t[3],t[4])*Math.PI/180,a=t[5]===void 0?1:Et(t[5],1);if(![n,r,i,a].every(Number.isFinite))return null;let o=r*Math.cos(i),s=r*Math.sin(i),c=n+.3963377774*o+.2158037573*s,l=n-.1055613458*o-.0638541728*s,u=n-.0894841775*o-1.291485548*s,d=c**3,f=l**3,p=u**3,m=4.0767416621*d-3.3077115913*f+.2309699292*p,h=-1.2684380046*d+2.6097574011*f-.3413193965*p,g=-.0041960863*d-.7034186147*f+1.707614701*p;return _t(Ot(m),Ot(h),Ot(g),Math.max(0,Math.min(1,a)))};let At=null;const jt=()=>At||(typeof document>`u`?null:(At=document.createElement(`canvas`).getContext(`2d`,{willReadFrequently:!0}),At)),Mt=(e,t)=>{e.clearRect(0,0,1,1),e.fillStyle=t,e.fillRect(0,0,1,1);let n=e.getImageData(0,0,1,1).data;return n[3]===0?i:_t(n[0],n[1],n[2],n[3]/255)},Nt=e=>{let t=e.trim();if(!t)return null;if(t.toLowerCase()===`transparent`)return i;let n=St(t);if(n)return n;let r=kt(t);if(r)return r;let a=jt();if(!a)return null;a.fillStyle=Ct,a.fillStyle=t;let o=a.fillStyle;return typeof o==`string`?o.toLowerCase()===Ct?t.toLowerCase().replace(/\s+/g,``)===`rgba(0,0,0,0)`?i:null:o.startsWith(`#`)&&o.length===7?o:o.startsWith(`rgb`)?yt(o):Mt(a,t):null},Pt=(e,t,n)=>Math.max(t,Math.min(e,n));let Y=null;const Ft=()=>{if(typeof navigator>`u`||!(`userAgentData`in navigator))return null;let e=navigator.userAgentData;if(typeof e!=`object`||!e||!(`platform`in e))return null;let t=e.platform;return typeof t==`string`?t:null},It=()=>{if(Y===null){if(typeof navigator>`u`)return Y=!1,Y;let e=navigator.platform??Ft()??navigator.userAgent;Y=/Mac|iPhone|iPad|iPod/i.test(e)}return Y},Lt=(e,t)=>{try{return e.composedPath().some(e=>e instanceof HTMLElement&&e.hasAttribute(t))}catch{return!1}},Rt=`padding-top.padding-right.padding-bottom.padding-left.margin-top.margin-right.margin-bottom.margin-left.gap.row-gap.column-gap.font-size.line-height.letter-spacing.border-radius.border-top-left-radius.border-top-right-radius.border-bottom-right-radius.border-bottom-left-radius.border-width.border-top-width.border-right-width.border-bottom-width.border-left-width.opacity.width.height.min-width.min-height.max-width.max-height.top.right.bottom.left.z-index`.split(`.`),zt=.5,Bt=384,Vt=-128,Ht=-512,Ut=-9999,Wt=9999,Gt=new Set([`letter-spacing`,`gap`,`row-gap`,`column-gap`]),Kt=new Set([`z-index`]),qt=[{key:`padding`,label:`padding`,longhands:[`padding-top`,`padding-right`,`padding-bottom`,`padding-left`]},{key:`padding-top,padding-bottom`,label:`padding-y`,longhands:[`padding-top`,`padding-bottom`]},{key:`padding-left,padding-right`,label:`padding-x`,longhands:[`padding-left`,`padding-right`]},{key:`padding-top`,label:`padding top`,longhands:[`padding-top`]},{key:`padding-right`,label:`padding right`,longhands:[`padding-right`]},{key:`padding-bottom`,label:`padding bottom`,longhands:[`padding-bottom`]},{key:`padding-left`,label:`padding left`,longhands:[`padding-left`]}],Jt=[{key:`margin`,label:`margin`,longhands:[`margin-top`,`margin-right`,`margin-bottom`,`margin-left`]},{key:`margin-top,margin-bottom`,label:`margin-y`,longhands:[`margin-top`,`margin-bottom`]},{key:`margin-left,margin-right`,label:`margin-x`,longhands:[`margin-left`,`margin-right`]},{key:`margin-top`,label:`margin top`,longhands:[`margin-top`]},{key:`margin-right`,label:`margin right`,longhands:[`margin-right`]},{key:`margin-bottom`,label:`margin bottom`,longhands:[`margin-bottom`]},{key:`margin-left`,label:`margin left`,longhands:[`margin-left`]}],Yt=[{key:`gap`,label:`gap`,longhands:[`row-gap`,`column-gap`]},{key:`row-gap`,label:`row gap`,longhands:[`row-gap`]},{key:`column-gap`,label:`column gap`,longhands:[`column-gap`]}],Xt=[{key:`border-radius`,label:`border radius`,longhands:[`border-top-left-radius`,`border-top-right-radius`,`border-bottom-right-radius`,`border-bottom-left-radius`]},{key:`border-top-left-radius,border-top-right-radius`,label:`top corners`,longhands:[`border-top-left-radius`,`border-top-right-radius`]},{key:`border-bottom-left-radius,border-bottom-right-radius`,label:`bottom corners`,longhands:[`border-bottom-left-radius`,`border-bottom-right-radius`]},{key:`border-top-left-radius,border-bottom-left-radius`,label:`left corners`,longhands:[`border-top-left-radius`,`border-bottom-left-radius`]},{key:`border-top-right-radius,border-bottom-right-radius`,label:`right corners`,longhands:[`border-top-right-radius`,`border-bottom-right-radius`]},{key:`border-top-left-radius`,label:`top left radius`,longhands:[`border-top-left-radius`]},{key:`border-top-right-radius`,label:`top right radius`,longhands:[`border-top-right-radius`]},{key:`border-bottom-right-radius`,label:`bottom right radius`,longhands:[`border-bottom-right-radius`]},{key:`border-bottom-left-radius`,label:`bottom left radius`,longhands:[`border-bottom-left-radius`]}],Zt=[{key:`top,right,bottom,left`,label:`inset`,longhands:[`top`,`right`,`bottom`,`left`]},{key:`top,bottom`,label:`inset-y`,longhands:[`top`,`bottom`]},{key:`left,right`,label:`inset-x`,longhands:[`left`,`right`]},{key:`top`,label:`top`,longhands:[`top`]},{key:`right`,label:`right`,longhands:[`right`]},{key:`bottom`,label:`bottom`,longhands:[`bottom`]},{key:`left`,label:`left`,longhands:[`left`]}],Qt=new Set(Zt.map(e=>e.key)),$t=[qt,Jt,Yt,Xt,[{key:`border-width`,label:`border width`,longhands:[`border-top-width`,`border-right-width`,`border-bottom-width`,`border-left-width`]},{key:`border-top-width`,label:`border top width`,longhands:[`border-top-width`]},{key:`border-right-width`,label:`border right width`,longhands:[`border-right-width`]},{key:`border-bottom-width`,label:`border bottom width`,longhands:[`border-bottom-width`]},{key:`border-left-width`,label:`border left width`,longhands:[`border-left-width`]}],[{key:`width,height`,label:`size`,longhands:[`width`,`height`]},{key:`width`,label:`width`,longhands:[`width`]},{key:`height`,label:`height`,longhands:[`height`]}],Zt],en=[{key:`font-size`,label:`font size`},{key:`line-height`,label:`line height`},{key:`letter-spacing`,label:`letter spacing`},{key:`min-width`,label:`min width`},{key:`min-height`,label:`min height`},{key:`max-width`,label:`max width`},{key:`max-height`,label:`max height`},{key:`z-index`,label:`z-index`},{key:`opacity`,label:`opacity`}],tn=[{key:`color`,label:`text color`,alwaysShow:!0},{key:`background-color`,label:`background`,alwaysShow:!0},{key:`border-color`,label:`border color`},{key:`fill`,label:`fill`},{key:`stroke`,label:`stroke`}],nn=[{value:`ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`,label:`sans`},{value:`ui-serif, Georgia, Cambria, "Times New Roman", Times, serif`,label:`serif`},{value:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`,label:`mono`},{value:`system-ui, sans-serif`,label:`system`},{value:`serif`,label:`serif`},{value:`monospace`,label:`mono`}],rn=e=>{let t=e.trim();return nn.some(e=>e.value===t)?nn:[{value:t,label:`current`},...nn]},an={key:`font-family`,label:`font family`},on=[{key:`display`,label:`display`,options:[{value:`block`,label:`block`},{value:`flex`,label:`flex`},{value:`inline-block`,label:`inline-block`},{value:`inline`,label:`inline`},{value:`grid`,label:`grid`},{value:`none`,label:`none`}]},{key:`text-align`,label:`text align`,options:[{value:`left`,label:`left`},{value:`center`,label:`center`},{value:`right`,label:`right`},{value:`justify`,label:`justify`}]},{key:`font-style`,label:`font style`,options:[{value:`normal`,label:`normal`},{value:`italic`,label:`italic`}]},{key:`text-transform`,label:`text transform`,options:[{value:`none`,label:`none`},{value:`uppercase`,label:`uppercase`},{value:`lowercase`,label:`lowercase`},{value:`capitalize`,label:`capitalize`}]},{key:`white-space`,label:`white space`,options:[{value:`normal`,label:`normal`},{value:`nowrap`,label:`nowrap`},{value:`pre`,label:`pre`},{value:`pre-wrap`,label:`pre-wrap`},{value:`pre-line`,label:`pre-line`},{value:`break-spaces`,label:`break-spaces`}]},{key:`word-break`,label:`word break`,options:[{value:`normal`,label:`normal`},{value:`break-all`,label:`break-all`},{value:`keep-all`,label:`keep-all`}]},{key:`overflow-wrap`,label:`wrap`,options:[{value:`normal`,label:`normal`},{value:`break-word`,label:`break-word`},{value:`anywhere`,label:`anywhere`}]},{key:`font-variant-numeric`,label:`number style`,options:[{value:`normal`,label:`normal`},{value:`tabular-nums`,label:`tabular`},{value:`proportional-nums`,label:`proportional`},{value:`lining-nums`,label:`lining`},{value:`oldstyle-nums`,label:`oldstyle`},{value:`slashed-zero`,label:`slashed zero`}]},{key:`text-decoration-line`,label:`decoration`,options:[{value:`none`,label:`none`},{value:`underline`,label:`underline`},{value:`line-through`,label:`strike`}]},{key:`border-style`,label:`border style`,options:[{value:`none`,label:`none`},{value:`solid`,label:`solid`},{value:`dashed`,label:`dashed`},{value:`dotted`,label:`dotted`}]},{key:`visibility`,label:`visibility`,options:[{value:`visible`,label:`visible`},{value:`hidden`,label:`hidden`}]},{key:`align-items`,label:`align items`,options:[{value:`stretch`,label:`stretch`},{value:`flex-start`,label:`start`},{value:`center`,label:`center`},{value:`flex-end`,label:`end`},{value:`baseline`,label:`baseline`}]},{key:`justify-content`,label:`justify content`,options:[{value:`flex-start`,label:`start`},{value:`center`,label:`center`},{value:`flex-end`,label:`end`},{value:`space-between`,label:`between`},{value:`space-around`,label:`around`},{value:`space-evenly`,label:`evenly`}]},{key:`font-weight`,label:`font weight`,options:[{value:`100`,label:`thin`},{value:`200`,label:`extra-light`},{value:`300`,label:`light`},{value:`400`,label:`normal`},{value:`500`,label:`medium`},{value:`600`,label:`semibold`},{value:`700`,label:`bold`},{value:`800`,label:`extra-bold`},{value:`900`,label:`black`}]}],sn=[...Rt,`color`,`background-color`,`border-color`,`fill`,`stroke`,`font-family`,`display`,`text-align`,`font-style`,`text-transform`,`white-space`,`word-break`,`overflow-wrap`,`font-variant-numeric`,`text-decoration-line`,`border-style`,`visibility`,`align-items`,`justify-content`,`font-weight`],cn=e=>Number.isInteger(e)?e:Math.round(e*100)/100,ln=e=>Number.isInteger(e)?String(e):e.toFixed(2).replace(/\.?0+$/,``),un=e=>Number.isFinite(e)?ln(cn(e)):String(e),dn=e=>Math.round(e),fn=(e,t)=>{if(e.kind===`color`||e.kind===`enum`)return typeof t==`string`?t:e.value;let n=typeof t==`number`?t:e.value;return e.key===`opacity`&&e.unit===`%`?ln(cn(n/100)):`${ln(cn(n))}${e.unit}`},pn={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`},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`},lime:{50:`#f7fee7`,100:`#ecfccb`,200:`#d9f99d`,300:`#bef264`,400:`#a3e635`,500:`#84cc16`,600:`#65a30d`,700:`#4d7c0f`,800:`#3f6212`,900:`#365314`,950:`#1a2e05`},green:{50:`#f0fdf4`,100:`#dcfce7`,200:`#bbf7d0`,300:`#86efac`,400:`#4ade80`,500:`#22c55e`,600:`#16a34a`,700:`#15803d`,800:`#166534`,900:`#14532d`,950:`#052e16`},emerald:{50:`#ecfdf5`,100:`#d1fae5`,200:`#a7f3d0`,300:`#6ee7b7`,400:`#34d399`,500:`#10b981`,600:`#059669`,700:`#047857`,800:`#065f46`,900:`#064e3b`,950:`#022c22`},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`}},mn={p:`padding`,px:`padding-left,padding-right`,py:`padding-top,padding-bottom`,pt:`padding-top`,pr:`padding-right`,pb:`padding-bottom`,pl:`padding-left`,ps:`padding-left`,pe:`padding-right`,m:`margin`,mx:`margin-left,margin-right`,my:`margin-top,margin-bottom`,mt:`margin-top`,mr:`margin-right`,mb:`margin-bottom`,ml:`margin-left`,ms:`margin-left`,me:`margin-right`,gap:`gap`,"gap-x":`column-gap`,"gap-y":`row-gap`,text:`font-size`,leading:`line-height`,tracking:`letter-spacing`,rounded:`border-radius`,"rounded-t":`border-top-left-radius,border-top-right-radius`,"rounded-b":`border-bottom-left-radius,border-bottom-right-radius`,"rounded-l":`border-top-left-radius,border-bottom-left-radius`,"rounded-r":`border-top-right-radius,border-bottom-right-radius`,"rounded-tl":`border-top-left-radius`,"rounded-tr":`border-top-right-radius`,"rounded-bl":`border-bottom-left-radius`,"rounded-br":`border-bottom-right-radius`,border:`border-width`,"border-t":`border-top-width`,"border-r":`border-right-width`,"border-b":`border-bottom-width`,"border-l":`border-left-width`,w:`width`,h:`height`,size:`width,height`,"max-w":`max-width`,"max-h":`max-height`,"min-w":`min-width`,"min-h":`min-height`,opacity:`opacity`,inset:`top,right,bottom,left`,"inset-x":`left,right`,"inset-y":`top,bottom`,top:`top`,right:`right`,bottom:`bottom`,left:`left`,z:`z-index`,items:`align-items`,justify:`justify-content`,font:`font-weight`,whitespace:`white-space`},hn={"font-size":[`font-size`,`font size`,`text-size`,`text size`],color:[`color`,`text-color`,`text color`,`text-colour`,`text colour`,`foreground`,`fg`],"background-color":[`background`,`background-color`,`background color`,`bg`,`bg-color`,`bg color`],"border-color":[`border-color`,`border color`],fill:[`fill`,`fill-color`,`fill color`],stroke:[`stroke`,`stroke-color`,`stroke color`],"font-family":[`font`,`font-sans`,`font-serif`,`font-mono`,`family`,`sans`,`serif`,`mono`],"font-style":[`italic`,`not-italic`],"text-align":[`text-left`,`text-center`,`text-right`,`text-justify`],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-decoration-line":[`underline`,`line-through`,`no-underline`],"white-space":[`whitespace`,`whitespace-normal`,`whitespace-nowrap`,`whitespace-pre`],"word-break":[`break-normal`,`break-all`,`break-keep`],"overflow-wrap":[`break-words`,`break-anywhere`],"font-variant-numeric":[`tabular-nums`,`proportional-nums`,`lining-nums`,`oldstyle-nums`],"border-style":[`border-solid`,`border-dashed`,`border-dotted`,`border-none`]},gn=(()=>{let e={};for(let[t,n]of Object.entries(mn))n!==void 0&&(e[n]??=new Set).add(t);let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=Array.from(r));for(let[e,n]of Object.entries(hn)){let r=new Set([...t[e]??[],...n]);t[e]=Array.from(r)}return t})(),X={text:`color`,bg:`background-color`,border:`border-color`,"border-x":`border-color`,"border-y":`border-color`,"border-t":`border-color`,"border-r":`border-color`,"border-b":`border-color`,"border-l":`border-color`,"border-s":`border-color`,"border-e":`border-color`,fill:`fill`,stroke:`stroke`},_n=e=>mn[e]!==void 0||X[e]!==void 0,Z=e=>{let t=0,n=-1;for(let r=0;r<e.length;r++){let i=e[r];i===`[`?t++:i===`]`?t--:i===`:`&&t===0&&(n=r)}let r=n>=0?e.slice(n+1):e;return r.startsWith(`!`)?r.slice(1):r},Q=e=>{let t=Z(e);if(!t)return null;let n=t.indexOf(`[`);if(n>0)return t.slice(0,n).replace(/-$/,``)||null;let r=t.split(`-`).filter(Boolean);if(r.length===0)return null;for(let e=r.length;e>=1;e--){let t=r.slice(0,e).join(`-`);if(_n(t))return t}return r[0]},vn=/-(red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|slate|gray|zinc|neutral|stone|black|white|transparent|current|inherit)\b/,yn=(e,t)=>e!==`text`&&e!==`bg`&&e!==`border`&&!e.startsWith(`border-`)?!1:vn.test(t),bn=new Set(`color.red.orange.amber.yellow.lime.green.emerald.teal.cyan.sky.blue.indigo.violet.purple.fuchsia.pink.rose.slate.gray.grey.zinc.neutral.stone.black.white.transparent.current.currentcolor.inherit.primary.secondary.accent.muted.foreground.background.destructive.success.warning.error.info.card.popover.input.ring`.split(`.`)),xn=new Set([`xs`,`sm`,`base`,`lg`,`xl`,`2xl`,`3xl`,`4xl`,`5xl`,`6xl`,`7xl`,`8xl`,`9xl`]),Sn=/^(#|rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color:|color\(|var\(--.*color)/,Cn=/^(-?\d|length:|size:)/,$=e=>e.trim().toLowerCase().replace(/\s+/g,`-`).replace(/([a-z])(\d)/g,`$1-$2`),wn=e=>Sn.test(e)&&!Cn.test(e),Tn=(e,t)=>{if(e===t)return``;let n=`${t}-`;return e.startsWith(n)?e.slice(n.length):null},En=e=>{let t=Z($(e)),n=Q(t);if(!n)return null;let r=X[n];if(!r)return null;let i=t.indexOf(`[`);if(i>=0)return wn(t.slice(i+1).replace(/\]$/,``))?r:null;let a=Tn(t,n);if(a===null)return null;if(n===`bg`&&a===``||(n===`fill`||n===`stroke`)&&a===``)return r;let o=a.split(`-`)[0];return n===`text`&&xn.has(o)?null:bn.has(o)?r:null},Dn={black:`#000000`,white:`#ffffff`,transparent:i},On=e=>{let t=Z($(e)),n=Q(t);if(!n||X[n]===void 0||t.includes(`[`))return null;let r=Tn(t,n);if(!r)return null;let i=Dn[r];if(i)return i;let a=r.lastIndexOf(`-`);if(a<0)return null;let o=r.slice(0,a),s=o===`grey`?`gray`:o,c=Number.parseInt(r.slice(a+1),10);return pn[s]?.[c]??null},kn=/^-?\d/,An=(e,t)=>{if(t===``||t.startsWith(`[`)||kn.test(t))return!0;let n=t.split(`-`)[0];return e===`text`?xn.has(n):e===`font`||e===`border`||e.startsWith(`border-`)?!1:(e===`rounded`||e.startsWith(`rounded-`),!0)},jn={"font-sans":{property:`font-family`,value:`ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`},"font-serif":{property:`font-family`,value:`ui-serif, Georgia, Cambria, "Times New Roman", Times, serif`},"font-mono":{property:`font-family`,value:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`},"font-thin":{property:`font-weight`,value:`100`},"font-extralight":{property:`font-weight`,value:`200`},"font-light":{property:`font-weight`,value:`300`},"font-normal":{property:`font-weight`,value:`400`},"font-medium":{property:`font-weight`,value:`500`},"font-semibold":{property:`font-weight`,value:`600`},"font-bold":{property:`font-weight`,value:`700`},"font-extrabold":{property:`font-weight`,value:`800`},"font-black":{property:`font-weight`,value:`900`},"text-left":{property:`text-align`,value:`left`},"text-center":{property:`text-align`,value:`center`},"text-right":{property:`text-align`,value:`right`},"text-justify":{property:`text-align`,value:`justify`},italic:{property:`font-style`,value:`italic`},"not-italic":{property:`font-style`,value:`normal`},uppercase:{property:`text-transform`,value:`uppercase`},lowercase:{property:`text-transform`,value:`lowercase`},capitalize:{property:`text-transform`,value:`capitalize`},"normal-case":{property:`text-transform`,value:`none`},underline:{property:`text-decoration-line`,value:`underline`},"line-through":{property:`text-decoration-line`,value:`line-through`},"no-underline":{property:`text-decoration-line`,value:`none`},"whitespace-normal":{property:`white-space`,value:`normal`},"whitespace-nowrap":{property:`white-space`,value:`nowrap`},"whitespace-pre":{property:`white-space`,value:`pre`},"whitespace-pre-line":{property:`white-space`,value:`pre-line`},"whitespace-pre-wrap":{property:`white-space`,value:`pre-wrap`},"whitespace-break-spaces":{property:`white-space`,value:`break-spaces`},"break-normal":{property:`word-break`,value:`normal`},"break-all":{property:`word-break`,value:`break-all`},"break-keep":{property:`word-break`,value:`keep-all`},"break-words":{property:`overflow-wrap`,value:`break-word`},"break-anywhere":{property:`overflow-wrap`,value:`anywhere`},"tabular-nums":{property:`font-variant-numeric`,value:`tabular-nums`},"proportional-nums":{property:`font-variant-numeric`,value:`proportional-nums`},"lining-nums":{property:`font-variant-numeric`,value:`lining-nums`},"oldstyle-nums":{property:`font-variant-numeric`,value:`oldstyle-nums`},"slashed-zero":{property:`font-variant-numeric`,value:`slashed-zero`},"border-solid":{property:`border-style`,value:`solid`},"border-dashed":{property:`border-style`,value:`dashed`},"border-dotted":{property:`border-style`,value:`dotted`},"border-none":{property:`border-style`,value:`none`}},Mn=e=>{let t=$(e);if(!t)return[];let n=Ln(t);if(n)return[n.property];let r=En(t);return r?[r]:[]},Nn=e=>{let t=$(e);if(!t)return[];let n=Q(t);if(!n)return[];let r=Tn(Z(t),n);if(r===null||!An(n,r))return[];let i=In(n);return i?[i]:[]},Pn=e=>{let t=e.getAttribute(`class`);if(!t)return new Set;let n=t.split(/\s+/).filter(Boolean),r=new Set;for(let e of n){let t=Q(e);if(!t||yn(t,e))continue;let n=Ln(e);if(n){r.add(n.property);continue}let i=In(t);i&&r.add(i)}return r},Fn=e=>gn[e]??[],In=e=>{let t=mn[e];return t===void 0?null:t},Ln=e=>{let t=jn[Z(e)];return t===void 0?null:t},Rn=`react-grab-toolbar-state`,zn=()=>{try{let n=localStorage.getItem(Rn);if(!n)return null;let r=JSON.parse(n);if(typeof r!=`object`||!r)return null;let i=r,a=typeof i.collapsed==`boolean`?i.collapsed:!1;return{edge:i.edge===`top`||i.edge===`bottom`||i.edge===`left`||i.edge===`right`?i.edge:`bottom`,ratio:typeof i.ratio==`number`?i.ratio:e,collapsed:a,enabled:!a,defaultAction:typeof i.defaultAction==`string`?i.defaultAction:t}}catch(e){console.warn(`[react-grab] Failed to load toolbar state from localStorage:`,e)}return null},Bn=e=>{try{localStorage.setItem(Rn,JSON.stringify(e))}catch(e){console.warn(`[react-grab] Failed to save toolbar state to localStorage:`,e)}},Vn=e=>{let[t,r]=C(!1);return O(()=>{let t=n(t=>r(e(t))),i=()=>r(!1);window.addEventListener(`keydown`,t,{capture:!0}),window.addEventListener(`keyup`,t,{capture:!0}),window.addEventListener(`blur`,i),k(()=>{window.removeEventListener(`keydown`,t,{capture:!0}),window.removeEventListener(`keyup`,t,{capture:!0}),window.removeEventListener(`blur`,i)})}),t},Hn=e=>e.key===`Enter`,Un=e=>e.metaKey||e.ctrlKey,Wn=(e,t,n={})=>{if(!t.key)return null;if(Hn(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return Un(t)?n.includeModifierShortcuts===!0?e.find(e=>e.shortcut!==void 0&&e.shortcut!==`Enter`&&e.shortcutModifier!==!1&&r===e.shortcut.toLowerCase())??null:null:e.find(e=>e.shortcut!==void 0&&e.shortcutModifier===!1&&r===e.shortcut.toLowerCase())??null},Gn=()=>{let e=!1;return{arm:()=>{e=!0},clear:()=>{e=!1},consume:()=>e?(e=!1,!0):!1}};export{$e as $,Rt as A,vt as B,Gt as C,D as Ct,Ht as D,E as Dt,Qt as E,De as Et,Lt as F,Xe as G,ht as H,It as I,Ke as J,Ze as K,Pt as L,Wt as M,Ut as N,en as O,le as Ot,rn as P,W as Q,Nt as R,on as S,Ee as St,Vt as T,O as Tt,pt as U,mt as V,ut as W,Ve as X,nt as Y,We as Z,dn as _,re as _t,Bn as a,d as at,sn as b,A as bt,En as c,Ne as ct,Mn as d,ie as dt,et,$ as f,Se as ft,fn as g,w as gt,un as h,T as ht,zn as i,l as it,Kt as j,Bt as k,On as l,je as lt,In as m,te as mt,Wn as n,Ge as nt,Pn as o,ke as ot,Ln as p,ce as pt,Ye as q,Vn as r,tt as rt,Fn as s,Ae as st,Gn as t,Qe as tt,Nn as u,Me as ut,$t as v,S as vt,an as w,k as wt,tn as x,be as xt,zt as y,C as yt,bt as z};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2025 Aiden Bai
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
const e=require(`./freeze-updates-CS_40G4X.cjs`),t=Symbol(`error`);function n(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function r(e,i=a){let o=i&&i.context&&i.context[t],s=n(e);if(!o)throw s;try{for(let e of o)e(s)}catch(e){r(e,i&&i.owner||null)}}const i={context:null,owner:null,owned:null,cleanups:null};let a=null;function o(){let e={owner:a,context:a?a.context:null,owned:null,cleanups:null};return a&&(a.owned?a.owned.push(e):a.owned=[e]),e}function s(e,t){let n=a,o=t===void 0?n:t,s=e.length===0?i:{context:o?o.context:null,owner:o,owned:null,cleanups:null};a=s;let c;try{c=e(e.length===0?()=>{}:()=>re(s))}catch(e){r(e)}finally{a=n}return c}function c(e,t){return[()=>e,t=>e=typeof t==`function`?t(e):t]}function l(e,t){a=o();try{e(t)}catch(e){r(e)}finally{a=a.owner}}const u=l;function d(e,t){}function f(e,t){a=o();let n;try{n=e(t)}catch(e){r(e)}finally{a=a.owner}return()=>n}function p(e){return e()}const m=p;function ee(e,t,n={}){let r=Array.isArray(e),i=n.defer;return()=>{if(i)return;let n;if(r){n=[];for(let t=0;t<e.length;t++)n.push(e[t]())}else n=e();return t(n)}}function te(e){}function ne(e){return a&&(a.cleanups?a.cleanups.push(e):a.cleanups=[e]),e}function re(e){if(e.owned){for(let t=0;t<e.owned.length;t++)re(e.owned[t]);e.owned=null}if(e.cleanups){for(let t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}}function ie(e){let t=Symbol(`context`);return{id:t,Provider:se(t),defaultValue:e}}function ae(e){return a&&a.context&&a.context[e.id]!==void 0?a.context[e.id]:e.defaultValue}function oe(e){let t=f(()=>h(e()));return t.toArray=()=>{let e=t();return Array.isArray(e)?e:e==null?[]:[e]},t}function h(e){if(typeof e==`function`&&!e.length)return h(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=h(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function se(e){return function(t){return f(()=>(a.context={...a.context,[e]:t.value},oe(()=>t.children)))}}function ce(e,t,n={}){let r=e(),i=[];if(r&&r.length)for(let e=0,n=r.length;e<n;e++)i.push(t(r[e],()=>e));else n.fallback&&(i=[n.fallback()]);return()=>i}const g={context:void 0,getContextId(){if(!this.context)throw Error(`getContextId cannot be used under non-hydrating context`);return _(this.context.count)},getNextContextId(){if(!this.context)throw Error(`getNextContextId cannot be used under non-hydrating context`);return _(this.context.count++)}};function _(e){let t=String(e),n=t.length-1;return g.context.id+(n?String.fromCharCode(96+n):``)+t}function le(e){g.context=e}function ue(){return g.context?{...g.context,id:g.getNextContextId(),count:0}:void 0}function de(e,t){if(g.context&&!g.context.noHydrate){let n=g.context;le(ue());let r=e(t||{});return le(n),r}return e(t||{})}function fe(...e){let t={};for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`function`&&(r=r()),r){let n=Object.getOwnPropertyDescriptors(r);for(let r in n)r in t||Object.defineProperty(t,r,{enumerable:!0,get(){for(let t=e.length-1;t>=0;t--){let n,i=e[t];if(typeof i==`function`&&(i=i()),n=(i||{})[r],n!==void 0)return n}}})}}return t}function pe(e,...t){let n=Object.getOwnPropertyDescriptors(e),r=e=>{let t={};for(let r=0;r<e.length;r++){let i=e[r];n[i]&&(Object.defineProperty(t,i,n[i]),delete n[i])}return t};return t.map(r).concat(r(Object.keys(n)))}function v(e,t){let n=e.each||[],r=n.length,i=e.children;if(r){let e=Array(r);for(let a=0;a<r;a++)e[a]=t(i,n[a],a);return e}return e.fallback}function me(e){return v(e,(e,t,n)=>e(t,()=>n))}function he(e){return v(e,(e,t,n)=>e(()=>t,n))}function ge(e){let t;return e.when?typeof(t=e.children)==`function`?t(e.keyed?e.when:()=>e.when):t:e.fallback||``}function _e(e){let t=e.children;Array.isArray(t)||(t=[t]);for(let e=0;e<t.length;e++){let n=t[e].when;if(n){let r=t[e].children;return typeof r==`function`?r(t[e].keyed?n:()=>n):r}}return e.fallback||``}function ve(e){return e}const ye=ie();let y=null;function be(e,t,r={}){typeof t!=`function`&&(r=t||{},t=e,e=!0);let i=new Set,a=g.getNextContextId(),o={},s=r.storage?r.storage(r.initialValue)[0]():r.initialValue,c,l;if(g.context.async&&r.ssrLoadFrom!==`initial`&&(o=g.context.resources[a]||(g.context.resources[a]={}),o.ref))return!o.data&&!o.ref[0]._loading&&!o.ref[0].error&&o.ref[1].refetch(),o.ref;let u=()=>{if(l)throw l;let e=r.ssrLoadFrom!==`initial`&&g.context.async&&`data`in g.context.resources[a];if(!e&&y&&y.push(a),!e&&d._loading){let e=ae(ye);e&&(e.resources.set(a,d),i.add(e))}return e},d=()=>u()?g.context.resources[a].data:s,f=()=>(u(),d._loading);d._loading=!1,d.error=void 0,d.state=`initialValue`in r?`ready`:`unresolved`,Object.defineProperties(d,{latest:{get(){return d()}},loading:{get(){return f()}}});function p(){let o=g.context;if(!o.async)return d._loading=!!(typeof e==`function`?e():e);if(o.resources&&a in o.resources&&`data`in o.resources[a]){s=o.resources[a].data;return}let u;try{if(y=[],u=typeof e==`function`?e():e,y.length)return}finally{y=null}if(!c){if(u==null||u===!1)return;c=t(u,{value:s})}return typeof c==`object`&&c&&`then`in c?(d._loading=!0,d.state=`pending`,c=c.then(e=>(d._loading=!1,d.state=`ready`,o.resources[a].data=e,c=null,b(i),e)).catch(e=>{throw d._loading=!1,d.state=`errored`,d.error=l=n(e),c=null,b(i),l}),o.serialize&&o.serialize(a,c,r.deferStream),c):(o.resources[a].data=c,o.serialize&&o.serialize(a,c),c=null,o.resources[a].data)}r.ssrLoadFrom!==`initial`&&p();let m=[d,{refetch:p,mutate:e=>s=e}];return c&&(o.ref=m),m}function xe(e){for(let t of e.resources.values())if(t._loading)return!1;return!0}function b(e){for(let t of e)xe(t)&&(t.completed(),e.delete(t))}const Se=new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,...`allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable`.split(`.`)]),Ce=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),we=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),Te=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function Ee(e,t){let n=Te[e];return typeof n==`object`?n[t]?n.$:void 0:n}const De=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),Oe={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},ke=e=>f(()=>e());function Ae(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null)if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&!((d=l.get(t[c]))==null||d!==r+u);)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++;else t[o++].remove()}}}const x=`_$DX_DELEGATE`;function je(e,t,n,r={}){let i;return s(r=>{i=r,t===document?e():Re(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function Me(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>m(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function S(e,t=window.document){let n=t[x]||(t[x]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,Ue))}}function C(e,t,n){O(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Ne(e,t,n,r){O(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Pe(e,t,n){O(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function w(e,t){O(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function T(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function E(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;a<o;a++){let r=i[a];!r||r===`undefined`||t[r]||(Ve(e,r,!1),delete n[r])}for(a=0,o=r.length;a<o;a++){let i=r[a],o=!!t[i];!i||i===`undefined`||n[i]===o||!o||(Ve(e,i,!0),n[i]=o)}return n}function D(e,t,n){if(!t)return n?C(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||={},t||={};let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function Fe(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function Ie(e,t={},n,r){let i={};return r||u(()=>i.children=k(e,t.children,i.children)),u(()=>typeof t.ref==`function`&&Le(t.ref,e)),u(()=>ze(e,t,n,!0,i,!0)),i}function Le(e,t,n){return m(()=>e(t,n))}function Re(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return k(e,t,r,n);u(r=>k(e,t(),r,n),r)}function ze(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=He(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||k(e,t.children);continue}let s=t[o];i[o]=He(e,o,s,i[o],n,a,t)}}function O(e){return!!g.context&&!g.done&&(!e||e.isConnected)}function Be(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function Ve(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t<i;t++)e.classList.toggle(r[t],n)}function He(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return D(e,n,r);if(t===`classList`)return E(e,n,r);if(n===r)return r;if(t===`ref`)a||n(e);else if(t.slice(0,3)===`on:`){let i=t.slice(3);r&&e.removeEventListener(i,r,typeof r!=`function`&&r),n&&e.addEventListener(i,n,typeof n!=`function`&&n)}else if(t.slice(0,10)===`oncapture:`){let i=t.slice(10);r&&e.removeEventListener(i,r,!0),n&&e.addEventListener(i,n,!0)}else if(t.slice(0,2)===`on`){let i=t.slice(2).toLowerCase(),a=De.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(T(e,i,n,a),a&&S([i]))}else if(t.slice(0,5)===`attr:`)C(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)Pe(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=Ce.has(t))||!i&&((u=Ee(t,e.tagName))||(c=Se.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(O(e))return n;t===`class`||t===`className`?w(e,n):s&&!c&&!l?e[Be(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&Oe[t.split(`:`)[0]];r?Ne(e,r,t,n):C(e,we[t]||t,n)}return n}function Ue(e){if(g.registry&&g.events&&g.events.find(([t,n])=>n===e))return;let t=e.target,n=`$$${e.type}`,r=e.target,i=e.currentTarget,a=t=>Object.defineProperty(e,`target`,{configurable:!0,value:t}),o=()=>{let r=t[n];if(r&&!t.disabled){let i=t[`${n}Data`];if(i===void 0?r.call(t,e):r.call(t,i,e),e.cancelBubble)return}return t.host&&typeof t.host!=`string`&&!t.host._$host&&t.contains(e.target)&&a(t.host),!0},s=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,`currentTarget`,{configurable:!0,get(){return t||document}}),g.registry&&!g.done&&(g.done=_$HY.done=!0),e.composedPath){let n=e.composedPath();a(n[0]);for(let e=0;e<n.length-2&&(t=n[e],o());e++){if(t._$host){t=t._$host,s();break}if(t.parentNode===i)break}}else s();a(r)}function k(e,t,n,r,i){let a=O(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=M(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=M(e,n,r)}else if(o===`function`)return u(()=>{let i=t();for(;typeof i==`function`;)i=i();n=k(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(A(o,t,n,i))return u(()=>n=k(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=M(e,n,r),s)return n}else c?n.length===0?j(e,o,r):Ae(e,n,o):(n&&M(e),j(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=M(e,n,r,t);M(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function A(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(!(o==null||o===!0||o===!1))if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=A(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=A(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0;else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}return i}function j(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function M(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}const We=e=>!!(e?.isConnected??e?.ownerDocument?.contains(e)),Ge=[`input`,`textarea`,`select`,`searchbox`,`slider`,`spinbutton`,`menuitem`,`menuitemcheckbox`,`menuitemradio`,`option`,`radio`,`textbox`,`combobox`],Ke=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},qe=t=>{if(document.designMode===`on`)return!0;let n=Ke(t);if(!n)return!1;if(n.isContentEditable)return!0;let r=e.I(n);return Ge.some(e=>e===r||e===n.role)},Je=e=>{let t=e.target;if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){let e=t.selectionStart??0;return(t.selectionEnd??0)-e>0}return!1},Ye=()=>{let e=window.getSelection();return e?e.toString().length>0:!1},N=/^rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+%?))?\s*\)$/,P=e=>Math.max(0,Math.min(255,Math.round(e))).toString(16).padStart(2,`0`),F=(e,t,n,r=1)=>{let i=P(e),a=P(t),o=P(n);return r>=1?`#${i}${a}${o}`:`#${i}${a}${o}${P(r*255)}`},Xe=e=>{if(!e.startsWith(`#`))return null;let t=e.slice(1);if(t.length!==6&&t.length!==8)return null;let n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16),a=t.length===8?parseInt(t.slice(6,8),16)/255:1;return!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)?null:{red:n,green:r,blue:i,alpha:a}},Ze=e=>{let t=e.match(N);if(!t)return null;let n=1;if(t[4]!==void 0){let e=t[4];n=e.endsWith(`%`)?Number(e.slice(0,-1))/100:Number(e)}return F(Number(t[1]),Number(t[2]),Number(t[3]),n)},Qe=e=>{let t=e.match(N);return!t||t[4]===void 0?!1:(t[4].endsWith(`%`)?Number(t[4].slice(0,-1))/100:Number(t[4]))===0},$e=/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,et=e=>{let t=e.match($e);if(!t)return null;let n=t[1];return n.length===3?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}`:n.length===4?`#${n[0]}${n[0]}${n[1]}${n[1]}${n[2]}${n[2]}${n[3]}${n[3]}`:`#${n}`},I=`rgba(0, 0, 0, 0)`,tt=/^oklch\(\s*([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+%?)\s+([+-]?\d*\.?\d+)(deg|grad|rad|turn)?(?:\s*\/\s*([+-]?\d*\.?\d+%?))?\s*\)$/i,nt=180/Math.PI,L=(e,t)=>e.endsWith(`%`)?Number(e.slice(0,-1))/100*t:Number(e),rt=(e,t)=>{let n=Number(e);return t===`grad`?n*.9:t===`rad`?n*nt:t===`turn`?n*360:n},R=e=>{let t=Math.max(0,Math.min(1,e));return(t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055)*255},it=e=>{let t=e.match(tt);if(!t)return null;let n=L(t[1],1),r=L(t[2],.4),i=rt(t[3],t[4])*Math.PI/180,a=t[5]===void 0?1:L(t[5],1);if(![n,r,i,a].every(Number.isFinite))return null;let o=r*Math.cos(i),s=r*Math.sin(i),c=n+.3963377774*o+.2158037573*s,l=n-.1055613458*o-.0638541728*s,u=n-.0894841775*o-1.291485548*s,d=c**3,f=l**3,p=u**3,m=4.0767416621*d-3.3077115913*f+.2309699292*p,ee=-1.2684380046*d+2.6097574011*f-.3413193965*p,te=-.0041960863*d-.7034186147*f+1.707614701*p;return F(R(m),R(ee),R(te),Math.max(0,Math.min(1,a)))};let z=null;const at=()=>z||(typeof document>`u`?null:(z=document.createElement(`canvas`).getContext(`2d`,{willReadFrequently:!0}),z)),ot=(t,n)=>{t.clearRect(0,0,1,1),t.fillStyle=n,t.fillRect(0,0,1,1);let r=t.getImageData(0,0,1,1).data;return r[3]===0?e.nt:F(r[0],r[1],r[2],r[3]/255)},st=t=>{let n=t.trim();if(!n)return null;if(n.toLowerCase()===`transparent`)return e.nt;let r=et(n);if(r)return r;let i=it(n);if(i)return i;let a=at();if(!a)return null;a.fillStyle=I,a.fillStyle=n;let o=a.fillStyle;return typeof o==`string`?o.toLowerCase()===I?n.toLowerCase().replace(/\s+/g,``)===`rgba(0,0,0,0)`?e.nt:null:o.startsWith(`#`)&&o.length===7?o:o.startsWith(`rgb`)?Ze(o):ot(a,n):null},ct=(e,t,n)=>Math.max(t,Math.min(e,n));let B=null;const lt=()=>{if(typeof navigator>`u`||!(`userAgentData`in navigator))return null;let e=navigator.userAgentData;if(typeof e!=`object`||!e||!(`platform`in e))return null;let t=e.platform;return typeof t==`string`?t:null},ut=()=>{if(B===null){if(typeof navigator>`u`)return B=!1,B;let e=navigator.platform??lt()??navigator.userAgent;B=/Mac|iPhone|iPad|iPod/i.test(e)}return B},dt=(e,t)=>{try{return e.composedPath().some(e=>e instanceof HTMLElement&&e.hasAttribute(t))}catch{return!1}},V=`padding-top.padding-right.padding-bottom.padding-left.margin-top.margin-right.margin-bottom.margin-left.gap.row-gap.column-gap.font-size.line-height.letter-spacing.border-radius.border-top-left-radius.border-top-right-radius.border-bottom-right-radius.border-bottom-left-radius.border-width.border-top-width.border-right-width.border-bottom-width.border-left-width.opacity.width.height.min-width.min-height.max-width.max-height.top.right.bottom.left.z-index`.split(`.`),ft=new Set([`letter-spacing`,`gap`,`row-gap`,`column-gap`]),pt=new Set([`z-index`]),mt=[{key:`padding`,label:`padding`,longhands:[`padding-top`,`padding-right`,`padding-bottom`,`padding-left`]},{key:`padding-top,padding-bottom`,label:`padding-y`,longhands:[`padding-top`,`padding-bottom`]},{key:`padding-left,padding-right`,label:`padding-x`,longhands:[`padding-left`,`padding-right`]},{key:`padding-top`,label:`padding top`,longhands:[`padding-top`]},{key:`padding-right`,label:`padding right`,longhands:[`padding-right`]},{key:`padding-bottom`,label:`padding bottom`,longhands:[`padding-bottom`]},{key:`padding-left`,label:`padding left`,longhands:[`padding-left`]}],ht=[{key:`margin`,label:`margin`,longhands:[`margin-top`,`margin-right`,`margin-bottom`,`margin-left`]},{key:`margin-top,margin-bottom`,label:`margin-y`,longhands:[`margin-top`,`margin-bottom`]},{key:`margin-left,margin-right`,label:`margin-x`,longhands:[`margin-left`,`margin-right`]},{key:`margin-top`,label:`margin top`,longhands:[`margin-top`]},{key:`margin-right`,label:`margin right`,longhands:[`margin-right`]},{key:`margin-bottom`,label:`margin bottom`,longhands:[`margin-bottom`]},{key:`margin-left`,label:`margin left`,longhands:[`margin-left`]}],gt=[{key:`gap`,label:`gap`,longhands:[`row-gap`,`column-gap`]},{key:`row-gap`,label:`row gap`,longhands:[`row-gap`]},{key:`column-gap`,label:`column gap`,longhands:[`column-gap`]}],_t=[{key:`border-radius`,label:`border radius`,longhands:[`border-top-left-radius`,`border-top-right-radius`,`border-bottom-right-radius`,`border-bottom-left-radius`]},{key:`border-top-left-radius,border-top-right-radius`,label:`top corners`,longhands:[`border-top-left-radius`,`border-top-right-radius`]},{key:`border-bottom-left-radius,border-bottom-right-radius`,label:`bottom corners`,longhands:[`border-bottom-left-radius`,`border-bottom-right-radius`]},{key:`border-top-left-radius,border-bottom-left-radius`,label:`left corners`,longhands:[`border-top-left-radius`,`border-bottom-left-radius`]},{key:`border-top-right-radius,border-bottom-right-radius`,label:`right corners`,longhands:[`border-top-right-radius`,`border-bottom-right-radius`]},{key:`border-top-left-radius`,label:`top left radius`,longhands:[`border-top-left-radius`]},{key:`border-top-right-radius`,label:`top right radius`,longhands:[`border-top-right-radius`]},{key:`border-bottom-right-radius`,label:`bottom right radius`,longhands:[`border-bottom-right-radius`]},{key:`border-bottom-left-radius`,label:`bottom left radius`,longhands:[`border-bottom-left-radius`]}],H=[{key:`top,right,bottom,left`,label:`inset`,longhands:[`top`,`right`,`bottom`,`left`]},{key:`top,bottom`,label:`inset-y`,longhands:[`top`,`bottom`]},{key:`left,right`,label:`inset-x`,longhands:[`left`,`right`]},{key:`top`,label:`top`,longhands:[`top`]},{key:`right`,label:`right`,longhands:[`right`]},{key:`bottom`,label:`bottom`,longhands:[`bottom`]},{key:`left`,label:`left`,longhands:[`left`]}],vt=new Set(H.map(e=>e.key)),yt=[mt,ht,gt,_t,[{key:`border-width`,label:`border width`,longhands:[`border-top-width`,`border-right-width`,`border-bottom-width`,`border-left-width`]},{key:`border-top-width`,label:`border top width`,longhands:[`border-top-width`]},{key:`border-right-width`,label:`border right width`,longhands:[`border-right-width`]},{key:`border-bottom-width`,label:`border bottom width`,longhands:[`border-bottom-width`]},{key:`border-left-width`,label:`border left width`,longhands:[`border-left-width`]}],[{key:`width,height`,label:`size`,longhands:[`width`,`height`]},{key:`width`,label:`width`,longhands:[`width`]},{key:`height`,label:`height`,longhands:[`height`]}],H],bt=[{key:`font-size`,label:`font size`},{key:`line-height`,label:`line height`},{key:`letter-spacing`,label:`letter spacing`},{key:`min-width`,label:`min width`},{key:`min-height`,label:`min height`},{key:`max-width`,label:`max width`},{key:`max-height`,label:`max height`},{key:`z-index`,label:`z-index`},{key:`opacity`,label:`opacity`}],xt=[{key:`color`,label:`text color`,alwaysShow:!0},{key:`background-color`,label:`background`,alwaysShow:!0},{key:`border-color`,label:`border color`},{key:`fill`,label:`fill`},{key:`stroke`,label:`stroke`}],U=[{value:`ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`,label:`sans`},{value:`ui-serif, Georgia, Cambria, "Times New Roman", Times, serif`,label:`serif`},{value:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`,label:`mono`},{value:`system-ui, sans-serif`,label:`system`},{value:`serif`,label:`serif`},{value:`monospace`,label:`mono`}],St=e=>{let t=e.trim();return U.some(e=>e.value===t)?U:[{value:t,label:`current`},...U]},Ct={key:`font-family`,label:`font family`},wt=[{key:`display`,label:`display`,options:[{value:`block`,label:`block`},{value:`flex`,label:`flex`},{value:`inline-block`,label:`inline-block`},{value:`inline`,label:`inline`},{value:`grid`,label:`grid`},{value:`none`,label:`none`}]},{key:`text-align`,label:`text align`,options:[{value:`left`,label:`left`},{value:`center`,label:`center`},{value:`right`,label:`right`},{value:`justify`,label:`justify`}]},{key:`font-style`,label:`font style`,options:[{value:`normal`,label:`normal`},{value:`italic`,label:`italic`}]},{key:`text-transform`,label:`text transform`,options:[{value:`none`,label:`none`},{value:`uppercase`,label:`uppercase`},{value:`lowercase`,label:`lowercase`},{value:`capitalize`,label:`capitalize`}]},{key:`white-space`,label:`white space`,options:[{value:`normal`,label:`normal`},{value:`nowrap`,label:`nowrap`},{value:`pre`,label:`pre`},{value:`pre-wrap`,label:`pre-wrap`},{value:`pre-line`,label:`pre-line`},{value:`break-spaces`,label:`break-spaces`}]},{key:`word-break`,label:`word break`,options:[{value:`normal`,label:`normal`},{value:`break-all`,label:`break-all`},{value:`keep-all`,label:`keep-all`}]},{key:`overflow-wrap`,label:`wrap`,options:[{value:`normal`,label:`normal`},{value:`break-word`,label:`break-word`},{value:`anywhere`,label:`anywhere`}]},{key:`font-variant-numeric`,label:`number style`,options:[{value:`normal`,label:`normal`},{value:`tabular-nums`,label:`tabular`},{value:`proportional-nums`,label:`proportional`},{value:`lining-nums`,label:`lining`},{value:`oldstyle-nums`,label:`oldstyle`},{value:`slashed-zero`,label:`slashed zero`}]},{key:`text-decoration-line`,label:`decoration`,options:[{value:`none`,label:`none`},{value:`underline`,label:`underline`},{value:`line-through`,label:`strike`}]},{key:`border-style`,label:`border style`,options:[{value:`none`,label:`none`},{value:`solid`,label:`solid`},{value:`dashed`,label:`dashed`},{value:`dotted`,label:`dotted`}]},{key:`visibility`,label:`visibility`,options:[{value:`visible`,label:`visible`},{value:`hidden`,label:`hidden`}]},{key:`align-items`,label:`align items`,options:[{value:`stretch`,label:`stretch`},{value:`flex-start`,label:`start`},{value:`center`,label:`center`},{value:`flex-end`,label:`end`},{value:`baseline`,label:`baseline`}]},{key:`justify-content`,label:`justify content`,options:[{value:`flex-start`,label:`start`},{value:`center`,label:`center`},{value:`flex-end`,label:`end`},{value:`space-between`,label:`between`},{value:`space-around`,label:`around`},{value:`space-evenly`,label:`evenly`}]},{key:`font-weight`,label:`font weight`,options:[{value:`100`,label:`thin`},{value:`200`,label:`extra-light`},{value:`300`,label:`light`},{value:`400`,label:`normal`},{value:`500`,label:`medium`},{value:`600`,label:`semibold`},{value:`700`,label:`bold`},{value:`800`,label:`extra-bold`},{value:`900`,label:`black`}]}],Tt=[...V,`color`,`background-color`,`border-color`,`fill`,`stroke`,`font-family`,`display`,`text-align`,`font-style`,`text-transform`,`white-space`,`word-break`,`overflow-wrap`,`font-variant-numeric`,`text-decoration-line`,`border-style`,`visibility`,`align-items`,`justify-content`,`font-weight`],W=e=>Number.isInteger(e)?e:Math.round(e*100)/100,G=e=>Number.isInteger(e)?String(e):e.toFixed(2).replace(/\.?0+$/,``),Et=e=>Number.isFinite(e)?G(W(e)):String(e),Dt=e=>Math.round(e),Ot=(e,t)=>{if(e.kind===`color`||e.kind===`enum`)return typeof t==`string`?t:e.value;let n=typeof t==`number`?t:e.value;return e.key===`opacity`&&e.unit===`%`?G(W(n/100)):`${G(W(n))}${e.unit}`},kt={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`},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`},lime:{50:`#f7fee7`,100:`#ecfccb`,200:`#d9f99d`,300:`#bef264`,400:`#a3e635`,500:`#84cc16`,600:`#65a30d`,700:`#4d7c0f`,800:`#3f6212`,900:`#365314`,950:`#1a2e05`},green:{50:`#f0fdf4`,100:`#dcfce7`,200:`#bbf7d0`,300:`#86efac`,400:`#4ade80`,500:`#22c55e`,600:`#16a34a`,700:`#15803d`,800:`#166534`,900:`#14532d`,950:`#052e16`},emerald:{50:`#ecfdf5`,100:`#d1fae5`,200:`#a7f3d0`,300:`#6ee7b7`,400:`#34d399`,500:`#10b981`,600:`#059669`,700:`#047857`,800:`#065f46`,900:`#064e3b`,950:`#022c22`},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`}},K={p:`padding`,px:`padding-left,padding-right`,py:`padding-top,padding-bottom`,pt:`padding-top`,pr:`padding-right`,pb:`padding-bottom`,pl:`padding-left`,ps:`padding-left`,pe:`padding-right`,m:`margin`,mx:`margin-left,margin-right`,my:`margin-top,margin-bottom`,mt:`margin-top`,mr:`margin-right`,mb:`margin-bottom`,ml:`margin-left`,ms:`margin-left`,me:`margin-right`,gap:`gap`,"gap-x":`column-gap`,"gap-y":`row-gap`,text:`font-size`,leading:`line-height`,tracking:`letter-spacing`,rounded:`border-radius`,"rounded-t":`border-top-left-radius,border-top-right-radius`,"rounded-b":`border-bottom-left-radius,border-bottom-right-radius`,"rounded-l":`border-top-left-radius,border-bottom-left-radius`,"rounded-r":`border-top-right-radius,border-bottom-right-radius`,"rounded-tl":`border-top-left-radius`,"rounded-tr":`border-top-right-radius`,"rounded-bl":`border-bottom-left-radius`,"rounded-br":`border-bottom-right-radius`,border:`border-width`,"border-t":`border-top-width`,"border-r":`border-right-width`,"border-b":`border-bottom-width`,"border-l":`border-left-width`,w:`width`,h:`height`,size:`width,height`,"max-w":`max-width`,"max-h":`max-height`,"min-w":`min-width`,"min-h":`min-height`,opacity:`opacity`,inset:`top,right,bottom,left`,"inset-x":`left,right`,"inset-y":`top,bottom`,top:`top`,right:`right`,bottom:`bottom`,left:`left`,z:`z-index`,items:`align-items`,justify:`justify-content`,font:`font-weight`,whitespace:`white-space`},At={"font-size":[`font-size`,`font size`,`text-size`,`text size`],color:[`color`,`text-color`,`text color`,`text-colour`,`text colour`,`foreground`,`fg`],"background-color":[`background`,`background-color`,`background color`,`bg`,`bg-color`,`bg color`],"border-color":[`border-color`,`border color`],fill:[`fill`,`fill-color`,`fill color`],stroke:[`stroke`,`stroke-color`,`stroke color`],"font-family":[`font`,`font-sans`,`font-serif`,`font-mono`,`family`,`sans`,`serif`,`mono`],"font-style":[`italic`,`not-italic`],"text-align":[`text-left`,`text-center`,`text-right`,`text-justify`],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-decoration-line":[`underline`,`line-through`,`no-underline`],"white-space":[`whitespace`,`whitespace-normal`,`whitespace-nowrap`,`whitespace-pre`],"word-break":[`break-normal`,`break-all`,`break-keep`],"overflow-wrap":[`break-words`,`break-anywhere`],"font-variant-numeric":[`tabular-nums`,`proportional-nums`,`lining-nums`,`oldstyle-nums`],"border-style":[`border-solid`,`border-dashed`,`border-dotted`,`border-none`]},jt=(()=>{let e={};for(let[t,n]of Object.entries(K))n!==void 0&&(e[n]??=new Set).add(t);let t={};for(let[n,r]of Object.entries(e))r!==void 0&&(t[n]=Array.from(r));for(let[e,n]of Object.entries(At)){let r=new Set([...t[e]??[],...n]);t[e]=Array.from(r)}return t})(),q={text:`color`,bg:`background-color`,border:`border-color`,"border-x":`border-color`,"border-y":`border-color`,"border-t":`border-color`,"border-r":`border-color`,"border-b":`border-color`,"border-l":`border-color`,"border-s":`border-color`,"border-e":`border-color`,fill:`fill`,stroke:`stroke`},Mt=e=>K[e]!==void 0||q[e]!==void 0,J=e=>{let t=0,n=-1;for(let r=0;r<e.length;r++){let i=e[r];i===`[`?t++:i===`]`?t--:i===`:`&&t===0&&(n=r)}let r=n>=0?e.slice(n+1):e;return r.startsWith(`!`)?r.slice(1):r},Y=e=>{let t=J(e);if(!t)return null;let n=t.indexOf(`[`);if(n>0)return t.slice(0,n).replace(/-$/,``)||null;let r=t.split(`-`).filter(Boolean);if(r.length===0)return null;for(let e=r.length;e>=1;e--){let t=r.slice(0,e).join(`-`);if(Mt(t))return t}return r[0]},Nt=/-(red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose|slate|gray|zinc|neutral|stone|black|white|transparent|current|inherit)\b/,Pt=(e,t)=>e!==`text`&&e!==`bg`&&e!==`border`&&!e.startsWith(`border-`)?!1:Nt.test(t),Ft=new Set(`color.red.orange.amber.yellow.lime.green.emerald.teal.cyan.sky.blue.indigo.violet.purple.fuchsia.pink.rose.slate.gray.grey.zinc.neutral.stone.black.white.transparent.current.currentcolor.inherit.primary.secondary.accent.muted.foreground.background.destructive.success.warning.error.info.card.popover.input.ring`.split(`.`)),It=new Set([`xs`,`sm`,`base`,`lg`,`xl`,`2xl`,`3xl`,`4xl`,`5xl`,`6xl`,`7xl`,`8xl`,`9xl`]),Lt=/^(#|rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color:|color\(|var\(--.*color)/,Rt=/^(-?\d|length:|size:)/,X=e=>e.trim().toLowerCase().replace(/\s+/g,`-`).replace(/([a-z])(\d)/g,`$1-$2`),zt=e=>Lt.test(e)&&!Rt.test(e),Z=(e,t)=>{if(e===t)return``;let n=`${t}-`;return e.startsWith(n)?e.slice(n.length):null},Bt=e=>{let t=J(X(e)),n=Y(t);if(!n)return null;let r=q[n];if(!r)return null;let i=t.indexOf(`[`);if(i>=0)return zt(t.slice(i+1).replace(/\]$/,``))?r:null;let a=Z(t,n);if(a===null)return null;if(n===`bg`&&a===``||(n===`fill`||n===`stroke`)&&a===``)return r;let o=a.split(`-`)[0];return n===`text`&&It.has(o)?null:Ft.has(o)?r:null},Vt={black:`#000000`,white:`#ffffff`,transparent:e.nt},Ht=e=>{let t=J(X(e)),n=Y(t);if(!n||q[n]===void 0||t.includes(`[`))return null;let r=Z(t,n);if(!r)return null;let i=Vt[r];if(i)return i;let a=r.lastIndexOf(`-`);if(a<0)return null;let o=r.slice(0,a),s=o===`grey`?`gray`:o,c=Number.parseInt(r.slice(a+1),10);return kt[s]?.[c]??null},Ut=/^-?\d/,Wt=(e,t)=>{if(t===``||t.startsWith(`[`)||Ut.test(t))return!0;let n=t.split(`-`)[0];return e===`text`?It.has(n):e===`font`||e===`border`||e.startsWith(`border-`)?!1:(e===`rounded`||e.startsWith(`rounded-`),!0)},Gt={"font-sans":{property:`font-family`,value:`ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"`},"font-serif":{property:`font-family`,value:`ui-serif, Georgia, Cambria, "Times New Roman", Times, serif`},"font-mono":{property:`font-family`,value:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace`},"font-thin":{property:`font-weight`,value:`100`},"font-extralight":{property:`font-weight`,value:`200`},"font-light":{property:`font-weight`,value:`300`},"font-normal":{property:`font-weight`,value:`400`},"font-medium":{property:`font-weight`,value:`500`},"font-semibold":{property:`font-weight`,value:`600`},"font-bold":{property:`font-weight`,value:`700`},"font-extrabold":{property:`font-weight`,value:`800`},"font-black":{property:`font-weight`,value:`900`},"text-left":{property:`text-align`,value:`left`},"text-center":{property:`text-align`,value:`center`},"text-right":{property:`text-align`,value:`right`},"text-justify":{property:`text-align`,value:`justify`},italic:{property:`font-style`,value:`italic`},"not-italic":{property:`font-style`,value:`normal`},uppercase:{property:`text-transform`,value:`uppercase`},lowercase:{property:`text-transform`,value:`lowercase`},capitalize:{property:`text-transform`,value:`capitalize`},"normal-case":{property:`text-transform`,value:`none`},underline:{property:`text-decoration-line`,value:`underline`},"line-through":{property:`text-decoration-line`,value:`line-through`},"no-underline":{property:`text-decoration-line`,value:`none`},"whitespace-normal":{property:`white-space`,value:`normal`},"whitespace-nowrap":{property:`white-space`,value:`nowrap`},"whitespace-pre":{property:`white-space`,value:`pre`},"whitespace-pre-line":{property:`white-space`,value:`pre-line`},"whitespace-pre-wrap":{property:`white-space`,value:`pre-wrap`},"whitespace-break-spaces":{property:`white-space`,value:`break-spaces`},"break-normal":{property:`word-break`,value:`normal`},"break-all":{property:`word-break`,value:`break-all`},"break-keep":{property:`word-break`,value:`keep-all`},"break-words":{property:`overflow-wrap`,value:`break-word`},"break-anywhere":{property:`overflow-wrap`,value:`anywhere`},"tabular-nums":{property:`font-variant-numeric`,value:`tabular-nums`},"proportional-nums":{property:`font-variant-numeric`,value:`proportional-nums`},"lining-nums":{property:`font-variant-numeric`,value:`lining-nums`},"oldstyle-nums":{property:`font-variant-numeric`,value:`oldstyle-nums`},"slashed-zero":{property:`font-variant-numeric`,value:`slashed-zero`},"border-solid":{property:`border-style`,value:`solid`},"border-dashed":{property:`border-style`,value:`dashed`},"border-dotted":{property:`border-style`,value:`dotted`},"border-none":{property:`border-style`,value:`none`}},Kt=e=>{let t=X(e);if(!t)return[];let n=$(t);if(n)return[n.property];let r=Bt(t);return r?[r]:[]},qt=e=>{let t=X(e);if(!t)return[];let n=Y(t);if(!n)return[];let r=Z(J(t),n);if(r===null||!Wt(n,r))return[];let i=Q(n);return i?[i]:[]},Jt=e=>{let t=e.getAttribute(`class`);if(!t)return new Set;let n=t.split(/\s+/).filter(Boolean),r=new Set;for(let e of n){let t=Y(e);if(!t||Pt(t,e))continue;let n=$(e);if(n){r.add(n.property);continue}let i=Q(t);i&&r.add(i)}return r},Yt=e=>jt[e]??[],Q=e=>{let t=K[e];return t===void 0?null:t},$=e=>{let t=Gt[J(e)];return t===void 0?null:t},Xt=`react-grab-toolbar-state`,Zt=()=>{try{let t=localStorage.getItem(Xt);if(!t)return null;let n=JSON.parse(t);if(typeof n!=`object`||!n)return null;let r=n,i=typeof r.collapsed==`boolean`?r.collapsed:!1;return{edge:r.edge===`top`||r.edge===`bottom`||r.edge===`left`||r.edge===`right`?r.edge:`bottom`,ratio:typeof r.ratio==`number`?r.ratio:e.Ft,collapsed:i,enabled:!i,defaultAction:typeof r.defaultAction==`string`?r.defaultAction:e.H}}catch(e){console.warn(`[react-grab] Failed to load toolbar state from localStorage:`,e)}return null},Qt=e=>{try{localStorage.setItem(Xt,JSON.stringify(e))}catch(e){console.warn(`[react-grab] Failed to save toolbar state to localStorage:`,e)}},$t=e=>{let[t,n]=c(!1);return t},en=e=>e.key===`Enter`,tn=e=>e.metaKey||e.ctrlKey,nn=(e,t,n={})=>{if(!t.key)return null;if(en(t))return e.find(e=>e.shortcut===`Enter`)??null;if(t.repeat)return null;let r=t.key.toLowerCase();return tn(t)?n.includeModifierShortcuts===!0?e.find(e=>e.shortcut!==void 0&&e.shortcut!==`Enter`&&e.shortcutModifier!==!1&&r===e.shortcut.toLowerCase())??null:null:e.find(e=>e.shortcut!==void 0&&e.shortcutModifier===!1&&r===e.shortcut.toLowerCase())??null},rn=()=>{let e=!1;return{arm:()=>{e=!0},clear:()=>{e=!1},consume:()=>e?(e=!1,!0):!1}};Object.defineProperty(exports,`$`,{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`B`,{enumerable:!0,get:function(){return Xe}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return ft}}),Object.defineProperty(exports,`Ct`,{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return-512}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,`G`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`H`,{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return ut}}),Object.defineProperty(exports,`J`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`K`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return ct}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return 9999}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return-9999}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return bt}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return St}}),Object.defineProperty(exports,`Q`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`R`,{enumerable:!0,get:function(){return st}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,`St`,{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return-128}}),Object.defineProperty(exports,`Tt`,{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,`U`,{enumerable:!0,get:function(){return qe}}),Object.defineProperty(exports,`V`,{enumerable:!0,get:function(){return Je}}),Object.defineProperty(exports,`W`,{enumerable:!0,get:function(){return We}}),Object.defineProperty(exports,`X`,{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,`Y`,{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,`Z`,{enumerable:!0,get:function(){return je}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,`_t`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return Qt}}),Object.defineProperty(exports,`at`,{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return Tt}}),Object.defineProperty(exports,`bt`,{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return Bt}}),Object.defineProperty(exports,`ct`,{enumerable:!0,get:function(){return _e}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return Kt}}),Object.defineProperty(exports,`dt`,{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,`et`,{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,`ft`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(exports,`gt`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return Et}}),Object.defineProperty(exports,`ht`,{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return Zt}}),Object.defineProperty(exports,`it`,{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return pt}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return 384}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return Ht}}),Object.defineProperty(exports,`lt`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,`mt`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return nn}}),Object.defineProperty(exports,`nt`,{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return Jt}}),Object.defineProperty(exports,`ot`,{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,`pt`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`q`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return $t}}),Object.defineProperty(exports,`rt`,{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return Yt}}),Object.defineProperty(exports,`st`,{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return rn}}),Object.defineProperty(exports,`tt`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return qt}}),Object.defineProperty(exports,`ut`,{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return yt}}),Object.defineProperty(exports,`vt`,{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return Ct}}),Object.defineProperty(exports,`wt`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return xt}}),Object.defineProperty(exports,`xt`,{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return .5}}),Object.defineProperty(exports,`yt`,{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,`z`,{enumerable:!0,get:function(){return Qe}});
|