@halo-dev/components 0.0.0-alpha.0 → 0.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/dist/components/alert/Alert.vue.d.ts +59 -0
- package/dist/components/button/Button.vue.d.ts +110 -0
- package/dist/components/card/Card.vue.d.ts +6 -3
- package/dist/components/checkbox/CheckBox.vue.d.ts +56 -0
- package/dist/components/checkbox/CheckBoxGroup.vue.d.ts +125 -0
- package/dist/components/codemirror/Codemirror.vue.d.ts +75 -0
- package/dist/components/codemirror/index.d.ts +1 -0
- package/dist/components/dialog/Dialog.vue.d.ts +143 -0
- package/dist/components/dialog/DialogProvider.vue.d.ts +156 -0
- package/dist/components/dialog/interface.d.ts +2 -0
- package/dist/components/header/PageHeader.vue.d.ts +2 -0
- package/dist/components/input/Input.vue.d.ts +56 -0
- package/dist/components/menu/Menu.vue.d.ts +16 -0
- package/dist/components/menu/MenuItem.vue.d.ts +55 -0
- package/dist/components/menu/MenuLabel.vue.d.ts +2 -0
- package/dist/components/modal/Modal.vue.d.ts +79 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/radio/Radio.vue.d.ts +53 -0
- package/dist/components/radio/RadioGroup.vue.d.ts +112 -0
- package/dist/components/select/Option.vue.d.ts +2 -0
- package/dist/components/select/Select.vue.d.ts +56 -0
- package/dist/components/space/Space.vue.d.ts +47 -0
- package/dist/components/switch/Switch.vue.d.ts +28 -0
- package/dist/components/tabs/TabItem.vue.d.ts +28 -0
- package/dist/components/tabs/Tabbar.vue.d.ts +84 -0
- package/dist/components/tabs/Tabs.vue.d.ts +165 -0
- package/dist/components/tag/Tag.vue.d.ts +36 -0
- package/dist/components/textarea/Textarea.vue.d.ts +9 -1
- package/dist/components.d.ts +2 -0
- package/dist/halo-components.es.js +16443 -1542
- package/dist/halo-components.es.js.map +1 -1
- package/dist/halo-components.iife.js +13 -19
- package/dist/halo-components.iife.js.map +1 -1
- package/dist/icons/icons.d.ts +3 -1
- package/dist/style.css +1 -1
- package/package.json +30 -23
- package/dist/halo-components.cjs.js +0 -3
- package/dist/halo-components.cjs.js.map +0 -1
- package/dist/halo-components.umd.js +0 -20
- package/dist/halo-components.umd.js.map +0 -1
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
var HaloComponents=function(a,e,m){"use strict";var no=Object.defineProperty;var A=Object.getOwnPropertySymbols;var io=Object.prototype.hasOwnProperty,lo=Object.prototype.propertyIsEnumerable;var L=(a,e,m)=>e in a?no(a,e,{enumerable:!0,configurable:!0,writable:!0,value:m}):a[e]=m,y=(a,e)=>{for(var m in e||(e={}))io.call(e,m)&&L(a,m,e[m]);if(A)for(var m of A(e))lo.call(e,m)&&L(a,m,e[m]);return a};var co=(()=>`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{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,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}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-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-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[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}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input:-ms-input-placeholder,textarea:-ms-input-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}:root{--themeable-primary-50: 251, 254, 253;--themeable-primary-100: 220, 247, 238;--themeable-primary-200: 190, 240, 223;--themeable-primary-300: 160, 232, 208;--themeable-primary-400: 132, 223, 192;--themeable-primary-500: 103, 213, 176;--themeable-primary-600: 76, 203, 160;--themeable-primary-700: 56, 185, 141;--themeable-primary-800: 49, 154, 119;--themeable-primary-900: 42, 124, 96;--themeable-primary: 76, 203, 160;--themeable-secondary-50: 163, 182, 240;--themeable-secondary-100: 132, 158, 233;--themeable-secondary-200: 101, 133, 226;--themeable-secondary-300: 71, 109, 218;--themeable-secondary-400: 45, 86, 207;--themeable-secondary-500: 40, 74, 174;--themeable-secondary-600: 34, 62, 142;--themeable-secondary-700: 28, 49, 110;--themeable-secondary-800: 21, 36, 79;--themeable-secondary-900: 14, 23, 49;--themeable-secondary: 14, 23, 49}*,: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-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: }::-webkit-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-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: }::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-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: }.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.top-0{top:0px}.bottom-0{bottom:0px}.mt-3{margin-top:.75rem}.-mt-6{margin-top:-1.5rem}.ml-auto{margin-left:auto}.ml-1{margin-left:.25rem}.ml-4{margin-left:1rem}.ml-2{margin-left:.5rem}.mb-2{margin-bottom:.5rem}.mr-3{margin-right:.75rem}.box-border{box-sizing:border-box}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-full{height:100%}.h-5{height:1.25rem}.h-3{height:.75rem}.h-8{height:2rem}.h-6{height:1.5rem}.h-16{height:4rem}.h-10{height:2.5rem}.h-20{height:5rem}.h-24{height:6rem}.h-12{height:3rem}.h-32{height:8rem}.h-28{height:7rem}.h-40{height:10rem}.h-4{height:1rem}.w-full{width:100%}.w-4{width:1rem}.w-16{width:4rem}.w-6{width:1.5rem}.w-5{width:1.25rem}.w-1\\/2{width:50%}.w-1\\/3{width:33.333333%}.min-w-0{min-width:0px}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.translate-y-4{--tw-translate-y: 1rem;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))}.translate-y-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))}.translate-x-0{--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))}.translate-x-5{--tw-translate-x: 1.25rem;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))}@-webkit-keyframes spin{to{transform:rotate(360deg)}}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-6{gap:1.5rem}.gap-4{gap:1rem}.gap-2{gap:.5rem}.space-x-2>: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)))}.self-center{align-self:center}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.border{border-width:1px}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-indigo-200{--tw-bg-opacity: 1;background-color:rgb(199 210 254 / var(--tw-bg-opacity))}.bg-indigo-300{--tw-bg-opacity: 1;background-color:rgb(165 180 252 / var(--tw-bg-opacity))}.bg-indigo-400{--tw-bg-opacity: 1;background-color:rgb(129 140 248 / var(--tw-bg-opacity))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(187 247 208 / var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(254 202 202 / var(--tw-bg-opacity))}.bg-teal-50{--tw-bg-opacity: 1;background-color:rgb(240 253 250 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.\\!bg-themeable-primary-600{--tw-bg-opacity: 1 !important;background-color:rgba(var(--themeable-primary-600),var(--tw-bg-opacity))!important}.fill-current{fill:currentColor}.p-3{padding:.75rem}.p-0{padding:0}.p-1\\.5{padding:.375rem}.p-1{padding:.25rem}.p-4{padding:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.pb-5{padding-bottom:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / 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))}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.opacity-0{opacity:0}.opacity-100{opacity:1}.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)}.outline{outline-style:solid}.ring-4{--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(4px + 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)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition{transition-property:color,background-color,border-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-text-decoration-color,-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-text-decoration-color,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-100{transition-duration:.1s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.group:hover .group-hover\\:block{display:block}@media (min-width: 640px){.sm\\:translate-y-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))}.sm\\:scale-95{--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))}.sm\\: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))}.sm\\:space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}}@media (min-width: 768px){.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (min-width: 1024px){.lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}
|
|
2
|
-
`)();const R={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Y=[e.createElementVNode("path",{fill:"currentColor",d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2zm0 2a8 8 0 1 0 0 16a8 8 0 0 0 0-16zm3.833 3.337a.595.595 0 0 1 .763.067a.59.59 0 0 1 .063.76c-2.18 3.046-3.38 4.678-3.598 4.897a1.502 1.502 0 0 1-2.122 0a1.502 1.502 0 0 1 0-2.122c.374-.373 2.005-1.574 4.894-3.602zM17.5 11a1 1 0 1 1 0 2a1 1 0 0 1 0-2zm-11 0a1 1 0 1 1 0 2a1 1 0 0 1 0-2zm2.318-3.596a1 1 0 1 1-1.416 1.414a1 1 0 0 1 1.416-1.414zM12 5.5a1 1 0 1 1 0 2a1 1 0 0 1 0-2z"},null,-1)];function H(t,r){return e.openBlock(),e.createElementBlock("svg",R,Y)}var D={name:"ri-dashboard-3-line",render:H};const j={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},T=[e.createElementVNode("path",{fill:"currentColor",d:"m10.828 12l4.95 4.95l-1.414 1.414L8 12l6.364-6.364l1.414 1.414z"},null,-1)];function K(t,r){return e.openBlock(),e.createElementBlock("svg",j,T)}var F={name:"ri-arrow-left-s-line",render:K};const O={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},G=[e.createElementVNode("path",{fill:"currentColor",d:"m13.172 12l-4.95-4.95l1.414-1.414L16 12l-6.364 6.364l-1.414-1.414z"},null,-1)];function U(t,r){return e.openBlock(),e.createElementBlock("svg",O,G)}var x={name:"ri-arrow-right-s-line",render:U};const X={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},P=[e.createElementVNode("path",{fill:"currentColor",d:"m12 16l-6-6h12z"},null,-1)];function q(t,r){return e.openBlock(),e.createElementBlock("svg",X,P)}var J={name:"ri-arrow-down-s-fill",render:q};const Q={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},W=[e.createElementVNode("path",{fill:"currentColor",d:"m12 10.828l-4.95 4.95l-1.414-1.414L12 8l6.364 6.364l-1.414 1.414z"},null,-1)];function Z(t,r){return e.openBlock(),e.createElementBlock("svg",Q,W)}var ee={name:"ri-arrow-up-s-line",render:Z};const te={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},re=[e.createElementVNode("path",{fill:"currentColor",d:"m12 13.172l4.95-4.95l1.414 1.414L12 16L5.636 9.636L7.05 8.222z"},null,-1)];function ae(t,r){return e.openBlock(),e.createElementBlock("svg",te,re)}var oe={name:"ri-arrow-down-s-line",render:ae};const ne={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},ie=[e.createElementVNode("path",{fill:"currentColor",d:"M2 3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V3.993zM11 5H4v14h7V5zm2 0v14h7V5h-7zm1 2h5v2h-5V7zm0 3h5v2h-5v-2z"},null,-1)];function le(t,r){return e.openBlock(),e.createElementBlock("svg",ne,ie)}var ce={name:"ri-book-read-line",render:le};const se={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},de=[e.createElementVNode("path",{fill:"currentColor",d:"M5 8v12h14V8H5zm0-2h14V4H5v2zm15 16H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1zM7 10h4v4H7v-4zm0 6h10v2H7v-2zm6-5h4v2h-4v-2z"},null,-1)];function pe(t,r){return e.openBlock(),e.createElementBlock("svg",se,de)}var me={name:"ri-pages-line",render:pe};const he={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},we=[e.createElementVNode("path",{fill:"currentColor",d:"M2 8.994A5.99 5.99 0 0 1 8 3h8c3.313 0 6 2.695 6 5.994V21H8c-3.313 0-6-2.695-6-5.994V8.994zM20 19V8.994A4.004 4.004 0 0 0 16 5H8a3.99 3.99 0 0 0-4 3.994v6.012A4.004 4.004 0 0 0 8 19h12zm-6-8h2v2h-2v-2zm-6 0h2v2H8v-2z"},null,-1)];function be(t,r){return e.openBlock(),e.createElementBlock("svg",he,we)}var ge={name:"ri-message-3-line",render:be};const fe={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},_e=[e.createElementVNode("path",{fill:"currentColor",d:"M12 2c5.522 0 10 3.978 10 8.889a5.558 5.558 0 0 1-5.556 5.555h-1.966c-.922 0-1.667.745-1.667 1.667c0 .422.167.811.422 1.1c.267.3.434.689.434 1.122C13.667 21.256 12.9 22 12 22C6.478 22 2 17.522 2 12S6.478 2 12 2zm-1.189 16.111a3.664 3.664 0 0 1 3.667-3.667h1.966A3.558 3.558 0 0 0 20 10.89C20 7.139 16.468 4 12 4a8 8 0 0 0-.676 15.972a3.648 3.648 0 0 1-.513-1.86zM7.5 12a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3zm9 0a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3zM12 9a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3z"},null,-1)];function ue(t,r){return e.openBlock(),e.createElementBlock("svg",fe,_e)}var ye={name:"ri-palette-line",render:ue};const xe={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},ke=[e.createElementVNode("path",{fill:"currentColor",d:"M2 18h7v2H2v-2zm0-7h9v2H2v-2zm0-7h20v2H2V4zm18.674 9.025l1.156-.391l1 1.732l-.916.805a4.017 4.017 0 0 1 0 1.658l.916.805l-1 1.732l-1.156-.391c-.41.37-.898.655-1.435.83L19 21h-2l-.24-1.196a3.996 3.996 0 0 1-1.434-.83l-1.156.392l-1-1.732l.916-.805a4.017 4.017 0 0 1 0-1.658l-.916-.805l1-1.732l1.156.391c.41-.37.898-.655 1.435-.83L17 11h2l.24 1.196c.536.174 1.024.46 1.434.83zM18 18a2 2 0 1 0 0-4a2 2 0 0 0 0 4z"},null,-1)];function $e(t,r){return e.openBlock(),e.createElementBlock("svg",xe,ke)}var ve={name:"ri-list-settings-line",render:$e};const Be={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},ze=[e.createElementVNode("path",{fill:"currentColor",d:"M15.199 9.945a2.6 2.6 0 0 1-.79-1.551l-.403-3.083l-2.73 1.486a2.6 2.6 0 0 1-1.72.273L6.5 6.5l.57 3.056a2.6 2.6 0 0 1-.273 1.72l-1.486 2.73l3.083.403a2.6 2.6 0 0 1 1.55.79l2.138 2.257l1.336-2.807a2.6 2.6 0 0 1 1.23-1.231l2.808-1.336l-2.257-2.137zm.025 5.563l-2.213 4.65a.6.6 0 0 1-.977.155l-3.542-3.739a.6.6 0 0 0-.357-.182l-5.107-.668a.6.6 0 0 1-.449-.881l2.462-4.524a.6.6 0 0 0 .062-.396L4.16 4.86a.6.6 0 0 1 .7-.7l5.063.943a.6.6 0 0 0 .396-.062l4.524-2.462a.6.6 0 0 1 .881.45l.668 5.106a.6.6 0 0 0 .182.357l3.739 3.542a.6.6 0 0 1-.155.977l-4.65 2.213a.6.6 0 0 0-.284.284zm.797 1.927l1.414-1.414l4.243 4.242l-1.415 1.415l-4.242-4.243z"},null,-1)];function Ve(t,r){return e.openBlock(),e.createElementBlock("svg",Be,ze)}var Ce={name:"ri-magic-line",render:Ve};const Ee={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Me=[e.createElementVNode("path",{fill:"currentColor",d:"M12 14v2a6 6 0 0 0-6 6H4a8 8 0 0 1 8-8zm0-1c-3.315 0-6-2.685-6-6s2.685-6 6-6s6 2.685 6 6s-2.685 6-6 6zm0-2c2.21 0 4-1.79 4-4s-1.79-4-4-4s-4 1.79-4 4s1.79 4 4 4zm2.595 7.812a3.51 3.51 0 0 1 0-1.623l-.992-.573l1-1.732l.992.573A3.496 3.496 0 0 1 17 14.645V13.5h2v1.145c.532.158 1.012.44 1.405.812l.992-.573l1 1.732l-.992.573a3.51 3.51 0 0 1 0 1.622l.992.573l-1 1.732l-.992-.573a3.496 3.496 0 0 1-1.405.812V22.5h-2v-1.145a3.496 3.496 0 0 1-1.405-.812l-.992.573l-1-1.732l.992-.572zM18 19.5a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3z"},null,-1)];function Se(t,r){return e.openBlock(),e.createElementBlock("svg",Ee,Me)}var Ne={name:"ri-user-settings-line",render:Se};const Ie={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Ae=[e.createElementVNode("path",{fill:"currentColor",d:"M2 12c0-.865.11-1.703.316-2.504A3 3 0 0 0 4.99 4.867a9.99 9.99 0 0 1 4.335-2.505a3 3 0 0 0 5.348 0a9.99 9.99 0 0 1 4.335 2.505a3 3 0 0 0 2.675 4.63a10.036 10.036 0 0 1 0 5.007a3 3 0 0 0-2.675 4.629a9.99 9.99 0 0 1-4.335 2.505a3 3 0 0 0-5.348 0a9.99 9.99 0 0 1-4.335-2.505a3 3 0 0 0-2.675-4.63A10.056 10.056 0 0 1 2 12zm4.804 3c.63 1.091.81 2.346.564 3.524c.408.29.842.541 1.297.75A4.993 4.993 0 0 1 12 18c1.26 0 2.438.471 3.335 1.274c.455-.209.889-.46 1.297-.75A4.993 4.993 0 0 1 17.196 15a4.993 4.993 0 0 1 2.77-2.25a8.126 8.126 0 0 0 0-1.5A4.993 4.993 0 0 1 17.195 9a4.993 4.993 0 0 1-.564-3.524a7.989 7.989 0 0 0-1.297-.75A4.993 4.993 0 0 1 12 6a4.993 4.993 0 0 1-3.335-1.274a7.99 7.99 0 0 0-1.297.75A4.993 4.993 0 0 1 6.804 9a4.993 4.993 0 0 1-2.77 2.25a8.126 8.126 0 0 0 0 1.5A4.993 4.993 0 0 1 6.805 15zM12 15a3 3 0 1 1 0-6a3 3 0 0 1 0 6zm0-2a1 1 0 1 0 0-2a1 1 0 0 0 0 2z"},null,-1)];function Le(t,r){return e.openBlock(),e.createElementBlock("svg",Ie,Ae)}var Re={name:"ri-settings-4-line",render:Le};const Ye={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},He=[e.createElementVNode("path",{fill:"currentColor",d:"M13 18v2h6v2h-6a2 2 0 0 1-2-2v-2H8a4 4 0 0 1-4-4V7a1 1 0 0 1 1-1h2V2h2v4h6V2h2v4h2a1 1 0 0 1 1 1v7a4 4 0 0 1-4 4h-3zm-5-2h8a2 2 0 0 0 2-2v-3H6v3a2 2 0 0 0 2 2zm10-8H6v1h12V8zm-6 6.5a1 1 0 1 1 0-2a1 1 0 0 1 0 2zM11 2h2v3h-2V2z"},null,-1)];function De(t,r){return e.openBlock(),e.createElementBlock("svg",Ye,He)}var je={name:"ri-plug-2-line",render:De};const Te={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Ke=[e.createElementVNode("path",{fill:"currentColor",d:"M12 3c5.392 0 9.878 3.88 10.819 9c-.94 5.12-5.427 9-10.819 9c-5.392 0-9.878-3.88-10.819-9C2.121 6.88 6.608 3 12 3zm0 16a9.005 9.005 0 0 0 8.777-7a9.005 9.005 0 0 0-17.554 0A9.005 9.005 0 0 0 12 19zm0-2.5a4.5 4.5 0 1 1 0-9a4.5 4.5 0 0 1 0 9zm0-2a2.5 2.5 0 1 0 0-5a2.5 2.5 0 0 0 0 5z"},null,-1)];function Fe(t,r){return e.openBlock(),e.createElementBlock("svg",Te,Ke)}var Oe={name:"ri-eye-line",render:Fe};const Ge={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Ue=[e.createElementVNode("path",{fill:"currentColor",d:"M12.414 5H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414l2 2zM20 11H4v8h16v-8zm0-2V7h-8.414l-2-2H4v4h16z"},null,-1)];function Xe(t,r){return e.openBlock(),e.createElementBlock("svg",Ge,Ue)}var Pe={name:"ri-folder-2-line",render:Xe};const qe={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Je=[e.createElementVNode("path",{fill:"currentColor",d:"M4.5 10.5c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5S6 12.825 6 12s-.675-1.5-1.5-1.5zm15 0c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5S21 12.825 21 12s-.675-1.5-1.5-1.5zm-7.5 0c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5s1.5-.675 1.5-1.5s-.675-1.5-1.5-1.5z"},null,-1)];function Qe(t,r){return e.openBlock(),e.createElementBlock("svg",qe,Je)}var We={name:"ri-more-line",render:Qe};const Ze={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},et=[e.createElementVNode("path",{fill:"currentColor",d:"m12 10.586l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.414 1.414l-4.95-4.95l-4.95 4.95l-1.414-1.414l4.95-4.95l-4.95-4.95L7.05 5.636z"},null,-1)];function tt(t,r){return e.openBlock(),e.createElementBlock("svg",Ze,et)}var w={name:"ri-close-line",render:tt};const rt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},at=[e.createElementVNode("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10zm0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16zm-1-5h2v2h-2v-2zm0-8h2v6h-2V7z"},null,-1)];function ot(t,r){return e.openBlock(),e.createElementBlock("svg",rt,at)}var g={name:"ri-error-warning-line",render:ot};const nt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},it=[e.createElementVNode("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10zm0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16zm-.997-4L6.76 11.757l1.414-1.414l2.829 2.829l5.656-5.657l1.415 1.414L11.003 16z"},null,-1)];function lt(t,r){return e.openBlock(),e.createElementBlock("svg",nt,it)}var f={name:"ri-checkbox-circle-line",render:lt};const ct={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},st=[e.createElementVNode("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10zm0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16zM11 7h2v2h-2V7zm0 4h2v6h-2v-6z"},null,-1)];function dt(t,r){return e.openBlock(),e.createElementBlock("svg",ct,st)}var b={name:"ri-information-line",render:dt};const pt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},mt=[e.createElementVNode("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10zm0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16zm0-9.414l2.828-2.829l1.415 1.415L13.414 12l2.829 2.828l-1.415 1.415L12 13.414l-2.828 2.829l-1.415-1.415L10.586 12L7.757 9.172l1.415-1.415L12 10.586z"},null,-1)];function ht(t,r){return e.openBlock(),e.createElementBlock("svg",pt,mt)}var k={name:"ri-close-circle-line",render:ht};const wt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},bt=[e.createElementVNode("path",{fill:"currentColor",d:"M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v3zm1 2H6v12h12V8zm-4.586 6l1.768 1.768l-1.414 1.414L12 15.414l-1.768 1.768l-1.414-1.414L10.586 14l-1.768-1.768l1.414-1.414L12 12.586l1.768-1.768l1.414 1.414L13.414 14zM9 4v2h6V4H9z"},null,-1)];function gt(t,r){return e.openBlock(),e.createElementBlock("svg",wt,bt)}var ft={name:"ri-delete-bin-2-line",render:gt};const _t={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},ut=[e.createElementVNode("path",{fill:"currentColor",d:"M11 11V7h2v4h4v2h-4v4h-2v-4H7v-2h4zm1 11C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10zm0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16z"},null,-1)];function yt(t,r){return e.openBlock(),e.createElementBlock("svg",_t,ut)}var xt={name:"ri-add-circle-line",render:yt};const kt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},$t=[e.createElementVNode("path",{fill:"currentColor",d:"M7 19v-6h10v6h2V7.828L16.172 5H5v14h2zM4 3h13l4 4v13a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm5 12v4h6v-4H9z"},null,-1)];function vt(t,r){return e.openBlock(),e.createElementBlock("svg",kt,$t)}var Bt={name:"ri-save-line",render:vt};const zt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Vt=[e.createElementVNode("path",{fill:"currentColor",d:"M8 4h13v2H8V4zM4.5 6.5a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3zm0 7a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3zm0 6.9a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"},null,-1)];function Ct(t,r){return e.openBlock(),e.createElementBlock("svg",zt,Vt)}var Et={name:"ri-list-unordered",render:Ct};const Mt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},St=[e.createElementVNode("path",{fill:"currentColor",d:"M14 10h-4v4h4v-4zm2 0v4h3v-4h-3zm-2 9v-3h-4v3h4zm2 0h3v-3h-3v3zM14 5h-4v3h4V5zm2 0v3h3V5h-3zm-8 5H5v4h3v-4zm0 9v-3H5v3h3zM8 5H5v3h3V5zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"},null,-1)];function Nt(t,r){return e.openBlock(),e.createElementBlock("svg",Mt,St)}var It={name:"ri-grid-line",render:Nt};const At={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Lt=[e.createElementVNode("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10zm-.997-6l7.07-7.071l-1.414-1.414l-5.656 5.657l-2.829-2.829l-1.414 1.414L11.003 16z"},null,-1)];function Rt(t,r){return e.openBlock(),e.createElementBlock("svg",At,Lt)}var Yt={name:"ri-checkbox-circle-fill",render:Rt};const Ht={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Dt=[e.createElementVNode("path",{fill:"currentColor",d:"M11 2c4.968 0 9 4.032 9 9s-4.032 9-9 9s-9-4.032-9-9s4.032-9 9-9zm0 16c3.867 0 7-3.133 7-7c0-3.868-3.133-7-7-7c-3.868 0-7 3.132-7 7c0 3.867 3.132 7 7 7zm8.485.071l2.829 2.828l-1.415 1.415l-2.828-2.829l1.414-1.414z"},null,-1)];function jt(t,r){return e.openBlock(),e.createElementBlock("svg",Ht,Dt)}var Tt={name:"ri-search-2-line",render:jt};const Kt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Ft=[e.createElementVNode("path",{fill:"currentColor",d:"M4 16h16V5H4v11zm9 2v2h4v2H7v-2h4v-2H2.992A.998.998 0 0 1 2 16.993V4.007C2 3.451 2.455 3 2.992 3h18.016c.548 0 .992.449.992 1.007v12.986c0 .556-.455 1.007-.992 1.007H13z"},null,-1)];function Ot(t,r){return e.openBlock(),e.createElementBlock("svg",Kt,Ft)}var Gt={name:"ri-computer-line",render:Ot};const Ut={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Xt=[e.createElementVNode("path",{fill:"currentColor",d:"M7 4v16h10V4H7zM6 2h12a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm6 15a1 1 0 1 1 0 2a1 1 0 0 1 0-2z"},null,-1)];function Pt(t,r){return e.openBlock(),e.createElementBlock("svg",Ut,Xt)}var qt={name:"ri-smartphone-line",render:Pt};const Jt={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Qt=[e.createElementVNode("path",{fill:"currentColor",d:"M6 4v16h12V4H6zM5 2h14a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm7 15a1 1 0 1 1 0 2a1 1 0 0 1 0-2z"},null,-1)];function Wt(t,r){return e.openBlock(),e.createElementBlock("svg",Jt,Qt)}var Zt={name:"ri-tablet-line",render:Wt};const er={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},tr=[e.createElementVNode("path",{fill:"currentColor",d:"M14 14.252v2.09A6 6 0 0 0 6 22l-2-.001a8 8 0 0 1 10-7.748zM12 13c-3.315 0-6-2.685-6-6s2.685-6 6-6s6 2.685 6 6s-2.685 6-6 6zm0-2c2.21 0 4-1.79 4-4s-1.79-4-4-4s-4 1.79-4 4s1.79 4 4 4zm5.793 8.914l3.535-3.535l1.415 1.414l-4.95 4.95l-3.536-3.536l1.415-1.414l2.12 2.121z"},null,-1)];function rr(t,r){return e.openBlock(),e.createElementBlock("svg",er,tr)}var ar={name:"ri-user-follow-line",render:rr};const or={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},nr=[e.createElementVNode("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10zm0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16zm-5-7h9v2h-4v3l-5-5zm5-4V6l5 5H8V9h4z"},null,-1)];function ir(t,r){return e.openBlock(),e.createElementBlock("svg",or,nr)}var lr={name:"ri-exchange-line",render:ir};const cr={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},sr=[e.createElementVNode("path",{fill:"currentColor",d:"M12 2C6.475 2 2 6.475 2 12a9.994 9.994 0 0 0 6.838 9.488c.5.087.687-.213.687-.476c0-.237-.013-1.024-.013-1.862c-2.512.463-3.162-.612-3.362-1.175c-.113-.288-.6-1.175-1.025-1.413c-.35-.187-.85-.65-.013-.662c.788-.013 1.35.725 1.538 1.025c.9 1.512 2.338 1.087 2.912.825c.088-.65.35-1.087.638-1.337c-2.225-.25-4.55-1.113-4.55-4.938c0-1.088.387-1.987 1.025-2.688c-.1-.25-.45-1.275.1-2.65c0 0 .837-.262 2.75 1.026a9.28 9.28 0 0 1 2.5-.338c.85 0 1.7.112 2.5.337c1.912-1.3 2.75-1.024 2.75-1.024c.55 1.375.2 2.4.1 2.65c.637.7 1.025 1.587 1.025 2.687c0 3.838-2.337 4.688-4.562 4.938c.362.312.675.912.675 1.85c0 1.337-.013 2.412-.013 2.75c0 .262.188.574.688.474A10.016 10.016 0 0 0 22 12c0-5.525-4.475-10-10-10z"},null,-1)];function dr(t,r){return e.openBlock(),e.createElementBlock("svg",cr,sr)}var pr={name:"ri-github-fill",render:dr};const mr={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},hr=[e.createElementVNode("path",{fill:"currentColor",d:"m12 12.586l4.243 4.242l-1.415 1.415L13 16.415V22h-2v-5.587l-1.828 1.83l-1.415-1.415L12 12.586zM12 2a7.001 7.001 0 0 1 6.954 6.194a5.5 5.5 0 0 1-.953 10.784v-2.014a3.5 3.5 0 1 0-1.112-6.91a5 5 0 1 0-9.777 0a3.5 3.5 0 0 0-1.292 6.88l.18.03v2.014a5.5 5.5 0 0 1-.954-10.784A7 7 0 0 1 12 2z"},null,-1)];function wr(t,r){return e.openBlock(),e.createElementBlock("svg",mr,hr)}var br={name:"ri-upload-cloud-2-line",render:wr};const gr={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},fr=[e.createElementVNode("path",{fill:"currentColor",d:"M3.783 2.826L12 1l8.217 1.826a1 1 0 0 1 .783.976v9.987a6 6 0 0 1-2.672 4.992L12 23l-6.328-4.219A6 6 0 0 1 3 13.79V3.802a1 1 0 0 1 .783-.976zM5 4.604v9.185a4 4 0 0 0 1.781 3.328L12 20.597l5.219-3.48A4 4 0 0 0 19 13.79V4.604L12 3.05L5 4.604zM12 11a2.5 2.5 0 1 1 0-5a2.5 2.5 0 0 1 0 5zm-4.473 5a4.5 4.5 0 0 1 8.946 0H7.527z"},null,-1)];function _r(t,r){return e.openBlock(),e.createElementBlock("svg",gr,fr)}var ur={name:"ri-shield-user-line",render:_r};const yr={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},xr=[e.createElementVNode("path",{fill:"currentColor",d:"M7.105 15.21A3.001 3.001 0 1 1 5 15.17V8.83a3.001 3.001 0 1 1 2 0V12c.836-.628 1.874-1 3-1h4a3.001 3.001 0 0 0 2.895-2.21a3.001 3.001 0 1 1 2.032.064A5.001 5.001 0 0 1 14 13h-4a3.001 3.001 0 0 0-2.895 2.21zM6 17a1 1 0 1 0 0 2a1 1 0 0 0 0-2zM6 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2zm12 0a1 1 0 1 0 0 2a1 1 0 0 0 0-2z"},null,-1)];function kr(t,r){return e.openBlock(),e.createElementBlock("svg",yr,xr)}var $r={name:"ri-git-branch-line",render:kr};const vr={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Br=[e.createElementVNode("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10zm0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16zM9 9h6v6H9V9z"},null,-1)];function zr(t,r){return e.openBlock(),e.createElementBlock("svg",vr,Br)}var Vr={name:"ri-stop-circle-line",render:zr};const Cr={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Er=[e.createElementVNode("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10zm0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16zM8.523 7.109l8.368 8.368a6.04 6.04 0 0 1-1.414 1.414L7.109 8.523A6.04 6.04 0 0 1 8.523 7.11z"},null,-1)];function Mr(t,r){return e.openBlock(),e.createElementBlock("svg",Cr,Er)}var $={name:"ri-forbid-line",render:Mr},Qo=(()=>`.alert-wrapper[data-v-3bf3a1a9]{display:flex;flex-direction:column;box-sizing:border-box;border-width:1px;padding:12px 16px;border-radius:4px}.alert-wrapper .alert-header[data-v-3bf3a1a9]{display:flex}.alert-wrapper .alert-header .alert-icon[data-v-3bf3a1a9]{align-self:center;margin-right:.75rem;font-size:1.125rem;line-height:1.75rem}.alert-wrapper .alert-header .alert-title[data-v-3bf3a1a9]{align-self:center;margin-right:.75rem;flex:1 1 0%;font-weight:500;font-size:1rem;line-height:1.5rem}.alert-wrapper .alert-header .alert-close[data-v-3bf3a1a9]{align-self:center;cursor:pointer;border-radius:9999px;padding:.125rem}.alert-wrapper .alert-header .alert-close[data-v-3bf3a1a9]:hover{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity));--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.alert-wrapper .alert-description[data-v-3bf3a1a9]{font-size:.875rem;line-height:1.25rem;margin-top:.5rem}.alert-wrapper .alert-actions[data-v-3bf3a1a9]{border-top-width:1px;margin-top:.75rem;padding-top:.5rem}.alert-wrapper.alert-default[data-v-3bf3a1a9]{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity));--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.alert-wrapper.alert-default .alert-icon[data-v-3bf3a1a9],.alert-wrapper.alert-default .alert-description[data-v-3bf3a1a9]{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.alert-wrapper.alert-default .alert-close[data-v-3bf3a1a9],.alert-wrapper.alert-default .alert-title[data-v-3bf3a1a9]{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.alert-wrapper.alert-success[data-v-3bf3a1a9]{--tw-bg-opacity: 1;background-color:rgb(240 253 244 / var(--tw-bg-opacity));--tw-border-opacity: 1;border-color:rgb(134 239 172 / var(--tw-border-opacity))}.alert-wrapper.alert-success .alert-icon[data-v-3bf3a1a9],.alert-wrapper.alert-success .alert-description[data-v-3bf3a1a9]{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.alert-wrapper.alert-success .alert-close[data-v-3bf3a1a9],.alert-wrapper.alert-success .alert-title[data-v-3bf3a1a9]{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity))}.alert-wrapper.alert-info[data-v-3bf3a1a9]{--tw-bg-opacity: 1;background-color:rgb(240 249 255 / var(--tw-bg-opacity));--tw-border-opacity: 1;border-color:rgb(125 211 252 / var(--tw-border-opacity))}.alert-wrapper.alert-info .alert-icon[data-v-3bf3a1a9],.alert-wrapper.alert-info .alert-description[data-v-3bf3a1a9]{--tw-text-opacity: 1;color:rgb(2 132 199 / var(--tw-text-opacity))}.alert-wrapper.alert-info .alert-close[data-v-3bf3a1a9],.alert-wrapper.alert-info .alert-title[data-v-3bf3a1a9]{--tw-text-opacity: 1;color:rgb(3 105 161 / var(--tw-text-opacity))}.alert-wrapper.alert-warning[data-v-3bf3a1a9]{--tw-bg-opacity: 1;background-color:rgb(255 247 237 / var(--tw-bg-opacity));--tw-border-opacity: 1;border-color:rgb(253 186 116 / var(--tw-border-opacity))}.alert-wrapper.alert-warning .alert-icon[data-v-3bf3a1a9],.alert-wrapper.alert-warning .alert-description[data-v-3bf3a1a9]{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity))}.alert-wrapper.alert-warning .alert-close[data-v-3bf3a1a9],.alert-wrapper.alert-warning .alert-title[data-v-3bf3a1a9]{--tw-text-opacity: 1;color:rgb(194 65 12 / var(--tw-text-opacity))}.alert-wrapper.alert-error[data-v-3bf3a1a9]{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity));--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity))}.alert-wrapper.alert-error .alert-icon[data-v-3bf3a1a9],.alert-wrapper.alert-error .alert-description[data-v-3bf3a1a9]{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.alert-wrapper.alert-error .alert-close[data-v-3bf3a1a9],.alert-wrapper.alert-error .alert-title[data-v-3bf3a1a9]{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity))}
|
|
3
|
-
`)
|
|
4
|
-
`)
|
|
5
|
-
`)();const Kr={class:"card-wrapper"},Fr={key:0,class:"card-header"},Or={class:"card-header-title"},Gr={class:"card-header-actions"},Ur={key:1,class:"card-footer"},Xr=e.defineComponent({__name:"Card",props:{title:{type:String},bodyClass:{type:Object}},setup(t){return(r,o)=>(e.openBlock(),e.createElementBlock("div",Kr,[t.title||r.$slots.header?(e.openBlock(),e.createElementBlock("div",Fr,[e.renderSlot(r.$slots,"header",{},()=>[e.createElementVNode("div",Or,e.toDisplayString(t.title),1),e.createElementVNode("div",Gr,[e.renderSlot(r.$slots,"actions")])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([t.bodyClass,"card-body"])},[e.renderSlot(r.$slots,"default")],2),r.$slots.footer?(e.openBlock(),e.createElementBlock("div",Ur,[e.renderSlot(r.$slots,"footer")])):e.createCommentVNode("",!0)]))}});var an=(()=>`.checkbox-wrapper{display:flex;align-items:center;box-sizing:border-box;flex-grow:0}
|
|
6
|
-
`)();const Pr={class:"checkbox-inner"},qr=["id","checked","value"],Jr=["for"],B=e.defineComponent({__name:"CheckBox",props:{checked:{type:Boolean,default:!1},value:{type:[String,Number,Boolean]},label:{type:String},name:{type:String}},emits:["update:checked","change"],setup(t,{emit:r}){const o=t,n=["checkbox",o.name,o.value].filter(l=>!!l).join("-");function i(l){const{checked:c}=l.target;r("update:checked",c),r("change",l)}return(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([{"checkbox-wrapper-checked":t.checked},"checkbox-wrapper"])},[e.createElementVNode("div",Pr,[e.createElementVNode("input",{id:e.unref(n),checked:t.checked,value:t.value,type:"checkbox",onChange:i},null,40,qr)]),t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:e.unref(n),class:"checkbox-label"},e.toDisplayString(t.label),9,Jr)):e.createCommentVNode("",!0)],2))}});var on=(()=>"")();const Qr={class:"checkbox-group-wrapper"},Wr=e.defineComponent({__name:"CheckBoxGroup",props:{modelValue:{type:Object,default:()=>[]},options:{type:Object},valueKey:{type:String,default:"value"},labelKey:{type:String,default:"label"},name:{type:String}},emits:["update:modelValue","change"],setup(t,{emit:r}){const o=t;function n(i){const{value:l,checked:c}=i.target,d=[...o.modelValue];c?d.push(l):d.splice(d.indexOf(l),1),r("update:modelValue",d),r("change",d)}return(i,l)=>(e.openBlock(),e.createElementBlock("div",Qr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(c,d)=>(e.openBlock(),e.createBlock(e.unref(B),{key:d,checked:t.modelValue.includes(c[t.valueKey]),label:c[t.labelKey],name:t.name,value:c[t.valueKey],onChange:n},null,8,["checked","label","name","value"]))),128))]))}}),Zr={class:"flex items-center justify-between bg-white p-4"},ea={class:"min-w-0 flex-1 self-center"},ta={class:"flex items-center truncate text-xl font-bold text-gray-800"},ra={class:"self-center"},aa=e.defineComponent({__name:"PageHeader",props:{title:{type:String}},setup(t){return(r,o)=>(e.openBlock(),e.createElementBlock("div",Zr,[e.createElementVNode("div",ea,[e.createElementVNode("h2",ta,[e.renderSlot(r.$slots,"icon"),e.createElementVNode("span",null,e.toDisplayString(t.title),1)])]),e.createElementVNode("div",ra,[e.renderSlot(r.$slots,"actions")])]))}});var nn=(()=>`.input-wrapper{box-sizing:border-box;position:relative;width:100%;display:inline-flex}.input-wrapper input{outline-width:0px;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;resize:none;width:100%;--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity));display:block;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid #ced4da;border-radius:4px}.input-wrapper input:active{border-color:#4ccba0}.input-wrapper input:focus{border-color:#4ccba0}.input-wrapper input:disabled{opacity:.5;cursor:not-allowed}.input-wrapper input.input-lg{height:2.75rem;padding-left:1rem;padding-right:1rem;font-size:1.125rem;line-height:1.75rem}.input-wrapper input.input-md{height:2.25rem;padding-left:.75rem;padding-right:.75rem;font-size:.875rem;line-height:1.25rem}.input-wrapper input.input-sm{height:1.75rem;padding-left:.75rem;padding-right:.75rem;font-size:.75rem;line-height:1rem}.input-wrapper input.input-xs{height:1.5rem;padding-left:.5rem;padding-right:.5rem;font-size:.75rem;line-height:1rem}.input-wrapper .input-prefix{position:absolute;display:flex;top:50%;transform:translateY(-50%);align-items:center;justify-content:center}.input-wrapper .input-suffix{position:absolute;display:flex;top:50%;right:0;transform:translateY(-50%);align-items:center;justify-content:center}
|
|
7
|
-
`)()
|
|
8
|
-
`)();const da=["onClick"],pa={key:0,class:"menu-icon mr-3 self-center"},ma={class:"menu-title flex-1 self-center"},ha={class:"sub-menu-items transition-all"},u=e.defineComponent({__name:"MenuItem",props:{id:{type:String,default:""},title:{type:String,default:""},active:{type:Boolean,default:!1}},emits:["select"],setup(t,{emit:r}){const o=t,n=e.useSlots(),i=e.ref(!1),l=e.inject("openIds");l!=null&&l.includes(o.id)&&(i.value=!0);const c=e.computed(()=>n.default&&n.default().length>0);function d(){if(c.value){i.value=!i.value;return}r("select",o.id)}return(s,p)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass([{"has-submenus":e.unref(c)},"menu-item"]),onClick:e.withModifiers(d,["stop"])},[e.createElementVNode("div",{class:e.normalizeClass([{active:t.active},"menu-item-title"])},[s.$slots.icon?(e.openBlock(),e.createElementBlock("span",pa,[e.renderSlot(s.$slots,"icon")])):e.createCommentVNode("",!0),e.createElementVNode("span",ma,e.toDisplayString(t.title),1),s.$slots.default?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass([{open:i.value},"menu-icon-collapse self-center transition-all"])},[e.createVNode(e.unref(x))],2)):e.createCommentVNode("",!0)],2),e.createVNode(e.Transition,{name:"submenus-show"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("ul",ha,[e.renderSlot(s.$slots,"default")],512),[[e.vShow,s.$slots.default&&i.value]])]),_:3})],10,da))}});var cn=(()=>`.menu-label{padding-top:10px;padding-bottom:10px;color:#847e7e;font-size:14px;font-weight:400}
|
|
9
|
-
`)();const wa={},ba={class:"menu-label flex flex-col"};function ga(t,r){return e.openBlock(),e.createElementBlock("li",ba,[e.renderSlot(t.$slots,"default")])}var V=v(wa,[["render",ga]]);const fa=e.defineComponent({name:"VRoutesMenu",props:{menus:{type:Object}},emits:["select"],setup(t,{emit:r}){const o=m.useRoute(),{push:n}=m.useRouter(),i=e.computed(()=>o.matched.map(s=>s.path));async function l(s){r("select",s),await n(s)}function c(s){if(!!s)return e.createVNode(s,{height:"20px",width:"20px"},null)}function d(s){return s==null?void 0:s.map(p=>{var h;return e.createVNode(e.Fragment,null,[(h=p.children)!=null&&h.length?e.createVNode(u,{key:p.path,id:p.path,title:p.name},{default:()=>[d(p.children)],icon:()=>c(p.icon)}):e.createVNode(u,{key:p.path,id:p.path,title:p.name,onSelect:l,active:i.value.includes(p.path)},{icon:()=>c(p.icon)})])})}return()=>e.createVNode(z,{openIds:i.value},{default:()=>{var s;return[(s=t.menus)==null?void 0:s.map(p=>{var h;return e.createVNode(e.Fragment,null,[p.name&&e.createVNode(V,null,{default:()=>[p.name]}),((h=p.items)==null?void 0:h.length)&&d(p.items)])})]}})}});var sn=(()=>`.modal-wrapper{position:fixed;top:0px;left:0px;height:100%;width:100%;display:flex;flex-direction:row;align-items:center;justify-content:center;z-index:999}.modal-wrapper .modal-layer{flex:none;position:absolute;top:0px;left:0px;height:100%;width:100%;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;background-color:rgb(107 114 128 / var(--tw-bg-opacity));--tw-bg-opacity: .75}.modal-wrapper .modal-content{display:flex;flex-direction:column;position:relative;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));align-items:stretch;--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);width:calc(100vw - 20px);max-height:calc(100vh - 20px);border-radius:4px}.modal-wrapper .modal-content .modal-header{display:flex;justify-content:space-between;border-bottom-width:1px}.modal-wrapper .modal-content .modal-header .modal-header-title{align-self:center;font-size:1rem;line-height:1.5rem;font-weight:700;padding:12px 16px}.modal-wrapper .modal-content .modal-header .modal-header-actions{align-self:center;height:100%}.modal-wrapper .modal-content .modal-header .modal-header-actions .modal-header-action{cursor:pointer;padding:12px 16px}.modal-wrapper .modal-content .modal-header .modal-header-actions .modal-header-action:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.modal-wrapper .modal-content .modal-body{overflow-y:auto;overflow-x:hidden;flex:1 1 0%;word-wrap:break-word;padding:12px 16px}.modal-wrapper .modal-content .modal-footer{border-top-width:1px;padding:12px 16px}.modal-wrapper.modal-wrapper-fullscreen .modal-content{width:100vw!important;max-width:100vw!important;height:100vh!important;max-height:100vh!important;border-radius:0}
|
|
10
|
-
`)();const _a={key:0,class:"modal-header"},ua={class:"modal-header-title"},ya={class:"modal-header-actions flex flex-row"},xa={key:1,class:"modal-footer"},C=e.defineComponent({__name:"Modal",props:{visible:{type:Boolean,default:!1},title:{type:String},width:{type:Number,default:500},fullscreen:{type:Boolean,default:!1},bodyClass:{type:Object}},emits:["update:visible","close"],setup(t,{emit:r}){const o=t,n=e.ref(!1),i=e.computed(()=>({"modal-wrapper-fullscreen":o.fullscreen})),l=e.computed(()=>({maxWidth:o.width+"px"}));function c(){r("update:visible",!1),r("close")}return(d,s)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:!0},[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass([e.unref(i),"modal-wrapper"]),"aria-modal":"true",role:"dialog",tabindex:"0",onKeyup:s[4]||(s[4]=e.withKeys(p=>c(),["esc"]))},[e.createVNode(e.Transition,{"enter-active-class":"ease-out duration-200","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0",onBeforeEnter:s[1]||(s[1]=p=>n.value=!0),onAfterLeave:s[2]||(s[2]=p=>n.value=!1)},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:"modal-layer",onClick:s[0]||(s[0]=p=>c())},null,512),[[e.vShow,t.visible]])]),_:1}),e.createVNode(e.Transition,{"enter-active-class":"ease-out duration-200","enter-from-class":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to-class":"opacity-100 translate-y-0 sm:scale-100","leave-active-class":"ease-in duration-100","leave-from-class":"opacity-100 translate-y-0 sm:scale-100","leave-to-class":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{style:e.normalizeStyle(e.unref(l)),class:"modal-content transform transition-all"},[d.$slots.header||t.title?(e.openBlock(),e.createElementBlock("div",_a,[e.renderSlot(d.$slots,"header",{},()=>[e.createElementVNode("div",ua,e.toDisplayString(t.title),1),e.createElementVNode("div",ya,[e.renderSlot(d.$slots,"actions"),e.createElementVNode("div",{class:"modal-header-action",onClick:s[3]||(s[3]=p=>c())},[e.createVNode(e.unref(w))])])])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([t.bodyClass,"modal-body"])},[e.renderSlot(d.$slots,"default")],2),d.$slots.footer?(e.openBlock(),e.createElementBlock("div",xa,[e.renderSlot(d.$slots,"footer")])):e.createCommentVNode("",!0)],4),[[e.vShow,t.visible]])]),_:3})],34),[[e.vShow,n.value]])]))}});var dn=(()=>`.radio-wrapper{display:flex;align-items:center;box-sizing:border-box;flex-grow:0}.radio-wrapper .radio-inner{align-self:center;position:relative}.radio-wrapper .radio-label{display:flex;align-self:center;align-items:flex-start;margin-left:.75rem}
|
|
11
|
-
|
|
12
|
-
`)();const Va={class:"select-wrapper"},Ca=["disabled","value"],Ea={key:"placeholder",disabled:"",hidden:"",value:""},Ma=e.defineComponent({__name:"Select",props:{modelValue:{type:String},size:{type:String,default:"md"},disabled:{type:Boolean,default:!1},placeholder:{type:String}},emits:["update:modelValue"],setup(t,{emit:r}){const o=t,n=e.computed(()=>[`select-${o.size}`]);function i(l){const{value:c}=l.target;r("update:modelValue",c)}return(l,c)=>(e.openBlock(),e.createElementBlock("div",Va,[e.createElementVNode("select",{class:e.normalizeClass(e.unref(n)),disabled:t.disabled,value:t.modelValue,onChange:i},[t.placeholder?(e.openBlock(),e.createElementBlock("option",Ea,e.toDisplayString(t.placeholder),1)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default")],42,Ca)]))}}),Sa=["value"],Na=e.defineComponent({__name:"Option",props:{value:{type:[String,Number,Boolean]}},setup(t){return(r,o)=>(e.openBlock(),e.createElementBlock("option",{value:t.value},[e.renderSlot(r.$slots,"default")],8,Sa))}}),Ia={xs:10,sm:12,md:16,lg:20};var mn=(()=>`.space-wrapper{display:inline-flex;box-sizing:border-box}.space-wrapper.space-direction-row{flex-direction:row}.space-wrapper.space-direction-column{flex-direction:column}.space-wrapper.space-align-center{align-items:center}.space-wrapper.space-align-start{align-items:flex-start}.space-wrapper.space-align-end{align-items:flex-end}.space-wrapper.space-align-stretch{align-items:stretch}
|
|
13
|
-
`)();const M=e.defineComponent({__name:"Space",props:{spacing:{type:String,default:"xs"},direction:{type:String,default:"row"},align:{type:String,default:"center"}},setup(t){const r=t,o=e.computed(()=>{const{direction:n,align:i}=r;return[`space-direction-${n}`,`space-align-${i}`]});return(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(o),"space-wrapper"]),style:e.normalizeStyle(`gap: ${e.unref(Ia)[t.spacing]}px`)},[e.renderSlot(n.$slots,"default")],6))}});var hn=(()=>`.tabs-wrapper{display:flex}.tabs-wrapper.tabs-direction-row{flex-direction:column}.tabs-wrapper.tabs-direction-row .tabs-items-wrapper{margin-top:.5rem}.tabs-wrapper.tabs-direction-column .tabs-items-wrapper{margin-left:.5rem}
|
|
14
|
-
`)();const Aa={class:"tabs-bar-wrapper"},La={class:"tabs-items-wrapper"},Ra=e.defineComponent({__name:"Tabs",props:{activeId:{type:[Number,String]},type:{type:String,default:"default"},direction:{type:String,default:"row"},idKey:{type:String,default:"id"},labelKey:{type:String,default:"label"}},emits:["update:activeId","change"],setup(t,{emit:r}){const o=t;e.provide("activeId",e.computed(()=>o.activeId));const n=e.useSlots(),i=e.computed(()=>{var d;return(d=n.default)==null?void 0:d.call(n).map(({props:s})=>({id:s==null?void 0:s[o.idKey],label:s==null?void 0:s[o.labelKey]}))}),l=e.computed(()=>[`tabs-direction-${o.direction}`]),c=d=>{r("update:activeId",d),r("change",d)};return(d,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(l),"tabs-wrapper"])},[e.createElementVNode("div",Aa,[e.createVNode(e.unref(S),{activeId:t.activeId,direction:t.direction,items:e.unref(i),type:t.type,onChange:c},null,8,["activeId","direction","items","type"])]),e.createElementVNode("div",La,[e.renderSlot(d.$slots,"default")])],2))}}),Ya={key:0,class:"tabs-item-wrapper"},Ha=e.defineComponent({__name:"TabItem",props:{id:{type:String},label:{type:String}},setup(t){const r=t,o=e.inject("activeId"),n=e.computed(()=>(o==null?void 0:o.value)===r.id);return(i,l)=>e.unref(n)?(e.openBlock(),e.createElementBlock("div",Ya,[e.renderSlot(i.$slots,"default")])):e.createCommentVNode("",!0)}});var wn=(()=>`.tabbar-wrapper .tabbar-items{display:flex;align-items:center;flex-direction:row}.tabbar-wrapper .tabbar-item{display:flex;cursor:pointer;align-self:center;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;font-size:1rem;line-height:1.5rem;justify-content:center;gap:.5rem}.tabbar-wrapper .tabbar-item .tabbar-item-label,.tabbar-wrapper .tabbar-item .tabbar-item-icon{align-self:center}.tabbar-wrapper.tabbar-default{border-bottom-width:2px;--tw-border-opacity: 1;border-bottom-color:rgb(243 244 246 / var(--tw-border-opacity))}.tabbar-wrapper.tabbar-default .tabbar-items{margin-bottom:-2px;justify-content:flex-start}.tabbar-wrapper.tabbar-default .tabbar-item{height:2.5rem;padding:.25rem 1.25rem;--tw-border-opacity: 1;border-bottom-color:rgb(243 244 246 / var(--tw-border-opacity));border-bottom-width:2px}.tabbar-wrapper.tabbar-default .tabbar-item.tabbar-item-active{color:#0e1731;border-bottom-color:#0e1731}.tabbar-wrapper.tabbar-pills .tabbar-items{gap:.25rem;justify-content:flex-start}.tabbar-wrapper.tabbar-pills .tabbar-item{height:2.5rem;padding:.25rem 2.25rem;opacity:.7;border-radius:4px}.tabbar-wrapper.tabbar-pills .tabbar-item.tabbar-item-active{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));opacity:1}.tabbar-wrapper.tabbar-pills .tabbar-item:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.tabbar-wrapper.tabbar-outline{padding:.25rem;--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity));border-radius:4px}.tabbar-wrapper.tabbar-outline .tabbar-items{gap:.25rem;justify-content:flex-start}.tabbar-wrapper.tabbar-outline .tabbar-item{height:2.5rem;padding:.25rem 2.25rem;opacity:.7;border-radius:4px}.tabbar-wrapper.tabbar-outline .tabbar-item.tabbar-item-active{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));opacity:1;--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)}.tabbar-wrapper.tabbar-outline .tabbar-item:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.tabbar-wrapper.tabbar-direction-row .tabbar-items{flex-direction:row}.tabbar-wrapper.tabbar-direction-column .tabbar-items{flex-direction:column}.tabbar-wrapper.tabbar-direction-column.tabbar-default{border-bottom-width:0;border-bottom-width:0px;border-right-width:2px;--tw-border-opacity: 1;border-right-color:rgb(243 244 246 / var(--tw-border-opacity))}.tabbar-wrapper.tabbar-direction-column.tabbar-default .tabbar-items{margin-bottom:0;margin-right:-2px}.tabbar-wrapper.tabbar-direction-column.tabbar-default .tabbar-item{border-bottom-width:0;border-right-width:2px}.tabbar-wrapper.tabbar-direction-column.tabbar-default .tabbar-item.tabbar-item-active{border-right-color:#0e1731}
|
|
15
|
-
`)();const Da={class:"tabbar-items"},ja=["onClick"],Ta={key:0,class:"tabbar-item-icon"},Ka={key:1,class:"tabbar-item-label"},S=e.defineComponent({__name:"Tabbar",props:{activeId:{type:[Number,String]},items:{type:Object},type:{type:String,default:"default"},direction:{type:String,default:"row"},idKey:{type:String,default:"id"},labelKey:{type:String,default:"label"}},emits:["update:activeId","change"],setup(t,{emit:r}){const o=t,n=e.computed(()=>[`tabbar-${o.type}`,`tabbar-direction-${o.direction}`]),i=l=>{r("update:activeId",l),r("change",l)};return(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(n),"tabbar-wrapper"])},[e.createElementVNode("div",Da,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(d,s)=>(e.openBlock(),e.createElementBlock("div",{key:s,class:e.normalizeClass([{"tabbar-item-active":d[t.idKey]===t.activeId},"tabbar-item"]),onClick:p=>i(d[t.idKey])},[d.icon?(e.openBlock(),e.createElementBlock("div",Ta,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(d.icon)))])):e.createCommentVNode("",!0),d[t.labelKey]?(e.openBlock(),e.createElementBlock("div",Ka,e.toDisplayString(d[t.labelKey]),1)):e.createCommentVNode("",!0)],10,ja))),128))])],2))}});var bn=(()=>`.tag-wrapper{border-radius:4px;display:inline-flex;flex-shrink:0;flex-wrap:wrap;box-sizing:border-box;cursor:pointer;text-align:center;align-items:center;justify-content:center;width:auto;vertical-align:middle;height:1.25rem;font-size:.75rem;line-height:1rem}.tag-wrapper.tag-default{border:1px solid #d9d9d9}.tag-wrapper.tag-primary{background:#4ccba0;border:1px solid #4ccba0;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.tag-wrapper.tag-secondary{background:#0e1731;border:1px solid #0e1731;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.tag-wrapper.tag-danger{background:#d71d1d;border:1px solid #d71d1d;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.tag-wrapper.tag-rounded{border-radius:9999px}.tag-wrapper .tag-content{padding-left:.25rem;padding-right:.25rem}.tag-wrapper .tag-left-icon{padding-left:.25rem}.tag-wrapper .tag-right-icon{padding-right:.25rem}
|
|
16
|
-
`)();const Fa={key:0,class:"tag-left-icon"},Oa={class:"tag-content"},Ga={key:1,class:"tag-right-icon"},Ua=e.defineComponent({__name:"Tag",props:{theme:{type:String,default:"default"},rounded:{type:Boolean,default:!1}},setup(t){const r=t,o=e.computed(()=>[`tag-${r.theme}`,{"tag-rounded":r.rounded}]);return(n,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([e.unref(o),"tag-wrapper"])},[n.$slots.leftIcon?(e.openBlock(),e.createElementBlock("div",Fa,[e.renderSlot(n.$slots,"leftIcon")])):e.createCommentVNode("",!0),e.createElementVNode("span",Oa,[e.renderSlot(n.$slots,"default")]),n.$slots.rightIcon?(e.openBlock(),e.createElementBlock("div",Ga,[e.renderSlot(n.$slots,"rightIcon")])):e.createCommentVNode("",!0)],2))}});var gn=(()=>`.textarea-wrapper{box-sizing:border-box;position:relative;width:100%;display:inline-flex}.textarea-wrapper textarea{outline-width:0px;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:100%;--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity));display:block;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s;-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:.75rem;font-size:.875rem;line-height:1.25rem;border:1px solid #ced4da;border-radius:4px}.textarea-wrapper textarea:active{border-color:#4ccba0}.textarea-wrapper textarea:focus{border-color:#4ccba0}.textarea-wrapper textarea:disabled{opacity:.5;cursor:not-allowed}
|
|
17
|
-
`)();const Xa={class:"textarea-wrapper"},Pa=["disabled","placeholder","rows","value"],qa=e.defineComponent({__name:"Textarea",props:{modelValue:{type:String},disabled:{type:Boolean,default:!1},placeholder:{type:String},rows:{type:Number,default:3}},emits:["update:modelValue"],setup(t,{emit:r}){function o(n){const{value:i}=n.target;r("update:modelValue",i)}return(n,i)=>(e.openBlock(),e.createElementBlock("div",Xa,[e.createElementVNode("textarea",{disabled:t.disabled,placeholder:t.placeholder,rows:t.rows,value:t.modelValue,onInput:o},`
|
|
18
|
-
`,40,Pa)]))}});var fn=(()=>`.switch-wrapper{display:inline-flex;box-sizing:border-box}.switch-wrapper .switch-inner{position:relative;display:inline-flex;flex-shrink:0;height:1.5rem;width:2.75rem;border-width:2px;border-color:transparent;border-radius:9999px;cursor:pointer;transition-property:color,background-color,border-color,fill,stroke,-webkit-text-decoration-color;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,-webkit-text-decoration-color;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}.switch-wrapper .switch-inner .switch-indicator{pointer-events:none;display:inline-block;height:1.25rem;width:1.25rem;border-radius:9999px;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));--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);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));--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(0px + 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);transition-property:color,background-color,border-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-text-decoration-color,-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-text-decoration-color,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s}
|
|
19
|
-
`)();const Ja={class:"switch-wrapper"},Qa=e.defineComponent({__name:"Switch",props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:r}){const o=t,n=()=>{r("update:modelValue",!o.modelValue),r("change",!o.modelValue)};return(i,l)=>(e.openBlock(),e.createElementBlock("div",Ja,[e.createElementVNode("button",{class:e.normalizeClass([{"bg-gray-200":!t.modelValue,"!bg-themeable-primary-600":t.modelValue},"switch-inner"]),"aria-checked":"false",role:"switch",type:"button",onClick:n},[e.createElementVNode("span",{class:e.normalizeClass([{"translate-x-0":!t.modelValue,"translate-x-5":t.modelValue},"switch-indicator"]),"aria-hidden":"true"},[e.renderSlot(i.$slots,"icon")],2)],2)]))}}),Wa={class:"flex justify-between items-start py-2 mb-2"},Za={class:"flex items-center gap-4"},eo={class:"flex-1 flex flex-col items-stretch gap-2"},to={class:"text-base text-gray-900 font-bold"},ro={class:"text-sm text-gray-700"},N=e.defineComponent({__name:"Dialog",props:{type:{type:String,default:"info"},title:{type:String,default:"\u63D0\u793A"},description:{type:String,default:""},confirmText:{type:String,default:"\u786E\u5B9A"},cancelText:{type:String,default:"\u53D6\u6D88"},visible:{type:Boolean,default:!1},onConfirm:{type:Function},onCancel:{type:Function}},emits:["update:visible","close"],setup(t,{emit:r}){const o=t,n={success:{icon:f,color:"green"},info:{icon:b,color:"blue"},warning:{icon:g,color:"orange"},error:{icon:$,color:"red"}},i=e.computed(()=>n[o.type]),l=e.ref(!1),c=()=>{o.onCancel&&o.onCancel(),s()},d=async()=>{o.onConfirm&&(l.value=!0,await o.onConfirm()),s()},s=()=>{l.value=!1,r("update:visible",!1),r("close")};return(p,h)=>(e.openBlock(),e.createBlock(e.unref(C),{visible:t.visible,width:450,onClose:h[0]||(h[0]=_n=>c())},{footer:e.withCtx(()=>[e.createVNode(e.unref(M),null,{default:e.withCtx(()=>[e.createVNode(e.unref(_),{loading:l.value,type:"secondary",onClick:d},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.confirmText),1)]),_:1},8,["loading"]),e.createVNode(e.unref(_),{onClick:c},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelText),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",Wa,[e.createElementVNode("div",null,[e.createElementVNode("div",{class:e.normalizeClass([`ring-${e.unref(i).color}-100`,"inline-flex rounded-full bg-teal-50 p-1.5 ring-4"])},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(i).icon),{class:e.normalizeClass([`text-${e.unref(i).color}-500`,"w-5 h-5"])},null,8,["class"]))],2)]),e.createElementVNode("div",null,[e.createVNode(e.unref(w),{class:"cursor-pointer",onClick:c})])]),e.createElementVNode("div",Za,[e.createElementVNode("div",eo,[e.createElementVNode("div",to,e.toDisplayString(t.title),1),e.createElementVNode("div",ro,e.toDisplayString(t.description),1)])])]),_:1},8,["visible"]))}}),I="DIALOG_PROVIDER_PROVIDE_KEY",ao=e.defineComponent({__name:"DialogProvider",setup(t){const r=e.ref({visible:!1,title:""});return e.provide(I,r),(o,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.renderSlot(o.$slots,"default"),e.createVNode(e.unref(N),{visible:r.value.visible,"onUpdate:visible":n[0]||(n[0]=i=>r.value.visible=i),"cancel-text":r.value.cancelText,"confirm-text":r.value.confirmText,description:r.value.description,onCancel:r.value.onCancel,onConfirm:r.value.onConfirm,title:r.value.title,type:r.value.type},null,8,["visible","cancel-text","confirm-text","description","onCancel","onConfirm","title","type"])],64))}});function oo(){const t=e.inject(I);if(!t)throw new Error("DialogProvider is not mounted");const r=o=>n=>{t.value=y(y({},t.value),n),t.value.type=o,t.value.visible=!0};return{success:r("success"),info:r("info"),warning:r("warning"),error:r("error")}}return a.IconAddCircle=xt,a.IconArrowDown=J,a.IconArrowDownLine=oe,a.IconArrowLeft=F,a.IconArrowRight=x,a.IconArrowUpLine=ee,a.IconBookRead=ce,a.IconCheckboxCircle=f,a.IconCheckboxFill=Yt,a.IconClose=w,a.IconCloseCircle=k,a.IconComputer=Gt,a.IconDashboard=D,a.IconDeleteBin=ft,a.IconErrorWarning=g,a.IconExchange=lr,a.IconEye=Oe,a.IconFolder=Pe,a.IconForbidLine=$,a.IconGitBranch=$r,a.IconGitHub=pr,a.IconGrid=It,a.IconInformation=b,a.IconList=Et,a.IconListSettings=ve,a.IconMagic=Ce,a.IconMessage=ge,a.IconMore=We,a.IconPages=me,a.IconPalette=ye,a.IconPhone=qt,a.IconPlug=je,a.IconSave=Bt,a.IconSearch=Tt,a.IconSettings=Re,a.IconShieldUser=ur,a.IconStopCircle=Vr,a.IconTablet=Zt,a.IconUpload=br,a.IconUserFollow=ar,a.IconUserSettings=Ne,a.VAlert=Rr,a.VButton=_,a.VCard=Xr,a.VCheckbox=B,a.VCheckboxGroup=Wr,a.VDialog=N,a.VDialogProvider=ao,a.VInput=ca,a.VMenu=z,a.VMenuItem=u,a.VMenuLabel=V,a.VModal=C,a.VOption=Na,a.VPageHeader=aa,a.VRadio=E,a.VRadioGroup=za,a.VRoutesMenu=fa,a.VSelect=Ma,a.VSpace=M,a.VSwitch=Qa,a.VTabItem=Ha,a.VTabbar=S,a.VTabs=Ra,a.VTag=Ua,a.VTextarea=qa,a.useDialog=oo,Object.defineProperties(a,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}}),a}({},Vue,VueRouter);
|
|
1
|
+
var HaloComponents=function(M,c,or){"use strict";var kC="";const $u={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Tu=[c.createElementVNode("path",{fill:"currentColor",d:"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12S6.477 2 12 2zm0 2a8 8 0 1 0 0 16a8 8 0 0 0 0-16zm3.833 3.337a.595.595 0 0 1 .763.067a.59.59 0 0 1 .063.76c-2.18 3.046-3.38 4.678-3.598 4.897a1.502 1.502 0 0 1-2.122 0a1.502 1.502 0 0 1 0-2.122c.374-.373 2.005-1.574 4.894-3.602zM17.5 11a1 1 0 1 1 0 2a1 1 0 0 1 0-2zm-11 0a1 1 0 1 1 0 2a1 1 0 0 1 0-2zm2.318-3.596a1 1 0 1 1-1.416 1.414a1 1 0 0 1 1.416-1.414zM12 5.5a1 1 0 1 1 0 2a1 1 0 0 1 0-2z"},null,-1)];function Lu(n,e){return c.openBlock(),c.createElementBlock("svg",$u,Tu)}var Vu={name:"ri-dashboard-3-line",render:Lu};const Ru={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Iu=[c.createElementVNode("path",{fill:"currentColor",d:"m10.828 12l4.95 4.95l-1.414 1.414L8 12l6.364-6.364l1.414 1.414z"},null,-1)];function Nu(n,e){return c.openBlock(),c.createElementBlock("svg",Ru,Iu)}var lr={name:"ri-arrow-left-s-line",render:Nu};const zu={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Hu=[c.createElementVNode("path",{fill:"currentColor",d:"m13.172 12l-4.95-4.95l1.414-1.414L16 12l-6.364 6.364l-1.414-1.414z"},null,-1)];function Fu(n,e){return c.openBlock(),c.createElementBlock("svg",zu,Hu)}var Fn={name:"ri-arrow-right-s-line",render:Fu};const Wu={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},ju=[c.createElementVNode("path",{fill:"currentColor",d:"m12 16l-6-6h12z"},null,-1)];function Uu(n,e){return c.openBlock(),c.createElementBlock("svg",Wu,ju)}var qu={name:"ri-arrow-down-s-fill",render:Uu};const Ku={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Gu=[c.createElementVNode("path",{fill:"currentColor",d:"m12 10.828l-4.95 4.95l-1.414-1.414L12 8l6.364 6.364l-1.414 1.414z"},null,-1)];function Yu(n,e){return c.openBlock(),c.createElementBlock("svg",Ku,Gu)}var Ju={name:"ri-arrow-up-s-line",render:Yu};const Xu={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Qu=[c.createElementVNode("path",{fill:"currentColor",d:"m12 13.172l4.95-4.95l1.414 1.414L12 16L5.636 9.636L7.05 8.222z"},null,-1)];function Zu(n,e){return c.openBlock(),c.createElementBlock("svg",Xu,Qu)}var ed={name:"ri-arrow-down-s-line",render:Zu};const td={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},nd=[c.createElementVNode("path",{fill:"currentColor",d:"M2 3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V3.993zM11 5H4v14h7V5zm2 0v14h7V5h-7zm1 2h5v2h-5V7zm0 3h5v2h-5v-2z"},null,-1)];function id(n,e){return c.openBlock(),c.createElementBlock("svg",td,nd)}var rd={name:"ri-book-read-line",render:id};const sd={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},od=[c.createElementVNode("path",{fill:"currentColor",d:"M5 8v12h14V8H5zm0-2h14V4H5v2zm15 16H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1zM7 10h4v4H7v-4zm0 6h10v2H7v-2zm6-5h4v2h-4v-2z"},null,-1)];function ld(n,e){return c.openBlock(),c.createElementBlock("svg",sd,od)}var ad={name:"ri-pages-line",render:ld};const cd={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},hd=[c.createElementVNode("path",{fill:"currentColor",d:"M2 8.994A5.99 5.99 0 0 1 8 3h8c3.313 0 6 2.695 6 5.994V21H8c-3.313 0-6-2.695-6-5.994V8.994zM20 19V8.994A4.004 4.004 0 0 0 16 5H8a3.99 3.99 0 0 0-4 3.994v6.012A4.004 4.004 0 0 0 8 19h12zm-6-8h2v2h-2v-2zm-6 0h2v2H8v-2z"},null,-1)];function fd(n,e){return c.openBlock(),c.createElementBlock("svg",cd,hd)}var ud={name:"ri-message-3-line",render:fd};const dd={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},pd=[c.createElementVNode("path",{fill:"currentColor",d:"M12 2c5.522 0 10 3.978 10 8.889a5.558 5.558 0 0 1-5.556 5.555h-1.966c-.922 0-1.667.745-1.667 1.667c0 .422.167.811.422 1.1c.267.3.434.689.434 1.122C13.667 21.256 12.9 22 12 22C6.478 22 2 17.522 2 12S6.478 2 12 2zm-1.189 16.111a3.664 3.664 0 0 1 3.667-3.667h1.966A3.558 3.558 0 0 0 20 10.89C20 7.139 16.468 4 12 4a8 8 0 0 0-.676 15.972a3.648 3.648 0 0 1-.513-1.86zM7.5 12a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3zm9 0a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3zM12 9a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3z"},null,-1)];function md(n,e){return c.openBlock(),c.createElementBlock("svg",dd,pd)}var gd={name:"ri-palette-line",render:md};const yd={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},wd=[c.createElementVNode("path",{fill:"currentColor",d:"M2 18h7v2H2v-2zm0-7h9v2H2v-2zm0-7h20v2H2V4zm18.674 9.025l1.156-.391l1 1.732l-.916.805a4.017 4.017 0 0 1 0 1.658l.916.805l-1 1.732l-1.156-.391c-.41.37-.898.655-1.435.83L19 21h-2l-.24-1.196a3.996 3.996 0 0 1-1.434-.83l-1.156.392l-1-1.732l.916-.805a4.017 4.017 0 0 1 0-1.658l-.916-.805l1-1.732l1.156.391c.41-.37.898-.655 1.435-.83L17 11h2l.24 1.196c.536.174 1.024.46 1.434.83zM18 18a2 2 0 1 0 0-4a2 2 0 0 0 0 4z"},null,-1)];function bd(n,e){return c.openBlock(),c.createElementBlock("svg",yd,wd)}var vd={name:"ri-list-settings-line",render:bd};const xd={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},kd=[c.createElementVNode("path",{fill:"currentColor",d:"M15.199 9.945a2.6 2.6 0 0 1-.79-1.551l-.403-3.083l-2.73 1.486a2.6 2.6 0 0 1-1.72.273L6.5 6.5l.57 3.056a2.6 2.6 0 0 1-.273 1.72l-1.486 2.73l3.083.403a2.6 2.6 0 0 1 1.55.79l2.138 2.257l1.336-2.807a2.6 2.6 0 0 1 1.23-1.231l2.808-1.336l-2.257-2.137zm.025 5.563l-2.213 4.65a.6.6 0 0 1-.977.155l-3.542-3.739a.6.6 0 0 0-.357-.182l-5.107-.668a.6.6 0 0 1-.449-.881l2.462-4.524a.6.6 0 0 0 .062-.396L4.16 4.86a.6.6 0 0 1 .7-.7l5.063.943a.6.6 0 0 0 .396-.062l4.524-2.462a.6.6 0 0 1 .881.45l.668 5.106a.6.6 0 0 0 .182.357l3.739 3.542a.6.6 0 0 1-.155.977l-4.65 2.213a.6.6 0 0 0-.284.284zm.797 1.927l1.414-1.414l4.243 4.242l-1.415 1.415l-4.242-4.243z"},null,-1)];function Sd(n,e){return c.openBlock(),c.createElementBlock("svg",xd,kd)}var Cd={name:"ri-magic-line",render:Sd};const _d={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Md=[c.createElementVNode("path",{fill:"currentColor",d:"M12 14v2a6 6 0 0 0-6 6H4a8 8 0 0 1 8-8zm0-1c-3.315 0-6-2.685-6-6s2.685-6 6-6s6 2.685 6 6s-2.685 6-6 6zm0-2c2.21 0 4-1.79 4-4s-1.79-4-4-4s-4 1.79-4 4s1.79 4 4 4zm2.595 7.812a3.51 3.51 0 0 1 0-1.623l-.992-.573l1-1.732l.992.573A3.496 3.496 0 0 1 17 14.645V13.5h2v1.145c.532.158 1.012.44 1.405.812l.992-.573l1 1.732l-.992.573a3.51 3.51 0 0 1 0 1.622l.992.573l-1 1.732l-.992-.573a3.496 3.496 0 0 1-1.405.812V22.5h-2v-1.145a3.496 3.496 0 0 1-1.405-.812l-.992.573l-1-1.732l.992-.572zM18 19.5a1.5 1.5 0 1 0 0-3a1.5 1.5 0 0 0 0 3z"},null,-1)];function Ad(n,e){return c.openBlock(),c.createElementBlock("svg",_d,Md)}var Od={name:"ri-user-settings-line",render:Ad};const Bd={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Ed=[c.createElementVNode("path",{fill:"currentColor",d:"M2 12c0-.865.11-1.703.316-2.504A3 3 0 0 0 4.99 4.867a9.99 9.99 0 0 1 4.335-2.505a3 3 0 0 0 5.348 0a9.99 9.99 0 0 1 4.335 2.505a3 3 0 0 0 2.675 4.63a10.036 10.036 0 0 1 0 5.007a3 3 0 0 0-2.675 4.629a9.99 9.99 0 0 1-4.335 2.505a3 3 0 0 0-5.348 0a9.99 9.99 0 0 1-4.335-2.505a3 3 0 0 0-2.675-4.63A10.056 10.056 0 0 1 2 12zm4.804 3c.63 1.091.81 2.346.564 3.524c.408.29.842.541 1.297.75A4.993 4.993 0 0 1 12 18c1.26 0 2.438.471 3.335 1.274c.455-.209.889-.46 1.297-.75A4.993 4.993 0 0 1 17.196 15a4.993 4.993 0 0 1 2.77-2.25a8.126 8.126 0 0 0 0-1.5A4.993 4.993 0 0 1 17.195 9a4.993 4.993 0 0 1-.564-3.524a7.989 7.989 0 0 0-1.297-.75A4.993 4.993 0 0 1 12 6a4.993 4.993 0 0 1-3.335-1.274a7.99 7.99 0 0 0-1.297.75A4.993 4.993 0 0 1 6.804 9a4.993 4.993 0 0 1-2.77 2.25a8.126 8.126 0 0 0 0 1.5A4.993 4.993 0 0 1 6.805 15zM12 15a3 3 0 1 1 0-6a3 3 0 0 1 0 6zm0-2a1 1 0 1 0 0-2a1 1 0 0 0 0 2z"},null,-1)];function Pd(n,e){return c.openBlock(),c.createElementBlock("svg",Bd,Ed)}var Dd={name:"ri-settings-4-line",render:Pd};const $d={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Td=[c.createElementVNode("path",{fill:"currentColor",d:"M13 18v2h6v2h-6a2 2 0 0 1-2-2v-2H8a4 4 0 0 1-4-4V7a1 1 0 0 1 1-1h2V2h2v4h6V2h2v4h2a1 1 0 0 1 1 1v7a4 4 0 0 1-4 4h-3zm-5-2h8a2 2 0 0 0 2-2v-3H6v3a2 2 0 0 0 2 2zm10-8H6v1h12V8zm-6 6.5a1 1 0 1 1 0-2a1 1 0 0 1 0 2zM11 2h2v3h-2V2z"},null,-1)];function Ld(n,e){return c.openBlock(),c.createElementBlock("svg",$d,Td)}var Vd={name:"ri-plug-2-line",render:Ld};const Rd={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Id=[c.createElementVNode("path",{fill:"currentColor",d:"M12 3c5.392 0 9.878 3.88 10.819 9c-.94 5.12-5.427 9-10.819 9c-5.392 0-9.878-3.88-10.819-9C2.121 6.88 6.608 3 12 3zm0 16a9.005 9.005 0 0 0 8.777-7a9.005 9.005 0 0 0-17.554 0A9.005 9.005 0 0 0 12 19zm0-2.5a4.5 4.5 0 1 1 0-9a4.5 4.5 0 0 1 0 9zm0-2a2.5 2.5 0 1 0 0-5a2.5 2.5 0 0 0 0 5z"},null,-1)];function Nd(n,e){return c.openBlock(),c.createElementBlock("svg",Rd,Id)}var zd={name:"ri-eye-line",render:Nd};const Hd={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Fd=[c.createElementVNode("path",{fill:"currentColor",d:"M12.414 5H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414l2 2zM20 11H4v8h16v-8zm0-2V7h-8.414l-2-2H4v4h16z"},null,-1)];function Wd(n,e){return c.openBlock(),c.createElementBlock("svg",Hd,Fd)}var jd={name:"ri-folder-2-line",render:Wd};const Ud={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},qd=[c.createElementVNode("path",{fill:"currentColor",d:"M4.5 10.5c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5S6 12.825 6 12s-.675-1.5-1.5-1.5zm15 0c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5S21 12.825 21 12s-.675-1.5-1.5-1.5zm-7.5 0c-.825 0-1.5.675-1.5 1.5s.675 1.5 1.5 1.5s1.5-.675 1.5-1.5s-.675-1.5-1.5-1.5z"},null,-1)];function Kd(n,e){return c.openBlock(),c.createElementBlock("svg",Ud,qd)}var Gd={name:"ri-more-line",render:Kd};const Yd={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Jd=[c.createElementVNode("path",{fill:"currentColor",d:"m12 10.586l4.95-4.95l1.414 1.414l-4.95 4.95l4.95 4.95l-1.414 1.414l-4.95-4.95l-4.95 4.95l-1.414-1.414l4.95-4.95l-4.95-4.95L7.05 5.636z"},null,-1)];function Xd(n,e){return c.openBlock(),c.createElementBlock("svg",Yd,Jd)}var Wn={name:"ri-close-line",render:Xd};const Qd={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Zd=[c.createElementVNode("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10zm0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16zm-1-5h2v2h-2v-2zm0-8h2v6h-2V7z"},null,-1)];function ep(n,e){return c.openBlock(),c.createElementBlock("svg",Qd,Zd)}var ar={name:"ri-error-warning-line",render:ep};const tp={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},np=[c.createElementVNode("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10zm0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16zm-.997-4L6.76 11.757l1.414-1.414l2.829 2.829l5.656-5.657l1.415 1.414L11.003 16z"},null,-1)];function ip(n,e){return c.openBlock(),c.createElementBlock("svg",tp,np)}var cr={name:"ri-checkbox-circle-line",render:ip};const rp={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},sp=[c.createElementVNode("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10zm0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16zM11 7h2v2h-2V7zm0 4h2v6h-2v-6z"},null,-1)];function op(n,e){return c.openBlock(),c.createElementBlock("svg",rp,sp)}var jn={name:"ri-information-line",render:op};const lp={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},ap=[c.createElementVNode("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10zm0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16zm0-9.414l2.828-2.829l1.415 1.415L13.414 12l2.829 2.828l-1.415 1.415L12 13.414l-2.828 2.829l-1.415-1.415L10.586 12L7.757 9.172l1.415-1.415L12 10.586z"},null,-1)];function cp(n,e){return c.openBlock(),c.createElementBlock("svg",lp,ap)}var mo={name:"ri-close-circle-line",render:cp};const hp={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},fp=[c.createElementVNode("path",{fill:"currentColor",d:"M17 6h5v2h-2v13a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V8H2V6h5V3a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v3zm1 2H6v12h12V8zm-4.586 6l1.768 1.768l-1.414 1.414L12 15.414l-1.768 1.768l-1.414-1.414L10.586 14l-1.768-1.768l1.414-1.414L12 12.586l1.768-1.768l1.414 1.414L13.414 14zM9 4v2h6V4H9z"},null,-1)];function up(n,e){return c.openBlock(),c.createElementBlock("svg",hp,fp)}var dp={name:"ri-delete-bin-2-line",render:up};const pp={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},mp=[c.createElementVNode("path",{fill:"currentColor",d:"M11 11V7h2v4h4v2h-4v4h-2v-4H7v-2h4zm1 11C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10zm0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16z"},null,-1)];function gp(n,e){return c.openBlock(),c.createElementBlock("svg",pp,mp)}var yp={name:"ri-add-circle-line",render:gp};const wp={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},bp=[c.createElementVNode("path",{fill:"currentColor",d:"M7 19v-6h10v6h2V7.828L16.172 5H5v14h2zM4 3h13l4 4v13a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm5 12v4h6v-4H9z"},null,-1)];function vp(n,e){return c.openBlock(),c.createElementBlock("svg",wp,bp)}var xp={name:"ri-save-line",render:vp};const kp={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Sp=[c.createElementVNode("path",{fill:"currentColor",d:"M8 4h13v2H8V4zM4.5 6.5a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3zm0 7a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3zm0 6.9a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3zM8 11h13v2H8v-2zm0 7h13v2H8v-2z"},null,-1)];function Cp(n,e){return c.openBlock(),c.createElementBlock("svg",kp,Sp)}var _p={name:"ri-list-unordered",render:Cp};const Mp={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Ap=[c.createElementVNode("path",{fill:"currentColor",d:"M14 10h-4v4h4v-4zm2 0v4h3v-4h-3zm-2 9v-3h-4v3h4zm2 0h3v-3h-3v3zM14 5h-4v3h4V5zm2 0v3h3V5h-3zm-8 5H5v4h3v-4zm0 9v-3H5v3h3zM8 5H5v3h3V5zM4 3h16a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z"},null,-1)];function Op(n,e){return c.openBlock(),c.createElementBlock("svg",Mp,Ap)}var Bp={name:"ri-grid-line",render:Op};const Ep={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Pp=[c.createElementVNode("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10zm-.997-6l7.07-7.071l-1.414-1.414l-5.656 5.657l-2.829-2.829l-1.414 1.414L11.003 16z"},null,-1)];function Dp(n,e){return c.openBlock(),c.createElementBlock("svg",Ep,Pp)}var $p={name:"ri-checkbox-circle-fill",render:Dp};const Tp={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Lp=[c.createElementVNode("path",{fill:"currentColor",d:"M11 2c4.968 0 9 4.032 9 9s-4.032 9-9 9s-9-4.032-9-9s4.032-9 9-9zm0 16c3.867 0 7-3.133 7-7c0-3.868-3.133-7-7-7c-3.868 0-7 3.132-7 7c0 3.867 3.132 7 7 7zm8.485.071l2.829 2.828l-1.415 1.415l-2.828-2.829l1.414-1.414z"},null,-1)];function Vp(n,e){return c.openBlock(),c.createElementBlock("svg",Tp,Lp)}var Rp={name:"ri-search-2-line",render:Vp};const Ip={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Np=[c.createElementVNode("path",{fill:"currentColor",d:"M4 16h16V5H4v11zm9 2v2h4v2H7v-2h4v-2H2.992A.998.998 0 0 1 2 16.993V4.007C2 3.451 2.455 3 2.992 3h18.016c.548 0 .992.449.992 1.007v12.986c0 .556-.455 1.007-.992 1.007H13z"},null,-1)];function zp(n,e){return c.openBlock(),c.createElementBlock("svg",Ip,Np)}var Hp={name:"ri-computer-line",render:zp};const Fp={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Wp=[c.createElementVNode("path",{fill:"currentColor",d:"M7 4v16h10V4H7zM6 2h12a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm6 15a1 1 0 1 1 0 2a1 1 0 0 1 0-2z"},null,-1)];function jp(n,e){return c.openBlock(),c.createElementBlock("svg",Fp,Wp)}var Up={name:"ri-smartphone-line",render:jp};const qp={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Kp=[c.createElementVNode("path",{fill:"currentColor",d:"M6 4v16h12V4H6zM5 2h14a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm7 15a1 1 0 1 1 0 2a1 1 0 0 1 0-2z"},null,-1)];function Gp(n,e){return c.openBlock(),c.createElementBlock("svg",qp,Kp)}var Yp={name:"ri-tablet-line",render:Gp};const Jp={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Xp=[c.createElementVNode("path",{fill:"currentColor",d:"M14 14.252v2.09A6 6 0 0 0 6 22l-2-.001a8 8 0 0 1 10-7.748zM12 13c-3.315 0-6-2.685-6-6s2.685-6 6-6s6 2.685 6 6s-2.685 6-6 6zm0-2c2.21 0 4-1.79 4-4s-1.79-4-4-4s-4 1.79-4 4s1.79 4 4 4zm5.793 8.914l3.535-3.535l1.415 1.414l-4.95 4.95l-3.536-3.536l1.415-1.414l2.12 2.121z"},null,-1)];function Qp(n,e){return c.openBlock(),c.createElementBlock("svg",Jp,Xp)}var Zp={name:"ri-user-follow-line",render:Qp};const em={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},tm=[c.createElementVNode("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10zm0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16zm-5-7h9v2h-4v3l-5-5zm5-4V6l5 5H8V9h4z"},null,-1)];function nm(n,e){return c.openBlock(),c.createElementBlock("svg",em,tm)}var im={name:"ri-exchange-line",render:nm};const rm={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},sm=[c.createElementVNode("path",{fill:"currentColor",d:"M12 2C6.475 2 2 6.475 2 12a9.994 9.994 0 0 0 6.838 9.488c.5.087.687-.213.687-.476c0-.237-.013-1.024-.013-1.862c-2.512.463-3.162-.612-3.362-1.175c-.113-.288-.6-1.175-1.025-1.413c-.35-.187-.85-.65-.013-.662c.788-.013 1.35.725 1.538 1.025c.9 1.512 2.338 1.087 2.912.825c.088-.65.35-1.087.638-1.337c-2.225-.25-4.55-1.113-4.55-4.938c0-1.088.387-1.987 1.025-2.688c-.1-.25-.45-1.275.1-2.65c0 0 .837-.262 2.75 1.026a9.28 9.28 0 0 1 2.5-.338c.85 0 1.7.112 2.5.337c1.912-1.3 2.75-1.024 2.75-1.024c.55 1.375.2 2.4.1 2.65c.637.7 1.025 1.587 1.025 2.687c0 3.838-2.337 4.688-4.562 4.938c.362.312.675.912.675 1.85c0 1.337-.013 2.412-.013 2.75c0 .262.188.574.688.474A10.016 10.016 0 0 0 22 12c0-5.525-4.475-10-10-10z"},null,-1)];function om(n,e){return c.openBlock(),c.createElementBlock("svg",rm,sm)}var lm={name:"ri-github-fill",render:om};const am={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},cm=[c.createElementVNode("path",{fill:"currentColor",d:"m12 12.586l4.243 4.242l-1.415 1.415L13 16.415V22h-2v-5.587l-1.828 1.83l-1.415-1.415L12 12.586zM12 2a7.001 7.001 0 0 1 6.954 6.194a5.5 5.5 0 0 1-.953 10.784v-2.014a3.5 3.5 0 1 0-1.112-6.91a5 5 0 1 0-9.777 0a3.5 3.5 0 0 0-1.292 6.88l.18.03v2.014a5.5 5.5 0 0 1-.954-10.784A7 7 0 0 1 12 2z"},null,-1)];function hm(n,e){return c.openBlock(),c.createElementBlock("svg",am,cm)}var fm={name:"ri-upload-cloud-2-line",render:hm};const um={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},dm=[c.createElementVNode("path",{fill:"currentColor",d:"M3.783 2.826L12 1l8.217 1.826a1 1 0 0 1 .783.976v9.987a6 6 0 0 1-2.672 4.992L12 23l-6.328-4.219A6 6 0 0 1 3 13.79V3.802a1 1 0 0 1 .783-.976zM5 4.604v9.185a4 4 0 0 0 1.781 3.328L12 20.597l5.219-3.48A4 4 0 0 0 19 13.79V4.604L12 3.05L5 4.604zM12 11a2.5 2.5 0 1 1 0-5a2.5 2.5 0 0 1 0 5zm-4.473 5a4.5 4.5 0 0 1 8.946 0H7.527z"},null,-1)];function pm(n,e){return c.openBlock(),c.createElementBlock("svg",um,dm)}var mm={name:"ri-shield-user-line",render:pm};const gm={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},ym=[c.createElementVNode("path",{fill:"currentColor",d:"M7.105 15.21A3.001 3.001 0 1 1 5 15.17V8.83a3.001 3.001 0 1 1 2 0V12c.836-.628 1.874-1 3-1h4a3.001 3.001 0 0 0 2.895-2.21a3.001 3.001 0 1 1 2.032.064A5.001 5.001 0 0 1 14 13h-4a3.001 3.001 0 0 0-2.895 2.21zM6 17a1 1 0 1 0 0 2a1 1 0 0 0 0-2zM6 5a1 1 0 1 0 0 2a1 1 0 0 0 0-2zm12 0a1 1 0 1 0 0 2a1 1 0 0 0 0-2z"},null,-1)];function wm(n,e){return c.openBlock(),c.createElementBlock("svg",gm,ym)}var bm={name:"ri-git-branch-line",render:wm};const vm={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},xm=[c.createElementVNode("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10zm0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16zM9 9h6v6H9V9z"},null,-1)];function km(n,e){return c.openBlock(),c.createElementBlock("svg",vm,xm)}var Sm={name:"ri-stop-circle-line",render:km};const Cm={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},_m=[c.createElementVNode("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10zm0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16zM8.523 7.109l8.368 8.368a6.04 6.04 0 0 1-1.414 1.414L7.109 8.523A6.04 6.04 0 0 1 8.523 7.11z"},null,-1)];function Mm(n,e){return c.openBlock(),c.createElementBlock("svg",Cm,_m)}var go={name:"ri-forbid-line",render:Mm};const Am={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Om=[c.createElementVNode("path",{fill:"currentColor",d:"M3 3h18a1 1 0 0 1 1 1v16a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1zm1 2v14h16V5H4zm16 7l-3.536 3.536l-1.414-1.415L17.172 12L15.05 9.879l1.414-1.415L20 12zM6.828 12l2.122 2.121l-1.414 1.415L4 12l3.536-3.536L8.95 9.88L6.828 12zm4.416 5H9.116l3.64-10h2.128l-3.64 10z"},null,-1)];function Bm(n,e){return c.openBlock(),c.createElementBlock("svg",Am,Om)}var Em={name:"ri-code-box-line",render:Bm};const Pm={preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em"},Dm=[c.createElementVNode("path",{fill:"currentColor",d:"M5 12.5c0 .313.461.858 1.53 1.393C7.914 14.585 9.877 15 12 15c2.123 0 4.086-.415 5.47-1.107c1.069-.535 1.53-1.08 1.53-1.393v-2.171C17.35 11.349 14.827 12 12 12s-5.35-.652-7-1.671V12.5zm14 2.829C17.35 16.349 14.827 17 12 17s-5.35-.652-7-1.671V17.5c0 .313.461.858 1.53 1.393C7.914 19.585 9.877 20 12 20c2.123 0 4.086-.415 5.47-1.107c1.069-.535 1.53-1.08 1.53-1.393v-2.171zM3 17.5v-10C3 5.015 7.03 3 12 3s9 2.015 9 4.5v10c0 2.485-4.03 4.5-9 4.5s-9-2.015-9-4.5zm9-7.5c2.123 0 4.086-.415 5.47-1.107C18.539 8.358 19 7.813 19 7.5c0-.313-.461-.858-1.53-1.393C16.086 5.415 14.123 5 12 5c-2.123 0-4.086.415-5.47 1.107C5.461 6.642 5 7.187 5 7.5c0 .313.461.858 1.53 1.393C7.914 9.585 9.877 10 12 10z"},null,-1)];function $m(n,e){return c.openBlock(),c.createElementBlock("svg",Pm,Dm)}var Tm={name:"ri-database-2-line",render:$m};const Lm={class:"alert-header"},Vm={class:"alert-icon"},Rm={class:"alert-title"},Im={key:0,class:"alert-description"},Nm={key:1,class:"alert-actions"};var zm=c.defineComponent({__name:"Alert",props:{type:{default:"default"},title:null,description:null,closable:{type:Boolean,default:!0}},emits:["close"],setup(n,{emit:e}){const t=n,i={success:cr,info:jn,default:jn,warning:ar,error:mo},r=c.computed(()=>[`alert-${t.type}`]),s=()=>{e("close")};return(o,l)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([c.unref(r),"alert-wrapper"])},[c.createElementVNode("div",Lm,[c.createElementVNode("div",Vm,[c.renderSlot(o.$slots,"icon",{},()=>[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(i[n.type])))],!0)]),c.createElementVNode("div",Rm,c.toDisplayString(n.title),1),n.closable?(c.openBlock(),c.createElementBlock("div",{key:0,class:"alert-close",onClick:s},[c.createVNode(c.unref(Wn))])):c.createCommentVNode("",!0)]),n.description||o.$slots.description?(c.openBlock(),c.createElementBlock("div",Im,[c.renderSlot(o.$slots,"description",{},()=>[c.createTextVNode(c.toDisplayString(n.description),1)],!0)])):c.createCommentVNode("",!0),o.$slots.actions?(c.openBlock(),c.createElementBlock("div",Nm,[c.renderSlot(o.$slots,"actions",{},void 0,!0)])):c.createCommentVNode("",!0)],2))}}),u_="",yo=(n,e)=>{const t=n.__vccOpts||n;for(const[i,r]of e)t[i]=r;return t},Hm=yo(zm,[["__scopeId","data-v-0f4ef279"]]);const Fm=["disabled"],Wm={key:0,class:"btn-icon"},jm={key:0,class:"animate-spin",fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Um=[c.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),c.createElementVNode("path",{class:"opacity-75",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",fill:"currentColor"},null,-1)],qm={class:"btn-content"};var hr=c.defineComponent({__name:"Button",props:{type:{default:"default"},size:{default:"md"},circle:{type:Boolean,default:!1},block:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},route:null},emits:["click"],setup(n,{emit:e}){const t=n,i=or.useRouter(),r=c.computed(()=>[`btn-${t.size}`,`btn-${t.type}`,{"btn-circle":t.circle},{"btn-block":t.block},{"btn-loading":t.loading}]);function s(){t.disabled||t.loading||(t.route&&i.push(t.route),e("click"))}return(o,l)=>(c.openBlock(),c.createElementBlock("button",{class:c.normalizeClass([c.unref(r),"btn"]),disabled:n.disabled,onClick:s},[o.$slots.icon||n.loading?(c.openBlock(),c.createElementBlock("span",Wm,[n.loading?(c.openBlock(),c.createElementBlock("svg",jm,Um)):c.renderSlot(o.$slots,"icon",{key:1})])):c.createCommentVNode("",!0),c.createElementVNode("span",qm,[c.renderSlot(o.$slots,"default")])],10,Fm))}}),m_="";const Km={class:"card-wrapper"},Gm={key:0,class:"card-header"},Ym={class:"card-header-title"},Jm={class:"card-header-actions"},Xm={key:1,class:"card-footer"};var Qm=c.defineComponent({__name:"Card",props:{title:null,bodyClass:null},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",Km,[n.title||e.$slots.header?(c.openBlock(),c.createElementBlock("div",Gm,[c.renderSlot(e.$slots,"header",{},()=>[c.createElementVNode("div",Ym,c.toDisplayString(n.title),1),c.createElementVNode("div",Jm,[c.renderSlot(e.$slots,"actions")])])])):c.createCommentVNode("",!0),c.createElementVNode("div",{class:c.normalizeClass([n.bodyClass,"card-body"])},[c.renderSlot(e.$slots,"default")],2),e.$slots.footer?(c.openBlock(),c.createElementBlock("div",Xm,[c.renderSlot(e.$slots,"footer")])):c.createCommentVNode("",!0)]))}}),g_="";const Zm={class:"checkbox-inner"},eg=["id","checked","value"],tg=["for"];var wo=c.defineComponent({__name:"CheckBox",props:{checked:{type:Boolean,default:!1},value:{type:[String,Number,Boolean]},label:null,name:null},emits:["update:checked","change"],setup(n,{emit:e}){const t=n,i=["checkbox",t.name,t.value].filter(s=>!!s).join("-");function r(s){const{checked:o}=s.target;e("update:checked",o),e("change",s)}return(s,o)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([{"checkbox-wrapper-checked":n.checked},"checkbox-wrapper"])},[c.createElementVNode("div",Zm,[c.createElementVNode("input",{id:c.unref(i),checked:n.checked,value:n.value,type:"checkbox",onChange:r},null,40,eg)]),n.label?(c.openBlock(),c.createElementBlock("label",{key:0,for:c.unref(i),class:"checkbox-label"},c.toDisplayString(n.label),9,tg)):c.createCommentVNode("",!0)],2))}}),y_="";const ng={class:"checkbox-group-wrapper"};var ig=c.defineComponent({__name:"CheckBoxGroup",props:{modelValue:{default:()=>[]},options:null,valueKey:{default:"value"},labelKey:{default:"label"},name:null},emits:["update:modelValue","change"],setup(n,{emit:e}){const t=n;function i(r){const{value:s,checked:o}=r.target,l=[...t.modelValue];o?l.push(s):l.splice(l.indexOf(s),1),e("update:modelValue",l),e("change",l)}return(r,s)=>(c.openBlock(),c.createElementBlock("div",ng,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.options,(o,l)=>(c.openBlock(),c.createBlock(c.unref(wo),{key:l,checked:n.modelValue.includes(o[n.valueKey]),label:o[n.labelKey],name:n.name,value:o[n.valueKey],onChange:i},null,8,["checked","label","name","value"]))),128))]))}}),w_="";const rg={class:"flex items-center justify-between bg-white p-4 h-14"},sg={class:"min-w-0 flex-1 self-center"},og={class:"flex items-center truncate text-xl font-bold text-gray-800"},lg={class:"self-center"};var ag=c.defineComponent({__name:"PageHeader",props:{title:null},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("div",rg,[c.createElementVNode("div",sg,[c.createElementVNode("h2",og,[c.renderSlot(e.$slots,"icon"),c.createElementVNode("span",null,c.toDisplayString(n.title),1)])]),c.createElementVNode("div",lg,[c.renderSlot(e.$slots,"actions")])]))}});const cg={class:"input-wrapper"},hg={key:0,class:"input-prefix"},fg=["disabled","placeholder","value"],ug={key:1,class:"input-suffix"};var dg=c.defineComponent({__name:"Input",props:{modelValue:null,size:{default:"md"},disabled:{type:Boolean,default:!1},placeholder:null},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=c.computed(()=>[`input-${t.size}`]);function r(s){const{value:o}=s.target;e("update:modelValue",o)}return(s,o)=>(c.openBlock(),c.createElementBlock("div",cg,[s.$slots.prefix?(c.openBlock(),c.createElementBlock("div",hg,[c.renderSlot(s.$slots,"prefix")])):c.createCommentVNode("",!0),c.createElementVNode("input",{class:c.normalizeClass(c.unref(i)),disabled:n.disabled,placeholder:n.placeholder,value:n.modelValue,type:"text",onInput:r},null,42,fg),s.$slots.suffix?(c.openBlock(),c.createElementBlock("div",ug,[c.renderSlot(s.$slots,"suffix")])):c.createCommentVNode("",!0)]))}}),b_="";const pg={class:"menu-container w-full p-3"};var bo=c.defineComponent({__name:"Menu",props:{openIds:null},setup(n){const e=n;return c.provide("openIds",e.openIds),(t,i)=>(c.openBlock(),c.createElementBlock("div",pg,[c.createElementVNode("ul",null,[c.renderSlot(t.$slots,"default")])]))}});const mg=["onClick"],gg={key:0,class:"menu-icon mr-3 self-center"},yg={class:"menu-title flex-1 self-center"},wg={class:"sub-menu-items transition-all"};var fr=c.defineComponent({__name:"MenuItem",props:{id:{default:""},title:{default:""},active:{type:Boolean,default:!1}},emits:["select"],setup(n,{emit:e}){const t=n,i=c.useSlots(),r=c.ref(!1),s=c.inject("openIds");s!=null&&s.includes(t.id)&&(r.value=!0);const o=c.computed(()=>i.default&&i.default().length>0);function l(){if(o.value){r.value=!r.value;return}e("select",t.id)}return(a,h)=>(c.openBlock(),c.createElementBlock("li",{class:c.normalizeClass([{"has-submenus":c.unref(o)},"menu-item"]),onClick:c.withModifiers(l,["stop"])},[c.createElementVNode("div",{class:c.normalizeClass([{active:n.active},"menu-item-title"])},[a.$slots.icon?(c.openBlock(),c.createElementBlock("span",gg,[c.renderSlot(a.$slots,"icon")])):c.createCommentVNode("",!0),c.createElementVNode("span",yg,c.toDisplayString(n.title),1),a.$slots.default?(c.openBlock(),c.createElementBlock("span",{key:1,class:c.normalizeClass([{open:r.value},"menu-icon-collapse self-center transition-all"])},[c.createVNode(c.unref(Fn))],2)):c.createCommentVNode("",!0)],2),c.createVNode(c.Transition,{name:"submenus-show"},{default:c.withCtx(()=>[c.withDirectives(c.createElementVNode("ul",wg,[c.renderSlot(a.$slots,"default")],512),[[c.vShow,a.$slots.default&&r.value]])]),_:3})],10,mg))}}),v_="",x_="";const bg={},vg={class:"menu-label flex flex-col"};function xg(n,e){return c.openBlock(),c.createElementBlock("li",vg,[c.renderSlot(n.$slots,"default")])}var vo=yo(bg,[["render",xg]]);const kg=c.defineComponent({name:"VRoutesMenu",props:{menus:{type:Object}},emits:["select"],setup(n,{emit:e}){const t=or.useRoute(),{push:i}=or.useRouter(),r=c.computed(()=>t.matched.map(a=>a.path));async function s(a){e("select",a),await i(a)}function o(a){if(!!a)return c.createVNode(a,{height:"20px",width:"20px"},null)}function l(a){return a==null?void 0:a.map(h=>{var f;return c.createVNode(c.Fragment,null,[(f=h.children)!=null&&f.length?c.createVNode(fr,{key:h.path,id:h.path,title:h.name},{default:()=>[l(h.children)],icon:()=>o(h.icon)}):c.createVNode(fr,{key:h.path,id:h.path,title:h.name,onSelect:s,active:r.value.includes(h.path)},{icon:()=>o(h.icon)})])})}return()=>c.createVNode(bo,{openIds:r.value},{default:()=>{var a;return[(a=n.menus)==null?void 0:a.map(h=>{var f;return c.createVNode(c.Fragment,null,[h.name&&c.createVNode(vo,null,{default:()=>[h.name]}),((f=h.items)==null?void 0:f.length)&&l(h.items)])})]}})}}),Sg={key:0,class:"modal-header"},Cg={class:"modal-header-title"},_g={class:"modal-header-actions flex flex-row"},Mg={key:1,class:"modal-footer"};var xo=c.defineComponent({__name:"Modal",props:{visible:{type:Boolean,default:!1},title:null,width:{default:500},fullscreen:{type:Boolean,default:!1},bodyClass:null},emits:["update:visible","close"],setup(n,{emit:e}){const t=n,i=c.ref(!1),r=c.ref(),s=c.computed(()=>({"modal-wrapper-fullscreen":t.fullscreen})),o=c.computed(()=>({maxWidth:t.width+"px"}));function l(){e("update:visible",!1),e("close")}return c.watch(()=>t.visible,()=>{t.visible&&c.nextTick(()=>{var a;(a=r.value)==null||a.focus()})}),(a,h)=>(c.openBlock(),c.createBlock(c.Teleport,{disabled:!0,to:"body"},[c.withDirectives(c.createElementVNode("div",{ref_key:"modelWrapper",ref:r,class:c.normalizeClass([c.unref(s),"modal-wrapper"]),"aria-modal":"true",role:"dialog",tabindex:"0",onKeyup:h[4]||(h[4]=c.withKeys(f=>l(),["esc"]))},[c.createVNode(c.Transition,{"enter-active-class":"ease-out duration-200","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0",onBeforeEnter:h[1]||(h[1]=f=>i.value=!0),onAfterLeave:h[2]||(h[2]=f=>i.value=!1)},{default:c.withCtx(()=>[c.withDirectives(c.createElementVNode("div",{class:"modal-layer",onClick:h[0]||(h[0]=f=>l())},null,512),[[c.vShow,n.visible]])]),_:1}),c.createVNode(c.Transition,{"enter-active-class":"ease-out duration-200","enter-from-class":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to-class":"opacity-100 translate-y-0 sm:scale-100","leave-active-class":"ease-in duration-100","leave-from-class":"opacity-100 translate-y-0 sm:scale-100","leave-to-class":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:c.withCtx(()=>[c.withDirectives(c.createElementVNode("div",{style:c.normalizeStyle(c.unref(o)),class:"modal-content transform transition-all"},[a.$slots.header||n.title?(c.openBlock(),c.createElementBlock("div",Sg,[c.renderSlot(a.$slots,"header",{},()=>[c.createElementVNode("div",Cg,c.toDisplayString(n.title),1),c.createElementVNode("div",_g,[c.renderSlot(a.$slots,"actions"),c.createElementVNode("div",{class:"modal-header-action",onClick:h[3]||(h[3]=f=>l())},[c.createVNode(c.unref(Wn))])])])])):c.createCommentVNode("",!0),c.createElementVNode("div",{class:c.normalizeClass([n.bodyClass,"modal-body"])},[c.renderSlot(a.$slots,"default")],2),a.$slots.footer?(c.openBlock(),c.createElementBlock("div",Mg,[c.renderSlot(a.$slots,"footer")])):c.createCommentVNode("",!0)],4),[[c.vShow,n.visible]])]),_:3})],34),[[c.vShow,i.value]])]))}}),k_="";const Ag={class:"radio-inner"},Og=["id","checked","name","value"],Bg=["for"];var ko=c.defineComponent({__name:"Radio",props:{modelValue:{type:[String,Number,Boolean]},value:{type:[String,Number,Boolean]},label:null,name:null},emits:["update:modelValue","change"],setup(n,{emit:e}){const t=n,i=["radio",t.name,t.value].filter(o=>!!o).join("-"),r=c.computed(()=>t.modelValue===t.value);function s(o){const{value:l}=o.target;e("update:modelValue",l),e("change",l)}return(o,l)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([{"radio-wrapper-checked":c.unref(r)},"radio-wrapper"])},[c.createElementVNode("div",Ag,[c.createElementVNode("input",{id:c.unref(i),checked:c.unref(r),name:n.name,value:n.value,type:"radio",onChange:s},null,40,Og)]),n.label?(c.openBlock(),c.createElementBlock("label",{key:0,for:c.unref(i),class:"radio-label"},c.toDisplayString(n.label),9,Bg)):c.createCommentVNode("",!0)],2))}}),S_="";const Eg={class:"radio-group-wrapper"};var Pg=c.defineComponent({__name:"RadioGroup",props:{modelValue:{type:[String,Number,Boolean]},options:null,valueKey:{default:"value"},labelKey:{default:"label"},name:null},emits:["update:modelValue","change"],setup(n,{emit:e}){function t(i){e("update:modelValue",i),e("change",i)}return(i,r)=>(c.openBlock(),c.createElementBlock("div",Eg,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.options,(s,o)=>(c.openBlock(),c.createBlock(c.unref(ko),{key:o,label:s[n.labelKey]+"","model-value":n.modelValue,name:n.name,value:s[n.valueKey],onChange:t},null,8,["label","model-value","name","value"]))),128))]))}});const Dg={class:"select-wrapper"},$g=["disabled","value"],Tg={key:"placeholder",disabled:"",hidden:"",value:""};var Lg=c.defineComponent({__name:"Select",props:{modelValue:null,size:{default:"md"},disabled:{type:Boolean,default:!1},placeholder:null},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=c.computed(()=>[`select-${t.size}`]);function r(s){const{value:o}=s.target;e("update:modelValue",o)}return(s,o)=>(c.openBlock(),c.createElementBlock("div",Dg,[c.createElementVNode("select",{class:c.normalizeClass(c.unref(i)),disabled:n.disabled,value:n.modelValue,onChange:r},[n.placeholder?(c.openBlock(),c.createElementBlock("option",Tg,c.toDisplayString(n.placeholder),1)):c.createCommentVNode("",!0),c.renderSlot(s.$slots,"default")],42,$g)]))}}),C_="";const Vg=["value"];var Rg=c.defineComponent({__name:"Option",props:{value:{type:[String,Number,Boolean]}},setup(n){return(e,t)=>(c.openBlock(),c.createElementBlock("option",{value:n.value},[c.renderSlot(e.$slots,"default")],8,Vg))}});const Ig={xs:10,sm:12,md:16,lg:20};var Ng=c.defineComponent({__name:"Space",props:{spacing:{default:"xs"},direction:{default:"row"},align:{default:"center"}},setup(n){const e=n,t=c.computed(()=>{const{direction:i,align:r}=e;return[`space-direction-${i}`,`space-align-${r}`]});return(i,r)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([c.unref(t),"space-wrapper"]),style:c.normalizeStyle(`gap: ${c.unref(Ig)[n.spacing]}px`)},[c.renderSlot(i.$slots,"default")],6))}}),__="";const zg={class:"tabs-bar-wrapper"},Hg={class:"tabs-items-wrapper"};var Fg=c.defineComponent({__name:"Tabs",props:{activeId:null,type:{default:"default"},direction:{default:"row"},idKey:{default:"id"},labelKey:{default:"label"}},emits:["update:activeId","change"],setup(n,{emit:e}){const t=n;c.provide("activeId",c.computed(()=>t.activeId));const i=c.useSlots(),r=c.computed(()=>{var l;return(l=i.default)==null?void 0:l.call(i).map(({props:a})=>({id:a==null?void 0:a[t.idKey],label:a==null?void 0:a[t.labelKey]}))}),s=c.computed(()=>[`tabs-direction-${t.direction}`]),o=l=>{e("update:activeId",l),e("change",l)};return(l,a)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([c.unref(s),"tabs-wrapper"])},[c.createElementVNode("div",zg,[c.createVNode(c.unref(So),{activeId:n.activeId,direction:n.direction,items:c.unref(r),type:n.type,onChange:o},null,8,["activeId","direction","items","type"])]),c.createElementVNode("div",Hg,[c.renderSlot(l.$slots,"default")])],2))}}),M_="";const Wg={key:0,class:"tabs-item-wrapper"};var jg=c.defineComponent({__name:"TabItem",props:{id:null,label:null},setup(n){const e=n,t=c.inject("activeId"),i=c.computed(()=>(t==null?void 0:t.value)===e.id);return(r,s)=>c.unref(i)?(c.openBlock(),c.createElementBlock("div",Wg,[c.renderSlot(r.$slots,"default")])):c.createCommentVNode("",!0)}});const Ug={class:"tabbar-items"},qg=["onClick"],Kg={key:0,class:"tabbar-item-icon"},Gg={key:1,class:"tabbar-item-label"};var So=c.defineComponent({__name:"Tabbar",props:{activeId:null,items:null,type:{default:"default"},direction:{default:"row"},idKey:{default:"id"},labelKey:{default:"label"}},emits:["update:activeId","change"],setup(n,{emit:e}){const t=n,i=c.computed(()=>[`tabbar-${t.type}`,`tabbar-direction-${t.direction}`]),r=s=>{e("update:activeId",s),e("change",s)};return(s,o)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([c.unref(i),"tabbar-wrapper"])},[c.createElementVNode("div",Ug,[(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(n.items,(l,a)=>(c.openBlock(),c.createElementBlock("div",{key:a,class:c.normalizeClass([{"tabbar-item-active":l[n.idKey]===n.activeId},"tabbar-item"]),onClick:h=>r(l[n.idKey])},[l.icon?(c.openBlock(),c.createElementBlock("div",Kg,[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(l.icon)))])):c.createCommentVNode("",!0),l[n.labelKey]?(c.openBlock(),c.createElementBlock("div",Gg,c.toDisplayString(l[n.labelKey]),1)):c.createCommentVNode("",!0)],10,qg))),128))])],2))}}),A_="";const Yg={key:0,class:"tag-left-icon"},Jg={class:"tag-content"},Xg={key:1,class:"tag-right-icon"};var Qg=c.defineComponent({__name:"Tag",props:{theme:{default:"default"},rounded:{type:Boolean,default:!1}},setup(n){const e=n,t=c.computed(()=>[`tag-${e.theme}`,{"tag-rounded":e.rounded}]);return(i,r)=>(c.openBlock(),c.createElementBlock("div",{class:c.normalizeClass([c.unref(t),"tag-wrapper"])},[i.$slots.leftIcon?(c.openBlock(),c.createElementBlock("div",Yg,[c.renderSlot(i.$slots,"leftIcon")])):c.createCommentVNode("",!0),c.createElementVNode("span",Jg,[c.renderSlot(i.$slots,"default")]),i.$slots.rightIcon?(c.openBlock(),c.createElementBlock("div",Xg,[c.renderSlot(i.$slots,"rightIcon")])):c.createCommentVNode("",!0)],2))}}),O_="";const Zg={class:"textarea-wrapper"},e0=["disabled","placeholder","rows","value"];var t0=c.defineComponent({__name:"Textarea",props:{modelValue:null,disabled:{type:Boolean,default:!1},placeholder:null,rows:{default:3}},emits:["update:modelValue"],setup(n,{emit:e}){function t(i){const{value:r}=i.target;e("update:modelValue",r)}return(i,r)=>(c.openBlock(),c.createElementBlock("div",Zg,[c.createElementVNode("textarea",{disabled:n.disabled,placeholder:n.placeholder,rows:n.rows,value:n.modelValue,onInput:t},`
|
|
2
|
+
`,40,e0)]))}}),B_="";const n0={class:"switch-wrapper"};var i0=c.defineComponent({__name:"Switch",props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(n,{emit:e}){const t=n,i=()=>{e("update:modelValue",!t.modelValue),e("change",!t.modelValue)};return(r,s)=>(c.openBlock(),c.createElementBlock("div",n0,[c.createElementVNode("button",{class:c.normalizeClass([{"bg-gray-200":!n.modelValue,"!bg-primary":n.modelValue},"switch-inner"]),"aria-checked":"false",role:"switch",type:"button",onClick:i},[c.createElementVNode("span",{class:c.normalizeClass([{"translate-x-0":!n.modelValue,"translate-x-5":n.modelValue},"switch-indicator"]),"aria-hidden":"true"},[c.renderSlot(r.$slots,"icon")],2)],2)]))}}),E_="";const r0={class:"flex justify-between items-start py-2 mb-2"},s0={class:"flex flex-row items-center gap-3"},o0={class:"text-base text-gray-900 font-bold"},l0={class:"flex items-center gap-4"},a0={class:"flex-1 flex items-stretch"},c0={class:"text-sm text-gray-700"},h0={class:"flex flex-col sm:flex-row gap-[10px]"};var Co=c.defineComponent({__name:"Dialog",props:{type:{default:"info"},title:{default:"\u63D0\u793A"},description:{default:""},confirmText:{default:"\u786E\u5B9A"},confirmType:{default:"primary"},cancelText:{default:"\u53D6\u6D88"},visible:{type:Boolean,default:!1},onConfirm:null,onCancel:null},emits:["update:visible","close"],setup(n,{emit:e}){const t=n,i={success:{icon:cr,color:"green"},info:{icon:jn,color:"blue"},warning:{icon:ar,color:"orange"},error:{icon:go,color:"red"}},r=c.computed(()=>i[t.type]),s=c.ref(!1),o=()=>{t.onCancel&&t.onCancel(),a()},l=async()=>{t.onConfirm&&(s.value=!0,await t.onConfirm()),a()},a=()=>{s.value=!1,e("update:visible",!1),e("close")};return(h,f)=>(c.openBlock(),c.createBlock(c.unref(xo),{visible:n.visible,width:450,onClose:f[0]||(f[0]=u=>o())},{footer:c.withCtx(()=>[c.createElementVNode("div",h0,[c.createVNode(c.unref(hr),{loading:s.value,type:n.confirmType,onClick:l},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.confirmText),1)]),_:1},8,["loading","type"]),c.createVNode(c.unref(hr),{onClick:o},{default:c.withCtx(()=>[c.createTextVNode(c.toDisplayString(n.cancelText),1)]),_:1})])]),default:c.withCtx(()=>[c.createElementVNode("div",r0,[c.createElementVNode("div",s0,[(c.openBlock(),c.createBlock(c.resolveDynamicComponent(c.unref(r).icon),{class:c.normalizeClass([`text-${c.unref(r).color}-500`,"w-6 h-6"])},null,8,["class"])),c.createElementVNode("div",o0,c.toDisplayString(n.title),1)]),c.createElementVNode("div",null,[c.createVNode(c.unref(Wn),{class:"cursor-pointer",onClick:o})])]),c.createElementVNode("div",l0,[c.createElementVNode("div",a0,[c.createElementVNode("div",c0,c.toDisplayString(n.description),1)])])]),_:1},8,["visible"]))}});const _o="DIALOG_PROVIDER_PROVIDE_KEY";var f0=c.defineComponent({__name:"DialogProvider",setup(n){const e=c.ref({visible:!1,title:""});return c.provide(_o,e),(t,i)=>(c.openBlock(),c.createElementBlock(c.Fragment,null,[c.renderSlot(t.$slots,"default"),c.createVNode(c.unref(Co),{visible:e.value.visible,"onUpdate:visible":i[0]||(i[0]=r=>e.value.visible=r),"cancel-text":e.value.cancelText,"confirm-text":e.value.confirmText,"confirm-type":e.value.confirmType,description:e.value.description,onCancel:e.value.onCancel,onConfirm:e.value.onConfirm,title:e.value.title,type:e.value.type},null,8,["visible","cancel-text","confirm-text","confirm-type","description","onCancel","onConfirm","title","type"])],64))}});function u0(){const n=c.inject(_o);if(!n)throw new Error("DialogProvider is not mounted");const e=t=>i=>{n.value={title:"",visible:!1},n.value={...n.value,...i},n.value.type=t,n.value.visible=!0};return{success:e("success"),info:e("info"),warning:e("warning"),error:e("error")}}var Mo;const He=typeof window<"u",Ao=n=>typeof n=="string",Un=()=>+Date.now(),Oo=(n,e,t)=>Math.min(t,Math.max(e,n)),pe=()=>{},Bo=He&&((Mo=window==null?void 0:window.navigator)==null?void 0:Mo.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function an(n,e){function t(...i){n(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})}return t}const ur=n=>n();function d0(n,e={}){let t,i;return s=>{const o=c.unref(n),l=c.unref(e.maxWait);if(t&&clearTimeout(t),o<=0||l!==void 0&&l<=0)return i&&(clearTimeout(i),i=null),s();l&&!i&&(i=setTimeout(()=>{t&&clearTimeout(t),i=null,s()},l)),t=setTimeout(()=>{i&&clearTimeout(i),i=null,s()},o)}}function Eo(n,e=!0,t=!0){let i=0,r,s=!0;const o=()=>{r&&(clearTimeout(r),r=void 0)};return a=>{const h=c.unref(n),f=Date.now()-i;if(o(),h<=0)return i=Date.now(),a();f>h&&(t||!s)?(i=Date.now(),a()):e&&(r=setTimeout(()=>{i=Date.now(),s=!0,o(),a()},h)),!t&&!r&&(r=setTimeout(()=>s=!0,h)),s=!1}}function p0(n=ur){const e=c.ref(!0);function t(){e.value=!1}function i(){e.value=!0}return{isActive:e,pause:t,resume:i,eventFilter:(...s)=>{e.value&&n(...s)}}}const lt={mounted:"mounted",updated:"updated",unmounted:"unmounted"};function m0(n,e=!1,t="Timeout"){return new Promise((i,r)=>{setTimeout(e?()=>r(t):i,n)})}function g0(n){let e;function t(){return e||(e=n()),e}return t.reset=async()=>{const i=e;e=void 0,i&&await i},t}function y0(n,e,t=!1){return e.reduce((i,r)=>(r in n&&(!t||n[r]!==void 0)&&(i[r]=n[r]),i),{})}function be(n){return c.getCurrentScope()?(c.onScopeDispose(n),!0):!1}function Po(n,e=200,t={}){return an(d0(e,t),n)}function w0(n,e=200,t=!0,i=!0){return an(Eo(e,t,i),n)}function Do(n,e,t={}){const{flush:i="sync",deep:r=!1,immediate:s=!0,direction:o="both"}=t;let l,a;return(o==="both"||o==="ltr")&&(l=c.watch(n,h=>e.value=h,{flush:i,deep:r,immediate:s})),(o==="both"||o==="rtl")&&(a=c.watch(e,h=>n.value=h,{flush:i,deep:r,immediate:s})),()=>{l==null||l(),a==null||a()}}var b0=Object.defineProperty,v0=Object.defineProperties,x0=Object.getOwnPropertyDescriptors,$o=Object.getOwnPropertySymbols,k0=Object.prototype.hasOwnProperty,S0=Object.prototype.propertyIsEnumerable,To=(n,e,t)=>e in n?b0(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,C0=(n,e)=>{for(var t in e||(e={}))k0.call(e,t)&&To(n,t,e[t]);if($o)for(var t of $o(e))S0.call(e,t)&&To(n,t,e[t]);return n},_0=(n,e)=>v0(n,x0(e));function Lo(n){if(!c.isRef(n))return c.toRefs(n);const e=Array.isArray(n.value)?new Array(n.value.length):{};for(const t in n.value)e[t]=c.customRef(()=>({get(){return n.value[t]},set(i){if(Array.isArray(n.value)){const r=[...n.value];r[t]=i,n.value=r}else{const r=_0(C0({},n.value),{[t]:i});Object.setPrototypeOf(r,n.value),n.value=r}}}));return e}function Vo(n,e=!0){c.getCurrentInstance()?c.onBeforeMount(n):e?n():c.nextTick(n)}function at(n,e=!0){c.getCurrentInstance()?c.onMounted(n):e?n():c.nextTick(n)}function Ro(n,e=1e3,t={}){const{immediate:i=!0,immediateCallback:r=!1}=t;let s=null;const o=c.ref(!1);function l(){s&&(clearInterval(s),s=null)}function a(){o.value=!1,l()}function h(){c.unref(e)<=0||(o.value=!0,r&&n(),l(),s=setInterval(n,c.unref(e)))}if(i&&He&&h(),c.isRef(e)){const f=c.watch(e,()=>{o.value&&He&&h()});be(f)}return be(a),{isActive:o,pause:a,resume:h}}function M0(n=!1,e={}){const{truthyValue:t=!0,falsyValue:i=!1}=e,r=c.isRef(n),s=c.ref(n);function o(l){return arguments.length?(s.value=l,s.value):(s.value=s.value===c.unref(t)?c.unref(i):c.unref(t),s.value)}return r?o:[s,o]}var Io=Object.getOwnPropertySymbols,A0=Object.prototype.hasOwnProperty,O0=Object.prototype.propertyIsEnumerable,B0=(n,e)=>{var t={};for(var i in n)A0.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&Io)for(var i of Io(n))e.indexOf(i)<0&&O0.call(n,i)&&(t[i]=n[i]);return t};function E0(n,e,t={}){const i=t,{eventFilter:r=ur}=i,s=B0(i,["eventFilter"]);return c.watch(n,an(r,e),s)}var P0=Object.defineProperty,D0=Object.defineProperties,$0=Object.getOwnPropertyDescriptors,qn=Object.getOwnPropertySymbols,No=Object.prototype.hasOwnProperty,zo=Object.prototype.propertyIsEnumerable,Ho=(n,e,t)=>e in n?P0(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,T0=(n,e)=>{for(var t in e||(e={}))No.call(e,t)&&Ho(n,t,e[t]);if(qn)for(var t of qn(e))zo.call(e,t)&&Ho(n,t,e[t]);return n},L0=(n,e)=>D0(n,$0(e)),V0=(n,e)=>{var t={};for(var i in n)No.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&qn)for(var i of qn(n))e.indexOf(i)<0&&zo.call(n,i)&&(t[i]=n[i]);return t};function Fo(n,e,t={}){const i=t,{eventFilter:r}=i,s=V0(i,["eventFilter"]),{eventFilter:o,pause:l,resume:a,isActive:h}=p0(r);return{stop:E0(n,e,L0(T0({},s),{eventFilter:o})),pause:l,resume:a,isActive:h}}function Pe(n){var e;const t=c.unref(n);return(e=t==null?void 0:t.$el)!=null?e:t}const F=He?window:void 0,Wo=He?window.document:void 0,Kn=He?window.navigator:void 0;function D(...n){let e,t,i,r;if(Ao(n[0])?([t,i,r]=n,e=F):[e,t,i,r]=n,!e)return pe;let s=pe;const o=c.watch(()=>Pe(e),a=>{s(),a&&(a.addEventListener(t,i,r),s=()=>{a.removeEventListener(t,i,r),s=pe})},{immediate:!0,flush:"post"}),l=()=>{o(),s()};return be(l),l}function R0(n,e,t={}){const{window:i=F,ignore:r,capture:s=!0,detectIframe:o=!1}=t;if(!i)return;const l=c.ref(!0);let a;const h=d=>{i.clearTimeout(a);const p=Pe(n),m=d.composedPath();!p||p===d.target||m.includes(p)||!l.value||r&&r.length>0&&r.some(g=>{const y=Pe(g);return y&&(d.target===y||m.includes(y))})||e(d)},f=[D(i,"click",h,{passive:!0,capture:s}),D(i,"pointerdown",d=>{const p=Pe(n);l.value=!!p&&!d.composedPath().includes(p)},{passive:!0}),D(i,"pointerup",d=>{if(d.button===0){const p=d.composedPath();d.composedPath=()=>p,a=i.setTimeout(()=>h(d),50)}},{passive:!0}),o&&D(i,"blur",d=>{var p;const m=Pe(n);((p=document.activeElement)==null?void 0:p.tagName)==="IFRAME"&&!(m!=null&&m.contains(document.activeElement))&&e(d)})].filter(Boolean);return()=>f.forEach(d=>d())}function I0(n={}){const{window:e=F}=n,t=c.ref(0);return e&&(D(e,"blur",()=>t.value+=1,!0),D(e,"focus",()=>t.value+=1,!0)),c.computed(()=>(t.value,e==null?void 0:e.document.activeElement))}function N0({navigator:n=Kn}={}){const e=["chargingchange","chargingtimechange","dischargingtimechange","levelchange"],t=n&&"getBattery"in n,i=c.ref(!1),r=c.ref(0),s=c.ref(0),o=c.ref(1);let l;function a(){i.value=this.charging,r.value=this.chargingTime||0,s.value=this.dischargingTime||0,o.value=this.level}return t&&n.getBattery().then(h=>{l=h,a.call(l);for(const f of e)D(l,f,a,{passive:!0})}),{isSupported:t,charging:i,chargingTime:r,dischargingTime:s,level:o}}function cn(n,e={}){const{window:t=F}=e,i=Boolean(t&&"matchMedia"in t&&typeof t.matchMedia=="function");let r;const s=c.ref(!1),o=()=>{!i||(r||(r=t.matchMedia(n)),s.value=r.matches)};return Vo(()=>{o(),r&&("addEventListener"in r?r.addEventListener("change",o):r.addListener(o),be(()=>{"removeEventListener"in r?r.removeEventListener("change",o):r.removeListener(o)}))}),s}function z0({window:n=F}={}){const e=i=>{const{state:r,length:s}=(n==null?void 0:n.history)||{},{hash:o,host:l,hostname:a,href:h,origin:f,pathname:u,port:d,protocol:p,search:m}=(n==null?void 0:n.location)||{};return{trigger:i,state:r,length:s,hash:o,host:l,hostname:a,href:h,origin:f,pathname:u,port:d,protocol:p,search:m}},t=c.ref(e("load"));return n&&(D(n,"popstate",()=>t.value=e("popstate"),{passive:!0}),D(n,"hashchange",()=>t.value=e("hashchange"),{passive:!0})),t}function jo(n,e,t){const i=c.ref(n);return c.computed({get(){return i.value=Oo(i.value,c.unref(e),c.unref(t))},set(r){i.value=Oo(r,c.unref(e),c.unref(t))}})}const dr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},pr="__vueuse_ssr_handlers__";dr[pr]=dr[pr]||{};const H0=dr[pr];function Uo(n,e){return H0[n]||e}function F0(n){return n==null?"any":n instanceof Set?"set":n instanceof Map?"map":n instanceof Date?"date":typeof n=="boolean"?"boolean":typeof n=="string"?"string":typeof n=="object"||Array.isArray(n)?"object":Number.isNaN(n)?"any":"number"}const W0={boolean:{read:n=>n==="true",write:n=>String(n)},object:{read:n=>JSON.parse(n),write:n=>JSON.stringify(n)},number:{read:n=>Number.parseFloat(n),write:n=>String(n)},any:{read:n=>n,write:n=>String(n)},string:{read:n=>n,write:n=>String(n)},map:{read:n=>new Map(JSON.parse(n)),write:n=>JSON.stringify(Array.from(n.entries()))},set:{read:n=>new Set(JSON.parse(n)),write:n=>JSON.stringify(Array.from(n))},date:{read:n=>new Date(n),write:n=>n.toISOString()}};function qo(n,e,t,i={}){var r;const{flush:s="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:a=!0,shallow:h,window:f=F,eventFilter:u,onError:d=b=>{console.error(b)}}=i,p=(h?c.shallowRef:c.ref)(e);if(!t)try{t=Uo("getDefaultStorage",()=>{var b;return(b=F)==null?void 0:b.localStorage})()}catch(b){d(b)}if(!t)return p;const m=c.unref(e),g=F0(m),y=(r=i.serializer)!=null?r:W0[g],{pause:w,resume:v}=Fo(p,()=>S(p.value),{flush:s,deep:o,eventFilter:u});return f&&l&&D(f,"storage",C),C(),p;function S(b){try{b==null?t.removeItem(n):t.setItem(n,y.write(b))}catch(O){d(O)}}function x(b){if(!(b&&b.key!==n)){w();try{const O=b?b.newValue:t.getItem(n);return O==null?(a&&m!==null&&t.setItem(n,y.write(m)),m):typeof O!="string"?O:y.read(O)}catch(O){d(O)}finally{v()}}}function C(b){b&&b.key!==n||(p.value=x(b))}}function mr(n){return cn("(prefers-color-scheme: dark)",n)}var j0=Object.defineProperty,Ko=Object.getOwnPropertySymbols,U0=Object.prototype.hasOwnProperty,q0=Object.prototype.propertyIsEnumerable,Go=(n,e,t)=>e in n?j0(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,K0=(n,e)=>{for(var t in e||(e={}))U0.call(e,t)&&Go(n,t,e[t]);if(Ko)for(var t of Ko(e))q0.call(e,t)&&Go(n,t,e[t]);return n};function G0(n={}){const{selector:e="html",attribute:t="class",window:i=F,storage:r,storageKey:s="vueuse-color-scheme",listenToStorageChanges:o=!0,storageRef:l,emitAuto:a}=n,h=K0({auto:"",light:"light",dark:"dark"},n.modes||{}),f=mr({window:i}),u=c.computed(()=>f.value?"dark":"light"),d=l||(s==null?c.ref("auto"):qo(s,"auto",r,{window:i,listenToStorageChanges:o})),p=c.computed({get(){return d.value==="auto"&&!a?u.value:d.value},set(w){d.value=w}}),m=Uo("updateHTMLAttrs",(w,v,S)=>{const x=i==null?void 0:i.document.querySelector(w);if(!!x)if(v==="class"){const C=S.split(/\s/g);Object.values(h).flatMap(b=>(b||"").split(/\s/g)).filter(Boolean).forEach(b=>{C.includes(b)?x.classList.add(b):x.classList.remove(b)})}else x.setAttribute(v,S)});function g(w){var v;const S=w==="auto"?u.value:w;m(e,t,(v=h[S])!=null?v:S)}function y(w){n.onChanged?n.onChanged(w,g):g(w)}return c.watch(p,y,{flush:"post",immediate:!0}),at(()=>y(p.value)),p}var Y0=Object.defineProperty,J0=Object.defineProperties,X0=Object.getOwnPropertyDescriptors,Yo=Object.getOwnPropertySymbols,Q0=Object.prototype.hasOwnProperty,Z0=Object.prototype.propertyIsEnumerable,Jo=(n,e,t)=>e in n?Y0(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,e1=(n,e)=>{for(var t in e||(e={}))Q0.call(e,t)&&Jo(n,t,e[t]);if(Yo)for(var t of Yo(e))Z0.call(e,t)&&Jo(n,t,e[t]);return n},t1=(n,e)=>J0(n,X0(e));function n1(n={}){const{valueDark:e="dark",valueLight:t="",window:i=F}=n,r=G0(t1(e1({},n),{onChanged:(l,a)=>{var h;n.onChanged?(h=n.onChanged)==null||h.call(n,l==="dark"):a(l)},modes:{dark:e,light:t}})),s=mr({window:i});return c.computed({get(){return r.value==="dark"},set(l){l===s.value?r.value="auto":r.value=l?"dark":"light"}})}function i1(n={}){const{window:e=F,eventFilter:t=ur}=n,i=c.ref({x:null,y:null,z:null}),r=c.ref({alpha:null,beta:null,gamma:null}),s=c.ref(0),o=c.ref({x:null,y:null,z:null});if(e){const l=an(t,a=>{i.value=a.acceleration,o.value=a.accelerationIncludingGravity,r.value=a.rotationRate,s.value=a.interval});D(e,"devicemotion",l)}return{acceleration:i,accelerationIncludingGravity:o,rotationRate:r,interval:s}}function r1(n={}){const{window:e=F}=n,t=Boolean(e&&"DeviceOrientationEvent"in e),i=c.ref(!1),r=c.ref(null),s=c.ref(null),o=c.ref(null);return e&&t&&D(e,"deviceorientation",l=>{i.value=l.absolute,r.value=l.alpha,s.value=l.beta,o.value=l.gamma}),{isSupported:t,isAbsolute:i,alpha:r,beta:s,gamma:o}}const s1=[1,1.325,1.4,1.5,1.8,2,2.4,2.5,2.75,3,3.5,4];function o1({window:n=F}={}){if(!n)return{pixelRatio:c.ref(1)};const e=c.ref(n.devicePixelRatio),t=()=>{e.value=n.devicePixelRatio};return D(n,"resize",t,{passive:!0}),s1.forEach(i=>{const r=cn(`screen and (min-resolution: ${i}dppx)`),s=cn(`screen and (max-resolution: ${i}dppx)`);c.watch([r,s],t)}),{pixelRatio:e}}function l1(n,e={}){const{controls:t=!1,navigator:i=Kn}=e,r=Boolean(i&&"permissions"in i);let s;const o=typeof n=="string"?{name:n}:n,l=c.ref(),a=()=>{s&&(l.value=s.state)},h=g0(async()=>{if(!!r){if(!s)try{s=await i.permissions.query(o),D(s,"change",a),a()}catch{l.value="prompt"}return s}});return h(),t?{state:l,isSupported:r,query:h}:l}function a1(n={}){const{navigator:e=Kn,requestPermissions:t=!1,constraints:i={audio:!0,video:!0},onUpdated:r}=n,s=c.ref([]),o=c.computed(()=>s.value.filter(p=>p.kind==="videoinput")),l=c.computed(()=>s.value.filter(p=>p.kind==="audioinput")),a=c.computed(()=>s.value.filter(p=>p.kind==="audiooutput"));let h=!1;const f=c.ref(!1);async function u(){!h||(s.value=await e.mediaDevices.enumerateDevices(),r==null||r(s.value))}async function d(){if(!h)return!1;if(f.value)return!0;const{state:p,query:m}=l1("camera",{controls:!0});return await m(),p.value!=="granted"&&((await e.mediaDevices.getUserMedia(i)).getTracks().forEach(y=>y.stop()),u()),f.value=!0,f.value}return e&&(h=Boolean(e.mediaDevices&&e.mediaDevices.enumerateDevices),h&&(t&&d(),D(e.mediaDevices,"devicechange",u),u())),{devices:s,ensurePermissions:d,permissionGranted:f,videoInputs:o,audioInputs:l,audioOutputs:a,isSupported:h}}function c1({document:n=Wo}={}){if(!n)return c.ref("visible");const e=c.ref(n.visibilityState);return D(n,"visibilitychange",()=>{e.value=n.visibilityState}),e}var h1=Object.defineProperty,f1=Object.defineProperties,u1=Object.getOwnPropertyDescriptors,Xo=Object.getOwnPropertySymbols,d1=Object.prototype.hasOwnProperty,p1=Object.prototype.propertyIsEnumerable,Qo=(n,e,t)=>e in n?h1(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,m1=(n,e)=>{for(var t in e||(e={}))d1.call(e,t)&&Qo(n,t,e[t]);if(Xo)for(var t of Xo(e))p1.call(e,t)&&Qo(n,t,e[t]);return n},g1=(n,e)=>f1(n,u1(e));function y1(n,e={}){var t,i;const r=(t=e.draggingElement)!=null?t:F,s=c.ref((i=e.initialValue)!=null?i:{x:0,y:0}),o=c.ref(),l=d=>e.pointerTypes?e.pointerTypes.includes(d.pointerType):!0,a=d=>{c.unref(e.preventDefault)&&d.preventDefault(),c.unref(e.stopPropagation)&&d.stopPropagation()},h=d=>{var p;if(!l(d)||c.unref(e.exact)&&d.target!==c.unref(n))return;const m=c.unref(n).getBoundingClientRect(),g={x:d.pageX-m.left,y:d.pageY-m.top};((p=e.onStart)==null?void 0:p.call(e,g,d))!==!1&&(o.value=g,a(d))},f=d=>{var p;!l(d)||!o.value||(s.value={x:d.pageX-o.value.x,y:d.pageY-o.value.y},(p=e.onMove)==null||p.call(e,s.value,d),a(d))},u=d=>{var p;!l(d)||!o.value||(o.value=void 0,(p=e.onEnd)==null||p.call(e,s.value,d),a(d))};return He&&(D(n,"pointerdown",h,!0),D(r,"pointermove",f,!0),D(r,"pointerup",u,!0)),g1(m1({},Lo(s)),{position:s,isDragging:c.computed(()=>!!o.value),style:c.computed(()=>`left:${s.value.x}px;top:${s.value.y}px;`)})}var Zo=Object.getOwnPropertySymbols,w1=Object.prototype.hasOwnProperty,b1=Object.prototype.propertyIsEnumerable,v1=(n,e)=>{var t={};for(var i in n)w1.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&Zo)for(var i of Zo(n))e.indexOf(i)<0&&b1.call(n,i)&&(t[i]=n[i]);return t};function el(n,e,t={}){const i=t,{window:r=F}=i,s=v1(i,["window"]);let o;const l=r&&"ResizeObserver"in r,a=()=>{o&&(o.disconnect(),o=void 0)},h=c.watch(()=>Pe(n),u=>{a(),l&&r&&u&&(o=new ResizeObserver(e),o.observe(u,s))},{immediate:!0,flush:"post"}),f=()=>{a(),h()};return be(f),{isSupported:l,stop:f}}function x1(n,e={}){const{reset:t=!0,windowResize:i=!0,windowScroll:r=!0,immediate:s=!0}=e,o=c.ref(0),l=c.ref(0),a=c.ref(0),h=c.ref(0),f=c.ref(0),u=c.ref(0),d=c.ref(0),p=c.ref(0);function m(){const g=Pe(n);if(!g){t&&(o.value=0,l.value=0,a.value=0,h.value=0,f.value=0,u.value=0,d.value=0,p.value=0);return}const y=g.getBoundingClientRect();o.value=y.height,l.value=y.bottom,a.value=y.left,h.value=y.right,f.value=y.top,u.value=y.width,d.value=y.x,p.value=y.y}return el(n,m),c.watch(()=>Pe(n),g=>!g&&m()),r&&D("scroll",m,{passive:!0}),i&&D("resize",m,{passive:!0}),at(()=>{s&&m()}),{height:o,bottom:l,left:a,right:h,top:f,width:u,x:d,y:p,update:m}}function tl(n,e={}){const{immediate:t=!0,window:i=F}=e,r=c.ref(!1);let s=null;function o(){!r.value||!i||(n(),s=i.requestAnimationFrame(o))}function l(){!r.value&&i&&(r.value=!0,o())}function a(){r.value=!1,s!=null&&i&&(i.cancelAnimationFrame(s),s=null)}return t&&l(),be(a),{isActive:r,pause:a,resume:l}}function nl(n,e={width:0,height:0},t={}){const i=c.ref(e.width),r=c.ref(e.height);return el(n,([s])=>{i.value=s.contentRect.width,r.value=s.contentRect.height},t),c.watch(()=>Pe(n),s=>{i.value=s?e.width:0,r.value=s?e.height:0}),{width:i,height:r}}function k1(n,{window:e=F,scrollTarget:t}={}){const i=c.ref(!1),r=()=>{if(!e)return;const s=e.document;if(!c.unref(n))i.value=!1;else{const o=c.unref(n).getBoundingClientRect();i.value=o.top<=(e.innerHeight||s.documentElement.clientHeight)&&o.left<=(e.innerWidth||s.documentElement.clientWidth)&&o.bottom>=0&&o.right>=0}};return at(r),e&&at(()=>D(c.unref(t)||e,"scroll",r,{capture:!1,passive:!0})),i}function S1(n={}){const{initialValue:e=""}=n,t=Boolean(typeof window<"u"&&"EyeDropper"in window),i=c.ref(e);async function r(s){if(!t)return;const l=await new window.EyeDropper().open(s);return i.value=l.sRGBHex,l}return{isSupported:t,sRGBHex:i,open:r}}const il=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];function C1(n,e={}){const{document:t=Wo,autoExit:i=!1}=e,r=n||(t==null?void 0:t.querySelector("html")),s=c.ref(!1);let o=!1,l=il[0];if(!t)o=!1;else for(const g of il)if(g[1]in t){l=g,o=!0;break}const[a,h,f,,u]=l;async function d(){!o||(t!=null&&t[f]&&await t[h](),s.value=!1)}async function p(){if(!o)return;await d();const g=Pe(r);g&&(await g[a](),s.value=!0)}async function m(){s.value?await d():await p()}return t&&D(t,u,()=>{s.value=!!(t!=null&&t[f])},!1),i&&be(d),{isSupported:o,isFullscreen:s,enter:p,exit:d,toggle:m}}function _1(n={}){const{enableHighAccuracy:e=!0,maximumAge:t=3e4,timeout:i=27e3,navigator:r=Kn}=n,s=r&&"geolocation"in r,o=c.ref(null),l=c.ref(null),a=c.ref({accuracy:0,latitude:1/0,longitude:1/0,altitude:null,altitudeAccuracy:null,heading:null,speed:null});function h(u){o.value=u.timestamp,a.value=u.coords,l.value=null}let f;return s&&(f=r.geolocation.watchPosition(h,u=>l.value=u,{enableHighAccuracy:e,maximumAge:t,timeout:i})),be(()=>{f&&r&&r.geolocation.clearWatch(f)}),{isSupported:s,coords:a,locatedAt:o,error:l}}const M1=["mousemove","mousedown","resize","keydown","touchstart","wheel"],A1=6e4;function O1(n=A1,e={}){const{initialState:t=!1,listenForVisibilityChange:i=!0,events:r=M1,window:s=F,eventFilter:o=Eo(50)}=e,l=c.ref(t),a=c.ref(Un());let h;const f=an(o,()=>{l.value=!1,a.value=Un(),clearTimeout(h),h=setTimeout(()=>l.value=!0,n)});if(s){const u=s.document;for(const d of r)D(s,d,f,{passive:!0});i&&D(u,"visibilitychange",()=>{u.hidden||f()})}return h=setTimeout(()=>l.value=!0,n),{idle:l,lastActive:a}}function rl(n={}){const{type:e="page",touch:t=!0,resetOnTouchEnds:i=!1,initialValue:r={x:0,y:0},window:s=F,eventFilter:o}=n,l=c.ref(r.x),a=c.ref(r.y),h=c.ref(null),f=g=>{e==="page"?(l.value=g.pageX,a.value=g.pageY):e==="client"&&(l.value=g.clientX,a.value=g.clientY),h.value="mouse"},u=()=>{l.value=r.x,a.value=r.y},d=g=>{if(g.touches.length>0){const y=g.touches[0];e==="page"?(l.value=y.pageX,a.value=y.pageY):e==="client"&&(l.value=y.clientX,a.value=y.clientY),h.value="touch"}},p=g=>o===void 0?f(g):o(()=>f(g),{}),m=g=>o===void 0?d(g):o(()=>d(g),{});return s&&(D(s,"mousemove",p,{passive:!0}),D(s,"dragover",p,{passive:!0}),t&&(D(s,"touchstart",m,{passive:!0}),D(s,"touchmove",m,{passive:!0}),i&&D(s,"touchend",u,{passive:!0}))),{x:l,y:a,sourceType:h}}function B1(n,e={}){const{handleOutside:t=!0,window:i=F}=e,{x:r,y:s,sourceType:o}=rl(e),l=c.ref(n!=null?n:i==null?void 0:i.document.body),a=c.ref(0),h=c.ref(0),f=c.ref(0),u=c.ref(0),d=c.ref(0),p=c.ref(0),m=c.ref(!0);let g=()=>{};return i&&(g=c.watch([l,r,s],()=>{const y=Pe(l);if(!y)return;const{left:w,top:v,width:S,height:x}=y.getBoundingClientRect();f.value=w+i.pageXOffset,u.value=v+i.pageYOffset,d.value=x,p.value=S;const C=r.value-f.value,b=s.value-u.value;m.value=S===0||x===0||C<0||b<0||C>S||b>x,(t||!m.value)&&(a.value=C,h.value=b)},{immediate:!0})),{x:r,y:s,sourceType:o,elementX:a,elementY:h,elementPositionX:f,elementPositionY:u,elementHeight:d,elementWidth:p,isOutside:m,stop:g}}function E1(n={}){const{touch:e=!0,drag:t=!0,initialValue:i=!1,window:r=F}=n,s=c.ref(i),o=c.ref(null);if(!r)return{pressed:s,sourceType:o};const l=f=>()=>{s.value=!0,o.value=f},a=()=>{s.value=!1,o.value=null},h=c.computed(()=>Pe(n.target)||r);return D(h,"mousedown",l("mouse"),{passive:!0}),D(r,"mouseleave",a,{passive:!0}),D(r,"mouseup",a,{passive:!0}),t&&(D(h,"dragstart",l("mouse"),{passive:!0}),D(r,"drop",a,{passive:!0}),D(r,"dragend",a,{passive:!0})),e&&(D(h,"touchstart",l("touch"),{passive:!0}),D(r,"touchend",a,{passive:!0}),D(r,"touchcancel",a,{passive:!0})),{pressed:s,sourceType:o}}function sl(n={}){const{window:e=F}=n,t=e==null?void 0:e.navigator,i=Boolean(t&&"connection"in t),r=c.ref(!0),s=c.ref(!1),o=c.ref(void 0),l=c.ref(void 0),a=c.ref(void 0),h=c.ref(void 0),f=c.ref(void 0),u=c.ref(void 0),d=c.ref("unknown"),p=i&&t.connection;function m(){!t||(r.value=t.onLine,o.value=r.value?void 0:Date.now(),l.value=r.value?Date.now():void 0,p&&(a.value=p.downlink,h.value=p.downlinkMax,u.value=p.effectiveType,f.value=p.rtt,s.value=p.saveData,d.value=p.type))}return e&&(D(e,"offline",()=>{r.value=!1,o.value=Date.now()}),D(e,"online",()=>{r.value=!0,l.value=Date.now()})),p&&D(p,"change",m,!1),m(),{isSupported:i,isOnline:r,saveData:s,offlineAt:o,onlineAt:l,downlink:a,downlinkMax:h,effectiveType:u,rtt:f,type:d}}var P1=Object.defineProperty,ol=Object.getOwnPropertySymbols,D1=Object.prototype.hasOwnProperty,$1=Object.prototype.propertyIsEnumerable,ll=(n,e,t)=>e in n?P1(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,T1=(n,e)=>{for(var t in e||(e={}))D1.call(e,t)&&ll(n,t,e[t]);if(ol)for(var t of ol(e))$1.call(e,t)&&ll(n,t,e[t]);return n};function al(n={}){const{controls:e=!1,interval:t="requestAnimationFrame"}=n,i=c.ref(new Date),r=()=>i.value=new Date,s=t==="requestAnimationFrame"?tl(r,{immediate:!0}):Ro(r,t,{immediate:!0});return e?T1({now:i},s):i}function L1(n){const e=c.ref(),t=()=>{e.value&&URL.revokeObjectURL(e.value),e.value=void 0};return c.watch(()=>c.unref(n),i=>{t(),i&&(e.value=URL.createObjectURL(i))},{immediate:!0}),be(t),c.readonly(e)}function V1(n){const{total:e=1/0,pageSize:t=10,page:i=1,onPageChange:r=pe,onPageSizeChange:s=pe,onPageCountChange:o=pe}=n,l=jo(t,1,1/0),a=c.computed(()=>Math.ceil(c.unref(e)/c.unref(l))),h=jo(i,1,a),f=c.computed(()=>h.value===1),u=c.computed(()=>h.value===a.value);c.isRef(i)&&Do(i,h),c.isRef(t)&&Do(t,l);function d(){h.value--}function p(){h.value++}const m={currentPage:h,currentPageSize:l,pageCount:a,isFirstPage:f,isLastPage:u,prev:d,next:p};return c.watch(h,()=>{r(c.reactive(m))}),c.watch(l,()=>{s(c.reactive(m))}),c.watch(a,()=>{o(c.reactive(m))}),m}function R1(n={}){const{isOnline:e}=sl(n);return e}function I1(n={}){const{window:e=F}=n,t=c.ref(!1),i=r=>{if(!e)return;r=r||e.event;const s=r.relatedTarget||r.toElement;t.value=!s};return e&&(D(e,"mouseout",i,{passive:!0}),D(e.document,"mouseleave",i,{passive:!0}),D(e.document,"mouseenter",i,{passive:!0})),t}var N1=Object.defineProperty,z1=Object.defineProperties,H1=Object.getOwnPropertyDescriptors,cl=Object.getOwnPropertySymbols,F1=Object.prototype.hasOwnProperty,W1=Object.prototype.propertyIsEnumerable,hl=(n,e,t)=>e in n?N1(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,j1=(n,e)=>{for(var t in e||(e={}))F1.call(e,t)&&hl(n,t,e[t]);if(cl)for(var t of cl(e))W1.call(e,t)&&hl(n,t,e[t]);return n},U1=(n,e)=>z1(n,H1(e));const fl={x:0,y:0,pointerId:0,pressure:0,tiltX:0,tiltY:0,width:0,height:0,twist:0,pointerType:null},q1=Object.keys(fl);function K1(n={}){const{target:e=F}=n,t=c.ref(!1),i=c.ref(n.initialValue||{});Object.assign(i.value,fl,i.value);const r=s=>{t.value=!0,!(n.pointerTypes&&!n.pointerTypes.includes(s.pointerType))&&(i.value=y0(s,q1,!1))};return e&&(D(e,"pointerdown",r,{passive:!0}),D(e,"pointermove",r,{passive:!0}),D(e,"pointerleave",()=>t.value=!1,{passive:!0})),U1(j1({},Lo(i)),{isInside:t})}var ul;(function(n){n.UP="UP",n.RIGHT="RIGHT",n.DOWN="DOWN",n.LEFT="LEFT",n.NONE="NONE"})(ul||(ul={}));function G1(n){const e=cn("(prefers-color-scheme: light)",n),t=cn("(prefers-color-scheme: dark)",n);return c.computed(()=>t.value?"dark":e.value?"light":"no-preference")}function Y1(n={}){const{window:e=F}=n;if(!e)return c.ref(["en"]);const t=e.navigator,i=c.ref(t.languages);return D(e,"languagechange",()=>{i.value=t.languages}),i}var J1=Object.defineProperty,Gn=Object.getOwnPropertySymbols,dl=Object.prototype.hasOwnProperty,pl=Object.prototype.propertyIsEnumerable,ml=(n,e,t)=>e in n?J1(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,X1=(n,e)=>{for(var t in e||(e={}))dl.call(e,t)&&ml(n,t,e[t]);if(Gn)for(var t of Gn(e))pl.call(e,t)&&ml(n,t,e[t]);return n},Q1=(n,e)=>{var t={};for(var i in n)dl.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&Gn)for(var i of Gn(n))e.indexOf(i)<0&&pl.call(n,i)&&(t[i]=n[i]);return t};const gl=[{max:6e4,value:1e3,name:"second"},{max:276e4,value:6e4,name:"minute"},{max:72e6,value:36e5,name:"hour"},{max:5184e5,value:864e5,name:"day"},{max:24192e5,value:6048e5,name:"week"},{max:28512e6,value:2592e6,name:"month"},{max:1/0,value:31536e6,name:"year"}],Z1={justNow:"just now",past:n=>n.match(/\d/)?`${n} ago`:n,future:n=>n.match(/\d/)?`in ${n}`:n,month:(n,e)=>n===1?e?"last month":"next month":`${n} month${n>1?"s":""}`,year:(n,e)=>n===1?e?"last year":"next year":`${n} year${n>1?"s":""}`,day:(n,e)=>n===1?e?"yesterday":"tomorrow":`${n} day${n>1?"s":""}`,week:(n,e)=>n===1?e?"last week":"next week":`${n} week${n>1?"s":""}`,hour:n=>`${n} hour${n>1?"s":""}`,minute:n=>`${n} minute${n>1?"s":""}`,second:n=>`${n} second${n>1?"s":""}`},ey=n=>n.toISOString().slice(0,10);function ty(n,e={}){const{controls:t=!1,max:i,updateInterval:r=3e4,messages:s=Z1,fullDateFormatter:o=ey}=e,{abs:l,round:a}=Math,h=al({interval:r,controls:!0}),{now:f}=h,u=Q1(h,["now"]);function d(y,w){var v;const S=+w-+y,x=l(S);if(x<6e4)return s.justNow;if(typeof i=="number"&&x>i)return o(new Date(y));if(typeof i=="string"){const C=(v=gl.find(b=>b.name===i))==null?void 0:v.max;if(C&&x>C)return o(new Date(y))}for(const C of gl)if(x<C.max)return m(S,C)}function p(y,w,v){const S=s[y];return typeof S=="function"?S(w,v):S.replace("{0}",w.toString())}function m(y,w){const v=a(l(y)/w.value),S=y>0,x=p(w.name,v,S);return p(S?"past":"future",x,S)}const g=c.computed(()=>d(new Date(c.unref(n)),c.unref(f.value)));return t?X1({timeAgo:g},u):g}var ny=Object.defineProperty,yl=Object.getOwnPropertySymbols,iy=Object.prototype.hasOwnProperty,ry=Object.prototype.propertyIsEnumerable,wl=(n,e,t)=>e in n?ny(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,sy=(n,e)=>{for(var t in e||(e={}))iy.call(e,t)&&wl(n,t,e[t]);if(yl)for(var t of yl(e))ry.call(e,t)&&wl(n,t,e[t]);return n};function oy(n={}){const{controls:e=!1,offset:t=0,immediate:i=!0,interval:r="requestAnimationFrame"}=n,s=c.ref(Un()+t),o=()=>s.value=Un()+t,l=r==="requestAnimationFrame"?tl(o,{immediate:i}):Ro(o,r,{immediate:i});return e?sy({timestamp:s},l):s}function ly(n,e){const t=c.ref(),i=nl(t),r=c.ref([]),s=c.shallowRef(n),o=c.ref({start:0,end:10}),{itemHeight:l,overscan:a=5}=e,h=v=>{if(typeof l=="number")return Math.ceil(v/l);const{start:S=0}=o.value;let x=0,C=0;for(let b=S;b<s.value.length;b++)if(x+=l(b),x>=v){C=b;break}return C-S},f=v=>{if(typeof l=="number")return Math.floor(v/l)+1;let S=0,x=0;for(let C=0;C<s.value.length;C++)if(S+=l(C),S>=v){x=C;break}return x+1},u=()=>{const v=t.value;if(v){const S=f(v.scrollTop),x=h(v.clientHeight),C=S-a,b=S+x+a;o.value={start:C<0?0:C,end:b>s.value.length?s.value.length:b},r.value=s.value.slice(o.value.start,o.value.end).map((O,K)=>({data:O,index:K+o.value.start}))}};c.watch([i.width,i.height,n],()=>{u()});const d=c.computed(()=>typeof l=="number"?s.value.length*l:s.value.reduce((v,S,x)=>v+l(x),0)),p=v=>typeof l=="number"?v*l:s.value.slice(0,v).reduce((x,C,b)=>x+l(b),0),m=v=>{t.value&&(t.value.scrollTop=p(v),u())},g=c.computed(()=>p(o.value.start)),y=c.computed(()=>({style:{width:"100%",height:`${d.value-g.value}px`,marginTop:`${g.value}px`}}));return{list:r,scrollTo:m,containerProps:{ref:t,onScroll:()=>{u()},style:{overflowY:"auto"}},wrapperProps:y}}function ay({window:n=F}={}){if(!n)return c.ref(!1);const e=c.ref(n.document.hasFocus());return D(n,"blur",()=>{e.value=!1}),D(n,"focus",()=>{e.value=!0}),e}function cy(n={}){const{window:e=F,initialWidth:t=1/0,initialHeight:i=1/0,listenOrientation:r=!0}=n,s=c.ref(t),o=c.ref(i),l=()=>{e&&(s.value=e.innerWidth,o.value=e.innerHeight)};return l(),at(l),D("resize",l,{passive:!0}),r&&D("orientationchange",l,{passive:!0}),{width:s,height:o}}c.defineComponent({name:"OnClickOutside",props:["as"],emits:["trigger"],setup(n,{slots:e,emit:t}){const i=c.ref();return R0(i,r=>{t("trigger",r)}),()=>{if(e.default)return c.h(n.as||"div",{ref:i},e.default())}}});function _t(n){var e;const t=c.unref(n);return(e=t==null?void 0:t.$el)!=null?e:t}const Ve=He?window:void 0;function Re(...n){let e,t,i,r;if(Ao(n[0])?([t,i,r]=n,e=Ve):[e,t,i,r]=n,!e)return pe;let s=pe;const o=c.watch(()=>_t(e),a=>{s(),a&&(a.addEventListener(t,i,r),s=()=>{a.removeEventListener(t,i,r),s=pe})},{immediate:!0,flush:"post"}),l=()=>{o(),s()};return be(l),l}const hy=n=>typeof n=="function"?n:typeof n=="string"?e=>e.key===n:Array.isArray(n)?e=>n.includes(e.key):n?()=>!0:()=>!1;function bl(n,e,t={}){const{target:i=Ve,eventName:r="keydown",passive:s=!1}=t,o=hy(n);return Re(i,r,a=>{o(a)&&e(a)},s)}var fy=Object.defineProperty,vl=Object.getOwnPropertySymbols,uy=Object.prototype.hasOwnProperty,dy=Object.prototype.propertyIsEnumerable,xl=(n,e,t)=>e in n?fy(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,py=(n,e)=>{for(var t in e||(e={}))uy.call(e,t)&&xl(n,t,e[t]);if(vl)for(var t of vl(e))dy.call(e,t)&&xl(n,t,e[t]);return n};lt.mounted+"";const my=500;function gr(n,e,t){var i,r;const s=c.computed(()=>_t(n));let o=null;function l(){o!=null&&(clearTimeout(o),o=null)}function a(f){var u,d,p,m;((u=t==null?void 0:t.modifiers)==null?void 0:u.self)&&f.target!==s.value||(l(),(d=t==null?void 0:t.modifiers)!=null&&d.prevent&&f.preventDefault(),(p=t==null?void 0:t.modifiers)!=null&&p.stop&&f.stopPropagation(),o=setTimeout(()=>e(f),(m=t==null?void 0:t.delay)!=null?m:my))}const h={capture:(i=t==null?void 0:t.modifiers)==null?void 0:i.capture,once:(r=t==null?void 0:t.modifiers)==null?void 0:r.once};Re(s,"pointerdown",a,h),Re(s,"pointerup",l,h),Re(s,"pointerleave",l,h)}c.defineComponent({name:"OnLongPress",props:["as","options"],emits:["trigger"],setup(n,{slots:e,emit:t}){const i=c.ref();return gr(i,r=>{t("trigger",r)},n.options),()=>{if(e.default)return c.h(n.as||"div",{ref:i},e.default())}}}),lt.mounted+"",c.defineComponent({name:"UseActiveElement",setup(n,{slots:e}){const t=c.reactive({element:I0()});return()=>{if(e.default)return e.default(t)}}}),c.defineComponent({name:"UseBattery",setup(n,{slots:e}){const t=c.reactive(N0(n));return()=>{if(e.default)return e.default(t)}}}),c.defineComponent({name:"UseBrowserLocation",setup(n,{slots:e}){const t=c.reactive(z0());return()=>{if(e.default)return e.default(t)}}});const yr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},wr="__vueuse_ssr_handlers__";yr[wr]=yr[wr]||{};const gy=yr[wr];function kl(n,e){return gy[n]||e}function yy(n){return n==null?"any":n instanceof Set?"set":n instanceof Map?"map":n instanceof Date?"date":typeof n=="boolean"?"boolean":typeof n=="string"?"string":typeof n=="object"||Array.isArray(n)?"object":Number.isNaN(n)?"any":"number"}const wy={boolean:{read:n=>n==="true",write:n=>String(n)},object:{read:n=>JSON.parse(n),write:n=>JSON.stringify(n)},number:{read:n=>Number.parseFloat(n),write:n=>String(n)},any:{read:n=>n,write:n=>String(n)},string:{read:n=>n,write:n=>String(n)},map:{read:n=>new Map(JSON.parse(n)),write:n=>JSON.stringify(Array.from(n.entries()))},set:{read:n=>new Set(JSON.parse(n)),write:n=>JSON.stringify(Array.from(n))},date:{read:n=>new Date(n),write:n=>n.toISOString()}};function by(n,e,t,i={}){var r;const{flush:s="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:a=!0,shallow:h,window:f=Ve,eventFilter:u,onError:d=b=>{console.error(b)}}=i,p=(h?c.shallowRef:c.ref)(e);if(!t)try{t=kl("getDefaultStorage",()=>{var b;return(b=Ve)==null?void 0:b.localStorage})()}catch(b){d(b)}if(!t)return p;const m=c.unref(e),g=yy(m),y=(r=i.serializer)!=null?r:wy[g],{pause:w,resume:v}=Fo(p,()=>S(p.value),{flush:s,deep:o,eventFilter:u});return f&&l&&Re(f,"storage",C),C(),p;function S(b){try{b==null?t.removeItem(n):t.setItem(n,y.write(b))}catch(O){d(O)}}function x(b){if(!(b&&b.key!==n)){w();try{const O=b?b.newValue:t.getItem(n);return O==null?(a&&m!==null&&t.setItem(n,y.write(m)),m):typeof O!="string"?O:y.read(O)}catch(O){d(O)}finally{v()}}}function C(b){b&&b.key!==n||(p.value=x(b))}}function vy(n,e={}){const{window:t=Ve}=e,i=Boolean(t&&"matchMedia"in t&&typeof t.matchMedia=="function");let r;const s=c.ref(!1),o=()=>{!i||(r||(r=t.matchMedia(n)),s.value=r.matches)};return Vo(()=>{o(),r&&("addEventListener"in r?r.addEventListener("change",o):r.addListener(o),be(()=>{"removeEventListener"in r?r.removeEventListener("change",o):r.removeListener(o)}))}),s}function xy(n){return vy("(prefers-color-scheme: dark)",n)}var ky=Object.defineProperty,Sl=Object.getOwnPropertySymbols,Sy=Object.prototype.hasOwnProperty,Cy=Object.prototype.propertyIsEnumerable,Cl=(n,e,t)=>e in n?ky(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,_y=(n,e)=>{for(var t in e||(e={}))Sy.call(e,t)&&Cl(n,t,e[t]);if(Sl)for(var t of Sl(e))Cy.call(e,t)&&Cl(n,t,e[t]);return n};function My(n={}){const{selector:e="html",attribute:t="class",window:i=Ve,storage:r,storageKey:s="vueuse-color-scheme",listenToStorageChanges:o=!0,storageRef:l,emitAuto:a}=n,h=_y({auto:"",light:"light",dark:"dark"},n.modes||{}),f=xy({window:i}),u=c.computed(()=>f.value?"dark":"light"),d=l||(s==null?c.ref("auto"):by(s,"auto",r,{window:i,listenToStorageChanges:o})),p=c.computed({get(){return d.value==="auto"&&!a?u.value:d.value},set(w){d.value=w}}),m=kl("updateHTMLAttrs",(w,v,S)=>{const x=i==null?void 0:i.document.querySelector(w);if(!!x)if(v==="class"){const C=S.split(/\s/g);Object.values(h).flatMap(b=>(b||"").split(/\s/g)).filter(Boolean).forEach(b=>{C.includes(b)?x.classList.add(b):x.classList.remove(b)})}else x.setAttribute(v,S)});function g(w){var v;const S=w==="auto"?u.value:w;m(e,t,(v=h[S])!=null?v:S)}function y(w){n.onChanged?n.onChanged(w,g):g(w)}return c.watch(p,y,{flush:"post",immediate:!0}),at(()=>y(p.value)),p}c.defineComponent({name:"UseColorMode",props:["selector","attribute","modes","onChanged","storageKey","storage","emitAuto"],setup(n,{slots:e}){const t=My(n),i=c.reactive({mode:t});return()=>{if(e.default)return e.default(i)}}}),c.defineComponent({name:"UseDark",props:["selector","attribute","valueDark","valueLight","onChanged","storageKey","storage"],setup(n,{slots:e}){const t=n1(n),i=c.reactive({isDark:t,toggleDark:M0(t)});return()=>{if(e.default)return e.default(i)}}}),c.defineComponent({name:"UseDeviceMotion",setup(n,{slots:e}){const t=c.reactive(i1());return()=>{if(e.default)return e.default(t)}}}),c.defineComponent({name:"UseDeviceOrientation",setup(n,{slots:e}){const t=c.reactive(r1());return()=>{if(e.default)return e.default(t)}}}),c.defineComponent({name:"UseDevicePixelRatio",setup(n,{slots:e}){const t=c.reactive({pixelRatio:o1()});return()=>{if(e.default)return e.default(t)}}}),c.defineComponent({name:"UseDevicesList",props:["onUpdated","requestPermissions","constraints"],setup(n,{slots:e}){const t=c.reactive(a1(n));return()=>{if(e.default)return e.default(t)}}}),c.defineComponent({name:"UseDocumentVisibility",setup(n,{slots:e}){const t=c.reactive({visibility:c1()});return()=>{if(e.default)return e.default(t)}}});var Ay=Object.defineProperty,Oy=Object.defineProperties,By=Object.getOwnPropertyDescriptors,_l=Object.getOwnPropertySymbols,Ey=Object.prototype.hasOwnProperty,Py=Object.prototype.propertyIsEnumerable,Ml=(n,e,t)=>e in n?Ay(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Dy=(n,e)=>{for(var t in e||(e={}))Ey.call(e,t)&&Ml(n,t,e[t]);if(_l)for(var t of _l(e))Py.call(e,t)&&Ml(n,t,e[t]);return n},$y=(n,e)=>Oy(n,By(e));c.defineComponent({name:"UseDraggable",props:["storageKey","storageType","initialValue","exact","preventDefault","stopPropagation","pointerTypes","as"],setup(n,{slots:e}){const t=c.ref(),i=n.storageKey?qo(n.storageKey,c.unref(n.initialValue)||{x:0,y:0},He?n.storageType==="session"?sessionStorage:localStorage:void 0):n.initialValue||{x:0,y:0},r=c.reactive(y1(t,$y(Dy({},n),{initialValue:i})));return()=>{if(e.default)return c.h(n.as||"div",{ref:t,style:`touch-action:none;${r.style}`},e.default(r))}}}),c.defineComponent({name:"UseElementBounding",props:["box","as"],setup(n,{slots:e}){const t=c.ref(),i=c.reactive(x1(t));return()=>{if(e.default)return c.h(n.as||"div",{ref:t},e.default(i))}}});function Ty(n){const e=c.ref(!1);return Re(n,"mouseenter",()=>e.value=!0),Re(n,"mouseleave",()=>e.value=!1),e}lt.mounted+"",c.defineComponent({name:"UseElementSize",props:["width","height","box"],setup(n,{slots:e}){const t=c.ref(),i=c.reactive(nl(t,{width:n.width,height:n.height},{box:n.box}));return()=>{if(e.default)return c.h(n.as||"div",{ref:t},e.default(i))}}});var Al=Object.getOwnPropertySymbols,Ly=Object.prototype.hasOwnProperty,Vy=Object.prototype.propertyIsEnumerable,Ry=(n,e)=>{var t={};for(var i in n)Ly.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&Al)for(var i of Al(n))e.indexOf(i)<0&&Vy.call(n,i)&&(t[i]=n[i]);return t};function Iy(n,e,t={}){const i=t,{window:r=Ve}=i,s=Ry(i,["window"]);let o;const l=r&&"ResizeObserver"in r,a=()=>{o&&(o.disconnect(),o=void 0)},h=c.watch(()=>_t(n),u=>{a(),l&&r&&u&&(o=new ResizeObserver(e),o.observe(u,s))},{immediate:!0,flush:"post"}),f=()=>{a(),h()};return be(f),{isSupported:l,stop:f}}function Ny(n,e={width:0,height:0},t={}){const i=c.ref(e.width),r=c.ref(e.height);return Iy(n,([s])=>{i.value=s.contentRect.width,r.value=s.contentRect.height},t),c.watch(()=>_t(n),s=>{i.value=s?e.width:0,r.value=s?e.height:0}),{width:i,height:r}}lt.mounted+"",c.defineComponent({name:"UseElementVisibility",props:["as"],setup(n,{slots:e}){const t=c.ref(),i=c.reactive({isVisible:k1(t)});return()=>{if(e.default)return c.h(n.as||"div",{ref:t},e.default(i))}}});function Ol(n,{window:e=Ve,scrollTarget:t}={}){const i=c.ref(!1),r=()=>{if(!e)return;const s=e.document;if(!c.unref(n))i.value=!1;else{const o=c.unref(n).getBoundingClientRect();i.value=o.top<=(e.innerHeight||s.documentElement.clientHeight)&&o.left<=(e.innerWidth||s.documentElement.clientWidth)&&o.bottom>=0&&o.right>=0}};return at(r),e&&at(()=>Re(c.unref(t)||e,"scroll",r,{capture:!1,passive:!0})),i}lt.mounted+"",c.defineComponent({name:"UseEyeDropper",props:{sRGBHex:String},setup(n,{slots:e}){const t=c.reactive(S1());return()=>{if(e.default)return e.default(t)}}}),c.defineComponent({name:"UseFullscreen",props:["as"],setup(n,{slots:e}){const t=c.ref(),i=c.reactive(C1(t));return()=>{if(e.default)return c.h(n.as||"div",{ref:t},e.default(i))}}}),c.defineComponent({name:"UseGeolocation",props:["enableHighAccuracy","maximumAge","timeout","navigator"],setup(n,{slots:e}){const t=c.reactive(_1(n));return()=>{if(e.default)return e.default(t)}}}),c.defineComponent({name:"UseIdle",props:["timeout","events","listenForVisibilityChange","initialState"],setup(n,{slots:e}){const t=c.reactive(O1(n.timeout,n));return()=>{if(e.default)return e.default(t)}}});function zy(n,e,t){const{immediate:i=!0,delay:r=0,onError:s=pe,resetOnExecute:o=!0,shallow:l=!0}=t!=null?t:{},a=l?c.shallowRef(e):c.ref(e),h=c.ref(!1),f=c.ref(!1),u=c.ref(void 0);async function d(p=0,...m){o&&(a.value=e),u.value=void 0,h.value=!1,f.value=!0,p>0&&await m0(p);const g=typeof n=="function"?n(...m):n;try{const y=await g;a.value=y,h.value=!0}catch(y){u.value=y,s(y)}finally{f.value=!1}return a.value}return i&&d(r),{state:a,isReady:h,isLoading:f,error:u,execute:d}}var Hy=Object.defineProperty,Bl=Object.getOwnPropertySymbols,Fy=Object.prototype.hasOwnProperty,Wy=Object.prototype.propertyIsEnumerable,El=(n,e,t)=>e in n?Hy(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,jy=(n,e)=>{for(var t in e||(e={}))Fy.call(e,t)&&El(n,t,e[t]);if(Bl)for(var t of Bl(e))Wy.call(e,t)&&El(n,t,e[t]);return n};async function Uy(n){return new Promise((e,t)=>{const i=new Image,{src:r,srcset:s,sizes:o}=n;i.src=r,s&&(i.srcset=s),o&&(i.sizes=o),i.onload=()=>e(i),i.onerror=t})}const qy=(n,e={})=>{const t=zy(()=>Uy(c.unref(n)),void 0,jy({resetOnExecute:!0},e));return c.watch(()=>c.unref(n),()=>t.execute(e.delay),{deep:!0}),t};c.defineComponent({name:"UseImage",props:["src","srcset","sizes","as"],setup(n,{slots:e}){const t=c.reactive(qy(n));return()=>t.isLoading&&e.loading?e.loading(t):t.error&&e.error?e.error(t.error):e.default?e.default(t):c.h(n.as||"img",n)}});function br(n,e={}){const{throttle:t=0,idle:i=200,onStop:r=pe,onScroll:s=pe,offset:o={left:0,right:0,top:0,bottom:0},eventListenerOptions:l={capture:!1,passive:!0}}=e,a=c.ref(0),h=c.ref(0),f=c.ref(!1),u=c.reactive({left:!0,right:!1,top:!0,bottom:!1}),d=c.reactive({left:!1,right:!1,top:!1,bottom:!1});if(n){const p=Po(g=>{f.value=!1,d.left=!1,d.right=!1,d.top=!1,d.bottom=!1,r(g)},t+i),m=g=>{const y=g.target===document?g.target.documentElement:g.target,w=y.scrollLeft;d.left=w<a.value,d.right=w>a.value,u.left=w<=0+(o.left||0),u.right=w+y.clientWidth>=y.scrollWidth-(o.right||0),a.value=w;let v=y.scrollTop;g.target===document&&!v&&(v=document.body.scrollTop),d.top=v<h.value,d.bottom=v>h.value,u.top=v<=0+(o.top||0),u.bottom=v+y.clientHeight>=y.scrollHeight-(o.bottom||0),h.value=v,f.value=!0,p(g),s(g)};Re(n,"scroll",t?w0(m,t):m,l)}return{x:a,y:h,isScrolling:f,arrivedState:u,directions:d}}var Ky=Object.defineProperty,Gy=Object.defineProperties,Yy=Object.getOwnPropertyDescriptors,Pl=Object.getOwnPropertySymbols,Jy=Object.prototype.hasOwnProperty,Xy=Object.prototype.propertyIsEnumerable,Dl=(n,e,t)=>e in n?Ky(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,$l=(n,e)=>{for(var t in e||(e={}))Jy.call(e,t)&&Dl(n,t,e[t]);if(Pl)for(var t of Pl(e))Xy.call(e,t)&&Dl(n,t,e[t]);return n},Qy=(n,e)=>Gy(n,Yy(e));function Tl(n,e,t={}){var i,r;const s=(i=t.direction)!=null?i:"bottom",o=c.reactive(br(n,Qy($l({},t),{offset:$l({[s]:(r=t.distance)!=null?r:0},t.offset)})));c.watch(()=>o.arrivedState[s],async l=>{var a,h;if(l){const f=c.unref(n),u={height:(a=f==null?void 0:f.scrollHeight)!=null?a:0,width:(h=f==null?void 0:f.scrollWidth)!=null?h:0};await e(o),t.preserveScrollPosition&&f&&c.nextTick(()=>{f.scrollTo({top:f.scrollHeight-u.height,left:f.scrollWidth-u.width})})}})}lt.mounted+"";function Ll(n,e,t={}){const{root:i,rootMargin:r="0px",threshold:s=.1,window:o=Ve}=t,l=o&&"IntersectionObserver"in o;let a=pe;const h=l?c.watch(()=>({el:_t(n),root:_t(i)}),({el:u,root:d})=>{if(a(),!u)return;const p=new IntersectionObserver(e,{root:d,rootMargin:r,threshold:s});p.observe(u),a=()=>{p.disconnect(),a=pe}},{immediate:!0,flush:"post"}):pe,f=()=>{a(),h()};return be(f),{isSupported:l,stop:f}}lt.mounted+"",c.defineComponent({name:"UseMouse",props:["touch","resetOnTouchEnds","initialValue"],setup(n,{slots:e}){const t=c.reactive(rl(n));return()=>{if(e.default)return e.default(t)}}}),c.defineComponent({name:"UseMouseElement",props:["handleOutside","as"],setup(n,{slots:e}){const t=c.ref(),i=c.reactive(B1(t,n));return()=>{if(e.default)return c.h(n.as||"div",{ref:t},e.default(i))}}});var Zy=Object.defineProperty,ew=Object.defineProperties,tw=Object.getOwnPropertyDescriptors,Vl=Object.getOwnPropertySymbols,nw=Object.prototype.hasOwnProperty,iw=Object.prototype.propertyIsEnumerable,Rl=(n,e,t)=>e in n?Zy(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,rw=(n,e)=>{for(var t in e||(e={}))nw.call(e,t)&&Rl(n,t,e[t]);if(Vl)for(var t of Vl(e))iw.call(e,t)&&Rl(n,t,e[t]);return n},sw=(n,e)=>ew(n,tw(e));c.defineComponent({name:"UseMousePressed",props:["touch","initialValue","as"],setup(n,{slots:e}){const t=c.ref(),i=c.reactive(E1(sw(rw({},n),{target:t})));return()=>{if(e.default)return c.h(n.as||"div",{ref:t},e.default(i))}}}),c.defineComponent({name:"UseNetwork",setup(n,{slots:e}){const t=c.reactive(sl());return()=>{if(e.default)return e.default(t)}}});var ow=Object.defineProperty,lw=Object.defineProperties,aw=Object.getOwnPropertyDescriptors,Il=Object.getOwnPropertySymbols,cw=Object.prototype.hasOwnProperty,hw=Object.prototype.propertyIsEnumerable,Nl=(n,e,t)=>e in n?ow(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,fw=(n,e)=>{for(var t in e||(e={}))cw.call(e,t)&&Nl(n,t,e[t]);if(Il)for(var t of Il(e))hw.call(e,t)&&Nl(n,t,e[t]);return n},uw=(n,e)=>lw(n,aw(e));c.defineComponent({name:"UseNow",props:["interval"],setup(n,{slots:e}){const t=c.reactive(al(uw(fw({},n),{controls:!0})));return()=>{if(e.default)return e.default(t)}}}),c.defineComponent({name:"UseObjectUrl",props:["object"],setup(n,{slots:e}){const t=c.toRef(n,"object"),i=L1(t);return()=>{if(e.default&&i.value)return e.default(i)}}});var dw=Object.defineProperty,pw=Object.defineProperties,mw=Object.getOwnPropertyDescriptors,zl=Object.getOwnPropertySymbols,gw=Object.prototype.hasOwnProperty,yw=Object.prototype.propertyIsEnumerable,Hl=(n,e,t)=>e in n?dw(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,ww=(n,e)=>{for(var t in e||(e={}))gw.call(e,t)&&Hl(n,t,e[t]);if(zl)for(var t of zl(e))yw.call(e,t)&&Hl(n,t,e[t]);return n},bw=(n,e)=>pw(n,mw(e));const vw=c.defineComponent({name:"UseOffsetPagination",props:["total","page","pageSize","onPageChange","onPageSizeChange","onPageCountChange"],emits:["page-change","page-size-change","page-count-change"],setup(n,{slots:e,emit:t}){const i=c.reactive(V1(bw(ww({},n),{onPageChange(...r){var s;(s=n.onPageChange)==null||s.call(n,...r),t("page-change",...r)},onPageSizeChange(...r){var s;(s=n.onPageSizeChange)==null||s.call(n,...r),t("page-size-change",...r)},onPageCountChange(...r){var s;(s=n.onPageCountChange)==null||s.call(n,...r),t("page-count-change",...r)}})));return()=>{if(e.default)return e.default(i)}}});c.defineComponent({name:"UseOnline",setup(n,{slots:e}){const t=c.reactive({isOnline:R1()});return()=>{if(e.default)return e.default(t)}}}),c.defineComponent({name:"UsePageLeave",setup(n,{slots:e}){const t=c.reactive({isLeft:I1()});return()=>{if(e.default)return e.default(t)}}});var xw=Object.defineProperty,kw=Object.defineProperties,Sw=Object.getOwnPropertyDescriptors,Fl=Object.getOwnPropertySymbols,Cw=Object.prototype.hasOwnProperty,_w=Object.prototype.propertyIsEnumerable,Wl=(n,e,t)=>e in n?xw(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Mw=(n,e)=>{for(var t in e||(e={}))Cw.call(e,t)&&Wl(n,t,e[t]);if(Fl)for(var t of Fl(e))_w.call(e,t)&&Wl(n,t,e[t]);return n},Aw=(n,e)=>kw(n,Sw(e));c.defineComponent({name:"UsePointer",props:["pointerTypes","initialValue","target"],setup(n,{slots:e}){const t=c.ref(null),i=c.reactive(K1(Aw(Mw({},n),{target:n.target==="self"?t:Ve})));return()=>{if(e.default)return e.default(i,{ref:t})}}}),c.defineComponent({name:"UsePreferredColorScheme",setup(n,{slots:e}){const t=c.reactive({colorScheme:G1()});return()=>{if(e.default)return e.default(t)}}}),c.defineComponent({name:"UsePreferredDark",setup(n,{slots:e}){const t=c.reactive({prefersDark:mr()});return()=>{if(e.default)return e.default(t)}}}),c.defineComponent({name:"UsePreferredLanguages",setup(n,{slots:e}){const t=c.reactive({languages:Y1()});return()=>{if(e.default)return e.default(t)}}});function Yn(n,e,{window:t=Ve,initialValue:i=""}={}){const r=c.ref(i),s=c.computed(()=>{var o;return _t(e)||((o=t==null?void 0:t.document)==null?void 0:o.documentElement)});return c.watch([s,()=>c.unref(n)],([o,l])=>{var a;if(o&&t){const h=(a=t.getComputedStyle(o).getPropertyValue(l))==null?void 0:a.trim();r.value=h||i}},{immediate:!0}),c.watch(r,o=>{var l;(l=s.value)!=null&&l.style&&s.value.style.setProperty(c.unref(n),o)}),r}const jl="--vueuse-safe-area-top",Ul="--vueuse-safe-area-right",ql="--vueuse-safe-area-bottom",Kl="--vueuse-safe-area-left";function Ow(){const n=c.ref(""),e=c.ref(""),t=c.ref(""),i=c.ref("");if(He){const s=Yn(jl),o=Yn(Ul),l=Yn(ql),a=Yn(Kl);s.value="env(safe-area-inset-top, 0px)",o.value="env(safe-area-inset-right, 0px)",l.value="env(safe-area-inset-bottom, 0px)",a.value="env(safe-area-inset-left, 0px)",r(),Re("resize",Po(r))}function r(){n.value=Jn(jl),e.value=Jn(Ul),t.value=Jn(ql),i.value=Jn(Kl)}return{top:n,right:e,bottom:t,left:i,update:r}}function Jn(n){return getComputedStyle(document.documentElement).getPropertyValue(n)}c.defineComponent({name:"UseScreenSafeArea",props:{top:Boolean,right:Boolean,bottom:Boolean,left:Boolean},setup(n,{slots:e}){const{top:t,right:i,bottom:r,left:s}=Ow();return()=>{if(e.default)return c.h("div",{style:{paddingTop:n.top?t.value:"",paddingRight:n.right?i.value:"",paddingBottom:n.bottom?r.value:"",paddingLeft:n.left?s.value:"",boxSizing:"border-box",maxHeight:"100vh",maxWidth:"100vw",overflow:"auto"}},e.default())}}});var Bw=Object.defineProperty,Ew=Object.defineProperties,Pw=Object.getOwnPropertyDescriptors,Gl=Object.getOwnPropertySymbols,Dw=Object.prototype.hasOwnProperty,$w=Object.prototype.propertyIsEnumerable,Yl=(n,e,t)=>e in n?Bw(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Tw=(n,e)=>{for(var t in e||(e={}))Dw.call(e,t)&&Yl(n,t,e[t]);if(Gl)for(var t of Gl(e))$w.call(e,t)&&Yl(n,t,e[t]);return n},Lw=(n,e)=>Ew(n,Pw(e));lt.mounted+"";function Vw(n){const e=n||window.event;return e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)}function Rw(n,e=!1){const t=c.ref(e);let i=null,r;c.watch(()=>c.unref(n),l=>{if(l){const a=l;r=a.style.overflow,t.value&&(a.style.overflow="hidden")}},{immediate:!0});const s=()=>{const l=c.unref(n);!l||t.value||(Bo&&(i=Re(l,"touchmove",Vw,{passive:!1})),l.style.overflow="hidden",t.value=!0)},o=()=>{const l=c.unref(n);!l||!t.value||(Bo&&(i==null||i()),l.style.overflow=r,t.value=!1)};return be(o),c.computed({get(){return t.value},set(l){l?s():o()}})}(()=>{let n=!1;const e=c.ref(!1);return(t,i)=>{if(e.value=i.value,n)return;n=!0;const r=Rw(t,i.value);c.watch(e,s=>r.value=s)}})();var Iw=Object.defineProperty,Nw=Object.defineProperties,zw=Object.getOwnPropertyDescriptors,Jl=Object.getOwnPropertySymbols,Hw=Object.prototype.hasOwnProperty,Fw=Object.prototype.propertyIsEnumerable,Xl=(n,e,t)=>e in n?Iw(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ww=(n,e)=>{for(var t in e||(e={}))Hw.call(e,t)&&Xl(n,t,e[t]);if(Jl)for(var t of Jl(e))Fw.call(e,t)&&Xl(n,t,e[t]);return n},jw=(n,e)=>Nw(n,zw(e));c.defineComponent({name:"UseTimeAgo",props:["time","updateInterval","max","fullDateFormatter","messages"],setup(n,{slots:e}){const t=c.toRef(n,"time"),i=c.reactive(ty(t,jw(Ww({},n),{controls:!0})));return()=>{if(e.default)return e.default(i)}}});var Uw=Object.defineProperty,qw=Object.defineProperties,Kw=Object.getOwnPropertyDescriptors,Ql=Object.getOwnPropertySymbols,Gw=Object.prototype.hasOwnProperty,Yw=Object.prototype.propertyIsEnumerable,Zl=(n,e,t)=>e in n?Uw(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Jw=(n,e)=>{for(var t in e||(e={}))Gw.call(e,t)&&Zl(n,t,e[t]);if(Ql)for(var t of Ql(e))Yw.call(e,t)&&Zl(n,t,e[t]);return n},Xw=(n,e)=>qw(n,Kw(e));c.defineComponent({name:"UseTimestamp",props:["immediate","interval","offset"],setup(n,{slots:e}){const t=c.reactive(oy(Xw(Jw({},n),{controls:!0})));return()=>{if(e.default)return e.default(t)}}});var Qw=Object.defineProperty,ea=Object.getOwnPropertySymbols,Zw=Object.prototype.hasOwnProperty,e2=Object.prototype.propertyIsEnumerable,ta=(n,e,t)=>e in n?Qw(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,na=(n,e)=>{for(var t in e||(e={}))Zw.call(e,t)&&ta(n,t,e[t]);if(ea)for(var t of ea(e))e2.call(e,t)&&ta(n,t,e[t]);return n};c.defineComponent({name:"UseVirtualList",props:["list","options","height"],setup(n,{slots:e}){const{list:t}=c.toRefs(n),{list:i,containerProps:r,wrapperProps:s}=ly(t,n.options);return r.style.height=n.height||"300px",()=>c.h("div",na({},r),[c.h("div",na({},s.value),i.value.map(o=>c.h("div",{style:{overFlow:"hidden",height:o.height}},e.default?e.default(o):"Please set content!")))])}}),c.defineComponent({name:"UseWindowFocus",setup(n,{slots:e}){const t=c.reactive({focused:ay()});return()=>{if(e.default)return e.default(t)}}}),c.defineComponent({name:"UseWindowSize",props:["initialWidth","initialHeight"],setup(n,{slots:e}){const t=c.reactive(cy(n));return()=>{if(e.default)return e.default(t)}}});const t2={class:"bg-white flex items-center justify-between"},n2={class:"flex-1 flex justify-between sm:hidden items-center"},i2=["onClick"],r2={class:"text-sm text-gray-500"},s2=["onClick"],o2={class:"hidden sm:flex-1 sm:flex sm:items-center"},l2={"aria-label":"Pagination",class:"relative z-0 inline-flex rounded-base shadow-sm -space-x-px"},a2=["onClick"],c2=["onClick"],h2=["onClick"];var f2=c.defineComponent({__name:"Pagination",props:{page:{default:1},size:{default:10},total:{default:0}},emits:["update:page","update:size","change"],setup(n,{emit:e}){const t=n,{page:i,size:r,total:s}=c.toRefs(t),o=c.ref(Math.random()),l=({currentPage:a,currentPageSize:h})=>{e("change",{page:a,size:h})};return c.watch(()=>s==null?void 0:s.value,()=>{o.value=Math.random()}),(a,h)=>(c.openBlock(),c.createBlock(c.unref(vw),{key:o.value,page:c.unref(i),pageSize:c.unref(r),total:c.unref(s),onPageChange:l,onPageSizeChange:l},{default:c.withCtx(({currentPage:f,next:u,prev:d,pageCount:p})=>[c.createElementVNode("div",t2,[c.createElementVNode("div",n2,[c.createElementVNode("span",{class:"relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 cursor-pointer",onClick:d},[c.createVNode(c.unref(lr))],8,i2),c.createElementVNode("span",r2,c.toDisplayString(f)+" / "+c.toDisplayString(p),1),c.createElementVNode("span",{class:"ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 cursor-pointer",onClick:u},[c.createVNode(c.unref(Fn))],8,s2)]),c.createElementVNode("div",o2,[c.createElementVNode("nav",l2,[c.createElementVNode("span",{class:"relative inline-flex items-center px-2 py-2 rounded-l-[4px] border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50 cursor-pointer",onClick:d},[c.createVNode(c.unref(lr))],8,a2),(c.openBlock(!0),c.createElementBlock(c.Fragment,null,c.renderList(p,m=>(c.openBlock(),c.createElementBlock("span",{key:m,class:c.normalizeClass([{"z-10 bg-primary/1 border-primary text-primary":m===f,"bg-white border-gray-300 text-gray-500 hover:bg-gray-50":m!==f},"relative inline-flex items-center px-4 py-2 border text-sm font-medium cursor-pointer select-none"]),"aria-current":"page",onClick:g=>f.value=m},c.toDisplayString(m),11,c2))),128)),c.createElementVNode("span",{class:"relative inline-flex items-center px-2 py-2 rounded-r-[4px] border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50 cursor-pointer",onClick:u},[c.createVNode(c.unref(Fn))],8,h2)])])])]),_:1},8,["page","pageSize","total"]))}});class N{constructor(){}lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,i){let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(t,this.length,r,1),Fe.from(r,this.length-(t-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let i=[];return this.decompose(e,t,i,0),Fe.from(i,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new hn(this),s=new hn(e);for(let o=t,l=t;;){if(r.next(o),s.next(o),o=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(l+=r.value.length,r.done||l>=i)return!0}}iter(e=1){return new hn(this,e)}iterRange(e,t=this.length){return new ra(this,e,t)}iterLines(e,t){let i;if(e==null)i=this.iter();else{t==null&&(t=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new sa(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?N.empty:e.length<=32?new Q(e):Fe.from(Q.split(e,[]))}}class Q extends N{constructor(e,t=u2(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,i,r){for(let s=0;;s++){let o=this.text[s],l=r+o.length;if((t?i:l)>=e)return new d2(r,l,i,o);r=l+1,i++}}decompose(e,t,i,r){let s=e<=0&&t>=this.length?this:new Q(ia(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(r&1){let o=i.pop(),l=Xn(s.text,o.text.slice(),0,s.length);if(l.length<=32)i.push(new Q(l,o.length+s.length));else{let a=l.length>>1;i.push(new Q(l.slice(0,a)),new Q(l.slice(a)))}}else i.push(s)}replace(e,t,i){if(!(i instanceof Q))return super.replace(e,t,i);let r=Xn(this.text,Xn(i.text,ia(this.text,0,e)),t),s=this.length+i.length-(t-e);return r.length<=32?new Q(r,s):Fe.from(Q.split(r,[]),s)}sliceString(e,t=this.length,i=`
|
|
3
|
+
`){let r="";for(let s=0,o=0;s<=t&&o<this.text.length;o++){let l=this.text[o],a=s+l.length;s>e&&o&&(r+=i),e<a&&t>s&&(r+=l.slice(Math.max(0,e-s),t-s)),s=a+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(t.push(new Q(i,r)),i=[],r=-1);return r>-1&&t.push(new Q(i,r)),t}}class Fe extends N{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,t,i,r){for(let s=0;;s++){let o=this.children[s],l=r+o.length,a=i+o.lines-1;if((t?a:l)>=e)return o.lineInner(e,t,i,r);r=l+1,i=a+1}}decompose(e,t,i,r){for(let s=0,o=0;o<=t&&s<this.children.length;s++){let l=this.children[s],a=o+l.length;if(e<=a&&t>=o){let h=r&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!h?i.push(l):l.decompose(e-o,t-o,i,h)}o=a+1}}replace(e,t,i){if(i.lines<this.lines)for(let r=0,s=0;r<this.children.length;r++){let o=this.children[r],l=s+o.length;if(e>=s&&t<=l){let a=o.replace(e-s,t-s,i),h=this.lines-o.lines+a.lines;if(a.lines<h>>4&&a.lines>h>>6){let f=this.children.slice();return f[r]=a,new Fe(f,this.length-(t-e)+i.length)}return super.replace(s,l,a)}s=l+1}return super.replace(e,t,i)}sliceString(e,t=this.length,i=`
|
|
4
|
+
`){let r="";for(let s=0,o=0;s<this.children.length&&o<=t;s++){let l=this.children[s],a=o+l.length;o>e&&s&&(r+=i),e<a&&t>o&&(r+=l.sliceString(e-o,t-o,i)),o=a+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof Fe))return 0;let i=0,[r,s,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,s+=t){if(r==o||s==l)return i;let a=this.children[r],h=e.children[s];if(a!=h)return i+a.scanIdentical(h,t);i+=a.length+1}}static from(e,t=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let p of e)i+=p.lines;if(i<32){let p=[];for(let m of e)m.flatten(p);return new Q(p,t)}let r=Math.max(32,i>>5),s=r<<1,o=r>>1,l=[],a=0,h=-1,f=[];function u(p){let m;if(p.lines>s&&p instanceof Fe)for(let g of p.children)u(g);else p.lines>o&&(a>o||!a)?(d(),l.push(p)):p instanceof Q&&a&&(m=f[f.length-1])instanceof Q&&p.lines+m.lines<=32?(a+=p.lines,h+=p.length+1,f[f.length-1]=new Q(m.text.concat(p.text),m.length+1+p.length)):(a+p.lines>r&&d(),a+=p.lines,h+=p.length+1,f.push(p))}function d(){a!=0&&(l.push(f.length==1?f[0]:Fe.from(f,h)),h=-1,a=f.length=0)}for(let p of e)u(p);return d(),l.length==1?l[0]:new Fe(l,t)}}N.empty=new Q([""],0);function u2(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Xn(n,e,t=0,i=1e9){for(let r=0,s=0,o=!0;s<n.length&&r<=i;s++){let l=n[s],a=r+l.length;a>=t&&(a>i&&(l=l.slice(0,i-r)),r<t&&(l=l.slice(t-r)),o?(e[e.length-1]+=l,o=!1):e.push(l)),r=a+1}return e}function ia(n,e,t){return Xn(n,[""],e,t)}class hn{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof Q?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],o=s>>1,l=r instanceof Q?r.text.length:r.children.length;if(o==(t>0?l:0)){if(i==0)return this.done=!0,this.value="",this;t>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[i]+=t,e==0)return this.lineBreak=!0,this.value=`
|
|
5
|
+
`,this;e--}else if(r instanceof Q){let a=r.text[o+(t<0?-1:0)];if(this.offsets[i]+=t,a.length>Math.max(0,e))return this.value=e==0?a:t>0?a.slice(e):a.slice(0,a.length-e),this;e-=a.length}else{let a=r.children[o+(t<0?-1:0)];e>a.length?(e-=a.length,this.offsets[i]+=t):(t<0&&this.offsets[i]--,this.nodes.push(a),this.offsets.push(t>0?1:(a instanceof Q?a.text.length:a.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class ra{constructor(e,t,i){this.value="",this.done=!1,this.cursor=new hn(e,t>i?-1:1),this.pos=t>i?e.length:0,this.from=Math.min(t,i),this.to=Math.max(t,i)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let i=t<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=i?r:t<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class sa{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:i,value:r}=this.inner.next(e);return t?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(N.prototype[Symbol.iterator]=function(){return this.iter()},hn.prototype[Symbol.iterator]=ra.prototype[Symbol.iterator]=sa.prototype[Symbol.iterator]=function(){return this});class d2{constructor(e,t,i,r){this.from=e,this.to=t,this.number=i,this.text=r}get length(){return this.to-this.from}}let zt="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(n=>n?parseInt(n,36):1);for(let n=1;n<zt.length;n++)zt[n]+=zt[n-1];function p2(n){for(let e=1;e<zt.length;e+=2)if(zt[e]>n)return zt[e-1]<=n;return!1}function oa(n){return n>=127462&&n<=127487}const la=8205;function Ce(n,e,t=!0,i=!0){return(t?aa:m2)(n,e,i)}function aa(n,e,t){if(e==n.length)return e;e&&ca(n.charCodeAt(e))&&ha(n.charCodeAt(e-1))&&e--;let i=re(n,e);for(e+=_e(i);e<n.length;){let r=re(n,e);if(i==la||r==la||t&&p2(r))e+=_e(r),i=r;else if(oa(r)){let s=0,o=e-2;for(;o>=0&&oa(re(n,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function m2(n,e,t){for(;e>0;){let i=aa(n,e-2,t);if(i<e)return i;e--}return 0}function ca(n){return n>=56320&&n<57344}function ha(n){return n>=55296&&n<56320}function re(n,e){let t=n.charCodeAt(e);if(!ha(t)||e+1==n.length)return t;let i=n.charCodeAt(e+1);return ca(i)?(t-55296<<10)+(i-56320)+65536:t}function vr(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function _e(n){return n<65536?1:2}const xr=/\r\n?|\n/;var me=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(me||(me={}));class We{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t+1];e+=i<0?this.sections[t]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,i=0,r=0;t<this.sections.length;){let s=this.sections[t++],o=this.sections[t++];o<0?(e(i,r,s),r+=s):r+=o,i+=s}}iterChangedRanges(e,t=!1){kr(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];r<0?e.push(i,r):e.push(r,i)}return new We(e)}composeDesc(e){return this.empty?e:e.empty?this:fa(this,e)}mapDesc(e,t=!1){return e.empty?this:Sr(this,e,t)}mapPos(e,t=-1,i=me.Simple){let r=0,s=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],a=this.sections[o++],h=r+l;if(a<0){if(h>e)return s+(e-r);s+=l}else{if(i!=me.Simple&&h>=e&&(i==me.TrackDel&&r<e&&h>e||i==me.TrackBefore&&r<e||i==me.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!l)return e==r||t<0?s:s+a;s+=a}r=h}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,t=e){for(let i=0,r=0;i<this.sections.length&&r<=t;){let s=this.sections[i++],o=this.sections[i++],l=r+s;if(o>=0&&r<=t&&l>=e)return r<e&&l>t?"cover":!0;r=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let i=this.sections[t++],r=this.sections[t++];e+=(e?" ":"")+i+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new We(e)}static create(e){return new We(e)}}class te extends We{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return kr(this,(t,i,r,s,o)=>e=e.replace(r,r+(i-t),o),!1),e}mapDesc(e,t=!1){return Sr(this,e,t,!0)}invert(e){let t=this.sections.slice(),i=[];for(let r=0,s=0;r<t.length;r+=2){let o=t[r],l=t[r+1];if(l>=0){t[r]=l,t[r+1]=o;let a=r>>1;for(;i.length<a;)i.push(N.empty);i.push(o?e.slice(s,s+o):N.empty)}s+=o}return new te(t,i)}compose(e){return this.empty?e:e.empty?this:fa(this,e,!0)}map(e,t=!1){return e.empty?this:Sr(this,e,t,!0)}iterChanges(e,t=!1){kr(this,e,t)}get desc(){return We.create(this.sections)}filter(e){let t=[],i=[],r=[],s=new fn(this);e:for(let o=0,l=0;;){let a=o==e.length?1e9:e[o++];for(;l<a||l==a&&s.len==0;){if(s.done)break e;let f=Math.min(s.len,a-l);fe(r,f,-1);let u=s.ins==-1?-1:s.off==0?s.ins:0;fe(t,f,u),u>0&&ct(i,t,s.text),s.forward(f),l+=f}let h=e[o++];for(;l<h;){if(s.done)break e;let f=Math.min(s.len,h-l);fe(t,f,-1),fe(r,f,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(f),l+=f}}return{changes:new te(t,i),filtered:We.create(r)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let i=this.sections[t],r=this.sections[t+1];r<0?e.push(i):r==0?e.push([i]):e.push([i].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,i){let r=[],s=[],o=0,l=null;function a(f=!1){if(!f&&!r.length)return;o<t&&fe(r,t-o,-1);let u=new te(r,s);l=l?l.compose(u.map(l)):u,r=[],s=[],o=0}function h(f){if(Array.isArray(f))for(let u of f)h(u);else if(f instanceof te){if(f.length!=t)throw new RangeError(`Mismatched change set length (got ${f.length}, expected ${t})`);a(),l=l?l.compose(f.map(l)):f}else{let{from:u,to:d=u,insert:p}=f;if(u>d||u<0||d>t)throw new RangeError(`Invalid change range ${u} to ${d} (in doc of length ${t})`);let m=p?typeof p=="string"?N.of(p.split(i||xr)):p:N.empty,g=m.length;if(u==d&&g==0)return;u<o&&a(),u>o&&fe(r,u-o,-1),fe(r,d-u,g),ct(s,r,m),o=d}}return h(e),a(!l),l}static empty(e){return new te(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],i=[];for(let r=0;r<e.length;r++){let s=e[r];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;i.length<r;)i.push(N.empty);i[r]=N.of(s.slice(1)),t.push(s[0],i[r].length)}}}return new te(t,i)}static createSet(e,t){return new te(e,t)}}function fe(n,e,t,i=!1){if(e==0&&t<=0)return;let r=n.length-2;r>=0&&t<=0&&t==n[r+1]?n[r]+=e:e==0&&n[r]==0?n[r+1]+=t:i?(n[r]+=e,n[r+1]+=t):n.push(e,t)}function ct(n,e,t){if(t.length==0)return;let i=e.length-2>>1;if(i<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<i;)n.push(N.empty);n.push(t)}}function kr(n,e,t){let i=n.inserted;for(let r=0,s=0,o=0;o<n.sections.length;){let l=n.sections[o++],a=n.sections[o++];if(a<0)r+=l,s+=l;else{let h=r,f=s,u=N.empty;for(;h+=l,f+=a,a&&i&&(u=u.append(i[o-2>>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],a=n.sections[o++];e(r,h,s,f,u),r=h,s=f}}}function Sr(n,e,t,i=!1){let r=[],s=i?[]:null,o=new fn(n),l=new fn(e);for(let a=-1;;)if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);fe(r,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||a==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!t))){let h=l.len;for(fe(r,l.ins,-1);h;){let f=Math.min(o.len,h);o.ins>=0&&a<o.i&&o.len<=f&&(fe(r,0,o.ins),s&&ct(s,r,o.text),a=o.i),o.forward(f),h-=f}l.next()}else if(o.ins>=0){let h=0,f=o.len;for(;f;)if(l.ins==-1){let u=Math.min(f,l.len);h+=u,f-=u,l.forward(u)}else if(l.ins==0&&l.len<f)f-=l.len,l.next();else break;fe(r,h,a<o.i?o.ins:0),s&&a<o.i&&ct(s,r,o.text),a=o.i,o.forward(o.len-f)}else{if(o.done&&l.done)return s?te.createSet(r,s):We.create(r);throw new Error("Mismatched change set lengths")}}function fa(n,e,t=!1){let i=[],r=t?[]:null,s=new fn(n),o=new fn(e);for(let l=!1;;){if(s.done&&o.done)return r?te.createSet(i,r):We.create(i);if(s.ins==0)fe(i,s.len,0,l),s.next();else if(o.len==0&&!o.done)fe(i,0,o.ins,l),r&&ct(r,i,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let a=Math.min(s.len2,o.len),h=i.length;if(s.ins==-1){let f=o.ins==-1?-1:o.off?0:o.ins;fe(i,a,f,l),r&&f&&ct(r,i,o.text)}else o.ins==-1?(fe(i,s.off?0:s.len,a,l),r&&ct(r,i,s.textBit(a))):(fe(i,s.off?0:s.len,o.off?0:o.ins,l),r&&!o.off&&ct(r,i,o.text));l=(s.ins>a||o.ins>=0&&o.len>a)&&(l||i.length>h),s.forward2(a),o.forward(a)}}}}class fn{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?N.empty:e[t]}textBit(e){let{inserted:t}=this.set,i=this.i-2>>1;return i>=t.length&&!e?N.empty:t[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Mt{constructor(e,t,i){this.from=e,this.to=t,this.flags=i}get anchor(){return this.flags&16?this.to:this.from}get head(){return this.flags&16?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&4?-1:this.flags&8?1:0}get bidiLevel(){let e=this.flags&3;return e==3?null:e}get goalColumn(){let e=this.flags>>5;return e==33554431?void 0:e}map(e,t=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,t):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new Mt(i,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return k.range(e,t);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return k.range(this.anchor,i)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return k.range(e.anchor,e.head)}static create(e,t,i){return new Mt(e,t,i)}}class k{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:k.create(this.ranges.map(i=>i.map(e,t)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;t<this.ranges.length;t++)if(!this.ranges[t].eq(e.ranges[t]))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new k([this.main],0)}addRange(e,t=!0){return k.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let i=this.ranges.slice();return i[t]=e,k.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new k(e.ranges.map(t=>Mt.fromJSON(t)),e.main)}static single(e,t=e){return new k([k.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;r<e.length;r++){let s=e[r];if(s.empty?s.from<=i:s.from<i)return k.normalized(e.slice(),t);i=s.to}return new k(e,t)}static cursor(e,t=0,i,r){return Mt.create(e,e,(t==0?0:t<0?4:8)|(i==null?3:Math.min(2,i))|(r!=null?r:33554431)<<5)}static range(e,t,i){let r=(i!=null?i:33554431)<<5;return t<e?Mt.create(t,e,16|r|8):Mt.create(e,t,r|(t>e?4:0))}static normalized(e,t=0){let i=e[t];e.sort((r,s)=>r.from-s.from),t=e.indexOf(i);for(let r=1;r<e.length;r++){let s=e[r],o=e[r-1];if(s.empty?s.from<=o.to:s.from<o.to){let l=o.from,a=Math.max(s.to,o.to);r<=t&&t--,e.splice(--r,2,s.anchor>s.head?k.range(a,l):k.range(l,a))}}return new k(e,t)}}function ua(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Cr=0;class E{constructor(e,t,i,r,s){this.combine=e,this.compareInput=t,this.compare=i,this.isStatic=r,this.id=Cr++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}static define(e={}){return new E(e.combine||(t=>t),e.compareInput||((t,i)=>t===i),e.compare||(e.combine?(t,i)=>t===i:_r),!!e.static,e.enables)}of(e){return new Qn([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Qn(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Qn(e,this,2,t)}from(e,t){return t||(t=i=>i),this.compute([e],i=>t(i.field(e)))}}function _r(n,e){return n==e||n.length==e.length&&n.every((t,i)=>t===e[i])}class Qn{constructor(e,t,i,r){this.dependencies=e,this.facet=t,this.type=i,this.value=r,this.id=Cr++}dynamicSlot(e){var t;let i=this.value,r=this.facet.compareInput,s=this.id,o=e[s]>>1,l=this.type==2,a=!1,h=!1,f=[];for(let u of this.dependencies)u=="doc"?a=!0:u=="selection"?h=!0:(((t=e[u.id])!==null&&t!==void 0?t:1)&1)==0&&f.push(e[u.id]);return{create(u){return u.values[o]=i(u),1},update(u,d){if(a&&d.docChanged||h&&(d.docChanged||d.selection)||Mr(u,f)){let p=i(u);if(l?!da(p,u.values[o],r):!r(p,u.values[o]))return u.values[o]=p,1}return 0},reconfigure:(u,d)=>{let p=i(u),m=d.config.address[s];if(m!=null){let g=ti(d,m);if(this.dependencies.every(y=>y instanceof E?d.facet(y)===u.facet(y):y instanceof se?d.field(y,!1)==u.field(y,!1):!0)||(l?da(p,g,r):r(p,g)))return u.values[o]=g,0}return u.values[o]=p,1}}}}function da(n,e,t){if(n.length!=e.length)return!1;for(let i=0;i<n.length;i++)if(!t(n[i],e[i]))return!1;return!0}function Mr(n,e){let t=!1;for(let i of e)dn(n,i)&1&&(t=!0);return t}function g2(n,e,t){let i=t.map(a=>n[a.id]),r=t.map(a=>a.type),s=i.filter(a=>!(a&1)),o=n[e.id]>>1;function l(a){let h=[];for(let f=0;f<i.length;f++){let u=ti(a,i[f]);if(r[f]==2)for(let d of u)h.push(d);else h.push(u)}return e.combine(h)}return{create(a){for(let h of i)dn(a,h);return a.values[o]=l(a),1},update(a,h){if(!Mr(a,s))return 0;let f=l(a);return e.compare(f,a.values[o])?0:(a.values[o]=f,1)},reconfigure(a,h){let f=Mr(a,i),u=h.config.facets[e.id],d=h.facet(e);if(u&&!f&&_r(t,u))return a.values[o]=d,0;let p=l(a);return e.compare(p,d)?(a.values[o]=d,0):(a.values[o]=p,1)}}}const pa=E.define({static:!0});class se{constructor(e,t,i,r,s){this.id=e,this.createF=t,this.updateF=i,this.compareF=r,this.spec=s,this.provides=void 0}static define(e){let t=new se(Cr++,e.create,e.update,e.compare||((i,r)=>i===r),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(pa).find(i=>i.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:i=>(i.values[t]=this.create(i),1),update:(i,r)=>{let s=i.values[t],o=this.updateF(s,r);return this.compareF(s,o)?0:(i.values[t]=o,1)},reconfigure:(i,r)=>r.config.address[this.id]!=null?(i.values[t]=r.field(this),0):(i.values[t]=this.create(i),1)}}init(e){return[this,pa.of({field:this,create:e})]}get extension(){return this}}const At={lowest:4,low:3,default:2,high:1,highest:0};function un(n){return e=>new ma(e,n)}const Ht={highest:un(At.highest),high:un(At.high),default:un(At.default),low:un(At.low),lowest:un(At.lowest)};class ma{constructor(e,t){this.inner=e,this.prec=t}}class Zn{of(e){return new Ar(this,e)}reconfigure(e){return Zn.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Ar{constructor(e,t){this.compartment=e,this.inner=t}}class ei{constructor(e,t,i,r,s,o){for(this.base=e,this.compartments=t,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,i){let r=[],s=Object.create(null),o=new Map;for(let d of y2(e,t,o))d instanceof se?r.push(d):(s[d.facet.id]||(s[d.facet.id]=[])).push(d);let l=Object.create(null),a=[],h=[];for(let d of r)l[d.id]=h.length<<1,h.push(p=>d.slot(p));let f=i==null?void 0:i.config.facets;for(let d in s){let p=s[d],m=p[0].facet,g=f&&f[d]||[];if(p.every(y=>y.type==0))if(l[m.id]=a.length<<1|1,_r(g,p))a.push(i.facet(m));else{let y=m.combine(p.map(w=>w.value));a.push(i&&m.compare(y,i.facet(m))?i.facet(m):y)}else{for(let y of p)y.type==0?(l[y.id]=a.length<<1|1,a.push(y.value)):(l[y.id]=h.length<<1,h.push(w=>y.dynamicSlot(w)));l[m.id]=h.length<<1,h.push(y=>g2(y,m,p))}}let u=h.map(d=>d(l));return new ei(e,o,u,l,a,s)}}function y2(n,e,t){let i=[[],[],[],[],[]],r=new Map;function s(o,l){let a=r.get(o);if(a!=null){if(a<=l)return;let h=i[a].indexOf(o);h>-1&&i[a].splice(h,1),o instanceof Ar&&t.delete(o.compartment)}if(r.set(o,l),Array.isArray(o))for(let h of o)s(h,l);else if(o instanceof Ar){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),s(h,l)}else if(o instanceof ma)s(o.inner,o.prec);else if(o instanceof se)i[l].push(o),o.provides&&s(o.provides,l);else if(o instanceof Qn)i[l].push(o),o.facet.extensions&&s(o.facet.extensions,At.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(h,l)}}return s(n,At.default),i.reduce((o,l)=>o.concat(l))}function dn(n,e){if(e&1)return 2;let t=e>>1,i=n.status[t];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;n.status[t]=4;let r=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|r}function ti(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const ga=E.define(),ya=E.define({combine:n=>n.some(e=>e),static:!0}),wa=E.define({combine:n=>n.length?n[0]:void 0,static:!0}),ba=E.define(),va=E.define(),xa=E.define(),ka=E.define({combine:n=>n.length?n[0]:!1});class Ot{constructor(e,t){this.type=e,this.value=t}static define(){return new w2}}class w2{of(e){return new Ot(this,e)}}class b2{constructor(e){this.map=e}of(e){return new T(this,e)}}class T{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new T(this.type,t)}is(e){return this.type==e}static define(e={}){return new b2(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(t);s&&i.push(s)}return i}}T.reconfigure=T.define(),T.appendConfig=T.define();class ne{constructor(e,t,i,r,s,o){this.startState=e,this.changes=t,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,i&&ua(i,t.newLength),s.some(l=>l.type==ne.time)||(this.annotations=s.concat(ne.time.of(Date.now())))}static create(e,t,i,r,s,o){return new ne(e,t,i,r,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(ne.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}ne.time=Ot.define(),ne.userEvent=Ot.define(),ne.addToHistory=Ot.define(),ne.remote=Ot.define();function v2(n,e){let t=[];for(let i=0,r=0;;){let s,o;if(i<n.length&&(r==e.length||e[r]>=n[i]))s=n[i++],o=n[i++];else if(r<e.length)s=e[r++],o=e[r++];else return t;!t.length||t[t.length-1]<s?t.push(s,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function Sa(n,e,t){var i;let r,s,o;return t?(r=e.changes,s=te.empty(e.changes.length),o=n.changes.compose(e.changes)):(r=e.changes.map(n.changes),s=n.changes.mapDesc(e.changes,!0),o=n.changes.compose(r)),{changes:o,selection:e.selection?e.selection.map(s):(i=n.selection)===null||i===void 0?void 0:i.map(r),effects:T.mapEffects(n.effects,r).concat(T.mapEffects(e.effects,s)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function Or(n,e,t){let i=e.selection,r=Ft(e.annotations);return e.userEvent&&(r=r.concat(ne.userEvent.of(e.userEvent))),{changes:e.changes instanceof te?e.changes:te.of(e.changes||[],t,n.facet(wa)),selection:i&&(i instanceof k?i:k.single(i.anchor,i.head)),effects:Ft(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}function Ca(n,e,t){let i=Or(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let o=!!e[s].sequential;i=Sa(i,Or(n,e[s],o?i.changes.newLength:n.doc.length),o)}let r=ne.create(n,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return k2(t?x2(r):r)}function x2(n){let e=n.startState,t=!0;for(let r of e.facet(ba)){let s=r(n);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:v2(t,s))}if(t!==!0){let r,s;if(t===!1)s=n.changes.invertedDesc,r=te.empty(e.doc.length);else{let o=n.changes.filter(t);r=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}n=ne.create(e,r,n.selection&&n.selection.map(s),T.mapEffects(n.effects,s),n.annotations,n.scrollIntoView)}let i=e.facet(va);for(let r=i.length-1;r>=0;r--){let s=i[r](n);s instanceof ne?n=s:Array.isArray(s)&&s.length==1&&s[0]instanceof ne?n=s[0]:n=Ca(e,Ft(s),!1)}return n}function k2(n){let e=n.startState,t=e.facet(xa),i=n;for(let r=t.length-1;r>=0;r--){let s=t[r](n);s&&Object.keys(s).length&&(i=Sa(n,Or(e,s,n.changes.newLength),!0))}return i==n?n:ne.create(e,n.changes,n.selection,i.effects,i.annotations,i.scrollIntoView)}const S2=[];function Ft(n){return n==null?S2:Array.isArray(n)?n:[n]}var ge=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(ge||(ge={}));const C2=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Br;try{Br=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function _2(n){if(Br)return Br.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>"\x80"&&(t.toUpperCase()!=t.toLowerCase()||C2.test(t)))return!0}return!1}function M2(n){return e=>{if(!/\S/.test(e))return ge.Space;if(_2(e))return ge.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return ge.Word;return ge.Other}}class R{constructor(e,t,i,r,s,o){this.config=e,this.doc=t,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)dn(this,l<<1);this.computeSlot=null}field(e,t=!0){let i=this.config.address[e.id];if(i==null){if(t)throw new RangeError("Field is not present in this state");return}return dn(this,i),ti(this,i)}update(...e){return Ca(this,e,!0)}applyTransaction(e){let t=this.config,{base:i,compartments:r}=t;for(let o of e.effects)o.is(Zn.reconfigure)?(t&&(r=new Map,t.compartments.forEach((l,a)=>r.set(a,l)),t=null),r.set(o.value.compartment,o.value.extension)):o.is(T.reconfigure)?(t=null,i=o.value):o.is(T.appendConfig)&&(t=null,i=Ft(i).concat(o.value));let s;t?s=e.startState.values.slice():(t=ei.resolve(i,r,this),s=new R(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(l,a)=>a.reconfigure(l,this),null).values),new R(t,e.newDoc,e.newSelection,s,(o,l)=>l.update(o,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:k.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,i=e(t.ranges[0]),r=this.changes(i.changes),s=[i.range],o=Ft(i.effects);for(let l=1;l<t.ranges.length;l++){let a=e(t.ranges[l]),h=this.changes(a.changes),f=h.map(r);for(let d=0;d<l;d++)s[d]=s[d].map(f);let u=r.mapDesc(h,!0);s.push(a.range.map(u)),r=r.compose(f),o=T.mapEffects(o,f).concat(T.mapEffects(Ft(a.effects),u))}return{changes:r,selection:k.create(s,t.mainIndex),effects:o}}changes(e=[]){return e instanceof te?e:te.of(e,this.doc.length,this.facet(R.lineSeparator))}toText(e){return N.of(e.split(this.facet(R.lineSeparator)||xr))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(dn(this,t),ti(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let r=e[i];r instanceof se&&this.config.address[r.id]!=null&&(t[i]=r.spec.toJSON(this.field(e[i]),this))}return t}static fromJSON(e,t={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(i){for(let s in i)if(Object.prototype.hasOwnProperty.call(e,s)){let o=i[s],l=e[s];r.push(o.init(a=>o.spec.fromJSON(l,a)))}}return R.create({doc:e.doc,selection:k.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=ei.resolve(e.extensions||[],new Map),i=e.doc instanceof N?e.doc:N.of((e.doc||"").split(t.staticFacet(R.lineSeparator)||xr)),r=e.selection?e.selection instanceof k?e.selection:k.single(e.selection.anchor,e.selection.head):k.single(0);return ua(r,i.length),t.staticFacet(ya)||(r=r.asSingle()),new R(t,i,r,t.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(R.tabSize)}get lineBreak(){return this.facet(R.lineSeparator)||`
|
|
6
|
+
`}get readOnly(){return this.facet(ka)}phrase(e,...t){for(let i of this.facet(R.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let s=+(r||1);return!s||s>t.length?i:t[s-1]})),e}languageDataAt(e,t,i=-1){let r=[];for(let s of this.facet(ga))for(let o of s(this,t,i))Object.prototype.hasOwnProperty.call(o,e)&&r.push(o[e]);return r}charCategorizer(e){return M2(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:i,length:r}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let a=Ce(t,o,!1);if(s(t.slice(a,o))!=ge.Word)break;o=a}for(;l<r;){let a=Ce(t,l);if(s(t.slice(l,a))!=ge.Word)break;l=a}return o==l?null:k.range(o+i,l+i)}}R.allowMultipleSelections=ya,R.tabSize=E.define({combine:n=>n.length?n[0]:4}),R.lineSeparator=wa,R.readOnly=ka,R.phrases=E.define({compare(n,e){let t=Object.keys(n),i=Object.keys(e);return t.length==i.length&&t.every(r=>n[r]==e[r])}}),R.languageData=ga,R.changeFilter=ba,R.transactionFilter=va,R.transactionExtender=xa,Zn.reconfigure=T.define();function tt(n,e,t={}){let i={};for(let r of n)for(let s of Object.keys(r)){let o=r[s],l=i[s];if(l===void 0)i[s]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,s))i[s]=t[s](l,o);else throw new Error("Config merge conflict for field "+s)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}class Bt{eq(e){return this==e}range(e,t=e){return pn.create(e,t,this)}}Bt.prototype.startSide=Bt.prototype.endSide=0,Bt.prototype.point=!1,Bt.prototype.mapMode=me.TrackDel;class pn{constructor(e,t,i){this.from=e,this.to=t,this.value=i}static create(e,t,i){return new pn(e,t,i)}}function Er(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class Pr{constructor(e,t,i,r){this.from=e,this.to=t,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,i,r=0){let s=i?this.to:this.from;for(let o=r,l=s.length;;){if(o==l)return o;let a=o+l>>1,h=s[a]-e||(i?this.value[a].endSide:this.value[a].startSide)-t;if(a==o)return h>=0?o:l;h>=0?l=a:o=a+1}}between(e,t,i,r){for(let s=this.findIndex(t,-1e9,!0),o=this.findIndex(i,1e9,!1,s);s<o;s++)if(r(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,t){let i=[],r=[],s=[],o=-1,l=-1;for(let a=0;a<this.value.length;a++){let h=this.value[a],f=this.from[a]+e,u=this.to[a]+e,d,p;if(f==u){let m=t.mapPos(f,h.startSide,h.mapMode);if(m==null||(d=p=m,h.startSide!=h.endSide&&(p=t.mapPos(f,h.endSide),p<d)))continue}else if(d=t.mapPos(f,h.startSide),p=t.mapPos(u,h.endSide),d>p||d==p&&h.startSide>0&&h.endSide<=0)continue;(p-d||h.endSide-h.startSide)<0||(o<0&&(o=d),h.point&&(l=Math.max(l,p-d)),i.push(h),r.push(d-o),s.push(p-o))}return{mapped:i.length?new Pr(r,s,i,l):null,pos:o}}}class z{constructor(e,t,i,r){this.chunkPos=e,this.chunk=t,this.nextLayer=i,this.maxPoint=r}static create(e,t,i,r){return new z(e,t,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:i=!1,filterFrom:r=0,filterTo:s=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(i&&(t=t.slice().sort(Er)),this.isEmpty)return t.length?z.of(t):this;let l=new Ma(this,null,-1).goto(0),a=0,h=[],f=new ht;for(;l.value||a<t.length;)if(a<t.length&&(l.from-t[a].from||l.startSide-t[a].value.startSide)>=0){let u=t[a++];f.addInner(u.from,u.to,u.value)||h.push(u)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(a==t.length||this.chunkEnd(l.chunkIndex)<t[a].from)&&(!o||r>this.chunkEnd(l.chunkIndex)||s<this.chunkPos[l.chunkIndex])&&f.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||r>l.to||s<l.from||o(l.from,l.to,l.value))&&(f.addInner(l.from,l.to,l.value)||h.push(pn.create(l.from,l.to,l.value))),l.next());return f.finishInner(this.nextLayer.isEmpty&&!h.length?z.empty:this.nextLayer.update({add:h,filter:o,filterFrom:r,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],i=[],r=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],a=this.chunk[o],h=e.touchesRange(l,l+a.length);if(h===!1)r=Math.max(r,a.maxPoint),t.push(a),i.push(e.mapPos(l));else if(h===!0){let{mapped:f,pos:u}=a.map(l,e);f&&(r=Math.max(r,f.maxPoint),t.push(f),i.push(u))}}let s=this.nextLayer.map(e);return t.length==0?s:new z(i,t,s||z.empty,r)}between(e,t,i){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let s=this.chunkPos[r],o=this.chunk[r];if(t>=s&&e<=s+o.length&&o.between(s,e-s,t-s,i)===!1)return}this.nextLayer.between(e,t,i)}}iter(e=0){return mn.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return mn.from(e).goto(t)}static compare(e,t,i,r,s=-1){let o=e.filter(u=>u.maxPoint>0||!u.isEmpty&&u.maxPoint>=s),l=t.filter(u=>u.maxPoint>0||!u.isEmpty&&u.maxPoint>=s),a=_a(o,l,i),h=new gn(o,a,s),f=new gn(l,a,s);i.iterGaps((u,d,p)=>Aa(h,u,f,d,p,r)),i.empty&&i.length==0&&Aa(h,0,f,0,0,r)}static eq(e,t,i=0,r){r==null&&(r=1e9);let s=e.filter(f=>!f.isEmpty&&t.indexOf(f)<0),o=t.filter(f=>!f.isEmpty&&e.indexOf(f)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let l=_a(s,o),a=new gn(s,l,0).goto(i),h=new gn(o,l,0).goto(i);for(;;){if(a.to!=h.to||!$r(a.active,h.active)||a.point&&(!h.point||!a.point.eq(h.point)))return!1;if(a.to>r)return!0;a.next(),h.next()}}static spans(e,t,i,r,s=-1){let o=new gn(e,null,s).goto(t),l=t,a=o.openStart;for(;;){let h=Math.min(o.to,i);if(o.point?(r.point(l,h,o.point,o.activeForPoint(o.to),a,o.pointRank),a=o.openEnd(h)+(o.to>h?1:0)):h>l&&(r.span(l,h,o.active,a),a=o.openEnd(h)),o.to>i)break;l=o.to,o.next()}return a}static of(e,t=!1){let i=new ht;for(let r of e instanceof pn?[e]:t?A2(e):e)i.add(r.from,r.to,r.value);return i.finish()}}z.empty=new z([],[],null,-1);function A2(n){if(n.length>1)for(let e=n[0],t=1;t<n.length;t++){let i=n[t];if(Er(e,i)>0)return n.slice().sort(Er);e=i}return n}z.empty.nextLayer=z.empty;class ht{constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}finishChunk(e){this.chunks.push(new Pr(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}add(e,t,i){this.addInner(e,t,i)||(this.nextLayer||(this.nextLayer=new ht)).add(e,t,i)}addInner(e,t,i){let r=e-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=t,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let i=t.value.length-1;return this.last=t.value[i],this.lastFrom=t.from[i]+e,this.lastTo=t.to[i]+e,!0}finish(){return this.finishInner(z.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=z.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function _a(n,e,t){let i=new Map;for(let s of n)for(let o=0;o<s.chunk.length;o++)s.chunk[o].maxPoint<=0&&i.set(s.chunk[o],s.chunkPos[o]);let r=new Set;for(let s of e)for(let o=0;o<s.chunk.length;o++){let l=i.get(s.chunk[o]);l!=null&&(t?t.mapPos(l):l)==s.chunkPos[o]&&!(t!=null&&t.touchesRange(l,l+s.chunk[o].length))&&r.add(s.chunk[o])}return r}class Ma{constructor(e,t,i,r=0){this.layer=e,this.skip=t,this.minPoint=i,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,i){for(;this.chunkIndex<this.layer.chunk.length;){let r=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(r)||this.layer.chunkEnd(this.chunkIndex)<e||r.maxPoint<this.minPoint))break;this.chunkIndex++,i=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!i||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],i=e+t.from[this.rangeIndex];if(this.from=i,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class mn{constructor(e){this.heap=e}static from(e,t=null,i=-1){let r=[];for(let s=0;s<e.length;s++)for(let o=e[s];!o.isEmpty;o=o.nextLayer)o.maxPoint>=i&&r.push(new Ma(o,t,i,s));return r.length==1?r[0]:new mn(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let i of this.heap)i.goto(e,t);for(let i=this.heap.length>>1;i>=0;i--)Dr(this.heap,i);return this.next(),this}forward(e,t){for(let i of this.heap)i.forward(e,t);for(let i=this.heap.length>>1;i>=0;i--)Dr(this.heap,i);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Dr(this.heap,0)}}}function Dr(n,e){for(let t=n[e];;){let i=(e<<1)+1;if(i>=n.length)break;let r=n[i];if(i+1<n.length&&r.compare(n[i+1])>=0&&(r=n[i+1],i++),t.compare(r)<0)break;n[i]=t,n[e]=r,e=i}}class gn{constructor(e,t,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=mn.from(e,t,i)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){ni(this.active,e),ni(this.activeTo,e),ni(this.activeRank,e),this.minActive=Oa(this.active,this.activeTo)}addActive(e){let t=0,{value:i,to:r,rank:s}=this.cursor;for(;t<this.activeRank.length&&this.activeRank[t]<=s;)t++;ii(this.active,t,i),ii(this.activeTo,t,r),ii(this.activeRank,t,s),e&&ii(e,t,this.cursor.from),this.minActive=Oa(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let i=this.openStart<0?[]:null,r=0;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>e){this.to=this.activeTo[s],this.endSide=this.active[s].endSide;break}this.removeActive(s),i&&ni(i,s)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(i),this.cursor.from<e&&this.cursor.to>e&&r++,this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=o,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=o.endSide,this.cursor.from<e&&(r=1),this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(i){let s=0;for(;s<i.length&&i[s]<e;)s++;this.openStart=s+r}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let i=this.active.length-1;i>=0&&!(this.activeRank[i]<this.pointRank);i--)(this.activeTo[i]>e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&t.push(this.active[i]);return t.reverse()}openEnd(e){let t=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)t++;return t}}function Aa(n,e,t,i,r,s){n.goto(e),t.goto(i);let o=i+r,l=i,a=i-e;for(;;){let h=n.to+a-t.to||n.endSide-t.endSide,f=h<0?n.to+a:t.to,u=Math.min(f,o);if(n.point||t.point?n.point&&t.point&&(n.point==t.point||n.point.eq(t.point))&&$r(n.activeForPoint(n.to+a),t.activeForPoint(t.to))||s.comparePoint(l,u,n.point,t.point):u>l&&!$r(n.active,t.active)&&s.compareRange(l,u,n.active,t.active),f>o)break;l=f,h<=0&&n.next(),h>=0&&t.next()}}function $r(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t]&&!n[t].eq(e[t]))return!1;return!0}function ni(n,e){for(let t=e,i=n.length-1;t<i;t++)n[t]=n[t+1];n.pop()}function ii(n,e,t){for(let i=n.length-1;i>=e;i--)n[i+1]=n[i];n[e]=t}function Oa(n,e){let t=-1,i=1e9;for(let r=0;r<e.length;r++)(e[r]-i||n[r].endSide-n[t].endSide)<0&&(t=r,i=e[r]);return t}function yn(n,e,t=n.length){let i=0;for(let r=0;r<t;)n.charCodeAt(r)==9?(i+=e-i%e,r++):(i++,r=Ce(n,r));return i}function Tr(n,e,t,i){for(let r=0,s=0;;){if(s>=e)return r;if(r==n.length)break;s+=n.charCodeAt(r)==9?t-s%t:1,r=Ce(n,r)}return i===!0?-1:n.length}const Lr="\u037C",Ba=typeof Symbol>"u"?"__"+Lr:Symbol.for(Lr),Vr=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Ea=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class ft{constructor(e,t){this.rules=[];let{finish:i}=t||{};function r(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,l,a,h){let f=[],u=/^@(\w+)\b/.exec(o[0]),d=u&&u[1]=="keyframes";if(u&&l==null)return a.push(o[0]+";");for(let p in l){let m=l[p];if(/&/.test(p))s(p.split(/,\s*/).map(g=>o.map(y=>g.replace(/&/,y))).reduce((g,y)=>g.concat(y)),m,a);else if(m&&typeof m=="object"){if(!u)throw new RangeError("The value of a property ("+p+") should be a primitive value.");s(r(p),m,f,d)}else m!=null&&f.push(p.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+m+";")}(f.length||d)&&a.push((i&&!u&&!h?o.map(i):o).join(", ")+" {"+f.join(" ")+"}")}for(let o in e)s(r(o),e[o],this.rules)}getRules(){return this.rules.join(`
|
|
7
|
+
`)}static newName(){let e=Ea[Ba]||1;return Ea[Ba]=e+1,Lr+e.toString(36)}static mount(e,t){(e[Vr]||new O2(e)).mount(Array.isArray(t)?t:[t])}}let ri=null;class O2{constructor(e){if(!e.head&&e.adoptedStyleSheets&&typeof CSSStyleSheet<"u"){if(ri)return e.adoptedStyleSheets=[ri.sheet].concat(e.adoptedStyleSheets),e[Vr]=ri;this.sheet=new CSSStyleSheet,e.adoptedStyleSheets=[this.sheet].concat(e.adoptedStyleSheets),ri=this}else{this.styleTag=(e.ownerDocument||e).createElement("style");let t=e.head||e;t.insertBefore(this.styleTag,t.firstChild)}this.modules=[],e[Vr]=this}mount(e){let t=this.sheet,i=0,r=0;for(let s=0;s<e.length;s++){let o=e[s],l=this.modules.indexOf(o);if(l<r&&l>-1&&(this.modules.splice(l,1),r--,l=-1),l==-1){if(this.modules.splice(r++,0,o),t)for(let a=0;a<o.rules.length;a++)t.insertRule(o.rules[a],i++)}else{for(;r<l;)i+=this.modules[r++].rules.length;i+=o.rules.length,r++}}if(!t){let s="";for(let o=0;o<this.modules.length;o++)s+=this.modules[o].getRules()+`
|
|
8
|
+
`;this.styleTag.textContent=s}}}for(var ut={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},Wt={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},Pa=typeof navigator<"u"&&/Chrome\/(\d+)/.exec(navigator.userAgent),B2=typeof navigator<"u"&&/Apple Computer/.test(navigator.vendor),E2=typeof navigator<"u"&&/Gecko\/\d+/.test(navigator.userAgent),Da=typeof navigator<"u"&&/Mac/.test(navigator.platform),P2=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),D2=Pa&&(Da||+Pa[1]<57)||E2&&Da,oe=0;oe<10;oe++)ut[48+oe]=ut[96+oe]=String(oe);for(var oe=1;oe<=24;oe++)ut[oe+111]="F"+oe;for(var oe=65;oe<=90;oe++)ut[oe]=String.fromCharCode(oe+32),Wt[oe]=String.fromCharCode(oe);for(var Rr in ut)Wt.hasOwnProperty(Rr)||(Wt[Rr]=ut[Rr]);function $2(n){var e=D2&&(n.ctrlKey||n.altKey||n.metaKey)||(B2||P2)&&n.shiftKey&&n.key&&n.key.length==1,t=!e&&n.key||(n.shiftKey?Wt:ut)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function si(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function jt(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function T2(){let n=document.activeElement;for(;n&&n.shadowRoot;)n=n.shadowRoot.activeElement;return n}function oi(n,e){if(!e.anchorNode)return!1;try{return jt(n,e.anchorNode)}catch{return!1}}function wn(n){return n.nodeType==3?qt(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function li(n,e,t,i){return t?$a(n,e,t,i,-1)||$a(n,e,t,i,1):!1}function ai(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function $a(n,e,t,i,r){for(;;){if(n==t&&e==i)return!0;if(e==(r<0?0:bn(n))){if(n.nodeName=="DIV")return!1;let s=n.parentNode;if(!s||s.nodeType!=1)return!1;e=ai(n)+(r<0?0:1),n=s}else if(n.nodeType==1){if(n=n.childNodes[e+(r<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=r<0?bn(n):0}else return!1}}function bn(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}const Ta={left:0,right:0,top:0,bottom:0};function ci(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function L2(n){return{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function V2(n,e,t,i,r,s,o,l){let a=n.ownerDocument,h=a.defaultView;for(let f=n;f;)if(f.nodeType==1){let u,d=f==a.body;if(d)u=L2(h);else{if(f.scrollHeight<=f.clientHeight&&f.scrollWidth<=f.clientWidth){f=f.parentNode;continue}let g=f.getBoundingClientRect();u={left:g.left,right:g.left+f.clientWidth,top:g.top,bottom:g.top+f.clientHeight}}let p=0,m=0;if(r=="nearest")e.top<u.top?(m=-(u.top-e.top+o),t>0&&e.bottom>u.bottom+m&&(m=e.bottom-u.bottom+m+o)):e.bottom>u.bottom&&(m=e.bottom-u.bottom+o,t<0&&e.top-m<u.top&&(m=-(u.top+m-e.top+o)));else{let g=e.bottom-e.top,y=u.bottom-u.top;m=(r=="center"&&g<=y?e.top+g/2-y/2:r=="start"||r=="center"&&t<0?e.top-o:e.bottom-y+o)-u.top}if(i=="nearest"?e.left<u.left?(p=-(u.left-e.left+s),t>0&&e.right>u.right+p&&(p=e.right-u.right+p+s)):e.right>u.right&&(p=e.right-u.right+s,t<0&&e.left<u.left+p&&(p=-(u.left+p-e.left+s))):p=(i=="center"?e.left+(e.right-e.left)/2-(u.right-u.left)/2:i=="start"==l?e.left-s:e.right-(u.right-u.left)+s)-u.left,p||m)if(d)h.scrollBy(p,m);else{if(m){let g=f.scrollTop;f.scrollTop+=m,m=f.scrollTop-g}if(p){let g=f.scrollLeft;f.scrollLeft+=p,p=f.scrollLeft-g}e={left:e.left-p,top:e.top-m,right:e.right-p,bottom:e.bottom-m}}if(d)break;f=f.assignedSlot||f.parentNode,i=r="nearest"}else if(f.nodeType==11)f=f.host;else break}class R2{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){this.set(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)}set(e,t,i,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=i,this.focusOffset=r}}let Ut=null;function La(n){if(n.setActive)return n.setActive();if(Ut)return n.focus(Ut);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(Ut==null?{get preventScroll(){return Ut={preventScroll:!0},!0}}:void 0),!Ut){Ut=!1;for(let t=0;t<e.length;){let i=e[t++],r=e[t++],s=e[t++];i.scrollTop!=r&&(i.scrollTop=r),i.scrollLeft!=s&&(i.scrollLeft=s)}}}let Va;function qt(n,e,t=e){let i=Va||(Va=document.createRange());return i.setEnd(n,t),i.setStart(n,e),i}function vn(n,e,t){let i={key:e,code:e,keyCode:t,which:t,cancelable:!0},r=new KeyboardEvent("keydown",i);r.synthetic=!0,n.dispatchEvent(r);let s=new KeyboardEvent("keyup",i);return s.synthetic=!0,n.dispatchEvent(s),r.defaultPrevented||s.defaultPrevented}function I2(n){for(;n;){if(n&&(n.nodeType==9||n.nodeType==11&&n.host))return n;n=n.assignedSlot||n.parentNode}return null}function Ra(n){for(;n.attributes.length;)n.removeAttributeNode(n.attributes[0])}function N2(n,e){let t=e.focusNode,i=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=i)return!1;for(;;)if(i){if(t.nodeType!=1)return!1;let r=t.childNodes[i-1];r.contentEditable=="false"?i--:(t=r,i=bn(t))}else{if(t==n)return!0;i=ai(t),t=t.parentNode}}class le{constructor(e,t,i=!0){this.node=e,this.offset=t,this.precise=i}static before(e,t){return new le(e.parentNode,ai(e),t)}static after(e,t){return new le(e.parentNode,ai(e)+1,t)}}const Ir=[];class U{constructor(){this.parent=null,this.dom=null,this.dirty=2}get editorView(){if(!this.parent)throw new Error("Accessing view in orphan content view");return this.parent.editorView}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let i of this.children){if(i==e)return t;t+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}coordsAt(e,t){return null}sync(e){if(this.dirty&2){let t=this.dom,i=null,r;for(let s of this.children){if(s.dirty){if(!s.dom&&(r=i?i.nextSibling:t.firstChild)){let o=U.get(r);(!o||!o.parent&&o.constructor==s.constructor)&&s.reuseDOM(r)}s.sync(e),s.dirty=0}if(r=i?i.nextSibling:t.firstChild,e&&!e.written&&e.node==t&&r!=s.dom&&(e.written=!0),s.dom.parentNode==t)for(;r&&r!=s.dom;)r=Ia(r);else t.insertBefore(s.dom,r);i=s.dom}for(r=i?i.nextSibling:t.firstChild,r&&e&&e.node==t&&(e.written=!0);r;)r=Ia(r)}else if(this.dirty&1)for(let t of this.children)t.dirty&&(t.sync(e),t.dirty=0)}reuseDOM(e){}localPosFromDOM(e,t){let i;if(e==this.dom)i=this.dom.childNodes[t];else{let r=bn(e)==0?0:t==0?-1:1;for(;;){let s=e.parentNode;if(s==this.dom)break;r==0&&s.firstChild!=s.lastChild&&(e==s.firstChild?r=-1:r=1),e=s}r<0?i=e:i=e.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!U.get(i);)i=i.nextSibling;if(!i)return this.length;for(let r=0,s=0;;r++){let o=this.children[r];if(o.dom==i)return s;s+=o.length+o.breakAfter}}domBoundsAround(e,t,i=0){let r=-1,s=-1,o=-1,l=-1;for(let a=0,h=i,f=i;a<this.children.length;a++){let u=this.children[a],d=h+u.length;if(h<e&&d>t)return u.domBoundsAround(e,t,h);if(d>=e&&r==-1&&(r=a,s=h),h>t&&u.dom.parentNode==this.dom){o=a,l=f;break}f=d,h=d+u.breakAfter}return{from:s,to:l<0?i+this.length:l,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}markDirty(e=!1){this.dirty|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.dirty|=2),t.dirty&1)return;t.dirty|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.dirty&&this.markParentsDirty(!0))}setDOM(e){this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,i=Ir){this.markDirty();for(let r=e;r<t;r++){let s=this.children[r];s.parent==this&&s.destroy()}this.children.splice(e,t-e,...i);for(let r=0;r<i.length;r++)i[r].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new Na(this.children,e,this.children.length)}childPos(e,t=1){return this.childCursor().findPos(e,t)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}merge(e,t,i,r,s,o){return!1}become(e){return!1}getSide(){return 0}destroy(){this.parent=null}}U.prototype.breakAfter=0;function Ia(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class Na{constructor(e,t,i){this.children=e,this.pos=t,this.i=i,this.off=0}findPos(e,t=1){for(;;){if(e>this.pos||e==this.pos&&(t>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function za(n,e,t,i,r,s,o,l,a){let{children:h}=n,f=h.length?h[e]:null,u=s.length?s[s.length-1]:null,d=u?u.breakAfter:o;if(!(e==i&&f&&!o&&!d&&s.length<2&&f.merge(t,r,s.length?u:null,t==0,l,a))){if(i<h.length){let p=h[i];p&&r<p.length?(e==i&&(p=p.split(r),r=0),!d&&u&&p.merge(0,r,u,!0,0,a)?s[s.length-1]=p:(r&&p.merge(0,r,null,!1,0,a),s.push(p))):p!=null&&p.breakAfter&&(u?u.breakAfter=1:o=1),i++}for(f&&(f.breakAfter=o,t>0&&(!o&&s.length&&f.merge(t,f.length,s[0],!1,l,0)?f.breakAfter=s.shift().breakAfter:(t<f.length||f.children.length&&f.children[f.children.length-1].length==0)&&f.merge(t,f.length,null,!1,l,0),e++));e<i&&s.length;)if(h[i-1].become(s[s.length-1]))i--,s.pop(),a=s.length?0:l;else if(h[e].become(s[0]))e++,s.shift(),l=s.length?0:a;else break;!s.length&&e&&i<h.length&&!h[e-1].breakAfter&&h[i].merge(0,0,h[e-1],!1,l,a)&&e--,(e<i||s.length)&&n.replaceChildren(e,i,s)}}function Ha(n,e,t,i,r,s){let o=n.childCursor(),{i:l,off:a}=o.findPos(t,1),{i:h,off:f}=o.findPos(e,-1),u=e-t;for(let d of i)u+=d.length;n.length+=u,za(n,h,f,l,a,i,0,r,s)}let Me=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Nr=typeof document<"u"?document:{documentElement:{style:{}}};const zr=/Edge\/(\d+)/.exec(Me.userAgent),Fa=/MSIE \d/.test(Me.userAgent),Hr=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Me.userAgent),hi=!!(Fa||Hr||zr),Wa=!hi&&/gecko\/(\d+)/i.test(Me.userAgent),Fr=!hi&&/Chrome\/(\d+)/.exec(Me.userAgent),ja="webkitFontSmoothing"in Nr.documentElement.style,Ua=!hi&&/Apple Computer/.test(Me.vendor),qa=Ua&&(/Mobile\/\w+/.test(Me.userAgent)||Me.maxTouchPoints>2);var B={mac:qa||/Mac/.test(Me.platform),windows:/Win/.test(Me.platform),linux:/Linux|X11/.test(Me.platform),ie:hi,ie_version:Fa?Nr.documentMode||6:Hr?+Hr[1]:zr?+zr[1]:0,gecko:Wa,gecko_version:Wa?+(/Firefox\/(\d+)/.exec(Me.userAgent)||[0,0])[1]:0,chrome:!!Fr,chrome_version:Fr?+Fr[1]:0,ios:qa,android:/Android\b/.test(Me.userAgent),webkit:ja,safari:Ua,webkit_version:ja?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:Nr.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const z2=256;class dt extends U{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,t,i){return i&&(!(i instanceof dt)||this.length-(t-e)+i.length>z2)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new dt(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new le(this.dom,e)}domBoundsAround(e,t,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return Wr(this.dom,e,t)}}class je extends U{constructor(e,t=[],i=0){super(),this.mark=e,this.children=t,this.length=i;for(let r of t)r.setParent(this)}setAttrs(e){if(Ra(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.dirty|=6)}sync(e){this.dom?this.dirty&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e)}merge(e,t,i,r,s,o){return i&&(!(i instanceof je&&i.mark.eq(this.mark))||e&&s<=0||t<this.length&&o<=0)?!1:(Ha(this,e,t,i?i.children:[],s-1,o-1),this.markDirty(),!0)}split(e){let t=[],i=0,r=-1,s=0;for(let l of this.children){let a=i+l.length;a>e&&t.push(i<e?l.split(e-i):l),r<0&&i>=e&&(r=s),i=a,s++}let o=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new je(this.mark,t,o)}domAtPos(e){return Ya(this.dom,this.children,e)}coordsAt(e,t){return Xa(this,e,t)}}function Wr(n,e,t){let i=n.nodeValue.length;e>i&&(e=i);let r=e,s=e,o=0;e==0&&t<0||e==i&&t>=0?B.chrome||B.gecko||(e?(r--,o=1):s<i&&(s++,o=-1)):t<0?r--:s<i&&s++;let l=qt(n,r,s).getClientRects();if(!l.length)return Ta;let a=l[(o?o<0:t>=0)?0:l.length-1];return B.safari&&!o&&a.width==0&&(a=Array.prototype.find.call(l,h=>h.width)||a),o?ci(a,o<0):a||null}class pt extends U{constructor(e,t,i){super(),this.widget=e,this.length=t,this.side=i,this.prevWidget=null}static create(e,t,i){return new(e.customView||pt)(e,t,i)}split(e){let t=pt.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(){(!this.dom||!this.widget.updateDOM(this.dom))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(this.editorView)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,t,i,r,s,o){return i&&(!(i instanceof pt)||!this.widget.compare(i.widget)||e>0&&s<=0||t<this.length&&o<=0)?!1:(this.length=e+(i?i.length:0)+(this.length-t),!0)}become(e){return e.length==this.length&&e instanceof pt&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.eq(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return N.empty;let e=this;for(;e.parent;)e=e.parent;let t=e.editorView,i=t&&t.state.doc,r=this.posAtStart;return i?i.slice(r,r+this.length):N.empty}domAtPos(e){return e==0?le.before(this.dom):le.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let i=this.dom.getClientRects(),r=null;if(!i.length)return Ta;for(let s=e>0?i.length-1:0;r=i[s],!(e>0?s==0:s==i.length-1||r.top<r.bottom);s+=e>0?-1:1);return e==0&&t>0||e==this.length&&t<=0?r:ci(r,e==0)}get isEditable(){return!1}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Ka extends pt{domAtPos(e){let{topView:t,text:i}=this.widget;return t?jr(e,0,t,i,(r,s)=>r.domAtPos(s),r=>new le(i,Math.min(r,i.nodeValue.length))):new le(i,Math.min(e,i.nodeValue.length))}sync(){this.setDOM(this.widget.toDOM())}localPosFromDOM(e,t){let{topView:i,text:r}=this.widget;return i?Ga(e,t,i,r):Math.min(t,this.length)}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(e,t){let{topView:i,text:r}=this.widget;return i?jr(e,t,i,r,(s,o,l)=>s.coordsAt(o,l),(s,o)=>Wr(r,s,o)):Wr(r,e,t)}destroy(){var e;super.destroy(),(e=this.widget.topView)===null||e===void 0||e.destroy()}get isEditable(){return!0}}function jr(n,e,t,i,r,s){if(t instanceof je){for(let o of t.children){let l=jt(o.dom,i),a=l?i.nodeValue.length:o.length;if(n<a||n==a&&o.getSide()<=0)return l?jr(n,e,o,i,r,s):r(o,n,e);n-=a}return r(t,t.length,-1)}else return t.dom==i?s(n,e):r(t,n,e)}function Ga(n,e,t,i){if(t instanceof je)for(let r of t.children){let s=0,o=jt(r.dom,i);if(jt(r.dom,n))return s+(o?Ga(n,e,r,i):r.localPosFromDOM(n,e));s+=o?i.nodeValue.length:r.length}else if(t.dom==i)return Math.min(e,i.nodeValue.length);return t.localPosFromDOM(n,e)}class Kt extends U{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof Kt&&e.side==this.side}split(){return new Kt(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return le.before(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){let t=this.dom.getBoundingClientRect(),i=H2(this,this.side>0?-1:1);return i&&i.top<t.bottom&&i.bottom>t.top?{left:t.left,right:t.right,top:i.top,bottom:i.bottom}:t}get overrideDOMText(){return N.empty}}dt.prototype.children=pt.prototype.children=Kt.prototype.children=Ir;function H2(n,e){let t=n.parent,i=t?t.children.indexOf(n):-1;for(;t&&i>=0;)if(e<0?i>0:i<t.children.length){let r=t.children[i+e];if(r instanceof dt){let s=r.coordsAt(e<0?r.length:0,e);if(s)return s}i+=e}else if(t instanceof je&&t.parent)i=t.parent.children.indexOf(t)+(e<0?0:1),t=t.parent;else{let r=t.dom.lastChild;if(r&&r.nodeName=="BR")return r.getClientRects()[0];break}}function Ya(n,e,t){let i=0;for(let r=0;i<e.length;i++){let s=e[i],o=r+s.length;if(!(o==r&&s.getSide()<=0)){if(t>r&&t<o&&s.dom.parentNode==n)return s.domAtPos(t-r);if(t<=r)break;r=o}}for(;i>0;i--){let r=e[i-1].dom;if(r.parentNode==n)return le.after(r)}return new le(n,0)}function Ja(n,e,t){let i,{children:r}=n;t>0&&e instanceof je&&r.length&&(i=r[r.length-1])instanceof je&&i.mark.eq(e.mark)?Ja(i,e.children[0],t-1):(r.push(e),e.setParent(n)),n.length+=e.length}function Xa(n,e,t){for(let s=0,o=0;o<n.children.length;o++){let l=n.children[o],a=s+l.length,h;if((t<=0||a==n.length||l.getSide()>0?a>=e:a>e)&&(e<a||o+1==n.children.length||(h=n.children[o+1]).length||h.getSide()>0)){let f=0;if(a==s){if(l.getSide()<=0)continue;f=t=-l.getSide()}let u=l.coordsAt(Math.max(0,e-s),t);return f&&u?ci(u,t<0):u}s=a}let i=n.dom.lastChild;if(!i)return n.dom.getBoundingClientRect();let r=wn(i);return r[r.length-1]||null}function Ur(n,e){for(let t in n)t=="class"&&e.class?e.class+=" "+n.class:t=="style"&&e.style?e.style+=";"+n.style:e[t]=n[t];return e}function qr(n,e){if(n==e)return!0;if(!n||!e)return!1;let t=Object.keys(n),i=Object.keys(e);if(t.length!=i.length)return!1;for(let r of t)if(i.indexOf(r)==-1||n[r]!==e[r])return!1;return!0}function Kr(n,e,t){let i=null;if(e)for(let r in e)t&&r in t||n.removeAttribute(i=r);if(t)for(let r in t)e&&e[r]==t[r]||n.setAttribute(i=r,t[r]);return!!i}class mt{eq(e){return!1}updateDOM(e){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}ignoreEvent(e){return!0}get customView(){return null}destroy(e){}}var W=function(n){return n[n.Text=0]="Text",n[n.WidgetBefore=1]="WidgetBefore",n[n.WidgetAfter=2]="WidgetAfter",n[n.WidgetRange=3]="WidgetRange",n}(W||(W={}));class $ extends Bt{constructor(e,t,i,r){super(),this.startSide=e,this.endSide=t,this.widget=i,this.spec=r}get heightRelevant(){return!1}static mark(e){return new fi(e)}static widget(e){let t=e.side||0,i=!!e.block;return t+=i?t>0?3e8:-4e8:t>0?1e8:-1e8,new Et(e,t,t,i,e.widget||null,!1)}static replace(e){let t=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:s,end:o}=Qa(e,t);i=(s?t?-3e8:-1:5e8)-1,r=(o?t?2e8:1:-6e8)+1}return new Et(e,i,r,t,e.widget||null,!0)}static line(e){return new xn(e)}static set(e,t=!1){return z.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}$.none=z.empty;class fi extends ${constructor(e){let{start:t,end:i}=Qa(e);super(t?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){return this==e||e instanceof fi&&this.tagName==e.tagName&&this.class==e.class&&qr(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}fi.prototype.point=!1;class xn extends ${constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof xn&&qr(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}xn.prototype.mapMode=me.TrackBefore,xn.prototype.point=!0;class Et extends ${constructor(e,t,i,r,s,o){super(t,i,s,e),this.block=r,this.isReplace=o,this.mapMode=r?t<=0?me.TrackBefore:me.TrackAfter:me.TrackDel}get type(){return this.startSide<this.endSide?W.WidgetRange:this.startSide<=0?W.WidgetBefore:W.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&this.widget.estimatedHeight>=5}eq(e){return e instanceof Et&&F2(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Et.prototype.point=!0;function Qa(n,e=!1){let{inclusiveStart:t,inclusiveEnd:i}=n;return t==null&&(t=n.inclusive),i==null&&(i=n.inclusive),{start:t!=null?t:e,end:i!=null?i:e}}function F2(n,e){return n==e||!!(n&&e&&n.compare(e))}function Gr(n,e,t,i=0){let r=t.length-1;r>=0&&t[r]+i>=n?t[r]=Math.max(t[r],e):t.push(n,e)}class ye extends U{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,i,r,s,o){if(i){if(!(i instanceof ye))return!1;this.dom||i.transferDOM(this)}return r&&this.setDeco(i?i.attrs:null),Ha(this,e,t,i?i.children:[],s,o),!0}split(e){let t=new ye;if(t.breakAfter=this.breakAfter,this.length==0)return t;let{i,off:r}=this.childPos(e);r&&(t.append(this.children[i].split(r),0),this.children[i].merge(r,this.children[i].length,null,!1,0,0),i++);for(let s=i;s<this.children.length;s++)t.append(this.children[s],0);for(;i>0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,t}transferDOM(e){!this.dom||(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){qr(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){Ja(this,e,t)}addLineDeco(e){let t=e.spec.attributes,i=e.spec.class;t&&(this.attrs=Ur(t,this.attrs||{})),i&&(this.attrs=Ur({class:i},this.attrs||{}))}domAtPos(e){return Ya(this.dom,this.children,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.dirty|=6)}sync(e){var t;this.dom?this.dirty&4&&(Ra(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(Kr(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e);let i=this.dom.lastChild;for(;i&&U.get(i)instanceof je;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((t=U.get(i))===null||t===void 0?void 0:t.isEditable)==!1&&(!B.ios||!this.children.some(r=>r instanceof dt))){let r=document.createElement("BR");r.cmIgnore=!0,this.dom.appendChild(r)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0;for(let t of this.children){if(!(t instanceof dt)||/[^ -~]/.test(t.text))return null;let i=wn(t.dom);if(i.length!=1)return null;e+=i[0].width}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length}:null}coordsAt(e,t){return Xa(this,e,t)}become(e){return!1}get type(){return W.Text}static find(e,t){for(let i=0,r=0;i<e.children.length;i++){let s=e.children[i],o=r+s.length;if(o>=t){if(s instanceof ye)return s;if(o>t)break}r=o+s.breakAfter}return null}}class Pt extends U{constructor(e,t,i){super(),this.widget=e,this.length=t,this.type=i,this.breakAfter=0,this.prevWidget=null}merge(e,t,i,r,s,o){return i&&(!(i instanceof Pt)||!this.widget.compare(i.widget)||e>0&&s<=0||t<this.length&&o<=0)?!1:(this.length=e+(i?i.length:0)+(this.length-t),!0)}domAtPos(e){return e==0?le.before(this.dom):le.after(this.dom,e==this.length)}split(e){let t=this.length-e;this.length=e;let i=new Pt(this.widget,t,this.type);return i.breakAfter=this.breakAfter,i}get children(){return Ir}sync(){(!this.dom||!this.widget.updateDOM(this.dom))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(this.editorView)),this.dom.contentEditable="false")}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):N.empty}domBoundsAround(){return null}become(e){return e instanceof Pt&&e.type==this.type&&e.widget.constructor==this.widget.constructor?(e.widget.eq(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class Yr{constructor(e,t,i,r){this.doc=e,this.pos=t,this.end=i,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!e.breakAfter&&!(e instanceof Pt&&e.type==W.WidgetBefore)}getLine(){return this.curLine||(this.content.push(this.curLine=new ye),this.atCursorPos=!0),this.curLine}flushBuffer(e){this.pendingBuffer&&(this.curLine.append(ui(new Kt(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer([]),this.curLine=null,this.content.push(e)}finish(e){e?this.pendingBuffer=0:this.flushBuffer([]),this.posCovered()||this.getLine()}buildText(e,t,i){for(;e>0;){if(this.textOff==this.text.length){let{value:s,lineBreak:o,done:l}=this.cursor.next(this.skip);if(this.skip=0,l)throw new Error("Ran out of text content when drawing inline views");if(o){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer([]),this.curLine=null,e--;continue}else this.text=s,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(0,i)),this.getLine().append(ui(new dt(this.text.slice(this.textOff,this.textOff+r)),t),i),this.atCursorPos=!0,this.textOff+=r,e-=r,i=0}}span(e,t,i,r){this.buildText(t-e,i,r),this.pos=t,this.openStart<0&&(this.openStart=r)}point(e,t,i,r,s,o){if(this.disallowBlockEffectsFor[o]&&i instanceof Et){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=t-e;if(i instanceof Et)if(i.block){let{type:a}=i;a==W.WidgetAfter&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Pt(i.widget||new Za("div"),l,a))}else{let a=pt.create(i.widget||new Za("span"),l,i.startSide),h=this.atCursorPos&&!a.isEditable&&s<=r.length&&(e<t||i.startSide>0),f=!a.isEditable&&(e<t||i.startSide<=0),u=this.getLine();this.pendingBuffer==2&&!h&&(this.pendingBuffer=0),this.flushBuffer(r),h&&(u.append(ui(new Kt(1),r),s),s=r.length+Math.max(0,s-r.length)),u.append(ui(a,r),s),this.atCursorPos=f,this.pendingBuffer=f?e<t?1:2:0}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=s)}static build(e,t,i,r,s){let o=new Yr(e,t,i,s);return o.openEnd=z.spans(r,t,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function ui(n,e){for(let t of e)n=new je(t,[n],n.length);return n}class Za extends mt{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}}const ec=E.define(),tc=E.define(),nc=E.define(),ic=E.define(),Jr=E.define(),rc=E.define(),sc=E.define({combine:n=>n.some(e=>e)});class di{constructor(e,t="nearest",i="nearest",r=5,s=5){this.range=e,this.y=t,this.x=i,this.yMargin=r,this.xMargin=s}map(e){return e.empty?this:new di(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const oc=T.define({map:(n,e)=>n.map(e)});function Ae(n,e,t){let i=n.facet(ic);i.length?i[0](e):window.onerror?window.onerror(String(e),t,void 0,void 0,e):t?console.error(t+":",e):console.error(e)}const pi=E.define({combine:n=>n.length?n[0]:!0});let W2=0;const kn=E.define();class Z{constructor(e,t,i,r){this.id=e,this.create=t,this.domEventHandlers=i,this.extension=r(this)}static define(e,t){const{eventHandlers:i,provide:r,decorations:s}=t||{};return new Z(W2++,e,i,o=>{let l=[kn.of(o)];return s&&l.push(Sn.of(a=>{let h=a.plugin(o);return h?s(h):$.none})),r&&l.push(r(o)),l})}static fromClass(e,t){return Z.define(i=>new e(i),t)}}class Xr{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(i){if(Ae(t.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Ae(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(i){Ae(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const lc=E.define(),ac=E.define(),Sn=E.define(),cc=E.define(),hc=E.define(),Cn=E.define();class nt{constructor(e,t,i,r){this.fromA=e,this.toA=t,this.fromB=i,this.toB=r}join(e){return new nt(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,i=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>i.toA)){if(r.toA<i.fromA)break;i=i.join(r),e.splice(t-1,1)}}return e.splice(t,0,i),e}static extendWithRanges(e,t){if(t.length==0)return e;let i=[];for(let r=0,s=0,o=0,l=0;;r++){let a=r==e.length?null:e[r],h=o-l,f=a?a.fromB:1e9;for(;s<t.length&&t[s]<f;){let u=t[s],d=t[s+1],p=Math.max(l,u),m=Math.min(f,d);if(p<=m&&new nt(p+h,m+h,p,m).addToSet(i),d>f)break;s+=2}if(!a)return i;new nt(a.fromA,a.toA,a.fromB,a.toB).addToSet(i),o=a.toA,l=a.toB}}}class mi{constructor(e,t,i){this.view=e,this.state=t,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=te.empty(this.startState.doc.length);for(let o of i)this.changes=this.changes.compose(o.changes);let r=[];this.changes.iterChangedRanges((o,l,a,h)=>r.push(new nt(o,l,a,h))),this.changedRanges=r;let s=e.hasFocus;s!=e.inputState.notifiedFocused&&(e.inputState.notifiedFocused=s,this.flags|=1)}static create(e,t,i){return new mi(e,t,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}var G=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(G||(G={}));const Qr=G.LTR,j2=G.RTL;function fc(n){let e=[];for(let t=0;t<n.length;t++)e.push(1<<+n[t]);return e}const U2=fc("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),q2=fc("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Zr=Object.create(null),Ue=[];for(let n of["()","[]","{}"]){let e=n.charCodeAt(0),t=n.charCodeAt(1);Zr[e]=t,Zr[t]=-e}function K2(n){return n<=247?U2[n]:1424<=n&&n<=1524?2:1536<=n&&n<=1785?q2[n-1536]:1774<=n&&n<=2220?4:8192<=n&&n<=8203||n==8204?256:1}const G2=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;class Gt{constructor(e,t,i){this.from=e,this.to=t,this.level=i}get dir(){return this.level%2?j2:Qr}side(e,t){return this.dir==t==e?this.to:this.from}static find(e,t,i,r){let s=-1;for(let o=0;o<e.length;o++){let l=e[o];if(l.from<=t&&l.to>=t){if(l.level==i)return o;(s<0||(r!=0?r<0?l.from<t:l.to>t:e[s].level>l.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}const Y=[];function Y2(n,e){let t=n.length,i=e==Qr?1:2,r=e==Qr?2:1;if(!n||i==1&&!G2.test(n))return uc(t);for(let o=0,l=i,a=i;o<t;o++){let h=K2(n.charCodeAt(o));h==512?h=l:h==8&&a==4&&(h=16),Y[o]=h==4?2:h,h&7&&(a=h),l=h}for(let o=0,l=i,a=i;o<t;o++){let h=Y[o];if(h==128)o<t-1&&l==Y[o+1]&&l&24?h=Y[o]=l:Y[o]=256;else if(h==64){let f=o+1;for(;f<t&&Y[f]==64;)f++;let u=o&&l==8||f<t&&Y[f]==8?a==1?1:8:256;for(let d=o;d<f;d++)Y[d]=u;o=f-1}else h==8&&a==1&&(Y[o]=1);l=h,h&7&&(a=h)}for(let o=0,l=0,a=0,h,f,u;o<t;o++)if(f=Zr[h=n.charCodeAt(o)])if(f<0){for(let d=l-3;d>=0;d-=3)if(Ue[d+1]==-f){let p=Ue[d+2],m=p&2?i:p&4?p&1?r:i:0;m&&(Y[o]=Y[Ue[d]]=m),l=d;break}}else{if(Ue.length==189)break;Ue[l++]=o,Ue[l++]=h,Ue[l++]=a}else if((u=Y[o])==2||u==1){let d=u==i;a=d?0:1;for(let p=l-3;p>=0;p-=3){let m=Ue[p+2];if(m&2)break;if(d)Ue[p+2]|=2;else{if(m&4)break;Ue[p+2]|=4}}}for(let o=0;o<t;o++)if(Y[o]==256){let l=o+1;for(;l<t&&Y[l]==256;)l++;let a=(o?Y[o-1]:i)==1,h=(l<t?Y[l]:i)==1,f=a==h?a?1:2:i;for(let u=o;u<l;u++)Y[u]=f;o=l-1}let s=[];if(i==1)for(let o=0;o<t;){let l=o,a=Y[o++]!=1;for(;o<t&&a==(Y[o]!=1);)o++;if(a)for(let h=o;h>l;){let f=h,u=Y[--h]!=2;for(;h>l&&u==(Y[h-1]!=2);)h--;s.push(new Gt(h,f,u?2:1))}else s.push(new Gt(l,o,0))}else for(let o=0;o<t;){let l=o,a=Y[o++]==2;for(;o<t&&a==(Y[o]==2);)o++;s.push(new Gt(l,o,a?1:2))}return s}function uc(n){return[new Gt(0,n,0)]}let dc="";function J2(n,e,t,i,r){var s;let o=i.head-n.from,l=-1;if(o==0){if(!r||!n.length)return null;e[0].level!=t&&(o=e[0].side(!1,t),l=0)}else if(o==n.length){if(r)return null;let d=e[e.length-1];d.level!=t&&(o=d.side(!0,t),l=e.length-1)}l<0&&(l=Gt.find(e,o,(s=i.bidiLevel)!==null&&s!==void 0?s:-1,i.assoc));let a=e[l];o==a.side(r,t)&&(a=e[l+=r?1:-1],o=a.side(!r,t));let h=r==(a.dir==t),f=Ce(n.text,o,h);if(dc=n.text.slice(Math.min(o,f),Math.max(o,f)),f!=a.side(r,t))return k.cursor(f+n.from,h?-1:1,a.level);let u=l==(r?e.length-1:0)?null:e[l+(r?1:-1)];return!u&&a.level!=t?k.cursor(r?n.to:n.from,r?-1:1,t):u&&u.level<a.level?k.cursor(u.side(!r,t)+n.from,r?1:-1,u.level):k.cursor(f+n.from,r?-1:1,a.level)}const gt="\uFFFF";class pc{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(R.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=gt}readRange(e,t){if(!e)return this;let i=e.parentNode;for(let r=e;;){this.findPointBefore(i,r),this.readNode(r);let s=r.nextSibling;if(s==t)break;let o=U.get(r),l=U.get(s);(o&&l?o.breakAfter:(o?o.breakAfter:mc(r))||mc(s)&&(r.nodeName!="BR"||r.cmIgnore))&&this.lineBreak(),r=s}return this.findPointBefore(i,t),this}readTextNode(e){let t=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,t.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,l;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(l=r.exec(t))&&(s=l.index,o=l[0].length),this.append(t.slice(i,s<0?t.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let a of this.points)a.node==e&&a.pos>this.text.length&&(a.pos-=o-1);i=s+o}}readNode(e){if(e.cmIgnore)return;let t=U.get(e),i=t&&t.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==t&&(i.pos=this.text.length)}findPointInside(e,t){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+Math.min(t,i.offset))}}function mc(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}class gc{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class yc extends U{constructor(e){super(),this.view=e,this.compositionDeco=$.none,this.decorations=[],this.dynamicDecorationMap=[],this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new ye],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new nt(0,0,0,e.state.doc.length)],0)}get editorView(){return this.view}get length(){return this.view.state.doc.length}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:o,toA:l})=>l<this.minWidthFrom||o>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=$.none:(e.transactions.length||this.dirty)&&(this.compositionDeco=Q2(this.view,e.changes)),(B.ie||B.chrome)&&!this.compositionDeco.size&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let i=this.decorations,r=this.updateDeco(),s=nb(i,r,e.changes);return t=nt.extendWithRanges(t,s),this.dirty==0&&t.length==0?!1:(this.updateInner(t,e.startState.doc.length),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=B.chrome||B.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(s),this.dirty=0,s&&(s.written||i.selectionRange.focusNode!=s.node)&&(this.forceSelection=!0),this.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.children)s instanceof Pt&&s.widget instanceof wc&&r.push(s.dom);i.updateGaps(r)}updateChildren(e,t){let i=this.childCursor(t);for(let r=e.length-1;;r--){let s=r>=0?e[r]:null;if(!s)break;let{fromA:o,toA:l,fromB:a,toB:h}=s,{content:f,breakAtStart:u,openStart:d,openEnd:p}=Yr.build(this.view.state.doc,a,h,this.decorations,this.dynamicDecorationMap),{i:m,off:g}=i.findPos(l,1),{i:y,off:w}=i.findPos(o,-1);za(this,y,w,m,g,f,u,d,p)}}updateSelection(e=!1,t=!1){if((e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange(),!(t||this.mayControlSelection())||B.ios&&this.view.inputState.rapidCompositionStart)return;let i=this.forceSelection;this.forceSelection=!1;let r=this.view.state.selection.main,s=this.domAtPos(r.anchor),o=r.empty?s:this.domAtPos(r.head);if(B.gecko&&r.empty&&X2(s)){let a=document.createTextNode("");this.view.observer.ignore(()=>s.node.insertBefore(a,s.node.childNodes[s.offset]||null)),s=o=new le(a,0),i=!0}let l=this.view.observer.selectionRange;(i||!l.focusNode||!li(s.node,s.offset,l.anchorNode,l.anchorOffset)||!li(o.node,o.offset,l.focusNode,l.focusOffset))&&(this.view.observer.ignore(()=>{B.android&&B.chrome&&this.dom.contains(l.focusNode)&&ib(l.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let a=si(this.view.root);if(a)if(r.empty){if(B.gecko){let h=eb(s.node,s.offset);if(h&&h!=3){let f=vc(s.node,s.offset,h==1?1:-1);f&&(s=new le(f,h==1?0:f.nodeValue.length))}}a.collapse(s.node,s.offset),r.bidiLevel!=null&&l.cursorBidiLevel!=null&&(l.cursorBidiLevel=r.bidiLevel)}else if(a.extend)a.collapse(s.node,s.offset),a.extend(o.node,o.offset);else{let h=document.createRange();r.anchor>r.head&&([s,o]=[o,s]),h.setEnd(o.node,o.offset),h.setStart(s.node,s.offset),a.removeAllRanges(),a.addRange(h)}}),this.view.observer.setSelectionRange(s,o)),this.impreciseAnchor=s.precise?null:new le(l.anchorNode,l.anchorOffset),this.impreciseHead=o.precise?null:new le(l.focusNode,l.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let e=this.view.state.selection.main,t=si(this.view.root);if(!t||!e.empty||!e.assoc||!t.modify)return;let i=ye.find(this,e.head);if(!i)return;let r=i.posAtStart;if(e.head==r||e.head==r+i.length)return;let s=this.coordsAt(e.head,-1),o=this.coordsAt(e.head,1);if(!s||!o||s.bottom>o.top)return;let l=this.domAtPos(e.head+e.assoc);t.collapse(l.node,l.offset),t.modify("move",e.assoc<0?"forward":"backward","lineboundary")}mayControlSelection(){let e=this.view.root.activeElement;return e==this.dom||oi(this.dom,this.view.observer.selectionRange)&&!(e&&this.dom.contains(e))}nearest(e){for(let t=e;t;){let i=U.get(t);if(i&&i.rootView==this)return i;t=t.parentNode}return null}posFromDOM(e,t){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,t)+i.posAtStart}domAtPos(e){let{i:t,off:i}=this.childCursor().findPos(e,-1);for(;t<this.children.length-1;){let r=this.children[t];if(i<r.length||r instanceof ye)break;t++,i=0}return this.children[t].domAtPos(i)}coordsAt(e,t){for(let i=this.length,r=this.children.length-1;;r--){let s=this.children[r],o=i-s.breakAfter-s.length;if(e>o||e==o&&s.type!=W.WidgetBefore&&s.type!=W.WidgetAfter&&(!r||t==2||this.children[r-1].breakAfter||this.children[r-1].type==W.WidgetBefore&&t>-2))return s.coordsAt(e-o,t);i=o}}measureVisibleLineHeights(e){let t=[],{from:i,to:r}=e,s=this.view.contentDOM.clientWidth,o=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,a=this.view.textDirection==G.LTR;for(let h=0,f=0;f<this.children.length;f++){let u=this.children[f],d=h+u.length;if(d>r)break;if(h>=i){let p=u.dom.getBoundingClientRect();if(t.push(p.height),o){let m=u.dom.lastChild,g=m?wn(m):[];if(g.length){let y=g[g.length-1],w=a?y.right-p.left:p.right-y.left;w>l&&(l=w,this.minWidth=s,this.minWidthFrom=h,this.minWidthTo=d)}}}h=d+u.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return getComputedStyle(this.children[t].dom).direction=="rtl"?G.RTL:G.LTR}measureTextSize(){for(let r of this.children)if(r instanceof ye){let s=r.measureTextSize();if(s)return s}let e=document.createElement("div"),t,i;return e.className="cm-line",e.style.width="99999px",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let r=wn(e.firstChild)[0];t=e.getBoundingClientRect().height,i=r?r.width/27:7,e.remove()}),{lineHeight:t,charWidth:i}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new Na(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let i=0,r=0;;r++){let s=r==t.viewports.length?null:t.viewports[r],o=s?s.from-1:this.length;if(o>i){let l=t.lineBlockAt(o).bottom-t.lineBlockAt(i).top;e.push($.replace({widget:new wc(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!s)break;i=s.to+1}return $.set(e)}updateDeco(){let e=this.view.state.facet(Sn).map((t,i)=>(this.dynamicDecorationMap[i]=typeof t=="function")?t(this.view):t);for(let t=e.length;t<e.length+3;t++)this.dynamicDecorationMap[t]=!1;return this.decorations=[...e,this.compositionDeco,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(e){let{range:t}=e,i=this.coordsAt(t.head,t.empty?t.assoc:t.head>t.anchor?-1:1),r;if(!i)return;!t.empty&&(r=this.coordsAt(t.anchor,t.anchor>t.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let s=0,o=0,l=0,a=0;for(let f of this.view.state.facet(hc).map(u=>u(this.view)))if(f){let{left:u,right:d,top:p,bottom:m}=f;u!=null&&(s=Math.max(s,u)),d!=null&&(o=Math.max(o,d)),p!=null&&(l=Math.max(l,p)),m!=null&&(a=Math.max(a,m))}let h={left:i.left-s,top:i.top-l,right:i.right+o,bottom:i.bottom+a};V2(this.view.scrollDOM,h,t.head<t.anchor?-1:1,e.x,e.y,e.xMargin,e.yMargin,this.view.textDirection==G.LTR)}}function X2(n){return n.node.nodeType==1&&n.node.firstChild&&(n.offset==0||n.node.childNodes[n.offset-1].contentEditable=="false")&&(n.offset==n.node.childNodes.length||n.node.childNodes[n.offset].contentEditable=="false")}class wc extends mt{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}}function bc(n){let e=n.observer.selectionRange,t=e.focusNode&&vc(e.focusNode,e.focusOffset,0);if(!t)return null;let i=n.docView.nearest(t);if(!i)return null;if(i instanceof ye){let r=t;for(;r.parentNode!=i.dom;)r=r.parentNode;let s=r.previousSibling;for(;s&&!U.get(s);)s=s.previousSibling;let o=s?U.get(s).posAtEnd:i.posAtStart;return{from:o,to:o,node:r,text:t}}else{for(;;){let{parent:s}=i;if(!s)return null;if(s instanceof ye)break;i=s}let r=i.posAtStart;return{from:r,to:r+i.length,node:i.dom,text:t}}}function Q2(n,e){let t=bc(n);if(!t)return $.none;let{from:i,to:r,node:s,text:o}=t,l=e.mapPos(i,1),a=Math.max(l,e.mapPos(r,-1)),{state:h}=n,f=s.nodeType==3?s.nodeValue:new pc([],h).readRange(s.firstChild,null).text;if(a-l<f.length)if(h.doc.sliceString(l,Math.min(h.doc.length,l+f.length),gt)==f)a=l+f.length;else if(h.doc.sliceString(Math.max(0,a-f.length),a,gt)==f)l=a-f.length;else return $.none;else if(h.doc.sliceString(l,a,gt)!=f)return $.none;let u=U.get(s);return u instanceof Ka?u=u.widget.topView:u&&(u.parent=null),$.set($.replace({widget:new Z2(s,o,u),inclusive:!0}).range(l,a))}class Z2 extends mt{constructor(e,t,i){super(),this.top=e,this.text=t,this.topView=i}eq(e){return this.top==e.top&&this.text==e.text}toDOM(){return this.top}ignoreEvent(){return!1}get customView(){return Ka}}function vc(n,e,t){for(;;){if(n.nodeType==3)return n;if(n.nodeType==1&&e>0&&t<=0)n=n.childNodes[e-1],e=bn(n);else if(n.nodeType==1&&e<n.childNodes.length&&t>=0)n=n.childNodes[e],e=0;else return null}}function eb(n,e){return n.nodeType!=1?0:(e&&n.childNodes[e-1].contentEditable=="false"?1:0)|(e<n.childNodes.length&&n.childNodes[e].contentEditable=="false"?2:0)}class tb{constructor(){this.changes=[]}compareRange(e,t){Gr(e,t,this.changes)}comparePoint(e,t){Gr(e,t,this.changes)}}function nb(n,e,t){let i=new tb;return z.compare(n,e,t,i),i.changes}function ib(n,e){for(let t=n;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function rb(n,e,t=1){let i=n.charCategorizer(e),r=n.doc.lineAt(e),s=e-r.from;if(r.length==0)return k.cursor(e);s==0?t=1:s==r.length&&(t=-1);let o=s,l=s;t<0?o=Ce(r.text,s,!1):l=Ce(r.text,s);let a=i(r.text.slice(o,l));for(;o>0;){let h=Ce(r.text,o,!1);if(i(r.text.slice(h,o))!=a)break;o=h}for(;l<r.length;){let h=Ce(r.text,l);if(i(r.text.slice(l,h))!=a)break;l=h}return k.range(o+r.from,l+r.from)}function sb(n,e){return e.left>n?e.left-n:Math.max(0,n-e.right)}function ob(n,e){return e.top>n?e.top-n:Math.max(0,n-e.bottom)}function es(n,e){return n.top<e.bottom-1&&n.bottom>e.top+1}function xc(n,e){return e<n.top?{top:e,left:n.left,right:n.right,bottom:n.bottom}:n}function kc(n,e){return e>n.bottom?{top:n.top,left:n.left,right:n.right,bottom:e}:n}function ts(n,e,t){let i,r,s,o,l=!1,a,h,f,u;for(let m=n.firstChild;m;m=m.nextSibling){let g=wn(m);for(let y=0;y<g.length;y++){let w=g[y];r&&es(r,w)&&(w=xc(kc(w,r.bottom),r.top));let v=sb(e,w),S=ob(t,w);if(v==0&&S==0)return m.nodeType==3?Sc(m,e,t):ts(m,e,t);(!i||o>S||o==S&&s>v)&&(i=m,r=w,s=v,o=S,l=!v||(v>0?y<g.length-1:y>0)),v==0?t>w.bottom&&(!f||f.bottom<w.bottom)?(a=m,f=w):t<w.top&&(!u||u.top>w.top)&&(h=m,u=w):f&&es(f,w)?f=kc(f,w.bottom):u&&es(u,w)&&(u=xc(u,w.top))}}if(f&&f.bottom>=t?(i=a,r=f):u&&u.top<=t&&(i=h,r=u),!i)return{node:n,offset:0};let d=Math.max(r.left,Math.min(r.right,e));if(i.nodeType==3)return Sc(i,d,t);if(l&&i.contentEditable!="false")return ts(i,d,t);let p=Array.prototype.indexOf.call(n.childNodes,i)+(e>=(r.left+r.right)/2?1:0);return{node:n,offset:p}}function Sc(n,e,t){let i=n.nodeValue.length,r=-1,s=1e9,o=0;for(let l=0;l<i;l++){let a=qt(n,l,l+1).getClientRects();for(let h=0;h<a.length;h++){let f=a[h];if(f.top==f.bottom)continue;o||(o=e-f.left);let u=(f.top>t?f.top-t:t-f.bottom)-1;if(f.left-1<=e&&f.right+1>=e&&u<s){let d=e>=(f.left+f.right)/2,p=d;if((B.chrome||B.gecko)&&qt(n,l).getBoundingClientRect().left==f.right&&(p=!d),u<=0)return{node:n,offset:l+(p?1:0)};r=l+(p?1:0),s=u}}}return{node:n,offset:r>-1?r:o>0?n.nodeValue.length:0}}function Cc(n,{x:e,y:t},i,r=-1){var s;let o=n.contentDOM.getBoundingClientRect(),l=o.top+n.viewState.paddingTop,a,{docHeight:h}=n.viewState,f=t-l;if(f<0)return 0;if(f>h)return n.state.doc.length;for(let w=n.defaultLineHeight/2,v=!1;a=n.elementAtHeight(f),a.type!=W.Text;)for(;f=r>0?a.bottom+w:a.top-w,!(f>=0&&f<=h);){if(v)return i?null:0;v=!0,r=-r}t=l+f;let u=a.from;if(u<n.viewport.from)return n.viewport.from==0?0:i?null:_c(n,o,a,e,t);if(u>n.viewport.to)return n.viewport.to==n.state.doc.length?n.state.doc.length:i?null:_c(n,o,a,e,t);let d=n.dom.ownerDocument,p=n.root.elementFromPoint?n.root:d,m=p.elementFromPoint(e,t);m&&!n.contentDOM.contains(m)&&(m=null),m||(e=Math.max(o.left+1,Math.min(o.right-1,e)),m=p.elementFromPoint(e,t),m&&!n.contentDOM.contains(m)&&(m=null));let g,y=-1;if(m&&((s=n.docView.nearest(m))===null||s===void 0?void 0:s.isEditable)!=!1){if(d.caretPositionFromPoint){let w=d.caretPositionFromPoint(e,t);w&&({offsetNode:g,offset:y}=w)}else if(d.caretRangeFromPoint){let w=d.caretRangeFromPoint(e,t);w&&({startContainer:g,startOffset:y}=w,(!n.contentDOM.contains(g)||B.safari&&lb(g,y,e)||B.chrome&&ab(g,y,e))&&(g=void 0))}}if(!g||!n.docView.dom.contains(g)){let w=ye.find(n.docView,u);if(!w)return f>a.top+a.height/2?a.to:a.from;({node:g,offset:y}=ts(w.dom,e,t))}return n.docView.posFromDOM(g,y)}function _c(n,e,t,i,r){let s=Math.round((i-e.left)*n.defaultCharacterWidth);n.lineWrapping&&t.height>n.defaultLineHeight*1.5&&(s+=Math.floor((r-t.top)/n.defaultLineHeight)*n.viewState.heightOracle.lineLength);let o=n.state.sliceDoc(t.from,t.to);return t.from+Tr(o,s,n.state.tabSize)}function lb(n,e,t){let i;if(n.nodeType!=3||e!=(i=n.nodeValue.length))return!1;for(let r=n.nextSibling;r;r=r.nextSibling)if(r.nodeType!=1||r.nodeName!="BR")return!1;return qt(n,i-1,i).getBoundingClientRect().left>t}function ab(n,e,t){if(e!=0)return!1;for(let r=n;;){let s=r.parentNode;if(!s||s.nodeType!=1||s.firstChild!=r)return!1;if(s.classList.contains("cm-line"))break;r=s}let i=n.nodeType==1?n.getBoundingClientRect():qt(n,0,Math.max(n.nodeValue.length,1)).getBoundingClientRect();return t-i.left>5}function cb(n,e,t,i){let r=n.state.doc.lineAt(e.head),s=!i||!n.lineWrapping?null:n.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(s){let a=n.dom.getBoundingClientRect(),h=n.textDirectionAt(r.from),f=n.posAtCoords({x:t==(h==G.LTR)?a.right-1:a.left+1,y:(s.top+s.bottom)/2});if(f!=null)return k.cursor(f,t?-1:1)}let o=ye.find(n.docView,e.head),l=o?t?o.posAtEnd:o.posAtStart:t?r.to:r.from;return k.cursor(l,t?-1:1)}function Mc(n,e,t,i){let r=n.state.doc.lineAt(e.head),s=n.bidiSpans(r),o=n.textDirectionAt(r.from);for(let l=e,a=null;;){let h=J2(r,s,o,l,t),f=dc;if(!h){if(r.number==(t?n.state.doc.lines:1))return l;f=`
|
|
9
|
+
`,r=n.state.doc.line(r.number+(t?1:-1)),s=n.bidiSpans(r),h=k.cursor(t?r.from:r.to)}if(a){if(!a(f))return l}else{if(!i)return h;a=i(f)}l=h}}function hb(n,e,t){let i=n.state.charCategorizer(e),r=i(t);return s=>{let o=i(s);return r==ge.Space&&(r=o),r==o}}function fb(n,e,t,i){let r=e.head,s=t?1:-1;if(r==(t?n.state.doc.length:0))return k.cursor(r,e.assoc);let o=e.goalColumn,l,a=n.contentDOM.getBoundingClientRect(),h=n.coordsAtPos(r),f=n.documentTop;if(h)o==null&&(o=h.left-a.left),l=s<0?h.top:h.bottom;else{let p=n.viewState.lineBlockAt(r);o==null&&(o=Math.min(a.right-a.left,n.defaultCharacterWidth*(r-p.from))),l=(s<0?p.top:p.bottom)+f}let u=a.left+o,d=i!=null?i:n.defaultLineHeight>>1;for(let p=0;;p+=10){let m=l+(d+p)*s,g=Cc(n,{x:u,y:m},!1,s);if(m<a.top||m>a.bottom||(s<0?g<r:g>r))return k.cursor(g,e.assoc,void 0,o)}}function ns(n,e,t){let i=n.state.facet(cc).map(r=>r(n));for(;;){let r=!1;for(let s of i)s.between(t.from-1,t.from+1,(o,l,a)=>{t.from>o&&t.from<l&&(t=e.from>t.from?k.cursor(o,1):k.cursor(l,-1),r=!0)});if(!r)return t}}class ub{constructor(e){this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.rapidCompositionStart=!1,this.mouseSelection=null;for(let t in ie){let i=ie[t];e.contentDOM.addEventListener(t,r=>{!Bc(e,r)||this.ignoreDuringComposition(r)||t=="keydown"&&this.keydown(e,r)||(this.mustFlushObserver(r)&&e.observer.forceFlush(),this.runCustomHandlers(t,e,r)?r.preventDefault():i(e,r))},is[t]),this.registeredEvents.push(t)}B.chrome&&B.chrome_version==102&&e.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?e.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,e.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=e.hasFocus,B.safari&&e.contentDOM.addEventListener("input",()=>null)}setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}ensureHandlers(e,t){var i;let r;this.customHandlers=[];for(let s of t)if(r=(i=s.update(e).spec)===null||i===void 0?void 0:i.domEventHandlers){this.customHandlers.push({plugin:s.value,handlers:r});for(let o in r)this.registeredEvents.indexOf(o)<0&&o!="scroll"&&(this.registeredEvents.push(o),e.contentDOM.addEventListener(o,l=>{!Bc(e,l)||this.runCustomHandlers(o,e,l)&&l.preventDefault()}))}}runCustomHandlers(e,t,i){for(let r of this.customHandlers){let s=r.handlers[e];if(s)try{if(s.call(r.plugin,i,t)||i.defaultPrevented)return!0}catch(o){Ae(t.state,o)}}return!1}runScrollHandlers(e,t){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;for(let i of this.customHandlers){let r=i.handlers.scroll;if(r)try{r.call(i.plugin,t,e)}catch(s){Ae(e.state,s)}}}keydown(e,t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),t.keyCode==9&&Date.now()<this.lastEscPress+2e3)return!0;if(B.android&&B.chrome&&!t.synthetic&&(t.keyCode==13||t.keyCode==8))return e.observer.delayAndroidKey(t.key,t.keyCode),!0;let i;return B.ios&&(i=Ac.find(r=>r.keyCode==t.keyCode))&&!(t.ctrlKey||t.altKey||t.metaKey)&&!t.synthetic?(this.pendingIOSKey=i,setTimeout(()=>this.flushIOSKey(e),250),!0):!1}flushIOSKey(e){let t=this.pendingIOSKey;return t?(this.pendingIOSKey=void 0,vn(e.contentDOM,t.key,t.keyCode)):!1}ignoreDuringComposition(e){return/^key/.test(e.type)?this.composing>0?!0:B.safari&&!B.ios&&Date.now()-this.compositionEndedAt<100?(this.compositionEndedAt=0,!0):!1:!1}mustFlushObserver(e){return e.type=="keydown"&&e.keyCode!=229||e.type=="compositionend"&&!B.ios}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const Ac=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Oc=[16,17,18,20,91,92,224,225];class db{constructor(e,t,i,r){this.view=e,this.style=i,this.mustSelect=r,this.lastEvent=t;let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(R.allowMultipleSelections)&&pb(e,t),this.dragMove=mb(e,t),this.dragging=gb(e,t)&&rs(t)==1?null:!1,this.dragging===!1&&(t.preventDefault(),this.select(t))}move(e){if(e.buttons==0)return this.destroy();this.dragging===!1&&this.select(this.lastEvent=e)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}select(e){let t=this.style.get(e,this.extend,this.multiple);(this.mustSelect||!t.eq(this.view.state.selection)||t.main.assoc!=this.view.state.selection.main.assoc)&&this.view.dispatch({selection:t,userEvent:"select.pointer",scrollIntoView:!0}),this.mustSelect=!1}update(e){e.docChanged&&this.dragging&&(this.dragging=this.dragging.map(e.changes)),this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function pb(n,e){let t=n.state.facet(ec);return t.length?t[0](e):B.mac?e.metaKey:e.ctrlKey}function mb(n,e){let t=n.state.facet(tc);return t.length?t[0](e):B.mac?!e.altKey:!e.ctrlKey}function gb(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let i=si(n.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let s=0;s<r.length;s++){let o=r[s];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function Bc(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,i;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(i=U.get(t))&&i.ignoreEvent(e))return!1;return!0}const ie=Object.create(null),is=Object.create(null),Ec=B.ie&&B.ie_version<15||B.ios&&B.webkit_version<604;function yb(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),Pc(n,t.value)},50)}function Pc(n,e){let{state:t}=n,i,r=1,s=t.toText(e),o=s.lines==t.selection.ranges.length;if(ss!=null&&t.selection.ranges.every(a=>a.empty)&&ss==s.toString()){let a=-1;i=t.changeByRange(h=>{let f=t.doc.lineAt(h.from);if(f.from==a)return{range:h};a=f.from;let u=t.toText((o?s.line(r++).text:e)+t.lineBreak);return{changes:{from:f.from,insert:u},range:k.cursor(h.from+u.length)}})}else o?i=t.changeByRange(a=>{let h=s.line(r++);return{changes:{from:a.from,to:a.to,insert:h.text},range:k.cursor(a.from+h.length)}}):i=t.replaceSelection(s);n.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}ie.keydown=(n,e)=>{n.inputState.setSelectionOrigin("select"),e.keyCode==27?n.inputState.lastEscPress=Date.now():Oc.indexOf(e.keyCode)<0&&(n.inputState.lastEscPress=0)},ie.touchstart=(n,e)=>{n.inputState.lastTouchTime=Date.now(),n.inputState.setSelectionOrigin("select.pointer")},ie.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")},is.touchstart=is.touchmove={passive:!0},ie.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3&&rs(e)==1)return;let t=null;for(let i of n.state.facet(nc))if(t=i(n,e),t)break;if(!t&&e.button==0&&(t=vb(n,e)),t){let i=n.root.activeElement!=n.contentDOM;i&&n.observer.ignore(()=>La(n.contentDOM)),n.inputState.startMouseSelection(new db(n,e,t,i))}};function Dc(n,e,t,i){if(i==1)return k.cursor(e,t);if(i==2)return rb(n.state,e,t);{let r=ye.find(n.docView,e),s=n.state.doc.lineAt(r?r.posAtEnd:e),o=r?r.posAtStart:s.from,l=r?r.posAtEnd:s.to;return l<n.state.doc.length&&l==s.to&&l++,k.range(o,l)}}let $c=(n,e)=>n>=e.top&&n<=e.bottom,Tc=(n,e,t)=>$c(e,t)&&n>=t.left&&n<=t.right;function wb(n,e,t,i){let r=ye.find(n.docView,e);if(!r)return 1;let s=e-r.posAtStart;if(s==0)return 1;if(s==r.length)return-1;let o=r.coordsAt(s,-1);if(o&&Tc(t,i,o))return-1;let l=r.coordsAt(s,1);return l&&Tc(t,i,l)?1:o&&$c(i,o)?-1:1}function Lc(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:t,bias:wb(n,t,e.clientX,e.clientY)}}const bb=B.ie&&B.ie_version<=11;let Vc=null,Rc=0,Ic=0;function rs(n){if(!bb)return n.detail;let e=Vc,t=Ic;return Vc=n,Ic=Date.now(),Rc=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(Rc+1)%3:1}function vb(n,e){let t=Lc(n,e),i=rs(e),r=n.state.selection,s=t,o=e;return{update(l){l.docChanged&&(t&&(t.pos=l.changes.mapPos(t.pos)),r=r.map(l.changes),o=null)},get(l,a,h){let f;if(o&&l.clientX==o.clientX&&l.clientY==o.clientY?f=s:(f=s=Lc(n,l),o=l),!f||!t)return r;let u=Dc(n,f.pos,f.bias,i);if(t.pos!=f.pos&&!a){let d=Dc(n,t.pos,t.bias,i),p=Math.min(d.from,u.from),m=Math.max(d.to,u.to);u=p<u.from?k.range(p,m):k.range(m,p)}return a?r.replaceRange(r.main.extend(u.from,u.to)):h&&r.ranges.length>1&&r.ranges.some(d=>d.eq(u))?xb(r,u):h?r.addRange(u):k.create([u])}}}function xb(n,e){for(let t=0;;t++)if(n.ranges[t].eq(e))return k.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}ie.dragstart=(n,e)=>{let{selection:{main:t}}=n.state,{mouseSelection:i}=n.inputState;i&&(i.dragging=t),e.dataTransfer&&(e.dataTransfer.setData("Text",n.state.sliceDoc(t.from,t.to)),e.dataTransfer.effectAllowed="copyMove")};function Nc(n,e,t,i){if(!t)return;let r=n.posAtCoords({x:e.clientX,y:e.clientY},!1);e.preventDefault();let{mouseSelection:s}=n.inputState,o=i&&s&&s.dragging&&s.dragMove?{from:s.dragging.from,to:s.dragging.to}:null,l={from:r,insert:t},a=n.state.changes(o?[o,l]:l);n.focus(),n.dispatch({changes:a,selection:{anchor:a.mapPos(r,-1),head:a.mapPos(r,1)},userEvent:o?"move.drop":"input.drop"})}ie.drop=(n,e)=>{if(!e.dataTransfer)return;if(n.state.readOnly)return e.preventDefault();let t=e.dataTransfer.files;if(t&&t.length){e.preventDefault();let i=Array(t.length),r=0,s=()=>{++r==t.length&&Nc(n,e,i.filter(o=>o!=null).join(n.state.lineBreak),!1)};for(let o=0;o<t.length;o++){let l=new FileReader;l.onerror=s,l.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[o]=l.result),s()},l.readAsText(t[o])}}else Nc(n,e,e.dataTransfer.getData("Text"),!0)},ie.paste=(n,e)=>{if(n.state.readOnly)return e.preventDefault();n.observer.flush();let t=Ec?null:e.clipboardData;t?(Pc(n,t.getData("text/plain")),e.preventDefault()):yb(n)};function kb(n,e){let t=n.dom.parentNode;if(!t)return;let i=t.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),n.focus()},50)}function Sb(n){let e=[],t=[],i=!1;for(let r of n.selection.ranges)r.empty||(e.push(n.sliceDoc(r.from,r.to)),t.push(r));if(!e.length){let r=-1;for(let{from:s}of n.selection.ranges){let o=n.doc.lineAt(s);o.number>r&&(e.push(o.text),t.push({from:o.from,to:Math.min(n.doc.length,o.to+1)})),r=o.number}i=!0}return{text:e.join(n.lineBreak),ranges:t,linewise:i}}let ss=null;ie.copy=ie.cut=(n,e)=>{let{text:t,ranges:i,linewise:r}=Sb(n.state);if(!t&&!r)return;ss=r?t:null;let s=Ec?null:e.clipboardData;s?(e.preventDefault(),s.clearData(),s.setData("text/plain",t)):kb(n,t),e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"})};function zc(n){setTimeout(()=>{n.hasFocus!=n.inputState.notifiedFocused&&n.update([])},10)}ie.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),zc(n)},ie.blur=n=>{n.observer.clearSelectionRange(),zc(n)};function Hc(n,e){if(n.docView.compositionDeco.size){n.inputState.rapidCompositionStart=e;try{n.update([])}finally{n.inputState.rapidCompositionStart=!1}}}ie.compositionstart=ie.compositionupdate=n=>{n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0,n.docView.compositionDeco.size&&(n.observer.flush(),Hc(n,!0)))},ie.compositionend=n=>{n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionFirstChange=null,setTimeout(()=>{n.inputState.composing<0&&Hc(n,!1)},50)},ie.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()},ie.beforeinput=(n,e)=>{var t;let i;if(B.chrome&&B.android&&(i=Ac.find(r=>r.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let r=((t=window.visualViewport)===null||t===void 0?void 0:t.height)||0;setTimeout(()=>{var s;(((s=window.visualViewport)===null||s===void 0?void 0:s.height)||0)>r+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}};const Fc=["pre-wrap","normal","pre-line","break-spaces"];class Cb{constructor(){this.doc=N.empty,this.lineWrapping=!1,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let i=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.ceil((t-e-i*this.lineLength*.5)/this.lineLength)),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Fc.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let i=0;i<e.length;i++){let r=e[i];r<0?i++:this.heightSamples[Math.floor(r*10)]||(t=!0,this.heightSamples[Math.floor(r*10)]=!0)}return t}refresh(e,t,i,r,s){let o=Fc.indexOf(e)>-1,l=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=o;if(this.lineWrapping=o,this.lineHeight=t,this.charWidth=i,this.lineLength=r,l){this.heightSamples={};for(let a=0;a<s.length;a++){let h=s[a];h<0?a++:this.heightSamples[Math.floor(h*10)]=!0}}return l}}class _b{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class yt{constructor(e,t,i,r,s){this.from=e,this.length=t,this.top=i,this.height=r,this.type=s}get to(){return this.from+this.length}get bottom(){return this.top+this.height}join(e){let t=(Array.isArray(this.type)?this.type:[this]).concat(Array.isArray(e.type)?e.type:[e]);return new yt(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var j=function(n){return n[n.ByPos=0]="ByPos",n[n.ByHeight=1]="ByHeight",n[n.ByPosNoHeight=2]="ByPosNoHeight",n}(j||(j={}));const gi=.001;class ve{constructor(e,t,i=2){this.length=e,this.height=t,this.flags=i}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>gi&&(e.heightChanged=!0),this.height=t)}replace(e,t,i){return ve.of(i)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,i,r){let s=this;for(let o=r.length-1;o>=0;o--){let{fromA:l,toA:a,fromB:h,toB:f}=r[o],u=s.lineAt(l,j.ByPosNoHeight,t,0,0),d=u.to>=a?u:s.lineAt(a,j.ByPosNoHeight,t,0,0);for(f+=d.to-a,a=d.to;o>0&&u.from<=r[o-1].toA;)l=r[o-1].fromA,h=r[o-1].fromB,o--,l<u.from&&(u=s.lineAt(l,j.ByPosNoHeight,t,0,0));h+=u.from-l,l=u.from;let p=os.build(i,e,h,f);s=s.replace(l,a,p)}return s.updateHeight(i,0)}static empty(){return new Oe(0,0)}static of(e){if(e.length==1)return e[0];let t=0,i=e.length,r=0,s=0;for(;;)if(t==i)if(r>s*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),i+=1+l.break,r-=l.size}else if(s>r*2){let l=e[i];l.break?e.splice(i,1,l.left,null,l.right):e.splice(i,1,l.left,l.right),i+=2+l.break,s-=l.size}else break;else if(r<s){let l=e[t++];l&&(r+=l.size)}else{let l=e[--i];l&&(s+=l.size)}let o=0;return e[t-1]==null?(o=1,t--):e[t]==null&&(o=1,i++),new Mb(ve.of(e.slice(0,t)),o,ve.of(e.slice(i)))}}ve.prototype.size=1;class Wc extends ve{constructor(e,t,i){super(e,t),this.type=i}blockAt(e,t,i,r){return new yt(r,this.length,i,this.height,this.type)}lineAt(e,t,i,r,s){return this.blockAt(0,i,r,s)}forEachLine(e,t,i,r,s,o){e<=s+this.length&&t>=s&&o(this.blockAt(0,i,r,s))}updateHeight(e,t=0,i=!1,r){return r&&r.from<=t&&r.more&&this.setHeight(e,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Oe extends Wc{constructor(e,t){super(e,t,W.Text),this.collapsed=0,this.widgetHeight=0}replace(e,t,i){let r=i[0];return i.length==1&&(r instanceof Oe||r instanceof ae&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof ae?r=new Oe(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):ve.of(i)}updateHeight(e,t=0,i=!1,r){return r&&r.from<=t&&r.more?this.setHeight(e,r.heights[r.index++]):(i||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class ae extends ve{constructor(e){super(e,0)}lines(e,t){let i=e.lineAt(t).number,r=e.lineAt(t+this.length).number;return{firstLine:i,lastLine:r,lineHeight:this.height/(r-i+1)}}blockAt(e,t,i,r){let{firstLine:s,lastLine:o,lineHeight:l}=this.lines(t,r),a=Math.max(0,Math.min(o-s,Math.floor((e-i)/l))),{from:h,length:f}=t.line(s+a);return new yt(h,f,i+l*a,l,W.Text)}lineAt(e,t,i,r,s){if(t==j.ByHeight)return this.blockAt(e,i,r,s);if(t==j.ByPosNoHeight){let{from:u,to:d}=i.lineAt(e);return new yt(u,d-u,0,0,W.Text)}let{firstLine:o,lineHeight:l}=this.lines(i,s),{from:a,length:h,number:f}=i.lineAt(e);return new yt(a,h,r+l*(f-o),l,W.Text)}forEachLine(e,t,i,r,s,o){let{firstLine:l,lineHeight:a}=this.lines(i,s);for(let h=Math.max(e,s),f=Math.min(s+this.length,t);h<=f;){let u=i.lineAt(h);h==e&&(r+=a*(u.number-l)),o(new yt(u.from,u.length,r,a,W.Text)),r+=a,h=u.to+1}}replace(e,t,i){let r=this.length-t;if(r>0){let s=i[i.length-1];s instanceof ae?i[i.length-1]=new ae(s.length+r):i.push(null,new ae(r-1))}if(e>0){let s=i[0];s instanceof ae?i[0]=new ae(e+s.length):i.unshift(new ae(e-1),null)}return ve.of(i)}decomposeLeft(e,t){t.push(new ae(e-1),null)}decomposeRight(e,t){t.push(null,new ae(this.length-e-1))}updateHeight(e,t=0,i=!1,r){let s=t+this.length;if(r&&r.from<=t+this.length&&r.more){let o=[],l=Math.max(t,r.from),a=-1,h=e.heightChanged;for(r.from>t&&o.push(new ae(r.from-t-1).updateHeight(e,t));l<=s&&r.more;){let u=e.doc.lineAt(l).length;o.length&&o.push(null);let d=r.heights[r.index++];a==-1?a=d:Math.abs(d-a)>=gi&&(a=-2);let p=new Oe(u,d);p.outdated=!1,o.push(p),l+=u+1}l<=s&&o.push(null,new ae(s-l).updateHeight(e,l));let f=ve.of(o);return e.heightChanged=h||a<0||Math.abs(f.height-this.height)>=gi||Math.abs(a-this.lines(e.doc,t).lineHeight)>=gi,f}else(i||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class Mb extends ve{constructor(e,t,i){super(e.length+t+i.length,e.height+i.height,t|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,t,i,r){let s=i+this.left.height;return e<s?this.left.blockAt(e,t,i,r):this.right.blockAt(e,t,s,r+this.left.length+this.break)}lineAt(e,t,i,r,s){let o=r+this.left.height,l=s+this.left.length+this.break,a=t==j.ByHeight?e<o:e<l,h=a?this.left.lineAt(e,t,i,r,s):this.right.lineAt(e,t,i,o,l);if(this.break||(a?h.to<l:h.from>l))return h;let f=t==j.ByPosNoHeight?j.ByPosNoHeight:j.ByPos;return a?h.join(this.right.lineAt(l,f,i,o,l)):this.left.lineAt(l,f,i,r,s).join(h)}forEachLine(e,t,i,r,s,o){let l=r+this.left.height,a=s+this.left.length+this.break;if(this.break)e<a&&this.left.forEachLine(e,t,i,r,s,o),t>=a&&this.right.forEachLine(e,t,i,l,a,o);else{let h=this.lineAt(a,j.ByPos,i,r,s);e<h.from&&this.left.forEachLine(e,h.from-1,i,r,s,o),h.to>=e&&h.from<=t&&o(h),t>h.to&&this.right.forEachLine(h.to+1,t,i,l,a,o)}}replace(e,t,i){let r=this.left.length+this.break;if(t<r)return this.balanced(this.left.replace(e,t,i),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,i));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let l of i)s.push(l);if(e>0&&jc(s,o-1),t<this.length){let l=s.length;this.decomposeRight(t,s),jc(s,l)}return ve.of(s)}decomposeLeft(e,t){let i=this.left.length;if(e<=i)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(i++,e>=i&&t.push(null)),e>i&&this.right.decomposeLeft(e-i,t)}decomposeRight(e,t){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e<i&&this.left.decomposeRight(e,t),this.break&&e<r&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?ve.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,i=!1,r){let{left:s,right:o}=this,l=t+s.length+this.break,a=null;return r&&r.from<=t+s.length&&r.more?a=s=s.updateHeight(e,t,i,r):s.updateHeight(e,t,i),r&&r.from<=l+o.length&&r.more?a=o=o.updateHeight(e,l,i,r):o.updateHeight(e,l,i),a?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function jc(n,e){let t,i;n[e]==null&&(t=n[e-1])instanceof ae&&(i=n[e+1])instanceof ae&&n.splice(e-1,3,new ae(t.length+1+i.length))}const Ab=5;class os{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let i=Math.min(t,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof Oe?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Oe(i-this.pos,-1)),this.writtenTo=i,t>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,i){if(e<t||i.heightRelevant){let r=i.widget?i.widget.estimatedHeight:0;r<0&&(r=this.oracle.lineHeight);let s=t-e;i.block?this.addBlock(new Wc(s,r,i.type)):(s||r>=Ab)&&this.addLineDeco(r,s)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Oe(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let i=new ae(t-e);return this.oracle.doc.lineAt(e).to==t&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Oe)return e;let t=new Oe(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine(),e.type==W.WidgetAfter&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,e.type!=W.WidgetBefore&&(this.covering=e)}addLineDeco(e,t){let i=this.ensureLine();i.length+=t,i.collapsed+=t,i.widgetHeight=Math.max(i.widgetHeight,e),this.writtenTo=this.pos=this.pos+t}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Oe)&&!this.isCovered?this.nodes.push(new Oe(0,-1)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let i=e;for(let r of this.nodes)r instanceof Oe&&r.updateHeight(this.oracle,i),i+=r?r.length:1;return this.nodes}static build(e,t,i,r){let s=new os(i,e);return z.spans(t,i,r,s,0),s.finish(i)}}function Ob(n,e,t){let i=new Bb;return z.compare(n,e,t,i,0),i.changes}class Bb{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,i,r){(e<t||i&&i.heightRelevant||r&&r.heightRelevant)&&Gr(e,t,this.changes,5)}}function Eb(n,e){let t=n.getBoundingClientRect(),i=Math.max(0,t.left),r=Math.min(innerWidth,t.right),s=Math.max(0,t.top),o=Math.min(innerHeight,t.bottom),l=n.ownerDocument.body;for(let a=n.parentNode;a&&a!=l;)if(a.nodeType==1){let h=a,f=window.getComputedStyle(h);if((h.scrollHeight>h.clientHeight||h.scrollWidth>h.clientWidth)&&f.overflow!="visible"){let u=h.getBoundingClientRect();i=Math.max(i,u.left),r=Math.min(r,u.right),s=Math.max(s,u.top),o=a==n.parentNode?u.bottom:Math.min(o,u.bottom)}a=f.position=="absolute"||f.position=="fixed"?h.offsetParent:h.parentNode}else if(a.nodeType==11)a=a.host;else break;return{left:i-t.left,right:Math.max(i,r)-t.left,top:s-(t.top+e),bottom:Math.max(s,o)-(t.top+e)}}function Pb(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class ls{constructor(e,t,i){this.from=e,this.to=t,this.size=i}static same(e,t){if(e.length!=t.length)return!1;for(let i=0;i<e.length;i++){let r=e[i],s=t[i];if(r.from!=s.from||r.to!=s.to||r.size!=s.size)return!1}return!0}draw(e){return $.replace({widget:new Db(this.size,e)}).range(this.from,this.to)}}class Db extends mt{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class Uc{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.heightOracle=new Cb,this.scaler=Gc,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=G.RTL,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1,this.stateDeco=e.facet(Sn).filter(t=>typeof t!="function"),this.heightMap=ve.empty().applyChanges(this.stateDeco,N.empty,this.heightOracle.setDoc(e.doc),[new nt(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=$.set(this.lineGaps.map(t=>t.draw(!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let i=0;i<=1;i++){let r=i?t.head:t.anchor;if(!e.some(({from:s,to:o})=>r>=s&&r<=o)){let{from:s,to:o}=this.lineBlockAt(r);e.push(new yi(s,o))}}this.viewports=e.sort((i,r)=>i.from-r.from),this.scaler=this.heightMap.height<=7e6?Gc:new Lb(this.heightOracle.doc,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.state.doc,0,0,e=>{this.viewportLines.push(this.scaler.scale==1?e:_n(e,this.scaler))})}update(e,t=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Sn).filter(h=>typeof h!="function");let r=e.changedRanges,s=nt.extendWithRanges(r,Ob(i,this.stateDeco,e?e.changes:te.empty(this.state.doc.length))),o=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),this.heightMap.height!=o&&(e.flags|=2);let l=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<l.from||t.range.head>l.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,t));let a=!e.changes.empty||e.flags&2||l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,this.updateForViewport(),a&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,i=window.getComputedStyle(t),r=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?G.RTL:G.LTR;let o=this.heightOracle.mustRefreshForWrapping(s),l=o||this.mustMeasureContent||this.contentDOMHeight!=t.clientHeight;this.contentDOMHeight=t.clientHeight,this.mustMeasureContent=!1;let a=0,h=0,f=parseInt(i.paddingTop)||0,u=parseInt(i.paddingBottom)||0;(this.paddingTop!=f||this.paddingBottom!=u)&&(this.paddingTop=f,this.paddingBottom=u,a|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,a|=8);let d=(this.printing?Pb:Eb)(t,this.paddingTop),p=d.top-this.pixelViewport.top,m=d.bottom-this.pixelViewport.bottom;this.pixelViewport=d;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(l=!0)),!this.inView)return 0;let y=t.clientWidth;if((this.contentDOMWidth!=y||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=y,this.editorHeight=e.scrollDOM.clientHeight,a|=8),l){let v=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(v)&&(o=!0),o||r.lineWrapping&&Math.abs(y-this.contentDOMWidth)>r.charWidth){let{lineHeight:S,charWidth:x}=e.docView.measureTextSize();o=r.refresh(s,S,x,y/x,v),o&&(e.docView.minWidth=0,a|=8)}p>0&&m>0?h=Math.max(p,m):p<0&&m<0&&(h=Math.min(p,m)),r.heightChanged=!1;for(let S of this.viewports){let x=S.from==this.viewport.from?v:e.docView.measureVisibleLineHeights(S);this.heightMap=this.heightMap.updateHeight(r,0,o,new _b(S.from,x))}r.heightChanged&&(a|=2)}let w=!this.viewportIsAppropriate(this.viewport,h)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return w&&(this.viewport=this.getViewport(h,this.scrollTarget)),this.updateForViewport(),(a&2||w)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps)),a|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),a}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,s=this.state.doc,{visibleTop:o,visibleBottom:l}=this,a=new yi(r.lineAt(o-i*1e3,j.ByHeight,s,0,0).from,r.lineAt(l+(1-i)*1e3,j.ByHeight,s,0,0).to);if(t){let{head:h}=t.range;if(h<a.from||h>a.to){let f=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),u=r.lineAt(h,j.ByPos,s,0,0),d;t.y=="center"?d=(u.top+u.bottom)/2-f/2:t.y=="start"||t.y=="nearest"&&h<a.from?d=u.top:d=u.bottom-f,a=new yi(r.lineAt(d-500,j.ByHeight,s,0,0).from,r.lineAt(d+f+500,j.ByHeight,s,0,0).to)}}return a}mapViewport(e,t){let i=t.mapPos(e.from,-1),r=t.mapPos(e.to,1);return new yi(this.heightMap.lineAt(i,j.ByPos,this.state.doc,0,0).from,this.heightMap.lineAt(r,j.ByPos,this.state.doc,0,0).to)}viewportIsAppropriate({from:e,to:t},i=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,j.ByPos,this.state.doc,0,0),{bottom:s}=this.heightMap.lineAt(t,j.ByPos,this.state.doc,0,0),{visibleTop:o,visibleBottom:l}=this;return(e==0||r<=o-Math.max(10,Math.min(-i,250)))&&(t==this.state.doc.length||s>=l+Math.max(10,Math.min(i,250)))&&r>o-2e3&&s<l+2e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let i=[];for(let r of e)t.touchesRange(r.from,r.to)||i.push(new ls(t.mapPos(r.from),t.mapPos(r.to),r.size));return i}ensureLineGaps(e){let t=[];if(this.defaultTextDirection!=G.LTR)return t;for(let i of this.viewportLines){if(i.length<4e3)continue;let r=$b(i.from,i.to,this.stateDeco);if(r.total<4e3)continue;let s,o;if(this.heightOracle.lineWrapping){let h=2e3/this.heightOracle.lineLength*this.heightOracle.lineHeight;s=wi(r,(this.visibleTop-i.top-h)/i.height),o=wi(r,(this.visibleBottom-i.top+h)/i.height)}else{let h=r.total*this.heightOracle.charWidth,f=2e3*this.heightOracle.charWidth;s=wi(r,(this.pixelViewport.left-f)/h),o=wi(r,(this.pixelViewport.right+f)/h)}let l=[];s>i.from&&l.push({from:i.from,to:s}),o<i.to&&l.push({from:o,to:i.to});let a=this.state.selection.main;a.from>=i.from&&a.from<=i.to&&Kc(l,a.from-10,a.from+10),!a.empty&&a.to>=i.from&&a.to<=i.to&&Kc(l,a.to-10,a.to+10);for(let{from:h,to:f}of l)f-h>1e3&&t.push(Tb(e,u=>u.from>=i.from&&u.to<=i.to&&Math.abs(u.from-h)<1e3&&Math.abs(u.to-f)<1e3)||new ls(h,f,this.gapSize(i,h,f,r)))}return t}gapSize(e,t,i,r){let s=qc(r,i)-qc(r,t);return this.heightOracle.lineWrapping?e.height*s:r.total*this.heightOracle.charWidth*s}updateLineGaps(e){ls.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=$.set(e.map(t=>t.draw(this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];z.spans(e,this.viewport.from,this.viewport.to,{span(r,s){t.push({from:r,to:s})},point(){}},20);let i=t.length!=this.visibleRanges.length||this.visibleRanges.some((r,s)=>r.from!=t[s].from||r.to!=t[s].to);return this.visibleRanges=t,i?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||_n(this.heightMap.lineAt(e,j.ByPos,this.state.doc,0,0),this.scaler)}lineBlockAtHeight(e){return _n(this.heightMap.lineAt(this.scaler.fromDOM(e),j.ByHeight,this.state.doc,0,0),this.scaler)}elementAtHeight(e){return _n(this.heightMap.blockAt(this.scaler.fromDOM(e),this.state.doc,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class yi{constructor(e,t){this.from=e,this.to=t}}function $b(n,e,t){let i=[],r=n,s=0;return z.spans(t,n,e,{span(){},point(o,l){o>r&&(i.push({from:r,to:o}),s+=o-r),r=l}},20),r<e&&(i.push({from:r,to:e}),s+=e-r),{total:s,ranges:i}}function wi({total:n,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let i=Math.floor(n*t);for(let r=0;;r++){let{from:s,to:o}=e[r],l=o-s;if(i<=l)return s+i;i-=l}}function qc(n,e){let t=0;for(let{from:i,to:r}of n.ranges){if(e<=r){t+=e-i;break}t+=r-i}return t/n.total}function Kc(n,e,t){for(let i=0;i<n.length;i++){let r=n[i];if(r.from<t&&r.to>e){let s=[];r.from<e&&s.push({from:r.from,to:e}),r.to>t&&s.push({from:t,to:r.to}),n.splice(i,1,...s),i+=s.length-1}}}function Tb(n,e){for(let t of n)if(e(t))return t}const Gc={toDOM(n){return n},fromDOM(n){return n},scale:1};class Lb{constructor(e,t,i){let r=0,s=0,o=0;this.viewports=i.map(({from:l,to:a})=>{let h=t.lineAt(l,j.ByPos,e,0,0).top,f=t.lineAt(a,j.ByPos,e,0,0).bottom;return r+=f-h,{from:l,to:a,top:h,bottom:f,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let l of this.viewports)l.domTop=o+(l.top-s)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),s=l.bottom}toDOM(e){for(let t=0,i=0,r=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.top)return r+(e-i)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);i=s.bottom,r=s.domBottom}}fromDOM(e){for(let t=0,i=0,r=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.domTop)return i+(e-r)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);i=s.bottom,r=s.domBottom}}}function _n(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),i=e.toDOM(n.bottom);return new yt(n.from,n.length,t,i-t,Array.isArray(n.type)?n.type.map(r=>_n(r,e)):n.type)}const bi=E.define({combine:n=>n.join(" ")}),as=E.define({combine:n=>n.indexOf(!0)>-1}),cs=ft.newName(),Yc=ft.newName(),Jc=ft.newName(),Xc={"&light":"."+Yc,"&dark":"."+Jc};function hs(n,e,t){return new ft(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return n;if(!t||!t[r])throw new RangeError(`Unsupported selector: ${r}`);return t[r]}):n+" "+i}})}const Vb=hs("."+cs,{"&.cm-editor":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,minHeight:"100%",display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 4px"},".cm-selectionLayer":{zIndex:-1,contain:"size style"},".cm-selectionBackground":{position:"absolute"},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{zIndex:100,contain:"size style",pointerEvents:"none"},"&.cm-focused .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{position:"absolute",borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#f3f9ff"},"&dark .cm-activeLine":{backgroundColor:"#223039"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Xc),Rb={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},fs=B.ie&&B.ie_version<=11;class Ib{constructor(e,t,i){this.view=e,this.onChange=t,this.onScrollChanged=i,this.active=!1,this.selectionRange=new R2,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.scrollTargets=[],this.intersection=null,this.resize=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(r=>{for(let s of r)this.queue.push(s);(B.ie&&B.ie_version<=11||B.ios&&e.composing)&&r.some(s=>s.type=="childList"&&s.removedNodes.length||s.type=="characterData"&&s.oldValue.length>s.target.nodeValue.length)?this.flushSoon():this.flush()}),fs&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),typeof ResizeObserver=="function"&&(this.resize=new ResizeObserver(()=>{this.view.docView.lastUpdate<Date.now()-75&&this.onResize()}),this.resize.observe(e.scrollDOM)),this.win=e.dom.ownerDocument.defaultView,this.addWindowListeners(this.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(r=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),r.length>0&&r[r.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(r=>{r.length>0&&r[r.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,i)=>t!=e[i]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:t}=this,i=this.selectionRange;if(t.state.facet(pi)?t.root.activeElement!=this.dom:!oi(t.dom,i))return;let r=i.anchorNode&&t.docView.nearest(i.anchorNode);r&&r.ignoreEvent(e)||((B.ie&&B.ie_version<=11||B.android&&B.chrome)&&!t.state.selection.main.empty&&i.focusNode&&li(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1))}readSelectionRange(){let{view:e}=this,t=B.safari&&e.root.nodeType==11&&T2()==this.dom&&Nb(this.view)||si(e.root);if(!t||this.selectionRange.eq(t))return!1;let i=oi(this.dom,t);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&N2(this.dom,t)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(t),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let i=this.dom;i;)if(i.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==i?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);for(let i of this.scrollTargets=t)i.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,Rb),fs&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){!this.active||(this.active=!1,this.observer.disconnect(),fs&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){this.delayedAndroidKey||requestAnimationFrame(()=>{let i=this.delayedAndroidKey;this.delayedAndroidKey=null,this.delayedFlush=-1,this.flush()||vn(this.dom,i.key,i.keyCode)}),(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t})}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=window.setTimeout(()=>{this.delayedFlush=-1,this.flush()},20))}forceFlush(){this.delayedFlush>=0&&(window.clearTimeout(this.delayedFlush),this.delayedFlush=-1),this.flush()}processRecords(){let e=this.queue;for(let s of this.observer.takeRecords())e.push(s);e.length&&(this.queue=[]);let t=-1,i=-1,r=!1;for(let s of e){let o=this.readMutation(s);!o||(o.typeOver&&(r=!0),t==-1?{from:t,to:i}=o:(t=Math.min(o.from,t),i=Math.max(o.to,i)))}return{from:t,to:i,typeOver:r}}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return;e&&this.readSelectionRange();let{from:t,to:i,typeOver:r}=this.processRecords(),s=this.selectionChanged&&oi(this.dom,this.selectionRange);if(t<0&&!s)return;this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=this.view.state,l=this.onChange(t,i,r);return this.view.state==o&&this.view.update([]),l}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty(e.type=="attributes"),e.type=="attributes"&&(t.dirty|=4),e.type=="childList"){let i=Qc(t,e.previousSibling||e.target.previousSibling,-1),r=Qc(t,e.nextSibling||e.target.nextSibling,1);return{from:i?t.posAfter(i):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(i=this.resize)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout)}}function Qc(n,e,t){for(;e;){let i=U.get(e);if(i&&i.parent==n)return i;let r=e.parentNode;e=r!=n.dom?r:t>0?e.nextSibling:e.previousSibling}return null}function Nb(n){let e=null;function t(a){a.preventDefault(),a.stopImmediatePropagation(),e=a.getTargetRanges()[0]}if(n.contentDOM.addEventListener("beforeinput",t,!0),document.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",t,!0),!e)return null;let i=e.startContainer,r=e.startOffset,s=e.endContainer,o=e.endOffset,l=n.docView.domAtPos(n.state.selection.main.anchor);return li(l.node,l.offset,s,o)&&([i,r,s,o]=[s,o,i,r]),{anchorNode:i,anchorOffset:r,focusNode:s,focusOffset:o}}function zb(n,e,t,i){let r,s,o=n.state.selection.main;if(e>-1){let l=n.docView.domBoundsAround(e,t,0);if(!l||n.state.readOnly)return!1;let{from:a,to:h}=l,f=n.docView.impreciseHead||n.docView.impreciseAnchor?[]:Fb(n),u=new pc(f,n.state);u.readRange(l.startDOM,l.endDOM);let d=o.from,p=null;(n.inputState.lastKeyCode===8&&n.inputState.lastKeyTime>Date.now()-100||B.android&&u.text.length<h-a)&&(d=o.to,p="end");let m=Hb(n.state.doc.sliceString(a,h,gt),u.text,d-a,p);m&&(B.chrome&&n.inputState.lastKeyCode==13&&m.toB==m.from+2&&u.text.slice(m.from,m.toB)==gt+gt&&m.toB--,r={from:a+m.from,to:a+m.toA,insert:N.of(u.text.slice(m.from,m.toB).split(gt))}),s=Wb(f,a)}else if(n.hasFocus||!n.state.facet(pi)){let l=n.observer.selectionRange,{impreciseHead:a,impreciseAnchor:h}=n.docView,f=a&&a.node==l.focusNode&&a.offset==l.focusOffset||!jt(n.contentDOM,l.focusNode)?n.state.selection.main.head:n.docView.posFromDOM(l.focusNode,l.focusOffset),u=h&&h.node==l.anchorNode&&h.offset==l.anchorOffset||!jt(n.contentDOM,l.anchorNode)?n.state.selection.main.anchor:n.docView.posFromDOM(l.anchorNode,l.anchorOffset);(f!=o.head||u!=o.anchor)&&(s=k.single(u,f))}if(!r&&!s)return!1;if(!r&&i&&!o.empty&&s&&s.main.empty?r={from:o.from,to:o.to,insert:n.state.doc.slice(o.from,o.to)}:r&&r.from>=o.from&&r.to<=o.to&&(r.from!=o.from||r.to!=o.to)&&o.to-o.from-(r.to-r.from)<=4?r={from:o.from,to:o.to,insert:n.state.doc.slice(o.from,r.from).append(r.insert).append(n.state.doc.slice(r.to,o.to))}:(B.mac||B.android)&&r&&r.from==r.to&&r.from==o.head-1&&r.insert.toString()=="."&&(r={from:o.from,to:o.to,insert:N.of([" "])}),r){let l=n.state;if(B.ios&&n.inputState.flushIOSKey(n)||B.android&&(r.from==o.from&&r.to==o.to&&r.insert.length==1&&r.insert.lines==2&&vn(n.contentDOM,"Enter",13)||r.from==o.from-1&&r.to==o.to&&r.insert.length==0&&vn(n.contentDOM,"Backspace",8)||r.from==o.from&&r.to==o.to+1&&r.insert.length==0&&vn(n.contentDOM,"Delete",46)))return!0;let a=r.insert.toString();if(n.state.facet(rc).some(u=>u(n,r.from,r.to,a)))return!0;n.inputState.composing>=0&&n.inputState.composing++;let h;if(r.from>=o.from&&r.to<=o.to&&r.to-r.from>=(o.to-o.from)/3&&(!s||s.main.empty&&s.main.from==r.from+r.insert.length)&&n.inputState.composing<0){let u=o.from<r.from?l.sliceDoc(o.from,r.from):"",d=o.to>r.to?l.sliceDoc(r.to,o.to):"";h=l.replaceSelection(n.state.toText(u+r.insert.sliceString(0,void 0,n.state.lineBreak)+d))}else{let u=l.changes(r),d=s&&!l.selection.main.eq(s.main)&&s.main.to<=u.newLength?s.main:void 0;if(l.selection.ranges.length>1&&n.inputState.composing>=0&&r.to<=o.to&&r.to>=o.to-10){let p=n.state.sliceDoc(r.from,r.to),m=bc(n)||n.state.doc.lineAt(o.head),g=o.to-r.to,y=o.to-o.from;h=l.changeByRange(w=>{if(w.from==o.from&&w.to==o.to)return{changes:u,range:d||w.map(u)};let v=w.to-g,S=v-p.length;if(w.to-w.from!=y||n.state.sliceDoc(S,v)!=p||m&&w.to>=m.from&&w.from<=m.to)return{range:w};let x=l.changes({from:S,to:v,insert:r.insert}),C=w.to-o.to;return{changes:x,range:d?k.range(Math.max(0,d.anchor+C),Math.max(0,d.head+C)):w.map(x)}})}else h={changes:u,selection:d&&l.selection.replaceRange(d)}}let f="input.type";return n.composing&&(f+=".compose",n.inputState.compositionFirstChange&&(f+=".start",n.inputState.compositionFirstChange=!1)),n.dispatch(h,{scrollIntoView:!0,userEvent:f}),!0}else if(s&&!s.main.eq(o)){let l=!1,a="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(l=!0),a=n.inputState.lastSelectionOrigin),n.dispatch({selection:s,scrollIntoView:l,userEvent:a}),!0}else return!1}function Hb(n,e,t,i){let r=Math.min(n.length,e.length),s=0;for(;s<r&&n.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==r&&n.length==e.length)return null;let o=n.length,l=e.length;for(;o>0&&l>0&&n.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(i=="end"){let a=Math.max(0,s-Math.min(o,l));t-=o+a-s}return o<s&&n.length<e.length?(s-=t<=s&&t>=o?s-t:0,l=s+(l-o),o=s):l<s&&(s-=t<=s&&t>=l?s-t:0,o=s+(o-l),l=s),{from:s,toA:o,toB:l}}function Fb(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:i,focusNode:r,focusOffset:s}=n.observer.selectionRange;return t&&(e.push(new gc(t,i)),(r!=t||s!=i)&&e.push(new gc(r,s))),e}function Wb(n,e){if(n.length==0)return null;let t=n[0].pos,i=n.length==2?n[1].pos:t;return t>-1&&i>-1?k.single(t+e,i+e):null}class P{constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: absolute; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=e.dispatch||(t=>this.update([t])),this.dispatch=this.dispatch.bind(this),this._root=e.root||I2(e.parent)||document,this.viewState=new Uc(e.state||R.create(e)),this.plugins=this.state.facet(kn).map(t=>new Xr(t));for(let t of this.plugins)t.update(this);this.observer=new Ib(this,(t,i,r)=>zb(this,t,i,r),t=>{this.inputState.runScrollHandlers(this,t),this.observer.intersecting&&this.measure()}),this.inputState=new ub(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new yc(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}dispatch(...e){this._dispatch(e.length==1&&e[0]instanceof ne?e[0]:this.state.update(...e))}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,i=!1,r,s=this.state;for(let l of e){if(l.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=l.state}if(this.destroyed){this.viewState.state=s;return}if(this.observer.clear(),s.facet(R.phrases)!=this.state.facet(R.phrases))return this.setState(s);r=mi.create(this,s,e);let o=this.viewState.scrollTarget;try{this.updateState=2;for(let l of e){if(o&&(o=o.map(l.changes)),l.scrollIntoView){let{main:a}=l.state.selection;o=new di(a.empty?a:k.cursor(a.head,a.head>a.anchor?-1:1))}for(let a of l.effects)a.is(oc)&&(o=a.value)}this.viewState.update(r,o),this.bidiCache=vi.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),t=this.docView.update(r),this.state.facet(Cn)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(l=>l.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(bi)!=r.state.facet(bi)&&(this.viewState.mustMeasureContent=!0),(t||i||o||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!r.empty)for(let l of this.state.facet(Jr))l(r)}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new Uc(e),this.plugins=e.facet(kn).map(i=>new Xr(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView=new yc(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(kn),i=e.state.facet(kn);if(t!=i){let r=[];for(let s of i){let o=t.indexOf(s);if(o<0)r.push(new Xr(s));else{let l=this.plugins[o];l.mustUpdate=e,r.push(l)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=r,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r<this.plugins.length;r++)this.plugins[r].update(this)}measure(e=!0){if(this.destroyed)return;this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,{scrollHeight:i,scrollTop:r,clientHeight:s}=this.scrollDOM,o=r>i-s-4?i:r;try{for(let l=0;;l++){this.updateState=1;let a=this.viewport,h=this.viewState.lineBlockAtHeight(o),f=this.viewState.measure(this);if(!f&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];f&4||([this.measureRequests,u]=[u,this.measureRequests]);let d=u.map(y=>{try{return y.read(this)}catch(w){return Ae(this.state,w),Zc}}),p=mi.create(this,this.state,[]),m=!1,g=!1;p.flags|=f,t?t.flags|=f:t=p,this.updateState=2,p.empty||(this.updatePlugins(p),this.inputState.update(p),this.updateAttrs(),m=this.docView.update(p));for(let y=0;y<u.length;y++)if(d[y]!=Zc)try{let w=u[y];w.write&&w.write(d[y],this)}catch(w){Ae(this.state,w)}if(this.viewState.scrollTarget)this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,g=!0;else{let y=this.viewState.lineBlockAt(h.from).top-h.top;(y>1||y<-1)&&(this.scrollDOM.scrollTop+=y,g=!0)}if(m&&this.docView.updateSelection(!0),this.viewport.from==a.from&&this.viewport.to==a.to&&!g&&this.measureRequests.length==0)break}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(Jr))l(t)}get themeClasses(){return cs+" "+(this.state.facet(as)?Jc:Yc)+" "+this.state.facet(bi)}updateAttrs(){let e=eh(this,lc,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(pi)?"true":"false",class:"cm-content",style:`${B.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),eh(this,ac,t);let i=this.observer.ignore(()=>{let r=Kr(this.contentDOM,this.contentAttrs,t),s=Kr(this.dom,this.editorAttrs,e);return r||s});return this.editorAttrs=e,this.contentAttrs=t,i}showAnnouncements(e){let t=!0;for(let i of e)for(let r of i.effects)if(r.is(P.announce)){t&&(this.announceDOM.textContent=""),t=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(Cn),ft.mount(this.root,this.styleModules.concat(Vb).reverse())}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=requestAnimationFrame(()=>this.measure())),e){if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.spec!=e)&&this.pluginMap.set(e,t=this.plugins.find(i=>i.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,i){return ns(this,e,Mc(this,e,t,i))}moveByGroup(e,t){return ns(this,e,Mc(this,e,t,i=>hb(this,e.head,i)))}moveToLineBoundary(e,t,i=!0){return cb(this,e,t,i)}moveVertically(e,t,i){return ns(this,e,fb(this,e,t,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),Cc(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let i=this.docView.coordsAt(e,t);if(!i||i.left==i.right)return i;let r=this.state.doc.lineAt(e),s=this.bidiSpans(r),o=s[Gt.find(s,e-r.from,-1,t)];return ci(i,o.dir==G.LTR==t>0)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(sc)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>jb)return uc(e.length);let t=this.textDirectionAt(e.from);for(let r of this.bidiCache)if(r.from==e.from&&r.dir==t)return r.order;let i=Y2(e.text,t);return this.bidiCache.push(new vi(e.from,e.to,t,i)),i}get hasFocus(){var e;return(document.hasFocus()||B.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{La(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return oc.of(new di(typeof e=="number"?k.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}static domEventHandlers(e){return Z.define(()=>({}),{eventHandlers:e})}static theme(e,t){let i=ft.newName(),r=[bi.of(i),Cn.of(hs(`.${i}`,e))];return t&&t.dark&&r.push(as.of(!0)),r}static baseTheme(e){return Ht.lowest(Cn.of(hs("."+cs,e,Xc)))}static findFromDOM(e){var t;let i=e.querySelector(".cm-content"),r=i&&U.get(i)||U.get(e);return((t=r==null?void 0:r.rootView)===null||t===void 0?void 0:t.view)||null}}P.styleModule=Cn,P.inputHandler=rc,P.perLineTextDirection=sc,P.exceptionSink=ic,P.updateListener=Jr,P.editable=pi,P.mouseSelectionStyle=nc,P.dragMovesSelection=tc,P.clickAddsSelectionRange=ec,P.decorations=Sn,P.atomicRanges=cc,P.scrollMargins=hc,P.darkTheme=as,P.contentAttributes=ac,P.editorAttributes=lc,P.lineWrapping=P.contentAttributes.of({class:"cm-lineWrapping"}),P.announce=T.define();const jb=4096,Zc={};class vi{constructor(e,t,i,r){this.from=e,this.to=t,this.dir=i,this.order=r}static update(e,t){if(t.empty)return e;let i=[],r=e.length?e[e.length-1].dir:G.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let o=e[s];o.dir==r&&!t.touchesRange(o.from,o.to)&&i.push(new vi(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.order))}return i}}function eh(n,e,t){for(let i=n.state.facet(e),r=i.length-1;r>=0;r--){let s=i[r],o=typeof s=="function"?s(n):s;o&&Ur(o,t)}return t}const Ub=B.mac?"mac":B.windows?"win":B.linux?"linux":"key";function qb(n,e){const t=n.split(/-(?!$)/);let i=t[t.length-1];i=="Space"&&(i=" ");let r,s,o,l;for(let a=0;a<t.length-1;++a){const h=t[a];if(/^(cmd|meta|m)$/i.test(h))l=!0;else if(/^a(lt)?$/i.test(h))r=!0;else if(/^(c|ctrl|control)$/i.test(h))s=!0;else if(/^s(hift)?$/i.test(h))o=!0;else if(/^mod$/i.test(h))e=="mac"?l=!0:s=!0;else throw new Error("Unrecognized modifier name: "+h)}return r&&(i="Alt-"+i),s&&(i="Ctrl-"+i),l&&(i="Meta-"+i),o&&(i="Shift-"+i),i}function xi(n,e,t){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t!==!1&&e.shiftKey&&(n="Shift-"+n),n}const Kb=Ht.default(P.domEventHandlers({keydown(n,e){return ih(nh(e.state),n,e,"editor")}})),us=E.define({enables:Kb}),th=new WeakMap;function nh(n){let e=n.facet(us),t=th.get(e);return t||th.set(e,t=Jb(e.reduce((i,r)=>i.concat(r),[]))),t}function Gb(n,e,t){return ih(nh(n.state),e,n,t)}let wt=null;const Yb=4e3;function Jb(n,e=Ub){let t=Object.create(null),i=Object.create(null),r=(o,l)=>{let a=i[o];if(a==null)i[o]=l;else if(a!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,l,a,h)=>{let f=t[o]||(t[o]=Object.create(null)),u=l.split(/ (?!$)/).map(m=>qb(m,e));for(let m=1;m<u.length;m++){let g=u.slice(0,m).join(" ");r(g,!0),f[g]||(f[g]={preventDefault:!0,commands:[y=>{let w=wt={view:y,prefix:g,scope:o};return setTimeout(()=>{wt==w&&(wt=null)},Yb),!0}]})}let d=u.join(" ");r(d,!1);let p=f[d]||(f[d]={preventDefault:!1,commands:[]});p.commands.push(a),h&&(p.preventDefault=!0)};for(let o of n){let l=o[e]||o.key;if(!!l)for(let a of o.scope?o.scope.split(" "):["editor"])s(a,l,o.run,o.preventDefault),o.shift&&s(a,"Shift-"+l,o.shift,o.preventDefault)}return t}function ih(n,e,t,i){let r=$2(e),s=re(r,0),o=_e(s)==r.length&&r!=" ",l="",a=!1;wt&&wt.view==t&&wt.scope==i&&(l=wt.prefix+" ",(a=Oc.indexOf(e.keyCode)<0)&&(wt=null));let h=d=>{if(d){for(let p of d.commands)if(p(t))return!0;d.preventDefault&&(a=!0)}return!1},f=n[i],u;if(f){if(h(f[l+xi(r,e,!o)]))return!0;if(o&&(e.shiftKey||e.altKey||e.metaKey||s>127)&&(u=ut[e.keyCode])&&u!=r){if(h(f[l+xi(u,e,!0)]))return!0;if(e.shiftKey&&Wt[e.keyCode]!=u&&h(f[l+xi(Wt[e.keyCode],e,!1)]))return!0}else if(o&&e.shiftKey&&h(f[l+xi(r,e,!0)]))return!0}return a}const rh=!B.ios,Mn=E.define({combine(n){return tt(n,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})}});function Xb(n={}){return[Mn.of(n),Qb,Zb]}class sh{constructor(e,t,i,r,s){this.left=e,this.top=t,this.width=i,this.height=r,this.className=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width>=0&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}}const Qb=Z.fromClass(class{constructor(n){this.view=n,this.rangePieces=[],this.cursors=[],this.measureReq={read:this.readPos.bind(this),write:this.drawSel.bind(this)},this.selectionLayer=n.scrollDOM.appendChild(document.createElement("div")),this.selectionLayer.className="cm-selectionLayer",this.selectionLayer.setAttribute("aria-hidden","true"),this.cursorLayer=n.scrollDOM.appendChild(document.createElement("div")),this.cursorLayer.className="cm-cursorLayer",this.cursorLayer.setAttribute("aria-hidden","true"),n.requestMeasure(this.measureReq),this.setBlinkRate()}setBlinkRate(){this.cursorLayer.style.animationDuration=this.view.state.facet(Mn).cursorBlinkRate+"ms"}update(n){let e=n.startState.facet(Mn)!=n.state.facet(Mn);(e||n.selectionSet||n.geometryChanged||n.viewportChanged)&&this.view.requestMeasure(this.measureReq),n.transactions.some(t=>t.scrollIntoView)&&(this.cursorLayer.style.animationName=this.cursorLayer.style.animationName=="cm-blink"?"cm-blink2":"cm-blink"),e&&this.setBlinkRate()}readPos(){let{state:n}=this.view,e=n.facet(Mn),t=n.selection.ranges.map(r=>r.empty?[]:ev(this.view,r)).reduce((r,s)=>r.concat(s)),i=[];for(let r of n.selection.ranges){let s=r==n.selection.main;if(r.empty?!s||rh:e.drawRangeCursor){let o=tv(this.view,r,s);o&&i.push(o)}}return{rangePieces:t,cursors:i}}drawSel({rangePieces:n,cursors:e}){if(n.length!=this.rangePieces.length||n.some((t,i)=>!t.eq(this.rangePieces[i]))){this.selectionLayer.textContent="";for(let t of n)this.selectionLayer.appendChild(t.draw());this.rangePieces=n}if(e.length!=this.cursors.length||e.some((t,i)=>!t.eq(this.cursors[i]))){let t=this.cursorLayer.children;if(t.length!==e.length){this.cursorLayer.textContent="";for(const i of e)this.cursorLayer.appendChild(i.draw())}else e.forEach((i,r)=>i.adjust(t[r]));this.cursors=e}}destroy(){this.selectionLayer.remove(),this.cursorLayer.remove()}}),oh={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};rh&&(oh[".cm-line"].caretColor="transparent !important");const Zb=Ht.highest(P.theme(oh));function lh(n){let e=n.scrollDOM.getBoundingClientRect();return{left:(n.textDirection==G.LTR?e.left:e.right-n.scrollDOM.clientWidth)-n.scrollDOM.scrollLeft,top:e.top-n.scrollDOM.scrollTop}}function ah(n,e,t){let i=k.cursor(e);return{from:Math.max(t.from,n.moveToLineBoundary(i,!1,!0).from),to:Math.min(t.to,n.moveToLineBoundary(i,!0,!0).from),type:W.Text}}function ch(n,e){let t=n.lineBlockAt(e);if(Array.isArray(t.type)){for(let i of t.type)if(i.to>e||i.to==e&&(i.to==t.to||i.type==W.Text))return i}return t}function ev(n,e){if(e.to<=n.viewport.from||e.from>=n.viewport.to)return[];let t=Math.max(e.from,n.viewport.from),i=Math.min(e.to,n.viewport.to),r=n.textDirection==G.LTR,s=n.contentDOM,o=s.getBoundingClientRect(),l=lh(n),a=window.getComputedStyle(s.firstChild),h=o.left+parseInt(a.paddingLeft)+Math.min(0,parseInt(a.textIndent)),f=o.right-parseInt(a.paddingRight),u=ch(n,t),d=ch(n,i),p=u.type==W.Text?u:null,m=d.type==W.Text?d:null;if(n.lineWrapping&&(p&&(p=ah(n,t,p)),m&&(m=ah(n,i,m))),p&&m&&p.from==m.from)return y(w(e.from,e.to,p));{let S=p?w(e.from,null,p):v(u,!1),x=m?w(null,e.to,m):v(d,!0),C=[];return(p||u).to<(m||d).from-1?C.push(g(h,S.bottom,f,x.top)):S.bottom<x.top&&n.elementAtHeight((S.bottom+x.top)/2).type==W.Text&&(S.bottom=x.top=(S.bottom+x.top)/2),y(S).concat(C).concat(y(x))}function g(S,x,C,b){return new sh(S-l.left,x-l.top-.01,C-S,b-x+.01,"cm-selectionBackground")}function y({top:S,bottom:x,horizontal:C}){let b=[];for(let O=0;O<C.length;O+=2)b.push(g(C[O],S,C[O+1],x));return b}function w(S,x,C){let b=1e9,O=-1e9,K=[];function I(X,ee,Ee,de,we){let Ne=n.coordsAtPos(X,X==C.to?-2:2),he=n.coordsAtPos(Ee,Ee==C.from?2:-2);b=Math.min(Ne.top,he.top,b),O=Math.max(Ne.bottom,he.bottom,O),we==G.LTR?K.push(r&&ee?h:Ne.left,r&&de?f:he.right):K.push(!r&&de?h:he.left,!r&&ee?f:Ne.right)}let L=S!=null?S:C.from,H=x!=null?x:C.to;for(let X of n.visibleRanges)if(X.to>L&&X.from<H)for(let ee=Math.max(X.from,L),Ee=Math.min(X.to,H);;){let de=n.state.doc.lineAt(ee);for(let we of n.bidiSpans(de)){let Ne=we.from+de.from,he=we.to+de.from;if(Ne>=Ee)break;he>ee&&I(Math.max(Ne,ee),S==null&&Ne<=L,Math.min(he,Ee),x==null&&he>=H,we.dir)}if(ee=de.to+1,ee>=Ee)break}return K.length==0&&I(L,S==null,H,x==null,n.textDirection),{top:b,bottom:O,horizontal:K}}function v(S,x){let C=o.top+(x?S.top:S.bottom);return{top:C,bottom:C,horizontal:[]}}}function tv(n,e,t){let i=n.coordsAtPos(e.head,e.assoc||1);if(!i)return null;let r=lh(n);return new sh(i.left-r.left,i.top-r.top,-1,i.bottom-i.top,t?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary")}const hh=T.define({map(n,e){return n==null?null:e.mapPos(n)}}),An=se.define({create(){return null},update(n,e){return n!=null&&(n=e.changes.mapPos(n)),e.effects.reduce((t,i)=>i.is(hh)?i.value:t,n)}}),nv=Z.fromClass(class{constructor(n){this.view=n,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(n){var e;let t=n.state.field(An);t==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(n.startState.field(An)!=t||n.docChanged||n.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let n=this.view.state.field(An),e=n!=null&&this.view.coordsAtPos(n);if(!e)return null;let t=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-t.left+this.view.scrollDOM.scrollLeft,top:e.top-t.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}drawCursor(n){this.cursor&&(n?(this.cursor.style.left=n.left+"px",this.cursor.style.top=n.top+"px",this.cursor.style.height=n.height+"px"):this.cursor.style.left="-100000px")}destroy(){this.cursor&&this.cursor.remove()}setDropPos(n){this.view.state.field(An)!=n&&this.view.dispatch({effects:hh.of(n)})}},{eventHandlers:{dragover(n){this.setDropPos(this.view.posAtCoords({x:n.clientX,y:n.clientY}))},dragleave(n){(n.target==this.view.contentDOM||!this.view.contentDOM.contains(n.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function iv(){return[An,nv]}function fh(n,e,t,i,r){e.lastIndex=0;for(let s=n.iterRange(t,i),o=t,l;!s.next().done;o+=s.value.length)if(!s.lineBreak)for(;l=e.exec(s.value);)r(o+l.index,l)}function rv(n,e){let t=n.visibleRanges;if(t.length==1&&t[0].from==n.viewport.from&&t[0].to==n.viewport.to)return t;let i=[];for(let{from:r,to:s}of t)r=Math.max(n.state.doc.lineAt(r).from,r-e),s=Math.min(n.state.doc.lineAt(s).to,s+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=s:i.push({from:r,to:s});return i}class sv{constructor(e){const{regexp:t,decoration:i,decorate:r,boundary:s,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,r)this.addMatch=(l,a,h,f)=>r(f,h,h+l[0].length,l,a);else if(i){let l=typeof i=="function"?i:()=>i;this.addMatch=(a,h,f,u)=>u(f,f+a[0].length,l(a,h,f))}else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=o}createDeco(e){let t=new ht,i=t.add.bind(t);for(let{from:r,to:s}of rv(e,this.maxLength))fh(e.state.doc,this.regexp,r,s,(o,l)=>this.addMatch(l,e,o,i));return t.finish()}updateDeco(e,t){let i=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((s,o,l,a)=>{a>e.view.viewport.from&&l<e.view.viewport.to&&(i=Math.min(l,i),r=Math.max(a,r))}),e.viewportChanged||r-i>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),i,r):t}updateRange(e,t,i,r){for(let s of e.visibleRanges){let o=Math.max(s.from,i),l=Math.min(s.to,r);if(l>o){let a=e.state.doc.lineAt(o),h=a.to<l?e.state.doc.lineAt(l):a,f=Math.max(s.from,a.from),u=Math.min(s.to,h.to);if(this.boundary){for(;o>a.from;o--)if(this.boundary.test(a.text[o-1-a.from])){f=o;break}for(;l<h.to;l++)if(this.boundary.test(h.text[l-h.from])){u=l;break}}let d=[],p,m=(g,y,w)=>d.push(w.range(g,y));if(a==h)for(this.regexp.lastIndex=f-a.from;(p=this.regexp.exec(a.text))&&p.index<u-a.from;)this.addMatch(p,e,p.index+a.from,m);else fh(e.state.doc,this.regexp,f,u,(g,y)=>this.addMatch(y,e,g,m));t=t.update({filterFrom:f,filterTo:u,filter:(g,y)=>g<f||y>u,add:d})}}return t}}const ds=/x/.unicode!=null?"gu":"g",ov=new RegExp(`[\0-\b
|
|
10
|
+
-\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,ds),lv={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let ps=null;function av(){var n;if(ps==null&&typeof document<"u"&&document.body){let e=document.body.style;ps=((n=e.tabSize)!==null&&n!==void 0?n:e.MozTabSize)!=null}return ps||!1}const ki=E.define({combine(n){let e=tt(n,{render:null,specialChars:ov,addSpecialChars:null});return(e.replaceTabs=!av())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,ds)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,ds)),e}});function cv(n={}){return[ki.of(n),hv()]}let uh=null;function hv(){return uh||(uh=Z.fromClass(class{constructor(n){this.view=n,this.decorations=$.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(n.state.facet(ki)),this.decorations=this.decorator.createDeco(n)}makeDecorator(n){return new sv({regexp:n.specialChars,decoration:(e,t,i)=>{let{doc:r}=t.state,s=re(e[0],0);if(s==9){let o=r.lineAt(i),l=t.state.tabSize,a=yn(o.text,l,i-o.from);return $.replace({widget:new pv((l-a%l)*this.view.defaultCharacterWidth)})}return this.decorationCache[s]||(this.decorationCache[s]=$.replace({widget:new dv(n,s)}))},boundary:n.replaceTabs?void 0:/[^]/})}update(n){let e=n.state.facet(ki);n.startState.facet(ki)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(n.view)):this.decorations=this.decorator.updateDeco(n,this.decorations)}},{decorations:n=>n.decorations}))}const fv="\u2022";function uv(n){return n>=32?fv:n==10?"\u2424":String.fromCharCode(9216+n)}class dv extends mt{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=uv(this.code),i=e.state.phrase("Control character")+" "+(lv[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,t);if(r)return r;let s=document.createElement("span");return s.textContent=t,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class pv extends mt{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function mv(){return yv}const gv=$.line({class:"cm-activeLine"}),yv=Z.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let i of n.state.selection.ranges){if(!i.empty)return $.none;let r=n.lineBlockAt(i.head);r.from>e&&(t.push(gv.range(r.from)),e=r.from)}return $.set(t)}},{decorations:n=>n.decorations}),ms=2e3;function wv(n,e,t){let i=Math.min(e.line,t.line),r=Math.max(e.line,t.line),s=[];if(e.off>ms||t.off>ms||e.col<0||t.col<0){let o=Math.min(e.off,t.off),l=Math.max(e.off,t.off);for(let a=i;a<=r;a++){let h=n.doc.line(a);h.length<=l&&s.push(k.range(h.from+o,h.to+l))}}else{let o=Math.min(e.col,t.col),l=Math.max(e.col,t.col);for(let a=i;a<=r;a++){let h=n.doc.line(a),f=Tr(h.text,o,n.tabSize,!0);if(f>-1){let u=Tr(h.text,l,n.tabSize);s.push(k.range(h.from+f,h.from+u))}}}return s}function bv(n,e){let t=n.coordsAtPos(n.viewport.from);return t?Math.round(Math.abs((t.left-e)/n.defaultCharacterWidth)):-1}function dh(n,e){let t=n.posAtCoords({x:e.clientX,y:e.clientY},!1),i=n.state.doc.lineAt(t),r=t-i.from,s=r>ms?-1:r==i.length?bv(n,e.clientX):yn(i.text,n.state.tabSize,t-i.from);return{line:i.number,col:s,off:r}}function vv(n,e){let t=dh(n,e),i=n.state.selection;return t?{update(r){if(r.docChanged){let s=r.changes.mapPos(r.startState.doc.line(t.line).from),o=r.state.doc.lineAt(s);t={line:o.number,col:t.col,off:Math.min(t.off,o.length)},i=i.map(r.changes)}},get(r,s,o){let l=dh(n,r);if(!l)return i;let a=wv(n.state,t,l);return a.length?o?k.create(a.concat(i.ranges)):k.create(a):i}}:null}function xv(n){let e=(n==null?void 0:n.eventFilter)||(t=>t.altKey&&t.button==0);return P.mouseSelectionStyle.of((t,i)=>e(i)?vv(t,i):null)}const kv={Alt:[18,n=>n.altKey],Control:[17,n=>n.ctrlKey],Shift:[16,n=>n.shiftKey],Meta:[91,n=>n.metaKey]},Sv={style:"cursor: crosshair"};function Cv(n={}){let[e,t]=kv[n.key||"Alt"],i=Z.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventHandlers:{keydown(r){this.set(r.keyCode==e||t(r))},keyup(r){(r.keyCode==e||!t(r))&&this.set(!1)}}});return[i,P.contentAttributes.of(r=>{var s;return!((s=r.plugin(i))===null||s===void 0)&&s.isDown?Sv:null})]}const gs="-10000px";class ph{constructor(e,t,i){this.facet=t,this.createTooltipView=i,this.input=e.state.facet(t),this.tooltips=this.input.filter(r=>r),this.tooltipViews=this.tooltips.map(i)}update(e){let t=e.state.facet(this.facet),i=t.filter(s=>s);if(t===this.input){for(let s of this.tooltipViews)s.update&&s.update(e);return!1}let r=[];for(let s=0;s<i.length;s++){let o=i[s],l=-1;if(!!o){for(let a=0;a<this.tooltips.length;a++){let h=this.tooltips[a];h&&h.create==o.create&&(l=a)}if(l<0)r[s]=this.createTooltipView(o);else{let a=r[s]=this.tooltipViews[l];a.update&&a.update(e)}}}for(let s of this.tooltipViews)r.indexOf(s)<0&&s.dom.remove();return this.input=t,this.tooltips=i,this.tooltipViews=r,!0}}function _v(){return{top:0,left:0,bottom:innerHeight,right:innerWidth}}const ys=E.define({combine:n=>{var e,t,i;return{position:B.ios?"absolute":((e=n.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((t=n.find(r=>r.parent))===null||t===void 0?void 0:t.parent)||null,tooltipSpace:((i=n.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||_v}}}),mh=Z.fromClass(class{constructor(n){var e;this.view=n,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let t=n.state.facet(ys);this.position=t.position,this.parent=t.parent,this.classes=n.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new ph(n,ws,i=>this.createTooltip(i)),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(i=>{Date.now()>this.lastTransaction-50&&i.length>0&&i[i.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),(e=n.dom.ownerDocument.defaultView)===null||e===void 0||e.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let n of this.manager.tooltipViews)this.intersectionObserver.observe(n.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(n){n.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(n);e&&this.observeIntersection();let t=e||n.geometryChanged,i=n.state.facet(ys);if(i.position!=this.position){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;t=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);t=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);t&&this.maybeMeasure()}createTooltip(n){let e=n.create(this.view);if(e.dom.classList.add("cm-tooltip"),n.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",e.dom.appendChild(t)}return e.dom.style.position=this.position,e.dom.style.top=gs,this.container.appendChild(e.dom),e.mount&&e.mount(this.view),e}destroy(){var n,e;(n=this.view.dom.ownerDocument.defaultView)===null||n===void 0||n.removeEventListener("resize",this.measureSoon);for(let{dom:t}of this.manager.tooltipViews)t.remove();(e=this.intersectionObserver)===null||e===void 0||e.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let n=this.view.dom.getBoundingClientRect();return{editor:n,parent:this.parent?this.container.getBoundingClientRect():n,pos:this.manager.tooltips.map((e,t)=>{let i=this.manager.tooltipViews[t];return i.getCoords?i.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(ys).tooltipSpace(this.view)}}writeMeasure(n){let{editor:e,space:t}=n,i=[];for(let r=0;r<this.manager.tooltips.length;r++){let s=this.manager.tooltips[r],o=this.manager.tooltipViews[r],{dom:l}=o,a=n.pos[r],h=n.size[r];if(!a||a.bottom<=Math.max(e.top,t.top)||a.top>=Math.min(e.bottom,t.bottom)||a.right<Math.max(e.left,t.left)-.1||a.left>Math.min(e.right,t.right)+.1){l.style.top=gs;continue}let f=s.arrow?o.dom.querySelector(".cm-tooltip-arrow"):null,u=f?7:0,d=h.right-h.left,p=h.bottom-h.top,m=o.offset||Av,g=this.view.textDirection==G.LTR,y=h.width>t.right-t.left?g?t.left:t.right-h.width:g?Math.min(a.left-(f?14:0)+m.x,t.right-d):Math.max(t.left,a.left-d+(f?14:0)-m.x),w=!!s.above;!s.strictSide&&(w?a.top-(h.bottom-h.top)-m.y<t.top:a.bottom+(h.bottom-h.top)+m.y>t.bottom)&&w==t.bottom-a.bottom>a.top-t.top&&(w=!w);let v=w?a.top-p-u-m.y:a.bottom+u+m.y,S=y+d;if(o.overlap!==!0)for(let x of i)x.left<S&&x.right>y&&x.top<v+p&&x.bottom>v&&(v=w?x.top-p-2-u:x.bottom+u+2);this.position=="absolute"?(l.style.top=v-n.parent.top+"px",l.style.left=y-n.parent.left+"px"):(l.style.top=v+"px",l.style.left=y+"px"),f&&(f.style.left=`${a.left+(g?m.x:-m.x)-(y+14-7)}px`),o.overlap!==!0&&i.push({left:y,top:v,right:S,bottom:v+p}),l.classList.toggle("cm-tooltip-above",w),l.classList.toggle("cm-tooltip-below",!w),o.positioned&&o.positioned()}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let n of this.manager.tooltipViews)n.dom.style.top=gs}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),Mv=P.baseTheme({".cm-tooltip":{zIndex:100},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:`${7}px`,width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:`${7}px solid transparent`,borderRight:`${7}px solid transparent`},".cm-tooltip-above &":{bottom:`-${7}px`,"&:before":{borderTop:`${7}px solid #bbb`},"&:after":{borderTop:`${7}px solid #f5f5f5`,bottom:"1px"}},".cm-tooltip-below &":{top:`-${7}px`,"&:before":{borderBottom:`${7}px solid #bbb`},"&:after":{borderBottom:`${7}px solid #f5f5f5`,top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Av={x:0,y:0},ws=E.define({enables:[mh,Mv]}),Si=E.define();class bs{constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new ph(e,Si,t=>this.createHostedView(t))}static create(e){return new bs(e)}createHostedView(e){let t=e.create(this.view);return t.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(t.dom),this.mounted&&t.mount&&t.mount(this.view),t}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(){for(let e of this.manager.tooltipViews)e.positioned&&e.positioned()}update(e){this.manager.update(e)}}const Ov=ws.compute([Si],n=>{let e=n.facet(Si).filter(t=>t);return e.length===0?null:{pos:Math.min(...e.map(t=>t.pos)),end:Math.max(...e.filter(t=>t.end!=null).map(t=>t.end)),create:bs.create,above:e[0].above,arrow:e.some(t=>t.arrow)}});class Bv{constructor(e,t,i,r,s){this.view=e,this.source=t,this.field=i,this.setHover=r,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{lastMove:e}=this,t=this.view.contentDOM.contains(e.target)?this.view.posAtCoords(e):null;if(t==null)return;let i=this.view.coordsAtPos(t);if(i==null||e.y<i.top||e.y>i.bottom||e.x<i.left-this.view.defaultCharacterWidth||e.x>i.right+this.view.defaultCharacterWidth)return;let r=this.view.bidiSpans(this.view.state.doc.lineAt(t)).find(l=>l.from<=t&&l.to>=t),s=r&&r.dir==G.RTL?-1:1,o=this.source(this.view,t,e.x<i.left?-s:s);if(o!=null&&o.then){let l=this.pending={pos:t};o.then(a=>{this.pending==l&&(this.pending=null,a&&this.view.dispatch({effects:this.setHover.of(a)}))},a=>Ae(this.view.state,a,"hover tooltip"))}else o&&this.view.dispatch({effects:this.setHover.of(o)})}mousemove(e){var t;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let i=this.active;if(i&&!Ev(this.lastMove.target)||this.pending){let{pos:r}=i||this.pending,s=(t=i==null?void 0:i.end)!==null&&t!==void 0?t:r;(r==s?this.view.posAtCoords(this.lastMove)!=r:!Pv(this.view,r,s,e.clientX,e.clientY,6))&&(this.view.dispatch({effects:this.setHover.of(null)}),this.pending=null)}}mouseleave(){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1,this.active&&this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}function Ev(n){for(let e=n;e;e=e.parentNode)if(e.nodeType==1&&e.classList.contains("cm-tooltip"))return!0;return!1}function Pv(n,e,t,i,r,s){let o=document.createRange(),l=n.domAtPos(e),a=n.domAtPos(t);o.setEnd(a.node,a.offset),o.setStart(l.node,l.offset);let h=o.getClientRects();o.detach();for(let f=0;f<h.length;f++){let u=h[f];if(Math.max(u.top-r,r-u.bottom,u.left-i,i-u.right)<=s)return!0}return!1}function Dv(n,e={}){let t=T.define(),i=se.define({create(){return null},update(r,s){if(r&&(e.hideOnChange&&(s.docChanged||s.selection)||e.hideOn&&e.hideOn(s,r)))return null;if(r&&s.docChanged){let o=s.changes.mapPos(r.pos,-1,me.TrackDel);if(o==null)return null;let l=Object.assign(Object.create(null),r);l.pos=o,r.end!=null&&(l.end=s.changes.mapPos(r.end)),r=l}for(let o of s.effects)o.is(t)&&(r=o.value),o.is(Tv)&&(r=null);return r},provide:r=>Si.from(r)});return[i,Z.define(r=>new Bv(r,n,i,t,e.hoverTime||300)),Ov]}function $v(n,e){let t=n.plugin(mh);if(!t)return null;let i=t.manager.tooltips.indexOf(e);return i<0?null:t.manager.tooltipViews[i]}const Tv=T.define(),gh=E.define({combine(n){let e,t;for(let i of n)e=e||i.topContainer,t=t||i.bottomContainer;return{topContainer:e,bottomContainer:t}}});function On(n,e){let t=n.plugin(yh),i=t?t.specs.indexOf(e):-1;return i>-1?t.panels[i]:null}const yh=Z.fromClass(class{constructor(n){this.input=n.state.facet(Bn),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(gh);this.top=new Ci(n,!0,e.topContainer),this.bottom=new Ci(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(gh);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Ci(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Ci(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(Bn);if(t!=this.input){let i=t.filter(a=>a),r=[],s=[],o=[],l=[];for(let a of i){let h=this.specs.indexOf(a),f;h<0?(f=a(n.view),l.push(f)):(f=this.panels[h],f.update&&f.update(n)),r.push(f),(f.top?s:o).push(f)}this.specs=i,this.panels=r,this.top.sync(s),this.bottom.sync(o);for(let a of l)a.dom.classList.add("cm-panel"),a.mount&&a.mount()}else for(let i of this.panels)i.update&&i.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>P.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class Ci{constructor(e,t,i){this.view=e,this.top=t,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=wh(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=wh(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function wh(n){let e=n.nextSibling;return n.remove(),e}const Bn=E.define({enables:yh});class it extends Bt{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}it.prototype.elementClass="",it.prototype.toDOM=void 0,it.prototype.mapMode=me.TrackBefore,it.prototype.startSide=it.prototype.endSide=-1,it.prototype.point=!0;const _i=E.define(),Lv={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>z.empty,lineMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},En=E.define();function Vv(n){return[bh(),En.of(Object.assign(Object.assign({},Lv),n))]}const vs=E.define({combine:n=>n.some(e=>e)});function bh(n){let e=[Rv];return n&&n.fixed===!1&&e.push(vs.of(!0)),e}const Rv=Z.fromClass(class{constructor(n){this.view=n,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight+"px",this.gutters=n.state.facet(En).map(e=>new kh(n,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!n.state.facet(vs),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,i=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(i<(t.to-t.from)*.8)}n.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(vs)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&this.dom.remove();let t=z.iter(this.view.state.facet(_i),this.view.viewport.from),i=[],r=this.gutters.map(s=>new Iv(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks){let o;if(Array.isArray(s.type)){for(let l of s.type)if(l.type==W.Text){o=l;break}}else o=s.type==W.Text?s:void 0;if(!!o){i.length&&(i=[]),xh(t,i,s.from);for(let l of r)l.line(this.view,o,i)}}for(let s of r)s.finish();n&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(n){let e=n.startState.facet(En),t=n.state.facet(En),i=n.docChanged||n.heightChanged||n.viewportChanged||!z.eq(n.startState.facet(_i),n.state.facet(_i),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let r of this.gutters)r.update(n)&&(i=!0);else{i=!0;let r=[];for(let s of t){let o=e.indexOf(s);o<0?r.push(new kh(this.view,s)):(this.gutters[o].update(n),r.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),r.indexOf(s)<0&&s.destroy();for(let s of r)this.dom.appendChild(s.dom);this.gutters=r}return i}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove()}},{provide:n=>P.scrollMargins.of(e=>{let t=e.plugin(n);return!t||t.gutters.length==0||!t.fixed?null:e.textDirection==G.LTR?{left:t.dom.offsetWidth}:{right:t.dom.offsetWidth}})});function vh(n){return Array.isArray(n)?n:[n]}function xh(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class Iv{constructor(e,t,i){this.gutter=e,this.height=i,this.localMarkers=[],this.i=0,this.cursor=z.iter(e.markers,t.from)}line(e,t,i){this.localMarkers.length&&(this.localMarkers=[]),xh(this.cursor,this.localMarkers,t.from);let r=i.length?this.localMarkers.concat(i):this.localMarkers,s=this.gutter.config.lineMarker(e,t,r);s&&r.unshift(s);let o=this.gutter;if(r.length==0&&!o.config.renderEmptyElements)return;let l=t.top-this.height;if(this.i==o.elements.length){let a=new Sh(e,t.height,l,r);o.elements.push(a),o.dom.appendChild(a.dom)}else o.elements[this.i].update(e,t.height,l,r);this.height=t.bottom,this.i++}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class kh{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in t.domEventHandlers)this.dom.addEventListener(i,r=>{let s=e.lineBlockAtHeight(r.clientY-e.documentTop);t.domEventHandlers[i](e,s,r)&&r.preventDefault()});this.markers=vh(t.markers(e)),t.initialSpacer&&(this.spacer=new Sh(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=vh(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let i=e.view.viewport;return!z.eq(this.markers,t,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class Sh{constructor(e,t,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,i,r)}update(e,t,i,r){this.height!=t&&(this.dom.style.height=(this.height=t)+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),Nv(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,t){let i="cm-gutterElement",r=this.dom.firstChild;for(let s=0,o=0;;){let l=o,a=s<t.length?t[s++]:null,h=!1;if(a){let f=a.elementClass;f&&(i+=" "+f);for(let u=o;u<this.markers.length;u++)if(this.markers[u].compare(a)){l=u,h=!0;break}}else l=this.markers.length;for(;o<l;){let f=this.markers[o++];if(f.toDOM){f.destroy(r);let u=r.nextSibling;r.remove(),r=u}}if(!a)break;a.toDOM&&(h?r=r.nextSibling:this.dom.insertBefore(a.toDOM(e),r)),h&&o++}this.dom.className=i,this.markers=t}destroy(){this.setMarkers(null,[])}}function Nv(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].compare(e[t]))return!1;return!0}const zv=E.define(),Yt=E.define({combine(n){return tt(n,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let i=Object.assign({},e);for(let r in t){let s=i[r],o=t[r];i[r]=s?(l,a,h)=>s(l,a,h)||o(l,a,h):o}return i}})}});class xs extends it{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function ks(n,e){return n.state.facet(Yt).formatNumber(e,n.state)}const Hv=En.compute([Yt],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(zv)},lineMarker(e,t,i){return i.some(r=>r.toDOM)?null:new xs(ks(e,e.state.doc.lineAt(t.from).number))},lineMarkerChange:e=>e.startState.facet(Yt)!=e.state.facet(Yt),initialSpacer(e){return new xs(ks(e,Ch(e.state.doc.lines)))},updateSpacer(e,t){let i=ks(t.view,Ch(t.view.state.doc.lines));return i==e.number?e:new xs(i)},domEventHandlers:n.facet(Yt).domEventHandlers}));function Fv(n={}){return[Yt.of(n),bh(),Hv]}function Ch(n){let e=9;for(;e<n;)e=e*10+9;return e}const Wv=new class extends it{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},jv=_i.compute(["selection"],n=>{let e=[],t=-1;for(let i of n.selection.ranges)if(i.empty){let r=n.doc.lineAt(i.head).from;r>t&&(t=r,e.push(Wv.range(r)))}return z.of(e)});function Uv(){return jv}const qv=1024;let Kv=0;class Ss{constructor(e,t){this.from=e,this.to=t}}class V{constructor(e={}){this.id=Kv++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=xe.match(e)),t=>{let i=e(t);return i===void 0?null:[this,i]}}}V.closedBy=new V({deserialize:n=>n.split(" ")}),V.openedBy=new V({deserialize:n=>n.split(" ")}),V.group=new V({deserialize:n=>n.split(" ")}),V.contextHash=new V({perNode:!0}),V.lookAhead=new V({perNode:!0}),V.mounted=new V({perNode:!0});const Gv=Object.create(null);class xe{constructor(e,t,i,r=0){this.name=e,this.props=t,this.id=i,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):Gv,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new xe(e.name||"",t,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(V.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let i in e)for(let r of i.split(" "))t[r]=e[i];return i=>{for(let r=i.prop(V.group),s=-1;s<(r?r.length:0);s++){let o=t[s<0?i.name:r[s]];if(o)return o}}}}xe.none=new xe("",Object.create(null),0,8);class Cs{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let i of this.types){let r=null;for(let s of e){let o=s(i);o&&(r||(r=Object.assign({},i.props)),r[o[0].id]=o[1])}t.push(r?new xe(i.name,r,i.id,i.flags):i)}return new Cs(t)}}const Mi=new WeakMap,_h=new WeakMap;var ue;(function(n){n[n.ExcludeBuffers=1]="ExcludeBuffers",n[n.IncludeAnonymous=2]="IncludeAnonymous",n[n.IgnoreMounts=4]="IgnoreMounts",n[n.IgnoreOverlays=8]="IgnoreOverlays"})(ue||(ue={}));class J{constructor(e,t,i,r,s){if(this.type=e,this.children=t,this.positions=i,this.length=r,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=this.prop(V.mounted);if(e&&!e.overlay)return e.tree.toString();let t="";for(let i of this.children){let r=i.toString();r&&(t&&(t+=","),t+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new Bi(this.topNode,e)}cursorAt(e,t=0,i=0){let r=Mi.get(this)||this.topNode,s=new Bi(r);return s.moveTo(e,t),Mi.set(this,s._tree),s}get topNode(){return new rt(this,0,0,null)}resolve(e,t=0){let i=Jt(Mi.get(this)||this.topNode,e,t,!1);return Mi.set(this,i),i}resolveInner(e,t=0){let i=Jt(_h.get(this)||this.topNode,e,t,!0);return _h.set(this,i),i}iterate(e){let{enter:t,leave:i,from:r=0,to:s=this.length}=e;for(let o=this.cursor((e.mode||0)|ue.IncludeAnonymous);;){let l=!1;if(o.from<=s&&o.to>=r&&(o.type.isAnonymous||t(o)!==!1)){if(o.firstChild())continue;l=!0}for(;l&&i&&!o.type.isAnonymous&&i(o),!o.nextSibling();){if(!o.parent())return;l=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:As(xe.none,this.children,this.positions,0,this.children.length,0,this.length,(t,i,r)=>new J(this.type,t,i,r,this.propValues),e.makeTree||((t,i,r)=>new J(xe.none,t,i,r)))}static build(e){return Jv(e)}}J.empty=new J(xe.none,[],[],0);class _s{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new _s(this.buffer,this.index)}}class Dt{constructor(e,t,i){this.buffer=e,this.length=t,this.set=i}get type(){return xe.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],i=this.buffer[e+3],r=this.set.types[t],s=r.name;if(/\W/.test(s)&&!r.isError&&(s=JSON.stringify(s)),e+=4,i==e)return s;let o=[];for(;e<i;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,t,i,r,s){let{buffer:o}=this,l=-1;for(let a=e;a!=t&&!(Mh(s,r,o[a+1],o[a+2])&&(l=a,i>0));a=o[a+3]);return l}slice(e,t,i,r){let s=this.buffer,o=new Uint16Array(t-e);for(let l=e,a=0;l<t;)o[a++]=s[l++],o[a++]=s[l++]-i,o[a++]=s[l++]-i,o[a++]=s[l++]-e;return new Dt(o,r-i,this.set)}}function Mh(n,e,t,i){switch(n){case-2:return t<e;case-1:return i>=e&&t<e;case 0:return t<e&&i>e;case 1:return t<=e&&i>e;case 2:return i>e;case 4:return!0}}function Ah(n,e){let t=n.childBefore(e);for(;t;){let i=t.lastChild;if(!i||i.to!=t.to)break;i.type.isError&&i.from==i.to?(n=t,t=i.prevSibling):t=i}return n}function Jt(n,e,t,i){for(var r;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to<e);){let o=!i&&n instanceof rt&&n.index<0?null:n.parent;if(!o)return n;n=o}let s=i?0:ue.IgnoreOverlays;if(i)for(let o=n,l=o.parent;l;o=l,l=o.parent)o instanceof rt&&o.index<0&&((r=l.enter(e,t,s))===null||r===void 0?void 0:r.from)!=o.from&&(n=l);for(;;){let o=n.enter(e,t,s);if(!o)return n;n=o}}class rt{constructor(e,t,i,r){this._tree=e,this.from=t,this.index=i,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,i,r,s=0){for(let o=this;;){for(let{children:l,positions:a}=o._tree,h=t>0?l.length:-1;e!=h;e+=t){let f=l[e],u=a[e]+o.from;if(!!Mh(r,i,u,u+f.length)){if(f instanceof Dt){if(s&ue.ExcludeBuffers)continue;let d=f.findChild(0,f.buffer.length,t,i-u,r);if(d>-1)return new bt(new Yv(o,f,e,u),null,d)}else if(s&ue.IncludeAnonymous||!f.type.isAnonymous||Ms(f)){let d;if(!(s&ue.IgnoreMounts)&&f.props&&(d=f.prop(V.mounted))&&!d.overlay)return new rt(d.tree,u,e,o);let p=new rt(f,u,e,o);return s&ue.IncludeAnonymous||!p.type.isAnonymous?p:p.nextChild(t<0?f.children.length-1:0,t,i,r)}}}if(s&ue.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,i=0){let r;if(!(i&ue.IgnoreOverlays)&&(r=this._tree.prop(V.mounted))&&r.overlay){let s=e-this.from;for(let{from:o,to:l}of r.overlay)if((t>0?o<=s:o<s)&&(t<0?l>=s:l>s))return new rt(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}cursor(e=0){return new Bi(this,e)}get tree(){return this._tree}toTree(){return this._tree}resolve(e,t=0){return Jt(this,e,t,!1)}resolveInner(e,t=0){return Jt(this,e,t,!0)}enterUnfinishedNodesBefore(e){return Ah(this,e)}getChild(e,t=null,i=null){let r=Ai(this,e,t,i);return r.length?r[0]:null}getChildren(e,t=null,i=null){return Ai(this,e,t,i)}toString(){return this._tree.toString()}get node(){return this}matchContext(e){return Oi(this,e)}}function Ai(n,e,t,i){let r=n.cursor(),s=[];if(!r.firstChild())return s;if(t!=null){for(;!r.type.is(t);)if(!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function Oi(n,e,t=e.length-1){for(let i=n.parent;t>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[t]&&e[t]!=i.name)return!1;t--}}return!0}class Yv{constructor(e,t,i,r){this.parent=e,this.buffer=t,this.index=i,this.start=r}}class bt{constructor(e,t,i){this.context=e,this._parent=t,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}child(e,t,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,i);return s<0?null:new bt(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,i=0){if(i&ue.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new bt(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new bt(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new bt(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}cursor(e=0){return new Bi(this,e)}get tree(){return null}toTree(){let e=[],t=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let o=i.buffer[this.index+1],l=i.buffer[this.index+2];e.push(i.slice(r,s,o,l)),t.push(0)}return new J(this.type,e,t,this.to-this.from)}resolve(e,t=0){return Jt(this,e,t,!1)}resolveInner(e,t=0){return Jt(this,e,t,!0)}enterUnfinishedNodesBefore(e){return Ah(this,e)}toString(){return this.context.buffer.childString(this.index)}getChild(e,t=null,i=null){let r=Ai(this,e,t,i);return r.length?r[0]:null}getChildren(e,t=null,i=null){return Ai(this,e,t,i)}get node(){return this}matchContext(e){return Oi(this,e)}}class Bi{constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof rt)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}get name(){return this.type.name}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof rt?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,i=this.mode){return this.buffer?i&ue.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&ue.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&ue.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(t.findChild(r,this.index,-1,0,4))}else{let r=t.buffer[this.index+3];if(r<(i<0?t.buffer.length:t.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,i,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(r.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:i}=r)}else({index:t,_parent:i}=this._tree);for(;i;{index:t,_parent:i}=i)if(t>-1)for(let s=t+e,o=e<0?-1:i._tree.children.length;s!=o;s+=e){let l=i._tree.children[s];if(this.mode&ue.IncludeAnonymous||l instanceof Dt||!l.type.isAnonymous||Ms(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,i=0;if(e&&e.context==this.buffer){e:for(let r=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,i=s+1;break e}r=this.stack[--s]}}for(let r=i;r<this.stack.length;r++)t=new bt(this.buffer,t,this.stack[r]);return this.bufferNode=new bt(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let i=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(r=!0)}for(;r&&t&&t(this),r=this.type.isAnonymous,!this.nextSibling();){if(!i)return;this.parent(),i--,r=!0}}}matchContext(e){if(!this.buffer)return Oi(this.node,e);let{buffer:t}=this.buffer,{types:i}=t.set;for(let r=e.length-1,s=this.stack.length-1;r>=0;s--){if(s<0)return Oi(this.node,e,r);let o=i[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function Ms(n){return n.children.some(e=>e instanceof Dt||!e.type.isAnonymous||Ms(e))}function Jv(n){var e;let{buffer:t,nodeSet:i,maxBufferLength:r=qv,reused:s=[],minRepeatType:o=i.types.length}=n,l=Array.isArray(t)?new _s(t,t.length):t,a=i.types,h=0,f=0;function u(x,C,b,O,K){let{id:I,start:L,end:H,size:X}=l,ee=f;for(;X<0;)if(l.next(),X==-1){let he=s[I];b.push(he),O.push(L-x);return}else if(X==-3){h=I;return}else if(X==-4){f=I;return}else throw new RangeError(`Unrecognized record size: ${X}`);let Ee=a[I],de,we,Ne=L-x;if(H-L<=r&&(we=g(l.pos-C,K))){let he=new Uint16Array(we.size-we.skip),ze=l.pos-we.size,ot=he.length;for(;l.pos>ze;)ot=y(we.start,he,ot);de=new Dt(he,H-we.start,i),Ne=we.start-x}else{let he=l.pos-X;l.next();let ze=[],ot=[],Nt=I>=o?I:-1,ln=0,sr=H;for(;l.pos>he;)Nt>=0&&l.id==Nt&&l.size>=0?(l.end<=sr-r&&(p(ze,ot,L,ln,l.end,sr,Nt,ee),ln=ze.length,sr=l.end),l.next()):u(L,he,ze,ot,Nt);if(Nt>=0&&ln>0&&ln<ze.length&&p(ze,ot,L,ln,L,sr,Nt,ee),ze.reverse(),ot.reverse(),Nt>-1&&ln>0){let Du=d(Ee);de=As(Ee,ze,ot,0,ze.length,0,H-L,Du,Du)}else de=m(Ee,ze,ot,H-L,ee-H)}b.push(de),O.push(Ne)}function d(x){return(C,b,O)=>{let K=0,I=C.length-1,L,H;if(I>=0&&(L=C[I])instanceof J){if(!I&&L.type==x&&L.length==O)return L;(H=L.prop(V.lookAhead))&&(K=b[I]+L.length+H)}return m(x,C,b,O,K)}}function p(x,C,b,O,K,I,L,H){let X=[],ee=[];for(;x.length>O;)X.push(x.pop()),ee.push(C.pop()+b-K);x.push(m(i.types[L],X,ee,I-K,H-I)),C.push(K-b)}function m(x,C,b,O,K=0,I){if(h){let L=[V.contextHash,h];I=I?[L].concat(I):[L]}if(K>25){let L=[V.lookAhead,K];I=I?[L].concat(I):[L]}return new J(x,C,b,O,I)}function g(x,C){let b=l.fork(),O=0,K=0,I=0,L=b.end-r,H={size:0,start:0,skip:0};e:for(let X=b.pos-x;b.pos>X;){let ee=b.size;if(b.id==C&&ee>=0){H.size=O,H.start=K,H.skip=I,I+=4,O+=4,b.next();continue}let Ee=b.pos-ee;if(ee<0||Ee<X||b.start<L)break;let de=b.id>=o?4:0,we=b.start;for(b.next();b.pos>Ee;){if(b.size<0)if(b.size==-3)de+=4;else break e;else b.id>=o&&(de+=4);b.next()}K=we,O+=ee,I+=de}return(C<0||O==x)&&(H.size=O,H.start=K,H.skip=I),H.size>4?H:void 0}function y(x,C,b){let{id:O,start:K,end:I,size:L}=l;if(l.next(),L>=0&&O<o){let H=b;if(L>4){let X=l.pos-(L-4);for(;l.pos>X;)b=y(x,C,b)}C[--b]=H,C[--b]=I-x,C[--b]=K-x,C[--b]=O}else L==-3?h=O:L==-4&&(f=O);return b}let w=[],v=[];for(;l.pos>0;)u(n.start||0,n.bufferStart||0,w,v,-1);let S=(e=n.length)!==null&&e!==void 0?e:w.length?v[0]+w[0].length:0;return new J(a[n.topID],w.reverse(),v.reverse(),S)}const Oh=new WeakMap;function Ei(n,e){if(!n.isAnonymous||e instanceof Dt||e.type!=n)return 1;let t=Oh.get(e);if(t==null){t=1;for(let i of e.children){if(i.type!=n||!(i instanceof J)){t=1;break}t+=Ei(n,i)}Oh.set(e,t)}return t}function As(n,e,t,i,r,s,o,l,a){let h=0;for(let m=i;m<r;m++)h+=Ei(n,e[m]);let f=Math.ceil(h*1.5/8),u=[],d=[];function p(m,g,y,w,v){for(let S=y;S<w;){let x=S,C=g[S],b=Ei(n,m[S]);for(S++;S<w;S++){let O=Ei(n,m[S]);if(b+O>=f)break;b+=O}if(S==x+1){if(b>f){let O=m[x];p(O.children,O.positions,0,O.children.length,g[x]+v);continue}u.push(m[x])}else{let O=g[S-1]+m[S-1].length-C;u.push(As(n,m,g,x,S,C,O,null,a))}d.push(C+v-s)}}return p(e,t,i,r,0),(l||a)(u,d,o)}class $t{constructor(e,t,i,r,s=!1,o=!1){this.from=e,this.to=t,this.tree=i,this.offset=r,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],i=!1){let r=[new $t(0,e.length,e,0,!1,i)];for(let s of t)s.to>e.length&&r.push(s);return r}static applyChanges(e,t,i=128){if(!t.length)return e;let r=[],s=1,o=e.length?e[0]:null;for(let l=0,a=0,h=0;;l++){let f=l<t.length?t[l]:null,u=f?f.fromA:1e9;if(u-a>=i)for(;o&&o.from<u;){let d=o;if(a>=d.from||u<=d.to||h){let p=Math.max(d.from,a)-h,m=Math.min(d.to,u)-h;d=p>=m?null:new $t(p,m,d.tree,d.offset+h,l>0,!!f)}if(d&&r.push(d),o.to>u)break;o=s<e.length?e[s++]:null}if(!f)break;a=f.toA,h=f.toA-f.toB}return r}}class Bh{startParse(e,t,i){return typeof e=="string"&&(e=new Xv(e)),i=i?i.length?i.map(r=>new Ss(r.from,r.to)):[new Ss(0,0)]:[new Ss(0,e.length)],this.createParse(e,t||[],i)}parse(e,t,i){let r=this.startParse(e,t,i);for(;;){let s=r.advance();if(s)return s}}}class Xv{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}new V({perNode:!0});let Qv=0;class qe{constructor(e,t,i){this.set=e,this.base=t,this.modified=i,this.id=Qv++}static define(e){if(e!=null&&e.base)throw new Error("Can not derive from a modified tag");let t=new qe([],null,[]);if(t.set.push(t),e)for(let i of e.set)t.set.push(i);return t}static defineModifier(){let e=new Pi;return t=>t.modified.indexOf(e)>-1?t:Pi.get(t.base||t,t.modified.concat(e).sort((i,r)=>i.id-r.id))}}let Zv=0;class Pi{constructor(){this.instances=[],this.id=Zv++}static get(e,t){if(!t.length)return e;let i=t[0].instances.find(l=>l.base==e&&ex(t,l.modified));if(i)return i;let r=[],s=new qe(r,e,t);for(let l of t)l.instances.push(s);let o=Eh(t);for(let l of e.set)for(let a of o)r.push(Pi.get(l,a));return s}}function ex(n,e){return n.length==e.length&&n.every((t,i)=>t==e[i])}function Eh(n){let e=[n];for(let t=0;t<n.length;t++)for(let i of Eh(n.slice(0,t).concat(n.slice(t+1))))e.push(i);return e}function tx(n){let e=Object.create(null);for(let t in n){let i=n[t];Array.isArray(i)||(i=[i]);for(let r of t.split(" "))if(r){let s=[],o=2,l=r;for(let u=0;;){if(l=="..."&&u>0&&u+3==r.length){o=1;break}let d=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!d)throw new RangeError("Invalid path: "+r);if(s.push(d[0]=="*"?"":d[0][0]=='"'?JSON.parse(d[0]):d[0]),u+=d[0].length,u==r.length)break;let p=r[u++];if(u==r.length&&p=="!"){o=0;break}if(p!="/")throw new RangeError("Invalid path: "+r);l=r.slice(u)}let a=s.length-1,h=s[a];if(!h)throw new RangeError("Invalid path: "+r);let f=new nx(i,o,a>0?s.slice(0,a):null);e[h]=f.sort(e[h])}}return Ph.add(e)}const Ph=new V;class nx{constructor(e,t,i,r){this.tags=e,this.mode=t,this.context=i,this.next=r}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}function Dh(n,e){let t=Object.create(null);for(let s of n)if(!Array.isArray(s.tag))t[s.tag.id]=s.class;else for(let o of s.tag)t[o.id]=s.class;let{scope:i,all:r=null}=e||{};return{style:s=>{let o=r;for(let l of s)for(let a of l.set){let h=t[a.id];if(h){o=o?o+" "+h:h;break}}return o},scope:i}}function ix(n,e){let t=null;for(let i of n){let r=i.style(e);r&&(t=t?t+" "+r:r)}return t}function rx(n,e,t,i=0,r=n.length){let s=new sx(i,Array.isArray(e)?e:[e],t);s.highlightRange(n.cursor(),i,r,"",s.highlighters),s.flush(r)}class sx{constructor(e,t,i){this.at=e,this.highlighters=t,this.span=i,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,i,r,s){let{type:o,from:l,to:a}=e;if(l>=i||a<=t)return;o.isTop&&(s=this.highlighters.filter(p=>!p.scope||p.scope(o)));let h=r,f=o.prop(Ph),u=!1;for(;f;){if(!f.context||e.matchContext(f.context)){let p=ix(s,f.tags);p&&(h&&(h+=" "),h+=p,f.mode==1?r+=(r?" ":"")+p:f.mode==0&&(u=!0));break}f=f.next}if(this.startSpan(e.from,h),u)return;let d=e.tree&&e.tree.prop(V.mounted);if(d&&d.overlay){let p=e.node.enter(d.overlay[0].from+l,1),m=this.highlighters.filter(y=>!y.scope||y.scope(d.tree.type)),g=e.firstChild();for(let y=0,w=l;;y++){let v=y<d.overlay.length?d.overlay[y]:null,S=v?v.from+l:a,x=Math.max(t,w),C=Math.min(i,S);if(x<C&&g)for(;e.from<C&&(this.highlightRange(e,x,C,r,s),this.startSpan(Math.min(i,e.to),h),!(e.to>=S||!e.nextSibling())););if(!v||S>i)break;w=v.to+l,w>t&&(this.highlightRange(p.cursor(),Math.max(t,v.from+l),Math.min(i,w),r,m),this.startSpan(w,h))}g&&e.parent()}else if(e.firstChild()){do if(!(e.to<=t)){if(e.from>=i)break;this.highlightRange(e,t,i,r,s),this.startSpan(Math.min(i,e.to),h)}while(e.nextSibling());e.parent()}}}const _=qe.define,Di=_(),vt=_(),$h=_(vt),Th=_(vt),xt=_(),$i=_(xt),Os=_(xt),Ke=_(),Tt=_(Ke),Ge=_(),Ye=_(),Bs=_(),Pn=_(Bs),Ti=_(),A={comment:Di,lineComment:_(Di),blockComment:_(Di),docComment:_(Di),name:vt,variableName:_(vt),typeName:$h,tagName:_($h),propertyName:Th,attributeName:_(Th),className:_(vt),labelName:_(vt),namespace:_(vt),macroName:_(vt),literal:xt,string:$i,docString:_($i),character:_($i),attributeValue:_($i),number:Os,integer:_(Os),float:_(Os),bool:_(xt),regexp:_(xt),escape:_(xt),color:_(xt),url:_(xt),keyword:Ge,self:_(Ge),null:_(Ge),atom:_(Ge),unit:_(Ge),modifier:_(Ge),operatorKeyword:_(Ge),controlKeyword:_(Ge),definitionKeyword:_(Ge),moduleKeyword:_(Ge),operator:Ye,derefOperator:_(Ye),arithmeticOperator:_(Ye),logicOperator:_(Ye),bitwiseOperator:_(Ye),compareOperator:_(Ye),updateOperator:_(Ye),definitionOperator:_(Ye),typeOperator:_(Ye),controlOperator:_(Ye),punctuation:Bs,separator:_(Bs),bracket:Pn,angleBracket:_(Pn),squareBracket:_(Pn),paren:_(Pn),brace:_(Pn),content:Ke,heading:Tt,heading1:_(Tt),heading2:_(Tt),heading3:_(Tt),heading4:_(Tt),heading5:_(Tt),heading6:_(Tt),contentSeparator:_(Ke),list:_(Ke),quote:_(Ke),emphasis:_(Ke),strong:_(Ke),link:_(Ke),monospace:_(Ke),strikethrough:_(Ke),inserted:_(),deleted:_(),changed:_(),invalid:_(),meta:Ti,documentMeta:_(Ti),annotation:_(Ti),processingInstruction:_(Ti),definition:qe.defineModifier(),constant:qe.defineModifier(),function:qe.defineModifier(),standard:qe.defineModifier(),local:qe.defineModifier(),special:qe.defineModifier()};Dh([{tag:A.link,class:"tok-link"},{tag:A.heading,class:"tok-heading"},{tag:A.emphasis,class:"tok-emphasis"},{tag:A.strong,class:"tok-strong"},{tag:A.keyword,class:"tok-keyword"},{tag:A.atom,class:"tok-atom"},{tag:A.bool,class:"tok-bool"},{tag:A.url,class:"tok-url"},{tag:A.labelName,class:"tok-labelName"},{tag:A.inserted,class:"tok-inserted"},{tag:A.deleted,class:"tok-deleted"},{tag:A.literal,class:"tok-literal"},{tag:A.string,class:"tok-string"},{tag:A.number,class:"tok-number"},{tag:[A.regexp,A.escape,A.special(A.string)],class:"tok-string2"},{tag:A.variableName,class:"tok-variableName"},{tag:A.local(A.variableName),class:"tok-variableName tok-local"},{tag:A.definition(A.variableName),class:"tok-variableName tok-definition"},{tag:A.special(A.variableName),class:"tok-variableName2"},{tag:A.definition(A.propertyName),class:"tok-propertyName tok-definition"},{tag:A.typeName,class:"tok-typeName"},{tag:A.namespace,class:"tok-namespace"},{tag:A.className,class:"tok-className"},{tag:A.macroName,class:"tok-macroName"},{tag:A.propertyName,class:"tok-propertyName"},{tag:A.operator,class:"tok-operator"},{tag:A.comment,class:"tok-comment"},{tag:A.meta,class:"tok-meta"},{tag:A.invalid,class:"tok-invalid"},{tag:A.punctuation,class:"tok-punctuation"}]);var Es;const Dn=new V;function ox(n){return E.define({combine:n?e=>e.concat(n):void 0})}class Ie{constructor(e,t,i=[]){this.data=e,R.prototype.hasOwnProperty("tree")||Object.defineProperty(R.prototype,"tree",{get(){return ce(this)}}),this.parser=t,this.extension=[kt.of(this),R.languageData.of((r,s,o)=>r.facet(Lh(r,s,o)))].concat(i)}isActiveAt(e,t,i=-1){return Lh(e,t,i)==this.data}findRegions(e){let t=e.facet(kt);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let i=[],r=(s,o)=>{if(s.prop(Dn)==this.data){i.push({from:o,to:o+s.length});return}let l=s.prop(V.mounted);if(l){if(l.tree.prop(Dn)==this.data){if(l.overlay)for(let a of l.overlay)i.push({from:a.from+o,to:a.to+o});else i.push({from:o,to:o+s.length});return}else if(l.overlay){let a=i.length;if(r(l.tree,l.overlay[0].from+o),i.length>a)return}}for(let a=0;a<s.children.length;a++){let h=s.children[a];h instanceof J&&r(h,s.positions[a]+o)}};return r(ce(e),0),i}get allowsNesting(){return!0}}Ie.setState=T.define();function Lh(n,e,t){let i=n.facet(kt);if(!i)return null;let r=i.data;if(i.allowsNesting)for(let s=ce(n).topNode;s;s=s.enter(e,t,ue.ExcludeBuffers))r=s.type.prop(Dn)||r;return r}function ce(n){let e=n.field(Ie.state,!1);return e?e.tree:J.empty}class lx{constructor(e,t=e.length){this.doc=e,this.length=t,this.cursorPos=0,this.string="",this.cursor=e.iter()}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let i=this.cursorPos-this.string.length;return e<i||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-i,t-i)}}let $n=null;class Xt{constructor(e,t,i=[],r,s,o,l,a){this.parser=e,this.state=t,this.fragments=i,this.tree=r,this.treeLen=s,this.viewport=o,this.skipped=l,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,i){return new Xt(e,t,[],J.empty,0,i,[],null)}startParse(){return this.parser.startParse(new lx(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=J.empty&&this.isDone(t!=null?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let r=this.parse.advance();if(r)if(this.fragments=this.withoutTempSkipped($t.addTree(r,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(i=this.parse.stoppedAt)!==null&&i!==void 0?i:this.state.doc.length,this.tree=r,this.parse=null,this.treeLen<(t!=null?t:this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped($t.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=$n;$n=this;try{return e()}finally{$n=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=Vh(e,t.from,t.to);return e}changes(e,t){let{fragments:i,tree:r,treeLen:s,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let a=[];if(e.iterChangedRanges((h,f,u,d)=>a.push({fromA:h,toA:f,fromB:u,toB:d})),i=$t.applyChanges(i,a),r=J.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let h of this.skipped){let f=e.mapPos(h.from,1),u=e.mapPos(h.to,-1);f<u&&l.push({from:f,to:u})}}}return new Xt(this.parser,t,i,r,s,o,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let i=0;i<this.skipped.length;i++){let{from:r,to:s}=this.skipped[i];r<e.to&&s>e.from&&(this.fragments=Vh(this.fragments,r,s),this.skipped.splice(i--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Bh{createParse(t,i,r){let s=r[0].from,o=r[r.length-1].to;return{parsedPos:s,advance(){let a=$n;if(a){for(let h of r)a.tempSkipped.push(h);e&&(a.scheduleOn=a.scheduleOn?Promise.all([a.scheduleOn,e]):e)}return this.parsedPos=o,new J(xe.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return $n}}function Vh(n,e,t){return $t.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class Qt{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,i)||t.takeTree(),new Qt(t)}static init(e){let t=Math.min(3e3,e.doc.length),i=Xt.create(e.facet(kt).parser,e,{from:0,to:t});return i.work(20,t)||i.takeTree(),new Qt(i)}}Ie.state=se.define({create:Qt.init,update(n,e){for(let t of e.effects)if(t.is(Ie.setState))return t.value;return e.startState.facet(kt)!=e.state.facet(kt)?Qt.init(e.state):n.apply(e)}});let Rh=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(Rh=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:500-100})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const Ps=typeof navigator<"u"&&((Es=navigator.scheduling)===null||Es===void 0?void 0:Es.isInputPending)?()=>navigator.scheduling.isInputPending():null,ax=Z.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(Ie.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),e.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Ie.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=Rh(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:i,viewport:{to:r}}=this.view,s=i.field(Ie.state);if(s.tree==s.context.tree&&s.context.isDone(r+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!Ps?Math.max(25,e.timeRemaining()-5):1e9),l=s.context.treeLen<r&&i.doc.length>r+1e3,a=s.context.work(()=>Ps&&Ps()||Date.now()>o,r+(l?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Ie.setState.of(new Qt(s.context))})),this.chunkBudget>0&&!(a&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>Ae(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),kt=E.define({combine(n){return n.length?n[0]:null},enables:[Ie.state,ax]}),Ih=E.define(),Ds=E.define({combine:n=>{if(!n.length)return" ";if(!/^(?: +|\t+)$/.test(n[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return n[0]}});function Lt(n){let e=n.facet(Ds);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function Tn(n,e){let t="",i=n.tabSize;if(n.facet(Ds).charCodeAt(0)==9)for(;e>=i;)t+=" ",e-=i;for(let r=0;r<e;r++)t+=" ";return t}function $s(n,e){n instanceof R&&(n=new Li(n));for(let i of n.state.facet(Ih)){let r=i(n,e);if(r!=null)return r}let t=ce(n.state);return t?hx(n,t,e):null}class Li{constructor(e,t={}){this.state=e,this.options=t,this.unit=Lt(e)}lineAt(e,t=1){let i=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:s}=this.options;return r!=null&&r>=i.from&&r<=i.to?s&&r==e?{text:"",from:e}:(t<0?r<e:r<=e)?{text:i.text.slice(r-i.from),from:r}:{text:i.text.slice(0,r-i.from),from:i.from}:i}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:i,from:r}=this.lineAt(e,t);return i.slice(e-r,Math.min(i.length,e+100-r))}column(e,t=1){let{text:i,from:r}=this.lineAt(e,t),s=this.countColumn(i,e-r),o=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return o>-1&&(s+=o-this.countColumn(i,i.search(/\S|$/))),s}countColumn(e,t=e.length){return yn(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:i,from:r}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let o=s(r);if(o>-1)return o}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const cx=new V;function hx(n,e,t){return Nh(e.resolveInner(t).enterUnfinishedNodesBefore(t),t,n)}function fx(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function ux(n){let e=n.type.prop(cx);if(e)return e;let t=n.firstChild,i;if(t&&(i=t.type.prop(V.closedBy))){let r=n.lastChild,s=r&&i.indexOf(r.name)>-1;return o=>gx(o,!0,1,void 0,s&&!fx(o)?r.from:void 0)}return n.parent==null?dx:null}function Nh(n,e,t){for(;n;n=n.parent){let i=ux(n);if(i)return i(Ts.create(t,e,n))}return null}function dx(){return 0}class Ts extends Li{constructor(e,t,i){super(e.state,e.options),this.base=e,this.pos=t,this.node=i}static create(e,t,i){return new Ts(e,t,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let e=this.state.doc.lineAt(this.node.from);for(;;){let t=this.node.resolve(e.from);for(;t.parent&&t.parent.from==t.from;)t=t.parent;if(px(t,this.node))break;e=this.state.doc.lineAt(t.from)}return this.lineIndent(e.from)}continue(){let e=this.node.parent;return e?Nh(e,this.pos,this.base):0}}function px(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function mx(n){let e=n.node,t=e.childAfter(e.from),i=e.lastChild;if(!t)return null;let r=n.options.simulateBreak,s=n.state.doc.lineAt(t.from),o=r==null||r<=s.from?s.to:Math.min(s.to,r);for(let l=t.to;;){let a=e.childAfter(l);if(!a||a==i)return null;if(!a.type.isSkipped)return a.from<o?t:null;l=a.to}}function gx(n,e,t,i,r){let s=n.textAfter,o=s.match(/^\s*/)[0].length,l=i&&s.slice(o,o+i.length)==i||r==n.pos+o,a=e?mx(n):null;return a?l?n.column(a.from):n.column(a.to):n.baseIndent+(l?0:n.unit*t)}const yx=200;function wx(){return R.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:i}=n.newSelection.main,r=t.lineAt(i);if(i>r.from+yx)return n;let s=t.sliceString(r.from,i);if(!e.some(h=>h.test(s)))return n;let{state:o}=n,l=-1,a=[];for(let{head:h}of o.selection.ranges){let f=o.doc.lineAt(h);if(f.from==l)continue;l=f.from;let u=$s(o,f.from);if(u==null)continue;let d=/^\s*/.exec(f.text)[0],p=Tn(o,u);d!=p&&a.push({from:f.from,to:f.from+d.length,insert:p})}return a.length?[n,{changes:a,sequential:!0}]:n})}const bx=E.define(),vx=new V;function xx(n,e,t){let i=ce(n);if(i.length<t)return null;let r=i.resolveInner(t),s=null;for(let o=r;o;o=o.parent){if(o.to<=t||o.from>t)continue;if(s&&o.from<e)break;let l=o.type.prop(vx);if(l&&(o.to<i.length-50||i.length==n.doc.length||!kx(o))){let a=l(o,n);a&&a.from<=t&&a.from>=e&&a.to>t&&(s=a)}}return s}function kx(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function Vi(n,e,t){for(let i of n.facet(bx)){let r=i(n,e,t);if(r)return r}return xx(n,e,t)}function zh(n,e){let t=e.mapPos(n.from,1),i=e.mapPos(n.to,-1);return t>=i?void 0:{from:t,to:i}}const Ri=T.define({map:zh}),Ln=T.define({map:zh});function Hh(n){let e=[];for(let{head:t}of n.state.selection.ranges)e.some(i=>i.from<=t&&i.to>=t)||e.push(n.lineBlockAt(t));return e}const Vt=se.define({create(){return $.none},update(n,e){n=n.map(e.changes);for(let t of e.effects)t.is(Ri)&&!Sx(n,t.value.from,t.value.to)?n=n.update({add:[qh.range(t.value.from,t.value.to)]}):t.is(Ln)&&(n=n.update({filter:(i,r)=>t.value.from!=i||t.value.to!=r,filterFrom:t.value.from,filterTo:t.value.to}));if(e.selection){let t=!1,{head:i}=e.selection.main;n.between(i,i,(r,s)=>{r<i&&s>i&&(t=!0)}),t&&(n=n.update({filterFrom:i,filterTo:i,filter:(r,s)=>s<=i||r>=i}))}return n},provide:n=>P.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(i,r)=>{t.push(i,r)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t<n.length;){let i=n[t++],r=n[t++];if(typeof i!="number"||typeof r!="number")throw new RangeError("Invalid JSON for fold state");e.push(qh.range(i,r))}return $.set(e,!0)}});function Ii(n,e,t){var i;let r=null;return(i=n.field(Vt,!1))===null||i===void 0||i.between(e,t,(s,o)=>{(!r||r.from>s)&&(r={from:s,to:o})}),r}function Sx(n,e,t){let i=!1;return n.between(e,e,(r,s)=>{r==e&&s==t&&(i=!0)}),i}function Fh(n,e){return n.field(Vt,!1)?e:e.concat(T.appendConfig.of(Uh()))}const Cx=n=>{for(let e of Hh(n)){let t=Vi(n.state,e.from,e.to);if(t)return n.dispatch({effects:Fh(n.state,[Ri.of(t),Wh(n,t)])}),!0}return!1},_x=n=>{if(!n.state.field(Vt,!1))return!1;let e=[];for(let t of Hh(n)){let i=Ii(n.state,t.from,t.to);i&&e.push(Ln.of(i),Wh(n,i,!1))}return e.length&&n.dispatch({effects:e}),e.length>0};function Wh(n,e,t=!0){let i=n.state.doc.lineAt(e.from).number,r=n.state.doc.lineAt(e.to).number;return P.announce.of(`${n.state.phrase(t?"Folded lines":"Unfolded lines")} ${i} ${n.state.phrase("to")} ${r}.`)}const Mx=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:Cx},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:_x},{key:"Ctrl-Alt-[",run:n=>{let{state:e}=n,t=[];for(let i=0;i<e.doc.length;){let r=n.lineBlockAt(i),s=Vi(e,r.from,r.to);s&&t.push(Ri.of(s)),i=(s?n.lineBlockAt(s.to):r).to+1}return t.length&&n.dispatch({effects:Fh(n.state,t)}),!!t.length}},{key:"Ctrl-Alt-]",run:n=>{let e=n.state.field(Vt,!1);if(!e||!e.size)return!1;let t=[];return e.between(0,n.state.doc.length,(i,r)=>{t.push(Ln.of({from:i,to:r}))}),n.dispatch({effects:t}),!0}}],Ax={placeholderDOM:null,placeholderText:"\u2026"},jh=E.define({combine(n){return tt(n,Ax)}});function Uh(n){let e=[Vt,Ex];return n&&e.push(jh.of(n)),e}const qh=$.replace({widget:new class extends mt{toDOM(n){let{state:e}=n,t=e.facet(jh),i=s=>{let o=n.lineBlockAt(n.posAtDOM(s.target)),l=Ii(n.state,o.from,o.to);l&&n.dispatch({effects:Ln.of(l)}),s.preventDefault()};if(t.placeholderDOM)return t.placeholderDOM(n,i);let r=document.createElement("span");return r.textContent=t.placeholderText,r.setAttribute("aria-label",e.phrase("folded code")),r.title=e.phrase("unfold"),r.className="cm-foldPlaceholder",r.onclick=i,r}}}),Ox={openText:"\u2304",closedText:"\u203A",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Ls extends it{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function Bx(n={}){let e=Object.assign(Object.assign({},Ox),n),t=new Ls(e,!0),i=new Ls(e,!1),r=Z.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(kt)!=o.state.facet(kt)||o.startState.field(Vt,!1)!=o.state.field(Vt,!1)||ce(o.startState)!=ce(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let l=new ht;for(let a of o.viewportLineBlocks){let h=Ii(o.state,a.from,a.to)?i:Vi(o.state,a.from,a.to)?t:null;h&&l.add(a.from,a.from,h)}return l.finish()}}),{domEventHandlers:s}=e;return[r,Vv({class:"cm-foldGutter",markers(o){var l;return((l=o.plugin(r))===null||l===void 0?void 0:l.markers)||z.empty},initialSpacer(){return new Ls(e,!1)},domEventHandlers:Object.assign(Object.assign({},s),{click:(o,l,a)=>{if(s.click&&s.click(o,l,a))return!0;let h=Ii(o.state,l.from,l.to);if(h)return o.dispatch({effects:Ln.of(h)}),!0;let f=Vi(o.state,l.from,l.to);return f?(o.dispatch({effects:Ri.of(f)}),!0):!1}})}),Uh()]}const Ex=P.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Ni{constructor(e,t){let i;function r(l){let a=ft.newName();return(i||(i=Object.create(null)))["."+a]=l,a}const s=typeof t.all=="string"?t.all:t.all?r(t.all):void 0,o=t.scope;this.scope=o instanceof Ie?l=>l.prop(Dn)==o.data:o?l=>l==o:void 0,this.style=Dh(e.map(l=>({tag:l.tag,class:l.class||r(Object.assign({},l,{tag:null}))})),{all:s}).style,this.module=i?new ft(i):null,this.themeType=t.themeType}static define(e,t){return new Ni(e,t||{})}}const Vs=E.define(),Kh=E.define({combine(n){return n.length?[n[0]]:null}});function Rs(n){let e=n.facet(Vs);return e.length?e:n.facet(Kh)}function Px(n,e){let t=[$x],i;return n instanceof Ni&&(n.module&&t.push(P.styleModule.of(n.module)),i=n.themeType),e!=null&&e.fallback?t.push(Kh.of(n)):i?t.push(Vs.computeN([P.darkTheme],r=>r.facet(P.darkTheme)==(i=="dark")?[n]:[])):t.push(Vs.of(n)),t}class Dx{constructor(e){this.markCache=Object.create(null),this.tree=ce(e.state),this.decorations=this.buildDeco(e,Rs(e.state))}update(e){let t=ce(e.state),i=Rs(e.state),r=i!=Rs(e.startState);t.length<e.view.viewport.to&&!r&&t.type==this.tree.type?this.decorations=this.decorations.map(e.changes):(t!=this.tree||e.viewportChanged||r)&&(this.tree=t,this.decorations=this.buildDeco(e.view,i))}buildDeco(e,t){if(!t||!this.tree.length)return $.none;let i=new ht;for(let{from:r,to:s}of e.visibleRanges)rx(this.tree,t,(o,l,a)=>{i.add(o,l,this.markCache[a]||(this.markCache[a]=$.mark({class:a})))},r,s);return i.finish()}}const $x=Ht.high(Z.fromClass(Dx,{decorations:n=>n.decorations})),Tx=Ni.define([{tag:A.meta,color:"#7a757a"},{tag:A.link,textDecoration:"underline"},{tag:A.heading,textDecoration:"underline",fontWeight:"bold"},{tag:A.emphasis,fontStyle:"italic"},{tag:A.strong,fontWeight:"bold"},{tag:A.strikethrough,textDecoration:"line-through"},{tag:A.keyword,color:"#708"},{tag:[A.atom,A.bool,A.url,A.contentSeparator,A.labelName],color:"#219"},{tag:[A.literal,A.inserted],color:"#164"},{tag:[A.string,A.deleted],color:"#a11"},{tag:[A.regexp,A.escape,A.special(A.string)],color:"#e40"},{tag:A.definition(A.variableName),color:"#00f"},{tag:A.local(A.variableName),color:"#30a"},{tag:[A.typeName,A.namespace],color:"#085"},{tag:A.className,color:"#167"},{tag:[A.special(A.variableName),A.macroName],color:"#256"},{tag:A.definition(A.propertyName),color:"#00c"},{tag:A.comment,color:"#940"},{tag:A.invalid,color:"#f00"}]),Lx=P.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),Gh=1e4,Yh="()[]{}",Jh=E.define({combine(n){return tt(n,{afterCursor:!0,brackets:Yh,maxScanDistance:Gh,renderMatch:Ix})}}),Vx=$.mark({class:"cm-matchingBracket"}),Rx=$.mark({class:"cm-nonmatchingBracket"});function Ix(n){let e=[],t=n.matched?Vx:Rx;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}const Nx=[se.define({create(){return $.none},update(n,e){if(!e.docChanged&&!e.selection)return n;let t=[],i=e.state.facet(Jh);for(let r of e.state.selection.ranges){if(!r.empty)continue;let s=Je(e.state,r.head,-1,i)||r.head>0&&Je(e.state,r.head-1,1,i)||i.afterCursor&&(Je(e.state,r.head,1,i)||r.head<e.state.doc.length&&Je(e.state,r.head+1,-1,i));s&&(t=t.concat(i.renderMatch(s,e.state)))}return $.set(t,!0)},provide:n=>P.decorations.from(n)}),Lx];function zx(n={}){return[Jh.of(n),Nx]}function Is(n,e,t){let i=n.prop(e<0?V.openedBy:V.closedBy);if(i)return i;if(n.name.length==1){let r=t.indexOf(n.name);if(r>-1&&r%2==(e<0?1:0))return[t[r+e]]}return null}function Je(n,e,t,i={}){let r=i.maxScanDistance||Gh,s=i.brackets||Yh,o=ce(n),l=o.resolveInner(e,t);for(let a=l;a;a=a.parent){let h=Is(a.type,t,s);if(h&&a.from<a.to)return Hx(n,e,t,a,h,s)}return Fx(n,e,t,o,l.type,r,s)}function Hx(n,e,t,i,r,s){let o=i.parent,l={from:i.from,to:i.to},a=0,h=o==null?void 0:o.cursor();if(h&&(t<0?h.childBefore(i.from):h.childAfter(i.to)))do if(t<0?h.to<=i.from:h.from>=i.to){if(a==0&&r.indexOf(h.type.name)>-1&&h.from<h.to)return{start:l,end:{from:h.from,to:h.to},matched:!0};if(Is(h.type,t,s))a++;else if(Is(h.type,-t,s)){if(a==0)return{start:l,end:h.from==h.to?void 0:{from:h.from,to:h.to},matched:!1};a--}}while(t<0?h.prevSibling():h.nextSibling());return{start:l,matched:!1}}function Fx(n,e,t,i,r,s,o){let l=t<0?n.sliceDoc(e-1,e):n.sliceDoc(e,e+1),a=o.indexOf(l);if(a<0||a%2==0!=t>0)return null;let h={from:t<0?e-1:e,to:t>0?e+1:e},f=n.doc.iterRange(e,t>0?n.doc.length:0),u=0;for(let d=0;!f.next().done&&d<=s;){let p=f.value;t<0&&(d+=p.length);let m=e+d*t;for(let g=t>0?0:p.length-1,y=t>0?p.length:-1;g!=y;g+=t){let w=o.indexOf(p[g]);if(!(w<0||i.resolveInner(m+g,1).type!=r))if(w%2==0==t>0)u++;else{if(u==1)return{start:h,end:{from:m+g,to:m+g+1},matched:w>>1==a>>1};u--}}t>0&&(d+=p.length)}return f.done?{start:h,matched:!1}:null}function Xh(n,e,t,i=0,r=0){e==null&&(e=n.search(/[^\s\u00a0]/),e==-1&&(e=n.length));let s=r;for(let o=i;o<e;o++)n.charCodeAt(o)==9?s+=t-s%t:s++;return s}class Qh{constructor(e,t,i){this.string=e,this.tabSize=t,this.indentUnit=i,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(e){let t=this.string.charAt(this.pos),i;if(typeof e=="string"?i=t==e:i=t&&(e instanceof RegExp?e.test(t):e(t)),i)return++this.pos,t}eatWhile(e){let t=this.pos;for(;this.eat(e););return this.pos>t}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Xh(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){return Xh(this.string,null,this.tabSize)}match(e,t,i){if(typeof e=="string"){let r=o=>i?o.toLowerCase():o,s=this.string.substr(this.pos,e.length);return r(s)==r(e)?(t!==!1&&(this.pos+=e.length),!0):null}else{let r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&t!==!1&&(this.pos+=r[0].length),r)}}current(){return this.string.slice(this.start,this.pos)}}function Wx(n){return{token:n.token,blankLine:n.blankLine||(()=>{}),startState:n.startState||(()=>!0),copyState:n.copyState||jx,indent:n.indent||(()=>null),languageData:n.languageData||{},tokenTable:n.tokenTable||Hs}}function jx(n){if(typeof n!="object")return n;let e={};for(let t in n){let i=n[t];e[t]=i instanceof Array?i.slice():i}return e}class Ns extends Ie{constructor(e){let t=ox(e.languageData),i=Wx(e),r,s=new class extends Bh{createParse(o,l,a){return new qx(r,o,l,a)}};super(t,s,[Ih.of((o,l)=>this.getIndent(o,l))]),this.topNode=Yx(t),r=this,this.streamParser=i,this.stateAfter=new V({perNode:!0}),this.tokenTable=e.tokenTable?new rf(i.tokenTable):Gx}static define(e){return new Ns(e)}getIndent(e,t){let i=ce(e.state),r=i.resolve(t);for(;r&&r.type!=this.topNode;)r=r.parent;if(!r)return null;let s=zs(this,i,0,r.from,t),o,l;if(s?(l=s.state,o=s.pos+1):(l=this.streamParser.startState(e.unit),o=0),t-o>1e4)return null;for(;o<t;){let h=e.state.doc.lineAt(o),f=Math.min(t,h.to);if(h.length){let u=new Qh(h.text,e.state.tabSize,e.unit);for(;u.pos<f-h.from;)ef(this.streamParser.token,u,l)}else this.streamParser.blankLine(l,e.unit);if(f==t)break;o=h.to+1}let{text:a}=e.lineAt(t);return this.streamParser.indent(l,/^\s*(.*)/.exec(a)[1],e)}get allowsNesting(){return!1}}function zs(n,e,t,i,r){let s=t>=i&&t+e.length<=r&&e.prop(n.stateAfter);if(s)return{state:n.streamParser.copyState(s),pos:t+e.length};for(let o=e.children.length-1;o>=0;o--){let l=e.children[o],a=t+e.positions[o],h=l instanceof J&&a<r&&zs(n,l,a,i,r);if(h)return h}return null}function Zh(n,e,t,i,r){if(r&&t<=0&&i>=e.length)return e;!r&&e.type==n.topNode&&(r=!0);for(let s=e.children.length-1;s>=0;s--){let o=e.positions[s],l=e.children[s],a;if(o<i&&l instanceof J){if(!(a=Zh(n,l,t-o,i-o,r)))break;return r?new J(e.type,e.children.slice(0,s).concat(a),e.positions.slice(0,s+1),o+a.length):a}}return null}function Ux(n,e,t,i){for(let r of e){let s=r.from+(r.openStart?25:0),o=r.to-(r.openEnd?25:0),l=s<=t&&o>t&&zs(n,r.tree,0-r.offset,t,o),a;if(l&&(a=Zh(n,r.tree,t+r.offset,l.pos+r.offset,!1)))return{state:l.state,tree:a}}return{state:n.streamParser.startState(i?Lt(i):4),tree:J.empty}}class qx{constructor(e,t,i,r){this.lang=e,this.input=t,this.fragments=i,this.ranges=r,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=r[r.length-1].to;let s=Xt.get(),o=r[0].from,{state:l,tree:a}=Ux(e,i,o,s==null?void 0:s.state);this.state=l,this.parsedPos=this.chunkStart=o+a.length;for(let h=0;h<a.children.length;h++)this.chunks.push(a.children[h]),this.chunkPos.push(a.positions[h]);s&&this.parsedPos<s.viewport.from-1e5&&(this.state=this.lang.streamParser.startState(Lt(s.state)),s.skipUntilInView(this.parsedPos,s.viewport.from),this.parsedPos=s.viewport.from),this.moveRangeIndex()}advance(){let e=Xt.get(),t=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),i=Math.min(t,this.chunkStart+2048);for(e&&(i=Math.min(i,e.viewport.to));this.parsedPos<i;)this.parseLine(e);return this.chunkStart<this.parsedPos&&this.finishChunk(),this.parsedPos>=t?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,t),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let t=this.input.chunk(e);if(this.input.lineChunks)t==`
|
|
11
|
+
`&&(t="");else{let i=t.indexOf(`
|
|
12
|
+
`);i>-1&&(t=t.slice(0,i))}return e+t.length<=this.to?t:t.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,t=this.lineAfter(e),i=e+t.length;for(let r=this.rangeIndex;;){let s=this.ranges[r].to;if(s>=i||(t=t.slice(0,s-(i-t.length)),r++,r==this.ranges.length))break;let o=this.ranges[r].from,l=this.lineAfter(o);t+=l,i=o+l.length}return{line:t,end:i}}skipGapsTo(e,t,i){for(;;){let r=this.ranges[this.rangeIndex].to,s=e+t;if(i>0?r>s:r>=s)break;t+=this.ranges[++this.rangeIndex].from-r}return t}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,t,i,r,s){if(this.ranges.length>1){s=this.skipGapsTo(t,s,1),t+=s;let o=this.chunk.length;s=this.skipGapsTo(i,s,-1),i+=s,r+=this.chunk.length-o}return this.chunk.push(e,t,i,r),s}parseLine(e){let{line:t,end:i}=this.nextLine(),r=0,{streamParser:s}=this.lang,o=new Qh(t,e?e.state.tabSize:4,e?Lt(e.state):2);if(o.eol())s.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=ef(s.token,o,this.state);if(l&&(r=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+o.start,this.parsedPos+o.pos,4,r)),o.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=J.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:Kx,topID:0,maxBufferLength:2048,reused:this.chunkReused});e=new J(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new J(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}}function ef(n,e,t){e.start=e.pos;for(let i=0;i<10;i++){let r=n(e,t);if(e.pos>e.start)return r}throw new Error("Stream parser failed to advance stream.")}const Hs=Object.create(null),Vn=[xe.none],Kx=new Cs(Vn),tf=[],nf=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])nf[n]=sf(Hs,e);class rf{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),nf)}resolve(e){return e?this.table[e]||(this.table[e]=sf(this.extra,e)):0}}const Gx=new rf(Hs);function Fs(n,e){tf.indexOf(n)>-1||(tf.push(n),console.warn(e))}function sf(n,e){let t=null;for(let s of e.split(".")){let o=n[s]||A[s];o?typeof o=="function"?t?t=o(t):Fs(s,`Modifier ${s} used at start of tag`):t?Fs(s,`Tag ${s} used as modifier`):t=o:Fs(s,`Unknown highlighting tag ${s}`)}if(!t)return 0;let i=e.replace(/ /g,"_"),r=xe.define({id:Vn.length,name:i,props:[tx({[i]:t})]});return Vn.push(r),r.id}function Yx(n){let e=xe.define({id:Vn.length,name:"Document",props:[Dn.add(()=>n)]});return Vn.push(e),e}const Jx=n=>{let e=js(n.state);return e.line?Xx(n):e.block?Zx(n):!1};function Ws(n,e){return({state:t,dispatch:i})=>{if(t.readOnly)return!1;let r=n(e,t);return r?(i(t.update(r)),!0):!1}}const Xx=Ws(nk,0),Qx=Ws(of,0),Zx=Ws((n,e)=>of(n,e,tk(e)),0);function js(n,e=n.selection.main.head){let t=n.languageDataAt("commentTokens",e);return t.length?t[0]:{}}const Rn=50;function ek(n,{open:e,close:t},i,r){let s=n.sliceDoc(i-Rn,i),o=n.sliceDoc(r,r+Rn),l=/\s*$/.exec(s)[0].length,a=/^\s*/.exec(o)[0].length,h=s.length-l;if(s.slice(h-e.length,h)==e&&o.slice(a,a+t.length)==t)return{open:{pos:i-l,margin:l&&1},close:{pos:r+a,margin:a&&1}};let f,u;r-i<=2*Rn?f=u=n.sliceDoc(i,r):(f=n.sliceDoc(i,i+Rn),u=n.sliceDoc(r-Rn,r));let d=/^\s*/.exec(f)[0].length,p=/\s*$/.exec(u)[0].length,m=u.length-p-t.length;return f.slice(d,d+e.length)==e&&u.slice(m,m+t.length)==t?{open:{pos:i+d+e.length,margin:/\s/.test(f.charAt(d+e.length))?1:0},close:{pos:r-p-t.length,margin:/\s/.test(u.charAt(m-1))?1:0}}:null}function tk(n){let e=[];for(let t of n.selection.ranges){let i=n.doc.lineAt(t.from),r=t.to<=i.to?i:n.doc.lineAt(t.to),s=e.length-1;s>=0&&e[s].to>i.from?e[s].to=r.to:e.push({from:i.from,to:r.to})}return e}function of(n,e,t=e.selection.ranges){let i=t.map(s=>js(e,s.from).block);if(!i.every(s=>s))return null;let r=t.map((s,o)=>ek(e,i[o],s.from,s.to));if(n!=2&&!r.every(s=>s))return{changes:e.changes(t.map((s,o)=>r[o]?[]:[{from:s.from,insert:i[o].open+" "},{from:s.to,insert:" "+i[o].close}]))};if(n!=1&&r.some(s=>s)){let s=[];for(let o=0,l;o<r.length;o++)if(l=r[o]){let a=i[o],{open:h,close:f}=l;s.push({from:h.pos-a.open.length,to:h.pos+h.margin},{from:f.pos-f.margin,to:f.pos+a.close.length})}return{changes:s}}return null}function nk(n,e,t=e.selection.ranges){let i=[],r=-1;for(let{from:s,to:o}of t){let l=i.length,a=1e9;for(let h=s;h<=o;){let f=e.doc.lineAt(h);if(f.from>r&&(s==o||o>f.from)){r=f.from;let u=js(e,h).line;if(!u)continue;let d=/^\s*/.exec(f.text)[0].length,p=d==f.length,m=f.text.slice(d,d+u.length)==u?d:-1;d<f.text.length&&d<a&&(a=d),i.push({line:f,comment:m,token:u,indent:d,empty:p,single:!1})}h=f.to+1}if(a<1e9)for(let h=l;h<i.length;h++)i[h].indent<i[h].line.text.length&&(i[h].indent=a);i.length==l+1&&(i[l].single=!0)}if(n!=2&&i.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:l,token:a,indent:h,empty:f,single:u}of i)(u||!f)&&s.push({from:l.from+h,insert:a+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(n!=1&&i.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:l,token:a}of i)if(l>=0){let h=o.from+l,f=h+a.length;o.text[f-o.from]==" "&&f++,s.push({from:h,to:f})}return{changes:s}}return null}const Us=Ot.define(),ik=Ot.define(),rk=E.define(),lf=E.define({combine(n){return tt(n,{minDepth:100,newGroupDelay:500},{minDepth:Math.max,newGroupDelay:Math.min})}});function sk(n){let e=0;return n.iterChangedRanges((t,i)=>e=i),e}const af=se.define({create(){return Xe.empty},update(n,e){let t=e.state.facet(lf),i=e.annotation(Us);if(i){let a=e.docChanged?k.single(sk(e.changes)):void 0,h=ke.fromTransaction(e,a),f=i.side,u=f==0?n.undone:n.done;return h?u=Hi(u,u.length,t.minDepth,h):u=ff(u,e.startState.selection),new Xe(f==0?i.rest:u,f==0?u:i.rest)}let r=e.annotation(ik);if((r=="full"||r=="before")&&(n=n.isolate()),e.annotation(ne.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let s=ke.fromTransaction(e),o=e.annotation(ne.time),l=e.annotation(ne.userEvent);return s?n=n.addChanges(s,o,l,t.newGroupDelay,t.minDepth):e.selection&&(n=n.addSelection(e.startState.selection,o,l,t.newGroupDelay)),(r=="full"||r=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new Xe(n.done.map(ke.fromJSON),n.undone.map(ke.fromJSON))}});function ok(n={}){return[af,lf.of(n),P.domEventHandlers({beforeinput(e,t){let i=e.inputType=="historyUndo"?cf:e.inputType=="historyRedo"?qs:null;return i?(e.preventDefault(),i(t)):!1}})]}function zi(n,e){return function({state:t,dispatch:i}){if(!e&&t.readOnly)return!1;let r=t.field(af,!1);if(!r)return!1;let s=r.pop(n,t,e);return s?(i(s),!0):!1}}const cf=zi(0,!1),qs=zi(1,!1),lk=zi(0,!0),ak=zi(1,!0);class ke{constructor(e,t,i,r,s){this.changes=e,this.effects=t,this.mapped=i,this.startSelection=r,this.selectionsAfter=s}setSelAfter(e){return new ke(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new ke(e.changes&&te.fromJSON(e.changes),[],e.mapped&&We.fromJSON(e.mapped),e.startSelection&&k.fromJSON(e.startSelection),e.selectionsAfter.map(k.fromJSON))}static fromTransaction(e,t){let i=De;for(let r of e.startState.facet(rk)){let s=r(e);s.length&&(i=i.concat(s))}return!i.length&&e.changes.empty?null:new ke(e.changes.invert(e.startState.doc),i,void 0,t||e.startState.selection,De)}static selection(e){return new ke(void 0,De,void 0,void 0,e)}}function Hi(n,e,t,i){let r=e+1>t+20?e-t-1:0,s=n.slice(r,e);return s.push(i),s}function ck(n,e){let t=[],i=!1;return n.iterChangedRanges((r,s)=>t.push(r,s)),e.iterChangedRanges((r,s,o,l)=>{for(let a=0;a<t.length;){let h=t[a++],f=t[a++];l>=h&&o<=f&&(i=!0)}}),i}function hk(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,i)=>t.empty!=e.ranges[i].empty).length===0}function hf(n,e){return n.length?e.length?n.concat(e):n:e}const De=[],fk=200;function ff(n,e){if(n.length){let t=n[n.length-1],i=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-fk));return i.length&&i[i.length-1].eq(e)?n:(i.push(e),Hi(n,n.length-1,1e9,t.setSelAfter(i)))}else return[ke.selection([e])]}function uk(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function Ks(n,e){if(!n.length)return n;let t=n.length,i=De;for(;t;){let r=dk(n[t-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let s=n.slice(0,t);return s[t-1]=r,s}else e=r.mapped,t--,i=r.selectionsAfter}return i.length?[ke.selection(i)]:De}function dk(n,e,t){let i=hf(n.selectionsAfter.length?n.selectionsAfter.map(l=>l.map(e)):De,t);if(!n.changes)return ke.selection(i);let r=n.changes.map(e),s=e.mapDesc(n.changes,!0),o=n.mapped?n.mapped.composeDesc(s):s;return new ke(r,T.mapEffects(n.effects,e),o,n.startSelection.map(s),i)}const pk=/^(input\.type|delete)($|\.)/;class Xe{constructor(e,t,i=0,r=void 0){this.done=e,this.undone=t,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new Xe(this.done,this.undone):this}addChanges(e,t,i,r,s){let o=this.done,l=o[o.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!i||pk.test(i))&&(!l.selectionsAfter.length&&t-this.prevTime<r&&ck(l.changes,e.changes)||i=="input.type.compose")?o=Hi(o,o.length-1,s,new ke(e.changes.compose(l.changes),hf(e.effects,l.effects),l.mapped,l.startSelection,De)):o=Hi(o,o.length,s,e),new Xe(o,De,t,i)}addSelection(e,t,i,r){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:De;return s.length>0&&t-this.prevTime<r&&i==this.prevUserEvent&&i&&/^select($|\.)/.test(i)&&hk(s[s.length-1],e)?this:new Xe(ff(this.done,e),this.undone,t,i)}addMapping(e){return new Xe(Ks(this.done,e),Ks(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,i){let r=e==0?this.done:this.undone;if(r.length==0)return null;let s=r[r.length-1];if(i&&s.selectionsAfter.length)return t.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:Us.of({side:e,rest:uk(r)}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let o=r.length==1?De:r.slice(0,r.length-1);return s.mapped&&(o=Ks(o,s.mapped)),t.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:Us.of({side:e,rest:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}Xe.empty=new Xe(De,De);const mk=[{key:"Mod-z",run:cf,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:qs,preventDefault:!0},{linux:"Ctrl-Shift-z",run:qs,preventDefault:!0},{key:"Mod-u",run:lk,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:ak,preventDefault:!0}];function Zt(n,e){return k.create(n.ranges.map(e),n.mainIndex)}function Qe(n,e){return n.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function st({state:n,dispatch:e},t){let i=Zt(n.selection,t);return i.eq(n.selection)?!1:(e(Qe(n,i)),!0)}function Fi(n,e){return k.cursor(e?n.to:n.from)}function uf(n,e){return st(n,t=>t.empty?n.moveByChar(t,e):Fi(t,e))}function $e(n){return n.textDirectionAt(n.state.selection.main.head)==G.LTR}const df=n=>uf(n,!$e(n)),pf=n=>uf(n,$e(n));function mf(n,e){return st(n,t=>t.empty?n.moveByGroup(t,e):Fi(t,e))}const gk=n=>mf(n,!$e(n)),yk=n=>mf(n,$e(n));function wk(n,e,t){if(e.type.prop(t))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function Wi(n,e,t){let i=ce(n).resolveInner(e.head),r=t?V.closedBy:V.openedBy;for(let a=e.head;;){let h=t?i.childAfter(a):i.childBefore(a);if(!h)break;wk(n,h,r)?i=h:a=t?h.to:h.from}let s=i.type.prop(r),o,l;return s&&(o=t?Je(n,i.from,1):Je(n,i.to,-1))&&o.matched?l=t?o.end.to:o.end.from:l=t?i.to:i.from,k.cursor(l,t?-1:1)}const bk=n=>st(n,e=>Wi(n.state,e,!$e(n))),vk=n=>st(n,e=>Wi(n.state,e,$e(n)));function gf(n,e){return st(n,t=>{if(!t.empty)return Fi(t,e);let i=n.moveVertically(t,e);return i.head!=t.head?i:n.moveToLineBoundary(t,e)})}const yf=n=>gf(n,!1),wf=n=>gf(n,!0);function bf(n){return Math.max(n.defaultLineHeight,Math.min(n.dom.clientHeight,innerHeight)-5)}function vf(n,e){let{state:t}=n,i=Zt(t.selection,l=>l.empty?n.moveVertically(l,e,bf(n)):Fi(l,e));if(i.eq(t.selection))return!1;let r=n.coordsAtPos(t.selection.main.head),s=n.scrollDOM.getBoundingClientRect(),o;return r&&r.top>s.top&&r.bottom<s.bottom&&r.top-s.top<=n.scrollDOM.scrollHeight-n.scrollDOM.scrollTop-n.scrollDOM.clientHeight&&(o=P.scrollIntoView(i.main.head,{y:"start",yMargin:r.top-s.top})),n.dispatch(Qe(t,i),{effects:o}),!0}const xf=n=>vf(n,!1),Gs=n=>vf(n,!0);function ji(n,e,t){let i=n.lineBlockAt(e.head),r=n.moveToLineBoundary(e,t);if(r.head==e.head&&r.head!=(t?i.to:i.from)&&(r=n.moveToLineBoundary(e,t,!1)),!t&&r.head==i.from&&i.length){let s=/^\s*/.exec(n.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;s&&e.head!=i.from+s&&(r=k.cursor(i.from+s))}return r}const kf=n=>st(n,e=>ji(n,e,!0)),Sf=n=>st(n,e=>ji(n,e,!1)),xk=n=>st(n,e=>k.cursor(n.lineBlockAt(e.head).from,1)),kk=n=>st(n,e=>k.cursor(n.lineBlockAt(e.head).to,-1));function Sk(n,e,t){let i=!1,r=Zt(n.selection,s=>{let o=Je(n,s.head,-1)||Je(n,s.head,1)||s.head>0&&Je(n,s.head-1,1)||s.head<n.doc.length&&Je(n,s.head+1,-1);if(!o||!o.end)return s;i=!0;let l=o.start.from==s.head?o.end.to:o.end.from;return t?k.range(s.anchor,l):k.cursor(l)});return i?(e(Qe(n,r)),!0):!1}const Ck=({state:n,dispatch:e})=>Sk(n,e,!1);function Ze(n,e){let t=Zt(n.state.selection,i=>{let r=e(i);return k.range(i.anchor,r.head,r.goalColumn)});return t.eq(n.state.selection)?!1:(n.dispatch(Qe(n.state,t)),!0)}function Cf(n,e){return Ze(n,t=>n.moveByChar(t,e))}const _f=n=>Cf(n,!$e(n)),Mf=n=>Cf(n,$e(n));function Af(n,e){return Ze(n,t=>n.moveByGroup(t,e))}const _k=n=>Af(n,!$e(n)),Mk=n=>Af(n,$e(n)),Ak=n=>Ze(n,e=>Wi(n.state,e,!$e(n))),Ok=n=>Ze(n,e=>Wi(n.state,e,$e(n)));function Of(n,e){return Ze(n,t=>n.moveVertically(t,e))}const Bf=n=>Of(n,!1),Ef=n=>Of(n,!0);function Pf(n,e){return Ze(n,t=>n.moveVertically(t,e,bf(n)))}const Df=n=>Pf(n,!1),$f=n=>Pf(n,!0),Tf=n=>Ze(n,e=>ji(n,e,!0)),Lf=n=>Ze(n,e=>ji(n,e,!1)),Bk=n=>Ze(n,e=>k.cursor(n.lineBlockAt(e.head).from)),Ek=n=>Ze(n,e=>k.cursor(n.lineBlockAt(e.head).to)),Vf=({state:n,dispatch:e})=>(e(Qe(n,{anchor:0})),!0),Rf=({state:n,dispatch:e})=>(e(Qe(n,{anchor:n.doc.length})),!0),If=({state:n,dispatch:e})=>(e(Qe(n,{anchor:n.selection.main.anchor,head:0})),!0),Nf=({state:n,dispatch:e})=>(e(Qe(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),Pk=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),Dk=({state:n,dispatch:e})=>{let t=Ki(n).map(({from:i,to:r})=>k.range(i,Math.min(r+1,n.doc.length)));return e(n.update({selection:k.create(t),userEvent:"select"})),!0},$k=({state:n,dispatch:e})=>{let t=Zt(n.selection,i=>{var r;let s=ce(n).resolveInner(i.head,1);for(;!(s.from<i.from&&s.to>=i.to||s.to>i.to&&s.from<=i.from||!(!((r=s.parent)===null||r===void 0)&&r.parent));)s=s.parent;return k.range(s.to,s.from)});return e(Qe(n,t)),!0},Tk=({state:n,dispatch:e})=>{let t=n.selection,i=null;return t.ranges.length>1?i=k.create([t.main]):t.main.empty||(i=k.create([k.cursor(t.main.head)])),i?(e(Qe(n,i)),!0):!1};function Ui({state:n,dispatch:e},t){if(n.readOnly)return!1;let i="delete.selection",r=n.changeByRange(s=>{let{from:o,to:l}=s;if(o==l){let a=t(o);a<o?i="delete.backward":a>o&&(i="delete.forward"),o=Math.min(o,a),l=Math.max(l,a)}return o==l?{range:s}:{changes:{from:o,to:l},range:k.cursor(o)}});return r.changes.empty?!1:(e(n.update(r,{scrollIntoView:!0,userEvent:i,effects:i=="delete.selection"?P.announce.of(n.phrase("Selection deleted")):void 0})),!0)}function qi(n,e,t){if(n instanceof P)for(let i of n.state.facet(P.atomicRanges).map(r=>r(n)))i.between(e,e,(r,s)=>{r<e&&s>e&&(e=t?s:r)});return e}const zf=(n,e)=>Ui(n,t=>{let{state:i}=n,r=i.doc.lineAt(t),s,o;if(!e&&t>r.from&&t<r.from+200&&!/[^ \t]/.test(s=r.text.slice(0,t-r.from))){if(s[s.length-1]==" ")return t-1;let l=yn(s,i.tabSize),a=l%Lt(i)||Lt(i);for(let h=0;h<a&&s[s.length-1-h]==" ";h++)t--;o=t}else o=Ce(r.text,t-r.from,e,e)+r.from,o==t&&r.number!=(e?i.doc.lines:1)&&(o+=e?1:-1);return qi(n,o,e)}),Ys=n=>zf(n,!1),Hf=n=>zf(n,!0),Ff=(n,e)=>Ui(n,t=>{let i=t,{state:r}=n,s=r.doc.lineAt(i),o=r.charCategorizer(i);for(let l=null;;){if(i==(e?s.to:s.from)){i==t&&s.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let a=Ce(s.text,i-s.from,e)+s.from,h=s.text.slice(Math.min(i,a)-s.from,Math.max(i,a)-s.from),f=o(h);if(l!=null&&f!=l)break;(h!=" "||i!=t)&&(l=f),i=a}return qi(n,i,e)}),Wf=n=>Ff(n,!1),Lk=n=>Ff(n,!0),jf=n=>Ui(n,e=>{let t=n.lineBlockAt(e).to;return qi(n,e<t?t:Math.min(n.state.doc.length,e+1),!0)}),Vk=n=>Ui(n,e=>{let t=n.lineBlockAt(e).from;return qi(n,e>t?t:Math.max(0,e-1),!1)}),Rk=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:N.of(["",""])},range:k.cursor(i.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},Ik=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(i=>{if(!i.empty||i.from==0||i.from==n.doc.length)return{range:i};let r=i.from,s=n.doc.lineAt(r),o=r==s.from?r-1:Ce(s.text,r-s.from,!1)+s.from,l=r==s.to?r+1:Ce(s.text,r-s.from,!0)+s.from;return{changes:{from:o,to:l,insert:n.doc.slice(r,l).append(n.doc.slice(o,r))},range:k.cursor(l)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Ki(n){let e=[],t=-1;for(let i of n.selection.ranges){let r=n.doc.lineAt(i.from),s=n.doc.lineAt(i.to);if(!i.empty&&i.to==s.from&&(s=n.doc.lineAt(i.to-1)),t>=r.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(i)}else e.push({from:r.from,to:s.to,ranges:[i]});t=s.number+1}return e}function Uf(n,e,t){if(n.readOnly)return!1;let i=[],r=[];for(let s of Ki(n)){if(t?s.to==n.doc.length:s.from==0)continue;let o=n.doc.lineAt(t?s.to+1:s.from-1),l=o.length+1;if(t){i.push({from:s.to,to:o.to},{from:s.from,insert:o.text+n.lineBreak});for(let a of s.ranges)r.push(k.range(Math.min(n.doc.length,a.anchor+l),Math.min(n.doc.length,a.head+l)))}else{i.push({from:o.from,to:s.from},{from:s.to,insert:n.lineBreak+o.text});for(let a of s.ranges)r.push(k.range(a.anchor-l,a.head-l))}}return i.length?(e(n.update({changes:i,scrollIntoView:!0,selection:k.create(r,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Nk=({state:n,dispatch:e})=>Uf(n,e,!1),zk=({state:n,dispatch:e})=>Uf(n,e,!0);function qf(n,e,t){if(n.readOnly)return!1;let i=[];for(let r of Ki(n))t?i.push({from:r.from,insert:n.doc.slice(r.from,r.to)+n.lineBreak}):i.push({from:r.to,insert:n.lineBreak+n.doc.slice(r.from,r.to)});return e(n.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Hk=({state:n,dispatch:e})=>qf(n,e,!1),Fk=({state:n,dispatch:e})=>qf(n,e,!0),Wk=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(Ki(e).map(({from:r,to:s})=>(r>0?r--:s<e.doc.length&&s++,{from:r,to:s}))),i=Zt(e.selection,r=>n.moveVertically(r,!0)).map(t);return n.dispatch({changes:t,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function jk(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=ce(n).resolveInner(e),i=t.childBefore(e),r=t.childAfter(e),s;return i&&r&&i.to<=e&&r.from>=e&&(s=i.type.prop(V.closedBy))&&s.indexOf(r.name)>-1&&n.doc.lineAt(i.to).from==n.doc.lineAt(r.from).from?{from:i.to,to:r.from}:null}const Uk=Kf(!1),qk=Kf(!0);function Kf(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:s,to:o}=r,l=e.doc.lineAt(s),a=!n&&s==o&&jk(e,s);n&&(s=o=(o<=l.to?l:e.doc.lineAt(o)).to);let h=new Li(e,{simulateBreak:s,simulateDoubleBreak:!!a}),f=$s(h,s);for(f==null&&(f=/^\s*/.exec(e.doc.lineAt(s).text)[0].length);o<l.to&&/\s/.test(l.text[o-l.from]);)o++;a?{from:s,to:o}=a:s>l.from&&s<l.from+100&&!/\S/.test(l.text.slice(0,s))&&(s=l.from);let u=["",Tn(e,f)];return a&&u.push(Tn(e,h.lineIndent(l.from,-1))),{changes:{from:s,to:o,insert:N.of(u)},range:k.cursor(s+1+u[1].length)}});return t(e.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}}function Js(n,e){let t=-1;return n.changeByRange(i=>{let r=[];for(let o=i.from;o<=i.to;){let l=n.doc.lineAt(o);l.number>t&&(i.empty||i.to>l.from)&&(e(l,r,i),t=l.number),o=l.to+1}let s=n.changes(r);return{changes:r,range:k.range(s.mapPos(i.anchor,1),s.mapPos(i.head,1))}})}const Kk=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),i=new Li(n,{overrideIndentation:s=>{let o=t[s];return o==null?-1:o}}),r=Js(n,(s,o,l)=>{let a=$s(i,s.from);if(a==null)return;/\S/.test(s.text)||(a=0);let h=/^\s*/.exec(s.text)[0],f=Tn(n,a);(h!=f||l.from<s.from+h.length)&&(t[s.from]=a,o.push({from:s.from,to:s.from+h.length,insert:f}))});return r.changes.empty||e(n.update(r,{userEvent:"indent"})),!0},Gk=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(Js(n,(t,i)=>{i.push({from:t.from,insert:n.facet(Ds)})}),{userEvent:"input.indent"})),!0),Yk=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(Js(n,(t,i)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let s=yn(r,n.tabSize),o=0,l=Tn(n,Math.max(0,s-Lt(n)));for(;o<r.length&&o<l.length&&r.charCodeAt(o)==l.charCodeAt(o);)o++;i.push({from:t.from+o,to:t.from+r.length,insert:l.slice(o)})}),{userEvent:"delete.dedent"})),!0),Jk=[{key:"Ctrl-b",run:df,shift:_f,preventDefault:!0},{key:"Ctrl-f",run:pf,shift:Mf},{key:"Ctrl-p",run:yf,shift:Bf},{key:"Ctrl-n",run:wf,shift:Ef},{key:"Ctrl-a",run:xk,shift:Bk},{key:"Ctrl-e",run:kk,shift:Ek},{key:"Ctrl-d",run:Hf},{key:"Ctrl-h",run:Ys},{key:"Ctrl-k",run:jf},{key:"Ctrl-Alt-h",run:Wf},{key:"Ctrl-o",run:Rk},{key:"Ctrl-t",run:Ik},{key:"Ctrl-v",run:Gs}],Xk=[{key:"ArrowLeft",run:df,shift:_f,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:gk,shift:_k},{mac:"Cmd-ArrowLeft",run:Sf,shift:Lf},{key:"ArrowRight",run:pf,shift:Mf,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:yk,shift:Mk},{mac:"Cmd-ArrowRight",run:kf,shift:Tf},{key:"ArrowUp",run:yf,shift:Bf,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Vf,shift:If},{mac:"Ctrl-ArrowUp",run:xf,shift:Df},{key:"ArrowDown",run:wf,shift:Ef,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Rf,shift:Nf},{mac:"Ctrl-ArrowDown",run:Gs,shift:$f},{key:"PageUp",run:xf,shift:Df},{key:"PageDown",run:Gs,shift:$f},{key:"Home",run:Sf,shift:Lf,preventDefault:!0},{key:"Mod-Home",run:Vf,shift:If},{key:"End",run:kf,shift:Tf,preventDefault:!0},{key:"Mod-End",run:Rf,shift:Nf},{key:"Enter",run:Uk},{key:"Mod-a",run:Pk},{key:"Backspace",run:Ys,shift:Ys},{key:"Delete",run:Hf},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Wf},{key:"Mod-Delete",mac:"Alt-Delete",run:Lk},{mac:"Mod-Backspace",run:Vk},{mac:"Mod-Delete",run:jf}].concat(Jk.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),Qk=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:bk,shift:Ak},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:vk,shift:Ok},{key:"Alt-ArrowUp",run:Nk},{key:"Shift-Alt-ArrowUp",run:Hk},{key:"Alt-ArrowDown",run:zk},{key:"Shift-Alt-ArrowDown",run:Fk},{key:"Escape",run:Tk},{key:"Mod-Enter",run:qk},{key:"Alt-l",mac:"Ctrl-l",run:Dk},{key:"Mod-i",run:$k,preventDefault:!0},{key:"Mod-[",run:Yk},{key:"Mod-]",run:Gk},{key:"Mod-Alt-\\",run:Kk},{key:"Shift-Mod-k",run:Wk},{key:"Shift-Mod-\\",run:Ck},{key:"Mod-/",run:Jx},{key:"Alt-A",run:Qx}].concat(Xk);function q(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)){var r=t[i];typeof r=="string"?n.setAttribute(i,r):r!=null&&(n[i]=r)}e++}for(;e<arguments.length;e++)Gf(n,arguments[e]);return n}function Gf(n,e){if(typeof e=="string")n.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)n.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)Gf(n,e[t]);else throw new RangeError("Unsupported child node: "+e)}const Yf=typeof String.prototype.normalize=="function"?n=>n.normalize("NFKD"):n=>n;class en{constructor(e,t,i=0,r=e.length,s){this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,r),this.bufferStart=i,this.normalize=s?o=>s(Yf(o)):Yf,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return re(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=vr(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=_e(e);let r=this.normalize(t);for(let s=0,o=i;;s++){let l=r.charCodeAt(s),a=this.match(l,o);if(a)return this.value=a,this;if(s==r.length-1)break;o==i&&s<t.length&&t.charCodeAt(s)==l&&o++}}}match(e,t){let i=null;for(let r=0;r<this.matches.length;r+=2){let s=this.matches[r],o=!1;this.query.charCodeAt(s)==e&&(s==this.query.length-1?i={from:this.matches[r+1],to:t+1}:(this.matches[r]++,o=!0)),o||(this.matches.splice(r,2),r-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:t,to:t+1}:this.matches.push(1,t)),i}}typeof Symbol<"u"&&(en.prototype[Symbol.iterator]=function(){return this});const Jf={from:-1,to:-1,match:/.*/.exec("")},Xs="gm"+(/x/.unicode==null?"":"u");class Xf{constructor(e,t,i,r=0,s=e.length){if(this.to=s,this.curLine="",this.done=!1,this.value=Jf,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new Qf(e,t,i,r,s);this.re=new RegExp(t,Xs+(i!=null&&i.ignoreCase?"i":"")),this.iter=e.iter();let o=e.lineAt(r);this.curLineStart=o.from,this.matchPos=r,this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let i=this.curLineStart+t.index,r=i+t[0].length;if(this.matchPos=r+(i==r?1:0),i==this.curLine.length&&this.nextLine(),i<r||i>this.value.to)return this.value={from:i,to:r,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const Qs=new WeakMap;class tn{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,i){let r=Qs.get(e);if(!r||r.from>=i||r.to<=t){let l=new tn(t,e.sliceString(t,i));return Qs.set(e,l),l}if(r.from==t&&r.to==i)return r;let{text:s,from:o}=r;return o>t&&(s=e.sliceString(t,o)+s,o=t),r.to<i&&(s+=e.sliceString(r.to,i)),Qs.set(e,new tn(o,s)),new tn(t,s.slice(t-o,i-o))}}class Qf{constructor(e,t,i,r,s){this.text=e,this.to=s,this.done=!1,this.value=Jf,this.matchPos=r,this.re=new RegExp(t,Xs+(i!=null&&i.ignoreCase?"i":"")),this.flat=tn.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t&&this.flat.to<this.to&&t.index+t[0].length>this.flat.text.length-10&&(t=null),t){let i=this.flat.from+t.index,r=i+t[0].length;return this.value={from:i,to:r,match:t},this.matchPos=r+(i==r?1:0),this}else{if(this.flat.to==this.to)return this.done=!0,this;this.flat=tn.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}}typeof Symbol<"u"&&(Xf.prototype[Symbol.iterator]=Qf.prototype[Symbol.iterator]=function(){return this});function Zk(n){try{return new RegExp(n,Xs),!0}catch{return!1}}function Zs(n){let e=q("input",{class:"cm-textfield",name:"line"}),t=q("form",{class:"cm-gotoLine",onkeydown:r=>{r.keyCode==27?(r.preventDefault(),n.dispatch({effects:Gi.of(!1)}),n.focus()):r.keyCode==13&&(r.preventDefault(),i())},onsubmit:r=>{r.preventDefault(),i()}},q("label",n.state.phrase("Go to line"),": ",e)," ",q("button",{class:"cm-button",type:"submit"},n.state.phrase("go")));function i(){let r=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(e.value);if(!r)return;let{state:s}=n,o=s.doc.lineAt(s.selection.main.head),[,l,a,h,f]=r,u=h?+h.slice(1):0,d=a?+a:o.number;if(a&&f){let m=d/100;l&&(m=m*(l=="-"?-1:1)+o.number/s.doc.lines),d=Math.round(s.doc.lines*m)}else a&&l&&(d=d*(l=="-"?-1:1)+o.number);let p=s.doc.line(Math.max(1,Math.min(s.doc.lines,d)));n.dispatch({effects:Gi.of(!1),selection:k.cursor(p.from+Math.max(0,Math.min(u,p.length))),scrollIntoView:!0}),n.focus()}return{dom:t}}const Gi=T.define(),Zf=se.define({create(){return!0},update(n,e){for(let t of e.effects)t.is(Gi)&&(n=t.value);return n},provide:n=>Bn.from(n,e=>e?Zs:null)}),eS=n=>{let e=On(n,Zs);if(!e){let t=[Gi.of(!0)];n.state.field(Zf,!1)==null&&t.push(T.appendConfig.of([Zf,tS])),n.dispatch({effects:t}),e=On(n,Zs)}return e&&e.dom.querySelector("input").focus(),!0},tS=P.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),nS={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},eu=E.define({combine(n){return tt(n,nS,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function iS(n){let e=[aS,lS];return n&&e.push(eu.of(n)),e}const rS=$.mark({class:"cm-selectionMatch"}),sS=$.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function tu(n,e,t,i){return(t==0||n(e.sliceDoc(t-1,t))!=ge.Word)&&(i==e.doc.length||n(e.sliceDoc(i,i+1))!=ge.Word)}function oS(n,e,t,i){return n(e.sliceDoc(t,t+1))==ge.Word&&n(e.sliceDoc(i-1,i))==ge.Word}const lS=Z.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(eu),{state:t}=n,i=t.selection;if(i.ranges.length>1)return $.none;let r=i.main,s,o=null;if(r.empty){if(!e.highlightWordAroundCursor)return $.none;let a=t.wordAt(r.head);if(!a)return $.none;o=t.charCategorizer(r.head),s=t.sliceDoc(a.from,a.to)}else{let a=r.to-r.from;if(a<e.minSelectionLength||a>200)return $.none;if(e.wholeWords){if(s=t.sliceDoc(r.from,r.to),o=t.charCategorizer(r.head),!(tu(o,t,r.from,r.to)&&oS(o,t,r.from,r.to)))return $.none}else if(s=t.sliceDoc(r.from,r.to).trim(),!s)return $.none}let l=[];for(let a of n.visibleRanges){let h=new en(t.doc,s,a.from,a.to);for(;!h.next().done;){let{from:f,to:u}=h.value;if((!o||tu(o,t,f,u))&&(r.empty&&f<=r.from&&u>=r.to?l.push(sS.range(f,u)):(f>=r.to||u<=r.from)&&l.push(rS.range(f,u)),l.length>e.maxMatches))return $.none}}return $.set(l)}},{decorations:n=>n.decorations}),aS=P.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),cS=({state:n,dispatch:e})=>{let{selection:t}=n,i=k.create(t.ranges.map(r=>n.wordAt(r.head)||k.cursor(r.head)),t.mainIndex);return i.eq(t)?!1:(e(n.update({selection:i})),!0)};function hS(n,e){let{main:t,ranges:i}=n.selection,r=n.wordAt(t.head),s=r&&r.from==t.from&&r.to==t.to;for(let o=!1,l=new en(n.doc,e,i[i.length-1].to);;)if(l.next(),l.done){if(o)return null;l=new en(n.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(a=>a.from==l.value.from))continue;if(s){let a=n.wordAt(l.value.from);if(!a||a.from!=l.value.from||a.to!=l.value.to)continue}return l.value}}const fS=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(s=>s.from===s.to))return cS({state:n,dispatch:e});let i=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(s=>n.sliceDoc(s.from,s.to)!=i))return!1;let r=hS(n,i);return r?(e(n.update({selection:n.selection.addRange(k.range(r.from,r.to),!1),effects:P.scrollIntoView(r.to)})),!0):!1},eo=E.define({combine(n){var e;return{top:n.reduce((t,i)=>t!=null?t:i.top,void 0)||!1,caseSensitive:n.reduce((t,i)=>t!=null?t:i.caseSensitive,void 0)||!1,createPanel:((e=n.find(t=>t.createPanel))===null||e===void 0?void 0:e.createPanel)||(t=>new xS(t))}}});class nu{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||Zk(this.search)),this.unquoted=e.literal?this.search:this.search.replace(/\\([nrt\\])/g,(t,i)=>i=="n"?`
|
|
13
|
+
`:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp}create(){return this.regexp?new dS(this):new uS(this)}getCursor(e,t=0,i=e.length){return this.regexp?rn(this,e,t,i):nn(this,e,t,i)}}class iu{constructor(e){this.spec=e}}function nn(n,e,t,i){return new en(e,n.unquoted,t,i,n.caseSensitive?void 0:r=>r.toLowerCase())}class uS extends iu{constructor(e){super(e)}nextMatch(e,t,i){let r=nn(this.spec,e,i,e.length).nextOverlapping();return r.done&&(r=nn(this.spec,e,0,t).nextOverlapping()),r.done?null:r.value}prevMatchInRange(e,t,i){for(let r=i;;){let s=Math.max(t,r-1e4-this.spec.unquoted.length),o=nn(this.spec,e,s,r),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(s==t)return null;r-=1e4}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.length)}getReplacement(e){return this.spec.replace}matchAll(e,t){let i=nn(this.spec,e,0,e.length),r=[];for(;!i.next().done;){if(r.length>=t)return null;r.push(i.value)}return r}highlight(e,t,i,r){let s=nn(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}function rn(n,e,t,i){return new Xf(e,n.search,n.caseSensitive?void 0:{ignoreCase:!0},t,i)}class dS extends iu{nextMatch(e,t,i){let r=rn(this.spec,e,i,e.length).next();return r.done&&(r=rn(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,i){for(let r=1;;r++){let s=Math.max(t,i-r*1e4),o=rn(this.spec,e,s,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(s==t||l.from>s+10))return l;if(s==t)return null}}prevMatch(e,t,i){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,i,e.length)}getReplacement(e){return this.spec.replace.replace(/\$([$&\d+])/g,(t,i)=>i=="$"?"$":i=="&"?e.match[0]:i!="0"&&+i<e.match.length?e.match[i]:t)}matchAll(e,t){let i=rn(this.spec,e,0,e.length),r=[];for(;!i.next().done;){if(r.length>=t)return null;r.push(i.value)}return r}highlight(e,t,i,r){let s=rn(this.spec,e,Math.max(0,t-250),Math.min(i+250,e.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}const In=T.define(),to=T.define(),St=se.define({create(n){return new no(ro(n).create(),null)},update(n,e){for(let t of e.effects)t.is(In)?n=new no(t.value.create(),n.panel):t.is(to)&&(n=new no(n.query,t.value?io:null));return n},provide:n=>Bn.from(n,e=>e.panel)});class no{constructor(e,t){this.query=e,this.panel=t}}const pS=$.mark({class:"cm-searchMatch"}),mS=$.mark({class:"cm-searchMatch cm-searchMatch-selected"}),gS=Z.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(St))}update(n){let e=n.state.field(St);(e!=n.startState.field(St)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return $.none;let{view:t}=this,i=new ht;for(let r=0,s=t.visibleRanges,o=s.length;r<o;r++){let{from:l,to:a}=s[r];for(;r<o-1&&a>s[r+1].from-2*250;)a=s[++r].to;n.highlight(t.state.doc,l,a,(h,f)=>{let u=t.state.selection.ranges.some(d=>d.from==h&&d.to==f);i.add(h,f,u?mS:pS)})}return i.finish()}},{decorations:n=>n.decorations});function Nn(n){return e=>{let t=e.state.field(St,!1);return t&&t.query.spec.valid?n(e,t):su(e)}}const Yi=Nn((n,{query:e})=>{let{to:t}=n.state.selection.main,i=e.nextMatch(n.state.doc,t,t);return i?(n.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:so(n,i),userEvent:"select.search"}),!0):!1}),Ji=Nn((n,{query:e})=>{let{state:t}=n,{from:i}=t.selection.main,r=e.prevMatch(t.doc,i,i);return r?(n.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:so(n,r),userEvent:"select.search"}),!0):!1}),yS=Nn((n,{query:e})=>{let t=e.matchAll(n.state.doc,1e3);return!t||!t.length?!1:(n.dispatch({selection:k.create(t.map(i=>k.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),wS=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:i,to:r}=t.main,s=[],o=0;for(let l=new en(n.doc,n.sliceDoc(i,r));!l.next().done;){if(s.length>1e3)return!1;l.value.from==i&&(o=s.length),s.push(k.range(l.value.from,l.value.to))}return e(n.update({selection:k.create(s,o),userEvent:"select.search.matches"})),!0},ru=Nn((n,{query:e})=>{let{state:t}=n,{from:i,to:r}=t.selection.main;if(t.readOnly)return!1;let s=e.nextMatch(t.doc,i,i);if(!s)return!1;let o=[],l,a,h=[];if(s.from==i&&s.to==r&&(a=t.toText(e.getReplacement(s)),o.push({from:s.from,to:s.to,insert:a}),s=e.nextMatch(t.doc,s.from,s.to),h.push(P.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(i).number)+"."))),s){let f=o.length==0||o[0].from>=s.to?0:s.to-s.from-a.length;l={anchor:s.from-f,head:s.to-f},h.push(so(n,s))}return n.dispatch({changes:o,selection:l,scrollIntoView:!!l,effects:h,userEvent:"input.replace"}),!0}),bS=Nn((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state.doc,1e9).map(r=>{let{from:s,to:o}=r;return{from:s,to:o,insert:e.getReplacement(r)}});if(!t.length)return!1;let i=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:P.announce.of(i),userEvent:"input.replace.all"}),!0});function io(n){return n.state.facet(eo).createPanel(n)}function ro(n,e){var t;let i=n.selection.main,r=i.empty||i.to>i.from+100?"":n.sliceDoc(i.from,i.to),s=(t=e==null?void 0:e.caseSensitive)!==null&&t!==void 0?t:n.facet(eo).caseSensitive;return e&&!r?e:new nu({search:r.replace(/\n/g,"\\n"),caseSensitive:s})}const su=n=>{let e=n.state.field(St,!1);if(e&&e.panel){let t=On(n,io);if(!t)return!1;let i=t.dom.querySelector("[main-field]");if(i&&i!=n.root.activeElement){let r=ro(n.state,e.query.spec);r.valid&&n.dispatch({effects:In.of(r)}),i.focus(),i.select()}}else n.dispatch({effects:[to.of(!0),e?In.of(ro(n.state,e.query.spec)):T.appendConfig.of(SS)]});return!0},ou=n=>{let e=n.state.field(St,!1);if(!e||!e.panel)return!1;let t=On(n,io);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:to.of(!1)}),!0},vS=[{key:"Mod-f",run:su,scope:"editor search-panel"},{key:"F3",run:Yi,shift:Ji,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Yi,shift:Ji,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:ou,scope:"editor search-panel"},{key:"Mod-Shift-l",run:wS},{key:"Alt-g",run:eS},{key:"Mod-d",run:fS,preventDefault:!0}];class xS{constructor(e){this.view=e;let t=this.query=e.state.field(St).query.spec;this.commit=this.commit.bind(this),this.searchField=q("input",{value:t.search,placeholder:Te(e,"Find"),"aria-label":Te(e,"Find"),class:"cm-textfield",name:"search","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=q("input",{value:t.replace,placeholder:Te(e,"Replace"),"aria-label":Te(e,"Replace"),class:"cm-textfield",name:"replace",onchange:this.commit,onkeyup:this.commit}),this.caseField=q("input",{type:"checkbox",name:"case",checked:t.caseSensitive,onchange:this.commit}),this.reField=q("input",{type:"checkbox",name:"re",checked:t.regexp,onchange:this.commit});function i(r,s,o){return q("button",{class:"cm-button",name:r,onclick:s,type:"button"},o)}this.dom=q("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>Yi(e),[Te(e,"next")]),i("prev",()=>Ji(e),[Te(e,"previous")]),i("select",()=>yS(e),[Te(e,"all")]),q("label",null,[this.caseField,Te(e,"match case")]),q("label",null,[this.reField,Te(e,"regexp")]),...e.state.readOnly?[]:[q("br"),this.replaceField,i("replace",()=>ru(e),[Te(e,"replace")]),i("replaceAll",()=>bS(e),[Te(e,"replace all")]),q("button",{name:"close",onclick:()=>ou(e),"aria-label":Te(e,"close"),type:"button"},["\xD7"])]])}commit(){let e=new nu({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:In.of(e)}))}keydown(e){Gb(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Ji:Yi)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),ru(this.view))}update(e){for(let t of e.transactions)for(let i of t.effects)i.is(In)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(eo).top}}function Te(n,e){return n.state.phrase(e)}const Xi=30,Qi=/[\s\.,:;?!]/;function so(n,{from:e,to:t}){let i=n.state.doc.lineAt(e),r=n.state.doc.lineAt(t).to,s=Math.max(i.from,e-Xi),o=Math.min(r,t+Xi),l=n.state.sliceDoc(s,o);if(s!=i.from){for(let a=0;a<Xi;a++)if(!Qi.test(l[a+1])&&Qi.test(l[a])){l=l.slice(a);break}}if(o!=r){for(let a=l.length-1;a>l.length-Xi;a--)if(!Qi.test(l[a-1])&&Qi.test(l[a])){l=l.slice(0,a);break}}return P.announce.of(`${n.state.phrase("current match")}. ${l} ${n.state.phrase("on line")} ${i.number}.`)}const kS=P.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),SS=[St,Ht.lowest(gS),kS];class lu{constructor(e,t,i){this.state=e,this.pos=t,this.explicit=i,this.abortListeners=[]}tokenBefore(e){let t=ce(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),i=Math.max(t.from,this.pos-250),r=t.text.slice(i-t.from,this.pos-t.from),s=r.search(hu(e,!1));return s<0?null:{from:i+s,to:this.pos,text:r.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,t){e=="abort"&&this.abortListeners&&this.abortListeners.push(t)}}function au(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function CS(n){let e=Object.create(null),t=Object.create(null);for(let{label:r}of n){e[r[0]]=!0;for(let s=1;s<r.length;s++)t[r[s]]=!0}let i=au(e)+au(t)+"*$";return[new RegExp("^"+i),new RegExp(i)]}function _S(n){let e=n.map(r=>typeof r=="string"?{label:r}:r),[t,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:CS(e);return r=>{let s=r.matchBefore(i);return s||r.explicit?{from:s?s.from:r.pos,options:e,validFor:t}:null}}class cu{constructor(e,t,i){this.completion=e,this.source=t,this.match=i}}function Ct(n){return n.selection.main.head}function hu(n,e){var t;let{source:i}=n,r=e&&i[0]!="^",s=i[i.length-1]!="$";return!r&&!s?n:new RegExp(`${r?"^":""}(?:${i})${s?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":"")}function MS(n,e,t,i){return Object.assign(Object.assign({},n.changeByRange(r=>{if(r==n.selection.main)return{changes:{from:t,to:i,insert:e},range:k.cursor(t+e.length)};let s=i-t;return!r.empty||s&&n.sliceDoc(r.from-s,r.from)!=n.sliceDoc(t,i)?{range:r}:{changes:{from:r.from-s,to:r.from,insert:e},range:k.cursor(r.from-s+e.length)}})),{userEvent:"input.complete"})}function fu(n,e){const t=e.completion.apply||e.completion.label;let i=e.source;typeof t=="string"?n.dispatch(MS(n.state,t,i.from,i.to)):t(n,e.completion,i.from,i.to)}const uu=new WeakMap;function AS(n){if(!Array.isArray(n))return n;let e=uu.get(n);return e||uu.set(n,e=_S(n)),e}class OS{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let t=0;t<e.length;){let i=re(e,t),r=_e(i);this.chars.push(i);let s=e.slice(t,t+r),o=s.toUpperCase();this.folded.push(re(o==s?s.toLowerCase():o,0)),t+=r}this.astral=e.length!=this.chars.length}match(e){if(this.pattern.length==0)return[0];if(e.length<this.pattern.length)return null;let{chars:t,folded:i,any:r,precise:s,byWord:o}=this;if(t.length==1){let v=re(e,0);return v==t[0]?[0,0,_e(v)]:v==i[0]?[-200,0,_e(v)]:null}let l=e.indexOf(this.pattern);if(l==0)return[0,0,this.pattern.length];let a=t.length,h=0;if(l<0){for(let v=0,S=Math.min(e.length,200);v<S&&h<a;){let x=re(e,v);(x==t[h]||x==i[h])&&(r[h++]=v),v+=_e(x)}if(h<a)return null}let f=0,u=0,d=!1,p=0,m=-1,g=-1,y=/[a-z]/.test(e),w=!0;for(let v=0,S=Math.min(e.length,200),x=0;v<S&&u<a;){let C=re(e,v);l<0&&(f<a&&C==t[f]&&(s[f++]=v),p<a&&(C==t[p]||C==i[p]?(p==0&&(m=v),g=v+1,p++):p=0));let b,O=C<255?C>=48&&C<=57||C>=97&&C<=122?2:C>=65&&C<=90?1:0:(b=vr(C))!=b.toLowerCase()?1:b!=b.toUpperCase()?2:0;(!v||O==1&&y||x==0&&O!=0)&&(t[u]==C||i[u]==C&&(d=!0)?o[u++]=v:o.length&&(w=!1)),x=O,v+=_e(C)}return u==a&&o[0]==0&&w?this.result(-100+(d?-200:0),o,e):p==a&&m==0?[-200-e.length,0,g]:l>-1?[-700-e.length,l,l+this.pattern.length]:p==a?[-900-e.length,m,g]:u==a?this.result(-100+(d?-200:0)+-700+(w?0:-1100),o,e):t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,i){let r=[e-i.length],s=1;for(let o of t){let l=o+(this.astral?_e(re(i,o)):1);s>1&&r[s-1]==o?r[s-1]=l:(r[s++]=o,r[s++]=l)}return r}}const et=E.define({combine(n){return tt(n,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],compareCompletions:(e,t)=>e.label.localeCompare(t.label)},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,optionClass:(e,t)=>i=>BS(e(i),t(i)),addToOptions:(e,t)=>e.concat(t)})}});function BS(n,e){return n?e?n+" "+e:n:e}function ES(n){let e=n.addToOptions.slice();return n.icons&&e.push({render(t){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),t.type&&i.classList.add(...t.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(t,i,r){let s=document.createElement("span");s.className="cm-completionLabel";let{label:o}=t,l=0;for(let a=1;a<r.length;){let h=r[a++],f=r[a++];h>l&&s.appendChild(document.createTextNode(o.slice(l,h)));let u=s.appendChild(document.createElement("span"));u.appendChild(document.createTextNode(o.slice(h,f))),u.className="cm-completionMatchedText",l=f}return l<o.length&&s.appendChild(document.createTextNode(o.slice(l))),s},position:50},{render(t){if(!t.detail)return null;let i=document.createElement("span");return i.className="cm-completionDetail",i.textContent=t.detail,i},position:80}),e.sort((t,i)=>t.position-i.position).map(t=>t.render)}function du(n,e,t){if(n<=t)return{from:0,to:n};if(e<0&&(e=0),e<=n>>1){let r=Math.floor(e/t);return{from:r*t,to:(r+1)*t}}let i=Math.floor((n-e)/t);return{from:n-(i+1)*t,to:n-i*t}}class PS{constructor(e,t){this.view=e,this.stateField=t,this.info=null,this.placeInfo={read:()=>this.measureInfo(),write:l=>this.positionInfo(l),key:this};let i=e.state.field(t),{options:r,selected:s}=i.open,o=e.state.facet(et);this.optionContent=ES(o),this.optionClass=o.optionClass,this.range=du(r.length,s,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.dom.addEventListener("mousedown",l=>{for(let a=l.target,h;a&&a!=this.dom;a=a.parentNode)if(a.nodeName=="LI"&&(h=/-(\d+)$/.exec(a.id))&&+h[1]<r.length){fu(e,r[+h[1]]),l.preventDefault();return}}),this.list=this.dom.appendChild(this.createListBox(r,i.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfo)})}mount(){this.updateSel()}update(e){e.state.field(this.stateField)!=e.startState.field(this.stateField)&&this.updateSel()}positioned(){this.info&&this.view.requestMeasure(this.placeInfo)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=du(t.options.length,t.selected,this.view.state.facet(et).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t.options,e.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfo)})),this.updateSelectedOption(t.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:i}=t.options[t.selected],{info:r}=i;if(!r)return;let s=typeof r=="string"?document.createTextNode(r):r(i);if(!s)return;"then"in s?s.then(o=>{o&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(o)}).catch(o=>Ae(this.view.state,o,"completion info")):this.addInfoPane(s)}}addInfoPane(e){let t=this.info=document.createElement("div");t.className="cm-tooltip cm-completionInfo",t.appendChild(e),this.dom.appendChild(t),this.view.requestMeasure(this.placeInfo)}updateSelectedOption(e){let t=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)r==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),t=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected");return t&&$S(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=e.getBoundingClientRect();if(r.top>Math.min(innerHeight,t.bottom)-10||r.bottom<Math.max(0,t.top)+10)return null;let s=Math.max(0,Math.min(r.top,innerHeight-i.height))-t.top,o=this.view.textDirection==G.RTL,l=t.left,a=innerWidth-t.right;return o&&l<Math.min(i.width,a)?o=!1:!o&&a<Math.min(i.width,l)&&(o=!0),{top:s,left:o}}positionInfo(e){this.info&&(this.info.style.top=(e?e.top:-1e6)+"px",e&&(this.info.classList.toggle("cm-completionInfo-left",e.left),this.info.classList.toggle("cm-completionInfo-right",!e.left)))}createListBox(e,t,i){const r=document.createElement("ul");r.id=t,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions"));for(let s=i.from;s<i.to;s++){let{completion:o,match:l}=e[s];const a=r.appendChild(document.createElement("li"));a.id=t+"-"+s,a.setAttribute("role","option");let h=this.optionClass(o);h&&(a.className=h);for(let f of this.optionContent){let u=f(o,this.view.state,l);u&&a.appendChild(u)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}}function DS(n){return e=>new PS(e,n)}function $S(n,e){let t=n.getBoundingClientRect(),i=e.getBoundingClientRect();i.top<t.top?n.scrollTop-=t.top-i.top:i.bottom>t.bottom&&(n.scrollTop+=i.bottom-t.bottom)}function pu(n){return(n.boost||0)*100+(n.apply?10:0)+(n.info?5:0)+(n.type?1:0)}function TS(n,e){let t=[],i=0;for(let l of n)if(l.hasResult())if(l.result.filter===!1){let a=l.result.getMatch;for(let h of l.result.options){let f=[1e9-i++];if(a)for(let u of a(h))f.push(u);t.push(new cu(h,l,f))}}else{let a=new OS(e.sliceDoc(l.from,l.to)),h;for(let f of l.result.options)(h=a.match(f.label))&&(f.boost!=null&&(h[0]+=f.boost),t.push(new cu(f,l,h)))}let r=[],s=null,o=e.facet(et).compareCompletions;for(let l of t.sort((a,h)=>h.match[0]-a.match[0]||o(a.completion,h.completion)))!s||s.label!=l.completion.label||s.detail!=l.completion.detail||s.type!=null&&l.completion.type!=null&&s.type!=l.completion.type||s.apply!=l.completion.apply?r.push(l):pu(l.completion)>pu(s)&&(r[r.length-1]=l),s=l.completion;return r}class zn{constructor(e,t,i,r,s){this.options=e,this.attrs=t,this.tooltip=i,this.timestamp=r,this.selected=s}setSelected(e,t){return e==this.selected||e>=this.options.length?this:new zn(this.options,mu(t,e),this.tooltip,this.timestamp,e)}static build(e,t,i,r,s){let o=TS(e,t);if(!o.length)return null;let l=t.facet(et).selectOnOpen?0:-1;if(r&&r.selected!=l&&r.selected!=-1){let a=r.options[r.selected].completion;for(let h=0;h<o.length;h++)if(o[h].completion==a){l=h;break}}return new zn(o,mu(i,l),{pos:e.reduce((a,h)=>h.hasResult()?Math.min(a,h.from):a,1e8),create:DS(Le),above:s.aboveCursor},r?r.timestamp:Date.now(),l)}map(e){return new zn(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected)}}class Zi{constructor(e,t,i){this.active=e,this.id=t,this.open=i}static start(){return new Zi(RS,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:t}=e,i=t.facet(et),s=(i.override||t.languageDataAt("autocomplete",Ct(t)).map(AS)).map(l=>(this.active.find(h=>h.source==l)||new Se(l,this.active.some(h=>h.state!=0)?1:0)).update(e,i));s.length==this.active.length&&s.every((l,a)=>l==this.active[a])&&(s=this.active);let o=e.selection||s.some(l=>l.hasResult()&&e.changes.touchesRange(l.from,l.to))||!LS(s,this.active)?zn.build(s,t,this.id,this.open,i):this.open&&e.docChanged?this.open.map(e.changes):this.open;!o&&s.every(l=>l.state!=1)&&s.some(l=>l.hasResult())&&(s=s.map(l=>l.hasResult()?new Se(l.source,0):l));for(let l of e.effects)l.is(yu)&&(o=o&&o.setSelected(l.value,this.id));return s==this.active&&o==this.open?this:new Zi(s,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:VS}}function LS(n,e){if(n==e)return!0;for(let t=0,i=0;;){for(;t<n.length&&!n[t].hasResult;)t++;for(;i<e.length&&!e[i].hasResult;)i++;let r=t==n.length,s=i==e.length;if(r||s)return r==s;if(n[t++].result!=e[i++].result)return!1}}const VS={"aria-autocomplete":"list"};function mu(n,e){let t={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":n};return e>-1&&(t["aria-activedescendant"]=n+"-"+e),t}const RS=[];function oo(n){return n.isUserEvent("input.type")?"input":n.isUserEvent("delete.backward")?"delete":null}class Se{constructor(e,t,i=-1){this.source=e,this.state=t,this.explicitPos=i}hasResult(){return!1}update(e,t){let i=oo(e),r=this;i?r=r.handleUserEvent(e,i,t):e.docChanged?r=r.handleChange(e):e.selection&&r.state!=0&&(r=new Se(r.source,0));for(let s of e.effects)if(s.is(lo))r=new Se(r.source,1,s.value?Ct(e.state):-1);else if(s.is(er))r=new Se(r.source,0);else if(s.is(gu))for(let o of s.value)o.source==r.source&&(r=o);return r}handleUserEvent(e,t,i){return t=="delete"||!i.activateOnTyping?this.map(e.changes):new Se(this.source,1)}handleChange(e){return e.changes.touchesRange(Ct(e.startState))?new Se(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Se(this.source,this.state,e.mapPos(this.explicitPos))}}class Hn extends Se{constructor(e,t,i,r,s){super(e,2,t),this.result=i,this.from=r,this.to=s}hasResult(){return!0}handleUserEvent(e,t,i){var r;let s=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),l=Ct(e.state);if((this.explicitPos<0?l<=s:l<this.from)||l>o||t=="delete"&&Ct(e.startState)==this.from)return new Se(this.source,t=="input"&&i.activateOnTyping?1:0);let a=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos),h;return IS(this.result.validFor,e.state,s,o)?new Hn(this.source,a,this.result,s,o):this.result.update&&(h=this.result.update(this.result,s,o,new lu(e.state,l,a>=0)))?new Hn(this.source,a,h,h.from,(r=h.to)!==null&&r!==void 0?r:Ct(e.state)):new Se(this.source,1,a)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new Se(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new Hn(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}function IS(n,e,t,i){if(!n)return!1;let r=e.sliceDoc(t,i);return typeof n=="function"?n(r,t,i,e):hu(n,!0).test(r)}const lo=T.define(),er=T.define(),gu=T.define({map(n,e){return n.map(t=>t.map(e))}}),yu=T.define(),Le=se.define({create(){return Zi.start()},update(n,e){return n.update(e)},provide:n=>[ws.from(n,e=>e.tooltip),P.contentAttributes.from(n,e=>e.attrs)]}),wu=75;function tr(n,e="option"){return t=>{let i=t.state.field(Le,!1);if(!i||!i.open||Date.now()-i.open.timestamp<wu)return!1;let r=1,s;e=="page"&&(s=$v(t,i.open.tooltip))&&(r=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:o}=i.open.options,l=i.open.selected>-1?i.open.selected+r*(n?1:-1):n?0:o-1;return l<0?l=e=="page"?0:o-1:l>=o&&(l=e=="page"?o-1:0),t.dispatch({effects:yu.of(l)}),!0}}const NS=n=>{let e=n.state.field(Le,!1);return n.state.readOnly||!e||!e.open||Date.now()-e.open.timestamp<wu||e.open.selected<0?!1:(fu(n,e.open.options[e.open.selected]),!0)},zS=n=>n.state.field(Le,!1)?(n.dispatch({effects:lo.of(!0)}),!0):!1,HS=n=>{let e=n.state.field(Le,!1);return!e||!e.active.some(t=>t.state!=0)?!1:(n.dispatch({effects:er.of(null)}),!0)};class FS{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const bu=50,WS=50,jS=1e3,US=Z.fromClass(class{constructor(n){this.view=n,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let e of n.state.field(Le).active)e.state==1&&this.startQuery(e)}update(n){let e=n.state.field(Le);if(!n.selectionSet&&!n.docChanged&&n.startState.field(Le)==e)return;let t=n.transactions.some(i=>(i.selection||i.docChanged)&&!oo(i));for(let i=0;i<this.running.length;i++){let r=this.running[i];if(t||r.updates.length+n.transactions.length>WS&&Date.now()-r.time>jS){for(let s of r.context.abortListeners)try{s()}catch(o){Ae(this.view.state,o)}r.context.abortListeners=null,this.running.splice(i--,1)}else r.updates.push(...n.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=e.active.some(i=>i.state==1&&!this.running.some(r=>r.active.source==i.source))?setTimeout(()=>this.startUpdate(),bu):-1,this.composing!=0)for(let i of n.transactions)oo(i)=="input"?this.composing=2:this.composing==2&&i.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:n}=this.view,e=n.field(Le);for(let t of e.active)t.state==1&&!this.running.some(i=>i.active.source==t.source)&&this.startQuery(t)}startQuery(n){let{state:e}=this.view,t=Ct(e),i=new lu(e,t,n.explicitPos==t),r=new FS(n,i);this.running.push(r),Promise.resolve(n.source(i)).then(s=>{r.context.aborted||(r.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:er.of(null)}),Ae(this.view.state,s)})}scheduleAccept(){this.running.every(n=>n.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),bu))}accept(){var n;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(et);for(let i=0;i<this.running.length;i++){let r=this.running[i];if(r.done===void 0)continue;if(this.running.splice(i--,1),r.done){let o=new Hn(r.active.source,r.active.explicitPos,r.done,r.done.from,(n=r.done.to)!==null&&n!==void 0?n:Ct(r.updates.length?r.updates[0].startState:this.view.state));for(let l of r.updates)o=o.update(l,t);if(o.hasResult()){e.push(o);continue}}let s=this.view.state.field(Le).active.find(o=>o.source==r.active.source);if(s&&s.state==1)if(r.done==null){let o=new Se(r.active.source,0);for(let l of r.updates)o=o.update(l,t);o.state!=1&&e.push(o)}else this.startQuery(s)}e.length&&this.view.dispatch({effects:gu.of(e)})}},{eventHandlers:{blur(){let n=this.view.state.field(Le,!1);n&&n.tooltip&&this.view.state.facet(et).closeOnBlur&&this.view.dispatch({effects:er.of(null)})},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:lo.of(!1)}),20),this.composing=0}}}),qS=P.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",listStyle:"none",margin:0,padding:0,"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer",padding:"1px 3px",lineHeight:1.2}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xB7\xB7\xB7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"300px"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25CB'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25CC'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1D465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1D436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1D461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222A'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25A1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1F511}\uFE0E'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25A2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}}),nr={brackets:["(","[","{","'",'"'],before:")]}:;>"},Rt=T.define({map(n,e){let t=e.mapPos(n,-1,me.TrackAfter);return t==null?void 0:t}}),ao=T.define({map(n,e){return e.mapPos(n)}}),co=new class extends Bt{};co.startSide=1,co.endSide=-1;const vu=se.define({create(){return z.empty},update(n,e){if(e.selection){let t=e.state.doc.lineAt(e.selection.main.head).from,i=e.startState.doc.lineAt(e.startState.selection.main.head).from;t!=e.changes.mapPos(i,-1)&&(n=z.empty)}n=n.map(e.changes);for(let t of e.effects)t.is(Rt)?n=n.update({add:[co.range(t.value,t.value+1)]}):t.is(ao)&&(n=n.update({filter:i=>i!=t.value}));return n}});function KS(){return[YS,vu]}const ho="()[]{}<>";function xu(n){for(let e=0;e<ho.length;e+=2)if(ho.charCodeAt(e)==n)return ho.charAt(e+1);return vr(n<128?n:n+1)}function ku(n,e){return n.languageDataAt("closeBrackets",e)[0]||nr}const GS=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),YS=P.inputHandler.of((n,e,t,i)=>{if((GS?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let r=n.state.selection.main;if(i.length>2||i.length==2&&_e(re(i,0))==1||e!=r.from||t!=r.to)return!1;let s=XS(n.state,i);return s?(n.dispatch(s),!0):!1}),JS=[{key:"Backspace",run:({state:n,dispatch:e})=>{if(n.readOnly)return!1;let i=ku(n,n.selection.main.head).brackets||nr.brackets,r=null,s=n.changeByRange(o=>{if(o.empty){let l=QS(n.doc,o.head);for(let a of i)if(a==l&&ir(n.doc,o.head)==xu(re(a,0)))return{changes:{from:o.head-a.length,to:o.head+a.length},range:k.cursor(o.head-a.length),userEvent:"delete.backward"}}return{range:r=o}});return r||e(n.update(s,{scrollIntoView:!0})),!r}}];function XS(n,e){let t=ku(n,n.selection.main.head),i=t.brackets||nr.brackets;for(let r of i){let s=xu(re(r,0));if(e==r)return s==r?tC(n,r,i.indexOf(r+r+r)>-1):ZS(n,r,s,t.before||nr.before);if(e==s&&Su(n,n.selection.main.from))return eC(n,r,s)}return null}function Su(n,e){let t=!1;return n.field(vu).between(0,n.doc.length,i=>{i==e&&(t=!0)}),t}function ir(n,e){let t=n.sliceString(e,e+2);return t.slice(0,_e(re(t,0)))}function QS(n,e){let t=n.sliceString(e-2,e);return _e(re(t,0))==t.length?t:t.slice(1)}function ZS(n,e,t,i){let r=null,s=n.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:Rt.of(o.to+e.length),range:k.range(o.anchor+e.length,o.head+e.length)};let l=ir(n.doc,o.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:e+t,from:o.head},effects:Rt.of(o.head+e.length),range:k.cursor(o.head+e.length)}:{range:r=o}});return r?null:n.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function eC(n,e,t){let i=null,r=n.selection.ranges.map(s=>s.empty&&ir(n.doc,s.head)==t?k.cursor(s.head+t.length):i=s);return i?null:n.update({selection:k.create(r,n.selection.mainIndex),scrollIntoView:!0,effects:n.selection.ranges.map(({from:s})=>ao.of(s))})}function tC(n,e,t){let i=null,r=n.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:e,from:s.to}],effects:Rt.of(s.to+e.length),range:k.range(s.anchor+e.length,s.head+e.length)};let o=s.head,l=ir(n.doc,o);if(l==e){if(Cu(n,o))return{changes:{insert:e+e,from:o},effects:Rt.of(o+e.length),range:k.cursor(o+e.length)};if(Su(n,o)){let a=t&&n.sliceDoc(o,o+e.length*3)==e+e+e;return{range:k.cursor(o+e.length*(a?3:1)),effects:ao.of(o)}}}else{if(t&&n.sliceDoc(o-2*e.length,o)==e+e&&Cu(n,o-2*e.length))return{changes:{insert:e+e+e+e,from:o},effects:Rt.of(o+e.length),range:k.cursor(o+e.length)};if(n.charCategorizer(o)(l)!=ge.Word){let a=n.sliceDoc(o-1,o);if(a!=e&&n.charCategorizer(o)(a)!=ge.Word&&!nC(n,o,e))return{changes:{insert:e+e,from:o},effects:Rt.of(o+e.length),range:k.cursor(o+e.length)}}}return{range:i=s}});return i?null:n.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function Cu(n,e){let t=ce(n).resolveInner(e+1);return t.parent&&t.from==e}function nC(n,e,t){let i=ce(n).resolveInner(e,-1);for(let r=0;r<5;r++){if(n.sliceDoc(i.from,i.from+t.length)==t){let o=i.firstChild;for(;o&&o.from==i.from&&o.to-o.from>t.length;){if(n.sliceDoc(o.to-t.length,o.to)==t)return!1;o=o.firstChild}return!0}let s=i.to==e&&i.parent;if(!s)break;i=s}return!1}function iC(n={}){return[Le,et.of(n),US,rC,qS]}const _u=[{key:"Ctrl-Space",run:zS},{key:"Escape",run:HS},{key:"ArrowDown",run:tr(!0)},{key:"ArrowUp",run:tr(!1)},{key:"PageDown",run:tr(!0,"page")},{key:"PageUp",run:tr(!1,"page")},{key:"Enter",run:NS}],rC=Ht.highest(us.computeN([et],n=>n.facet(et).defaultKeymap?[_u]:[]));class sC{constructor(e,t,i){this.from=e,this.to=t,this.diagnostic=i}}class It{constructor(e,t,i){this.diagnostics=e,this.panel=t,this.selected=i}static init(e,t,i){let r=e,s=i.facet(on).markerFilter;s&&(r=s(r));let o=$.set(r.map(l=>l.from==l.to||l.from==l.to-1&&i.doc.lineAt(l.from).to==l.from?$.widget({widget:new pC(l),diagnostic:l}).range(l.from):$.mark({attributes:{class:"cm-lintRange cm-lintRange-"+l.severity},diagnostic:l}).range(l.from,l.to)),!0);return new It(o,t,sn(o))}}function sn(n,e=null,t=0){let i=null;return n.between(t,1e9,(r,s,{spec:o})=>{if(!(e&&o.diagnostic!=e))return i=new sC(r,s,o.diagnostic),!1}),i}function oC(n,e){return!!(n.effects.some(t=>t.is(fo))||n.changes.touchesRange(e.pos))}function Mu(n,e){return n.field(Be,!1)?e:e.concat(T.appendConfig.of([Be,P.decorations.compute([Be],t=>{let{selected:i,panel:r}=t.field(Be);return!i||!r||i.from==i.to?$.none:$.set([aC.range(i.from,i.to)])}),Dv(cC,{hideOn:oC}),gC]))}function lC(n,e){return{effects:Mu(n,[fo.of(e)])}}const fo=T.define(),uo=T.define(),Au=T.define(),Be=se.define({create(){return new It($.none,null,null)},update(n,e){if(e.docChanged){let t=n.diagnostics.map(e.changes),i=null;if(n.selected){let r=e.changes.mapPos(n.selected.from,1);i=sn(t,n.selected.diagnostic,r)||sn(t,null,r)}n=new It(t,n.panel,i)}for(let t of e.effects)t.is(fo)?n=It.init(t.value,n.panel,e.state):t.is(uo)?n=new It(n.diagnostics,t.value?rr.open:null,n.selected):t.is(Au)&&(n=new It(n.diagnostics,n.panel,t.value));return n},provide:n=>[Bn.from(n,e=>e.panel),P.decorations.from(n,e=>e.diagnostics)]}),aC=$.mark({class:"cm-lintRange cm-lintRange-active"});function cC(n,e,t){let{diagnostics:i}=n.state.field(Be),r=[],s=2e8,o=0;i.between(e-(t<0?1:0),e+(t>0?1:0),(a,h,{spec:f})=>{e>=a&&e<=h&&(a==h||(e>a||t>0)&&(e<h||t<0))&&(r.push(f.diagnostic),s=Math.min(a,s),o=Math.max(h,o))});let l=n.state.facet(on).tooltipFilter;return l&&(r=l(r)),r.length?{pos:s,end:o,above:n.state.doc.lineAt(s).to<o,create(){return{dom:hC(n,r)}}}:null}function hC(n,e){return q("ul",{class:"cm-tooltip-lint"},e.map(t=>Eu(n,t,!1)))}const fC=n=>{let e=n.state.field(Be,!1);(!e||!e.panel)&&n.dispatch({effects:Mu(n.state,[uo.of(!0)])});let t=On(n,rr.open);return t&&t.dom.querySelector(".cm-panel-lint ul").focus(),!0},Ou=n=>{let e=n.state.field(Be,!1);return!e||!e.panel?!1:(n.dispatch({effects:uo.of(!1)}),!0)},uC=[{key:"Mod-Shift-m",run:fC},{key:"F8",run:n=>{let e=n.state.field(Be,!1);if(!e)return!1;let t=n.state.selection.main,i=e.diagnostics.iter(t.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==t.from&&i.to==t.to)?!1:(n.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)}}],dC=Z.fromClass(class{constructor(n){this.view=n,this.timeout=-1,this.set=!0;let{delay:e}=n.state.facet(on);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){let n=Date.now();if(n<this.lintTime-10)setTimeout(this.run,this.lintTime-n);else{this.set=!1;let{state:e}=this.view,{sources:t}=e.facet(on);Promise.all(t.map(i=>Promise.resolve(i(this.view)))).then(i=>{let r=i.reduce((s,o)=>s.concat(o));this.view.state.doc==e.doc&&this.view.dispatch(lC(this.view.state,r))},i=>{Ae(this.view.state,i)})}}update(n){let e=n.state.facet(on);(n.docChanged||e!=n.startState.facet(on))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}}),on=E.define({combine(n){return Object.assign({sources:n.map(e=>e.source)},tt(n.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null}))},enables:dC});function Bu(n){let e=[];if(n)e:for(let{name:t}of n){for(let i=0;i<t.length;i++){let r=t[i];if(/[a-zA-Z]/.test(r)&&!e.some(s=>s.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function Eu(n,e,t){var i;let r=t?Bu(e.actions):[];return q("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},q("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage():e.message),(i=e.actions)===null||i===void 0?void 0:i.map((s,o)=>{let l=u=>{u.preventDefault();let d=sn(n.state.field(Be).diagnostics,e);d&&s.apply(n,d.from,d.to)},{name:a}=s,h=r[o]?a.indexOf(r[o]):-1,f=h<0?a:[a.slice(0,h),q("u",a.slice(h,h+1)),a.slice(h+1)];return q("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${a}${h<0?"":` (access key "${r[o]})"`}.`},f)}),e.source&&q("div",{class:"cm-diagnosticSource"},e.source))}class pC extends mt{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return q("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class Pu{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=Eu(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class rr{constructor(e){this.view=e,this.items=[];let t=r=>{if(r.keyCode==27)Ou(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],o=Bu(s.actions);for(let l=0;l<o.length;l++)if(o[l].toUpperCase().charCodeAt(0)==r.keyCode){let a=sn(this.view.state.field(Be).diagnostics,s);a&&s.actions[l].apply(e,a.from,a.to)}}else return;r.preventDefault()},i=r=>{for(let s=0;s<this.items.length;s++)this.items[s].dom.contains(r.target)&&this.moveSelection(s)};this.list=q("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t,onclick:i}),this.dom=q("div",{class:"cm-panel-lint"},this.list,q("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>Ou(this.view)},"\xD7")),this.update()}get selectedIndex(){let e=this.view.state.field(Be).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(Be),i=0,r=!1,s=null;for(e.between(0,this.view.state.doc.length,(o,l,{spec:a})=>{let h=-1,f;for(let u=i;u<this.items.length;u++)if(this.items[u].diagnostic==a.diagnostic){h=u;break}h<0?(f=new Pu(this.view,a.diagnostic),this.items.splice(i,0,f),r=!0):(f=this.items[h],h>i&&(this.items.splice(i,h-i),r=!0)),t&&f.diagnostic==t.diagnostic?f.dom.hasAttribute("aria-selected")||(f.dom.setAttribute("aria-selected","true"),s=f):f.dom.hasAttribute("aria-selected")&&f.dom.removeAttribute("aria-selected"),i++});i<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();this.items.length==0&&(this.items.push(new Pu(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),s?(this.list.setAttribute("aria-activedescendant",s.id),this.view.requestMeasure({key:this,read:()=>({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:o,panel:l})=>{o.top<l.top?this.list.scrollTop-=l.top-o.top:o.bottom>l.bottom&&(this.list.scrollTop+=o.bottom-l.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)t();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=this.view.state.field(Be),i=sn(t.diagnostics,this.items[e].diagnostic);!i||this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:Au.of(i)})}static open(e){return new rr(e)}}function mC(n,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(n)}</svg>')`}function po(n){return mC(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${n}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const gC=P.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:po("#d11")},".cm-lintRange-warning":{backgroundImage:po("orange")},".cm-lintRange-info":{backgroundImage:po("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),yC=(()=>[Fv(),Uv(),cv(),ok(),Bx(),Xb(),iv(),R.allowMultipleSelections.of(!0),wx(),Px(Tx,{fallback:!0}),zx(),KS(),iC(),xv(),Cv(),mv(),iS(),us.of([...JS,...Qk,...vS,...mk,...Mx,..._u,...uC])])();var wC=["true","false","on","off","yes","no"],bC=new RegExp("\\b(("+wC.join(")|(")+"))$","i");const vC={token:function(n,e){var t=n.peek(),i=e.escaped;if(e.escaped=!1,t=="#"&&(n.pos==0||/\s/.test(n.string.charAt(n.pos-1))))return n.skipToEnd(),"comment";if(n.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(e.literal&&n.indentation()>e.keyCol)return n.skipToEnd(),"string";if(e.literal&&(e.literal=!1),n.sol()){if(e.keyCol=0,e.pair=!1,e.pairStart=!1,n.match("---")||n.match("..."))return"def";if(n.match(/^\s*-\s+/))return"meta"}if(n.match(/^(\{|\}|\[|\])/))return t=="{"?e.inlinePairs++:t=="}"?e.inlinePairs--:t=="["?e.inlineList++:e.inlineList--,"meta";if(e.inlineList>0&&!i&&t==",")return n.next(),"meta";if(e.inlinePairs>0&&!i&&t==",")return e.keyCol=0,e.pair=!1,e.pairStart=!1,n.next(),"meta";if(e.pairStart){if(n.match(/^\s*(\||\>)\s*/))return e.literal=!0,"meta";if(n.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable";if(e.inlinePairs==0&&n.match(/^\s*-?[0-9\.\,]+\s?$/)||e.inlinePairs>0&&n.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(n.match(bC))return"keyword"}return!e.pair&&n.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(e.pair=!0,e.keyCol=n.indentation(),"atom"):e.pair&&n.match(/^:\s*/)?(e.pairStart=!0,"meta"):(e.pairStart=!1,e.escaped=t=="\\",n.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}},languageData:{commentTokens:{line:"#"}}};var xC=c.defineComponent({__name:"Codemirror",props:{modelValue:{default:""},height:{default:"auto"},language:{default:"yaml"},extensions:{default:()=>[]}},emits:["update:modelValue","change"],setup(n,{emit:e}){const t=n,i={yaml:Ns.define(vC)},r=P.theme({"&":{height:t.height}}),s=c.shallowRef(),o=c.shallowRef(),l=c.shallowRef(),a=()=>{let h=[yC,P.lineWrapping,r,i[t.language],P.updateListener.of(f=>{if(f.docChanged){const u=f.state.doc.toString();e("update:modelValue",u),e("change",u)}})];t.extensions&&(h=h.concat(t.extensions)),o.value=R.create({doc:t.modelValue,extensions:h}),l.value=new P({state:o.value,parent:s.value})};return c.onMounted(()=>{a(),c.watch(()=>t.modelValue,h=>{var f,u,d;h!==((f=l.value)==null?void 0:f.state.doc.toString())&&((d=l.value)==null||d.dispatch({changes:{from:0,to:(u=l.value)==null?void 0:u.state.doc.length,insert:h}}))})}),c.onBeforeUnmount(()=>{l.value&&l.value.destroy()}),(h,f)=>(c.openBlock(),c.createElementBlock("div",{ref_key:"wrapper",ref:s,class:"codemirror-wrapper contents"},null,512))}});return M.IconAddCircle=yp,M.IconArrowDown=qu,M.IconArrowDownLine=ed,M.IconArrowLeft=lr,M.IconArrowRight=Fn,M.IconArrowUpLine=Ju,M.IconBookRead=rd,M.IconCheckboxCircle=cr,M.IconCheckboxFill=$p,M.IconClose=Wn,M.IconCloseCircle=mo,M.IconCodeBoxLine=Em,M.IconComputer=Hp,M.IconDashboard=Vu,M.IconDatabase2Line=Tm,M.IconDeleteBin=dp,M.IconErrorWarning=ar,M.IconExchange=im,M.IconEye=zd,M.IconFolder=jd,M.IconForbidLine=go,M.IconGitBranch=bm,M.IconGitHub=lm,M.IconGrid=Bp,M.IconInformation=jn,M.IconList=_p,M.IconListSettings=vd,M.IconMagic=Cd,M.IconMessage=ud,M.IconMore=Gd,M.IconPages=ad,M.IconPalette=gd,M.IconPhone=Up,M.IconPlug=Vd,M.IconSave=xp,M.IconSearch=Rp,M.IconSettings=Dd,M.IconShieldUser=mm,M.IconStopCircle=Sm,M.IconTablet=Yp,M.IconUpload=fm,M.IconUserFollow=Zp,M.IconUserSettings=Od,M.VAlert=Hm,M.VButton=hr,M.VCard=Qm,M.VCheckbox=wo,M.VCheckboxGroup=ig,M.VCodemirror=xC,M.VDialog=Co,M.VDialogProvider=f0,M.VInput=dg,M.VMenu=bo,M.VMenuItem=fr,M.VMenuLabel=vo,M.VModal=xo,M.VOption=Rg,M.VPageHeader=ag,M.VPagination=f2,M.VRadio=ko,M.VRadioGroup=Pg,M.VRoutesMenu=kg,M.VSelect=Lg,M.VSpace=Ng,M.VSwitch=i0,M.VTabItem=jg,M.VTabbar=So,M.VTabs=Fg,M.VTag=Qg,M.VTextarea=t0,M.useDialog=u0,Object.defineProperty(M,"__esModule",{value:!0}),M}({},Vue,VueRouter);
|
|
20
14
|
//# sourceMappingURL=halo-components.iife.js.map
|