forge-edit 0.1.0-beta.1 → 0.1.0-beta.11

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/index.js ADDED
@@ -0,0 +1,4342 @@
1
+ (function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.appendChild(document.createTextNode(`/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight: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-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-duration:initial;--tw-ease:initial;--tw-content:"";--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--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-gray-100:oklch(96.7% .003 264.542);--color-gray-700:oklch(37.3% .034 259.733);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--radius-sm:.25rem;--radius-md:.375rem;--ease-in-out:cubic-bezier(.4, 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)}}@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,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, 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;-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:where(:not(iframe)){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{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.-top-2{top:calc(var(--spacing) * -2)}.top-0{top:0}.top-\\[1px\\]{top:1px}.top-\\[calc\\(100\\%\\+4px\\)\\]{top:calc(100% + 4px)}.top-\\[calc\\(100\\%\\+8px\\)\\]{top:calc(100% + 8px)}.top-full{top:100%}.left-0{left:0}.left-1\\/2{left:50%}.left-\\[-7px\\]{left:-7px}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-\\[1\\]{z-index:1}.z-\\[2\\]{z-index:2}.z-\\[3\\]{z-index:3}.z-\\[5\\]{z-index:5}.z-\\[9999\\]{z-index:9999}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.m-0{margin:0}.mx-auto{margin-inline:auto}.my-1{margin-block:var(--spacing)}.my-2{margin-block:calc(var(--spacing) * 2)}.mt-1{margin-top:var(--spacing)}.mb-0\\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1\\.5{margin-bottom:calc(var(--spacing) * 1.5)}.box-border{box-sizing:border-box}.block{display:block}.flex{display:flex}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-2{height:calc(var(--spacing) * 2)}.h-2\\.5{height:calc(var(--spacing) * 2.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-40{height:calc(var(--spacing) * 40)}.h-\\[30px\\]{height:30px}.h-full{height:100%}.h-px{height:1px}.max-h-24{max-height:calc(var(--spacing) * 24)}.max-h-\\[220px\\]{max-height:220px}.min-h-\\[60px\\]{min-height:60px}.min-h-\\[120px\\]{min-height:120px}.w-2{width:calc(var(--spacing) * 2)}.w-2\\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-7{width:calc(var(--spacing) * 7)}.w-40{width:calc(var(--spacing) * 40)}.w-\\[1px\\]{width:1px}.w-full{width:100%}.max-w-\\[65px\\]{max-width:65px}.min-w-4{min-width:calc(var(--spacing) * 4)}.min-w-\\[18px\\]{min-width:18px}.min-w-\\[28px\\]{min-width:28px}.min-w-\\[70px\\]{min-width:70px}.min-w-\\[110px\\]{min-width:110px}.min-w-\\[130px\\]{min-width:130px}.min-w-\\[150px\\]{min-width:150px}.min-w-\\[160px\\]{min-width:160px}.min-w-\\[180px\\]{min-width:180px}.min-w-\\[200px\\]{min-width:200px}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.cursor-s-resize{cursor:s-resize}.resize{resize:both}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-\\[4px\\]{gap:4px}.gap-px{gap:1px}:where(.-space-x-px>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(-1px * var(--tw-space-x-reverse));margin-inline-end:calc(-1px * calc(1 - var(--tw-space-x-reverse)))}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-\\[\\#ccc\\]>:not(:last-child)){border-color:#ccc}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-\\[1px\\]{border-radius:1px}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[3px\\]{border-radius:3px}.rounded-\\[4px\\]{border-radius:4px}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t-\\[3px\\]{border-top-left-radius:3px;border-top-right-radius:3px}.rounded-b-\\[3px\\]{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-r-7{border-right-style:var(--tw-border-style);border-right-width:7px}.border-r-8{border-right-style:var(--tw-border-style);border-right-width:8px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-7{border-bottom-style:var(--tw-border-style);border-bottom-width:7px}.border-b-8{border-bottom-style:var(--tw-border-style);border-bottom-width:8px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-7{border-left-style:var(--tw-border-style);border-left-width:7px}.border-l-8{border-left-style:var(--tw-border-style);border-left-width:8px}.border-none{--tw-border-style:none;border-style:none}.border-\\[\\#2c2c2c\\]{border-color:#2c2c2c}.border-\\[\\#4a90d9\\]{border-color:#4a90d9}.border-\\[\\#ccc\\]{border-color:#ccc}.border-\\[\\#d1d5db\\]{border-color:#d1d5db}.border-\\[\\#ddd\\]{border-color:#ddd}.border-\\[\\#eee\\]{border-color:#eee}.border-black{border-color:var(--color-black)}.border-r-transparent{border-right-color:#0000}.border-b-\\[\\#ccc\\]{border-bottom-color:#ccc}.border-b-white{border-bottom-color:var(--color-white)}.border-l-transparent{border-left-color:#0000}.bg-\\[\\#1e1e1e\\]{background-color:#1e1e1e}.bg-\\[\\#888\\]{background-color:#888}.bg-\\[\\#e2e8f0\\]{background-color:#e2e8f0}.bg-\\[\\#e5e7eb\\]{background-color:#e5e7eb}.bg-\\[\\#f0f0f0\\]{background-color:#f0f0f0}.bg-\\[\\#f5f5f5\\]{background-color:#f5f5f5}.bg-\\[rgba\\(74\\,144\\,217\\,0\\.4\\)\\]{background-color:#4a90d966}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-white\\/30{background-color:#ffffff4d}@supports (color:color-mix(in lab, red, red)){.bg-white\\/30{background-color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.bg-\\[linear-gradient\\(rgba\\(0\\,0\\,0\\,0\\.05\\)_1px\\,transparent_1px\\)\\,linear-gradient\\(90deg\\,rgba\\(0\\,0\\,0\\,0\\.05\\)_1px\\,transparent_1px\\)\\]{background-image:linear-gradient(#0000000d 1px,#0000 1px),linear-gradient(90deg,#0000000d 1px,#0000 1px)}.bg-\\[size\\:16px_16px\\]{background-size:16px 16px}.fill-current{fill:currentColor}.fill-none{fill:none}.stroke-black{stroke:var(--color-black)}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-1\\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-\\[5px\\]{padding:5px}.p-\\[10px\\]{padding:10px}.px-0{padding-inline:0}.px-1{padding-inline:var(--spacing)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-\\[7px\\]{padding-inline:7px}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.pt-1\\.5{padding-top:calc(var(--spacing) * 1.5)}.pr-1{padding-right:var(--spacing)}.pr-1\\.5{padding-right:calc(var(--spacing) * 1.5)}.pb-0\\.5{padding-bottom:calc(var(--spacing) * .5)}.pb-1{padding-bottom:var(--spacing)}.pb-12{padding-bottom:calc(var(--spacing) * 12)}.pl-5{padding-left:calc(var(--spacing) * 5)}.text-center{text-align:center}.text-left{text-align:left}.align-top{vertical-align:top}.font-mono{font-family:var(--font-mono)}.font-serif{font-family:var(--font-serif)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[13px\\]{font-size:13px}.text-\\[14px\\]{font-size:14px}.text-\\[15px\\]{font-size:15px}.text-\\[16px\\]{font-size:16px}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.leading-\\[1\\.4\\]{--tw-leading:1.4;line-height:1.4}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-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)}.whitespace-nowrap{white-space:nowrap}.text-\\[\\#333\\]{color:#333}.text-\\[\\#666\\]{color:#666}.text-black{color:var(--color-black)}.text-gray-700{color:var(--color-gray-700)}.text-white{color:var(--color-white)}.not-italic{font-style:normal}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.shadow-\\[0_2px_6px_rgba\\(0\\,0\\,0\\,0\\.15\\)\\]{--tw-shadow:0 2px 6px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[0_2px_8px_rgba\\(0\\,0\\,0\\,0\\.15\\)\\]{--tw-shadow:0 2px 8px var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-\\[inset_0_1px_3px_rgba\\(0\\,0\\,0\\,0\\.2\\)\\]{--tw-shadow:inset 0 1px 3px var(--tw-shadow-color,#0003);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.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,)}.transition-\\[width\\,height\\]{transition-property:width,height;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-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.outline-none{--tw-outline-style:none;outline-style:none}@media (hover:hover){.group-hover\\:visible:is(:where(.group):hover *){visibility:visible}.group-hover\\:opacity-100:is(:where(.group):hover *){opacity:1}}.group-has-\\[\\.is-open\\]\\:hidden:is(:where(.group):has(.is-open) *){display:none}.before\\:absolute:before{content:var(--tw-content);position:absolute}.before\\:bottom-full:before{content:var(--tw-content);bottom:100%}.before\\:left-1\\/2:before{content:var(--tw-content);left:50%}.before\\:-translate-x-1\\/2:before{content:var(--tw-content);--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.before\\:border-x-\\[5px\\]:before{content:var(--tw-content);border-inline-style:var(--tw-border-style);border-inline-width:5px}.before\\:border-t-0:before{content:var(--tw-content);border-top-style:var(--tw-border-style);border-top-width:0}.before\\:border-b-\\[5px\\]:before{content:var(--tw-content);border-bottom-style:var(--tw-border-style);border-bottom-width:5px}.before\\:border-solid:before{content:var(--tw-content);--tw-border-style:solid;border-style:solid}.before\\:border-x-transparent:before{content:var(--tw-content);border-inline-color:#0000}.before\\:border-b-\\[\\#2c2c2c\\]:before{content:var(--tw-content);border-bottom-color:#2c2c2c}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:bottom-full:after{content:var(--tw-content);bottom:100%}.after\\:left-1\\/2:after{content:var(--tw-content);left:50%}.after\\:-translate-x-1\\/2:after{content:var(--tw-content);--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.after\\:translate-y-\\[1px\\]:after{content:var(--tw-content);--tw-translate-y:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.after\\:border-x-\\[4px\\]:after{content:var(--tw-content);border-inline-style:var(--tw-border-style);border-inline-width:4px}.after\\:border-t-0:after{content:var(--tw-content);border-top-style:var(--tw-border-style);border-top-width:0}.after\\:border-b-\\[4px\\]:after{content:var(--tw-content);border-bottom-style:var(--tw-border-style);border-bottom-width:4px}.after\\:border-solid:after{content:var(--tw-content);--tw-border-style:solid;border-style:solid}.after\\:border-x-transparent:after{content:var(--tw-content);border-inline-color:#0000}.after\\:border-b-\\[\\#1e1e1e\\]:after{content:var(--tw-content);border-bottom-color:#1e1e1e}.last\\:border-r-0:last-child{border-right-style:var(--tw-border-style);border-right-width:0}.last\\:pr-0:last-child{padding-right:0}@media (hover:hover){.hover\\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\\:border-\\[\\#999\\]:hover{border-color:#999}.hover\\:border-\\[\\#aaa\\]:hover{border-color:#aaa}.hover\\:border-black:hover{border-color:var(--color-black)}.hover\\:bg-\\[\\#e6e6e6\\]:hover{background-color:#e6e6e6}.hover\\:bg-\\[\\#f0f0f0\\]:hover{background-color:#f0f0f0}.hover\\:bg-\\[\\#f5f5f5\\]:hover{background-color:#f5f5f5}.hover\\:bg-\\[\\#f9f9f9\\]:hover{background-color:#f9f9f9}.hover\\:bg-black\\/5:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.hover\\:bg-gray-100:hover{background-color:var(--color-gray-100)}}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\\:translate-y-px:active{--tw-translate-y:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.active\\:bg-\\[\\#d0d0d0\\]:active{background-color:#d0d0d0}.active\\:bg-\\[\\#e8e8e8\\]:active{background-color:#e8e8e8}.rtl\\:right-0:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){right:0}.rtl\\:left-1\\/2:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){left:50%}.rtl\\:left-auto:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){left:auto}.rtl\\:-translate-x-1\\/2:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *){--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}:where(.rtl\\:divide-x-reverse:where(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)),[dir=rtl],[dir=rtl] *)>:not(:last-child)){--tw-divide-x-reverse:1}.\\[\\&_blockquote\\]\\:my-2 blockquote{margin-block:calc(var(--spacing) * 2)}.\\[\\&_blockquote\\]\\:border-l-4 blockquote{border-left-style:var(--tw-border-style);border-left-width:4px}.\\[\\&_blockquote\\]\\:border-\\[\\#ccc\\] blockquote{border-color:#ccc}.\\[\\&_blockquote\\]\\:pl-4 blockquote{padding-left:calc(var(--spacing) * 4)}.\\[\\&_blockquote\\]\\:italic blockquote{font-style:italic}.\\[\\&_h1\\]\\:text-2xl h1{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.\\[\\&_h1\\]\\:font-bold h1{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\\[\\&_h2\\]\\:text-xl h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\\[\\&_h2\\]\\:font-bold h2{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\\[\\&_h3\\]\\:text-lg h3{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\\[\\&_h3\\]\\:font-bold h3{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.\\[\\&_pre\\]\\:rounded pre{border-radius:.25rem}.\\[\\&_pre\\]\\:bg-\\[\\#f4f4f4\\] pre{background-color:#f4f4f4}.\\[\\&_pre\\]\\:p-2 pre{padding:calc(var(--spacing) * 2)}.\\[\\&\\.is-active\\]\\:bg-\\[\\#e5e5e5\\].is-active{background-color:#e5e5e5}.\\[\\&\\.is-open\\]\\:block.is-open{display:block}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@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-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-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-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
2
+ //#region \0rolldown/runtime.js
3
+ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), s = (e, i, o, s) => {
4
+ if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, {
5
+ get: ((e) => i[e]).bind(null, d),
6
+ enumerable: !(s = n(i, d)) || s.enumerable
7
+ });
8
+ return e;
9
+ }, c = (n, r, o) => (o = n == null ? {} : e(i(n)), s(r || !n || !n.__esModule || !a.call(n, "default") ? t(o, "default", {
10
+ value: n,
11
+ enumerable: !0
12
+ }) : o, n));
13
+ //#endregion
14
+ //#region src/components/shared/Hooks/options.js
15
+ function l(e) {
16
+ return {
17
+ type: e.getAttribute("type") || "light",
18
+ placeholder: e.getAttribute("placeholder") || "",
19
+ width: e.getAttribute("width") || "100%",
20
+ height: e.getAttribute("height") || "300px",
21
+ lang: e.getAttribute("lang") || "en",
22
+ dir: e.getAttribute("dir") || "ltr"
23
+ };
24
+ }
25
+ //#endregion
26
+ //#region node_modules/preact/dist/preact.module.js
27
+ var u, d, f, p, m, h, g, _, v, y, b, x, S, C, w = {}, T = [], E = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, D = Array.isArray;
28
+ function O(e, t) {
29
+ for (var n in t) e[n] = t[n];
30
+ return e;
31
+ }
32
+ function ee(e) {
33
+ e && e.parentNode && e.parentNode.removeChild(e);
34
+ }
35
+ function te(e, t, n) {
36
+ var r, i, a, o = {};
37
+ for (a in t) a == "key" ? r = t[a] : a == "ref" ? i = t[a] : o[a] = t[a];
38
+ if (arguments.length > 2 && (o.children = arguments.length > 3 ? u.call(arguments, 2) : n), typeof e == "function" && e.defaultProps != null) for (a in e.defaultProps) o[a] === void 0 && (o[a] = e.defaultProps[a]);
39
+ return k(e, o, r, i, null);
40
+ }
41
+ function k(e, t, n, r, i) {
42
+ var a = {
43
+ type: e,
44
+ props: t,
45
+ key: n,
46
+ ref: r,
47
+ __k: null,
48
+ __: null,
49
+ __b: 0,
50
+ __e: null,
51
+ __c: null,
52
+ constructor: void 0,
53
+ __v: i ?? ++f,
54
+ __i: -1,
55
+ __u: 0
56
+ };
57
+ return i == null && d.vnode != null && d.vnode(a), a;
58
+ }
59
+ function ne(e) {
60
+ return e.children;
61
+ }
62
+ function re(e, t) {
63
+ this.props = e, this.context = t;
64
+ }
65
+ function A(e, t) {
66
+ if (t == null) return e.__ ? A(e.__, e.__i + 1) : null;
67
+ for (var n; t < e.__k.length; t++) if ((n = e.__k[t]) != null && n.__e != null) return n.__e;
68
+ return typeof e.type == "function" ? A(e) : null;
69
+ }
70
+ function ie(e) {
71
+ if (e.__P && e.__d) {
72
+ var t = e.__v, n = t.__e, r = [], i = [], a = O({}, t);
73
+ a.__v = t.__v + 1, d.vnode && d.vnode(a), pe(e.__P, a, t, e.__n, e.__P.namespaceURI, 32 & t.__u ? [n] : null, r, n ?? A(t), !!(32 & t.__u), i), a.__v = t.__v, a.__.__k[a.__i] = a, P(r, a, i), t.__e = t.__ = null, a.__e != n && j(a);
74
+ }
75
+ }
76
+ function j(e) {
77
+ if ((e = e.__) != null && e.__c != null) return e.__e = e.__c.base = null, e.__k.some(function(t) {
78
+ if (t != null && t.__e != null) return e.__e = e.__c.base = t.__e;
79
+ }), j(e);
80
+ }
81
+ function ae(e) {
82
+ (!e.__d && (e.__d = !0) && p.push(e) && !M.__r++ || m != d.debounceRendering) && ((m = d.debounceRendering) || h)(M);
83
+ }
84
+ function M() {
85
+ try {
86
+ for (var e, t = 1; p.length;) p.length > t && p.sort(g), e = p.shift(), t = p.length, ie(e);
87
+ } finally {
88
+ p.length = M.__r = 0;
89
+ }
90
+ }
91
+ function oe(e, t, n, r, i, a, o, s, c, l, u) {
92
+ var d, f, p, m, h, g, _ = r && r.__k || T, v = t.length;
93
+ for (c = se(n, t, _, c, v), d = 0; d < v; d++) (p = n.__k[d]) != null && (f = p.__i != -1 && _[p.__i] || w, p.__i = d, g = pe(e, p, f, i, a, o, s, c, l, u), m = p.__e, p.ref && f.ref != p.ref && (f.ref && he(f.ref, null, p), u.push(p.ref, p.__c || m, p)), h == null && m != null && (h = m), 4 & p.__u ? (c = ce(p, c, e), f.__e && (f.__e = null)) : typeof p.type == "function" && g !== void 0 ? c = g : m && (c = m.nextSibling), p.__u &= -7);
94
+ return n.__e = h, c;
95
+ }
96
+ function se(e, t, n, r, i) {
97
+ var a, o, s, c, l, u = n.length, d = u, f = 0;
98
+ for (e.__k = Array(i), a = 0; a < i; a++) (o = t[a]) != null && typeof o != "boolean" && typeof o != "function" ? (typeof o == "string" || typeof o == "number" || typeof o == "bigint" || o.constructor == String ? o = e.__k[a] = k(null, o, null, null, null) : D(o) ? o = e.__k[a] = k(ne, { children: o }, null, null, null) : o.constructor === void 0 && o.__b > 0 ? o = e.__k[a] = k(o.type, o.props, o.key, o.ref ? o.ref : null, o.__v) : e.__k[a] = o, c = a + f, o.__ = e, o.__b = e.__b + 1, s = null, (l = o.__i = le(o, n, c, d)) != -1 && (d--, (s = n[l]) && (s.__u |= 2)), s == null || s.__v == null ? (l == -1 && (i > u ? f-- : i < u && f++), typeof o.type != "function" && (o.__u |= 4)) : l != c && (l == c - 1 ? f-- : l == c + 1 ? f++ : (l > c ? f-- : f++, o.__u |= 4))) : e.__k[a] = null;
99
+ if (d) for (a = 0; a < u; a++) (s = n[a]) != null && !(2 & s.__u) && (s.__e == r && (r = A(s)), ge(s, s));
100
+ return r;
101
+ }
102
+ function ce(e, t, n) {
103
+ var r, i;
104
+ if (typeof e.type == "function") {
105
+ for (r = e.__k, i = 0; r && i < r.length; i++) r[i] && (r[i].__ = e, t = ce(r[i], t, n));
106
+ return t;
107
+ }
108
+ e.__e != t && (t && e.type && !t.parentNode && (t = A(e)), t = n.insertBefore(e.__e, t || null));
109
+ do
110
+ t &&= t.nextSibling;
111
+ while (t != null && t.nodeType == 8);
112
+ return t;
113
+ }
114
+ function le(e, t, n, r) {
115
+ var i, a, o, s = e.key, c = e.type, l = t[n], u = l != null && !(2 & l.__u);
116
+ if (l === null && s == null || u && s == l.key && c == l.type) return n;
117
+ if (r > +!!u) {
118
+ for (i = n - 1, a = n + 1; i >= 0 || a < t.length;) if ((l = t[o = i >= 0 ? i-- : a++]) != null && !(2 & l.__u) && s == l.key && c == l.type) return o;
119
+ }
120
+ return -1;
121
+ }
122
+ function ue(e, t, n) {
123
+ t[0] == "-" ? e.setProperty(t, n ?? "") : e[t] = n == null ? "" : typeof n != "number" || E.test(t) ? n : n + "px";
124
+ }
125
+ function de(e, t, n, r, i) {
126
+ var a, o;
127
+ n: if (t == "style") {
128
+ if (typeof n == "string") e.style.cssText = n;
129
+ else {
130
+ if (typeof r == "string" && (e.style.cssText = r = ""), r) for (t in r) n && t in n || ue(e.style, t, "");
131
+ if (n) for (t in n) r && n[t] == r[t] || ue(e.style, t, n[t]);
132
+ }
133
+ } else if (t[0] == "o" && t[1] == "n") a = t != (t = t.replace(b, "$1")), o = t.toLowerCase(), t = o in e || t == "onFocusOut" || t == "onFocusIn" ? o.slice(2) : t.slice(2), e.l ||= {}, e.l[t + a] = n, n ? r ? n[y] = r[y] : (n[y] = x, e.addEventListener(t, a ? C : S, a)) : e.removeEventListener(t, a ? C : S, a);
134
+ else {
135
+ if (i == "http://www.w3.org/2000/svg") t = t.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
136
+ else if (t != "width" && t != "height" && t != "href" && t != "list" && t != "form" && t != "tabIndex" && t != "download" && t != "rowSpan" && t != "colSpan" && t != "role" && t != "popover" && t in e) try {
137
+ e[t] = n ?? "";
138
+ break n;
139
+ } catch {}
140
+ typeof n == "function" || (n == null || !1 === n && t[4] != "-" ? e.removeAttribute(t) : e.setAttribute(t, t == "popover" && n == 1 ? "" : n));
141
+ }
142
+ }
143
+ function fe(e) {
144
+ return function(t) {
145
+ if (this.l) {
146
+ var n = this.l[t.type + e];
147
+ if (t[v] == null) t[v] = x++;
148
+ else if (t[v] < n[y]) return;
149
+ return n(d.event ? d.event(t) : t);
150
+ }
151
+ };
152
+ }
153
+ function pe(e, t, n, r, i, a, o, s, c, l) {
154
+ var u, f, p, m, h, g, _, v, y, b, x, S, C, w, E, te, k = t.type;
155
+ if (t.constructor !== void 0) return null;
156
+ 128 & n.__u && (c = !!(32 & n.__u), a = [s = t.__e = n.__e]), (u = d.__b) && u(t);
157
+ n: if (typeof k == "function") {
158
+ f = o.length;
159
+ try {
160
+ if (y = t.props, b = k.prototype && k.prototype.render, x = (u = k.contextType) && r[u.__c], S = u ? x ? x.props.value : u.__ : r, n.__c ? v = (p = t.__c = n.__c).__ = p.__E : (b ? t.__c = p = new k(y, S) : (t.__c = p = new re(y, S), p.constructor = k, p.render = _e), x && x.sub(p), p.state || (p.state = {}), p.__n = r, m = p.__d = !0, p.__h = [], p._sb = []), b && p.__s == null && (p.__s = p.state), b && k.getDerivedStateFromProps != null && (p.__s == p.state && (p.__s = O({}, p.__s)), O(p.__s, k.getDerivedStateFromProps(y, p.__s))), h = p.props, g = p.state, p.__v = t, m) b && k.getDerivedStateFromProps == null && p.componentWillMount != null && p.componentWillMount(), b && p.componentDidMount != null && p.__h.push(p.componentDidMount);
161
+ else {
162
+ if (b && k.getDerivedStateFromProps == null && y !== h && p.componentWillReceiveProps != null && p.componentWillReceiveProps(y, S), t.__v == n.__v || !p.__e && p.shouldComponentUpdate != null && !1 === p.shouldComponentUpdate(y, p.__s, S)) {
163
+ t.__v != n.__v && (p.props = y, p.state = p.__s, p.__d = !1), t.__e = n.__e, t.__k = n.__k, t.__k.some(function(e) {
164
+ e && (e.__ = t);
165
+ }), T.push.apply(p.__h, p._sb), p._sb = [], p.__h.length && o.push(p), s = A(n);
166
+ break n;
167
+ }
168
+ p.componentWillUpdate != null && p.componentWillUpdate(y, p.__s, S), b && p.componentDidUpdate != null && p.__h.push(function() {
169
+ p.componentDidUpdate(h, g, _);
170
+ });
171
+ }
172
+ if (p.context = S, p.props = y, p.__P = e, p.__e = !1, C = d.__r, w = 0, b) p.state = p.__s, p.__d = !1, C && C(t), u = p.render(p.props, p.state, p.context), T.push.apply(p.__h, p._sb), p._sb = [];
173
+ else do
174
+ p.__d = !1, C && C(t), u = p.render(p.props, p.state, p.context), p.state = p.__s;
175
+ while (p.__d && ++w < 25);
176
+ p.state = p.__s, p.getChildContext != null && (r = O(O({}, r), p.getChildContext())), b && !m && p.getSnapshotBeforeUpdate != null && (_ = p.getSnapshotBeforeUpdate(h, g)), E = u != null && u.type === ne && u.key == null ? me(u.props.children) : u, s = oe(e, D(E) ? E : [E], t, n, r, i, a, o, s, c, l), p.base = t.__e, t.__u &= -161, p.__h.length && o.push(p), v && (p.__E = p.__ = null);
177
+ } catch (e) {
178
+ if (o.length = f, t.__v = null, c || a != null) {
179
+ if (e.then) {
180
+ for (t.__u |= c ? 160 : 128; s && s.nodeType == 8 && s.nextSibling;) s = s.nextSibling;
181
+ a != null && (a[a.indexOf(s)] = null), t.__e = s;
182
+ } else if (a != null) for (te = a.length; te--;) ee(a[te]);
183
+ } else t.__e = n.__e;
184
+ t.__k ??= n.__k || [], e.then || N(t), d.__e(e, t, n);
185
+ }
186
+ } else a == null && t.__v == n.__v ? (t.__k = n.__k, t.__e = n.__e) : s = t.__e = F(n.__e, t, n, r, i, a, o, c, l);
187
+ return (u = d.diffed) && u(t), 128 & t.__u ? void 0 : s;
188
+ }
189
+ function N(e) {
190
+ e && (e.__c && (e.__c.__e = !0), e.__k && e.__k.some(N));
191
+ }
192
+ function P(e, t, n) {
193
+ for (var r = 0; r < n.length; r++) he(n[r], n[++r], n[++r]);
194
+ d.__c && d.__c(t, e), e.some(function(t) {
195
+ try {
196
+ e = t.__h, t.__h = [], e.some(function(e) {
197
+ e.call(t);
198
+ });
199
+ } catch (e) {
200
+ d.__e(e, t.__v);
201
+ }
202
+ });
203
+ }
204
+ function me(e) {
205
+ return typeof e != "object" || !e || e.__b > 0 ? e : D(e) ? e.map(me) : e.constructor === void 0 ? O({}, e) : null;
206
+ }
207
+ function F(e, t, n, r, i, a, o, s, c) {
208
+ var l, f, p, m, h, g, _, v = n.props || w, y = t.props, b = t.type;
209
+ if (b == "svg" ? i = "http://www.w3.org/2000/svg" : b == "math" ? i = "http://www.w3.org/1998/Math/MathML" : i ||= "http://www.w3.org/1999/xhtml", a != null) {
210
+ for (l = 0; l < a.length; l++) if ((h = a[l]) && "setAttribute" in h == !!b && (b ? h.localName == b : h.nodeType == 3)) {
211
+ e = h, a[l] = null;
212
+ break;
213
+ }
214
+ }
215
+ if (e == null) {
216
+ if (b == null) return document.createTextNode(y);
217
+ e = document.createElementNS(i, b, y.is && y), s &&= (d.__m && d.__m(t, a), !1), a = null;
218
+ }
219
+ if (b == null) v === y || s && e.data == y || (e.data = y);
220
+ else {
221
+ if (a = b == "textarea" && y.defaultValue != null ? null : a && u.call(e.childNodes), !s && a != null) for (v = {}, l = 0; l < e.attributes.length; l++) v[(h = e.attributes[l]).name] = h.value;
222
+ for (l in v) h = v[l], l == "dangerouslySetInnerHTML" ? p = h : l == "children" || l in y || l == "value" && "defaultValue" in y || l == "checked" && "defaultChecked" in y || de(e, l, null, h, i);
223
+ for (l in y) h = y[l], l == "children" ? m = h : l == "dangerouslySetInnerHTML" ? f = h : l == "value" ? g = h : l == "checked" ? _ = h : s && typeof h != "function" || v[l] === h || de(e, l, h, v[l], i);
224
+ if (f) s || p && (f.__html == p.__html || f.__html == e.innerHTML) || (e.innerHTML = f.__html), t.__k = [];
225
+ else if (p && (e.innerHTML = ""), oe(t.type == "template" ? e.content : e, D(m) ? m : [m], t, n, r, b == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, a, o, a ? a[0] : n.__k && A(n, 0), s, c), a != null) for (l = a.length; l--;) ee(a[l]);
226
+ s && b != "textarea" || (l = "value", b == "progress" && g == null ? e.removeAttribute("value") : g != null && (g !== e[l] || b == "progress" && !g || b == "option" && g != v[l]) && de(e, l, g, v[l], i), l = "checked", _ != null && _ != e[l] && de(e, l, _, v[l], i));
227
+ }
228
+ return e;
229
+ }
230
+ function he(e, t, n) {
231
+ try {
232
+ if (typeof e == "function") {
233
+ var r = typeof e.__u == "function";
234
+ r && e.__u(), r && t == null || (e.__u = e(t));
235
+ } else e.current = t;
236
+ } catch (e) {
237
+ d.__e(e, n);
238
+ }
239
+ }
240
+ function ge(e, t, n) {
241
+ var r, i;
242
+ if (d.unmount && d.unmount(e), (r = e.ref) && (r.current && r.current != e.__e || he(r, null, t)), (r = e.__c) != null) {
243
+ if (r.componentWillUnmount) try {
244
+ r.componentWillUnmount();
245
+ } catch (e) {
246
+ d.__e(e, t);
247
+ }
248
+ r.base = r.__P = r.__n = null;
249
+ }
250
+ if (r = e.__k) for (i = 0; i < r.length; i++) r[i] && ge(r[i], t, n || typeof e.type != "function");
251
+ n || ee(e.__e), e.__c = e.__ = e.__e = void 0;
252
+ }
253
+ function _e(e, t, n) {
254
+ return this.constructor(e, n);
255
+ }
256
+ function I(e, t, n) {
257
+ var r, i, a, o;
258
+ t == document && (t = document.documentElement), d.__ && d.__(e, t), i = (r = typeof n == "function") ? null : n && n.__k || t.__k, a = [], o = [], pe(t, e = (!r && n || t).__k = te(ne, null, [e]), i || w, w, t.namespaceURI, !r && n ? [n] : i ? null : t.firstChild ? u.call(t.childNodes) : null, a, !r && n ? n : i ? i.__e : t.firstChild, r, o), P(a, e, o), e.props.children = null;
259
+ }
260
+ u = T.slice, d = { __e: function(e, t, n, r) {
261
+ for (var i, a, o; t = t.__;) if ((i = t.__c) && !i.__) try {
262
+ if ((a = i.constructor) && a.getDerivedStateFromError != null && (i.setState(a.getDerivedStateFromError(e)), o = i.__d), i.componentDidCatch != null && (i.componentDidCatch(e, r || {}), o = i.__d), o) return i.__E = i;
263
+ } catch (t) {
264
+ e = t;
265
+ }
266
+ throw e;
267
+ } }, f = 0, re.prototype.setState = function(e, t) {
268
+ var n = this.__s != null && this.__s != this.state ? this.__s : this.__s = O({}, this.state);
269
+ typeof e == "function" && (e = e(O({}, n), this.props)), e && O(n, e), e != null && this.__v && (t && this._sb.push(t), ae(this));
270
+ }, re.prototype.forceUpdate = function(e) {
271
+ this.__v && (this.__e = !0, e && this.__h.push(e), ae(this));
272
+ }, re.prototype.render = ne, p = [], h = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, g = function(e, t) {
273
+ return e.__v.__b - t.__v.__b;
274
+ }, M.__r = 0, _ = Math.random().toString(8), v = "__d" + _, y = "__a" + _, b = /(PointerCapture)$|Capture$/i, x = 0, S = fe(!1), C = fe(!0);
275
+ //#endregion
276
+ //#region node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
277
+ var L = 0;
278
+ Array.isArray;
279
+ function R(e, t, n, r, i, a) {
280
+ t ||= {};
281
+ var o, s, c = t;
282
+ if ("ref" in c) for (s in c = {}, t) s == "ref" ? o = t[s] : c[s] = t[s];
283
+ var l = {
284
+ type: e,
285
+ props: c,
286
+ key: n,
287
+ ref: o,
288
+ __k: null,
289
+ __: null,
290
+ __b: 0,
291
+ __e: null,
292
+ __c: null,
293
+ constructor: void 0,
294
+ __v: --L,
295
+ __i: -1,
296
+ __u: 0,
297
+ __source: i,
298
+ __self: a
299
+ };
300
+ if (typeof e == "function" && (o = e.defaultProps)) for (s in o) c[s] === void 0 && (c[s] = o[s]);
301
+ return d.vnode && d.vnode(l), l;
302
+ }
303
+ //#endregion
304
+ //#region src/components/shared/toolbar/Style/Components/StyleToolbar.jsx
305
+ function ve() {
306
+ let e = "forge-dropdown-item block w-full text-left cursor-pointer whitespace-nowrap px-3 py-1 text-[#333] no-underline transition-colors duration-100 hover:bg-[#f0f0f0]";
307
+ return /* @__PURE__ */ R("div", {
308
+ className: "forge-toolbar-group forge-toolbar-style flex items-center gap-0.5",
309
+ children: /* @__PURE__ */ R("div", {
310
+ className: "relative group",
311
+ children: [/* @__PURE__ */ R("button", {
312
+ type: "button",
313
+ className: "forge-toolbar-button group relative flex h-7 cursor-pointer items-center justify-center rounded-[2px] border border-[#ccc] bg-white px-2 text-sm leading-none transition-all duration-150 hover:bg-[#f0f0f0] active:translate-y-px [&.is-active]:bg-[#e5e5e5]",
314
+ "data-command": "style",
315
+ "aria-label": "Style",
316
+ children: [/* @__PURE__ */ R("span", {
317
+ className: "forge-icon",
318
+ children: "✦"
319
+ }), /* @__PURE__ */ R("span", {
320
+ className: "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 group-has-[.is-open]:hidden rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]",
321
+ "data-i18n": "style",
322
+ children: "Style"
323
+ })]
324
+ }), /* @__PURE__ */ R("div", {
325
+ className: "forge-toolbar-dropdown forge-dropdown-style absolute left-0 top-[calc(100%+4px)] z-20 hidden [&.is-open]:block max-h-24 min-w-[110px] overflow-y-auto rounded-[2px] border border-[#ccc] bg-white p-0 shadow-[0_2px_6px_rgba(0,0,0,0.15)] rtl:left-auto rtl:right-0",
326
+ role: "list",
327
+ "aria-label": "Style",
328
+ children: [
329
+ /* @__PURE__ */ R("button", {
330
+ type: "button",
331
+ className: e,
332
+ "data-value": "p",
333
+ role: "listitem",
334
+ children: /* @__PURE__ */ R("p", {
335
+ className: "m-0 text-[13px] font-normal leading-[1.4]",
336
+ children: "Normal"
337
+ })
338
+ }),
339
+ /* @__PURE__ */ R("button", {
340
+ type: "button",
341
+ className: e,
342
+ "data-value": "blockquote",
343
+ role: "listitem",
344
+ children: /* @__PURE__ */ R("blockquote", {
345
+ className: "m-0 text-[13px] font-normal leading-[1.4]",
346
+ children: "Blockquote"
347
+ })
348
+ }),
349
+ /* @__PURE__ */ R("button", {
350
+ type: "button",
351
+ className: e,
352
+ "data-value": "pre",
353
+ role: "listitem",
354
+ children: /* @__PURE__ */ R("pre", {
355
+ className: "m-0 font-mono text-[13px] leading-[1.4]",
356
+ children: "Code"
357
+ })
358
+ }),
359
+ /* @__PURE__ */ R("button", {
360
+ type: "button",
361
+ className: e,
362
+ "data-value": "h1",
363
+ role: "listitem",
364
+ children: /* @__PURE__ */ R("h1", {
365
+ className: "m-0 text-[20px] font-normal leading-[1.4]",
366
+ children: "Heading 1"
367
+ })
368
+ }),
369
+ /* @__PURE__ */ R("button", {
370
+ type: "button",
371
+ className: e,
372
+ "data-value": "h2",
373
+ role: "listitem",
374
+ children: /* @__PURE__ */ R("h2", {
375
+ className: "m-0 text-[18px] font-normal leading-[1.4]",
376
+ children: "Heading 2"
377
+ })
378
+ }),
379
+ /* @__PURE__ */ R("button", {
380
+ type: "button",
381
+ className: e,
382
+ "data-value": "h3",
383
+ role: "listitem",
384
+ children: /* @__PURE__ */ R("h3", {
385
+ className: "m-0 text-[16px] font-normal leading-[1.4]",
386
+ children: "Heading 3"
387
+ })
388
+ }),
389
+ /* @__PURE__ */ R("button", {
390
+ type: "button",
391
+ className: e,
392
+ "data-value": "h4",
393
+ role: "listitem",
394
+ children: /* @__PURE__ */ R("h4", {
395
+ className: "m-0 text-[15px] font-normal leading-[1.4]",
396
+ children: "Heading 4"
397
+ })
398
+ }),
399
+ /* @__PURE__ */ R("button", {
400
+ type: "button",
401
+ className: e,
402
+ "data-value": "h5",
403
+ role: "listitem",
404
+ children: /* @__PURE__ */ R("h5", {
405
+ className: "m-0 text-[14px] font-normal leading-[1.4]",
406
+ children: "Heading 5"
407
+ })
408
+ }),
409
+ /* @__PURE__ */ R("button", {
410
+ type: "button",
411
+ className: e,
412
+ "data-value": "h6",
413
+ role: "listitem",
414
+ children: /* @__PURE__ */ R("h6", {
415
+ className: "m-0 text-[13px] font-normal leading-[1.4]",
416
+ children: "Heading 6"
417
+ })
418
+ })
419
+ ]
420
+ })]
421
+ })
422
+ });
423
+ }
424
+ //#endregion
425
+ //#region src/components/shared/toolbar/Style/Components/index.jsx
426
+ function z() {
427
+ return ve();
428
+ }
429
+ //#endregion
430
+ //#region src/components/shared/toolbar/font/Components/FontToolbar.jsx
431
+ function B({ onCommand: e, isBold: t, isUnderline: n }) {
432
+ let r = "group relative flex h-7 w-7 items-center justify-center p-0 text-sm leading-none cursor-pointer transition-colors duration-150 active:translate-y-px", i = "bg-white text-[#333] hover:bg-[#f0f0f0]", a = "bg-[#e2e8f0] text-black border-inner shadow-[inset_0_1px_3px_rgba(0,0,0,0.2)] font-bold", o = "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]";
433
+ return /* @__PURE__ */ R("div", {
434
+ className: "forge-toolbar-group forge-toolbar-font inline-flex items-center rounded-sm border border-[#ccc] bg-white divide-x divide-[#ccc] rtl:divide-x-reverse",
435
+ children: [
436
+ /* @__PURE__ */ R("button", {
437
+ type: "button",
438
+ className: `${r} ${t ? a : i}`,
439
+ onClick: () => e("bold"),
440
+ "aria-label": "Bold",
441
+ children: [/* @__PURE__ */ R("span", {
442
+ className: "text-sm font-bold font-serif",
443
+ children: "B"
444
+ }), /* @__PURE__ */ R("span", {
445
+ className: o,
446
+ "data-i18n": "bold",
447
+ children: "Bold"
448
+ })]
449
+ }),
450
+ /* @__PURE__ */ R("button", {
451
+ type: "button",
452
+ className: `${r} ${n ? a : i}`,
453
+ onClick: () => e("underline"),
454
+ "aria-label": "Underline",
455
+ children: [/* @__PURE__ */ R("span", {
456
+ className: "text-sm font-bold font-serif underline",
457
+ children: "U"
458
+ }), /* @__PURE__ */ R("span", {
459
+ className: o,
460
+ "data-i18n": "underline",
461
+ children: "Underline"
462
+ })]
463
+ }),
464
+ /* @__PURE__ */ R("button", {
465
+ type: "button",
466
+ className: `${r} ${i}`,
467
+ onClick: () => e("removeFormat"),
468
+ "aria-label": "Remove Font Style",
469
+ children: [/* @__PURE__ */ R("span", {
470
+ className: "inline-block h-4 w-4 text-center text-sm leading-none",
471
+ children: /* @__PURE__ */ R("svg", {
472
+ viewBox: "0 0 20 20",
473
+ className: "block h-4 w-4 fill-none stroke-black",
474
+ strokeWidth: "2",
475
+ children: /* @__PURE__ */ R("path", { d: "M 4 4 L 16 16 M 16 4 L 4 16" })
476
+ })
477
+ }), /* @__PURE__ */ R("span", {
478
+ className: o,
479
+ "data-i18n": "removeFormat",
480
+ children: "Remove Font Style"
481
+ })]
482
+ })
483
+ ]
484
+ });
485
+ }
486
+ //#endregion
487
+ //#region node_modules/preact/hooks/dist/hooks.module.js
488
+ var ye, V, be, H, xe = 0, Se = [], U = d, Ce = U.__b, we = U.__r, Te = U.diffed, Ee = U.__c, De = U.unmount, Oe = U.__;
489
+ function W(e, t) {
490
+ U.__h && U.__h(V, e, xe || t), xe = 0;
491
+ var n = V.__H || (V.__H = {
492
+ __: [],
493
+ __h: []
494
+ });
495
+ return e >= n.__.length && n.__.push({}), n.__[e];
496
+ }
497
+ function G(e) {
498
+ return xe = 1, ke(Le, e);
499
+ }
500
+ function ke(e, t, n) {
501
+ var r = W(ye++, 2);
502
+ if (r.t = e, !r.__c && (r.__ = [n ? n(t) : Le(void 0, t), function(e) {
503
+ var t = r.__N ? r.__N[0] : r.__[0], n = r.t(t, e);
504
+ t !== n && (r.__N = [n, r.__[1]], r.__c.setState({}));
505
+ }], r.__c = V, !V.__f)) {
506
+ var i = function(e, t, n) {
507
+ if (!r.__c.__H) return !0;
508
+ var i = !1, o = r.__c.props !== e;
509
+ if (r.__c.__H.__.some(function(e) {
510
+ if (e.__N) {
511
+ i = !0;
512
+ var t = e.__[0];
513
+ e.__ = e.__N, e.__N = void 0, t !== e.__[0] && (o = !0);
514
+ }
515
+ }), a) {
516
+ var s = a.call(this, e, t, n);
517
+ return i ? s || o : s;
518
+ }
519
+ return !i || o;
520
+ };
521
+ V.__f = !0;
522
+ var a = V.shouldComponentUpdate, o = V.componentWillUpdate;
523
+ V.componentWillUpdate = function(e, t, n) {
524
+ if (this.__e) {
525
+ var r = a;
526
+ a = void 0, i(e, t, n), a = r;
527
+ }
528
+ o && o.call(this, e, t, n);
529
+ }, V.shouldComponentUpdate = i;
530
+ }
531
+ return r.__N || r.__;
532
+ }
533
+ function K(e, t) {
534
+ var n = W(ye++, 3);
535
+ !U.__s && Ie(n.__H, t) && (n.__ = e, n.u = t, V.__H.__h.push(n));
536
+ }
537
+ function q(e) {
538
+ return xe = 5, Ae(function() {
539
+ return { current: e };
540
+ }, []);
541
+ }
542
+ function Ae(e, t) {
543
+ var n = W(ye++, 7);
544
+ return Ie(n.__H, t) && (n.__ = e(), n.__H = t, n.__h = e), n.__;
545
+ }
546
+ function je() {
547
+ for (var e; e = Se.shift();) {
548
+ var t = e.__H;
549
+ if (e.__P && t) try {
550
+ t.__h.some(Pe), t.__h.some(Fe), t.__h = [];
551
+ } catch (n) {
552
+ t.__h = [], U.__e(n, e.__v);
553
+ }
554
+ }
555
+ }
556
+ U.__b = function(e) {
557
+ V = null, Ce && Ce(e);
558
+ }, U.__ = function(e, t) {
559
+ e && t.__k && t.__k.__m && (e.__m = t.__k.__m), Oe && Oe(e, t);
560
+ }, U.__r = function(e) {
561
+ we && we(e), ye = 0;
562
+ var t = (V = e.__c).__H;
563
+ t && (be === V ? (t.__h = [], V.__h = [], t.__.some(function(e) {
564
+ e.__N && (e.__ = e.__N), e.u = e.__N = void 0;
565
+ })) : (t.__h.some(Pe), t.__h.some(Fe), t.__h = [], ye = 0)), be = V;
566
+ }, U.diffed = function(e) {
567
+ Te && Te(e);
568
+ var t = e.__c;
569
+ t && t.__H && (t.__H.__h.length && (Se.push(t) !== 1 && H === U.requestAnimationFrame || ((H = U.requestAnimationFrame) || Ne)(je)), t.__H.__.some(function(e) {
570
+ e.u &&= (e.__H = e.u, void 0);
571
+ })), be = V = null;
572
+ }, U.__c = function(e, t) {
573
+ t.some(function(e) {
574
+ try {
575
+ e.__h.some(Pe), e.__h = e.__h.filter(function(e) {
576
+ return !e.__ || Fe(e);
577
+ });
578
+ } catch (n) {
579
+ t.some(function(e) {
580
+ e.__h &&= [];
581
+ }), t = [], U.__e(n, e.__v);
582
+ }
583
+ }), Ee && Ee(e, t);
584
+ }, U.unmount = function(e) {
585
+ De && De(e);
586
+ var t, n = e.__c;
587
+ n && n.__H && (n.__H.__.some(function(e) {
588
+ try {
589
+ Pe(e);
590
+ } catch (e) {
591
+ t = e;
592
+ }
593
+ }), n.__H = void 0, t && U.__e(t, n.__v));
594
+ };
595
+ var Me = typeof requestAnimationFrame == "function";
596
+ function Ne(e) {
597
+ var t, n = function() {
598
+ clearTimeout(r), Me && cancelAnimationFrame(t), setTimeout(e);
599
+ }, r = setTimeout(n, 35);
600
+ Me && (t = requestAnimationFrame(n));
601
+ }
602
+ function Pe(e) {
603
+ var t = V, n = e.__c;
604
+ typeof n == "function" && (e.__c = void 0, n()), V = t;
605
+ }
606
+ function Fe(e) {
607
+ var t = V;
608
+ e.__c = e.__(), V = t;
609
+ }
610
+ function Ie(e, t) {
611
+ return !e || e.length !== t.length || t.some(function(t, n) {
612
+ return t !== e[n];
613
+ });
614
+ }
615
+ function Le(e, t) {
616
+ return typeof t == "function" ? t(e) : t;
617
+ }
618
+ //#endregion
619
+ //#region src/components/shared/toolbar/font/Hooks/boldHandler.jsx
620
+ var Re = (e, t, n) => {
621
+ if (!e.collapsed) {
622
+ if (n) {
623
+ let t = e.commonAncestorContainer;
624
+ for (t.nodeType === 3 && (t = t.parentNode); t && t.getAttribute && t.getAttribute("contenteditable") !== "true";) {
625
+ if (t.style && t.style.fontWeight) {
626
+ if (t.style.fontWeight = "", !t.getAttribute("style")) {
627
+ let e = t.parentNode;
628
+ for (; t.firstChild;) e.insertBefore(t.firstChild, t);
629
+ e.removeChild(t);
630
+ }
631
+ break;
632
+ }
633
+ t = t.parentNode;
634
+ }
635
+ } else {
636
+ let t = e.extractContents(), n = document.createElement("span");
637
+ n.style.fontWeight = "bold", n.appendChild(t), e.insertNode(n);
638
+ }
639
+ return;
640
+ }
641
+ if (n) {
642
+ let n = e.startContainer, r = n.nodeType === 1 ? n : n.parentNode;
643
+ for (; r && r.getAttribute && r.getAttribute("contenteditable") !== "true" && !(r.style && r.style.fontWeight);) r = r.parentNode;
644
+ let i = document.createElement("span");
645
+ i.innerHTML = "​", r && r.parentNode ? r.nextSibling ? r.parentNode.insertBefore(i, r.nextSibling) : r.parentNode.appendChild(i) : e.insertNode(i);
646
+ let a = document.createRange();
647
+ a.setStart(i, 1), a.collapse(!0), t.removeAllRanges(), t.addRange(a);
648
+ } else {
649
+ let n = document.createElement("span");
650
+ n.style.fontWeight = "bold", n.innerHTML = "​", e.insertNode(n);
651
+ let r = document.createRange();
652
+ r.setStart(n, 1), r.collapse(!0), t.removeAllRanges(), t.addRange(r);
653
+ }
654
+ }, ze = (e, t, n) => {
655
+ if (!e.collapsed) {
656
+ if (n) {
657
+ let t = e.commonAncestorContainer;
658
+ for (t.nodeType === 3 && (t = t.parentNode); t && t.getAttribute && t.getAttribute("contenteditable") !== "true";) {
659
+ if (t.style && t.style.textDecoration) {
660
+ if (t.style.textDecoration = "", !t.getAttribute("style")) {
661
+ let e = t.parentNode;
662
+ for (; t.firstChild;) e.insertBefore(t.firstChild, t);
663
+ e.removeChild(t);
664
+ }
665
+ break;
666
+ }
667
+ t = t.parentNode;
668
+ }
669
+ } else {
670
+ let t = e.extractContents(), n = document.createElement("span");
671
+ n.style.textDecoration = "underline", n.appendChild(t), e.insertNode(n);
672
+ }
673
+ return;
674
+ }
675
+ if (n) {
676
+ let n = e.startContainer, r = n.nodeType === 1 ? n : n.parentNode;
677
+ for (; r && r.getAttribute && r.getAttribute("contenteditable") !== "true" && !(r.style && r.style.textDecoration);) r = r.parentNode;
678
+ let i = document.createElement("span");
679
+ i.innerHTML = "​", r && r.parentNode ? r.nextSibling ? r.parentNode.insertBefore(i, r.nextSibling) : r.parentNode.appendChild(i) : e.insertNode(i);
680
+ let a = document.createRange();
681
+ a.setStart(i, 1), a.collapse(!0), t.removeAllRanges(), t.addRange(a);
682
+ } else {
683
+ let n = document.createElement("span");
684
+ n.style.textDecoration = "underline", n.innerHTML = "​", e.insertNode(n);
685
+ let r = document.createRange();
686
+ r.setStart(n, 1), r.collapse(!0), t.removeAllRanges(), t.addRange(r);
687
+ }
688
+ }, Be = (e) => {
689
+ let t = document.createTreeWalker(e, NodeFilter.SHOW_TEXT, null, !1), n;
690
+ for (; n = t.nextNode();) n.nodeValue = n.nodeValue.replace(/\u00A0/g, " ");
691
+ }, Ve = (e) => {
692
+ e.querySelectorAll("span, b, u, strong").forEach((e) => {
693
+ let t = e.getAttribute("style") || e.getAttribute("class"), n = [
694
+ "B",
695
+ "U",
696
+ "STRONG"
697
+ ].includes(e.tagName);
698
+ if (!t && !n) {
699
+ let t = e.parentNode;
700
+ for (; e.firstChild;) t.insertBefore(e.firstChild, e);
701
+ t.removeChild(e);
702
+ } else (!e.textContent || e.textContent.replace(/\u200B/g, "").length === 0) && e.remove();
703
+ });
704
+ }, He = (e, t) => {
705
+ if (e.collapsed) return;
706
+ let n = e.commonAncestorContainer;
707
+ for (n.nodeType === 3 && (n = n.parentNode); n && n.getAttribute && n.getAttribute("contenteditable") !== "true";) {
708
+ let e = window.getComputedStyle(n).display;
709
+ if (e === "block" || e === "flex" || n.tagName === "PRE") break;
710
+ n = n.parentNode;
711
+ }
712
+ let r = e.extractContents().textContent.replace(/\u00A0/g, " "), i = document.createTextNode(r);
713
+ e.insertNode(i), n && n.getAttribute("contenteditable") !== "true" && (Ve(n), Be(n), n.normalize());
714
+ let a = document.createRange();
715
+ a.selectNodeContents(i), t.removeAllRanges(), t.addRange(a);
716
+ };
717
+ //#endregion
718
+ //#region src/components/shared/toolbar/font/Hooks/fontLogic.jsx
719
+ function Ue() {
720
+ let [e, t] = G(!1), [n, r] = G(!1), i = () => {
721
+ let e = window.getSelection();
722
+ if (!e || e.rangeCount === 0) return;
723
+ let n = e.anchorNode;
724
+ if (!n) return;
725
+ n.nodeType === 3 && (n = n.parentNode);
726
+ let i = !1, a = !1;
727
+ for (; n && n.getAttribute && n.getAttribute("contenteditable") !== "true";) {
728
+ let e = window.getComputedStyle(n).fontWeight, t = window.getComputedStyle(n).textDecoration;
729
+ (e === "bold" || parseInt(e) >= 700 || n.tagName === "B" || n.tagName === "STRONG") && (i = !0), (t.includes("underline") || n.tagName === "U") && (a = !0), n = n.parentNode;
730
+ }
731
+ t(i), r(a);
732
+ };
733
+ return K(() => (document.addEventListener("selectionchange", i), () => document.removeEventListener("selectionchange", i)), []), {
734
+ executeCommand: (t) => {
735
+ let r = window.getSelection();
736
+ if (!r || r.rangeCount === 0) return;
737
+ let a = r.getRangeAt(0);
738
+ t === "bold" ? Re(a, r, e) : t === "underline" ? ze(a, r, n) : t === "removeFormat" && He(a, r), i();
739
+ },
740
+ isBold: e,
741
+ isUnderline: n
742
+ };
743
+ }
744
+ //#endregion
745
+ //#region src/components/shared/toolbar/font/Components/index.jsx
746
+ function J() {
747
+ let { executeCommand: e, isBold: t, isUnderline: n } = Ue();
748
+ return /* @__PURE__ */ R(B, {
749
+ onCommand: e,
750
+ isBold: t,
751
+ isUnderline: n
752
+ });
753
+ }
754
+ //#endregion
755
+ //#region src/components/shared/toolbar/FontName/Hooks/fontNameHandler.jsx
756
+ function We(e, t) {
757
+ let n = document.createElement("span");
758
+ n.style.fontFamily = t;
759
+ try {
760
+ return n.appendChild(e.extractContents()), e.insertNode(n), n;
761
+ } catch {
762
+ return null;
763
+ }
764
+ }
765
+ var Ge = (e, t, n) => {
766
+ let r = n || "Arial";
767
+ if (!e || !t) return;
768
+ if (!e.collapsed) {
769
+ let n = We(e, r);
770
+ if (!n) return;
771
+ let i = document.createRange();
772
+ i.selectNodeContents(n), t.removeAllRanges(), t.addRange(i);
773
+ return;
774
+ }
775
+ let i = document.createElement("span");
776
+ i.style.fontFamily = r;
777
+ let a = document.createTextNode("​");
778
+ i.appendChild(a), e.insertNode(i);
779
+ let o = document.createRange();
780
+ o.setStart(i.firstChild, 1), o.collapse(!0), t.removeAllRanges(), t.addRange(o);
781
+ }, Ke = (e) => {
782
+ let t = window.getSelection();
783
+ if (!t || t.rangeCount === 0) return null;
784
+ let n = t.anchorNode;
785
+ if (!n || e && !e.contains(n)) return null;
786
+ for (n.nodeType === 3 && (n = n.parentNode); n && n !== e;) {
787
+ if (n.style && n.style.fontFamily) {
788
+ let e = n.style.fontFamily.split(",")[0].replace(/['"]/g, "").trim();
789
+ if (e) return e;
790
+ }
791
+ n = n.parentNode;
792
+ }
793
+ return null;
794
+ };
795
+ //#endregion
796
+ //#region src/components/shared/toolbar/FontName/Hooks/fontNameLogic.jsx
797
+ function qe(e) {
798
+ let [t, n] = G("Arial"), r = q("Arial"), i = q(null), a = () => {
799
+ let t = window.getSelection();
800
+ if (t && t.rangeCount > 0) {
801
+ let n = t.getRangeAt(0), r = e?.current;
802
+ r && r.contains(n.commonAncestorContainer) && (i.current = n.cloneRange());
803
+ }
804
+ }, o = () => {
805
+ let t = e?.current;
806
+ if (!t) return;
807
+ let i = Ke(t);
808
+ i && (n(i), r.current = i);
809
+ };
810
+ return K(() => {
811
+ let t = () => {
812
+ a(), o();
813
+ };
814
+ document.addEventListener("selectionchange", t);
815
+ let n = e?.current;
816
+ if (!n) return () => {
817
+ document.removeEventListener("selectionchange", t);
818
+ };
819
+ let i = (e) => {
820
+ if (e.inputType !== "insertText" || !e.data) return;
821
+ let t = window.getSelection();
822
+ if (!t || t.rangeCount === 0) return;
823
+ let n = t.getRangeAt(0), i = n.startContainer;
824
+ if (i.nodeType === 3 && (i = i.parentNode), i && i.tagName === "SPAN" && i.style.fontFamily && i.style.fontFamily.replace(/['"]/g, "").toLowerCase() === r.current.toLowerCase()) return;
825
+ e.preventDefault();
826
+ let a = document.createElement("span");
827
+ a.style.fontFamily = r.current, a.textContent = e.data, n.deleteContents(), n.insertNode(a);
828
+ let o = document.createRange();
829
+ o.setStart(a.firstChild, a.textContent.length), o.collapse(!0), t.removeAllRanges(), t.addRange(o);
830
+ };
831
+ return n.addEventListener("beforeinput", i), () => {
832
+ document.removeEventListener("selectionchange", t), n.removeEventListener("beforeinput", i);
833
+ };
834
+ }, [e, e?.current]), {
835
+ currentFont: t,
836
+ applyFont: (t) => {
837
+ let o = t || "Arial";
838
+ r.current = o, n(o);
839
+ let s = e?.current;
840
+ if (!s) return;
841
+ s.focus();
842
+ let c = window.getSelection(), l = null;
843
+ if (i.current ? (c.removeAllRanges(), c.addRange(i.current), l = i.current) : c.rangeCount > 0 && (l = c.getRangeAt(0)), !l) {
844
+ let e = document.createRange();
845
+ e.selectNodeContents(s), e.collapse(!1), c.removeAllRanges(), c.addRange(e), l = e;
846
+ }
847
+ Ge(l, c, o), a();
848
+ }
849
+ };
850
+ }
851
+ //#endregion
852
+ //#region src/components/shared/toolbar/Hooks/dropdown.js
853
+ function Je(e, t) {
854
+ function n() {
855
+ t.classList.remove("is-open"), e.classList.remove("is-active"), document.removeEventListener("click", r);
856
+ }
857
+ function r(r) {
858
+ !t.contains(r.target) && !e.contains(r.target) && n();
859
+ }
860
+ function i(n) {
861
+ n.stopPropagation();
862
+ let i = t.classList.contains("is-open");
863
+ document.querySelectorAll(".forge-toolbar-dropdown.is-open").forEach((e) => {
864
+ e.classList.remove("is-open");
865
+ }), document.querySelectorAll(".forge-toolbar-button.is-active").forEach((e) => {
866
+ e.classList.remove("is-active");
867
+ }), i || (t.classList.add("is-open"), e.classList.add("is-active"), document.addEventListener("click", r));
868
+ }
869
+ return e.addEventListener("click", i), function() {
870
+ e.removeEventListener("click", i), document.removeEventListener("click", r);
871
+ };
872
+ }
873
+ //#endregion
874
+ //#region src/components/shared/toolbar/FontName/Components/FontNameToolbar.jsx
875
+ var Ye = [
876
+ "Arial",
877
+ "Arial Black",
878
+ "Comic Sans MS",
879
+ "Courier New",
880
+ "Helvetica",
881
+ "Impact",
882
+ "Tahoma",
883
+ "Times New Roman",
884
+ "Verdana",
885
+ "Nunito Sans",
886
+ "Segoe UI"
887
+ ], Xe = 32;
888
+ function Ze({ currentFont: e, applyFont: t }) {
889
+ let n = q(null), r = q(null);
890
+ K(() => {
891
+ if (n.current && r.current) return Je(n.current, r.current);
892
+ }, []);
893
+ let i = (e) => {
894
+ t(e), r.current && r.current.classList.remove("is-open"), n.current && n.current.classList.remove("is-active");
895
+ }, a = "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]";
896
+ return /* @__PURE__ */ R("div", {
897
+ className: "forge-toolbar-group forge-toolbar-fontname relative flex items-center",
898
+ children: [/* @__PURE__ */ R("div", {
899
+ className: "forge-color-button-group flex h-[30px] items-center overflow-visible rounded border border-[#ccc] bg-white hover:border-[#aaa] hover:bg-[#f9f9f9]",
900
+ children: [/* @__PURE__ */ R("button", {
901
+ type: "button",
902
+ className: "forge-fontname-main group relative flex h-full items-center justify-center min-w-[70px] cursor-pointer border-none bg-transparent px-2 hover:bg-black/5",
903
+ onMouseDown: (e) => e.preventDefault(),
904
+ onClick: () => {
905
+ n.current && n.current.click();
906
+ },
907
+ "aria-label": "Current font",
908
+ children: [/* @__PURE__ */ R("span", {
909
+ className: "forge-current-fontname max-w-[65px] truncate text-xs text-[#333]",
910
+ style: { fontFamily: e },
911
+ children: e
912
+ }), /* @__PURE__ */ R("span", {
913
+ className: a,
914
+ "data-i18n": "fontName",
915
+ children: "Font Family"
916
+ })]
917
+ }), /* @__PURE__ */ R("button", {
918
+ ref: n,
919
+ type: "button",
920
+ className: "forge-fontname-dropdown-btn group relative flex h-full items-center justify-center min-w-[18px] cursor-pointer border-l border-[#ccc] bg-transparent px-1 hover:bg-black/5",
921
+ onMouseDown: (e) => e.preventDefault(),
922
+ "aria-label": "More fonts",
923
+ children: [/* @__PURE__ */ R(() => /* @__PURE__ */ R("svg", {
924
+ className: "h-2 w-2 fill-current text-[#666]",
925
+ viewBox: "0 0 10 6",
926
+ xmlns: "http://www.w3.org/2000/svg",
927
+ children: /* @__PURE__ */ R("path", { d: "M0 0l5 6 5-6H0z" })
928
+ }), {}), /* @__PURE__ */ R("span", {
929
+ className: a,
930
+ "data-i18n": "moreFont",
931
+ children: "More Fonts"
932
+ })]
933
+ })]
934
+ }), /* @__PURE__ */ R("div", {
935
+ ref: r,
936
+ className: "forge-toolbar-dropdown forge-dropdown-fontname absolute left-0 top-full z-20 hidden mt-1 min-w-[150px] overflow-y-auto rounded border border-[#ccc] bg-white p-1 shadow-md rtl:left-auto rtl:right-0 [&.is-open]:block",
937
+ style: { maxHeight: "128px" },
938
+ children: Ye.map((e) => /* @__PURE__ */ R("button", {
939
+ type: "button",
940
+ className: "forge-dropdown-item flex w-full cursor-pointer items-center whitespace-nowrap rounded-sm px-2 text-left text-xs text-[#333] hover:bg-[#f0f0f0]",
941
+ style: {
942
+ fontFamily: e,
943
+ height: `${Xe}px`
944
+ },
945
+ onMouseDown: (e) => e.preventDefault(),
946
+ onClick: () => i(e),
947
+ children: e
948
+ }, e))
949
+ })]
950
+ });
951
+ }
952
+ //#endregion
953
+ //#region src/components/shared/toolbar/FontName/Components/index.jsx
954
+ function Qe({ editorRef: e }) {
955
+ let { currentFont: t, applyFont: n } = qe(e);
956
+ return /* @__PURE__ */ R(Ze, {
957
+ currentFont: t,
958
+ applyFont: n
959
+ });
960
+ }
961
+ //#endregion
962
+ //#region src/components/shared/toolbar/Color/Components/colorPalette.jsx
963
+ var $e = [
964
+ [
965
+ "#000000",
966
+ "#424242",
967
+ "#636363",
968
+ "#9C9C94",
969
+ "#CEC6CE",
970
+ "#EFEFEF",
971
+ "#F7F7F7",
972
+ "#FFFFFF"
973
+ ],
974
+ [
975
+ "#FF0000",
976
+ "#FF9C00",
977
+ "#FFFF00",
978
+ "#00FF00",
979
+ "#00FFFF",
980
+ "#0000FF",
981
+ "#9C00FF",
982
+ "#FF00FF"
983
+ ],
984
+ [
985
+ "#F7C6CE",
986
+ "#FFE7CE",
987
+ "#FFEFC6",
988
+ "#D6EFD6",
989
+ "#CEDEE7",
990
+ "#CEE7F7",
991
+ "#D6D6E7",
992
+ "#E7D6DE"
993
+ ],
994
+ [
995
+ "#E79C9C",
996
+ "#FFC69C",
997
+ "#FFE79C",
998
+ "#B5D6A5",
999
+ "#A5C6CE",
1000
+ "#9CC6EF",
1001
+ "#B5A5D6",
1002
+ "#D6A5BD"
1003
+ ],
1004
+ [
1005
+ "#E76363",
1006
+ "#F7AD6B",
1007
+ "#FFD663",
1008
+ "#94BD7B",
1009
+ "#73A5AD",
1010
+ "#6BADDE",
1011
+ "#8C7BC6",
1012
+ "#C67BA5"
1013
+ ],
1014
+ [
1015
+ "#CE0000",
1016
+ "#E79439",
1017
+ "#EFC631",
1018
+ "#6BA54A",
1019
+ "#4A7B8C",
1020
+ "#3984C6",
1021
+ "#634AA5",
1022
+ "#A54A7B"
1023
+ ],
1024
+ [
1025
+ "#9C0000",
1026
+ "#B56308",
1027
+ "#BD9400",
1028
+ "#397B21",
1029
+ "#104A5A",
1030
+ "#085294",
1031
+ "#311873",
1032
+ "#731842"
1033
+ ],
1034
+ [
1035
+ "#630000",
1036
+ "#7B3900",
1037
+ "#846300",
1038
+ "#295218",
1039
+ "#083139",
1040
+ "#003163",
1041
+ "#21104A",
1042
+ "#4A1031"
1043
+ ]
1044
+ ];
1045
+ function Y({ event: e, onApply: t, currentColor: n }) {
1046
+ return /* @__PURE__ */ R("div", {
1047
+ className: "forge-color-palette flex flex-col gap-1",
1048
+ children: $e.map((r, i) => /* @__PURE__ */ R("div", {
1049
+ className: "forge-color-row flex gap-1 justify-between",
1050
+ children: r.map((r) => {
1051
+ let i = n?.toLowerCase() === r.toLowerCase();
1052
+ return /* @__PURE__ */ R("button", {
1053
+ type: "button",
1054
+ title: r,
1055
+ className: `forge-color-button h-4 w-4 cursor-pointer rounded-[2px] border p-0 hover:scale-110 hover:border-black transition-transform ${i ? "border-2 border-black" : "border-[#ccc]"}`,
1056
+ style: { backgroundColor: r },
1057
+ onMouseDown: (e) => e.preventDefault(),
1058
+ onClick: () => t(e, r),
1059
+ "aria-label": r,
1060
+ "aria-pressed": i
1061
+ }, r);
1062
+ })
1063
+ }, i))
1064
+ });
1065
+ }
1066
+ //#endregion
1067
+ //#region src/components/shared/toolbar/Color/Components/ColorToolbar.jsx
1068
+ function et({ logic: e }) {
1069
+ let { applyColor: t, applyRecentColor: n, resetColor: r, recentForeColor: i, recentBackColor: a } = e, o = q(null), s = q(null), c = q(null), l = q(null);
1070
+ K(() => {
1071
+ if (o.current && s.current) return Je(o.current, s.current);
1072
+ }, []), K(() => {
1073
+ if (c.current && l.current) return Je(c.current, l.current);
1074
+ }, []);
1075
+ let u = (e, n) => {
1076
+ t(e, n), s.current && s.current.classList.remove("is-open"), o.current && o.current.classList.remove("is-active");
1077
+ }, d = (e, n) => {
1078
+ t(e, n), l.current && l.current.classList.remove("is-open"), c.current && c.current.classList.remove("is-active");
1079
+ }, f = () => {
1080
+ r("foreColor"), s.current && s.current.classList.remove("is-open"), o.current && o.current.classList.remove("is-active");
1081
+ }, p = () => {
1082
+ r("backColor"), l.current && l.current.classList.remove("is-open"), c.current && c.current.classList.remove("is-active");
1083
+ }, m = "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 group-has-[.is-open]:hidden rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]", h = () => /* @__PURE__ */ R("svg", {
1084
+ className: "h-2 w-2 fill-current text-[#666]",
1085
+ viewBox: "0 0 10 6",
1086
+ xmlns: "http://www.w3.org/2000/svg",
1087
+ children: /* @__PURE__ */ R("path", { d: "M0 0l5 6 5-6H0z" })
1088
+ });
1089
+ return /* @__PURE__ */ R("div", {
1090
+ className: "forge-toolbar-group forge-toolbar-color flex items-center gap-1",
1091
+ children: [/* @__PURE__ */ R("div", {
1092
+ className: "forge-color-item relative flex items-center",
1093
+ children: [/* @__PURE__ */ R("div", {
1094
+ className: "forge-color-button-group flex h-[30px] items-center overflow-visible rounded border border-[#ccc] bg-white hover:border-[#aaa] hover:bg-[#f9f9f9]",
1095
+ children: [/* @__PURE__ */ R("button", {
1096
+ type: "button",
1097
+ className: "forge-color-main group relative flex h-full items-center justify-center min-w-[28px] cursor-pointer border-none bg-transparent p-0 hover:bg-black/5",
1098
+ onMouseDown: (e) => e.preventDefault(),
1099
+ onClick: () => n("foreColor"),
1100
+ "aria-label": "Apply text color",
1101
+ children: [/* @__PURE__ */ R("span", {
1102
+ className: "forge-recent-color flex h-5 w-5 items-center justify-center rounded-[2px] border border-[#ccc] text-xs font-bold",
1103
+ style: {
1104
+ backgroundColor: "transparent",
1105
+ color: i
1106
+ },
1107
+ children: "A"
1108
+ }), /* @__PURE__ */ R("span", {
1109
+ className: m,
1110
+ "data-i18n": "recentColor",
1111
+ children: "Recent Color"
1112
+ })]
1113
+ }), /* @__PURE__ */ R("button", {
1114
+ ref: o,
1115
+ type: "button",
1116
+ className: "forge-color-dropdown-btn group relative flex h-full items-center justify-center min-w-[18px] cursor-pointer border-l border-[#ccc] bg-transparent px-1 hover:bg-black/5",
1117
+ onMouseDown: (e) => e.preventDefault(),
1118
+ "aria-label": "More text colors",
1119
+ children: [/* @__PURE__ */ R(h, {}), /* @__PURE__ */ R("span", {
1120
+ className: m,
1121
+ "data-i18n": "moreColor",
1122
+ children: "More Color"
1123
+ })]
1124
+ })]
1125
+ }), /* @__PURE__ */ R("div", {
1126
+ ref: s,
1127
+ className: "forge-toolbar-dropdown forge-dropdown-color absolute left-0 top-full z-20 hidden mt-1 max-h-[220px] min-w-[180px] overflow-y-auto rounded border border-[#ccc] bg-white p-2 shadow-md rtl:left-auto rtl:right-0 [&.is-open]:block",
1128
+ children: /* @__PURE__ */ R("div", {
1129
+ className: "forge-color-section",
1130
+ children: [/* @__PURE__ */ R("div", {
1131
+ className: "forge-color-section-header mb-1.5 flex items-center justify-between",
1132
+ children: [/* @__PURE__ */ R("span", {
1133
+ className: "forge-color-title text-xs font-bold text-[#333]",
1134
+ children: "Text Color"
1135
+ }), /* @__PURE__ */ R("button", {
1136
+ type: "button",
1137
+ className: "forge-color-reset cursor-pointer rounded border border-[#ccc] bg-[#f5f5f5] px-2 py-0.5 text-[11px] font-medium text-[#333] hover:border-[#999] hover:bg-[#e6e6e6]",
1138
+ onMouseDown: (e) => e.preventDefault(),
1139
+ onClick: f,
1140
+ children: "Reset"
1141
+ })]
1142
+ }), /* @__PURE__ */ R(Y, {
1143
+ event: "foreColor",
1144
+ onApply: u
1145
+ })]
1146
+ })
1147
+ })]
1148
+ }), /* @__PURE__ */ R("div", {
1149
+ className: "forge-color-item relative flex items-center",
1150
+ children: [/* @__PURE__ */ R("div", {
1151
+ className: "forge-color-button-group flex h-[30px] items-center overflow-visible rounded border border-[#ccc] bg-white hover:border-[#aaa] hover:bg-[#f9f9f9]",
1152
+ children: [/* @__PURE__ */ R("button", {
1153
+ type: "button",
1154
+ className: "forge-color-main group relative flex h-full items-center justify-center min-w-[28px] cursor-pointer border-none bg-transparent p-0 hover:bg-black/5",
1155
+ onMouseDown: (e) => e.preventDefault(),
1156
+ onClick: () => n("backColor"),
1157
+ "aria-label": "Apply background color",
1158
+ children: [/* @__PURE__ */ R("span", {
1159
+ className: "forge-recent-color flex h-5 w-5 items-center justify-center rounded-[2px] border border-[#ccc] text-xs font-bold",
1160
+ style: {
1161
+ backgroundColor: a || "#FFFFFF",
1162
+ color: "#000"
1163
+ },
1164
+ children: "A"
1165
+ }), /* @__PURE__ */ R("span", {
1166
+ className: m,
1167
+ "data-i18n": "recentBackColor",
1168
+ children: "Recent Background Color"
1169
+ })]
1170
+ }), /* @__PURE__ */ R("button", {
1171
+ ref: c,
1172
+ type: "button",
1173
+ className: "forge-color-dropdown-btn group relative flex h-full items-center justify-center min-w-[18px] cursor-pointer border-l border-[#ccc] bg-transparent px-1 hover:bg-black/5",
1174
+ onMouseDown: (e) => e.preventDefault(),
1175
+ "aria-label": "More background colors",
1176
+ children: [/* @__PURE__ */ R(h, {}), /* @__PURE__ */ R("span", {
1177
+ className: m,
1178
+ "data-i18n": "moreBackColor",
1179
+ children: "More Background Colors"
1180
+ })]
1181
+ })]
1182
+ }), /* @__PURE__ */ R("div", {
1183
+ ref: l,
1184
+ className: "forge-toolbar-dropdown forge-dropdown-color absolute left-0 top-full z-20 hidden mt-1 max-h-[220px] min-w-[180px] overflow-y-auto rounded border border-[#ccc] bg-white p-2 shadow-md rtl:left-auto rtl:right-0 [&.is-open]:block",
1185
+ children: /* @__PURE__ */ R("div", {
1186
+ className: "forge-color-section",
1187
+ children: [/* @__PURE__ */ R("div", {
1188
+ className: "forge-color-section-header mb-1.5 flex items-center justify-between",
1189
+ children: [/* @__PURE__ */ R("span", {
1190
+ className: "forge-color-title text-xs font-bold text-[#333]",
1191
+ children: "Background Color"
1192
+ }), /* @__PURE__ */ R("button", {
1193
+ type: "button",
1194
+ className: "forge-color-reset cursor-pointer rounded border border-[#ccc] bg-[#f5f5f5] px-2 py-0.5 text-[11px] font-medium text-[#333] hover:border-[#999] hover:bg-[#e6e6e6]",
1195
+ onMouseDown: (e) => e.preventDefault(),
1196
+ onClick: p,
1197
+ children: "White"
1198
+ })]
1199
+ }), /* @__PURE__ */ R(Y, {
1200
+ event: "backColor",
1201
+ onApply: d
1202
+ })]
1203
+ })
1204
+ })]
1205
+ })]
1206
+ });
1207
+ }
1208
+ //#endregion
1209
+ //#region src/components/shared/toolbar/Color/Hooks/colorUtils.jsx
1210
+ function tt(e) {
1211
+ let t = document.createElement("span");
1212
+ t.style.color = e, document.body.appendChild(t);
1213
+ let n = window.getComputedStyle(t).color;
1214
+ return document.body.removeChild(t), n;
1215
+ }
1216
+ function nt(e, t) {
1217
+ let n = e;
1218
+ for (; n && n !== document.body;) {
1219
+ if (n.nodeType === Node.ELEMENT_NODE && n.tagName === "SPAN" && n.style.color && tt(n.style.color) === t) return n;
1220
+ n = n.parentElement;
1221
+ }
1222
+ return null;
1223
+ }
1224
+ //#endregion
1225
+ //#region src/components/shared/toolbar/Color/Hooks/usePenMode.jsx
1226
+ function rt(e, t) {
1227
+ K(() => {
1228
+ function n(n) {
1229
+ if (n.inputType !== "insertText" || !n.data || !e.current) return;
1230
+ let r = n.target;
1231
+ if (!r || !r.classList || !r.classList.contains(t)) return;
1232
+ let i = window.getSelection();
1233
+ if (!i || !i.rangeCount) return;
1234
+ let a = i.getRangeAt(0);
1235
+ if (!a.collapsed) return;
1236
+ let o = tt(e.current), s = a.startContainer;
1237
+ s.nodeType === Node.TEXT_NODE && (s = s.parentElement);
1238
+ let c = nt(s, o);
1239
+ if (n.preventDefault(), c) {
1240
+ let e = document.createTextNode(n.data);
1241
+ a.insertNode(e), a.setStartAfter(e), a.collapse(!0), i.removeAllRanges(), i.addRange(a);
1242
+ return;
1243
+ }
1244
+ let l = document.createElement("span");
1245
+ l.style.color = e.current, l.textContent = n.data, a.deleteContents(), a.insertNode(l);
1246
+ let u = document.createRange();
1247
+ u.selectNodeContents(l), u.collapse(!1), i.removeAllRanges(), i.addRange(u);
1248
+ }
1249
+ return document.addEventListener("beforeinput", n, !0), () => document.removeEventListener("beforeinput", n, !0);
1250
+ }, []);
1251
+ }
1252
+ //#endregion
1253
+ //#region src/components/shared/toolbar/Color/Hooks/foreColorHandler.jsx
1254
+ var it = (e, t, n) => {
1255
+ let r = n || "#000000";
1256
+ if (!e) return;
1257
+ if (!e.collapsed) {
1258
+ let n = e.extractContents(), i = document.createElement("span");
1259
+ i.style.color = r, i.appendChild(n), e.insertNode(i);
1260
+ let a = document.createRange();
1261
+ a.selectNodeContents(i), t.removeAllRanges(), t.addRange(a);
1262
+ return;
1263
+ }
1264
+ let i = document.createElement("span");
1265
+ i.style.color = r, i.appendChild(document.createTextNode("​")), e.insertNode(i);
1266
+ let a = document.createRange();
1267
+ a.setStart(i.firstChild, 1), a.collapse(!0), t.removeAllRanges(), t.addRange(a);
1268
+ };
1269
+ //#endregion
1270
+ //#region src/components/shared/toolbar/Color/Hooks/useForeColor.jsx
1271
+ function at(e = "forge-editor__content") {
1272
+ let [t, n] = G("#000000"), r = q(null);
1273
+ rt(r, e);
1274
+ let i = (e) => {
1275
+ let t = e || "#000000", i = window.getSelection();
1276
+ i && i.rangeCount > 0 && it(i.getRangeAt(0), i, t), r.current = t, n(t);
1277
+ };
1278
+ return {
1279
+ recentForeColor: t,
1280
+ applyForeColor: i,
1281
+ applyRecentForeColor: () => {
1282
+ i(t);
1283
+ },
1284
+ resetForeColor: () => {
1285
+ i("#000000"), r.current = null;
1286
+ }
1287
+ };
1288
+ }
1289
+ //#endregion
1290
+ //#region src/components/shared/toolbar/Color/Hooks/usePenModeBack.jsx
1291
+ function ot(e, t) {
1292
+ K(() => {
1293
+ let n = (n) => {
1294
+ if (!e.current || n.inputType !== "insertText" || !n.data) return;
1295
+ let r = window.getSelection();
1296
+ if (!r || !r.rangeCount) return;
1297
+ let i = r.getRangeAt(0);
1298
+ if (!(i.startContainer.nodeType === 1 ? i.startContainer.closest(`.${t}`) : i.startContainer.parentElement?.closest(`.${t}`))) return;
1299
+ n.preventDefault();
1300
+ let a = document.createElement("span");
1301
+ a.style.backgroundColor = e.current, a.textContent = n.data, i.deleteContents(), i.insertNode(a);
1302
+ let o = document.createRange();
1303
+ o.setStartAfter(a), o.collapse(!0), r.removeAllRanges(), r.addRange(o);
1304
+ };
1305
+ return document.addEventListener("beforeinput", n, !0), () => {
1306
+ document.removeEventListener("beforeinput", n, !0);
1307
+ };
1308
+ }, [t, e]);
1309
+ }
1310
+ //#endregion
1311
+ //#region src/components/shared/toolbar/Color/Hooks/backColorHandler.jsx
1312
+ var st = (e, t, n) => {
1313
+ let r = n || "#FFFFFF";
1314
+ if (!e) return;
1315
+ if (!e.collapsed) {
1316
+ let n = e.extractContents(), i = document.createElement("span");
1317
+ i.style.backgroundColor = r, i.appendChild(n), e.insertNode(i);
1318
+ let a = document.createRange();
1319
+ a.selectNodeContents(i), t.removeAllRanges(), t.addRange(a);
1320
+ return;
1321
+ }
1322
+ let i = document.createElement("span");
1323
+ i.style.backgroundColor = r, i.appendChild(document.createTextNode("​")), e.insertNode(i);
1324
+ let a = document.createRange();
1325
+ a.setStart(i.firstChild, 1), a.collapse(!0), t.removeAllRanges(), t.addRange(a);
1326
+ };
1327
+ //#endregion
1328
+ //#region src/components/shared/toolbar/Color/Hooks/useBackColor.jsx
1329
+ function ct(e = "forge-editor__content") {
1330
+ let [t, n] = G("#FFFFFF"), r = q(null);
1331
+ ot(r, e);
1332
+ let i = (e) => {
1333
+ let t = e || "#FFFFFF", i = window.getSelection();
1334
+ i && i.rangeCount > 0 && st(i.getRangeAt(0), i, t), r.current = t, n(t);
1335
+ };
1336
+ return {
1337
+ recentBackColor: t,
1338
+ applyBackColor: i,
1339
+ applyRecentBackColor: () => {
1340
+ i(t);
1341
+ },
1342
+ resetBackColor: () => {
1343
+ i("#FFFFFF"), r.current = null;
1344
+ }
1345
+ };
1346
+ }
1347
+ //#endregion
1348
+ //#region src/components/shared/toolbar/Color/Hooks/colorLogic.jsx
1349
+ function lt() {
1350
+ let e = at(), t = ct();
1351
+ return {
1352
+ applyColor: (n, r) => {
1353
+ n === "foreColor" ? e.applyForeColor(r) : n === "backColor" && t.applyBackColor(r);
1354
+ },
1355
+ applyRecentColor: (n) => {
1356
+ n === "foreColor" ? e.applyRecentForeColor() : n === "backColor" && t.applyRecentBackColor();
1357
+ },
1358
+ resetColor: (n) => {
1359
+ n === "foreColor" ? e.resetForeColor() : n === "backColor" && t.resetBackColor();
1360
+ },
1361
+ recentForeColor: e.recentForeColor,
1362
+ recentBackColor: t.recentBackColor
1363
+ };
1364
+ }
1365
+ //#endregion
1366
+ //#region src/components/shared/toolbar/Color/Components/index.jsx
1367
+ function ut() {
1368
+ return /* @__PURE__ */ R(et, { logic: lt() });
1369
+ }
1370
+ //#endregion
1371
+ //#region src/components/shared/toolbar/Paragraph/Components/ParagraphToolbar.jsx
1372
+ function dt({ logic: e = {} }) {
1373
+ let { saveSelectionRange: t, toggleUnorderedList: n, toggleOrderedList: r, setAlignment: i, outdent: a, indent: o } = e, [s, c] = G(!1), l = q(null);
1374
+ K(() => {
1375
+ let e = (e) => {
1376
+ l.current && !l.current.contains(e.target) && c(!1);
1377
+ };
1378
+ return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
1379
+ }, []);
1380
+ let u = (e, n, r = null) => {
1381
+ e.preventDefault(), typeof t == "function" && t(), typeof n == "function" && n(r);
1382
+ }, d = "forge-toolbar-button group relative flex h-8 items-center justify-center bg-white px-2.5 text-sm transition-all duration-150 hover:bg-[#f5f5f5] active:bg-[#e8e8e8] focus:outline-none", f = "forge-toolbar-icon inline-block h-4 w-4", p = "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]", m = "group relative flex h-7 w-7 items-center justify-center rounded hover:bg-gray-100";
1383
+ return /* @__PURE__ */ R("div", {
1384
+ ref: l,
1385
+ className: "forge-toolbar-group forge-toolbar-paragraph relative inline-flex items-center text-black",
1386
+ children: [
1387
+ /* @__PURE__ */ R("style", { children: "\n .forge-toolbar-paragraph svg * {\n vector-effect: non-scaling-stroke;\n }\n " }),
1388
+ /* @__PURE__ */ R("div", {
1389
+ className: "inline-flex rounded-md border border-[#d1d5db] bg-white shadow-sm -space-x-px",
1390
+ children: [
1391
+ /* @__PURE__ */ R("button", {
1392
+ type: "button",
1393
+ className: d,
1394
+ onMouseDown: (e) => u(e, n),
1395
+ "aria-label": "Unordered list",
1396
+ children: [/* @__PURE__ */ R("span", {
1397
+ className: f,
1398
+ children: /* @__PURE__ */ R("svg", {
1399
+ viewBox: "0 0 20 20",
1400
+ className: "block h-4 w-4",
1401
+ children: [
1402
+ /* @__PURE__ */ R("circle", {
1403
+ cx: "3",
1404
+ cy: "5",
1405
+ r: "1.5",
1406
+ fill: "black"
1407
+ }),
1408
+ /* @__PURE__ */ R("circle", {
1409
+ cx: "3",
1410
+ cy: "10",
1411
+ r: "1.5",
1412
+ fill: "black"
1413
+ }),
1414
+ /* @__PURE__ */ R("circle", {
1415
+ cx: "3",
1416
+ cy: "15",
1417
+ r: "1.5",
1418
+ fill: "black"
1419
+ }),
1420
+ /* @__PURE__ */ R("rect", {
1421
+ x: "7",
1422
+ y: "4",
1423
+ width: "11",
1424
+ height: "2",
1425
+ rx: "1",
1426
+ fill: "black"
1427
+ }),
1428
+ /* @__PURE__ */ R("rect", {
1429
+ x: "7",
1430
+ y: "9",
1431
+ width: "11",
1432
+ height: "2",
1433
+ rx: "1",
1434
+ fill: "black"
1435
+ }),
1436
+ /* @__PURE__ */ R("rect", {
1437
+ x: "7",
1438
+ y: "14",
1439
+ width: "11",
1440
+ height: "2",
1441
+ rx: "1",
1442
+ fill: "black"
1443
+ })
1444
+ ]
1445
+ })
1446
+ }), /* @__PURE__ */ R("span", {
1447
+ className: p,
1448
+ "data-i18n": "unorderedList",
1449
+ children: "Bullet list"
1450
+ })]
1451
+ }),
1452
+ /* @__PURE__ */ R("div", { className: "w-[1px] bg-[#e5e7eb] my-1" }),
1453
+ /* @__PURE__ */ R("button", {
1454
+ type: "button",
1455
+ className: d,
1456
+ onMouseDown: (e) => u(e, r),
1457
+ "aria-label": "Ordered list",
1458
+ children: [/* @__PURE__ */ R("span", {
1459
+ className: f,
1460
+ children: /* @__PURE__ */ R("svg", {
1461
+ viewBox: "0 0 20 20",
1462
+ className: "block h-4 w-4",
1463
+ children: [
1464
+ /* @__PURE__ */ R("rect", {
1465
+ x: "7",
1466
+ y: "4",
1467
+ width: "11",
1468
+ height: "2",
1469
+ rx: "1",
1470
+ fill: "black"
1471
+ }),
1472
+ /* @__PURE__ */ R("rect", {
1473
+ x: "7",
1474
+ y: "9",
1475
+ width: "11",
1476
+ height: "2",
1477
+ rx: "1",
1478
+ fill: "black"
1479
+ }),
1480
+ /* @__PURE__ */ R("rect", {
1481
+ x: "7",
1482
+ y: "14",
1483
+ width: "11",
1484
+ height: "2",
1485
+ rx: "1",
1486
+ fill: "black"
1487
+ }),
1488
+ /* @__PURE__ */ R("path", {
1489
+ d: "M 1.5 4.5 L 3.5 3 L 3.5 10 M 2 10 L 5 10",
1490
+ fill: "none",
1491
+ stroke: "black",
1492
+ strokeWidth: "1.6",
1493
+ strokeLinecap: "round",
1494
+ strokeLinejoin: "round"
1495
+ }),
1496
+ /* @__PURE__ */ R("path", {
1497
+ d: "M 1.5 14 C 1.5 12.8 4.5 12.8 4.5 14.5 C 4.5 16 1.5 16.5 1.5 18 L 5 18",
1498
+ fill: "none",
1499
+ stroke: "black",
1500
+ strokeWidth: "1.6",
1501
+ strokeLinecap: "round",
1502
+ strokeLinejoin: "round"
1503
+ })
1504
+ ]
1505
+ })
1506
+ }), /* @__PURE__ */ R("span", {
1507
+ className: p,
1508
+ "data-i18n": "orderedList",
1509
+ children: "Numbered list"
1510
+ })]
1511
+ }),
1512
+ /* @__PURE__ */ R("div", { className: "w-[1px] bg-[#e5e7eb] my-1" }),
1513
+ /* @__PURE__ */ R("button", {
1514
+ type: "button",
1515
+ className: `${d} gap-1 pr-1.5`,
1516
+ onMouseDown: (e) => {
1517
+ e.preventDefault(), typeof t == "function" && t();
1518
+ },
1519
+ onClick: () => c(!s),
1520
+ "aria-label": "Paragraph",
1521
+ children: [
1522
+ /* @__PURE__ */ R("span", {
1523
+ className: f,
1524
+ children: /* @__PURE__ */ R("svg", {
1525
+ viewBox: "0 0 20 20",
1526
+ className: "block h-4 w-4",
1527
+ children: [
1528
+ /* @__PURE__ */ R("rect", {
1529
+ x: "1",
1530
+ y: "4",
1531
+ width: "18",
1532
+ height: "2",
1533
+ rx: "1",
1534
+ fill: "black"
1535
+ }),
1536
+ /* @__PURE__ */ R("rect", {
1537
+ x: "1",
1538
+ y: "9",
1539
+ width: "18",
1540
+ height: "2",
1541
+ rx: "1",
1542
+ fill: "black"
1543
+ }),
1544
+ /* @__PURE__ */ R("rect", {
1545
+ x: "1",
1546
+ y: "14",
1547
+ width: "12",
1548
+ height: "2",
1549
+ rx: "1",
1550
+ fill: "black"
1551
+ })
1552
+ ]
1553
+ })
1554
+ }),
1555
+ /* @__PURE__ */ R("svg", {
1556
+ className: `h-2.5 w-2.5 fill-current text-gray-700 transition-transform ${s ? "rotate-180" : ""}`,
1557
+ viewBox: "0 0 20 20",
1558
+ children: /* @__PURE__ */ R("path", { d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" })
1559
+ }),
1560
+ /* @__PURE__ */ R("span", {
1561
+ className: p,
1562
+ "data-i18n": "paragraph",
1563
+ children: "Paragraph options"
1564
+ })
1565
+ ]
1566
+ })
1567
+ ]
1568
+ }),
1569
+ s && /* @__PURE__ */ R("div", {
1570
+ className: "forge-toolbar-dropdown absolute left-0 top-full mt-1 z-20 min-w-[130px] rounded-md border border-[#ccc] bg-white p-1 shadow-lg rtl:left-auto rtl:right-0 block",
1571
+ role: "list",
1572
+ "aria-label": "Paragraph options",
1573
+ children: [/* @__PURE__ */ R("div", {
1574
+ className: "forge-toolbar-group forge-toolbar-align mb-0.5 flex gap-0.5 border-b border-[#eee] pb-1",
1575
+ children: [
1576
+ /* @__PURE__ */ R("button", {
1577
+ type: "button",
1578
+ className: m,
1579
+ onMouseDown: (e) => {
1580
+ u(e, i, "left"), c(!1);
1581
+ },
1582
+ "aria-label": "Align left",
1583
+ children: [/* @__PURE__ */ R("span", {
1584
+ className: f,
1585
+ children: /* @__PURE__ */ R("svg", {
1586
+ viewBox: "0 0 20 20",
1587
+ className: "block h-4 w-4",
1588
+ children: [
1589
+ /* @__PURE__ */ R("rect", {
1590
+ x: "1",
1591
+ y: "4",
1592
+ width: "18",
1593
+ height: "2",
1594
+ rx: "1",
1595
+ fill: "black"
1596
+ }),
1597
+ /* @__PURE__ */ R("rect", {
1598
+ x: "1",
1599
+ y: "9",
1600
+ width: "12",
1601
+ height: "2",
1602
+ rx: "1",
1603
+ fill: "black"
1604
+ }),
1605
+ /* @__PURE__ */ R("rect", {
1606
+ x: "1",
1607
+ y: "14",
1608
+ width: "18",
1609
+ height: "2",
1610
+ rx: "1",
1611
+ fill: "black"
1612
+ })
1613
+ ]
1614
+ })
1615
+ }), /* @__PURE__ */ R("span", {
1616
+ className: p,
1617
+ "data-i18n": "alignLeft",
1618
+ children: "Align left"
1619
+ })]
1620
+ }),
1621
+ /* @__PURE__ */ R("button", {
1622
+ type: "button",
1623
+ className: m,
1624
+ onMouseDown: (e) => {
1625
+ u(e, i, "center"), c(!1);
1626
+ },
1627
+ "aria-label": "Align center",
1628
+ children: [/* @__PURE__ */ R("span", {
1629
+ className: f,
1630
+ children: /* @__PURE__ */ R("svg", {
1631
+ viewBox: "0 0 20 20",
1632
+ className: "block h-4 w-4",
1633
+ children: [
1634
+ /* @__PURE__ */ R("rect", {
1635
+ x: "1",
1636
+ y: "4",
1637
+ width: "18",
1638
+ height: "2",
1639
+ rx: "1",
1640
+ fill: "black"
1641
+ }),
1642
+ /* @__PURE__ */ R("rect", {
1643
+ x: "4",
1644
+ y: "9",
1645
+ width: "12",
1646
+ height: "2",
1647
+ rx: "1",
1648
+ fill: "black"
1649
+ }),
1650
+ /* @__PURE__ */ R("rect", {
1651
+ x: "1",
1652
+ y: "14",
1653
+ width: "18",
1654
+ height: "2",
1655
+ rx: "1",
1656
+ fill: "black"
1657
+ })
1658
+ ]
1659
+ })
1660
+ }), /* @__PURE__ */ R("span", {
1661
+ className: p,
1662
+ "data-i18n": "alignCenter",
1663
+ children: "Align center"
1664
+ })]
1665
+ }),
1666
+ /* @__PURE__ */ R("button", {
1667
+ type: "button",
1668
+ className: m,
1669
+ onMouseDown: (e) => {
1670
+ u(e, i, "right"), c(!1);
1671
+ },
1672
+ "aria-label": "Align right",
1673
+ children: [/* @__PURE__ */ R("span", {
1674
+ className: f,
1675
+ children: /* @__PURE__ */ R("svg", {
1676
+ viewBox: "0 0 20 20",
1677
+ className: "block h-4 w-4",
1678
+ children: [
1679
+ /* @__PURE__ */ R("rect", {
1680
+ x: "1",
1681
+ y: "4",
1682
+ width: "18",
1683
+ height: "2",
1684
+ rx: "1",
1685
+ fill: "black"
1686
+ }),
1687
+ /* @__PURE__ */ R("rect", {
1688
+ x: "7",
1689
+ y: "9",
1690
+ width: "12",
1691
+ height: "2",
1692
+ rx: "1",
1693
+ fill: "black"
1694
+ }),
1695
+ /* @__PURE__ */ R("rect", {
1696
+ x: "1",
1697
+ y: "14",
1698
+ width: "18",
1699
+ height: "2",
1700
+ rx: "1",
1701
+ fill: "black"
1702
+ })
1703
+ ]
1704
+ })
1705
+ }), /* @__PURE__ */ R("span", {
1706
+ className: p,
1707
+ "data-i18n": "alignRight",
1708
+ children: "Align right"
1709
+ })]
1710
+ }),
1711
+ /* @__PURE__ */ R("button", {
1712
+ type: "button",
1713
+ className: m,
1714
+ onMouseDown: (e) => {
1715
+ u(e, i, "justify"), c(!1);
1716
+ },
1717
+ "aria-label": "Justify",
1718
+ children: [/* @__PURE__ */ R("span", {
1719
+ className: f,
1720
+ children: /* @__PURE__ */ R("svg", {
1721
+ viewBox: "0 0 20 20",
1722
+ className: "block h-4 w-4",
1723
+ children: [
1724
+ /* @__PURE__ */ R("rect", {
1725
+ x: "1",
1726
+ y: "4",
1727
+ width: "18",
1728
+ height: "2",
1729
+ rx: "1",
1730
+ fill: "black"
1731
+ }),
1732
+ /* @__PURE__ */ R("rect", {
1733
+ x: "1",
1734
+ y: "9",
1735
+ width: "18",
1736
+ height: "2",
1737
+ rx: "1",
1738
+ fill: "black"
1739
+ }),
1740
+ /* @__PURE__ */ R("rect", {
1741
+ x: "1",
1742
+ y: "14",
1743
+ width: "18",
1744
+ height: "2",
1745
+ rx: "1",
1746
+ fill: "black"
1747
+ })
1748
+ ]
1749
+ })
1750
+ }), /* @__PURE__ */ R("span", {
1751
+ className: p,
1752
+ "data-i18n": "justify",
1753
+ children: "Justify"
1754
+ })]
1755
+ })
1756
+ ]
1757
+ }), /* @__PURE__ */ R("div", {
1758
+ className: "forge-toolbar-group forge-toolbar-list flex gap-0.5 py-0.5",
1759
+ children: [/* @__PURE__ */ R("button", {
1760
+ type: "button",
1761
+ className: m,
1762
+ onMouseDown: (e) => {
1763
+ u(e, a), c(!1);
1764
+ },
1765
+ "aria-label": "Outdent",
1766
+ children: [/* @__PURE__ */ R("span", {
1767
+ className: f,
1768
+ children: /* @__PURE__ */ R("svg", {
1769
+ viewBox: "0 0 20 20",
1770
+ className: "block h-4 w-4",
1771
+ fill: "none",
1772
+ stroke: "black",
1773
+ strokeWidth: "2",
1774
+ strokeLinecap: "round",
1775
+ strokeLinejoin: "round",
1776
+ children: [
1777
+ /* @__PURE__ */ R("line", {
1778
+ x1: "9",
1779
+ y1: "4",
1780
+ x2: "19",
1781
+ y2: "4"
1782
+ }),
1783
+ /* @__PURE__ */ R("line", {
1784
+ x1: "9",
1785
+ y1: "10",
1786
+ x2: "19",
1787
+ y2: "10"
1788
+ }),
1789
+ /* @__PURE__ */ R("line", {
1790
+ x1: "9",
1791
+ y1: "16",
1792
+ x2: "19",
1793
+ y2: "16"
1794
+ }),
1795
+ /* @__PURE__ */ R("polyline", { points: "6,8 2,12 6,16" })
1796
+ ]
1797
+ })
1798
+ }), /* @__PURE__ */ R("span", {
1799
+ className: p,
1800
+ "data-i18n": "outdent",
1801
+ children: "Outdent"
1802
+ })]
1803
+ }), /* @__PURE__ */ R("button", {
1804
+ type: "button",
1805
+ className: m,
1806
+ onMouseDown: (e) => {
1807
+ u(e, o), c(!1);
1808
+ },
1809
+ "aria-label": "Indent",
1810
+ children: [/* @__PURE__ */ R("span", {
1811
+ className: f,
1812
+ children: /* @__PURE__ */ R("svg", {
1813
+ viewBox: "0 0 20 20",
1814
+ className: "block h-4 w-4",
1815
+ fill: "none",
1816
+ stroke: "black",
1817
+ strokeWidth: "2",
1818
+ strokeLinecap: "round",
1819
+ strokeLinejoin: "round",
1820
+ children: [
1821
+ /* @__PURE__ */ R("line", {
1822
+ x1: "9",
1823
+ y1: "4",
1824
+ x2: "19",
1825
+ y2: "4"
1826
+ }),
1827
+ /* @__PURE__ */ R("line", {
1828
+ x1: "9",
1829
+ y1: "10",
1830
+ x2: "19",
1831
+ y2: "10"
1832
+ }),
1833
+ /* @__PURE__ */ R("line", {
1834
+ x1: "9",
1835
+ y1: "16",
1836
+ x2: "19",
1837
+ y2: "16"
1838
+ }),
1839
+ /* @__PURE__ */ R("polyline", { points: "2,8 6,12 2,16" })
1840
+ ]
1841
+ })
1842
+ }), /* @__PURE__ */ R("span", {
1843
+ className: p,
1844
+ "data-i18n": "indent",
1845
+ children: "Indent"
1846
+ })]
1847
+ })]
1848
+ })]
1849
+ })
1850
+ ]
1851
+ });
1852
+ }
1853
+ //#endregion
1854
+ //#region src/components/shared/toolbar/Paragraph/Hooks/paragraphLogic.jsx
1855
+ function ft() {
1856
+ let e = window.getSelection();
1857
+ return e && e.rangeCount > 0 ? e.getRangeAt(0).cloneRange() : null;
1858
+ }
1859
+ function pt(e) {
1860
+ if (!e) return;
1861
+ let t = window.getSelection();
1862
+ t && (t.removeAllRanges(), t.addRange(e));
1863
+ }
1864
+ function X(e) {
1865
+ if (!e) return;
1866
+ let t = document.createRange();
1867
+ t.selectNodeContents(e), t.collapse(!1);
1868
+ let n = window.getSelection();
1869
+ n && (n.removeAllRanges(), n.addRange(t));
1870
+ }
1871
+ function mt(e) {
1872
+ if (!e || e.nodeType !== 1) return !1;
1873
+ let t = e.tagName.toLowerCase();
1874
+ return [
1875
+ "p",
1876
+ "div",
1877
+ "h1",
1878
+ "h2",
1879
+ "h3",
1880
+ "h4",
1881
+ "h5",
1882
+ "h6",
1883
+ "li",
1884
+ "blockquote",
1885
+ "pre"
1886
+ ].includes(t);
1887
+ }
1888
+ function ht(e) {
1889
+ if (!e) return null;
1890
+ let t = e.nodeType === 3 ? e.parentNode : e;
1891
+ for (; t && t !== document.body && !mt(t);) t = t.parentNode;
1892
+ return t && mt(t) ? t : null;
1893
+ }
1894
+ function gt(e) {
1895
+ if (!e) return null;
1896
+ let t = e.nodeType === 3 ? e.parentNode : e;
1897
+ for (; t && t !== document.body && t.tagName !== "LI";) t = t.parentNode;
1898
+ return t && t.tagName === "LI" ? t : null;
1899
+ }
1900
+ function _t(e) {
1901
+ let t = document.createElement(e);
1902
+ return t.className = e === "ul" ? "list-disc pl-5 my-2" : "list-decimal pl-5 my-2", t;
1903
+ }
1904
+ function vt(e, t) {
1905
+ let n = _t(t), r = document.createElement("li");
1906
+ return r.innerHTML = e.innerHTML, n.appendChild(r), e.parentNode.replaceChild(n, e), r;
1907
+ }
1908
+ function yt(e) {
1909
+ let t = e.parentNode, n = document.createDocumentFragment(), r = Array.from(e.children), i = null;
1910
+ return r.forEach((e) => {
1911
+ let t = document.createElement("div");
1912
+ t.innerHTML = e.innerHTML, n.appendChild(t), i = t;
1913
+ }), t.replaceChild(n, e), i;
1914
+ }
1915
+ function bt(e, t) {
1916
+ let n = _t(t);
1917
+ return n.innerHTML = e.innerHTML, e.parentNode.replaceChild(n, e), n;
1918
+ }
1919
+ function xt() {
1920
+ let e = q(null), t = () => {
1921
+ e.current = ft();
1922
+ }, n = (t) => {
1923
+ pt(e.current);
1924
+ let n = window.getSelection();
1925
+ if (!n || !n.rangeCount) return;
1926
+ let r = n.anchorNode;
1927
+ if (!r) return;
1928
+ r.nodeType === 3 && (r = r.parentNode);
1929
+ let i = gt(r);
1930
+ if (i) {
1931
+ let n = i.parentNode;
1932
+ if (n && (n.tagName === "UL" || n.tagName === "OL")) {
1933
+ if (n.tagName.toLowerCase() === t) {
1934
+ let e = yt(n);
1935
+ e && X(e);
1936
+ } else {
1937
+ let e = bt(n, t).lastElementChild;
1938
+ e && X(e);
1939
+ }
1940
+ e.current = ft();
1941
+ return;
1942
+ }
1943
+ }
1944
+ let a = ht(r);
1945
+ if (a) {
1946
+ if (a.getAttribute && a.getAttribute("contenteditable") === "true") {
1947
+ let e = document.createElement("div");
1948
+ e.innerHTML = a.innerHTML, a.innerHTML = "", a.appendChild(e), X(vt(e, t));
1949
+ } else X(vt(a, t));
1950
+ e.current = ft();
1951
+ }
1952
+ };
1953
+ return {
1954
+ saveSelectionRange: t,
1955
+ toggleUnorderedList: () => n("ul"),
1956
+ toggleOrderedList: () => n("ol"),
1957
+ setAlignment: (t) => {
1958
+ pt(e.current);
1959
+ let n = window.getSelection();
1960
+ if (!n || !n.rangeCount) return;
1961
+ let r = n.anchorNode;
1962
+ if (!r) return;
1963
+ r.nodeType === 3 && (r = r.parentNode);
1964
+ let i = r.closest("p, div, h1, h2, h3, h4, h5, h6, li, blockquote, pre");
1965
+ i && (i.style.textAlign = t), e.current = ft();
1966
+ },
1967
+ indent: () => {
1968
+ pt(e.current);
1969
+ let t = window.getSelection();
1970
+ if (!t || !t.rangeCount) return;
1971
+ let n = t.anchorNode;
1972
+ if (!n) return;
1973
+ n.nodeType === 3 && (n = n.parentNode);
1974
+ let r = gt(n);
1975
+ if (r) {
1976
+ let e = r.parentNode;
1977
+ if (!e || e.tagName !== "UL" && e.tagName !== "OL") return;
1978
+ let t = r.previousElementSibling;
1979
+ if (!t || t.tagName !== "LI") return;
1980
+ let n = t.querySelector(":scope > ul, :scope > ol");
1981
+ n || (n = _t(e.tagName.toLowerCase()), t.appendChild(n)), n.appendChild(r), X(r);
1982
+ } else {
1983
+ let e = ht(n);
1984
+ if (!e) return;
1985
+ let t = parseInt(e.style.marginLeft) || 0;
1986
+ e.style.marginLeft = t + 20 + "px";
1987
+ }
1988
+ e.current = ft();
1989
+ },
1990
+ outdent: () => {
1991
+ pt(e.current);
1992
+ let t = window.getSelection();
1993
+ if (!t || !t.rangeCount) return;
1994
+ let n = t.anchorNode;
1995
+ if (!n) return;
1996
+ n.nodeType === 3 && (n = n.parentNode);
1997
+ let r = gt(n);
1998
+ if (r) {
1999
+ let e = r.parentNode;
2000
+ if (!e || e.tagName !== "UL" && e.tagName !== "OL") return;
2001
+ let t = e.parentNode;
2002
+ if (t && t.tagName === "LI") t.parentNode.insertBefore(r, t.nextSibling), e.children.length === 0 && e.remove(), X(r);
2003
+ else {
2004
+ let t = document.createElement("div");
2005
+ t.innerHTML = r.innerHTML;
2006
+ let n = e.parentNode;
2007
+ e.children.length === 1 ? n.replaceChild(t, e) : (n.insertBefore(t, e.nextSibling), e.removeChild(r)), X(t);
2008
+ }
2009
+ } else {
2010
+ let e = ht(n);
2011
+ if (!e) return;
2012
+ let t = parseInt(e.style.marginLeft) || 0;
2013
+ e.style.marginLeft = Math.max(0, t - 20) + "px";
2014
+ }
2015
+ e.current = ft();
2016
+ }
2017
+ };
2018
+ }
2019
+ //#endregion
2020
+ //#region src/components/shared/toolbar/Paragraph/Components/index.jsx
2021
+ function St() {
2022
+ return /* @__PURE__ */ R(dt, { logic: xt() });
2023
+ }
2024
+ //#endregion
2025
+ //#region src/components/shared/toolbar/Table/Components/TableToolbar.jsx
2026
+ var Ct = 10;
2027
+ function wt({ logic: e }) {
2028
+ let { insertTable: t } = e, [n, r] = G(1), [i, a] = G(1), [o, s] = G(!1), c = q(null), l = q(null), u = q(null);
2029
+ K(() => {
2030
+ if (!o) return;
2031
+ function e(e) {
2032
+ l.current && !l.current.contains(e.target) && c.current && !c.current.contains(e.target) && s(!1);
2033
+ }
2034
+ return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
2035
+ }, [o]);
2036
+ let d = (e) => {
2037
+ if (!u.current) return;
2038
+ let t = u.current.getBoundingClientRect(), n = e.clientX - t.left, i = e.clientY - t.top, o = t.width / Ct, s = Math.min(Math.floor(n / o) + 1, Ct), c = Math.min(Math.floor(i / o) + 1, Ct);
2039
+ a(s), r(c);
2040
+ }, f = () => {
2041
+ r(1), a(1);
2042
+ }, p = () => {
2043
+ t(n, i), s(!1), r(1), a(1);
2044
+ }, m = i / Ct * 100, h = n / Ct * 100;
2045
+ return /* @__PURE__ */ R("div", {
2046
+ className: "forge-toolbar-group forge-toolbar-table relative flex items-center gap-0.5",
2047
+ children: [/* @__PURE__ */ R("button", {
2048
+ ref: c,
2049
+ type: "button",
2050
+ className: "forge-toolbar-button group relative flex h-8 cursor-pointer items-center justify-center rounded-[2px] border border-[#ccc] bg-white px-2 text-sm leading-none transition-all duration-150 hover:bg-[#f0f0f0] active:translate-y-px",
2051
+ "aria-label": "Table",
2052
+ onClick: () => s(!o),
2053
+ children: [/* @__PURE__ */ R("span", {
2054
+ className: "forge-toolbar-icon",
2055
+ children: "▦"
2056
+ }), /* @__PURE__ */ R("span", {
2057
+ className: "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]",
2058
+ "data-i18n": "table",
2059
+ children: "Table"
2060
+ })]
2061
+ }), /* @__PURE__ */ R("div", {
2062
+ ref: l,
2063
+ className: `forge-toolbar-dropdown forge-dropdown-table absolute left-0 top-full z-10 mt-1 min-w-[160px] rounded-[3px] border border-[#ccc] bg-white p-2 shadow-[0_2px_6px_rgba(0,0,0,0.15)] rtl:left-auto rtl:right-0 ${o ? "block" : "hidden"}`,
2064
+ role: "list",
2065
+ "aria-label": "Insert table",
2066
+ children: [/* @__PURE__ */ R("div", {
2067
+ ref: u,
2068
+ className: "note-dimension-picker relative mx-auto h-40 w-40 cursor-pointer overflow-hidden rounded-[3px] border border-[#ccc] bg-[#f5f5f5]",
2069
+ onMouseMove: d,
2070
+ onMouseLeave: f,
2071
+ onClick: p,
2072
+ children: [
2073
+ /* @__PURE__ */ R("div", { className: "absolute inset-0 z-[5]" }),
2074
+ /* @__PURE__ */ R("div", {
2075
+ className: "pointer-events-none absolute left-0 top-0 z-[3] border-2 border-[#4a90d9] bg-[rgba(74,144,217,0.4)] transition-[width,height] duration-75 ease-in-out",
2076
+ style: {
2077
+ width: m + "%",
2078
+ height: h + "%"
2079
+ }
2080
+ }),
2081
+ /* @__PURE__ */ R("div", { className: "pointer-events-none absolute inset-0 z-[2] bg-white/30" }),
2082
+ /* @__PURE__ */ R("div", { className: "pointer-events-none absolute inset-0 z-[1] bg-[linear-gradient(rgba(0,0,0,0.05)_1px,transparent_1px),linear-gradient(90deg,rgba(0,0,0,0.05)_1px,transparent_1px)] bg-[size:16px_16px]" })
2083
+ ]
2084
+ }), /* @__PURE__ */ R("div", {
2085
+ className: "note-dimension-display px-0 pt-1.5 pb-0.5 text-center text-[13px] font-semibold text-[#333]",
2086
+ children: [
2087
+ n,
2088
+ " x ",
2089
+ i
2090
+ ]
2091
+ })]
2092
+ })]
2093
+ });
2094
+ }
2095
+ //#endregion
2096
+ //#region src/components/shared/toolbar/Table/Hooks/tableLogic.jsx
2097
+ function Tt() {
2098
+ let e = document.querySelector(".forge-editor__content");
2099
+ if (e) {
2100
+ e.focus();
2101
+ let t = document.createRange(), n = window.getSelection();
2102
+ if (n) {
2103
+ let r = e.lastChild;
2104
+ r ? (t.setStartAfter(r), t.collapse(!0)) : (t.selectNodeContents(e), t.collapse(!1)), n.removeAllRanges(), n.addRange(t);
2105
+ }
2106
+ }
2107
+ }
2108
+ function Et(e) {
2109
+ let t = window.getSelection();
2110
+ if (!t || !t.rangeCount) {
2111
+ Tt(), setTimeout(() => Et(e), 50);
2112
+ return;
2113
+ }
2114
+ let n = t.getRangeAt(0);
2115
+ n.deleteContents();
2116
+ let r = n.createContextualFragment(e), i = r.lastChild;
2117
+ n.insertNode(r), i ? (n.setStartAfter(i), n.collapse(!0)) : n.collapse(!1), t.removeAllRanges(), t.addRange(n);
2118
+ }
2119
+ function Dt() {
2120
+ return { insertTable: (e, t) => {
2121
+ let n = (100 / t).toFixed(2) + "%", r = "<table style=\"width:100%;table-layout:fixed;border-collapse:collapse;border:1px solid #ddd;\">";
2122
+ for (let i = 0; i < e; i++) {
2123
+ r += "<tr>";
2124
+ for (let e = 0; e < t; e++) r += `<td style="border:1px solid #ddd;padding:8px;width:${n};text-align:center;vertical-align:middle;overflow:hidden;word-break:break-word;"><br></td>`;
2125
+ r += "</tr>";
2126
+ }
2127
+ r += "</table><br>", Tt(), Et(r);
2128
+ } };
2129
+ }
2130
+ //#endregion
2131
+ //#region src/components/shared/toolbar/Table/Components/index.jsx
2132
+ function Ot() {
2133
+ return /* @__PURE__ */ R(wt, { logic: Dt() });
2134
+ }
2135
+ //#endregion
2136
+ //#region src/components/shared/toolbar/Insert/Components/InsertToolbar.jsx
2137
+ function kt({ logic: e }) {
2138
+ let { insertLink: t, insertImage: n, insertVideo: r } = e, i = "forge-toolbar-button group relative flex h-8 cursor-pointer items-center justify-center gap-0.5 rounded-[2px] border border-[#ccc] bg-white px-[7px] py-1 text-sm leading-none transition-all duration-150 hover:bg-[#f0f0f0] active:translate-y-px", a = "forge-toolbar-icon inline-block min-w-4 text-center text-sm font-medium leading-none", o = "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]";
2139
+ return /* @__PURE__ */ R("div", {
2140
+ className: "forge-toolbar-group forge-toolbar-insert flex items-center gap-0.5",
2141
+ children: [
2142
+ /* @__PURE__ */ R("button", {
2143
+ type: "button",
2144
+ className: i,
2145
+ onClick: t,
2146
+ "aria-label": "Link",
2147
+ children: [/* @__PURE__ */ R("span", {
2148
+ className: a,
2149
+ children: "🔗"
2150
+ }), /* @__PURE__ */ R("span", {
2151
+ className: o,
2152
+ "data-i18n": "link",
2153
+ children: "Link"
2154
+ })]
2155
+ }),
2156
+ /* @__PURE__ */ R("button", {
2157
+ type: "button",
2158
+ className: i,
2159
+ onClick: n,
2160
+ "aria-label": "Image",
2161
+ children: [/* @__PURE__ */ R("span", {
2162
+ className: a,
2163
+ children: "🖼"
2164
+ }), /* @__PURE__ */ R("span", {
2165
+ className: o,
2166
+ "data-i18n": "image",
2167
+ children: "Image"
2168
+ })]
2169
+ }),
2170
+ /* @__PURE__ */ R("button", {
2171
+ type: "button",
2172
+ className: i,
2173
+ onClick: r,
2174
+ "aria-label": "Video",
2175
+ children: [/* @__PURE__ */ R("span", {
2176
+ className: a,
2177
+ children: "▶"
2178
+ }), /* @__PURE__ */ R("span", {
2179
+ className: o,
2180
+ "data-i18n": "video",
2181
+ children: "Video"
2182
+ })]
2183
+ })
2184
+ ]
2185
+ });
2186
+ }
2187
+ //#endregion
2188
+ //#region src/components/shared/Hooks/sweetAlert.jsx
2189
+ var At = /* @__PURE__ */ c((/* @__PURE__ */ o(((e, t) => {
2190
+ (function(n, r) {
2191
+ typeof e == "object" && t !== void 0 ? t.exports = r() : typeof define == "function" && define.amd ? define(r) : (n = typeof globalThis < "u" ? globalThis : n || self, n.Sweetalert2 = r());
2192
+ })(e, (function() {
2193
+ function e(e, t, n) {
2194
+ if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
2195
+ throw TypeError("Private element is not present on this object");
2196
+ }
2197
+ function t(e, t) {
2198
+ if (t.has(e)) throw TypeError("Cannot initialize the same private elements twice on an object");
2199
+ }
2200
+ function n(t, n) {
2201
+ return t.get(e(t, n));
2202
+ }
2203
+ function r(e, n, r) {
2204
+ t(e, n), n.set(e, r);
2205
+ }
2206
+ function i(t, n, r) {
2207
+ return t.set(e(t, n), r), r;
2208
+ }
2209
+ let a = {}, o = () => {
2210
+ a.previousActiveElement instanceof HTMLElement ? (a.previousActiveElement.focus(), a.previousActiveElement = null) : document.body && document.body.focus();
2211
+ }, s = (e) => new Promise((t) => {
2212
+ if (!e) return t();
2213
+ let n = window.scrollX, r = window.scrollY;
2214
+ a.restoreFocusTimeout = setTimeout(() => {
2215
+ o(), t();
2216
+ }, 100), window.scrollTo(n, r);
2217
+ }), c = "swal2-", l = (/* @__PURE__ */ "container.shown.height-auto.iosfix.popup.modal.no-backdrop.no-transition.toast.toast-shown.show.hide.close.title.html-container.actions.confirm.deny.cancel.footer.icon.icon-content.image.input.file.range.select.radio.checkbox.label.textarea.inputerror.input-label.validation-message.progress-steps.active-progress-step.progress-step.progress-step-line.loader.loading.styled.top.top-start.top-end.top-left.top-right.center.center-start.center-end.center-left.center-right.bottom.bottom-start.bottom-end.bottom-left.bottom-right.grow-row.grow-column.grow-fullscreen.rtl.timer-progress-bar.timer-progress-bar-container.scrollbar-measure.icon-success.icon-warning.icon-info.icon-question.icon-error.draggable.dragging".split(".")).reduce((e, t) => (e[t] = c + t, e), {}), u = [
2218
+ "success",
2219
+ "warning",
2220
+ "info",
2221
+ "question",
2222
+ "error"
2223
+ ].reduce((e, t) => (e[t] = c + t, e), {}), d = "SweetAlert2:", f = (e) => e.charAt(0).toUpperCase() + e.slice(1), p = (e) => {
2224
+ console.warn(`${d} ${typeof e == "object" ? e.join(" ") : e}`);
2225
+ }, m = (e) => {
2226
+ console.error(`${d} ${e}`);
2227
+ }, h = [], g = (e) => {
2228
+ h.includes(e) || (h.push(e), p(e));
2229
+ }, _ = (e, t = null) => {
2230
+ g(`"${e}" is deprecated and will be removed in the next major release.${t ? ` Use "${t}" instead.` : ""}`);
2231
+ }, v = (e) => typeof e == "function" ? e() : e, y = (e) => e && typeof e.toPromise == "function", b = (e) => y(e) ? e.toPromise() : Promise.resolve(e), x = (e) => e && Promise.resolve(e) === e, S = () => navigator.userAgent.includes("Firefox"), C = () => document.body.querySelector(`.${l.container}`), w = (e) => {
2232
+ let t = C();
2233
+ return t ? t.querySelector(e) : null;
2234
+ }, T = (e) => w(`.${e}`), E = () => T(l.popup), D = () => T(l.icon), O = () => T(l["icon-content"]), ee = () => T(l.title), te = () => T(l["html-container"]), k = () => T(l.image), ne = () => T(l["progress-steps"]), re = () => T(l["validation-message"]), A = () => w(`.${l.actions} .${l.confirm}`), ie = () => w(`.${l.actions} .${l.cancel}`), j = () => w(`.${l.actions} .${l.deny}`), ae = () => T(l["input-label"]), M = () => w(`.${l.loader}`), oe = () => T(l.actions), se = () => T(l.footer), ce = () => T(l["timer-progress-bar"]), le = () => T(l.close), ue = () => {
2235
+ let e = E();
2236
+ if (!e) return [];
2237
+ let t = e.querySelectorAll("[tabindex]:not([tabindex=\"-1\"]):not([tabindex=\"0\"])"), n = Array.from(t).sort((e, t) => {
2238
+ let n = parseInt(e.getAttribute("tabindex") || "0"), r = parseInt(t.getAttribute("tabindex") || "0");
2239
+ return n > r ? 1 : n < r ? -1 : 0;
2240
+ }), r = e.querySelectorAll("\n a[href],\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n [tabindex=\"0\"],\n [contenteditable],\n audio[controls],\n video[controls],\n summary\n"), i = Array.from(r).filter((e) => e.getAttribute("tabindex") !== "-1");
2241
+ return [...new Set(n.concat(i))].filter((e) => H(e));
2242
+ }, de = () => P(document.body, l.shown) && !P(document.body, l["toast-shown"]) && !P(document.body, l["no-backdrop"]), fe = () => {
2243
+ let e = E();
2244
+ return e ? P(e, l.toast) : !1;
2245
+ }, pe = () => {
2246
+ let e = E();
2247
+ return e ? e.hasAttribute("data-loading") : !1;
2248
+ }, N = (e, t) => {
2249
+ if (e.textContent = "", t) {
2250
+ let n = new DOMParser().parseFromString(t, "text/html"), r = n.querySelector("head");
2251
+ r && Array.from(r.childNodes).forEach((t) => {
2252
+ e.appendChild(t);
2253
+ });
2254
+ let i = n.querySelector("body");
2255
+ i && Array.from(i.childNodes).forEach((t) => {
2256
+ t instanceof HTMLVideoElement || t instanceof HTMLAudioElement ? e.appendChild(t.cloneNode(!0)) : e.appendChild(t);
2257
+ });
2258
+ }
2259
+ }, P = (e, t) => t ? t.split(/\s+/).every((t) => e.classList.contains(t)) : !1, me = (e, t) => {
2260
+ Array.from(e.classList).forEach((n) => {
2261
+ !Object.values(l).includes(n) && !Object.values(u).includes(n) && !Object.values(t.showClass || {}).includes(n) && e.classList.remove(n);
2262
+ });
2263
+ }, F = (e, t, n) => {
2264
+ if (me(e, t), !t.customClass) return;
2265
+ let r = t.customClass[n];
2266
+ if (r) {
2267
+ if (typeof r != "string" && !r.forEach) {
2268
+ p(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof r}"`);
2269
+ return;
2270
+ }
2271
+ I(e, r);
2272
+ }
2273
+ }, he = (e, t) => {
2274
+ if (!t) return null;
2275
+ switch (t) {
2276
+ case "select":
2277
+ case "textarea":
2278
+ case "file": return e.querySelector(`.${l.popup} > .${l[t]}`);
2279
+ case "checkbox": return e.querySelector(`.${l.popup} > .${l.checkbox} input`);
2280
+ case "radio": return e.querySelector(`.${l.popup} > .${l.radio} input:checked`) || e.querySelector(`.${l.popup} > .${l.radio} input:first-child`);
2281
+ case "range": return e.querySelector(`.${l.popup} > .${l.range} input`);
2282
+ default: return e.querySelector(`.${l.popup} > .${l.input}`);
2283
+ }
2284
+ }, ge = (e) => {
2285
+ if (e.focus(), e.type !== "file") {
2286
+ let t = e.value;
2287
+ e.value = "", e.value = t;
2288
+ }
2289
+ }, _e = (e, t, n) => {
2290
+ if (!e || !t) return;
2291
+ let r = typeof t == "string" ? t.split(/\s+/).filter(Boolean) : t;
2292
+ (Array.isArray(e) ? e : [e]).forEach((e) => {
2293
+ r.forEach((t) => {
2294
+ n ? e.classList.add(t) : e.classList.remove(t);
2295
+ });
2296
+ });
2297
+ }, I = (e, t) => {
2298
+ _e(e, t, !0);
2299
+ }, L = (e, t) => {
2300
+ _e(e, t, !1);
2301
+ }, R = (e, t) => Array.from(e.children).find((e) => e instanceof HTMLElement && P(e, t)), ve = (e, t, n) => {
2302
+ n === `${parseInt(`${n}`)}` && (n = parseInt(n)), n || n === 0 ? e.style.setProperty(t, typeof n == "number" ? `${n}px` : n) : e.style.removeProperty(t);
2303
+ }, z = (e, t = "flex") => {
2304
+ e && (e.style.display = t);
2305
+ }, B = (e) => {
2306
+ e && (e.style.display = "none");
2307
+ }, ye = (e, t = "block") => {
2308
+ e && new MutationObserver(() => {
2309
+ be(e, e.innerHTML, t);
2310
+ }).observe(e, {
2311
+ childList: !0,
2312
+ subtree: !0
2313
+ });
2314
+ }, V = (e, t, n, r) => {
2315
+ let i = e.querySelector(t);
2316
+ i && i.style.setProperty(n, r);
2317
+ }, be = (e, t, n = "flex") => {
2318
+ t ? z(e, n) : B(e);
2319
+ }, H = (e) => !!(e && (e.offsetWidth || e.offsetHeight || e.getClientRects().length)), xe = () => !H(A()) && !H(j()) && !H(ie()), Se = (e) => e.scrollHeight > e.clientHeight, U = (e, t) => {
2320
+ let n = e;
2321
+ for (; n && n !== t;) {
2322
+ if (Se(n)) return !0;
2323
+ n = n.parentElement;
2324
+ }
2325
+ return !1;
2326
+ }, Ce = (e) => {
2327
+ let t = window.getComputedStyle(e), n = parseFloat(t.getPropertyValue("animation-duration") || "0"), r = parseFloat(t.getPropertyValue("transition-duration") || "0");
2328
+ return n > 0 || r > 0;
2329
+ }, we = (e, t = !1) => {
2330
+ let n = ce();
2331
+ n && H(n) && (t && (n.style.transition = "none", n.style.width = "100%"), setTimeout(() => {
2332
+ n.style.transition = `width ${e / 1e3}s linear`, n.style.width = "0%";
2333
+ }, 10));
2334
+ }, Te = () => {
2335
+ let e = ce();
2336
+ if (!e) return;
2337
+ let t = parseInt(window.getComputedStyle(e).width);
2338
+ e.style.removeProperty("transition"), e.style.width = "100%";
2339
+ let n = t / parseInt(window.getComputedStyle(e).width) * 100;
2340
+ e.style.width = `${n}%`;
2341
+ }, Ee = () => typeof window > "u" || typeof document > "u", De = `
2342
+ <div aria-labelledby="${l.title}" aria-describedby="${l["html-container"]}" class="${l.popup}" tabindex="-1">
2343
+ <button type="button" class="${l.close}"></button>
2344
+ <ul class="${l["progress-steps"]}"></ul>
2345
+ <div class="${l.icon}"></div>
2346
+ <img class="${l.image}" />
2347
+ <h2 class="${l.title}" id="${l.title}"></h2>
2348
+ <div class="${l["html-container"]}" id="${l["html-container"]}"></div>
2349
+ <input class="${l.input}" id="${l.input}" />
2350
+ <input type="file" class="${l.file}" />
2351
+ <div class="${l.range}">
2352
+ <input type="range" />
2353
+ <output></output>
2354
+ </div>
2355
+ <select class="${l.select}" id="${l.select}"></select>
2356
+ <div class="${l.radio}"></div>
2357
+ <label class="${l.checkbox}">
2358
+ <input type="checkbox" id="${l.checkbox}" />
2359
+ <span class="${l.label}"></span>
2360
+ </label>
2361
+ <textarea class="${l.textarea}" id="${l.textarea}"></textarea>
2362
+ <div class="${l["validation-message"]}" id="${l["validation-message"]}"></div>
2363
+ <div class="${l.actions}">
2364
+ <div class="${l.loader}"></div>
2365
+ <button type="button" class="${l.confirm}"></button>
2366
+ <button type="button" class="${l.deny}"></button>
2367
+ <button type="button" class="${l.cancel}"></button>
2368
+ </div>
2369
+ <div class="${l.footer}"></div>
2370
+ <div class="${l["timer-progress-bar-container"]}">
2371
+ <div class="${l["timer-progress-bar"]}"></div>
2372
+ </div>
2373
+ </div>
2374
+ `.replace(/(^|\n)\s*/g, ""), Oe = () => {
2375
+ let e = C();
2376
+ return e ? (e.remove(), L([document.documentElement, document.body], [
2377
+ l["no-backdrop"],
2378
+ l["toast-shown"],
2379
+ l["has-column"]
2380
+ ]), !0) : !1;
2381
+ }, W = () => {
2382
+ a.currentInstance && a.currentInstance.resetValidationMessage();
2383
+ }, G = () => {
2384
+ let e = E();
2385
+ if (!e) return;
2386
+ let t = R(e, l.input), n = R(e, l.file), r = e.querySelector(`.${l.range} input`), i = e.querySelector(`.${l.range} output`), a = R(e, l.select), o = e.querySelector(`.${l.checkbox} input`), s = R(e, l.textarea);
2387
+ t && (t.oninput = W), n && (n.onchange = W), a && (a.onchange = W), o && (o.onchange = W), s && (s.oninput = W), r && i && (r.oninput = () => {
2388
+ W(), i.value = r.value;
2389
+ }, r.onchange = () => {
2390
+ W(), i.value = r.value;
2391
+ });
2392
+ }, ke = (e) => {
2393
+ if (typeof e == "string") {
2394
+ let t = document.querySelector(e);
2395
+ if (!t) throw Error(`Target element "${e}" not found`);
2396
+ return t;
2397
+ }
2398
+ return e;
2399
+ }, K = (e) => {
2400
+ let t = E();
2401
+ t && (t.setAttribute("role", e.toast ? "alert" : "dialog"), t.setAttribute("aria-live", e.toast ? "polite" : "assertive"), e.toast || t.setAttribute("aria-modal", "true"));
2402
+ }, q = (e) => {
2403
+ window.getComputedStyle(e).direction === "rtl" && (I(C(), l.rtl), a.isRTL = !0);
2404
+ }, Ae = (e) => {
2405
+ let t = Oe();
2406
+ if (Ee()) {
2407
+ m("SweetAlert2 requires document to initialize");
2408
+ return;
2409
+ }
2410
+ let n = document.createElement("div");
2411
+ n.className = l.container, t && I(n, l["no-transition"]), N(n, De), n.dataset.swal2Theme = e.theme;
2412
+ let r = ke(e.target || "body");
2413
+ r.appendChild(n), e.topLayer && (n.setAttribute("popover", ""), n.showPopover()), K(e), q(r), G();
2414
+ }, je = (e, t) => {
2415
+ e instanceof HTMLElement ? t.appendChild(e) : typeof e == "object" ? Me(e, t) : e && N(t, e);
2416
+ }, Me = (e, t) => {
2417
+ "jquery" in e ? Ne(t, e) : N(t, e.toString());
2418
+ }, Ne = (e, t) => {
2419
+ if (e.textContent = "", 0 in t) for (let n = 0; n in t; n++) e.appendChild(t[n].cloneNode(!0));
2420
+ else e.appendChild(t.cloneNode(!0));
2421
+ }, Pe = (e, t) => {
2422
+ let n = oe(), r = M();
2423
+ !n || !r || (!t.showConfirmButton && !t.showDenyButton && !t.showCancelButton ? B(n) : z(n), F(n, t, "actions"), Fe(n, r, t), N(r, t.loaderHtml || ""), F(r, t, "loader"));
2424
+ };
2425
+ function Fe(e, t, n) {
2426
+ let r = A(), i = j(), a = ie();
2427
+ !r || !i || !a || (Re(r, "confirm", n), Re(i, "deny", n), Re(a, "cancel", n), Ie(r, i, a, n), n.reverseButtons && (n.toast ? (e.insertBefore(a, r), e.insertBefore(i, r)) : (e.insertBefore(a, t), e.insertBefore(i, t), e.insertBefore(r, t))));
2428
+ }
2429
+ function Ie(e, t, n, r) {
2430
+ if (!r.buttonsStyling) {
2431
+ L([
2432
+ e,
2433
+ t,
2434
+ n
2435
+ ], l.styled);
2436
+ return;
2437
+ }
2438
+ I([
2439
+ e,
2440
+ t,
2441
+ n
2442
+ ], l.styled), [
2443
+ [
2444
+ e,
2445
+ "confirm",
2446
+ r.confirmButtonColor
2447
+ ],
2448
+ [
2449
+ t,
2450
+ "deny",
2451
+ r.denyButtonColor
2452
+ ],
2453
+ [
2454
+ n,
2455
+ "cancel",
2456
+ r.cancelButtonColor
2457
+ ]
2458
+ ].forEach(([e, t, n]) => {
2459
+ n && e.style.setProperty(`--swal2-${t}-button-background-color`, n), Le(e);
2460
+ });
2461
+ }
2462
+ function Le(e) {
2463
+ let t = window.getComputedStyle(e);
2464
+ if (t.getPropertyValue("--swal2-action-button-focus-box-shadow")) return;
2465
+ let n = t.backgroundColor.replace(/rgba?\((\d+), (\d+), (\d+).*/, "rgba($1, $2, $3, 0.5)");
2466
+ e.style.setProperty("--swal2-action-button-focus-box-shadow", t.getPropertyValue("--swal2-outline").replace(/ rgba\(.*/, ` ${n}`));
2467
+ }
2468
+ function Re(e, t, n) {
2469
+ let r = f(t);
2470
+ be(e, n[`show${r}Button`], "inline-block"), N(e, n[`${t}ButtonText`] || ""), e.setAttribute("aria-label", n[`${t}ButtonAriaLabel`] || ""), e.className = l[t], F(e, n, `${t}Button`);
2471
+ }
2472
+ let ze = (e, t) => {
2473
+ let n = le();
2474
+ n && (N(n, t.closeButtonHtml || ""), F(n, t, "closeButton"), be(n, t.showCloseButton), n.setAttribute("aria-label", t.closeButtonAriaLabel || ""));
2475
+ }, Be = (e, t) => {
2476
+ let n = C();
2477
+ n && (Ve(n, t.backdrop), He(n, t.position), Ue(n, t.grow), F(n, t, "container"));
2478
+ };
2479
+ function Ve(e, t) {
2480
+ typeof t == "string" ? e.style.background = t : t || I([document.documentElement, document.body], l["no-backdrop"]);
2481
+ }
2482
+ function He(e, t) {
2483
+ t && (t in l ? I(e, l[t]) : (p("The \"position\" parameter is not valid, defaulting to \"center\""), I(e, l.center)));
2484
+ }
2485
+ function Ue(e, t) {
2486
+ t && I(e, l[`grow-${t}`]);
2487
+ }
2488
+ var J = {
2489
+ innerParams: /* @__PURE__ */ new WeakMap(),
2490
+ domCache: /* @__PURE__ */ new WeakMap(),
2491
+ focusedElement: /* @__PURE__ */ new WeakMap()
2492
+ };
2493
+ let We = [
2494
+ "input",
2495
+ "file",
2496
+ "range",
2497
+ "select",
2498
+ "radio",
2499
+ "checkbox",
2500
+ "textarea"
2501
+ ], Ge = (e, t) => {
2502
+ let n = E();
2503
+ if (!n) return;
2504
+ let r = J.innerParams.get(e), i = !r || t.input !== r.input;
2505
+ We.forEach((e) => {
2506
+ let r = R(n, l[e]);
2507
+ r && (Je(e, t.inputAttributes), r.className = l[e], i && B(r));
2508
+ }), t.input && (i && Ke(t), Ye(t));
2509
+ }, Ke = (e) => {
2510
+ if (!e.input) return;
2511
+ if (!Y[e.input]) {
2512
+ m(`Unexpected type of input! Expected ${Object.keys(Y).join(" | ")}, got "${e.input}"`);
2513
+ return;
2514
+ }
2515
+ let t = Qe(e.input);
2516
+ if (!t) return;
2517
+ let n = Y[e.input](t, e);
2518
+ z(t), e.inputAutoFocus && setTimeout(() => {
2519
+ ge(n);
2520
+ });
2521
+ }, qe = (e) => {
2522
+ for (let { name: t } of Array.from(e.attributes)) [
2523
+ "id",
2524
+ "type",
2525
+ "value",
2526
+ "style"
2527
+ ].includes(t) || e.removeAttribute(t);
2528
+ }, Je = (e, t) => {
2529
+ let n = E();
2530
+ if (!n) return;
2531
+ let r = he(n, e);
2532
+ if (r) {
2533
+ qe(r);
2534
+ for (let e in t) r.setAttribute(e, t[e]);
2535
+ }
2536
+ }, Ye = (e) => {
2537
+ if (!e.input) return;
2538
+ let t = Qe(e.input);
2539
+ t && F(t, e, "input");
2540
+ }, Xe = (e, t) => {
2541
+ !e.placeholder && t.inputPlaceholder && (e.placeholder = t.inputPlaceholder);
2542
+ }, Ze = (e, t, n) => {
2543
+ if (n.inputLabel) {
2544
+ let r = document.createElement("label"), i = l["input-label"];
2545
+ r.setAttribute("for", e.id), r.className = i, typeof n.customClass == "object" && I(r, n.customClass.inputLabel), r.innerText = n.inputLabel, t.insertAdjacentElement("beforebegin", r);
2546
+ }
2547
+ }, Qe = (e) => {
2548
+ let t = E();
2549
+ if (t) return R(t, l[e] || l.input);
2550
+ }, $e = (e, t) => {
2551
+ ["string", "number"].includes(typeof t) ? e.value = `${t}` : x(t) || p(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof t}"`);
2552
+ }, Y = {};
2553
+ Y.text = Y.email = Y.password = Y.number = Y.tel = Y.url = Y.search = Y.date = Y["datetime-local"] = Y.time = Y.week = Y.month = (e, t) => {
2554
+ let n = e;
2555
+ return $e(n, t.inputValue), Ze(n, n, t), Xe(n, t), n.type = t.input, n;
2556
+ }, Y.file = (e, t) => {
2557
+ let n = e;
2558
+ return Ze(n, n, t), Xe(n, t), n;
2559
+ }, Y.range = (e, t) => {
2560
+ let n = e, r = n.querySelector("input"), i = n.querySelector("output");
2561
+ return r && ($e(r, t.inputValue), r.type = t.input, Ze(r, e, t)), i && $e(i, t.inputValue), e;
2562
+ }, Y.select = (e, t) => {
2563
+ let n = e;
2564
+ if (n.textContent = "", t.inputPlaceholder) {
2565
+ let e = document.createElement("option");
2566
+ N(e, t.inputPlaceholder), e.value = "", e.disabled = !0, e.selected = !0, n.appendChild(e);
2567
+ }
2568
+ return Ze(n, n, t), n;
2569
+ }, Y.radio = (e) => {
2570
+ let t = e;
2571
+ return t.textContent = "", e;
2572
+ }, Y.checkbox = (e, t) => {
2573
+ let n = E();
2574
+ if (!n) throw Error("Popup not found");
2575
+ let r = he(n, "checkbox");
2576
+ if (!r) throw Error("Checkbox input not found");
2577
+ r.value = "1", r.checked = !!t.inputValue;
2578
+ let i = e.querySelector("span");
2579
+ if (i) {
2580
+ let e = t.inputPlaceholder || t.inputLabel;
2581
+ e && N(i, e);
2582
+ }
2583
+ return r;
2584
+ }, Y.textarea = (e, t) => {
2585
+ let n = e;
2586
+ $e(n, t.inputValue), Xe(n, t), Ze(n, n, t);
2587
+ let r = (e) => parseInt(window.getComputedStyle(e).marginLeft) + parseInt(window.getComputedStyle(e).marginRight);
2588
+ return setTimeout(() => {
2589
+ if ("MutationObserver" in window) {
2590
+ let e = E();
2591
+ if (!e) return;
2592
+ let i = parseInt(window.getComputedStyle(e).width);
2593
+ new MutationObserver(() => {
2594
+ if (!document.body.contains(n)) return;
2595
+ let e = n.offsetWidth + r(n), a = E();
2596
+ a && (e > i ? a.style.width = `${e}px` : ve(a, "width", t.width));
2597
+ }).observe(n, {
2598
+ attributes: !0,
2599
+ attributeFilter: ["style"]
2600
+ });
2601
+ }
2602
+ }), n;
2603
+ };
2604
+ let et = (e, t) => {
2605
+ let n = te();
2606
+ n && (ye(n), F(n, t, "htmlContainer"), t.html ? (je(t.html, n), z(n, "block")) : t.text ? (n.textContent = t.text, z(n, "block")) : B(n), Ge(e, t));
2607
+ }, tt = (e, t) => {
2608
+ let n = se();
2609
+ n && (ye(n), be(n, !!t.footer, "block"), t.footer && je(t.footer, n), F(n, t, "footer"));
2610
+ }, nt = (e, t) => {
2611
+ let n = J.innerParams.get(e), r = D();
2612
+ if (r) {
2613
+ if (n && t.icon === n.icon) {
2614
+ ot(r, t), rt(r, t);
2615
+ return;
2616
+ }
2617
+ if (!t.icon && !t.iconHtml) {
2618
+ B(r);
2619
+ return;
2620
+ }
2621
+ if (t.icon && Object.keys(u).indexOf(t.icon) === -1) {
2622
+ m(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${t.icon}"`), B(r);
2623
+ return;
2624
+ }
2625
+ z(r), ot(r, t), rt(r, t), I(r, t.showClass && t.showClass.icon), window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", it);
2626
+ }
2627
+ }, rt = (e, t) => {
2628
+ for (let [n, r] of Object.entries(u)) t.icon !== n && L(e, r);
2629
+ I(e, t.icon && u[t.icon]), st(e, t), it(), F(e, t, "icon");
2630
+ }, it = () => {
2631
+ let e = E();
2632
+ if (!e) return;
2633
+ let t = window.getComputedStyle(e).getPropertyValue("background-color");
2634
+ e.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix").forEach((e) => {
2635
+ e.style.backgroundColor = t;
2636
+ });
2637
+ }, at = (e) => `
2638
+ ${e.animation ? "<div class=\"swal2-success-circular-line-left\"></div>" : ""}
2639
+ <span class="swal2-success-line-tip"></span> <span class="swal2-success-line-long"></span>
2640
+ <div class="swal2-success-ring"></div>
2641
+ ${e.animation ? "<div class=\"swal2-success-fix\"></div>" : ""}
2642
+ ${e.animation ? "<div class=\"swal2-success-circular-line-right\"></div>" : ""}
2643
+ `, ot = (e, t) => {
2644
+ if (!t.icon && !t.iconHtml) return;
2645
+ let n = e.innerHTML, r = "";
2646
+ t.iconHtml ? r = ct(t.iconHtml) : t.icon === "success" ? (r = at(t), n = n.replace(/ style=".*?"/g, "")) : t.icon === "error" ? r = "\n <span class=\"swal2-x-mark\">\n <span class=\"swal2-x-mark-line-left\"></span>\n <span class=\"swal2-x-mark-line-right\"></span>\n </span>\n" : t.icon && (r = ct({
2647
+ question: "?",
2648
+ warning: "!",
2649
+ info: "i"
2650
+ }[t.icon])), n.trim() !== r.trim() && N(e, r);
2651
+ }, st = (e, t) => {
2652
+ if (t.iconColor) {
2653
+ e.style.color = t.iconColor, e.style.borderColor = t.iconColor;
2654
+ for (let n of [
2655
+ ".swal2-success-line-tip",
2656
+ ".swal2-success-line-long",
2657
+ ".swal2-x-mark-line-left",
2658
+ ".swal2-x-mark-line-right"
2659
+ ]) V(e, n, "background-color", t.iconColor);
2660
+ V(e, ".swal2-success-ring", "border-color", t.iconColor);
2661
+ }
2662
+ }, ct = (e) => `<div class="${l["icon-content"]}">${e}</div>`, lt = (e, t) => {
2663
+ let n = k();
2664
+ if (n) {
2665
+ if (!t.imageUrl) {
2666
+ B(n);
2667
+ return;
2668
+ }
2669
+ z(n, ""), n.setAttribute("src", t.imageUrl), n.setAttribute("alt", t.imageAlt || ""), ve(n, "width", t.imageWidth), ve(n, "height", t.imageHeight), n.className = l.image, F(n, t, "image");
2670
+ }
2671
+ }, ut = !1, dt = 0, ft = 0, pt = 0, X = 0, mt = (e) => {
2672
+ e.addEventListener("mousedown", gt), document.body.addEventListener("mousemove", _t), e.addEventListener("mouseup", vt), e.addEventListener("touchstart", gt), document.body.addEventListener("touchmove", _t), e.addEventListener("touchend", vt);
2673
+ }, ht = (e) => {
2674
+ e.removeEventListener("mousedown", gt), document.body.removeEventListener("mousemove", _t), e.removeEventListener("mouseup", vt), e.removeEventListener("touchstart", gt), document.body.removeEventListener("touchmove", _t), e.removeEventListener("touchend", vt);
2675
+ }, gt = (e) => {
2676
+ let t = E();
2677
+ if (!t) return;
2678
+ let n = D();
2679
+ if (e.target === t || n && n.contains(e.target)) {
2680
+ ut = !0;
2681
+ let n = yt(e);
2682
+ dt = n.clientX, ft = n.clientY, pt = parseInt(t.style.insetInlineStart) || 0, X = parseInt(t.style.insetBlockStart) || 0, I(t, "swal2-dragging");
2683
+ }
2684
+ }, _t = (e) => {
2685
+ let t = E();
2686
+ if (t && ut) {
2687
+ let { clientX: n, clientY: r } = yt(e), i = n - dt;
2688
+ t.style.insetInlineStart = `${pt + (a.isRTL ? -i : i)}px`, t.style.insetBlockStart = `${X + (r - ft)}px`;
2689
+ }
2690
+ }, vt = () => {
2691
+ let e = E();
2692
+ ut = !1, L(e, "swal2-dragging");
2693
+ }, yt = (e) => {
2694
+ let t = e.type.startsWith("touch") ? e.touches[0] : e;
2695
+ return {
2696
+ clientX: t.clientX,
2697
+ clientY: t.clientY
2698
+ };
2699
+ }, bt = (e, t) => {
2700
+ let n = C(), r = E();
2701
+ if (!(!n || !r)) {
2702
+ if (t.toast) {
2703
+ ve(n, "width", t.width), r.style.width = "100%";
2704
+ let e = M();
2705
+ e && r.insertBefore(e, D());
2706
+ } else ve(r, "width", t.width);
2707
+ ve(r, "padding", t.padding), t.color && (r.style.color = t.color), t.background && (r.style.background = t.background), B(re()), xt(r, t), t.draggable && !t.toast ? (I(r, l.draggable), mt(r)) : (L(r, l.draggable), ht(r));
2708
+ }
2709
+ }, xt = (e, t) => {
2710
+ let n = t.showClass || {};
2711
+ e.className = `${l.popup} ${H(e) ? n.popup : ""}`, t.toast ? (I([document.documentElement, document.body], l["toast-shown"]), I(e, l.toast)) : I(e, l.modal), F(e, t, "popup"), typeof t.customClass == "string" && I(e, t.customClass), t.icon && I(e, l[`icon-${t.icon}`]);
2712
+ }, St = (e, t) => {
2713
+ let n = ne();
2714
+ if (!n) return;
2715
+ let { progressSteps: r, currentProgressStep: i } = t;
2716
+ if (!r || r.length === 0 || i === void 0) {
2717
+ B(n);
2718
+ return;
2719
+ }
2720
+ z(n), n.textContent = "", i >= r.length && p("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"), r.forEach((e, a) => {
2721
+ let o = Ct(e);
2722
+ if (n.appendChild(o), a === i && I(o, l["active-progress-step"]), a !== r.length - 1) {
2723
+ let e = wt(t);
2724
+ n.appendChild(e);
2725
+ }
2726
+ });
2727
+ }, Ct = (e) => {
2728
+ let t = document.createElement("li");
2729
+ return I(t, l["progress-step"]), N(t, e), t;
2730
+ }, wt = (e) => {
2731
+ let t = document.createElement("li");
2732
+ return I(t, l["progress-step-line"]), e.progressStepsDistance && ve(t, "width", e.progressStepsDistance), t;
2733
+ }, Tt = (e, t) => {
2734
+ let n = ee();
2735
+ n && (ye(n), be(n, !!(t.title || t.titleText), "block"), t.title && je(t.title, n), t.titleText && (n.innerText = t.titleText), F(n, t, "title"));
2736
+ }, Et = (e, t) => {
2737
+ var n;
2738
+ bt(e, t), Be(e, t), St(e, t), nt(e, t), lt(e, t), Tt(e, t), ze(e, t), et(e, t), Pe(e, t), tt(e, t);
2739
+ let r = E();
2740
+ typeof t.didRender == "function" && r && t.didRender(r), (n = a.eventEmitter) == null || n.emit("didRender", r);
2741
+ }, Dt = () => H(E()), Ot = () => A()?.click(), kt = () => j()?.click(), At = () => ie()?.click(), Z = Object.freeze({
2742
+ cancel: "cancel",
2743
+ backdrop: "backdrop",
2744
+ close: "close",
2745
+ esc: "esc",
2746
+ timer: "timer"
2747
+ }), jt = (e) => {
2748
+ if (e.keydownTarget && e.keydownHandlerAdded && e.keydownHandler) {
2749
+ let t = e.keydownHandler;
2750
+ e.keydownTarget.removeEventListener("keydown", t, { capture: e.keydownListenerCapture }), e.keydownHandlerAdded = !1;
2751
+ }
2752
+ }, Mt = (e, t, n) => {
2753
+ if (jt(e), !t.toast) {
2754
+ let r = (e) => It(t, e, n);
2755
+ e.keydownHandler = r;
2756
+ let i = t.keydownListenerCapture ? window : E();
2757
+ if (i) {
2758
+ e.keydownTarget = i, e.keydownListenerCapture = t.keydownListenerCapture;
2759
+ let n = r;
2760
+ e.keydownTarget.addEventListener("keydown", n, { capture: e.keydownListenerCapture }), e.keydownHandlerAdded = !0;
2761
+ }
2762
+ }
2763
+ }, Nt = (e, t) => {
2764
+ var n;
2765
+ let r = ue();
2766
+ return r.length ? (e += t, e === -2 && (e = r.length - 1), e === r.length ? e = 0 : e === -1 && (e = r.length - 1), r[e].focus(), !(S() && r[e] instanceof HTMLIFrameElement)) : ((n = E()) == null || n.focus(), !0);
2767
+ }, Pt = ["ArrowRight", "ArrowDown"], Ft = ["ArrowLeft", "ArrowUp"], It = (e, t, n) => {
2768
+ e && (t.isComposing || t.keyCode === 229 || (e.stopKeydownPropagation && t.stopPropagation(), t.key === "Enter" ? Lt(t, e) : t.key === "Tab" ? Rt(t) : [...Pt, ...Ft].includes(t.key) ? zt(t.key) : t.key === "Escape" && Bt(t, e, n)));
2769
+ }, Lt = (e, t) => {
2770
+ if (!v(t.allowEnterKey)) return;
2771
+ let n = E();
2772
+ if (!n || !t.input) return;
2773
+ let r = he(n, t.input);
2774
+ if (e.target && r && e.target instanceof HTMLElement && e.target.outerHTML === r.outerHTML) {
2775
+ if (["textarea", "file"].includes(t.input)) return;
2776
+ Ot(), e.preventDefault();
2777
+ }
2778
+ }, Rt = (e) => {
2779
+ let t = e.target, n = ue().findIndex((e) => e === t), r = !0;
2780
+ r = e.shiftKey ? Nt(n, -1) : Nt(n, 1), e.stopPropagation(), r && e.preventDefault();
2781
+ }, zt = (e) => {
2782
+ let t = oe(), n = A(), r = j(), i = ie();
2783
+ if (!t || !n || !r || !i) return;
2784
+ let a = [
2785
+ n,
2786
+ r,
2787
+ i
2788
+ ];
2789
+ if (document.activeElement instanceof HTMLElement && !a.includes(document.activeElement)) return;
2790
+ let o = Pt.includes(e) ? "nextElementSibling" : "previousElementSibling", s = document.activeElement;
2791
+ if (s) {
2792
+ for (let e = 0; e < t.children.length; e++) {
2793
+ if (s = s[o], !s) return;
2794
+ if (s instanceof HTMLButtonElement && H(s)) break;
2795
+ }
2796
+ s instanceof HTMLButtonElement && s.focus();
2797
+ }
2798
+ }, Bt = (e, t, n) => {
2799
+ e.preventDefault(), v(t.allowEscapeKey) && n(Z.esc);
2800
+ };
2801
+ var Vt = {
2802
+ swalPromiseResolve: /* @__PURE__ */ new WeakMap(),
2803
+ swalPromiseReject: /* @__PURE__ */ new WeakMap()
2804
+ };
2805
+ let Ht = () => {
2806
+ let e = C();
2807
+ Array.from(document.body.children).forEach((t) => {
2808
+ t.contains(e) || (t.hasAttribute("aria-hidden") && t.setAttribute("data-previous-aria-hidden", t.getAttribute("aria-hidden") || ""), t.setAttribute("aria-hidden", "true"));
2809
+ });
2810
+ }, Ut = () => {
2811
+ Array.from(document.body.children).forEach((e) => {
2812
+ e.hasAttribute("data-previous-aria-hidden") ? (e.setAttribute("aria-hidden", e.getAttribute("data-previous-aria-hidden") || ""), e.removeAttribute("data-previous-aria-hidden")) : e.removeAttribute("aria-hidden");
2813
+ });
2814
+ }, Wt = typeof window < "u" && !!window.GestureEvent, Gt = Wt && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Kt = () => {
2815
+ if (Wt && !P(document.body, l.iosfix)) {
2816
+ let e = document.body.scrollTop;
2817
+ document.body.style.top = `${e * -1}px`, I(document.body, l.iosfix), qt();
2818
+ }
2819
+ }, qt = () => {
2820
+ let e = C();
2821
+ if (!e) return;
2822
+ let t;
2823
+ e.ontouchstart = (e) => {
2824
+ t = Jt(e);
2825
+ }, e.ontouchmove = (e) => {
2826
+ t && (e.preventDefault(), e.stopPropagation());
2827
+ };
2828
+ }, Jt = (e) => {
2829
+ let t = e.target, n = C(), r = te();
2830
+ return !n || !r || Yt(e) || Xt(e) ? !1 : t === n || !Se(n) && t instanceof HTMLElement && !U(t, r) && t.tagName !== "INPUT" && t.tagName !== "TEXTAREA" && !(Se(r) && r.contains(t));
2831
+ }, Yt = (e) => !!(e.touches && e.touches.length && e.touches[0].touchType === "stylus"), Xt = (e) => e.touches && e.touches.length > 1, Zt = () => {
2832
+ if (P(document.body, l.iosfix)) {
2833
+ let e = parseInt(document.body.style.top, 10);
2834
+ L(document.body, l.iosfix), document.body.style.top = "", document.body.scrollTop = e * -1;
2835
+ }
2836
+ }, Qt = () => {
2837
+ let e = document.createElement("div");
2838
+ e.className = l["scrollbar-measure"], document.body.appendChild(e);
2839
+ let t = e.getBoundingClientRect().width - e.clientWidth;
2840
+ return document.body.removeChild(e), t;
2841
+ }, $t = null, en = (e) => {
2842
+ $t === null && (document.body.scrollHeight > window.innerHeight || e === "scroll") && ($t = parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")), document.body.style.paddingRight = `${$t + Qt()}px`);
2843
+ }, tn = () => {
2844
+ $t !== null && (document.body.style.paddingRight = `${$t}px`, $t = null);
2845
+ };
2846
+ function nn(e, t, n, r) {
2847
+ fe() ? fn(e, r) : (s(n).then(() => fn(e, r)), jt(a)), Wt ? (t.setAttribute("style", "display:none !important"), t.removeAttribute("class"), t.innerHTML = "") : t.remove(), de() && (tn(), Zt(), Ut()), rn();
2848
+ }
2849
+ function rn() {
2850
+ L([document.documentElement, document.body], [
2851
+ l.shown,
2852
+ l["height-auto"],
2853
+ l["no-backdrop"],
2854
+ l["toast-shown"]
2855
+ ]);
2856
+ }
2857
+ function an(e) {
2858
+ e = ln(e);
2859
+ let t = Vt.swalPromiseResolve.get(this), n = on(this);
2860
+ this.isAwaitingPromise ? e.isDismissed || (cn(this), t(e)) : n && t(e);
2861
+ }
2862
+ let on = (e) => {
2863
+ let t = E();
2864
+ if (!t) return !1;
2865
+ let n = J.innerParams.get(e);
2866
+ if (!n || P(t, n.hideClass.popup)) return !1;
2867
+ L(t, n.showClass.popup), I(t, n.hideClass.popup);
2868
+ let r = C();
2869
+ return L(r, n.showClass.backdrop), I(r, n.hideClass.backdrop), un(e, t, n), !0;
2870
+ };
2871
+ function sn(e) {
2872
+ let t = Vt.swalPromiseReject.get(this);
2873
+ cn(this), t && t(e);
2874
+ }
2875
+ let cn = (e) => {
2876
+ e.isAwaitingPromise && (delete e.isAwaitingPromise, J.innerParams.get(e) || e._destroy());
2877
+ }, ln = (e) => e === void 0 ? {
2878
+ isConfirmed: !1,
2879
+ isDenied: !1,
2880
+ isDismissed: !0
2881
+ } : Object.assign({
2882
+ isConfirmed: !1,
2883
+ isDenied: !1,
2884
+ isDismissed: !1
2885
+ }, e), un = (e, t, n) => {
2886
+ var r;
2887
+ let i = C(), o = Ce(t);
2888
+ typeof n.willClose == "function" && n.willClose(t), (r = a.eventEmitter) == null || r.emit("willClose", t), o && i ? dn(e, t, i, !!n.returnFocus, n.didClose) : i && nn(e, i, !!n.returnFocus, n.didClose);
2889
+ }, dn = (e, t, n, r, i) => {
2890
+ a.swalCloseEventFinishedCallback = nn.bind(null, e, n, r, i);
2891
+ let o = function(e) {
2892
+ if (e.target === t) {
2893
+ var n;
2894
+ (n = a.swalCloseEventFinishedCallback) == null || n.call(a), delete a.swalCloseEventFinishedCallback, t.removeEventListener("animationend", o), t.removeEventListener("transitionend", o);
2895
+ }
2896
+ };
2897
+ t.addEventListener("animationend", o), t.addEventListener("transitionend", o);
2898
+ }, fn = (e, t) => {
2899
+ setTimeout(() => {
2900
+ var n;
2901
+ typeof t == "function" && t.bind(e.params)(), (n = a.eventEmitter) == null || n.emit("didClose"), e._destroy && e._destroy();
2902
+ });
2903
+ }, pn = (e) => {
2904
+ let t = E();
2905
+ if (t || new li(), t = E(), !t) return;
2906
+ let n = M();
2907
+ fe() ? B(D()) : mn(t, e), z(n), t.setAttribute("data-loading", "true"), t.setAttribute("aria-busy", "true"), t.focus();
2908
+ }, mn = (e, t) => {
2909
+ let n = oe(), r = M();
2910
+ !n || !r || (!t && H(A()) && (t = A()), z(n), t && (B(t), r.setAttribute("data-button-to-replace", t.className), n.insertBefore(r, t)), I([e, n], l.loading));
2911
+ }, hn = (e, t) => {
2912
+ t.input === "select" || t.input === "radio" ? bn(e, t) : [
2913
+ "text",
2914
+ "email",
2915
+ "number",
2916
+ "tel",
2917
+ "textarea"
2918
+ ].some((e) => e === t.input) && (y(t.inputValue) || x(t.inputValue)) && (pn(A()), xn(e, t));
2919
+ }, gn = (e, t) => {
2920
+ let n = e.getInput();
2921
+ if (!n) return null;
2922
+ switch (t.input) {
2923
+ case "checkbox": return _n(n);
2924
+ case "radio": return vn(n);
2925
+ case "file": return yn(n);
2926
+ default: return t.inputAutoTrim ? n.value.trim() : n.value;
2927
+ }
2928
+ }, _n = (e) => +!!e.checked, vn = (e) => e.checked ? e.value : null, yn = (e) => e.files && e.files.length ? e.getAttribute("multiple") === null ? e.files[0] : e.files : null, bn = (e, t) => {
2929
+ let n = E();
2930
+ if (!n) return;
2931
+ let r = (e) => {
2932
+ t.input === "select" ? Sn(n, wn(e), t) : t.input === "radio" && Cn(n, wn(e), t);
2933
+ };
2934
+ y(t.inputOptions) || x(t.inputOptions) ? (pn(A()), b(t.inputOptions).then((t) => {
2935
+ e.hideLoading(), r(t);
2936
+ })) : typeof t.inputOptions == "object" ? r(t.inputOptions) : m(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof t.inputOptions}`);
2937
+ }, xn = (e, t) => {
2938
+ let n = e.getInput();
2939
+ n && (B(n), b(t.inputValue).then((r) => {
2940
+ n.value = t.input === "number" ? `${parseFloat(r) || 0}` : `${r}`, z(n), n.focus(), e.hideLoading();
2941
+ }).catch((t) => {
2942
+ m(`Error in inputValue promise: ${t}`), n.value = "", z(n), n.focus(), e.hideLoading();
2943
+ }));
2944
+ };
2945
+ function Sn(e, t, n) {
2946
+ let r = R(e, l.select);
2947
+ if (!r) return;
2948
+ let i = (e, t, r) => {
2949
+ let i = document.createElement("option");
2950
+ i.value = r, N(i, t), i.selected = Tn(r, n.inputValue), e.appendChild(i);
2951
+ };
2952
+ t.forEach((e) => {
2953
+ let t = e[0], n = e[1];
2954
+ if (Array.isArray(n)) {
2955
+ let e = document.createElement("optgroup");
2956
+ e.label = t, e.disabled = !1, r.appendChild(e), n.forEach((t) => i(e, t[1], t[0]));
2957
+ } else i(r, n, t);
2958
+ }), r.focus();
2959
+ }
2960
+ function Cn(e, t, n) {
2961
+ let r = R(e, l.radio);
2962
+ if (!r) return;
2963
+ t.forEach((e) => {
2964
+ let t = e[0], i = e[1], a = document.createElement("input"), o = document.createElement("label");
2965
+ a.type = "radio", a.name = l.radio, a.value = t, Tn(t, n.inputValue) && (a.checked = !0);
2966
+ let s = document.createElement("span");
2967
+ N(s, i), s.className = l.label, o.appendChild(a), o.appendChild(s), r.appendChild(o);
2968
+ });
2969
+ let i = r.querySelectorAll("input");
2970
+ i.length && i[0].focus();
2971
+ }
2972
+ let wn = (e) => (e instanceof Map ? Array.from(e) : Object.entries(e)).map(([e, t]) => [e, typeof t == "object" ? wn(t) : t]), Tn = (e, t) => !!t && t != null && t.toString() === e.toString(), En = (e) => {
2973
+ let t = J.innerParams.get(e);
2974
+ e.disableButtons(), t.input ? kn(e, "confirm") : Pn(e, !0);
2975
+ }, Dn = (e) => {
2976
+ let t = J.innerParams.get(e);
2977
+ e.disableButtons(), t.returnInputValueOnDeny ? kn(e, "deny") : jn(e, !1);
2978
+ }, On = (e, t) => {
2979
+ e.disableButtons(), t(Z.cancel);
2980
+ }, kn = (e, t) => {
2981
+ let n = J.innerParams.get(e);
2982
+ if (!n.input) {
2983
+ m(`The "input" parameter is needed to be set when using returnInputValueOn${f(t)}`);
2984
+ return;
2985
+ }
2986
+ let r = e.getInput(), i = gn(e, n);
2987
+ n.inputValidator ? An(e, i, t) : r && !r.checkValidity() ? (e.enableButtons(), e.showValidationMessage(n.validationMessage || r.validationMessage)) : t === "deny" ? jn(e, i) : Pn(e, i);
2988
+ }, An = (e, t, n) => {
2989
+ let r = J.innerParams.get(e);
2990
+ e.disableInput(), Promise.resolve().then(() => b(r.inputValidator(t, r.validationMessage))).then((r) => {
2991
+ e.enableButtons(), e.enableInput(), r ? e.showValidationMessage(r) : n === "deny" ? jn(e, t) : Pn(e, t);
2992
+ });
2993
+ }, jn = (e, t) => {
2994
+ let n = J.innerParams.get(e);
2995
+ n.showLoaderOnDeny && pn(j()), n.preDeny ? (e.isAwaitingPromise = !0, Promise.resolve().then(() => b(n.preDeny(t, n.validationMessage))).then((n) => {
2996
+ n === !1 ? (e.hideLoading(), cn(e)) : e.close({
2997
+ isDenied: !0,
2998
+ value: n === void 0 ? t : n
2999
+ });
3000
+ }).catch((t) => Nn(e, t))) : e.close({
3001
+ isDenied: !0,
3002
+ value: t
3003
+ });
3004
+ }, Mn = (e, t) => {
3005
+ e.close({
3006
+ isConfirmed: !0,
3007
+ value: t
3008
+ });
3009
+ }, Nn = (e, t) => {
3010
+ e.rejectPromise(t);
3011
+ }, Pn = (e, t) => {
3012
+ let n = J.innerParams.get(e);
3013
+ n.showLoaderOnConfirm && pn(), n.preConfirm ? (e.resetValidationMessage(), e.isAwaitingPromise = !0, Promise.resolve().then(() => b(n.preConfirm(t, n.validationMessage))).then((n) => {
3014
+ H(re()) || n === !1 ? (e.hideLoading(), cn(e)) : Mn(e, n === void 0 ? t : n);
3015
+ }).catch((t) => Nn(e, t))) : Mn(e, t);
3016
+ };
3017
+ function Fn() {
3018
+ let e = J.innerParams.get(this);
3019
+ if (!e) return;
3020
+ let t = J.domCache.get(this);
3021
+ B(t.loader), fe() ? e.icon && z(D()) : In(t), L([t.popup, t.actions], l.loading), t.popup.removeAttribute("aria-busy"), t.popup.removeAttribute("data-loading"), this.enableButtons();
3022
+ }
3023
+ let In = (e) => {
3024
+ let t = e.loader.getAttribute("data-button-to-replace"), n = t ? e.popup.getElementsByClassName(t) : [];
3025
+ n.length ? z(n[0], "inline-block") : xe() && B(e.actions);
3026
+ };
3027
+ function Ln() {
3028
+ let e = J.innerParams.get(this), t = J.domCache.get(this);
3029
+ return t ? he(t.popup, e.input) : null;
3030
+ }
3031
+ function Rn(e, t, n) {
3032
+ let r = J.domCache.get(e);
3033
+ t.forEach((e) => {
3034
+ r[e].disabled = n;
3035
+ });
3036
+ }
3037
+ function zn(e, t) {
3038
+ let n = E();
3039
+ !n || !e || (e.type === "radio" ? n.querySelectorAll(`[name="${l.radio}"]`).forEach((e) => {
3040
+ e.disabled = t;
3041
+ }) : e.disabled = t);
3042
+ }
3043
+ function Bn() {
3044
+ Rn(this, [
3045
+ "confirmButton",
3046
+ "denyButton",
3047
+ "cancelButton"
3048
+ ], !1);
3049
+ let e = J.focusedElement.get(this);
3050
+ e instanceof HTMLElement && document.activeElement === document.body && e.focus(), J.focusedElement.delete(this);
3051
+ }
3052
+ function Vn() {
3053
+ J.focusedElement.set(this, document.activeElement), Rn(this, [
3054
+ "confirmButton",
3055
+ "denyButton",
3056
+ "cancelButton"
3057
+ ], !0);
3058
+ }
3059
+ function Hn() {
3060
+ zn(this.getInput(), !1);
3061
+ }
3062
+ function Un() {
3063
+ zn(this.getInput(), !0);
3064
+ }
3065
+ function Wn(e) {
3066
+ let t = J.domCache.get(this), n = J.innerParams.get(this);
3067
+ N(t.validationMessage, e), t.validationMessage.className = l["validation-message"], n.customClass && n.customClass.validationMessage && I(t.validationMessage, n.customClass.validationMessage), z(t.validationMessage);
3068
+ let r = this.getInput();
3069
+ r && (r.setAttribute("aria-invalid", "true"), r.setAttribute("aria-describedby", l["validation-message"]), ge(r), I(r, l.inputerror));
3070
+ }
3071
+ function Gn() {
3072
+ let e = J.domCache.get(this);
3073
+ e.validationMessage && B(e.validationMessage);
3074
+ let t = this.getInput();
3075
+ t && (t.removeAttribute("aria-invalid"), t.removeAttribute("aria-describedby"), L(t, l.inputerror));
3076
+ }
3077
+ let Kn = {
3078
+ title: "",
3079
+ titleText: "",
3080
+ text: "",
3081
+ html: "",
3082
+ footer: "",
3083
+ icon: void 0,
3084
+ iconColor: void 0,
3085
+ iconHtml: void 0,
3086
+ template: void 0,
3087
+ toast: !1,
3088
+ draggable: !1,
3089
+ animation: !0,
3090
+ theme: "light",
3091
+ showClass: {
3092
+ popup: "swal2-show",
3093
+ backdrop: "swal2-backdrop-show",
3094
+ icon: "swal2-icon-show"
3095
+ },
3096
+ hideClass: {
3097
+ popup: "swal2-hide",
3098
+ backdrop: "swal2-backdrop-hide",
3099
+ icon: "swal2-icon-hide"
3100
+ },
3101
+ customClass: {},
3102
+ target: "body",
3103
+ color: void 0,
3104
+ backdrop: !0,
3105
+ heightAuto: !0,
3106
+ allowOutsideClick: !0,
3107
+ allowEscapeKey: !0,
3108
+ allowEnterKey: !0,
3109
+ stopKeydownPropagation: !0,
3110
+ keydownListenerCapture: !1,
3111
+ showConfirmButton: !0,
3112
+ showDenyButton: !1,
3113
+ showCancelButton: !1,
3114
+ preConfirm: void 0,
3115
+ preDeny: void 0,
3116
+ confirmButtonText: "OK",
3117
+ confirmButtonAriaLabel: "",
3118
+ confirmButtonColor: void 0,
3119
+ denyButtonText: "No",
3120
+ denyButtonAriaLabel: "",
3121
+ denyButtonColor: void 0,
3122
+ cancelButtonText: "Cancel",
3123
+ cancelButtonAriaLabel: "",
3124
+ cancelButtonColor: void 0,
3125
+ buttonsStyling: !0,
3126
+ reverseButtons: !1,
3127
+ focusConfirm: !0,
3128
+ focusDeny: !1,
3129
+ focusCancel: !1,
3130
+ returnFocus: !0,
3131
+ showCloseButton: !1,
3132
+ closeButtonHtml: "&times;",
3133
+ closeButtonAriaLabel: "Close this dialog",
3134
+ loaderHtml: "",
3135
+ showLoaderOnConfirm: !1,
3136
+ showLoaderOnDeny: !1,
3137
+ imageUrl: void 0,
3138
+ imageWidth: void 0,
3139
+ imageHeight: void 0,
3140
+ imageAlt: "",
3141
+ timer: void 0,
3142
+ timerProgressBar: !1,
3143
+ width: void 0,
3144
+ padding: void 0,
3145
+ background: void 0,
3146
+ input: void 0,
3147
+ inputPlaceholder: "",
3148
+ inputLabel: "",
3149
+ inputValue: "",
3150
+ inputOptions: {},
3151
+ inputAutoFocus: !0,
3152
+ inputAutoTrim: !0,
3153
+ inputAttributes: {},
3154
+ inputValidator: void 0,
3155
+ returnInputValueOnDeny: !1,
3156
+ validationMessage: void 0,
3157
+ grow: !1,
3158
+ position: "center",
3159
+ progressSteps: [],
3160
+ currentProgressStep: void 0,
3161
+ progressStepsDistance: void 0,
3162
+ willOpen: void 0,
3163
+ didOpen: void 0,
3164
+ didRender: void 0,
3165
+ willClose: void 0,
3166
+ didClose: void 0,
3167
+ didDestroy: void 0,
3168
+ scrollbarPadding: !0,
3169
+ topLayer: !1
3170
+ }, qn = /* @__PURE__ */ "allowEscapeKey.allowOutsideClick.background.buttonsStyling.cancelButtonAriaLabel.cancelButtonColor.cancelButtonText.closeButtonAriaLabel.closeButtonHtml.color.confirmButtonAriaLabel.confirmButtonColor.confirmButtonText.currentProgressStep.customClass.denyButtonAriaLabel.denyButtonColor.denyButtonText.didClose.didDestroy.draggable.footer.hideClass.html.icon.iconColor.iconHtml.imageAlt.imageHeight.imageUrl.imageWidth.preConfirm.preDeny.progressSteps.returnFocus.reverseButtons.showCancelButton.showCloseButton.showConfirmButton.showDenyButton.text.title.titleText.theme.willClose".split("."), Jn = { allowEnterKey: void 0 }, Yn = [
3171
+ "allowOutsideClick",
3172
+ "allowEnterKey",
3173
+ "backdrop",
3174
+ "draggable",
3175
+ "focusConfirm",
3176
+ "focusDeny",
3177
+ "focusCancel",
3178
+ "returnFocus",
3179
+ "heightAuto",
3180
+ "keydownListenerCapture"
3181
+ ], Xn = (e) => Object.prototype.hasOwnProperty.call(Kn, e), Zn = (e) => qn.indexOf(e) !== -1, Qn = (e) => Jn[e], $n = (e) => {
3182
+ Xn(e) || p(`Unknown parameter "${e}"`);
3183
+ }, er = (e) => {
3184
+ Yn.includes(e) && p(`The parameter "${e}" is incompatible with toasts`);
3185
+ }, tr = (e) => {
3186
+ let t = Qn(e);
3187
+ t && _(e, t);
3188
+ }, nr = (e) => {
3189
+ e.backdrop === !1 && e.allowOutsideClick && p("\"allowOutsideClick\" parameter requires `backdrop` parameter to be set to `true`"), e.theme && ![
3190
+ "light",
3191
+ "dark",
3192
+ "auto",
3193
+ "minimal",
3194
+ "borderless",
3195
+ "bootstrap-4",
3196
+ "bootstrap-4-light",
3197
+ "bootstrap-4-dark",
3198
+ "bootstrap-5",
3199
+ "bootstrap-5-light",
3200
+ "bootstrap-5-dark",
3201
+ "material-ui",
3202
+ "material-ui-light",
3203
+ "material-ui-dark",
3204
+ "embed-iframe",
3205
+ "bulma",
3206
+ "bulma-light",
3207
+ "bulma-dark"
3208
+ ].includes(e.theme) && p(`Invalid theme "${e.theme}"`);
3209
+ for (let t in e) $n(t), e.toast && er(t), tr(t);
3210
+ };
3211
+ function rr(e) {
3212
+ let t = C(), n = E(), r = J.innerParams.get(this);
3213
+ if (!n || P(n, r.hideClass.popup)) {
3214
+ p("You're trying to update the closed or closing popup, that won't work. Use the update() method in preConfirm parameter or show a new popup.");
3215
+ return;
3216
+ }
3217
+ let i = ir(e), a = Object.assign({}, r, i);
3218
+ nr(a), t && (t.dataset.swal2Theme = a.theme), Et(this, a), J.innerParams.set(this, a), Object.defineProperties(this, { params: {
3219
+ value: Object.assign({}, this.params, e),
3220
+ writable: !1,
3221
+ enumerable: !0
3222
+ } });
3223
+ }
3224
+ let ir = (e) => {
3225
+ let t = {};
3226
+ return Object.keys(e).forEach((n) => {
3227
+ Zn(n) ? t[n] = e[n] : p(`Invalid parameter to update: ${n}`);
3228
+ }), t;
3229
+ };
3230
+ function ar() {
3231
+ var e;
3232
+ let t = J.domCache.get(this), n = J.innerParams.get(this);
3233
+ if (!n) {
3234
+ sr(this);
3235
+ return;
3236
+ }
3237
+ t.popup && a.swalCloseEventFinishedCallback && (a.swalCloseEventFinishedCallback(), delete a.swalCloseEventFinishedCallback), typeof n.didDestroy == "function" && n.didDestroy(), (e = a.eventEmitter) == null || e.emit("didDestroy"), or(this);
3238
+ }
3239
+ let or = (e) => {
3240
+ sr(e), delete e.params, delete a.keydownHandler, delete a.keydownTarget, delete a.currentInstance;
3241
+ }, sr = (e) => {
3242
+ e.isAwaitingPromise ? (cr(J, e), e.isAwaitingPromise = !0) : (cr(Vt, e), cr(J, e), delete e.isAwaitingPromise, delete e.disableButtons, delete e.enableButtons, delete e.getInput, delete e.disableInput, delete e.enableInput, delete e.hideLoading, delete e.disableLoading, delete e.showValidationMessage, delete e.resetValidationMessage, delete e.close, delete e.closePopup, delete e.closeModal, delete e.closeToast, delete e.rejectPromise, delete e.update, delete e._destroy);
3243
+ }, cr = (e, t) => {
3244
+ for (let n in e) e[n].delete(t);
3245
+ };
3246
+ var lr = /*#__PURE__*/ Object.freeze({
3247
+ __proto__: null,
3248
+ _destroy: ar,
3249
+ close: an,
3250
+ closeModal: an,
3251
+ closePopup: an,
3252
+ closeToast: an,
3253
+ disableButtons: Vn,
3254
+ disableInput: Un,
3255
+ disableLoading: Fn,
3256
+ enableButtons: Bn,
3257
+ enableInput: Hn,
3258
+ getInput: Ln,
3259
+ handleAwaitingPromise: cn,
3260
+ hideLoading: Fn,
3261
+ rejectPromise: sn,
3262
+ resetValidationMessage: Gn,
3263
+ showValidationMessage: Wn,
3264
+ update: rr
3265
+ });
3266
+ let ur = (e, t, n) => {
3267
+ e.toast ? dr(e, t, n) : (mr(t), hr(t), gr(e, t, n));
3268
+ }, dr = (e, t, n) => {
3269
+ t.popup.onclick = () => {
3270
+ e && (fr(e) || e.timer || e.input) || n(Z.close);
3271
+ };
3272
+ }, fr = (e) => !!(e.showConfirmButton || e.showDenyButton || e.showCancelButton || e.showCloseButton), pr = !1, mr = (e) => {
3273
+ e.popup.onmousedown = () => {
3274
+ e.container.onmouseup = function(t) {
3275
+ e.container.onmouseup = () => {}, t.target === e.container && (pr = !0);
3276
+ };
3277
+ };
3278
+ }, hr = (e) => {
3279
+ e.container.onmousedown = (t) => {
3280
+ t.target === e.container && t.preventDefault(), e.popup.onmouseup = function(t) {
3281
+ e.popup.onmouseup = () => {}, (t.target === e.popup || t.target instanceof HTMLElement && e.popup.contains(t.target)) && (pr = !0);
3282
+ };
3283
+ };
3284
+ }, gr = (e, t, n) => {
3285
+ t.container.onclick = (r) => {
3286
+ if (pr) {
3287
+ pr = !1;
3288
+ return;
3289
+ }
3290
+ r.target === t.container && v(e.allowOutsideClick) && n(Z.backdrop);
3291
+ };
3292
+ }, _r = (e) => typeof e == "object" && !!e && "jquery" in e, vr = (e) => e instanceof Element || _r(e), yr = (e) => {
3293
+ let t = {};
3294
+ return typeof e[0] == "object" && !vr(e[0]) ? Object.assign(t, e[0]) : [
3295
+ "title",
3296
+ "html",
3297
+ "icon"
3298
+ ].forEach((n, r) => {
3299
+ let i = e[r];
3300
+ typeof i == "string" || vr(i) ? t[n] = i : i !== void 0 && m(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof i}`);
3301
+ }), t;
3302
+ };
3303
+ function br(...e) {
3304
+ return new this(...e);
3305
+ }
3306
+ function xr(e) {
3307
+ class t extends this {
3308
+ _main(t, n) {
3309
+ return super._main(t, Object.assign({}, e, n));
3310
+ }
3311
+ }
3312
+ return t;
3313
+ }
3314
+ let Sr = () => a.timeout && a.timeout.getTimerLeft(), Cr = () => {
3315
+ if (a.timeout) return Te(), a.timeout.stop();
3316
+ }, wr = () => {
3317
+ if (a.timeout) {
3318
+ let e = a.timeout.start();
3319
+ return we(e), e;
3320
+ }
3321
+ }, Tr = () => {
3322
+ let e = a.timeout;
3323
+ return e && (e.running ? Cr() : wr());
3324
+ }, Er = (e) => {
3325
+ if (a.timeout) {
3326
+ let t = a.timeout.increase(e);
3327
+ return we(t, !0), t;
3328
+ }
3329
+ }, Dr = () => !!(a.timeout && a.timeout.isRunning()), Or = !1, kr = {};
3330
+ function Ar(e = "data-swal-template") {
3331
+ kr[e] = this, Or ||= (document.body.addEventListener("click", jr), !0);
3332
+ }
3333
+ let jr = (e) => {
3334
+ for (let t = e.target; t && t !== document; t = t.parentNode) for (let e in kr) {
3335
+ let n = t.getAttribute && t.getAttribute(e);
3336
+ if (n) {
3337
+ kr[e].fire({ template: n });
3338
+ return;
3339
+ }
3340
+ }
3341
+ };
3342
+ class Mr {
3343
+ constructor() {
3344
+ this.events = {};
3345
+ }
3346
+ _getHandlersByEventName(e) {
3347
+ return this.events[e] === void 0 && (this.events[e] = []), this.events[e];
3348
+ }
3349
+ on(e, t) {
3350
+ let n = this._getHandlersByEventName(e);
3351
+ n.includes(t) || n.push(t);
3352
+ }
3353
+ once(e, t) {
3354
+ let n = (...r) => {
3355
+ this.removeListener(e, n), t.apply(this, r);
3356
+ };
3357
+ this.on(e, n);
3358
+ }
3359
+ emit(e, ...t) {
3360
+ this._getHandlersByEventName(e).forEach((e) => {
3361
+ try {
3362
+ e.apply(this, t);
3363
+ } catch (e) {
3364
+ console.error(e);
3365
+ }
3366
+ });
3367
+ }
3368
+ removeListener(e, t) {
3369
+ let n = this._getHandlersByEventName(e), r = n.indexOf(t);
3370
+ r > -1 && n.splice(r, 1);
3371
+ }
3372
+ removeAllListeners(e) {
3373
+ this.events[e] !== void 0 && (this.events[e].length = 0);
3374
+ }
3375
+ reset() {
3376
+ this.events = {};
3377
+ }
3378
+ }
3379
+ a.eventEmitter = new Mr();
3380
+ var Nr = /*#__PURE__*/ Object.freeze({
3381
+ __proto__: null,
3382
+ argsToParams: yr,
3383
+ bindClickHandler: Ar,
3384
+ clickCancel: At,
3385
+ clickConfirm: Ot,
3386
+ clickDeny: kt,
3387
+ enableLoading: pn,
3388
+ fire: br,
3389
+ getActions: oe,
3390
+ getCancelButton: ie,
3391
+ getCloseButton: le,
3392
+ getConfirmButton: A,
3393
+ getContainer: C,
3394
+ getDenyButton: j,
3395
+ getFocusableElements: ue,
3396
+ getFooter: se,
3397
+ getHtmlContainer: te,
3398
+ getIcon: D,
3399
+ getIconContent: O,
3400
+ getImage: k,
3401
+ getInputLabel: ae,
3402
+ getLoader: M,
3403
+ getPopup: E,
3404
+ getProgressSteps: ne,
3405
+ getTimerLeft: Sr,
3406
+ getTimerProgressBar: ce,
3407
+ getTitle: ee,
3408
+ getValidationMessage: re,
3409
+ increaseTimer: Er,
3410
+ isDeprecatedParameter: Qn,
3411
+ isLoading: pe,
3412
+ isTimerRunning: Dr,
3413
+ isUpdatableParameter: Zn,
3414
+ isValidParameter: Xn,
3415
+ isVisible: Dt,
3416
+ mixin: xr,
3417
+ off: (e, t) => {
3418
+ if (a.eventEmitter) {
3419
+ if (!e) {
3420
+ a.eventEmitter.reset();
3421
+ return;
3422
+ }
3423
+ t ? a.eventEmitter.removeListener(e, t) : a.eventEmitter.removeAllListeners(e);
3424
+ }
3425
+ },
3426
+ on: (e, t) => {
3427
+ a.eventEmitter && a.eventEmitter.on(e, t);
3428
+ },
3429
+ once: (e, t) => {
3430
+ a.eventEmitter && a.eventEmitter.once(e, t);
3431
+ },
3432
+ resumeTimer: wr,
3433
+ showLoading: pn,
3434
+ stopTimer: Cr,
3435
+ toggleTimer: Tr
3436
+ });
3437
+ class Pr {
3438
+ constructor(e, t) {
3439
+ this.callback = e, this.remaining = t, this.running = !1, this.start();
3440
+ }
3441
+ start() {
3442
+ return this.running || (this.running = !0, this.started = /* @__PURE__ */ new Date(), this.id = setTimeout(this.callback, this.remaining)), this.remaining;
3443
+ }
3444
+ stop() {
3445
+ return this.started && this.running && (this.running = !1, clearTimeout(this.id), this.remaining -= (/* @__PURE__ */ new Date()).getTime() - this.started.getTime()), this.remaining;
3446
+ }
3447
+ increase(e) {
3448
+ let t = this.running;
3449
+ return t && this.stop(), this.remaining += e, t && this.start(), this.remaining;
3450
+ }
3451
+ getTimerLeft() {
3452
+ return this.running && (this.stop(), this.start()), this.remaining;
3453
+ }
3454
+ isRunning() {
3455
+ return this.running;
3456
+ }
3457
+ }
3458
+ let Fr = [
3459
+ "swal-title",
3460
+ "swal-html",
3461
+ "swal-footer"
3462
+ ], Ir = (e) => {
3463
+ let t = typeof e.template == "string" ? document.querySelector(e.template) : e.template;
3464
+ if (!t) return {};
3465
+ let n = t.content;
3466
+ return Wr(n), Object.assign(Lr(n), Rr(n), zr(n), Br(n), Vr(n), Hr(n), Ur(n, Fr));
3467
+ }, Lr = (e) => {
3468
+ let t = {};
3469
+ return Array.from(e.querySelectorAll("swal-param")).forEach((e) => {
3470
+ Gr(e, ["name", "value"]);
3471
+ let n = e.getAttribute("name"), r = e.getAttribute("value");
3472
+ !n || !r || (n in Kn && typeof Kn[n] == "boolean" ? t[n] = r !== "false" : n in Kn && typeof Kn[n] == "object" ? t[n] = JSON.parse(r) : t[n] = r);
3473
+ }), t;
3474
+ }, Rr = (e) => {
3475
+ let t = {};
3476
+ return Array.from(e.querySelectorAll("swal-function-param")).forEach((e) => {
3477
+ let n = e.getAttribute("name"), r = e.getAttribute("value");
3478
+ !n || !r || (t[n] = Function(`return ${r}`)());
3479
+ }), t;
3480
+ }, zr = (e) => {
3481
+ let t = {};
3482
+ return Array.from(e.querySelectorAll("swal-button")).forEach((e) => {
3483
+ Gr(e, [
3484
+ "type",
3485
+ "color",
3486
+ "aria-label"
3487
+ ]);
3488
+ let n = e.getAttribute("type");
3489
+ if (!n || ![
3490
+ "confirm",
3491
+ "cancel",
3492
+ "deny"
3493
+ ].includes(n)) return;
3494
+ t[`${n}ButtonText`] = e.innerHTML, t[`show${f(n)}Button`] = !0;
3495
+ let r = e.getAttribute("color");
3496
+ r !== null && (t[`${n}ButtonColor`] = r);
3497
+ let i = e.getAttribute("aria-label");
3498
+ i !== null && (t[`${n}ButtonAriaLabel`] = i);
3499
+ }), t;
3500
+ }, Br = (e) => {
3501
+ let t = {}, n = e.querySelector("swal-image");
3502
+ if (n) {
3503
+ Gr(n, [
3504
+ "src",
3505
+ "width",
3506
+ "height",
3507
+ "alt"
3508
+ ]);
3509
+ let e = n.getAttribute("src");
3510
+ e !== null && (t.imageUrl = e || void 0);
3511
+ let r = n.getAttribute("width");
3512
+ r !== null && (t.imageWidth = r || void 0);
3513
+ let i = n.getAttribute("height");
3514
+ i !== null && (t.imageHeight = i || void 0);
3515
+ let a = n.getAttribute("alt");
3516
+ a !== null && (t.imageAlt = a || void 0);
3517
+ }
3518
+ return t;
3519
+ }, Vr = (e) => {
3520
+ let t = {}, n = e.querySelector("swal-icon");
3521
+ return n && (Gr(n, ["type", "color"]), n.hasAttribute("type") && (t.icon = n.getAttribute("type")), n.hasAttribute("color") && (t.iconColor = n.getAttribute("color")), t.iconHtml = n.innerHTML), t;
3522
+ }, Hr = (e) => {
3523
+ let t = {}, n = e.querySelector("swal-input");
3524
+ n && (Gr(n, [
3525
+ "type",
3526
+ "label",
3527
+ "placeholder",
3528
+ "value"
3529
+ ]), t.input = n.getAttribute("type") || "text", n.hasAttribute("label") && (t.inputLabel = n.getAttribute("label")), n.hasAttribute("placeholder") && (t.inputPlaceholder = n.getAttribute("placeholder")), n.hasAttribute("value") && (t.inputValue = n.getAttribute("value")));
3530
+ let r = Array.from(e.querySelectorAll("swal-input-option"));
3531
+ return r.length && (t.inputOptions = {}, r.forEach((e) => {
3532
+ Gr(e, ["value"]);
3533
+ let n = e.getAttribute("value");
3534
+ if (!n) return;
3535
+ let r = e.innerHTML;
3536
+ t.inputOptions[n] = r;
3537
+ })), t;
3538
+ }, Ur = (e, t) => {
3539
+ let n = {};
3540
+ for (let r in t) {
3541
+ let i = t[r], a = e.querySelector(i);
3542
+ a && (Gr(a, []), n[i.replace(/^swal-/, "")] = a.innerHTML.trim());
3543
+ }
3544
+ return n;
3545
+ }, Wr = (e) => {
3546
+ let t = Fr.concat([
3547
+ "swal-param",
3548
+ "swal-function-param",
3549
+ "swal-button",
3550
+ "swal-image",
3551
+ "swal-icon",
3552
+ "swal-input",
3553
+ "swal-input-option"
3554
+ ]);
3555
+ Array.from(e.children).forEach((e) => {
3556
+ let n = e.tagName.toLowerCase();
3557
+ t.includes(n) || p(`Unrecognized element <${n}>`);
3558
+ });
3559
+ }, Gr = (e, t) => {
3560
+ Array.from(e.attributes).forEach((n) => {
3561
+ t.indexOf(n.name) === -1 && p([`Unrecognized attribute "${n.name}" on <${e.tagName.toLowerCase()}>.`, `${t.length ? `Allowed attributes are: ${t.join(", ")}` : "To set the value, use HTML within the element."}`]);
3562
+ });
3563
+ }, Kr = (e) => {
3564
+ var t, n;
3565
+ let r = C(), i = E();
3566
+ if (!r || !i) return;
3567
+ typeof e.willOpen == "function" && e.willOpen(i), (t = a.eventEmitter) == null || t.emit("willOpen", i);
3568
+ let o = window.getComputedStyle(document.body).overflowY;
3569
+ if (Xr(r, i, e), setTimeout(() => {
3570
+ Jr(r, i);
3571
+ }, 10), de() && (Yr(r, e.scrollbarPadding !== void 0 && e.scrollbarPadding, o), Ht()), Gt && e.backdrop === !1 && i.scrollHeight > r.clientHeight && (r.style.pointerEvents = "auto"), !fe() && !a.previousActiveElement && (a.previousActiveElement = document.activeElement), typeof e.didOpen == "function") {
3572
+ let t = e.didOpen;
3573
+ setTimeout(() => t(i));
3574
+ }
3575
+ (n = a.eventEmitter) == null || n.emit("didOpen", i);
3576
+ }, qr = (e) => {
3577
+ let t = E();
3578
+ if (!t || e.target !== t) return;
3579
+ let n = C();
3580
+ n && (t.removeEventListener("animationend", qr), t.removeEventListener("transitionend", qr), n.style.overflowY = "auto", L(n, l["no-transition"]));
3581
+ }, Jr = (e, t) => {
3582
+ Ce(t) ? (e.style.overflowY = "hidden", t.addEventListener("animationend", qr), t.addEventListener("transitionend", qr)) : e.style.overflowY = "auto";
3583
+ }, Yr = (e, t, n) => {
3584
+ Kt(), t && n !== "hidden" && en(n), setTimeout(() => {
3585
+ e.scrollTop = 0;
3586
+ });
3587
+ }, Xr = (e, t, n) => {
3588
+ var r;
3589
+ (r = n.showClass) != null && r.backdrop && I(e, n.showClass.backdrop), n.animation ? (t.style.setProperty("opacity", "0", "important"), z(t, "grid"), setTimeout(() => {
3590
+ var e;
3591
+ (e = n.showClass) != null && e.popup && I(t, n.showClass.popup), t.style.removeProperty("opacity");
3592
+ }, 10)) : z(t, "grid"), I([document.documentElement, document.body], l.shown), n.heightAuto && n.backdrop && !n.toast && I([document.documentElement, document.body], l["height-auto"]);
3593
+ };
3594
+ var Zr = {
3595
+ email: (e, t) => /^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(e) ? Promise.resolve() : Promise.resolve(t || "Invalid email address"),
3596
+ url: (e, t) => /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(e) ? Promise.resolve() : Promise.resolve(t || "Invalid URL")
3597
+ };
3598
+ function Qr(e) {
3599
+ e.inputValidator || (e.input === "email" && (e.inputValidator = Zr.email), e.input === "url" && (e.inputValidator = Zr.url));
3600
+ }
3601
+ function $r(e) {
3602
+ (!e.target || typeof e.target == "string" && !document.querySelector(e.target) || typeof e.target != "string" && !e.target.appendChild) && (p("Target parameter is not valid, defaulting to \"body\""), e.target = "body");
3603
+ }
3604
+ function ei(e) {
3605
+ Qr(e), e.showLoaderOnConfirm && !e.preConfirm && p("showLoaderOnConfirm is set to true, but preConfirm is not defined.\nshowLoaderOnConfirm should be used together with preConfirm, see usage example:\nhttps://sweetalert2.github.io/#ajax-request"), $r(e), typeof e.title == "string" && (e.title = e.title.split("\n").join("<br />")), Ae(e);
3606
+ }
3607
+ let Q;
3608
+ var ti = /*#__PURE__*/ new WeakMap();
3609
+ class $ {
3610
+ constructor(...e) {
3611
+ if (r(this, ti, Promise.resolve({
3612
+ isConfirmed: !1,
3613
+ isDenied: !1,
3614
+ isDismissed: !0
3615
+ })), typeof window > "u") return;
3616
+ Q = this;
3617
+ let t = Object.freeze(this.constructor.argsToParams(e));
3618
+ this.params = t, this.isAwaitingPromise = !1, i(ti, this, this._main(Q.params));
3619
+ }
3620
+ _main(e, t = {}) {
3621
+ if (nr(Object.assign({}, t, e)), a.currentInstance) {
3622
+ let e = Vt.swalPromiseResolve.get(a.currentInstance), { isAwaitingPromise: t } = a.currentInstance;
3623
+ a.currentInstance._destroy(), t || e({ isDismissed: !0 }), de() && Ut();
3624
+ }
3625
+ a.currentInstance = Q;
3626
+ let n = ri(e, t);
3627
+ ei(n), Object.freeze(n), a.timeout && (a.timeout.stop(), delete a.timeout), clearTimeout(a.restoreFocusTimeout);
3628
+ let r = ii(Q);
3629
+ return Et(Q, n), J.innerParams.set(Q, n), ni(Q, r, n);
3630
+ }
3631
+ then(e) {
3632
+ return n(ti, this).then(e);
3633
+ }
3634
+ finally(e) {
3635
+ return n(ti, this).finally(e);
3636
+ }
3637
+ }
3638
+ let ni = (e, t, n) => new Promise((r, i) => {
3639
+ let o = (t) => {
3640
+ e.close({
3641
+ isDismissed: !0,
3642
+ dismiss: t,
3643
+ isConfirmed: !1,
3644
+ isDenied: !1
3645
+ });
3646
+ };
3647
+ Vt.swalPromiseResolve.set(e, r), Vt.swalPromiseReject.set(e, i), t.confirmButton.onclick = () => {
3648
+ En(e);
3649
+ }, t.denyButton.onclick = () => {
3650
+ Dn(e);
3651
+ }, t.cancelButton.onclick = () => {
3652
+ On(e, o);
3653
+ }, t.closeButton.onclick = () => {
3654
+ o(Z.close);
3655
+ }, ur(n, t, o), Mt(a, n, o), hn(e, n), Kr(n), ai(a, n, o), oi(t, n), setTimeout(() => {
3656
+ t.container.scrollTop = 0;
3657
+ });
3658
+ }), ri = (e, t) => {
3659
+ let n = Ir(e), r = Object.assign({}, Kn, t, n, e);
3660
+ return r.showClass = Object.assign({}, Kn.showClass, r.showClass), r.hideClass = Object.assign({}, Kn.hideClass, r.hideClass), r.animation === !1 && (r.showClass = { backdrop: "swal2-noanimation" }, r.hideClass = {}), r;
3661
+ }, ii = (e) => {
3662
+ let t = {
3663
+ popup: E(),
3664
+ container: C(),
3665
+ actions: oe(),
3666
+ confirmButton: A(),
3667
+ denyButton: j(),
3668
+ cancelButton: ie(),
3669
+ loader: M(),
3670
+ closeButton: le(),
3671
+ validationMessage: re(),
3672
+ progressSteps: ne()
3673
+ };
3674
+ return J.domCache.set(e, t), t;
3675
+ }, ai = (e, t, n) => {
3676
+ let r = ce();
3677
+ B(r), t.timer && (e.timeout = new Pr(() => {
3678
+ n("timer"), delete e.timeout;
3679
+ }, t.timer), t.timerProgressBar && r && (z(r), F(r, t, "timerProgressBar"), setTimeout(() => {
3680
+ e.timeout && e.timeout.running && we(t.timer);
3681
+ })));
3682
+ }, oi = (e, t) => {
3683
+ if (!t.toast) {
3684
+ if (!v(t.allowEnterKey)) {
3685
+ _("allowEnterKey", "preConfirm: () => false"), e.popup.focus();
3686
+ return;
3687
+ }
3688
+ si(e) || ci(e, t) || Nt(-1, 1);
3689
+ }
3690
+ }, si = (e) => {
3691
+ let t = Array.from(e.popup.querySelectorAll("[autofocus]"));
3692
+ for (let e of t) if (e instanceof HTMLElement && H(e)) return e.focus(), !0;
3693
+ return !1;
3694
+ }, ci = (e, t) => t.focusDeny && H(e.denyButton) ? (e.denyButton.focus(), !0) : t.focusCancel && H(e.cancelButton) ? (e.cancelButton.focus(), !0) : t.focusConfirm && H(e.confirmButton) ? (e.confirmButton.focus(), !0) : !1;
3695
+ $.prototype.disableButtons = Vn, $.prototype.enableButtons = Bn, $.prototype.getInput = Ln, $.prototype.disableInput = Un, $.prototype.enableInput = Hn, $.prototype.hideLoading = Fn, $.prototype.disableLoading = Fn, $.prototype.showValidationMessage = Wn, $.prototype.resetValidationMessage = Gn, $.prototype.close = an, $.prototype.closePopup = an, $.prototype.closeModal = an, $.prototype.closeToast = an, $.prototype.rejectPromise = sn, $.prototype.update = rr, $.prototype._destroy = ar, Object.assign($, Nr), Object.keys(lr).forEach((e) => {
3696
+ $[e] = function(...t) {
3697
+ if (Q && Q[e]) return Q[e](...t);
3698
+ };
3699
+ }), $.DismissReason = Z, $.version = "11.26.25";
3700
+ let li = $;
3701
+ return li.default = li, li;
3702
+ })), e !== void 0 && e.Sweetalert2 && (e.swal = e.sweetAlert = e.Swal = e.SweetAlert = e.Sweetalert2), typeof document < "u" && function(e, t) {
3703
+ var n = e.createElement("style");
3704
+ if (e.getElementsByTagName("head")[0].appendChild(n), n.styleSheet) n.styleSheet.disabled || (n.styleSheet.cssText = t);
3705
+ else try {
3706
+ n.innerHTML = t;
3707
+ } catch {
3708
+ n.innerText = t;
3709
+ }
3710
+ }(document, ":root{--swal2-outline: 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-backdrop-transition: background-color 0.15s;--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-icon-zoom: 1;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-border: 1px solid #d9d9d9;--swal2-input-border-radius: 0.1875em;--swal2-input-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-background: transparent;--swal2-input-transition: border-color 0.2s, box-shadow 0.2s;--swal2-input-hover-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px transparent;--swal2-input-focus-border: 1px solid #b4dbed;--swal2-input-focus-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.06), 0 0 0 3px rgba(100, 150, 200, 0.5);--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-footer-border-color: #eee;--swal2-footer-background: transparent;--swal2-footer-color: inherit;--swal2-timer-progress-bar-background: rgba(0, 0, 0, 0.3);--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.2s, box-shadow 0.2s;--swal2-close-button-outline: initial;--swal2-close-button-box-shadow: inset 0 0 0 3px transparent;--swal2-close-button-focus-box-shadow: inset var(--swal2-outline);--swal2-close-button-hover-transform: none;--swal2-actions-justify-content: center;--swal2-actions-width: auto;--swal2-actions-margin: 1.25em auto 0;--swal2-actions-padding: 0;--swal2-actions-border-radius: 0;--swal2-actions-background: transparent;--swal2-action-button-transition: background-color 0.2s, box-shadow 0.2s;--swal2-action-button-hover: black 10%;--swal2-action-button-active: black 10%;--swal2-confirm-button-box-shadow: none;--swal2-confirm-button-border-radius: 0.25em;--swal2-confirm-button-background-color: #7066e0;--swal2-confirm-button-color: #fff;--swal2-deny-button-box-shadow: none;--swal2-deny-button-border-radius: 0.25em;--swal2-deny-button-background-color: #dc3741;--swal2-deny-button-color: #fff;--swal2-cancel-button-box-shadow: none;--swal2-cancel-button-border-radius: 0.25em;--swal2-cancel-button-background-color: #6e7881;--swal2-cancel-button-color: #fff;--swal2-toast-show-animation: swal2-toast-show 0.5s;--swal2-toast-hide-animation: swal2-toast-hide 0.1s forwards;--swal2-toast-border: none;--swal2-toast-box-shadow: 0 0 1px hsl(0deg 0% 0% / 0.075), 0 1px 2px hsl(0deg 0% 0% / 0.075), 1px 2px 4px hsl(0deg 0% 0% / 0.075), 1px 3px 8px hsl(0deg 0% 0% / 0.075), 2px 4px 16px hsl(0deg 0% 0% / 0.075)}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white);--swal2-timer-progress-bar-background: rgba(255, 255, 255, 0.7)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:auto}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:\"top-start top top-end\" \"center-start center center-end\" \"bottom-start bottom-center bottom-end\";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:var(--swal2-backdrop-transition);-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container)[popover]{width:auto;border:0}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;overflow-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:var(--swal2-actions-justify-content);width:var(--swal2-actions-width);margin:var(--swal2-actions-margin);padding:var(--swal2-actions-padding);border-radius:var(--swal2-actions-border-radius);background:var(--swal2-actions-background)}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:var(--swal2-action-button-transition);border:none;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border-radius:var(--swal2-confirm-button-border-radius);background:initial;background-color:var(--swal2-confirm-button-background-color);box-shadow:var(--swal2-confirm-button-box-shadow);color:var(--swal2-confirm-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):hover{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):active{background-color:color-mix(in srgb, var(--swal2-confirm-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border-radius:var(--swal2-deny-button-border-radius);background:initial;background-color:var(--swal2-deny-button-background-color);box-shadow:var(--swal2-deny-button-box-shadow);color:var(--swal2-deny-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):hover{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):active{background-color:color-mix(in srgb, var(--swal2-deny-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border-radius:var(--swal2-cancel-button-border-radius);background:initial;background-color:var(--swal2-cancel-button-background-color);box-shadow:var(--swal2-cancel-button-box-shadow);color:var(--swal2-cancel-button-color);font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):hover{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-hover))}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):active{background-color:color-mix(in srgb, var(--swal2-cancel-button-background-color), var(--swal2-action-button-active))}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none;box-shadow:var(--swal2-action-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-styled)[disabled]:not(.swal2-loading){opacity:.4}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);background:var(--swal2-footer-background);color:var(--swal2-footer-color);font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:var(--swal2-timer-progress-bar-background)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:var(--swal2-close-button-focus-box-shadow)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;overflow-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:var(--swal2-input-transition);border:var(--swal2-input-border);border-radius:var(--swal2-input-border-radius);background:var(--swal2-input-background);box-shadow:var(--swal2-input-box-shadow);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):hover,div:where(.swal2-container) input:where(.swal2-file):hover,div:where(.swal2-container) textarea:where(.swal2-textarea):hover{box-shadow:var(--swal2-input-hover-box-shadow)}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:var(--swal2-input-focus-border);outline:none;box-shadow:var(--swal2-input-focus-box-shadow)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:\"!\";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;zoom:var(--swal2-icon-zoom);border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;border:var(--swal2-toast-border);background:var(--swal2-background);box-shadow:var(--swal2-toast-box-shadow);pointer-events:auto}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-toast.swal2-show{animation:var(--swal2-toast-show-animation)}.swal2-toast.swal2-hide{animation:var(--swal2-toast-hide-animation)}@keyframes swal2-show{0%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}100%{transform:translate3d(0, 0, 0) scale(1);opacity:1}}@keyframes swal2-hide{0%{transform:translate3d(0, 0, 0) scale(1);opacity:1}100%{transform:translate3d(0, -50px, 0) scale(0.9);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}");
3711
+ })))(), 1);
3712
+ function Z({ title: e, inputs: t, confirmText: n, cancelText: r }) {
3713
+ let i = t.map((e, t) => `<input id="${`swal-input-${t}`}" class="swal2-input" placeholder="${e.placeholder || ""}" value="${e.value || ""}">`).join("");
3714
+ return At.default.fire({
3715
+ title: e,
3716
+ html: i,
3717
+ focusConfirm: !1,
3718
+ preConfirm: () => {
3719
+ let e = t.map((e, t) => {
3720
+ let n = `swal-input-${t}`, r = document.getElementById(n);
3721
+ if (!r) return null;
3722
+ let i = r.value;
3723
+ return e.required && !i ? (At.default.showValidationMessage(e.requiredMessage || "This field is required"), !1) : i;
3724
+ });
3725
+ return !e.includes(!1) && e;
3726
+ },
3727
+ showCancelButton: !0,
3728
+ confirmButtonText: n || "Confirm",
3729
+ cancelButtonText: r || "Cancel"
3730
+ });
3731
+ }
3732
+ //#endregion
3733
+ //#region src/components/shared/toolbar/Insert/Hooks/insertLogic.jsx
3734
+ function jt() {
3735
+ let e = window.getSelection();
3736
+ return e && e.rangeCount > 0 ? e.getRangeAt(0).cloneRange() : null;
3737
+ }
3738
+ function Mt(e) {
3739
+ if (!e) return;
3740
+ let t = window.getSelection();
3741
+ t && (t.removeAllRanges(), t.addRange(e));
3742
+ }
3743
+ function Nt() {
3744
+ let e = document.querySelector(".forge-editor__content");
3745
+ if (e) {
3746
+ e.focus();
3747
+ let t = document.createRange(), n = window.getSelection();
3748
+ if (n) {
3749
+ let r = e.lastChild;
3750
+ r ? (t.setStartAfter(r), t.collapse(!0)) : (t.selectNodeContents(e), t.collapse(!1)), n.removeAllRanges(), n.addRange(t);
3751
+ }
3752
+ }
3753
+ }
3754
+ function Pt(e) {
3755
+ let t = window.getSelection();
3756
+ if (!t || !t.rangeCount) {
3757
+ Nt(), setTimeout(() => Pt(e), 50);
3758
+ return;
3759
+ }
3760
+ let n = t.getRangeAt(0);
3761
+ n.deleteContents();
3762
+ let r = n.createContextualFragment(e), i = r.lastChild;
3763
+ n.insertNode(r), i ? (n.setStartAfter(i), n.collapse(!0)) : n.collapse(!1), t.removeAllRanges(), t.addRange(n);
3764
+ }
3765
+ function Ft() {
3766
+ return {
3767
+ insertLink: async () => {
3768
+ let e = jt(), t = await Z({
3769
+ title: "Insert Link",
3770
+ inputs: [{
3771
+ placeholder: "URL",
3772
+ value: "https://",
3773
+ required: !0,
3774
+ requiredMessage: "URL is required"
3775
+ }, { placeholder: "Link text (optional)" }],
3776
+ confirmText: "Insert",
3777
+ cancelText: "Cancel"
3778
+ });
3779
+ if (t.isConfirmed && t.value) {
3780
+ Mt(e);
3781
+ let [n, r] = t.value;
3782
+ Pt(r ? `<a href="${n}" target="_blank" rel="noopener">${r}</a>` : `<a href="${n}" target="_blank" rel="noopener">${n}</a>`);
3783
+ }
3784
+ },
3785
+ insertImage: async () => {
3786
+ let e = jt(), t = await Z({
3787
+ title: "Insert Image",
3788
+ inputs: [{
3789
+ placeholder: "Image URL",
3790
+ value: "https://",
3791
+ required: !0,
3792
+ requiredMessage: "Image URL is required"
3793
+ }, {
3794
+ placeholder: "Alt text",
3795
+ value: "Image"
3796
+ }],
3797
+ confirmText: "Insert",
3798
+ cancelText: "Cancel"
3799
+ });
3800
+ if (t.isConfirmed && t.value) {
3801
+ Mt(e);
3802
+ let [n, r] = t.value;
3803
+ Pt(`<img src="${n}" alt="${r}" style="max-width: 100%;">`);
3804
+ }
3805
+ },
3806
+ insertVideo: async () => {
3807
+ let e = jt(), t = await Z({
3808
+ title: "Insert Video",
3809
+ inputs: [{
3810
+ placeholder: "Video URL (YouTube/Vimeo)",
3811
+ value: "https://",
3812
+ required: !0,
3813
+ requiredMessage: "Video URL is required"
3814
+ }],
3815
+ confirmText: "Insert",
3816
+ cancelText: "Cancel"
3817
+ });
3818
+ if (t.isConfirmed && t.value) {
3819
+ Mt(e);
3820
+ let [n] = t.value, r;
3821
+ r = n.includes("youtube.com") || n.includes("youtu.be") ? `<iframe width="560" height="315" src="${n.replace("watch?v=", "embed/").replace("youtu.be/", "youtube.com/embed/")}" frameborder="0" allowfullscreen></iframe>` : `<video controls src="${n}" style="max-width: 100%;"></video>`, Pt(r);
3822
+ }
3823
+ }
3824
+ };
3825
+ }
3826
+ //#endregion
3827
+ //#region src/components/shared/toolbar/Insert/Components/index.jsx
3828
+ function It() {
3829
+ return /* @__PURE__ */ R(kt, { logic: Ft() });
3830
+ }
3831
+ //#endregion
3832
+ //#region src/components/shared/toolbar/View/Components/ViewToolbar.jsx
3833
+ function Lt({ logic: e }) {
3834
+ let { toggleFullscreen: t, toggleCodeView: n, showHelp: r } = e, i = "forge-toolbar-button group relative flex h-8 cursor-pointer items-center justify-center rounded-[2px] border border-[#ccc] bg-white px-2 text-sm leading-none transition-all duration-150 hover:bg-[#f0f0f0] active:translate-y-px", a = "pointer-events-none absolute left-1/2 top-[calc(100%+8px)] z-30 -translate-x-1/2 whitespace-nowrap rounded-md border border-[#2c2c2c] bg-[#1e1e1e] px-2.5 py-1 text-[11px] font-medium leading-none text-white opacity-0 shadow-lg transition-all duration-200 group-hover:visible group-hover:opacity-100 rtl:left-1/2 rtl:-translate-x-1/2 before:absolute before:bottom-full before:left-1/2 before:-translate-x-1/2 before:border-x-[5px] before:border-b-[5px] before:border-t-0 before:border-solid before:border-x-transparent before:border-b-[#2c2c2c] after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:translate-y-[1px] after:border-x-[4px] after:border-b-[4px] after:border-t-0 after:border-solid after:border-x-transparent after:border-b-[#1e1e1e]";
3835
+ return /* @__PURE__ */ R("div", {
3836
+ className: "forge-toolbar-group forge-toolbar-view flex items-center gap-0.5",
3837
+ children: [/* @__PURE__ */ R("button", {
3838
+ type: "button",
3839
+ className: i,
3840
+ onClick: t,
3841
+ "aria-label": "Full Screen",
3842
+ children: [/* @__PURE__ */ R("span", {
3843
+ className: "forge-toolbar-icon",
3844
+ children: "⛶"
3845
+ }), /* @__PURE__ */ R("span", {
3846
+ className: a,
3847
+ "data-i18n": "fullscreen",
3848
+ children: "Full Screen"
3849
+ })]
3850
+ }), /* @__PURE__ */ R("button", {
3851
+ type: "button",
3852
+ className: i,
3853
+ onClick: n,
3854
+ "aria-label": "Code View",
3855
+ children: [/* @__PURE__ */ R("span", {
3856
+ className: "forge-toolbar-icon",
3857
+ children: "</>"
3858
+ }), /* @__PURE__ */ R("span", {
3859
+ className: a,
3860
+ "data-i18n": "codeview",
3861
+ children: "Code View"
3862
+ })]
3863
+ })]
3864
+ });
3865
+ }
3866
+ //#endregion
3867
+ //#region src/components/shared/toolbar/View/Hooks/viewLogic.jsx
3868
+ function Rt() {
3869
+ return {
3870
+ toggleFullscreen: () => {
3871
+ let e = document.querySelector(".forge-editor");
3872
+ e && (document.fullscreenElement ? document.exitFullscreen().catch(() => {}) : e.requestFullscreen().catch(() => {}));
3873
+ },
3874
+ toggleCodeView: () => {
3875
+ let e = document.querySelector(".forge-editor__content");
3876
+ e && (e.contentEditable === "true" ? (e.contentEditable = "false", e.textContent = e.innerHTML) : (e.contentEditable = "true", e.innerHTML = e.textContent), e.focus());
3877
+ },
3878
+ showHelp: () => {
3879
+ let e = [
3880
+ "Forge Editor - Keyboard Shortcuts:",
3881
+ "",
3882
+ "Bold: Ctrl+B",
3883
+ "Underline: Ctrl+U",
3884
+ "Link: Ctrl+K",
3885
+ "Undo: Ctrl+Z",
3886
+ "Redo: Ctrl+Y",
3887
+ "",
3888
+ "Visit: https://github.com/your-repo/forge-edit"
3889
+ ].join("\n");
3890
+ alert(e);
3891
+ }
3892
+ };
3893
+ }
3894
+ //#endregion
3895
+ //#region src/components/shared/toolbar/View/Components/index.jsx
3896
+ function zt() {
3897
+ return /* @__PURE__ */ R(Lt, { logic: Rt() });
3898
+ }
3899
+ //#endregion
3900
+ //#region src/components/shared/toolbar/Index/index.jsx
3901
+ function Bt({ editorRef: e }) {
3902
+ return /* @__PURE__ */ R("div", {
3903
+ className: "forge-editor__toolbar sticky top-0 z-10 m-0 flex flex-shrink-0 flex-wrap items-center gap-[4px] rounded-t-[3px] border-b border-[#ddd] bg-[#f5f5f5] p-[5px] text-[#333]",
3904
+ role: "toolbar",
3905
+ children: [
3906
+ /* @__PURE__ */ R(z, {}),
3907
+ /* @__PURE__ */ R(J, {}),
3908
+ /* @__PURE__ */ R(Qe, { editorRef: e }),
3909
+ /* @__PURE__ */ R(ut, {}),
3910
+ /* @__PURE__ */ R(St, {}),
3911
+ /* @__PURE__ */ R(Ot, {}),
3912
+ /* @__PURE__ */ R(It, {}),
3913
+ /* @__PURE__ */ R(zt, {})
3914
+ ]
3915
+ });
3916
+ }
3917
+ //#endregion
3918
+ //#region src/components/shared/statusbar/Components/index.jsx
3919
+ function Vt() {
3920
+ return /* @__PURE__ */ R("div", {
3921
+ className: "forge-statusbar box-border flex h-2.5 w-full flex-shrink-0 cursor-s-resize items-center justify-center rounded-b-[3px] border-t border-[#ccc] bg-[#f0f0f0]",
3922
+ role: "status",
3923
+ children: /* @__PURE__ */ R("div", {
3924
+ className: "flex flex-col items-center gap-px",
3925
+ "aria-label": "resize",
3926
+ children: [
3927
+ /* @__PURE__ */ R("div", { className: "h-px w-3 rounded-[1px] bg-[#888]" }),
3928
+ /* @__PURE__ */ R("div", { className: "h-px w-3 rounded-[1px] bg-[#888]" }),
3929
+ /* @__PURE__ */ R("div", { className: "h-px w-3 rounded-[1px] bg-[#888]" })
3930
+ ]
3931
+ })
3932
+ });
3933
+ }
3934
+ //#endregion
3935
+ //#region src/components/shared/statusbar/Hooks/resize.js
3936
+ var Ht = 100;
3937
+ function Ut(e, t, n = {}) {
3938
+ if (!e || !t) return () => {};
3939
+ let r = n.minHeight ?? Ht, i = n.maxHeight ?? Infinity, a = 0, o = 0;
3940
+ function s(e) {
3941
+ let n = e.clientY - a, s = o + n;
3942
+ s = Math.min(Math.max(s, r), i), t.style.height = `${s}px`;
3943
+ }
3944
+ function c() {
3945
+ document.removeEventListener("mousemove", s), document.removeEventListener("mouseup", c), document.body.style.removeProperty("user-select"), document.body.style.removeProperty("cursor");
3946
+ }
3947
+ function l(e) {
3948
+ e.preventDefault(), a = e.clientY, o = t.getBoundingClientRect().height, document.body.style.userSelect = "none", document.body.style.cursor = "s-resize", document.addEventListener("mousemove", s), document.addEventListener("mouseup", c);
3949
+ }
3950
+ return e.addEventListener("mousedown", l), function() {
3951
+ e.removeEventListener("mousedown", l), document.removeEventListener("mousemove", s), document.removeEventListener("mouseup", c);
3952
+ };
3953
+ }
3954
+ //#endregion
3955
+ //#region src/components/shared/toolbar/Style/Hooks/styleLogic.jsx
3956
+ function Wt(e) {
3957
+ let t = window.getSelection();
3958
+ if (!t || !t.rangeCount) return;
3959
+ let n = t.getRangeAt(0).commonAncestorContainer;
3960
+ n.nodeType === 3 && (n = n.parentElement);
3961
+ let r = n.closest("p, h1, h2, h3, h4, h5, h6, blockquote, pre");
3962
+ if (r) {
3963
+ let n = document.createElement(e);
3964
+ for (; r.firstChild;) n.appendChild(r.firstChild);
3965
+ r.replaceWith(n);
3966
+ let i = document.createRange();
3967
+ i.selectNodeContents(n), i.collapse(!1), t.removeAllRanges(), t.addRange(i);
3968
+ }
3969
+ }
3970
+ function Gt(e) {
3971
+ if (!e) return;
3972
+ let t = e.querySelector("[data-command='style']"), n = e.querySelector(".forge-dropdown-style");
3973
+ !t || !n || (Je(t, n), n.querySelectorAll(".forge-dropdown-item").forEach((e) => {
3974
+ e.addEventListener("mousedown", (r) => {
3975
+ r.preventDefault(), r.stopPropagation();
3976
+ let i = e.dataset.value || e.getAttribute("data-value");
3977
+ i && Wt(i), n.classList.remove("is-open"), t.classList.remove("is-active");
3978
+ });
3979
+ }));
3980
+ }
3981
+ //#endregion
3982
+ //#region src/components/shared/i18n/index.js
3983
+ var Kt = {
3984
+ en: {
3985
+ style: "Style",
3986
+ normal: "Normal",
3987
+ blockquote: "Blockquote",
3988
+ code: "Code",
3989
+ header1: "Header 1",
3990
+ header2: "Header 2",
3991
+ header3: "Header 3",
3992
+ header4: "Header 4",
3993
+ header5: "Header 5",
3994
+ header6: "Header 6",
3995
+ bold: "Bold",
3996
+ underline: "Underline",
3997
+ removeFormat: "Remove Font Style",
3998
+ fontName: "Font Family",
3999
+ recentColor: "Recent Color",
4000
+ moreColor: "More Color",
4001
+ recentBackColor: "Recent Background Color",
4002
+ moreBackColor: "More Background Colors",
4003
+ insertUnorderedList: "Unordered List",
4004
+ insertOrderedList: "Ordered List",
4005
+ paragraph: "Paragraph",
4006
+ justifyLeft: "Align Left",
4007
+ justifyCenter: "Align Center",
4008
+ justifyRight: "Align Right",
4009
+ justifyFull: "Justify",
4010
+ outdent: "Outdent",
4011
+ indent: "Indent",
4012
+ table: "Table",
4013
+ link: "Link",
4014
+ picture: "Picture",
4015
+ video: "Video",
4016
+ fullscreen: "Full Screen",
4017
+ codeview: "Code View",
4018
+ help: "Help"
4019
+ },
4020
+ ar: {
4021
+ style: "نمط",
4022
+ normal: "عادي",
4023
+ blockquote: "اقتباس",
4024
+ code: "كود",
4025
+ header1: "عنوان 1",
4026
+ header2: "عنوان 2",
4027
+ header3: "عنوان 3",
4028
+ header4: "عنوان 4",
4029
+ header5: "عنوان 5",
4030
+ header6: "عنوان 6",
4031
+ bold: "عريض",
4032
+ underline: "تسطير",
4033
+ removeFormat: "إزالة تنسيق الخط",
4034
+ fontName: "نوع الخط",
4035
+ recentColor: "آخر لون مستخدم",
4036
+ moreColor: "المزيد من الألوان",
4037
+ recentBackColor: "آخر لون خلفية",
4038
+ moreBackColor: "المزيد من ألوان الخلفية",
4039
+ insertUnorderedList: "قائمة نقطية",
4040
+ insertOrderedList: "قائمة مرقمة",
4041
+ paragraph: "فقرة",
4042
+ justifyLeft: "محاذاة لليسار",
4043
+ justifyCenter: "محاذاة للوسط",
4044
+ justifyRight: "محاذاة لليمين",
4045
+ justifyFull: "ضبط",
4046
+ outdent: "تقليل المسافة البادئة",
4047
+ indent: "زيادة المسافة البادئة",
4048
+ table: "جدول",
4049
+ link: "رابط",
4050
+ picture: "صورة",
4051
+ video: "فيديو",
4052
+ fullscreen: "ملء الشاشة",
4053
+ codeview: "عرض الكود",
4054
+ help: "مساعدة"
4055
+ }
4056
+ }, qt = "en";
4057
+ function Jt(e, t) {
4058
+ return (Kt[e] || Kt[qt])[t] || Kt[qt][t] || t;
4059
+ }
4060
+ //#endregion
4061
+ //#region src/components/shared/i18n/apply.js
4062
+ function Yt(e, t) {
4063
+ e.querySelectorAll("[data-i18n]").forEach((e) => {
4064
+ e.textContent = Jt(t, e.getAttribute("data-i18n"));
4065
+ });
4066
+ }
4067
+ //#endregion
4068
+ //#region src/components/shared/toolbar/Style/Utils/ensureParagraph.jsx
4069
+ function Xt(e) {
4070
+ if (e && !(e.children.length > 0 || e.textContent.trim().length > 0)) {
4071
+ let t = document.createElement("p");
4072
+ t.innerHTML = "<br>", e.appendChild(t);
4073
+ }
4074
+ }
4075
+ //#endregion
4076
+ //#region src/components/shared/toolbar/Hooks/contentClick.js
4077
+ function Zt(e) {
4078
+ e.addEventListener("click", (t) => {
4079
+ if (t.target === e) {
4080
+ let t = window.getSelection();
4081
+ if (!t) return;
4082
+ let n = e.lastElementChild;
4083
+ if (!n || n.tagName === "PRE" || n.tagName === "BLOCKQUOTE" || /^H[1-6]$/.test(n.tagName)) {
4084
+ let n = document.createElement("p");
4085
+ n.innerHTML = "<br>", e.appendChild(n);
4086
+ let r = document.createRange();
4087
+ r.setStart(n, 0), r.collapse(!0), t.removeAllRanges(), t.addRange(r);
4088
+ }
4089
+ }
4090
+ });
4091
+ }
4092
+ //#endregion
4093
+ //#region src/components/shared/toolbar/ImagePopover/Components/ImagePopover.jsx
4094
+ function Qt({ target: e, onClose: t, onResize: n, onFloat: r, onRemove: i }) {
4095
+ let a = q(null);
4096
+ if (!e) return null;
4097
+ let o = e.getBoundingClientRect(), s = {
4098
+ left: o.left + o.width / 2 - 100 + "px",
4099
+ top: o.bottom + 10 + "px"
4100
+ }, c = "note-btn cursor-pointer rounded-[2px] border border-[#ccc] bg-[#f5f5f5] px-2 py-1 text-xs leading-[1.4] transition-all duration-100 ease-in-out hover:border-[#999] hover:bg-[#e6e6e6] active:translate-y-px active:bg-[#d0d0d0]", l = "note-btn-group flex gap-0.5 border-r border-[#ddd] pr-1 last:border-r-0 last:pr-0", u = "not-italic text-sm leading-none";
4101
+ return /* @__PURE__ */ R("div", {
4102
+ ref: a,
4103
+ className: "note-popover bottom note-image-popover fixed z-[9999] min-w-[200px] rounded-[4px] border border-[#ccc] bg-white p-1.5 shadow-[0_2px_8px_rgba(0,0,0,0.15)]",
4104
+ style: s,
4105
+ children: [/* @__PURE__ */ R("div", {
4106
+ className: "absolute -top-2 left-1/2 -translate-x-1/2",
4107
+ children: [/* @__PURE__ */ R("div", { className: "border-l-8 border-r-8 border-b-8 border-l-transparent border-r-transparent border-b-[#ccc]" }), /* @__PURE__ */ R("div", { className: "absolute top-[1px] left-[-7px] border-l-7 border-r-7 border-b-7 border-l-transparent border-r-transparent border-b-white" })]
4108
+ }), /* @__PURE__ */ R("div", {
4109
+ className: "popover-content note-children-container flex flex-wrap items-center gap-1",
4110
+ children: [
4111
+ /* @__PURE__ */ R("div", {
4112
+ className: `${l} note-resize`,
4113
+ children: [
4114
+ /* @__PURE__ */ R("button", {
4115
+ type: "button",
4116
+ className: c,
4117
+ tabIndex: "-1",
4118
+ "aria-label": "Resize full",
4119
+ onClick: () => n(e, 1),
4120
+ children: /* @__PURE__ */ R("span", {
4121
+ className: "note-fontsize-10 text-[10px]",
4122
+ children: "100%"
4123
+ })
4124
+ }),
4125
+ /* @__PURE__ */ R("button", {
4126
+ type: "button",
4127
+ className: c,
4128
+ tabIndex: "-1",
4129
+ "aria-label": "Resize half",
4130
+ onClick: () => n(e, .5),
4131
+ children: /* @__PURE__ */ R("span", {
4132
+ className: "note-fontsize-10 text-[10px]",
4133
+ children: "50%"
4134
+ })
4135
+ }),
4136
+ /* @__PURE__ */ R("button", {
4137
+ type: "button",
4138
+ className: c,
4139
+ tabIndex: "-1",
4140
+ "aria-label": "Resize quarter",
4141
+ onClick: () => n(e, .25),
4142
+ children: /* @__PURE__ */ R("span", {
4143
+ className: "note-fontsize-10 text-[10px]",
4144
+ children: "25%"
4145
+ })
4146
+ }),
4147
+ /* @__PURE__ */ R("button", {
4148
+ type: "button",
4149
+ className: c,
4150
+ tabIndex: "-1",
4151
+ "aria-label": "Original size",
4152
+ onClick: () => n(e, "original"),
4153
+ children: /* @__PURE__ */ R("i", {
4154
+ className: `note-icon-rollback ${u}`,
4155
+ children: "↺"
4156
+ })
4157
+ })
4158
+ ]
4159
+ }),
4160
+ /* @__PURE__ */ R("div", {
4161
+ className: `${l} note-float`,
4162
+ children: [
4163
+ /* @__PURE__ */ R("button", {
4164
+ type: "button",
4165
+ className: c,
4166
+ tabIndex: "-1",
4167
+ "aria-label": "Float Left",
4168
+ onClick: () => r(e, "left"),
4169
+ children: /* @__PURE__ */ R("i", {
4170
+ className: `note-icon-float-left ${u}`,
4171
+ children: "◀"
4172
+ })
4173
+ }),
4174
+ /* @__PURE__ */ R("button", {
4175
+ type: "button",
4176
+ className: c,
4177
+ tabIndex: "-1",
4178
+ "aria-label": "Center",
4179
+ onClick: () => r(e, "center"),
4180
+ children: /* @__PURE__ */ R("i", {
4181
+ className: `note-icon-float-center ${u}`,
4182
+ children: "↔"
4183
+ })
4184
+ }),
4185
+ /* @__PURE__ */ R("button", {
4186
+ type: "button",
4187
+ className: c,
4188
+ tabIndex: "-1",
4189
+ "aria-label": "Float Right",
4190
+ onClick: () => r(e, "right"),
4191
+ children: /* @__PURE__ */ R("i", {
4192
+ className: `note-icon-float-right ${u}`,
4193
+ children: "▶"
4194
+ })
4195
+ }),
4196
+ /* @__PURE__ */ R("button", {
4197
+ type: "button",
4198
+ className: c,
4199
+ tabIndex: "-1",
4200
+ "aria-label": "Remove float",
4201
+ onClick: () => r(e, "none"),
4202
+ children: /* @__PURE__ */ R("i", {
4203
+ className: `note-icon-rollback ${u}`,
4204
+ children: "↺"
4205
+ })
4206
+ })
4207
+ ]
4208
+ }),
4209
+ /* @__PURE__ */ R("div", {
4210
+ className: `${l} note-remove`,
4211
+ children: /* @__PURE__ */ R("button", {
4212
+ type: "button",
4213
+ className: c,
4214
+ tabIndex: "-1",
4215
+ "aria-label": "Remove Image",
4216
+ onClick: () => i(e),
4217
+ children: /* @__PURE__ */ R("i", {
4218
+ className: `note-icon-trash ${u}`,
4219
+ children: "🗑"
4220
+ })
4221
+ })
4222
+ })
4223
+ ]
4224
+ })]
4225
+ });
4226
+ }
4227
+ //#endregion
4228
+ //#region src/components/shared/toolbar/ImagePopover/Hooks/useImagePopover.jsx
4229
+ function $t() {
4230
+ let [e, t] = G(null), [n, r] = G(!1);
4231
+ return K(() => {
4232
+ let e = (e) => {
4233
+ let i = e.target.closest("img");
4234
+ i ? (t(i), r(!0)) : n && (r(!1), t(null));
4235
+ }, i = (e) => {
4236
+ e.key === "Escape" && n && (r(!1), t(null));
4237
+ };
4238
+ return document.addEventListener("click", e), document.addEventListener("keydown", i), () => {
4239
+ document.removeEventListener("click", e), document.removeEventListener("keydown", i);
4240
+ };
4241
+ }, [n]), {
4242
+ target: n ? e : null,
4243
+ onClose: () => {
4244
+ r(!1), t(null);
4245
+ },
4246
+ onResize: (e, n) => {
4247
+ if (n === "original") e.style.width = "", e.style.height = "", e.removeAttribute("width"), e.removeAttribute("height");
4248
+ else {
4249
+ let t = e.naturalWidth || e.width, r = e.naturalHeight || e.height;
4250
+ e.style.width = t * n + "px", e.style.height = r * n + "px";
4251
+ }
4252
+ r(!1), t(null);
4253
+ },
4254
+ onFloat: (e, n) => {
4255
+ n === "none" ? (e.style.float = "", e.style.margin = "", e.style.display = "") : n === "center" ? (e.style.float = "none", e.style.display = "block", e.style.margin = "0 auto") : (e.style.float = n, e.style.display = "", e.style.margin = n === "left" ? "0 10px 5px 0" : "0 0 5px 10px"), r(!1), t(null);
4256
+ },
4257
+ onRemove: (e) => {
4258
+ e.parentElement.removeChild(e), r(!1), t(null);
4259
+ }
4260
+ };
4261
+ }
4262
+ //#endregion
4263
+ //#region src/components/shared/toolbar/ImagePopover/Components/index.jsx
4264
+ function en() {
4265
+ return /* @__PURE__ */ R(Qt, { ...$t() });
4266
+ }
4267
+ //#endregion
4268
+ //#region src/components/light/index.jsx
4269
+ function tn(e) {
4270
+ return {
4271
+ getHTML() {
4272
+ return e.innerHTML;
4273
+ },
4274
+ setHTML(t) {
4275
+ e.innerHTML = t;
4276
+ },
4277
+ getText() {
4278
+ return e.textContent;
4279
+ },
4280
+ getSelection() {
4281
+ let e = window.getSelection();
4282
+ return e ? e.toString() : "";
4283
+ }
4284
+ };
4285
+ }
4286
+ function nn(e) {
4287
+ let t = e.lang || "en", n = e.dir || "ltr", r = { current: null }, i = /* @__PURE__ */ R("div", {
4288
+ className: "forge-editor forge-editor--light flex flex-col w-full rounded-[3px] border border-[#ddd] bg-white box-border align-top min-h-[120px]",
4289
+ lang: t,
4290
+ dir: n,
4291
+ children: [
4292
+ /* @__PURE__ */ R(Bt, { editorRef: r }),
4293
+ /* @__PURE__ */ R("div", {
4294
+ className: "forge-editor__content flex-1 min-h-[60px] overflow-auto p-[10px] pb-12 outline-none box-border [&_blockquote]:my-2 [&_blockquote]:border-l-4 [&_blockquote]:border-[#ccc] [&_blockquote]:pl-4 [&_blockquote]:italic [&_pre]:bg-[#f4f4f4] [&_pre]:p-2 [&_pre]:rounded [&_h1]:text-2xl [&_h1]:font-bold [&_h2]:text-xl [&_h2]:font-bold [&_h3]:text-lg [&_h3]:font-bold",
4295
+ contentEditable: "true",
4296
+ "data-placeholder": e.placeholder || ""
4297
+ }),
4298
+ /* @__PURE__ */ R(Vt, {}),
4299
+ /* @__PURE__ */ R(en, {})
4300
+ ]
4301
+ }), a = document.createElement("div");
4302
+ I(i, a);
4303
+ let o = a.firstElementChild, s = o.querySelector(".forge-editor__content");
4304
+ r.current = s, Xt(s), Zt(s);
4305
+ let c = o.querySelector(".forge-toolbar-style");
4306
+ c && Gt(c);
4307
+ let l = o.querySelector(".forge-editor__toolbar");
4308
+ l && Yt(l, t);
4309
+ let u = o.querySelector(".forge-statusbar");
4310
+ return u && Ut(u, o, { minHeight: 120 }), {
4311
+ element: o,
4312
+ ...tn(s)
4313
+ };
4314
+ }
4315
+ //#endregion
4316
+ //#region src/main/index.jsx
4317
+ function rn(e) {
4318
+ let t = l(e);
4319
+ if (t.type === "light") {
4320
+ let { element: n, getHTML: r, setHTML: i, getText: a, getSelection: o } = nn(t);
4321
+ return e.innerHTML = "", e.appendChild(n), n.style.width = t.width, n.style.height = t.height, {
4322
+ element: n,
4323
+ getHTML: r,
4324
+ setHTML: i,
4325
+ getText: a,
4326
+ getSelection: o
4327
+ };
4328
+ }
4329
+ return null;
4330
+ }
4331
+ //#endregion
4332
+ //#region src/main/main.jsx
4333
+ var an = document.querySelectorAll("forge-editor"), on = [];
4334
+ an.forEach((e) => {
4335
+ let t = rn(e);
4336
+ t && on.push(t);
4337
+ }), window.forgeEditors = on;
4338
+ var sn = document.getElementById("get-html-btn"), cn = document.getElementById("html-output");
4339
+ sn && cn && on[0] && sn.addEventListener("click", () => {
4340
+ cn.value = on[0].getHTML();
4341
+ });
4342
+ //#endregion