From ac9208954a855a0977554a8405d1525bf3f72376 Mon Sep 17 00:00:00 2001 From: Mario Tarosso Date: Tue, 14 May 2024 22:16:31 +0000 Subject: [PATCH] laravel-projects/packages/onix automatic push --- Publish/Npm/package.json | 4 +- Publish/Npm/tailwind.config.js | 3 + Publish/Npm/vite.config.js | 8 +- Publish/Public/assets/app-4c960b16.css | 1 + Publish/Public/assets/app-de8ff430.js | 1 + Publish/Public/assets/grape-f2380d7a.js | 597 ++++++++++++++++++ .../Public/assets/onixGrapeJs-328607b6.css | 1 + .../Public/assets/sweetalert2-4370e638.css | 1 + Publish/Public/assets/sweetalert2-7c60aed3.js | 72 +++ Publish/Public/manifest.json | 44 +- src/Controllers/OnixApiController.php | 2 +- src/views/components/layout/footer.blade.php | 4 +- src/views/components/layout/main.blade.php | 2 +- src/views/components/layout/navbar.blade.php | 8 +- .../components/layout/sidemenu.blade.php | 2 +- src/views/content/block/index.blade.php | 14 +- src/views/content/page/index.blade.php | 14 +- 17 files changed, 725 insertions(+), 53 deletions(-) create mode 100644 Publish/Public/assets/app-4c960b16.css create mode 100644 Publish/Public/assets/app-de8ff430.js create mode 100644 Publish/Public/assets/grape-f2380d7a.js create mode 100644 Publish/Public/assets/onixGrapeJs-328607b6.css create mode 100644 Publish/Public/assets/sweetalert2-4370e638.css create mode 100644 Publish/Public/assets/sweetalert2-7c60aed3.js diff --git a/Publish/Npm/package.json b/Publish/Npm/package.json index 6ef1a42..027b551 100755 --- a/Publish/Npm/package.json +++ b/Publish/Npm/package.json @@ -23,8 +23,8 @@ }, "dependencies": { "@fortawesome/fontawesome-free": "^6.3.0", - "daisyui": "^2.43.0", - "grapesjs": "^0.20.4", + "daisyui": "^4.11.1", + "grapesjs": "^0.21.4", "grapesjs-aviary": "^0.1.2", "grapesjs-blocks-basic": "^1.0.1", "grapesjs-blocks-flexbox": "^0.1.1", diff --git a/Publish/Npm/tailwind.config.js b/Publish/Npm/tailwind.config.js index 77090e2..168168c 100755 --- a/Publish/Npm/tailwind.config.js +++ b/Publish/Npm/tailwind.config.js @@ -14,4 +14,7 @@ module.exports = { plugins: [ require('daisyui'), ], + daisyui: { + themes: ["light", "dark", "cupcake"], + }, } diff --git a/Publish/Npm/vite.config.js b/Publish/Npm/vite.config.js index 2816611..f5694db 100755 --- a/Publish/Npm/vite.config.js +++ b/Publish/Npm/vite.config.js @@ -19,5 +19,11 @@ export default defineConfig({ css: '/resources/vendor/Onix/css/app.css', }, }, - } + }, + server: { + host: '0.0.0.0', + hmr: { + host: 'localhost' + } + }, }); diff --git a/Publish/Public/assets/app-4c960b16.css b/Publish/Public/assets/app-4c960b16.css new file mode 100644 index 0000000..5c206a0 --- /dev/null +++ b/Publish/Public/assets/app-4c960b16.css @@ -0,0 +1 @@ +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}:root,[data-theme]{background-color:var(--fallback-b1,oklch(var(--b1)/1));color:var(--fallback-bc,oklch(var(--bc)/1))}@supports not (color: oklch(0% 0 0)){:root{color-scheme:light;--fallback-p: #491eff;--fallback-pc: #d4dbff;--fallback-s: #ff41c7;--fallback-sc: #fff9fc;--fallback-a: #00cfbd;--fallback-ac: #00100d;--fallback-n: #2b3440;--fallback-nc: #d7dde4;--fallback-b1: #ffffff;--fallback-b2: #e5e6e6;--fallback-b3: #e5e6e6;--fallback-bc: #1f2937;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--fallback-p: #7582ff;--fallback-pc: #050617;--fallback-s: #ff71cf;--fallback-sc: #190211;--fallback-a: #00c7b5;--fallback-ac: #000e0c;--fallback-n: #2a323c;--fallback-nc: #a6adbb;--fallback-b1: #1d232a;--fallback-b2: #191e24;--fallback-b3: #15191e;--fallback-bc: #a6adbb;--fallback-in: #00b3f0;--fallback-inc: #000000;--fallback-su: #00ca92;--fallback-suc: #000000;--fallback-wa: #ffc22d;--fallback-wac: #000000;--fallback-er: #ff6f70;--fallback-erc: #000000}}}html{-webkit-tap-highlight-color:transparent}:root{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 89.824% .06192 275.75;--ac: 15.352% .0368 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 49.12% .3096 275.75;--s: 69.71% .329 342.55;--sc: 98.71% .0106 342.55;--a: 76.76% .184 183.61;--n: 32.1785% .02476 255.701624;--nc: 89.4994% .011585 252.096176;--b1: 100% 0 0;--b2: 96.1151% 0 0;--b3: 92.4169% .00108 197.137559;--bc: 27.8078% .029596 256.847952}@media (prefers-color-scheme: dark){:root{color-scheme:dark;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 13.138% .0392 275.75;--sc: 14.96% .052 342.55;--ac: 14.902% .0334 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 65.69% .196 275.75;--s: 74.8% .26 342.55;--a: 74.51% .167 183.61;--n: 31.3815% .021108 254.139175;--nc: 74.6477% .0216 264.435964;--b1: 25.3267% .015896 252.417568;--b2: 23.2607% .013807 253.100675;--b3: 21.1484% .01165 254.087939;--bc: 74.6477% .0216 264.435964}}[data-theme=light]{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 89.824% .06192 275.75;--ac: 15.352% .0368 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 49.12% .3096 275.75;--s: 69.71% .329 342.55;--sc: 98.71% .0106 342.55;--a: 76.76% .184 183.61;--n: 32.1785% .02476 255.701624;--nc: 89.4994% .011585 252.096176;--b1: 100% 0 0;--b2: 96.1151% 0 0;--b3: 92.4169% .00108 197.137559;--bc: 27.8078% .029596 256.847952}[data-theme=dark]{color-scheme:dark;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 13.138% .0392 275.75;--sc: 14.96% .052 342.55;--ac: 14.902% .0334 183.61;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-btn: .5rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--tab-border: 1px;--tab-radius: .5rem;--p: 65.69% .196 275.75;--s: 74.8% .26 342.55;--a: 74.51% .167 183.61;--n: 31.3815% .021108 254.139175;--nc: 74.6477% .0216 264.435964;--b1: 25.3267% .015896 252.417568;--b2: 23.2607% .013807 253.100675;--b3: 21.1484% .01165 254.087939;--bc: 74.6477% .0216 264.435964}[data-theme=cupcake]{color-scheme:light;--in: 72.06% .191 231.6;--su: 64.8% .15 160;--wa: 84.71% .199 83.87;--er: 71.76% .221 22.18;--pc: 15.2344% .017892 200.026556;--sc: 15.787% .020249 356.29965;--ac: 15.8762% .029206 78.618794;--nc: 84.7148% .013247 313.189598;--inc: 0% 0 0;--suc: 0% 0 0;--wac: 0% 0 0;--erc: 0% 0 0;--rounded-box: 1rem;--rounded-badge: 1.9rem;--animation-btn: .25s;--animation-input: .2s;--btn-focus-scale: .95;--border-btn: 1px;--p: 76.172% .089459 200.026556;--s: 78.9351% .101246 356.29965;--a: 79.3811% .146032 78.618794;--n: 23.5742% .066235 313.189598;--b1: 97.7882% .00418 56.375637;--b2: 93.9822% .007638 61.449292;--b3: 91.5861% .006811 53.440502;--bc: 23.5742% .066235 313.189598;--rounded-btn: 1.9rem;--tab-border: 2px;--tab-radius: .7rem}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.alert{display:grid;width:100%;grid-auto-flow:row;align-content:flex-start;align-items:center;justify-items:center;gap:1rem;text-align:center;border-radius:var(--rounded-box, 1rem);border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));padding:1rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-b2,oklch(var(--b2)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1));background-color:var(--alert-bg)}@media (min-width: 640px){.alert{grid-auto-flow:column;grid-template-columns:auto minmax(auto,1fr);justify-items:start;text-align:start}}.avatar{position:relative;display:inline-flex}.avatar>div{display:block;aspect-ratio:1 / 1;overflow:hidden}.avatar img{height:100%;width:100%;-o-object-fit:cover;object-fit:cover}.avatar.placeholder>div{display:flex;align-items:center;justify-content:center}.badge{display:inline-flex;align-items:center;justify-content:center;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;height:1.25rem;font-size:.875rem;line-height:1.25rem;width:-moz-fit-content;width:fit-content;padding-left:.563rem;padding-right:.563rem;border-radius:var(--rounded-badge, 1.9rem);border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}@media (hover:hover){.link-hover:hover{text-decoration-line:underline}.label a:hover{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.menu li>*:not(ul,.menu-title,details,.btn):active,.menu li>*:not(ul,.menu-title,details,.btn).active,.menu li>details>summary:active{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.table tr.hover:hover,.table tr.hover:nth-child(2n):hover{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.table-zebra tr.hover:hover,.table-zebra tr.hover:nth-child(2n):hover{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}}.btn{display:inline-flex;height:3rem;min-height:3rem;flex-shrink:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;justify-content:center;border-radius:var(--rounded-btn, .5rem);border-color:transparent;border-color:oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity));padding-left:1rem;padding-right:1rem;text-align:center;font-size:.875rem;line-height:1em;gap:.5rem;font-weight:600;text-decoration-line:none;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);border-width:var(--border-btn, 1px);transition-property:color,background-color,border-color,opacity,box-shadow,transform;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:var(--fallback-bc,oklch(var(--bc)/1));background-color:oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity));--tw-bg-opacity: 1;--tw-border-opacity: 1}.btn-disabled,.btn[disabled],.btn:disabled{pointer-events:none}.btn-square{height:3rem;width:3rem;padding:0}.btn-circle{height:3rem;width:3rem;border-radius:9999px;padding:0}:where(.btn:is(input[type=checkbox])),:where(.btn:is(input[type=radio])){width:auto;-webkit-appearance:none;-moz-appearance:none;appearance:none}.btn:is(input[type=checkbox]):after,.btn:is(input[type=radio]):after{--tw-content: attr(aria-label);content:var(--tw-content)}.card{position:relative;display:flex;flex-direction:column;border-radius:var(--rounded-box, 1rem)}.card:focus{outline:2px solid transparent;outline-offset:2px}.card-body{display:flex;flex:1 1 auto;flex-direction:column;padding:var(--padding-card, 2rem);gap:.5rem}.card-body :where(p){flex-grow:1}.card figure{display:flex;align-items:center;justify-content:center}.card.image-full{display:grid}.card.image-full:before{position:relative;content:"";z-index:10;border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));opacity:.75}.card.image-full:before,.card.image-full>*{grid-column-start:1;grid-row-start:1}.card.image-full>figure img{height:100%;-o-object-fit:cover;object-fit:cover}.card.image-full>.card-body{position:relative;z-index:20;--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.checkbox{flex-shrink:0;--chkbg: var(--fallback-bc,oklch(var(--bc)/1));--chkfg: var(--fallback-b1,oklch(var(--b1)/1));height:1.5rem;width:1.5rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));--tw-border-opacity: .2}.drawer{position:relative;display:grid;grid-auto-columns:max-content auto;width:100%}.drawer-content{grid-column-start:2;grid-row-start:1;min-width:0px}.drawer-side{pointer-events:none;position:fixed;inset-inline-start:0px;top:0;grid-column-start:1;grid-row-start:1;display:grid;width:100%;grid-template-columns:repeat(1,minmax(0,1fr));grid-template-rows:repeat(1,minmax(0,1fr));align-items:flex-start;justify-items:start;overflow-x:hidden;overflow-y:hidden;overscroll-behavior:contain;height:100vh;height:100dvh}.drawer-side>.drawer-overlay{position:sticky;top:0;place-self:stretch;cursor:pointer;background-color:transparent;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s}.drawer-side>*{grid-column-start:1;grid-row-start:1}.drawer-side>*:not(.drawer-overlay){transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.3s;will-change:transform;transform:translate(-100%)}[dir=rtl] .drawer-side>*:not(.drawer-overlay){transform:translate(100%)}.drawer-toggle{position:fixed;height:0px;width:0px;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}.drawer-toggle:checked~.drawer-side{pointer-events:auto;visibility:visible;overflow-y:auto}.drawer-toggle:checked~.drawer-side>*:not(.drawer-overlay){transform:translate(0)}.drawer-end .drawer-toggle~.drawer-content{grid-column-start:1}.drawer-end .drawer-toggle~.drawer-side{grid-column-start:2;justify-items:end}.drawer-end .drawer-toggle~.drawer-side>*:not(.drawer-overlay){transform:translate(100%)}[dir=rtl] .drawer-end .drawer-toggle~.drawer-side>*:not(.drawer-overlay){transform:translate(-100%)}.drawer-end .drawer-toggle:checked~.drawer-side>*:not(.drawer-overlay){transform:translate(0)}.dropdown{position:relative;display:inline-block}.dropdown>*:not(summary):focus{outline:2px solid transparent;outline-offset:2px}.dropdown .dropdown-content{position:absolute}.dropdown:is(:not(details)) .dropdown-content{visibility:hidden;opacity:0;transform-origin:top;--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s}.dropdown-end .dropdown-content{inset-inline-end:0px}.dropdown-left .dropdown-content{bottom:auto;inset-inline-end:100%;top:0;transform-origin:right}.dropdown-right .dropdown-content{bottom:auto;inset-inline-start:100%;top:0;transform-origin:left}.dropdown-bottom .dropdown-content{bottom:auto;top:100%;transform-origin:top}.dropdown-top .dropdown-content{bottom:100%;top:auto;transform-origin:bottom}.dropdown-end.dropdown-right .dropdown-content,.dropdown-end.dropdown-left .dropdown-content{bottom:0;top:auto}.dropdown.dropdown-open .dropdown-content,.dropdown:not(.dropdown-hover):focus .dropdown-content,.dropdown:focus-within .dropdown-content{visibility:visible;opacity:1}@media (hover: hover){.dropdown.dropdown-hover:hover .dropdown-content{visibility:visible;opacity:1}.btm-nav>*.disabled:hover,.btm-nav>*[disabled]:hover{pointer-events:none;--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btn:hover{--tw-border-opacity: 1;border-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn:hover{background-color:color-mix(in oklab,oklch(var(--btn-color, var(--b2)) / var(--tw-bg-opacity, 1)) 90%,black);border-color:color-mix(in oklab,oklch(var(--btn-color, var(--b2)) / var(--tw-border-opacity, 1)) 90%,black)}}@supports not (color: oklch(0% 0 0)){.btn:hover{background-color:var(--btn-color, var(--fallback-b2));border-color:var(--btn-color, var(--fallback-b2))}}.btn.glass:hover{--glass-opacity: 25%;--glass-border-opacity: 15%}.btn-ghost:hover{border-color:transparent}@supports (color: oklch(0% 0 0)){.btn-ghost:hover{background-color:var(--fallback-bc,oklch(var(--bc)/.2))}}.btn-outline.btn-primary:hover{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-primary:hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}.btn-outline.btn-success:hover{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-success:hover{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black)}}.btn-outline.btn-error:hover{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-error:hover{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black)}}.btn-disabled:hover,.btn[disabled]:hover,.btn:disabled:hover{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}@supports (color: color-mix(in oklab,black,black)){.btn:is(input[type=checkbox]:checked):hover,.btn:is(input[type=radio]:checked):hover{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}}.dropdown.dropdown-hover:hover .dropdown-content{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(.active,.btn):hover,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{cursor:pointer;outline:2px solid transparent;outline-offset:2px}@supports (color: oklch(0% 0 0)){:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(.active,.btn):hover,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(.active,.btn):hover{background-color:var(--fallback-bc,oklch(var(--bc)/.1))}}}.dropdown:is(details) summary::-webkit-details-marker{display:none}.footer{display:grid;width:100%;grid-auto-flow:row;place-items:start;-moz-column-gap:1rem;column-gap:1rem;row-gap:2.5rem;font-size:.875rem;line-height:1.25rem}.footer>*{display:grid;place-items:start;gap:.5rem}.footer-center{place-items:center;text-align:center}.footer-center>*{place-items:center}@media (min-width: 48rem){.footer{grid-auto-flow:column}.footer-center{grid-auto-flow:row dense}}.form-control{display:flex;flex-direction:column}.label{display:flex;-webkit-user-select:none;-moz-user-select:none;user-select:none;align-items:center;justify-content:space-between;padding:.5rem .25rem}.hero{display:grid;width:100%;place-items:center;background-size:cover;background-position:center}.hero>*{grid-column-start:1;grid-row-start:1}.hero-content{z-index:0;display:flex;align-items:center;justify-content:center;max-width:80rem;gap:1rem;padding:1rem}.indicator{position:relative;display:inline-flex;width:-moz-max-content;width:max-content}.indicator :where(.indicator-item){z-index:1;position:absolute;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));white-space:nowrap}.input{flex-shrink:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:3rem;padding-left:1rem;padding-right:1rem;font-size:1rem;line-height:2;line-height:1.5rem;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.input[type=number]::-webkit-inner-spin-button,.input-md[type=number]::-webkit-inner-spin-button{margin-top:-1rem;margin-bottom:-1rem;margin-inline-end:-1rem}.join{display:inline-flex;align-items:stretch;border-radius:var(--rounded-btn, .5rem)}.join :where(.join-item){border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}.join .join-item:not(:first-child):not(:last-child),.join *:not(:first-child):not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0;border-end-start-radius:0;border-start-start-radius:0}.join .join-item:first-child:not(:last-child),.join *:first-child:not(:last-child) .join-item{border-start-end-radius:0;border-end-end-radius:0}.join .dropdown .join-item:first-child:not(:last-child),.join *:first-child:not(:last-child) .dropdown .join-item{border-start-end-radius:inherit;border-end-end-radius:inherit}.join :where(.join-item:first-child:not(:last-child)),.join :where(*:first-child:not(:last-child) .join-item){border-end-start-radius:inherit;border-start-start-radius:inherit}.join .join-item:last-child:not(:first-child),.join *:last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0}.join :where(.join-item:last-child:not(:first-child)),.join :where(*:last-child:not(:first-child) .join-item){border-start-end-radius:inherit;border-end-end-radius:inherit}@supports not selector(:has(*)){:where(.join *){border-radius:inherit}}@supports selector(:has(*)){:where(.join *:has(.join-item)){border-radius:inherit}}.link{cursor:pointer;text-decoration-line:underline}.link-hover{text-decoration-line:none}.menu{display:flex;flex-direction:column;flex-wrap:wrap;font-size:.875rem;line-height:1.25rem;padding:.5rem}.menu :where(li ul){position:relative;white-space:nowrap;margin-inline-start:1rem;padding-inline-start:.5rem}.menu :where(li:not(.menu-title)>*:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){display:grid;grid-auto-flow:column;align-content:flex-start;align-items:center;gap:.5rem;grid-auto-columns:minmax(auto,max-content) auto max-content;-webkit-user-select:none;-moz-user-select:none;user-select:none}.menu li.disabled{cursor:not-allowed;-webkit-user-select:none;-moz-user-select:none;user-select:none;color:var(--fallback-bc,oklch(var(--bc)/.3))}.menu :where(li>.menu-dropdown:not(.menu-dropdown-show)){display:none}:where(.menu li){position:relative;display:flex;flex-shrink:0;flex-direction:column;flex-wrap:wrap;align-items:stretch}:where(.menu li) .badge{justify-self:end}.mockup-code{position:relative;overflow:hidden;overflow-x:auto;min-width:18rem;border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));padding-top:1.25rem;padding-bottom:1.25rem;--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)));direction:ltr}.mockup-code pre[data-prefix]:before{content:attr(data-prefix);display:inline-block;text-align:right;width:2rem;opacity:.5}.modal{pointer-events:none;position:fixed;top:0;right:0;bottom:0;left:0;margin:0;display:grid;height:100%;max-height:none;width:100%;max-width:none;justify-items:center;padding:0;opacity:0;overscroll-behavior:contain;z-index:999;background-color:transparent;color:inherit;transition-duration:.2s;transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:transform,opacity,visibility;overflow-y:hidden}:where(.modal){align-items:center}.modal-box{max-height:calc(100vh - 5em);grid-column-start:1;grid-row-start:1;width:91.666667%;max-width:32rem;--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem);border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));padding:1.5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;box-shadow:#00000040 0 25px 50px -12px;overflow-y:auto;overscroll-behavior:contain}.modal-open,.modal:target,.modal-toggle:checked+.modal,.modal[open]{pointer-events:auto;visibility:visible;opacity:1}.modal-action{display:flex;margin-top:1.5rem;justify-content:flex-end}.modal-toggle{position:fixed;height:0px;width:0px;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0}:root:has(:is(.modal-open,.modal:target,.modal-toggle:checked+.modal,.modal[open])){overflow:hidden;scrollbar-gutter:stable}.navbar{display:flex;align-items:center;padding:var(--navbar-padding, .5rem);min-height:4rem;width:100%}:where(.navbar>*:not(script,style)){display:inline-flex;align-items:center}.navbar-start{width:50%;justify-content:flex-start}.navbar-center{flex-shrink:0}.navbar-end{width:50%;justify-content:flex-end}.progress{position:relative;width:100%;-webkit-appearance:none;-moz-appearance:none;appearance:none;overflow:hidden;height:.5rem;border-radius:var(--rounded-box, 1rem);background-color:var(--fallback-bc,oklch(var(--bc)/.2))}.select{display:inline-flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:3rem;min-height:3rem;padding-left:1rem;padding-right:2.5rem;font-size:.875rem;line-height:1.25rem;line-height:2;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)));background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 20px) calc(1px + 50%),calc(100% - 16.1px) calc(1px + 50%);background-size:4px 4px,4px 4px;background-repeat:no-repeat}.select[multiple]{height:auto}.swap{position:relative;display:inline-grid;-webkit-user-select:none;-moz-user-select:none;user-select:none;place-content:center;cursor:pointer}.swap>*{grid-column-start:1;grid-row-start:1;transition-duration:.3s;transition-timing-function:cubic-bezier(0,0,.2,1);transition-property:transform,opacity}.swap input{-webkit-appearance:none;-moz-appearance:none;appearance:none}.swap .swap-on,.swap .swap-indeterminate,.swap input:indeterminate~.swap-on{opacity:0}.swap input:checked~.swap-off,.swap-active .swap-off,.swap input:indeterminate~.swap-off{opacity:0}.swap input:checked~.swap-on,.swap-active .swap-on,.swap input:indeterminate~.swap-indeterminate{opacity:1}.table{position:relative;width:100%;border-radius:var(--rounded-box, 1rem);text-align:left;font-size:.875rem;line-height:1.25rem}.table :where(.table-pin-rows thead tr){position:sticky;top:0;z-index:1;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table :where(.table-pin-rows tfoot tr){position:sticky;bottom:0;z-index:1;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.table :where(.table-pin-cols tr th){position:sticky;left:0;right:0;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.textarea{min-height:3rem;flex-shrink:1;padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem;line-height:2;border-radius:var(--rounded-btn, .5rem);border-width:1px;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.toast{position:fixed;display:flex;min-width:-moz-fit-content;min-width:fit-content;flex-direction:column;white-space:nowrap;gap:.5rem;padding:1rem}.toggle{flex-shrink:0;--tglbg: var(--fallback-b1,oklch(var(--b1)/1));--handleoffset: 1.5rem;--handleoffsetcalculator: calc(var(--handleoffset) * -1);--togglehandleborder: 0 0;height:1.5rem;width:3rem;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:var(--rounded-badge, 1.9rem);border-width:1px;border-color:currentColor;background-color:currentColor;color:var(--fallback-bc,oklch(var(--bc)/.5));transition:background,box-shadow var(--animation-input, .2s) ease-out;box-shadow:var(--handleoffsetcalculator) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset,var(--togglehandleborder)}.alert-error{border-color:var(--fallback-er,oklch(var(--er)/.2));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));--alert-bg: var(--fallback-er,oklch(var(--er)/1));--alert-bg-mix: var(--fallback-b1,oklch(var(--b1)/1))}.avatar-group :where(.avatar){overflow:hidden;border-radius:9999px;border-width:4px;--tw-border-opacity: 1;border-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-border-opacity)))}.badge-primary{--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.badge-info{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-in,oklch(var(--in)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-inc,oklch(var(--inc)/var(--tw-text-opacity)))}.badge-success{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.badge-error{border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-er,oklch(var(--er)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.badge-outline.badge-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}.badge-outline.badge-info{--tw-text-opacity: 1;color:var(--fallback-in,oklch(var(--in)/var(--tw-text-opacity)))}.badge-outline.badge-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}.badge-outline.badge-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}.btm-nav>*:where(.active){border-top-width:2px;--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.btm-nav>*.disabled,.btm-nav>*[disabled]{pointer-events:none;--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btm-nav>* .label{font-size:1rem;line-height:1.5rem}@media (prefers-reduced-motion: no-preference){.btn{animation:button-pop var(--animation-btn, .25s) ease-out}}.btn:active:hover,.btn:active:focus{animation:button-pop 0s ease-out;transform:scale(var(--btn-focus-scale, .97))}@supports not (color: oklch(0% 0 0)){.btn{background-color:var(--btn-color, var(--fallback-b2));border-color:var(--btn-color, var(--fallback-b2))}.btn-primary{--btn-color: var(--fallback-p)}.btn-success{--btn-color: var(--fallback-su)}.btn-error{--btn-color: var(--fallback-er)}}@supports (color: color-mix(in oklab,black,black)){.btn-outline.btn-primary.btn-active{background-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-p,oklch(var(--p)/1)) 90%,black)}.btn-outline.btn-success.btn-active{background-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-su,oklch(var(--su)/1)) 90%,black)}.btn-outline.btn-error.btn-active{background-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black);border-color:color-mix(in oklab,var(--fallback-er,oklch(var(--er)/1)) 90%,black)}}.btn:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px}.btn-primary{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)));outline-color:var(--fallback-p,oklch(var(--p)/1))}@supports (color: oklch(0% 0 0)){.btn-primary{--btn-color: var(--p)}.btn-success{--btn-color: var(--su)}.btn-error{--btn-color: var(--er)}}.btn-success{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)));outline-color:var(--fallback-su,oklch(var(--su)/1))}.btn-error{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)));outline-color:var(--fallback-er,oklch(var(--er)/1))}.btn.glass{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:currentColor}.btn.glass.btn-active{--glass-opacity: 25%;--glass-border-opacity: 15%}.btn-ghost{border-width:1px;border-color:transparent;background-color:transparent;color:currentColor;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);outline-color:currentColor}.btn-ghost.btn-active{border-color:transparent;background-color:var(--fallback-bc,oklch(var(--bc)/.2))}.btn-outline.btn-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}.btn-outline.btn-primary.btn-active{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.btn-outline.btn-success{--tw-text-opacity: 1;color:var(--fallback-su,oklch(var(--su)/var(--tw-text-opacity)))}.btn-outline.btn-success.btn-active{--tw-text-opacity: 1;color:var(--fallback-suc,oklch(var(--suc)/var(--tw-text-opacity)))}.btn-outline.btn-error{--tw-text-opacity: 1;color:var(--fallback-er,oklch(var(--er)/var(--tw-text-opacity)))}.btn-outline.btn-error.btn-active{--tw-text-opacity: 1;color:var(--fallback-erc,oklch(var(--erc)/var(--tw-text-opacity)))}.btn.btn-disabled,.btn[disabled],.btn:disabled{--tw-border-opacity: 0;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-bg-opacity: .2;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));--tw-text-opacity: .2}.btn:is(input[type=checkbox]:checked),.btn:is(input[type=radio]:checked){--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.btn:is(input[type=checkbox]:checked):focus-visible,.btn:is(input[type=radio]:checked):focus-visible{outline-color:var(--fallback-p,oklch(var(--p)/1))}@keyframes button-pop{0%{transform:scale(var(--btn-focus-scale, .98))}40%{transform:scale(1.02)}to{transform:scale(1)}}.card :where(figure:first-child){overflow:hidden;border-start-start-radius:inherit;border-start-end-radius:inherit;border-end-start-radius:unset;border-end-end-radius:unset}.card :where(figure:last-child){overflow:hidden;border-start-start-radius:unset;border-start-end-radius:unset;border-end-start-radius:inherit;border-end-end-radius:inherit}.card:focus-visible{outline:2px solid currentColor;outline-offset:2px}.card.bordered{border-width:1px;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.card.compact .card-body{padding:1rem;font-size:.875rem;line-height:1.25rem}.card.image-full :where(figure){overflow:hidden;border-radius:inherit}.checkbox:focus{box-shadow:none}.checkbox:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.checkbox:disabled{border-width:0px;cursor:not-allowed;border-color:transparent;--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.2}.checkbox:checked,.checkbox[aria-checked=true]{background-repeat:no-repeat;animation:checkmark var(--animation-input, .2s) ease-out;background-color:var(--chkbg);background-image:linear-gradient(-45deg,transparent 65%,var(--chkbg) 65.99%),linear-gradient(45deg,transparent 75%,var(--chkbg) 75.99%),linear-gradient(-45deg,var(--chkbg) 40%,transparent 40.99%),linear-gradient(45deg,var(--chkbg) 30%,var(--chkfg) 30.99%,var(--chkfg) 40%,transparent 40.99%),linear-gradient(-45deg,var(--chkfg) 50%,var(--chkbg) 50.99%)}.checkbox:indeterminate{--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));background-repeat:no-repeat;animation:checkmark var(--animation-input, .2s) ease-out;background-image:linear-gradient(90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(-90deg,transparent 80%,var(--chkbg) 80%),linear-gradient(0deg,var(--chkbg) 43%,var(--chkfg) 43%,var(--chkfg) 57%,var(--chkbg) 57%)}@keyframes checkmark{0%{background-position-y:5px}50%{background-position-y:-2px}to{background-position-y:0}}.drawer-toggle:checked~.drawer-side>.drawer-overlay{background-color:#0006}.drawer-toggle:focus-visible~.drawer-content label.drawer-button{outline-style:solid;outline-width:2px;outline-offset:2px}.dropdown.dropdown-open .dropdown-content,.dropdown:focus .dropdown-content,.dropdown:focus-within .dropdown-content{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.label-text{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.label-text-alt{font-size:.75rem;line-height:1rem;--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.input input{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));background-color:transparent}.input input:focus{outline:2px solid transparent;outline-offset:2px}.input[list]::-webkit-calendar-picker-indicator{line-height:1em}.input-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.input:focus,.input:focus-within{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.input-primary{--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)))}.input-primary:focus,.input-primary:focus-within{--tw-border-opacity: 1;border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));outline-color:var(--fallback-p,oklch(var(--p)/1))}.input-warning{--tw-border-opacity: 1;border-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-border-opacity)))}.input-warning:focus,.input-warning:focus-within{--tw-border-opacity: 1;border-color:var(--fallback-wa,oklch(var(--wa)/var(--tw-border-opacity)));outline-color:var(--fallback-wa,oklch(var(--wa)/1))}.input:has(>input[disabled]),.input-disabled,.input:disabled,.input[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.input:has(>input[disabled])::-moz-placeholder,.input-disabled::-moz-placeholder,.input:disabled::-moz-placeholder,.input[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.input:has(>input[disabled])::placeholder,.input-disabled::placeholder,.input:disabled::placeholder,.input[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.input:has(>input[disabled])>input[disabled]{cursor:not-allowed}.input::-webkit-date-and-time-value{text-align:inherit}.join>:where(*:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}.link:focus{outline:2px solid transparent;outline-offset:2px}.link:focus-visible{outline:2px solid currentColor;outline-offset:2px}.loading{pointer-events:none;display:inline-block;aspect-ratio:1 / 1;width:1.5rem;background-color:currentColor;-webkit-mask-size:100%;mask-size:100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;-webkit-mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='%23000' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E.spinner_V8m1%7Btransform-origin:center;animation:spinner_zKoa 2s linear infinite%7D.spinner_V8m1 circle%7Bstroke-linecap:round;animation:spinner_YpZS 1.5s ease-out infinite%7D%40keyframes spinner_zKoa%7B100%25%7Btransform:rotate(360deg)%7D%7D%40keyframes spinner_YpZS%7B0%25%7Bstroke-dasharray:0 150;stroke-dashoffset:0%7D47.5%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-16%7D95%25%2C100%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-59%7D%7D%3C%2Fstyle%3E%3Cg class='spinner_V8m1'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3'%3E%3C%2Fcircle%3E%3C%2Fg%3E%3C%2Fsvg%3E");mask-image:url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='%23000' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cstyle%3E.spinner_V8m1%7Btransform-origin:center;animation:spinner_zKoa 2s linear infinite%7D.spinner_V8m1 circle%7Bstroke-linecap:round;animation:spinner_YpZS 1.5s ease-out infinite%7D%40keyframes spinner_zKoa%7B100%25%7Btransform:rotate(360deg)%7D%7D%40keyframes spinner_YpZS%7B0%25%7Bstroke-dasharray:0 150;stroke-dashoffset:0%7D47.5%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-16%7D95%25%2C100%25%7Bstroke-dasharray:42 150;stroke-dashoffset:-59%7D%7D%3C%2Fstyle%3E%3Cg class='spinner_V8m1'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3'%3E%3C%2Fcircle%3E%3C%2Fg%3E%3C%2Fsvg%3E")}:where(.menu li:empty){--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;margin:.5rem 1rem;height:1px}.menu :where(li ul):before{position:absolute;bottom:.75rem;inset-inline-start:0px;top:.75rem;width:1px;--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)));opacity:.1;content:""}.menu :where(li:not(.menu-title)>*:not(ul,details,.menu-title,.btn)),.menu :where(li:not(.menu-title)>details>summary:not(.menu-title)){border-radius:var(--rounded-btn, .5rem);padding:.5rem 1rem;text-align:start;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-timing-function:cubic-bezier(0,0,.2,1);transition-duration:.2s;text-wrap:balance}:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(summary,.active,.btn).focus,:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):not(summary,.active,.btn):focus,:where(.menu li:not(.menu-title,.disabled)>*:not(ul,details,.menu-title)):is(summary):not(.active,.btn):focus-visible,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn).focus,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):not(summary,.active,.btn):focus,:where(.menu li:not(.menu-title,.disabled)>details>summary:not(.menu-title)):is(summary):not(.active,.btn):focus-visible{cursor:pointer;background-color:var(--fallback-bc,oklch(var(--bc)/.1));--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));outline:2px solid transparent;outline-offset:2px}.menu li>*:not(ul,.menu-title,details,.btn):active,.menu li>*:not(ul,.menu-title,details,.btn).active,.menu li>details>summary:active{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.menu :where(li>details>summary)::-webkit-details-marker{display:none}.menu :where(li>details>summary):after,.menu :where(li>.menu-dropdown-toggle):after{justify-self:end;display:block;margin-top:-.5rem;height:.5rem;width:.5rem;transform:rotate(45deg);transition-property:transform,margin-top;transition-duration:.3s;transition-timing-function:cubic-bezier(.4,0,.2,1);content:"";transform-origin:75% 75%;box-shadow:2px 2px;pointer-events:none}.menu :where(li>details[open]>summary):after,.menu :where(li>.menu-dropdown-toggle.menu-dropdown-show):after{transform:rotate(225deg);margin-top:0}.menu-title{padding:.5rem 1rem;font-size:.875rem;line-height:1.25rem;font-weight:700;color:var(--fallback-bc,oklch(var(--bc)/.4))}.mockup-code:before{content:"";margin-bottom:1rem;display:block;height:.75rem;width:.75rem;border-radius:9999px;opacity:.3;box-shadow:1.4em 0,2.8em 0,4.2em 0}.mockup-code pre{padding-right:1.25rem}.mockup-code pre:before{content:"";margin-right:2ch}.mockup-phone .display{overflow:hidden;border-radius:40px;margin-top:-25px}.mockup-browser .mockup-browser-toolbar .input{position:relative;margin-left:auto;margin-right:auto;display:block;height:1.75rem;width:24rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));padding-left:2rem;direction:ltr}.mockup-browser .mockup-browser-toolbar .input:before{content:"";position:absolute;left:.5rem;top:50%;aspect-ratio:1 / 1;height:.75rem;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:2px;border-color:currentColor;opacity:.6}.mockup-browser .mockup-browser-toolbar .input:after{content:"";position:absolute;left:1.25rem;top:50%;height:.5rem;--tw-translate-y: 25%;--tw-rotate: -45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-radius:9999px;border-width:1px;border-color:currentColor;opacity:.6}.modal:not(dialog:not(.modal-open)),.modal::backdrop{background-color:#0006;animation:modal-pop .2s ease-out}.modal-open .modal-box,.modal-toggle:checked+.modal .modal-box,.modal:target .modal-box,.modal[open] .modal-box{--tw-translate-y: 0px;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.modal-action>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}@keyframes modal-pop{0%{opacity:0}}.progress::-moz-progress-bar{border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)))}.progress-primary::-moz-progress-bar{border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)))}.progress:indeterminate{--progress-color: var(--fallback-bc,oklch(var(--bc)/1));background-image:repeating-linear-gradient(90deg,var(--progress-color) -1%,var(--progress-color) 10%,transparent 10%,transparent 90%);background-size:200%;background-position-x:15%;animation:progress-loading 5s ease-in-out infinite}.progress-primary:indeterminate{--progress-color: var(--fallback-p,oklch(var(--p)/1))}.progress::-webkit-progress-bar{border-radius:var(--rounded-box, 1rem);background-color:transparent}.progress::-webkit-progress-value{border-radius:var(--rounded-box, 1rem);--tw-bg-opacity: 1;background-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-bg-opacity)))}.progress-primary::-webkit-progress-value{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)))}.progress:indeterminate::-moz-progress-bar{background-color:transparent;background-image:repeating-linear-gradient(90deg,var(--progress-color) -1%,var(--progress-color) 10%,transparent 10%,transparent 90%);background-size:200%;background-position-x:15%;animation:progress-loading 5s ease-in-out infinite}@keyframes progress-loading{50%{background-position-x:-115%}}@keyframes radiomark{0%{box-shadow:0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 12px var(--fallback-b1,oklch(var(--b1)/1)) inset}50%{box-shadow:0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 3px var(--fallback-b1,oklch(var(--b1)/1)) inset}to{box-shadow:0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset,0 0 0 4px var(--fallback-b1,oklch(var(--b1)/1)) inset}}@keyframes rating-pop{0%{transform:translateY(-.125em)}40%{transform:translateY(-.125em)}to{transform:translateY(0)}}.select-bordered{border-color:var(--fallback-bc,oklch(var(--bc)/.2))}.select:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.select-disabled,.select:disabled,.select[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.select-disabled::-moz-placeholder,.select:disabled::-moz-placeholder,.select[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.select-disabled::placeholder,.select:disabled::placeholder,.select[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.select-multiple,.select[multiple],.select[size].select:not([size="1"]){background-image:none;padding-right:1rem}[dir=rtl] .select{background-position:calc(0% + 12px) calc(1px + 50%),calc(0% + 16px) calc(1px + 50%)}@keyframes skeleton{0%{background-position:150%}to{background-position:-50%}}:is([dir=rtl] .table){text-align:right}.table :where(th,td){padding:.75rem 1rem;vertical-align:middle}.table tr.active,.table tr.active:nth-child(2n),.table-zebra tbody tr:nth-child(2n){--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.table-zebra tr.active,.table-zebra tr.active:nth-child(2n),.table-zebra-zebra tbody tr:nth-child(2n){--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}.table :where(thead tr,tbody tr:not(:last-child),tbody tr:first-child:last-child){border-bottom-width:1px;--tw-border-opacity: 1;border-bottom-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.table :where(thead,tfoot){white-space:nowrap;font-size:.75rem;line-height:1rem;font-weight:700;color:var(--fallback-bc,oklch(var(--bc)/.6))}.table :where(tfoot){border-top-width:1px;--tw-border-opacity: 1;border-top-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.textarea:focus{box-shadow:none;border-color:var(--fallback-bc,oklch(var(--bc)/.2));outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.textarea-disabled,.textarea:disabled,.textarea[disabled]{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)));--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)));color:var(--fallback-bc,oklch(var(--bc)/.4))}.textarea-disabled::-moz-placeholder,.textarea:disabled::-moz-placeholder,.textarea[disabled]::-moz-placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.textarea-disabled::placeholder,.textarea:disabled::placeholder,.textarea[disabled]::placeholder{color:var(--fallback-bc,oklch(var(--bc)/var(--tw-placeholder-opacity)));--tw-placeholder-opacity: .2}.toast>*{animation:toast-pop .25s ease-out}@keyframes toast-pop{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}[dir=rtl] .toggle{--handleoffsetcalculator: calc(var(--handleoffset) * 1)}.toggle:focus-visible{outline-style:solid;outline-width:2px;outline-offset:2px;outline-color:var(--fallback-bc,oklch(var(--bc)/.2))}.toggle:hover{background-color:currentColor}.toggle:checked,.toggle[aria-checked=true]{background-image:none;--handleoffsetcalculator: var(--handleoffset);--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}[dir=rtl] .toggle:checked,[dir=rtl] .toggle[aria-checked=true]{--handleoffsetcalculator: calc(var(--handleoffset) * -1)}.toggle:indeterminate{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)));box-shadow:calc(var(--handleoffset) / 2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset) / -2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset}[dir=rtl] .toggle:indeterminate{box-shadow:calc(var(--handleoffset) / 2) 0 0 2px var(--tglbg) inset,calc(var(--handleoffset) / -2) 0 0 2px var(--tglbg) inset,0 0 0 2px var(--tglbg) inset}.toggle-primary:focus-visible{outline-color:var(--fallback-p,oklch(var(--p)/1))}.toggle-primary:checked,.toggle-primary[aria-checked=true]{border-color:var(--fallback-p,oklch(var(--p)/var(--tw-border-opacity)));--tw-border-opacity: .1;--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)));--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.toggle:disabled{cursor:not-allowed;--tw-border-opacity: 1;border-color:var(--fallback-bc,oklch(var(--bc)/var(--tw-border-opacity)));background-color:transparent;opacity:.3;--togglehandleborder: 0 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset, var(--handleoffsetcalculator) 0 0 3px var(--fallback-bc,oklch(var(--bc)/1)) inset}.badge-xs{height:.75rem;font-size:.75rem;line-height:.75rem;padding-left:.313rem;padding-right:.313rem}.btm-nav-xs>*:where(.active){border-top-width:1px}.btm-nav-sm>*:where(.active){border-top-width:2px}.btm-nav-md>*:where(.active){border-top-width:2px}.btm-nav-lg>*:where(.active){border-top-width:4px}.btn-square:where(.btn-xs){height:1.5rem;width:1.5rem;padding:0}.btn-square:where(.btn-sm){height:2rem;width:2rem;padding:0}.btn-square:where(.btn-md){height:3rem;width:3rem;padding:0}.btn-square:where(.btn-lg){height:4rem;width:4rem;padding:0}.btn-circle:where(.btn-xs){height:1.5rem;width:1.5rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-sm){height:2rem;width:2rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-md){height:3rem;width:3rem;border-radius:9999px;padding:0}.btn-circle:where(.btn-lg){height:4rem;width:4rem;border-radius:9999px;padding:0}.drawer-open>.drawer-toggle{display:none}.drawer-open>.drawer-toggle~.drawer-side{pointer-events:auto;visibility:visible;position:sticky;display:block;width:auto;overscroll-behavior:auto}.drawer-open>.drawer-toggle~.drawer-side>*:not(.drawer-overlay){transform:translate(0)}[dir=rtl] .drawer-open>.drawer-toggle~.drawer-side>*:not(.drawer-overlay){transform:translate(0)}.drawer-open>.drawer-toggle:checked~.drawer-side{pointer-events:auto;visibility:visible}.drawer-open>.drawer-side{overflow-y:auto}html:has(.drawer-toggle:checked){overflow-y:hidden;scrollbar-gutter:stable}.indicator :where(.indicator-item){bottom:auto;inset-inline-end:0px;inset-inline-start:auto;top:0;--tw-translate-y: -50%;--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:is([dir=rtl] .indicator :where(.indicator-item)){--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-start){inset-inline-end:auto;inset-inline-start:0px;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:is([dir=rtl] .indicator :where(.indicator-item.indicator-start)){--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-center){inset-inline-end:50%;inset-inline-start:50%;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:is([dir=rtl] .indicator :where(.indicator-item.indicator-center)){--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-end){inset-inline-end:0px;inset-inline-start:auto;--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:is([dir=rtl] .indicator :where(.indicator-item.indicator-end)){--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-bottom){bottom:0;top:auto;--tw-translate-y: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-middle){bottom:50%;top:50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.indicator :where(.indicator-item.indicator-top){bottom:auto;top:0;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.join.join-vertical{flex-direction:column}.join.join-vertical .join-item:first-child:not(:last-child),.join.join-vertical *:first-child:not(:last-child) .join-item{border-end-start-radius:0;border-end-end-radius:0;border-start-start-radius:inherit;border-start-end-radius:inherit}.join.join-vertical .join-item:last-child:not(:first-child),.join.join-vertical *:last-child:not(:first-child) .join-item{border-start-start-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-end-end-radius:inherit}.join.join-horizontal{flex-direction:row}.join.join-horizontal .join-item:first-child:not(:last-child),.join.join-horizontal *:first-child:not(:last-child) .join-item{border-end-end-radius:0;border-start-end-radius:0;border-end-start-radius:inherit;border-start-start-radius:inherit}.join.join-horizontal .join-item:last-child:not(:first-child),.join.join-horizontal *:last-child:not(:first-child) .join-item{border-end-start-radius:0;border-start-start-radius:0;border-end-end-radius:inherit;border-start-end-radius:inherit}:where(.toast){bottom:0;inset-inline-end:0px;inset-inline-start:auto;top:auto;--tw-translate-x: 0px;--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-start){inset-inline-end:auto;inset-inline-start:0px;--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-center){inset-inline-end:50%;inset-inline-start:50%;--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:is([dir=rtl] .toast:where(.toast-center)){--tw-translate-x: 50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-end){inset-inline-end:0px;inset-inline-start:auto;--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-bottom){bottom:0;top:auto;--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-middle){bottom:auto;top:50%;--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.toast:where(.toast-top){bottom:auto;top:0;--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.avatar.online:before{content:"";position:absolute;z-index:10;display:block;border-radius:9999px;--tw-bg-opacity: 1;background-color:var(--fallback-su,oklch(var(--su)/var(--tw-bg-opacity)));outline-style:solid;outline-width:2px;outline-color:var(--fallback-b1,oklch(var(--b1)/1));width:15%;height:15%;top:7%;right:7%}.avatar.offline:before{content:"";position:absolute;z-index:10;display:block;border-radius:9999px;--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)));outline-style:solid;outline-width:2px;outline-color:var(--fallback-b1,oklch(var(--b1)/1));width:15%;height:15%;top:7%;right:7%}.card-compact .card-body{padding:1rem;font-size:.875rem;line-height:1.25rem}.card-normal .card-body{padding:var(--padding-card, 2rem);font-size:1rem;line-height:1.5rem}.drawer-open>.drawer-toggle~.drawer-side>.drawer-overlay{cursor:default;background-color:transparent}.join.join-vertical>:where(*:not(:first-child)){margin-left:0;margin-right:0;margin-top:-1px}.join.join-horizontal>:where(*:not(:first-child)){margin-top:0;margin-bottom:0;margin-inline-start:-1px}.menu-xs .menu-title{padding:.25rem .5rem}.menu-sm .menu-title{padding:.5rem .75rem}.menu-md .menu-title{padding:.5rem 1rem}.menu-lg .menu-title{padding:.75rem 1.5rem}.modal-top :where(.modal-box){width:100%;max-width:none;--tw-translate-y: -2.5rem;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem);border-top-left-radius:0;border-top-right-radius:0}.modal-middle :where(.modal-box){width:91.666667%;max-width:32rem;--tw-translate-y: 0px;--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem)}.modal-bottom :where(.modal-box){width:100%;max-width:none;--tw-translate-y: 2.5rem;--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem);border-bottom-right-radius:0;border-bottom-left-radius:0}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.top-px{top:1px}.z-10{z-index:10}.z-50{z-index:50}.col-span-5{grid-column:span 5 / span 5}.row-span-3{grid-row:span 3 / span 3}.row-start-1{grid-row-start:1}.m-1{margin:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-6{margin-left:1.5rem;margin-right:1.5rem}.mx-auto{margin-left:auto;margin-right:auto}.-mt-px{margin-top:-1px}.mb-0{margin-bottom:0}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-0{margin-left:0}.ml-1{margin-left:.25rem}.ml-4{margin-left:1rem}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mr-4{margin-right:1rem}.mr-auto{margin-right:auto}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-16{margin-top:4rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-16{height:4rem}.h-3{height:.75rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-\[70vh\]{height:70vh}.h-full{height:100%}.h-screen{height:100vh}.max-h-96{max-height:24rem}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-11\/12{width:91.666667%}.w-16{width:4rem}.w-2{width:.5rem}.w-3{width:.75rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-52{width:13rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-80{width:20rem}.w-auto{width:auto}.w-full{width:100%}.min-w-0{min-width:0px}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-7xl{max-width:80rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-flow-col{grid-auto-flow:column}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-rows-3{grid-template-rows:repeat(3,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.self-center{align-self:center}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:.25rem}.rounded-3xl{border-radius:1.5rem}.rounded-box{border-radius:var(--rounded-box, 1rem)}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-b-box{border-bottom-right-radius:var(--rounded-box, 1rem);border-bottom-left-radius:var(--rounded-box, 1rem)}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-t-box{border-top-left-radius:var(--rounded-box, 1rem);border-top-right-radius:var(--rounded-box, 1rem)}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-base-200{--tw-border-opacity: 1;border-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-border-opacity)))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-gray-500{--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity))}.border-purple-400{--tw-border-opacity: 1;border-color:rgb(192 132 252 / var(--tw-border-opacity))}.bg-accent{--tw-bg-opacity: 1;background-color:var(--fallback-a,oklch(var(--a)/var(--tw-bg-opacity)))}.bg-base-100{--tw-bg-opacity: 1;background-color:var(--fallback-b1,oklch(var(--b1)/var(--tw-bg-opacity)))}.bg-base-200{--tw-bg-opacity: 1;background-color:var(--fallback-b2,oklch(var(--b2)/var(--tw-bg-opacity)))}.bg-base-300{--tw-bg-opacity: 1;background-color:var(--fallback-b3,oklch(var(--b3)/var(--tw-bg-opacity)))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-neutral{--tw-bg-opacity: 1;background-color:var(--fallback-n,oklch(var(--n)/var(--tw-bg-opacity)))}.bg-primary{--tw-bg-opacity: 1;background-color:var(--fallback-p,oklch(var(--p)/var(--tw-bg-opacity)))}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-red-800{--tw-bg-opacity: 1;background-color:rgb(153 27 27 / var(--tw-bg-opacity))}.bg-secondary{--tw-bg-opacity: 1;background-color:var(--fallback-s,oklch(var(--s)/var(--tw-bg-opacity)))}.bg-slate-700{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.from-gray-700{--tw-gradient-from: #374151 var(--tw-gradient-from-position);--tw-gradient-to: rgb(55 65 81 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-gray-700\/50{--tw-gradient-from: rgb(55 65 81 / .5) var(--tw-gradient-from-position);--tw-gradient-to: rgb(55 65 81 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-transparent{--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), transparent var(--tw-gradient-via-position), var(--tw-gradient-to)}.bg-center{background-position:center}.fill-current{fill:currentColor}.stroke-current{stroke:currentColor}.stroke-gray-400{stroke:#9ca3af}.stroke-gray-600{stroke:#4b5563}.stroke-red-500{stroke:#ef4444}.object-cover{-o-object-fit:cover;object-fit:cover}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-0{padding-left:0;padding-right:0}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-0{padding-bottom:0}.pb-10{padding-bottom:2.5rem}.pb-12{padding-bottom:3rem}.pb-2{padding-bottom:.5rem}.pb-4{padding-bottom:1rem}.pl-0{padding-left:0}.pl-10{padding-left:2.5rem}.pl-14{padding-left:3.5rem}.pl-3{padding-left:.75rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pr-0{padding-right:0}.pr-10{padding-right:2.5rem}.pr-16{padding-right:4rem}.pr-4{padding-right:1rem}.pr-6{padding-right:1.5rem}.pt-0{padding-top:0}.pt-12{padding-top:3rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-5xl{font-size:3rem;line-height:1}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.leading-relaxed{line-height:1.625}.text-base-content{--tw-text-opacity: 1;color:var(--fallback-bc,oklch(var(--bc)/var(--tw-text-opacity)))}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-neutral-content{--tw-text-opacity: 1;color:var(--fallback-nc,oklch(var(--nc)/var(--tw-text-opacity)))}.text-primary{--tw-text-opacity: 1;color:var(--fallback-p,oklch(var(--p)/var(--tw-text-opacity)))}.text-primary-content{--tw-text-opacity: 1;color:var(--fallback-pc,oklch(var(--pc)/var(--tw-text-opacity)))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.underline{text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-60{opacity:.6}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-gray-500\/20{--tw-shadow-color: rgb(107 114 128 / .2);--tw-shadow: var(--tw-shadow-colored)}.outline-base-content{outline-color:var(--fallback-bc,oklch(var(--bc)/1))}.ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.selection\:bg-red-500 *::-moz-selection{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.selection\:bg-red-500 *::selection{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.selection\:text-white *::-moz-selection{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.selection\:text-white *::selection{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.selection\:bg-red-500::-moz-selection{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.selection\:bg-red-500::selection{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.selection\:text-white::-moz-selection{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.selection\:text-white::selection{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.last\:mr-0:last-child{margin-right:0}.hover\:bg-gray-700:hover{--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.focus\:rounded-sm:focus{border-radius:.125rem}.focus\:border-indigo-600:focus{--tw-border-opacity: 1;border-color:rgb(79 70 229 / var(--tw-border-opacity))}.focus\:outline:focus{outline-style:solid}.focus\:outline-2:focus{outline-width:2px}.focus\:outline-red-500:focus{outline-color:#ef4444}.focus\:ring-indigo-600:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(79 70 229 / var(--tw-ring-opacity))}@media (prefers-reduced-motion: no-preference){.motion-safe\:hover\:scale-\[1\.01\]:hover{--tw-scale-x: 1.01;--tw-scale-y: 1.01;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}}@media (min-width: 640px){.sm\:fixed{position:fixed}.sm\:right-0{right:0}.sm\:top-0{top:0}.sm\:ml-0{margin-left:0}.sm\:mt-0{margin-top:0}.sm\:inline-block{display:inline-block}.sm\:flex{display:flex}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-center{justify-content:center}.sm\:justify-between{justify-content:space-between}.sm\:space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.25rem * var(--tw-space-x-reverse));margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-16{padding-top:4rem;padding-bottom:4rem}.sm\:py-2{padding-top:.5rem;padding-bottom:.5rem}.sm\:pl-0{padding-left:0}.sm\:text-left{text-align:left}.sm\:text-right{text-align:right}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\:inline{display:inline}.md\:h-6{height:1.5rem}.md\:w-6{width:1.5rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:place-self-center{place-self:center}.md\:justify-self-end{justify-self:end}.md\:px-4{padding-left:1rem;padding-right:1rem}}@media (min-width: 1024px){.lg\:block{display:block}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:flex-none{flex:none}.lg\:flex-row-reverse{flex-direction:row-reverse}.lg\:gap-8{gap:2rem}.lg\:p-8{padding:2rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-20{padding-top:5rem;padding-bottom:5rem}.lg\:text-left{text-align:left}}@media (prefers-color-scheme: dark){.dark\:bg-gray-800\/50{background-color:#1f293780}.dark\:bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.dark\:bg-red-800\/20{background-color:#991b1b33}.dark\:bg-gradient-to-bl{background-image:linear-gradient(to bottom left,var(--tw-gradient-stops))}.dark\:text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.dark\:text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\:shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.dark\:ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.dark\:ring-inset{--tw-ring-inset: inset}.dark\:ring-white\/5{--tw-ring-color: rgb(255 255 255 / .05)}.dark\:hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}} diff --git a/Publish/Public/assets/app-de8ff430.js b/Publish/Public/assets/app-de8ff430.js new file mode 100644 index 0000000..05c04ef --- /dev/null +++ b/Publish/Public/assets/app-de8ff430.js @@ -0,0 +1 @@ +import{b as r,S as t,a}from"./sweetalert2-7c60aed3.js";window.axios=r;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";window.Swal=t;const c=async function(i){const o=document.getElementById(i);try{await a.get("/deploy/info").then(n=>{let e="";n.data.data.forEach(s=>{e+=`
${s.text}
`}),o.innerHTML=e})}catch{t.fire({icon:"error",title:"Oops...",text:"Something went wrong getting the deploy info!😭"})}};window.deploySite=async function(i,o){const n=document.getElementById(o);n.innerHTML="";try{t.fire({icon:"success",title:"Success!",text:"Site deployment started!🚀"});const e=setInterval(()=>{c(o)},1e3);await a.post("/deploy/start",{mode:i}).then(s=>{t.fire({icon:"success",title:"Success!",text:"Site deployment completed!🚀"}),setTimeout(()=>{clearInterval(e)},1e3)})}catch{t.fire({icon:"error",title:"Oops...",text:"Something went wrong deploying the site!😭"})}setTimeout(()=>{clearInterval(codeFeedbak)},1e3)}; diff --git a/Publish/Public/assets/grape-f2380d7a.js b/Publish/Public/assets/grape-f2380d7a.js new file mode 100644 index 0000000..0e624b3 --- /dev/null +++ b/Publish/Public/assets/grape-f2380d7a.js @@ -0,0 +1,597 @@ +import{a as Hu,S as Ma,g as Nh}from"./sweetalert2-7c60aed3.js";var h_={410:(w,Y,st)=>{var rt,lt,F;/*! +* Backbone.Undo.js v0.2 +* +* Copyright (c)2013 Oliver Sartun +* Released under the MIT License +* +* Documentation and full license available at +* https://github.com/osartun/Backbone.Undo.js +*/(function(R){lt=[st(50),st(316)],rt=R,F=typeof rt=="function"?rt.apply(Y,lt):rt,F!==void 0&&(w.exports=F)})(function(R,M){var N=Array.prototype.slice;function x(dt,ot,X){return X.length<=4?dt.call(ot,X[0],X[1],X[2],X[3]):dt.apply(ot,X)}function j(dt,ot){return N.call(dt,ot)}function L(dt,ot){return dt==null?!1:(R.isArray(ot)||(ot=j(arguments,1)),R.all(ot,function(X){return X in dt}))}var D=function(){var dt=!1,ot=-1;function X(){ot++,dt=!0,R.defer(function(){dt=!1})}return function(){return dt||X(),ot}}();function H(){this.registeredObjects=[],this.cidIndexes=[]}H.prototype={isRegistered:function(dt){return dt&&dt.cid?this.registeredObjects[dt.cid]:R.contains(this.registeredObjects,dt)},register:function(dt){return this.isRegistered(dt)?!1:(dt&&dt.cid?(this.registeredObjects[dt.cid]=dt,this.cidIndexes.push(dt.cid)):this.registeredObjects.push(dt),!0)},unregister:function(dt){if(this.isRegistered(dt)){if(dt&&dt.cid)delete this.registeredObjects[dt.cid],this.cidIndexes.splice(R.indexOf(this.cidIndexes,dt.cid),1);else{var ot=R.indexOf(this.registeredObjects,dt);this.registeredObjects.splice(ot,1)}return!0}return!1},get:function(){return R.map(this.cidIndexes,function(dt){return this.registeredObjects[dt]},this).concat(this.registeredObjects)}};function G(dt,ot,X,z){for(var et=0,A=ot.length,tt;etdt.maximumStackLength&&(dt.shift(),dt.pointer--)}}}var Tt={add:{undo:function(dt,ot,X,z){dt.remove(X,z)},redo:function(dt,ot,X,z){z.index&&(z.at=z.index),dt.add(X,z)},on:function(dt,ot,X){return{object:ot,before:void 0,after:dt,options:R.clone(X)}}},remove:{undo:function(dt,ot,X,z){"index"in z&&(z.at=z.index),dt.add(ot,z)},redo:function(dt,ot,X,z){dt.remove(ot,z)},on:function(dt,ot,X){return{object:ot,before:dt,after:void 0,options:R.clone(X)}}},change:{undo:function(dt,ot,X,z){R.isEmpty(ot)?R.each(R.keys(X),dt.unset,dt):(dt.set(ot),z&&z.unsetData&&z.unsetData.before&&z.unsetData.before.length&&R.each(z.unsetData.before,dt.unset,dt))},redo:function(dt,ot,X,z){R.isEmpty(X)?R.each(R.keys(ot),dt.unset,dt):(dt.set(X),z&&z.unsetData&&z.unsetData.after&&z.unsetData.after.length&&R.each(z.unsetData.after,dt.unset,dt))},on:function(dt,ot){var X=dt.changedAttributes(),z=R.keys(X),et=R.pick(dt.previousAttributes(),z),A=R.keys(et),tt=(ot||(ot={})).unsetData={after:[],before:[]};return z.length!=A.length&&(z.length>A.length?R.each(z,function(E){E in et||tt.before.push(E)},this):R.each(A,function(E){E in X||tt.after.push(E)})),{object:dt,before:et,after:X,options:R.clone(ot)}}},reset:{undo:function(dt,ot,X){dt.reset(ot)},redo:function(dt,ot,X){dt.reset(X)},on:function(dt,ot){return{object:dt,before:ot.previousModels,after:R.clone(dt.models)}}}};function yt(){}yt.prototype=Tt;function Kt(dt,ot,X,z){if(typeof ot=="object")return R.each(ot,function(et,A){dt===2?Kt(dt,et,X,z):Kt(dt,A,et,X)});switch(dt){case 0:L(X,"undo","redo","on")&&R.all(R.pick(X,"undo","redo","on"),R.isFunction)&&(z[ot]=X);break;case 1:z[ot]&&R.isObject(X)&&(z[ot]=R.extend({},z[ot],X));break;case 2:delete z[ot];break}return this}var te=M.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(dt){pt("undo",this.attributes)},redo:function(dt){pt("redo",this.attributes)}}),ue=M.Collection.extend({model:te,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(dt){this.maximumStackLength=dt}}),Zt=M.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(dt){this.stack=new ue,this.objectRegistry=new H,this.undoTypes=new yt,this.stack.setMaxLength(this.get("maximumStackLength")),this.on("change:maximumStackLength",function(ot,X){this.stack.setMaxLength(X)},this),dt&&dt.track&&this.startTracking(),dt&&dt.register&&(R.isArray(dt.register)||R.isArguments(dt.register)?x(this.register,this,dt.register):this.register(dt.register))},startTracking:function(){this.set("track",!0),this.stack.track=!0},stopTracking:function(){this.set("track",!1),this.stack.track=!1},isTracking:function(){return this.get("track")},_addToStack:function(dt){jt(this.stack,dt,j(arguments,1),this.undoTypes)},register:function(){G("on",arguments,this._addToStack,this)},unregister:function(){G("off",arguments,this._addToStack,this)},unregisterAll:function(){x(this.unregister,this,this.objectRegistry.get())},undo:function(dt){xt("undo",this,this.stack,dt)},undoAll:function(){xt("undo",this,this.stack,!1,!0)},redo:function(dt){xt("redo",this,this.stack,dt)},redoAll:function(){xt("redo",this,this.stack,!1,!0)},isAvailable:function(dt){var ot=this.stack,X=ot.length;switch(dt){case"undo":return X>0&&ot.pointer>-1;case"redo":return X>0&&ot.pointer{var rt,lt;(function(F){var R=typeof self=="object"&&self.self===self&&self||typeof st.g=="object"&&st.g.global===st.g&&st.g;rt=[st(50),st(895),Y],lt=(function(M,N,x){R.Backbone=F(R,x,M,N)}).apply(Y,rt),lt!==void 0&&(w.exports=lt)})(function(F,R,M,N){var x=F.Backbone,j=Array.prototype.slice;R.VERSION="1.4.1",R.$=N,R.noConflict=function(){return F.Backbone=x,this},R.emulateHTTP=!1,R.emulateJSON=!1;var L=R.Events={},D=/\s+/,H,G=function(T,B,nt,ht,Lt){var Z=0,Et;if(nt&&typeof nt=="object")for(ht!==void 0&&("context"in Lt)&&Lt.context===void 0&&(Lt.context=ht),Et=M.keys(nt);Zthis.length&&(ht=this.length),ht<0&&(ht+=this.length+1);var Lt=[],Z=[],Et=[],mt=[],xe={},He=B.add,De=B.merge,ee=B.remove,Jt=!1,Vt=this.comparator&&ht==null&&B.sort!==!1,Te=M.isString(this.comparator)?this.comparator:null,Be,Ee;for(Ee=0;Ee7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.history&&this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(Ne,"/"),this._wantsHashChange&&this._wantsPushState)if(!this._hasPushState&&!this.atRoot()){var B=this.root.slice(0,-1)||"/";return this.location.replace(B+"#"+this.getPath()),!0}else this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0});if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var nt=document.body,ht=nt.insertBefore(this.iframe,nt.firstChild).contentWindow;ht.document.open(),ht.document.close(),ht.location.hash="#"+this.fragment}var Lt=window.addEventListener||function(Z,Et){return attachEvent("on"+Z,Et)};if(this._usePushState?Lt("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?Lt("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var T=window.removeEventListener||function(B,nt){return detachEvent("on"+B,nt)};this._usePushState?T("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&T("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),qt.started=!1},route:function(T,B){this.handlers.unshift({route:T,callback:B})},checkUrl:function(T){var B=this.getFragment();if(B===this.fragment&&this.iframe&&(B=this.getHash(this.iframe.contentWindow)),B===this.fragment)return!1;this.iframe&&this.navigate(B),this.loadUrl()},loadUrl:function(T){return this.matchRoot()?(T=this.fragment=this.getFragment(T),M.some(this.handlers,function(B){if(B.route.test(T))return B.callback(T),!0})):!1},navigate:function(T,B){if(!qt.started)return!1;(!B||B===!0)&&(B={trigger:!!B}),T=this.getFragment(T||"");var nt=this.root;(T===""||T.charAt(0)==="?")&&(nt=nt.slice(0,-1)||"/");var ht=nt+T;T=T.replace(cr,"");var Lt=this.decodeFragment(T);if(this.fragment!==Lt){if(this.fragment=Lt,this._usePushState)this.history[B.replace?"replaceState":"pushState"]({},document.title,ht);else if(this._wantsHashChange){if(this._updateHash(this.location,T,B.replace),this.iframe&&T!==this.getHash(this.iframe.contentWindow)){var Z=this.iframe.contentWindow;B.replace||(Z.document.open(),Z.document.close()),this._updateHash(Z.location,T,B.replace)}}else return this.location.assign(ht);if(B.trigger)return this.loadUrl(T)}},_updateHash:function(T,B,nt){if(nt){var ht=T.href.replace(/(javascript:|#).*$/,"");T.replace(ht+"#"+B)}else T.hash="#"+B}}),R.history=new qt;var _r=function(T,B){var nt=this,ht;return T&&M.has(T,"constructor")?ht=T.constructor:ht=function(){return nt.apply(this,arguments)},M.extend(ht,nt,B),ht.prototype=M.create(nt.prototype,T),ht.prototype.constructor=ht,ht.__super__=nt.prototype,ht};te.extend=ue.extend=Ct.extend=E.extend=qt.extend=_r;var ar=function(){throw new Error('A "url" property or function must be specified')},he=function(T,B){var nt=B.error;B.error=function(ht){nt&&nt.call(B.context,T,ht,B),T.trigger("error",T,ht,B)}};return R})},210:(w,Y,st)=>{(function(rt){rt(st(631))})(function(rt){rt.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(F,R){return/^[;{}]$/.test(R)}}),rt.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(F,R,M,N){return this.jsonMode?/^[\[,{]$/.test(R)||/^}/.test(M):R==";"&&N.lexical&&N.lexical.type==")"?!1:/^[;{}]$/.test(R)&&!/^;/.test(M)}});var lt=/^(a|abbr|acronym|area|base|bdo|big|br|button|caption|cite|code|col|colgroup|dd|del|dfn|em|frame|hr|iframe|img|input|ins|kbd|label|legend|link|map|object|optgroup|option|param|q|samp|script|select|small|span|strong|sub|sup|textarea|tt|var)$/;rt.extendMode("xml",{commentStart:"",newlineAfterToken:function(F,R,M,N){var x=!1;return this.configuration=="html"&&(x=N.context?lt.test(N.context.tagName):!1),!x&&(F=="tag"&&/>$/.test(R)&&N.context||/^-1&&D>-1&&D>L&&(j=j.substr(0,L)+j.substring(L+x.commentStart.length,D)+j.substr(D+x.commentEnd.length)),N.replaceRange(j,R,M)}})}),rt.defineExtension("autoIndentRange",function(F,R){var M=this;this.operation(function(){for(var N=F.line;N<=R.line;N++)M.indentLine(N,"smart")})}),rt.defineExtension("autoFormatRange",function(F,R){var M=this,N=M.getMode(),x=M.getRange(F,R).split(` +`),j=rt.copyState(N,M.getTokenAt(F).state),L=M.getOption("tabSize"),D="",H=0,G=F.ch===0;function pt(){D+=` +`,G=!0,++H}for(var xt=0;xt2),jt=/Android/.test(Y),Tt=Nt||jt||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Y),yt=Nt||/Mac/.test(st),Kt=/\bCrOS\b/.test(Y),te=/win/i.test(st),ue=H&&Y.match(/Version\/(\d*\.\d*)/);ue&&(ue=Number(ue[1])),ue&&ue>=15&&(H=!1,x=!0);var Zt=yt&&(j||H&&(ue==null||ue<12.11)),dt=rt||M&&N>=9;function ot(i){return new RegExp("(^|\\s)"+i+"(?:$|\\s)\\s*")}var X=function(i,s){var c=i.className,u=ot(s).exec(c);if(u){var p=c.slice(u.index+u[0].length);i.className=c.slice(0,u.index)+(p?u[1]+p:"")}};function z(i){for(var s=i.childNodes.length;s>0;--s)i.removeChild(i.firstChild);return i}function et(i,s){return z(i).appendChild(s)}function A(i,s,c,u){var p=document.createElement(i);if(c&&(p.className=c),u&&(p.style.cssText=u),typeof s=="string")p.appendChild(document.createTextNode(s));else if(s)for(var v=0;v=s)return m+(s-v);m+=_-v,m+=c-m%c,v=_+1}}var Rt=function(){this.id=null,this.f=null,this.time=0,this.handler=_e(this.onTimeout,this)};Rt.prototype.onTimeout=function(i){i.id=0,i.time<=+new Date?i.f():setTimeout(i.handler,i.time-+new Date)},Rt.prototype.set=function(i,s){this.f=s;var c=+new Date+i;(!this.id||c=s)return u+Math.min(m,s-p);if(p+=v-u,p+=c-p%c,u=v+1,p>=s)return u}}var _r=[""];function ar(i){for(;_r.length<=i;)_r.push(he(_r)+" ");return _r[i]}function he(i){return i[i.length-1]}function T(i,s){for(var c=[],u=0;u"€"&&(i.toUpperCase()!=i.toLowerCase()||Lt.test(i))}function Et(i,s){return s?s.source.indexOf("\\w")>-1&&Z(i)?!0:s.test(i):Z(i)}function mt(i){for(var s in i)if(i.hasOwnProperty(s)&&i[s])return!1;return!0}var xe=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function He(i){return i.charCodeAt(0)>=768&&xe.test(i)}function De(i,s,c){for(;(c<0?s>0:sc?-1:1;;){if(s==c)return s;var p=(s+c)/2,v=u<0?Math.ceil(p):Math.floor(p);if(v==s)return i(v)?s:c;i(v)?c=v:s=v+u}}function Jt(i,s,c,u){if(!i)return u(s,c,"ltr",0);for(var p=!1,v=0;vs||s==c&&m.to==s)&&(u(Math.max(m.from,s),Math.min(m.to,c),m.level==1?"rtl":"ltr",v),p=!0)}p||u(s,c,"ltr")}var Vt=null;function Te(i,s,c){var u;Vt=null;for(var p=0;ps)return p;v.to==s&&(v.from!=v.to&&c=="before"?u=p:Vt=p),v.from==s&&(v.from!=v.to&&c!="before"?u=p:Vt=p)}return u??Vt}var Be=function(){var i="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",s="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function c(P){return P<=247?i.charAt(P):1424<=P&&P<=1524?"R":1536<=P&&P<=1785?s.charAt(P-1536):1774<=P&&P<=2220?"r":8192<=P&&P<=8203?"w":P==8204?"b":"L"}var u=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,p=/[stwN]/,v=/[LRr]/,m=/[Lb1n]/,_=/[1n]/;function C(P,q,at){this.level=P,this.from=q,this.to=at}return function(P,q){var at=q=="ltr"?"L":"R";if(P.length==0||q=="ltr"&&!u.test(P))return!1;for(var bt=P.length,gt=[],It=0;It-1&&(u[s]=p.slice(0,v).concat(p.slice(v+1)))}}}function nr(i,s){var c=fr(i,s);if(c.length)for(var u=Array.prototype.slice.call(arguments,2),p=0;p0}function Kn(i){i.prototype.on=function(s,c){ge(this,s,c)},i.prototype.off=function(s,c){Me(this,s,c)}}function U(i){i.preventDefault?i.preventDefault():i.returnValue=!1}function ft(i){i.stopPropagation?i.stopPropagation():i.cancelBubble=!0}function wt(i){return i.defaultPrevented!=null?i.defaultPrevented:i.returnValue==!1}function Ht(i){U(i),ft(i)}function de(i){return i.target||i.srcElement}function je(i){var s=i.which;return s==null&&(i.button&1?s=1:i.button&2?s=3:i.button&4&&(s=2)),yt&&i.ctrlKey&&s==1&&(s=3),s}var tr=function(){if(M&&N<9)return!1;var i=A("div");return"draggable"in i||"dragDrop"in i}(),Zr;function Jr(i){if(Zr==null){var s=A("span","​");et(i,A("span",[s,document.createTextNode("x")])),i.firstChild.offsetHeight!=0&&(Zr=s.offsetWidth<=1&&s.offsetHeight>2&&!(M&&N<8))}var c=Zr?A("span","​"):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return c.setAttribute("cm-text",""),c}var Tr;function Co(i){if(Tr!=null)return Tr;var s=et(i,document.createTextNode("AخA")),c=E(s,0,1).getBoundingClientRect(),u=E(s,1,2).getBoundingClientRect();return z(i),!c||c.left==c.right?!1:Tr=u.right-c.right<3}var Qr=` + +b`.split(/\n/).length!=3?function(i){for(var s=0,c=[],u=i.length;s<=u;){var p=i.indexOf(` +`,s);p==-1&&(p=i.length);var v=i.slice(s,i.charAt(p-1)=="\r"?p-1:p),m=v.indexOf("\r");m!=-1?(c.push(v.slice(0,m)),s+=m+1):(c.push(v),s=p+1)}return c}:function(i){return i.split(/\r\n?|\n/)},Cn=window.getSelection?function(i){try{return i.selectionStart!=i.selectionEnd}catch{return!1}}:function(i){var s;try{s=i.ownerDocument.selection.createRange()}catch{}return!s||s.parentElement()!=i?!1:s.compareEndPoints("StartToEnd",s)!=0},xo=function(){var i=A("div");return"oncopy"in i?!0:(i.setAttribute("oncopy","return;"),typeof i.oncopy=="function")}(),Er=null;function mr(i){if(Er!=null)return Er;var s=et(i,A("span","x")),c=s.getBoundingClientRect(),u=E(s,0,1).getBoundingClientRect();return Er=Math.abs(c.left-u.left)>1}var Rr={},xn={};function Gn(i,s){arguments.length>2&&(s.dependencies=Array.prototype.slice.call(arguments,2)),Rr[i]=s}function Ro(i,s){xn[i]=s}function Ln(i){if(typeof i=="string"&&xn.hasOwnProperty(i))i=xn[i];else if(i&&typeof i.name=="string"&&xn.hasOwnProperty(i.name)){var s=xn[i.name];typeof s=="string"&&(s={name:s}),i=ht(s,i),i.name=s.name}else{if(typeof i=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(i))return Ln("application/xml");if(typeof i=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(i))return Ln("application/json")}return typeof i=="string"?{name:i}:i||{name:"null"}}function tn(i,s){s=Ln(s);var c=Rr[s.name];if(!c)return tn(i,"text/plain");var u=c(i,s);if(Nr.hasOwnProperty(s.name)){var p=Nr[s.name];for(var v in p)p.hasOwnProperty(v)&&(u.hasOwnProperty(v)&&(u["_"+v]=u[v]),u[v]=p[v])}if(u.name=s.name,s.helperType&&(u.helperType=s.helperType),s.modeProps)for(var m in s.modeProps)u[m]=s.modeProps[m];return u}var Nr={};function ho(i,s){var c=Nr.hasOwnProperty(i)?Nr[i]:Nr[i]={};ve(s,c)}function Sn(i,s){if(s===!0)return s;if(i.copyState)return i.copyState(s);var c={};for(var u in s){var p=s[u];p instanceof Array&&(p=p.concat([])),c[u]=p}return c}function On(i,s){for(var c;i.innerMode&&(c=i.innerMode(s),!(!c||c.mode==i));)s=c.state,i=c.mode;return c||{mode:i,state:s}}function So(i,s,c){return i.startState?i.startState(s,c):!0}var sr=function(i,s,c){this.pos=this.start=0,this.string=i,this.tabSize=s||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=c};sr.prototype.eol=function(){return this.pos>=this.string.length},sr.prototype.sol=function(){return this.pos==this.lineStart},sr.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},sr.prototype.next=function(){if(this.poss},sr.prototype.eatSpace=function(){for(var i=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>i},sr.prototype.skipToEnd=function(){this.pos=this.string.length},sr.prototype.skipTo=function(i){var s=this.string.indexOf(i,this.pos);if(s>-1)return this.pos=s,!0},sr.prototype.backUp=function(i){this.pos-=i},sr.prototype.column=function(){return this.lastColumnPos0?null:(v&&s!==!1&&(this.pos+=v[0].length),v)}},sr.prototype.current=function(){return this.string.slice(this.start,this.pos)},sr.prototype.hideFirstChars=function(i,s){this.lineStart+=i;try{return s()}finally{this.lineStart-=i}},sr.prototype.lookAhead=function(i){var s=this.lineOracle;return s&&s.lookAhead(i)},sr.prototype.baseToken=function(){var i=this.lineOracle;return i&&i.baseToken(this.pos)};function Ce(i,s){if(s-=i.first,s<0||s>=i.size)throw new Error("There is no line "+(s+i.first)+" in the document.");for(var c=i;!c.lines;)for(var u=0;;++u){var p=c.children[u],v=p.chunkSize();if(s=i.first&&sc?O(c,Ce(i,c).text.length):gn(s,Ce(i,s.line).text.length)}function gn(i,s){var c=i.ch;return c==null||c>s?O(i.line,s):c<0?O(i.line,0):i}function Ji(i,s){for(var c=[],u=0;uthis.maxLookAhead&&(this.maxLookAhead=i),s},Yn.prototype.baseToken=function(i){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=i;)this.baseTokenPos+=2;var s=this.baseTokens[this.baseTokenPos+1];return{type:s&&s.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-i}},Yn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Yn.fromSaved=function(i,s,c){return s instanceof qn?new Yn(i,Sn(i.mode,s.state),c,s.lookAhead):new Yn(i,Sn(i.mode,s),c)},Yn.prototype.save=function(i){var s=i!==!1?Sn(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new qn(s,this.maxLookAhead):s};function gi(i,s,c,u){var p=[i.state.modeGen],v={};un(i,s.text,i.doc.mode,c,function(P,q){return p.push(P,q)},v,u);for(var m=c.state,_=function(P){c.baseTokens=p;var q=i.state.overlays[P],at=1,bt=0;c.state=!0,un(i,s.text,q.mode,c,function(gt,It){for(var Ut=at;btgt&&p.splice(at,1,gt,p[at+1],Qt),at+=2,bt=Math.min(gt,Qt)}if(It)if(q.opaque)p.splice(Ut,at-Ut,gt,"overlay "+It),at=Ut+2;else for(;Uti.options.maxHighlightLength&&Sn(i.doc.mode,u.state),v=gi(i,s,u);p&&(u.state=p),s.stateAfter=u.save(!p),s.styles=v.styles,v.classes?s.styleClasses=v.classes:s.styleClasses&&(s.styleClasses=null),c===i.doc.highlightFrontier&&(i.doc.modeFrontier=Math.max(i.doc.modeFrontier,++i.doc.highlightFrontier))}return s.styles}function No(i,s,c){var u=i.doc,p=i.display;if(!u.mode.startState)return new Yn(u,!0,s);var v=Xn(i,s,c),m=v>u.first&&Ce(u,v-1).stateAfter,_=m?Yn.fromSaved(u,m,v):new Yn(u,So(u.mode),v);return u.iter(v,s,function(C){Qi(i,C.text,_);var P=_.line;C.stateAfter=P==s-1||P%5==0||P>=p.viewFrom&&Ps.start)return v}throw new Error("Mode "+i.name+" failed to advance stream.")}var Fo=function(i,s,c){this.start=i.start,this.end=i.pos,this.string=i.current(),this.type=s||null,this.state=c};function Dn(i,s,c,u){var p=i.doc,v=p.mode,m;s=Se(p,s);var _=Ce(p,s.line),C=No(i,s.line,c),P=new sr(_.text,i.options.tabSize,C),q;for(u&&(q=[]);(u||P.posi.options.maxHighlightLength?(_=!1,m&&Qi(i,s,u,q.pos),q.pos=s.length,at=null):at=yi(mi(c,q,u.state,bt),v),bt){var gt=bt[0].name;gt&&(at="m-"+(at?gt+" "+at:gt))}if(!_||P!=at){for(;Cm;--_){if(_<=v.first)return v.first;var C=Ce(v,_-1),P=C.stateAfter;if(P&&(!c||_+(P instanceof qn?P.lookAhead:0)<=v.modeFrontier))return _;var q=Ct(C.text,null,i.options.tabSize);(p==null||u>q)&&(p=_-1,u=q)}return p}function Hs(i,s){if(i.modeFrontier=Math.min(i.modeFrontier,s),!(i.highlightFrontierc;u--){var p=Ce(i,u).stateAfter;if(p&&(!(p instanceof qn)||u+p.lookAhead=s:v.to>s);(u||(u=[])).push(new _i(m,v.from,C?null:v.to))}}return u}function ta(i,s,c){var u;if(i)for(var p=0;p=s:v.to>s);if(_||v.from==s&&m.type=="bookmark"&&(!c||v.marker.insertLeft)){var C=v.from==null||(m.inclusiveLeft?v.from<=s:v.from0&&_)for(var we=0;we<_.length;++we)_[we].to==null&&(le||(le=[])).push(new _i(_[we].marker,null,null));for(var Le=0;Le0)){var q=[C,1],at=K(P.from,_.from),bt=K(P.to,_.to);(at<0||!m.inclusiveLeft&&!at)&&q.push({from:P.from,to:_.from}),(bt>0||!m.inclusiveRight&&!bt)&&q.push({from:_.to,to:P.to}),p.splice.apply(p,q),C+=q.length-3}}return p}function bi(i){var s=i.markedSpans;if(s){for(var c=0;cs)&&(!u||Bo(u,v.marker)<0)&&(u=v.marker)}return u}function yn(i,s,c,u,p){var v=Ce(i,s),m=mn&&v.markedSpans;if(m)for(var _=0;_=0&&at<=0||q<=0&&at>=0)&&(q<=0&&(C.marker.inclusiveRight&&p.inclusiveLeft?K(P.to,c)>=0:K(P.to,c)>0)||q>=0&&(C.marker.inclusiveRight&&p.inclusiveLeft?K(P.from,u)<=0:K(P.from,u)<0)))return!0}}}function Pn(i){for(var s;s=so(i);)i=s.find(-1,!0).line;return i}function lo(i){for(var s;s=Uo(i);)i=s.find(1,!0).line;return i}function ra(i){for(var s,c;s=Uo(i);)i=s.find(1,!0).line,(c||(c=[])).push(i);return c}function Zn(i,s){var c=Ce(i,s),u=Pn(c);return c==u?s:qe(u)}function Ia(i,s){if(s>i.lastLine())return s;var c=Ce(i,s),u;if(!In(i,c))return s;for(;u=Uo(c);)c=u.find(1,!0).line;return qe(c)+1}function In(i,s){var c=mn&&s.markedSpans;if(c){for(var u=void 0,p=0;ps.maxLineLength&&(s.maxLineLength=p,s.maxLine=u)})}var Dr=function(i,s,c){this.text=i,Ci(this,s),this.height=c?c(this):1};Dr.prototype.lineNo=function(){return qe(this)},Kn(Dr);function na(i,s,c,u){i.text=s,i.stateAfter&&(i.stateAfter=null),i.styles&&(i.styles=null),i.order!=null&&(i.order=null),bi(i),Ci(i,c);var p=u?u(i):1;p!=i.height&&vn(i,p)}function Wo(i){i.parent=null,bi(i)}var Va={},en={};function cn(i,s){if(!i||/^\s*$/.test(i))return null;var c=s.addModeClass?en:Va;return c[i]||(c[i]=i.replace(/\S+/g,"cm-$&"))}function Oi(i,s){var c=tt("span",null,null,x?"padding-right: .1px":null),u={pre:tt("pre",[c],"CodeMirror-line"),content:c,col:0,pos:0,cm:i,trailingSpace:!1,splitSpaces:i.getOption("lineWrapping")};s.measure={};for(var p=0;p<=(s.rest?s.rest.length:0);p++){var v=p?s.rest[p-1]:s.line,m=void 0;u.pos=0,u.addToken=Ko,Co(i.display.measure)&&(m=Ee(v,i.doc.direction))&&(u.addToken=qr(u.addToken,m)),u.map=[];var _=s!=i.display.externalMeasured&&qe(v);Ei(v,u,La(i,v,_)),v.styleClasses&&(v.styleClasses.bgClass&&(u.bgClass=Dt(v.styleClasses.bgClass,u.bgClass||"")),v.styleClasses.textClass&&(u.textClass=Dt(v.styleClasses.textClass,u.textClass||""))),u.map.length==0&&u.map.push(0,0,u.content.appendChild(Jr(i.display.measure))),p==0?(s.measure.map=u.map,s.measure.cache={}):((s.measure.maps||(s.measure.maps=[])).push(u.map),(s.measure.caches||(s.measure.caches=[])).push({}))}if(x){var C=u.content.lastChild;(/\bcm-tab\b/.test(C.className)||C.querySelector&&C.querySelector(".cm-tab"))&&(u.content.className="cm-tab-wrap-hack")}return nr(i,"renderLine",i,s.line,u.pre),u.pre.className&&(u.textClass=Dt(u.pre.className,u.textClass||"")),u}function Ti(i){var s=A("span","•","cm-invalidchar");return s.title="\\u"+i.charCodeAt(0).toString(16),s.setAttribute("aria-label",s.title),s}function Ko(i,s,c,u,p,v,m){if(s){var _=i.splitSpaces?Us(s,i.trailingSpace):s,C=i.cm.state.specialChars,P=!1,q;if(!C.test(s))i.col+=s.length,q=document.createTextNode(_),i.map.push(i.pos,i.pos+s.length,q),M&&N<9&&(P=!0),i.pos+=s.length;else{q=document.createDocumentFragment();for(var at=0;;){C.lastIndex=at;var bt=C.exec(s),gt=bt?bt.index-at:s.length-at;if(gt){var It=document.createTextNode(_.slice(at,at+gt));M&&N<9?q.appendChild(A("span",[It])):q.appendChild(It),i.map.push(i.pos,i.pos+gt,It),i.col+=gt,i.pos+=gt}if(!bt)break;at+=gt+1;var Ut=void 0;if(bt[0]==" "){var Qt=i.cm.options.tabSize,se=Qt-i.col%Qt;Ut=q.appendChild(A("span",ar(se),"cm-tab")),Ut.setAttribute("role","presentation"),Ut.setAttribute("cm-text"," "),i.col+=se}else bt[0]=="\r"||bt[0]==` +`?(Ut=q.appendChild(A("span",bt[0]=="\r"?"␍":"␤","cm-invalidchar")),Ut.setAttribute("cm-text",bt[0]),i.col+=1):(Ut=i.cm.options.specialCharPlaceholder(bt[0]),Ut.setAttribute("cm-text",bt[0]),M&&N<9?q.appendChild(A("span",[Ut])):q.appendChild(Ut),i.col+=1);i.map.push(i.pos,i.pos+1,Ut),i.pos++}}if(i.trailingSpace=_.charCodeAt(s.length-1)==32,c||u||p||P||v||m){var ye=c||"";u&&(ye+=u),p&&(ye+=p);var le=A("span",[q],ye,v);if(m)for(var we in m)m.hasOwnProperty(we)&&we!="style"&&we!="class"&&le.setAttribute(we,m[we]);return i.content.appendChild(le)}i.content.appendChild(q)}}function Us(i,s){if(i.length>1&&!/ /.test(i))return i;for(var c=s,u="",p=0;pP&&at.from<=P));bt++);if(at.to>=q)return i(c,u,p,v,m,_,C);i(c,u.slice(0,at.to-P),p,v,null,_,C),v=null,u=u.slice(at.to-P),P=at.to}}}function Ra(i,s,c,u){var p=!u&&c.widgetNode;p&&i.map.push(i.pos,i.pos+s,p),!u&&i.cm.display.input.needsContentAttribute&&(p||(p=i.content.appendChild(document.createElement("span"))),p.setAttribute("cm-marker",c.id)),p&&(i.cm.display.input.setUneditable(p),i.content.appendChild(p)),i.pos+=s,i.trailingSpace=!1}function Ei(i,s,c){var u=i.markedSpans,p=i.text,v=0;if(!u){for(var m=1;mC||Xe.collapsed&&ke.to==C&&ke.from==C)){if(ke.to!=null&&ke.to!=C&>>ke.to&&(gt=ke.to,Ut=""),Xe.className&&(It+=" "+Xe.className),Xe.css&&(bt=(bt?bt+";":"")+Xe.css),Xe.startStyle&&ke.from==C&&(Qt+=" "+Xe.startStyle),Xe.endStyle&&ke.to==gt&&(we||(we=[])).push(Xe.endStyle,ke.to),Xe.title&&((ye||(ye={})).title=Xe.title),Xe.attributes)for(var dr in Xe.attributes)(ye||(ye={}))[dr]=Xe.attributes[dr];Xe.collapsed&&(!se||Bo(se.marker,Xe)<0)&&(se=ke)}else ke.from>C&>>ke.from&&(gt=ke.from)}if(we)for(var zr=0;zr=_)break;for(var kn=Math.min(_,gt);;){if(q){var wn=C+q.length;if(!se){var jr=wn>kn?q.slice(0,kn-C):q;s.addToken(s,jr,at?at+It:It,Qt,C+jr.length==gt?Ut:"",bt,ye)}if(wn>=kn){q=q.slice(kn-C),C=kn;break}C=wn,Qt=""}q=p.slice(v,v=c[P++]),at=cn(c[P++],s.cm.options)}}}function Na(i,s,c){this.line=s,this.rest=ra(s),this.size=this.rest?qe(he(this.rest))-c+1:1,this.node=this.text=null,this.hidden=In(i,s)}function Pi(i,s,c){for(var u=[],p,v=s;v2&&v.push((C.bottom+P.top)/2-c.top)}}v.push(c.bottom-c.top)}}function _t(i,s,c){if(i.line==s)return{map:i.measure.map,cache:i.measure.cache};if(i.rest){for(var u=0;uc)return{map:i.measure.maps[p],cache:i.measure.caches[p],before:!0}}}function Bt(i,s){s=Pn(s);var c=qe(s),u=i.display.externalMeasured=new Na(i.doc,s,c);u.lineN=c;var p=u.built=Oi(i,u);return u.text=p.pre,et(i.display.lineMeasure,p.pre),u}function ce(i,s,c,u){return lr(i,Ie(i,s),c,u)}function We(i,s){if(s>=i.display.viewFrom&&s=c.lineN&&ss)&&(v=C-_,p=v-1,s>=C&&(m="right")),p!=null){if(u=i[P+2],_==C&&c==(u.insertLeft?"left":"right")&&(m=c),c=="left"&&p==0)for(;P&&i[P-2]==i[P-3]&&i[P-1].insertLeft;)u=i[(P-=3)+2],m="left";if(c=="right"&&p==C-_)for(;P=0&&(c=i[p]).left==c.right;p--);return c}function Af(i,s,c,u){var p=Ka(s.map,c,u),v=p.node,m=p.start,_=p.end,C=p.collapse,P;if(v.nodeType==3){for(var q=0;q<4;q++){for(;m&&He(s.line.text.charAt(p.coverStart+m));)--m;for(;p.coverStart+_0&&(C=u="right");var at;i.options.lineWrapping&&(at=v.getClientRects()).length>1?P=at[u=="right"?at.length-1:0]:P=v.getBoundingClientRect()}if(M&&N<9&&!m&&(!P||!P.left&&!P.right)){var bt=v.parentNode.getClientRects()[0];bt?P={left:bt.left,right:bt.left+ua(i.display),top:bt.top,bottom:bt.bottom}:P=Fr}for(var gt=P.top-s.rect.top,It=P.bottom-s.rect.top,Ut=(gt+It)/2,Qt=s.view.measure.heights,se=0;se=u.text.length?(C=u.text.length,P="before"):C<=0&&(C=0,P="after"),!_)return m(P=="before"?C-1:C,P=="before");function q(It,Ut,Qt){var se=_[Ut],ye=se.level==1;return m(Qt?It-1:It,ye!=Qt)}var at=Te(_,C,P),bt=Vt,gt=q(C,at,P=="before");return bt!=null&&(gt.other=q(C,bt,P!="before")),gt}function Wu(i,s){var c=0;s=Se(i.doc,s),i.options.lineWrapping||(c=ua(i.display)*s.ch);var u=Ce(i.doc,s.line),p=Ar(u)+$o(i.display);return{left:c,right:c,top:p,bottom:p+u.height}}function Ll(i,s,c,u,p){var v=O(i,s,c);return v.xRel=p,u&&(v.outside=u),v}function Dl(i,s,c){var u=i.doc;if(c+=i.display.viewOffset,c<0)return Ll(u.first,0,null,-1,-1);var p=$n(u,c),v=u.first+u.size-1;if(p>v)return Ll(u.first+u.size-1,Ce(u,v).text.length,null,1,1);s<0&&(s=0);for(var m=Ce(u,p);;){var _=Il(i,m,p,s,c),C=jn(m,_.ch+(_.xRel>0||_.outside>0?1:0));if(!C)return _;var P=C.find(1);if(P.line==p)return P;m=Ce(u,p=P.line)}}function $a(i,s,c,u){u-=Ml(s);var p=s.text.length,v=ee(function(m){return lr(i,c,m-1).bottom<=u},p,0);return p=ee(function(m){return lr(i,c,m).top>u},v,p),{begin:v,end:p}}function Ys(i,s,c,u){c||(c=Ie(i,s));var p=qs(i,s,lr(i,c,u),"line").top;return $a(i,s,c,p)}function jl(i,s,c,u){return i.bottom<=c?!1:i.top>c?!0:(u?i.left:i.right)>s}function Il(i,s,c,u,p){p-=Ar(s);var v=Ie(i,s),m=Ml(s),_=0,C=s.text.length,P=!0,q=Ee(s,i.doc.direction);if(q){var at=(i.options.lineWrapping?Xs:kf)(i,s,c,v,q,u,p);P=at.level!=1,_=P?at.from:at.to-1,C=P?at.to:at.from-1}var bt=null,gt=null,It=ee(function(Le){var ke=lr(i,v,Le);return ke.top+=m,ke.bottom+=m,jl(ke,u,p,!1)?(ke.top<=p&&ke.left<=u&&(bt=Le,gt=ke),!0):!1},_,C),Ut,Qt,se=!1;if(gt){var ye=u-gt.left=we.bottom?1:0}return It=De(s.text,It,1),Ll(c,It,Qt,se,u-Ut)}function kf(i,s,c,u,p,v,m){var _=ee(function(at){var bt=p[at],gt=bt.level!=1;return jl(Nn(i,O(c,gt?bt.to:bt.from,gt?"before":"after"),"line",s,u),v,m,!0)},0,p.length-1),C=p[_];if(_>0){var P=C.level!=1,q=Nn(i,O(c,P?C.from:C.to,P?"after":"before"),"line",s,u);jl(q,v,m,!0)&&q.top>m&&(C=p[_-1])}return C}function Xs(i,s,c,u,p,v,m){var _=$a(i,s,u,m),C=_.begin,P=_.end;/\s/.test(s.text.charAt(P-1))&&P--;for(var q=null,at=null,bt=0;bt=P||gt.to<=C)){var It=gt.level!=1,Ut=lr(i,u,It?Math.min(P,gt.to)-1:Math.max(C,gt.from)).right,Qt=UtQt)&&(q=gt,at=Qt)}}return q||(q=p[p.length-1]),q.fromP&&(q={from:q.from,to:P,level:q.level}),q}var Li;function la(i){if(i.cachedTextHeight!=null)return i.cachedTextHeight;if(Li==null){Li=A("pre",null,"CodeMirror-line-like");for(var s=0;s<49;++s)Li.appendChild(document.createTextNode("x")),Li.appendChild(A("br"));Li.appendChild(document.createTextNode("x"))}et(i.measure,Li);var c=Li.offsetHeight/50;return c>3&&(i.cachedTextHeight=c),z(i.measure),c||1}function ua(i){if(i.cachedCharWidth!=null)return i.cachedCharWidth;var s=A("span","xxxxxxxxxx"),c=A("pre",[s],"CodeMirror-line-like");et(i.measure,c);var u=s.getBoundingClientRect(),p=(u.right-u.left)/10;return p>2&&(i.cachedCharWidth=p),p||10}function ca(i){for(var s=i.display,c={},u={},p=s.gutters.clientLeft,v=s.gutters.firstChild,m=0;v;v=v.nextSibling,++m){var _=i.display.gutterSpecs[m].className;c[_]=v.offsetLeft+v.clientLeft+p,u[_]=v.clientWidth}return{fixedPos:qa(s),gutterTotalWidth:s.gutters.offsetWidth,gutterLeft:c,gutterWidth:u,wrapperWidth:s.wrapper.clientWidth}}function qa(i){return i.scroller.getBoundingClientRect().left-i.sizer.getBoundingClientRect().left}function Ku(i){var s=la(i.display),c=i.options.lineWrapping,u=c&&Math.max(5,i.display.scroller.clientWidth/ua(i.display)-3);return function(p){if(In(i.doc,p))return 0;var v=0;if(p.widgets)for(var m=0;m0&&(P=Ce(i.doc,C.line).text).length==C.ch){var q=Ct(P,P.length,i.options.tabSize)-P.length;C=O(C.line,Math.max(0,Math.round((v-S(i.display).left)/ua(i.display))-q))}return C}function _o(i,s){if(s>=i.display.viewTo||(s-=i.display.viewFrom,s<0))return null;for(var c=i.display.view,u=0;us)&&(p.updateLineNumbers=s),i.curOp.viewChanged=!0,s>=p.viewTo)mn&&Zn(i.doc,s)p.viewFrom?Yo(i):(p.viewFrom+=u,p.viewTo+=u);else if(s<=p.viewFrom&&c>=p.viewTo)Yo(i);else if(s<=p.viewFrom){var v=Zs(i,c,c+u,1);v?(p.view=p.view.slice(v.index),p.viewFrom=v.lineN,p.viewTo+=u):Yo(i)}else if(c>=p.viewTo){var m=Zs(i,s,s,-1);m?(p.view=p.view.slice(0,m.index),p.viewTo=m.lineN):Yo(i)}else{var _=Zs(i,s,s,-1),C=Zs(i,c,c+u,1);_&&C?(p.view=p.view.slice(0,_.index).concat(Pi(i,_.lineN,C.lineN)).concat(p.view.slice(C.index)),p.viewTo+=u):Yo(i)}var P=p.externalMeasured;P&&(c=p.lineN&&s=u.viewTo)){var v=u.view[_o(i,s)];if(v.node!=null){var m=v.changes||(v.changes=[]);zt(m,c)==-1&&m.push(c)}}}function Yo(i){i.display.viewFrom=i.display.viewTo=i.doc.first,i.display.view=[],i.display.viewOffset=0}function Zs(i,s,c,u){var p=_o(i,s),v,m=i.display.view;if(!mn||c==i.doc.first+i.doc.size)return{index:p,lineN:c};for(var _=i.display.viewFrom,C=0;C0){if(p==m.length-1)return null;v=_+m[p].size-s,p++}else v=_-s;s+=v,c+=v}for(;Zn(i.doc,c)!=c;){if(p==(u<0?0:m.length-1))return null;c+=u*m[p-(u<0?1:0)].size,p+=u}return{index:p,lineN:c}}function Js(i,s,c){var u=i.display,p=u.view;p.length==0||s>=u.viewTo||c<=u.viewFrom?(u.view=Pi(i,s,c),u.viewFrom=s):(u.viewFrom>s?u.view=Pi(i,s,u.viewFrom).concat(u.view):u.viewFromc&&(u.view=u.view.slice(0,_o(i,c)))),u.viewTo=c}function Rl(i){for(var s=i.display.view,c=0,u=0;u=i.display.viewTo||C.to().line0?m:i.defaultCharWidth())+"px"}if(u.other){var _=c.appendChild(A("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));_.style.display="",_.style.left=u.other.left+"px",_.style.top=u.other.top+"px",_.style.height=(u.other.bottom-u.other.top)*.85+"px"}}function ji(i,s){return i.top-s.top||i.left-s.left}function Fl(i,s,c){var u=i.display,p=i.doc,v=document.createDocumentFragment(),m=S(i.display),_=m.left,C=Math.max(u.sizerWidth,it(i)-u.sizer.offsetLeft)-m.right,P=p.direction=="ltr";function q(le,we,Le,ke){we<0&&(we=0),we=Math.round(we),ke=Math.round(ke),v.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+le+`px; + top: `+we+"px; width: "+(Le??C-le)+`px; + height: `+(ke-we)+"px"))}function at(le,we,Le){var ke=Ce(p,le),Xe=ke.text.length,dr,zr;function wr(jr,dn){return Mi(i,O(le,jr),"div",ke,dn)}function kn(jr,dn,Wr){var Ir=Ys(i,ke,null,jr),Mr=dn=="ltr"==(Wr=="after")?"left":"right",Cr=Wr=="after"?Ir.begin:Ir.end-(/\s/.test(ke.text.charAt(Ir.end-1))?2:1);return wr(Cr,Mr)[Mr]}var wn=Ee(ke,p.direction);return Jt(wn,we||0,Le??Xe,function(jr,dn,Wr,Ir){var Mr=Wr=="ltr",Cr=wr(jr,Mr?"left":"right"),bn=wr(dn-1,Mr?"right":"left"),xa=we==null&&jr==0,si=Le==null&&dn==Xe,an=Ir==0,bo=!wn||Ir==wn.length-1;if(bn.top-Cr.top<=3){var Kr=(P?xa:si)&&an,bu=(P?si:xa)&&bo,Do=Kr?_:(Mr?Cr:bn).left,jo=bu?C:(Mr?bn:Cr).right;q(Do,Cr.top,jo-Do,Cr.bottom)}else{var Wi,hn,Sa,Cu;Mr?(Wi=P&&xa&&an?_:Cr.left,hn=P?C:kn(jr,Wr,"before"),Sa=P?_:kn(dn,Wr,"after"),Cu=P&&si&&bo?C:bn.right):(Wi=P?kn(jr,Wr,"before"):_,hn=!P&&xa&&an?C:Cr.right,Sa=!P&&si&&bo?_:bn.left,Cu=P?kn(dn,Wr,"after"):C),q(Wi,Cr.top,hn-Wi,Cr.bottom),Cr.bottom0?s.blinker=setInterval(function(){i.hasFocus()||Jo(i),s.cursorDiv.style.visibility=(c=!c)?"":"hidden"},i.options.cursorBlinkRate):i.options.cursorBlinkRate<0&&(s.cursorDiv.style.visibility="hidden")}}function Ii(i){i.hasFocus()||(i.display.input.focus(),i.state.focused||Qs(i))}function Zo(i){i.state.delayingBlurEvent=!0,setTimeout(function(){i.state.delayingBlurEvent&&(i.state.delayingBlurEvent=!1,i.state.focused&&Jo(i))},100)}function Qs(i,s){i.state.delayingBlurEvent&&!i.state.draggingText&&(i.state.delayingBlurEvent=!1),i.options.readOnly!="nocursor"&&(i.state.focused||(nr(i,"focus",i,s),i.state.focused=!0,ct(i.display.wrapper,"CodeMirror-focused"),!i.curOp&&i.display.selForContextMenu!=i.doc.sel&&(i.display.input.reset(),x&&setTimeout(function(){return i.display.input.reset(!0)},20)),i.display.input.receivedFocus()),Xo(i))}function Jo(i,s){i.state.delayingBlurEvent||(i.state.focused&&(nr(i,"blur",i,s),i.state.focused=!1,X(i.display.wrapper,"CodeMirror-focused")),clearInterval(i.display.blinker),setTimeout(function(){i.state.focused||(i.display.shift=!1)},150))}function tl(i){for(var s=i.display,c=s.lineDiv.offsetTop,u=Math.max(0,s.scroller.getBoundingClientRect().top),p=s.lineDiv.getBoundingClientRect().top,v=0,m=0;m.005||gt<-.005)&&(pi.display.sizerWidth){var Ut=Math.ceil(q/ua(i.display));Ut>i.display.maxLineLength&&(i.display.maxLineLength=Ut,i.display.maxLine=_.line,i.display.maxLineChanged=!0)}}}Math.abs(v)>2&&(s.scroller.scrollTop+=v)}function $u(i){if(i.widgets)for(var s=0;s=m&&(v=$n(s,Ar(Ce(s,C))-i.wrapper.clientHeight),m=C)}return{from:v,to:Math.max(m,v+1)}}function rl(i,s){if(!Qe(i,"scrollCursorIntoView")){var c=i.display,u=c.sizer.getBoundingClientRect(),p=null,v=c.wrapper.ownerDocument;if(s.top+u.top<0?p=!0:s.bottom+u.top>(v.defaultView.innerHeight||v.documentElement.clientHeight)&&(p=!1),p!=null&&!xt){var m=A("div","​",null,`position: absolute; + top: `+(s.top-c.viewOffset-$o(i.display))+`px; + height: `+(s.bottom-s.top+I(i)+c.barHeight)+`px; + left: `+s.left+"px; width: "+Math.max(2,s.right-s.left)+"px;");i.display.lineSpace.appendChild(m),m.scrollIntoView(p),i.display.lineSpace.removeChild(m)}}}function Mf(i,s,c,u){u==null&&(u=0);var p;!i.options.lineWrapping&&s==c&&(c=s.sticky=="before"?O(s.line,s.ch+1,"before"):s,s=s.ch?O(s.line,s.sticky=="before"?s.ch-1:s.ch,"after"):s);for(var v=0;v<5;v++){var m=!1,_=Nn(i,s),C=!c||c==s?_:Nn(i,c);p={left:Math.min(_.left,C.left),top:Math.min(_.top,C.top)-u,right:Math.max(_.left,C.left),bottom:Math.max(_.bottom,C.bottom)+u};var P=Hl(i,p),q=i.doc.scrollTop,at=i.doc.scrollLeft;if(P.scrollTop!=null&&(Za(i,P.scrollTop),Math.abs(i.doc.scrollTop-q)>1&&(m=!0)),P.scrollLeft!=null&&(Qo(i,P.scrollLeft),Math.abs(i.doc.scrollLeft-at)>1&&(m=!0)),!m)break}return p}function Lf(i,s){var c=Hl(i,s);c.scrollTop!=null&&Za(i,c.scrollTop),c.scrollLeft!=null&&Qo(i,c.scrollLeft)}function Hl(i,s){var c=i.display,u=la(i.display);s.top<0&&(s.top=0);var p=i.curOp&&i.curOp.scrollTop!=null?i.curOp.scrollTop:c.scroller.scrollTop,v=ut(i),m={};s.bottom-s.top>v&&(s.bottom=s.top+v);var _=i.doc.height+Wa(c),C=s.top_-u;if(s.topp+v){var q=Math.min(s.top,(P?_:s.bottom)-v);q!=p&&(m.scrollTop=q)}var at=i.options.fixedGutter?0:c.gutters.offsetWidth,bt=i.curOp&&i.curOp.scrollLeft!=null?i.curOp.scrollLeft:c.scroller.scrollLeft-at,gt=it(i)-c.gutters.offsetWidth,It=s.right-s.left>gt;return It&&(s.right=s.left+gt),s.left<10?m.scrollLeft=0:s.leftgt+bt-3&&(m.scrollLeft=s.right+(It?0:10)-gt),m}function Bl(i,s){s!=null&&(nl(i),i.curOp.scrollTop=(i.curOp.scrollTop==null?i.doc.scrollTop:i.curOp.scrollTop)+s)}function Vi(i){nl(i);var s=i.getCursor();i.curOp.scrollToPos={from:s,to:s,margin:i.options.cursorScrollMargin}}function Xa(i,s,c){(s!=null||c!=null)&&nl(i),s!=null&&(i.curOp.scrollLeft=s),c!=null&&(i.curOp.scrollTop=c)}function Po(i,s){nl(i),i.curOp.scrollToPos=s}function nl(i){var s=i.curOp.scrollToPos;if(s){i.curOp.scrollToPos=null;var c=Wu(i,s.from),u=Wu(i,s.to);Hr(i,c,u,s.margin)}}function Hr(i,s,c,u){var p=Hl(i,{left:Math.min(s.left,c.left),top:Math.min(s.top,c.top)-u,right:Math.max(s.right,c.right),bottom:Math.max(s.bottom,c.bottom)+u});Xa(i,p.scrollLeft,p.scrollTop)}function Za(i,s){Math.abs(i.doc.scrollTop-s)<2||(rt||zl(i,{top:s}),qu(i,s,!0),rt&&zl(i),es(i,100))}function qu(i,s,c){s=Math.max(0,Math.min(i.display.scroller.scrollHeight-i.display.scroller.clientHeight,s)),!(i.display.scroller.scrollTop==s&&!c)&&(i.doc.scrollTop=s,i.display.scrollbars.setScrollTop(s),i.display.scroller.scrollTop!=s&&(i.display.scroller.scrollTop=s))}function Qo(i,s,c,u){s=Math.max(0,Math.min(s,i.display.scroller.scrollWidth-i.display.scroller.clientWidth)),!((c?s==i.doc.scrollLeft:Math.abs(i.doc.scrollLeft-s)<2)&&!u)&&(i.doc.scrollLeft=s,ec(i),i.display.scroller.scrollLeft!=s&&(i.display.scroller.scrollLeft=s),i.display.scrollbars.setScrollLeft(s))}function Ja(i){var s=i.display,c=s.gutters.offsetWidth,u=Math.round(i.doc.height+Wa(i.display));return{clientHeight:s.scroller.clientHeight,viewHeight:s.wrapper.clientHeight,scrollWidth:s.scroller.scrollWidth,clientWidth:s.scroller.clientWidth,viewWidth:s.wrapper.clientWidth,barLeft:i.options.fixedGutter?c:0,docHeight:u,scrollHeight:u+I(i)+s.barHeight,nativeBarWidth:s.nativeBarWidth,gutterWidth:c}}var Ri=function(i,s,c){this.cm=c;var u=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),p=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");u.tabIndex=p.tabIndex=-1,i(u),i(p),ge(u,"scroll",function(){u.clientHeight&&s(u.scrollTop,"vertical")}),ge(p,"scroll",function(){p.clientWidth&&s(p.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,M&&N<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ri.prototype.update=function(i){var s=i.scrollWidth>i.clientWidth+1,c=i.scrollHeight>i.clientHeight+1,u=i.nativeBarWidth;if(c){this.vert.style.display="block",this.vert.style.bottom=s?u+"px":"0";var p=i.viewHeight-(s?u:0);this.vert.firstChild.style.height=Math.max(0,i.scrollHeight-i.clientHeight+p)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(s){this.horiz.style.display="block",this.horiz.style.right=c?u+"px":"0",this.horiz.style.left=i.barLeft+"px";var v=i.viewWidth-i.barLeft-(c?u:0);this.horiz.firstChild.style.width=Math.max(0,i.scrollWidth-i.clientWidth+v)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&i.clientHeight>0&&(u==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:c?u:0,bottom:s?u:0}},Ri.prototype.setScrollLeft=function(i){this.horiz.scrollLeft!=i&&(this.horiz.scrollLeft=i),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ri.prototype.setScrollTop=function(i){this.vert.scrollTop!=i&&(this.vert.scrollTop=i),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ri.prototype.zeroWidthHack=function(){var i=yt&&!pt?"12px":"18px";this.horiz.style.height=this.vert.style.width=i,this.horiz.style.visibility=this.vert.style.visibility="hidden",this.disableHoriz=new Rt,this.disableVert=new Rt},Ri.prototype.enableZeroWidthBar=function(i,s,c){i.style.visibility="";function u(){var p=i.getBoundingClientRect(),v=c=="vert"?document.elementFromPoint(p.right-1,(p.top+p.bottom)/2):document.elementFromPoint((p.right+p.left)/2,p.bottom-1);v!=i?i.style.visibility="hidden":s.set(1e3,u)}s.set(1e3,u)},Ri.prototype.clear=function(){var i=this.horiz.parentNode;i.removeChild(this.horiz),i.removeChild(this.vert)};var Qa=function(){};Qa.prototype.update=function(){return{bottom:0,right:0}},Qa.prototype.setScrollLeft=function(){},Qa.prototype.setScrollTop=function(){},Qa.prototype.clear=function(){};function fa(i,s){s||(s=Ja(i));var c=i.display.barWidth,u=i.display.barHeight;Yu(i,s);for(var p=0;p<4&&c!=i.display.barWidth||u!=i.display.barHeight;p++)c!=i.display.barWidth&&i.options.lineWrapping&&tl(i),Yu(i,Ja(i)),c=i.display.barWidth,u=i.display.barHeight}function Yu(i,s){var c=i.display,u=c.scrollbars.update(s);c.sizer.style.paddingRight=(c.barWidth=u.right)+"px",c.sizer.style.paddingBottom=(c.barHeight=u.bottom)+"px",c.heightForcer.style.borderBottom=u.bottom+"px solid transparent",u.right&&u.bottom?(c.scrollbarFiller.style.display="block",c.scrollbarFiller.style.height=u.bottom+"px",c.scrollbarFiller.style.width=u.right+"px"):c.scrollbarFiller.style.display="",u.bottom&&i.options.coverGutterNextToScrollbar&&i.options.fixedGutter?(c.gutterFiller.style.display="block",c.gutterFiller.style.height=u.bottom+"px",c.gutterFiller.style.width=s.gutterWidth+"px"):c.gutterFiller.style.display=""}var Xu={native:Ri,null:Qa};function Zu(i){i.display.scrollbars&&(i.display.scrollbars.clear(),i.display.scrollbars.addClass&&X(i.display.wrapper,i.display.scrollbars.addClass)),i.display.scrollbars=new Xu[i.options.scrollbarStyle](function(s){i.display.wrapper.insertBefore(s,i.display.scrollbarFiller),ge(s,"mousedown",function(){i.state.focused&&setTimeout(function(){return i.display.input.focus()},0)}),s.setAttribute("cm-not-content","true")},function(s,c){c=="horizontal"?Qo(i,s):Za(i,s)},i),i.display.scrollbars.addClass&&ct(i.display.wrapper,i.display.scrollbars.addClass)}var Df=0;function Ao(i){i.curOp={cm:i,viewChanged:!1,startHeight:i.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Df,markArrays:null},oa(i.curOp)}function Ni(i){var s=i.curOp;s&&Go(s,function(c){for(var u=0;u=c.viewTo)||c.maxLineChanged&&s.options.lineWrapping,i.update=i.mustUpdate&&new al(s,i.mustUpdate&&{top:i.scrollTop,ensure:i.scrollToPos},i.forceUpdate)}function il(i){i.updatedDisplay=i.mustUpdate&&Ul(i.cm,i.update)}function jf(i){var s=i.cm,c=s.display;i.updatedDisplay&&tl(s),i.barMeasure=Ja(s),c.maxLineChanged&&!s.options.lineWrapping&&(i.adjustWidthTo=ce(s,c.maxLine,c.maxLine.text.length).left+3,s.display.sizerWidth=i.adjustWidthTo,i.barMeasure.scrollWidth=Math.max(c.scroller.clientWidth,c.sizer.offsetLeft+i.adjustWidthTo+I(s)+s.display.barWidth),i.maxScrollLeft=Math.max(0,c.sizer.offsetLeft+i.adjustWidthTo-it(s))),(i.updatedDisplay||i.selectionChanged)&&(i.preparedSelection=c.input.prepareSelection())}function Ju(i){var s=i.cm;i.adjustWidthTo!=null&&(s.display.sizer.style.minWidth=i.adjustWidthTo+"px",i.maxScrollLeft=i.display.viewTo)){var c=+new Date+i.options.workTime,u=No(i,s.highlightFrontier),p=[];s.iter(u.line,Math.min(s.first+s.size,i.display.viewTo+500),function(v){if(u.line>=i.display.viewFrom){var m=v.styles,_=v.text.length>i.options.maxHighlightLength?Sn(s.mode,u.state):null,C=gi(i,v,u,!0);_&&(u.state=_),v.styles=C.styles;var P=v.styleClasses,q=C.classes;q?v.styleClasses=q:P&&(v.styleClasses=null);for(var at=!m||m.length!=v.styles.length||P!=q&&(!P||!q||P.bgClass!=q.bgClass||P.textClass!=q.textClass),bt=0;!at&&btc)return es(i,i.options.workDelay),!0}),s.highlightFrontier=u.line,s.modeFrontier=Math.max(s.modeFrontier,u.line),p.length&&An(i,function(){for(var v=0;v=c.viewFrom&&s.visible.to<=c.viewTo&&(c.updateLineNumbers==null||c.updateLineNumbers>=c.viewTo)&&c.renderedView==c.view&&Rl(i)==0)return!1;rc(i)&&(Yo(i),s.dims=ca(i));var p=u.first+u.size,v=Math.max(s.visible.from-i.options.viewportMargin,u.first),m=Math.min(p,s.visible.to+i.options.viewportMargin);c.viewFromm&&c.viewTo-m<20&&(m=Math.min(p,c.viewTo)),mn&&(v=Zn(i.doc,v),m=Ia(i.doc,m));var _=v!=c.viewFrom||m!=c.viewTo||c.lastWrapHeight!=s.wrapperHeight||c.lastWrapWidth!=s.wrapperWidth;Js(i,v,m),c.viewOffset=Ar(Ce(i.doc,c.viewFrom)),i.display.mover.style.top=c.viewOffset+"px";var C=Rl(i);if(!_&&C==0&&!s.force&&c.renderedView==c.view&&(c.updateLineNumbers==null||c.updateLineNumbers>=c.viewTo))return!1;var P=Nf(i);return C>4&&(c.lineDiv.style.display="none"),tc(i,c.updateLineNumbers,s.dims),C>4&&(c.lineDiv.style.display=""),c.renderedView=c.view,Ff(P),z(c.cursorDiv),z(c.selectionDiv),c.gutters.style.height=c.sizer.style.minHeight=0,_&&(c.lastWrapHeight=s.wrapperHeight,c.lastWrapWidth=s.wrapperWidth,es(i,400)),c.updateLineNumbers=null,!0}function Qu(i,s){for(var c=s.viewport,u=!0;;u=!1){if(!u||!i.options.lineWrapping||s.oldDisplayWidth==it(i)){if(c&&c.top!=null&&(c={top:Math.min(i.doc.height+Wa(i.display)-ut(i),c.top)}),s.visible=el(i.display,i.doc,c),s.visible.from>=i.display.viewFrom&&s.visible.to<=i.display.viewTo)break}else u&&(s.visible=el(i.display,i.doc,c));if(!Ul(i,s))break;tl(i);var p=Ja(i);Ya(i),fa(i,p),Kl(i,p),s.force=!1}s.signal(i,"update",i),(i.display.viewFrom!=i.display.reportedViewFrom||i.display.viewTo!=i.display.reportedViewTo)&&(s.signal(i,"viewportChange",i,i.display.viewFrom,i.display.viewTo),i.display.reportedViewFrom=i.display.viewFrom,i.display.reportedViewTo=i.display.viewTo)}function zl(i,s){var c=new al(i,s);if(Ul(i,c)){tl(i),Qu(i,c);var u=Ja(i);Ya(i),fa(i,u),Kl(i,u),c.finish()}}function tc(i,s,c){var u=i.display,p=i.options.lineNumbers,v=u.lineDiv,m=v.firstChild;function _(It){var Ut=It.nextSibling;return x&&yt&&i.display.currentWheelTarget==It?It.style.display="none":It.parentNode.removeChild(It),Ut}for(var C=u.view,P=u.viewFrom,q=0;q-1&&(gt=!1),Ha(i,at,P,c)),gt&&(z(at.lineNumber),at.lineNumber.appendChild(document.createTextNode(io(i.options,P)))),m=at.node.nextSibling}P+=at.size}for(;m;)m=_(m)}function Wl(i){var s=i.gutters.offsetWidth;i.sizer.style.marginLeft=s+"px",yr(i,"gutterChanged",i)}function Kl(i,s){i.display.sizer.style.minHeight=s.docHeight+"px",i.display.heightForcer.style.top=s.docHeight+"px",i.display.gutters.style.height=s.docHeight+i.display.barHeight+I(i)+"px"}function ec(i){var s=i.display,c=s.view;if(!(!s.alignWidgets&&(!s.gutters.firstChild||!i.options.fixedGutter))){for(var u=qa(s)-s.scroller.scrollLeft+i.doc.scrollLeft,p=s.gutters.offsetWidth,v=u+"px",m=0;m=105&&(p.wrapper.style.clipPath="inset(0px)"),p.wrapper.setAttribute("translate","no"),M&&N<8&&(p.gutters.style.zIndex=-1,p.scroller.style.paddingRight=0),!x&&!(rt&&Tt)&&(p.scroller.draggable=!0),i&&(i.appendChild?i.appendChild(p.wrapper):i(p.wrapper)),p.viewFrom=p.viewTo=s.first,p.reportedViewFrom=p.reportedViewTo=s.first,p.view=[],p.renderedView=null,p.externalMeasured=null,p.viewOffset=0,p.lastWrapHeight=p.lastWrapWidth=0,p.updateLineNumbers=null,p.nativeBarWidth=p.barHeight=p.barWidth=0,p.scrollbarsClipped=!1,p.lineNumWidth=p.lineNumInnerWidth=p.lineNumChars=null,p.alignWidgets=!1,p.cachedCharWidth=p.cachedTextHeight=p.cachedPaddingH=null,p.maxLine=null,p.maxLineLength=0,p.maxLineChanged=!1,p.wheelDX=p.wheelDY=p.wheelStartX=p.wheelStartY=null,p.shift=!1,p.selForContextMenu=null,p.activeTouch=null,p.gutterSpecs=Gl(u.gutters,u.lineNumbers),nc(p),c.init(p)}var sl=0,ko=null;M?ko=-.53:rt?ko=15:L?ko=-.7:G&&(ko=-1/3);function oc(i){var s=i.wheelDeltaX,c=i.wheelDeltaY;return s==null&&i.detail&&i.axis==i.HORIZONTAL_AXIS&&(s=i.detail),c==null&&i.detail&&i.axis==i.VERTICAL_AXIS?c=i.detail:c==null&&(c=i.wheelDelta),{x:s,y:c}}function Bf(i){var s=oc(i);return s.x*=ko,s.y*=ko,s}function ic(i,s){L&&D==102&&(i.display.chromeScrollHack==null?i.display.sizer.style.pointerEvents="none":clearTimeout(i.display.chromeScrollHack),i.display.chromeScrollHack=setTimeout(function(){i.display.chromeScrollHack=null,i.display.sizer.style.pointerEvents=""},100));var c=oc(s),u=c.x,p=c.y,v=ko;s.deltaMode===0&&(u=s.deltaX,p=s.deltaY,v=1);var m=i.display,_=m.scroller,C=_.scrollWidth>_.clientWidth,P=_.scrollHeight>_.clientHeight;if(u&&C||p&&P){if(p&&yt&&x){t:for(var q=s.target,at=m.view;q!=_;q=q.parentNode)for(var bt=0;bt=0&&K(i,u.to())<=0)return c}return-1};var ur=function(i,s){this.anchor=i,this.head=s};ur.prototype.from=function(){return er(this.anchor,this.head)},ur.prototype.to=function(){return Ae(this.anchor,this.head)},ur.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function fo(i,s,c){var u=i&&i.options.selectionsMayTouch,p=s[c];s.sort(function(bt,gt){return K(bt.from(),gt.from())}),c=zt(s,p);for(var v=1;v0:C>=0){var P=er(_.from(),m.from()),q=Ae(_.to(),m.to()),at=_.empty()?m.from()==m.head:_.from()==_.head;v<=c&&--c,s.splice(--v,2,new ur(at?q:P,at?P:q))}}return new Fn(s,c)}function ti(i,s){return new Fn([new ur(i,s||i)],0)}function ei(i){return i.text?O(i.from.line+i.text.length-1,he(i.text).length+(i.text.length==1?i.from.ch:0)):i.to}function ac(i,s){if(K(i,s.from)<0)return i;if(K(i,s.to)<=0)return ei(s);var c=i.line+s.text.length-(s.to.line-s.from.line)-1,u=i.ch;return i.line==s.to.line&&(u+=ei(s).ch-s.to.ch),O(c,u)}function $l(i,s){for(var c=[],u=0;u1&&i.remove(_.line+1,It-1),i.insert(_.line+1,se)}yr(i,"change",i,s)}function ri(i,s,c){function u(p,v,m){if(p.linked)for(var _=0;_1&&!i.done[i.done.length-2].ranges)return i.done.pop(),he(i.done)}function fc(i,s,c,u){var p=i.history;p.undone.length=0;var v=+new Date,m,_;if((p.lastOp==u||p.lastOrigin==s.origin&&s.origin&&(s.origin.charAt(0)=="+"&&p.lastModTime>v-(i.cm?i.cm.options.historyEventDelay:500)||s.origin.charAt(0)=="*"))&&(m=Wf(p,p.lastOp==u)))_=he(m.changes),K(s.from,s.to)==0&&K(s.from,_.to)==0?_.to=ei(s):m.changes.push(Yl(i,s));else{var C=he(p.done);for((!C||!C.ranges)&&ul(i.sel,p.done),m={changes:[Yl(i,s)],generation:p.generation},p.done.push(m);p.done.length>p.undoDepth;)p.done.shift(),p.done[0].ranges||p.done.shift()}p.done.push(c),p.generation=++p.maxGeneration,p.lastModTime=p.lastSelTime=v,p.lastOp=p.lastSelOp=u,p.lastOrigin=p.lastSelOrigin=s.origin,_||nr(i,"historyAdded")}function Kf(i,s,c,u){var p=s.charAt(0);return p=="*"||p=="+"&&c.ranges.length==u.ranges.length&&c.somethingSelected()==u.somethingSelected()&&new Date-i.history.lastSelTime<=(i.cm?i.cm.options.historyEventDelay:500)}function Gf(i,s,c,u){var p=i.history,v=u&&u.origin;c==p.lastSelOp||v&&p.lastSelOrigin==v&&(p.lastModTime==p.lastSelTime&&p.lastOrigin==v||Kf(i,v,he(p.done),s))?p.done[p.done.length-1]=s:ul(s,p.done),p.lastSelTime=+new Date,p.lastSelOrigin=v,p.lastSelOp=c,u&&u.clearRedo!==!1&&cc(p.undone)}function ul(i,s){var c=he(s);c&&c.ranges&&c.equals(i)||s.push(i)}function da(i,s,c,u){var p=s["spans_"+i.id],v=0;i.iter(Math.max(i.first,c),Math.min(i.first+i.size,u),function(m){m.markedSpans&&((p||(p=s["spans_"+i.id]={}))[v]=m.markedSpans),++v})}function $f(i){if(!i)return null;for(var s,c=0;c-1&&(he(_)[at]=P[at],delete P[at])}}return u}function Zl(i,s,c,u){if(u){var p=i.anchor;if(c){var v=K(s,p)<0;v!=K(c,p)<0?(p=s,s=c):v!=K(s,c)<0&&(s=c)}return new ur(p,s)}else return new ur(c||s,s)}function os(i,s,c,u,p){p==null&&(p=i.cm&&(i.cm.display.shift||i.extend)),nn(i,new Fn([Zl(i.sel.primary(),s,c,p)],0),u)}function dc(i,s,c){for(var u=[],p=i.cm&&(i.cm.display.shift||i.extend),v=0;v=s.ch:_.to>s.ch))){if(p&&(nr(C,"beforeCursorEnter"),C.explicitlyCleared))if(v.markedSpans){--m;continue}else break;if(!C.atomic)continue;if(c){var at=C.find(u<0?1:-1),bt=void 0;if((u<0?q:P)&&(at=Ql(i,at,-u,at&&at.line==s.line?v:null)),at&&at.line==s.line&&(bt=K(at,c))&&(u<0?bt<0:bt>0))return Hi(i,at,s,u,p)}var gt=C.find(u<0?-1:1);return(u<0?P:q)&&(gt=Ql(i,gt,u,gt.line==s.line?v:null)),gt?Hi(i,gt,s,u,p):null}}return s}function fl(i,s,c,u,p){var v=u||1,m=Hi(i,s,c,v,p)||!p&&Hi(i,s,c,v,!0)||Hi(i,s,c,-v,p)||!p&&Hi(i,s,c,-v,!0);return m||(i.cantEdit=!0,O(i.first,0))}function Ql(i,s,c,u){return c<0&&s.ch==0?s.line>i.first?Se(i,O(s.line-1)):null:c>0&&s.ch==(u||Ce(i,s.line)).text.length?s.line=0;--p)yc(i,{from:u[p].from,to:u[p].to,text:p?[""]:s.text,origin:s.origin});else yc(i,s)}}function yc(i,s){if(!(s.text.length==1&&s.text[0]==""&&K(s.from,s.to)==0)){var c=$l(i,s);fc(i,s,c,i.cm?i.cm.curOp.id:NaN),ss(i,s,c,ea(i,s));var u=[];ri(i,function(p,v){!v&&zt(u,p.history)==-1&&(ls(p.history,s),u.push(p.history)),ss(p,s,null,ea(p,s))})}}function pl(i,s,c){var u=i.cm&&i.cm.state.suppressEdits;if(!(u&&!c)){for(var p=i.history,v,m=i.sel,_=s=="undo"?p.done:p.undone,C=s=="undo"?p.undone:p.done,P=0;P<_.length&&(v=_[P],!(c?v.ranges&&!v.equals(i.sel):!v.ranges));P++);if(P!=_.length){for(p.lastOrigin=p.lastSelOrigin=null;;)if(v=_.pop(),v.ranges){if(ul(v,C),c&&!v.equals(i.sel)){nn(i,v,{clearRedo:!1});return}m=v}else if(u){_.push(v);return}else break;var q=[];ul(m,C),C.push({changes:q,generation:p.generation}),p.generation=v.generation||++p.maxGeneration;for(var at=Or(i,"beforeChange")||i.cm&&Or(i.cm,"beforeChange"),bt=function(Ut){var Qt=v.changes[Ut];if(Qt.origin=s,at&&!as(i,Qt,!1))return _.length=0,{};q.push(Yl(i,Qt));var se=Ut?$l(i,Qt):he(_);ss(i,Qt,se,pc(i,Qt)),!Ut&&i.cm&&i.cm.scrollIntoView({from:Qt.from,to:ei(Qt)});var ye=[];ri(i,function(le,we){!we&&zt(ye,le.history)==-1&&(ls(le.history,Qt),ye.push(le.history)),ss(le,Qt,null,pc(le,Qt))})},gt=v.changes.length-1;gt>=0;--gt){var It=bt(gt);if(It)return It.v}}}}function _c(i,s){if(s!=0&&(i.first+=s,i.sel=new Fn(T(i.sel.ranges,function(p){return new ur(O(p.anchor.line+s,p.anchor.ch),O(p.head.line+s,p.head.ch))}),i.sel.primIndex),i.cm)){rn(i.cm,i.first,i.first-s,s);for(var c=i.cm.display,u=c.viewFrom;ui.lastLine())){if(s.from.linev&&(s={from:s.from,to:O(v,Ce(i,v).text.length),text:[s.text[0]],origin:s.origin}),s.removed=Tn(i,s.from,s.to),c||(c=$l(i,s)),i.cm?Yf(i.cm,s,u):pn(i,s,u),cl(i,c,qt),i.cantEdit&&fl(i,O(i.firstLine(),0))&&(i.cantEdit=!1)}}function Yf(i,s,c){var u=i.doc,p=i.display,v=s.from,m=s.to,_=!1,C=v.line;i.options.lineWrapping||(C=qe(Pn(Ce(u,v.line))),u.iter(C,m.line+1,function(gt){if(gt==p.maxLine)return _=!0,!0})),u.sel.contains(s.from,s.to)>-1&&Xt(i),pn(u,s,c,Ku(i)),i.options.lineWrapping||(u.iter(C,v.line+s.text.length,function(gt){var It=Ge(gt);It>p.maxLineLength&&(p.maxLine=gt,p.maxLineLength=It,p.maxLineChanged=!0,_=!1)}),_&&(i.curOp.updateMaxLine=!0)),Hs(u,v.line),es(i,400);var P=s.text.length-(m.line-v.line)-1;s.full?rn(i):v.line==m.line&&s.text.length==1&&!lc(i.doc,s)?qo(i,v.line,"text"):rn(i,v.line,m.line+1,P);var q=Or(i,"changes"),at=Or(i,"change");if(at||q){var bt={from:v,to:m,text:s.text,removed:s.removed,origin:s.origin};at&&yr(i,"change",i,bt),q&&(i.curOp.changeObjs||(i.curOp.changeObjs=[])).push(bt)}i.display.selForContextMenu=null}function Bi(i,s,c,u,p){var v;u||(u=c),K(u,c)<0&&(v=[u,c],c=v[0],u=v[1]),typeof s=="string"&&(s=i.splitLines(s)),ha(i,{from:c,to:u,text:s,origin:p})}function tu(i,s,c,u){c1||!(this.children[0]instanceof va))){var _=[];this.collapse(_),this.children=[new va(_)],this.children[0].parent=this}},collapse:function(i){for(var s=0;s50){for(var m=p.lines.length%25+25,_=m;_10);i.parent.maybeSpill()}},iterN:function(i,s,c){for(var u=0;ui.display.maxLineLength&&(i.display.maxLine=P,i.display.maxLineLength=q,i.display.maxLineChanged=!0)}u!=null&&i&&this.collapsed&&rn(i,u,p+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,i&&gc(i.doc)),i&&yr(i,"markerCleared",i,this,u,p),s&&Ni(i),this.parent&&this.parent.clear()}},oi.prototype.find=function(i,s){i==null&&this.type=="bookmark"&&(i=1);for(var c,u,p=0;p0||m==0&&v.clearWhenEmpty!==!1)return v;if(v.replacedWith&&(v.collapsed=!0,v.widgetNode=tt("span",[v.replacedWith],"CodeMirror-widget"),u.handleMouseEvents||v.widgetNode.setAttribute("cm-ignore-events","true"),u.insertLeft&&(v.widgetNode.insertLeft=!0)),v.collapsed){if(yn(i,s.line,s,c,v)||s.line!=c.line&&yn(i,c.line,s,c,v))throw new Error("Inserting collapsed marker partially overlapping an existing one");$r()}v.addToHistory&&fc(i,{from:s,to:c,origin:"markText"},i.sel,NaN);var _=s.line,C=i.cm,P;if(i.iter(_,c.line+1,function(at){C&&v.collapsed&&!C.options.lineWrapping&&Pn(at)==C.display.maxLine&&(P=!0),v.collapsed&&_!=s.line&&vn(at,0),ao(at,new _i(v,_==s.line?s.ch:null,_==c.line?c.ch:null),i.cm&&i.cm.curOp),++_}),v.collapsed&&i.iter(s.line,c.line+1,function(at){In(i,at)&&vn(at,0)}),v.clearOnEnter&&ge(v,"beforeCursorEnter",function(){return v.clear()}),v.readOnly&&(Da(),(i.history.done.length||i.history.undone.length)&&i.clearHistory()),v.collapsed&&(v.id=++Cc,v.atomic=!0),C){if(P&&(C.curOp.updateMaxLine=!0),v.collapsed)rn(C,s.line,c.line+1);else if(v.className||v.startStyle||v.endStyle||v.css||v.attributes||v.title)for(var q=s.line;q<=c.line;q++)qo(C,q,"text");v.atomic&&gc(C.doc),yr(C,"markerAdded",C,v)}return v}var ma=function(i,s){this.markers=i,this.primary=s;for(var c=0;c=0;C--)ha(this,u[C]);_?hc(this,_):this.cm&&Vi(this.cm)}),undo:Ur(function(){pl(this,"undo")}),redo:Ur(function(){pl(this,"redo")}),undoSelection:Ur(function(){pl(this,"undo",!0)}),redoSelection:Ur(function(){pl(this,"redo",!0)}),setExtending:function(i){this.extend=i},getExtending:function(){return this.extend},historySize:function(){for(var i=this.history,s=0,c=0,u=0;u=i.ch)&&s.push(p.marker.parent||p.marker)}return s},findMarks:function(i,s,c){i=Se(this,i),s=Se(this,s);var u=[],p=i.line;return this.iter(i.line,s.line+1,function(v){var m=v.markedSpans;if(m)for(var _=0;_=C.to||C.from==null&&p!=i.line||C.from!=null&&p==s.line&&C.from>=s.ch)&&(!c||c(C.marker))&&u.push(C.marker.parent||C.marker)}++p}),u},getAllMarks:function(){var i=[];return this.iter(function(s){var c=s.markedSpans;if(c)for(var u=0;ui)return s=i,!0;i-=v,++c}),Se(this,O(c,s))},indexFromPos:function(i){i=Se(this,i);var s=i.ch;if(i.lines&&(s=i.from),i.to!=null&&i.to-1){s.state.draggingText(i),setTimeout(function(){return s.display.input.focus()},20);return}try{var q=i.dataTransfer.getData("Text");if(q){var at;if(s.state.draggingText&&!s.state.draggingText.copy&&(at=s.listSelections()),cl(s.doc,ti(c,c)),at)for(var bt=0;bt=0;_--)Bi(i.doc,"",u[_].from,u[_].to,"+delete");Vi(i)})}function au(i,s,c){var u=De(i.text,s+c,c);return u<0||u>i.text.length?null:u}function su(i,s,c){var u=au(i,s.ch,c);return u==null?null:new O(s.line,u,c<0?"after":"before")}function lu(i,s,c,u,p){if(i){s.doc.direction=="rtl"&&(p=-p);var v=Ee(c,s.doc.direction);if(v){var m=p<0?he(v):v[0],_=p<0==(m.level==1),C=_?"after":"before",P;if(m.level>0||s.doc.direction=="rtl"){var q=Ie(s,c);P=p<0?c.text.length-1:0;var at=lr(s,q,P).top;P=ee(function(bt){return lr(s,q,bt).top==at},p<0==(m.level==1)?m.from:m.to-1,P),C=="before"&&(P=au(c,P,1))}else P=p<0?m.to:m.from;return new O(u,P,C)}}return new O(u,p<0?c.text.length:0,p<0?"before":"after")}function ep(i,s,c,u){var p=Ee(s,i.doc.direction);if(!p)return su(s,c,u);c.ch>=s.text.length?(c.ch=s.text.length,c.sticky="before"):c.ch<=0&&(c.ch=0,c.sticky="after");var v=Te(p,c.ch,c.sticky),m=p[v];if(i.doc.direction=="ltr"&&m.level%2==0&&(u>0?m.to>c.ch:m.from=m.from&&bt>=q.begin)){var gt=at?"before":"after";return new O(c.line,bt,gt)}}var It=function(se,ye,le){for(var we=function(dr,zr){return zr?new O(c.line,_(dr,1),"before"):new O(c.line,dr,"after")};se>=0&&se0==(Le.level!=1),Xe=ke?le.begin:_(le.end,-1);if(Le.from<=Xe&&Xe0?q.end:_(q.begin,-1);return Qt!=null&&!(u>0&&Qt==s.text.length)&&(Ut=It(u>0?0:p.length-1,u,P(Qt)),Ut)?Ut:null}var ds={selectAll:is,singleSelection:function(i){return i.setSelection(i.getCursor("anchor"),i.getCursor("head"),qt)},killLine:function(i){return Ui(i,function(s){if(s.empty()){var c=Ce(i.doc,s.head.line).text.length;return s.head.ch==c&&s.head.line0)p=new O(p.line,p.ch+1),i.replaceRange(v.charAt(p.ch-1)+v.charAt(p.ch-2),O(p.line,p.ch-2),p,"+transpose");else if(p.line>i.doc.first){var m=Ce(i.doc,p.line-1).text;m&&(p=new O(p.line,1),i.replaceRange(v.charAt(0)+i.doc.lineSeparator()+m.charAt(m.length-1),O(p.line-1,m.length-1),p,"+transpose"))}}c.push(new ur(p,p))}i.setSelections(c)})},newlineAndIndent:function(i){return An(i,function(){for(var s=i.listSelections(),c=s.length-1;c>=0;c--)i.replaceRange(i.doc.lineSeparator(),s[c].anchor,s[c].head,"+input");s=i.listSelections();for(var u=0;ui&&K(s,this.pos)==0&&c==this.button};var ms,ys;function op(i,s){var c=+new Date;return ys&&ys.compare(c,i,s)?(ms=ys=null,"triple"):ms&&ms.compare(c,i,s)?(ys=new pu(c,i,s),ms=null,"double"):(ms=new pu(c,i,s),ys=null,"single")}function Rc(i){var s=this,c=s.display;if(!(Qe(s,i)||c.activeTouch&&c.input.supportsTouch())){if(c.input.ensurePolled(),c.shift=i.shiftKey,Rn(c,i)){x||(c.scroller.draggable=!1,setTimeout(function(){return c.scroller.draggable=!0},100));return}if(!du(s,i)){var u=Di(s,i),p=je(i),v=u?op(u,p):"single";Pe(s).focus(),p==1&&s.state.selectingText&&s.state.selectingText(i),!(u&&Nc(s,p,u,v,i))&&(p==1?u?ip(s,u,v,i):de(i)==c.scroller&&U(i):p==2?(u&&os(s.doc,u),setTimeout(function(){return c.input.focus()},20)):p==3&&(dt?s.display.input.onContextMenu(i):Zo(s)))}}}function Nc(i,s,c,u,p){var v="Click";return u=="double"?v="Double"+v:u=="triple"&&(v="Triple"+v),v=(s==1?"Left":s==2?"Middle":"Right")+v,vs(i,iu(v,p),p,function(m){if(typeof m=="string"&&(m=ds[m]),!m)return!1;var _=!1;try{i.isReadOnly()&&(i.state.suppressEdits=!0),_=m(i,c)!=ne}finally{i.state.suppressEdits=!1}return _})}function Fc(i,s,c){var u=i.getOption("configureMouse"),p=u?u(i,s,c):{};if(p.unit==null){var v=Kt?c.shiftKey&&c.metaKey:c.altKey;p.unit=v?"rectangle":s=="single"?"char":s=="double"?"word":"line"}return(p.extend==null||i.doc.extend)&&(p.extend=i.doc.extend||c.shiftKey),p.addNew==null&&(p.addNew=yt?c.metaKey:c.ctrlKey),p.moveOnDrag==null&&(p.moveOnDrag=!(yt?c.altKey:c.ctrlKey)),p}function ip(i,s,c,u){M?setTimeout(_e(Ii,i),0):i.curOp.focus=Pt(oe(i));var p=Fc(i,c,u),v=i.doc.sel,m;i.options.dragDrop&&tr&&!i.isReadOnly()&&c=="single"&&(m=v.contains(s))>-1&&(K((m=v.ranges[m]).from(),s)<0||s.xRel>0)&&(K(m.to(),s)>0||s.xRel<0)?ap(i,u,s,p):sp(i,u,s,p)}function ap(i,s,c,u){var p=i.display,v=!1,m=Br(i,function(P){x&&(p.scroller.draggable=!1),i.state.draggingText=!1,i.state.delayingBlurEvent&&(i.hasFocus()?i.state.delayingBlurEvent=!1:Zo(i)),Me(p.wrapper.ownerDocument,"mouseup",m),Me(p.wrapper.ownerDocument,"mousemove",_),Me(p.scroller,"dragstart",C),Me(p.scroller,"drop",m),v||(U(P),u.addNew||os(i.doc,c,null,null,u.extend),x&&!G||M&&N==9?setTimeout(function(){p.wrapper.ownerDocument.body.focus({preventScroll:!0}),p.input.focus()},20):p.input.focus())}),_=function(P){v=v||Math.abs(s.clientX-P.clientX)+Math.abs(s.clientY-P.clientY)>=10},C=function(){return v=!0};x&&(p.scroller.draggable=!0),i.state.draggingText=m,m.copy=!u.moveOnDrag,ge(p.wrapper.ownerDocument,"mouseup",m),ge(p.wrapper.ownerDocument,"mousemove",_),ge(p.scroller,"dragstart",C),ge(p.scroller,"drop",m),i.state.delayingBlurEvent=!0,setTimeout(function(){return p.input.focus()},20),p.scroller.dragDrop&&p.scroller.dragDrop()}function ai(i,s,c){if(c=="char")return new ur(s,s);if(c=="word")return i.findWordAt(s);if(c=="line")return new ur(O(s.line,0),Se(i.doc,O(s.line+1,0)));var u=c(i,s);return new ur(u.from,u.to)}function sp(i,s,c,u){M&&Zo(i);var p=i.display,v=i.doc;U(s);var m,_,C=v.sel,P=C.ranges;if(u.addNew&&!u.extend?(_=v.sel.contains(c),_>-1?m=P[_]:m=new ur(c,c)):(m=v.sel.primary(),_=v.sel.primIndex),u.unit=="rectangle")u.addNew||(m=new ur(c,c)),c=Di(i,s,!0,!0),_=-1;else{var q=ai(i,c,u.unit);u.extend?m=Zl(m,q.anchor,q.head,u.extend):m=q}u.addNew?_==-1?(_=P.length,nn(v,fo(i,P.concat([m]),_),{scroll:!1,origin:"*mouse"})):P.length>1&&P[_].empty()&&u.unit=="char"&&!u.extend?(nn(v,fo(i,P.slice(0,_).concat(P.slice(_+1)),0),{scroll:!1,origin:"*mouse"}),C=v.sel):Jl(v,_,m,me):(_=0,nn(v,new Fn([m],0),me),C=v.sel);var at=c;function bt(le){if(K(at,le)!=0)if(at=le,u.unit=="rectangle"){for(var we=[],Le=i.options.tabSize,ke=Ct(Ce(v,c.line).text,c.ch,Le),Xe=Ct(Ce(v,le.line).text,le.ch,Le),dr=Math.min(ke,Xe),zr=Math.max(ke,Xe),wr=Math.min(c.line,le.line),kn=Math.min(i.lastLine(),Math.max(c.line,le.line));wr<=kn;wr++){var wn=Ce(v,wr).text,jr=cr(wn,dr,Le);dr==zr?we.push(new ur(O(wr,jr),O(wr,jr))):wn.length>jr&&we.push(new ur(O(wr,jr),O(wr,cr(wn,zr,Le))))}we.length||we.push(new ur(c,c)),nn(v,fo(i,C.ranges.slice(0,_).concat(we),_),{origin:"*mouse",scroll:!1}),i.scrollIntoView(le)}else{var dn=m,Wr=ai(i,le,u.unit),Ir=dn.anchor,Mr;K(Wr.anchor,Ir)>0?(Mr=Wr.head,Ir=er(dn.from(),Wr.anchor)):(Mr=Wr.anchor,Ir=Ae(dn.to(),Wr.head));var Cr=C.ranges.slice(0);Cr[_]=lp(i,new ur(Se(v,Ir),Mr)),nn(v,fo(i,Cr,_),me)}}var gt=p.wrapper.getBoundingClientRect(),It=0;function Ut(le){var we=++It,Le=Di(i,le,!0,u.unit=="rectangle");if(Le)if(K(Le,at)!=0){i.curOp.focus=Pt(oe(i)),bt(Le);var ke=el(p,v);(Le.line>=ke.to||Le.linegt.bottom?20:0;Xe&&setTimeout(Br(i,function(){It==we&&(p.scroller.scrollTop+=Xe,Ut(le))}),50)}}function Qt(le){i.state.selectingText=!1,It=1/0,le&&(U(le),p.input.focus()),Me(p.wrapper.ownerDocument,"mousemove",se),Me(p.wrapper.ownerDocument,"mouseup",ye),v.history.lastSelOrigin=null}var se=Br(i,function(le){le.buttons===0||!je(le)?Qt(le):Ut(le)}),ye=Br(i,Qt);i.state.selectingText=ye,ge(p.wrapper.ownerDocument,"mousemove",se),ge(p.wrapper.ownerDocument,"mouseup",ye)}function lp(i,s){var c=s.anchor,u=s.head,p=Ce(i.doc,c.line);if(K(c,u)==0&&c.sticky==u.sticky)return s;var v=Ee(p);if(!v)return s;var m=Te(v,c.ch,c.sticky),_=v[m];if(_.from!=c.ch&&_.to!=c.ch)return s;var C=m+(_.from==c.ch==(_.level!=1)?0:1);if(C==0||C==v.length)return s;var P;if(u.line!=c.line)P=(u.line-c.line)*(i.doc.direction=="ltr"?1:-1)>0;else{var q=Te(v,u.ch,u.sticky),at=q-m||(u.ch-c.ch)*(_.level==1?-1:1);q==C-1||q==C?P=at<0:P=at>0}var bt=v[C+(P?-1:0)],gt=P==(bt.level==1),It=gt?bt.from:bt.to,Ut=gt?"after":"before";return c.ch==It&&c.sticky==Ut?s:new ur(new O(c.line,It,Ut),u)}function Hc(i,s,c,u){var p,v;if(s.touches)p=s.touches[0].clientX,v=s.touches[0].clientY;else try{p=s.clientX,v=s.clientY}catch{return!1}if(p>=Math.floor(i.display.gutters.getBoundingClientRect().right))return!1;u&&U(s);var m=i.display,_=m.lineDiv.getBoundingClientRect();if(v>_.bottom||!Or(i,c))return wt(s);v-=_.top-m.viewOffset;for(var C=0;C=p){var q=$n(i.doc,v),at=i.display.gutterSpecs[C];return nr(i,c,i,q,at.className,s),wt(s)}}}function du(i,s){return Hc(i,s,"gutterClick",!0)}function hu(i,s){Rn(i.display,s)||up(i,s)||Qe(i,s,"contextmenu")||dt||i.display.input.onContextMenu(s)}function up(i,s){return Or(i,"gutterContextMenu")?Hc(i,s,"gutterContextMenu",!1):!1}function Bc(i){i.display.wrapper.className=i.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+i.options.theme.replace(/(^|\s)\s*/g," cm-s-"),sa(i)}var ba={toString:function(){return"CodeMirror.Init"}},vu={},hl={};function cp(i){var s=i.optionHandlers;function c(u,p,v,m){i.defaults[u]=p,v&&(s[u]=m?function(_,C,P){P!=ba&&v(_,C,P)}:v)}i.defineOption=c,i.Init=ba,c("value","",function(u,p){return u.setValue(p)},!0),c("mode",null,function(u,p){u.doc.modeOption=p,ql(u)},!0),c("indentUnit",2,ql,!0),c("indentWithTabs",!1),c("smartIndent",!0),c("tabSize",4,function(u){ns(u),sa(u),rn(u)},!0),c("lineSeparator",null,function(u,p){if(u.doc.lineSep=p,!!p){var v=[],m=u.doc.first;u.doc.iter(function(C){for(var P=0;;){var q=C.text.indexOf(p,P);if(q==-1)break;P=q+p.length,v.push(O(m,q))}m++});for(var _=v.length-1;_>=0;_--)Bi(u.doc,p,v[_],O(v[_].line,v[_].ch+p.length))}}),c("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g,function(u,p,v){u.state.specialChars=new RegExp(p.source+(p.test(" ")?"":"| "),"g"),v!=ba&&u.refresh()}),c("specialCharPlaceholder",Ti,function(u){return u.refresh()},!0),c("electricChars",!0),c("inputStyle",Tt?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),c("spellcheck",!1,function(u,p){return u.getInputField().spellcheck=p},!0),c("autocorrect",!1,function(u,p){return u.getInputField().autocorrect=p},!0),c("autocapitalize",!1,function(u,p){return u.getInputField().autocapitalize=p},!0),c("rtlMoveVisually",!te),c("wholeLineUpdateBefore",!0),c("theme","default",function(u){Bc(u),rs(u)},!0),c("keyMap","default",function(u,p,v){var m=dl(p),_=v!=ba&&dl(v);_&&_.detach&&_.detach(u,m),m.attach&&m.attach(u,_||null)}),c("extraKeys",null),c("configureMouse",null),c("lineWrapping",!1,Uc,!0),c("gutters",[],function(u,p){u.display.gutterSpecs=Gl(p,u.options.lineNumbers),rs(u)},!0),c("fixedGutter",!0,function(u,p){u.display.gutters.style.left=p?qa(u.display)+"px":"0",u.refresh()},!0),c("coverGutterNextToScrollbar",!1,function(u){return fa(u)},!0),c("scrollbarStyle","native",function(u){Zu(u),fa(u),u.display.scrollbars.setScrollTop(u.doc.scrollTop),u.display.scrollbars.setScrollLeft(u.doc.scrollLeft)},!0),c("lineNumbers",!1,function(u,p){u.display.gutterSpecs=Gl(u.options.gutters,p),rs(u)},!0),c("firstLineNumber",1,rs,!0),c("lineNumberFormatter",function(u){return u},rs,!0),c("showCursorWhenSelecting",!1,Ya,!0),c("resetSelectionOnContextMenu",!0),c("lineWiseCopyCut",!0),c("pasteLinesPerSelection",!0),c("selectionsMayTouch",!1),c("readOnly",!1,function(u,p){p=="nocursor"&&(Jo(u),u.display.input.blur()),u.display.input.readOnlyChanged(p)}),c("screenReaderLabel",null,function(u,p){p=p===""?null:p,u.display.input.screenReaderLabelChanged(p)}),c("disableInput",!1,function(u,p){p||u.display.input.reset()},!0),c("dragDrop",!0,br),c("allowDropFileTypes",null),c("cursorBlinkRate",530),c("cursorScrollMargin",0),c("cursorHeight",1,Ya,!0),c("singleCursorHeightPerLine",!0,Ya,!0),c("workTime",100),c("workDelay",100),c("flattenSpans",!0,ns,!0),c("addModeClass",!1,ns,!0),c("pollInterval",100),c("undoDepth",200,function(u,p){return u.doc.history.undoDepth=p}),c("historyEventDelay",1250),c("viewportMargin",10,function(u){return u.refresh()},!0),c("maxHighlightLength",1e4,ns,!0),c("moveInputWithCursor",!0,function(u,p){p||u.display.input.resetPosition()}),c("tabindex",null,function(u,p){return u.display.input.getField().tabIndex=p||""}),c("autofocus",null),c("direction","ltr",function(u,p){return u.doc.setDirection(p)},!0),c("phrases",null)}function br(i,s,c){var u=c&&c!=ba;if(!s!=!u){var p=i.display.dragFunctions,v=s?ge:Me;v(i.display.scroller,"dragstart",p.start),v(i.display.scroller,"dragenter",p.enter),v(i.display.scroller,"dragover",p.over),v(i.display.scroller,"dragleave",p.leave),v(i.display.scroller,"drop",p.drop)}}function Uc(i){i.options.lineWrapping?(ct(i.display.wrapper,"CodeMirror-wrap"),i.display.sizer.style.minWidth="",i.display.sizerWidth=null):(X(i.display.wrapper,"CodeMirror-wrap"),zo(i)),Vl(i),rn(i),sa(i),setTimeout(function(){return fa(i)},100)}function gr(i,s){var c=this;if(!(this instanceof gr))return new gr(i,s);this.options=s=s?ve(s):{},ve(vu,s,!1);var u=s.value;typeof u=="string"?u=new _n(u,s.mode,null,s.lineSeparator,s.direction):s.mode&&(u.modeOption=s.mode),this.doc=u;var p=new gr.inputStyles[s.inputStyle](this),v=this.display=new Hf(i,u,p,s);v.wrapper.CodeMirror=this,Bc(this),s.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Zu(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new Rt,keySeq:null,specialChars:null},s.autofocus&&!Tt&&v.input.focus(),M&&N<11&&setTimeout(function(){return c.display.input.reset(!0)},20),_s(this),Tc(),Ao(this),this.curOp.forceUpdate=!0,pa(this,u),s.autofocus&&!Tt||this.hasFocus()?setTimeout(function(){c.hasFocus()&&!c.state.focused&&Qs(c)},20):Jo(this);for(var m in hl)hl.hasOwnProperty(m)&&hl[m](this,s[m],ba);rc(this),s.finishInit&&s.finishInit(this);for(var _=0;_20*20}ge(s.scroller,"touchstart",function(C){if(!Qe(i,C)&&!v(C)&&!du(i,C)){s.input.ensurePolled(),clearTimeout(c);var P=+new Date;s.activeTouch={start:P,moved:!1,prev:P-u.end<=300?u:null},C.touches.length==1&&(s.activeTouch.left=C.touches[0].pageX,s.activeTouch.top=C.touches[0].pageY)}}),ge(s.scroller,"touchmove",function(){s.activeTouch&&(s.activeTouch.moved=!0)}),ge(s.scroller,"touchend",function(C){var P=s.activeTouch;if(P&&!Rn(s,C)&&P.left!=null&&!P.moved&&new Date-P.start<300){var q=i.coordsChar(s.activeTouch,"page"),at;!P.prev||m(P,P.prev)?at=new ur(q,q):!P.prev.prev||m(P,P.prev.prev)?at=i.findWordAt(q):at=new ur(O(q.line,0),Se(i.doc,O(q.line+1,0))),i.setSelection(at.anchor,at.head),i.focus(),U(C)}p()}),ge(s.scroller,"touchcancel",p),ge(s.scroller,"scroll",function(){s.scroller.clientHeight&&(Za(i,s.scroller.scrollTop),Qo(i,s.scroller.scrollLeft,!0),nr(i,"scroll",i))}),ge(s.scroller,"mousewheel",function(C){return ic(i,C)}),ge(s.scroller,"DOMMouseScroll",function(C){return ic(i,C)}),ge(s.wrapper,"scroll",function(){return s.wrapper.scrollTop=s.wrapper.scrollLeft=0}),s.dragFunctions={enter:function(C){Qe(i,C)||Ht(C)},over:function(C){Qe(i,C)||(tp(i,C),Ht(C))},start:function(C){return fs(i,C)},drop:Br(i,Qf),leave:function(C){Qe(i,C)||Oc(i)}};var _=s.input.getField();ge(_,"keyup",function(C){return Ic.call(i,C)}),ge(_,"keydown",Br(i,fu)),ge(_,"keypress",Br(i,Vc)),ge(_,"focus",function(C){return Qs(i,C)}),ge(_,"blur",function(C){return Jo(i,C)})}var ws=[];gr.defineInitHook=function(i){return ws.push(i)};function bs(i,s,c,u){var p=i.doc,v;c==null&&(c="add"),c=="smart"&&(p.mode.indent?v=No(i,s).state:c="prev");var m=i.options.tabSize,_=Ce(p,s),C=Ct(_.text,null,m);_.stateAfter&&(_.stateAfter=null);var P=_.text.match(/^\s*/)[0],q;if(!u&&!/\S/.test(_.text))q=0,c="not";else if(c=="smart"&&(q=p.mode.indent(v,_.text.slice(P.length),_.text),q==ne||q>150)){if(!u)return;c="prev"}c=="prev"?s>p.first?q=Ct(Ce(p,s-1).text,null,m):q=0:c=="add"?q=C+i.options.indentUnit:c=="subtract"?q=C-i.options.indentUnit:typeof c=="number"&&(q=C+c),q=Math.max(0,q);var at="",bt=0;if(i.options.indentWithTabs)for(var gt=Math.floor(q/m);gt;--gt)bt+=m,at+=" ";if(btm,C=Qr(s),P=null;if(_&&u.ranges.length>1)if(eo&&eo.text.join(` +`)==s){if(u.ranges.length%eo.text.length==0){P=[];for(var q=0;q=0;bt--){var gt=u.ranges[bt],It=gt.from(),Ut=gt.to();gt.empty()&&(c&&c>0?It=O(It.line,It.ch-c):i.state.overwrite&&!_?Ut=O(Ut.line,Math.min(Ce(v,Ut.line).text.length,Ut.ch+he(C).length)):_&&eo&&eo.lineWise&&eo.text.join(` +`)==C.join(` +`)&&(It=Ut=O(It.line,0)));var Qt={from:It,to:Ut,text:P?P[bt%P.length]:C,origin:p||(_?"paste":i.state.cutIncoming>m?"cut":"+input")};ha(i.doc,Qt),yr(i,"inputRead",i,Qt)}s&&!_&&gu(i,s),Vi(i),i.curOp.updateInput<2&&(i.curOp.updateInput=at),i.curOp.typing=!0,i.state.pasteIncoming=i.state.cutIncoming=-1}function Cs(i,s){var c=i.clipboardData&&i.clipboardData.getData("Text");if(c)return i.preventDefault(),!s.isReadOnly()&&!s.options.disableInput&&s.hasFocus()&&An(s,function(){return vl(s,c,0,null,"paste")}),!0}function gu(i,s){if(!(!i.options.electricChars||!i.options.smartIndent))for(var c=i.doc.sel,u=c.ranges.length-1;u>=0;u--){var p=c.ranges[u];if(!(p.head.ch>100||u&&c.ranges[u-1].head.line==p.head.line)){var v=i.getModeAt(p.head),m=!1;if(v.electricChars){for(var _=0;_-1){m=bs(i,p.head.line,"smart");break}}else v.electricInput&&v.electricInput.test(Ce(i.doc,p.head.line).text.slice(0,p.head.ch))&&(m=bs(i,p.head.line,"smart"));m&&yr(i,"electricInput",i,p.head.line)}}}function mu(i){for(var s=[],c=[],u=0;uv&&(bs(this,_.head.line,u,!0),v=_.head.line,m==this.doc.sel.primIndex&&Vi(this));else{var C=_.from(),P=_.to(),q=Math.max(v,C.line);v=Math.min(this.lastLine(),P.line-(P.ch?0:1))+1;for(var at=q;at0&&Jl(this.doc,m,new ur(C,bt[m].to()),qt)}}}),getTokenAt:function(u,p){return Dn(this,u,p)},getLineTokens:function(u,p){return Dn(this,O(u),p,!0)},getTokenTypeAt:function(u){u=Se(this.doc,u);var p=La(this,Ce(this.doc,u.line)),v=0,m=(p.length-1)/2,_=u.ch,C;if(_==0)C=p[2];else for(;;){var P=v+m>>1;if((P?p[P*2-1]:0)>=_)m=P;else if(p[P*2+1]<_)v=P+1;else{C=p[P*2+2];break}}var q=C?C.indexOf("overlay "):-1;return q<0?C:q==0?null:C.slice(0,q-1)},getModeAt:function(u){var p=this.doc.mode;return p.innerMode?i.innerMode(p,this.getTokenAt(u).state).mode:p},getHelper:function(u,p){return this.getHelpers(u,p)[0]},getHelpers:function(u,p){var v=[];if(!c.hasOwnProperty(p))return v;var m=c[p],_=this.getModeAt(u);if(typeof _[p]=="string")m[_[p]]&&v.push(m[_[p]]);else if(_[p])for(var C=0;C<_[p].length;C++){var P=m[_[p][C]];P&&v.push(P)}else _.helperType&&m[_.helperType]?v.push(m[_.helperType]):m[_.name]&&v.push(m[_.name]);for(var q=0;qC&&(u=C,m=!0),_=Ce(this.doc,u)}else _=u;return qs(this,_,{top:0,left:0},p||"page",v||m).top+(m?this.doc.height-Ar(_):0)},defaultTextHeight:function(){return la(this.display)},defaultCharWidth:function(){return ua(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(u,p,v,m,_){var C=this.display;u=Nn(this,Se(this.doc,u));var P=u.bottom,q=u.left;if(p.style.position="absolute",p.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(p),C.sizer.appendChild(p),m=="over")P=u.top;else if(m=="above"||m=="near"){var at=Math.max(C.wrapper.clientHeight,this.doc.height),bt=Math.max(C.sizer.clientWidth,C.lineSpace.clientWidth);(m=="above"||u.bottom+p.offsetHeight>at)&&u.top>p.offsetHeight?P=u.top-p.offsetHeight:u.bottom+p.offsetHeight<=at&&(P=u.bottom),q+p.offsetWidth>bt&&(q=bt-p.offsetWidth)}p.style.top=P+"px",p.style.left=p.style.right="",_=="right"?(q=C.sizer.clientWidth-p.offsetWidth,p.style.right="0px"):(_=="left"?q=0:_=="middle"&&(q=(C.sizer.clientWidth-p.offsetWidth)/2),p.style.left=q+"px"),v&&Lf(this,{left:q,top:P,right:q+p.offsetWidth,bottom:P+p.offsetHeight})},triggerOnKeyDown:fn(fu),triggerOnKeyPress:fn(Vc),triggerOnKeyUp:Ic,triggerOnMouseDown:fn(Rc),execCommand:function(u){if(ds.hasOwnProperty(u))return ds[u].call(null,this)},triggerElectric:fn(function(u){gu(this,u)}),findPosH:function(u,p,v,m){var _=1;p<0&&(_=-1,p=-p);for(var C=Se(this.doc,u),P=0;P0&&q(v.charAt(m-1));)--m;for(;_.5||this.options.lineWrapping)&&Vl(this),nr(this,"refresh",this)}),swapDoc:fn(function(u){var p=this.doc;return p.cm=null,this.state.selectingText&&this.state.selectingText(),pa(this,u),sa(this),this.display.input.reset(),Xa(this,u.scrollLeft,u.scrollTop),this.curOp.forceScroll=!0,yr(this,"swapDoc",this,p),p}),phrase:function(u){var p=this.options.phrases;return p&&Object.prototype.hasOwnProperty.call(p,u)?p[u]:u},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Kn(i),i.registerHelper=function(u,p,v){c.hasOwnProperty(u)||(c[u]=i[u]={_global:[]}),c[u][p]=v},i.registerGlobalHelper=function(u,p,v,m){i.registerHelper(u,p,m),c[u]._global.push({pred:v,val:m})}}function on(i,s,c,u,p){var v=s,m=c,_=Ce(i,s.line),C=p&&i.direction=="rtl"?-c:c;function P(){var ye=s.line+C;return ye=i.first+i.size?!1:(s=new O(ye,s.ch,s.sticky),_=Ce(i,ye))}function q(ye){var le;if(u=="codepoint"){var we=_.text.charCodeAt(s.ch+(c>0?0:-1));if(isNaN(we))le=null;else{var Le=c>0?we>=55296&&we<56320:we>=56320&&we<57343;le=new O(s.line,Math.max(0,Math.min(_.text.length,s.ch+c*(Le?2:1))),-c)}}else p?le=ep(i.cm,_,s,c):le=su(_,s,c);if(le==null)if(!ye&&P())s=lu(p,i.cm,_,s.line,C);else return!1;else s=le;return!0}if(u=="char"||u=="codepoint")q();else if(u=="column")q(!0);else if(u=="word"||u=="group")for(var at=null,bt=u=="group",gt=i.cm&&i.cm.getHelper(s,"wordChars"),It=!0;!(c<0&&!q(!It));It=!1){var Ut=_.text.charAt(s.ch)||` +`,Qt=Et(Ut,gt)?"w":bt&&Ut==` +`?"n":!bt||/\s/.test(Ut)?null:"p";if(bt&&!It&&!Qt&&(Qt="s"),at&&at!=Qt){c<0&&(c=1,q(),s.sticky="after");break}if(Qt&&(at=Qt),c>0&&!q(!It))break}var se=fl(i,s,v,m,!0);return Ft(v,se)&&(se.hitSide=!0),se}function Wc(i,s,c,u){var p=i.doc,v=s.left,m;if(u=="page"){var _=Math.min(i.display.wrapper.clientHeight,Pe(i).innerHeight||p(i).documentElement.clientHeight),C=Math.max(_-.5*la(i.display),3);m=(c>0?s.bottom:s.top)+c*C}else u=="line"&&(m=c>0?s.bottom+3:s.top-3);for(var P;P=Dl(i,v,m),!!P.outside;){if(c<0?m<=0:m>=p.height){P.hitSide=!0;break}m+=c*5}return P}var ir=function(i){this.cm=i,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Rt,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};ir.prototype.init=function(i){var s=this,c=this,u=c.cm,p=c.div=i.lineDiv;p.contentEditable=!0,yu(p,u.options.spellcheck,u.options.autocorrect,u.options.autocapitalize);function v(_){for(var C=_.target;C;C=C.parentNode){if(C==p)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(C.className))break}return!1}ge(p,"paste",function(_){!v(_)||Qe(u,_)||Cs(_,u)||N<=11&&setTimeout(Br(u,function(){return s.updateFromDOM()}),20)}),ge(p,"compositionstart",function(_){s.composing={data:_.data,done:!1}}),ge(p,"compositionupdate",function(_){s.composing||(s.composing={data:_.data,done:!1})}),ge(p,"compositionend",function(_){s.composing&&(_.data!=s.composing.data&&s.readFromDOMSoon(),s.composing.done=!0)}),ge(p,"touchstart",function(){return c.forceCompositionEnd()}),ge(p,"input",function(){s.composing||s.readFromDOMSoon()});function m(_){if(!(!v(_)||Qe(u,_))){if(u.somethingSelected())Ca({lineWise:!1,text:u.getSelections()}),_.type=="cut"&&u.replaceSelection("",null,"cut");else if(u.options.lineWiseCopyCut){var C=mu(u);Ca({lineWise:!0,text:C.text}),_.type=="cut"&&u.operation(function(){u.setSelections(C.ranges,0,qt),u.replaceSelection("",null,"cut")})}else return;if(_.clipboardData){_.clipboardData.clearData();var P=eo.text.join(` +`);if(_.clipboardData.setData("Text",P),_.clipboardData.getData("Text")==P){_.preventDefault();return}}var q=zc(),at=q.firstChild;yu(at),u.display.lineSpace.insertBefore(q,u.display.lineSpace.firstChild),at.value=eo.text.join(` +`);var bt=Pt(p.ownerDocument);Wt(at),setTimeout(function(){u.display.lineSpace.removeChild(q),bt.focus(),bt==p&&c.showPrimarySelection()},50)}}ge(p,"copy",m),ge(p,"cut",m)},ir.prototype.screenReaderLabelChanged=function(i){i?this.div.setAttribute("aria-label",i):this.div.removeAttribute("aria-label")},ir.prototype.prepareSelection=function(){var i=Gu(this.cm,!1);return i.focus=Pt(this.div.ownerDocument)==this.div,i},ir.prototype.showSelection=function(i,s){!i||!this.cm.display.view.length||((i.focus||s)&&this.showPrimarySelection(),this.showMultipleSelections(i))},ir.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},ir.prototype.showPrimarySelection=function(){var i=this.getSelection(),s=this.cm,c=s.doc.sel.primary(),u=c.from(),p=c.to();if(s.display.viewTo==s.display.viewFrom||u.line>=s.display.viewTo||p.line=s.display.viewFrom&&gl(s,u)||{node:_[0].measure.map[2],offset:0},P=p.linei.firstLine()&&(u=O(u.line-1,Ce(i.doc,u.line-1).length)),p.ch==Ce(i.doc,p.line).text.length&&p.lines.viewTo-1)return!1;var v,m,_;u.line==s.viewFrom||(v=_o(i,u.line))==0?(m=qe(s.view[0].line),_=s.view[0].node):(m=qe(s.view[v].line),_=s.view[v-1].node.nextSibling);var C=_o(i,p.line),P,q;if(C==s.view.length-1?(P=s.viewTo-1,q=s.lineDiv.lastChild):(P=qe(s.view[C+1].line)-1,q=s.view[C+1].node.previousSibling),!_)return!1;for(var at=i.doc.splitLines(Kc(i,_,q,m,P)),bt=Tn(i.doc,O(m,0),O(P,Ce(i.doc,P).text.length));at.length>1&&bt.length>1;)if(he(at)==he(bt))at.pop(),bt.pop(),P--;else if(at[0]==bt[0])at.shift(),bt.shift(),m++;else break;for(var gt=0,It=0,Ut=at[0],Qt=bt[0],se=Math.min(Ut.length,Qt.length);gtu.ch&&ye.charCodeAt(ye.length-It-1)==le.charCodeAt(le.length-It-1);)gt--,It++;at[at.length-1]=ye.slice(0,ye.length-It).replace(/^\u200b+/,""),at[0]=at[0].slice(gt).replace(/\u200b+$/,"");var Le=O(m,gt),ke=O(P,bt.length?he(bt).length-It:0);if(at.length>1||at[0]||K(Le,ke))return Bi(i.doc,at,Le,ke,"+input"),!0},ir.prototype.ensurePolled=function(){this.forceCompositionEnd()},ir.prototype.reset=function(){this.forceCompositionEnd()},ir.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},ir.prototype.readFromDOMSoon=function(){var i=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(i.readDOMTimeout=null,i.composing)if(i.composing.done)i.composing=null;else return;i.updateFromDOM()},80))},ir.prototype.updateFromDOM=function(){var i=this;(this.cm.isReadOnly()||!this.pollContent())&&An(this.cm,function(){return rn(i.cm)})},ir.prototype.setUneditable=function(i){i.contentEditable="false"},ir.prototype.onKeyPress=function(i){i.charCode==0||this.composing||(i.preventDefault(),this.cm.isReadOnly()||Br(this.cm,vl)(this.cm,String.fromCharCode(i.charCode==null?i.keyCode:i.charCode),0))},ir.prototype.readOnlyChanged=function(i){this.div.contentEditable=String(i!="nocursor")},ir.prototype.onContextMenu=function(){},ir.prototype.resetPosition=function(){},ir.prototype.needsContentAttribute=!0;function gl(i,s){var c=We(i,s.line);if(!c||c.hidden)return null;var u=Ce(i.doc,s.line),p=_t(c,u,s.line),v=Ee(u,i.doc.direction),m="left";if(v){var _=Te(v,s.ch);m=_%2?"right":"left"}var C=Ka(p.map,s.ch,m);return C.offset=C.collapse=="right"?C.end:C.start,C}function wu(i){for(var s=i;s;s=s.parentNode)if(/CodeMirror-gutter-wrapper/.test(s.className))return!0;return!1}function Lo(i,s){return s&&(i.bad=!0),i}function Kc(i,s,c,u,p){var v="",m=!1,_=i.doc.lineSeparator(),C=!1;function P(gt){return function(It){return It.id==gt}}function q(){m&&(v+=_,C&&(v+=_),m=C=!1)}function at(gt){gt&&(q(),v+=gt)}function bt(gt){if(gt.nodeType==1){var It=gt.getAttribute("cm-text");if(It){at(It);return}var Ut=gt.getAttribute("cm-marker"),Qt;if(Ut){var se=i.findMarks(O(u,0),O(p+1,0),P(+Ut));se.length&&(Qt=se[0].find(0))&&at(Tn(i.doc,Qt.from,Qt.to).join(_));return}if(gt.getAttribute("contenteditable")=="false")return;var ye=/^(pre|div|p|li|table|br)$/i.test(gt.nodeName);if(!/^br$/i.test(gt.nodeName)&>.textContent.length==0)return;ye&&q();for(var le=0;le=9&&s.hasSelection&&(s.hasSelection=null),c.poll()}),ge(p,"paste",function(m){Qe(u,m)||Cs(m,u)||(u.state.pasteIncoming=+new Date,c.fastPoll())});function v(m){if(!Qe(u,m)){if(u.somethingSelected())Ca({lineWise:!1,text:u.getSelections()});else if(u.options.lineWiseCopyCut){var _=mu(u);Ca({lineWise:!0,text:_.text}),m.type=="cut"?u.setSelections(_.ranges,null,qt):(c.prevInput="",p.value=_.text.join(` +`),Wt(p))}else return;m.type=="cut"&&(u.state.cutIncoming=+new Date)}}ge(p,"cut",v),ge(p,"copy",v),ge(i.scroller,"paste",function(m){if(!(Rn(i,m)||Qe(u,m))){if(!p.dispatchEvent){u.state.pasteIncoming=+new Date,c.focus();return}var _=new Event("paste");_.clipboardData=m.clipboardData,p.dispatchEvent(_)}}),ge(i.lineSpace,"selectstart",function(m){Rn(i,m)||U(m)}),ge(p,"compositionstart",function(){var m=u.getCursor("from");c.composing&&c.composing.range.clear(),c.composing={start:m,range:u.markText(m,u.getCursor("to"),{className:"CodeMirror-composing"})}}),ge(p,"compositionend",function(){c.composing&&(c.poll(),c.composing.range.clear(),c.composing=null)})},kr.prototype.createField=function(i){this.wrapper=zc(),this.textarea=this.wrapper.firstChild;var s=this.cm.options;yu(this.textarea,s.spellcheck,s.autocorrect,s.autocapitalize)},kr.prototype.screenReaderLabelChanged=function(i){i?this.textarea.setAttribute("aria-label",i):this.textarea.removeAttribute("aria-label")},kr.prototype.prepareSelection=function(){var i=this.cm,s=i.display,c=i.doc,u=Gu(i);if(i.options.moveInputWithCursor){var p=Nn(i,c.sel.primary().head,"div"),v=s.wrapper.getBoundingClientRect(),m=s.lineDiv.getBoundingClientRect();u.teTop=Math.max(0,Math.min(s.wrapper.clientHeight-10,p.top+m.top-v.top)),u.teLeft=Math.max(0,Math.min(s.wrapper.clientWidth-10,p.left+m.left-v.left))}return u},kr.prototype.showSelection=function(i){var s=this.cm,c=s.display;et(c.cursorDiv,i.cursors),et(c.selectionDiv,i.selection),i.teTop!=null&&(this.wrapper.style.top=i.teTop+"px",this.wrapper.style.left=i.teLeft+"px")},kr.prototype.reset=function(i){if(!(this.contextMenuPending||this.composing&&i)){var s=this.cm;if(this.resetting=!0,s.somethingSelected()){this.prevInput="";var c=s.getSelection();this.textarea.value=c,s.state.focused&&Wt(this.textarea),M&&N>=9&&(this.hasSelection=c)}else i||(this.prevInput=this.textarea.value="",M&&N>=9&&(this.hasSelection=null));this.resetting=!1}},kr.prototype.getField=function(){return this.textarea},kr.prototype.supportsTouch=function(){return!1},kr.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!Tt||Pt(this.textarea.ownerDocument)!=this.textarea))try{this.textarea.focus()}catch{}},kr.prototype.blur=function(){this.textarea.blur()},kr.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},kr.prototype.receivedFocus=function(){this.slowPoll()},kr.prototype.slowPoll=function(){var i=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){i.poll(),i.cm.state.focused&&i.slowPoll()})},kr.prototype.fastPoll=function(){var i=!1,s=this;s.pollingFast=!0;function c(){var u=s.poll();!u&&!i?(i=!0,s.polling.set(60,c)):(s.pollingFast=!1,s.slowPoll())}s.polling.set(20,c)},kr.prototype.poll=function(){var i=this,s=this.cm,c=this.textarea,u=this.prevInput;if(this.contextMenuPending||this.resetting||!s.state.focused||Cn(c)&&!u&&!this.composing||s.isReadOnly()||s.options.disableInput||s.state.keySeq)return!1;var p=c.value;if(p==u&&!s.somethingSelected())return!1;if(M&&N>=9&&this.hasSelection===p||yt&&/[\uf700-\uf7ff]/.test(p))return s.display.input.reset(),!1;if(s.doc.sel==s.display.selForContextMenu){var v=p.charCodeAt(0);if(v==8203&&!u&&(u="​"),v==8666)return this.reset(),this.cm.execCommand("undo")}for(var m=0,_=Math.min(u.length,p.length);m<_&&u.charCodeAt(m)==p.charCodeAt(m);)++m;return An(s,function(){vl(s,p.slice(m),u.length-m,null,i.composing?"*compose":null),p.length>1e3||p.indexOf(` +`)>-1?c.value=i.prevInput="":i.prevInput=p,i.composing&&(i.composing.range.clear(),i.composing.range=s.markText(i.composing.start,s.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},kr.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},kr.prototype.onKeyPress=function(){M&&N>=9&&(this.hasSelection=null),this.fastPoll()},kr.prototype.onContextMenu=function(i){var s=this,c=s.cm,u=c.display,p=s.textarea;s.contextMenuPending&&s.contextMenuPending();var v=Di(c,i),m=u.scroller.scrollTop;if(!v||H)return;var _=c.options.resetSelectionOnContextMenu;_&&c.doc.sel.contains(v)==-1&&Br(c,nn)(c.doc,ti(v),qt);var C=p.style.cssText,P=s.wrapper.style.cssText,q=s.wrapper.offsetParent.getBoundingClientRect();s.wrapper.style.cssText="position: static",p.style.cssText=`position: absolute; width: 30px; height: 30px; + top: `+(i.clientY-q.top-5)+"px; left: "+(i.clientX-q.left-5)+`px; + z-index: 1000; background: `+(M?"rgba(255, 255, 255, .05)":"transparent")+`; + outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var at;x&&(at=p.ownerDocument.defaultView.scrollY),u.input.focus(),x&&p.ownerDocument.defaultView.scrollTo(null,at),u.input.reset(),c.somethingSelected()||(p.value=s.prevInput=" "),s.contextMenuPending=gt,u.selForContextMenu=c.doc.sel,clearTimeout(u.detectingSelectAll);function bt(){if(p.selectionStart!=null){var Ut=c.somethingSelected(),Qt="​"+(Ut?p.value:"");p.value="⇚",p.value=Qt,s.prevInput=Ut?"":"​",p.selectionStart=1,p.selectionEnd=Qt.length,u.selForContextMenu=c.doc.sel}}function gt(){if(s.contextMenuPending==gt&&(s.contextMenuPending=!1,s.wrapper.style.cssText=P,p.style.cssText=C,M&&N<9&&u.scrollbars.setScrollTop(u.scroller.scrollTop=m),p.selectionStart!=null)){(!M||M&&N<9)&&bt();var Ut=0,Qt=function(){u.selForContextMenu==c.doc.sel&&p.selectionStart==0&&p.selectionEnd>0&&s.prevInput=="​"?Br(c,is)(c):Ut++<10?u.detectingSelectAll=setTimeout(Qt,500):(u.selForContextMenu=null,u.input.reset())};u.detectingSelectAll=setTimeout(Qt,200)}}if(M&&N>=9&&bt(),dt){Ht(i);var It=function(){Me(window,"mouseup",It),setTimeout(gt,20)};ge(window,"mouseup",It)}else setTimeout(gt,50)},kr.prototype.readOnlyChanged=function(i){i||this.reset(),this.textarea.disabled=i=="nocursor",this.textarea.readOnly=!!i},kr.prototype.setUneditable=function(){},kr.prototype.needsContentAttribute=!1;function pp(i,s){if(s=s?ve(s):{},s.value=i.value,!s.tabindex&&i.tabIndex&&(s.tabindex=i.tabIndex),!s.placeholder&&i.placeholder&&(s.placeholder=i.placeholder),s.autofocus==null){var c=Pt(i.ownerDocument);s.autofocus=c==i||i.getAttribute("autofocus")!=null&&c==document.body}function u(){i.value=_.getValue()}var p;if(i.form&&(ge(i.form,"submit",u),!s.leaveSubmitMethodAlone)){var v=i.form;p=v.submit;try{var m=v.submit=function(){u(),v.submit=p,v.submit(),v.submit=m}}catch{}}s.finishInit=function(C){C.save=u,C.getTextArea=function(){return i},C.toTextArea=function(){C.toTextArea=isNaN,u(),i.parentNode.removeChild(C.getWrapperElement()),i.style.display="",i.form&&(Me(i.form,"submit",u),!s.leaveSubmitMethodAlone&&typeof i.form.submit=="function"&&(i.form.submit=p))}},i.style.display="none";var _=gr(function(C){return i.parentNode.insertBefore(C,i.nextSibling)},s);return _}function dp(i){i.off=Me,i.on=ge,i.wheelEventPixels=Bf,i.Doc=_n,i.splitLines=Qr,i.countColumn=Ct,i.findColumn=cr,i.isWordChar=Z,i.Pass=ne,i.signal=nr,i.Line=Dr,i.changeEnd=ei,i.scrollbarModel=Xu,i.Pos=O,i.cmpPos=K,i.modes=Rr,i.mimeModes=xn,i.resolveMode=Ln,i.getMode=tn,i.modeExtensions=Nr,i.extendMode=ho,i.copyState=Sn,i.startState=So,i.innerMode=On,i.commands=ds,i.keyMap=wo,i.keyName=Mc,i.isModifierKey=kc,i.lookupKey=wa,i.normalizeKeyMap=ps,i.StringStream=sr,i.SharedTextMarker=ma,i.TextMarker=oi,i.LineWidget=Qn,i.e_preventDefault=U,i.e_stopPropagation=ft,i.e_stop=Ht,i.addClass=ct,i.contains=At,i.rmClass=X,i.keyNames=ii}cp(gr),_u(gr);var xs="iter insert remove copy getEditor constructor".split(" ");for(var Ss in _n.prototype)_n.prototype.hasOwnProperty(Ss)&&zt(xs,Ss)<0&&(gr.prototype[Ss]=function(i){return function(){return i.apply(this.doc,arguments)}}(_n.prototype[Ss]));return Kn(_n),gr.inputStyles={textarea:kr,contenteditable:ir},gr.defineMode=function(i){!gr.defaults.mode&&i!="null"&&(gr.defaults.mode=i),Gn.apply(this,arguments)},gr.defineMIME=Ro,gr.defineMode("null",function(){return{token:function(i){return i.skipToEnd()}}}),gr.defineMIME("text/plain","null"),gr.defineExtension=function(i,s){gr.prototype[i]=s},gr.defineDocExtension=function(i,s){_n.prototype[i]=s},gr.fromTextArea=pp,dp(gr),gr.version="5.65.15",gr})},629:(w,Y,st)=>{(function(rt){rt(st(631))})(function(rt){rt.defineMode("css",function(X,z){var et=z.inline;z.propertyKeywords||(z=rt.resolveMode("text/css"));var A=X.indentUnit,tt=z.tokenHooks,E=z.documentTypes||{},At=z.mediaTypes||{},Pt=z.mediaFeatures||{},ct=z.mediaValueKeywords||{},Dt=z.propertyKeywords||{},Wt=z.nonStandardPropertyKeywords||{},oe=z.fontProperties||{},Pe=z.counterDescriptors||{},_e=z.colorKeywords||{},ve=z.valueKeywords||{},Ct=z.allowNested,Rt=z.lineComment,zt=z.supportsAtComponent===!0,ie=X.highlightNonStandardPropertyKeywords!==!1,ne,qt;function me(Z,Et){return ne=Et,Z}function Ne(Z,Et){var mt=Z.next();if(tt[mt]){var xe=tt[mt](Z,Et);if(xe!==!1)return xe}if(mt=="@")return Z.eatWhile(/[\w\\\-]/),me("def",Z.current());if(mt=="="||(mt=="~"||mt=="|")&&Z.eat("="))return me(null,"compare");if(mt=='"'||mt=="'")return Et.tokenize=cr(mt),Et.tokenize(Z,Et);if(mt=="#")return Z.eatWhile(/[\w\\\-]/),me("atom","hash");if(mt=="!")return Z.match(/^\s*\w*/),me("keyword","important");if(/\d/.test(mt)||mt=="."&&Z.eat(/\d/))return Z.eatWhile(/[\w.%]/),me("number","unit");if(mt==="-"){if(/[\d.]/.test(Z.peek()))return Z.eatWhile(/[\w.%]/),me("number","unit");if(Z.match(/^-[\w\\\-]*/))return Z.eatWhile(/[\w\\\-]/),Z.match(/^\s*:/,!1)?me("variable-2","variable-definition"):me("variable-2","variable");if(Z.match(/^\w+-/))return me("meta","meta")}else return/[,+>*\/]/.test(mt)?me(null,"select-op"):mt=="."&&Z.match(/^-?[_a-z][_a-z0-9-]*/i)?me("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(mt)?me(null,mt):Z.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(Z.current())&&(Et.tokenize=_r),me("variable callee","variable")):/[\w\\\-]/.test(mt)?(Z.eatWhile(/[\w\\\-]/),me("property","word")):me(null,null)}function cr(Z){return function(Et,mt){for(var xe=!1,He;(He=Et.next())!=null;){if(He==Z&&!xe){Z==")"&&Et.backUp(1);break}xe=!xe&&He=="\\"}return(He==Z||!xe&&Z!=")")&&(mt.tokenize=null),me("string","string")}}function _r(Z,Et){return Z.next(),Z.match(/^\s*[\"\')]/,!1)?Et.tokenize=null:Et.tokenize=cr(")"),me(null,"(")}function ar(Z,Et,mt){this.type=Z,this.indent=Et,this.prev=mt}function he(Z,Et,mt,xe){return Z.context=new ar(mt,Et.indentation()+(xe===!1?0:A),Z.context),mt}function T(Z){return Z.context.prev&&(Z.context=Z.context.prev),Z.context.type}function B(Z,Et,mt){return Lt[mt.context.type](Z,Et,mt)}function nt(Z,Et,mt,xe){for(var He=xe||1;He>0;He--)mt.context=mt.context.prev;return B(Z,Et,mt)}function ht(Z){var Et=Z.current().toLowerCase();ve.hasOwnProperty(Et)?qt="atom":_e.hasOwnProperty(Et)?qt="keyword":qt="variable"}var Lt={};return Lt.top=function(Z,Et,mt){if(Z=="{")return he(mt,Et,"block");if(Z=="}"&&mt.context.prev)return T(mt);if(zt&&/@component/i.test(Z))return he(mt,Et,"atComponentBlock");if(/^@(-moz-)?document$/i.test(Z))return he(mt,Et,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(Z))return he(mt,Et,"atBlock");if(/^@(font-face|counter-style)/i.test(Z))return mt.stateArg=Z,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(Z))return"keyframes";if(Z&&Z.charAt(0)=="@")return he(mt,Et,"at");if(Z=="hash")qt="builtin";else if(Z=="word")qt="tag";else{if(Z=="variable-definition")return"maybeprop";if(Z=="interpolation")return he(mt,Et,"interpolation");if(Z==":")return"pseudo";if(Ct&&Z=="(")return he(mt,Et,"parens")}return mt.context.type},Lt.block=function(Z,Et,mt){if(Z=="word"){var xe=Et.current().toLowerCase();return Dt.hasOwnProperty(xe)?(qt="property","maybeprop"):Wt.hasOwnProperty(xe)?(qt=ie?"string-2":"property","maybeprop"):Ct?(qt=Et.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(qt+=" error","maybeprop")}else return Z=="meta"?"block":!Ct&&(Z=="hash"||Z=="qualifier")?(qt="error","block"):Lt.top(Z,Et,mt)},Lt.maybeprop=function(Z,Et,mt){return Z==":"?he(mt,Et,"prop"):B(Z,Et,mt)},Lt.prop=function(Z,Et,mt){if(Z==";")return T(mt);if(Z=="{"&&Ct)return he(mt,Et,"propBlock");if(Z=="}"||Z=="{")return nt(Z,Et,mt);if(Z=="(")return he(mt,Et,"parens");if(Z=="hash"&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(Et.current()))qt+=" error";else if(Z=="word")ht(Et);else if(Z=="interpolation")return he(mt,Et,"interpolation");return"prop"},Lt.propBlock=function(Z,Et,mt){return Z=="}"?T(mt):Z=="word"?(qt="property","maybeprop"):mt.context.type},Lt.parens=function(Z,Et,mt){return Z=="{"||Z=="}"?nt(Z,Et,mt):Z==")"?T(mt):Z=="("?he(mt,Et,"parens"):Z=="interpolation"?he(mt,Et,"interpolation"):(Z=="word"&&ht(Et),"parens")},Lt.pseudo=function(Z,Et,mt){return Z=="meta"?"pseudo":Z=="word"?(qt="variable-3",mt.context.type):B(Z,Et,mt)},Lt.documentTypes=function(Z,Et,mt){return Z=="word"&&E.hasOwnProperty(Et.current())?(qt="tag",mt.context.type):Lt.atBlock(Z,Et,mt)},Lt.atBlock=function(Z,Et,mt){if(Z=="(")return he(mt,Et,"atBlock_parens");if(Z=="}"||Z==";")return nt(Z,Et,mt);if(Z=="{")return T(mt)&&he(mt,Et,Ct?"block":"top");if(Z=="interpolation")return he(mt,Et,"interpolation");if(Z=="word"){var xe=Et.current().toLowerCase();xe=="only"||xe=="not"||xe=="and"||xe=="or"?qt="keyword":At.hasOwnProperty(xe)?qt="attribute":Pt.hasOwnProperty(xe)?qt="property":ct.hasOwnProperty(xe)?qt="keyword":Dt.hasOwnProperty(xe)?qt="property":Wt.hasOwnProperty(xe)?qt=ie?"string-2":"property":ve.hasOwnProperty(xe)?qt="atom":_e.hasOwnProperty(xe)?qt="keyword":qt="error"}return mt.context.type},Lt.atComponentBlock=function(Z,Et,mt){return Z=="}"?nt(Z,Et,mt):Z=="{"?T(mt)&&he(mt,Et,Ct?"block":"top",!1):(Z=="word"&&(qt="error"),mt.context.type)},Lt.atBlock_parens=function(Z,Et,mt){return Z==")"?T(mt):Z=="{"||Z=="}"?nt(Z,Et,mt,2):Lt.atBlock(Z,Et,mt)},Lt.restricted_atBlock_before=function(Z,Et,mt){return Z=="{"?he(mt,Et,"restricted_atBlock"):Z=="word"&&mt.stateArg=="@counter-style"?(qt="variable","restricted_atBlock_before"):B(Z,Et,mt)},Lt.restricted_atBlock=function(Z,Et,mt){return Z=="}"?(mt.stateArg=null,T(mt)):Z=="word"?(mt.stateArg=="@font-face"&&!oe.hasOwnProperty(Et.current().toLowerCase())||mt.stateArg=="@counter-style"&&!Pe.hasOwnProperty(Et.current().toLowerCase())?qt="error":qt="property","maybeprop"):"restricted_atBlock"},Lt.keyframes=function(Z,Et,mt){return Z=="word"?(qt="variable","keyframes"):Z=="{"?he(mt,Et,"top"):B(Z,Et,mt)},Lt.at=function(Z,Et,mt){return Z==";"?T(mt):Z=="{"||Z=="}"?nt(Z,Et,mt):(Z=="word"?qt="tag":Z=="hash"&&(qt="builtin"),"at")},Lt.interpolation=function(Z,Et,mt){return Z=="}"?T(mt):Z=="{"||Z==";"?nt(Z,Et,mt):(Z=="word"?qt="variable":Z!="variable"&&Z!="("&&Z!=")"&&(qt="error"),"interpolation")},{startState:function(Z){return{tokenize:null,state:et?"block":"top",stateArg:null,context:new ar(et?"block":"top",Z||0,null)}},token:function(Z,Et){if(!Et.tokenize&&Z.eatSpace())return null;var mt=(Et.tokenize||Ne)(Z,Et);return mt&&typeof mt=="object"&&(ne=mt[1],mt=mt[0]),qt=mt,ne!="comment"&&(Et.state=Lt[Et.state](ne,Z,Et)),qt},indent:function(Z,Et){var mt=Z.context,xe=Et&&Et.charAt(0),He=mt.indent;return mt.type=="prop"&&(xe=="}"||xe==")")&&(mt=mt.prev),mt.prev&&(xe=="}"&&(mt.type=="block"||mt.type=="top"||mt.type=="interpolation"||mt.type=="restricted_atBlock")?(mt=mt.prev,He=mt.indent):(xe==")"&&(mt.type=="parens"||mt.type=="atBlock_parens")||xe=="{"&&(mt.type=="at"||mt.type=="atBlock"))&&(He=Math.max(0,mt.indent-A))),He},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:Rt,fold:"brace"}});function lt(X){for(var z={},et=0;et{(function(rt){rt(st(631),st(589),st(876),st(629))})(function(rt){var lt={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]};function F(D,H,G){var pt=D.current(),xt=pt.search(H);return xt>-1?D.backUp(pt.length-xt):pt.match(/<\/?$/)&&(D.backUp(pt.length),D.match(H,!1)||D.match(pt)),G}var R={};function M(D){var H=R[D];return H||(R[D]=new RegExp("\\s+"+D+`\\s*=\\s*('|")?([^'"]+)('|")?\\s*`))}function N(D,H){var G=D.match(M(H));return G?/^\s*(.*?)\s*$/.exec(G[2])[1]:""}function x(D,H){return new RegExp((H?"^":"")+"","i")}function j(D,H){for(var G in D)for(var pt=H[G]||(H[G]=[]),xt=D[G],Nt=xt.length-1;Nt>=0;Nt--)pt.unshift(xt[Nt])}function L(D,H){for(var G=0;G=0;jt--)pt.script.unshift(["type",Nt[jt].matches,Nt[jt].mode]);function Tt(yt,Kt){var te=G.token(yt,Kt.htmlState),ue=/\btag\b/.test(te),Zt;if(ue&&!/[<>\s\/]/.test(yt.current())&&(Zt=Kt.htmlState.tagName&&Kt.htmlState.tagName.toLowerCase())&&pt.hasOwnProperty(Zt))Kt.inTag=Zt+" ";else if(Kt.inTag&&ue&&/>$/.test(yt.current())){var dt=/^([\S]+) (.*)/.exec(Kt.inTag);Kt.inTag=null;var ot=yt.current()==">"&&L(pt[dt[1]],dt[2]),X=rt.getMode(D,ot),z=x(dt[1],!0),et=x(dt[1],!1);Kt.token=function(A,tt){return A.match(z,!1)?(tt.token=Tt,tt.localState=tt.localMode=null,null):F(A,et,tt.localMode.token(A,tt.localState))},Kt.localMode=X,Kt.localState=rt.startState(X,G.indent(Kt.htmlState,"",""))}else Kt.inTag&&(Kt.inTag+=yt.current(),yt.eol()&&(Kt.inTag+=" "));return te}return{startState:function(){var yt=rt.startState(G);return{token:Tt,inTag:null,localMode:null,localState:null,htmlState:yt}},copyState:function(yt){var Kt;return yt.localState&&(Kt=rt.copyState(yt.localMode,yt.localState)),{token:yt.token,inTag:yt.inTag,localMode:yt.localMode,localState:Kt,htmlState:rt.copyState(G,yt.htmlState)}},token:function(yt,Kt){return Kt.token(yt,Kt)},indent:function(yt,Kt,te){return!yt.localMode||/^\s*<\//.test(Kt)?G.indent(yt.htmlState,Kt,te):yt.localMode.indent?yt.localMode.indent(yt.localState,Kt,te):rt.Pass},innerMode:function(yt){return{state:yt.localState||yt.htmlState,mode:yt.localMode||G}}}},"xml","javascript","css"),rt.defineMIME("text/html","htmlmixed")})},876:(w,Y,st)=>{(function(rt){rt(st(631))})(function(rt){rt.defineMode("javascript",function(lt,F){var R=lt.indentUnit,M=F.statementIndent,N=F.jsonld,x=F.json||N,j=F.trackScope!==!1,L=F.typescript,D=F.wordCharacters||/[\w$\xa1-\uffff]/,H=function(){function O(Se){return{type:Se,style:"keyword"}}var K=O("keyword a"),Ft=O("keyword b"),Yt=O("keyword c"),Ae=O("keyword d"),er=O("operator"),or={type:"atom",style:"atom"};return{if:O("if"),while:K,with:K,else:Ft,do:Ft,try:Ft,finally:Ft,return:Ae,break:Ae,continue:Ae,new:O("new"),delete:Yt,void:Yt,throw:Yt,debugger:O("debugger"),var:O("var"),const:O("var"),let:O("var"),function:O("function"),catch:O("catch"),for:O("for"),switch:O("switch"),case:O("case"),default:O("default"),in:er,typeof:er,instanceof:er,true:or,false:or,null:or,undefined:or,NaN:or,Infinity:or,this:O("this"),class:O("class"),super:O("atom"),yield:Yt,export:O("export"),import:O("import"),extends:Yt,await:Yt}}(),G=/[+\-*&%=<>!?|~^@]/,pt=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function xt(O){for(var K=!1,Ft,Yt=!1;(Ft=O.next())!=null;){if(!K){if(Ft=="/"&&!Yt)return;Ft=="["?Yt=!0:Yt&&Ft=="]"&&(Yt=!1)}K=!K&&Ft=="\\"}}var Nt,jt;function Tt(O,K,Ft){return Nt=O,jt=Ft,K}function yt(O,K){var Ft=O.next();if(Ft=='"'||Ft=="'")return K.tokenize=Kt(Ft),K.tokenize(O,K);if(Ft=="."&&O.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return Tt("number","number");if(Ft=="."&&O.match(".."))return Tt("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(Ft))return Tt(Ft);if(Ft=="="&&O.eat(">"))return Tt("=>","operator");if(Ft=="0"&&O.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return Tt("number","number");if(/\d/.test(Ft))return O.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),Tt("number","number");if(Ft=="/")return O.eat("*")?(K.tokenize=te,te(O,K)):O.eat("/")?(O.skipToEnd(),Tt("comment","comment")):io(O,K,1)?(xt(O),O.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),Tt("regexp","string-2")):(O.eat("="),Tt("operator","operator",O.current()));if(Ft=="`")return K.tokenize=ue,ue(O,K);if(Ft=="#"&&O.peek()=="!")return O.skipToEnd(),Tt("meta","meta");if(Ft=="#"&&O.eatWhile(D))return Tt("variable","property");if(Ft=="<"&&O.match("!--")||Ft=="-"&&O.match("->")&&!/\S/.test(O.string.slice(0,O.start)))return O.skipToEnd(),Tt("comment","comment");if(G.test(Ft))return(Ft!=">"||!K.lexical||K.lexical.type!=">")&&(O.eat("=")?(Ft=="!"||Ft=="=")&&O.eat("="):/[<>*+\-|&?]/.test(Ft)&&(O.eat(Ft),Ft==">"&&O.eat(Ft))),Ft=="?"&&O.eat(".")?Tt("."):Tt("operator","operator",O.current());if(D.test(Ft)){O.eatWhile(D);var Yt=O.current();if(K.lastType!="."){if(H.propertyIsEnumerable(Yt)){var Ae=H[Yt];return Tt(Ae.type,Ae.style,Yt)}if(Yt=="async"&&O.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return Tt("async","keyword",Yt)}return Tt("variable","variable",Yt)}}function Kt(O){return function(K,Ft){var Yt=!1,Ae;if(N&&K.peek()=="@"&&K.match(pt))return Ft.tokenize=yt,Tt("jsonld-keyword","meta");for(;(Ae=K.next())!=null&&!(Ae==O&&!Yt);)Yt=!Yt&&Ae=="\\";return Yt||(Ft.tokenize=yt),Tt("string","string")}}function te(O,K){for(var Ft=!1,Yt;Yt=O.next();){if(Yt=="/"&&Ft){K.tokenize=yt;break}Ft=Yt=="*"}return Tt("comment","comment")}function ue(O,K){for(var Ft=!1,Yt;(Yt=O.next())!=null;){if(!Ft&&(Yt=="`"||Yt=="$"&&O.eat("{"))){K.tokenize=yt;break}Ft=!Ft&&Yt=="\\"}return Tt("quasi","string-2",O.current())}var Zt="([{}])";function dt(O,K){K.fatArrowAt&&(K.fatArrowAt=null);var Ft=O.string.indexOf("=>",O.start);if(!(Ft<0)){if(L){var Yt=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(O.string.slice(O.start,Ft));Yt&&(Ft=Yt.index)}for(var Ae=0,er=!1,or=Ft-1;or>=0;--or){var Se=O.string.charAt(or),gn=Zt.indexOf(Se);if(gn>=0&&gn<3){if(!Ae){++or;break}if(--Ae==0){Se=="("&&(er=!0);break}}else if(gn>=3&&gn<6)++Ae;else if(D.test(Se))er=!0;else if(/["'\/`]/.test(Se))for(;;--or){if(or==0)return;var Ji=O.string.charAt(or-1);if(Ji==Se&&O.string.charAt(or-2)!="\\"){or--;break}}else if(er&&!Ae){++or;break}}er&&!Ae&&(K.fatArrowAt=or)}}var ot={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function X(O,K,Ft,Yt,Ae,er){this.indented=O,this.column=K,this.type=Ft,this.prev=Ae,this.info=er,Yt!=null&&(this.align=Yt)}function z(O,K){if(!j)return!1;for(var Ft=O.localVars;Ft;Ft=Ft.next)if(Ft.name==K)return!0;for(var Yt=O.context;Yt;Yt=Yt.prev)for(var Ft=Yt.vars;Ft;Ft=Ft.next)if(Ft.name==K)return!0}function et(O,K,Ft,Yt,Ae){var er=O.cc;for(A.state=O,A.stream=Ae,A.marked=null,A.cc=er,A.style=K,O.lexical.hasOwnProperty("align")||(O.lexical.align=!0);;){var or=er.length?er.pop():x?me:ne;if(or(Ft,Yt)){for(;er.length&&er[er.length-1].lex;)er.pop()();return A.marked?A.marked:Ft=="variable"&&z(O,Yt)?"variable-2":K}}}var A={state:null,column:null,marked:null,cc:null};function tt(){for(var O=arguments.length-1;O>=0;O--)A.cc.push(arguments[O])}function E(){return tt.apply(null,arguments),!0}function At(O,K){for(var Ft=K;Ft;Ft=Ft.next)if(Ft.name==O)return!0;return!1}function Pt(O){var K=A.state;if(A.marked="def",!!j){if(K.context){if(K.lexical.info=="var"&&K.context&&K.context.block){var Ft=ct(O,K.context);if(Ft!=null){K.context=Ft;return}}else if(!At(O,K.localVars)){K.localVars=new oe(O,K.localVars);return}}F.globalVars&&!At(O,K.globalVars)&&(K.globalVars=new oe(O,K.globalVars))}}function ct(O,K){if(K)if(K.block){var Ft=ct(O,K.prev);return Ft?Ft==K.prev?K:new Wt(Ft,K.vars,!0):null}else return At(O,K.vars)?K:new Wt(K.prev,new oe(O,K.vars),!1);else return null}function Dt(O){return O=="public"||O=="private"||O=="protected"||O=="abstract"||O=="readonly"}function Wt(O,K,Ft){this.prev=O,this.vars=K,this.block=Ft}function oe(O,K){this.name=O,this.next=K}var Pe=new oe("this",new oe("arguments",null));function _e(){A.state.context=new Wt(A.state.context,A.state.localVars,!1),A.state.localVars=Pe}function ve(){A.state.context=new Wt(A.state.context,A.state.localVars,!0),A.state.localVars=null}_e.lex=ve.lex=!0;function Ct(){A.state.localVars=A.state.context.vars,A.state.context=A.state.context.prev}Ct.lex=!0;function Rt(O,K){var Ft=function(){var Yt=A.state,Ae=Yt.indented;if(Yt.lexical.type=="stat")Ae=Yt.lexical.indented;else for(var er=Yt.lexical;er&&er.type==")"&&er.align;er=er.prev)Ae=er.indented;Yt.lexical=new X(Ae,A.stream.column(),O,null,Yt.lexical,K)};return Ft.lex=!0,Ft}function zt(){var O=A.state;O.lexical.prev&&(O.lexical.type==")"&&(O.indented=O.lexical.indented),O.lexical=O.lexical.prev)}zt.lex=!0;function ie(O){function K(Ft){return Ft==O?E():O==";"||Ft=="}"||Ft==")"||Ft=="]"?tt():E(K)}return K}function ne(O,K){return O=="var"?E(Rt("vardef",K),je,ie(";"),zt):O=="keyword a"?E(Rt("form"),cr,ne,zt):O=="keyword b"?E(Rt("form"),ne,zt):O=="keyword d"?A.stream.match(/^\s*$/,!1)?E():E(Rt("stat"),ar,ie(";"),zt):O=="debugger"?E(ie(";")):O=="{"?E(Rt("}"),ve,Be,zt,Ct):O==";"?E():O=="if"?(A.state.lexical.info=="else"&&A.state.cc[A.state.cc.length-1]==zt&&A.state.cc.pop()(),E(Rt("form"),cr,ne,zt,Qr)):O=="function"?E(mr):O=="for"?E(Rt("form"),ve,Cn,ne,Ct,zt):O=="class"||L&&K=="interface"?(A.marked="keyword",E(Rt("form",O=="class"?O:K),Ln,zt)):O=="variable"?L&&K=="declare"?(A.marked="keyword",E(ne)):L&&(K=="module"||K=="enum"||K=="type")&&A.stream.match(/^\s*\w/,!1)?(A.marked="keyword",K=="enum"?E(qe):K=="type"?E(xn,ie("operator"),Me,ie(";")):E(Rt("form"),tr,ie("{"),Rt("}"),Be,zt,zt)):L&&K=="namespace"?(A.marked="keyword",E(Rt("form"),me,ne,zt)):L&&K=="abstract"?(A.marked="keyword",E(ne)):E(Rt("stat"),xe):O=="switch"?E(Rt("form"),cr,ie("{"),Rt("}","switch"),ve,Be,zt,zt,Ct):O=="case"?E(me,ie(":")):O=="default"?E(ie(":")):O=="catch"?E(Rt("form"),_e,qt,ne,zt,Ct):O=="export"?E(Rt("stat"),Sn,zt):O=="import"?E(Rt("stat"),So,zt):O=="async"?E(ne):K=="@"?E(me,ne):tt(Rt("stat"),me,ie(";"),zt)}function qt(O){if(O=="(")return E(Gn,ie(")"))}function me(O,K){return _r(O,K,!1)}function Ne(O,K){return _r(O,K,!0)}function cr(O){return O!="("?tt():E(Rt(")"),ar,ie(")"),zt)}function _r(O,K,Ft){if(A.state.fatArrowAt==A.stream.start){var Yt=Ft?Lt:ht;if(O=="(")return E(_e,Rt(")"),Vt(Gn,")"),zt,ie("=>"),Yt,Ct);if(O=="variable")return tt(_e,tr,ie("=>"),Yt,Ct)}var Ae=Ft?T:he;return ot.hasOwnProperty(O)?E(Ae):O=="function"?E(mr,Ae):O=="class"||L&&K=="interface"?(A.marked="keyword",E(Rt("form"),Ro,zt)):O=="keyword c"||O=="async"?E(Ft?Ne:me):O=="("?E(Rt(")"),ar,ie(")"),zt,Ae):O=="operator"||O=="spread"?E(Ft?Ne:me):O=="["?E(Rt("]"),vn,zt,Ae):O=="{"?Te(De,"}",null,Ae):O=="quasi"?tt(B,Ae):O=="new"?E(Z(Ft)):E()}function ar(O){return O.match(/[;\}\)\],]/)?tt():tt(me)}function he(O,K){return O==","?E(ar):T(O,K,!1)}function T(O,K,Ft){var Yt=Ft==!1?he:T,Ae=Ft==!1?me:Ne;if(O=="=>")return E(_e,Ft?Lt:ht,Ct);if(O=="operator")return/\+\+|--/.test(K)||L&&K=="!"?E(Yt):L&&K=="<"&&A.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?E(Rt(">"),Vt(Me,">"),zt,Yt):K=="?"?E(me,ie(":"),Ae):E(Ae);if(O=="quasi")return tt(B,Yt);if(O!=";"){if(O=="(")return Te(Ne,")","call",Yt);if(O==".")return E(He,Yt);if(O=="[")return E(Rt("]"),ar,ie("]"),zt,Yt);if(L&&K=="as")return A.marked="keyword",E(Me,Yt);if(O=="regexp")return A.state.lastType=A.marked="operator",A.stream.backUp(A.stream.pos-A.stream.start-1),E(Ae)}}function B(O,K){return O!="quasi"?tt():K.slice(K.length-2)!="${"?E(B):E(ar,nt)}function nt(O){if(O=="}")return A.marked="string-2",A.state.tokenize=ue,E(B)}function ht(O){return dt(A.stream,A.state),tt(O=="{"?ne:me)}function Lt(O){return dt(A.stream,A.state),tt(O=="{"?ne:Ne)}function Z(O){return function(K){return K=="."?E(O?mt:Et):K=="variable"&&L?E(wt,O?T:he):tt(O?Ne:me)}}function Et(O,K){if(K=="target")return A.marked="keyword",E(he)}function mt(O,K){if(K=="target")return A.marked="keyword",E(T)}function xe(O){return O==":"?E(zt,ne):tt(he,ie(";"),zt)}function He(O){if(O=="variable")return A.marked="property",E()}function De(O,K){if(O=="async")return A.marked="property",E(De);if(O=="variable"||A.style=="keyword"){if(A.marked="property",K=="get"||K=="set")return E(ee);var Ft;return L&&A.state.fatArrowAt==A.stream.start&&(Ft=A.stream.match(/^\s*:\s*/,!1))&&(A.state.fatArrowAt=A.stream.pos+Ft[0].length),E(Jt)}else{if(O=="number"||O=="string")return A.marked=N?"property":A.style+" property",E(Jt);if(O=="jsonld-keyword")return E(Jt);if(L&&Dt(K))return A.marked="keyword",E(De);if(O=="[")return E(me,Ee,ie("]"),Jt);if(O=="spread")return E(Ne,Jt);if(K=="*")return A.marked="keyword",E(De);if(O==":")return tt(Jt)}}function ee(O){return O!="variable"?tt(Jt):(A.marked="property",E(mr))}function Jt(O){if(O==":")return E(Ne);if(O=="(")return tt(mr)}function Vt(O,K,Ft){function Yt(Ae,er){if(Ft?Ft.indexOf(Ae)>-1:Ae==","){var or=A.state.lexical;return or.info=="call"&&(or.pos=(or.pos||0)+1),E(function(Se,gn){return Se==K||gn==K?tt():tt(O)},Yt)}return Ae==K||er==K?E():Ft&&Ft.indexOf(";")>-1?tt(O):E(ie(K))}return function(Ae,er){return Ae==K||er==K?E():tt(O,Yt)}}function Te(O,K,Ft){for(var Yt=3;Yt"),Me);if(O=="quasi")return tt(Or,ft)}function nr(O){if(O=="=>")return E(Me)}function Qe(O){return O.match(/[\}\)\]]/)?E():O==","||O==";"?E(Qe):tt(Xt,Qe)}function Xt(O,K){if(O=="variable"||A.style=="keyword")return A.marked="property",E(Xt);if(K=="?"||O=="number"||O=="string")return E(Xt);if(O==":")return E(Me);if(O=="[")return E(ie("variable"),Ke,ie("]"),Xt);if(O=="(")return tt(Rr,Xt);if(!O.match(/[;\}\)\],]/))return E()}function Or(O,K){return O!="quasi"?tt():K.slice(K.length-2)!="${"?E(Or):E(Me,Kn)}function Kn(O){if(O=="}")return A.marked="string-2",A.state.tokenize=ue,E(Or)}function U(O,K){return O=="variable"&&A.stream.match(/^\s*[?:]/,!1)||K=="?"?E(U):O==":"?E(Me):O=="spread"?E(U):tt(Me)}function ft(O,K){if(K=="<")return E(Rt(">"),Vt(Me,">"),zt,ft);if(K=="|"||O=="."||K=="&")return E(Me);if(O=="[")return E(Me,ie("]"),ft);if(K=="extends"||K=="implements")return A.marked="keyword",E(Me);if(K=="?")return E(Me,ie(":"),Me)}function wt(O,K){if(K=="<")return E(Rt(">"),Vt(Me,">"),zt,ft)}function Ht(){return tt(Me,de)}function de(O,K){if(K=="=")return E(Me)}function je(O,K){return K=="enum"?(A.marked="keyword",E(qe)):tt(tr,Ee,Tr,Co)}function tr(O,K){if(L&&Dt(K))return A.marked="keyword",E(tr);if(O=="variable")return Pt(K),E();if(O=="spread")return E(tr);if(O=="[")return Te(Jr,"]");if(O=="{")return Te(Zr,"}")}function Zr(O,K){return O=="variable"&&!A.stream.match(/^\s*:/,!1)?(Pt(K),E(Tr)):(O=="variable"&&(A.marked="property"),O=="spread"?E(tr):O=="}"?tt():O=="["?E(me,ie("]"),ie(":"),Zr):E(ie(":"),tr,Tr))}function Jr(){return tt(tr,Tr)}function Tr(O,K){if(K=="=")return E(Ne)}function Co(O){if(O==",")return E(je)}function Qr(O,K){if(O=="keyword b"&&K=="else")return E(Rt("form","else"),ne,zt)}function Cn(O,K){if(K=="await")return E(Cn);if(O=="(")return E(Rt(")"),xo,zt)}function xo(O){return O=="var"?E(je,Er):O=="variable"?E(Er):tt(Er)}function Er(O,K){return O==")"?E():O==";"?E(Er):K=="in"||K=="of"?(A.marked="keyword",E(me,Er)):tt(me,Er)}function mr(O,K){if(K=="*")return A.marked="keyword",E(mr);if(O=="variable")return Pt(K),E(mr);if(O=="(")return E(_e,Rt(")"),Vt(Gn,")"),zt,ge,ne,Ct);if(L&&K=="<")return E(Rt(">"),Vt(Ht,">"),zt,mr)}function Rr(O,K){if(K=="*")return A.marked="keyword",E(Rr);if(O=="variable")return Pt(K),E(Rr);if(O=="(")return E(_e,Rt(")"),Vt(Gn,")"),zt,ge,Ct);if(L&&K=="<")return E(Rt(">"),Vt(Ht,">"),zt,Rr)}function xn(O,K){if(O=="keyword"||O=="variable")return A.marked="type",E(xn);if(K=="<")return E(Rt(">"),Vt(Ht,">"),zt)}function Gn(O,K){return K=="@"&&E(me,Gn),O=="spread"?E(Gn):L&&Dt(K)?(A.marked="keyword",E(Gn)):L&&O=="this"?E(Ee,Tr):tt(tr,Ee,Tr)}function Ro(O,K){return O=="variable"?Ln(O,K):tn(O,K)}function Ln(O,K){if(O=="variable")return Pt(K),E(tn)}function tn(O,K){if(K=="<")return E(Rt(">"),Vt(Ht,">"),zt,tn);if(K=="extends"||K=="implements"||L&&O==",")return K=="implements"&&(A.marked="keyword"),E(L?Me:me,tn);if(O=="{")return E(Rt("}"),Nr,zt)}function Nr(O,K){if(O=="async"||O=="variable"&&(K=="static"||K=="get"||K=="set"||L&&Dt(K))&&A.stream.match(/^\s+#?[\w$\xa1-\uffff]/,!1))return A.marked="keyword",E(Nr);if(O=="variable"||A.style=="keyword")return A.marked="property",E(ho,Nr);if(O=="number"||O=="string")return E(ho,Nr);if(O=="[")return E(me,Ee,ie("]"),ho,Nr);if(K=="*")return A.marked="keyword",E(Nr);if(L&&O=="(")return tt(Rr,Nr);if(O==";"||O==",")return E(Nr);if(O=="}")return E();if(K=="@")return E(me,Nr)}function ho(O,K){if(K=="!"||K=="?")return E(ho);if(O==":")return E(Me,Tr);if(K=="=")return E(Ne);var Ft=A.state.lexical.prev,Yt=Ft&&Ft.info=="interface";return tt(Yt?Rr:mr)}function Sn(O,K){return K=="*"?(A.marked="keyword",E(Pr,ie(";"))):K=="default"?(A.marked="keyword",E(me,ie(";"))):O=="{"?E(Vt(On,"}"),Pr,ie(";")):tt(ne)}function On(O,K){if(K=="as")return A.marked="keyword",E(ie("variable"));if(O=="variable")return tt(Ne,On)}function So(O){return O=="string"?E():O=="("?tt(me):O=="."?tt(he):tt(sr,Ce,Pr)}function sr(O,K){return O=="{"?Te(sr,"}"):(O=="variable"&&Pt(K),K=="*"&&(A.marked="keyword"),E(Tn))}function Ce(O){if(O==",")return E(sr,Ce)}function Tn(O,K){if(K=="as")return A.marked="keyword",E(sr)}function Pr(O,K){if(K=="from")return A.marked="keyword",E(me)}function vn(O){return O=="]"?E():tt(Vt(Ne,"]"))}function qe(){return tt(Rt("form"),tr,ie("{"),Rt("}"),Vt($n,"}"),zt,zt)}function $n(){return tt(tr,Tr)}function vo(O,K){return O.lastType=="operator"||O.lastType==","||G.test(K.charAt(0))||/[,.]/.test(K.charAt(0))}function io(O,K,Ft){return K.tokenize==yt&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(K.lastType)||K.lastType=="quasi"&&/\{\s*$/.test(O.string.slice(0,O.pos-(Ft||0)))}return{startState:function(O){var K={tokenize:yt,lastType:"sof",cc:[],lexical:new X((O||0)-R,0,"block",!1),localVars:F.localVars,context:F.localVars&&new Wt(null,null,!1),indented:O||0};return F.globalVars&&typeof F.globalVars=="object"&&(K.globalVars=F.globalVars),K},token:function(O,K){if(O.sol()&&(K.lexical.hasOwnProperty("align")||(K.lexical.align=!1),K.indented=O.indentation(),dt(O,K)),K.tokenize!=te&&O.eatSpace())return null;var Ft=K.tokenize(O,K);return Nt=="comment"?Ft:(K.lastType=Nt=="operator"&&(jt=="++"||jt=="--")?"incdec":Nt,et(K,Ft,Nt,jt,O))},indent:function(O,K){if(O.tokenize==te||O.tokenize==ue)return rt.Pass;if(O.tokenize!=yt)return 0;var Ft=K&&K.charAt(0),Yt=O.lexical,Ae;if(!/^\s*else\b/.test(K))for(var er=O.cc.length-1;er>=0;--er){var or=O.cc[er];if(or==zt)Yt=Yt.prev;else if(or!=Qr&&or!=Ct)break}for(;(Yt.type=="stat"||Yt.type=="form")&&(Ft=="}"||(Ae=O.cc[O.cc.length-1])&&(Ae==he||Ae==T)&&!/^[,\.=+\-*:?[\(]/.test(K));)Yt=Yt.prev;M&&Yt.type==")"&&Yt.prev.type=="stat"&&(Yt=Yt.prev);var Se=Yt.type,gn=Ft==Se;return Se=="vardef"?Yt.indented+(O.lastType=="operator"||O.lastType==","?Yt.info.length+1:0):Se=="form"&&Ft=="{"?Yt.indented:Se=="form"?Yt.indented+R:Se=="stat"?Yt.indented+(vo(O,K)?M||R:0):Yt.info=="switch"&&!gn&&F.doubleIndentSwitch!=!1?Yt.indented+(/^(?:case|default)\b/.test(K)?R:2*R):Yt.align?Yt.column+(gn?0:1):Yt.indented+(gn?0:R)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:x?null:"/*",blockCommentEnd:x?null:"*/",blockCommentContinue:x?null:" * ",lineComment:x?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:x?"json":"javascript",jsonldMode:N,jsonMode:x,expressionAllowed:io,skipExpression:function(O){et(O,"atom","atom","true",new rt.StringStream("",2,null))}}}),rt.registerHelper("wordChars","javascript",/[\w$]/),rt.defineMIME("text/javascript","javascript"),rt.defineMIME("text/ecmascript","javascript"),rt.defineMIME("application/javascript","javascript"),rt.defineMIME("application/x-javascript","javascript"),rt.defineMIME("application/ecmascript","javascript"),rt.defineMIME("application/json",{name:"javascript",json:!0}),rt.defineMIME("application/x-json",{name:"javascript",json:!0}),rt.defineMIME("application/manifest+json",{name:"javascript",json:!0}),rt.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),rt.defineMIME("text/typescript",{name:"javascript",typescript:!0}),rt.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},589:(w,Y,st)=>{(function(rt){rt(st(631))})(function(rt){var lt={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},F={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};rt.defineMode("xml",function(R,M){var N=R.indentUnit,x={},j=M.htmlMode?lt:F;for(var L in j)x[L]=j[L];for(var L in M)x[L]=M[L];var D,H;function G(E,At){function Pt(Wt){return At.tokenize=Wt,Wt(E,At)}var ct=E.next();if(ct=="<")return E.eat("!")?E.eat("[")?E.match("CDATA[")?Pt(Nt("atom","]]>")):null:E.match("--")?Pt(Nt("comment","-->")):E.match("DOCTYPE",!0,!0)?(E.eatWhile(/[\w\._\-]/),Pt(jt(1))):null:E.eat("?")?(E.eatWhile(/[\w\._\-]/),At.tokenize=Nt("meta","?>"),"meta"):(D=E.eat("/")?"closeTag":"openTag",At.tokenize=pt,"tag bracket");if(ct=="&"){var Dt;return E.eat("#")?E.eat("x")?Dt=E.eatWhile(/[a-fA-F\d]/)&&E.eat(";"):Dt=E.eatWhile(/[\d]/)&&E.eat(";"):Dt=E.eatWhile(/[\w\.\-:]/)&&E.eat(";"),Dt?"atom":"error"}else return E.eatWhile(/[^&<]/),null}G.isInText=!0;function pt(E,At){var Pt=E.next();if(Pt==">"||Pt=="/"&&E.eat(">"))return At.tokenize=G,D=Pt==">"?"endTag":"selfcloseTag","tag bracket";if(Pt=="=")return D="equals",null;if(Pt=="<"){At.tokenize=G,At.state=ue,At.tagName=At.tagStart=null;var ct=At.tokenize(E,At);return ct?ct+" tag error":"tag error"}else return/[\'\"]/.test(Pt)?(At.tokenize=xt(Pt),At.stringStartCol=E.column(),At.tokenize(E,At)):(E.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function xt(E){var At=function(Pt,ct){for(;!Pt.eol();)if(Pt.next()==E){ct.tokenize=pt;break}return"string"};return At.isInAttribute=!0,At}function Nt(E,At){return function(Pt,ct){for(;!Pt.eol();){if(Pt.match(At)){ct.tokenize=G;break}Pt.next()}return E}}function jt(E){return function(At,Pt){for(var ct;(ct=At.next())!=null;){if(ct=="<")return Pt.tokenize=jt(E+1),Pt.tokenize(At,Pt);if(ct==">")if(E==1){Pt.tokenize=G;break}else return Pt.tokenize=jt(E-1),Pt.tokenize(At,Pt)}return"meta"}}function Tt(E){return E&&E.toLowerCase()}function yt(E,At,Pt){this.prev=E.context,this.tagName=At||"",this.indent=E.indented,this.startOfLine=Pt,(x.doNotIndent.hasOwnProperty(At)||E.context&&E.context.noIndent)&&(this.noIndent=!0)}function Kt(E){E.context&&(E.context=E.context.prev)}function te(E,At){for(var Pt;;){if(!E.context||(Pt=E.context.tagName,!x.contextGrabbers.hasOwnProperty(Tt(Pt))||!x.contextGrabbers[Tt(Pt)].hasOwnProperty(Tt(At))))return;Kt(E)}}function ue(E,At,Pt){return E=="openTag"?(Pt.tagStart=At.column(),Zt):E=="closeTag"?dt:ue}function Zt(E,At,Pt){return E=="word"?(Pt.tagName=At.current(),H="tag",z):x.allowMissingTagName&&E=="endTag"?(H="tag bracket",z(E,At,Pt)):(H="error",Zt)}function dt(E,At,Pt){if(E=="word"){var ct=At.current();return Pt.context&&Pt.context.tagName!=ct&&x.implicitlyClosed.hasOwnProperty(Tt(Pt.context.tagName))&&Kt(Pt),Pt.context&&Pt.context.tagName==ct||x.matchClosing===!1?(H="tag",ot):(H="tag error",X)}else return x.allowMissingTagName&&E=="endTag"?(H="tag bracket",ot(E,At,Pt)):(H="error",X)}function ot(E,At,Pt){return E!="endTag"?(H="error",ot):(Kt(Pt),ue)}function X(E,At,Pt){return H="error",ot(E,At,Pt)}function z(E,At,Pt){if(E=="word")return H="attribute",et;if(E=="endTag"||E=="selfcloseTag"){var ct=Pt.tagName,Dt=Pt.tagStart;return Pt.tagName=Pt.tagStart=null,E=="selfcloseTag"||x.autoSelfClosers.hasOwnProperty(Tt(ct))?te(Pt,ct):(te(Pt,ct),Pt.context=new yt(Pt,ct,Dt==Pt.indented)),ue}return H="error",z}function et(E,At,Pt){return E=="equals"?A:(x.allowMissing||(H="error"),z(E,At,Pt))}function A(E,At,Pt){return E=="string"?tt:E=="word"&&x.allowUnquoted?(H="string",z):(H="error",z(E,At,Pt))}function tt(E,At,Pt){return E=="string"?tt:z(E,At,Pt)}return{startState:function(E){var At={tokenize:G,state:ue,indented:E||0,tagName:null,tagStart:null,context:null};return E!=null&&(At.baseIndent=E),At},token:function(E,At){if(!At.tagName&&E.sol()&&(At.indented=E.indentation()),E.eatSpace())return null;D=null;var Pt=At.tokenize(E,At);return(Pt||D)&&Pt!="comment"&&(H=null,At.state=At.state(D||Pt,E,At),H&&(Pt=H=="error"?Pt+" error":H)),Pt},indent:function(E,At,Pt){var ct=E.context;if(E.tokenize.isInAttribute)return E.tagStart==E.indented?E.stringStartCol+1:E.indented+N;if(ct&&ct.noIndent)return rt.Pass;if(E.tokenize!=pt&&E.tokenize!=G)return Pt?Pt.match(/^(\s*)/)[0].length:0;if(E.tagName)return x.multilineTagIndentPastTag!==!1?E.tagStart+E.tagName.length+2:E.tagStart+N*(x.multilineTagIndentFactor||1);if(x.alignCDATA&&/$/,blockCommentStart:"",configuration:x.htmlMode?"html":"xml",helperType:x.htmlMode?"html":"xml",skipAttribute:function(E){E.state==A&&(E.state=z)},xmlCurrentTag:function(E){return E.tagName?{name:E.tagName,close:E.type=="closeTag"}:null},xmlCurrentContext:function(E){for(var At=[],Pt=E.context;Pt;Pt=Pt.prev)At.push(Pt.tagName);return At.reverse()}}}),rt.defineMIME("text/xml","xml"),rt.defineMIME("application/xml","xml"),rt.mimeModes.hasOwnProperty("text/html")||rt.defineMIME("text/html",{name:"xml",htmlMode:!0})})},642:(w,Y,st)=>{st.d(Y,{Z:()=>R});var rt=st(346),lt=function(){var M=function(N,x){return M=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(j,L){j.__proto__=L}||function(j,L){for(var D in L)Object.prototype.hasOwnProperty.call(L,D)&&(j[D]=L[D])},M(N,x)};return function(N,x){if(typeof x!="function"&&x!==null)throw new TypeError("Class extends value "+String(x)+" is not a constructor or null");M(N,x);function j(){this.constructor=N}N.prototype=x===null?Object.create(x):(j.prototype=x.prototype,new j)}}(),F=function(M){lt(N,M);function N(x,j,L){var D=M.call(this,j,L)||this;return D._module=x,D}return Object.defineProperty(N.prototype,"module",{get:function(){return this._module},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"config",{get:function(){return this._module.config},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"em",{get:function(){return this._module.em},enumerable:!1,configurable:!0}),N}(rt.Hn);const R=F},675:(w,Y,st)=>{st.d(Y,{Z:()=>M,q:()=>F});var rt=st(642),lt=function(){var N=function(x,j){return N=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,D){L.__proto__=D}||function(L,D){for(var H in D)Object.prototype.hasOwnProperty.call(D,H)&&(L[H]=D[H])},N(x,j)};return function(x,j){if(typeof j!="function"&&j!==null)throw new TypeError("Class extends value "+String(j)+" is not a constructor or null");N(x,j);function L(){this.constructor=x}x.prototype=j===null?Object.create(j):(L.prototype=j.prototype,new L)}}(),F;(function(N){N.Select="select",N.Hover="hover",N.Spacing="spacing",N.Target="target",N.Resize="resize"})(F||(F={}));var R=function(N){lt(x,N);function x(){return N!==null&&N.apply(this,arguments)||this}return x.prototype.defaults=function(){return{id:"",type:""}},Object.defineProperty(x.prototype,"type",{get:function(){return this.get("type")||""},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"component",{get:function(){var j,L=this.get("component");return L||((j=this.get("componentView"))===null||j===void 0?void 0:j.model)},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"componentView",{get:function(){var j,L=this.get("componentView");return L||((j=this.get("component"))===null||j===void 0?void 0:j.getView())},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"el",{get:function(){var j;return(j=this.componentView)===null||j===void 0?void 0:j.el},enumerable:!1,configurable:!0}),x.prototype.getBoxRect=function(j){var L=this,D=L.el,H=L.em,G=H.Canvas.getCanvasView(),pt=this.get("boxRect");return pt||(D&&G?G.getElBoxRect(D,j):{x:0,y:0,width:0,height:0})},x.prototype.getStyle=function(j){j===void 0&&(j={});var L=j.boxRect||this.getBoxRect(j),D=L.width,H=L.height,G=L.x,pt=L.y;return{width:"".concat(D,"px"),height:"".concat(H,"px"),top:"0",left:"0",position:"absolute",translate:"".concat(G,"px ").concat(pt,"px")}},x.prototype.isType=function(j){return this.type===j},x}(rt.Z);const M=R},713:(w,Y,st)=>{st.d(Y,{Z:()=>lt});var rt;(function(F){F.run="command:run",F._run="run",F.runCommand="command:run:",F._runCommand="run:",F.runBeforeCommand="command:run:before:",F.abort="command:abort:",F._abort="abort:",F.stop="command:stop",F._stop="stop",F.stopCommand="command:stop:",F._stopCommand="stop:",F.stopBeforeCommand="command:stop:before:"})(rt||(rt={}));const lt=rt},858:(w,Y,st)=>{st.r(Y),st.d(Y,{default:()=>rt});const rt={run:function(lt){lt.Components.clear(),lt.Css.clear()}}},884:(w,Y,st)=>{st.r(Y),st.d(Y,{default:()=>R});var rt=st(50),lt=st(668),F=st(491);const R={run:function(M){(0,rt.bindAll)(this,"onKeyUp","enableDragger","disableDragger"),this.editor=M,this.canvasModel=this.canvas.getCanvasView().model,this.toggleMove(1)},stop:function(M){this.toggleMove(),this.disableDragger()},onKeyUp:function(M){(0,F.sN)(M)===" "&&this.editor.stopCommand(this.id)},enableDragger:function(M){this.toggleDragger(1,M)},disableDragger:function(M){this.toggleDragger(0,M)},toggleDragger:function(M,N){var x=this,j=x.canvasModel,L=x.em,D=this.dragger,H=M?"add":"remove";this.getCanvas().classList[H]("".concat(this.ppfx,"is__grabbing")),D||(D=new lt.Z({getPosition:function(){return{x:j.get("x"),y:j.get("y")}},setPosition:function(G){var pt=G.x,xt=G.y;j.set({x:pt,y:xt})},onStart:function(G,pt){L.trigger("canvas:move:start",pt)},onDrag:function(G,pt){L.trigger("canvas:move",pt)},onEnd:function(G,pt){L.trigger("canvas:move:end",pt)}}),this.dragger=D),M?D.start(N):D.stop()},toggleMove:function(M){var N=this.ppfx,x=M?"add":"remove",j=M?"on":"off",L={on:F.on,off:F.S1},D=this.getCanvas(),H=["".concat(N,"is__grab")];!M&&H.push("".concat(N,"is__grabbing")),H.forEach(function(G){return D.classList[x](G)}),L[j](document,"keyup",this.onKeyUp),L[j](D,"mousedown",this.enableDragger),L[j](document,"mouseup",this.disableDragger)}}},790:(w,Y,st)=>{st.r(Y),st.d(Y,{default:()=>N,defineCommand:()=>R});var rt=st(346),lt=st(713),F=function(){var x=function(j,L){return x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(D,H){D.__proto__=H}||function(D,H){for(var G in H)Object.prototype.hasOwnProperty.call(H,G)&&(D[G]=H[G])},x(j,L)};return function(j,L){if(typeof L!="function"&&L!==null)throw new TypeError("Class extends value "+String(L)+" is not a constructor or null");x(j,L);function D(){this.constructor=j}j.prototype=L===null?Object.create(L):(D.prototype=L.prototype,new D)}}();function R(x){return x}var M=function(x){F(j,x);function j(L){var D=x.call(this,0)||this;D.config=L||{},D.em=D.config.em||{};var H=D.config.stylePrefix;return D.pfx=H,D.ppfx=D.config.pStylePrefix,D.hoverClass="".concat(H,"hover"),D.badgeClass="".concat(H,"badge"),D.plhClass="".concat(H,"placeholder"),D.freezClass="".concat(D.ppfx,"freezed"),D.canvas=D.em.Canvas,D.init(D.config),D}return j.prototype.onFrameScroll=function(L){},j.prototype.getCanvas=function(){return this.canvas.getElement()},j.prototype.getCanvasBody=function(){return this.canvas.getBody()},j.prototype.getCanvasTools=function(){return this.canvas.getToolsEl()},j.prototype.offset=function(L){var D=L.getBoundingClientRect();return{top:D.top+L.ownerDocument.body.scrollTop,left:D.left+L.ownerDocument.body.scrollLeft}},j.prototype.init=function(L){},j.prototype.callRun=function(L,D){D===void 0&&(D={});var H=this.id;if(L.trigger("".concat(lt.Z.runBeforeCommand).concat(H),{options:D}),L.trigger("".concat(lt.Z._runCommand).concat(H,":before"),D),D.abort){L.trigger("".concat(lt.Z.abort).concat(H),{options:D}),L.trigger("".concat(lt.Z._abort).concat(H),D);return}var G=D.sender||L,pt=this.run(L,G,D),xt={id:H,result:pt,options:D};return L.trigger("".concat(lt.Z.runCommand).concat(H),xt),L.trigger(lt.Z.run,xt),L.trigger("".concat(lt.Z._runCommand).concat(H),pt,D),L.trigger(lt.Z._run,H,pt,D),pt},j.prototype.callStop=function(L,D){D===void 0&&(D={});var H=this.id,G=D.sender||L;L.trigger("".concat(lt.Z.stopBeforeCommand).concat(H),{options:D}),L.trigger("".concat(lt.Z._stopCommand).concat(H,":before"),D);var pt=this.stop(L,G,D),xt={id:H,result:pt,options:D};return L.trigger("".concat(lt.Z.stopCommand).concat(H),xt),L.trigger(lt.Z.stop,xt),L.trigger("".concat(lt.Z._stopCommand).concat(H),pt,D),L.trigger(lt.Z._stop,H,pt,D),pt},j.prototype.stopCommand=function(L){this.em.Commands.stop(this.id,L)},j.prototype.run=function(L,D,H){},j.prototype.stop=function(L,D,H){},j}(rt.Hn);const N=M},180:(w,Y,st)=>{st.r(Y),st.d(Y,{default:()=>R});var rt=st(50),lt=function(M,N,x){if(x||arguments.length===2)for(var j=0,L=N.length,D;j{st.r(Y),st.d(Y,{default:()=>M});var rt=st(50),lt=st(668),F=function(){return F=Object.assign||function(N){for(var x,j=1,L=arguments.length;j +
+ `);x=document.createElement("div"),x.className="".concat(G,"guides"),pt.className="".concat(G,"guide-info ").concat(G,"guide-info__x"),xt.className="".concat(G,"guide-info ").concat(G,"guide-info__y"),pt.innerHTML=Nt,xt.innerHTML=Nt,x.appendChild(pt),x.appendChild(xt),L.Canvas.getGlobalToolsEl().appendChild(x),this.guidesEl=x,this.elGuideInfoX=pt,this.elGuideInfoY=xt,this.elGuideInfoContentX=pt.querySelector(".".concat(G,"guide-info__content")),this.elGuideInfoContentY=xt.querySelector(".".concat(G,"guide-info__content")),D.on("canvas:update frame:scroll",(0,rt.debounce)(function(){var jt;N.updateGuides(),H.debug&&((jt=N.guides)===null||jt===void 0||jt.forEach(function(Tt){return N.renderGuide(Tt)}))},200))}return x},getGuidesStatic:function(){var N=this,x=[],j=this.target.getEl(),L=j.parentNode,D=L===void 0?{}:L;return(0,rt.each)(D.children,function(H){return x=x.concat(j!==H?N.getElementGuides(H):[])}),x.concat(this.getElementGuides(D))},getGuidesTarget:function(){return this.getElementGuides(this.target.getEl())},updateGuides:function(N){var x=this,j,L;(N||this.guides).forEach(function(D){var H=D.origin,G=j===H?L:x.getElementPos(H);j=H,L=G,(0,rt.each)(x.getGuidePosUpdate(D,G),function(pt,xt){return D[xt]=pt}),D.originRect=G})},getGuidePosUpdate:function(N,x){var j={},L=x.top,D=x.height,H=x.left,G=x.width;switch(N.type){case"t":j.y=L;break;case"b":j.y=L+D;break;case"l":j.x=H;break;case"r":j.x=H+G;break;case"x":j.x=H+G/2;break;case"y":j.y=L+D/2;break}return j},renderGuide:function(N){N===void 0&&(N={});var x=N.guide||document.createElement("div"),j="px",L=N.active?2:1,D=x.children[0];return x.style="position: absolute; background-color: ".concat(N.active?"green":"red",";"),x.children.length||(D=document.createElement("div"),D.style="position: absolute; color: red; padding: 5px; top: 0; left: 0;",x.appendChild(D)),N.y?(x.style.width="100%",x.style.height="".concat(L).concat(j),x.style.top="".concat(N.y).concat(j),x.style.left=0):(x.style.width="".concat(L).concat(j),x.style.height="100%",x.style.left="".concat(N.x).concat(j),x.style.top="0".concat(j)),!N.guide&&this.guidesContainer.appendChild(x),x},getElementPos:function(N){return this.editor.Canvas.getElementPos(N,{noScroll:1})},getElementGuides:function(N){var x=this,j=this.opts,L=this.getElementPos(N),D=L.top,H=L.height,G=L.left,pt=L.width,xt=[{type:"t",y:D},{type:"b",y:D+H},{type:"l",x:G},{type:"r",x:G+pt},{type:"x",x:G+pt/2},{type:"y",y:D+H/2}].map(function(Nt){return F(F({},Nt),{origin:N,originRect:L,guide:j.debug&&x.renderGuide(Nt)})});return xt.forEach(function(Nt){var jt;return(jt=x.guides)===null||jt===void 0?void 0:jt.push(Nt)}),xt},getTranslate:function(N,x){x===void 0&&(x="x");var j=0;return(N||"").split(" ").forEach(function(L){var D=L.trim(),H="translate".concat(x.toUpperCase(),"(");D.indexOf(H)===0&&(j=parseFloat(D.replace(H,"")))}),j},setTranslate:function(N,x,j){var L="translate".concat(x.toUpperCase(),"("),D="".concat(L).concat(j,")"),H=(N||"").split(" ").map(function(G){var pt=G.trim();return pt.indexOf(L)===0&&(G=D),G}).join(" ");return H.indexOf(L)<0&&(H+=" ".concat(D)),H},getPosition:function(){var N=this,x=N.target,j=N.isTran,L=x.getStyle(),D=L.left,H=L.top,G=L.transform,pt=0,xt=0;return j?(pt=this.getTranslate(G),xt=this.getTranslate(G,"y")):(pt=parseFloat(D||0),xt=parseFloat(H||0)),{x:pt,y:xt}},setPosition:function(N){var x=N.x,j=N.y,L=N.end,D=N.position,H=N.width,G=N.height,pt=this,xt=pt.target,Nt=pt.isTran,jt=pt.em,Tt="px",yt=!L,Kt="".concat(parseInt(x,10)).concat(Tt),te="".concat(parseInt(j,10)).concat(Tt),ue={};if(Nt){var Zt=xt.getStyle().transform||"";Zt=this.setTranslate(Zt,"x",Kt),Zt=this.setTranslate(Zt,"y",te),ue={transform:Zt,__p:yt},xt.addStyle(ue,{avoidStore:!L})}else{var dt={position:D,width:H,height:G},ot={left:Kt,top:te,__p:yt};(0,rt.keys)(dt).forEach(function(X){var z=dt[X];z&&(ot[X]=z)}),ue=ot,xt.addStyle(ue,{avoidStore:!L})}jt==null||jt.Styles.__emitCmpStyleUpdate(ue,{components:jt.getSelected()})},_getDragData:function(){var N=this.target;return{target:N,parent:N.parent(),index:N.index()}},onStart:function(N){var x=this,j=x.target,L=x.editor,D=x.isTran,H=x.opts,G=H.center,pt=H.onStart,xt=L.Canvas,Nt=j.getStyle(),jt="absolute",Tt=[jt,"relative"];if(pt&&pt(this._getDragData()),!D&&Nt.position!==jt){var yt=xt.offset(j.getEl()),Kt=yt.left,te=yt.top,ue=yt.width,Zt=yt.height,dt=j.parent(),ot=void 0;do{var X=dt.getStyle();ot=Tt.indexOf(X.position)>=0?dt:null,dt=dt.parent()}while(dt&&!ot);if(G){var z=xt.getMouseRelativeCanvas(N),et=z.x,A=z.y;Kt=et,te=A}else if(ot){var tt=xt.offset(ot.getEl());Kt=Kt-tt.left,te=te-tt.top}this.setPosition({x:Kt,y:te,width:"".concat(ue,"px"),height:"".concat(Zt,"px"),position:jt})}},onDrag:function(){var N=this,x=this,j=x.guidesTarget,L=x.opts,D=L.onDrag;this.updateGuides(j),L.debug&&j.forEach(function(H){return N.renderGuide(H)}),L.guidesInfo&&this.renderGuideInfo(j.filter(function(H){return H.active})),D&&D(this._getDragData())},onEnd:function(N,x,j){j===void 0&&(j={});var L=this,D=L.editor,H=L.opts,G=L.id,pt=H.onEnd;pt&&pt(N,j,F(F({event:N},j),this._getDragData())),D.stopCommand(G),this.hideGuidesInfo(),this.em.trigger("".concat(R,":end"),this.getEventOpts())},hideGuidesInfo:function(){var N=this;["X","Y"].forEach(function(x){var j=N["elGuideInfo".concat(x)];j&&(j.style.display="none")})},renderGuideInfo:function(N){var x=this;N===void 0&&(N=[]);var j=this.guidesStatic;this.hideGuidesInfo(),N.forEach(function(L){var D=L.origin,H=L.x,G=x.getElementPos(D),pt=(0,rt.isUndefined)(H)?"y":"x",xt=pt==="y",Nt=G[xt?"left":"top"],jt=G.rect[xt?"left":"top"],Tt=xt?Nt+G.width:Nt+G.height,yt=xt?jt+G.rect.width:jt+G.rect.height,Kt=x["elGuideInfo".concat(pt.toUpperCase())],te=x["elGuideInfoContent".concat(pt.toUpperCase())],ue=Kt.style,Zt=j==null?void 0:j.filter(function(ve){return ve.type===L.type}).map(function(ve){var Ct=ve.originRect,Rt=Ct.left,zt=Ct.width,ie=Ct.top,ne=Ct.height,qt=xt?Rt:ie,me=xt?Rt+zt:ie+ne;return{gap:me0}).sort(function(ve,Ct){return ve.gap-Ct.gap}).map(function(ve){return ve.guide})[0];if(Zt){var dt=Zt.originRect,ot=dt.left,X=dt.width,z=dt.top,et=dt.height,A=dt.rect,tt=xt?ot{st.r(Y),st.d(Y,{default:()=>rt});const rt={run:function(lt){if(lt.Canvas.hasFocus()){var F=[];lt.getSelectedAll().forEach(function(R){var M=R.components(),N=M&&M.filter(function(x){return x.get("selectable")})[0];N&&F.push(N)}),F.length&<.select(F)}}}},368:(w,Y,st)=>{st.r(Y),st.d(Y,{default:()=>rt});const rt={run:function(lt,F,R){if(R===void 0&&(R={}),!(!lt.Canvas.hasFocus()&&!R.force)){var M=[];lt.getSelectedAll().forEach(function(N){for(var x=N.parent();x&&!x.get("selectable");)x=x.parent();x&&M.push(x)}),M.length&<.select(M)}}}},243:(w,Y,st)=>{st.r(Y),st.d(Y,{default:()=>rt});const rt={run:function(lt){if(lt.Canvas.hasFocus()){var F=[];lt.getSelectedAll().forEach(function(R){var M=R.parent();if(M){var N=M.components().length,x=0,j=0,L;do x++,j=R.index()+x,L=j<=N?M.getChildAt(j):null;while(L&&!L.get("selectable"));F.push(L||R)}}),F.length&<.select(F)}}}},400:(w,Y,st)=>{st.r(Y),st.d(Y,{default:()=>rt});const rt={run:function(lt){if(lt.Canvas.hasFocus()){var F=[];lt.getSelectedAll().forEach(function(R){var M=R.parent();if(M){var N=0,x=0,j;do N++,x=R.index()-N,j=x>=0?M.getChildAt(x):null;while(j&&!j.get("selectable"));F.push(j||R)}}),F.length&<.select(F)}}}},910:(w,Y,st)=>{st.r(Y),st.d(Y,{default:()=>lt});var rt=st(50);const lt={run:function(F,R,M){M===void 0&&(M={});var N=M.target,x=[];if(!N.get("styles"))return x;var j=N.get("type"),L=F.Pages.getAllWrappers(),D=(0,rt.flatten)(L.map(function(G){return G.findType(j)})).length;if(!D){var H=F.CssComposer.getAll();x=H.filter(function(G){return G.get("group")==="cmp:".concat(j)}),H.remove(x)}return x}}},744:(w,Y,st)=>{st.r(Y),st.d(Y,{default:()=>lt});var rt=function(F,R,M){if(M||arguments.length===2)for(var N=0,x=R.length,j;N{st.r(Y),st.d(Y,{default:()=>lt});var rt=st(491);const lt={run:function(F,R,M){var N=this;M===void 0&&(M={}),R&&R.set&&R.set("active",0);var x=F.getConfig(),j=F.Modal,L=x.stylePrefix;if(this.cm=F.CodeManager||null,!this.editors){var D=this.buildEditor("htmlmixed","hopscotch","HTML"),H=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=D.model,this.cssEditor=H.model;var G=(0,rt.ut)("div",{class:"".concat(L,"export-dl")});G.appendChild(D.el),G.appendChild(H.el),this.editors=G}j.open({title:x.textViewCode,content:this.editors}).getModel().once("change:open",function(){return F.stopCommand("".concat(N.id))}),this.htmlEditor.setContent(F.getHtml(M.optsHtml)),this.cssEditor.setContent(F.getCss(M.optsCss))},stop:function(F){var R=F.Modal;R&&R.close()},buildEditor:function(F,R,M){var N=this.em.CodeManager,x=N.createViewer({label:M,codeName:F,theme:R}),j=new N.EditorView({model:x,config:N.getConfig()}).render().el;return{model:x,el:j}}}},975:(w,Y,st)=>{st.r(Y),st.d(Y,{default:()=>lt});var rt=st(50);const lt={isEnabled:function(){var F=document;return!!(F.fullscreenElement||F.webkitFullscreenElement||F.mozFullScreenElement)},enable:function(F){var R="";return F.requestFullscreen?F.requestFullscreen():F.webkitRequestFullscreen?(R="webkit",F.webkitRequestFullscreen()):F.mozRequestFullScreen?(R="moz",F.mozRequestFullScreen()):F.msRequestFullscreen&&F.msRequestFullscreen(),R},disable:function(){var F=document;this.isEnabled()&&(F.exitFullscreen?F.exitFullscreen():F.webkitExitFullscreen?F.webkitExitFullscreen():F.mozCancelFullScreen?F.mozCancelFullScreen():F.msExitFullscreen&&F.msExitFullscreen())},fsChanged:function(F){this.isEnabled()||(this.stopCommand({sender:this.sender}),document.removeEventListener("".concat(F||"","fullscreenchange"),this.fsChanged))},run:function(F,R,M){M===void 0&&(M={}),this.sender=R;var N=M.target,x=(0,rt.isElement)(N)?N:document.querySelector(N),j=this.enable(x||F.getContainer());this.fsChanged=this.fsChanged.bind(this,j),document.addEventListener(j+"fullscreenchange",this.fsChanged)},stop:function(F,R){R&&R.set&&R.set("active",!1),this.disable()}}},191:(w,Y,st)=>{st.r(Y),st.d(Y,{default:()=>N});var rt=st(50),lt=st(895),F=st(491),R=st(407),M=st(189);const N=(0,rt.extend)({},M.default,R.default,{init:function(x){R.default.init.apply(this,arguments),(0,rt.bindAll)(this,"initSorter","rollback","onEndMove"),this.opt=x,this.hoverClass=this.ppfx+"highlighter-warning",this.badgeClass=this.ppfx+"badge-warning",this.noSelClass=this.ppfx+"no-select"},enable:function(){for(var x=[],j=0;j{st.r(Y),st.d(Y,{default:()=>F});var rt=st(50),lt=st(491);const F={open:function(R){var M=this,N=this,x=N.editor,j=N.title,L=N.config,D=N.am,H=L.custom;if((0,rt.isFunction)(H.open))return H.open(D.__customData());var G=x.Modal;G.open({title:j,content:R}).onceClose(function(){return x.stopCommand(M.id)})},close:function(){var R=this.config.custom;if((0,rt.isFunction)(R.close))return R.close(this.am.__customData());var M=this.editor.Modal;M&&M.close()},run:function(R,M,N){N===void 0&&(N={});var x=R.AssetManager,j=x.getConfig(),L=N.types,D=L===void 0?[]:L,H=N.accept,G=N.select;if(this.title=N.modalTitle||R.t("assetManager.modalTitle")||"",this.editor=R,this.config=j,this.am=x,x.setTarget(N.target),x.onClick(N.onClick),x.onDblClick(N.onDblClick),x.onSelect(N.onSelect),x.__behaviour({select:G,types:D,options:N}),j.custom)this.rendered=this.rendered||(0,lt.ut)("div"),this.rendered.className="".concat(j.stylePrefix,"custom-wrp"),x.__behaviour({container:this.rendered}),x.__trgCustom();else{if(!this.rendered||D){var pt=x.getAll().filter(function(Nt){return Nt});D&&D.length&&(pt=pt.filter(function(Nt){return D.indexOf(Nt.get("type"))!==-1})),x.render(pt),this.rendered=x.getContainer()}if(H){var xt=this.rendered.querySelector("input#".concat(j.stylePrefix,"uploadFile"));xt&&xt.setAttribute("accept",H)}}return this.open(this.rendered),this},stop:function(R){this.editor=R,this.close(this.rendered)}}},117:(w,Y,st)=>{st.r(Y),st.d(Y,{default:()=>F});var rt=st(50),lt=st(491);const F={open:function(){var R=this,M=R.container,N=R.editor,x=R.bm,j=R.config,L=j.custom,D=j.appendTo;if((0,rt.isFunction)(L.open))return L.open(x.__customData());if(this.firstRender&&!D){var H="views-container",G=N.Panels,pt=G.getPanel(H)||G.addPanel({id:H});pt.set("appendContent",M).trigger("change:appendContent"),L||M.appendChild(x.render())}M&&(M.style.display="block")},close:function(){var R=this,M=R.container,N=R.config,x=N.custom;if((0,rt.isFunction)(x.close))return x.close(this.bm.__customData());M&&(M.style.display="none")},run:function(R){var M=R.Blocks;this.config=M.getConfig(),this.firstRender=!this.container,this.container=this.container||(0,lt.ut)("div"),this.editor=R,this.bm=M;var N=this.container;M.__behaviour({container:N}),this.config.custom&&M.__trgCustom(),this.open()},stop:function(){this.close()}}},614:(w,Y,st)=>{st.r(Y),st.d(Y,{default:()=>rt});const rt={run:function(lt){var F=lt.LayerManager,R=lt.Panels,M=F.getConfig();if(!M.appendTo){if(!this.layers){var N="views-container",x=document.createElement("div"),j=R.getPanel(N)||R.addPanel({id:N});M.custom?F.__trgCustom({container:x}):x.appendChild(F.render()),j.set("appendContent",x).trigger("change:appendContent"),this.layers=x}this.layers.style.display="block"}},stop:function(){var lt=this.layers;lt&&(lt.style.display="none")}}},801:(w,Y,st)=>{st.r(Y),st.d(Y,{default:()=>lt});var rt=st(895);const lt={run:function(F,R){if(this.sender=R,!this.$cnt){var M=F.getConfig(),N=F.Panels,x=F.DeviceManager,j=F.SelectorManager,L=F.StyleManager,D="change:appendContent",H=(0,rt.default)("
"),G=(0,rt.default)("
"),pt=(0,rt.default)("
"),xt=(0,rt.default)("
");if(this.$cnt=H,this.$cntInner=G,G.append(pt),G.append(xt),H.append(G),x&&M.showDevices){var Nt=N.addPanel({id:"devices-c"}),jt=x.render();Nt.set("appendContent",jt).trigger(D)}var Tt=j.getConfig();Tt.custom?j.__trgCustom({container:pt.get(0)}):Tt.appendTo||pt.append(j.render([])),this.sm=L;var yt=L.getConfig(),Kt=yt.stylePrefix;this.$header=(0,rt.default)('
').concat(F.t("styleManager.empty"),"
")),H.append(this.$header),yt.custom?L.__trgCustom({container:xt.get(0)}):yt.appendTo||xt.append(L.render());var te="views-container",ue=N.getPanel(te)||N.addPanel({id:te});ue.set("appendContent",H).trigger(D);var Zt=F.getModel();this.listenTo(Zt,L.events.target,this.toggleSm)}this.toggleSm()},toggleSm:function(){var F=this,R=F.sender,M=F.sm,N=F.$cntInner,x=F.$header;R&&R.get&&!R.get("active")||!M||(M.getSelected()?(N==null||N.show(),x==null||x.hide()):(N==null||N.hide(),x==null||x.show()))},stop:function(){var F,R;(F=this.$cntInner)===null||F===void 0||F.hide(),(R=this.$header)===null||R===void 0||R.hide()}}},395:(w,Y,st)=>{st.r(Y),st.d(Y,{default:()=>lt});var rt=st(895);const lt={run:function(F,R){this.sender=R;var M=F.getModel(),N=F.Config,x=N.stylePrefix,j=F.TraitManager,L=j.getConfig(),D;if(!L.appendTo){if(!this.$cn){this.$cn=(0,rt.default)("
"),this.$cn2=(0,rt.default)("
"),this.$cn.append(this.$cn2),this.$header=(0,rt.default)("
").append('
').concat(M.t("traitManager.empty"),"
")),this.$cn.append(this.$header),L.custom?j.__trgCustom({container:this.$cn2.get(0)}):(this.$cn2.append('
').concat(M.t("traitManager.label"),"
")),this.$cn2.append(j.render()));var H=F.Panels;H.getPanel("views-container")?D=H.getPanel("views-container"):D=H.addPanel({id:"views-container"}),D==null||D.set("appendContent",this.$cn.get(0)).trigger("change:appendContent"),this.target=F.getModel(),this.listenTo(this.target,"component:toggled",this.toggleTm)}this.toggleTm()}},toggleTm:function(){var F=this.sender;F&&F.get&&!F.get("active")||(this.target.getSelectedAll().length===1?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show()))},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},98:(w,Y,st)=>{st.r(Y),st.d(Y,{default:()=>lt});var rt=st(50);const lt={run:function(R,M,N){N===void 0&&(N={});var x=R.getModel(),j=x.get("clipboard"),L=R.getSelected();j!=null&&j.length&&L&&(R.getSelectedAll().forEach(function(D){var H,G,pt,xt=((G=(H=D.delegate)===null||H===void 0?void 0:H.copy)===null||G===void 0?void 0:G.call(H,D))||D,Nt=xt.collection,jt;if(Nt){var Tt=xt.index()+1,yt={at:Tt,action:N.action||"paste-component"};(0,rt.contains)(j,xt)&&xt.get("copyable")?jt=Nt.add(xt.clone(),yt):jt=F(R,j,xt.parent(),yt)}else{var Kt=(pt=x.Pages.getSelected())===null||pt===void 0?void 0:pt.getMainComponent(),yt={at:(Kt==null?void 0:Kt.components().length)||0,action:N.action||"paste-component"};jt=F(R,j,Kt,yt)}jt=(0,rt.isArray)(jt)?jt:[jt],jt.forEach(function(te){return R.trigger("component:paste",te)})}),L.emitUpdate())}};function F(R,M,N,x){var j=M.filter(function(D){return D.get("copyable")}),L=j.filter(function(D){return R.Components.canMove(N,D).result});return N.components().add(L.map(function(D){return D.clone()}),x)}},129:(w,Y,st)=>{st.r(Y),st.d(Y,{default:()=>R});var rt=st(50),lt=function(M,N,x){if(x||arguments.length===2)for(var j=0,L=N.length,D;j{st.r(Y),st.d(Y,{default:()=>lt});var rt=function(){return rt=Object.assign||function(F){for(var R,M=1,N=arguments.length;M{st.r(Y),st.d(Y,{default:()=>dt});var rt=st(50),lt=st(346),F=function(){var ot=function(X,z){return ot=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(et,A){et.__proto__=A}||function(et,A){for(var tt in A)Object.prototype.hasOwnProperty.call(A,tt)&&(et[tt]=A[tt])},ot(X,z)};return function(X,z){if(typeof z!="function"&&z!==null)throw new TypeError("Class extends value "+String(z)+" is not a constructor or null");ot(X,z);function et(){this.constructor=X}X.prototype=z===null?Object.create(z):(et.prototype=z.prototype,new et)}}(),R=function(ot){F(X,ot);function X(){return ot!==null&&ot.apply(this,arguments)||this}return X.prototype.defaults=function(){return{command:"",attributes:{}}},X}(lt.Hn);const M=R;var N=function(){var ot=function(X,z){return ot=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(et,A){et.__proto__=A}||function(et,A){for(var tt in A)Object.prototype.hasOwnProperty.call(A,tt)&&(et[tt]=A[tt])},ot(X,z)};return function(X,z){if(typeof z!="function"&&z!==null)throw new TypeError("Class extends value "+String(z)+" is not a constructor or null");ot(X,z);function et(){this.constructor=X}X.prototype=z===null?Object.create(z):(et.prototype=z.prototype,new et)}}(),x=function(ot){N(X,ot);function X(){return ot!==null&&ot.apply(this,arguments)||this}return X}(lt.FE);const j=x;x.prototype.model=M;var L=st(330),D=function(){var ot=function(X,z){return ot=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(et,A){et.__proto__=A}||function(et,A){for(var tt in A)Object.prototype.hasOwnProperty.call(A,tt)&&(et[tt]=A[tt])},ot(X,z)};return function(X,z){if(typeof z!="function"&&z!==null)throw new TypeError("Class extends value "+String(z)+" is not a constructor or null");ot(X,z);function et(){this.constructor=X}X.prototype=z===null?Object.create(z):(et.prototype=z.prototype,new et)}}(),H=function(){return H=Object.assign||function(ot){for(var X,z=1,et=arguments.length;z').concat(Pt,"
"):"",` +
').concat(A.getName(),"
");tt.innerHTML=Wt?Wt(A):oe}var Pe="px";E.display="block";var _e=et.getTargetToElementFixed(ot,tt,{pos:X}),ve=_e.top,Ct=z.leftOff<0?-z.leftOff:0;E.top=ve+Pe,E.left=Ct+Pe},showHighlighter:function(ot){this.canvas.getHighlighter(ot).style.opacity=""},initResize:function(ot){var X=this,z=X.em,et=X.canvas,A=z.Editor,tt=!(0,rt.isElement)(ot)&&(0,Tt.o5)(ot)?ot:z.getSelected(),E=tt==null?void 0:tt.get("resizable"),At=Kt.q.Resize,Pt=et.hasCustomSpot(At);if(et.removeSpots({type:At}),tt&&E){et.addSpot({type:At,component:tt});var ct=(0,rt.isElement)(ot)?ot:tt.getEl(),Dt=(0,yt.isObject)(E)?E:{},Wt=Dt.onStart,oe=Wt===void 0?function(){}:Wt,Pe=Dt.onMove,_e=Pe===void 0?function(){}:Pe,ve=Dt.onEnd,Ct=ve===void 0?function(){}:ve,Rt=Dt.updateTarget,zt=Rt===void 0?function(){}:Rt,ie=ue(Dt,["onStart","onMove","onEnd","updateTarget"]);if(Pt||!ct||this.activeResizer)return;var ne,qt=z.config,me=qt.stylePrefix||"",Ne="".concat(me,"resizing"),cr=this,_r={component:tt,el:ct},ar=function(T,B,nt){var ht=nt.docs;ht&&ht.forEach(function(Lt){var Z=Lt.body,Et=Z.className||"";Z.className=(T=="add"?"".concat(Et," ").concat(Ne):Et.replace(Ne,"")).trim()})},he=te({onStart:function(T,B){oe(T,B);var nt=B.el,ht=B.config,Lt=B.resizer,Z=ht.keyHeight,Et=ht.keyWidth,mt=ht.currentUnit,xe=ht.keepAutoHeight,He=ht.keepAutoWidth;ar("add",T,B),ne=z.Styles.getModelToStyle(tt),et.toggleFramesEvents(!1);var De=getComputedStyle(nt),ee=ne.getStyle(),Jt=ee[Et];ht.autoWidth=He&&Jt==="auto",isNaN(parseFloat(Jt))&&(Jt=De[Et]);var Vt=ee[Z];ht.autoHeight=xe&&Vt==="auto",isNaN(parseFloat(Vt))&&(Vt=De[Z]),Lt.startDim.w=parseFloat(Jt),Lt.startDim.h=parseFloat(Vt),Zt=!1,mt&&(ht.unitHeight=(0,yt.getUnitFromValue)(Vt),ht.unitWidth=(0,yt.getUnitFromValue)(Jt)),cr.activeResizer=!0,A.trigger("component:resize",te(te({},_r),{type:"start"}))},onMove:function(T){_e(T),A.trigger("component:resize",te(te({},_r),{type:"move"}))},onEnd:function(T,B){Ct(T,B),ar("remove",T,B),A.trigger("component:resize",te(te({},_r),{type:"end"})),et.toggleFramesEvents(!0),Zt=!0,cr.activeResizer=!1},updateTarget:function(T,B,nt){if(zt(T,B,nt),!!ne){var ht=nt.store,Lt=nt.selectedHandler,Z=nt.config,Et=Z.keyHeight,mt=Z.keyWidth,xe=Z.autoHeight,He=Z.autoWidth,De=Z.unitWidth,ee=Z.unitHeight,Jt=["tc","bc"].indexOf(Lt)>=0,Vt=["cl","cr"].indexOf(Lt)>=0,Te={};if(!Jt){var Be=et.getBody().offsetWidth,Ee=B.w{st.r(Y),st.d(Y,{default:()=>lt});var rt=st(895);const lt={startSelectPosition:function(F,R,M){var N=this;M===void 0&&(M={}),this.isPointed=!1;var x=this.em.Utils,j=F.ownerDocument.body;x&&!this.sorter&&(this.sorter=new x.Sorter({container:j,placer:this.canvas.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:this.ppfx,direction:"a",document:R,wmargin:1,nested:1,em:this.em,canvasRelative:1,scale:function(){return N.em.getZoomDecimal()}})),M.onStart&&(this.sorter.onStart=M.onStart),F&&this.sorter.startSort(F,{container:j})},getOffsetDim:function(){var F=this.offset(this.canvas.getFrameEl()),R=this.offset(this.canvas.getElement()),M=F.top-R.top,N=F.left-R.left;return{top:M,left:N}},stopSelectPosition:function(){this.posTargetCollection=null,this.posIndex=this.posMethod=="after"&&this.cDim.length!==0?this.posIndex+1:this.posIndex,this.sorter&&(this.sorter.moved=0,this.sorter.endMove()),this.cDim&&(this.posIsLastEl=this.cDim.length!==0&&this.posMethod=="after"&&this.posIndex==this.cDim.length,this.posTargetEl=this.cDim.length===0?(0,rt.default)(this.outsideElem):!this.posIsLastEl&&this.cDim[this.posIndex]?(0,rt.default)(this.cDim[this.posIndex][5]).parent():(0,rt.default)(this.outsideElem),this.posTargetModel=this.posTargetEl.data("model"),this.posTargetCollection=this.posTargetEl.data("model-comp"))},enable:function(){this.startSelectPosition()},nearFloat:function(F,R,M){var N=F||0,x=R||"before",j=M.length,L=j!==0&&x=="after"&&N==j;return j!==0&&(!L&&!M[N][4]||M[N-1]&&!M[N-1][4]||L&&!M[N-1][4])?1:0},run:function(){this.enable()},stop:function(){this.stopSelectPosition(),this.$wrapper.css("cursor",""),this.$wrapper.unbind()}}},804:(w,Y,st)=>{st.r(Y),st.d(Y,{default:()=>N});var rt=st(50),lt=st(675),F=st(895),R=st(491),M=function(){return M=Object.assign||function(x){for(var j,L=1,D=arguments.length;L')).get(0),Dt=(0,F.default)('
')).get(0),Wt=yt+At+"-el",oe=yt+Pt+"-el",Pe="".concat(Wt," ").concat(yt+At),_e="".concat(oe," ").concat(yt+Pt);Zt=(0,F.default)('
')).get(0),dt=(0,F.default)('
')).get(0),ot=(0,F.default)('
')).get(0),X=(0,F.default)('
')).get(0),z=(0,F.default)('
')).get(0),et=(0,F.default)('
')).get(0),A=(0,F.default)('
')).get(0),tt=(0,F.default)('
')).get(0),this["marginT"+G]=Zt,this["marginB"+G]=dt,this["marginL"+G]=ot,this["marginR"+G]=X,this["padT"+G]=z,this["padB"+G]=et,this["padL"+G]=A,this["padR"+G]=tt,ct.appendChild(Zt),ct.appendChild(dt),ct.appendChild(ot),ct.appendChild(X),Dt.appendChild(z),Dt.appendChild(et),Dt.appendChild(A),Dt.appendChild(tt),ue.appendChild(ct),ue.appendChild(Dt),this[Kt]="1"}var ve="px",Ct=parseFloat(Tt.marginLeft.replace(ve,""))*xt,Rt=parseFloat(Tt.marginRight.replace(ve,""))*xt,zt=parseFloat(Tt.marginTop.replace(ve,""))*xt,ie=parseFloat(Tt.marginBottom.replace(ve,""))*xt,ne=Zt.style,qt=dt.style,me=ot.style,Ne=X.style,cr=z.style,_r=et.style,ar=A.style,he=tt.style,T=parseFloat(jt.left),B=parseFloat(Tt.width)*xt+ve;ne.height=zt+ve,ne.width=B,ne.top=jt.top-zt+ve,ne.left=T+ve,qt.height=ie+ve,qt.width=B,qt.top=jt.top+jt.height+ve,qt.left=T+ve;var nt=jt.height+zt+ie+ve,ht=jt.top-zt+ve;me.height=nt,me.width=Ct+ve,me.top=ht,me.left=T-Ct+ve,Ne.height=nt,Ne.width=Rt+ve,Ne.top=ht,Ne.left=T+jt.width+ve;var Lt=parseFloat(Tt.paddingTop)*xt;cr.height=Lt+ve;var Z=parseFloat(Tt.paddingBottom)*xt;_r.height=Z+ve;var Et=jt.height-Z-Lt+ve,mt=jt.top+Lt+ve;ar.height=Et,ar.width=parseFloat(Tt.paddingLeft)*xt+ve,ar.top=mt;var xe=parseFloat(Tt.paddingRight)*xt;he.height=Et,he.width=xe+ve,he.top=mt}},stop:function(x,j,L){L===void 0&&(L={});var D=L||{},H=D.state||"",G=this.getOffsetMethod(H),pt=L.view,xt=this.canvas,Nt=xt[G](pt);Nt.style.opacity=0}}},434:(w,Y,st)=>{st.r(Y),st.d(Y,{default:()=>F});var rt=st(50),lt=st(163);const F={init:function(){(0,rt.bindAll)(this,"_onFramesChange")},run:function(R){this.toggleVis(R,!0)},stop:function(R){this.toggleVis(R,!1)},toggleVis:function(R,M){if(M===void 0&&(M=!0),!R.Commands.isActive("preview")){var N=R.Canvas,x=M?"on":"off",j=N.getModel();j[x]("change:frames",this._onFramesChange),this.handleFrames(N.getFrames(),M)}},handleFrames:function(R,M){var N=this;R.forEach(function(x){var j;!((j=x.view)===null||j===void 0)&&j.loaded&&N._upFrame(x,M),x.__ol||(x.on("loaded",function(){return N._upFrame(x)}),x.__ol=!0)})},_onFramesChange:function(R,M){this.handleFrames(M)},_upFrame:function(R,M){var N,x=this,j=x.ppfx,L=x.em,D=x.id,H=(0,lt.isDef)(M)?M:L.Commands.isActive(D),G=H?"add":"remove",pt="".concat(j,"dashed");(N=R.view)===null||N===void 0||N.getBody().classList[G](pt)}}},346:(w,Y,st)=>{st.d(Y,{FE:()=>N,G7:()=>x,Hn:()=>M,pH:()=>L,vA:()=>j});var rt=st(316),lt=st.n(rt),F=function(){var D=function(H,G){return D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(pt,xt){pt.__proto__=xt}||function(pt,xt){for(var Nt in xt)Object.prototype.hasOwnProperty.call(xt,Nt)&&(pt[Nt]=xt[Nt])},D(H,G)};return function(H,G){if(typeof G!="function"&&G!==null)throw new TypeError("Class extends value "+String(G)+" is not a constructor or null");D(H,G);function pt(){this.constructor=H}H.prototype=G===null?Object.create(G):(pt.prototype=G.prototype,new pt)}}(),R=function(){return R=Object.assign||function(D){for(var H,G=1,pt=arguments.length;G{st.d(Y,{Z:()=>M});var rt=st(50),lt=st(346),F=function(){var N=function(x,j){return N=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,D){L.__proto__=D}||function(L,D){for(var H in D)Object.prototype.hasOwnProperty.call(D,H)&&(L[H]=D[H])},N(x,j)};return function(x,j){if(typeof j!="function"&&j!==null)throw new TypeError("Class extends value "+String(j)+" is not a constructor or null");N(x,j);function L(){this.constructor=x}x.prototype=j===null?Object.create(j):(L.prototype=j.prototype,new L)}}(),R=function(N){F(x,N);function x(j,L,D){j===void 0&&(j={}),D===void 0&&(D=!1);var H=N.call(this,j)||this;return H.itemsView="",H.itemType="type",H.reuseView=!1,H.config=L||j.config||{},D&&H.listenTo(H.collection,"add",H.addTo),H.items=[],H}return x.prototype.addTo=function(j){this.add(j)},x.prototype.itemViewNotFound=function(j){var L=this,D=L.config,H=L.ns,G=D.em,pt="".concat(H?"[".concat(H,"]: "):"","'").concat(j,"' type not found");G&&G.logWarning(pt)},x.prototype.add=function(j,L){var D=this,H=D.config,G=D.reuseView,pt=D.items,xt=this.itemsView||{},Nt=["button","checkbox","color","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"],jt=L||null,Tt=this.itemView,yt=j.get(this.itemType),Kt;xt[yt]?Tt=xt[yt]:yt&&!xt[yt]&&!(0,rt.includes)(Nt,yt)&&this.itemViewNotFound(yt),j.view&&G?Kt=j.view:Kt=new Tt({model:j,config:H},H),pt&&pt.push(Kt);var te=Kt.render().el;jt?jt.appendChild(te):this.$el.append(te)},x.prototype.render=function(){var j=document.createDocumentFragment();return this.clearItems(),this.$el.empty(),this.collection.length&&this.collection.each(function(L){this.add(L,j)},this),this.$el.append(j),this.onRender(),this},x.prototype.onRender=function(){},x.prototype.onRemoveBefore=function(j,L){},x.prototype.onRemove=function(j,L){},x.prototype.remove=function(j){j===void 0&&(j={});var L=this.items;return this.onRemoveBefore(L,j),this.clearItems(),N.prototype.remove.call(this),this.onRemove(L,j),this},x.prototype.clearItems=function(){this.items},x}(lt.G7);const M=R;R.prototype.itemView=""},668:(w,Y,st)=>{st.d(Y,{Z:()=>x});var rt=st(50),lt=st(491),F=function(){return F=Object.assign||function(j){for(var L,D=1,H=arguments.length;D=D&&L<=D+xt||L<=D&&L>=D-xt},j.prototype.setGuideLock=function(L,D){var H=(0,rt.isUndefined)(L.x)?"Y":"X",G="trg".concat(H);return D!==null?(L.active=!0,L.lock=D,this[G]=L):(delete L.active,delete L.lock,delete this[G]),L},j.prototype.stop=function(L,D){D===void 0&&(D={});var H=this.delta,G=!!D.cancel,pt=G?0:H.x,xt=G?0:H.y;this.toggleDrag(),this.lockedAxis=null,this.move(pt,xt,!0);var Nt=this.opts.onEnd;(0,rt.isFunction)(Nt)&&Nt(L,this,{cancelled:G})},j.prototype.keyHandle=function(L){(0,lt.kl)(L)&&this.stop(L,{cancel:!0})},j.prototype.move=function(L,D,H){var G=this,pt=G.el,xt=G.opts,Nt=this.startPosition;if(Nt){var jt=xt.setPosition,Tt=Nt.x+L,yt=Nt.y+D;this.position={x:Tt,y:yt,end:H},(0,rt.isFunction)(jt)&&jt(this.position),pt&&(pt.style.left="".concat(Tt,"px"),pt.style.top="".concat(yt,"px"))}},j.prototype.getContainerEl=function(){var L=this.opts.container;return L?[L]:this.getDocumentEl()},j.prototype.getWindowEl=function(){var L=this.getContainerEl();return L.map(function(D){var H=D.ownerDocument||D;return H.defaultView||H.parentWindow})},j.prototype.getDocumentEl=function(L){var D=this.opts.doc;if(L=L||this.el,!this.docs.length){var H=[document];L&&H.push(L.ownerDocument),D&&H.push(D),this.docs=H}return this.docs},j.prototype.getPointerPos=function(L){var D=this.opts.getPointerPosition,H=(0,lt.VB)(L);return D?D(L):{x:H.clientX,y:H.clientY}},j.prototype.getStartPosition=function(){var L=this,D=L.el,H=L.opts,G=H.getPosition,pt=R();return(0,rt.isFunction)(G)?pt=G():D&&(pt={x:parseFloat(D.style.left),y:parseFloat(D.style.top)}),pt},j.prototype.getScrollInfo=function(){var L=this.opts.doc,D=L&&L.body;return{y:D?D.scrollTop:0,x:D?D.scrollLeft:0}},j.prototype.detectAxisLock=function(L,D){var H=L,G=D,pt=Math.abs(H),xt=Math.abs(G);if(G>=pt||G<=-pt)return"x";if(H>xt||H<-xt)return"y"},j}();const x=N},895:(w,Y,st)=>{st.r(Y),st.d(Y,{default:()=>Kn});var rt=typeof document<"u"?document:null,lt=typeof window<"u"?window:null,F=Array.prototype,R=F.filter,M=F.indexOf,N=F.map,x=F.push,j=F.reverse,L=F.slice,D=F.splice,H=/^#[\w-]*$/,G=/^\.[\w-]*$/,pt=/<.+>/,xt=/^\w+$/;function Nt(U,ft){return ft===void 0&&(ft=rt),G.test(U)?ft.getElementsByClassName(U.slice(1)):xt.test(U)?ft.getElementsByTagName(U):ft.querySelectorAll(U)}function jt(U,ft){if(ft===void 0&&(ft=rt),!!U){if(U.__cash)return U;var wt=U;if(et(U)){if(ft.__cash&&(ft=ft[0]),wt=H.test(U)?ft.getElementById(U.slice(1)):pt.test(U)?nr(U):Nt(U,ft),!wt)return}else if(z(U))return this.ready(U);(wt.nodeType||wt===lt)&&(wt=[wt]),this.length=wt.length;for(var Ht=0,de=this.length;Ht=0}):wt.value=de})},yt.clone=function(){return this.map(function(U,ft){return ft.cloneNode(!0)})},yt.detach=function(){return this.each(function(U,ft){ft.parentNode&&ft.parentNode.removeChild(ft)})};var Ke=/^\s*<(\w+)[^>]*>/,ge=/^\s*<(\w+)\s*\/?>(?:<\/\1>)?\s*$/,fr;function Me(){if(!fr){var U=rt.createElement("table"),ft=rt.createElement("tr");fr={"*":rt.createElement("div"),tr:rt.createElement("tbody"),td:ft,th:ft,thead:U,tbody:U,tfoot:U}}}function nr(U){if(Me(),!et(U))return[];if(ge.test(U))return[rt.createElement(RegExp.$1)];var ft=Ke.test(U)&&RegExp.$1,wt=fr[ft]||fr["*"];return wt.innerHTML=U,Tt(wt.childNodes).detach().get()}Tt.parseHTML=nr,yt.empty=function(){var U=this[0];if(U)for(;U.firstChild;)U.removeChild(U.firstChild);return this};function Qe(U,ft,wt){wt?U.insertBefore(ft,U.childNodes[0]):U.appendChild(ft)}function Xt(U,ft,wt){if(ft!==void 0){var Ht=et(ft);!Ht&&ft.length?Zt(ft,function(de){return Xt(U,de,wt)}):Zt(U,Ht?function(de){de.insertAdjacentHTML(wt?"afterbegin":"beforeend",ft)}:function(de,je){return Qe(de,je?ft.cloneNode(!0):ft,wt)})}}yt.append=function(){var U=this;return Zt(arguments,function(ft){Xt(U,ft)}),this},yt.appendTo=function(U){return Xt(Tt(U),this),this},yt.html=function(U){if(U===void 0)return this[0]&&this[0].innerHTML;var ft=U.nodeType?U[0].outerHTML:U;return this.each(function(wt,Ht){Ht.innerHTML=ft})},yt.insertAfter=function(U){var ft=this;return Tt(U).each(function(wt,Ht){var de=Ht.parentNode;ft.each(function(je,tr){de.insertBefore(wt?tr.cloneNode(!0):tr,Ht.nextSibling)})}),this},yt.after=function(){var U=this;return Zt(j.apply(arguments),function(ft){j.apply(Tt(ft).slice()).insertAfter(U)}),this},yt.insertBefore=function(U){var ft=this;return Tt(U).each(function(wt,Ht){var de=Ht.parentNode;ft.each(function(je,tr){de.insertBefore(wt?tr.cloneNode(!0):tr,Ht)})}),this},yt.before=function(){var U=this;return Zt(arguments,function(ft){Tt(ft).insertBefore(U)}),this},yt.prepend=function(){var U=this;return Zt(arguments,function(ft){Xt(U,ft,!0)}),this},yt.prependTo=function(U){return Xt(Tt(U),j.apply(this.slice()),!0),this},yt.remove=function(){return this.detach().off()},yt.replaceWith=function(U){var ft=this;return this.each(function(wt,Ht){var de=Ht.parentNode;if(de){var je=wt?Tt(U).clone():Tt(U);if(!je[0])return ft.remove(),!1;de.replaceChild(je[0],Ht),Tt(je[0]).after(je.slice(1))}})},yt.replaceAll=function(U){return Tt(U).replaceWith(this),this},yt.text=function(U){return U===void 0?this[0]?this[0].textContent:"":this.each(function(ft,wt){wt.textContent=U})};var Or=rt&&rt.documentElement;yt.offset=function(){var U=this[0];if(U){var ft=U.getBoundingClientRect();return{top:ft.top+lt.pageYOffset-Or.clientTop,left:ft.left+lt.pageXOffset-Or.clientLeft}}},yt.offsetParent=function(){return Tt(this[0]&&this[0].offsetParent)},yt.position=function(){var U=this[0];if(U)return{left:U.offsetLeft,top:U.offsetTop}},yt.children=function(U){var ft=[];return this.each(function(wt,Ht){x.apply(ft,Ht.children)}),ft=Tt(ct(ft)),U?ft.filter(function(wt,Ht){return X(Ht,U)}):ft},yt.contents=function(){var U=[];return this.each(function(ft,wt){x.apply(U,wt.tagName==="IFRAME"?[wt.contentDocument]:wt.childNodes)}),Tt(U.length&&ct(U))},yt.find=function(U){for(var ft=[],wt=0,Ht=this.length;wt{st.d(Y,{$Q:()=>pt,BM:()=>Kt,FW:()=>D,G1:()=>M,GX:()=>dt,L_:()=>x,Mx:()=>N,R3:()=>xt,S1:()=>Pt,SJ:()=>yt,Ut:()=>Zt,VB:()=>z,Vb:()=>E,cx:()=>j,dL:()=>G,kl:()=>et,o5:()=>ue,on:()=>At,pn:()=>H,r$:()=>A,rw:()=>jt,sE:()=>L,sN:()=>X,t3:()=>Tt,ut:()=>Nt});var rt=st(50),lt=function(ct,Dt,Wt){if(Wt||arguments.length===2)for(var oe=0,Pe=Dt.length,_e;oe=Pe?ct.appendChild(Dt):ct.insertBefore(Dt,oe[_e])},xt=function(ct,Dt){return pt(ct,Dt)},Nt=function(ct,Dt,Wt){Dt===void 0&&(Dt={});var oe=document.createElement(ct);return Dt&&(0,rt.each)(Dt,function(Pe,_e){return oe.setAttribute(_e,Pe)}),Wt&&((0,rt.isString)(Wt)?oe.innerHTML=Wt:oe.appendChild(Wt)),oe},jt=function(ct){return document.createTextNode(ct)},Tt=function(ct,Dt){var Wt,oe=ct.type;try{Wt=new window[Dt](oe,ct)}catch{Wt=document.createEvent(Dt),Wt.initEvent(oe,!0,!0)}return Wt._parentEvent=ct,oe.indexOf("key")===0&&(Wt.keyCodeVal=ct.keyCode,["keyCode","which"].forEach(function(Pe){Object.defineProperty(Wt,Pe,{get:function(){return this.keyCodeVal}})})),Wt},yt=function(ct,Dt){Dt===void 0&&(Dt=[]);var Wt=Array.isArray(Dt)?Dt:[Dt];Wt.forEach(function(oe){var Pe=oe[F]||"div",_e=oe[R]||{},ve=document.createElement(Pe);(0,rt.each)(_e,function(Ct,Rt){ve.setAttribute(Rt,Ct)}),ct.appendChild(ve)})},Kt=function(ct){return(ct==null?void 0:ct.nodeType)===Node.TEXT_NODE},te=function(ct){return(ct==null?void 0:ct.nodeType)===Node.COMMENT_NODE},ue=function(ct){return ct&&!Kt(ct)&&!te(ct)},Zt=function(ct){var Dt={top:0,left:0,width:0,height:0};if(!ct)return Dt;var Wt;if(Kt(ct)){var oe=document.createRange();oe.selectNode(ct),Wt=oe.getBoundingClientRect(),oe.detach()}return Wt||(ct.getBoundingClientRect?ct.getBoundingClientRect():Dt)},dt=function(ct){var Dt=(ct==null?void 0:ct.ownerDocument)||document,Wt=Dt.documentElement,oe=Dt.defaultView||window;return{x:(oe.pageXOffset||Wt.scrollLeft||0)-(Wt.clientLeft||0),y:(oe.pageYOffset||Wt.scrollTop||0)-(Wt.clientTop||0)}},ot=function(ct){return ct.which||ct.keyCode},X=function(ct){return String.fromCharCode(ot(ct))},z=function(ct){return ct.touches&&ct.touches[0]?ct.touches[0]:ct},et=function(ct){return ot(ct)===27},A=function(ct){return ot(ct)===13},tt=function(ct){return ct.ctrlKey},E=function(ct){return tt(ct)||ct.metaKey},At=function(ct,Dt,Wt,oe){var Pe=Dt.split(/\s+/),_e=(0,rt.isArray)(ct)?ct:[ct];Pe.forEach(function(ve){_e.forEach(function(Ct){return Ct==null?void 0:Ct.addEventListener(ve,Wt,oe)})})},Pt=function(ct,Dt,Wt,oe){var Pe=Dt.split(/\s+/),_e=(0,rt.isArray)(ct)?ct:[ct];Pe.forEach(function(ve){_e.forEach(function(Ct){return Ct==null?void 0:Ct.removeEventListener(ve,Wt,oe)})})}},163:(w,Y,st)=>{st.r(Y),st.d(Y,{appendStyles:()=>jt,buildBase64UrlFromSvg:()=>ve,camelCase:()=>te,capitalize:()=>At,createId:()=>_e,deepMerge:()=>et,escape:()=>X,escapeNodeContent:()=>z,find:()=>ot,getComponentModel:()=>oe,getComponentView:()=>Wt,getElement:()=>dt,getGlobal:()=>H,getModel:()=>A,getUiClass:()=>Nt,getUnitFromValue:()=>yt,getViewEl:()=>ct,hasDnd:()=>Zt,hasWin:()=>D,isBultInMethod:()=>N,isComponent:()=>Dt,isDef:()=>L,isEmptyObj:()=>E,isObject:()=>tt,isRule:()=>Pt,matches:()=>xt,normalizeFloat:()=>ue,normalizeKey:()=>x,setViewEl:()=>Pe,shallowDiff:()=>Tt,toLowerCase:()=>G,upFirst:()=>Kt,wait:()=>j});var rt=st(50),lt=st(491),F=function(){return F=Object.assign||function(Ct){for(var Rt,zt=1,ie=arguments.length;zt=0?qt!==me&&(zt[ne]=me):zt[ne]=null}for(var ne in Rt)Rt.hasOwnProperty(ne)&&(0,rt.isUndefined)(Ct[ne])&&(zt[ne]=Rt[ne]);return zt},yt=function(Ct){return Ct.replace(parseFloat(Ct),"")},Kt=function(Ct){return Ct[0].toUpperCase()+Ct.toLowerCase().slice(1)},te=function(Ct){return Ct.replace(/-./g,function(Rt){return Rt[1].toUpperCase()})},ue=function(Ct,Rt,zt){Rt===void 0&&(Rt=1),zt===void 0&&(zt=0);var ie=0;if(isNaN(Ct))return zt;if(Ct=parseFloat(Ct),Math.floor(Ct)!==Ct){var ne=Rt.toString().split(".")[1];ie=ne?ne.length:0}return ie?parseFloat(Ct.toFixed(ie)):Ct},Zt=function(Ct){return"draggable"in document.createElement("i")&&(Ct?Ct.config.nativeDnD:!0)},dt=function(Ct){if((0,rt.isElement)(Ct)||(0,lt.BM)(Ct))return Ct;if(Ct&&Ct.getEl)return Ct.getEl()},ot=function(Ct,Rt){var zt=null;return Ct.some(function(ie,ne){return Rt(ie,ne,Ct)?(zt=ie,1):0}),zt},X=function(Ct){return Ct===void 0&&(Ct=""),"".concat(Ct).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`")},z=function(Ct){return Ct===void 0&&(Ct=""),"".concat(Ct).replace(/&/g,"&").replace(//g,">")},et=function(){for(var Ct=[],Rt=0;Rt{var rt={"./CanvasClear":858,"./CanvasClear.ts":858,"./CanvasMove":884,"./CanvasMove.ts":884,"./CommandAbstract":790,"./CommandAbstract.ts":790,"./ComponentDelete":180,"./ComponentDelete.ts":180,"./ComponentDrag":544,"./ComponentDrag.ts":544,"./ComponentEnter":236,"./ComponentEnter.ts":236,"./ComponentExit":368,"./ComponentExit.ts":368,"./ComponentNext":243,"./ComponentNext.ts":243,"./ComponentPrev":400,"./ComponentPrev.ts":400,"./ComponentStyleClear":910,"./ComponentStyleClear.ts":910,"./CopyComponent":744,"./CopyComponent.ts":744,"./ExportTemplate":457,"./ExportTemplate.ts":457,"./Fullscreen":975,"./Fullscreen.ts":975,"./MoveComponent":191,"./MoveComponent.ts":191,"./OpenAssets":912,"./OpenAssets.ts":912,"./OpenBlocks":117,"./OpenBlocks.ts":117,"./OpenLayers":614,"./OpenLayers.ts":614,"./OpenStyleManager":801,"./OpenStyleManager.ts":801,"./OpenTraitManager":395,"./OpenTraitManager.ts":395,"./PasteComponent":98,"./PasteComponent.ts":98,"./Preview":129,"./Preview.ts":129,"./Resize":116,"./Resize.ts":116,"./SelectComponent":407,"./SelectComponent.ts":407,"./SelectPosition":189,"./SelectPosition.ts":189,"./ShowOffset":804,"./ShowOffset.ts":804,"./SwitchVisibility":434,"./SwitchVisibility.ts":434};function lt(R){var M=F(R);return st(M)}function F(R){if(!st.o(rt,R)){var M=new Error("Cannot find module '"+R+"'");throw M.code="MODULE_NOT_FOUND",M}return rt[R]}lt.keys=function(){return Object.keys(rt)},lt.resolve=F,w.exports=lt,lt.id=828},50:(w,Y,st)=>{st.r(Y),st.d(Y,{VERSION:()=>lt,after:()=>Bs,all:()=>In,allKeys:()=>fr,any:()=>uo,assign:()=>Cn,before:()=>ta,bind:()=>yi,bindAll:()=>Hs,chain:()=>En,chunk:()=>ki,clone:()=>xn,collect:()=>yn,compact:()=>ia,compose:()=>ao,constant:()=>he,contains:()=>Ar,countBy:()=>Ra,create:()=>Rr,debounce:()=>_i,default:()=>Wa,defaults:()=>xo,defer:()=>Da,delay:()=>mn,detect:()=>so,difference:()=>Eo,drop:()=>Vn,each:()=>jn,escape:()=>Yt,every:()=>In,extend:()=>Qr,extendOwn:()=>Cn,filter:()=>Zn,find:()=>so,findIndex:()=>bi,findKey:()=>go,findLastIndex:()=>Ci,findWhere:()=>Uo,first:()=>Go,flatten:()=>Ha,foldl:()=>lo,foldr:()=>ra,forEach:()=>jn,functions:()=>Tr,get:()=>Nr,groupBy:()=>Us,has:()=>ho,head:()=>Go,identity:()=>Sn,include:()=>Ar,includes:()=>Ar,indexBy:()=>qr,indexOf:()=>Bo,initial:()=>Fa,inject:()=>lo,intersection:()=>aa,invert:()=>Jr,invoke:()=>Ge,isArguments:()=>cr,isArray:()=>qt,isArrayBuffer:()=>Wt,isBoolean:()=>z,isDataView:()=>ne,isDate:()=>At,isElement:()=>et,isEmpty:()=>ee,isEqual:()=>ge,isError:()=>ct,isFinite:()=>_r,isFunction:()=>_e,isMap:()=>wt,isMatch:()=>Jt,isNaN:()=>ar,isNull:()=>ot,isNumber:()=>E,isObject:()=>dt,isRegExp:()=>Pt,isSet:()=>de,isString:()=>tt,isSymbol:()=>Dt,isTypedArray:()=>Et,isUndefined:()=>X,isWeakMap:()=>Ht,isWeakSet:()=>je,iteratee:()=>Tn,keys:()=>De,last:()=>yr,lastIndexOf:()=>Si,map:()=>yn,mapObject:()=>vn,matcher:()=>On,matches:()=>On,max:()=>na,memoize:()=>Ho,methods:()=>Tr,min:()=>Wo,mixin:()=>Jn,negate:()=>wi,noop:()=>qe,now:()=>O,object:()=>Ai,omit:()=>oa,once:()=>ea,pairs:()=>Zr,partial:()=>Dn,partition:()=>Ei,pick:()=>mo,pluck:()=>zo,property:()=>So,propertyOf:()=>$n,random:()=>io,range:()=>Ua,reduce:()=>lo,reduceRight:()=>ra,reject:()=>Ia,rest:()=>Vn,restArguments:()=>Zt,result:()=>La,sample:()=>cn,select:()=>Zn,shuffle:()=>Oi,size:()=>Na,some:()=>uo,sortBy:()=>Ti,sortedIndex:()=>To,tail:()=>Vn,take:()=>Go,tap:()=>Gn,template:()=>gi,templateSettings:()=>or,throttle:()=>$r,times:()=>vo,toArray:()=>en,toPath:()=>Ro,transpose:()=>yo,unescape:()=>er,union:()=>Ba,uniq:()=>co,unique:()=>co,uniqueId:()=>Qi,unzip:()=>yo,values:()=>tr,where:()=>Dr,without:()=>zs,wrap:()=>Oo,zip:()=>Ws});var rt={};st.r(rt),st.d(rt,{VERSION:()=>lt,after:()=>Bs,all:()=>In,allKeys:()=>fr,any:()=>uo,assign:()=>Cn,before:()=>ta,bind:()=>yi,bindAll:()=>Hs,chain:()=>En,chunk:()=>ki,clone:()=>xn,collect:()=>yn,compact:()=>ia,compose:()=>ao,constant:()=>he,contains:()=>Ar,countBy:()=>Ra,create:()=>Rr,debounce:()=>_i,default:()=>Rn,defaults:()=>xo,defer:()=>Da,delay:()=>mn,detect:()=>so,difference:()=>Eo,drop:()=>Vn,each:()=>jn,escape:()=>Yt,every:()=>In,extend:()=>Qr,extendOwn:()=>Cn,filter:()=>Zn,find:()=>so,findIndex:()=>bi,findKey:()=>go,findLastIndex:()=>Ci,findWhere:()=>Uo,first:()=>Go,flatten:()=>Ha,foldl:()=>lo,foldr:()=>ra,forEach:()=>jn,functions:()=>Tr,get:()=>Nr,groupBy:()=>Us,has:()=>ho,head:()=>Go,identity:()=>Sn,include:()=>Ar,includes:()=>Ar,indexBy:()=>qr,indexOf:()=>Bo,initial:()=>Fa,inject:()=>lo,intersection:()=>aa,invert:()=>Jr,invoke:()=>Ge,isArguments:()=>cr,isArray:()=>qt,isArrayBuffer:()=>Wt,isBoolean:()=>z,isDataView:()=>ne,isDate:()=>At,isElement:()=>et,isEmpty:()=>ee,isEqual:()=>ge,isError:()=>ct,isFinite:()=>_r,isFunction:()=>_e,isMap:()=>wt,isMatch:()=>Jt,isNaN:()=>ar,isNull:()=>ot,isNumber:()=>E,isObject:()=>dt,isRegExp:()=>Pt,isSet:()=>de,isString:()=>tt,isSymbol:()=>Dt,isTypedArray:()=>Et,isUndefined:()=>X,isWeakMap:()=>Ht,isWeakSet:()=>je,iteratee:()=>Tn,keys:()=>De,last:()=>yr,lastIndexOf:()=>Si,map:()=>yn,mapObject:()=>vn,matcher:()=>On,matches:()=>On,max:()=>na,memoize:()=>Ho,methods:()=>Tr,min:()=>Wo,mixin:()=>Jn,negate:()=>wi,noop:()=>qe,now:()=>O,object:()=>Ai,omit:()=>oa,once:()=>ea,pairs:()=>Zr,partial:()=>Dn,partition:()=>Ei,pick:()=>mo,pluck:()=>zo,property:()=>So,propertyOf:()=>$n,random:()=>io,range:()=>Ua,reduce:()=>lo,reduceRight:()=>ra,reject:()=>Ia,rest:()=>Vn,restArguments:()=>Zt,result:()=>La,sample:()=>cn,select:()=>Zn,shuffle:()=>Oi,size:()=>Na,some:()=>uo,sortBy:()=>Ti,sortedIndex:()=>To,tail:()=>Vn,take:()=>Go,tap:()=>Gn,template:()=>gi,templateSettings:()=>or,throttle:()=>$r,times:()=>vo,toArray:()=>en,toPath:()=>Ro,transpose:()=>yo,unescape:()=>er,union:()=>Ba,uniq:()=>co,unique:()=>co,uniqueId:()=>Qi,unzip:()=>yo,values:()=>tr,where:()=>Dr,without:()=>zs,wrap:()=>Oo,zip:()=>Ws});var lt="1.13.6",F=typeof self=="object"&&self.self===self&&self||typeof global=="object"&&global.global===global&&global||Function("return this")()||{},R=Array.prototype,M=Object.prototype,N=typeof Symbol<"u"?Symbol.prototype:null,x=R.push,j=R.slice,L=M.toString,D=M.hasOwnProperty,H=typeof ArrayBuffer<"u",G=typeof DataView<"u",pt=Array.isArray,xt=Object.keys,Nt=Object.create,jt=H&&ArrayBuffer.isView,Tt=isNaN,yt=isFinite,Kt=!{toString:null}.propertyIsEnumerable("toString"),te=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ue=Math.pow(2,53)-1;function Zt(S,I){return I=I==null?S.length-1:+I,function(){for(var it=Math.max(arguments.length-I,0),ut=Array(it),Ot=0;Ot=0&&it<=ue}}function B(S){return function(I){return I==null?void 0:I[S]}}const nt=B("byteLength"),ht=T(nt);var Lt=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;function Z(S){return jt?jt(S)&&!ne(S):ht(S)&&Lt.test(L.call(S))}const Et=H?Z:he(!1),mt=B("length");function xe(S){for(var I={},it=S.length,ut=0;ut":">",'"':""","'":"'","`":"`"},Yt=K(Ft),Ae=Jr(Ft),er=K(Ae),or=Vt.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Se=/(.)^/,gn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Ji=/\\|'|\r|\n|\u2028|\u2029/g;function qn(S){return"\\"+gn[S]}var Yn=/^\s*(\w|\$)+\s*$/;function gi(S,I,it){!I&&it&&(I=it),I=xo({},I,Vt.templateSettings);var ut=RegExp([(I.escape||Se).source,(I.interpolate||Se).source,(I.evaluate||Se).source].join("|")+"|$","g"),Ot=0,_t="__p+='";S.replace(ut,function(Ie,lr,Fr,Ka,Ks){return _t+=S.slice(Ot,Ks).replace(Ji,qn),Ot=Ks+Ie.length,lr?_t+=`'+ +((__t=(`+lr+`))==null?'':_.escape(__t))+ +'`:Fr?_t+=`'+ +((__t=(`+Fr+`))==null?'':__t)+ +'`:Ka&&(_t+=`'; +`+Ka+` +__p+='`),Ie}),_t+=`'; +`;var Bt=I.variable;if(Bt){if(!Yn.test(Bt))throw new Error("variable is not a bare identifier: "+Bt)}else _t=`with(obj||{}){ +`+_t+`} +`,Bt="obj";_t=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');}; +`+_t+`return __p; +`;var ce;try{ce=new Function(Bt,"_",_t)}catch(Ie){throw Ie.source=_t,Ie}var We=function(Ie){return ce.call(this,Ie,Vt)};return We.source="function("+Bt+`){ +`+_t+"}",We}function La(S,I,it){I=Ln(I);var ut=I.length;if(!ut)return _e(it)?it.call(S):it;for(var Ot=0;Ot1)Xn(ce,I-1,it,ut),Ot=ut.length;else for(var We=0,Ie=ce.length;WeI?(ut&&(clearTimeout(ut),ut=null),ce=lr,Bt=S.apply(Ot,_t),ut||(Ot=_t=null)):!ut&&it.trailing!==!1&&(ut=setTimeout(We,Fr)),Bt};return Ie.cancel=function(){clearTimeout(ut),ce=0,ut=Ot=_t=null},Ie}function _i(S,I,it){var ut,Ot,_t,Bt,ce,We=function(){var lr=O()-Ot;I>lr?ut=setTimeout(We,I-lr):(ut=null,it||(Bt=S.apply(ce,_t)),ut||(_t=ce=null))},Ie=Zt(function(lr){return ce=this,_t=lr,Ot=O(),ut||(ut=setTimeout(We,I),it&&(Bt=S.apply(ce,_t))),Bt});return Ie.cancel=function(){clearTimeout(ut),ut=_t=ce=null},Ie}function Oo(S,I){return Dn(I,S)}function wi(S){return function(){return!S.apply(this,arguments)}}function ao(){var S=arguments,I=S.length-1;return function(){for(var it=I,ut=S[I].apply(this,arguments);it--;)ut=S[it].call(this,ut);return ut}}function Bs(S,I){return function(){if(--S<1)return I.apply(this,arguments)}}function ta(S,I){var it;return function(){return--S>0&&(it=I.apply(this,arguments)),S<=1&&(I=null),it}}const ea=Dn(ta,2);function go(S,I,it){I=Pr(I,it);for(var ut=De(S),Ot,_t=0,Bt=ut.length;_t0?0:Ot-1;_t>=0&&_t0?Bt=_t>=0?_t:Math.max(_t+ce,Bt):ce=_t>=0?Math.min(_t+1,ce):_t+ce+1;else if(it&&_t&&ce)return _t=it(ut,Ot),ut[_t]===Ot?_t:-1;if(Ot!==Ot)return _t=I(j.call(ut,Bt,ce),ar),_t>=0?_t+Bt:-1;for(_t=S>0?Bt:ce-1;_t>=0&&_t0?0:ce-1;for(_t||(Ot=it[Bt?Bt[We]:We],We+=S);We>=0&&We=3;return I(it,sr(ut,_t,4),Ot,Bt)}}const lo=Pn(1),ra=Pn(-1);function Zn(S,I,it){var ut=[];return I=Pr(I,it),jn(S,function(Ot,_t,Bt){I(Ot,_t,Bt)&&ut.push(Ot)}),ut}function Ia(S,I,it){return Zn(S,wi(Pr(I)),it)}function In(S,I,it){I=Pr(I,it);for(var ut=!un(S)&&De(S),Ot=(ut||S).length,_t=0;_t=0}const Ge=Zt(function(S,I,it){var ut,Ot;return _e(I)?Ot=I:(I=Ln(I),ut=I.slice(0,-1),I=I[I.length-1]),yn(S,function(_t){var Bt=Ot;if(!Bt){if(ut&&ut.length&&(_t=tn(_t,ut)),_t==null)return;Bt=_t[I]}return Bt==null?Bt:Bt.apply(_t,it)})});function zo(S,I){return yn(S,So(I))}function Dr(S,I){return Zn(S,On(I))}function na(S,I,it){var ut=-1/0,Ot=-1/0,_t,Bt;if(I==null||typeof I=="number"&&typeof S[0]!="object"&&S!=null){S=un(S)?S:tr(S);for(var ce=0,We=S.length;ceut&&(ut=_t)}else I=Pr(I,it),jn(S,function(Ie,lr,Fr){Bt=I(Ie,lr,Fr),(Bt>Ot||Bt===-1/0&&ut===-1/0)&&(ut=Ie,Ot=Bt)});return ut}function Wo(S,I,it){var ut=1/0,Ot=1/0,_t,Bt;if(I==null||typeof I=="number"&&typeof S[0]!="object"&&S!=null){S=un(S)?S:tr(S);for(var ce=0,We=S.length;cece||Bt===void 0)return 1;if(Bt1&&(ut=sr(ut,I[1])),I=fr(S)):(ut=Pi,I=Xn(I,!1,!1),S=Object(S));for(var Ot=0,_t=I.length;Ot<_t;Ot++){var Bt=I[Ot],ce=S[Bt];ut(ce,Bt,S)&&(it[Bt]=ce)}return it}),oa=Zt(function(S,I){var it=I[0],ut;return _e(it)?(it=wi(it),I.length>1&&(ut=I[1])):(I=yn(Xn(I,!1,!1),String),it=function(Ot,_t){return!Ar(I,_t)}),mo(S,it,ut)});function Fa(S,I,it){return j.call(S,0,Math.max(0,S.length-(I==null||it?1:I)))}function Go(S,I,it){return S==null||S.length<1?I==null||it?void 0:[]:I==null||it?S[0]:Fa(S,S.length-I)}function Vn(S,I,it){return j.call(S,I==null||it?1:I)}function yr(S,I,it){return S==null||S.length<1?I==null||it?void 0:[]:I==null||it?S[S.length-1]:Vn(S,Math.max(0,S.length-I))}function ia(S){return Zn(S,Boolean)}function Ha(S,I){return Xn(S,I,!1)}const Eo=Zt(function(S,I){return I=Xn(I,!0,!0),Zn(S,function(it){return!Ar(I,it)})}),zs=Zt(function(S,I){return Eo(S,I)});function co(S,I,it,ut){z(I)||(ut=it,it=I,I=!1),it!=null&&(it=Pr(it,ut));for(var Ot=[],_t=[],Bt=0,ce=mt(S);Bt{var Y=w&&w.__esModule?()=>w.default:()=>w;return vr.d(Y,{a:Y}),Y};vr.d=(w,Y)=>{for(var st in Y)vr.o(Y,st)&&!vr.o(w,st)&&Object.defineProperty(w,st,{enumerable:!0,get:Y[st]})};vr.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}();vr.o=(w,Y)=>Object.prototype.hasOwnProperty.call(w,Y);vr.r=w=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(w,"__esModule",{value:!0})};var Fh={};(()=>{vr.d(Fh,{ZP:()=>I0,kr:()=>wh,j7:()=>_h});var w=vr(50),Y=vr(163);function st(a){for(var n=[],t=1;t',move:'',plus:'',caret:'',delete:'',copy:'',arrowUp:'',chevron:'',eye:'',eyeOff:''},i18n:{},undoManager:{},assetManager:{},canvas:{},layerManager:{},storageManager:{},richTextEditor:{},domComponents:{},modal:{},codeManager:{},panels:{},commands:{},cssComposer:{},selectorManager:{},deviceManager:{},styleManager:{},blockManager:{},traitManager:{},textViewCode:"Code",keepUnusedStyles:!1,customUI:!1};const lt=rt;var F=vr(316),R=vr.n(F),M=vr(895);const N=function(a){var n=a.$;if(n&&n.prototype&&n.prototype.constructor.name!=="jQuery"){var t=n.fn;t.hide=function(){return this.css("display","none")},t.show=function(){return this.css("display","block")},t.focus=function(){var o=this.get(0);return o&&o.focus(),this},t.bind=function(o,l){return this.on(o,l)},t.unbind=function(o,l){if((0,w.isObject)(o)){for(var f in o)o.hasOwnProperty(f)&&this.off(f,o[f]);return this}else return this.off(o,l)},t.click=function(o){return o?this.on("click",o):this.trigger("click")},t.change=function(o){return o?this.on("change",o):this.trigger("change")},t.keydown=function(o){return o?this.on("keydown",o):this.trigger("keydown")},t.delegate=function(o,l,f,d){return d||(d=f),this.on(l,o,function(h){h.data=f,d(h)})},t.scrollLeft=function(){var o=this.get(0);o=o.nodeType==9?o.defaultView:o;var l=o instanceof Window?o:null;return l?l.pageXOffset:o.scrollLeft||0},t.scrollTop=function(){var o=this.get(0);o=o.nodeType==9?o.defaultView:o;var l=o instanceof Window?o:null;return l?l.pageYOffset:o.scrollTop||0};var e=n.prototype.offset;t.offset=function(o){var l,f;return o&&(l=o.top,f=o.left),typeof l<"u"&&this.css("top","".concat(l,"px")),typeof f<"u"&&this.css("left","".concat(f,"px")),e.call(this)},n.map=function(o,l){for(var f=[],d=0;d",frameStyle:` + body { background-color: #fff } + * ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.1) } + * ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2) } + * ::-webkit-scrollbar { width: 10px } + `,notTextable:["button","a","input[type=checkbox]","input[type=radio]"],allowExternalDrop:!0};const Kt=yt;var te=vr(642),ue={default:"",devices:[{id:"desktop",name:"Desktop",width:""},{id:"tablet",name:"Tablet",width:"770px",widthMedia:"992px"},{id:"mobileLandscape",name:"Mobile landscape",width:"568px",widthMedia:"768px"},{id:"mobilePortrait",name:"Mobile portrait",width:"320px",widthMedia:"480px"}]};const Zt=ue;var dt=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),ot=function(a){dt(n,a);function n(){return a!==null&&a.apply(this,arguments)||this}return n.prototype.defaults=function(){return{name:"",width:null,height:"",widthMedia:null,priority:null}},n.prototype.initialize=function(){var t=this;this.get("widthMedia")===null&&this.set("widthMedia",this.get("width")),this.get("width")===null&&this.set("width",this.get("widthMedia")),!this.get("priority")&&this.set("priority",parseFloat(this.get("widthMedia"))||0);var e=["width","height","widthMedia"];e.forEach(function(r){return t.checkUnit(r)})},n.prototype.checkUnit=function(t){var e=this.get(t)||"",r=(parseFloat(e)||0).toString()===e.toString();r&&this.set(t,"".concat(e,"px"))},n.prototype.getName=function(){return this.get("name")||this.get("id")},n.prototype.getWidthMedia=function(){return this.get("widthMedia")||""},n}(x.Hn);const X=ot;var z=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),et=function(a){z(n,a);function n(){return a!==null&&a.apply(this,arguments)||this}return n}(x.FE);const A=et;et.prototype.model=X;var tt=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),E=function(a,n){return Object.defineProperty?Object.defineProperty(a,"raw",{value:n}):a.raw=n,a},At=function(a){tt(n,a);function n(t){var e=a.call(this,t)||this;return e.config=t.config||{},e.em=e.config.em,e.ppfx=e.config.pStylePrefix||"",e.listenTo(e.em,"change:device",e.updateSelect),e}return n.prototype.template=function(t){var e=t.ppfx,r=t.label;return st(ct||(ct=E([` +
',`
+
+ + + +
+
+
+
+ + `],[` +
',`
+
+ + + +
+
+
+
+ + `])),e,r,e,e,e,e,e,e,e)},n.prototype.events=function(){return{change:"updateDevice","click [data-add-trasp]":"startAdd"}},n.prototype.startAdd=function(){},n.prototype.updateDevice=function(){var t=this.em;if(t){var e=this.devicesEl;t.set("device",e?e.val():"")}},n.prototype.updateSelect=function(){var t=this,e=t.em,r=t.devicesEl;if(e&&e.getDeviceModel&&r){var o=e.getDeviceModel();r.val(o?o.get("id"):"")}},n.prototype.getOptions=function(){var t=this,e=t.collection,r=t.em,o="";return e.forEach(function(l){var f=l.attributes,d=f.name,h=f.id,g=r&&r.t&&r.t("deviceManager.devices.".concat(h))||d;o+='")}),o},n.prototype.render=function(){var t=this,e=t.em,r=t.ppfx,o=t.$el,l=t.el,f=e&&e.t&&e.t("deviceManager.device");return o.html(this.template({ppfx:r,label:f})),this.devicesEl=o.find(".".concat(r,"devices")),this.devicesEl.append(this.getOptions()),this.devicesEl.val(e.get("device")),l.className="".concat(r,"devices-c"),this},n}(x.G7);const Pt=At;var ct,Dt=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Wt=function(){return Wt=Object.assign||function(a){for(var n,t=1,e=arguments.length;t=0&&this.head.splice(l,1)},n.prototype.addLink=function(t){var e="link";!this.getHeadByAttr("href",t,e)&&this.addHeadItem({tag:e,attributes:{href:t,rel:"stylesheet"}})},n.prototype.removeLink=function(t){this.removeHeadByAttr("href",t,"link")},n.prototype.addScript=function(t){var e="script";!this.getHeadByAttr("src",t,e)&&this.addHeadItem({tag:e,attributes:{src:t}})},n.prototype.removeScript=function(t){this.removeHeadByAttr("src",t,"script")},n.prototype.getPage=function(){var t;return(t=this.collection)===null||t===void 0?void 0:t.page},n.prototype._emitUpdated=function(t){t===void 0&&(t={}),this.em.trigger("frame:updated",B({frame:this},t))},n.prototype.hasAutoHeight=function(){var t=this.attributes.height;return!!(t==="auto"||this.config.infiniteCanvas)},n.prototype.toJSON=function(t){t===void 0&&(t={});var e=te.Z.prototype.toJSON.call(this,t),r=(0,w.result)(this,"defaults");return t.fromUndo&&delete e.component,delete e.styles,delete e.changesCount,e[ht]&&delete e.width,e[Lt]&&delete e.height,e.refFrame&&(e.refFrame=e.refFrame.id,delete e.component),(0,w.forEach)(e,function(o,l){l.indexOf("_")===0&&delete e[l]}),(0,w.forEach)(r,function(o,l){e[l]===o&&delete e[l]}),(0,w.forEach)(["attributes","head"],function(o){(0,w.isEmpty)(e[o])&&delete e[o]}),e},n}(te.Z);const mt=Et;var xe=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),He=function(a){xe(n,a);function n(t,e){e===void 0&&(e=[]);var r=a.call(this,t,e,mt)||this;return r.loadedItems=0,r.itemsToLoad=0,(0,w.bindAll)(r,"itemLoaded"),r.on("add",r.onAdd),r.on("reset",r.onReset),r.on("remove",r.onRemove),r.forEach(function(o){return r.onAdd(o)}),r}return n.prototype.onAdd=function(t){this.module.framesById[t.id]=t},n.prototype.onReset=function(t,e){var r=this,o=(e==null?void 0:e.previousModels)||[];o.map(function(l){return r.onRemove(l)})},n.prototype.onRemove=function(t){t.onRemove(),delete this.module.framesById[t.id]},n.prototype.initRefs=function(){this.forEach(function(t){return t.initRefs()})},n.prototype.itemLoaded=function(){this.loadedItems++,this.loadedItems>=this.itemsToLoad&&(this.trigger("loaded:all"),this.listenToLoadItems(!1))},n.prototype.listenToLoad=function(){this.loadedItems=0,this.itemsToLoad=this.length,this.listenToLoadItems(!0)},n.prototype.listenToLoadItems=function(t){var e=this;this.forEach(function(r){return r[t?"on":"off"]("loaded",e.itemLoaded)})},n}(he);const De=He;var ee=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Jt=function(a){ee(n,a);function n(t){var e=this,r=t.em,o=t.config,l=o.scripts,f=o.styles;return e=a.call(this,t,{scripts:l,styles:f})||this,e.set("frames",new De(t)),e.on("change:zoom",e.onZoomChange),e.on("change:x change:y",e.onCoordsChange),e.on("change:pointer change:pointerScreen",e.onPointerChange),e.listenTo(r,"change:device ".concat(ve),e.updateDevice),e.listenTo(r,cr.select,e._pageUpdated),e}return n.prototype.defaults=function(){return{frame:"",frames:[],rulers:!1,zoom:100,x:0,y:0,scripts:[],styles:[],pointer:x.pH,pointerScreen:x.pH}},Object.defineProperty(n.prototype,"frames",{get:function(){return this.get("frames")},enumerable:!1,configurable:!0}),n.prototype.init=function(){var t=this.em,e=t.Pages._initPage();this.set("frames",e.getFrames()),this.updateDevice({frame:e.getMainFrame()})},n.prototype._pageUpdated=function(t,e){var r=this.em;r.setSelected(),r.get("readyCanvas")&&r.stopDefault(),e==null||e.getFrames().map(function(o){return o.disable()}),this.set("frames",t.getFrames()),this.updateDevice({frame:t.getMainFrame()})},n.prototype.updateDevice=function(t){t===void 0&&(t={});var e=this.em,r=e.getDeviceModel(),o=t.frame||e.getCurrentFrameModel();if(o&&r){var l=r.attributes,f=l.width,d=l.height;o.set({width:f,height:d},{noUndo:1})}},n.prototype.onZoomChange=function(){var t=this,e=t.em,r=t.module,o=this.get("zoom");o<1&&this.set("zoom",1),e.trigger(r.events.zoom)},n.prototype.onCoordsChange=function(){var t=this,e=t.em,r=t.module;e.trigger(r.events.coords)},n.prototype.onPointerChange=function(){var t=this,e=t.em,r=t.module;e.trigger(r.events.pointer)},n.prototype.getPointerCoords=function(t){t===void 0&&(t=x.vA.World);var e=this.attributes,r=e.pointer,o=e.pointerScreen;return t===x.vA.World?r:o},n}(te.Z);const Vt=Jt;var Te=vr(675),Be=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Ee=function(a){Be(n,a);function n(t,e){e===void 0&&(e=[]);var r=a.call(this,t,e,Te.Z)||this;r.on("add",r.onAdd),r.on("change",r.onChange),r.on("remove",r.onRemove);var o=r.em;r.refreshDbn=(0,w.debounce)(function(){return r.refresh()},0);var l="component:resize styleable:change component:input component:update frame:updated undo redo";return r.listenTo(o,l,function(){return r.refreshDbn()}),r}return Object.defineProperty(n.prototype,"em",{get:function(){return this.module.em},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"events",{get:function(){return this.module.events},enumerable:!1,configurable:!0}),n.prototype.refresh=function(){var t=this,e=t.em,r=t.events;e.trigger(r.spot)},n.prototype.onAdd=function(t){this.__trgEvent(this.events.spotAdd,{spot:t})},n.prototype.onChange=function(t){this.__trgEvent(this.events.spotUpdate,{spot:t})},n.prototype.onRemove=function(t){this.__trgEvent(this.events.spotRemove,{spot:t})},n.prototype.__trgEvent=function(t,e){var r=this.module,o=r.em;o.trigger(t,e),this.refreshDbn()},n}(he);const Ke=Ee;var ge;(function(a){a.dragEnter="canvas:dragenter",a.dragOver="canvas:dragover",a.dragEnd="canvas:dragend",a.dragData="canvas:dragdata",a.drop="canvas:drop",a.spot="canvas:spot",a.spotAdd="canvas:spot:add",a.spotUpdate="canvas:spot:update",a.spotRemove="canvas:spot:remove",a.coords="canvas:coords",a.zoom="canvas:zoom",a.pointer="canvas:pointer",a.refresh="canvas:refresh",a.frameLoad="canvas:frame:load",a.frameLoadHead="canvas:frame:load:head",a.frameLoadBody="canvas:frame:load:body"})(ge||(ge={}));const fr=ge;var Me=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),nr=function(a){Me(n,a);function n(){return a!==null&&a.apply(this,arguments)||this}return Object.defineProperty(n.prototype,"pfx",{get:function(){return this.ppfx+this.config.stylePrefix||""},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"ppfx",{get:function(){return this.em.config.stylePrefix||""},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"module",{get:function(){var t,e;return(e=(t=this.model)===null||t===void 0?void 0:t.module)!==null&&e!==void 0?e:this.collection.module},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"em",{get:function(){return this.module.em},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"config",{get:function(){return this.module.config},enumerable:!1,configurable:!0}),n.prototype.preinitialize=function(t){this.className=""},n}(x.G7);const Qe=nr;var Xt=vr(491),Or=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Kn=function(a){Or(n,a);function n(t,e){t===void 0&&(t={}),e===void 0&&(e=!1);var r=a.call(this,t)||this;return r.itemsView="",r.itemType="type",r.reuseView=!1,r.viewCollection=[],e&&r.listenTo(r.collection,"add",r.addTo),r}return n.prototype.addTo=function(t){this.add(t)},n.prototype.itemViewNotFound=function(t){},n.prototype.add=function(t,e){var r=this,o=r.reuseView,l=r.viewCollection,f=e||null,d=t.get(this.itemType),h;t.view&&o?h=t.view:h=this.renderView(t,d),l.push(h);var g=h.render().el;f?f.appendChild(g):this.$el.append(g)},n.prototype.render=function(){var t=this,e=document.createDocumentFragment();return this.clearItems(),this.$el.empty(),this.collection.length&&this.collection.each(function(r){return t.add(r,e)}),this.$el.append(e),this.onRender(),this},n.prototype.onRender=function(){},n.prototype.onRemoveBefore=function(t,e){},n.prototype.onRemove=function(t,e){},n.prototype.remove=function(t){t===void 0&&(t={});var e=this.viewCollection;return this.onRemoveBefore(e,t),this.clearItems(),x.G7.prototype.remove.apply(this,t),this.onRemove(e,t),this},n.prototype.clearItems=function(){this.viewCollection},n}(Qe);const U=Kn;var ft=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),wt=function(a){ft(n,a);function n(t){t===void 0&&(t={});var e=a.call(this,t)||this;e.config=t.config||{};var r=e.model;return e.listenTo(r,"change",e.render),e.listenTo(r,"destroy remove",e.remove),e.listenTo(r.get("selectors"),"change",e.render),e}return n.prototype.tagName=function(){return"style"},n.prototype.render=function(){var t=this,e=t.model,r=t.el,o=e.get("important");return r.innerHTML=e.toCSS({important:o}),this},n}(x.G7);const Ht=wt;var de=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),je=function(a){de(n,a);function n(){return a!==null&&a.apply(this,arguments)||this}return n.prototype._createElement=function(){return document.createTextNode("")},n.prototype.render=function(){var t=this.model,e=t.get("important");return this.el.textContent=t.getDeclaration({important:e}),this},n}(Ht);const tr=je;var Zr=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Jr=function(a,n){return"".concat(a).concat(n?"-".concat(parseFloat(n)):"")},Tr=function(a){Zr(n,a);function n(t){var e=a.call(this,t)||this;(0,w.bindAll)(e,"sortRules");var r=t.config||{};e.atRules={},e.config=r,e.em=r.em,e.pfx=r.stylePrefix||"",e.className=e.pfx+"rules";var o=e.collection;return e.listenTo(o,"add",e.addTo),e.listenTo(o,"reset",e.render),e}return n.prototype.addTo=function(t){this.addToCollection(t)},n.prototype.addToCollection=function(t,e){if(this.renderStarted){var r=e||null,o=this.config,l={model:t,config:o},f,d;if(t.get("atRuleType")==="keyframes"){var h=t.getAtRule(),g=this.atRules[h];if(!g){var y=document.createElement("style");g=document.createTextNode(""),y.appendChild(document.createTextNode("".concat(h,"{"))),y.appendChild(g),y.appendChild(document.createTextNode("}")),this.atRules[h]=g,f=y}d=new tr(l),g.appendData(d.render().el.textContent)}else d=new Ht(l),f=d.render().el;var b=this.className,k=t.get("mediaText"),V=Jr(b),$=V;if(k&&($=Jr(b,this.getMediaWidth(k))),f){var Q=r||this.el,vt=void 0;try{vt=Q.querySelector("#".concat($))}catch{}vt||(vt=Q.querySelector("#".concat(V))),vt==null||vt.appendChild(f)}return f}},n.prototype.getMediaWidth=function(t){return t&&t.replace("(".concat(this.em.getConfig().mediaCondition,": "),"").replace(")","")},n.prototype.sortRules=function(t,e){var r=this.em,o=(r.getConfig().mediaCondition||"").indexOf("min-width")!==-1;if(!o)return 0;var l=o?t:e,f=o?e:t;return l-f},n.prototype.render=function(){var t=this;this.renderStarted=!0,this.atRules={};var e=this,r=e.em,o=e.$el,l=e.collection,f=this.className,d=document.createDocumentFragment();o.empty();var h=r.Devices.getAll().pluck("priority").sort(this.sortRules);return h.every(function(g){return g})&&h.unshift(0),h.forEach(function(g){return d.appendChild((0,Xt.ut)("div",{id:Jr(f,g)}))}),l.each(function(g){return t.addToCollection(g,d)}),o.append(d),o.attr("class",f),this},n}(x.G7);const Co=Tr;var Qr=function(){return Qr=Object.assign||function(a){for(var n,t=1,e=arguments.length;t",g,y;if(r.stopDefault(),r.inAbsoluteMode()){var b=r.Components.getWrapper(),k=b.append({})[0],V=r.Commands.run("core:component-drag",{event:n,guidesInfo:1,center:1,target:k,onEnd:function(Q,vt,Mt){var kt=Mt.cancelled,Gt;if(!kt){Gt=b.append(h)[0];var fe=o.getOffset(),Oe=k.getStyle(),Ve=Oe.top,pe=Oe.left,Ue=Oe.position,Ze=(0,Xt.GX)(Q.target),hr=parseInt("".concat(parseFloat(pe)+Ze.x-fe.left),10),ae=parseInt("".concat(parseFloat(Ve)+Ze.y-fe.top),10);Gt.addStyle({left:hr+"px",top:ae+"px",position:Ue})}t.handleDragEnd(Gt,l),k.remove()}});g=function(Q){return V.stop(n,{cancel:Q})},y=function(Q){return h=Q}}else{var $=new d.Sorter(Qr({em:r,wmargin:1,nested:1,canvasRelative:1,direction:"a",container:this.el,placer:o.getPlacerEl(),containerSel:"*",itemSel:"*",pfx:"gjs-",onEndMove:function(Q){return t.handleDragEnd(Q,l)},document:this.el.ownerDocument},this.sortOpts||{}));$.setDropContent(h),$.startSort(),this.sorter=$,g=function(Q){Q&&($.moved=!1),$.endMove()},y=function(Q){return $.setDropContent(Q)}}this.dragStop=g,this.dragContent=y,r.trigger("canvas:dragenter",l,h)}},a.prototype.handleDragEnd=function(n,t){var e=this.em;this.over=!1,n&&(e.set("dragResult",n),e.trigger("canvas:drop",t,n)),e.runDefault({preserveSelected:1})},a.prototype.handleDragOver=function(n){n.preventDefault(),this.em.trigger("canvas:dragover",n)},a.prototype.handleDrop=function(n){n.preventDefault();var t=this.dragContent,e=n.dataTransfer,r=this.getContentByData(e).content;n.target.style.border="",r&&t&&t(r),this.endDrop(!r,n)},a.prototype.getContentByData=function(n){var t=this.em,e=n&&n.types,r=n&&n.files||[],o=t.get("dragContent"),l=n&&n.getData("text");if(r.length){l=[];for(var f=0;f=0)l=n&&n.getData("text/html").replace(/<\/?meta[^>]*>/g,"");else if((0,w.indexOf)(e,"text/uri-list")>=0)l={type:"link",attributes:{href:l},content:l};else if((0,w.indexOf)(e,"text/json")>=0){var g=n&&n.getData("text/json");g&&(l=JSON.parse(g))}else e.length===1&&e[0]==="text/plain"&&(l="
".concat(l,"
"));var y={content:l};return t.trigger("canvas:dragdata",n,y),y},a}();const xo=Cn;var Er=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),mr=function(){return mr=Object.assign||function(a){for(var n,t=1,e=arguments.length;td&&(h+=l-d),!(0,w.isUndefined)(t)&&h!==o&&h>0&&h0){var k=y.shift(),V=(0,Xt.ut)("script",mr({type:"text/javascript"},(0,w.isString)(k)?{src:k}:k));(b=r.contentDocument)===null||b===void 0||b.head.appendChild(V),V.hasAttribute("nomodule")&&"noModule"in HTMLScriptElement.prototype?g(y):V.onerror=V.onload=g.bind(null,y)}else l==null||l.trigger(fr.frameLoadHead,d),t.renderBody(),l==null||l.trigger(fr.frameLoadBody,d),l==null||l.trigger(f,d)};r.onload=function(){var y=t.config.frameContent;if(y){var b=t.getDoc();b.open(),b.write(y),b.close()}d.window=t.getWindow(),l==null||l.trigger("".concat(f,":before"),d),l==null||l.trigger(fr.frameLoad,d),g(Rr([],h.get("scripts"),!0))}},n.prototype.renderStyles=function(t){t===void 0&&(t={});var e=this.getHead(),r=this.getCanvasModel(),o=function(y){return y.map(function(b){return{tag:"link",attributes:mr({rel:"stylesheet"},(0,w.isString)(b)?{href:b}:b)}})},l=o(t.prev||r.previous("styles")),f=o(r.get("styles")),d=[],h=[],g=function(y,b,k){y.forEach(function(V){var $=V.attributes.href,Q=b.some(function(vt){return vt.attributes.href===$});!Q&&k.push(V)})};g(f,l,h),g(l,f,d),d.forEach(function(y){var b,k=e.querySelector('link[href="'.concat(y.attributes.href,'"]'));(b=k==null?void 0:k.parentNode)===null||b===void 0||b.removeChild(k)}),(0,Xt.SJ)(e,h)},n.prototype.renderBody=function(){var t=this,e,r,o=this,l=o.config,f=o.em,d=o.model,h=o.ppfx,g=this.getDoc(),y=this.getBody(),b=this.getWindow(),k=d.hasAutoHeight(),V=f.config;b._isEditor=!0,this.renderStyles({prev:[]});var $="#ffca6f";(0,Xt.R3)(y,``));var Q=d.root,vt=f.Components.getType("wrapper").view;this.wrapper=new vt({model:Q,config:mr(mr({},Q.config),{em:f,frameView:this})}).render(),(0,Xt.R3)(y,(e=this.wrapper)===null||e===void 0?void 0:e.el),(0,Xt.R3)(y,new Co({collection:d.getStyles(),config:mr(mr({},f.Css.getConfig()),{frameView:this})}).render().el),(0,Xt.R3)(y,this.getJsContainer()),(0,Xt.on)(y,"click",function(Mt){var kt;return Mt&&((kt=Mt.target)===null||kt===void 0?void 0:kt.tagName)=="A"&&Mt.preventDefault()}),(0,Xt.on)(y,"submit",function(Mt){return Mt&&Mt.preventDefault()}),[{event:"keydown keyup keypress",class:"KeyboardEvent"},{event:"mousedown mousemove mouseup",class:"MouseEvent"},{event:"pointerdown pointermove pointerup",class:"PointerEvent"},{event:"wheel",class:"WheelEvent",opts:{passive:!l.infiniteCanvas}}].forEach(function(Mt){return Mt.event.split(" ").forEach(function(kt){g.addEventListener(kt,function(Gt){return t.el.dispatchEvent((0,Xt.t3)(Gt,Mt.class))},Mt.opts)})}),this._toggleEffects(!0),(0,Y.hasDnd)(f)&&(this.droppable=new xo(f,(r=this.wrapper)===null||r===void 0?void 0:r.el)),this.loaded=!0,d.trigger("loaded")},n.prototype._toggleEffects=function(t){var e=t?Xt.on:Xt.S1,r=this.getWindow();r&&e(r,"".concat(Xt.G1," resize"),this._emitUpdate)},n.prototype._emitUpdate=function(){this.model._emitUpdated()},n}(Qe);const Gn=xn;var Ro=vr(668),Ln=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),tn=function(){return tn=Object.assign||function(a){for(var n,t=1,e=arguments.length;t +
+ `).concat(f.get("name")||"",` +
+
+ +
+
+
+
+
+ `)).append(e.el);var g=(0,Xt.ut)("div",{class:"".concat(o,"tools"),style:"pointer-events:none; display: none"},` +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ `));this.elTools=g;var y=l==null?void 0:l.toolsWrapper;return y&&y.appendChild(g),h&&h({el:d,elTop:d.querySelector("[data-frame-top]"),elRight:d.querySelector("[data-frame-right]"),elBottom:d.querySelector("[data-frame-bottom]"),elLeft:d.querySelector("[data-frame-left]"),frame:f,frameWrapperView:this,remove:this.remove,startDrag:this.startDrag}),this},n}(Qe);const ho=Nr;var Sn=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),On=function(a){Sn(n,a);function n(t,e){t===void 0&&(t={});var r=a.call(this,t,!0)||this;return r.listenTo(r.collection,"reset",r.render),r.canvasView=e.canvasView,r._module=e.module,r}return n.prototype.onRemoveBefore=function(t,e){e===void 0&&(e={}),t.forEach(function(r){return r.remove(e)})},n.prototype.onRender=function(){var t=this,e=t.$el,r=t.ppfx;e.attr({class:"".concat(r,"frames")})},n.prototype.clearItems=function(){var t=this.viewCollection||[];t.forEach(function(e){return e.remove()}),this.viewCollection=[]},n.prototype.renderView=function(t,e){return new ho(t,this.canvasView)},n}(U);const So=On;var sr=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Ce=function(){return Ce=Object.assign||function(a){for(var n,t=1,e=arguments.length;t +
+ +
+ + `)},n.prototype._onFramesUpdate=function(){this._initFrames(),this._renderFrames()},n.prototype._initFrames=function(){var t=this,e=t.frames,r=t.model,o=t.config,l=t.em,f=r.frames;l.set("readyCanvas",0),f.once("loaded:all",function(){return l.set("readyCanvas",1)}),e==null||e.remove(),this.frames=new So({collection:f},Ce(Ce({},o),{canvasView:this}))},n.prototype.checkSelected=function(t,e){var r;e===void 0&&(e={});var o=e.scroll,l=this.em.getCurrentFrame();o&&((r=t.views)===null||r===void 0||r.forEach(function(f){f.frameView===l&&f.scrollIntoView(o)}))},n.prototype.remove=function(){for(var t,e=[],r=0;r=Ue?Ue/2-Ve/2:-fe),ui=-Q.y+Ze/2-pe/2,oo={x:(Yi+fe)*ln,y:(ui+Oe)*ln};if(Mt){var Ea=f.getZoomMultiplier(),ks=Ze*Ea,Ms=ks-Ze,Kp=Ms/2;oo.y=(-Q.y+Oe)*ln-Kp/Ea}f.setCoords(oo.x,oo.y)},n.prototype.isElInViewport=function(t){var e=(0,Y.getElement)(t),r=(0,Xt.Ut)(e),o=this.getFrameOffset(e),l=r.top,f=r.left;return l>=0&&f>=0&&l<=o.height&&f<=o.width},n.prototype.offset=function(t,e){e===void 0&&(e={});var r=e.noScroll,o=(0,Xt.Ut)(t),l=r?{x:0,y:0}:(0,Xt.GX)(t);return{top:o.top+l.y,left:o.left+l.x,width:o.width,height:o.height}},n.prototype.getRectToScreen=function(t){var e,r,o,l,f=this.module.getZoomDecimal(),d=this.module.getCoords(),h=this.getViewportDelta(),g=((e=t.x)!==null&&e!==void 0?e:0)*f+d.x+h.x||0,y=((r=t.y)!==null&&r!==void 0?r:0)*f+d.y+h.y||0;return{x:g,y,width:((o=t.width)!==null&&o!==void 0?o:0)*f,height:((l=t.height)!==null&&l!==void 0?l:0)*f}},n.prototype.getElBoxRect=function(t,e){var r,o,l;e===void 0&&(e={});var f=this.module,d=(0,Xt.Ut)(t),h=d.width,g=d.height,y=d.left,b=d.top,k=(r=(0,Y.getComponentView)(t))===null||r===void 0?void 0:r.frameView,V=k==null?void 0:k.getBoxRect(),$=f.getZoomMultiplier(),Q=(o=V==null?void 0:V.x)!==null&&o!==void 0?o:0,vt=(l=V==null?void 0:V.y)!==null&&l!==void 0?l:0,Mt=this.el,kt=(0,Xt.GX)(),Gt=y+Q+(Mt.scrollLeft+kt.x)*$,fe=b+vt+(Mt.scrollTop+kt.y)*$,Oe={x:Gt,y:fe,width:h,height:g};return e.local&&(Oe.x=y,Oe.y=b),e.toScreen?this.getRectToScreen(Oe):Oe},n.prototype.getViewportRect=function(t){t===void 0&&(t={});var e=this.getCanvasOffset(),r=e.top,o=e.left,l=e.width,f=e.height,d=this.module;if(t.toWorld){var h=d.getZoomMultiplier(),g=d.getCoords(),y=this.getViewportDelta(),b=-g.x-y.x||0,k=-g.y-y.y||0;return{x:b*h,y:k*h,width:l*h,height:f*h}}else return{x:o,y:r,width:l,height:f}},n.prototype.getViewportDelta=function(t){var e=this.module.getZoomMultiplier(),r=this.getCanvasOffset(),o=r.width,l=r.height,f=o*e,d=l*e,h=f-o,g=d-l;return{x:h/2/e,y:g/2/e}},n.prototype.clearOff=function(){this.frmOff=void 0,this.cvsOff=void 0},n.prototype.getFrameOffset=function(t){var e;if(!this.frmOff||t){var r=(e=this.frame)===null||e===void 0?void 0:e.el,o=t==null?void 0:t.ownerDocument.defaultView,l=o?o.frameElement:r;this.frmOff=this.offset(l||r)}return this.frmOff},n.prototype.getCanvasOffset=function(){return this.cvsOff||(this.cvsOff=this.offset(this.el)),this.cvsOff},n.prototype.getElementPos=function(t,e){e===void 0&&(e={});var r=this.module.getZoomDecimal(),o=this.getFrameOffset(t),l=this.el,f=this.getCanvasOffset(),d=this.offset(t,e),h=e.avoidFrameOffset?0:o.top,g=e.avoidFrameOffset?0:o.left,y=e.avoidFrameZoom?d.top:d.top*r,b=e.avoidFrameZoom?d.left:d.left*r,k=e.avoidFrameOffset?y:y+h-f.top+l.scrollTop,V=e.avoidFrameOffset?b:b+g-f.left+l.scrollLeft,$=e.avoidFrameZoom?d.height:d.height*r,Q=e.avoidFrameZoom?d.width:d.width*r;return{top:k,left:V,height:$,width:Q,zoom:r,rect:d}},n.prototype.getElementOffsets=function(t){if(!t||(0,Xt.BM)(t))return{};var e={},r=window.getComputedStyle(t),o=this.module.getZoomDecimal(),l=["marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"];return l.forEach(function(f){e[f]=parseFloat(r[f])*o}),e},n.prototype.getPosition=function(t){var e;t===void 0&&(t={});var r=(e=this.frame)===null||e===void 0?void 0:e.el.contentDocument;if(!r)return{top:0,left:0,width:0,height:0};var o=r.body,l=this.module.getZoomDecimal(),f=this.getFrameOffset(),d=this.getCanvasOffset(),h=t.noScroll;return{top:f.top+(h?0:o.scrollTop)*l-d.top,left:f.left+(h?0:o.scrollLeft)*l-d.left,width:d.width,height:d.height}},n.prototype.updateScript=function(t){var e=t.model,r=e.getId();if(!t.scriptContainer){t.scriptContainer=(0,Xt.ut)("div",{"data-id":r});var o=this.getJsContainer();o==null||o.appendChild(t.scriptContainer)}t.el.id=r,t.scriptContainer.innerHTML="";var l=document.createElement("script"),f=e.getScriptString(),d=e.get("script-props")?f:`function(){ +`.concat(f,` +;}`),h=JSON.stringify(e.__getScriptProps());l.innerHTML=` + setTimeout(function() { + var item = document.getElementById('`.concat(r,`'); + if (!item) return; + (`).concat(d,".bind(item))(").concat(h,`) + }, 1);`),setTimeout(function(){var g=t.scriptContainer;g==null||g.appendChild(l)},0)},n.prototype.getJsContainer=function(t){var e=this.getFrameView(t);return e==null?void 0:e.getJsContainer()},n.prototype.getFrameView=function(t){return(t==null?void 0:t.frameView)||this.em.getCurrentFrame()},n.prototype._renderFrames=function(){if(this.ready){var t=this,e=t.model,r=t.frames,o=t.em,l=t.framesArea,f=e.frames;f.listenToLoad(),r.render();var d=f.at(0),h=d==null?void 0:d.view;o.setCurrentFrame(h),l==null||l.appendChild(r.el),this.frame=h,this.updateFramesArea()}},n.prototype.renderFrames=function(){this._renderFrames()},n.prototype.render=function(){var t=this,e=t.el,r=t.$el,o=t.ppfx,l=t.config,f=t.em;r.html(this.template());var d=r.find("[data-frames]");this.framesArea=d.get(0);var h=r.find("[data-tools]");return this.toolsWrapper=h.get(0),h.append(` +
+
+
+
+
+
+ `).concat(l.extHl?'
'):"",` +
+
+
+
+
+
+
+ `)),this.toolsEl=e.querySelector("#".concat(o,"tools")),this.hlEl=e.querySelector(".".concat(o,"highlighter")),this.badgeEl=e.querySelector(".".concat(o,"badge")),this.placerEl=e.querySelector(".".concat(o,"placeholder")),this.ghostEl=e.querySelector(".".concat(o,"ghost")),this.toolbarEl=e.querySelector(".".concat(o,"toolbar")),this.resizerEl=e.querySelector(".".concat(o,"resizer")),this.offsetEl=e.querySelector(".".concat(o,"offset-v")),this.fixedOffsetEl=e.querySelector(".".concat(o,"offset-fixed-v")),this.toolsGlobEl=e.querySelector(".".concat(o,"tools-gl")),this.spotsEl=e.querySelector("[data-spots]"),this.cvStyle=e.querySelector("[data-canvas-style]"),this.el.className=(0,Y.getUiClass)(f,this.className),this.ready=!0,this._renderFrames(),this},n}(Qe);const Pr=Tn;var vn=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),qe=function(){return qe=Object.assign||function(a){for(var n,t=1,e=arguments.length;tf.top+f.height?f.top+f.height:$;var Q={top:$,left:V,elementTop:f.top,elementLeft:f.left,elementWidth:f.width,elementHeight:f.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:l.top,canvasLeft:l.left,canvasWidth:l.width,canvasHeight:l.height};return y&&this.em&&this.em.trigger(y,Q),Q}},n.prototype.canvasRectOffset=function(t,e,r){var o=this;r===void 0&&(r={});var l=function(d){var h=d.defaultView;return h==null?void 0:h.frameElement},f=function(d,h,g){h===void 0&&(h=1);var y=o.em.getZoomDecimal(),b=h?"top":"left",k=d.ownerDocument,V=r.offset?l(k):{},$=V.offsetTop,Q=$===void 0?0:$,vt=V.offsetLeft,Mt=vt===void 0?0:vt,kt=k.body||{},Gt=kt.scrollTop,fe=Gt===void 0?0:Gt,Oe=kt.scrollLeft,Ve=Oe===void 0?0:Oe,pe=h?fe:Ve,Ue=h?Q:Mt;return g[b]-(pe-Ue)*y};return{top:f(t,1,e),left:f(t,0,e)}},n.prototype.getTargetToElementFixed=function(t,e,r){r===void 0&&(r={});var o=r.pos||this.getElementPos(t,{noScroll:!0}),l=r.canvasOff||this.canvasRectOffset(t,o),f=e.offsetHeight||0,d=e.offsetWidth||0,h=o.left+o.width,g=this.getCanvasView(),y=g.getPosition(),b=g.getFrameOffset(t),k=r.event,V=-f,$=(0,w.isUndefined)(r.left)?o.width-d:r.left;if($=o.left<-$?-o.left:$,$=h>y.width?$-(h-y.width):$,l.top".concat(a,""),l=t.parseFromString(o,e),f;if(r){var d=l.head,h=l.body,g=d.querySelectorAll("script");(0,w.each)(g,function(b){return h.appendChild(b)});var y=[];(0,w.each)(d.children,function(b){return y.push(b)}),(0,w.each)(y,function(b,k){return h.insertBefore(b,h.children[k])}),f=h}else f=l.firstChild;return f};var Ae=function(){return Ae=Object.assign||function(a){for(var n,t=1,e=arguments.length;t=0;){var r=t.indexOf("/*"),o=t.indexOf("*/")+2;t=t.replace(t.slice(r,o),"")}for(var l=t.split(";"),f=0,d=l.length;f"&&(V.void=!0);var hr=V.components;if(!V.type&&hr){for(var ae=n.textTypes,ln=ae===void 0?[]:ae,qi=n.textTags,Yi=qi===void 0?[]:qi,ui=1,oo=0,Ea=0;Ea=0:o,g=d.substring(0,2),y=g==="__";if(y)return"continue";var b=r[d],k=(0,w.isArray)(b)?b:[b];k.forEach(function(V){var $="".concat(V).concat(h?" !important":"");$&&e.push("".concat(d,":").concat($,";"))})};for(var f in r)l(f);return e.join("")},n.prototype.getSelectors=function(){return this.get("selectors")||this.get("classes")},n.prototype.getSelectorsString=function(t){return this.selectorsToString?this.selectorsToString(t):this.getSelectors().getFullString()},n}(x.Hn);const No=La;var Qi=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),En=function(){return En=Object.assign||function(a){for(var n,t=1,e=arguments.length;t0&&Q.reset($,t)}else k.components=$}return k})},un=function(a){Qi(n,a);function n(){return a!==null&&a.apply(this,arguments)||this}return n.prototype.initialize=function(t,e){e===void 0&&(e={}),this.opt=e,this.listenTo(this,"add",this.onAdd),this.listenTo(this,"remove",this.removeChildren),this.listenTo(this,"reset",this.resetChildren);var r=e.em,o=e.config;this.config=o,this.em=r,this.domc=e.domc||(r==null?void 0:r.Components)},n.prototype.resetChildren=function(t,e){var r=this;e===void 0&&(e={});var o=this,l=e.previousModels||[],f=l.filter(function(g){return!t.get(g.cid)}),d=Dn(t),h=Dn(l).filter(function(g){return d.indexOf(g)>=0});e.keepIds=(e.keepIds||[]).concat(h),f.forEach(function(g){return r.removeChildren(g,o,e)}),t.each(function(g){return r.onAdd(g)})},n.prototype.resetFromString=function(t,e){var r,o;t===void 0&&(t=""),e===void 0&&(e={}),e.keepIds=Dn(this);var l=this,f=l.domc,d=l.em,h=l.parent,g=d==null?void 0:d.Css,y=(f==null?void 0:f.allById())||{},b=this.parseString(t,e),k=yi(b,y,e),V=e.visitedCmps,$=V===void 0?{}:V;Object.keys($).forEach(function(Q){var vt=$[Q];if(vt.length){var Mt=(g==null?void 0:g.getRules("#".concat(Q)))||[];Mt.length&&vt.forEach(function(kt){Mt.forEach(function(Gt){var fe=Gt.clone();fe.set("selectors",["#".concat(kt.attributes.id)]),g.getAll().add(fe)})})}}),this.reset(k,e),d==null||d.trigger("component:content",h,e,t),(o=(r=h).__checkInnerChilds)===null||o===void 0||o.call(r)},n.prototype.removeChildren=function(t,e,r){var o=this;if(r===void 0&&(r={}),!!t){var l=this,f=l.domc,d=l.em,h=r.temporary||r.fromUndo;if(t.prevColl=this,!h){var g=t.getId(),y=d.Selectors.getAll(),b=d.Css.getAll(),k=(r.keepIds||[]).indexOf(g)<0,V=f?f.allById():{};delete V[g];var $=k?b.remove(b.filter(function(Mt){return Mt.getSelectors().getFullString()==="#".concat(g)}),r):[];y.remove($.map(function(Mt){return Mt.getSelectors().at(0)})),t.opt.temporary||(d.Commands.run("core:component-style-clear",{target:t}),t.removed(),t.trigger("removed"),d.trigger("component:remove",t));var Q=t.components();Q.forEach(function(Mt){return o.removeChildren(Mt,e,r)})}var vt=t.components();d.stopListening(vt),d.stopListening(t),d.stopListening(t.get("classes")),t.__postRemove()}},n.prototype.model=function(t,e){var r=e.collection.opt,o=r.em,l,f=o.Components.componentTypes;e.em=o,e.config=r.config,e.componentTypes=f,e.domc=r.domc;for(var d=0;d=0&&this.set("void",!0),e.em=o,this.opt=e,this.em=o,this.frame=e.frame,this.config=e.config||{},this.set("attributes",Ge(Ge({},(0,w.result)(this,"defaults").attributes||{}),this.get("attributes")||{})),this.ccid=n.createId(this,e),this.initClasses(),this.initComponents(),this.initTraits(),this.initToolbar(),this.initScriptProps(),this.listenTo(this,"change:script",this.scriptUpdated),this.listenTo(this,"change:tagName",this.tagUpdated),this.listenTo(this,"change:attributes",this.attrUpdated),this.listenTo(this,"change:attributes:id",this._idUpdated),this.on("change:toolbar",this.__emitUpdateTlb),this.on("change",this.__onChange),this.on(Ko,this.__propToParent),this.set("status",""),this.views=[],["classes","traits","components"].forEach(function($){var Q="add remove ".concat($!=="components"?"change":"");r.listenTo(r.get($),Q.trim(),function(){for(var vt=[],Mt=0;Mt=0})},n.prototype.__getSymbToUp=function(t){var e=this;t===void 0&&(t={});var r=[],o=t.changed;if(t.fromInstance||t.noPropagate||t.fromUndo||o&&this.__isSymbOvrd(o))return r;var l=this.__getSymbols()||[],f=this.__getSymbol(),d=f?Dr([f],f.__getSymbols()||[],!0):l;return r=d.filter(function(h){return h!==e}).filter(function(h){return!(o&&h.__isSymbOvrd(o))}),r},n.prototype.__getSymbTop=function(t){for(var e=this,r=this.parent(t);r&&(r.__isSymbol()||r.__getSymbol());)e=r,r=r.parent(t);return e},n.prototype.__upSymbProps=function(t,e){var r=this;e===void 0&&(e={});var o=this.changedAttributes()||{},l=o.attributes||{};if(delete o.status,delete o.open,delete o[en],delete o[cn],delete o[Oi],delete o.attributes,delete l.id,(0,Y.isEmptyObj)(l)||(o.attributes=l),!(0,Y.isEmptyObj)(o)){var f=this.__getSymbToUp(e);(0,w.keys)(o).map(function(d){r.__isSymbOvrd(d)&&delete o[d]}),this.__logSymbol("props",f,{opts:e,changed:o}),f.forEach(function(d){var h=Ge({},o);(0,w.keys)(h).map(function(g){d.__isSymbOvrd(g)&&delete h[g]}),d.set(h,Ge({fromInstance:r},e))})}},n.prototype.__upSymbCls=function(t,e,r){var o=this;r===void 0&&(r={});var l=this.__getSymbToUp(r);this.__logSymbol("classes",l,{opts:r}),l.forEach(function(f){f.set("classes",o.get("classes"),{fromInstance:o})}),this.__changesUp(r)},n.prototype.__upSymbComps=function(t,e,r){var o=this,l=r||e||{},f=l.fromInstance,d=l.fromUndo,h={fromInstance:f,fromUndo:d},g=t.opt.temporary;if(r)if(r.add){var k=[],V=!!this.__getSymbols(),y=this.__getSymbToUp(Ge(Ge({},h),{changed:"components:add"}));if(y.length){var $=t.__getSymbol();k=($?$.__getSymbols():t.__getSymbols())||[],k=Dr([],k,!0),k.push($||t)}!g&&this.__logSymbol("add",y,{opts:r,addedInstances:k.map(function(pe){return pe.cid}),added:t.cid}),y.forEach(function(pe){var Ue=pe.__getSymbTop(),Ze=k.filter(function(ae){var ln=ae.__getSymbTop({prev:1});return Ue&&ln&&ln===Ue})[0],hr=Ze||t.clone({symbol:!0,symbolInv:V});pe.append(hr,Ge({fromInstance:o},r))})}else{var Q=t.__getSymbol();if(Q&&!r.temporary&&Q.set(en,Q.__getSymbols().filter(function(Ve){return Ve!==t})),!t.__isSymbolTop()){var vt="components:remove",Mt=r.index,kt=t.parent(),Gt=Ge({fromInstance:t},r),fe=t.__isSymbolNested(),Oe=function(pe){var Ue=pe.parent();Ue&&!Ue.__isSymbOvrd(vt)&&pe.remove(Gt)},y=kt!=null&&kt.__isSymbOvrd(vt)?[]:t.__getSymbToUp(h);fe&&(y=kt==null?void 0:kt.__getSymbToUp(Ge(Ge({},h),{changed:vt})),Oe=function(pe){var Ue=pe.components().at(Mt);Ue&&Ue.remove(Ge({fromInstance:kt},Gt))}),!g&&this.__logSymbol("remove",y,{opts:r,removed:t.cid,isSymbNested:fe}),y.forEach(Oe)}}else{var y=this.__getSymbToUp(Ge(Ge({},h),{changed:"components:reset"})),b=t.models;this.__logSymbol("reset",y,{components:b}),y.forEach(function(Ve){var pe=b.map(function(Ue){return Ue.clone({symbol:!0})});Ve.components().reset(pe,Ge({fromInstance:o},e))})}this.__changesUp(l)},n.prototype.initClasses=function(t,e,r){r===void 0&&(r={});var o="change:classes",l=this.get("attributes")||{},f=l.class,d=zo(l,["class"]),h=[this,o,this.initClasses],g=this.get("classes")||f||[],y=(0,w.isString)(g)?g.split(" "):g;this.stopListening.apply(this,h);var b=this.normalizeClasses(y),k=new ao([]);return this.set("classes",k,r),k.add(b),k.on("add remove reset",this.__upSymbCls),f&&b.length&&this.set("attributes",d),this.listenTo.apply(this,h),this},n.prototype.initComponents=function(){var t="change:components",e=[this,t,this.initComponents];this.stopListening.apply(this,e);var r=new Xn([],this.opt);r.parent=this;var o=this.get("components"),l=!this.opt.avoidChildren;return this.set("components",r),l&&o&&r.add((0,w.isFunction)(o)?o(this):o,this.opt),r.on("add remove reset",this.__upSymbComps),this.listenTo.apply(this,e),this},n.prototype.initTraits=function(t){var e=this.em,r="change:traits";this.off(r,this.initTraits),this.__loadTraits();var o=Ge({},this.get("attributes")),l=this.traits;return l.each(function(f){if(!f.changeProp){var d=f.getName(),h=f.getInitValue();d&&h&&(o[d]=h)}}),l.length&&this.set("attributes",o),this.on(r,this.initTraits),t&&e&&e.trigger("component:toggled"),this},n.prototype.initScriptProps=function(){if(!this.opt.temporary){var t="script-props",e=["change:".concat(t),this.initScriptProps];this.off.apply(this,e);var r=this.previous(t)||[],o=this.get(t)||[],l=r.map(function(d){return"change:".concat(d)}).join(" "),f=o.map(function(d){return"change:".concat(d)}).join(" ");l&&this.off(l,this.__scriptPropsChange),f&&this.on(f,this.__scriptPropsChange),this.on.apply(this,e)}},n.prototype.__scriptPropsChange=function(t,e,r){r===void 0&&(r={}),!r.avoidStore&&this.trigger("rerender")},n.prototype.append=function(t,e){e===void 0&&(e={});var r=(0,w.isArray)(t)?Dr([],t,!0):[t],o=r.map(function(f){return(0,w.isString)(f)||f.collection&&f.collection.remove(f,{temporary:!0}),f}),l=this.components().add(o,e);return(0,w.isArray)(l)?l:[l]},n.prototype.components=function(t,e){e===void 0&&(e={});var r=this.get("components");return(0,w.isUndefined)(t)?r:(r.reset(void 0,e),t?this.append(t,e):[])},n.prototype.getChildAt=function(t){return this.components().at(t||0)||void 0},n.prototype.getLastChild=function(){var t=this.components();return t.at(t.length-1)||null},n.prototype.empty=function(t){return t===void 0&&(t={}),this.components().reset(void 0,t),this},n.prototype.parent=function(t){t===void 0&&(t={});var e=this.collection||t.prev&&this.prevColl;return e?e.parent:void 0},n.prototype.parents=function(){var t=this.parent();return t?[t].concat(t.parents()):[]},n.prototype.scriptUpdated=function(){this.set("scriptUpdated",1)},n.prototype.initToolbar=function(){var t=this.em,e=this,r=t&&t.getConfig().stylePrefix||"";if(!e.get("toolbar")&&t){var o=[];e.collection&&o.push({label:t.getIcon("arrowUp"),command:function(l){return l.runCommand("core:component-exit",{force:1})}}),e.get("draggable")&&o.push({attributes:{class:"".concat(r,"no-touch-actions"),draggable:!0},label:t.getIcon("move"),command:"tlb-move"}),e.get("copyable")&&o.push({label:t.getIcon("copy"),command:"tlb-clone"}),e.get("removable")&&o.push({label:t.getIcon("delete"),command:"tlb-delete"}),e.set("toolbar",o)}},n.prototype.__loadTraits=function(t,e){e===void 0&&(e={});var r=t||this.traits;if(!(r instanceof uo)){r=(0,w.isFunction)(r)?r(this):r;var o=new uo([],this.opt);o.setTarget(this),r.length&&(r.forEach(function(l){return l.attributes&&delete l.attributes.value}),o.add(r)),this.set({traits:o},e)}return this},n.prototype.getTraits=function(){return this.__loadTraits(),Dr([],this.traits.models,!0)},n.prototype.setTraits=function(t){var e=(0,w.isArray)(t)?t:[t];return this.set({traits:e}),this.getTraits()},n.prototype.getTrait=function(t){return this.getTraits().filter(function(e){return e.get("id")===t||e.get("name")===t})[0]||null},n.prototype.updateTrait=function(t,e){var r,o=this.getTrait(t);return o&&o.set(e),(r=this.em)===null||r===void 0||r.trigger("component:toggled"),this},n.prototype.getTraitIndex=function(t){var e=this.getTrait(t);return e?this.traits.indexOf(e):-1},n.prototype.removeTrait=function(t){var e=this,r,o=(0,w.isArray)(t)?t:[t],l=o.map(function(h){return e.getTrait(h)}),f=this.traits,d=l.length?f.remove(l):[];return(r=this.em)===null||r===void 0||r.trigger("component:toggled"),(0,w.isArray)(d)?d:[d]},n.prototype.addTrait=function(t,e){var r;e===void 0&&(e={}),this.__loadTraits();var o=this.traits.add(t,e);return(r=this.em)===null||r===void 0||r.trigger("component:toggled"),(0,w.isArray)(o)?o:[o]},n.prototype.normalizeClasses=function(t){var e=[],r=this.em,o=r==null?void 0:r.Selectors;return o?t.models?Dr([],t.models,!0):(t.forEach(function(l){return e.push(o.add(l))}),e):[]},n.prototype.clone=function(t){t===void 0&&(t={});var e=this.em,r=Ge({},this.attributes),o=Ge({},this.opt),l=this.getId(),f=e==null?void 0:e.Css;r.attributes=Ge({},r.attributes),delete r.attributes.id,r.components=[],r.classes=[],r.traits=[],this.__isSymbolTop()&&(t.symbol=!0),this.get("components").each(function(V,$){r.components[$]=V.clone(Ge(Ge({},t),{_inner:1}))}),this.get("traits").each(function(V,$){r.traits[$]=V.clone()}),this.get("classes").each(function(V,$){r.classes[$]=V.get("name")}),r.status="",o.collection=null;var d=new this.constructor(r,o),h="#".concat(d.getId()),g=f?f.getRules("#".concat(l)):[];g.forEach(function(V){var $=V.clone();$.set("selectors",[h]),f.getAll().add($)}),d.set(en,0);var y=this.__getSymbol(),b=this.__getSymbols();!t.symbol&&(y||b)?(d.set(cn,0),d.set(en,0)):y?(y.set(en,Dr(Dr([],y.__getSymbols(),!0),[d],!1)),d.__initSymb()):t.symbol&&(this.__isSymbol()?(this.set(en,Dr(Dr([],b,!0),[d],!1)),d.set(cn,this),d.__initSymb()):t.symbolInv?(this.set(en,[d]),d.set(cn,this),[this,d].map(function(V){return V.__initSymb()})):(d.set(en,[this]),[this,d].map(function(V){return V.__initSymb()}),this.set(cn,d)));var k="component:clone";return e&&e.trigger(k,d),this.trigger(k,d),d},n.prototype.getName=function(t){t===void 0&&(t={});var e=this.em,r=this.attributes,o=r.type,l=r.tagName,f=r.name,d=o||l,h=o?"":l,g="domComponents.names.",y=f&&(e==null?void 0:e.t("".concat(g).concat(f))),b=h&&(e==null?void 0:e.t("".concat(g).concat(h))),k=e&&(e.t("".concat(g).concat(o))||e.t("".concat(g).concat(l))),V=this.get("custom-name");return(t.noCustom?"":V)||y||f||b||(0,Y.capitalize)(h)||k||(0,Y.capitalize)(d)},n.prototype.getIcon=function(){var t=this.get("icon");return t?t+" ":""},n.prototype.toHTML=function(t){t===void 0&&(t={});var e=this,r=[],o=t.tag,l=o||e.get("tagName"),f=e.get("void"),d=t.attributes,h=this.getAttrToHTML();if(delete t.tag,d&&((0,w.isFunction)(d)?h=d(e,h)||{}:(0,Y.isObject)(d)&&(h=d)),t.withProps){var g=this.toJSON();(0,w.forEach)(g,function(Mt,kt){var Gt=["classes","attributes","components"];kt[0]!=="_"&&Gt.indexOf(kt)<0&&(h["data-gjs-".concat(kt)]=(0,w.isArray)(Mt)||(0,Y.isObject)(Mt)?JSON.stringify(Mt):(0,w.isBoolean)(Mt)?"".concat(Mt):Mt)})}for(var y in h){var b=h[y];if(!(0,w.isUndefined)(b)&&b!==null)if((0,w.isBoolean)(b))b&&r.push(y);else{var k="";if(t.altQuoteAttr&&(0,w.isString)(b)&&b.indexOf('"')>=0)k="'".concat(b.replace(/'/g,"'"),"'");else{var V=(0,w.isString)(b)?b.replace(/"/g,"""):b;k='"'.concat(V,'"')}r.push("".concat(y,"=").concat(k))}}var $=r.length?" ".concat(r.join(" ")):"",Q=e.getInnerHTML(t),vt="<".concat(l).concat($).concat(f?"/":"",">").concat(Q);return!f&&(vt+="")),vt},n.prototype.getInnerHTML=function(t){return this.__innerHTML(t)},n.prototype.__innerHTML=function(t){t===void 0&&(t={});var e=this.components();return e.length?e.map(function(r){return r.toHTML(t)}).join(""):this.content},n.prototype.getAttrToHTML=function(){var t=this.getAttributes();return Wo(this.em)&&delete t.style,t},n.prototype.toJSON=function(t){t===void 0&&(t={});var e=F.Model.prototype.toJSON.call(this,t);if(e.attributes=this.getAttributes(),delete e.attributes.class,delete e.toolbar,delete e.traits,delete e.status,delete e.open,delete e._undoexc,delete e.delegate,!t.fromUndo){var r=e[cn],o=e[en];o&&(0,w.isArray)(o)&&(e[en]=o.filter(function(l){return l}).map(function(l){return l.getId?l.getId():l})),r&&!(0,w.isString)(r)&&(e[cn]=r.getId())}return this.em.getConfig().avoidDefaults&&this.getChangedProps(e),e},n.prototype.getChangedProps=function(t){var e=t||F.Model.prototype.toJSON.apply(this),r=(0,w.result)(this,"defaults");return(0,w.forEach)(r,function(o,l){["type"].indexOf(l)===-1&&e[l]===o&&delete e[l]}),(0,w.isEmpty)(e.type)&&delete e.type,(0,w.forEach)(["attributes","style"],function(o){(0,w.isEmpty)(r[o])&&(0,w.isEmpty)(e[o])&&delete e[o]}),(0,w.forEach)(["classes","components"],function(o){(!e[o]||(0,w.isEmpty)(r[o])&&!e[o].length)&&delete e[o]}),e},n.prototype.getId=function(){var t=this.get("attributes")||{};return t.id||this.ccid||this.cid},n.prototype.setId=function(t,e){var r=Ge({},this.get("attributes"));return r.id=t,this.set("attributes",r,e),this},n.prototype.getEl=function(t){var e=this.getView(t);return e&&e.el},n.prototype.getView=function(t){var e=this,r=e.view,o=e.views,l=e.em,f=t||(l==null?void 0:l.getCurrentFrameModel());return f&&(r=o.filter(function(d){return d.frameView===f.view})[0]),r},n.prototype.getCurrentView=function(){var t=this.em.getCurrentFrame(),e=t==null?void 0:t.model;return this.getView(e)},n.prototype.__getScriptProps=function(){var t=this.props(),e=this.get("script-props")||[];return e.reduce(function(r,o){return r[o]=t[o],r},{})},n.prototype.getScriptString=function(t){var e=this,r=t||this.get("script")||"";if(!r)return r;if(this.get("script-props"))r=r.toString().trim();else{if((0,w.isFunction)(r)){var o=r.toString().trim();o=o.slice(o.indexOf("{")+1,o.lastIndexOf("}")),r=o.trim()}var l=this.em.getConfig(),f=na(l.tagVarStart||"{[ "),d=na(l.tagVarEnd||" ]}"),h=new RegExp("".concat(f,"([\\w\\d-]*)").concat(d),"g");r=r.replace(h,function(g,y){e.scriptUpdated();var b=e.attributes[y]||"";return(0,w.isArray)(b)||typeof b=="object"?JSON.stringify(b):b})}return r},n.prototype.emitUpdate=function(t){for(var e,r=[],o=1;o=0&&this.__propSelfToParent({component:this,changed:(e={},e[t]=d,e),options:r[2]||r[1]||{}})},n.prototype.onAll=function(t){return(0,w.isFunction)(t)&&(t(this),this.components().forEach(function(e){return e.onAll(t)})),this},n.prototype.forEachChild=function(t){(0,w.isFunction)(t)&&this.components().forEach(function(e){t(e),e.forEachChild(t)})},n.prototype.remove=function(t){var e=this;t===void 0&&(t={});var r=this.em,o=this.collection,l=function(){o&&o.remove(e,Ge(Ge({},t),{action:"remove-component"})),o||(e.components("",t),e.components().removeChildren(e,void 0,t))},f=Ge({},t);return[this,r].map(function(d){return d.trigger("component:remove:before",e,l,f)}),!f.abort&&l(),this},n.prototype.move=function(t,e){if(e===void 0&&(e={}),t){var r=e.at,o=this.index(),l=t===this.parent(),f=o===r||o===r-1;(!l||!f)&&(l&&r&&r>o&&(e.at=r-1),this.remove({temporary:1}),t.append(this,e),this.emitUpdate())}return this},n.prototype.isInstanceOf=function(t){var e,r,o=(r=(e=this.em)===null||e===void 0?void 0:e.Components.getType(t))===null||r===void 0?void 0:r.model;return o?this instanceof o:!1},n.prototype.isChildOf=function(t){for(var e=(0,w.isString)(t),r=this.parent();r;){if(e){if(r.isInstanceOf(t))return!0}else if(r===t)return!0;r=r.parent()}return!1},n.prototype.resetId=function(t){var e=this.em,r=this.getId();if(!r)return this;var o=n.createId(this);this.setId(o);var l=e==null?void 0:e.Css.getIdRule(r),f=l==null?void 0:l.get("selectors").at(0);return f==null||f.set("name",o),this},n.prototype._getStyleRule=function(t){var e=t===void 0?{}:t,r=e.id,o=this.em,l=r||this.getId();return o==null?void 0:o.Css.getIdRule(l)},n.prototype._getStyleSelector=function(t){var e=this._getStyleRule(t);return e==null?void 0:e.get("selectors").at(0)},n.prototype._idUpdated=function(t,e,r){if(r===void 0&&(r={}),!r.idUpdate){var o=this.ccid,l=(this.get("attributes")||{}).id,f=(this.previous("attributes")||{}).id||o,d=n.getList(this);if(d[l]||!l&&f)return this.setId(f,{idUpdate:!0});delete d[f],d[l]=this,this.ccid=l;var h=this._getStyleSelector({id:f});h&&h.set({name:l,label:l})}},n.getDefaults=function(){return(0,w.result)(this.prototype,"defaults")},n.isComponent=function(t){return{tagName:(0,Y.toLowerCase)(t.tagName)}},n.ensureInList=function(t){var e=n.getList(t),r=t.getId(),o=e[r];if(!o)e[r]=t;else if(o!==t){var l=n.getIncrementId(r,e);t.setId(l),e[l]=t}t.components().forEach(function(f){return n.ensureInList(f)})},n.createId=function(t,e){e===void 0&&(e={});var r=n.getList(t),o=e.idMap,l=o===void 0?{}:o,f=t.get("attributes").id,d;return f?(d=n.getIncrementId(f,r,e),t.setId(d),f!==d&&(l[f]=d)):d=n.getNewId(r),r[d]=t,d},n.getNewId=function(t){for(var e=Object.keys(t).length,r=e.toString().length+2,o=(Math.random()+1.1).toString(36).slice(-r),l="i".concat(o);t[l];)l=n.getNewId(t);return l},n.getIncrementId=function(t,e,r){r===void 0&&(r={});var o=r.keepIds,l=o===void 0?[]:o,f=1,d=t;if(l.indexOf(t)<0)for(;e[d];)f++,d="".concat(t,"-").concat(f);return d},n.getList=function(t){var e=t.opt,r=e===void 0?{}:e,o=r.domc,l=r.em,f=o||(l==null?void 0:l.Components);return f?f.componentsById:{}},n.checkId=function(t,e,r,o){e===void 0&&(e=[]),r===void 0&&(r={}),o===void 0&&(o={});var l=(0,w.isArray)(t)?t:[t],f=o.keepIds,d=f===void 0?[]:f,h=o.idMap,g=h===void 0?{}:h;l.forEach(function(y){y.attributes;var b=y.attributes,k=b===void 0?{}:b,V=y.components,$=k.id;if($&&r[$]&&d.indexOf($)<0){var Q=n.getIncrementId($,r);g[$]=Q,k.id=Q,(0,w.isArray)(e)&&e.forEach(function(vt){var Mt=vt.selectors;Mt.forEach(function(kt,Gt){kt==="#".concat($)&&(Mt[Gt]="#".concat(Q))})})}V&&n.checkId(V,e,r,o)})},n}(No);const qr=Us;var Ra=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Ei=function(){return Ei=Object.assign||function(a){for(var n,t=1,e=arguments.length;t")},n.isComponent=function(t){var e;if(t.nodeType==8)return{type:"comment",content:(e=t.textContent)!==null&&e!==void 0?e:""}},n}(Pi);const Go=Fa;var Vn=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),yr=function(){return yr=Object.assign||function(a){for(var n,t=1,e=arguments.length;t + + `),fallback:" + + `),file:""})},enumerable:!1,configurable:!0}),n.prototype.initialize=function(t,e){a.prototype.initialize.call(this,t,e);var r=this.get("attributes").src;r&&(0,Y.buildBase64UrlFromSvg)((0,w.result)(this,"defaults").src)!==r&&this.set("src",r,{silent:!0})},n.prototype.initToolbar=function(){a.prototype.initToolbar.call(this);var t=this.em;if(t){var e=t.Commands,r="image-editor";if(e.has(r)){for(var o=!1,l=this.get("toolbar"),f=0;f=0)&&delete r.editable})}return r},n}(ki);const Ot=ut;var _t=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Bt=function(){return Bt=Object.assign||function(a){for(var n,t=1,e=arguments.length;t=0},n}(qr);const la=Li;var ua=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),ca=function(){return ca=Object.assign||function(a){for(var n,t=1,e=arguments.length;t=0&&y0&&k=0&&V0&&b<=g,kt=($||Q)&&(vt||Mt);return kt},n.prototype.scrollIntoView=function(t){var e;t===void 0&&(t={});var r=this.isInViewport();if(!r||t.force){var o=this.el;if(t.behavior!=="smooth"){var l=this.getOffsetRect();(e=o.ownerDocument.defaultView)===null||e===void 0||e.scrollTo(0,l.top)}else o.scrollIntoView(Po({behavior:"smooth",block:"nearest"},t))}},n.prototype.reset=function(){var t=this.el;this.el="",this._ensureElement(),this._setData(),(0,Xt.dL)(t,this.el),this.render()},n.prototype._setData=function(){var t=this.model,e=t.components(),r=this;this.$el.data({model:t,collection:e,view:r})},n.prototype._createElement=function(t){return this.createDoc.createElement(t)},n.prototype.renderChildren=function(){this.updateContent();var t=this.getChildrenContainer(),e=this.childrenView||new Vi({collection:this.model.get("components"),config:this.config,componentTypes:this.opts.componentTypes});e.render(t),this.childrenView=e;for(var r=Array.prototype.slice.call(e.el.childNodes),o=0,l=r.length;o0&&o[o.length-1])&&(h[0]===6||h[0]===2)){t=0;continue}if(h[0]===3&&(!o||h[1]>o[0]&&h[1]-1;return!g||y?pn(pn({},o),{reason:pa.TargetReject}):pn(pn({},o),{result:!0})},n.prototype.allById=function(){return this.componentsById},n.prototype.getById=function(t){return this.componentsById[t]||null},n.prototype.destroy=function(){var t,e=this.allById();Object.keys(e).forEach(function(r){return e[r]&&e[r].remove()}),(t=this.componentView)===null||t===void 0||t.remove(),[this.em,this.componentsById,this.componentView].forEach(function(r){return{}})},n}(Tt);const zf=uc;var ll={stylePrefix:"css-",rules:[]};const Yl=ll;var cc=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Wf=Number.MAX_VALUE,fc=function(a){var n=/(-?\d*\.?\d+)\w{0,}/.exec(a);return n?n[0]:""},Kf=function(a){cc(n,a);function n(){var t=a.call(this)||this;return(0,w.bindAll)(t,"sortRules"),t.compCls=[],t.ids=[],t}return n.prototype.buildFromModel=function(t,e){var r=this;e===void 0&&(e={});var o="",l=this.em,f=l&&l.getConfig().avoidInlineStyle,d=t.styleToString(),h=t.classes;this.ids.push("#".concat(t.getId())),h.forEach(function(y){return r.compCls.push(y.getFullName())}),!f&&d&&(o="#".concat(t.getId(),"{").concat(d,"}"));var g=t.components();return g.forEach(function(y){return o+=r.buildFromModel(y,e)}),o},n.prototype.build=function(t,e){var r=this;e===void 0&&(e={});var o=e.json,l=e.em,f=e.cssc||(l==null?void 0:l.Css);this.em=l,this.compCls=[],this.ids=[],this.model=t;var d=[],h=t?this.buildFromModel(t,e):"",g=(0,w.isUndefined)(e.clearStyles)&&l?l.getConfig().clearStyles:e.clearStyles;if(f){var y=e.rules||f.getAll(),b={},k=[];e.onlyMatched&&t&&(0,Y.hasWin)()&&(y=this.matchedRules(t,y)),y.forEach(function(V){var $=V.getAtRule();if($){var Q=b[$];Q?Q.push(V):b[$]=[V];return}var vt=r.buildFromRule(V,k,e);o?d.push(vt):h+=vt}),this.sortMediaObject(b).forEach(function(V){var $="",Q=V.key,vt=V.value;vt.forEach(function(Mt){var kt=r.buildFromRule(Mt,k,e);Mt.get("singleAtRule")?h+="".concat(Q,"{").concat(kt,"}"):$+=kt,o&&d.push(kt)}),$&&(h+="".concat(Q,"{").concat($,"}"))}),l&&g&&y.remove&&y.remove(k)}return o?d.filter(function(V){return V}):h},n.prototype.buildFromRule=function(t,e,r){var o=this,l;r===void 0&&(r={});var f="",d=this.model,h=t.selectorsToString({skipAdd:1}),g=t.get("selectorsAdd"),y=t.get("singleAtRule"),b;if((l=t.get("selectors"))===null||l===void 0||l.forEach(function(V){var $=V.getFullName();(o.compCls.indexOf($)>=0||o.ids.indexOf($)>=0||r.keepUnusedStyles)&&(b=1)}),h&&b||g||y||!d){var k=t.getDeclaration({body:1});k&&(r.json?f=t:f+=k)}else e.push(t);return f},n.prototype.matchedRules=function(t,e){var r=this,o=t.getEl(),l=[];return e.forEach(function(f){try{f.selectorsToString().split(",").some(function(d){return o==null?void 0:o.matches(r.__cleanSelector(d))})&&l.push(f)}catch{}}),t.components().forEach(function(f){l=l.concat(r.matchedRules(f,e))}),l=l.filter(function(f,d){return l.indexOf(f)===d}),l},n.prototype.getQueryLength=function(t){var e=/(-?\d*\.?\d+)\w{0,}/.exec(t);return e?parseFloat(e[1]):Wf},n.prototype.sortMediaObject=function(t){var e=this;t===void 0&&(t={});var r=[];return(0,w.each)(t,function(o,l){return r.push({key:l,value:o})}),r.sort(function(o,l){var f=[o.key,l.key].every(function(g){return g.indexOf("min-width")!==-1}),d=f?o.key:l.key,h=f?l.key:o.key;return e.getQueryLength(d)-e.getQueryLength(h)})},n.prototype.sortRules=function(t,e){var r=function(d){return d.get("mediaText")||""},o=[r(t),r(e)].every(function(d){return d.indexOf("min-width")!==-1}),l=r(o?t:e),f=r(o?e:t);return this.getQueryLength(l)-this.getQueryLength(f)},n.prototype.__cleanSelector=function(t){return t.split(" ").map(function(e){return e.split(":")[0]}).join(" ")},n}(x.Hn);const Gf=Kf;var ul=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),da=function(){return da=Object.assign||function(a){for(var n,t=1,e=arguments.length;t=0});return l},n.prototype.setIdRule=function(t,e,r){e===void 0&&(e={}),r===void 0&&(r={});var o=r.addOpts,l=o===void 0?{}:o,f=r.mediaText,d=r.state||"",h=(0,w.isUndefined)(f)?this.em.getCurrentMedia():f,g=this.em.Selectors,y=g.add({name:t,type:$r.TYPE_ID},l),b=this.add(y,d,h,{},l);return b.setStyle(e,ni(ni({},r),l)),b},n.prototype.getIdRule=function(t,e){e===void 0&&(e={});var r=e.mediaText,o=e.state||"",l=(0,w.isUndefined)(r)?this.em.getCurrentMedia():r,f=this.em.Selectors.get(t,$r.TYPE_ID);return f&&this.get(f,o,l)},n.prototype.setClassRule=function(t,e,r){e===void 0&&(e={}),r===void 0&&(r={});var o=r.state||"",l=r.mediaText||this.em.getCurrentMedia(),f=this.em.Selectors,d=f.add({name:t,type:$r.TYPE_CLASS}),h=this.add(d,o,l);return h.setStyle(e,r),h},n.prototype.getClassRule=function(t,e){e===void 0&&(e={});var r=e.state||"",o=e.mediaText||this.em.getCurrentMedia(),l=this.em.Selectors.get(t,$r.TYPE_CLASS);return l&&this.get(l,r,o)},n.prototype.remove=function(t,e){var r=(0,w.isString)(t)?this.getRules(t):t,o=this.getAll().remove(r,e);return(0,w.isArray)(o)?o:[o]},n.prototype.clear=function(t){return t===void 0&&(t={}),this.getAll().reset([],t),this},n.prototype.getComponentRules=function(t,e){e===void 0&&(e={});var r=e.state,o=e.mediaText,l=e.current;l&&(r=this.em.get("state")||"",o=this.em.getCurrentMedia());var f=t.getId(),d=this.getAll().filter(function(h){return!(0,w.isUndefined)(r)&&h.get("state")!==r||!(0,w.isUndefined)(o)&&h.get("mediaText")!==o?!1:h.getSelectorsString()==="#".concat(f)});return d},n.prototype.render=function(){var t;return(t=this.rulesView)===null||t===void 0||t.remove(),this.rulesView=new Co({collection:this.rules,config:this.config}),this.rulesView.render().el},n.prototype.checkId=function(t,e){e===void 0&&(e={});var r=e.idMap,o=r===void 0?{}:r,l=[];if(!Object.keys(o).length)return l;var f=Array.isArray(t)?t:[t];return f.forEach(function(d){var h=d.selectors;if(h&&h.length==1){var g=h[0];if((0,w.isString)(g)){if(g[0]==="#"){var y=g.substring(1),b=o[y];y&&b&&(h[0]="#".concat(b),l.push(d))}}else if(g.name&&g.type===$r.TYPE_ID){var b=o[g.name];b&&(g.name=b,l.push(d))}}}),l},n.prototype.destroy=function(){var t;this.rules.reset(),this.rules.stopListening(),(t=this.rulesView)===null||t===void 0||t.remove()},n}(Tt);const nn=hc;var cl={appendTo:"",blocks:[],appendOnClick:!1,custom:!1};const vc=cl;var gc=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),mc=function(a){gc(n,a);function n(){return a!==null&&a.apply(this,arguments)||this}return n.prototype.defaults=function(){return{label:"",content:"",media:"",category:"",activate:!1,select:void 0,resetId:!1,disable:!1,onClick:void 0,attributes:{}}},Object.defineProperty(n.prototype,"category",{get:function(){var t=this.get("category");return t instanceof go?t:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parent",{get:function(){return this.collection},enumerable:!1,configurable:!0}),n.prototype.getId=function(){return this.id},n.prototype.getLabel=function(){return this.get("label")},n.prototype.getMedia=function(){return this.get("media")},n.prototype.getContent=function(){return this.get("content")},n.prototype.getCategoryLabel=function(){var t=this.get("category");return(0,w.isFunction)(t==null?void 0:t.get)?t.get("label"):t!=null&&t.label?t==null?void 0:t.label:t},n}(x.Hn);const Hi=mc;var fl=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Ql=function(a){fl(n,a);function n(t,e){var r=a.call(this,t)||this;return r.em=e.em,r.on("add",r.handleAdd),r}return n.prototype.getCategories=function(){return this.em.Blocks.getCategories()},n.prototype.handleAdd=function(t){this.initCategory(t)},n}(To);const is=Ql;Ql.prototype.model=Hi;var as;(function(a){a.add="block:add",a.remove="block:remove",a.removeBefore="block:remove:before",a.update="block:update",a.dragStart="block:drag:start",a.drag="block:drag",a.dragEnd="block:drag:stop",a.custom="block:custom",a.all="block"})(as||(as={}));var ha=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),yc=function(a){ha(n,a);function n(t,e){e===void 0&&(e={});var r=a.call(this,t)||this,o=r.model;return r.em=e.em,r.config=e,r.endDrag=r.endDrag.bind(r),r.ppfx=e.pStylePrefix||"",r.listenTo(o,"destroy remove",r.remove),r.listenTo(o,"change",r.render),r}return n.prototype.events=function(){return{click:"handleClick",mousedown:"startDrag",dragstart:"handleDragStart",drag:"handleDrag",dragend:"handleDragEnd"}},n.prototype.__getModule=function(){return this.em.Blocks},n.prototype.handleClick=function(t){var e=this,r=e.config,o=e.model,l=e.em,f=o.get("onClick")||r.appendOnClick;if(l.trigger("block:click",o,t),f){if((0,w.isFunction)(f))return f(o,l==null?void 0:l.getEditor(),{event:t})}else return;var d=r.getSorter(),h=o.get("content"),g=l.getSelected();d.setDropContent(h);var y,b,k;if(g)if(b=d.validTarget(g.getEl(),h),b.valid)y=g;else{var V=g.parent();V&&(b=d.validTarget(V.getEl(),h),b.valid&&(y=V,k=V.components().indexOf(g)+1))}if(!y){var $=l.getWrapper();b=d.validTarget($.getEl(),h),b.valid&&(y=$)}var Q=y&&y.append(h,{at:k})[0];Q&&l.setSelected(Q,{scroll:1})},n.prototype.startDrag=function(t){var e=this,r=e.config,o=e.em,l=e.model,f=l.get("disable");if(!(t.button!==0||!r.getSorter||this.el.draggable||f)){o.refreshCanvas();var d=r.getSorter();d.__currentBlock=l,d.setDragHelper(this.el,t),d.setDropContent(this.model.get("content")),d.startSort(this.el),(0,Xt.on)(document,"mouseup",this.endDrag)}},n.prototype.handleDragStart=function(t){this.__getModule().__startDrag(this.model,t)},n.prototype.handleDrag=function(t){this.__getModule().__drag(t)},n.prototype.handleDragEnd=function(){this.__getModule().__endDrag()},n.prototype.endDrag=function(){(0,Xt.S1)(document,"mouseup",this.endDrag);var t=this.config.getSorter();t.moved=0,t.endMove()},n.prototype.render=function(){var t,e=this,r=e.em,o=e.el,l=e.$el,f=e.ppfx,d=e.model,h=d.get("disable"),g=d.get("attributes")||{},y=g.class||"",b="".concat(f,"block"),k=r&&r.t("blockManager.labels.".concat(d.id))||d.get("label"),V=d.get("render"),$=d.get("media"),Q=h?"".concat(b,"--disable"):"".concat(f,"four-color-h");l.attr(g),o.className="".concat(y," ").concat(b," ").concat(f,"one-bg ").concat(Q).trim(),o.innerHTML=` + `.concat($?'
').concat($,"
"):"",` +
').concat(k,`
+ `),o.title=g.title||((t=o.textContent)===null||t===void 0?void 0:t.trim()),o.setAttribute("draggable","".concat(!!((0,Y.hasDnd)(r)&&!h)));var vt=V&&V({el:o,model:d,className:b,prefix:f});return vt&&(o.innerHTML=vt),this},n}(x.G7);const pl=yc;var _c=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),ss=function(a,n){return Object.defineProperty?Object.defineProperty(a,"raw",{value:n}):a.raw=n,a},Yf=function(a){_c(n,a);function n(t,e,r){var o=a.call(this,t)||this;o.config=e;var l=e.pStylePrefix||"";return o.em=e.em,o.catName=r,o.pfx=l,o.caretR="fa fa-caret-right",o.caretD="fa fa-caret-down",o.iconClass="".concat(l,"caret-icon"),o.activeClass="".concat(l,"open"),o.className="".concat(l).concat(r,"-category"),o.listenTo(o.model,"change:open",o.updateVisibility),o.model.view=o,o}return n.prototype.events=function(){return{"click [data-title]":"toggle"}},n.prototype.template=function(t){var e=t.pfx,r=t.label,o=t.catName;return st(tu||(tu=ss([` +
+ + `,` +
+
+ `],[` +
+ + `,` +
+
+ `])),e,e,r,e,o)},n.prototype.attributes=function(){return this.model.get("attributes")||{}},n.prototype.updateVisibility=function(){this.model.get("open")?this.open():this.close()},n.prototype.open=function(){this.$el.addClass(this.activeClass),this.getIconEl().className="".concat(this.iconClass," ").concat(this.caretD),this.getTypeEl().style.display=""},n.prototype.close=function(){this.$el.removeClass(this.activeClass),this.getIconEl().className="".concat(this.iconClass," ").concat(this.caretR),this.getTypeEl().style.display="none"},n.prototype.toggle=function(){var t=this.model;t.set("open",!t.get("open"))},n.prototype.getIconEl=function(){return this.iconEl||(this.iconEl=this.el.querySelector(".".concat(this.iconClass))),this.iconEl},n.prototype.getTypeEl=function(){return this.typeEl||(this.typeEl=this.el.querySelector(".".concat(this.pfx).concat(this.catName,"s-c"))),this.typeEl},n.prototype.append=function(t){this.getTypeEl().appendChild(t)},n.prototype.render=function(){var t=this,e=t.em,r=t.el,o=t.$el,l=t.model,f=t.pfx,d=t.catName,h=e.t("".concat(d,"Manager.categories.").concat(l.id))||l.get("label");return r.innerHTML=this.template({pfx:f,label:h,catName:d}),o.addClass(this.className),o.css({order:l.get("order")}),this.updateVisibility(),this},n}(x.G7);const Bi=Yf;var tu,wc=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),ls=function(){return ls=Object.assign||function(a){for(var n,t=1,e=arguments.length;t +
+
+
+ `),this.collection.each(function(l){return t.add(l,r)}),this.append(r);var o="".concat(this.blockContClass,"s ").concat(e,"one-bg ").concat(e,"two-color");return this.$el.addClass(o),this.rendered=!0,this},n}(x.G7);const va=us;var cs=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Qn=function(){return Qn=Object.assign||function(a){for(var n,t=1,e=arguments.length;t',iconSync:'',iconTagOn:'',iconTagOff:'',iconTagRemove:'',componentFirst:!1,custom:!1};const oi=Cc;var ga=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),ma=function(a){ga(n,a);function n(){return a!==null&&a.apply(this,arguments)||this}return n.prototype.defaults=function(){return{name:"",label:""}},n.prototype.getName=function(){return this.get("name")},n.prototype.getLabel=function(){return this.get("label")||this.getName()},n}(x.Hn);const eu=ma;ma.prototype.idAttribute="name";var xc=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Zf=function(a,n){return Object.defineProperty?Object.defineProperty(a,"raw",{value:n}):a.raw=n,a},Sc="contentEditable",Jf=function(a){xc(n,a);function n(t){t===void 0&&(t={});var e=a.call(this,t)||this,r=t.config||{};return e.config=r,e.module=t.module,e.coll=t.coll||null,e.pfx=r.stylePrefix||"",e.ppfx=r.pStylePrefix||"",e.em=r.em,e.listenTo(e.model,"change:active",e.updateStatus),e}return n.prototype.template=function(){var t=this,e=t.pfx,r=t.model,o=t.config,l=r.get("label")||"";return st(ru||(ru=Zf([` + + ',` + $',` + `],[` + + ',` + $',` + `])),e,e,e,l,e,e,o.iconTagRemove)},n.prototype.events=function(){return{"click [data-tag-remove]":"removeTag","click [data-tag-status]":"changeStatus","dblclick [data-tag-name]":"startEditTag","focusout [data-tag-name]":"endEditTag"}},n.prototype.getInputEl=function(){return this.inputEl||(this.inputEl=this.el.querySelector("[data-tag-name]")),this.inputEl},n.prototype.startEditTag=function(){var t=this.em,e=this.getInputEl();e[Sc]="true",e.focus(),t==null||t.setEditing(!0)},n.prototype.endEditTag=function(){var t=this,e=t.model,r=t.em,o=this.getInputEl(),l=o.textContent||"",f=r==null?void 0:r.Selectors;o[Sc]="false",r==null||r.setEditing(!1),f&&f.rename(e,l)!==e&&(o.innerText=e.getLabel())},n.prototype.changeStatus=function(){var t=this.model;t.set("active",!t.getActive())},n.prototype.removeTag=function(){this.module.removeSelected(this.model)},n.prototype.updateStatus=function(){var t=this,e=t.model,r=t.$el,o=t.config,l=o.iconTagOn,f=o.iconTagOff,d=r.find("[data-tag-status]");e.get("active")?(d.html(l),r.removeClass("opac50")):(d.html(f),r.addClass("opac50"))},n.prototype.render=function(){var t=this,e=t.pfx,r=t.ppfx,o=t.$el,l=t.model,f="".concat(e,"tag"),d=["".concat(f," ").concat(r,"three-bg")];return l.get("protected")&&d.push("".concat(f,"-protected")),o.html(this.template()),o.attr("class",d.join(" ")),this.updateStatus(),this},n}(x.G7);const _n=Jf;var ru,Qf=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),fs=function(a,n){return Object.defineProperty?Object.defineProperty(a,"raw",{value:n}):a.raw=n,a},tp=function(a){Qf(n,a);function n(t){t===void 0&&(t={});var e=a.call(this,t)||this;e.config=t.config||{},e.pfx=e.config.stylePrefix||"",e.ppfx=e.config.pStylePrefix||"",e.className=e.pfx+"tags",e.stateInputId=e.pfx+"states",e.stateInputC=e.pfx+"input-c",e.states=e.config.states||[];var r=e.config.em,o=e.collection;e.target=r;var l=r.Selectors;e.module=l,e.em=r,e.componentChanged=(0,w.debounce)(e.componentChanged.bind(e),0),e.checkSync=(0,w.debounce)(e.checkSync.bind(e),0);var f="component:toggled component:update:classes",d="component:update:classes change:state";return e.listenTo(r,f,e.componentChanged),e.listenTo(r,"styleManager:update",e.componentChanged),e.listenTo(r,d,e.__handleStateChange),e.listenTo(r,"styleable:change change:device",e.checkSync),e.listenTo(o,"add",e.addNew),e.listenTo(o,"reset",e.renderClasses),e.listenTo(o,"remove",e.tagRemoved),e.listenTo(l.getAll(),l.events.state,(0,w.debounce)(function(){return e.renderStates()},0)),e.delegateEvents(),e}return n.prototype.template=function(t){var e=t.labelInfo,r=t.labelHead,o=t.iconSync,l=t.iconAdd,f=t.pfx,d=t.ppfx;return st(nu||(nu=fs(['
+
',`
+
+ +
+ + + +
+
+
+
+
+
+
+
+
+ + $',` + +
+
+
',`:
+
+
`],['
+
',`
+
+ +
+ + + +
+
+
+
+
+
+
+
+
+ + $',` + +
+
+
',`:
+
+
`])),f,f,f,f,r,f,f,f,d,d,d,f,d,d,f,d,f,f,f,f,f,l,f,f,o,f,f,e,f)},n.prototype.events=function(){return{"change [data-states]":"stateChanged","click [data-add]":"startNewTag","focusout [data-input]":"endNewTag","keyup [data-input]":"onInputKeyUp","click [data-sync-style]":"syncStyle"}},n.prototype.syncStyle=function(){var t=this.em,e=this.getTarget(),r=t.Css,o={noDisabled:1},l=this.getCommonSelectors({opts:o}),f=t.get("state"),d=t.getCurrentMedia(),h=[],g=r.get(l,f,d)||r.add(l,f,d),y;this.getTargets().forEach(function(b){var k=r.getIdRule(b.getId(),{state:f,mediaText:d});y=k.getStyle(),k.setStyle({}),h.push(k)}),y&&g.addStyle(y),t.trigger("component:toggled"),t.trigger("component:sync-style",{component:e,selectors:l,mediaText:d,rule:g,ruleComponents:h,state:f})},n.prototype.tagRemoved=function(t){this.updateStateVis()},n.prototype.addNew=function(t){this.addToClasses(t)},n.prototype.startNewTag=function(){var t,e;(t=this.$addBtn)===null||t===void 0||t.css({display:"none"}),(e=this.$input)===null||e===void 0||e.show().focus()},n.prototype.endNewTag=function(){var t,e;(t=this.$addBtn)===null||t===void 0||t.css({display:""}),(e=this.$input)===null||e===void 0||e.hide().val("")},n.prototype.onInputKeyUp=function(t){var e;t.keyCode===13?(t.preventDefault(),this.addNewTag((e=this.$input)===null||e===void 0?void 0:e.val())):t.keyCode===27&&this.endNewTag()},n.prototype.checkStates=function(){var t=this.em.getState(),e=this.getStates();e&&e.val(t)},n.prototype.componentChanged=function(t){var e=t===void 0?{}:t,r=e.targets;this.updateSelection(r)},n.prototype.updateSelection=function(t){var e=t||this.getTargets();e=(0,w.isArray)(e)?e:[e];var r=[];return e&&e.length&&(r=this.getCommonSelectors({targets:e}),this.checkSync({validSelectors:r})),this.collection.reset(r),this.updateStateVis(e),this.module.__trgCustom(),r},n.prototype.getCommonSelectors=function(t){var e=t===void 0?{}:t,r=e.targets,o=e.opts,l=o===void 0?{}:o,f=r||this.getTargets();return this.module.__getCommonSelectors(f,l)},n.prototype._commonSelectors=function(){for(var t,e=[],r=0;r',""],['',""])),r,t);else{var g=t==null?void 0:t.getSelectors();if(!g)return"";var y=g.getStyleable(),b=l.get("state"),k=t.getId?st(Tc||(Tc=fs(['',` + #',""],['',` + #',""])),r,t.getName(),r,t.getId()):"";h=this.collection.getFullString(y),h=h?st(Ec||(Ec=fs(['',""],['',""])),r,h):t.get("selectorsAdd")||k,h=d&&k?k:h,h+=b?st(Pc||(Pc=fs([':',""],[':',""])),r,b):"",h=f?f({result:h,state:b,target:t}):h}return h&&'').concat(h,"")},n.prototype.stateChanged=function(t){var e=this.em,r=t.target.value;e.set("state",r)},n.prototype.addNewTag=function(t){var e=t.trim();e&&(this.module.addSelected({label:e}),this.endNewTag())},n.prototype.addToClasses=function(t,e){var r=e,o=this.getClasses(),l=new _n({model:t,config:this.config,coll:this.collection,module:this.module}).render().el;return r?r.appendChild(l):o.append(l),l},n.prototype.renderClasses=function(){var t=this,e=document.createDocumentFragment(),r=this.getClasses();r.empty(),this.collection.each(function(o){return t.addToClasses(o,e)}),r.append(e)},n.prototype.getClasses=function(){return this.$el.find("[data-selectors]")},n.prototype.getStates=function(){if(!this.$states){var t=this.$el.find("[data-states]");this.$states=t[0]&&t}return this.$states},n.prototype.getStatesC=function(){return this.$statesC||(this.$statesC=this.$el.find("#"+this.stateInputC)),this.$statesC},n.prototype.renderStates=function(){var t=this,e=t.module,r=t.em,o=r.t("selectorManager.emptyState"),l=e.getStates().map(function(d){var h=r.t("selectorManager.states.".concat(d.id))||d.getLabel()||d.id;return'")}).join(""),f=this.getStates();f&&f.html('").concat(l)),this.checkStates()},n.prototype.render=function(){var t=this,e=t.em,r=t.pfx,o=t.ppfx,l=t.config,f=t.$el,d=t.el,h=l.render,g=l.iconSync,y=l.iconAdd,b={iconSync:g,iconAdd:y,labelHead:e.t("selectorManager.label"),labelInfo:e.t("selectorManager.selected"),ppfx:o,pfx:r,el:d};f.html(this.template(b));var k=h&&h(b);return k&&k!==d&&f.empty().append(k),this.$input=f.find("[data-input]"),this.$addBtn=f.find("[data-add]"),this.$classes=f.find("#"+r+"tags-c"),this.$btnSyncEl=f.find("[data-sync-style]"),this.$input.hide(),this.renderStates(),this.renderClasses(),f.attr("class","".concat(this.className," ").concat(o,"one-bg ").concat(o,"two-color")),this},n}(x.G7);const Oc=tp;var nu,ou,Tc,Ec,Pc,ii=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Mo=function(){return Mo=Object.assign||function(a){for(var n,t=1,e=arguments.length;t=0}):e.slice(1).reduce(function(o,l){return t.__common(o,l)},e[0]):[]},n.prototype.__updateSelectedByComponents=function(){this.selected.reset(this.__getCommon())},n}(Tt);const lu=su;var ep={textTags:["br","b","i","u","a","ul","ol"],textTypes:["text","textnode","comment"],parserCss:void 0,parserHtml:void 0,optionsHtml:{htmlType:"text/html",allowScripts:!1,allowUnsafeAttr:!1,allowUnsafeAttrValue:!1,keepEmptyTextNodes:!1}};const ds=ep;var to,Hn={STYLE_RULE:1,CHARSET_RULE:2,IMPORT_RULE:3,MEDIA_RULE:4,FONT_FACE_RULE:5,PAGE_RULE:6,KEYFRAMES_RULE:7,KEYFRAME_RULE:8,NAMESPACE_RULE:10,COUNTER_STYLE_RULE:11,SUPPORTS_RULE:12,DOCUMENT_RULE:13,FONT_FEATURE_VALUES_RULE:14,VIEWPORT_RULE:15,REGION_STYLE_RULE:16},zi=(to={},to[Hn.MEDIA_RULE]="media",to[Hn.FONT_FACE_RULE]="font-face",to[Hn.PAGE_RULE]="page",to[Hn.KEYFRAMES_RULE]="keyframes",to[Hn.COUNTER_STYLE_RULE]="counter-style",to[Hn.SUPPORTS_RULE]="supports",to[Hn.DOCUMENT_RULE]="document",to[Hn.FONT_FEATURE_VALUES_RULE]="font-feature-values",to[Hn.VIEWPORT_RULE]="viewport",to),hs=(0,w.keys)(zi),uu=[Hn.FONT_FACE_RULE,Hn.PAGE_RULE,Hn.COUNTER_STYLE_RULE,Hn.VIEWPORT_RULE],rp=hs.filter(function(a){return uu.indexOf(Number(a))<0}).map(function(a){return zi[a]}).concat(["container","layer"]),vs=uu.map(function(a){return zi[a]}),cu=function(a){a===void 0&&(a="");for(var n=[],t=[],e=a.split(","),r=0,o=e.length;r=0;return y&&(e.singleAtRule=!0),d&&(e.atRuleType=d),h&&(e.selectorsAdd=h),g&&(e.mediaText=g),f&&(a[r-1]=l[0],e.state=f,l.splice(l.length-1,1)),e.selectors=a,e.style=n,e},fu=function(a){var n=a.cssText,t=n===void 0?"":n;return rp.find(function(e){return t.indexOf("@".concat(e))===0})},jc=function(a){for(var n=[],t=a.cssRules||[],e=0,r=t.length;e=0;if(y)f=!0,d=zi[l],h=Dc(o);else if(hs.indexOf("".concat(l))>=0||!l&&fu(o)){var b=jc(o),k=zi[l]||fu(o);h=Dc(o);for(var V=0,$=b.length;V<$;V++){var Q=b[V];h&&(Q.mediaText=h),Q.atRuleType=k}n=n.concat(b)}if(!(!g&&!y)){for(var vt=Lc(o),Mt=cu(g),kt=Mt.add,Gt=Mt.result,fe=void 0,Oe=0,Ve=Gt.length;Oe0&&o[o.length-1])&&(h[0]===6||h[0]===2)){t=0;continue}if(h[0]===3&&(!o||h[1]>o[0]&&h[1]0&&o[o.length-1])&&(h[0]===6||h[0]===2)){t=0;continue}if(h[0]===3&&(!o||h[1]>o[0]&&h[1]0&&o[o.length-1])&&(h[0]===6||h[0]===2)){t=0;continue}if(h[0]===3&&(!o||h[1]>o[0]&&h[1]').concat(r,"")},n.prototype.templateInput=function(t){var e=this.clsField;return'
')},n.prototype.getClbOpts=function(){return{component:this.target,trait:this.model,elInput:this.getInputElem()}},n.prototype.removeView=function(){this.remove(),this.removed()},n.prototype.init=function(){},n.prototype.removed=function(){},n.prototype.onRender=function(t){},n.prototype.onUpdate=function(t){},n.prototype.onEvent=function(t){},n.prototype.onChange=function(t){var e=this.getInputElem();e&&!(0,w.isUndefined)(e.value)&&this.model.set("value",e.value),this.onEvent(xs(xs({},this.getClbOpts()),{event:t}))},n.prototype.getValueForTarget=function(){return this.model.get("value")},n.prototype.setInputValue=function(t){var e=this.getInputElem();e&&(e.value=t)},n.prototype.onValueChange=function(t,e,r){if(r===void 0&&(r={}),r.fromTarget)this.setInputValue(t.get("value")),this.postUpdate();else{var o=this.getValueForTarget();t.setTargetValue(o,r)}},n.prototype.renderLabel=function(){var t=this,e=t.$el,r=t.target,o=this.getLabel(),l=this.templateLabel(r);this.createLabel&&(l=this.createLabel({label:o,component:r,trait:this})||""),e.find("[data-label]").append(l)},n.prototype.getLabel=function(){var t=this.em,e=this.model.attributes,r=e.label,o=e.name;return t.t("traitManager.traits.labels.".concat(o))||(0,Y.capitalize)(r||o).replace(/-/g," ")},n.prototype.getComponent=function(){return this.target},n.prototype.getInputEl=function(){if(!this.$input){var t=this,e=t.em,r=t.model,o=r,l=r.attributes.name,f=o.get("placeholder")||o.get("default")||"",d=o.get("type")||"text",h=o.get("min"),g=o.get("max"),y=this.getModelValue(),b=(0,M.default)('')),k=e.t("traitManager.traits.attributes.".concat(l))||{};b.attr(xs({placeholder:f},k)),(0,w.isUndefined)(y)||(o.set({value:y},{silent:!0}),b.prop("value",y)),h&&b.prop("min",h),g&&b.prop("max",g),this.$input=b}return this.$input.get(0)},n.prototype.getInputElem=function(){var t=this,e=t.input,r=t.$input;return e||r&&r.get&&r.get(0)||this.getElInput()},n.prototype.getModelValue=function(){return this.model.getValue()},n.prototype.getElInput=function(){return this.elInput},n.prototype.renderField=function(){var t=this,e=t.$el,r=t.appendInput,o=t.model,l=e.find("[data-input]"),f=l[l.length-1],d=o.el;d||(d=this.createInput?this.createInput(this.getClbOpts()):this.getInputEl()),(0,w.isString)(d)?(f.innerHTML=d,this.elInput=f.firstChild):(r?f.appendChild(d):f.insertBefore(d,f.firstChild),this.elInput=d),o.el=this.elInput},n.prototype.hasLabel=function(){var t=this.model.attributes.label;return!this.noLabel&&t!==!1},n.prototype.rerender=function(){delete this.model.el,this.render()},n.prototype.postUpdate=function(){this.onUpdate(this.getClbOpts())},n.prototype.render=function(){var t=this,e=t.$el,r=t.pfx,o=t.ppfx,l=t.model,f=l.attributes,d=f.type,h=f.id,g=this.hasLabel&&this.hasLabel(),y="".concat(r,"trait");delete this.$input;var b='
+ `).concat(g?'
'):"",` +
+ `).concat(this.templateInput?(0,w.isFunction)(this.templateInput)?this.templateInput(this.getClbOpts()):this.templateInput:"",` +
+
`);return e.empty().append(b),g&&this.renderLabel(),this.renderField(),this.el.className="".concat(y,"__wrp ").concat(y,"__wrp-").concat(h),this.postUpdate(),this.onRender(this.getClbOpts()),this},n}(x.G7);const i=Ss;Ss.prototype.eventCapture=["change"];var s=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),c=function(a){s(n,a);function n(){return a!==null&&a.apply(this,arguments)||this}return n.prototype.templateInput=function(){return""},n.prototype.onChange=function(){this.handleClick()},n.prototype.handleClick=function(){this.model.runCommand()},n.prototype.renderLabel=function(){this.model.get("label")&&i.prototype.renderLabel.apply(this)},n.prototype.getInputEl=function(){var t=this,e=t.model,r=t.ppfx,o=e.props(),l=o.labelButton,f=o.text,d=o.full,h=l||f,g="".concat(r,"btn"),y='");return y},n}(i);const u=c;c.prototype.eventCapture=["click button"];var p=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),v=function(a){p(n,a);function n(){var t=a!==null&&a.apply(this,arguments)||this;return t.appendInput=!1,t}return n.prototype.templateInput=function(){var t=this,e=t.ppfx,r=t.clsField;return'`)},n.prototype.onChange=function(){this.model.set("value",this.getInputElem().checked)},n.prototype.setInputValue=function(t){var e=this.getInputElem();e&&(e.checked=!!t)},n.prototype.getInputEl=function(){for(var t=[],e=0;e","
","
",""].join(""),f=function(){var J="";if(r)for(var St=1;St<=6;St++)J+="
";return["
","
","
","
","","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
","
",J,"
","
","
","
","
","","
","
","
","","","
","
","
"].join("")}();function d(J,St,W,$t){for(var re=[],be=0;be')}else{var Gr="sp-clear-display";re.push(a("
").append(a('').attr("title",$t.noColorSelectedText)).html())}}return"
"+re.join("")+"
"}function h(){for(var J=0;JMath.abs(Vo-Nu);Pa=Fu?"x":"y"}var p_=!Pa||Pa==="x",d_=!Pa||Pa==="y";p_&&(js=parseFloat(Ye/Zi)),d_&&(Lu=parseFloat((Io-Vo)/Io)),Aa=!1,W.showAlpha||(di=1),Al()},td,ed),Ru?(Vs(Ru),kl(),Pl=W.preferredFormat||ae(Ru).getFormat(),Qp(Ru)):kl(),$t&&nd();function Fe(Ye){return Ye.data&&Ye.data.ignore?(Vs(a(Ye.target).closest(".sp-thumb-el").data("color")),Al()):(Vs(a(Ye.target).closest(".sp-thumb-el").data("color")),Al(),W.hideAfterPaletteSelect&&(Rs(!0),ka())),!1}var pr=r?"mousedown.spectrum":"click.spectrum touchstart.spectrum";Sh.delegate(".sp-thumb-el",pr,Fe),Oh.delegate(".sp-thumb-el:nth-child(1)",pr,{ignore:!0},Fe)}function Ph(){if(be&&window.localStorage){try{var Re=window.localStorage[be].split(",#");Re.length>1&&(delete window.localStorage[be],a.each(Re,function(Fe,pr){Qp(pr)}))}catch{}try{hi=window.localStorage[be].split(";")}catch{}}}function Qp(Re){if(re){var Fe=ae(Re).toRgbString();if(!_f[Fe]&&a.inArray(Fe,hi)===-1)for(hi.push(Fe);hi.length>e_;)hi.shift();if(be&&window.localStorage)try{window.localStorage[be]=hi.join(";")}catch{}}}function a_(){var Re=[];if(W.showPalette)for(var Fe=0;Fewindow.innerWidth-window.scrollX&&be.right-$e>0&&(ze.left-=$e-ze.width),be.bottom+Je"u"){var St=a("")[0];J._cachedResult=St.type==="color"&&St.value!==""}return J._cachedResult},a.spectrum={},a.spectrum.localization={},a.spectrum.palettes={},a.fn.spectrum.processNativeColorInputs=function(){var J=a("input[type=color]");J.length&&!Mt()&&J.spectrum({preferredFormat:"hex6"})};var Gt=/^[\s,#]+/,fe=/\s+$/,Oe=0,Ve=Math,pe=Ve.round,Ue=Ve.min,Ze=Ve.max,hr=Ve.random,ae=function(J,St){if(J=J||"",St=St||{},J instanceof ae)return J;if(!(this instanceof ae))return new ae(J,St);var W=ln(J);this._originalInput=J,this._r=W.r,this._g=W.g,this._b=W.b,this._a=W.a,this._roundA=pe(100*this._a)/100,this._format=St.format||W.format,this._gradientType=St.gradientType,this._r<1&&(this._r=pe(this._r)),this._g<1&&(this._g=pe(this._g)),this._b<1&&(this._b=pe(this._b)),this._ok=W.ok,this._tc_id=Oe++};ae.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var J=this.toRgb();return(J.r*299+J.g*587+J.b*114)/1e3},setAlpha:function(J){return this._a=bh(J),this._roundA=pe(100*this._a)/100,this},toHsv:function(){var J=oo(this._r,this._g,this._b);return{h:J.h*360,s:J.s,v:J.v,a:this._a}},toHsvString:function(){var J=oo(this._r,this._g,this._b),St=pe(J.h*360),W=pe(J.s*100),$t=pe(J.v*100);return this._a==1?"hsv("+St+", "+W+"%, "+$t+"%)":"hsva("+St+", "+W+"%, "+$t+"%, "+this._roundA+")"},toHsl:function(){var J=Yi(this._r,this._g,this._b);return{h:J.h*360,s:J.s,l:J.l,a:this._a}},toHslString:function(){var J=Yi(this._r,this._g,this._b),St=pe(J.h*360),W=pe(J.s*100),$t=pe(J.l*100);return this._a==1?"hsl("+St+", "+W+"%, "+$t+"%)":"hsla("+St+", "+W+"%, "+$t+"%, "+this._roundA+")"},toHex:function(J){return ks(this._r,this._g,this._b,J)},toHexString:function(J){return"#"+this.toHex(J)},toHex8:function(){return Ms(this._r,this._g,this._b,this._a)},toHex8String:function(){return"#"+this.toHex8()},toRgb:function(){return{r:pe(this._r),g:pe(this._g),b:pe(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+pe(this._r)+", "+pe(this._g)+", "+pe(this._b)+")":"rgba("+pe(this._r)+", "+pe(this._g)+", "+pe(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:pe(Lr(this._r,255)*100)+"%",g:pe(Lr(this._g,255)*100)+"%",b:pe(Lr(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+pe(Lr(this._r,255)*100)+"%, "+pe(Lr(this._g,255)*100)+"%, "+pe(Lr(this._b,255)*100)+"%)":"rgba("+pe(Lr(this._r,255)*100)+"%, "+pe(Lr(this._g,255)*100)+"%, "+pe(Lr(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:q0[ks(this._r,this._g,this._b,!0)]||!1},toFilter:function(J){var St="#"+Ms(this._r,this._g,this._b,this._a),W=St,$t=this._gradientType?"GradientType = 1, ":"";if(J){var re=ae(J);W=re.toHex8String()}return"progid:DXImageTransform.Microsoft.gradient("+$t+"startColorstr="+St+",endColorstr="+W+")"},toString:function(J){var St=!!J;J=J||this._format;var W=!1,$t=this._a<1&&this._a>=0,re=!St&&$t&&(J==="hex"||J==="hex6"||J==="hex3"||J==="name");return re?J==="name"&&this._a===0?this.toName():this.toRgbString():(J==="rgb"&&(W=this.toRgbString()),J==="prgb"&&(W=this.toPercentageRgbString()),(J==="hex"||J==="hex6")&&(W=this.toHexString()),J==="hex3"&&(W=this.toHexString(!0)),J==="hex8"&&(W=this.toHex8String()),J==="name"&&(W=this.toName()),J==="hsl"&&(W=this.toHslString()),J==="hsv"&&(W=this.toHsvString()),W||this.toHexString())},_applyModification:function(J,St){var W=J.apply(null,[this].concat([].slice.call(St)));return this._r=W._r,this._g=W._g,this._b=W._b,this.setAlpha(W._a),this},lighten:function(){return this._applyModification(N0,arguments)},brighten:function(){return this._applyModification(F0,arguments)},darken:function(){return this._applyModification(H0,arguments)},desaturate:function(){return this._applyModification(Kp,arguments)},saturate:function(){return this._applyModification(V0,arguments)},greyscale:function(){return this._applyModification(R0,arguments)},spin:function(){return this._applyModification(B0,arguments)},_applyCombination:function(J,St){return J.apply(null,[this].concat([].slice.call(St)))},analogous:function(){return this._applyCombination(G0,arguments)},complement:function(){return this._applyCombination(U0,arguments)},monochromatic:function(){return this._applyCombination($0,arguments)},splitcomplement:function(){return this._applyCombination(K0,arguments)},triad:function(){return this._applyCombination(z0,arguments)},tetrad:function(){return this._applyCombination(W0,arguments)}},ae.fromRatio=function(J,St){if(typeof J=="object"){var W={};for(var $t in J)J.hasOwnProperty($t)&&($t==="a"?W[$t]=J[$t]:W[$t]=Mu(J[$t]));J=W}return ae(J,St)};function ln(J){var St={r:0,g:0,b:0},W=1,$t=!1,re=!1;return typeof J=="string"&&(J=t_(J)),typeof J=="object"&&(J.hasOwnProperty("r")&&J.hasOwnProperty("g")&&J.hasOwnProperty("b")?(St=qi(J.r,J.g,J.b),$t=!0,re=String(J.r).substr(-1)==="%"?"prgb":"rgb"):J.hasOwnProperty("h")&&J.hasOwnProperty("s")&&J.hasOwnProperty("v")?(J.s=Mu(J.s),J.v=Mu(J.v),St=Ea(J.h,J.s,J.v),$t=!0,re="hsv"):J.hasOwnProperty("h")&&J.hasOwnProperty("s")&&J.hasOwnProperty("l")&&(J.s=Mu(J.s),J.l=Mu(J.l),St=ui(J.h,J.s,J.l),$t=!0,re="hsl"),J.hasOwnProperty("a")&&(W=J.a)),W=bh(W),{ok:$t,format:J.format||re,r:Ue(255,Ze(St.r,0)),g:Ue(255,Ze(St.g,0)),b:Ue(255,Ze(St.b,0)),a:W}}function qi(J,St,W){return{r:Lr(J,255)*255,g:Lr(St,255)*255,b:Lr(W,255)*255}}function Yi(J,St,W){J=Lr(J,255),St=Lr(St,255),W=Lr(W,255);var $t=Ze(J,St,W),re=Ue(J,St,W),be,$e,Je=($t+re)/2;if($t==re)be=$e=0;else{var ze=$t-re;switch($e=Je>.5?ze/(2-$t-re):ze/($t+re),$t){case J:be=(St-W)/ze+(St1&&(Gr-=1),Gr<1/6?Vr+(Yr-Vr)*6*Gr:Gr<1/2?Yr:Gr<2/3?Vr+(Yr-Vr)*(2/3-Gr)*6:Vr}if(St===0)$t=re=be=W;else{var Je=W<.5?W*(1+St):W+St-W*St,ze=2*W-Je;$t=$e(ze,Je,J+1/3),re=$e(ze,Je,J),be=$e(ze,Je,J-1/3)}return{r:$t*255,g:re*255,b:be*255}}function oo(J,St,W){J=Lr(J,255),St=Lr(St,255),W=Lr(W,255);var $t=Ze(J,St,W),re=Ue(J,St,W),be,$e,Je=$t,ze=$t-re;if($e=$t===0?0:ze/$t,$t==re)be=0;else{switch($t){case J:be=(St-W)/ze+(St>1)+720)%360;--St;)$t.h=($t.h+re)%360,be.push(ae($t));return be}function $0(J,St){St=St||6;for(var W=ae(J).toHsv(),$t=W.h,re=W.s,be=W.v,$e=[],Je=1/St;St--;)$e.push(ae({h:$t,s:re,v:be})),be=(be+Je)%1;return $e}ae.mix=function(J,St,W){W=W===0?0:W||50;var $t=ae(J).toRgb(),re=ae(St).toRgb(),be=W/100,$e=be*2-1,Je=re.a-$t.a,ze;$e*Je==-1?ze=$e:ze=($e+Je)/(1+$e*Je),ze=(ze+1)/2;var Vr=1-ze,Yr={r:re.r*ze+$t.r*Vr,g:re.g*ze+$t.g*Vr,b:re.b*ze+$t.b*Vr,a:re.a*be+$t.a*(1-be)};return ae(Yr)},ae.readability=function(J,St){var W=ae(J),$t=ae(St),re=W.toRgb(),be=$t.toRgb(),$e=W.getBrightness(),Je=$t.getBrightness(),ze=Math.max(re.r,be.r)-Math.min(re.r,be.r)+Math.max(re.g,be.g)-Math.min(re.g,be.g)+Math.max(re.b,be.b)-Math.min(re.b,be.b);return{brightness:Math.abs($e-Je),color:ze}},ae.isReadable=function(J,St){var W=ae.readability(J,St);return W.brightness>125&&W.color>500},ae.mostReadable=function(J,St){for(var W=null,$t=0,re=!1,be=0;be125&&$e.color>500,ze=3*($e.brightness/125)+$e.color/500;(Je&&!re||Je&&re&&ze>$t||!Je&&!re&&ze>$t)&&(re=Je,$t=ze,W=ae(St[be]))}return W};var Gp=ae.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},q0=ae.hexNames=Y0(Gp);function Y0(J){var St={};for(var W in J)J.hasOwnProperty(W)&&(St[J[W]]=W);return St}function bh(J){return J=parseFloat(J),(isNaN(J)||J<0||J>1)&&(J=1),J}function Lr(J,St){X0(J)&&(J="100%");var W=Z0(J);return J=Ue(St,Ze(0,parseFloat(J))),W&&(J=parseInt(J*St,10)/100),Ve.abs(J-St)<1e-6?1:J%St/parseFloat(St)}function vf(J){return Ue(1,Ze(0,J))}function ci(J){return parseInt(J,16)}function X0(J){return typeof J=="string"&&J.indexOf(".")!=-1&&parseFloat(J)===1}function Z0(J){return typeof J=="string"&&J.indexOf("%")!=-1}function Ls(J){return J.length==1?"0"+J:""+J}function Mu(J){return J<=1&&(J=J*100+"%"),J}function J0(J){return Math.round(parseFloat(J)*255).toString(16)}function Q0(J){return ci(J)/255}var Xi=function(){var J="[-\\+]?\\d+%?",St="[-\\+]?\\d*\\.\\d+%?",W="(?:"+St+")|(?:"+J+")",$t="[\\s|\\(]+("+W+")[,|\\s]+("+W+")[,|\\s]+("+W+")\\s*\\)?",re="[\\s|\\(]+("+W+")[,|\\s]+("+W+")[,|\\s]+("+W+")[,|\\s]+("+W+")\\s*\\)?";return{rgb:new RegExp("rgb"+$t),rgba:new RegExp("rgba"+re),hsl:new RegExp("hsl"+$t),hsla:new RegExp("hsla"+re),hsv:new RegExp("hsv"+$t),hsva:new RegExp("hsva"+re),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}}();function t_(J){J=J.replace(Gt,"").replace(fe,"").toLowerCase();var St=!1;if(Gp[J])J=Gp[J],St=!0;else if(J=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var W;return(W=Xi.rgb.exec(J))?{r:W[1],g:W[2],b:W[3]}:(W=Xi.rgba.exec(J))?{r:W[1],g:W[2],b:W[3],a:W[4]}:(W=Xi.hsl.exec(J))?{h:W[1],s:W[2],l:W[3]}:(W=Xi.hsla.exec(J))?{h:W[1],s:W[2],l:W[3],a:W[4]}:(W=Xi.hsv.exec(J))?{h:W[1],s:W[2],v:W[3]}:(W=Xi.hsva.exec(J))?{h:W[1],s:W[2],v:W[3],a:W[4]}:(W=Xi.hex8.exec(J))?{a:Q0(W[1]),r:ci(W[2]),g:ci(W[3]),b:ci(W[4]),format:St?"name":"hex8"}:(W=Xi.hex6.exec(J))?{r:ci(W[1]),g:ci(W[2]),b:ci(W[3]),format:St?"name":"hex"}:(W=Xi.hex3.exec(J))?{r:ci(W[1]+""+W[1]),g:ci(W[2]+""+W[2]),b:ci(W[3]+""+W[3]),format:St?"name":"hex"}:!1}window.tinycolor=ae,a(function(){a.fn.spectrum.load&&a.fn.spectrum.processNativeColorInputs()})}var C=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),P=function(a){C(n,a);function n(t){t===void 0&&(t={});var e=a.call(this,t)||this,r=t.ppfx||"";return e.opts=t,e.ppfx=r,e.em=t.target||{},!t.onChange&&e.listenTo(e.model,"change:value",e.handleModelChange),e}return n.prototype.template=function(){return'')},n.prototype.inputClass=function(){return"".concat(this.ppfx,"field")},n.prototype.holderClass=function(){return"".concat(this.ppfx,"input-holder")},n.prototype.elementUpdated=function(){this.model.trigger("el:change")},n.prototype.setValue=function(t,e){var r=this.model,o=t||r.get("defaults"),l=this.getInputEl();l&&(l.value=o)},n.prototype.handleModelChange=function(t,e,r){this.setValue(e,r)},n.prototype.handleChange=function(t){t.stopPropagation();var e=this.getInputEl().value;this.__onInputChange(e),this.elementUpdated()},n.prototype.__onInputChange=function(t){this.model.set({value:t},{fromInput:1})},n.prototype.getInputEl=function(){if(!this.inputEl){var t=this,e=t.model,r=t.opts,o=r.type||"text",l=e.get("placeholder")||e.get("defaults")||e.get("default")||"";this.inputEl=(0,M.default)(''))}return this.inputEl.get(0)},n.prototype.render=function(){this.inputEl=null;var t=this.$el;return t.addClass(this.inputClass()),t.html(this.template()),t.find(".".concat(this.holderClass())).append(this.getInputEl()),this},n}(x.G7);const q=P;P.prototype.events={change:"handleChange"};var at=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),bt=function(){return bt=Object.assign||function(a){for(var n,t=1,e=arguments.length;t
+
+
+
+
+
+ `)},n.prototype.inputClass=function(){var t=this.ppfx;return"".concat(t,"field ").concat(t,"field-color")},n.prototype.holderClass=function(){return"".concat(this.ppfx,"input-holder")},n.prototype.remove=function(){return a.prototype.remove.call(this),this.colorEl.spectrum("destroy"),this},n.prototype.handleChange=function(t){t.stopPropagation();var e=t.target.value;(0,w.isUndefined)(e)||this.__onInputChange(e)},n.prototype.__onInputChange=function(t){var e=this,r=e.model,o=e.opts,l=o.onChange,f=t,d=this.getColorEl();if(d){d.spectrum("set",f);var h=d.spectrum("get"),g=f&>(h);g&&(f=g)}l?l(f):r.set({value:f},{fromInput:1})},n.prototype.setValue=function(t,e){e===void 0&&(e={});var r=this.model,o=(0,w.isUndefined)(e.def)?r.get("defaults"):e.def,l=(0,w.isUndefined)(t)?(0,w.isUndefined)(o)?"":o:t,f=this.getInputEl(),d=this.getColorEl(),h=l!="none"?l:"";f.value=l,d.get(0).style.backgroundColor=h,(e.fromTarget||e.fromInput&&!e.avoidStore)&&(d.spectrum("set",h),this.noneColor=l=="none",this.movedColor=h)},n.prototype.getColorEl=function(){var t=this;if(!this.colorEl){var e=this,r=e.em,o=e.model,l=e.opts,f=this.ppfx,d=l.onChange,h=(0,M.default)('
')),g=h.get(0).style,y=r&&r.getConfig&&r.getConfig().colorPicker||{};this.movedColor="";var b=!1,k;this.$el.find("[data-colorp-c]").append(h);var V=function($,Q){Q===void 0&&(Q=!0),d?d($,!Q):(Q&&o.setValueFromInput(0,!1),o.setValueFromInput($,Q))};h.spectrum(bt(bt(bt({color:o.getValue()||!1,containerClassName:"".concat(f,"one-bg ").concat(f,"two-color ").concat(f,"editor-sp"),maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[]},y),o.get("colorPicker")||{}),{move:function($){var Q=gt($);t.movedColor=Q,g.backgroundColor=Q,V(Q,!1)},change:function($){b=!0;var Q=gt($);g.backgroundColor=Q,V(Q),t.noneColor=!1},show:function($){b=!1,t.movedColor="",k=d?o.getValue({noDefault:!0}):gt($)},hide:function(){!b&&(k||d)&&(t.noneColor&&(k=""),g.backgroundColor=k,h.spectrum("set",k),V(k,!1))}})),r&&r.on&&this.listenTo(r,"component:selected",function(){t.movedColor&&V(t.movedColor),b=!0,t.movedColor="",h.spectrum("hide")}),this.colorEl=h}return this.colorEl},n.prototype.render=function(){return q.prototype.render.call(this),this.getColorEl(),this},n}(q);const Ut=It;var Qt=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),se=function(a){Qt(n,a);function n(){return a!==null&&a.apply(this,arguments)||this}return n.prototype.templateInput=function(){return""},n.prototype.getInputEl=function(){if(!this.input){var t=this.model,e=this.getModelValue(),r=new Ut({model:t,target:this.config.em,contClass:this.ppfx+"field-color",ppfx:this.ppfx}),o=r.render();o.setValue(e,{fromTarget:1}),this.input=o.el}return this.input},n}(i);const ye=se;var le=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),we=function(a){le(n,a);function n(t){t===void 0&&(t={});var e=a.call(this,t)||this;return(0,w.bindAll)(e,"moveIncrement","upIncrement"),e.doc=document,e.listenTo(e.model,"change:unit",e.handleModelChange),e}return n.prototype.template=function(){var t=this.ppfx;return` + + +
+
+
+
+ `)},n.prototype.inputClass=function(){var t=this.ppfx;return this.opts.contClass||"".concat(t,"field ").concat(t,"field-integer")},n.prototype.setValue=function(t,e){var r=e||{},o=this.validateInputValue(t,{deepCheck:1}),l={value:o.value,unit:""};(o.unit||o.force)&&(l.unit=o.unit),this.model.set(l,r),r.silent&&this.handleModelChange()},n.prototype.handleChange=function(t){t.stopPropagation(),this.setValue(this.getInputEl().value),this.elementUpdated()},n.prototype.handleUnitChange=function(t){t.stopPropagation();var e=this.getUnitEl().value;this.model.set("unit",e),this.elementUpdated()},n.prototype.handleKeyDown=function(t){t.key==="ArrowUp"&&(t.preventDefault(),this.upArrowClick()),t.key==="ArrowDown"&&(t.preventDefault(),this.downArrowClick())},n.prototype.elementUpdated=function(){this.model.trigger("el:change")},n.prototype.handleModelChange=function(){var t=this.model;this.getInputEl().value=t.get("value");var e=this.getUnitEl();e&&(e.value=t.get("unit")||"")},n.prototype.getUnitEl=function(){if(!this.unitEl){var t=this.model,e=t.get("units")||[];if(e.length){var r=[''];e.forEach(function(l){var f=l==t.get("unit")?"selected":"";r.push(""))});var o=document.createElement("div");o.innerHTML='"),this.unitEl=o.firstChild}}return this.unitEl},n.prototype.upArrowClick=function(){var t=this.model,e=t.get("step"),r=parseFloat(t.get("value"));this.setValue(this.normalizeValue(r+e)),this.elementUpdated()},n.prototype.downArrowClick=function(){var t=this.model,e=t.get("step"),r=parseFloat(t.get("value"));this.setValue(this.normalizeValue(r-e)),this.elementUpdated()},n.prototype.downIncrement=function(t){t.preventDefault(),this.moved=!1;var e=this.model.get("value")||0;e=this.normalizeValue(e),this.current={y:t.pageY,val:e},(0,Xt.on)(this.doc,"mousemove",this.moveIncrement),(0,Xt.on)(this.doc,"mouseup",this.upIncrement)},n.prototype.moveIncrement=function(t){this.moved=!0;var e=this.model,r=e.get("step"),o=this.current,l=this.normalizeValue(o.val+(o.y-t.pageY)*r),f=this.validateInputValue(l),d=f.value,h=f.unit;return this.prValue=d,e.set({value:d,unit:h},{avoidStore:1}),!1},n.prototype.upIncrement=function(){var t=this.model,e=t.get("step");if((0,Xt.S1)(this.doc,"mouseup",this.upIncrement),(0,Xt.S1)(this.doc,"mousemove",this.moveIncrement),this.prValue&&this.moved){var r=this.prValue-e;t.set("value",r,{avoidStore:1}).set("value",r+e),this.elementUpdated()}},n.prototype.normalizeValue=function(t,e){e===void 0&&(e=0);var r=this.model,o=r.get("step"),l=0;if(isNaN(t))return e;if(t=parseFloat(t),Math.floor(t)!==t){var f=o.toString().split(".")[1];l=f?f.length:0}return l?parseFloat(t.toFixed(l)):t},n.prototype.validateInputValue=function(t,e){e===void 0&&(e={});var r=0,o=e||{},l=this.model,f="",d=(0,w.isUndefined)(t)?f:t,h=e.units||l.get("units")||[],g=l.get("unit")||h.length&&h[0]||"",y=(0,w.isUndefined)(e.max)?l.get("max"):e.max,b=(0,w.isUndefined)(e.min)?l.get("min"):e.min,k=!!l.get("limitlessMax"),V=!!l.get("limitlessMin");if(o.deepCheck){var $=l.get("fixedValues")||[];if(d===""&&(g=""),d){var Q=new RegExp("^"+$.join("|"),"g");if($.length&&Q.test(d))d=d.match(Q)[0],g="",r=1;else{var vt=d+"";d+="",d=parseFloat(d.replace(",",".")),d=isNaN(d)?f:d;var Mt=vt.replace(d,"");(0,w.indexOf)(h,Mt)>=0&&(g=Mt)}}}return!k&&!(0,w.isUndefined)(y)&&y!==""&&(d=d>y?y:d),!V&&!(0,w.isUndefined)(b)&&b!==""&&(d=d +
+
+
+
+ `)},n.prototype.getInputEl=function(){if(!this.$input){var t=this,e=t.model,r=t.em,o=e.get("name"),l=e.get("options")||[],f=[],d="",this.$input=(0,M.default)(d);var h=e.getTargetValue(),g=f.indexOf(h)>=0?h:e.get("default");!(0,w.isUndefined)(g)&&this.$input.val(g)}return this.$input.get(0)},n}(i);const kn=wr;var wn=vr(330),jr=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),dn="data-categories",Wr="data-no-categories",Ir=function(a){jr(n,a);function n(t,e){var r=a.call(this,t)||this;r.reuseView=!0,r.renderedCategories=new Map,r.itemsView=e;var o=t.config||{};r.config=o;var l=t.editor;r.em=l;var f=o.pStylePrefix||"";return r.ppfx=f,r.pfx=f+o.stylePrefix||"",r.className="".concat(r.pfx,"traits"),r.traitContClass="".concat(f,"traits-c"),r.classNoCat="".concat(f,"traits-empty-c"),r.catsClass="".concat(f,"trait-categories"),r.collection=new uo([],{em:l}),r.listenTo(l,"component:toggled",r.updatedCollection),r.updatedCollection(),r}return n.prototype.updatedCollection=function(){var t=this,e=t.ppfx,r=t.em,o=r.getSelected();this.el.className="".concat(this.traitContClass,"s ").concat(e,"one-bg ").concat(e,"two-color"),this.collection=(o==null?void 0:o.traits)||new uo([],{em:r}),this.render()},n.prototype.add=function(t,e){var r=this,o=r.config,l=r.renderedCategories,f=this.itemView,d=t.get(this.itemType);this.itemsView&&this.itemsView[d]&&(f=this.itemsView[d]);var h=new f({config:o,model:t,attributes:t.get("attributes")}),g=h.render().el,y=t.parent.initCategory(t);if(y){var b=y.getId(),k=this.getCategoriesEl(),V=l.get(b);!V&&k&&(V=new Bi({model:y},o,"trait").render(),l.set(b,V),k.appendChild(V.el)),V==null||V.append(g);return}e?e.appendChild(g):this.append(g)},n.prototype.getCategoriesEl=function(){return this.catsEl||(this.catsEl=this.el.querySelector("[".concat(dn,"]"))),this.catsEl},n.prototype.getTraitsEl=function(){return this.traitsEl||(this.traitsEl=this.el.querySelector("[".concat(Wr,"]"))),this.traitsEl},n.prototype.append=function(t){var e=this.getTraitsEl();e==null||e.appendChild(t)},n.prototype.render=function(){var t=this,e=this,r=e.el,o=e.ppfx,l=e.catsClass,f=e.traitContClass,d=e.classNoCat,h=document.createDocumentFragment();delete this.catsEl,delete this.traitsEl,this.renderedCategories=new Map,r.innerHTML=` +
+
+ `),this.collection.forEach(function(y){return t.add(y,h)}),this.append(h);var g="".concat(f,"s ").concat(o,"one-bg ").concat(o,"two-color");return this.$el.addClass(g),this.rendered=!0,this},n}(wn.Z);const Mr=Ir;Ir.prototype.itemView=i;var Cr=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),bn=function(a,n,t){if(t||arguments.length===2)for(var e=0,r=n.length,o;e +
+ `).concat(y?' + ').concat(Ue,` + ').concat(Ze,` + `):"",` +
+
+
+ ').concat(hr,` + `).concat(Gt?'').concat(Gt,""):"",` + ').concat(kt,` +
+
+
+
+
+
').concat(b||"",`
+
').concat(pe||"",`
+
+ +
+ `)},Object.defineProperty(n.prototype,"em",{get:function(){return this.module.em},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"ppfx",{get:function(){return this.em.getConfig().stylePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"pfx",{get:function(){return this.config.stylePrefix},enumerable:!1,configurable:!0}),n.prototype.initComponent=function(){var t=this,e=this,r=e.model,o=e.config,l=o.onInit,f=r.components();this.listenTo(f,"remove add reset",this.checkChildren),[["change:status",this.updateStatus],["change:open",this.updateOpening],["change:layerable",this.updateLayerable],["change:style:display",this.updateVisibility],["rerender:layer",this.render],["change:name change:custom-name",this.updateName]].forEach(function(d){return t.listenTo(r,d[0],d[1])}),this.$el.data("model",r),this.$el.data("collection",f),r.viewLayer=this,l.bind(this)({component:r,render:this.__render,listenTo:this.listenTo})},n.prototype.updateName=function(){this.getInputName().innerText=this.model.getName()},n.prototype.getVisibilityEl=function(){return this.getItemContainer().find("[data-toggle-visible]")},n.prototype.updateVisibility=function(){var t=this,e=t.pfx,r=t.model,o=t.module,l="".concat(e,"layer-hidden"),f=!o.isVisible(r),d=f?"addClass":"removeClass";this.$el[d](l),this.getVisibilityEl()[d]("".concat(e,"layer-off"))},n.prototype.toggleVisibility=function(t){t==null||t.stopImmediatePropagation();var e=this,r=e.module,o=e.model;r.setVisible(o,!r.isVisible(o))},n.prototype.handleEdit=function(t){t==null||t.stopPropagation();var e=this,r=e.em,o=e.$el,l=e.clsNoEdit,f=e.clsEdit,d=this.getInputName();d[gd]="true",d.focus(),document.execCommand("selectAll",!1),r.setEditing(!0),o.find(".".concat(this.inputNameCls)).removeClass(l).addClass(f)},n.prototype.handleEditKey=function(t){t.stopPropagation(),((0,Xt.kl)(t)||(0,Xt.r$)(t))&&this.handleEditEnd(t)},n.prototype.handleEditEnd=function(t){t==null||t.stopPropagation();var e=this,r=e.em,o=e.$el,l=e.clsNoEdit,f=e.clsEdit,d=this.getInputName(),h=d.textContent;d.scrollLeft=0,d[gd]="false",this.setName(h,{component:this.model,propName:"custom-name"}),r.setEditing(!1),o.find(".".concat(this.inputNameCls)).addClass(l).removeClass(f),this.updateName()},n.prototype.setName=function(t,e){var r=e.propName;this.model.set(r,t)},n.prototype.getInputName=function(){return this.inputName||(this.inputName=this.el.querySelector(".".concat(this.inputNameCls))),this.inputName},n.prototype.updateOpening=function(){var t=this,e=t.$el,r=t.model,o=t.pfx,l="open",f="".concat(o,"layer-open"),d=this.getCaret();this.module.isOpen(r)?(e.addClass(l),d.addClass(f)):(e.removeClass(l),d.removeClass(f))},n.prototype.toggleOpening=function(t){var e=this,r=e.model,o=e.module;t==null||t.stopImmediatePropagation(),r.get("components").length&&o.setOpen(r,!o.isOpen(r))},n.prototype.handleSelect=function(t){t==null||t.stopPropagation();var e=this,r=e.module,o=e.model;r.setLayerData(o,{selected:!0},{event:t})},n.prototype.handleHover=function(t){t==null||t.stopPropagation();var e=this,r=e.module,o=e.model;r.setLayerData(o,{hovered:!0})},n.prototype.handleHoverOut=function(t){t==null||t.stopPropagation();var e=this,r=e.module,o=e.model;r.setLayerData(o,{hovered:!1})},n.prototype.startSort=function(t){var e,r,o;t.stopPropagation();var l=this,f=l.em,d=l.sorter,h=l.model;if(!(t.button&&t.button!==0)&&d){var g=((r=(e=h.delegate)===null||e===void 0?void 0:e.move)===null||r===void 0?void 0:r.call(e,h))||h;d.onStart=dd(f),d.onMoveClb=hd(f),d.onEndMove=vd(f,[g]);var y=((o=g.viewLayer)===null||o===void 0?void 0:o.el)||t.target;d.startSort(y)}},n.prototype.updateStatus=function(){Hr.prototype.updateStatus.apply(this,[{avoidHover:!this.config.highlightHover,noExtHl:!0}])},n.prototype.getItemContainer=function(){return this.$el.children("[data-toggle-select]")},n.prototype.checkChildren=function(){var t=this,e=t.model,r=t.clsNoChild,o=t.module,l=o.getComponents(e).length,f=this.getItemContainer(),d=f.find(".".concat(this.clsTitle)),h=f.find("[data-count]");d[l?"removeClass":"addClass"](r),h.html("".concat(l||"")),!l&&o.setOpen(e,!1)},n.prototype.getCaret=function(){return(!this.caret||!this.caret.length)&&(this.caret=this.getItemContainer().find(".".concat(this.clsCaret))),this.caret},n.prototype.setRoot=function(t){var e,r=(0,w.isString)(t)?(e=this.em.getWrapper())===null||e===void 0?void 0:e.find(t)[0]:t;r&&(this.stopListening(),this.model=r,this.initComponent(),this._rendered&&this.render())},n.prototype.updateLayerable=function(){var t=this.parentView,e=t||this;e.render()},n.prototype.__clearItems=function(){var t;(t=this.items)===null||t===void 0||t.remove()},n.prototype.remove=function(){for(var t=[],e=0;e + `).concat(this.getPreview(),` + +
+ `).concat(this.getInfo(),` +
+
+ ⨯ +
+ `)},n.prototype.updateTarget=function(t){t&&t.set&&(t.set("attributes",(0,w.clone)(t.get("attributes"))),t.set("src",this.model.get("src")))},n.prototype.getPreview=function(){return""},n.prototype.getInfo=function(){return""},n.prototype.render=function(){var t=this.el;return t.innerHTML=this.template(this,this.model),t.className=this.className,this},n}(x.G7);const uv=lv;var cv=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),bd=function(a,n){return Object.defineProperty?Object.defineProperty(a,"raw",{value:n}):a.raw=n,a},Cd=function(a){cv(n,a);function n(){return a!==null&&a.apply(this,arguments)||this}return n.prototype.getPreview=function(){var t=this,e=t.pfx,r=t.ppfx,o=t.model,l=o.get("src");return st(xd||(xd=bd([` +
+
+ `],[` +
+
+ `])),e,l,e,r)},n.prototype.getInfo=function(){var t=this,e=t.pfx,r=t.model,o=r.get("name"),l=r.get("width"),f=r.get("height"),d=r.get("unitDim"),h=l&&f?"".concat(l,"x").concat(f).concat(d):"";return o=o||r.getFilename(),st(Sd||(Sd=bd([` +
',`
+
',`
+ `],[` +
',`
+
',`
+ `])),e,o,e,h)},n.prototype.init=function(t){var e=this.pfx;this.className+=" ".concat(e,"asset-image")},n.prototype.onClick=function(){var t=this,e=t.model,r=t.pfx,o=this.__getBhv().select,l=this.config.onClick,f=this.collection;f.trigger("deselectAll"),this.$el.addClass(r+"highlight"),(0,w.isFunction)(o)?o(e,!1):(0,w.isFunction)(l)?l(e):this.updateTarget(f.target)},n.prototype.onDblClick=function(){var t=this,e=t.em,r=t.model,o=this.__getBhv().select,l=this.config.onDblClick,f=this.collection,d=f.target,h=f.onSelect;(0,w.isFunction)(o)?o(r,!0):(0,w.isFunction)(l)?l(r):(this.updateTarget(d),e==null||e.Modal.close()),(0,w.isFunction)(h)&&h(r)},n.prototype.onRemove=function(t){t.stopImmediatePropagation(),this.model.collection.remove(this.model)},n}(uv);const fv=Cd;Cd.prototype.events={"click [data-toggle=asset-remove]":"onRemove",click:"onClick",dblclick:"onDblClick"};var xd,Sd,qc=function(){return qc=Object.assign||function(a){for(var n,t=1,e=arguments.length;t +
+ +
+ +
+ + `)),` +
+
+ `).concat(l,` +
+
+
+
+ `)},n.prototype.handleSubmit=function(t){t.preventDefault();var e=this.getAddInput(),r=e&&e.value.trim(),o=this.config.handleAdd;if(r){e.value="";var l=this.getAssetsEl();l&&(l.scrollTop=0),o?o.bind(this)(r):this.options.globalCollection.add(r,{at:0})}},n.prototype.getAssetsEl=function(){return this.el.querySelector(".".concat(this.pfx,"assets"))},n.prototype.getAddInput=function(){return(!this.inputUrl||!this.inputUrl.value)&&(this.inputUrl=this.el.querySelector(".".concat(this.pfx,"add-asset input"))),this.inputUrl},n.prototype.removedAsset=function(t){this.collection.length||this.toggleNoAssets()},n.prototype.addToAsset=function(t){this.collection.length==1&&this.toggleNoAssets(!0),this.addAsset(t)},n.prototype.addAsset=function(t,e){e===void 0&&(e=null);var r=e,o=this.collection,l=this.config,f=new t.typeView({model:t,collection:o,config:l}).render().el;if(r)r.appendChild(f);else{var d=this.getAssetsEl();d&&d.insertBefore(f,d.firstChild)}return f},n.prototype.toggleNoAssets=function(t){t===void 0&&(t=!1);var e=this.$el.find(".".concat(this.pfx,"assets"));if(t)e.empty();else{var r=this.config.noAssets;r&&e.append(r)}},n.prototype.deselectAll=function(){var t=this.pfx;this.$el.find(".".concat(t,"highlight")).removeClass("".concat(t,"highlight"))},n.prototype.renderAssets=function(){var t=this,e=document.createDocumentFragment(),r=this.$el.find(".".concat(this.pfx,"assets"));r.empty(),this.toggleNoAssets(!!this.collection.length),this.collection.each(function(o){return t.addAsset(o,e)}),r.append(e)},n.prototype.render=function(){var t=this.options.fu.render().el;return this.$el.empty(),this.$el.append(t).append(this.template(this)),this.el.className="".concat(this.ppfx,"asset-manager"),this.renderAssets(),this},n}(x.G7);const gv=Pd;Pd.prototype.events={submit:"handleSubmit"};var mv=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),yv=function(a,n){return Object.defineProperty?Object.defineProperty(a,"raw",{value:n}):a.raw=n,a},_v=function(a){mv(n,a);function n(t){t===void 0&&(t={});var e=a.call(this,t)||this;e.options=t;var r=t.config||{};e.module=t.module,e.config=r,e.em=e.config.em,e.pfx=r.stylePrefix||"",e.ppfx=r.pStylePrefix||"",e.target=e.options.globalCollection||{},e.uploadId=e.pfx+"uploadFile",e.disabled=r.disableUpload!==void 0?r.disableUpload:!r.upload&&!r.embedAsBase64,e.multiUpload=r.multiUpload!==void 0?r.multiUpload:!0;var o=r.uploadFile;return o?e.uploadFile=o.bind(e):!r.upload&&r.embedAsBase64&&(e.uploadFile=n.embedAsBase64),e.delegateEvents(),e}return n.prototype.template=function(t){var e=t.pfx,r=t.title,o=t.uploadId,l=t.disabled,f=t.multiUpload;return st(Ad||(Ad=yv([` +
+
',`
+ +
+
+ `],[` +
+
',`
+ +
+
+ `])),e,r,o,l?"disabled":"",f?"multiple":"")},n.prototype.events=function(){return{"change [data-input]":"uploadFile"}},n.prototype.onUploadStart=function(){var t=this.module;t==null||t.__propEv(t.events.uploadStart)},n.prototype.onUploadEnd=function(t){var e=this,r=e.$el,o=e.module;o==null||o.__propEv(o.events.uploadEnd,t);var l=r.find("input");l&&l.val("")},n.prototype.onUploadError=function(t){var e=this.module;console.error(t),this.onUploadEnd(t),e==null||e.__propEv(e.events.uploadError,t)},n.prototype.onUploadResponse=function(t,e){var r=this,o=r.module,l=r.config,f=r.target,d;try{d=typeof t=="string"?JSON.parse(t):t}catch{d=t}o==null||o.__propEv(o.events.uploadResponse,d),l.autoAdd&&f&&f.add(d.data,{at:0}),this.onUploadEnd(t),e==null||e(d)},n.prototype.uploadFile=function(t,e){var r=this,o=t.dataTransfer?t.dataTransfer.files:t.target.files,l=this.config,f=l.beforeUpload,d=f&&f(o);if(d!==!1){var h=new FormData,g=l.params,y=l.customFetch,b=l.fetchOptions;for(var k in g)h.append(k,g[k]);if(this.multiUpload)for(var V=0;V"u"&&(Q[vt]="XMLHttpRequest"),$){this.onUploadStart();var Mt={method:"post",credentials:l.credentials||"include",headers:Q,body:h},kt=(b==null?void 0:b(Mt))||Mt,Gt=y?y($,kt):vl($,kt).then(function(fe){return(fe.status/200|0)==1?fe.text():fe.text().then(function(Oe){return Promise.reject(Oe)})});return Gt.then(function(fe){return r.onUploadResponse(fe,e)}).catch(function(fe){return r.onUploadError(fe)})}}},n.prototype.initDrop=function(){var t=this;if(!this.uploadForm){this.uploadForm=this.$el.find("form").get(0);var e=this.uploadForm;"draggable"in e&&(this.uploadForm.ondragover=function(){return e.className=t.pfx+"hover",!1},this.uploadForm.ondragleave=function(){return e.className="",!1},this.uploadForm.ondrop=function(r){e.className="",r.preventDefault(),t.uploadFile(r)})}},n.prototype.initDropzone=function(t){var e=this,r=0,o=this.config,l=t.model,f=t.el,d=l.Editor,h=l.Canvas.getBody(),g=this.ppfx,y="".concat(g,"dropzone-active"),b="".concat(g,"dropzone"),k=function(){f.className=f.className.replace(y,"").trim(),r=0},V=function(){return r||(f.className+=" ".concat(y),r=1),!1},$=function(){return k(),!1},Q=function(vt){if(k(),vt.preventDefault(),vt.stopPropagation(),e.uploadFile(vt),o.openAssetsOnDrop&&d){var Mt=d.getSelected();d.runCommand("open-assets",{target:Mt,onSelect:function(){d.Modal.close(),d.AssetManager.setTarget(null)}})}return!1};t.$el.append('
').concat(o.dropzoneContent,"
")),k(),"draggable"in f&&[f,h].forEach(function(vt){vt.ondragover=V,vt.ondragleave=$,vt.ondrop=Q})},n.prototype.render=function(){var t=this,e=t.$el,r=t.pfx,o=t.em;return e.html(this.template({title:o&&o.t("assetManager.uploadTitle"),uploadId:this.uploadId,disabled:this.disabled,multiUpload:this.multiUpload,pfx:r})),this.initDrop(),e.attr("class",r+"file-uploader"),this},n.embedAsBase64=function(t,e){var r=this,o=t.dataTransfer?t.dataTransfer.files:t.target.files,l={data:[]};if(!FileReader){this.onUploadError(new Error("Unsupported platform, FileReader is not defined"));return}for(var f=[],d=/^(.+)\/(.+)$/,h=function(k){var V=new Promise(function($,Q){var vt=new FileReader;vt.addEventListener("load",function(Mt){var kt,Gt=k.name,fe=d.exec(k.type);if(fe?kt=fe[1]:kt=k.type,kt==="image"){var Oe={src:vt.result,name:Gt,type:kt,height:0,width:0},Ve=new Image;Ve.addEventListener("error",function(pe){Q(pe)}),Ve.addEventListener("load",function(){Oe.height=Ve.height,Oe.width=Ve.width,$(Oe)}),Ve.src=Oe.src}else $(kt?{src:vt.result,name:Gt,type:kt}:vt.result)}),vt.addEventListener("error",function(Mt){Q(Mt)}),vt.addEventListener("abort",function(Mt){Q("Aborted")}),vt.readAsDataURL(k)});f.push(V)},g=0,y=o;g"u"&&(e.at=0),this.all.add(t,e)},n.prototype.get=function(t){return this.all.where({src:t})[0]||null},n.prototype.getAll=function(){return this.all},n.prototype.getAllVisible=function(){return this.assetsVis},n.prototype.remove=function(t,e){return this.__remove(t,e)},n.prototype.store=function(){return this.getProjectData()},n.prototype.load=function(t){return this.loadProjectData(t)},n.prototype.getContainer=function(){var t,e=this.__getBehaviour();return e.container||((t=this.am)===null||t===void 0?void 0:t.el)},n.prototype.getAssetsEl=function(){var t;return(t=this.am)===null||t===void 0?void 0:t.el.querySelector("[data-el=assets]")},n.prototype.render=function(t){if(!this.getConfig().custom){var e=t||this.getAll().models;if(!this.am){var r=this.__viewParams();r.fu=this.FileUploader(),this.am=new gv(yl({},r)),this.am.render()}return this.assetsVis.reset(e),this.getContainer()}},n.prototype.__viewParams=function(){return{collection:this.assetsVis,globalCollection:this.all,config:this.config,module:this,fu:void 0}},n.prototype.addType=function(t,e){this.getAll().addType(t,e)},n.prototype.getType=function(t){return this.getAll().getType(t)},n.prototype.getTypes=function(){return this.getAll().getTypes()},n.prototype.AssetsView=function(){return this.am},n.prototype.FileUploader=function(){return this.fu||(this.fu=new wv(this.__viewParams())),this.fu},n.prototype.onLoad=function(){var t=this;this.getAll().reset(this.config.assets);var e=this,r=e.em,o=e.events;r.Commands.__onRun(xu,function(){return t.__propEv(o.open)}),r.Commands.__onStop(xu,function(){return t.__propEv(o.close)})},n.prototype.postRender=function(t){var e;this.config.dropzone&&((e=this.fu)===null||e===void 0||e.initDropzone(t))},n.prototype.setTarget=function(t){this.assetsVis.target=t},n.prototype.onSelect=function(t){this.assetsVis.onSelect=t},n.prototype.onClick=function(t){this.config.onClick=t},n.prototype.onDblClick=function(t){this.config.onDblClick=t},n.prototype.__propEv=function(t){for(var e,r,o=[],l=1;l0&&(l=t.split(".").reduce(function(f,d){if(!(0,w.isUndefined)(f))return f[d]},o)),l}},n.prototype._debug=function(t,e){e===void 0&&(e={});var r=this,o=r.em,l=r.config;(e.debug||l.debug)&&o&&o.logWarning(t)},n.prototype.destroy=function(){},n}(jt);const Nv=Rv;var Fv=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),li=function(){return li=Object.assign||function(a){for(var n,t=1,e=arguments.length;th+b-e||fg+y-e)return 1},n.prototype.getCurrentPos=function(){var t=this.eventMove,e=(t==null?void 0:t.pageX)||0,r=(t==null?void 0:t.pageY)||0;return{x:e,y:r}},n.prototype.getDim=function(t){var e=this,r=e.em,o=e.canvasRelative,l=r==null?void 0:r.Canvas,f=l?l.getElementOffsets(t):{},d,h,g,y;if(o&&r){var b=l.getElementPos(t,{noScroll:1});d=b.top,h=b.left,g=b.height,y=b.width}else{var k=this.offset(t);d=this.relative?t.offsetTop:k.top-(this.wmargin?-1:1)*this.elT,h=this.relative?t.offsetLeft:k.left-(this.wmargin?-1:1)*this.elL,g=t.offsetHeight,y=t.offsetWidth}return{top:d,left:h,height:g,width:y,offsets:f}},n.prototype.getChildrenDim=function(t){var e=this,r=[];if(!t)return r;var o=this.getTargetModel(t);if(o&&o.view&&!this.ignoreViewChildren){var l=o.getCurrentView?o.getCurrentView():o.view;t=l.getChildrenContainer()}return(0,w.each)(t.children,function(f,d){var h=f,g=(0,Y.getModel)(h,M.default),y=g&&g.index?g.index():d;if(!(!(0,Xt.BM)(h)&&!e.matches(h,e.itemSel))){var b=e.getDim(h),k=e.direction,V;k=="v"?V=!0:k=="h"?V=!1:V=e.isInFlow(h,t),b.dir=V,b.el=h,b.indexEl=y,r.push(b)}}),r},n.prototype.nearBorders=function(t,e,r){var o=!1,l=this.borderOffset,f=e||0,d=r||0,h=t.top,g=t.left,y=t.height,b=t.width;return(h+l>d||d>h+y-l||g+l>f||f>g+b-l)&&(o=!0),o},n.prototype.findPosition=function(t,e,r){for(var o={index:0,indexEl:0,method:"before"},l=0,f=0,d=0,h=0,g=0,y=0,b=0,k,V=0,$=t.length;V<$;V++){k=t[V];var Q=k.top,vt=k.left,Mt=k.height,kt=k.width;if(d=vt+kt,b=Q+Mt,g=vt+kt/2,y=Q+Mt/2,!(f&&vt>f||h&&y>=h||l&&dfe&&(kt.at=g-1))}vt&&(Gt?(delete kt.at,Mt=k.getView().insertComponent(vt,kt)):Mt=b.add(vt,kt)),delete this.dropContent,delete this.prevTarget}else if(l){var Ue=y.dropInfo||(k==null?void 0:k.get("droppable")),Ze=y.dragInfo||(V==null?void 0:V.get("draggable"));!b&&h.push("Target collection not found"),!Q&&Ue&&h.push("Target is not droppable, accepts [".concat(Ue,"]")),!$&&Ze&&h.push("Component not draggable, acceptable by [".concat(Ze,"]")),l.logWarning("Invalid target position",{errors:h,model:V,context:"sorter",target:k})}return l==null||l.trigger("sorter:drag:end",{targetCollection:b,modelToDrop:vt,warns:h,validResult:y,dst:t,srcEl:d}),Mt},n.prototype.rollback=function(t){(0,Xt.S1)(this.getDocuments(),"keydown",this.rollback);var e=t.which||t.keyCode;e==27&&(this.moved=!1,this.endMove())},n}(x.G7);const zv=Uv;var Os=function(){return Os=Object.assign||function(a){for(var n,t=1,e=arguments.length;tkt?Q.h=Math.round(Q.w/kt):Q.w=Math.round(Q.h*kt)}~vt.indexOf("l")&&(Q.l+=o.w-Q.w),~vt.indexOf("t")&&(Q.t+=o.h-Q.h);for(var Gt in Q){var fe=Gt;Q[fe]=parseInt("".concat(Q[fe]),10)}return Q}},a}();const $v=Gv;var qv=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),xp=function(){return xp=Object.assign||function(a){for(var n,t=1,e=arguments.length;t0;for(e in Bn)(!Bn[e]&&Su(t.mods,+e)>-1||Bn[e]&&Su(t.mods,+e)==-1)&&(o=!1);(t.mods.length==0&&!Bn[16]&&!Bn[18]&&!Bn[17]&&!Bn[91]||o)&&t.method(a,t)===!1&&(a.preventDefault?a.preventDefault():a.returnValue=!1,a.stopPropagation&&a.stopPropagation(),a.cancelBubble&&(a.cancelBubble=!0))}}}function eg(a){var n=a.keyCode,t,e=Su(_l,n);if(e>=0&&_l.splice(e,1),(n==93||n==224)&&(n=91),n in Bn){Bn[n]=!1;for(t in Ts)Ts[t]==n&&(Un[t]=!1)}}function rg(){for(ro in Bn)Bn[ro]=!1;for(ro in Ts)Un[ro]=!1}function Un(a,n,t){var e,r;e=Vd(a),t===void 0&&(t=n,n="all");for(var o=0;o1&&(r=Rd(a),a=[a[a.length-1]]),a=a[0],a=Sp(a),a in po||(po[a]=[]),po[a].push({shortcut:e[o],scope:n,method:t,key:e[o],mods:r})}function ng(a,n){var t,e,r=[],o,l,f;for(t=Vd(a),l=0;l1&&(r=Rd(e)),a=e[e.length-1],a=Sp(a),n===void 0&&(n=Op()),!po[a])return;for(o=0;o +
+
').concat(l,`
+
+
+
+
').concat(o,`
+
+
+ + ')},n.prototype.events=function(){return{click:"onClick","click [data-close-modal]":"hide"}},n.prototype.onClick=function(t){var e=this.config.backdrop;e&&t.target===this.el&&this.hide()},n.prototype.getCollector=function(){return this.$collector||(this.$collector=this.$el.find("."+this.pfx+"collector")),this.$collector},n.prototype.getContent=function(){var t=this.pfx;return this.$content||(this.$content=this.$el.find(".".concat(t,"content #").concat(t,"c"))),this.$content},n.prototype.getTitle=function(t){return t===void 0&&(t={}),this.$title||(this.$title=this.$el.find("."+this.pfx+"title")),t.$?this.$title:this.$title.get(0)},n.prototype.updateContent=function(){var t=this.getContent(),e=t.children(),r=this.getCollector(),o=this.model.get("content");e.length&&r.append(e),t.empty().append(o)},n.prototype.updateTitle=function(){var t=this.getTitle({$:!0});t&&t.empty().append(this.model.get("title"))},n.prototype.updateOpen=function(){this.el.style.display=this.model.get("open")?"":"none"},n.prototype.hide=function(){this.model.close()},n.prototype.show=function(){this.model.open()},n.prototype.updateAttr=function(t){var e=this,r=e.pfx,o=e.$el,l=e.el,f=[].slice.call(l.attributes).map(function(d){return d.name});o.removeAttr(f.join(" ")),o.attr(Xc(Xc({},t||{}),{class:"".concat(r,"container ").concat(t&&t.class||"").trim()}))},n.prototype.render=function(){var t=this.$el,e=this.model.toJSON();return e.pfx=this.pfx,e.ppfx=this.ppfx,t.html(this.template(e)),this.updateAttr(),this.updateOpen(),this},n}(Qe);const bg=wg;var Cg=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),xg=function(a){Cg(n,a);function n(t){var e=a.call(this,t,"Modal",vg)||this;return e.model=new yg(e),e.model.on("change:open",function(r,o){t.trigger("modal:".concat(o?"open":"close"))}),e.model.on("change",(0,w.debounce)(function(){var r=e._evData(),o=e.config.custom;(0,w.isFunction)(o)&&o(r),t.trigger("modal",r)},0)),e}return n.prototype._evData=function(){var t=this,e=this.getTitle(),r=this.getContent(),o=this.model.attributes,l=o.open,f=o.attributes;return{open:l,attributes:f,title:(0,w.isString)(e)?(0,Xt.rw)(e):e,content:(0,w.isString)(r)?(0,Xt.rw)(r):r.get?r.get(0):r,close:function(){t.close()}}},n.prototype.postRender=function(t){var e=t.model.config.el||t.el,r=this.render();r&&(e==null||e.appendChild(r))},n.prototype.open=function(t){t===void 0&&(t={});var e=t.attributes||{};return t.title&&this.setTitle(t.title),t.content&&this.setContent(t.content),this.model.set("attributes",e),this.model.open(),this.modal&&this.modal.updateAttr(e),this},n.prototype.close=function(){return this.model.close(),this},n.prototype.onceClose=function(t){return this.em.once("modal:close",t),this},n.prototype.onceOpen=function(t){return this.em.once("modal:open",t),this},n.prototype.isOpen=function(){return!!this.model.get("open")},n.prototype.setTitle=function(t){return this.model.set("title",t),this},n.prototype.getTitle=function(){return this.model.get("title")},n.prototype.setContent=function(t){return this.model.set("content"," "),this.model.set("content",t),this},n.prototype.getContent=function(){return this.model.get("content")},n.prototype.getContentEl=function(){var t;return(t=this.modal)===null||t===void 0?void 0:t.getContent().get(0)},n.prototype.getModel=function(){return this.model},n.prototype.render=function(){var t;if(!this.config.custom){var e=bg.extend(this.config.extend),r=this.modal&&this.modal.el;return this.modal=new e({el:r,model:this.model,config:this.config}),(t=this.modal)===null||t===void 0?void 0:t.render().el}},n.prototype.destroy=function(){var t;(t=this.modal)===null||t===void 0||t.remove()},n}(jt);const Sg=xg;var Fd="sw-visibility",Hd="export-template",Bd="open-sm",Ud="open-tm",zd="open-layers",Wd="open-blocks",Ep="fullscreen",Pp="preview",Og={stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{}]},{id:"options",buttons:[{active:!0,id:Fd,className:"fa fa-square-o",command:"core:component-outline",context:Fd,attributes:{title:"View components"}},{id:Pp,className:"fa fa-eye",command:Pp,context:Pp,attributes:{title:"Preview"}},{id:Ep,className:"fa fa-arrows-alt",command:Ep,context:Ep,attributes:{title:"Fullscreen"}},{id:Hd,className:"fa fa-code",command:Hd,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:Bd,className:"fa fa-paint-brush",command:Bd,active:!0,togglable:!1,attributes:{title:"Open Style Manager"}},{id:Ud,className:"fa fa-cog",command:Ud,togglable:!1,attributes:{title:"Settings"}},{id:zd,className:"fa fa-bars",command:zd,togglable:!1,attributes:{title:"Open Layer Manager"}},{id:Wd,className:"fa fa-th-large",command:Wd,togglable:!1,attributes:{title:"Open Blocks"}}]}]};const Ap=Og;var Tg=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Eg=function(a){Tg(n,a);function n(t,e){var r=a.call(this,t,e)||this;return r.get("buttons").length&&r.set("buttons",new $d(r.module,r.get("buttons"))),r}return n.prototype.defaults=function(){return{id:"",label:"",tagName:"span",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,togglable:!0,runDefaultCommand:!0,stopDefaultCommand:!1,disable:!1}},Object.defineProperty(n.prototype,"className",{get:function(){return this.get("className")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"command",{get:function(){return this.get("command")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"active",{get:function(){return this.get("active")},set:function(t){this.set("active",t)},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"togglable",{get:function(){return this.get("togglable")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"runDefaultCommand",{get:function(){return this.get("runDefaultCommand")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"stopDefaultCommand",{get:function(){return this.get("stopDefaultCommand")},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"disable",{get:function(){return this.get("disable")},enumerable:!1,configurable:!0}),n}(te.Z);const Kd=Eg;var Pg=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Gd=function(a){Pg(n,a);function n(t,e){return a.call(this,t,e,Kd)||this}return n.prototype.deactivateAllExceptOne=function(t,e){this.forEach(function(r,o){r!==t&&(r.set("active",!1),e&&r.get("buttons").length&&r.get("buttons").deactivateAllExceptOne(t,e))})},n.prototype.deactivateAll=function(t,e){var r=t||"";this.forEach(function(o){o.get("context")==r&&o!==e&&o.set("active",!1,{fromCollection:!0})})},n.prototype.disableAllButtons=function(t){var e=t||"";this.forEach(function(r,o){r.get("context")==e&&r.set("disable",!0)})},n.prototype.disableAllButtonsExceptOne=function(t,e){this.forEach(function(r,o){r!==t&&(r.set("disable",!0),e&&r.get("buttons").length&&r.get("buttons").disableAllButtonsExceptOne(t,e))})},n}(he);const $d=Gd;Gd.prototype.model=Kd;var Ag=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),kg=function(a){Ag(n,a);function n(t,e){var r=a.call(this,t,e)||this,o=r.get("buttons")||[];return r.buttons=new $d(t,o),r}return n.prototype.defaults=function(){return{id:"",content:"",visible:!0,buttons:[],attributes:{}}},Object.defineProperty(n.prototype,"buttons",{get:function(){return this.get("buttons")},set:function(t){this.set("buttons",t)},enumerable:!1,configurable:!0}),n}(te.Z);const qd=kg;var Mg=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Yd=function(a){Mg(n,a);function n(t,e){return a.call(this,t,e,qd)||this}return n}(he);const Lg=Yd;Yd.prototype.model=qd;var Dg=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),wl=function(){return wl=Object.assign||function(a){for(var n,t=1,e=arguments.length;t +
',`
+
+ + `],[` +
+
',`
+
+
+ `])),e,e,r,e,o,e)},n.prototype.initialize=function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix},n.prototype.render=function(){var t,e,r=this,o=r.model,l=r.pfx,f=r.$el,d=o.toJSON(),h=o.get("input")||((e=(t=o).getElement)===null||e===void 0?void 0:e.call(t));return d.pfx=l,f.html(this.template(d)),f.attr("class","".concat(l,"editor-c")),f.find("#".concat(l,"code")).append(h),this},n}(x.G7);const pm=fm;var Zd,dm=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Zc=function(){return Zc=Object.assign||function(a){for(var n,t=1,e=arguments.length;t=0}))return!1;if((0,w.isBoolean)(l)||(0,w.isArray)(l)&&Jd(o).some(function(d){return l.indexOf(d)>=0}))return!0}return!1},on:function(o,l,f){var d=this;!this.beforeCache&&(this.beforeCache=o.previousAttributes());var h=f||l||{};if(h.noUndo&&setTimeout(function(){d.beforeCache=null}),!Jc(h)){var g=o.toJSON({fromUndo:r}),y={object:o,before:this.beforeCache,after:g};return this.beforeCache=null,(0,w.isEmpty)(g)?void 0:y}}}),e.um.changeUndoType("add",{on:function(o,l,f){if(f===void 0&&(f={}),!(Jc(f)||!e.isRegistered(l)))return{object:l,before:void 0,after:o,options:Ki(Ki({},f),{fromUndo:r})}}}),e.um.changeUndoType("remove",{on:function(o,l,f){if(f===void 0&&(f={}),!(Jc(f)||!e.isRegistered(l)))return{object:l,before:o,after:void 0,options:Ki(Ki({},f),{fromUndo:r})}}}),e.um.changeUndoType("reset",{undo:function(o,l){o.reset(l,{fromUndo:r})},redo:function(o,l,f){o.reset(f,{fromUndo:r})},on:function(o,l){if(l===void 0&&(l={}),!(Jc(l)||!e.isRegistered(o)))return{object:o,before:l.previousModels,after:Cm([],o.models,!0),options:Ki(Ki({},l),{fromUndo:r})}}}),e.um.on("undo redo",function(){t.getSelectedAll().map(function(o){return o.trigger("rerender:layer")})}),["undo","redo"].forEach(function(o){return e.um.on(o,function(){return t.trigger(o)})}),e}return n.prototype.postLoad=function(){var t=this,e=t.config,r=t.em;e.trackSelection&&r&&this.add(r.get("selected"))},n.prototype.add=function(t){return this.um.register(t),this},n.prototype.remove=function(t){return this.um.unregister(t),this},n.prototype.removeAll=function(){return this.um.unregisterAll(),this},n.prototype.start=function(){return this.um.startTracking(),this},n.prototype.stop=function(){return this.um.stopTracking(),this},n.prototype.undo=function(t){t===void 0&&(t=!0);var e=this,r=e.em,o=e.um;return!r.isEditing()&&o.undo(t),this},n.prototype.undoAll=function(){return this.um.undoAll(),this},n.prototype.redo=function(t){t===void 0&&(t=!0);var e=this,r=e.em,o=e.um;return!r.isEditing()&&o.redo(t),this},n.prototype.redoAll=function(){return this.um.redoAll(),this},n.prototype.hasUndo=function(){return!!this.um.isAvailable("undo")},n.prototype.hasRedo=function(){return!!this.um.isAvailable("redo")},n.prototype.isRegistered=function(t){return!!this.getInstance().objectRegistry.isRegistered(t)},n.prototype.getStack=function(){return this.um.stack},n.prototype.getStackGroup=function(){var t=[],e=[];return this.getStack().forEach(function(r){var o=r.get("magicFusionIndex");e.indexOf(o)<0&&(e.push(o),t.push(r))}),t},n.prototype.skip=function(t){var e=!!this.um.isTracking();e&&this.stop(),t(),e&&this.start()},n.prototype.getGroupedStack=function(){var t={},e=this.getStack(),r=function(o,l){var f=o.attributes,d=f.type,h=f.after,g=f.before,y=f.object,b=f.options,k=b===void 0?{}:b;return{index:l,type:d,after:h,before:g,object:y,options:k}};return e.forEach(function(o,l){var f=o.get("magicFusionIndex"),d=r(o,l);t[f]?t[f].push(d):t[f]=[d]}),Object.keys(t).map(function(o){var l=t[o];return{index:l[l.length-1].index,actions:l,labels:(0,w.unique)(l.reduce(function(f,d){var h,g=(h=d.options)===null||h===void 0?void 0:h.action;return g&&f.push(g),f},[]))}})},n.prototype.goToGroup=function(t){var e=this;if(t){var r=this.getPointer(),o=t.index-r;(0,w.times)(Math.abs(o),function(){e[o<0?"undo":"redo"](!1)})}},n.prototype.getPointer=function(){return this.getStack().pointer},n.prototype.clear=function(){return this.um.clear(),this},n.prototype.getInstance=function(){return this.um},n.prototype.destroy=function(){this.clear().removeAll()},n}(jt);const Sm=xm;var Om={stylePrefix:"rte-",adjustToolbar:!0,actions:["bold","italic","underline","strikethrough","link","wrap"],custom:!1};const Tm=Om;var bl=function(){return bl=Object.assign||function(a){for(var n,t=1,e=arguments.length;tB",attributes:{title:"Bold"},result:function(a){return a.exec("bold")}},italic:{name:"italic",icon:"I",attributes:{title:"Italic"},result:function(a){return a.exec("italic")}},underline:{name:"underline",icon:"U",attributes:{title:"Underline"},result:function(a){return a.exec("underline")}},strikethrough:{name:"strikethrough",icon:"S",attributes:{title:"Strike-through"},result:function(a){return a.exec("strikeThrough")}},link:{icon:` + + `,name:"link",attributes:{style:"font-size:1.4rem;padding:0 4px 2px;",title:"Link"},state:function(a){return a&&a.selection()&&tf(a)?Es.ACTIVE:Es.INACTIVE},result:function(a){tf(a)?a.exec("unlink"):a.insertHTML('").concat(a.selection(),""),{select:!0})}},wrap:{name:"wrap",icon:` + + `,attributes:{title:"Wrap for style"},state:function(a){return a!=null&&a.selection()&&tf(a,"SPAN")?Es.DISABLED:Es.INACTIVE},result:function(a){!tf(a,"SPAN")&&a.insertHTML("").concat(a.selection(),""),{select:!0})}}},Em=function(){function a(n,t,e){var r=this;if(e===void 0&&(e={}),this.em=n,this.settings=e,t[Lp])return t[Lp];t[Lp]=this,this.setEl(t),this.updateActiveActions=this.updateActiveActions.bind(this),this.__onKeydown=this.__onKeydown.bind(this),this.__onPaste=this.__onPaste.bind(this);var o=(e.actions||[]).map(function(g){var y=g;return(0,w.isString)(g)?y=bl({},Eu[g]):Eu[g.name]&&(y=bl(bl({},Eu[g.name]),g)),y}),l=o.length?o:Object.keys(Eu).map(function(g){return Eu[g]});e.classes=bl({actionbar:"actionbar",button:"action",active:"active",disabled:"disabled",inactive:"inactive"},e.classes);var f=e.classes,d=e.actionbar;if(this.actionbar=d,this.classes=f,this.actions=l,!d){if(!this.isCustom(e.module)){var h=e.actionbarContainer;d=document.createElement("div"),d.className=f.actionbar,h==null||h.appendChild(d),this.actionbar=d}l.forEach(function(g){return r.addAction(g)})}return e.styleWithCSS&&this.exec("styleWithCSS"),this}return a.prototype.isCustom=function(n){var t=n||this.em.RichTextEditor;return!!(t!=null&&t.config.custom||t!=null&&t.customRte)},a.prototype.destroy=function(){},a.prototype.setEl=function(n){this.el=n,this.doc=n.ownerDocument},a.prototype.updateActiveActions=function(){var n=this,t=this.getActions();t.forEach(function(e){var r=e.update,o=e.btn,l=n.classes,f=l.active,d=l.inactive,h=l.disabled,g=e.state,y=e.name,b=n.doc,k=Qc.INACTIVE;if(o&&(o.className=o.className.replace(f,"").trim(),o.className=o.className.replace(d,"").trim(),o.className=o.className.replace(h,"").trim()),g){var V=g(n,b);if(k=V,o)switch(V){case Es.ACTIVE:o.className+=" ".concat(f);break;case Es.INACTIVE:o.className+=" ".concat(d);break;case Es.DISABLED:o.className+=" ".concat(h);break}}else b.queryCommandSupported(y)&&b.queryCommandState(y)&&(o&&(o.className+=" ".concat(f)),k=Qc.ACTIVE);e.currentState=k,r==null||r(n,e)}),t.length&&this.em.RichTextEditor.__dbdTrgCustom()},a.prototype.enable=function(n){return this.enabled?this:this.__toggleEffects(!0,n)},a.prototype.disable=function(){return this.__toggleEffects(!1)},a.prototype.__toggleEffects=function(n,t){n===void 0&&(n=!1),t===void 0&&(t={});var e=n?Xt.on:Xt.S1,r=this,o=r.el,l=r.doc,f=this.actionbarEl();if(f&&(f.style.display=n?"":"none"),o.contentEditable="".concat(!!n),e(o,"mouseup keyup",this.updateActiveActions),e(l,"keydown",this.__onKeydown),e(l,"paste",this.__onPaste),this.enabled=n,n){var d=t.event;if(this.syncActions(),this.updateActiveActions(),d){var h=null;if(l.caretRangeFromPoint){var g=(0,Xt.VB)(d);h=l.caretRangeFromPoint(g.clientX,g.clientY)}else d.rangeParent&&(h=l.createRange(),h.setStart(d.rangeParent,d.rangeOffset));var y=l.getSelection();y==null||y.removeAllRanges(),h&&(y==null||y.addRange(h))}o.focus()}return this},a.prototype.__onKeydown=function(n){var t=this.em,e=t.RichTextEditor.getConfig().onKeydown;if(e)return e({ev:n,rte:this,editor:t.getEditor()});var r=this.doc,o=["insertOrderedList","insertUnorderedList"];n.key==="Enter"&&!o.some(function(l){return r.queryCommandState(l)})&&(r.execCommand("insertLineBreak"),n.preventDefault())},a.prototype.__onPaste=function(n){var t=this.em,e=t.RichTextEditor.getConfig().onPaste;if(e)return e({ev:n,rte:this,editor:t.getEditor()});var r=n.clipboardData,o=r.getData("text"),l=r.getData("text/html");if(o&&!l){n.preventDefault();var f=o.replace(/(?:\r\n|\r|\n)/g,"
");this.doc.execCommand("insertHTML",!1,f)}},a.prototype.syncActions=function(){var n=this;this.getActions().forEach(function(t){if(n.actionbar&&(!t.state||t.state&&t.state(n,n.doc)>=0)){var e=t.event||"click",r=t.btn;r&&(r["on".concat(e)]=function(){t.result(n,t),n.updateActiveActions()})}})},a.prototype.addAction=function(n,t){t===void 0&&(t={});var e=t.sync,r=this.actionbarEl();if(r){var o=n.icon,l=n.attributes,f=l===void 0?{}:l,d=document.createElement("span");d.className=this.classes.button,n.btn=d;for(var h in f)d.setAttribute(h,f[h]);typeof o=="string"?d.innerHTML=o:d.appendChild(o),r.appendChild(d)}e&&(this.actions.push(n),this.syncActions())},a.prototype.getActions=function(){return this.actions},a.prototype.selection=function(){return this.doc.getSelection()},a.prototype.exec=function(n,t){this.doc.execCommand(n,!1,t)},a.prototype.actionbarEl=function(){return this.actionbar},a.prototype.insertHTML=function(n,t){var e=t===void 0?{}:t,r=e.select,o=this,l=o.em,f=o.doc,d=o.el,h=f.getSelection();if(h&&h.rangeCount){var g=(0,Y.getComponentModel)(d)||l.getSelected(),y=f.createElement("div"),b=h.getRangeAt(0);b.deleteContents(),(0,w.isString)(n)?y.innerHTML=n:n&&y.appendChild(n),Array.prototype.slice.call(y.childNodes).forEach(function(k){b.insertNode(k)}),h.removeAllRanges(),h.addRange(b),d.focus(),r&&g&&(g.once("rte:disable",function(){var k=g.find("[".concat(ef,"]"))[0];k&&(l.setSelected(k),k.removeAttributes(ef))}),g.trigger("disable"))}},a}();const Pm=Em;var Am=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Qd=function(a,n,t,e){function r(o){return o instanceof t?o:new t(function(l){l(o)})}return new(t||(t=Promise))(function(o,l){function f(g){try{h(e.next(g))}catch(y){l(y)}}function d(g){try{h(e.throw(g))}catch(y){l(y)}}function h(g){g.done?o(g.value):r(g.value).then(f,d)}h((e=e.apply(a,n||[])).next())})},th=function(a,n){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},e,r,o,l;return l={next:f(0),throw:f(1),return:f(2)},typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function f(h){return function(g){return d([h,g])}}function d(h){if(e)throw new TypeError("Generator is already executing.");for(;l&&(l=0,h[0]&&(t=0)),t;)try{if(e=1,r&&(o=h[0]&2?r.return:h[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,h[1])).done)return o;switch(r=0,o&&(h=[h[0]&2,o.value]),h[0]){case 0:case 1:o=h;break;case 4:return t.label++,{value:h[1],done:!1};case 5:t.label++,r=h[1],h=[0];continue;case 7:h=t.ops.pop(),t.trys.pop();continue;default:if(o=t.trys,!(o=o.length>0&&o[o.length-1])&&(h[0]===6||h[0]===2)){t=0;continue}if(h[0]===3&&(!o||h[1]>o[0]&&h[1]=0})),vt=this.get("onChange"),Mt={property:this,from:k,to:b,value:g,opts:e};f.__trgEv(f.events.propertyUpdate,Mt),vt&&vt(Mt),Q&&this.__upTargetsStyle((r={},r[d]=g,r),e)},n.prototype.__upTargetsStyle=function(t,e){var r,o=(r=this.em)===null||r===void 0?void 0:r.get("StyleManager");o==null||o.addStyleTargets(zn(zn({},t),{__p:!!e.avoidStore}),e)},n.prototype._up=function(t,e){e===void 0&&(e={}),e.noTarget&&(e.__up=!0);var r=e.partial,o=Fm(e,["partial"]);return t.__p=!!(o.avoidStore||r),this.set(t,zn(zn({},o),{avoidStore:t.__p}))},n.prototype.up=function(t,e){e===void 0&&(e={}),this.set(t,zn(zn({},e),{__up:!0}))},n.prototype.init=function(){},n.prototype.getId=function(){return this.get("id")},n.prototype.getType=function(){return this.get("type")},n.prototype.getName=function(){return this.get("property")},n.prototype.getLabel=function(t){var e;t===void 0&&(t={});var r=t.locale,o=r===void 0?!0:r,l=this.getId(),f=this.get("name")||this.get("label");return o&&((e=this.em)===null||e===void 0?void 0:e.t("styleManager.properties.".concat(l)))||f},n.prototype.getValue=function(t){t===void 0&&(t={});var e=t.noDefault,r=this.get("value");return!this.hasValue()&&!e?this.getDefaultValue():r},n.prototype.hasValue=function(t){t===void 0&&(t={});var e=t.noParent,r=e&&this.getParentTarget(),o=this.get("value");return!(0,w.isUndefined)(o)&&o!==""&&!r},n.prototype.hasValueParent=function(){return this.hasValue()&&!this.hasValue({noParent:!0})},n.prototype.getStyle=function(t){var e;t===void 0&&(t={});var r=this.getName(),o=t.camelCase?(0,Y.camelCase)(r):r;return e={},e[o]=this.__getFullValue(t),e},n.prototype.getDefaultValue=function(){var t=this.get("default");return"".concat((0,w.isUndefined)(t)?this.get("defaults"):t)},n.prototype.upValue=function(t,e){e===void 0&&(e={});var r=t===null||t===""?this.__getClearProps():this.__parseValue(t,e);return this._up(r,e)},n.prototype.isVisible=function(){return!!this.get("visible")},n.prototype.clear=function(t){return t===void 0&&(t={}),this._up(this.__getClearProps(),zn(zn({},t),{__clear:!0})),this},n.prototype.canClear=function(){var t=this.getParent();return t?t.__canClearProp(this):this.hasValue({noParent:!0})},n.prototype.getParent=function(){return this.__getParentProp()},n.prototype.isFull=function(){return!!this.get("full")},n.prototype.__parseValue=function(t,e){return this.parseValue(t,e)},n.prototype.__getClearProps=function(){return{value:""}},n.prototype.setValue=function(t,e,r){e===void 0&&(e=!0),r===void 0&&(r={});var o=this.parseValue(t),l=!e;!l&&this.set({value:void 0},{avoidStore:l,silent:!0}),this.set(o,zn({avoidStore:l},r))},n.prototype.setValueFromInput=function(t,e,r){r===void 0&&(r={}),this.setValue(t,e,zn(zn({},r),{fromInput:1}))},n.prototype.parseValue=function(t,e){e===void 0&&(e={});var r={value:t},o="!important",l=this.get("functionName")||"";if((0,w.isString)(t)&&t.indexOf(o)!==-1&&(r.value=t.replace(o,"").trim(),r.important=!0),!l&&!e.complete)return r;var f=[],d="".concat(r.value).trim(),h=d.indexOf("(")+1,g=l||d.substring(0,h-1);if(g&&(r.functionName=g),!l||d.indexOf("".concat(l,"("))===0){var y=d.lastIndexOf(")");f.push(h),y>=0&&f.push(y),r.value=String.prototype.substring.apply(d,f)}if(e.numeric){var b=parseFloat(r.value);r.unit=r.value.replace(b,""),r.value=b}return r},n.prototype.__getFullValue=function(t){var e=t===void 0?{}:t,r=e.withDefault;return!this.hasValue()&&r?this.getDefaultValue():this.getFullValue()},n.prototype.getFullValue=function(t,e){e===void 0&&(e={});var r=this.get("functionName"),o=this.getDefaultValue(),l=(0,w.isUndefined)(t)?this.get("value"):t,f=!(0,w.isUndefined)(l)&&l!=="";if(l&&o&&l===o)return o;if(r&&f){var d=r==="url"?"'".concat(l.replace(/'|"/g,""),"'"):l;l="".concat(r,"(").concat(d,")")}return f&&this.get("important")&&!e.skipImportant&&(l="".concat(l," !important")),l||""},n.prototype.__setParentTarget=function(t){this.up({parentTarget:t})},n.prototype.getParentTarget=function(){return this.get("parentTarget")||null},n.prototype.__parseFn=function(t){t===void 0&&(t="");var e=t.indexOf("(")+1,r=t.lastIndexOf(")");return{name:t.substring(0,e-1).trim(),value:String.prototype.substring.apply(t,[e,r>=0?r:void 0]).trim()}},n.prototype.__checkVisibility=function(t){var e=t.target,r=t.component,o=t.sectors,l=r||e;if(!l)return!1;var f=this.getId(),d=this.getName(),h=this.get("toRequire"),g=this.get("requires"),y=this.get("requiresParent"),b=l.get("unstylable"),k=l.get("stylable-require"),V=l.get("stylable");if((0,w.isArray)(V)&&(V=V.indexOf(d)>=0),(0,w.isArray)(b)&&(V=b.indexOf(d)<0),h&&(V=!e||k&&(k.indexOf(f)>=0||k.indexOf(d)>=0)),o&&g){var $=(0,w.keys)(g);o.forEach(function(kt){kt.getProperties().forEach(function(Gt){if((0,w.includes)($,Gt.id)){var fe=g[Gt.id];V=V&&(0,w.includes)(fe,Gt.get("value"))}})})}if(y){var Q=r&&r.parent(),vt=Q&&Q.getEl();if(vt){var Mt=(0,Y.hasWin)()?window.getComputedStyle(vt):{};(0,w.each)(y,function(kt,Gt){V=V&&Mt[Gt]&&(0,w.includes)(kt,Mt[Gt])})}else V=!1}return!!V},n}(x.Hn);const xr=jp;jp.callParentInit=function(a,n,t,e){e===void 0&&(e={}),a.prototype.initialize.apply(n,[t,zn(zn({},e),{skipInit:1})])},jp.callInit=function(a,n,t){t===void 0&&(t={}),!t.skipInit&&a.init(n,t)};var Hm=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),rf=function(){return rf=Object.assign||function(a){for(var n,t=1,e=arguments.length;t0},n.prototype.getLayer=function(t){return t===void 0&&(t=0),this.layers.at(t)||void 0},n.prototype.getSelectedLayer=function(){var t=this.get("selectedLayer");return t&&t.getIndex()>=0?t:void 0},n.prototype.selectLayer=function(t){return this.set("selectedLayer",t,{__select:!0})},n.prototype.selectLayerAt=function(t){t===void 0&&(t=0);var e=this.getLayer(t);return e&&this.selectLayer(e)},n.prototype.moveLayer=function(t,e){e===void 0&&(e=0);var r=this.layers,o=t?t.getIndex():-1;o>=0&&(0,w.isNumber)(e)&&e>=0&&e +
+ `)},n.prototype.templateLabel=function(t){var e=this,r=e.pfx,o=e.em,l=t.parent,f=t.attributes,d=f.icon,h=d===void 0?"":d,g=f.info,y=g===void 0?"":g,b=o==null?void 0:o.getConfig().icons,k=(b==null?void 0:b.close)||"";return` + + `).concat(t.getLabel(),` + + `).concat(l?"":'"),` + `)},n.prototype.templateInput=function(t){return` +
+ +
+ `)},n.prototype.remove=function(){var t=this;return x.G7.prototype.remove.apply(this,arguments),["em","input","$input","view"].forEach(function(e){return t[e]=null}),this.__destroyFn(this._getClbOpts()),this},n.prototype.updateStatus=function(){var t,e=this,r=e.model,o=e.pfx,l=e.ppfx,f=e.config,d="".concat(l,"four-color"),h="".concat(l,"color-warn"),g=this.$el.children(".".concat(o,"label")),y=this.getClearEl(),b=y?y.style:{};g.removeClass("".concat(d," ").concat(h)),b.display="none",r.hasValue({noParent:!0})&&f.highlightChanged?(g.addClass(d),f.clearProperties&&(b.display="")):r.hasValue()&&f.highlightComputed&&g.addClass(h),(t=this.parent)===null||t===void 0||t.updateStatus()},n.prototype.clear=function(t){t&&t.stopPropagation(),this.model.clear()},n.prototype.getClearEl=function(){return this.clearEl||(this.clearEl=this.el.querySelector("[".concat(Ip,"]"))),this.clearEl},n.prototype.inputValueChanged=function(t){t&&t.stopPropagation(),!this.emit&&this.model.upValue(t.target.value)},n.prototype.onValueChange=function(t,e,r){this.setValue(this.model.getFullValue(void 0,{skipImportant:!0})),this.updateStatus()},n.prototype.setValue=function(t){var e=this.model,r=(0,w.isUndefined)(t)||t===""?e.getDefaultValue():t;if(this.update)return this.__update(r);this.__setValueInput(r)},n.prototype.__setValueInput=function(t){var e=this.getInputEl();e&&(e.value=t)},n.prototype.getInputEl=function(){return this.input||(this.input=this.el.querySelector("input")),this.input},n.prototype.updateVisibility=function(){this.el.style.display=this.model.isVisible()?"":"none"},n.prototype.clearCached=function(){delete this.clearEl,delete this.input,delete this.$input},n.prototype.__unset=function(){var t=this.unset&&this.unset.bind(this);t&&t(this._getClbOpts())},n.prototype.__update=function(t){var e=this.update&&this.update.bind(this);e&&e(nf(nf({},this._getClbOpts()),{value:t}))},n.prototype.__change=function(){for(var t=[],e=0;e + + + `)},n.prototype.remove=function(){var t;return(t=this.props)===null||t===void 0||t.remove(),Gi.prototype.remove.apply(this,arguments),this},n.prototype.onValueChange=function(){},n.prototype.onRender=function(){var t=this.pfx,e=this.model,r=e.get("properties");if(r.length&&!this.props){var o=e.isDetached(),l=new Vp({config:of(of({},this.config),{highlightComputed:o,highlightChanged:o}),collection:r,parent:this});l.render(),this.$el.find("#".concat(t,"input-holder")).append(l.el),this.props=l}},n.prototype.clearCached=function(){Gi.prototype.clearCached.apply(this,arguments),delete this.props},n}(Gi);const Pu=ay;var sy=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),ly=function(a){sy(n,a);function n(){return a!==null&&a.apply(this,arguments)||this}return n.prototype.events=function(){return{click:"select","click [data-close-layer]":"removeItem","mousedown [data-move-layer]":"initSorter","touchstart [data-move-layer]":"initSorter"}},n.prototype.template=function(){var t=this,e=t.pfx,r=t.ppfx,o=t.em,l=o==null?void 0:o.getConfig().icons,f=(l==null?void 0:l.close)||"",d=(l==null?void 0:l.move)||"";return` +
+
+ `).concat(d,` +
+
+ +
+ `).concat(f,` +
+
+
+ `)},n.prototype.initialize=function(t){t===void 0&&(t={});var e=this.model,r=t.config||{};this.em=r.em,this.config=r,this.sorter=t.sorter,this.pfx=r.stylePrefix||"",this.ppfx=r.pStylePrefix||"",this.propertyView=t.propertyView;var o=this.propertyView.model;this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:values",this.updateLabel),this.listenTo(o,"change:selectedLayer",this.updateVisibility),e.view=this,e.set({droppable:0,draggable:1}),this.$el.data("model",e)},n.prototype.initSorter=function(){var t;(t=this.sorter)===null||t===void 0||t.startSort(this.el)},n.prototype.removeItem=function(t){t&&t.stopPropagation(),this.model.remove()},n.prototype.select=function(){this.model.select()},n.prototype.getPropertiesWrapper=function(){return this.propsWrapEl||(this.propsWrapEl=this.el.querySelector("[data-properties]")),this.propsWrapEl},n.prototype.getPreviewEl=function(){return this.previewEl||(this.previewEl=this.el.querySelector("[data-preview]")),this.previewEl},n.prototype.getLabelEl=function(){return this.labelEl||(this.labelEl=this.el.querySelector("[data-label]")),this.labelEl},n.prototype.updateLabel=function(){var t=this.model,e=t.getLabel();if(this.getLabelEl().innerHTML=e,t.hasPreview()){var r=this.getPreviewEl(),o=t.getStylePreview({number:{min:-3,max:3}}),l=(0,w.keys)(o).map(function(f){return"".concat(f,":").concat(o[f])}).join(";");r.setAttribute("style",l)}},n.prototype.updateVisibility=function(){var t,e=this,r=e.pfx,o=e.model,l=e.propertyView,f=this.getPropertiesWrapper(),d=o.isSelected();f.style.display=d?"":"none",this.$el[d?"addClass":"removeClass"]("".concat(r,"active")),d&&f.appendChild((t=l.props)===null||t===void 0?void 0:t.el)},n.prototype.render=function(){var t=this,e=t.el,r=t.pfx,o=t.model;return e.innerHTML=this.template(),e.className="".concat(r,"layer"),o.hasPreview()&&(e.querySelector("[data-preview-box]").style.display=""),this.updateLabel(),this.updateVisibility(),this},n}(x.G7);const uy=ly;var cy=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),fy=function(a){cy(n,a);function n(t){var e=a.call(this,t)||this,r=e.collection,o=t.config||{},l=o.em,f=o.stylePrefix||"",d=o.pStylePrefix||"";e.config=o,e.pfx=f,e.ppfx=d,e.propertyView=t.propertyView,e.className="".concat(f,"layers ").concat(d,"field"),e.listenTo(r,"add",e.addTo),e.listenTo(r,"reset",e.reset),e.items=[];var h=l==null?void 0:l.Utils;return e.sorter=h?new h.Sorter({container:e.el,ignoreViewChildren:1,containerSel:".".concat(f,"layers"),itemSel:".".concat(f,"layer"),pfx:o.pStylePrefix,em:l}):"",r.view=e,e.$el.data("model",r),e.$el.data("collection",r),e}return n.prototype.addTo=function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},n.prototype.addToCollection=function(t,e,r){var o=e||null,l=this,f=l.propertyView,d=l.config,h=l.sorter,g=l.$el,y=new uy({model:t,config:d,sorter:h,propertyView:f}),b=y.render().el;if(this.items.push(y),o)o.appendChild(b);else if(typeof r<"u"){var k="before";g.children().length===r&&(r--,k="after"),r<0?g.append(b):g.children().eq(r)[k](b)}else g.append(b);return b},n.prototype.reset=function(t,e){this.clearItems(),this.render()},n.prototype.remove=function(){return this.clearItems(),x.G7.prototype.remove.apply(this,arguments),this},n.prototype.clearItems=function(){this.items.forEach(function(t){return t.remove()}),this.items=[]},n.prototype.render=function(){var t=this,e=this,r=e.$el,o=e.sorter,l=document.createDocumentFragment();return r.empty(),this.collection.forEach(function(f){return t.addToCollection(f,l)}),r.append(l),r.attr("class",this.className),o&&(o.plh=null),this},n}(x.G7);const py=fy;var dy=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Sl=function(){return Sl=Object.assign||function(a){for(var n,t=1,e=arguments.length;t + +
+ + `)},n.prototype.init=function(){var t=this.model;this.listenTo(t.layers,"change reset",this.updateStatus),this.listenTo(t,"change:isEmptyValue",this.updateStatus)},n.prototype.addLayer=function(){this.model.addLayer({},{at:0})},n.prototype.setValue=function(){},n.prototype.remove=function(){var t;return(t=this.layersView)===null||t===void 0||t.remove(),Pu.prototype.remove.apply(this,arguments),this},n.prototype.clearCached=function(){Pu.prototype.clearCached.apply(this,arguments),delete this.layersView},n.prototype.onRender=function(){var t=this,e=t.model,r=t.el,o=t.config,l=e.get("properties");if(l.length&&!this.props){var f=new Vp({config:Sl(Sl({},o),{highlightComputed:!1,highlightChanged:!1}),collection:l,parent:this});f.render();var d=new py({collection:e.layers,config:o,propertyView:this});d.render();var h=r.querySelector("[data-layers-wrapper]");h.appendChild(d.el),this.props=f,this.layersView=d}},n}(Pu);const vy=hy;var gy=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),af=function(){return af=Object.assign||function(a){for(var n,t=1,e=arguments.length;t +
+
+ +
+
+
+
+
+
').concat(f,`
+
+ + `)},n.prototype.__setValueInput=function(t){var e=this,r=e.model,o=e.el,l=r.getDefaultValue(),f=o.querySelector("[data-preview-box]"),d=o.querySelector("[data-preview]");f.style.display=!t||t===l?"none":"",d.style.backgroundImage=t||r.getDefaultValue()},n.prototype.openAssetManager=function(){var t=this,e,r=(e=this.em)===null||e===void 0?void 0:e.Assets;r==null||r.open({select:function(o,l){var f=(0,w.isString)(o)?o:o.get("src");t.model.upValue(f,{partial:!l}),l&&r.close()},types:["image"],accept:"image/*"})},n}(Gi);const yy=my;var _y=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),wy=function(a){_y(n,a);function n(){return a!==null&&a.apply(this,arguments)||this}return n.prototype.templateInput=function(t){return""},n.prototype.init=function(){var t=this.model;this.listenTo(t,"change:unit",this.onValueChange),this.listenTo(t,"change:units",this.render)},n.prototype.setValue=function(t){},n.prototype.onRender=function(){var t=this,e=t.ppfx,r=t.model,o=t.el;if(!this.inputInst){var l=r.input;l.ppfx=e,l.render();var f=o.querySelector(".".concat(e,"fields"));f.appendChild(l.el),this.input=l.inputEl.get(0),this.inputInst=l}},n.prototype.clearCached=function(){Gi.prototype.clearCached.apply(this,arguments),this.inputInst=null},n}(Gi);const $i=wy;var by=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Cy=function(a){by(n,a);function n(){return a!==null&&a.apply(this,arguments)||this}return n.prototype.setValue=function(t){var e;(e=this.inputInst)===null||e===void 0||e.setValue(t,{fromTarget:1,def:this.model.getDefaultValue()})},n.prototype.remove=function(){var t=this;$i.prototype.remove.apply(this,arguments);var e=this.inputInst;return e&&e.remove&&e.remove(),["inputInst","$color"].forEach(function(r){return t[r]=null}),this},n.prototype.__handleChange=function(t,e){this.model.upValue(t,{partial:e})},n.prototype.onRender=function(){var t;if(!this.inputInst){this.__handleChange=this.__handleChange.bind(this);var e=this,r=e.ppfx,o=e.model,l=e.em,f=e.el,d=new Ut({target:l,model:o,ppfx:r,onChange:this.__handleChange}),h=d.render();f.querySelector(".".concat(r,"fields")).appendChild(h.el),this.input=(t=h.inputEl)===null||t===void 0?void 0:t.get(0),this.inputInst=h}},n}($i);const xy=Cy;var Sy=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),sf=function(){return sf=Object.assign||function(a){for(var n,t=1,e=arguments.length;t + +
+
+
+ + `)},n.prototype.updateOptions=function(){delete this.input,this.onRender()},n.prototype.onRender=function(){var t=this.pfx,e=this.model,r=e.getOptions();if(!this.input){var o=[];r.forEach(function(f){var d=e.getOptionId(f),h=e.getOptionLabel(d),g=f.style?f.style.replace(/"/g,"""):"",y=g?'style="'.concat(g,'"'):"",b=d.replace(/"/g,""");o.push('"))});var l=this.el.querySelector("#".concat(t,"input-holder"));l.innerHTML=""),this.input=l.firstChild}},n.prototype.__setValueInput=function(t){var e=this.model,r=this.getInputEl(),o=e.getOptions()[0],l=o?e.getOptionId(o):"";r&&(r.value=t||l)},n}(Gi);const ah=Ey;var Py=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),lf=function(){return lf=Object.assign||function(a){for(var n,t=1,e=arguments.length;t')},n.prototype.onRender=function(){var t=this,e=t.pfx,r=t.ppfx,o=this.model,l="".concat(r,"radio-item-label"),f=o.getName(),d=o.getOptions(),h="".concat(e,"radio ").concat(e,"radio-").concat(f),g=o.cid;if(!this.input){var y=[];d.forEach(function(k){var V=k.className?"".concat(k.className," ").concat(e,"icon ").concat(l):"",$=o.getOptionId(k),Q="".concat(f,"-").concat($,"-").concat(g),vt=V?"":o.getOptionLabel($),Mt=k.title?'title="'.concat(k.title,'"'):"",kt=o.getValue()===$?"checked":"";y.push(` +
+ + +
+ `))});var b=this.el.querySelector(".".concat(r,"field"));b.innerHTML='
').concat(y.join(""),"
"),this.input=b.firstChild}},n.prototype.__setValueInput=function(t){var e,r=this.model,o=t||r.getDefaultValue(),l=(e=this.getInputEl())===null||e===void 0?void 0:e.querySelector('[value="'.concat(o,'"]'));l&&(l.checked=!0)},n}(ah);const Dy=Ly;var jy=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Ps=function(){return Ps=Object.assign||function(a){for(var n,t=1,e=arguments.length;t + + + `)},n.prototype.getSliderEl=function(){return this.slider||(this.slider=this.el.querySelector("input[type=range]")),this.slider},n.prototype.inputValueChanged=function(t){t.stopPropagation(),this.model.upValue(this.getSliderEl().value)},n.prototype.inputValueChangedSoft=function(t){t.stopPropagation(),this.model.upValue(this.getSliderEl().value,{partial:!0})},n.prototype.setValue=function(t){var e=this.model,r=e.parseValue(t);this.getSliderEl().value=t===""?e.getDefaultValue():parseFloat(r.value),$i.prototype.setValue.apply(this,arguments)},n.prototype.onRender=function(){$i.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")},n.prototype.clearCached=function(){$i.prototype.clearCached.apply(this,arguments),delete this.slider},n}($i);const By=Hy;var Uy=x.FE.extend(Od),zy=Uy.extend({extendViewApi:1,init:function(){var a=this,n=a.opts,t=a.em,e=n.module||(t==null?void 0:t.get("StyleManager"));e&&(e.__listenAdd(this,e.events.propertyAdd),e.__listenRemove(this,e.events.propertyRemove))},types:[{id:"stack",model:Jm,view:vy,isType:function(a){if(a&&a.type=="stack")return a}},{id:"composite",model:xl,view:Pu,isType:function(a){if(a&&a.type=="composite")return a}},{id:"file",model:xr,view:yy,isType:function(a){if(a&&a.type=="file")return a}},{id:"color",model:xr,view:xy,isType:function(a){if(a&&a.type=="color")return a}},{id:"select",model:Rp,view:ah,isType:function(a){if(a&&a.type=="select")return a}},{id:"radio",model:ky,view:Dy,isType:function(a){if(a&&a.type=="radio")return a}},{id:"slider",model:Ny,view:By,isType:function(a){if(a&&a.type=="slider")return a}},{id:"integer",model:uf,view:$i,isType:function(a){if(a&&a.type=="integer")return a}},{id:"number",model:uf,view:$i,isType:function(a){if(a&&a.type=="number")return a}},{id:"base",model:xr,view:Gi,isType:function(a){return a.type="base",a}}]});const Np=zy;var Wy=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),pf=function(){return pf=Object.assign||function(a){for(var n,t=1,e=arguments.length;t +
$',`
+
',`
+ + `],[` +
+
$',`
+
',`
+
+ `])),d,d,f,d,o)},n.prototype.events=function(){return{"click [data-sector-title]":"toggle"}},n.prototype.updateOpen=function(){var t=this,e=t.$el,r=t.model,o=t.pfx,l=r.isOpen();e[l?"addClass":"removeClass"]("".concat(o,"open")),this.getPropertiesEl().style.display=l?"":"none"},n.prototype.updateVisibility=function(){this.el.style.display=this.model.isVisible()?"":"none"},n.prototype.getPropertiesEl=function(){var t=this,e=t.$el,r=t.pfx;return e.find(".".concat(r,"properties")).get(0)},n.prototype.toggle=function(){var t=this.model;t.setOpen(!t.get("open"))},n.prototype.renderProperties=function(){var t=this,e=t.model,r=t.config,o=e.get("properties");if(o){var l=new Vp({collection:o,config:r});this.$el.append(l.render().el)}},n.prototype.render=function(){var t=this,e=t.pfx,r=t.model,o=t.$el,l=r.getId(),f=r.getName();return o.html(this.template({pfx:e,label:f})),this.renderProperties(),o.attr("class","".concat(e,"sector ").concat(e,"sector__").concat(l," no-select")),this.updateOpen(),this},n}(x.G7);const n0=r0;var lh,o0=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),i0=function(a){o0(n,a);function n(t){t===void 0&&(t={});var e=a.call(this,t)||this,r=t.module,o=t.config,l=e.collection;return e.pfx=(o==null?void 0:o.stylePrefix)||"",e.ppfx=(o==null?void 0:o.pStylePrefix)||"",e.config=o,e.module=r,e.listenTo(l,"add",e.addTo),e.listenTo(l,"reset",e.render),e}return n.prototype.remove=function(){var t=this;return x.G7.prototype.remove.apply(this,arguments),["config","module","em"].forEach(function(e){return t[e]={}}),this},n.prototype.addTo=function(t,e,r){r===void 0&&(r={}),this.addToCollection(t,null,r)},n.prototype.addToCollection=function(t,e,r){r===void 0&&(r={});var o=this,l=o.config,f=o.el,d=e||f,h=new n0({model:t,config:l}).render().el;return(0,Xt.$Q)(d,h,r.at),h},n.prototype.render=function(){var t=this,e=this,r=e.$el,o=e.pfx,l=e.ppfx;r.empty();var f=document.createDocumentFragment();return this.collection.each(function(d){return t.addToCollection(d,f)}),r.append(f),r.addClass("".concat(o,"sectors ").concat(l,"one-bg ").concat(l,"two-color")),this},n}(x.G7);const a0=i0;var s0=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Ta=function(){return Ta=Object.assign||function(a){for(var n,t=1,e=arguments.length;t=0})}):[]};b?(V=g.getRules("#".concat(b.getId())),$=h?vt(h.getSelectors().getFullName(k)):[],Q=$.concat(V)):(V=h?g.getRules("#".concat(h.getId())):[],$=vt(t.getSelectors().getFullName(k)),Q=V.concat($));var Mt=Q.filter(function(kt){return(0,w.isUndefined)(o)?1:kt.get("state")===o}).sort(y.sortRules).reverse();d=Mt.slice(Mt.indexOf(t)+1)}return d},n.prototype.addType=function(t,e){this.properties.addType(t,e)},n.prototype.getType=function(t){return this.properties.getType(t)},n.prototype.getTypes=function(){return this.properties.getTypes()},n.prototype.createType=function(t,e){var r=e===void 0?{}:e,o=r.model,l=o===void 0?{}:o,f=r.view,d=f===void 0?{}:f,h=this.config,g=this.getType(t);if(g)return new g.view(Ta({model:new g.model(l),config:h},d))},n.prototype.render=function(){var t=this,e=t.config,r=t.em,o=t.SectView,l=o&&o.el;return this.SectView=new a0({el:l,em:r,config:e,module:this,collection:this.sectors}),this.SectView.render().el},n.prototype._logNoSector=function(t){var e=this.em;e&&e.logWarning("'".concat(t,"' sector not found"))},n.prototype.__emitCmpStyleUpdate=function(t,e){e===void 0&&(e={});var r=this.em;if(!t.__p){var o=this.getSelectedAll(),l=e.components||r.getSelectedAll(),f=Array.isArray(l)?l:[l],d=Ta({},t);delete d.__p,f.forEach(function(h){return!o.includes(h)&&h.__onStyleChange(d)})}},n.prototype.__upProps=function(t){var e=this;t===void 0&&(t={});var r=this.getSelected();if(r){var o=this.sectors,l=this.model.get("component"),f=this.getSelectedParents(),d=r.getStyle(),h=f.map(function(g){return{target:g,style:g.getStyle()}});o.map(function(g){g.getProperties().map(function(y){e.__upProp(y,d,h,t)})}),o.forEach(function(g){var y=g.getProperties();y.forEach(function(k){var V=k.__checkVisibility({target:r,component:l,sectors:o});k.set("visible",V)});var b=y.some(function(k){return k.isVisible()});g.set("visible",b)})}},n.prototype.__upProp=function(t,e,r,o){var l=this,f=t.getName(),d=e[f],h=ph(d),g=t.getType()==="stack",y=t.getType()==="composite",b=Ta(Ta({},o),{__up:!0}),k=!y&&!g,V=t,$=t,Q=g?V.__getLayersFromStyle(e):[],vt=y?$.__getPropsFromStyle(e):{},Mt=h?d:null,kt=null;if(g&&Q===null||y&&vt===null){var Gt=g?"__getLayersFromStyle":"__getPropsFromStyle",fe=r.filter(function(Ze){return V[Gt](Ze.style)!==null})[0];if(fe){Mt=fe.style[f],kt=fe.target;var Oe=V[Gt](fe.style);g?Q=Oe:vt=Oe}}else if(!h){Mt=null;var fe=r.filter(function(hr){return ph(hr.style[f])})[0];fe&&(Mt=fe.style[f],kt=fe.target)}if(t.__setParentTarget(kt),k&&t.__getFullValue()!==Mt&&t.upValue(Mt,b),g&&V.__setLayers(Q||[],{isEmptyValue:V.isEmptyValueStyle(e)}),y){var Ve=$.getProperties();if($.isDetached()){var pe=$.__getPropsFromStyle(e,{byName:!0})||{},Ue=r.map(function(Ze){return Ta(Ta({},Ze),{style:$.__getPropsFromStyle(Ze.style,{byName:!0})||{}})});Ve.map(function(Ze){return l.__upProp(Ze,pe,Ue,o)})}else $.__setProperties(vt||{},b),$.getProperties().map(function(Ze){return Ze.__setParentTarget(kt)})}},n.prototype.destroy=function(){var t;[this.properties,this.sectors].forEach(function(e){e.reset(),e.stopListening()}),(t=this.SectView)===null||t===void 0||t.remove(),this.model.stopListening(),this.upAll.cancel()},n}(Tt);const m0=g0;var y0=function(){var a=function(n,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])},a(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");a(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}}(),Mn=function(){return Mn=Object.assign||function(a){for(var n,t=1,e=arguments.length;t0&&o[o.length-1])&&(h[0]===6||h[0]===2)){t=0;continue}if(h[0]===3&&(!o||h[1]>o[0]&&h[1]=l.getStepsBeforeSave()&&this.store().catch(function(d){return o.logError(d)})},n.prototype.loadModule=function(t){var e=new t(this);return this.set(e.name,e),e.onLoad&&this.toLoad.push(e),this.modules.push(e),e},n.prototype.loadStorableModule=function(t){var e=this.loadModule(t);return this.storables.push(e),e},n.prototype.init=function(t,e){e===void 0&&(e={}),this.destroyed&&(this.initialize(e),this.destroyed=!1),this.set("Editor",t)},n.prototype.getEditor=function(){return this.get("Editor")},n.prototype.handleUpdates=function(t,e,r){var o=this;r===void 0&&(r={}),!(this.__skip||r.temporary||r.noCount||r.avoidStore||!this.get("ready"))&&(this.timedInterval&&clearTimeout(this.timedInterval),this.timedInterval=setTimeout(function(){var l=o.getDirtyCount()||0;r.unset;var f=_0(r,["unset"]);o.set("changesCount",l+1,f)},0))},n.prototype.changesUp=function(t){this.handleUpdates(0,0,t)},n.prototype.componentHovered=function(t,e,r){var o=this.previous("componentHovered");o&&this.trigger("component:unhovered",o,r),e&&this.trigger("component:hovered",e,r)},n.prototype.getSelected=function(){return this.selected.lastComponent()},n.prototype.getSelectedAll=function(){return this.selected.allComponents()},n.prototype.setSelected=function(t,e){var r=this;e===void 0&&(e={});var o=e.event,l=o&&(o.ctrlKey||o.metaKey),f=(o||{}).shiftKey,d=((0,w.isArray)(t)?t:[t]).map(function(b){var k,V;return((V=(k=b==null?void 0:b.delegate)===null||k===void 0?void 0:k.select)===null||V===void 0?void 0:V.call(k,b))||b}).filter(Boolean),h=this.getSelectedAll(),g=this.getConfig().multipleSelection,y=(0,w.isArray)(t);(y||!t)&&this.removeSelected(h.filter(function(b){return!(0,w.contains)(d,b)})),d.forEach(function(b){if(b&&(r.trigger("component:select:before",b,e),!b.get("selectable")||e.abort))if(e.useValid){for(var k=b.parent();k&&!k.get("selectable");)k=k.parent();b=k}else return;if(l&&g)return r.toggleSelected(b);if(f&&g){r.clearSelection(r.Canvas.getWindow());var V=b.collection,$=b.index(),Q,vt;if(r.getSelectedAll().forEach(function(Mt){var kt=Mt.collection,Gt=Mt.index();kt===V&&(Gt<$?Q=(0,w.isUndefined)(Q)?Gt:Math.max(Q,Gt):Gt>$&&(vt=(0,w.isUndefined)(vt)?Gt:Math.min(vt,Gt)))}),!(0,w.isUndefined)(Q))for(;Q!==$;)r.addSelected(V.at(Q)),Q++;if(!(0,w.isUndefined)(vt))for(;vt!==$;)r.addSelected(V.at(vt)),vt--;return r.addSelected(b)}!y&&r.removeSelected(h.filter(function(Mt){return Mt!==b})),r.addSelected(b,e)})},n.prototype.addSelected=function(t,e){var r=this;e===void 0&&(e={});var o=(0,w.isArray)(t)?t:[t];o.forEach(function(l){var f=r.selected;if(!(!l||!l.get("selectable")||l.parents().some(function(h){return f.hasComponent(h)}))){e.forceChange&&r.removeSelected(l,e);var d=f.allComponents().filter(function(h){return(0,w.contains)(h.parents(),l)});d.forEach(function(h){return r.removeSelected(h,e)}),f.addComponent(l,e),r.trigger("component:select",l,e),r.Canvas.addSpot({type:Te.q.Select,component:l})}})},n.prototype.removeSelected=function(t,e){var r=this;e===void 0&&(e={}),this.selected.removeComponent(t,e);var o=(0,w.isArray)(t)?t:[t];o.forEach(function(l){return r.Canvas.removeSpots({type:Te.q.Select,component:l})})},n.prototype.toggleSelected=function(t,e){var r=this;e===void 0&&(e={});var o=(0,w.isArray)(t)?t:[t];o.forEach(function(l){r.selected.hasComponent(l)?r.removeSelected(l,e):r.addSelected(l,e)})},n.prototype.setHovered=function(t,e){var r=this;e===void 0&&(e={});var o=function(d,h){var g=r,y=g.config,b=g.Canvas,k=r.getHovered(),V=r.getSelectedAll(),$=Te.q.Hover,Q=Te.q.Spacing;r.set("componentHovered",d||null,h),k&&(b.removeSpots({type:$,component:k}),b.removeSpots({type:Q,component:k})),d&&(b.addSpot({type:$,component:d}),(!V.includes(d)||y.showOffsetsSelected)&&b.addSpot({type:Q,component:d}))};if(!t)return o();var l="component:hover";if(e.forceChange&&o(),this.trigger("".concat(l,":before"),t,e),!t.get("hoverable"))if(e.useValid&&!e.abort){for(var f=t.parent();f&&!f.get("hoverable");)f=f.parent();t=f}else return;e.abort||(o(t,e),this.trigger(l,t,e))},n.prototype.getHovered=function(){return this.get("componentHovered")},n.prototype.setComponents=function(t,e){return e===void 0&&(e={}),this.Components.setComponents(t,e)},n.prototype.getComponents=function(){var t=this.Components,e=this.CodeManager;if(!(!t||!e)){var r=t.getComponents();return e.getCode(r,"json")}},n.prototype.setStyle=function(t,e){e===void 0&&(e={});var r=this.Css;return r.clear(e),r.getAll().add(t,e),this},n.prototype.addStyle=function(t,e){e===void 0&&(e={});var r=this.getStyle().add(t,e);return(0,w.isArray)(r)?r:[r]},n.prototype.getStyle=function(){return this.Css.getAll()},n.prototype.setState=function(t){return this.set("state",t),this},n.prototype.getState=function(){return this.get("state")||""},n.prototype.getHtml=function(t){t===void 0&&(t={});var e=this.config,r=e.optsHtml,o=e.jsInHtml?this.getJs(t):"",l=t.component||this.Components.getComponent(),f=l?this.CodeManager.getCode(l,"html",Mn(Mn({},r),t)):"";return f+=o?"