diff --git a/css/app.css b/css/app.css index 2c1ffa6..db6188e 100644 --- a/css/app.css +++ b/css/app.css @@ -1 +1 @@ -*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.12 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,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,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af}input::placeholder,textarea::placeholder{color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}[v-cloak]{display:none}b{font-weight:600}[multiple],[type=date],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}[multiple]:focus,[type=date]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,select:focus,textarea:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;color-adjust:exact}[multiple]{background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--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(2px + 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)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0'/%3E%3C/svg%3E")}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px auto -webkit-focus-ring-color}.dark input:-webkit-autofill,.dark input:-webkit-autofill:active,.dark input:-webkit-autofill:focus,.dark input:-webkit-autofill:hover{-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;-webkit-text-fill-color:#fff}.dark input[data-autocompleted]{background-color:transparent!important}.aspect-h-9{--tw-aspect-h:9}.aspect-w-16{position:relative;padding-bottom:calc(var(--tw-aspect-h)/var(--tw-aspect-w)*100%);--tw-aspect-w:16}.aspect-w-16>*{position:absolute;height:100%;width:100%;top:0;right:0;bottom:0;left:0}[role=dialog].z-10{z-index:60}@media (min-width:720px){.search-dialog{transform:translateX(0)}}@media (min-width:960px){.search-dialog{width:20rem}}.search-dialog input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none;height:12px;width:12px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' class='w-5 h-5' viewBox='0 0 123.05 123.05'%3E%3Cpath fill='%23888' d='m121.325 10.925-8.5-8.399c-2.3-2.3-6.1-2.3-8.5 0l-42.4 42.399L18.726 1.726c-2.301-2.301-6.101-2.301-8.5 0l-8.5 8.5c-2.301 2.3-2.301 6.1 0 8.5l43.1 43.1-42.3 42.5c-2.3 2.3-2.3 6.1 0 8.5l8.5 8.5c2.3 2.3 6.1 2.3 8.5 0l42.399-42.4 42.4 42.4c2.3 2.3 6.1 2.3 8.5 0l8.5-8.5c2.3-2.3 2.3-6.1 0-8.5l-42.5-42.4 42.4-42.399a6.13 6.13 0 0 0 .1-8.602'/%3E%3C/svg%3E");background-size:12px 12px}.search-dialog{height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200;flex-direction:column;padding:12vh;transition:width .1s ease-out 0s,opacity .5s ease .2s}.search-dialog .dialog{margin:0 auto;max-width:47.375rem;min-height:0;border-radius:1rem;box-shadow:0 25px 50px -12px rgba(0,0,0,.25)}.search-dialog.open{display:flex}.search-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;height:4.5rem;font-weight:400;color:#000;margin-left:1rem;margin-right:1rem;flex:auto;min-width:0;font-size:1.5rem;border:0 solid}.search-input::-moz-placeholder{color:#9ca3af}.search-input::placeholder{color:#9ca3af}.search-input:focus{outline:2px dotted transparent;box-shadow:none}.search-cancel{flex:none;font-size:0;border-radius:.375rem;border:1px solid #d1d5db;padding:.125rem .375rem}.search-cancel:before{content:"esc";color:#9ca3af;font-size:.875rem;line-height:1.25rem;cursor:pointer}.search-dialog ::-webkit-scrollbar{width:4px}.search-dialog ::-webkit-scrollbar-thumb{background-color:#f9fafb}.group-item[aria-selected=true],.group-item[aria-selected=true] a,.group-item[aria-selected=true] mark{background-color:#42b983;box-shadow:inset 0 0 0 2px #42b983;cursor:pointer;color:#fff}.group-item a{text-decoration:none}.dark mark{background-color:#1e3a8a}@media (min-width:720px){.nav{display:none}}::-webkit-scrollbar{width:8px;height:5px}::-webkit-scrollbar-thumb{background-color:#ccc}.dark::-webkit-scrollbar-thumb{background-color:#374151}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.-inset-x-20{left:-5rem;right:-5rem}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.left-0{left:0}.left-1{left:.25rem}.left-2\.5{left:.625rem}.left-4{left:1rem}.left-\[calc\(50\%-4rem\)\]{left:calc(50% - 4rem)}.left-full{left:100%}.right-0{right:0}.right-2{right:.5rem}.top-0{top:0}.top-1{top:.25rem}.top-1\.5{top:.375rem}.top-10{top:2.5rem}.top-2{top:.5rem}.top-2\/3{top:66.666667%}.isolate{isolation:isolate}.-z-10{z-index:-10}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.col-span-12{grid-column:span 12/span 12}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-4{grid-column:span 4/span 4}.col-span-6{grid-column:span 6/span 6}.-m-2\.5{margin:-.625rem}.m-0{margin:0}.m-1{margin:.25rem}.-mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.-my-1\.5{margin-top:-.375rem;margin-bottom:-.375rem}.-my-2{margin-top:-.5rem;margin-bottom:-.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-8{margin-left:2rem;margin-right:2rem}.mx-auto{margin-left:auto;margin-right:auto}.my-10{margin-top:2.5rem;margin-bottom:2.5rem}.my-12{margin-top:3rem;margin-bottom:3rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-20{margin-top:5rem;margin-bottom:5rem}.my-24{margin-top:6rem;margin-bottom:6rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-8{margin-top:2rem;margin-bottom:2rem}.-mb-px{margin-bottom:-1px}.-ml-0\.5{margin-left:-.125rem}.-ml-20{margin-left:-5rem}.-ml-40{margin-left:-10rem}.-ml-48{margin-left:-12rem}.-ml-px{margin-left:-1px}.-mr-2{margin-right:-.5rem}.-mr-28{margin-right:-7rem}.-mt-1{margin-top:-.25rem}.-mt-3{margin-top:-.75rem}.-mt-48{margin-top:-12rem}.-mt-6{margin-top:-1.5rem}.-mt-8{margin-top:-2rem}.-mt-px{margin-top:-1px}.mb-1{margin-bottom:.25rem}.mb-12{margin-bottom:3rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-20{margin-bottom:5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-\[-12\%\]{margin-bottom:-12%}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-16{margin-right:4rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-5{margin-right:1.25rem}.mr-8{margin-right:2rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-12{margin-top:3rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-24{margin-top:6rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.table-cell{display:table-cell}.flow-root{display:flow-root}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-video{aspect-ratio:16/9}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-24{height:6rem}.h-28{height:7rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-\[0\.58em\]{height:.58em}.h-\[45em\]{height:45em}.h-\[46em\]{height:46em}.h-full{height:100%}.h-screen{height:100vh}.max-h-60{max-height:15rem}.max-h-\[301px\]{max-height:301px}.min-h-0{min-height:0}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-0{width:0}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-28{width:7rem}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-96{width:24rem}.w-\[1330px\]{width:1330px}.w-\[1px\]{width:1px}.w-\[50rem\]{width:50rem}.w-\[69\.25rem\]{width:69.25rem}.w-auto{width:auto}.w-full{width:100%}.w-screen{width:100vw}.min-w-0{min-width:0}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-7xl{max-width:80rem}.max-w-\[100rem\]{max-width:100rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-prose{max-width:65ch}.max-w-screen-md{max-width:768px}.max-w-screen-sm{max-width:640px}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.border-collapse{border-collapse:collapse}.origin-top-left{transform-origin:top left}.-translate-x-full{--tw-translate-x:-100%}.-translate-x-full,.translate-x-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(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}.translate-x-5{--tw-translate-x:1.25rem}.translate-x-5,.translate-x-56{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-56{--tw-translate-x:14rem}.translate-x-\[-100\%\]{--tw-translate-x:-100%}.translate-x-\[-100\%\],.translate-x-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x:100%}.translate-y-0{--tw-translate-y:0px}.translate-y-0,.translate-y-4{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-4{--tw-translate-y:1rem}.rotate-180{--tw-rotate:180deg}.rotate-180,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.scale-100,.scale-95{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-evenly{justify-content:space-evenly}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-10{row-gap:2.5rem}.gap-y-4{row-gap:1rem}.gap-y-5{row-gap:1.25rem}.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*(1 - var(--tw-space-x-reverse)))}.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*(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.space-y-20>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(5rem*var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem*var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-right-width:calc(1px*var(--tw-divide-x-reverse));border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px*var(--tw-divide-y-reverse))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(243 244 246/var(--tw-divide-opacity))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(229 231 235/var(--tw-divide-opacity))}.divide-gray-300>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(209 213 219/var(--tw-divide-opacity))}.divide-gray-700>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(55 65 81/var(--tw-divide-opacity))}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.rounded-tl-none{border-top-left-radius:0}.border{border-width:1px}.border-2{border-width:2px}.border-y{border-top-width:1px}.border-b,.border-y{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.border-none{border-style:none}.border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}.border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity))}.border-indigo-500{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity))}.border-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity))}.border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.border-slate-100{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity))}.border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-yellow-400{--tw-border-opacity:1;border-color:rgb(250 204 21/var(--tw-border-opacity))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity))}.bg-cyan-600{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.bg-gray-900\/80{background-color:rgba(17,24,39,.8)}.bg-green-200{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity))}.bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity))}.bg-indigo-900{--tw-bg-opacity:1;background-color:rgb(49 46 129/var(--tw-bg-opacity))}.bg-purple-600{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity))}.bg-sky-50{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity))}.bg-sky-500{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity))}.bg-sky-600{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity))}.bg-slate-700{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity))}.bg-slate-900{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-white\/10{background-color:hsla(0,0%,100%,.1)}.bg-white\/5{background-color:hsla(0,0%,100%,.05)}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity))}.bg-opacity-75{--tw-bg-opacity:0.75}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-white{--tw-gradient-from:#fff var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.fill-blue-300\/70{fill:rgba(147,197,253,.7)}.fill-gray-300{fill:#d1d5db}.fill-gray-600{fill:#4b5563}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-0{padding-bottom:0}.pb-1{padding-bottom:.25rem}.pb-1\.5{padding-bottom:.375rem}.pb-16{padding-bottom:4rem}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pl-1{padding-left:.25rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-3{padding-left:.75rem}.pl-3\.5{padding-left:.875rem}.pl-4{padding-left:1rem}.pl-5{padding-left:1.25rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-1{padding-right:.25rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.pr-9{padding-right:2.25rem}.pt-0\.5{padding-top:.125rem}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-10{padding-top:2.5rem}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.pt-8{padding-top:2rem}.pt-\[7\%\]{padding-top:7%}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.align-text-bottom{vertical-align:text-bottom}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-6xl{font-size:3.75rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-8{line-height:2rem}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-tighter{letter-spacing:-.05em}.tracking-wider{letter-spacing:.05em}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-200{--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity))}.text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}.text-cyan-200{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity))}.text-cyan-600{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-50{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-green-200{--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity))}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity))}.text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity))}.text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity))}.text-indigo-200{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity))}.text-indigo-400{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity))}.text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity))}.text-indigo-800{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity))}.text-purple-200{--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity))}.text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity))}.text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity))}.text-sky-200{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity))}.text-sky-400{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity))}.text-sky-500{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity))}.text-sky-600{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity))}.text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity))}.text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity))}.placeholder-red-300::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(252 165 165/var(--tw-placeholder-opacity))}.placeholder-red-300::placeholder{--tw-placeholder-opacity:1;color:rgb(252 165 165/var(--tw-placeholder-opacity))}.placeholder-slate-400::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(148 163 184/var(--tw-placeholder-opacity))}.placeholder-slate-400::placeholder{--tw-placeholder-opacity:1;color:rgb(148 163 184/var(--tw-placeholder-opacity))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-90{opacity:.9}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-2xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-sm,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.\!outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--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(var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-0,.ring-1{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-inset{--tw-ring-inset:inset}.ring-black{--tw-ring-opacity:1;--tw-ring-color:rgb(0 0 0/var(--tw-ring-opacity))}.ring-blue-800{--tw-ring-opacity:1;--tw-ring-color:rgb(30 64 175/var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity))}.ring-gray-900\/10{--tw-ring-color:rgba(17,24,39,.1)}.ring-indigo-500{--tw-ring-opacity:1;--tw-ring-color:rgb(99 102 241/var(--tw-ring-opacity))}.ring-red-500{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity))}.ring-white\/10{--tw-ring-color:hsla(0,0%,100%,.1)}.ring-opacity-5{--tw-ring-opacity:0.05}.ring-offset-black{--tw-ring-offset-color:#000}.blur{--tw-blur:blur(8px)}.blur,.blur-3xl{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)}.blur-3xl{--tw-blur:blur(64px)}.\!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)!important}.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{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\[index\:string\]{index:string}.file\:mr-4::file-selector-button{margin-right:1rem}.file\:rounded-full::file-selector-button{border-radius:9999px}.file\:border-0::file-selector-button{border-width:0}.file\:bg-violet-50::file-selector-button{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity))}.file\:px-4::file-selector-button{padding-left:1rem;padding-right:1rem}.file\:py-2::file-selector-button{padding-top:.5rem;padding-bottom:.5rem}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-semibold::file-selector-button{font-weight:600}.file\:text-violet-700::file-selector-button{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity))}.before\:pointer-events-none:before{content:var(--tw-content);pointer-events:none}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:-left-1:before{content:var(--tw-content);left:-.25rem}.before\:top-1\/2:before{content:var(--tw-content);top:50%}.before\:hidden:before{content:var(--tw-content);display:none}.before\:h-1\.5:before{content:var(--tw-content);height:.375rem}.before\:w-1\.5:before{content:var(--tw-content);width:.375rem}.before\:-translate-y-1\/2:before{content:var(--tw-content);--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.before\:rounded-full:before{content:var(--tw-content);border-radius:9999px}.before\:bg-sky-500:before{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity))}.before\:bg-slate-300:before{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity))}.focus-within\:border-indigo-500:focus-within{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity))}.focus-within\:border-red-500:focus-within{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.focus-within\:border-transparent:focus-within{border-color:transparent}.focus-within\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}.focus-within\:ring-1:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-within\:ring-2:focus-within{--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(2px + 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)}.focus-within\:ring-indigo-500:focus-within{--tw-ring-opacity:1;--tw-ring-color:rgb(99 102 241/var(--tw-ring-opacity))}.focus-within\:ring-red-500:focus-within{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity))}.focus-within\:ring-offset-2:focus-within{--tw-ring-offset-width:2px}.hover\:border-gray-300:hover{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.hover\:border-indigo-700:hover{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.hover\:bg-cyan-700:hover{--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.hover\:bg-green-100:hover{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity))}.hover\:bg-green-700:hover{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity))}.hover\:bg-indigo-200:hover{--tw-bg-opacity:1;background-color:rgb(199 210 254/var(--tw-bg-opacity))}.hover\:bg-indigo-500:hover{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity))}.hover\:bg-indigo-700:hover{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity))}.hover\:bg-purple-700:hover{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity))}.hover\:bg-red-200:hover{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity))}.hover\:bg-sky-700:hover{--tw-bg-opacity:1;background-color:rgb(3 105 161/var(--tw-bg-opacity))}.hover\:bg-white:hover{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.hover\:bg-white\/20:hover{background-color:hsla(0,0%,100%,.2)}.hover\:bg-yellow-50:hover{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity))}.hover\:text-blue-600:hover{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.hover\:text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity))}.hover\:text-cyan-800:hover{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity))}.hover\:text-gray-500:hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.hover\:text-green-800:hover{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity))}.hover\:text-indigo-500:hover{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}.hover\:text-indigo-600:hover{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity))}.hover\:text-indigo-800:hover{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity))}.hover\:text-purple-800:hover{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity))}.hover\:text-red-500:hover{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.hover\:text-red-900:hover{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity))}.hover\:text-sky-800:hover{--tw-text-opacity:1;color:rgb(7 89 133/var(--tw-text-opacity))}.hover\:text-slate-600:hover{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:shadow-2xl:hover{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.hover\:shadow-2xl:hover,.hover\:shadow-lg:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.hover\:file\:bg-violet-100::file-selector-button:hover{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity))}.hover\:before\:block:hover:before{content:var(--tw-content);display:block}.focus\:\!border-none:focus{border-style:none!important}.focus\:border-indigo-500:focus{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity))}.focus\:border-red-500:focus{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.focus\:border-sky-500:focus{--tw-border-opacity:1;border-color:rgb(14 165 233/var(--tw-border-opacity))}.focus\:bg-indigo-500:focus{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity))}.focus\:bg-red-500:focus{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.focus\:text-white:focus{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.focus\:\!outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-1:focus,.focus\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--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(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-cyan-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(103 232 249/var(--tw-ring-opacity))}.focus\:ring-cyan-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(6 182 212/var(--tw-ring-opacity))}.focus\:ring-gray-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(107 114 128/var(--tw-ring-opacity))}.focus\:ring-green-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(134 239 172/var(--tw-ring-opacity))}.focus\:ring-green-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(34 197 94/var(--tw-ring-opacity))}.focus\:ring-green-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(22 163 74/var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(99 102 241/var(--tw-ring-opacity))}.focus\:ring-indigo-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(79 70 229/var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity))}.focus\:ring-sky-300:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(125 211 252/var(--tw-ring-opacity))}.focus\:ring-sky-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(14 165 233/var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus\:ring-offset-green-50:focus{--tw-ring-offset-color:#f0fdf4}.focus-visible\:outline:focus-visible{outline-style:solid}.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-indigo-600:focus-visible{outline-color:#4f46e5}.active\:bg-slate-600:active{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity))}.disabled\:border-slate-200:disabled{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity))}.disabled\:bg-blue-400:disabled{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.disabled\:bg-cyan-400:disabled{--tw-bg-opacity:1;background-color:rgb(34 211 238/var(--tw-bg-opacity))}.disabled\:bg-green-400:disabled{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity))}.disabled\:bg-indigo-400:disabled{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity))}.disabled\:bg-purple-400:disabled{--tw-bg-opacity:1;background-color:rgb(192 132 252/var(--tw-bg-opacity))}.disabled\:bg-red-400:disabled{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity))}.disabled\:bg-sky-400:disabled{--tw-bg-opacity:1;background-color:rgb(56 189 248/var(--tw-bg-opacity))}.disabled\:bg-slate-50:disabled{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity))}.disabled\:text-gray-400:disabled{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.disabled\:text-slate-500:disabled{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity))}.disabled\:shadow-none:disabled{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.disabled\:hover\:bg-blue-400:hover:disabled{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.disabled\:hover\:bg-cyan-400:hover:disabled{--tw-bg-opacity:1;background-color:rgb(34 211 238/var(--tw-bg-opacity))}.disabled\:hover\:bg-green-400:hover:disabled{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity))}.disabled\:hover\:bg-indigo-400:hover:disabled{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity))}.disabled\:hover\:bg-purple-400:hover:disabled{--tw-bg-opacity:1;background-color:rgb(192 132 252/var(--tw-bg-opacity))}.disabled\:hover\:bg-red-400:hover:disabled{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity))}.disabled\:hover\:bg-sky-400:hover:disabled{--tw-bg-opacity:1;background-color:rgb(56 189 248/var(--tw-bg-opacity))}.disabled\:hover\:bg-white:hover:disabled{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.group:hover .group-hover\:block{display:block}.group:hover .group-hover\:inline{display:inline}.group:hover .group-hover\:inline-flex{display:inline-flex}.group:hover .group-hover\:bg-indigo-700{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity))}.group:hover .group-hover\:text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.group:hover .group-hover\:text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.group:hover .group-hover\:text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.group:hover .group-hover\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark\:hidden:is(.dark *){display:none}.dark\:divide-gray-700:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(55 65 81/var(--tw-divide-opacity))}.dark\:divide-gray-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(31 41 55/var(--tw-divide-opacity))}.dark\:border-2:is(.dark *){border-width:2px}.dark\:border-gray-600:is(.dark *){--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}.dark\:border-gray-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity))}.dark\:border-pink-600:is(.dark *){--tw-border-opacity:1;border-color:rgb(219 39 119/var(--tw-border-opacity))}.dark\:border-slate-600:is(.dark *){--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity))}.dark\:border-slate-700:is(.dark *){--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity))}.dark\:border-slate-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity))}.dark\:bg-black:is(.dark *){--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.dark\:bg-blue-200:is(.dark *){--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.dark\:bg-blue-600:is(.dark *){--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity))}.dark\:bg-blue-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity))}.dark\:bg-cyan-600:is(.dark *){--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity))}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.dark\:bg-green-200:is(.dark *){--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity))}.dark\:bg-green-600:is(.dark *){--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity))}.dark\:bg-indigo-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity))}.dark\:bg-indigo-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(49 46 129/var(--tw-bg-opacity))}.dark\:bg-red-200:is(.dark *){--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity))}.dark\:bg-red-600:is(.dark *){--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity))}.dark\:bg-red-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity))}.dark\:bg-sky-600:is(.dark *){--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity))}.dark\:bg-slate-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}.dark\:bg-transparent:is(.dark *){background-color:transparent}.dark\:bg-yellow-200:is(.dark *){--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity))}.dark\:fill-gray-300:is(.dark *){fill:#d1d5db}.dark\:text-blue-300:is(.dark *){--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity))}.dark\:text-cyan-400:is(.dark *){--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity))}.dark\:text-gray-100:is(.dark *){--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.dark\:text-gray-50:is(.dark *){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}.dark\:text-gray-500:is(.dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.dark\:text-gray-600:is(.dark *){--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.dark\:text-gray-700:is(.dark *){--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.dark\:text-green-100:is(.dark *){--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity))}.dark\:text-green-400:is(.dark *){--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity))}.dark\:text-green-500:is(.dark *){--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.dark\:text-green-600:is(.dark *){--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity))}.dark\:text-indigo-200:is(.dark *){--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity))}.dark\:text-indigo-300:is(.dark *){--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity))}.dark\:text-indigo-400:is(.dark *){--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity))}.dark\:text-indigo-500:is(.dark *){--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}.dark\:text-purple-400:is(.dark *){--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity))}.dark\:text-red-200:is(.dark *){--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity))}.dark\:text-red-400:is(.dark *){--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity))}.dark\:text-sky-400:is(.dark *){--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity))}.dark\:text-slate-100:is(.dark *){--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity))}.dark\:text-slate-200:is(.dark *){--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity))}.dark\:text-slate-400:is(.dark *){--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}.dark\:text-slate-50:is(.dark *){--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity))}.dark\:text-white:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark\:ring-offset-black:is(.dark *){--tw-ring-offset-color:#000}.dark\:ring-offset-green-200:is(.dark *){--tw-ring-offset-color:#bbf7d0}.dark\:file\:bg-violet-900:is(.dark *)::file-selector-button{--tw-bg-opacity:1;background-color:rgb(76 29 149/var(--tw-bg-opacity))}.dark\:file\:text-violet-200:is(.dark *)::file-selector-button{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity))}.dark\:before\:bg-slate-700:is(.dark *):before{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity))}.dark\:hover\:border-blue-600:hover:is(.dark *){--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity))}.dark\:hover\:border-gray-600:hover:is(.dark *){--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}.dark\:hover\:border-indigo-700:hover:is(.dark *){--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity))}.dark\:hover\:bg-black:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.dark\:hover\:bg-blue-700:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.dark\:hover\:bg-blue-900:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity))}.dark\:hover\:bg-cyan-700:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity))}.dark\:hover\:bg-gray-700:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.dark\:hover\:bg-gray-800:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.dark\:hover\:bg-gray-900:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.dark\:hover\:bg-green-700:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity))}.dark\:hover\:bg-indigo-800:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity))}.dark\:hover\:bg-red-700:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity))}.dark\:hover\:bg-sky-700:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(3 105 161/var(--tw-bg-opacity))}.hover\:dark\:bg-gray-900:is(.dark *):hover{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.dark\:hover\:text-blue-200:hover:is(.dark *){--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity))}.dark\:hover\:text-cyan-200:hover:is(.dark *){--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity))}.dark\:hover\:text-gray-100:hover:is(.dark *){--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.dark\:hover\:text-gray-200:hover:is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.dark\:hover\:text-gray-300:hover:is(.dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.dark\:hover\:text-gray-400:hover:is(.dark *){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.dark\:hover\:text-gray-50:hover:is(.dark *){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}.dark\:hover\:text-green-200:hover:is(.dark *){--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity))}.dark\:hover\:text-indigo-200:hover:is(.dark *){--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity))}.dark\:hover\:text-indigo-400:hover:is(.dark *){--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity))}.dark\:hover\:text-purple-200:hover:is(.dark *){--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity))}.dark\:hover\:text-red-200:hover:is(.dark *){--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity))}.dark\:hover\:text-sky-200:hover:is(.dark *){--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity))}.dark\:hover\:text-slate-300:hover:is(.dark *){--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}.dark\:hover\:text-white:hover:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark\:hover\:file\:bg-violet-800:is(.dark *)::file-selector-button:hover{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity))}.dark\:focus\:text-black:focus:is(.dark *){--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.dark\:focus\:ring-blue-800:focus:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(30 64 175/var(--tw-ring-opacity))}.dark\:focus\:ring-cyan-500:focus:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(6 182 212/var(--tw-ring-opacity))}.dark\:focus\:ring-green-500:focus:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(34 197 94/var(--tw-ring-opacity))}.dark\:focus\:ring-indigo-600:focus:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(79 70 229/var(--tw-ring-opacity))}.dark\:focus\:ring-red-500:focus:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity))}.dark\:focus\:ring-sky-500:focus:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(14 165 233/var(--tw-ring-opacity))}.dark\:disabled\:hover\:bg-black:hover:disabled:is(.dark *){--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.group:hover .dark\:group-hover\:text-white:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}@media (min-width:640px){.sm\:left-\[calc\(50\%-18rem\)\]{left:calc(50% - 18rem)}.sm\:col-span-3{grid-column:span 3/span 3}.sm\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\:-my-px{margin-top:-1px;margin-bottom:-1px}.sm\:mx-0{margin-left:0;margin-right:0}.sm\:mx-4{margin-left:1rem;margin-right:1rem}.sm\:mx-auto{margin-left:auto;margin-right:auto}.sm\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\:ml-6{margin-left:1.5rem}.sm\:mr-4{margin-right:1rem}.sm\:mt-0{margin-top:0}.sm\:mt-20{margin-top:5rem}.sm\:mt-5{margin-top:1.25rem}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:table-cell{display:table-cell}.sm\:hidden{display:none}.sm\:h-44{height:11rem}.sm\:w-1\/2{width:50%}.sm\:w-44{width:11rem}.sm\:w-full{width:100%}.sm\:max-w-3xl{max-width:48rem}.sm\:max-w-5xl{max-width:64rem}.sm\:max-w-lg{max-width:32rem}.sm\:max-w-md{max-width:28rem}.sm\:max-w-prose{max-width:65ch}.sm\:translate-y-0{--tw-translate-y:0px}.sm\:scale-100,.sm\:translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(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}.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)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row-reverse{flex-direction:row-reverse}.sm\:items-center{align-items:center}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.sm\:overflow-hidden{overflow:hidden}.sm\:rounded{border-radius:.25rem}.sm\:rounded-lg{border-radius:.5rem}.sm\:rounded-md{border-radius:.375rem}.sm\:p-0{padding:0}.sm\:p-6{padding:1.5rem}.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-10{padding-left:2.5rem;padding-right:2.5rem}.sm\:px-12{padding-left:3rem;padding-right:3rem}.sm\:px-3{padding-left:.75rem;padding-right:.75rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-32{padding-top:8rem;padding-bottom:8rem}.sm\:py-8{padding-top:2rem;padding-bottom:2rem}.sm\:pb-0{padding-bottom:0}.sm\:pb-4{padding-bottom:1rem}.sm\:pr-6{padding-right:1.5rem}.sm\:text-left{text-align:left}.sm\:text-center{text-align:center}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\:text-5xl{font-size:3rem;line-height:1}.sm\:text-6xl{font-size:3.75rem;line-height:1}.sm\:text-7xl{font-size:4.5rem;line-height:1}.sm\:text-lg{font-size:1.125rem;line-height:1.75rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}.sm\:duration-700{transition-duration:.7s}}@media (min-width:768px){.md\:-mt-px{margin-top:-1px}.md\:mb-12{margin-bottom:3rem}.md\:mb-16{margin-bottom:4rem}.md\:mt-24{margin-top:6rem}.md\:inline{display:inline}.md\:flex{display:flex}.md\:table-cell{display:table-cell}.md\:max-w-xl{max-width:36rem}.md\:flex-row{flex-direction:row}.md\:rounded-lg{border-radius:.5rem}.md\:p-4{padding:1rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:pr-8{padding-right:2rem}.md\:text-left{text-align:left}.md\:text-6xl{font-size:3.75rem;line-height:1}.md\:text-7xl{font-size:4.5rem}.md\:leading-none,.md\:text-7xl{line-height:1}}@media (min-width:1024px){.lg\:fixed{position:fixed}.lg\:inset-y-0{top:0;bottom:0}.lg\:left-48{left:12rem}.lg\:top-\[calc\(50\%-30rem\)\]{top:calc(50% - 30rem)}.lg\:z-10{z-index:10}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:col-span-7{grid-column:span 7/span 7}.lg\:-mx-8{margin-left:-2rem;margin-right:-2rem}.lg\:mx-0{margin-left:0;margin-right:0}.lg\:ml-10{margin-left:2.5rem}.lg\:mr-0{margin-right:0}.lg\:mr-8{margin-right:2rem}.lg\:mt-0{margin-top:0}.lg\:mt-20{margin-top:5rem}.lg\:mt-4{margin-top:1rem}.lg\:mt-6{margin-top:1.5rem}.lg\:block{display:block}.lg\:inline{display:inline}.lg\:flex{display:flex}.lg\:table-cell{display:table-cell}.lg\:hidden{display:none}.lg\:w-1\/2{width:50%}.lg\:w-64{width:16rem}.lg\:w-72{width:18rem}.lg\:max-w-7xl{max-width:80rem}.lg\:max-w-none{max-width:none}.lg\:max-w-screen-md{max-width:768px}.lg\:max-w-xl{max-width:36rem}.lg\:flex-none{flex:none}.lg\:shrink-0{flex-shrink:0}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:flex-col{flex-direction:column}.lg\:gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.lg\:gap-y-16{row-gap:4rem}.lg\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(2rem*var(--tw-space-x-reverse));margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)))}.lg\:space-y-20>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(5rem*var(--tw-space-y-reverse))}.lg\:space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.lg\:border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity))}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pb-28{padding-bottom:7rem}.lg\:pr-8{padding-right:2rem}.lg\:pt-24{padding-top:6rem}.lg\:pt-8{padding-top:2rem}.lg\:text-8xl{font-size:6rem;line-height:1}.lg\:text-base{font-size:1rem;line-height:1.5rem}.lg\:text-lg{font-size:1.125rem;line-height:1.75rem}.lg\:shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}}@media (min-width:1280px){.xl\:left-\[calc\(50\%-24rem\)\]{left:calc(50% - 24rem)}.xl\:col-span-6{grid-column:span 6/span 6}.xl\:ml-32{margin-left:8rem}.xl\:block{display:block}.xl\:inline{display:inline}.xl\:table-cell{display:table-cell}.xl\:w-80{width:20rem}.xl\:max-w-3xl{max-width:48rem}.xl\:max-w-screen-lg{max-width:1024px}.xl\:px-5{padding-left:1.25rem;padding-right:1.25rem}.xl\:text-6xl{font-size:3.75rem;line-height:1}.xl\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:1536px){.\32xl\:block{display:block}.\32xl\:table-cell{display:table-cell}.\32xl\:max-w-screen-xl{max-width:1280px}} \ No newline at end of file +*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.13 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid #e5e7eb}:after,:before{--tw-content:""}:host,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,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af}input::placeholder,textarea::placeholder{color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}.\!container{width:100%!important}.container{width:100%}@media (min-width:640px){.\!container{max-width:640px!important}.container{max-width:640px}}@media (min-width:768px){.\!container{max-width:768px!important}.container{max-width:768px}}@media (min-width:1024px){.\!container{max-width:1024px!important}.container{max-width:1024px}}@media (min-width:1280px){.\!container{max-width:1280px!important}.container{max-width:1280px}}@media (min-width:1536px){.\!container{max-width:1536px!important}.container{max-width:1536px}}[v-cloak]{display:none}b{font-weight:600}[multiple],[type=date],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}[multiple]:focus,[type=date]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,select:focus,textarea:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;color-adjust:exact}[multiple]{background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--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(2px + 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)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0'/%3E%3C/svg%3E")}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px auto -webkit-focus-ring-color}.dark input:-webkit-autofill,.dark input:-webkit-autofill:active,.dark input:-webkit-autofill:focus,.dark input:-webkit-autofill:hover{-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;-webkit-text-fill-color:#fff}.dark input[data-autocompleted]{background-color:transparent!important}.aspect-h-9{--tw-aspect-h:9}.aspect-w-16{position:relative;padding-bottom:calc(var(--tw-aspect-h)/var(--tw-aspect-w)*100%);--tw-aspect-w:16}.aspect-w-16>*{position:absolute;height:100%;width:100%;top:0;right:0;bottom:0;left:0}[role=dialog].z-10{z-index:60}@media (min-width:720px){.search-dialog{transform:translateX(0)}}@media (min-width:960px){.search-dialog{width:20rem}}.search-dialog input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none;height:12px;width:12px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' class='w-5 h-5' viewBox='0 0 123.05 123.05'%3E%3Cpath fill='%23888' d='m121.325 10.925-8.5-8.399c-2.3-2.3-6.1-2.3-8.5 0l-42.4 42.399L18.726 1.726c-2.301-2.301-6.101-2.301-8.5 0l-8.5 8.5c-2.301 2.3-2.301 6.1 0 8.5l43.1 43.1-42.3 42.5c-2.3 2.3-2.3 6.1 0 8.5l8.5 8.5c2.3 2.3 6.1 2.3 8.5 0l42.399-42.4 42.4 42.4c2.3 2.3 6.1 2.3 8.5 0l8.5-8.5c2.3-2.3 2.3-6.1 0-8.5l-42.5-42.4 42.4-42.399a6.13 6.13 0 0 0 .1-8.602'/%3E%3C/svg%3E");background-size:12px 12px}.search-dialog{height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200;flex-direction:column;padding:12vh;transition:width .1s ease-out 0s,opacity .5s ease .2s}.search-dialog .dialog{margin:0 auto;max-width:47.375rem;min-height:0;border-radius:1rem;box-shadow:0 25px 50px -12px rgba(0,0,0,.25)}.search-dialog.open{display:flex}.search-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;height:4.5rem;font-weight:400;color:#000;margin-left:1rem;margin-right:1rem;flex:auto;min-width:0;font-size:1.5rem;border:0 solid}.search-input::-moz-placeholder{color:#9ca3af}.search-input::placeholder{color:#9ca3af}.search-input:focus{outline:2px dotted transparent;box-shadow:none}.search-cancel{flex:none;font-size:0;border-radius:.375rem;border:1px solid #d1d5db;padding:.125rem .375rem}.search-cancel:before{content:"esc";color:#9ca3af;font-size:.875rem;line-height:1.25rem;cursor:pointer}.search-dialog ::-webkit-scrollbar{width:4px}.search-dialog ::-webkit-scrollbar-thumb{background-color:#f9fafb}.group-item[aria-selected=true],.group-item[aria-selected=true] a,.group-item[aria-selected=true] mark{background-color:#42b983;box-shadow:inset 0 0 0 2px #42b983;cursor:pointer;color:#fff}.group-item a{text-decoration:none}.dark mark{background-color:#1e3a8a}@media (min-width:720px){.nav{display:none}}::-webkit-scrollbar{width:8px;height:5px}::-webkit-scrollbar-thumb{background-color:#ccc}.dark::-webkit-scrollbar-thumb{background-color:#374151}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.-inset-x-20{left:-5rem;right:-5rem}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.left-0{left:0}.left-1{left:.25rem}.left-2\.5{left:.625rem}.left-4{left:1rem}.left-\[calc\(50\%-4rem\)\]{left:calc(50% - 4rem)}.left-full{left:100%}.right-0{right:0}.right-2{right:.5rem}.top-0{top:0}.top-1{top:.25rem}.top-1\.5{top:.375rem}.top-10{top:2.5rem}.top-2{top:.5rem}.top-2\/3{top:66.666667%}.isolate{isolation:isolate}.-z-10{z-index:-10}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.col-span-12{grid-column:span 12/span 12}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-4{grid-column:span 4/span 4}.col-span-6{grid-column:span 6/span 6}.-m-2\.5{margin:-.625rem}.m-0{margin:0}.m-1{margin:.25rem}.-mx-1\.5{margin-left:-.375rem;margin-right:-.375rem}.-mx-4{margin-left:-1rem;margin-right:-1rem}.-my-1\.5{margin-top:-.375rem;margin-bottom:-.375rem}.-my-2{margin-top:-.5rem;margin-bottom:-.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-8{margin-left:2rem;margin-right:2rem}.mx-auto{margin-left:auto;margin-right:auto}.my-10{margin-top:2.5rem;margin-bottom:2.5rem}.my-12{margin-top:3rem;margin-bottom:3rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-20{margin-top:5rem;margin-bottom:5rem}.my-24{margin-top:6rem;margin-bottom:6rem}.my-3{margin-top:.75rem;margin-bottom:.75rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-8{margin-top:2rem;margin-bottom:2rem}.-mb-px{margin-bottom:-1px}.-ml-0\.5{margin-left:-.125rem}.-ml-20{margin-left:-5rem}.-ml-40{margin-left:-10rem}.-ml-48{margin-left:-12rem}.-ml-px{margin-left:-1px}.-mr-2{margin-right:-.5rem}.-mr-28{margin-right:-7rem}.-mt-1{margin-top:-.25rem}.-mt-3{margin-top:-.75rem}.-mt-48{margin-top:-12rem}.-mt-6{margin-top:-1.5rem}.-mt-8{margin-top:-2rem}.-mt-px{margin-top:-1px}.mb-1{margin-bottom:.25rem}.mb-12{margin-bottom:3rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-20{margin-bottom:5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.mb-\[-12\%\]{margin-bottom:-12%}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-3{margin-left:.75rem}.ml-4{margin-left:1rem}.ml-6{margin-left:1.5rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-16{margin-right:4rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mr-4{margin-right:1rem}.mr-5{margin-right:1.25rem}.mr-8{margin-right:2rem}.mt-1{margin-top:.25rem}.mt-10{margin-top:2.5rem}.mt-12{margin-top:3rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-24{margin-top:6rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.table-cell{display:table-cell}.flow-root{display:flow-root}.grid{display:grid}.contents{display:contents}.hidden{display:none}.aspect-video{aspect-ratio:16/9}.h-10{height:2.5rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-24{height:6rem}.h-28{height:7rem}.h-32{height:8rem}.h-36{height:9rem}.h-4{height:1rem}.h-40{height:10rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-56{height:14rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-\[0\.58em\]{height:.58em}.h-\[45em\]{height:45em}.h-\[46em\]{height:46em}.h-full{height:100%}.h-screen{height:100vh}.max-h-60{max-height:15rem}.max-h-\[301px\]{max-height:301px}.min-h-0{min-height:0}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-0{width:0}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-28{width:7rem}.w-32{width:8rem}.w-36{width:9rem}.w-4{width:1rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-80{width:20rem}.w-96{width:24rem}.w-\[1330px\]{width:1330px}.w-\[1px\]{width:1px}.w-\[50rem\]{width:50rem}.w-\[69\.25rem\]{width:69.25rem}.w-auto{width:auto}.w-full{width:100%}.w-screen{width:100vw}.min-w-0{min-width:0}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-7xl{max-width:80rem}.max-w-\[100rem\]{max-width:100rem}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-prose{max-width:65ch}.max-w-screen-md{max-width:768px}.max-w-screen-sm{max-width:640px}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.grow-0{flex-grow:0}.border-collapse{border-collapse:collapse}.origin-top-left{transform-origin:top left}.-translate-x-full{--tw-translate-x:-100%}.-translate-x-full,.translate-x-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(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}.translate-x-5{--tw-translate-x:1.25rem}.translate-x-5,.translate-x-56{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-56{--tw-translate-x:14rem}.translate-x-\[-100\%\]{--tw-translate-x:-100%}.translate-x-\[-100\%\],.translate-x-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x:100%}.translate-y-0{--tw-translate-y:0px}.translate-y-0,.translate-y-4{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-4{--tw-translate-y:1rem}.rotate-180{--tw-rotate:180deg}.rotate-180,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.scale-100,.scale-95{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform-gpu{transform:translate3d(var(--tw-translate-x),var(--tw-translate-y),0) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-evenly{justify-content:space-evenly}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-x-6{-moz-column-gap:1.5rem;column-gap:1.5rem}.gap-y-10{row-gap:2.5rem}.gap-y-4{row-gap:1rem}.gap-y-5{row-gap:1.25rem}.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*(1 - var(--tw-space-x-reverse)))}.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*(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem*var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem*var(--tw-space-y-reverse))}.space-y-20>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(5rem*var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1.5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem*var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-right-width:calc(1px*var(--tw-divide-x-reverse));border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse:0;border-top-width:calc(1px*(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px*var(--tw-divide-y-reverse))}.divide-gray-100>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(243 244 246/var(--tw-divide-opacity))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(229 231 235/var(--tw-divide-opacity))}.divide-gray-300>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(209 213 219/var(--tw-divide-opacity))}.divide-gray-700>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(55 65 81/var(--tw-divide-opacity))}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.whitespace-pre{white-space:pre}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.rounded-l-md{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.rounded-r-md{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.rounded-tl-none{border-top-left-radius:0}.border{border-width:1px}.border-2{border-width:2px}.border-y{border-top-width:1px}.border-b,.border-y{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-2{border-left-width:2px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-2{border-top-width:2px}.border-none{border-style:none}.border-blue-400{--tw-border-opacity:1;border-color:rgb(96 165 250/var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}.border-gray-800{--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity))}.border-green-400{--tw-border-opacity:1;border-color:rgb(74 222 128/var(--tw-border-opacity))}.border-indigo-500{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity))}.border-red-300{--tw-border-opacity:1;border-color:rgb(252 165 165/var(--tw-border-opacity))}.border-red-400{--tw-border-opacity:1;border-color:rgb(248 113 113/var(--tw-border-opacity))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.border-slate-100{--tw-border-opacity:1;border-color:rgb(241 245 249/var(--tw-border-opacity))}.border-slate-300{--tw-border-opacity:1;border-color:rgb(203 213 225/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-yellow-400{--tw-border-opacity:1;border-color:rgb(250 204 21/var(--tw-border-opacity))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.bg-blue-200{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.bg-blue-50{--tw-bg-opacity:1;background-color:rgb(239 246 255/var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity))}.bg-cyan-600{--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.bg-gray-900\/80{background-color:rgba(17,24,39,.8)}.bg-green-200{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity))}.bg-indigo-100{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity))}.bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity))}.bg-indigo-600{--tw-bg-opacity:1;background-color:rgb(79 70 229/var(--tw-bg-opacity))}.bg-indigo-700{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity))}.bg-indigo-900{--tw-bg-opacity:1;background-color:rgb(49 46 129/var(--tw-bg-opacity))}.bg-purple-600{--tw-bg-opacity:1;background-color:rgb(147 51 234/var(--tw-bg-opacity))}.bg-red-200{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity))}.bg-sky-50{--tw-bg-opacity:1;background-color:rgb(240 249 255/var(--tw-bg-opacity))}.bg-sky-500{--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity))}.bg-sky-600{--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity))}.bg-slate-100{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity))}.bg-slate-700{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity))}.bg-slate-900{--tw-bg-opacity:1;background-color:rgb(15 23 42/var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-white\/10{background-color:hsla(0,0%,100%,.1)}.bg-white\/5{background-color:hsla(0,0%,100%,.05)}.bg-yellow-50{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity))}.bg-opacity-75{--tw-bg-opacity:0.75}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-white{--tw-gradient-from:#fff var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.fill-blue-300\/70{fill:rgba(147,197,253,.7)}.fill-gray-300{fill:#d1d5db}.fill-gray-600{fill:#4b5563}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-0{padding-bottom:0}.pb-1{padding-bottom:.25rem}.pb-1\.5{padding-bottom:.375rem}.pb-16{padding-bottom:4rem}.pb-2{padding-bottom:.5rem}.pb-20{padding-bottom:5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-5{padding-bottom:1.25rem}.pb-6{padding-bottom:1.5rem}.pb-8{padding-bottom:2rem}.pl-1{padding-left:.25rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-3{padding-left:.75rem}.pl-3\.5{padding-left:.875rem}.pl-4{padding-left:1rem}.pl-5{padding-left:1.25rem}.pl-8{padding-left:2rem}.pl-9{padding-left:2.25rem}.pr-1{padding-right:.25rem}.pr-10{padding-right:2.5rem}.pr-2{padding-right:.5rem}.pr-3{padding-right:.75rem}.pr-4{padding-right:1rem}.pr-6{padding-right:1.5rem}.pr-8{padding-right:2rem}.pr-9{padding-right:2.25rem}.pt-0\.5{padding-top:.125rem}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-10{padding-top:2.5rem}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.pt-8{padding-top:2rem}.pt-\[7\%\]{padding-top:7%}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.align-text-bottom{vertical-align:text-bottom}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-6xl{font-size:3.75rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.leading-7{line-height:1.75rem}.leading-8{line-height:2rem}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-tighter{letter-spacing:-.05em}.tracking-wider{letter-spacing:.05em}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.text-blue-200{--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity))}.text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity:1;color:rgb(59 130 246/var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity))}.text-cyan-200{--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity))}.text-cyan-600{--tw-text-opacity:1;color:rgb(8 145 178/var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-50{--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-green-200{--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity))}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity))}.text-green-500{--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity))}.text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity))}.text-green-900{--tw-text-opacity:1;color:rgb(20 83 45/var(--tw-text-opacity))}.text-indigo-200{--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity))}.text-indigo-400{--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity))}.text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity))}.text-indigo-800{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity))}.text-purple-200{--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity))}.text-purple-600{--tw-text-opacity:1;color:rgb(147 51 234/var(--tw-text-opacity))}.text-red-200{--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity))}.text-red-400{--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.text-red-700{--tw-text-opacity:1;color:rgb(185 28 28/var(--tw-text-opacity))}.text-red-900{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity))}.text-sky-200{--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity))}.text-sky-400{--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity))}.text-sky-500{--tw-text-opacity:1;color:rgb(14 165 233/var(--tw-text-opacity))}.text-sky-600{--tw-text-opacity:1;color:rgb(2 132 199/var(--tw-text-opacity))}.text-slate-500{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity))}.text-slate-600{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity))}.text-slate-700{--tw-text-opacity:1;color:rgb(51 65 85/var(--tw-text-opacity))}.text-slate-900{--tw-text-opacity:1;color:rgb(15 23 42/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-yellow-400{--tw-text-opacity:1;color:rgb(250 204 21/var(--tw-text-opacity))}.text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity))}.placeholder-red-300::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(252 165 165/var(--tw-placeholder-opacity))}.placeholder-red-300::placeholder{--tw-placeholder-opacity:1;color:rgb(252 165 165/var(--tw-placeholder-opacity))}.placeholder-slate-400::-moz-placeholder{--tw-placeholder-opacity:1;color:rgb(148 163 184/var(--tw-placeholder-opacity))}.placeholder-slate-400::placeholder{--tw-placeholder-opacity:1;color:rgb(148 163 184/var(--tw-placeholder-opacity))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-90{opacity:.9}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-2xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-sm,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.\!outline-none{outline:2px solid transparent!important;outline-offset:2px!important}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--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(var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-0,.ring-1{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-inset{--tw-ring-inset:inset}.ring-black{--tw-ring-opacity:1;--tw-ring-color:rgb(0 0 0/var(--tw-ring-opacity))}.ring-gray-300{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity))}.ring-gray-900\/10{--tw-ring-color:rgba(17,24,39,.1)}.ring-indigo-500{--tw-ring-opacity:1;--tw-ring-color:rgb(99 102 241/var(--tw-ring-opacity))}.ring-red-500{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity))}.ring-white\/10{--tw-ring-color:hsla(0,0%,100%,.1)}.ring-opacity-5{--tw-ring-opacity:0.05}.ring-offset-black{--tw-ring-offset-color:#000}.blur{--tw-blur:blur(8px)}.blur,.blur-3xl{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)}.blur-3xl{--tw-blur:blur(64px)}.\!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)!important}.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{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter!important;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter!important;transition-timing-function:cubic-bezier(.4,0,.2,1)!important;transition-duration:.15s!important}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.\[index\:string\]{index:string}.file\:mr-4::file-selector-button{margin-right:1rem}.file\:rounded-full::file-selector-button{border-radius:9999px}.file\:border-0::file-selector-button{border-width:0}.file\:bg-violet-50::file-selector-button{--tw-bg-opacity:1;background-color:rgb(245 243 255/var(--tw-bg-opacity))}.file\:px-4::file-selector-button{padding-left:1rem;padding-right:1rem}.file\:py-2::file-selector-button{padding-top:.5rem;padding-bottom:.5rem}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-semibold::file-selector-button{font-weight:600}.file\:text-violet-700::file-selector-button{--tw-text-opacity:1;color:rgb(109 40 217/var(--tw-text-opacity))}.before\:pointer-events-none:before{content:var(--tw-content);pointer-events:none}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:-left-1:before{content:var(--tw-content);left:-.25rem}.before\:top-1\/2:before{content:var(--tw-content);top:50%}.before\:hidden:before{content:var(--tw-content);display:none}.before\:h-1\.5:before{content:var(--tw-content);height:.375rem}.before\:w-1\.5:before{content:var(--tw-content);width:.375rem}.before\:-translate-y-1\/2:before{content:var(--tw-content);--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.before\:rounded-full:before{content:var(--tw-content);border-radius:9999px}.before\:bg-sky-500:before{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(14 165 233/var(--tw-bg-opacity))}.before\:bg-slate-300:before{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(203 213 225/var(--tw-bg-opacity))}.focus-within\:border-indigo-500:focus-within{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity))}.focus-within\:border-red-500:focus-within{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.focus-within\:border-transparent:focus-within{border-color:transparent}.focus-within\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}.focus-within\:ring-1:focus-within{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-within\:ring-2:focus-within{--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(2px + 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)}.focus-within\:ring-indigo-500:focus-within{--tw-ring-opacity:1;--tw-ring-color:rgb(99 102 241/var(--tw-ring-opacity))}.focus-within\:ring-red-500:focus-within{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity))}.focus-within\:ring-offset-2:focus-within{--tw-ring-offset-width:2px}.hover\:border-gray-300:hover{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.hover\:border-indigo-700:hover{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity))}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.hover\:bg-cyan-700:hover{--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.hover\:bg-green-100:hover{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity))}.hover\:bg-green-700:hover{--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity))}.hover\:bg-indigo-200:hover{--tw-bg-opacity:1;background-color:rgb(199 210 254/var(--tw-bg-opacity))}.hover\:bg-indigo-500:hover{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity))}.hover\:bg-indigo-700:hover{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity))}.hover\:bg-purple-700:hover{--tw-bg-opacity:1;background-color:rgb(126 34 206/var(--tw-bg-opacity))}.hover\:bg-red-200:hover{--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity))}.hover\:bg-red-700:hover{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity))}.hover\:bg-sky-700:hover{--tw-bg-opacity:1;background-color:rgb(3 105 161/var(--tw-bg-opacity))}.hover\:bg-white:hover{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.hover\:bg-white\/20:hover{background-color:hsla(0,0%,100%,.2)}.hover\:bg-yellow-50:hover{--tw-bg-opacity:1;background-color:rgb(254 252 232/var(--tw-bg-opacity))}.hover\:text-blue-600:hover{--tw-text-opacity:1;color:rgb(37 99 235/var(--tw-text-opacity))}.hover\:text-blue-800:hover{--tw-text-opacity:1;color:rgb(30 64 175/var(--tw-text-opacity))}.hover\:text-cyan-800:hover{--tw-text-opacity:1;color:rgb(21 94 117/var(--tw-text-opacity))}.hover\:text-gray-500:hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.hover\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.hover\:text-green-800:hover{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity))}.hover\:text-indigo-500:hover{--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}.hover\:text-indigo-600:hover{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity))}.hover\:text-indigo-800:hover{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity))}.hover\:text-purple-800:hover{--tw-text-opacity:1;color:rgb(107 33 168/var(--tw-text-opacity))}.hover\:text-red-500:hover{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity))}.hover\:text-red-900:hover{--tw-text-opacity:1;color:rgb(127 29 29/var(--tw-text-opacity))}.hover\:text-sky-800:hover{--tw-text-opacity:1;color:rgb(7 89 133/var(--tw-text-opacity))}.hover\:text-slate-600:hover{--tw-text-opacity:1;color:rgb(71 85 105/var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.hover\:no-underline:hover{text-decoration-line:none}.hover\:shadow-2xl:hover{--tw-shadow:0 25px 50px -12px rgba(0,0,0,.25);--tw-shadow-colored:0 25px 50px -12px var(--tw-shadow-color)}.hover\:shadow-2xl:hover,.hover\:shadow-lg:hover{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.hover\:file\:bg-violet-100::file-selector-button:hover{--tw-bg-opacity:1;background-color:rgb(237 233 254/var(--tw-bg-opacity))}.hover\:before\:block:hover:before{content:var(--tw-content);display:block}.focus\:\!border-none:focus{border-style:none!important}.focus\:border-indigo-500:focus{--tw-border-opacity:1;border-color:rgb(99 102 241/var(--tw-border-opacity))}.focus\:border-red-500:focus{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity))}.focus\:border-sky-500:focus{--tw-border-opacity:1;border-color:rgb(14 165 233/var(--tw-border-opacity))}.focus\:bg-indigo-500:focus{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity))}.focus\:bg-red-500:focus{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity))}.focus\:text-white:focus{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.focus\:\!outline-none:focus{outline:2px solid transparent!important;outline-offset:2px!important}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-1:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-1:focus,.focus\:ring-2:focus{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-2:focus{--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(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.focus\:ring-cyan-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(6 182 212/var(--tw-ring-opacity))}.focus\:ring-gray-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(107 114 128/var(--tw-ring-opacity))}.focus\:ring-green-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(34 197 94/var(--tw-ring-opacity))}.focus\:ring-green-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(22 163 74/var(--tw-ring-opacity))}.focus\:ring-indigo-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(99 102 241/var(--tw-ring-opacity))}.focus\:ring-indigo-600:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(79 70 229/var(--tw-ring-opacity))}.focus\:ring-red-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity))}.focus\:ring-sky-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(14 165 233/var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus\:ring-offset-green-50:focus{--tw-ring-offset-color:#f0fdf4}.focus-visible\:outline:focus-visible{outline-style:solid}.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-indigo-600:focus-visible{outline-color:#4f46e5}.active\:bg-slate-600:active{--tw-bg-opacity:1;background-color:rgb(71 85 105/var(--tw-bg-opacity))}.disabled\:border-slate-200:disabled{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity))}.disabled\:bg-blue-400:disabled{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.disabled\:bg-cyan-400:disabled{--tw-bg-opacity:1;background-color:rgb(34 211 238/var(--tw-bg-opacity))}.disabled\:bg-green-400:disabled{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity))}.disabled\:bg-indigo-400:disabled{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity))}.disabled\:bg-purple-400:disabled{--tw-bg-opacity:1;background-color:rgb(192 132 252/var(--tw-bg-opacity))}.disabled\:bg-red-400:disabled{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity))}.disabled\:bg-sky-400:disabled{--tw-bg-opacity:1;background-color:rgb(56 189 248/var(--tw-bg-opacity))}.disabled\:bg-slate-50:disabled{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity))}.disabled\:text-gray-400:disabled{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.disabled\:text-slate-500:disabled{--tw-text-opacity:1;color:rgb(100 116 139/var(--tw-text-opacity))}.disabled\:shadow-none:disabled{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.disabled\:hover\:bg-blue-400:hover:disabled{--tw-bg-opacity:1;background-color:rgb(96 165 250/var(--tw-bg-opacity))}.disabled\:hover\:bg-cyan-400:hover:disabled{--tw-bg-opacity:1;background-color:rgb(34 211 238/var(--tw-bg-opacity))}.disabled\:hover\:bg-green-400:hover:disabled{--tw-bg-opacity:1;background-color:rgb(74 222 128/var(--tw-bg-opacity))}.disabled\:hover\:bg-indigo-400:hover:disabled{--tw-bg-opacity:1;background-color:rgb(129 140 248/var(--tw-bg-opacity))}.disabled\:hover\:bg-purple-400:hover:disabled{--tw-bg-opacity:1;background-color:rgb(192 132 252/var(--tw-bg-opacity))}.disabled\:hover\:bg-red-400:hover:disabled{--tw-bg-opacity:1;background-color:rgb(248 113 113/var(--tw-bg-opacity))}.disabled\:hover\:bg-sky-400:hover:disabled{--tw-bg-opacity:1;background-color:rgb(56 189 248/var(--tw-bg-opacity))}.disabled\:hover\:bg-white:hover:disabled{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.group:hover .group-hover\:block{display:block}.group:hover .group-hover\:inline{display:inline}.group:hover .group-hover\:inline-flex{display:inline-flex}.group:hover .group-hover\:bg-indigo-700{--tw-bg-opacity:1;background-color:rgb(67 56 202/var(--tw-bg-opacity))}.group:hover .group-hover\:text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.group:hover .group-hover\:text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.group:hover .group-hover\:text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.group:hover .group-hover\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark\:hidden:is(.dark *){display:none}.dark\:divide-gray-700:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(55 65 81/var(--tw-divide-opacity))}.dark\:divide-gray-800:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(31 41 55/var(--tw-divide-opacity))}.dark\:border-2:is(.dark *){border-width:2px}.dark\:border-gray-600:is(.dark *){--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}.dark\:border-gray-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(31 41 55/var(--tw-border-opacity))}.dark\:border-pink-600:is(.dark *){--tw-border-opacity:1;border-color:rgb(219 39 119/var(--tw-border-opacity))}.dark\:border-slate-600:is(.dark *){--tw-border-opacity:1;border-color:rgb(71 85 105/var(--tw-border-opacity))}.dark\:border-slate-700:is(.dark *){--tw-border-opacity:1;border-color:rgb(51 65 85/var(--tw-border-opacity))}.dark\:border-slate-800:is(.dark *){--tw-border-opacity:1;border-color:rgb(30 41 59/var(--tw-border-opacity))}.dark\:bg-black:is(.dark *){--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.dark\:bg-blue-200:is(.dark *){--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity))}.dark\:bg-blue-600:is(.dark *){--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity))}.dark\:bg-blue-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity))}.dark\:bg-cyan-600:is(.dark *){--tw-bg-opacity:1;background-color:rgb(8 145 178/var(--tw-bg-opacity))}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.dark\:bg-green-200:is(.dark *){--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity))}.dark\:bg-green-600:is(.dark *){--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity))}.dark\:bg-indigo-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity))}.dark\:bg-indigo-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(49 46 129/var(--tw-bg-opacity))}.dark\:bg-red-200:is(.dark *){--tw-bg-opacity:1;background-color:rgb(254 202 202/var(--tw-bg-opacity))}.dark\:bg-red-600:is(.dark *){--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity))}.dark\:bg-red-900:is(.dark *){--tw-bg-opacity:1;background-color:rgb(127 29 29/var(--tw-bg-opacity))}.dark\:bg-sky-600:is(.dark *){--tw-bg-opacity:1;background-color:rgb(2 132 199/var(--tw-bg-opacity))}.dark\:bg-slate-800:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}.dark\:bg-transparent:is(.dark *){background-color:transparent}.dark\:bg-yellow-200:is(.dark *){--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity))}.dark\:fill-gray-300:is(.dark *){fill:#d1d5db}.dark\:text-black:is(.dark *){--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.dark\:text-blue-300:is(.dark *){--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity))}.dark\:text-blue-400:is(.dark *){--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity))}.dark\:text-cyan-400:is(.dark *){--tw-text-opacity:1;color:rgb(34 211 238/var(--tw-text-opacity))}.dark\:text-gray-100:is(.dark *){--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.dark\:text-gray-50:is(.dark *){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}.dark\:text-gray-500:is(.dark *){--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.dark\:text-gray-600:is(.dark *){--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.dark\:text-gray-700:is(.dark *){--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.dark\:text-green-100:is(.dark *){--tw-text-opacity:1;color:rgb(220 252 231/var(--tw-text-opacity))}.dark\:text-green-400:is(.dark *){--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity))}.dark\:text-green-500:is(.dark *){--tw-text-opacity:1;color:rgb(34 197 94/var(--tw-text-opacity))}.dark\:text-green-600:is(.dark *){--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity))}.dark\:text-indigo-200:is(.dark *){--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity))}.dark\:text-indigo-300:is(.dark *){--tw-text-opacity:1;color:rgb(165 180 252/var(--tw-text-opacity))}.dark\:text-indigo-400:is(.dark *){--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity))}.dark\:text-indigo-500:is(.dark *){--tw-text-opacity:1;color:rgb(99 102 241/var(--tw-text-opacity))}.dark\:text-purple-400:is(.dark *){--tw-text-opacity:1;color:rgb(192 132 252/var(--tw-text-opacity))}.dark\:text-red-200:is(.dark *){--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity))}.dark\:text-red-400:is(.dark *){--tw-text-opacity:1;color:rgb(248 113 113/var(--tw-text-opacity))}.dark\:text-sky-400:is(.dark *){--tw-text-opacity:1;color:rgb(56 189 248/var(--tw-text-opacity))}.dark\:text-slate-100:is(.dark *){--tw-text-opacity:1;color:rgb(241 245 249/var(--tw-text-opacity))}.dark\:text-slate-200:is(.dark *){--tw-text-opacity:1;color:rgb(226 232 240/var(--tw-text-opacity))}.dark\:text-slate-400:is(.dark *){--tw-text-opacity:1;color:rgb(148 163 184/var(--tw-text-opacity))}.dark\:text-slate-50:is(.dark *){--tw-text-opacity:1;color:rgb(248 250 252/var(--tw-text-opacity))}.dark\:text-white:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark\:ring-offset-black:is(.dark *){--tw-ring-offset-color:#000}.dark\:ring-offset-green-200:is(.dark *){--tw-ring-offset-color:#bbf7d0}.dark\:file\:bg-violet-900:is(.dark *)::file-selector-button{--tw-bg-opacity:1;background-color:rgb(76 29 149/var(--tw-bg-opacity))}.dark\:file\:text-violet-200:is(.dark *)::file-selector-button{--tw-text-opacity:1;color:rgb(221 214 254/var(--tw-text-opacity))}.dark\:before\:bg-slate-700:is(.dark *):before{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity))}.dark\:hover\:border-blue-600:hover:is(.dark *){--tw-border-opacity:1;border-color:rgb(37 99 235/var(--tw-border-opacity))}.dark\:hover\:border-gray-600:hover:is(.dark *){--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity))}.dark\:hover\:border-indigo-700:hover:is(.dark *){--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity))}.dark\:hover\:bg-black:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.dark\:hover\:bg-blue-700:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity))}.dark\:hover\:bg-blue-900:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(30 58 138/var(--tw-bg-opacity))}.dark\:hover\:bg-cyan-700:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(14 116 144/var(--tw-bg-opacity))}.dark\:hover\:bg-gray-700:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.dark\:hover\:bg-gray-800:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.dark\:hover\:bg-gray-900:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.dark\:hover\:bg-green-700:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(21 128 61/var(--tw-bg-opacity))}.dark\:hover\:bg-indigo-800:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(55 48 163/var(--tw-bg-opacity))}.dark\:hover\:bg-red-700:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity))}.dark\:hover\:bg-sky-700:hover:is(.dark *){--tw-bg-opacity:1;background-color:rgb(3 105 161/var(--tw-bg-opacity))}.hover\:dark\:bg-gray-900:is(.dark *):hover{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.dark\:hover\:text-blue-200:hover:is(.dark *){--tw-text-opacity:1;color:rgb(191 219 254/var(--tw-text-opacity))}.dark\:hover\:text-cyan-200:hover:is(.dark *){--tw-text-opacity:1;color:rgb(165 243 252/var(--tw-text-opacity))}.dark\:hover\:text-gray-100:hover:is(.dark *){--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.dark\:hover\:text-gray-200:hover:is(.dark *){--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.dark\:hover\:text-gray-300:hover:is(.dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.dark\:hover\:text-gray-400:hover:is(.dark *){--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.dark\:hover\:text-gray-50:hover:is(.dark *){--tw-text-opacity:1;color:rgb(249 250 251/var(--tw-text-opacity))}.dark\:hover\:text-green-200:hover:is(.dark *){--tw-text-opacity:1;color:rgb(187 247 208/var(--tw-text-opacity))}.dark\:hover\:text-indigo-200:hover:is(.dark *){--tw-text-opacity:1;color:rgb(199 210 254/var(--tw-text-opacity))}.dark\:hover\:text-indigo-400:hover:is(.dark *){--tw-text-opacity:1;color:rgb(129 140 248/var(--tw-text-opacity))}.dark\:hover\:text-purple-200:hover:is(.dark *){--tw-text-opacity:1;color:rgb(233 213 255/var(--tw-text-opacity))}.dark\:hover\:text-red-200:hover:is(.dark *){--tw-text-opacity:1;color:rgb(254 202 202/var(--tw-text-opacity))}.dark\:hover\:text-sky-200:hover:is(.dark *){--tw-text-opacity:1;color:rgb(186 230 253/var(--tw-text-opacity))}.dark\:hover\:text-slate-300:hover:is(.dark *){--tw-text-opacity:1;color:rgb(203 213 225/var(--tw-text-opacity))}.dark\:hover\:text-white:hover:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark\:hover\:file\:bg-violet-800:is(.dark *)::file-selector-button:hover{--tw-bg-opacity:1;background-color:rgb(91 33 182/var(--tw-bg-opacity))}.dark\:focus\:text-black:focus:is(.dark *){--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity))}.dark\:focus\:ring-blue-800:focus:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(30 64 175/var(--tw-ring-opacity))}.dark\:focus\:ring-cyan-500:focus:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(6 182 212/var(--tw-ring-opacity))}.dark\:focus\:ring-green-500:focus:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(34 197 94/var(--tw-ring-opacity))}.dark\:focus\:ring-indigo-600:focus:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(79 70 229/var(--tw-ring-opacity))}.dark\:focus\:ring-red-500:focus:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(239 68 68/var(--tw-ring-opacity))}.dark\:focus\:ring-sky-500:focus:is(.dark *){--tw-ring-opacity:1;--tw-ring-color:rgb(14 165 233/var(--tw-ring-opacity))}.dark\:disabled\:hover\:bg-black:hover:disabled:is(.dark *){--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.group:hover .dark\:group-hover\:text-white:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}@media (min-width:640px){.sm\:left-\[calc\(50\%-18rem\)\]{left:calc(50% - 18rem)}.sm\:col-span-3{grid-column:span 3/span 3}.sm\:-mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.sm\:-my-px{margin-top:-1px;margin-bottom:-1px}.sm\:mx-0{margin-left:0;margin-right:0}.sm\:mx-4{margin-left:1rem;margin-right:1rem}.sm\:mx-auto{margin-left:auto;margin-right:auto}.sm\:my-8{margin-top:2rem;margin-bottom:2rem}.sm\:ml-6{margin-left:1.5rem}.sm\:mr-4{margin-right:1rem}.sm\:mt-0{margin-top:0}.sm\:mt-20{margin-top:5rem}.sm\:mt-5{margin-top:1.25rem}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:table-cell{display:table-cell}.sm\:hidden{display:none}.sm\:h-44{height:11rem}.sm\:w-1\/2{width:50%}.sm\:w-44{width:11rem}.sm\:w-full{width:100%}.sm\:max-w-3xl{max-width:48rem}.sm\:max-w-5xl{max-width:64rem}.sm\:max-w-lg{max-width:32rem}.sm\:max-w-md{max-width:28rem}.sm\:max-w-prose{max-width:65ch}.sm\:translate-y-0{--tw-translate-y:0px}.sm\:scale-100,.sm\:translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(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}.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)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row-reverse{flex-direction:row-reverse}.sm\:items-center{align-items:center}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem*var(--tw-space-x-reverse));margin-left:calc(1rem*(1 - var(--tw-space-x-reverse)))}.sm\:overflow-hidden{overflow:hidden}.sm\:rounded{border-radius:.25rem}.sm\:rounded-lg{border-radius:.5rem}.sm\:rounded-md{border-radius:.375rem}.sm\:p-0{padding:0}.sm\:p-6{padding:1.5rem}.sm\:px-0{padding-left:0;padding-right:0}.sm\:px-10{padding-left:2.5rem;padding-right:2.5rem}.sm\:px-12{padding-left:3rem;padding-right:3rem}.sm\:px-3{padding-left:.75rem;padding-right:.75rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-32{padding-top:8rem;padding-bottom:8rem}.sm\:py-8{padding-top:2rem;padding-bottom:2rem}.sm\:pb-0{padding-bottom:0}.sm\:pb-4{padding-bottom:1rem}.sm\:pr-6{padding-right:1.5rem}.sm\:text-left{text-align:left}.sm\:text-center{text-align:center}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\:text-5xl{font-size:3rem;line-height:1}.sm\:text-6xl{font-size:3.75rem;line-height:1}.sm\:text-7xl{font-size:4.5rem;line-height:1}.sm\:text-lg{font-size:1.125rem;line-height:1.75rem}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}.sm\:text-xl{font-size:1.25rem;line-height:1.75rem}.sm\:duration-700{transition-duration:.7s}}@media (min-width:768px){.md\:-mt-px{margin-top:-1px}.md\:mb-12{margin-bottom:3rem}.md\:mb-16{margin-bottom:4rem}.md\:mt-24{margin-top:6rem}.md\:inline{display:inline}.md\:flex{display:flex}.md\:table-cell{display:table-cell}.md\:max-w-xl{max-width:36rem}.md\:flex-row{flex-direction:row}.md\:rounded-lg{border-radius:.5rem}.md\:p-4{padding:1rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:pr-8{padding-right:2rem}.md\:text-left{text-align:left}.md\:text-6xl{font-size:3.75rem;line-height:1}.md\:text-7xl{font-size:4.5rem}.md\:leading-none,.md\:text-7xl{line-height:1}}@media (min-width:1024px){.lg\:fixed{position:fixed}.lg\:inset-y-0{top:0;bottom:0}.lg\:left-48{left:12rem}.lg\:top-\[calc\(50\%-30rem\)\]{top:calc(50% - 30rem)}.lg\:z-10{z-index:10}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:col-span-7{grid-column:span 7/span 7}.lg\:-mx-8{margin-left:-2rem;margin-right:-2rem}.lg\:mx-0{margin-left:0;margin-right:0}.lg\:ml-10{margin-left:2.5rem}.lg\:mr-0{margin-right:0}.lg\:mr-8{margin-right:2rem}.lg\:mt-0{margin-top:0}.lg\:mt-20{margin-top:5rem}.lg\:mt-4{margin-top:1rem}.lg\:mt-6{margin-top:1.5rem}.lg\:block{display:block}.lg\:inline{display:inline}.lg\:flex{display:flex}.lg\:table-cell{display:table-cell}.lg\:hidden{display:none}.lg\:w-1\/2{width:50%}.lg\:w-64{width:16rem}.lg\:w-72{width:18rem}.lg\:max-w-7xl{max-width:80rem}.lg\:max-w-none{max-width:none}.lg\:max-w-screen-md{max-width:768px}.lg\:max-w-xl{max-width:36rem}.lg\:flex-none{flex:none}.lg\:shrink-0{flex-shrink:0}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:flex-col{flex-direction:column}.lg\:gap-x-8{-moz-column-gap:2rem;column-gap:2rem}.lg\:gap-y-16{row-gap:4rem}.lg\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(2rem*var(--tw-space-x-reverse));margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)))}.lg\:space-y-20>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(5rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(5rem*var(--tw-space-y-reverse))}.lg\:space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem*var(--tw-space-y-reverse))}.lg\:border-slate-200{--tw-border-opacity:1;border-color:rgb(226 232 240/var(--tw-border-opacity))}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:pb-28{padding-bottom:7rem}.lg\:pr-8{padding-right:2rem}.lg\:pt-24{padding-top:6rem}.lg\:pt-8{padding-top:2rem}.lg\:text-8xl{font-size:6rem;line-height:1}.lg\:text-base{font-size:1rem;line-height:1.5rem}.lg\:text-lg{font-size:1.125rem;line-height:1.75rem}.lg\:shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}}@media (min-width:1280px){.xl\:left-\[calc\(50\%-24rem\)\]{left:calc(50% - 24rem)}.xl\:col-span-6{grid-column:span 6/span 6}.xl\:ml-32{margin-left:8rem}.xl\:block{display:block}.xl\:inline{display:inline}.xl\:table-cell{display:table-cell}.xl\:w-80{width:20rem}.xl\:max-w-3xl{max-width:48rem}.xl\:max-w-screen-lg{max-width:1024px}.xl\:px-5{padding-left:1.25rem;padding-right:1.25rem}.xl\:text-6xl{font-size:3.75rem;line-height:1}.xl\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:1536px){.\32xl\:block{display:block}.\32xl\:table-cell{display:table-cell}.\32xl\:max-w-screen-xl{max-width:1280px}} \ No newline at end of file diff --git a/lib/mjs/servicestack-client.min.mjs b/lib/mjs/servicestack-client.min.mjs index 3bbc79d..10baa79 100644 --- a/lib/mjs/servicestack-client.min.mjs +++ b/lib/mjs/servicestack-client.min.mjs @@ -1 +1 @@ -class ResponseStatus{constructor(e){Object.assign(this,e)}errorCode;message;stackTrace;errors;meta}class ResponseError{constructor(e){Object.assign(this,e)}errorCode;fieldName;message;meta}class ErrorResponse{constructor(e){Object.assign(this,e)}type;responseStatus}class EmptyResponse{constructor(e){Object.assign(this,e)}responseStatus}class NavItem{label;href;exact;id;className;iconClass;show;hide;children;meta;constructor(e){Object.assign(this,e)}}class GetNavItems{constructor(e){Object.assign(this,e)}createResponse(){return new GetNavItemsResponse}getTypeName(){return"GetNavItems"}getMethod(){return"GET"}}class GetNavItemsResponse{baseUrl;results;navItemsMap;meta;responseStatus;constructor(e){Object.assign(this,e)}}class MetadataTypesConfig{baseUrl;defaultNamespaces;defaultImports;includeTypes;excludeTypes;treatTypesAsStrings;globalNamespace;ignoreTypes;exportTypes;exportAttributes;ignoreTypesInNamespaces;constructor(e){Object.assign(this,e)}}class MetadataRoute{path;verbs;notes;summary;constructor(e){Object.assign(this,e)}}class MetadataOperationType{request;response;actions;returnsVoid;returnType;routes;dataModel;viewModel;requiresAuth;requiredRoles;requiresAnyRole;requiredPermissions;requiresAnyPermission;tags;constructor(e){Object.assign(this,e)}}class MetadataTypes{config;namespaces;types;operations;constructor(e){Object.assign(this,e)}}class MetadataTypeName{name;namespace;genericArgs;constructor(e){Object.assign(this,e)}}class MetadataDataContract{name;namespace;constructor(e){Object.assign(this,e)}}class MetadataDataMember{name;order;isRequired;emitDefaultValue;constructor(e){Object.assign(this,e)}}class MetadataAttribute{name;constructorArgs;args;constructor(e){Object.assign(this,e)}}class MetadataPropertyType{name;type;isValueType;isSystemType;isEnum;isPrimaryKey;typeNamespace;genericArgs;value;description;dataMember;readOnly;paramType;displayType;isRequired;allowableValues;allowableMin;allowableMax;attributes;constructor(e){Object.assign(this,e)}}class MetadataType{name;namespace;genericArgs;inherits;implements;displayType;description;isNested;isEnum;isEnumInt;isInterface;isAbstract;dataContract;properties;attributes;innerTypes;enumNames;enumValues;enumMemberValues;enumDescriptions;meta;constructor(e){Object.assign(this,e)}}class NewInstanceResolver{tryResolve(e){return new e}}class SingletonInstanceResolver{tryResolve(e){return e.instance||(e.instance=new e)}}function eventMessageType(e){switch(e){case"onConnect":return"ServerEventConnect";case"onHeartbeat":return"ServerEventHeartbeat";case"onJoin":return"ServerEventJoin";case"onLeave":return"ServerEventLeave";case"onUpdate":return"ServerEventUpdate"}return null}var ReadyState,Types;!function(e){e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSED=2]="CLOSED"}(ReadyState=ReadyState||{});class ServerEventsClient{channels;options;eventSource;static UnknownChannel="*";eventStreamUri;updateSubscriberUrl;connectionInfo;serviceClient;stopped;resolver;listeners;EventSource;withCredentials;constructor(e,t,r={},s=null){if(this.channels=t,this.options=r,this.eventSource=s,0===this.channels.length)throw"at least 1 channel is required";this.resolver=this.options.resolver||new NewInstanceResolver,this.eventStreamUri=combinePaths(e,"event-stream")+"?",this.updateChannels(t),this.serviceClient=new JsonServiceClient(e),this.listeners={},this.withCredentials=!0,this.options.handlers||(this.options.handlers={})}onMessage=e=>{if("undefined"==typeof document){var t,r,s,n=e.data?e.data.indexOf("\n"):-1;if(0<=n)return t=e.data,s=e.lastEventId,r=Object.assign({},{lastEventId:s,data:t.substring(0,n)}),s=Object.assign({},{lastEventId:s,data:t.substring(n+1)}),this._onMessage(r),void this._onMessage(s)}this._onMessage(e)};_onMessage=a=>{if(!this.stopped){let n=this.options;void 0===o&&(o={querySelectorAll:e=>[]});var o,i=splitOnFirst(a.data," ");let e=null,t=i[0];var l=splitOnFirst(t,"@"),l=(1{if(this.eventSource.readyState===EventSource.CLOSED)clearInterval(n.heartbeat),null!=(e=n.handlers.onStop)&&e.apply(this.eventSource),this.reconnectServerEvents({error:new Error("EventSource is CLOSED")});else{var e=new Request(n.heartbeatUrl,{method:"POST",mode:"cors",headers:s,credentials:this.serviceClient.credentials});try{var t,r=await fetch(e);r.ok?await r.text():(t=new Error(r.status+" - "+r.statusText),this.reconnectServerEvents({error:t}))}catch(e){this.reconnectServerEvents({error:e})}}},this.connectionInfo&&this.connectionInfo.heartbeatIntervalMs||n.heartbeatIntervalMs||1e4)),n.unRegisterUrl&&"undefined"!=typeof window&&(window.onunload=()=>{navigator.sendBeacon?(this.stopped=!0,this.eventSource&&this.eventSource.close(),navigator.sendBeacon(n.unRegisterUrl)):this.stop()}),this.updateSubscriberUrl=n.updateSubscriberUrl,this.updateChannels((n.channels||"").split(","))}else{p="onJoin"==h||"onLeave"==h||"onUpdate"==h;let e=n.handlers[h];e?p?e.call(f||o.body,l):e.call(f||o.body,r,a):p||(c=n.receivers&&n.receivers.cmd,this.invokeReceiver(c,h,f,a,"cmd")),p&&(e=n.handlers.onCommand)&&e.call(f||o.body,l)}else"trigger"===u?this.raiseEvent(i,a):"css"===u&&css(d||$$("body"),h,r);c=n.receivers&&n.receivers[u];this.invokeReceiver(c,h,f,a,u),eventMessageType(h)||(p=n.handlers.onMessage)&&p.call(f||o.body,l),n.onTick&&n.onTick()}}};onError=e=>{var t;this.stopped||(e=e||event,null!=(t=this.options.onException)&&t.call(this.eventSource,e),this.options.onTick&&this.options.onTick())};getEventSourceOptions(){return{withCredentials:this.withCredentials}}reconnectServerEvents(t={}){if(!this.stopped){t.error&&this.onError(t.error);const n=this.eventSource;let e=t.url||this.eventStreamUri||n.url;null!=this.options.resolveStreamUrl&&(e=this.options.resolveStreamUrl(e));var r=new(this.EventSource||EventSource)(e,this.getEventSourceOptions()),s=(r.addEventListener("error",e=>(t.onerror||n.onerror||this.onError)(e)),r.addEventListener("message",t.onmessage||n.onmessage||this.onMessage),this.options.onReconnect);return null!=s&&s.call(r,t.error),n.removeEventListener&&(n.removeEventListener("error",this.onError),n.removeEventListener("message",this.onMessage)),n.close(),this.eventSource=r}}start(){if(this.stopped=!1,null==this.eventSource||this.eventSource.readyState===EventSource.CLOSED){let e=this.eventStreamUri;null!=this.options.resolveStreamUrl&&(e=this.options.resolveStreamUrl(e)),this.eventSource=new(this.EventSource||EventSource)(e,this.getEventSourceOptions()),this.eventSource.addEventListener("error",this.onError),this.eventSource.addEventListener("message",e=>this.onMessage(e))}return this}stop(){this.stopped=!0,this.eventSource&&this.eventSource.close();var e=this.options,e=(e&&e.heartbeat&&clearInterval(e.heartbeat),this.connectionInfo);return null==e||null==e.unRegisterUrl?new Promise((e,t)=>e()):(this.connectionInfo=null,fetch(new Request(e.unRegisterUrl,{method:"POST",mode:"cors",credentials:this.serviceClient.credentials})).then(e=>{if(!e.ok)throw new Error(e.status+" - "+e.statusText)}).catch(this.onError))}invokeReceiver(r,e,s,n,t){if(r)if("function"==typeof r&&(r=this.resolver.tryResolve(r)),e=e.replace("-",""),r.client=this,r.request=n,"function"==typeof r[e])r[e].call(s||r,n.body,n);else if(e in r)r[e]=n.body;else{var a=Object.getOwnPropertyDescriptor(r,e);if(null!=a)a.set?a.set(n.body):a.writable&&(r[e]=n.body);else{let t=e.toLowerCase();getAllMembers(r).forEach(e=>{e.toLowerCase()==t&&("function"==typeof r[e]?r[e].call(s||r,n.body,n):r[e]=n.body)});a=r.noSuchMethod;"function"==typeof a&&a.call(s||r,n.target,n)}}}hasConnected(){return null!=this.connectionInfo}registerHandler(e,t){return this.options.handlers||(this.options.handlers={}),this.options.handlers[e]=t,this}setResolver(e){return this.options.resolver=e,this}registerReceiver(e){return this.registerNamedReceiver("cmd",e)}registerNamedReceiver(e,t){return this.options.receivers||(this.options.receivers={}),this.options.receivers[e]=t,this}unregisterReceiver(e="cmd"){return this.options.receivers&&delete this.options.receivers[e],this}updateChannels(e){this.channels=e;var t=null!=this.eventSource?this.eventSource.url:this.eventStreamUri;this.eventStreamUri=t.substring(0,Math.min(t.indexOf("?"),t.length))+"?channels="+e.join(",")+"&t="+(new Date).getTime()}update(e,t){var r,s="string"==typeof e?e.split(","):e,n="string"==typeof t?t.split(","):t,a=[];for(r in this.channels){var o=this.channels[r];null!=n&&-1!==n.indexOf(o)||a.push(o)}if(s)for(var i in s){i=s[i];-1===a.indexOf(i)&&a.push(i)}this.updateChannels(a)}addListener(e,t){return(this.listeners[e]||(this.listeners[e]=[])).push(t),this}removeListener(e,t){e=this.listeners[e];return e&&0<=(t=e.indexOf(t))&&e.splice(t,1),this}raiseEvent(e,t){e=this.listeners[e];e&&e.forEach(e=>{try{e(t)}catch(e){this.onError(e)}})}getConnectionInfo(){if(null==this.connectionInfo)throw"Not Connected";return this.connectionInfo}getSubscriptionId(){return this.getConnectionInfo().id}updateSubscriber(t){return null==t.id&&(t.id=this.getSubscriptionId()),this.serviceClient.post(t).then(e=>{this.update(t.subscribeChannels,t.unsubscribeChannels)}).catch(this.onError)}subscribeToChannels(...t){var e=new UpdateEventSubscriber;return e.id=this.getSubscriptionId(),e.subscribeChannels=t,this.serviceClient.post(e).then(e=>{this.update(t,null)}).catch(this.onError)}unsubscribeFromChannels(...t){var e=new UpdateEventSubscriber;return e.id=this.getSubscriptionId(),e.unsubscribeChannels=t,this.serviceClient.post(e).then(e=>{this.update(null,t)}).catch(this.onError)}getChannelSubscribers(){var e=new GetEventSubscribers;return e.channels=this.channels,this.serviceClient.get(e).then(e=>e.map(e=>this.toServerEventUser(e))).catch(e=>(this.onError(e),[]))}toServerEventUser(e){var t,r=e.channels,s=new ServerEventUser;for(t in s.userId=e.userId,s.displayName=e.displayName,s.profileUrl=e.profileUrl,s.channels=r?r.split(","):null,e)"userId"!=t&&"displayName"!=t&&"profileUrl"!=t&&"channels"!=t&&(null==s.meta&&(s.meta={}),s.meta[t]=e[t]);return s}}function getAllMembers(e){let s=[];do{var t=Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e).map(e=>e.toString())).sort().filter((e,t,r)=>"constructor"!==e&&(0==t||e!==r[t-1])&&-1===s.indexOf(e));s=s.concat(t)}while((e=Object.getPrototypeOf(e))&&Object.getPrototypeOf(e));return s}class ServerEventReceiver{client;request;noSuchMethod(e,t){}}class UpdateEventSubscriber{id;subscribeChannels;unsubscribeChannels;createResponse(){return new UpdateEventSubscriberResponse}getTypeName(){return"UpdateEventSubscriber"}}class UpdateEventSubscriberResponse{responseStatus}class GetEventSubscribers{channels;createResponse(){return[]}getTypeName(){return"GetEventSubscribers"}}class ServerEventUser{userId;displayName;profileUrl;channels;meta}class HttpMethods{static Get="GET";static Post="POST";static Put="PUT";static Delete="DELETE";static Patch="PATCH";static Head="HEAD";static Options="OPTIONS";static hasRequestBody=e=>!("GET"===e||"DELETE"===e||"HEAD"===e||"OPTIONS"===e)}class GetAccessToken{constructor(e){Object.assign(this,e)}refreshToken;useTokenCookie;createResponse(){return new GetAccessTokenResponse}getTypeName(){return"GetAccessToken"}getMethod(){return"POST"}}class GetAccessTokenResponse{accessToken;responseStatus}class JsonServiceClient{baseUrl;replyBaseUrl;oneWayBaseUrl;mode;credentials;headers;userName;password;bearerToken;refreshToken;refreshTokenUri;useTokenCookie;enableAutoRefreshToken;requestFilter;static globalRequestFilter;responseFilter;static globalResponseFilter;exceptionFilter;urlFilter;onAuthenticationRequired;manageCookies;cookies;parseJson;static toBase64;constructor(e="/"){this.baseUrl=e,this.replyBaseUrl=combinePaths(e,"json","reply")+"/",this.oneWayBaseUrl=combinePaths(e,"json","oneway")+"/",this.mode="cors",this.credentials="include",this.headers=new Headers,this.headers.set("Content-Type","application/json"),this.manageCookies="undefined"==typeof document,this.cookies={},this.enableAutoRefreshToken=!0}setCredentials(e,t){this.userName=e,this.password=t}useBasePath(e){return this.basePath=e,this}set basePath(e){e?("/"!=e[0]&&(e="/"+e),this.replyBaseUrl=combinePaths(this.baseUrl,e)+"/",this.oneWayBaseUrl=combinePaths(this.baseUrl,e)+"/"):(this.replyBaseUrl=combinePaths(this.baseUrl,"json","reply")+"/",this.oneWayBaseUrl=combinePaths(this.baseUrl,"json","oneway")+"/")}apply(e){return e(this),this}get(e,t){return"string"!=typeof e?this.fetch(HttpMethods.Get,e,t):this.fetch(HttpMethods.Get,null,t,this.toAbsoluteUrl(e))}delete(e,t){return"string"!=typeof e?this.fetch(HttpMethods.Delete,e,t):this.fetch(HttpMethods.Delete,null,t,this.toAbsoluteUrl(e))}post(e,t){return this.fetch(HttpMethods.Post,e,t)}postToUrl(e,t,r){return this.fetch(HttpMethods.Post,t,r,this.toAbsoluteUrl(e))}postBody(e,t,r){return this.fetchBody(HttpMethods.Post,e,t,r)}put(e,t){return this.fetch(HttpMethods.Put,e,t)}putToUrl(e,t,r){return this.fetch(HttpMethods.Put,t,r,this.toAbsoluteUrl(e))}putBody(e,t,r){return this.fetchBody(HttpMethods.Put,e,t,r)}patch(e,t){return this.fetch(HttpMethods.Patch,e,t)}patchToUrl(e,t,r){return this.fetch(HttpMethods.Patch,t,r,this.toAbsoluteUrl(e))}patchBody(e,t,r){return this.fetchBody(HttpMethods.Patch,e,t,r)}publish(e,t){return this.sendOneWay(e,t)}sendOneWay(e,t){var r=combinePaths(this.oneWayBaseUrl,nameOf(e));return this.fetch(HttpMethods.Post,e,null,r)}sendAll(e){var t;return 0==e.length?Promise.resolve([]):(t=combinePaths(this.replyBaseUrl,nameOf(e[0])+"[]"),this.fetch(HttpMethods.Post,e,null,t))}sendAllOneWay(e){var t;return 0==e.length?Promise.resolve(void 0):(t=combinePaths(this.oneWayBaseUrl,nameOf(e[0])+"[]"),this.fetch(HttpMethods.Post,e,null,t).then(e=>{}))}createUrlFromDto(e,t){let r=combinePaths(this.replyBaseUrl,nameOf(t));e=HttpMethods.hasRequestBody(e);return r=e?r:appendQueryString(r,t)}toAbsoluteUrl(e){return e.startsWith("http://")||e.startsWith("https://")?e:combinePaths(this.baseUrl,e)}deleteCookie(e){this.manageCookies?delete this.cookies[e]:document&&(document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/")}createRequest({method:e,request:t,url:r,args:s,body:n}){r=r||this.createUrlFromDto(e,t),s&&(r=appendQueryString(r,s)),null!=this.bearerToken?this.headers.set("Authorization","Bearer "+this.bearerToken):null!=this.userName&&this.headers.set("Authorization","Basic "+JsonServiceClient.toBase64(this.userName+":"+this.password)),this.manageCookies&&(0<(s=Object.keys(this.cookies).map(e=>{e=this.cookies[e];return e.expires&&e.expires0{"set-cookie"===t.toLowerCase()&&e.split(",").forEach(e=>r.push(e))}),r.forEach(e=>{e=parseCookie(e);e&&(this.cookies[e.name]=e)})}e.headers.forEach((e,t)=>{"x-cookies"===t.toLowerCase()&&0<=e.split(",").indexOf("ss-reftok")&&(this.useTokenCookie=!0)}),this.applyResponseFilters(e);let r=t&&"string"!=typeof t&&"function"==typeof t.createResponse?t.createResponse():null;if("string"==typeof r)return e.text().then(e=>e);t=e.headers.get("content-type"),t=t&&-1!==t.indexOf("application/json");if(t)return this.json(e).then(e=>e);if("undefined"!=typeof Uint8Array&&r instanceof Uint8Array){if("function"!=typeof e.arrayBuffer)throw new Error("This fetch polyfill does not implement 'arrayBuffer'");return e.arrayBuffer().then(e=>new Uint8Array(e))}if("function"==typeof Blob&&r instanceof Blob){if("function"!=typeof e.blob)throw new Error("This fetch polyfill does not implement 'blob'");return e.blob().then(e=>e)}var s=e.headers.get("content-length");return"0"===s||null==s&&!t?e.text().then(e=>r):this.json(e).then(e=>e)}handleError(e,r,t=null){if(r instanceof Error)throw this.raiseError(e,r);if(r.bodyUsed)throw this.raiseError(r,createErrorResponse(r.status,r.statusText,t));return void 0===r.json&&r.responseStatus?new Promise((e,t)=>t(this.raiseError(null,r))):this.json(r).then(e=>{e=sanitize(e);if(e.responseStatus)throw null!=t&&(e.type=t),e;throw createErrorResponse(r.status,r.statusText,t)}).catch(e=>{if(e instanceof Error||"undefined"!=typeof window&&window.DOMException&&e instanceof window.DOMException)throw this.raiseError(r,createErrorResponse(r.status,r.statusText,t));throw this.raiseError(r,e)})}fetch(e,t,r,s){return this.sendRequest({method:e,request:t,args:r,url:s})}fetchBody(e,t,r,s){var n=combinePaths(this.replyBaseUrl,nameOf(t));return this.sendRequest({method:e,request:r,body:"string"==typeof r||isFormData(r)?r:JSON.stringify(r),url:appendQueryString(n,t),args:s,returns:t})}sendRequest(t){var e=this.createRequest(t);const r=t.returns||t.request;let n=null;const a=()=>{var e=this.createRequest(t);return this.urlFilter&&this.urlFilter(e.url),fetch(e.url,e).then(e=>this.createResponse(e,r)).catch(e=>this.handleError(n,e))};return this.urlFilter&&this.urlFilter(e.url),fetch(e.url,e).then(e=>{return n=e,this.createResponse(e,r)}).catch(e=>{if(401===e.status){if(this.enableAutoRefreshToken&&(this.refreshToken||this.useTokenCookie||null!=this.cookies["ss-reftok"])){const s=new GetAccessToken({refreshToken:this.refreshToken,useTokenCookie:!!this.useTokenCookie});var t=this.refreshTokenUri||this.createUrlFromDto(HttpMethods.Post,s),r=(this.useTokenCookie&&(this.bearerToken=null,this.headers.delete("Authorization")),this.createRequest({method:HttpMethods.Post,request:s,args:null,url:t}));return fetch(t,r).then(e=>this.createResponse(e,s).then(e=>(this.bearerToken=e.accessToken||null,a()))).catch(e=>this.onAuthenticationRequired?this.onAuthenticationRequired().then(a).catch(e=>this.handleError(n,e,"RefreshTokenException")):this.handleError(n,e,"RefreshTokenException"))}if(this.onAuthenticationRequired)return this.onAuthenticationRequired().then(a)}return this.handleError(n,e)})}raiseError(e,t){return null!=this.exceptionFilter&&this.exceptionFilter(e,t),t}send(e,t,r){return this.sendRequest({method:getMethod(e),request:e,args:t,url:r})}sendVoid(e,t,r){return this.sendRequest({method:getMethod(e),request:e,args:t,url:r})}async api(e,t,r){try{var s=await this.fetch(getMethod(e,r),e,t);return new ApiResult({response:s})}catch(e){return new ApiResult({error:getResponseStatus(e)})}}async apiVoid(e,t,r){try{var s=await this.fetch(getMethod(e,r),e,t);return new ApiResult({response:s??new EmptyResponse})}catch(e){return new ApiResult({error:getResponseStatus(e)})}}async apiForm(e,t,r,s){try{var n=await this.fetchBody(getMethod(e,s),e,t,r);return new ApiResult({response:n})}catch(e){return new ApiResult({error:getResponseStatus(e)})}}async apiFormVoid(e,t,r,s){try{var n=await this.fetchBody(getMethod(e,s),e,t,r);return new ApiResult({response:n??new EmptyResponse})}catch(e){return new ApiResult({error:getResponseStatus(e)})}}}class JsonApiClient{static create(e="/",t){return new JsonServiceClient(e).apply(e=>{e.basePath="/api",e.headers=new Headers,t&&t(e)})}}function getMethod(e,t){return t??"function"==typeof e.getMethod?e.getMethod():HttpMethods.Post}function getResponseStatus(e){return e.responseStatus??e.ResponseStatus??(e.errorCode?e:e.message?createErrorStatus(e.message,e.errorCode):null)}class ApiResult{response;error;constructor(e){Object.assign(this,e)}get completed(){return null!=this.response||null!=this.error}get failed(){return null!=this.error?.errorCode||null!=this.error?.message}get succeeded(){return!this.failed&&null!=this.response}get errorMessage(){return this.error?.message}get errorCode(){return this.error?.errorCode}get errors(){return this.error?.errors??[]}get errorSummary(){return null!=this.error&&0==this.errors.length?this.errorMessage:null}fieldError(e){let t=e.toLowerCase();return this.errors?.find(e=>e.fieldName.toLowerCase()==t)}fieldErrorMessage(e){return this.fieldError(e)?.message}hasFieldError(e){return null!=this.fieldError(e)}showSummary(e=[]){return!!this.failed&&e.every(e=>!this.hasFieldError(e))}summaryMessage(e=[]){if(this.showSummary(e)){let t=e.map(e=>e.toLowerCase());return t.find(e=>-1==t.indexOf(e.toLowerCase()))??this.errorMessage}}addFieldError(e,t,r="Exception"){this.error||(this.error=new ResponseStatus);var s=this.fieldError(e);null!=s?(s.errorCode=r,s.message=t):this.error.errors.push(new ResponseError({fieldName:e,errorCode:r,message:t}))}}function createErrorStatus(e,t="Exception"){return new ResponseStatus({errorCode:t,message:e})}function createFieldError(e,t,r="Exception"){return new ResponseStatus({errors:[new ResponseError({fieldName:e,errorCode:r,message:t})]})}function isFormData(e){return"undefined"!=typeof window&&e instanceof FormData}function createErrorResponse(t,r,s=null){return apply(new ErrorResponse,e=>{null!=s&&(e.type=s),e.responseStatus=apply(new ResponseStatus,e=>{e.errorCode=t&&t.toString(),e.message=r})})}function createError(e,t,r){return new ErrorResponse({responseStatus:new ResponseStatus({errorCode:e,message:t,errors:r?[new ResponseError({errorCode:e,message:t,fieldName:r})]:void 0})})}function toCamelCase(e){return e&&e.charAt(0).toLowerCase()+e.substring(1)}function toPascalCase(e){return e&&e.charAt(0).toUpperCase()+e.substring(1)}function toKebabCase(e){return(e||"").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function map(e,t){return null==e?null:t(e)}function sanitize(r){if(r.responseStatus)return r;if(r.errors)return r;var e,s={};for(e in r)r.hasOwnProperty(e)&&(r[e]instanceof Object?s[toCamelCase(e)]=sanitize(r[e]):s[toCamelCase(e)]=r[e]);if(s.errors=[],null!=r.Errors)for(let e=0,t=r.Errors.length;er[e]=t[e]),r}function splitCase(e){return"string"!=typeof e?e:e.replace(/([A-Z]|[0-9]+)/g," $1").replace(/_/g," ").trim()}function humanize(e){return!e||0<=e.indexOf(" ")?e:splitCase(toPascalCase(e))}const ucFirst=e=>e.charAt(0).toUpperCase()+e.substring(1),isUpper=e=>"A"<=e&&e<="Z",isLower=e=>"a"<=e&&e<="z",isDigit=e=>"0"<=e&&e<="9",upperOrDigit=e=>isUpper(e)||isDigit(e);function splitTitleCase(t){var r=[];if("string"!=typeof t)return r;let s=0;for(let e=0;e!!e)}function humanify(e){return!e||0<=e.indexOf(" ")?e:ucFirst(splitTitleCase(e).join(" "))}function queryString(e){if(!e||-1===e.indexOf("?"))return{};var t=rightPart(e,"?").split("&"),r={};for(let e=0;e>>e&24),2!=e&&n.length-s!=1||(a+=String.fromCharCode(uint6ToB64(r>>>18&63),uint6ToB64(r>>>12&63),uint6ToB64(r>>>6&63),uint6ToB64(63&r)),r=0);return 0==e?a:a.substring(0,a.length-e)+(1==e?"=":"==")}function uint6ToB64(e){return e<26?e+65:e<52?e+71:e<62?e-4:62===e?43:63===e?47:65}function _btoa(e){return"function"==typeof btoa?btoa(e):Buffer.from(e).toString("base64")}function _atob(e){return"function"==typeof atob?atob(e):Buffer.from(e,"base64").toString()}function stripQuotes(e){return e&&'"'==e[0]&&'"'==e[e.length]?e.slice(1,-1):e}function tryDecode(t){try{return decodeURIComponent(t)}catch(e){return t}}function parseCookie(e){if(!e)return null;let t=null;var r=e.split(/; */);for(let e=0;enormalizeKey(e)===normalizeKey(t))[0]||""]}function parseResponseStatus(t,r=null){try{var e=JSON.parse(t);return sanitize(e.ResponseStatus||e.responseStatus)}catch(e){return{message:r||e.message||e,__error:{error:e,json:t}}}}function toFormData(e){if("undefined"!=typeof window){var t,r=new FormData;for(t in e)r.append(t,e[t]);return r}}function toObject(e){const t={};if(e){if("object"!=typeof e)throw new Error("keys must be an Array of object keys");Array.prototype.slice.call(e).forEach(e=>{this[e]&&(t[e]=this[e])})}return t}function errorResponseSummary(){var e=this.responseStatus||this.ResponseStatus;return null==e||(e=e.ErrorCode?sanitize(e):e).errors&&0!=e.errors.length?void 0:e.message||e.errorCode}function errorResponseExcept(e){var t=this.responseStatus||this.ResponseStatus;if(null!=t){t=t.ErrorCode?sanitize(t):t,e=toVarNames(e);if(e&&null!=t.errors&&0!=t.errors.length){var r,s,n=e.map(e=>(e||"").toLowerCase());for(r of t.errors)if(-1!==n.indexOf((r.fieldName||"").toLowerCase()))return;for(s of t.errors)if(-1===n.indexOf((s.fieldName||"").toLowerCase()))return s.message||s.errorCode}return t.message||t.errorCode||void 0}}function errorResponse(t){var e;return null==t?errorResponseSummary.call(this):null!=(e=this.responseStatus||this.ResponseStatus)&&null!=(e=e.ErrorCode?sanitize(e):e).errors&&0!=e.errors.length&&(e=e.errors.find(e=>(e.fieldName||"").toLowerCase()==t.toLowerCase()))?e.message||e.errorCode:void 0}function isDate(e){return e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e)}function toDate(e){return e?isDate(e)?e:"/"==e[0]?new Date(parseFloat(/Date\(([^)]+)\)/.exec(e)[1])):new Date(e):null}function toDateFmt(e){return dateFmt(toDate(e))}function padInt(e){return e<10?"0"+e:e}function dateFmt(e=new Date){return e.getFullYear()+"/"+padInt(e.getMonth()+1)+"/"+padInt(e.getDate())}function dateFmtHM(e=new Date){return e.getFullYear()+"/"+padInt(e.getMonth()+1)+"/"+padInt(e.getDate())+" "+padInt(e.getHours())+":"+padInt(e.getMinutes())}function timeFmt12(e=new Date){return padInt((e.getHours()+24)%12||12)+":"+padInt(e.getMinutes())+":"+padInt(e.getSeconds())+" "+(12'+e+""}function attr(e,t){return e.getAttribute(t)}function sattr(e,t,r){return e.setAttribute(t,r)}function rattr(e,t){return e.removeAttribute(t)}function createElement(e,t){var r={className:"class",htmlFor:"for"},s=document.createElement(e);if(t?.attrs)for(const n in t.attrs)sattr(s,r[n]||n,t.attrs[n]);return t?.events&&on(s,t.events),t&&t.insertAfter&&t.insertAfter.parentNode.insertBefore(s,t.insertAfter.nextSibling),s}function showInvalidInputs(){var e,t,r,s=attr(this,"data-invalid");s&&(e=(r="checkbox"===this.type||"radio"===this.type||hasClass(this,"form-check"))?parent(this,"form-check"):null,r?addClass(e||this.parentElement,"is-invalid form-control"):addClass(this,"is-invalid"),(null!=(r=!(t=this.nextElementSibling)||attr(t,"for")!==this.id&&"SMALL"!==t.tagName?this:r?e||t.parentElement:t)&&r.nextElementSibling&&hasClass(r.nextElementSibling,"invalid-feedback")?r.nextElementSibling:createElement("div",{insertAfter:r,attrs:{className:"invalid-feedback"}})).innerHTML=s)}function parent(e,t){for(;null!=e&&!hasClass(e,t);)e=e.parentElement;return e}function hasClass(e,t){return!!e&&(e.classList?e.classList.contains(t):-1<(" "+e.className+" ").replace(/[\n\t\r]/g," ").indexOf(" "+t+" "))}function addClass(e,t){return e?e.classList?e.classList.add(...t.split(" ")):hasClass(e,t)?null:e.className=(e.className+" "+t).trim():null}function remClass(e,t){return e?e.classList?e.classList.remove(t):hasClass(e,t)?e.className=e.className.replace(/(\s|^)someclass(\s|$)/," "):null:null}function $1(e,t){return"string"==typeof e?(t||document).querySelector(e):e||null}function $$(e,t){return"string"==typeof e?Array.prototype.slice.call((t||document).querySelectorAll(e)):Array.isArray(e)?e:[e]}function on(e,s){return $$(e).forEach(r=>{Object.keys(s).forEach(function(e){var t=s[e];"string"==typeof e&&"function"==typeof t&&r.addEventListener(e,s[e]=t.bind(r))})}),s}function addScript(r){return new Promise((e,t)=>{document.body.appendChild(createElement("script",{attrs:{src:r},events:{load:e,error:t}}))})}function delaySet(e,t){t=t&&t.duration||300;let r=setTimeout(()=>e(!0),t);return()=>{clearTimeout(r),e(!1)}}function bootstrap(e){var t=(e||document).querySelectorAll("[data-invalid]");for(let e=0;ehandleEvent(t,r,e)):["click","dblclick","change","focus","blur","focusin","focusout","select","keydown","keypress","keyup","hover","toggle","input"].forEach(e=>{r.querySelector(`[data-${e}]`)&&handleEvent(t,r,e)})}function bootstrapForm(t,r){t&&(r.model&&populateForm(t,r.model),t.onsubmit=function(e){return e.preventDefault(),r.type="bootstrap-v4",ajaxSubmit(t,r)})}function applyErrors(e,r,t){var s={overrideMessages:!1,messages:{NotEmpty:"Required",NotNull:"Required",Email:"Invalid email",AlreadyExists:"Already exists"},errorFilter:function(e,t,r){return this.overrideMessages?this.messages[t]||e||splitCase(t):e||splitCase(t)}};if(clearErrors(e),r){r=sanitize(r),addClass(e,"has-errors");const h=t&&"bootstrap-v4"===t.type;var s={...s,...t},o=(t.messages&&(s.overrideMessages=!0),s.errorFilter.bind(s)),t=r.errors;if(t&&t.length){let n={},a={};$$("input,textarea,select,button").forEach(e=>{var t=e.previousElementSibling,r=e.nextElementSibling,s=("radio"===e.type||"checkbox"===e.type?null:e.id)||attr(e,"name");s&&(s=s.toLowerCase(),n[s]=e,h||(hasClass(t,"help-inline")||hasClass(t,"help-block")?a[s]=t:(hasClass(r,"help-inline")||hasClass(r,"help-block"))&&(a[s]=r)))}),$$(".help-inline[data-for],.help-block[data-for]").forEach(e=>{var t=attr(e,"data-for").toLowerCase();a[t]=e});for(var i of t){var l=(i.fieldName||"").toLowerCase(),u=n[l],c=(u&&(h?("radio"!==(c=attr(u,"type"))&&"checkbox"!==c&&addClass(u,"is-invalid"),sattr(u,"data-invalid",o(i.message,i.errorCode,"field"))):(addClass(u,"error"),addClass(u.parentElement,"has-error"))),a[l]);c&&(addClass(c,"error"),c.innerHTML=o(i.message,i.errorCode,"field"),c.style.display="block")}$$("[data-validation-summary]").forEach(e=>{var t=attr(e,"data-validation-summary").split(","),t=errorResponseExcept.call(r,t);t&&(e.innerHTML=bsAlert(t))})}else{const n=o(r.message||splitCase(r.errorCode),r.errorCode,"summary");h?$$("[data-validation-summary]").forEach(e=>e.innerHTML="<"===n[0]?n:bsAlert(n)):$$(".error-summary").forEach(e=>{e.innerHTML=n(e).style.display="block"})}return e}}function clearErrors(e){remClass(e,"has-errors"),$$(".error-summary").forEach(e=>{e.innerHTML="",e.style.display="none"}),$$("[data-validation-summary]").forEach(e=>{e.innerHTML=""}),$$(".error").forEach(e=>remClass(e,"error")),$$(".form-check.is-invalid [data-invalid]").forEach(e=>{rattr(e,"data-invalid")}),$$(".form-check.is-invalid").forEach(e=>remClass(e,"form-control")),$$(".is-invalid").forEach(e=>{remClass(e,"is-invalid"),rattr(e,"data-invalid")}),$$(".is-valid").forEach(e=>remClass(e,"is-valid"))}function toVarNames(e){return e?isArray(e)?e:e.split(",").map(e=>e.trim()):[]}function formSubmit(e={}){const r=this;var t=attr(r,"enctype")||Types.UrlEncoded;if(t==Types.MultiPart&&void 0===window.FormData)throw new Error(`FormData Type is needed to send '${Types.MultiPart}' Content Types`);let s;try{s=serializeForm(r,t)}catch(e){throw new Error(""+(e.message||e))}var n=new Headers,t=(n.set("Accept",Types.Json),n.set("Content-Type",t),{method:attr(r,"method")||"POST",credentials:"include",mode:"cors",headers:n,body:s});return e.requestFilter&&e.requestFilter(t),fetch(new Request(e.url||attr(r,"action"),t)).catch(e=>{throw new Error(`Network is unreachable (${e.message||e})`)}).then(t=>(e.responseFilter&&e.responseFilter(t),t.ok?(handleHeaderBehaviors(r,t),fromResponse(t)):t.json().catch(e=>{throw new Error("The request failed with "+(t.statusText||t.status))}).then(e=>{throw Object.assign(new ErrorResponse,sanitize(e))})))}function handleHeaderBehaviors(e,t){var r=t.headers.get("X-Location"),r=(r&&(location.href=r),t.headers.get("X-Trigger"));r&&triggerEvent(e,0<=(t=r.indexOf(":"))?r.substring(0,t):r,(e=0<=t?r.substring(t+1):null)?[e]:[])}function ajaxSubmit(s,n={}){const a="bootstrap-v4"===n.type;clearErrors(s);try{if(n.validate&&!1===n.validate.call(s))return!1}catch(e){return!1}addClass(s,"loading");const e=null==n.onSubmitDisable?"[type=submit]":n.onSubmitDisable,t=null!=e&&""!=e;function r(e,t=null){var r;t?applyErrors(s,t.ResponseStatus||t.responseStatus,{...n}):e&&(addClass(s,"has-errors"),(r=$$(".error-summary")[0])&&(r.innerHTML=e),a)&&(r=$$("[data-validation-summary]")[0])&&(r.innerHTML=bsAlert(e)),n.error&&n.error.call(s,t),a&&$$("[data-invalid]").forEach(e=>showInvalidInputs.call(e))}return t&&$$(e).forEach(e=>{sattr(e,"disabled","disabled")}),(n.submit||formSubmit).call(s,n).then(e=>(n.success&&n.success.call(s,e),!1)).catch(e=>{e.responseStatus?r(null,e):r(""+(e.message||e),null)}).finally(()=>{remClass(s,"loading"),t&&$$(e).forEach(e=>{rattr(e,"disabled")}),n.complete&&n.complete.call(s)})}function fromResponse(e){var t,r=e.headers.get("content-type"),r=r&&-1!==r.indexOf(Types.Json);return!r&&("0"===(t=e.headers.get("content-length"))||null==t&&!r)?null:e.json()}function serializeForm(e,t=null){return t===Types.MultiPart?new FormData(e):t==Types.Json?JSON.stringify(serializeToObject(e)):serializeToUrlEncoded(e)}function formEntries(e,r,s){var n,a=e,o=a.elements.length;for(let t=0;te[t]=r)}function serializeToUrlEncoded(e){return formEntries(e,[],(e,t,r)=>"string"==typeof r?e.push(encodeURIComponent(t)+"="+encodeURIComponent(r)):null).join("&").replace(/%20/g,"+")}function serializeToFormData(e){return formEntries(e,new FormData,(e,t,r)=>e.append(t,r))}function sanitizeFormData(e){for(var[t,r]of e)"object"==typeof r&&0===r.size&&e.delete(t);return e}function triggerEvent(e,t,r=null){var s;document.createEvent?((s=document.createEvent("click"==t||t.startsWith("mouse")?"MouseEvents":"HTMLEvents")).initEvent(t,!0,!0),s.data=r,e.dispatchEvent(s)):(r=document.createEventObject(),e.fireEvent("on"+t,r))}function populateForm(r,s){if(s){var n;for(let e in s){let t=s[e];void 0!==t&&null!==t||(t="");var a=r.elements.namedItem(e)||r.elements.namedItem((n=e)&&(n[0]===n[0].toUpperCase()?toCamelCase(n):n[0]===n[0].toLowerCase()?toPascalCase(n):n)),o=a;if(a)switch(o.type||a[0].type){case"radio":case"checkbox":var i=a.length;for(let e=0;e(r(e,t),e),t||{})}function resolve(e,t){e="function"==typeof e?e():e;return"function"==typeof t?t(e):e}function mapGet(e,r){if(!e||!r)return null;var s=e[r];if(s)return s;if("object"!=typeof e)return null;{let t=r.toLowerCase();s=Object.keys(e).find(e=>e.toLowerCase()===t);return s?e[s]:null}}function apiValue(e){return null==e?"":"string"==typeof e?"/Date("===e.substring(0,6)?toDate(e):e.trim():e}function apiValueFmt(e){e=apiValue(e);return(null!=e?isDate(e)?dateFmt(e):e:null)||""}function activeClassNav(e,t){return null!=e.href&&(e.exact||t.length<=1?trimEnd(t,"/").toLowerCase()===trimEnd(e.href,"/").toLowerCase():trimEnd(t,"/").toLowerCase().startsWith(trimEnd(e.href,"/").toLowerCase()))?"active":null}function activeClass(e,t,r){return null!=e&&(r||t.length<=1?trimEnd(t,"/").toLowerCase()===trimEnd(e,"/").toLowerCase():trimEnd(t,"/").toLowerCase().startsWith(trimEnd(e,"/").toLowerCase()))?"active":null}function bootstrapColors(){return["primary","secondary","success","info","warning","danger","light","dark"]}JsonServiceClient.toBase64=e=>_btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(new Number("0x"+t).valueOf()))),"undefined"!=typeof window&&void 0!==window.Element&&(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){let t=this;do{if(t.matches(e))return t}while(null!==(t=t.parentElement||t.parentNode)&&1===t.nodeType);return null})),function(e){e.MultiPart="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Json="application/json"}(Types=Types||{});const BootstrapColors=bootstrapColors();function btnColorClass(e){for(const t of bootstrapColors()){if(e[t])return"btn-"+t;if(e["outline-"+t])return"btn-outline-"+t}return null}function bootstrapSizes(){return["xs","sm","md","lg"]}const BootstrapSizes=bootstrapSizes();function btnSizeClass(e){for(const t of bootstrapSizes())if(e[t])return"btn-"+t;return null}function btnClasses(e){var t=[],r=btnColorClass(e),r=(r&&t.push(r),btnSizeClass(e));return r&&t.push(r),e.block&&t.push("btn-block"),t}class NavDefaults{static navClass="nav";static navItemClass="nav-item";static navLinkClass="nav-link";static childNavItemClass="nav-item dropdown";static childNavLinkClass="nav-link dropdown-toggle";static childNavMenuClass="dropdown-menu";static childNavMenuItemClass="dropdown-item";static create(){return new NavOptions}static forNav(e){return e||NavDefaults.create()}static overrideDefaults(e,t){return null==e?t:((e=Object.assign({},e)).navClass===NavDefaults.navClass&&null!=t.navClass&&(e.navClass=t.navClass),e.navItemClass===NavDefaults.navItemClass&&null!=t.navItemClass&&(e.navItemClass=t.navItemClass),e.navLinkClass===NavDefaults.navLinkClass&&null!=t.navLinkClass&&(e.navLinkClass=t.navLinkClass),e.childNavItemClass===NavDefaults.childNavItemClass&&null!=t.childNavItemClass&&(e.childNavItemClass=t.childNavItemClass),e.childNavLinkClass===NavDefaults.childNavLinkClass&&null!=t.childNavLinkClass&&(e.childNavLinkClass=t.childNavLinkClass),e.childNavMenuClass===NavDefaults.childNavMenuClass&&null!=t.childNavMenuClass&&(e.childNavMenuClass=t.childNavMenuClass),e.childNavMenuItemClass===NavDefaults.childNavMenuItemClass&&null!=t.childNavMenuItemClass&&(e.childNavMenuItemClass=t.childNavMenuItemClass),e)}static showNav(e,t){return null==t||0===t.length?null==e.show:!(null!=e.show&&t.indexOf(e.show)<0||null!=e.hide&&0<=t.indexOf(e.hide))}}class NavLinkDefaults{static forNavLink(e){return e||NavDefaults.create()}}class NavbarDefaults{static navClass="navbar-nav";static create(){return new NavOptions({navClass:NavbarDefaults.navClass})}static forNavbar(e){return NavDefaults.overrideDefaults(e,NavbarDefaults.create())}}class NavButtonGroupDefaults{static navClass="btn-group";static navItemClass="btn btn-primary";static create(){return new NavOptions({navClass:NavButtonGroupDefaults.navClass,navItemClass:NavButtonGroupDefaults.navItemClass})}static forNavButtonGroup(e){return NavDefaults.overrideDefaults(e,NavButtonGroupDefaults.create())}}class LinkButtonDefaults{static navItemClass="btn";static create(){return new NavOptions({navItemClass:LinkButtonDefaults.navItemClass})}static forLinkButton(e){return NavDefaults.overrideDefaults(e||null,LinkButtonDefaults.create())}}class UserAttributes{static fromSession(e){var t=[];return null!=e&&(t.push("auth"),e.roles&&t.push(...e.roles.map(e=>"role:"+e)),e.permissions)&&t.push(...e.permissions.map(e=>"perm:"+e)),t}}class NavOptions{static fromSession(e,t){return(t=t||new NavOptions).attributes=UserAttributes.fromSession(e),t}attributes;activePath;baseHref;navClass;navItemClass;navLinkClass;childNavItemClass;childNavLinkClass;childNavMenuClass;childNavMenuItemClass;constructor(e){this.attributes=[],this.navClass=NavDefaults.navClass,this.navItemClass=NavDefaults.navItemClass,this.navLinkClass=NavDefaults.navLinkClass,this.childNavItemClass=NavDefaults.childNavItemClass,this.childNavLinkClass=NavDefaults.childNavLinkClass,this.childNavMenuClass=NavDefaults.childNavMenuClass,this.childNavMenuItemClass=NavDefaults.childNavMenuItemClass,Object.assign(this,e)}}function classNames(...t){var r=[];for(let e=0;ee.concat(r(t)),[])}function uniq(e){return Array.from(new Set(e)).sort((e,t)=>t/g,">").replace(/'/g,"'").replace(/"/g,"""):""+e}function htmlAttrs(t){let r=[];return Object.keys(t).forEach(e=>{0Object.keys(e).forEach(e=>{-1===t.indexOf(e)&&t.push(e)})),t}function alignLeft(e,t,r=" "){return t<0?"":t+1-e.length<=0?e:r+e+r.repeat(t+1-e.length)}function alignCenter(e,t,r=" "){var s,n;return t<0?"":(n=(e=e||"").length,s=Math.floor(t/2-n/2),n=Math.abs(n%2-t%2),r.repeat(s+1)+e+r.repeat(s+1+n))}function alignRight(e,t,r=" "){return t<0?"":t+1-e.length<=0?e:r.repeat(t+1-e.length)+e+r}function alignAuto(e,t,r=" "){var s=""+e;return s.length<=t?("number"==typeof e?alignRight:alignLeft)(s,t,r):s}function EventBus(){var{subscribe:e,publish:t}=createBus();this.subscribe=e,this.publish=t}function createBus(){let s={};return{subscribe:function(e,t){let r=Symbol("id");return s[e]||(s[e]={}),s[e][r]=t,{unsubscribe:function(){delete s[e][r],0===Object.getOwnPropertySymbols(s[e]).length&&delete s[e]}}},publish:function(t,r){s[t]&&Object.getOwnPropertySymbols(s[t]).forEach(e=>s[t][e](r))}}}class Inspect{static async vars(n){if("object"==typeof process){let s=process.env.INSPECT_VARS;if(s&&n){const e=e=>"node:"+e;await import(e("fs")).then(async r=>{await import(e("path")).then(e=>{var t=s.replace(/\\/g,"/");0<=t.indexOf("/")&&(e=e.dirname(t),r.existsSync(e)||r.mkdirSync(e)),r.writeFileSync(t,JSON.stringify(n))})})}}}static dump(e){return JSON.stringify(e,null,4).replace(/"/g,"")}static printDump(e){console.log(Inspect.dump(e))}static dumpTable(e){let s=e,n=uniqueKeys(s),a={};n.forEach(t=>{let r=t.length;s.forEach(e=>{var e=e[t];null!=e&&(e=(""+e).length)>r&&(r=e)}),a[t]=r});e=Object.keys(a).length,e=Object.keys(a).map(e=>a[e]).reduce((e,t)=>e+t,0)+2*e+(e+1);let o=[],t=(o.push(`+${"-".repeat(e-2)}+`),"|");return n.forEach(e=>t+=alignCenter(e,a[e])+"|"),o.push(t),o.push(`|${"-".repeat(e-2)}|`),s.forEach(t=>{let r="|";n.forEach(e=>r+=alignAuto(t[e],a[e])+"|"),o.push(r)}),o.push(`+${"-".repeat(e-2)}+`),o.join("\n")}static printDumpTable(e){console.log(Inspect.dumpTable(e))}}export{ResponseStatus,ResponseError,ErrorResponse,EmptyResponse,NavItem,GetNavItems,GetNavItemsResponse,MetadataTypesConfig,MetadataRoute,MetadataOperationType,MetadataTypes,MetadataTypeName,MetadataDataContract,MetadataDataMember,MetadataAttribute,MetadataPropertyType,MetadataType,NewInstanceResolver,SingletonInstanceResolver,ReadyState,ServerEventsClient,getAllMembers,ServerEventReceiver,UpdateEventSubscriber,UpdateEventSubscriberResponse,GetEventSubscribers,ServerEventUser,HttpMethods,GetAccessTokenResponse,JsonServiceClient,JsonApiClient,getMethod,getResponseStatus,ApiResult,createErrorStatus,createFieldError,isFormData,createError,toCamelCase,toPascalCase,toKebabCase,map,sanitize,nameOf,css,splitOnFirst,splitOnLast,leftPart,rightPart,lastLeftPart,lastRightPart,chop,onlyProps,humanize,ucFirst,isUpper,isLower,isDigit,splitTitleCase,humanify,queryString,combinePaths,createPath,createUrl,appendQueryString,setQueryString,bytesToBase64,stripQuotes,tryDecode,parseCookie,normalizeKey,normalize,getField,parseResponseStatus,toFormData,toObject,errorResponseSummary,errorResponseExcept,errorResponse,isDate,toDate,toDateFmt,padInt,dateFmt,dateFmtHM,timeFmt12,toLocalISOString,toTime,msToTime,padStart,createElement,$1,$$,on,addScript,delaySet,bootstrap,bindHandlers,bootstrapForm,toVarNames,formSubmit,ajaxSubmit,serializeForm,serializeToObject,serializeToUrlEncoded,serializeToFormData,sanitizeFormData,triggerEvent,populateForm,trimEnd,safeVarName,pick,omit,apply,each,resolve,mapGet,apiValue,apiValueFmt,activeClassNav,activeClass,BootstrapColors,btnColorClass,BootstrapSizes,btnSizeClass,btnClasses,NavDefaults,NavLinkDefaults,NavbarDefaults,NavButtonGroupDefaults,LinkButtonDefaults,UserAttributes,NavOptions,classNames,fromXsdDuration,toXsdDuration,toTimeSpanFmt,flatMap,uniq,enc,htmlAttrs,indexOfAny,isNullOrEmpty,fromDateTime,toDateTime,fromTimeSpan,toTimeSpan,fromGuid,toGuid,fromByteArray,toByteArray,toBase64String,StringBuffer,JSV,uniqueKeys,alignLeft,alignCenter,alignRight,alignAuto,EventBus,createBus,Inspect}; \ No newline at end of file +class ResponseStatus{constructor(e){Object.assign(this,e)}errorCode;message;stackTrace;errors;meta}class ResponseError{constructor(e){Object.assign(this,e)}errorCode;fieldName;message;meta}class ErrorResponse{constructor(e){Object.assign(this,e)}type;responseStatus}class EmptyResponse{constructor(e){Object.assign(this,e)}responseStatus}class NavItem{label;href;exact;id;className;iconClass;show;hide;children;meta;constructor(e){Object.assign(this,e)}}class GetNavItems{constructor(e){Object.assign(this,e)}createResponse(){return new GetNavItemsResponse}getTypeName(){return"GetNavItems"}getMethod(){return"GET"}}class GetNavItemsResponse{baseUrl;results;navItemsMap;meta;responseStatus;constructor(e){Object.assign(this,e)}}class MetadataTypesConfig{baseUrl;defaultNamespaces;defaultImports;includeTypes;excludeTypes;treatTypesAsStrings;globalNamespace;ignoreTypes;exportTypes;exportAttributes;ignoreTypesInNamespaces;constructor(e){Object.assign(this,e)}}class MetadataRoute{path;verbs;notes;summary;constructor(e){Object.assign(this,e)}}class MetadataOperationType{request;response;actions;returnsVoid;returnType;routes;dataModel;viewModel;requiresAuth;requiredRoles;requiresAnyRole;requiredPermissions;requiresAnyPermission;tags;constructor(e){Object.assign(this,e)}}class MetadataTypes{config;namespaces;types;operations;constructor(e){Object.assign(this,e)}}class MetadataTypeName{name;namespace;genericArgs;constructor(e){Object.assign(this,e)}}class MetadataDataContract{name;namespace;constructor(e){Object.assign(this,e)}}class MetadataDataMember{name;order;isRequired;emitDefaultValue;constructor(e){Object.assign(this,e)}}class MetadataAttribute{name;constructorArgs;args;constructor(e){Object.assign(this,e)}}class MetadataPropertyType{name;type;isValueType;isSystemType;isEnum;isPrimaryKey;typeNamespace;genericArgs;value;description;dataMember;readOnly;paramType;displayType;isRequired;allowableValues;allowableMin;allowableMax;attributes;constructor(e){Object.assign(this,e)}}class MetadataType{name;namespace;genericArgs;inherits;implements;displayType;description;isNested;isEnum;isEnumInt;isInterface;isAbstract;dataContract;properties;attributes;innerTypes;enumNames;enumValues;enumMemberValues;enumDescriptions;meta;constructor(e){Object.assign(this,e)}}class NewInstanceResolver{tryResolve(e){return new e}}class SingletonInstanceResolver{tryResolve(e){return e.instance||(e.instance=new e)}}function eventMessageType(e){switch(e){case"onConnect":return"ServerEventConnect";case"onHeartbeat":return"ServerEventHeartbeat";case"onJoin":return"ServerEventJoin";case"onLeave":return"ServerEventLeave";case"onUpdate":return"ServerEventUpdate"}return null}var ReadyState,Types;(e=>{e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSED=2]="CLOSED"})(ReadyState=ReadyState||{});class ServerEventsClient{channels;options;eventSource;static UnknownChannel="*";eventStreamUri;updateSubscriberUrl;connectionInfo;serviceClient;stopped;resolver;listeners;EventSource;withCredentials;constructor(e,t,r={},s=null){if(this.channels=t,this.options=r,this.eventSource=s,0===this.channels.length)throw"at least 1 channel is required";this.resolver=this.options.resolver||new NewInstanceResolver,this.eventStreamUri=combinePaths(e,"event-stream")+"?",this.updateChannels(t),this.serviceClient=new JsonServiceClient(e),this.listeners={},this.withCredentials=!0,this.options.handlers||(this.options.handlers={})}onMessage=e=>{if("undefined"==typeof document){var t,r,s,n=e.data?e.data.indexOf("\n"):-1;if(0<=n)return t=e.data,s=e.lastEventId,r=Object.assign({},{lastEventId:s,data:t.substring(0,n)}),s=Object.assign({},{lastEventId:s,data:t.substring(n+1)}),this._onMessage(r),void this._onMessage(s)}this._onMessage(e)};_onMessage=a=>{if(!this.stopped){let n=this.options;void 0===o&&(o={querySelectorAll:e=>[]});var o,i=splitOnFirst(a.data," ");let e=null,t=i[0];var l=splitOnFirst(t,"@"),l=(1{if(this.eventSource.readyState===EventSource.CLOSED)clearInterval(n.heartbeat),null!=(e=n.handlers.onStop)&&e.apply(this.eventSource),this.reconnectServerEvents({error:new Error("EventSource is CLOSED")});else{var e=new Request(n.heartbeatUrl,{method:"POST",mode:"cors",headers:s,credentials:this.serviceClient.credentials});try{var t,r=await fetch(e);r.ok?await r.text():(t=new Error(r.status+" - "+r.statusText),this.reconnectServerEvents({error:t}))}catch(e){this.reconnectServerEvents({error:e})}}},this.connectionInfo&&this.connectionInfo.heartbeatIntervalMs||n.heartbeatIntervalMs||1e4)),n.unRegisterUrl&&"undefined"!=typeof window&&(window.onunload=()=>{navigator.sendBeacon?(this.stopped=!0,this.eventSource&&this.eventSource.close(),navigator.sendBeacon(n.unRegisterUrl)):this.stop()}),this.updateSubscriberUrl=n.updateSubscriberUrl,this.updateChannels((n.channels||"").split(","))}else{p="onJoin"==h||"onLeave"==h||"onUpdate"==h;let e=n.handlers[h];e?p?e.call(f||o.body,l):e.call(f||o.body,r,a):p||(c=n.receivers&&n.receivers.cmd,this.invokeReceiver(c,h,f,a,"cmd")),p&&(e=n.handlers.onCommand)&&e.call(f||o.body,l)}else"trigger"===u?this.raiseEvent(i,a):"css"===u&&css(d||$$("body"),h,r);c=n.receivers&&n.receivers[u];this.invokeReceiver(c,h,f,a,u),eventMessageType(h)||(p=n.handlers.onMessage)&&p.call(f||o.body,l),n.onTick&&n.onTick()}}};onError=e=>{var t;this.stopped||(e=e||event,null!=(t=this.options.onException)&&t.call(this.eventSource,e),this.options.onTick&&this.options.onTick())};getEventSourceOptions(){return{withCredentials:this.withCredentials}}reconnectServerEvents(r={}){if(!this.stopped){r.error&&this.onError(r.error);let t=this.eventSource,e=r.url||this.eventStreamUri||t.url;null!=this.options.resolveStreamUrl&&(e=this.options.resolveStreamUrl(e));var s=new(this.EventSource||EventSource)(e,this.getEventSourceOptions()),n=(s.addEventListener("error",e=>(r.onerror||t.onerror||this.onError)(e)),s.addEventListener("message",r.onmessage||t.onmessage||this.onMessage),this.options.onReconnect);return null!=n&&n.call(s,r.error),t.removeEventListener&&(t.removeEventListener("error",this.onError),t.removeEventListener("message",this.onMessage)),t.close(),this.eventSource=s}}start(){if(this.stopped=!1,null==this.eventSource||this.eventSource.readyState===EventSource.CLOSED){let e=this.eventStreamUri;null!=this.options.resolveStreamUrl&&(e=this.options.resolveStreamUrl(e)),this.eventSource=new(this.EventSource||EventSource)(e,this.getEventSourceOptions()),this.eventSource.addEventListener("error",this.onError),this.eventSource.addEventListener("message",e=>this.onMessage(e))}return this}stop(){this.stopped=!0,this.eventSource&&this.eventSource.close();var e=this.options,e=(e&&e.heartbeat&&clearInterval(e.heartbeat),this.connectionInfo);return null==e||null==e.unRegisterUrl?new Promise((e,t)=>e()):(this.connectionInfo=null,fetch(new Request(e.unRegisterUrl,{method:"POST",mode:"cors",credentials:this.serviceClient.credentials})).then(e=>{if(!e.ok)throw new Error(e.status+" - "+e.statusText)}).catch(this.onError))}invokeReceiver(r,e,s,n,t){if(r)if("function"==typeof r&&(r=this.resolver.tryResolve(r)),e=e.replace("-",""),r.client=this,r.request=n,"function"==typeof r[e])r[e].call(s||r,n.body,n);else if(e in r)r[e]=n.body;else{var a=Object.getOwnPropertyDescriptor(r,e);if(null!=a)a.set?a.set(n.body):a.writable&&(r[e]=n.body);else{let t=e.toLowerCase();getAllMembers(r).forEach(e=>{e.toLowerCase()==t&&("function"==typeof r[e]?r[e].call(s||r,n.body,n):r[e]=n.body)});a=r.noSuchMethod;"function"==typeof a&&a.call(s||r,n.target,n)}}}hasConnected(){return null!=this.connectionInfo}registerHandler(e,t){return this.options.handlers||(this.options.handlers={}),this.options.handlers[e]=t,this}setResolver(e){return this.options.resolver=e,this}registerReceiver(e){return this.registerNamedReceiver("cmd",e)}registerNamedReceiver(e,t){return this.options.receivers||(this.options.receivers={}),this.options.receivers[e]=t,this}unregisterReceiver(e="cmd"){return this.options.receivers&&delete this.options.receivers[e],this}updateChannels(e){this.channels=e;var t=null!=this.eventSource?this.eventSource.url:this.eventStreamUri;this.eventStreamUri=t.substring(0,Math.min(t.indexOf("?"),t.length))+"?channels="+e.join(",")+"&t="+(new Date).getTime()}update(e,t){var r,s="string"==typeof e?e.split(","):e,n="string"==typeof t?t.split(","):t,a=[];for(r in this.channels){var o=this.channels[r];null!=n&&-1!==n.indexOf(o)||a.push(o)}if(s)for(var i in s){i=s[i];-1===a.indexOf(i)&&a.push(i)}this.updateChannels(a)}addListener(e,t){return(this.listeners[e]||(this.listeners[e]=[])).push(t),this}removeListener(e,t){e=this.listeners[e];return e&&0<=(t=e.indexOf(t))&&e.splice(t,1),this}raiseEvent(e,t){e=this.listeners[e];e&&e.forEach(e=>{try{e(t)}catch(e){this.onError(e)}})}getConnectionInfo(){if(null==this.connectionInfo)throw"Not Connected";return this.connectionInfo}getSubscriptionId(){return this.getConnectionInfo().id}updateSubscriber(t){return null==t.id&&(t.id=this.getSubscriptionId()),this.serviceClient.post(t).then(e=>{this.update(t.subscribeChannels,t.unsubscribeChannels)}).catch(this.onError)}subscribeToChannels(...t){var e=new UpdateEventSubscriber;return e.id=this.getSubscriptionId(),e.subscribeChannels=t,this.serviceClient.post(e).then(e=>{this.update(t,null)}).catch(this.onError)}unsubscribeFromChannels(...t){var e=new UpdateEventSubscriber;return e.id=this.getSubscriptionId(),e.unsubscribeChannels=t,this.serviceClient.post(e).then(e=>{this.update(null,t)}).catch(this.onError)}getChannelSubscribers(){var e=new GetEventSubscribers;return e.channels=this.channels,this.serviceClient.get(e).then(e=>e.map(e=>this.toServerEventUser(e))).catch(e=>(this.onError(e),[]))}toServerEventUser(e){var t,r=e.channels,s=new ServerEventUser;for(t in s.userId=e.userId,s.displayName=e.displayName,s.profileUrl=e.profileUrl,s.channels=r?r.split(","):null,e)"userId"!=t&&"displayName"!=t&&"profileUrl"!=t&&"channels"!=t&&(null==s.meta&&(s.meta={}),s.meta[t]=e[t]);return s}}function getAllMembers(e){let s=[];do{var t=Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e).map(e=>e.toString())).sort().filter((e,t,r)=>"constructor"!==e&&(0==t||e!==r[t-1])&&-1===s.indexOf(e));s=s.concat(t)}while((e=Object.getPrototypeOf(e))&&Object.getPrototypeOf(e));return s}class ServerEventReceiver{client;request;noSuchMethod(e,t){}}class UpdateEventSubscriber{id;subscribeChannels;unsubscribeChannels;createResponse(){return new UpdateEventSubscriberResponse}getTypeName(){return"UpdateEventSubscriber"}}class UpdateEventSubscriberResponse{responseStatus}class GetEventSubscribers{channels;createResponse(){return[]}getTypeName(){return"GetEventSubscribers"}}class ServerEventUser{userId;displayName;profileUrl;channels;meta}class HttpMethods{static Get="GET";static Post="POST";static Put="PUT";static Delete="DELETE";static Patch="PATCH";static Head="HEAD";static Options="OPTIONS";static hasRequestBody=e=>!("GET"===e||"DELETE"===e||"HEAD"===e||"OPTIONS"===e)}class GetAccessToken{constructor(e){Object.assign(this,e)}refreshToken;useTokenCookie;createResponse(){return new GetAccessTokenResponse}getTypeName(){return"GetAccessToken"}getMethod(){return"POST"}}class GetAccessTokenResponse{accessToken;responseStatus}class JsonServiceClient{baseUrl;replyBaseUrl;oneWayBaseUrl;mode;credentials;headers;userName;password;bearerToken;refreshToken;refreshTokenUri;useTokenCookie;enableAutoRefreshToken;requestFilter;static globalRequestFilter;responseFilter;static globalResponseFilter;exceptionFilter;urlFilter;onAuthenticationRequired;manageCookies;cookies;parseJson;static toBase64;constructor(e="/"){this.baseUrl=e,this.mode="cors",this.credentials="include",this.headers=new Headers,this.headers.set("Content-Type","application/json"),this.manageCookies="undefined"==typeof document,this.cookies={},this.enableAutoRefreshToken=!0,this.basePath="api"}setCredentials(e,t){this.userName=e,this.password=t}useBasePath(e){return this.basePath=e,this}set basePath(e){e?(this.replyBaseUrl=combinePaths(this.baseUrl,e)+"/",this.oneWayBaseUrl=combinePaths(this.baseUrl,e)+"/"):(this.replyBaseUrl=combinePaths(this.baseUrl,"json","reply")+"/",this.oneWayBaseUrl=combinePaths(this.baseUrl,"json","oneway")+"/")}apply(e){return e(this),this}get(e,t){return"string"!=typeof e?this.fetch(HttpMethods.Get,e,t):this.fetch(HttpMethods.Get,null,t,this.toAbsoluteUrl(e))}delete(e,t){return"string"!=typeof e?this.fetch(HttpMethods.Delete,e,t):this.fetch(HttpMethods.Delete,null,t,this.toAbsoluteUrl(e))}post(e,t){return this.fetch(HttpMethods.Post,e,t)}postToUrl(e,t,r){return this.fetch(HttpMethods.Post,t,r,this.toAbsoluteUrl(e))}postBody(e,t,r){return this.fetchBody(HttpMethods.Post,e,t,r)}put(e,t){return this.fetch(HttpMethods.Put,e,t)}putToUrl(e,t,r){return this.fetch(HttpMethods.Put,t,r,this.toAbsoluteUrl(e))}putBody(e,t,r){return this.fetchBody(HttpMethods.Put,e,t,r)}patch(e,t){return this.fetch(HttpMethods.Patch,e,t)}patchToUrl(e,t,r){return this.fetch(HttpMethods.Patch,t,r,this.toAbsoluteUrl(e))}patchBody(e,t,r){return this.fetchBody(HttpMethods.Patch,e,t,r)}publish(e,t){return this.sendOneWay(e,t)}sendOneWay(e,t){var r=combinePaths(this.oneWayBaseUrl,nameOf(e));return this.fetch(HttpMethods.Post,e,null,r)}sendAll(e){var t;return 0==e.length?Promise.resolve([]):(t=combinePaths(this.replyBaseUrl,nameOf(e[0])+"[]"),this.fetch(HttpMethods.Post,e,null,t))}sendAllOneWay(e){var t;return 0==e.length?Promise.resolve(void 0):(t=combinePaths(this.oneWayBaseUrl,nameOf(e[0])+"[]"),this.fetch(HttpMethods.Post,e,null,t).then(e=>{}))}createUrlFromDto(e,t){let r=combinePaths(this.replyBaseUrl,nameOf(t));e=HttpMethods.hasRequestBody(e);return r=e?r:appendQueryString(r,t)}toAbsoluteUrl(e){return e.startsWith("http://")||e.startsWith("https://")?e:combinePaths(this.baseUrl,e)}deleteCookie(e){this.manageCookies?delete this.cookies[e]:document&&(document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/")}createRequest({method:e,request:t,url:r,args:s,body:n}){r=r||this.createUrlFromDto(e,t),s&&(r=appendQueryString(r,s)),null!=this.bearerToken?this.headers.set("Authorization","Bearer "+this.bearerToken):null!=this.userName&&this.headers.set("Authorization","Basic "+JsonServiceClient.toBase64(this.userName+":"+this.password)),this.manageCookies&&(0<(s=Object.keys(this.cookies).map(e=>{e=this.cookies[e];return e.expires&&e.expires0{"set-cookie"===t.toLowerCase()&&e.split(",").forEach(e=>r.push(e))}),r.forEach(e=>{e=parseCookie(e);e&&(this.cookies[e.name]=e)})}e.headers.forEach((e,t)=>{"x-cookies"===t.toLowerCase()&&0<=e.split(",").indexOf("ss-reftok")&&(this.useTokenCookie=!0)}),this.applyResponseFilters(e);let r=t&&"string"!=typeof t&&"function"==typeof t.createResponse?t.createResponse():null;if("string"==typeof r)return e.text().then(e=>e);t=e.headers.get("content-type"),t=t&&-1!==t.indexOf("application/json");if(t)return this.json(e).then(e=>e);if("undefined"!=typeof Uint8Array&&r instanceof Uint8Array){if("function"!=typeof e.arrayBuffer)throw new Error("This fetch polyfill does not implement 'arrayBuffer'");return e.arrayBuffer().then(e=>new Uint8Array(e))}if("function"==typeof Blob&&r instanceof Blob){if("function"!=typeof e.blob)throw new Error("This fetch polyfill does not implement 'blob'");return e.blob().then(e=>e)}var s=e.headers.get("content-length");return"0"===s||null==s&&!t?e.text().then(e=>r):this.json(e).then(e=>e)}handleError(e,r,t=null){if(r instanceof Error)throw this.raiseError(e,r);if(r.bodyUsed)throw this.raiseError(r,createErrorResponse(r.status,r.statusText,t));return void 0===r.json&&r.responseStatus?new Promise((e,t)=>t(this.raiseError(null,r))):this.json(r).then(e=>{e=sanitize(e);if(e.responseStatus)throw null!=t&&(e.type=t),e;throw createErrorResponse(r.status,r.statusText,t)}).catch(e=>{if(e instanceof Error||"undefined"!=typeof window&&window.DOMException&&e instanceof window.DOMException)throw this.raiseError(r,createErrorResponse(r.status,r.statusText,t));throw this.raiseError(r,e)})}fetch(e,t,r,s){return this.sendRequest({method:e,request:t,args:r,url:s})}fetchBody(e,t,r,s){var n=combinePaths(this.replyBaseUrl,nameOf(t));return this.sendRequest({method:e,request:r,body:"string"==typeof r||isFormData(r)?r:JSON.stringify(r),url:appendQueryString(n,t),args:s,returns:t})}sendRequest(t){var e=this.createRequest(t);let r=t.returns||t.request,n=null,a=()=>{var e=this.createRequest(t);return this.urlFilter&&this.urlFilter(e.url),fetch(e.url,e).then(e=>this.createResponse(e,r)).catch(e=>this.handleError(n,e))};return this.urlFilter&&this.urlFilter(e.url),fetch(e.url,e).then(e=>(n=e,this.createResponse(e,r))).catch(e=>{if(401===e.status){if(this.enableAutoRefreshToken&&(this.refreshToken||this.useTokenCookie||null!=this.cookies["ss-reftok"])){let t=new GetAccessToken({refreshToken:this.refreshToken,useTokenCookie:!!this.useTokenCookie});var r=this.refreshTokenUri||this.createUrlFromDto(HttpMethods.Post,t),s=(this.useTokenCookie&&(this.bearerToken=null,this.headers.delete("Authorization")),this.createRequest({method:HttpMethods.Post,request:t,args:null,url:r}));return fetch(r,s).then(e=>this.createResponse(e,t).then(e=>(this.bearerToken=e?.accessToken||null,a()))).catch(e=>this.onAuthenticationRequired?this.onAuthenticationRequired().then(a).catch(e=>this.handleError(n,e,"RefreshTokenException")):this.handleError(n,e,"RefreshTokenException"))}if(this.onAuthenticationRequired)return this.onAuthenticationRequired().then(a)}return this.handleError(n,e)})}raiseError(e,t){return null!=this.exceptionFilter&&this.exceptionFilter(e,t),t}send(e,t,r){return this.sendRequest({method:getMethod(e),request:e,args:t,url:r})}sendVoid(e,t,r){return this.sendRequest({method:getMethod(e),request:e,args:t,url:r})}async api(e,t,r){try{var s=await this.fetch(getMethod(e,r),e,t);return new ApiResult({response:s})}catch(e){return new ApiResult({error:getResponseStatus(e)})}}async apiVoid(e,t,r){try{var s=await this.fetch(getMethod(e,r),e,t);return new ApiResult({response:s??new EmptyResponse})}catch(e){return new ApiResult({error:getResponseStatus(e)})}}async apiForm(e,t,r,s){try{var n=await this.fetchBody(getMethod(e,s),e,t,r);return new ApiResult({response:n})}catch(e){return new ApiResult({error:getResponseStatus(e)})}}async apiFormVoid(e,t,r,s){try{var n=await this.fetchBody(getMethod(e,s),e,t,r);return new ApiResult({response:n??new EmptyResponse})}catch(e){return new ApiResult({error:getResponseStatus(e)})}}}class JsonApiClient{static create(e="/",t){return new JsonServiceClient(e).apply(e=>{e.basePath="/api",e.headers=new Headers,e.enableAutoRefreshToken=!1,t&&t(e)})}}function getMethod(e,t){return t??("function"==typeof e.getMethod?e.getMethod():HttpMethods.Post)}function getResponseStatus(e){return e.responseStatus??e.ResponseStatus??(e.errorCode?e:e.message?createErrorStatus(e.message,e.errorCode):null)}class ApiResult{response;error;constructor(e){Object.assign(this,e)}get completed(){return null!=this.response||null!=this.error}get failed(){return null!=this.error?.errorCode||null!=this.error?.message}get succeeded(){return!this.failed&&null!=this.response}get errorMessage(){return this.error?.message}get errorCode(){return this.error?.errorCode}get errors(){return this.error?.errors??[]}get errorSummary(){return null!=this.error&&0==this.errors.length?this.errorMessage:null}fieldError(e){let t=e.toLowerCase();return this.errors?.find(e=>e.fieldName.toLowerCase()==t)}fieldErrorMessage(e){return this.fieldError(e)?.message}hasFieldError(e){return null!=this.fieldError(e)}showSummary(e=[]){return!!this.failed&&e.every(e=>!this.hasFieldError(e))}summaryMessage(e=[]){if(this.showSummary(e)){let t=e.map(e=>e.toLowerCase());return t.find(e=>-1==t.indexOf(e.toLowerCase()))??this.errorMessage}}addFieldError(e,t,r="Exception"){this.error||(this.error=new ResponseStatus);var s=this.fieldError(e);null!=s?(s.errorCode=r,s.message=t):this.error.errors.push(new ResponseError({fieldName:e,errorCode:r,message:t}))}}function createErrorStatus(e,t="Exception"){return new ResponseStatus({errorCode:t,message:e})}function createFieldError(e,t,r="Exception"){return new ResponseStatus({errors:[new ResponseError({fieldName:e,errorCode:r,message:t})]})}function isFormData(e){return"undefined"!=typeof window&&e instanceof FormData}function createErrorResponse(t,r,s=null){return apply(new ErrorResponse,e=>{null!=s&&(e.type=s),e.responseStatus=apply(new ResponseStatus,e=>{e.errorCode=t&&t.toString(),e.message=r})})}function createError(e,t,r){return new ErrorResponse({responseStatus:new ResponseStatus({errorCode:e,message:t,errors:r?[new ResponseError({errorCode:e,message:t,fieldName:r})]:void 0})})}function toCamelCase(e){return e&&e.charAt(0).toLowerCase()+e.substring(1)}function toPascalCase(e){return e&&e.charAt(0).toUpperCase()+e.substring(1)}function toKebabCase(e){return(e||"").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function map(e,t){return null==e?null:t(e)}function camelCaseAny(e){if(!e||!(e instanceof Object)||Array.isArray(e))return e;var t,r,s,n={};for(t in e)e.hasOwnProperty(t)&&(r=toCamelCase(t),s=e[t],Array.isArray(s)?n[r]=s.map(e=>camelCaseAny(e)):s instanceof Object?n[r]=camelCaseAny(s):n[r]=s);return n}function sanitize(e){return sanitize&&(e.responseStatus||e.errors?e:camelCaseAny(e))}function nameOf(e){if(!e)return"null";if("function"==typeof e.getTypeName)return e.getTypeName();var t=e&&e.constructor;if(null==t)throw e+" doesn't have constructor";return t.name||(e=t.toString()).substring(9,e.indexOf("("))}function log(e,t="LOG"){return console.log(t,e),e}function css(e,t,r){var s="string"==typeof e?document.querySelectorAll(e):e;for(let e=0;er[e]=t[e]),r}function splitCase(e){return"string"!=typeof e?e:e.replace(/([A-Z]|[0-9]+)/g," $1").replace(/_/g," ").trim()}function humanize(e){return!e||0<=e.indexOf(" ")?e:splitCase(toPascalCase(e))}let ucFirst=e=>e.charAt(0).toUpperCase()+e.substring(1),isUpper=e=>"A"<=e&&e<="Z",isLower=e=>"a"<=e&&e<="z",isDigit=e=>"0"<=e&&e<="9",upperOrDigit=e=>isUpper(e)||isDigit(e);function splitTitleCase(t){var r=[];if("string"!=typeof t)return r;let s=0;for(let e=0;e!!e)}function humanify(e){return!e||0<=indexOfAny(e,[" ",",",".",":","-"])?e:ucFirst(splitTitleCase(e).join(" "))}function queryString(e){if(!e||-1===e.indexOf("?"))return{};var t=rightPart(e,"?").split("&"),r={};for(let e=0;e>>e&24),2!=e&&n.length-s!=1||(a+=String.fromCharCode(uint6ToB64(r>>>18&63),uint6ToB64(r>>>12&63),uint6ToB64(r>>>6&63),uint6ToB64(63&r)),r=0);return 0==e?a:a.substring(0,a.length-e)+(1==e?"=":"==")}function uint6ToB64(e){return e<26?e+65:e<52?e+71:e<62?e-4:62===e?43:63===e?47:65}function _btoa(e){return"function"==typeof btoa?btoa(e):Buffer.from(e).toString("base64")}function _atob(e){return"function"==typeof atob?atob(e):Buffer.from(e,"base64").toString()}function stripQuotes(e){return e&&'"'==e[0]&&'"'==e[e.length]?e.slice(1,-1):e}function tryDecode(t){try{return decodeURIComponent(t)}catch(e){return t}}function parseCookie(e){if(!e)return null;let t=null;var r=e.split(/; */);for(let e=0;enormalizeKey(e)===normalizeKey(t))[0]||""]}function parseResponseStatus(t,r=null){try{var e=JSON.parse(t);return sanitize(e.ResponseStatus||e.responseStatus)}catch(e){return{message:r||e.message||e,__error:{error:e,json:t}}}}function toFormData(e){if("undefined"!=typeof window){var t,r=new FormData;for(t in e)r.append(t,e[t]);return r}}function toObject(e){let t={};if(e){if("object"!=typeof e)throw new Error("keys must be an Array of object keys");Array.prototype.slice.call(e).forEach(e=>{this[e]&&(t[e]=this[e])})}return t}function errorResponseSummary(){var e=this.responseStatus||this.ResponseStatus;return null==e||(e=e.ErrorCode?sanitize(e):e).errors&&0!=e.errors.length?void 0:e.message||e.errorCode}function errorResponseExcept(e){var t=this.responseStatus||this.ResponseStatus;if(null!=t){t=t.ErrorCode?sanitize(t):t,e=toVarNames(e);if(e&&null!=t.errors&&0!=t.errors.length){var r,s,n=e.map(e=>(e||"").toLowerCase());for(r of t.errors)if(-1!==n.indexOf((r.fieldName||"").toLowerCase()))return;for(s of t.errors)if(-1===n.indexOf((s.fieldName||"").toLowerCase()))return s.message||s.errorCode}return t.message||t.errorCode||void 0}}function errorResponse(t){var e;return null==t?errorResponseSummary.call(this):null!=(e=this.responseStatus||this.ResponseStatus)&&null!=(e=e.ErrorCode?sanitize(e):e).errors&&0!=e.errors.length&&(e=e.errors.find(e=>(e.fieldName||"").toLowerCase()==t.toLowerCase()))?e.message||e.errorCode:void 0}function isDate(e){return e&&"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e)}function toDate(e){return e?isDate(e)?e:"/"==e[0]?new Date(parseFloat(/Date\(([^)]+)\)/.exec(e)[1])):new Date(e):null}function toDateFmt(e){return dateFmt(toDate(e))}function padInt(e){return e<10?"0"+e:e}function dateFmt(e=new Date){return e.getFullYear()+"/"+padInt(e.getMonth()+1)+"/"+padInt(e.getDate())}function dateFmtHM(e=new Date){return e.getFullYear()+"/"+padInt(e.getMonth()+1)+"/"+padInt(e.getDate())+" "+padInt(e.getHours())+":"+padInt(e.getMinutes())}function timeFmt12(e=new Date){return padInt((e.getHours()+24)%12||12)+":"+padInt(e.getMinutes())+":"+padInt(e.getSeconds())+" "+(12'+e+""}function attr(e,t){return e.getAttribute(t)}function sattr(e,t,r){return e.setAttribute(t,r)}function rattr(e,t){return e.removeAttribute(t)}function createElement(e,t){var r={className:"class",htmlFor:"for"},s=document.createElement(e);if(t?.attrs)for(var n in t.attrs)sattr(s,r[n]||n,t.attrs[n]);return t?.events&&on(s,t.events),t&&t.insertAfter&&t.insertAfter.parentNode.insertBefore(s,t.insertAfter.nextSibling),s}function showInvalidInputs(){var e,t,r,s=attr(this,"data-invalid");s&&(e=(r="checkbox"===this.type||"radio"===this.type||hasClass(this,"form-check"))?parent(this,"form-check"):null,r?addClass(e||this.parentElement,"is-invalid form-control"):addClass(this,"is-invalid"),(null!=(r=!(t=this.nextElementSibling)||attr(t,"for")!==this.id&&"SMALL"!==t.tagName?this:r?e||t.parentElement:t)&&r.nextElementSibling&&hasClass(r.nextElementSibling,"invalid-feedback")?r.nextElementSibling:createElement("div",{insertAfter:r,attrs:{className:"invalid-feedback"}})).innerHTML=s)}function parent(e,t){for(;null!=e&&!hasClass(e,t);)e=e.parentElement;return e}function hasClass(e,t){return!!e&&(e.classList?e.classList.contains(t):-1<(" "+e.className+" ").replace(/[\n\t\r]/g," ").indexOf(" "+t+" "))}function addClass(e,t){return e?e.classList?e.classList.add(...t.split(" ")):hasClass(e,t)?null:e.className=(e.className+" "+t).trim():null}function remClass(e,t){return e?e.classList?e.classList.remove(t):hasClass(e,t)?e.className=e.className.replace(/(\s|^)someclass(\s|$)/," "):null:null}function isElement(e){return"undefined"!=typeof window&&(e instanceof window.Element||e==window.document)}function $1(e,t){return"string"==typeof e?(t||document).querySelector(e):e||null}function $$(e,t){return"string"==typeof e?Array.from((t||"undefined"!=typeof document?document:null)?.querySelectorAll(e)??[]):Array.isArray(e)?e.flatMap(e=>$$(e,t)):[e]}function on(e,s){return $$(e).forEach(r=>{Object.keys(s).forEach(function(e){var t=s[e];"string"==typeof e&&"function"==typeof t&&r.addEventListener(e,s[e]=t.bind(r))})}),s}function addScript(r){return new Promise((e,t)=>{document.body.appendChild(createElement("script",{attrs:{src:r},events:{load:e,error:t}}))})}function delaySet(e,t){t=t&&t.duration||300;let r=setTimeout(()=>e(!0),t);return()=>{clearTimeout(r),e(!1)}}function bootstrap(e){var t=(e||document).querySelectorAll("[data-invalid]");for(let e=0;ehandleEvent(t,r,e)):["click","dblclick","change","focus","blur","focusin","focusout","select","keydown","keypress","keyup","hover","toggle","input"].forEach(e=>{r.querySelector(`[data-${e}]`)&&handleEvent(t,r,e)})}function bootstrapForm(t,r){t&&(r.model&&populateForm(t,r.model),t.onsubmit=function(e){return e.preventDefault(),r.type="bootstrap-v4",ajaxSubmit(t,r)})}function applyErrors(e,r,t){var s={overrideMessages:!1,messages:{NotEmpty:"Required",NotNull:"Required",Email:"Invalid email",AlreadyExists:"Already exists"},errorFilter:function(e,t,r){return this.overrideMessages?this.messages[t]||e||splitCase(t):e||splitCase(t)}};if(clearErrors(e),r){r=sanitize(r),addClass(e,"has-errors");let o=t&&"bootstrap-v4"===t.type;var s={...s,...t},i=(t.messages&&(s.overrideMessages=!0),s.errorFilter.bind(s)),t=r.errors;if(t&&t.length){let n={},a={};$$("input,textarea,select,button").forEach(e=>{var t=e.previousElementSibling,r=e.nextElementSibling,s=("radio"===e.type||"checkbox"===e.type?null:e.id)||attr(e,"name");s&&(s=s.toLowerCase(),n[s]=e,o||(hasClass(t,"help-inline")||hasClass(t,"help-block")?a[s]=t:(hasClass(r,"help-inline")||hasClass(r,"help-block"))&&(a[s]=r)))}),$$(".help-inline[data-for],.help-block[data-for]").forEach(e=>{var t=attr(e,"data-for").toLowerCase();a[t]=e});for(var l of t){var u=(l.fieldName||"").toLowerCase(),c=n[u],h=(c&&(o?("radio"!==(h=attr(c,"type"))&&"checkbox"!==h&&addClass(c,"is-invalid"),sattr(c,"data-invalid",i(l.message,l.errorCode,"field"))):(addClass(c,"error"),addClass(c.parentElement,"has-error"))),a[u]);h&&(addClass(h,"error"),h.innerHTML=i(l.message,l.errorCode,"field"),h.style.display="block")}$$("[data-validation-summary]").forEach(e=>{var t=attr(e,"data-validation-summary").split(","),t=errorResponseExcept.call(r,t);t&&(e.innerHTML=bsAlert(t))})}else{let t=i(r.message||splitCase(r.errorCode),r.errorCode,"summary");o?$$("[data-validation-summary]").forEach(e=>e.innerHTML="<"===t[0]?t:bsAlert(t)):$$(".error-summary").forEach(e=>{e.innerHTML=t(e).style.display="block"})}return e}}function clearErrors(e){remClass(e,"has-errors"),$$(".error-summary").forEach(e=>{e.innerHTML="",e.style.display="none"}),$$("[data-validation-summary]").forEach(e=>{e.innerHTML=""}),$$(".error").forEach(e=>remClass(e,"error")),$$(".form-check.is-invalid [data-invalid]").forEach(e=>{rattr(e,"data-invalid")}),$$(".form-check.is-invalid").forEach(e=>remClass(e,"form-control")),$$(".is-invalid").forEach(e=>{remClass(e,"is-invalid"),rattr(e,"data-invalid")}),$$(".is-valid").forEach(e=>remClass(e,"is-valid"))}function toVarNames(e){return e?isArray(e)?e:e.split(",").map(e=>e.trim()):[]}function formSubmit(e={}){let r=this;var t=attr(r,"enctype")||Types.UrlEncoded;if(t==Types.MultiPart&&void 0===window.FormData)throw new Error(`FormData Type is needed to send '${Types.MultiPart}' Content Types`);let s;try{s=serializeForm(r,t)}catch(e){throw new Error(""+(e.message||e))}var n=new Headers,t=(n.set("Accept",Types.Json),n.set("Content-Type",t),{method:attr(r,"method")||"POST",credentials:"include",mode:"cors",headers:n,body:s});return e.requestFilter&&e.requestFilter(t),fetch(new Request(e.url||attr(r,"action"),t)).catch(e=>{throw new Error(`Network is unreachable (${e.message||e})`)}).then(t=>(e.responseFilter&&e.responseFilter(t),t.ok?(handleHeaderBehaviors(r,t),fromResponse(t)):t.json().catch(e=>{throw new Error("The request failed with "+(t.statusText||t.status))}).then(e=>{throw Object.assign(new ErrorResponse,sanitize(e))})))}function handleHeaderBehaviors(e,t){var r=t.headers.get("X-Location"),r=(r&&(location.href=r),t.headers.get("X-Trigger"));r&&triggerEvent(e,0<=(t=r.indexOf(":"))?r.substring(0,t):r,(e=0<=t?r.substring(t+1):null)?[e]:[])}function ajaxSubmit(s,n={}){let a="bootstrap-v4"===n.type;clearErrors(s);try{if(n.validate&&!1===n.validate.call(s))return!1}catch(e){return!1}addClass(s,"loading");let e=null==n.onSubmitDisable?"[type=submit]":n.onSubmitDisable,t=null!=e&&""!=e;function r(e,t=null){var r;t?applyErrors(s,t.ResponseStatus||t.responseStatus,{...n}):e&&(addClass(s,"has-errors"),(r=$$(".error-summary")[0])&&(r.innerHTML=e),a)&&(r=$$("[data-validation-summary]")[0])&&(r.innerHTML=bsAlert(e)),n.error&&n.error.call(s,t),a&&$$("[data-invalid]").forEach(e=>showInvalidInputs.call(e))}return t&&$$(e).forEach(e=>{sattr(e,"disabled","disabled")}),(n.submit||formSubmit).call(s,n).then(e=>(n.success&&n.success.call(s,e),!1)).catch(e=>{e.responseStatus?r(null,e):r(""+(e.message||e),null)}).finally(()=>{remClass(s,"loading"),t&&$$(e).forEach(e=>{rattr(e,"disabled")}),n.complete&&n.complete.call(s)})}function fromResponse(e){var t,r=e.headers.get("content-type"),r=r&&-1!==r.indexOf(Types.Json);return!r&&("0"===(t=e.headers.get("content-length"))||null==t&&!r)?null:e.json()}function serializeForm(e,t=null){return t===Types.MultiPart?new FormData(e):t==Types.Json?JSON.stringify(serializeToObject(e)):serializeToUrlEncoded(e)}function formEntries(e,r,s){var n,a=e,o=a.elements.length;for(let t=0;te[t]=r)}function serializeToUrlEncoded(e){return formEntries(e,[],(e,t,r)=>"string"==typeof r?e.push(encodeURIComponent(t)+"="+encodeURIComponent(r)):null).join("&").replace(/%20/g,"+")}function serializeToFormData(e){return formEntries(e,new FormData,(e,t,r)=>e.append(t,r))}function sanitizeFormData(e){for(var[t,r]of e)"object"==typeof r&&0===r.size&&e.delete(t);return e}function triggerEvent(e,t,r=null){var s;document.createEvent?((s=document.createEvent("click"==t||t.startsWith("mouse")?"MouseEvents":"HTMLEvents")).initEvent(t,!0,!0),s.data=r,e.dispatchEvent(s)):(r=document.createEventObject(),e.fireEvent("on"+t,r))}function populateForm(r,s){if(s){var n;for(let e in s){let t=s[e];null==t&&(t="");var a=r.elements.namedItem(e)||r.elements.namedItem((n=e)&&(n[0]===n[0].toUpperCase()?toCamelCase(n):n[0]===n[0].toLowerCase()?toPascalCase(n):n)),o=a;if(a)switch(o.type||a[0].type){case"radio":case"checkbox":var i=a.length;for(let e=0;e{0<=r.indexOf(e)&&(s[e]=t[e])}),s}function omit(t,r){let s={};return t&&Object.keys(t).forEach(e=>{r.indexOf(e)<0&&(s[e]=t[e])}),s}function omitEmpty(r){let s={};return r&&Object.keys(r).forEach(e=>{var t=r[e];null!=t&&""!==t&&(s[e]=t)}),s}function apply(e,t){return t(e),e}function each(e,r,t){return e.reduce((e,t)=>(r(e,t),e),t||{})}function resolve(e,t){e="function"==typeof e?e():e;return"function"==typeof t?t(e):e}function mapGet(e,r){if(!e||!r)return null;var s=e[r];if(s)return s;if("object"!=typeof e)return null;{let t=r.toLowerCase();s=Object.keys(e).find(e=>e.toLowerCase()===t);return s?e[s]:null}}function apiValue(e){return null==e?"":"string"==typeof e?"/Date("===e.substring(0,6)?toDate(e):e.trim():e}function apiValueFmt(e){e=apiValue(e);return(null!=e?isDate(e)?dateFmt(e):e:null)||""}function activeClassNav(e,t){return null!=e.href&&(e.exact||t.length<=1?trimEnd(t,"/").toLowerCase()===trimEnd(e.href,"/").toLowerCase():trimEnd(t,"/").toLowerCase().startsWith(trimEnd(e.href,"/").toLowerCase()))?"active":null}function activeClass(e,t,r){return null!=e&&(r||t.length<=1?trimEnd(t,"/").toLowerCase()===trimEnd(e,"/").toLowerCase():trimEnd(t,"/").toLowerCase().startsWith(trimEnd(e,"/").toLowerCase()))?"active":null}function bootstrapColors(){return["primary","secondary","success","info","warning","danger","light","dark"]}JsonServiceClient.toBase64=e=>_btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(new Number("0x"+t).valueOf()))),"undefined"!=typeof window&&void 0!==window.Element&&(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){let t=this;do{if(t.matches(e))return t}while(null!==(t=t.parentElement||t.parentNode)&&1===t.nodeType);return null})),(e=>{e.MultiPart="multipart/form-data",e.UrlEncoded="application/x-www-form-urlencoded",e.Json="application/json"})(Types=Types||{});let BootstrapColors=bootstrapColors();function btnColorClass(e){for(var t of bootstrapColors()){if(e[t])return"btn-"+t;if(e["outline-"+t])return"btn-outline-"+t}return null}function bootstrapSizes(){return["xs","sm","md","lg"]}let BootstrapSizes=bootstrapSizes();function btnSizeClass(e){for(var t of bootstrapSizes())if(e[t])return"btn-"+t;return null}function btnClasses(e){var t=[],r=btnColorClass(e),r=(r&&t.push(r),btnSizeClass(e));return r&&t.push(r),e.block&&t.push("btn-block"),t}class NavDefaults{static navClass="nav";static navItemClass="nav-item";static navLinkClass="nav-link";static childNavItemClass="nav-item dropdown";static childNavLinkClass="nav-link dropdown-toggle";static childNavMenuClass="dropdown-menu";static childNavMenuItemClass="dropdown-item";static create(){return new NavOptions}static forNav(e){return e||NavDefaults.create()}static overrideDefaults(e,t){return null==e?t:((e=Object.assign({},e)).navClass===NavDefaults.navClass&&null!=t.navClass&&(e.navClass=t.navClass),e.navItemClass===NavDefaults.navItemClass&&null!=t.navItemClass&&(e.navItemClass=t.navItemClass),e.navLinkClass===NavDefaults.navLinkClass&&null!=t.navLinkClass&&(e.navLinkClass=t.navLinkClass),e.childNavItemClass===NavDefaults.childNavItemClass&&null!=t.childNavItemClass&&(e.childNavItemClass=t.childNavItemClass),e.childNavLinkClass===NavDefaults.childNavLinkClass&&null!=t.childNavLinkClass&&(e.childNavLinkClass=t.childNavLinkClass),e.childNavMenuClass===NavDefaults.childNavMenuClass&&null!=t.childNavMenuClass&&(e.childNavMenuClass=t.childNavMenuClass),e.childNavMenuItemClass===NavDefaults.childNavMenuItemClass&&null!=t.childNavMenuItemClass&&(e.childNavMenuItemClass=t.childNavMenuItemClass),e)}static showNav(e,t){return null==t||0===t.length?null==e.show:!(null!=e.show&&t.indexOf(e.show)<0||null!=e.hide&&0<=t.indexOf(e.hide))}}class NavLinkDefaults{static forNavLink(e){return e||NavDefaults.create()}}class NavbarDefaults{static navClass="navbar-nav";static create(){return new NavOptions({navClass:NavbarDefaults.navClass})}static forNavbar(e){return NavDefaults.overrideDefaults(e,NavbarDefaults.create())}}class NavButtonGroupDefaults{static navClass="btn-group";static navItemClass="btn btn-primary";static create(){return new NavOptions({navClass:NavButtonGroupDefaults.navClass,navItemClass:NavButtonGroupDefaults.navItemClass})}static forNavButtonGroup(e){return NavDefaults.overrideDefaults(e,NavButtonGroupDefaults.create())}}class LinkButtonDefaults{static navItemClass="btn";static create(){return new NavOptions({navItemClass:LinkButtonDefaults.navItemClass})}static forLinkButton(e){return NavDefaults.overrideDefaults(e||null,LinkButtonDefaults.create())}}class UserAttributes{static fromSession(e){var t=[];return null!=e&&(t.push("auth"),e.roles&&t.push(...e.roles.map(e=>"role:"+e)),e.permissions)&&t.push(...e.permissions.map(e=>"perm:"+e)),t}}class NavOptions{static fromSession(e,t){return(t=t||new NavOptions).attributes=UserAttributes.fromSession(e),t}attributes;activePath;baseHref;navClass;navItemClass;navLinkClass;childNavItemClass;childNavLinkClass;childNavMenuClass;childNavMenuItemClass;constructor(e){this.attributes=[],this.navClass=NavDefaults.navClass,this.navItemClass=NavDefaults.navItemClass,this.navLinkClass=NavDefaults.navLinkClass,this.childNavItemClass=NavDefaults.childNavItemClass,this.childNavLinkClass=NavDefaults.childNavLinkClass,this.childNavMenuClass=NavDefaults.childNavMenuClass,this.childNavMenuItemClass=NavDefaults.childNavMenuItemClass,Object.assign(this,e)}}function classNames(...t){var r=[];for(let e=0;ee.concat(r(t)),[])}function uniq(e){return Array.from(new Set(e)).sort((e,t)=>t/g,">").replace(/'/g,"'").replace(/"/g,"""):""+e}function htmlAttrs(t){let r=[];return Object.keys(t).forEach(e=>{0Object.keys(e).forEach(e=>{-1===t.indexOf(e)&&t.push(e)})),t}function alignLeft(e,t,r=" "){return t<0?"":t+1-e.length<=0?e:r+e+r.repeat(t+1-e.length)}function alignCenter(e,t,r=" "){var s,n;return t<0?"":(n=(e=e||"").length,s=Math.floor(t/2-n/2),n=Math.abs(n%2-t%2),r.repeat(s+1)+e+r.repeat(s+1+n))}function alignRight(e,t,r=" "){return t<0?"":t+1-e.length<=0?e:r.repeat(t+1-e.length)+e+r}function alignAuto(e,t,r=" "){var s=""+e;return s.length<=t?("number"==typeof e?alignRight:alignLeft)(s,t,r):s}function EventBus(){var{subscribe:e,publish:t}=createBus();this.subscribe=e,this.publish=t}function createBus(){let s={};return{subscribe:function(e,t){let r=Symbol("id");return s[e]||(s[e]={}),s[e][r]=t,{unsubscribe:function(){delete s[e][r],0===Object.getOwnPropertySymbols(s[e]).length&&delete s[e]}}},publish:function(t,r){s[t]&&Object.getOwnPropertySymbols(s[t]).forEach(e=>s[t][e](r))}}}class Inspect{static async vars(n){if("object"==typeof process){let s=process.env.INSPECT_VARS;if(s&&n){let e=e=>"node:"+e;await import(e("fs")).then(async r=>{await import(e("path")).then(e=>{var t=s.replace(/\\/g,"/");0<=t.indexOf("/")&&(e=e.dirname(t),r.existsSync(e)||r.mkdirSync(e)),r.writeFileSync(t,JSON.stringify(n))})})}}}static dump(e){return JSON.stringify(e,null,4).replace(/"/g,"")}static printDump(e){console.log(Inspect.dump(e))}static dumpTable(e){let s=e,n=uniqueKeys(s),a={};n.forEach(t=>{let r=t.length;s.forEach(e=>{var e=e[t];null!=e&&(e=(""+e).length)>r&&(r=e)}),a[t]=r});e=Object.keys(a).length,e=Object.keys(a).map(e=>a[e]).reduce((e,t)=>e+t,0)+2*e+(e+1);let o=[],t=(o.push(`+${"-".repeat(e-2)}+`),"|");return n.forEach(e=>t+=alignCenter(e,a[e])+"|"),o.push(t),o.push(`|${"-".repeat(e-2)}|`),s.forEach(t=>{let r="|";n.forEach(e=>r+=alignAuto(t[e],a[e])+"|"),o.push(r)}),o.push(`+${"-".repeat(e-2)}+`),o.join("\n")}static printDumpTable(e){console.log(Inspect.dumpTable(e))}}export{ResponseStatus,ResponseError,ErrorResponse,EmptyResponse,NavItem,GetNavItems,GetNavItemsResponse,MetadataTypesConfig,MetadataRoute,MetadataOperationType,MetadataTypes,MetadataTypeName,MetadataDataContract,MetadataDataMember,MetadataAttribute,MetadataPropertyType,MetadataType,NewInstanceResolver,SingletonInstanceResolver,ReadyState,ServerEventsClient,getAllMembers,ServerEventReceiver,UpdateEventSubscriber,UpdateEventSubscriberResponse,GetEventSubscribers,ServerEventUser,HttpMethods,GetAccessTokenResponse,JsonServiceClient,JsonApiClient,getMethod,getResponseStatus,ApiResult,createErrorStatus,createFieldError,isFormData,createError,toCamelCase,toPascalCase,toKebabCase,map,camelCaseAny,sanitize,nameOf,css,splitOnFirst,splitOnLast,leftPart,rightPart,lastLeftPart,lastRightPart,chop,onlyProps,humanize,ucFirst,isUpper,isLower,isDigit,splitTitleCase,humanify,queryString,combinePaths,createPath,createUrl,appendQueryString,setQueryString,bytesToBase64,stripQuotes,tryDecode,parseCookie,normalizeKey,normalize,getField,parseResponseStatus,toFormData,toObject,errorResponseSummary,errorResponseExcept,errorResponse,isDate,toDate,toDateFmt,padInt,dateFmt,dateFmtHM,timeFmt12,toLocalISOString,toTime,msToTime,padStart,createElement,isElement,$1,$$,on,addScript,delaySet,bootstrap,bindHandlers,bootstrapForm,toVarNames,formSubmit,ajaxSubmit,serializeForm,serializeToObject,serializeToUrlEncoded,serializeToFormData,sanitizeFormData,triggerEvent,populateForm,trimEnd,safeVarName,pick,omit,omitEmpty,apply,each,resolve,mapGet,apiValue,apiValueFmt,activeClassNav,activeClass,BootstrapColors,btnColorClass,BootstrapSizes,btnSizeClass,btnClasses,NavDefaults,NavLinkDefaults,NavbarDefaults,NavButtonGroupDefaults,LinkButtonDefaults,UserAttributes,NavOptions,classNames,fromXsdDuration,toXsdDuration,toTimeSpanFmt,flatMap,uniq,enc,htmlAttrs,indexOfAny,isNullOrEmpty,fromDateTime,toDateTime,fromTimeSpan,toTimeSpan,fromGuid,toGuid,fromByteArray,toByteArray,toBase64String,StringBuffer,JSV,uniqueKeys,alignLeft,alignCenter,alignRight,alignAuto,EventBus,createBus,Inspect}; \ No newline at end of file diff --git a/lib/mjs/servicestack-client.mjs b/lib/mjs/servicestack-client.mjs index 8429fc4..f132bc9 100644 --- a/lib/mjs/servicestack-client.mjs +++ b/lib/mjs/servicestack-client.mjs @@ -745,8 +745,6 @@ export class JsonServiceClient { static toBase64; constructor(baseUrl = "/") { this.baseUrl = baseUrl; - this.replyBaseUrl = combinePaths(baseUrl, "json", "reply") + "/"; - this.oneWayBaseUrl = combinePaths(baseUrl, "json", "oneway") + "/"; this.mode = "cors"; this.credentials = "include"; this.headers = new Headers(); @@ -754,6 +752,7 @@ export class JsonServiceClient { this.manageCookies = typeof document == "undefined"; //because node-fetch doesn't this.cookies = {}; this.enableAutoRefreshToken = true; + this.basePath = 'api'; } setCredentials(userName, password) { this.userName = userName; @@ -769,9 +768,6 @@ export class JsonServiceClient { this.oneWayBaseUrl = combinePaths(this.baseUrl, "json", "oneway") + "/"; } else { - if (path[0] != '/') { - path = '/' + path; - } this.replyBaseUrl = combinePaths(this.baseUrl, path) + "/"; this.oneWayBaseUrl = combinePaths(this.baseUrl, path) + "/"; } @@ -1053,7 +1049,7 @@ export class JsonServiceClient { let jwtRequest = this.createRequest({ method: HttpMethods.Post, request: jwtReq, args: null, url }); return fetch(url, jwtRequest) .then(r => this.createResponse(r, jwtReq).then(jwtResponse => { - this.bearerToken = jwtResponse.accessToken || null; + this.bearerToken = jwtResponse?.accessToken || null; return resendRequest(); })) .catch(res => { @@ -1134,6 +1130,7 @@ export class JsonApiClient { let client = new JsonServiceClient(baseUrl).apply(c => { c.basePath = "/api"; c.headers = new Headers(); //avoid pre-flight CORS requests + c.enableAutoRefreshToken = false; // Use JWT Cookies by default if (f) { f(c); } @@ -1142,9 +1139,9 @@ export class JsonApiClient { } } export function getMethod(request, method) { - return (method ?? typeof request.getMethod == "function") + return method ?? (typeof request.getMethod == "function" ? request.getMethod() - : HttpMethods.Post; + : HttpMethods.Post); } export function getResponseStatus(e) { return e.responseStatus ?? e.ResponseStatus ?? @@ -1226,30 +1223,32 @@ export function toCamelCase(s) { return !s ? s : s.charAt(0).toLowerCase() + s.s export function toPascalCase(s) { return !s ? s : s.charAt(0).toUpperCase() + s.substring(1); } export function toKebabCase(s) { return (s || '').replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase(); } export function map(o, f) { return o == null ? null : f(o); } +export function camelCaseAny(o) { + if (!o || !(o instanceof Object) || Array.isArray(o)) + return o; + let to = {}; + for (let k in o) { + if (o.hasOwnProperty(k)) { + const key = toCamelCase(k); + const val = o[k]; + if (Array.isArray(val)) + to[key] = val.map(x => camelCaseAny(x)); + else if (val instanceof Object) + to[key] = camelCaseAny(val); + else + to[key] = val; + } + } + return to; +} export function sanitize(status) { + if (!sanitize) + return sanitize; if (status.responseStatus) return status; if (status.errors) return status; - let to = {}; - for (let k in status) { - if (status.hasOwnProperty(k)) { - if (status[k] instanceof Object) - to[toCamelCase(k)] = sanitize(status[k]); - else - to[toCamelCase(k)] = status[k]; - } - } - to.errors = []; - if (status.Errors != null) { - for (let i = 0, len = status.Errors.length; i < len; i++) { - let o = status.Errors[i]; - let err = {}; - for (let k in o) - err[toCamelCase(k)] = o[k]; - to.errors.push(err); - } - } + let to = camelCaseAny(status); return to; } export function nameOf(o) { @@ -1362,7 +1361,11 @@ export function splitTitleCase(s) { to.push(s.substring(lastSplit, s.length)); return to.filter(x => !!x); } -export function humanify(s) { return !s || s.indexOf(' ') >= 0 ? s : ucFirst(splitTitleCase(s).join(' ')); } +export function humanify(s) { + return !s || indexOfAny(s, [' ', ',', '.', ':', '-']) >= 0 + ? s + : ucFirst(splitTitleCase(s).join(' ')); +} export function queryString(url) { if (!url || url.indexOf('?') === -1) return {}; @@ -1430,7 +1433,7 @@ export function appendQueryString(url, args) { for (let k in args) { if (args.hasOwnProperty(k)) { let val = args[k]; - if (typeof val == 'undefined') + if (typeof val == 'undefined' || typeof val == 'function' || typeof val == 'symbol') continue; url += url.indexOf("?") >= 0 ? "&" : "?"; url += k + (val === null ? '' : "=" + qsValue(val)); @@ -1756,13 +1759,18 @@ function remClass(el, cls) { ? el.className = el.className.replace(/(\s|^)someclass(\s|$)/, ' ') : null; } +export function isElement(el) { + return typeof window != "undefined" && (el instanceof window.Element || el == window.document); +} export function $1(sel, el) { return typeof sel === "string" ? (el || document).querySelector(sel) : sel || null; } export function $$(sel, el) { - return typeof sel === "string" - ? Array.prototype.slice.call((el || document).querySelectorAll(sel)) - : Array.isArray(sel) ? sel : [sel]; + if (typeof sel === "string") + return Array.from((el || typeof document != "undefined" ? document : null)?.querySelectorAll(sel) ?? []); + if (Array.isArray(sel)) + return sel.flatMap(x => $$(x, el)); + return [sel]; } export function on(sel, handlers) { $$(sel).forEach(e => { @@ -2243,20 +2251,34 @@ export function safeVarName(s) { } export function pick(o, keys) { const to = {}; - for (const k in o) { - if (o.hasOwnProperty(k) && keys.indexOf(k) >= 0) { + Object.keys(o).forEach(k => { + if (keys.indexOf(k) >= 0) { to[k] = o[k]; } - } + }); return to; } export function omit(o, keys) { const to = {}; - for (const k in o) { - if (o.hasOwnProperty(k) && keys.indexOf(k) < 0) { + if (!o) + return to; + Object.keys(o).forEach(k => { + if (keys.indexOf(k) < 0) { to[k] = o[k]; } - } + }); + return to; +} +export function omitEmpty(o) { + const to = {}; + if (!o) + return to; + Object.keys(o).forEach(k => { + const v = o[k]; + if (v != null && v !== '') { + to[k] = v; + } + }); return to; } export function apply(x, fn) { diff --git a/lib/mjs/servicestack-vue.min.mjs b/lib/mjs/servicestack-vue.min.mjs index ac76c7f..f4cb0cc 100644 --- a/lib/mjs/servicestack-vue.min.mjs +++ b/lib/mjs/servicestack-vue.min.mjs @@ -1,37 +1,37 @@ -var Ys=Object.defineProperty,eo=(e,t,l)=>t in e?Ys(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l,_e=(e,t,l)=>(eo(e,"symbol"!=typeof t?t+"":t,l),l);import{defineComponent as ue,computed as f,openBlock as a,createElementBlock as u,normalizeClass as w,unref as o,createElementVNode as s,createCommentVNode as k,renderSlot as Z,ref as M,toDisplayString as A,inject as qe,nextTick as xt,isRef as qn,mergeProps as Le,withModifiers as Ne,h as ht,resolveComponent as X,createBlock as se,withCtx as ke,useAttrs as to,createVNode as $e,createTextVNode as xe,watchEffect as hl,normalizeStyle as Jl,Fragment as Te,renderList as Ie,withDirectives as kt,vModelCheckbox as Xl,withKeys as Qn,createStaticVNode as wl,vModelSelect as lo,useSlots as Yl,getCurrentInstance as Be,onMounted as Xe,createSlots as en,normalizeProps as It,guardReactiveProps as gl,vModelDynamic as no,onUnmounted as Pt,watch as Lt,vModelText as so,resolveDynamicComponent as Kn,provide as Xt,resolveDirective as oo}from"vue";import{errorResponseExcept as ao,dateFmt as Zn,toTime as io,omit as ut,enc as Hl,setQueryString as ro,appendQueryString as Kt,nameOf as uo,ApiResult as We,lastRightPart as $t,leftPart as xl,map as Ue,toDate as Vt,toDateTime as co,toCamelCase as fo,mapGet as be,chop as mo,fromXsdDuration as Gn,isDate as kl,timeFmt12 as vo,apiValue as ho,indexOfAny as go,createBus as po,toKebabCase as Rn,humanize as Ee,delaySet as Wn,rightPart as dl,queryString as El,combinePaths as yo,toPascalCase as nt,errorResponse as ft,trimEnd as bo,$1 as pl,lastLeftPart as wo,ResponseStatus as Pl,ResponseError as Hn,HttpMethods as tn,uniqueKeys as zl,humanify as Jn,each as xo}from"@servicestack/client";const ko={class:"flex items-center"},$o={key:0,class:"flex-shrink-0 mr-3"},Co={key:0,class:"h-5 w-5 text-yellow-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},_o=s("path",{"fill-rule":"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"},null,-1),Lo=[_o],Vo={key:1,class:"h-5 w-5 text-red-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},So=s("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z","clip-rule":"evenodd"},null,-1),Mo=[So],Ao={key:2,class:"h-5 w-5 text-blue-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},To=s("path",{"fill-rule":"evenodd",d:"M19 10.5a8.5 8.5 0 11-17 0 8.5 8.5 0 0117 0zM8.25 9.75A.75.75 0 019 9h.253a1.75 1.75 0 011.709 2.13l-.46 2.066a.25.25 0 00.245.304H11a.75.75 0 010 1.5h-.253a1.75 1.75 0 01-1.709-2.13l.46-2.066a.25.25 0 00-.245-.304H9a.75.75 0 01-.75-.75zM10 7a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1),Fo=[To],Io={key:3,class:"h-5 w-5 text-green-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},Do=s("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1),Oo=[Do],jo=ue({__name:"Alert",props:{type:{default:"warn"},hideIcon:{type:Boolean}},setup(l){const e=l,n=f(()=>"info"==e.type?"bg-blue-50 dark:bg-blue-200":"error"==e.type?"bg-red-50 dark:bg-red-200":"success"==e.type?"bg-green-50 dark:bg-green-200":"bg-yellow-50 dark:bg-yellow-200"),r=f(()=>"info"==e.type?"border-blue-400":"error"==e.type?"border-red-400":"success"==e.type?"border-green-400":"border-yellow-400"),i=f(()=>"info"==e.type?"text-blue-700":"error"==e.type?"text-red-700":"success"==e.type?"text-green-700":"text-yellow-700");return(e,t)=>(a(),u("div",{class:w([o(n),o(r),"border-l-4 p-4"])},[s("div",ko,[l.hideIcon?k("",!0):(a(),u("div",$o,["warn"==l.type?(a(),u("svg",Co,Lo)):"error"==l.type?(a(),u("svg",Vo,Mo)):"info"==l.type?(a(),u("svg",Ao,Fo)):"success"==l.type?(a(),u("svg",Io,Oo)):k("",!0)])),s("div",null,[s("p",{class:w([o(i),"text-sm"])},[Z(e.$slots,"default")],2)])])],2))}}),Po={key:0,class:"rounded-md bg-green-50 dark:bg-green-200 p-4",role:"alert"},Bo={class:"flex"},Ro=s("div",{class:"flex-shrink-0"},[s("svg",{class:"h-5 w-5 text-green-400 dark:text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[s("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"})])],-1),Ho={class:"ml-3"},Eo={class:"text-sm font-medium text-green-800"},zo={key:0},No={class:"ml-auto pl-3"},Uo={class:"-mx-1.5 -my-1.5"},qo=s("span",{class:"sr-only"},"Dismiss",-1),Qo=s("svg",{class:"h-5 w-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[s("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})],-1),Ko=[qo,Qo],Zo=ue({__name:"AlertSuccess",props:{message:null},setup(l){const n=M(!1);return(e,t)=>n.value?k("",!0):(a(),u("div",Po,[s("div",Bo,[Ro,s("div",Ho,[s("h3",Eo,[l.message?(a(),u("span",zo,A(l.message),1)):Z(e.$slots,"default",{key:1})])]),s("div",No,[s("div",Uo,[s("button",{type:"button",class:"inline-flex rounded-md bg-green-50 dark:bg-green-200 p-1.5 text-green-500 dark:text-green-600 hover:bg-green-100 dark:hover:bg-green-700 dark:hover:text-white focus:outline-none focus:ring-2 focus:ring-green-600 focus:ring-offset-2 focus:ring-offset-green-50 dark:ring-offset-green-200",onClick:t[0]||(t[0]=e=>n.value=!0)},Ko)])])])]))}}),Go={class:"flex"},Wo=s("div",{class:"flex-shrink-0"},[s("svg",{class:"h-5 w-5 text-red-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[s("path",{fill:"currentColor",d:"M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12S6.47 2 12 2m3.59 5L12 10.59L8.41 7L7 8.41L10.59 12L7 15.59L8.41 17L12 13.41L15.59 17L17 15.59L13.41 12L17 8.41L15.59 7Z"})])],-1),Jo={class:"ml-3"},Xo={class:"text-sm text-red-700 dark:text-red-200"},Yo=ue({__name:"ErrorSummary",props:{status:null,except:null,class:null},setup(e){const t=e;let l=qe("ApiState",void 0);const n=f(()=>t.status||null!=l&&l.error.value?ao.call({responseStatus:t.status??(null==l?void 0:l.error.value)},t.except??[]):null);return(e,t)=>o(n)?(a(),u("div",{key:0,class:w("bg-red-50 dark:bg-red-900 border-l-4 border-red-400 p-4 "+e.$props.class)},[s("div",Go,[Wo,s("div",Jo,[s("p",Xo,A(o(n)),1)])])],2)):k("",!0)}}),ea=["id","aria-describedby"],ta=ue({__name:"InputDescription",props:{id:null,description:null},setup(l){return(e,t)=>l.description?(a(),u("div",{key:"description",class:"mt-2 text-sm text-gray-500",id:l.id+"-description","aria-describedby":l.id+"-description"},[s("div",null,A(l.description),1)],8,ea)):k("",!0)}});function $l(e){return Zn(e).replace(/\//g,"-")}function Xn(e){return null==e?"":io(e)}function Yn(e,t){e.value=null,xt(()=>e.value=t)}function At(l){return Object.keys(l).forEach(e=>{var t=l[e];l[e]=qn(t)?o(t):t}),l}function Ct(e,t,l){l?(t.value=e.entering.cls+" "+e.entering.from,setTimeout(()=>t.value=e.entering.cls+" "+e.entering.to,0)):(t.value=e.leaving.cls+" "+e.leaving.from,setTimeout(()=>t.value=e.leaving.cls+" "+e.leaving.to,0))}function cl(l){if(!("u"0":"<"+e+Nl(l)+`>${t||""}`}function Nl(l){return Object.keys(l).reduce((e,t)=>`${e} ${t}="${Hl(l[t])}"`,"")}function Cl(e){return Object.assign({target:"_blank",rel:"noopener",class:"text-blue-600"},e)}function Ft(e){return wn(e)}let la=["string","number","boolean","null","undefined"];function _t(e){return 0<=la.indexOf(typeof e)||e instanceof Date}function Zt(e){return!_t(e)}class es{get length(){return"u"",";"].some(e=>t.includes(e)))throw new Error(`Unsafe script: '${t}'`);e=Object.assign(Object.keys(globalThis).reduce((e,t)=>(e[t]=void 0,e),{}),e);return new Function("with(this) { return ("+t+") }").call(e)}function Ul(e){typeof navigator<"u"&&navigator.clipboard.writeText(e)}function sn(e){e=ie.config.storage.getItem(e);return e?JSON.parse(e):null}function _l(e,t){return Kt("swr."+uo(e),t?Object.assign({},e,t):e)}function na(e){e.request&&(e=_l(e.request,e.args),ie.config.storage.removeItem(e))}async function ts(e,t,l,a,s){var n=_l(t,a),e=(l(new We({response:sn(n)})),await e.api(t,a,s));return e.succeeded&&e.response&&(e.response._date=(new Date).valueOf(),t=JSON.stringify(e.response),ie.config.storage.setItem(n,t),l(e)),e}function ls(t,l){let a=null;return(...e)=>{a&&clearTimeout(a),a=setTimeout(()=>{t(...e)},l||100)}}function gt(e){return"string"==typeof e?e.split(","):e||[]}function bt(e,t){const l=gt(t);return e.reduce((e,t)=>(e[t]=!l.includes(t),e),{})}function ns(){return{LocalStore:es,dateInputFormat:$l,timeInputFormat:Xn,setRef:Yn,unRefs:At,transition:Ct,focusNextElement:cl,getTypeName:Bt,htmlTag:it,htmlAttrs:Nl,linkAttrs:Cl,toAppUrl:Ft,isPrimitive:_t,isComplexType:Zt,pushState:ln,scopedExpr:nn,copyText:Ul,fromCache:sn,swrCacheKey:_l,swrClear:na,swrApi:ts,asStrings:gt,asOptions:bt,createDebounce:ls}}const ss="png,jpg,jpeg,jfif,gif,svg,webp".split(","),os={img:"png,jpg,jpeg,gif,svg,webp,png,jpg,jpeg,gif,bmp,tif,tiff,webp,ai,psd,ps".split(","),vid:"avi,m4v,mov,mp4,mpg,mpeg,wmv,webm".split(","),aud:"mp3,mpa,ogg,wav,wma,mid,webm".split(","),ppt:"key,odp,pps,ppt,pptx".split(","),xls:"xls,xlsm,xlsx,ods,csv,tsv".split(","),doc:"doc,docx,pdf,rtf,tex,txt,md,rst,xls,xlsm,xlsx,ods,key,odp,pps,ppt,pptx".split(","),zip:"zip,tar,gz,7z,rar,gzip,deflate,br,iso,dmg,z,lz,lz4,lzh,s7z,apl,arg,jar,war".split(","),exe:"exe,bat,sh,cmd,com,app,msi,run,vb,vbs,js,ws,wsh".split(","),att:"bin,oct,dat".split(",")},En=Object.keys(os),ct=(e,t)=>``,fl={img:ct("4 4 16 16",""),vid:ct("0 0 24 24",""),aud:ct("0 0 24 24",""),ppt:ct("0 0 48 48",""),xls:ct("0 0 256 256",""),doc:ct("0 0 32 32",""),zip:ct("0 0 16 16",""),exe:ct("0 0 16 16",""),att:ct("0 0 24 24","")},sa=/[\r\n%#()<>?[\\\]^`{|}]/g,zn=1024,oa=["Bytes","KB","MB","GB","TB"],aa=(()=>{const t="application/",e=t+"vnd.openxmlformats-officedocument.",l="image/",a="text/",s="video/",n={jpg:l+"jpeg",tif:l+"tiff",svg:l+"svg+xml",ico:l+"x-icon",ts:a+"typescript",py:a+"x-python",sh:a+"x-sh",mp3:"audio/mpeg3",mpg:s+"mpeg",ogv:s+"ogg",xlsx:e+"spreadsheetml.sheet",xltx:e+"spreadsheetml.template",docx:e+"wordprocessingml.document",dotx:e+"wordprocessingml.template",pptx:e+"presentationml.presentation",potx:e+"presentationml.template",ppsx:e+"presentationml.slideshow",mdb:t+"vnd.ms-access"};function o(e,t){e.split(",").forEach(e=>n[e]=t)}function r(e,t){e.split(",").forEach(e=>n[e]=t(e))}return r("jpeg,gif,png,tiff,bmp,webp",e=>l+e),r("jsx,csv,css",e=>a+e),r("aac,ac3,aiff,m4a,m4b,m4p,mid,midi,wav",e=>"audio/"+e),r("3gpp,avi,dv,divx,ogg,mp4,webm",e=>s+e),r("rtf,pdf",e=>t+e),o("htm,html,shtm",a+"html"),o("js,mjs,cjs",a+"javascript"),o("yml,yaml",t+"yaml"),o("bat,cmd",t+"bat"),o("xml,csproj,fsproj,vbproj",a+"xml"),o("txt,ps1",a+"plain"),o("qt,mov",s+"quicktime"),o("doc,dot",t+"msword"),o("xls,xlt,xla",t+"excel"),o("ppt,oit,pps,ppa",t+"vnd.ms-powerpoint"),o("cer,crt,der",t+"x-x509-ca-cert"),o("gz,tgz,zip,rar,lzh,z",t+"x-compressed"),o("aaf,aca,asd,bin,cab,chm,class,cur,db,dat,deploy,dll,dsp,exe,fla,ics,inf,mix,msi,mso,obj,ocx,prm,prx,psd,psp,qxd,sea,snp,so,sqlite,toc,ttf,u32,xmp,xsn,xtp",t+"octet-stream"),n})();let ql=[];function as(e){return(e=(e=(e=e.replace(/"/g,"'")).replace(/>\s+<")).replace(/\s{2,}/g," ")).replace(sa,encodeURIComponent)}function on(e){return"data:image/svg+xml;utf8,"+as(e)}function is(e){e=URL.createObjectURL(e);return ql.push(e),e}function rs(){ql.forEach(e=>{try{URL.revokeObjectURL(e)}catch(e){console.error("URL.revokeObjectURL",e)}}),ql=[]}function an(e){return e?(e=xl(e,"?"),$t(e,"/")):null}function Yt(e){e=an(e);return null==e||-1===e.indexOf(".")?null:$t(e,".").toLowerCase()}function rn(e){var t=Yt(e.name);return t&&0<=ss.indexOf(t)?is(e):pt(e.name)}function un(e){return e&&(!(!e.startsWith("blob:")&&!e.startsWith("data:"))||(e=Yt(e))&&0<=ss.indexOf(e))||!1}function pt(e){var t;return e?null==(t=Yt(e))||un(e)?e:qt(t)||on(fl.doc):null}function qt(e){e=us(e);return e&&on(e)||null}function us(t){if(fl[t])return fl[t];for(let e=0;e({fileName:e.name,contentLength:e.size,filePath:rn(e)}))}function Ll(e,t){e.onerror=null,e.src=cn(e.src,t)||""}function cn(e,t){return qt($t(e,".").toLowerCase())||(t?qt(t)||t:null)||qt("doc")}function Ql(e){if(e)return e=$t(e,".").toLowerCase(),aa[e]||"application/"+e;throw new Error("fileNameOrExt required")}function ph(){return{extSvg:us,extSrc:qt,getExt:Yt,encodeSvg:as,canPreview:un,getFileName:an,getMimeType:Ql,formatBytes:dn,filePathUri:pt,svgToDataUri:on,fileImageUri:rn,objectUrl:is,flush:rs,inputFiles:ia,iconOnError:Ll,iconFallbackSrc:cn}}class ra{constructor(e){_e(this,"view"),_e(this,"includeTypes"),Object.assign(this,e)}getTypeName(){return"MetadataApp"}getMethod(){return"GET"}createResponse(){return{}}}const Dt="/metadata/app.json",ua={Boolean:"checkbox",DateTime:"date",DateOnly:"date",DateTimeOffset:"date",TimeSpan:"time",TimeOnly:"time",Byte:"number",Short:"number",Int64:"number",Int32:"number",UInt16:"number",UInt32:"number",UInt64:"number",Single:"number",Double:"number",Decimal:"number",String:"text",Guid:"text",Uri:"text"},da={number:"Int32",checkbox:"Boolean",date:"DateTime","datetime-local":"DateTime",time:"TimeSpan"},Kl={Byte:"byte",Int16:"short",Int32:"int",Int64:"long",UInt16:"ushort",Unt32:"uint",UInt64:"ulong",Single:"float",Double:"double",Decimal:"decimal"},ca=([...Object.keys(Kl),...Object.values(Kl)],{String:"string",Boolean:"bool",...Kl});function rl(e){return ca[e]||e}function ds(e,t){return e?(t=t||[],"Nullable`1"===e?rl(t[0])+"?":e.endsWith("[]")?`List<${rl(e.substring(0,e.length-2))}>`:0===t.length?rl(e):xl(rl(e),"`")+"<"+t.join(",")+">"):""}function fa(e){return e&&ds(e.name,e.genericArgs)}class Ot{constructor(){_e(this,"Query"),_e(this,"QueryInto"),_e(this,"Create"),_e(this,"Update"),_e(this,"Patch"),_e(this,"Delete")}get AnyQuery(){return this.Query||this.QueryInto}get AnyUpdate(){return this.Patch||this.Update}toArray(){return[this.Query,this.QueryInto,this.Create,this.Update,this.Patch,this.Delete].filter(e=>!!e).map(e=>e)}get empty(){return!(this.Query||this.QueryInto||this.Create||this.Update||this.Patch||this.Delete)}add(e){ze.isQueryInto(e)&&!this.QueryInto?this.QueryInto=e:ze.isQuery(e)&&!this.Query?this.Query=e:ze.isCreate(e)&&!this.Create?this.Create=e:ze.isUpdate(e)&&!this.Update?this.Update=e:ze.isPatch(e)&&!this.Patch?this.Patch=e:ze.isDelete(e)&&!this.Delete&&(this.Delete=e)}static from(e){const t=new Ot;return e.forEach(e=>{t.add(e)}),t}static forType(l,e){var t;let a=new Ot;return l&&(null!=(e=e??(null==(t=ie.metadata.value)?void 0:t.api))&&e.operations.forEach(e=>{var t;(null==(t=e.dataModel)?void 0:t.name)==l&&a.add(e)})),a}}const ze={Create:"ICreateDb`1",Update:"IUpdateDb`1",Patch:"IPatchDb`1",Delete:"IDeleteDb`1",AnyRead:["QueryDb`1","QueryDb`2"],AnyWrite:["ICreateDb`1","IUpdateDb`1","IPatchDb`1","IDeleteDb`1"],isAnyQuery:e=>Ue(e.request.inherits,e=>0<=ze.AnyRead.indexOf(e.name)),isQuery:e=>Ue(e.request.inherits,e=>"QueryDb`1"===e.name),isQueryInto:e=>Ue(e.request.inherits,e=>"QueryDb`2"===e.name),isCrud:e=>{return null==(e=e.request.implements)?void 0:e.some(e=>0<=ze.AnyWrite.indexOf(e.name))},isCreate:e=>ul(e,ze.Create),isUpdate:e=>ul(e,ze.Update),isPatch:e=>ul(e,ze.Patch),isDelete:e=>ul(e,ze.Delete),model:e=>{var t;return e?Ue(e.inherits,e=>0<=ze.AnyRead.indexOf(e.name))?null==(t=e.inherits)?void 0:t.genericArgs[0]:null==(e=null==(t=e.implements)?void 0:t.find(e=>0<=ze.AnyWrite.indexOf(e.name)))?void 0:e.genericArgs[0]:null}};function ma(e){var t;return(null==(t=e.input)?void 0:t.type)||Vl(fn(e))}function cs(e){return e.endsWith("?")?mo(e,1):e}function Vl(e){return ua[cs(e)]}function va(e){return e&&da[e]||"String"}function fn(e){return"Nullable`1"===e.type?e.genericArgs[0]:e.type}function Zl(e){return e&&"number"==Vl(e)||!1}function fs(e){return e&&"string"==e.toLowerCase()||!1}function ha(e){return"List`1"==e||e.startsWith("List<")||e.endsWith("[]")}function ms(e){var t;return!(null==e||!e.type||(t=fn(e),e.isValueType&&-1==t.indexOf("`"))||e.isEnum||null!=Vl(e.type))}function vs(e){var t;return!!(null!=e&&e.type&&(t=fn(e),e.isValueType&&-1==t.indexOf("`")||e.isEnum||"file"==(null==(t=e.input)?void 0:t.type)||"tag"==(null==(t=e.input)?void 0:t.type)||"combobox"==(null==(t=e.input)?void 0:t.type)||null!=Vl(e.type)))}function Gt(e,t){let l="string"==typeof e?Sl(e):e,a=(l||(console.warn("Metadata not found for: "+e),l={request:{name:e}}),function(e){Object.assign(this,e)}),s=(n.prototype.createResponse=function(){return l.returnsVoid?void 0:new a},n.prototype.getTypeName=function(){return l.request.name},n.prototype.getMethod=function(){return l.method||"POST"},n);function n(e){Object.assign(this,e)}return new s(t)}function ga(e,t,l={}){let a=function(e){Object.assign(this,e)},s=(n.prototype.createResponse=function(){return"function"==typeof l.createResponse?l.createResponse():new a},n.prototype.getTypeName=function(){return e},n.prototype.getMethod=function(){return l.method||"POST"},n);function n(e){Object.assign(this,e)}return new s(t)}function ml(l,e){return l?(Object.keys(l).forEach(e=>{var t=l[e];"string"==typeof t&&t.startsWith("/Date")&&(l[e]=$l(Vt(t)))}),l):{}}function pa(e,r){let i={};return Array.from(e.elements).forEach(a=>{var s;if(a.id&&null!=a.value&&""!==a.value){const n=a.id.toLowerCase(),o=r&&r.find(e=>e.name.toLowerCase()==n);let e=null==o?void 0:o.type,t=null==(s=null==o?void 0:o.genericArgs)?void 0:s[0],l="checkbox"===a.type?a.checked:a.value;Zl(e)?l=Number(l):"List`1"===e&&"string"==typeof l&&(l=l.split(",").map(e=>Zl(t)?Number(e):e)),i[a.id]=l}}),i}function mn(e){var t;return(null==(t=null==e?void 0:e.api)?void 0:t.operations)&&0e)?!1:a)){if((t||l)&&await Nn(t||Dt,l),null!=ie.metadata.value)return;var s=qe("client");if(null!=s&&(e=await s.api(new ra)).succeeded&&Wt(e.response),null!=ie.metadata.value)return;await Nn(Dt)}return ie.metadata.value}function st(t,l){var e,a=null==(a=ie.metadata.value)?void 0:a.api;return a&&t?a.types.find(e=>e.name.toLowerCase()===t.toLowerCase()&&(!l||e.namespace==l))||((e=Sl(t))?e.request:(e=a.operations.find(e=>e.response&&e.response.name.toLowerCase()===t.toLowerCase()&&(!l||e.response.namespace==l)))?e.response:null):null}function Sl(t){var e=null==(e=ie.metadata.value)?void 0:e.api;return e?e.operations.find(e=>e.request.name.toLowerCase()===t.toLowerCase()):null}function xa({dataModel:e}){var t=null==(t=ie.metadata.value)?void 0:t.api;if(!t)return[];let l=t.operations;if(e){const a="string"==typeof e?st(e):e;l=l.filter(e=>gs(e.dataModel,a))}return l}function vn(e){return e?st(e.name,e.namespace):null}function gs(e,t){return e&&t&&e.name===t.name&&(!e.namespace||!t.namespace||e.namespace===t.namespace)}function ka(e,t){e=st(e);return e&&e.properties&&e.properties.find(e=>e.name.toLowerCase()===t.toLowerCase())}function ps(e){return ys(st(e))}function ys(t){if(t&&t.isEnum&&null!=t.enumNames){var l={};for(let e=0;el.push({key:e,value:t[e]})),l}}function $a(e,t){a=e.name,l=(null==t?void 0:t.type)||ma(e)||"text";var l,a=Object.assign({id:a,name:a,type:l},t);return e.isEnum&&(a.type="select",a.allowableEntries=hn(bs(e))),a}function Ca(e){let n=[];if(e){const o=Je(e),t=Sl(e.name),r=vn(null==t?void 0:t.dataModel);o.forEach(t=>{var e;if(vs(t)){const l=$a(t,t.input);if(l.id=fo(l.id),"file"==l.type&&t.uploadTo&&!l.accept&&(e=null==(e=null==(e=ie.metadata.value)?void 0:e.plugins.filesUpload)?void 0:e.locations.find(e=>e.name==t.uploadTo))&&!l.accept&&e.allowExtensions&&(l.accept=e.allowExtensions.map(e=>e.startsWith(".")?e:"."+e).join(",")),r&&(e=null==(e=r.properties)?void 0:e.find(e=>e.name==t.name),t.ref||(t.ref=null==e?void 0:e.ref)),l.options)try{const a={input:l,$typeFields:o.map(e=>e.name),$dataModelFields:r?Je(r).map(e=>e.name):[],...ie.config.scopeWhitelist},s=nn(l.options,a);Object.keys(s).forEach(e=>{l[e]=s[e]})}catch{console.error(`failed to evaluate '${l.options}'`)}n.push(l)}})}return n}function gn(t,e){if(!e.type)return console.error("enumDescriptions missing {type:'EnumType'} options"),[""+t];var l=st(e.type);if(null==l||!l.enumValues)return console.error("Could not find metadata for "+e.type),[""+t];var a=[];for(let e=0;e"number"==typeof e?gn(e,{type:t}):e}function Je(e){if(!e)return[];let t=[],l={};for(;e;)e.properties&&e.properties.forEach(e=>{l[e.name]||(l[e.name]=1,t.push(e))}),e=e.inherits?vn(e.inherits):null;return t.map(e=>e.type.endsWith("[]")?{...e,type:"List`1",genericArgs:[e.type.substring(0,e.type.length-2)]}:e)}function ul(e,t){return(null==(e=e.request.implements)?void 0:e.some(e=>e.name===t))||!1}function el(e){return e?xs(e,Je(e)):null}function xs(e,t){var l=t.find(e=>"id"===e.name.toLowerCase());if(l&&l.isPrimaryKey)return l;t=t.find(e=>e.isPrimaryKey)||l;if(!t){l=ze.model(e);if(l)return Ue(st(l),e=>el(e));console.error("Primary Key not found in "+e.name)}return t||null}function _a(e,t){return Ue(el(e),e=>be(t,e.name))}function ks(e,t,l){return e&&"none"===e.valueType?"":"%In"===l.key||"%Between"===l.key?`(${l.value})`:La(t,l.value)}function La(e,t){return!e||Zl(e=cs(e))||"Boolean"===e?t:ha(e)?`[${t}]`:`'${t}'`}function ot(){var e=f(()=>{var e;return(null==(e=ie.metadata.value)?void 0:e.app)||null}),t=f(()=>{var e;return(null==(e=ie.metadata.value)?void 0:e.api)||null}),l=f(()=>{var e;return(null==(e=ie.metadata.value)?void 0:e.plugins.autoQuery.viewerConventions)||[]});return hs(),{loadMetadata:wa,getMetadata:ya,setMetadata:Wt,clearMetadata:ba,metadataApp:e,metadataApi:t,filterDefinitions:l,typeOf:st,typeOfRef:vn,typeEquals:gs,apiOf:Sl,findApis:xa,typeName:fa,typeName2:ds,property:ka,enumOptions:ps,propertyOptions:bs,createFormLayout:Ca,typeProperties:Je,supportsProp:vs,Crud:ze,Apis:Ot,getPrimaryKey:el,getPrimaryKeyByProps:xs,getId:_a,createDto:Gt,makeDto:ga,toFormValues:ml,formValues:pa,isComplexProp:ms,asKvps:hn,expandEnumFlags:gn,enumFlagsConverter:ws}}const tt=class{static async getOrFetchValue(e,t,l,a,s,n,o){return tt.getValue(l,o,s)??(await tt.fetchLookupIds(e,t,l,a,s,n,[o]),tt.getValue(l,o,s))}static getValue(e,t,l){e=tt.Lookup[e];if(e){e=e[t];if(e)return e[l=l.toLowerCase()]}}static setValue(e,t,l,a){e=tt.Lookup[e]??(tt.Lookup[e]={});(e[t]??(e[t]={}))[l=l.toLowerCase()]=a}static setRefValue(e,t){var l=be(t,e.refId);return null==l||null==e.refLabel?null:(t=be(t,e.refLabel),tt.setValue(e.model,l,e.refLabel,t),t)}static async fetchLookupIds(e,t,l,a,s,n,o){t=t.operations.find(e=>{return ze.isAnyQuery(e)&&(null==(e=e.dataModel)?void 0:e.name)==l});if(t){const r=tt.Lookup[l]??(tt.Lookup[l]={}),i=[];Object.keys(r).forEach(e=>{var t=r[e];be(t,s)&&i.push(e)});var o=o.filter(e=>!i.includes(e));0!=o.length&&(n=n?null:a+","+s,o={[a+"In"]:o.join(",")},n&&(o.fields=n),n=Gt(t,o),(o=await e.api(n,{jsconfig:"edv,eccn"})).succeeded?(be(o.response,"results")||[]).forEach(e=>{var t,l;be(e,a)?(t=""+be(e,a),l=be(e,s),s=s.toLowerCase(),(r[t]??(r[t]={}))[s]=""+l):console.error(`result[${a}] == null`,e)}):console.error("Failed to call "+t.request.name))}}};let wt=tt,Gl=(_e(wt,"Lookup",{}),()=>(new Date).getTime()),Va=["/","T",":","-"],rt={assumeUtc:!0,date:{method:"Intl.DateTimeFormat",options:"{dateStyle:'medium'}"},maxFieldLength:150,maxNestedFields:2,maxNestedFieldLength:30},Sa=new Intl.RelativeTimeFormat(rt.locale,{}),Un=31536e6,Bl={year:Un,month:Un/12,day:864e5,hour:36e5,minute:6e4,second:1e3},yt={currency:Cs,bytes:_s,link:Ls,linkTel:Vs,linkMailTo:Ss,icon:Ms,iconRounded:As,attachment:Ts,hidden:Fs,time:Is,relativeTime:yn,relativeTimeFromMs:Ml,enumFlags:Os,formatDate:Rt,formatNumber:pn};"iconOnError"in globalThis||(globalThis.iconOnError=Ll);class Ke{}function Ma(e){rt=Object.assign({},rt,e)}function Aa(t){Object.keys(t||{}).forEach(e=>{"function"==typeof t[e]&&(yt[e]=t[e])})}function $s(){return yt}function tl(e,t){return t?it("span",e,t):e}function Cs(e,t){var l=ut(t,["currency"]);return tl(new Intl.NumberFormat(void 0,{style:"currency",currency:(null==t?void 0:t.currency)||"USD"}).format(e),l)}function _s(e,t){return tl(dn(e),t)}function Ls(e,t){return it("a",e,Cl({...t,href:e}))}function Vs(e,t){return it("a",e,Cl({...t,href:"tel:"+e}))}function Ss(e,t){var{subject:l,body:a}=t=t||{},t=ut(t,["subject","body"]),s={};return l&&(s.subject=l),a&&(s.body=a),it("a",e,Cl({...t,href:"mailto:"+Kt(e,s)}))}function Ms(e,t){return it("img",void 0,Object.assign({class:"w-6 h-6",title:e,src:Ft(e),onerror:"iconOnError(this)"},t))}function As(e,t){return it("img",void 0,Object.assign({class:"w-8 h-8 rounded-full",title:e,src:Ft(e),onerror:"iconOnError(this)"},t))}function Ts(e,t){var l=an(e),a=(null==Yt(l)||un(e)?Ft:cn)(e),a=Ft(a),s=t&&(t["icon-class"]||t.iconClass),a=it("img",void 0,Object.assign({class:"w-6 h-6",src:a,onerror:"iconOnError(this,'att')"},s?{class:s}:null));return it("a",a+`${l}`,Object.assign({class:"flex",href:Ft(e),title:e},t?ut(t,["icon-class","iconClass"]):null))}function Fs(e){return""}function Is(e,t){var l="string"==typeof e?new Date(1e3*Gn(e)):kl(e)?Vt(e):null;return tl(l?vo(l):e,t)}function Rt(e,t){var l,a;return null==e?"":(l="number"==typeof e?new Date(e):"string"==typeof e?Vt(e):e,kl(l)?tl(("function"==typeof(a=rt.date?Al(rt.date):null)?a:Zn)(l),t):(console.warn(l+" is not a Date value"),null==e?"":""+e))}function pn(e,t){if("number"!=typeof e)return e;let l=rt.number?Al(rt.number):null,a="function"==typeof l?l(e):""+e;return""===a&&(console.warn(`formatNumber(${e}) => `+a,l),a=""+e),tl(a,t)}function Ds(t,l,a){var e=ho(t),s=l?Al(l):null;if("function"!=typeof s)return(null!=e?kl(e)?Rt(e,a):"number"==typeof e?pn(e,a):e:null)??"";{let e=a;if(null!=l&&l.options)try{e=nn(l.options,a)}catch(e){console.error(`Could not evaluate '${l.options}'`,e,", with scope:",a)}return s(t,e)}}function Jt(e,t,l){return(_t(e)?Ds:Oa)(e,t,l)}function Ta(e){if(null!=e){if("number"==typeof e)return e;if(kl(e))return e.getTime()-Gl();if("string"==typeof e){var t=Number(e);if(!isNaN(t))return t;if("P"===e[0]||e.startsWith("-P"))return 1e3*Gn(e)*-1;if(0<=go(e,Va))return Vt(e).getTime()-Gl()}}return NaN}function Ml(e,t){for(var l in Bl)if(Math.abs(e)>Bl[l]||"second"===l)return(t||Sa).format(Math.round(e/Bl[l]),l)}function yn(e,t){e=Ta(e);return isNaN(e)?"":Ml(e,t)}function Fa(e,t){return Ml(e.getTime()-(t?t.getTime():Gl()))}function Os(e,t){return gn(e,t).join(", ")}function Al(l){if(l){let{method:e,options:a}=l,s=e+`(${a})`,n=yt[s]||yt[e];if("function"==typeof n)return n;let o=l.locale||rt.locale;if(e.startsWith("Intl.")){l=o?`'${o}'`:"undefined",l=`return new ${e}(${l},${a||"undefined"})`;try{let t=Function(l)();return n="Intl.DateTimeFormat"===e?e=>t.format(Vt(e)):"Intl.NumberFormat"===e?e=>t.format(Number(e)):"Intl.RelativeTimeFormat"===e?e=>yn(e,t):e=>t.format(e),yt[s]=n}catch(e){console.error("Invalid format: "+l,e)}}else{let l=globalThis[e];if("function"==typeof l){let t=null!=a?Function("return "+a)():void 0;return n=e=>l(e,t,o),yt[s]=n}console.error(`No '${e}' function exists`,Object.keys(yt))}}return null}function js(e,t){return e?e.length>t?e.substring(0,t)+"...":e:""}function Ps(e){return"/Date("===e.substring(0,6)?Rt(Vt(e)):e}function Ia(e){return bn(jt(e)).replace(/"/g,"")}function Bs(e){if(null==e||""===e)return"";if("string"==typeof e)try{return JSON.parse(e)}catch{console.warn("couldn't parse as JSON",e)}return e}function bn(e,t=4){return"object"!=typeof(e=Bs(e))?"string"==typeof e?e:""+e:JSON.stringify(e,void 0,t)}function Da(e){return"object"!=typeof(e=Bs(e))?"string"==typeof e?e:""+e:bn(e=jt(e=Object.assign({},e)))}function jt(l){if(null==l)return null;if("string"==typeof l)return Ps(l);if(_t(l))return l;if(l instanceof Date)return Rt(l);if(Array.isArray(l))return l.map(jt);if("object"!=typeof l)return l;{let t={};return Object.keys(l).forEach(e=>{"__type"!=e&&(t[e]=jt(l[e]))}),t}}function Oa(e,t,l){let a=e;if(Array.isArray(e)){if(_t(e[0]))return a.join(",");null!=e[0]&&(a=e[0])}if(null==a)return"";if(a instanceof Date)return Rt(a,l);var s=Object.keys(a),n=[];for(let e=0;e${o}: `+Hl(js(Ps(r),rt.maxNestedFieldLength)))}return 2t.value.navigate(e.to??"/");return(e,t)=>(a(),u("a",Le({onClick:Ne(s,["prevent"]),title:l.to,href:"javascript:void(0)"},e.$attrs),[Z(e.$slots,"default")],16,ja))}}),Qt=class{static component(e){var t=Qt.components[e];if(t)return t;const l=Rn(e),a=Object.keys(Qt.components).find(e=>Rn(e)===l);return a&&Qt.components[a]||null}};let ie=Qt;function Ba(e){ie.config=Object.assign(ie.config,e)}function Ra(e){ie.autoQueryGridDefaults=Object.assign(ie.autoQueryGridDefaults,e)}function wn(e){return e&&ie.config.assetsPathResolver?ie.config.assetsPathResolver(e):e}function Ha(e){return e&&ie.config.fallbackPathResolver?ie.config.fallbackPathResolver(e):e}function St(){var e=f(()=>ie.config),t=f(()=>ie.autoQueryGridDefaults);return{config:e,setConfig:Ba,events:ie.events,autoQueryGridDefaults:t,setAutoQueryGridDefaults:Ra,assetsPathResolver:wn,fallbackPathResolver:Ha}}_e(ie,"config",{redirectSignIn:"/signin",redirectSignOut:"/auth/logout",navigate:e=>location.href=e,assetsPathResolver:e=>e,fallbackPathResolver:e=>e,storage:new es,tableIcon:{svg:""},scopeWhitelist:{enumFlagsConverter:ws,...$s()}}),_e(ie,"autoQueryGridDefaults",{deny:[],hide:[],toolbarButtonClass:void 0,tableStyle:"stripedRows",take:25,maxFieldLength:150}),_e(ie,"events",po()),_e(ie,"user",M(null)),_e(ie,"metadata",M(null)),_e(ie,"components",{RouterLink:Pa});const Rs=ue({inheritAttrs:!1,props:{image:Object,svg:String,src:String,alt:String,type:String},setup(s,{attrs:n}){return()=>{let e=s.image;var t,l;s.type&&(l=ot()["typeOf"],(l=l(s.type))||console.warn(`Type ${s.type} does not exist`),null!=l&&l.icon?e=null==l?void 0:l.icon:console.warn(`Type ${s.type} does not have a [Svg] icon`));let a=s.svg||(null==e?void 0:e.svg)||"";return a.startsWith("").indexOf("class="),t=`${(null==e?void 0:e.cls)||""} `+(n.class||""),a=-1==l?`Ll(e.target)})}}}),Ea={class:"text-2xl font-semibold text-gray-900 dark:text-gray-300"},za={class:"flex"},Na=s("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"},null,-1),Ua=s("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"},null,-1),qa=[Na,Ua],Qa=ue({__name:"Loading",props:{imageClass:{default:"w-6 h-6"}},setup(l){return(e,t)=>(a(),u("div",Ea,[s("div",za,[(a(),u("svg",{class:w(["self-center inline mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-gray-600 dark:fill-gray-300",l.imageClass]),role:"status",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},qa,2)),s("span",null,[Z(e.$slots,"default")])])]))}}),Ka=["href","onClick"],Za=["type"],Ga=ue({__name:"OutlineButton",props:{type:{default:"submit"},href:null},setup(n){const o="inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 shadow-sm text-sm font-medium rounded-md text-gray-700 dark:text-gray-200 disabled:text-gray-400 bg-white dark:bg-black hover:bg-gray-50 hover:dark:bg-gray-900 disabled:hover:bg-white dark:disabled:hover:bg-black focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black";return(t,e)=>{var l=X("router-link");return n.href?(a(),se(l,{key:0,to:n.href},{default:ke(({navigate:e})=>[s("button",{class:w(o),href:n.href,onClick:e},[Z(t.$slots,"default")],8,Ka)]),_:3},8,["to"])):(a(),u("button",Le({key:1,type:n.type,class:o},t.$attrs),[Z(t.$slots,"default")],16,Za))}}}),Wa=["href","onClick"],Ja=["type"],Xa=ue({__name:"PrimaryButton",props:{type:{default:"submit"},href:null,color:{default:"indigo"}},setup(n){const e=n,t={blue:"text-white bg-blue-600 hover:bg-blue-700 disabled:bg-blue-400 disabled:hover:bg-blue-400 focus:ring-indigo-500 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",purple:"text-white bg-purple-600 hover:bg-purple-700 disabled:bg-purple-400 disabled:hover:bg-purple-400 focus:ring-indigo-500 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",red:"focus:ring-red-500 text-white bg-red-600 hover:bg-red-700 disabled:bg-red-400 disabled:hover:bg-red-400 focus:ring-red-500 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-500",green:"focus:ring-green-300 text-white bg-green-600 hover:bg-green-700 disabled:bg-green-400 disabled:hover:bg-green-400 focus:ring-green-500 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-500",sky:"focus:ring-sky-300 text-white bg-sky-600 hover:bg-sky-700 disabled:bg-sky-400 disabled:hover:bg-sky-400 focus:ring-sky-500 dark:bg-sky-600 dark:hover:bg-sky-700 dark:focus:ring-sky-500",cyan:"focus:ring-cyan-300 text-white bg-cyan-600 hover:bg-cyan-700 disabled:bg-cyan-400 disabled:hover:bg-cyan-400 focus:ring-cyan-500 dark:bg-cyan-600 dark:hover:bg-cyan-700 dark:focus:ring-cyan-500",indigo:"focus:ring-2 focus:ring-offset-2 text-white bg-indigo-600 hover:bg-indigo-700 disabled:bg-indigo-400 disabled:hover:bg-indigo-400 focus:ring-indigo-500 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},r=f(()=>"inline-flex justify-center rounded-md border border-transparent py-2 px-4 text-sm font-medium shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 dark:ring-offset-black "+(t[e.color]||t.indigo));return(t,e)=>{var l=X("router-link");return n.href?(a(),se(l,{key:0,to:n.href},{default:ke(({navigate:e})=>[s("button",{class:w(o(r)),href:n.href,onClick:e},[Z(t.$slots,"default")],10,Wa)]),_:3},8,["to"])):(a(),u("button",Le({key:1,type:n.type,class:o(r)},t.$attrs),[Z(t.$slots,"default")],16,Ja))}}}),Ya=["type","href","onClick"],ei=["type"],ti=ue({__name:"SecondaryButton",props:{type:null,href:null},setup(n){const o="inline-flex justify-center rounded-md border border-gray-300 py-2 px-4 text-sm font-medium shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-400 dark:hover:text-white hover:bg-gray-50 dark:hover:bg-gray-700 focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:ring-offset-black";return(t,e)=>{var l=X("router-link");return n.href?(a(),se(l,{key:0,to:n.href},{default:ke(({navigate:e})=>[s("button",{type:n.type??"button",class:w(o),href:n.href,onClick:e},[Z(t.$slots,"default")],8,Ya)]),_:3},8,["to"])):(a(),u("button",Le({key:1,type:n.type??"button",class:o},t.$attrs),[Z(t.$slots,"default")],16,ei))}}});function Ge(e,t){return Array.isArray(e)?0<=e.indexOf(t):e==t||e.includes(t)}const bl={blue:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-200",purple:"text-purple-600 dark:text-purple-400 hover:text-purple-800 dark:hover:text-purple-200",red:"text-red-700 dark:text-red-400 hover:text-red-900 dark:hover:text-red-200",green:"text-green-600 dark:text-green-400 hover:text-green-800 dark:hover:text-green-200",sky:"text-sky-600 dark:text-sky-400 hover:text-sky-800 dark:hover:text-sky-200",cyan:"text-cyan-600 dark:text-cyan-400 hover:text-cyan-800 dark:hover:text-cyan-200",indigo:"text-indigo-600 dark:text-indigo-400 hover:text-indigo-800 dark:hover:text-indigo-200"},lt={base:"block w-full sm:text-sm rounded-md dark:text-white dark:bg-gray-900 disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none",invalid:"pr-10 border-red-300 text-red-900 placeholder-red-300 focus:outline-none focus:ring-red-500 focus:border-red-500",valid:"shadow-sm focus:ring-indigo-500 focus:border-indigo-500 border-gray-300 dark:border-gray-600"},Ut={panelClass:"shadow sm:rounded-md",formClass:"space-y-6 bg-white dark:bg-black py-6 px-4 sm:p-6",headingClass:"text-lg font-medium leading-6 text-gray-900 dark:text-gray-100",subHeadingClass:"mt-1 text-sm text-gray-500 dark:text-gray-400"},Tt={panelClass:"pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",formClass:"flex h-full flex-col divide-y divide-gray-200 dark:divide-gray-700 shadow-xl bg-white dark:bg-black",titlebarClass:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6",headingClass:"text-lg font-medium text-gray-900 dark:text-gray-100",subHeadingClass:"mt-1 text-sm text-gray-500 dark:text-gray-400",closeButtonClass:"rounded-md bg-gray-50 dark:bg-gray-900 text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:ring-offset-black"},Wl={modalClass:"relative transform overflow-hidden rounded-lg bg-white dark:bg-black text-left shadow-xl transition-all sm:my-8",sizeClass:"sm:max-w-prose lg:max-w-screen-md xl:max-w-screen-lg 2xl:max-w-screen-xl sm:w-full"},Ze={panelClass(e="slideOver"){return("card"==e?Ut:Tt).panelClass},formClass(e="slideOver"){return("card"==e?Ut:Tt).formClass},headingClass(e="slideOver"){return("card"==e?Ut:Tt).headingClass},subHeadingClass(e="slideOver"){return("card"==e?Ut:Tt).subHeadingClass},buttonsClass:"mt-4 px-4 py-3 bg-gray-50 dark:bg-gray-900 sm:px-6 flex flex-wrap justify-between",legendClass:"text-base font-medium text-gray-900 dark:text-gray-100 text-center mb-4"},he={getGridClass(e=0){return he.gridClass},getGrid2Class(e="stripedRows"){return Ge(e,"fullWidth")?"overflow-x-auto":he.grid2Class},getGrid3Class(e="stripedRows"){return Ge(e,"fullWidth")?"inline-block min-w-full py-2 align-middle":he.grid3Class},getGrid4Class(e="stripedRows"){return Ge(e,"whiteBackground")?"":Ge(e,"fullWidth")?"overflow-hidden shadow-sm ring-1 ring-black ring-opacity-5":he.grid4Class},getTableClass(e="stripedRows"){return Ge(e,"fullWidth")||Ge(e,"verticalLines")?"min-w-full divide-y divide-gray-300":he.tableClass},getTheadClass(e="stripedRows"){return Ge(e,"whiteBackground")?"":he.theadClass},getTheadRowClass(e="stripedRows"){return he.theadRowClass+(Ge(e,"verticalLines")?" divide-x divide-gray-200 dark:divide-gray-700":"")},getTheadCellClass(e="stripedRows"){return he.theadCellClass+(Ge(e,"uppercaseHeadings")?" uppercase":"")},getTbodyClass(e="stripedRows"){return(Ge(e,"whiteBackground")||Ge(e,"verticalLines")?"divide-y divide-gray-200 dark:divide-gray-800":he.tableClass)+(Ge(e,"verticalLines")?" bg-white":"")},getTableRowClass(e="stripedRows",t,l,a){return(a?"cursor-pointer ":"")+(l?"bg-indigo-100 dark:bg-blue-800":(a?"hover:bg-yellow-50 dark:hover:bg-blue-900 ":"")+(!Ge(e,"stripedRows")||t%2==0?"bg-white dark:bg-black":"bg-gray-50 dark:bg-gray-800"))+(Ge(e,"verticalLines")?" divide-x divide-gray-200 dark:divide-gray-700":"")},gridClass:"flex flex-col",grid2Class:"",grid3Class:"inline-block min-w-full py-2 align-middle",grid4Class:"overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg",tableClass:"min-w-full divide-y divide-gray-200 dark:divide-gray-700",theadClass:"bg-gray-50 dark:bg-gray-900",tableCellClass:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400",theadRowClass:"select-none",theadCellClass:"px-6 py-4 text-left text-sm font-medium tracking-wider whitespace-nowrap",toolbarButtonClass:"inline-flex items-center px-2.5 py-1.5 border border-gray-300 dark:border-gray-700 shadow-sm text-sm font-medium rounded text-gray-700 dark:text-gray-300 bg-white dark:bg-black hover:bg-gray-50 dark:hover:bg-gray-900 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black"},li={colspans:"col-span-3 sm:col-span-3"},bh=Object.freeze(Object.defineProperty({__proto__:null,a:bl,card:Ut,dummy:li,form:Ze,grid:he,input:lt,modal:Wl,slideOver:Tt},Symbol.toStringTag,{value:"Module"})),ni=ue({__name:"TextLink",props:{color:{default:"blue"}},setup(e){const t=e,l=to(),s=f(()=>(bl[t.color]||bl.blue)+(l.href?"":" cursor-pointer"));return(e,t)=>(a(),u("a",{class:w(o(s))},[Z(e.$slots,"default")],2))}}),si={class:"flex","aria-label":"Breadcrumb"},oi={role:"list",class:"flex items-center space-x-4"},ai=["href","title"],ii=s("svg",{class:"h-6 w-6 flex-shrink-0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[s("path",{"fill-rule":"evenodd",d:"M9.293 2.293a1 1 0 011.414 0l7 7A1 1 0 0117 11h-1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-3a1 1 0 00-1-1H9a1 1 0 00-1 1v3a1 1 0 01-1 1H5a1 1 0 01-1-1v-6H3a1 1 0 01-.707-1.707l7-7z","clip-rule":"evenodd"})],-1),ri={class:"sr-only"},ui=ue({__name:"Breadcrumbs",props:{homeHref:{default:"/"},homeLabel:{default:"Home"}},setup(l){return(e,t)=>(a(),u("nav",si,[s("ol",oi,[s("li",null,[s("div",null,[s("a",{href:l.homeHref,class:"text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400",title:l.homeLabel},[ii,s("span",ri,A(l.homeLabel),1)],8,ai)])]),Z(e.$slots,"default")])]))}}),di={class:"flex items-center"},ci=s("svg",{class:"h-6 w-6 flex-shrink-0 text-gray-400 dark:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[s("path",{"fill-rule":"evenodd",d:"M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z","clip-rule":"evenodd"})],-1),fi=["href","title"],mi=["title"],vi=ue({__name:"Breadcrumb",props:{href:null,title:null},setup(l){return(e,t)=>(a(),u("li",null,[s("div",di,[ci,l.href?(a(),u("a",{key:0,href:l.href,class:"ml-4 text-lg font-medium text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300",title:l.title},[Z(e.$slots,"default")],8,fi)):(a(),u("span",{key:1,class:"ml-4 text-lg font-medium text-gray-700 dark:text-gray-300",title:l.title},[Z(e.$slots,"default")],8,mi))])]))}}),hi={key:0,class:"text-base font-semibold text-gray-500 dark:text-gray-400"},gi={role:"list",class:"mt-4 divide-y divide-gray-200 dark:divide-gray-800 border-t border-b border-gray-200 dark:border-gray-800"},pi=ue({__name:"NavList",props:{title:null},setup(l){return(e,t)=>(a(),u("div",null,[l.title?(a(),u("h2",hi,A(l.title),1)):k("",!0),s("ul",gi,[Z(e.$slots,"default")])]))}}),yi={class:"relative flex items-start space-x-4 py-6"},bi={class:"flex-shrink-0"},wi={class:"flex h-12 w-12 items-center justify-center rounded-lg bg-indigo-50 dark:bg-indigo-900"},xi={class:"min-w-0 flex-1"},ki={class:"text-base font-medium text-gray-900 dark:text-gray-100"},$i={class:"rounded-sm focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2"},Ci=["href"],_i=s("span",{class:"absolute inset-0","aria-hidden":"true"},null,-1),Li={class:"text-base text-gray-500"},Vi=s("div",{class:"flex-shrink-0 self-center"},[s("svg",{class:"h-5 w-5 text-gray-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[s("path",{"fill-rule":"evenodd",d:"M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z","clip-rule":"evenodd"})])],-1),Si=ue({__name:"NavListItem",props:{title:null,href:null,icon:null,iconSvg:null,iconSrc:null,iconAlt:null},setup(n){return(e,t)=>{var l=X("Icon");return a(),u("li",yi,[s("div",bi,[s("span",wi,[$e(l,{class:"w-6 h-6 text-indigo-700 dark:text-indigo-300",image:n.icon,src:n.iconSrc,svg:n.iconSvg,alt:n.iconAlt},null,8,["image","src","svg","alt"])])]),s("div",xi,[s("h3",ki,[s("span",$i,[s("a",{href:n.href,class:"focus:outline-none"},[_i,xe(" "+A(n.title),1)],8,Ci)])]),s("p",Li,[Z(e.$slots,"default")])]),Vi])}}});function Mi(e){ie.user.value=e,ie.events.publish("signIn",e)}function Ai(){ie.user.value=null,ie.events.publish("signOut",null)}function Hs(e){var t;return 0<=((null==(t=ie.user.value)?void 0:t.roles)||[]).indexOf(e)}function Ti(e){var t;return 0<=((null==(t=ie.user.value)?void 0:t.permissions)||[]).indexOf(e)}function xn(){return Hs("Admin")}function vl(e){if(!e)return!1;if(!e.requiresAuth)return!0;var t=ie.user.value;if(!t)return!1;if(xn())return!0;let[l,a]=[t.roles||[],t.permissions||[]],[s,n,o,r]=[e.requiredRoles||[],e.requiredPermissions||[],e.requiresAnyRole||[],e.requiresAnyPermission||[]];return!(!s.every(e=>0<=l.indexOf(e))||00<=l.indexOf(e))||!n.every(e=>0<=a.indexOf(e))||00<=a.indexOf(e)))}function Fi(e){if(!e||!e.requiresAuth)return null;var t=ie.user.value;if(!t)return`${e.request.name} requires Authentication`;if(xn())return null;let[l,a]=[t.roles||[],t.permissions||[]],[s,n,o,r]=[e.requiredRoles||[],e.requiredPermissions||[],e.requiresAnyRole||[],e.requiresAnyPermission||[]],i=s.filter(e=>l.indexOf(e)<0);return 0""+e+"").join(", ")} Role`+(1a.indexOf(e)<0)).length?`Requires ${t.map(e=>""+e+"").join(", ")} Permission`+(10<=l.indexOf(e))?`Requires any ${o.filter(e=>l.indexOf(e)<0).map(e=>""+e+"").join(", ")} Role`+(10<=a.indexOf(e))?`Requires any ${r.filter(e=>a.indexOf(e)<0).map(e=>""+e+"").join(", ")} Permission`+(1ie.user.value||null),isAuthenticated:f(()=>null!=ie.user.value),hasRole:Hs,hasPermission:Ti,isAdmin:xn,canAccess:vl,invalidAccessMessage:Fi}}const Ii={key:0},Di={class:"md:p-4"},Es=ue({__name:"EnsureAccess",props:{invalidAccess:null,alertClass:null},emits:["done"],setup(r){const i=kn()["isAuthenticated"],t=St()["config"],d=()=>{var e=location.href.substring(location.origin.length)||"/",e=Kt(t.value.redirectSignIn,{redirect:e});t.value.navigate(e)},c=()=>{var e=location.href.substring(location.origin.length)||"/",e=Kt(t.value.redirectSignOut,{ReturnUrl:e});t.value.navigate(e)};return(e,t)=>{var l=X("Alert"),n=X("SecondaryButton");return r.invalidAccess?(a(),u("div",Ii,[$e(l,{class:w(r.alertClass),innerHTML:r.invalidAccess},null,8,["class","innerHTML"]),s("div",Di,[o(i)?(a(),se(n,{key:1,onClick:c},{default:ke(()=>[xe("Sign Out")]),_:1})):(a(),se(n,{key:0,onClick:d},{default:ke(()=>[xe("Sign In")]),_:1}))])])):k("",!0)}}}),Oi={class:"absolute top-0 right-0 bg-white dark:bg-black border dark:border-gray-800 rounded normal-case text-sm shadow w-80"},ji={class:"p-4"},Pi=s("h3",{class:"text-base font-medium mb-3 dark:text-gray-100"},"Sort",-1),Bi={class:"flex w-full justify-center"},Ri=s("svg",{class:"w-6 h-6",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},[s("g",{fill:"currentColor"},[s("path",{"fill-rule":"evenodd",d:"M10.082 5.629L9.664 7H8.598l1.789-5.332h1.234L13.402 7h-1.12l-.419-1.371h-1.781zm1.57-.785L11 2.687h-.047l-.652 2.157h1.351z"}),s("path",{d:"M12.96 14H9.028v-.691l2.579-3.72v-.054H9.098v-.867h3.785v.691l-2.567 3.72v.054h2.645V14zm-8.46-.5a.5.5 0 0 1-1 0V3.707L2.354 4.854a.5.5 0 1 1-.708-.708l2-1.999l.007-.007a.498.498 0 0 1 .7.006l2 2a.5.5 0 1 1-.707.708L4.5 3.707V13.5z"})])],-1),Hi=s("span",null,"ASC",-1),Ei=[Ri,Hi],zi=wl('DESC',2),Ni=[zi],Ui=s("h3",{class:"text-base font-medium mt-4 mb-2"}," Filter ",-1),qi={key:0},Qi=["id","value"],Ki=["for"],Zi={key:1},Gi={class:"mb-2"},Wi={class:"inline-flex rounded-full items-center py-0.5 pl-2.5 pr-1 text-sm font-medium bg-indigo-100 text-indigo-700"},Ji=["onClick"],Xi=s("svg",{class:"h-2 w-2",stroke:"currentColor",fill:"none",viewBox:"0 0 8 8"},[s("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M1 1l6 6m0-6L1 7"})],-1),Yi=[Xi],er={class:"flex"},tr=s("svg",{class:"h-6 w-6",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[s("path",{"fill-rule":"evenodd",d:"M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z","clip-rule":"evenodd"})],-1),lr=[tr],nr={class:"bg-gray-50 dark:bg-gray-900 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},$n=ue({__name:"FilterColumn",props:{definitions:null,column:null,topLeft:null},emits:["done","save"],setup(d,{emit:l}){const c=d,v=M(),p=M(""),m=M(""),g=M([]),h=f(()=>1==c.column.meta.isEnum),n=f(()=>st("Nullable`1"===c.column.meta.type?c.column.meta.genericArgs[0]:c.column.meta.type)),y=f(()=>1==c.column.meta.isEnum?hn(ps(n.value.name)):[]),b=f(()=>{var e;return(null==(e=r(c.column.type))?void 0:e.map(e=>({key:e.value,value:e.name})))||[]}),x=M({filters:[]}),C=f(()=>x.value.filters);function r(e){let t=c.definitions;return t=fs(e)?t:t.filter(e=>"string"!==e.types)}function L(e,t){return r(e).find(e=>e.value===t)}function V(){var e;p.value&&(e=null==(e=L(c.column.type,p.value))?void 0:e.name)&&(x.value.filters.push({key:p.value,name:e,value:m.value}),p.value=m.value="")}function S(){l("done")}function T(){var e;p.value="%",null!=(e=v.value)&&e.focus()}function I(){var e,t;m.value&&V(),h.value&&(t=Object.values(g.value).filter(e=>e),x.value.filters=0parseInt(e)).reduce((e,t)=>e+t,0).toString()}]:[{key:"%In",name:"In",value:t.join(",")}]:[]),l("save",x.value),l("done")}function $(e){x.value.sort=e===x.value.sort?void 0:e,xt(I)}return hl(()=>x.value=Object.assign({},c.column.settings,{filters:Array.from(c.column.settings.filters)})),hl(()=>{var e;let t=(null==(e=null==(e=null==(e=c.column.settings.filters)?void 0:e[0])?void 0:e.value)?void 0:e.split(","))||[];if(00<(l&parseInt(e))))||[]}g.value=t}),(e,t)=>{var l=X("SelectInput"),n=X("TextInput"),r=X("PrimaryButton"),i=X("SecondaryButton");return a(),u("div",{class:"fixed z-20 inset-0 overflow-y-auto",onClick:S,onVnodeMounted:T},[s("div",{class:"absolute",style:Jl(`top:${d.topLeft.y}px;left:${d.topLeft.x}px`),onClick:t[5]||(t[5]=Ne(()=>{},["stop"]))},[s("div",Oi,[s("div",ji,[Pi,s("div",Bi,[s("button",{type:"button",title:"Sort Ascending",onClick:t[0]||(t[0]=e=>$("ASC")),class:w(`${"ASC"===x.value.sort?"bg-indigo-100 border-indigo-500":"bg-white hover:bg-gray-50 border-gray-300"} mr-1 inline-flex items-center px-2.5 py-1.5 border shadow-sm text-sm font-medium rounded text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500`)},Ei,2),s("button",{type:"button",title:"Sort Descending",onClick:t[1]||(t[1]=e=>$("DESC")),class:w(`${"DESC"===x.value.sort?"bg-indigo-100 border-indigo-500":"bg-white hover:bg-gray-50 border-gray-300"} ml-1 inline-flex items-center px-2.5 py-1.5 border shadow-sm text-sm font-medium rounded text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500`)},Ni,2)]),Ui,o(h)?(a(),u("div",qi,[(a(!0),u(Te,null,Ie(o(y),e=>(a(),u("div",{key:e.key,class:"flex items-center"},[kt(s("input",{type:"checkbox",id:e.key,value:e.key,"onUpdate:modelValue":t[2]||(t[2]=e=>g.value=e),class:"h-4 w-4 border-gray-300 rounded text-indigo-600 focus:ring-indigo-500"},null,8,Qi),[[Xl,g.value]]),s("label",{for:e.key,class:"ml-3"},A(e.value),9,Ki)]))),128))])):(a(),u("div",Zi,[(a(!0),u(Te,null,Ie(o(C),(e,l)=>{return a(),u("div",Gi,[s("span",Wi,[xe(A(d.column.name)+" "+A(e.name)+" "+A((e=e,ks(L(c.column.type,e.key),c.column.type,e)))+" ",1),s("button",{type:"button",onClick:e=>{var t;t=l,x.value.filters.splice(t,1)},class:"flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center text-indigo-400 hover:bg-indigo-200 hover:text-indigo-500 focus:outline-none focus:bg-indigo-500 focus:text-white"},Yi,8,Ji)])])}),256)),s("div",er,[$e(l,{id:"filterRule",class:"w-32 mr-1",modelValue:p.value,"onUpdate:modelValue":t[3]||(t[3]=e=>p.value=e),entries:o(b),label:"",placeholder:""},null,8,["modelValue","entries"]),"none"!==(null==(l=L(d.column.type,p.value))?void 0:l.valueType)?(a(),se(n,{key:0,ref_key:"txtFilter",ref:v,id:"filterValue",class:"w-32 mr-1",type:"text",modelValue:m.value,"onUpdate:modelValue":t[4]||(t[4]=e=>m.value=e),onKeyup:Qn(V,["enter"]),label:"",placeholder:""},null,8,["modelValue","onKeyup"])):k("",!0),s("div",{class:"pt-1"},[s("button",{type:"button",onClick:V,class:"inline-flex items-center p-1 border border-transparent rounded-full shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"},lr)])])]))]),s("div",nr,[$e(r,{onClick:I,color:"red",class:"ml-2"},{default:ke(()=>[xe(" Save ")]),_:1}),$e(i,{onClick:S},{default:ke(()=>[xe(" Cancel ")]),_:1})])])],4)],512)}}}),sr={class:"px-4 sm:px-6 lg:px-8 text-sm"},or={class:"flex flex-wrap"},ar={class:"group pr-4 sm:pr-6 lg:pr-8"},ir={class:"flex justify-between w-full font-medium"},rr={class:"w-6 flex justify-end"},ur={class:"hidden group-hover:inline"},dr=["onClick","title"],cr=s("svg",{class:"h-2 w-2",stroke:"currentColor",fill:"none",viewBox:"0 0 8 8"},[s("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M1 1l6 6m0-6L1 7"})],-1),fr=[cr],mr={key:0,class:"pt-2"},vr={class:"ml-2"},hr={key:1},gr={class:"pt-2"},pr={class:"inline-flex rounded-full items-center py-0.5 pl-2.5 pr-1 text-sm font-medium bg-indigo-100 text-indigo-700"},yr=["onClick"],br=s("svg",{class:"h-2 w-2",stroke:"currentColor",fill:"none",viewBox:"0 0 8 8"},[s("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M1 1l6 6m0-6L1 7"})],-1),wr=[br],xr=s("span",null,"Clear All",-1),kr=[xr],Cn=ue({__name:"FilterViews",props:{definitions:null,columns:null},emits:["done","change"],setup(e,{emit:r}){const l=e,n=f(()=>l.columns.filter(e=>0"string"!==e.types)}(e).find(e=>e.value===t)}function d(){l.columns.forEach(e=>{e.settings.filters=[],r("change",e)}),r("done")}return(e,t)=>(a(),u("div",sr,[s("div",or,[(a(!0),u(Te,null,Ie(o(n),n=>{return a(),u("fieldset",ar,[s("legend",ir,[s("span",null,A(o(Ee)(n.name)),1),s("span",rr,[s("span",ur,[s("button",{onClick:e=>{var t;(t=n).settings.filters=[],r("change",t)},title:`Clear all ${o(Ee)(n.name)} filters`,class:"flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center text-red-600 hover:bg-red-200 hover:text-red-500 focus:outline-none focus:bg-red-500 focus:text-white"},fr,8,dr)])])]),n.meta.isEnum?(a(),u("div",mr,[(a(!0),u(Te,null,Ie(null==(e=null==(e=null==(e=n.settings.filters)?void 0:e[0])?void 0:e.value)?void 0:e.split(","),e=>(a(),u("div",{key:e,class:"flex items-center"},[s("label",vr,A(e),1)]))),128))])):(a(),u("div",hr,[(a(!0),u(Te,null,Ie(n.settings.filters,(e,l)=>{return a(),u("div",gr,[s("span",pr,[xe(A(n.name)+" "+A(e.name)+" "+A((e=e,ks(i((t=n).type,e.value),t.type,e)))+" ",1),s("button",{type:"button",onClick:e=>{var t;(t=n).settings.filters.splice(l,1),r("change",t)},class:"flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center text-indigo-400 hover:bg-indigo-200 hover:text-indigo-500 focus:outline-none focus:bg-indigo-500 focus:text-white"},wr,8,yr)])]);var t}),256))]))]);var e}),256))]),s("div",{class:"flex justify-center pt-4"},[s("button",{type:"button",onClick:d,class:"inline-flex items-center px-2.5 py-1.5 border border-gray-300 shadow-sm text-sm font-medium rounded text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"},kr)])]))}}),$r={class:"bg-white dark:bg-black px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Cr={class:""},_r={class:"mt-3 text-center sm:mt-0 sm:mx-4 sm:text-left"},Lr=s("h3",{class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-100"},"Query Preferences",-1),Vr={class:"mt-4"},Sr=["for"],Mr=["id"],Ar=["value","selected"],Tr={class:"mt-4 flex items-center py-4 border-b border-gray-200 dark:border-gray-800"},Fr=["id","checked"],Ir=["for"],Dr={class:"mt-4"},Or={class:"pb-2 px-4"},jr={class:""},Pr=["id","value"],Br=["for"],Rr={class:"bg-gray-50 dark:bg-gray-900 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},_n=ue({__name:"QueryPrefs",props:{id:{default:"QueryPrefs"},columns:null,prefs:null,maxLimit:null},emits:["done","save"],setup(r,{emit:e}){const i=r,t=St()["autoQueryGridDefaults"],d=M({}),c=(hl(()=>d.value=Object.assign({take:t.value.take,selectedColumns:[]},i.prefs)),[10,25,50,100,250,500,1e3]);function v(){e("done")}function f(){e("save",d.value)}return(e,t)=>{const l=X("PrimaryButton"),n=X("SecondaryButton"),o=X("ModalDialog");return a(),se(o,{id:r.id,onDone:v,"size-class":"w-full sm:max-w-prose"},{default:ke(()=>[s("div",$r,[s("div",Cr,[s("div",_r,[Lr,s("div",Vr,[s("label",{for:r.id+"-take",class:"block text-sm font-medium text-gray-700 dark:text-gray-300"},"Results per page",8,Sr),kt(s("select",{id:r.id+"-take","onUpdate:modelValue":t[0]||(t[0]=e=>d.value.take=e),class:"mt-1 block w-full pl-3 pr-10 py-2 text-base bg-white dark:bg-black border-gray-300 dark:border-gray-700 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md"},[(a(!0),u(Te,null,Ie(c.filter(e=>null==i.maxLimit||e<=i.maxLimit),e=>(a(),u("option",{value:e,selected:e===d.value.take},A(e),9,Ar))),256))],8,Mr),[[lo,d.value.take]])]),s("div",Tr,[s("input",{type:"radio",id:r.id+"-allColumns",onClick:t[1]||(t[1]=e=>d.value.selectedColumns=[]),checked:0===d.value.selectedColumns.length,class:"focus:ring-indigo-500 h-4 w-4 bg-white dark:bg-black text-indigo-600 dark:text-indigo-400 border-gray-300 dark:border-gray-700"},null,8,Fr),s("label",{class:"ml-3 block text-gray-700 dark:text-gray-300",for:r.id+"-allColumns"},"View all columns",8,Ir)]),s("div",Dr,[s("div",Or,[s("div",jr,[(a(!0),u(Te,null,Ie(r.columns,e=>(a(),u("div",{key:e.name,class:"flex items-center"},[kt(s("input",{type:"checkbox",id:e.name,value:e.name,"onUpdate:modelValue":t[2]||(t[2]=e=>d.value.selectedColumns=e),class:"h-4 w-4 bg-white dark:bg-black border-gray-300 dark:border-gray-700 rounded text-indigo-600 dark:text-indigo-400 focus:ring-indigo-500"},null,8,Pr),[[Xl,d.value.selectedColumns]]),s("label",{for:e.name,class:"ml-3"},A(e.name),9,Br)]))),128))])])])])])]),s("div",Rr,[$e(l,{onClick:f,color:"red",class:"ml-2"},{default:ke(()=>[xe(" Save ")]),_:1}),$e(n,{onClick:v},{default:ke(()=>[xe(" Cancel ")]),_:1})])]),_:1},8,["id"])}}}),Hr={key:0},Er={key:1},zr={key:2,class:"pt-1"},Nr={key:0},Ur={key:1},qr={key:3},Qr={class:"pl-1 pt-1 flex flex-wrap"},Kr={class:"flex mt-1"},Zr=["title"],Gr=s("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[s("g",{"stroke-width":"1.5",fill:"none"},[s("path",{d:"M9 3H3.6a.6.6 0 0 0-.6.6v16.8a.6.6 0 0 0 .6.6H9M9 3v18M9 3h6M9 21h6m0-18h5.4a.6.6 0 0 1 .6.6v16.8a.6.6 0 0 1-.6.6H15m0-18v18",stroke:"currentColor"})])],-1),Wr=[Gr],Jr=["disabled"],Xr=s("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[s("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6l6 6zM6 6h2v12H6z",fill:"currentColor"})],-1),Yr=[Xr],eu=["disabled"],tu=s("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[s("path",{d:"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z",fill:"currentColor"})],-1),lu=[tu],nu=["disabled"],su=s("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[s("path",{d:"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z",fill:"currentColor"})],-1),ou=[su],au=["disabled"],iu=s("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[s("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6l-6-6zM16 6h2v12h-2z",fill:"currentColor"})],-1),ru=[iu],uu={key:0,class:"flex mt-1"},du={class:"px-4 text-lg text-black dark:text-white"},cu={key:0},fu={key:1},mu=s("span",{class:"hidden xl:inline"}," Showing Results ",-1),vu={key:2},hu={class:"flex flex-wrap"},gu={key:0,class:"pl-2 mt-1"},pu=s("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[s("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 20v-5h-5M4 4v5h5m10.938 2A8.001 8.001 0 0 0 5.07 8m-1.008 5a8.001 8.001 0 0 0 14.868 3"})],-1),yu=[pu],bu={key:1,class:"pl-2 mt-1"},wu=wl('Excel',2),xu=[wu],ku={key:2,class:"pl-2 mt-1"},$u={key:0,class:"w-5 h-5 mr-1 text-green-600 dark:text-green-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Cu=s("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1),_u=[Cu],Lu={key:1,class:"w-5 h-5 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Vu=s("g",{fill:"none"},[s("path",{d:"M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7.242a2 2 0 0 0-.602-1.43L16.083 2.57A2 2 0 0 0 14.685 2H10a2 2 0 0 0-2 2z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),s("path",{d:"M16 18v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1),Su=[Vu],Mu=s("span",{class:"whitespace-nowrap"},"Copy URL",-1),Au={key:3,class:"pl-2 mt-1"},Tu=s("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24"},[s("path",{fill:"currentColor",d:"M6.78 2.72a.75.75 0 0 1 0 1.06L4.56 6h8.69a7.75 7.75 0 1 1-7.75 7.75a.75.75 0 0 1 1.5 0a6.25 6.25 0 1 0 6.25-6.25H4.56l2.22 2.22a.75.75 0 1 1-1.06 1.06l-3.5-3.5a.75.75 0 0 1 0-1.06l3.5-3.5a.75.75 0 0 1 1.06 0Z"})],-1),Fu=[Tu],Iu={key:4,class:"pl-2 mt-1"},Du=s("svg",{class:"flex-none w-5 h-5 mr-2 text-gray-400 dark:text-gray-500 group-hover:text-gray-500","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},[s("path",{"fill-rule":"evenodd",d:"M3 3a1 1 0 011-1h12a1 1 0 011 1v3a1 1 0 01-.293.707L12 11.414V15a1 1 0 01-.293.707l-2 2A1 1 0 018 17v-5.586L3.293 6.707A1 1 0 013 6V3z","clip-rule":"evenodd"})],-1),Ou={class:"mr-1"},ju={key:0,class:"h-5 w-5 text-gray-400 dark:text-gray-500 group-hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},Pu=s("path",{"fill-rule":"evenodd",d:"M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z","clip-rule":"evenodd"},null,-1),Bu=[Pu],Ru={key:1,class:"h-5 w-5 text-gray-400 dark:text-gray-500 group-hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},Hu=s("path",{"fill-rule":"evenodd",d:"M5 10a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1z","clip-rule":"evenodd"},null,-1),Eu=[Hu],zu={key:5,class:"pl-2 mt-1"},Nu=["title"],Uu=s("svg",{class:"w-5 h-5 mr-1 text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-50",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[s("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z",fill:"currentColor"})],-1),qu={class:"whitespace-nowrap"},Qu={key:7},Ku={key:0,class:"cursor-pointer flex justify-between items-center hover:text-gray-900 dark:hover:text-gray-50"},Zu={class:"mr-1 select-none"},Gu={key:1,class:"flex justify-between items-center"},Wu={class:"mr-1 select-none"},Ju=ue({__name:"AutoQueryGrid",props:{filterDefinitions:null,id:{default:"AutoQueryGrid"},apis:null,type:null,prefs:null,deny:null,hide:null,selectedColumns:null,toolbarButtonClass:null,tableStyle:null,gridClass:null,grid2Class:null,grid3Class:null,grid4Class:null,tableClass:null,theadClass:null,tbodyClass:null,theadRowClass:null,theadCellClass:null,headerTitle:null,headerTitles:null,visibleFrom:null,rowClass:null,rowStyle:null,apiPrefs:null,canFilter:null,disableKeyBindings:null,configureField:null,skip:{default:0},create:{type:Boolean},edit:null,filters:null},emits:["headerSelected","rowSelected"],setup(p,{expose:e,emit:v}){const r=p,{config:t,autoQueryGridDefaults:W}=St(),G=W,J=qe("client"),l=t.value.storage,Y="filtering,queryString,queryFilters".split(","),ee="copyApiUrl,downloadCsv,filtersView,newItem,pagingInfo,pagingNav,preferences,refresh,resetPreferences,toolbar".split(","),te=f(()=>r.deny?bt(Y,r.deny):bt(Y,G.value.deny)),le=f(()=>r.hide?bt(ee,r.hide):bt(ee,G.value.hide));function m(e){return te.value[e]}function g(e){return le.value[e]}const h=f(()=>r.tableStyle??G.value.tableStyle),ae=f(()=>r.gridClass??he.getGridClass(h.value)),ne=f(()=>r.grid2Class??he.getGrid2Class(h.value)),oe=f(()=>r.grid3Class??he.getGrid3Class(h.value)),re=f(()=>r.grid4Class??he.getGrid4Class(h.value)),ie=f(()=>r.tableClass??he.getTableClass(h.value)),ue=f(()=>r.theadClass??he.getTheadClass(h.value)),de=f(()=>r.theadRowClass??he.getTheadRowClass(h.value)),ce=f(()=>r.theadCellClass??he.getTheadCellClass(h.value)),y=f(()=>r.toolbarButtonClass??he.toolbarButtonClass);function ve(e,t){var l,a;return r.rowClass?r.rowClass(e,t):(l=!!q.value.AnyUpdate,a=(null!=(a=i.value)&&a.name?be(e,i.value.name):null)==T.value,he.getTableRowClass(r.tableStyle,t,a,l))}const b=Yl(),fe=f(()=>{var e;return tt((null==(e=q.value.AnyQuery.viewModel)?void 0:e.name)||q.value.AnyQuery.dataModel.name)}),pe=f(()=>{const t=Object.keys(b).map(e=>e.toLowerCase());return Je(fe.value).filter(e=>t.includes(e.name.toLowerCase())||t.includes(e.name.toLowerCase()+"-header")).map(e=>e.name)});const x=f(()=>{var e=(0<(e=gt(r.selectedColumns)).length?e:0e.toLowerCase());const l=Je(fe.value);return 0l.find(e=>e.name.toLowerCase()===t)).filter(e=>null!=e):l}),me=f(()=>{let e=x.value.map(e=>e.name),t=gt(O.value.selectedColumns).map(e=>e.toLowerCase());return 0t.includes(e.toLowerCase())):e}),C=M([]),L=M(new We),ge=M(new We),V=M(),S=M(!1),T=M(),I=M(),$=M(!1),F=M(),B=M(r.skip),j=M(!1),O=M({take:25}),_=M(!1),ye=f(()=>C.value.some(e=>0C.value.map(e=>e.settings.filters.length).reduce((e,t)=>e+t,0)),Ce=f(()=>{var e;return Je(tt(d.value||(null==(e=q.value.AnyQuery)?void 0:e.dataModel.name)))}),i=f(()=>{var e;return el(tt(d.value||(null==(e=q.value.AnyQuery)?void 0:e.dataModel.name)))}),E=f(()=>O.value.take??25),D=f(()=>L.value.response?be(L.value.response,"results"):[]),H=f(()=>{var e;return(null==(e=L.value.response)?void 0:e.total)??D.value.length??0}),Le=f(()=>00D.value.length>=E.value),Ve=f(()=>D.value.length>=E.value),z=M(),R=M(),Se={NoQuery:"No Query API was found"};function Te(t){if(t){if(r.canFilter)return r.canFilter(t);var e=Ce.value.find(e=>e.name.toLowerCase()==t.toLowerCase());if(e)return!ms(e)}}function n(e){m("queryString")&&ln(e)}async function P(e){B.value+=e,B.value<0&&(B.value=0);e=Math.floor(H.value/E.value)*E.value;B.value>e&&(B.value=e),n({skip:B.value||void 0}),await N()}async function Fe(e,t){var l,a;I.value=null,T.value=t,e&&t&&(a=Gt(q.value.AnyQuery,{[e]:t}),(a=await J.api(a)).succeeded)&&((a=null==(a=be(a.response,"results"))?void 0:a[0])||console.warn(`API ${null==(l=q.value.AnyQuery)?void 0:l.request.name}(${e}:${t}) returned no results`),I.value=a)}async function je(e,t){v("rowSelected",e,t);t=null==(t=i.value)?void 0:t.name,e=t?be(e,t):null;t&&e&&(n({edit:e}),Fe(t,e))}function Oe(t,e){var l,a,s;m("filtering")&&(l=e.target,Te(t)&&"TD"!==(null==l?void 0:l.tagName)&&(l=null==(l=null==l?void 0:l.closest("TABLE"))?void 0:l.getBoundingClientRect(),a=C.value.find(e=>e.name.toLowerCase()==t.toLowerCase()))&&l&&(s=l.x+318+10,F.value={column:a,topLeft:{x:Math.max(Math.floor(e.clientX+159),s),y:l.y+45}}),v("headerSelected",t,e))}function _e(){F.value=null}async function Ee(e){var t=null==(t=F.value)?void 0:t.column;t&&(t.settings=e,l.setItem(c(t.name),JSON.stringify(t.settings)),await N()),F.value=null}async function De(e){l.setItem(c(e.name),JSON.stringify(e.settings)),await N()}async function He(e){$.value=!1,O.value=e,l.setItem(Ye(),JSON.stringify(e)),await N()}function ze(){null!=(e=z.value)&&e.forceUpdate(),null!=(e=R.value)&&e.forceUpdate();var e=Be();null!=(e=null==e?void 0:e.proxy)&&e.$forceUpdate()}async function N(){await Pe(Ne())}async function Re(){await N()}async function Pe(a){var s=q.value.AnyQuery;if(s){let e=Gt(s,a),t=Wn(e=>{L.value.response=L.value.error=void 0,_.value=e}),l=await J.api(e);t(),xt(()=>L.value=l);s=be(l.response,"results")||[];l.succeeded&&s.label}else console.error(Se.NoQuery)}function Ne(){let a={include:"total",take:E.value},t=gt(O.value.selectedColumns||r.selectedColumns);if(0{var e,l=s.find(e=>e.name.toLowerCase()==t.toLowerCase());null!=(e=null==l?void 0:l.ref)&&e.selfId&&n.push(l.ref.selfId),be(b,t)&&n.push(...s.filter(e=>{return(null==(e=null==(e=e.ref)?void 0:e.selfId)?void 0:e.toLowerCase())==t.toLowerCase()}).map(e=>e.name))}),n.forEach(e=>{t.includes(e)||t.push(e)}),a.fields=t.join(",")}let e=[];if(C.value.forEach(l=>{l.settings.sort&&e.push(("DESC"===l.settings.sort?"-":"")+l.name),l.settings.filters.forEach(e=>{var t=e.key.replace("%",l.name);a[t]=e.value})}),r.filters&&Object.keys(r.filters).forEach(e=>{a[e]=r.filters[e]}),m("queryString")&&m("queryFilters")){var l=location.search||(location.hash.includes("?")?"?"+dl(location.hash,"?"):"");let e=El(l);Object.keys(e).forEach(t=>{x.value.find(e=>e.name.toLowerCase()===t.toLowerCase())&&(a[t]=e[t])}),typeof e.skip<"u"&&(l=parseInt(e.skip),isNaN(l)||(B.value=a.skip=l))}return"u"j.value=!1,3e3)}function Qe(e="json"){var t=Ne(),l="/api/"+(null==(l=q.value.AnyQuery)?void 0:l.request.name),l=yo(J.baseUrl,Kt(l,{...t,jsconfig:"edv"}));return 0<=l.indexOf("?")?xl(l,"?")+"."+e+"?"+dl(l,"?"):l+".json"}async function Ke(){C.value.forEach(e=>{e.settings={filters:[]},l.removeItem(c(e.name))}),O.value={take:25},l.removeItem(Ye()),await N()}function Ge(){S.value=!0,n({create:null})}e({update:N,search:Pe,createRequestArgs:Ne,reset:ht,createDone:K,createSave:mt,editDone:Q,editSave:pt,forceUpdate:ze,setEdit:function(e){Object.assign(I.value,e),ze()},edit:I});const d=f(()=>Bt(r.type)),U=f(()=>{var e;return d.value||(null==(e=q.value.AnyQuery)?void 0:e.dataModel.name)}),Ye=()=>{var e;return r.id+"/ApiPrefs/"+(d.value||(null==(e=q.value.AnyQuery)?void 0:e.dataModel.name))},c=e=>{var t;return`Column/${r.id}:${d.value||(null==(t=q.value.AnyQuery)?void 0:t.dataModel.name)}.`+e},{metadataApi:et,typeOf:tt,apiOf:lt,filterDefinitions:at}=ot(),st=kn()["invalidAccessMessage"],nt=f(()=>r.filterDefinitions||at.value),q=f(()=>{var e=gt(r.apis);return 0lt(e)).filter(e=>null!=e).map(e=>e)):Ot.forType(d.value,et.value)}),rt=e=>`${e}`,it=f(()=>{var e;return et.value?0<(e=gt(r.apis).map(e=>null==lt(e)?e:null).filter(e=>null!=e)).length?rt(`Unknown API${1useMetadata()`)}),ut=f(()=>q.value.AnyQuery&&st(q.value.AnyQuery)),dt=f(()=>q.value.Create&&st(q.value.Create)),ct=f(()=>q.value.AnyUpdate&&st(q.value.AnyUpdate)),vt=f(()=>vl(q.value.Create)),ft=(f(()=>vl(q.value.AnyUpdate)),f(()=>vl(q.value.Delete)));function Q(){I.value=null,T.value=null,n({edit:void 0})}function K(){S.value=!1,n({create:void 0})}async function pt(){await N(),Q()}async function mt(){await N(),K()}function ht(){L.value=new We,ge.value=new We,S.value=!1,T.value=null,I.value=null,$.value=!1,F.value=null,B.value=r.skip,j.value=!1,O.value={take:25},_.value=!1;var e,t=r.prefs||yl(l.getItem(Ye())),t=(t&&(O.value=t),C.value=x.value.map(e=>({name:e.name,type:e.type,meta:e,settings:Object.assign({filters:[]},yl(l.getItem(c(e.name))))})),isNaN(r.skip)||(B.value=r.skip),null==(t=i.value)?void 0:t.name);m("queryString")&&(e=location.search||(location.hash.includes("?")?"?"+dl(location.hash,"?"):""),typeof(e=El(e)).create<"u"?S.value=typeof e.create<"u":!t||"string"!=typeof e.edit&&"number"!=typeof e.edit||Fe(t,e.edit)),!0===r.create&&(S.value=!0),t&&null!=r.edit&&Fe(t,r.edit)}return Xe(async()=>{ht(),await N()}),(l,e)=>{const t=X("Alert"),n=X("EnsureAccessDialog"),r=X("AutoCreateForm"),i=X("AutoEditForm"),d=X("ErrorSummary"),c=X("Loading"),v=X("SettingsIcons"),f=X("DataGrid");return o(it)?(a(),u("div",Hr,[$e(t,{innerHTML:o(it)},null,8,["innerHTML"])])):o(ut)?(a(),u("div",Er,[$e(Es,{"invalid-access":o(ut)},null,8,["invalid-access"])])):(a(),u("div",zr,[S.value&&o(q).Create?(a(),u("div",Nr,[o(dt)?(a(),se(n,{key:0,title:"Create "+o(U),"invalid-access":o(dt),"alert-class":"text-yellow-700",onDone:K},null,8,["title","invalid-access"])):o(b).createform?Z(l.$slots,"createform",{key:1,type:o(q).Create.request.name,configure:p.configureField,done:K,save:mt}):(a(),se(r,{key:2,ref_key:"createForm",ref:z,type:o(q).Create.request.name,configure:p.configureField,onDone:K,onSave:mt},{header:ke(()=>[Z(l.$slots,"formheader",{form:"create",formInstance:z.value,apis:o(q),type:o(U)})]),footer:ke(()=>[Z(l.$slots,"formfooter",{form:"create",formInstance:z.value,apis:o(q),type:o(U)})]),_:3},8,["type","configure"]))])):I.value&&o(q).AnyUpdate?(a(),u("div",Ur,[o(ct)?(a(),se(n,{key:0,title:"Update "+o(U),"invalid-access":o(ct),"alert-class":"text-yellow-700",onDone:Q},null,8,["title","invalid-access"])):o(b).editform?Z(l.$slots,"editform",{key:1,model:I.value,type:o(q).AnyUpdate.request.name,deleteType:o(ft)?o(q).Delete.request.name:null,configure:p.configureField,done:Q,save:pt}):(a(),se(i,{key:2,ref_key:"editForm",ref:R,modelValue:I.value,"onUpdate:modelValue":e[0]||(e[0]=e=>I.value=e),type:o(q).AnyUpdate.request.name,deleteType:o(ft)?o(q).Delete.request.name:null,configure:p.configureField,onDone:Q,onSave:pt,onDelete:pt},{header:ke(()=>[Z(l.$slots,"formheader",{form:"edit",formInstance:R.value,apis:o(q),type:o(U),model:I.value,id:T.value})]),footer:ke(()=>[Z(l.$slots,"formfooter",{form:"edit",formInstance:R.value,apis:o(q),type:o(U),model:I.value,id:T.value})]),_:3},8,["modelValue","type","deleteType","configure"]))])):k("",!0),o(b).toolbar?Z(l.$slots,"toolbar",{key:2}):g("toolbar")?(a(),u("div",qr,[$.value?(a(),se(_n,{key:0,columns:o(x),prefs:O.value,onDone:e[1]||(e[1]=e=>$.value=!1),onSave:He},null,8,["columns","prefs"])):k("",!0),s("div",Qr,[s("div",Kr,[g("preferences")?(a(),u("button",{key:0,type:"button",class:"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400",title:o(U)+" Preferences",onClick:e[2]||(e[2]=e=>$.value=!$.value)},Wr,8,Zr)):k("",!0),g("pagingNav")?(a(),u("button",{key:1,type:"button",class:w(["pl-2",o(Le)?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"First page",disabled:!o(Le),onClick:e[3]||(e[3]=e=>P(-o(H)))},Yr,10,Jr)):k("",!0),g("pagingNav")?(a(),u("button",{key:2,type:"button",class:w(["pl-2",o(Me)?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"Previous page",disabled:!o(Me),onClick:e[4]||(e[4]=e=>P(-o(E)))},lu,10,eu)):k("",!0),g("pagingNav")?(a(),u("button",{key:3,type:"button",class:w(["pl-2",o(Ae)?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"Next page",disabled:!o(Ae),onClick:e[5]||(e[5]=e=>P(o(E)))},ou,10,nu)):k("",!0),g("pagingNav")?(a(),u("button",{key:4,type:"button",class:w(["pl-2",o(Ve)?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"Last page",disabled:!o(Ve),onClick:e[6]||(e[6]=e=>P(o(H)))},ru,10,au)):k("",!0)]),g("pagingInfo")?(a(),u("div",uu,[s("div",du,[_.value?(a(),u("span",cu,"Querying...")):k("",!0),o(D).length?(a(),u("span",fu,[mu,xe(" "+A(B.value+1)+" - "+A(Math.min(B.value+o(D).length,o(H)))+" ",1),s("span",null," of "+A(o(H)),1)])):L.value.completed?(a(),u("span",vu,"No Results")):k("",!0)])])):k("",!0),s("div",hu,[g("refresh")?(a(),u("div",gu,[s("button",{type:"button",onClick:Re,title:"Refresh",class:w(o(y))},yu,2)])):k("",!0),g("downloadCsv")?(a(),u("div",bu,[s("button",{type:"button",onClick:Ze,title:"Download CSV",class:w(o(y))},xu,2)])):k("",!0),g("copyApiUrl")?(a(),u("div",ku,[s("button",{type:"button",onClick:Ue,title:"Copy API URL",class:w(o(y))},[j.value?(a(),u("svg",$u,_u)):(a(),u("svg",Lu,Su)),Mu],2)])):k("",!0),o(ye)&&g("resetPreferences")?(a(),u("div",Au,[s("button",{type:"button",onClick:Ke,title:"Reset Preferences & Filters",class:w(o(y))},Fu,2)])):k("",!0),g("filtersView")&&0V.value="filters"==V.value?null:"filters"),class:w(o(y)),"aria-expanded":"false"},[Du,s("span",Ou,A(o(we))+" "+A(1==o(we)?"Filter":"Filters"),1),"filters"!=V.value?(a(),u("svg",ju,Bu)):(a(),u("svg",Ru,Eu))],2)])):k("",!0),g("newItem")&&o(q).Create&&o(vt)?(a(),u("div",zu,[s("button",{type:"button",onClick:Ge,title:o(U),class:w(o(y))},[Uu,s("span",qu,"New "+A(o(U)),1)],10,Nu)])):k("",!0),o(b).toolbarbuttons?Z(l.$slots,"toolbarbuttons",{key:6,toolbarButtonClass:o(y)}):k("",!0)])])])):k("",!0),"filters"==V.value?(a(),se(Cn,{key:4,class:"border-y border-gray-200 dark:border-gray-800 py-8 my-2",definitions:o(nt),columns:C.value,onDone:e[8]||(e[8]=e=>V.value=null),onChange:De},null,8,["definitions","columns"])):k("",!0),ge.value.error??L.value.error?(a(),se(d,{key:5,status:ge.value.error??L.value.error},null,8,["status"])):_.value?(a(),se(c,{key:6,class:"p-2"})):k("",!0),F.value?(a(),u("div",Qu,[$e($n,{definitions:o(nt),column:F.value.column,"top-left":F.value.topLeft,onDone:_e,onSave:Ee},null,8,["definitions","column","top-left"])])):k("",!0),o(D).length?(a(),se(f,{key:8,id:p.id,items:o(D),type:p.type,"selected-columns":o(me),class:"mt-1",onFiltersChanged:N,tableStyle:o(h),gridClass:o(ae),grid2Class:o(ne),grid3Class:o(oe),grid4Class:o(re),tableClass:o(ie),theadClass:o(ue),theadRowClass:o(de),theadCellClass:o(ce),tbodyClass:p.tbodyClass,rowClass:ve,onRowSelected:je,rowStyle:p.rowStyle,headerTitle:p.headerTitle,headerTitles:p.headerTitles,visibleFrom:p.visibleFrom,onHeaderSelected:Oe},en({header:ke(({column:t,label:e})=>{var l;return[m("filtering")&&Te(t)?(a(),u("div",Ku,[s("span",Zu,A(e),1),$e(v,{column:C.value.find(e=>e.name.toLowerCase()===t.toLowerCase()),"is-open":(null==(l=F.value)?void 0:l.column.name)===t},null,8,["column","is-open"])])):(a(),u("div",Gu,[s("span",Wu,A(e),1)]))]}),_:2},[Ie(Object.keys(o(b)),t=>({name:t,fn:ke(e=>[Z(l.$slots,t,It(gl(e)))])}))]),1032,["id","items","type","selected-columns","tableStyle","gridClass","grid2Class","grid3Class","grid4Class","tableClass","theadClass","theadRowClass","theadCellClass","tbodyClass","rowStyle","headerTitle","headerTitles","visibleFrom"])):k("",!0)]))}}}),Xu={class:"flex"},Yu={key:0,class:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},ed=s("g",{fill:"none"},[s("path",{d:"M3 4a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v2.586a1 1 0 0 1-.293.707l-6.414 6.414a1 1 0 0 0-.293.707V17l-4 4v-6.586a1 1 0 0 0-.293-.707L3.293 7.293A1 1 0 0 1 3 6.586V4z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1),td=[ed],ld=s("path",{d:"M505.5 658.7c3.2 4.4 9.7 4.4 12.9 0l178-246c3.8-5.3 0-12.7-6.5-12.7H643c-10.2 0-19.9 4.9-25.9 13.2L512 558.6L406.8 413.2c-6-8.3-15.6-13.2-25.9-13.2H334c-6.5 0-10.3 7.4-6.5 12.7l178 246z",fill:"currentColor"},null,-1),nd=s("path",{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z",fill:"currentColor"},null,-1),sd=[ld,nd],od={key:2,class:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},ad=s("g",{fill:"none"},[s("path",{d:"M8.998 4.71L6.354 7.354a.5.5 0 1 1-.708-.707L9.115 3.18A.499.499 0 0 1 9.498 3H9.5a.5.5 0 0 1 .354.147l.01.01l3.49 3.49a.5.5 0 1 1-.707.707l-2.65-2.649V16.5a.5.5 0 0 1-1 0V4.71z",fill:"currentColor"})],-1),id=[ad],rd={key:3,class:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},ud=s("g",{fill:"none"},[s("path",{d:"M10.002 15.29l2.645-2.644a.5.5 0 0 1 .707.707L9.886 16.82a.5.5 0 0 1-.384.179h-.001a.5.5 0 0 1-.354-.147l-.01-.01l-3.49-3.49a.5.5 0 1 1 .707-.707l2.648 2.649V3.5a.5.5 0 0 1 1 0v11.79z",fill:"currentColor"})],-1),dd=[ud],cd=ue({__name:"SettingsIcons",props:{column:null,isOpen:{type:Boolean}},setup(s){return(e,t)=>{var l;return a(),u("div",Xu,[null!=(l=null==(l=null==(l=s.column)?void 0:l.settings)?void 0:l.filters)&&l.length?(a(),u("svg",Yu,td)):(a(),u("svg",{key:1,class:w(["w-4 h-4 transition-transform",s.isOpen?"rotate-180":""]),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},sd,2)),"ASC"===(null==(l=null==(l=s.column)?void 0:l.settings)?void 0:l.sort)?(a(),u("svg",od,id)):"DESC"===(null==(l=null==(l=s.column)?void 0:l.settings)?void 0:l.sort)?(a(),u("svg",rd,dd)):k("",!0)])}}}),fd=ue({__name:"EnsureAccessDialog",props:{title:null,subtitle:null,invalidAccess:null,alertClass:null},emits:["done"],setup(n){return(t,e)=>{const l=X("EnsureAccess"),s=X("SlideOver");return n.invalidAccess?(a(),se(s,{key:0,title:n.title,onDone:e[0]||(e[0]=e=>t.$emit("done")),"content-class":"relative flex-1"},en({default:ke(()=>[$e(l,{alertClass:n.alertClass,invalidAccess:n.invalidAccess},null,8,["alertClass","invalidAccess"])]),_:2},[n.subtitle?{name:"subtitle",fn:ke(()=>[xe(A(n.subtitle),1)]),key:"0"}:void 0]),1032,["title"])):k("",!0)}}}),md=["for"],vd={class:"mt-1 relative rounded-md shadow-sm"},hd=["type","name","id","placeholder","value","aria-invalid","aria-describedby"],gd={key:0,class:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"},pd=s("svg",{class:"h-5 w-5 text-red-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[s("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1),yd=[pd],bd=["id"],wd=["id"],xd={inheritAttrs:!1},kd=ue({...xd,__name:"TextInput",props:{status:null,id:null,type:null,inputClass:null,label:null,labelClass:null,help:null,placeholder:null,modelValue:null},setup(l,{expose:e}){const t=l,n=(e({focus:function(){var e;null!=(e=n.value)&&e.focus()}}),M());const r=f(()=>t.type||"text"),i=f(()=>t.label??Ee(nt(t.id))),d=f(()=>t.placeholder??i.value);let c=qe("ApiState",void 0);const v=f(()=>ft.call({responseStatus:t.status??(null==c?void 0:c.error.value)},t.id)),p=f(()=>[lt.base,v.value?lt.invalid:lt.valid,t.inputClass]);return(t,e)=>(a(),u("div",{class:w([t.$attrs.class])},[Z(t.$slots,"header",Le({inputElement:n.value,id:l.id,modelValue:l.modelValue,status:l.status},t.$attrs)),o(i)?(a(),u("label",{key:0,for:l.id,class:w("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(l.labelClass??""))},A(o(i)),11,md)):k("",!0),s("div",vd,[s("input",Le({ref_key:"inputElement",ref:n,type:o(r),name:l.id,id:l.id,class:o(p),placeholder:o(d),value:l.modelValue,onInput:e[0]||(e[0]=e=>t.$emit("update:modelValue",e.target.value)),"aria-invalid":null!=o(v),"aria-describedby":l.id+"-error",step:"any"},o(ut)(t.$attrs,["class"])),null,16,hd),o(v)?(a(),u("div",gd,yd)):k("",!0)]),o(v)?(a(),u("p",{key:1,class:"mt-2 text-sm text-red-500",id:l.id+"-error"},A(o(v)),9,bd)):l.help?(a(),u("p",{key:2,class:"mt-2 text-sm text-gray-500",id:l.id+"-description"},A(l.help),9,wd)):k("",!0),Z(t.$slots,"footer",Le({inputElement:n.value,id:l.id,modelValue:l.modelValue,status:l.status},t.$attrs))],2))}}),$d=["for"],Cd={class:"mt-1 relative rounded-md shadow-sm"},_d=["name","id","placeholder","aria-invalid","aria-describedby"],Ld=["id"],Vd=["id"],Sd={inheritAttrs:!1},Md=ue({...Sd,__name:"TextareaInput",props:{status:null,id:null,inputClass:null,label:null,labelClass:null,help:null,placeholder:null,modelValue:null},setup(l){const e=l,n=f(()=>e.label??Ee(nt(e.id))),r=f(()=>e.placeholder??n.value);let t=qe("ApiState",void 0);const i=f(()=>ft.call({responseStatus:e.status??(null==t?void 0:t.error.value)},e.id)),d=f(()=>["shadow-sm "+lt.base,i.value?"text-red-900 focus:ring-red-500 focus:border-red-500 border-red-300":"text-gray-900 "+lt.valid,e.inputClass]);return(t,e)=>(a(),u("div",{class:w([t.$attrs.class])},[o(n)?(a(),u("label",{key:0,for:l.id,class:w("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(l.labelClass??""))},A(o(n)),11,$d)):k("",!0),s("div",Cd,[s("textarea",Le({name:l.id,id:l.id,class:o(d),placeholder:o(r),onInput:e[0]||(e[0]=e=>t.$emit("update:modelValue",e.target.value)),"aria-invalid":null!=o(i),"aria-describedby":l.id+"-error"},o(ut)(t.$attrs,["class"])),A(l.modelValue),17,_d)]),o(i)?(a(),u("p",{key:1,class:"mt-2 text-sm text-red-500",id:l.id+"-error"},A(o(i)),9,Ld)):l.help?(a(),u("p",{key:2,class:"mt-2 text-sm text-gray-500",id:l.id+"-description"},A(l.help),9,Vd)):k("",!0)],2))}}),Ad=["for"],Td=["id","name","value","aria-invalid","aria-describedby"],Fd=["value"],Id=["id"],Dd={inheritAttrs:!1},Od=ue({...Dd,__name:"SelectInput",props:{status:null,id:null,modelValue:null,inputClass:null,label:null,labelClass:null,options:null,values:null,entries:null},setup(l){const t=l,n=f(()=>t.label??Ee(nt(t.id)));let e=qe("ApiState",void 0);const r=f(()=>ft.call({responseStatus:t.status??(null==e?void 0:e.error.value)},t.id)),i=f(()=>t.entries||(t.values?t.values.map(e=>({key:e,value:e})):t.options?Object.keys(t.options).map(e=>({key:e,value:t.options[e]})):[]));return(t,e)=>(a(),u("div",{class:w([t.$attrs.class])},[o(n)?(a(),u("label",{key:0,for:l.id,class:w("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(l.labelClass??""))},A(o(n)),11,Ad)):k("",!0),s("select",Le({id:l.id,name:l.id,class:["mt-1 block w-full pl-3 pr-10 py-2 text-base focus:outline-none sm:text-sm rounded-md dark:text-white dark:bg-gray-900 dark:border-gray-600",o(r)?"border-red-300 text-red-900 focus:ring-red-500 focus:border-red-500":"border-gray-300 text-gray-900 focus:ring-indigo-500 focus:border-indigo-500",l.inputClass],value:l.modelValue,onInput:e[0]||(e[0]=e=>t.$emit("update:modelValue",e.target.value)),"aria-invalid":null!=o(r),"aria-describedby":l.id+"-error"},o(ut)(t.$attrs,["class"])),[(a(!0),u(Te,null,Ie(o(i),e=>(a(),u("option",{value:e.key},A(e.value),9,Fd))),256))],16,Td),o(r)?(a(),u("p",{key:1,class:"mt-2 text-sm text-red-500",id:l.id+"-error"},A(o(r)),9,Id)):k("",!0)],2))}}),jd={class:"flex items-center h-5"},Pd=["id","name","checked"],Bd={class:"ml-3 text-sm"},Rd=["for"],Hd={key:0,class:"mt-2 text-sm text-red-500",id:"`${id}-error`"},Ed={key:1,class:"mt-2 text-sm text-gray-500",id:"`${id}-description`"},zd={inheritAttrs:!1},Nd=ue({...zd,__name:"CheckboxInput",props:{modelValue:{type:Boolean},status:null,id:null,inputClass:null,label:null,labelClass:null,help:null},emits:["update:modelValue"],setup(l,{}){const e=l,n=f(()=>e.label??Ee(nt(e.id)));let t=qe("ApiState",void 0);const r=f(()=>ft.call({responseStatus:e.status??(null==t?void 0:t.error.value)},e.id));return(t,e)=>(a(),u("div",{class:w(["relative flex items-start",t.$attrs.class])},[s("div",jd,[s("input",Le({id:l.id,name:l.id,type:"checkbox",checked:l.modelValue,onInput:e[0]||(e[0]=e=>t.$emit("update:modelValue",e.target.checked)),class:["focus:ring-indigo-500 h-4 w-4 text-indigo-600 rounded border-gray-300 dark:border-gray-600 dark:bg-gray-800",l.inputClass]},o(ut)(t.$attrs,["class"])),null,16,Pd)]),s("div",Bd,[s("label",{for:l.id,class:w("font-medium text-gray-700 dark:text-gray-300 "+(l.labelClass??""))},A(o(n)),11,Rd),o(r)?(a(),u("p",Hd,A(o(r)),1)):l.help?(a(),u("p",Ed,A(l.help),1)):k("",!0)])],2))}}),Ud=["id"],qd=["for"],Qd={class:"mt-1 relative rounded-md shadow-sm"},Kd=["id","name","value"],Zd=["onClick"],Gd={class:"flex flex-wrap pb-1.5"},Wd={class:"pt-1.5 pl-1"},Jd={class:"inline-flex rounded-full items-center py-0.5 pl-2.5 pr-1 text-sm font-medium bg-indigo-100 dark:bg-indigo-800 text-indigo-700 dark:text-indigo-300"},Xd=["onClick"],Yd=s("svg",{class:"h-2 w-2",stroke:"currentColor",fill:"none",viewBox:"0 0 8 8"},[s("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M1 1l6 6m0-6L1 7"})],-1),ec=[Yd],tc={class:"pt-1.5 pl-1 shrink"},lc=["type","name","id","aria-invalid","aria-describedby","onPaste"],nc=["id"],sc=["onMouseover","onClick"],oc={class:"block truncate"},ac={key:1,class:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"},ic=s("svg",{class:"h-5 w-5 text-red-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[s("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1),rc=[ic],uc=["id"],dc=["id"],cc={inheritAttrs:!1},fc=ue({...cc,__name:"TagInput",props:{status:null,id:null,type:null,inputClass:null,label:null,labelClass:null,help:null,modelValue:{default:()=>[]},delimiters:{default:()=>[","]},allowableValues:null,string:{type:Boolean},converter:null},emits:["update:modelValue"],setup(l,{emit:t}){const n=l;const r=f(()=>{return Ue((e=n.modelValue,n.converter?n.converter(e):e),e=>"string"==typeof e?0==e.trim().length?[]:e.split(","):e)||[];var e}),i=M(),d=M(!1),c=f(()=>n.allowableValues&&0!=n.allowableValues.length?n.allowableValues.filter(e=>!r.value.includes(e)&&e.toLowerCase().includes(p.value.toLowerCase())):[]);const v=M(null),p=M(""),m=f(()=>n.type||"text"),g=f(()=>n.label??Ee(nt(n.id)));let e=qe("ApiState",void 0);const h=f(()=>ft.call({responseStatus:n.status??(null==e?void 0:e.error.value)},n.id)),y=f(()=>["w-full cursor-text flex flex-wrap sm:text-sm rounded-md dark:text-white dark:bg-gray-900 border focus-within:border-transparent focus-within:ring-1 focus-within:outline-none",h.value?"pr-10 border-red-300 text-red-900 placeholder-red-300 focus-within:outline-none focus-within:ring-red-500 focus-within:border-red-500":"shadow-sm border-gray-300 dark:border-gray-600 focus-within:ring-indigo-500 focus-within:border-indigo-500",n.inputClass]),b=t=>S(r.value.filter(e=>e!=t));function x(e){document.activeElement===e.target&&null!=(e=v.value)&&e.focus()}const C=M();function L(){d.value=!0,C.value=!0}function V(){O(I()),C.value=!1,setTimeout(()=>{C.value||(d.value=!1)},200)}function S(e){e=n.string?e.join(","):e;t("update:modelValue",e)}function T(e){var t;"Backspace"==e.key&&0==p.value.length&&0e==t.key))&&t.preventDefault(),"Enter"==t.key||"NumpadEnter"==t.key||1==t.key.length&&e)&&O(l)}const F={behavior:"smooth",block:"nearest",inline:"nearest",scrollMode:"if-needed"};function B(){setTimeout(()=>{var e=pl(`#${n.id}-tag li.active`);e&&e.scrollIntoView(F)},0)}function j(){setTimeout(()=>{var e=pl(`#${n.id}-tag li.active`);e&&("scrollIntoViewIfNeeded"in e?e.scrollIntoViewIfNeeded(F):e.scrollIntoView(F))},0)}function O(e){var t;0!==e.length&&(-1==(t=Array.from(r.value)).indexOf(e)&&t.push(e),S(t),p.value="",d.value=!1)}function _(e){e=null==(e=e.clipboardData)?void 0:e.getData("Text");if(e){const t=new RegExp("\\n|\\t|"+n.delimiters.join("|")),l=Array.from(r.value);e.split(t).map(e=>e.trim()).forEach(e=>{-1==l.indexOf(e)&&l.push(e)}),S(l),p.value=""}}return(e,t)=>(a(),u("div",{class:w([e.$attrs.class]),id:l.id+"-tag",onmousemove:"cancelBlur=true"},[o(g)?(a(),u("label",{key:0,for:l.id,class:w("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(l.labelClass??""))},A(o(g)),11,qd)):k("",!0),s("div",Qd,[s("input",{type:"hidden",id:l.id,name:l.id,value:o(r).join(",")},null,8,Kd),s("button",{class:w(o(y)),onClick:Ne(x,["prevent"]),onFocus:t[2]||(t[2]=e=>d.value=!0),tabindex:"-1"},[s("div",Gd,[(a(!0),u(Te,null,Ie(o(r),t=>(a(),u("div",Wd,[s("span",Jd,[xe(A(t)+" ",1),s("button",{type:"button",onClick:e=>b(t),class:"flex-shrink-0 ml-1 h-4 w-4 rounded-full inline-flex items-center justify-center text-indigo-400 dark:text-indigo-500 hover:bg-indigo-200 dark:hover:bg-indigo-800 hover:text-indigo-500 dark:hover:text-indigo-400 focus:outline-none focus:bg-indigo-500 focus:text-white dark:focus:text-black"},ec,8,Xd)])]))),256)),s("div",tc,[kt(s("input",Le({ref_key:"txtInput",ref:v,type:o(m),role:"combobox","aria-controls":"options","aria-expanded":"false",autocomplete:"off",spellcheck:"false",name:l.id+"-txt",id:l.id+"-txt",class:"p-0 dark:bg-transparent rounded-md border-none focus:!border-none focus:!outline-none",style:`box-shadow:none !important;width:${p.value.length+1}ch`,"onUpdate:modelValue":t[0]||(t[0]=e=>p.value=e),"aria-invalid":null!=o(h),"aria-describedby":l.id+"-error",onKeydown:T,onKeypress:$,onPaste:Ne(_,["prevent","stop"]),onFocus:L,onBlur:V,onClick:t[1]||(t[1]=e=>d.value=!0)},o(ut)(e.$attrs,["class","required"])),null,16,lc),[[no,p.value]])])])],42,Zd),d.value&&o(c).length?(a(),u("ul",{key:0,class:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white dark:bg-black py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",onKeydown:T,id:l.id+"-options",role:"listbox"},[(a(!0),u(Te,null,Ie(o(c),l=>(a(),u("li",{class:w([l===i.value?"active bg-indigo-600 text-white":"text-gray-900 dark:text-gray-100","relative cursor-default select-none py-2 pl-3 pr-9"]),onMouseover:e=>{var t;t=l,i.value=t},onClick:e=>O(l),role:"option",tabindex:"-1"},[s("span",oc,A(l),1)],42,sc))),256))],40,nc)):k("",!0),o(h)?(a(),u("div",ac,rc)):k("",!0)]),o(h)?(a(),u("p",{key:1,class:"mt-2 text-sm text-red-500",id:l.id+"-error"},A(o(h)),9,uc)):l.help?(a(),u("p",{key:2,class:"mt-2 text-sm text-gray-500",id:l.id+"-description"},A(l.help),9,dc)):k("",!0)],10,Ud))}}),mc={class:"relative flex-grow mr-2 sm:mr-4"},vc=["for"],hc={class:"block mt-2"},gc={class:"sr-only"},pc=["multiple","name","id","placeholder","aria-invalid","aria-describedby"],yc={key:0,class:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"},bc=s("svg",{class:"h-5 w-5 text-red-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[s("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1),wc=[bc],xc=["id"],kc=["id"],$c={key:0},Cc=["title"],_c=["alt","src"],Lc={key:1,class:"mt-3"},Vc={class:"w-full"},Sc={class:"pr-6 align-bottom pb-2"},Mc=["title"],Ac=["src","onError"],Tc=["href"],Fc={key:1,class:"overflow-hidden"},Ic={class:"align-top pb-2 whitespace-nowrap"},Dc={key:0,class:"text-gray-500 dark:text-gray-400 text-sm bg-white dark:bg-black"},Oc=ue({__name:"FileInput",props:{multiple:{type:Boolean},status:null,id:null,inputClass:null,label:null,labelClass:null,help:null,placeholder:null,modelValue:null,values:null,files:null},setup(l){var e;const t=l,n=M(null),{assetsPathResolver:r,fallbackPathResolver:i}=St(),d={},c=M(),v=M((null==(e=t.files)?void 0:e.map(p))||[]);function p(e){return e.filePath=r(e.filePath),e}t.values&&0{e=e.replace(/\\/g,"/");return{fileName:wo($t(e,"/"),"."),filePath:e,contentType:Ql(e)}}).map(p));const m=f(()=>t.label??Ee(nt(t.id))),g=f(()=>t.placeholder??m.value);let h=qe("ApiState",void 0);const y=f(()=>ft.call({responseStatus:t.status??(null==h?void 0:h.error.value)},t.id)),b=f(()=>["block w-full sm:text-sm rounded-md dark:text-white dark:bg-gray-900 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-violet-50 dark:file:bg-violet-900 file:text-violet-700 dark:file:text-violet-200 hover:file:bg-violet-100 dark:hover:file:bg-violet-800",y.value?"pr-10 border-red-300 text-red-900 placeholder-red-300 focus:outline-none focus:ring-red-500 focus:border-red-500":"text-slate-500 dark:text-slate-400",t.inputClass]),x=e=>{e=e.target;c.value="",v.value=Array.from(e.files||[]).map(e=>({fileName:e.name,filePath:rn(e),contentLength:e.size,contentType:e.type||Ql(e.name)}))},C=()=>{var e;return null==(e=n.value)?void 0:e.click()},L=e=>null!=e&&(e.startsWith("data:")||e.startsWith("blob:")),V=f(()=>{var e;return 0!e||e.startsWith("data:")||e.endsWith(".svg")?"":"rounded-full object-cover";function T(e){c.value=i(V.value)}return Pt(rs),(e,t)=>(a(),u("div",{class:w(["flex",l.multiple?"flex-col":"justify-between"])},[s("div",mc,[o(m)?(a(),u("label",{key:0,for:l.id,class:w("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(l.labelClass??""))},A(o(m)),11,vc)):k("",!0),s("div",hc,[s("span",gc,A(l.help??o(m)),1),s("input",Le({ref_key:"input",ref:n,type:"file",multiple:l.multiple,name:l.id,id:l.id,class:o(b),placeholder:o(g),"aria-invalid":null!=o(y),"aria-describedby":l.id+"-error"},e.$attrs,{onChange:x}),null,16,pc),o(y)?(a(),u("div",yc,wc)):k("",!0)]),o(y)?(a(),u("p",{key:1,class:"mt-2 text-sm text-red-500",id:l.id+"-error"},A(o(y)),9,xc)):l.help?(a(),u("p",{key:2,class:"mt-2 text-sm text-gray-500",id:l.id+"-description"},A(l.help),9,kc)):k("",!0)]),l.multiple?(a(),u("div",Lc,[s("table",Vc,[(a(!0),u(Te,null,Ie(v.value,t=>(a(),u("tr",null,[s("td",Sc,[s("div",{class:"flex w-full",title:L(t.filePath)?"":t.filePath},[s("img",{src:d[o(pt)(t.filePath)]||o(r)(o(pt)(t.filePath)),class:w(["mr-2 h-8 w-8",S(t.filePath)]),onError:e=>d[o(pt)(t.filePath)]=o(i)(o(pt)(t.filePath))},null,42,Ac),L(t.filePath)?(a(),u("span",Fc,A(t.fileName),1)):(a(),u("a",{key:0,href:o(r)(t.filePath||""),target:"_blank",class:"overflow-hidden"},A(t.fileName),9,Tc))],8,Mc)]),s("td",Ic,[t.contentLength&&0[]},modelValue:null,match:null,viewCount:{default:100},pageSize:{default:8}},emits:["update:modelValue"],setup(l,{expose:e,emit:n}){const r=l,i=M(!1);function d(e){return Array.isArray(r.modelValue)&&0<=r.modelValue.indexOf(e)}e({toggle:B});const c=f(()=>r.label??Ee(nt(r.id)));let t=qe("ApiState",void 0);const v=f(()=>ft.call({responseStatus:r.status??(null==t?void 0:t.error.value)},r.id)),p=f(()=>[lt.base,v.value?lt.invalid:lt.valid]),m=M(null),g=M(""),h=M(null),y=M(r.viewCount),b=M([]),x=f(()=>g.value?r.options.filter(e=>r.match(e,g.value)).slice(0,y.value):r.options),C=["Tab","Escape","ArrowDown","ArrowUp","Enter","PageUp","PageDown","Home","End"];const L=[",",` -`,"\t"];function V(t){var l=null==(t=t.clipboardData)?void 0:t.getData("Text");if(l){t=L.some(e=>l.includes(e));if(r.multiple&&t){if(t){t=new RegExp("\\r|\\n|\\t|,"),t=l.split(t).filter(e=>e.trim()).map(t=>r.options.find(e=>r.match(e,t))).filter(e=>!!e);if(0{d(t)?e=e.filter(e=>e!=t):e.push(t)}),n("update:modelValue",e),cl()}}}else{t=r.options.filter(e=>r.match(e,l));1==t.length&&(O(t[0]),i.value=!1,cl())}}}function S(e){C.indexOf(e.code)||j()}function T(e){var t;e.shiftKey||e.ctrlKey||e.altKey||(i.value?"Escape"==e.code?i.value&&(e.stopPropagation(),i.value=!1):"Tab"==e.code?i.value=!1:"Home"==e.code?(h.value=b.value[0],$()):"End"==e.code?(h.value=b.value[b.value.length-1],$()):"ArrowDown"==e.code?(h.value?(t=b.value.indexOf(h.value),h.value=t+1{var e=pl(`#${r.id}-autocomplete li.active`);e&&e.scrollIntoView(I)},0)}function F(){setTimeout(()=>{var e=pl(`#${r.id}-autocomplete li.active`);e&&("scrollIntoViewIfNeeded"in e?e.scrollIntoViewIfNeeded(I):e.scrollIntoView(I))},0)}function B(e){(i.value=e)&&(j(),null!=(e=m.value))&&e.focus()}function j(){i.value=!0,_()}function O(t){if(g.value="",i.value=!1,r.multiple){let e=Array.from(r.modelValue||[]);d(t)?e=e.filter(e=>e!=t):e.push(t),h.value=null,n("update:modelValue",e)}else{let e=t;r.modelValue==t&&(e=null),n("update:modelValue",e)}}function _(){b.value=x.value}return Lt(g,_),(e,t)=>(a(),u("div",{id:l.id+"-autocomplete"},[o(c)?(a(),u("label",{key:0,for:l.id+"-text",class:"block text-sm font-medium text-gray-700 dark:text-gray-300"},A(o(c)),9,Pc)):k("",!0),s("div",Bc,[kt(s("input",Le({ref_key:"txtInput",ref:m,id:l.id+"-text",type:"text",role:"combobox","aria-controls":"options","aria-expanded":"false",autocomplete:"off",spellcheck:"false","onUpdate:modelValue":t[0]||(t[0]=e=>g.value=e),class:o(p),placeholder:l.multiple||!l.modelValue?l.placeholder:"",onFocus:j,onKeydown:T,onKeyup:S,onClick:j,onPaste:V,required:!1},e.$attrs),null,16,Rc),[[so,g.value]]),s("button",{type:"button",onClick:t[1]||(t[1]=e=>B(!i.value)),class:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",tabindex:"-1"},Ec),i.value?(a(),u("ul",{key:0,class:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white dark:bg-black py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",onKeydown:T,id:l.id+"-options",role:"listbox"},[(a(!0),u(Te,null,Ie(b.value,l=>(a(),u("li",{class:w([l===h.value?"active bg-indigo-600 text-white":"text-gray-900 dark:text-gray-100","relative cursor-default select-none py-2 pl-3 pr-9"]),onMouseover:e=>{return t=l,h.value=t,void(b.value.indexOf(t)>Math.floor(.9*y.value)&&(y.value+=r.viewCount,_()));var t},onClick:e=>O(l),role:"option",tabindex:"-1"},[Z(e.$slots,"item",It(gl(l))),d(l)?(a(),u("span",{key:0,class:w(["absolute inset-y-0 right-0 flex items-center pr-4",l===h.value?"text-white":"text-indigo-600"])},qc,2)):k("",!0)],42,Nc))),256))],40,zc)):!l.multiple&&l.modelValue?(a(),u("div",{key:1,onKeydown:T,onClick:t[2]||(t[2]=e=>B(!i.value)),class:"h-8 -mt-8 ml-3 pt-0.5"},[Z(e.$slots,"item",It(gl(l.modelValue)))],32)):k("",!0),o(v)?(a(),u("div",Qc,Zc)):k("",!0)]),o(v)?(a(),u("p",{key:1,class:"mt-2 text-sm text-red-500",id:l.id+"-error"},A(o(v)),9,Gc)):l.help?(a(),u("p",{key:2,class:"mt-2 text-sm text-gray-500",id:l.id+"-description"},A(l.help),9,Wc)):k("",!0)],8,jc))}}),Xc=["id","name","value"],Yc={class:"block truncate"},e0=ue({__name:"Combobox",props:{id:null,modelValue:null,multiple:{type:Boolean},options:null,values:null,entries:null},emits:["update:modelValue"],setup(n,{expose:e,emit:t}){const l=n;function r(e){t("update:modelValue",e)}e({toggle(e){var t;null!=(t=d.value)&&t.toggle(e)}});const i=f(()=>null!=l.multiple?l.multiple:Array.isArray(l.modelValue)),d=M();function c(e,t){return!t||e.value.toLowerCase().includes(t.toLowerCase())}const v=f(()=>l.entries||(l.values?l.values.map(e=>({key:e,value:e})):l.options?Object.keys(l.options).map(e=>({key:e,value:l.options[e]})):[])),p=M(i.value?[]:null);Xe(function(){let t=l.modelValue&&"object"==typeof l.modelValue?l.modelValue.key:l.modelValue;null==t||""===t?p.value=i.value?[]:null:"string"==typeof t?p.value=v.value.find(e=>e.key===t)||null:Array.isArray(t)&&(p.value=v.value.filter(e=>t.includes(e.key)))});const m=f(()=>null==p.value?"":Array.isArray(p.value)?p.value.map(e=>encodeURIComponent(e.key)).join(","):p.value.key);return(e,t)=>{var l=X("Autocomplete");return a(),u(Te,null,[s("input",{type:"hidden",id:n.id,name:n.id,value:o(m)},null,8,Xc),$e(l,Le({ref_key:"input",ref:d,id:n.id,options:o(v),match:c,multiple:o(i)},e.$attrs,{modelValue:p.value,"onUpdate:modelValue":[t[0]||(t[0]=e=>p.value=e),r]}),{item:ke(({value:e})=>[s("span",Yc,A(e),1)]),_:1},16,["id","options","multiple","modelValue"])],64)}}}),t0=ue({__name:"DynamicInput",props:{input:null,modelValue:null,api:null},emits:["update:modelValue"],setup(p,{emit:e}){const l=p,m=f(()=>l.input.type||"text"),t="ignore,css,options,meta,allowableValues,allowableEntries,op,prop,type,id,name".split(","),g=f(()=>ut(l.input,t)),h=M(Ue(l.modelValue[l.input.id],e=>"file"===l.input.type?null:"date"===l.input.type&&e instanceof Date?$l(e):"time"===l.input.type?Xn(e):e)),y=(Lt(h,()=>{l.modelValue[l.input.id]=h.value,e("update:modelValue",l.modelValue)}),f(()=>{var e=l.modelValue[l.input.id];if("file"!==l.input.type||!e)return[];if("string"==typeof e)return[{filePath:e,fileName:$t(e,"/")}];if(!Array.isArray(e)&&"object"==typeof e)return e;if(Array.isArray(e)){const t=[];return e.forEach(e=>{"string"==typeof e?t.push({filePath:e,fileName:$t(e,"/")}):"object"==typeof e&&t.push(e)}),t}}));return(e,t)=>{var l,s=X("SelectInput"),n=X("CheckboxInput"),r=X("TagInput"),i=X("Combobox"),u=X("FileInput"),d=X("TextareaInput"),c=X("MarkdownInput"),v=X("TextInput");return o(ie).component(o(m))?(a(),se(Kn(o(ie).component(o(m))),Le({key:0,id:p.input.id,modelValue:h.value,"onUpdate:modelValue":t[0]||(t[0]=e=>h.value=e),status:null==(l=p.api)?void 0:l.error,"input-class":null==(l=p.input.css)?void 0:l.input,"label-class":null==(l=p.input.css)?void 0:l.label},o(g)),null,16,["id","modelValue","status","input-class","label-class"])):"select"==o(m)?(a(),se(s,Le({key:1,id:p.input.id,modelValue:h.value,"onUpdate:modelValue":t[1]||(t[1]=e=>h.value=e),status:null==(l=p.api)?void 0:l.error,"input-class":null==(s=p.input.css)?void 0:s.input,"label-class":null==(l=p.input.css)?void 0:l.label,entries:p.input.allowableEntries,values:p.input.allowableValues},o(g)),null,16,["id","modelValue","status","input-class","label-class","entries","values"])):"checkbox"==o(m)?(a(),se(n,Le({key:2,id:p.input.id,modelValue:h.value,"onUpdate:modelValue":t[2]||(t[2]=e=>h.value=e),status:null==(s=p.api)?void 0:s.error,"input-class":null==(l=p.input.css)?void 0:l.input,"label-class":null==(n=p.input.css)?void 0:n.label},o(g)),null,16,["id","modelValue","status","input-class","label-class"])):"tag"==o(m)?(a(),se(r,Le({key:3,id:p.input.id,modelValue:h.value,"onUpdate:modelValue":t[3]||(t[3]=e=>h.value=e),status:null==(s=p.api)?void 0:s.error,"input-class":null==(l=p.input.css)?void 0:l.input,"label-class":null==(n=p.input.css)?void 0:n.label,allowableValues:p.input.allowableValues,string:"String"==(null==(r=p.input.prop)?void 0:r.type)},o(g)),null,16,["id","modelValue","status","input-class","label-class","allowableValues","string"])):"combobox"==o(m)?(a(),se(i,Le({key:4,id:p.input.id,modelValue:h.value,"onUpdate:modelValue":t[4]||(t[4]=e=>h.value=e),status:null==(s=p.api)?void 0:s.error,"input-class":null==(l=p.input.css)?void 0:l.input,"label-class":null==(n=p.input.css)?void 0:n.label,entries:p.input.allowableEntries,values:p.input.allowableValues},o(g)),null,16,["id","modelValue","status","input-class","label-class","entries","values"])):"file"==o(m)?(a(),se(u,Le({key:5,id:p.input.id,status:null==(r=p.api)?void 0:r.error,modelValue:h.value,"onUpdate:modelValue":t[5]||(t[5]=e=>h.value=e),"input-class":null==(i=p.input.css)?void 0:i.input,"label-class":null==(s=p.input.css)?void 0:s.label,files:o(y)},o(g)),null,16,["id","status","modelValue","input-class","label-class","files"])):"textarea"==o(m)?(a(),se(d,Le({key:6,id:p.input.id,modelValue:h.value,"onUpdate:modelValue":t[6]||(t[6]=e=>h.value=e),status:null==(l=p.api)?void 0:l.error,"input-class":null==(n=p.input.css)?void 0:n.input,"label-class":null==(u=p.input.css)?void 0:u.label},o(g)),null,16,["id","modelValue","status","input-class","label-class"])):"MarkdownInput"==o(m)?(a(),se(c,Le({key:7,id:p.input.id,modelValue:h.value,"onUpdate:modelValue":t[7]||(t[7]=e=>h.value=e),status:null==(r=p.api)?void 0:r.error,"input-class":null==(i=p.input.css)?void 0:i.input,"label-class":null==(s=p.input.css)?void 0:s.label},o(g)),null,16,["id","modelValue","status","input-class","label-class"])):(a(),se(v,Le({key:8,type:o(m),id:p.input.id,modelValue:h.value,"onUpdate:modelValue":t[8]||(t[8]=e=>h.value=e),status:null==(d=p.api)?void 0:d.error,"input-class":null==(l=p.input.css)?void 0:l.input,"label-class":null==(n=p.input.css)?void 0:n.label},o(g)),null,16,["type","id","modelValue","status","input-class","label-class"]))}}}),l0={class:"lookup-field"},n0=["name","value"],s0={key:0,class:"flex justify-between"},o0=["for"],a0={key:0,class:"flex items-center"},i0={class:"text-sm text-gray-500 dark:text-gray-400 pr-1"},r0=s("span",{class:"sr-only"},"Clear",-1),u0=s("svg",{class:"h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),d0=[r0,u0],c0={key:1,class:"mt-1 relative"},f0={class:"w-full inline-flex truncate"},m0={class:"text-blue-700 dark:text-blue-300 flex cursor-pointer"},v0=s("span",{class:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none"},[s("svg",{class:"h-5 w-5 text-gray-400 dark:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[s("path",{"fill-rule":"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1),h0=["id"],g0=["id"],p0=ue({__name:"LookupInput",props:{id:null,status:null,input:null,metadataType:null,modelValue:null,label:null,labelClass:null,help:null},emits:["update:modelValue"],setup(r,{emit:i}){const d=r,t=St()["config"],n=ot()["metadataApi"],c=f(()=>d.id||d.input.id),v=f(()=>d.label??Ee(nt(c.value)));let e=qe("ApiState",void 0);const p=qe("client"),m=f(()=>ft.call({responseStatus:d.status??(null==e?void 0:e.error.value)},c.value)),g=M(""),h=M(""),y=f(()=>be(d.modelValue,c.value)),b=f(()=>Je(d.metadataType).find(e=>e.name.toLowerCase()==c.value.toLowerCase())),x=f(()=>{var e;return(null==(e=st(null==(e=null==(e=b.value)?void 0:e.ref)?void 0:e.model))?void 0:e.icon)||t.value.tableIcon});let C;function L(){d.modelValue[c.value]=null,g.value=""}return Xe(async()=>{C=qe("ModalProvider",void 0);var t,l=d.modelValue;d.modelValue[c.value]||(d.modelValue[c.value]=null);const a=b.value,s=null==a?void 0:a.ref;if(s){g.value="";let e=null==s.selfId?be(l,a.name):be(l,s.selfId);null==(e=Zt(e)?be(l,s.refId):e)||null==(null==(t=n.value)?void 0:t.operations.find(e=>{return(null==(e=e.dataModel)?void 0:e.name)==s.model}))||Zt(t=be(l,a.name))||(g.value=""+t,h.value=a.name,null!=s.refLabel&&(null==(t=Je(d.metadataType).find(e=>e.type==s.model))&&console.warn(`Could not find ${s.model} Property on `+d.metadataType.name),null!=(l=null!=t?be(l,t.name):null)?(t=be(l,s.refLabel))&&(g.value=""+t,wt.setValue(s.model,e,s.refLabel,t)):(t=1==(null==(l=a.attributes)?void 0:l.some(e=>"Computed"==e.name)),l=await wt.getOrFetchValue(p,n.value,s.model,s.refId,s.refLabel,t,e),g.value=l||s.model+": "+g.value)))}else console.warn(`No RefInfo for property '${c.value}'`)}),(e,t)=>{var l,n=X("Icon");return a(),u("div",l0,[s("input",{type:"hidden",name:o(c),value:o(y)},null,8,n0),o(v)?(a(),u("div",s0,[s("label",{for:o(c),class:w("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(r.labelClass??""))},A(o(v)),11,o0),o(y)?(a(),u("div",a0,[s("span",i0,A(o(y)),1),s("button",{onClick:L,type:"button",title:"clear",class:"mr-1 rounded-md text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:ring-offset-black"},d0)])):k("",!0)])):k("",!0),null!=(l=o(b))&&l.ref?(a(),u("div",c0,[s("button",{type:"button",class:"lookup flex relative w-full bg-white dark:bg-black border border-gray-300 dark:border-gray-700 rounded-md shadow-sm pl-3 pr-10 py-2 text-left focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm",onClick:t[0]||(t[0]=e=>{var l;(l=o(b).ref)&&(null==C?console.warn("No ModalProvider required by LookupInput"):C.openModal({name:"ModalLookup",ref:l},e=>{var t;console.debug("openModal",g.value," -> ",e,wt.setRefValue(l,e),l),e&&(t=be(e,l.refId),g.value=wt.setRefValue(l,e)||t,(e=o(d.modelValue))[c.value]=t,i("update:modelValue",e))}))}),"aria-haspopup":"listbox","aria-expanded":"true","aria-labelledby":"listbox-label"},[s("span",f0,[s("span",m0,[$e(n,{class:"mr-1 w-5 h-5",image:o(x)},null,8,["image"]),s("span",null,A(g.value),1)])]),v0])])):k("",!0),o(m)?(a(),u("p",{key:2,class:"mt-2 text-sm text-red-500",id:o(c)+"-error"},A(o(m)),9,h0)):r.help?(a(),u("p",{key:3,class:"mt-2 text-sm text-gray-500",id:o(c)+"-description"},A(r.help),9,g0)):k("",!0)])}}}),y0=ue({__name:"AutoFormFields",props:{modelValue:null,type:null,api:null,formLayout:null,configureField:null,configureFormLayout:null,hideSummary:{type:Boolean},flexClass:{default:"flex flex-1 flex-col justify-between"},divideClass:{default:"divide-y divide-gray-200 px-4 sm:px-6"},spaceClass:{default:"space-y-6 pt-6 pb-5"},fieldsetClass:{default:"grid grid-cols-12 gap-6"}},emits:["update:modelValue"],setup(d,{expose:e,emit:l}){const r=d;function n(){var e=Be();null!=(e=null==e?void 0:e.proxy)&&e.$forceUpdate()}function c(e,t){r.modelValue[e]=t,l("update:modelValue",r.modelValue),n()}e({forceUpdate:n,props:r,updateValue:c});const{metadataApi:t,apiOf:i,typeOf:v,typeOfRef:p,createFormLayout:m}=ot(),g=f(()=>r.type||Bt(r.modelValue)),h=f(()=>v(g.value)),y=f(()=>{var e;return p(null==(e=null==(e=t.value)?void 0:e.operations.find(e=>e.request.name==g.value))?void 0:e.dataModel)||h.value}),b=f(()=>{var e,t=h.value;if(!t){if(r.formLayout)return e=r.formLayout.map(e=>{var t={name:e.id,type:va(e.type)},t=Object.assign({prop:t},e);return r.configureField&&r.configureField(t),t}),r.configureFormLayout&&r.configureFormLayout(e),e;throw new Error(`MetadataType for ${g.value} not found`)}const a=Je(t),s=y.value,l=r.formLayout||m(t),n=[],o=i(t.name);return l.forEach(t=>{var e,l=a.find(e=>e.name==t.name);t.ignore||(e=(null==(e=null==s?void 0:s.properties)?void 0:e.find(e=>{return e.name.toLowerCase()==(null==(e=t.name)?void 0:e.toLowerCase())}))??l,l=Object.assign({prop:e,op:o},t),r.configureField&&r.configureField(l),n.push(l))}),r.configureFormLayout&&r.configureFormLayout(n),n}),x=f(()=>b.value.filter(e=>"hidden"!=e.type).map(e=>e.id));return(l,n)=>{var e;const t=X("ErrorSummary"),r=X("LookupInput"),i=X("DynamicInput");return a(),u(Te,null,[d.hideSummary?k("",!0):(a(),se(t,{key:0,status:null==(e=d.api)?void 0:e.error,except:o(x)},null,8,["status","except"])),s("div",{class:w(d.flexClass)},[s("div",{class:w(d.divideClass)},[s("div",{class:w(d.spaceClass)},[s("fieldset",{class:w(d.fieldsetClass)},[(a(!0),u(Te,null,Ie(o(b),t=>{var e;return a(),u("div",{key:t.id,class:w(["w-full",(null==(e=t.css)?void 0:e.field)??("textarea"==t.type?"col-span-12":"col-span-12 xl:col-span-6"+("checkbox"==t.type?" flex items-center":"")),"hidden"==t.type?"hidden":""])},[null==(null==(e=t.prop)?void 0:e.ref)||"file"==t.type||t.prop.isPrimaryKey?(a(),se(i,{key:1,input:t,modelValue:d.modelValue,"onUpdate:modelValue":n[0]||(n[0]=e=>l.$emit("update:modelValue",e)),api:d.api},null,8,["input","modelValue","api"])):(a(),se(r,{key:0,metadataType:o(y),input:t,modelValue:d.modelValue,"onUpdate:modelValue":e=>{c(t.id,be(e,t.id))},status:null==(e=d.api)?void 0:e.error},null,8,["metadataType","input","modelValue","onUpdate:modelValue","status"]))],2)}),128))],2)],2)],2)],2)],64)}}});function Tl(){const s=M(!1),n=M(),o=M(),r=qe("client");function i({message:e,errorCode:t,fieldName:l,errors:a}){return t=t||"Exception",a=a||[],n.value=new Pl(l?{errorCode:t,message:e,errors:[new Hn({fieldName:l,errorCode:t,message:e})]}:{errorCode:t,message:e,errors:a})}var e={setError:i,addFieldError:function({fieldName:t,message:e,errorCode:l}){var a;l=l||"Exception",n.value?((a=new Pl(n.value)).errors=[...(a.errors||[]).filter(e=>{return(null==(e=e.fieldName)?void 0:e.toLowerCase())!==(null==t?void 0:t.toLowerCase())}),new Hn({fieldName:t,message:e,errorCode:l})],n.value=a):i({fieldName:t,message:e,errorCode:l})},loading:s,error:n,api:async function(e,t,l){return s.value=!0,e=await r.api(At(e),t,l),s.value=!1,o.value=e.response,n.value=e.error,e},apiVoid:async function(e,t,l){return s.value=!0,e=await r.apiVoid(At(e),t,l),s.value=!1,o.value=e.response,n.value=e.error,e},apiForm:async function(e,t,l,a){return s.value=!0,e=await r.apiForm(At(e),t,l,a),s.value=!1,o.value=e.response,n.value=e.error,e},apiFormVoid:async function(e,t,l,a){return s.value=!0,e=await r.apiFormVoid(At(e),t,l,a),s.value=!1,o.value=e.response,n.value=e.error,e},swr:async function(e,t,l,a){return ts(r,e,t,l,a)},swrEffect:function(l,a){const s=M(new We),n=ls(async e=>{s.value=await r.api(e)},null==a?void 0:a.delayMs);return hl(async()=>{var e=l(),t=sn(_l(e));t&&(s.value=new We({response:t})),0===(null==a?void 0:a.delayMs)?s.value=await r.api(e):n(e)}),(async()=>s.value=await r.api(l(),null==a?void 0:a.args,null==a?void 0:a.method))(),s},unRefs:At,setRef:Yn};return Xt("ApiState",e),e}const b0={key:0},w0={class:"text-red-700"},x0=s("b",null,"type",-1),k0={key:0},$0={key:2},C0=["innerHTML"],_0=s("input",{type:"submit",class:"hidden"},null,-1),L0={class:"flex justify-end"},V0=s("div",null,null,-1),S0={key:2,class:"relative z-10","aria-labelledby":"slide-over-title",role:"dialog","aria-modal":"true"},M0=s("div",{class:"fixed inset-0"},null,-1),A0={class:"fixed inset-0 overflow-hidden"},T0={class:"flex min-h-0 flex-1 flex-col overflow-auto"},F0={class:"flex-1"},I0={class:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},D0={class:"flex items-start justify-between space-x-3"},O0={class:"space-y-1"},j0={key:0},P0={key:2},B0=["innerHTML"],R0={class:"flex h-7 items-center"},H0={class:"flex justify-end"},E0=ue({__name:"AutoForm",props:{type:null,modelValue:null,heading:null,subHeading:null,showLoading:{type:Boolean,default:!0},jsconfig:{default:"eccn,edv"},formStyle:{default:"card"},configureField:null,configureFormLayout:null,panelClass:null,bodyClass:null,formClass:null,innerFormClass:null,headerClass:{default:"p-6"},buttonsClass:null,headingClass:null,subHeadingClass:null,submitLabel:{default:"Submit"},allowSubmit:null},emits:["success","error","update:modelValue","done"],setup(p,{expose:e,emit:r}){const i=p,m=M(),g=M(1),h=M();function t(){g.value++,B.value=F();var e=Be();null!=(e=null==e?void 0:e.proxy)&&e.$forceUpdate()}e({forceUpdate:t,props:i,setModel:async function(e){Object.assign(B.value,e),t(),await xt(()=>null)},formFields:m,submit:async function(){E(h.value)},close:N}),Xt("ModalProvider",{openModal:function(e,t){y.value=e,l.value=t}});const y=M(),l=M();async function b(e){l.value&&l.value(e),y.value=void 0,l.value=void 0}const d=Tl(),n=ns()["getTypeName"],{typeOf:c,createDto:v}=ot(),x=M(new We),C=f(()=>i.panelClass||Ze.panelClass(i.formStyle)),L=f(()=>i.formClass||"card"==i.formStyle?"shadow sm:rounded-md":Tt.formClass),V=f(()=>i.headingClass||Ze.headingClass(i.formStyle)),S=f(()=>i.subHeadingClass||Ze.subHeadingClass(i.formStyle)),T=f(()=>("string"==typeof i.buttonsClass?i:Ze).buttonsClass),I=f(()=>{var e;return i.type?n(i.type):null!=(e=i.modelValue)&&e.getTypeName?i.modelValue.getTypeName():null}),$=f(()=>c(I.value)),F=()=>i.modelValue||_(),B=M(F()),j=f(()=>d.loading.value),O=f(()=>{var e;return i.heading||(null==(e=c(I.value))?void 0:e.description)||Ee(I.value)});function _(){return"string"==typeof i.type?v(i.type):i.type?new i.type:i.modelValue}async function E(e){var t,l,a,s,n;e&&"FORM"==e.tagName?(t=_(),n=Ue(null==t?void 0:t.getMethod,e=>"function"==typeof e?e():null)||"POST",l=null==Ue(null==t?void 0:t.createResponse,e=>"function"==typeof e?e():null),a=i.jsconfig,tn.hasRequestBody(n)?(n=new t.constructor,s=new FormData(e),console.debug("AutoForm.submitForm",n,s),x.value=l?await d.apiFormVoid(n,s,{jsconfig:a}):await d.apiForm(n,s,{jsconfig:a})):(n=new t.constructor(B.value),console.debug("AutoForm.submit",n),x.value=l?await d.apiVoid(n,{jsconfig:a}):await d.api(n,{jsconfig:a})),x.value.succeeded?(r("success",x.value.response),N()):r("error",x.value.error)):console.error("Not a valid form",e)}function D(e){r("update:modelValue",e)}function H(){r("done")}const z=M(!1),R=M(""),P={entering:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-full",to:"translate-x-0"},leaving:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-0",to:"translate-x-full"}};function N(){"slideOver"==i.formStyle?z.value=!1:H()}Lt(z,()=>{Ct(P,R,z.value),z.value||setTimeout(H,700)}),z.value=!0;const U=e=>{"Escape"===e.key&&N()};return Xe(()=>window.addEventListener("keydown",U)),Pt(()=>window.removeEventListener("keydown",U)),(t,e)=>{var l;const n=X("AutoFormFields"),r=X("FormLoading"),i=X("PrimaryButton"),d=X("CloseButton"),c=X("SecondaryButton"),v=X("ModalLookup");return a(),u("div",null,[o($)?"card"==p.formStyle?(a(),u("div",{key:1,class:w(o(C))},[s("form",{ref_key:"elForm",ref:h,onSubmit:e[0]||(e[0]=Ne(e=>E(e.target),["prevent"])),autocomplete:"off",class:w(p.innerFormClass)},[s("div",{class:w(p.bodyClass)},[s("div",{class:w(p.headerClass)},[t.$slots.heading?(a(),u("div",k0,[Z(t.$slots,"heading")])):(a(),u("h3",{key:1,class:w(o(V))},A(o(O)),3)),t.$slots.subheading?(a(),u("div",$0,[Z(t.$slots,"subheading")])):p.subHeading?(a(),u("p",{key:3,class:w(o(S))},A(p.subHeading),3)):null!=(l=o($))&&l.notes?(a(),u("p",{key:4,class:w(["notes",o(S)]),innerHTML:null==(l=o($))?void 0:l.notes},null,10,C0)):k("",!0)],2),Z(t.$slots,"header",{instance:null==(l=Be())?void 0:l.exposed,model:B.value}),_0,(a(),se(n,{ref_key:"formFields",ref:m,key:g.value,type:p.type,modelValue:B.value,"onUpdate:modelValue":D,api:x.value,configureField:p.configureField,configureFormLayout:p.configureFormLayout},null,8,["type","modelValue","api","configureField","configureFormLayout"])),Z(t.$slots,"footer",{instance:null==(l=Be())?void 0:l.exposed,model:B.value})],2),Z(t.$slots,"buttons",{},()=>{var e;return[s("div",{class:w(o(T))},[s("div",null,[Z(t.$slots,"leftbuttons",{instance:null==(e=Be())?void 0:e.exposed,model:B.value})]),s("div",null,[p.showLoading&&o(j)?(a(),se(r,{key:0})):k("",!0)]),s("div",L0,[V0,$e(i,{disabled:!!p.allowSubmit&&!p.allowSubmit(B.value)},{default:ke(()=>[xe(A(p.submitLabel),1)]),_:1},8,["disabled"]),Z(t.$slots,"rightbuttons",{instance:null==(e=Be())?void 0:e.exposed,model:B.value})])],2)]})],34)],2)):(a(),u("div",S0,[M0,s("div",A0,[s("div",{onMousedown:N,class:"absolute inset-0 overflow-hidden"},[s("div",{onMousedown:e[2]||(e[2]=Ne(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[s("div",{class:w(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",R.value])},[s("form",{ref_key:"elForm",ref:h,class:w(o(L)),onSubmit:e[1]||(e[1]=Ne(e=>E(e.target),["prevent"]))},[s("div",T0,[s("div",F0,[s("div",I0,[s("div",D0,[s("div",O0,[t.$slots.heading?(a(),u("div",j0,[Z(t.$slots,"heading")])):(a(),u("h3",{key:1,class:w(o(V))},A(o(O)),3)),t.$slots.subheading?(a(),u("div",P0,[Z(t.$slots,"subheading")])):p.subHeading?(a(),u("p",{key:3,class:w(o(S))},A(p.subHeading),3)):null!=(l=o($))&&l.notes?(a(),u("p",{key:4,class:w(["notes",o(S)]),innerHTML:null==(e=o($))?void 0:e.notes},null,10,B0)):k("",!0)]),s("div",R0,[$e(d,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:N})])])]),Z(t.$slots,"header",{instance:null==(l=Be())?void 0:l.exposed,model:B.value}),(a(),se(n,{ref_key:"formFields",ref:m,key:g.value,type:p.type,modelValue:B.value,"onUpdate:modelValue":D,api:x.value,configureField:p.configureField,configureFormLayout:p.configureFormLayout},null,8,["type","modelValue","api","configureField","configureFormLayout"])),Z(t.$slots,"footer",{instance:null==(e=Be())?void 0:e.exposed,model:B.value})])]),s("div",{class:w(o(T))},[s("div",null,[Z(t.$slots,"leftbuttons",{instance:null==(l=Be())?void 0:l.exposed,model:B.value})]),s("div",null,[p.showLoading&&o(j)?(a(),se(r,{key:0})):k("",!0)]),s("div",H0,[$e(c,{onClick:N,disabled:o(j)},{default:ke(()=>[xe("Cancel")]),_:1},8,["disabled"]),$e(i,{class:"ml-4",disabled:!!p.allowSubmit&&!p.allowSubmit(B.value)},{default:ke(()=>[xe(A(p.submitLabel),1)]),_:1},8,["disabled"]),Z(t.$slots,"rightbuttons",{instance:null==(e=Be())?void 0:e.exposed,model:B.value})])],2)],34)],2)],32)],32)])])):(a(),u("div",b0,[s("p",w0,[xe("Could not create form for unknown "),x0,xe(" "+A(o(I)),1)])])),"ModalLookup"==(null==(l=y.value)?void 0:l.name)&&y.value.ref?(a(),se(v,{key:3,"ref-info":y.value.ref,onDone:b},null,8,["ref-info"])):k("",!0)])}}}),z0={key:0},N0={class:"text-red-700"},U0=s("b",null,"type",-1),q0=["onSubmit"],Q0={key:0},K0={key:2},Z0=["innerHTML"],G0={class:"flex justify-end"},W0={key:2,class:"relative z-10","aria-labelledby":"slide-over-title",role:"dialog","aria-modal":"true"},J0=s("div",{class:"fixed inset-0"},null,-1),X0={class:"fixed inset-0 overflow-hidden"},Y0=["onSubmit"],ef={class:"flex min-h-0 flex-1 flex-col overflow-auto"},tf={class:"flex-1"},lf={class:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},nf={class:"flex items-start justify-between space-x-3"},sf={class:"space-y-1"},of={key:0},af={key:2},rf=["innerHTML"],uf={class:"flex h-7 items-center"},df={class:"flex justify-end"},cf=ue({__name:"AutoCreateForm",props:{type:null,formStyle:{default:"slideOver"},panelClass:null,formClass:null,headingClass:null,subHeadingClass:null,buttonsClass:null,heading:null,subHeading:null,autosave:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},showCancel:{type:Boolean,default:!0},configureField:null,configureFormLayout:null},emits:["done","save","error"],setup(p,{expose:e,emit:n}){const r=p,m=M(),g=M(1);function t(){g.value++,null!=(e=m.value)&&e.forceUpdate();var e=Be();null!=(e=null==e?void 0:e.proxy)&&e.$forceUpdate()}function h(e){}e({forceUpdate:t,props:r,setModel:function(e){Object.assign(V.value,e),t()},formFields:m}),Xt("ModalProvider",{openModal:function(e,t){y.value=e,l.value=t}});const y=M(),l=M();async function b(e){l.value&&l.value(e),y.value=void 0,l.value=void 0}const{typeOf:i,typeProperties:d,Crud:c,createDto:v,formValues:x}=ot(),C=f(()=>Bt(r.type)),L=f(()=>i(C.value)),V=M("string"==typeof r.type?v(r.type):r.type?new r.type:null),S=f(()=>r.panelClass||Ze.panelClass(r.formStyle)),T=f(()=>r.formClass||Ze.formClass(r.formStyle)),I=f(()=>r.headingClass||Ze.headingClass(r.formStyle)),$=f(()=>r.subHeadingClass||Ze.subHeadingClass(r.formStyle)),F=f(()=>r.buttonsClass||Ze.buttonsClass),B=f(()=>c.model(L.value)),j=f(()=>{var e;return r.heading||(null==(e=i(C.value))?void 0:e.description)||(B.value?"New "+Ee(B.value):Ee(C.value))}),O=M(new We);let _=Tl(),E=f(()=>_.loading.value);async function D(e){var t,l,a,e=e.target;r.autosave?(l=Ue(null==(l=V.value)?void 0:l.getMethod,e=>"function"==typeof e?e():null)||"POST",t=null==Ue(null==(t=V.value)?void 0:t.createResponse,e=>"function"==typeof e?e():null),tn.hasRequestBody(l)?(l=new V.value.constructor,a=new FormData(e),O.value=t?await _.apiFormVoid(l,a,{jsconfig:"eccn"}):await _.apiForm(l,a,{jsconfig:"eccn"})):(l=x(e,d(L.value)),a=new V.value.constructor(l),O.value=t?await _.apiVoid(a,{jsconfig:"eccn"}):await _.api(a,{jsconfig:"eccn"})),O.value.succeeded?(e.reset(),n("save",O.value.response)):n("error",O.value.error)):n("save",new V.value.constructor(x(e,d(L.value))))}function H(){n("done")}const z=M(!1),R=M(""),P={entering:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-full",to:"translate-x-0"},leaving:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-0",to:"translate-x-full"}};function N(){"slideOver"==r.formStyle?z.value=!1:H()}Lt(z,()=>{Ct(P,R,z.value),z.value||setTimeout(H,700)}),z.value=!0;const U=e=>{"Escape"===e.key&&N()};return Xe(()=>window.addEventListener("keydown",U)),Pt(()=>window.removeEventListener("keydown",U)),(e,t)=>{var l,n=X("AutoFormFields"),r=X("FormLoading"),i=X("SecondaryButton"),d=X("PrimaryButton"),c=X("CloseButton"),v=X("ModalLookup");return a(),u("div",null,[o(L)?"card"==p.formStyle?(a(),u("div",{key:1,class:w(o(S))},[s("form",{onSubmit:Ne(D,["prevent"])},[s("div",{class:w(o(T))},[s("div",null,[e.$slots.heading?(a(),u("div",Q0,[Z(e.$slots,"heading")])):(a(),u("h3",{key:1,class:w(o(I))},A(o(j)),3)),e.$slots.subheading?(a(),u("div",K0,[Z(e.$slots,"subheading")])):p.subHeading?(a(),u("p",{key:3,class:w(o($))},A(p.subHeading),3)):null!=(l=o(L))&&l.notes?(a(),u("p",{key:4,class:w(["notes",o($)]),innerHTML:null==(l=o(L))?void 0:l.notes},null,10,Z0)):k("",!0)]),Z(e.$slots,"header",{formInstance:null==(l=Be())?void 0:l.exposed,model:V.value}),(a(),se(n,{ref_key:"formFields",ref:m,key:g.value,modelValue:V.value,"onUpdate:modelValue":h,api:O.value,configureField:p.configureField,configureFormLayout:p.configureFormLayout},null,8,["modelValue","api","configureField","configureFormLayout"])),Z(e.$slots,"footer",{formInstance:null==(l=Be())?void 0:l.exposed,model:V.value})],2),s("div",{class:w(o(F))},[s("div",null,[p.showLoading&&o(E)?(a(),se(r,{key:0})):k("",!0)]),s("div",G0,[p.showCancel?(a(),se(i,{key:0,onClick:N,disabled:o(E)},{default:ke(()=>[xe("Cancel")]),_:1},8,["disabled"])):k("",!0),$e(d,{type:"submit",class:"ml-4",disabled:o(E)},{default:ke(()=>[xe("Save")]),_:1},8,["disabled"])])],2)],40,q0)],2)):(a(),u("div",W0,[J0,s("div",X0,[s("div",{onMousedown:N,class:"absolute inset-0 overflow-hidden"},[s("div",{onMousedown:t[0]||(t[0]=Ne(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[s("div",{class:w(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",R.value])},[s("form",{class:w(o(T)),onSubmit:Ne(D,["prevent"])},[s("div",ef,[s("div",tf,[s("div",lf,[s("div",nf,[s("div",sf,[e.$slots.heading?(a(),u("div",of,[Z(e.$slots,"heading")])):(a(),u("h3",{key:1,class:w(o(I))},A(o(j)),3)),e.$slots.subheading?(a(),u("div",af,[Z(e.$slots,"subheading")])):p.subHeading?(a(),u("p",{key:3,class:w(o($))},A(p.subHeading),3)):null!=(l=o(L))&&l.notes?(a(),u("p",{key:4,class:w(["notes",o($)]),innerHTML:null==(t=o(L))?void 0:t.notes},null,10,rf)):k("",!0)]),s("div",uf,[$e(c,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:N})])])]),Z(e.$slots,"header",{formInstance:null==(l=Be())?void 0:l.exposed,model:V.value}),(a(),se(n,{ref_key:"formFields",ref:m,key:g.value,modelValue:V.value,"onUpdate:modelValue":h,api:O.value,configureField:p.configureField,configureFormLayout:p.configureFormLayout},null,8,["modelValue","api","configureField","configureFormLayout"])),Z(e.$slots,"footer",{formInstance:null==(t=Be())?void 0:t.exposed,model:V.value})])]),s("div",{class:w(o(F))},[s("div",null,[p.showLoading&&o(E)?(a(),se(r,{key:0})):k("",!0)]),s("div",df,[p.showCancel?(a(),se(i,{key:0,onClick:N,disabled:o(E)},{default:ke(()=>[xe("Cancel")]),_:1},8,["disabled"])):k("",!0),$e(d,{type:"submit",class:"ml-4",disabled:o(E)},{default:ke(()=>[xe("Save")]),_:1},8,["disabled"])])],2)],42,Y0)],2)],32)],32)])])):(a(),u("div",z0,[s("p",N0,[xe("Could not create form for unknown "),U0,xe(" "+A(o(C)),1)])])),"ModalLookup"==(null==(c=y.value)?void 0:c.name)&&y.value.ref?(a(),se(v,{key:3,"ref-info":y.value.ref,onDone:b},null,8,["ref-info"])):k("",!0)])}}}),ff={key:0},mf={class:"text-red-700"},vf=s("b",null,"type",-1),hf=["onSubmit"],gf={key:0},pf={key:2},yf=["innerHTML"],bf={class:"flex justify-end"},wf={key:2,class:"relative z-10","aria-labelledby":"slide-over-title",role:"dialog","aria-modal":"true"},xf=s("div",{class:"fixed inset-0"},null,-1),kf={class:"fixed inset-0 overflow-hidden"},$f=["onSubmit"],Cf={class:"flex min-h-0 flex-1 flex-col overflow-auto"},_f={class:"flex-1"},Lf={class:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},Vf={class:"flex items-start justify-between space-x-3"},Sf={class:"space-y-1"},Mf={key:0},Af={key:2},Tf=["innerHTML"],Ff={class:"flex h-7 items-center"},If={class:"flex justify-end"},Df=ue({__name:"AutoEditForm",props:{modelValue:null,type:null,deleteType:null,formStyle:{default:"slideOver"},panelClass:null,formClass:null,headingClass:null,subHeadingClass:null,heading:null,subHeading:null,autosave:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},configureField:null,configureFormLayout:null},emits:["done","save","delete","error"],setup(p,{expose:e,emit:n}){const d=p,m=M(),g=M(1);function h(e){}e({forceUpdate:function(){g.value++,S.value=V();var e=Be();null!=(e=null==e?void 0:e.proxy)&&e.$forceUpdate()},props:d,setModel:function(e){Object.assign(S.value,e)},formFields:m}),Xt("ModalProvider",{openModal:function(e,t){y.value=e,l.value=t}});const y=M(),l=M();async function b(e){l.value&&l.value(e),y.value=void 0,l.value=void 0}const{typeOf:t,apiOf:c,typeProperties:r,createFormLayout:q,getPrimaryKey:Q,Crud:v,createDto:i,formValues:x}=ot(),C=f(()=>Bt(d.type)),L=f(()=>t(C.value)),V=()=>"string"==typeof d.type?i(d.type,ml(d.modelValue)):d.type?new d.type(ml(d.modelValue)):null,S=M(V()),K=f(()=>d.panelClass||Ze.panelClass(d.formStyle)),T=f(()=>d.formClass||Ze.formClass(d.formStyle)),I=f(()=>d.headingClass||Ze.headingClass(d.formStyle)),$=f(()=>d.subHeadingClass||Ze.subHeadingClass(d.formStyle)),F=f(()=>v.model(L.value)),B=f(()=>{var e;return d.heading||(null==(e=t(C.value))?void 0:e.description)||(F.value?"Update "+Ee(F.value):Ee(C.value))}),j=M(new We);let O=Tl(),_=f(()=>O.loading.value);const E=()=>Ue(t(v.model(L.value)),e=>Q(e));function W(e){var{op:t,prop:l}=e;t&&(v.isPatch(t)||v.isUpdate(t))&&(e.disabled=null==l?void 0:l.isPrimaryKey),d.configureField&&d.configureField(e)}async function D(a){a=a.target;if(d.autosave){let e=Ue(null==(s=S.value)?void 0:s.getMethod,e=>"function"==typeof e?e():null)||"POST",t=null==Ue(null==(s=S.value)?void 0:s.createResponse,e=>"function"==typeof e?e():null),u=E();if(tn.hasRequestBody(e)){let e=new S.value.constructor,l=be(d.modelValue,u.name),r=new FormData(a),i=(u&&!Array.from(r.keys()).some(e=>e.toLowerCase()==u.name.toLowerCase())&&r.append(u.name,l),[]);var s=C.value&&c(C.value);if(s&&v.isPatch(s)){let e=ml(d.modelValue),t=q(L.value),o={};if(u&&(o[u.name]=l),t.forEach(a=>{var s=a.id,n=be(e,s);if(!u||u.name.toLowerCase()!==s.toLowerCase()){let e=r.get(s),t=null!=e,l="checkbox"===a.type?t!=!!n:"file"===a.type?t:e!=n;(l=e||n?l:!1)&&(e?o[s]=e:"file"!==a.type&&i.push(s))}}),Array.from(r.keys()).filter(e=>!o[e]).forEach(e=>r.delete(e)),0==Array.from(r.keys()).filter(e=>e.toLowerCase()!=u.name.toLowerCase()).length&&0==i.length)return void N()}s=0"function"==typeof e?e():null)?j.value=await O.apiVoid(l):j.value=await O.api(l),j.value.succeeded?n("delete",j.value.response):n("error",j.value.error)):console.error(`Could not find Primary Key for Type ${C.value} (${F.value})`)}function z(){n("done")}const R=M(!1),P=M(""),G={entering:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-full",to:"translate-x-0"},leaving:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-0",to:"translate-x-full"}};function N(){"slideOver"==d.formStyle?R.value=!1:z()}Lt(R,()=>{Ct(G,P,R.value),R.value||setTimeout(z,700)}),R.value=!0;const U=e=>{"Escape"===e.key&&N()};return Xe(()=>window.addEventListener("keydown",U)),Pt(()=>window.removeEventListener("keydown",U)),(e,t)=>{var l,n=X("AutoFormFields"),r=X("ConfirmDelete"),i=X("FormLoading"),d=X("SecondaryButton"),c=X("PrimaryButton"),v=X("CloseButton"),f=X("ModalLookup");return a(),u("div",null,[o(L)?"card"==p.formStyle?(a(),u("div",{key:1,class:w(o(K))},[s("form",{onSubmit:Ne(D,["prevent"])},[s("div",{class:w(o(T))},[s("div",null,[e.$slots.heading?(a(),u("div",gf,[Z(e.$slots,"heading")])):(a(),u("h3",{key:1,class:w(o(I))},A(o(B)),3)),e.$slots.subheading?(a(),u("div",pf,[Z(e.$slots,"subheading")])):p.subHeading?(a(),u("p",{key:3,class:w(o($))},A(p.subHeading),3)):null!=(l=o(L))&&l.notes?(a(),u("p",{key:4,class:w(["notes",o($)]),innerHTML:null==(l=o(L))?void 0:l.notes},null,10,yf)):k("",!0)]),Z(e.$slots,"header",{formInstance:null==(l=Be())?void 0:l.exposed,model:S.value}),(a(),se(n,{ref_key:"formFields",ref:m,key:g.value,modelValue:S.value,"onUpdate:modelValue":h,api:j.value,configureField:p.configureField,configureFormLayout:p.configureFormLayout},null,8,["modelValue","api","configureField","configureFormLayout"])),Z(e.$slots,"footer",{formInstance:null==(l=Be())?void 0:l.exposed,model:S.value})],2),s("div",{class:w(o(Ze).buttonsClass)},[s("div",null,[p.deleteType?(a(),se(r,{key:0,onDelete:H})):k("",!0)]),s("div",null,[p.showLoading&&o(_)?(a(),se(i,{key:0})):k("",!0)]),s("div",bf,[$e(d,{onClick:N,disabled:o(_)},{default:ke(()=>[xe("Cancel")]),_:1},8,["disabled"]),$e(c,{type:"submit",class:"ml-4",disabled:o(_)},{default:ke(()=>[xe("Save")]),_:1},8,["disabled"])])],2)],40,hf)],2)):(a(),u("div",wf,[xf,s("div",kf,[s("div",{onMousedown:N,class:"absolute inset-0 overflow-hidden"},[s("div",{onMousedown:t[0]||(t[0]=Ne(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[s("div",{class:w(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",P.value])},[s("form",{class:w(o(T)),onSubmit:Ne(D,["prevent"])},[s("div",Cf,[s("div",_f,[s("div",Lf,[s("div",Vf,[s("div",Sf,[e.$slots.heading?(a(),u("div",Mf,[Z(e.$slots,"heading")])):(a(),u("h3",{key:1,class:w(o(I))},A(o(B)),3)),e.$slots.subheading?(a(),u("div",Af,[Z(e.$slots,"subheading")])):p.subHeading?(a(),u("p",{key:3,class:w(o($))},A(p.subHeading),3)):null!=(l=o(L))&&l.notes?(a(),u("p",{key:4,class:w(["notes",o($)]),innerHTML:null==(t=o(L))?void 0:t.notes},null,10,Tf)):k("",!0)]),s("div",Ff,[$e(v,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:N})])])]),Z(e.$slots,"header",{formInstance:null==(l=Be())?void 0:l.exposed,model:S.value}),(a(),se(n,{ref_key:"formFields",ref:m,key:g.value,modelValue:S.value,"onUpdate:modelValue":h,api:j.value,configureField:W,configureFormLayout:p.configureFormLayout},null,8,["modelValue","api","configureFormLayout"])),Z(e.$slots,"footer",{formInstance:null==(t=Be())?void 0:t.exposed,model:S.value})])]),s("div",{class:w(o(Ze).buttonsClass)},[s("div",null,[p.deleteType?(a(),se(r,{key:0,onDelete:H})):k("",!0)]),s("div",null,[p.showLoading&&o(_)?(a(),se(i,{key:0})):k("",!0)]),s("div",If,[$e(d,{onClick:N,disabled:o(_)},{default:ke(()=>[xe("Cancel")]),_:1},8,["disabled"]),$e(c,{type:"submit",class:"ml-4",disabled:o(_)},{default:ke(()=>[xe("Save")]),_:1},8,["disabled"])])],2)],42,$f)],2)],32)],32)])])):(a(),u("div",ff,[s("p",mf,[xe("Could not create form for unknown "),vf,xe(" "+A(o(C)),1)])])),"ModalLookup"==(null==(v=y.value)?void 0:v.name)&&y.value.ref?(a(),se(f,{key:3,"ref-info":y.value.ref,onDone:b},null,8,["ref-info"])):k("",!0)])}}}),Of=s("label",{for:"confirmDelete",class:"ml-2 mr-2 select-none"},"confirm",-1),jf=["onClick"],Pf=ue({__name:"ConfirmDelete",emits:["delete"],setup(e,{emit:t}){let l=M(!1);const n=()=>{l.value&&t("delete")},r=f(()=>["select-none inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white",l.value?"cursor-pointer bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500":"bg-red-400"]);return(e,t)=>(a(),u(Te,null,[kt(s("input",{id:"confirmDelete",type:"checkbox",class:"focus:ring-indigo-500 h-4 w-4 text-indigo-600 rounded border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:ring-offset-black","onUpdate:modelValue":t[0]||(t[0]=e=>qn(l)?l.value=e:l=e)},null,512),[[Xl,o(l)]]),Of,s("span",Le({onClick:Ne(n,["prevent"]),class:o(r)},e.$attrs),[Z(e.$slots,"default",{},()=>[xe("Delete")])],16,jf)],64))}}),Bf={class:"flex",title:"loading..."},Rf={key:0,xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"24px",height:"30px",viewBox:"0 0 24 30"},Hf=wl('',3),Ef=[Hf],zf={class:"ml-2 mt-1 text-gray-400"},Nf=ue({__name:"FormLoading",props:{icon:{type:Boolean,default:!0},text:{default:"loading..."}},setup(l){return qe("ApiState",void 0),(e,t)=>(a(),u("div",Bf,[l.icon?(a(),u("svg",Rf,Ef)):k("",!0),s("span",zf,A(l.text),1)]))}}),Uf=["onClick"],qf={key:3,class:"flex justify-between items-center"},Qf={class:"mr-1 select-none"},Kf=["onClick"],Zf=ue({__name:"DataGrid",props:{items:{default:()=>[]},id:{default:"DataGrid"},type:null,tableStyle:{default:"stripedRows"},selectedColumns:null,gridClass:null,grid2Class:null,grid3Class:null,grid4Class:null,tableClass:null,theadClass:null,tbodyClass:null,theadRowClass:null,theadCellClass:null,isSelected:null,headerTitle:null,headerTitles:null,visibleFrom:null,rowClass:null,rowStyle:null},emits:["headerSelected","rowSelected"],setup(t,{emit:d}){const c=t,l=M(),v=M(null),p=Yl(),m=t=>Object.keys(p).find(e=>e.toLowerCase()==t.toLowerCase()+"-header"),g=t=>Object.keys(p).find(e=>e.toLowerCase()==t.toLowerCase()),n=f(()=>zl(c.items).filter(e=>!(!p[e]&&!p[e+"-header"]))),{typeOf:e,typeProperties:r}=ot(),i=f(()=>Bt(c.type)),h=f(()=>e(i.value)),y=f(()=>r(h.value));function b(e){e=c.headerTitles&&be(c.headerTitles,e)||e;return c.headerTitle?c.headerTitle(e):Jn(e)}function x(e){const t=e.toLowerCase();return y.value.find(e=>e.name.toLowerCase()==t)}const C={xs:"xs:table-cell",sm:"sm:table-cell",md:"md:table-cell",lg:"lg:table-cell",xl:"xl:table-cell","2xl":"2xl:table-cell",never:""};function L(e){e=c.visibleFrom&&be(c.visibleFrom,e);return e&&Ue(C[e],e=>"hidden "+e)}const V=f(()=>c.gridClass??he.getGridClass(c.tableStyle)),S=f(()=>c.grid2Class??he.getGrid2Class(c.tableStyle)),T=f(()=>c.grid3Class??he.getGrid3Class(c.tableStyle)),I=f(()=>c.grid4Class??he.getGrid4Class(c.tableStyle)),$=f(()=>c.tableClass??he.getTableClass(c.tableStyle)),F=f(()=>c.tbodyClass??he.getTbodyClass(c.tbodyClass)),B=f(()=>c.theadClass??he.getTheadClass(c.tableStyle)),j=f(()=>c.theadRowClass??he.getTheadRowClass(c.tableStyle)),O=f(()=>c.theadCellClass??he.getTheadCellClass(c.tableStyle));const _=f(()=>{const e=("string"==typeof c.selectedColumns?c.selectedColumns.split(","):c.selectedColumns)||(0(e[t.name.toLowerCase()]=t.format,e),{});return e.filter(e=>{return"hidden"!=(null==(e=t[e.toLowerCase()])?void 0:e.method)})});return(n,e)=>{const r=X("CellFormat"),i=X("PreviewFormat");return t.items.length?(a(),u("div",{key:0,ref_key:"refResults",ref:l,class:w(o(V))},[s("div",{class:w(o(S))},[s("div",{class:w(o(T))},[s("div",{class:w(o(I))},[s("table",{class:w(o($))},[s("thead",{class:w(o(B))},[s("tr",{class:w(o(j))},[(a(!0),u(Te,null,Ie(o(_),t=>{return a(),u("td",{class:w([L(t),o(O),(e=t,v.value===e?"text-gray-900 dark:text-gray-50":"text-gray-500 dark:text-gray-400")])},[s("div",{onClick:e=>{d("headerSelected",t,e)}},[o(p)[t+"-header"]?Z(n.$slots,t+"-header",{key:0,column:t}):m(t)?Z(n.$slots,m(t),{key:1,column:t}):o(p).header?Z(n.$slots,"header",{key:2,column:t,label:b(t)}):(a(),u("div",qf,[s("span",Qf,A(b(t)),1)]))],8,Uf)],2);var e}),256))],2)],2),s("tbody",{class:w(o(F))},[(a(!0),u(Te,null,Ie(t.items,(t,e)=>{return a(),u("tr",{class:w((l=t,s=e,c.rowClass?c.rowClass(l,s):he.getTableRowClass(c.tableStyle,s,!(!c.isSelected||!c.isSelected(l)),null!=c.isSelected))),style:Jl((s=t,l=e,c.rowStyle?c.rowStyle(s,l):void 0)),onClick:e=>{d("rowSelected",t,e)}},[(a(!0),u(Te,null,Ie(o(_),e=>{return a(),u("td",{class:w([L(e),o(he).tableCellClass])},[o(p)[e]?Z(n.$slots,e,It(Le({key:0},t))):g(e)?Z(n.$slots,g(e),It(Le({key:1},t))):x(e)?(a(),se(r,{key:2,type:o(h),propType:x(e),modelValue:t},null,8,["type","propType","modelValue"])):(a(),se(i,{key:3,value:o(be)(t,e),format:null!=(e=x(e=e))&&e.format?e.format:"TimeSpan"==(null==e?void 0:e.type)||"TimeOnly"==(null==e?void 0:e.type)?{method:"time"}:null},null,8,["value","format"]))],2)}),256))],14,Kf);var l,s}),256))],2)],2)],2)],2)],2)],2)):k("",!0)}}}),Gf=ue({props:{type:Object,propType:Object,modelValue:Object},setup(i,{attrs:u}){const d=ot()["typeOf"];return()=>{var e,t;const l=null!=(e=i.propType)&&e.format?e.format:"TimeSpan"==(null==e?void 0:e.type)||"TimeOnly"==(null==e?void 0:e.type)?{method:"time"}:null,a=be(i.modelValue,i.propType.name),s=Object.assign({},i,u),n=ht("span",{innerHTML:Jt(a,l,s)}),o=Zt(a)&&Array.isArray(a)?ht("span",{},[ht("span",{class:"mr-2"},""+a.length),n]):n,r=null==(e=i.propType)?void 0:e.ref;return r&&(e=Je(i.type).find(e=>e.type===r.model))&&(e=(e=be(i.modelValue,e.name))&&r.refLabel&&be(e,r.refLabel))?(t=(t=null==(t=d(r.model))?void 0:t.icon)?ht(Rs,{image:t,class:"w-5 h-5 mr-1"}):null,ht("span",{class:"flex",title:r.model+" "+a},[t,e])):o}}}),Wf={key:0},Jf={key:0,class:"mr-2"},Xf=["innerHTML"],Yf=["innerHTML"],e1={inheritAttrs:!1},t1=ue({...e1,__name:"PreviewFormat",props:{value:null,format:null,includeIcon:{type:Boolean,default:!0},includeCount:{type:Boolean,default:!0},maxFieldLength:{default:150},maxNestedFields:{default:2},maxNestedFieldLength:{default:30}},setup(l){const e=l,n=f(()=>Array.isArray(e.value));return(e,t)=>o(Zt)(l.value)?(a(),u("span",Wf,[l.includeCount&&o(n)?(a(),u("span",Jf,A(l.value.length),1)):k("",!0),s("span",{innerHTML:o(Jt)(l.value,l.format,e.$attrs)},null,8,Xf)])):(a(),u("span",{key:1,innerHTML:o(Jt)(l.value,l.format,e.$attrs)},null,8,Yf))}}),l1=["innerHTML"],n1={key:0},s1=s("b",null,null,-1),o1={key:2},a1=ue({__name:"HtmlFormat",props:{value:null,depth:{default:0},fieldAttrs:null,classes:{type:Function,default:(e,t,l,a,s)=>a}},setup(r){const t=r,i=f(()=>_t(t.value)),d=f(()=>Array.isArray(t.value)),c=e=>Jn(e),v=e=>t.fieldAttrs?t.fieldAttrs(e):null,p=f(()=>zl(t.value));return(e,t)=>{const l=X("HtmlFormat",!0);return a(),u("div",{class:w(0==r.depth?"prose html-format":"")},[o(i)?(a(),u("div",{key:0,innerHTML:o(Jt)(r.value)},null,8,l1)):o(d)?(a(),u("div",{key:1,class:w(r.classes("array","div",r.depth,o(he).gridClass))},[o(_t)(r.value[0])?(a(),u("div",n1,"[ "+A(r.value.join(", "))+" ]",1)):(a(),u("div",{key:1,class:w(r.classes("array","div",r.depth,o(he).grid2Class))},[s("div",{class:w(r.classes("array","div",r.depth,o(he).grid3Class))},[s("div",{class:w(r.classes("array","div",r.depth,o(he).grid4Class))},[s("table",{class:w(r.classes("object","table",r.depth,o(he).tableClass))},[s("thead",{class:w(r.classes("array","thead",r.depth,o(he).theadClass))},[s("tr",null,[(a(!0),u(Te,null,Ie(o(p),e=>(a(),u("th",{class:w(r.classes("array","th",r.depth,o(he).theadCellClass+" whitespace-nowrap"))},[s1,xe(A(c(e)),1)],2))),256))])],2),s("tbody",null,[(a(!0),u(Te,null,Ie(r.value,(t,e)=>(a(),u("tr",{class:w(r.classes("array","tr",r.depth,e%2==0?"bg-white":"bg-gray-50",e))},[(a(!0),u(Te,null,Ie(o(p),e=>(a(),u("td",{class:w(r.classes("array","td",r.depth,o(he).tableCellClass))},[$e(l,Le({value:t[e],"field-attrs":r.fieldAttrs,depth:r.depth+1,classes:r.classes},v(e)),null,16,["value","field-attrs","depth","classes"])],2))),256))],2))),256))])],2)],2)],2)],2))],2)):(a(),u("div",o1,[s("table",{class:w(r.classes("object","table",r.depth,"table-object"))},[(a(!0),u(Te,null,Ie((n=r.value)?Object.keys(n).map(e=>({key:c(e),val:n[e]})):[],e=>(a(),u("tr",{class:w(r.classes("object","tr",r.depth,""))},[s("th",{class:w(r.classes("object","th",r.depth,"align-top py-2 px-4 text-left text-sm font-medium tracking-wider whitespace-nowrap"))},A(e.key),3),s("td",{class:w(r.classes("object","td",r.depth,"align-top py-2 px-4 text-sm"))},[$e(l,Le({value:e.val,"field-attrs":r.fieldAttrs,depth:r.depth+1,classes:r.classes},v(e.key)),null,16,["value","field-attrs","depth","classes"])],2)],2))),256))],2)]))],2);var n}}}),i1={class:"absolute top-0 right-0 pt-4 pr-4"},r1=s("span",{class:"sr-only"},"Close",-1),u1=s("svg",{class:"h-6 w-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[s("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1),d1=[r1,u1],c1=ue({__name:"CloseButton",props:{buttonClass:{default:"bg-white dark:bg-black"}},emits:["close"],setup(l,{}){return(t,e)=>(a(),u("div",i1,[s("button",{type:"button",onClick:e[0]||(e[0]=e=>t.$emit("close")),class:w([l.buttonClass,"rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black"])},d1,2)]))}}),f1=["id","aria-labelledby"],m1=s("div",{class:"fixed inset-0"},null,-1),v1={class:"fixed inset-0 overflow-hidden"},h1={class:"flex h-full flex-col bg-white dark:bg-black shadow-xl"},g1={class:"flex min-h-0 flex-1 flex-col overflow-auto"},p1={class:"flex-1"},y1={class:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},b1={class:"flex items-start justify-between space-x-3"},w1={class:"space-y-1"},x1=["id"],k1={key:1,class:"text-sm text-gray-500"},$1={class:"flex h-7 items-center"},C1={class:"flex-shrink-0 border-t border-gray-200 dark:border-gray-700 px-4 py-5 sm:px-6"},_1=ue({__name:"SlideOver",props:{id:{default:"SlideOver"},title:null,contentClass:{default:"relative mt-6 flex-1 px-4 sm:px-6"}},emits:["done"],setup(n,{emit:e}){const t=M(!1),o=M(""),l={entering:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-full",to:"translate-x-0"},leaving:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-0",to:"translate-x-full"}},r=(Lt(t,()=>{Ct(l,o,t.value),t.value||setTimeout(()=>e("done"),700)}),t.value=!0,()=>t.value=!1),i=e=>{"Escape"===e.key&&r()};return Xe(()=>window.addEventListener("keydown",i)),Pt(()=>window.removeEventListener("keydown",i)),(e,t)=>{var l=X("CloseButton");return a(),u("div",{id:n.id,class:"relative z-10","aria-labelledby":n.id+"-title",role:"dialog","aria-modal":"true"},[m1,s("div",v1,[s("div",{onMousedown:r,class:"absolute inset-0 overflow-hidden"},[s("div",{onMousedown:t[0]||(t[0]=Ne(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[s("div",{class:w(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",o.value])},[s("div",h1,[s("div",g1,[s("div",p1,[s("div",y1,[s("div",b1,[s("div",w1,[n.title?(a(),u("h2",{key:0,class:"text-lg font-medium text-gray-900 dark:text-gray-50",id:n.id+"-title"},A(n.title),9,x1)):k("",!0),e.$slots.subtitle?(a(),u("p",k1,[Z(e.$slots,"subtitle")])):k("",!0)]),s("div",$1,[$e(l,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:r})])])]),s("div",{class:w(n.contentClass)},[Z(e.$slots,"default")],2)])]),s("div",C1,[Z(e.$slots,"footer")])])],2)],32)],32)])],8,f1)}}}),L1=["id","data-transition-for","aria-labelledby"],V1={class:"fixed inset-0 z-10 overflow-y-auto"},S1={class:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0"},M1=s("span",{class:"sr-only"},"Close",-1),A1=s("svg",{class:"h-6 w-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[s("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1),T1=[M1,A1],F1=ue({__name:"ModalDialog",props:{id:{default:"ModalDialog"},modalClass:{default:Wl.modalClass},sizeClass:{default:Wl.sizeClass}},emits:["done"],setup(n,{emit:e}){const t=M(!1),o=M(""),l={entering:{cls:"ease-out duration-300",from:"opacity-0",to:"opacity-100"},leaving:{cls:"ease-in duration-200",from:"opacity-100",to:"opacity-0"}},r=M(""),i={entering:{cls:"ease-out duration-300",from:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",to:"opacity-100 translate-y-0 sm:scale-100"},leaving:{cls:"ease-in duration-200",from:"opacity-100 translate-y-0 sm:scale-100",to:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"}},d=(Lt(t,()=>{Ct(l,o,t.value),Ct(i,r,t.value),t.value||setTimeout(()=>e("done"),200)}),t.value=!0,()=>t.value=!1),c=(Xt("ModalProvider",{openModal:function(e,t){c.value=e,v.value=t}}),M()),v=M();async function f(e){v.value&&v.value(e),c.value=void 0,v.value=void 0}const p=e=>{"Escape"===e.key&&d()};return Xe(()=>window.addEventListener("keydown",p)),Pt(()=>window.removeEventListener("keydown",p)),(e,t)=>{var l=X("ModalLookup");return a(),u("div",{id:n.id,"data-transition-for":n.id,onMousedown:d,class:"relative z-10","aria-labelledby":n.id+"-title",role:"dialog","aria-modal":"true"},[s("div",{class:w(["fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity",o.value])},null,2),s("div",V1,[s("div",S1,[s("div",{class:w([n.modalClass,n.sizeClass,r.value]),onMousedown:t[0]||(t[0]=Ne(()=>{},["stop"]))},[s("div",null,[s("div",{class:"hidden sm:block absolute top-0 right-0 pt-4 pr-4 z-10"},[s("button",{type:"button",onClick:d,class:"bg-white dark:bg-black rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black"},T1)]),Z(e.$slots,"default")])],34)])]),"ModalLookup"==(null==(t=c.value)?void 0:t.name)&&c.value.ref?(a(),se(l,{key:0,"ref-info":c.value.ref,onDone:f},null,8,["ref-info"])):k("",!0)],40,L1)}}}),I1={class:"pt-2 overflow-auto",style:{"min-height":"620px"}},D1={class:"mt-3 pl-5 flex flex-wrap items-center"},O1={class:"hidden sm:block text-xl leading-6 font-medium text-gray-900 dark:text-gray-50 mr-3"},j1={class:"hidden md:inline"},P1={class:"flex pb-1 sm:pb-0"},B1=["title"],R1=s("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[s("g",{"stroke-width":"1.5",fill:"none"},[s("path",{d:"M9 3H3.6a.6.6 0 0 0-.6.6v16.8a.6.6 0 0 0 .6.6H9M9 3v18M9 3h6M9 21h6m0-18h5.4a.6.6 0 0 1 .6.6v16.8a.6.6 0 0 1-.6.6H15m0-18v18",stroke:"currentColor"})])],-1),H1=[R1],E1=["disabled"],z1=s("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[s("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6l6 6zM6 6h2v12H6z",fill:"currentColor"})],-1),N1=[z1],U1=["disabled"],q1=s("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[s("path",{d:"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z",fill:"currentColor"})],-1),Q1=[q1],K1=["disabled"],Z1=s("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[s("path",{d:"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z",fill:"currentColor"})],-1),G1=[Z1],W1=["disabled"],J1=s("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[s("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6l-6-6zM16 6h2v12h-2z",fill:"currentColor"})],-1),X1=[J1],Y1={key:0,class:"flex pb-1 sm:pb-0"},em={class:"px-4 text-lg text-black dark:text-white"},tm={key:0},lm={key:1},nm=s("span",{class:"hidden xl:inline"}," Showing Results ",-1),sm={key:2},om={key:1,class:"pl-2"},am=s("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24"},[s("path",{fill:"currentColor",d:"M6.78 2.72a.75.75 0 0 1 0 1.06L4.56 6h8.69a7.75 7.75 0 1 1-7.75 7.75a.75.75 0 0 1 1.5 0a6.25 6.25 0 1 0 6.25-6.25H4.56l2.22 2.22a.75.75 0 1 1-1.06 1.06l-3.5-3.5a.75.75 0 0 1 0-1.06l3.5-3.5a.75.75 0 0 1 1.06 0Z"})],-1),im=[am],rm={class:"flex pb-1 sm:pb-0"},um={key:0,class:"pl-2"},dm=s("svg",{class:"flex-none w-5 h-5 mr-2 text-gray-400 dark:text-gray-500 group-hover:text-gray-500","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},[s("path",{"fill-rule":"evenodd",d:"M3 3a1 1 0 011-1h12a1 1 0 011 1v3a1 1 0 01-.293.707L12 11.414V15a1 1 0 01-.293.707l-2 2A1 1 0 018 17v-5.586L3.293 6.707A1 1 0 013 6V3z","clip-rule":"evenodd"})],-1),cm={class:"mr-1"},fm={key:0,class:"h-5 w-5 text-gray-400 dark:text-gray-500 group-hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},mm=s("path",{"fill-rule":"evenodd",d:"M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z","clip-rule":"evenodd"},null,-1),vm=[mm],hm={key:1,class:"h-5 w-5 text-gray-400 dark:text-gray-500 group-hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},gm=s("path",{"fill-rule":"evenodd",d:"M5 10a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1z","clip-rule":"evenodd"},null,-1),pm=[gm],ym={key:1},bm={key:4},wm={key:0},xm={key:0,class:"cursor-pointer flex justify-between items-center hover:text-gray-900 dark:hover:text-gray-50"},km={class:"mr-1 select-none"},$m={key:1,class:"flex justify-between items-center"},Cm={class:"mr-1 select-none"},_m=ue({__name:"ModalLookup",props:{id:{default:"ModalLookup"},refInfo:null,skip:{default:0},prefs:null,selectedColumns:null,allowFiltering:{type:[Boolean,null],default:!0},showPreferences:{type:[Boolean,null],default:!0},showPagingNav:{type:[Boolean,null],default:!0},showPagingInfo:{type:[Boolean,null],default:!0},showResetPreferences:{type:[Boolean,null],default:!0},showFiltersView:{type:[Boolean,null],default:!0},toolbarButtonClass:null,canFilter:null},emits:["done"],setup(c,{emit:l}){const v=c,p=Yl(),e=St()["config"],{metadataApi:t,filterDefinitions:n}=ot(),r=qe("client"),i=e.value.storage,m=f(()=>v.toolbarButtonClass??he.toolbarButtonClass),g=f(()=>n.value),h=M({take:25}),y=M(new We),b=M(v.skip),x=M(!1),C=M(),d=e=>"string"==typeof e?e.split(","):e||[];function L(e,t){return he.getTableRowClass("fullWidth",t,!1,!0)}const V=f(()=>st(v.refInfo.model)),S=f(()=>{var e=(0<(e=d(v.selectedColumns)).length?e:[]).map(e=>e.toLowerCase());const l=Je(V.value);return 0l.find(e=>e.name.toLowerCase()===t)).filter(e=>null!=e):l}),T=f(()=>{let e=S.value.map(e=>e.name),t=d(h.value.selectedColumns).map(e=>e.toLowerCase());return 0t.includes(e.toLowerCase())):e}),I=f(()=>h.value.take??25),$=f(()=>y.value.response?be(y.value.response,"results"):[]),F=f(()=>{var e;return(null==(e=y.value.response)?void 0:e.total)??$.value.length??0}),B=f(()=>00$.value.length>=I.value),_=f(()=>$.value.length>=I.value),E=M([]),q=f(()=>E.value.some(e=>0E.value.map(e=>e.settings.filters.length).reduce((e,t)=>e+t,0)),Q=f(()=>el(V.value)),K=f(()=>{var e;return null==(e=t.value)?void 0:e.operations.find(e=>{var t;return(null==(t=e.dataModel)?void 0:t.name)==v.refInfo.model&&ze.isAnyQuery(e)})}),W=M(),H=M(!1),z=M(),R=()=>v.id+"/ApiPrefs/"+v.refInfo.model,P=e=>`Column/${v.id}:${v.refInfo.model}.`+e;async function N(e){b.value+=e,b.value<0&&(b.value=0);e=Math.floor(F.value/I.value)*I.value;b.value>e&&(b.value=e),await U()}async function G(e,t){l("done",e)}function J(){l("done",null)}function Y(t,e){var l,a=e.target;"TD"!==(null==a?void 0:a.tagName)&&(a=null==(a=null==a?void 0:a.closest("TABLE"))?void 0:a.getBoundingClientRect(),l=E.value.find(e=>e.name.toLowerCase()==t.toLowerCase()))&&a&&(e=("DIV"===(null==(a=e.target)?void 0:a.tagName)?e.target:null==(a=e.target)?void 0:a.closest("DIV")).getBoundingClientRect(),z.value={column:l,topLeft:{x:Math.max(Math.floor(e.x+25),343),y:Math.floor(115)}})}function ee(){z.value=null}async function te(e){var t=null==(t=z.value)?void 0:t.column;t&&(t.settings=e,i.setItem(P(t.name),JSON.stringify(t.settings)),await U()),z.value=null}async function le(e){i.setItem(P(e.name),JSON.stringify(e.settings)),await U()}async function ae(e){H.value=!1,h.value=e,i.setItem(R(),JSON.stringify(e)),await U()}async function U(){(async function(a){var s=K.value;if(s){let e=Gt(s,a),t=Wn(e=>{y.value.response=y.value.error=void 0,x.value=e}),l=await r.api(e);t(),xt(()=>y.value=l);s=be(l.response,"results")||[];l.succeeded&&s.label}else console.error("No Query API was found for "+v.refInfo.model)})(function(){let a={include:"total",take:I.value},e=d(h.value.selectedColumns||v.selectedColumns);{var t;0{l.settings.sort&&s.push(("DESC"===l.settings.sort?"-":"")+l.name),l.settings.filters.forEach(e=>{var t=e.key.replace("%",l.name);a[t]=e.value})}),"u"{e.settings={filters:[]},i.removeItem(P(e.name))}),await U()}return Xe(async()=>{var e=v.prefs||yl(i.getItem(R()));e&&(h.value=e),E.value=S.value.map(e=>({name:e.name,type:e.type,meta:e,settings:Object.assign({filters:[]},yl(i.getItem(P(e.name))))})),isNaN(v.skip)||(b.value=v.skip),await U()}),(l,e)=>{const t=X("ErrorSummary"),n=X("Loading"),r=X("SettingsIcons"),i=X("DataGrid"),d=X("ModalDialog");return a(),u(Te,null,[c.refInfo?(a(),se(d,{key:0,ref_key:"modalDialog",ref:W,id:c.id,onDone:J},{default:ke(()=>[s("div",I1,[s("div",D1,[s("h3",O1,[xe(" Select "),s("span",j1,A(o(Ee)(c.refInfo.model)),1)]),s("div",P1,[c.showPreferences?(a(),u("button",{key:0,type:"button",class:"pl-2 text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400",title:c.refInfo.model+" Preferences",onClick:e[0]||(e[0]=e=>H.value=!H.value)},H1,8,B1)):k("",!0),c.showPagingNav?(a(),u("button",{key:1,type:"button",class:w(["pl-2",o(B)?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"First page",disabled:!o(B),onClick:e[1]||(e[1]=e=>N(-o(F)))},N1,10,E1)):k("",!0),c.showPagingNav?(a(),u("button",{key:2,type:"button",class:w(["pl-2",o(j)?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"Previous page",disabled:!o(j),onClick:e[2]||(e[2]=e=>N(-o(I)))},Q1,10,U1)):k("",!0),c.showPagingNav?(a(),u("button",{key:3,type:"button",class:w(["pl-2",o(O)?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"Next page",disabled:!o(O),onClick:e[3]||(e[3]=e=>N(o(I)))},G1,10,K1)):k("",!0),c.showPagingNav?(a(),u("button",{key:4,type:"button",class:w(["pl-2",o(_)?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"Last page",disabled:!o(_),onClick:e[4]||(e[4]=e=>N(o(F)))},X1,10,W1)):k("",!0)]),c.showPagingInfo?(a(),u("div",Y1,[s("div",em,[x.value?(a(),u("span",tm,"Querying...")):k("",!0),o($).length?(a(),u("span",lm,[nm,xe(" "+A(b.value+1)+" - "+A(Math.min(b.value+o($).length,o(F)))+" ",1),s("span",null," of "+A(o(F)),1)])):y.value.completed?(a(),u("span",sm,"No Results")):k("",!0)])])):k("",!0),o(q)&&c.showResetPreferences?(a(),u("div",om,[s("button",{type:"button",onClick:ne,title:"Reset Preferences & Filters",class:w(o(m))},im,2)])):k("",!0),s("div",rm,[c.showFiltersView&&0C.value="filters"==C.value?null:"filters"),class:w(o(m)),"aria-expanded":"false"},[dm,s("span",cm,A(o(D))+" "+A(1==o(D)?"Filter":"Filters"),1),"filters"!=C.value?(a(),u("svg",fm,vm)):(a(),u("svg",hm,pm))],2)])):k("",!0)])]),"filters"==C.value?(a(),se(Cn,{key:0,class:"border-y border-gray-200 dark:border-gray-800 py-8 my-2",definitions:o(g),columns:E.value,onDone:e[6]||(e[6]=e=>C.value=null),onChange:le},null,8,["definitions","columns"])):k("",!0),z.value?(a(),u("div",ym,[$e($n,{definitions:o(g),column:z.value.column,"top-left":z.value.topLeft,onDone:ee,onSave:te},null,8,["definitions","column","top-left"])])):k("",!0),y.value.error?(a(),se(t,{key:2,status:y.value.error},null,8,["status"])):x.value?(a(),se(n,{key:3})):(a(),u("div",bm,[o($).length?(a(),u("div",wm,[$e(i,{id:c.id,items:o($),type:c.refInfo.model,"selected-columns":o(T),onFiltersChanged:U,tableStyle:"fullWidth",rowClass:L,onRowSelected:G,onHeaderSelected:Y},en({header:ke(({column:t,label:e})=>{return[!c.allowFiltering||v.canFilter&&!v.canFilter(t)?(a(),u("div",$m,[s("span",Cm,A(e),1)])):(a(),u("div",xm,[s("span",km,A(e),1),$e(r,{column:E.value.find(e=>e.name.toLowerCase()===t.toLowerCase()),"is-open":(null==(e=z.value)?void 0:e.column.name)===t},null,8,["column","is-open"])]))]}),_:2},[Ie(Object.keys(o(p)),t=>({name:t,fn:ke(e=>[Z(l.$slots,t,It(gl(e)))])}))]),1032,["id","items","type","selected-columns"])])):k("",!0)]))])]),_:3},8,["id"])):k("",!0),H.value?(a(),se(_n,{key:1,columns:o(S),prefs:h.value,onDone:e[7]||(e[7]=e=>H.value=!1),onSave:ae},null,8,["columns","prefs"])):k("",!0)],64)}}}),Lm={class:"sm:hidden"},Vm=["for"],Sm=["id","name"],Mm=["value"],Am={class:"hidden sm:block"},Tm={class:"border-b border-gray-200"},Fm={class:"-mb-px flex","aria-label":"Tabs"},Im=["onClick"],Dm=ue({__name:"Tabs",props:{tabs:null,id:{default:"tabs"},param:{default:"tab"},label:{type:Function,default:e=>Ee(e)},selected:null,tabClass:null,bodyClass:{default:"p-4"},url:{type:Boolean,default:!0}},setup(l){const t=l,n=f(()=>Object.keys(t.tabs)),r=e=>t.label?t.label(e):Ee(e),i=f(()=>t.id||"tabs"),d=f(()=>t.param||"tab"),c=M();function v(e){c.value=e,t.url&&ln({tab:e===n.value[0]?void 0:e})}const p=f(()=>100/Object.keys(t.tabs).length+"%");return Xe(()=>{var e;c.value=t.selected||Object.keys(t.tabs)[0],t.url&&(e=location.search||(location.hash.includes("?")?"?"+dl(location.hash,"?"):""),e=El(e)[d.value])&&(c.value=e)}),(e,t)=>(a(),u("div",null,[s("div",Lm,[s("label",{for:o(i),class:"sr-only"},"Select a tab",8,Vm),s("select",{id:o(i),name:o(i),class:"block w-full rounded-md border-gray-300 focus:border-indigo-500 focus:ring-indigo-500",onChange:t[0]||(t[0]=e=>{return v(null==(e=e.target)?void 0:e.value)})},[(a(!0),u(Te,null,Ie(o(n),e=>(a(),u("option",{key:e,value:e},A(r(e)),9,Mm))),128))],40,Sm)]),s("div",Am,[s("div",Tm,[s("nav",Fm,[(a(!0),u(Te,null,Ie(o(n),t=>{return a(),u("a",{href:"#",onClick:Ne(e=>v(t),["prevent"]),style:Jl({width:o(p)}),class:w([(e=t,c.value===e?"border-indigo-500 text-indigo-600 py-4 px-1 text-center border-b-2 font-medium text-sm":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 py-4 px-1 text-center border-b-2 font-medium text-sm"),l.tabClass])},A(r(t)),15,Im);var e}),256))])])]),s("div",{class:w(l.bodyClass)},[(a(),se(Kn(l.tabs[c.value])))],2)]))}}),Om=s("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4 text-gray-400",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 32 32"},[s("path",{fill:"currentColor",d:"M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3Z"})],-1),jm=[Om],Pm=s("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4 text-indigo-600",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 32 32"},[s("path",{fill:"currentColor",d:"M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6ZM5.394 6.813L6.81 5.399l3.505 3.506L8.9 10.319zM2 15.005h5v2H2zm3.394 10.193L8.9 21.692l1.414 1.414l-3.505 3.506zM15 25.005h2v5h-2zm6.687-1.9l1.414-1.414l3.506 3.506l-1.414 1.414zm3.313-8.1h5v2h-5zm-3.313-6.101l3.506-3.506l1.414 1.414l-3.506 3.506zM15 2.005h2v5h-2z"})],-1),Bm=[Pm],Rm=ue({__name:"DarkModeToggle",setup(e){const l=typeof document<"u"?document.querySelector("html"):null;let n=M(null==l?void 0:l.classList.contains("dark"));return(e,t)=>(a(),u("button",{type:"button",class:"bg-gray-200 dark:bg-gray-700 relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black",role:"switch","aria-checked":"false",onClick:t[0]||(t[0]=e=>{n.value?null!=l&&l.classList.remove("dark"):null!=l&&l.classList.add("dark"),n.value=!n.value,localStorage.setItem("color-scheme",n.value?"dark":"light")})},[s("span",{class:w(`${o(n)?"translate-x-0":"translate-x-5"} pointer-events-none relative inline-block h-5 w-5 rounded-full bg-white dark:bg-black shadow transform ring-0 transition ease-in-out duration-200`)},[s("span",{class:w(`${o(n)?"opacity-100 ease-in duration-200":"opacity-0 ease-out duration-100"} absolute inset-0 h-full w-full flex items-center justify-center transition-opacity`),"aria-hidden":"true"},jm,2),s("span",{class:w(`${o(n)?"opacity-0 ease-out duration-100":"opacity-100 ease-in duration-200"} absolute inset-0 h-full w-full flex items-center justify-center transition-opacity`),"aria-hidden":"true"},Bm,2)],2)]))}}),Hm={key:0},Em={key:1,class:"min-h-full flex flex-col justify-center py-12 sm:px-6 lg:px-8"},zm={class:"sm:mx-auto sm:w-full sm:max-w-md"},Nm={class:"mt-6 text-center text-3xl font-extrabold text-gray-900"},Um={key:0,class:"mt-4 text-center text-sm text-gray-600"},qm={class:"relative z-0 inline-flex shadow-sm rounded-md"},Qm=["onClick"],Km={class:"mt-8 sm:mx-auto sm:w-full sm:max-w-md"},Zm={class:"bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10"},Gm=["onSubmit"],Wm={class:"mt-8"},Jm={key:1,class:"mt-6"},Xm=wl('
Or continue with
',1),Ym={class:"mt-6 grid grid-cols-3 gap-3"},ev=["href","title"],tv={key:1,class:"h-5 w-5 text-gray-700",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},lv=s("path",{d:"M16 8a5 5 0 1 0 5 5a5 5 0 0 0-5-5z",fill:"currentColor"},null,-1),nv=s("path",{d:"M16 2a14 14 0 1 0 14 14A14.016 14.016 0 0 0 16 2zm7.992 22.926A5.002 5.002 0 0 0 19 20h-6a5.002 5.002 0 0 0-4.992 4.926a12 12 0 1 1 15.985 0z",fill:"currentColor"},null,-1),sv=[lv,nv],ov=ue({__name:"SignIn",props:{provider:null,title:{default:"Sign In"},tabs:{type:[Boolean,String],default:!0},oauth:{type:[Boolean,String],default:!0}},emits:["login"],setup(c,{emit:t}){const l=c,{getMetadata:e,createDto:n}=ot(),r=Tl(),i=kn()["signIn"],d=e({assert:!0}),v=d.plugins.auth,p=document.baseURI,m=d.app.baseUrl,g=M(n("Authenticate")),h=M(new We),y=M(l.provider),b=(Xe(()=>{null!=v&&v.authProviders.map(e=>e.formLayout).filter(e=>e).forEach(e=>e.forEach(e=>g.value[e.id]=""))}),f(()=>(null==v?void 0:v.authProviders.filter(e=>e.formLayout))||[])),x=f(()=>b.value[0]||{}),C=f(()=>b.value[Math.max(b.value.length-1,0)]||{}),L=f(()=>(y.value?null==v?void 0:v.authProviders.find(e=>e.name===y.value):null)??x.value),V=e=>!1===e||"false"===e;function S(e){return e.label||e.navItem&&e.navItem.label}const T=f(()=>{var e;return((null==(e=L.value)?void 0:e.formLayout)||[]).map(e=>{var t;return Object.assign({},e,{type:null==(t=e.type)?void 0:t.toLowerCase(),autocomplete:e.autocomplete||("password"===(null==(t=e.type)?void 0:t.toLowerCase())?"current-password":void 0)||("username"===e.id.toLowerCase()?"username":void 0),css:Object.assign({field:"col-span-12"},e.css)})})}),I=f(()=>!V(l.oauth)&&(null==v?void 0:v.authProviders.filter(e=>"oauth"===e.type))||[]),$=f(()=>{let e=xo(null==v?void 0:v.authProviders.filter(e=>e.formLayout&&0{e[S(t)||nt(t.name)]=t.name===x.value.name?"":t.name});var t=L.value;return e=t&&V(l.tabs)?{[S(t)||nt(t.name)]:t}:e}),F=f(()=>{var e=T.value.map(e=>e.id).filter(e=>e);return h.value.summaryMessage(e)});async function B(){var e;g.value.provider=L.value.name,h.value=await r.api(g.value),h.value.succeeded&&(e=h.value.response,i(e),t("login",e),h.value=new We,g.value=n("Authenticate"))}return(e,t)=>{const l=X("ErrorSummary"),n=X("AutoFormFields"),r=X("PrimaryButton"),i=X("Icon"),d=oo("href");return o(v)?(a(),u("div",Em,[s("div",zm,[s("h2",Nm,A(c.title),1),1kt((a(),u("a",{onClick:e=>y.value=t,class:w([""===t||t===o(x).name?"rounded-l-md":t===o(C).name?"rounded-r-md -ml-px":"-ml-px",y.value===t?"z-10 outline-none ring-1 ring-indigo-500 border-indigo-500":"","cursor-pointer relative inline-flex items-center px-4 py-1 border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50"])},[xe(A(e),1)],10,Qm)),[[d,{provider:t}]])),256))])])):k("",!0)]),s("div",Km,[o(F)?(a(),se(l,{key:0,class:"mb-3",errorSummary:o(F)},null,8,["errorSummary"])):k("",!0),s("div",Zm,[o(T).length?(a(),u("form",{key:0,onSubmit:Ne(B,["prevent"])},[$e(n,{modelValue:g.value,formLayout:o(T),api:h.value,hideSummary:!0,"divide-class":"","space-class":"space-y-6"},null,8,["modelValue","formLayout","api"]),s("div",Wm,[$e(r,{class:"w-full"},{default:ke(()=>[xe("Sign In")]),_:1})])],40,Gm)):k("",!0),o(I).length?(a(),u("div",Jm,[Xm,s("div",Ym,[(a(!0),u(Te,null,Ie(o(I),e=>(a(),u("div",null,[s("a",{href:o(m)+e.navItem.href+"?continue="+o(p),title:S(e),class:"w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"},[e.icon?(a(),se(i,{key:0,image:e.icon,class:"h-5 w-5 text-gray-700"},null,8,["image"])):(a(),u("svg",tv,sv))],8,ev)]))),256))])])):k("",!0)])])])):(a(),u("div",Hm,"No Auth Plugin"))}}}),av=["for"],iv={key:1,class:"border border-gray-200 flex justify-between"},rv={class:"p-2 flex flex-wrap gap-x-4"},uv=s("title",null,"Bold text (CTRL+B)",-1),dv=s("path",{fill:"currentColor",d:"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79c0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79c0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z"},null,-1),cv=[uv,dv],fv=s("title",null,"Italics (CTRL+I)",-1),mv=s("path",{fill:"currentColor",d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4h-8z"},null,-1),vv=[fv,mv],hv=s("title",null,"Insert Link (CTRL+K)",-1),gv=s("path",{fill:"currentColor",d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7a5 5 0 0 0-5 5a5 5 0 0 0 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8v2m9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1c0 1.71-1.39 3.1-3.1 3.1h-4V17h4a5 5 0 0 0 5-5a5 5 0 0 0-5-5Z"},null,-1),pv=[hv,gv],yv=s("title",null,"Blockquote (CTRL+Q)",-1),bv=s("path",{fill:"currentColor",d:"m15 17l2-4h-4V6h7v7l-2 4h-3Zm-9 0l2-4H4V6h7v7l-2 4H6Z"},null,-1),wv=[yv,bv],xv=s("title",null,"Insert Image (CTRL+SHIFT+L)",-1),kv=s("path",{fill:"currentColor",d:"M2.992 21A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992ZM20 15V5H4v14L14 9l6 6Zm0 2.828l-6-6L6.828 19H20v-1.172ZM8 11a2 2 0 1 1 0-4a2 2 0 0 1 0 4Z"},null,-1),$v=[xv,kv],Cv=s("title",null,"Insert Code (CTRL+<)",-1),_v=s("path",{fill:"currentColor",d:"m8 18l-6-6l6-6l1.425 1.425l-4.6 4.6L9.4 16.6L8 18Zm8 0l-1.425-1.425l4.6-4.6L14.6 7.4L16 6l6 6l-6 6Z"},null,-1),Lv=[Cv,_v],Vv=s("title",null,"H2 Heading (CTRL+H)",-1),Sv=s("path",{fill:"currentColor",d:"M7 20V7H2V4h13v3h-5v13H7Zm9 0v-8h-3V9h9v3h-3v8h-3Z"},null,-1),Mv=[Vv,Sv],Av=s("title",null,"Numbered List (ALT+1)",-1),Tv=s("path",{fill:"currentColor",d:"M3 22v-1.5h2.5v-.75H4v-1.5h1.5v-.75H3V16h3q.425 0 .713.288T7 17v1q0 .425-.288.713T6 19q.425 0 .713.288T7 20v1q0 .425-.288.713T6 22H3Zm0-7v-2.75q0-.425.288-.713T4 11.25h1.5v-.75H3V9h3q.425 0 .713.288T7 10v1.75q0 .425-.288.713T6 12.75H4.5v.75H7V15H3Zm1.5-7V3.5H3V2h3v6H4.5ZM9 19v-2h12v2H9Zm0-6v-2h12v2H9Zm0-6V5h12v2H9Z"},null,-1),Fv=[Av,Tv],Iv=s("title",null,"Bulleted List (ALT+-)",-1),Dv=s("path",{fill:"currentColor",d:"M9 19v-2h12v2H9Zm0-6v-2h12v2H9Zm0-6V5h12v2H9ZM5 20q-.825 0-1.413-.588T3 18q0-.825.588-1.413T5 16q.825 0 1.413.588T7 18q0 .825-.588 1.413T5 20Zm0-6q-.825 0-1.413-.588T3 12q0-.825.588-1.413T5 10q.825 0 1.413.588T7 12q0 .825-.588 1.413T5 14Zm0-6q-.825 0-1.413-.588T3 6q0-.825.588-1.413T5 4q.825 0 1.413.588T7 6q0 .825-.588 1.413T5 8Z"},null,-1),Ov=[Iv,Dv],jv=s("title",null,"Strike Through (ALT+S)",-1),Pv=s("path",{fill:"currentColor",d:"M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z"},null,-1),Bv=[jv,Pv],Rv=s("title",null,"Undo (CTRL+Z)",-1),Hv=s("path",{fill:"currentColor",d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88c3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"},null,-1),Ev=[Rv,Hv],zv=s("title",null,"Redo (CTRL+SHIFT+Z)",-1),Nv=s("path",{fill:"currentColor",d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 0 1 7.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"},null,-1),Uv=[zv,Nv],qv={key:0,class:"p-2 flex flex-wrap gap-x-4"},Qv=["href"],Kv=s("path",{fill:"currentColor",d:"M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5c0-2.21-1.79-4-4-4z"},null,-1),Zv=[Kv],Gv={class:""},Wv=["name","id","label","value","rows","disabled","onKeydown"],Jv=["id"],Xv=["id"],Yv=ue({__name:"MarkdownInput",props:{status:null,id:null,inputClass:null,label:null,labelClass:null,help:null,placeholder:null,modelValue:null,counter:{type:Boolean},rows:null,errorMessages:null,lang:null,autoFocus:{type:Boolean},disabled:{type:Boolean},helpUrl:{default:"https://guides.github.com/features/mastering-markdown/"},hide:null},emits:["update:modelValue","close"],setup(n,{expose:e,emit:l}){const r=n;let g=[],h=[],t=qe("ApiState",void 0);const i=f(()=>ft.call({responseStatus:r.status??(null==t?void 0:t.error.value)},r.id)),d=f(()=>r.label??Ee(nt(r.id))),c="bold,italics,link,image,blockquote,code,heading,orderedList,unorderedList,strikethrough,undo,redo,help".split(","),v=f(()=>r.hide?bt(c,r.hide):bt(c,[]));function p(e){return v.value[e]}const m=f(()=>["shadow-sm font-mono"+lt.base.replace("rounded-md",""),i.value?"text-red-900 focus:ring-red-500 focus:border-red-500 border-red-300":"text-gray-900 "+lt.valid,r.inputClass]),y="w-5 h-5 cursor-pointer select-none text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400",b=M();function x(e){l("update:modelValue",e)}function C(){return b.value.selectionStart!==b.value.selectionEnd}function L(){var e=b.value;return e.value.substring(e.selectionStart,e.selectionEnd)||""}function V(){var e=b.value,t=e.value,l=e.selectionStart,e=t.substring(l,e.selectionEnd)||"",a=t.substring(0,l),s=a.lastIndexOf(` -`);return{value:t,sel:e,selPos:l,beforeSel:a,afterSel:t.substring(l),prevCRPos:s,beforeCR:0<=s?a.substring(0,s+1):"",afterCR:0<=s?a.substring(s+1):""}}function S({value:e,selectionStart:t,selectionEnd:l}){null==l&&(l=t),x(e),xt(()=>{b.value.focus(),b.value.setSelectionRange(t,l)})}function T(e,t,l="",{selectionAtEnd:a,offsetStart:s,offsetEnd:n,filterValue:o,filterSelection:r}={}){const i=b.value;let u=i.value,d=i.selectionEnd;g.push({value:u,selectionStart:i.selectionStart,selectionEnd:i.selectionEnd}),h=[];var c=i.selectionStart,v=i.selectionEnd,f=u.substring(0,c),p=u.substring(v),m=e&&f.endsWith(e)&&p.startsWith(t);c==v?(m?(u=f.substring(0,f.length-e.length)+p.substring(t.length),d+=-t.length):(u=f+e+l+t+p,d+=e.length,s=0,n=(null==l?void 0:l.length)||0,a&&(d+=n,n=0)),o&&(l={pos:d},u=o(u,l),d=l.pos)):(a=u.substring(c,v),r&&(a=r(a)),m?(u=f.substring(0,f.length-e.length)+a+p.substring(t.length),s=-a.length-e.length,n=a.length):(u=f+e+a+t+p,s?d+=(e+t).length:(d=c,s=e.length,n=a.length))),x(u),xt(()=>{i.focus(),s=d+(s||0),n=(s||0)+(n||0),i.setSelectionRange(s,n)})}e({props:r,textarea:b,updateModelValue:x,selection:L,hasSelection:C,selectionInfo:V,insert:T,replace:S});const I=()=>T("**","**","bold"),$=()=>T("_","_","italics"),F=()=>T("~~","~~","strikethrough"),B=()=>T("[","](https://)","",{offsetStart:-9,offsetEnd:8}),j=()=>T(` +var ho=Object.defineProperty,go=(e,l,t)=>l in e?ho(e,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[l]=t,Le=(e,l,t)=>(go(e,"symbol"!=typeof l?l+"":l,t),t);import{defineComponent as de,computed as v,openBlock as o,createElementBlock as i,normalizeClass as y,createElementVNode as l,createCommentVNode as x,renderSlot as U,ref as O,toDisplayString as F,inject as Qe,nextTick as St,isRef as nn,unref as X,mergeProps as Te,withModifiers as Ue,h as $t,resolveComponent as Z,createBlock as ae,withCtx as xe,useAttrs as yo,createVNode as ye,createTextVNode as ke,watchEffect as ws,normalizeStyle as nl,Fragment as Me,renderList as je,withDirectives as Mt,vModelCheckbox as ol,withKeys as on,createStaticVNode as xs,vModelSelect as bo,useSlots as al,getCurrentInstance as Be,onMounted as Ye,createSlots as rl,normalizeProps as Rt,guardReactiveProps as ks,vModelDynamic as wo,onUnmounted as Ft,watch as bt,vModelText as ko,resolveDynamicComponent as an,provide as ss,resolveDirective as _o}from"vue";import{errorResponseExcept as $o,toDate as pt,toTime as Co,omit as ft,enc as Ks,appendQueryString as Et,lastLeftPart as rn,setQueryString as xo,nameOf as Lo,ApiResult as Xe,lastRightPart as At,leftPart as Ls,map as Ze,toDateTime as Vo,toCamelCase as So,mapGet as _e,chop as Mo,fromXsdDuration as un,isDate as Vs,timeFmt12 as Ao,dateFmt as To,apiValue as Fo,indexOfAny as Io,createBus as jo,toKebabCase as Wl,sanitize as Oo,humanize as Pe,delaySet as dn,rightPart as ms,queryString as Zs,combinePaths as Do,toPascalCase as at,errorResponse as mt,trimEnd as Po,$1 as _s,ResponseStatus as Us,ResponseError as Gl,HttpMethods as il,omitEmpty as Bo,uniqueKeys as Ws,humanify as cn,each as Ho}from"@servicestack/client";let Ro={class:"flex items-center"},Eo={key:0,class:"flex-shrink-0 mr-3"},zo={key:0,class:"h-5 w-5 text-yellow-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},No=l("path",{"fill-rule":"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"},null,-1),Uo=[No],qo={key:1,class:"h-5 w-5 text-red-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},Qo=l("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z","clip-rule":"evenodd"},null,-1),Ko=[Qo],Zo={key:2,class:"h-5 w-5 text-blue-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},Wo=l("path",{"fill-rule":"evenodd",d:"M19 10.5a8.5 8.5 0 11-17 0 8.5 8.5 0 0117 0zM8.25 9.75A.75.75 0 019 9h.253a1.75 1.75 0 011.709 2.13l-.46 2.066a.25.25 0 00.245.304H11a.75.75 0 010 1.5h-.253a1.75 1.75 0 01-1.709-2.13l.46-2.066a.25.25 0 00-.245-.304H9a.75.75 0 01-.75-.75zM10 7a1 1 0 100-2 1 1 0 000 2z","clip-rule":"evenodd"},null,-1),Go=[Wo],Jo={key:3,class:"h-5 w-5 text-green-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},Xo=l("path",{"fill-rule":"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z","clip-rule":"evenodd"},null,-1),Yo=[Xo],ea=de({__name:"Alert",props:{type:{default:"warn"},hideIcon:{type:Boolean}},setup(e){let t=e,a=v(()=>"info"==t.type?"bg-blue-50 dark:bg-blue-200":"error"==t.type?"bg-red-50 dark:bg-red-200":"success"==t.type?"bg-green-50 dark:bg-green-200":"bg-yellow-50 dark:bg-yellow-200"),n=v(()=>"info"==t.type?"border-blue-400":"error"==t.type?"border-red-400":"success"==t.type?"border-green-400":"border-yellow-400"),r=v(()=>"info"==t.type?"text-blue-700":"error"==t.type?"text-red-700":"success"==t.type?"text-green-700":"text-yellow-700");return(e,t)=>(o(),i("div",{class:y([a.value,n.value,"border-l-4 p-4"])},[l("div",Ro,[e.hideIcon?x("",!0):(o(),i("div",Eo,["warn"==e.type?(o(),i("svg",zo,Uo)):"error"==e.type?(o(),i("svg",qo,Ko)):"info"==e.type?(o(),i("svg",Zo,Go)):"success"==e.type?(o(),i("svg",Jo,Yo)):x("",!0)])),l("div",null,[l("p",{class:y([r.value,"text-sm"])},[U(e.$slots,"default")],2)])])],2))}}),ta={key:0,class:"rounded-md bg-green-50 dark:bg-green-200 p-4",role:"alert"},sa={class:"flex"},la=l("div",{class:"flex-shrink-0"},[l("svg",{class:"h-5 w-5 text-green-400 dark:text-green-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"})])],-1),na={class:"ml-3"},oa={class:"text-sm font-medium text-green-800"},aa={key:0},ra={class:"ml-auto pl-3"},ia={class:"-mx-1.5 -my-1.5"},ua=l("span",{class:"sr-only"},"Dismiss",-1),da=l("svg",{class:"h-5 w-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[l("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z"})],-1),ca=[ua,da],fa=de({__name:"AlertSuccess",props:{message:{}},setup(e){let a=O(!1);return(e,t)=>a.value?x("",!0):(o(),i("div",ta,[l("div",sa,[la,l("div",na,[l("h3",oa,[e.message?(o(),i("span",aa,F(e.message),1)):U(e.$slots,"default",{key:1})])]),l("div",ra,[l("div",ia,[l("button",{type:"button",class:"inline-flex rounded-md bg-green-50 dark:bg-green-200 p-1.5 text-green-500 dark:text-green-600 hover:bg-green-100 dark:hover:bg-green-700 dark:hover:text-white focus:outline-none focus:ring-2 focus:ring-green-600 focus:ring-offset-2 focus:ring-offset-green-50 dark:ring-offset-green-200",onClick:t[0]||(t[0]=e=>a.value=!0)},ca)])])])]))}}),va={class:"flex"},pa=l("div",{class:"flex-shrink-0"},[l("svg",{class:"h-5 w-5 text-red-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{fill:"currentColor",d:"M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12S6.47 2 12 2m3.59 5L12 10.59L8.41 7L7 8.41L10.59 12L7 15.59L8.41 17L12 13.41L15.59 17L17 15.59L13.41 12L17 8.41L15.59 7Z"})])],-1),ma={class:"ml-3"},ha={class:"text-sm text-red-700 dark:text-red-200"},ga=de({__name:"ErrorSummary",props:{status:{},except:{},class:{}},setup(e){let t=e,a=Qe("ApiState",void 0),n=v(()=>t.status||null!=a&&a.error.value?$o.call({responseStatus:t.status??(null==a?void 0:a.error.value)},t.except??[]):null);return(e,t)=>n.value?(o(),i("div",{key:0,class:y("bg-red-50 dark:bg-red-900 border-l-4 border-red-400 p-4 "+e.$props.class)},[l("div",va,[pa,l("div",ma,[l("p",ha,F(n.value),1)])])],2)):x("",!0)}}),ya=["id","aria-describedby"],ba=de({__name:"InputDescription",props:{id:{},description:{}},setup(e){return(e,t)=>e.description?(o(),i("div",{key:"description",class:"mt-2 text-sm text-gray-500",id:e.id+"-description","aria-describedby":e.id+"-description"},[l("div",null,F(e.description),1)],8,ya)):x("",!0)}});function Ss(e){var l;return null==e||"object"==typeof e||null==(l=pt(e))||"Invalid Date"==l.toString()?"":l.toISOString().substring(0,10)??""}function fn(e){var l;return null==e||"object"==typeof e||null==(l=pt(e))||"Invalid Date"==l.toString()?"":l.toISOString().substring(0,19)??""}function vn(e){return null==e?"":Co(e)}function pn(e,l){var t,a;return G.config.inputValue?G.config.inputValue(e,l):(t=typeof(a="date"===e?Ss(l):"datetime-local"===e?fn(l):"time"===e?vn(l):l),null==a?"":"boolean"==t||"number"==t?""+a:a)}function mn(e,l){e.value=null,St(()=>e.value=l)}function Dt(t){return Object.keys(t).forEach(e=>{var l=t[e];t[e]=nn(l)?X(l):l}),t}function yt(e,l,t){t?(l.value=e.entering.cls+" "+e.entering.from,setTimeout(()=>l.value=e.entering.cls+" "+e.entering.to,0)):(l.value=e.leaving.cls+" "+e.leaving.from,setTimeout(()=>l.value=e.leaving.cls+" "+e.leaving.to,0))}function hs(t){if(!("u"0":"<"+e+Gs(t)+`>${l||""}`}function Gs(t){return Object.keys(t).reduce((e,l)=>`${e} ${l}="${Ks(t[l])}"`,"")}function Ms(e){return Object.assign({target:"_blank",rel:"noopener",class:"text-blue-600"},e)}function Ht(e){return Vl(e)}let wa=["string","number","boolean","null","undefined"];function Tt(e){return 0<=wa.indexOf(typeof e)||e instanceof Date}function Xt(e){return!Tt(e)}class hn{get length(){return"u"",";"].some(e=>l.includes(e)))throw new Error(`Unsafe script: '${l}'`);var t=Object.assign(Object.keys(globalThis).reduce((e,l)=>(e[l]=void 0,e),{}),e);return new Function("with(this) { return ("+l+") }").call(t)}function Js(e){typeof navigator<"u"&&navigator.clipboard.writeText(e)}function cl(e){var l=G.config.storage.getItem(e);return l?JSON.parse(l):null}function As(e,l){return Et("swr."+Lo(e),l?Object.assign({},e,l):e)}function ka(e){var l;e.request&&(l=As(e.request,e.args),G.config.storage.removeItem(l))}async function gn(e,l,t,a,n){var r,s=As(l,a),o=(t(new Xe({response:cl(s)})),await e.api(l,a,n));return o.succeeded&&o.response&&(o.response._date=(new Date).valueOf(),r=JSON.stringify(o.response),G.config.storage.setItem(s,r),t(o)),o}function yn(l,t){let a=null;return(...e)=>{a&&clearTimeout(a),a=setTimeout(()=>{l(...e)},t||100)}}function Ct(e){return"string"==typeof e?e.split(","):e||[]}function Vt(e,l){let t=Ct(l);return e.reduce((e,l)=>(e[l]=!t.includes(l),e),{})}function bn(){return{LocalStore:hn,dateInputFormat:Ss,dateTimeInputFormat:fn,timeInputFormat:vn,textInputValue:pn,setRef:mn,unRefs:Dt,transition:yt,focusNextElement:hs,getTypeName:qt,htmlTag:dt,htmlAttrs:Gs,linkAttrs:Ms,toAppUrl:Ht,isPrimitive:Tt,isComplexType:Xt,pushState:ul,scopedExpr:dl,copyText:Js,fromCache:cl,swrCacheKey:As,swrClear:ka,swrApi:gn,asStrings:Ct,asOptions:Vt,createDebounce:yn}}let wn="png,jpg,jpeg,jfif,gif,svg,webp".split(","),kn={img:"png,jpg,jpeg,gif,svg,webp,png,jpg,jpeg,gif,bmp,tif,tiff,webp,ai,psd,ps".split(","),vid:"avi,m4v,mov,mp4,mpg,mpeg,wmv,webm".split(","),aud:"mp3,mpa,ogg,wav,wma,mid,webm".split(","),ppt:"key,odp,pps,ppt,pptx".split(","),xls:"xls,xlsm,xlsx,ods,csv,tsv".split(","),doc:"doc,docx,pdf,rtf,tex,txt,md,rst,xls,xlsm,xlsx,ods,key,odp,pps,ppt,pptx".split(","),zip:"zip,tar,gz,7z,rar,gzip,deflate,br,iso,dmg,z,lz,lz4,lzh,s7z,apl,arg,jar,war".split(","),exe:"exe,bat,sh,cmd,com,app,msi,run,vb,vbs,js,ws,wsh".split(","),att:"bin,oct,dat".split(",")},Jl=Object.keys(kn),vt=(e,l)=>``,gs={img:vt("4 4 16 16",""),vid:vt("0 0 24 24",""),aud:vt("0 0 24 24",""),ppt:vt("0 0 48 48",""),xls:vt("0 0 256 256",""),doc:vt("0 0 32 32",""),zip:vt("0 0 16 16",""),exe:vt("0 0 16 16",""),att:vt("0 0 24 24","")},_a=/[\r\n%#()<>?[\\\]^`{|}]/g,Xl=1024,$a=["Bytes","KB","MB","GB","TB"],Ca=(()=>{let l="application/",e=l+"vnd.openxmlformats-officedocument.",t="image/",a="text/",n="video/",r={jpg:t+"jpeg",tif:t+"tiff",svg:t+"svg+xml",ico:t+"x-icon",ts:a+"typescript",py:a+"x-python",sh:a+"x-sh",mp3:"audio/mpeg3",mpg:n+"mpeg",ogv:n+"ogg",xlsx:e+"spreadsheetml.sheet",xltx:e+"spreadsheetml.template",docx:e+"wordprocessingml.document",dotx:e+"wordprocessingml.template",pptx:e+"presentationml.presentation",potx:e+"presentationml.template",ppsx:e+"presentationml.slideshow",mdb:l+"vnd.ms-access"};function s(e,l){e.split(",").forEach(e=>r[e]=l)}function o(e,l){e.split(",").forEach(e=>r[e]=l(e))}return o("jpeg,gif,png,tiff,bmp,webp",e=>t+e),o("jsx,csv,css",e=>a+e),o("aac,ac3,aiff,m4a,m4b,m4p,mid,midi,wav",e=>"audio/"+e),o("3gpp,avi,dv,divx,ogg,mp4,webm",e=>n+e),o("rtf,pdf",e=>l+e),s("htm,html,shtm",a+"html"),s("js,mjs,cjs",a+"javascript"),s("yml,yaml",l+"yaml"),s("bat,cmd",l+"bat"),s("xml,csproj,fsproj,vbproj",a+"xml"),s("txt,ps1",a+"plain"),s("qt,mov",n+"quicktime"),s("doc,dot",l+"msword"),s("xls,xlt,xla",l+"excel"),s("ppt,oit,pps,ppa",l+"vnd.ms-powerpoint"),s("cer,crt,der",l+"x-x509-ca-cert"),s("gz,tgz,zip,rar,lzh,z",l+"x-compressed"),s("aaf,aca,asd,bin,cab,chm,class,cur,db,dat,deploy,dll,dsp,exe,fla,ics,inf,mix,msi,mso,obj,ocx,prm,prx,psd,psp,qxd,sea,snp,so,sqlite,toc,ttf,u32,xmp,xsn,xtp",l+"octet-stream"),r})(),Xs=[];function _n(e){return(e=(e=(e=e.replace(/"/g,"'")).replace(/>\s+<")).replace(/\s{2,}/g," ")).replace(_a,encodeURIComponent)}function fl(e){return"data:image/svg+xml;utf8,"+_n(e)}function $n(e){var l=URL.createObjectURL(e);return Xs.push(l),l}function Cn(){Xs.forEach(e=>{try{URL.revokeObjectURL(e)}catch(e){console.error("URL.revokeObjectURL",e)}}),Xs=[]}function vl(e){var l;return e?(l=Ls(e,"?"),At(l,"/")):null}function ls(e){var l=vl(e);return null==l||-1===l.indexOf(".")?null:At(l,".").toLowerCase()}function pl(e){var l=ls(e.name);return l&&0<=wn.indexOf(l)?$n(e):xt(e.name)}function ml(e){var l;return e&&(!(!e.startsWith("blob:")&&!e.startsWith("data:"))||(l=ls(e))&&0<=wn.indexOf(l))||!1}function xt(e){var l;return e?null==(l=ls(e))||ml(e)?e:Jt(l)||fl(gs.doc):null}function Jt(e){var l=xn(e);return l&&fl(l)||null}function xn(e){if(gs[e])return gs[e];for(let t=0;t({fileName:e.name,contentLength:e.size,filePath:pl(e)}))}function Ts(e,l){e.onerror=null,e.src=gl(e.src,l)||""}function gl(e,l){return Jt(At(e,".").toLowerCase())||(l?Jt(l)||l:null)||Jt("doc")}function Ys(e){var l;if(e)return l=At(e,".").toLowerCase(),Ca[l]||"application/"+l;throw new Error("fileNameOrExt required")}function La(){return{extSvg:xn,extSrc:Jt,getExt:ls,encodeSvg:_n,canPreview:ml,getFileName:vl,getMimeType:Ys,formatBytes:hl,filePathUri:xt,svgToDataUri:fl,fileImageUri:pl,objectUrl:$n,flush:Cn,inputFiles:xa,iconOnError:Ts,iconFallbackSrc:gl}}class Va{constructor(e){Le(this,"view"),Le(this,"includeTypes"),Object.assign(this,e)}getTypeName(){return"MetadataApp"}getMethod(){return"GET"}createResponse(){return{}}}let zt="/metadata/app.json",Sa={Boolean:"checkbox",DateTime:"date",DateOnly:"date",DateTimeOffset:"date",TimeSpan:"time",TimeOnly:"time",Byte:"number",Short:"number",Int64:"number",Int32:"number",UInt16:"number",UInt32:"number",UInt64:"number",Single:"number",Double:"number",Decimal:"number",String:"text",Guid:"text",Uri:"text"},Ma={number:"Int32",checkbox:"Boolean",date:"DateTime","datetime-local":"DateTime",time:"TimeSpan"},el={Byte:"byte",Int16:"short",Int32:"int",Int64:"long",UInt16:"ushort",Unt32:"uint",UInt64:"ulong",Single:"float",Double:"double",Decimal:"decimal"},Aa=([...Object.keys(el),...Object.values(el)],{String:"string",Boolean:"bool",...el});function fs(e){return Aa[e]||e}function Ln(e,l){return e?(l=l||[],"Nullable`1"===e?fs(l[0])+"?":e.endsWith("[]")?`List<${fs(e.substring(0,e.length-2))}>`:0===l.length?fs(e):Ls(fs(e),"`")+"<"+l.join(",")+">"):""}function Ta(e){return e&&Ln(e.name,e.genericArgs)}class Nt{constructor(){Le(this,"Query"),Le(this,"QueryInto"),Le(this,"Create"),Le(this,"Update"),Le(this,"Patch"),Le(this,"Delete")}get AnyQuery(){return this.Query||this.QueryInto}get AnyUpdate(){return this.Patch||this.Update}get dataModel(){var e;return null==(e=this.AnyQuery)?void 0:e.dataModel}toArray(){return[this.Query,this.QueryInto,this.Create,this.Update,this.Patch,this.Delete].filter(e=>!!e).map(e=>e)}get empty(){return!(this.Query||this.QueryInto||this.Create||this.Update||this.Patch||this.Delete)}add(e){qe.isQueryInto(e)&&!this.QueryInto?this.QueryInto=e:qe.isQuery(e)&&!this.Query?this.Query=e:qe.isCreate(e)&&!this.Create?this.Create=e:qe.isUpdate(e)&&!this.Update?this.Update=e:qe.isPatch(e)&&!this.Patch?this.Patch=e:qe.isDelete(e)&&!this.Delete&&(this.Delete=e)}static from(e){let l=new Nt;return e.forEach(e=>{l.add(e)}),l}static forType(t,e){let l,a=new Nt;var n;return G.config.apisResolver&&t&&(n=G.config.apisResolver(t,e))&&(a.Query=n.Query,a.QueryInto=n.QueryInto,a.Create=n.Create,a.Update=n.Update,a.Patch=n.Patch,a.Delete=n.Delete),t&&(null!=(e=e??(null==(l=G.metadata.value)?void 0:l.api))&&e.operations.forEach(e=>{var l;(null==(l=e.dataModel)?void 0:l.name)==t&&a.add(e)})),a}}let qe={Create:"ICreateDb`1",Update:"IUpdateDb`1",Patch:"IPatchDb`1",Delete:"IDeleteDb`1",AnyRead:["QueryDb`1","QueryDb`2"],AnyWrite:["ICreateDb`1","IUpdateDb`1","IPatchDb`1","IDeleteDb`1"],isAnyQuery:e=>Ze(e.request.inherits,e=>0<=qe.AnyRead.indexOf(e.name)),isQuery:e=>Ze(e.request.inherits,e=>"QueryDb`1"===e.name),isQueryInto:e=>Ze(e.request.inherits,e=>"QueryDb`2"===e.name),isCrud:e=>{var l;return null==(l=e.request.implements)?void 0:l.some(e=>0<=qe.AnyWrite.indexOf(e.name))},isCreate:e=>vs(e,qe.Create),isUpdate:e=>vs(e,qe.Update),isPatch:e=>vs(e,qe.Patch),isDelete:e=>vs(e,qe.Delete),model:e=>{var l;return e?Ze(e.inherits,e=>0<=qe.AnyRead.indexOf(e.name))?null==(l=e.inherits)?void 0:l.genericArgs[0]:null==(l=null==(l=e.implements)?void 0:l.find(e=>0<=qe.AnyWrite.indexOf(e.name)))?void 0:l.genericArgs[0]:null}};function Fa(e){var l;return(null==(l=e.input)?void 0:l.type)||Fs(yl(e))}function Vn(e){return e.endsWith("?")?Mo(e,1):e}function Fs(e){return Sa[Vn(e)]}function Ia(e){return e&&Ma[e]||"String"}function yl(e){return"Nullable`1"===e.type?e.genericArgs[0]:e.type}function tl(e){return e&&"number"==Fs(e)||!1}function Sn(e){return e&&"string"==e.toLowerCase()||!1}function ja(e){return"List`1"==e||e.startsWith("List<")||e.endsWith("[]")}function Mn(e){var l;return!(null==e||!e.type||(l=yl(e),e.isValueType&&-1==l.indexOf("`"))||e.isEnum||null!=Fs(e.type))}function An(e){var l;return!!(null!=e&&e.type&&(l=yl(e),e.isValueType&&-1==l.indexOf("`")||e.isEnum||"hidden"==(null==(l=e.input)?void 0:l.type)||"file"==(null==(l=e.input)?void 0:l.type)||"tag"==(null==(l=e.input)?void 0:l.type)||"combobox"==(null==(l=e.input)?void 0:l.type)||null!=Fs(e.type)))}function Yt(e,l){let t="string"==typeof e?Is(e):e,a=(t||(console.warn("Metadata not found for: "+e),t={request:{name:e}}),function(e){Object.assign(this,e)}),n=(r.prototype.createResponse=function(){return t.returnsVoid?void 0:new a},r.prototype.getTypeName=function(){return t.request.name},r.prototype.getMethod=function(){return t.method||"POST"},r);function r(e){Object.assign(this,e)}return new n(l)}function Oa(e,l,t={}){let a=function(e){Object.assign(this,e)},n=(r.prototype.createResponse=function(){return"function"==typeof t.createResponse?t.createResponse():new a},r.prototype.getTypeName=function(){return e},r.prototype.getMethod=function(){return t.method||"POST"},r);function r(e){Object.assign(this,e)}return new n(l)}function ys(t,e){return t?(Object.keys(t).forEach(e=>{var l=t[e];"string"==typeof l?l.startsWith("/Date")&&(t[e]=Ss(pt(l))):null!=l&&"object"==typeof l&&(Array.isArray(l)?t[e]=Array.from(l):t[e]=Object.assign({},l))}),t):{}}function Da(e,o){let i={};return Array.from(e.elements).forEach(e=>{var r,s=e;if(s.id&&null!=s.value&&""!==s.value){let l=s.id.toLowerCase(),e=o&&o.find(e=>e.name.toLowerCase()==l),t=null==e?void 0:e.type,a=null==(r=null==e?void 0:e.genericArgs)?void 0:r[0],n="checkbox"===s.type?s.checked:s.value;tl(t)?n=Number(n):"List`1"===t&&"string"==typeof n&&(n=n.split(",").map(e=>tl(a)?Number(e):e)),i[s.id]=n}}),i}function bl(e){var l;return(null==(l=null==e?void 0:e.api)?void 0:l.operations)&&0l)?!1:n)){if((t||a)&&(await Yl(t||zt,a),null!=G.metadata.value))return;var r=Qe("client");if(null!=r&&(l=await r.api(new Va)).succeeded&&es(l.response),null!=G.metadata.value)return;await Yl(zt)}return G.metadata.value}function rt(l,t){if(G.config.typeResolver){var e=G.config.typeResolver(l,t);if(e)return e}var a,e=null==(e=G.metadata.value)?void 0:e.api;return e&&l?e.types.find(e=>e.name.toLowerCase()===l.toLowerCase()&&(!t||e.namespace==t))||((a=Is(l))?a.request:(a=e.operations.find(e=>e.response&&e.response.name.toLowerCase()===l.toLowerCase()&&(!t||e.response.namespace==t)))?a.response:null):null}function Is(l){if(G.config.apiResolver){var e=G.config.apiResolver(l);if(e)return e}e=null==(e=G.metadata.value)?void 0:e.api;return e?e.operations.find(e=>e.request.name.toLowerCase()===l.toLowerCase()):null}function Ra({dataModel:e}){var l=null==(l=G.metadata.value)?void 0:l.api;if(!l)return[];let t=l.operations;if(e){let l="string"==typeof e?rt(e):e;t=t.filter(e=>Tn(e.dataModel,l))}return t}function kl(e){return e?rt(e.name,e.namespace):null}function Tn(e,l){return e&&l&&e.name===l.name&&(!e.namespace||!l.namespace||e.namespace===l.namespace)}function Ea(e,l){var t=rt(e);return t&&t.properties&&t.properties.find(e=>e.name.toLowerCase()===l.toLowerCase())}function Fn(e){return In(rt(e))}function In(l){if(l&&l.isEnum&&null!=l.enumNames){var t={};for(let e=0;el.push({key:e,value:t[e]})),l}}function za(e,l){t=e.name,a=(null==l?void 0:l.type)||Fa(e)||"text";var t,a,n=Object.assign({id:t,name:t,type:a},l);return e.isEnum&&(n.type="select",n.allowableEntries=_l(jn(e))),n}function Na(l){let r=[];if(l){let a=st(l),e=Is(l.name),n=kl(null==e?void 0:e.dataModel);a.forEach(l=>{var e;if(An(l)){let t=za(l,l.input);if(t.id=So(t.id),"file"==t.type&&l.uploadTo&&!t.accept&&(e=null==(e=null==(e=G.metadata.value)?void 0:e.plugins.filesUpload)?void 0:e.locations.find(e=>e.name==l.uploadTo))&&!t.accept&&e.allowExtensions&&(t.accept=e.allowExtensions.map(e=>e.startsWith(".")?e:"."+e).join(",")),n&&(e=null==(e=n.properties)?void 0:e.find(e=>e.name==l.name),l.ref||(l.ref=null==e?void 0:e.ref)),t.options)try{let e={input:t,$typeFields:a.map(e=>e.name),$dataModelFields:n?st(n).map(e=>e.name):[],...G.config.scopeWhitelist},l=dl(t.options,e);Object.keys(l).forEach(e=>{t[e]=l[e]})}catch{console.error(`failed to evaluate '${t.options}'`)}r.push(t)}})}return r}function $l(e,l){if(!l.type)return console.error("enumDescriptions missing {type:'EnumType'} options"),[""+e];var t=rt(l.type);if(null==t||!t.enumValues)return console.error("Could not find metadata for "+l.type),[""+e];var a=[];for(let r=0;r"number"==typeof e?$l(e,{type:l}):e}function st(e){if(!e)return[];let l=[],t={};for(;e;)e.properties&&e.properties.forEach(e=>{t[e.name]||(t[e.name]=1,l.push(e))}),e=e.inherits?kl(e.inherits):null;return l.map(e=>e.type.endsWith("[]")?{...e,type:"List`1",genericArgs:[e.type.substring(0,e.type.length-2)]}:e)}function vs(e,l){var t;return(null==(t=e.request.implements)?void 0:t.some(e=>e.name===l))||!1}function ns(e){return e?Dn(e,st(e)):null}function Dn(e,l){var t=l.find(e=>"id"===e.name.toLowerCase());if(t&&t.isPrimaryKey)return t;t=l.find(e=>e.isPrimaryKey)||t;if(!t){var a=qe.model(e);if(a)return Ze(rt(a),e=>ns(e));console.error("Primary Key not found in "+e.name)}return t||null}function Ua(e,l){return Ze(ns(e),e=>_e(l,e.name))}function Pn(e,l,t){return e&&"none"===e.valueType?"":"%In"===t.key||"%Between"===t.key?`(${t.value})`:qa(l,t.value)}function qa(e,l){return!e||tl(e=Vn(e))||"Boolean"===e?l:ja(e)?`[${l}]`:`'${l}'`}function gt(e,l){return{name:e,value:l}}let Qa=[gt("=","%"),gt("!=","%!"),gt(">=",">%"),gt(">","%>"),gt("<=","%<"),gt("<","<%"),gt("In","%In"),gt("Between","%Between"),{name:"Starts With",value:"%StartsWith",types:"string"},{name:"Contains",value:"%Contains",types:"string"},{name:"Ends With",value:"%EndsWith",types:"string"},{name:"Exists",value:"%IsNotNull",valueType:"none"},{name:"Not Exists",value:"%IsNull",valueType:"none"}];function lt(){var e=v(()=>{var e;return(null==(e=G.metadata.value)?void 0:e.app)||null}),l=v(()=>{var e;return(null==(e=G.metadata.value)?void 0:e.api)||null}),t=v(()=>{var e;return(null==(e=null==(e=null==(e=G.metadata.value)?void 0:e.plugins)?void 0:e.autoQuery)?void 0:e.viewerConventions)||Qa});return wl(),{loadMetadata:Ha,getMetadata:Pa,setMetadata:es,clearMetadata:Ba,metadataApp:e,metadataApi:l,filterDefinitions:t,typeOf:rt,typeOfRef:kl,typeEquals:Tn,apiOf:Is,findApis:Ra,typeName:Ta,typeName2:Ln,property:Ea,enumOptions:Fn,propertyOptions:jn,createFormLayout:Na,typeProperties:st,supportsProp:An,Crud:qe,Apis:Nt,getPrimaryKey:ns,getPrimaryKeyByProps:Dn,getId:Ua,createDto:Yt,makeDto:Oa,toFormValues:ys,formValues:Da,isComplexProp:Mn,asKvps:_l,expandEnumFlags:$l,enumFlagsConverter:On}}let et=class et{static async getOrFetchValue(e,l,t,a,n,r,s){return et.getValue(t,s,n)??(await et.fetchLookupIds(e,l,t,a,n,r,[s]),et.getValue(t,s,n))}static getValue(e,l,t){var a=et.Lookup[e];if(a){a=a[l];if(a)return a[t=t.toLowerCase()]}}static setValue(e,l,t,a){var n=et.Lookup[e]??(et.Lookup[e]={});(n[l]??(n[l]={}))[t=t.toLowerCase()]=a}static setRefValue(e,l){var t,a=_e(l,e.refId);return null==a||null==e.refLabel?null:(t=_e(l,e.refLabel),et.setValue(e.model,a,e.refLabel,t),t)}static async fetchLookupIds(e,l,n,r,s,o,i){var u=l.operations.find(e=>{var l;return qe.isAnyQuery(e)&&(null==(l=e.dataModel)?void 0:l.name)==n});if(u){let a=et.Lookup[n]??(et.Lookup[n]={}),t=[];Object.keys(a).forEach(e=>{var l=a[e];_e(l,s)&&t.push(e)});var d,v=i.filter(e=>!t.includes(e));0!=v.length&&(d=o?null:r+","+s,v={[r+"In"]:v.join(",")},d&&(v.fields=d),d=Yt(u,v),(v=await e.api(d,{jsconfig:"edv,eccn"})).succeeded?(_e(v.response,"results")||[]).forEach(e=>{var l,t;_e(e,r)?(l=""+_e(e,r),t=_e(e,s),s=s.toLowerCase(),(a[l]??(a[l]={}))[s]=""+t):console.error(`result[${r}] == null`,e)}):console.error("Failed to call "+u.request.name))}}},Pt=(Le(et,"Lookup",{}),et),sl=()=>(new Date).getTime(),Ka=["/","T",":","-"],ct={assumeUtc:!0,date:{method:"Intl.DateTimeFormat",options:"{dateStyle:'medium'}"},maxFieldLength:150,maxNestedFields:2,maxNestedFieldLength:30},Za=new Intl.RelativeTimeFormat(ct.locale,{}),en=31536e6,qs={year:en,month:en/12,day:864e5,hour:36e5,minute:6e4,second:1e3},Lt={currency:Hn,bytes:Rn,link:En,linkTel:zn,linkMailTo:Nn,icon:Un,iconRounded:qn,attachment:Qn,hidden:Kn,time:Zn,relativeTime:xl,relativeTimeFromMs:js,enumFlags:Gn,formatDate:Qt,formatNumber:Cl};"iconOnError"in globalThis||(globalThis.iconOnError=Ts);class Ke{}function Wa(e){ct=Object.assign({},ct,e)}function Ga(l){Object.keys(l||{}).forEach(e=>{"function"==typeof l[e]&&(Lt[e]=l[e])})}function Bn(){return Lt}function os(e,l){return l?dt("span",e,l):e}function Hn(e,l){var t=ft(l,["currency"]);return os(new Intl.NumberFormat(void 0,{style:"currency",currency:(null==l?void 0:l.currency)||"USD"}).format(e),t)}function Rn(e,l){return os(hl(e),l)}function En(e,l){return dt("a",e,Ms({...l,href:e}))}function zn(e,l){return dt("a",e,Ms({...l,href:"tel:"+e}))}function Nn(e,l){var{subject:t,body:a}=l=l||{},n=ft(l,["subject","body"]),r={};return t&&(r.subject=t),a&&(r.body=a),dt("a",e,Ms({...n,href:"mailto:"+Et(e,r)}))}function Un(e,l){return dt("img",void 0,Object.assign({class:"w-6 h-6",title:e,src:Ht(e),onerror:"iconOnError(this)"},l))}function qn(e,l){return dt("img",void 0,Object.assign({class:"w-8 h-8 rounded-full",title:e,src:Ht(e),onerror:"iconOnError(this)"},l))}function Qn(e,l){var t=vl(e),a=(null==ls(t)||ml(e)?Ht:gl)(e),a=Ht(a),n=l&&(l["icon-class"]||l.iconClass),a=dt("img",void 0,Object.assign({class:"w-6 h-6",src:a,onerror:"iconOnError(this,'att')"},n?{class:n}:null));return dt("a",a+`${t}`,Object.assign({class:"flex",href:Ht(e),title:e},l?ft(l,["icon-class","iconClass"]):null))}function Kn(e){return""}function Zn(e,l){var t="string"==typeof e?new Date(1e3*un(e)):Vs(e)?pt(e):null;return os(t?Ao(t):e,l)}function Qt(e,l){var t,a;return null==e?"":(t="number"==typeof e?new Date(e):"string"==typeof e?pt(e):e,Vs(t)?os(("function"==typeof(a=ct.date?Os(ct.date):null)?a:To)(t),l):(console.warn(t+" is not a Date value"),null==e?"":""+e))}function Cl(e,l){if("number"!=typeof e)return e;let t=ct.number?Os(ct.number):null,a="function"==typeof t?t(e):""+e;return""===a&&(console.warn(`formatNumber(${e}) => `+a,t),a=""+e),os(a,l)}function Wn(l,t,a){var e=Fo(l),n=t?Os(t):null;if("function"!=typeof n)return(null!=e?Vs(e)?Qt(e,a):"number"==typeof e?Cl(e,a):e:null)??"";{let e=a;if(null!=t&&t.options)try{e=dl(t.options,a)}catch(e){console.error(`Could not evaluate '${t.options}'`,e,", with scope:",a)}return n(l,e)}}function ts(e,l,t){return(Tt(e)?Wn:tr)(e,l,t)}function Ja(e){if(null!=e){if("number"==typeof e)return e;if(Vs(e))return e.getTime()-sl();if("string"==typeof e){var l=Number(e);if(!isNaN(l))return l;if("P"===e[0]||e.startsWith("-P"))return 1e3*un(e)*-1;if(0<=Io(e,Ka))return pt(e).getTime()-sl()}}return NaN}function js(e,l){for(var t in qs)if(Math.abs(e)>qs[t]||"second"===t)return(l||Za).format(Math.round(e/qs[t]),t)}function xl(e,l){var t=Ja(e);return isNaN(t)?"":js(t,l)}function Xa(e,l){return js(e.getTime()-(l?l.getTime():sl()))}function Gn(e,l){return $l(e,l).join(", ")}function Os(l){if(l){let{method:e,options:a}=l,n=e+`(${a})`,r=Lt[n]||Lt[e];if("function"==typeof r)return r;let s=l.locale||ct.locale;if(e.startsWith("Intl.")){var t=s?`'${s}'`:"undefined",t=`return new ${e}(${t},${a||"undefined"})`;try{let l=Function(t)();return r="Intl.DateTimeFormat"===e?e=>l.format(pt(e)):"Intl.NumberFormat"===e?e=>l.format(Number(e)):"Intl.RelativeTimeFormat"===e?e=>xl(e,l):e=>l.format(e),Lt[n]=r}catch(e){console.error("Invalid format: "+t,e)}}else{let t=globalThis[e];if("function"==typeof t){let l=null!=a?Function("return "+a)():void 0;return r=e=>t(e,l,s),Lt[n]=r}console.error(`No '${e}' function exists`,Object.keys(Lt))}}return null}function Jn(e,l){return e?e.length>l?e.substring(0,l)+"...":e:""}function Xn(e){return"/Date("===e.substring(0,6)?Qt(pt(e)):e}function Ya(e){return Ll(Ut(e)).replace(/"/g,"")}function Yn(e){if(null==e||""===e)return"";if("string"==typeof e)try{return JSON.parse(e)}catch{console.warn("couldn't parse as JSON",e)}return e}function Ll(e,l=4){return"object"!=typeof(e=Yn(e))?"string"==typeof e?e:""+e:JSON.stringify(e,void 0,l)}function er(e){return"object"!=typeof(e=Yn(e))?"string"==typeof e?e:""+e:Ll(e=Ut(e=Object.assign({},e)))}function Ut(t){if(null==t)return null;if("string"==typeof t)return Xn(t);if(Tt(t))return t;if(t instanceof Date)return Qt(t);if(Array.isArray(t))return t.map(Ut);if("object"!=typeof t)return t;{let l={};return Object.keys(t).forEach(e=>{"__type"!=e&&(l[e]=Ut(t[e]))}),l}}function tr(e,l,t){let a=e;if(Array.isArray(e)){if(Tt(e[0]))return a.join(",");null!=e[0]&&(a=e[0])}if(null==a)return"";if(a instanceof Date)return Qt(a,t);var n=Object.keys(a),r=[];for(let i=0;i${s}: `+Ks(Jn(Xn(o),ct.maxNestedFieldLength)))}return 2t.value.navigate(l.to??"/");return(e,l)=>(o(),i("a",Te({onClick:Ue(a,["prevent"]),title:e.to,href:"javascript:void(0)"},e.$attrs),[U(e.$slots,"default")],16,sr))}});class nr{constructor(){Le(this,"callbacks",{})}register(e,l){this.callbacks[e]=l}has(e){return!!this.callbacks[e]}invoke(e,l){var t=this.callbacks[e];"function"==typeof t&&t(e,l)}}let tt=class tt{static component(e){var l=tt.components[e];if(l)return l;let t=Wl(e),a=Object.keys(tt.components).find(e=>Wl(e)===t);return a&&tt.components[a]||null}},G=(Le(tt,"config",{redirectSignIn:"/signin",redirectSignOut:"/auth/logout",navigate:e=>location.href=e,assetsPathResolver:e=>e,fallbackPathResolver:e=>e,storage:new hn,tableIcon:{svg:""},scopeWhitelist:{enumFlagsConverter:On,...Bn()}}),Le(tt,"autoQueryGridDefaults",{deny:[],hide:[],toolbarButtonClass:void 0,tableStyle:"stripedRows",take:25,maxFieldLength:150}),Le(tt,"events",jo()),Le(tt,"user",O(null)),Le(tt,"metadata",O(null)),Le(tt,"components",{RouterLink:lr}),Le(tt,"interceptors",new nr),tt);function or(e){G.config=Object.assign(G.config,e)}function ar(e){G.autoQueryGridDefaults=Object.assign(G.autoQueryGridDefaults,e)}function Vl(e){return e&&G.config.assetsPathResolver?G.config.assetsPathResolver(e):e}function rr(e){return e&&G.config.fallbackPathResolver?G.config.fallbackPathResolver(e):e}function ir(e,l){G.interceptors.register(e,l)}function It(){var e=v(()=>G.config),l=v(()=>G.autoQueryGridDefaults);return{config:e,setConfig:or,events:G.events,autoQueryGridDefaults:l,setAutoQueryGridDefaults:ar,assetsPathResolver:Vl,fallbackPathResolver:rr,registerInterceptor:ir}}let eo=de({inheritAttrs:!1,props:{image:Object,svg:String,src:String,alt:String,type:String},setup(n,{attrs:r}){return()=>{let e=n.image;var l,t;n.type&&(t=lt().typeOf,(t=t(n.type))||console.warn(`Type ${n.type} does not exist`),null!=t&&t.icon?e=null==t?void 0:t.icon:console.warn(`Type ${n.type} does not have a [Svg] icon`));let a=n.svg||(null==e?void 0:e.svg)||"";return a.startsWith("").indexOf("class="),l=`${(null==e?void 0:e.cls)||""} `+(r.class||""),a=-1==t?`Ts(e.target)})}}}),ur={class:"text-2xl font-semibold text-gray-900 dark:text-gray-300"},dr={class:"flex"},cr=l("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"},null,-1),fr=l("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"},null,-1),vr=[cr,fr],pr=de({__name:"Loading",props:{imageClass:{default:"w-6 h-6"}},setup(e){return(e,t)=>(o(),i("div",ur,[l("div",dr,[(o(),i("svg",{class:y(["self-center inline mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-gray-600 dark:fill-gray-300",e.imageClass]),role:"status",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},vr,2)),l("span",null,[U(e.$slots,"default")])])]))}}),mr=["href","onClick"],hr=["type"],tn="inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 shadow-sm text-sm font-medium rounded-md text-gray-700 dark:text-gray-200 disabled:text-gray-400 bg-white dark:bg-black hover:bg-gray-50 hover:dark:bg-gray-900 disabled:hover:bg-white dark:disabled:hover:bg-black focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black",gr=de({__name:"OutlineButton",props:{type:{default:"submit"},href:{}},setup(e){return(t,e)=>{var a=Z("router-link");return t.href?(o(),ae(a,{key:0,to:t.href},{default:xe(({navigate:e})=>[l("button",{class:y(tn),href:t.href,onClick:e},[U(t.$slots,"default")],8,mr)]),_:3},8,["to"])):(o(),i("button",Te({key:1,type:t.type,class:tn},t.$attrs),[U(t.$slots,"default")],16,hr))}}}),yr=["href","onClick"],br=["type"],wr=de({__name:"PrimaryButton",props:{type:{default:"submit"},href:{},color:{default:"indigo"}},setup(e){let t=e,a={blue:"focus:ring-indigo-500 bg-blue-600 hover:bg-blue-700 disabled:bg-blue-400 disabled:hover:bg-blue-400 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",purple:"focus:ring-indigo-500 bg-purple-600 hover:bg-purple-700 disabled:bg-purple-400 disabled:hover:bg-purple-400 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800",red:"focus:ring-red-500 bg-red-600 hover:bg-red-700 disabled:bg-red-400 disabled:hover:bg-red-400 focus:ring-red-500 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-500",green:"focus:ring-green-500 bg-green-600 hover:bg-green-700 disabled:bg-green-400 disabled:hover:bg-green-400 focus:ring-green-500 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-500",sky:"focus:ring-sky-500 bg-sky-600 hover:bg-sky-700 disabled:bg-sky-400 disabled:hover:bg-sky-400 dark:bg-sky-600 dark:hover:bg-sky-700 dark:focus:ring-sky-500",cyan:"focus:ring-cyan-500 bg-cyan-600 hover:bg-cyan-700 disabled:bg-cyan-400 disabled:hover:bg-cyan-400 dark:bg-cyan-600 dark:hover:bg-cyan-700 dark:focus:ring-cyan-500",indigo:"focus:ring-indigo-500 bg-indigo-600 hover:bg-indigo-700 disabled:bg-indigo-400 disabled:hover:bg-indigo-400 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},n=v(()=>"inline-flex justify-center rounded-md border border-transparent py-2 px-4 text-sm font-medium shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 dark:ring-offset-black text-white "+(a[t.color]||a.indigo));return(t,e)=>{var a=Z("router-link");return t.href?(o(),ae(a,{key:0,to:t.href},{default:xe(({navigate:e})=>[l("button",{class:y(n.value),href:t.href,onClick:e},[U(t.$slots,"default")],10,yr)]),_:3},8,["to"])):(o(),i("button",Te({key:1,type:t.type,class:n.value},t.$attrs),[U(t.$slots,"default")],16,br))}}}),kr=["type","href","onClick"],_r=["type"],sn="inline-flex justify-center rounded-md border border-gray-300 py-2 px-4 text-sm font-medium shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-400 dark:hover:text-white hover:bg-gray-50 dark:hover:bg-gray-700 focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:ring-offset-black",$r=de({__name:"SecondaryButton",props:{type:{},href:{}},setup(e){return(t,e)=>{var a=Z("router-link");return t.href?(o(),ae(a,{key:0,to:t.href},{default:xe(({navigate:e})=>[l("button",{type:t.type??"button",class:y(sn),href:t.href,onClick:e},[U(t.$slots,"default")],8,kr)]),_:3},8,["to"])):(o(),i("button",Te({key:1,type:t.type??"button",class:sn},t.$attrs),[U(t.$slots,"default")],16,_r))}}});function Ge(e,l){return Array.isArray(e)?0<=e.indexOf(l):e==l||e.includes(l)}let Cs={blue:"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-200",purple:"text-purple-600 dark:text-purple-400 hover:text-purple-800 dark:hover:text-purple-200",red:"text-red-700 dark:text-red-400 hover:text-red-900 dark:hover:text-red-200",green:"text-green-600 dark:text-green-400 hover:text-green-800 dark:hover:text-green-200",sky:"text-sky-600 dark:text-sky-400 hover:text-sky-800 dark:hover:text-sky-200",cyan:"text-cyan-600 dark:text-cyan-400 hover:text-cyan-800 dark:hover:text-cyan-200",indigo:"text-indigo-600 dark:text-indigo-400 hover:text-indigo-800 dark:hover:text-indigo-200"},ot={base:"block w-full sm:text-sm rounded-md dark:text-white dark:bg-gray-900 disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none",invalid:"pr-10 border-red-300 text-red-900 placeholder-red-300 focus:outline-none focus:ring-red-500 focus:border-red-500",valid:"shadow-sm focus:ring-indigo-500 focus:border-indigo-500 border-gray-300 dark:border-gray-600"},Gt={panelClass:"shadow sm:rounded-md",formClass:"space-y-6 bg-white dark:bg-black py-6 px-4 sm:p-6",headingClass:"text-lg font-medium leading-6 text-gray-900 dark:text-gray-100",subHeadingClass:"mt-1 text-sm text-gray-500 dark:text-gray-400"},Bt={panelClass:"pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",formClass:"flex h-full flex-col divide-y divide-gray-200 dark:divide-gray-700 shadow-xl bg-white dark:bg-black",titlebarClass:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6",headingClass:"text-lg font-medium text-gray-900 dark:text-gray-100",subHeadingClass:"mt-1 text-sm text-gray-500 dark:text-gray-400",closeButtonClass:"rounded-md bg-gray-50 dark:bg-gray-900 text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:ring-offset-black"},ll={modalClass:"relative transform overflow-hidden rounded-lg bg-white dark:bg-black text-left shadow-xl transition-all sm:my-8",sizeClass:"sm:max-w-prose lg:max-w-screen-md xl:max-w-screen-lg 2xl:max-w-screen-xl sm:w-full"},Ee={panelClass(e="slideOver"){return("card"==e?Gt:Bt).panelClass},formClass(e="slideOver"){return("card"==e?Gt:Bt).formClass},headingClass(e="slideOver"){return("card"==e?Gt:Bt).headingClass},subHeadingClass(e="slideOver"){return("card"==e?Gt:Bt).subHeadingClass},buttonsClass:"mt-4 px-4 py-3 bg-gray-50 dark:bg-gray-900 sm:px-6 flex flex-wrap justify-between",legendClass:"text-base font-medium text-gray-900 dark:text-gray-100 text-center mb-4"},he={getGridClass(e=0){return he.gridClass},getGrid2Class(e="stripedRows"){return Ge(e,"fullWidth")?"overflow-x-auto":he.grid2Class},getGrid3Class(e="stripedRows"){return Ge(e,"fullWidth")?"inline-block min-w-full py-2 align-middle":he.grid3Class},getGrid4Class(e="stripedRows"){return Ge(e,"whiteBackground")?"":Ge(e,"fullWidth")?"overflow-hidden shadow-sm ring-1 ring-black ring-opacity-5":he.grid4Class},getTableClass(e="stripedRows"){return Ge(e,"fullWidth")||Ge(e,"verticalLines")?"min-w-full divide-y divide-gray-300":he.tableClass},getTheadClass(e="stripedRows"){return Ge(e,"whiteBackground")?"":he.theadClass},getTheadRowClass(e="stripedRows"){return he.theadRowClass+(Ge(e,"verticalLines")?" divide-x divide-gray-200 dark:divide-gray-700":"")},getTheadCellClass(e="stripedRows"){return he.theadCellClass+(Ge(e,"uppercaseHeadings")?" uppercase":"")},getTbodyClass(e="stripedRows"){return(Ge(e,"whiteBackground")||Ge(e,"verticalLines")?"divide-y divide-gray-200 dark:divide-gray-800":he.tableClass)+(Ge(e,"verticalLines")?" bg-white":"")},getTableRowClass(e="stripedRows",l,t,a){return(a?"cursor-pointer ":"")+(t?"bg-indigo-100 dark:bg-blue-800":(a?"hover:bg-yellow-50 dark:hover:bg-blue-900 ":"")+(!Ge(e,"stripedRows")||l%2==0?"bg-white dark:bg-black":"bg-gray-50 dark:bg-gray-800"))+(Ge(e,"verticalLines")?" divide-x divide-gray-200 dark:divide-gray-700":"")},gridClass:"flex flex-col",grid2Class:"",grid3Class:"inline-block min-w-full py-2 align-middle",grid4Class:"overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg",tableClass:"min-w-full divide-y divide-gray-200 dark:divide-gray-700",theadClass:"bg-gray-50 dark:bg-gray-900",tableCellClass:"px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400",theadRowClass:"select-none",theadCellClass:"px-6 py-4 text-left text-sm font-medium tracking-wider whitespace-nowrap",toolbarButtonClass:"inline-flex items-center px-2.5 py-1.5 border border-gray-300 dark:border-gray-700 shadow-sm text-sm font-medium rounded text-gray-700 dark:text-gray-300 bg-white dark:bg-black hover:bg-gray-50 dark:hover:bg-gray-900 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black"},Cr={colspans:"col-span-3 sm:col-span-3"},fh=Object.freeze(Object.defineProperty({__proto__:null,a:Cs,card:Gt,dummy:Cr,form:Ee,grid:he,input:ot,modal:ll,slideOver:Bt},Symbol.toStringTag,{value:"Module"})),xr=de({__name:"TextLink",props:{color:{default:"blue"}},setup(e){let l=yo(),t=e,a=v(()=>(Cs[t.color]||Cs.blue)+(l.href?"":" cursor-pointer"));return(e,l)=>(o(),i("a",{class:y(a.value)},[U(e.$slots,"default")],2))}}),Lr={class:"flex","aria-label":"Breadcrumb"},Vr={role:"list",class:"flex items-center space-x-4"},Sr=["href","title"],Mr=l("svg",{class:"h-6 w-6 flex-shrink-0",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[l("path",{"fill-rule":"evenodd",d:"M9.293 2.293a1 1 0 011.414 0l7 7A1 1 0 0117 11h-1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-3a1 1 0 00-1-1H9a1 1 0 00-1 1v3a1 1 0 01-1 1H5a1 1 0 01-1-1v-6H3a1 1 0 01-.707-1.707l7-7z","clip-rule":"evenodd"})],-1),Ar={class:"sr-only"},Tr=de({__name:"Breadcrumbs",props:{homeHref:{default:"/"},homeLabel:{default:"Home"}},setup(e){return(e,t)=>(o(),i("nav",Lr,[l("ol",Vr,[l("li",null,[l("div",null,[l("a",{href:e.homeHref,class:"text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400",title:e.homeLabel},[Mr,l("span",Ar,F(e.homeLabel),1)],8,Sr)])]),U(e.$slots,"default")])]))}}),Fr={class:"flex items-center"},Ir=l("svg",{class:"h-6 w-6 flex-shrink-0 text-gray-400 dark:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[l("path",{"fill-rule":"evenodd",d:"M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z","clip-rule":"evenodd"})],-1),jr=["href","title"],Or=["title"],Dr=de({__name:"Breadcrumb",props:{href:{},title:{}},setup(e){return(e,t)=>(o(),i("li",null,[l("div",Fr,[Ir,e.href?(o(),i("a",{key:0,href:e.href,class:"ml-4 text-lg font-medium text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300",title:e.title},[U(e.$slots,"default")],8,jr)):(o(),i("span",{key:1,class:"ml-4 text-lg font-medium text-gray-700 dark:text-gray-300",title:e.title},[U(e.$slots,"default")],8,Or))])]))}}),Pr={key:0,class:"text-base font-semibold text-gray-500 dark:text-gray-400"},Br={role:"list",class:"mt-4 divide-y divide-gray-200 dark:divide-gray-800 border-t border-b border-gray-200 dark:border-gray-800"},Hr=de({__name:"NavList",props:{title:{}},setup(e){return(e,t)=>(o(),i("div",null,[e.title?(o(),i("h2",Pr,F(e.title),1)):x("",!0),l("ul",Br,[U(e.$slots,"default")])]))}}),Rr={class:"relative flex items-start space-x-4 py-6"},Er={class:"flex-shrink-0"},zr={class:"flex h-12 w-12 items-center justify-center rounded-lg bg-indigo-50 dark:bg-indigo-900"},Nr={class:"min-w-0 flex-1"},Ur={class:"text-base font-medium text-gray-900 dark:text-gray-100"},qr={class:"rounded-sm focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2"},Qr=["href"],Kr=l("span",{class:"absolute inset-0","aria-hidden":"true"},null,-1),Zr={class:"text-base text-gray-500"},Wr=l("div",{class:"flex-shrink-0 self-center"},[l("svg",{class:"h-5 w-5 text-gray-400",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[l("path",{"fill-rule":"evenodd",d:"M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z","clip-rule":"evenodd"})])],-1),Gr=de({__name:"NavListItem",props:{title:{},href:{},icon:{},iconSvg:{},iconSrc:{},iconAlt:{}},setup(e){return(e,t)=>{var a=Z("Icon");return o(),i("li",Rr,[l("div",Er,[l("span",zr,[ye(a,{class:"w-6 h-6 text-indigo-700 dark:text-indigo-300",image:e.icon,src:e.iconSrc,svg:e.iconSvg,alt:e.iconAlt},null,8,["image","src","svg","alt"])])]),l("div",Nr,[l("h3",Ur,[l("span",qr,[l("a",{href:e.href,class:"focus:outline-none"},[Kr,ke(" "+F(e.title),1)],8,Qr)])]),l("p",Zr,[U(e.$slots,"default")])]),Wr])}}});function to(e){return e&&e.SessionId?Oo(e):e}function Jr(e){G.user.value=to(e),G.events.publish("signIn",e)}function Xr(){G.user.value=null,G.events.publish("signOut",null)}let Sl=e=>(null==e?void 0:e.roles)||[],Ml=e=>(null==e?void 0:e.permissions)||[];function so(e){return 0<=Sl(G.user.value).indexOf(e)}function Yr(e){return 0<=Ml(G.user.value).indexOf(e)}function Al(){return so("Admin")}function bs(e){if(!e)return!1;if(!e.requiresAuth)return!0;var l=G.user.value;if(!l)return!1;if(Al())return!0;let[t,a]=[Sl(l),Ml(l)],[n,r,s,o]=[e.requiredRoles||[],e.requiredPermissions||[],e.requiresAnyRole||[],e.requiresAnyPermission||[]];return!(!n.every(e=>0<=t.indexOf(e))||00<=t.indexOf(e))||!r.every(e=>0<=a.indexOf(e))||00<=a.indexOf(e)))}function ei(e){if(!e||!e.requiresAuth)return null;var l=G.user.value;if(!l)return`${e.request.name} requires Authentication`;if(Al())return null;let[t,a]=[Sl(l),Ml(l)],[n,r,s,o]=[e.requiredRoles||[],e.requiredPermissions||[],e.requiresAnyRole||[],e.requiresAnyPermission||[]],i=n.filter(e=>t.indexOf(e)<0);return 0""+e+"").join(", ")} Role`+(1a.indexOf(e)<0)).length?`Requires ${l.map(e=>""+e+"").join(", ")} Permission`+(10<=t.indexOf(e))?`Requires any ${s.filter(e=>t.indexOf(e)<0).map(e=>""+e+"").join(", ")} Role`+(10<=a.indexOf(e))?`Requires any ${o.filter(e=>a.indexOf(e)<0).map(e=>""+e+"").join(", ")} Permission`+(1G.user.value||null),toAuth:to,isAuthenticated:v(()=>null!=G.user.value),hasRole:so,hasPermission:Yr,isAdmin:Al,canAccess:bs,invalidAccessMessage:ei}}let ti={key:0},si={class:"md:p-4"},lo=de({__name:"EnsureAccess",props:{invalidAccess:{},alertClass:{}},emits:["done"],setup(e){let r=Tl().isAuthenticated,t=It().config,s=()=>{var e=location.href.substring(location.origin.length)||"/",e=Et(t.value.redirectSignIn,{redirect:e});t.value.navigate(e)},u=()=>{var e=location.href.substring(location.origin.length)||"/",e=Et(t.value.redirectSignOut,{ReturnUrl:e});t.value.navigate(e)};return(e,t)=>{var a=Z("Alert"),n=Z("SecondaryButton");return e.invalidAccess?(o(),i("div",ti,[ye(a,{class:y(e.alertClass),innerHTML:e.invalidAccess},null,8,["class","innerHTML"]),l("div",si,[X(r)?(o(),ae(n,{key:1,onClick:u},{default:xe(()=>[ke("Sign Out")]),_:1})):(o(),ae(n,{key:0,onClick:s},{default:xe(()=>[ke("Sign In")]),_:1}))])])):x("",!0)}}}),li={class:"absolute top-0 right-0 bg-white dark:bg-black border dark:border-gray-800 rounded normal-case text-sm shadow w-80"},ni={class:"p-4"},oi=l("h3",{class:"text-base font-medium mb-3 dark:text-gray-100"},"Sort",-1),ai={class:"flex w-full justify-center"},ri=l("svg",{class:"w-6 h-6",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16"},[l("g",{fill:"currentColor"},[l("path",{"fill-rule":"evenodd",d:"M10.082 5.629L9.664 7H8.598l1.789-5.332h1.234L13.402 7h-1.12l-.419-1.371h-1.781zm1.57-.785L11 2.687h-.047l-.652 2.157h1.351z"}),l("path",{d:"M12.96 14H9.028v-.691l2.579-3.72v-.054H9.098v-.867h3.785v.691l-2.567 3.72v.054h2.645V14zm-8.46-.5a.5.5 0 0 1-1 0V3.707L2.354 4.854a.5.5 0 1 1-.708-.708l2-1.999l.007-.007a.498.498 0 0 1 .7.006l2 2a.5.5 0 1 1-.707.708L4.5 3.707V13.5z"})])],-1),ii=l("span",null,"ASC",-1),ui=[ri,ii],di=xs('DESC',2),ci=[di],fi=l("h3",{class:"text-base font-medium mt-4 mb-2"}," Filter ",-1),vi={key:0},pi=["id","value"],mi=["for"],hi={key:1},gi={class:"mb-2"},yi={class:"inline-flex rounded-full items-center py-0.5 pl-2.5 pr-1 text-sm font-medium bg-indigo-100 text-indigo-700"},bi=["onClick"],wi=l("svg",{class:"h-2 w-2",stroke:"currentColor",fill:"none",viewBox:"0 0 8 8"},[l("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M1 1l6 6m0-6L1 7"})],-1),ki=[wi],_i={class:"flex"},$i=l("svg",{class:"h-6 w-6",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[l("path",{"fill-rule":"evenodd",d:"M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z","clip-rule":"evenodd"})],-1),Ci=[$i],xi={class:"bg-gray-50 dark:bg-gray-900 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},Fl=de({__name:"FilterColumn",props:{definitions:{},column:{},topLeft:{}},emits:["done","save"],setup(e,{emit:t}){let u=e,a=t,d=O(),c=O(""),p=O(""),f=O([]),m=v(()=>1==u.column.meta.isEnum),s=v(()=>rt("Nullable`1"===u.column.meta.type?u.column.meta.genericArgs[0]:u.column.meta.type)),g=v(()=>1==u.column.meta.isEnum?_l(Fn(s.value.name)):[]),h=v(()=>{var e;return(null==(e=n(u.column.type))?void 0:e.map(e=>({key:e.value,value:e.name})))||[]}),b=O({filters:[]}),w=v(()=>b.value.filters);function n(e){let l=u.definitions;return l=Sn(e)?l:l.filter(e=>"string"!==e.types)}function k(e,l){return n(e).find(e=>e.value===l)}function C(){var e;c.value&&(e=null==(e=k(u.column.type,c.value))?void 0:e.name)&&(b.value.filters.push({key:c.value,name:e,value:p.value}),c.value=p.value="")}function L(){a("done")}function M(){var e;c.value="%",null!=(e=d.value)&&e.focus()}function V(){var e,l;p.value&&C(),m.value&&(l=Object.values(f.value).filter(e=>e),b.value.filters=0parseInt(e)).reduce((e,l)=>e+l,0).toString()}]:[{key:"%In",name:"In",value:l.join(",")}]:[]),a("save",b.value),a("done")}function S(e){b.value.sort=e===b.value.sort?void 0:e,St(V)}return ws(()=>b.value=Object.assign({},u.column.settings,{filters:Array.from(u.column.settings.filters)})),ws(()=>{let e,l,t,a,n,r=(null==(t=null==(l=null==(e=u.column.settings.filters)?void 0:e[0])?void 0:l.value)?void 0:t.split(","))||[];if(00<(l&parseInt(e))))||[]}f.value=r}),(a,t)=>{var e=Z("SelectInput"),n=Z("TextInput"),r=Z("PrimaryButton"),s=Z("SecondaryButton");return o(),i("div",{class:"fixed z-20 inset-0 overflow-y-auto",onClick:L,onVnodeMounted:M},[l("div",{class:"absolute",style:nl(`top:${a.topLeft.y}px;left:${a.topLeft.x}px`),onClick:t[5]||(t[5]=Ue(()=>{},["stop"]))},[l("div",li,[l("div",ni,[oi,l("div",ai,[l("button",{type:"button",title:"Sort Ascending",onClick:t[0]||(t[0]=e=>S("ASC")),class:y(`${"ASC"===b.value.sort?"bg-indigo-100 border-indigo-500":"bg-white hover:bg-gray-50 border-gray-300"} mr-1 inline-flex items-center px-2.5 py-1.5 border shadow-sm text-sm font-medium rounded text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500`)},ui,2),l("button",{type:"button",title:"Sort Descending",onClick:t[1]||(t[1]=e=>S("DESC")),class:y(`${"DESC"===b.value.sort?"bg-indigo-100 border-indigo-500":"bg-white hover:bg-gray-50 border-gray-300"} ml-1 inline-flex items-center px-2.5 py-1.5 border shadow-sm text-sm font-medium rounded text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500`)},ci,2)]),fi,m.value?(o(),i("div",vi,[(o(!0),i(Me,null,je(g.value,e=>(o(),i("div",{key:e.key,class:"flex items-center"},[Mt(l("input",{type:"checkbox",id:e.key,value:e.key,"onUpdate:modelValue":t[2]||(t[2]=e=>f.value=e),class:"h-4 w-4 border-gray-300 rounded text-indigo-600 focus:ring-indigo-500"},null,8,pi),[[ol,f.value]]),l("label",{for:e.key,class:"ml-3"},F(e.value),9,mi)]))),128))])):(o(),i("div",hi,[(o(!0),i(Me,null,je(w.value,(e,t)=>(o(),i("div",gi,[l("span",yi,[ke(F(a.column.name)+" "+F(e.name)+" "+F((e=e,Pn(k(u.column.type,e.key),u.column.type,e)))+" ",1),l("button",{type:"button",onClick:e=>{var l;l=t,b.value.filters.splice(l,1)},class:"flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center text-indigo-400 hover:bg-indigo-200 hover:text-indigo-500 focus:outline-none focus:bg-indigo-500 focus:text-white"},ki,8,bi)])]))),256)),l("div",_i,[ye(e,{id:"filterRule",class:"w-32 mr-1",modelValue:c.value,"onUpdate:modelValue":t[3]||(t[3]=e=>c.value=e),entries:h.value,label:"",placeholder:""},null,8,["modelValue","entries"]),"none"!==(null==(e=k(a.column.type,c.value))?void 0:e.valueType)?(o(),ae(n,{key:0,ref_key:"txtFilter",ref:d,id:"filterValue",class:"w-32 mr-1",type:"text",modelValue:p.value,"onUpdate:modelValue":t[4]||(t[4]=e=>p.value=e),onKeyup:on(C,["enter"]),label:"",placeholder:""},null,8,["modelValue"])):x("",!0),l("div",{class:"pt-1"},[l("button",{type:"button",onClick:C,class:"inline-flex items-center p-1 border border-transparent rounded-full shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"},Ci)])])]))]),l("div",xi,[ye(r,{onClick:V,color:"red",class:"ml-2"},{default:xe(()=>[ke(" Save ")]),_:1}),ye(s,{onClick:L},{default:xe(()=>[ke(" Cancel ")]),_:1})])])],4)],512)}}}),Li={class:"px-4 sm:px-6 lg:px-8 text-sm"},Vi={class:"flex flex-wrap"},Si={class:"group pr-4 sm:pr-6 lg:pr-8"},Mi={class:"flex justify-between w-full font-medium"},Ai={class:"w-6 flex justify-end"},Ti={class:"hidden group-hover:inline"},Fi=["onClick","title"],Ii=l("svg",{class:"h-2 w-2",stroke:"currentColor",fill:"none",viewBox:"0 0 8 8"},[l("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M1 1l6 6m0-6L1 7"})],-1),ji=[Ii],Oi={key:0,class:"pt-2"},Di={class:"ml-2"},Pi={key:1},Bi={class:"pt-2"},Hi={class:"inline-flex rounded-full items-center py-0.5 pl-2.5 pr-1 text-sm font-medium bg-indigo-100 text-indigo-700"},Ri=["onClick"],Ei=l("svg",{class:"h-2 w-2",stroke:"currentColor",fill:"none",viewBox:"0 0 8 8"},[l("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M1 1l6 6m0-6L1 7"})],-1),zi=[Ei],Ni=l("span",null,"Clear All",-1),Ui=[Ni],Il=de({__name:"FilterViews",props:{definitions:{},columns:{}},emits:["done","change"],setup(e,{emit:t}){let a=e,r=t,n=v(()=>a.columns.filter(e=>0{let l=a.definitions;return l=Sn(e)?l:l.filter(e=>"string"!==e.types)})(e).find(e=>e.value===l)}function u(){a.columns.forEach(e=>{e.settings.filters=[],r("change",e)}),r("done")}return(e,t)=>(o(),i("div",Li,[l("div",Vi,[(o(!0),i(Me,null,je(n.value,n=>{return o(),i("fieldset",Si,[l("legend",Mi,[l("span",null,F(X(Pe)(n.name)),1),l("span",Ai,[l("span",Ti,[l("button",{onClick:e=>{var l;(l=n).settings.filters=[],r("change",l)},title:`Clear all ${X(Pe)(n.name)} filters`,class:"flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center text-red-600 hover:bg-red-200 hover:text-red-500 focus:outline-none focus:bg-red-500 focus:text-white"},ji,8,Fi)])])]),n.meta.isEnum?(o(),i("div",Oi,[(o(!0),i(Me,null,je((e=n.settings.filters,null==(t=null==(t=null==e?void 0:e[0])?void 0:t.value)?void 0:t.split(",")),e=>(o(),i("div",{key:e,class:"flex items-center"},[l("label",Di,F(e),1)]))),128))])):(o(),i("div",Pi,[(o(!0),i(Me,null,je(n.settings.filters,(e,t)=>{return o(),i("div",Bi,[l("span",Hi,[ke(F(n.name)+" "+F(e.name)+" "+F((e=e,Pn(s((a=n).type,e.value),a.type,e)))+" ",1),l("button",{type:"button",onClick:e=>{var l;(l=n).settings.filters.splice(t,1),r("change",l)},class:"flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center text-indigo-400 hover:bg-indigo-200 hover:text-indigo-500 focus:outline-none focus:bg-indigo-500 focus:text-white"},zi,8,Ri)])]);var a}),256))]))]);var e,t}),256))]),l("div",{class:"flex justify-center pt-4"},[l("button",{type:"button",onClick:u,class:"inline-flex items-center px-2.5 py-1.5 border border-gray-300 shadow-sm text-sm font-medium rounded text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"},Ui)])]))}}),qi={class:"bg-white dark:bg-black px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Qi={class:""},Ki={class:"mt-3 text-center sm:mt-0 sm:mx-4 sm:text-left"},Zi=l("h3",{class:"text-lg leading-6 font-medium text-gray-900 dark:text-gray-100"},"Query Preferences",-1),Wi={class:"mt-4"},Gi=["for"],Ji=["id"],Xi=["value","selected"],Yi={class:"mt-4 flex items-center py-4 border-b border-gray-200 dark:border-gray-800"},eu=["id","checked"],tu=["for"],su={class:"mt-4"},lu={class:"pb-2 px-4"},nu={class:""},ou=["id","value"],au=["for"],ru={class:"bg-gray-50 dark:bg-gray-900 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},jl=de({__name:"QueryPrefs",props:{id:{default:"QueryPrefs"},columns:{},prefs:{},maxLimit:{}},emits:["done","save"],setup(e,{emit:t}){let a=It().autoQueryGridDefaults,s=e,n=t,u=O({}),d=(ws(()=>u.value=Object.assign({take:a.value.take,selectedColumns:[]},s.prefs)),[10,25,50,100,250,500,1e3]);function v(){n("done")}function c(){n("save",u.value)}return(e,t)=>{let a=Z("PrimaryButton"),n=Z("SecondaryButton"),r=Z("ModalDialog");return o(),ae(r,{id:e.id,onDone:v,"size-class":"w-full sm:max-w-prose"},{default:xe(()=>[l("div",qi,[l("div",Qi,[l("div",Ki,[Zi,l("div",Wi,[l("label",{for:e.id+"-take",class:"block text-sm font-medium text-gray-700 dark:text-gray-300"},"Results per page",8,Gi),Mt(l("select",{id:e.id+"-take","onUpdate:modelValue":t[0]||(t[0]=e=>u.value.take=e),class:"mt-1 block w-full pl-3 pr-10 py-2 text-base bg-white dark:bg-black border-gray-300 dark:border-gray-700 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md"},[(o(!0),i(Me,null,je(d.filter(e=>null==s.maxLimit||e<=s.maxLimit),e=>(o(),i("option",{value:e,selected:e===u.value.take},F(e),9,Xi))),256))],8,Ji),[[bo,u.value.take]])]),l("div",Yi,[l("input",{type:"radio",id:e.id+"-allColumns",onClick:t[1]||(t[1]=e=>u.value.selectedColumns=[]),checked:0===u.value.selectedColumns.length,class:"focus:ring-indigo-500 h-4 w-4 bg-white dark:bg-black text-indigo-600 dark:text-indigo-400 border-gray-300 dark:border-gray-700"},null,8,eu),l("label",{class:"ml-3 block text-gray-700 dark:text-gray-300",for:e.id+"-allColumns"},"View all columns",8,tu)]),l("div",su,[l("div",lu,[l("div",nu,[(o(!0),i(Me,null,je(e.columns,e=>(o(),i("div",{key:e.name,class:"flex items-center"},[Mt(l("input",{type:"checkbox",id:e.name,value:e.name,"onUpdate:modelValue":t[2]||(t[2]=e=>u.value.selectedColumns=e),class:"h-4 w-4 bg-white dark:bg-black border-gray-300 dark:border-gray-700 rounded text-indigo-600 dark:text-indigo-400 focus:ring-indigo-500"},null,8,ou),[[ol,u.value.selectedColumns]]),l("label",{for:e.name,class:"ml-3"},F(e.name),9,au)]))),128))])])])])])]),l("div",ru,[ye(a,{onClick:c,color:"red",class:"ml-2"},{default:xe(()=>[ke(" Save ")]),_:1}),ye(n,{onClick:v},{default:xe(()=>[ke(" Cancel ")]),_:1})])]),_:1},8,["id"])}}}),iu={key:0},uu={key:1},du={key:2,class:"pt-1"},cu={key:0},fu={key:1},vu={key:2},pu={key:4},mu={class:"pl-1 pt-1 flex flex-wrap"},hu={class:"flex mt-1"},gu=["title"],yu=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("g",{"stroke-width":"1.5",fill:"none"},[l("path",{d:"M9 3H3.6a.6.6 0 0 0-.6.6v16.8a.6.6 0 0 0 .6.6H9M9 3v18M9 3h6M9 21h6m0-18h5.4a.6.6 0 0 1 .6.6v16.8a.6.6 0 0 1-.6.6H15m0-18v18",stroke:"currentColor"})])],-1),bu=[yu],wu=["disabled"],ku=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6l6 6zM6 6h2v12H6z",fill:"currentColor"})],-1),_u=[ku],$u=["disabled"],Cu=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z",fill:"currentColor"})],-1),xu=[Cu],Lu=["disabled"],Vu=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z",fill:"currentColor"})],-1),Su=[Vu],Mu=["disabled"],Au=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6l-6-6zM16 6h2v12h-2z",fill:"currentColor"})],-1),Tu=[Au],Fu={key:0,class:"flex mt-1"},Iu={class:"px-4 text-lg text-black dark:text-white"},ju={key:0},Ou={key:1},Du=l("span",{class:"hidden xl:inline"}," Showing Results ",-1),Pu={key:2},Bu={class:"flex flex-wrap"},Hu={key:0,class:"pl-2 mt-1"},Ru=l("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 20v-5h-5M4 4v5h5m10.938 2A8.001 8.001 0 0 0 5.07 8m-1.008 5a8.001 8.001 0 0 0 14.868 3"})],-1),Eu=[Ru],zu={key:1,class:"pl-2 mt-1"},Nu=xs('Excel',2),Uu=[Nu],qu={key:2,class:"pl-2 mt-1"},Qu={key:0,class:"w-5 h-5 mr-1 text-green-600 dark:text-green-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},Ku=l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1),Zu=[Ku],Wu={key:1,class:"w-5 h-5 mr-1",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},Gu=l("g",{fill:"none"},[l("path",{d:"M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7.242a2 2 0 0 0-.602-1.43L16.083 2.57A2 2 0 0 0 14.685 2H10a2 2 0 0 0-2 2z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),l("path",{d:"M16 18v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1),Ju=[Gu],Xu=l("span",{class:"whitespace-nowrap"},"Copy URL",-1),Yu={key:3,class:"pl-2 mt-1"},ed=l("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24"},[l("path",{fill:"currentColor",d:"M6.78 2.72a.75.75 0 0 1 0 1.06L4.56 6h8.69a7.75 7.75 0 1 1-7.75 7.75a.75.75 0 0 1 1.5 0a6.25 6.25 0 1 0 6.25-6.25H4.56l2.22 2.22a.75.75 0 1 1-1.06 1.06l-3.5-3.5a.75.75 0 0 1 0-1.06l3.5-3.5a.75.75 0 0 1 1.06 0Z"})],-1),td=[ed],sd={key:4,class:"pl-2 mt-1"},ld=l("svg",{class:"flex-none w-5 h-5 mr-2 text-gray-400 dark:text-gray-500 group-hover:text-gray-500","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},[l("path",{"fill-rule":"evenodd",d:"M3 3a1 1 0 011-1h12a1 1 0 011 1v3a1 1 0 01-.293.707L12 11.414V15a1 1 0 01-.293.707l-2 2A1 1 0 018 17v-5.586L3.293 6.707A1 1 0 013 6V3z","clip-rule":"evenodd"})],-1),nd={class:"mr-1"},od={key:0,class:"h-5 w-5 text-gray-400 dark:text-gray-500 group-hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},ad=l("path",{"fill-rule":"evenodd",d:"M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z","clip-rule":"evenodd"},null,-1),rd=[ad],id={key:1,class:"h-5 w-5 text-gray-400 dark:text-gray-500 group-hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},ud=l("path",{"fill-rule":"evenodd",d:"M5 10a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1z","clip-rule":"evenodd"},null,-1),dd=[ud],cd={key:5,class:"pl-2 mt-1"},fd=["title"],vd=l("svg",{class:"w-5 h-5 mr-1 text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-50",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z",fill:"currentColor"})],-1),pd={class:"whitespace-nowrap"},md={key:8},hd={key:0,class:"cursor-pointer flex justify-between items-center hover:text-gray-900 dark:hover:text-gray-50"},gd={class:"mr-1 select-none"},yd={key:1,class:"flex justify-between items-center"},bd={class:"mr-1 select-none"},ps=25,wd=de({__name:"AutoQueryGrid",props:{filterDefinitions:{},id:{default:"AutoQueryGrid"},apis:{},type:{},prefs:{},deny:{},hide:{},selectedColumns:{},toolbarButtonClass:{},tableStyle:{},gridClass:{},grid2Class:{},grid3Class:{},grid4Class:{},tableClass:{},theadClass:{},tbodyClass:{},theadRowClass:{},theadCellClass:{},headerTitle:{},headerTitles:{},visibleFrom:{},rowClass:{},rowStyle:{},modelTitle:{},newButtonLabel:{},apiPrefs:{},canFilter:{},disableKeyBindings:{},configureField:{},skip:{default:0},create:{type:Boolean},edit:{},filters:{}},emits:["headerSelected","rowSelected","nav"],setup(e,{expose:d,emit:c}){let{config:p,autoQueryGridDefaults:J}=It(),Y=J,t=p.value.storage,n=e,ee=c,le=Qe("client"),te="filtering,queryString,queryFilters".split(","),ne="copyApiUrl,downloadCsv,filtersView,newItem,pagingInfo,pagingNav,preferences,refresh,resetPreferences,toolbar".split(","),re=v(()=>n.deny?Vt(te,n.deny):Vt(te,Y.value.deny)),se=v(()=>n.hide?Vt(ne,n.hide):Vt(ne,Y.value.hide));function f(e){return re.value[e]}function m(e){return se.value[e]}let g=v(()=>n.tableStyle??Y.value.tableStyle),oe=v(()=>n.gridClass??he.getGridClass(g.value)),ie=v(()=>n.grid2Class??he.getGrid2Class(g.value)),ue=v(()=>n.grid3Class??he.getGrid3Class(g.value)),de=v(()=>n.grid4Class??he.getGrid4Class(g.value)),ve=v(()=>n.tableClass??he.getTableClass(g.value)),ce=v(()=>n.theadClass??he.getTheadClass(g.value)),pe=v(()=>n.theadRowClass??he.getTheadRowClass(g.value)),fe=v(()=>n.theadCellClass??he.getTheadCellClass(g.value)),h=v(()=>n.toolbarButtonClass??he.toolbarButtonClass);function me(e,l){var t,a;return n.rowClass?n.rowClass(e,l):(t=!!Q.value.AnyUpdate,a=(null!=(a=s.value)&&a.name?_e(e,s.value.name):null)==V.value,he.getTableRowClass(n.tableStyle,l,a,t))}let b=al(),ge=v(()=>{var e;return dl((null==(e=Q.value.AnyQuery.viewModel)?void 0:e.name)||Q.value.AnyQuery.dataModel.name)}),be=v(()=>{let l=Object.keys(b).map(e=>e.toLowerCase());return st(ge.value).filter(e=>l.includes(e.name.toLowerCase())||l.includes(e.name.toLowerCase()+"-header")).map(e=>e.name)});let w=v(()=>{var e=(0<(e=Ct(n.selectedColumns)).length?e:0e.toLowerCase());let t=st(ge.value);return 0t.find(e=>e.name.toLowerCase()===l)).filter(e=>null!=e):t}),we=v(()=>{let e=w.value.map(e=>e.name),l=Ct($.value.selectedColumns).map(e=>e.toLowerCase());return 0l.includes(e.toLowerCase())):e}),k=O([]),C=O(new Xe),Ce=O(new Xe),L=O(),M=O(!1),V=O(),S=O(),T=O(!1),A=O(),I=O(n.skip),j=O(!1),$=O({take:ps}),B=O(!1),Le=v(()=>k.value.some(e=>0k.value.map(e=>e.settings.filters.length).reduce((e,l)=>e+l,0)),Ve=v(()=>{var e;return st(dl(a.value||(null==(e=Q.value.AnyQuery)?void 0:e.dataModel.name)))}),s=v(()=>{var e;return ns(dl(a.value||(null==(e=Q.value.AnyQuery)?void 0:e.dataModel.name)))}),E=v(()=>$.value.take??ps),_=v(()=>C.value.response?_e(C.value.response,"results"):[]),D=v(()=>{var e;return((null==(e=C.value.response)?void 0:e.total)||_.value.length)??0}),Fe=v(()=>00_.value.length>=E.value),Oe=v(()=>_.value.length>=E.value),H=O(),P=O(),Ae={NoQuery:"No Query API was found"};function Ie(l){if(l){if(n.canFilter)return n.canFilter(l);var e=Ve.value.find(e=>e.name.toLowerCase()==l.toLowerCase());if(e)return!Mn(e)}}function r(e){ee("nav",e),f("queryString")&&ul(e)}async function R(e){I.value+=e,I.value<0&&(I.value=0);var l=Math.floor(D.value/E.value)*E.value;I.value>l&&(I.value=l),r({skip:I.value||void 0}),await z()}async function $e(e,l){var t,a;S.value=null,V.value=l,e&&l&&(a=Yt(Q.value.AnyQuery,{[e]:l}),(a=await le.api(a)).succeeded)&&((a=null==(a=_e(a.response,"results"))?void 0:a[0])||console.warn(`API ${null==(t=Q.value.AnyQuery)?void 0:t.request.name}(${e}:${l}) returned no results`),S.value=a)}async function Ue(e,l){ee("rowSelected",e,l);var t=null==(t=s.value)?void 0:t.name,a=t?_e(e,t):null;t&&a&&(r({edit:a}),$e(t,a))}function Ee(l,e){var t,a,n;f("filtering")&&(t=e.target,Ie(l)&&"TD"!==(null==t?void 0:t.tagName)&&(t=null==(t=null==t?void 0:t.closest("TABLE"))?void 0:t.getBoundingClientRect(),a=k.value.find(e=>e.name.toLowerCase()==l.toLowerCase()))&&t&&(n=t.x+318+10,A.value={column:a,topLeft:{x:Math.max(Math.floor(e.clientX+159),n),y:t.y+45}}),ee("headerSelected",l,e))}function De(){A.value=null}async function He(e){var l=null==(l=A.value)?void 0:l.column;l&&(l.settings=e,t.setItem(u(l.name),JSON.stringify(l.settings)),await z()),A.value=null}async function Pe(e){t.setItem(u(e.name),JSON.stringify(e.settings)),await z()}async function Re(e){T.value=!1,$.value=e,t.setItem(ol(),JSON.stringify(e)),await z()}function ze(e){var l;H.value&&(Object.assign(null==(l=H.value)?void 0:l.model,e),Ze())}function Ne(e){Object.assign(S.value,e),Ze()}function Ze(){null!=(e=H.value)&&e.forceUpdate(),null!=(e=P.value)&&e.forceUpdate();var e=Be();null!=(e=null==e?void 0:e.proxy)&&e.$forceUpdate()}async function z(){await Ke(We())}async function Ge(){await z()}d({update:z,search:Ke,createRequestArgs:We,reset:Ll,createDone:W,createSave:Cl,editDone:K,editSave:kl,forceUpdate:Ze,setEdit:Ne,edit:S,createForm:H,editForm:P,apiPrefs:$,results:_,skip:I,take:E,total:D}),G.interceptors.has("AutoQueryGrid.new")&&G.interceptors.invoke("AutoQueryGrid.new",{props:n});let qe=/iPad|iPhone|iPod/.test(navigator.userAgent);async function Ke(t){var a=Q.value.AnyQuery;if(a){let e=Yt(a,t),l=await le.api(e);dn(e=>{C.value.response=C.value.error=void 0,B.value=e,qe?St(()=>C.value=l):C.value=l})();a=_e(l.response,"results")||[];l.succeeded&&a.label}else console.error(Ae.NoQuery)}function We(){let r={include:"total",take:E.value},l=Ct($.value.selectedColumns||n.selectedColumns);if(0{var e,l=a.find(e=>e.name.toLowerCase()==t.toLowerCase());null!=(e=null==l?void 0:l.ref)&&e.selfId&&n.push(l.ref.selfId),_e(b,t)&&n.push(...a.filter(e=>{var l;return(null==(l=null==(l=e.ref)?void 0:l.selfId)?void 0:l.toLowerCase())==t.toLowerCase()}).map(e=>e.name))}),n.forEach(e=>{l.includes(e)||l.push(e)}),r.fields=l.join(",")}let e=[];if(k.value.forEach(t=>{t.settings.sort&&e.push(("DESC"===t.settings.sort?"-":"")+t.name),t.settings.filters.forEach(e=>{var l=e.key.replace("%",t.name);r[l]=e.value})}),n.filters&&Object.keys(n.filters).forEach(e=>{r[e]=n.filters[e]}),f("queryString")&&f("queryFilters")){var t=location.search||(location.hash.includes("?")?"?"+ms(location.hash,"?"):"");let e=Zs(t);Object.keys(e).forEach(l=>{w.value.find(e=>e.name.toLowerCase()===l.toLowerCase())&&(r[l]=e[l])}),typeof e.skip<"u"&&(t=parseInt(e.skip),isNaN(t)||(I.value=r.skip=t))}return"u"j.value=!1,3e3)}function ll(e="json"){var l=We(),t="/api/"+(null==(t=Q.value.AnyQuery)?void 0:t.request.name),t=Do(le.baseUrl,Et(t,{...l,jsconfig:"edv"}));return 0<=t.indexOf("?")?Ls(t,"?")+"."+e+"?"+ms(t,"?"):t+".json"}async function tl(){k.value.forEach(e=>{e.settings={filters:[]},t.removeItem(u(e.name))}),$.value={take:ps},t.removeItem(ol()),await z()}function nl(){M.value=!0,r({create:null})}let a=v(()=>qt(n.type)),N=v(()=>{var e;return a.value||(null==(e=Q.value.AnyQuery)?void 0:e.dataModel.name)}),q=v(()=>n.modelTitle||N.value),sl=v(()=>n.newButtonLabel||"New "+q.value),ol=()=>{var e;return n.id+"/ApiPrefs/"+(a.value||(null==(e=Q.value.AnyQuery)?void 0:e.dataModel.name))},u=e=>{var l;return`Column/${n.id}:${a.value||(null==(l=Q.value.AnyQuery)?void 0:l.dataModel.name)}.`+e},{metadataApi:il,typeOf:dl,apiOf:vl,filterDefinitions:cl}=lt(),pl=Tl().invalidAccessMessage,fl=v(()=>n.filterDefinitions||cl.value),Q=v(()=>{var e=Ct(n.apis);return 0vl(e)).filter(e=>null!=e).map(e=>e)):Nt.forType(a.value,il.value)}),ml=e=>`${e}`,gl=v(()=>{var e;return il.value?0<(e=Ct(n.apis).map(e=>null==vl(e)?e:null).filter(e=>null!=e)).length?ml(`Unknown API${1useMetadata()`)}),yl=v(()=>Q.value.AnyQuery&&pl(Q.value.AnyQuery)),hl=v(()=>Q.value.Create&&pl(Q.value.Create)),bl=v(()=>Q.value.AnyUpdate&&pl(Q.value.AnyUpdate)),xl=v(()=>bs(Q.value.Create)),wl=(v(()=>bs(Q.value.AnyUpdate)),v(()=>bs(Q.value.Delete)));function K(){S.value=null,V.value=null,r({edit:void 0})}function W(){M.value=!1,r({create:void 0})}async function kl(){await z(),K()}async function Cl(){await z(),W()}function Ll(){C.value=new Xe,Ce.value=new Xe,M.value=!1,V.value=null,S.value=null,T.value=!1,A.value=null,I.value=n.skip,j.value=!1,$.value={take:ps},B.value=!1;var e,l=n.prefs||$s(t.getItem(ol())),l=(l&&($.value=l),k.value=w.value.map(e=>({name:e.name,type:e.type,meta:e,settings:Object.assign({filters:[]},$s(t.getItem(u(e.name))))})),isNaN(n.skip)||(I.value=n.skip),null==(l=s.value)?void 0:l.name);f("queryString")&&(e=location.search||(location.hash.includes("?")?"?"+ms(location.hash,"?"):""),typeof(e=Zs(e)).create<"u"?M.value=typeof e.create<"u":!l||"string"!=typeof e.edit&&"number"!=typeof e.edit||$e(l,e.edit)),!0===n.create&&(M.value=!0),l&&null!=n.edit&&$e(l,n.edit)}return Ye(async()=>{Ll(),await z()}),(t,e)=>{let a=Z("Alert"),n=Z("EnsureAccessDialog"),r=Z("AutoCreateForm"),s=Z("AutoEditForm"),u=Z("AutoViewForm"),d=Z("ErrorSummary"),v=Z("Loading"),c=Z("SettingsIcons"),p=Z("DataGrid");return gl.value?(o(),i("div",iu,[ye(a,{innerHTML:gl.value},null,8,["innerHTML"])])):yl.value?(o(),i("div",uu,[ye(lo,{"invalid-access":yl.value},null,8,["invalid-access"])])):(o(),i("div",du,[M.value&&Q.value.Create?(o(),i("div",cu,[hl.value?(o(),ae(n,{key:0,title:"Create "+q.value,"invalid-access":hl.value,"alert-class":"text-yellow-700",onDone:W},null,8,["title","invalid-access"])):X(b).createform?U(t.$slots,"createform",{key:1,type:Q.value.Create.request.name,configure:t.configureField,done:W,save:Cl}):(o(),ae(r,{key:2,ref_key:"createForm",ref:H,type:Q.value.Create.request.name,configure:t.configureField,onDone:W,onSave:Cl},{header:xe(()=>[U(t.$slots,"formheader",{form:"create",formInstance:H.value,apis:Q.value,type:N.value,updateModel:ze})]),footer:xe(()=>[U(t.$slots,"formfooter",{form:"create",formInstance:H.value,apis:Q.value,type:N.value,updateModel:ze})]),_:3},8,["type","configure"]))])):S.value&&Q.value.AnyUpdate?(o(),i("div",fu,[bl.value?(o(),ae(n,{key:0,title:"Update "+q.value,"invalid-access":bl.value,"alert-class":"text-yellow-700",onDone:K},null,8,["title","invalid-access"])):X(b).editform?U(t.$slots,"editform",{key:1,model:S.value,type:Q.value.AnyUpdate.request.name,deleteType:wl.value?Q.value.Delete.request.name:null,configure:t.configureField,done:K,save:kl}):(o(),ae(s,{key:2,ref_key:"editForm",ref:P,modelValue:S.value,"onUpdate:modelValue":e[0]||(e[0]=e=>S.value=e),type:Q.value.AnyUpdate.request.name,deleteType:wl.value?Q.value.Delete.request.name:null,configure:t.configureField,onDone:K,onSave:kl,onDelete:kl},{header:xe(()=>[U(t.$slots,"formheader",{form:"edit",formInstance:P.value,apis:Q.value,type:N.value,model:S.value,id:V.value,updateModel:Ne})]),footer:xe(()=>[U(t.$slots,"formfooter",{form:"edit",formInstance:P.value,apis:Q.value,type:N.value,model:S.value,id:V.value,updateModel:Ne})]),_:3},8,["modelValue","type","deleteType","configure"]))])):S.value?(o(),i("div",vu,[X(b).viewform?U(t.$slots,"viewform",{key:0,model:S.value,apis:Q.value,done:K}):(o(),ae(u,{key:1,model:S.value,apis:Q.value,done:K},null,8,["model","apis"]))])):x("",!0),X(b).toolbar?U(t.$slots,"toolbar",{key:3}):m("toolbar")?(o(),i("div",pu,[T.value?(o(),ae(jl,{key:0,columns:w.value,prefs:$.value,onDone:e[1]||(e[1]=e=>T.value=!1),onSave:Re},null,8,["columns","prefs"])):x("",!0),l("div",mu,[l("div",hu,[m("preferences")?(o(),i("button",{key:0,type:"button",class:"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400",title:q.value+" Preferences",onClick:e[2]||(e[2]=e=>T.value=!T.value)},bu,8,gu)):x("",!0),m("pagingNav")?(o(),i("button",{key:1,type:"button",class:y(["pl-2",Fe.value?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"First page",disabled:!Fe.value,onClick:e[3]||(e[3]=e=>R(-D.value))},_u,10,wu)):x("",!0),m("pagingNav")?(o(),i("button",{key:2,type:"button",class:y(["pl-2",Se.value?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"Previous page",disabled:!Se.value,onClick:e[4]||(e[4]=e=>R(-E.value))},xu,10,$u)):x("",!0),m("pagingNav")?(o(),i("button",{key:3,type:"button",class:y(["pl-2",Te.value?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"Next page",disabled:!Te.value,onClick:e[5]||(e[5]=e=>R(E.value))},Su,10,Lu)):x("",!0),m("pagingNav")?(o(),i("button",{key:4,type:"button",class:y(["pl-2",Oe.value?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"Last page",disabled:!Oe.value,onClick:e[6]||(e[6]=e=>R(D.value))},Tu,10,Mu)):x("",!0)]),m("pagingInfo")?(o(),i("div",Fu,[l("div",Iu,[B.value?(o(),i("span",ju,"Querying...")):x("",!0),_.value.length?(o(),i("span",Ou,[Du,ke(" "+F(I.value+1)+" - "+F(Math.min(I.value+_.value.length,D.value))+" ",1),l("span",null," of "+F(D.value),1)])):C.value.completed?(o(),i("span",Pu,"No Results")):x("",!0)])])):x("",!0),l("div",Bu,[m("refresh")?(o(),i("div",Hu,[l("button",{type:"button",onClick:Ge,title:"Refresh",class:y(h.value)},Eu,2)])):x("",!0),m("downloadCsv")?(o(),i("div",zu,[l("button",{type:"button",onClick:Je,title:"Download CSV",class:y(h.value)},Uu,2)])):x("",!0),m("copyApiUrl")?(o(),i("div",qu,[l("button",{type:"button",onClick:el,title:"Copy API URL",class:y(h.value)},[j.value?(o(),i("svg",Qu,Zu)):(o(),i("svg",Wu,Ju)),Xu],2)])):x("",!0),Le.value&&m("resetPreferences")?(o(),i("div",Yu,[l("button",{type:"button",onClick:tl,title:"Reset Preferences & Filters",class:y(h.value)},td,2)])):x("",!0),m("filtersView")&&0L.value="filters"==L.value?null:"filters"),class:y(h.value),"aria-expanded":"false"},[ld,l("span",nd,F(Me.value)+" "+F(1==Me.value?"Filter":"Filters"),1),"filters"!=L.value?(o(),i("svg",od,rd)):(o(),i("svg",id,dd))],2)])):x("",!0),m("newItem")&&Q.value.Create&&xl.value?(o(),i("div",cd,[l("button",{type:"button",onClick:nl,title:q.value,class:y(h.value)},[vd,l("span",pd,F(sl.value),1)],10,fd)])):x("",!0),X(b).toolbarbuttons?U(t.$slots,"toolbarbuttons",{key:6,toolbarButtonClass:h.value}):x("",!0)])])])):x("",!0),"filters"==L.value?(o(),ae(Il,{key:5,class:"border-y border-gray-200 dark:border-gray-800 py-8 my-2",definitions:fl.value,columns:k.value,onDone:e[8]||(e[8]=e=>L.value=null),onChange:Pe},null,8,["definitions","columns"])):x("",!0),Ce.value.error??C.value.error?(o(),ae(d,{key:6,status:Ce.value.error??C.value.error},null,8,["status"])):B.value?(o(),ae(v,{key:7,class:"p-2"})):x("",!0),A.value?(o(),i("div",md,[ye(Fl,{definitions:fl.value,column:A.value.column,"top-left":A.value.topLeft,onDone:De,onSave:He},null,8,["definitions","column","top-left"])])):x("",!0),_.value.length?(o(),ae(p,{key:9,id:t.id,items:_.value,type:t.type,"selected-columns":we.value,class:"mt-1",onFiltersChanged:z,tableStyle:g.value,gridClass:oe.value,grid2Class:ie.value,grid3Class:ue.value,grid4Class:de.value,tableClass:ve.value,theadClass:ce.value,theadRowClass:pe.value,theadCellClass:fe.value,tbodyClass:t.tbodyClass,rowClass:me,onRowSelected:Ue,rowStyle:t.rowStyle,headerTitle:t.headerTitle,headerTitles:t.headerTitles,visibleFrom:t.visibleFrom,onHeaderSelected:Ee},rl({header:xe(({column:t,label:e})=>{var a;return[f("filtering")&&Ie(t)?(o(),i("div",hd,[l("span",gd,F(e),1),ye(c,{column:k.value.find(e=>e.name.toLowerCase()===t.toLowerCase()),"is-open":(null==(a=A.value)?void 0:a.column.name)===t},null,8,["column","is-open"])])):(o(),i("div",yd,[l("span",bd,F(e),1)]))]}),_:2},[je(Object.keys(X(b)),l=>({name:l,fn:xe(e=>[U(t.$slots,l,Rt(ks(e)))])}))]),1032,["id","items","type","selected-columns","tableStyle","gridClass","grid2Class","grid3Class","grid4Class","tableClass","theadClass","theadRowClass","theadCellClass","tbodyClass","rowStyle","headerTitle","headerTitles","visibleFrom"])):x("",!0)]))}}}),kd={class:"flex"},_d={key:0,class:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},$d=l("g",{fill:"none"},[l("path",{d:"M3 4a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v2.586a1 1 0 0 1-.293.707l-6.414 6.414a1 1 0 0 0-.293.707V17l-4 4v-6.586a1 1 0 0 0-.293-.707L3.293 7.293A1 1 0 0 1 3 6.586V4z",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})],-1),Cd=[$d],xd=l("path",{d:"M505.5 658.7c3.2 4.4 9.7 4.4 12.9 0l178-246c3.8-5.3 0-12.7-6.5-12.7H643c-10.2 0-19.9 4.9-25.9 13.2L512 558.6L406.8 413.2c-6-8.3-15.6-13.2-25.9-13.2H334c-6.5 0-10.3 7.4-6.5 12.7l178 246z",fill:"currentColor"},null,-1),Ld=l("path",{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z",fill:"currentColor"},null,-1),Vd=[xd,Ld],Sd={key:2,class:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Md=l("g",{fill:"none"},[l("path",{d:"M8.998 4.71L6.354 7.354a.5.5 0 1 1-.708-.707L9.115 3.18A.499.499 0 0 1 9.498 3H9.5a.5.5 0 0 1 .354.147l.01.01l3.49 3.49a.5.5 0 1 1-.707.707l-2.65-2.649V16.5a.5.5 0 0 1-1 0V4.71z",fill:"currentColor"})],-1),Ad=[Md],Td={key:3,class:"w-4 h-4",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20"},Fd=l("g",{fill:"none"},[l("path",{d:"M10.002 15.29l2.645-2.644a.5.5 0 0 1 .707.707L9.886 16.82a.5.5 0 0 1-.384.179h-.001a.5.5 0 0 1-.354-.147l-.01-.01l-3.49-3.49a.5.5 0 1 1 .707-.707l2.648 2.649V3.5a.5.5 0 0 1 1 0v11.79z",fill:"currentColor"})],-1),Id=[Fd],jd=de({__name:"SettingsIcons",props:{column:{},isOpen:{type:Boolean}},setup(e){return(e,l)=>{var t;return o(),i("div",kd,[null!=(t=null==(t=null==(t=e.column)?void 0:t.settings)?void 0:t.filters)&&t.length?(o(),i("svg",_d,Cd)):(o(),i("svg",{key:1,class:y(["w-4 h-4 transition-transform",e.isOpen?"rotate-180":""]),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},Vd,2)),"ASC"===(null==(t=null==(t=e.column)?void 0:t.settings)?void 0:t.sort)?(o(),i("svg",Sd,Ad)):"DESC"===(null==(t=null==(t=e.column)?void 0:t.settings)?void 0:t.sort)?(o(),i("svg",Td,Id)):x("",!0)])}}}),Od=de({__name:"EnsureAccessDialog",props:{title:{},subtitle:{},invalidAccess:{},alertClass:{}},emits:["done"],setup(e){return(l,e)=>{let t=Z("EnsureAccess"),a=Z("SlideOver");return l.invalidAccess?(o(),ae(a,{key:0,title:l.title,onDone:e[0]||(e[0]=e=>l.$emit("done")),"content-class":"relative flex-1"},rl({default:xe(()=>[ye(t,{alertClass:l.alertClass,invalidAccess:l.invalidAccess},null,8,["alertClass","invalidAccess"])]),_:2},[l.subtitle?{name:"subtitle",fn:xe(()=>[ke(F(l.subtitle),1)]),key:"0"}:void 0]),1032,["title"])):x("",!0)}}}),Dd=["for"],Pd={class:"mt-1 relative rounded-md shadow-sm"},Bd=["type","name","id","placeholder","value","aria-invalid","aria-describedby"],Hd={key:0,class:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"},Rd=l("svg",{class:"h-5 w-5 text-red-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[l("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1),Ed=[Rd],zd=["id"],Nd=["id"],Ud={inheritAttrs:!1},qd=de({...Ud,__name:"TextInput",props:{status:{},id:{},type:{},inputClass:{},label:{},labelClass:{},help:{},placeholder:{},modelValue:{}},setup(e,{expose:t}){let a=e,n=(t({focus:function(){var e;null!=(e=n.value)&&e.focus()}}),O());let r=v(()=>a.type||"text"),s=v(()=>a.label??Pe(at(a.id))),u=v(()=>a.placeholder??s.value),d=Qe("ApiState",void 0),c=v(()=>mt.call({responseStatus:a.status??(null==d?void 0:d.error.value)},a.id)),p=v(()=>[ot.base,c.value?ot.invalid:ot.valid,a.inputClass]);return(t,e)=>(o(),i("div",{class:y([t.$attrs.class])},[U(t.$slots,"header",Te({inputElement:n.value,id:t.id,modelValue:t.modelValue,status:t.status},t.$attrs)),s.value?(o(),i("label",{key:0,for:t.id,class:y("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(t.labelClass??""))},F(s.value),11,Dd)):x("",!0),l("div",Pd,[l("input",Te({ref_key:"inputElement",ref:n,type:r.value,name:t.id,id:t.id,class:p.value,placeholder:u.value,value:X(pn)(r.value,t.modelValue),onInput:e[0]||(e[0]=e=>t.$emit("update:modelValue",e.target.value)),"aria-invalid":null!=c.value,"aria-describedby":t.id+"-error",step:"any"},X(ft)(t.$attrs,["class","value"])),null,16,Bd),c.value?(o(),i("div",Hd,Ed)):x("",!0)]),c.value?(o(),i("p",{key:1,class:"mt-2 text-sm text-red-500",id:t.id+"-error"},F(c.value),9,zd)):t.help?(o(),i("p",{key:2,class:"mt-2 text-sm text-gray-500",id:t.id+"-description"},F(t.help),9,Nd)):x("",!0),U(t.$slots,"footer",Te({inputElement:n.value,id:t.id,modelValue:t.modelValue,status:t.status},t.$attrs))],2))}}),Qd=["for"],Kd={class:"mt-1 relative rounded-md shadow-sm"},Zd=["name","id","placeholder","aria-invalid","aria-describedby"],Wd=["id"],Gd=["id"],Jd={inheritAttrs:!1},Xd=de({...Jd,__name:"TextareaInput",props:{status:{},id:{},inputClass:{},label:{},labelClass:{},help:{},placeholder:{},modelValue:{}},setup(e){let t=e,a=v(()=>t.label??Pe(at(t.id))),n=v(()=>t.placeholder??a.value),r=Qe("ApiState",void 0),s=v(()=>mt.call({responseStatus:t.status??(null==r?void 0:r.error.value)},t.id)),u=v(()=>["shadow-sm "+ot.base,s.value?"text-red-900 focus:ring-red-500 focus:border-red-500 border-red-300":"text-gray-900 "+ot.valid,t.inputClass]);return(t,e)=>(o(),i("div",{class:y([t.$attrs.class])},[a.value?(o(),i("label",{key:0,for:t.id,class:y("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(t.labelClass??""))},F(a.value),11,Qd)):x("",!0),l("div",Kd,[l("textarea",Te({name:t.id,id:t.id,class:u.value,placeholder:n.value,onInput:e[0]||(e[0]=e=>t.$emit("update:modelValue",e.target.value)),"aria-invalid":null!=s.value,"aria-describedby":t.id+"-error"},X(ft)(t.$attrs,["class"])),F(t.modelValue),17,Zd)]),s.value?(o(),i("p",{key:1,class:"mt-2 text-sm text-red-500",id:t.id+"-error"},F(s.value),9,Wd)):t.help?(o(),i("p",{key:2,class:"mt-2 text-sm text-gray-500",id:t.id+"-description"},F(t.help),9,Gd)):x("",!0)],2))}}),Yd=["for"],ec=["id","name","value","aria-invalid","aria-describedby"],tc=["value"],sc=["id"],lc={inheritAttrs:!1},nc=de({...lc,__name:"SelectInput",props:{status:{},id:{},modelValue:{},inputClass:{},label:{},labelClass:{},options:{},values:{},entries:{}},setup(e){let t=e,a=v(()=>t.label??Pe(at(t.id))),n=Qe("ApiState",void 0),r=v(()=>mt.call({responseStatus:t.status??(null==n?void 0:n.error.value)},t.id)),s=v(()=>t.entries||(t.values?t.values.map(e=>({key:e,value:e})):t.options?Object.keys(t.options).map(e=>({key:e,value:t.options[e]})):[]));return(t,e)=>(o(),i("div",{class:y([t.$attrs.class])},[a.value?(o(),i("label",{key:0,for:t.id,class:y("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(t.labelClass??""))},F(a.value),11,Yd)):x("",!0),l("select",Te({id:t.id,name:t.id,class:["mt-1 block w-full pl-3 pr-10 py-2 text-base focus:outline-none sm:text-sm rounded-md dark:text-white dark:bg-gray-900 dark:border-gray-600",r.value?"border-red-300 text-red-900 focus:ring-red-500 focus:border-red-500":"border-gray-300 text-gray-900 focus:ring-indigo-500 focus:border-indigo-500",t.inputClass],value:t.modelValue,onInput:e[0]||(e[0]=e=>t.$emit("update:modelValue",e.target.value)),"aria-invalid":null!=r.value,"aria-describedby":t.id+"-error"},X(ft)(t.$attrs,["class"])),[(o(!0),i(Me,null,je(s.value,e=>(o(),i("option",{value:e.key},F(e.value),9,tc))),256))],16,ec),r.value?(o(),i("p",{key:1,class:"mt-2 text-sm text-red-500",id:t.id+"-error"},F(r.value),9,sc)):x("",!0)],2))}}),oc={class:"flex items-center h-5"},ac=["id","name","checked"],rc={class:"ml-3 text-sm"},ic=["for"],uc={key:0,class:"mt-2 text-sm text-red-500",id:"`${id}-error`"},dc={key:1,class:"mt-2 text-sm text-gray-500",id:"`${id}-description`"},cc={inheritAttrs:!1},fc=de({...cc,__name:"CheckboxInput",props:{modelValue:{type:Boolean},status:{},id:{},inputClass:{},label:{},labelClass:{},help:{}},emits:["update:modelValue"],setup(e,{}){let t=e,a=v(()=>t.label??Pe(at(t.id))),n=Qe("ApiState",void 0),r=v(()=>mt.call({responseStatus:t.status??(null==n?void 0:n.error.value)},t.id));return(t,e)=>(o(),i("div",{class:y(["relative flex items-start",t.$attrs.class])},[l("div",oc,[l("input",Te({id:t.id,name:t.id,type:"checkbox",checked:t.modelValue,onInput:e[0]||(e[0]=e=>t.$emit("update:modelValue",e.target.checked)),class:["focus:ring-indigo-500 h-4 w-4 text-indigo-600 rounded border-gray-300 dark:border-gray-600 dark:bg-gray-800",t.inputClass]},X(ft)(t.$attrs,["class"])),null,16,ac)]),l("div",rc,[l("label",{for:t.id,class:y("font-medium text-gray-700 dark:text-gray-300 "+(t.labelClass??""))},F(a.value),11,ic),r.value?(o(),i("p",uc,F(r.value),1)):t.help?(o(),i("p",dc,F(t.help),1)):x("",!0)])],2))}}),vc=["id"],pc=["for"],mc={class:"mt-1 relative rounded-md shadow-sm"},hc=["id","name","value"],gc={class:"flex flex-wrap pb-1.5"},yc={class:"pt-1.5 pl-1"},bc={class:"inline-flex rounded-full items-center py-0.5 pl-2.5 pr-1 text-sm font-medium bg-indigo-100 dark:bg-indigo-800 text-indigo-700 dark:text-indigo-300"},wc=["onClick"],kc=l("svg",{class:"h-2 w-2",stroke:"currentColor",fill:"none",viewBox:"0 0 8 8"},[l("path",{"stroke-linecap":"round","stroke-width":"1.5",d:"M1 1l6 6m0-6L1 7"})],-1),_c=[kc],$c={class:"pt-1.5 pl-1 shrink"},Cc=["type","name","id","aria-invalid","aria-describedby"],xc=["id"],Lc=["onMouseover","onClick"],Vc={class:"block truncate"},Sc={key:1,class:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"},Mc=l("svg",{class:"h-5 w-5 text-red-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[l("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1),Ac=[Mc],Tc=["id"],Fc=["id"],Ic={inheritAttrs:!1},jc=de({...Ic,__name:"TagInput",props:{status:{},id:{},type:{},inputClass:{},label:{},labelClass:{},help:{},modelValue:{default:()=>[]},delimiters:{default:()=>[","]},allowableValues:{},string:{type:Boolean},maxVisibleItems:{default:300},converter:{}},emits:["update:modelValue"],setup(e,{emit:t}){let a=e,n=t;let r=v(()=>{return Ze((e=a.modelValue,a.converter?a.converter(e):e),e=>"string"==typeof e?0==e.trim().length?[]:e.split(","):e)||[];var e}),s=O(),u=O(!1),d=v(()=>{let l=p.value.toLowerCase();return a.allowableValues&&0!=a.allowableValues.length?a.allowableValues.length<1e3?a.allowableValues.filter(e=>!r.value.includes(e)&&e.toLowerCase().includes(l)):a.allowableValues.filter(e=>!r.value.includes(e)&&e.startsWith(l)):[]});let c=O(null),p=O(""),f=v(()=>a.type||"text"),m=v(()=>a.label??Pe(at(a.id))),g=Qe("ApiState",void 0),h=v(()=>mt.call({responseStatus:a.status??(null==g?void 0:g.error.value)},a.id)),b=v(()=>["w-full cursor-text flex flex-wrap sm:text-sm rounded-md dark:text-white dark:bg-gray-900 border focus-within:border-transparent focus-within:ring-1 focus-within:outline-none",h.value?"pr-10 border-red-300 text-red-900 placeholder-red-300 focus-within:outline-none focus-within:ring-red-500 focus-within:border-red-500":"shadow-sm border-gray-300 dark:border-gray-600 focus-within:ring-indigo-500 focus-within:border-indigo-500",a.inputClass]),w=l=>V(r.value.filter(e=>e!=l));function k(e){var l;document.activeElement===e.target&&null!=(l=c.value)&&l.focus()}let C=O();function L(){u.value=!0,C.value=!0}function M(){B(T()),C.value=!1,setTimeout(()=>{C.value||(u.value=!1)},200)}function V(e){var l=a.string?e.join(","):e;n("update:modelValue",l)}function S(e){var l;"Backspace"==e.key&&0==p.value.length&&0e==l.key))&&l.preventDefault(),"Enter"==l.key||"NumpadEnter"==l.key||1==l.key.length&&e)&&B(t)}let I={behavior:"smooth",block:"nearest",inline:"nearest",scrollMode:"if-needed"};function j(){setTimeout(()=>{var e=_s(`#${a.id}-tag li.active`);e&&e.scrollIntoView(I)},0)}function $(){setTimeout(()=>{var e=_s(`#${a.id}-tag li.active`);e&&("scrollIntoViewIfNeeded"in e?e.scrollIntoViewIfNeeded(I):e.scrollIntoView(I))},0)}function B(e){var l;0!==e.length&&(-1==(l=Array.from(r.value)).indexOf(e)&&l.push(e),V(l),p.value="",u.value=!1)}function U(t){var e,t=null==(e=t.clipboardData)?void 0:e.getData("Text");if(t){let e=new RegExp("\\n|\\t|"+a.delimiters.join("|")),l=Array.from(r.value);t.split(e).map(e=>e.trim()).forEach(e=>{-1==l.indexOf(e)&&l.push(e)}),V(l),p.value=""}}return(e,t)=>(o(),i("div",{class:y([e.$attrs.class]),id:e.id+"-tag",onmousemove:"cancelBlur=true"},[m.value?(o(),i("label",{key:0,for:e.id,class:y("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(e.labelClass??""))},F(m.value),11,pc)):x("",!0),l("div",mc,[l("input",{type:"hidden",id:e.id,name:e.id,value:r.value.join(",")},null,8,hc),l("button",{class:y(b.value),onClick:Ue(k,["prevent"]),onFocus:t[2]||(t[2]=e=>u.value=!0),tabindex:"-1"},[l("div",gc,[(o(!0),i(Me,null,je(r.value,t=>(o(),i("div",yc,[l("span",bc,[ke(F(t)+" ",1),l("button",{type:"button",onClick:e=>w(t),class:"flex-shrink-0 ml-1 h-4 w-4 rounded-full inline-flex items-center justify-center text-indigo-400 dark:text-indigo-500 hover:bg-indigo-200 dark:hover:bg-indigo-800 hover:text-indigo-500 dark:hover:text-indigo-400 focus:outline-none focus:bg-indigo-500 focus:text-white dark:focus:text-black"},_c,8,wc)])]))),256)),l("div",$c,[Mt(l("input",Te({ref_key:"txtInput",ref:c,type:f.value,role:"combobox","aria-controls":"options","aria-expanded":"false",autocomplete:"off",spellcheck:"false",name:e.id+"-txt",id:e.id+"-txt",class:"p-0 dark:bg-transparent rounded-md border-none focus:!border-none focus:!outline-none",style:`box-shadow:none !important;width:${p.value.length+1}ch`,"onUpdate:modelValue":t[0]||(t[0]=e=>p.value=e),"aria-invalid":null!=h.value,"aria-describedby":e.id+"-error",onKeydown:S,onKeypress:A,onPaste:Ue(U,["prevent","stop"]),onFocus:L,onBlur:M,onClick:t[1]||(t[1]=e=>u.value=!0)},X(ft)(e.$attrs,["class","required"])),null,16,Cc),[[wo,p.value]])])])],34),u.value&&d.value.length?(o(),i("ul",{key:0,class:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white dark:bg-black py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",onKeydown:S,id:e.id+"-options",role:"listbox"},[(o(!0),i(Me,null,je(d.value.slice(0,e.maxVisibleItems),t=>(o(),i("li",{class:y([t===s.value?"active bg-indigo-600 text-white":"text-gray-900 dark:text-gray-100","relative cursor-default select-none py-2 pl-3 pr-9"]),onMouseover:e=>{var l;l=t,s.value=l},onClick:e=>B(t),role:"option",tabindex:"-1"},[l("span",Vc,F(t),1)],42,Lc))),256))],40,xc)):x("",!0),h.value?(o(),i("div",Sc,Ac)):x("",!0)]),h.value?(o(),i("p",{key:1,class:"mt-2 text-sm text-red-500",id:e.id+"-error"},F(h.value),9,Tc)):e.help?(o(),i("p",{key:2,class:"mt-2 text-sm text-gray-500",id:e.id+"-description"},F(e.help),9,Fc)):x("",!0)],10,vc))}}),Oc={class:"relative flex-grow mr-2 sm:mr-4"},Dc=["for"],Pc={class:"block mt-2"},Bc={class:"sr-only"},Hc=["multiple","name","id","placeholder","aria-invalid","aria-describedby"],Rc={key:0,class:"absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none"},Ec=l("svg",{class:"h-5 w-5 text-red-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[l("path",{"fill-rule":"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"})],-1),zc=[Ec],Nc=["id"],Uc=["id"],qc={key:0},Qc=["title"],Kc=["alt","src"],Zc={key:1,class:"mt-3"},Wc={class:"w-full"},Gc={class:"pr-6 align-bottom pb-2"},Jc=["title"],Xc=["src","onError"],Yc=["href"],e0={key:1,class:"overflow-hidden"},t0={class:"align-top pb-2 whitespace-nowrap"},s0={key:0,class:"text-gray-500 dark:text-gray-400 text-sm bg-white dark:bg-black"},l0=de({__name:"FileInput",props:{multiple:{type:Boolean},status:{},id:{},inputClass:{},label:{},labelClass:{},help:{},placeholder:{},modelValue:{},values:{},files:{}},setup(e){let t,a=e,n=O(null),{assetsPathResolver:r,fallbackPathResolver:s}=It(),u={},d=O(),c=O((null==(t=a.files)?void 0:t.map(p))||[]);function p(e){return e.filePath=r(e.filePath),e}a.values&&0{var l=e.replace(/\\/g,"/");return{fileName:rn(At(l,"/"),"."),filePath:l,contentType:Ys(l)}}).map(p));let f=v(()=>a.label??Pe(at(a.id))),m=v(()=>a.placeholder??f.value),g=Qe("ApiState",void 0),h=v(()=>mt.call({responseStatus:a.status??(null==g?void 0:g.error.value)},a.id)),b=v(()=>["block w-full sm:text-sm rounded-md dark:text-white dark:bg-gray-900 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-violet-50 dark:file:bg-violet-900 file:text-violet-700 dark:file:text-violet-200 hover:file:bg-violet-100 dark:hover:file:bg-violet-800",h.value?"pr-10 border-red-300 text-red-900 placeholder-red-300 focus:outline-none focus:ring-red-500 focus:border-red-500":"text-slate-500 dark:text-slate-400",a.inputClass]),w=e=>{var l=e.target;d.value="",c.value=Array.from(l.files||[]).map(e=>({fileName:e.name,filePath:pl(e),contentLength:e.size,contentType:e.type||Ys(e.name)}))},k=()=>{var e;return null==(e=n.value)?void 0:e.click()},C=e=>null!=e&&(e.startsWith("data:")||e.startsWith("blob:")),L=v(()=>{var e;return 0!e||e.startsWith("data:")||e.endsWith(".svg")?"":"rounded-full object-cover";function V(e){d.value=s(L.value)}return Ft(Cn),(e,t)=>(o(),i("div",{class:y(["flex",e.multiple?"flex-col":"justify-between"])},[l("div",Oc,[f.value?(o(),i("label",{key:0,for:e.id,class:y("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(e.labelClass??""))},F(f.value),11,Dc)):x("",!0),l("div",Pc,[l("span",Bc,F(e.help??f.value),1),l("input",Te({ref_key:"input",ref:n,type:"file",multiple:e.multiple,name:e.id,id:e.id,class:b.value,placeholder:m.value,"aria-invalid":null!=h.value,"aria-describedby":e.id+"-error"},e.$attrs,{onChange:w}),null,16,Hc),h.value?(o(),i("div",Rc,zc)):x("",!0)]),h.value?(o(),i("p",{key:1,class:"mt-2 text-sm text-red-500",id:e.id+"-error"},F(h.value),9,Nc)):e.help?(o(),i("p",{key:2,class:"mt-2 text-sm text-gray-500",id:e.id+"-description"},F(e.help),9,Uc)):x("",!0)]),e.multiple?(o(),i("div",Zc,[l("table",Wc,[(o(!0),i(Me,null,je(c.value,t=>(o(),i("tr",null,[l("td",Gc,[l("div",{class:"flex w-full",title:C(t.filePath)?"":t.filePath},[l("img",{src:u[X(xt)(t.filePath)]||X(r)(X(xt)(t.filePath)),class:y(["mr-2 h-8 w-8",M(t.filePath)]),onError:e=>u[X(xt)(t.filePath)]=X(s)(X(xt)(t.filePath))},null,42,Xc),C(t.filePath)?(o(),i("span",e0,F(t.fileName),1)):(o(),i("a",{key:0,href:X(r)(t.filePath||""),target:"_blank",class:"overflow-hidden"},F(t.fileName),9,Yc))],8,Jc)]),l("td",t0,[t.contentLength&&0[]},modelValue:{},match:{},viewCount:{default:100},pageSize:{default:8}},emits:["update:modelValue"],setup(e,{expose:t,emit:a}){let n=O(!1),r=e,s=a;function u(e){return Array.isArray(r.modelValue)&&0<=r.modelValue.indexOf(e)}t({toggle:j});let d=v(()=>r.label??Pe(at(r.id))),c=Qe("ApiState",void 0),p=v(()=>mt.call({responseStatus:r.status??(null==c?void 0:c.error.value)},r.id)),f=v(()=>[ot.base,p.value?ot.invalid:ot.valid]),m=O(null),g=O(""),h=O(null),b=O(r.viewCount),w=O([]),k=v(()=>g.value?r.options.filter(e=>r.match(e,g.value)).slice(0,b.value):r.options),C=["Tab","Escape","ArrowDown","ArrowUp","Enter","PageUp","PageDown","Home","End"];let L=[",",` +`,"\t"];function M(e){var l=null==(t=e.clipboardData)?void 0:t.getData("Text");if(l){var t=L.some(e=>l.includes(e));if(r.multiple&&t){if(t){t=new RegExp("\\r|\\n|\\t|,"),t=l.split(t).filter(e=>e.trim()).map(l=>r.options.find(e=>r.match(e,l))).filter(e=>!!e);if(0{u(l)?e=e.filter(e=>e!=l):e.push(l)}),s("update:modelValue",e),hs()}}}else{t=r.options.filter(e=>r.match(e,l));1==t.length&&(B(t[0]),n.value=!1,hs())}}}function V(e){C.indexOf(e.code)||$()}function S(e){var l;e.shiftKey||e.ctrlKey||e.altKey||(n.value?"Escape"==e.code?n.value&&(e.stopPropagation(),n.value=!1):"Tab"==e.code?n.value=!1:"Home"==e.code?(h.value=w.value[0],A()):"End"==e.code?(h.value=w.value[w.value.length-1],A()):"ArrowDown"==e.code?(h.value?(l=w.value.indexOf(h.value),h.value=l+1{var e=_s(`#${r.id}-autocomplete li.active`);e&&e.scrollIntoView(T)},0)}function I(){setTimeout(()=>{var e=_s(`#${r.id}-autocomplete li.active`);e&&("scrollIntoViewIfNeeded"in e?e.scrollIntoViewIfNeeded(T):e.scrollIntoView(T))},0)}function j(e){var l;(n.value=e)&&($(),null!=(l=m.value))&&l.focus()}function $(){n.value=!0,E()}function B(l){if(g.value="",n.value=!1,r.multiple){let e=Array.from(r.modelValue||[]);u(l)?e=e.filter(e=>e!=l):e.push(l),h.value=null,s("update:modelValue",e)}else{let e=l;r.modelValue==l&&(e=null),s("update:modelValue",e)}}function E(){w.value=k.value}return bt(g,E),(e,t)=>(o(),i("div",{id:e.id+"-autocomplete"},[d.value?(o(),i("label",{key:0,for:e.id+"-text",class:"block text-sm font-medium text-gray-700 dark:text-gray-300"},F(d.value),9,o0)):x("",!0),l("div",a0,[Mt(l("input",Te({ref_key:"txtInput",ref:m,id:e.id+"-text",type:"text",role:"combobox","aria-controls":"options","aria-expanded":"false",autocomplete:"off",spellcheck:"false","onUpdate:modelValue":t[0]||(t[0]=e=>g.value=e),class:f.value,placeholder:e.multiple||!e.modelValue?e.placeholder:"",onFocus:$,onKeydown:S,onKeyup:V,onClick:$,onPaste:M,required:!1},e.$attrs),null,16,r0),[[ko,g.value]]),l("button",{type:"button",onClick:t[1]||(t[1]=e=>j(!n.value)),class:"absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none",tabindex:"-1"},u0),n.value?(o(),i("ul",{key:0,class:"absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white dark:bg-black py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm",onKeydown:S,id:e.id+"-options",role:"listbox"},[(o(!0),i(Me,null,je(w.value,t=>(o(),i("li",{class:y([t===h.value?"active bg-indigo-600 text-white":"text-gray-900 dark:text-gray-100","relative cursor-default select-none py-2 pl-3 pr-9"]),onMouseover:e=>{return l=t,h.value=l,void(w.value.indexOf(l)>Math.floor(.9*b.value)&&(b.value+=r.viewCount,E()));var l},onClick:e=>B(t),role:"option",tabindex:"-1"},[U(e.$slots,"item",Rt(ks(t))),u(t)?(o(),i("span",{key:0,class:y(["absolute inset-y-0 right-0 flex items-center pr-4",t===h.value?"text-white":"text-indigo-600"])},v0,2)):x("",!0)],42,c0))),256))],40,d0)):!e.multiple&&e.modelValue?(o(),i("div",{key:1,onKeydown:S,onClick:t[2]||(t[2]=e=>j(!n.value)),class:"h-8 -mt-8 ml-3 pt-0.5"},[U(e.$slots,"item",Rt(ks(e.modelValue)))],32)):x("",!0),p.value?(o(),i("div",p0,h0)):x("",!0)]),p.value?(o(),i("p",{key:1,class:"mt-2 text-sm text-red-500",id:e.id+"-error"},F(p.value),9,g0)):e.help?(o(),i("p",{key:2,class:"mt-2 text-sm text-gray-500",id:e.id+"-description"},F(e.help),9,y0)):x("",!0)],8,n0))}}),w0=["id","name","value"],k0={class:"block truncate"},_0=de({__name:"Combobox",props:{id:{},modelValue:{},multiple:{type:Boolean},options:{},values:{},entries:{}},emits:["update:modelValue"],setup(e,{expose:t,emit:a}){let n=e,r=(t({toggle(e){var l;null!=(l=d.value)&&l.toggle(e)}}),a);function s(e){r("update:modelValue",e)}let u=v(()=>null!=n.multiple?n.multiple:Array.isArray(n.modelValue)),d=O();function c(e,l){return!l||e.value.toLowerCase().includes(l.toLowerCase())}let p=v(()=>n.entries||(n.values?n.values.map(e=>({key:e,value:e})):n.options?Object.keys(n.options).map(e=>({key:e,value:n.options[e]})):[])),f=O(u.value?[]:null);Ye(function(){let l=n.modelValue&&"object"==typeof n.modelValue?n.modelValue.key:n.modelValue;null==l||""===l?f.value=u.value?[]:null:"string"==typeof l?f.value=p.value.find(e=>e.key===l)||null:Array.isArray(l)&&(f.value=p.value.filter(e=>l.includes(e.key)))});let m=v(()=>null==f.value?"":Array.isArray(f.value)?f.value.map(e=>encodeURIComponent(e.key)).join(","):f.value.key);return(e,t)=>{var a=Z("Autocomplete");return o(),i(Me,null,[l("input",{type:"hidden",id:e.id,name:e.id,value:m.value},null,8,w0),ye(a,Te({ref_key:"input",ref:d,id:e.id,options:p.value,match:c,multiple:u.value},e.$attrs,{modelValue:f.value,"onUpdate:modelValue":[t[0]||(t[0]=e=>f.value=e),s]}),{item:xe(({value:e})=>[l("span",k0,F(e),1)]),_:1},16,["id","options","multiple","modelValue"])],64)}}}),$0=de({__name:"DynamicInput",props:{input:{},modelValue:{},api:{}},emits:["update:modelValue"],setup(e,{emit:l}){let t=e,a=l,c=v(()=>t.input.type||"text"),n="ignore,css,options,meta,allowableValues,allowableEntries,op,prop,type,id,name".split(","),p=v(()=>ft(t.input,n)),f=O("file"===c.value?null:t.modelValue[t.input.id]),m=(bt(f,()=>{t.modelValue[t.input.id]=f.value,a("update:modelValue",t.modelValue)}),v(()=>{var e=t.modelValue[t.input.id];if("file"!==t.input.type||!e)return[];if("string"==typeof e)return[{filePath:e,fileName:At(e,"/")}];if(!Array.isArray(e)&&"object"==typeof e)return e;if(Array.isArray(e)){let l=[];return e.forEach(e=>{"string"==typeof e?l.push({filePath:e,fileName:At(e,"/")}):"object"==typeof e&&l.push(e)}),l}}));return(e,l)=>{var t,a=Z("SelectInput"),n=Z("CheckboxInput"),r=Z("TagInput"),s=Z("Combobox"),i=Z("FileInput"),u=Z("TextareaInput"),d=Z("MarkdownInput"),v=Z("TextInput");return X(G).component(c.value)?(o(),ae(an(X(G).component(c.value)),Te({key:0,id:e.input.id,modelValue:f.value,"onUpdate:modelValue":l[0]||(l[0]=e=>f.value=e),status:null==(t=e.api)?void 0:t.error,"input-class":null==(t=e.input.css)?void 0:t.input,"label-class":null==(t=e.input.css)?void 0:t.label},p.value),null,16,["id","modelValue","status","input-class","label-class"])):"select"==c.value?(o(),ae(a,Te({key:1,id:e.input.id,modelValue:f.value,"onUpdate:modelValue":l[1]||(l[1]=e=>f.value=e),status:null==(t=e.api)?void 0:t.error,"input-class":null==(a=e.input.css)?void 0:a.input,"label-class":null==(t=e.input.css)?void 0:t.label,entries:e.input.allowableEntries,values:e.input.allowableValues},p.value),null,16,["id","modelValue","status","input-class","label-class","entries","values"])):"checkbox"==c.value?(o(),ae(n,Te({key:2,id:e.input.id,modelValue:f.value,"onUpdate:modelValue":l[2]||(l[2]=e=>f.value=e),status:null==(a=e.api)?void 0:a.error,"input-class":null==(t=e.input.css)?void 0:t.input,"label-class":null==(n=e.input.css)?void 0:n.label},p.value),null,16,["id","modelValue","status","input-class","label-class"])):"tag"==c.value?(o(),ae(r,Te({key:3,id:e.input.id,modelValue:f.value,"onUpdate:modelValue":l[3]||(l[3]=e=>f.value=e),status:null==(a=e.api)?void 0:a.error,"input-class":null==(t=e.input.css)?void 0:t.input,"label-class":null==(n=e.input.css)?void 0:n.label,allowableValues:e.input.allowableValues,string:"String"==(null==(r=e.input.prop)?void 0:r.type)},p.value),null,16,["id","modelValue","status","input-class","label-class","allowableValues","string"])):"combobox"==c.value?(o(),ae(s,Te({key:4,id:e.input.id,modelValue:f.value,"onUpdate:modelValue":l[4]||(l[4]=e=>f.value=e),status:null==(a=e.api)?void 0:a.error,"input-class":null==(t=e.input.css)?void 0:t.input,"label-class":null==(n=e.input.css)?void 0:n.label,entries:e.input.allowableEntries,values:e.input.allowableValues},p.value),null,16,["id","modelValue","status","input-class","label-class","entries","values"])):"file"==c.value?(o(),ae(i,Te({key:5,id:e.input.id,status:null==(r=e.api)?void 0:r.error,modelValue:f.value,"onUpdate:modelValue":l[5]||(l[5]=e=>f.value=e),"input-class":null==(s=e.input.css)?void 0:s.input,"label-class":null==(a=e.input.css)?void 0:a.label,files:m.value},p.value),null,16,["id","status","modelValue","input-class","label-class","files"])):"textarea"==c.value?(o(),ae(u,Te({key:6,id:e.input.id,modelValue:f.value,"onUpdate:modelValue":l[6]||(l[6]=e=>f.value=e),status:null==(t=e.api)?void 0:t.error,"input-class":null==(n=e.input.css)?void 0:n.input,"label-class":null==(i=e.input.css)?void 0:i.label},p.value),null,16,["id","modelValue","status","input-class","label-class"])):"MarkdownInput"==c.value?(o(),ae(d,Te({key:7,id:e.input.id,modelValue:f.value,"onUpdate:modelValue":l[7]||(l[7]=e=>f.value=e),status:null==(r=e.api)?void 0:r.error,"input-class":null==(s=e.input.css)?void 0:s.input,"label-class":null==(a=e.input.css)?void 0:a.label},p.value),null,16,["id","modelValue","status","input-class","label-class"])):(o(),ae(v,Te({key:8,type:c.value,id:e.input.id,modelValue:f.value,"onUpdate:modelValue":l[8]||(l[8]=e=>f.value=e),status:null==(u=e.api)?void 0:u.error,"input-class":null==(t=e.input.css)?void 0:t.input,"label-class":null==(n=e.input.css)?void 0:n.label},p.value),null,16,["type","id","modelValue","status","input-class","label-class"]))}}}),C0={class:"lookup-field"},x0=["name","value"],L0={key:0,class:"flex justify-between"},V0=["for"],S0={key:0,class:"flex items-center"},M0={class:"text-sm text-gray-500 dark:text-gray-400 pr-1"},A0=l("span",{class:"sr-only"},"Clear",-1),T0=l("svg",{class:"h-4 w-4",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),F0=[A0,T0],I0={key:1,class:"mt-1 relative"},j0={class:"w-full inline-flex truncate"},O0={class:"text-blue-700 dark:text-blue-300 flex cursor-pointer"},D0=l("span",{class:"absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none"},[l("svg",{class:"h-5 w-5 text-gray-400 dark:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},[l("path",{"fill-rule":"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z","clip-rule":"evenodd"})])],-1),P0=["id"],B0=["id"],H0=de({__name:"LookupInput",props:{id:{},status:{},input:{},metadataType:{},modelValue:{},label:{},labelClass:{},help:{}},emits:["update:modelValue"],setup(e,{emit:t}){let a=It().config,r=lt().metadataApi,s=e,u=t,d=v(()=>s.id||s.input.id),c=v(()=>s.label??Pe(at(d.value))),n=Qe("ApiState",void 0),p=Qe("client"),f=v(()=>mt.call({responseStatus:s.status??(null==n?void 0:n.error.value)},d.value)),m=O(""),g=O(""),h=v(()=>_e(s.modelValue,d.value)),b=v(()=>st(s.metadataType).find(e=>e.name.toLowerCase()==d.value.toLowerCase())),w=v(()=>{var e;return(null==(e=rt(null==(e=null==(e=b.value)?void 0:e.ref)?void 0:e.model))?void 0:e.icon)||a.value.tableIcon}),k;function C(){s.modelValue[d.value]=null,m.value=""}return Ye(async()=>{k=Qe("ModalProvider",void 0);var l,t=s.modelValue;s.modelValue[d.value]||(s.modelValue[d.value]=null);let a=b.value,n=null==a?void 0:a.ref;if(n){m.value="";let e=null==n.selfId?_e(t,a.name):_e(t,n.selfId);null==(e=Xt(e)?_e(t,n.refId):e)||null==(null==(l=r.value)?void 0:l.operations.find(e=>{var l;return(null==(l=e.dataModel)?void 0:l.name)==n.model}))||Xt(l=_e(t,a.name))||(m.value=""+l,g.value=a.name,null!=n.refLabel&&(null==(l=st(s.metadataType).find(e=>e.type==n.model))&&console.warn(`Could not find ${n.model} Property on `+s.metadataType.name),null!=(t=null!=l?_e(t,l.name):null)?(l=_e(t,n.refLabel))&&(m.value=""+l,Pt.setValue(n.model,e,n.refLabel,l)):(l=1==(null==(t=a.attributes)?void 0:t.some(e=>"Computed"==e.name)),t=await Pt.getOrFetchValue(p,r.value,n.model,n.refId,n.refLabel,l,e),m.value=t||n.model+": "+m.value)))}else console.warn(`No RefInfo for property '${d.value}'`)}),(e,t)=>{var a,n=Z("Icon");return o(),i("div",C0,[l("input",{type:"hidden",name:d.value,value:h.value},null,8,x0),c.value?(o(),i("div",L0,[l("label",{for:d.value,class:y("block text-sm font-medium text-gray-700 dark:text-gray-300 "+(e.labelClass??""))},F(c.value),11,V0),h.value?(o(),i("div",S0,[l("span",M0,F(h.value),1),l("button",{onClick:C,type:"button",title:"clear",class:"mr-1 rounded-md text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:ring-offset-black"},F0)])):x("",!0)])):x("",!0),null!=(a=b.value)&&a.ref?(o(),i("div",I0,[l("button",{type:"button",class:"lookup flex relative w-full bg-white dark:bg-black border border-gray-300 dark:border-gray-700 rounded-md shadow-sm pl-3 pr-10 py-2 text-left focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm",onClick:t[0]||(t[0]=e=>{var a;(a=b.value.ref)&&(null==k?console.warn("No ModalProvider required by LookupInput"):k.openModal({name:"ModalLookup",ref:a},e=>{var l,t;console.debug("openModal",m.value," -> ",e,Pt.setRefValue(a,e),a),e&&(l=_e(e,a.refId),m.value=Pt.setRefValue(a,e)||l,(t=X(s.modelValue))[d.value]=l,u("update:modelValue",t))}))}),"aria-haspopup":"listbox","aria-expanded":"true","aria-labelledby":"listbox-label"},[l("span",j0,[l("span",O0,[ye(n,{class:"mr-1 w-5 h-5",image:w.value},null,8,["image"]),l("span",null,F(m.value),1)])]),D0])])):x("",!0),f.value?(o(),i("p",{key:2,class:"mt-2 text-sm text-red-500",id:d.value+"-error"},F(f.value),9,P0)):e.help?(o(),i("p",{key:3,class:"mt-2 text-sm text-gray-500",id:d.value+"-description"},F(e.help),9,B0)):x("",!0)])}}}),R0=de({__name:"AutoFormFields",props:{modelValue:{},type:{},metaType:{},api:{},formLayout:{},configureField:{},configureFormLayout:{},hideSummary:{type:Boolean},flexClass:{default:"flex flex-1 flex-col justify-between"},divideClass:{default:"divide-y divide-gray-200 px-4 sm:px-6"},spaceClass:{default:"space-y-6 pt-6 pb-5"},fieldsetClass:{default:"grid grid-cols-12 gap-6"}},emits:["update:modelValue"],setup(e,{expose:t,emit:a}){let u=e,n=a;function r(){var e=Be();null!=(e=null==e?void 0:e.proxy)&&e.$forceUpdate()}function d(e,l){u.modelValue[e]=l,n("update:modelValue",u.modelValue),r()}t({forceUpdate:r,props:u,updateValue:d});let{metadataApi:s,apiOf:c,typeOf:p,typeOfRef:f,createFormLayout:m}=lt(),g=v(()=>u.type||qt(u.modelValue)),h=v(()=>u.metaType??p(g.value)),b=v(()=>{var e;return f(null==(e=null==(e=s.value)?void 0:e.operations.find(e=>e.request.name==g.value))?void 0:e.dataModel)||h.value});function w(){var e,l=h.value;if(!l){if(u.formLayout)return e=u.formLayout.map(e=>{var l={name:e.id,type:Ia(e.type)},l=Object.assign({prop:l},e);return u.configureField&&u.configureField(l),l}),u.configureFormLayout&&u.configureFormLayout(e),e;throw new Error(`MetadataType for ${g.value} not found`)}let a=st(l),n=b.value,t=u.formLayout?Array.from(u.formLayout):m(l),r=[],s=c(l.name);return t.forEach(t=>{var e,l=a.find(e=>e.name==t.name);t.ignore||(e=(null==(e=null==n?void 0:n.properties)?void 0:e.find(e=>{var l;return e.name.toLowerCase()==(null==(l=t.name)?void 0:l.toLowerCase())}))??l,l=Object.assign({prop:e,op:s},t),u.configureField&&u.configureField(l),r.push(l))}),u.configureFormLayout&&u.configureFormLayout(r),r}return(t,a)=>{let e,n=Z("ErrorSummary"),r=Z("LookupInput"),s=Z("DynamicInput");return o(),i(Me,null,[t.hideSummary?x("",!0):(o(),ae(n,{key:0,status:null==(e=t.api)?void 0:e.error,except:w().filter(e=>"hidden"!=e.type).map(e=>e.id)},null,8,["status","except"])),l("div",{class:y(t.flexClass)},[l("div",{class:y(t.divideClass)},[l("div",{class:y(t.spaceClass)},[l("fieldset",{class:y(t.fieldsetClass)},[(o(!0),i(Me,null,je(w(),l=>{var e;return o(),i("div",{key:l.id,class:y(["w-full",(null==(e=l.css)?void 0:e.field)??("textarea"==l.type?"col-span-12":"col-span-12 xl:col-span-6"+("checkbox"==l.type?" flex items-center":"")),"hidden"==l.type?"hidden":""])},[null==(null==(e=l.prop)?void 0:e.ref)||"file"==l.type||l.prop.isPrimaryKey?(o(),ae(s,{key:1,input:l,modelValue:t.modelValue,"onUpdate:modelValue":a[0]||(a[0]=e=>t.$emit("update:modelValue",e)),api:t.api},null,8,["input","modelValue","api"])):(o(),ae(r,{key:0,metadataType:b.value,input:l,modelValue:t.modelValue,"onUpdate:modelValue":e=>{d(l.id,_e(e,l.id))},status:null==(e=t.api)?void 0:e.error},null,8,["metadataType","input","modelValue","onUpdate:modelValue","status"]))],2)}),128))],2)],2)],2)],2)],64)}}});function Ds(e){let r=O(!1),s=O(),o=O(),i=e??Qe("client");function n({message:e,errorCode:l,fieldName:t,errors:a}){return l=l||"Exception",a=a||[],s.value=new Us(t?{errorCode:l,message:e,errors:[new Gl({fieldName:t,errorCode:l,message:e})]}:{errorCode:l,message:e,errors:a})}var l={setError:n,addFieldError:function({fieldName:t,message:e,errorCode:l}){var a;l=l||"Exception",s.value?((a=new Us(s.value)).errors=[...(a.errors||[]).filter(e=>{var l;return(null==(l=e.fieldName)?void 0:l.toLowerCase())!==(null==t?void 0:t.toLowerCase())}),new Gl({fieldName:t,message:e,errorCode:l})],s.value=a):n({fieldName:t,message:e,errorCode:l})},loading:r,error:s,api:async function(e,l,t){r.value=!0;var a=await i.api(Dt(e),l,t);return r.value=!1,o.value=a.response,s.value=a.error,a},apiVoid:async function(e,l,t){r.value=!0;var a=await i.apiVoid(Dt(e),l,t);return r.value=!1,o.value=a.response,s.value=a.error,a},apiForm:async function(e,l,t,a){r.value=!0;var n=await i.apiForm(Dt(e),l,t,a);return r.value=!1,o.value=n.response,s.value=n.error,n},apiFormVoid:async function(e,l,t,a){r.value=!0;var n=await i.apiFormVoid(Dt(e),l,t,a);return r.value=!1,o.value=n.response,s.value=n.error,n},swr:async function(e,l,t,a){return gn(i,e,l,t,a)},swrEffect:function(t,a){let n=O(new Xe),r=yn(async e=>{n.value=await i.api(e)},null==a?void 0:a.delayMs);return ws(async()=>{var e=t(),l=cl(As(e));l&&(n.value=new Xe({response:l})),0===(null==a?void 0:a.delayMs)?n.value=await i.api(e):r(e)}),(async()=>n.value=await i.api(t(),null==a?void 0:a.args,null==a?void 0:a.method))(),n},unRefs:Dt,setRef:mn};return ss("ApiState",l),l}let E0={key:0},z0={class:"text-red-700"},N0=l("b",null,"type",-1),U0={key:0},q0={key:2},Q0=["innerHTML"],K0=l("input",{type:"submit",class:"hidden"},null,-1),Z0={class:"flex justify-end"},W0=l("div",null,null,-1),G0={key:2,class:"relative z-10","aria-labelledby":"slide-over-title",role:"dialog","aria-modal":"true"},J0=l("div",{class:"fixed inset-0"},null,-1),X0={class:"fixed inset-0 overflow-hidden"},Y0={class:"flex min-h-0 flex-1 flex-col overflow-auto"},ef={class:"flex-1"},tf={class:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},sf={class:"flex items-start justify-between space-x-3"},lf={class:"space-y-1"},nf={key:0},of={key:2},af=["innerHTML"],rf={class:"flex h-7 items-center"},uf={class:"flex justify-end"},df=de({__name:"AutoForm",props:{type:{},modelValue:{},heading:{},subHeading:{},showLoading:{type:Boolean,default:!0},jsconfig:{default:"eccn,edv"},formStyle:{default:"card"},metaType:{},configureField:{},configureFormLayout:{},panelClass:{},bodyClass:{},formClass:{},innerFormClass:{},headerClass:{default:"p-6"},buttonsClass:{},headingClass:{},subHeadingClass:{},submitLabel:{default:"Submit"},allowSubmit:{}},emits:["success","error","update:modelValue","done"],setup(e,{expose:t,emit:a}){let s=e,u=a,L=O(),M=O(1),V=O();function n(){M.value++,H.value=m();var e=Be();null!=(e=null==e?void 0:e.proxy)&&e.$forceUpdate()}ss("ModalProvider",{openModal:function(e,l){S.value=e,r.value=l}});let S=O(),r=O();async function T(e){r.value&&r.value(e),S.value=void 0,r.value=void 0}let d=Ds(),c=bn().getTypeName,{typeOf:p,createDto:f}=lt(),A=O(new Xe),I=v(()=>s.panelClass||Ee.panelClass(s.formStyle)),j=v(()=>s.formClass||"card"==s.formStyle?"shadow sm:rounded-md":Bt.formClass),$=v(()=>s.headingClass||Ee.headingClass(s.formStyle)),B=v(()=>s.subHeadingClass||Ee.subHeadingClass(s.formStyle)),E=v(()=>("string"==typeof s.buttonsClass?s:Ee).buttonsClass),_=v(()=>{var e;return s.type?c(s.type):null!=(e=s.modelValue)&&e.getTypeName?s.modelValue.getTypeName():null}),D=v(()=>s.metaType??p(_.value)),m=()=>s.modelValue||g(),H=O(m()),P=v(()=>d.loading.value),R=v(()=>{var e;return null!=s.heading?s.heading:(null==(e=D.value)?void 0:e.description)||Pe(_.value)});function g(){return"string"==typeof s.type?f(s.type):s.type?new s.type:s.modelValue}async function z(e){var l,t,a,n,r;e&&"FORM"==e.tagName?(l=g(),r=Ze(null==l?void 0:l.getMethod,e=>"function"==typeof e?e():null)||"POST",t=null==Ze(null==l?void 0:l.createResponse,e=>"function"==typeof e?e():null),a=s.jsconfig,il.hasRequestBody(r)?(r=new l.constructor,n=new FormData(e),A.value=t?await d.apiFormVoid(r,n,{jsconfig:a}):await d.apiForm(r,n,{jsconfig:a})):(r=new l.constructor(Bo(H.value)),console.debug("AutoForm.submit",r),A.value=t?await d.apiVoid(r,{jsconfig:a}):await d.api(r,{jsconfig:a})),A.value.succeeded?(u("success",A.value.response),q()):u("error",A.value.error)):console.error("Not a valid form",e)}function N(e){u("update:modelValue",e)}function h(){u("done")}t({forceUpdate:n,props:s,setModel:async function(e){Object.assign(H.value,e),n(),await St(()=>null)},formFields:L,submit:async function(){z(V.value)},close:q,model:H});let b=O(!1),G=O(""),k={entering:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-full",to:"translate-x-0"},leaving:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-0",to:"translate-x-full"}};function q(){"slideOver"==s.formStyle?b.value=!1:h()}bt(b,()=>{yt(k,G,b.value),b.value||setTimeout(h,700)}),b.value=!0;let w=e=>{"Escape"===e.key&&q()};return Ye(()=>window.addEventListener("keydown",w)),Ft(()=>window.removeEventListener("keydown",w)),(t,e)=>{let a,n,r,s,u,d,v,c,p,f,m,g=Z("AutoFormFields"),h=Z("FormLoading"),b=Z("PrimaryButton"),w=Z("CloseButton"),k=Z("SecondaryButton"),C=Z("ModalLookup");return o(),i("div",null,[D.value?"card"==t.formStyle?(o(),i("div",{key:1,class:y(I.value)},[l("form",{ref_key:"elForm",ref:V,onSubmit:e[0]||(e[0]=Ue(e=>z(e.target),["prevent"])),autocomplete:"off",class:y(t.innerFormClass)},[l("div",{class:y(t.bodyClass)},[l("div",{class:y(t.headerClass)},[t.$slots.heading?(o(),i("div",U0,[U(t.$slots,"heading")])):(o(),i("h3",{key:1,class:y($.value)},F(R.value),3)),t.$slots.subheading?(o(),i("div",q0,[U(t.$slots,"subheading")])):t.subHeading?(o(),i("p",{key:3,class:y(B.value)},F(t.subHeading),3)):null!=(a=D.value)&&a.notes?(o(),i("p",{key:4,class:y(["notes",B.value]),innerHTML:null==(n=D.value)?void 0:n.notes},null,10,Q0)):x("",!0)],2),U(t.$slots,"header",{instance:null==(r=Be())?void 0:r.exposed,model:H.value}),K0,(o(),ae(g,{ref_key:"formFields",ref:L,key:M.value,type:t.type,modelValue:H.value,"onUpdate:modelValue":N,api:A.value,configureField:t.configureField,configureFormLayout:t.configureFormLayout},null,8,["type","modelValue","api","configureField","configureFormLayout"])),U(t.$slots,"footer",{instance:null==(s=Be())?void 0:s.exposed,model:H.value})],2),U(t.$slots,"buttons",{},()=>{var e;return[l("div",{class:y(E.value)},[l("div",null,[U(t.$slots,"leftbuttons",{instance:null==(e=Be())?void 0:e.exposed,model:H.value})]),l("div",null,[t.showLoading&&P.value?(o(),ae(h,{key:0})):x("",!0)]),l("div",Z0,[W0,ye(b,{disabled:!!t.allowSubmit&&!t.allowSubmit(H.value)},{default:xe(()=>[ke(F(t.submitLabel),1)]),_:1},8,["disabled"]),U(t.$slots,"rightbuttons",{instance:null==(e=Be())?void 0:e.exposed,model:H.value})])],2)]})],34)],2)):(o(),i("div",G0,[J0,l("div",X0,[l("div",{onMousedown:q,class:"absolute inset-0 overflow-hidden"},[l("div",{onMousedown:e[2]||(e[2]=Ue(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[l("div",{class:y(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",G.value])},[l("form",{ref_key:"elForm",ref:V,class:y(j.value),onSubmit:e[1]||(e[1]=Ue(e=>z(e.target),["prevent"]))},[l("div",Y0,[l("div",ef,[l("div",tf,[l("div",sf,[l("div",lf,[t.$slots.heading?(o(),i("div",nf,[U(t.$slots,"heading")])):(o(),i("h3",{key:1,class:y($.value)},F(R.value),3)),t.$slots.subheading?(o(),i("div",of,[U(t.$slots,"subheading")])):t.subHeading?(o(),i("p",{key:3,class:y(B.value)},F(t.subHeading),3)):null!=(u=D.value)&&u.notes?(o(),i("p",{key:4,class:y(["notes",B.value]),innerHTML:null==(d=D.value)?void 0:d.notes},null,10,af)):x("",!0)]),l("div",rf,[ye(w,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:q})])])]),U(t.$slots,"header",{instance:null==(v=Be())?void 0:v.exposed,model:H.value}),(o(),ae(g,{ref_key:"formFields",ref:L,key:M.value,type:t.type,modelValue:H.value,"onUpdate:modelValue":N,api:A.value,configureField:t.configureField,configureFormLayout:t.configureFormLayout},null,8,["type","modelValue","api","configureField","configureFormLayout"])),U(t.$slots,"footer",{instance:null==(c=Be())?void 0:c.exposed,model:H.value})])]),l("div",{class:y(E.value)},[l("div",null,[U(t.$slots,"leftbuttons",{instance:null==(p=Be())?void 0:p.exposed,model:H.value})]),l("div",null,[t.showLoading&&P.value?(o(),ae(h,{key:0})):x("",!0)]),l("div",uf,[ye(k,{onClick:q,disabled:P.value},{default:xe(()=>[ke("Cancel")]),_:1},8,["disabled"]),ye(b,{class:"ml-4",disabled:!!t.allowSubmit&&!t.allowSubmit(H.value)},{default:xe(()=>[ke(F(t.submitLabel),1)]),_:1},8,["disabled"]),U(t.$slots,"rightbuttons",{instance:null==(f=Be())?void 0:f.exposed,model:H.value})])],2)],34)],2)],32)],32)])])):(o(),i("div",E0,[l("p",z0,[ke("Could not create form for unknown "),N0,ke(" "+F(_.value),1)])])),"ModalLookup"==(null==(m=S.value)?void 0:m.name)&&S.value.ref?(o(),ae(C,{key:3,"ref-info":S.value.ref,onDone:T},null,8,["ref-info"])):x("",!0)])}}}),cf={key:0},ff={class:"text-red-700"},vf=l("b",null,"type",-1),pf={key:0},mf={key:2},hf=["innerHTML"],gf={class:"flex justify-end"},yf={key:2,class:"relative z-10","aria-labelledby":"slide-over-title",role:"dialog","aria-modal":"true"},bf=l("div",{class:"fixed inset-0"},null,-1),wf={class:"fixed inset-0 overflow-hidden"},kf={class:"flex min-h-0 flex-1 flex-col overflow-auto"},_f={class:"flex-1"},$f={class:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},Cf={class:"flex items-start justify-between space-x-3"},xf={class:"space-y-1"},Lf={key:0},Vf={key:2},Sf=["innerHTML"],Mf={class:"flex h-7 items-center"},Af={class:"flex justify-end"},Tf=de({__name:"AutoCreateForm",props:{type:{},formStyle:{default:"slideOver"},panelClass:{},formClass:{},headingClass:{},subHeadingClass:{},buttonsClass:{},heading:{},subHeading:{},autosave:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},showCancel:{type:Boolean,default:!0},configureField:{},configureFormLayout:{}},emits:["done","save","error"],setup(e,{expose:t,emit:a}){let r=e,s=a,c=O(),p=O(1);function n(){p.value++,null!=(e=c.value)&&e.forceUpdate();var e=Be();null!=(e=null==e?void 0:e.proxy)&&e.$forceUpdate()}function f(e){}ss("ModalProvider",{openModal:function(e,l){m.value=e,u.value=l}});let m=O(),u=O();async function g(e){u.value&&u.value(e),m.value=void 0,u.value=void 0}let{typeOf:d,typeProperties:h,Crud:b,createDto:w,formValues:k}=lt(),C=v(()=>qt(r.type)),L=v(()=>d(C.value)),M=O("string"==typeof r.type?w(r.type):r.type?new r.type:null),V=(t({forceUpdate:n,props:r,setModel:function(e){Object.assign(M.value,e),n()},formFields:c,model:M}),v(()=>r.panelClass||Ee.panelClass(r.formStyle))),S=v(()=>r.formClass||Ee.formClass(r.formStyle)),T=v(()=>r.headingClass||Ee.headingClass(r.formStyle)),A=v(()=>r.subHeadingClass||Ee.subHeadingClass(r.formStyle)),I=v(()=>r.buttonsClass||Ee.buttonsClass),j=v(()=>b.model(L.value)),$=v(()=>{var e;return r.heading||(null==(e=d(C.value))?void 0:e.description)||(j.value?"New "+Pe(j.value):Pe(C.value))}),B=O(new Xe),E=Ds(),_=v(()=>E.loading.value);async function D(e){var l,t,a,n=e.target;r.autosave?(t=Ze(null==(t=M.value)?void 0:t.getMethod,e=>"function"==typeof e?e():null)||"POST",l=null==Ze(null==(l=M.value)?void 0:l.createResponse,e=>"function"==typeof e?e():null),il.hasRequestBody(t)?(t=new M.value.constructor,a=new FormData(n),B.value=l?await E.apiFormVoid(t,a,{jsconfig:"eccn"}):await E.apiForm(t,a,{jsconfig:"eccn"})):(t=k(n,h(L.value)),a=new M.value.constructor(t),B.value=l?await E.apiVoid(a,{jsconfig:"eccn"}):await E.api(a,{jsconfig:"eccn"})),B.value.succeeded?(n.reset(),s("save",B.value.response)):s("error",B.value.error)):s("save",new M.value.constructor(k(n,h(L.value))))}function H(){s("done")}G.interceptors.has("AutoCreateForm.new")&&G.interceptors.invoke("AutoCreateForm.new",{props:r,model:M});let P=O(!1),R=O(""),q={entering:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-full",to:"translate-x-0"},leaving:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-0",to:"translate-x-full"}};function z(){"slideOver"==r.formStyle?P.value=!1:H()}bt(P,()=>{yt(q,R,P.value),P.value||setTimeout(H,700)}),P.value=!0;let N=e=>{"Escape"===e.key&&z()};return Ye(()=>window.addEventListener("keydown",N)),Ft(()=>window.removeEventListener("keydown",N)),(e,t)=>{var a,n=Z("AutoFormFields"),r=Z("FormLoading"),s=Z("SecondaryButton"),u=Z("PrimaryButton"),d=Z("CloseButton"),v=Z("ModalLookup");return o(),i("div",null,[L.value?"card"==e.formStyle?(o(),i("div",{key:1,class:y(V.value)},[l("form",{onSubmit:Ue(D,["prevent"])},[l("div",{class:y(S.value)},[l("div",null,[e.$slots.heading?(o(),i("div",pf,[U(e.$slots,"heading")])):(o(),i("h3",{key:1,class:y(T.value)},F($.value),3)),e.$slots.subheading?(o(),i("div",mf,[U(e.$slots,"subheading")])):e.subHeading?(o(),i("p",{key:3,class:y(A.value)},F(e.subHeading),3)):null!=(a=L.value)&&a.notes?(o(),i("p",{key:4,class:y(["notes",A.value]),innerHTML:null==(a=L.value)?void 0:a.notes},null,10,hf)):x("",!0)]),U(e.$slots,"header",{formInstance:null==(a=Be())?void 0:a.exposed,model:M.value}),(o(),ae(n,{ref_key:"formFields",ref:c,key:p.value,modelValue:M.value,"onUpdate:modelValue":f,api:B.value,configureField:e.configureField,configureFormLayout:e.configureFormLayout},null,8,["modelValue","api","configureField","configureFormLayout"])),U(e.$slots,"footer",{formInstance:null==(a=Be())?void 0:a.exposed,model:M.value})],2),l("div",{class:y(I.value)},[l("div",null,[e.showLoading&&X(_)?(o(),ae(r,{key:0})):x("",!0)]),l("div",gf,[e.showCancel?(o(),ae(s,{key:0,onClick:z,disabled:X(_)},{default:xe(()=>[ke("Cancel")]),_:1},8,["disabled"])):x("",!0),ye(u,{type:"submit",class:"ml-4",disabled:X(_)},{default:xe(()=>[ke("Save")]),_:1},8,["disabled"])])],2)],32)],2)):(o(),i("div",yf,[bf,l("div",wf,[l("div",{onMousedown:z,class:"absolute inset-0 overflow-hidden"},[l("div",{onMousedown:t[0]||(t[0]=Ue(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[l("div",{class:y(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",R.value])},[l("form",{class:y(S.value),onSubmit:Ue(D,["prevent"])},[l("div",kf,[l("div",_f,[l("div",$f,[l("div",Cf,[l("div",xf,[e.$slots.heading?(o(),i("div",Lf,[U(e.$slots,"heading")])):(o(),i("h3",{key:1,class:y(T.value)},F($.value),3)),e.$slots.subheading?(o(),i("div",Vf,[U(e.$slots,"subheading")])):e.subHeading?(o(),i("p",{key:3,class:y(A.value)},F(e.subHeading),3)):null!=(a=L.value)&&a.notes?(o(),i("p",{key:4,class:y(["notes",A.value]),innerHTML:null==(a=L.value)?void 0:a.notes},null,10,Sf)):x("",!0)]),l("div",Mf,[ye(d,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:z})])])]),U(e.$slots,"header",{formInstance:null==(a=Be())?void 0:a.exposed,model:M.value}),(o(),ae(n,{ref_key:"formFields",ref:c,key:p.value,modelValue:M.value,"onUpdate:modelValue":f,api:B.value,configureField:e.configureField,configureFormLayout:e.configureFormLayout},null,8,["modelValue","api","configureField","configureFormLayout"])),U(e.$slots,"footer",{formInstance:null==(d=Be())?void 0:d.exposed,model:M.value})])]),l("div",{class:y(I.value)},[l("div",null,[e.showLoading&&X(_)?(o(),ae(r,{key:0})):x("",!0)]),l("div",Af,[e.showCancel?(o(),ae(s,{key:0,onClick:z,disabled:X(_)},{default:xe(()=>[ke("Cancel")]),_:1},8,["disabled"])):x("",!0),ye(u,{type:"submit",class:"ml-4",disabled:X(_)},{default:xe(()=>[ke("Save")]),_:1},8,["disabled"])])],2)],34)],2)],32)],32)])])):(o(),i("div",cf,[l("p",ff,[ke("Could not create form for unknown "),vf,ke(" "+F(C.value),1)])])),"ModalLookup"==(null==(a=m.value)?void 0:a.name)&&m.value.ref?(o(),ae(v,{key:3,"ref-info":m.value.ref,onDone:g},null,8,["ref-info"])):x("",!0)])}}}),Ff={key:0},If={class:"text-red-700"},jf=l("b",null,"type",-1),Of={key:0},Df={key:2},Pf=["innerHTML"],Bf={class:"flex justify-end"},Hf={key:2,class:"relative z-10","aria-labelledby":"slide-over-title",role:"dialog","aria-modal":"true"},Rf=l("div",{class:"fixed inset-0"},null,-1),Ef={class:"fixed inset-0 overflow-hidden"},zf={class:"flex min-h-0 flex-1 flex-col overflow-auto"},Nf={class:"flex-1"},Uf={class:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},qf={class:"flex items-start justify-between space-x-3"},Qf={class:"space-y-1"},Kf={key:0},Zf={key:2},Wf=["innerHTML"],Gf={class:"flex h-7 items-center"},Jf={class:"flex justify-end"},Xf=de({__name:"AutoEditForm",props:{modelValue:{},type:{},deleteType:{},formStyle:{default:"slideOver"},panelClass:{},formClass:{},headingClass:{},subHeadingClass:{},heading:{},subHeading:{},autosave:{type:Boolean,default:!0},showLoading:{type:Boolean,default:!0},configureField:{},configureFormLayout:{}},emits:["done","save","delete","error"],setup(e,{expose:t,emit:a}){let r=e,s=a,p=O(),f=O(1);function m(e){}ss("ModalProvider",{openModal:function(e,l){g.value=e,n.value=l}});let g=O(),n=O();async function q(e){n.value&&n.value(e),g.value=void 0,n.value=void 0}let{typeOf:u,apiOf:Q,typeProperties:c,createFormLayout:K,getPrimaryKey:W,Crud:h,createDto:d,formValues:b}=lt(),w=v(()=>qt(r.type)),k=v(()=>u(w.value)),C=()=>"string"==typeof r.type?d(r.type,ys(r.modelValue)):r.type?new r.type(ys(r.modelValue)):null,L=O(C()),J=(t({forceUpdate:function(){f.value++,L.value=C();var e=Be();null!=(e=null==e?void 0:e.proxy)&&e.$forceUpdate()},props:r,setModel:function(e){Object.assign(L.value,e)},formFields:p,model:L}),v(()=>r.panelClass||Ee.panelClass(r.formStyle))),M=v(()=>r.formClass||Ee.formClass(r.formStyle)),V=v(()=>r.headingClass||Ee.headingClass(r.formStyle)),S=v(()=>r.subHeadingClass||Ee.subHeadingClass(r.formStyle)),T=v(()=>h.model(k.value)),A=v(()=>{var e;return r.heading||(null==(e=u(w.value))?void 0:e.description)||(T.value?"Update "+Pe(T.value):Pe(w.value))}),I=O(new Xe),j=Object.assign({},ys(r.modelValue)),$=(G.interceptors.has("AutoEditForm.new")&&G.interceptors.invoke("AutoEditForm.new",{props:r,model:L,origModel:j}),Ds()),B=v(()=>$.loading.value),E=()=>Ze(u(h.model(k.value)),e=>W(e));function Y(e){var{op:l,prop:t}=e;l&&(h.isPatch(l)||h.isUpdate(l))&&(e.disabled=null==t?void 0:t.isPrimaryKey),r.configureField&&r.configureField(e)}async function _(e){var a=e.target;if(r.autosave){let e=Ze(null==(n=L.value)?void 0:n.getMethod,e=>"function"==typeof e?e():null)||"POST",t=null==Ze(null==(n=L.value)?void 0:n.createResponse,e=>"function"==typeof e?e():null),d=E();if(il.hasRequestBody(e)){let e=new L.value.constructor,l=_e(r.modelValue,d.name),i=new FormData(a),u=(d&&!Array.from(i.keys()).some(e=>e.toLowerCase()==d.name.toLowerCase())&&i.append(d.name,l),[]);var n=w.value&&Q(w.value);if(n&&h.isPatch(n)){let s=K(k.value),o={};if(d&&(o[d.name]=l),s.forEach(t=>{var a=t.id,n=_e(j,a);if(!d||d.name.toLowerCase()!==a.toLowerCase()){var r=i.get(a);G.interceptors.has("AutoEditForm.save.formLayout")&&G.interceptors.invoke("AutoEditForm.save.formLayout",{origValue:n,formLayout:s,input:t,newValue:r});let e=null!=r,l="checkbox"===t.type?e!=!!n:"file"===t.type?e:r!=n;(l=r||n?l:!1)&&(r?o[a]=r:"file"!==t.type&&u.push(a))}}),G.interceptors.has("AutoEditForm.save")&&G.interceptors.invoke("AutoEditForm.save",{origModel:j,formLayout:s,dirtyValues:o}),Array.from(i.keys()).filter(e=>!o[e]).forEach(e=>i.delete(e)),0==Array.from(i.keys()).filter(e=>e.toLowerCase()!=d.name.toLowerCase()).length&&0==u.length)return void z()}n=0"function"==typeof e?e():null)?I.value=await $.apiVoid(t):I.value=await $.api(t),I.value.succeeded?s("delete",I.value.response):s("error",I.value.error)):console.error(`Could not find Primary Key for Type ${w.value} (${T.value})`)}function H(){s("done")}let P=O(!1),R=O(""),ee={entering:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-full",to:"translate-x-0"},leaving:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-0",to:"translate-x-full"}};function z(){"slideOver"==r.formStyle?P.value=!1:H()}bt(P,()=>{yt(ee,R,P.value),P.value||setTimeout(H,700)}),P.value=!0;let N=e=>{"Escape"===e.key&&z()};return Ye(()=>window.addEventListener("keydown",N)),Ft(()=>window.removeEventListener("keydown",N)),(e,t)=>{var a,n=Z("AutoFormFields"),r=Z("ConfirmDelete"),s=Z("FormLoading"),u=Z("SecondaryButton"),d=Z("PrimaryButton"),v=Z("CloseButton"),c=Z("ModalLookup");return o(),i("div",null,[k.value?"card"==e.formStyle?(o(),i("div",{key:1,class:y(J.value)},[l("form",{onSubmit:Ue(_,["prevent"])},[l("div",{class:y(M.value)},[l("div",null,[e.$slots.heading?(o(),i("div",Of,[U(e.$slots,"heading")])):(o(),i("h3",{key:1,class:y(V.value)},F(A.value),3)),e.$slots.subheading?(o(),i("div",Df,[U(e.$slots,"subheading")])):e.subHeading?(o(),i("p",{key:3,class:y(S.value)},F(e.subHeading),3)):null!=(a=k.value)&&a.notes?(o(),i("p",{key:4,class:y(["notes",S.value]),innerHTML:null==(a=k.value)?void 0:a.notes},null,10,Pf)):x("",!0)]),U(e.$slots,"header",{formInstance:null==(a=Be())?void 0:a.exposed,model:L.value}),(o(),ae(n,{ref_key:"formFields",ref:p,key:f.value,modelValue:L.value,"onUpdate:modelValue":m,api:I.value,configureField:e.configureField,configureFormLayout:e.configureFormLayout},null,8,["modelValue","api","configureField","configureFormLayout"])),U(e.$slots,"footer",{formInstance:null==(a=Be())?void 0:a.exposed,model:L.value})],2),l("div",{class:y(X(Ee).buttonsClass)},[l("div",null,[e.deleteType?(o(),ae(r,{key:0,onDelete:D})):x("",!0)]),l("div",null,[e.showLoading&&X(B)?(o(),ae(s,{key:0})):x("",!0)]),l("div",Bf,[ye(u,{onClick:z,disabled:X(B)},{default:xe(()=>[ke("Cancel")]),_:1},8,["disabled"]),ye(d,{type:"submit",class:"ml-4",disabled:X(B)},{default:xe(()=>[ke("Save")]),_:1},8,["disabled"])])],2)],32)],2)):(o(),i("div",Hf,[Rf,l("div",Ef,[l("div",{onMousedown:z,class:"absolute inset-0 overflow-hidden"},[l("div",{onMousedown:t[0]||(t[0]=Ue(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[l("div",{class:y(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",R.value])},[l("form",{class:y(M.value),onSubmit:Ue(_,["prevent"])},[l("div",zf,[l("div",Nf,[l("div",Uf,[l("div",qf,[l("div",Qf,[e.$slots.heading?(o(),i("div",Kf,[U(e.$slots,"heading")])):(o(),i("h3",{key:1,class:y(V.value)},F(A.value),3)),e.$slots.subheading?(o(),i("div",Zf,[U(e.$slots,"subheading")])):e.subHeading?(o(),i("p",{key:3,class:y(S.value)},F(e.subHeading),3)):null!=(a=k.value)&&a.notes?(o(),i("p",{key:4,class:y(["notes",S.value]),innerHTML:null==(a=k.value)?void 0:a.notes},null,10,Wf)):x("",!0)]),l("div",Gf,[ye(v,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:z})])])]),U(e.$slots,"header",{formInstance:null==(a=Be())?void 0:a.exposed,model:L.value}),(o(),ae(n,{ref_key:"formFields",ref:p,key:f.value,modelValue:L.value,"onUpdate:modelValue":m,api:I.value,configureField:Y,configureFormLayout:e.configureFormLayout},null,8,["modelValue","api","configureFormLayout"])),U(e.$slots,"footer",{formInstance:null==(v=Be())?void 0:v.exposed,model:L.value})])]),l("div",{class:y(X(Ee).buttonsClass)},[l("div",null,[e.deleteType?(o(),ae(r,{key:0,onDelete:D})):x("",!0)]),l("div",null,[e.showLoading&&X(B)?(o(),ae(s,{key:0})):x("",!0)]),l("div",Jf,[ye(u,{onClick:z,disabled:X(B)},{default:xe(()=>[ke("Cancel")]),_:1},8,["disabled"]),ye(d,{type:"submit",class:"ml-4",disabled:X(B)},{default:xe(()=>[ke("Save")]),_:1},8,["disabled"])])],2)],34)],2)],32)],32)])])):(o(),i("div",Ff,[l("p",If,[ke("Could not create form for unknown "),jf,ke(" "+F(w.value),1)])])),"ModalLookup"==(null==(a=g.value)?void 0:a.name)&&g.value.ref?(o(),ae(c,{key:3,"ref-info":g.value.ref,onDone:q},null,8,["ref-info"])):x("",!0)])}}}),Yf={key:0},ev={class:"text-red-700"},tv=l("b",null,"type",-1),sv={key:0},lv={key:2},nv=["innerHTML"],ov={key:2,class:"relative z-10","aria-labelledby":"slide-over-title",role:"dialog","aria-modal":"true"},av=l("div",{class:"fixed inset-0"},null,-1),rv={class:"fixed inset-0 overflow-hidden"},iv={class:"flex min-h-0 flex-1 flex-col overflow-auto"},uv={class:"flex-1"},dv={class:"bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},cv={class:"flex items-start justify-between space-x-3"},fv={class:"space-y-1"},vv={key:0},pv={key:2},mv=["innerHTML"],hv={class:"flex h-7 items-center"},gv=de({__name:"AutoViewForm",props:{model:{},apis:{},typeName:{},done:{},formStyle:{default:"slideOver"},panelClass:{},formClass:{},headingClass:{},subHeadingClass:{},heading:{},subHeading:{}},emits:["done"],setup(e,{}){let t=e,a=lt().typeOf,s=v(()=>t.typeName??t.apis.dataModel.name),u=v(()=>a(s.value)),d=v(()=>t.panelClass||Ee.panelClass(t.formStyle)),c=v(()=>t.formClass||Ee.formClass(t.formStyle)),p=v(()=>t.headingClass||Ee.headingClass(t.formStyle)),f=v(()=>t.subHeadingClass||Ee.subHeadingClass(t.formStyle)),m=v(()=>{var e;return t.heading||(null==(e=a(s.value))?void 0:e.description)||(null!=(e=t.model)&&e.id?Pe(s.value)+" "+t.model.id:"View "+Pe(s.value))});function n(){t.done&&t.done()}G.interceptors.has("AutoViewForm.new")&&G.interceptors.invoke("AutoViewForm.new",{props:t});let r=O(!1),g=O(""),h={entering:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-full",to:"translate-x-0"},leaving:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-0",to:"translate-x-full"}};function b(){"slideOver"==t.formStyle?r.value=!1:n()}bt(r,()=>{yt(h,g,r.value),r.value||setTimeout(n,700)}),r.value=!0;let w=e=>{"Escape"===e.key&&b()};return Ye(()=>window.addEventListener("keydown",w)),Ft(()=>window.removeEventListener("keydown",w)),(e,t)=>{var a,n=Z("MarkupModel"),r=Z("CloseButton");return o(),i("div",null,[s.value?"card"==e.formStyle?(o(),i("div",{key:1,class:y(d.value)},[l("div",{class:y(c.value)},[l("div",null,[e.$slots.heading?(o(),i("div",sv,[U(e.$slots,"heading")])):(o(),i("h3",{key:1,class:y(p.value)},F(m.value),3)),e.$slots.subheading?(o(),i("div",lv,[U(e.$slots,"subheading")])):e.subHeading?(o(),i("p",{key:3,class:y(f.value)},F(e.subHeading),3)):null!=(a=u.value)&&a.notes?(o(),i("p",{key:4,class:y(["notes",f.value]),innerHTML:null==(a=u.value)?void 0:a.notes},null,10,nv)):x("",!0)]),ye(n,{value:e.model},null,8,["value"])],2)],2)):(o(),i("div",ov,[av,l("div",rv,[l("div",{onMousedown:b,class:"absolute inset-0 overflow-hidden"},[l("div",{onMousedown:t[0]||(t[0]=Ue(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[l("div",{class:y(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",g.value])},[l("div",{class:y(c.value)},[l("div",iv,[l("div",uv,[l("div",dv,[l("div",cv,[l("div",fv,[e.$slots.heading?(o(),i("div",vv,[U(e.$slots,"heading")])):(o(),i("h3",{key:1,class:y(p.value)},F(m.value),3)),e.$slots.subheading?(o(),i("div",pv,[U(e.$slots,"subheading")])):e.subHeading?(o(),i("p",{key:3,class:y(f.value)},F(e.subHeading),3)):null!=(a=u.value)&&a.notes?(o(),i("p",{key:4,class:y(["notes",f.value]),innerHTML:null==(a=u.value)?void 0:a.notes},null,10,mv)):x("",!0)]),l("div",hv,[ye(r,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:b})])])]),ye(n,{value:e.model},null,8,["value"])])])],2)],2)],32)],32)])])):(o(),i("div",Yf,[l("p",ev,[ke("Could not create view for unknown "),tv,ke(" "+F(s.value),1)])]))])}}}),yv=l("label",{for:"confirmDelete",class:"ml-2 mr-2 select-none"},"confirm",-1),bv=de({__name:"ConfirmDelete",emits:["delete"],setup(e,{emit:t}){let a=O(!1),n=t,r=()=>{a.value&&n("delete")},s=v(()=>["select-none inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white",a.value?"cursor-pointer bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500":"bg-red-400"]);return(e,t)=>(o(),i(Me,null,[Mt(l("input",{id:"confirmDelete",type:"checkbox",class:"focus:ring-indigo-500 h-4 w-4 text-indigo-600 rounded border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:ring-offset-black","onUpdate:modelValue":t[0]||(t[0]=e=>nn(a)?a.value=e:a=e)},null,512),[[ol,X(a)]]),yv,l("span",Te({onClick:Ue(r,["prevent"]),class:s.value},e.$attrs),[U(e.$slots,"default",{},()=>[ke("Delete")])],16)],64))}}),wv={class:"flex",title:"loading..."},kv={key:0,xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"24px",height:"30px",viewBox:"0 0 24 30"},_v=xs('',3),$v=[_v],Cv={class:"ml-2 mt-1 text-gray-400"},xv=de({__name:"FormLoading",props:{icon:{type:Boolean,default:!0},text:{default:"loading..."}},setup(e){return Qe("ApiState",void 0),(e,t)=>(o(),i("div",wv,[e.icon?(o(),i("svg",kv,$v)):x("",!0),l("span",Cv,F(e.text),1)]))}}),Lv=["onClick"],Vv={key:3,class:"flex justify-between items-center"},Sv={class:"mr-1 select-none"},Mv=["onClick"],Av=de({__name:"DataGrid",props:{items:{default:()=>[]},id:{default:"DataGrid"},type:{},tableStyle:{default:"stripedRows"},selectedColumns:{},gridClass:{},grid2Class:{},grid3Class:{},grid4Class:{},tableClass:{},theadClass:{},tbodyClass:{},theadRowClass:{},theadCellClass:{},isSelected:{},headerTitle:{},headerTitles:{},visibleFrom:{},rowClass:{},rowStyle:{}},emits:["headerSelected","rowSelected"],setup(e,{emit:t}){let u=e,d=t,a=O(),c=O(null),p=al(),f=l=>Object.keys(p).find(e=>e.toLowerCase()==l.toLowerCase()+"-header"),m=l=>Object.keys(p).find(e=>e.toLowerCase()==l.toLowerCase()),n=v(()=>Ws(u.items).filter(e=>!(!p[e]&&!p[e+"-header"]))),{typeOf:r,typeProperties:s}=lt(),g=v(()=>qt(u.type)),h=v(()=>r(g.value)),b=v(()=>s(h.value));function w(e){var l=u.headerTitles&&_e(u.headerTitles,e)||e;return u.headerTitle?u.headerTitle(l):cn(l)}function k(e){let l=e.toLowerCase();return b.value.find(e=>e.name.toLowerCase()==l)}let C={xs:"xs:table-cell",sm:"sm:table-cell",md:"md:table-cell",lg:"lg:table-cell",xl:"xl:table-cell","2xl":"2xl:table-cell",never:""};function L(e){var l=u.visibleFrom&&_e(u.visibleFrom,e);return l&&Ze(C[l],e=>"hidden "+e)}let M=v(()=>u.gridClass??he.getGridClass(u.tableStyle)),V=v(()=>u.grid2Class??he.getGrid2Class(u.tableStyle)),S=v(()=>u.grid3Class??he.getGrid3Class(u.tableStyle)),T=v(()=>u.grid4Class??he.getGrid4Class(u.tableStyle)),A=v(()=>u.tableClass??he.getTableClass(u.tableStyle)),I=v(()=>u.tbodyClass??he.getTbodyClass(u.tbodyClass)),j=v(()=>u.theadClass??he.getTheadClass(u.tableStyle)),$=v(()=>u.theadRowClass??he.getTheadRowClass(u.tableStyle)),B=v(()=>u.theadCellClass??he.getTheadCellClass(u.tableStyle));let E=v(()=>{let e=("string"==typeof u.selectedColumns?u.selectedColumns.split(","):u.selectedColumns)||(0(e[l.name.toLowerCase()]=l.format,e),{});return e.filter(e=>{var l;return"hidden"!=(null==(l=t[e.toLowerCase()])?void 0:l.method)})});return(n,e)=>{let r=Z("CellFormat"),s=Z("PreviewFormat");return n.items.length?(o(),i("div",{key:0,ref_key:"refResults",ref:a,class:y(M.value)},[l("div",{class:y(V.value)},[l("div",{class:y(S.value)},[l("div",{class:y(T.value)},[l("table",{class:y(A.value)},[l("thead",{class:y(j.value)},[l("tr",{class:y($.value)},[(o(!0),i(Me,null,je(E.value,t=>{return o(),i("td",{class:y([L(t),B.value,(e=t,c.value===e?"text-gray-900 dark:text-gray-50":"text-gray-500 dark:text-gray-400")])},[l("div",{onClick:e=>{var l;e=e,l=t,d("headerSelected",l,e)}},[X(p)[t+"-header"]?U(n.$slots,t+"-header",{key:0,column:t}):f(t)?U(n.$slots,f(t),{key:1,column:t}):X(p).header?U(n.$slots,"header",{key:2,column:t,label:w(t)}):(o(),i("div",Vv,[l("span",Sv,F(w(t)),1)]))],8,Lv)],2);var e}),256))],2)],2),l("tbody",{class:y(I.value)},[(o(!0),i(Me,null,je(n.items,(t,e)=>{return o(),i("tr",{class:y((l=t,a=e,u.rowClass?u.rowClass(l,a):he.getTableRowClass(u.tableStyle,a,!(!u.isSelected||!u.isSelected(l)),null!=u.isSelected))),style:nl((a=t,l=e,u.rowStyle?u.rowStyle(a,l):void 0)),onClick:e=>{var l;e=e,l=t,d("rowSelected",l,e)}},[(o(!0),i(Me,null,je(E.value,e=>{return o(),i("td",{class:y([L(e),X(he).tableCellClass])},[X(p)[e]?U(n.$slots,e,Rt(Te({key:0},t))):m(e)?U(n.$slots,m(e),Rt(Te({key:1},t))):k(e)?(o(),ae(r,{key:2,type:h.value,propType:k(e),modelValue:t},null,8,["type","propType","modelValue"])):(o(),ae(s,{key:3,value:X(_e)(t,e),format:null!=(l=k(e))&&l.format?l.format:"TimeSpan"==(null==l?void 0:l.type)||"TimeOnly"==(null==l?void 0:l.type)?{method:"time"}:null},null,8,["value","format"]))],2);var l}),256))],14,Mv);var l,a}),256))],2)],2)],2)],2)],2)],2)):x("",!0)}}}),Tv=de({props:{type:Object,propType:Object,modelValue:Object},setup(d,{attrs:v}){let c=lt().typeOf;return()=>{let e,l=null!=(o=d.propType)&&o.format?o.format:"TimeSpan"==(null==o?void 0:o.type)||"TimeOnly"==(null==o?void 0:o.type)?{method:"time"}:null,t=_e(d.modelValue,d.propType.name),a=Object.assign({},d,v),n=$t("span",{innerHTML:ts(t,l,a)}),r=Xt(t)&&Array.isArray(t)?$t("span",{},[$t("span",{class:"mr-2"},""+t.length),n]):n,s=null==(e=d.propType)?void 0:e.ref;var o,i,u;return s&&(i=st(d.type).find(e=>e.type===s.model))&&(i=(i=_e(d.modelValue,i.name))&&s.refLabel&&_e(i,s.refLabel))?(u=(u=null==(u=c(s.model))?void 0:u.icon)?$t(eo,{image:u,class:"w-5 h-5 mr-1"}):null,$t("span",{class:"flex",title:s.model+" "+t},[u,i])):r}}}),Fv={key:0},Iv={key:0,class:"mr-2"},jv=["innerHTML"],Ov=["innerHTML"],Dv={inheritAttrs:!1},Pv=de({...Dv,__name:"PreviewFormat",props:{value:{},format:{},includeIcon:{type:Boolean,default:!0},includeCount:{type:Boolean,default:!0},maxFieldLength:{default:150},maxNestedFields:{default:2},maxNestedFieldLength:{default:30}},setup(e){let t=e,a=v(()=>Array.isArray(t.value));return(e,t)=>X(Xt)(e.value)?(o(),i("span",Fv,[e.includeCount&&a.value?(o(),i("span",Iv,F(e.value.length),1)):x("",!0),l("span",{innerHTML:X(ts)(e.value,e.format,e.$attrs)},null,8,jv)])):(o(),i("span",{key:1,innerHTML:X(ts)(e.value,e.format,e.$attrs)},null,8,Ov))}}),Bv=["innerHTML"],Hv={key:0},Rv=l("b",null,null,-1),Ev={key:2},zv=de({__name:"HtmlFormat",props:{value:{},depth:{default:0},fieldAttrs:{},classes:{type:Function,default:(e,l,t,a,n)=>a}},setup(e){let t=e,r=v(()=>Tt(t.value)),s=v(()=>Array.isArray(t.value)),u=e=>cn(e),d=e=>t.fieldAttrs?t.fieldAttrs(e):null,c=v(()=>Ws(t.value));return(t,e)=>{let a=Z("HtmlFormat",!0);return o(),i("div",{class:y(0==t.depth?"prose html-format":"")},[r.value?(o(),i("div",{key:0,innerHTML:X(ts)(t.value)},null,8,Bv)):s.value?(o(),i("div",{key:1,class:y(t.classes("array","div",t.depth,X(he).gridClass))},[X(Tt)(t.value[0])?(o(),i("div",Hv,"[ "+F(t.value.join(", "))+" ]",1)):(o(),i("div",{key:1,class:y(t.classes("array","div",t.depth,X(he).grid2Class))},[l("div",{class:y(t.classes("array","div",t.depth,X(he).grid3Class))},[l("div",{class:y(t.classes("array","div",t.depth,X(he).grid4Class))},[l("table",{class:y(t.classes("object","table",t.depth,X(he).tableClass))},[l("thead",{class:y(t.classes("array","thead",t.depth,X(he).theadClass))},[l("tr",null,[(o(!0),i(Me,null,je(c.value,e=>(o(),i("th",{class:y(t.classes("array","th",t.depth,X(he).theadCellClass+" whitespace-nowrap"))},[Rv,ke(F(u(e)),1)],2))),256))])],2),l("tbody",null,[(o(!0),i(Me,null,je(t.value,(l,e)=>(o(),i("tr",{class:y(t.classes("array","tr",t.depth,e%2==0?"bg-white":"bg-gray-50",e))},[(o(!0),i(Me,null,je(c.value,e=>(o(),i("td",{class:y(t.classes("array","td",t.depth,X(he).tableCellClass))},[ye(a,Te({value:l[e],"field-attrs":t.fieldAttrs,depth:t.depth+1,classes:t.classes},d(e)),null,16,["value","field-attrs","depth","classes"])],2))),256))],2))),256))])],2)],2)],2)],2))],2)):(o(),i("div",Ev,[l("table",{class:y(t.classes("object","table",t.depth,"table-object"))},[(o(!0),i(Me,null,je((n=t.value)?Object.keys(n).map(e=>({key:u(e),val:n[e]})):[],e=>(o(),i("tr",{class:y(t.classes("object","tr",t.depth,""))},[l("th",{class:y(t.classes("object","th",t.depth,"align-top py-2 px-4 text-left text-sm font-medium tracking-wider whitespace-nowrap"))},F(e.key),3),l("td",{class:y(t.classes("object","td",t.depth,"align-top py-2 px-4 text-sm"))},[ye(a,Te({value:e.val,"field-attrs":t.fieldAttrs,depth:t.depth+1,classes:t.classes},d(e.key)),null,16,["value","field-attrs","depth","classes"])],2)],2))),256))],2)]))],2);var n}}}),Nv=["href"],Uv=["href","title"],qv=de({__name:"MarkupFormat",props:{value:{},imageClass:{default:"w-8 h-8"}},setup(e){var l=e,t=La().getMimeType,a=l.value;let n=typeof l.value;l="string"===n&&a.length?t(a):null;return"string"===n&&a.length&&(((t=a.startsWith("https://")||a.startsWith("http://"))||"/"===a[0])&&null!=l&&l.startsWith("image/")?n="image":t&&(n="link")),(e,l)=>{var t=Z("Icon"),a=Z("HtmlFormat");return"link"==X(n)?(o(),i("a",{key:0,href:e.value,class:"text-indigo-600"},F(e.value),9,Nv)):"image"==X(n)?(o(),i("a",{key:1,href:e.value,title:e.value,class:"inline-block"},[ye(t,{src:e.value,class:y(e.imageClass)},null,8,["src","class"])],8,Uv)):(o(),ae(a,{key:2,value:e.value},null,8,["value"]))}}}),Qv={class:"my-2 w-full"},Kv={class:"leading-7"},Zv={class:"px-2 text-left align-top"},Wv={colspan:"align-top"},Gv={class:"my-2 leading-7"},Jv={colspan:"2",class:"px-2 bg-indigo-700 text-white"},Xv={class:"leading-7"},Yv={colspan:"2",class:"px-2 align-top"},ep=de({__name:"MarkupModel",props:{value:{},imageClass:{}},setup(e){let a=e,t=Object.keys(a.value),n={},r={};return t.forEach(e=>{var l=a.value[e],t=typeof l;null==l||"function"==t||"symbol"==t?n[e]=`(${null==l?"null":"t"})`:"object"==t?r[e]=l:n[e]=l}),(e,t)=>{let a=Z("MarkupFormat");return o(),i("table",Qv,[(o(),i(Me,null,je(n,(e,t)=>l("tr",Kv,[l("th",Zv,F(X(Pe)(t)),1),l("td",Wv,[ye(a,{value:e},null,8,["value"])])])),64)),(o(),i(Me,null,je(r,(e,t)=>(o(),i(Me,null,[l("tr",Gv,[l("td",Jv,F(X(Pe)(t)),1)]),l("tr",Xv,[l("td",Yv,[ye(a,{value:e},null,8,["value"])])])],64))),64))])}}}),tp={class:"absolute top-0 right-0 pt-4 pr-4"},sp=l("span",{class:"sr-only"},"Close",-1),lp=l("svg",{class:"h-6 w-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1),np=[sp,lp],op=de({__name:"CloseButton",props:{buttonClass:{default:"bg-white dark:bg-black"}},emits:["close"],setup(e,{}){return(t,e)=>(o(),i("div",tp,[l("button",{type:"button",onClick:e[0]||(e[0]=e=>t.$emit("close")),class:y([t.buttonClass,"rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black"])},np,2)]))}}),ap=["id","aria-labelledby"],rp=l("div",{class:"fixed inset-0"},null,-1),ip={class:"fixed inset-0 overflow-hidden"},up={class:"flex h-full flex-col bg-white dark:bg-black shadow-xl"},dp={class:"flex min-h-0 flex-1 flex-col overflow-auto"},cp={class:"flex-1"},fp={class:"relative bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6"},vp={class:"flex items-start justify-between space-x-3"},pp={class:"space-y-1"},mp={key:0},hp=["id"],gp={key:2,class:"text-sm text-gray-500"},yp={class:"flex h-7 items-center"},bp={key:0,class:"flex-shrink-0 border-t border-gray-200 dark:border-gray-700 px-4 py-5 sm:px-6"},wp=de({__name:"SlideOver",props:{id:{default:"SlideOver"},title:{},contentClass:{default:"relative mt-6 flex-1 px-4 sm:px-6"}},emits:["done"],setup(e,{emit:t}){let a=t,n=O(!1),r=O(""),s={entering:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-full",to:"translate-x-0"},leaving:{cls:"transform transition ease-in-out duration-500 sm:duration-700",from:"translate-x-0",to:"translate-x-full"}},u=(bt(n,()=>{yt(s,r,n.value),n.value||setTimeout(()=>a("done"),700)}),n.value=!0,()=>n.value=!1),d=e=>{"Escape"===e.key&&u()};return Ye(()=>window.addEventListener("keydown",d)),Ft(()=>window.removeEventListener("keydown",d)),(e,t)=>{var a=Z("CloseButton");return o(),i("div",{id:e.id,class:"relative z-10","aria-labelledby":e.id+"-title",role:"dialog","aria-modal":"true"},[rp,l("div",ip,[l("div",{onMousedown:u,class:"absolute inset-0 overflow-hidden"},[l("div",{onMousedown:t[0]||(t[0]=Ue(()=>{},["stop"])),class:"pointer-events-none fixed inset-y-0 right-0 flex pl-10"},[l("div",{class:y(["panel pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg",r.value])},[l("div",up,[l("div",dp,[l("div",cp,[l("div",fp,[l("div",vp,[l("div",pp,[e.$slots.title?(o(),i("div",mp,[U(e.$slots,"title")])):x("",!0),e.title?(o(),i("h2",{key:1,class:"text-lg font-medium text-gray-900 dark:text-gray-50",id:e.id+"-title"},F(e.title),9,hp)):x("",!0),e.$slots.subtitle?(o(),i("p",gp,[U(e.$slots,"subtitle")])):x("",!0)]),l("div",yp,[ye(a,{"button-class":"bg-gray-50 dark:bg-gray-900",onClose:u})])])]),l("div",{class:y(e.contentClass)},[U(e.$slots,"default")],2)])]),e.$slots.footer?(o(),i("div",bp,[U(e.$slots,"footer")])):x("",!0)])],2)],32)],32)])],8,ap)}}}),kp=["id","data-transition-for","aria-labelledby"],_p={class:"fixed inset-0 z-10 overflow-y-auto"},$p={class:"flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0"},Cp=l("span",{class:"sr-only"},"Close",-1),xp=l("svg",{class:"h-6 w-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1),Lp=[Cp,xp],Vp=de({__name:"ModalDialog",props:{id:{default:"ModalDialog"},modalClass:{default:ll.modalClass},sizeClass:{default:ll.sizeClass}},emits:["done"],setup(e,{emit:t}){let a=t,n=O(!1),r=O(""),s={entering:{cls:"ease-out duration-300",from:"opacity-0",to:"opacity-100"},leaving:{cls:"ease-in duration-200",from:"opacity-100",to:"opacity-0"}},u=O(""),d={entering:{cls:"ease-out duration-300",from:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",to:"opacity-100 translate-y-0 sm:scale-100"},leaving:{cls:"ease-in duration-200",from:"opacity-100 translate-y-0 sm:scale-100",to:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"}},v=(bt(n,()=>{yt(s,r,n.value),yt(d,u,n.value),n.value||setTimeout(()=>a("done"),200)}),n.value=!0,()=>n.value=!1),c=(ss("ModalProvider",{openModal:function(e,l){c.value=e,p.value=l}}),O()),p=O();async function f(e){p.value&&p.value(e),c.value=void 0,p.value=void 0}let m=e=>{"Escape"===e.key&&v()};return Ye(()=>window.addEventListener("keydown",m)),Ft(()=>window.removeEventListener("keydown",m)),(e,t)=>{var a,n=Z("ModalLookup");return o(),i("div",{id:e.id,"data-transition-for":e.id,onMousedown:v,class:"relative z-10","aria-labelledby":e.id+"-title",role:"dialog","aria-modal":"true"},[l("div",{class:y(["fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity",r.value])},null,2),l("div",_p,[l("div",$p,[l("div",{class:y([e.modalClass,e.sizeClass,u.value]),onMousedown:t[0]||(t[0]=Ue(()=>{},["stop"]))},[l("div",null,[l("div",{class:"hidden sm:block absolute top-0 right-0 pt-4 pr-4 z-10"},[l("button",{type:"button",onClick:v,class:"bg-white dark:bg-black rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black"},Lp)]),U(e.$slots,"default")])],34)])]),"ModalLookup"==(null==(a=c.value)?void 0:a.name)&&c.value.ref?(o(),ae(n,{key:0,"ref-info":c.value.ref,onDone:f},null,8,["ref-info"])):x("",!0)],40,kp)}}}),Sp={class:"pt-2 overflow-auto",style:{"min-height":"620px"}},Mp={class:"mt-3 pl-5 flex flex-wrap items-center"},Ap={class:"hidden sm:block text-xl leading-6 font-medium text-gray-900 dark:text-gray-50 mr-3"},Tp={class:"hidden md:inline"},Fp={class:"flex pb-1 sm:pb-0"},Ip=["title"],jp=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("g",{"stroke-width":"1.5",fill:"none"},[l("path",{d:"M9 3H3.6a.6.6 0 0 0-.6.6v16.8a.6.6 0 0 0 .6.6H9M9 3v18M9 3h6M9 21h6m0-18h5.4a.6.6 0 0 1 .6.6v16.8a.6.6 0 0 1-.6.6H15m0-18v18",stroke:"currentColor"})])],-1),Op=[jp],Dp=["disabled"],Pp=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6l6 6zM6 6h2v12H6z",fill:"currentColor"})],-1),Bp=[Pp],Hp=["disabled"],Rp=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z",fill:"currentColor"})],-1),Ep=[Rp],zp=["disabled"],Np=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z",fill:"currentColor"})],-1),Up=[Np],qp=["disabled"],Qp=l("svg",{class:"w-8 h-8",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},[l("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6l-6-6zM16 6h2v12h-2z",fill:"currentColor"})],-1),Kp=[Qp],Zp={key:0,class:"flex pb-1 sm:pb-0"},Wp={class:"px-4 text-lg text-black dark:text-white"},Gp={key:0},Jp={key:1},Xp=l("span",{class:"hidden xl:inline"}," Showing Results ",-1),Yp={key:2},em={key:1,class:"pl-2"},tm=l("svg",{class:"w-5 h-5",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",viewBox:"0 0 24 24"},[l("path",{fill:"currentColor",d:"M6.78 2.72a.75.75 0 0 1 0 1.06L4.56 6h8.69a7.75 7.75 0 1 1-7.75 7.75a.75.75 0 0 1 1.5 0a6.25 6.25 0 1 0 6.25-6.25H4.56l2.22 2.22a.75.75 0 1 1-1.06 1.06l-3.5-3.5a.75.75 0 0 1 0-1.06l3.5-3.5a.75.75 0 0 1 1.06 0Z"})],-1),sm=[tm],lm={class:"flex pb-1 sm:pb-0"},nm={key:0,class:"pl-2"},om=l("svg",{class:"flex-none w-5 h-5 mr-2 text-gray-400 dark:text-gray-500 group-hover:text-gray-500","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},[l("path",{"fill-rule":"evenodd",d:"M3 3a1 1 0 011-1h12a1 1 0 011 1v3a1 1 0 01-.293.707L12 11.414V15a1 1 0 01-.293.707l-2 2A1 1 0 018 17v-5.586L3.293 6.707A1 1 0 013 6V3z","clip-rule":"evenodd"})],-1),am={class:"mr-1"},rm={key:0,class:"h-5 w-5 text-gray-400 dark:text-gray-500 group-hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},im=l("path",{"fill-rule":"evenodd",d:"M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z","clip-rule":"evenodd"},null,-1),um=[im],dm={key:1,class:"h-5 w-5 text-gray-400 dark:text-gray-500 group-hover:text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},cm=l("path",{"fill-rule":"evenodd",d:"M5 10a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1z","clip-rule":"evenodd"},null,-1),fm=[cm],vm={key:1},pm={key:4},mm={key:0},hm={key:0,class:"cursor-pointer flex justify-between items-center hover:text-gray-900 dark:hover:text-gray-50"},gm={class:"mr-1 select-none"},ym={key:1,class:"flex justify-between items-center"},bm={class:"mr-1 select-none"},ln=25,wm=de({__name:"ModalLookup",props:{id:{default:"ModalLookup"},refInfo:{},skip:{default:0},prefs:{},selectedColumns:{},allowFiltering:{type:[Boolean,null],default:!0},showPreferences:{type:[Boolean,null],default:!0},showPagingNav:{type:[Boolean,null],default:!0},showPagingInfo:{type:[Boolean,null],default:!0},showResetPreferences:{type:[Boolean,null],default:!0},showFiltersView:{type:[Boolean,null],default:!0},toolbarButtonClass:{},canFilter:{}},emits:["done"],setup(e,{emit:t}){let d=e,a=t,c=al(),n=It().config,{metadataApi:r,filterDefinitions:s}=lt(),u=Qe("client"),p=n.value.storage,f=v(()=>d.toolbarButtonClass??he.toolbarButtonClass),m=v(()=>s.value),g=O({take:ln}),h=O(new Xe),b=O(d.skip),w=O(!1),k=O(),C=e=>"string"==typeof e?e.split(","):e||[];function L(e,l){return he.getTableRowClass("fullWidth",l,!1,!0)}let M=v(()=>rt(d.refInfo.model)),V=v(()=>{var e=(0<(e=C(d.selectedColumns)).length?e:[]).map(e=>e.toLowerCase());let t=st(M.value);return 0t.find(e=>e.name.toLowerCase()===l)).filter(e=>null!=e):t}),G=v(()=>{let e=V.value.map(e=>e.name),l=C(g.value.selectedColumns).map(e=>e.toLowerCase());return 0l.includes(e.toLowerCase())):e}),S=v(()=>g.value.take??ln),T=v(()=>h.value.response?_e(h.value.response,"results"):[]),A=v(()=>{var e;return(null==(e=h.value.response)?void 0:e.total)??T.value.length??0}),I=v(()=>00T.value.length>=S.value),B=v(()=>T.value.length>=S.value),E=O([]),q=v(()=>E.value.some(e=>0E.value.map(e=>e.settings.filters.length).reduce((e,l)=>e+l,0)),Q=v(()=>ns(M.value)),K=v(()=>{var e;return null==(e=r.value)?void 0:e.operations.find(e=>{var l;return(null==(l=e.dataModel)?void 0:l.name)==d.refInfo.model&&qe.isAnyQuery(e)})}),W=O(),D=O(!1),H=O(),P=()=>d.id+"/ApiPrefs/"+d.refInfo.model,R=e=>`Column/${d.id}:${d.refInfo.model}.`+e;async function z(e){b.value+=e,b.value<0&&(b.value=0);var l=Math.floor(A.value/S.value)*S.value;b.value>l&&(b.value=l),await N()}async function J(e,l){a("done",e)}function Y(){a("done",null)}function ee(l,e){var t,a=e.target;"TD"!==(null==a?void 0:a.tagName)&&(a=null==(a=null==a?void 0:a.closest("TABLE"))?void 0:a.getBoundingClientRect(),t=E.value.find(e=>e.name.toLowerCase()==l.toLowerCase()))&&a&&(a=("DIV"===(null==(a=e.target)?void 0:a.tagName)?e.target:null==(a=e.target)?void 0:a.closest("DIV")).getBoundingClientRect(),H.value={column:t,topLeft:{x:Math.max(Math.floor(a.x+25),343),y:Math.floor(115)}})}function le(){H.value=null}async function te(e){var l=null==(l=H.value)?void 0:l.column;l&&(l.settings=e,p.setItem(R(l.name),JSON.stringify(l.settings)),await N()),H.value=null}async function ne(e){p.setItem(R(e.name),JSON.stringify(e.settings)),await N()}async function re(e){D.value=!1,g.value=e,p.setItem(P(),JSON.stringify(e)),await N()}async function N(){var a=(()=>{let a={include:"total",take:S.value},e=C(g.value.selectedColumns||d.selectedColumns);var l;0{t.settings.sort&&n.push(("DESC"===t.settings.sort?"-":"")+t.name),t.settings.filters.forEach(e=>{var l=e.key.replace("%",t.name);a[l]=e.value})}),"u"{h.value.response=h.value.error=void 0,w.value=e}),t=await u.api(e);l(),St(()=>h.value=t);n=_e(t.response,"results")||[];t.succeeded&&n.label}else console.error("No Query API was found for "+d.refInfo.model)}async function se(){E.value.forEach(e=>{e.settings={filters:[]},p.removeItem(R(e.name))}),await N()}return Ye(async()=>{var e=d.prefs||$s(p.getItem(P()));e&&(g.value=e),E.value=V.value.map(e=>({name:e.name,type:e.type,meta:e,settings:Object.assign({filters:[]},$s(p.getItem(R(e.name))))})),isNaN(d.skip)||(b.value=d.skip),await N()}),(n,e)=>{let t=Z("ErrorSummary"),a=Z("Loading"),r=Z("SettingsIcons"),s=Z("DataGrid"),u=Z("ModalDialog");return o(),i(Me,null,[n.refInfo?(o(),ae(u,{key:0,ref_key:"modalDialog",ref:W,id:n.id,onDone:Y},{default:xe(()=>[l("div",Sp,[l("div",Mp,[l("h3",Ap,[ke(" Select "),l("span",Tp,F(X(Pe)(n.refInfo.model)),1)]),l("div",Fp,[n.showPreferences?(o(),i("button",{key:0,type:"button",class:"pl-2 text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400",title:n.refInfo.model+" Preferences",onClick:e[0]||(e[0]=e=>D.value=!D.value)},Op,8,Ip)):x("",!0),n.showPagingNav?(o(),i("button",{key:1,type:"button",class:y(["pl-2",I.value?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"First page",disabled:!I.value,onClick:e[1]||(e[1]=e=>z(-A.value))},Bp,10,Dp)):x("",!0),n.showPagingNav?(o(),i("button",{key:2,type:"button",class:y(["pl-2",j.value?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"Previous page",disabled:!j.value,onClick:e[2]||(e[2]=e=>z(-S.value))},Ep,10,Hp)):x("",!0),n.showPagingNav?(o(),i("button",{key:3,type:"button",class:y(["pl-2",$.value?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"Next page",disabled:!$.value,onClick:e[3]||(e[3]=e=>z(S.value))},Up,10,zp)):x("",!0),n.showPagingNav?(o(),i("button",{key:4,type:"button",class:y(["pl-2",B.value?"text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400":"text-gray-400 dark:text-gray-500"]),title:"Last page",disabled:!B.value,onClick:e[4]||(e[4]=e=>z(A.value))},Kp,10,qp)):x("",!0)]),n.showPagingInfo?(o(),i("div",Zp,[l("div",Wp,[w.value?(o(),i("span",Gp,"Querying...")):x("",!0),T.value.length?(o(),i("span",Jp,[Xp,ke(" "+F(b.value+1)+" - "+F(Math.min(b.value+T.value.length,A.value))+" ",1),l("span",null," of "+F(A.value),1)])):h.value.completed?(o(),i("span",Yp,"No Results")):x("",!0)])])):x("",!0),q.value&&n.showResetPreferences?(o(),i("div",em,[l("button",{type:"button",onClick:se,title:"Reset Preferences & Filters",class:y(f.value)},sm,2)])):x("",!0),l("div",lm,[n.showFiltersView&&0<_.value?(o(),i("div",nm,[l("button",{type:"button",onClick:e[5]||(e[5]=e=>k.value="filters"==k.value?null:"filters"),class:y(f.value),"aria-expanded":"false"},[om,l("span",am,F(_.value)+" "+F(1==_.value?"Filter":"Filters"),1),"filters"!=k.value?(o(),i("svg",rm,um)):(o(),i("svg",dm,fm))],2)])):x("",!0)])]),"filters"==k.value?(o(),ae(Il,{key:0,class:"border-y border-gray-200 dark:border-gray-800 py-8 my-2",definitions:m.value,columns:E.value,onDone:e[6]||(e[6]=e=>k.value=null),onChange:ne},null,8,["definitions","columns"])):x("",!0),H.value?(o(),i("div",vm,[ye(Fl,{definitions:m.value,column:H.value.column,"top-left":H.value.topLeft,onDone:le,onSave:te},null,8,["definitions","column","top-left"])])):x("",!0),h.value.error?(o(),ae(t,{key:2,status:h.value.error},null,8,["status"])):w.value?(o(),ae(a,{key:3})):(o(),i("div",pm,[T.value.length?(o(),i("div",mm,[ye(s,{id:n.id,items:T.value,type:n.refInfo.model,"selected-columns":G.value,onFiltersChanged:N,tableStyle:"fullWidth",rowClass:L,onRowSelected:J,onHeaderSelected:ee},rl({header:xe(({column:t,label:e})=>{var a;return[!n.allowFiltering||d.canFilter&&!d.canFilter(t)?(o(),i("div",ym,[l("span",bm,F(e),1)])):(o(),i("div",hm,[l("span",gm,F(e),1),ye(r,{column:E.value.find(e=>e.name.toLowerCase()===t.toLowerCase()),"is-open":(null==(a=H.value)?void 0:a.column.name)===t},null,8,["column","is-open"])]))]}),_:2},[je(Object.keys(X(c)),l=>({name:l,fn:xe(e=>[U(n.$slots,l,Rt(ks(e)))])}))]),1032,["id","items","type","selected-columns"])])):x("",!0)]))])]),_:3},8,["id"])):x("",!0),D.value?(o(),ae(jl,{key:1,columns:V.value,prefs:g.value,onDone:e[7]||(e[7]=e=>D.value=!1),onSave:re},null,8,["columns","prefs"])):x("",!0)],64)}}}),km={class:"sm:hidden"},_m=["for"],$m=["id","name"],Cm=["value"],xm={class:"hidden sm:block"},Lm={class:"border-b border-gray-200"},Vm={class:"-mb-px flex","aria-label":"Tabs"},Sm=["onClick"],Mm=de({__name:"Tabs",props:{tabs:{},id:{default:"tabs"},param:{default:"tab"},label:{type:Function,default:e=>Pe(e)},selected:{},tabClass:{},bodyClass:{default:"p-4"},url:{type:Boolean,default:!0},clearQuery:{type:Boolean,default:!1}},setup(e){let t=e,a=v(()=>Object.keys(t.tabs)),n=e=>t.label?t.label(e):Pe(e),r=v(()=>t.id||"tabs"),s=v(()=>t.param||"tab"),u=O();function d(e){u.value=e,t.url&&ul({tab:e===a.value[0]?void 0:e},t.clearQuery)}let c=v(()=>100/Object.keys(t.tabs).length+"%");return Ye(()=>{var e;u.value=t.selected||Object.keys(t.tabs)[0],t.url&&(e=location.search||(location.hash.includes("?")?"?"+ms(location.hash,"?"):""),e=Zs(e)[s.value])&&(u.value=e)}),(t,e)=>(o(),i("div",null,[l("div",km,[l("label",{for:r.value,class:"sr-only"},"Select a tab",8,_m),l("select",{id:r.value,name:r.value,class:"block w-full rounded-md border-gray-300 focus:border-indigo-500 focus:ring-indigo-500",onChange:e[0]||(e[0]=e=>{var l;return d(null==(l=e.target)?void 0:l.value)})},[(o(!0),i(Me,null,je(a.value,e=>(o(),i("option",{key:e,value:e},F(n(e)),9,Cm))),128))],40,$m)]),l("div",xm,[l("div",Lm,[l("nav",Vm,[(o(!0),i(Me,null,je(a.value,l=>{return o(),i("a",{href:"#",onClick:Ue(e=>d(l),["prevent"]),style:nl({width:c.value}),class:y([(e=l,u.value===e?"border-indigo-500 text-indigo-600 py-4 px-1 text-center border-b-2 font-medium text-sm":"border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 py-4 px-1 text-center border-b-2 font-medium text-sm"),t.tabClass])},F(n(l)),15,Sm);var e}),256))])])]),l("div",{class:y(t.bodyClass)},[(o(),ae(an(t.tabs[u.value])))],2)]))}}),Am=l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4 text-gray-400",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 32 32"},[l("path",{fill:"currentColor",d:"M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3Z"})],-1),Tm=[Am],Fm=l("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-4 w-4 text-indigo-600",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 32 32"},[l("path",{fill:"currentColor",d:"M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6ZM5.394 6.813L6.81 5.399l3.505 3.506L8.9 10.319zM2 15.005h5v2H2zm3.394 10.193L8.9 21.692l1.414 1.414l-3.505 3.506zM15 25.005h2v5h-2zm6.687-1.9l1.414-1.414l3.506 3.506l-1.414 1.414zm3.313-8.1h5v2h-5zm-3.313-6.101l3.506-3.506l1.414 1.414l-3.506 3.506zM15 2.005h2v5h-2z"})],-1),Im=[Fm],jm=de({__name:"DarkModeToggle",setup(e){let a=typeof document<"u"?document.documentElement:null,n=()=>!(null==a||!a.classList.contains("dark")),r=O("dark"==localStorage.getItem("color-scheme"));return(e,t)=>(o(),i("button",{type:"button",class:"bg-gray-200 dark:bg-gray-700 relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black",role:"switch","aria-checked":"false",onClick:t[0]||(t[0]=e=>{n()?null!=a&&a.classList.remove("dark"):null!=a&&a.classList.add("dark"),r.value=n(),localStorage.setItem("color-scheme",r.value?"dark":"light")})},[l("span",{class:y(`${r.value?"translate-x-0":"translate-x-5"} pointer-events-none relative inline-block h-5 w-5 rounded-full bg-white dark:bg-black shadow transform ring-0 transition ease-in-out duration-200`)},[l("span",{class:y(`${r.value?"opacity-100 ease-in duration-200":"opacity-0 ease-out duration-100"} absolute inset-0 h-full w-full flex items-center justify-center transition-opacity`),"aria-hidden":"true"},Tm,2),l("span",{class:y(`${r.value?"opacity-0 ease-out duration-100":"opacity-100 ease-in duration-200"} absolute inset-0 h-full w-full flex items-center justify-center transition-opacity`),"aria-hidden":"true"},Im,2)],2)]))}}),Om={key:0},Dm={key:1,class:"min-h-full flex flex-col justify-center py-12 sm:px-6 lg:px-8"},Pm={class:"sm:mx-auto sm:w-full sm:max-w-md"},Bm={class:"mt-6 text-center text-3xl font-extrabold text-gray-900"},Hm={key:0,class:"mt-4 text-center text-sm text-gray-600"},Rm={class:"relative z-0 inline-flex shadow-sm rounded-md"},Em=["onClick"],zm={class:"mt-8 sm:mx-auto sm:w-full sm:max-w-md"},Nm={class:"bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10"},Um={class:"mt-8"},qm={key:1,class:"mt-6"},Qm=xs('
Or continue with
',1),Km={class:"mt-6 grid grid-cols-3 gap-3"},Zm=["href","title"],Wm={key:1,class:"h-5 w-5 text-gray-700",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},Gm=l("path",{d:"M16 8a5 5 0 1 0 5 5a5 5 0 0 0-5-5z",fill:"currentColor"},null,-1),Jm=l("path",{d:"M16 2a14 14 0 1 0 14 14A14.016 14.016 0 0 0 16 2zm7.992 22.926A5.002 5.002 0 0 0 19 20h-6a5.002 5.002 0 0 0-4.992 4.926a12 12 0 1 1 15.985 0z",fill:"currentColor"},null,-1),Xm=[Gm,Jm],Ym=de({__name:"SignIn",props:{provider:{},title:{default:"Sign In"},tabs:{type:[Boolean,String],default:!0},oauth:{type:[Boolean,String],default:!0}},emits:["login"],setup(e,{emit:t}){let a=e,n=t,{getMetadata:r,createDto:s}=lt(),u=Ds(),d=Qe("client"),c=Tl().signIn,p=r({assert:!0}),f=p.plugins.auth,m=document.baseURI,g=p.app.baseUrl,h=O(s("Authenticate")),b=O(new Xe),w=O(a.provider),k=(Ye(()=>{null!=f&&f.authProviders.map(e=>e.formLayout).filter(e=>e).forEach(e=>e.forEach(e=>h.value[e.id]="checkbox"!==e.type&&""))}),v(()=>(null==f?void 0:f.authProviders.filter(e=>e.formLayout))||[])),C=v(()=>k.value[0]||{}),L=v(()=>k.value[Math.max(k.value.length-1,0)]||{}),M=v(()=>(w.value?null==f?void 0:f.authProviders.find(e=>e.name===w.value):null)??C.value),V=e=>!1===e||"false"===e;function S(e){return e.label||e.navItem&&e.navItem.label}let T=v(()=>{var e;return((null==(e=M.value)?void 0:e.formLayout)||[]).map(e=>{var l;return Object.assign({},e,{type:null==(l=e.type)?void 0:l.toLowerCase(),autocomplete:e.autocomplete||("password"===(null==(l=e.type)?void 0:l.toLowerCase())?"current-password":void 0)||("username"===e.id.toLowerCase()?"username":void 0),css:Object.assign({field:"col-span-12"},e.css)})})}),A=v(()=>!V(a.oauth)&&(null==f?void 0:f.authProviders.filter(e=>"oauth"===e.type))||[]),I=v(()=>{let e=Ho(null==f?void 0:f.authProviders.filter(e=>e.formLayout&&0{e[S(l)||at(l.name)]=l.name===C.value.name?"":l.name});var l=M.value;return e=l&&V(a.tabs)?{[S(l)||at(l.name)]:l}:e}),j=v(()=>{var e=T.value.map(e=>e.id).filter(e=>e);return b.value.summaryMessage(e)});async function $(){var e;h.value.provider=M.value.name,"authsecret"===M.value.name?(d.headers.set("authsecret",h.value.authsecret),h.value=s("Authenticate")):"basic"===M.value.name?(d.setCredentials(h.value.UserName,h.value.Password),h.value=s("Authenticate"),h.value.UserName=null,h.value.Password=null):"Bearer"!==M.value.type&&"jwt"!==M.value.name||(d.bearerToken=h.value.BearerToken,h.value=s("Authenticate")),b.value=await u.api(h.value),b.value.succeeded&&(e=b.value.response,c(e),n("login",e),b.value=new Xe,h.value=s("Authenticate"))}return(e,t)=>{let a=Z("ErrorSummary"),n=Z("AutoFormFields"),r=Z("PrimaryButton"),s=Z("Icon"),u=_o("href");return X(f)?(o(),i("div",Dm,[l("div",Pm,[l("h2",Bm,F(e.title),1),1Mt((o(),i("a",{onClick:e=>w.value=l,class:y([""===l||l===C.value.name?"rounded-l-md":l===L.value.name?"rounded-r-md -ml-px":"-ml-px",w.value===l?"z-10 outline-none ring-1 ring-indigo-500 border-indigo-500":"","cursor-pointer relative inline-flex items-center px-4 py-1 border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50"])},[ke(F(e),1)],10,Em)),[[u,{provider:l}]])),256))])])):x("",!0)]),l("div",zm,[j.value?(o(),ae(a,{key:0,class:"mb-3",errorSummary:j.value},null,8,["errorSummary"])):x("",!0),l("div",Nm,[T.value.length?(o(),i("form",{key:0,onSubmit:Ue($,["prevent"])},[ye(n,{modelValue:h.value,formLayout:T.value,api:b.value,hideSummary:!0,"divide-class":"","space-class":"space-y-6"},null,8,["modelValue","formLayout","api"]),l("div",Um,[ye(r,{class:"w-full"},{default:xe(()=>[ke("Sign In")]),_:1})])],32)):x("",!0),A.value.length?(o(),i("div",qm,[Qm,l("div",Km,[(o(!0),i(Me,null,je(A.value,e=>(o(),i("div",null,[l("a",{href:X(g)+e.navItem.href+"?continue="+X(m),title:S(e),class:"w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"},[e.icon?(o(),ae(s,{key:0,image:e.icon,class:"h-5 w-5 text-gray-700"},null,8,["image"])):(o(),i("svg",Wm,Xm))],8,Zm)]))),256))])])):x("",!0)])])])):(o(),i("div",Om,"No Auth Plugin"))}}}),e1=["for"],t1={key:1,class:"border border-gray-200 flex justify-between"},s1={class:"p-2 flex flex-wrap gap-x-4"},l1=l("title",null,"Bold text (CTRL+B)",-1),n1=l("path",{fill:"currentColor",d:"M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79c0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79c0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z"},null,-1),o1=[l1,n1],a1=l("title",null,"Italics (CTRL+I)",-1),r1=l("path",{fill:"currentColor",d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4h-8z"},null,-1),i1=[a1,r1],u1=l("title",null,"Insert Link (CTRL+K)",-1),d1=l("path",{fill:"currentColor",d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7a5 5 0 0 0-5 5a5 5 0 0 0 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8v2m9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1c0 1.71-1.39 3.1-3.1 3.1h-4V17h4a5 5 0 0 0 5-5a5 5 0 0 0-5-5Z"},null,-1),c1=[u1,d1],f1=l("title",null,"Blockquote (CTRL+Q)",-1),v1=l("path",{fill:"currentColor",d:"m15 17l2-4h-4V6h7v7l-2 4h-3Zm-9 0l2-4H4V6h7v7l-2 4H6Z"},null,-1),p1=[f1,v1],m1=l("title",null,"Insert Image (CTRL+SHIFT+L)",-1),h1=l("path",{fill:"currentColor",d:"M2.992 21A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992ZM20 15V5H4v14L14 9l6 6Zm0 2.828l-6-6L6.828 19H20v-1.172ZM8 11a2 2 0 1 1 0-4a2 2 0 0 1 0 4Z"},null,-1),g1=[m1,h1],y1=l("title",null,"Insert Code (CTRL+<)",-1),b1=l("path",{fill:"currentColor",d:"m8 18l-6-6l6-6l1.425 1.425l-4.6 4.6L9.4 16.6L8 18Zm8 0l-1.425-1.425l4.6-4.6L14.6 7.4L16 6l6 6l-6 6Z"},null,-1),w1=[y1,b1],k1=l("title",null,"H2 Heading (CTRL+H)",-1),_1=l("path",{fill:"currentColor",d:"M7 20V7H2V4h13v3h-5v13H7Zm9 0v-8h-3V9h9v3h-3v8h-3Z"},null,-1),$1=[k1,_1],C1=l("title",null,"Numbered List (ALT+1)",-1),x1=l("path",{fill:"currentColor",d:"M3 22v-1.5h2.5v-.75H4v-1.5h1.5v-.75H3V16h3q.425 0 .713.288T7 17v1q0 .425-.288.713T6 19q.425 0 .713.288T7 20v1q0 .425-.288.713T6 22H3Zm0-7v-2.75q0-.425.288-.713T4 11.25h1.5v-.75H3V9h3q.425 0 .713.288T7 10v1.75q0 .425-.288.713T6 12.75H4.5v.75H7V15H3Zm1.5-7V3.5H3V2h3v6H4.5ZM9 19v-2h12v2H9Zm0-6v-2h12v2H9Zm0-6V5h12v2H9Z"},null,-1),L1=[C1,x1],V1=l("title",null,"Bulleted List (ALT+-)",-1),S1=l("path",{fill:"currentColor",d:"M9 19v-2h12v2H9Zm0-6v-2h12v2H9Zm0-6V5h12v2H9ZM5 20q-.825 0-1.413-.588T3 18q0-.825.588-1.413T5 16q.825 0 1.413.588T7 18q0 .825-.588 1.413T5 20Zm0-6q-.825 0-1.413-.588T3 12q0-.825.588-1.413T5 10q.825 0 1.413.588T7 12q0 .825-.588 1.413T5 14Zm0-6q-.825 0-1.413-.588T3 6q0-.825.588-1.413T5 4q.825 0 1.413.588T7 6q0 .825-.588 1.413T5 8Z"},null,-1),M1=[V1,S1],A1=l("title",null,"Strike Through (ALT+S)",-1),T1=l("path",{fill:"currentColor",d:"M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z"},null,-1),F1=[A1,T1],I1=l("title",null,"Undo (CTRL+Z)",-1),j1=l("path",{fill:"currentColor",d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88c3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"},null,-1),O1=[I1,j1],D1=l("title",null,"Redo (CTRL+SHIFT+Z)",-1),P1=l("path",{fill:"currentColor",d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 0 1 7.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"},null,-1),B1=[D1,P1],H1={key:0,class:"p-2 flex flex-wrap gap-x-4"},R1=["href"],E1=l("path",{fill:"currentColor",d:"M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5c0-2.21-1.79-4-4-4z"},null,-1),z1=[E1],N1={class:""},U1=["name","id","label","value","rows","disabled"],q1=["id"],Q1=["id"],Je="w-5 h-5 cursor-pointer select-none text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400",K1=de({__name:"MarkdownInput",props:{status:{},id:{},inputClass:{},label:{},labelClass:{},help:{},placeholder:{},modelValue:{},counter:{type:Boolean},rows:{},errorMessages:{},lang:{},autoFocus:{type:Boolean},disabled:{type:Boolean},helpUrl:{default:"https://guides.github.com/features/mastering-markdown/"},hide:{}},emits:["update:modelValue","close"],setup(e,{expose:t,emit:a}){let n=e,r=a,h=[],b=[],s=Qe("ApiState",void 0),u=v(()=>mt.call({responseStatus:n.status??(null==s?void 0:s.error.value)},n.id)),d=v(()=>n.label??Pe(at(n.id))),c="bold,italics,link,image,blockquote,code,heading,orderedList,unorderedList,strikethrough,undo,redo,help".split(","),p=v(()=>n.hide?Vt(c,n.hide):Vt(c,[]));function f(e){return p.value[e]}let m=v(()=>["shadow-sm font-mono"+ot.base.replace("rounded-md",""),u.value?"text-red-900 focus:ring-red-500 focus:border-red-500 border-red-300":"text-gray-900 "+ot.valid,n.inputClass]),w=O();function k(e){r("update:modelValue",e)}function g(){return w.value.selectionStart!==w.value.selectionEnd}function C(){var e=w.value;return e.value.substring(e.selectionStart,e.selectionEnd)||""}function L(){var e=w.value,l=e.value,t=e.selectionStart,e=l.substring(t,e.selectionEnd)||"",a=l.substring(0,t),n=a.lastIndexOf(` +`);return{value:l,sel:e,selPos:t,beforeSel:a,afterSel:l.substring(t),prevCRPos:n,beforeCR:0<=n?a.substring(0,n+1):"",afterCR:0<=n?a.substring(n+1):""}}function M({value:e,selectionStart:l,selectionEnd:t}){null==t&&(t=l),k(e),St(()=>{w.value.focus(),w.value.setSelectionRange(l,t)})}function V(e,l,t="",{selectionAtEnd:a,offsetStart:n,offsetEnd:r,filterValue:s,filterSelection:o}={}){let i=w.value,u=i.value,d=i.selectionEnd;h.push({value:u,selectionStart:i.selectionStart,selectionEnd:i.selectionEnd}),b=[];var v,c=i.selectionStart,p=i.selectionEnd,f=u.substring(0,c),m=u.substring(p),g=e&&f.endsWith(e)&&m.startsWith(l);c==p?(g?(u=f.substring(0,f.length-e.length)+m.substring(l.length),d+=-l.length):(u=f+e+t+l+m,d+=e.length,n=0,r=(null==t?void 0:t.length)||0,a&&(d+=r,r=0)),s&&(v={pos:d},u=s(u,v),d=v.pos)):(v=u.substring(c,p),o&&(v=o(v)),g?(u=f.substring(0,f.length-e.length)+v+m.substring(l.length),n=-v.length-e.length,r=v.length):(u=f+e+v+l+m,n?d+=(e+l).length:(d=c,n=e.length,r=v.length))),k(u),St(()=>{i.focus(),n=d+(n||0),r=(n||0)+(r||0),i.setSelectionRange(n,r)})}t({props:n,textarea:w,updateModelValue:k,selection:C,hasSelection:g,selectionInfo:L,insert:V,replace:M});let S=()=>V("**","**","bold"),T=()=>V("_","_","italics"),A=()=>V("~~","~~","strikethrough"),I=()=>V("[","](https://)","",{offsetStart:-9,offsetEnd:8}),j=()=>V(` > `,` -`,"Blockquote",{}),O=()=>T("![](",")");function _(e){var t=L();t&&!e.shiftKey?T("`","`","code"):(e=r.lang||"js",-1===t.indexOf(` -`)?T("\n```"+e+` -`,"\n```\n","// code"):T("```"+e+` -`,"```\n",""))}function E(){if(C()){let{sel:e,beforeSel:a,afterSel:s,prevCRPos:n,beforeCR:o,afterCR:r}=V();if(-1===e.indexOf(` -`))T(` +`,"Blockquote",{}),$=()=>V("![](",")");function B(e){var l,t=C();t&&!e.shiftKey?V("`","`","code"):(l=n.lang||"js",-1===t.indexOf(` +`)?V("\n```"+l+` +`,"\n```\n","// code"):V("```"+l+` +`,"```\n",""))}function E(){if(g()){let{sel:e,beforeSel:a,afterSel:n,prevCRPos:r,beforeCR:s,afterCR:o}=L();if(-1===e.indexOf(` +`))V(` 1. `,` -`);else if(e.startsWith(" 1. "))T("","","",{filterValue:(e,t)=>{var l;return 0<=n&&(l=r.replace(/^ - /,""),a=o+l,t.pos-=r.length-l.length),a+s},filterSelection:e=>e.replace(/^ 1. /g,"").replace(/\n \d+. /g,` -`)});else{let t=1;T("",""," - ",{selectionAtEnd:!0,filterSelection:e=>" 1. "+e.replace(/\n$/,"").replace(/\n/g,e=>` - ${++t}. `)+` -`})}}else T(` +`);else if(e.startsWith(" 1. "))V("","","",{filterValue:(e,l)=>{var t;return 0<=r&&(t=o.replace(/^ - /,""),a=s+t,l.pos-=o.length-t.length),a+n},filterSelection:e=>e.replace(/^ 1. /g,"").replace(/\n \d+. /g,` +`)});else{let l=1;V("",""," - ",{selectionAtEnd:!0,filterSelection:e=>" 1. "+e.replace(/\n$/,"").replace(/\n/g,e=>` + ${++l}. `)+` +`})}}else V(` 1. `,` -`,"List Item",{offsetStart:-10,offsetEnd:9})}function D(){if(C()){let{sel:e,beforeSel:a,afterSel:s,prevCRPos:n,beforeCR:o,afterCR:r}=V();-1===e.indexOf(` -`)?T(` +`,"List Item",{offsetStart:-10,offsetEnd:9})}function _(){if(g()){let{sel:e,beforeSel:a,afterSel:n,prevCRPos:r,beforeCR:s,afterCR:o}=L();-1===e.indexOf(` +`)?V(` - `,` -`):e.startsWith(" - ")?T("","","",{filterValue:(e,t)=>{var l;return 0<=n&&(l=r.replace(/^ - /,""),a=o+l,t.pos-=r.length-l.length),a+s},filterSelection:e=>e.replace(/^ - /g,"").replace(/\n - /g,` -`)}):T("",""," - ",{selectionAtEnd:!0,filterSelection:e=>" - "+e.replace(/\n$/,"").replace(/\n/g,` +`):e.startsWith(" - ")?V("","","",{filterValue:(e,l)=>{var t;return 0<=r&&(t=o.replace(/^ - /,""),a=s+t,l.pos-=o.length-t.length),a+n},filterSelection:e=>e.replace(/^ - /g,"").replace(/\n - /g,` +`)}):V("",""," - ",{selectionAtEnd:!0,filterSelection:e=>" - "+e.replace(/\n$/,"").replace(/\n/g,` - `)+` -`})}else T(` +`})}else V(` - `,` -`,"List Item",{offsetStart:-10,offsetEnd:9})}function H(){var e=L(),t=-1===e.indexOf(` -`);e?t?T(` +`,"List Item",{offsetStart:-10,offsetEnd:9})}function D(){var e=C(),l=-1===e.indexOf(` +`);e?l?V(` ## `,` -`,""):T("## ","",""):T(` +`,""):V("## ","",""):V(` ## `,` -`,"Heading",{offsetStart:-8,offsetEnd:7})}function z(){var e,t;return 0!==g.length&&(e=b.value,t=g.pop(),h.push({value:e.value,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}),S(t),!0)}function R(){var e,t;return 0!==h.length&&(e=b.value,t=h.pop(),g.push({value:e.value,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}),S(t),!0)}const P=()=>null;return Xe(()=>{g=[],h=[],b.value.onkeydown=e=>{if("Escape"===e.key||27===e.keyCode)l("close");else{var t=String.fromCharCode(e.keyCode).toLowerCase();if("\t"===t)e.shiftKey?T("","","",{filterValue:(e,t)=>{let{beforeSel:l,afterSel:a,prevCRPos:s,beforeCR:n,afterCR:o}=V();var r;return 0<=s&&(r=o.replace(/\t/g," ").replace(/^ ? ? ? ?/,""),l=n+r,t.pos-=o.length-r.length),l+a},filterSelection:e=>e.replace(/\t/g," ").replace(/^ ? ? ? ?/g,"").replace(/\n /g,` -`)}):T("",""," ",{selectionAtEnd:!0,filterSelection:e=>" "+e.replace(/\n$/,"").replace(/\n/g,` +`,"Heading",{offsetStart:-8,offsetEnd:7})}function H(){var e,l;return 0!==h.length&&(e=w.value,l=h.pop(),b.push({value:e.value,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}),M(l),!0)}function P(){var e,l;return 0!==b.length&&(e=w.value,l=b.pop(),h.push({value:e.value,selectionStart:e.selectionStart,selectionEnd:e.selectionEnd}),M(l),!0)}let R=()=>null;return Ye(()=>{h=[],b=[],w.value.onkeydown=e=>{if("Escape"===e.key||27===e.keyCode)r("close");else{var l=String.fromCharCode(e.keyCode).toLowerCase();if("\t"===l)e.shiftKey?V("","","",{filterValue:(e,l)=>{let{beforeSel:t,afterSel:a,prevCRPos:n,beforeCR:r,afterCR:s}=L();var o;return 0<=n&&(o=s.replace(/\t/g," ").replace(/^ ? ? ? ?/,""),t=r+o,l.pos-=s.length-o.length),t+a},filterSelection:e=>e.replace(/\t/g," ").replace(/^ ? ? ? ?/g,"").replace(/\n /g,` +`)}):V("",""," ",{selectionAtEnd:!0,filterSelection:e=>" "+e.replace(/\n$/,"").replace(/\n/g,` `)+` -`}),e.preventDefault();else if(e.ctrlKey)if("z"===t)e.shiftKey?R()&&e.preventDefault():z()&&e.preventDefault();else if("b"!==t||e.shiftKey)if("h"!==t||e.shiftKey)if("i"!==t||e.shiftKey)if("q"!==t||e.shiftKey)if("k"===t)(e.shiftKey?O:B)(),e.preventDefault();else if(","===t||"<"===e.key||">"===e.key||188===e.keyCode)_(e),e.preventDefault();else if("/"!==t&&"/"!==e.key)"?"!==t&&"?"!==e.key||!e.shiftKey||(T(`/* +`}),e.preventDefault();else if(e.ctrlKey)if("z"===l)e.shiftKey?P()&&e.preventDefault():H()&&e.preventDefault();else if("b"!==l||e.shiftKey)if("h"!==l||e.shiftKey)if("i"!==l||e.shiftKey)if("q"!==l||e.shiftKey)if("k"===l)(e.shiftKey?$:I)(),e.preventDefault();else if(","===l||"<"===e.key||">"===e.key||188===e.keyCode)B(e),e.preventDefault();else if("/"!==l&&"/"!==e.key)"?"!==l&&"?"!==e.key||!e.shiftKey||(V(`/* `,`*/ -`,""),e.preventDefault());else{{let{sel:e,selPos:t,beforeSel:a,afterSel:s,prevCRPos:n,beforeCR:o,afterCR:r}=V();e.startsWith("//")||r.startsWith("//")?T("","","",{filterValue:(e,t)=>{var l;return 0<=n&&(l=r.replace(/^\/\//,""),a=o+l,t.pos-=r.length-l.length),a+s},filterSelection:e=>e.replace(/^\/\//g,"").replace(/\n\/\//g,` -`)}):e?T("","","//",{selectionAtEnd:!0,filterSelection:e=>"//"+e.replace(/\n$/,"").replace(/\n/g,` +`,""),e.preventDefault());else{{let{sel:e,selPos:l,beforeSel:a,afterSel:n,prevCRPos:r,beforeCR:s,afterCR:o}=L();e.startsWith("//")||o.startsWith("//")?V("","","",{filterValue:(e,l)=>{var t;return 0<=r&&(t=o.replace(/^\/\//,""),a=s+t,l.pos-=o.length-t.length),a+n},filterSelection:e=>e.replace(/^\/\//g,"").replace(/\n\/\//g,` +`)}):e?V("","","//",{selectionAtEnd:!0,filterSelection:e=>"//"+e.replace(/\n$/,"").replace(/\n/g,` //`)+` -`}):S({value:o+"//"+r+s,selectionStart:t+2})}e.preventDefault()}else j(),e.preventDefault();else $(),e.preventDefault();else H(),e.preventDefault();else I(),e.preventDefault();else e.altKey&&("1"===e.key||"0"===e.key?(E(),e.preventDefault()):"-"===e.key?(D(),e.preventDefault()):"s"===e.key&&(F(),e.preventDefault()))}}}),(e,t)=>{var l;return a(),u("div",null,[Z(e.$slots,"header",Le({inputElement:b.value,id:n.id,modelValue:n.modelValue,status:n.status},e.$attrs)),o(d)?(a(),u("label",{key:0,for:n.id,class:w("mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300 "+(n.labelClass??""))},A(o(d)),11,av)):k("",!0),n.disabled?k("",!0):(a(),u("div",iv,[s("div",rv,[p("bold")?(a(),u("svg",{key:0,class:w(y),onClick:I,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},cv)):k("",!0),p("italics")?(a(),u("svg",{key:1,class:w(y),onClick:$,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},vv)):k("",!0),p("link")?(a(),u("svg",{key:2,class:w(y),onClick:B,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},pv)):k("",!0),p("blockquote")?(a(),u("svg",{key:3,class:w(y),onClick:j,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},wv)):k("",!0),p("image")?(a(),u("svg",{key:4,class:w(y),onClick:O,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},$v)):k("",!0),p("code")?(a(),u("svg",{key:5,class:w(y),onClick:_,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Lv)):k("",!0),p("heading")?(a(),u("svg",{key:6,class:w(y),onClick:H,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Mv)):k("",!0),p("orderedList")?(a(),u("svg",{key:7,class:w(y),icon:"",onClick:E,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Fv)):k("",!0),p("unorderedList")?(a(),u("svg",{key:8,class:w(y),onClick:D,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Ov)):k("",!0),p("strikethrough")?(a(),u("svg",{key:9,class:w(y),onClick:F,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Bv)):k("",!0),p("undo")?(a(),u("svg",{key:10,class:w(y),onClick:z,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Ev)):k("",!0),p("redo")?(a(),u("svg",{key:11,class:w(y),onClick:R,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Uv)):k("",!0),Z(e.$slots,"toolbarbuttons",{instance:null==(l=Be())?void 0:l.exposed})]),p("help")&&n.helpUrl?(a(),u("div",qv,[s("a",{title:"formatting help",target:"_blank",href:n.helpUrl,tabindex:"-1"},[(a(),u("svg",{class:w(y),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Zv))],8,Qv)])):k("",!0)])),s("div",Gv,[s("textarea",{ref_key:"txt",ref:b,name:n.id,id:n.id,class:w(o(m)),label:n.label,value:n.modelValue,rows:n.rows||6,disabled:n.disabled,onInput:t[0]||(t[0]=e=>{return x((null==(e=e.target)?void 0:e.value)||"")}),onKeydown:Qn(P,["tab"])},null,42,Wv)]),o(i)?(a(),u("p",{key:2,class:"mt-2 text-sm text-red-500",id:n.id+"-error"},A(o(i)),9,Jv)):n.help?(a(),u("p",{key:3,class:"mt-2 text-sm text-gray-500",id:n.id+"-description"},A(n.help),9,Xv)):k("",!0),Z(e.$slots,"footer",Le({inputElement:b.value,id:n.id,modelValue:n.modelValue,status:n.status},e.$attrs))])}}}),eh={key:0,class:"relative z-10 lg:hidden",role:"dialog","aria-modal":"true"},th={class:"fixed inset-0 flex"},lh=s("span",{class:"sr-only"},"Close sidebar",-1),nh=s("svg",{class:"h-6 w-6 text-white",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),sh=[lh,nh],oh={class:"flex grow flex-col gap-y-5 overflow-y-auto bg-white px-6 pb-2"},ah={class:"hidden lg:fixed lg:inset-y-0 lg:z-10 lg:flex lg:w-72 lg:flex-col"},ih={class:"flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 bg-white px-6"},rh={class:w(["sticky top-0 flex items-center gap-x-6 bg-white px-4 py-4 shadow-sm sm:px-6 lg:hidden"])},uh=s("span",{class:"sr-only"},"Open sidebar",-1),dh=s("svg",{class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})],-1),ch=[uh,dh],fh=ue({__name:"SidebarLayout",setup(e,{expose:t}){const l=ns()["transition"],n=M(!0),o=M(""),r={entering:{cls:"transition-opacity ease-linear duration-300",from:"opacity-0",to:"opacity-100"},leaving:{cls:"transition-opacity ease-linear duration-300",from:"opacity-100",to:"opacity-0"}},i=M(""),d={entering:{cls:"transition ease-in-out duration-300 transform",from:"-translate-x-full",to:"translate-x-0"},leaving:{cls:"transition ease-in-out duration-300 transform",from:"translate-x-0",to:"-translate-x-full"}},c=M(""),v={entering:{cls:"ease-in-out duration-300",from:"opacity-0",to:"opacity-100"},leaving:{cls:"ease-in-out duration-300",from:"opacity-100",to:"opacity-0"}};function f(e){l(r,o,e),l(d,i,e),l(v,c,e),setTimeout(()=>n.value=e,300)}function p(){f(!0)}function m(){f(!1)}return t({show:p,hide:m,toggle:f}),(e,t)=>(a(),u("div",null,[n.value?(a(),u("div",eh,[s("div",{class:w(["fixed inset-0 bg-gray-900/80",o.value])},null,2),s("div",th,[s("div",{class:w(["relative mr-16 flex w-full max-w-xs flex-1",i.value])},[s("div",{class:w(["absolute left-full top-0 flex w-16 justify-center pt-5",c.value])},[s("button",{type:"button",onClick:m,class:"-m-2.5 p-2.5"},sh)],2),s("div",oh,[Z(e.$slots,"default")])],2)])])):k("",!0),s("div",ah,[s("div",ih,[Z(e.$slots,"default")])]),s("div",rh,[s("button",{type:"button",onClick:p,class:"-m-2.5 p-2.5 text-gray-700 lg:hidden"},ch),Z(e.$slots,"mobiletitlebar")])]))}}),mh={Alert:jo,AlertSuccess:Zo,ErrorSummary:Yo,InputDescription:ta,Icon:Rs,Loading:Qa,OutlineButton:Ga,PrimaryButton:Xa,SecondaryButton:ti,TextLink:ni,Breadcrumbs:ui,Breadcrumb:vi,NavList:pi,NavListItem:Si,AutoQueryGrid:Ju,SettingsIcons:cd,FilterViews:Cn,FilterColumn:$n,QueryPrefs:_n,EnsureAccess:Es,EnsureAccessDialog:fd,TextInput:kd,TextareaInput:Md,SelectInput:Od,CheckboxInput:Nd,TagInput:fc,FileInput:Oc,Autocomplete:Jc,Combobox:e0,DynamicInput:t0,LookupInput:p0,AutoFormFields:y0,AutoForm:E0,AutoCreateForm:cf,AutoEditForm:Df,ConfirmDelete:Pf,FormLoading:Nf,DataGrid:Zf,CellFormat:Gf,PreviewFormat:t1,HtmlFormat:a1,CloseButton:c1,SlideOver:_1,ModalDialog:F1,ModalLookup:_m,Tabs:Dm,DarkModeToggle:Rm,SignIn:ov,MarkdownInput:Yv,SidebarLayout:fh},Rl=mh,wh={install(t){function l(t){var e=Object.keys(t).filter(e=>t[e]).map(e=>encodeURIComponent(e)+"="+encodeURIComponent(t[e])).join("&");return e?"?"+e:"./"}Object.keys(Rl).forEach(e=>{t.component(e,Rl[e])}),t.directive("href",function(e,t){e.href=l(t.value),e.onclick=e=>{e.preventDefault(),history.pushState(t.value,"",l(t.value))}})},component(e,t){return e?t?ie.components[e]=t:ie.components[e]||Rl[e]||null:null}};export{bh as css,wh as default,kn as useAuth,Tl as useClient,St as useConfig,ph as useFiles,yh as useFormatters,ot as useMetadata,ns as useUtils}; \ No newline at end of file +`}):M({value:s+"//"+o+n,selectionStart:l+2})}e.preventDefault()}else j(),e.preventDefault();else T(),e.preventDefault();else D(),e.preventDefault();else S(),e.preventDefault();else e.altKey&&("1"===e.key||"0"===e.key?(E(),e.preventDefault()):"-"===e.key?(_(),e.preventDefault()):"s"===e.key&&(A(),e.preventDefault()))}}}),(e,t)=>{var a;return o(),i("div",null,[U(e.$slots,"header",Te({inputElement:w.value,id:e.id,modelValue:e.modelValue,status:e.status},e.$attrs)),d.value?(o(),i("label",{key:0,for:e.id,class:y("mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300 "+(e.labelClass??""))},F(d.value),11,e1)):x("",!0),e.disabled?x("",!0):(o(),i("div",t1,[l("div",s1,[f("bold")?(o(),i("svg",{key:0,class:y(Je),onClick:S,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},o1)):x("",!0),f("italics")?(o(),i("svg",{key:1,class:y(Je),onClick:T,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},i1)):x("",!0),f("link")?(o(),i("svg",{key:2,class:y(Je),onClick:I,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},c1)):x("",!0),f("blockquote")?(o(),i("svg",{key:3,class:y(Je),onClick:j,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},p1)):x("",!0),f("image")?(o(),i("svg",{key:4,class:y(Je),onClick:$,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},g1)):x("",!0),f("code")?(o(),i("svg",{key:5,class:y(Je),onClick:B,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},w1)):x("",!0),f("heading")?(o(),i("svg",{key:6,class:y(Je),onClick:D,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},$1)):x("",!0),f("orderedList")?(o(),i("svg",{key:7,class:y(Je),icon:"",onClick:E,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},L1)):x("",!0),f("unorderedList")?(o(),i("svg",{key:8,class:y(Je),onClick:_,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},M1)):x("",!0),f("strikethrough")?(o(),i("svg",{key:9,class:y(Je),onClick:A,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},F1)):x("",!0),f("undo")?(o(),i("svg",{key:10,class:y(Je),onClick:H,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},O1)):x("",!0),f("redo")?(o(),i("svg",{key:11,class:y(Je),onClick:P,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},B1)):x("",!0),U(e.$slots,"toolbarbuttons",{instance:null==(a=Be())?void 0:a.exposed})]),f("help")&&e.helpUrl?(o(),i("div",H1,[l("a",{title:"formatting help",target:"_blank",href:e.helpUrl,tabindex:"-1"},[(o(),i("svg",{class:y(Je),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},z1))],8,R1)])):x("",!0)])),l("div",N1,[l("textarea",{ref_key:"txt",ref:w,name:e.id,id:e.id,class:y(m.value),label:e.label,value:e.modelValue,rows:e.rows||6,disabled:e.disabled,onInput:t[0]||(t[0]=e=>{var l;return k((null==(l=e.target)?void 0:l.value)||"")}),onKeydown:on(R,["tab"])},null,42,U1)]),u.value?(o(),i("p",{key:2,class:"mt-2 text-sm text-red-500",id:e.id+"-error"},F(u.value),9,q1)):e.help?(o(),i("p",{key:3,class:"mt-2 text-sm text-gray-500",id:e.id+"-description"},F(e.help),9,Q1)):x("",!0),U(e.$slots,"footer",Te({inputElement:w.value,id:e.id,modelValue:e.modelValue,status:e.status},e.$attrs))])}}}),Z1={key:0,class:"relative z-10 lg:hidden",role:"dialog","aria-modal":"true"},W1={class:"fixed inset-0 flex"},G1=l("span",{class:"sr-only"},"Close sidebar",-1),J1=l("svg",{class:"h-6 w-6 text-white dark:text-black",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1),X1=[G1,J1],Y1={class:"flex grow flex-col gap-y-5 overflow-y-auto bg-white dark:bg-black px-6 pb-2"},eh={class:"hidden lg:fixed lg:inset-y-0 lg:z-10 lg:flex lg:w-72 lg:flex-col"},th={class:"flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 dark:border-gray-700 bg-white dark:bg-black px-6"},sh={class:y(["sticky top-0 flex items-center gap-x-6 bg-white dark:bg-black px-4 py-4 shadow-sm sm:px-6 lg:hidden"])},lh=l("span",{class:"sr-only"},"Open sidebar",-1),nh=l("svg",{class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[l("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})],-1),oh=[lh,nh],ah=de({__name:"SidebarLayout",setup(e,{expose:t}){let a=bn().transition,n=O(!0),r=O(""),s={entering:{cls:"transition-opacity ease-linear duration-300",from:"opacity-0",to:"opacity-100"},leaving:{cls:"transition-opacity ease-linear duration-300",from:"opacity-100",to:"opacity-0"}},u=O(""),d={entering:{cls:"transition ease-in-out duration-300 transform",from:"-translate-x-full",to:"translate-x-0"},leaving:{cls:"transition ease-in-out duration-300 transform",from:"translate-x-0",to:"-translate-x-full"}},v=O(""),c={entering:{cls:"ease-in-out duration-300",from:"opacity-0",to:"opacity-100"},leaving:{cls:"ease-in-out duration-300",from:"opacity-100",to:"opacity-0"}};function p(e){a(s,r,e),a(d,u,e),a(c,v,e),setTimeout(()=>n.value=e,300)}function f(){p(!0)}function m(){p(!1)}return t({show:f,hide:m,toggle:p}),(e,t)=>(o(),i("div",null,[n.value?(o(),i("div",Z1,[l("div",{class:y(["fixed inset-0 bg-gray-900/80",r.value])},null,2),l("div",W1,[l("div",{class:y(["relative mr-16 flex w-full max-w-xs flex-1",u.value])},[l("div",{class:y(["absolute left-full top-0 flex w-16 justify-center pt-5",v.value])},[l("button",{type:"button",onClick:m,class:"-m-2.5 p-2.5"},X1)],2),l("div",Y1,[U(e.$slots,"default")])],2)])])):x("",!0),l("div",eh,[l("div",th,[U(e.$slots,"default")])]),l("div",sh,[l("button",{type:"button",onClick:f,class:"-m-2.5 p-2.5 text-gray-700 dark:text-gray-200 lg:hidden"},oh),U(e.$slots,"mobiletitlebar")])]))}}),rh={Alert:ea,AlertSuccess:fa,ErrorSummary:ga,InputDescription:ba,Icon:eo,Loading:pr,OutlineButton:gr,PrimaryButton:wr,SecondaryButton:$r,TextLink:xr,Breadcrumbs:Tr,Breadcrumb:Dr,NavList:Hr,NavListItem:Gr,AutoQueryGrid:wd,SettingsIcons:jd,FilterViews:Il,FilterColumn:Fl,QueryPrefs:jl,EnsureAccess:lo,EnsureAccessDialog:Od,TextInput:qd,TextareaInput:Xd,SelectInput:nc,CheckboxInput:fc,TagInput:jc,FileInput:l0,Autocomplete:b0,Combobox:_0,DynamicInput:$0,LookupInput:H0,AutoFormFields:R0,AutoForm:df,AutoCreateForm:Tf,AutoEditForm:Xf,AutoViewForm:gv,ConfirmDelete:bv,FormLoading:xv,DataGrid:Av,CellFormat:Tv,PreviewFormat:Pv,HtmlFormat:zv,MarkupFormat:qv,MarkupModel:ep,CloseButton:op,SlideOver:wp,ModalDialog:Vp,ModalLookup:wm,Tabs:Mm,DarkModeToggle:jm,SignIn:Ym,MarkdownInput:K1,SidebarLayout:ah},Qs=rh,vh={install(l){function t(l){var e=Object.keys(l).filter(e=>l[e]).map(e=>encodeURIComponent(e)+"="+encodeURIComponent(l[e])).join("&");return e?"?"+e:"./"}Object.keys(Qs).forEach(e=>{l.component(e,Qs[e])}),l.directive("href",function(e,l){e.href=t(l.value),e.onclick=e=>{e.preventDefault(),history.pushState(l.value,"",t(l.value))}})},component(e,l){return e?l?G.components[e]=l:G.components[e]||Qs[e]||null:null}};export{fh as css,vh as default,Tl as useAuth,Ds as useClient,It as useConfig,La as useFiles,ch as useFormatters,lt as useMetadata,bn as useUtils}; \ No newline at end of file diff --git a/lib/mjs/servicestack-vue.mjs b/lib/mjs/servicestack-vue.mjs index a06059b..346d68f 100644 --- a/lib/mjs/servicestack-vue.mjs +++ b/lib/mjs/servicestack-vue.mjs @@ -1,227 +1,243 @@ -var Ys = Object.defineProperty; -var eo = (e, t, l) => t in e ? Ys(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l; -var _e = (e, t, l) => (eo(e, typeof t != "symbol" ? t + "" : t, l), l); -import { defineComponent as ue, computed as f, openBlock as a, createElementBlock as u, normalizeClass as w, unref as o, createElementVNode as s, createCommentVNode as k, renderSlot as Z, ref as M, toDisplayString as A, inject as qe, nextTick as xt, isRef as qn, mergeProps as Le, withModifiers as Ne, h as ht, resolveComponent as X, createBlock as se, withCtx as ke, useAttrs as to, createVNode as $e, createTextVNode as xe, watchEffect as hl, normalizeStyle as Jl, Fragment as Te, renderList as Ie, withDirectives as kt, vModelCheckbox as Xl, withKeys as Qn, createStaticVNode as wl, vModelSelect as lo, useSlots as Yl, getCurrentInstance as Be, onMounted as Xe, createSlots as en, normalizeProps as It, guardReactiveProps as gl, vModelDynamic as no, onUnmounted as Pt, watch as Lt, vModelText as so, resolveDynamicComponent as Kn, provide as Xt, resolveDirective as oo } from "vue"; -import { errorResponseExcept as ao, dateFmt as Zn, toTime as io, omit as ut, enc as Hl, setQueryString as ro, appendQueryString as Kt, nameOf as uo, ApiResult as We, lastRightPart as $t, leftPart as xl, map as Ue, toDate as Vt, toDateTime as co, toCamelCase as fo, mapGet as be, chop as mo, fromXsdDuration as Gn, isDate as kl, timeFmt12 as vo, apiValue as ho, indexOfAny as go, createBus as po, toKebabCase as Rn, humanize as Ee, delaySet as Wn, rightPart as dl, queryString as El, combinePaths as yo, toPascalCase as nt, errorResponse as ft, trimEnd as bo, $1 as pl, lastLeftPart as wo, ResponseStatus as Pl, ResponseError as Hn, HttpMethods as tn, uniqueKeys as zl, humanify as Jn, each as xo } from "@servicestack/client"; -const ko = { class: "flex items-center" }, $o = { +var ho = Object.defineProperty; +var go = (e, t, s) => t in e ? ho(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s; +var Le = (e, t, s) => (go(e, typeof t != "symbol" ? t + "" : t, s), s); +import { defineComponent as de, computed as v, openBlock as o, createElementBlock as i, normalizeClass as y, createElementVNode as l, createCommentVNode as x, renderSlot as U, ref as O, toDisplayString as F, inject as Qe, nextTick as St, isRef as nn, unref as X, mergeProps as Te, withModifiers as Ue, h as $t, resolveComponent as Z, createBlock as ae, withCtx as xe, useAttrs as yo, createVNode as ye, createTextVNode as ke, watchEffect as ws, normalizeStyle as nl, Fragment as Me, renderList as je, withDirectives as Mt, vModelCheckbox as ol, withKeys as on, createStaticVNode as xs, vModelSelect as bo, useSlots as al, getCurrentInstance as Be, onMounted as Ye, createSlots as rl, normalizeProps as Rt, guardReactiveProps as ks, vModelDynamic as wo, onUnmounted as Ft, watch as bt, vModelText as ko, resolveDynamicComponent as an, provide as ss, resolveDirective as _o } from "vue"; +import { errorResponseExcept as $o, toDate as pt, toTime as Co, omit as ft, enc as Ks, appendQueryString as Et, lastLeftPart as rn, setQueryString as xo, nameOf as Lo, ApiResult as Xe, lastRightPart as At, leftPart as Ls, map as Ze, toDateTime as Vo, toCamelCase as So, mapGet as _e, chop as Mo, fromXsdDuration as un, isDate as Vs, timeFmt12 as Ao, dateFmt as To, apiValue as Fo, indexOfAny as Io, createBus as jo, toKebabCase as Wl, sanitize as Oo, humanize as Pe, delaySet as dn, rightPart as ms, queryString as Zs, combinePaths as Do, toPascalCase as at, errorResponse as mt, trimEnd as Po, $1 as _s, ResponseStatus as Us, ResponseError as Gl, HttpMethods as il, omitEmpty as Bo, uniqueKeys as Ws, humanify as cn, each as Ho } from "@servicestack/client"; +const Ro = { class: "flex items-center" }, Eo = { key: 0, class: "flex-shrink-0 mr-3" -}, Co = { +}, zo = { key: 0, class: "h-5 w-5 text-yellow-400", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" -}, _o = /* @__PURE__ */ s("path", { +}, No = /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z", "clip-rule": "evenodd" -}, null, -1), Lo = [ - _o -], Vo = { +}, null, -1), Uo = [ + No +], qo = { key: 1, class: "h-5 w-5 text-red-400", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" -}, So = /* @__PURE__ */ s("path", { +}, Qo = /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z", "clip-rule": "evenodd" -}, null, -1), Mo = [ - So -], Ao = { +}, null, -1), Ko = [ + Qo +], Zo = { key: 2, class: "h-5 w-5 text-blue-400", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" -}, To = /* @__PURE__ */ s("path", { +}, Wo = /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M19 10.5a8.5 8.5 0 11-17 0 8.5 8.5 0 0117 0zM8.25 9.75A.75.75 0 019 9h.253a1.75 1.75 0 011.709 2.13l-.46 2.066a.25.25 0 00.245.304H11a.75.75 0 010 1.5h-.253a1.75 1.75 0 01-1.709-2.13l.46-2.066a.25.25 0 00-.245-.304H9a.75.75 0 01-.75-.75zM10 7a1 1 0 100-2 1 1 0 000 2z", "clip-rule": "evenodd" -}, null, -1), Fo = [ - To -], Io = { +}, null, -1), Go = [ + Wo +], Jo = { key: 3, class: "h-5 w-5 text-green-400", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" -}, Do = /* @__PURE__ */ s("path", { +}, Xo = /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z", "clip-rule": "evenodd" -}, null, -1), Oo = [ - Do -], jo = /* @__PURE__ */ ue({ +}, null, -1), Yo = [ + Xo +], ea = /* @__PURE__ */ de({ __name: "Alert", props: { type: { default: "warn" }, hideIcon: { type: Boolean } }, setup(e) { - const t = e, l = f(() => t.type == "info" ? "bg-blue-50 dark:bg-blue-200" : t.type == "error" ? "bg-red-50 dark:bg-red-200" : t.type == "success" ? "bg-green-50 dark:bg-green-200" : "bg-yellow-50 dark:bg-yellow-200"), n = f(() => t.type == "info" ? "border-blue-400" : t.type == "error" ? "border-red-400" : t.type == "success" ? "border-green-400" : "border-yellow-400"), i = f(() => t.type == "info" ? "text-blue-700" : t.type == "error" ? "text-red-700" : t.type == "success" ? "text-green-700" : "text-yellow-700"); - return (r, d) => (a(), u("div", { - class: w([o(l), o(n), "border-l-4 p-4"]) + const t = e, s = v(() => t.type == "info" ? "bg-blue-50 dark:bg-blue-200" : t.type == "error" ? "bg-red-50 dark:bg-red-200" : t.type == "success" ? "bg-green-50 dark:bg-green-200" : "bg-yellow-50 dark:bg-yellow-200"), n = v(() => t.type == "info" ? "border-blue-400" : t.type == "error" ? "border-red-400" : t.type == "success" ? "border-green-400" : "border-yellow-400"), a = v(() => t.type == "info" ? "text-blue-700" : t.type == "error" ? "text-red-700" : t.type == "success" ? "text-green-700" : "text-yellow-700"); + return (r, u) => (o(), i("div", { + class: y([s.value, n.value, "border-l-4 p-4"]) }, [ - s("div", ko, [ - e.hideIcon ? k("", !0) : (a(), u("div", $o, [ - e.type == "warn" ? (a(), u("svg", Co, Lo)) : e.type == "error" ? (a(), u("svg", Vo, Mo)) : e.type == "info" ? (a(), u("svg", Ao, Fo)) : e.type == "success" ? (a(), u("svg", Io, Oo)) : k("", !0) + l("div", Ro, [ + r.hideIcon ? x("", !0) : (o(), i("div", Eo, [ + r.type == "warn" ? (o(), i("svg", zo, Uo)) : r.type == "error" ? (o(), i("svg", qo, Ko)) : r.type == "info" ? (o(), i("svg", Zo, Go)) : r.type == "success" ? (o(), i("svg", Jo, Yo)) : x("", !0) ])), - s("div", null, [ - s("p", { - class: w([o(i), "text-sm"]) + l("div", null, [ + l("p", { + class: y([a.value, "text-sm"]) }, [ - Z(r.$slots, "default") + U(r.$slots, "default") ], 2) ]) ]) ], 2)); } -}), Po = { +}), ta = { key: 0, class: "rounded-md bg-green-50 dark:bg-green-200 p-4", role: "alert" -}, Bo = { class: "flex" }, Ro = /* @__PURE__ */ s("div", { class: "flex-shrink-0" }, [ - /* @__PURE__ */ s("svg", { +}, sa = { class: "flex" }, la = /* @__PURE__ */ l("div", { class: "flex-shrink-0" }, [ + /* @__PURE__ */ l("svg", { class: "h-5 w-5 text-green-400 dark:text-green-500", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M5 13l4 4L19 7" }) ]) -], -1), Ho = { class: "ml-3" }, Eo = { class: "text-sm font-medium text-green-800" }, zo = { key: 0 }, No = { class: "ml-auto pl-3" }, Uo = { class: "-mx-1.5 -my-1.5" }, qo = /* @__PURE__ */ s("span", { class: "sr-only" }, "Dismiss", -1), Qo = /* @__PURE__ */ s("svg", { +], -1), na = { class: "ml-3" }, oa = { class: "text-sm font-medium text-green-800" }, aa = { key: 0 }, ra = { class: "ml-auto pl-3" }, ia = { class: "-mx-1.5 -my-1.5" }, ua = /* @__PURE__ */ l("span", { class: "sr-only" }, "Dismiss", -1), da = /* @__PURE__ */ l("svg", { class: "h-5 w-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, [ - /* @__PURE__ */ s("path", { d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" }) -], -1), Ko = [ - qo, - Qo -], Zo = /* @__PURE__ */ ue({ + /* @__PURE__ */ l("path", { d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" }) +], -1), ca = [ + ua, + da +], fa = /* @__PURE__ */ de({ __name: "AlertSuccess", props: { - message: null + message: {} }, setup(e) { - const t = M(!1); - return (l, n) => t.value ? k("", !0) : (a(), u("div", Po, [ - s("div", Bo, [ - Ro, - s("div", Ho, [ - s("h3", Eo, [ - e.message ? (a(), u("span", zo, A(e.message), 1)) : Z(l.$slots, "default", { key: 1 }) + const t = O(!1); + return (s, n) => t.value ? x("", !0) : (o(), i("div", ta, [ + l("div", sa, [ + la, + l("div", na, [ + l("h3", oa, [ + s.message ? (o(), i("span", aa, F(s.message), 1)) : U(s.$slots, "default", { key: 1 }) ]) ]), - s("div", No, [ - s("div", Uo, [ - s("button", { + l("div", ra, [ + l("div", ia, [ + l("button", { type: "button", class: "inline-flex rounded-md bg-green-50 dark:bg-green-200 p-1.5 text-green-500 dark:text-green-600 hover:bg-green-100 dark:hover:bg-green-700 dark:hover:text-white focus:outline-none focus:ring-2 focus:ring-green-600 focus:ring-offset-2 focus:ring-offset-green-50 dark:ring-offset-green-200", - onClick: n[0] || (n[0] = (i) => t.value = !0) - }, Ko) + onClick: n[0] || (n[0] = (a) => t.value = !0) + }, ca) ]) ]) ]) ])); } -}), Go = { class: "flex" }, Wo = /* @__PURE__ */ s("div", { class: "flex-shrink-0" }, [ - /* @__PURE__ */ s("svg", { +}), va = { class: "flex" }, pa = /* @__PURE__ */ l("div", { class: "flex-shrink-0" }, [ + /* @__PURE__ */ l("svg", { class: "h-5 w-5 text-red-400", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { fill: "currentColor", d: "M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12S6.47 2 12 2m3.59 5L12 10.59L8.41 7L7 8.41L10.59 12L7 15.59L8.41 17L12 13.41L15.59 17L17 15.59L13.41 12L17 8.41L15.59 7Z" }) ]) -], -1), Jo = { class: "ml-3" }, Xo = { class: "text-sm text-red-700 dark:text-red-200" }, Yo = /* @__PURE__ */ ue({ +], -1), ma = { class: "ml-3" }, ha = { class: "text-sm text-red-700 dark:text-red-200" }, ga = /* @__PURE__ */ de({ __name: "ErrorSummary", props: { - status: null, - except: null, - class: null + status: {}, + except: {}, + class: {} }, setup(e) { const t = e; - let l = qe("ApiState", void 0); - const n = f(() => t.status || l != null && l.error.value ? ao.call({ responseStatus: t.status ?? (l == null ? void 0 : l.error.value) }, t.except ?? []) : null); - return (i, r) => o(n) ? (a(), u("div", { + let s = Qe("ApiState", void 0); + const n = v(() => t.status || s != null && s.error.value ? $o.call({ responseStatus: t.status ?? (s == null ? void 0 : s.error.value) }, t.except ?? []) : null); + return (a, r) => n.value ? (o(), i("div", { key: 0, - class: w(`bg-red-50 dark:bg-red-900 border-l-4 border-red-400 p-4 ${i.$props.class}`) + class: y(`bg-red-50 dark:bg-red-900 border-l-4 border-red-400 p-4 ${a.$props.class}`) }, [ - s("div", Go, [ - Wo, - s("div", Jo, [ - s("p", Xo, A(o(n)), 1) + l("div", va, [ + pa, + l("div", ma, [ + l("p", ha, F(n.value), 1) ]) ]) - ], 2)) : k("", !0); + ], 2)) : x("", !0); } -}), ea = ["id", "aria-describedby"], ta = /* @__PURE__ */ ue({ +}), ya = ["id", "aria-describedby"], ba = /* @__PURE__ */ de({ __name: "InputDescription", props: { - id: null, - description: null + id: {}, + description: {} }, setup(e) { - return (t, l) => e.description ? (a(), u("div", { + return (t, s) => t.description ? (o(), i("div", { key: "description", class: "mt-2 text-sm text-gray-500", - id: `${e.id}-description`, - "aria-describedby": `${e.id}-description` + id: `${t.id}-description`, + "aria-describedby": `${t.id}-description` }, [ - s("div", null, A(e.description), 1) - ], 8, ea)) : k("", !0); + l("div", null, F(t.description), 1) + ], 8, ya)) : x("", !0); } }); -function $l(e) { - return Zn(e).replace(/\//g, "-"); +function Ss(e) { + if (e == null || typeof e == "object") + return ""; + const t = pt(e); + return t == null || t.toString() == "Invalid Date" ? "" : t.toISOString().substring(0, 10) ?? ""; } -function Xn(e) { - return e == null ? "" : io(e); +function fn(e) { + if (e == null || typeof e == "object") + return ""; + const t = pt(e); + return t == null || t.toString() == "Invalid Date" ? "" : t.toISOString().substring(0, 19) ?? ""; +} +function vn(e) { + return e == null ? "" : Co(e); +} +function pn(e, t) { + if (G.config.inputValue) + return G.config.inputValue(e, t); + let s = e === "date" ? Ss(t) : e === "datetime-local" ? fn(t) : e === "time" ? vn(t) : t; + const n = typeof s; + return s = s == null ? "" : n == "boolean" || n == "number" ? `${s}` : s, s; } -function Yn(e, t) { - e.value = null, xt(() => e.value = t); +function mn(e, t) { + e.value = null, St(() => e.value = t); } -function At(e) { +function Dt(e) { return Object.keys(e).forEach((t) => { - const l = e[t]; - e[t] = qn(l) ? o(l) : l; + const s = e[t]; + e[t] = nn(s) ? X(s) : s; }), e; } -function Ct(e, t, l) { - l ? (t.value = e.entering.cls + " " + e.entering.from, setTimeout(() => t.value = e.entering.cls + " " + e.entering.to, 0)) : (t.value = e.leaving.cls + " " + e.leaving.from, setTimeout(() => t.value = e.leaving.cls + " " + e.leaving.to, 0)); +function yt(e, t, s) { + s ? (t.value = e.entering.cls + " " + e.entering.from, setTimeout(() => t.value = e.entering.cls + " " + e.entering.to, 0)) : (t.value = e.leaving.cls + " " + e.leaving.from, setTimeout(() => t.value = e.leaving.cls + " " + e.leaving.to, 0)); } -function cl(e) { +function hs(e) { if (typeof document > "u") return; - let t = (e == null ? void 0 : e.after) || document.activeElement, l = t && t.form; - if (l) { - let n = ':not([disabled]):not([tabindex="-1"])', i = l.querySelectorAll(`a:not([disabled]), button${n}, input[type=text]${n}, [tabindex]${n}`), r = Array.prototype.filter.call( - i, - (c) => c.offsetWidth > 0 || c.offsetHeight > 0 || c === t - ), d = r.indexOf(t); - d > -1 && (r[d + 1] || r[0]).focus(); + let t = (e == null ? void 0 : e.after) || document.activeElement, s = t && t.form; + if (s) { + let n = ':not([disabled]):not([tabindex="-1"])', a = s.querySelectorAll(`a:not([disabled]), button${n}, input[type=text]${n}, [tabindex]${n}`), r = Array.prototype.filter.call( + a, + (d) => d.offsetWidth > 0 || d.offsetHeight > 0 || d === t + ), u = r.indexOf(t); + u > -1 && (r[u + 1] || r[0]).focus(); } } -function Bt(e) { +function qt(e) { if (!e) return null; if (typeof e == "string") @@ -231,41 +247,41 @@ function Bt(e) { throw new Error(`Invalid DTO Type '${typeof e}'`); if (typeof t.getTypeName != "function") throw new Error(`${JSON.stringify(t)} is not a Request DTO`); - const l = t.getTypeName(); - if (!l) + const s = t.getTypeName(); + if (!s) throw new Error("DTO Required"); - return l; + return s; } -function it(e, t, l) { - l || (l = {}); - let n = l.cls || l.className || l.class; - return n && (l = ut(l, ["cls", "class", "className"]), l.class = n), t == null ? `<${e}` + Nl(l) + "/>" : `<${e}` + Nl(l) + `>${t || ""}`; +function dt(e, t, s) { + s || (s = {}); + let n = s.cls || s.className || s.class; + return n && (s = ft(s, ["cls", "class", "className"]), s.class = n), t == null ? `<${e}` + Gs(s) + "/>" : `<${e}` + Gs(s) + `>${t || ""}`; } -function Nl(e) { - return Object.keys(e).reduce((t, l) => `${t} ${l}="${Hl(e[l])}"`, ""); +function Gs(e) { + return Object.keys(e).reduce((t, s) => `${t} ${s}="${Ks(e[s])}"`, ""); } -function Cl(e) { +function Ms(e) { return Object.assign({ target: "_blank", rel: "noopener", class: "text-blue-600" }, e); } -function Ft(e) { - return wn(e); +function Ht(e) { + return Vl(e); } -let la = ["string", "number", "boolean", "null", "undefined"]; -function _t(e) { - return la.indexOf(typeof e) >= 0 || e instanceof Date; +let wa = ["string", "number", "boolean", "null", "undefined"]; +function Tt(e) { + return wa.indexOf(typeof e) >= 0 || e instanceof Date; } -function Zt(e) { - return !_t(e); +function Xt(e) { + return !Tt(e); } -class es { +class hn { get length() { return typeof localStorage > "u" ? 0 : localStorage.length; } getItem(t) { return typeof localStorage > "u" ? null : localStorage.getItem(t); } - setItem(t, l) { - typeof localStorage > "u" || localStorage.setItem(t, l); + setItem(t, s) { + typeof localStorage > "u" || localStorage.setItem(t, s); } removeItem(t) { typeof localStorage > "u" || localStorage.removeItem(t); @@ -277,95 +293,97 @@ class es { return typeof localStorage > "u" ? null : localStorage.key(t); } } -function yl(e) { +function $s(e) { return typeof e == "string" ? JSON.parse(e) : null; } -function ln(e) { +function ul(e, t) { if (typeof history < "u") { - const t = ro(location.href, e); - history.pushState({}, "", t); + const s = t ? Et(rn(location.href, "?"), e) : xo(location.href, e); + history.pushState({}, "", s); } } -function nn(e, t) { - if (["function", "Function", "eval", "=>", ";"].some((i) => e.includes(i))) +function dl(e, t) { + if (["function", "Function", "eval", "=>", ";"].some((a) => e.includes(a))) throw new Error(`Unsafe script: '${e}'`); const n = Object.assign( - Object.keys(globalThis).reduce((i, r) => (i[r] = void 0, i), {}), + Object.keys(globalThis).reduce((a, r) => (a[r] = void 0, a), {}), t ); return new Function("with(this) { return (" + e + ") }").call(n); } -function Ul(e) { +function Js(e) { typeof navigator < "u" && navigator.clipboard.writeText(e); } -function sn(e) { - const t = ie.config.storage.getItem(e); +function cl(e) { + const t = G.config.storage.getItem(e); return t ? JSON.parse(t) : null; } -function _l(e, t) { - return Kt(`swr.${uo(e)}`, t ? Object.assign({}, e, t) : e); +function As(e, t) { + return Et(`swr.${Lo(e)}`, t ? Object.assign({}, e, t) : e); } -function na(e) { +function ka(e) { if (e.request) { - const t = _l(e.request, e.args); - ie.config.storage.removeItem(t); + const t = As(e.request, e.args); + G.config.storage.removeItem(t); } } -async function ts(e, t, l, n, i) { - const r = _l(t, n); - l(new We({ response: sn(r) })); - const d = await e.api(t, n, i); - if (d.succeeded && d.response) { - d.response._date = new Date().valueOf(); - const c = JSON.stringify(d.response); - ie.config.storage.setItem(r, c), l(d); +async function gn(e, t, s, n, a) { + const r = As(t, n); + s(new Xe({ response: cl(r) })); + const u = await e.api(t, n, a); + if (u.succeeded && u.response) { + u.response._date = (/* @__PURE__ */ new Date()).valueOf(); + const d = JSON.stringify(u.response); + G.config.storage.setItem(r, d), s(u); } - return d; + return u; } -function ls(e, t) { - let l = null; +function yn(e, t) { + let s = null; return (...n) => { - l && clearTimeout(l), l = setTimeout(() => { + s && clearTimeout(s), s = setTimeout(() => { e(...n); }, t || 100); }; } -function gt(e) { +function Ct(e) { return typeof e == "string" ? e.split(",") : e || []; } -function bt(e, t) { - const l = gt(t); - return e.reduce((n, i) => (n[i] = !l.includes(i), n), {}); +function Vt(e, t) { + const s = Ct(t); + return e.reduce((n, a) => (n[a] = !s.includes(a), n), {}); } -function ns() { +function bn() { return { - LocalStore: es, - dateInputFormat: $l, - timeInputFormat: Xn, - setRef: Yn, - unRefs: At, - transition: Ct, - focusNextElement: cl, - getTypeName: Bt, - htmlTag: it, - htmlAttrs: Nl, - linkAttrs: Cl, - toAppUrl: Ft, - isPrimitive: _t, - isComplexType: Zt, - pushState: ln, - scopedExpr: nn, - copyText: Ul, - fromCache: sn, - swrCacheKey: _l, - swrClear: na, - swrApi: ts, - asStrings: gt, - asOptions: bt, - createDebounce: ls + LocalStore: hn, + dateInputFormat: Ss, + dateTimeInputFormat: fn, + timeInputFormat: vn, + textInputValue: pn, + setRef: mn, + unRefs: Dt, + transition: yt, + focusNextElement: hs, + getTypeName: qt, + htmlTag: dt, + htmlAttrs: Gs, + linkAttrs: Ms, + toAppUrl: Ht, + isPrimitive: Tt, + isComplexType: Xt, + pushState: ul, + scopedExpr: dl, + copyText: Js, + fromCache: cl, + swrCacheKey: As, + swrClear: ka, + swrApi: gn, + asStrings: Ct, + asOptions: Vt, + createDebounce: yn }; } -const ss = "png,jpg,jpeg,jfif,gif,svg,webp".split(","), os = { +const wn = "png,jpg,jpeg,jfif,gif,svg,webp".split(","), kn = { img: "png,jpg,jpeg,gif,svg,webp,png,jpg,jpeg,gif,bmp,tif,tiff,webp,ai,psd,ps".split(","), vid: "avi,m4v,mov,mp4,mpg,mpeg,wmv,webm".split(","), aud: "mp3,mpa,ogg,wav,wma,mid,webm".split(","), @@ -376,26 +394,26 @@ const ss = "png,jpg,jpeg,jfif,gif,svg,webp".split(","), os = { exe: "exe,bat,sh,cmd,com,app,msi,run,vb,vbs,js,ws,wsh".split(","), att: "bin,oct,dat".split(",") //attachment -}, En = Object.keys(os), ct = (e, t) => ``, fl = { - img: ct("4 4 16 16", ""), - vid: ct("0 0 24 24", ""), - aud: ct("0 0 24 24", ""), - ppt: ct("0 0 48 48", ""), - xls: ct("0 0 256 256", ""), - doc: ct("0 0 32 32", ""), - zip: ct("0 0 16 16", ""), - exe: ct("0 0 16 16", ""), - att: ct("0 0 24 24", "") -}, sa = /[\r\n%#()<>?[\\\]^`{|}]/g, zn = 1024, oa = ["Bytes", "KB", "MB", "GB", "TB"], aa = (() => { - const e = "application/", t = e + "vnd.openxmlformats-officedocument.", l = "image/", n = "text/", i = "audio/", r = "video/", d = { - jpg: l + "jpeg", - tif: l + "tiff", - svg: l + "svg+xml", - ico: l + "x-icon", +}, Jl = Object.keys(kn), vt = (e, t) => ``, gs = { + img: vt("4 4 16 16", ""), + vid: vt("0 0 24 24", ""), + aud: vt("0 0 24 24", ""), + ppt: vt("0 0 48 48", ""), + xls: vt("0 0 256 256", ""), + doc: vt("0 0 32 32", ""), + zip: vt("0 0 16 16", ""), + exe: vt("0 0 16 16", ""), + att: vt("0 0 24 24", "") +}, _a = /[\r\n%#()<>?[\\\]^`{|}]/g, Xl = 1024, $a = ["Bytes", "KB", "MB", "GB", "TB"], Ca = (() => { + const e = "application/", t = e + "vnd.openxmlformats-officedocument.", s = "image/", n = "text/", a = "audio/", r = "video/", u = { + jpg: s + "jpeg", + tif: s + "tiff", + svg: s + "svg+xml", + ico: s + "x-icon", ts: n + "typescript", py: n + "x-python", sh: n + "x-sh", - mp3: i + "mpeg3", + mp3: a + "mpeg3", mpg: r + "mpeg", ogv: r + "ogg", xlsx: t + "spreadsheetml.sheet", @@ -407,121 +425,121 @@ const ss = "png,jpg,jpeg,jfif,gif,svg,webp".split(","), os = { ppsx: t + "presentationml.slideshow", mdb: e + "vnd.ms-access" }; - function c(h, y) { - h.split(",").forEach((b) => d[b] = y); + function d(f, p) { + f.split(",").forEach(($) => u[$] = p); } - function m(h, y) { - h.split(",").forEach((b) => d[b] = y(b)); + function c(f, p) { + f.split(",").forEach(($) => u[$] = p($)); } - return m("jpeg,gif,png,tiff,bmp,webp", (h) => l + h), m("jsx,csv,css", (h) => n + h), m("aac,ac3,aiff,m4a,m4b,m4p,mid,midi,wav", (h) => i + h), m("3gpp,avi,dv,divx,ogg,mp4,webm", (h) => r + h), m("rtf,pdf", (h) => e + h), c("htm,html,shtm", n + "html"), c("js,mjs,cjs", n + "javascript"), c("yml,yaml", e + "yaml"), c("bat,cmd", e + "bat"), c("xml,csproj,fsproj,vbproj", n + "xml"), c("txt,ps1", n + "plain"), c("qt,mov", r + "quicktime"), c("doc,dot", e + "msword"), c("xls,xlt,xla", e + "excel"), c("ppt,oit,pps,ppa", e + "vnd.ms-powerpoint"), c("cer,crt,der", e + "x-x509-ca-cert"), c("gz,tgz,zip,rar,lzh,z", e + "x-compressed"), c("aaf,aca,asd,bin,cab,chm,class,cur,db,dat,deploy,dll,dsp,exe,fla,ics,inf,mix,msi,mso,obj,ocx,prm,prx,psd,psp,qxd,sea,snp,so,sqlite,toc,ttf,u32,xmp,xsn,xtp", e + "octet-stream"), d; + return c("jpeg,gif,png,tiff,bmp,webp", (f) => s + f), c("jsx,csv,css", (f) => n + f), c("aac,ac3,aiff,m4a,m4b,m4p,mid,midi,wav", (f) => a + f), c("3gpp,avi,dv,divx,ogg,mp4,webm", (f) => r + f), c("rtf,pdf", (f) => e + f), d("htm,html,shtm", n + "html"), d("js,mjs,cjs", n + "javascript"), d("yml,yaml", e + "yaml"), d("bat,cmd", e + "bat"), d("xml,csproj,fsproj,vbproj", n + "xml"), d("txt,ps1", n + "plain"), d("qt,mov", r + "quicktime"), d("doc,dot", e + "msword"), d("xls,xlt,xla", e + "excel"), d("ppt,oit,pps,ppa", e + "vnd.ms-powerpoint"), d("cer,crt,der", e + "x-x509-ca-cert"), d("gz,tgz,zip,rar,lzh,z", e + "x-compressed"), d("aaf,aca,asd,bin,cab,chm,class,cur,db,dat,deploy,dll,dsp,exe,fla,ics,inf,mix,msi,mso,obj,ocx,prm,prx,psd,psp,qxd,sea,snp,so,sqlite,toc,ttf,u32,xmp,xsn,xtp", e + "octet-stream"), u; })(); -let ql = []; -function as(e) { - return e = e.replace(/"/g, "'"), e = e.replace(/>\s+<"), e = e.replace(/\s{2,}/g, " "), e.replace(sa, encodeURIComponent); +let Xs = []; +function _n(e) { + return e = e.replace(/"/g, "'"), e = e.replace(/>\s+<"), e = e.replace(/\s{2,}/g, " "), e.replace(_a, encodeURIComponent); } -function on(e) { - return "data:image/svg+xml;utf8," + as(e); +function fl(e) { + return "data:image/svg+xml;utf8," + _n(e); } -function is(e) { +function $n(e) { let t = URL.createObjectURL(e); - return ql.push(t), t; + return Xs.push(t), t; } -function rs() { - ql.forEach((e) => { +function Cn() { + Xs.forEach((e) => { try { URL.revokeObjectURL(e); } catch (t) { console.error("URL.revokeObjectURL", t); } - }), ql = []; + }), Xs = []; } -function an(e) { +function vl(e) { if (!e) return null; - let t = xl(e, "?"); - return $t(t, "/"); + let t = Ls(e, "?"); + return At(t, "/"); } -function Yt(e) { - let t = an(e); - return t == null || t.indexOf(".") === -1 ? null : $t(t, ".").toLowerCase(); +function ls(e) { + let t = vl(e); + return t == null || t.indexOf(".") === -1 ? null : At(t, ".").toLowerCase(); } -function rn(e) { - let t = Yt(e.name); - return t && ss.indexOf(t) >= 0 ? is(e) : pt(e.name); +function pl(e) { + let t = ls(e.name); + return t && wn.indexOf(t) >= 0 ? $n(e) : xt(e.name); } -function un(e) { +function ml(e) { if (!e) return !1; if (e.startsWith("blob:") || e.startsWith("data:")) return !0; - let t = Yt(e); - return t && ss.indexOf(t) >= 0 || !1; + let t = ls(e); + return t && wn.indexOf(t) >= 0 || !1; } -function pt(e) { +function xt(e) { if (!e) return null; - let t = Yt(e); - return t == null || un(e) ? e : qt(t) || on(fl.doc); -} -function qt(e) { - let t = us(e); - return t && on(t) || null; -} -function us(e) { - if (fl[e]) - return fl[e]; - for (let t = 0; t < En.length; t++) { - let l = En[t]; - if (os[l].indexOf(e) >= 0) - return fl[l]; + let t = ls(e); + return t == null || ml(e) ? e : Jt(t) || fl(gs.doc); +} +function Jt(e) { + let t = xn(e); + return t && fl(t) || null; +} +function xn(e) { + if (gs[e]) + return gs[e]; + for (let t = 0; t < Jl.length; t++) { + let s = Jl[t]; + if (kn[s].indexOf(e) >= 0) + return gs[s]; } return null; } -function dn(e, t = 2) { +function hl(e, t = 2) { if (e === 0) return "0 Bytes"; - const l = t < 0 ? 0 : t, n = Math.floor(Math.log(e) / Math.log(zn)); - return parseFloat((e / Math.pow(zn, n)).toFixed(l)) + " " + oa[n]; + const s = t < 0 ? 0 : t, n = Math.floor(Math.log(e) / Math.log(Xl)); + return parseFloat((e / Math.pow(Xl, n)).toFixed(s)) + " " + $a[n]; } -function ia(e) { - return e.files && Array.from(e.files).map((t) => ({ fileName: t.name, contentLength: t.size, filePath: rn(t) })); +function xa(e) { + return e.files && Array.from(e.files).map((t) => ({ fileName: t.name, contentLength: t.size, filePath: pl(t) })); } -function Ll(e, t) { - e.onerror = null, e.src = cn(e.src, t) || ""; +function Ts(e, t) { + e.onerror = null, e.src = gl(e.src, t) || ""; } -function cn(e, t) { - return qt($t(e, ".").toLowerCase()) || (t ? qt(t) || t : null) || qt("doc"); +function gl(e, t) { + return Jt(At(e, ".").toLowerCase()) || (t ? Jt(t) || t : null) || Jt("doc"); } -function Ql(e) { +function Ys(e) { if (!e) throw new Error("fileNameOrExt required"); - const t = $t(e, ".").toLowerCase(); - return aa[t] || "application/" + t; + const t = At(e, ".").toLowerCase(); + return Ca[t] || "application/" + t; } -function ph() { +function La() { return { - extSvg: us, - extSrc: qt, - getExt: Yt, - encodeSvg: as, - canPreview: un, - getFileName: an, - getMimeType: Ql, - formatBytes: dn, - filePathUri: pt, - svgToDataUri: on, - fileImageUri: rn, - objectUrl: is, - flush: rs, - inputFiles: ia, - iconOnError: Ll, - iconFallbackSrc: cn + extSvg: xn, + extSrc: Jt, + getExt: ls, + encodeSvg: _n, + canPreview: ml, + getFileName: vl, + getMimeType: Ys, + formatBytes: hl, + filePathUri: xt, + svgToDataUri: fl, + fileImageUri: pl, + objectUrl: $n, + flush: Cn, + inputFiles: xa, + iconOnError: Ts, + iconFallbackSrc: gl }; } -class ra { +class Va { constructor(t) { - _e(this, "view"); - _e(this, "includeTypes"); + Le(this, "view"); + Le(this, "includeTypes"); Object.assign(this, t); } getTypeName() { @@ -534,7 +552,7 @@ class ra { return {}; } } -const Dt = "/metadata/app.json", ua = { +const zt = "/metadata/app.json", Sa = { Boolean: "checkbox", DateTime: "date", DateOnly: "date", @@ -554,13 +572,13 @@ const Dt = "/metadata/app.json", ua = { String: "text", Guid: "text", Uri: "text" -}, da = { +}, Ma = { number: "Int32", checkbox: "Boolean", date: "DateTime", "datetime-local": "DateTime", time: "TimeSpan" -}, Kl = { +}, el = { Byte: "byte", Int16: "short", Int32: "int", @@ -572,29 +590,29 @@ const Dt = "/metadata/app.json", ua = { Double: "double", Decimal: "decimal" }; -[...Object.keys(Kl), ...Object.values(Kl)]; -const ca = { +[...Object.keys(el), ...Object.values(el)]; +const Aa = { String: "string", Boolean: "bool", - ...Kl + ...el }; -function rl(e) { - return ca[e] || e; +function fs(e) { + return Aa[e] || e; } -function ds(e, t) { - return e ? (t || (t = []), e === "Nullable`1" ? rl(t[0]) + "?" : e.endsWith("[]") ? `List<${rl(e.substring(0, e.length - 2))}>` : t.length === 0 ? rl(e) : xl(rl(e), "`") + "<" + t.join(",") + ">") : ""; +function Ln(e, t) { + return e ? (t || (t = []), e === "Nullable`1" ? fs(t[0]) + "?" : e.endsWith("[]") ? `List<${fs(e.substring(0, e.length - 2))}>` : t.length === 0 ? fs(e) : Ls(fs(e), "`") + "<" + t.join(",") + ">") : ""; } -function fa(e) { - return e && ds(e.name, e.genericArgs); +function Ta(e) { + return e && Ln(e.name, e.genericArgs); } -class Ot { +class Nt { constructor() { - _e(this, "Query"); - _e(this, "QueryInto"); - _e(this, "Create"); - _e(this, "Update"); - _e(this, "Patch"); - _e(this, "Delete"); + Le(this, "Query"); + Le(this, "QueryInto"); + Le(this, "Create"); + Le(this, "Update"); + Le(this, "Patch"); + Le(this, "Delete"); } get AnyQuery() { return this.Query || this.QueryInto; @@ -602,513 +620,560 @@ class Ot { get AnyUpdate() { return this.Patch || this.Update; } + get dataModel() { + var t; + return (t = this.AnyQuery) == null ? void 0 : t.dataModel; + } toArray() { - return [this.Query, this.QueryInto, this.Create, this.Update, this.Patch, this.Delete].filter((l) => !!l).map((l) => l); + return [this.Query, this.QueryInto, this.Create, this.Update, this.Patch, this.Delete].filter((s) => !!s).map((s) => s); } get empty() { return !this.Query && !this.QueryInto && !this.Create && !this.Update && !this.Patch && !this.Delete; } add(t) { - ze.isQueryInto(t) && !this.QueryInto ? this.QueryInto = t : ze.isQuery(t) && !this.Query ? this.Query = t : ze.isCreate(t) && !this.Create ? this.Create = t : ze.isUpdate(t) && !this.Update ? this.Update = t : ze.isPatch(t) && !this.Patch ? this.Patch = t : ze.isDelete(t) && !this.Delete && (this.Delete = t); + qe.isQueryInto(t) && !this.QueryInto ? this.QueryInto = t : qe.isQuery(t) && !this.Query ? this.Query = t : qe.isCreate(t) && !this.Create ? this.Create = t : qe.isUpdate(t) && !this.Update ? this.Update = t : qe.isPatch(t) && !this.Patch ? this.Patch = t : qe.isDelete(t) && !this.Delete && (this.Delete = t); } static from(t) { - const l = new Ot(); + const s = new Nt(); return t.forEach((n) => { - l.add(n); - }), l; + s.add(n); + }), s; } - static forType(t, l) { - var i; - let n = new Ot(); - return t && (l ?? (l = (i = ie.metadata.value) == null ? void 0 : i.api), l == null || l.operations.forEach((r) => { - var d; - ((d = r.dataModel) == null ? void 0 : d.name) == t && n.add(r); + static forType(t, s) { + var a; + let n = new Nt(); + if (G.config.apisResolver && t) { + const r = G.config.apisResolver(t, s); + r && (n.Query = r.Query, n.QueryInto = r.QueryInto, n.Create = r.Create, n.Update = r.Update, n.Patch = r.Patch, n.Delete = r.Delete); + } + return t && (s ?? (s = (a = G.metadata.value) == null ? void 0 : a.api), s == null || s.operations.forEach((r) => { + var u; + ((u = r.dataModel) == null ? void 0 : u.name) == t && n.add(r); })), n; } } -const ze = { +const qe = { Create: "ICreateDb`1", Update: "IUpdateDb`1", Patch: "IPatchDb`1", Delete: "IDeleteDb`1", AnyRead: ["QueryDb`1", "QueryDb`2"], AnyWrite: ["ICreateDb`1", "IUpdateDb`1", "IPatchDb`1", "IDeleteDb`1"], - isAnyQuery: (e) => Ue(e.request.inherits, (t) => ze.AnyRead.indexOf(t.name) >= 0), - isQuery: (e) => Ue(e.request.inherits, (t) => t.name === "QueryDb`1"), - isQueryInto: (e) => Ue(e.request.inherits, (t) => t.name === "QueryDb`2"), + isAnyQuery: (e) => Ze(e.request.inherits, (t) => qe.AnyRead.indexOf(t.name) >= 0), + isQuery: (e) => Ze(e.request.inherits, (t) => t.name === "QueryDb`1"), + isQueryInto: (e) => Ze(e.request.inherits, (t) => t.name === "QueryDb`2"), isCrud: (e) => { var t; - return (t = e.request.implements) == null ? void 0 : t.some((l) => ze.AnyWrite.indexOf(l.name) >= 0); + return (t = e.request.implements) == null ? void 0 : t.some((s) => qe.AnyWrite.indexOf(s.name) >= 0); }, - isCreate: (e) => ul(e, ze.Create), - isUpdate: (e) => ul(e, ze.Update), - isPatch: (e) => ul(e, ze.Patch), - isDelete: (e) => ul(e, ze.Delete), + isCreate: (e) => vs(e, qe.Create), + isUpdate: (e) => vs(e, qe.Update), + isPatch: (e) => vs(e, qe.Patch), + isDelete: (e) => vs(e, qe.Delete), model: (e) => { - var t, l, n; - return e ? Ue(e.inherits, (i) => ze.AnyRead.indexOf(i.name) >= 0) ? (t = e.inherits) == null ? void 0 : t.genericArgs[0] : (n = (l = e.implements) == null ? void 0 : l.find((i) => ze.AnyWrite.indexOf(i.name) >= 0)) == null ? void 0 : n.genericArgs[0] : null; + var t, s, n; + return e ? Ze(e.inherits, (a) => qe.AnyRead.indexOf(a.name) >= 0) ? (t = e.inherits) == null ? void 0 : t.genericArgs[0] : (n = (s = e.implements) == null ? void 0 : s.find((a) => qe.AnyWrite.indexOf(a.name) >= 0)) == null ? void 0 : n.genericArgs[0] : null; } }; -function ma(e) { +function Fa(e) { var t; - return ((t = e.input) == null ? void 0 : t.type) || Vl(fn(e)); + return ((t = e.input) == null ? void 0 : t.type) || Fs(yl(e)); } -function cs(e) { - return e.endsWith("?") ? mo(e, 1) : e; +function Vn(e) { + return e.endsWith("?") ? Mo(e, 1) : e; } -function Vl(e) { - return ua[cs(e)]; +function Fs(e) { + return Sa[Vn(e)]; } -function va(e) { - return e && da[e] || "String"; +function Ia(e) { + return e && Ma[e] || "String"; } -function fn(e) { +function yl(e) { return e.type === "Nullable`1" ? e.genericArgs[0] : e.type; } -function Zl(e) { - return e && Vl(e) == "number" || !1; +function tl(e) { + return e && Fs(e) == "number" || !1; } -function fs(e) { +function Sn(e) { return e && e.toLowerCase() == "string" || !1; } -function ha(e) { +function ja(e) { return e == "List`1" || e.startsWith("List<") || e.endsWith("[]"); } -function ms(e) { +function Mn(e) { if (!(e != null && e.type)) return !1; - const t = fn(e); - return e.isValueType && t.indexOf("`") == -1 || e.isEnum ? !1 : Vl(e.type) == null; + const t = yl(e); + return e.isValueType && t.indexOf("`") == -1 || e.isEnum ? !1 : Fs(e.type) == null; } -function vs(e) { - var l, n, i; +function An(e) { + var s, n, a, r; if (!(e != null && e.type)) return !1; - const t = fn(e); - return e.isValueType && t.indexOf("`") == -1 || e.isEnum || ((l = e.input) == null ? void 0 : l.type) == "file" || ((n = e.input) == null ? void 0 : n.type) == "tag" || ((i = e.input) == null ? void 0 : i.type) == "combobox" ? !0 : Vl(e.type) != null; -} -function Gt(e, t) { - let l = typeof e == "string" ? Sl(e) : e; - l || (console.warn(`Metadata not found for: ${e}`), l = { request: { name: e } }); - let n = function() { - return function(r) { - Object.assign(this, r); - }; - }(), i = function() { - function r(d) { - Object.assign(this, d); - } - return r.prototype.createResponse = function() { - return l.returnsVoid ? void 0 : new n(); - }, r.prototype.getTypeName = function() { - return l.request.name; - }, r.prototype.getMethod = function() { - return l.method || "POST"; - }, r; - }(); - return new i(t); -} -function ga(e, t, l = {}) { - let n = function() { - return function(r) { - Object.assign(this, r); - }; - }(), i = function() { - function r(d) { - Object.assign(this, d); - } - return r.prototype.createResponse = function() { - return typeof l.createResponse == "function" ? l.createResponse() : new n(); - }, r.prototype.getTypeName = function() { - return e; - }, r.prototype.getMethod = function() { - return l.method || "POST"; - }, r; - }(); - return new i(t); -} -function ml(e, t) { - return e ? (Object.keys(e).forEach((l) => { - let n = e[l]; - typeof n == "string" && n.startsWith("/Date") && (e[l] = $l(Vt(n))); + const t = yl(e); + return e.isValueType && t.indexOf("`") == -1 || e.isEnum || ((s = e.input) == null ? void 0 : s.type) == "hidden" || ((n = e.input) == null ? void 0 : n.type) == "file" || ((a = e.input) == null ? void 0 : a.type) == "tag" || ((r = e.input) == null ? void 0 : r.type) == "combobox" ? !0 : Fs(e.type) != null; +} +function Yt(e, t) { + let s = typeof e == "string" ? Is(e) : e; + s || (console.warn(`Metadata not found for: ${e}`), s = { request: { name: e } }); + let n = ( + /** @class */ + function() { + return function(r) { + Object.assign(this, r); + }; + }() + ), a = ( + /** @class */ + function() { + function r(u) { + Object.assign(this, u); + } + return r.prototype.createResponse = function() { + return s.returnsVoid ? void 0 : new n(); + }, r.prototype.getTypeName = function() { + return s.request.name; + }, r.prototype.getMethod = function() { + return s.method || "POST"; + }, r; + }() + ); + return new a(t); +} +function Oa(e, t, s = {}) { + let n = ( + /** @class */ + function() { + return function(r) { + Object.assign(this, r); + }; + }() + ), a = ( + /** @class */ + function() { + function r(u) { + Object.assign(this, u); + } + return r.prototype.createResponse = function() { + return typeof s.createResponse == "function" ? s.createResponse() : new n(); + }, r.prototype.getTypeName = function() { + return e; + }, r.prototype.getMethod = function() { + return s.method || "POST"; + }, r; + }() + ); + return new a(t); +} +function ys(e, t) { + return e ? (Object.keys(e).forEach((s) => { + let n = e[s]; + typeof n == "string" ? n.startsWith("/Date") && (e[s] = Ss(pt(n))) : n != null && typeof n == "object" && (Array.isArray(n) ? e[s] = Array.from(n) : e[s] = Object.assign({}, n)); }), e) : {}; } -function pa(e, t) { - let l = {}; +function Da(e, t) { + let s = {}; return Array.from(e.elements).forEach((n) => { - var y; - let i = n; - if (!i.id || i.value == null || i.value === "") + var p; + let a = n; + if (!a.id || a.value == null || a.value === "") return; - const r = i.id.toLowerCase(), d = t && t.find((b) => b.name.toLowerCase() == r); - let c = d == null ? void 0 : d.type, m = (y = d == null ? void 0 : d.genericArgs) == null ? void 0 : y[0], h = i.type === "checkbox" ? i.checked : i.value; - Zl(c) ? h = Number(h) : c === "List`1" && typeof h == "string" && (h = h.split(",").map((b) => Zl(m) ? Number(b) : b)), l[i.id] = h; - }), l; + const r = a.id.toLowerCase(), u = t && t.find(($) => $.name.toLowerCase() == r); + let d = u == null ? void 0 : u.type, c = (p = u == null ? void 0 : u.genericArgs) == null ? void 0 : p[0], f = a.type === "checkbox" ? a.checked : a.value; + tl(d) ? f = Number(f) : d === "List`1" && typeof f == "string" && (f = f.split(",").map(($) => tl(c) ? Number($) : $)), s[a.id] = f; + }), s; } -function mn(e) { +function bl(e) { var t; return ((t = e == null ? void 0 : e.api) == null ? void 0 : t.operations) && e.api.operations.length > 0; } -function ya(e) { - if (e != null && e.assert && !ie.metadata.value) +function Pa(e) { + if (!wl() && (e != null && e.assert) && !G.metadata.value) throw new Error("useMetadata() not configured, see: https://docs.servicestack.net/vue/use-metadata"); - return ie.metadata.value; + return G.metadata.value; } -function Wt(e) { - return e && mn(e) ? (e.date = co(new Date()), ie.metadata.value = e, typeof localStorage < "u" && localStorage.setItem(Dt, JSON.stringify(e)), !0) : !1; +function es(e) { + return e && bl(e) ? (e.date = Vo(/* @__PURE__ */ new Date()), G.metadata.value = e, typeof localStorage < "u" && localStorage.setItem(zt, JSON.stringify(e)), !0) : !1; } -function ba() { - ie.metadata.value = null, typeof localStorage < "u" && localStorage.removeItem(Dt); +function Ba() { + G.metadata.value = null, typeof localStorage < "u" && localStorage.removeItem(zt); } -function hs() { - if (ie.metadata.value != null) +function wl() { + if (G.metadata.value != null) return !0; let e = globalThis.Server; - if (mn(e)) - Wt(e); + if (bl(e)) + es(e); else { - const t = typeof localStorage < "u" ? localStorage.getItem(Dt) : null; + const t = typeof localStorage < "u" ? localStorage.getItem(zt) : null; if (t) try { - Wt(JSON.parse(t)); + es(JSON.parse(t)); } catch { - console.error(`Could not JSON.parse ${Dt} from localStorage`); + console.error(`Could not JSON.parse ${zt} from localStorage`); } } - return ie.metadata.value != null; + return G.metadata.value != null; } -async function Nn(e, t) { - let l = t ? await t() : await fetch(e); - if (l.ok) { - let n = await l.text(); - Wt(JSON.parse(n)); +async function Yl(e, t) { + let s = t ? await t() : await fetch(e); + if (s.ok) { + let n = await s.text(); + es(JSON.parse(n)); } else - console.error(`Could not download ${t ? "AppMetadata" : e}: ${l.statusText}`); - mn(ie.metadata.value) || console.warn("AppMetadata is not available"); + console.error(`Could not download ${t ? "AppMetadata" : e}: ${s.statusText}`); + bl(G.metadata.value) || console.warn("AppMetadata is not available"); } -async function wa(e) { +async function Ha(e) { var r; - const { olderThan: t, resolvePath: l, resolve: n } = e || {}; - let i = hs() && t !== 0; - if (i && t) { - let d = Vt((r = ie.metadata.value) == null ? void 0 : r.date); - (!d || new Date().getTime() - d.getTime() > t) && (i = !1); + const { olderThan: t, resolvePath: s, resolve: n } = e || {}; + let a = wl() && t !== 0; + if (a && t) { + let u = pt((r = G.metadata.value) == null ? void 0 : r.date); + (!u || (/* @__PURE__ */ new Date()).getTime() - u.getTime() > t) && (a = !1); } - if (!i) { - if ((l || n) && await Nn(l || Dt, n), ie.metadata.value != null) + if (!a) { + if ((s || n) && (await Yl(s || zt, n), G.metadata.value != null)) return; - const d = qe("client"); - if (d != null) { - const c = await d.api(new ra()); - c.succeeded && Wt(c.response); + const u = Qe("client"); + if (u != null) { + const d = await u.api(new Va()); + d.succeeded && es(d.response); } - if (ie.metadata.value != null) + if (G.metadata.value != null) return; - await Nn(Dt); + await Yl(zt); } - return ie.metadata.value; -} -function st(e, t) { - var d; - let l = (d = ie.metadata.value) == null ? void 0 : d.api; - if (!l || !e) + return G.metadata.value; +} +function rt(e, t) { + var u; + if (G.config.typeResolver) { + let d = G.config.typeResolver(e, t); + if (d) + return d; + } + let s = (u = G.metadata.value) == null ? void 0 : u.api; + if (!s || !e) return null; - let n = l.types.find((c) => c.name.toLowerCase() === e.toLowerCase() && (!t || c.namespace == t)); + let n = s.types.find((d) => d.name.toLowerCase() === e.toLowerCase() && (!t || d.namespace == t)); if (n) return n; - let i = Sl(e); - if (i) - return i.request; - let r = l.operations.find((c) => c.response && c.response.name.toLowerCase() === e.toLowerCase() && (!t || c.response.namespace == t)); + let a = Is(e); + if (a) + return a.request; + let r = s.operations.find((d) => d.response && d.response.name.toLowerCase() === e.toLowerCase() && (!t || d.response.namespace == t)); return r ? r.response : null; } -function Sl(e) { +function Is(e) { var n; - let t = (n = ie.metadata.value) == null ? void 0 : n.api; - return t ? t.operations.find((i) => i.request.name.toLowerCase() === e.toLowerCase()) : null; + if (G.config.apiResolver) { + const a = G.config.apiResolver(e); + if (a) + return a; + } + let t = (n = G.metadata.value) == null ? void 0 : n.api; + return t ? t.operations.find((a) => a.request.name.toLowerCase() === e.toLowerCase()) : null; } -function xa({ dataModel: e }) { +function Ra({ dataModel: e }) { var n; - const t = (n = ie.metadata.value) == null ? void 0 : n.api; + const t = (n = G.metadata.value) == null ? void 0 : n.api; if (!t) return []; - let l = t.operations; + let s = t.operations; if (e) { - const i = typeof e == "string" ? st(e) : e; - l = l.filter((r) => gs(r.dataModel, i)); + const a = typeof e == "string" ? rt(e) : e; + s = s.filter((r) => Tn(r.dataModel, a)); } - return l; + return s; } -function vn(e) { - return e ? st(e.name, e.namespace) : null; +function kl(e) { + return e ? rt(e.name, e.namespace) : null; } -function gs(e, t) { +function Tn(e, t) { return e && t && e.name === t.name && (!e.namespace || !t.namespace || e.namespace === t.namespace); } -function ka(e, t) { - let l = st(e); - return l && l.properties && l.properties.find((i) => i.name.toLowerCase() === t.toLowerCase()); +function Ea(e, t) { + let s = rt(e); + return s && s.properties && s.properties.find((a) => a.name.toLowerCase() === t.toLowerCase()); } -function ps(e) { - return ys(st(e)); +function Fn(e) { + return In(rt(e)); } -function ys(e) { +function In(e) { if (e && e.isEnum && e.enumNames != null) { let t = {}; - for (let l = 0; l < e.enumNames.length; l++) { - const n = (e.enumDescriptions ? e.enumDescriptions[l] : null) || e.enumNames[l], i = (e.enumValues != null ? e.enumValues[l] : null) || e.enumNames[l]; - t[i] = n; + for (let s = 0; s < e.enumNames.length; s++) { + const n = (e.enumDescriptions ? e.enumDescriptions[s] : null) || e.enumNames[s], a = (e.enumValues != null ? e.enumValues[s] : null) || e.enumNames[s]; + t[a] = n; } return t; } return null; } -function bs(e) { +function jn(e) { if (!e) return null; - let t = {}, l = e.input && e.input.allowableEntries; - if (l) { - for (let i = 0; i < l.length; i++) { - let r = l[i]; + let t = {}, s = e.input && e.input.allowableEntries; + if (s) { + for (let a = 0; a < s.length; a++) { + let r = s[a]; t[r.key] = r.value; } return t; } let n = e.allowableValues || (e.input ? e.input.allowableValues : null); if (n) { - for (let i = 0; i < n.length; i++) { - let r = n[i]; + for (let a = 0; a < n.length; a++) { + let r = n[a]; t[r] = r; } return t; } if (e.isEnum) { - const i = e.genericArgs && e.genericArgs.length == 1 ? e.genericArgs[0] : e.type, r = st(i); + const a = e.genericArgs && e.genericArgs.length == 1 ? e.genericArgs[0] : e.type, r = rt(a); if (r) - return ys(r); + return In(r); } return null; } -function hn(e) { +function _l(e) { if (!e) return; const t = []; - return Object.keys(e).forEach((l) => t.push({ key: l, value: e[l] })), t; + return Object.keys(e).forEach((s) => t.push({ key: s, value: e[s] })), t; } -function $a(e, t) { - const n = ((i, r) => Object.assign({ - id: i, - name: i, +function za(e, t) { + const n = ((a, r) => Object.assign({ + id: a, + name: a, type: r - }, t))(e.name, (t == null ? void 0 : t.type) || ma(e) || "text"); - return e.isEnum && (n.type = "select", n.allowableEntries = hn(bs(e))), n; + }, t))(e.name, (t == null ? void 0 : t.type) || Fa(e) || "text"); + return e.isEnum && (n.type = "select", n.allowableEntries = _l(jn(e))), n; } -function Ca(e) { +function Na(e) { let t = []; if (e) { - const l = Je(e), n = Sl(e.name), i = vn(n == null ? void 0 : n.dataModel); - l.forEach((r) => { - var c, m, h; - if (!vs(r)) + const s = st(e), n = Is(e.name), a = kl(n == null ? void 0 : n.dataModel); + s.forEach((r) => { + var d, c, f; + if (!An(r)) return; - const d = $a(r, r.input); - if (d.id = fo(d.id), d.type == "file" && r.uploadTo && !d.accept) { - const y = (m = (c = ie.metadata.value) == null ? void 0 : c.plugins.filesUpload) == null ? void 0 : m.locations.find((b) => b.name == r.uploadTo); - y && !d.accept && y.allowExtensions && (d.accept = y.allowExtensions.map((b) => b.startsWith(".") ? b : `.${b}`).join(",")); + const u = za(r, r.input); + if (u.id = So(u.id), u.type == "file" && r.uploadTo && !u.accept) { + const p = (c = (d = G.metadata.value) == null ? void 0 : d.plugins.filesUpload) == null ? void 0 : c.locations.find(($) => $.name == r.uploadTo); + p && !u.accept && p.allowExtensions && (u.accept = p.allowExtensions.map(($) => $.startsWith(".") ? $ : `.${$}`).join(",")); } - if (i) { - const y = (h = i.properties) == null ? void 0 : h.find((b) => b.name == r.name); - r.ref || (r.ref = y == null ? void 0 : y.ref); + if (a) { + const p = (f = a.properties) == null ? void 0 : f.find(($) => $.name == r.name); + r.ref || (r.ref = p == null ? void 0 : p.ref); } - if (d.options) + if (u.options) try { - const y = { - input: d, - $typeFields: l.map((p) => p.name), - $dataModelFields: i ? Je(i).map((p) => p.name) : [], - ...ie.config.scopeWhitelist - }, b = nn(d.options, y); - Object.keys(b).forEach((p) => { - d[p] = b[p]; + const p = { + input: u, + $typeFields: s.map((m) => m.name), + $dataModelFields: a ? st(a).map((m) => m.name) : [], + ...G.config.scopeWhitelist + }, $ = dl(u.options, p); + Object.keys($).forEach((m) => { + u[m] = $[m]; }); } catch { - console.error(`failed to evaluate '${d.options}'`); + console.error(`failed to evaluate '${u.options}'`); } - t.push(d); + t.push(u); }); } return t; } -function gn(e, t) { - var i, r; +function $l(e, t) { + var a, r; if (!t.type) return console.error("enumDescriptions missing {type:'EnumType'} options"), [`${e}`]; - const l = st(t.type); - if (!(l != null && l.enumValues)) + const s = rt(t.type); + if (!(s != null && s.enumValues)) return console.error(`Could not find metadata for ${t.type}`), [`${e}`]; const n = []; - for (let d = 0; d < l.enumValues.length; d++) { - const c = parseInt(l.enumValues[d]); - c > 0 && (c & e) === c && n.push(((i = l.enumDescriptions) == null ? void 0 : i[d]) || ((r = l.enumNames) == null ? void 0 : r[d]) || `${e}`); + for (let u = 0; u < s.enumValues.length; u++) { + const d = parseInt(s.enumValues[u]); + d > 0 && (d & e) === d && n.push(((a = s.enumDescriptions) == null ? void 0 : a[u]) || ((r = s.enumNames) == null ? void 0 : r[u]) || `${e}`); } return n; } -function ws(e) { - return (t) => typeof t == "number" ? gn(t, { type: e }) : t; +function On(e) { + return (t) => typeof t == "number" ? $l(t, { type: e }) : t; } -function Je(e) { +function st(e) { if (!e) return []; - let t = [], l = {}; - function n(i) { - i.forEach((r) => { - l[r.name] || (l[r.name] = 1, t.push(r)); + let t = [], s = {}; + function n(a) { + a.forEach((r) => { + s[r.name] || (s[r.name] = 1, t.push(r)); }); } for (; e; ) - e.properties && n(e.properties), e = e.inherits ? vn(e.inherits) : null; - return t.map((i) => i.type.endsWith("[]") ? { ...i, type: "List`1", genericArgs: [i.type.substring(0, i.type.length - 2)] } : i); -} -function ul(e, t) { - var l; - return ((l = e.request.implements) == null ? void 0 : l.some((n) => n.name === t)) || !1; -} -function el(e) { - return e ? xs(e, Je(e)) : null; -} -function xs(e, t) { - let l = t.find((r) => r.name.toLowerCase() === "id"); - if (l && l.isPrimaryKey) - return l; - let i = t.find((r) => r.isPrimaryKey) || l; - if (!i) { - let r = ze.model(e); + e.properties && n(e.properties), e = e.inherits ? kl(e.inherits) : null; + return t.map((a) => a.type.endsWith("[]") ? { ...a, type: "List`1", genericArgs: [a.type.substring(0, a.type.length - 2)] } : a); +} +function vs(e, t) { + var s; + return ((s = e.request.implements) == null ? void 0 : s.some((n) => n.name === t)) || !1; +} +function ns(e) { + return e ? Dn(e, st(e)) : null; +} +function Dn(e, t) { + let s = t.find((r) => r.name.toLowerCase() === "id"); + if (s && s.isPrimaryKey) + return s; + let a = t.find((r) => r.isPrimaryKey) || s; + if (!a) { + let r = qe.model(e); if (r) - return Ue(st(r), (d) => el(d)); + return Ze(rt(r), (u) => ns(u)); console.error(`Primary Key not found in ${e.name}`); } - return i || null; -} -function _a(e, t) { - return Ue(el(e), (l) => be(t, l.name)); -} -function ks(e, t, l) { - return e && e.valueType === "none" ? "" : l.key === "%In" || l.key === "%Between" ? `(${l.value})` : La(t, l.value); -} -function La(e, t) { - return e ? (e = cs(e), Zl(e) || e === "Boolean" ? t : ha(e) ? `[${t}]` : `'${t}'`) : t; -} -function ot() { - const e = f(() => { + return a || null; +} +function Ua(e, t) { + return Ze(ns(e), (s) => _e(t, s.name)); +} +function Pn(e, t, s) { + return e && e.valueType === "none" ? "" : s.key === "%In" || s.key === "%Between" ? `(${s.value})` : qa(t, s.value); +} +function qa(e, t) { + return e ? (e = Vn(e), tl(e) || e === "Boolean" ? t : ja(e) ? `[${t}]` : `'${t}'`) : t; +} +function gt(e, t) { + return { name: e, value: t }; +} +const Qa = [ + gt("=", "%"), + gt("!=", "%!"), + gt(">=", ">%"), + gt(">", "%>"), + gt("<=", "%<"), + gt("<", "<%"), + gt("In", "%In"), + gt("Between", "%Between"), + { name: "Starts With", value: "%StartsWith", types: "string" }, + { name: "Contains", value: "%Contains", types: "string" }, + { name: "Ends With", value: "%EndsWith", types: "string" }, + { name: "Exists", value: "%IsNotNull", valueType: "none" }, + { name: "Not Exists", value: "%IsNull", valueType: "none" } +]; +function lt() { + const e = v(() => { var n; - return ((n = ie.metadata.value) == null ? void 0 : n.app) || null; - }), t = f(() => { + return ((n = G.metadata.value) == null ? void 0 : n.app) || null; + }), t = v(() => { var n; - return ((n = ie.metadata.value) == null ? void 0 : n.api) || null; - }), l = f(() => { - var n; - return ((n = ie.metadata.value) == null ? void 0 : n.plugins.autoQuery.viewerConventions) || []; + return ((n = G.metadata.value) == null ? void 0 : n.api) || null; + }), s = v(() => { + var n, a, r; + return ((r = (a = (n = G.metadata.value) == null ? void 0 : n.plugins) == null ? void 0 : a.autoQuery) == null ? void 0 : r.viewerConventions) || Qa; }); - return hs(), { - loadMetadata: wa, - getMetadata: ya, - setMetadata: Wt, - clearMetadata: ba, + return wl(), { + loadMetadata: Ha, + getMetadata: Pa, + setMetadata: es, + clearMetadata: Ba, metadataApp: e, metadataApi: t, - filterDefinitions: l, - typeOf: st, - typeOfRef: vn, - typeEquals: gs, - apiOf: Sl, - findApis: xa, - typeName: fa, - typeName2: ds, - property: ka, - enumOptions: ps, - propertyOptions: bs, - createFormLayout: Ca, - typeProperties: Je, - supportsProp: vs, - Crud: ze, - Apis: Ot, - getPrimaryKey: el, - getPrimaryKeyByProps: xs, - getId: _a, - createDto: Gt, - makeDto: ga, - toFormValues: ml, - formValues: pa, - isComplexProp: ms, - asKvps: hn, - expandEnumFlags: gn, - enumFlagsConverter: ws + filterDefinitions: s, + typeOf: rt, + typeOfRef: kl, + typeEquals: Tn, + apiOf: Is, + findApis: Ra, + typeName: Ta, + typeName2: Ln, + property: Ea, + enumOptions: Fn, + propertyOptions: jn, + createFormLayout: Na, + typeProperties: st, + supportsProp: An, + Crud: qe, + Apis: Nt, + getPrimaryKey: ns, + getPrimaryKeyByProps: Dn, + getId: Ua, + createDto: Yt, + makeDto: Oa, + toFormValues: ys, + formValues: Da, + isComplexProp: Mn, + asKvps: _l, + expandEnumFlags: $l, + enumFlagsConverter: On }; } -const tt = class { - static async getOrFetchValue(t, l, n, i, r, d, c) { - const m = tt.getValue(n, c, r); - return m ?? (await tt.fetchLookupIds(t, l, n, i, r, d, [c]), tt.getValue(n, c, r)); +const et = class et { + static async getOrFetchValue(t, s, n, a, r, u, d) { + const c = et.getValue(n, d, r); + return c ?? (await et.fetchLookupIds(t, s, n, a, r, u, [d]), et.getValue(n, d, r)); } - static getValue(t, l, n) { - const i = tt.Lookup[t]; - if (i) { - const r = i[l]; + static getValue(t, s, n) { + const a = et.Lookup[t]; + if (a) { + const r = a[s]; if (r) return n = n.toLowerCase(), r[n]; } } - static setValue(t, l, n, i) { - const r = tt.Lookup[t] ?? (tt.Lookup[t] = {}), d = r[l] ?? (r[l] = {}); - n = n.toLowerCase(), d[n] = i; + static setValue(t, s, n, a) { + const r = et.Lookup[t] ?? (et.Lookup[t] = {}), u = r[s] ?? (r[s] = {}); + n = n.toLowerCase(), u[n] = a; } - static setRefValue(t, l) { - const n = be(l, t.refId); + static setRefValue(t, s) { + const n = _e(s, t.refId); if (n == null || t.refLabel == null) return null; - const i = be(l, t.refLabel); - return tt.setValue(t.model, n, t.refLabel, i), i; + const a = _e(s, t.refLabel); + return et.setValue(t.model, n, t.refLabel, a), a; } - static async fetchLookupIds(t, l, n, i, r, d, c) { - const m = l.operations.find((h) => { - var y; - return ze.isAnyQuery(h) && ((y = h.dataModel) == null ? void 0 : y.name) == n; + static async fetchLookupIds(t, s, n, a, r, u, d) { + const c = s.operations.find((f) => { + var p; + return qe.isAnyQuery(f) && ((p = f.dataModel) == null ? void 0 : p.name) == n; }); - if (m) { - const h = tt.Lookup[n] ?? (tt.Lookup[n] = {}), y = []; - Object.keys(h).forEach((U) => { - const Y = h[U]; - be(Y, r) && y.push(U); + if (c) { + const f = et.Lookup[n] ?? (et.Lookup[n] = {}), p = []; + Object.keys(f).forEach((P) => { + const I = f[P]; + _e(I, r) && p.push(P); }); - const b = c.filter((U) => !y.includes(U)); - if (b.length == 0) + const $ = d.filter((P) => !p.includes(P)); + if ($.length == 0) return; - const p = d ? null : `${i},${r}`, v = { - [i + "In"]: b.join(",") + const m = u ? null : `${a},${r}`, k = { + [a + "In"]: $.join(",") }; - p && (v.fields = p); - const g = Gt(m, v), O = await t.api(g, { jsconfig: "edv,eccn" }); - if (O.succeeded) - (be(O.response, "results") || []).forEach((Y) => { - if (!be(Y, i)) { - console.error(`result[${i}] == null`, Y); + m && (k.fields = m); + const g = Yt(c, k), b = await t.api(g, { jsconfig: "edv,eccn" }); + if (b.succeeded) + (_e(b.response, "results") || []).forEach((I) => { + if (!_e(I, a)) { + console.error(`result[${a}] == null`, I); return; } - const R = `${be(Y, i)}`, N = be(Y, r); + const se = `${_e(I, a)}`, j = _e(I, r); r = r.toLowerCase(); - const T = h[R] ?? (h[R] = {}); - T[r] = `${N}`; + const T = f[se] ?? (f[se] = {}); + T[r] = `${j}`; }); else { - console.error(`Failed to call ${m.request.name}`); + console.error(`Failed to call ${c.request.name}`); return; } } } }; -let wt = tt; -_e(wt, "Lookup", {}); -let Gl = () => new Date().getTime(), Va = ["/", "T", ":", "-"], rt = { +Le(et, "Lookup", {}); +let Pt = et, sl = () => (/* @__PURE__ */ new Date()).getTime(), Ka = ["/", "T", ":", "-"], ct = { //locale: null, assumeUtc: !0, //number: null, @@ -1119,186 +1184,186 @@ let Gl = () => new Date().getTime(), Va = ["/", "T", ":", "-"], rt = { maxFieldLength: 150, maxNestedFields: 2, maxNestedFieldLength: 30 -}, Sa = new Intl.RelativeTimeFormat(rt.locale, {}), Un = 24 * 60 * 60 * 1e3 * 365, Bl = { - year: Un, - month: Un / 12, +}, Za = new Intl.RelativeTimeFormat(ct.locale, {}), en = 24 * 60 * 60 * 1e3 * 365, qs = { + year: en, + month: en / 12, day: 24 * 60 * 60 * 1e3, hour: 60 * 60 * 1e3, minute: 60 * 1e3, second: 1e3 -}, yt = { - currency: Cs, - bytes: _s, - link: Ls, - linkTel: Vs, - linkMailTo: Ss, - icon: Ms, - iconRounded: As, - attachment: Ts, - hidden: Fs, - time: Is, - relativeTime: yn, - relativeTimeFromMs: Ml, - enumFlags: Os, - formatDate: Rt, - formatNumber: pn +}, Lt = { + currency: Hn, + bytes: Rn, + link: En, + linkTel: zn, + linkMailTo: Nn, + icon: Un, + iconRounded: qn, + attachment: Qn, + hidden: Kn, + time: Zn, + relativeTime: xl, + relativeTimeFromMs: js, + enumFlags: Gn, + formatDate: Qt, + formatNumber: Cl }; -"iconOnError" in globalThis || (globalThis.iconOnError = Ll); +"iconOnError" in globalThis || (globalThis.iconOnError = Ts); class Ke { } -_e(Ke, "currency", { method: "currency" }), _e(Ke, "bytes", { method: "bytes" }), _e(Ke, "link", { method: "link" }), _e(Ke, "linkTel", { method: "linkTel" }), _e(Ke, "linkMailTo", { method: "linkMailTo" }), _e(Ke, "icon", { method: "icon" }), _e(Ke, "iconRounded", { method: "iconRounded" }), _e(Ke, "attachment", { method: "attachment" }), _e(Ke, "time", { method: "time" }), _e(Ke, "relativeTime", { method: "relativeTime" }), _e(Ke, "relativeTimeFromMs", { method: "relativeTimeFromMs" }), _e(Ke, "date", { method: "formatDate" }), _e(Ke, "number", { method: "formatNumber" }), _e(Ke, "hidden", { method: "hidden" }), _e(Ke, "enumFlags", { method: "enumFlags" }); -function Ma(e) { - rt = Object.assign({}, rt, e); +Le(Ke, "currency", { method: "currency" }), Le(Ke, "bytes", { method: "bytes" }), Le(Ke, "link", { method: "link" }), Le(Ke, "linkTel", { method: "linkTel" }), Le(Ke, "linkMailTo", { method: "linkMailTo" }), Le(Ke, "icon", { method: "icon" }), Le(Ke, "iconRounded", { method: "iconRounded" }), Le(Ke, "attachment", { method: "attachment" }), Le(Ke, "time", { method: "time" }), Le(Ke, "relativeTime", { method: "relativeTime" }), Le(Ke, "relativeTimeFromMs", { method: "relativeTimeFromMs" }), Le(Ke, "date", { method: "formatDate" }), Le(Ke, "number", { method: "formatNumber" }), Le(Ke, "hidden", { method: "hidden" }), Le(Ke, "enumFlags", { method: "enumFlags" }); +function Wa(e) { + ct = Object.assign({}, ct, e); } -function Aa(e) { +function Ga(e) { Object.keys(e || {}).forEach((t) => { - typeof e[t] == "function" && (yt[t] = e[t]); + typeof e[t] == "function" && (Lt[t] = e[t]); }); } -function $s() { - return yt; +function Bn() { + return Lt; } -function tl(e, t) { - return t ? it("span", e, t) : e; +function os(e, t) { + return t ? dt("span", e, t) : e; } -function Cs(e, t) { - const l = ut(t, ["currency"]); - return tl(new Intl.NumberFormat(void 0, { style: "currency", currency: (t == null ? void 0 : t.currency) || "USD" }).format(e), l); +function Hn(e, t) { + const s = ft(t, ["currency"]); + return os(new Intl.NumberFormat(void 0, { style: "currency", currency: (t == null ? void 0 : t.currency) || "USD" }).format(e), s); } -function _s(e, t) { - return tl(dn(e), t); +function Rn(e, t) { + return os(hl(e), t); } -function Ls(e, t) { - return it("a", e, Cl({ ...t, href: e })); +function En(e, t) { + return dt("a", e, Ms({ ...t, href: e })); } -function Vs(e, t) { - return it("a", e, Cl({ ...t, href: `tel:${e}` })); +function zn(e, t) { + return dt("a", e, Ms({ ...t, href: `tel:${e}` })); } -function Ss(e, t) { +function Nn(e, t) { t || (t = {}); - let { subject: l, body: n } = t, i = ut(t, ["subject", "body"]), r = {}; - return l && (r.subject = l), n && (r.body = n), it("a", e, Cl({ ...i, href: `mailto:${Kt(e, r)}` })); + let { subject: s, body: n } = t, a = ft(t, ["subject", "body"]), r = {}; + return s && (r.subject = s), n && (r.body = n), dt("a", e, Ms({ ...a, href: `mailto:${Et(e, r)}` })); } -function Ms(e, t) { - return it("img", void 0, Object.assign({ class: "w-6 h-6", title: e, src: Ft(e), onerror: "iconOnError(this)" }, t)); +function Un(e, t) { + return dt("img", void 0, Object.assign({ class: "w-6 h-6", title: e, src: Ht(e), onerror: "iconOnError(this)" }, t)); } -function As(e, t) { - return it("img", void 0, Object.assign({ class: "w-8 h-8 rounded-full", title: e, src: Ft(e), onerror: "iconOnError(this)" }, t)); +function qn(e, t) { + return dt("img", void 0, Object.assign({ class: "w-8 h-8 rounded-full", title: e, src: Ht(e), onerror: "iconOnError(this)" }, t)); } -function Ts(e, t) { - let l = an(e), i = Yt(l) == null || un(e) ? Ft(e) : cn(e); - const r = Ft(i); - let d = t && (t["icon-class"] || t.iconClass), c = it("img", void 0, Object.assign({ class: "w-6 h-6", src: r, onerror: "iconOnError(this,'att')" }, d ? { class: d } : null)), m = `${l}`; - return it("a", c + m, Object.assign({ class: "flex", href: Ft(e), title: e }, t ? ut(t, ["icon-class", "iconClass"]) : null)); +function Qn(e, t) { + let s = vl(e), a = ls(s) == null || ml(e) ? Ht(e) : gl(e); + const r = Ht(a); + let u = t && (t["icon-class"] || t.iconClass), d = dt("img", void 0, Object.assign({ class: "w-6 h-6", src: r, onerror: "iconOnError(this,'att')" }, u ? { class: u } : null)), c = `${s}`; + return dt("a", d + c, Object.assign({ class: "flex", href: Ht(e), title: e }, t ? ft(t, ["icon-class", "iconClass"]) : null)); } -function Fs(e) { +function Kn(e) { return ""; } -function Is(e, t) { - let l = typeof e == "string" ? new Date(Gn(e) * 1e3) : kl(e) ? Vt(e) : null; - return tl(l ? vo(l) : e, t); +function Zn(e, t) { + let s = typeof e == "string" ? new Date(un(e) * 1e3) : Vs(e) ? pt(e) : null; + return os(s ? Ao(s) : e, t); } -function Rt(e, t) { +function Qt(e, t) { if (e == null) return ""; - let l = typeof e == "number" ? new Date(e) : typeof e == "string" ? Vt(e) : e; - if (!kl(l)) - return console.warn(`${l} is not a Date value`), e == null ? "" : `${e}`; - let n = rt.date ? Al(rt.date) : null; - return tl(typeof n == "function" ? n(l) : Zn(l), t); + let s = typeof e == "number" ? new Date(e) : typeof e == "string" ? pt(e) : e; + if (!Vs(s)) + return console.warn(`${s} is not a Date value`), e == null ? "" : `${e}`; + let n = ct.date ? Os(ct.date) : null; + return os(typeof n == "function" ? n(s) : To(s), t); } -function pn(e, t) { +function Cl(e, t) { if (typeof e != "number") return e; - let l = rt.number ? Al(rt.number) : null, n = typeof l == "function" ? l(e) : `${e}`; - return n === "" && (console.warn(`formatNumber(${e}) => ${n}`, l), n = `${e}`), tl(n, t); + let s = ct.number ? Os(ct.number) : null, n = typeof s == "function" ? s(e) : `${e}`; + return n === "" && (console.warn(`formatNumber(${e}) => ${n}`, s), n = `${e}`), os(n, t); } -function Ds(e, t, l) { - let n = ho(e), i = t ? Al(t) : null; - if (typeof i == "function") { - let d = l; +function Wn(e, t, s) { + let n = Fo(e), a = t ? Os(t) : null; + if (typeof a == "function") { + let u = s; if (t != null && t.options) try { - d = nn(t.options, l); - } catch (c) { - console.error(`Could not evaluate '${t.options}'`, c, ", with scope:", l); + u = dl(t.options, s); + } catch (d) { + console.error(`Could not evaluate '${t.options}'`, d, ", with scope:", s); } - return i(e, d); + return a(e, u); } - let r = n != null ? kl(n) ? Rt(n, l) : typeof n == "number" ? pn(n, l) : n : null; + let r = n != null ? Vs(n) ? Qt(n, s) : typeof n == "number" ? Cl(n, s) : n : null; return r ?? ""; } -function Jt(e, t, l) { - return _t(e) ? Ds(e, t, l) : Oa(e, t, l); +function ts(e, t, s) { + return Tt(e) ? Wn(e, t, s) : tr(e, t, s); } -function Ta(e) { +function Ja(e) { if (e == null) return NaN; if (typeof e == "number") return e; - if (kl(e)) - return e.getTime() - Gl(); + if (Vs(e)) + return e.getTime() - sl(); if (typeof e == "string") { let t = Number(e); if (!isNaN(t)) return t; if (e[0] === "P" || e.startsWith("-P")) - return Gn(e) * 1e3 * -1; - if (go(e, Va) >= 0) - return Vt(e).getTime() - Gl(); + return un(e) * 1e3 * -1; + if (Io(e, Ka) >= 0) + return pt(e).getTime() - sl(); } return NaN; } -function Ml(e, t) { - for (let l in Bl) - if (Math.abs(e) > Bl[l] || l === "second") - return (t || Sa).format(Math.round(e / Bl[l]), l); +function js(e, t) { + for (let s in qs) + if (Math.abs(e) > qs[s] || s === "second") + return (t || Za).format(Math.round(e / qs[s]), s); } -function yn(e, t) { - let l = Ta(e); - return isNaN(l) ? "" : Ml(l, t); +function xl(e, t) { + let s = Ja(e); + return isNaN(s) ? "" : js(s, t); } -function Fa(e, t) { - return Ml(e.getTime() - (t ? t.getTime() : Gl())); +function Xa(e, t) { + return js(e.getTime() - (t ? t.getTime() : sl())); } -function Os(e, t) { - return gn(e, t).join(", "); +function Gn(e, t) { + return $l(e, t).join(", "); } -function Al(e) { +function Os(e) { if (!e) return null; - let { method: t, options: l } = e, n = `${t}(${l})`, i = yt[n] || yt[t]; - if (typeof i == "function") - return i; - let r = e.locale || rt.locale; + let { method: t, options: s } = e, n = `${t}(${s})`, a = Lt[n] || Lt[t]; + if (typeof a == "function") + return a; + let r = e.locale || ct.locale; if (t.startsWith("Intl.")) { - let d = r ? `'${r}'` : "undefined", c = `return new ${t}(${d},${l || "undefined"})`; + let u = r ? `'${r}'` : "undefined", d = `return new ${t}(${u},${s || "undefined"})`; try { - let m = Function(c)(); - return i = t === "Intl.DateTimeFormat" ? (h) => m.format(Vt(h)) : t === "Intl.NumberFormat" ? (h) => m.format(Number(h)) : t === "Intl.RelativeTimeFormat" ? (h) => yn(h, m) : (h) => m.format(h), yt[n] = i; - } catch (m) { - console.error(`Invalid format: ${c}`, m); + let c = Function(d)(); + return a = t === "Intl.DateTimeFormat" ? (f) => c.format(pt(f)) : t === "Intl.NumberFormat" ? (f) => c.format(Number(f)) : t === "Intl.RelativeTimeFormat" ? (f) => xl(f, c) : (f) => c.format(f), Lt[n] = a; + } catch (c) { + console.error(`Invalid format: ${d}`, c); } } else { - let d = globalThis[t]; - if (typeof d == "function") { - let c = l != null ? Function("return " + l)() : void 0; - return i = (m) => d(m, c, r), yt[n] = i; + let u = globalThis[t]; + if (typeof u == "function") { + let d = s != null ? Function("return " + s)() : void 0; + return a = (c) => u(c, d, r), Lt[n] = a; } - console.error(`No '${t}' function exists`, Object.keys(yt)); + console.error(`No '${t}' function exists`, Object.keys(Lt)); } return null; } -function js(e, t) { +function Jn(e, t) { return e ? e.length > t ? e.substring(0, t) + "..." : e : ""; } -function Ps(e) { - return e.substring(0, 6) === "/Date(" ? Rt(Vt(e)) : e; +function Xn(e) { + return e.substring(0, 6) === "/Date(" ? Qt(pt(e)) : e; } -function Ia(e) { - return bn(jt(e)).replace(/"/g, ""); +function Ya(e) { + return Ll(Ut(e)).replace(/"/g, ""); } -function Bs(e) { +function Yn(e) { if (e == null || e === "") return ""; if (typeof e == "string") @@ -1309,154 +1374,174 @@ function Bs(e) { } return e; } -function bn(e, t = 4) { - return e = Bs(e), typeof e != "object" ? typeof e == "string" ? e : `${e}` : JSON.stringify(e, void 0, t); +function Ll(e, t = 4) { + return e = Yn(e), typeof e != "object" ? typeof e == "string" ? e : `${e}` : JSON.stringify(e, void 0, t); } -function Da(e) { - return e = Bs(e), typeof e != "object" ? typeof e == "string" ? e : `${e}` : (e = Object.assign({}, e), e = jt(e), bn(e)); +function er(e) { + return e = Yn(e), typeof e != "object" ? typeof e == "string" ? e : `${e}` : (e = Object.assign({}, e), e = Ut(e), Ll(e)); } -function jt(e) { +function Ut(e) { if (e == null) return null; if (typeof e == "string") - return Ps(e); - if (_t(e)) + return Xn(e); + if (Tt(e)) return e; if (e instanceof Date) - return Rt(e); + return Qt(e); if (Array.isArray(e)) - return e.map(jt); + return e.map(Ut); if (typeof e == "object") { let t = {}; - return Object.keys(e).forEach((l) => { - l != "__type" && (t[l] = jt(e[l])); + return Object.keys(e).forEach((s) => { + s != "__type" && (t[s] = Ut(e[s])); }), t; } return e; } -function Oa(e, t, l) { +function tr(e, t, s) { let n = e; if (Array.isArray(e)) { - if (_t(e[0])) + if (Tt(e[0])) return n.join(","); e[0] != null && (n = e[0]); } if (n == null) return ""; if (n instanceof Date) - return Rt(n, l); - let i = Object.keys(n), r = []; - for (let d = 0; d < Math.min(rt.maxNestedFields, i.length); d++) { - let c = i[d], m = `${jt(n[c])}`; - r.push(`${c}: ${Hl(js(Ps(m), rt.maxNestedFieldLength))}`); + return Qt(n, s); + let a = Object.keys(n), r = []; + for (let u = 0; u < Math.min(ct.maxNestedFields, a.length); u++) { + let d = a[u], c = `${Ut(n[d])}`; + r.push(`${d}: ${Ks(Jn(Xn(c), ct.maxNestedFieldLength))}`); } - return i.length > 2 && r.push("..."), it("span", "{ " + r.join(", ") + " }", Object.assign({ title: Hl(Ia(e)) }, l)); + return a.length > 2 && r.push("..."), dt("span", "{ " + r.join(", ") + " }", Object.assign({ title: Ks(Ya(e)) }, s)); } -function yh() { +function ch() { return { Formats: Ke, - setDefaultFormats: Ma, - getFormatters: $s, - setFormatters: Aa, - formatValue: Jt, - formatter: Al, - dateInputFormat: $l, - currency: Cs, - bytes: _s, - link: Ls, - linkTel: Vs, - linkMailTo: Ss, - icon: Ms, - iconRounded: As, - attachment: Ts, - hidden: Fs, - time: Is, - relativeTime: yn, - relativeTimeFromDate: Fa, - relativeTimeFromMs: Ml, - enumFlags: Os, - formatDate: Rt, - formatNumber: pn, - indentJson: bn, - prettyJson: Da, - scrub: jt, - truncate: js, - apiValueFmt: Ds, - iconOnError: Ll + setDefaultFormats: Wa, + getFormatters: Bn, + setFormatters: Ga, + formatValue: ts, + formatter: Os, + dateInputFormat: Ss, + currency: Hn, + bytes: Rn, + link: En, + linkTel: zn, + linkMailTo: Nn, + icon: Un, + iconRounded: qn, + attachment: Qn, + hidden: Kn, + time: Zn, + relativeTime: xl, + relativeTimeFromDate: Xa, + relativeTimeFromMs: js, + enumFlags: Gn, + formatDate: Qt, + formatNumber: Cl, + indentJson: Ll, + prettyJson: er, + scrub: Ut, + truncate: Jn, + apiValueFmt: Wn, + iconOnError: Ts }; } -const ja = ["onClick", "title"], Pa = /* @__PURE__ */ ue({ +const sr = ["title"], lr = /* @__PURE__ */ de({ __name: "RouterLink", props: { - to: null + to: {} }, setup(e) { - const t = e, { config: l } = St(), n = () => l.value.navigate(t.to ?? "/"); - return (i, r) => (a(), u("a", Le({ - onClick: Ne(n, ["prevent"]), - title: e.to, + const t = e, { config: s } = It(), n = () => s.value.navigate(t.to ?? "/"); + return (a, r) => (o(), i("a", Te({ + onClick: Ue(n, ["prevent"]), + title: a.to, href: "javascript:void(0)" - }, i.$attrs), [ - Z(i.$slots, "default") - ], 16, ja)); + }, a.$attrs), [ + U(a.$slots, "default") + ], 16, sr)); + } +}); +class nr { + constructor() { + Le(this, "callbacks", {}); + } + register(t, s) { + this.callbacks[t] = s; } -}), Qt = class { + has(t) { + return !!this.callbacks[t]; + } + invoke(t, s) { + const n = this.callbacks[t]; + typeof n == "function" && n(t, s); + } +} +const tt = class tt { static component(t) { - const l = Qt.components[t]; - if (l) - return l; - const n = Rn(t), i = Object.keys(Qt.components).find((r) => Rn(r) === n); - return i && Qt.components[i] || null; + const s = tt.components[t]; + if (s) + return s; + const n = Wl(t), a = Object.keys(tt.components).find((r) => Wl(r) === n); + return a && tt.components[a] || null; } }; -let ie = Qt; -_e(ie, "config", { +Le(tt, "config", { redirectSignIn: "/signin", redirectSignOut: "/auth/logout", navigate: (t) => location.href = t, assetsPathResolver: (t) => t, fallbackPathResolver: (t) => t, - storage: new es(), + storage: new hn(), tableIcon: { svg: "" }, scopeWhitelist: { - enumFlagsConverter: ws, - ...$s() + enumFlagsConverter: On, + ...Bn() } -}), _e(ie, "autoQueryGridDefaults", { +}), Le(tt, "autoQueryGridDefaults", { deny: [], hide: [], toolbarButtonClass: void 0, tableStyle: "stripedRows", take: 25, maxFieldLength: 150 -}), _e(ie, "events", po()), _e(ie, "user", M(null)), _e(ie, "metadata", M(null)), _e(ie, "components", { - RouterLink: Pa -}); -function Ba(e) { - ie.config = Object.assign(ie.config, e); +}), Le(tt, "events", jo()), Le(tt, "user", O(null)), Le(tt, "metadata", O(null)), Le(tt, "components", { + RouterLink: lr +}), Le(tt, "interceptors", new nr()); +let G = tt; +function or(e) { + G.config = Object.assign(G.config, e); } -function Ra(e) { - ie.autoQueryGridDefaults = Object.assign(ie.autoQueryGridDefaults, e); +function ar(e) { + G.autoQueryGridDefaults = Object.assign(G.autoQueryGridDefaults, e); } -function wn(e) { - return e && ie.config.assetsPathResolver ? ie.config.assetsPathResolver(e) : e; +function Vl(e) { + return e && G.config.assetsPathResolver ? G.config.assetsPathResolver(e) : e; } -function Ha(e) { - return e && ie.config.fallbackPathResolver ? ie.config.fallbackPathResolver(e) : e; +function rr(e) { + return e && G.config.fallbackPathResolver ? G.config.fallbackPathResolver(e) : e; } -function St() { - const e = f(() => ie.config), t = f(() => ie.autoQueryGridDefaults), l = ie.events; +function ir(e, t) { + G.interceptors.register(e, t); +} +function It() { + const e = v(() => G.config), t = v(() => G.autoQueryGridDefaults), s = G.events; return { config: e, - setConfig: Ba, - events: l, + setConfig: or, + events: s, autoQueryGridDefaults: t, - setAutoQueryGridDefaults: Ra, - assetsPathResolver: wn, - fallbackPathResolver: Ha + setAutoQueryGridDefaults: ar, + assetsPathResolver: Vl, + fallbackPathResolver: rr, + registerInterceptor: ir }; } -const Rs = ue({ +const eo = de({ inheritAttrs: !1, props: { image: Object, @@ -1467,173 +1552,171 @@ const Rs = ue({ }, setup(e, { attrs: t }) { return () => { - let l = e.image; + let s = e.image; if (e.type) { - const { typeOf: r } = ot(), d = r(e.type); - d || console.warn(`Type ${e.type} does not exist`), d != null && d.icon ? l = d == null ? void 0 : d.icon : console.warn(`Type ${e.type} does not have a [Svg] icon`); + const { typeOf: r } = lt(), u = r(e.type); + u || console.warn(`Type ${e.type} does not exist`), u != null && u.icon ? s = u == null ? void 0 : u.icon : console.warn(`Type ${e.type} does not have a [Svg] icon`); } - let n = e.svg || (l == null ? void 0 : l.svg) || ""; + let n = e.svg || (s == null ? void 0 : s.svg) || ""; if (n.startsWith("").indexOf("class="), c = `${(l == null ? void 0 : l.cls) || ""} ${t.class || ""}`; - if (d == -1) - n = `").indexOf("class="), d = `${(s == null ? void 0 : s.cls) || ""} ${t.class || ""}`; + if (u == -1) + n = ` Ll(r.target) + return $t("img", { + class: [s == null ? void 0 : s.cls, t.class], + src: Vl(e.src || (s == null ? void 0 : s.uri)), + onError: (r) => Ts(r.target) }); }; } -}), Ea = { class: "text-2xl font-semibold text-gray-900 dark:text-gray-300" }, za = { class: "flex" }, Na = /* @__PURE__ */ s("path", { +}), ur = { class: "text-2xl font-semibold text-gray-900 dark:text-gray-300" }, dr = { class: "flex" }, cr = /* @__PURE__ */ l("path", { d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z", fill: "currentColor" -}, null, -1), Ua = /* @__PURE__ */ s("path", { +}, null, -1), fr = /* @__PURE__ */ l("path", { d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z", fill: "currentFill" -}, null, -1), qa = [ - Na, - Ua -], Qa = /* @__PURE__ */ ue({ +}, null, -1), vr = [ + cr, + fr +], pr = /* @__PURE__ */ de({ __name: "Loading", props: { imageClass: { default: "w-6 h-6" } }, setup(e) { - return (t, l) => (a(), u("div", Ea, [ - s("div", za, [ - (a(), u("svg", { - class: w(["self-center inline mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-gray-600 dark:fill-gray-300", e.imageClass]), + return (t, s) => (o(), i("div", ur, [ + l("div", dr, [ + (o(), i("svg", { + class: y(["self-center inline mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-gray-600 dark:fill-gray-300", t.imageClass]), role: "status", viewBox: "0 0 100 101", fill: "none", xmlns: "http://www.w3.org/2000/svg" - }, qa, 2)), - s("span", null, [ - Z(t.$slots, "default") + }, vr, 2)), + l("span", null, [ + U(t.$slots, "default") ]) ]) ])); } -}), Ka = ["href", "onClick"], Za = ["type"], Ga = /* @__PURE__ */ ue({ +}), mr = ["href", "onClick"], hr = ["type"], tn = "inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 shadow-sm text-sm font-medium rounded-md text-gray-700 dark:text-gray-200 disabled:text-gray-400 bg-white dark:bg-black hover:bg-gray-50 hover:dark:bg-gray-900 disabled:hover:bg-white dark:disabled:hover:bg-black focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black", gr = /* @__PURE__ */ de({ __name: "OutlineButton", props: { type: { default: "submit" }, - href: null + href: {} }, setup(e) { - const t = "inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 shadow-sm text-sm font-medium rounded-md text-gray-700 dark:text-gray-200 disabled:text-gray-400 bg-white dark:bg-black hover:bg-gray-50 hover:dark:bg-gray-900 disabled:hover:bg-white dark:disabled:hover:bg-black focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black"; - return (l, n) => { - const i = X("router-link"); - return e.href ? (a(), se(i, { + return (t, s) => { + const n = Z("router-link"); + return t.href ? (o(), ae(n, { key: 0, - to: e.href + to: t.href }, { - default: ke(({ navigate: r }) => [ - s("button", { - class: w(t), - href: e.href, - onClick: r + default: xe(({ navigate: a }) => [ + l("button", { + class: y(tn), + href: t.href, + onClick: a }, [ - Z(l.$slots, "default") - ], 8, Ka) + U(t.$slots, "default") + ], 8, mr) ]), _: 3 - }, 8, ["to"])) : (a(), u("button", Le({ + }, 8, ["to"])) : (o(), i("button", Te({ key: 1, - type: e.type, - class: t - }, l.$attrs), [ - Z(l.$slots, "default") - ], 16, Za)); + type: t.type, + class: tn + }, t.$attrs), [ + U(t.$slots, "default") + ], 16, hr)); }; } -}), Wa = ["href", "onClick"], Ja = ["type"], Xa = /* @__PURE__ */ ue({ +}), yr = ["href", "onClick"], br = ["type"], wr = /* @__PURE__ */ de({ __name: "PrimaryButton", props: { type: { default: "submit" }, - href: null, + href: {}, color: { default: "indigo" } }, setup(e) { - const t = e, l = { - blue: "text-white bg-blue-600 hover:bg-blue-700 disabled:bg-blue-400 disabled:hover:bg-blue-400 focus:ring-indigo-500 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800", - purple: "text-white bg-purple-600 hover:bg-purple-700 disabled:bg-purple-400 disabled:hover:bg-purple-400 focus:ring-indigo-500 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800", - red: "focus:ring-red-500 text-white bg-red-600 hover:bg-red-700 disabled:bg-red-400 disabled:hover:bg-red-400 focus:ring-red-500 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-500", - green: "focus:ring-green-300 text-white bg-green-600 hover:bg-green-700 disabled:bg-green-400 disabled:hover:bg-green-400 focus:ring-green-500 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-500", - sky: "focus:ring-sky-300 text-white bg-sky-600 hover:bg-sky-700 disabled:bg-sky-400 disabled:hover:bg-sky-400 focus:ring-sky-500 dark:bg-sky-600 dark:hover:bg-sky-700 dark:focus:ring-sky-500", - cyan: "focus:ring-cyan-300 text-white bg-cyan-600 hover:bg-cyan-700 disabled:bg-cyan-400 disabled:hover:bg-cyan-400 focus:ring-cyan-500 dark:bg-cyan-600 dark:hover:bg-cyan-700 dark:focus:ring-cyan-500", - indigo: "focus:ring-2 focus:ring-offset-2 text-white bg-indigo-600 hover:bg-indigo-700 disabled:bg-indigo-400 disabled:hover:bg-indigo-400 focus:ring-indigo-500 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" - }, n = f(() => "inline-flex justify-center rounded-md border border-transparent py-2 px-4 text-sm font-medium shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 dark:ring-offset-black " + (l[t.color] || l.indigo)); - return (i, r) => { - const d = X("router-link"); - return e.href ? (a(), se(d, { + const t = e, s = { + blue: "focus:ring-indigo-500 bg-blue-600 hover:bg-blue-700 disabled:bg-blue-400 disabled:hover:bg-blue-400 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800", + purple: "focus:ring-indigo-500 bg-purple-600 hover:bg-purple-700 disabled:bg-purple-400 disabled:hover:bg-purple-400 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800", + red: "focus:ring-red-500 bg-red-600 hover:bg-red-700 disabled:bg-red-400 disabled:hover:bg-red-400 focus:ring-red-500 dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-500", + green: "focus:ring-green-500 bg-green-600 hover:bg-green-700 disabled:bg-green-400 disabled:hover:bg-green-400 focus:ring-green-500 dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-500", + sky: "focus:ring-sky-500 bg-sky-600 hover:bg-sky-700 disabled:bg-sky-400 disabled:hover:bg-sky-400 dark:bg-sky-600 dark:hover:bg-sky-700 dark:focus:ring-sky-500", + cyan: "focus:ring-cyan-500 bg-cyan-600 hover:bg-cyan-700 disabled:bg-cyan-400 disabled:hover:bg-cyan-400 dark:bg-cyan-600 dark:hover:bg-cyan-700 dark:focus:ring-cyan-500", + indigo: "focus:ring-indigo-500 bg-indigo-600 hover:bg-indigo-700 disabled:bg-indigo-400 disabled:hover:bg-indigo-400 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" + }, n = v(() => "inline-flex justify-center rounded-md border border-transparent py-2 px-4 text-sm font-medium shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 dark:ring-offset-black text-white " + (s[t.color] || s.indigo)); + return (a, r) => { + const u = Z("router-link"); + return a.href ? (o(), ae(u, { key: 0, - to: e.href + to: a.href }, { - default: ke(({ navigate: c }) => [ - s("button", { - class: w(o(n)), - href: e.href, - onClick: c + default: xe(({ navigate: d }) => [ + l("button", { + class: y(n.value), + href: a.href, + onClick: d }, [ - Z(i.$slots, "default") - ], 10, Wa) + U(a.$slots, "default") + ], 10, yr) ]), _: 3 - }, 8, ["to"])) : (a(), u("button", Le({ + }, 8, ["to"])) : (o(), i("button", Te({ key: 1, - type: e.type, - class: o(n) - }, i.$attrs), [ - Z(i.$slots, "default") - ], 16, Ja)); + type: a.type, + class: n.value + }, a.$attrs), [ + U(a.$slots, "default") + ], 16, br)); }; } -}), Ya = ["type", "href", "onClick"], ei = ["type"], ti = /* @__PURE__ */ ue({ +}), kr = ["type", "href", "onClick"], _r = ["type"], sn = "inline-flex justify-center rounded-md border border-gray-300 py-2 px-4 text-sm font-medium shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-400 dark:hover:text-white hover:bg-gray-50 dark:hover:bg-gray-700 focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:ring-offset-black", $r = /* @__PURE__ */ de({ __name: "SecondaryButton", props: { - type: null, - href: null + type: {}, + href: {} }, setup(e) { - const t = "inline-flex justify-center rounded-md border border-gray-300 py-2 px-4 text-sm font-medium shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-400 dark:hover:text-white hover:bg-gray-50 dark:hover:bg-gray-700 focus:ring-indigo-500 dark:focus:ring-indigo-600 dark:ring-offset-black"; - return (l, n) => { - const i = X("router-link"); - return e.href ? (a(), se(i, { + return (t, s) => { + const n = Z("router-link"); + return t.href ? (o(), ae(n, { key: 0, - to: e.href + to: t.href }, { - default: ke(({ navigate: r }) => [ - s("button", { - type: e.type ?? "button", - class: w(t), - href: e.href, - onClick: r + default: xe(({ navigate: a }) => [ + l("button", { + type: t.type ?? "button", + class: y(sn), + href: t.href, + onClick: a }, [ - Z(l.$slots, "default") - ], 8, Ya) + U(t.$slots, "default") + ], 8, kr) ]), _: 3 - }, 8, ["to"])) : (a(), u("button", Le({ + }, 8, ["to"])) : (o(), i("button", Te({ key: 1, - type: e.type ?? "button", - class: t - }, l.$attrs), [ - Z(l.$slots, "default") - ], 16, ei)); + type: t.type ?? "button", + class: sn + }, t.$attrs), [ + U(t.$slots, "default") + ], 16, _r)); }; } }); function Ge(e, t) { return Array.isArray(e) ? e.indexOf(t) >= 0 : e == t || e.includes(t); } -const bl = { +const Cs = { blue: "text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-200", purple: "text-purple-600 dark:text-purple-400 hover:text-purple-800 dark:hover:text-purple-200", red: "text-red-700 dark:text-red-400 hover:text-red-900 dark:hover:text-red-200", @@ -1641,37 +1724,37 @@ const bl = { sky: "text-sky-600 dark:text-sky-400 hover:text-sky-800 dark:hover:text-sky-200", cyan: "text-cyan-600 dark:text-cyan-400 hover:text-cyan-800 dark:hover:text-cyan-200", indigo: "text-indigo-600 dark:text-indigo-400 hover:text-indigo-800 dark:hover:text-indigo-200" -}, lt = { +}, ot = { base: "block w-full sm:text-sm rounded-md dark:text-white dark:bg-gray-900 disabled:bg-slate-50 disabled:text-slate-500 disabled:border-slate-200 disabled:shadow-none", invalid: "pr-10 border-red-300 text-red-900 placeholder-red-300 focus:outline-none focus:ring-red-500 focus:border-red-500", valid: "shadow-sm focus:ring-indigo-500 focus:border-indigo-500 border-gray-300 dark:border-gray-600" -}, Ut = { +}, Gt = { panelClass: "shadow sm:rounded-md", formClass: "space-y-6 bg-white dark:bg-black py-6 px-4 sm:p-6", headingClass: "text-lg font-medium leading-6 text-gray-900 dark:text-gray-100", subHeadingClass: "mt-1 text-sm text-gray-500 dark:text-gray-400" -}, Tt = { +}, Bt = { panelClass: "pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg", formClass: "flex h-full flex-col divide-y divide-gray-200 dark:divide-gray-700 shadow-xl bg-white dark:bg-black", titlebarClass: "bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6", headingClass: "text-lg font-medium text-gray-900 dark:text-gray-100", subHeadingClass: "mt-1 text-sm text-gray-500 dark:text-gray-400", closeButtonClass: "rounded-md bg-gray-50 dark:bg-gray-900 text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:ring-offset-black" -}, Wl = { +}, ll = { modalClass: "relative transform overflow-hidden rounded-lg bg-white dark:bg-black text-left shadow-xl transition-all sm:my-8", sizeClass: "sm:max-w-prose lg:max-w-screen-md xl:max-w-screen-lg 2xl:max-w-screen-xl sm:w-full" -}, Ze = { +}, Ee = { panelClass(e = "slideOver") { - return e == "card" ? Ut.panelClass : Tt.panelClass; + return e == "card" ? Gt.panelClass : Bt.panelClass; }, formClass(e = "slideOver") { - return e == "card" ? Ut.formClass : Tt.formClass; + return e == "card" ? Gt.formClass : Bt.formClass; }, headingClass(e = "slideOver") { - return e == "card" ? Ut.headingClass : Tt.headingClass; + return e == "card" ? Gt.headingClass : Bt.headingClass; }, subHeadingClass(e = "slideOver") { - return e == "card" ? Ut.subHeadingClass : Tt.subHeadingClass; + return e == "card" ? Gt.subHeadingClass : Bt.subHeadingClass; }, buttonsClass: "mt-4 px-4 py-3 bg-gray-50 dark:bg-gray-900 sm:px-6 flex flex-wrap justify-between", legendClass: "text-base font-medium text-gray-900 dark:text-gray-100 text-center mb-4" @@ -1703,8 +1786,8 @@ const bl = { getTbodyClass(e = "stripedRows") { return (Ge(e, "whiteBackground") || Ge(e, "verticalLines") ? "divide-y divide-gray-200 dark:divide-gray-800" : he.tableClass) + (Ge(e, "verticalLines") ? " bg-white" : ""); }, - getTableRowClass(e = "stripedRows", t, l, n) { - return (n ? "cursor-pointer " : "") + (l ? "bg-indigo-100 dark:bg-blue-800" : (n ? "hover:bg-yellow-50 dark:hover:bg-blue-900 " : "") + (Ge(e, "stripedRows") ? t % 2 == 0 ? "bg-white dark:bg-black" : "bg-gray-50 dark:bg-gray-800" : "bg-white dark:bg-black")) + (Ge(e, "verticalLines") ? " divide-x divide-gray-200 dark:divide-gray-700" : ""); + getTableRowClass(e = "stripedRows", t, s, n) { + return (n ? "cursor-pointer " : "") + (s ? "bg-indigo-100 dark:bg-blue-800" : (n ? "hover:bg-yellow-50 dark:hover:bg-blue-900 " : "") + (Ge(e, "stripedRows") ? t % 2 == 0 ? "bg-white dark:bg-black" : "bg-gray-50 dark:bg-gray-800" : "bg-white dark:bg-black")) + (Ge(e, "verticalLines") ? " divide-x divide-gray-200 dark:divide-gray-700" : ""); }, gridClass: "flex flex-col", //original -margins + padding forces scroll bars when parent is w-full for no clear benefits? @@ -1719,514 +1802,516 @@ const bl = { theadRowClass: "select-none", theadCellClass: "px-6 py-4 text-left text-sm font-medium tracking-wider whitespace-nowrap", toolbarButtonClass: "inline-flex items-center px-2.5 py-1.5 border border-gray-300 dark:border-gray-700 shadow-sm text-sm font-medium rounded text-gray-700 dark:text-gray-300 bg-white dark:bg-black hover:bg-gray-50 dark:hover:bg-gray-900 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black" -}, li = { +}, Cr = { colspans: "col-span-3 sm:col-span-3" -}, bh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ +}, fh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, - a: bl, - card: Ut, - dummy: li, - form: Ze, + a: Cs, + card: Gt, + dummy: Cr, + form: Ee, grid: he, - input: lt, - modal: Wl, - slideOver: Tt -}, Symbol.toStringTag, { value: "Module" })), ni = /* @__PURE__ */ ue({ + input: ot, + modal: ll, + slideOver: Bt +}, Symbol.toStringTag, { value: "Module" })), xr = /* @__PURE__ */ de({ __name: "TextLink", props: { color: { default: "blue" } }, setup(e) { - const t = e, l = to(), n = f(() => (bl[t.color] || bl.blue) + (l.href ? "" : " cursor-pointer")); - return (i, r) => (a(), u("a", { - class: w(o(n)) + const t = yo(), s = e, n = v(() => (Cs[s.color] || Cs.blue) + (t.href ? "" : " cursor-pointer")); + return (a, r) => (o(), i("a", { + class: y(n.value) }, [ - Z(i.$slots, "default") + U(a.$slots, "default") ], 2)); } -}), si = { +}), Lr = { class: "flex", "aria-label": "Breadcrumb" -}, oi = { +}, Vr = { role: "list", class: "flex items-center space-x-4" -}, ai = ["href", "title"], ii = /* @__PURE__ */ s("svg", { +}, Sr = ["href", "title"], Mr = /* @__PURE__ */ l("svg", { class: "h-6 w-6 flex-shrink-0", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M9.293 2.293a1 1 0 011.414 0l7 7A1 1 0 0117 11h-1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-3a1 1 0 00-1-1H9a1 1 0 00-1 1v3a1 1 0 01-1 1H5a1 1 0 01-1-1v-6H3a1 1 0 01-.707-1.707l7-7z", "clip-rule": "evenodd" }) -], -1), ri = { class: "sr-only" }, ui = /* @__PURE__ */ ue({ +], -1), Ar = { class: "sr-only" }, Tr = /* @__PURE__ */ de({ __name: "Breadcrumbs", props: { homeHref: { default: "/" }, homeLabel: { default: "Home" } }, setup(e) { - return (t, l) => (a(), u("nav", si, [ - s("ol", oi, [ - s("li", null, [ - s("div", null, [ - s("a", { - href: e.homeHref, + return (t, s) => (o(), i("nav", Lr, [ + l("ol", Vr, [ + l("li", null, [ + l("div", null, [ + l("a", { + href: t.homeHref, class: "text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400", - title: e.homeLabel + title: t.homeLabel }, [ - ii, - s("span", ri, A(e.homeLabel), 1) - ], 8, ai) + Mr, + l("span", Ar, F(t.homeLabel), 1) + ], 8, Sr) ]) ]), - Z(t.$slots, "default") + U(t.$slots, "default") ]) ])); } -}), di = { class: "flex items-center" }, ci = /* @__PURE__ */ s("svg", { +}), Fr = { class: "flex items-center" }, Ir = /* @__PURE__ */ l("svg", { class: "h-6 w-6 flex-shrink-0 text-gray-400 dark:text-gray-500", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z", "clip-rule": "evenodd" }) -], -1), fi = ["href", "title"], mi = ["title"], vi = /* @__PURE__ */ ue({ +], -1), jr = ["href", "title"], Or = ["title"], Dr = /* @__PURE__ */ de({ __name: "Breadcrumb", props: { - href: null, - title: null + href: {}, + title: {} }, setup(e) { - return (t, l) => (a(), u("li", null, [ - s("div", di, [ - ci, - e.href ? (a(), u("a", { + return (t, s) => (o(), i("li", null, [ + l("div", Fr, [ + Ir, + t.href ? (o(), i("a", { key: 0, - href: e.href, + href: t.href, class: "ml-4 text-lg font-medium text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300", - title: e.title + title: t.title }, [ - Z(t.$slots, "default") - ], 8, fi)) : (a(), u("span", { + U(t.$slots, "default") + ], 8, jr)) : (o(), i("span", { key: 1, class: "ml-4 text-lg font-medium text-gray-700 dark:text-gray-300", - title: e.title + title: t.title }, [ - Z(t.$slots, "default") - ], 8, mi)) + U(t.$slots, "default") + ], 8, Or)) ]) ])); } -}), hi = { +}), Pr = { key: 0, class: "text-base font-semibold text-gray-500 dark:text-gray-400" -}, gi = { +}, Br = { role: "list", class: "mt-4 divide-y divide-gray-200 dark:divide-gray-800 border-t border-b border-gray-200 dark:border-gray-800" -}, pi = /* @__PURE__ */ ue({ +}, Hr = /* @__PURE__ */ de({ __name: "NavList", props: { - title: null + title: {} }, setup(e) { - return (t, l) => (a(), u("div", null, [ - e.title ? (a(), u("h2", hi, A(e.title), 1)) : k("", !0), - s("ul", gi, [ - Z(t.$slots, "default") + return (t, s) => (o(), i("div", null, [ + t.title ? (o(), i("h2", Pr, F(t.title), 1)) : x("", !0), + l("ul", Br, [ + U(t.$slots, "default") ]) ])); } -}), yi = { class: "relative flex items-start space-x-4 py-6" }, bi = { class: "flex-shrink-0" }, wi = { class: "flex h-12 w-12 items-center justify-center rounded-lg bg-indigo-50 dark:bg-indigo-900" }, xi = { class: "min-w-0 flex-1" }, ki = { class: "text-base font-medium text-gray-900 dark:text-gray-100" }, $i = { class: "rounded-sm focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2" }, Ci = ["href"], _i = /* @__PURE__ */ s("span", { +}), Rr = { class: "relative flex items-start space-x-4 py-6" }, Er = { class: "flex-shrink-0" }, zr = { class: "flex h-12 w-12 items-center justify-center rounded-lg bg-indigo-50 dark:bg-indigo-900" }, Nr = { class: "min-w-0 flex-1" }, Ur = { class: "text-base font-medium text-gray-900 dark:text-gray-100" }, qr = { class: "rounded-sm focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2" }, Qr = ["href"], Kr = /* @__PURE__ */ l("span", { class: "absolute inset-0", "aria-hidden": "true" -}, null, -1), Li = { class: "text-base text-gray-500" }, Vi = /* @__PURE__ */ s("div", { class: "flex-shrink-0 self-center" }, [ - /* @__PURE__ */ s("svg", { +}, null, -1), Zr = { class: "text-base text-gray-500" }, Wr = /* @__PURE__ */ l("div", { class: "flex-shrink-0 self-center" }, [ + /* @__PURE__ */ l("svg", { class: "h-5 w-5 text-gray-400", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z", "clip-rule": "evenodd" }) ]) -], -1), Si = /* @__PURE__ */ ue({ +], -1), Gr = /* @__PURE__ */ de({ __name: "NavListItem", props: { - title: null, - href: null, - icon: null, - iconSvg: null, - iconSrc: null, - iconAlt: null + title: {}, + href: {}, + icon: {}, + iconSvg: {}, + iconSrc: {}, + iconAlt: {} }, setup(e) { - return (t, l) => { - const n = X("Icon"); - return a(), u("li", yi, [ - s("div", bi, [ - s("span", wi, [ - $e(n, { + return (t, s) => { + const n = Z("Icon"); + return o(), i("li", Rr, [ + l("div", Er, [ + l("span", zr, [ + ye(n, { class: "w-6 h-6 text-indigo-700 dark:text-indigo-300", - image: e.icon, - src: e.iconSrc, - svg: e.iconSvg, - alt: e.iconAlt + image: t.icon, + src: t.iconSrc, + svg: t.iconSvg, + alt: t.iconAlt }, null, 8, ["image", "src", "svg", "alt"]) ]) ]), - s("div", xi, [ - s("h3", ki, [ - s("span", $i, [ - s("a", { - href: e.href, + l("div", Nr, [ + l("h3", Ur, [ + l("span", qr, [ + l("a", { + href: t.href, class: "focus:outline-none" }, [ - _i, - xe(" " + A(e.title), 1) - ], 8, Ci) + Kr, + ke(" " + F(t.title), 1) + ], 8, Qr) ]) ]), - s("p", Li, [ - Z(t.$slots, "default") + l("p", Zr, [ + U(t.$slots, "default") ]) ]), - Vi + Wr ]); }; } }); -function Mi(e) { - ie.user.value = e, ie.events.publish("signIn", e); +function to(e) { + return e && e.SessionId ? Oo(e) : e; } -function Ai() { - ie.user.value = null, ie.events.publish("signOut", null); +function Jr(e) { + G.user.value = to(e), G.events.publish("signIn", e); } -function Hs(e) { - var t; - return (((t = ie.user.value) == null ? void 0 : t.roles) || []).indexOf(e) >= 0; +function Xr() { + G.user.value = null, G.events.publish("signOut", null); } -function Ti(e) { - var t; - return (((t = ie.user.value) == null ? void 0 : t.permissions) || []).indexOf(e) >= 0; +const Sl = (e) => (e == null ? void 0 : e.roles) || [], Ml = (e) => (e == null ? void 0 : e.permissions) || []; +function so(e) { + return Sl(G.user.value).indexOf(e) >= 0; } -function xn() { - return Hs("Admin"); +function Yr(e) { + return Ml(G.user.value).indexOf(e) >= 0; } -function vl(e) { +function Al() { + return so("Admin"); +} +function bs(e) { if (!e) return !1; if (!e.requiresAuth) return !0; - const t = ie.user.value; + const t = G.user.value; if (!t) return !1; - if (xn()) + if (Al()) return !0; - let [l, n] = [t.roles || [], t.permissions || []], [i, r, d, c] = [ + let [s, n] = [Sl(t), Ml(t)], [a, r, u, d] = [ e.requiredRoles || [], e.requiredPermissions || [], e.requiresAnyRole || [], e.requiresAnyPermission || [] ]; - return !(!i.every((m) => l.indexOf(m) >= 0) || d.length > 0 && !d.some((m) => l.indexOf(m) >= 0) || !r.every((m) => n.indexOf(m) >= 0) || c.length > 0 && !c.every((m) => n.indexOf(m) >= 0)); + return !(!a.every((c) => s.indexOf(c) >= 0) || u.length > 0 && !u.some((c) => s.indexOf(c) >= 0) || !r.every((c) => n.indexOf(c) >= 0) || d.length > 0 && !d.every((c) => n.indexOf(c) >= 0)); } -function Fi(e) { +function ei(e) { if (!e || !e.requiresAuth) return null; - const t = ie.user.value; + const t = G.user.value; if (!t) return `${e.request.name} requires Authentication`; - if (xn()) + if (Al()) return null; - let [l, n] = [t.roles || [], t.permissions || []], [i, r, d, c] = [ + let [s, n] = [Sl(t), Ml(t)], [a, r, u, d] = [ e.requiredRoles || [], e.requiredPermissions || [], e.requiresAnyRole || [], e.requiresAnyPermission || [] - ], m = i.filter((y) => l.indexOf(y) < 0); - if (m.length > 0) - return `Requires ${m.map((y) => "" + y + "").join(", ")} Role` + (m.length > 1 ? "s" : ""); - let h = r.filter((y) => n.indexOf(y) < 0); - return h.length > 0 ? `Requires ${h.map((y) => "" + y + "").join(", ")} Permission` + (h.length > 1 ? "s" : "") : d.length > 0 && !d.some((y) => l.indexOf(y) >= 0) ? `Requires any ${d.filter((y) => l.indexOf(y) < 0).map((y) => "" + y + "").join(", ")} Role` + (m.length > 1 ? "s" : "") : c.length > 0 && !c.every((y) => n.indexOf(y) >= 0) ? `Requires any ${c.filter((y) => n.indexOf(y) < 0).map((y) => "" + y + "").join(", ")} Permission` + (h.length > 1 ? "s" : "") : null; + ], c = a.filter((p) => s.indexOf(p) < 0); + if (c.length > 0) + return `Requires ${c.map((p) => "" + p + "").join(", ")} Role` + (c.length > 1 ? "s" : ""); + let f = r.filter((p) => n.indexOf(p) < 0); + return f.length > 0 ? `Requires ${f.map((p) => "" + p + "").join(", ")} Permission` + (f.length > 1 ? "s" : "") : u.length > 0 && !u.some((p) => s.indexOf(p) >= 0) ? `Requires any ${u.filter((p) => s.indexOf(p) < 0).map((p) => "" + p + "").join(", ")} Role` + (c.length > 1 ? "s" : "") : d.length > 0 && !d.every((p) => n.indexOf(p) >= 0) ? `Requires any ${d.filter((p) => n.indexOf(p) < 0).map((p) => "" + p + "").join(", ")} Permission` + (f.length > 1 ? "s" : "") : null; } -function kn() { - const e = f(() => ie.user.value || null), t = f(() => ie.user.value != null); - return { signIn: Mi, signOut: Ai, user: e, isAuthenticated: t, hasRole: Hs, hasPermission: Ti, isAdmin: xn, canAccess: vl, invalidAccessMessage: Fi }; +function Tl() { + const e = v(() => G.user.value || null), t = v(() => G.user.value != null); + return { signIn: Jr, signOut: Xr, user: e, toAuth: to, isAuthenticated: t, hasRole: so, hasPermission: Yr, isAdmin: Al, canAccess: bs, invalidAccessMessage: ei }; } -const Ii = { key: 0 }, Di = { class: "md:p-4" }, Es = /* @__PURE__ */ ue({ +const ti = { key: 0 }, si = { class: "md:p-4" }, lo = /* @__PURE__ */ de({ __name: "EnsureAccess", props: { - invalidAccess: null, - alertClass: null + invalidAccess: {}, + alertClass: {} }, emits: ["done"], setup(e) { - const { isAuthenticated: t } = kn(), { config: l } = St(), n = () => { + const { isAuthenticated: t } = Tl(), { config: s } = It(), n = () => { let r = location.href.substring(location.origin.length) || "/"; - const d = Kt(l.value.redirectSignIn, { redirect: r }); - l.value.navigate(d); - }, i = () => { + const u = Et(s.value.redirectSignIn, { redirect: r }); + s.value.navigate(u); + }, a = () => { let r = location.href.substring(location.origin.length) || "/"; - const d = Kt(l.value.redirectSignOut, { ReturnUrl: r }); - l.value.navigate(d); + const u = Et(s.value.redirectSignOut, { ReturnUrl: r }); + s.value.navigate(u); }; - return (r, d) => { - const c = X("Alert"), m = X("SecondaryButton"); - return e.invalidAccess ? (a(), u("div", Ii, [ - $e(c, { - class: w(e.alertClass), - innerHTML: e.invalidAccess + return (r, u) => { + const d = Z("Alert"), c = Z("SecondaryButton"); + return r.invalidAccess ? (o(), i("div", ti, [ + ye(d, { + class: y(r.alertClass), + innerHTML: r.invalidAccess }, null, 8, ["class", "innerHTML"]), - s("div", Di, [ - o(t) ? (a(), se(m, { + l("div", si, [ + X(t) ? (o(), ae(c, { key: 1, - onClick: i + onClick: a }, { - default: ke(() => [ - xe("Sign Out") + default: xe(() => [ + ke("Sign Out") ]), _: 1 - })) : (a(), se(m, { + })) : (o(), ae(c, { key: 0, onClick: n }, { - default: ke(() => [ - xe("Sign In") + default: xe(() => [ + ke("Sign In") ]), _: 1 })) ]) - ])) : k("", !0); + ])) : x("", !0); }; } -}), Oi = { class: "absolute top-0 right-0 bg-white dark:bg-black border dark:border-gray-800 rounded normal-case text-sm shadow w-80" }, ji = { class: "p-4" }, Pi = /* @__PURE__ */ s("h3", { class: "text-base font-medium mb-3 dark:text-gray-100" }, "Sort", -1), Bi = { class: "flex w-full justify-center" }, Ri = /* @__PURE__ */ s("svg", { +}), li = { class: "absolute top-0 right-0 bg-white dark:bg-black border dark:border-gray-800 rounded normal-case text-sm shadow w-80" }, ni = { class: "p-4" }, oi = /* @__PURE__ */ l("h3", { class: "text-base font-medium mb-3 dark:text-gray-100" }, "Sort", -1), ai = { class: "flex w-full justify-center" }, ri = /* @__PURE__ */ l("svg", { class: "w-6 h-6", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16" }, [ - /* @__PURE__ */ s("g", { fill: "currentColor" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("g", { fill: "currentColor" }, [ + /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M10.082 5.629L9.664 7H8.598l1.789-5.332h1.234L13.402 7h-1.12l-.419-1.371h-1.781zm1.57-.785L11 2.687h-.047l-.652 2.157h1.351z" }), - /* @__PURE__ */ s("path", { d: "M12.96 14H9.028v-.691l2.579-3.72v-.054H9.098v-.867h3.785v.691l-2.567 3.72v.054h2.645V14zm-8.46-.5a.5.5 0 0 1-1 0V3.707L2.354 4.854a.5.5 0 1 1-.708-.708l2-1.999l.007-.007a.498.498 0 0 1 .7.006l2 2a.5.5 0 1 1-.707.708L4.5 3.707V13.5z" }) + /* @__PURE__ */ l("path", { d: "M12.96 14H9.028v-.691l2.579-3.72v-.054H9.098v-.867h3.785v.691l-2.567 3.72v.054h2.645V14zm-8.46-.5a.5.5 0 0 1-1 0V3.707L2.354 4.854a.5.5 0 1 1-.708-.708l2-1.999l.007-.007a.498.498 0 0 1 .7.006l2 2a.5.5 0 1 1-.707.708L4.5 3.707V13.5z" }) ]) -], -1), Hi = /* @__PURE__ */ s("span", null, "ASC", -1), Ei = [ - Ri, - Hi -], zi = /* @__PURE__ */ wl('DESC', 2), Ni = [ - zi -], Ui = /* @__PURE__ */ s("h3", { class: "text-base font-medium mt-4 mb-2" }, " Filter ", -1), qi = { key: 0 }, Qi = ["id", "value"], Ki = ["for"], Zi = { key: 1 }, Gi = { class: "mb-2" }, Wi = { class: "inline-flex rounded-full items-center py-0.5 pl-2.5 pr-1 text-sm font-medium bg-indigo-100 text-indigo-700" }, Ji = ["onClick"], Xi = /* @__PURE__ */ s("svg", { +], -1), ii = /* @__PURE__ */ l("span", null, "ASC", -1), ui = [ + ri, + ii +], di = /* @__PURE__ */ xs('DESC', 2), ci = [ + di +], fi = /* @__PURE__ */ l("h3", { class: "text-base font-medium mt-4 mb-2" }, " Filter ", -1), vi = { key: 0 }, pi = ["id", "value"], mi = ["for"], hi = { key: 1 }, gi = { class: "mb-2" }, yi = { class: "inline-flex rounded-full items-center py-0.5 pl-2.5 pr-1 text-sm font-medium bg-indigo-100 text-indigo-700" }, bi = ["onClick"], wi = /* @__PURE__ */ l("svg", { class: "h-2 w-2", stroke: "currentColor", fill: "none", viewBox: "0 0 8 8" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "stroke-linecap": "round", "stroke-width": "1.5", d: "M1 1l6 6m0-6L1 7" }) -], -1), Yi = [ - Xi -], er = { class: "flex" }, tr = /* @__PURE__ */ s("svg", { +], -1), ki = [ + wi +], _i = { class: "flex" }, $i = /* @__PURE__ */ l("svg", { class: "h-6 w-6", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z", "clip-rule": "evenodd" }) -], -1), lr = [ - tr -], nr = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse" }, $n = /* @__PURE__ */ ue({ +], -1), Ci = [ + $i +], xi = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse" }, Fl = /* @__PURE__ */ de({ __name: "FilterColumn", props: { - definitions: null, - column: null, - topLeft: null + definitions: {}, + column: {}, + topLeft: {} }, emits: ["done", "save"], setup(e, { emit: t }) { - const l = e, n = M(), i = M(""), r = M(""), d = M([]), c = f(() => l.column.meta.isEnum == !0), m = f(() => st(l.column.meta.type === "Nullable`1" ? l.column.meta.genericArgs[0] : l.column.meta.type)), h = f(() => l.column.meta.isEnum == !0 ? hn(ps(m.value.name)) : []), y = f(() => { - var j; - return ((j = v(l.column.type)) == null ? void 0 : j.map((L) => ({ key: L.value, value: L.name }))) || []; - }), b = M({ filters: [] }), p = f(() => b.value.filters); - hl(() => b.value = Object.assign({}, l.column.settings, { - filters: Array.from(l.column.settings.filters) - })), hl(() => { - var L, q, D, K, ne; - let j = ((D = (q = (L = l.column.settings.filters) == null ? void 0 : L[0]) == null ? void 0 : q.value) == null ? void 0 : D.split(",")) || []; - if (j.length > 0 && ((K = m.value) != null && K.isEnumInt)) { - const ee = parseInt(j[0]); - j = ((ne = m.value.enumValues) == null ? void 0 : ne.filter((te) => (ee & parseInt(te)) > 0)) || []; + const s = e, n = t, a = O(), r = O(""), u = O(""), d = O([]), c = v(() => s.column.meta.isEnum == !0), f = v(() => rt(s.column.meta.type === "Nullable`1" ? s.column.meta.genericArgs[0] : s.column.meta.type)), p = v(() => s.column.meta.isEnum == !0 ? _l(Fn(f.value.name)) : []), $ = v(() => { + var L; + return ((L = g(s.column.type)) == null ? void 0 : L.map((z) => ({ key: z.value, value: z.name }))) || []; + }), m = O({ filters: [] }), k = v(() => m.value.filters); + ws(() => m.value = Object.assign({}, s.column.settings, { + filters: Array.from(s.column.settings.filters) + })), ws(() => { + var z, K, le, R, W; + let L = ((le = (K = (z = s.column.settings.filters) == null ? void 0 : z[0]) == null ? void 0 : K.value) == null ? void 0 : le.split(",")) || []; + if (L.length > 0 && ((R = f.value) != null && R.isEnumInt)) { + const ee = parseInt(L[0]); + L = ((W = f.value.enumValues) == null ? void 0 : W.filter((q) => (ee & parseInt(q)) > 0)) || []; } - d.value = j; + d.value = L; }); - function v(j) { - let L = l.definitions; - return fs(j) || (L = L.filter((q) => q.types !== "string")), L; + function g(L) { + let z = s.definitions; + return Sn(L) || (z = z.filter((K) => K.types !== "string")), z; } - function g(j, L) { - return v(j).find((q) => q.value === L); + function b(L, z) { + return g(L).find((K) => K.value === z); } - function O() { - var L; - if (!i.value) + function P() { + var z; + if (!r.value) return; - let j = (L = g(l.column.type, i.value)) == null ? void 0 : L.name; - j && (b.value.filters.push({ key: i.value, name: j, value: r.value }), i.value = r.value = ""); - } - function U(j) { - b.value.filters.splice(j, 1); + let L = (z = b(s.column.type, r.value)) == null ? void 0 : z.name; + L && (m.value.filters.push({ key: r.value, name: L, value: u.value }), r.value = u.value = ""); } - function Y(j) { - return ks(g(l.column.type, j.key), l.column.type, j); + function I(L) { + m.value.filters.splice(L, 1); } - function R() { - t("done"); + function se(L) { + return Pn(b(s.column.type, L.key), s.column.type, L); } - function N() { - var j; - i.value = "%", (j = n.value) == null || j.focus(); + function j() { + n("done"); } function T() { - var j; - if (r.value && O(), c.value) { - let L = Object.values(d.value).filter((q) => q); - b.value.filters = L.length > 0 ? (j = m.value) != null && j.isEnumInt ? [{ key: "%HasAny", name: "HasAny", value: L.map((q) => parseInt(q)).reduce((q, D) => q + D, 0).toString() }] : [{ key: "%In", name: "In", value: L.join(",") }] : []; + var L; + r.value = "%", (L = a.value) == null || L.focus(); + } + function M() { + var L; + if (u.value && P(), c.value) { + let z = Object.values(d.value).filter((K) => K); + m.value.filters = z.length > 0 ? (L = f.value) != null && L.isEnumInt ? [{ key: "%HasAny", name: "HasAny", value: z.map((K) => parseInt(K)).reduce((K, le) => K + le, 0).toString() }] : [{ key: "%In", name: "In", value: z.join(",") }] : []; } - t("save", b.value), t("done"); + n("save", m.value), n("done"); } - function J(j) { - b.value.sort = j === b.value.sort ? void 0 : j, xt(T); + function ie(L) { + m.value.sort = L === m.value.sort ? void 0 : L, St(M); } - return (j, L) => { + return (L, z) => { var ee; - const q = X("SelectInput"), D = X("TextInput"), K = X("PrimaryButton"), ne = X("SecondaryButton"); - return a(), u("div", { + const K = Z("SelectInput"), le = Z("TextInput"), R = Z("PrimaryButton"), W = Z("SecondaryButton"); + return o(), i("div", { class: "fixed z-20 inset-0 overflow-y-auto", - onClick: R, - onVnodeMounted: N + onClick: j, + onVnodeMounted: T }, [ - s("div", { + l("div", { class: "absolute", - style: Jl(`top:${e.topLeft.y}px;left:${e.topLeft.x}px`), - onClick: L[5] || (L[5] = Ne(() => { + style: nl(`top:${L.topLeft.y}px;left:${L.topLeft.x}px`), + onClick: z[5] || (z[5] = Ue(() => { }, ["stop"])) }, [ - s("div", Oi, [ - s("div", ji, [ - Pi, - s("div", Bi, [ - s("button", { + l("div", li, [ + l("div", ni, [ + oi, + l("div", ai, [ + l("button", { type: "button", title: "Sort Ascending", - onClick: L[0] || (L[0] = (te) => J("ASC")), - class: w(`${b.value.sort === "ASC" ? "bg-indigo-100 border-indigo-500" : "bg-white hover:bg-gray-50 border-gray-300"} mr-1 inline-flex items-center px-2.5 py-1.5 border shadow-sm text-sm font-medium rounded text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500`) - }, Ei, 2), - s("button", { + onClick: z[0] || (z[0] = (q) => ie("ASC")), + class: y(`${m.value.sort === "ASC" ? "bg-indigo-100 border-indigo-500" : "bg-white hover:bg-gray-50 border-gray-300"} mr-1 inline-flex items-center px-2.5 py-1.5 border shadow-sm text-sm font-medium rounded text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500`) + }, ui, 2), + l("button", { type: "button", title: "Sort Descending", - onClick: L[1] || (L[1] = (te) => J("DESC")), - class: w(`${b.value.sort === "DESC" ? "bg-indigo-100 border-indigo-500" : "bg-white hover:bg-gray-50 border-gray-300"} ml-1 inline-flex items-center px-2.5 py-1.5 border shadow-sm text-sm font-medium rounded text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500`) - }, Ni, 2) + onClick: z[1] || (z[1] = (q) => ie("DESC")), + class: y(`${m.value.sort === "DESC" ? "bg-indigo-100 border-indigo-500" : "bg-white hover:bg-gray-50 border-gray-300"} ml-1 inline-flex items-center px-2.5 py-1.5 border shadow-sm text-sm font-medium rounded text-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500`) + }, ci, 2) ]), - Ui, - o(c) ? (a(), u("div", qi, [ - (a(!0), u(Te, null, Ie(o(h), (te) => (a(), u("div", { - key: te.key, + fi, + c.value ? (o(), i("div", vi, [ + (o(!0), i(Me, null, je(p.value, (q) => (o(), i("div", { + key: q.key, class: "flex items-center" }, [ - kt(s("input", { + Mt(l("input", { type: "checkbox", - id: te.key, - value: te.key, - "onUpdate:modelValue": L[2] || (L[2] = (S) => d.value = S), + id: q.key, + value: q.key, + "onUpdate:modelValue": z[2] || (z[2] = (A) => d.value = A), class: "h-4 w-4 border-gray-300 rounded text-indigo-600 focus:ring-indigo-500" - }, null, 8, Qi), [ - [Xl, d.value] + }, null, 8, pi), [ + [ol, d.value] ]), - s("label", { - for: te.key, + l("label", { + for: q.key, class: "ml-3" - }, A(te.value), 9, Ki) + }, F(q.value), 9, mi) ]))), 128)) - ])) : (a(), u("div", Zi, [ - (a(!0), u(Te, null, Ie(o(p), (te, S) => (a(), u("div", Gi, [ - s("span", Wi, [ - xe(A(e.column.name) + " " + A(te.name) + " " + A(Y(te)) + " ", 1), - s("button", { + ])) : (o(), i("div", hi, [ + (o(!0), i(Me, null, je(k.value, (q, A) => (o(), i("div", gi, [ + l("span", yi, [ + ke(F(L.column.name) + " " + F(q.name) + " " + F(se(q)) + " ", 1), + l("button", { type: "button", - onClick: (le) => U(S), + onClick: (te) => I(A), class: "flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center text-indigo-400 hover:bg-indigo-200 hover:text-indigo-500 focus:outline-none focus:bg-indigo-500 focus:text-white" - }, Yi, 8, Ji) + }, ki, 8, bi) ]) ]))), 256)), - s("div", er, [ - $e(q, { + l("div", _i, [ + ye(K, { id: "filterRule", class: "w-32 mr-1", - modelValue: i.value, - "onUpdate:modelValue": L[3] || (L[3] = (te) => i.value = te), - entries: o(y), + modelValue: r.value, + "onUpdate:modelValue": z[3] || (z[3] = (q) => r.value = q), + entries: $.value, label: "", placeholder: "" }, null, 8, ["modelValue", "entries"]), - ((ee = g(e.column.type, i.value)) == null ? void 0 : ee.valueType) !== "none" ? (a(), se(D, { + ((ee = b(L.column.type, r.value)) == null ? void 0 : ee.valueType) !== "none" ? (o(), ae(le, { key: 0, ref_key: "txtFilter", - ref: n, + ref: a, id: "filterValue", class: "w-32 mr-1", type: "text", - modelValue: r.value, - "onUpdate:modelValue": L[4] || (L[4] = (te) => r.value = te), - onKeyup: Qn(O, ["enter"]), + modelValue: u.value, + "onUpdate:modelValue": z[4] || (z[4] = (q) => u.value = q), + onKeyup: on(P, ["enter"]), label: "", placeholder: "" - }, null, 8, ["modelValue", "onKeyup"])) : k("", !0), - s("div", { class: "pt-1" }, [ - s("button", { + }, null, 8, ["modelValue"])) : x("", !0), + l("div", { class: "pt-1" }, [ + l("button", { type: "button", - onClick: O, + onClick: P, class: "inline-flex items-center p-1 border border-transparent rounded-full shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" - }, lr) + }, Ci) ]) ]) ])) ]), - s("div", nr, [ - $e(K, { - onClick: T, + l("div", xi, [ + ye(R, { + onClick: M, color: "red", class: "ml-2" }, { - default: ke(() => [ - xe(" Save ") + default: xe(() => [ + ke(" Save ") ]), _: 1 }), - $e(ne, { onClick: R }, { - default: ke(() => [ - xe(" Cancel ") + ye(W, { onClick: j }, { + default: xe(() => [ + ke(" Cancel ") ]), _: 1 }) @@ -2236,201 +2321,201 @@ const Ii = { key: 0 }, Di = { class: "md:p-4" }, Es = /* @__PURE__ */ ue({ ], 512); }; } -}), sr = { class: "px-4 sm:px-6 lg:px-8 text-sm" }, or = { class: "flex flex-wrap" }, ar = { class: "group pr-4 sm:pr-6 lg:pr-8" }, ir = { class: "flex justify-between w-full font-medium" }, rr = { class: "w-6 flex justify-end" }, ur = { class: "hidden group-hover:inline" }, dr = ["onClick", "title"], cr = /* @__PURE__ */ s("svg", { +}), Li = { class: "px-4 sm:px-6 lg:px-8 text-sm" }, Vi = { class: "flex flex-wrap" }, Si = { class: "group pr-4 sm:pr-6 lg:pr-8" }, Mi = { class: "flex justify-between w-full font-medium" }, Ai = { class: "w-6 flex justify-end" }, Ti = { class: "hidden group-hover:inline" }, Fi = ["onClick", "title"], Ii = /* @__PURE__ */ l("svg", { class: "h-2 w-2", stroke: "currentColor", fill: "none", viewBox: "0 0 8 8" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "stroke-linecap": "round", "stroke-width": "1.5", d: "M1 1l6 6m0-6L1 7" }) -], -1), fr = [ - cr -], mr = { +], -1), ji = [ + Ii +], Oi = { key: 0, class: "pt-2" -}, vr = { class: "ml-2" }, hr = { key: 1 }, gr = { class: "pt-2" }, pr = { class: "inline-flex rounded-full items-center py-0.5 pl-2.5 pr-1 text-sm font-medium bg-indigo-100 text-indigo-700" }, yr = ["onClick"], br = /* @__PURE__ */ s("svg", { +}, Di = { class: "ml-2" }, Pi = { key: 1 }, Bi = { class: "pt-2" }, Hi = { class: "inline-flex rounded-full items-center py-0.5 pl-2.5 pr-1 text-sm font-medium bg-indigo-100 text-indigo-700" }, Ri = ["onClick"], Ei = /* @__PURE__ */ l("svg", { class: "h-2 w-2", stroke: "currentColor", fill: "none", viewBox: "0 0 8 8" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "stroke-linecap": "round", "stroke-width": "1.5", d: "M1 1l6 6m0-6L1 7" }) -], -1), wr = [ - br -], xr = /* @__PURE__ */ s("span", null, "Clear All", -1), kr = [ - xr -], Cn = /* @__PURE__ */ ue({ +], -1), zi = [ + Ei +], Ni = /* @__PURE__ */ l("span", null, "Clear All", -1), Ui = [ + Ni +], Il = /* @__PURE__ */ de({ __name: "FilterViews", props: { - definitions: null, - columns: null + definitions: {}, + columns: {} }, emits: ["done", "change"], setup(e, { emit: t }) { - const l = e, n = f(() => l.columns.filter((b) => b.settings.filters.length > 0)); - function i(b) { - var p, v; - return (v = (p = b == null ? void 0 : b[0]) == null ? void 0 : p.value) == null ? void 0 : v.split(","); - } - function r(b) { - let p = l.definitions; - return fs(b) || (p = p.filter((v) => v.types !== "string")), p; - } - function d(b, p) { - return r(b).find((v) => v.value === p); - } - function c(b, p) { - return ks(d(b.type, p.value), b.type, p); - } - function m(b) { - b.settings.filters = [], t("change", b); - } - function h(b, p) { - b.settings.filters.splice(p, 1), t("change", b); - } - function y() { - l.columns.forEach((b) => { - b.settings.filters = [], t("change", b); - }), t("done"); - } - return (b, p) => (a(), u("div", sr, [ - s("div", or, [ - (a(!0), u(Te, null, Ie(o(n), (v) => (a(), u("fieldset", ar, [ - s("legend", ir, [ - s("span", null, A(o(Ee)(v.name)), 1), - s("span", rr, [ - s("span", ur, [ - s("button", { - onClick: (g) => m(v), - title: `Clear all ${o(Ee)(v.name)} filters`, + const s = e, n = t, a = v(() => s.columns.filter((m) => m.settings.filters.length > 0)); + function r(m) { + var k, g; + return (g = (k = m == null ? void 0 : m[0]) == null ? void 0 : k.value) == null ? void 0 : g.split(","); + } + function u(m) { + let k = s.definitions; + return Sn(m) || (k = k.filter((g) => g.types !== "string")), k; + } + function d(m, k) { + return u(m).find((g) => g.value === k); + } + function c(m, k) { + return Pn(d(m.type, k.value), m.type, k); + } + function f(m) { + m.settings.filters = [], n("change", m); + } + function p(m, k) { + m.settings.filters.splice(k, 1), n("change", m); + } + function $() { + s.columns.forEach((m) => { + m.settings.filters = [], n("change", m); + }), n("done"); + } + return (m, k) => (o(), i("div", Li, [ + l("div", Vi, [ + (o(!0), i(Me, null, je(a.value, (g) => (o(), i("fieldset", Si, [ + l("legend", Mi, [ + l("span", null, F(X(Pe)(g.name)), 1), + l("span", Ai, [ + l("span", Ti, [ + l("button", { + onClick: (b) => f(g), + title: `Clear all ${X(Pe)(g.name)} filters`, class: "flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center text-red-600 hover:bg-red-200 hover:text-red-500 focus:outline-none focus:bg-red-500 focus:text-white" - }, fr, 8, dr) + }, ji, 8, Fi) ]) ]) ]), - v.meta.isEnum ? (a(), u("div", mr, [ - (a(!0), u(Te, null, Ie(i(v.settings.filters), (g) => (a(), u("div", { - key: g, + g.meta.isEnum ? (o(), i("div", Oi, [ + (o(!0), i(Me, null, je(r(g.settings.filters), (b) => (o(), i("div", { + key: b, class: "flex items-center" }, [ - s("label", vr, A(g), 1) + l("label", Di, F(b), 1) ]))), 128)) - ])) : (a(), u("div", hr, [ - (a(!0), u(Te, null, Ie(v.settings.filters, (g, O) => (a(), u("div", gr, [ - s("span", pr, [ - xe(A(v.name) + " " + A(g.name) + " " + A(c(v, g)) + " ", 1), - s("button", { + ])) : (o(), i("div", Pi, [ + (o(!0), i(Me, null, je(g.settings.filters, (b, P) => (o(), i("div", Bi, [ + l("span", Hi, [ + ke(F(g.name) + " " + F(b.name) + " " + F(c(g, b)) + " ", 1), + l("button", { type: "button", - onClick: (U) => h(v, O), + onClick: (I) => p(g, P), class: "flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center text-indigo-400 hover:bg-indigo-200 hover:text-indigo-500 focus:outline-none focus:bg-indigo-500 focus:text-white" - }, wr, 8, yr) + }, zi, 8, Ri) ]) ]))), 256)) ])) ]))), 256)) ]), - s("div", { class: "flex justify-center pt-4" }, [ - s("button", { + l("div", { class: "flex justify-center pt-4" }, [ + l("button", { type: "button", - onClick: y, + onClick: $, class: "inline-flex items-center px-2.5 py-1.5 border border-gray-300 shadow-sm text-sm font-medium rounded text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" - }, kr) + }, Ui) ]) ])); } -}), $r = { class: "bg-white dark:bg-black px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, Cr = { class: "" }, _r = { class: "mt-3 text-center sm:mt-0 sm:mx-4 sm:text-left" }, Lr = /* @__PURE__ */ s("h3", { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-100" }, "Query Preferences", -1), Vr = { class: "mt-4" }, Sr = ["for"], Mr = ["id"], Ar = ["value", "selected"], Tr = { class: "mt-4 flex items-center py-4 border-b border-gray-200 dark:border-gray-800" }, Fr = ["id", "checked"], Ir = ["for"], Dr = { class: "mt-4" }, Or = { class: "pb-2 px-4" }, jr = { class: "" }, Pr = ["id", "value"], Br = ["for"], Rr = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse" }, _n = /* @__PURE__ */ ue({ +}), qi = { class: "bg-white dark:bg-black px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, Qi = { class: "" }, Ki = { class: "mt-3 text-center sm:mt-0 sm:mx-4 sm:text-left" }, Zi = /* @__PURE__ */ l("h3", { class: "text-lg leading-6 font-medium text-gray-900 dark:text-gray-100" }, "Query Preferences", -1), Wi = { class: "mt-4" }, Gi = ["for"], Ji = ["id"], Xi = ["value", "selected"], Yi = { class: "mt-4 flex items-center py-4 border-b border-gray-200 dark:border-gray-800" }, eu = ["id", "checked"], tu = ["for"], su = { class: "mt-4" }, lu = { class: "pb-2 px-4" }, nu = { class: "" }, ou = ["id", "value"], au = ["for"], ru = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse" }, jl = /* @__PURE__ */ de({ __name: "QueryPrefs", props: { id: { default: "QueryPrefs" }, - columns: null, - prefs: null, - maxLimit: null + columns: {}, + prefs: {}, + maxLimit: {} }, emits: ["done", "save"], setup(e, { emit: t }) { - const l = e, { autoQueryGridDefaults: n } = St(), i = M({}); - hl(() => i.value = Object.assign({ - take: n.value.take, + const { autoQueryGridDefaults: s } = It(), n = e, a = t, r = O({}); + ws(() => r.value = Object.assign({ + take: s.value.take, selectedColumns: [] - }, l.prefs)); - const r = [10, 25, 50, 100, 250, 500, 1e3]; + }, n.prefs)); + const u = [10, 25, 50, 100, 250, 500, 1e3]; function d() { - t("done"); + a("done"); } function c() { - t("save", i.value); + a("save", r.value); } - return (m, h) => { - const y = X("PrimaryButton"), b = X("SecondaryButton"), p = X("ModalDialog"); - return a(), se(p, { - id: e.id, + return (f, p) => { + const $ = Z("PrimaryButton"), m = Z("SecondaryButton"), k = Z("ModalDialog"); + return o(), ae(k, { + id: f.id, onDone: d, "size-class": "w-full sm:max-w-prose" }, { - default: ke(() => [ - s("div", $r, [ - s("div", Cr, [ - s("div", _r, [ - Lr, - s("div", Vr, [ - s("label", { - for: `${e.id}-take`, + default: xe(() => [ + l("div", qi, [ + l("div", Qi, [ + l("div", Ki, [ + Zi, + l("div", Wi, [ + l("label", { + for: `${f.id}-take`, class: "block text-sm font-medium text-gray-700 dark:text-gray-300" - }, "Results per page", 8, Sr), - kt(s("select", { - id: `${e.id}-take`, - "onUpdate:modelValue": h[0] || (h[0] = (v) => i.value.take = v), + }, "Results per page", 8, Gi), + Mt(l("select", { + id: `${f.id}-take`, + "onUpdate:modelValue": p[0] || (p[0] = (g) => r.value.take = g), class: "mt-1 block w-full pl-3 pr-10 py-2 text-base bg-white dark:bg-black border-gray-300 dark:border-gray-700 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md" }, [ - (a(!0), u(Te, null, Ie(r.filter((v) => l.maxLimit == null || v <= l.maxLimit), (v) => (a(), u("option", { - value: v, - selected: v === i.value.take - }, A(v), 9, Ar))), 256)) - ], 8, Mr), [ - [lo, i.value.take] + (o(!0), i(Me, null, je(u.filter((g) => n.maxLimit == null || g <= n.maxLimit), (g) => (o(), i("option", { + value: g, + selected: g === r.value.take + }, F(g), 9, Xi))), 256)) + ], 8, Ji), [ + [bo, r.value.take] ]) ]), - s("div", Tr, [ - s("input", { + l("div", Yi, [ + l("input", { type: "radio", - id: `${e.id}-allColumns`, - onClick: h[1] || (h[1] = (v) => i.value.selectedColumns = []), - checked: i.value.selectedColumns.length === 0, + id: `${f.id}-allColumns`, + onClick: p[1] || (p[1] = (g) => r.value.selectedColumns = []), + checked: r.value.selectedColumns.length === 0, class: "focus:ring-indigo-500 h-4 w-4 bg-white dark:bg-black text-indigo-600 dark:text-indigo-400 border-gray-300 dark:border-gray-700" - }, null, 8, Fr), - s("label", { + }, null, 8, eu), + l("label", { class: "ml-3 block text-gray-700 dark:text-gray-300", - for: `${e.id}-allColumns` - }, "View all columns", 8, Ir) + for: `${f.id}-allColumns` + }, "View all columns", 8, tu) ]), - s("div", Dr, [ - s("div", Or, [ - s("div", jr, [ - (a(!0), u(Te, null, Ie(e.columns, (v) => (a(), u("div", { - key: v.name, + l("div", su, [ + l("div", lu, [ + l("div", nu, [ + (o(!0), i(Me, null, je(f.columns, (g) => (o(), i("div", { + key: g.name, class: "flex items-center" }, [ - kt(s("input", { + Mt(l("input", { type: "checkbox", - id: v.name, - value: v.name, - "onUpdate:modelValue": h[2] || (h[2] = (g) => i.value.selectedColumns = g), + id: g.name, + value: g.name, + "onUpdate:modelValue": p[2] || (p[2] = (b) => r.value.selectedColumns = b), class: "h-4 w-4 bg-white dark:bg-black border-gray-300 dark:border-gray-700 rounded text-indigo-600 dark:text-indigo-400 focus:ring-indigo-500" - }, null, 8, Pr), [ - [Xl, i.value.selectedColumns] + }, null, 8, ou), [ + [ol, r.value.selectedColumns] ]), - s("label", { - for: v.name, + l("label", { + for: g.name, class: "ml-3" - }, A(v.name), 9, Br) + }, F(g.name), 9, au) ]))), 128)) ]) ]) @@ -2438,20 +2523,20 @@ const Ii = { key: 0 }, Di = { class: "md:p-4" }, Es = /* @__PURE__ */ ue({ ]) ]) ]), - s("div", Rr, [ - $e(y, { + l("div", ru, [ + ye($, { onClick: c, color: "red", class: "ml-2" }, { - default: ke(() => [ - xe(" Save ") + default: xe(() => [ + ke(" Save ") ]), _: 1 }), - $e(b, { onClick: d }, { - default: ke(() => [ - xe(" Cancel ") + ye(m, { onClick: d }, { + default: xe(() => [ + ke(" Cancel ") ]), _: 1 }) @@ -2461,81 +2546,81 @@ const Ii = { key: 0 }, Di = { class: "md:p-4" }, Es = /* @__PURE__ */ ue({ }, 8, ["id"]); }; } -}), Hr = { key: 0 }, Er = { key: 1 }, zr = { +}), iu = { key: 0 }, uu = { key: 1 }, du = { key: 2, class: "pt-1" -}, Nr = { key: 0 }, Ur = { key: 1 }, qr = { key: 3 }, Qr = { class: "pl-1 pt-1 flex flex-wrap" }, Kr = { class: "flex mt-1" }, Zr = ["title"], Gr = /* @__PURE__ */ s("svg", { +}, cu = { key: 0 }, fu = { key: 1 }, vu = { key: 2 }, pu = { key: 4 }, mu = { class: "pl-1 pt-1 flex flex-wrap" }, hu = { class: "flex mt-1" }, gu = ["title"], yu = /* @__PURE__ */ l("svg", { class: "w-8 h-8", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, [ - /* @__PURE__ */ s("g", { + /* @__PURE__ */ l("g", { "stroke-width": "1.5", fill: "none" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { d: "M9 3H3.6a.6.6 0 0 0-.6.6v16.8a.6.6 0 0 0 .6.6H9M9 3v18M9 3h6M9 21h6m0-18h5.4a.6.6 0 0 1 .6.6v16.8a.6.6 0 0 1-.6.6H15m0-18v18", stroke: "currentColor" }) ]) -], -1), Wr = [ - Gr -], Jr = ["disabled"], Xr = /* @__PURE__ */ s("svg", { +], -1), bu = [ + yu +], wu = ["disabled"], ku = /* @__PURE__ */ l("svg", { class: "w-8 h-8", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { d: "M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6l6 6zM6 6h2v12H6z", fill: "currentColor" }) -], -1), Yr = [ - Xr -], eu = ["disabled"], tu = /* @__PURE__ */ s("svg", { +], -1), _u = [ + ku +], $u = ["disabled"], Cu = /* @__PURE__ */ l("svg", { class: "w-8 h-8", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { d: "M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z", fill: "currentColor" }) -], -1), lu = [ - tu -], nu = ["disabled"], su = /* @__PURE__ */ s("svg", { +], -1), xu = [ + Cu +], Lu = ["disabled"], Vu = /* @__PURE__ */ l("svg", { class: "w-8 h-8", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { d: "M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z", fill: "currentColor" }) -], -1), ou = [ - su -], au = ["disabled"], iu = /* @__PURE__ */ s("svg", { +], -1), Su = [ + Vu +], Mu = ["disabled"], Au = /* @__PURE__ */ l("svg", { class: "w-8 h-8", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { d: "M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6l-6-6zM16 6h2v12h-2z", fill: "currentColor" }) -], -1), ru = [ - iu -], uu = { +], -1), Tu = [ + Au +], Fu = { key: 0, class: "flex mt-1" -}, du = { class: "px-4 text-lg text-black dark:text-white" }, cu = { key: 0 }, fu = { key: 1 }, mu = /* @__PURE__ */ s("span", { class: "hidden xl:inline" }, " Showing Results ", -1), vu = { key: 2 }, hu = { class: "flex flex-wrap" }, gu = { +}, Iu = { class: "px-4 text-lg text-black dark:text-white" }, ju = { key: 0 }, Ou = { key: 1 }, Du = /* @__PURE__ */ l("span", { class: "hidden xl:inline" }, " Showing Results ", -1), Pu = { key: 2 }, Bu = { class: "flex flex-wrap" }, Hu = { key: 0, class: "pl-2 mt-1" -}, pu = /* @__PURE__ */ s("svg", { +}, Ru = /* @__PURE__ */ l("svg", { class: "w-5 h-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { fill: "none", stroke: "currentColor", "stroke-linecap": "round", @@ -2543,1921 +2628,1965 @@ const Ii = { key: 0 }, Di = { class: "md:p-4" }, Es = /* @__PURE__ */ ue({ "stroke-width": "2", d: "M20 20v-5h-5M4 4v5h5m10.938 2A8.001 8.001 0 0 0 5.07 8m-1.008 5a8.001 8.001 0 0 0 14.868 3" }) -], -1), yu = [ - pu -], bu = { +], -1), Eu = [ + Ru +], zu = { key: 1, class: "pl-2 mt-1" -}, wu = /* @__PURE__ */ wl('Excel', 2), xu = [ - wu -], ku = { +}, Nu = /* @__PURE__ */ xs('Excel', 2), Uu = [ + Nu +], qu = { key: 2, class: "pl-2 mt-1" -}, $u = { +}, Qu = { key: 0, class: "w-5 h-5 mr-1 text-green-600 dark:text-green-400", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" -}, Cu = /* @__PURE__ */ s("path", { +}, Ku = /* @__PURE__ */ l("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M5 13l4 4L19 7" -}, null, -1), _u = [ - Cu -], Lu = { +}, null, -1), Zu = [ + Ku +], Wu = { key: 1, class: "w-5 h-5 mr-1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, Vu = /* @__PURE__ */ s("g", { fill: "none" }, [ - /* @__PURE__ */ s("path", { +}, Gu = /* @__PURE__ */ l("g", { fill: "none" }, [ + /* @__PURE__ */ l("path", { d: "M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V7.242a2 2 0 0 0-.602-1.43L16.083 2.57A2 2 0 0 0 14.685 2H10a2 2 0 0 0-2 2z", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { d: "M16 18v2a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h2", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }) -], -1), Su = [ - Vu -], Mu = /* @__PURE__ */ s("span", { class: "whitespace-nowrap" }, "Copy URL", -1), Au = { +], -1), Ju = [ + Gu +], Xu = /* @__PURE__ */ l("span", { class: "whitespace-nowrap" }, "Copy URL", -1), Yu = { key: 3, class: "pl-2 mt-1" -}, Tu = /* @__PURE__ */ s("svg", { +}, ed = /* @__PURE__ */ l("svg", { class: "w-5 h-5", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", viewBox: "0 0 24 24" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { fill: "currentColor", d: "M6.78 2.72a.75.75 0 0 1 0 1.06L4.56 6h8.69a7.75 7.75 0 1 1-7.75 7.75a.75.75 0 0 1 1.5 0a6.25 6.25 0 1 0 6.25-6.25H4.56l2.22 2.22a.75.75 0 1 1-1.06 1.06l-3.5-3.5a.75.75 0 0 1 0-1.06l3.5-3.5a.75.75 0 0 1 1.06 0Z" }) -], -1), Fu = [ - Tu -], Iu = { +], -1), td = [ + ed +], sd = { key: 4, class: "pl-2 mt-1" -}, Du = /* @__PURE__ */ s("svg", { +}, ld = /* @__PURE__ */ l("svg", { class: "flex-none w-5 h-5 mr-2 text-gray-400 dark:text-gray-500 group-hover:text-gray-500", "aria-hidden": "true", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M3 3a1 1 0 011-1h12a1 1 0 011 1v3a1 1 0 01-.293.707L12 11.414V15a1 1 0 01-.293.707l-2 2A1 1 0 018 17v-5.586L3.293 6.707A1 1 0 013 6V3z", "clip-rule": "evenodd" }) -], -1), Ou = { class: "mr-1" }, ju = { +], -1), nd = { class: "mr-1" }, od = { key: 0, class: "h-5 w-5 text-gray-400 dark:text-gray-500 group-hover:text-gray-500", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" -}, Pu = /* @__PURE__ */ s("path", { +}, ad = /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z", "clip-rule": "evenodd" -}, null, -1), Bu = [ - Pu -], Ru = { +}, null, -1), rd = [ + ad +], id = { key: 1, class: "h-5 w-5 text-gray-400 dark:text-gray-500 group-hover:text-gray-500", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" -}, Hu = /* @__PURE__ */ s("path", { +}, ud = /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M5 10a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1z", "clip-rule": "evenodd" -}, null, -1), Eu = [ - Hu -], zu = { +}, null, -1), dd = [ + ud +], cd = { key: 5, class: "pl-2 mt-1" -}, Nu = ["title"], Uu = /* @__PURE__ */ s("svg", { +}, fd = ["title"], vd = /* @__PURE__ */ l("svg", { class: "w-5 h-5 mr-1 text-gray-500 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-50", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z", fill: "currentColor" }) -], -1), qu = { class: "whitespace-nowrap" }, Qu = { key: 7 }, Ku = { +], -1), pd = { class: "whitespace-nowrap" }, md = { key: 8 }, hd = { key: 0, class: "cursor-pointer flex justify-between items-center hover:text-gray-900 dark:hover:text-gray-50" -}, Zu = { class: "mr-1 select-none" }, Gu = { +}, gd = { class: "mr-1 select-none" }, yd = { key: 1, class: "flex justify-between items-center" -}, Wu = { class: "mr-1 select-none" }, Ju = /* @__PURE__ */ ue({ +}, bd = { class: "mr-1 select-none" }, ps = 25, wd = /* @__PURE__ */ de({ __name: "AutoQueryGrid", props: { - filterDefinitions: null, + filterDefinitions: {}, id: { default: "AutoQueryGrid" }, - apis: null, - type: null, - prefs: null, - deny: null, - hide: null, - selectedColumns: null, - toolbarButtonClass: null, - tableStyle: null, - gridClass: null, - grid2Class: null, - grid3Class: null, - grid4Class: null, - tableClass: null, - theadClass: null, - tbodyClass: null, - theadRowClass: null, - theadCellClass: null, - headerTitle: null, - headerTitles: null, - visibleFrom: null, - rowClass: null, - rowStyle: null, - apiPrefs: null, - canFilter: null, - disableKeyBindings: null, - configureField: null, + apis: {}, + type: {}, + prefs: {}, + deny: {}, + hide: {}, + selectedColumns: {}, + toolbarButtonClass: {}, + tableStyle: {}, + gridClass: {}, + grid2Class: {}, + grid3Class: {}, + grid4Class: {}, + tableClass: {}, + theadClass: {}, + tbodyClass: {}, + theadRowClass: {}, + theadCellClass: {}, + headerTitle: {}, + headerTitles: {}, + visibleFrom: {}, + rowClass: {}, + rowStyle: {}, + modelTitle: {}, + newButtonLabel: {}, + apiPrefs: {}, + canFilter: {}, + disableKeyBindings: {}, + configureField: {}, skip: { default: 0 }, create: { type: Boolean }, - edit: null, - filters: null + edit: {}, + filters: {} }, - emits: ["headerSelected", "rowSelected"], - setup(e, { expose: t, emit: l }) { - const n = e, { config: i, autoQueryGridDefaults: r } = St(), d = r, c = qe("client"), m = i.value.storage, h = "filtering,queryString,queryFilters".split(","), y = "copyApiUrl,downloadCsv,filtersView,newItem,pagingInfo,pagingNav,preferences,refresh,resetPreferences,toolbar".split(","), b = f(() => n.deny ? bt(h, n.deny) : bt(h, d.value.deny)), p = f(() => n.hide ? bt(y, n.hide) : bt(y, d.value.hide)); - function v($) { - return b.value[$]; - } - function g($) { - return p.value[$]; - } - const O = f(() => n.tableStyle ?? d.value.tableStyle), U = f(() => n.gridClass ?? he.getGridClass(O.value)), Y = f(() => n.grid2Class ?? he.getGrid2Class(O.value)), R = f(() => n.grid3Class ?? he.getGrid3Class(O.value)), N = f(() => n.grid4Class ?? he.getGrid4Class(O.value)), T = f(() => n.tableClass ?? he.getTableClass(O.value)), J = f(() => n.theadClass ?? he.getTheadClass(O.value)), j = f(() => n.theadRowClass ?? he.getTheadRowClass(O.value)), L = f(() => n.theadCellClass ?? he.getTheadCellClass(O.value)), q = f(() => n.toolbarButtonClass ?? he.toolbarButtonClass); - function D($, I) { - var Ae; - if (n.rowClass) - return n.rowClass($, I); - const ce = !!we.value.AnyUpdate, pe = ((Ae = ve.value) != null && Ae.name ? be($, ve.value.name) : null) == _.value; - return he.getTableRowClass(n.tableStyle, I, pe, ce); - } - const K = Yl(), ne = f(() => { - var $; - return Dl((($ = we.value.AnyQuery.viewModel) == null ? void 0 : $.name) || we.value.AnyQuery.dataModel.name); - }), ee = f(() => { - const $ = Object.keys(K).map((I) => I.toLowerCase()); - return Je(ne.value).filter((I) => $.includes(I.name.toLowerCase()) || $.includes(I.name.toLowerCase() + "-header")).map((I) => I.name); + emits: ["headerSelected", "rowSelected", "nav"], + setup(e, { expose: t, emit: s }) { + const { config: n, autoQueryGridDefaults: a } = It(), r = a, u = n.value.storage, d = e, c = s, f = Qe("client"), p = "filtering,queryString,queryFilters".split(","), $ = "copyApiUrl,downloadCsv,filtersView,newItem,pagingInfo,pagingNav,preferences,refresh,resetPreferences,toolbar".split(","), m = v(() => d.deny ? Vt(p, d.deny) : Vt(p, r.value.deny)), k = v(() => d.hide ? Vt($, d.hide) : Vt($, r.value.hide)); + function g(_) { + return m.value[_]; + } + function b(_) { + return k.value[_]; + } + const P = v(() => d.tableStyle ?? r.value.tableStyle), I = v(() => d.gridClass ?? he.getGridClass(P.value)), se = v(() => d.grid2Class ?? he.getGrid2Class(P.value)), j = v(() => d.grid3Class ?? he.getGrid3Class(P.value)), T = v(() => d.grid4Class ?? he.getGrid4Class(P.value)), M = v(() => d.tableClass ?? he.getTableClass(P.value)), ie = v(() => d.theadClass ?? he.getTheadClass(P.value)), L = v(() => d.theadRowClass ?? he.getTheadRowClass(P.value)), z = v(() => d.theadCellClass ?? he.getTheadCellClass(P.value)), K = v(() => d.toolbarButtonClass ?? he.toolbarButtonClass); + function le(_, B) { + var Ie; + if (d.rowClass) + return d.rowClass(_, B); + const ve = !!we.value.AnyUpdate, Ce = ((Ie = Ve.value) != null && Ie.name ? _e(_, Ve.value.name) : null) == Y.value; + return he.getTableRowClass(d.tableStyle, B, Ce, ve); + } + const R = al(), W = v(() => { + var _; + return Es(((_ = we.value.AnyQuery.viewModel) == null ? void 0 : _.name) || we.value.AnyQuery.dataModel.name); + }), ee = v(() => { + const _ = Object.keys(R).map((B) => B.toLowerCase()); + return st(W.value).filter((B) => _.includes(B.name.toLowerCase()) || _.includes(B.name.toLowerCase() + "-header")).map((B) => B.name); }); - function te() { - let $ = gt(n.selectedColumns); - return $.length > 0 ? $ : ee.value.length > 0 ? ee.value : []; - } - const S = f(() => { - let I = te().map((ae) => ae.toLowerCase()); - const ce = Je(ne.value); - return I.length > 0 ? I.map((ae) => ce.find((pe) => pe.name.toLowerCase() === ae)).filter((ae) => ae != null) : ce; - }), le = f(() => { - let $ = S.value.map((ce) => ce.name), I = gt(fe.value.selectedColumns).map((ce) => ce.toLowerCase()); - return I.length > 0 ? $.filter((ce) => I.includes(ce.toLowerCase())) : $; - }), x = M([]), W = M(new We()), E = M(new We()), G = M(), C = M(!1), _ = M(), B = M(), de = M(!1), F = M(), V = M(n.skip), re = M(!1), ye = 25, fe = M({ take: ye }), H = M(!1), P = f(() => x.value.some(($) => $.settings.filters.length > 0 || !!$.settings.sort) || fe.value.selectedColumns), me = f(() => x.value.map(($) => $.settings.filters.length).reduce(($, I) => $ + I, 0)), Ce = f(() => { - var $; - return Je(Dl(Mt.value || (($ = we.value.AnyQuery) == null ? void 0 : $.dataModel.name))); - }), ve = f(() => { - var $; - return el(Dl(Mt.value || (($ = we.value.AnyQuery) == null ? void 0 : $.dataModel.name))); - }), Ve = f(() => fe.value.take ?? ye), Fe = f(() => W.value.response ? be(W.value.response, "results") : []), z = f(() => { - var $; - return (($ = W.value.response) == null ? void 0 : $.total) ?? Fe.value.length ?? 0; - }), Q = f(() => V.value > 0), oe = f(() => V.value > 0), ge = f(() => Fe.value.length >= Ve.value), Se = f(() => Fe.value.length >= Ve.value), Oe = M(), Re = M(), Me = { + function q() { + let _ = Ct(d.selectedColumns); + return _.length > 0 ? _ : ee.value.length > 0 ? ee.value : []; + } + const A = v(() => { + let B = q().map((re) => re.toLowerCase()); + const ve = st(W.value); + return B.length > 0 ? B.map((re) => ve.find((Ce) => Ce.name.toLowerCase() === re)).filter((re) => re != null) : ve; + }), te = v(() => { + let _ = A.value.map((ve) => ve.name), B = Ct(pe.value.selectedColumns).map((ve) => ve.toLowerCase()); + return B.length > 0 ? _.filter((ve) => B.includes(ve.toLowerCase())) : _; + }), w = O([]), N = O(new Xe()), E = O(new Xe()), h = O(), C = O(!1), Y = O(), J = O(), ne = O(!1), D = O(), V = O(d.skip), fe = O(!1), pe = O({ take: ps }), ue = O(!1), me = v(() => w.value.some((_) => _.settings.filters.length > 0 || !!_.settings.sort) || pe.value.selectedColumns), S = v(() => w.value.map((_) => _.settings.filters.length).reduce((_, B) => _ + B, 0)), ce = v(() => { + var _; + return st(Es(Ot.value || ((_ = we.value.AnyQuery) == null ? void 0 : _.dataModel.name))); + }), Ve = v(() => { + var _; + return ns(Es(Ot.value || ((_ = we.value.AnyQuery) == null ? void 0 : _.dataModel.name))); + }), Se = v(() => pe.value.take ?? ps), ge = v(() => N.value.response ? _e(N.value.response, "results") : []), H = v(() => { + var _; + return (((_ = N.value.response) == null ? void 0 : _.total) || ge.value.length) ?? 0; + }), Q = v(() => V.value > 0), oe = v(() => V.value > 0), be = v(() => ge.value.length >= Se.value), $e = v(() => ge.value.length >= Se.value), Ae = O(), He = O(), Fe = { NoQuery: "No Query API was found" }; - t({ update: et, search: Vn, createRequestArgs: Fl, reset: Pn, createDone: zt, createSave: jl, editDone: Et, editSave: al, forceUpdate: Ln, setEdit: Us, edit: B }); - function De($) { - if ($) { - if (n.canFilter) - return n.canFilter($); - const I = Ce.value.find((ce) => ce.name.toLowerCase() == $.toLowerCase()); - if (I) - return !ms(I); + t({ + update: nt, + search: Dl, + createRequestArgs: Hs, + reset: Ql, + createDone: Wt, + createSave: Ns, + editDone: wt, + editSave: ds, + forceUpdate: Bs, + setEdit: Ps, + edit: J, + createForm: Ae, + editForm: He, + apiPrefs: pe, + results: ge, + skip: V, + take: Se, + total: H + }), G.interceptors.has("AutoQueryGrid.new") && G.interceptors.invoke("AutoQueryGrid.new", { props: d }); + function De(_) { + if (_) { + if (d.canFilter) + return d.canFilter(_); + const B = ce.value.find((ve) => ve.name.toLowerCase() == _.toLowerCase()); + if (B) + return !Mn(B); } return !1; } - function Qe($) { - v("queryString") && ln($); + function Oe(_) { + c("nav", _), g("queryString") && ul(_); } - async function je($) { - V.value += $, V.value < 0 && (V.value = 0); - const I = Math.floor(z.value / Ve.value) * Ve.value; - V.value > I && (V.value = I), Qe({ skip: V.value || void 0 }), await et(); + async function We(_) { + V.value += _, V.value < 0 && (V.value = 0); + const B = Math.floor(H.value / Se.value) * Se.value; + V.value > B && (V.value = B), Oe({ skip: V.value || void 0 }), await nt(); } - async function Ye($, I) { - var pe, Ae; - if (B.value = null, _.value = I, !$ || !I) + async function Re(_, B) { + var Ce, Ie; + if (J.value = null, Y.value = B, !_ || !B) return; - let ce = Gt(we.value.AnyQuery, { [$]: I }); - const ae = await c.api(ce); - if (ae.succeeded) { - let He = (pe = be(ae.response, "results")) == null ? void 0 : pe[0]; - He || console.warn(`API ${(Ae = we.value.AnyQuery) == null ? void 0 : Ae.request.name}(${$}:${I}) returned no results`), B.value = He; + let ve = Yt(we.value.AnyQuery, { [_]: B }); + const re = await f.api(ve); + if (re.succeeded) { + let ze = (Ce = _e(re.response, "results")) == null ? void 0 : Ce[0]; + ze || console.warn(`API ${(Ie = we.value.AnyQuery) == null ? void 0 : Ie.request.name}(${_}:${B}) returned no results`), J.value = ze; } } - async function Ht($, I) { - var pe; - l("rowSelected", $, I); - const ce = (pe = ve.value) == null ? void 0 : pe.name, ae = ce ? be($, ce) : null; - !ce || !ae || (Qe({ edit: ae }), Ye(ce, ae)); + async function it(_, B) { + var Ce; + c("rowSelected", _, B); + const ve = (Ce = Ve.value) == null ? void 0 : Ce.name, re = ve ? _e(_, ve) : null; + !ve || !re || (Oe({ edit: re }), Re(ve, re)); } - function mt($, I) { - var ae; - if (!v("filtering")) + function jt(_, B) { + var re; + if (!g("filtering")) return; - let ce = I.target; - if (De($) && (ce == null ? void 0 : ce.tagName) !== "TD") { - let pe = (ae = ce == null ? void 0 : ce.closest("TABLE")) == null ? void 0 : ae.getBoundingClientRect(), Ae = x.value.find((He) => He.name.toLowerCase() == $.toLowerCase()); - if (Ae && pe) { - let He = 318, at = pe.x + He + 10; - F.value = { - column: Ae, + let ve = B.target; + if (De(_) && (ve == null ? void 0 : ve.tagName) !== "TD") { + let Ce = (re = ve == null ? void 0 : ve.closest("TABLE")) == null ? void 0 : re.getBoundingClientRect(), Ie = w.value.find((ze) => ze.name.toLowerCase() == _.toLowerCase()); + if (Ie && Ce) { + let ze = 318, ut = Ce.x + ze + 10; + D.value = { + column: Ie, topLeft: { - x: Math.max(Math.floor(I.clientX + He / 2), at), - y: pe.y + 45 + x: Math.max(Math.floor(B.clientX + ze / 2), ut), + y: Ce.y + 45 } }; } } - l("headerSelected", $, I); + c("headerSelected", _, B); } - function ll() { - F.value = null; + function ht() { + D.value = null; } - async function nl($) { - var ce; - let I = (ce = F.value) == null ? void 0 : ce.column; - I && (I.settings = $, m.setItem(sl(I.name), JSON.stringify(I.settings)), await et()), F.value = null; + async function as(_) { + var ve; + let B = (ve = D.value) == null ? void 0 : ve.column; + B && (B.settings = _, u.setItem(is(B.name), JSON.stringify(B.settings)), await nt()), D.value = null; } - async function zs($) { - m.setItem(sl($.name), JSON.stringify($.settings)), await et(); + async function rs(_) { + u.setItem(is(_.name), JSON.stringify(_.settings)), await nt(); } - async function Ns($) { - de.value = !1, fe.value = $, m.setItem(Il(), JSON.stringify($)), await et(); + async function no(_) { + ne.value = !1, pe.value = _, u.setItem(Rs(), JSON.stringify(_)), await nt(); } - function Us($) { - Object.assign(B.value, $), Ln(); + function Ol(_) { + var B; + Ae.value && (Object.assign((B = Ae.value) == null ? void 0 : B.model, _), Bs()); } - function Ln() { - var I, ce, ae; - (I = Oe.value) == null || I.forceUpdate(), (ce = Re.value) == null || ce.forceUpdate(); - const $ = Be(); - (ae = $ == null ? void 0 : $.proxy) == null || ae.$forceUpdate(); + function Ps(_) { + Object.assign(J.value, _), Bs(); } - async function et() { - await Vn(Fl()); + function Bs() { + var B, ve, re; + (B = Ae.value) == null || B.forceUpdate(), (ve = He.value) == null || ve.forceUpdate(); + const _ = Be(); + (re = _ == null ? void 0 : _.proxy) == null || re.$forceUpdate(); } - async function qs() { - await et(); + async function nt() { + await Dl(Hs()); } - async function Vn($) { - const I = we.value.AnyQuery; - if (!I) { - console.error(Me.NoQuery); + async function oo() { + await nt(); + } + const ao = /iPad|iPhone|iPod/.test(navigator.userAgent); + async function Dl(_) { + const B = we.value.AnyQuery; + if (!B) { + console.error(Fe.NoQuery); return; } - let ce = Gt(I, $), ae = Wn((He) => { - W.value.response = W.value.error = void 0, H.value = He; - }), pe = await c.api(ce); - ae(), xt(() => W.value = pe); - let Ae = be(pe.response, "results") || []; - !pe.succeeded || Ae.label == 0; - } - function Fl() { - let $ = { + let ve = Yt(B, _), re = await f.api(ve); + dn((ze) => { + N.value.response = N.value.error = void 0, ue.value = ze, ao ? St(() => N.value = re) : N.value = re; + })(); + let Ie = _e(re.response, "results") || []; + !re.succeeded || Ie.label == 0; + } + function Hs() { + let _ = { include: "total", - take: Ve.value - }, I = gt(fe.value.selectedColumns || n.selectedColumns); - if (I.length > 0) { - let ae = ve.value; - ae && !I.includes(ae.name) && (I = [ae.name, ...I]); - const pe = Ce.value, Ae = []; - I.forEach((He) => { - var il; - const at = pe.find((Pe) => Pe.name.toLowerCase() == He.toLowerCase()); - (il = at == null ? void 0 : at.ref) != null && il.selfId && Ae.push(at.ref.selfId), be(K, He) && Ae.push(...pe.filter((Pe) => { - var vt, Nt; - return ((Nt = (vt = Pe.ref) == null ? void 0 : vt.selfId) == null ? void 0 : Nt.toLowerCase()) == He.toLowerCase(); - }).map((Pe) => Pe.name)); - }), Ae.forEach((He) => { - I.includes(He) || I.push(He); - }), $.fields = I.join(","); + take: Se.value + }, B = Ct(pe.value.selectedColumns || d.selectedColumns); + if (B.length > 0) { + let re = Ve.value; + re && !B.includes(re.name) && (B = [re.name, ...B]); + const Ce = ce.value, Ie = []; + B.forEach((ze) => { + var cs; + const ut = Ce.find((kt) => kt.name.toLowerCase() == ze.toLowerCase()); + (cs = ut == null ? void 0 : ut.ref) != null && cs.selfId && Ie.push(ut.ref.selfId), _e(R, ze) && Ie.push(...Ce.filter((kt) => { + var Ne, _t; + return ((_t = (Ne = kt.ref) == null ? void 0 : Ne.selfId) == null ? void 0 : _t.toLowerCase()) == ze.toLowerCase(); + }).map((kt) => kt.name)); + }), Ie.forEach((ze) => { + B.includes(ze) || B.push(ze); + }), _.fields = B.join(","); } - let ce = []; - if (x.value.forEach((ae) => { - ae.settings.sort && ce.push((ae.settings.sort === "DESC" ? "-" : "") + ae.name), ae.settings.filters.forEach((pe) => { - let Ae = pe.key.replace("%", ae.name); - $[Ae] = pe.value; + let ve = []; + if (w.value.forEach((re) => { + re.settings.sort && ve.push((re.settings.sort === "DESC" ? "-" : "") + re.name), re.settings.filters.forEach((Ce) => { + let Ie = Ce.key.replace("%", re.name); + _[Ie] = Ce.value; }); - }), n.filters && Object.keys(n.filters).forEach((ae) => { - $[ae] = n.filters[ae]; - }), v("queryString") && v("queryFilters")) { - const ae = location.search ? location.search : location.hash.includes("?") ? "?" + dl(location.hash, "?") : ""; - let pe = El(ae); - if (Object.keys(pe).forEach((Ae) => { - S.value.find((at) => at.name.toLowerCase() === Ae.toLowerCase()) && ($[Ae] = pe[Ae]); - }), typeof pe.skip < "u") { - const Ae = parseInt(pe.skip); - isNaN(Ae) || (V.value = $.skip = Ae); + }), d.filters && Object.keys(d.filters).forEach((re) => { + _[re] = d.filters[re]; + }), g("queryString") && g("queryFilters")) { + const re = location.search ? location.search : location.hash.includes("?") ? "?" + ms(location.hash, "?") : ""; + let Ce = Zs(re); + if (Object.keys(Ce).forEach((Ie) => { + A.value.find((ut) => ut.name.toLowerCase() === Ie.toLowerCase()) && (_[Ie] = Ce[Ie]); + }), typeof Ce.skip < "u") { + const Ie = parseInt(Ce.skip); + isNaN(Ie) || (V.value = _.skip = Ie); } } - return typeof $.skip > "u" && V.value > 0 && ($.skip = V.value), ce.length > 0 && ($.orderBy = ce.join(",")), $; - } - function Qs() { - const $ = Sn("csv"); - Ul($), typeof window < "u" && window.open($); - } - function Ks() { - const $ = Sn("json"); - Ul($), re.value = !0, setTimeout(() => re.value = !1, 3e3); - } - function Sn($ = "json") { - var Ae; - const I = Fl(), ce = `/api/${(Ae = we.value.AnyQuery) == null ? void 0 : Ae.request.name}`, ae = yo(c.baseUrl, Kt(ce, { ...I, jsconfig: "edv" })); - return ae.indexOf("?") >= 0 ? xl(ae, "?") + "." + $ + "?" + dl(ae, "?") : ae + ".json"; - } - async function Zs() { - x.value.forEach(($) => { - $.settings = { filters: [] }, m.removeItem(sl($.name)); - }), fe.value = { take: ye }, m.removeItem(Il()), await et(); - } - function Gs() { - C.value = !0, Qe({ create: null }); - } - const Mt = f(() => Bt(n.type)), dt = f(() => { - var $; - return Mt.value || (($ = we.value.AnyQuery) == null ? void 0 : $.dataModel.name); - }), Il = () => { - var $; - return `${n.id}/ApiPrefs/${Mt.value || (($ = we.value.AnyQuery) == null ? void 0 : $.dataModel.name)}`; - }, sl = ($) => { - var I; - return `Column/${n.id}:${Mt.value || ((I = we.value.AnyQuery) == null ? void 0 : I.dataModel.name)}.${$}`; - }, { metadataApi: Mn, typeOf: Dl, apiOf: An, filterDefinitions: Ws } = ot(), { invalidAccessMessage: Ol } = kn(), Tn = f(() => n.filterDefinitions || Ws.value), we = f(() => { - let $ = gt(n.apis); - return $.length > 0 ? Ot.from($.map((I) => An(I)).filter((I) => I != null).map((I) => I)) : Ot.forType(Mt.value, Mn.value); - }), ol = ($) => `${$}`, Fn = f(() => { - if (!Mn.value) - return ol(`AppMetadata not loaded, see useMetadata()`); - let I = gt(n.apis).map((ae) => An(ae) == null ? ae : null).filter((ae) => ae != null); - if (I.length > 0) - return ol(`Unknown API${I.length > 1 ? "s" : ""}: ${I.join(", ")}`); - let ce = we.value; - return ce.empty ? ol("Mising DataModel in property 'type' or AutoQuery APIs to use in property 'apis'") : ce.AnyQuery ? null : ol(Me.NoQuery); - }), In = f(() => we.value.AnyQuery && Ol(we.value.AnyQuery)), Dn = f(() => we.value.Create && Ol(we.value.Create)), On = f(() => we.value.AnyUpdate && Ol(we.value.AnyUpdate)), Js = f(() => vl(we.value.Create)); - f(() => vl(we.value.AnyUpdate)); - const jn = f(() => vl(we.value.Delete)); - function Et() { - B.value = null, _.value = null, Qe({ edit: void 0 }); - } - function zt() { - C.value = !1, Qe({ create: void 0 }); - } - async function al() { - await et(), Et(); - } - async function jl() { - await et(), zt(); - } - function Pn() { - var ce; - W.value = new We(), E.value = new We(), C.value = !1, _.value = null, B.value = null, de.value = !1, F.value = null, V.value = n.skip, re.value = !1, fe.value = { take: ye }, H.value = !1; - const $ = n.prefs || yl(m.getItem(Il())); - $ && (fe.value = $), x.value = S.value.map((ae) => ({ - name: ae.name, - type: ae.type, - meta: ae, + return typeof _.skip > "u" && V.value > 0 && (_.skip = V.value), ve.length > 0 && (_.orderBy = ve.join(",")), _; + } + function ro() { + const _ = Pl("csv"); + Js(_), typeof window < "u" && window.open(_); + } + function io() { + const _ = Pl("json"); + Js(_), fe.value = !0, setTimeout(() => fe.value = !1, 3e3); + } + function Pl(_ = "json") { + var Ie; + const B = Hs(), ve = `/api/${(Ie = we.value.AnyQuery) == null ? void 0 : Ie.request.name}`, re = Do(f.baseUrl, Et(ve, { ...B, jsconfig: "edv" })); + return re.indexOf("?") >= 0 ? Ls(re, "?") + "." + _ + "?" + ms(re, "?") : re + ".json"; + } + async function uo() { + w.value.forEach((_) => { + _.settings = { filters: [] }, u.removeItem(is(_.name)); + }), pe.value = { take: ps }, u.removeItem(Rs()), await nt(); + } + function co() { + C.value = !0, Oe({ create: null }); + } + const Ot = v(() => qt(d.type)), Kt = v(() => { + var _; + return Ot.value || ((_ = we.value.AnyQuery) == null ? void 0 : _.dataModel.name); + }), Zt = v(() => d.modelTitle || Kt.value), fo = v(() => d.newButtonLabel || `New ${Zt.value}`), Rs = () => { + var _; + return `${d.id}/ApiPrefs/${Ot.value || ((_ = we.value.AnyQuery) == null ? void 0 : _.dataModel.name)}`; + }, is = (_) => { + var B; + return `Column/${d.id}:${Ot.value || ((B = we.value.AnyQuery) == null ? void 0 : B.dataModel.name)}.${_}`; + }, { metadataApi: Bl, typeOf: Es, apiOf: Hl, filterDefinitions: vo } = lt(), { invalidAccessMessage: zs } = Tl(), Rl = v(() => d.filterDefinitions || vo.value), we = v(() => { + let _ = Ct(d.apis); + return _.length > 0 ? Nt.from(_.map((B) => Hl(B)).filter((B) => B != null).map((B) => B)) : Nt.forType(Ot.value, Bl.value); + }), us = (_) => `${_}`, El = v(() => { + if (!Bl.value) + return us(`AppMetadata not loaded, see useMetadata()`); + let B = Ct(d.apis).map((re) => Hl(re) == null ? re : null).filter((re) => re != null); + if (B.length > 0) + return us(`Unknown API${B.length > 1 ? "s" : ""}: ${B.join(", ")}`); + let ve = we.value; + return ve.empty ? us("Mising DataModel in property 'type' or AutoQuery APIs to use in property 'apis'") : ve.AnyQuery ? null : us(Fe.NoQuery); + }), zl = v(() => we.value.AnyQuery && zs(we.value.AnyQuery)), Nl = v(() => we.value.Create && zs(we.value.Create)), Ul = v(() => we.value.AnyUpdate && zs(we.value.AnyUpdate)), po = v(() => bs(we.value.Create)); + v(() => bs(we.value.AnyUpdate)); + const ql = v(() => bs(we.value.Delete)); + function wt() { + J.value = null, Y.value = null, Oe({ edit: void 0 }); + } + function Wt() { + C.value = !1, Oe({ create: void 0 }); + } + async function ds() { + await nt(), wt(); + } + async function Ns() { + await nt(), Wt(); + } + function Ql() { + var ve; + N.value = new Xe(), E.value = new Xe(), C.value = !1, Y.value = null, J.value = null, ne.value = !1, D.value = null, V.value = d.skip, fe.value = !1, pe.value = { take: ps }, ue.value = !1; + const _ = d.prefs || $s(u.getItem(Rs())); + _ && (pe.value = _), w.value = A.value.map((re) => ({ + name: re.name, + type: re.type, + meta: re, settings: Object.assign( { filters: [] }, - yl(m.getItem(sl(ae.name))) + $s(u.getItem(is(re.name))) ) - })), isNaN(n.skip) || (V.value = n.skip); - let I = (ce = ve.value) == null ? void 0 : ce.name; - if (v("queryString")) { - const ae = location.search ? location.search : location.hash.includes("?") ? "?" + dl(location.hash, "?") : ""; - let pe = El(ae); - typeof pe.create < "u" ? C.value = typeof pe.create < "u" : I && (typeof pe.edit == "string" || typeof pe.edit == "number") && Ye(I, pe.edit); + })), isNaN(d.skip) || (V.value = d.skip); + let B = (ve = Ve.value) == null ? void 0 : ve.name; + if (g("queryString")) { + const re = location.search ? location.search : location.hash.includes("?") ? "?" + ms(location.hash, "?") : ""; + let Ce = Zs(re); + typeof Ce.create < "u" ? C.value = typeof Ce.create < "u" : B && (typeof Ce.edit == "string" || typeof Ce.edit == "number") && Re(B, Ce.edit); } - n.create === !0 && (C.value = !0), I && n.edit != null && Ye(I, n.edit); - } - return Xe(async () => { - Pn(), await et(); - }), ($, I) => { - const ce = X("Alert"), ae = X("EnsureAccessDialog"), pe = X("AutoCreateForm"), Ae = X("AutoEditForm"), He = X("ErrorSummary"), at = X("Loading"), Bn = X("SettingsIcons"), il = X("DataGrid"); - return o(Fn) ? (a(), u("div", Hr, [ - $e(ce, { innerHTML: o(Fn) }, null, 8, ["innerHTML"]) - ])) : o(In) ? (a(), u("div", Er, [ - $e(Es, { "invalid-access": o(In) }, null, 8, ["invalid-access"]) - ])) : (a(), u("div", zr, [ - C.value && o(we).Create ? (a(), u("div", Nr, [ - o(Dn) ? (a(), se(ae, { + d.create === !0 && (C.value = !0), B && d.edit != null && Re(B, d.edit); + } + return Ye(async () => { + Ql(), await nt(); + }), (_, B) => { + const ve = Z("Alert"), re = Z("EnsureAccessDialog"), Ce = Z("AutoCreateForm"), Ie = Z("AutoEditForm"), ze = Z("AutoViewForm"), ut = Z("ErrorSummary"), Kl = Z("Loading"), cs = Z("SettingsIcons"), kt = Z("DataGrid"); + return El.value ? (o(), i("div", iu, [ + ye(ve, { innerHTML: El.value }, null, 8, ["innerHTML"]) + ])) : zl.value ? (o(), i("div", uu, [ + ye(lo, { "invalid-access": zl.value }, null, 8, ["invalid-access"]) + ])) : (o(), i("div", du, [ + C.value && we.value.Create ? (o(), i("div", cu, [ + Nl.value ? (o(), ae(re, { key: 0, - title: `Create ${o(dt)}`, - "invalid-access": o(Dn), + title: `Create ${Zt.value}`, + "invalid-access": Nl.value, "alert-class": "text-yellow-700", - onDone: zt - }, null, 8, ["title", "invalid-access"])) : o(K).createform ? Z($.$slots, "createform", { + onDone: Wt + }, null, 8, ["title", "invalid-access"])) : X(R).createform ? U(_.$slots, "createform", { key: 1, - type: o(we).Create.request.name, - configure: e.configureField, - done: zt, - save: jl - }) : (a(), se(pe, { + type: we.value.Create.request.name, + configure: _.configureField, + done: Wt, + save: Ns + }) : (o(), ae(Ce, { key: 2, ref_key: "createForm", - ref: Oe, - type: o(we).Create.request.name, - configure: e.configureField, - onDone: zt, - onSave: jl + ref: Ae, + type: we.value.Create.request.name, + configure: _.configureField, + onDone: Wt, + onSave: Ns }, { - header: ke(() => [ - Z($.$slots, "formheader", { + header: xe(() => [ + U(_.$slots, "formheader", { form: "create", - formInstance: Oe.value, - apis: o(we), - type: o(dt) + formInstance: Ae.value, + apis: we.value, + type: Kt.value, + updateModel: Ol }) ]), - footer: ke(() => [ - Z($.$slots, "formfooter", { + footer: xe(() => [ + U(_.$slots, "formfooter", { form: "create", - formInstance: Oe.value, - apis: o(we), - type: o(dt) + formInstance: Ae.value, + apis: we.value, + type: Kt.value, + updateModel: Ol }) ]), _: 3 }, 8, ["type", "configure"])) - ])) : B.value && o(we).AnyUpdate ? (a(), u("div", Ur, [ - o(On) ? (a(), se(ae, { + ])) : J.value && we.value.AnyUpdate ? (o(), i("div", fu, [ + Ul.value ? (o(), ae(re, { key: 0, - title: `Update ${o(dt)}`, - "invalid-access": o(On), + title: `Update ${Zt.value}`, + "invalid-access": Ul.value, "alert-class": "text-yellow-700", - onDone: Et - }, null, 8, ["title", "invalid-access"])) : o(K).editform ? Z($.$slots, "editform", { + onDone: wt + }, null, 8, ["title", "invalid-access"])) : X(R).editform ? U(_.$slots, "editform", { key: 1, - model: B.value, - type: o(we).AnyUpdate.request.name, - deleteType: o(jn) ? o(we).Delete.request.name : null, - configure: e.configureField, - done: Et, - save: al - }) : (a(), se(Ae, { + model: J.value, + type: we.value.AnyUpdate.request.name, + deleteType: ql.value ? we.value.Delete.request.name : null, + configure: _.configureField, + done: wt, + save: ds + }) : (o(), ae(Ie, { key: 2, ref_key: "editForm", - ref: Re, - modelValue: B.value, - "onUpdate:modelValue": I[0] || (I[0] = (Pe) => B.value = Pe), - type: o(we).AnyUpdate.request.name, - deleteType: o(jn) ? o(we).Delete.request.name : null, - configure: e.configureField, - onDone: Et, - onSave: al, - onDelete: al + ref: He, + modelValue: J.value, + "onUpdate:modelValue": B[0] || (B[0] = (Ne) => J.value = Ne), + type: we.value.AnyUpdate.request.name, + deleteType: ql.value ? we.value.Delete.request.name : null, + configure: _.configureField, + onDone: wt, + onSave: ds, + onDelete: ds }, { - header: ke(() => [ - Z($.$slots, "formheader", { + header: xe(() => [ + U(_.$slots, "formheader", { form: "edit", - formInstance: Re.value, - apis: o(we), - type: o(dt), - model: B.value, - id: _.value + formInstance: He.value, + apis: we.value, + type: Kt.value, + model: J.value, + id: Y.value, + updateModel: Ps }) ]), - footer: ke(() => [ - Z($.$slots, "formfooter", { + footer: xe(() => [ + U(_.$slots, "formfooter", { form: "edit", - formInstance: Re.value, - apis: o(we), - type: o(dt), - model: B.value, - id: _.value + formInstance: He.value, + apis: we.value, + type: Kt.value, + model: J.value, + id: Y.value, + updateModel: Ps }) ]), _: 3 }, 8, ["modelValue", "type", "deleteType", "configure"])) - ])) : k("", !0), - o(K).toolbar ? Z($.$slots, "toolbar", { key: 2 }) : g("toolbar") ? (a(), u("div", qr, [ - de.value ? (a(), se(_n, { + ])) : J.value ? (o(), i("div", vu, [ + X(R).viewform ? U(_.$slots, "viewform", { key: 0, - columns: o(S), - prefs: fe.value, - onDone: I[1] || (I[1] = (Pe) => de.value = !1), - onSave: Ns - }, null, 8, ["columns", "prefs"])) : k("", !0), - s("div", Qr, [ - s("div", Kr, [ - g("preferences") ? (a(), u("button", { + model: J.value, + apis: we.value, + done: wt + }) : (o(), ae(ze, { + key: 1, + model: J.value, + apis: we.value, + done: wt + }, null, 8, ["model", "apis"])) + ])) : x("", !0), + X(R).toolbar ? U(_.$slots, "toolbar", { key: 3 }) : b("toolbar") ? (o(), i("div", pu, [ + ne.value ? (o(), ae(jl, { + key: 0, + columns: A.value, + prefs: pe.value, + onDone: B[1] || (B[1] = (Ne) => ne.value = !1), + onSave: no + }, null, 8, ["columns", "prefs"])) : x("", !0), + l("div", mu, [ + l("div", hu, [ + b("preferences") ? (o(), i("button", { key: 0, type: "button", class: "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400", - title: `${o(dt)} Preferences`, - onClick: I[2] || (I[2] = (Pe) => de.value = !de.value) - }, Wr, 8, Zr)) : k("", !0), - g("pagingNav") ? (a(), u("button", { + title: `${Zt.value} Preferences`, + onClick: B[2] || (B[2] = (Ne) => ne.value = !ne.value) + }, bu, 8, gu)) : x("", !0), + b("pagingNav") ? (o(), i("button", { key: 1, type: "button", - class: w(["pl-2", o(Q) ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), + class: y(["pl-2", Q.value ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), title: "First page", - disabled: !o(Q), - onClick: I[3] || (I[3] = (Pe) => je(-o(z))) - }, Yr, 10, Jr)) : k("", !0), - g("pagingNav") ? (a(), u("button", { + disabled: !Q.value, + onClick: B[3] || (B[3] = (Ne) => We(-H.value)) + }, _u, 10, wu)) : x("", !0), + b("pagingNav") ? (o(), i("button", { key: 2, type: "button", - class: w(["pl-2", o(oe) ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), + class: y(["pl-2", oe.value ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), title: "Previous page", - disabled: !o(oe), - onClick: I[4] || (I[4] = (Pe) => je(-o(Ve))) - }, lu, 10, eu)) : k("", !0), - g("pagingNav") ? (a(), u("button", { + disabled: !oe.value, + onClick: B[4] || (B[4] = (Ne) => We(-Se.value)) + }, xu, 10, $u)) : x("", !0), + b("pagingNav") ? (o(), i("button", { key: 3, type: "button", - class: w(["pl-2", o(ge) ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), + class: y(["pl-2", be.value ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), title: "Next page", - disabled: !o(ge), - onClick: I[5] || (I[5] = (Pe) => je(o(Ve))) - }, ou, 10, nu)) : k("", !0), - g("pagingNav") ? (a(), u("button", { + disabled: !be.value, + onClick: B[5] || (B[5] = (Ne) => We(Se.value)) + }, Su, 10, Lu)) : x("", !0), + b("pagingNav") ? (o(), i("button", { key: 4, type: "button", - class: w(["pl-2", o(Se) ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), + class: y(["pl-2", $e.value ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), title: "Last page", - disabled: !o(Se), - onClick: I[6] || (I[6] = (Pe) => je(o(z))) - }, ru, 10, au)) : k("", !0) + disabled: !$e.value, + onClick: B[6] || (B[6] = (Ne) => We(H.value)) + }, Tu, 10, Mu)) : x("", !0) ]), - g("pagingInfo") ? (a(), u("div", uu, [ - s("div", du, [ - H.value ? (a(), u("span", cu, "Querying...")) : k("", !0), - o(Fe).length ? (a(), u("span", fu, [ - mu, - xe(" " + A(V.value + 1) + " - " + A(Math.min(V.value + o(Fe).length, o(z))) + " ", 1), - s("span", null, " of " + A(o(z)), 1) - ])) : W.value.completed ? (a(), u("span", vu, "No Results")) : k("", !0) + b("pagingInfo") ? (o(), i("div", Fu, [ + l("div", Iu, [ + ue.value ? (o(), i("span", ju, "Querying...")) : x("", !0), + ge.value.length ? (o(), i("span", Ou, [ + Du, + ke(" " + F(V.value + 1) + " - " + F(Math.min(V.value + ge.value.length, H.value)) + " ", 1), + l("span", null, " of " + F(H.value), 1) + ])) : N.value.completed ? (o(), i("span", Pu, "No Results")) : x("", !0) ]) - ])) : k("", !0), - s("div", hu, [ - g("refresh") ? (a(), u("div", gu, [ - s("button", { + ])) : x("", !0), + l("div", Bu, [ + b("refresh") ? (o(), i("div", Hu, [ + l("button", { type: "button", - onClick: qs, + onClick: oo, title: "Refresh", - class: w(o(q)) - }, yu, 2) - ])) : k("", !0), - g("downloadCsv") ? (a(), u("div", bu, [ - s("button", { + class: y(K.value) + }, Eu, 2) + ])) : x("", !0), + b("downloadCsv") ? (o(), i("div", zu, [ + l("button", { type: "button", - onClick: Qs, + onClick: ro, title: "Download CSV", - class: w(o(q)) - }, xu, 2) - ])) : k("", !0), - g("copyApiUrl") ? (a(), u("div", ku, [ - s("button", { + class: y(K.value) + }, Uu, 2) + ])) : x("", !0), + b("copyApiUrl") ? (o(), i("div", qu, [ + l("button", { type: "button", - onClick: Ks, + onClick: io, title: "Copy API URL", - class: w(o(q)) + class: y(K.value) }, [ - re.value ? (a(), u("svg", $u, _u)) : (a(), u("svg", Lu, Su)), - Mu + fe.value ? (o(), i("svg", Qu, Zu)) : (o(), i("svg", Wu, Ju)), + Xu ], 2) - ])) : k("", !0), - o(P) && g("resetPreferences") ? (a(), u("div", Au, [ - s("button", { + ])) : x("", !0), + me.value && b("resetPreferences") ? (o(), i("div", Yu, [ + l("button", { type: "button", - onClick: Zs, + onClick: uo, title: "Reset Preferences & Filters", - class: w(o(q)) - }, Fu, 2) - ])) : k("", !0), - g("filtersView") && o(me) > 0 ? (a(), u("div", Iu, [ - s("button", { + class: y(K.value) + }, td, 2) + ])) : x("", !0), + b("filtersView") && S.value > 0 ? (o(), i("div", sd, [ + l("button", { type: "button", - onClick: I[7] || (I[7] = (Pe) => G.value = G.value == "filters" ? null : "filters"), - class: w(o(q)), + onClick: B[7] || (B[7] = (Ne) => h.value = h.value == "filters" ? null : "filters"), + class: y(K.value), "aria-expanded": "false" }, [ - Du, - s("span", Ou, A(o(me)) + " " + A(o(me) == 1 ? "Filter" : "Filters"), 1), - G.value != "filters" ? (a(), u("svg", ju, Bu)) : (a(), u("svg", Ru, Eu)) + ld, + l("span", nd, F(S.value) + " " + F(S.value == 1 ? "Filter" : "Filters"), 1), + h.value != "filters" ? (o(), i("svg", od, rd)) : (o(), i("svg", id, dd)) ], 2) - ])) : k("", !0), - g("newItem") && o(we).Create && o(Js) ? (a(), u("div", zu, [ - s("button", { + ])) : x("", !0), + b("newItem") && we.value.Create && po.value ? (o(), i("div", cd, [ + l("button", { type: "button", - onClick: Gs, - title: o(dt), - class: w(o(q)) + onClick: co, + title: Zt.value, + class: y(K.value) }, [ - Uu, - s("span", qu, "New " + A(o(dt)), 1) - ], 10, Nu) - ])) : k("", !0), - o(K).toolbarbuttons ? Z($.$slots, "toolbarbuttons", { + vd, + l("span", pd, F(fo.value), 1) + ], 10, fd) + ])) : x("", !0), + X(R).toolbarbuttons ? U(_.$slots, "toolbarbuttons", { key: 6, - toolbarButtonClass: o(q) - }) : k("", !0) + toolbarButtonClass: K.value + }) : x("", !0) ]) ]) - ])) : k("", !0), - G.value == "filters" ? (a(), se(Cn, { - key: 4, - class: "border-y border-gray-200 dark:border-gray-800 py-8 my-2", - definitions: o(Tn), - columns: x.value, - onDone: I[8] || (I[8] = (Pe) => G.value = null), - onChange: zs - }, null, 8, ["definitions", "columns"])) : k("", !0), - E.value.error ?? W.value.error ? (a(), se(He, { + ])) : x("", !0), + h.value == "filters" ? (o(), ae(Il, { key: 5, - status: E.value.error ?? W.value.error - }, null, 8, ["status"])) : H.value ? (a(), se(at, { + class: "border-y border-gray-200 dark:border-gray-800 py-8 my-2", + definitions: Rl.value, + columns: w.value, + onDone: B[8] || (B[8] = (Ne) => h.value = null), + onChange: rs + }, null, 8, ["definitions", "columns"])) : x("", !0), + E.value.error ?? N.value.error ? (o(), ae(ut, { key: 6, + status: E.value.error ?? N.value.error + }, null, 8, ["status"])) : ue.value ? (o(), ae(Kl, { + key: 7, class: "p-2" - })) : k("", !0), - F.value ? (a(), u("div", Qu, [ - $e($n, { - definitions: o(Tn), - column: F.value.column, - "top-left": F.value.topLeft, - onDone: ll, - onSave: nl + })) : x("", !0), + D.value ? (o(), i("div", md, [ + ye(Fl, { + definitions: Rl.value, + column: D.value.column, + "top-left": D.value.topLeft, + onDone: ht, + onSave: as }, null, 8, ["definitions", "column", "top-left"]) - ])) : k("", !0), - o(Fe).length ? (a(), se(il, { - key: 8, - id: e.id, - items: o(Fe), - type: e.type, - "selected-columns": o(le), + ])) : x("", !0), + ge.value.length ? (o(), ae(kt, { + key: 9, + id: _.id, + items: ge.value, + type: _.type, + "selected-columns": te.value, class: "mt-1", - onFiltersChanged: et, - tableStyle: o(O), - gridClass: o(U), - grid2Class: o(Y), - grid3Class: o(R), - grid4Class: o(N), - tableClass: o(T), - theadClass: o(J), - theadRowClass: o(j), - theadCellClass: o(L), - tbodyClass: e.tbodyClass, - rowClass: D, - onRowSelected: Ht, - rowStyle: e.rowStyle, - headerTitle: e.headerTitle, - headerTitles: e.headerTitles, - visibleFrom: e.visibleFrom, - onHeaderSelected: mt - }, en({ - header: ke(({ column: Pe, label: vt }) => { - var Nt; + onFiltersChanged: nt, + tableStyle: P.value, + gridClass: I.value, + grid2Class: se.value, + grid3Class: j.value, + grid4Class: T.value, + tableClass: M.value, + theadClass: ie.value, + theadRowClass: L.value, + theadCellClass: z.value, + tbodyClass: _.tbodyClass, + rowClass: le, + onRowSelected: it, + rowStyle: _.rowStyle, + headerTitle: _.headerTitle, + headerTitles: _.headerTitles, + visibleFrom: _.visibleFrom, + onHeaderSelected: jt + }, rl({ + header: xe(({ column: Ne, label: _t }) => { + var Zl; return [ - v("filtering") && De(Pe) ? (a(), u("div", Ku, [ - s("span", Zu, A(vt), 1), - $e(Bn, { - column: x.value.find((Xs) => Xs.name.toLowerCase() === Pe.toLowerCase()), - "is-open": ((Nt = F.value) == null ? void 0 : Nt.column.name) === Pe + g("filtering") && De(Ne) ? (o(), i("div", hd, [ + l("span", gd, F(_t), 1), + ye(cs, { + column: w.value.find((mo) => mo.name.toLowerCase() === Ne.toLowerCase()), + "is-open": ((Zl = D.value) == null ? void 0 : Zl.column.name) === Ne }, null, 8, ["column", "is-open"]) - ])) : (a(), u("div", Gu, [ - s("span", Wu, A(vt), 1) + ])) : (o(), i("div", yd, [ + l("span", bd, F(_t), 1) ])) ]; }), _: 2 }, [ - Ie(Object.keys(o(K)), (Pe) => ({ - name: Pe, - fn: ke((vt) => [ - Z($.$slots, Pe, It(gl(vt))) + je(Object.keys(X(R)), (Ne) => ({ + name: Ne, + fn: xe((_t) => [ + U(_.$slots, Ne, Rt(ks(_t))) ]) })) - ]), 1032, ["id", "items", "type", "selected-columns", "tableStyle", "gridClass", "grid2Class", "grid3Class", "grid4Class", "tableClass", "theadClass", "theadRowClass", "theadCellClass", "tbodyClass", "rowStyle", "headerTitle", "headerTitles", "visibleFrom"])) : k("", !0) + ]), 1032, ["id", "items", "type", "selected-columns", "tableStyle", "gridClass", "grid2Class", "grid3Class", "grid4Class", "tableClass", "theadClass", "theadRowClass", "theadCellClass", "tbodyClass", "rowStyle", "headerTitle", "headerTitles", "visibleFrom"])) : x("", !0) ])); }; } -}), Xu = { class: "flex" }, Yu = { +}), kd = { class: "flex" }, _d = { key: 0, class: "w-4 h-4", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" -}, ed = /* @__PURE__ */ s("g", { fill: "none" }, [ - /* @__PURE__ */ s("path", { +}, $d = /* @__PURE__ */ l("g", { fill: "none" }, [ + /* @__PURE__ */ l("path", { d: "M3 4a1 1 0 0 1 1-1h16a1 1 0 0 1 1 1v2.586a1 1 0 0 1-.293.707l-6.414 6.414a1 1 0 0 0-.293.707V17l-4 4v-6.586a1 1 0 0 0-.293-.707L3.293 7.293A1 1 0 0 1 3 6.586V4z", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }) -], -1), td = [ - ed -], ld = /* @__PURE__ */ s("path", { +], -1), Cd = [ + $d +], xd = /* @__PURE__ */ l("path", { d: "M505.5 658.7c3.2 4.4 9.7 4.4 12.9 0l178-246c3.8-5.3 0-12.7-6.5-12.7H643c-10.2 0-19.9 4.9-25.9 13.2L512 558.6L406.8 413.2c-6-8.3-15.6-13.2-25.9-13.2H334c-6.5 0-10.3 7.4-6.5 12.7l178 246z", fill: "currentColor" -}, null, -1), nd = /* @__PURE__ */ s("path", { +}, null, -1), Ld = /* @__PURE__ */ l("path", { d: "M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z", fill: "currentColor" -}, null, -1), sd = [ - ld, - nd -], od = { +}, null, -1), Vd = [ + xd, + Ld +], Sd = { key: 2, class: "w-4 h-4", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20" -}, ad = /* @__PURE__ */ s("g", { fill: "none" }, [ - /* @__PURE__ */ s("path", { +}, Md = /* @__PURE__ */ l("g", { fill: "none" }, [ + /* @__PURE__ */ l("path", { d: "M8.998 4.71L6.354 7.354a.5.5 0 1 1-.708-.707L9.115 3.18A.499.499 0 0 1 9.498 3H9.5a.5.5 0 0 1 .354.147l.01.01l3.49 3.49a.5.5 0 1 1-.707.707l-2.65-2.649V16.5a.5.5 0 0 1-1 0V4.71z", fill: "currentColor" }) -], -1), id = [ - ad -], rd = { +], -1), Ad = [ + Md +], Td = { key: 3, class: "w-4 h-4", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20" -}, ud = /* @__PURE__ */ s("g", { fill: "none" }, [ - /* @__PURE__ */ s("path", { +}, Fd = /* @__PURE__ */ l("g", { fill: "none" }, [ + /* @__PURE__ */ l("path", { d: "M10.002 15.29l2.645-2.644a.5.5 0 0 1 .707.707L9.886 16.82a.5.5 0 0 1-.384.179h-.001a.5.5 0 0 1-.354-.147l-.01-.01l-3.49-3.49a.5.5 0 1 1 .707-.707l2.648 2.649V3.5a.5.5 0 0 1 1 0v11.79z", fill: "currentColor" }) -], -1), dd = [ - ud -], cd = /* @__PURE__ */ ue({ +], -1), Id = [ + Fd +], jd = /* @__PURE__ */ de({ __name: "SettingsIcons", props: { - column: null, + column: {}, isOpen: { type: Boolean } }, setup(e) { - return (t, l) => { - var n, i, r, d, c, m, h; - return a(), u("div", Xu, [ - (r = (i = (n = e.column) == null ? void 0 : n.settings) == null ? void 0 : i.filters) != null && r.length ? (a(), u("svg", Yu, td)) : (a(), u("svg", { + return (t, s) => { + var n, a, r, u, d, c, f; + return o(), i("div", kd, [ + (r = (a = (n = t.column) == null ? void 0 : n.settings) == null ? void 0 : a.filters) != null && r.length ? (o(), i("svg", _d, Cd)) : (o(), i("svg", { key: 1, - class: w(["w-4 h-4 transition-transform", e.isOpen ? "rotate-180" : ""]), + class: y(["w-4 h-4 transition-transform", t.isOpen ? "rotate-180" : ""]), xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024" - }, sd, 2)), - ((c = (d = e.column) == null ? void 0 : d.settings) == null ? void 0 : c.sort) === "ASC" ? (a(), u("svg", od, id)) : ((h = (m = e.column) == null ? void 0 : m.settings) == null ? void 0 : h.sort) === "DESC" ? (a(), u("svg", rd, dd)) : k("", !0) + }, Vd, 2)), + ((d = (u = t.column) == null ? void 0 : u.settings) == null ? void 0 : d.sort) === "ASC" ? (o(), i("svg", Sd, Ad)) : ((f = (c = t.column) == null ? void 0 : c.settings) == null ? void 0 : f.sort) === "DESC" ? (o(), i("svg", Td, Id)) : x("", !0) ]); }; } -}), fd = /* @__PURE__ */ ue({ +}), Od = /* @__PURE__ */ de({ __name: "EnsureAccessDialog", props: { - title: null, - subtitle: null, - invalidAccess: null, - alertClass: null + title: {}, + subtitle: {}, + invalidAccess: {}, + alertClass: {} }, emits: ["done"], setup(e) { - return (t, l) => { - const n = X("EnsureAccess"), i = X("SlideOver"); - return e.invalidAccess ? (a(), se(i, { + return (t, s) => { + const n = Z("EnsureAccess"), a = Z("SlideOver"); + return t.invalidAccess ? (o(), ae(a, { key: 0, - title: e.title, - onDone: l[0] || (l[0] = (r) => t.$emit("done")), + title: t.title, + onDone: s[0] || (s[0] = (r) => t.$emit("done")), "content-class": "relative flex-1" - }, en({ - default: ke(() => [ - $e(n, { - alertClass: e.alertClass, - invalidAccess: e.invalidAccess + }, rl({ + default: xe(() => [ + ye(n, { + alertClass: t.alertClass, + invalidAccess: t.invalidAccess }, null, 8, ["alertClass", "invalidAccess"]) ]), _: 2 }, [ - e.subtitle ? { + t.subtitle ? { name: "subtitle", - fn: ke(() => [ - xe(A(e.subtitle), 1) + fn: xe(() => [ + ke(F(t.subtitle), 1) ]), key: "0" } : void 0 - ]), 1032, ["title"])) : k("", !0); + ]), 1032, ["title"])) : x("", !0); }; } -}), md = ["for"], vd = { class: "mt-1 relative rounded-md shadow-sm" }, hd = ["type", "name", "id", "placeholder", "value", "aria-invalid", "aria-describedby"], gd = { +}), Dd = ["for"], Pd = { class: "mt-1 relative rounded-md shadow-sm" }, Bd = ["type", "name", "id", "placeholder", "value", "aria-invalid", "aria-describedby"], Hd = { key: 0, class: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none" -}, pd = /* @__PURE__ */ s("svg", { +}, Rd = /* @__PURE__ */ l("svg", { class: "h-5 w-5 text-red-500", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z", "clip-rule": "evenodd" }) -], -1), yd = [ - pd -], bd = ["id"], wd = ["id"], xd = { +], -1), Ed = [ + Rd +], zd = ["id"], Nd = ["id"], Ud = { inheritAttrs: !1 -}, kd = /* @__PURE__ */ ue({ - ...xd, +}, qd = /* @__PURE__ */ de({ + ...Ud, __name: "TextInput", props: { - status: null, - id: null, - type: null, - inputClass: null, - label: null, - labelClass: null, - help: null, - placeholder: null, - modelValue: null + status: {}, + id: {}, + type: {}, + inputClass: {}, + label: {}, + labelClass: {}, + help: {}, + placeholder: {}, + modelValue: {} }, setup(e, { expose: t }) { - const l = e, n = (p) => p.value; + const s = (m) => m.value, n = e; t({ focus: r }); - const i = M(); + const a = O(); function r() { - var p; - (p = i.value) == null || p.focus(); - } - const d = f(() => l.type || "text"), c = f(() => l.label ?? Ee(nt(l.id))), m = f(() => l.placeholder ?? c.value); - let h = qe("ApiState", void 0); - const y = f(() => ft.call({ responseStatus: l.status ?? (h == null ? void 0 : h.error.value) }, l.id)), b = f(() => [lt.base, y.value ? lt.invalid : lt.valid, l.inputClass]); - return (p, v) => (a(), u("div", { - class: w([p.$attrs.class]) + var m; + (m = a.value) == null || m.focus(); + } + const u = v(() => n.type || "text"), d = v(() => n.label ?? Pe(at(n.id))), c = v(() => n.placeholder ?? d.value); + let f = Qe("ApiState", void 0); + const p = v(() => mt.call({ responseStatus: n.status ?? (f == null ? void 0 : f.error.value) }, n.id)), $ = v(() => [ot.base, p.value ? ot.invalid : ot.valid, n.inputClass]); + return (m, k) => (o(), i("div", { + class: y([m.$attrs.class]) }, [ - Z(p.$slots, "header", Le({ - inputElement: i.value, - id: e.id, - modelValue: e.modelValue, - status: e.status - }, p.$attrs)), - o(c) ? (a(), u("label", { + U(m.$slots, "header", Te({ + inputElement: a.value, + id: m.id, + modelValue: m.modelValue, + status: m.status + }, m.$attrs)), + d.value ? (o(), i("label", { key: 0, - for: e.id, - class: w(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${e.labelClass ?? ""}`) - }, A(o(c)), 11, md)) : k("", !0), - s("div", vd, [ - s("input", Le({ + for: m.id, + class: y(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${m.labelClass ?? ""}`) + }, F(d.value), 11, Dd)) : x("", !0), + l("div", Pd, [ + l("input", Te({ ref_key: "inputElement", - ref: i, - type: o(d), - name: e.id, - id: e.id, - class: o(b), - placeholder: o(m), - value: e.modelValue, - onInput: v[0] || (v[0] = (g) => p.$emit("update:modelValue", n(g.target))), - "aria-invalid": o(y) != null, - "aria-describedby": `${e.id}-error`, + ref: a, + type: u.value, + name: m.id, + id: m.id, + class: $.value, + placeholder: c.value, + value: X(pn)(u.value, m.modelValue), + onInput: k[0] || (k[0] = (g) => m.$emit("update:modelValue", s(g.target))), + "aria-invalid": p.value != null, + "aria-describedby": `${m.id}-error`, step: "any" - }, o(ut)(p.$attrs, ["class"])), null, 16, hd), - o(y) ? (a(), u("div", gd, yd)) : k("", !0) + }, X(ft)(m.$attrs, ["class", "value"])), null, 16, Bd), + p.value ? (o(), i("div", Hd, Ed)) : x("", !0) ]), - o(y) ? (a(), u("p", { + p.value ? (o(), i("p", { key: 1, class: "mt-2 text-sm text-red-500", - id: `${e.id}-error` - }, A(o(y)), 9, bd)) : e.help ? (a(), u("p", { + id: `${m.id}-error` + }, F(p.value), 9, zd)) : m.help ? (o(), i("p", { key: 2, class: "mt-2 text-sm text-gray-500", - id: `${e.id}-description` - }, A(e.help), 9, wd)) : k("", !0), - Z(p.$slots, "footer", Le({ - inputElement: i.value, - id: e.id, - modelValue: e.modelValue, - status: e.status - }, p.$attrs)) + id: `${m.id}-description` + }, F(m.help), 9, Nd)) : x("", !0), + U(m.$slots, "footer", Te({ + inputElement: a.value, + id: m.id, + modelValue: m.modelValue, + status: m.status + }, m.$attrs)) ], 2)); } -}), $d = ["for"], Cd = { class: "mt-1 relative rounded-md shadow-sm" }, _d = ["name", "id", "placeholder", "aria-invalid", "aria-describedby"], Ld = ["id"], Vd = ["id"], Sd = { +}), Qd = ["for"], Kd = { class: "mt-1 relative rounded-md shadow-sm" }, Zd = ["name", "id", "placeholder", "aria-invalid", "aria-describedby"], Wd = ["id"], Gd = ["id"], Jd = { inheritAttrs: !1 -}, Md = /* @__PURE__ */ ue({ - ...Sd, +}, Xd = /* @__PURE__ */ de({ + ...Jd, __name: "TextareaInput", props: { - status: null, - id: null, - inputClass: null, - label: null, - labelClass: null, - help: null, - placeholder: null, - modelValue: null + status: {}, + id: {}, + inputClass: {}, + label: {}, + labelClass: {}, + help: {}, + placeholder: {}, + modelValue: {} }, setup(e) { - const t = e, l = (m) => m.value, n = f(() => t.label ?? Ee(nt(t.id))), i = f(() => t.placeholder ?? n.value); - let r = qe("ApiState", void 0); - const d = f(() => ft.call({ responseStatus: t.status ?? (r == null ? void 0 : r.error.value) }, t.id)), c = f(() => ["shadow-sm " + lt.base, d.value ? "text-red-900 focus:ring-red-500 focus:border-red-500 border-red-300" : "text-gray-900 " + lt.valid, t.inputClass]); - return (m, h) => (a(), u("div", { - class: w([m.$attrs.class]) + const t = (c) => c.value, s = e, n = v(() => s.label ?? Pe(at(s.id))), a = v(() => s.placeholder ?? n.value); + let r = Qe("ApiState", void 0); + const u = v(() => mt.call({ responseStatus: s.status ?? (r == null ? void 0 : r.error.value) }, s.id)), d = v(() => ["shadow-sm " + ot.base, u.value ? "text-red-900 focus:ring-red-500 focus:border-red-500 border-red-300" : "text-gray-900 " + ot.valid, s.inputClass]); + return (c, f) => (o(), i("div", { + class: y([c.$attrs.class]) }, [ - o(n) ? (a(), u("label", { + n.value ? (o(), i("label", { key: 0, - for: e.id, - class: w(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${e.labelClass ?? ""}`) - }, A(o(n)), 11, $d)) : k("", !0), - s("div", Cd, [ - s("textarea", Le({ - name: e.id, - id: e.id, - class: o(c), - placeholder: o(i), - onInput: h[0] || (h[0] = (y) => m.$emit("update:modelValue", l(y.target))), - "aria-invalid": o(d) != null, - "aria-describedby": `${e.id}-error` - }, o(ut)(m.$attrs, ["class"])), A(e.modelValue), 17, _d) + for: c.id, + class: y(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${c.labelClass ?? ""}`) + }, F(n.value), 11, Qd)) : x("", !0), + l("div", Kd, [ + l("textarea", Te({ + name: c.id, + id: c.id, + class: d.value, + placeholder: a.value, + onInput: f[0] || (f[0] = (p) => c.$emit("update:modelValue", t(p.target))), + "aria-invalid": u.value != null, + "aria-describedby": `${c.id}-error` + }, X(ft)(c.$attrs, ["class"])), F(c.modelValue), 17, Zd) ]), - o(d) ? (a(), u("p", { + u.value ? (o(), i("p", { key: 1, class: "mt-2 text-sm text-red-500", - id: `${e.id}-error` - }, A(o(d)), 9, Ld)) : e.help ? (a(), u("p", { + id: `${c.id}-error` + }, F(u.value), 9, Wd)) : c.help ? (o(), i("p", { key: 2, class: "mt-2 text-sm text-gray-500", - id: `${e.id}-description` - }, A(e.help), 9, Vd)) : k("", !0) + id: `${c.id}-description` + }, F(c.help), 9, Gd)) : x("", !0) ], 2)); } -}), Ad = ["for"], Td = ["id", "name", "value", "aria-invalid", "aria-describedby"], Fd = ["value"], Id = ["id"], Dd = { +}), Yd = ["for"], ec = ["id", "name", "value", "aria-invalid", "aria-describedby"], tc = ["value"], sc = ["id"], lc = { inheritAttrs: !1 -}, Od = /* @__PURE__ */ ue({ - ...Dd, +}, nc = /* @__PURE__ */ de({ + ...lc, __name: "SelectInput", props: { - status: null, - id: null, - modelValue: null, - inputClass: null, - label: null, - labelClass: null, - options: null, - values: null, - entries: null + status: {}, + id: {}, + modelValue: {}, + inputClass: {}, + label: {}, + labelClass: {}, + options: {}, + values: {}, + entries: {} }, setup(e) { - const t = e, l = (c) => c.value, n = f(() => t.label ?? Ee(nt(t.id))); - let i = qe("ApiState", void 0); - const r = f(() => ft.call({ responseStatus: t.status ?? (i == null ? void 0 : i.error.value) }, t.id)), d = f(() => t.entries || (t.values ? t.values.map((c) => ({ key: c, value: c })) : t.options ? Object.keys(t.options).map((c) => ({ key: c, value: t.options[c] })) : [])); - return (c, m) => (a(), u("div", { - class: w([c.$attrs.class]) + const t = (d) => d.value, s = e, n = v(() => s.label ?? Pe(at(s.id))); + let a = Qe("ApiState", void 0); + const r = v(() => mt.call({ responseStatus: s.status ?? (a == null ? void 0 : a.error.value) }, s.id)), u = v(() => s.entries || (s.values ? s.values.map((d) => ({ key: d, value: d })) : s.options ? Object.keys(s.options).map((d) => ({ key: d, value: s.options[d] })) : [])); + return (d, c) => (o(), i("div", { + class: y([d.$attrs.class]) }, [ - o(n) ? (a(), u("label", { + n.value ? (o(), i("label", { key: 0, - for: e.id, - class: w(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${e.labelClass ?? ""}`) - }, A(o(n)), 11, Ad)) : k("", !0), - s("select", Le({ - id: e.id, - name: e.id, + for: d.id, + class: y(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${d.labelClass ?? ""}`) + }, F(n.value), 11, Yd)) : x("", !0), + l("select", Te({ + id: d.id, + name: d.id, class: [ "mt-1 block w-full pl-3 pr-10 py-2 text-base focus:outline-none sm:text-sm rounded-md dark:text-white dark:bg-gray-900 dark:border-gray-600", - o(r) ? "border-red-300 text-red-900 focus:ring-red-500 focus:border-red-500" : "border-gray-300 text-gray-900 focus:ring-indigo-500 focus:border-indigo-500", - e.inputClass + r.value ? "border-red-300 text-red-900 focus:ring-red-500 focus:border-red-500" : "border-gray-300 text-gray-900 focus:ring-indigo-500 focus:border-indigo-500", + d.inputClass ], - value: e.modelValue, - onInput: m[0] || (m[0] = (h) => c.$emit("update:modelValue", l(h.target))), - "aria-invalid": o(r) != null, - "aria-describedby": `${e.id}-error` - }, o(ut)(c.$attrs, ["class"])), [ - (a(!0), u(Te, null, Ie(o(d), (h) => (a(), u("option", { - value: h.key - }, A(h.value), 9, Fd))), 256)) - ], 16, Td), - o(r) ? (a(), u("p", { + value: d.modelValue, + onInput: c[0] || (c[0] = (f) => d.$emit("update:modelValue", t(f.target))), + "aria-invalid": r.value != null, + "aria-describedby": `${d.id}-error` + }, X(ft)(d.$attrs, ["class"])), [ + (o(!0), i(Me, null, je(u.value, (f) => (o(), i("option", { + value: f.key + }, F(f.value), 9, tc))), 256)) + ], 16, ec), + r.value ? (o(), i("p", { key: 1, class: "mt-2 text-sm text-red-500", - id: `${e.id}-error` - }, A(o(r)), 9, Id)) : k("", !0) + id: `${d.id}-error` + }, F(r.value), 9, sc)) : x("", !0) ], 2)); } -}), jd = { class: "flex items-center h-5" }, Pd = ["id", "name", "checked"], Bd = { class: "ml-3 text-sm" }, Rd = ["for"], Hd = { +}), oc = { class: "flex items-center h-5" }, ac = ["id", "name", "checked"], rc = { class: "ml-3 text-sm" }, ic = ["for"], uc = { key: 0, class: "mt-2 text-sm text-red-500", id: "`${id}-error`" -}, Ed = { +}, dc = { key: 1, class: "mt-2 text-sm text-gray-500", id: "`${id}-description`" -}, zd = { +}, cc = { inheritAttrs: !1 -}, Nd = /* @__PURE__ */ ue({ - ...zd, +}, fc = /* @__PURE__ */ de({ + ...cc, __name: "CheckboxInput", props: { modelValue: { type: Boolean }, - status: null, - id: null, - inputClass: null, - label: null, - labelClass: null, - help: null + status: {}, + id: {}, + inputClass: {}, + label: {}, + labelClass: {}, + help: {} }, emits: ["update:modelValue"], setup(e, { emit: t }) { - const l = e, n = f(() => l.label ?? Ee(nt(l.id))); - let i = qe("ApiState", void 0); - const r = f(() => ft.call({ responseStatus: l.status ?? (i == null ? void 0 : i.error.value) }, l.id)); - return (d, c) => (a(), u("div", { - class: w(["relative flex items-start", d.$attrs.class]) + const s = e, n = v(() => s.label ?? Pe(at(s.id))); + let a = Qe("ApiState", void 0); + const r = v(() => mt.call({ responseStatus: s.status ?? (a == null ? void 0 : a.error.value) }, s.id)); + return (u, d) => (o(), i("div", { + class: y(["relative flex items-start", u.$attrs.class]) }, [ - s("div", jd, [ - s("input", Le({ - id: e.id, - name: e.id, + l("div", oc, [ + l("input", Te({ + id: u.id, + name: u.id, type: "checkbox", - checked: e.modelValue, - onInput: c[0] || (c[0] = (m) => d.$emit("update:modelValue", m.target.checked)), - class: ["focus:ring-indigo-500 h-4 w-4 text-indigo-600 rounded border-gray-300 dark:border-gray-600 dark:bg-gray-800", e.inputClass] - }, o(ut)(d.$attrs, ["class"])), null, 16, Pd) + checked: u.modelValue, + onInput: d[0] || (d[0] = (c) => u.$emit("update:modelValue", c.target.checked)), + class: ["focus:ring-indigo-500 h-4 w-4 text-indigo-600 rounded border-gray-300 dark:border-gray-600 dark:bg-gray-800", u.inputClass] + }, X(ft)(u.$attrs, ["class"])), null, 16, ac) ]), - s("div", Bd, [ - s("label", { - for: e.id, - class: w(`font-medium text-gray-700 dark:text-gray-300 ${e.labelClass ?? ""}`) - }, A(o(n)), 11, Rd), - o(r) ? (a(), u("p", Hd, A(o(r)), 1)) : e.help ? (a(), u("p", Ed, A(e.help), 1)) : k("", !0) + l("div", rc, [ + l("label", { + for: u.id, + class: y(`font-medium text-gray-700 dark:text-gray-300 ${u.labelClass ?? ""}`) + }, F(n.value), 11, ic), + r.value ? (o(), i("p", uc, F(r.value), 1)) : u.help ? (o(), i("p", dc, F(u.help), 1)) : x("", !0) ]) ], 2)); } -}), Ud = ["id"], qd = ["for"], Qd = { class: "mt-1 relative rounded-md shadow-sm" }, Kd = ["id", "name", "value"], Zd = ["onClick"], Gd = { class: "flex flex-wrap pb-1.5" }, Wd = { class: "pt-1.5 pl-1" }, Jd = { class: "inline-flex rounded-full items-center py-0.5 pl-2.5 pr-1 text-sm font-medium bg-indigo-100 dark:bg-indigo-800 text-indigo-700 dark:text-indigo-300" }, Xd = ["onClick"], Yd = /* @__PURE__ */ s("svg", { +}), vc = ["id"], pc = ["for"], mc = { class: "mt-1 relative rounded-md shadow-sm" }, hc = ["id", "name", "value"], gc = { class: "flex flex-wrap pb-1.5" }, yc = { class: "pt-1.5 pl-1" }, bc = { class: "inline-flex rounded-full items-center py-0.5 pl-2.5 pr-1 text-sm font-medium bg-indigo-100 dark:bg-indigo-800 text-indigo-700 dark:text-indigo-300" }, wc = ["onClick"], kc = /* @__PURE__ */ l("svg", { class: "h-2 w-2", stroke: "currentColor", fill: "none", viewBox: "0 0 8 8" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "stroke-linecap": "round", "stroke-width": "1.5", d: "M1 1l6 6m0-6L1 7" }) -], -1), ec = [ - Yd -], tc = { class: "pt-1.5 pl-1 shrink" }, lc = ["type", "name", "id", "aria-invalid", "aria-describedby", "onPaste"], nc = ["id"], sc = ["onMouseover", "onClick"], oc = { class: "block truncate" }, ac = { +], -1), _c = [ + kc +], $c = { class: "pt-1.5 pl-1 shrink" }, Cc = ["type", "name", "id", "aria-invalid", "aria-describedby"], xc = ["id"], Lc = ["onMouseover", "onClick"], Vc = { class: "block truncate" }, Sc = { key: 1, class: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none" -}, ic = /* @__PURE__ */ s("svg", { +}, Mc = /* @__PURE__ */ l("svg", { class: "h-5 w-5 text-red-500", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z", "clip-rule": "evenodd" }) -], -1), rc = [ - ic -], uc = ["id"], dc = ["id"], cc = { +], -1), Ac = [ + Mc +], Tc = ["id"], Fc = ["id"], Ic = { inheritAttrs: !1 -}, fc = /* @__PURE__ */ ue({ - ...cc, +}, jc = /* @__PURE__ */ de({ + ...Ic, __name: "TagInput", props: { - status: null, - id: null, - type: null, - inputClass: null, - label: null, - labelClass: null, - help: null, + status: {}, + id: {}, + type: {}, + inputClass: {}, + label: {}, + labelClass: {}, + help: {}, modelValue: { default: () => [] }, delimiters: { default: () => [","] }, - allowableValues: null, + allowableValues: {}, string: { type: Boolean }, - converter: null + maxVisibleItems: { default: 300 }, + converter: {} }, emits: ["update:modelValue"], setup(e, { emit: t }) { - const l = e; - function n(x) { - return l.converter ? l.converter(x) : x; + const s = e, n = t; + function a(w) { + return s.converter ? s.converter(w) : w; } - const i = f(() => Ue(n(l.modelValue), (x) => typeof x == "string" ? x.trim().length == 0 ? [] : x.split(",") : x) || []), r = M(), d = M(!1), c = f(() => !l.allowableValues || l.allowableValues.length == 0 ? [] : l.allowableValues.filter((x) => !i.value.includes(x) && x.toLowerCase().includes(y.value.toLowerCase()))); - function m(x) { - r.value = x; + const r = v(() => Ze(a(s.modelValue), (w) => typeof w == "string" ? w.trim().length == 0 ? [] : w.split(",") : w) || []), u = O(), d = O(!1), c = v(() => { + const w = $.value.toLowerCase(); + return !s.allowableValues || s.allowableValues.length == 0 ? [] : s.allowableValues.length < 1e3 ? s.allowableValues.filter((N) => !r.value.includes(N) && N.toLowerCase().includes(w)) : s.allowableValues.filter((N) => !r.value.includes(N) && N.startsWith(w)); + }); + function f(w) { + u.value = w; } - const h = M(null), y = M(""), b = f(() => l.type || "text"), p = f(() => l.label ?? Ee(nt(l.id))); - let v = qe("ApiState", void 0); - const g = f(() => ft.call({ responseStatus: l.status ?? (v == null ? void 0 : v.error.value) }, l.id)), O = f(() => [ + const p = O(null), $ = O(""), m = v(() => s.type || "text"), k = v(() => s.label ?? Pe(at(s.id))); + let g = Qe("ApiState", void 0); + const b = v(() => mt.call({ responseStatus: s.status ?? (g == null ? void 0 : g.error.value) }, s.id)), P = v(() => [ "w-full cursor-text flex flex-wrap sm:text-sm rounded-md dark:text-white dark:bg-gray-900 border focus-within:border-transparent focus-within:ring-1 focus-within:outline-none", - g.value ? "pr-10 border-red-300 text-red-900 placeholder-red-300 focus-within:outline-none focus-within:ring-red-500 focus-within:border-red-500" : "shadow-sm border-gray-300 dark:border-gray-600 focus-within:ring-indigo-500 focus-within:border-indigo-500", - l.inputClass - ]), U = (x) => j(i.value.filter((W) => W != x)); - function Y(x) { - var W; - document.activeElement === x.target && ((W = h.value) == null || W.focus()); - } - const R = M(); - function N() { - d.value = !0, R.value = !0; + b.value ? "pr-10 border-red-300 text-red-900 placeholder-red-300 focus-within:outline-none focus-within:ring-red-500 focus-within:border-red-500" : "shadow-sm border-gray-300 dark:border-gray-600 focus-within:ring-indigo-500 focus-within:border-indigo-500", + s.inputClass + ]), I = (w) => L(r.value.filter((N) => N != w)); + function se(w) { + var N; + document.activeElement === w.target && ((N = p.value) == null || N.focus()); } + const j = O(); function T() { - N(); + d.value = !0, j.value = !0; } - function J() { - te(q()), R.value = !1, setTimeout(() => { - R.value || (d.value = !1); + function M() { + T(); + } + function ie() { + q(K()), j.value = !1, setTimeout(() => { + j.value || (d.value = !1); }, 200); } - function j(x) { - const W = l.string ? x.join(",") : x; - t("update:modelValue", W); + function L(w) { + const N = s.string ? w.join(",") : w; + n("update:modelValue", N); } - function L(x) { - if (x.key == "Backspace" && y.value.length == 0 && i.value.length > 0 && U(i.value[i.value.length - 1]), !(!l.allowableValues || l.allowableValues.length == 0)) - if (x.code == "Escape" || x.code == "Tab") + function z(w) { + if (w.key == "Backspace" && $.value.length == 0 && r.value.length > 0 && I(r.value[r.value.length - 1]), !(!s.allowableValues || s.allowableValues.length == 0)) + if (w.code == "Escape" || w.code == "Tab") d.value = !1; - else if (x.code == "Home") - r.value = c.value[0], ne(); - else if (x.code == "End") - r.value = c.value[c.value.length - 1], ne(); - else if (x.code == "ArrowDown") { - if (d.value = !0, !r.value) - r.value = c.value[0]; + else if (w.code == "Home") + u.value = c.value[0], W(); + else if (w.code == "End") + u.value = c.value[c.value.length - 1], W(); + else if (w.code == "ArrowDown") { + if (d.value = !0, !u.value) + u.value = c.value[0]; else { - const W = c.value.indexOf(r.value); - r.value = W + 1 < c.value.length ? c.value[W + 1] : c.value[0]; + const N = c.value.indexOf(u.value); + u.value = N + 1 < c.value.length ? c.value[N + 1] : c.value[0]; } ee(); - } else if (x.code == "ArrowUp") { - if (!r.value) - r.value = c.value[c.value.length - 1]; + } else if (w.code == "ArrowUp") { + if (!u.value) + u.value = c.value[c.value.length - 1]; else { - const W = c.value.indexOf(r.value); - r.value = W - 1 >= 0 ? c.value[W - 1] : c.value[c.value.length - 1]; + const N = c.value.indexOf(u.value); + u.value = N - 1 >= 0 ? c.value[N - 1] : c.value[c.value.length - 1]; } ee(); } else - x.code == "Enter" ? r.value && d.value ? (te(r.value), x.preventDefault()) : d.value = !1 : d.value = c.value.length > 0; + w.code == "Enter" ? u.value && d.value ? (q(u.value), w.preventDefault()) : d.value = !1 : d.value = c.value.length > 0; } - function q() { - if (y.value.length == 0) + function K() { + if ($.value.length == 0) return ""; - let x = bo(y.value.trim(), ","); - return x[0] == "," && (x = x.substring(1)), x = x.trim(), x.length == 0 && d.value && c.value.length > 0 ? r.value : x; - } - function D(x) { - const W = q(); - if (W.length > 0) { - const E = l.delimiters.some((C) => C == x.key); - if (E && x.preventDefault(), x.key == "Enter" || x.key == "NumpadEnter" || x.key.length == 1 && E) { - te(W); + let w = Po($.value.trim(), ","); + return w[0] == "," && (w = w.substring(1)), w = w.trim(), w.length == 0 && d.value && c.value.length > 0 ? u.value : w; + } + function le(w) { + const N = K(); + if (N.length > 0) { + const E = s.delimiters.some((C) => C == w.key); + if (E && w.preventDefault(), w.key == "Enter" || w.key == "NumpadEnter" || w.key.length == 1 && E) { + q(N); return; } } } - const K = { behavior: "smooth", block: "nearest", inline: "nearest", scrollMode: "if-needed" }; - function ne() { + const R = { behavior: "smooth", block: "nearest", inline: "nearest", scrollMode: "if-needed" }; + function W() { setTimeout(() => { - let x = pl(`#${l.id}-tag li.active`); - x && x.scrollIntoView(K); + let w = _s(`#${s.id}-tag li.active`); + w && w.scrollIntoView(R); }, 0); } function ee() { setTimeout(() => { - let x = pl(`#${l.id}-tag li.active`); - x && ("scrollIntoViewIfNeeded" in x ? x.scrollIntoViewIfNeeded(K) : x.scrollIntoView(K)); + let w = _s(`#${s.id}-tag li.active`); + w && ("scrollIntoViewIfNeeded" in w ? w.scrollIntoViewIfNeeded(R) : w.scrollIntoView(R)); }, 0); } - function te(x) { - if (x.length === 0) + function q(w) { + if (w.length === 0) return; - const W = Array.from(i.value); - W.indexOf(x) == -1 && W.push(x), j(W), y.value = "", d.value = !1; + const N = Array.from(r.value); + N.indexOf(w) == -1 && N.push(w), L(N), $.value = "", d.value = !1; } - function S(x) { + function A(w) { var E; - const W = (E = x.clipboardData) == null ? void 0 : E.getData("Text"); - le(W); + const N = (E = w.clipboardData) == null ? void 0 : E.getData("Text"); + te(N); } - function le(x) { - if (!x) + function te(w) { + if (!w) return; - const W = new RegExp(`\\n|\\t|${l.delimiters.join("|")}`), E = Array.from(i.value); - x.split(W).map((C) => C.trim()).forEach((C) => { + const N = new RegExp(`\\n|\\t|${s.delimiters.join("|")}`), E = Array.from(r.value); + w.split(N).map((C) => C.trim()).forEach((C) => { E.indexOf(C) == -1 && E.push(C); - }), j(E), y.value = ""; + }), L(E), $.value = ""; } - return (x, W) => (a(), u("div", { - class: w([x.$attrs.class]), - id: `${e.id}-tag`, + return (w, N) => (o(), i("div", { + class: y([w.$attrs.class]), + id: `${w.id}-tag`, onmousemove: "cancelBlur=true" }, [ - o(p) ? (a(), u("label", { + k.value ? (o(), i("label", { key: 0, - for: e.id, - class: w(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${e.labelClass ?? ""}`) - }, A(o(p)), 11, qd)) : k("", !0), - s("div", Qd, [ - s("input", { + for: w.id, + class: y(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${w.labelClass ?? ""}`) + }, F(k.value), 11, pc)) : x("", !0), + l("div", mc, [ + l("input", { type: "hidden", - id: e.id, - name: e.id, - value: o(i).join(",") - }, null, 8, Kd), - s("button", { - class: w(o(O)), - onClick: Ne(Y, ["prevent"]), - onFocus: W[2] || (W[2] = (E) => d.value = !0), + id: w.id, + name: w.id, + value: r.value.join(",") + }, null, 8, hc), + l("button", { + class: y(P.value), + onClick: Ue(se, ["prevent"]), + onFocus: N[2] || (N[2] = (E) => d.value = !0), tabindex: "-1" }, [ - s("div", Gd, [ - (a(!0), u(Te, null, Ie(o(i), (E) => (a(), u("div", Wd, [ - s("span", Jd, [ - xe(A(E) + " ", 1), - s("button", { + l("div", gc, [ + (o(!0), i(Me, null, je(r.value, (E) => (o(), i("div", yc, [ + l("span", bc, [ + ke(F(E) + " ", 1), + l("button", { type: "button", - onClick: (G) => U(E), + onClick: (h) => I(E), class: "flex-shrink-0 ml-1 h-4 w-4 rounded-full inline-flex items-center justify-center text-indigo-400 dark:text-indigo-500 hover:bg-indigo-200 dark:hover:bg-indigo-800 hover:text-indigo-500 dark:hover:text-indigo-400 focus:outline-none focus:bg-indigo-500 focus:text-white dark:focus:text-black" - }, ec, 8, Xd) + }, _c, 8, wc) ]) ]))), 256)), - s("div", tc, [ - kt(s("input", Le({ + l("div", $c, [ + Mt(l("input", Te({ ref_key: "txtInput", - ref: h, - type: o(b), + ref: p, + type: m.value, role: "combobox", "aria-controls": "options", "aria-expanded": "false", autocomplete: "off", spellcheck: "false", - name: `${e.id}-txt`, - id: `${e.id}-txt`, + name: `${w.id}-txt`, + id: `${w.id}-txt`, class: "p-0 dark:bg-transparent rounded-md border-none focus:!border-none focus:!outline-none", - style: `box-shadow:none !important;width:${y.value.length + 1}ch`, - "onUpdate:modelValue": W[0] || (W[0] = (E) => y.value = E), - "aria-invalid": o(g) != null, - "aria-describedby": `${e.id}-error`, - onKeydown: L, - onKeypress: D, - onPaste: Ne(S, ["prevent", "stop"]), - onFocus: T, - onBlur: J, - onClick: W[1] || (W[1] = (E) => d.value = !0) - }, o(ut)(x.$attrs, ["class", "required"])), null, 16, lc), [ - [no, y.value] + style: `box-shadow:none !important;width:${$.value.length + 1}ch`, + "onUpdate:modelValue": N[0] || (N[0] = (E) => $.value = E), + "aria-invalid": b.value != null, + "aria-describedby": `${w.id}-error`, + onKeydown: z, + onKeypress: le, + onPaste: Ue(A, ["prevent", "stop"]), + onFocus: M, + onBlur: ie, + onClick: N[1] || (N[1] = (E) => d.value = !0) + }, X(ft)(w.$attrs, ["class", "required"])), null, 16, Cc), [ + [wo, $.value] ]) ]) ]) - ], 42, Zd), - d.value && o(c).length ? (a(), u("ul", { + ], 34), + d.value && c.value.length ? (o(), i("ul", { key: 0, class: "absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white dark:bg-black py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm", - onKeydown: L, - id: `${e.id}-options`, + onKeydown: z, + id: `${w.id}-options`, role: "listbox" }, [ - (a(!0), u(Te, null, Ie(o(c), (E) => (a(), u("li", { - class: w([E === r.value ? "active bg-indigo-600 text-white" : "text-gray-900 dark:text-gray-100", "relative cursor-default select-none py-2 pl-3 pr-9"]), - onMouseover: (G) => m(E), - onClick: (G) => te(E), + (o(!0), i(Me, null, je(c.value.slice(0, w.maxVisibleItems), (E) => (o(), i("li", { + class: y([E === u.value ? "active bg-indigo-600 text-white" : "text-gray-900 dark:text-gray-100", "relative cursor-default select-none py-2 pl-3 pr-9"]), + onMouseover: (h) => f(E), + onClick: (h) => q(E), role: "option", tabindex: "-1" }, [ - s("span", oc, A(E), 1) - ], 42, sc))), 256)) - ], 40, nc)) : k("", !0), - o(g) ? (a(), u("div", ac, rc)) : k("", !0) + l("span", Vc, F(E), 1) + ], 42, Lc))), 256)) + ], 40, xc)) : x("", !0), + b.value ? (o(), i("div", Sc, Ac)) : x("", !0) ]), - o(g) ? (a(), u("p", { + b.value ? (o(), i("p", { key: 1, class: "mt-2 text-sm text-red-500", - id: `${e.id}-error` - }, A(o(g)), 9, uc)) : e.help ? (a(), u("p", { + id: `${w.id}-error` + }, F(b.value), 9, Tc)) : w.help ? (o(), i("p", { key: 2, class: "mt-2 text-sm text-gray-500", - id: `${e.id}-description` - }, A(e.help), 9, dc)) : k("", !0) - ], 10, Ud)); + id: `${w.id}-description` + }, F(w.help), 9, Fc)) : x("", !0) + ], 10, vc)); } -}), mc = { class: "relative flex-grow mr-2 sm:mr-4" }, vc = ["for"], hc = { class: "block mt-2" }, gc = { class: "sr-only" }, pc = ["multiple", "name", "id", "placeholder", "aria-invalid", "aria-describedby"], yc = { +}), Oc = { class: "relative flex-grow mr-2 sm:mr-4" }, Dc = ["for"], Pc = { class: "block mt-2" }, Bc = { class: "sr-only" }, Hc = ["multiple", "name", "id", "placeholder", "aria-invalid", "aria-describedby"], Rc = { key: 0, class: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none" -}, bc = /* @__PURE__ */ s("svg", { +}, Ec = /* @__PURE__ */ l("svg", { class: "h-5 w-5 text-red-500", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z", "clip-rule": "evenodd" }) -], -1), wc = [ - bc -], xc = ["id"], kc = ["id"], $c = { key: 0 }, Cc = ["title"], _c = ["alt", "src"], Lc = { +], -1), zc = [ + Ec +], Nc = ["id"], Uc = ["id"], qc = { key: 0 }, Qc = ["title"], Kc = ["alt", "src"], Zc = { key: 1, class: "mt-3" -}, Vc = { class: "w-full" }, Sc = { class: "pr-6 align-bottom pb-2" }, Mc = ["title"], Ac = ["src", "onError"], Tc = ["href"], Fc = { +}, Wc = { class: "w-full" }, Gc = { class: "pr-6 align-bottom pb-2" }, Jc = ["title"], Xc = ["src", "onError"], Yc = ["href"], e0 = { key: 1, class: "overflow-hidden" -}, Ic = { class: "align-top pb-2 whitespace-nowrap" }, Dc = { +}, t0 = { class: "align-top pb-2 whitespace-nowrap" }, s0 = { key: 0, class: "text-gray-500 dark:text-gray-400 text-sm bg-white dark:bg-black" -}, Oc = /* @__PURE__ */ ue({ +}, l0 = /* @__PURE__ */ de({ __name: "FileInput", props: { multiple: { type: Boolean }, - status: null, - id: null, - inputClass: null, - label: null, - labelClass: null, - help: null, - placeholder: null, - modelValue: null, - values: null, - files: null + status: {}, + id: {}, + inputClass: {}, + label: {}, + labelClass: {}, + help: {}, + placeholder: {}, + modelValue: {}, + values: {}, + files: {} }, setup(e) { var T; - const t = e, l = M(null), { assetsPathResolver: n, fallbackPathResolver: i } = St(), r = {}, d = M(), c = M(((T = t.files) == null ? void 0 : T.map(m)) || []); - function m(J) { - return J.filePath = n(J.filePath), J; - } - t.values && t.values.length > 0 && (c.value = t.values.map((J) => { - let j = J.replace(/\\/g, "/"); - return { fileName: wo($t(j, "/"), "."), filePath: j, contentType: Ql(j) }; - }).map(m)); - const h = f(() => t.label ?? Ee(nt(t.id))), y = f(() => t.placeholder ?? h.value); - let b = qe("ApiState", void 0); - const p = f(() => ft.call({ responseStatus: t.status ?? (b == null ? void 0 : b.error.value) }, t.id)), v = f(() => [ + const t = e, s = O(null), { assetsPathResolver: n, fallbackPathResolver: a } = It(), r = {}, u = O(), d = O(((T = t.files) == null ? void 0 : T.map(c)) || []); + function c(M) { + return M.filePath = n(M.filePath), M; + } + t.values && t.values.length > 0 && (d.value = t.values.map((M) => { + let ie = M.replace(/\\/g, "/"); + return { fileName: rn(At(ie, "/"), "."), filePath: ie, contentType: Ys(ie) }; + }).map(c)); + const f = v(() => t.label ?? Pe(at(t.id))), p = v(() => t.placeholder ?? f.value); + let $ = Qe("ApiState", void 0); + const m = v(() => mt.call({ responseStatus: t.status ?? ($ == null ? void 0 : $.error.value) }, t.id)), k = v(() => [ "block w-full sm:text-sm rounded-md dark:text-white dark:bg-gray-900 file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-violet-50 dark:file:bg-violet-900 file:text-violet-700 dark:file:text-violet-200 hover:file:bg-violet-100 dark:hover:file:bg-violet-800", - p.value ? "pr-10 border-red-300 text-red-900 placeholder-red-300 focus:outline-none focus:ring-red-500 focus:border-red-500" : "text-slate-500 dark:text-slate-400", + m.value ? "pr-10 border-red-300 text-red-900 placeholder-red-300 focus:outline-none focus:ring-red-500 focus:border-red-500" : "text-slate-500 dark:text-slate-400", t.inputClass - ]), g = (J) => { - let j = J.target; - d.value = "", c.value = Array.from(j.files || []).map((L) => ({ + ]), g = (M) => { + let ie = M.target; + u.value = "", d.value = Array.from(ie.files || []).map((L) => ({ fileName: L.name, - filePath: rn(L), + filePath: pl(L), contentLength: L.size, - contentType: L.type || Ql(L.name) + contentType: L.type || Ys(L.name) })); - }, O = () => { - var J; - return (J = l.value) == null ? void 0 : J.click(); - }, U = (J) => J == null ? !1 : J.startsWith("data:") || J.startsWith("blob:"), Y = f(() => { - if (c.value.length > 0) - return c.value[0].filePath; - let J = typeof t.modelValue == "string" ? t.modelValue : t.values && t.values[0]; - return J && pt(n(J)) || null; - }), R = (J) => !J || J.startsWith("data:") || J.endsWith(".svg") ? "" : "rounded-full object-cover"; - function N(J) { - d.value = i(Y.value); - } - return Pt(rs), (J, j) => (a(), u("div", { - class: w(["flex", e.multiple ? "flex-col" : "justify-between"]) + }, b = () => { + var M; + return (M = s.value) == null ? void 0 : M.click(); + }, P = (M) => M == null ? !1 : M.startsWith("data:") || M.startsWith("blob:"), I = v(() => { + if (d.value.length > 0) + return d.value[0].filePath; + let M = typeof t.modelValue == "string" ? t.modelValue : t.values && t.values[0]; + return M && xt(n(M)) || null; + }), se = (M) => !M || M.startsWith("data:") || M.endsWith(".svg") ? "" : "rounded-full object-cover"; + function j(M) { + u.value = a(I.value); + } + return Ft(Cn), (M, ie) => (o(), i("div", { + class: y(["flex", M.multiple ? "flex-col" : "justify-between"]) }, [ - s("div", mc, [ - o(h) ? (a(), u("label", { + l("div", Oc, [ + f.value ? (o(), i("label", { key: 0, - for: e.id, - class: w(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${e.labelClass ?? ""}`) - }, A(o(h)), 11, vc)) : k("", !0), - s("div", hc, [ - s("span", gc, A(e.help ?? o(h)), 1), - s("input", Le({ + for: M.id, + class: y(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${M.labelClass ?? ""}`) + }, F(f.value), 11, Dc)) : x("", !0), + l("div", Pc, [ + l("span", Bc, F(M.help ?? f.value), 1), + l("input", Te({ ref_key: "input", - ref: l, + ref: s, type: "file", - multiple: e.multiple, - name: e.id, - id: e.id, - class: o(v), - placeholder: o(y), - "aria-invalid": o(p) != null, - "aria-describedby": `${e.id}-error` - }, J.$attrs, { onChange: g }), null, 16, pc), - o(p) ? (a(), u("div", yc, wc)) : k("", !0) + multiple: M.multiple, + name: M.id, + id: M.id, + class: k.value, + placeholder: p.value, + "aria-invalid": m.value != null, + "aria-describedby": `${M.id}-error` + }, M.$attrs, { onChange: g }), null, 16, Hc), + m.value ? (o(), i("div", Rc, zc)) : x("", !0) ]), - o(p) ? (a(), u("p", { + m.value ? (o(), i("p", { key: 1, class: "mt-2 text-sm text-red-500", - id: `${e.id}-error` - }, A(o(p)), 9, xc)) : e.help ? (a(), u("p", { + id: `${M.id}-error` + }, F(m.value), 9, Nc)) : M.help ? (o(), i("p", { key: 2, class: "mt-2 text-sm text-gray-500", - id: `${e.id}-description` - }, A(e.help), 9, kc)) : k("", !0) + id: `${M.id}-description` + }, F(M.help), 9, Uc)) : x("", !0) ]), - e.multiple ? (a(), u("div", Lc, [ - s("table", Vc, [ - (a(!0), u(Te, null, Ie(c.value, (L) => (a(), u("tr", null, [ - s("td", Sc, [ - s("div", { + M.multiple ? (o(), i("div", Zc, [ + l("table", Wc, [ + (o(!0), i(Me, null, je(d.value, (L) => (o(), i("tr", null, [ + l("td", Gc, [ + l("div", { class: "flex w-full", - title: U(L.filePath) ? "" : L.filePath + title: P(L.filePath) ? "" : L.filePath }, [ - s("img", { - src: r[o(pt)(L.filePath)] || o(n)(o(pt)(L.filePath)), - class: w(["mr-2 h-8 w-8", R(L.filePath)]), - onError: (q) => r[o(pt)(L.filePath)] = o(i)(o(pt)(L.filePath)) - }, null, 42, Ac), - U(L.filePath) ? (a(), u("span", Fc, A(L.fileName), 1)) : (a(), u("a", { + l("img", { + src: r[X(xt)(L.filePath)] || X(n)(X(xt)(L.filePath)), + class: y(["mr-2 h-8 w-8", se(L.filePath)]), + onError: (z) => r[X(xt)(L.filePath)] = X(a)(X(xt)(L.filePath)) + }, null, 42, Xc), + P(L.filePath) ? (o(), i("span", e0, F(L.fileName), 1)) : (o(), i("a", { key: 0, - href: o(n)(L.filePath || ""), + href: X(n)(L.filePath || ""), target: "_blank", class: "overflow-hidden" - }, A(L.fileName), 9, Tc)) - ], 8, Mc) + }, F(L.fileName), 9, Yc)) + ], 8, Jc) ]), - s("td", Ic, [ - L.contentLength && L.contentLength > 0 ? (a(), u("span", Dc, A(o(dn)(L.contentLength)), 1)) : k("", !0) + l("td", t0, [ + L.contentLength && L.contentLength > 0 ? (o(), i("span", s0, F(X(hl)(L.contentLength)), 1)) : x("", !0) ]) ]))), 256)) ]) - ])) : (a(), u("div", $c, [ - o(Y) ? (a(), u("div", { + ])) : (o(), i("div", qc, [ + I.value ? (o(), i("div", { key: 0, class: "shrink-0 cursor-pointer", - title: U(o(Y)) ? "" : o(Y) + title: P(I.value) ? "" : I.value }, [ - s("img", { - onClick: O, - class: w(["h-16 w-16", R(o(Y))]), - alt: `Current ${o(h) ?? ""}`, - src: d.value || o(n)(o(Y)), - onError: N - }, null, 42, _c) - ], 8, Cc)) : k("", !0) + l("img", { + onClick: b, + class: y(["h-16 w-16", se(I.value)]), + alt: `Current ${f.value ?? ""}`, + src: u.value || X(n)(I.value), + onError: j + }, null, 42, Kc) + ], 8, Qc)) : x("", !0) ])) ], 2)); } -}), jc = ["id"], Pc = ["for"], Bc = { class: "relative mt-1" }, Rc = ["id", "placeholder"], Hc = /* @__PURE__ */ s("svg", { +}), n0 = ["id"], o0 = ["for"], a0 = { class: "relative mt-1" }, r0 = ["id", "placeholder"], i0 = /* @__PURE__ */ l("svg", { class: "h-5 w-5 text-gray-400 dark:text-gray-500", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M10 3a.75.75 0 01.55.24l3.25 3.5a.75.75 0 11-1.1 1.02L10 4.852 7.3 7.76a.75.75 0 01-1.1-1.02l3.25-3.5A.75.75 0 0110 3zm-3.76 9.2a.75.75 0 011.06.04l2.7 2.908 2.7-2.908a.75.75 0 111.1 1.02l-3.25 3.5a.75.75 0 01-1.1 0l-3.25-3.5a.75.75 0 01.04-1.06z", "clip-rule": "evenodd" }) -], -1), Ec = [ - Hc -], zc = ["id"], Nc = ["onMouseover", "onClick"], Uc = /* @__PURE__ */ s("svg", { +], -1), u0 = [ + i0 +], d0 = ["id"], c0 = ["onMouseover", "onClick"], f0 = /* @__PURE__ */ l("svg", { class: "h-5 w-5", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z", "clip-rule": "evenodd" }) -], -1), qc = [ - Uc -], Qc = { +], -1), v0 = [ + f0 +], p0 = { key: 2, class: "absolute inset-y-0 right-0 pr-3 flex items-center pointer-events-none", tabindex: "-1" -}, Kc = /* @__PURE__ */ s("svg", { +}, m0 = /* @__PURE__ */ l("svg", { class: "h-5 w-5 text-red-500", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z", "clip-rule": "evenodd" }) -], -1), Zc = [ - Kc -], Gc = ["id"], Wc = ["id"], Jc = /* @__PURE__ */ ue({ +], -1), h0 = [ + m0 +], g0 = ["id"], y0 = ["id"], b0 = /* @__PURE__ */ de({ __name: "Autocomplete", props: { - status: null, - id: null, - type: null, - label: null, - help: null, - placeholder: null, + status: {}, + id: {}, + type: {}, + label: {}, + help: {}, + placeholder: {}, multiple: { type: Boolean, default: !1 }, required: { type: Boolean }, options: { default: () => [] }, - modelValue: null, - match: null, + modelValue: {}, + match: {}, viewCount: { default: 100 }, pageSize: { default: 8 } }, emits: ["update:modelValue"], - setup(e, { expose: t, emit: l }) { - const n = e, i = M(!1); - t({ toggle: K }); - function r(S) { - return Array.isArray(n.modelValue) && n.modelValue.indexOf(S) >= 0; - } - const d = f(() => n.label ?? Ee(nt(n.id))); - let c = qe("ApiState", void 0); - const m = f(() => ft.call({ responseStatus: n.status ?? (c == null ? void 0 : c.error.value) }, n.id)), h = f(() => [lt.base, m.value ? lt.invalid : lt.valid]), y = M(null), b = M(""), p = M(null), v = M(n.viewCount), g = M([]), O = f(() => b.value ? n.options.filter((le) => n.match(le, b.value)).slice(0, v.value) : n.options), U = ["Tab", "Escape", "ArrowDown", "ArrowUp", "Enter", "PageUp", "PageDown", "Home", "End"]; - function Y(S) { - p.value = S, g.value.indexOf(S) > Math.floor(v.value * 0.9) && (v.value += n.viewCount, te()); - } - const R = [",", ` + setup(e, { expose: t, emit: s }) { + const n = O(!1), a = e, r = s; + t({ toggle: R }); + function u(A) { + return Array.isArray(a.modelValue) && a.modelValue.indexOf(A) >= 0; + } + const d = v(() => a.label ?? Pe(at(a.id))); + let c = Qe("ApiState", void 0); + const f = v(() => mt.call({ responseStatus: a.status ?? (c == null ? void 0 : c.error.value) }, a.id)), p = v(() => [ot.base, f.value ? ot.invalid : ot.valid]), $ = O(null), m = O(""), k = O(null), g = O(a.viewCount), b = O([]), P = v(() => m.value ? a.options.filter((te) => a.match(te, m.value)).slice(0, g.value) : a.options), I = ["Tab", "Escape", "ArrowDown", "ArrowUp", "Enter", "PageUp", "PageDown", "Home", "End"]; + function se(A) { + k.value = A, b.value.indexOf(A) > Math.floor(g.value * 0.9) && (g.value += a.viewCount, q()); + } + const j = [",", ` `, " "]; - function N(S) { - var x; - const le = (x = S.clipboardData) == null ? void 0 : x.getData("Text"); - T(le); + function T(A) { + var w; + const te = (w = A.clipboardData) == null ? void 0 : w.getData("Text"); + M(te); } - function T(S) { - if (!S) + function M(A) { + if (!A) return; - const le = R.some((x) => S.includes(x)); - if (!n.multiple || !le) { - const x = n.options.filter((W) => n.match(W, S)); - x.length == 1 && (ee(x[0]), i.value = !1, cl()); - } else if (le) { - const x = new RegExp("\\r|\\n|\\t|,"), E = S.split(x).filter((G) => G.trim()).map((G) => n.options.find((C) => n.match(C, G))).filter((G) => !!G); + const te = j.some((w) => A.includes(w)); + if (!a.multiple || !te) { + const w = a.options.filter((N) => a.match(N, A)); + w.length == 1 && (ee(w[0]), n.value = !1, hs()); + } else if (te) { + const w = new RegExp("\\r|\\n|\\t|,"), E = A.split(w).filter((h) => h.trim()).map((h) => a.options.find((C) => a.match(C, h))).filter((h) => !!h); if (E.length > 0) { - b.value = "", i.value = !1, p.value = null; - let G = Array.from(n.modelValue || []); + m.value = "", n.value = !1, k.value = null; + let h = Array.from(a.modelValue || []); E.forEach((C) => { - r(C) ? G = G.filter((_) => _ != C) : G.push(C); - }), l("update:modelValue", G), cl(); + u(C) ? h = h.filter((Y) => Y != C) : h.push(C); + }), r("update:modelValue", h), hs(); } } } - function J(S) { - U.indexOf(S.code) || ne(); + function ie(A) { + I.indexOf(A.code) || W(); } - function j(S) { - if (!(S.shiftKey || S.ctrlKey || S.altKey)) { - if (!i.value) { - S.code == "ArrowDown" && (i.value = !0, p.value = g.value[0]); + function L(A) { + if (!(A.shiftKey || A.ctrlKey || A.altKey)) { + if (!n.value) { + A.code == "ArrowDown" && (n.value = !0, k.value = b.value[0]); return; } - if (S.code == "Escape") - i.value && (S.stopPropagation(), i.value = !1); - else if (S.code == "Tab") - i.value = !1; - else if (S.code == "Home") - p.value = g.value[0], q(); - else if (S.code == "End") - p.value = g.value[g.value.length - 1], q(); - else if (S.code == "ArrowDown") { - if (!p.value) - p.value = g.value[0]; + if (A.code == "Escape") + n.value && (A.stopPropagation(), n.value = !1); + else if (A.code == "Tab") + n.value = !1; + else if (A.code == "Home") + k.value = b.value[0], K(); + else if (A.code == "End") + k.value = b.value[b.value.length - 1], K(); + else if (A.code == "ArrowDown") { + if (!k.value) + k.value = b.value[0]; else { - const le = g.value.indexOf(p.value); - p.value = le + 1 < g.value.length ? g.value[le + 1] : g.value[0]; + const te = b.value.indexOf(k.value); + k.value = te + 1 < b.value.length ? b.value[te + 1] : b.value[0]; } - D(); - } else if (S.code == "ArrowUp") { - if (!p.value) - p.value = g.value[g.value.length - 1]; + le(); + } else if (A.code == "ArrowUp") { + if (!k.value) + k.value = b.value[b.value.length - 1]; else { - const le = g.value.indexOf(p.value); - p.value = le - 1 >= 0 ? g.value[le - 1] : g.value[g.value.length - 1]; + const te = b.value.indexOf(k.value); + k.value = te - 1 >= 0 ? b.value[te - 1] : b.value[b.value.length - 1]; } - D(); + le(); } else - S.code == "Enter" && (p.value ? (ee(p.value), n.multiple || (S.preventDefault(), cl())) : i.value = !1); + A.code == "Enter" && (k.value ? (ee(k.value), a.multiple || (A.preventDefault(), hs())) : n.value = !1); } } - const L = { behavior: "smooth", block: "nearest", inline: "nearest", scrollMode: "if-needed" }; - function q() { + const z = { behavior: "smooth", block: "nearest", inline: "nearest", scrollMode: "if-needed" }; + function K() { setTimeout(() => { - let S = pl(`#${n.id}-autocomplete li.active`); - S && S.scrollIntoView(L); + let A = _s(`#${a.id}-autocomplete li.active`); + A && A.scrollIntoView(z); }, 0); } - function D() { + function le() { setTimeout(() => { - let S = pl(`#${n.id}-autocomplete li.active`); - S && ("scrollIntoViewIfNeeded" in S ? S.scrollIntoViewIfNeeded(L) : S.scrollIntoView(L)); + let A = _s(`#${a.id}-autocomplete li.active`); + A && ("scrollIntoViewIfNeeded" in A ? A.scrollIntoViewIfNeeded(z) : A.scrollIntoView(z)); }, 0); } - function K(S) { - var le; - i.value = S, S && (ne(), (le = y.value) == null || le.focus()); + function R(A) { + var te; + n.value = A, A && (W(), (te = $.value) == null || te.focus()); } - function ne() { - i.value = !0, te(); + function W() { + n.value = !0, q(); } - function ee(S) { - if (b.value = "", i.value = !1, n.multiple) { - let le = Array.from(n.modelValue || []); - r(S) ? le = le.filter((x) => x != S) : le.push(S), p.value = null, l("update:modelValue", le); + function ee(A) { + if (m.value = "", n.value = !1, a.multiple) { + let te = Array.from(a.modelValue || []); + u(A) ? te = te.filter((w) => w != A) : te.push(A), k.value = null, r("update:modelValue", te); } else { - let le = S; - n.modelValue == S && (le = null), l("update:modelValue", le); + let te = A; + a.modelValue == A && (te = null), r("update:modelValue", te); } } - function te() { - g.value = O.value; + function q() { + b.value = P.value; } - return Lt(b, te), (S, le) => (a(), u("div", { - id: `${e.id}-autocomplete` + return bt(m, q), (A, te) => (o(), i("div", { + id: `${A.id}-autocomplete` }, [ - o(d) ? (a(), u("label", { + d.value ? (o(), i("label", { key: 0, - for: `${e.id}-text`, + for: `${A.id}-text`, class: "block text-sm font-medium text-gray-700 dark:text-gray-300" - }, A(o(d)), 9, Pc)) : k("", !0), - s("div", Bc, [ - kt(s("input", Le({ + }, F(d.value), 9, o0)) : x("", !0), + l("div", a0, [ + Mt(l("input", Te({ ref_key: "txtInput", - ref: y, - id: `${e.id}-text`, + ref: $, + id: `${A.id}-text`, type: "text", role: "combobox", "aria-controls": "options", "aria-expanded": "false", autocomplete: "off", spellcheck: "false", - "onUpdate:modelValue": le[0] || (le[0] = (x) => b.value = x), - class: o(h), - placeholder: e.multiple || !e.modelValue ? e.placeholder : "", - onFocus: ne, - onKeydown: j, - onKeyup: J, - onClick: ne, - onPaste: N, + "onUpdate:modelValue": te[0] || (te[0] = (w) => m.value = w), + class: p.value, + placeholder: A.multiple || !A.modelValue ? A.placeholder : "", + onFocus: W, + onKeydown: L, + onKeyup: ie, + onClick: W, + onPaste: T, required: !1 - }, S.$attrs), null, 16, Rc), [ - [so, b.value] + }, A.$attrs), null, 16, r0), [ + [ko, m.value] ]), - s("button", { + l("button", { type: "button", - onClick: le[1] || (le[1] = (x) => K(!i.value)), + onClick: te[1] || (te[1] = (w) => R(!n.value)), class: "absolute inset-y-0 right-0 flex items-center rounded-r-md px-2 focus:outline-none", tabindex: "-1" - }, Ec), - i.value ? (a(), u("ul", { + }, u0), + n.value ? (o(), i("ul", { key: 0, class: "absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white dark:bg-black py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm", - onKeydown: j, - id: `${e.id}-options`, + onKeydown: L, + id: `${A.id}-options`, role: "listbox" }, [ - (a(!0), u(Te, null, Ie(g.value, (x) => (a(), u("li", { - class: w([x === p.value ? "active bg-indigo-600 text-white" : "text-gray-900 dark:text-gray-100", "relative cursor-default select-none py-2 pl-3 pr-9"]), - onMouseover: (W) => Y(x), - onClick: (W) => ee(x), + (o(!0), i(Me, null, je(b.value, (w) => (o(), i("li", { + class: y([w === k.value ? "active bg-indigo-600 text-white" : "text-gray-900 dark:text-gray-100", "relative cursor-default select-none py-2 pl-3 pr-9"]), + onMouseover: (N) => se(w), + onClick: (N) => ee(w), role: "option", tabindex: "-1" }, [ - Z(S.$slots, "item", It(gl(x))), - r(x) ? (a(), u("span", { + U(A.$slots, "item", Rt(ks(w))), + u(w) ? (o(), i("span", { key: 0, - class: w(["absolute inset-y-0 right-0 flex items-center pr-4", x === p.value ? "text-white" : "text-indigo-600"]) - }, qc, 2)) : k("", !0) - ], 42, Nc))), 256)) - ], 40, zc)) : !e.multiple && e.modelValue ? (a(), u("div", { + class: y(["absolute inset-y-0 right-0 flex items-center pr-4", w === k.value ? "text-white" : "text-indigo-600"]) + }, v0, 2)) : x("", !0) + ], 42, c0))), 256)) + ], 40, d0)) : !A.multiple && A.modelValue ? (o(), i("div", { key: 1, - onKeydown: j, - onClick: le[2] || (le[2] = (x) => K(!i.value)), + onKeydown: L, + onClick: te[2] || (te[2] = (w) => R(!n.value)), class: "h-8 -mt-8 ml-3 pt-0.5" }, [ - Z(S.$slots, "item", It(gl(e.modelValue))) - ], 32)) : k("", !0), - o(m) ? (a(), u("div", Qc, Zc)) : k("", !0) + U(A.$slots, "item", Rt(ks(A.modelValue))) + ], 32)) : x("", !0), + f.value ? (o(), i("div", p0, h0)) : x("", !0) ]), - o(m) ? (a(), u("p", { + f.value ? (o(), i("p", { key: 1, class: "mt-2 text-sm text-red-500", - id: `${e.id}-error` - }, A(o(m)), 9, Gc)) : e.help ? (a(), u("p", { + id: `${A.id}-error` + }, F(f.value), 9, g0)) : A.help ? (o(), i("p", { key: 2, class: "mt-2 text-sm text-gray-500", - id: `${e.id}-description` - }, A(e.help), 9, Wc)) : k("", !0) - ], 8, jc)); + id: `${A.id}-description` + }, F(A.help), 9, y0)) : x("", !0) + ], 8, n0)); } -}), Xc = ["id", "name", "value"], Yc = { class: "block truncate" }, e0 = /* @__PURE__ */ ue({ +}), w0 = ["id", "name", "value"], k0 = { class: "block truncate" }, _0 = /* @__PURE__ */ de({ __name: "Combobox", props: { - id: null, - modelValue: null, + id: {}, + modelValue: {}, multiple: { type: Boolean }, - options: null, - values: null, - entries: null + options: {}, + values: {}, + entries: {} }, emits: ["update:modelValue"], - setup(e, { expose: t, emit: l }) { + setup(e, { expose: t, emit: s }) { const n = e; t({ - toggle(p) { - var v; - (v = d.value) == null || v.toggle(p); + toggle(k) { + var g; + (g = d.value) == null || g.toggle(k); } }); - function i(p) { - l("update:modelValue", p); - } - const r = f(() => n.multiple != null ? n.multiple : Array.isArray(n.modelValue)), d = M(); - function c(p, v) { - return !v || p.value.toLowerCase().includes(v.toLowerCase()); - } - const m = f(() => n.entries || (n.values ? n.values.map((p) => ({ key: p, value: p })) : n.options ? Object.keys(n.options).map((p) => ({ key: p, value: n.options[p] })) : [])), h = M(r.value ? [] : null); - function y() { - let p = n.modelValue && typeof n.modelValue == "object" ? n.modelValue.key : n.modelValue; - p == null || p === "" ? h.value = r.value ? [] : null : typeof p == "string" ? h.value = m.value.find((v) => v.key === p) || null : Array.isArray(p) && (h.value = m.value.filter((v) => p.includes(v.key))); - } - Xe(y); - const b = f(() => h.value == null ? "" : Array.isArray(h.value) ? h.value.map((p) => encodeURIComponent(p.key)).join(",") : h.value.key); - return (p, v) => { - const g = X("Autocomplete"); - return a(), u(Te, null, [ - s("input", { + const a = s; + function r(k) { + a("update:modelValue", k); + } + const u = v(() => n.multiple != null ? n.multiple : Array.isArray(n.modelValue)), d = O(); + function c(k, g) { + return !g || k.value.toLowerCase().includes(g.toLowerCase()); + } + const f = v(() => n.entries || (n.values ? n.values.map((k) => ({ key: k, value: k })) : n.options ? Object.keys(n.options).map((k) => ({ key: k, value: n.options[k] })) : [])), p = O(u.value ? [] : null); + function $() { + let k = n.modelValue && typeof n.modelValue == "object" ? n.modelValue.key : n.modelValue; + k == null || k === "" ? p.value = u.value ? [] : null : typeof k == "string" ? p.value = f.value.find((g) => g.key === k) || null : Array.isArray(k) && (p.value = f.value.filter((g) => k.includes(g.key))); + } + Ye($); + const m = v(() => p.value == null ? "" : Array.isArray(p.value) ? p.value.map((k) => encodeURIComponent(k.key)).join(",") : p.value.key); + return (k, g) => { + const b = Z("Autocomplete"); + return o(), i(Me, null, [ + l("input", { type: "hidden", - id: e.id, - name: e.id, - value: o(b) - }, null, 8, Xc), - $e(g, Le({ + id: k.id, + name: k.id, + value: m.value + }, null, 8, w0), + ye(b, Te({ ref_key: "input", ref: d, - id: e.id, - options: o(m), + id: k.id, + options: f.value, match: c, - multiple: o(r) - }, p.$attrs, { - modelValue: h.value, + multiple: u.value + }, k.$attrs, { + modelValue: p.value, "onUpdate:modelValue": [ - v[0] || (v[0] = (O) => h.value = O), - i + g[0] || (g[0] = (P) => p.value = P), + r ] }), { - item: ke(({ key: O, value: U }) => [ - s("span", Yc, A(U), 1) + item: xe(({ key: P, value: I }) => [ + l("span", k0, F(I), 1) ]), _: 1 }, 16, ["id", "options", "multiple", "modelValue"]) ], 64); }; } -}), t0 = /* @__PURE__ */ ue({ +}), $0 = /* @__PURE__ */ de({ __name: "DynamicInput", props: { - input: null, - modelValue: null, - api: null + input: {}, + modelValue: {}, + api: {} }, emits: ["update:modelValue"], setup(e, { emit: t }) { - const l = e, n = f(() => l.input.type || "text"), i = "ignore,css,options,meta,allowableValues,allowableEntries,op,prop,type,id,name".split(","), r = f(() => ut(l.input, i)), d = M(Ue( - l.modelValue[l.input.id], - (m) => l.input.type === "file" ? null : l.input.type === "date" && m instanceof Date ? $l(m) : l.input.type === "time" ? Xn(m) : m - )); - Lt(d, () => { - l.modelValue[l.input.id] = d.value, t("update:modelValue", l.modelValue); + const s = e, n = t, a = v(() => s.input.type || "text"), r = "ignore,css,options,meta,allowableValues,allowableEntries,op,prop,type,id,name".split(","), u = v(() => ft(s.input, r)), d = O(a.value === "file" ? null : s.modelValue[s.input.id]); + bt(d, () => { + s.modelValue[s.input.id] = d.value, n("update:modelValue", s.modelValue); }); - const c = f(() => { - const m = l.modelValue[l.input.id]; - if (l.input.type !== "file" || !m) + const c = v(() => { + const f = s.modelValue[s.input.id]; + if (s.input.type !== "file" || !f) return []; - if (typeof m == "string") - return [{ filePath: m, fileName: $t(m, "/") }]; - if (!Array.isArray(m) && typeof m == "object") - return m; - if (Array.isArray(m)) { - const h = []; - return m.forEach((y) => { - typeof y == "string" ? h.push({ filePath: y, fileName: $t(y, "/") }) : typeof y == "object" && h.push(y); - }), h; + if (typeof f == "string") + return [{ filePath: f, fileName: At(f, "/") }]; + if (!Array.isArray(f) && typeof f == "object") + return f; + if (Array.isArray(f)) { + const p = []; + return f.forEach(($) => { + typeof $ == "string" ? p.push({ filePath: $, fileName: At($, "/") }) : typeof $ == "object" && p.push($); + }), p; } }); - return (m, h) => { - var R, N, T, J, j, L, q, D, K, ne, ee, te, S, le, x, W, E, G, C, _, B, de, F, V, re, ye, fe, H; - const y = X("SelectInput"), b = X("CheckboxInput"), p = X("TagInput"), v = X("Combobox"), g = X("FileInput"), O = X("TextareaInput"), U = X("MarkdownInput"), Y = X("TextInput"); - return o(ie).component(o(n)) ? (a(), se(Kn(o(ie).component(o(n))), Le({ + return (f, p) => { + var j, T, M, ie, L, z, K, le, R, W, ee, q, A, te, w, N, E, h, C, Y, J, ne, D, V, fe, pe, ue, me; + const $ = Z("SelectInput"), m = Z("CheckboxInput"), k = Z("TagInput"), g = Z("Combobox"), b = Z("FileInput"), P = Z("TextareaInput"), I = Z("MarkdownInput"), se = Z("TextInput"); + return X(G).component(a.value) ? (o(), ae(an(X(G).component(a.value)), Te({ key: 0, - id: e.input.id, + id: f.input.id, modelValue: d.value, - "onUpdate:modelValue": h[0] || (h[0] = (P) => d.value = P), - status: (R = e.api) == null ? void 0 : R.error, - "input-class": (N = e.input.css) == null ? void 0 : N.input, - "label-class": (T = e.input.css) == null ? void 0 : T.label - }, o(r)), null, 16, ["id", "modelValue", "status", "input-class", "label-class"])) : o(n) == "select" ? (a(), se(y, Le({ + "onUpdate:modelValue": p[0] || (p[0] = (S) => d.value = S), + status: (j = f.api) == null ? void 0 : j.error, + "input-class": (T = f.input.css) == null ? void 0 : T.input, + "label-class": (M = f.input.css) == null ? void 0 : M.label + }, u.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class"])) : a.value == "select" ? (o(), ae($, Te({ key: 1, - id: e.input.id, + id: f.input.id, modelValue: d.value, - "onUpdate:modelValue": h[1] || (h[1] = (P) => d.value = P), - status: (J = e.api) == null ? void 0 : J.error, - "input-class": (j = e.input.css) == null ? void 0 : j.input, - "label-class": (L = e.input.css) == null ? void 0 : L.label, - entries: e.input.allowableEntries, - values: e.input.allowableValues - }, o(r)), null, 16, ["id", "modelValue", "status", "input-class", "label-class", "entries", "values"])) : o(n) == "checkbox" ? (a(), se(b, Le({ + "onUpdate:modelValue": p[1] || (p[1] = (S) => d.value = S), + status: (ie = f.api) == null ? void 0 : ie.error, + "input-class": (L = f.input.css) == null ? void 0 : L.input, + "label-class": (z = f.input.css) == null ? void 0 : z.label, + entries: f.input.allowableEntries, + values: f.input.allowableValues + }, u.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class", "entries", "values"])) : a.value == "checkbox" ? (o(), ae(m, Te({ key: 2, - id: e.input.id, + id: f.input.id, modelValue: d.value, - "onUpdate:modelValue": h[2] || (h[2] = (P) => d.value = P), - status: (q = e.api) == null ? void 0 : q.error, - "input-class": (D = e.input.css) == null ? void 0 : D.input, - "label-class": (K = e.input.css) == null ? void 0 : K.label - }, o(r)), null, 16, ["id", "modelValue", "status", "input-class", "label-class"])) : o(n) == "tag" ? (a(), se(p, Le({ + "onUpdate:modelValue": p[2] || (p[2] = (S) => d.value = S), + status: (K = f.api) == null ? void 0 : K.error, + "input-class": (le = f.input.css) == null ? void 0 : le.input, + "label-class": (R = f.input.css) == null ? void 0 : R.label + }, u.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class"])) : a.value == "tag" ? (o(), ae(k, Te({ key: 3, - id: e.input.id, + id: f.input.id, modelValue: d.value, - "onUpdate:modelValue": h[3] || (h[3] = (P) => d.value = P), - status: (ne = e.api) == null ? void 0 : ne.error, - "input-class": (ee = e.input.css) == null ? void 0 : ee.input, - "label-class": (te = e.input.css) == null ? void 0 : te.label, - allowableValues: e.input.allowableValues, - string: ((S = e.input.prop) == null ? void 0 : S.type) == "String" - }, o(r)), null, 16, ["id", "modelValue", "status", "input-class", "label-class", "allowableValues", "string"])) : o(n) == "combobox" ? (a(), se(v, Le({ + "onUpdate:modelValue": p[3] || (p[3] = (S) => d.value = S), + status: (W = f.api) == null ? void 0 : W.error, + "input-class": (ee = f.input.css) == null ? void 0 : ee.input, + "label-class": (q = f.input.css) == null ? void 0 : q.label, + allowableValues: f.input.allowableValues, + string: ((A = f.input.prop) == null ? void 0 : A.type) == "String" + }, u.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class", "allowableValues", "string"])) : a.value == "combobox" ? (o(), ae(g, Te({ key: 4, - id: e.input.id, + id: f.input.id, modelValue: d.value, - "onUpdate:modelValue": h[4] || (h[4] = (P) => d.value = P), - status: (le = e.api) == null ? void 0 : le.error, - "input-class": (x = e.input.css) == null ? void 0 : x.input, - "label-class": (W = e.input.css) == null ? void 0 : W.label, - entries: e.input.allowableEntries, - values: e.input.allowableValues - }, o(r)), null, 16, ["id", "modelValue", "status", "input-class", "label-class", "entries", "values"])) : o(n) == "file" ? (a(), se(g, Le({ + "onUpdate:modelValue": p[4] || (p[4] = (S) => d.value = S), + status: (te = f.api) == null ? void 0 : te.error, + "input-class": (w = f.input.css) == null ? void 0 : w.input, + "label-class": (N = f.input.css) == null ? void 0 : N.label, + entries: f.input.allowableEntries, + values: f.input.allowableValues + }, u.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class", "entries", "values"])) : a.value == "file" ? (o(), ae(b, Te({ key: 5, - id: e.input.id, - status: (E = e.api) == null ? void 0 : E.error, + id: f.input.id, + status: (E = f.api) == null ? void 0 : E.error, modelValue: d.value, - "onUpdate:modelValue": h[5] || (h[5] = (P) => d.value = P), - "input-class": (G = e.input.css) == null ? void 0 : G.input, - "label-class": (C = e.input.css) == null ? void 0 : C.label, - files: o(c) - }, o(r)), null, 16, ["id", "status", "modelValue", "input-class", "label-class", "files"])) : o(n) == "textarea" ? (a(), se(O, Le({ + "onUpdate:modelValue": p[5] || (p[5] = (S) => d.value = S), + "input-class": (h = f.input.css) == null ? void 0 : h.input, + "label-class": (C = f.input.css) == null ? void 0 : C.label, + files: c.value + }, u.value), null, 16, ["id", "status", "modelValue", "input-class", "label-class", "files"])) : a.value == "textarea" ? (o(), ae(P, Te({ key: 6, - id: e.input.id, + id: f.input.id, modelValue: d.value, - "onUpdate:modelValue": h[6] || (h[6] = (P) => d.value = P), - status: (_ = e.api) == null ? void 0 : _.error, - "input-class": (B = e.input.css) == null ? void 0 : B.input, - "label-class": (de = e.input.css) == null ? void 0 : de.label - }, o(r)), null, 16, ["id", "modelValue", "status", "input-class", "label-class"])) : o(n) == "MarkdownInput" ? (a(), se(U, Le({ + "onUpdate:modelValue": p[6] || (p[6] = (S) => d.value = S), + status: (Y = f.api) == null ? void 0 : Y.error, + "input-class": (J = f.input.css) == null ? void 0 : J.input, + "label-class": (ne = f.input.css) == null ? void 0 : ne.label + }, u.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class"])) : a.value == "MarkdownInput" ? (o(), ae(I, Te({ key: 7, - id: e.input.id, + id: f.input.id, modelValue: d.value, - "onUpdate:modelValue": h[7] || (h[7] = (P) => d.value = P), - status: (F = e.api) == null ? void 0 : F.error, - "input-class": (V = e.input.css) == null ? void 0 : V.input, - "label-class": (re = e.input.css) == null ? void 0 : re.label - }, o(r)), null, 16, ["id", "modelValue", "status", "input-class", "label-class"])) : (a(), se(Y, Le({ + "onUpdate:modelValue": p[7] || (p[7] = (S) => d.value = S), + status: (D = f.api) == null ? void 0 : D.error, + "input-class": (V = f.input.css) == null ? void 0 : V.input, + "label-class": (fe = f.input.css) == null ? void 0 : fe.label + }, u.value), null, 16, ["id", "modelValue", "status", "input-class", "label-class"])) : (o(), ae(se, Te({ key: 8, - type: o(n), - id: e.input.id, + type: a.value, + id: f.input.id, modelValue: d.value, - "onUpdate:modelValue": h[8] || (h[8] = (P) => d.value = P), - status: (ye = e.api) == null ? void 0 : ye.error, - "input-class": (fe = e.input.css) == null ? void 0 : fe.input, - "label-class": (H = e.input.css) == null ? void 0 : H.label - }, o(r)), null, 16, ["type", "id", "modelValue", "status", "input-class", "label-class"])); + "onUpdate:modelValue": p[8] || (p[8] = (S) => d.value = S), + status: (pe = f.api) == null ? void 0 : pe.error, + "input-class": (ue = f.input.css) == null ? void 0 : ue.input, + "label-class": (me = f.input.css) == null ? void 0 : me.label + }, u.value), null, 16, ["type", "id", "modelValue", "status", "input-class", "label-class"])); }; } -}), l0 = { class: "lookup-field" }, n0 = ["name", "value"], s0 = { +}), C0 = { class: "lookup-field" }, x0 = ["name", "value"], L0 = { key: 0, class: "flex justify-between" -}, o0 = ["for"], a0 = { +}, V0 = ["for"], S0 = { key: 0, class: "flex items-center" -}, i0 = { class: "text-sm text-gray-500 dark:text-gray-400 pr-1" }, r0 = /* @__PURE__ */ s("span", { class: "sr-only" }, "Clear", -1), u0 = /* @__PURE__ */ s("svg", { +}, M0 = { class: "text-sm text-gray-500 dark:text-gray-400 pr-1" }, A0 = /* @__PURE__ */ l("span", { class: "sr-only" }, "Clear", -1), T0 = /* @__PURE__ */ l("svg", { class: "h-4 w-4", xmlns: "http://www.w3.org/2000/svg", fill: "none", @@ -4466,172 +4595,173 @@ const Ii = { key: 0 }, Di = { class: "md:p-4" }, Es = /* @__PURE__ */ ue({ stroke: "currentColor", "aria-hidden": "true" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M6 18L18 6M6 6l12 12" }) -], -1), d0 = [ - r0, - u0 -], c0 = { +], -1), F0 = [ + A0, + T0 +], I0 = { key: 1, class: "mt-1 relative" -}, f0 = { class: "w-full inline-flex truncate" }, m0 = { class: "text-blue-700 dark:text-blue-300 flex cursor-pointer" }, v0 = /* @__PURE__ */ s("span", { class: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none" }, [ - /* @__PURE__ */ s("svg", { +}, j0 = { class: "w-full inline-flex truncate" }, O0 = { class: "text-blue-700 dark:text-blue-300 flex cursor-pointer" }, D0 = /* @__PURE__ */ l("span", { class: "absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none" }, [ + /* @__PURE__ */ l("svg", { class: "h-5 w-5 text-gray-400 dark:text-gray-500", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z", "clip-rule": "evenodd" }) ]) -], -1), h0 = ["id"], g0 = ["id"], p0 = /* @__PURE__ */ ue({ +], -1), P0 = ["id"], B0 = ["id"], H0 = /* @__PURE__ */ de({ __name: "LookupInput", props: { - id: null, - status: null, - input: null, - metadataType: null, - modelValue: null, - label: null, - labelClass: null, - help: null + id: {}, + status: {}, + input: {}, + metadataType: {}, + modelValue: {}, + label: {}, + labelClass: {}, + help: {} }, emits: ["update:modelValue"], setup(e, { emit: t }) { - const l = e, { config: n } = St(), { metadataApi: i } = ot(), r = f(() => l.id || l.input.id), d = f(() => l.label ?? Ee(nt(r.value))); - let c = qe("ApiState", void 0); - const m = qe("client"), h = f(() => ft.call({ responseStatus: l.status ?? (c == null ? void 0 : c.error.value) }, r.value)), y = M(""), b = M(""), p = f(() => be(l.modelValue, r.value)), v = f(() => Je(l.metadataType).find((R) => R.name.toLowerCase() == r.value.toLowerCase())), g = f(() => { - var R, N, T; - return ((T = st((N = (R = v.value) == null ? void 0 : R.ref) == null ? void 0 : N.model)) == null ? void 0 : T.icon) || n.value.tableIcon; + const { config: s } = It(), { metadataApi: n } = lt(), a = e, r = t, u = v(() => a.id || a.input.id), d = v(() => a.label ?? Pe(at(u.value))); + let c = Qe("ApiState", void 0); + const f = Qe("client"), p = v(() => mt.call({ responseStatus: a.status ?? (c == null ? void 0 : c.error.value) }, u.value)), $ = O(""), m = O(""), k = v(() => _e(a.modelValue, u.value)), g = v(() => st(a.metadataType).find((j) => j.name.toLowerCase() == u.value.toLowerCase())), b = v(() => { + var j, T, M; + return ((M = rt((T = (j = g.value) == null ? void 0 : j.ref) == null ? void 0 : T.model)) == null ? void 0 : M.icon) || s.value.tableIcon; }); - let O; - function U(R) { - if (R) { - if (O == null) { + let P; + function I(j) { + if (j) { + if (P == null) { console.warn("No ModalProvider required by LookupInput"); return; } - O.openModal({ name: "ModalLookup", ref: R }, (N) => { - if (console.debug("openModal", y.value, " -> ", N, wt.setRefValue(R, N), R), N) { - const T = be(N, R.refId); - y.value = wt.setRefValue(R, N) || T; - const J = o(l.modelValue); - J[r.value] = T, t("update:modelValue", J); + P.openModal({ name: "ModalLookup", ref: j }, (T) => { + if (console.debug("openModal", $.value, " -> ", T, Pt.setRefValue(j, T), j), T) { + const M = _e(T, j.refId); + $.value = Pt.setRefValue(j, T) || M; + const ie = X(a.modelValue); + ie[u.value] = M, r("update:modelValue", ie); } }); } } - function Y() { - l.modelValue[r.value] = null, y.value = ""; - } - return Xe(async () => { - var q, D; - O = qe("ModalProvider", void 0); - const R = l.modelValue; - l.modelValue[r.value] || (l.modelValue[r.value] = null); - const N = v.value, T = N == null ? void 0 : N.ref; - if (!T) { - console.warn(`No RefInfo for property '${r.value}'`); + function se() { + a.modelValue[u.value] = null, $.value = ""; + } + return Ye(async () => { + var K, le; + P = Qe("ModalProvider", void 0); + const j = a.modelValue; + a.modelValue[u.value] || (a.modelValue[u.value] = null); + const T = g.value, M = T == null ? void 0 : T.ref; + if (!M) { + console.warn(`No RefInfo for property '${u.value}'`); return; } - y.value = ""; - let J = T.selfId == null ? be(R, N.name) : be(R, T.selfId); - if (Zt(J) && (J = be(R, T.refId)), J == null) + $.value = ""; + let ie = M.selfId == null ? _e(j, T.name) : _e(j, M.selfId); + if (Xt(ie) && (ie = _e(j, M.refId)), ie == null) return; - if (((q = i.value) == null ? void 0 : q.operations.find((K) => { - var ne; - return ((ne = K.dataModel) == null ? void 0 : ne.name) == T.model; + if (((K = n.value) == null ? void 0 : K.operations.find((R) => { + var W; + return ((W = R.dataModel) == null ? void 0 : W.name) == M.model; })) != null) { - const K = be(R, N.name); - if (Zt(K)) + const R = _e(j, T.name); + if (Xt(R)) return; - if (y.value = `${K}`, b.value = N.name, T.refLabel != null) { - const ne = Je(l.metadataType).find((te) => te.type == T.model); - ne == null && console.warn(`Could not find ${T.model} Property on ${l.metadataType.name}`); - const ee = ne != null ? be(R, ne.name) : null; + if ($.value = `${R}`, m.value = T.name, M.refLabel != null) { + const W = st(a.metadataType).find((q) => q.type == M.model); + W == null && console.warn(`Could not find ${M.model} Property on ${a.metadataType.name}`); + const ee = W != null ? _e(j, W.name) : null; if (ee != null) { - let te = be(ee, T.refLabel); - te && (y.value = `${te}`, wt.setValue(T.model, J, T.refLabel, te)); + let q = _e(ee, M.refLabel); + q && ($.value = `${q}`, Pt.setValue(M.model, ie, M.refLabel, q)); } else { - const te = ((D = N.attributes) == null ? void 0 : D.some((le) => le.name == "Computed")) == !0; - let S = await wt.getOrFetchValue(m, i.value, T.model, T.refId, T.refLabel, te, J); - y.value = S || `${T.model}: ${y.value}`; + const q = ((le = T.attributes) == null ? void 0 : le.some((te) => te.name == "Computed")) == !0; + let A = await Pt.getOrFetchValue(f, n.value, M.model, M.refId, M.refLabel, q, ie); + $.value = A || `${M.model}: ${$.value}`; } } } - }), (R, N) => { - var J; - const T = X("Icon"); - return a(), u("div", l0, [ - s("input", { + }), (j, T) => { + var ie; + const M = Z("Icon"); + return o(), i("div", C0, [ + l("input", { type: "hidden", - name: o(r), - value: o(p) - }, null, 8, n0), - o(d) ? (a(), u("div", s0, [ - s("label", { - for: o(r), - class: w(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${e.labelClass ?? ""}`) - }, A(o(d)), 11, o0), - o(p) ? (a(), u("div", a0, [ - s("span", i0, A(o(p)), 1), - s("button", { - onClick: Y, + name: u.value, + value: k.value + }, null, 8, x0), + d.value ? (o(), i("div", L0, [ + l("label", { + for: u.value, + class: y(`block text-sm font-medium text-gray-700 dark:text-gray-300 ${j.labelClass ?? ""}`) + }, F(d.value), 11, V0), + k.value ? (o(), i("div", S0, [ + l("span", M0, F(k.value), 1), + l("button", { + onClick: se, type: "button", title: "clear", class: "mr-1 rounded-md text-gray-400 dark:text-gray-500 hover:text-gray-500 dark:hover:text-gray-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 dark:ring-offset-black" - }, d0) - ])) : k("", !0) - ])) : k("", !0), - (J = o(v)) != null && J.ref ? (a(), u("div", c0, [ - s("button", { + }, F0) + ])) : x("", !0) + ])) : x("", !0), + (ie = g.value) != null && ie.ref ? (o(), i("div", I0, [ + l("button", { type: "button", class: "lookup flex relative w-full bg-white dark:bg-black border border-gray-300 dark:border-gray-700 rounded-md shadow-sm pl-3 pr-10 py-2 text-left focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm", - onClick: N[0] || (N[0] = (j) => U(o(v).ref)), + onClick: T[0] || (T[0] = (L) => I(g.value.ref)), "aria-haspopup": "listbox", "aria-expanded": "true", "aria-labelledby": "listbox-label" }, [ - s("span", f0, [ - s("span", m0, [ - $e(T, { + l("span", j0, [ + l("span", O0, [ + ye(M, { class: "mr-1 w-5 h-5", - image: o(g) + image: b.value }, null, 8, ["image"]), - s("span", null, A(y.value), 1) + l("span", null, F($.value), 1) ]) ]), - v0 + D0 ]) - ])) : k("", !0), - o(h) ? (a(), u("p", { + ])) : x("", !0), + p.value ? (o(), i("p", { key: 2, class: "mt-2 text-sm text-red-500", - id: `${o(r)}-error` - }, A(o(h)), 9, h0)) : e.help ? (a(), u("p", { + id: `${u.value}-error` + }, F(p.value), 9, P0)) : j.help ? (o(), i("p", { key: 3, class: "mt-2 text-sm text-gray-500", - id: `${o(r)}-description` - }, A(e.help), 9, g0)) : k("", !0) + id: `${u.value}-description` + }, F(j.help), 9, B0)) : x("", !0) ]); }; } -}), y0 = /* @__PURE__ */ ue({ +}), R0 = /* @__PURE__ */ de({ __name: "AutoFormFields", props: { - modelValue: null, - type: null, - api: null, - formLayout: null, - configureField: null, - configureFormLayout: null, + modelValue: {}, + type: {}, + metaType: {}, + api: {}, + formLayout: {}, + configureField: {}, + configureFormLayout: {}, hideSummary: { type: Boolean }, flexClass: { default: "flex flex-1 flex-col justify-between" }, divideClass: { default: "divide-y divide-gray-200 px-4 sm:px-6" }, @@ -4639,92 +4769,94 @@ const Ii = { key: 0 }, Di = { class: "md:p-4" }, Es = /* @__PURE__ */ ue({ fieldsetClass: { default: "grid grid-cols-12 gap-6" } }, emits: ["update:modelValue"], - setup(e, { expose: t, emit: l }) { - const n = e; - t({ forceUpdate: i, props: n, updateValue: d }); - function i() { - var N; - const R = Be(); - (N = R == null ? void 0 : R.proxy) == null || N.$forceUpdate(); + setup(e, { expose: t, emit: s }) { + const n = e, a = s; + t({ forceUpdate: r, props: n, updateValue: d }); + function r() { + var T; + const j = Be(); + (T = j == null ? void 0 : j.proxy) == null || T.$forceUpdate(); } - function r(R, N) { - d(R.id, be(N, R.id)); + function u(j, T) { + d(j.id, _e(T, j.id)); } - function d(R, N) { - n.modelValue[R] = N, l("update:modelValue", n.modelValue), i(); + function d(j, T) { + n.modelValue[j] = T, a("update:modelValue", n.modelValue), r(); } - const { metadataApi: c, apiOf: m, typeOf: h, typeOfRef: y, createFormLayout: b, Crud: p } = ot(), v = f(() => n.type || Bt(n.modelValue)), g = f(() => h(v.value)), O = f(() => { - var R, N; - return y((N = (R = c.value) == null ? void 0 : R.operations.find((T) => T.request.name == v.value)) == null ? void 0 : N.dataModel) || g.value; - }), U = f(() => { - const R = g.value; - if (!R) { + const { metadataApi: c, apiOf: f, typeOf: p, typeOfRef: $, createFormLayout: m, Crud: k } = lt(), g = v(() => n.type || qt(n.modelValue)), b = v(() => n.metaType ?? p(g.value)), P = v(() => { + var j, T; + return $((T = (j = c.value) == null ? void 0 : j.operations.find((M) => M.request.name == g.value)) == null ? void 0 : T.dataModel) || b.value; + }); + function I() { + const j = b.value; + if (!j) { if (n.formLayout) { - const q = n.formLayout.map((D) => { - const K = { name: D.id, type: va(D.type) }, ne = Object.assign({ prop: K }, D); - return n.configureField && n.configureField(ne), ne; + const K = n.formLayout.map((le) => { + const R = { name: le.id, type: Ia(le.type) }, W = Object.assign({ prop: R }, le); + return n.configureField && n.configureField(W), W; }); - return n.configureFormLayout && n.configureFormLayout(q), q; + return n.configureFormLayout && n.configureFormLayout(K), K; } - throw new Error(`MetadataType for ${v.value} not found`); + throw new Error(`MetadataType for ${g.value} not found`); } - const N = Je(R), T = O.value, J = n.formLayout ? n.formLayout : b(R), j = [], L = m(R.name); - return J.forEach((q) => { + const T = st(j), M = P.value, ie = n.formLayout ? Array.from(n.formLayout) : m(j), L = [], z = f(j.name); + return ie.forEach((K) => { var ee; - const D = N.find((te) => te.name == q.name); - if (q.ignore) + const le = T.find((q) => q.name == K.name); + if (K.ignore) return; - const K = ((ee = T == null ? void 0 : T.properties) == null ? void 0 : ee.find((te) => { - var S; - return te.name.toLowerCase() == ((S = q.name) == null ? void 0 : S.toLowerCase()); - })) ?? D, ne = Object.assign({ prop: K, op: L }, q); - n.configureField && n.configureField(ne), j.push(ne); - }), n.configureFormLayout && n.configureFormLayout(j), j; - }), Y = f(() => U.value.filter((R) => R.type != "hidden").map((R) => R.id)); - return (R, N) => { - var L; - const T = X("ErrorSummary"), J = X("LookupInput"), j = X("DynamicInput"); - return a(), u(Te, null, [ - e.hideSummary ? k("", !0) : (a(), se(T, { + const R = ((ee = M == null ? void 0 : M.properties) == null ? void 0 : ee.find((q) => { + var A; + return q.name.toLowerCase() == ((A = K.name) == null ? void 0 : A.toLowerCase()); + })) ?? le, W = Object.assign({ prop: R, op: z }, K); + n.configureField && n.configureField(W), L.push(W); + }), n.configureFormLayout && n.configureFormLayout(L), L; + } + const se = () => I().filter((j) => j.type != "hidden").map((j) => j.id); + return (j, T) => { + var z; + const M = Z("ErrorSummary"), ie = Z("LookupInput"), L = Z("DynamicInput"); + return o(), i(Me, null, [ + j.hideSummary ? x("", !0) : (o(), ae(M, { key: 0, - status: (L = e.api) == null ? void 0 : L.error, - except: o(Y) + status: (z = j.api) == null ? void 0 : z.error, + except: se() }, null, 8, ["status", "except"])), - s("div", { - class: w(e.flexClass) + l("div", { + class: y(j.flexClass) }, [ - s("div", { - class: w(e.divideClass) + l("div", { + class: y(j.divideClass) }, [ - s("div", { - class: w(e.spaceClass) + l("div", { + class: y(j.spaceClass) }, [ - s("fieldset", { - class: w(e.fieldsetClass) + l("fieldset", { + class: y(j.fieldsetClass) }, [ - (a(!0), u(Te, null, Ie(o(U), (q) => { - var D, K, ne; - return a(), u("div", { - key: q.id, - class: w([ + (o(!0), i(Me, null, je(I(), (K) => { + var le, R, W; + return o(), i("div", { + key: K.id, + class: y([ "w-full", - ((D = q.css) == null ? void 0 : D.field) ?? (q.type == "textarea" ? "col-span-12" : "col-span-12 xl:col-span-6" + (q.type == "checkbox" ? " flex items-center" : "")), - q.type == "hidden" ? "hidden" : "" + ((le = K.css) == null ? void 0 : le.field) ?? (K.type == "textarea" ? "col-span-12" : "col-span-12 xl:col-span-6" + (K.type == "checkbox" ? " flex items-center" : "")), + K.type == "hidden" ? "hidden" : "" ]) }, [ - ((K = q.prop) == null ? void 0 : K.ref) != null && q.type != "file" && !q.prop.isPrimaryKey ? (a(), se(J, { + ((R = K.prop) == null ? void 0 : R.ref) != null && K.type != "file" && !K.prop.isPrimaryKey ? (o(), ae(ie, { key: 0, - metadataType: o(O), - input: q, - modelValue: e.modelValue, - "onUpdate:modelValue": (ee) => r(q, ee), - status: (ne = e.api) == null ? void 0 : ne.error - }, null, 8, ["metadataType", "input", "modelValue", "onUpdate:modelValue", "status"])) : (a(), se(j, { + metadataType: P.value, + input: K, + modelValue: j.modelValue, + "onUpdate:modelValue": (ee) => u(K, ee), + status: (W = j.api) == null ? void 0 : W.error + }, null, 8, ["metadataType", "input", "modelValue", "onUpdate:modelValue", "status"])) : (o(), ae(L, { key: 1, - input: q, - modelValue: e.modelValue, - "onUpdate:modelValue": N[0] || (N[0] = (ee) => R.$emit("update:modelValue", ee)), - api: e.api + input: K, + modelValue: j.modelValue, + "onUpdate:modelValue": T[0] || (T[0] = (ee) => j.$emit("update:modelValue", ee)), + api: j.api }, null, 8, ["input", "modelValue", "api"])) ], 2); }), 128)) @@ -4736,254 +4868,255 @@ const Ii = { key: 0 }, Di = { class: "md:p-4" }, Es = /* @__PURE__ */ ue({ }; } }); -function Tl() { - const e = M(!1), t = M(), l = M(), n = qe("client"); - function i({ message: v, errorCode: g, fieldName: O, errors: U }) { - return g || (g = "Exception"), U || (U = []), t.value = O ? new Pl({ - errorCode: g, - message: v, - errors: [new Hn({ fieldName: O, errorCode: g, message: v })] - }) : new Pl({ errorCode: g, message: v, errors: U }); +function Ds(e) { + const t = O(!1), s = O(), n = O(), a = e ?? Qe("client"); + function r({ message: g, errorCode: b, fieldName: P, errors: I }) { + return b || (b = "Exception"), I || (I = []), s.value = P ? new Us({ + errorCode: b, + message: g, + errors: [new Gl({ fieldName: P, errorCode: b, message: g })] + }) : new Us({ errorCode: b, message: g, errors: I }); } - function r({ fieldName: v, message: g, errorCode: O }) { - if (O || (O = "Exception"), !t.value) - i({ fieldName: v, message: g, errorCode: O }); + function u({ fieldName: g, message: b, errorCode: P }) { + if (P || (P = "Exception"), !s.value) + r({ fieldName: g, message: b, errorCode: P }); else { - let U = new Pl(t.value); - U.errors = [ - ...(U.errors || []).filter((Y) => { - var R; - return ((R = Y.fieldName) == null ? void 0 : R.toLowerCase()) !== (v == null ? void 0 : v.toLowerCase()); + let I = new Us(s.value); + I.errors = [ + ...(I.errors || []).filter((se) => { + var j; + return ((j = se.fieldName) == null ? void 0 : j.toLowerCase()) !== (g == null ? void 0 : g.toLowerCase()); }), - new Hn({ fieldName: v, message: g, errorCode: O }) - ], t.value = U; + new Gl({ fieldName: g, message: b, errorCode: P }) + ], s.value = I; } } - async function d(v, g, O) { - e.value = !0; - let U = await n.api(At(v), g, O); - return e.value = !1, l.value = U.response, t.value = U.error, U; + async function d(g, b, P) { + t.value = !0; + let I = await a.api(Dt(g), b, P); + return t.value = !1, n.value = I.response, s.value = I.error, I; } - async function c(v, g, O) { - e.value = !0; - let U = await n.apiVoid(At(v), g, O); - return e.value = !1, l.value = U.response, t.value = U.error, U; + async function c(g, b, P) { + t.value = !0; + let I = await a.apiVoid(Dt(g), b, P); + return t.value = !1, n.value = I.response, s.value = I.error, I; } - async function m(v, g, O, U) { - e.value = !0; - let Y = await n.apiForm(At(v), g, O, U); - return e.value = !1, l.value = Y.response, t.value = Y.error, Y; + async function f(g, b, P, I) { + t.value = !0; + let se = await a.apiForm(Dt(g), b, P, I); + return t.value = !1, n.value = se.response, s.value = se.error, se; } - async function h(v, g, O, U) { - e.value = !0; - let Y = await n.apiFormVoid(At(v), g, O, U); - return e.value = !1, l.value = Y.response, t.value = Y.error, Y; + async function p(g, b, P, I) { + t.value = !0; + let se = await a.apiFormVoid(Dt(g), b, P, I); + return t.value = !1, n.value = se.response, s.value = se.error, se; } - async function y(v, g, O, U) { - return ts(n, v, g, O, U); + async function $(g, b, P, I) { + return gn(a, g, b, P, I); } - function b(v, g) { - const O = M(new We()), U = ls(async (Y) => { - O.value = await n.api(Y); - }, g == null ? void 0 : g.delayMs); - return hl(async () => { - const Y = v(), R = sn(_l(Y)); - R && (O.value = new We({ response: R })), (g == null ? void 0 : g.delayMs) === 0 ? O.value = await n.api(Y) : U(Y); - }), (async () => O.value = await n.api(v(), g == null ? void 0 : g.args, g == null ? void 0 : g.method))(), O; + function m(g, b) { + const P = O(new Xe()), I = yn(async (se) => { + P.value = await a.api(se); + }, b == null ? void 0 : b.delayMs); + return ws(async () => { + const se = g(), j = cl(As(se)); + j && (P.value = new Xe({ response: j })), (b == null ? void 0 : b.delayMs) === 0 ? P.value = await a.api(se) : I(se); + }), (async () => P.value = await a.api(g(), b == null ? void 0 : b.args, b == null ? void 0 : b.method))(), P; } - let p = { setError: i, addFieldError: r, loading: e, error: t, api: d, apiVoid: c, apiForm: m, apiFormVoid: h, swr: y, swrEffect: b, unRefs: At, setRef: Yn }; - return Xt("ApiState", p), p; + let k = { setError: r, addFieldError: u, loading: t, error: s, api: d, apiVoid: c, apiForm: f, apiFormVoid: p, swr: $, swrEffect: m, unRefs: Dt, setRef: mn }; + return ss("ApiState", k), k; } -const b0 = { key: 0 }, w0 = { class: "text-red-700" }, x0 = /* @__PURE__ */ s("b", null, "type", -1), k0 = { key: 0 }, $0 = { key: 2 }, C0 = ["innerHTML"], _0 = /* @__PURE__ */ s("input", { +const E0 = { key: 0 }, z0 = { class: "text-red-700" }, N0 = /* @__PURE__ */ l("b", null, "type", -1), U0 = { key: 0 }, q0 = { key: 2 }, Q0 = ["innerHTML"], K0 = /* @__PURE__ */ l("input", { type: "submit", class: "hidden" -}, null, -1), L0 = { class: "flex justify-end" }, V0 = /* @__PURE__ */ s("div", null, null, -1), S0 = { +}, null, -1), Z0 = { class: "flex justify-end" }, W0 = /* @__PURE__ */ l("div", null, null, -1), G0 = { key: 2, class: "relative z-10", "aria-labelledby": "slide-over-title", role: "dialog", "aria-modal": "true" -}, M0 = /* @__PURE__ */ s("div", { class: "fixed inset-0" }, null, -1), A0 = { class: "fixed inset-0 overflow-hidden" }, T0 = { class: "flex min-h-0 flex-1 flex-col overflow-auto" }, F0 = { class: "flex-1" }, I0 = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6" }, D0 = { class: "flex items-start justify-between space-x-3" }, O0 = { class: "space-y-1" }, j0 = { key: 0 }, P0 = { key: 2 }, B0 = ["innerHTML"], R0 = { class: "flex h-7 items-center" }, H0 = { class: "flex justify-end" }, E0 = /* @__PURE__ */ ue({ +}, J0 = /* @__PURE__ */ l("div", { class: "fixed inset-0" }, null, -1), X0 = { class: "fixed inset-0 overflow-hidden" }, Y0 = { class: "flex min-h-0 flex-1 flex-col overflow-auto" }, ef = { class: "flex-1" }, tf = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6" }, sf = { class: "flex items-start justify-between space-x-3" }, lf = { class: "space-y-1" }, nf = { key: 0 }, of = { key: 2 }, af = ["innerHTML"], rf = { class: "flex h-7 items-center" }, uf = { class: "flex justify-end" }, df = /* @__PURE__ */ de({ __name: "AutoForm", props: { - type: null, - modelValue: null, - heading: null, - subHeading: null, + type: {}, + modelValue: {}, + heading: {}, + subHeading: {}, showLoading: { type: Boolean, default: !0 }, jsconfig: { default: "eccn,edv" }, formStyle: { default: "card" }, - configureField: null, - configureFormLayout: null, - panelClass: null, - bodyClass: null, - formClass: null, - innerFormClass: null, + metaType: {}, + configureField: {}, + configureFormLayout: {}, + panelClass: {}, + bodyClass: {}, + formClass: {}, + innerFormClass: {}, headerClass: { default: "p-6" }, - buttonsClass: null, - headingClass: null, - subHeadingClass: null, + buttonsClass: {}, + headingClass: {}, + subHeadingClass: {}, submitLabel: { default: "Submit" }, - allowSubmit: null + allowSubmit: {} }, emits: ["success", "error", "update:modelValue", "done"], - setup(e, { expose: t, emit: l }) { - const n = e, i = M(), r = M(1), d = M(); - t({ forceUpdate: c, props: n, setModel: m, formFields: i, submit: W, close: de }); + setup(e, { expose: t, emit: s }) { + const n = e, a = s, r = O(), u = O(1), d = O(); function c() { - var re; - r.value++, ee.value = ne(); + var fe; + u.value++, ee.value = W(); const V = Be(); - (re = V == null ? void 0 : V.proxy) == null || re.$forceUpdate(); + (fe = V == null ? void 0 : V.proxy) == null || fe.$forceUpdate(); } - async function m(V) { - Object.assign(ee.value, V), c(), await xt(() => null); + async function f(V) { + Object.assign(ee.value, V), c(), await St(() => null); } - Xt("ModalProvider", { - openModal: p + ss("ModalProvider", { + openModal: k }); - const y = M(), b = M(); - function p(V, re) { - y.value = V, b.value = re; + const $ = O(), m = O(); + function k(V, fe) { + $.value = V, m.value = fe; } - async function v(V) { - b.value && b.value(V), y.value = void 0, b.value = void 0; + async function g(V) { + m.value && m.value(V), $.value = void 0, m.value = void 0; } - const g = Tl(), { getTypeName: O } = ns(), { typeOf: U, Crud: Y, createDto: R } = ot(), N = M(new We()), T = f(() => n.panelClass || Ze.panelClass(n.formStyle)), J = f(() => n.formClass || n.formStyle == "card" ? "shadow sm:rounded-md" : Tt.formClass), j = f(() => n.headingClass || Ze.headingClass(n.formStyle)), L = f(() => n.subHeadingClass || Ze.subHeadingClass(n.formStyle)), q = f(() => typeof n.buttonsClass == "string" ? n.buttonsClass : Ze.buttonsClass), D = f(() => { + const b = Ds(), { getTypeName: P } = bn(), { typeOf: I, Crud: se, createDto: j } = lt(), T = O(new Xe()), M = v(() => n.panelClass || Ee.panelClass(n.formStyle)), ie = v(() => n.formClass || n.formStyle == "card" ? "shadow sm:rounded-md" : Bt.formClass), L = v(() => n.headingClass || Ee.headingClass(n.formStyle)), z = v(() => n.subHeadingClass || Ee.subHeadingClass(n.formStyle)), K = v(() => typeof n.buttonsClass == "string" ? n.buttonsClass : Ee.buttonsClass), le = v(() => { var V; - return n.type ? O(n.type) : (V = n.modelValue) != null && V.getTypeName ? n.modelValue.getTypeName() : null; - }), K = f(() => U(D.value)), ne = () => n.modelValue || le(), ee = M(ne()), te = f(() => g.loading.value), S = f(() => { + return n.type ? P(n.type) : (V = n.modelValue) != null && V.getTypeName ? n.modelValue.getTypeName() : null; + }), R = v(() => n.metaType ?? I(le.value)), W = () => n.modelValue || te(), ee = O(W()), q = v(() => b.loading.value), A = v(() => { var V; - return n.heading || ((V = U(D.value)) == null ? void 0 : V.description) || Ee(D.value); + return n.heading != null ? n.heading : ((V = R.value) == null ? void 0 : V.description) || Pe(le.value); }); - function le() { - return typeof n.type == "string" ? R(n.type) : n.type ? new n.type() : n.modelValue; + t({ forceUpdate: c, props: n, setModel: f, formFields: r, submit: N, close: ne, model: ee }); + function te() { + return typeof n.type == "string" ? j(n.type) : n.type ? new n.type() : n.modelValue; } - async function x(V) { + async function w(V) { if (!V || V.tagName != "FORM") { console.error("Not a valid form", V); return; } - const re = le(); - let ye = Ue(re == null ? void 0 : re.getMethod, (P) => typeof P == "function" ? P() : null) || "POST", fe = Ue(re == null ? void 0 : re.createResponse, (P) => typeof P == "function" ? P() : null) == null; - const H = n.jsconfig; - if (tn.hasRequestBody(ye)) { - let P = new re.constructor(), me = new FormData(V); - console.debug("AutoForm.submitForm", P, me), fe ? N.value = await g.apiFormVoid(P, me, { jsconfig: H }) : N.value = await g.apiForm(P, me, { jsconfig: H }); + const fe = te(); + let pe = Ze(fe == null ? void 0 : fe.getMethod, (S) => typeof S == "function" ? S() : null) || "POST", ue = Ze(fe == null ? void 0 : fe.createResponse, (S) => typeof S == "function" ? S() : null) == null; + const me = n.jsconfig; + if (il.hasRequestBody(pe)) { + let S = new fe.constructor(), ce = new FormData(V); + ue ? T.value = await b.apiFormVoid(S, ce, { jsconfig: me }) : T.value = await b.apiForm(S, ce, { jsconfig: me }); } else { - let P = new re.constructor(ee.value); - console.debug("AutoForm.submit", P), fe ? N.value = await g.apiVoid(P, { jsconfig: H }) : N.value = await g.api(P, { jsconfig: H }); + let S = new fe.constructor(Bo(ee.value)); + console.debug("AutoForm.submit", S), ue ? T.value = await b.apiVoid(S, { jsconfig: me }) : T.value = await b.api(S, { jsconfig: me }); } - N.value.succeeded ? (l("success", N.value.response), de()) : l("error", N.value.error); + T.value.succeeded ? (a("success", T.value.response), ne()) : a("error", T.value.error); } - async function W() { - x(d.value); + async function N() { + w(d.value); } function E(V) { - l("update:modelValue", V); + a("update:modelValue", V); } - function G() { - l("done"); + function h() { + a("done"); } - const C = M(!1), _ = M(""), B = { + const C = O(!1), Y = O(""), J = { entering: { cls: "transform transition ease-in-out duration-500 sm:duration-700", from: "translate-x-full", to: "translate-x-0" }, leaving: { cls: "transform transition ease-in-out duration-500 sm:duration-700", from: "translate-x-0", to: "translate-x-full" } }; - Lt(C, () => { - Ct(B, _, C.value), C.value || setTimeout(G, 700); + bt(C, () => { + yt(J, Y, C.value), C.value || setTimeout(h, 700); }), C.value = !0; - function de() { - n.formStyle == "slideOver" ? C.value = !1 : G(); + function ne() { + n.formStyle == "slideOver" ? C.value = !1 : h(); } - const F = (V) => { - V.key === "Escape" && de(); + const D = (V) => { + V.key === "Escape" && ne(); }; - return Xe(() => window.addEventListener("keydown", F)), Pt(() => window.removeEventListener("keydown", F)), (V, re) => { - var ve, Ve, Fe, z, Q, oe, ge, Se, Oe, Re, Me; - const ye = X("AutoFormFields"), fe = X("FormLoading"), H = X("PrimaryButton"), P = X("CloseButton"), me = X("SecondaryButton"), Ce = X("ModalLookup"); - return a(), u("div", null, [ - o(K) ? e.formStyle == "card" ? (a(), u("div", { + return Ye(() => window.addEventListener("keydown", D)), Ft(() => window.removeEventListener("keydown", D)), (V, fe) => { + var Se, ge, H, Q, oe, be, $e, Ae, He, Fe, De; + const pe = Z("AutoFormFields"), ue = Z("FormLoading"), me = Z("PrimaryButton"), S = Z("CloseButton"), ce = Z("SecondaryButton"), Ve = Z("ModalLookup"); + return o(), i("div", null, [ + R.value ? V.formStyle == "card" ? (o(), i("div", { key: 1, - class: w(o(T)) + class: y(M.value) }, [ - s("form", { + l("form", { ref_key: "elForm", ref: d, - onSubmit: re[0] || (re[0] = Ne((De) => x(De.target), ["prevent"])), + onSubmit: fe[0] || (fe[0] = Ue((Oe) => w(Oe.target), ["prevent"])), autocomplete: "off", - class: w(e.innerFormClass) + class: y(V.innerFormClass) }, [ - s("div", { - class: w(e.bodyClass) + l("div", { + class: y(V.bodyClass) }, [ - s("div", { - class: w(e.headerClass) + l("div", { + class: y(V.headerClass) }, [ - V.$slots.heading ? (a(), u("div", k0, [ - Z(V.$slots, "heading") - ])) : (a(), u("h3", { + V.$slots.heading ? (o(), i("div", U0, [ + U(V.$slots, "heading") + ])) : (o(), i("h3", { key: 1, - class: w(o(j)) - }, A(o(S)), 3)), - V.$slots.subheading ? (a(), u("div", $0, [ - Z(V.$slots, "subheading") - ])) : e.subHeading ? (a(), u("p", { + class: y(L.value) + }, F(A.value), 3)), + V.$slots.subheading ? (o(), i("div", q0, [ + U(V.$slots, "subheading") + ])) : V.subHeading ? (o(), i("p", { key: 3, - class: w(o(L)) - }, A(e.subHeading), 3)) : (ve = o(K)) != null && ve.notes ? (a(), u("p", { + class: y(z.value) + }, F(V.subHeading), 3)) : (Se = R.value) != null && Se.notes ? (o(), i("p", { key: 4, - class: w(["notes", o(L)]), - innerHTML: (Ve = o(K)) == null ? void 0 : Ve.notes - }, null, 10, C0)) : k("", !0) + class: y(["notes", z.value]), + innerHTML: (ge = R.value) == null ? void 0 : ge.notes + }, null, 10, Q0)) : x("", !0) ], 2), - Z(V.$slots, "header", { - instance: (Fe = Be()) == null ? void 0 : Fe.exposed, + U(V.$slots, "header", { + instance: (H = Be()) == null ? void 0 : H.exposed, model: ee.value }), - _0, - (a(), se(ye, { + K0, + (o(), ae(pe, { ref_key: "formFields", - ref: i, - key: r.value, - type: e.type, + ref: r, + key: u.value, + type: V.type, modelValue: ee.value, "onUpdate:modelValue": E, - api: N.value, - configureField: e.configureField, - configureFormLayout: e.configureFormLayout + api: T.value, + configureField: V.configureField, + configureFormLayout: V.configureFormLayout }, null, 8, ["type", "modelValue", "api", "configureField", "configureFormLayout"])), - Z(V.$slots, "footer", { - instance: (z = Be()) == null ? void 0 : z.exposed, + U(V.$slots, "footer", { + instance: (Q = Be()) == null ? void 0 : Q.exposed, model: ee.value }) ], 2), - Z(V.$slots, "buttons", {}, () => { - var De, Qe; + U(V.$slots, "buttons", {}, () => { + var Oe, We; return [ - s("div", { - class: w(o(q)) + l("div", { + class: y(K.value) }, [ - s("div", null, [ - Z(V.$slots, "leftbuttons", { - instance: (De = Be()) == null ? void 0 : De.exposed, + l("div", null, [ + U(V.$slots, "leftbuttons", { + instance: (Oe = Be()) == null ? void 0 : Oe.exposed, model: ee.value }) ]), - s("div", null, [ - e.showLoading && o(te) ? (a(), se(fe, { key: 0 })) : k("", !0) + l("div", null, [ + V.showLoading && q.value ? (o(), ae(ue, { key: 0 })) : x("", !0) ]), - s("div", L0, [ - V0, - $e(H, { - disabled: e.allowSubmit ? !e.allowSubmit(ee.value) : !1 + l("div", Z0, [ + W0, + ye(me, { + disabled: V.allowSubmit ? !V.allowSubmit(ee.value) : !1 }, { - default: ke(() => [ - xe(A(e.submitLabel), 1) + default: xe(() => [ + ke(F(V.submitLabel), 1) ]), _: 1 }, 8, ["disabled"]), - Z(V.$slots, "rightbuttons", { - instance: (Qe = Be()) == null ? void 0 : Qe.exposed, + U(V.$slots, "rightbuttons", { + instance: (We = Be()) == null ? void 0 : We.exposed, model: ee.value }) ]) @@ -4991,111 +5124,111 @@ const b0 = { key: 0 }, w0 = { class: "text-red-700" }, x0 = /* @__PURE__ */ s("b ]; }) ], 34) - ], 2)) : (a(), u("div", S0, [ - M0, - s("div", A0, [ - s("div", { - onMousedown: de, + ], 2)) : (o(), i("div", G0, [ + J0, + l("div", X0, [ + l("div", { + onMousedown: ne, class: "absolute inset-0 overflow-hidden" }, [ - s("div", { - onMousedown: re[2] || (re[2] = Ne(() => { + l("div", { + onMousedown: fe[2] || (fe[2] = Ue(() => { }, ["stop"])), class: "pointer-events-none fixed inset-y-0 right-0 flex pl-10" }, [ - s("div", { - class: w(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg", _.value]) + l("div", { + class: y(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg", Y.value]) }, [ - s("form", { + l("form", { ref_key: "elForm", ref: d, - class: w(o(J)), - onSubmit: re[1] || (re[1] = Ne((De) => x(De.target), ["prevent"])) + class: y(ie.value), + onSubmit: fe[1] || (fe[1] = Ue((Oe) => w(Oe.target), ["prevent"])) }, [ - s("div", T0, [ - s("div", F0, [ - s("div", I0, [ - s("div", D0, [ - s("div", O0, [ - V.$slots.heading ? (a(), u("div", j0, [ - Z(V.$slots, "heading") - ])) : (a(), u("h3", { + l("div", Y0, [ + l("div", ef, [ + l("div", tf, [ + l("div", sf, [ + l("div", lf, [ + V.$slots.heading ? (o(), i("div", nf, [ + U(V.$slots, "heading") + ])) : (o(), i("h3", { key: 1, - class: w(o(j)) - }, A(o(S)), 3)), - V.$slots.subheading ? (a(), u("div", P0, [ - Z(V.$slots, "subheading") - ])) : e.subHeading ? (a(), u("p", { + class: y(L.value) + }, F(A.value), 3)), + V.$slots.subheading ? (o(), i("div", of, [ + U(V.$slots, "subheading") + ])) : V.subHeading ? (o(), i("p", { key: 3, - class: w(o(L)) - }, A(e.subHeading), 3)) : (Q = o(K)) != null && Q.notes ? (a(), u("p", { + class: y(z.value) + }, F(V.subHeading), 3)) : (oe = R.value) != null && oe.notes ? (o(), i("p", { key: 4, - class: w(["notes", o(L)]), - innerHTML: (oe = o(K)) == null ? void 0 : oe.notes - }, null, 10, B0)) : k("", !0) + class: y(["notes", z.value]), + innerHTML: (be = R.value) == null ? void 0 : be.notes + }, null, 10, af)) : x("", !0) ]), - s("div", R0, [ - $e(P, { + l("div", rf, [ + ye(S, { "button-class": "bg-gray-50 dark:bg-gray-900", - onClose: de + onClose: ne }) ]) ]) ]), - Z(V.$slots, "header", { - instance: (ge = Be()) == null ? void 0 : ge.exposed, + U(V.$slots, "header", { + instance: ($e = Be()) == null ? void 0 : $e.exposed, model: ee.value }), - (a(), se(ye, { + (o(), ae(pe, { ref_key: "formFields", - ref: i, - key: r.value, - type: e.type, + ref: r, + key: u.value, + type: V.type, modelValue: ee.value, "onUpdate:modelValue": E, - api: N.value, - configureField: e.configureField, - configureFormLayout: e.configureFormLayout + api: T.value, + configureField: V.configureField, + configureFormLayout: V.configureFormLayout }, null, 8, ["type", "modelValue", "api", "configureField", "configureFormLayout"])), - Z(V.$slots, "footer", { - instance: (Se = Be()) == null ? void 0 : Se.exposed, + U(V.$slots, "footer", { + instance: (Ae = Be()) == null ? void 0 : Ae.exposed, model: ee.value }) ]) ]), - s("div", { - class: w(o(q)) + l("div", { + class: y(K.value) }, [ - s("div", null, [ - Z(V.$slots, "leftbuttons", { - instance: (Oe = Be()) == null ? void 0 : Oe.exposed, + l("div", null, [ + U(V.$slots, "leftbuttons", { + instance: (He = Be()) == null ? void 0 : He.exposed, model: ee.value }) ]), - s("div", null, [ - e.showLoading && o(te) ? (a(), se(fe, { key: 0 })) : k("", !0) + l("div", null, [ + V.showLoading && q.value ? (o(), ae(ue, { key: 0 })) : x("", !0) ]), - s("div", H0, [ - $e(me, { - onClick: de, - disabled: o(te) + l("div", uf, [ + ye(ce, { + onClick: ne, + disabled: q.value }, { - default: ke(() => [ - xe("Cancel") + default: xe(() => [ + ke("Cancel") ]), _: 1 }, 8, ["disabled"]), - $e(H, { + ye(me, { class: "ml-4", - disabled: e.allowSubmit ? !e.allowSubmit(ee.value) : !1 + disabled: V.allowSubmit ? !V.allowSubmit(ee.value) : !1 }, { - default: ke(() => [ - xe(A(e.submitLabel), 1) + default: xe(() => [ + ke(F(V.submitLabel), 1) ]), _: 1 }, 8, ["disabled"]), - Z(V.$slots, "rightbuttons", { - instance: (Re = Be()) == null ? void 0 : Re.exposed, + U(V.$slots, "rightbuttons", { + instance: (Fe = Be()) == null ? void 0 : Fe.exposed, model: ee.value }) ]) @@ -5105,675 +5238,823 @@ const b0 = { key: 0 }, w0 = { class: "text-red-700" }, x0 = /* @__PURE__ */ s("b ], 32) ], 32) ]) - ])) : (a(), u("div", b0, [ - s("p", w0, [ - xe("Could not create form for unknown "), - x0, - xe(" " + A(o(D)), 1) + ])) : (o(), i("div", E0, [ + l("p", z0, [ + ke("Could not create form for unknown "), + N0, + ke(" " + F(le.value), 1) ]) ])), - ((Me = y.value) == null ? void 0 : Me.name) == "ModalLookup" && y.value.ref ? (a(), se(Ce, { + ((De = $.value) == null ? void 0 : De.name) == "ModalLookup" && $.value.ref ? (o(), ae(Ve, { key: 3, - "ref-info": y.value.ref, - onDone: v - }, null, 8, ["ref-info"])) : k("", !0) + "ref-info": $.value.ref, + onDone: g + }, null, 8, ["ref-info"])) : x("", !0) ]); }; } -}), z0 = { key: 0 }, N0 = { class: "text-red-700" }, U0 = /* @__PURE__ */ s("b", null, "type", -1), q0 = ["onSubmit"], Q0 = { key: 0 }, K0 = { key: 2 }, Z0 = ["innerHTML"], G0 = { class: "flex justify-end" }, W0 = { +}), cf = { key: 0 }, ff = { class: "text-red-700" }, vf = /* @__PURE__ */ l("b", null, "type", -1), pf = { key: 0 }, mf = { key: 2 }, hf = ["innerHTML"], gf = { class: "flex justify-end" }, yf = { key: 2, class: "relative z-10", "aria-labelledby": "slide-over-title", role: "dialog", "aria-modal": "true" -}, J0 = /* @__PURE__ */ s("div", { class: "fixed inset-0" }, null, -1), X0 = { class: "fixed inset-0 overflow-hidden" }, Y0 = ["onSubmit"], ef = { class: "flex min-h-0 flex-1 flex-col overflow-auto" }, tf = { class: "flex-1" }, lf = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6" }, nf = { class: "flex items-start justify-between space-x-3" }, sf = { class: "space-y-1" }, of = { key: 0 }, af = { key: 2 }, rf = ["innerHTML"], uf = { class: "flex h-7 items-center" }, df = { class: "flex justify-end" }, cf = /* @__PURE__ */ ue({ +}, bf = /* @__PURE__ */ l("div", { class: "fixed inset-0" }, null, -1), wf = { class: "fixed inset-0 overflow-hidden" }, kf = { class: "flex min-h-0 flex-1 flex-col overflow-auto" }, _f = { class: "flex-1" }, $f = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6" }, Cf = { class: "flex items-start justify-between space-x-3" }, xf = { class: "space-y-1" }, Lf = { key: 0 }, Vf = { key: 2 }, Sf = ["innerHTML"], Mf = { class: "flex h-7 items-center" }, Af = { class: "flex justify-end" }, Tf = /* @__PURE__ */ de({ __name: "AutoCreateForm", props: { - type: null, + type: {}, formStyle: { default: "slideOver" }, - panelClass: null, - formClass: null, - headingClass: null, - subHeadingClass: null, - buttonsClass: null, - heading: null, - subHeading: null, + panelClass: {}, + formClass: {}, + headingClass: {}, + subHeadingClass: {}, + buttonsClass: {}, + heading: {}, + subHeading: {}, autosave: { type: Boolean, default: !0 }, showLoading: { type: Boolean, default: !0 }, showCancel: { type: Boolean, default: !0 }, - configureField: null, - configureFormLayout: null + configureField: {}, + configureFormLayout: {} }, emits: ["done", "save", "error"], - setup(e, { expose: t, emit: l }) { - const n = e, i = M(), r = M(1); - t({ forceUpdate: d, props: n, setModel: c, formFields: i }); + setup(e, { expose: t, emit: s }) { + const n = e, a = s, r = O(), u = O(1); function d() { - var V, re; - r.value++, (V = i.value) == null || V.forceUpdate(); - const F = Be(); - (re = F == null ? void 0 : F.proxy) == null || re.$forceUpdate(); + var V, fe; + u.value++, (V = r.value) == null || V.forceUpdate(); + const D = Be(); + (fe = D == null ? void 0 : D.proxy) == null || fe.$forceUpdate(); } - function c(F) { - Object.assign(j.value, F), d(); + function c(D) { + Object.assign(L.value, D), d(); } - function m(F) { + function f(D) { } - Xt("ModalProvider", { - openModal: p + ss("ModalProvider", { + openModal: k }); - const y = M(), b = M(); - function p(F, V) { - y.value = F, b.value = V; - } - async function v(F) { - b.value && b.value(F), y.value = void 0, b.value = void 0; - } - const { typeOf: g, typeProperties: O, Crud: U, createDto: Y, formValues: R } = ot(), N = f(() => Bt(n.type)), T = f(() => g(N.value)), j = M((() => typeof n.type == "string" ? Y(n.type) : n.type ? new n.type() : null)()), L = f(() => n.panelClass || Ze.panelClass(n.formStyle)), q = f(() => n.formClass || Ze.formClass(n.formStyle)), D = f(() => n.headingClass || Ze.headingClass(n.formStyle)), K = f(() => n.subHeadingClass || Ze.subHeadingClass(n.formStyle)), ne = f(() => n.buttonsClass || Ze.buttonsClass), ee = f(() => U.model(T.value)), te = f(() => { - var F; - return n.heading || ((F = g(N.value)) == null ? void 0 : F.description) || (ee.value ? `New ${Ee(ee.value)}` : Ee(N.value)); - }), S = M(new We()); - let le = Tl(), x = f(() => le.loading.value); - async function W(F) { - var fe, H; - let V = F.target; + const $ = O(), m = O(); + function k(D, V) { + $.value = D, m.value = V; + } + async function g(D) { + m.value && m.value(D), $.value = void 0, m.value = void 0; + } + const { typeOf: b, typeProperties: P, Crud: I, createDto: se, formValues: j } = lt(), T = v(() => qt(n.type)), M = v(() => b(T.value)), L = O((() => typeof n.type == "string" ? se(n.type) : n.type ? new n.type() : null)()); + t({ forceUpdate: d, props: n, setModel: c, formFields: r, model: L }); + const z = v(() => n.panelClass || Ee.panelClass(n.formStyle)), K = v(() => n.formClass || Ee.formClass(n.formStyle)), le = v(() => n.headingClass || Ee.headingClass(n.formStyle)), R = v(() => n.subHeadingClass || Ee.subHeadingClass(n.formStyle)), W = v(() => n.buttonsClass || Ee.buttonsClass), ee = v(() => I.model(M.value)), q = v(() => { + var D; + return n.heading || ((D = b(T.value)) == null ? void 0 : D.description) || (ee.value ? `New ${Pe(ee.value)}` : Pe(T.value)); + }), A = O(new Xe()); + let te = Ds(), w = v(() => te.loading.value); + G.interceptors.has("AutoCreateForm.new") && G.interceptors.invoke("AutoCreateForm.new", { props: n, model: L }); + async function N(D) { + var ue, me; + let V = D.target; if (!n.autosave) { - l("save", new j.value.constructor(R(V, O(T.value)))); + a("save", new L.value.constructor(j(V, P(M.value)))); return; } - let re = Ue((fe = j.value) == null ? void 0 : fe.getMethod, (P) => typeof P == "function" ? P() : null) || "POST", ye = Ue((H = j.value) == null ? void 0 : H.createResponse, (P) => typeof P == "function" ? P() : null) == null; - if (tn.hasRequestBody(re)) { - let P = new j.value.constructor(), me = new FormData(V); - ye ? S.value = await le.apiFormVoid(P, me, { jsconfig: "eccn" }) : S.value = await le.apiForm(P, me, { jsconfig: "eccn" }); + let fe = Ze((ue = L.value) == null ? void 0 : ue.getMethod, (S) => typeof S == "function" ? S() : null) || "POST", pe = Ze((me = L.value) == null ? void 0 : me.createResponse, (S) => typeof S == "function" ? S() : null) == null; + if (il.hasRequestBody(fe)) { + let S = new L.value.constructor(), ce = new FormData(V); + pe ? A.value = await te.apiFormVoid(S, ce, { jsconfig: "eccn" }) : A.value = await te.apiForm(S, ce, { jsconfig: "eccn" }); } else { - let P = R(V, O(T.value)), me = new j.value.constructor(P); - ye ? S.value = await le.apiVoid(me, { jsconfig: "eccn" }) : S.value = await le.api(me, { jsconfig: "eccn" }); + let S = j(V, P(M.value)), ce = new L.value.constructor(S); + pe ? A.value = await te.apiVoid(ce, { jsconfig: "eccn" }) : A.value = await te.api(ce, { jsconfig: "eccn" }); } - S.value.succeeded ? (V.reset(), l("save", S.value.response)) : l("error", S.value.error); + A.value.succeeded ? (V.reset(), a("save", A.value.response)) : a("error", A.value.error); } function E() { - l("done"); + a("done"); } - const G = M(!1), C = M(""), _ = { + const h = O(!1), C = O(""), Y = { entering: { cls: "transform transition ease-in-out duration-500 sm:duration-700", from: "translate-x-full", to: "translate-x-0" }, leaving: { cls: "transform transition ease-in-out duration-500 sm:duration-700", from: "translate-x-0", to: "translate-x-full" } }; - Lt(G, () => { - Ct(_, C, G.value), G.value || setTimeout(E, 700); - }), G.value = !0; - function B() { - n.formStyle == "slideOver" ? G.value = !1 : E(); - } - const de = (F) => { - F.key === "Escape" && B(); + bt(h, () => { + yt(Y, C, h.value), h.value || setTimeout(E, 700); + }), h.value = !0; + function J() { + n.formStyle == "slideOver" ? h.value = !1 : E(); + } + const ne = (D) => { + D.key === "Escape" && J(); }; - return Xe(() => window.addEventListener("keydown", de)), Pt(() => window.removeEventListener("keydown", de)), (F, V) => { - var Ce, ve, Ve, Fe, z, Q, oe, ge, Se; - const re = X("AutoFormFields"), ye = X("FormLoading"), fe = X("SecondaryButton"), H = X("PrimaryButton"), P = X("CloseButton"), me = X("ModalLookup"); - return a(), u("div", null, [ - o(T) ? e.formStyle == "card" ? (a(), u("div", { + return Ye(() => window.addEventListener("keydown", ne)), Ft(() => window.removeEventListener("keydown", ne)), (D, V) => { + var Ve, Se, ge, H, Q, oe, be, $e, Ae; + const fe = Z("AutoFormFields"), pe = Z("FormLoading"), ue = Z("SecondaryButton"), me = Z("PrimaryButton"), S = Z("CloseButton"), ce = Z("ModalLookup"); + return o(), i("div", null, [ + M.value ? D.formStyle == "card" ? (o(), i("div", { key: 1, - class: w(o(L)) + class: y(z.value) }, [ - s("form", { - onSubmit: Ne(W, ["prevent"]) + l("form", { + onSubmit: Ue(N, ["prevent"]) }, [ - s("div", { - class: w(o(q)) + l("div", { + class: y(K.value) }, [ - s("div", null, [ - F.$slots.heading ? (a(), u("div", Q0, [ - Z(F.$slots, "heading") - ])) : (a(), u("h3", { + l("div", null, [ + D.$slots.heading ? (o(), i("div", pf, [ + U(D.$slots, "heading") + ])) : (o(), i("h3", { key: 1, - class: w(o(D)) - }, A(o(te)), 3)), - F.$slots.subheading ? (a(), u("div", K0, [ - Z(F.$slots, "subheading") - ])) : e.subHeading ? (a(), u("p", { + class: y(le.value) + }, F(q.value), 3)), + D.$slots.subheading ? (o(), i("div", mf, [ + U(D.$slots, "subheading") + ])) : D.subHeading ? (o(), i("p", { key: 3, - class: w(o(K)) - }, A(e.subHeading), 3)) : (Ce = o(T)) != null && Ce.notes ? (a(), u("p", { + class: y(R.value) + }, F(D.subHeading), 3)) : (Ve = M.value) != null && Ve.notes ? (o(), i("p", { key: 4, - class: w(["notes", o(K)]), - innerHTML: (ve = o(T)) == null ? void 0 : ve.notes - }, null, 10, Z0)) : k("", !0) + class: y(["notes", R.value]), + innerHTML: (Se = M.value) == null ? void 0 : Se.notes + }, null, 10, hf)) : x("", !0) ]), - Z(F.$slots, "header", { - formInstance: (Ve = Be()) == null ? void 0 : Ve.exposed, - model: j.value + U(D.$slots, "header", { + formInstance: (ge = Be()) == null ? void 0 : ge.exposed, + model: L.value }), - (a(), se(re, { + (o(), ae(fe, { ref_key: "formFields", - ref: i, - key: r.value, - modelValue: j.value, - "onUpdate:modelValue": m, - api: S.value, - configureField: e.configureField, - configureFormLayout: e.configureFormLayout + ref: r, + key: u.value, + modelValue: L.value, + "onUpdate:modelValue": f, + api: A.value, + configureField: D.configureField, + configureFormLayout: D.configureFormLayout }, null, 8, ["modelValue", "api", "configureField", "configureFormLayout"])), - Z(F.$slots, "footer", { - formInstance: (Fe = Be()) == null ? void 0 : Fe.exposed, - model: j.value + U(D.$slots, "footer", { + formInstance: (H = Be()) == null ? void 0 : H.exposed, + model: L.value }) ], 2), - s("div", { - class: w(o(ne)) + l("div", { + class: y(W.value) }, [ - s("div", null, [ - e.showLoading && o(x) ? (a(), se(ye, { key: 0 })) : k("", !0) + l("div", null, [ + D.showLoading && X(w) ? (o(), ae(pe, { key: 0 })) : x("", !0) ]), - s("div", G0, [ - e.showCancel ? (a(), se(fe, { + l("div", gf, [ + D.showCancel ? (o(), ae(ue, { key: 0, - onClick: B, - disabled: o(x) + onClick: J, + disabled: X(w) }, { - default: ke(() => [ - xe("Cancel") + default: xe(() => [ + ke("Cancel") ]), _: 1 - }, 8, ["disabled"])) : k("", !0), - $e(H, { + }, 8, ["disabled"])) : x("", !0), + ye(me, { type: "submit", class: "ml-4", - disabled: o(x) + disabled: X(w) }, { - default: ke(() => [ - xe("Save") + default: xe(() => [ + ke("Save") ]), _: 1 }, 8, ["disabled"]) ]) ], 2) - ], 40, q0) - ], 2)) : (a(), u("div", W0, [ - J0, - s("div", X0, [ - s("div", { - onMousedown: B, + ], 32) + ], 2)) : (o(), i("div", yf, [ + bf, + l("div", wf, [ + l("div", { + onMousedown: J, class: "absolute inset-0 overflow-hidden" }, [ - s("div", { - onMousedown: V[0] || (V[0] = Ne(() => { + l("div", { + onMousedown: V[0] || (V[0] = Ue(() => { }, ["stop"])), class: "pointer-events-none fixed inset-y-0 right-0 flex pl-10" }, [ - s("div", { - class: w(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg", C.value]) + l("div", { + class: y(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg", C.value]) }, [ - s("form", { - class: w(o(q)), - onSubmit: Ne(W, ["prevent"]) + l("form", { + class: y(K.value), + onSubmit: Ue(N, ["prevent"]) }, [ - s("div", ef, [ - s("div", tf, [ - s("div", lf, [ - s("div", nf, [ - s("div", sf, [ - F.$slots.heading ? (a(), u("div", of, [ - Z(F.$slots, "heading") - ])) : (a(), u("h3", { + l("div", kf, [ + l("div", _f, [ + l("div", $f, [ + l("div", Cf, [ + l("div", xf, [ + D.$slots.heading ? (o(), i("div", Lf, [ + U(D.$slots, "heading") + ])) : (o(), i("h3", { key: 1, - class: w(o(D)) - }, A(o(te)), 3)), - F.$slots.subheading ? (a(), u("div", af, [ - Z(F.$slots, "subheading") - ])) : e.subHeading ? (a(), u("p", { + class: y(le.value) + }, F(q.value), 3)), + D.$slots.subheading ? (o(), i("div", Vf, [ + U(D.$slots, "subheading") + ])) : D.subHeading ? (o(), i("p", { key: 3, - class: w(o(K)) - }, A(e.subHeading), 3)) : (z = o(T)) != null && z.notes ? (a(), u("p", { + class: y(R.value) + }, F(D.subHeading), 3)) : (Q = M.value) != null && Q.notes ? (o(), i("p", { key: 4, - class: w(["notes", o(K)]), - innerHTML: (Q = o(T)) == null ? void 0 : Q.notes - }, null, 10, rf)) : k("", !0) + class: y(["notes", R.value]), + innerHTML: (oe = M.value) == null ? void 0 : oe.notes + }, null, 10, Sf)) : x("", !0) ]), - s("div", uf, [ - $e(P, { + l("div", Mf, [ + ye(S, { "button-class": "bg-gray-50 dark:bg-gray-900", - onClose: B + onClose: J }) ]) ]) ]), - Z(F.$slots, "header", { - formInstance: (oe = Be()) == null ? void 0 : oe.exposed, - model: j.value + U(D.$slots, "header", { + formInstance: (be = Be()) == null ? void 0 : be.exposed, + model: L.value }), - (a(), se(re, { + (o(), ae(fe, { ref_key: "formFields", - ref: i, - key: r.value, - modelValue: j.value, - "onUpdate:modelValue": m, - api: S.value, - configureField: e.configureField, - configureFormLayout: e.configureFormLayout + ref: r, + key: u.value, + modelValue: L.value, + "onUpdate:modelValue": f, + api: A.value, + configureField: D.configureField, + configureFormLayout: D.configureFormLayout }, null, 8, ["modelValue", "api", "configureField", "configureFormLayout"])), - Z(F.$slots, "footer", { - formInstance: (ge = Be()) == null ? void 0 : ge.exposed, - model: j.value + U(D.$slots, "footer", { + formInstance: ($e = Be()) == null ? void 0 : $e.exposed, + model: L.value }) ]) ]), - s("div", { - class: w(o(ne)) + l("div", { + class: y(W.value) }, [ - s("div", null, [ - e.showLoading && o(x) ? (a(), se(ye, { key: 0 })) : k("", !0) + l("div", null, [ + D.showLoading && X(w) ? (o(), ae(pe, { key: 0 })) : x("", !0) ]), - s("div", df, [ - e.showCancel ? (a(), se(fe, { + l("div", Af, [ + D.showCancel ? (o(), ae(ue, { key: 0, - onClick: B, - disabled: o(x) + onClick: J, + disabled: X(w) }, { - default: ke(() => [ - xe("Cancel") + default: xe(() => [ + ke("Cancel") ]), _: 1 - }, 8, ["disabled"])) : k("", !0), - $e(H, { + }, 8, ["disabled"])) : x("", !0), + ye(me, { type: "submit", class: "ml-4", - disabled: o(x) + disabled: X(w) }, { - default: ke(() => [ - xe("Save") + default: xe(() => [ + ke("Save") ]), _: 1 }, 8, ["disabled"]) ]) ], 2) - ], 42, Y0) + ], 34) ], 2) ], 32) ], 32) ]) - ])) : (a(), u("div", z0, [ - s("p", N0, [ - xe("Could not create form for unknown "), - U0, - xe(" " + A(o(N)), 1) + ])) : (o(), i("div", cf, [ + l("p", ff, [ + ke("Could not create form for unknown "), + vf, + ke(" " + F(T.value), 1) ]) ])), - ((Se = y.value) == null ? void 0 : Se.name) == "ModalLookup" && y.value.ref ? (a(), se(me, { + ((Ae = $.value) == null ? void 0 : Ae.name) == "ModalLookup" && $.value.ref ? (o(), ae(ce, { key: 3, - "ref-info": y.value.ref, - onDone: v - }, null, 8, ["ref-info"])) : k("", !0) + "ref-info": $.value.ref, + onDone: g + }, null, 8, ["ref-info"])) : x("", !0) ]); }; } -}), ff = { key: 0 }, mf = { class: "text-red-700" }, vf = /* @__PURE__ */ s("b", null, "type", -1), hf = ["onSubmit"], gf = { key: 0 }, pf = { key: 2 }, yf = ["innerHTML"], bf = { class: "flex justify-end" }, wf = { +}), Ff = { key: 0 }, If = { class: "text-red-700" }, jf = /* @__PURE__ */ l("b", null, "type", -1), Of = { key: 0 }, Df = { key: 2 }, Pf = ["innerHTML"], Bf = { class: "flex justify-end" }, Hf = { key: 2, class: "relative z-10", "aria-labelledby": "slide-over-title", role: "dialog", "aria-modal": "true" -}, xf = /* @__PURE__ */ s("div", { class: "fixed inset-0" }, null, -1), kf = { class: "fixed inset-0 overflow-hidden" }, $f = ["onSubmit"], Cf = { class: "flex min-h-0 flex-1 flex-col overflow-auto" }, _f = { class: "flex-1" }, Lf = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6" }, Vf = { class: "flex items-start justify-between space-x-3" }, Sf = { class: "space-y-1" }, Mf = { key: 0 }, Af = { key: 2 }, Tf = ["innerHTML"], Ff = { class: "flex h-7 items-center" }, If = { class: "flex justify-end" }, Df = /* @__PURE__ */ ue({ +}, Rf = /* @__PURE__ */ l("div", { class: "fixed inset-0" }, null, -1), Ef = { class: "fixed inset-0 overflow-hidden" }, zf = { class: "flex min-h-0 flex-1 flex-col overflow-auto" }, Nf = { class: "flex-1" }, Uf = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6" }, qf = { class: "flex items-start justify-between space-x-3" }, Qf = { class: "space-y-1" }, Kf = { key: 0 }, Zf = { key: 2 }, Wf = ["innerHTML"], Gf = { class: "flex h-7 items-center" }, Jf = { class: "flex justify-end" }, Xf = /* @__PURE__ */ de({ __name: "AutoEditForm", props: { - modelValue: null, - type: null, - deleteType: null, + modelValue: {}, + type: {}, + deleteType: {}, formStyle: { default: "slideOver" }, - panelClass: null, - formClass: null, - headingClass: null, - subHeadingClass: null, - heading: null, - subHeading: null, + panelClass: {}, + formClass: {}, + headingClass: {}, + subHeadingClass: {}, + heading: {}, + subHeading: {}, autosave: { type: Boolean, default: !0 }, showLoading: { type: Boolean, default: !0 }, - configureField: null, - configureFormLayout: null + configureField: {}, + configureFormLayout: {} }, emits: ["done", "save", "delete", "error"], - setup(e, { expose: t, emit: l }) { - const n = e, i = M(), r = M(1); - t({ forceUpdate: d, props: n, setModel: c, formFields: i }); + setup(e, { expose: t, emit: s }) { + const n = e, a = s, r = O(), u = O(1); function d() { - var P; - r.value++, D.value = q(); - const H = Be(); - (P = H == null ? void 0 : H.proxy) == null || P.$forceUpdate(); + var ce; + u.value++, le.value = K(); + const S = Be(); + (ce = S == null ? void 0 : S.proxy) == null || ce.$forceUpdate(); } - function c(H) { - Object.assign(D.value, H); + function c(S) { + Object.assign(le.value, S); } - function m(H) { + function f(S) { } - Xt("ModalProvider", { - openModal: p + ss("ModalProvider", { + openModal: k }); - const y = M(), b = M(); - function p(H, P) { - y.value = H, b.value = P; - } - async function v(H) { - b.value && b.value(H), y.value = void 0, b.value = void 0; + const $ = O(), m = O(); + function k(S, ce) { + $.value = S, m.value = ce; + } + async function g(S) { + m.value && m.value(S), $.value = void 0, m.value = void 0; + } + const { typeOf: b, apiOf: P, typeProperties: I, createFormLayout: se, getPrimaryKey: j, Crud: T, createDto: M, formValues: ie } = lt(), L = v(() => qt(n.type)), z = v(() => b(L.value)), K = () => typeof n.type == "string" ? M(n.type, ys(n.modelValue)) : n.type ? new n.type(ys(n.modelValue)) : null, le = O(K()); + t({ forceUpdate: d, props: n, setModel: c, formFields: r, model: le }); + const R = v(() => n.panelClass || Ee.panelClass(n.formStyle)), W = v(() => n.formClass || Ee.formClass(n.formStyle)), ee = v(() => n.headingClass || Ee.headingClass(n.formStyle)), q = v(() => n.subHeadingClass || Ee.subHeadingClass(n.formStyle)), A = v(() => T.model(z.value)), te = v(() => { + var S; + return n.heading || ((S = b(L.value)) == null ? void 0 : S.description) || (A.value ? `Update ${Pe(A.value)}` : Pe(L.value)); + }), w = O(new Xe()); + let N = Object.assign({}, ys(n.modelValue)); + G.interceptors.has("AutoEditForm.new") && G.interceptors.invoke("AutoEditForm.new", { props: n, model: le, origModel: N }); + let E = Ds(), h = v(() => E.loading.value); + const C = () => Ze(b(T.model(z.value)), (S) => j(S)); + function Y(S) { + const { op: ce, prop: Ve } = S; + ce && (T.isPatch(ce) || T.isUpdate(ce)) && (S.disabled = Ve == null ? void 0 : Ve.isPrimaryKey), n.configureField && n.configureField(S); } - const { typeOf: g, apiOf: O, typeProperties: U, createFormLayout: Y, getPrimaryKey: R, Crud: N, createDto: T, formValues: J } = ot(), j = f(() => Bt(n.type)), L = f(() => g(j.value)), q = () => typeof n.type == "string" ? T(n.type, ml(n.modelValue)) : n.type ? new n.type(ml(n.modelValue)) : null, D = M(q()), K = f(() => n.panelClass || Ze.panelClass(n.formStyle)), ne = f(() => n.formClass || Ze.formClass(n.formStyle)), ee = f(() => n.headingClass || Ze.headingClass(n.formStyle)), te = f(() => n.subHeadingClass || Ze.subHeadingClass(n.formStyle)), S = f(() => N.model(L.value)), le = f(() => { - var H; - return n.heading || ((H = g(j.value)) == null ? void 0 : H.description) || (S.value ? `Update ${Ee(S.value)}` : Ee(j.value)); - }), x = M(new We()); - let W = Tl(), E = f(() => W.loading.value); - const G = () => Ue(g(N.model(L.value)), (H) => R(H)); - function C(H) { - const { op: P, prop: me } = H; - P && (N.isPatch(P) || N.isUpdate(P)) && (H.disabled = me == null ? void 0 : me.isPrimaryKey), n.configureField && n.configureField(H); - } - async function _(H) { - var Ve, Fe; - let P = H.target; + async function J(S) { + var H, Q; + let ce = S.target; if (!n.autosave) { - l("save", new D.value.constructor(J(P, U(L.value)))); + a("save", new le.value.constructor(ie(ce, I(z.value)))); return; } - let me = Ue((Ve = D.value) == null ? void 0 : Ve.getMethod, (z) => typeof z == "function" ? z() : null) || "POST", Ce = Ue((Fe = D.value) == null ? void 0 : Fe.createResponse, (z) => typeof z == "function" ? z() : null) == null, ve = G(); - if (tn.hasRequestBody(me)) { - let z = new D.value.constructor(), Q = be(n.modelValue, ve.name), oe = new FormData(P); - ve && !Array.from(oe.keys()).some((Re) => Re.toLowerCase() == ve.name.toLowerCase()) && oe.append(ve.name, Q); - let ge = []; - const Se = j.value && O(j.value); - if (Se && N.isPatch(Se)) { - let Re = ml(n.modelValue), Me = Y(L.value), De = {}; - if (ve && (De[ve.name] = Q), Me.forEach((je) => { - let Ye = je.id, Ht = be(Re, Ye); - if (ve && ve.name.toLowerCase() === Ye.toLowerCase()) + let Ve = Ze((H = le.value) == null ? void 0 : H.getMethod, (oe) => typeof oe == "function" ? oe() : null) || "POST", Se = Ze((Q = le.value) == null ? void 0 : Q.createResponse, (oe) => typeof oe == "function" ? oe() : null) == null, ge = C(); + if (il.hasRequestBody(Ve)) { + let oe = new le.value.constructor(), be = _e(n.modelValue, ge.name), $e = new FormData(ce); + ge && !Array.from($e.keys()).some((De) => De.toLowerCase() == ge.name.toLowerCase()) && $e.append(ge.name, be); + let Ae = []; + const He = L.value && P(L.value); + if (He && T.isPatch(He)) { + let De = se(z.value), Oe = {}; + if (ge && (Oe[ge.name] = be), De.forEach((Re) => { + let it = Re.id, jt = _e(N, it); + if (ge && ge.name.toLowerCase() === it.toLowerCase()) return; - let mt = oe.get(Ye), ll = mt != null, nl = je.type === "checkbox" ? ll !== !!Ht : je.type === "file" ? ll : mt != Ht; - !mt && !Ht && (nl = !1), nl && (mt ? De[Ye] = mt : je.type !== "file" && ge.push(Ye)); - }), Array.from(oe.keys()).filter((je) => !De[je]).forEach((je) => oe.delete(je)), Array.from(oe.keys()).filter((je) => je.toLowerCase() != ve.name.toLowerCase()).length == 0 && ge.length == 0) { - ye(); + let ht = $e.get(it); + G.interceptors.has("AutoEditForm.save.formLayout") && G.interceptors.invoke("AutoEditForm.save.formLayout", { origValue: jt, formLayout: De, input: Re, newValue: ht }); + let as = ht != null, rs = Re.type === "checkbox" ? as !== !!jt : Re.type === "file" ? as : ht != jt; + !ht && !jt && (rs = !1), rs && (ht ? Oe[it] = ht : Re.type !== "file" && Ae.push(it)); + }), G.interceptors.has("AutoEditForm.save") && G.interceptors.invoke("AutoEditForm.save", { origModel: N, formLayout: De, dirtyValues: Oe }), Array.from($e.keys()).filter((Re) => !Oe[Re]).forEach((Re) => $e.delete(Re)), Array.from($e.keys()).filter((Re) => Re.toLowerCase() != ge.name.toLowerCase()).length == 0 && Ae.length == 0) { + ue(); return; } } - const Oe = ge.length > 0 ? { jsconfig: "eccn", reset: ge } : { jsconfig: "eccn" }; - Ce ? x.value = await W.apiFormVoid(z, oe, Oe) : x.value = await W.apiForm(z, oe, Oe); + const Fe = Ae.length > 0 ? { jsconfig: "eccn", reset: Ae } : { jsconfig: "eccn" }; + Se ? w.value = await E.apiFormVoid(oe, $e, Fe) : w.value = await E.apiForm(oe, $e, Fe); } else { - let z = J(P, U(L.value)); - ve && !be(z, ve.name) && (z[ve.name] = be(n.modelValue, ve.name)); - let Q = new D.value.constructor(z); - Ce ? x.value = await W.apiVoid(Q, { jsconfig: "eccn" }) : x.value = await W.api(Q, { jsconfig: "eccn" }); + let oe = ie(ce, I(z.value)); + ge && !_e(oe, ge.name) && (oe[ge.name] = _e(n.modelValue, ge.name)); + let be = new le.value.constructor(oe); + Se ? w.value = await E.apiVoid(be, { jsconfig: "eccn" }) : w.value = await E.api(be, { jsconfig: "eccn" }); } - x.value.succeeded ? (P.reset(), l("save", x.value.response)) : l("error", x.value.error); + w.value.succeeded ? (ce.reset(), a("save", w.value.response)) : a("error", w.value.error); } - async function B(H) { - let P = G(); - const me = P ? be(n.modelValue, P.name) : null; - if (!me) { - console.error(`Could not find Primary Key for Type ${j.value} (${S.value})`); + async function ne(S) { + let ce = C(); + const Ve = ce ? _e(n.modelValue, ce.name) : null; + if (!Ve) { + console.error(`Could not find Primary Key for Type ${L.value} (${A.value})`); return; } - const Ce = { [P.name]: me }, ve = typeof n.deleteType == "string" ? T(n.deleteType, Ce) : n.deleteType ? new n.deleteType(Ce) : null; - Ue(ve.createResponse, (Fe) => typeof Fe == "function" ? Fe() : null) == null ? x.value = await W.apiVoid(ve) : x.value = await W.api(ve), x.value.succeeded ? l("delete", x.value.response) : l("error", x.value.error); + const Se = { [ce.name]: Ve }, ge = typeof n.deleteType == "string" ? M(n.deleteType, Se) : n.deleteType ? new n.deleteType(Se) : null; + Ze(ge.createResponse, (Q) => typeof Q == "function" ? Q() : null) == null ? w.value = await E.apiVoid(ge) : w.value = await E.api(ge), w.value.succeeded ? a("delete", w.value.response) : a("error", w.value.error); } - function de() { - l("done"); + function D() { + a("done"); } - const F = M(!1), V = M(""), re = { + const V = O(!1), fe = O(""), pe = { entering: { cls: "transform transition ease-in-out duration-500 sm:duration-700", from: "translate-x-full", to: "translate-x-0" }, leaving: { cls: "transform transition ease-in-out duration-500 sm:duration-700", from: "translate-x-0", to: "translate-x-full" } }; - Lt(F, () => { - Ct(re, V, F.value), F.value || setTimeout(de, 700); - }), F.value = !0; - function ye() { - n.formStyle == "slideOver" ? F.value = !1 : de(); - } - const fe = (H) => { - H.key === "Escape" && ye(); + bt(V, () => { + yt(pe, fe, V.value), V.value || setTimeout(D, 700); + }), V.value = !0; + function ue() { + n.formStyle == "slideOver" ? V.value = !1 : D(); + } + const me = (S) => { + S.key === "Escape" && ue(); }; - return Xe(() => window.addEventListener("keydown", fe)), Pt(() => window.removeEventListener("keydown", fe)), (H, P) => { - var oe, ge, Se, Oe, Re, Me, De, Qe, je; - const me = X("AutoFormFields"), Ce = X("ConfirmDelete"), ve = X("FormLoading"), Ve = X("SecondaryButton"), Fe = X("PrimaryButton"), z = X("CloseButton"), Q = X("ModalLookup"); - return a(), u("div", null, [ - o(L) ? e.formStyle == "card" ? (a(), u("div", { + return Ye(() => window.addEventListener("keydown", me)), Ft(() => window.removeEventListener("keydown", me)), (S, ce) => { + var $e, Ae, He, Fe, De, Oe, We, Re, it; + const Ve = Z("AutoFormFields"), Se = Z("ConfirmDelete"), ge = Z("FormLoading"), H = Z("SecondaryButton"), Q = Z("PrimaryButton"), oe = Z("CloseButton"), be = Z("ModalLookup"); + return o(), i("div", null, [ + z.value ? S.formStyle == "card" ? (o(), i("div", { key: 1, - class: w(o(K)) + class: y(R.value) }, [ - s("form", { - onSubmit: Ne(_, ["prevent"]) + l("form", { + onSubmit: Ue(J, ["prevent"]) }, [ - s("div", { - class: w(o(ne)) + l("div", { + class: y(W.value) }, [ - s("div", null, [ - H.$slots.heading ? (a(), u("div", gf, [ - Z(H.$slots, "heading") - ])) : (a(), u("h3", { + l("div", null, [ + S.$slots.heading ? (o(), i("div", Of, [ + U(S.$slots, "heading") + ])) : (o(), i("h3", { key: 1, - class: w(o(ee)) - }, A(o(le)), 3)), - H.$slots.subheading ? (a(), u("div", pf, [ - Z(H.$slots, "subheading") - ])) : e.subHeading ? (a(), u("p", { + class: y(ee.value) + }, F(te.value), 3)), + S.$slots.subheading ? (o(), i("div", Df, [ + U(S.$slots, "subheading") + ])) : S.subHeading ? (o(), i("p", { key: 3, - class: w(o(te)) - }, A(e.subHeading), 3)) : (oe = o(L)) != null && oe.notes ? (a(), u("p", { + class: y(q.value) + }, F(S.subHeading), 3)) : ($e = z.value) != null && $e.notes ? (o(), i("p", { key: 4, - class: w(["notes", o(te)]), - innerHTML: (ge = o(L)) == null ? void 0 : ge.notes - }, null, 10, yf)) : k("", !0) + class: y(["notes", q.value]), + innerHTML: (Ae = z.value) == null ? void 0 : Ae.notes + }, null, 10, Pf)) : x("", !0) ]), - Z(H.$slots, "header", { - formInstance: (Se = Be()) == null ? void 0 : Se.exposed, - model: D.value + U(S.$slots, "header", { + formInstance: (He = Be()) == null ? void 0 : He.exposed, + model: le.value }), - (a(), se(me, { + (o(), ae(Ve, { ref_key: "formFields", - ref: i, - key: r.value, - modelValue: D.value, - "onUpdate:modelValue": m, - api: x.value, - configureField: e.configureField, - configureFormLayout: e.configureFormLayout + ref: r, + key: u.value, + modelValue: le.value, + "onUpdate:modelValue": f, + api: w.value, + configureField: S.configureField, + configureFormLayout: S.configureFormLayout }, null, 8, ["modelValue", "api", "configureField", "configureFormLayout"])), - Z(H.$slots, "footer", { - formInstance: (Oe = Be()) == null ? void 0 : Oe.exposed, - model: D.value + U(S.$slots, "footer", { + formInstance: (Fe = Be()) == null ? void 0 : Fe.exposed, + model: le.value }) ], 2), - s("div", { - class: w(o(Ze).buttonsClass) + l("div", { + class: y(X(Ee).buttonsClass) }, [ - s("div", null, [ - e.deleteType ? (a(), se(Ce, { + l("div", null, [ + S.deleteType ? (o(), ae(Se, { key: 0, - onDelete: B - })) : k("", !0) + onDelete: ne + })) : x("", !0) ]), - s("div", null, [ - e.showLoading && o(E) ? (a(), se(ve, { key: 0 })) : k("", !0) + l("div", null, [ + S.showLoading && X(h) ? (o(), ae(ge, { key: 0 })) : x("", !0) ]), - s("div", bf, [ - $e(Ve, { - onClick: ye, - disabled: o(E) + l("div", Bf, [ + ye(H, { + onClick: ue, + disabled: X(h) }, { - default: ke(() => [ - xe("Cancel") + default: xe(() => [ + ke("Cancel") ]), _: 1 }, 8, ["disabled"]), - $e(Fe, { + ye(Q, { type: "submit", class: "ml-4", - disabled: o(E) + disabled: X(h) }, { - default: ke(() => [ - xe("Save") + default: xe(() => [ + ke("Save") ]), _: 1 }, 8, ["disabled"]) ]) ], 2) - ], 40, hf) - ], 2)) : (a(), u("div", wf, [ - xf, - s("div", kf, [ - s("div", { - onMousedown: ye, + ], 32) + ], 2)) : (o(), i("div", Hf, [ + Rf, + l("div", Ef, [ + l("div", { + onMousedown: ue, class: "absolute inset-0 overflow-hidden" }, [ - s("div", { - onMousedown: P[0] || (P[0] = Ne(() => { + l("div", { + onMousedown: ce[0] || (ce[0] = Ue(() => { }, ["stop"])), class: "pointer-events-none fixed inset-y-0 right-0 flex pl-10" }, [ - s("div", { - class: w(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg", V.value]) + l("div", { + class: y(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg", fe.value]) }, [ - s("form", { - class: w(o(ne)), - onSubmit: Ne(_, ["prevent"]) + l("form", { + class: y(W.value), + onSubmit: Ue(J, ["prevent"]) }, [ - s("div", Cf, [ - s("div", _f, [ - s("div", Lf, [ - s("div", Vf, [ - s("div", Sf, [ - H.$slots.heading ? (a(), u("div", Mf, [ - Z(H.$slots, "heading") - ])) : (a(), u("h3", { + l("div", zf, [ + l("div", Nf, [ + l("div", Uf, [ + l("div", qf, [ + l("div", Qf, [ + S.$slots.heading ? (o(), i("div", Kf, [ + U(S.$slots, "heading") + ])) : (o(), i("h3", { key: 1, - class: w(o(ee)) - }, A(o(le)), 3)), - H.$slots.subheading ? (a(), u("div", Af, [ - Z(H.$slots, "subheading") - ])) : e.subHeading ? (a(), u("p", { + class: y(ee.value) + }, F(te.value), 3)), + S.$slots.subheading ? (o(), i("div", Zf, [ + U(S.$slots, "subheading") + ])) : S.subHeading ? (o(), i("p", { key: 3, - class: w(o(te)) - }, A(e.subHeading), 3)) : (Re = o(L)) != null && Re.notes ? (a(), u("p", { + class: y(q.value) + }, F(S.subHeading), 3)) : (De = z.value) != null && De.notes ? (o(), i("p", { key: 4, - class: w(["notes", o(te)]), - innerHTML: (Me = o(L)) == null ? void 0 : Me.notes - }, null, 10, Tf)) : k("", !0) + class: y(["notes", q.value]), + innerHTML: (Oe = z.value) == null ? void 0 : Oe.notes + }, null, 10, Wf)) : x("", !0) ]), - s("div", Ff, [ - $e(z, { + l("div", Gf, [ + ye(oe, { "button-class": "bg-gray-50 dark:bg-gray-900", - onClose: ye + onClose: ue }) ]) ]) ]), - Z(H.$slots, "header", { - formInstance: (De = Be()) == null ? void 0 : De.exposed, - model: D.value + U(S.$slots, "header", { + formInstance: (We = Be()) == null ? void 0 : We.exposed, + model: le.value }), - (a(), se(me, { + (o(), ae(Ve, { ref_key: "formFields", - ref: i, - key: r.value, - modelValue: D.value, - "onUpdate:modelValue": m, - api: x.value, - configureField: C, - configureFormLayout: e.configureFormLayout + ref: r, + key: u.value, + modelValue: le.value, + "onUpdate:modelValue": f, + api: w.value, + configureField: Y, + configureFormLayout: S.configureFormLayout }, null, 8, ["modelValue", "api", "configureFormLayout"])), - Z(H.$slots, "footer", { - formInstance: (Qe = Be()) == null ? void 0 : Qe.exposed, - model: D.value + U(S.$slots, "footer", { + formInstance: (Re = Be()) == null ? void 0 : Re.exposed, + model: le.value }) ]) ]), - s("div", { - class: w(o(Ze).buttonsClass) + l("div", { + class: y(X(Ee).buttonsClass) }, [ - s("div", null, [ - e.deleteType ? (a(), se(Ce, { + l("div", null, [ + S.deleteType ? (o(), ae(Se, { key: 0, - onDelete: B - })) : k("", !0) + onDelete: ne + })) : x("", !0) ]), - s("div", null, [ - e.showLoading && o(E) ? (a(), se(ve, { key: 0 })) : k("", !0) + l("div", null, [ + S.showLoading && X(h) ? (o(), ae(ge, { key: 0 })) : x("", !0) ]), - s("div", If, [ - $e(Ve, { - onClick: ye, - disabled: o(E) + l("div", Jf, [ + ye(H, { + onClick: ue, + disabled: X(h) }, { - default: ke(() => [ - xe("Cancel") + default: xe(() => [ + ke("Cancel") ]), _: 1 }, 8, ["disabled"]), - $e(Fe, { + ye(Q, { type: "submit", class: "ml-4", - disabled: o(E) + disabled: X(h) }, { - default: ke(() => [ - xe("Save") + default: xe(() => [ + ke("Save") ]), _: 1 }, 8, ["disabled"]) ]) ], 2) - ], 42, $f) + ], 34) ], 2) ], 32) ], 32) ]) - ])) : (a(), u("div", ff, [ - s("p", mf, [ - xe("Could not create form for unknown "), - vf, - xe(" " + A(o(j)), 1) + ])) : (o(), i("div", Ff, [ + l("p", If, [ + ke("Could not create form for unknown "), + jf, + ke(" " + F(L.value), 1) ]) ])), - ((je = y.value) == null ? void 0 : je.name) == "ModalLookup" && y.value.ref ? (a(), se(Q, { + ((it = $.value) == null ? void 0 : it.name) == "ModalLookup" && $.value.ref ? (o(), ae(be, { key: 3, - "ref-info": y.value.ref, - onDone: v - }, null, 8, ["ref-info"])) : k("", !0) + "ref-info": $.value.ref, + onDone: g + }, null, 8, ["ref-info"])) : x("", !0) + ]); + }; + } +}), Yf = { key: 0 }, ev = { class: "text-red-700" }, tv = /* @__PURE__ */ l("b", null, "type", -1), sv = { key: 0 }, lv = { key: 2 }, nv = ["innerHTML"], ov = { + key: 2, + class: "relative z-10", + "aria-labelledby": "slide-over-title", + role: "dialog", + "aria-modal": "true" +}, av = /* @__PURE__ */ l("div", { class: "fixed inset-0" }, null, -1), rv = { class: "fixed inset-0 overflow-hidden" }, iv = { class: "flex min-h-0 flex-1 flex-col overflow-auto" }, uv = { class: "flex-1" }, dv = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6" }, cv = { class: "flex items-start justify-between space-x-3" }, fv = { class: "space-y-1" }, vv = { key: 0 }, pv = { key: 2 }, mv = ["innerHTML"], hv = { class: "flex h-7 items-center" }, gv = /* @__PURE__ */ de({ + __name: "AutoViewForm", + props: { + model: {}, + apis: {}, + typeName: {}, + done: {}, + formStyle: { default: "slideOver" }, + panelClass: {}, + formClass: {}, + headingClass: {}, + subHeadingClass: {}, + heading: {}, + subHeading: {} + }, + emits: ["done"], + setup(e, { emit: t }) { + const s = e, { typeOf: n } = lt(), a = v(() => s.typeName ?? s.apis.dataModel.name), r = v(() => n(a.value)), u = v(() => s.panelClass || Ee.panelClass(s.formStyle)), d = v(() => s.formClass || Ee.formClass(s.formStyle)), c = v(() => s.headingClass || Ee.headingClass(s.formStyle)), f = v(() => s.subHeadingClass || Ee.subHeadingClass(s.formStyle)), p = v(() => { + var I, se; + return s.heading || ((I = n(a.value)) == null ? void 0 : I.description) || ((se = s.model) != null && se.id ? `${Pe(a.value)} ${s.model.id}` : "View " + Pe(a.value)); + }); + G.interceptors.has("AutoViewForm.new") && G.interceptors.invoke("AutoViewForm.new", { props: s }); + function $() { + s.done && s.done(); + } + const m = O(!1), k = O(""), g = { + entering: { cls: "transform transition ease-in-out duration-500 sm:duration-700", from: "translate-x-full", to: "translate-x-0" }, + leaving: { cls: "transform transition ease-in-out duration-500 sm:duration-700", from: "translate-x-0", to: "translate-x-full" } + }; + bt(m, () => { + yt(g, k, m.value), m.value || setTimeout($, 700); + }), m.value = !0; + function b() { + s.formStyle == "slideOver" ? m.value = !1 : $(); + } + const P = (I) => { + I.key === "Escape" && b(); + }; + return Ye(() => window.addEventListener("keydown", P)), Ft(() => window.removeEventListener("keydown", P)), (I, se) => { + var M, ie, L, z; + const j = Z("MarkupModel"), T = Z("CloseButton"); + return o(), i("div", null, [ + a.value ? I.formStyle == "card" ? (o(), i("div", { + key: 1, + class: y(u.value) + }, [ + l("div", { + class: y(d.value) + }, [ + l("div", null, [ + I.$slots.heading ? (o(), i("div", sv, [ + U(I.$slots, "heading") + ])) : (o(), i("h3", { + key: 1, + class: y(c.value) + }, F(p.value), 3)), + I.$slots.subheading ? (o(), i("div", lv, [ + U(I.$slots, "subheading") + ])) : I.subHeading ? (o(), i("p", { + key: 3, + class: y(f.value) + }, F(I.subHeading), 3)) : (M = r.value) != null && M.notes ? (o(), i("p", { + key: 4, + class: y(["notes", f.value]), + innerHTML: (ie = r.value) == null ? void 0 : ie.notes + }, null, 10, nv)) : x("", !0) + ]), + ye(j, { value: I.model }, null, 8, ["value"]) + ], 2) + ], 2)) : (o(), i("div", ov, [ + av, + l("div", rv, [ + l("div", { + onMousedown: b, + class: "absolute inset-0 overflow-hidden" + }, [ + l("div", { + onMousedown: se[0] || (se[0] = Ue(() => { + }, ["stop"])), + class: "pointer-events-none fixed inset-y-0 right-0 flex pl-10" + }, [ + l("div", { + class: y(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg", k.value]) + }, [ + l("div", { + class: y(d.value) + }, [ + l("div", iv, [ + l("div", uv, [ + l("div", dv, [ + l("div", cv, [ + l("div", fv, [ + I.$slots.heading ? (o(), i("div", vv, [ + U(I.$slots, "heading") + ])) : (o(), i("h3", { + key: 1, + class: y(c.value) + }, F(p.value), 3)), + I.$slots.subheading ? (o(), i("div", pv, [ + U(I.$slots, "subheading") + ])) : I.subHeading ? (o(), i("p", { + key: 3, + class: y(f.value) + }, F(I.subHeading), 3)) : (L = r.value) != null && L.notes ? (o(), i("p", { + key: 4, + class: y(["notes", f.value]), + innerHTML: (z = r.value) == null ? void 0 : z.notes + }, null, 10, mv)) : x("", !0) + ]), + l("div", hv, [ + ye(T, { + "button-class": "bg-gray-50 dark:bg-gray-900", + onClose: b + }) + ]) + ]) + ]), + ye(j, { value: I.model }, null, 8, ["value"]) + ]) + ]) + ], 2) + ], 2) + ], 32) + ], 32) + ]) + ])) : (o(), i("div", Yf, [ + l("p", ev, [ + ke("Could not create view for unknown "), + tv, + ke(" " + F(a.value), 1) + ]) + ])) ]); }; } -}), Of = /* @__PURE__ */ s("label", { +}), yv = /* @__PURE__ */ l("label", { for: "confirmDelete", class: "ml-2 mr-2 select-none" -}, "confirm", -1), jf = ["onClick"], Pf = /* @__PURE__ */ ue({ +}, "confirm", -1), bv = /* @__PURE__ */ de({ __name: "ConfirmDelete", emits: ["delete"], setup(e, { emit: t }) { - let l = M(!1); - const n = () => { - l.value && t("delete"); - }, i = f(() => [ + let s = O(!1); + const n = t, a = () => { + s.value && n("delete"); + }, r = v(() => [ "select-none inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white", - l.value ? "cursor-pointer bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500" : "bg-red-400" + s.value ? "cursor-pointer bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500" : "bg-red-400" ]); - return (r, d) => (a(), u(Te, null, [ - kt(s("input", { + return (u, d) => (o(), i(Me, null, [ + Mt(l("input", { id: "confirmDelete", type: "checkbox", class: "focus:ring-indigo-500 h-4 w-4 text-indigo-600 rounded border-gray-300 dark:border-gray-600 dark:bg-gray-800 dark:ring-offset-black", - "onUpdate:modelValue": d[0] || (d[0] = (c) => qn(l) ? l.value = c : l = c) + "onUpdate:modelValue": d[0] || (d[0] = (c) => nn(s) ? s.value = c : s = c) }, null, 512), [ - [Xl, o(l)] + [ol, X(s)] ]), - Of, - s("span", Le({ - onClick: Ne(n, ["prevent"]), - class: o(i) - }, r.$attrs), [ - Z(r.$slots, "default", {}, () => [ - xe("Delete") + yv, + l("span", Te({ + onClick: Ue(a, ["prevent"]), + class: r.value + }, u.$attrs), [ + U(u.$slots, "default", {}, () => [ + ke("Delete") ]) - ], 16, jf) + ], 16) ], 64)); } -}), Bf = { +}), wv = { class: "flex", title: "loading..." -}, Rf = { +}, kv = { key: 0, xmlns: "http://www.w3.org/2000/svg", x: "0px", @@ -5781,63 +6062,63 @@ const b0 = { key: 0 }, w0 = { class: "text-red-700" }, x0 = /* @__PURE__ */ s("b width: "24px", height: "30px", viewBox: "0 0 24 30" -}, Hf = /* @__PURE__ */ wl('', 3), Ef = [ - Hf -], zf = { class: "ml-2 mt-1 text-gray-400" }, Nf = /* @__PURE__ */ ue({ +}, _v = /* @__PURE__ */ xs('', 3), $v = [ + _v +], Cv = { class: "ml-2 mt-1 text-gray-400" }, xv = /* @__PURE__ */ de({ __name: "FormLoading", props: { icon: { type: Boolean, default: !0 }, text: { default: "loading..." } }, setup(e) { - return qe("ApiState", void 0), (t, l) => (a(), u("div", Bf, [ - e.icon ? (a(), u("svg", Rf, Ef)) : k("", !0), - s("span", zf, A(e.text), 1) + return Qe("ApiState", void 0), (t, s) => (o(), i("div", wv, [ + t.icon ? (o(), i("svg", kv, $v)) : x("", !0), + l("span", Cv, F(t.text), 1) ])); } -}), Uf = ["onClick"], qf = { +}), Lv = ["onClick"], Vv = { key: 3, class: "flex justify-between items-center" -}, Qf = { class: "mr-1 select-none" }, Kf = ["onClick"], Zf = /* @__PURE__ */ ue({ +}, Sv = { class: "mr-1 select-none" }, Mv = ["onClick"], Av = /* @__PURE__ */ de({ __name: "DataGrid", props: { items: { default: () => [] }, id: { default: "DataGrid" }, - type: null, + type: {}, tableStyle: { default: "stripedRows" }, - selectedColumns: null, - gridClass: null, - grid2Class: null, - grid3Class: null, - grid4Class: null, - tableClass: null, - theadClass: null, - tbodyClass: null, - theadRowClass: null, - theadCellClass: null, - isSelected: null, - headerTitle: null, - headerTitles: null, - visibleFrom: null, - rowClass: null, - rowStyle: null + selectedColumns: {}, + gridClass: {}, + grid2Class: {}, + grid3Class: {}, + grid4Class: {}, + tableClass: {}, + theadClass: {}, + tbodyClass: {}, + theadRowClass: {}, + theadCellClass: {}, + isSelected: {}, + headerTitle: {}, + headerTitles: {}, + visibleFrom: {}, + rowClass: {}, + rowStyle: {} }, emits: ["headerSelected", "rowSelected"], setup(e, { emit: t }) { - const l = e, n = M(), i = M(null), r = (E) => i.value === E, d = Yl(), c = (E) => Object.keys(d).find((G) => G.toLowerCase() == E.toLowerCase() + "-header"), m = (E) => Object.keys(d).find((G) => G.toLowerCase() == E.toLowerCase()), h = f(() => zl(l.items).filter((E) => !!(d[E] || d[E + "-header"]))), { typeOf: y, typeProperties: b } = ot(), p = f(() => Bt(l.type)), v = f(() => y(p.value)), g = f(() => b(v.value)); - function O(E) { - const G = l.headerTitles && be(l.headerTitles, E) || E; - return l.headerTitle ? l.headerTitle(G) : Jn(G); + const s = e, n = t, a = O(), r = O(null), u = (E) => r.value === E, d = al(), c = (E) => Object.keys(d).find((h) => h.toLowerCase() == E.toLowerCase() + "-header"), f = (E) => Object.keys(d).find((h) => h.toLowerCase() == E.toLowerCase()), p = v(() => Ws(s.items).filter((E) => !!(d[E] || d[E + "-header"]))), { typeOf: $, typeProperties: m } = lt(), k = v(() => qt(s.type)), g = v(() => $(k.value)), b = v(() => m(g.value)); + function P(E) { + const h = s.headerTitles && _e(s.headerTitles, E) || E; + return s.headerTitle ? s.headerTitle(h) : cn(h); } - function U(E) { - const G = E.toLowerCase(); - return g.value.find((C) => C.name.toLowerCase() == G); + function I(E) { + const h = E.toLowerCase(); + return b.value.find((C) => C.name.toLowerCase() == h); } - function Y(E) { - const G = U(E); - return G != null && G.format ? G.format : (G == null ? void 0 : G.type) == "TimeSpan" || (G == null ? void 0 : G.type) == "TimeOnly" ? { method: "time" } : null; + function se(E) { + const h = I(E); + return h != null && h.format ? h.format : (h == null ? void 0 : h.type) == "TimeSpan" || (h == null ? void 0 : h.type) == "TimeOnly" ? { method: "time" } : null; } - const R = { + const j = { xs: "xs:table-cell", sm: "sm:table-cell", md: "md:table-cell", @@ -5846,153 +6127,153 @@ const b0 = { key: 0 }, w0 = { class: "text-red-700" }, x0 = /* @__PURE__ */ s("b "2xl": "2xl:table-cell", never: "" }; - function N(E) { - const G = l.visibleFrom && be(l.visibleFrom, E); - return G && Ue(R[G], (C) => `hidden ${C}`); + function T(E) { + const h = s.visibleFrom && _e(s.visibleFrom, E); + return h && Ze(j[h], (C) => `hidden ${C}`); } - const T = f(() => l.gridClass ?? he.getGridClass(l.tableStyle)), J = f(() => l.grid2Class ?? he.getGrid2Class(l.tableStyle)), j = f(() => l.grid3Class ?? he.getGrid3Class(l.tableStyle)), L = f(() => l.grid4Class ?? he.getGrid4Class(l.tableStyle)), q = f(() => l.tableClass ?? he.getTableClass(l.tableStyle)), D = f(() => l.tbodyClass ?? he.getTbodyClass(l.tbodyClass)), K = f(() => l.theadClass ?? he.getTheadClass(l.tableStyle)), ne = f(() => l.theadRowClass ?? he.getTheadRowClass(l.tableStyle)), ee = f(() => l.theadCellClass ?? he.getTheadCellClass(l.tableStyle)); - function te(E, G) { - return l.rowClass ? l.rowClass(E, G) : he.getTableRowClass(l.tableStyle, G, !!(l.isSelected && l.isSelected(E)), l.isSelected != null); + const M = v(() => s.gridClass ?? he.getGridClass(s.tableStyle)), ie = v(() => s.grid2Class ?? he.getGrid2Class(s.tableStyle)), L = v(() => s.grid3Class ?? he.getGrid3Class(s.tableStyle)), z = v(() => s.grid4Class ?? he.getGrid4Class(s.tableStyle)), K = v(() => s.tableClass ?? he.getTableClass(s.tableStyle)), le = v(() => s.tbodyClass ?? he.getTbodyClass(s.tbodyClass)), R = v(() => s.theadClass ?? he.getTheadClass(s.tableStyle)), W = v(() => s.theadRowClass ?? he.getTheadRowClass(s.tableStyle)), ee = v(() => s.theadCellClass ?? he.getTheadCellClass(s.tableStyle)); + function q(E, h) { + return s.rowClass ? s.rowClass(E, h) : he.getTableRowClass(s.tableStyle, h, !!(s.isSelected && s.isSelected(E)), s.isSelected != null); } - function S(E, G) { - return l.rowStyle ? l.rowStyle(E, G) : void 0; + function A(E, h) { + return s.rowStyle ? s.rowStyle(E, h) : void 0; } - const le = f(() => { - const E = (typeof l.selectedColumns == "string" ? l.selectedColumns.split(",") : l.selectedColumns) || (h.value.length > 0 ? h.value : zl(l.items)), G = g.value.reduce((C, _) => (C[_.name.toLowerCase()] = _.format, C), {}); + const te = v(() => { + const E = (typeof s.selectedColumns == "string" ? s.selectedColumns.split(",") : s.selectedColumns) || (p.value.length > 0 ? p.value : Ws(s.items)), h = b.value.reduce((C, Y) => (C[Y.name.toLowerCase()] = Y.format, C), {}); return E.filter((C) => { - var _; - return ((_ = G[C.toLowerCase()]) == null ? void 0 : _.method) != "hidden"; + var Y; + return ((Y = h[C.toLowerCase()]) == null ? void 0 : Y.method) != "hidden"; }); }); - function x(E, G) { - t("headerSelected", G, E); + function w(E, h) { + n("headerSelected", h, E); } - function W(E, G, C) { - t("rowSelected", C, E); + function N(E, h, C) { + n("rowSelected", C, E); } - return (E, G) => { - const C = X("CellFormat"), _ = X("PreviewFormat"); - return e.items.length ? (a(), u("div", { + return (E, h) => { + const C = Z("CellFormat"), Y = Z("PreviewFormat"); + return E.items.length ? (o(), i("div", { key: 0, ref_key: "refResults", - ref: n, - class: w(o(T)) + ref: a, + class: y(M.value) }, [ - s("div", { - class: w(o(J)) + l("div", { + class: y(ie.value) }, [ - s("div", { - class: w(o(j)) + l("div", { + class: y(L.value) }, [ - s("div", { - class: w(o(L)) + l("div", { + class: y(z.value) }, [ - s("table", { - class: w(o(q)) + l("table", { + class: y(K.value) }, [ - s("thead", { - class: w(o(K)) + l("thead", { + class: y(R.value) }, [ - s("tr", { - class: w(o(ne)) + l("tr", { + class: y(W.value) }, [ - (a(!0), u(Te, null, Ie(o(le), (B) => (a(), u("td", { - class: w([N(B), o(ee), r(B) ? "text-gray-900 dark:text-gray-50" : "text-gray-500 dark:text-gray-400"]) + (o(!0), i(Me, null, je(te.value, (J) => (o(), i("td", { + class: y([T(J), ee.value, u(J) ? "text-gray-900 dark:text-gray-50" : "text-gray-500 dark:text-gray-400"]) }, [ - s("div", { - onClick: (de) => x(de, B) + l("div", { + onClick: (ne) => w(ne, J) }, [ - o(d)[B + "-header"] ? Z(E.$slots, B + "-header", { + X(d)[J + "-header"] ? U(E.$slots, J + "-header", { key: 0, - column: B - }) : c(B) ? Z(E.$slots, c(B), { + column: J + }) : c(J) ? U(E.$slots, c(J), { key: 1, - column: B - }) : o(d).header ? Z(E.$slots, "header", { + column: J + }) : X(d).header ? U(E.$slots, "header", { key: 2, - column: B, - label: O(B) - }) : (a(), u("div", qf, [ - s("span", Qf, A(O(B)), 1) + column: J, + label: P(J) + }) : (o(), i("div", Vv, [ + l("span", Sv, F(P(J)), 1) ])) - ], 8, Uf) + ], 8, Lv) ], 2))), 256)) ], 2) ], 2), - s("tbody", { - class: w(o(D)) + l("tbody", { + class: y(le.value) }, [ - (a(!0), u(Te, null, Ie(e.items, (B, de) => (a(), u("tr", { - class: w(te(B, de)), - style: Jl(S(B, de)), - onClick: (F) => W(F, de, B) + (o(!0), i(Me, null, je(E.items, (J, ne) => (o(), i("tr", { + class: y(q(J, ne)), + style: nl(A(J, ne)), + onClick: (D) => N(D, ne, J) }, [ - (a(!0), u(Te, null, Ie(o(le), (F) => (a(), u("td", { - class: w([N(F), o(he).tableCellClass]) + (o(!0), i(Me, null, je(te.value, (D) => (o(), i("td", { + class: y([T(D), X(he).tableCellClass]) }, [ - o(d)[F] ? Z(E.$slots, F, It(Le({ key: 0 }, B))) : m(F) ? Z(E.$slots, m(F), It(Le({ key: 1 }, B))) : U(F) ? (a(), se(C, { + X(d)[D] ? U(E.$slots, D, Rt(Te({ key: 0 }, J))) : f(D) ? U(E.$slots, f(D), Rt(Te({ key: 1 }, J))) : I(D) ? (o(), ae(C, { key: 2, - type: o(v), - propType: U(F), - modelValue: B - }, null, 8, ["type", "propType", "modelValue"])) : (a(), se(_, { + type: g.value, + propType: I(D), + modelValue: J + }, null, 8, ["type", "propType", "modelValue"])) : (o(), ae(Y, { key: 3, - value: o(be)(B, F), - format: Y(F) + value: X(_e)(J, D), + format: se(D) }, null, 8, ["value", "format"])) ], 2))), 256)) - ], 14, Kf))), 256)) + ], 14, Mv))), 256)) ], 2) ], 2) ], 2) ], 2) ], 2) - ], 2)) : k("", !0); + ], 2)) : x("", !0); }; } -}), Gf = ue({ +}), Tv = de({ props: { type: Object, propType: Object, modelValue: Object }, setup(e, { attrs: t }) { - const { typeOf: l } = ot(); - function n(i) { - return i != null && i.format ? i.format : (i == null ? void 0 : i.type) == "TimeSpan" || (i == null ? void 0 : i.type) == "TimeOnly" ? { method: "time" } : null; + const { typeOf: s } = lt(); + function n(a) { + return a != null && a.format ? a.format : (a == null ? void 0 : a.type) == "TimeSpan" || (a == null ? void 0 : a.type) == "TimeOnly" ? { method: "time" } : null; } return () => { - var Y; - const i = n(e.propType), r = be(e.modelValue, e.propType.name), d = Object.assign({}, e, t), c = ht("span", { innerHTML: Jt(r, i, d) }), m = Zt(r) && Array.isArray(r) ? ht("span", {}, [ - ht("span", { class: "mr-2" }, `${r.length}`), - c - ]) : c, h = (Y = e.propType) == null ? void 0 : Y.ref; - if (!h) - return m; - const b = Je(e.type).find((R) => R.type === h.model); - if (!b) - return m; - const p = be(e.modelValue, b.name), v = p && h.refLabel && be(p, h.refLabel); - if (!v) - return m; - const g = l(h.model), O = g == null ? void 0 : g.icon, U = O ? ht(Rs, { image: O, class: "w-5 h-5 mr-1" }) : null; - return ht("span", { class: "flex", title: `${h.model} ${r}` }, [ - U, - v + var I; + const a = n(e.propType), r = _e(e.modelValue, e.propType.name), u = Object.assign({}, e, t), d = $t("span", { innerHTML: ts(r, a, u) }), c = Xt(r) && Array.isArray(r) ? $t("span", {}, [ + $t("span", { class: "mr-2" }, `${r.length}`), + d + ]) : d, f = (I = e.propType) == null ? void 0 : I.ref; + if (!f) + return c; + const $ = st(e.type).find((se) => se.type === f.model); + if (!$) + return c; + const m = _e(e.modelValue, $.name), k = m && f.refLabel && _e(m, f.refLabel); + if (!k) + return c; + const g = s(f.model), b = g == null ? void 0 : g.icon, P = b ? $t(eo, { image: b, class: "w-5 h-5 mr-1" }) : null; + return $t("span", { class: "flex", title: `${f.model} ${r}` }, [ + P, + k ]); }; } -}), Wf = { key: 0 }, Jf = { +}), Fv = { key: 0 }, Iv = { key: 0, class: "mr-2" -}, Xf = ["innerHTML"], Yf = ["innerHTML"], e1 = { +}, jv = ["innerHTML"], Ov = ["innerHTML"], Dv = { inheritAttrs: !1 -}, t1 = /* @__PURE__ */ ue({ - ...e1, +}, Pv = /* @__PURE__ */ de({ + ...Dv, __name: "PreviewFormat", props: { - value: null, - format: null, + value: {}, + format: {}, includeIcon: { type: Boolean, default: !0 }, includeCount: { type: Boolean, default: !0 }, maxFieldLength: { default: 150 }, @@ -6000,77 +6281,77 @@ const b0 = { key: 0 }, w0 = { class: "text-red-700" }, x0 = /* @__PURE__ */ s("b maxNestedFieldLength: { default: 30 } }, setup(e) { - const t = e, l = f(() => Array.isArray(t.value)); - return (n, i) => o(Zt)(e.value) ? (a(), u("span", Wf, [ - e.includeCount && o(l) ? (a(), u("span", Jf, A(e.value.length), 1)) : k("", !0), - s("span", { - innerHTML: o(Jt)(e.value, e.format, n.$attrs) - }, null, 8, Xf) - ])) : (a(), u("span", { + const t = e, s = v(() => Array.isArray(t.value)); + return (n, a) => X(Xt)(n.value) ? (o(), i("span", Fv, [ + n.includeCount && s.value ? (o(), i("span", Iv, F(n.value.length), 1)) : x("", !0), + l("span", { + innerHTML: X(ts)(n.value, n.format, n.$attrs) + }, null, 8, jv) + ])) : (o(), i("span", { key: 1, - innerHTML: o(Jt)(e.value, e.format, n.$attrs) - }, null, 8, Yf)); + innerHTML: X(ts)(n.value, n.format, n.$attrs) + }, null, 8, Ov)); } -}), l1 = ["innerHTML"], n1 = { key: 0 }, s1 = /* @__PURE__ */ s("b", null, null, -1), o1 = { key: 2 }, a1 = /* @__PURE__ */ ue({ +}), Bv = ["innerHTML"], Hv = { key: 0 }, Rv = /* @__PURE__ */ l("b", null, null, -1), Ev = { key: 2 }, zv = /* @__PURE__ */ de({ __name: "HtmlFormat", props: { - value: null, + value: {}, depth: { default: 0 }, - fieldAttrs: null, - classes: { type: Function, default: (e, t, l, n, i) => n } + fieldAttrs: {}, + classes: { type: Function, default: (e, t, s, n, a) => n } }, setup(e) { - const t = e, l = f(() => _t(t.value)), n = f(() => Array.isArray(t.value)), i = (m) => Jn(m), r = (m) => t.fieldAttrs ? t.fieldAttrs(m) : null, d = f(() => zl(t.value)), c = (m) => m ? Object.keys(m).map((h) => ({ key: i(h), val: m[h] })) : []; - return (m, h) => { - const y = X("HtmlFormat", !0); - return a(), u("div", { - class: w(e.depth == 0 ? "prose html-format" : "") + const t = e, s = v(() => Tt(t.value)), n = v(() => Array.isArray(t.value)), a = (c) => cn(c), r = (c) => t.fieldAttrs ? t.fieldAttrs(c) : null, u = v(() => Ws(t.value)), d = (c) => c ? Object.keys(c).map((f) => ({ key: a(f), val: c[f] })) : []; + return (c, f) => { + const p = Z("HtmlFormat", !0); + return o(), i("div", { + class: y(c.depth == 0 ? "prose html-format" : "") }, [ - o(l) ? (a(), u("div", { + s.value ? (o(), i("div", { key: 0, - innerHTML: o(Jt)(e.value) - }, null, 8, l1)) : o(n) ? (a(), u("div", { + innerHTML: X(ts)(c.value) + }, null, 8, Bv)) : n.value ? (o(), i("div", { key: 1, - class: w(e.classes("array", "div", e.depth, o(he).gridClass)) + class: y(c.classes("array", "div", c.depth, X(he).gridClass)) }, [ - o(_t)(e.value[0]) ? (a(), u("div", n1, "[ " + A(e.value.join(", ")) + " ]", 1)) : (a(), u("div", { + X(Tt)(c.value[0]) ? (o(), i("div", Hv, "[ " + F(c.value.join(", ")) + " ]", 1)) : (o(), i("div", { key: 1, - class: w(e.classes("array", "div", e.depth, o(he).grid2Class)) + class: y(c.classes("array", "div", c.depth, X(he).grid2Class)) }, [ - s("div", { - class: w(e.classes("array", "div", e.depth, o(he).grid3Class)) + l("div", { + class: y(c.classes("array", "div", c.depth, X(he).grid3Class)) }, [ - s("div", { - class: w(e.classes("array", "div", e.depth, o(he).grid4Class)) + l("div", { + class: y(c.classes("array", "div", c.depth, X(he).grid4Class)) }, [ - s("table", { - class: w(e.classes("object", "table", e.depth, o(he).tableClass)) + l("table", { + class: y(c.classes("object", "table", c.depth, X(he).tableClass)) }, [ - s("thead", { - class: w(e.classes("array", "thead", e.depth, o(he).theadClass)) + l("thead", { + class: y(c.classes("array", "thead", c.depth, X(he).theadClass)) }, [ - s("tr", null, [ - (a(!0), u(Te, null, Ie(o(d), (b) => (a(), u("th", { - class: w(e.classes("array", "th", e.depth, o(he).theadCellClass + " whitespace-nowrap")) + l("tr", null, [ + (o(!0), i(Me, null, je(u.value, ($) => (o(), i("th", { + class: y(c.classes("array", "th", c.depth, X(he).theadCellClass + " whitespace-nowrap")) }, [ - s1, - xe(A(i(b)), 1) + Rv, + ke(F(a($)), 1) ], 2))), 256)) ]) ], 2), - s("tbody", null, [ - (a(!0), u(Te, null, Ie(e.value, (b, p) => (a(), u("tr", { - class: w(e.classes("array", "tr", e.depth, p % 2 == 0 ? "bg-white" : "bg-gray-50", p)) + l("tbody", null, [ + (o(!0), i(Me, null, je(c.value, ($, m) => (o(), i("tr", { + class: y(c.classes("array", "tr", c.depth, m % 2 == 0 ? "bg-white" : "bg-gray-50", m)) }, [ - (a(!0), u(Te, null, Ie(o(d), (v) => (a(), u("td", { - class: w(e.classes("array", "td", e.depth, o(he).tableCellClass)) + (o(!0), i(Me, null, je(u.value, (k) => (o(), i("td", { + class: y(c.classes("array", "td", c.depth, X(he).tableCellClass)) }, [ - $e(y, Le({ - value: b[v], - "field-attrs": e.fieldAttrs, - depth: e.depth + 1, - classes: e.classes - }, r(v)), null, 16, ["value", "field-attrs", "depth", "classes"]) + ye(p, Te({ + value: $[k], + "field-attrs": c.fieldAttrs, + depth: c.depth + 1, + classes: c.classes + }, r(k)), null, 16, ["value", "field-attrs", "depth", "classes"]) ], 2))), 256)) ], 2))), 256)) ]) @@ -6078,25 +6359,25 @@ const b0 = { key: 0 }, w0 = { class: "text-red-700" }, x0 = /* @__PURE__ */ s("b ], 2) ], 2) ], 2)) - ], 2)) : (a(), u("div", o1, [ - s("table", { - class: w(e.classes("object", "table", e.depth, "table-object")) + ], 2)) : (o(), i("div", Ev, [ + l("table", { + class: y(c.classes("object", "table", c.depth, "table-object")) }, [ - (a(!0), u(Te, null, Ie(c(e.value), (b) => (a(), u("tr", { - class: w(e.classes("object", "tr", e.depth, "")) + (o(!0), i(Me, null, je(d(c.value), ($) => (o(), i("tr", { + class: y(c.classes("object", "tr", c.depth, "")) }, [ - s("th", { - class: w(e.classes("object", "th", e.depth, "align-top py-2 px-4 text-left text-sm font-medium tracking-wider whitespace-nowrap")) - }, A(b.key), 3), - s("td", { - class: w(e.classes("object", "td", e.depth, "align-top py-2 px-4 text-sm")) + l("th", { + class: y(c.classes("object", "th", c.depth, "align-top py-2 px-4 text-left text-sm font-medium tracking-wider whitespace-nowrap")) + }, F($.key), 3), + l("td", { + class: y(c.classes("object", "td", c.depth, "align-top py-2 px-4 text-sm")) }, [ - $e(y, Le({ - value: b.val, - "field-attrs": e.fieldAttrs, - depth: e.depth + 1, - classes: e.classes - }, r(b.key)), null, 16, ["value", "field-attrs", "depth", "classes"]) + ye(p, Te({ + value: $.val, + "field-attrs": c.fieldAttrs, + depth: c.depth + 1, + classes: c.classes + }, r($.key)), null, 16, ["value", "field-attrs", "depth", "classes"]) ], 2) ], 2))), 256)) ], 2) @@ -6104,7 +6385,82 @@ const b0 = { key: 0 }, w0 = { class: "text-red-700" }, x0 = /* @__PURE__ */ s("b ], 2); }; } -}), i1 = { class: "absolute top-0 right-0 pt-4 pr-4" }, r1 = /* @__PURE__ */ s("span", { class: "sr-only" }, "Close", -1), u1 = /* @__PURE__ */ s("svg", { +}), Nv = ["href"], Uv = ["href", "title"], qv = /* @__PURE__ */ de({ + __name: "MarkupFormat", + props: { + value: {}, + imageClass: { default: "w-8 h-8" } + }, + setup(e) { + const t = e, { getMimeType: s } = La(), n = t.value; + let a = typeof t.value; + const r = a === "string" && n.length ? s(n) : null; + if (a === "string" && n.length) { + const u = n.startsWith("https://") || n.startsWith("http://"); + (u || n[0] === "/") && (r != null && r.startsWith("image/")) ? a = "image" : u && (a = "link"); + } + return (u, d) => { + const c = Z("Icon"), f = Z("HtmlFormat"); + return X(a) == "link" ? (o(), i("a", { + key: 0, + href: u.value, + class: "text-indigo-600" + }, F(u.value), 9, Nv)) : X(a) == "image" ? (o(), i("a", { + key: 1, + href: u.value, + title: u.value, + class: "inline-block" + }, [ + ye(c, { + src: u.value, + class: y(u.imageClass) + }, null, 8, ["src", "class"]) + ], 8, Uv)) : (o(), ae(f, { + key: 2, + value: u.value + }, null, 8, ["value"])); + }; + } +}), Qv = { class: "my-2 w-full" }, Kv = { class: "leading-7" }, Zv = { class: "px-2 text-left align-top" }, Wv = { colspan: "align-top" }, Gv = { class: "my-2 leading-7" }, Jv = { + colspan: "2", + class: "px-2 bg-indigo-700 text-white" +}, Xv = { class: "leading-7" }, Yv = { + colspan: "2", + class: "px-2 align-top" +}, ep = /* @__PURE__ */ de({ + __name: "MarkupModel", + props: { + value: {}, + imageClass: {} + }, + setup(e) { + const t = e, s = Object.keys(t.value), n = {}, a = {}; + return s.forEach((r) => { + const u = t.value[r], d = typeof u; + u == null || d === "function" || d === "symbol" ? n[r] = `(${u == null ? "null" : "t"})` : d === "object" ? a[r] = u : n[r] = u; + }), (r, u) => { + const d = Z("MarkupFormat"); + return o(), i("table", Qv, [ + (o(), i(Me, null, je(n, (c, f) => l("tr", Kv, [ + l("th", Zv, F(X(Pe)(f)), 1), + l("td", Wv, [ + ye(d, { value: c }, null, 8, ["value"]) + ]) + ])), 64)), + (o(), i(Me, null, je(a, (c, f) => (o(), i(Me, null, [ + l("tr", Gv, [ + l("td", Jv, F(X(Pe)(f)), 1) + ]), + l("tr", Xv, [ + l("td", Yv, [ + ye(d, { value: c }, null, 8, ["value"]) + ]) + ]) + ], 64))), 64)) + ]); + }; + } +}), tp = { class: "absolute top-0 right-0 pt-4 pr-4" }, sp = /* @__PURE__ */ l("span", { class: "sr-only" }, "Close", -1), lp = /* @__PURE__ */ l("svg", { class: "h-6 w-6", xmlns: "http://www.w3.org/2000/svg", fill: "none", @@ -6112,117 +6468,123 @@ const b0 = { key: 0 }, w0 = { class: "text-red-700" }, x0 = /* @__PURE__ */ s("b stroke: "currentColor", "aria-hidden": "true" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M6 18L18 6M6 6l12 12" }) -], -1), d1 = [ - r1, - u1 -], c1 = /* @__PURE__ */ ue({ +], -1), np = [ + sp, + lp +], op = /* @__PURE__ */ de({ __name: "CloseButton", props: { buttonClass: { default: "bg-white dark:bg-black" } }, emits: ["close"], setup(e, { emit: t }) { - return (l, n) => (a(), u("div", i1, [ - s("button", { + return (s, n) => (o(), i("div", tp, [ + l("button", { type: "button", - onClick: n[0] || (n[0] = (i) => l.$emit("close")), - class: w([e.buttonClass, "rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black"]) - }, d1, 2) + onClick: n[0] || (n[0] = (a) => s.$emit("close")), + class: y([s.buttonClass, "rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black"]) + }, np, 2) ])); } -}), f1 = ["id", "aria-labelledby"], m1 = /* @__PURE__ */ s("div", { class: "fixed inset-0" }, null, -1), v1 = { class: "fixed inset-0 overflow-hidden" }, h1 = { class: "flex h-full flex-col bg-white dark:bg-black shadow-xl" }, g1 = { class: "flex min-h-0 flex-1 flex-col overflow-auto" }, p1 = { class: "flex-1" }, y1 = { class: "bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6" }, b1 = { class: "flex items-start justify-between space-x-3" }, w1 = { class: "space-y-1" }, x1 = ["id"], k1 = { - key: 1, +}), ap = ["id", "aria-labelledby"], rp = /* @__PURE__ */ l("div", { class: "fixed inset-0" }, null, -1), ip = { class: "fixed inset-0 overflow-hidden" }, up = { class: "flex h-full flex-col bg-white dark:bg-black shadow-xl" }, dp = { class: "flex min-h-0 flex-1 flex-col overflow-auto" }, cp = { class: "flex-1" }, fp = { class: "relative bg-gray-50 dark:bg-gray-900 px-4 py-6 sm:px-6" }, vp = { class: "flex items-start justify-between space-x-3" }, pp = { class: "space-y-1" }, mp = { key: 0 }, hp = ["id"], gp = { + key: 2, class: "text-sm text-gray-500" -}, $1 = { class: "flex h-7 items-center" }, C1 = { class: "flex-shrink-0 border-t border-gray-200 dark:border-gray-700 px-4 py-5 sm:px-6" }, _1 = /* @__PURE__ */ ue({ +}, yp = { class: "flex h-7 items-center" }, bp = { + key: 0, + class: "flex-shrink-0 border-t border-gray-200 dark:border-gray-700 px-4 py-5 sm:px-6" +}, wp = /* @__PURE__ */ de({ __name: "SlideOver", props: { id: { default: "SlideOver" }, - title: null, + title: {}, contentClass: { default: "relative mt-6 flex-1 px-4 sm:px-6" } }, emits: ["done"], setup(e, { emit: t }) { - const l = M(!1), n = M(""), i = { + const s = t, n = O(!1), a = O(""), r = { entering: { cls: "transform transition ease-in-out duration-500 sm:duration-700", from: "translate-x-full", to: "translate-x-0" }, leaving: { cls: "transform transition ease-in-out duration-500 sm:duration-700", from: "translate-x-0", to: "translate-x-full" } }; - Lt(l, () => { - Ct(i, n, l.value), l.value || setTimeout(() => t("done"), 700); - }), l.value = !0; - const r = () => l.value = !1, d = (c) => { - c.key === "Escape" && r(); + bt(n, () => { + yt(r, a, n.value), n.value || setTimeout(() => s("done"), 700); + }), n.value = !0; + const u = () => n.value = !1, d = (c) => { + c.key === "Escape" && u(); }; - return Xe(() => window.addEventListener("keydown", d)), Pt(() => window.removeEventListener("keydown", d)), (c, m) => { - const h = X("CloseButton"); - return a(), u("div", { - id: e.id, + return Ye(() => window.addEventListener("keydown", d)), Ft(() => window.removeEventListener("keydown", d)), (c, f) => { + const p = Z("CloseButton"); + return o(), i("div", { + id: c.id, class: "relative z-10", - "aria-labelledby": e.id + "-title", + "aria-labelledby": c.id + "-title", role: "dialog", "aria-modal": "true" }, [ - m1, - s("div", v1, [ - s("div", { - onMousedown: r, + rp, + l("div", ip, [ + l("div", { + onMousedown: u, class: "absolute inset-0 overflow-hidden" }, [ - s("div", { - onMousedown: m[0] || (m[0] = Ne(() => { + l("div", { + onMousedown: f[0] || (f[0] = Ue(() => { }, ["stop"])), class: "pointer-events-none fixed inset-y-0 right-0 flex pl-10" }, [ - s("div", { - class: w(["pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg", n.value]) + l("div", { + class: y(["panel pointer-events-auto w-screen xl:max-w-3xl md:max-w-xl max-w-lg", a.value]) }, [ - s("div", h1, [ - s("div", g1, [ - s("div", p1, [ - s("div", y1, [ - s("div", b1, [ - s("div", w1, [ - e.title ? (a(), u("h2", { - key: 0, + l("div", up, [ + l("div", dp, [ + l("div", cp, [ + l("div", fp, [ + l("div", vp, [ + l("div", pp, [ + c.$slots.title ? (o(), i("div", mp, [ + U(c.$slots, "title") + ])) : x("", !0), + c.title ? (o(), i("h2", { + key: 1, class: "text-lg font-medium text-gray-900 dark:text-gray-50", - id: e.id + "-title" - }, A(e.title), 9, x1)) : k("", !0), - c.$slots.subtitle ? (a(), u("p", k1, [ - Z(c.$slots, "subtitle") - ])) : k("", !0) + id: c.id + "-title" + }, F(c.title), 9, hp)) : x("", !0), + c.$slots.subtitle ? (o(), i("p", gp, [ + U(c.$slots, "subtitle") + ])) : x("", !0) ]), - s("div", $1, [ - $e(h, { + l("div", yp, [ + ye(p, { "button-class": "bg-gray-50 dark:bg-gray-900", - onClose: r + onClose: u }) ]) ]) ]), - s("div", { - class: w(e.contentClass) + l("div", { + class: y(c.contentClass) }, [ - Z(c.$slots, "default") + U(c.$slots, "default") ], 2) ]) ]), - s("div", C1, [ - Z(c.$slots, "footer") - ]) + c.$slots.footer ? (o(), i("div", bp, [ + U(c.$slots, "footer") + ])) : x("", !0) ]) ], 2) ], 32) ], 32) ]) - ], 8, f1); + ], 8, ap); }; } -}), L1 = ["id", "data-transition-for", "aria-labelledby"], V1 = { class: "fixed inset-0 z-10 overflow-y-auto" }, S1 = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, M1 = /* @__PURE__ */ s("span", { class: "sr-only" }, "Close", -1), A1 = /* @__PURE__ */ s("svg", { +}), kp = ["id", "data-transition-for", "aria-labelledby"], _p = { class: "fixed inset-0 z-10 overflow-y-auto" }, $p = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, Cp = /* @__PURE__ */ l("span", { class: "sr-only" }, "Close", -1), xp = /* @__PURE__ */ l("svg", { class: "h-6 w-6", xmlns: "http://www.w3.org/2000/svg", fill: "none", @@ -6230,346 +6592,346 @@ const b0 = { key: 0 }, w0 = { class: "text-red-700" }, x0 = /* @__PURE__ */ s("b stroke: "currentColor", "aria-hidden": "true" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "2", d: "M6 18L18 6M6 6l12 12" }) -], -1), T1 = [ - M1, - A1 -], F1 = /* @__PURE__ */ ue({ +], -1), Lp = [ + Cp, + xp +], Vp = /* @__PURE__ */ de({ __name: "ModalDialog", props: { id: { default: "ModalDialog" }, - modalClass: { default: Wl.modalClass }, - sizeClass: { default: Wl.sizeClass } + modalClass: { default: ll.modalClass }, + sizeClass: { default: ll.sizeClass } }, emits: ["done"], setup(e, { emit: t }) { - const l = M(!1), n = M(""), i = { + const s = t, n = O(!1), a = O(""), r = { entering: { cls: "ease-out duration-300", from: "opacity-0", to: "opacity-100" }, leaving: { cls: "ease-in duration-200", from: "opacity-100", to: "opacity-0" } - }, r = M(""), d = { + }, u = O(""), d = { entering: { cls: "ease-out duration-300", from: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95", to: "opacity-100 translate-y-0 sm:scale-100" }, leaving: { cls: "ease-in duration-200", from: "opacity-100 translate-y-0 sm:scale-100", to: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95" } }; - Lt(l, () => { - Ct(i, n, l.value), Ct(d, r, l.value), l.value || setTimeout(() => t("done"), 200); - }), l.value = !0; - const c = () => l.value = !1; - Xt("ModalProvider", { - openModal: b + bt(n, () => { + yt(r, a, n.value), yt(d, u, n.value), n.value || setTimeout(() => s("done"), 200); + }), n.value = !0; + const c = () => n.value = !1; + ss("ModalProvider", { + openModal: m }); - const h = M(), y = M(); - function b(g, O) { - h.value = g, y.value = O; + const p = O(), $ = O(); + function m(b, P) { + p.value = b, $.value = P; } - async function p(g) { - y.value && y.value(g), h.value = void 0, y.value = void 0; + async function k(b) { + $.value && $.value(b), p.value = void 0, $.value = void 0; } - const v = (g) => { - g.key === "Escape" && c(); + const g = (b) => { + b.key === "Escape" && c(); }; - return Xe(() => window.addEventListener("keydown", v)), Pt(() => window.removeEventListener("keydown", v)), (g, O) => { - var Y; - const U = X("ModalLookup"); - return a(), u("div", { - id: e.id, - "data-transition-for": e.id, + return Ye(() => window.addEventListener("keydown", g)), Ft(() => window.removeEventListener("keydown", g)), (b, P) => { + var se; + const I = Z("ModalLookup"); + return o(), i("div", { + id: b.id, + "data-transition-for": b.id, onMousedown: c, class: "relative z-10", - "aria-labelledby": `${e.id}-title`, + "aria-labelledby": `${b.id}-title`, role: "dialog", "aria-modal": "true" }, [ - s("div", { - class: w(["fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity", n.value]) + l("div", { + class: y(["fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity", a.value]) }, null, 2), - s("div", V1, [ - s("div", S1, [ - s("div", { - class: w([e.modalClass, e.sizeClass, r.value]), - onMousedown: O[0] || (O[0] = Ne(() => { + l("div", _p, [ + l("div", $p, [ + l("div", { + class: y([b.modalClass, b.sizeClass, u.value]), + onMousedown: P[0] || (P[0] = Ue(() => { }, ["stop"])) }, [ - s("div", null, [ - s("div", { class: "hidden sm:block absolute top-0 right-0 pt-4 pr-4 z-10" }, [ - s("button", { + l("div", null, [ + l("div", { class: "hidden sm:block absolute top-0 right-0 pt-4 pr-4 z-10" }, [ + l("button", { type: "button", onClick: c, class: "bg-white dark:bg-black rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black" - }, T1) + }, Lp) ]), - Z(g.$slots, "default") + U(b.$slots, "default") ]) ], 34) ]) ]), - ((Y = h.value) == null ? void 0 : Y.name) == "ModalLookup" && h.value.ref ? (a(), se(U, { + ((se = p.value) == null ? void 0 : se.name) == "ModalLookup" && p.value.ref ? (o(), ae(I, { key: 0, - "ref-info": h.value.ref, - onDone: p - }, null, 8, ["ref-info"])) : k("", !0) - ], 40, L1); + "ref-info": p.value.ref, + onDone: k + }, null, 8, ["ref-info"])) : x("", !0) + ], 40, kp); }; } -}), I1 = { +}), Sp = { class: "pt-2 overflow-auto", style: { "min-height": "620px" } -}, D1 = { class: "mt-3 pl-5 flex flex-wrap items-center" }, O1 = { class: "hidden sm:block text-xl leading-6 font-medium text-gray-900 dark:text-gray-50 mr-3" }, j1 = { class: "hidden md:inline" }, P1 = { class: "flex pb-1 sm:pb-0" }, B1 = ["title"], R1 = /* @__PURE__ */ s("svg", { +}, Mp = { class: "mt-3 pl-5 flex flex-wrap items-center" }, Ap = { class: "hidden sm:block text-xl leading-6 font-medium text-gray-900 dark:text-gray-50 mr-3" }, Tp = { class: "hidden md:inline" }, Fp = { class: "flex pb-1 sm:pb-0" }, Ip = ["title"], jp = /* @__PURE__ */ l("svg", { class: "w-8 h-8", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, [ - /* @__PURE__ */ s("g", { + /* @__PURE__ */ l("g", { "stroke-width": "1.5", fill: "none" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { d: "M9 3H3.6a.6.6 0 0 0-.6.6v16.8a.6.6 0 0 0 .6.6H9M9 3v18M9 3h6M9 21h6m0-18h5.4a.6.6 0 0 1 .6.6v16.8a.6.6 0 0 1-.6.6H15m0-18v18", stroke: "currentColor" }) ]) -], -1), H1 = [ - R1 -], E1 = ["disabled"], z1 = /* @__PURE__ */ s("svg", { +], -1), Op = [ + jp +], Dp = ["disabled"], Pp = /* @__PURE__ */ l("svg", { class: "w-8 h-8", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { d: "M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6l6 6zM6 6h2v12H6z", fill: "currentColor" }) -], -1), N1 = [ - z1 -], U1 = ["disabled"], q1 = /* @__PURE__ */ s("svg", { +], -1), Bp = [ + Pp +], Hp = ["disabled"], Rp = /* @__PURE__ */ l("svg", { class: "w-8 h-8", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { d: "M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z", fill: "currentColor" }) -], -1), Q1 = [ - q1 -], K1 = ["disabled"], Z1 = /* @__PURE__ */ s("svg", { +], -1), Ep = [ + Rp +], zp = ["disabled"], Np = /* @__PURE__ */ l("svg", { class: "w-8 h-8", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { d: "M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z", fill: "currentColor" }) -], -1), G1 = [ - Z1 -], W1 = ["disabled"], J1 = /* @__PURE__ */ s("svg", { +], -1), Up = [ + Np +], qp = ["disabled"], Qp = /* @__PURE__ */ l("svg", { class: "w-8 h-8", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { d: "M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6l-6-6zM16 6h2v12h-2z", fill: "currentColor" }) -], -1), X1 = [ - J1 -], Y1 = { +], -1), Kp = [ + Qp +], Zp = { key: 0, class: "flex pb-1 sm:pb-0" -}, em = { class: "px-4 text-lg text-black dark:text-white" }, tm = { key: 0 }, lm = { key: 1 }, nm = /* @__PURE__ */ s("span", { class: "hidden xl:inline" }, " Showing Results ", -1), sm = { key: 2 }, om = { +}, Wp = { class: "px-4 text-lg text-black dark:text-white" }, Gp = { key: 0 }, Jp = { key: 1 }, Xp = /* @__PURE__ */ l("span", { class: "hidden xl:inline" }, " Showing Results ", -1), Yp = { key: 2 }, em = { key: 1, class: "pl-2" -}, am = /* @__PURE__ */ s("svg", { +}, tm = /* @__PURE__ */ l("svg", { class: "w-5 h-5", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", viewBox: "0 0 24 24" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { fill: "currentColor", d: "M6.78 2.72a.75.75 0 0 1 0 1.06L4.56 6h8.69a7.75 7.75 0 1 1-7.75 7.75a.75.75 0 0 1 1.5 0a6.25 6.25 0 1 0 6.25-6.25H4.56l2.22 2.22a.75.75 0 1 1-1.06 1.06l-3.5-3.5a.75.75 0 0 1 0-1.06l3.5-3.5a.75.75 0 0 1 1.06 0Z" }) -], -1), im = [ - am -], rm = { class: "flex pb-1 sm:pb-0" }, um = { +], -1), sm = [ + tm +], lm = { class: "flex pb-1 sm:pb-0" }, nm = { key: 0, class: "pl-2" -}, dm = /* @__PURE__ */ s("svg", { +}, om = /* @__PURE__ */ l("svg", { class: "flex-none w-5 h-5 mr-2 text-gray-400 dark:text-gray-500 group-hover:text-gray-500", "aria-hidden": "true", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M3 3a1 1 0 011-1h12a1 1 0 011 1v3a1 1 0 01-.293.707L12 11.414V15a1 1 0 01-.293.707l-2 2A1 1 0 018 17v-5.586L3.293 6.707A1 1 0 013 6V3z", "clip-rule": "evenodd" }) -], -1), cm = { class: "mr-1" }, fm = { +], -1), am = { class: "mr-1" }, rm = { key: 0, class: "h-5 w-5 text-gray-400 dark:text-gray-500 group-hover:text-gray-500", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" -}, mm = /* @__PURE__ */ s("path", { +}, im = /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z", "clip-rule": "evenodd" -}, null, -1), vm = [ - mm -], hm = { +}, null, -1), um = [ + im +], dm = { key: 1, class: "h-5 w-5 text-gray-400 dark:text-gray-500 group-hover:text-gray-500", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" -}, gm = /* @__PURE__ */ s("path", { +}, cm = /* @__PURE__ */ l("path", { "fill-rule": "evenodd", d: "M5 10a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1z", "clip-rule": "evenodd" -}, null, -1), pm = [ - gm -], ym = { key: 1 }, bm = { key: 4 }, wm = { key: 0 }, xm = { +}, null, -1), fm = [ + cm +], vm = { key: 1 }, pm = { key: 4 }, mm = { key: 0 }, hm = { key: 0, class: "cursor-pointer flex justify-between items-center hover:text-gray-900 dark:hover:text-gray-50" -}, km = { class: "mr-1 select-none" }, $m = { +}, gm = { class: "mr-1 select-none" }, ym = { key: 1, class: "flex justify-between items-center" -}, Cm = { class: "mr-1 select-none" }, _m = /* @__PURE__ */ ue({ +}, bm = { class: "mr-1 select-none" }, ln = 25, wm = /* @__PURE__ */ de({ __name: "ModalLookup", props: { id: { default: "ModalLookup" }, - refInfo: null, + refInfo: {}, skip: { default: 0 }, - prefs: null, - selectedColumns: null, + prefs: {}, + selectedColumns: {}, allowFiltering: { type: [Boolean, null], default: !0 }, showPreferences: { type: [Boolean, null], default: !0 }, showPagingNav: { type: [Boolean, null], default: !0 }, showPagingInfo: { type: [Boolean, null], default: !0 }, showResetPreferences: { type: [Boolean, null], default: !0 }, showFiltersView: { type: [Boolean, null], default: !0 }, - toolbarButtonClass: null, - canFilter: null + toolbarButtonClass: {}, + canFilter: {} }, emits: ["done"], setup(e, { emit: t }) { - const l = e, n = Yl(), { config: i } = St(), { metadataApi: r, filterDefinitions: d } = ot(), c = qe("client"), m = i.value.storage, h = f(() => l.toolbarButtonClass ?? he.toolbarButtonClass), y = f(() => d.value), b = 25, p = M({ take: b }), v = M(new We()), g = M(l.skip), O = M(!1), U = M(), Y = (z) => typeof z == "string" ? z.split(",") : z || []; - function R(z, Q) { + const s = e, n = t, a = al(), { config: r } = It(), { metadataApi: u, filterDefinitions: d } = lt(), c = Qe("client"), f = r.value.storage, p = v(() => s.toolbarButtonClass ?? he.toolbarButtonClass), $ = v(() => d.value), m = O({ take: ln }), k = O(new Xe()), g = O(s.skip), b = O(!1), P = O(), I = (H) => typeof H == "string" ? H.split(",") : H || []; + function se(H, Q) { return he.getTableRowClass("fullWidth", Q, !1, !0); } - function N() { - let z = Y(l.selectedColumns); - return z.length > 0 ? z : []; - } - const T = f(() => st(l.refInfo.model)), J = f(() => { - let Q = N().map((ge) => ge.toLowerCase()); - const oe = Je(T.value); - return Q.length > 0 ? Q.map((ge) => oe.find((Se) => Se.name.toLowerCase() === ge)).filter((ge) => ge != null) : oe; - }), j = f(() => { - let z = J.value.map((oe) => oe.name), Q = Y(p.value.selectedColumns).map((oe) => oe.toLowerCase()); - return Q.length > 0 ? z.filter((oe) => Q.includes(oe.toLowerCase())) : z; - }), L = f(() => p.value.take ?? b), q = f(() => v.value.response ? be(v.value.response, "results") : []), D = f(() => { - var z; - return ((z = v.value.response) == null ? void 0 : z.total) ?? q.value.length ?? 0; - }), K = f(() => g.value > 0), ne = f(() => g.value > 0), ee = f(() => q.value.length >= L.value), te = f(() => q.value.length >= L.value), S = M([]), le = f(() => S.value.some((z) => z.settings.filters.length > 0 || !!z.settings.sort)), x = f(() => S.value.map((z) => z.settings.filters.length).reduce((z, Q) => z + Q, 0)), W = f(() => el(T.value)), E = f(() => { - var z; - return (z = r.value) == null ? void 0 : z.operations.find((Q) => { + function j() { + let H = I(s.selectedColumns); + return H.length > 0 ? H : []; + } + const T = v(() => rt(s.refInfo.model)), M = v(() => { + let Q = j().map((be) => be.toLowerCase()); + const oe = st(T.value); + return Q.length > 0 ? Q.map((be) => oe.find(($e) => $e.name.toLowerCase() === be)).filter((be) => be != null) : oe; + }), ie = v(() => { + let H = M.value.map((oe) => oe.name), Q = I(m.value.selectedColumns).map((oe) => oe.toLowerCase()); + return Q.length > 0 ? H.filter((oe) => Q.includes(oe.toLowerCase())) : H; + }), L = v(() => m.value.take ?? ln), z = v(() => k.value.response ? _e(k.value.response, "results") : []), K = v(() => { + var H; + return ((H = k.value.response) == null ? void 0 : H.total) ?? z.value.length ?? 0; + }), le = v(() => g.value > 0), R = v(() => g.value > 0), W = v(() => z.value.length >= L.value), ee = v(() => z.value.length >= L.value), q = O([]), A = v(() => q.value.some((H) => H.settings.filters.length > 0 || !!H.settings.sort)), te = v(() => q.value.map((H) => H.settings.filters.length).reduce((H, Q) => H + Q, 0)), w = v(() => ns(T.value)), N = v(() => { + var H; + return (H = u.value) == null ? void 0 : H.operations.find((Q) => { var oe; - return ((oe = Q.dataModel) == null ? void 0 : oe.name) == l.refInfo.model && ze.isAnyQuery(Q); + return ((oe = Q.dataModel) == null ? void 0 : oe.name) == s.refInfo.model && qe.isAnyQuery(Q); }); - }), G = M(), C = M(!1), _ = M(), B = () => `${l.id}/ApiPrefs/${l.refInfo.model}`, de = (z) => `Column/${l.id}:${l.refInfo.model}.${z}`; - async function F(z) { - g.value += z, g.value < 0 && (g.value = 0); - var Q = Math.floor(D.value / L.value) * L.value; - g.value > Q && (g.value = Q), await Ce(); + }), E = O(), h = O(!1), C = O(), Y = () => `${s.id}/ApiPrefs/${s.refInfo.model}`, J = (H) => `Column/${s.id}:${s.refInfo.model}.${H}`; + async function ne(H) { + g.value += H, g.value < 0 && (g.value = 0); + var Q = Math.floor(K.value / L.value) * L.value; + g.value > Q && (g.value = Q), await ce(); } - async function V(z, Q) { - t("done", z); + async function D(H, Q) { + n("done", H); } - function re() { - t("done", null); + function V() { + n("done", null); } - function ye(z, Q) { - var ge, Se, Oe; + function fe(H, Q) { + var be, $e, Ae; let oe = Q.target; if ((oe == null ? void 0 : oe.tagName) !== "TD") { - let Re = (ge = oe == null ? void 0 : oe.closest("TABLE")) == null ? void 0 : ge.getBoundingClientRect(), Me = S.value.find((De) => De.name.toLowerCase() == z.toLowerCase()); - if (Me && Re) { - let De = 318, je = (((Se = Q.target) == null ? void 0 : Se.tagName) === "DIV" ? Q.target : (Oe = Q.target) == null ? void 0 : Oe.closest("DIV")).getBoundingClientRect(), Ye = De + 25; - _.value = { - column: Me, + let He = (be = oe == null ? void 0 : oe.closest("TABLE")) == null ? void 0 : be.getBoundingClientRect(), Fe = q.value.find((De) => De.name.toLowerCase() == H.toLowerCase()); + if (Fe && He) { + let De = 318, We = ((($e = Q.target) == null ? void 0 : $e.tagName) === "DIV" ? Q.target : (Ae = Q.target) == null ? void 0 : Ae.closest("DIV")).getBoundingClientRect(), Re = De + 25; + C.value = { + column: Fe, topLeft: { - x: Math.max(Math.floor(je.x + 25), Ye), + x: Math.max(Math.floor(We.x + 25), Re), y: Math.floor(115) } }; } } } - function fe() { - _.value = null; + function pe() { + C.value = null; } - async function H(z) { + async function ue(H) { var oe; - let Q = (oe = _.value) == null ? void 0 : oe.column; - Q && (Q.settings = z, m.setItem(de(Q.name), JSON.stringify(Q.settings)), await Ce()), _.value = null; + let Q = (oe = C.value) == null ? void 0 : oe.column; + Q && (Q.settings = H, f.setItem(J(Q.name), JSON.stringify(Q.settings)), await ce()), C.value = null; } - async function P(z) { - m.setItem(de(z.name), JSON.stringify(z.settings)), await Ce(); + async function me(H) { + f.setItem(J(H.name), JSON.stringify(H.settings)), await ce(); } - async function me(z) { - C.value = !1, p.value = z, m.setItem(B(), JSON.stringify(z)), await Ce(); + async function S(H) { + h.value = !1, m.value = H, f.setItem(Y(), JSON.stringify(H)), await ce(); } - async function Ce() { - await ve(Ve()); + async function ce() { + await Ve(Se()); } - async function ve(z) { - const Q = E.value; + async function Ve(H) { + const Q = N.value; if (!Q) { - console.error(`No Query API was found for ${l.refInfo.model}`); + console.error(`No Query API was found for ${s.refInfo.model}`); return; } - let oe = Gt(Q, z), ge = Wn((Re) => { - v.value.response = v.value.error = void 0, O.value = Re; - }), Se = await c.api(oe); - ge(), xt(() => v.value = Se); - let Oe = be(Se.response, "results") || []; - !Se.succeeded || Oe.label == 0; - } - function Ve() { - let z = { + let oe = Yt(Q, H), be = dn((He) => { + k.value.response = k.value.error = void 0, b.value = He; + }), $e = await c.api(oe); + be(), St(() => k.value = $e); + let Ae = _e($e.response, "results") || []; + !$e.succeeded || Ae.label == 0; + } + function Se() { + let H = { include: "total", take: L.value - }, Q = Y(p.value.selectedColumns || l.selectedColumns); + }, Q = I(m.value.selectedColumns || s.selectedColumns); if (Q.length > 0) { - let ge = W.value; - ge && Q.includes(ge.name) && (Q = [ge.name, ...Q]), z.fields = Q.join(","); + let be = w.value; + be && Q.includes(be.name) && (Q = [be.name, ...Q]), H.fields = Q.join(","); } let oe = []; - return S.value.forEach((ge) => { - ge.settings.sort && oe.push((ge.settings.sort === "DESC" ? "-" : "") + ge.name), ge.settings.filters.forEach((Se) => { - let Oe = Se.key.replace("%", ge.name); - z[Oe] = Se.value; + return q.value.forEach((be) => { + be.settings.sort && oe.push((be.settings.sort === "DESC" ? "-" : "") + be.name), be.settings.filters.forEach(($e) => { + let Ae = $e.key.replace("%", be.name); + H[Ae] = $e.value; }); - }), typeof z.skip > "u" && g.value > 0 && (z.skip = g.value), oe.length > 0 && (z.orderBy = oe.join(",")), z; + }), typeof H.skip > "u" && g.value > 0 && (H.skip = g.value), oe.length > 0 && (H.orderBy = oe.join(",")), H; } - async function Fe() { - S.value.forEach((z) => { - z.settings = { filters: [] }, m.removeItem(de(z.name)); - }), await Ce(); + async function ge() { + q.value.forEach((H) => { + H.settings = { filters: [] }, f.removeItem(J(H.name)); + }), await ce(); } - return Xe(async () => { - const z = l.prefs || yl(m.getItem(B())); - z && (p.value = z), S.value = J.value.map((Q) => ({ + return Ye(async () => { + const H = s.prefs || $s(f.getItem(Y())); + H && (m.value = H), q.value = M.value.map((Q) => ({ name: Q.name, type: Q.type, meta: Q, @@ -6577,644 +6939,646 @@ const b0 = { key: 0 }, w0 = { class: "text-red-700" }, x0 = /* @__PURE__ */ s("b { filters: [] }, - yl(m.getItem(de(Q.name))) + $s(f.getItem(J(Q.name))) ) - })), isNaN(l.skip) || (g.value = l.skip), await Ce(); - }), (z, Q) => { - const oe = X("ErrorSummary"), ge = X("Loading"), Se = X("SettingsIcons"), Oe = X("DataGrid"), Re = X("ModalDialog"); - return a(), u(Te, null, [ - e.refInfo ? (a(), se(Re, { + })), isNaN(s.skip) || (g.value = s.skip), await ce(); + }), (H, Q) => { + const oe = Z("ErrorSummary"), be = Z("Loading"), $e = Z("SettingsIcons"), Ae = Z("DataGrid"), He = Z("ModalDialog"); + return o(), i(Me, null, [ + H.refInfo ? (o(), ae(He, { key: 0, ref_key: "modalDialog", - ref: G, - id: e.id, - onDone: re + ref: E, + id: H.id, + onDone: V }, { - default: ke(() => [ - s("div", I1, [ - s("div", D1, [ - s("h3", O1, [ - xe(" Select "), - s("span", j1, A(o(Ee)(e.refInfo.model)), 1) + default: xe(() => [ + l("div", Sp, [ + l("div", Mp, [ + l("h3", Ap, [ + ke(" Select "), + l("span", Tp, F(X(Pe)(H.refInfo.model)), 1) ]), - s("div", P1, [ - e.showPreferences ? (a(), u("button", { + l("div", Fp, [ + H.showPreferences ? (o(), i("button", { key: 0, type: "button", class: "pl-2 text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400", - title: `${e.refInfo.model} Preferences`, - onClick: Q[0] || (Q[0] = (Me) => C.value = !C.value) - }, H1, 8, B1)) : k("", !0), - e.showPagingNav ? (a(), u("button", { + title: `${H.refInfo.model} Preferences`, + onClick: Q[0] || (Q[0] = (Fe) => h.value = !h.value) + }, Op, 8, Ip)) : x("", !0), + H.showPagingNav ? (o(), i("button", { key: 1, type: "button", - class: w(["pl-2", o(K) ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), + class: y(["pl-2", le.value ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), title: "First page", - disabled: !o(K), - onClick: Q[1] || (Q[1] = (Me) => F(-o(D))) - }, N1, 10, E1)) : k("", !0), - e.showPagingNav ? (a(), u("button", { + disabled: !le.value, + onClick: Q[1] || (Q[1] = (Fe) => ne(-K.value)) + }, Bp, 10, Dp)) : x("", !0), + H.showPagingNav ? (o(), i("button", { key: 2, type: "button", - class: w(["pl-2", o(ne) ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), + class: y(["pl-2", R.value ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), title: "Previous page", - disabled: !o(ne), - onClick: Q[2] || (Q[2] = (Me) => F(-o(L))) - }, Q1, 10, U1)) : k("", !0), - e.showPagingNav ? (a(), u("button", { + disabled: !R.value, + onClick: Q[2] || (Q[2] = (Fe) => ne(-L.value)) + }, Ep, 10, Hp)) : x("", !0), + H.showPagingNav ? (o(), i("button", { key: 3, type: "button", - class: w(["pl-2", o(ee) ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), + class: y(["pl-2", W.value ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), title: "Next page", - disabled: !o(ee), - onClick: Q[3] || (Q[3] = (Me) => F(o(L))) - }, G1, 10, K1)) : k("", !0), - e.showPagingNav ? (a(), u("button", { + disabled: !W.value, + onClick: Q[3] || (Q[3] = (Fe) => ne(L.value)) + }, Up, 10, zp)) : x("", !0), + H.showPagingNav ? (o(), i("button", { key: 4, type: "button", - class: w(["pl-2", o(te) ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), + class: y(["pl-2", ee.value ? "text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400" : "text-gray-400 dark:text-gray-500"]), title: "Last page", - disabled: !o(te), - onClick: Q[4] || (Q[4] = (Me) => F(o(D))) - }, X1, 10, W1)) : k("", !0) + disabled: !ee.value, + onClick: Q[4] || (Q[4] = (Fe) => ne(K.value)) + }, Kp, 10, qp)) : x("", !0) ]), - e.showPagingInfo ? (a(), u("div", Y1, [ - s("div", em, [ - O.value ? (a(), u("span", tm, "Querying...")) : k("", !0), - o(q).length ? (a(), u("span", lm, [ - nm, - xe(" " + A(g.value + 1) + " - " + A(Math.min(g.value + o(q).length, o(D))) + " ", 1), - s("span", null, " of " + A(o(D)), 1) - ])) : v.value.completed ? (a(), u("span", sm, "No Results")) : k("", !0) + H.showPagingInfo ? (o(), i("div", Zp, [ + l("div", Wp, [ + b.value ? (o(), i("span", Gp, "Querying...")) : x("", !0), + z.value.length ? (o(), i("span", Jp, [ + Xp, + ke(" " + F(g.value + 1) + " - " + F(Math.min(g.value + z.value.length, K.value)) + " ", 1), + l("span", null, " of " + F(K.value), 1) + ])) : k.value.completed ? (o(), i("span", Yp, "No Results")) : x("", !0) ]) - ])) : k("", !0), - o(le) && e.showResetPreferences ? (a(), u("div", om, [ - s("button", { + ])) : x("", !0), + A.value && H.showResetPreferences ? (o(), i("div", em, [ + l("button", { type: "button", - onClick: Fe, + onClick: ge, title: "Reset Preferences & Filters", - class: w(o(h)) - }, im, 2) - ])) : k("", !0), - s("div", rm, [ - e.showFiltersView && o(x) > 0 ? (a(), u("div", um, [ - s("button", { + class: y(p.value) + }, sm, 2) + ])) : x("", !0), + l("div", lm, [ + H.showFiltersView && te.value > 0 ? (o(), i("div", nm, [ + l("button", { type: "button", - onClick: Q[5] || (Q[5] = (Me) => U.value = U.value == "filters" ? null : "filters"), - class: w(o(h)), + onClick: Q[5] || (Q[5] = (Fe) => P.value = P.value == "filters" ? null : "filters"), + class: y(p.value), "aria-expanded": "false" }, [ - dm, - s("span", cm, A(o(x)) + " " + A(o(x) == 1 ? "Filter" : "Filters"), 1), - U.value != "filters" ? (a(), u("svg", fm, vm)) : (a(), u("svg", hm, pm)) + om, + l("span", am, F(te.value) + " " + F(te.value == 1 ? "Filter" : "Filters"), 1), + P.value != "filters" ? (o(), i("svg", rm, um)) : (o(), i("svg", dm, fm)) ], 2) - ])) : k("", !0) + ])) : x("", !0) ]) ]), - U.value == "filters" ? (a(), se(Cn, { + P.value == "filters" ? (o(), ae(Il, { key: 0, class: "border-y border-gray-200 dark:border-gray-800 py-8 my-2", - definitions: o(y), - columns: S.value, - onDone: Q[6] || (Q[6] = (Me) => U.value = null), - onChange: P - }, null, 8, ["definitions", "columns"])) : k("", !0), - _.value ? (a(), u("div", ym, [ - $e($n, { - definitions: o(y), - column: _.value.column, - "top-left": _.value.topLeft, - onDone: fe, - onSave: H + definitions: $.value, + columns: q.value, + onDone: Q[6] || (Q[6] = (Fe) => P.value = null), + onChange: me + }, null, 8, ["definitions", "columns"])) : x("", !0), + C.value ? (o(), i("div", vm, [ + ye(Fl, { + definitions: $.value, + column: C.value.column, + "top-left": C.value.topLeft, + onDone: pe, + onSave: ue }, null, 8, ["definitions", "column", "top-left"]) - ])) : k("", !0), - v.value.error ? (a(), se(oe, { + ])) : x("", !0), + k.value.error ? (o(), ae(oe, { key: 2, - status: v.value.error - }, null, 8, ["status"])) : O.value ? (a(), se(ge, { key: 3 })) : (a(), u("div", bm, [ - o(q).length ? (a(), u("div", wm, [ - $e(Oe, { - id: e.id, - items: o(q), - type: e.refInfo.model, - "selected-columns": o(j), - onFiltersChanged: Ce, + status: k.value.error + }, null, 8, ["status"])) : b.value ? (o(), ae(be, { key: 3 })) : (o(), i("div", pm, [ + z.value.length ? (o(), i("div", mm, [ + ye(Ae, { + id: H.id, + items: z.value, + type: H.refInfo.model, + "selected-columns": ie.value, + onFiltersChanged: ce, tableStyle: "fullWidth", - rowClass: R, - onRowSelected: V, - onHeaderSelected: ye - }, en({ - header: ke(({ column: Me, label: De }) => { - var Qe; + rowClass: se, + onRowSelected: D, + onHeaderSelected: fe + }, rl({ + header: xe(({ column: Fe, label: De }) => { + var Oe; return [ - e.allowFiltering && (!l.canFilter || l.canFilter(Me)) ? (a(), u("div", xm, [ - s("span", km, A(De), 1), - $e(Se, { - column: S.value.find((je) => je.name.toLowerCase() === Me.toLowerCase()), - "is-open": ((Qe = _.value) == null ? void 0 : Qe.column.name) === Me + H.allowFiltering && (!s.canFilter || s.canFilter(Fe)) ? (o(), i("div", hm, [ + l("span", gm, F(De), 1), + ye($e, { + column: q.value.find((We) => We.name.toLowerCase() === Fe.toLowerCase()), + "is-open": ((Oe = C.value) == null ? void 0 : Oe.column.name) === Fe }, null, 8, ["column", "is-open"]) - ])) : (a(), u("div", $m, [ - s("span", Cm, A(De), 1) + ])) : (o(), i("div", ym, [ + l("span", bm, F(De), 1) ])) ]; }), _: 2 }, [ - Ie(Object.keys(o(n)), (Me) => ({ - name: Me, - fn: ke((De) => [ - Z(z.$slots, Me, It(gl(De))) + je(Object.keys(X(a)), (Fe) => ({ + name: Fe, + fn: xe((De) => [ + U(H.$slots, Fe, Rt(ks(De))) ]) })) ]), 1032, ["id", "items", "type", "selected-columns"]) - ])) : k("", !0) + ])) : x("", !0) ])) ]) ]), _: 3 - }, 8, ["id"])) : k("", !0), - C.value ? (a(), se(_n, { + }, 8, ["id"])) : x("", !0), + h.value ? (o(), ae(jl, { key: 1, - columns: o(J), - prefs: p.value, - onDone: Q[7] || (Q[7] = (Me) => C.value = !1), - onSave: me - }, null, 8, ["columns", "prefs"])) : k("", !0) + columns: M.value, + prefs: m.value, + onDone: Q[7] || (Q[7] = (Fe) => h.value = !1), + onSave: S + }, null, 8, ["columns", "prefs"])) : x("", !0) ], 64); }; } -}), Lm = { class: "sm:hidden" }, Vm = ["for"], Sm = ["id", "name"], Mm = ["value"], Am = { class: "hidden sm:block" }, Tm = { class: "border-b border-gray-200" }, Fm = { +}), km = { class: "sm:hidden" }, _m = ["for"], $m = ["id", "name"], Cm = ["value"], xm = { class: "hidden sm:block" }, Lm = { class: "border-b border-gray-200" }, Vm = { class: "-mb-px flex", "aria-label": "Tabs" -}, Im = ["onClick"], Dm = /* @__PURE__ */ ue({ +}, Sm = ["onClick"], Mm = /* @__PURE__ */ de({ __name: "Tabs", props: { - tabs: null, + tabs: {}, id: { default: "tabs" }, param: { default: "tab" }, - label: { type: Function, default: (e) => Ee(e) }, - selected: null, - tabClass: null, + label: { type: Function, default: (e) => Pe(e) }, + selected: {}, + tabClass: {}, bodyClass: { default: "p-4" }, - url: { type: Boolean, default: !0 } + url: { type: Boolean, default: !0 }, + clearQuery: { type: Boolean, default: !1 } }, setup(e) { - const t = e, l = f(() => Object.keys(t.tabs)), n = (y) => t.label ? t.label(y) : Ee(y), i = f(() => t.id || "tabs"), r = f(() => t.param || "tab"), d = M(); - function c(y) { - if (d.value = y, t.url) { - const b = l.value[0]; - ln({ tab: y === b ? void 0 : y }); + const t = e, s = v(() => Object.keys(t.tabs)), n = (p) => t.label ? t.label(p) : Pe(p), a = v(() => t.id || "tabs"), r = v(() => t.param || "tab"), u = O(); + function d(p) { + if (u.value = p, t.url) { + const $ = s.value[0]; + ul({ tab: p === $ ? void 0 : p }, t.clearQuery); } } - function m(y) { - return d.value === y; + function c(p) { + return u.value === p; } - const h = f(() => `${100 / Object.keys(t.tabs).length}%`); - return Xe(() => { - if (d.value = t.selected || Object.keys(t.tabs)[0], t.url) { - const y = location.search ? location.search : location.hash.includes("?") ? "?" + dl(location.hash, "?") : "", p = El(y)[r.value]; - p && (d.value = p); + const f = v(() => `${100 / Object.keys(t.tabs).length}%`); + return Ye(() => { + if (u.value = t.selected || Object.keys(t.tabs)[0], t.url) { + const p = location.search ? location.search : location.hash.includes("?") ? "?" + ms(location.hash, "?") : "", m = Zs(p)[r.value]; + m && (u.value = m); } - }), (y, b) => (a(), u("div", null, [ - s("div", Lm, [ - s("label", { - for: o(i), + }), (p, $) => (o(), i("div", null, [ + l("div", km, [ + l("label", { + for: a.value, class: "sr-only" - }, "Select a tab", 8, Vm), - s("select", { - id: o(i), - name: o(i), + }, "Select a tab", 8, _m), + l("select", { + id: a.value, + name: a.value, class: "block w-full rounded-md border-gray-300 focus:border-indigo-500 focus:ring-indigo-500", - onChange: b[0] || (b[0] = (p) => { - var v; - return c((v = p.target) == null ? void 0 : v.value); + onChange: $[0] || ($[0] = (m) => { + var k; + return d((k = m.target) == null ? void 0 : k.value); }) }, [ - (a(!0), u(Te, null, Ie(o(l), (p) => (a(), u("option", { - key: p, - value: p - }, A(n(p)), 9, Mm))), 128)) - ], 40, Sm) + (o(!0), i(Me, null, je(s.value, (m) => (o(), i("option", { + key: m, + value: m + }, F(n(m)), 9, Cm))), 128)) + ], 40, $m) ]), - s("div", Am, [ - s("div", Tm, [ - s("nav", Fm, [ - (a(!0), u(Te, null, Ie(o(l), (p) => (a(), u("a", { + l("div", xm, [ + l("div", Lm, [ + l("nav", Vm, [ + (o(!0), i(Me, null, je(s.value, (m) => (o(), i("a", { href: "#", - onClick: Ne((v) => c(p), ["prevent"]), - style: Jl({ width: o(h) }), - class: w([m(p) ? "border-indigo-500 text-indigo-600 py-4 px-1 text-center border-b-2 font-medium text-sm" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 py-4 px-1 text-center border-b-2 font-medium text-sm", e.tabClass]) - }, A(n(p)), 15, Im))), 256)) + onClick: Ue((k) => d(m), ["prevent"]), + style: nl({ width: f.value }), + class: y([c(m) ? "border-indigo-500 text-indigo-600 py-4 px-1 text-center border-b-2 font-medium text-sm" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 py-4 px-1 text-center border-b-2 font-medium text-sm", p.tabClass]) + }, F(n(m)), 15, Sm))), 256)) ]) ]) ]), - s("div", { - class: w(e.bodyClass) + l("div", { + class: y(p.bodyClass) }, [ - (a(), se(Kn(e.tabs[d.value]))) + (o(), ae(an(p.tabs[u.value]))) ], 2) ])); } -}), Om = /* @__PURE__ */ s("svg", { +}), Am = /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-4 w-4 text-gray-400", preserveAspectRatio: "xMidYMid meet", viewBox: "0 0 32 32" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { fill: "currentColor", d: "M13.502 5.414a15.075 15.075 0 0 0 11.594 18.194a11.113 11.113 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1.002 1.002 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.072 13.072 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3Z" }) -], -1), jm = [ - Om -], Pm = /* @__PURE__ */ s("svg", { +], -1), Tm = [ + Am +], Fm = /* @__PURE__ */ l("svg", { xmlns: "http://www.w3.org/2000/svg", class: "h-4 w-4 text-indigo-600", preserveAspectRatio: "xMidYMid meet", viewBox: "0 0 32 32" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { fill: "currentColor", d: "M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6ZM5.394 6.813L6.81 5.399l3.505 3.506L8.9 10.319zM2 15.005h5v2H2zm3.394 10.193L8.9 21.692l1.414 1.414l-3.505 3.506zM15 25.005h2v5h-2zm6.687-1.9l1.414-1.414l3.506 3.506l-1.414 1.414zm3.313-8.1h5v2h-5zm-3.313-6.101l3.506-3.506l1.414 1.414l-3.506 3.506zM15 2.005h2v5h-2z" }) -], -1), Bm = [ - Pm -], Rm = /* @__PURE__ */ ue({ +], -1), Im = [ + Fm +], jm = /* @__PURE__ */ de({ __name: "DarkModeToggle", setup(e) { - const t = typeof document < "u" ? document.querySelector("html") : null; - let l = M(t == null ? void 0 : t.classList.contains("dark")); - function n() { - l.value ? t == null || t.classList.remove("dark") : t == null || t.classList.add("dark"), l.value = !l.value, localStorage.setItem("color-scheme", l.value ? "dark" : "light"); + const t = typeof document < "u" ? document.documentElement : null, s = () => !!(t != null && t.classList.contains("dark")), n = O(localStorage.getItem("color-scheme") == "dark"); + function a() { + s() ? t == null || t.classList.remove("dark") : t == null || t.classList.add("dark"), n.value = s(), localStorage.setItem("color-scheme", n.value ? "dark" : "light"); } - return (i, r) => (a(), u("button", { + return (r, u) => (o(), i("button", { type: "button", class: "bg-gray-200 dark:bg-gray-700 relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 dark:ring-offset-black", role: "switch", "aria-checked": "false", - onClick: r[0] || (r[0] = (d) => n()) + onClick: u[0] || (u[0] = (d) => a()) }, [ - s("span", { - class: w(`${o(l) ? "translate-x-0" : "translate-x-5"} pointer-events-none relative inline-block h-5 w-5 rounded-full bg-white dark:bg-black shadow transform ring-0 transition ease-in-out duration-200`) + l("span", { + class: y(`${n.value ? "translate-x-0" : "translate-x-5"} pointer-events-none relative inline-block h-5 w-5 rounded-full bg-white dark:bg-black shadow transform ring-0 transition ease-in-out duration-200`) }, [ - s("span", { - class: w(`${o(l) ? "opacity-100 ease-in duration-200" : "opacity-0 ease-out duration-100"} absolute inset-0 h-full w-full flex items-center justify-center transition-opacity`), + l("span", { + class: y(`${n.value ? "opacity-100 ease-in duration-200" : "opacity-0 ease-out duration-100"} absolute inset-0 h-full w-full flex items-center justify-center transition-opacity`), "aria-hidden": "true" - }, jm, 2), - s("span", { - class: w(`${o(l) ? "opacity-0 ease-out duration-100" : "opacity-100 ease-in duration-200"} absolute inset-0 h-full w-full flex items-center justify-center transition-opacity`), + }, Tm, 2), + l("span", { + class: y(`${n.value ? "opacity-0 ease-out duration-100" : "opacity-100 ease-in duration-200"} absolute inset-0 h-full w-full flex items-center justify-center transition-opacity`), "aria-hidden": "true" - }, Bm, 2) + }, Im, 2) ], 2) ])); } -}), Hm = { key: 0 }, Em = { +}), Om = { key: 0 }, Dm = { key: 1, class: "min-h-full flex flex-col justify-center py-12 sm:px-6 lg:px-8" -}, zm = { class: "sm:mx-auto sm:w-full sm:max-w-md" }, Nm = { class: "mt-6 text-center text-3xl font-extrabold text-gray-900" }, Um = { +}, Pm = { class: "sm:mx-auto sm:w-full sm:max-w-md" }, Bm = { class: "mt-6 text-center text-3xl font-extrabold text-gray-900" }, Hm = { key: 0, class: "mt-4 text-center text-sm text-gray-600" -}, qm = { class: "relative z-0 inline-flex shadow-sm rounded-md" }, Qm = ["onClick"], Km = { class: "mt-8 sm:mx-auto sm:w-full sm:max-w-md" }, Zm = { class: "bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10" }, Gm = ["onSubmit"], Wm = { class: "mt-8" }, Jm = { +}, Rm = { class: "relative z-0 inline-flex shadow-sm rounded-md" }, Em = ["onClick"], zm = { class: "mt-8 sm:mx-auto sm:w-full sm:max-w-md" }, Nm = { class: "bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10" }, Um = { class: "mt-8" }, qm = { key: 1, class: "mt-6" -}, Xm = /* @__PURE__ */ wl('
Or continue with
', 1), Ym = { class: "mt-6 grid grid-cols-3 gap-3" }, ev = ["href", "title"], tv = { +}, Qm = /* @__PURE__ */ xs('
Or continue with
', 1), Km = { class: "mt-6 grid grid-cols-3 gap-3" }, Zm = ["href", "title"], Wm = { key: 1, class: "h-5 w-5 text-gray-700", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32" -}, lv = /* @__PURE__ */ s("path", { +}, Gm = /* @__PURE__ */ l("path", { d: "M16 8a5 5 0 1 0 5 5a5 5 0 0 0-5-5z", fill: "currentColor" -}, null, -1), nv = /* @__PURE__ */ s("path", { +}, null, -1), Jm = /* @__PURE__ */ l("path", { d: "M16 2a14 14 0 1 0 14 14A14.016 14.016 0 0 0 16 2zm7.992 22.926A5.002 5.002 0 0 0 19 20h-6a5.002 5.002 0 0 0-4.992 4.926a12 12 0 1 1 15.985 0z", fill: "currentColor" -}, null, -1), sv = [ - lv, - nv -], ov = /* @__PURE__ */ ue({ +}, null, -1), Xm = [ + Gm, + Jm +], Ym = /* @__PURE__ */ de({ __name: "SignIn", props: { - provider: null, + provider: {}, title: { default: "Sign In" }, tabs: { type: [Boolean, String], default: !0 }, oauth: { type: [Boolean, String], default: !0 } }, emits: ["login"], setup(e, { emit: t }) { - const l = e, { getMetadata: n, createDto: i } = ot(), r = Tl(), { signIn: d } = kn(), c = n({ assert: !0 }), m = c.plugins.auth, h = document.baseURI, y = c.app.baseUrl, b = M(i("Authenticate")), p = M(new We()), v = M(l.provider); - Xe(() => { - m == null || m.authProviders.map((D) => D.formLayout).filter((D) => D).forEach((D) => D.forEach((K) => b.value[K.id] = "")); + const s = e, n = t, { getMetadata: a, createDto: r } = lt(), u = Ds(), d = Qe("client"), { signIn: c } = Tl(), f = a({ assert: !0 }), p = f.plugins.auth, $ = document.baseURI, m = f.app.baseUrl, k = O(r("Authenticate")), g = O(new Xe()), b = O(s.provider); + Ye(() => { + p == null || p.authProviders.map((R) => R.formLayout).filter((R) => R).forEach((R) => R.forEach( + (W) => k.value[W.id] = W.type === "checkbox" ? !1 : "" + )); }); - const g = f(() => (m == null ? void 0 : m.authProviders.filter((D) => D.formLayout)) || []), O = f(() => g.value[0] || {}), U = f(() => g.value[Math.max(g.value.length - 1, 0)] || {}), Y = f(() => (v.value ? m == null ? void 0 : m.authProviders.find((D) => D.name === v.value) : null) ?? O.value), R = (D) => D === !1 || D === "false"; - function N(D) { - return D.label || D.navItem && D.navItem.label; - } - const T = f(() => { - var D; - return (((D = Y.value) == null ? void 0 : D.formLayout) || []).map((K) => { - var ne, ee; - return Object.assign({}, K, { - type: (ne = K.type) == null ? void 0 : ne.toLowerCase(), - autocomplete: K.autocomplete || (((ee = K.type) == null ? void 0 : ee.toLowerCase()) === "password" ? "current-password" : void 0) || (K.id.toLowerCase() === "username" ? "username" : void 0), - css: Object.assign({ field: "col-span-12" }, K.css) + const P = v(() => (p == null ? void 0 : p.authProviders.filter((R) => R.formLayout)) || []), I = v(() => P.value[0] || {}), se = v(() => P.value[Math.max(P.value.length - 1, 0)] || {}), j = v(() => (b.value ? p == null ? void 0 : p.authProviders.find((R) => R.name === b.value) : null) ?? I.value), T = (R) => R === !1 || R === "false"; + function M(R) { + return R.label || R.navItem && R.navItem.label; + } + const ie = v(() => { + var R; + return (((R = j.value) == null ? void 0 : R.formLayout) || []).map((W) => { + var ee, q; + return Object.assign({}, W, { + type: (ee = W.type) == null ? void 0 : ee.toLowerCase(), + autocomplete: W.autocomplete || (((q = W.type) == null ? void 0 : q.toLowerCase()) === "password" ? "current-password" : void 0) || (W.id.toLowerCase() === "username" ? "username" : void 0), + css: Object.assign({ field: "col-span-12" }, W.css) }); }); - }), J = f(() => R(l.oauth) ? [] : (m == null ? void 0 : m.authProviders.filter((D) => D.type === "oauth")) || []), j = f(() => { - let D = xo( - m == null ? void 0 : m.authProviders.filter((ne) => ne.formLayout && ne.formLayout.length > 0), - (ne, ee) => { - let te = N(ee) || nt(ee.name); - ne[te] = ee.name === O.value.name ? "" : ee.name; + }), L = v(() => T(s.oauth) ? [] : (p == null ? void 0 : p.authProviders.filter((R) => R.type === "oauth")) || []), z = v(() => { + let R = Ho( + p == null ? void 0 : p.authProviders.filter((ee) => ee.formLayout && ee.formLayout.length > 0), + (ee, q) => { + let A = M(q) || at(q.name); + ee[A] = q.name === I.value.name ? "" : q.name; } ); - const K = Y.value; - return K && R(l.tabs) && (D = { [N(K) || nt(K.name)]: K }), D; - }), L = f(() => { - let D = T.value.map((K) => K.id).filter((K) => K); - return p.value.summaryMessage(D); + const W = j.value; + return W && T(s.tabs) && (R = { [M(W) || at(W.name)]: W }), R; + }), K = v(() => { + let R = ie.value.map((W) => W.id).filter((W) => W); + return g.value.summaryMessage(R); }); - async function q() { - if (b.value.provider = Y.value.name, p.value = await r.api(b.value), p.value.succeeded) { - const D = p.value.response; - d(D), t("login", D), p.value = new We(), b.value = i("Authenticate"); + async function le() { + if (k.value.provider = j.value.name, j.value.name === "authsecret" ? (d.headers.set("authsecret", k.value.authsecret), k.value = r("Authenticate")) : j.value.name === "basic" ? (d.setCredentials(k.value.UserName, k.value.Password), k.value = r("Authenticate"), k.value.UserName = null, k.value.Password = null) : (j.value.type === "Bearer" || j.value.name === "jwt") && (d.bearerToken = k.value.BearerToken, k.value = r("Authenticate")), g.value = await u.api(k.value), g.value.succeeded) { + const R = g.value.response; + c(R), n("login", R), g.value = new Xe(), k.value = r("Authenticate"); } } - return (D, K) => { - const ne = X("ErrorSummary"), ee = X("AutoFormFields"), te = X("PrimaryButton"), S = X("Icon"), le = oo("href"); - return o(m) ? (a(), u("div", Em, [ - s("div", zm, [ - s("h2", Nm, A(e.title), 1), - Object.keys(o(j)).length > 1 ? (a(), u("p", Um, [ - s("span", qm, [ - (a(!0), u(Te, null, Ie(o(j), (x, W) => kt((a(), u("a", { - onClick: (E) => v.value = x, - class: w([ - x === "" || x === o(O).name ? "rounded-l-md" : x === o(U).name ? "rounded-r-md -ml-px" : "-ml-px", - v.value === x ? "z-10 outline-none ring-1 ring-indigo-500 border-indigo-500" : "", + return (R, W) => { + const ee = Z("ErrorSummary"), q = Z("AutoFormFields"), A = Z("PrimaryButton"), te = Z("Icon"), w = _o("href"); + return X(p) ? (o(), i("div", Dm, [ + l("div", Pm, [ + l("h2", Bm, F(R.title), 1), + Object.keys(z.value).length > 1 ? (o(), i("p", Hm, [ + l("span", Rm, [ + (o(!0), i(Me, null, je(z.value, (N, E) => Mt((o(), i("a", { + onClick: (h) => b.value = N, + class: y([ + N === "" || N === I.value.name ? "rounded-l-md" : N === se.value.name ? "rounded-r-md -ml-px" : "-ml-px", + b.value === N ? "z-10 outline-none ring-1 ring-indigo-500 border-indigo-500" : "", "cursor-pointer relative inline-flex items-center px-4 py-1 border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50" ]) }, [ - xe(A(W), 1) - ], 10, Qm)), [ - [le, { provider: x }] + ke(F(E), 1) + ], 10, Em)), [ + [w, { provider: N }] ])), 256)) ]) - ])) : k("", !0) + ])) : x("", !0) ]), - s("div", Km, [ - o(L) ? (a(), se(ne, { + l("div", zm, [ + K.value ? (o(), ae(ee, { key: 0, class: "mb-3", - errorSummary: o(L) - }, null, 8, ["errorSummary"])) : k("", !0), - s("div", Zm, [ - o(T).length ? (a(), u("form", { + errorSummary: K.value + }, null, 8, ["errorSummary"])) : x("", !0), + l("div", Nm, [ + ie.value.length ? (o(), i("form", { key: 0, - onSubmit: Ne(q, ["prevent"]) + onSubmit: Ue(le, ["prevent"]) }, [ - $e(ee, { - modelValue: b.value, - formLayout: o(T), - api: p.value, + ye(q, { + modelValue: k.value, + formLayout: ie.value, + api: g.value, hideSummary: !0, "divide-class": "", "space-class": "space-y-6" }, null, 8, ["modelValue", "formLayout", "api"]), - s("div", Wm, [ - $e(te, { class: "w-full" }, { - default: ke(() => [ - xe("Sign In") + l("div", Um, [ + ye(A, { class: "w-full" }, { + default: xe(() => [ + ke("Sign In") ]), _: 1 }) ]) - ], 40, Gm)) : k("", !0), - o(J).length ? (a(), u("div", Jm, [ - Xm, - s("div", Ym, [ - (a(!0), u(Te, null, Ie(o(J), (x) => (a(), u("div", null, [ - s("a", { - href: o(y) + x.navItem.href + "?continue=" + o(h), - title: N(x), + ], 32)) : x("", !0), + L.value.length ? (o(), i("div", qm, [ + Qm, + l("div", Km, [ + (o(!0), i(Me, null, je(L.value, (N) => (o(), i("div", null, [ + l("a", { + href: X(m) + N.navItem.href + "?continue=" + X($), + title: M(N), class: "w-full inline-flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm bg-white text-sm font-medium text-gray-500 hover:bg-gray-50" }, [ - x.icon ? (a(), se(S, { + N.icon ? (o(), ae(te, { key: 0, - image: x.icon, + image: N.icon, class: "h-5 w-5 text-gray-700" - }, null, 8, ["image"])) : (a(), u("svg", tv, sv)) - ], 8, ev) + }, null, 8, ["image"])) : (o(), i("svg", Wm, Xm)) + ], 8, Zm) ]))), 256)) ]) - ])) : k("", !0) + ])) : x("", !0) ]) ]) - ])) : (a(), u("div", Hm, "No Auth Plugin")); + ])) : (o(), i("div", Om, "No Auth Plugin")); }; } -}), av = ["for"], iv = { +}), e1 = ["for"], t1 = { key: 1, class: "border border-gray-200 flex justify-between" -}, rv = { class: "p-2 flex flex-wrap gap-x-4" }, uv = /* @__PURE__ */ s("title", null, "Bold text (CTRL+B)", -1), dv = /* @__PURE__ */ s("path", { +}, s1 = { class: "p-2 flex flex-wrap gap-x-4" }, l1 = /* @__PURE__ */ l("title", null, "Bold text (CTRL+B)", -1), n1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79c0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79c0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z" -}, null, -1), cv = [ - uv, - dv -], fv = /* @__PURE__ */ s("title", null, "Italics (CTRL+I)", -1), mv = /* @__PURE__ */ s("path", { +}, null, -1), o1 = [ + l1, + n1 +], a1 = /* @__PURE__ */ l("title", null, "Italics (CTRL+I)", -1), r1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4h-8z" -}, null, -1), vv = [ - fv, - mv -], hv = /* @__PURE__ */ s("title", null, "Insert Link (CTRL+K)", -1), gv = /* @__PURE__ */ s("path", { +}, null, -1), i1 = [ + a1, + r1 +], u1 = /* @__PURE__ */ l("title", null, "Insert Link (CTRL+K)", -1), d1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7a5 5 0 0 0-5 5a5 5 0 0 0 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8v2m9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1c0 1.71-1.39 3.1-3.1 3.1h-4V17h4a5 5 0 0 0 5-5a5 5 0 0 0-5-5Z" -}, null, -1), pv = [ - hv, - gv -], yv = /* @__PURE__ */ s("title", null, "Blockquote (CTRL+Q)", -1), bv = /* @__PURE__ */ s("path", { +}, null, -1), c1 = [ + u1, + d1 +], f1 = /* @__PURE__ */ l("title", null, "Blockquote (CTRL+Q)", -1), v1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "m15 17l2-4h-4V6h7v7l-2 4h-3Zm-9 0l2-4H4V6h7v7l-2 4H6Z" -}, null, -1), wv = [ - yv, - bv -], xv = /* @__PURE__ */ s("title", null, "Insert Image (CTRL+SHIFT+L)", -1), kv = /* @__PURE__ */ s("path", { +}, null, -1), p1 = [ + f1, + v1 +], m1 = /* @__PURE__ */ l("title", null, "Insert Image (CTRL+SHIFT+L)", -1), h1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M2.992 21A.993.993 0 0 1 2 20.007V3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992ZM20 15V5H4v14L14 9l6 6Zm0 2.828l-6-6L6.828 19H20v-1.172ZM8 11a2 2 0 1 1 0-4a2 2 0 0 1 0 4Z" -}, null, -1), $v = [ - xv, - kv -], Cv = /* @__PURE__ */ s("title", null, "Insert Code (CTRL+<)", -1), _v = /* @__PURE__ */ s("path", { +}, null, -1), g1 = [ + m1, + h1 +], y1 = /* @__PURE__ */ l("title", null, "Insert Code (CTRL+<)", -1), b1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "m8 18l-6-6l6-6l1.425 1.425l-4.6 4.6L9.4 16.6L8 18Zm8 0l-1.425-1.425l4.6-4.6L14.6 7.4L16 6l6 6l-6 6Z" -}, null, -1), Lv = [ - Cv, - _v -], Vv = /* @__PURE__ */ s("title", null, "H2 Heading (CTRL+H)", -1), Sv = /* @__PURE__ */ s("path", { +}, null, -1), w1 = [ + y1, + b1 +], k1 = /* @__PURE__ */ l("title", null, "H2 Heading (CTRL+H)", -1), _1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M7 20V7H2V4h13v3h-5v13H7Zm9 0v-8h-3V9h9v3h-3v8h-3Z" -}, null, -1), Mv = [ - Vv, - Sv -], Av = /* @__PURE__ */ s("title", null, "Numbered List (ALT+1)", -1), Tv = /* @__PURE__ */ s("path", { +}, null, -1), $1 = [ + k1, + _1 +], C1 = /* @__PURE__ */ l("title", null, "Numbered List (ALT+1)", -1), x1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M3 22v-1.5h2.5v-.75H4v-1.5h1.5v-.75H3V16h3q.425 0 .713.288T7 17v1q0 .425-.288.713T6 19q.425 0 .713.288T7 20v1q0 .425-.288.713T6 22H3Zm0-7v-2.75q0-.425.288-.713T4 11.25h1.5v-.75H3V9h3q.425 0 .713.288T7 10v1.75q0 .425-.288.713T6 12.75H4.5v.75H7V15H3Zm1.5-7V3.5H3V2h3v6H4.5ZM9 19v-2h12v2H9Zm0-6v-2h12v2H9Zm0-6V5h12v2H9Z" -}, null, -1), Fv = [ - Av, - Tv -], Iv = /* @__PURE__ */ s("title", null, "Bulleted List (ALT+-)", -1), Dv = /* @__PURE__ */ s("path", { +}, null, -1), L1 = [ + C1, + x1 +], V1 = /* @__PURE__ */ l("title", null, "Bulleted List (ALT+-)", -1), S1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M9 19v-2h12v2H9Zm0-6v-2h12v2H9Zm0-6V5h12v2H9ZM5 20q-.825 0-1.413-.588T3 18q0-.825.588-1.413T5 16q.825 0 1.413.588T7 18q0 .825-.588 1.413T5 20Zm0-6q-.825 0-1.413-.588T3 12q0-.825.588-1.413T5 10q.825 0 1.413.588T7 12q0 .825-.588 1.413T5 14Zm0-6q-.825 0-1.413-.588T3 6q0-.825.588-1.413T5 4q.825 0 1.413.588T7 6q0 .825-.588 1.413T5 8Z" -}, null, -1), Ov = [ - Iv, - Dv -], jv = /* @__PURE__ */ s("title", null, "Strike Through (ALT+S)", -1), Pv = /* @__PURE__ */ s("path", { +}, null, -1), M1 = [ + V1, + S1 +], A1 = /* @__PURE__ */ l("title", null, "Strike Through (ALT+S)", -1), T1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z" -}, null, -1), Bv = [ - jv, - Pv -], Rv = /* @__PURE__ */ s("title", null, "Undo (CTRL+Z)", -1), Hv = /* @__PURE__ */ s("path", { +}, null, -1), F1 = [ + A1, + T1 +], I1 = /* @__PURE__ */ l("title", null, "Undo (CTRL+Z)", -1), j1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88c3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z" -}, null, -1), Ev = [ - Rv, - Hv -], zv = /* @__PURE__ */ s("title", null, "Redo (CTRL+SHIFT+Z)", -1), Nv = /* @__PURE__ */ s("path", { +}, null, -1), O1 = [ + I1, + j1 +], D1 = /* @__PURE__ */ l("title", null, "Redo (CTRL+SHIFT+Z)", -1), P1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 0 1 7.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z" -}, null, -1), Uv = [ - zv, - Nv -], qv = { +}, null, -1), B1 = [ + D1, + P1 +], H1 = { key: 0, class: "p-2 flex flex-wrap gap-x-4" -}, Qv = ["href"], Kv = /* @__PURE__ */ s("path", { +}, R1 = ["href"], E1 = /* @__PURE__ */ l("path", { fill: "currentColor", d: "M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5c0-2.21-1.79-4-4-4z" -}, null, -1), Zv = [ - Kv -], Gv = { class: "" }, Wv = ["name", "id", "label", "value", "rows", "disabled", "onKeydown"], Jv = ["id"], Xv = ["id"], Yv = /* @__PURE__ */ ue({ +}, null, -1), z1 = [ + E1 +], N1 = { class: "" }, U1 = ["name", "id", "label", "value", "rows", "disabled"], q1 = ["id"], Q1 = ["id"], Je = "w-5 h-5 cursor-pointer select-none text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400", K1 = /* @__PURE__ */ de({ __name: "MarkdownInput", props: { - status: null, - id: null, - inputClass: null, - label: null, - labelClass: null, - help: null, - placeholder: null, - modelValue: null, + status: {}, + id: {}, + inputClass: {}, + label: {}, + labelClass: {}, + help: {}, + placeholder: {}, + modelValue: {}, counter: { type: Boolean }, - rows: null, - errorMessages: null, - lang: null, + rows: {}, + errorMessages: {}, + lang: {}, autoFocus: { type: Boolean }, disabled: { type: Boolean }, helpUrl: { default: "https://guides.github.com/features/mastering-markdown/" }, - hide: null + hide: {} }, emits: ["update:modelValue", "close"], - setup(e, { expose: t, emit: l }) { - const n = e; - let i = [], r = [], d = qe("ApiState", void 0); - const c = f(() => ft.call({ responseStatus: n.status ?? (d == null ? void 0 : d.error.value) }, n.id)), m = f(() => n.label ?? Ee(nt(n.id))), h = "bold,italics,link,image,blockquote,code,heading,orderedList,unorderedList,strikethrough,undo,redo,help".split(","), y = f(() => n.hide ? bt(h, n.hide) : bt(h, [])); - function b(C) { - return y.value[C]; - } - const p = f(() => ["shadow-sm font-mono" + lt.base.replace("rounded-md", ""), c.value ? "text-red-900 focus:ring-red-500 focus:border-red-500 border-red-300" : "text-gray-900 " + lt.valid, n.inputClass]), v = "w-5 h-5 cursor-pointer select-none text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400", g = M(); - t({ props: n, textarea: g, updateModelValue: O, selection: Y, hasSelection: U, selectionInfo: R, insert: T, replace: N }); - function O(C) { - l("update:modelValue", C); - } - function U() { + setup(e, { expose: t, emit: s }) { + const n = e, a = s; + let r = [], u = [], d = Qe("ApiState", void 0); + const c = v(() => mt.call({ responseStatus: n.status ?? (d == null ? void 0 : d.error.value) }, n.id)), f = v(() => n.label ?? Pe(at(n.id))), p = "bold,italics,link,image,blockquote,code,heading,orderedList,unorderedList,strikethrough,undo,redo,help".split(","), $ = v(() => n.hide ? Vt(p, n.hide) : Vt(p, [])); + function m(h) { + return $.value[h]; + } + const k = v(() => ["shadow-sm font-mono" + ot.base.replace("rounded-md", ""), c.value ? "text-red-900 focus:ring-red-500 focus:border-red-500 border-red-300" : "text-gray-900 " + ot.valid, n.inputClass]), g = O(); + t({ props: n, textarea: g, updateModelValue: b, selection: I, hasSelection: P, selectionInfo: se, insert: T, replace: j }); + function b(h) { + a("update:modelValue", h); + } + function P() { return g.value.selectionStart !== g.value.selectionEnd; } - function Y() { - const C = g.value; - return C.value.substring(C.selectionStart, C.selectionEnd) || ""; + function I() { + const h = g.value; + return h.value.substring(h.selectionStart, h.selectionEnd) || ""; } - function R() { - const C = g.value, _ = C.value, B = C.selectionStart, de = _.substring(B, C.selectionEnd) || "", F = _.substring(0, B), V = F.lastIndexOf(` + function se() { + const h = g.value, C = h.value, Y = h.selectionStart, J = C.substring(Y, h.selectionEnd) || "", ne = C.substring(0, Y), D = ne.lastIndexOf(` `); return { - value: _, - sel: de, - selPos: B, - beforeSel: F, - afterSel: _.substring(B), - prevCRPos: V, - beforeCR: V >= 0 ? F.substring(0, V + 1) : "", - afterCR: V >= 0 ? F.substring(V + 1) : "" + value: C, + sel: J, + selPos: Y, + beforeSel: ne, + afterSel: C.substring(Y), + prevCRPos: D, + beforeCR: D >= 0 ? ne.substring(0, D + 1) : "", + afterCR: D >= 0 ? ne.substring(D + 1) : "" }; } - function N({ value: C, selectionStart: _, selectionEnd: B }) { - B == null && (B = _), O(C), xt(() => { - g.value.focus(), g.value.setSelectionRange(_, B); + function j({ value: h, selectionStart: C, selectionEnd: Y }) { + Y == null && (Y = C), b(h), St(() => { + g.value.focus(), g.value.setSelectionRange(C, Y); }); } - function T(C, _, B = "", { selectionAtEnd: de, offsetStart: F, offsetEnd: V, filterValue: re, filterSelection: ye } = {}) { - const fe = g.value; - let H = fe.value, P = fe.selectionEnd; - i.push({ value: H, selectionStart: fe.selectionStart, selectionEnd: fe.selectionEnd }), r = []; - const me = fe.selectionStart, Ce = fe.selectionEnd; - let ve = H.substring(0, me), Ve = H.substring(Ce); - const Fe = C && ve.endsWith(C) && Ve.startsWith(_); - if (me == Ce) { - if (Fe ? (H = ve.substring(0, ve.length - C.length) + Ve.substring(_.length), P += -_.length) : (H = ve + C + B + _ + Ve, P += C.length, F = 0, V = (B == null ? void 0 : B.length) || 0, de && (P += V, V = 0)), re) { - var Q = { pos: P }; - H = re(H, Q), P = Q.pos; + function T(h, C, Y = "", { selectionAtEnd: J, offsetStart: ne, offsetEnd: D, filterValue: V, filterSelection: fe } = {}) { + const pe = g.value; + let ue = pe.value, me = pe.selectionEnd; + r.push({ value: ue, selectionStart: pe.selectionStart, selectionEnd: pe.selectionEnd }), u = []; + const S = pe.selectionStart, ce = pe.selectionEnd; + let Ve = ue.substring(0, S), Se = ue.substring(ce); + const ge = h && Ve.endsWith(h) && Se.startsWith(C); + if (S == ce) { + if (ge ? (ue = Ve.substring(0, Ve.length - h.length) + Se.substring(C.length), me += -C.length) : (ue = Ve + h + Y + C + Se, me += h.length, ne = 0, D = (Y == null ? void 0 : Y.length) || 0, J && (me += D, D = 0)), V) { + var Q = { pos: me }; + ue = V(ue, Q), me = Q.pos; } } else { - var oe = H.substring(me, Ce); - ye && (oe = ye(oe)), Fe ? (H = ve.substring(0, ve.length - C.length) + oe + Ve.substring(_.length), F = -oe.length - C.length, V = oe.length) : (H = ve + C + oe + _ + Ve, F ? P += (C + _).length : (P = me, F = C.length, V = oe.length)); + var oe = ue.substring(S, ce); + fe && (oe = fe(oe)), ge ? (ue = Ve.substring(0, Ve.length - h.length) + oe + Se.substring(C.length), ne = -oe.length - h.length, D = oe.length) : (ue = Ve + h + oe + C + Se, ne ? me += (h + C).length : (me = S, ne = h.length, D = oe.length)); } - O(H), xt(() => { - fe.focus(), F = P + (F || 0), V = (F || 0) + (V || 0), fe.setSelectionRange(F, V); + b(ue), St(() => { + pe.focus(), ne = me + (ne || 0), D = (ne || 0) + (D || 0), pe.setSelectionRange(ne, D); }); } - const J = () => T("**", "**", "bold"), j = () => T("_", "_", "italics"), L = () => T("~~", "~~", "strikethrough"), q = () => T("[", "](https://)", "", { offsetStart: -9, offsetEnd: 8 }), D = () => T(` + const M = () => T("**", "**", "bold"), ie = () => T("_", "_", "italics"), L = () => T("~~", "~~", "strikethrough"), z = () => T("[", "](https://)", "", { offsetStart: -9, offsetEnd: 8 }), K = () => T(` > `, ` -`, "Blockquote", {}), K = () => T("![](", ")"); - function ne(C) { - const _ = Y(); - if (_ && !C.shiftKey) +`, "Blockquote", {}), le = () => T("![](", ")"); + function R(h) { + const C = I(); + if (C && !h.shiftKey) T("`", "`", "code"); else { - const B = n.lang || "js"; - _.indexOf(` -`) === -1 ? T("\n```" + B + ` -`, "\n```\n", "// code") : T("```" + B + ` + const Y = n.lang || "js"; + C.indexOf(` +`) === -1 ? T("\n```" + Y + ` +`, "\n```\n", "// code") : T("```" + Y + ` `, "```\n", ""); } } - function ee() { - if (U()) { - let { sel: C, selPos: _, beforeSel: B, afterSel: de, prevCRPos: F, beforeCR: V, afterCR: re } = R(); - if (C.indexOf(` + function W() { + if (P()) { + let { sel: h, selPos: C, beforeSel: Y, afterSel: J, prevCRPos: ne, beforeCR: D, afterCR: V } = se(); + if (h.indexOf(` `) === -1) T(` 1. `, ` `); - else if (!C.startsWith(" 1. ")) { - let H = 1; + else if (!h.startsWith(" 1. ")) { + let ue = 1; T("", "", " - ", { selectionAtEnd: !0, - filterSelection: (P) => " 1. " + P.replace(/\n$/, "").replace(/\n/g, (me) => ` - ${++H}. `) + ` + filterSelection: (me) => " 1. " + me.replace(/\n$/, "").replace(/\n/g, (S) => ` + ${++ue}. `) + ` ` }); } else T("", "", "", { - filterValue: (H, P) => { - if (F >= 0) { - let me = re.replace(/^ - /, ""); - B = V + me, P.pos -= re.length - me.length; + filterValue: (ue, me) => { + if (ne >= 0) { + let S = V.replace(/^ - /, ""); + Y = D + S, me.pos -= V.length - S.length; } - return B + de; + return Y + J; }, - filterSelection: (H) => H.replace(/^ 1. /g, "").replace(/\n \d+. /g, ` + filterSelection: (ue) => ue.replace(/^ 1. /g, "").replace(/\n \d+. /g, ` `) }); } else @@ -7222,26 +7586,26 @@ const b0 = { key: 0 }, w0 = { class: "text-red-700" }, x0 = /* @__PURE__ */ s("b 1. `, ` `, "List Item", { offsetStart: -10, offsetEnd: 9 }); } - function te() { - if (U()) { - let { sel: C, selPos: _, beforeSel: B, afterSel: de, prevCRPos: F, beforeCR: V, afterCR: re } = R(); - C.indexOf(` + function ee() { + if (P()) { + let { sel: h, selPos: C, beforeSel: Y, afterSel: J, prevCRPos: ne, beforeCR: D, afterCR: V } = se(); + h.indexOf(` `) === -1 ? T(` - `, ` -`) : !C.startsWith(" - ") ? T("", "", " - ", { +`) : !h.startsWith(" - ") ? T("", "", " - ", { selectionAtEnd: !0, - filterSelection: (H) => " - " + H.replace(/\n$/, "").replace(/\n/g, ` + filterSelection: (ue) => " - " + ue.replace(/\n$/, "").replace(/\n/g, ` - `) + ` ` }) : T("", "", "", { - filterValue: (H, P) => { - if (F >= 0) { - let me = re.replace(/^ - /, ""); - B = V + me, P.pos -= re.length - me.length; + filterValue: (ue, me) => { + if (ne >= 0) { + let S = V.replace(/^ - /, ""); + Y = D + S, me.pos -= V.length - S.length; } - return B + de; + return Y + J; }, - filterSelection: (H) => H.replace(/^ - /g, "").replace(/\n - /g, ` + filterSelection: (ue) => ue.replace(/^ - /g, "").replace(/\n - /g, ` `) }); } else @@ -7249,286 +7613,286 @@ const b0 = { key: 0 }, w0 = { class: "text-red-700" }, x0 = /* @__PURE__ */ s("b - `, ` `, "List Item", { offsetStart: -10, offsetEnd: 9 }); } - function S() { - const C = Y(), _ = C.indexOf(` + function q() { + const h = I(), C = h.indexOf(` `) === -1; - C ? _ ? T(` + h ? C ? T(` ## `, ` `, "") : T("## ", "", "") : T(` ## `, ` `, "Heading", { offsetStart: -8, offsetEnd: 7 }); } - function le() { - let { sel: C, selPos: _, beforeSel: B, afterSel: de, prevCRPos: F, beforeCR: V, afterCR: re } = R(); - !C.startsWith("//") && !re.startsWith("//") ? C ? T("", "", "//", { + function A() { + let { sel: h, selPos: C, beforeSel: Y, afterSel: J, prevCRPos: ne, beforeCR: D, afterCR: V } = se(); + !h.startsWith("//") && !V.startsWith("//") ? h ? T("", "", "//", { selectionAtEnd: !0, - filterSelection: (fe) => "//" + fe.replace(/\n$/, "").replace(/\n/g, ` + filterSelection: (pe) => "//" + pe.replace(/\n$/, "").replace(/\n/g, ` //`) + ` ` - }) : N({ - value: V + "//" + re + de, - selectionStart: _ + 2 + }) : j({ + value: D + "//" + V + J, + selectionStart: C + 2 }) : T("", "", "", { - filterValue: (fe, H) => { - if (F >= 0) { - let P = re.replace(/^\/\//, ""); - B = V + P, H.pos -= re.length - P.length; + filterValue: (pe, ue) => { + if (ne >= 0) { + let me = V.replace(/^\/\//, ""); + Y = D + me, ue.pos -= V.length - me.length; } - return B + de; + return Y + J; }, - filterSelection: (fe) => fe.replace(/^\/\//g, "").replace(/\n\/\//g, ` + filterSelection: (pe) => pe.replace(/^\/\//g, "").replace(/\n\/\//g, ` `) }); } - const x = () => T(`/* + const te = () => T(`/* `, `*/ `, ""); - function W() { - if (i.length === 0) + function w() { + if (r.length === 0) return !1; - const C = g.value, _ = i.pop(); - return r.push({ value: C.value, selectionStart: C.selectionStart, selectionEnd: C.selectionEnd }), N(_), !0; + const h = g.value, C = r.pop(); + return u.push({ value: h.value, selectionStart: h.selectionStart, selectionEnd: h.selectionEnd }), j(C), !0; } - function E() { - if (r.length === 0) + function N() { + if (u.length === 0) return !1; - const C = g.value, _ = r.pop(); - return i.push({ value: C.value, selectionStart: C.selectionStart, selectionEnd: C.selectionEnd }), N(_), !0; - } - const G = () => null; - return Xe(() => { - i = [], r = []; - const C = g.value; - C.onkeydown = (_) => { - if (_.key === "Escape" || _.keyCode === 27) { - l("close"); + const h = g.value, C = u.pop(); + return r.push({ value: h.value, selectionStart: h.selectionStart, selectionEnd: h.selectionEnd }), j(C), !0; + } + const E = () => null; + return Ye(() => { + r = [], u = []; + const h = g.value; + h.onkeydown = (C) => { + if (C.key === "Escape" || C.keyCode === 27) { + a("close"); return; } - const B = String.fromCharCode(_.keyCode).toLowerCase(); - B === " " ? (!_.shiftKey ? T("", "", " ", { + const Y = String.fromCharCode(C.keyCode).toLowerCase(); + Y === " " ? (!C.shiftKey ? T("", "", " ", { selectionAtEnd: !0, - filterSelection: (F) => " " + F.replace(/\n$/, "").replace(/\n/g, ` + filterSelection: (ne) => " " + ne.replace(/\n$/, "").replace(/\n/g, ` `) + ` ` }) : T("", "", "", { - filterValue: (F, V) => { - let { selPos: re, beforeSel: ye, afterSel: fe, prevCRPos: H, beforeCR: P, afterCR: me } = R(); - if (H >= 0) { - let Ce = me.replace(/\t/g, " ").replace(/^ ? ? ? ?/, ""); - ye = P + Ce, V.pos -= me.length - Ce.length; + filterValue: (ne, D) => { + let { selPos: V, beforeSel: fe, afterSel: pe, prevCRPos: ue, beforeCR: me, afterCR: S } = se(); + if (ue >= 0) { + let ce = S.replace(/\t/g, " ").replace(/^ ? ? ? ?/, ""); + fe = me + ce, D.pos -= S.length - ce.length; } - return ye + fe; + return fe + pe; }, - filterSelection: (F) => F.replace(/\t/g, " ").replace(/^ ? ? ? ?/g, "").replace(/\n /g, ` + filterSelection: (ne) => ne.replace(/\t/g, " ").replace(/^ ? ? ? ?/g, "").replace(/\n /g, ` `) - }), _.preventDefault()) : _.ctrlKey ? B === "z" ? _.shiftKey ? E() && _.preventDefault() : W() && _.preventDefault() : B === "b" && !_.shiftKey ? (J(), _.preventDefault()) : B === "h" && !_.shiftKey ? (S(), _.preventDefault()) : B === "i" && !_.shiftKey ? (j(), _.preventDefault()) : B === "q" && !_.shiftKey ? (D(), _.preventDefault()) : B === "k" ? _.shiftKey ? (K(), _.preventDefault()) : (q(), _.preventDefault()) : B === "," || _.key === "<" || _.key === ">" || _.keyCode === 188 ? (ne(_), _.preventDefault()) : B === "/" || _.key === "/" ? (le(), _.preventDefault()) : (B === "?" || _.key === "?") && _.shiftKey && (x(), _.preventDefault()) : _.altKey && (_.key === "1" || _.key === "0" ? (ee(), _.preventDefault()) : _.key === "-" ? (te(), _.preventDefault()) : _.key === "s" && (L(), _.preventDefault())); + }), C.preventDefault()) : C.ctrlKey ? Y === "z" ? C.shiftKey ? N() && C.preventDefault() : w() && C.preventDefault() : Y === "b" && !C.shiftKey ? (M(), C.preventDefault()) : Y === "h" && !C.shiftKey ? (q(), C.preventDefault()) : Y === "i" && !C.shiftKey ? (ie(), C.preventDefault()) : Y === "q" && !C.shiftKey ? (K(), C.preventDefault()) : Y === "k" ? C.shiftKey ? (le(), C.preventDefault()) : (z(), C.preventDefault()) : Y === "," || C.key === "<" || C.key === ">" || C.keyCode === 188 ? (R(C), C.preventDefault()) : Y === "/" || C.key === "/" ? (A(), C.preventDefault()) : (Y === "?" || C.key === "?") && C.shiftKey && (te(), C.preventDefault()) : C.altKey && (C.key === "1" || C.key === "0" ? (W(), C.preventDefault()) : C.key === "-" ? (ee(), C.preventDefault()) : C.key === "s" && (L(), C.preventDefault())); }; - }), (C, _) => { - var B; - return a(), u("div", null, [ - Z(C.$slots, "header", Le({ + }), (h, C) => { + var Y; + return o(), i("div", null, [ + U(h.$slots, "header", Te({ inputElement: g.value, - id: e.id, - modelValue: e.modelValue, - status: e.status - }, C.$attrs)), - o(m) ? (a(), u("label", { + id: h.id, + modelValue: h.modelValue, + status: h.status + }, h.$attrs)), + f.value ? (o(), i("label", { key: 0, - for: e.id, - class: w(`mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300 ${e.labelClass ?? ""}`) - }, A(o(m)), 11, av)) : k("", !0), - e.disabled ? k("", !0) : (a(), u("div", iv, [ - s("div", rv, [ - b("bold") ? (a(), u("svg", { + for: h.id, + class: y(`mb-1 block text-sm font-medium text-gray-700 dark:text-gray-300 ${h.labelClass ?? ""}`) + }, F(f.value), 11, e1)) : x("", !0), + h.disabled ? x("", !0) : (o(), i("div", t1, [ + l("div", s1, [ + m("bold") ? (o(), i("svg", { key: 0, - class: w(v), - onClick: J, + class: y(Je), + onClick: M, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, cv)) : k("", !0), - b("italics") ? (a(), u("svg", { + }, o1)) : x("", !0), + m("italics") ? (o(), i("svg", { key: 1, - class: w(v), - onClick: j, + class: y(Je), + onClick: ie, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, vv)) : k("", !0), - b("link") ? (a(), u("svg", { + }, i1)) : x("", !0), + m("link") ? (o(), i("svg", { key: 2, - class: w(v), - onClick: q, + class: y(Je), + onClick: z, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, pv)) : k("", !0), - b("blockquote") ? (a(), u("svg", { + }, c1)) : x("", !0), + m("blockquote") ? (o(), i("svg", { key: 3, - class: w(v), - onClick: D, + class: y(Je), + onClick: K, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, wv)) : k("", !0), - b("image") ? (a(), u("svg", { + }, p1)) : x("", !0), + m("image") ? (o(), i("svg", { key: 4, - class: w(v), - onClick: K, + class: y(Je), + onClick: le, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, $v)) : k("", !0), - b("code") ? (a(), u("svg", { + }, g1)) : x("", !0), + m("code") ? (o(), i("svg", { key: 5, - class: w(v), - onClick: ne, + class: y(Je), + onClick: R, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, Lv)) : k("", !0), - b("heading") ? (a(), u("svg", { + }, w1)) : x("", !0), + m("heading") ? (o(), i("svg", { key: 6, - class: w(v), - onClick: S, + class: y(Je), + onClick: q, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, Mv)) : k("", !0), - b("orderedList") ? (a(), u("svg", { + }, $1)) : x("", !0), + m("orderedList") ? (o(), i("svg", { key: 7, - class: w(v), + class: y(Je), icon: "", - onClick: ee, + onClick: W, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, Fv)) : k("", !0), - b("unorderedList") ? (a(), u("svg", { + }, L1)) : x("", !0), + m("unorderedList") ? (o(), i("svg", { key: 8, - class: w(v), - onClick: te, + class: y(Je), + onClick: ee, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, Ov)) : k("", !0), - b("strikethrough") ? (a(), u("svg", { + }, M1)) : x("", !0), + m("strikethrough") ? (o(), i("svg", { key: 9, - class: w(v), + class: y(Je), onClick: L, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, Bv)) : k("", !0), - b("undo") ? (a(), u("svg", { + }, F1)) : x("", !0), + m("undo") ? (o(), i("svg", { key: 10, - class: w(v), - onClick: W, + class: y(Je), + onClick: w, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, Ev)) : k("", !0), - b("redo") ? (a(), u("svg", { + }, O1)) : x("", !0), + m("redo") ? (o(), i("svg", { key: 11, - class: w(v), - onClick: E, + class: y(Je), + onClick: N, xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, Uv)) : k("", !0), - Z(C.$slots, "toolbarbuttons", { - instance: (B = Be()) == null ? void 0 : B.exposed + }, B1)) : x("", !0), + U(h.$slots, "toolbarbuttons", { + instance: (Y = Be()) == null ? void 0 : Y.exposed }) ]), - b("help") && e.helpUrl ? (a(), u("div", qv, [ - s("a", { + m("help") && h.helpUrl ? (o(), i("div", H1, [ + l("a", { title: "formatting help", target: "_blank", - href: e.helpUrl, + href: h.helpUrl, tabindex: "-1" }, [ - (a(), u("svg", { - class: w(v), + (o(), i("svg", { + class: y(Je), xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24" - }, Zv)) - ], 8, Qv) - ])) : k("", !0) + }, z1)) + ], 8, R1) + ])) : x("", !0) ])), - s("div", Gv, [ - s("textarea", { + l("div", N1, [ + l("textarea", { ref_key: "txt", ref: g, - name: e.id, - id: e.id, - class: w(o(p)), - label: e.label, - value: e.modelValue, - rows: e.rows || 6, - disabled: e.disabled, - onInput: _[0] || (_[0] = (de) => { - var F; - return O(((F = de.target) == null ? void 0 : F.value) || ""); + name: h.id, + id: h.id, + class: y(k.value), + label: h.label, + value: h.modelValue, + rows: h.rows || 6, + disabled: h.disabled, + onInput: C[0] || (C[0] = (J) => { + var ne; + return b(((ne = J.target) == null ? void 0 : ne.value) || ""); }), - onKeydown: Qn(G, ["tab"]) - }, null, 42, Wv) + onKeydown: on(E, ["tab"]) + }, null, 42, U1) ]), - o(c) ? (a(), u("p", { + c.value ? (o(), i("p", { key: 2, class: "mt-2 text-sm text-red-500", - id: `${e.id}-error` - }, A(o(c)), 9, Jv)) : e.help ? (a(), u("p", { + id: `${h.id}-error` + }, F(c.value), 9, q1)) : h.help ? (o(), i("p", { key: 3, class: "mt-2 text-sm text-gray-500", - id: `${e.id}-description` - }, A(e.help), 9, Xv)) : k("", !0), - Z(C.$slots, "footer", Le({ + id: `${h.id}-description` + }, F(h.help), 9, Q1)) : x("", !0), + U(h.$slots, "footer", Te({ inputElement: g.value, - id: e.id, - modelValue: e.modelValue, - status: e.status - }, C.$attrs)) + id: h.id, + modelValue: h.modelValue, + status: h.status + }, h.$attrs)) ]); }; } -}), eh = { +}), Z1 = { key: 0, class: "relative z-10 lg:hidden", role: "dialog", "aria-modal": "true" -}, th = { class: "fixed inset-0 flex" }, lh = /* @__PURE__ */ s("span", { class: "sr-only" }, "Close sidebar", -1), nh = /* @__PURE__ */ s("svg", { - class: "h-6 w-6 text-white", +}, W1 = { class: "fixed inset-0 flex" }, G1 = /* @__PURE__ */ l("span", { class: "sr-only" }, "Close sidebar", -1), J1 = /* @__PURE__ */ l("svg", { + class: "h-6 w-6 text-white dark:text-black", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", "aria-hidden": "true" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M6 18L18 6M6 6l12 12" }) -], -1), sh = [ - lh, - nh -], oh = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white px-6 pb-2" }, ah = { class: "hidden lg:fixed lg:inset-y-0 lg:z-10 lg:flex lg:w-72 lg:flex-col" }, ih = { class: "flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 bg-white px-6" }, rh = { - class: /* @__PURE__ */ w(["sticky top-0 flex items-center gap-x-6 bg-white px-4 py-4 shadow-sm sm:px-6 lg:hidden"]) -}, uh = /* @__PURE__ */ s("span", { class: "sr-only" }, "Open sidebar", -1), dh = /* @__PURE__ */ s("svg", { +], -1), X1 = [ + G1, + J1 +], Y1 = { class: "flex grow flex-col gap-y-5 overflow-y-auto bg-white dark:bg-black px-6 pb-2" }, eh = { class: "hidden lg:fixed lg:inset-y-0 lg:z-10 lg:flex lg:w-72 lg:flex-col" }, th = { class: "flex grow flex-col gap-y-5 overflow-y-auto border-r border-gray-200 dark:border-gray-700 bg-white dark:bg-black px-6" }, sh = { + class: /* @__PURE__ */ y(["sticky top-0 flex items-center gap-x-6 bg-white dark:bg-black px-4 py-4 shadow-sm sm:px-6 lg:hidden"]) +}, lh = /* @__PURE__ */ l("span", { class: "sr-only" }, "Open sidebar", -1), nh = /* @__PURE__ */ l("svg", { class: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", @@ -7536,153 +7900,156 @@ const b0 = { key: 0 }, w0 = { class: "text-red-700" }, x0 = /* @__PURE__ */ s("b stroke: "currentColor", "aria-hidden": "true" }, [ - /* @__PURE__ */ s("path", { + /* @__PURE__ */ l("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" }) -], -1), ch = [ - uh, - dh -], fh = /* @__PURE__ */ ue({ +], -1), oh = [ + lh, + nh +], ah = /* @__PURE__ */ de({ __name: "SidebarLayout", setup(e, { expose: t }) { - const { transition: l } = ns(), n = M(!0), i = M(""), r = { + const { transition: s } = bn(), n = O(!0), a = O(""), r = { entering: { cls: "transition-opacity ease-linear duration-300", from: "opacity-0", to: "opacity-100" }, leaving: { cls: "transition-opacity ease-linear duration-300", from: "opacity-100", to: "opacity-0" } - }, d = M(""), c = { + }, u = O(""), d = { entering: { cls: "transition ease-in-out duration-300 transform", from: "-translate-x-full", to: "translate-x-0" }, leaving: { cls: "transition ease-in-out duration-300 transform", from: "translate-x-0", to: "-translate-x-full" } - }, m = M(""), h = { + }, c = O(""), f = { entering: { cls: "ease-in-out duration-300", from: "opacity-0", to: "opacity-100" }, leaving: { cls: "ease-in-out duration-300", from: "opacity-100", to: "opacity-0" } }; - function y(v) { - l(r, i, v), l(c, d, v), l(h, m, v), setTimeout(() => n.value = v, 300); + function p(k) { + s(r, a, k), s(d, u, k), s(f, c, k), setTimeout(() => n.value = k, 300); } - function b() { - y(!0); + function $() { + p(!0); } - function p() { - y(!1); + function m() { + p(!1); } - return t({ show: b, hide: p, toggle: y }), (v, g) => (a(), u("div", null, [ - n.value ? (a(), u("div", eh, [ - s("div", { - class: w(["fixed inset-0 bg-gray-900/80", i.value]) + return t({ show: $, hide: m, toggle: p }), (k, g) => (o(), i("div", null, [ + n.value ? (o(), i("div", Z1, [ + l("div", { + class: y(["fixed inset-0 bg-gray-900/80", a.value]) }, null, 2), - s("div", th, [ - s("div", { - class: w(["relative mr-16 flex w-full max-w-xs flex-1", d.value]) + l("div", W1, [ + l("div", { + class: y(["relative mr-16 flex w-full max-w-xs flex-1", u.value]) }, [ - s("div", { - class: w(["absolute left-full top-0 flex w-16 justify-center pt-5", m.value]) + l("div", { + class: y(["absolute left-full top-0 flex w-16 justify-center pt-5", c.value]) }, [ - s("button", { + l("button", { type: "button", - onClick: p, + onClick: m, class: "-m-2.5 p-2.5" - }, sh) + }, X1) ], 2), - s("div", oh, [ - Z(v.$slots, "default") + l("div", Y1, [ + U(k.$slots, "default") ]) ], 2) ]) - ])) : k("", !0), - s("div", ah, [ - s("div", ih, [ - Z(v.$slots, "default") + ])) : x("", !0), + l("div", eh, [ + l("div", th, [ + U(k.$slots, "default") ]) ]), - s("div", rh, [ - s("button", { + l("div", sh, [ + l("button", { type: "button", - onClick: b, - class: "-m-2.5 p-2.5 text-gray-700 lg:hidden" - }, ch), - Z(v.$slots, "mobiletitlebar") + onClick: $, + class: "-m-2.5 p-2.5 text-gray-700 dark:text-gray-200 lg:hidden" + }, oh), + U(k.$slots, "mobiletitlebar") ]) ])); } -}), mh = { - Alert: jo, - AlertSuccess: Zo, - ErrorSummary: Yo, - InputDescription: ta, - Icon: Rs, - Loading: Qa, - OutlineButton: Ga, - PrimaryButton: Xa, - SecondaryButton: ti, - TextLink: ni, - Breadcrumbs: ui, - Breadcrumb: vi, - NavList: pi, - NavListItem: Si, - AutoQueryGrid: Ju, - SettingsIcons: cd, - FilterViews: Cn, - FilterColumn: $n, - QueryPrefs: _n, - EnsureAccess: Es, - EnsureAccessDialog: fd, - TextInput: kd, - TextareaInput: Md, - SelectInput: Od, - CheckboxInput: Nd, - TagInput: fc, - FileInput: Oc, - Autocomplete: Jc, - Combobox: e0, - DynamicInput: t0, - LookupInput: p0, - AutoFormFields: y0, - AutoForm: E0, - AutoCreateForm: cf, - AutoEditForm: Df, - ConfirmDelete: Pf, - FormLoading: Nf, - DataGrid: Zf, - CellFormat: Gf, - PreviewFormat: t1, - HtmlFormat: a1, - CloseButton: c1, - SlideOver: _1, - ModalDialog: F1, - ModalLookup: _m, - Tabs: Dm, - DarkModeToggle: Rm, - SignIn: ov, - MarkdownInput: Yv, - SidebarLayout: fh -}, Rl = mh, wh = { +}), rh = { + Alert: ea, + AlertSuccess: fa, + ErrorSummary: ga, + InputDescription: ba, + Icon: eo, + Loading: pr, + OutlineButton: gr, + PrimaryButton: wr, + SecondaryButton: $r, + TextLink: xr, + Breadcrumbs: Tr, + Breadcrumb: Dr, + NavList: Hr, + NavListItem: Gr, + AutoQueryGrid: wd, + SettingsIcons: jd, + FilterViews: Il, + FilterColumn: Fl, + QueryPrefs: jl, + EnsureAccess: lo, + EnsureAccessDialog: Od, + TextInput: qd, + TextareaInput: Xd, + SelectInput: nc, + CheckboxInput: fc, + TagInput: jc, + FileInput: l0, + Autocomplete: b0, + Combobox: _0, + DynamicInput: $0, + LookupInput: H0, + AutoFormFields: R0, + AutoForm: df, + AutoCreateForm: Tf, + AutoEditForm: Xf, + AutoViewForm: gv, + ConfirmDelete: bv, + FormLoading: xv, + DataGrid: Av, + CellFormat: Tv, + PreviewFormat: Pv, + HtmlFormat: zv, + MarkupFormat: qv, + MarkupModel: ep, + CloseButton: op, + SlideOver: wp, + ModalDialog: Vp, + ModalLookup: wm, + Tabs: Mm, + DarkModeToggle: jm, + SignIn: Ym, + MarkdownInput: K1, + SidebarLayout: ah +}, Qs = rh, vh = { install(e) { - Object.keys(Rl).forEach((l) => { - e.component(l, Rl[l]); + Object.keys(Qs).forEach((s) => { + e.component(s, Qs[s]); }); - function t(l) { - const i = Object.keys(l).filter((r) => l[r]).map((r) => `${encodeURIComponent(r)}=${encodeURIComponent(l[r])}`).join("&"); - return i ? "?" + i : "./"; + function t(s) { + const a = Object.keys(s).filter((r) => s[r]).map((r) => `${encodeURIComponent(r)}=${encodeURIComponent(s[r])}`).join("&"); + return a ? "?" + a : "./"; } - e.directive("href", function(l, n) { - l.href = t(n.value), l.onclick = (i) => { - i.preventDefault(), history.pushState(n.value, "", t(n.value)); + e.directive("href", function(s, n) { + s.href = t(n.value), s.onclick = (a) => { + a.preventDefault(), history.pushState(n.value, "", t(n.value)); }; }); }, component(e, t) { - return e ? t ? ie.components[e] = t : ie.components[e] || Rl[e] || null : null; + return e ? t ? G.components[e] = t : G.components[e] || Qs[e] || null : null; } }; export { - bh as css, - wh as default, - kn as useAuth, - Tl as useClient, - St as useConfig, - ph as useFiles, - yh as useFormatters, - ot as useMetadata, - ns as useUtils + fh as css, + vh as default, + Tl as useAuth, + Ds as useClient, + It as useConfig, + La as useFiles, + ch as useFormatters, + lt as useMetadata, + bn as useUtils }; diff --git a/lib/mjs/vue.min.mjs b/lib/mjs/vue.min.mjs index 5239600..284b786 100644 --- a/lib/mjs/vue.min.mjs +++ b/lib/mjs/vue.min.mjs @@ -1 +1,9 @@ -function e(e,t){const n=Object.create(null),o=e.split(",");for(let r=0;r!!n[e.toLowerCase()]:e=>!!n[e]}const t={},n=[],o=()=>{},r=()=>!1,s=/^on[^a-z]/,i=e=>s.test(e),l=e=>e.startsWith("onUpdate:"),c=Object.assign,a=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,p=(e,t)=>u.call(e,t),f=Array.isArray,d=e=>"[object Map]"===x(e),h=e=>"[object Set]"===x(e),m=e=>"[object Date]"===x(e),g=e=>"function"==typeof e,v=e=>"string"==typeof e,y=e=>"symbol"==typeof e,_=e=>null!==e&&"object"==typeof e,b=e=>_(e)&&g(e.then)&&g(e.catch),S=Object.prototype.toString,x=e=>S.call(e),C=e=>"[object Object]"===x(e),k=e=>v(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,w=e(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),T=e("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),E=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},N=/-(\w)/g,O=E((e=>e.replace(N,((e,t)=>t?t.toUpperCase():"")))),$=/\B([A-Z])/g,P=E((e=>e.replace($,"-$1").toLowerCase())),A=E((e=>e.charAt(0).toUpperCase()+e.slice(1))),F=E((e=>e?`on${A(e)}`:"")),R=(e,t)=>!Object.is(e,t),M=(e,t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},I=e=>{const t=parseFloat(e);return isNaN(t)?e:t},B=e=>{const t=v(e)?Number(e):NaN;return isNaN(t)?e:t};let L;const j=e("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console");function U(e){if(f(e)){const t={};for(let n=0;n{if(e){const n=e.split(H);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function K(e){let t="";if(v(e))t=e;else if(f(e))for(let n=0;nX(e,t)))}const te=e=>v(e)?e:null==e?"":f(e)||_(e)&&(e.toString===S||!g(e.toString))?JSON.stringify(e,ne,2):String(e),ne=(e,t)=>t&&t.__v_isRef?ne(e,t.value):d(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n])=>(e[`${t} =>`]=n,e)),{})}:h(t)?{[`Set(${t.size})`]:[...t.values()]}:!_(t)||f(t)||C(t)?t:String(t);let oe;class re{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=oe,!e&&oe&&(this.index=(oe.scopes||(oe.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const t=oe;try{return oe=this,e()}finally{oe=t}}}on(){oe=this}off(){oe=this.parent}stop(e){if(this._active){let t,n;for(t=0,n=this.effects.length;t{const t=new Set(e);return t.w=0,t.n=0,t},ue=e=>(e.w&he)>0,pe=e=>(e.n&he)>0,fe=new WeakMap;let de=0,he=1;let me;const ge=Symbol(""),ve=Symbol("");class ye{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,ie(this,n)}run(){if(!this.active)return this.fn();let e=me,t=xe;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=me,me=this,xe=!0,he=1<<++de,de<=30?(({deps:e})=>{if(e.length)for(let t=0;t{const{deps:t}=e;if(t.length){let n=0;for(let o=0;o{("length"===n||n>=e)&&l.push(t)}))}else switch(void 0!==n&&l.push(i.get(n)),t){case"add":f(e)?k(n)&&l.push(i.get("length")):(l.push(i.get(ge)),d(e)&&l.push(i.get(ve)));break;case"delete":f(e)||(l.push(i.get(ge)),d(e)&&l.push(i.get(ve)));break;case"set":d(e)&&l.push(i.get(ge))}if(1===l.length)l[0]&&Oe(l[0]);else{const e=[];for(const t of l)t&&e.push(...t);Oe(ae(e))}}function Oe(e,t){const n=f(e)?e:[...e];for(const o of n)o.computed&&$e(o);for(const o of n)o.computed||$e(o)}function $e(e,t){(e!==me||e.allowRecurse)&&(e.scheduler?e.scheduler():e.run())}const Pe=e("__proto__,__v_isRef,__isVue"),Ae=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(y)),Fe=je(),Re=je(!1,!0),Me=je(!0),Ve=je(!0,!0),Ie=Be();function Be(){const e={};return["includes","indexOf","lastIndexOf"].forEach((t=>{e[t]=function(...e){const n=Nt(this);for(let t=0,r=this.length;t{e[t]=function(...e){ke();const n=Nt(this)[t].apply(this,e);return we(),n}})),e}function Le(e){const t=Nt(this);return Te(t,0,e),t.hasOwnProperty(e)}function je(e=!1,t=!1){return function(n,o,r){if("__v_isReactive"===o)return!e;if("__v_isReadonly"===o)return e;if("__v_isShallow"===o)return t;if("__v_raw"===o&&r===(e?t?vt:gt:t?mt:ht).get(n))return n;const s=f(n);if(!e){if(s&&p(Ie,o))return Reflect.get(Ie,o,r);if("hasOwnProperty"===o)return Le}const i=Reflect.get(n,o,r);return(y(o)?Ae.has(o):Pe(o))?i:(e||Te(n,0,o),t?i:Rt(i)?s&&k(o)?i:i.value:_(i)?e?St(i):_t(i):i)}}function Ue(e=!1){return function(t,n,o,r){let s=t[n];if(wt(s)&&Rt(s)&&!Rt(o))return!1;if(!e&&(Tt(o)||wt(o)||(s=Nt(s),o=Nt(o)),!f(t)&&Rt(s)&&!Rt(o)))return s.value=o,!0;const i=f(t)&&k(n)?Number(n)!0,deleteProperty:(e,t)=>!0},We=c({},De,{get:Re,set:Ue(!0)}),ze=c({},He,{get:Ve}),Ke=e=>e,Ge=e=>Reflect.getPrototypeOf(e);function qe(e,t,n=!1,o=!1){const r=Nt(e=e.__v_raw),s=Nt(t);n||(t!==s&&Te(r,0,t),Te(r,0,s));const{has:i}=Ge(r),l=o?Ke:n?Pt:$t;return i.call(r,t)?l(e.get(t)):i.call(r,s)?l(e.get(s)):void(e!==r&&e.get(t))}function Je(e,t=!1){const n=this.__v_raw,o=Nt(n),r=Nt(e);return t||(e!==r&&Te(o,0,e),Te(o,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function Ze(e,t=!1){return e=e.__v_raw,!t&&Te(Nt(e),0,ge),Reflect.get(e,"size",e)}function Ye(e){e=Nt(e);const t=Nt(this);return Ge(t).has.call(t,e)||(t.add(e),Ne(t,"add",e,e)),this}function Qe(e,t){t=Nt(t);const n=Nt(this),{has:o,get:r}=Ge(n);let s=o.call(n,e);s||(e=Nt(e),s=o.call(n,e));const i=r.call(n,e);return n.set(e,t),s?R(t,i)&&Ne(n,"set",e,t):Ne(n,"add",e,t),this}function Xe(e){const t=Nt(this),{has:n,get:o}=Ge(t);let r=n.call(t,e);r||(e=Nt(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&Ne(t,"delete",e,void 0),s}function et(){const e=Nt(this),t=0!==e.size,n=e.clear();return t&&Ne(e,"clear",void 0,void 0),n}function tt(e,t){return function(n,o){const r=this,s=r.__v_raw,i=Nt(s),l=t?Ke:e?Pt:$t;return!e&&Te(i,0,ge),s.forEach(((e,t)=>n.call(o,l(e),l(t),r)))}}function nt(e,t,n){return function(...o){const r=this.__v_raw,s=Nt(r),i=d(s),l="entries"===e||e===Symbol.iterator&&i,c="keys"===e&&i,a=r[e](...o),u=n?Ke:t?Pt:$t;return!t&&Te(s,0,c?ve:ge),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:l?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function ot(e){return function(...t){return"delete"!==e&&this}}function rt(){const e={get(e){return qe(this,e)},get size(){return Ze(this)},has:Je,add:Ye,set:Qe,delete:Xe,clear:et,forEach:tt(!1,!1)},t={get(e){return qe(this,e,!1,!0)},get size(){return Ze(this)},has:Je,add:Ye,set:Qe,delete:Xe,clear:et,forEach:tt(!1,!0)},n={get(e){return qe(this,e,!0)},get size(){return Ze(this,!0)},has(e){return Je.call(this,e,!0)},add:ot("add"),set:ot("set"),delete:ot("delete"),clear:ot("clear"),forEach:tt(!0,!1)},o={get(e){return qe(this,e,!0,!0)},get size(){return Ze(this,!0)},has(e){return Je.call(this,e,!0)},add:ot("add"),set:ot("set"),delete:ot("delete"),clear:ot("clear"),forEach:tt(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=nt(r,!1,!1),n[r]=nt(r,!0,!1),t[r]=nt(r,!1,!0),o[r]=nt(r,!0,!0)})),[e,n,t,o]}const[st,it,lt,ct]=rt();function at(e,t){const n=t?e?ct:lt:e?it:st;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(p(n,o)&&o in t?n:t,o,r)}const ut={get:at(!1,!1)},pt={get:at(!1,!0)},ft={get:at(!0,!1)},dt={get:at(!0,!0)},ht=new WeakMap,mt=new WeakMap,gt=new WeakMap,vt=new WeakMap;function yt(e){return e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}((e=>x(e).slice(8,-1))(e))}function _t(e){return wt(e)?e:Ct(e,!1,De,ut,ht)}function bt(e){return Ct(e,!1,We,pt,mt)}function St(e){return Ct(e,!0,He,ft,gt)}function xt(e){return Ct(e,!0,ze,dt,vt)}function Ct(e,t,n,o,r){if(!_(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const i=yt(e);if(0===i)return e;const l=new Proxy(e,2===i?o:n);return r.set(e,l),l}function kt(e){return wt(e)?kt(e.__v_raw):!(!e||!e.__v_isReactive)}function wt(e){return!(!e||!e.__v_isReadonly)}function Tt(e){return!(!e||!e.__v_isShallow)}function Et(e){return kt(e)||wt(e)}function Nt(e){const t=e&&e.__v_raw;return t?Nt(t):e}function Ot(e){return V(e,"__v_skip",!0),e}const $t=e=>_(e)?_t(e):e,Pt=e=>_(e)?St(e):e;function At(e){xe&&me&&Ee((e=Nt(e)).dep||(e.dep=ae()))}function Ft(e,t){const n=(e=Nt(e)).dep;n&&Oe(n)}function Rt(e){return!(!e||!0!==e.__v_isRef)}function Mt(e){return It(e,!1)}function Vt(e){return It(e,!0)}function It(e,t){return Rt(e)?e:new Bt(e,t)}class Bt{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Nt(e),this._value=t?e:$t(e)}get value(){return At(this),this._value}set value(e){const t=this.__v_isShallow||Tt(e)||wt(e);e=t?e:Nt(e),R(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:$t(e),Ft(this))}}function Lt(e){Ft(e)}function jt(e){return Rt(e)?e.value:e}function Ut(e){return g(e)?e():jt(e)}const Dt={get:(e,t,n)=>jt(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Rt(r)&&!Rt(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function Ht(e){return kt(e)?e:new Proxy(e,Dt)}class Wt{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e((()=>At(this)),(()=>Ft(this)));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function zt(e){return new Wt(e)}function Kt(e){const t=f(e)?new Array(e.length):{};for(const n in e)t[n]=Zt(e,n);return t}class Gt{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return e=Nt(this._object),t=this._key,null==(n=fe.get(e))?void 0:n.get(t);var e,t,n}}class qt{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Jt(e,t,n){return Rt(e)?e:g(e)?new qt(e):_(e)&&arguments.length>1?Zt(e,t,n):Mt(e)}function Zt(e,t,n){const o=e[t];return Rt(o)?o:new Gt(e,t,n)}class Yt{constructor(e,t,n,o){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new ye(e,(()=>{this._dirty||(this._dirty=!0,Ft(this))})),this.effect.computed=this,this.effect.active=this._cacheable=!o,this.__v_isReadonly=n}get value(){const e=Nt(this);return At(e),!e._dirty&&e._cacheable||(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function Qt(e,...t){}function Xt(e,t){}function en(e,t,n,o){let r;try{r=o?e(...o):e()}catch(s){nn(s,t,n)}return r}function tn(e,t,n,o){if(g(e)){const r=en(e,t,n,o);return r&&b(r)&&r.catch((e=>{nn(e,t,n)})),r}const r=[];for(let s=0;s>>1;_n(sn[o])_n(e)-_n(t))),un=0;unnull==e.id?1/0:e.id,bn=(e,t)=>{const n=_n(e)-_n(t);if(0===n){if(e.pre&&!t.pre)return-1;if(t.pre&&!e.pre)return 1}return n};function Sn(e){rn=!1,on=!0,sn.sort(bn);try{for(ln=0;lnxn.emit(e,...t))),Cn=[];else if("undefined"!=typeof window&&window.HTMLElement&&!(null==(o=null==(n=window.navigator)?void 0:n.userAgent)?void 0:o.includes("jsdom"))){(t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push((e=>{kn(e,t)})),setTimeout((()=>{xn||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Cn=[])}),3e3)}else Cn=[]}function wn(e,n,...o){if(e.isUnmounted)return;const r=e.vnode.props||t;let s=o;const i=n.startsWith("update:"),l=i&&n.slice(7);if(l&&l in r){const e=`${"modelValue"===l?"model":l}Modifiers`,{number:n,trim:i}=r[e]||t;i&&(s=o.map((e=>v(e)?e.trim():e))),n&&(s=o.map(I))}let c,a=r[c=F(n)]||r[c=F(O(n))];!a&&i&&(a=r[c=F(P(n))]),a&&tn(a,e,6,s);const u=r[c+"Once"];if(u){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,tn(u,e,6,s)}}function Tn(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let i={},l=!1;if(!g(e)){const o=e=>{const n=Tn(e,t,!0);n&&(l=!0,c(i,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||l?(f(s)?s.forEach((e=>i[e]=null)):c(i,s),_(e)&&o.set(e,i),i):(_(e)&&o.set(e,null),null)}function En(e,t){return!(!e||!i(t))&&(t=t.slice(2).replace(/Once$/,""),p(e,t[0].toLowerCase()+t.slice(1))||p(e,P(t))||p(e,t))}let Nn=null,On=null;function $n(e){const t=Nn;return Nn=e,On=e&&e.type.__scopeId||null,t}function Pn(e){On=e}function An(){On=null}const Fn=e=>Rn;function Rn(e,t=Nn,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&xs(-1);const r=$n(t);let s;try{s=e(...n)}finally{$n(r),o._d&&xs(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function Mn(e){const{type:t,vnode:n,proxy:o,withProxy:r,props:s,propsOptions:[i],slots:c,attrs:a,emit:u,render:p,renderCache:f,data:d,setupState:h,ctx:m,inheritAttrs:g}=e;let v,y;const _=$n(e);try{if(4&n.shapeFlag){const e=r||o;v=Ls(p.call(e,e,f,s,h,d,m)),y=a}else{const e=t;0,v=Ls(e(s,e.length>1?{attrs:a,slots:c,emit:u}:null)),y=t.props?a:Vn(a)}}catch(S){vs.length=0,nn(S,e,1),v=Fs(ms)}let b=v;if(y&&!1!==g){const e=Object.keys(y),{shapeFlag:t}=b;e.length&&7&t&&(i&&e.some(l)&&(y=In(y,i)),b=Ms(b,y))}return n.dirs&&(b=Ms(b),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&(b.transition=n.transition),v=b,$n(_),v}const Vn=e=>{let t;for(const n in e)("class"===n||"style"===n||i(n))&&((t||(t={}))[n]=e[n]);return t},In=(e,t)=>{const n={};for(const o in e)l(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function Bn(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;re.__isSuspense,Un={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,i,l,c,a){null==e?function(e,t,n,o,r,s,i,l,c){const{p:a,o:{createElement:u}}=c,p=u("div"),f=e.suspense=Hn(e,r,o,t,p,n,s,i,l,c);a(null,f.pendingBranch=e.ssContent,p,null,o,f,s,i),f.deps>0?(Dn(e,"onPending"),Dn(e,"onFallback"),a(null,e.ssFallback,t,n,o,null,s,i),Kn(f,e.ssFallback)):f.resolve(!1,!0)}(t,n,o,r,s,i,l,c,a):function(e,t,n,o,r,s,i,l,{p:c,um:a,o:{createElement:u}}){const p=t.suspense=e.suspense;p.vnode=t,t.el=e.el;const f=t.ssContent,d=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:g,isHydrating:v}=p;if(m)p.pendingBranch=f,Es(f,m)?(c(m,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0?p.resolve():g&&(c(h,d,n,o,r,null,s,i,l),Kn(p,d))):(p.pendingId++,v?(p.isHydrating=!1,p.activeBranch=m):a(m,r,p),p.deps=0,p.effects.length=0,p.hiddenContainer=u("div"),g?(c(null,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0?p.resolve():(c(h,d,n,o,r,null,s,i,l),Kn(p,d))):h&&Es(f,h)?(c(h,f,n,o,r,p,s,i,l),p.resolve(!0)):(c(null,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0&&p.resolve()));else if(h&&Es(f,h))c(h,f,n,o,r,p,s,i,l),Kn(p,f);else if(Dn(t,"onPending"),p.pendingBranch=f,p.pendingId++,c(null,f,p.hiddenContainer,null,r,p,s,i,l),p.deps<=0)p.resolve();else{const{timeout:e,pendingId:t}=p;e>0?setTimeout((()=>{p.pendingId===t&&p.fallback(d)}),e):0===e&&p.fallback(d)}}(e,t,n,o,r,i,l,c,a)},hydrate:function(e,t,n,o,r,s,i,l,c){const a=t.suspense=Hn(t,o,n,e.parentNode,document.createElement("div"),null,r,s,i,l,!0),u=c(e,a.pendingBranch=t.ssContent,n,a,s,i);0===a.deps&&a.resolve(!1,!0);return u},create:Hn,normalize:function(e){const{shapeFlag:t,children:n}=e,o=32&t;e.ssContent=Wn(o?n.default:n),e.ssFallback=o?Wn(n.fallback):Fs(ms)}};function Dn(e,t){const n=e.props&&e.props[t];g(n)&&n()}function Hn(e,t,n,o,r,s,i,l,c,a,u=!1){const{p:p,m:f,um:d,n:h,o:{parentNode:m,remove:g}}=a;let v;const y=function(e){var t;return null!=(null==(t=e.props)?void 0:t.suspensible)&&!1!==e.props.suspensible}(e);y&&(null==t?void 0:t.pendingBranch)&&(v=t.pendingId,t.deps++);const _=e.props?B(e.props.timeout):void 0,b={vnode:e,parent:t,parentComponent:n,isSVG:i,container:o,hiddenContainer:r,anchor:s,deps:0,pendingId:0,timeout:"number"==typeof _?_:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){const{vnode:o,activeBranch:r,pendingBranch:s,pendingId:i,effects:l,parentComponent:c,container:a}=b;if(b.isHydrating)b.isHydrating=!1;else if(!e){const e=r&&s.transition&&"out-in"===s.transition.mode;e&&(r.transition.afterLeave=()=>{i===b.pendingId&&f(s,a,t,0)});let{anchor:t}=b;r&&(t=h(r),d(r,c,b,!0)),e||f(s,a,t,0)}Kn(b,s),b.pendingBranch=null,b.isInFallback=!1;let u=b.parent,p=!1;for(;u;){if(u.pendingBranch){u.effects.push(...l),p=!0;break}u=u.parent}p||gn(l),b.effects=[],y&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),Dn(o,"onResolve")},fallback(e){if(!b.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:o,container:r,isSVG:s}=b;Dn(t,"onFallback");const i=h(n),a=()=>{b.isInFallback&&(p(null,e,r,i,o,null,s,l,c),Kn(b,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=a),b.isInFallback=!0,d(n,o,null,!0),u||a()},move(e,t,n){b.activeBranch&&f(b.activeBranch,e,t,n),b.container=e},next:()=>b.activeBranch&&h(b.activeBranch),registerDep(e,t){const n=!!b.pendingBranch;n&&b.deps++;const o=e.vnode.el;e.asyncDep.catch((t=>{nn(t,e,0)})).then((r=>{if(e.isUnmounted||b.isUnmounted||b.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:s}=e;ti(e,r,!1),o&&(s.el=o);const l=!o&&e.subTree.el;t(e,s,m(o||e.subTree.el),o?null:h(e.subTree),b,i,c),l&&g(l),Ln(e,s.el),n&&0==--b.deps&&b.resolve()}))},unmount(e,t){b.isUnmounted=!0,b.activeBranch&&d(b.activeBranch,n,e,t),b.pendingBranch&&d(b.pendingBranch,n,e,t)}};return b}function Wn(e){let t;if(g(e)){const n=Ss&&e._c;n&&(e._d=!1,_s()),e=e(),n&&(e._d=!0,t=ys,bs())}if(f(e)){const t=function(e){let t;for(let n=0;nt!==e))),e}function zn(e,t){t&&t.pendingBranch?f(e)?t.effects.push(...e):t.effects.push(e):gn(e)}function Kn(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e,r=n.el=t.el;o&&o.subTree===n&&(o.vnode.el=r,Ln(o,r))}function Gn(e,t){return Qn(e,null,t)}function qn(e,t){return Qn(e,null,{flush:"post"})}function Jn(e,t){return Qn(e,null,{flush:"sync"})}const Zn={};function Yn(e,t,n){return Qn(e,t,n)}function Qn(e,n,{immediate:r,deep:s,flush:i}=t){var l;const c=le()===(null==(l=Ks)?void 0:l.scope)?Ks:null;let u,p,d=!1,h=!1;if(Rt(e)?(u=()=>e.value,d=Tt(e)):kt(e)?(u=()=>e,s=!0):f(e)?(h=!0,d=e.some((e=>kt(e)||Tt(e))),u=()=>e.map((e=>Rt(e)?e.value:kt(e)?to(e):g(e)?en(e,c,2):void 0))):u=g(e)?n?()=>en(e,c,2):()=>{if(!c||!c.isUnmounted)return p&&p(),tn(e,c,3,[m])}:o,n&&s){const e=u;u=()=>to(e())}let m=e=>{p=b.onStop=()=>{en(e,c,4)}},v=h?new Array(e.length).fill(Zn):Zn;const y=()=>{if(b.active)if(n){const e=b.run();(s||d||(h?e.some(((e,t)=>R(e,v[t]))):R(e,v)))&&(p&&p(),tn(n,c,3,[e,v===Zn?void 0:h&&v[0]===Zn?[]:v,m]),v=e)}else b.run()};let _;y.allowRecurse=!!n,"sync"===i?_=y:"post"===i?_=()=>ts(y,c&&c.suspense):(y.pre=!0,c&&(y.id=c.uid),_=()=>hn(y));const b=new ye(u,_);n?r?y():v=b.run():"post"===i?ts(b.run.bind(b),c&&c.suspense):b.run();return()=>{b.stop(),c&&c.scope&&a(c.scope.effects,b)}}function Xn(e,t,n){const o=this.proxy,r=v(e)?e.includes(".")?eo(o,e):()=>o[e]:e.bind(o,o);let s;g(t)?s=t:(s=t.handler,n=t);const i=Ks;Js(this);const l=Qn(r,s.bind(o),n);return i?Js(i):Zs(),l}function eo(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e{to(e,t)}));else if(C(e))for(const n in e)to(e[n],t);return e}function no(e,n){const o=Nn;if(null===o)return e;const r=ii(o)||o.proxy,s=e.dirs||(e.dirs=[]);for(let i=0;i{e.isMounted=!0})),Ro((()=>{e.isUnmounting=!0})),e}const so=[Function,Array],io={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:so,onEnter:so,onAfterEnter:so,onEnterCancelled:so,onBeforeLeave:so,onLeave:so,onAfterLeave:so,onLeaveCancelled:so,onBeforeAppear:so,onAppear:so,onAfterAppear:so,onAppearCancelled:so},lo={name:"BaseTransition",props:io,setup(e,{slots:t}){const n=Gs(),o=ro();let r;return()=>{const s=t.default&&ho(t.default(),!0);if(!s||!s.length)return;let i=s[0];if(s.length>1)for(const e of s)if(e.type!==ms){i=e;break}const l=Nt(e),{mode:c}=l;if(o.isLeaving)return uo(i);const a=po(i);if(!a)return uo(i);const u=ao(a,l,o,n);fo(a,u);const p=n.subTree,f=p&&po(p);let d=!1;const{getTransitionKey:h}=a.type;if(h){const e=h();void 0===r?r=e:e!==r&&(r=e,d=!0)}if(f&&f.type!==ms&&(!Es(a,f)||d)){const e=ao(f,l,o,n);if(fo(f,e),"out-in"===c)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,!1!==n.update.active&&n.update()},uo(i);"in-out"===c&&a.type!==ms&&(e.delayLeave=(e,t,n)=>{co(o,f)[String(f.key)]=f,e._leaveCb=()=>{t(),e._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=n})}return i}}};function co(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function ao(e,t,n,o){const{appear:r,mode:s,persisted:i=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:a,onEnterCancelled:u,onBeforeLeave:p,onLeave:d,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:g,onAppear:v,onAfterAppear:y,onAppearCancelled:_}=t,b=String(e.key),S=co(n,e),x=(e,t)=>{e&&tn(e,o,9,t)},C=(e,t)=>{const n=t[1];x(e,t),f(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},k={mode:s,persisted:i,beforeEnter(t){let o=l;if(!n.isMounted){if(!r)return;o=g||l}t._leaveCb&&t._leaveCb(!0);const s=S[b];s&&Es(e,s)&&s.el._leaveCb&&s.el._leaveCb(),x(o,[t])},enter(e){let t=c,o=a,s=u;if(!n.isMounted){if(!r)return;t=v||c,o=y||a,s=_||u}let i=!1;const l=e._enterCb=t=>{i||(i=!0,x(t?s:o,[e]),k.delayedLeave&&k.delayedLeave(),e._enterCb=void 0)};t?C(t,[e,l]):l()},leave(t,o){const r=String(e.key);if(t._enterCb&&t._enterCb(!0),n.isUnmounting)return o();x(p,[t]);let s=!1;const i=t._leaveCb=n=>{s||(s=!0,o(),x(n?m:h,[t]),t._leaveCb=void 0,S[r]===e&&delete S[r])};S[r]=e,d?C(d,[t,i]):i()},clone:e=>ao(e,t,n,o)};return k}function uo(e){if(_o(e))return(e=Ms(e)).children=null,e}function po(e){return _o(e)?e.children?e.children[0]:void 0:e}function fo(e,t){6&e.shapeFlag&&e.component?fo(e.component.subTree,t):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ho(e,t=!1,n){let o=[],r=0;for(let s=0;s1)for(let s=0;sc({name:e.name},t,{setup:e}))():e}const go=e=>!!e.type.__asyncLoader;function vo(e){g(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,timeout:s,suspensible:i=!0,onError:l}=e;let c,a=null,u=0;const p=()=>{let e;return a||(e=a=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),l)return new Promise(((t,n)=>{l(e,(()=>t((u++,a=null,p()))),(()=>n(e)),u+1)}));throw e})).then((t=>e!==a&&a?a:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),c=t,t))))};return mo({name:"AsyncComponentWrapper",__asyncLoader:p,get __asyncResolved(){return c},setup(){const e=Ks;if(c)return()=>yo(c,e);const t=t=>{a=null,nn(t,e,13,!o)};if(i&&e.suspense)return p().then((t=>()=>yo(t,e))).catch((e=>(t(e),()=>o?Fs(o,{error:e}):null)));const l=Mt(!1),u=Mt(),f=Mt(!!r);return r&&setTimeout((()=>{f.value=!1}),r),null!=s&&setTimeout((()=>{if(!l.value&&!u.value){const e=new Error(`Async component timed out after ${s}ms.`);t(e),u.value=e}}),s),p().then((()=>{l.value=!0,e.parent&&_o(e.parent.vnode)&&hn(e.parent.update)})).catch((e=>{t(e),u.value=e})),()=>l.value&&c?yo(c,e):u.value&&o?Fs(o,{error:u.value}):n&&!f.value?Fs(n):void 0}})}function yo(e,t){const{ref:n,props:o,children:r,ce:s}=t.vnode,i=Fs(e,o,r);return i.ref=n,i.ce=s,delete t.vnode.ce,i}const _o=e=>e.type.__isKeepAlive,bo={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Gs(),o=n.ctx,r=new Map,s=new Set;let i=null;const l=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:p}}}=o,f=p("div");function d(e){To(e),u(e,n,l,!0)}function h(e){r.forEach(((t,n)=>{const o=li(t.type);!o||e&&e(o)||m(n)}))}function m(e){const t=r.get(e);i&&Es(t,i)?i&&To(i):d(t),r.delete(e),s.delete(e)}o.activate=(e,t,n,o,r)=>{const s=e.component;a(e,t,n,0,l),c(s.vnode,e,t,n,s,l,o,e.slotScopeIds,r),ts((()=>{s.isDeactivated=!1,s.a&&M(s.a);const t=e.props&&e.props.onVnodeMounted;t&&Hs(t,s.parent,e)}),l)},o.deactivate=e=>{const t=e.component;a(e,f,null,1,l),ts((()=>{t.da&&M(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&Hs(n,t.parent,e),t.isDeactivated=!0}),l)},Yn((()=>[e.include,e.exclude]),(([e,t])=>{e&&h((t=>So(e,t))),t&&h((e=>!So(t,e)))}),{flush:"post",deep:!0});let g=null;const v=()=>{null!=g&&r.set(g,Eo(n.subTree))};return Po(v),Fo(v),Ro((()=>{r.forEach((e=>{const{subTree:t,suspense:o}=n,r=Eo(t);if(e.type!==r.type||e.key!==r.key)d(e);else{To(r);const e=r.component.da;e&&ts(e,o)}}))})),()=>{if(g=null,!t.default)return null;const n=t.default(),o=n[0];if(n.length>1)return i=null,n;if(!(Ts(o)&&(4&o.shapeFlag||128&o.shapeFlag)))return i=null,o;let l=Eo(o);const c=l.type,a=li(go(l)?l.type.__asyncResolved||{}:c),{include:u,exclude:p,max:f}=e;if(u&&(!a||!So(u,a))||p&&a&&So(p,a))return i=l,o;const d=null==l.key?c:l.key,h=r.get(d);return l.el&&(l=Ms(l),128&o.shapeFlag&&(o.ssContent=l)),g=d,h?(l.el=h.el,l.component=h.component,l.transition&&fo(l,l.transition),l.shapeFlag|=512,s.delete(d),s.add(d)):(s.add(d),f&&s.size>parseInt(f,10)&&m(s.values().next().value)),l.shapeFlag|=256,i=l,jn(o.type)?o:l}}};function So(e,t){return f(e)?e.some((e=>So(e,t))):v(e)?e.split(",").includes(t):"[object RegExp]"===x(e)&&e.test(t)}function xo(e,t){ko(e,"a",t)}function Co(e,t){ko(e,"da",t)}function ko(e,t,n=Ks){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(No(t,o,n),n){let e=n.parent;for(;e&&e.parent;)_o(e.parent.vnode)&&wo(o,t,n,e),e=e.parent}}function wo(e,t,n,o){const r=No(t,e,o,!0);Mo((()=>{a(o[t],r)}),n)}function To(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Eo(e){return 128&e.shapeFlag?e.ssContent:e}function No(e,t,n=Ks,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;ke(),Js(n);const r=tn(t,n,e,o);return Zs(),we(),r});return o?r.unshift(s):r.push(s),s}}const Oo=e=>(t,n=Ks)=>(!ei||"sp"===e)&&No(e,((...e)=>t(...e)),n),$o=Oo("bm"),Po=Oo("m"),Ao=Oo("bu"),Fo=Oo("u"),Ro=Oo("bum"),Mo=Oo("um"),Vo=Oo("sp"),Io=Oo("rtg"),Bo=Oo("rtc");function Lo(e,t=Ks){No("ec",e,t)}const jo="components";function Uo(e,t){return zo(jo,e,!0,t)||e}const Do=Symbol.for("v-ndc");function Ho(e){return v(e)?zo(jo,e,!1)||e:e||Do}function Wo(e){return zo("directives",e)}function zo(e,t,n=!0,o=!1){const r=Nn||Ks;if(r){const n=r.type;if(e===jo){const e=li(n,!1);if(e&&(e===t||e===O(t)||e===A(O(t))))return n}const s=Ko(r[e]||n[e],t)||Ko(r.appContext[e],t);return!s&&o?n:s}}function Ko(e,t){return e&&(e[t]||e[O(t)]||e[A(O(t))])}function Go(e,t,n,o){let r;const s=n&&n[o];if(f(e)||v(e)){r=new Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let o=0,i=n.length;o{const t=o.fn(...e);return t&&(t.key=o.key),t}:o.fn)}return e}function Jo(e,t,n={},o,r){if(Nn.isCE||Nn.parent&&go(Nn.parent)&&Nn.parent.isCE)return"default"!==t&&(n.name=t),Fs("slot",n,o&&o());let s=e[t];s&&s._c&&(s._d=!1),_s();const i=s&&Zo(s(n)),l=ws(ds,{key:n.key||i&&i.key||`_${t}`},i||(o?o():[]),i&&1===e._?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l}function Zo(e){return e.some((e=>!Ts(e)||e.type!==ms&&!(e.type===ds&&!Zo(e.children))))?e:null}function Yo(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:F(o)]=e[o];return n}const Qo=e=>e?Ys(e)?ii(e)||e.proxy:Qo(e.parent):null,Xo=c(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Qo(e.parent),$root:e=>Qo(e.root),$emit:e=>e.emit,$options:e=>Cr(e),$forceUpdate:e=>e.f||(e.f=()=>hn(e.update)),$nextTick:e=>e.n||(e.n=dn.bind(e.proxy)),$watch:e=>Xn.bind(e)}),er=(e,n)=>e!==t&&!e.__isScriptSetup&&p(e,n),tr={get({_:e},n){const{ctx:o,setupState:r,data:s,props:i,accessCache:l,type:c,appContext:a}=e;let u;if("$"!==n[0]){const c=l[n];if(void 0!==c)switch(c){case 1:return r[n];case 2:return s[n];case 4:return o[n];case 3:return i[n]}else{if(er(r,n))return l[n]=1,r[n];if(s!==t&&p(s,n))return l[n]=2,s[n];if((u=e.propsOptions[0])&&p(u,n))return l[n]=3,i[n];if(o!==t&&p(o,n))return l[n]=4,o[n];_r&&(l[n]=0)}}const f=Xo[n];let d,h;return f?("$attrs"===n&&Te(e,0,n),f(e)):(d=c.__cssModules)&&(d=d[n])?d:o!==t&&p(o,n)?(l[n]=4,o[n]):(h=a.config.globalProperties,p(h,n)?h[n]:void 0)},set({_:e},n,o){const{data:r,setupState:s,ctx:i}=e;return er(s,n)?(s[n]=o,!0):r!==t&&p(r,n)?(r[n]=o,!0):!p(e.props,n)&&(("$"!==n[0]||!(n.slice(1)in e))&&(i[n]=o,!0))},has({_:{data:e,setupState:n,accessCache:o,ctx:r,appContext:s,propsOptions:i}},l){let c;return!!o[l]||e!==t&&p(e,l)||er(n,l)||(c=i[0])&&p(c,l)||p(r,l)||p(Xo,l)||p(s.config.globalProperties,l)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:p(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},nr=c({},tr,{get(e,t){if(t!==Symbol.unscopables)return tr.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!j(t)});function or(){return null}function rr(){return null}function sr(e){}function ir(e){}function lr(){return null}function cr(){}function ar(e,t){return null}function ur(){return dr().slots}function pr(){return dr().attrs}function fr(e,t,n){const o=Gs();if(n&&n.local){const n=Mt(e[t]);return Yn((()=>e[t]),(e=>n.value=e)),Yn(n,(n=>{n!==e[t]&&o.emit(`update:${t}`,n)})),n}return{__v_isRef:!0,get value(){return e[t]},set value(e){o.emit(`update:${t}`,e)}}}function dr(){const e=Gs();return e.setupContext||(e.setupContext=si(e))}function hr(e){return f(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}function mr(e,t){const n=hr(e);for(const o in t){if(o.startsWith("__skip"))continue;let e=n[o];e?f(e)||g(e)?e=n[o]={type:e,default:t[o]}:e.default=t[o]:null===e&&(e=n[o]={default:t[o]}),e&&t[`__skip_${o}`]&&(e.skipFactory=!0)}return n}function gr(e,t){return e&&t?f(e)&&f(t)?e.concat(t):c({},hr(e),hr(t)):e||t}function vr(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function yr(e){const t=Gs();let n=e();return Zs(),b(n)&&(n=n.catch((e=>{throw Js(t),e}))),[n,()=>Js(t)]}let _r=!0;function br(e){const t=Cr(e),n=e.proxy,r=e.ctx;_r=!1,t.beforeCreate&&Sr(t.beforeCreate,e,"bc");const{data:s,computed:i,methods:l,watch:c,provide:a,inject:u,created:p,beforeMount:d,mounted:h,beforeUpdate:m,updated:v,activated:y,deactivated:b,beforeUnmount:S,unmounted:x,render:C,renderTracked:k,renderTriggered:w,errorCaptured:T,serverPrefetch:E,expose:N,inheritAttrs:O,components:$,directives:P}=t;if(u&&function(e,t,n=o){f(e)&&(e=Er(e));for(const o in e){const n=e[o];let r;r=_(n)?"default"in n?Vr(n.from||o,n.default,!0):Vr(n.from||o):Vr(n),Rt(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[o]=r}}(u,r,null),l)for(const o in l){const e=l[o];g(e)&&(r[o]=e.bind(n))}if(s){const t=s.call(n,n);_(t)&&(e.data=_t(t))}if(_r=!0,i)for(const f in i){const e=i[f],t=g(e)?e.bind(n,n):g(e.get)?e.get.bind(n,n):o,s=!g(e)&&g(e.set)?e.set.bind(n):o,l=ci({get:t,set:s});Object.defineProperty(r,f,{enumerable:!0,configurable:!0,get:()=>l.value,set:e=>l.value=e})}if(c)for(const o in c)xr(c[o],r,n,o);if(a){const e=g(a)?a.call(n):a;Reflect.ownKeys(e).forEach((t=>{Mr(t,e[t])}))}function A(e,t){f(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(p&&Sr(p,e,"c"),A($o,d),A(Po,h),A(Ao,m),A(Fo,v),A(xo,y),A(Co,b),A(Lo,T),A(Bo,k),A(Io,w),A(Ro,S),A(Mo,x),A(Vo,E),f(N))if(N.length){const t=e.exposed||(e.exposed={});N.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});C&&e.render===o&&(e.render=C),null!=O&&(e.inheritAttrs=O),$&&(e.components=$),P&&(e.directives=P)}function Sr(e,t,n){tn(f(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function xr(e,t,n,o){const r=o.includes(".")?eo(n,o):()=>n[o];if(v(e)){const n=t[e];g(n)&&Yn(r,n)}else if(g(e))Yn(r,e.bind(n));else if(_(e))if(f(e))e.forEach((e=>xr(e,t,n,o)));else{const o=g(e.handler)?e.handler.bind(n):t[e.handler];g(o)&&Yn(r,o,e)}}function Cr(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let c;return l?c=l:r.length||n||o?(c={},r.length&&r.forEach((e=>kr(c,e,i,!0))),kr(c,t,i)):c=t,_(t)&&s.set(t,c),c}function kr(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&kr(e,s,n,!0),r&&r.forEach((t=>kr(e,t,n,!0)));for(const i in t)if(o&&"expose"===i);else{const o=wr[i]||n&&n[i];e[i]=o?o(e[i],t[i]):t[i]}return e}const wr={data:Tr,props:$r,emits:$r,methods:Or,computed:Or,beforeCreate:Nr,created:Nr,beforeMount:Nr,mounted:Nr,beforeUpdate:Nr,updated:Nr,beforeDestroy:Nr,beforeUnmount:Nr,destroyed:Nr,unmounted:Nr,activated:Nr,deactivated:Nr,errorCaptured:Nr,serverPrefetch:Nr,components:Or,directives:Or,watch:function(e,t){if(!e)return t;if(!t)return e;const n=c(Object.create(null),e);for(const o in t)n[o]=Nr(e[o],t[o]);return n},provide:Tr,inject:function(e,t){return Or(Er(e),Er(t))}};function Tr(e,t){return t?e?function(){return c(g(e)?e.call(this,this):e,g(t)?t.call(this,this):t)}:t:e}function Er(e){if(f(e)){const t={};for(let n=0;n(s.has(e)||(e&&g(e.install)?(s.add(e),e.install(l,...t)):g(e)&&(s.add(e),e(l,...t))),l),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),l),component:(e,t)=>t?(r.components[e]=t,l):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,l):r.directives[e],mount(s,c,a){if(!i){const u=Fs(n,o);return u.appContext=r,c&&t?t(u,s):e(u,s,a),i=!0,l._container=s,s.__vue_app__=l,ii(u.component)||u.component.proxy}},unmount(){i&&(e(null,l._container),delete l._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,l),runWithContext(e){Rr=l;try{return e()}finally{Rr=null}}};return l}}let Rr=null;function Mr(e,t){if(Ks){let n=Ks.provides;const o=Ks.parent&&Ks.parent.provides;o===n&&(n=Ks.provides=Object.create(o)),n[e]=t}else;}function Vr(e,t,n=!1){const o=Ks||Nn;if(o||Rr){const r=o?null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:Rr._context.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&g(t)?t.call(o&&o.proxy):t}}function Ir(){return!!(Ks||Nn||Rr)}function Br(e,n,o,r){const[s,i]=e.propsOptions;let l,c=!1;if(n)for(let t in n){if(w(t))continue;const a=n[t];let u;s&&p(s,u=O(t))?i&&i.includes(u)?(l||(l={}))[u]=a:o[u]=a:En(e.emitsOptions,t)||t in r&&a===r[t]||(r[t]=a,c=!0)}if(i){const n=Nt(o),r=l||t;for(let t=0;t{d=!0;const[t,n]=jr(e,o,!0);c(a,t),n&&u.push(...n)};!r&&o.mixins.length&&o.mixins.forEach(t),e.extends&&t(e.extends),e.mixins&&e.mixins.forEach(t)}if(!l&&!d)return _(e)&&s.set(e,n),n;if(f(l))for(let n=0;n-1,o[1]=n<0||t-1||p(o,"default"))&&u.push(e)}}}const h=[a,u];return _(e)&&s.set(e,h),h}function Ur(e){return"$"!==e[0]}function Dr(e){const t=e&&e.toString().match(/^\s*(function|class) (\w+)/);return t?t[2]:null===e?"null":""}function Hr(e,t){return Dr(e)===Dr(t)}function Wr(e,t){return f(t)?t.findIndex((t=>Hr(t,e))):g(t)&&Hr(t,e)?0:-1}const zr=e=>"_"===e[0]||"$stable"===e,Kr=e=>f(e)?e.map(Ls):[Ls(e)],Gr=(e,t,n)=>{if(t._n)return t;const o=Rn(((...e)=>Kr(t(...e))),n);return o._c=!1,o},qr=(e,t,n)=>{const o=e._ctx;for(const r in e){if(zr(r))continue;const n=e[r];if(g(n))t[r]=Gr(0,n,o);else if(null!=n){const e=Kr(n);t[r]=()=>e}}},Jr=(e,t)=>{const n=Kr(t);e.slots.default=()=>n};function Zr(e,n,o,r,s=!1){if(f(e))return void e.forEach(((e,t)=>Zr(e,n&&(f(n)?n[t]:n),o,r,s)));if(go(r)&&!s)return;const i=4&r.shapeFlag?ii(r.component)||r.component.proxy:r.el,l=s?null:i,{i:c,r:u}=e,d=n&&n.r,h=c.refs===t?c.refs={}:c.refs,m=c.setupState;if(null!=d&&d!==u&&(v(d)?(h[d]=null,p(m,d)&&(m[d]=null)):Rt(d)&&(d.value=null)),g(u))en(u,c,12,[l,h]);else{const t=v(u),n=Rt(u);if(t||n){const r=()=>{if(e.f){const n=t?p(m,u)?m[u]:h[u]:u.value;s?f(n)&&a(n,i):f(n)?n.includes(i)||n.push(i):t?(h[u]=[i],p(m,u)&&(m[u]=h[u])):(u.value=[i],e.k&&(h[e.k]=u.value))}else t?(h[u]=l,p(m,u)&&(m[u]=l)):n&&(u.value=l,e.k&&(h[e.k]=l))};l?(r.id=-1,ts(r,o)):r()}}}let Yr=!1;const Qr=e=>/svg/.test(e.namespaceURI)&&"foreignObject"!==e.tagName,Xr=e=>8===e.nodeType;function es(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:s,parentNode:l,remove:c,insert:a,createComment:u}}=e,p=(n,o,i,c,u,v=!1)=>{const y=Xr(n)&&"["===n.data,_=()=>m(n,o,i,c,u,y),{type:b,ref:S,shapeFlag:x,patchFlag:C}=o;let k=n.nodeType;o.el=n,-2===C&&(v=!1,o.dynamicChildren=null);let w=null;switch(b){case hs:3!==k?""===o.children?(a(o.el=r(""),l(n),n),w=n):w=_():(n.data!==o.children&&(Yr=!0,n.data=o.children),w=s(n));break;case ms:w=8!==k||y?_():s(n);break;case gs:if(y&&(k=(n=s(n)).nodeType),1===k||3===k){w=n;const e=!o.children.length;for(let t=0;t{l=l||!!t.dynamicChildren;const{type:a,props:u,patchFlag:p,shapeFlag:f,dirs:h}=t,m="input"===a&&h||"option"===a;if(m||-1!==p){if(h&&oo(t,null,n,"created"),u)if(m||!l||48&p)for(const t in u)(m&&t.endsWith("value")||i(t)&&!w(t))&&o(e,t,null,u[t],!1,void 0,n);else u.onClick&&o(e,"onClick",null,u.onClick,!1,void 0,n);let a;if((a=u&&u.onVnodeBeforeMount)&&Hs(a,n,t),h&&oo(t,null,n,"beforeMount"),((a=u&&u.onVnodeMounted)||h)&&zn((()=>{a&&Hs(a,n,t),h&&oo(t,null,n,"mounted")}),r),16&f&&(!u||!u.innerHTML&&!u.textContent)){let o=d(e.firstChild,t,e,n,r,s,l);for(;o;){Yr=!0;const e=o;o=o.nextSibling,c(e)}}else 8&f&&e.textContent!==t.children&&(Yr=!0,e.textContent=t.children)}return e.nextSibling},d=(e,t,o,r,s,i,l)=>{l=l||!!t.dynamicChildren;const c=t.children,a=c.length;for(let u=0;u{const{slotScopeIds:c}=t;c&&(r=r?r.concat(c):c);const p=l(e),f=d(s(e),t,p,n,o,r,i);return f&&Xr(f)&&"]"===f.data?s(t.anchor=f):(Yr=!0,a(t.anchor=u("]"),p,f),f)},m=(e,t,o,r,i,a)=>{if(Yr=!0,t.el=null,a){const t=g(e);for(;;){const n=s(e);if(!n||n===t)break;c(n)}}const u=s(e),p=l(e);return c(e),n(null,t,p,u,o,r,Qr(p),i),u},g=e=>{let t=0;for(;e;)if((e=s(e))&&Xr(e)&&("["===e.data&&t++,"]"===e.data)){if(0===t)return s(e);t--}return e};return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),yn(),void(t._vnode=e);Yr=!1,p(t.firstChild,e,null,null,null),yn(),t._vnode=e,Yr&&console.error("Hydration completed but contains mismatches.")},p]}const ts=zn;function ns(e){return rs(e)}function os(e){return rs(e,es)}function rs(e,r){(L||(L="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{})).__VUE__=!0;const{insert:s,remove:i,patchProp:l,createElement:a,createText:u,createComment:f,setText:d,setElementText:h,parentNode:m,nextSibling:g,setScopeId:v=o,insertStaticContent:y}=e,_=(e,t,n,o=null,r=null,s=null,i=!1,l=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Es(e,t)&&(o=Q(e),G(e,r,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:p}=t;switch(a){case hs:S(e,t,n,o);break;case ms:x(e,t,n,o);break;case gs:null==e&&C(t,n,o,i);break;case ds:R(e,t,n,o,r,s,i,l,c);break;default:1&p?k(e,t,n,o,r,s,i,l,c):6&p?I(e,t,n,o,r,s,i,l,c):(64&p||128&p)&&a.process(e,t,n,o,r,s,i,l,c,ee)}null!=u&&r&&Zr(u,e&&e.ref,s,t||e,!t)},S=(e,t,n,o)=>{if(null==e)s(t.el=u(t.children),n,o);else{const n=t.el=e.el;t.children!==e.children&&d(n,t.children)}},x=(e,t,n,o)=>{null==e?s(t.el=f(t.children||""),n,o):t.el=e.el},C=(e,t,n,o)=>{[e.el,e.anchor]=y(e.children,t,n,o,e.el,e.anchor)},k=(e,t,n,o,r,s,i,l,c)=>{i=i||"svg"===t.type,null==e?T(t,n,o,r,s,i,l,c):$(e,t,r,s,i,l,c)},T=(e,t,n,o,r,i,c,u)=>{let p,f;const{type:d,props:m,shapeFlag:g,transition:v,dirs:y}=e;if(p=e.el=a(e.type,i,m&&m.is,m),8&g?h(p,e.children):16&g&&N(e.children,p,null,o,r,i&&"foreignObject"!==d,c,u),y&&oo(e,null,o,"created"),E(p,e,e.scopeId,c,o),m){for(const t in m)"value"===t||w(t)||l(p,t,null,m[t],i,e.children,o,r,Y);"value"in m&&l(p,"value",null,m.value),(f=m.onVnodeBeforeMount)&&Hs(f,o,e)}y&&oo(e,null,o,"beforeMount");const _=(!r||r&&!r.pendingBranch)&&v&&!v.persisted;_&&v.beforeEnter(p),s(p,t,n),((f=m&&m.onVnodeMounted)||_||y)&&ts((()=>{f&&Hs(f,o,e),_&&v.enter(p),y&&oo(e,null,o,"mounted")}),r)},E=(e,t,n,o,r)=>{if(n&&v(e,n),o)for(let s=0;s{for(let a=c;a{const a=n.el=e.el;let{patchFlag:u,dynamicChildren:p,dirs:f}=n;u|=16&e.patchFlag;const d=e.props||t,m=n.props||t;let g;o&&ss(o,!1),(g=m.onVnodeBeforeUpdate)&&Hs(g,o,n,e),f&&oo(n,e,o,"beforeUpdate"),o&&ss(o,!0);const v=s&&"foreignObject"!==n.type;if(p?A(e.dynamicChildren,p,a,o,r,v,i):c||H(e,n,a,null,o,r,v,i,!1),u>0){if(16&u)F(a,n,d,m,o,r,s);else if(2&u&&d.class!==m.class&&l(a,"class",null,m.class,s),4&u&&l(a,"style",d.style,m.style,s),8&u){const t=n.dynamicProps;for(let n=0;n{g&&Hs(g,o,n,e),f&&oo(n,e,o,"updated")}),r)},A=(e,t,n,o,r,s,i)=>{for(let l=0;l{if(o!==r){if(o!==t)for(const t in o)w(t)||t in r||l(e,t,o[t],null,c,n.children,s,i,Y);for(const t in r){if(w(t))continue;const a=r[t],u=o[t];a!==u&&"value"!==t&&l(e,t,u,a,c,n.children,s,i,Y)}"value"in r&&l(e,"value",o.value,r.value)}},R=(e,t,n,o,r,i,l,c,a)=>{const p=t.el=e?e.el:u(""),f=t.anchor=e?e.anchor:u("");let{patchFlag:d,dynamicChildren:h,slotScopeIds:m}=t;m&&(c=c?c.concat(m):m),null==e?(s(p,n,o),s(f,n,o),N(t.children,n,f,r,i,l,c,a)):d>0&&64&d&&h&&e.dynamicChildren?(A(e.dynamicChildren,h,n,r,i,l,c),(null!=t.key||r&&t===r.subTree)&&is(e,t,!0)):H(e,t,n,f,r,i,l,c,a)},I=(e,t,n,o,r,s,i,l,c)=>{t.slotScopeIds=l,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,i,c):B(t,n,o,r,s,i,c):j(e,t,c)},B=(e,n,o,r,s,i,l)=>{const c=e.component=function(e,n,o){const r=e.type,s=(n?n.appContext:e.appContext)||Ws,i={uid:zs++,vnode:e,type:r,parent:n,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,scope:new re(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:n?n.provides:Object.create(s.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:jr(r,s),emitsOptions:Tn(r,s),emit:null,emitted:null,propsDefaults:t,inheritAttrs:r.inheritAttrs,ctx:t,data:t,props:t,attrs:t,slots:t,refs:t,setupState:t,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:o,suspenseId:o?o.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};i.ctx={_:i},i.root=n?n.root:i,i.emit=wn.bind(null,i),e.ce&&e.ce(i);return i}(e,r,s);if(_o(e)&&(c.ctx.renderer=ee),function(e,t=!1){ei=t;const{props:n,children:o}=e.vnode,r=Ys(e);(function(e,t,n,o=!1){const r={},s={};V(s,Os,1),e.propsDefaults=Object.create(null),Br(e,t,r,s);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);e.props=n?o?r:bt(r):e.type.props?r:s,e.attrs=s})(e,n,r,t),((e,t)=>{if(32&e.vnode.shapeFlag){const n=t._;n?(e.slots=Nt(t),V(t,"_",n)):qr(t,e.slots={})}else e.slots={},t&&Jr(e,t);V(e.slots,Os,1)})(e,o);const s=r?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Ot(new Proxy(e.ctx,tr));const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?si(e):null;Js(e),ke();const r=en(o,e,0,[e.props,n]);if(we(),Zs(),b(r)){if(r.then(Zs,Zs),t)return r.then((n=>{ti(e,n,t)})).catch((t=>{nn(t,e,0)}));e.asyncDep=r}else ti(e,r,t)}else ri(e,t)}(e,t):void 0;ei=!1}(c),c.asyncDep){if(s&&s.registerDep(c,U),!e.el){const e=c.subTree=Fs(ms);x(null,e,n,o)}}else U(c,e,n,o,s,i,l)},j=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:i,children:l,patchFlag:c}=t,a=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!r&&!l||l&&l.$stable)||o!==i&&(o?!i||Bn(o,i,a):!!i);if(1024&c)return!0;if(16&c)return o?Bn(o,i,a):!!i;if(8&c){const e=t.dynamicProps;for(let t=0;tln&&sn.splice(t,1)}(o.update),o.update()}else t.el=e.el,o.vnode=t},U=(e,t,n,o,r,s,i)=>{const l=e.effect=new ye((()=>{if(e.isMounted){let t,{next:n,bu:o,u:l,parent:c,vnode:a}=e,u=n;ss(e,!1),n?(n.el=a.el,D(e,n,i)):n=a,o&&M(o),(t=n.props&&n.props.onVnodeBeforeUpdate)&&Hs(t,c,n,a),ss(e,!0);const p=Mn(e),f=e.subTree;e.subTree=p,_(f,p,m(f.el),Q(f),e,r,s),n.el=p.el,null===u&&Ln(e,p.el),l&&ts(l,r),(t=n.props&&n.props.onVnodeUpdated)&&ts((()=>Hs(t,c,n,a)),r)}else{let i;const{el:l,props:c}=t,{bm:a,m:u,parent:p}=e,f=go(t);if(ss(e,!1),a&&M(a),!f&&(i=c&&c.onVnodeBeforeMount)&&Hs(i,p,t),ss(e,!0),l&&ne){const n=()=>{e.subTree=Mn(e),ne(l,e.subTree,e,r,null)};f?t.type.__asyncLoader().then((()=>!e.isUnmounted&&n())):n()}else{const i=e.subTree=Mn(e);_(null,i,n,o,e,r,s),t.el=i.el}if(u&&ts(u,r),!f&&(i=c&&c.onVnodeMounted)){const e=t;ts((()=>Hs(i,p,e)),r)}(256&t.shapeFlag||p&&go(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&ts(e.a,r),e.isMounted=!0,t=n=o=null}}),(()=>hn(c)),e.scope),c=e.update=()=>l.run();c.id=e.uid,ss(e,!0),c()},D=(e,n,o)=>{n.component=e;const r=e.vnode.props;e.vnode=n,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:i}}=e,l=Nt(r),[c]=e.propsOptions;let a=!1;if(!(o||i>0)||16&i){let o;Br(e,t,r,s)&&(a=!0);for(const s in l)t&&(p(t,s)||(o=P(s))!==s&&p(t,o))||(c?!n||void 0===n[s]&&void 0===n[o]||(r[s]=Lr(c,l,s,void 0,e,!0)):delete r[s]);if(s!==l)for(const e in s)t&&p(t,e)||(delete s[e],a=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let o=0;o{const{vnode:r,slots:s}=e;let i=!0,l=t;if(32&r.shapeFlag){const e=n._;e?o&&1===e?i=!1:(c(s,n),o||1!==e||delete s._):(i=!n.$stable,qr(n,s)),l=n}else n&&(Jr(e,n),l={default:1});if(i)for(const t in s)zr(t)||t in l||delete s[t]})(e,n.children,o),ke(),vn(),we()},H=(e,t,n,o,r,s,i,l,c=!1)=>{const a=e&&e.children,u=e?e.shapeFlag:0,p=t.children,{patchFlag:f,shapeFlag:d}=t;if(f>0){if(128&f)return void z(a,p,n,o,r,s,i,l,c);if(256&f)return void W(a,p,n,o,r,s,i,l,c)}8&d?(16&u&&Y(a,r,s),p!==a&&h(n,p)):16&u?16&d?z(a,p,n,o,r,s,i,l,c):Y(a,r,s,!0):(8&u&&h(n,""),16&d&&N(p,n,o,r,s,i,l,c))},W=(e,t,o,r,s,i,l,c,a)=>{const u=(e=e||n).length,p=(t=t||n).length,f=Math.min(u,p);let d;for(d=0;dp?Y(e,s,i,!0,!1,f):N(t,o,r,s,i,l,c,a,f)},z=(e,t,o,r,s,i,l,c,a)=>{let u=0;const p=t.length;let f=e.length-1,d=p-1;for(;u<=f&&u<=d;){const n=e[u],r=t[u]=a?js(t[u]):Ls(t[u]);if(!Es(n,r))break;_(n,r,o,null,s,i,l,c,a),u++}for(;u<=f&&u<=d;){const n=e[f],r=t[d]=a?js(t[d]):Ls(t[d]);if(!Es(n,r))break;_(n,r,o,null,s,i,l,c,a),f--,d--}if(u>f){if(u<=d){const e=d+1,n=ed)for(;u<=f;)G(e[u],s,i,!0),u++;else{const h=u,m=u,g=new Map;for(u=m;u<=d;u++){const e=t[u]=a?js(t[u]):Ls(t[u]);null!=e.key&&g.set(e.key,u)}let v,y=0;const b=d-m+1;let S=!1,x=0;const C=new Array(b);for(u=0;u=b){G(n,s,i,!0);continue}let r;if(null!=n.key)r=g.get(n.key);else for(v=m;v<=d;v++)if(0===C[v-m]&&Es(n,t[v])){r=v;break}void 0===r?G(n,s,i,!0):(C[r-m]=u+1,r>=x?x=r:S=!0,_(n,t[r],o,null,s,i,l,c,a),y++)}const k=S?function(e){const t=e.slice(),n=[0];let o,r,s,i,l;const c=e.length;for(o=0;o>1,e[n[l]]0&&(t[o]=n[s-1]),n[s]=o)}}s=n.length,i=n[s-1];for(;s-- >0;)n[s]=i,i=t[i];return n}(C):n;for(v=k.length-1,u=b-1;u>=0;u--){const e=m+u,n=t[e],f=e+1{const{el:i,type:l,transition:c,children:a,shapeFlag:u}=e;if(6&u)return void K(e.component.subTree,t,n,o);if(128&u)return void e.suspense.move(t,n,o);if(64&u)return void l.move(e,t,n,ee);if(l===ds){s(i,t,n);for(let e=0;e{let r;for(;e&&e!==t;)r=g(e),s(e,n,o),e=r;s(t,n,o)})(e,t,n);if(2!==o&&1&u&&c)if(0===o)c.beforeEnter(i),s(i,t,n),ts((()=>c.enter(i)),r);else{const{leave:e,delayLeave:o,afterLeave:r}=c,l=()=>s(i,t,n),a=()=>{e(i,(()=>{l(),r&&r()}))};o?o(i,l,a):a()}else s(i,t,n)},G=(e,t,n,o=!1,r=!1)=>{const{type:s,props:i,ref:l,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:p,dirs:f}=e;if(null!=l&&Zr(l,null,n,e,!0),256&u)return void t.ctx.deactivate(e);const d=1&u&&f,h=!go(e);let m;if(h&&(m=i&&i.onVnodeBeforeUnmount)&&Hs(m,t,e),6&u)Z(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);d&&oo(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,r,ee,o):a&&(s!==ds||p>0&&64&p)?Y(a,t,n,!1,!0):(s===ds&&384&p||!r&&16&u)&&Y(c,t,n),o&&q(e)}(h&&(m=i&&i.onVnodeUnmounted)||d)&&ts((()=>{m&&Hs(m,t,e),d&&oo(e,null,t,"unmounted")}),n)},q=e=>{const{type:t,el:n,anchor:o,transition:r}=e;if(t===ds)return void J(n,o);if(t===gs)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=g(e),i(e),e=n;i(t)})(e);const s=()=>{i(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){const{leave:t,delayLeave:o}=r,i=()=>t(n,s);o?o(e.el,s,i):i()}else s()},J=(e,t)=>{let n;for(;e!==t;)n=g(e),i(e),e=n;i(t)},Z=(e,t,n)=>{const{bum:o,scope:r,update:s,subTree:i,um:l}=e;o&&M(o),r.stop(),s&&(s.active=!1,G(i,e,t,n)),l&&ts(l,t),ts((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},Y=(e,t,n,o=!1,r=!1,s=0)=>{for(let i=s;i6&e.shapeFlag?Q(e.component.subTree):128&e.shapeFlag?e.suspense.next():g(e.anchor||e.el),X=(e,t,n)=>{null==e?t._vnode&&G(t._vnode,null,null,!0):_(t._vnode||null,e,t,null,null,null,n),vn(),yn(),t._vnode=e},ee={p:_,um:G,m:K,r:q,mt:B,mc:N,pc:H,pbc:A,n:Q,o:e};let te,ne;return r&&([te,ne]=r(ee)),{render:X,hydrate:te,createApp:Fr(X,te)}}function ss({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function is(e,t,n=!1){const o=e.children,r=t.children;if(f(o)&&f(r))for(let s=0;se&&(e.disabled||""===e.disabled),cs=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,as=(e,t)=>{const n=e&&e.to;if(v(n)){if(t){return t(n)}return null}return n};function us(e,t,n,{o:{insert:o},m:r},s=2){0===s&&o(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:c,children:a,props:u}=e,p=2===s;if(p&&o(i,t,n),(!p||ls(u))&&16&c)for(let f=0;f{16&v&&u(y,e,t,r,s,i,l,c)};g?_(n,a):p&&_(p,f)}else{t.el=e.el;const o=t.anchor=e.anchor,u=t.target=e.target,d=t.targetAnchor=e.targetAnchor,m=ls(e.props),v=m?n:u,y=m?o:d;if(i=i||cs(u),_?(f(e.dynamicChildren,_,v,r,s,i,l),is(e,t,!0)):c||p(e,t,v,y,r,s,i,l,!1),g)m||us(t,n,o,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=as(t.props,h);e&&us(t,e,null,a,0)}else m&&us(t,u,d,a,1)}fs(t)},remove(e,t,n,o,{um:r,o:{remove:s}},i){const{shapeFlag:l,children:c,anchor:a,targetAnchor:u,target:p,props:f}=e;if(p&&s(u),(i||!ls(f))&&(s(a),16&l))for(let d=0;d0?ys||n:null,bs(),Ss>0&&ys&&ys.push(e),e}function ks(e,t,n,o,r,s){return Cs(As(e,t,n,o,r,s,!0))}function ws(e,t,n,o,r){return Cs(Fs(e,t,n,o,r,!0))}function Ts(e){return!!e&&!0===e.__v_isVNode}function Es(e,t){return e.type===t.type&&e.key===t.key}function Ns(e){}const Os="__vInternal",$s=({key:e})=>null!=e?e:null,Ps=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?v(e)||Rt(e)||g(e)?{i:Nn,r:e,k:t,f:!!n}:e:null);function As(e,t=null,n=null,o=0,r=null,s=(e===ds?0:1),i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&$s(t),ref:t&&Ps(t),scopeId:On,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Nn};return l?(Us(c,n),128&s&&e.normalize(c)):n&&(c.shapeFlag|=v(n)?8:16),Ss>0&&!i&&ys&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&ys.push(c),c}const Fs=function(e,t=null,n=null,o=0,r=null,s=!1){e&&e!==Do||(e=ms);if(Ts(e)){const o=Ms(e,t,!0);return n&&Us(o,n),Ss>0&&!s&&ys&&(6&o.shapeFlag?ys[ys.indexOf(e)]=o:ys.push(o)),o.patchFlag|=-2,o}i=e,g(i)&&"__vccOpts"in i&&(e=e.__vccOpts);var i;if(t){t=Rs(t);let{class:e,style:n}=t;e&&!v(e)&&(t.class=K(e)),_(n)&&(Et(n)&&!f(n)&&(n=c({},n)),t.style=U(n))}const l=v(e)?1:jn(e)?128:(e=>e.__isTeleport)(e)?64:_(e)?4:g(e)?2:0;return As(e,t,n,o,r,l,s,!0)};function Rs(e){return e?Et(e)||Os in e?c({},e):e:null}function Ms(e,t,n=!1){const{props:o,ref:r,patchFlag:s,children:i}=e,l=t?Ds(o||{},t):o;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&$s(l),ref:t&&t.ref?n&&r?f(r)?r.concat(Ps(t)):[r,Ps(t)]:Ps(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ds?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ms(e.ssContent),ssFallback:e.ssFallback&&Ms(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce}}function Vs(e=" ",t=0){return Fs(hs,null,e,t)}function Is(e,t){const n=Fs(gs,null,e);return n.staticCount=t,n}function Bs(e="",t=!1){return t?(_s(),ws(ms,null,e)):Fs(ms,null,e)}function Ls(e){return null==e||"boolean"==typeof e?Fs(ms):f(e)?Fs(ds,null,e.slice()):"object"==typeof e?js(e):Fs(hs,null,String(e))}function js(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:Ms(e)}function Us(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(f(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),Us(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||Os in t?3===o&&Nn&&(1===Nn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Nn}}else g(t)?(t={default:t,_ctx:Nn},n=32):(t=String(t),64&o?(n=16,t=[Vs(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ds(...e){const t={};for(let n=0;nKs||Nn;let qs;qs=e=>{Ks=e};const Js=e=>{qs(e),e.scope.on()},Zs=()=>{Ks&&Ks.scope.off(),qs(null)};function Ys(e){return 4&e.vnode.shapeFlag}let Qs,Xs,ei=!1;function ti(e,t,n){g(t)?e.render=t:_(t)&&(e.setupState=Ht(t)),ri(e,n)}function ni(e){Qs=e,Xs=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,nr))}}const oi=()=>!Qs;function ri(e,t,n){const r=e.type;if(!e.render){if(!t&&Qs&&!r.render){const t=r.template||Cr(e).template;if(t){const{isCustomElement:n,compilerOptions:o}=e.appContext.config,{delimiters:s,compilerOptions:i}=r,l=c(c({isCustomElement:n,delimiters:s},o),i);r.render=Qs(t,l)}}e.render=r.render||o,Xs&&Xs(e)}Js(e),ke(),br(e),we(),Zs()}function si(e){const t=t=>{e.exposed=t||{}};return{get attrs(){return function(e){return e.attrsProxy||(e.attrsProxy=new Proxy(e.attrs,{get:(t,n)=>(Te(e,0,"$attrs"),t[n])}))}(e)},slots:e.slots,emit:e.emit,expose:t}}function ii(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(Ht(Ot(e.exposed)),{get:(t,n)=>n in t?t[n]:n in Xo?Xo[n](e):void 0,has:(e,t)=>t in e||t in Xo}))}function li(e,t=!0){return g(e)?e.displayName||e.name:e.name||t&&e.__name}const ci=(e,t)=>function(e,t,n=!1){let r,s;const i=g(e);return i?(r=e,s=o):(r=e.get,s=e.set),new Yt(r,s,i||!s,n)}(e,0,ei);function ai(e,t,n){const o=arguments.length;return 2===o?_(t)&&!f(t)?Ts(t)?Fs(e,null,[t]):Fs(e,t):Fs(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&Ts(n)&&(n=[n]),Fs(e,t,n))}const ui=Symbol.for("v-scx"),pi=()=>Vr(ui);function fi(){}function di(e,t,n,o){const r=n[o];if(r&&hi(r,e))return r;const s=t();return s.memo=e.slice(),n[o]=s}function hi(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o0&&ys&&ys.push(e),!0}const mi="3.3.4",gi=null,vi=null,yi=null,_i="undefined"!=typeof document?document:null,bi=_i&&_i.createElement("template"),Si={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t?_i.createElementNS("http://www.w3.org/2000/svg",e):_i.createElement(e,n?{is:n}:void 0);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>_i.createTextNode(e),createComment:e=>_i.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>_i.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,s){const i=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==s&&(r=r.nextSibling););else{bi.innerHTML=o?`${e}`:e;const r=bi.content;if(o){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};const xi=/\s*!important$/;function Ci(e,t,n){if(f(n))n.forEach((n=>Ci(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=wi[t];if(n)return n;let o=O(t);if("filter"!==o&&o in e)return wi[t]=o;o=A(o);for(let r=0;r{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();tn(function(e,t){if(f(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=(()=>$i||(Pi.then((()=>$i=0)),$i=Date.now()))(),n}(o,r);Ei(e,n,i,l)}else i&&(!function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,i,l),s[t]=void 0)}}const Oi=/(?:Once|Passive|Capture)$/;let $i=0;const Pi=Promise.resolve();const Ai=/^on[a-z]/;function Fi(e,t){const n=mo(e);class o extends Vi{constructor(e){super(n,e,t)}}return o.def=n,o}const Ri=e=>Fi(e,Bl),Mi="undefined"!=typeof HTMLElement?HTMLElement:class{};class Vi extends Mi{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,dn((()=>{this._connected||(Il(null,this.shadowRoot),this._instance=null)}))}_resolveDef(){this._resolved=!0;for(let n=0;n{for(const t of e)this._setAttr(t.attributeName)})).observe(this,{attributes:!0});const e=(e,t=!1)=>{const{props:n,styles:o}=e;let r;if(n&&!f(n))for(const s in n){const e=n[s];(e===Number||e&&e.type===Number)&&(s in this._props&&(this._props[s]=B(this._props[s])),(r||(r=Object.create(null)))[O(s)]=!0)}this._numberProps=r,t&&this._resolveProps(e),this._applyStyles(o),this._update()},t=this._def.__asyncLoader;t?t().then((t=>e(t,!0))):e(this._def)}_resolveProps(e){const{props:t}=e,n=f(t)?t:Object.keys(t||{});for(const o of Object.keys(this))"_"!==o[0]&&n.includes(o)&&this._setProp(o,this[o],!0,!1);for(const o of n.map(O))Object.defineProperty(this,o,{get(){return this._getProp(o)},set(e){this._setProp(o,e)}})}_setAttr(e){let t=this.getAttribute(e);const n=O(e);this._numberProps&&this._numberProps[n]&&(t=B(t)),this._setProp(n,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,o=!0){t!==this._props[e]&&(this._props[e]=t,o&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(P(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(P(e),t+""):t||this.removeAttribute(P(e))))}_update(){Il(this._createVNode(),this.shadowRoot)}_createVNode(){const e=Fs(this._def,c({},this._props));return this._instance||(e.ce=e=>{this._instance=e,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,{detail:t}))};e.emit=(e,...n)=>{t(e,n),P(e)!==e&&t(P(e),n)};let n=this;for(;n=n&&(n.parentNode||n.host);)if(n instanceof Vi){e.parent=n._instance,e.provides=n._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach((e=>{const t=document.createElement("style");t.textContent=e,this.shadowRoot.appendChild(t)}))}}function Ii(e="$style"){{const n=Gs();if(!n)return t;const o=n.type.__cssModules;if(!o)return t;const r=o[e];return r||t}}function Bi(e){const t=Gs();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>ji(e,n)))},o=()=>{const o=e(t.proxy);Li(t.subTree,o),n(o)};qn(o),Po((()=>{const e=new MutationObserver(o);e.observe(t.subTree.el.parentNode,{childList:!0}),Mo((()=>e.disconnect()))}))}function Li(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{Li(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)ji(e.el,t);else if(e.type===ds)e.children.forEach((e=>Li(e,t)));else if(e.type===gs){let{el:n,anchor:o}=e;for(;n&&(ji(n,t),n!==o);)n=n.nextSibling}}function ji(e,t){if(1===e.nodeType){const n=e.style;for(const e in t)n.setProperty(`--${e}`,t[e])}}const Ui="transition",Di="animation",Hi=(e,{slots:t})=>ai(lo,qi(e),t);Hi.displayName="Transition";const Wi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},zi=Hi.props=c({},io,Wi),Ki=(e,t=[])=>{f(e)?e.forEach((e=>e(...t))):e&&e(...t)},Gi=e=>!!e&&(f(e)?e.some((e=>e.length>1)):e.length>1);function qi(e){const t={};for(const c in e)c in Wi||(t[c]=e[c]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=s,appearActiveClass:u=i,appearToClass:p=l,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:d=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,m=function(e){if(null==e)return null;if(_(e))return[Ji(e.enter),Ji(e.leave)];{const t=Ji(e);return[t,t]}}(r),g=m&&m[0],v=m&&m[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:S,onLeave:x,onLeaveCancelled:C,onBeforeAppear:k=y,onAppear:w=b,onAppearCancelled:T=S}=t,E=(e,t,n)=>{Yi(e,t?p:l),Yi(e,t?u:i),n&&n()},N=(e,t)=>{e._isLeaving=!1,Yi(e,f),Yi(e,h),Yi(e,d),t&&t()},O=e=>(t,n)=>{const r=e?w:b,i=()=>E(t,e,n);Ki(r,[t,i]),Qi((()=>{Yi(t,e?a:s),Zi(t,e?p:l),Gi(r)||el(t,o,g,i)}))};return c(t,{onBeforeEnter(e){Ki(y,[e]),Zi(e,s),Zi(e,i)},onBeforeAppear(e){Ki(k,[e]),Zi(e,a),Zi(e,u)},onEnter:O(!1),onAppear:O(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>N(e,t);Zi(e,f),rl(),Zi(e,d),Qi((()=>{e._isLeaving&&(Yi(e,f),Zi(e,h),Gi(x)||el(e,o,v,n))})),Ki(x,[e,n])},onEnterCancelled(e){E(e,!1),Ki(S,[e])},onAppearCancelled(e){E(e,!0),Ki(T,[e])},onLeaveCancelled(e){N(e),Ki(C,[e])}})}function Ji(e){return B(e)}function Zi(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e._vtc||(e._vtc=new Set)).add(t)}function Yi(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Qi(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Xi=0;function el(e,t,n,o){const r=e._endId=++Xi,s=()=>{r===e._endId&&o()};if(n)return setTimeout(s,n);const{type:i,timeout:l,propCount:c}=tl(e,t);if(!i)return o();const a=i+"end";let u=0;const p=()=>{e.removeEventListener(a,f),s()},f=t=>{t.target===e&&++u>=c&&p()};setTimeout((()=>{u(n[e]||"").split(", "),r=o(`${Ui}Delay`),s=o(`${Ui}Duration`),i=nl(r,s),l=o(`${Di}Delay`),c=o(`${Di}Duration`),a=nl(l,c);let u=null,p=0,f=0;t===Ui?i>0&&(u=Ui,p=i,f=s.length):t===Di?a>0&&(u=Di,p=a,f=c.length):(p=Math.max(i,a),u=p>0?i>a?Ui:Di:null,f=u?u===Ui?s.length:c.length:0);return{type:u,timeout:p,propCount:f,hasTransform:u===Ui&&/\b(transform|all)(,|$)/.test(o(`${Ui}Property`).toString())}}function nl(e,t){for(;e.lengthol(t)+ol(e[n]))))}function ol(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function rl(){return document.body.offsetHeight}const sl=new WeakMap,il=new WeakMap,ll={name:"TransitionGroup",props:c({},zi,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Gs(),o=ro();let r,s;return Fo((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const o=e.cloneNode();e._vtc&&e._vtc.forEach((e=>{e.split(/\s+/).forEach((e=>e&&o.classList.remove(e)))}));n.split(/\s+/).forEach((e=>e&&o.classList.add(e))),o.style.display="none";const r=1===t.nodeType?t:t.parentNode;r.appendChild(o);const{hasTransform:s}=tl(o);return r.removeChild(o),s}(r[0].el,n.vnode.el,t))return;r.forEach(al),r.forEach(ul);const o=r.filter(pl);rl(),o.forEach((e=>{const n=e.el,o=n.style;Zi(n,t),o.transform=o.webkitTransform=o.transitionDuration="";const r=n._moveCb=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",r),n._moveCb=null,Yi(n,t))};n.addEventListener("transitionend",r)}))})),()=>{const i=Nt(e),l=qi(i);let c=i.tag||ds;r=s,s=t.default?ho(t.default()):[];for(let e=0;e{const t=e.props["onUpdate:modelValue"]||!1;return f(t)?e=>M(t,e):t};function dl(e){e.target.composing=!0}function hl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ml={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e._assign=fl(r);const s=o||r.props&&"number"===r.props.type;Ei(e,t?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;n&&(o=o.trim()),s&&(o=I(o)),e._assign(o)})),n&&Ei(e,"change",(()=>{e.value=e.value.trim()})),t||(Ei(e,"compositionstart",dl),Ei(e,"compositionend",hl),Ei(e,"change",hl))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:o,number:r}},s){if(e._assign=fl(s),e.composing)return;if(document.activeElement===e&&"range"!==e.type){if(n)return;if(o&&e.value.trim()===t)return;if((r||"number"===e.type)&&I(e.value)===t)return}const i=null==t?"":t;e.value!==i&&(e.value=i)}},gl={deep:!0,created(e,t,n){e._assign=fl(n),Ei(e,"change",(()=>{const t=e._modelValue,n=Sl(e),o=e.checked,r=e._assign;if(f(t)){const e=ee(t,n),s=-1!==e;if(o&&!s)r(t.concat(n));else if(!o&&s){const n=[...t];n.splice(e,1),r(n)}}else if(h(t)){const e=new Set(t);o?e.add(n):e.delete(n),r(e)}else r(xl(e,o))}))},mounted:vl,beforeUpdate(e,t,n){e._assign=fl(n),vl(e,t,n)}};function vl(e,{value:t,oldValue:n},o){e._modelValue=t,f(t)?e.checked=ee(t,o.props.value)>-1:h(t)?e.checked=t.has(o.props.value):t!==n&&(e.checked=X(t,xl(e,!0)))}const yl={created(e,{value:t},n){e.checked=X(t,n.props.value),e._assign=fl(n),Ei(e,"change",(()=>{e._assign(Sl(e))}))},beforeUpdate(e,{value:t,oldValue:n},o){e._assign=fl(o),t!==n&&(e.checked=X(t,o.props.value))}},_l={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=h(t);Ei(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?I(Sl(e)):Sl(e)));e._assign(e.multiple?r?new Set(t):t:t[0])})),e._assign=fl(o)},mounted(e,{value:t}){bl(e,t)},beforeUpdate(e,t,n){e._assign=fl(n)},updated(e,{value:t}){bl(e,t)}};function bl(e,t){const n=e.multiple;if(!n||f(t)||h(t)){for(let o=0,r=e.options.length;o-1:t.has(s);else if(X(Sl(r),t))return void(e.selectedIndex!==o&&(e.selectedIndex=o))}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function Sl(e){return"_value"in e?e._value:e.value}function xl(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Cl={created(e,t,n){kl(e,t,n,null,"created")},mounted(e,t,n){kl(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){kl(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){kl(e,t,n,o,"updated")}};function kl(e,t,n,o,r){const s=function(e,t){switch(e){case"SELECT":return _l;case"TEXTAREA":return ml;default:switch(t){case"checkbox":return gl;case"radio":return yl;default:return ml}}}(e.tagName,n.props&&n.props.type)[r];s&&s(e,t,n,o)}const wl=["ctrl","shift","alt","meta"],Tl={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>wl.some((n=>e[`${n}Key`]&&!t.includes(n)))},El=(e,t)=>(n,...o)=>{for(let e=0;en=>{if(!("key"in n))return;const o=P(n.key);return t.some((e=>e===o||Nl[e]===o))?e(n):void 0},$l={beforeMount(e,{value:t},{transition:n}){e._vod="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):Pl(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),Pl(e,!0),o.enter(e)):o.leave(e,(()=>{Pl(e,!1)})):Pl(e,t))},beforeUnmount(e,{value:t}){Pl(e,t)}};function Pl(e,t){e.style.display=t?e._vod:"none"}const Al=c({patchProp:(e,t,n,o,r=!1,s,c,a,u)=>{"class"===t?function(e,t,n){const o=e._vtc;o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,o,r):"style"===t?function(e,t,n){const o=e.style,r=v(n);if(n&&!r){if(t&&!v(t))for(const e in t)null==n[e]&&Ci(o,e,"");for(const e in n)Ci(o,e,n[e])}else{const s=o.display;r?t!==n&&(o.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(o.display=s)}}(e,n,o):i(t)?l(t)||Ni(e,t,0,o,c):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&Ai.test(t)&&g(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if(Ai.test(t)&&v(n))return!1;return t in e}(e,t,o,r))?function(e,t,n,o,r,s,i){if("innerHTML"===t||"textContent"===t)return o&&i(o,r,s),void(e[t]=null==n?"":n);const l=e.tagName;if("value"===t&&"PROGRESS"!==l&&!l.includes("-")){e._value=n;const o=null==n?"":n;return("OPTION"===l?e.getAttribute("value"):e.value)!==o&&(e.value=o),void(null==n&&e.removeAttribute(t))}let c=!1;if(""===n||null==n){const o=typeof e[t];"boolean"===o?n=Q(n):null==n&&"string"===o?(n="",c=!0):"number"===o&&(n=0,c=!0)}try{e[t]=n}catch(a){}c&&e.removeAttribute(t)}(e,t,o,s,c,a,u):("true-value"===t?e._trueValue=o:"false-value"===t&&(e._falseValue=o),function(e,t,n,o,r){if(o&&t.startsWith("xlink:"))null==n?e.removeAttributeNS(Ti,t.slice(6,t.length)):e.setAttributeNS(Ti,t,n);else{const o=Y(t);null==n||o&&!Q(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}(e,t,o,r))}},Si);let Fl,Rl=!1;function Ml(){return Fl||(Fl=ns(Al))}function Vl(){return Fl=Rl?Fl:os(Al),Rl=!0,Fl}const Il=(...e)=>{Ml().render(...e)},Bl=(...e)=>{Vl().hydrate(...e)},Ll=(...e)=>{const t=Ml().createApp(...e),{mount:n}=t;return t.mount=e=>{const o=Ul(e);if(!o)return;const r=t._component;g(r)||r.render||r.template||(r.template=o.innerHTML),o.innerHTML="";const s=n(o,!1,o instanceof SVGElement);return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},jl=(...e)=>{const t=Vl().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=Ul(e);if(t)return n(t,!0,t instanceof SVGElement)},t};function Ul(e){if(v(e)){return document.querySelector(e)}return e}const Dl=o;var Hl=Object.freeze({__proto__:null,BaseTransition:lo,BaseTransitionPropsValidators:io,Comment:ms,EffectScope:re,Fragment:ds,KeepAlive:bo,ReactiveEffect:ye,Static:gs,Suspense:Un,Teleport:ps,Text:hs,Transition:Hi,TransitionGroup:cl,VueElement:Vi,assertNumber:Xt,callWithAsyncErrorHandling:tn,callWithErrorHandling:en,camelize:O,capitalize:A,cloneVNode:Ms,compatUtils:null,computed:ci,createApp:Ll,createBlock:ws,createCommentVNode:Bs,createElementBlock:ks,createElementVNode:As,createHydrationRenderer:os,createPropsRestProxy:vr,createRenderer:ns,createSSRApp:jl,createSlots:qo,createStaticVNode:Is,createTextVNode:Vs,createVNode:Fs,customRef:zt,defineAsyncComponent:vo,defineComponent:mo,defineCustomElement:Fi,defineEmits:rr,defineExpose:sr,defineModel:cr,defineOptions:ir,defineProps:or,defineSSRCustomElement:Ri,defineSlots:lr,get devtools(){return xn},effect:be,effectScope:se,getCurrentInstance:Gs,getCurrentScope:le,getTransitionRawChildren:ho,guardReactiveProps:Rs,h:ai,handleError:nn,hasInjectionContext:Ir,hydrate:Bl,initCustomFormatter:fi,initDirectivesForSSR:Dl,inject:Vr,isMemoSame:hi,isProxy:Et,isReactive:kt,isReadonly:wt,isRef:Rt,isRuntimeOnly:oi,isShallow:Tt,isVNode:Ts,markRaw:Ot,mergeDefaults:mr,mergeModels:gr,mergeProps:Ds,nextTick:dn,normalizeClass:K,normalizeProps:G,normalizeStyle:U,onActivated:xo,onBeforeMount:$o,onBeforeUnmount:Ro,onBeforeUpdate:Ao,onDeactivated:Co,onErrorCaptured:Lo,onMounted:Po,onRenderTracked:Bo,onRenderTriggered:Io,onScopeDispose:ce,onServerPrefetch:Vo,onUnmounted:Mo,onUpdated:Fo,openBlock:_s,popScopeId:An,provide:Mr,proxyRefs:Ht,pushScopeId:Pn,queuePostFlushCb:gn,reactive:_t,readonly:St,ref:Mt,registerRuntimeCompiler:ni,render:Il,renderList:Go,renderSlot:Jo,resolveComponent:Uo,resolveDirective:Wo,resolveDynamicComponent:Ho,resolveFilter:null,resolveTransitionHooks:ao,setBlockTracking:xs,setDevtoolsHook:kn,setTransitionHooks:fo,shallowReactive:bt,shallowReadonly:xt,shallowRef:Vt,ssrContextKey:ui,ssrUtils:null,stop:Se,toDisplayString:te,toHandlerKey:F,toHandlers:Yo,toRaw:Nt,toRef:Jt,toRefs:Kt,toValue:Ut,transformVNodeArgs:Ns,triggerRef:Lt,unref:jt,useAttrs:pr,useCssModule:Ii,useCssVars:Bi,useModel:fr,useSSRContext:pi,useSlots:ur,useTransitionState:ro,vModelCheckbox:gl,vModelDynamic:Cl,vModelRadio:yl,vModelSelect:_l,vModelText:ml,vShow:$l,version:mi,warn:Qt,watch:Yn,watchEffect:Gn,watchPostEffect:qn,watchSyncEffect:Jn,withAsyncContext:yr,withCtx:Rn,withDefaults:ar,withDirectives:no,withKeys:Ol,withMemo:di,withModifiers:El,withScopeId:Fn});function Wl(e){throw e}function zl(e){}function Kl(e,t,n,o){const r=new SyntaxError(String(e));return r.code=e,r.loc=t,r}const Gl=Symbol(""),ql=Symbol(""),Jl=Symbol(""),Zl=Symbol(""),Yl=Symbol(""),Ql=Symbol(""),Xl=Symbol(""),ec=Symbol(""),tc=Symbol(""),nc=Symbol(""),oc=Symbol(""),rc=Symbol(""),sc=Symbol(""),ic=Symbol(""),lc=Symbol(""),cc=Symbol(""),ac=Symbol(""),uc=Symbol(""),pc=Symbol(""),fc=Symbol(""),dc=Symbol(""),hc=Symbol(""),mc=Symbol(""),gc=Symbol(""),vc=Symbol(""),yc=Symbol(""),_c=Symbol(""),bc=Symbol(""),Sc=Symbol(""),xc=Symbol(""),Cc=Symbol(""),kc=Symbol(""),wc=Symbol(""),Tc=Symbol(""),Ec=Symbol(""),Nc=Symbol(""),Oc=Symbol(""),$c=Symbol(""),Pc=Symbol(""),Ac={[Gl]:"Fragment",[ql]:"Teleport",[Jl]:"Suspense",[Zl]:"KeepAlive",[Yl]:"BaseTransition",[Ql]:"openBlock",[Xl]:"createBlock",[ec]:"createElementBlock",[tc]:"createVNode",[nc]:"createElementVNode",[oc]:"createCommentVNode",[rc]:"createTextVNode",[sc]:"createStaticVNode",[ic]:"resolveComponent",[lc]:"resolveDynamicComponent",[cc]:"resolveDirective",[ac]:"resolveFilter",[uc]:"withDirectives",[pc]:"renderList",[fc]:"renderSlot",[dc]:"createSlots",[hc]:"toDisplayString",[mc]:"mergeProps",[gc]:"normalizeClass",[vc]:"normalizeStyle",[yc]:"normalizeProps",[_c]:"guardReactiveProps",[bc]:"toHandlers",[Sc]:"camelize",[xc]:"capitalize",[Cc]:"toHandlerKey",[kc]:"setBlockTracking",[wc]:"pushScopeId",[Tc]:"popScopeId",[Ec]:"withCtx",[Nc]:"unref",[Oc]:"isRef",[$c]:"withMemo",[Pc]:"isMemoSame"};const Fc={source:"",start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0}};function Rc(e,t,n,o,r,s,i,l=!1,c=!1,a=!1,u=Fc){return e&&(l?(e.helper(Ql),e.helper(Wc(e.inSSR,a))):e.helper(Hc(e.inSSR,a)),i&&e.helper(uc)),{type:13,tag:t,props:n,children:o,patchFlag:r,dynamicProps:s,directives:i,isBlock:l,disableTracking:c,isComponent:a,loc:u}}function Mc(e,t=Fc){return{type:17,loc:t,elements:e}}function Vc(e,t=Fc){return{type:15,loc:t,properties:e}}function Ic(e,t){return{type:16,loc:Fc,key:v(e)?Bc(e,!0):e,value:t}}function Bc(e,t=!1,n=Fc,o=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:o}}function Lc(e,t=Fc){return{type:8,loc:t,children:e}}function jc(e,t=[],n=Fc){return{type:14,loc:n,callee:e,arguments:t}}function Uc(e,t,n=!1,o=!1,r=Fc){return{type:18,params:e,returns:t,newline:n,isSlot:o,loc:r}}function Dc(e,t,n,o=!0){return{type:19,test:e,consequent:t,alternate:n,newline:o,loc:Fc}}function Hc(e,t){return e||t?tc:nc}function Wc(e,t){return e||t?Xl:ec}function zc(e,{helper:t,removeHelper:n,inSSR:o}){e.isBlock||(e.isBlock=!0,n(Hc(o,e.isComponent)),t(Ql),t(Wc(o,e.isComponent)))}const Kc=e=>4===e.type&&e.isStatic,Gc=(e,t)=>e===t||e===P(t);function qc(e){return Gc(e,"Teleport")?ql:Gc(e,"Suspense")?Jl:Gc(e,"KeepAlive")?Zl:Gc(e,"BaseTransition")?Yl:void 0}const Jc=/^\d|[^\$\w]/,Zc=e=>!Jc.test(e),Yc=/[A-Za-z_$\xA0-\uFFFF]/,Qc=/[\.\?\w$\xA0-\uFFFF]/,Xc=/\s+[.[]\s*|\s*[.[]\s+/g,ea=e=>{e=e.trim().replace(Xc,(e=>e.trim()));let t=0,n=[],o=0,r=0,s=null;for(let i=0;i4===e.key.type&&e.key.content===o))}return n}function ma(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}const ga=/&(gt|lt|amp|apos|quot);/g,va={gt:">",lt:"<",amp:"&",apos:"'",quot:'"'},ya={delimiters:["{{","}}"],getNamespace:()=>0,getTextMode:()=>0,isVoidTag:r,isPreTag:r,isCustomElement:r,decodeEntities:e=>e.replace(ga,((e,t)=>va[t])),onError:Wl,onWarn:zl,comments:!1};function _a(e,t={}){const n=function(e,t){const n=c({},ya);let o;for(o in t)n[o]=void 0===t[o]?ya[o]:t[o];return{options:n,column:1,line:1,offset:0,originalSource:e,source:e,inPre:!1,inVPre:!1,onWarn:n.onWarn}}(e,t),o=Ra(n);return function(e,t=Fc){return{type:0,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:t}}(ba(n,0,[]),Ma(n,o))}function ba(e,t,n){const o=Va(n),r=o?o.ns:0,s=[];for(;!Da(e,t,n);){const i=e.source;let l;if(0===t||1===t)if(!e.inVPre&&Ia(i,e.options.delimiters[0]))l=Pa(e,t);else if(0===t&&"<"===i[0])if(1===i.length);else if("!"===i[1])l=Ia(i,"\x3c!--")?Ca(e):Ia(i,""===i[2]){Ba(e,3);continue}if(/[a-z]/i.test(i[2])){Na(e,Ta.End,o);continue}Ua(e,12,2),l=ka(e)}else/[a-z]/i.test(i[1])?l=wa(e,n):"?"===i[1]&&(Ua(e,21,1),l=ka(e));if(l||(l=Aa(e,t)),f(l))for(let e=0;e/.exec(e.source);if(o){n=e.source.slice(4,o.index);const t=e.source.slice(0,o.index);let r=1,s=0;for(;-1!==(s=t.indexOf("\x3c!--",r));)Ba(e,s-r+1),r=s+1;Ba(e,o.index+o[0].length-r+1)}else n=e.source.slice(4),Ba(e,e.source.length);return{type:3,content:n,loc:Ma(e,t)}}function ka(e){const t=Ra(e),n="?"===e.source[1]?1:2;let o;const r=e.source.indexOf(">");return-1===r?(o=e.source.slice(n),Ba(e,e.source.length)):(o=e.source.slice(n,r),Ba(e,r+1)),{type:3,content:o,loc:Ma(e,t)}}function wa(e,t){const n=e.inPre,o=e.inVPre,r=Va(t),s=Na(e,Ta.Start,r),i=e.inPre&&!n,l=e.inVPre&&!o;if(s.isSelfClosing||e.options.isVoidTag(s.tag))return i&&(e.inPre=!1),l&&(e.inVPre=!1),s;t.push(s);const c=e.options.getTextMode(s,r),a=ba(e,c,t);if(t.pop(),s.children=a,Ha(e.source,s.tag))Na(e,Ta.End,r);else if(0===e.source.length&&"script"===s.tag.toLowerCase()){const e=a[0];e&&Ia(e.loc.source,"\x3c!--")}return s.loc=Ma(e,s.loc.start),i&&(e.inPre=!1),l&&(e.inVPre=!1),s}var Ta=(e=>(e[e.Start=0]="Start",e[e.End=1]="End",e))(Ta||{});const Ea=e("if,else,else-if,for,slot");function Na(e,t,n){const o=Ra(e),r=/^<\/?([a-z][^\t\r\n\f />]*)/i.exec(e.source),s=r[1],i=e.options.getNamespace(s,n);Ba(e,r[0].length),La(e);const l=Ra(e),a=e.source;e.options.isPreTag(s)&&(e.inPre=!0);let u=Oa(e,t);0===t&&!e.inVPre&&u.some((e=>7===e.type&&"pre"===e.name))&&(e.inVPre=!0,c(e,l),e.source=a,u=Oa(e,t).filter((e=>"v-pre"!==e.name)));let p=!1;if(0===e.source.length||(p=Ia(e.source,"/>"),Ba(e,p?2:1)),1===t)return;let f=0;return e.inVPre||("slot"===s?f=2:"template"===s?u.some((e=>7===e.type&&Ea(e.name)))&&(f=3):function(e,t,n){const o=n.options;if(o.isCustomElement(e))return!1;if("component"===e||/^[A-Z]/.test(e)||qc(e)||o.isBuiltInComponent&&o.isBuiltInComponent(e)||o.isNativeTag&&!o.isNativeTag(e))return!0;for(let r=0;r0&&!Ia(e.source,">")&&!Ia(e.source,"/>");){if(Ia(e.source,"/")){Ba(e,1),La(e);continue}const r=$a(e,o);6===r.type&&r.value&&"class"===r.name&&(r.value.content=r.value.content.replace(/\s+/g," ").trim()),0===t&&n.push(r),/^[^\t\r\n\f />]/.test(e.source),La(e)}return n}function $a(e,t){var n;const o=Ra(e),r=/^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(e.source)[0];t.has(r),t.add(r);{const t=/["'<]/g;let n;for(;n=t.exec(r);)Ua(e,17,n.index)}let s;Ba(e,r.length),/^[\t\r\n\f ]*=/.test(e.source)&&(La(e),Ba(e,1),La(e),s=function(e){const t=Ra(e);let n;const o=e.source[0],r='"'===o||"'"===o;if(r){Ba(e,1);const t=e.source.indexOf(o);-1===t?n=Fa(e,e.source.length,4):(n=Fa(e,t,4),Ba(e,1))}else{const t=/^[^\t\r\n\f >]+/.exec(e.source);if(!t)return;const o=/["'<=`]/g;let r;for(;r=o.exec(t[0]);)Ua(e,18,r.index);n=Fa(e,t[0].length,4)}return{content:n,isQuoted:r,loc:Ma(e,t)}}(e));const i=Ma(e,o);if(!e.inVPre&&/^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(r)){const t=/(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(r);let l,c=Ia(r,"."),a=t[1]||(c||Ia(r,":")?"bind":Ia(r,"@")?"on":"slot");if(t[2]){const s="slot"===a,i=r.lastIndexOf(t[2],r.length-((null==(n=t[3])?void 0:n.length)||0)),c=Ma(e,ja(e,o,i),ja(e,o,i+t[2].length+(s&&t[3]||"").length));let u=t[2],p=!0;u.startsWith("[")?(p=!1,u.endsWith("]")?u=u.slice(1,u.length-1):(Ua(e,27),u=u.slice(1))):s&&(u+=t[3]||""),l={type:4,content:u,isStatic:p,constType:p?3:0,loc:c}}if(s&&s.isQuoted){const e=s.loc;e.start.offset++,e.start.column++,e.end=na(e.start,s.content),e.source=e.source.slice(1,-1)}const u=t[3]?t[3].slice(1).split("."):[];return c&&u.push("prop"),{type:7,name:a,exp:s&&{type:4,content:s.content,isStatic:!1,constType:0,loc:s.loc},arg:l,modifiers:u,loc:i}}return!e.inVPre&&Ia(r,"v-"),{type:6,name:r,value:s&&{type:2,content:s.content,loc:s.loc},loc:i}}function Pa(e,t){const[n,o]=e.options.delimiters,r=e.source.indexOf(o,n.length);if(-1===r)return;const s=Ra(e);Ba(e,n.length);const i=Ra(e),l=Ra(e),c=r-n.length,a=e.source.slice(0,c),u=Fa(e,c,t),p=u.trim(),f=u.indexOf(p);f>0&&oa(i,a,f);return oa(l,a,c-(u.length-p.length-f)),Ba(e,o.length),{type:5,content:{type:4,isStatic:!1,constType:0,content:p,loc:Ma(e,i,l)},loc:Ma(e,s)}}function Aa(e,t){const n=3===t?["]]>"]:["<",e.options.delimiters[0]];let o=e.source.length;for(let s=0;st&&(o=t)}const r=Ra(e);return{type:2,content:Fa(e,o,t),loc:Ma(e,r)}}function Fa(e,t,n){const o=e.source.slice(0,t);return Ba(e,t),2!==n&&3!==n&&o.includes("&")?e.options.decodeEntities(o,4===n):o}function Ra(e){const{column:t,line:n,offset:o}=e;return{column:t,line:n,offset:o}}function Ma(e,t,n){return{start:t,end:n=n||Ra(e),source:e.originalSource.slice(t.offset,n.offset)}}function Va(e){return e[e.length-1]}function Ia(e,t){return e.startsWith(t)}function Ba(e,t){const{source:n}=e;oa(e,n,t),e.source=n.slice(t)}function La(e){const t=/^[\t\r\n\f ]+/.exec(e.source);t&&Ba(e,t[0].length)}function ja(e,t,n){return na(t,e.originalSource.slice(t.offset,n),n)}function Ua(e,t,n,o=Ra(e)){n&&(o.offset+=n,o.column+=n),e.options.onError(Kl(t,{start:o,end:o,source:""}))}function Da(e,t,n){const o=e.source;switch(t){case 0:if(Ia(o,"=0;--e)if(Ha(o,n[e].tag))return!0;break;case 1:case 2:{const e=Va(n);if(e&&Ha(o,e.tag))return!0;break}case 3:if(Ia(o,"]]>"))return!0}return!o}function Ha(e,t){return Ia(e,"]/.test(e[2+t.length]||">")}function Wa(e,t){Ka(e,t,za(e,e.children[0]))}function za(e,t){const{children:n}=e;return 1===n.length&&1===t.type&&!ua(t)}function Ka(e,t,n=!1){const{children:o}=e,r=o.length;let s=0;for(let i=0;i0){if(o>=2){e.codegenNode.patchFlag="-1",e.codegenNode=t.hoist(e.codegenNode),s++;continue}}else{const n=e.codegenNode;if(13===n.type){const o=Qa(n);if((!o||512===o||1===o)&&Za(e,t)>=2){const o=Ya(e);o&&(n.props=t.hoist(o))}n.dynamicProps&&(n.dynamicProps=t.hoist(n.dynamicProps))}}}if(1===e.type){const n=1===e.tagType;n&&t.scopes.vSlot++,Ka(e,t),n&&t.scopes.vSlot--}else if(11===e.type)Ka(e,t,1===e.children.length);else if(9===e.type)for(let n=0;n1)for(let r=0;r`_${Ac[T.helper(e)]}`,replaceNode(e){T.parent.children[T.childIndex]=T.currentNode=e},removeNode(e){const t=e?T.parent.children.indexOf(e):T.currentNode?T.childIndex:-1;e&&e!==T.currentNode?T.childIndex>t&&(T.childIndex--,T.onNodeRemoved()):(T.currentNode=null,T.onNodeRemoved()),T.parent.children.splice(t,1)},onNodeRemoved:()=>{},addIdentifiers(e){},removeIdentifiers(e){},hoist(e){v(e)&&(e=Bc(e)),T.hoists.push(e);const t=Bc(`_hoisted_${T.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache:(e,t=!1)=>function(e,t,n=!1){return{type:20,index:e,value:t,isVNode:n,loc:Fc}}(T.cached++,e,t)};return T}function eu(e,t){const n=Xa(e,t);tu(e,n),t.hoistStatic&&Wa(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:o}=e;if(1===o.length){const n=o[0];if(za(e,n)&&n.codegenNode){const o=n.codegenNode;13===o.type&&zc(o,t),e.codegenNode=o}else e.codegenNode=n}else if(o.length>1){let o=64;e.codegenNode=Rc(t,n(Gl),void 0,e.children,o+"",void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached}function tu(e,t){t.currentNode=e;const{nodeTransforms:n}=t,o=[];for(let s=0;s{n--};for(;nt===e:t=>e.test(t);return(e,o)=>{if(1===e.type){const{props:r}=e;if(3===e.tagType&&r.some(ca))return;const s=[];for(let i=0;i`${Ac[e]}: _${Ac[e]}`;function su(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:o=!1,filename:r="template.vue.html",scopeId:s=null,optimizeImports:i=!1,runtimeGlobalName:l="Vue",runtimeModuleName:c="vue",ssrRuntimeModuleName:a="vue/server-renderer",ssr:u=!1,isTS:p=!1,inSSR:f=!1}){const d={mode:t,prefixIdentifiers:n,sourceMap:o,filename:r,scopeId:s,optimizeImports:i,runtimeGlobalName:l,runtimeModuleName:c,ssrRuntimeModuleName:a,ssr:u,isTS:p,inSSR:f,source:e.loc.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${Ac[e]}`,push(e,t){d.code+=e},indent(){h(++d.indentLevel)},deindent(e=!1){e?--d.indentLevel:h(--d.indentLevel)},newline(){h(d.indentLevel)}};function h(e){d.push("\n"+" ".repeat(e))}return d}function iu(e,t={}){const n=su(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:o,push:r,prefixIdentifiers:s,indent:i,deindent:l,newline:c,ssr:a}=n,u=Array.from(e.helpers),p=u.length>0,f=!s&&"module"!==o,d=n;!function(e,t){const{push:n,newline:o,runtimeGlobalName:r}=t,s=r,i=Array.from(e.helpers);if(i.length>0&&(n(`const _Vue = ${s}\n`),e.hoists.length)){n(`const { ${[tc,nc,oc,rc,sc].filter((e=>i.includes(e))).map(ru).join(", ")} } = _Vue\n`)}(function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:o}=t;o();for(let r=0;r0)&&c()),e.directives.length&&(lu(e.directives,"directive",n),e.temps>0&&c()),e.temps>0){r("let ");for(let t=0;t0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(r("\n"),c()),a||r("return "),e.codegenNode?uu(e.codegenNode,n):r("null"),f&&(l(),r("}")),l(),r("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function lu(e,t,{helper:n,push:o,newline:r,isTS:s}){const i=n("component"===t?ic:cc);for(let l=0;l3||!1;t.push("["),n&&t.indent(),au(e,t,n),n&&t.deindent(),t.push("]")}function au(e,t,n=!1,o=!0){const{push:r,newline:s}=t;for(let i=0;ie||"null"))}([s,i,l,c,a]),t),n(")"),p&&n(")");u&&(n(", "),uu(u,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:o,pure:r}=t,s=v(e.callee)?e.callee:o(e.callee);r&&n(ou);n(s+"(",e),au(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:o,deindent:r,newline:s}=t,{properties:i}=e;if(!i.length)return void n("{}",e);const l=i.length>1||!1;n(l?"{":"{ "),l&&o();for(let c=0;c "),(c||l)&&(n("{"),o());i?(c&&n("return "),f(i)?cu(i,t):uu(i,t)):l&&uu(l,t);(c||l)&&(r(),n("}"));a&&n(")")}(e,t);break;case 19:!function(e,t){const{test:n,consequent:o,alternate:r,newline:s}=e,{push:i,indent:l,deindent:c,newline:a}=t;if(4===n.type){const e=!Zc(n.content);e&&i("("),pu(n,t),e&&i(")")}else i("("),uu(n,t),i(")");s&&l(),t.indentLevel++,s||i(" "),i("? "),uu(o,t),t.indentLevel--,s&&a(),s||i(" "),i(": ");const u=19===r.type;u||t.indentLevel++;uu(r,t),u||t.indentLevel--;s&&c(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:o,indent:r,deindent:s,newline:i}=t;n(`_cache[${e.index}] || (`),e.isVNode&&(r(),n(`${o(kc)}(-1),`),i());n(`_cache[${e.index}] = `),uu(e.value,t),e.isVNode&&(n(","),i(),n(`${o(kc)}(1),`),i(),n(`_cache[${e.index}]`),s());n(")")}(e,t);break;case 21:au(e.body,t,!0,!1)}}function pu(e,t){const{content:n,isStatic:o}=e;t.push(o?JSON.stringify(n):n,e)}function fu(e,t){for(let n=0;nfunction(e,t,n,o){if(!("else"===t.name||t.exp&&t.exp.content.trim())){const o=t.exp?t.exp.loc:e.loc;n.onError(Kl(28,t.loc)),t.exp=Bc("true",!1,o)}if("if"===t.name){const r=mu(e,t),s={type:9,loc:e.loc,branches:[r]};if(n.replaceNode(s),o)return o(s,r,!0)}else{const r=n.parent.children;let s=r.indexOf(e);for(;s-- >=-1;){const i=r[s];if(i&&3===i.type)n.removeNode(i);else{if(!i||2!==i.type||i.content.trim().length){if(i&&9===i.type){"else-if"===t.name&&void 0===i.branches[i.branches.length-1].condition&&n.onError(Kl(30,e.loc)),n.removeNode();const r=mu(e,t);i.branches.push(r);const s=o&&o(i,r,!1);tu(r,n),s&&s(),n.currentNode=null}else n.onError(Kl(30,e.loc));break}n.removeNode(i)}}}}(e,t,n,((e,t,o)=>{const r=n.parent.children;let s=r.indexOf(e),i=0;for(;s-- >=0;){const e=r[s];e&&9===e.type&&(i+=e.branches.length)}return()=>{if(o)e.codegenNode=gu(t,i,n);else{const o=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);o.alternate=gu(t,i+e.branches.length-1,n)}}}))));function mu(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!ra(e,"for")?e.children:[e],userKey:sa(e,"key"),isTemplateIf:n}}function gu(e,t,n){return e.condition?Dc(e.condition,vu(e,t,n),jc(n.helper(oc),['""',"true"])):vu(e,t,n)}function vu(e,t,n){const{helper:o}=n,r=Ic("key",Bc(`${t}`,!1,Fc,2)),{children:s}=e,i=s[0];if(1!==s.length||1!==i.type){if(1===s.length&&11===i.type){const e=i.codegenNode;return da(e,r,n),e}{let t=64;return Rc(n,o(Gl),Vc([r]),s,t+"",void 0,void 0,!0,!1,!1,e.loc)}}{const e=i.codegenNode,t=14===(l=e).type&&l.callee===$c?l.arguments[1].returns:l;return 13===t.type&&zc(t,n),da(t,r,n),e}var l}const yu=nu("for",((e,t,n)=>{const{helper:o,removeHelper:r}=n;return function(e,t,n,o){if(!t.exp)return void n.onError(Kl(31,t.loc));const r=xu(t.exp);if(!r)return void n.onError(Kl(32,t.loc));const{scopes:s}=n,{source:i,value:l,key:c,index:a}=r,u={type:11,loc:t.loc,source:i,valueAlias:l,keyAlias:c,objectIndexAlias:a,parseResult:r,children:aa(e)?e.children:[e]};n.replaceNode(u),s.vFor++;const p=o&&o(u);return()=>{s.vFor--,p&&p()}}(e,t,n,(t=>{const s=jc(o(pc),[t.source]),i=aa(e),l=ra(e,"memo"),c=sa(e,"key"),a=c&&(6===c.type?Bc(c.value.content,!0):c.exp),u=c?Ic("key",a):null,p=4===t.source.type&&t.source.constType>0,f=p?64:c?128:256;return t.codegenNode=Rc(n,o(Gl),void 0,s,f+"",void 0,void 0,!0,!p,!1,e.loc),()=>{let c;const{children:f}=t,d=1!==f.length||1!==f[0].type,h=ua(e)?e:i&&1===e.children.length&&ua(e.children[0])?e.children[0]:null;if(h?(c=h.codegenNode,i&&u&&da(c,u,n)):d?c=Rc(n,o(Gl),u?Vc([u]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(c=f[0].codegenNode,i&&u&&da(c,u,n),c.isBlock!==!p&&(c.isBlock?(r(Ql),r(Wc(n.inSSR,c.isComponent))):r(Hc(n.inSSR,c.isComponent))),c.isBlock=!p,c.isBlock?(o(Ql),o(Wc(n.inSSR,c.isComponent))):o(Hc(n.inSSR,c.isComponent))),l){const e=Uc(ku(t.parseResult,[Bc("_cached")]));e.body={type:21,body:[Lc(["const _memo = (",l.exp,")"]),Lc(["if (_cached",...a?[" && _cached.key === ",a]:[],` && ${n.helperString(Pc)}(_cached, _memo)) return _cached`]),Lc(["const _item = ",c]),Bc("_item.memo = _memo"),Bc("return _item")],loc:Fc},s.arguments.push(e,Bc("_cache"),Bc(String(n.cached++)))}else s.arguments.push(Uc(ku(t.parseResult),c,!0))}}))}));const _u=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,bu=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Su=/^\(|\)$/g;function xu(e,t){const n=e.loc,o=e.content,r=o.match(_u);if(!r)return;const[,s,i]=r,l={source:Cu(n,i.trim(),o.indexOf(i,s.length)),value:void 0,key:void 0,index:void 0};let c=s.trim().replace(Su,"").trim();const a=s.indexOf(c),u=c.match(bu);if(u){c=c.replace(bu,"").trim();const e=u[1].trim();let t;if(e&&(t=o.indexOf(e,a+c.length),l.key=Cu(n,e,t)),u[2]){const r=u[2].trim();r&&(l.index=Cu(n,r,o.indexOf(r,l.key?t+e.length:a+c.length)))}}return c&&(l.value=Cu(n,c,a)),l}function Cu(e,t,n){return Bc(t,!1,ta(e,n,t.length))}function ku({value:e,key:t,index:n},o=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||Bc("_".repeat(t+1),!1)))}([e,t,n,...o])}const wu=Bc("undefined",!1),Tu=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=ra(e,"slot");if(n)return t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},Eu=(e,t,n)=>Uc(e,t,!1,!0,t.length?t[0].loc:n);function Nu(e,t,n=Eu){t.helper(Ec);const{children:o,loc:r}=e,s=[],i=[];let l=t.scopes.vSlot>0||t.scopes.vFor>0;const c=ra(e,"slot",!0);if(c){const{arg:e,exp:t}=c;e&&!Kc(e)&&(l=!0),s.push(Ic(e||Bc("default",!0),n(t,o,r)))}let a=!1,u=!1;const p=[],f=new Set;let d=0;for(let g=0;gIc("default",n(e,t,r));a?p.length&&p.some((e=>Pu(e)))&&(u?t.onError(Kl(39,p[0].loc)):s.push(e(void 0,p))):s.push(e(void 0,o))}const h=l?2:$u(e.children)?3:1;let m=Vc(s.concat(Ic("_",Bc(h+"",!1))),r);return i.length&&(m=jc(t.helper(dc),[m,Mc(i)])),{slots:m,hasDynamicSlots:l}}function Ou(e,t,n){const o=[Ic("name",e),Ic("fn",t)];return null!=n&&o.push(Ic("key",Bc(String(n),!0))),Vc(o)}function $u(e){for(let t=0;tfunction(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:o}=e,r=1===e.tagType;let s=r?function(e,t,n=!1){let{tag:o}=e;const r=Iu(o),s=sa(e,"is");if(s)if(r){const e=6===s.type?s.value&&Bc(s.value.content,!0):s.exp;if(e)return jc(t.helper(lc),[e])}else 6===s.type&&s.value.content.startsWith("vue:")&&(o=s.value.content.slice(4));const i=!r&&ra(e,"is");if(i&&i.exp)return jc(t.helper(lc),[i.exp]);const l=qc(o)||t.isBuiltInComponent(o);if(l)return n||t.helper(l),l;return t.helper(ic),t.components.add(o),ma(o,"component")}(e,t):`"${n}"`;const i=_(s)&&s.callee===lc;let l,c,a,u,p,f,d=0,h=i||s===ql||s===Jl||!r&&("svg"===n||"foreignObject"===n);if(o.length>0){const n=Ru(e,t,void 0,r,i);l=n.props,d=n.patchFlag,p=n.dynamicPropNames;const o=n.directives;f=o&&o.length?Mc(o.map((e=>function(e,t){const n=[],o=Au.get(e);o?n.push(t.helperString(o)):(t.helper(cc),t.directives.add(e.name),n.push(ma(e.name,"directive")));const{loc:r}=e;e.exp&&n.push(e.exp);e.arg&&(e.exp||n.push("void 0"),n.push(e.arg));if(Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=Bc("true",!1,r);n.push(Vc(e.modifiers.map((e=>Ic(e,t))),r))}return Mc(n,e.loc)}(e,t)))):void 0,n.shouldUseBlock&&(h=!0)}if(e.children.length>0){s===Zl&&(h=!0,d|=1024);if(r&&s!==ql&&s!==Zl){const{slots:n,hasDynamicSlots:o}=Nu(e,t);c=n,o&&(d|=1024)}else if(1===e.children.length&&s!==ql){const n=e.children[0],o=n.type,r=5===o||8===o;r&&0===Ga(n,t)&&(d|=1),c=r||2===o?n:e.children}else c=e.children}0!==d&&(a=String(d),p&&p.length&&(u=function(e){let t="[";for(let n=0,o=e.length;n0;let h=!1,m=0,g=!1,v=!1,_=!1,b=!1,S=!1,x=!1;const C=[],k=e=>{u.length&&(p.push(Vc(Mu(u),c)),u=[]),e&&p.push(e)},E=({key:e,value:n})=>{if(Kc(e)){const s=e.content,l=i(s);if(!l||o&&!r||"onclick"===s.toLowerCase()||"onUpdate:modelValue"===s||w(s)||(b=!0),l&&w(s)&&(x=!0),20===n.type||(4===n.type||8===n.type)&&Ga(n,t)>0)return;"ref"===s?g=!0:"class"===s?v=!0:"style"===s?_=!0:"key"===s||C.includes(s)||C.push(s),!o||"class"!==s&&"style"!==s||C.includes(s)||C.push(s)}else S=!0};for(let i=0;i0&&u.push(Ic(Bc("ref_for",!0),Bc("true")))),"is"===n&&(Iu(l)||o&&o.content.startsWith("vue:")))continue;u.push(Ic(Bc(n,!0,ta(e,0,n.length)),Bc(o?o.content:"",s,o?o.loc:e)))}else{const{name:n,arg:i,exp:a,loc:m}=r,g="bind"===n,v="on"===n;if("slot"===n){o||t.onError(Kl(40,m));continue}if("once"===n||"memo"===n)continue;if("is"===n||g&&ia(i,"is")&&Iu(l))continue;if(v&&s)continue;if((g&&ia(i,"key")||v&&d&&ia(i,"vue:before-update"))&&(h=!0),g&&ia(i,"ref")&&t.scopes.vFor>0&&u.push(Ic(Bc("ref_for",!0),Bc("true"))),!i&&(g||v)){S=!0,a?g?(k(),p.push(a)):k({type:14,loc:m,callee:t.helper(bc),arguments:o?[a]:[a,"true"]}):t.onError(Kl(g?34:35,m));continue}const _=t.directiveTransforms[n];if(_){const{props:n,needRuntime:o}=_(r,e,t);!s&&n.forEach(E),v&&i&&!Kc(i)?k(Vc(n,c)):u.push(...n),o&&(f.push(r),y(o)&&Au.set(r,o))}else T(n)||(f.push(r),d&&(h=!0))}}let N;if(p.length?(k(),N=p.length>1?jc(t.helper(mc),p,c):p[0]):u.length&&(N=Vc(Mu(u),c)),S?m|=16:(v&&!o&&(m|=2),_&&!o&&(m|=4),C.length&&(m|=8),b&&(m|=32)),h||0!==m&&32!==m||!(g||x||f.length>0)||(m|=512),!t.inSSR&&N)switch(N.type){case 15:let e=-1,n=-1,o=!1;for(let t=0;t{if(ua(e)){const{children:n,loc:o}=e,{slotName:r,slotProps:s}=function(e,t){let n,o='"default"';const r=[];for(let s=0;s0){const{props:o,directives:s}=Ru(e,t,r,!1,!1);n=o,s.length&&t.onError(Kl(36,s[0].loc))}return{slotName:o,slotProps:n}}(e,t),i=[t.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let l=2;s&&(i[2]=s,l=3),n.length&&(i[3]=Uc([],n,!1,!1,o),l=4),t.scopeId&&!t.slotted&&(l=5),i.splice(l),e.codegenNode=jc(t.helper(fc),i,o)}};const Lu=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,ju=(e,t,n,o)=>{const{loc:r,modifiers:s,arg:i}=e;let l;if(4===i.type)if(i.isStatic){let e=i.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`);l=Bc(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?F(O(e)):`on:${e}`,!0,i.loc)}else l=Lc([`${n.helperString(Cc)}(`,i,")"]);else l=i,l.children.unshift(`${n.helperString(Cc)}(`),l.children.push(")");let c=e.exp;c&&!c.content.trim()&&(c=void 0);let a=n.cacheHandlers&&!c&&!n.inVOnce;if(c){const e=ea(c.content),t=!(e||Lu.test(c.content)),n=c.content.includes(";");(t||a&&e)&&(c=Lc([`${t?"$event":"(...args)"} => ${n?"{":"("}`,c,n?"}":")"]))}let u={props:[Ic(l,c||Bc("() => {}",!1,r))]};return o&&(u=o(u)),a&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach((e=>e.key.isHandlerKey=!0)),u},Uu=(e,t,n)=>{const{exp:o,modifiers:r,loc:s}=e,i=e.arg;return 4!==i.type?(i.children.unshift("("),i.children.push(') || ""')):i.isStatic||(i.content=`${i.content} || ""`),r.includes("camel")&&(4===i.type?i.content=i.isStatic?O(i.content):`${n.helperString(Sc)}(${i.content})`:(i.children.unshift(`${n.helperString(Sc)}(`),i.children.push(")"))),n.inSSR||(r.includes("prop")&&Du(i,"."),r.includes("attr")&&Du(i,"^")),!o||4===o.type&&!o.content.trim()?{props:[Ic(i,Bc("",!0,s))]}:{props:[Ic(i,o)]}},Du=(e,t)=>{4===e.type?e.content=e.isStatic?t+e.content:`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},Hu=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let o,r=!1;for(let e=0;e7===e.type&&!t.directiveTransforms[e.name])))))for(let e=0;e{if(1===e.type&&ra(e,"once",!0)){if(Wu.has(e)||t.inVOnce||t.inSSR)return;return Wu.add(e),t.inVOnce=!0,t.helper(kc),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},Ku=(e,t,n)=>{const{exp:o,arg:r}=e;if(!o)return n.onError(Kl(41,e.loc)),Gu();const s=o.loc.source,i=4===o.type?o.content:s,l=n.bindingMetadata[s];if("props"===l||"props-aliased"===l)return Gu();if(!i.trim()||!ea(i))return n.onError(Kl(42,o.loc)),Gu();const c=r||Bc("modelValue",!0),a=r?Kc(r)?`onUpdate:${O(r.content)}`:Lc(['"onUpdate:" + ',r]):"onUpdate:modelValue";let u;u=Lc([`${n.isTS?"($event: any)":"$event"} => ((`,o,") = $event)"]);const p=[Ic(c,e.exp),Ic(a,u)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>(Zc(e)?e:JSON.stringify(e))+": true")).join(", "),n=r?Kc(r)?`${r.content}Modifiers`:Lc([r,' + "Modifiers"']):"modelModifiers";p.push(Ic(n,Bc(`{ ${t} }`,!1,e.loc,2)))}return Gu(p)};function Gu(e=[]){return{props:e}}const qu=new WeakSet,Ju=(e,t)=>{if(1===e.type){const n=ra(e,"memo");if(!n||qu.has(e))return;return qu.add(e),()=>{const o=e.codegenNode||t.currentNode.codegenNode;o&&13===o.type&&(1!==e.tagType&&zc(o,t),e.codegenNode=jc(t.helper($c),[n.exp,Uc(void 0,o),"_cache",String(t.cached++)]))}}};function Zu(e,t={}){const n=t.onError||Wl,o="module"===t.mode;!0===t.prefixIdentifiers?n(Kl(47)):o&&n(Kl(48));t.cacheHandlers&&n(Kl(49)),t.scopeId&&!o&&n(Kl(50));const r=v(e)?_a(e,t):e,[s,i]=[[zu,hu,Ju,yu,Bu,Fu,Tu,Hu],{on:ju,bind:Uu,model:Ku}];return eu(r,c({},t,{prefixIdentifiers:false,nodeTransforms:[...s,...t.nodeTransforms||[]],directiveTransforms:c({},i,t.directiveTransforms||{})})),iu(r,c({},t,{prefixIdentifiers:false}))}const Yu=Symbol(""),Qu=Symbol(""),Xu=Symbol(""),ep=Symbol(""),tp=Symbol(""),np=Symbol(""),op=Symbol(""),rp=Symbol(""),sp=Symbol(""),ip=Symbol("");var lp;let cp;lp={[Yu]:"vModelRadio",[Qu]:"vModelCheckbox",[Xu]:"vModelText",[ep]:"vModelSelect",[tp]:"vModelDynamic",[np]:"withModifiers",[op]:"withKeys",[rp]:"vShow",[sp]:"Transition",[ip]:"TransitionGroup"},Object.getOwnPropertySymbols(lp).forEach((e=>{Ac[e]=lp[e]}));const ap=e("style,iframe,script,noscript",!0),up={isVoidTag:Z,isNativeTag:e=>q(e)||J(e),isPreTag:e=>"pre"===e,decodeEntities:function(e,t=!1){return cp||(cp=document.createElement("div")),t?(cp.innerHTML=`
`,cp.children[0].getAttribute("foo")):(cp.innerHTML=e,cp.textContent)},isBuiltInComponent:e=>Gc(e,"Transition")?sp:Gc(e,"TransitionGroup")?ip:void 0,getNamespace(e,t){let n=t?t.ns:0;if(t&&2===n)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some((e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content)))&&(n=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(n=0);else t&&1===n&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(n=0));if(0===n){if("svg"===e)return 1;if("math"===e)return 2}return n},getTextMode({tag:e,ns:t}){if(0===t){if("textarea"===e||"title"===e)return 1;if(ap(e))return 2}return 0}},pp=(e,t)=>{const n=z(e);return Bc(JSON.stringify(n),!1,t,3)};function fp(e,t){return Kl(e,t)}const dp=e("passive,once,capture"),hp=e("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),mp=e("left,right"),gp=e("onkeyup,onkeydown,onkeypress",!0),vp=(e,t)=>Kc(e)&&"onclick"===e.content.toLowerCase()?Bc(t,!0):4!==e.type?Lc(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,yp=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||t.removeNode()},_p=[e=>{1===e.type&&e.props.forEach(((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:Bc("style",!0,t.loc),exp:pp(t.value.content,t.loc),modifiers:[],loc:t.loc})}))}],bp={cloak:()=>({props:[]}),html:(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError(fp(53,r)),t.children.length&&(n.onError(fp(54,r)),t.children.length=0),{props:[Ic(Bc("innerHTML",!0,r),o||Bc("",!0))]}},text:(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError(fp(55,r)),t.children.length&&(n.onError(fp(56,r)),t.children.length=0),{props:[Ic(Bc("textContent",!0),o?Ga(o,n)>0?o:jc(n.helperString(hc),[o],r):Bc("",!0))]}},model:(e,t,n)=>{const o=Ku(e,t,n);if(!o.props.length||1===t.tagType)return o;e.arg&&n.onError(fp(58,e.arg.loc));const{tag:r}=t,s=n.isCustomElement(r);if("input"===r||"textarea"===r||"select"===r||s){let i=Xu,l=!1;if("input"===r||s){const o=sa(t,"type");if(o){if(7===o.type)i=tp;else if(o.value)switch(o.value.content){case"radio":i=Yu;break;case"checkbox":i=Qu;break;case"file":l=!0,n.onError(fp(59,e.loc))}}else(function(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))})(t)&&(i=tp)}else"select"===r&&(i=ep);l||(o.needRuntime=n.helper(i))}else n.onError(fp(57,e.loc));return o.props=o.props.filter((e=>!(4===e.key.type&&"modelValue"===e.key.content))),o},on:(e,t,n)=>ju(e,t,n,(t=>{const{modifiers:o}=e;if(!o.length)return t;let{key:r,value:s}=t.props[0];const{keyModifiers:i,nonKeyModifiers:l,eventOptionModifiers:c}=((e,t,n,o)=>{const r=[],s=[],i=[];for(let l=0;l{const{exp:o,loc:r}=e;return o||n.onError(fp(61,r)),{props:[],needRuntime:n.helper(rp)}}};const Sp=Object.create(null);function xp(e,t){if(!v(e)){if(!e.nodeType)return o;e=e.innerHTML}const n=e,r=Sp[n];if(r)return r;if("#"===e[0]){const t=document.querySelector(e);e=t?t.innerHTML:""}const s=c({hoistStatic:!0,onError:void 0,onWarn:o},t);s.isCustomElement||"undefined"==typeof customElements||(s.isCustomElement=e=>!!customElements.get(e));const{code:i}=function(e,t={}){return Zu(e,c({},up,t,{nodeTransforms:[yp,..._p,...t.nodeTransforms||[]],directiveTransforms:c({},bp,t.directiveTransforms||{}),transformHoist:null}))}(e,s),l=new Function("Vue",i)(Hl);return l._rc=!0,Sp[n]=l}ni(xp);export{lo as BaseTransition,io as BaseTransitionPropsValidators,ms as Comment,re as EffectScope,ds as Fragment,bo as KeepAlive,ye as ReactiveEffect,gs as Static,Un as Suspense,ps as Teleport,hs as Text,Hi as Transition,cl as TransitionGroup,Vi as VueElement,Xt as assertNumber,tn as callWithAsyncErrorHandling,en as callWithErrorHandling,O as camelize,A as capitalize,Ms as cloneVNode,yi as compatUtils,xp as compile,ci as computed,Ll as createApp,ws as createBlock,Bs as createCommentVNode,ks as createElementBlock,As as createElementVNode,os as createHydrationRenderer,vr as createPropsRestProxy,ns as createRenderer,jl as createSSRApp,qo as createSlots,Is as createStaticVNode,Vs as createTextVNode,Fs as createVNode,zt as customRef,vo as defineAsyncComponent,mo as defineComponent,Fi as defineCustomElement,rr as defineEmits,sr as defineExpose,cr as defineModel,ir as defineOptions,or as defineProps,Ri as defineSSRCustomElement,lr as defineSlots,xn as devtools,be as effect,se as effectScope,Gs as getCurrentInstance,le as getCurrentScope,ho as getTransitionRawChildren,Rs as guardReactiveProps,ai as h,nn as handleError,Ir as hasInjectionContext,Bl as hydrate,fi as initCustomFormatter,Dl as initDirectivesForSSR,Vr as inject,hi as isMemoSame,Et as isProxy,kt as isReactive,wt as isReadonly,Rt as isRef,oi as isRuntimeOnly,Tt as isShallow,Ts as isVNode,Ot as markRaw,mr as mergeDefaults,gr as mergeModels,Ds as mergeProps,dn as nextTick,K as normalizeClass,G as normalizeProps,U as normalizeStyle,xo as onActivated,$o as onBeforeMount,Ro as onBeforeUnmount,Ao as onBeforeUpdate,Co as onDeactivated,Lo as onErrorCaptured,Po as onMounted,Bo as onRenderTracked,Io as onRenderTriggered,ce as onScopeDispose,Vo as onServerPrefetch,Mo as onUnmounted,Fo as onUpdated,_s as openBlock,An as popScopeId,Mr as provide,Ht as proxyRefs,Pn as pushScopeId,gn as queuePostFlushCb,_t as reactive,St as readonly,Mt as ref,ni as registerRuntimeCompiler,Il as render,Go as renderList,Jo as renderSlot,Uo as resolveComponent,Wo as resolveDirective,Ho as resolveDynamicComponent,vi as resolveFilter,ao as resolveTransitionHooks,xs as setBlockTracking,kn as setDevtoolsHook,fo as setTransitionHooks,bt as shallowReactive,xt as shallowReadonly,Vt as shallowRef,ui as ssrContextKey,gi as ssrUtils,Se as stop,te as toDisplayString,F as toHandlerKey,Yo as toHandlers,Nt as toRaw,Jt as toRef,Kt as toRefs,Ut as toValue,Ns as transformVNodeArgs,Lt as triggerRef,jt as unref,pr as useAttrs,Ii as useCssModule,Bi as useCssVars,fr as useModel,pi as useSSRContext,ur as useSlots,ro as useTransitionState,gl as vModelCheckbox,Cl as vModelDynamic,yl as vModelRadio,_l as vModelSelect,ml as vModelText,$l as vShow,mi as version,Qt as warn,Yn as watch,Gn as watchEffect,qn as watchPostEffect,Jn as watchSyncEffect,yr as withAsyncContext,Rn as withCtx,ar as withDefaults,no as withDirectives,Ol as withKeys,di as withMemo,El as withModifiers,Fn as withScopeId}; +/** +* vue v3.5.11 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */let e,t,n,r,i,l,s,o,a,c,u,d,p;function f(e){let t=/* @__PURE__ */Object.create(null);for(let n of e.split(","))t[n]=1;return e=>e in t}let h={},m=[],g=()=>{},y=()=>!1,b=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||97>e.charCodeAt(2)),_=e=>e.startsWith("onUpdate:"),S=Object.assign,x=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},C=Object.prototype.hasOwnProperty,T=(e,t)=>C.call(e,t),k=Array.isArray,w=e=>"[object Map]"===L(e),N=e=>"[object Set]"===L(e),E=e=>"[object Date]"===L(e),A=e=>"[object RegExp]"===L(e),R=e=>"function"==typeof e,I=e=>"string"==typeof e,O=e=>"symbol"==typeof e,P=e=>null!==e&&"object"==typeof e,M=e=>(P(e)||R(e))&&R(e.then)&&R(e.catch),D=Object.prototype.toString,L=e=>D.call(e),$=e=>L(e).slice(8,-1),F=e=>"[object Object]"===L(e),V=e=>I(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,B=/* @__PURE__ */f(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),U=/* @__PURE__ */f("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),j=e=>{let t=/* @__PURE__ */Object.create(null);return n=>t[n]||(t[n]=e(n))},H=/-(\w)/g,q=j(e=>e.replace(H,(e,t)=>t?t.toUpperCase():"")),W=/\B([A-Z])/g,K=j(e=>e.replace(W,"-$1").toLowerCase()),z=j(e=>e.charAt(0).toUpperCase()+e.slice(1)),J=j(e=>e?`on${z(e)}`:""),G=(e,t)=>!Object.is(e,t),Q=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},Z=e=>{let t=parseFloat(e);return isNaN(t)?e:t},Y=e=>{let t=I(e)?Number(e):NaN;return isNaN(t)?e:t},ee=()=>e||(e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}),et=/* @__PURE__ */f("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function en(e){if(k(e)){let t={};for(let n=0;n{if(e){let n=e.split(ei);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function eo(e){let t="";if(I(e))t=e;else if(k(e))for(let n=0;neh(e,t))}let eg=e=>!!(e&&!0===e.__v_isRef),ey=e=>I(e)?e:null==e?"":k(e)||P(e)&&(e.toString===D||!R(e.toString))?eg(e)?ey(e.value):JSON.stringify(e,ev,2):String(e),ev=(e,t)=>eg(t)?ev(e,t.value):w(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[eb(t,r)+" =>"]=n,e),{})}:N(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>eb(e))}:O(t)?eb(t):!P(t)||k(t)||F(t)?t:String(t),eb=(e,t="")=>{var n;return O(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};class e_{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=t,!e&&t&&(this.index=(t.scopes||(t.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e0)){if(i){let e=i;for(i=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}for(;r;){let t=r;for(r=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}}function eA(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function eR(e){let t;let n=e.depsTail,r=n;for(;r;){let e=r.prevDep;-1===r.version?(r===n&&(n=e),eP(r),function(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function eI(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(eO(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function eO(e){if(4&e.flags&&!(16&e.flags)||(e.flags&=-17,e.globalVersion===eU))return;e.globalVersion=eU;let t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!eI(e)){e.flags&=-3;return}let r=n,i=eL;n=e,eL=!0;try{eA(e);let n=e.fn(e._value);(0===t.version||G(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{n=r,eL=i,eR(e),e.flags&=-3}}function eP(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r),!n.subs&&n.computed){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)eP(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}function eM(e,t){e.effect instanceof ek&&(e=e.effect.fn);let n=new ek(e);t&&S(n,t);try{n.run()}catch(e){throw n.stop(),e}let r=n.run.bind(n);return r.effect=n,r}function eD(e){e.effect.stop()}let eL=!0,e$=[];function eF(){e$.push(eL),eL=!1}function eV(){let e=e$.pop();eL=void 0===e||e}function eB(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=n;n=void 0;try{t()}finally{n=e}}}let eU=0;class ej{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class eH{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!n||!eL||n===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==n)t=this.activeLink=new ej(n,this),n.deps?(t.prevDep=n.depsTail,n.depsTail.nextDep=t,n.depsTail=t):n.deps=n.depsTail=t,function e(t){if(t.dep.sc++,4&t.sub.flags){let n=t.dep.computed;if(n&&!t.dep.subs){n.flags|=20;for(let t=n.deps;t;t=t.nextDep)e(t)}let r=t.dep.subs;r!==t&&(t.prevSub=r,r&&(r.nextSub=t)),t.dep.subs=t}}(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=n.depsTail,t.nextDep=void 0,n.depsTail.nextDep=t,n.depsTail=t,n.deps===t&&(n.deps=e)}return t}trigger(e){this.version++,eU++,this.notify(e)}notify(e){ew++;try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{eE()}}}let eq=/* @__PURE__ */new WeakMap,eW=Symbol(""),eK=Symbol(""),ez=Symbol("");function eJ(e,t,r){if(eL&&n){let t=eq.get(e);t||eq.set(e,t=/* @__PURE__ */new Map);let n=t.get(r);n||(t.set(r,n=new eH),n.map=t,n.key=r),n.track()}}function eG(e,t,n,r,i,l){let s=eq.get(e);if(!s){eU++;return}let o=e=>{e&&e.trigger()};if(ew++,"clear"===t)s.forEach(o);else{let i=k(e),l=i&&V(n);if(i&&"length"===n){let e=Number(r);s.forEach((t,n)=>{("length"===n||n===ez||!O(n)&&n>=e)&&o(t)})}else switch(void 0!==n&&o(s.get(n)),l&&o(s.get(ez)),t){case"add":i?l&&o(s.get("length")):(o(s.get(eW)),w(e)&&o(s.get(eK)));break;case"delete":!i&&(o(s.get(eW)),w(e)&&o(s.get(eK)));break;case"set":w(e)&&o(s.get(eW))}}eE()}function eQ(e){let t=tV(e);return t===e?t:(eJ(t,"iterate",ez),t$(e)?t:t.map(tU))}function eX(e){return eJ(e=tV(e),"iterate",ez),e}let eZ={__proto__:null,[Symbol.iterator](){return eY(this,Symbol.iterator,tU)},concat(...e){return eQ(this).concat(...e.map(e=>k(e)?eQ(e):e))},entries(){return eY(this,"entries",e=>(e[1]=tU(e[1]),e))},every(e,t){return e1(this,"every",e,t,void 0,arguments)},filter(e,t){return e1(this,"filter",e,t,e=>e.map(tU),arguments)},find(e,t){return e1(this,"find",e,t,tU,arguments)},findIndex(e,t){return e1(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return e1(this,"findLast",e,t,tU,arguments)},findLastIndex(e,t){return e1(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return e1(this,"forEach",e,t,void 0,arguments)},includes(...e){return e6(this,"includes",e)},indexOf(...e){return e6(this,"indexOf",e)},join(e){return eQ(this).join(e)},lastIndexOf(...e){return e6(this,"lastIndexOf",e)},map(e,t){return e1(this,"map",e,t,void 0,arguments)},pop(){return e3(this,"pop")},push(...e){return e3(this,"push",e)},reduce(e,...t){return e2(this,"reduce",e,t)},reduceRight(e,...t){return e2(this,"reduceRight",e,t)},shift(){return e3(this,"shift")},some(e,t){return e1(this,"some",e,t,void 0,arguments)},splice(...e){return e3(this,"splice",e)},toReversed(){return eQ(this).toReversed()},toSorted(e){return eQ(this).toSorted(e)},toSpliced(...e){return eQ(this).toSpliced(...e)},unshift(...e){return e3(this,"unshift",e)},values(){return eY(this,"values",tU)}};function eY(e,t,n){let r=eX(e),i=r[t]();return r===e||t$(e)||(i._next=i.next,i.next=()=>{let e=i._next();return e.value&&(e.value=n(e.value)),e}),i}let e0=Array.prototype;function e1(e,t,n,r,i,l){let s=eX(e),o=s!==e&&!t$(e),a=s[t];if(a!==e0[t]){let t=a.apply(e,l);return o?tU(t):t}let c=n;s!==e&&(o?c=function(t,r){return n.call(this,tU(t),r,e)}:n.length>2&&(c=function(t,r){return n.call(this,t,r,e)}));let u=a.call(s,c,r);return o&&i?i(u):u}function e2(e,t,n,r){let i=eX(e),l=n;return i!==e&&(t$(e)?n.length>3&&(l=function(t,r,i){return n.call(this,t,r,i,e)}):l=function(t,r,i){return n.call(this,t,tU(r),i,e)}),i[t](l,...r)}function e6(e,t,n){let r=tV(e);eJ(r,"iterate",ez);let i=r[t](...n);return(-1===i||!1===i)&&tF(n[0])?(n[0]=tV(n[0]),r[t](...n)):i}function e3(e,t,n=[]){eF(),ew++;let r=tV(e)[t].apply(e,n);return eE(),eV(),r}let e4=/* @__PURE__ */f("__proto__,__v_isRef,__isVue"),e8=new Set(/* @__PURE__ */Object.getOwnPropertyNames(Symbol).filter(e=>"arguments"!==e&&"caller"!==e).map(e=>Symbol[e]).filter(O));function e5(e){O(e)||(e=String(e));let t=tV(this);return eJ(t,"has",e),t.hasOwnProperty(e)}class e9{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){let r=this._isReadonly,i=this._isShallow;if("__v_isReactive"===t)return!r;if("__v_isReadonly"===t)return r;if("__v_isShallow"===t)return i;if("__v_raw"===t)return n===(r?i?tA:tE:i?tN:tw).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let l=k(e);if(!r){let e;if(l&&(e=eZ[t]))return e;if("hasOwnProperty"===t)return e5}let s=Reflect.get(e,t,tH(e)?e:n);return(O(t)?e8.has(t):e4(t))?s:(r||eJ(e,"get",t),i)?s:tH(s)?l&&V(t)?s:s.value:P(s)?r?tO(s):tR(s):s}}class e7 extends e9{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t];if(!this._isShallow){let t=tL(i);if(t$(n)||tL(n)||(i=tV(i),n=tV(n)),!k(e)&&tH(i)&&!tH(n))return!t&&(i.value=n,!0)}let l=k(e)&&V(t)?Number(t)e,ts=e=>Reflect.getPrototypeOf(e);function to(e,t,n=!1,r=!1){let i=tV(e=e.__v_raw),l=tV(t);n||(G(t,l)&&eJ(i,"get",t),eJ(i,"get",l));let{has:s}=ts(i),o=r?tl:n?tj:tU;return s.call(i,t)?o(e.get(t)):s.call(i,l)?o(e.get(l)):void(e!==i&&e.get(t))}function ta(e,t=!1){let n=this.__v_raw,r=tV(n),i=tV(e);return t||(G(e,i)&&eJ(r,"has",e),eJ(r,"has",i)),e===i?n.has(e):n.has(e)||n.has(i)}function tc(e,t=!1){return e=e.__v_raw,t||eJ(tV(e),"iterate",eW),Reflect.get(e,"size",e)}function tu(e,t=!1){t||t$(e)||tL(e)||(e=tV(e));let n=tV(this);return ts(n).has.call(n,e)||(n.add(e),eG(n,"add",e,e)),this}function td(e,t,n=!1){n||t$(t)||tL(t)||(t=tV(t));let r=tV(this),{has:i,get:l}=ts(r),s=i.call(r,e);s||(e=tV(e),s=i.call(r,e));let o=l.call(r,e);return r.set(e,t),s?G(t,o)&&eG(r,"set",e,t):eG(r,"add",e,t),this}function tp(e){let t=tV(this),{has:n,get:r}=ts(t),i=n.call(t,e);i||(e=tV(e),i=n.call(t,e)),r&&r.call(t,e);let l=t.delete(e);return i&&eG(t,"delete",e,void 0),l}function tf(){let e=tV(this),t=0!==e.size,n=e.clear();return t&&eG(e,"clear",void 0,void 0),n}function th(e,t){return function(n,r){let i=this,l=i.__v_raw,s=tV(l),o=t?tl:e?tj:tU;return e||eJ(s,"iterate",eW),l.forEach((e,t)=>n.call(r,o(e),o(t),i))}}function tm(e,t,n){return function(...r){let i=this.__v_raw,l=tV(i),s=w(l),o="entries"===e||e===Symbol.iterator&&s,a=i[e](...r),c=n?tl:t?tj:tU;return t||eJ(l,"iterate","keys"===e&&s?eK:eW),{next(){let{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:o?[c(e[0]),c(e[1])]:c(e),done:t}},[Symbol.iterator](){return this}}}}function tg(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}let[ty,tv,tb,t_]=/* @__PURE__ */function(){let e={get(e){return to(this,e)},get size(){return tc(this)},has:ta,add:tu,set:td,delete:tp,clear:tf,forEach:th(!1,!1)},t={get(e){return to(this,e,!1,!0)},get size(){return tc(this)},has:ta,add(e){return tu.call(this,e,!0)},set(e,t){return td.call(this,e,t,!0)},delete:tp,clear:tf,forEach:th(!1,!0)},n={get(e){return to(this,e,!0)},get size(){return tc(this,!0)},has(e){return ta.call(this,e,!0)},add:tg("add"),set:tg("set"),delete:tg("delete"),clear:tg("clear"),forEach:th(!0,!1)},r={get(e){return to(this,e,!0,!0)},get size(){return tc(this,!0)},has(e){return ta.call(this,e,!0)},add:tg("add"),set:tg("set"),delete:tg("delete"),clear:tg("clear"),forEach:th(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=tm(i,!1,!1),n[i]=tm(i,!0,!1),t[i]=tm(i,!1,!0),r[i]=tm(i,!0,!0)}),[e,n,t,r]}();function tS(e,t){let n=t?e?t_:tb:e?tv:ty;return(t,r,i)=>"__v_isReactive"===r?!e:"__v_isReadonly"===r?e:"__v_raw"===r?t:Reflect.get(T(n,r)&&r in t?n:t,r,i)}let tx={get:/* @__PURE__ */tS(!1,!1)},tC={get:/* @__PURE__ */tS(!1,!0)},tT={get:/* @__PURE__ */tS(!0,!1)},tk={get:/* @__PURE__ */tS(!0,!0)},tw=/* @__PURE__ */new WeakMap,tN=/* @__PURE__ */new WeakMap,tE=/* @__PURE__ */new WeakMap,tA=/* @__PURE__ */new WeakMap;function tR(e){return tL(e)?e:tM(e,!1,tt,tx,tw)}function tI(e){return tM(e,!1,tr,tC,tN)}function tO(e){return tM(e,!0,tn,tT,tE)}function tP(e){return tM(e,!0,ti,tk,tA)}function tM(e,t,n,r,i){if(!P(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;let l=i.get(e);if(l)return l;let s=e.__v_skip||!Object.isExtensible(e)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}($(e));if(0===s)return e;let o=new Proxy(e,2===s?r:n);return i.set(e,o),o}function tD(e){return tL(e)?tD(e.__v_raw):!!(e&&e.__v_isReactive)}function tL(e){return!!(e&&e.__v_isReadonly)}function t$(e){return!!(e&&e.__v_isShallow)}function tF(e){return!!e&&!!e.__v_raw}function tV(e){let t=e&&e.__v_raw;return t?tV(t):e}function tB(e){return!T(e,"__v_skip")&&Object.isExtensible(e)&&X(e,"__v_skip",!0),e}let tU=e=>P(e)?tR(e):e,tj=e=>P(e)?tO(e):e;function tH(e){return!!e&&!0===e.__v_isRef}function tq(e){return tK(e,!1)}function tW(e){return tK(e,!0)}function tK(e,t){return tH(e)?e:new tz(e,t)}class tz{constructor(e,t){this.dep=new eH,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:tV(e),this._value=t?e:tU(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||t$(e)||tL(e);G(e=n?e:tV(e),t)&&(this._rawValue=e,this._value=n?e:tU(e),this.dep.trigger())}}function tJ(e){e.dep&&e.dep.trigger()}function tG(e){return tH(e)?e.value:e}function tQ(e){return R(e)?e():tG(e)}let tX={get:(e,t,n)=>"__v_raw"===t?e:tG(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return tH(i)&&!tH(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function tZ(e){return tD(e)?e:new Proxy(e,tX)}class tY{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new eH,{get:n,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}}function t0(e){return new tY(e)}function t1(e){let t=k(e)?Array(e.length):{};for(let n in e)t[n]=t4(e,n);return t}class t2{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){let e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){let n=eq.get(e);return n&&n.get(t)}(tV(this._object),this._key)}}class t6{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function t3(e,t,n){return tH(e)?e:R(e)?new t6(e):P(e)&&arguments.length>1?t4(e,t,n):tq(e)}function t4(e,t,n){let r=e[t];return tH(r)?r:new t2(e,t,n)}class t8{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new eH(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=eU-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags)&&n!==this)return eN(this,!0),!0}get value(){let e=this.dep.track();return eO(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}let t5={GET:"get",HAS:"has",ITERATE:"iterate"},t9={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},t7={},ne=/* @__PURE__ */new WeakMap;function nt(){return d}function nn(e,t=!1,n=d){if(n){let t=ne.get(n);t||ne.set(n,t=[]),t.push(e)}}function nr(e,t=1/0,n){if(t<=0||!P(e)||e.__v_skip||(n=n||/* @__PURE__ */new Set).has(e))return e;if(n.add(e),t--,tH(e))nr(e.value,t,n);else if(k(e))for(let r=0;r{nr(e,t,n)});else if(F(e)){for(let r in e)nr(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&nr(e[r],t,n)}return e}function ni(e,t){}let nl={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"};function ns(e,t,n,r){try{return r?e(...r):e()}catch(e){na(e,t,n)}}function no(e,t,n,r){if(R(e)){let i=ns(e,t,n,r);return i&&M(i)&&i.catch(e=>{na(e,t,n)}),i}if(k(e)){let i=[];for(let l=0;l=nx(n)?nc.push(e):nc.splice(function(e){let t=nu+1,n=nc.length;for(;t>>1,i=nc[r],l=nx(i);lnx(e)-nx(t));if(nd.length=0,np){np.push(...e);return}for(nf=0,np=e;nfnull==e.id?2&e.flags?-1:1/0:e.id,nC=null,nT=null;function nk(e){let t=nC;return nC=e,nT=e&&e.type.__scopeId||null,t}function nw(e){nT=e}function nN(){nT=null}let nE=e=>nA;function nA(e,t=nC,n){if(!t||e._n)return e;let r=(...n)=>{let i;r._d&&lg(-1);let l=nk(t);try{i=e(...n)}finally{nk(l),r._d&&lg(1)}return i};return r._n=!0,r._c=!0,r._d=!0,r}function nR(e,t){if(null===nC)return e;let n=lY(nC),r=e.dirs||(e.dirs=[]);for(let e=0;ee.__isTeleport,nM=e=>e&&(e.disabled||""===e.disabled),nD=e=>e&&(e.defer||""===e.defer),nL=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,n$=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,nF=(e,t)=>{let n=e&&e.to;return I(n)?t?t(n):null:n};function nV(e,t,n,{o:{insert:r},m:i},l=2){0===l&&r(e.targetAnchor,t,n);let{el:s,anchor:o,shapeFlag:a,children:c,props:u}=e,d=2===l;if(d&&r(s,t,n),(!d||nM(u))&&16&a)for(let e=0;e{16&b&&(i&&i.isCE&&(i.ce._teleportTarget=e),u(_,e,t,i,l,s,o,a))},p=()=>{let e=t.target=nF(t.props,h),n=nj(e,t,m,f);e&&("svg"!==s&&nL(e)?s="svg":"mathml"!==s&&n$(e)&&(s="mathml"),y||(d(e,n),nU(t)))};y&&(d(n,c),nU(t)),nD(t.props)?iL(p,l):p()}else{t.el=e.el,t.targetStart=e.targetStart;let r=t.anchor=e.anchor,u=t.target=e.target,f=t.targetAnchor=e.targetAnchor,m=nM(e.props),g=m?n:u;if("svg"===s||nL(u)?s="svg":("mathml"===s||n$(u))&&(s="mathml"),S?(p(e.dynamicChildren,S,g,i,l,s,o),iH(e,t,!0)):a||d(e,t,g,m?r:f,i,l,s,o,!1),y)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):nV(t,n,r,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=t.target=nF(t.props,h);e&&nV(t,e,null,c,0)}else m&&nV(t,u,f,c,1);nU(t)}},remove(e,t,n,{um:r,o:{remove:i}},l){let{shapeFlag:s,children:o,anchor:a,targetStart:c,targetAnchor:u,target:d,props:p}=e;if(d&&(i(c),i(u)),l&&i(a),16&s){let e=l||!nM(p);for(let i=0;i{e.isMounted=!0}),rA(()=>{e.isUnmounting=!0}),e}let nK=[Function,Array],nz={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:nK,onEnter:nK,onAfterEnter:nK,onEnterCancelled:nK,onBeforeLeave:nK,onLeave:nK,onAfterLeave:nK,onLeaveCancelled:nK,onBeforeAppear:nK,onAppear:nK,onAfterAppear:nK,onAppearCancelled:nK},nJ=e=>{let t=e.subTree;return t.component?nJ(t.component):t};function nG(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==lc){t=n;break}}return t}let nQ={name:"BaseTransition",props:nz,setup(e,{slots:t}){let n=lU(),r=nW();return()=>{let i=t.default&&n2(t.default(),!0);if(!i||!i.length)return;let l=nG(i),s=tV(e),{mode:o}=s;if(r.isLeaving)return nY(l);let a=n0(l);if(!a)return nY(l);let c=nZ(a,s,r,n,e=>c=e);a.type!==lc&&n1(a,c);let u=n.subTree,d=u&&n0(u);if(d&&d.type!==lc&&!lS(a,d)&&nJ(n).type!==lc){let e=nZ(d,s,r,n);if(n1(d,e),"out-in"===o&&a.type!==lc)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,8&n.job.flags||n.update(),delete e.afterLeave},nY(l);"in-out"===o&&a.type!==lc&&(e.delayLeave=(e,t,n)=>{nX(r,d)[String(d.key)]=d,e[nH]=()=>{t(),e[nH]=void 0,delete c.delayedLeave},c.delayedLeave=n})}return l}}};function nX(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=/* @__PURE__ */Object.create(null),n.set(t.type,r)),r}function nZ(e,t,n,r,i){let{appear:l,mode:s,persisted:o=!1,onBeforeEnter:a,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:p,onLeave:f,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:g,onAppear:y,onAfterAppear:b,onAppearCancelled:_}=t,S=String(e.key),x=nX(n,e),C=(e,t)=>{e&&no(e,r,9,t)},T=(e,t)=>{let n=t[1];C(e,t),k(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},w={mode:s,persisted:o,beforeEnter(t){let r=a;if(!n.isMounted){if(!l)return;r=g||a}t[nH]&&t[nH](!0);let i=x[S];i&&lS(e,i)&&i.el[nH]&&i.el[nH](),C(r,[t])},enter(e){let t=c,r=u,i=d;if(!n.isMounted){if(!l)return;t=y||c,r=b||u,i=_||d}let s=!1,o=e[nq]=t=>{s||(s=!0,t?C(i,[e]):C(r,[e]),w.delayedLeave&&w.delayedLeave(),e[nq]=void 0)};t?T(t,[e,o]):o()},leave(t,r){let i=String(e.key);if(t[nq]&&t[nq](!0),n.isUnmounting)return r();C(p,[t]);let l=!1,s=t[nH]=n=>{l||(l=!0,r(),n?C(m,[t]):C(h,[t]),t[nH]=void 0,x[i]!==e||delete x[i])};x[i]=e,f?T(f,[t,s]):s()},clone(e){let l=nZ(e,t,n,r,i);return i&&i(l),l}};return w}function nY(e){if(rm(e))return(e=lE(e)).children=null,e}function n0(e){if(!rm(e))return nP(e.type)&&e.children?nG(e.children):e;let{shapeFlag:t,children:n}=e;if(n){if(16&t)return n[0];if(32&t&&R(n.default))return n.default()}}function n1(e,t){6&e.shapeFlag&&e.component?(e.transition=t,n1(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function n2(e,t=!1,n){let r=[],i=0;for(let l=0;l1)for(let e=0;en.value,set:e=>n.value=e}),n}function n5(e,t,n,r,i=!1){if(k(e)){e.forEach((e,l)=>n5(e,t&&(k(t)?t[l]:t),n,r,i));return}if(rp(r)&&!i)return;let l=4&r.shapeFlag?lY(r.component):r.el,s=i?null:l,{i:o,r:a}=e,c=t&&t.r,u=o.refs===h?o.refs={}:o.refs,d=o.setupState,p=tV(d),f=d===h?()=>!1:e=>T(p,e);if(null!=c&&c!==a&&(I(c)?(u[c]=null,f(c)&&(d[c]=null)):tH(c)&&(c.value=null)),R(a))ns(a,o,12,[s,u]);else{let t=I(a),r=tH(a);if(t||r){let o=()=>{if(e.f){let n=t?f(a)?d[a]:u[a]:a.value;i?k(n)&&x(n,l):k(n)?n.includes(l)||n.push(l):t?(u[a]=[l],f(a)&&(d[a]=u[a])):(a.value=[l],e.k&&(u[e.k]=a.value))}else t?(u[a]=s,f(a)&&(d[a]=s)):r&&(a.value=s,e.k&&(u[e.k]=s))};s?(o.id=-1,iL(o,n)):o()}}}let n9=!1,n7=()=>{n9||(console.error("Hydration completed but contains mismatches."),n9=!0)},re=e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName,rt=e=>e.namespaceURI.includes("MathML"),rn=e=>{if(1===e.nodeType){if(re(e))return"svg";if(rt(e))return"mathml"}},rr=e=>8===e.nodeType;function ri(e){let{mt:t,p:n,o:{patchProp:r,createText:i,nextSibling:l,parentNode:s,remove:o,insert:a,createComment:c}}=e,u=(n,r,o,c,b,_=!1)=>{_=_||!!r.dynamicChildren;let S=rr(n)&&"["===n.data,x=()=>h(n,r,o,c,b,S),{type:C,ref:T,shapeFlag:k,patchFlag:w}=r,N=n.nodeType;r.el=n,-2===w&&(_=!1,r.dynamicChildren=null);let E=null;switch(C){case la:3!==N?""===r.children?(a(r.el=i(""),s(n),n),E=n):E=x():(n.data!==r.children&&(n7(),n.data=r.children),E=l(n));break;case lc:y(n)?(E=l(n),g(r.el=n.content.firstChild,n,o)):E=8!==N||S?x():l(n);break;case lu:if(S&&(N=(n=l(n)).nodeType),1===N||3===N){E=n;let e=!r.children.length;for(let t=0;t{s=s||!!t.dynamicChildren;let{type:a,props:c,patchFlag:u,shapeFlag:d,dirs:f,transition:h}=t,m="input"===a||"option"===a;if(m||-1!==u){let a;f&&nI(t,null,n,"created");let _=!1;if(y(e)){_=ij(i,h)&&n&&n.vnode.props&&n.vnode.props.appear;let r=e.content.firstChild;_&&h.beforeEnter(r),g(r,e,n),t.el=e=r}if(16&d&&!(c&&(c.innerHTML||c.textContent))){let r=p(e.firstChild,t,e,n,i,l,s);for(;r;){ro(e,1)||n7();let t=r;r=r.nextSibling,o(t)}}else if(8&d){let n=t.children;"\n"===n[0]&&("PRE"===e.tagName||"TEXTAREA"===e.tagName)&&(n=n.slice(1)),e.textContent!==n&&(ro(e,0)||n7(),e.textContent=t.children)}if(c){if(m||!s||48&u){let t=e.tagName.includes("-");for(let i in c)(m&&(i.endsWith("value")||"indeterminate"===i)||b(i)&&!B(i)||"."===i[0]||t)&&r(e,i,null,c[i],void 0,n)}else if(c.onClick)r(e,"onClick",null,c.onClick,void 0,n);else if(4&u&&tD(c.style))for(let e in c.style)c.style[e]}(a=c&&c.onVnodeBeforeMount)&&lL(a,n,t),f&&nI(t,null,n,"beforeMount"),((a=c&&c.onVnodeMounted)||f||_)&&ll(()=>{a&&lL(a,n,t),_&&h.enter(e),f&&nI(t,null,n,"mounted")},i)}return e.nextSibling},p=(e,t,r,s,o,c,d)=>{d=d||!!t.dynamicChildren;let p=t.children,f=p.length;for(let t=0;t{let{slotScopeIds:u}=t;u&&(i=i?i.concat(u):u);let d=s(e),f=p(l(e),t,d,n,r,i,o);return f&&rr(f)&&"]"===f.data?l(t.anchor=f):(n7(),a(t.anchor=c("]"),d,f),f)},h=(e,t,r,i,a,c)=>{if(ro(e.parentElement,1)||n7(),t.el=null,c){let t=m(e);for(;;){let n=l(e);if(n&&n!==t)o(n);else break}}let u=l(e),d=s(e);return o(e),n(null,t,d,u,r,i,rn(d),a),u},m=(e,t="[",n="]")=>{let r=0;for(;e;)if((e=l(e))&&rr(e)&&(e.data===t&&r++,e.data===n)){if(0===r)return l(e);r--}return e},g=(e,t,n)=>{let r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},y=e=>1===e.nodeType&&"TEMPLATE"===e.tagName;return[(e,t)=>{if(!t.hasChildNodes()){n(null,e,t),nS(),t._vnode=e;return}u(t.firstChild,e,null,null,null),nS(),t._vnode=e},u]}let rl="data-allow-mismatch",rs={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function ro(e,t){if(0===t||1===t)for(;e&&!e.hasAttribute(rl);)e=e.parentElement;let n=e&&e.getAttribute(rl);if(null==n)return!1;if(""===n)return!0;{let e=n.split(",");return!!(0===t&&e.includes("children"))||n.split(",").includes(rs[t])}}let ra=(e=1e4)=>t=>{let n=requestIdleCallback(t,{timeout:e});return()=>cancelIdleCallback(n)},rc=e=>(t,n)=>{let r=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){r.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(function(e){let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:l,innerWidth:s}=window;return(t>0&&t0&&r0&&n0&&ir.disconnect()},ru=e=>t=>{if(e){let n=matchMedia(e);if(!n.matches)return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t);t()}},rd=(e=[])=>(t,n)=>{I(e)&&(e=[e]);let r=!1,i=e=>{r||(r=!0,l(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},l=()=>{n(t=>{for(let n of e)t.removeEventListener(n,i)})};return n(t=>{for(let n of e)t.addEventListener(n,i,{once:!0})}),l},rp=e=>!!e.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function rf(e){let t;R(e)&&(e={loader:e});let{loader:n,loadingComponent:r,errorComponent:i,delay:l=200,hydrate:s,timeout:o,suspensible:a=!0,onError:c}=e,u=null,d=0,p=()=>(d++,u=null,f()),f=()=>{let e;return u||(e=u=n().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(p()),()=>n(e),d+1)});throw e}).then(n=>e!==u&&u?u:(n&&(n.__esModule||"Module"===n[Symbol.toStringTag])&&(n=n.default),t=n,n)))};return n6({name:"AsyncComponentWrapper",__asyncLoader:f,__asyncHydrate(e,n,r){let i=s?()=>{let t=s(r,t=>(function(e,t){if(rr(e)&&"["===e.data){let n=1,r=e.nextSibling;for(;r;){if(1===r.nodeType){if(!1===t(r))break}else if(rr(r)){if("]"===r.data){if(0==--n)break}else"["===r.data&&n++}r=r.nextSibling}}else t(e)})(e,t));t&&(n.bum||(n.bum=[])).push(t)}:r;t?i():f().then(()=>!n.isUnmounted&&i())},get __asyncResolved(){return t},setup(){let e=lB;if(n4(e),t)return()=>rh(t,e);let n=t=>{u=null,na(t,e,13,!i)};if(a&&e.suspense||lW)return f().then(t=>()=>rh(t,e)).catch(e=>(n(e),()=>i?lw(i,{error:e}):null));let s=tq(!1),c=tq(),d=tq(!!l);return l&&setTimeout(()=>{d.value=!1},l),null!=o&&setTimeout(()=>{if(!s.value&&!c.value){let e=Error(`Async component timed out after ${o}ms.`);n(e),c.value=e}},o),f().then(()=>{s.value=!0,e.parent&&rm(e.parent.vnode)&&e.parent.update()}).catch(e=>{n(e),c.value=e}),()=>s.value&&t?rh(t,e):c.value&&i?lw(i,{error:c.value}):r&&!d.value?lw(r):void 0}})}function rh(e,t){let{ref:n,props:r,children:i,ce:l}=t.vnode,s=lw(e,r,i);return s.ref=n,s.ce=l,delete t.vnode.ce,s}let rm=e=>e.type.__isKeepAlive,rg={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=lU(),r=n.ctx;if(!r.renderer)return()=>{let e=t.default&&t.default();return e&&1===e.length?e[0]:e};let i=/* @__PURE__ */new Map,l=/* @__PURE__ */new Set,s=null,o=n.suspense,{renderer:{p:a,m:c,um:u,o:{createElement:d}}}=r,p=d("div");function f(e){rS(e),u(e,n,o,!0)}function h(e){i.forEach((t,n)=>{let r=l0(t.type);r&&!e(r)&&m(n)})}function m(e){let t=i.get(e);!t||s&&lS(t,s)?s&&rS(s):f(t),i.delete(e),l.delete(e)}r.activate=(e,t,n,r,i)=>{let l=e.component;c(e,t,n,0,o),a(l.vnode,e,t,n,l,o,r,e.slotScopeIds,i),iL(()=>{l.isDeactivated=!1,l.a&&Q(l.a);let t=e.props&&e.props.onVnodeMounted;t&&lL(t,l.parent,e)},o)},r.deactivate=e=>{let t=e.component;iq(t.m),iq(t.a),c(e,p,null,1,o),iL(()=>{t.da&&Q(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&lL(n,t.parent,e),t.isDeactivated=!0},o)},iQ(()=>[e.include,e.exclude],([e,t])=>{e&&h(t=>ry(e,t)),t&&h(e=>!ry(t,e))},{flush:"post",deep:!0});let g=null,y=()=>{null!=g&&(i7(n.subTree.type)?iL(()=>{i.set(g,rx(n.subTree))},n.subTree.suspense):i.set(g,rx(n.subTree)))};return rw(y),rE(y),rA(()=>{i.forEach(e=>{let{subTree:t,suspense:r}=n,i=rx(t);if(e.type===i.type&&e.key===i.key){rS(i);let e=i.component.da;e&&iL(e,r);return}f(e)})}),()=>{if(g=null,!t.default)return s=null;let n=t.default(),r=n[0];if(n.length>1)return s=null,n;if(!l_(r)||!(4&r.shapeFlag)&&!(128&r.shapeFlag))return s=null,r;let o=rx(r);if(o.type===lc)return s=null,o;let a=o.type,c=l0(rp(o)?o.type.__asyncResolved||{}:a),{include:u,exclude:d,max:p}=e;if(u&&(!c||!ry(u,c))||d&&c&&ry(d,c))return o.shapeFlag&=-257,s=o,r;let f=null==o.key?a:o.key,h=i.get(f);return o.el&&(o=lE(o),128&r.shapeFlag&&(r.ssContent=o)),g=f,h?(o.el=h.el,o.component=h.component,o.transition&&n1(o,o.transition),o.shapeFlag|=512,l.delete(f),l.add(f)):(l.add(f),p&&l.size>parseInt(p,10)&&m(l.values().next().value)),o.shapeFlag|=256,s=o,i7(r.type)?r:o}}};function ry(e,t){return k(e)?e.some(e=>ry(e,t)):I(e)?e.split(",").includes(t):!!A(e)&&(e.lastIndex=0,e.test(t))}function rv(e,t){r_(e,"a",t)}function rb(e,t){r_(e,"da",t)}function r_(e,t,n=lB){let r=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(rC(t,r,n),n){let e=n.parent;for(;e&&e.parent;)rm(e.parent.vnode)&&function(e,t,n,r){let i=rC(t,e,r,!0);rR(()=>{x(r[t],i)},n)}(r,t,n,e),e=e.parent}}function rS(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function rx(e){return 128&e.shapeFlag?e.ssContent:e}function rC(e,t,n=lB,r=!1){if(n){let i=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...r)=>{eF();let i=lj(n),l=no(t,n,e,r);return i(),eV(),l});return r?i.unshift(l):i.push(l),l}}let rT=e=>(t,n=lB)=>{lW&&"sp"!==e||rC(e,(...e)=>t(...e),n)},rk=rT("bm"),rw=rT("m"),rN=rT("bu"),rE=rT("u"),rA=rT("bum"),rR=rT("um"),rI=rT("sp"),rO=rT("rtg"),rP=rT("rtc");function rM(e,t=lB){rC("ec",e,t)}let rD="components";function rL(e,t){return rB(rD,e,!0,t)||e}let r$=Symbol.for("v-ndc");function rF(e){return I(e)?rB(rD,e,!1)||e:e||r$}function rV(e){return rB("directives",e)}function rB(e,t,n=!0,r=!1){let i=nC||lB;if(i){let n=i.type;if(e===rD){let e=l0(n,!1);if(e&&(e===t||e===q(t)||e===z(q(t))))return n}let l=rU(i[e]||n[e],t)||rU(i.appContext[e],t);return!l&&r?n:l}}function rU(e,t){return e&&(e[t]||e[q(t)]||e[z(q(t))])}function rj(e,t,n,r){let i;let l=n&&n[r],s=k(e);if(s||I(e)){let n=s&&tD(e),r=!1;n&&(r=!t$(e),e=eX(e)),i=Array(e.length);for(let n=0,s=e.length;nt(e,n,void 0,l&&l[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,s=n.length;r{let t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e}function rq(e,t,n={},r,i){if(nC.ce||nC.parent&&rp(nC.parent)&&nC.parent.ce)return"default"!==t&&(n.name=t),lf(),lb(lo,null,[lw("slot",n,r&&r())],64);let l=e[t];l&&l._c&&(l._d=!1),lf();let s=l&&rW(l(n)),o=lb(lo,{key:(n.key||s&&s.key||`_${t}`)+(!s&&r?"_fb":"")},s||(r?r():[]),s&&1===e._?64:-2);return!i&&o.scopeId&&(o.slotScopeIds=[o.scopeId+"-s"]),l&&l._c&&(l._d=!0),o}function rW(e){return e.some(e=>!l_(e)||!!(e.type!==lc&&(e.type!==lo||rW(e.children))))?e:null}function rK(e,t){let n={};for(let r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:J(r)]=e[r];return n}let rz=e=>e?lq(e)?lY(e):rz(e.parent):null,rJ=/* @__PURE__ */S(/* @__PURE__ */Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>rz(e.parent),$root:e=>rz(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>is(e),$forceUpdate:e=>e.f||(e.f=()=>{ny(e.update)}),$nextTick:e=>e.n||(e.n=ng.bind(e.proxy)),$watch:e=>iZ.bind(e)}),rG=(e,t)=>e!==h&&!e.__isScriptSetup&&T(e,t),rQ={get({_:e},t){let n,r,i;if("__v_skip"===t)return!0;let{ctx:l,setupState:s,data:o,props:a,accessCache:c,type:u,appContext:d}=e;if("$"!==t[0]){let r=c[t];if(void 0!==r)switch(r){case 1:return s[t];case 2:return o[t];case 4:return l[t];case 3:return a[t]}else{if(rG(s,t))return c[t]=1,s[t];if(o!==h&&T(o,t))return c[t]=2,o[t];if((n=e.propsOptions[0])&&T(n,t))return c[t]=3,a[t];if(l!==h&&T(l,t))return c[t]=4,l[t];ii&&(c[t]=0)}}let p=rJ[t];return p?("$attrs"===t&&eJ(e.attrs,"get",""),p(e)):(r=u.__cssModules)&&(r=r[t])?r:l!==h&&T(l,t)?(c[t]=4,l[t]):T(i=d.config.globalProperties,t)?i[t]:void 0},set({_:e},t,n){let{data:r,setupState:i,ctx:l}=e;return rG(i,t)?(i[t]=n,!0):r!==h&&T(r,t)?(r[t]=n,!0):!T(e.props,t)&&!("$"===t[0]&&t.slice(1) in e)&&(l[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:i,propsOptions:l}},s){let o;return!!n[s]||e!==h&&T(e,s)||rG(t,s)||(o=l[0])&&T(o,s)||T(r,s)||T(rJ,s)||T(i.config.globalProperties,s)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:T(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},rX=/* @__PURE__ */S({},rQ,{get(e,t){if(t!==Symbol.unscopables)return rQ.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!et(t)});function rZ(){return null}function rY(){return null}function r0(e){}function r1(e){}function r2(){return null}function r6(){}function r3(e,t){return null}function r4(){return r5().slots}function r8(){return r5().attrs}function r5(){let e=lU();return e.setupContext||(e.setupContext=lZ(e))}function r9(e){return k(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function r7(e,t){let n=r9(e);for(let e in t){if(e.startsWith("__skip"))continue;let r=n[e];r?k(r)||R(r)?r=n[e]={type:r,default:t[e]}:r.default=t[e]:null===r&&(r=n[e]={default:t[e]}),r&&t[`__skip_${e}`]&&(r.skipFactory=!0)}return n}function ie(e,t){return e&&t?k(e)&&k(t)?e.concat(t):S({},r9(e),r9(t)):e||t}function it(e,t){let n={};for(let r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function ir(e){let t=lU(),n=e();return lH(),M(n)&&(n=n.catch(e=>{throw lj(t),e})),[n,()=>lj(t)]}let ii=!0;function il(e,t,n){no(k(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function is(e){let t;let n=e.type,{mixins:r,extends:i}=n,{mixins:l,optionsCache:s,config:{optionMergeStrategies:o}}=e.appContext,a=s.get(n);return a?t=a:l.length||r||i?(t={},l.length&&l.forEach(e=>io(t,e,o,!0)),io(t,n,o)):t=n,P(n)&&s.set(n,t),t}function io(e,t,n,r=!1){let{mixins:i,extends:l}=t;for(let s in l&&io(e,l,n,!0),i&&i.forEach(t=>io(e,t,n,!0)),t)if(r&&"expose"===s);else{let r=ia[s]||n&&n[s];e[s]=r?r(e[s],t[s]):t[s]}return e}let ia={data:ic,props:ih,emits:ih,methods:ip,computed:ip,beforeCreate:id,created:id,beforeMount:id,mounted:id,beforeUpdate:id,updated:id,beforeDestroy:id,beforeUnmount:id,destroyed:id,unmounted:id,activated:id,deactivated:id,errorCaptured:id,serverPrefetch:id,components:ip,directives:ip,watch:function(e,t){if(!e)return t;if(!t)return e;let n=S(/* @__PURE__ */Object.create(null),e);for(let r in t)n[r]=id(e[r],t[r]);return n},provide:ic,inject:function(e,t){return ip(iu(e),iu(t))}};function ic(e,t){return t?e?function(){return S(R(e)?e.call(this,this):e,R(t)?t.call(this,this):t)}:t:e}function iu(e){if(k(e)){let t={};for(let n=0;n1)return n&&R(t)?t.call(r&&r.proxy):t}}function i_(){return!!(lB||nC||iy)}let iS={},ix=()=>Object.create(iS),iC=e=>Object.getPrototypeOf(e)===iS;function iT(e,t,n,r){let i;let[l,s]=e.propsOptions,o=!1;if(t)for(let a in t){let c;if(B(a))continue;let u=t[a];l&&T(l,c=q(a))?s&&s.includes(c)?(i||(i={}))[c]=u:n[c]=u:i6(e.emitsOptions,a)||a in r&&u===r[a]||(r[a]=u,o=!0)}if(s){let t=tV(n),r=i||h;for(let i=0;i"_"===e[0]||"$stable"===e,iA=e=>k(e)?e.map(lO):[lO(e)],iR=(e,t,n)=>{if(t._n)return t;let r=nA((...e)=>iA(t(...e)),n);return r._c=!1,r},iI=(e,t,n)=>{let r=e._ctx;for(let n in e){if(iE(n))continue;let i=e[n];if(R(i))t[n]=iR(n,i,r);else if(null!=i){let e=iA(i);t[n]=()=>e}}},iO=(e,t)=>{let n=iA(t);e.slots.default=()=>n},iP=(e,t,n)=>{for(let r in t)(n||"_"!==r)&&(e[r]=t[r])},iM=(e,t,n)=>{let r=e.slots=ix();if(32&e.vnode.shapeFlag){let e=t._;e?(iP(r,t,n),n&&X(r,"_",e,!0)):iI(t,r)}else t&&iO(e,t)},iD=(e,t,n)=>{let{vnode:r,slots:i}=e,l=!0,s=h;if(32&r.shapeFlag){let e=t._;e?n&&1===e?l=!1:iP(i,t,n):(l=!t.$stable,iI(t,i)),s=t}else t&&(iO(e,t),s={default:1});if(l)for(let e in i)iE(e)||null!=s[e]||delete i[e]},iL=ll;function i$(e){return iV(e)}function iF(e){return iV(e,ri)}function iV(e,t){var n;let r,i;ee().__VUE__=!0;let{insert:l,remove:s,patchProp:o,createElement:a,createText:c,createComment:u,setText:d,setElementText:p,parentNode:f,nextSibling:y,setScopeId:b=g,insertStaticContent:_}=e,x=(e,t,n,r=null,i=null,l=null,s,o=null,a=!!t.dynamicChildren)=>{if(e===t)return;e&&!lS(e,t)&&(r=ei(e),Z(e,i,l,!0),e=null),-2===t.patchFlag&&(a=!1,t.dynamicChildren=null);let{type:c,ref:u,shapeFlag:d}=t;switch(c){case la:C(e,t,n,r);break;case lc:k(e,t,n,r);break;case lu:null==e&&w(t,n,r,s);break;case lo:F(e,t,n,r,i,l,s,o,a);break;default:1&d?A(e,t,n,r,i,l,s,o,a):6&d?V(e,t,n,r,i,l,s,o,a):64&d?c.process(e,t,n,r,i,l,s,o,a,eo):128&d&&c.process(e,t,n,r,i,l,s,o,a,eo)}null!=u&&i&&n5(u,e&&e.ref,l,t||e,!t)},C=(e,t,n,r)=>{if(null==e)l(t.el=c(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&d(n,t.children)}},k=(e,t,n,r)=>{null==e?l(t.el=u(t.children||""),n,r):t.el=e.el},w=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},N=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=y(e),l(e,n,r),e=i;l(t,n,r)},E=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=y(e),s(e),e=n;s(t)},A=(e,t,n,r,i,l,s,o,a)=>{"svg"===t.type?s="svg":"math"===t.type&&(s="mathml"),null==e?I(t,n,r,i,l,s,o,a):D(e,t,i,l,s,o,a)},I=(e,t,n,r,i,s,c,u)=>{let d,f;let{props:h,shapeFlag:m,transition:g,dirs:y}=e;if(d=e.el=a(e.type,s,h&&h.is,h),8&m?p(d,e.children):16&m&&M(e.children,d,null,r,i,iB(e,s),c,u),y&&nI(e,null,r,"created"),O(d,e,e.scopeId,c,r),h){for(let e in h)"value"===e||B(e)||o(d,e,null,h[e],s,r);"value"in h&&o(d,"value",null,h.value,s),(f=h.onVnodeBeforeMount)&&lL(f,r,e)}y&&nI(e,null,r,"beforeMount");let b=ij(i,g);b&&g.beforeEnter(d),l(d,t,n),((f=h&&h.onVnodeMounted)||b||y)&&iL(()=>{f&&lL(f,r,e),b&&g.enter(d),y&&nI(e,null,r,"mounted")},i)},O=(e,t,n,r,i)=>{if(n&&b(e,n),r)for(let t=0;t{for(let c=a;c{let a;let c=t.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=t;u|=16&e.patchFlag;let m=e.props||h,g=t.props||h;if(n&&iU(n,!1),(a=g.onVnodeBeforeUpdate)&&lL(a,n,t,e),f&&nI(t,e,n,"beforeUpdate"),n&&iU(n,!0),(m.innerHTML&&null==g.innerHTML||m.textContent&&null==g.textContent)&&p(c,""),d?L(e.dynamicChildren,d,c,n,r,iB(t,i),l):s||z(e,t,c,null,n,r,iB(t,i),l,!1),u>0){if(16&u)$(c,m,g,n,i);else if(2&u&&m.class!==g.class&&o(c,"class",null,g.class,i),4&u&&o(c,"style",m.style,g.style,i),8&u){let e=t.dynamicProps;for(let t=0;t{a&&lL(a,n,t,e),f&&nI(t,e,n,"updated")},r)},L=(e,t,n,r,i,l,s)=>{for(let o=0;o{if(t!==n){if(t!==h)for(let l in t)B(l)||l in n||o(e,l,t[l],null,i,r);for(let l in n){if(B(l))continue;let s=n[l],a=t[l];s!==a&&"value"!==l&&o(e,l,a,s,i,r)}"value"in n&&o(e,"value",t.value,n.value,i)}},F=(e,t,n,r,i,s,o,a,u)=>{let d=t.el=e?e.el:c(""),p=t.anchor=e?e.anchor:c(""),{patchFlag:f,dynamicChildren:h,slotScopeIds:m}=t;m&&(a=a?a.concat(m):m),null==e?(l(d,n,r),l(p,n,r),M(t.children||[],n,p,i,s,o,a,u)):f>0&&64&f&&h&&e.dynamicChildren?(L(e.dynamicChildren,h,n,i,s,o,a),(null!=t.key||i&&t===i.subTree)&&iH(e,t,!0)):z(e,t,n,p,i,s,o,a,u)},V=(e,t,n,r,i,l,s,o,a)=>{t.slotScopeIds=o,null==e?512&t.shapeFlag?i.ctx.activate(t,n,r,s,a):U(t,n,r,i,l,s,a):j(e,t,a)},U=(e,t,n,r,i,l,s)=>{let o=e.component=lV(e,r,i);rm(e)&&(o.ctx.renderer=eo),lK(o,!1,s),o.asyncDep?(i&&i.registerDep(o,H,s),e.el||k(null,o.subTree=lw(lc),t,n)):H(o,e,t,n,i,l,s)},j=(e,t,n)=>{let r=t.component=e.component;if(function(e,t,n){let{props:r,children:i,component:l}=e,{props:s,children:o,patchFlag:a}=t,c=l.emitsOptions;if(t.dirs||t.transition)return!0;if(!n||!(a>=0))return(!!i||!!o)&&(!o||!o.$stable)||r!==s&&(r?!s||i5(r,s,c):!!s);if(1024&a)return!0;if(16&a)return r?i5(r,s,c):!!s;if(8&a){let e=t.dynamicProps;for(let t=0;t{let a=()=>{if(e.isMounted){let t,{next:n,bu:r,u:i,parent:c,vnode:u}=e;{let t=function e(t){let n=t.subTree.component;if(n)return n.asyncDep&&!n.asyncResolved?n:e(n)}(e);if(t){n&&(n.el=u.el,W(e,n,o)),t.asyncDep.then(()=>{e.isUnmounted||a()});return}}let d=n;iU(e,!1),n?(n.el=u.el,W(e,n,o)):n=u,r&&Q(r),(t=n.props&&n.props.onVnodeBeforeUpdate)&&lL(t,c,n,u),iU(e,!0);let p=i3(e),h=e.subTree;e.subTree=p,x(h,p,f(h.el),ei(h),e,l,s),n.el=p.el,null===d&&i9(e,p.el),i&&iL(i,l),(t=n.props&&n.props.onVnodeUpdated)&&iL(()=>lL(t,c,n,u),l)}else{let o;let{el:a,props:c}=t,{bm:u,m:d,parent:p,root:f,type:h}=e,m=rp(t);if(iU(e,!1),u&&Q(u),!m&&(o=c&&c.onVnodeBeforeMount)&&lL(o,p,t),iU(e,!0),a&&i){let t=()=>{e.subTree=i3(e),i(a,e.subTree,e,l,null)};m&&h.__asyncHydrate?h.__asyncHydrate(a,e,t):t()}else{f.ce&&f.ce._injectChildStyle(h);let i=e.subTree=i3(e);x(null,i,n,r,e,l,s),t.el=i.el}if(d&&iL(d,l),!m&&(o=c&&c.onVnodeMounted)){let e=t;iL(()=>lL(o,p,e),l)}(256&t.shapeFlag||p&&rp(p.vnode)&&256&p.vnode.shapeFlag)&&e.a&&iL(e.a,l),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new ek(a);e.scope.off();let u=e.update=c.run.bind(c),d=e.job=c.runIfDirty.bind(c);d.i=e,d.id=e.uid,c.scheduler=()=>ny(d),iU(e,!0),u()},W=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,r){let{props:i,attrs:l,vnode:{patchFlag:s}}=e,o=tV(i),[a]=e.propsOptions,c=!1;if((r||s>0)&&!(16&s)){if(8&s){let n=e.vnode.dynamicProps;for(let r=0;r{let c=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:h}=t;if(f>0){if(128&f){G(c,d,n,r,i,l,s,o,a);return}if(256&f){J(c,d,n,r,i,l,s,o,a);return}}8&h?(16&u&&er(c,i,l),d!==c&&p(n,d)):16&u?16&h?G(c,d,n,r,i,l,s,o,a):er(c,i,l,!0):(8&u&&p(n,""),16&h&&M(d,n,r,i,l,s,o,a))},J=(e,t,n,r,i,l,s,o,a)=>{let c;e=e||m,t=t||m;let u=e.length,d=t.length,p=Math.min(u,d);for(c=0;cd?er(e,i,l,!0,!1,p):M(t,n,r,i,l,s,o,a,p)},G=(e,t,n,r,i,l,s,o,a)=>{let c=0,u=t.length,d=e.length-1,p=u-1;for(;c<=d&&c<=p;){let r=e[c],u=t[c]=a?lP(t[c]):lO(t[c]);if(lS(r,u))x(r,u,n,null,i,l,s,o,a);else break;c++}for(;c<=d&&c<=p;){let r=e[d],c=t[p]=a?lP(t[p]):lO(t[p]);if(lS(r,c))x(r,c,n,null,i,l,s,o,a);else break;d--,p--}if(c>d){if(c<=p){let e=p+1,d=ep)for(;c<=d;)Z(e[c],i,l,!0),c++;else{let f;let h=c,g=c,y=/* @__PURE__ */new Map;for(c=g;c<=p;c++){let e=t[c]=a?lP(t[c]):lO(t[c]);null!=e.key&&y.set(e.key,c)}let b=0,_=p-g+1,S=!1,C=0,T=Array(_);for(c=0;c<_;c++)T[c]=0;for(c=h;c<=d;c++){let r;let u=e[c];if(b>=_){Z(u,i,l,!0);continue}if(null!=u.key)r=y.get(u.key);else for(f=g;f<=p;f++)if(0===T[f-g]&&lS(u,t[f])){r=f;break}void 0===r?Z(u,i,l,!0):(T[r-g]=c+1,r>=C?C=r:S=!0,x(u,t[r],n,null,i,l,s,o,a),b++)}let k=S?function(e){let t,n,r,i,l;let s=e.slice(),o=[0],a=e.length;for(t=0;t>1]]0&&(s[t]=o[r-1]),o[r]=t)}}for(r=o.length,i=o[r-1];r-- >0;)o[r]=i,i=s[i];return o}(T):m;for(f=k.length-1,c=_-1;c>=0;c--){let e=g+c,d=t[e],p=e+1{let{el:s,type:o,transition:a,children:c,shapeFlag:u}=e;if(6&u){X(e.component.subTree,t,n,r);return}if(128&u){e.suspense.move(t,n,r);return}if(64&u){o.move(e,t,n,eo);return}if(o===lo){l(s,t,n);for(let e=0;ea.enter(s),i);else{let{leave:e,delayLeave:r,afterLeave:i}=a,o=()=>l(s,t,n),c=()=>{e(s,()=>{o(),i&&i()})};r?r(s,o,c):c()}}else l(s,t,n)},Z=(e,t,n,r=!1,i=!1)=>{let l;let{type:s,props:o,ref:a,children:c,dynamicChildren:u,shapeFlag:d,patchFlag:p,dirs:f,cacheIndex:h}=e;if(-2===p&&(i=!1),null!=a&&n5(a,null,n,e,!0),null!=h&&(t.renderCache[h]=void 0),256&d){t.ctx.deactivate(e);return}let m=1&d&&f,g=!rp(e);if(g&&(l=o&&o.onVnodeBeforeUnmount)&&lL(l,t,e),6&d)en(e.component,n,r);else{if(128&d){e.suspense.unmount(n,r);return}m&&nI(e,null,t,"beforeUnmount"),64&d?e.type.remove(e,t,n,eo,r):u&&!u.hasOnce&&(s!==lo||p>0&&64&p)?er(u,t,n,!1,!0):(s===lo&&384&p||!i&&16&d)&&er(c,t,n),r&&Y(e)}(g&&(l=o&&o.onVnodeUnmounted)||m)&&iL(()=>{l&&lL(l,t,e),m&&nI(e,null,t,"unmounted")},n)},Y=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===lo){et(n,r);return}if(t===lu){E(e);return}let l=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(1&e.shapeFlag&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,s=()=>t(n,l);r?r(e.el,l,s):s()}else l()},et=(e,t)=>{let n;for(;e!==t;)n=y(e),s(e),e=n;s(t)},en=(e,t,n)=>{let{bum:r,scope:i,job:l,subTree:s,um:o,m:a,a:c}=e;iq(a),iq(c),r&&Q(r),i.stop(),l&&(l.flags|=8,Z(s,e,t,n)),o&&iL(o,t),iL(()=>{e.isUnmounted=!0},t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},er=(e,t,n,r=!1,i=!1,l=0)=>{for(let s=l;s{if(6&e.shapeFlag)return ei(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();let t=y(e.anchor||e.el),n=t&&t[nO];return n?y(n):t},el=!1,es=(e,t,n)=>{null==e?t._vnode&&Z(t._vnode,null,null,!0):x(t._vnode||null,e,t,null,null,null,n),t._vnode=e,el||(el=!0,n_(),nS(),el=!1)},eo={p:x,um:Z,m:X,r:Y,mt:U,mc:M,pc:z,pbc:L,n:ei,o:e};return t&&([r,i]=t(eo)),{render:es,hydrate:r,createApp:(n=r,function(e,t=null){R(e)||(e=S({},e)),null==t||P(t)||(t=null);let r=im(),i=/* @__PURE__ */new WeakSet,l=[],s=!1,o=r.app={_uid:ig++,_component:e,_props:t,_container:null,_context:r,_instance:null,version:l8,get config(){return r.config},set config(v){},use:(e,...t)=>(i.has(e)||(e&&R(e.install)?(i.add(e),e.install(o,...t)):R(e)&&(i.add(e),e(o,...t))),o),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),o),component:(e,t)=>t?(r.components[e]=t,o):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,o):r.directives[e],mount(i,l,a){if(!s){let c=o._ceVNode||lw(e,t);return c.appContext=r,!0===a?a="svg":!1===a&&(a=void 0),l&&n?n(c,i):es(c,i,a),s=!0,o._container=i,i.__vue_app__=o,lY(c.component)}},onUnmount(e){l.push(e)},unmount(){s&&(no(l,o._instance,16),es(null,o._container),delete o._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,o),runWithContext(e){let t=iy;iy=o;try{return e()}finally{iy=t}}};return o})}}function iB({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function iU({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ij(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function iH(e,t,n=!1){let r=e.children,i=t.children;if(k(r)&&k(i))for(let e=0;eib(iW);function iz(e,t){return iX(e,null,t)}function iJ(e,t){return iX(e,null,{flush:"post"})}function iG(e,t){return iX(e,null,{flush:"sync"})}function iQ(e,t,n){return iX(e,t,n)}function iX(e,t,n=h){let r;let{immediate:i,deep:l,flush:s,once:o}=n,a=S({},n);if(lW){if("sync"===s){let e=iK();r=e.__watcherHandles||(e.__watcherHandles=[])}else if(!t||i)a.once=!0;else{let e=()=>{};return e.stop=g,e.resume=g,e.pause=g,e}}let c=lB;a.call=(e,t,n)=>no(e,c,t,n);let u=!1;"post"===s?a.scheduler=e=>{iL(e,c&&c.suspense)}:"sync"!==s&&(u=!0,a.scheduler=(e,t)=>{t?e():ny(e)}),a.augmentJob=e=>{t&&(e.flags|=4),u&&(e.flags|=2,c&&(e.id=c.uid,e.i=c))};let p=function(e,t,n=h){let r,i,l,s;let{immediate:o,deep:a,once:c,scheduler:u,augmentJob:p,call:f}=n,m=e=>a?e:t$(e)||!1===a||0===a?nr(e,1):nr(e),y=!1,b=!1;if(tH(e)?(i=()=>e.value,y=t$(e)):tD(e)?(i=()=>m(e),y=!0):k(e)?(b=!0,y=e.some(e=>tD(e)||t$(e)),i=()=>e.map(e=>tH(e)?e.value:tD(e)?m(e):R(e)?f?f(e,2):e():void 0)):i=R(e)?t?f?()=>f(e,2):e:()=>{if(l){eF();try{l()}finally{eV()}}let t=d;d=r;try{return f?f(e,3,[s]):e(s)}finally{d=t}}:g,t&&a){let e=i,t=!0===a?1/0:a;i=()=>nr(e(),t)}let _=ex(),S=()=>{r.stop(),_&&x(_.effects,r)};if(c&&t){let e=t;t=(...t)=>{e(...t),S()}}let C=b?Array(e.length).fill(t7):t7,T=e=>{if(1&r.flags&&(r.dirty||e)){if(t){let e=r.run();if(a||y||(b?e.some((e,t)=>G(e,C[t])):G(e,C))){l&&l();let n=d;d=r;try{let n=[e,C===t7?void 0:b&&C[0]===t7?[]:C,s];f?f(t,3,n):t(...n),C=e}finally{d=n}}}else r.run()}};return p&&p(T),(r=new ek(i)).scheduler=u?()=>u(T,!1):T,s=e=>nn(e,!1,r),l=r.onStop=()=>{let e=ne.get(r);if(e){if(f)f(e,4);else for(let t of e)t();ne.delete(r)}},t?o?T(!0):C=r.run():u?u(T.bind(null,!0),!0):r.run(),S.pause=r.pause.bind(r),S.resume=r.resume.bind(r),S.stop=S,S}(e,t,a);return r&&r.push(p),p}function iZ(e,t,n){let r;let i=this.proxy,l=I(e)?e.includes(".")?iY(i,e):()=>i[e]:e.bind(i,i);R(t)?r=t:(r=t.handler,n=t);let s=lj(this),o=iX(l,r.bind(i),n);return s(),o}function iY(e,t){let n=t.split(".");return()=>{let t=e;for(let e=0;e{let a,c;let u=h;return iG(()=>{let n=e[t];G(a,n)&&(a=n,o())}),{get:()=>(s(),n.get?n.get(a):a),set(e){let s=n.set?n.set(e):e;if(!G(s,a)&&!(u!==h&&G(e,u)))return;let d=r.vnode.props;d&&(t in d||i in d||l in d)&&(`onUpdate:${t}` in d||`onUpdate:${i}` in d||`onUpdate:${l}` in d)||(a=e,o()),r.emit(`update:${t}`,s),G(e,s)&&G(e,u)&&!G(s,c)&&o(),u=e,c=s}}});return o[Symbol.iterator]=()=>{let e=0;return{next:()=>e<2?{value:e++?s||h:o,done:!1}:{done:!0}}},o}let i1=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${q(t)}Modifiers`]||e[`${K(t)}Modifiers`];function i2(e,t,...n){let r;if(e.isUnmounted)return;let i=e.vnode.props||h,l=n,s=t.startsWith("update:"),o=s&&i1(i,t.slice(7));o&&(o.trim&&(l=n.map(e=>I(e)?e.trim():e)),o.number&&(l=n.map(Z)));let a=i[r=J(t)]||i[r=J(q(t))];!a&&s&&(a=i[r=J(K(t))]),a&&no(a,e,6,l);let c=i[r+"Once"];if(c){if(e.emitted){if(e.emitted[r])return}else e.emitted={};e.emitted[r]=!0,no(c,e,6,l)}}function i6(e,t){return!!(e&&b(t))&&(T(e,(t=t.slice(2).replace(/Once$/,""))[0].toLowerCase()+t.slice(1))||T(e,K(t))||T(e,t))}function i3(e){let t,n;let{type:r,vnode:i,proxy:l,withProxy:s,propsOptions:[o],slots:a,attrs:c,emit:u,render:d,renderCache:p,props:f,data:h,setupState:m,ctx:g,inheritAttrs:y}=e,b=nk(e);try{if(4&i.shapeFlag){let e=s||l;t=lO(d.call(e,e,p,f,m,h,g)),n=c}else t=lO(r.length>1?r(f,{attrs:c,slots:a,emit:u}):r(f,null)),n=r.props?c:i4(c)}catch(n){ld.length=0,na(n,e,1),t=lw(lc)}let S=t;if(n&&!1!==y){let e=Object.keys(n),{shapeFlag:t}=S;e.length&&7&t&&(o&&e.some(_)&&(n=i8(n,o)),S=lE(S,n,!1,!0))}return i.dirs&&((S=lE(S,null,!1,!0)).dirs=S.dirs?S.dirs.concat(i.dirs):i.dirs),i.transition&&n1(S,i.transition),t=S,nk(b),t}let i4=e=>{let t;for(let n in e)("class"===n||"style"===n||b(n))&&((t||(t={}))[n]=e[n]);return t},i8=(e,t)=>{let n={};for(let r in e)_(r)&&r.slice(9) in t||(n[r]=e[r]);return n};function i5(e,t,n){let r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let i=0;ie.__isSuspense,le=0,lt={name:"Suspense",__isSuspense:!0,process(e,t,n,r,i,l,s,o,a,c){if(null==e)!function(e,t,n,r,i,l,s,o,a){let{p:c,o:{createElement:u}}=a,d=u("div"),p=e.suspense=lr(e,i,r,t,d,n,l,s,o,a);c(null,p.pendingBranch=e.ssContent,d,null,r,p,l,s),p.deps>0?(ln(e,"onPending"),ln(e,"onFallback"),c(null,e.ssFallback,t,n,r,null,l,s),ls(p,e.ssFallback)):p.resolve(!1,!0)}(t,n,r,i,l,s,o,a,c);else{if(l&&l.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}!function(e,t,n,r,i,l,s,o,{p:a,um:c,o:{createElement:u}}){let d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;let p=t.ssContent,f=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:g,isHydrating:y}=d;if(m)d.pendingBranch=p,lS(p,m)?(a(m,p,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0?d.resolve():g&&!y&&(a(h,f,n,r,i,null,l,s,o),ls(d,f))):(d.pendingId=le++,y?(d.isHydrating=!1,d.activeBranch=m):c(m,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),g?(a(null,p,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0?d.resolve():(a(h,f,n,r,i,null,l,s,o),ls(d,f))):h&&lS(p,h)?(a(h,p,n,r,i,d,l,s,o),d.resolve(!0)):(a(null,p,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0&&d.resolve()));else if(h&&lS(p,h))a(h,p,n,r,i,d,l,s,o),ls(d,p);else if(ln(t,"onPending"),d.pendingBranch=p,512&p.shapeFlag?d.pendingId=p.component.suspenseId:d.pendingId=le++,a(null,p,d.hiddenContainer,null,i,d,l,s,o),d.deps<=0)d.resolve();else{let{timeout:e,pendingId:t}=d;e>0?setTimeout(()=>{d.pendingId===t&&d.fallback(f)},e):0===e&&d.fallback(f)}}(e,t,n,r,i,s,o,a,c)}},hydrate:function(e,t,n,r,i,l,s,o,a){let c=t.suspense=lr(t,r,n,e.parentNode,document.createElement("div"),null,i,l,s,o,!0),u=a(e,c.pendingBranch=t.ssContent,n,c,l,s);return 0===c.deps&&c.resolve(!1,!0),u},normalize:function(e){let{shapeFlag:t,children:n}=e,r=32&t;e.ssContent=li(r?n.default:n),e.ssFallback=r?li(n.fallback):lw(lc)}};function ln(e,t){let n=e.props&&e.props[t];R(n)&&n()}function lr(e,t,n,r,i,l,s,o,a,c,u=!1){let d;let{p:p,m:f,um:h,n:m,o:{parentNode:g,remove:y}}=c,b=function(e){let t=e.props&&e.props.suspensible;return null!=t&&!1!==t}(e);b&&t&&t.pendingBranch&&(d=t.pendingId,t.deps++);let _=e.props?Y(e.props.timeout):void 0,S=l,x={vnode:e,parent:t,parentComponent:n,namespace:s,container:r,hiddenContainer:i,deps:0,pendingId:le++,timeout:"number"==typeof _?_:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:r,activeBranch:i,pendingBranch:s,pendingId:o,effects:a,parentComponent:c,container:u}=x,p=!1;x.isHydrating?x.isHydrating=!1:e||((p=i&&s.transition&&"out-in"===s.transition.mode)&&(i.transition.afterLeave=()=>{o===x.pendingId&&(f(s,u,l===S?m(i):l,0),nb(a))}),i&&(g(i.el)===u&&(l=m(i)),h(i,c,x,!0)),p||f(s,u,l,0)),ls(x,s),x.pendingBranch=null,x.isInFallback=!1;let y=x.parent,_=!1;for(;y;){if(y.pendingBranch){y.effects.push(...a),_=!0;break}y=y.parent}_||p||nb(a),x.effects=[],b&&t&&t.pendingBranch&&d===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),ln(r,"onResolve")},fallback(e){if(!x.pendingBranch)return;let{vnode:t,activeBranch:n,parentComponent:r,container:i,namespace:l}=x;ln(t,"onFallback");let s=m(n),c=()=>{x.isInFallback&&(p(null,e,i,s,r,null,l,o,a),ls(x,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=c),x.isInFallback=!0,h(n,r,null,!0),u||c()},move(e,t,n){x.activeBranch&&f(x.activeBranch,e,t,n),x.container=e},next:()=>x.activeBranch&&m(x.activeBranch),registerDep(e,t,n){let r=!!x.pendingBranch;r&&x.deps++;let i=e.vnode.el;e.asyncDep.catch(t=>{na(t,e,0)}).then(l=>{if(e.isUnmounted||x.isUnmounted||x.pendingId!==e.suspenseId)return;e.asyncResolved=!0;let{vnode:o}=e;lz(e,l,!1),i&&(o.el=i);let a=!i&&e.subTree.el;t(e,o,g(i||e.subTree.el),i?null:m(e.subTree),x,s,n),a&&y(a),i9(e,o.el),r&&0==--x.deps&&x.resolve()})},unmount(e,t){x.isUnmounted=!0,x.activeBranch&&h(x.activeBranch,n,e,t),x.pendingBranch&&h(x.pendingBranch,n,e,t)}};return x}function li(e){let t;if(R(e)){let n=lm&&e._c;n&&(e._d=!1,lf()),e=e(),n&&(e._d=!0,t=lp,lh())}return k(e)&&(e=function(e,t=!0){let n;for(let t=0;tt!==e)),e}function ll(e,t){t&&t.pendingBranch?k(e)?t.effects.push(...e):t.effects.push(e):nb(e)}function ls(e,t){e.activeBranch=t;let{vnode:n,parentComponent:r}=e,i=t.el;for(;!i&&t.component;)i=(t=t.component.subTree).el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,i9(r,i))}let lo=Symbol.for("v-fgt"),la=Symbol.for("v-txt"),lc=Symbol.for("v-cmt"),lu=Symbol.for("v-stc"),ld=[],lp=null;function lf(e=!1){ld.push(lp=e?null:[])}function lh(){ld.pop(),lp=ld[ld.length-1]||null}let lm=1;function lg(e){lm+=e,e<0&&lp&&(lp.hasOnce=!0)}function ly(e){return e.dynamicChildren=lm>0?lp||m:null,lh(),lm>0&&lp&&lp.push(e),e}function lv(e,t,n,r,i,l){return ly(lk(e,t,n,r,i,l,!0))}function lb(e,t,n,r,i){return ly(lw(e,t,n,r,i,!0))}function l_(e){return!!e&&!0===e.__v_isVNode}function lS(e,t){return e.type===t.type&&e.key===t.key}function lx(e){}let lC=({key:e})=>null!=e?e:null,lT=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?I(e)||tH(e)||R(e)?{i:nC,r:e,k:t,f:!!n}:e:null);function lk(e,t=null,n=null,r=0,i=null,l=e===lo?0:1,s=!1,o=!1){let a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&lC(t),ref:t&&lT(t),scopeId:nT,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:l,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:nC};return o?(lM(a,n),128&l&&e.normalize(a)):n&&(a.shapeFlag|=I(n)?8:16),lm>0&&!s&&lp&&(a.patchFlag>0||6&l)&&32!==a.patchFlag&&lp.push(a),a}let lw=function(e,t=null,n=null,r=0,i=null,l=!1){var s;if(e&&e!==r$||(e=lc),l_(e)){let r=lE(e,t,!0);return n&&lM(r,n),lm>0&&!l&&lp&&(6&r.shapeFlag?lp[lp.indexOf(e)]=r:lp.push(r)),r.patchFlag=-2,r}if(R(s=e)&&"__vccOpts"in s&&(e=e.__vccOpts),t){let{class:e,style:n}=t=lN(t);e&&!I(e)&&(t.class=eo(e)),P(n)&&(tF(n)&&!k(n)&&(n=S({},n)),t.style=en(n))}let o=I(e)?1:i7(e)?128:nP(e)?64:P(e)?4:R(e)?2:0;return lk(e,t,n,r,i,o,l,!0)};function lN(e){return e?tF(e)||iC(e)?S({},e):e:null}function lE(e,t,n=!1,r=!1){let{props:i,ref:l,patchFlag:s,children:o,transition:a}=e,c=t?lD(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&lC(c),ref:t&&t.ref?n&&l?k(l)?l.concat(lT(t)):[l,lT(t)]:lT(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==lo?-1===s?16:16|s:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&lE(e.ssContent),ssFallback:e.ssFallback&&lE(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&r&&n1(u,a.clone(u)),u}function lA(e=" ",t=0){return lw(la,null,e,t)}function lR(e,t){let n=lw(lu,null,e);return n.staticCount=t,n}function lI(e="",t=!1){return t?(lf(),lb(lc,null,e)):lw(lc,null,e)}function lO(e){return null==e||"boolean"==typeof e?lw(lc):k(e)?lw(lo,null,e.slice()):l_(e)?lP(e):lw(la,null,String(e))}function lP(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:lE(e)}function lM(e,t){let n=0,{shapeFlag:r}=e;if(null==t)t=null;else if(k(t))n=16;else if("object"==typeof t){if(65&r){let n=t.default;n&&(n._c&&(n._d=!1),lM(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;r||iC(t)?3===r&&nC&&(1===nC.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=nC}}else R(t)?(t={default:t,_ctx:nC},n=32):(t=String(t),64&r?(n=16,t=[lA(t)]):n=8);e.children=t,e.shapeFlag|=n}function lD(...e){let t={};for(let n=0;n{c=!0;let[r,i]=e(t,n,!0);S(o,r),i&&a.push(...i)};!r&&n.mixins.length&&n.mixins.forEach(i),t.extends&&i(t.extends),t.mixins&&t.mixins.forEach(i)}if(!s&&!c)return P(t)&&i.set(t,m),m;if(k(s))for(let e=0;e{let r=e(t,n,!0);r&&(a=!0,S(o,r))};!r&&n.mixins.length&&n.mixins.forEach(i),t.extends&&i(t.extends),t.mixins&&t.mixins.forEach(i)}return s||a?(k(s)?s.forEach(e=>o[e]=null):S(o,s),P(t)&&i.set(t,o),o):(P(t)&&i.set(t,null),null)}(r,i),emit:null,emitted:null,propsDefaults:h,inheritAttrs:r.inheritAttrs,ctx:h,data:h,props:h,attrs:h,slots:h,refs:h,setupState:h,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return l.ctx={_:l},l.root=t?t.root:l,l.emit=i2.bind(null,l),e.ce&&e.ce(l),l}let lB=null,lU=()=>lB||nC;{let e=ee(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};l=t("__VUE_INSTANCE_SETTERS__",e=>lB=e),s=t("__VUE_SSR_SETTERS__",e=>lW=e)}let lj=e=>{let t=lB;return l(e),e.scope.on(),()=>{e.scope.off(),l(t)}},lH=()=>{lB&&lB.scope.off(),l(null)};function lq(e){return 4&e.vnode.shapeFlag}let lW=!1;function lK(e,t=!1,n=!1){t&&s(t);let{props:r,children:i}=e.vnode,l=lq(e);!function(e,t,n,r=!1){let i={},l=ix();for(let n in e.propsDefaults=/* @__PURE__ */Object.create(null),iT(e,t,i,l),e.propsOptions[0])n in i||(i[n]=void 0);n?e.props=r?i:tI(i):e.type.props?e.props=i:e.props=l,e.attrs=l}(e,r,l,t),iM(e,i,n);let o=l?function(e,t){let n=e.type;e.accessCache=/* @__PURE__ */Object.create(null),e.proxy=new Proxy(e.ctx,rQ);let{setup:r}=n;if(r){let n=e.setupContext=r.length>1?lZ(e):null,i=lj(e);eF();let l=ns(r,e,0,[e.props,n]);if(eV(),i(),M(l)){if(rp(e)||n4(e),l.then(lH,lH),t)return l.then(n=>{lz(e,n,t)}).catch(t=>{na(t,e,0)});e.asyncDep=l}else lz(e,l,t)}else lQ(e,t)}(e,t):void 0;return t&&s(!1),o}function lz(e,t,n){R(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:P(t)&&(e.setupState=tZ(t)),lQ(e,n)}function lJ(e){o=e,a=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,rX))}}let lG=()=>!o;function lQ(e,t,n){let r=e.type;if(!e.render){if(!t&&o&&!r.render){let t=r.template||is(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:l,compilerOptions:s}=r,a=S(S({isCustomElement:n,delimiters:l},i),s);r.render=o(t,a)}}e.render=r.render||g,a&&a(e)}{let t=lj(e);eF();try{!function(e){let t=is(e),n=e.proxy,r=e.ctx;ii=!1,t.beforeCreate&&il(t.beforeCreate,e,"bc");let{data:i,computed:l,methods:s,watch:o,provide:a,inject:c,created:u,beforeMount:d,mounted:p,beforeUpdate:f,updated:h,activated:m,deactivated:y,beforeDestroy:b,beforeUnmount:_,destroyed:S,unmounted:x,render:C,renderTracked:T,renderTriggered:w,errorCaptured:N,serverPrefetch:E,expose:A,inheritAttrs:O,components:M,directives:D,filters:L}=t;if(c&&function(e,t,n=g){for(let n in k(e)&&(e=iu(e)),e){let r;let i=e[n];tH(r=P(i)?"default"in i?ib(i.from||n,i.default,!0):ib(i.from||n):ib(i))?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[n]=r}}(c,r,null),s)for(let e in s){let t=s[e];R(t)&&(r[e]=t.bind(n))}if(i){let t=i.call(n,n);P(t)&&(e.data=tR(t))}if(ii=!0,l)for(let e in l){let t=l[e],i=R(t)?t.bind(n,n):R(t.get)?t.get.bind(n,n):g,s=l1({get:i,set:!R(t)&&R(t.set)?t.set.bind(n):g});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>s.value,set:e=>s.value=e})}if(o)for(let e in o)!function e(t,n,r,i){let l=i.includes(".")?iY(r,i):()=>r[i];if(I(t)){let e=n[t];R(e)&&iQ(l,e)}else if(R(t))iQ(l,t.bind(r));else if(P(t)){if(k(t))t.forEach(t=>e(t,n,r,i));else{let e=R(t.handler)?t.handler.bind(r):n[t.handler];R(e)&&iQ(l,e,t)}}}(o[e],r,n,e);if(a){let e=R(a)?a.call(n):a;Reflect.ownKeys(e).forEach(t=>{iv(t,e[t])})}function $(e,t){k(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(u&&il(u,e,"c"),$(rk,d),$(rw,p),$(rN,f),$(rE,h),$(rv,m),$(rb,y),$(rM,N),$(rP,T),$(rO,w),$(rA,_),$(rR,x),$(rI,E),k(A)){if(A.length){let t=e.exposed||(e.exposed={});A.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})})}else e.exposed||(e.exposed={})}C&&e.render===g&&(e.render=C),null!=O&&(e.inheritAttrs=O),M&&(e.components=M),D&&(e.directives=D),E&&n4(e)}(e)}finally{eV(),t()}}}let lX={get:(e,t)=>(eJ(e,"get",""),e[t])};function lZ(e){return{attrs:new Proxy(e.attrs,lX),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function lY(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(tZ(tB(e.exposed)),{get:(t,n)=>n in t?t[n]:n in rJ?rJ[n](e):void 0,has:(e,t)=>t in e||t in rJ})):e.proxy}function l0(e,t=!0){return R(e)?e.displayName||e.name:e.name||t&&e.__name}let l1=(e,t)=>(function(e,t,n=!1){let r,i;return R(e)?r=e:(r=e.get,i=e.set),new t8(r,i,n)})(e,0,lW);function l2(e,t,n){let r=arguments.length;return 2!==r?(r>3?n=Array.prototype.slice.call(arguments,2):3===r&&l_(n)&&(n=[n]),lw(e,t,n)):!P(t)||k(t)?lw(e,null,t):l_(t)?lw(e,null,[t]):lw(e,t)}function l6(){}function l3(e,t,n,r){let i=n[r];if(i&&l4(i,e))return i;let l=t();return l.memo=e.slice(),l.cacheIndex=r,n[r]=l}function l4(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e0&&lp&&lp.push(e),!0}let l8="3.5.11",l5=g,l9=null,l7=void 0,se=g,st={createComponentInstance:lV,setupComponent:lK,renderComponentRoot:i3,setCurrentRenderingInstance:nk,isVNode:l_,normalizeVNode:lO,getComponentPublicInstance:lY,ensureValidVNode:rW,pushWarningContext:function(e){},popWarningContext:function(){}},sn=null,sr=null,si=null,sl="undefined"!=typeof window&&window.trustedTypes;if(sl)try{p=/* @__PURE__ */sl.createPolicy("vue",{createHTML:e=>e})}catch(e){}let ss=p?e=>p.createHTML(e):e=>e,so="undefined"!=typeof document?document:null,sa=so&&/* @__PURE__ */so.createElement("template"),sc="transition",su="animation",sd=Symbol("_vtc"),sp={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},sf=/* @__PURE__ */S({},nz,sp),sh=((oO=(e,{slots:t})=>l2(nQ,sy(e),t)).displayName="Transition",oO.props=sf,oO),sm=(e,t=[])=>{k(e)?e.forEach(e=>e(...t)):e&&e(...t)},sg=e=>!!e&&(k(e)?e.some(e=>e.length>1):e.length>1);function sy(e){let t={};for(let n in e)n in sp||(t[n]=e[n]);if(!1===e.css)return t;let{name:n="v",type:r,duration:i,enterFromClass:l=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:o=`${n}-enter-to`,appearFromClass:a=l,appearActiveClass:c=s,appearToClass:u=o,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,h=function(e){if(null==e)return null;if(P(e))return[Y(e.enter),Y(e.leave)];{let t=Y(e);return[t,t]}}(i),m=h&&h[0],g=h&&h[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:_,onLeave:x,onLeaveCancelled:C,onBeforeAppear:T=y,onAppear:k=b,onAppearCancelled:w=_}=t,N=(e,t,n)=>{sb(e,t?u:o),sb(e,t?c:s),n&&n()},E=(e,t)=>{e._isLeaving=!1,sb(e,d),sb(e,f),sb(e,p),t&&t()},A=e=>(t,n)=>{let i=e?k:b,s=()=>N(t,e,n);sm(i,[t,s]),s_(()=>{sb(t,e?a:l),sv(t,e?u:o),sg(i)||sx(t,r,m,s)})};return S(t,{onBeforeEnter(e){sm(y,[e]),sv(e,l),sv(e,s)},onBeforeAppear(e){sm(T,[e]),sv(e,a),sv(e,c)},onEnter:A(!1),onAppear:A(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>E(e,t);sv(e,d),sv(e,p),sw(),s_(()=>{e._isLeaving&&(sb(e,d),sv(e,f),sg(x)||sx(e,r,g,n))}),sm(x,[e,n])},onEnterCancelled(e){N(e,!1),sm(_,[e])},onAppearCancelled(e){N(e,!0),sm(w,[e])},onLeaveCancelled(e){E(e),sm(C,[e])}})}function sv(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[sd]||(e[sd]=/* @__PURE__ */new Set)).add(t)}function sb(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[sd];n&&(n.delete(t),n.size||(e[sd]=void 0))}function s_(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let sS=0;function sx(e,t,n,r){let i=e._endId=++sS,l=()=>{i===e._endId&&r()};if(null!=n)return setTimeout(l,n);let{type:s,timeout:o,propCount:a}=sC(e,t);if(!s)return r();let c=s+"end",u=0,d=()=>{e.removeEventListener(c,p),l()},p=t=>{t.target===e&&++u>=a&&d()};setTimeout(()=>{u(n[e]||"").split(", "),i=r(`${sc}Delay`),l=r(`${sc}Duration`),s=sT(i,l),o=r(`${su}Delay`),a=r(`${su}Duration`),c=sT(o,a),u=null,d=0,p=0;t===sc?s>0&&(u=sc,d=s,p=l.length):t===su?c>0&&(u=su,d=c,p=a.length):p=(u=(d=Math.max(s,c))>0?s>c?sc:su:null)?u===sc?l.length:a.length:0;let f=u===sc&&/\b(transform|all)(,|$)/.test(r(`${sc}Property`).toString());return{type:u,timeout:d,propCount:p,hasTransform:f}}function sT(e,t){for(;e.lengthsk(t)+sk(e[n])))}function sk(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function sw(){return document.body.offsetHeight}let sN=Symbol("_vod"),sE=Symbol("_vsh"),sA={beforeMount(e,{value:t},{transition:n}){e[sN]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):sR(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),sR(e,!0),r.enter(e)):r.leave(e,()=>{sR(e,!1)}):sR(e,t))},beforeUnmount(e,{value:t}){sR(e,t)}};function sR(e,t){e.style.display=t?e[sN]:"none",e[sE]=!t}let sI=Symbol("");function sO(e){let t=lU();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>sP(e,n))},r=()=>{let r=e(t.proxy);t.ce?sP(t.ce,r):function e(t,n){if(128&t.shapeFlag){let r=t.suspense;t=r.activeBranch,r.pendingBranch&&!r.isHydrating&&r.effects.push(()=>{e(r.activeBranch,n)})}for(;t.component;)t=t.component.subTree;if(1&t.shapeFlag&&t.el)sP(t.el,n);else if(t.type===lo)t.children.forEach(t=>e(t,n));else if(t.type===lu){let{el:e,anchor:r}=t;for(;e&&(sP(e,n),e!==r);)e=e.nextSibling}}(t.subTree,r),n(r)};rk(()=>{iJ(r)}),rw(()=>{let e=new MutationObserver(r);e.observe(t.subTree.el.parentNode,{childList:!0}),rR(()=>e.disconnect())})}function sP(e,t){if(1===e.nodeType){let n=e.style,r="";for(let e in t)n.setProperty(`--${e}`,t[e]),r+=`--${e}: ${t[e]};`;n[sI]=r}}let sM=/(^|;)\s*display\s*:/,sD=/\s*!important$/;function sL(e,t,n){if(k(n))n.forEach(n=>sL(e,t,n));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{let r=function(e,t){let n=sF[t];if(n)return n;let r=q(t);if("filter"!==r&&r in e)return sF[t]=r;r=z(r);for(let n=0;nsW||(sK.then(()=>sW=0),sW=Date.now()),sJ=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&123>e.charCodeAt(2),sG={};/*! #__NO_SIDE_EFFECTS__ */function sQ(e,t,n){let r=n6(e,t);F(r)&&S(r,t);class i extends sY{constructor(e){super(r,e,n)}}return i.def=r,i}/*! #__NO_SIDE_EFFECTS__ */let sX=(e,t)=>/* @__PURE__ */sQ(e,t,oN),sZ="undefined"!=typeof HTMLElement?HTMLElement:class{};class sY extends sZ{constructor(e,t={},n=ow){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=/* @__PURE__ */new WeakSet,this._ob=null,this.shadowRoot&&n!==ow?this._root=this.shadowRoot:!1!==e.shadowRoot?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof sY){this._parent=e;break}this._instance||(this._resolved?(this._setParent(),this._update()):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,ng(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)})}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e{for(let t of e)this._setAttr(t.attributeName)}),this._ob.observe(this,{attributes:!0});let e=(e,t=!1)=>{let n;this._resolved=!0,this._pendingResolve=void 0;let{props:r,styles:i}=e;if(r&&!k(r))for(let e in r){let t=r[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=Y(this._props[e])),(n||(n=/* @__PURE__ */Object.create(null)))[q(e)]=!0)}this._numberProps=n,t&&this._resolveProps(e),this.shadowRoot&&this._applyStyles(i),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then(t=>e(this._def=t,!0)):e(this._def)}_mount(e){this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)T(this,e)||Object.defineProperty(this,e,{get:()=>tG(t[e])})}_resolveProps(e){let{props:t}=e,n=k(t)?t:Object.keys(t||{});for(let e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(q))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):sG,r=q(e);t&&this._numberProps&&this._numberProps[r]&&(n=Y(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){t!==this._props[e]&&(t===sG?delete this._props[e]:(this._props[e]=t,"key"===e&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(K(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(K(e),t+""):t||this.removeAttribute(K(e))))}_update(){oT(this._createVNode(),this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=lw(this._def,S(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,F(t[0])?S({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),K(e)!==e&&t(K(e),n)},this._setParent()}),t}_applyStyles(e,t){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let n=this._nonce;for(let t=e.length-1;t>=0;t--){let r=document.createElement("style");n&&r.setAttribute("nonce",n),r.textContent=e[t],this.shadowRoot.prepend(r)}}_parseSlots(){let e;let t=this._slots={};for(;e=this.firstChild;){let n=1===e.nodeType&&e.getAttribute("slot")||"default";(t[n]||(t[n]=[])).push(e),this.removeChild(e)}}_renderSlots(){let e=(this._teleportTarget||this).querySelectorAll("slot"),t=this._instance.type.__scopeId;for(let n=0;n{if(!n.length)return;let t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){let r=e.cloneNode(),i=e[sd];i&&i.forEach(e=>{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display="none";let l=1===t.nodeType?t:t.parentNode;l.appendChild(r);let{hasTransform:s}=sC(r);return l.removeChild(r),s}(n[0].el,i.vnode.el,t))return;n.forEach(s9),n.forEach(s7);let r=n.filter(oe);sw(),r.forEach(e=>{let n=e.el,r=n.style;sv(n,t),r.transform=r.webkitTransform=r.transitionDuration="";let i=n[s4]=e=>{(!e||e.target===n)&&(!e||/transform$/.test(e.propertyName))&&(n.removeEventListener("transitionend",i),n[s4]=null,sb(n,t))};n.addEventListener("transitionend",i)})}),()=>{let s=tV(e),o=sy(s),a=s.tag||lo;if(n=[],r)for(let e=0;e{let t=e.props["onUpdate:modelValue"]||!1;return k(t)?e=>Q(t,e):t};function on(e){e.target.composing=!0}function or(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}let oi=Symbol("_assign"),ol={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e[oi]=ot(i);let l=r||i.props&&"number"===i.props.type;sj(e,t?"change":"input",t=>{if(t.target.composing)return;let r=e.value;n&&(r=r.trim()),l&&(r=Z(r)),e[oi](r)}),n&&sj(e,"change",()=>{e.value=e.value.trim()}),t||(sj(e,"compositionstart",on),sj(e,"compositionend",or),sj(e,"change",or))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:l}},s){if(e[oi]=ot(s),e.composing)return;let o=(l||"number"===e.type)&&!/^0\d/.test(e.value)?Z(e.value):e.value,a=null==t?"":t;o===a||document.activeElement===e&&"range"!==e.type&&(r&&t===n||i&&e.value.trim()===a)||(e.value=a)}},os={deep:!0,created(e,t,n){e[oi]=ot(n),sj(e,"change",()=>{let t=e._modelValue,n=od(e),r=e.checked,i=e[oi];if(k(t)){let e=em(t,n),l=-1!==e;if(r&&!l)i(t.concat(n));else if(!r&&l){let n=[...t];n.splice(e,1),i(n)}}else if(N(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(op(e,r))})},mounted:oo,beforeUpdate(e,t,n){e[oi]=ot(n),oo(e,t,n)}};function oo(e,{value:t},n){let r;e._modelValue=t,r=k(t)?em(t,n.props.value)>-1:N(t)?t.has(n.props.value):eh(t,op(e,!0)),e.checked!==r&&(e.checked=r)}let oa={created(e,{value:t},n){e.checked=eh(t,n.props.value),e[oi]=ot(n),sj(e,"change",()=>{e[oi](od(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[oi]=ot(r),t!==n&&(e.checked=eh(t,r.props.value))}},oc={deep:!0,created(e,{value:t,modifiers:{number:n}},r){let i=N(t);sj(e,"change",()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?Z(od(e)):od(e));e[oi](e.multiple?i?new Set(t):t:t[0]),e._assigning=!0,ng(()=>{e._assigning=!1})}),e[oi]=ot(r)},mounted(e,{value:t}){ou(e,t)},beforeUpdate(e,t,n){e[oi]=ot(n)},updated(e,{value:t}){e._assigning||ou(e,t)}};function ou(e,t){let n=e.multiple,r=k(t);if(!n||r||N(t)){for(let i=0,l=e.options.length;iString(e)===String(s)):l.selected=em(t,s)>-1}else l.selected=t.has(s)}else if(eh(od(l),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function od(e){return"_value"in e?e._value:e.value}function op(e,t){let n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}let of={created(e,t,n){om(e,t,n,null,"created")},mounted(e,t,n){om(e,t,n,null,"mounted")},beforeUpdate(e,t,n,r){om(e,t,n,r,"beforeUpdate")},updated(e,t,n,r){om(e,t,n,r,"updated")}};function oh(e,t){switch(e){case"SELECT":return oc;case"TEXTAREA":return ol;default:switch(t){case"checkbox":return os;case"radio":return oa;default:return ol}}}function om(e,t,n,r,i){let l=oh(e.tagName,n.props&&n.props.type)[i];l&&l(e,t,n,r)}let og=["ctrl","shift","alt","meta"],oy={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>og.some(n=>e[`${n}Key`]&&!t.includes(n))},ov=(e,t)=>{let n=e._withMods||(e._withMods={}),r=t.join(".");return n[r]||(n[r]=(n,...r)=>{for(let e=0;e{let n=e._withKeys||(e._withKeys={}),r=t.join(".");return n[r]||(n[r]=n=>{if(!("key"in n))return;let r=K(n.key);if(t.some(e=>e===r||ob[e]===r))return e(n)})},oS=/* @__PURE__ */S({patchProp:(e,t,n,r,i,l)=>{let s="svg"===i;"class"===t?function(e,t,n){let r=e[sd];r&&(t=(t?[t,...r]:[...r]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,r,s):"style"===t?function(e,t,n){let r=e.style,i=I(n),l=!1;if(n&&!i){if(t){if(I(t))for(let e of t.split(";")){let t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&sL(r,t,"")}else for(let e in t)null==n[e]&&sL(r,e,"")}for(let e in n)"display"===e&&(l=!0),sL(r,e,n[e])}else if(i){if(t!==n){let e=r[sI];e&&(n+=";"+e),r.cssText=n,l=sM.test(n)}}else t&&e.removeAttribute("style");sN in e&&(e[sN]=l?r.display:"",e[sE]&&(r.display="none"))}(e,n,r):b(t)?_(t)||function(e,t,n,r,i=null){let l=e[sH]||(e[sH]={}),s=l[t];if(r&&s)s.value=r;else{let[n,o]=function(e){let t;if(sq.test(e)){let n;for(t={};n=e.match(sq);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):K(e.slice(2)),t]}(t);r?sj(e,n,l[t]=function(e,t){let n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();no(function(e,t){if(!k(t))return t;{let n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(e=>t=>!t._stopped&&e&&e(t))}}(e,n.value),t,5,[e])};return n.value=e,n.attached=sz(),n}(r,i),o):s&&(!function(e,t,n,r){e.removeEventListener(t,n,r)}(e,n,s,o),l[t]=void 0)}}(e,t,0,r,l):("."===t[0]?(t=t.slice(1),0):"^"===t[0]?(t=t.slice(1),1):!function(e,t,n,r){if(r)return!!("innerHTML"===t||"textContent"===t||t in e&&sJ(t)&&R(n));if("spellcheck"===t||"draggable"===t||"translate"===t||"form"===t||"list"===t&&"INPUT"===e.tagName||"type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){let t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return!(sJ(t)&&I(n))&&t in e}(e,t,r,s))?e._isVueCE&&(/[A-Z]/.test(t)||!I(r))?sU(e,q(t),r):("true-value"===t?e._trueValue=r:"false-value"===t&&(e._falseValue=r),sB(e,t,r,s)):(sU(e,t,r),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||sB(e,t,r,s,l,"value"!==t))}},{insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i="svg"===t?so.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?so.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?so.createElement(e,{is:n}):so.createElement(e);return"select"===e&&r&&null!=r.multiple&&i.setAttribute("multiple",r.multiple),i},createText:e=>so.createTextNode(e),createComment:e=>so.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>so.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,r,i,l){let s=n?n.previousSibling:t.lastChild;if(i&&(i===l||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),i!==l&&(i=i.nextSibling););else{sa.innerHTML=ss("svg"===r?`${e}`:"mathml"===r?`${e}`:e);let i=sa.content;if("svg"===r||"mathml"===r){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}}),ox=!1;function oC(){return c=ox?c:iF(oS),ox=!0,c}let oT=(...e)=>{(c||(c=i$(oS))).render(...e)},ok=(...e)=>{oC().hydrate(...e)},ow=(...e)=>{let t=(c||(c=i$(oS))).createApp(...e),{mount:n}=t;return t.mount=e=>{let r=oA(e);if(!r)return;let i=t._component;R(i)||i.render||i.template||(i.template=r.innerHTML),1===r.nodeType&&(r.textContent="");let l=n(r,!1,oE(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),l},t},oN=(...e)=>{let t=oC().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=oA(e);if(t)return n(t,!0,oE(t))},t};function oE(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function oA(e){return I(e)?document.querySelector(e):e}let oR=!1,oI=()=>{oR||(oR=!0,ol.getSSRProps=({value:e})=>({value:e}),oa.getSSRProps=({value:e},t)=>{if(t.props&&eh(t.props.value,e))return{checked:!0}},os.getSSRProps=({value:e},t)=>{if(k(e)){if(t.props&&em(e,t.props.value)>-1)return{checked:!0}}else if(N(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},of.getSSRProps=(e,t)=>{if("string"!=typeof t.type)return;let n=oh(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)},sA.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}})};var oO,oP,oM=/*#__PURE__*/Object.freeze({__proto__:null,BaseTransition:nQ,BaseTransitionPropsValidators:nz,Comment:lc,DeprecationTypes:si,EffectScope:e_,ErrorCodes:nl,ErrorTypeStrings:l9,Fragment:lo,KeepAlive:rg,ReactiveEffect:ek,Static:lu,Suspense:lt,Teleport:nB,Text:la,TrackOpTypes:t5,Transition:sh,TransitionGroup:s5,TriggerOpTypes:t9,VueElement:sY,assertNumber:ni,callWithAsyncErrorHandling:no,callWithErrorHandling:ns,camelize:q,capitalize:z,cloneVNode:lE,compatUtils:sr,computed:l1,createApp:ow,createBlock:lb,createCommentVNode:lI,createElementBlock:lv,createElementVNode:lk,createHydrationRenderer:iF,createPropsRestProxy:it,createRenderer:i$,createSSRApp:oN,createSlots:rH,createStaticVNode:lR,createTextVNode:lA,createVNode:lw,customRef:t0,defineAsyncComponent:rf,defineComponent:n6,defineCustomElement:sQ,defineEmits:rY,defineExpose:r0,defineModel:r6,defineOptions:r1,defineProps:rZ,defineSSRCustomElement:sX,defineSlots:r2,devtools:l7,effect:eM,effectScope:eS,getCurrentInstance:lU,getCurrentScope:ex,getCurrentWatcher:nt,getTransitionRawChildren:n2,guardReactiveProps:lN,h:l2,handleError:na,hasInjectionContext:i_,hydrate:ok,hydrateOnIdle:ra,hydrateOnInteraction:rd,hydrateOnMediaQuery:ru,hydrateOnVisible:rc,initCustomFormatter:l6,initDirectivesForSSR:oI,inject:ib,isMemoSame:l4,isProxy:tF,isReactive:tD,isReadonly:tL,isRef:tH,isRuntimeOnly:lG,isShallow:t$,isVNode:l_,markRaw:tB,mergeDefaults:r7,mergeModels:ie,mergeProps:lD,nextTick:ng,normalizeClass:eo,normalizeProps:ea,normalizeStyle:en,onActivated:rv,onBeforeMount:rk,onBeforeUnmount:rA,onBeforeUpdate:rN,onDeactivated:rb,onErrorCaptured:rM,onMounted:rw,onRenderTracked:rP,onRenderTriggered:rO,onScopeDispose:eC,onServerPrefetch:rI,onUnmounted:rR,onUpdated:rE,onWatcherCleanup:nn,openBlock:lf,popScopeId:nN,provide:iv,proxyRefs:tZ,pushScopeId:nw,queuePostFlushCb:nb,reactive:tR,readonly:tO,ref:tq,registerRuntimeCompiler:lJ,render:oT,renderList:rj,renderSlot:rq,resolveComponent:rL,resolveDirective:rV,resolveDynamicComponent:rF,resolveFilter:sn,resolveTransitionHooks:nZ,setBlockTracking:lg,setDevtoolsHook:se,setTransitionHooks:n1,shallowReactive:tI,shallowReadonly:tP,shallowRef:tW,ssrContextKey:iW,ssrUtils:st,stop:eD,toDisplayString:ey,toHandlerKey:J,toHandlers:rK,toRaw:tV,toRef:t3,toRefs:t1,toValue:tQ,transformVNodeArgs:lx,triggerRef:tJ,unref:tG,useAttrs:r8,useCssModule:s2,useCssVars:sO,useHost:s0,useId:n3,useModel:i0,useSSRContext:iK,useShadowRoot:s1,useSlots:r4,useTemplateRef:n8,useTransitionState:nW,vModelCheckbox:os,vModelDynamic:of,vModelRadio:oa,vModelSelect:oc,vModelText:ol,vShow:sA,version:l8,warn:l5,watch:iQ,watchEffect:iz,watchPostEffect:iJ,watchSyncEffect:iG,withAsyncContext:ir,withCtx:nA,withDefaults:r3,withDirectives:nR,withKeys:o_,withMemo:l3,withModifiers:ov,withScopeId:nE});let oD=Symbol(""),oL=Symbol(""),o$=Symbol(""),oF=Symbol(""),oV=Symbol(""),oB=Symbol(""),oU=Symbol(""),oj=Symbol(""),oH=Symbol(""),oq=Symbol(""),oW=Symbol(""),oK=Symbol(""),oz=Symbol(""),oJ=Symbol(""),oG=Symbol(""),oQ=Symbol(""),oX=Symbol(""),oZ=Symbol(""),oY=Symbol(""),o0=Symbol(""),o1=Symbol(""),o2=Symbol(""),o6=Symbol(""),o3=Symbol(""),o4=Symbol(""),o8=Symbol(""),o5=Symbol(""),o9=Symbol(""),o7=Symbol(""),ae=Symbol(""),at=Symbol(""),an=Symbol(""),ar=Symbol(""),ai=Symbol(""),al=Symbol(""),as=Symbol(""),ao=Symbol(""),aa=Symbol(""),ac=Symbol(""),au={[oD]:"Fragment",[oL]:"Teleport",[o$]:"Suspense",[oF]:"KeepAlive",[oV]:"BaseTransition",[oB]:"openBlock",[oU]:"createBlock",[oj]:"createElementBlock",[oH]:"createVNode",[oq]:"createElementVNode",[oW]:"createCommentVNode",[oK]:"createTextVNode",[oz]:"createStaticVNode",[oJ]:"resolveComponent",[oG]:"resolveDynamicComponent",[oQ]:"resolveDirective",[oX]:"resolveFilter",[oZ]:"withDirectives",[oY]:"renderList",[o0]:"renderSlot",[o1]:"createSlots",[o2]:"toDisplayString",[o6]:"mergeProps",[o3]:"normalizeClass",[o4]:"normalizeStyle",[o8]:"normalizeProps",[o5]:"guardReactiveProps",[o9]:"toHandlers",[o7]:"camelize",[ae]:"capitalize",[at]:"toHandlerKey",[an]:"setBlockTracking",[ar]:"pushScopeId",[ai]:"popScopeId",[al]:"withCtx",[as]:"unref",[ao]:"isRef",[aa]:"withMemo",[ac]:"isMemoSame"},ad={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function ap(e,t,n,r,i,l,s,o=!1,a=!1,c=!1,u=ad){return e&&(o?(e.helper(oB),e.helper(e.inSSR||c?oU:oj)):e.helper(e.inSSR||c?oH:oq),s&&e.helper(oZ)),{type:13,tag:t,props:n,children:r,patchFlag:i,dynamicProps:l,directives:s,isBlock:o,disableTracking:a,isComponent:c,loc:u}}function af(e,t=ad){return{type:17,loc:t,elements:e}}function ah(e,t=ad){return{type:15,loc:t,properties:e}}function am(e,t){return{type:16,loc:ad,key:I(e)?ag(e,!0):e,value:t}}function ag(e,t=!1,n=ad,r=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:r}}function ay(e,t=ad){return{type:8,loc:t,children:e}}function av(e,t=[],n=ad){return{type:14,loc:n,callee:e,arguments:t}}function ab(e,t,n=!1,r=!1,i=ad){return{type:18,params:e,returns:t,newline:n,isSlot:r,loc:i}}function a_(e,t,n,r=!0){return{type:19,test:e,consequent:t,alternate:n,newline:r,loc:ad}}function aS(e,{helper:t,removeHelper:n,inSSR:r}){if(!e.isBlock){var i,l;e.isBlock=!0,n((i=e.isComponent,r||i?oH:oq)),t(oB),t((l=e.isComponent,r||l?oU:oj))}}let ax=new Uint8Array([123,123]),aC=new Uint8Array([125,125]);function aT(e){return e>=97&&e<=122||e>=65&&e<=90}function ak(e){return 32===e||10===e||9===e||12===e||13===e}function aw(e){return 47===e||62===e||ak(e)}function aN(e){let t=new Uint8Array(e.length);for(let n=0;n4===e.type&&e.isStatic;function aP(e){switch(e){case"Teleport":case"teleport":return oL;case"Suspense":case"suspense":return o$;case"KeepAlive":case"keep-alive":return oF;case"BaseTransition":case"base-transition":return oV}}let aM=/^\d|[^\$\w\xA0-\uFFFF]/,aD=e=>!aM.test(e),aL=/[A-Za-z_$\xA0-\uFFFF]/,a$=/[\.\?\w$\xA0-\uFFFF]/,aF=/\s+[.[]\s*|\s*[.[]\s+/g,aV=e=>4===e.type?e.content:e.loc.source,aB=e=>{let t=aV(e).trim().replace(aF,e=>e.trim()),n=0,r=[],i=0,l=0,s=null;for(let e=0;e|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,aj=e=>aU.test(aV(e));function aH(e,t,n=!1){for(let r=0;r4===e.key.type&&e.key.content===r)}return n}function aY(e,t){return`_${t}_${e.replace(/[^\w]/g,(t,n)=>"-"===t?"_":e.charCodeAt(n).toString())}`}let a0=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,a1={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:y,isPreTag:y,isIgnoreNewlineTag:y,isCustomElement:y,onError:aA,onWarn:aR,comments:!1,prefixIdentifiers:!1},a2=a1,a6=null,a3="",a4=null,a8=null,a5="",a9=-1,a7=-1,ce=0,ct=!1,cn=null,cr=[],ci=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=ax,this.delimiterClose=aC,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=ax,this.delimiterClose=aC}getPos(e){let t=1,n=e+1;for(let r=this.newlines.length-1;r>=0;r--){let i=this.newlines[r];if(e>i){t=r+2,n=e-i;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex]){if(this.delimiterIndex===this.delimiterOpen.length-1){let e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++}else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){let t=this.sequenceIndex===this.currentSequence.length;if(t?aw(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t){this.sequenceIndex++;return}}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||ak(e)){let t=this.index-this.currentSequence.length;if(this.sectionStart=e||(28===this.state?this.currentSequence===aE.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(cr,{onerr:c_,ontext(e,t){cc(co(e,t),e,t)},ontextentity(e,t,n){cc(e,t,n)},oninterpolation(e,t){if(ct)return cc(co(e,t),e,t);let n=e+ci.delimiterOpen.length,r=t-ci.delimiterClose.length;for(;ak(a3.charCodeAt(n));)n++;for(;ak(a3.charCodeAt(r-1));)r--;let i=co(n,r);i.includes("&")&&(i=a2.decodeEntities(i,!1)),cg({type:5,content:cb(i,!1,cy(n,r)),loc:cy(e,t)})},onopentagname(e,t){let n=co(e,t);a4={type:1,tag:n,ns:a2.getNamespace(n,cr[0],a2.ns),tagType:0,props:[],children:[],loc:cy(e-1,t),codegenNode:void 0}},onopentagend(e){ca(e)},onclosetag(e,t){let n=co(e,t);if(!a2.isVoidTag(n)){let r=!1;for(let e=0;e0&&/* @__PURE__ *//*@__PURE__*/cr[0].loc.start.offset;for(let n=0;n<=e;n++)cu(cr.shift(),t,n(7===e.type?e.rawName:e.name)===t)},onattribend(e,t){a4&&a8&&(cv(a8.loc,t),0!==e&&(a5.includes("&")&&(a5=a2.decodeEntities(a5,!0)),6===a8.type?("class"===a8.name&&(a5=cm(a5).trim()),a8.value={type:2,content:a5,loc:1===e?cy(a9,a7):cy(a9-1,a7+1)},ci.inSFCRoot&&"template"===a4.tag&&"lang"===a8.name&&a5&&"html"!==a5&&ci.enterRCDATA(aN("{let i=t.start.offset+n,l=i+e.length;return cb(e,!1,cy(i,l),0,r?1:0)},o={source:s(l.trim(),n.indexOf(l,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1},a=i.trim().replace(cs,"").trim(),c=i.indexOf(a),u=a.match(cl);if(u){let e;a=a.replace(cl,"").trim();let t=u[1].trim();if(t&&(e=n.indexOf(t,c+a.length),o.key=s(t,e,!0)),u[2]){let r=u[2].trim();r&&(o.index=s(r,n.indexOf(r,o.key?e+t.length:c+a.length),!0))}}return a&&(o.value=s(a,c,!0)),o}(a8.exp)))),(7!==a8.type||"pre"!==a8.name)&&a4.props.push(a8)),a5="",a9=a7=-1},oncomment(e,t){a2.comments&&cg({type:3,content:co(e,t),loc:cy(e-4,t+3)})},onend(){let e=a3.length;for(let t=0;t64&&n<91||aP(e)||a2.isBuiltInComponent&&a2.isBuiltInComponent(e)||a2.isNativeTag&&!a2.isNativeTag(e))return!0;for(let e=0;e=0;)n--;return n}let cp=/* @__PURE__ */new Set(["if","else","else-if","for","slot"]),cf=/\r\n/g;function ch(e,t){let n="preserve"!==a2.whitespace,r=!1;for(let t=0;t1)for(let i=0;i{n--};for(;nt===e:t=>e.test(t);return(e,r)=>{if(1===e.type){let{props:i}=e;if(3===e.tagType&&i.some(az))return;let l=[];for(let s=0;s`${au[e]}: _${au[e]}`;function cR(e,t,{helper:n,push:r,newline:i,isTS:l}){let s=n("component"===t?oJ:oQ);for(let n=0;n3;t.push("["),n&&t.indent(),cO(e,t,n),n&&t.deindent(),t.push("]")}function cO(e,t,n=!1,r=!0){let{push:i,newline:l}=t;for(let s=0;se||"null")}([s,o,a,n,u]),t),r(")"),p&&r(")"),d&&(r(", "),cP(d,t),r(")"))}(e,t);break;case 14:!function(e,t){let{push:n,helper:r,pure:i}=t,l=I(e.callee)?e.callee:r(e.callee);i&&n(cE),n(l+"(",-2,e),cO(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){let{push:n,indent:r,deindent:i,newline:l}=t,{properties:s}=e;if(!s.length){n("{}",-2,e);return}let o=s.length>1;n(o?"{":"{ "),o&&r();for(let e=0;e "),(a||o)&&(n("{"),r()),s?(a&&n("return "),k(s)?cI(s,t):cP(s,t)):o&&cP(o,t),(a||o)&&(i(),n("}")),c&&n(")")}(e,t);break;case 19:!function(e,t){let{test:n,consequent:r,alternate:i,newline:l}=e,{push:s,indent:o,deindent:a,newline:c}=t;if(4===n.type){let e=!aD(n.content);e&&s("("),cM(n,t),e&&s(")")}else s("("),cP(n,t),s(")");l&&o(),t.indentLevel++,l||s(" "),s("? "),cP(r,t),t.indentLevel--,l&&c(),l||s(" "),s(": ");let u=19===i.type;!u&&t.indentLevel++,cP(i,t),!u&&t.indentLevel--,l&&a(!0)}(e,t);break;case 20:!function(e,t){let{push:n,helper:r,indent:i,deindent:l,newline:s}=t,{needPauseTracking:o,needArraySpread:a}=e;a&&n("[...("),n(`_cache[${e.index}] || (`),o&&(i(),n(`${r(an)}(-1),`),s(),n("(")),n(`_cache[${e.index}] = `),cP(e.value,t),o&&(n(`).cacheIndex = ${e.index},`),s(),n(`${r(an)}(1),`),s(),n(`_cache[${e.index}]`),l()),n(")"),a&&n(")]")}(e,t);break;case 21:cO(e.body,t,!0,!1)}}function cM(e,t){let{content:n,isStatic:r}=e;t.push(r?JSON.stringify(n):n,-3,e)}function cD(e,t){for(let n=0;n(function(e,t,n,r){if("else"!==t.name&&(!t.exp||!t.exp.content.trim())){let r=t.exp?t.exp.loc:e.loc;n.onError(/* @__PURE__ *//*@__PURE__*/aI(28,t.loc)),t.exp=ag("true",!1,r)}if("if"===t.name){let i=c$(e,t),l={type:9,loc:e.loc,branches:[i]};if(n.replaceNode(l),r)return r(l,i,!0)}else{let i=n.parent.children,l=i.indexOf(e);for(;l-- >=-1;){let s=i[l];if(s&&3===s.type||s&&2===s.type&&!s.content.trim().length){n.removeNode(s);continue}if(s&&9===s.type){"else-if"===t.name&&void 0===s.branches[s.branches.length-1].condition&&n.onError(/* @__PURE__ *//*@__PURE__*/aI(30,e.loc)),n.removeNode();let i=c$(e,t);s.branches.push(i);let l=r&&r(s,i,!1);cw(i,n),l&&l(),n.currentNode=null}else n.onError(/* @__PURE__ *//*@__PURE__*/aI(30,e.loc));break}}})(e,t,n,(e,t,r)=>{let i=n.parent.children,l=i.indexOf(e),s=0;for(;l-- >=0;){let e=i[l];e&&9===e.type&&(s+=e.branches.length)}return()=>{r?e.codegenNode=cF(t,s,n):function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode).alternate=cF(t,s+e.branches.length-1,n)}}));function c$(e,t){let n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!aH(e,"for")?e.children:[e],userKey:aq(e,"key"),isTemplateIf:n}}function cF(e,t,n){return e.condition?a_(e.condition,cV(e,t,n),av(n.helper(oW),['""',"true"])):cV(e,t,n)}function cV(e,t,n){let{helper:r}=n,i=am("key",ag(`${t}`,!1,ad,2)),{children:l}=e,s=l[0];if(1!==l.length||1!==s.type){if(1!==l.length||11!==s.type)return ap(n,r(oD),ah([i]),l,64,void 0,void 0,!0,!1,!1,e.loc);{let e=s.codegenNode;return aX(e,i,n),e}}{let e=s.codegenNode,t=14===e.type&&e.callee===aa?e.arguments[1].returns:e;return 13===t.type&&aS(t,n),aX(t,i,n),e}}let cB=(e,t,n)=>{let{modifiers:r,loc:i}=e,l=e.arg,{exp:s}=e;if(s&&4===s.type&&!s.content.trim()&&(s=void 0),!s){if(4!==l.type||!l.isStatic)return n.onError(aI(52,l.loc)),{props:[am(l,ag("",!0,i))]};cU(e),s=e.exp}return 4!==l.type?(l.children.unshift("("),l.children.push(') || ""')):l.isStatic||(l.content=`${l.content} || ""`),r.some(e=>"camel"===e.content)&&(4===l.type?l.isStatic?l.content=q(l.content):l.content=`${n.helperString(o7)}(${l.content})`:(l.children.unshift(`${n.helperString(o7)}(`),l.children.push(")"))),!n.inSSR&&(r.some(e=>"prop"===e.content)&&cj(l,"."),r.some(e=>"attr"===e.content)&&cj(l,"^")),{props:[am(l,s)]}},cU=(e,t)=>{let n=e.arg,r=q(n.content);e.exp=ag(r,!1,n.loc)},cj=(e,t)=>{4===e.type?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},cH=cN("for",(e,t,n)=>{let{helper:r,removeHelper:i}=n;return function(e,t,n,r){if(!t.exp){n.onError(/* @__PURE__ *//*@__PURE__*/aI(31,t.loc));return}let i=t.forParseResult;if(!i){n.onError(/* @__PURE__ *//*@__PURE__*/aI(32,t.loc));return}cq(i);let{addIdentifiers:l,removeIdentifiers:s,scopes:o}=n,{source:a,value:c,key:u,index:d}=i,p={type:11,loc:t.loc,source:a,valueAlias:c,keyAlias:u,objectIndexAlias:d,parseResult:i,children:aJ(e)?e.children:[e]};n.replaceNode(p),o.vFor++;let f=r&&r(p);return()=>{o.vFor--,f&&f()}}(e,t,n,t=>{let l=av(r(oY),[t.source]),s=aJ(e),o=aH(e,"memo"),a=aq(e,"key",!1,!0);a&&7===a.type&&!a.exp&&cU(a);let c=a&&(6===a.type?a.value?ag(a.value.content,!0):void 0:a.exp),u=a&&c?am("key",c):null,d=4===t.source.type&&t.source.constType>0,p=d?64:a?128:256;return t.codegenNode=ap(n,r(oD),void 0,l,p,void 0,void 0,!0,!d,!1,e.loc),()=>{let a;let{children:p}=t,f=1!==p.length||1!==p[0].type,h=aG(e)?e:s&&1===e.children.length&&aG(e.children[0])?e.children[0]:null;if(h)a=h.codegenNode,s&&u&&aX(a,u,n);else if(f)a=ap(n,r(oD),u?ah([u]):void 0,e.children,64,void 0,void 0,!0,void 0,!1);else{var m,g,y,b,_,S,x,C;a=p[0].codegenNode,s&&u&&aX(a,u,n),!d!==a.isBlock&&(a.isBlock?(i(oB),i((m=n.inSSR,g=a.isComponent,m||g?oU:oj))):i((y=n.inSSR,b=a.isComponent,y||b?oH:oq))),(a.isBlock=!d,a.isBlock)?(r(oB),r((_=n.inSSR,S=a.isComponent,_||S?oU:oj))):r((x=n.inSSR,C=a.isComponent,x||C?oH:oq))}if(o){let e=ab(cW(t.parseResult,[ag("_cached")]));e.body={type:21,body:[ay(["const _memo = (",o.exp,")"]),ay(["if (_cached",...c?[" && _cached.key === ",c]:[],` && ${n.helperString(ac)}(_cached, _memo)) return _cached`]),ay(["const _item = ",a]),ag("_item.memo = _memo"),ag("return _item")],loc:ad},l.arguments.push(e,ag("_cache"),ag(String(n.cached.length))),n.cached.push(null)}else l.arguments.push(ab(cW(t.parseResult),a,!0))}})});function cq(e,t){e.finalized||(e.finalized=!0)}function cW({value:e,key:t,index:n},r=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((e,t)=>e||ag("_".repeat(t+1),!1))}([e,t,n,...r])}let cK=ag("undefined",!1),cz=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){let n=aH(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},cJ=(e,t,n,r)=>ab(e,n,!1,!0,n.length?n[0].loc:r);function cG(e,t,n){let r=[am("name",e),am("fn",t)];return null!=n&&r.push(am("key",ag(String(n),!0))),ah(r)}let cQ=/* @__PURE__ */new WeakMap,cX=(e,t)=>function(){let n,r,i,l,s;if(!(1===(e=t.currentNode).type&&(0===e.tagType||1===e.tagType)))return;let{tag:o,props:a}=e,c=1===e.tagType,u=c?function(e,t,n=!1){let{tag:r}=e,i=c0(r),l=aq(e,"is",!1,!0);if(l){if(i){let e;if(6===l.type?e=l.value&&ag(l.value.content,!0):(e=l.exp)||(e=ag("is",!1,l.arg.loc)),e)return av(t.helper(oG),[e])}else 6===l.type&&l.value.content.startsWith("vue:")&&(r=l.value.content.slice(4))}let s=aP(r)||t.isBuiltInComponent(r);return s?(n||t.helper(s),s):(t.helper(oJ),t.components.add(r),aY(r,"component"))}(e,t):`"${o}"`,d=P(u)&&u.callee===oG,p=0,f=d||u===oL||u===o$||!c&&("svg"===o||"foreignObject"===o||"math"===o);if(a.length>0){let r=cZ(e,t,void 0,c,d);n=r.props,p=r.patchFlag,l=r.dynamicPropNames;let i=r.directives;s=i&&i.length?af(i.map(e=>(function(e,t){let n=[],r=cQ.get(e);r?n.push(t.helperString(r)):(t.helper(oQ),t.directives.add(e.name),n.push(aY(e.name,"directive")));let{loc:i}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));let t=ag("true",!1,i);n.push(ah(e.modifiers.map(e=>am(e,t)),i))}return af(n,e.loc)})(e,t))):void 0,r.shouldUseBlock&&(f=!0)}if(e.children.length>0){if(u===oF&&(f=!0,p|=1024),c&&u!==oL&&u!==oF){let{slots:n,hasDynamicSlots:i}=function(e,t,n=cJ){t.helper(al);let{children:r,loc:i}=e,l=[],s=[],o=t.scopes.vSlot>0||t.scopes.vFor>0,a=aH(e,"slot",!0);if(a){let{arg:e,exp:t}=a;e&&!aO(e)&&(o=!0),l.push(am(e||ag("default",!0),n(t,void 0,r,i)))}let c=!1,u=!1,d=[],p=/* @__PURE__ */new Set,f=0;for(let e=0;eam("default",n(e,void 0,t,i));c?d.length&&d.some(e=>(function e(t){return 2!==t.type&&12!==t.type||(2===t.type?!!t.content.trim():e(t.content))})(e))&&(u?t.onError(aI(39,d[0].loc)):l.push(e(void 0,d))):l.push(e(void 0,r))}let h=o?2:!function e(t){for(let n=0;n0,h=!1,m=0,g=!1,y=!1,_=!1,S=!1,x=!1,C=!1,T=[],k=e=>{u.length&&(d.push(ah(cY(u),a)),u=[]),e&&d.push(e)},w=()=>{t.scopes.vFor>0&&u.push(am(ag("ref_for",!0),ag("true")))},N=({key:e,value:n})=>{if(aO(e)){let l=e.content,s=b(l);s&&(!r||i)&&"onclick"!==l.toLowerCase()&&"onUpdate:modelValue"!==l&&!B(l)&&(S=!0),s&&B(l)&&(C=!0),s&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&cx(n,t)>0||("ref"===l?g=!0:"class"===l?y=!0:"style"===l?_=!0:"key"===l||T.includes(l)||T.push(l),r&&("class"===l||"style"===l)&&!T.includes(l)&&T.push(l))}else x=!0};for(let i=0;i"prop"===e.content)&&(m|=32);let S=t.directiveTransforms[n];if(S){let{props:n,needRuntime:r}=S(s,e,t);l||n.forEach(N),_&&i&&!aO(i)?k(ah(n,a)):u.push(...n),r&&(p.push(s),O(r)&&cQ.set(s,r))}else!U(n)&&(p.push(s),f&&(h=!0))}}if(d.length?(k(),s=d.length>1?av(t.helper(o6),d,a):d[0]):u.length&&(s=ah(cY(u),a)),x?m|=16:(y&&!r&&(m|=2),_&&!r&&(m|=4),T.length&&(m|=8),S&&(m|=32)),!h&&(0===m||32===m)&&(g||C||p.length>0)&&(m|=512),!t.inSSR&&s)switch(s.type){case 15:let E=-1,A=-1,R=!1;for(let e=0;e{if(aG(e)){let{children:n,loc:r}=e,{slotName:i,slotProps:l}=function(e,t){let n,r='"default"',i=[];for(let t=0;t0){let{props:r,directives:l}=cZ(e,t,i,!1,!1);n=r,l.length&&t.onError(aI(36,l[0].loc))}return{slotName:r,slotProps:n}}(e,t),s=[t.prefixIdentifiers?"_ctx.$slots":"$slots",i,"{}","undefined","true"],o=2;l&&(s[2]=l,o=3),n.length&&(s[3]=ab([],n,!1,!1,r),o=4),t.scopeId&&!t.slotted&&(o=5),s.splice(o),e.codegenNode=av(t.helper(o0),s,r)}},c2=(e,t,n,r)=>{let i;let{loc:l,modifiers:s,arg:o}=e;if(e.exp||s.length,4===o.type){if(o.isStatic){let e=o.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`),i=ag(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?J(q(e)):`on:${e}`,!0,o.loc)}else i=ay([`${n.helperString(at)}(`,o,")"])}else(i=o).children.unshift(`${n.helperString(at)}(`),i.children.push(")");let a=e.exp;a&&!a.content.trim()&&(a=void 0);let c=n.cacheHandlers&&!a&&!n.inVOnce;if(a){let e=aB(a),t=!(e||aj(a)),n=a.content.includes(";");(t||c&&e)&&(a=ay([`${t?"$event":"(...args)"} => ${n?"{":"("}`,a,n?"}":")"]))}let u={props:[am(i,a||ag("() => {}",!1,l))]};return r&&(u=r(u)),c&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach(e=>e.key.isHandlerKey=!0),u},c6=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{let n;let r=e.children,i=!1;for(let e=0;e7===e.type&&!t.directiveTransforms[e.name]))))for(let e=0;e{if(1===e.type&&aH(e,"once",!0)&&!c3.has(e)&&!t.inVOnce&&!t.inSSR)return c3.add(e),t.inVOnce=!0,t.helper(an),()=>{t.inVOnce=!1;let e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}},c8=(e,t,n)=>{let r;let{exp:i,arg:l}=e;if(!i)return n.onError(/* @__PURE__ *//*@__PURE__*/aI(41,e.loc)),c5();let s=i.loc.source.trim(),o=4===i.type?i.content:s,a=n.bindingMetadata[s];if("props"===a||"props-aliased"===a)return /* @__PURE__ */i.loc,c5();if(!o.trim()||!aB(i))return n.onError(/* @__PURE__ *//*@__PURE__*/aI(42,i.loc)),c5();let c=l||ag("modelValue",!0),u=l?aO(l)?`onUpdate:${q(l.content)}`:ay(['"onUpdate:" + ',l]):"onUpdate:modelValue",d=n.isTS?"($event: any)":"$event";r=ay([`${d} => ((`,i,") = $event)"]);let p=[am(c,e.exp),am(u,r)];if(e.modifiers.length&&1===t.tagType){let t=e.modifiers.map(e=>e.content).map(e=>(aD(e)?e:JSON.stringify(e))+": true").join(", "),n=l?aO(l)?`${l.content}Modifiers`:ay([l,' + "Modifiers"']):"modelModifiers";p.push(am(n,ag(`{ ${t} }`,!1,e.loc,2)))}return c5(p)};function c5(e=[]){return{props:e}}let c9=/* @__PURE__ */new WeakSet,c7=(e,t)=>{if(1===e.type){let n=aH(e,"memo");if(!(!n||c9.has(e)))return c9.add(e),()=>{let r=e.codegenNode||t.currentNode.codegenNode;r&&13===r.type&&(1!==e.tagType&&aS(r,t),e.codegenNode=av(t.helper(aa),[n.exp,ab(void 0,r),"_cache",String(t.cached.length)]),t.cached.push(null))}}},ue=Symbol(""),ut=Symbol(""),un=Symbol(""),ur=Symbol(""),ui=Symbol(""),ul=Symbol(""),us=Symbol(""),uo=Symbol(""),ua=Symbol(""),uc=Symbol("");!function(e){Object.getOwnPropertySymbols(e).forEach(t=>{au[t]=e[t]})}({[ue]:"vModelRadio",[ut]:"vModelCheckbox",[un]:"vModelText",[ur]:"vModelSelect",[ui]:"vModelDynamic",[ul]:"withModifiers",[us]:"withKeys",[uo]:"vShow",[ua]:"Transition",[uc]:"TransitionGroup"});let uu={parseMode:"html",isVoidTag:ep,isNativeTag:e=>ec(e)||eu(e)||ed(e),isPreTag:e=>"pre"===e,isIgnoreNewlineTag:e=>"pre"===e||"textarea"===e,decodeEntities:function(e,t=!1){return(u||(u=document.createElement("div")),t)?(u.innerHTML=`
`,u.children[0].getAttribute("foo")):(u.innerHTML=e,u.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?ua:"TransitionGroup"===e||"transition-group"===e?uc:void 0,getNamespace(e,t,n){let r=t?t.ns:n;if(t&&2===r){if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some(e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content))&&(r=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(r=0)}else t&&1===r&&("foreignObject"===t.tag||"desc"===t.tag||"title"===t.tag)&&(r=0);if(0===r){if("svg"===e)return 1;if("math"===e)return 2}return r}},ud=(e,t)=>ag(JSON.stringify(es(e)),!1,t,3),up=/* @__PURE__ */f("passive,once,capture"),uf=/* @__PURE__ */f("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),uh=/* @__PURE__ */f("left,right"),um=/* @__PURE__ */f("onkeyup,onkeydown,onkeypress"),ug=(e,t,n,r)=>{let i=[],l=[],s=[];for(let n=0;naO(e)&&"onclick"===e.content.toLowerCase()?ag(t,!0):4!==e.type?ay(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,uv=(e,t)=>{1===e.type&&0===e.tagType&&("script"===e.tag||"style"===e.tag)&&t.removeNode()},ub=[e=>{1===e.type&&e.props.forEach((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:ag("style",!0,t.loc),exp:ud(t.value.content,t.loc),modifiers:[],loc:t.loc})})}],u_={cloak:()=>({props:[]}),html:(e,t,n)=>{let{exp:r,loc:i}=e;return r||n.onError(aI(53,i)),t.children.length&&(n.onError(aI(54,i)),t.children.length=0),{props:[am(ag("innerHTML",!0,i),r||ag("",!0))]}},text:(e,t,n)=>{let{exp:r,loc:i}=e;return r||n.onError(aI(55,i)),t.children.length&&(n.onError(aI(56,i)),t.children.length=0),{props:[am(ag("textContent",!0),r?cx(r,n)>0?r:av(n.helperString(o2),[r],i):ag("",!0))]}},model:(e,t,n)=>{let r=c8(e,t,n);if(!r.props.length||1===t.tagType)return r;e.arg&&n.onError(aI(58,e.arg.loc));let{tag:i}=t,l=n.isCustomElement(i);if("input"===i||"textarea"===i||"select"===i||l){let s=un,o=!1;if("input"===i||l){let r=aq(t,"type");if(r){if(7===r.type)s=ui;else if(r.value)switch(r.value.content){case"radio":s=ue;break;case"checkbox":s=ut;break;case"file":o=!0,n.onError(aI(59,e.loc))}}else t.props.some(e=>7===e.type&&"bind"===e.name&&(!e.arg||4!==e.arg.type||!e.arg.isStatic))&&(s=ui)}else"select"===i&&(s=ur);o||(r.needRuntime=n.helper(s))}else n.onError(aI(57,e.loc));return r.props=r.props.filter(e=>!(4===e.key.type&&"modelValue"===e.key.content)),r},on:(e,t,n)=>c2(e,t,n,t=>{let{modifiers:r}=e;if(!r.length)return t;let{key:i,value:l}=t.props[0],{keyModifiers:s,nonKeyModifiers:o,eventOptionModifiers:a}=ug(i,r,n,e.loc);if(o.includes("right")&&(i=uy(i,"onContextmenu")),o.includes("middle")&&(i=uy(i,"onMouseup")),o.length&&(l=av(n.helper(ul),[l,JSON.stringify(o)])),s.length&&(!aO(i)||um(i.content.toLowerCase()))&&(l=av(n.helper(us),[l,JSON.stringify(s)])),a.length){let e=a.map(z).join("");i=aO(i)?ag(`${i.content}${e}`,!0):ay(["(",i,`) + "${e}"`])}return{props:[am(i,l)]}}),show:(e,t,n)=>{let{exp:r,loc:i}=e;return!r&&n.onError(aI(61,i)),{props:[],needRuntime:n.helper(uo)}}},uS=/* @__PURE__ */Object.create(null);function ux(e,t){if(!I(e)){if(!e.nodeType)return g;e=e.innerHTML}let n=e+JSON.stringify(t,(e,t)=>"function"==typeof t?t.toString():t),r=uS[n];if(r)return r;if("#"===e[0]){let t=document.querySelector(e);e=t?t.innerHTML:""}let i=S({hoistStatic:!0,onError:void 0,onWarn:g},t);i.isCustomElement||"undefined"==typeof customElements||(i.isCustomElement=e=>!!customElements.get(e));let{code:l}=function(e,t={}){return function(e,t={}){let n=t.onError||aA,r="module"===t.mode;!0===t.prefixIdentifiers?n(/* @__PURE__ *//*@__PURE__*/aI(47)):r&&n(/* @__PURE__ *//*@__PURE__*/aI(48)),t.cacheHandlers&&n(/* @__PURE__ *//*@__PURE__*/aI(49)),t.scopeId&&!r&&n(/* @__PURE__ *//*@__PURE__*/aI(50));let i=S({},t,{prefixIdentifiers:!1}),l=I(e)?function(e,t){if(ci.reset(),a4=null,a8=null,a5="",a9=-1,a7=-1,cr.length=0,a3=e,a2=S({},a1),t){let e;for(e in t)null!=t[e]&&(a2[e]=t[e])}ci.mode="html"===a2.parseMode?1:"sfc"===a2.parseMode?2:0,ci.inXML=1===a2.ns||2===a2.ns;let n=t&&t.delimiters;n&&(ci.delimiterOpen=aN(n[0]),ci.delimiterClose=aN(n[1]));let r=a6=function(e,t=""){return{type:0,source:t,children:e,helpers:/* @__PURE__ */new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:ad}}([],e);return ci.parse(a3),r.loc=cy(0,e.length),r.children=ch(r.children),a6=null,r}(e,i):e,[s,o]=[[c4,cL,c7,cH,c1,cX,cz,c6],{on:c2,bind:cB,model:c8}];return!function(e,t){let n=function(e,{filename:t="",prefixIdentifiers:n=!1,hoistStatic:r=!1,hmr:i=!1,cacheHandlers:l=!1,nodeTransforms:s=[],directiveTransforms:o={},transformHoist:a=null,isBuiltInComponent:c=g,isCustomElement:u=g,expressionPlugins:d=[],scopeId:p=null,slotted:f=!0,ssr:m=!1,inSSR:y=!1,ssrCssVars:b="",bindingMetadata:_=h,inline:S=!1,isTS:x=!1,onError:C=aA,onWarn:T=aR,compatConfig:k}){let w=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),N={filename:t,selfName:w&&z(q(w[1])),prefixIdentifiers:n,hoistStatic:r,hmr:i,cacheHandlers:l,nodeTransforms:s,directiveTransforms:o,transformHoist:a,isBuiltInComponent:c,isCustomElement:u,expressionPlugins:d,scopeId:p,slotted:f,ssr:m,inSSR:y,ssrCssVars:b,bindingMetadata:_,inline:S,isTS:x,onError:C,onWarn:T,compatConfig:k,root:e,helpers:/* @__PURE__ */new Map,components:/* @__PURE__ */new Set,directives:/* @__PURE__ */new Set,hoists:[],imports:[],cached:[],constantCache:/* @__PURE__ */new WeakMap,temps:0,identifiers:/* @__PURE__ */Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:e,childIndex:0,inVOnce:!1,helper(e){let t=N.helpers.get(e)||0;return N.helpers.set(e,t+1),e},removeHelper(e){let t=N.helpers.get(e);if(t){let n=t-1;n?N.helpers.set(e,n):N.helpers.delete(e)}},helperString:e=>`_${au[N.helper(e)]}`,replaceNode(e){N.parent.children[N.childIndex]=N.currentNode=e},removeNode(e){let t=N.parent.children,n=e?t.indexOf(e):N.currentNode?N.childIndex:-1;e&&e!==N.currentNode?N.childIndex>n&&(N.childIndex--,N.onNodeRemoved()):(N.currentNode=null,N.onNodeRemoved()),N.parent.children.splice(n,1)},onNodeRemoved:g,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){I(e)&&(e=ag(e)),N.hoists.push(e);let t=ag(`_hoisted_${N.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1){let n=function(e,t,n=!1){return{type:20,index:e,value:t,needPauseTracking:n,needArraySpread:!1,loc:ad}}(N.cached.length,e,t);return N.cached.push(n),n}};return N}(e,t);cw(e,n),t.hoistStatic&&function e(t,n,r,i=!1,l=!1){let{children:s}=t,o=[];for(let n=0;n0){if(e>=2){a.codegenNode.patchFlag=-1,o.push(a);continue}}else{let e=a.codegenNode;if(13===e.type){let t=e.patchFlag;if((void 0===t||512===t||1===t)&&cT(a,r)>=2){let t=ck(a);t&&(e.props=r.hoist(t))}e.dynamicProps&&(e.dynamicProps=r.hoist(e.dynamicProps))}}}else if(12===a.type&&(i?0:cx(a,r))>=2){o.push(a);continue}if(1===a.type){let n=1===a.tagType;n&&r.scopes.vSlot++,e(a,t,r,!1,l),n&&r.scopes.vSlot--}else if(11===a.type)e(a,t,r,1===a.children.length,!0);else if(9===a.type)for(let n=0;ne.key===t||e.key.content===t);return n&&n.value}}o.length&&r.transformHoist&&r.transformHoist(s,r,t)}(e,void 0,n,cS(e,e.children[0])),t.ssr||function(e,t){let{helper:n}=t,{children:r}=e;if(1===r.length){let n=r[0];if(cS(e,n)&&n.codegenNode){let r=n.codegenNode;13===r.type&&aS(r,t),e.codegenNode=r}else e.codegenNode=n}else r.length>1&&(e.codegenNode=ap(t,n(oD),void 0,e.children,64,void 0,void 0,!0,void 0,!1))}(e,n),e.helpers=/* @__PURE__ */new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0}(l,S({},i,{nodeTransforms:[...s,...t.nodeTransforms||[]],directiveTransforms:S({},o,t.directiveTransforms||{})})),function(e,t={}){let n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:r=!1,filename:i="template.vue.html",scopeId:l=null,optimizeImports:s=!1,runtimeGlobalName:o="Vue",runtimeModuleName:a="vue",ssrRuntimeModuleName:c="vue/server-renderer",ssr:u=!1,isTS:d=!1,inSSR:p=!1}){let f={mode:t,prefixIdentifiers:n,sourceMap:r,filename:i,scopeId:l,optimizeImports:s,runtimeGlobalName:o,runtimeModuleName:a,ssrRuntimeModuleName:c,ssr:u,isTS:d,inSSR:p,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${au[e]}`,push(e,t=-2,n){f.code+=e},indent(){h(++f.indentLevel)},deindent(e=!1){e?--f.indentLevel:h(--f.indentLevel)},newline(){h(f.indentLevel)}};function h(e){f.push("\n"+" ".repeat(e),0)}return f}(e,t);t.onContextCreated&&t.onContextCreated(n);let{mode:r,push:i,prefixIdentifiers:l,indent:s,deindent:o,newline:a,scopeId:c,ssr:u}=n,d=Array.from(e.helpers),p=d.length>0,f=!l&&"module"!==r;(function(e,t){let{ssr:n,prefixIdentifiers:r,push:i,newline:l,runtimeModuleName:s,runtimeGlobalName:o,ssrRuntimeModuleName:a}=t,c=Array.from(e.helpers);if(c.length>0&&(i(`const _Vue = ${o} +`,-1),e.hoists.length)){let e=[oH,oq,oW,oK,oz].filter(e=>c.includes(e)).map(cA).join(", ");i(`const { ${e} } = _Vue +`,-1)}(function(e,t){if(!e.length)return;t.pure=!0;let{push:n,newline:r}=t;r();for(let i=0;i0)&&a()),e.directives.length&&(cR(e.directives,"directive",n),e.temps>0&&a()),e.temps>0){i("let ");for(let t=0;t0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(i(` +`,0),a()),u||i("return "),e.codegenNode?cP(e.codegenNode,n):i("null"),f&&(o(),i("}")),o(),i("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}(l,i)}(e,S({},uu,t,{nodeTransforms:[uv,...ub,...t.nodeTransforms||[]],directiveTransforms:S({},u_,t.directiveTransforms||{}),transformHoist:null}))}(e,i),s=Function("Vue",l)(oM);return s._rc=!0,uS[n]=s}lJ(ux);export{nQ as BaseTransition,nz as BaseTransitionPropsValidators,lc as Comment,si as DeprecationTypes,e_ as EffectScope,nl as ErrorCodes,l9 as ErrorTypeStrings,lo as Fragment,rg as KeepAlive,ek as ReactiveEffect,lu as Static,lt as Suspense,nB as Teleport,la as Text,t5 as TrackOpTypes,sh as Transition,s5 as TransitionGroup,t9 as TriggerOpTypes,sY as VueElement,ni as assertNumber,no as callWithAsyncErrorHandling,ns as callWithErrorHandling,q as camelize,z as capitalize,lE as cloneVNode,sr as compatUtils,ux as compile,l1 as computed,ow as createApp,lb as createBlock,lI as createCommentVNode,lv as createElementBlock,lk as createElementVNode,iF as createHydrationRenderer,it as createPropsRestProxy,i$ as createRenderer,oN as createSSRApp,rH as createSlots,lR as createStaticVNode,lA as createTextVNode,lw as createVNode,t0 as customRef,rf as defineAsyncComponent,n6 as defineComponent,sQ as defineCustomElement,rY as defineEmits,r0 as defineExpose,r6 as defineModel,r1 as defineOptions,rZ as defineProps,sX as defineSSRCustomElement,r2 as defineSlots,l7 as devtools,eM as effect,eS as effectScope,lU as getCurrentInstance,ex as getCurrentScope,nt as getCurrentWatcher,n2 as getTransitionRawChildren,lN as guardReactiveProps,l2 as h,na as handleError,i_ as hasInjectionContext,ok as hydrate,ra as hydrateOnIdle,rd as hydrateOnInteraction,ru as hydrateOnMediaQuery,rc as hydrateOnVisible,l6 as initCustomFormatter,oI as initDirectivesForSSR,ib as inject,l4 as isMemoSame,tF as isProxy,tD as isReactive,tL as isReadonly,tH as isRef,lG as isRuntimeOnly,t$ as isShallow,l_ as isVNode,tB as markRaw,r7 as mergeDefaults,ie as mergeModels,lD as mergeProps,ng as nextTick,eo as normalizeClass,ea as normalizeProps,en as normalizeStyle,rv as onActivated,rk as onBeforeMount,rA as onBeforeUnmount,rN as onBeforeUpdate,rb as onDeactivated,rM as onErrorCaptured,rw as onMounted,rP as onRenderTracked,rO as onRenderTriggered,eC as onScopeDispose,rI as onServerPrefetch,rR as onUnmounted,rE as onUpdated,nn as onWatcherCleanup,lf as openBlock,nN as popScopeId,iv as provide,tZ as proxyRefs,nw as pushScopeId,nb as queuePostFlushCb,tR as reactive,tO as readonly,tq as ref,lJ as registerRuntimeCompiler,oT as render,rj as renderList,rq as renderSlot,rL as resolveComponent,rV as resolveDirective,rF as resolveDynamicComponent,sn as resolveFilter,nZ as resolveTransitionHooks,lg as setBlockTracking,se as setDevtoolsHook,n1 as setTransitionHooks,tI as shallowReactive,tP as shallowReadonly,tW as shallowRef,iW as ssrContextKey,st as ssrUtils,eD as stop,ey as toDisplayString,J as toHandlerKey,rK as toHandlers,tV as toRaw,t3 as toRef,t1 as toRefs,tQ as toValue,lx as transformVNodeArgs,tJ as triggerRef,tG as unref,r8 as useAttrs,s2 as useCssModule,sO as useCssVars,s0 as useHost,n3 as useId,i0 as useModel,iK as useSSRContext,s1 as useShadowRoot,r4 as useSlots,n8 as useTemplateRef,nW as useTransitionState,os as vModelCheckbox,of as vModelDynamic,oa as vModelRadio,oc as vModelSelect,ol as vModelText,sA as vShow,l8 as version,l5 as warn,iQ as watch,iz as watchEffect,iJ as watchPostEffect,iG as watchSyncEffect,ir as withAsyncContext,nA as withCtx,r3 as withDefaults,nR as withDirectives,o_ as withKeys,l3 as withMemo,ov as withModifiers,nE as withScopeId}; diff --git a/lib/mjs/vue.mjs b/lib/mjs/vue.mjs index 37c9dd3..440c6ec 100644 --- a/lib/mjs/vue.mjs +++ b/lib/mjs/vue.mjs @@ -1,10 +1,14 @@ -function makeMap(str, expectsLowerCase) { +/** +* vue v3.5.11 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/ +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function makeMap(str) { const map = /* @__PURE__ */ Object.create(null); - const list = str.split(","); - for (let i = 0; i < list.length; i++) { - map[list[i]] = true; - } - return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val]; + for (const key of str.split(",")) map[key] = 1; + return (val) => val in map; } const EMPTY_OBJ = Object.freeze({}) ; @@ -12,8 +16,8 @@ const EMPTY_ARR = Object.freeze([]) ; const NOOP = () => { }; const NO = () => false; -const onRE = /^on[^a-z]/; -const isOn = (key) => onRE.test(key); +const isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); const isModelListener = (key) => key.startsWith("onUpdate:"); const extend = Object.assign; const remove = (arr, el) => { @@ -34,7 +38,7 @@ const isString = (val) => typeof val === "string"; const isSymbol = (val) => typeof val === "symbol"; const isObject = (val) => val !== null && typeof val === "object"; const isPromise = (val) => { - return isObject(val) && isFunction(val.then) && isFunction(val.catch); + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); }; const objectToString = Object.prototype.toString; const toTypeString = (value) => objectToString.call(value); @@ -58,29 +62,35 @@ const cacheStringFunction = (fn) => { }; }; const camelizeRE = /-(\w)/g; -const camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); -}); +const camelize = cacheStringFunction( + (str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); + } +); const hyphenateRE = /\B([A-Z])/g; const hyphenate = cacheStringFunction( (str) => str.replace(hyphenateRE, "-$1").toLowerCase() ); -const capitalize = cacheStringFunction( - (str) => str.charAt(0).toUpperCase() + str.slice(1) -); +const capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); const toHandlerKey = cacheStringFunction( - (str) => str ? `on${capitalize(str)}` : `` + (str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; + } ); const hasChanged = (value, oldValue) => !Object.is(value, oldValue); -const invokeArrayFns = (fns, arg) => { +const invokeArrayFns = (fns, ...arg) => { for (let i = 0; i < fns.length; i++) { - fns[i](arg); + fns[i](...arg); } }; -const def = (obj, key, value) => { +const def = (obj, key, value, writable = false) => { Object.defineProperty(obj, key, { configurable: true, enumerable: false, + writable, value }); }; @@ -96,6 +106,12 @@ let _globalThis; const getGlobalThis = () => { return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); }; +function genCacheKey(source, options) { + return source + JSON.stringify( + options, + (_, val) => typeof val === "function" ? val.toString() : val + ); +} const PatchFlagNames = { [1]: `TEXT`, @@ -103,7 +119,7 @@ const PatchFlagNames = { [4]: `STYLE`, [8]: `PROPS`, [16]: `FULL_PROPS`, - [32]: `HYDRATE_EVENTS`, + [32]: `NEED_HYDRATION`, [64]: `STABLE_FRAGMENT`, [128]: `KEYED_FRAGMENT`, [256]: `UNKEYED_FRAGMENT`, @@ -120,11 +136,14 @@ const slotFlagsText = { [3]: "FORWARDED" }; -const GLOBALS_WHITE_LISTED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console"; -const isGloballyWhitelisted = /* @__PURE__ */ makeMap(GLOBALS_WHITE_LISTED); +const GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol"; +const isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED); const range = 2; function generateCodeFrame(source, start = 0, end = source.length) { + start = Math.max(0, Math.min(start, source.length)); + end = Math.max(0, Math.min(end, source.length)); + if (start > end) return ""; let lines = source.split(/(\r?\n)/); const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); lines = lines.filter((_, idx) => idx % 2 === 0); @@ -134,8 +153,7 @@ function generateCodeFrame(source, start = 0, end = source.length) { count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); if (count >= start) { for (let j = i - range; j <= i + range || end > count; j++) { - if (j < 0 || j >= lines.length) - continue; + if (j < 0 || j >= lines.length) continue; const line = j + 1; res.push( `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` @@ -176,9 +194,7 @@ function normalizeStyle(value) { } } return res; - } else if (isString(value)) { - return value; - } else if (isObject(value)) { + } else if (isString(value) || isObject(value)) { return value; } } @@ -195,6 +211,20 @@ function parseStringStyle(cssText) { }); return ret; } +function stringifyStyle(styles) { + let ret = ""; + if (!styles || isString(styles)) { + return ret; + } + for (const key in styles) { + const value = styles[key]; + if (isString(value) || typeof value === "number") { + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + ret += `${normalizedKey}:${value};`; + } + } + return ret; +} function normalizeClass(value) { let res = ""; if (isString(value)) { @@ -216,8 +246,7 @@ function normalizeClass(value) { return res.trim(); } function normalizeProps(props) { - if (!props) - return null; + if (!props) return null; let { class: klass, style } = props; if (klass && !isString(klass)) { props.class = normalizeClass(klass); @@ -230,20 +259,45 @@ function normalizeProps(props) { const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +const MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); +const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS); const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs); +const isBooleanAttr = /* @__PURE__ */ makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` +); function includeBooleanAttr(value) { return !!value || value === ""; } +const isKnownHtmlAttr = /* @__PURE__ */ makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` +); +const isKnownSvgAttr = /* @__PURE__ */ makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` +); +function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; +} + +const cssVarNameEscapeSymbolsRE = /[ !"#$%&'()*+,./:;<=>?@[\\\]^`{|}~]/g; +function getEscapedCssVarName(key, doubleEscape) { + return key.replace( + cssVarNameEscapeSymbolsRE, + (s) => `\\${s}` + ); +} function looseCompareArrays(a, b) { - if (a.length !== b.length) - return false; + if (a.length !== b.length) return false; let equal = true; for (let i = 0; equal && i < a.length; i++) { equal = looseEqual(a[i], b[i]); @@ -251,8 +305,7 @@ function looseCompareArrays(a, b) { return equal; } function looseEqual(a, b) { - if (a === b) - return true; + if (a === b) return true; let aValidType = isDate(a); let bValidType = isDate(b); if (aValidType || bValidType) { @@ -293,30 +346,46 @@ function looseIndexOf(arr, val) { return arr.findIndex((item) => looseEqual(item, val)); } +const isRef$1 = (val) => { + return !!(val && val["__v_isRef"] === true); +}; const toDisplayString = (val) => { - return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val); }; const replacer = (_key, val) => { - if (val && val.__v_isRef) { + if (isRef$1(val)) { return replacer(_key, val.value); } else if (isMap(val)) { return { - [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => { - entries[`${key} =>`] = val2; - return entries; - }, {}) + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) }; } else if (isSet(val)) { return { - [`Set(${val.size})`]: [...val.values()] + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) }; + } else if (isSymbol(val)) { + return stringifySymbol(val); } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { return String(val); } return val; }; +const stringifySymbol = (v, i = "") => { + var _a; + return ( + // Symbol.description in es2019+ so we need to cast here to pass + // the lib: es2016 check + isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v + ); +}; -function warn$1(msg, ...args) { +function warn$2(msg, ...args) { console.warn(`[Vue warn] ${msg}`, ...args); } @@ -336,6 +405,7 @@ class EffectScope { * @internal */ this.cleanups = []; + this._isPaused = false; this.parent = activeEffectScope; if (!detached && activeEffectScope) { this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( @@ -346,6 +416,39 @@ class EffectScope { get active() { return this._active; } + pause() { + if (this._active) { + this._isPaused = true; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].pause(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].pause(); + } + } + } + /** + * Resumes the effect scope, including all child scopes and effects. + */ + resume() { + if (this._active) { + if (this._isPaused) { + this._isPaused = false; + let i, l; + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].resume(); + } + } + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].resume(); + } + } + } + } run(fn) { if (this._active) { const currentEffectScope = activeEffectScope; @@ -356,7 +459,7 @@ class EffectScope { activeEffectScope = currentEffectScope; } } else { - warn$1(`cannot run an inactive effect scope.`); + warn$2(`cannot run an inactive effect scope.`); } } /** @@ -402,145 +505,307 @@ class EffectScope { function effectScope(detached) { return new EffectScope(detached); } -function recordEffectScope(effect, scope = activeEffectScope) { - if (scope && scope.active) { - scope.effects.push(effect); - } -} function getCurrentScope() { return activeEffectScope; } -function onScopeDispose(fn) { +function onScopeDispose(fn, failSilently = false) { if (activeEffectScope) { activeEffectScope.cleanups.push(fn); - } else { - warn$1( + } else if (!failSilently) { + warn$2( `onScopeDispose() is called when there is no active effect scope to be associated with.` ); } } -const createDep = (effects) => { - const dep = new Set(effects); - dep.w = 0; - dep.n = 0; - return dep; -}; -const wasTracked = (dep) => (dep.w & trackOpBit) > 0; -const newTracked = (dep) => (dep.n & trackOpBit) > 0; -const initDepMarkers = ({ deps }) => { - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].w |= trackOpBit; +let activeSub; +const pausedQueueEffects = /* @__PURE__ */ new WeakSet(); +class ReactiveEffect { + constructor(fn) { + this.fn = fn; + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 1 | 4; + /** + * @internal + */ + this.next = void 0; + /** + * @internal + */ + this.cleanup = void 0; + this.scheduler = void 0; + if (activeEffectScope && activeEffectScope.active) { + activeEffectScope.effects.push(this); } } -}; -const finalizeDepMarkers = (effect) => { - const { deps } = effect; - if (deps.length) { - let ptr = 0; - for (let i = 0; i < deps.length; i++) { - const dep = deps[i]; - if (wasTracked(dep) && !newTracked(dep)) { - dep.delete(effect); - } else { - deps[ptr++] = dep; + pause() { + this.flags |= 64; + } + resume() { + if (this.flags & 64) { + this.flags &= ~64; + if (pausedQueueEffects.has(this)) { + pausedQueueEffects.delete(this); + this.trigger(); } - dep.w &= ~trackOpBit; - dep.n &= ~trackOpBit; } - deps.length = ptr; } -}; - -const targetMap = /* @__PURE__ */ new WeakMap(); -let effectTrackDepth = 0; -let trackOpBit = 1; -const maxMarkerBits = 30; -let activeEffect; -const ITERATE_KEY = Symbol("iterate" ); -const MAP_KEY_ITERATE_KEY = Symbol("Map key iterate" ); -class ReactiveEffect { - constructor(fn, scheduler = null, scope) { - this.fn = fn; - this.scheduler = scheduler; - this.active = true; - this.deps = []; - this.parent = void 0; - recordEffectScope(this, scope); + /** + * @internal + */ + notify() { + if (this.flags & 2 && !(this.flags & 32)) { + return; + } + if (!(this.flags & 8)) { + batch(this); + } } run() { - if (!this.active) { + if (!(this.flags & 1)) { return this.fn(); } - let parent = activeEffect; - let lastShouldTrack = shouldTrack; - while (parent) { - if (parent === this) { - return; - } - parent = parent.parent; - } + this.flags |= 2; + cleanupEffect(this); + prepareDeps(this); + const prevEffect = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = this; + shouldTrack = true; try { - this.parent = activeEffect; - activeEffect = this; - shouldTrack = true; - trackOpBit = 1 << ++effectTrackDepth; - if (effectTrackDepth <= maxMarkerBits) { - initDepMarkers(this); - } else { - cleanupEffect(this); - } return this.fn(); } finally { - if (effectTrackDepth <= maxMarkerBits) { - finalizeDepMarkers(this); - } - trackOpBit = 1 << --effectTrackDepth; - activeEffect = this.parent; - shouldTrack = lastShouldTrack; - this.parent = void 0; - if (this.deferStop) { - this.stop(); + if (activeSub !== this) { + warn$2( + "Active effect was not restored correctly - this is likely a Vue internal bug." + ); } + cleanupDeps(this); + activeSub = prevEffect; + shouldTrack = prevShouldTrack; + this.flags &= ~2; } } stop() { - if (activeEffect === this) { - this.deferStop = true; - } else if (this.active) { + if (this.flags & 1) { + for (let link = this.deps; link; link = link.nextDep) { + removeSub(link); + } + this.deps = this.depsTail = void 0; cleanupEffect(this); - if (this.onStop) { - this.onStop(); + this.onStop && this.onStop(); + this.flags &= ~1; + } + } + trigger() { + if (this.flags & 64) { + pausedQueueEffects.add(this); + } else if (this.scheduler) { + this.scheduler(); + } else { + this.runIfDirty(); + } + } + /** + * @internal + */ + runIfDirty() { + if (isDirty(this)) { + this.run(); + } + } + get dirty() { + return isDirty(this); + } +} +let batchDepth = 0; +let batchedSub; +let batchedComputed; +function batch(sub, isComputed = false) { + sub.flags |= 8; + if (isComputed) { + sub.next = batchedComputed; + batchedComputed = sub; + return; + } + sub.next = batchedSub; + batchedSub = sub; +} +function startBatch() { + batchDepth++; +} +function endBatch() { + if (--batchDepth > 0) { + return; + } + if (batchedComputed) { + let e = batchedComputed; + batchedComputed = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + e = next; + } + } + let error; + while (batchedSub) { + let e = batchedSub; + batchedSub = void 0; + while (e) { + const next = e.next; + e.next = void 0; + e.flags &= ~8; + if (e.flags & 1) { + try { + ; + e.trigger(); + } catch (err) { + if (!error) error = err; + } } - this.active = false; + e = next; + } + } + if (error) throw error; +} +function prepareDeps(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + link.version = -1; + link.prevActiveLink = link.dep.activeLink; + link.dep.activeLink = link; + } +} +function cleanupDeps(sub) { + let head; + let tail = sub.depsTail; + let link = tail; + while (link) { + const prev = link.prevDep; + if (link.version === -1) { + if (link === tail) tail = prev; + removeSub(link); + removeDep(link); + } else { + head = link; + } + link.dep.activeLink = link.prevActiveLink; + link.prevActiveLink = void 0; + link = prev; + } + sub.deps = head; + sub.depsTail = tail; +} +function isDirty(sub) { + for (let link = sub.deps; link; link = link.nextDep) { + if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) { + return true; + } + } + if (sub._dirty) { + return true; + } + return false; +} +function refreshComputed(computed) { + if (computed.flags & 4 && !(computed.flags & 16)) { + return; + } + computed.flags &= ~16; + if (computed.globalVersion === globalVersion) { + return; + } + computed.globalVersion = globalVersion; + const dep = computed.dep; + computed.flags |= 2; + if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) { + computed.flags &= ~2; + return; + } + const prevSub = activeSub; + const prevShouldTrack = shouldTrack; + activeSub = computed; + shouldTrack = true; + try { + prepareDeps(computed); + const value = computed.fn(computed._value); + if (dep.version === 0 || hasChanged(value, computed._value)) { + computed._value = value; + dep.version++; } + } catch (err) { + dep.version++; + throw err; + } finally { + activeSub = prevSub; + shouldTrack = prevShouldTrack; + cleanupDeps(computed); + computed.flags &= ~2; } } -function cleanupEffect(effect2) { - const { deps } = effect2; - if (deps.length) { - for (let i = 0; i < deps.length; i++) { - deps[i].delete(effect2); +function removeSub(link, soft = false) { + const { dep, prevSub, nextSub } = link; + if (prevSub) { + prevSub.nextSub = nextSub; + link.prevSub = void 0; + } + if (nextSub) { + nextSub.prevSub = prevSub; + link.nextSub = void 0; + } + if (dep.subs === link) { + dep.subs = prevSub; + } + if (dep.subsHead === link) { + dep.subsHead = nextSub; + } + if (!dep.subs && dep.computed) { + dep.computed.flags &= ~4; + for (let l = dep.computed.deps; l; l = l.nextDep) { + removeSub(l, true); } - deps.length = 0; + } + if (!soft && !--dep.sc && dep.map) { + dep.map.delete(dep.key); + } +} +function removeDep(link) { + const { prevDep, nextDep } = link; + if (prevDep) { + prevDep.nextDep = nextDep; + link.prevDep = void 0; + } + if (nextDep) { + nextDep.prevDep = prevDep; + link.nextDep = void 0; } } function effect(fn, options) { - if (fn.effect) { + if (fn.effect instanceof ReactiveEffect) { fn = fn.effect.fn; } - const _effect = new ReactiveEffect(fn); + const e = new ReactiveEffect(fn); if (options) { - extend(_effect, options); - if (options.scope) - recordEffectScope(_effect, options.scope); + extend(e, options); } - if (!options || !options.lazy) { - _effect.run(); + try { + e.run(); + } catch (err) { + e.stop(); + throw err; } - const runner = _effect.run.bind(_effect); - runner.effect = _effect; + const runner = e.run.bind(e); + runner.effect = e; return runner; } function stop(runner) { @@ -556,207 +821,489 @@ function resetTracking() { const last = trackStack.pop(); shouldTrack = last === void 0 ? true : last; } -function track(target, type, key) { - if (shouldTrack && activeEffect) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, dep = createDep()); +function cleanupEffect(e) { + const { cleanup } = e; + e.cleanup = void 0; + if (cleanup) { + const prevSub = activeSub; + activeSub = void 0; + try { + cleanup(); + } finally { + activeSub = prevSub; } - const eventInfo = { effect: activeEffect, target, type, key } ; - trackEffects(dep, eventInfo); } } -function trackEffects(dep, debuggerEventExtraInfo) { - let shouldTrack2 = false; - if (effectTrackDepth <= maxMarkerBits) { - if (!newTracked(dep)) { - dep.n |= trackOpBit; - shouldTrack2 = !wasTracked(dep); + +let globalVersion = 0; +class Link { + constructor(sub, dep) { + this.sub = sub; + this.dep = dep; + this.version = dep.version; + this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0; + } +} +class Dep { + constructor(computed) { + this.computed = computed; + this.version = 0; + /** + * Link between this dep and the current active effect + */ + this.activeLink = void 0; + /** + * Doubly linked list representing the subscribing effects (tail) + */ + this.subs = void 0; + /** + * For object property deps cleanup + */ + this.map = void 0; + this.key = void 0; + /** + * Subscriber counter + */ + this.sc = 0; + { + this.subsHead = void 0; } - } else { - shouldTrack2 = !dep.has(activeEffect); } - if (shouldTrack2) { - dep.add(activeEffect); - activeEffect.deps.push(dep); - if (activeEffect.onTrack) { - activeEffect.onTrack( + track(debugInfo) { + if (!activeSub || !shouldTrack || activeSub === this.computed) { + return; + } + let link = this.activeLink; + if (link === void 0 || link.sub !== activeSub) { + link = this.activeLink = new Link(activeSub, this); + if (!activeSub.deps) { + activeSub.deps = activeSub.depsTail = link; + } else { + link.prevDep = activeSub.depsTail; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + } + addSub(link); + } else if (link.version === -1) { + link.version = this.version; + if (link.nextDep) { + const next = link.nextDep; + next.prevDep = link.prevDep; + if (link.prevDep) { + link.prevDep.nextDep = next; + } + link.prevDep = activeSub.depsTail; + link.nextDep = void 0; + activeSub.depsTail.nextDep = link; + activeSub.depsTail = link; + if (activeSub.deps === link) { + activeSub.deps = next; + } + } + } + if (activeSub.onTrack) { + activeSub.onTrack( extend( { - effect: activeEffect + effect: activeSub }, - debuggerEventExtraInfo + debugInfo ) ); } + return link; } -} -function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - return; + trigger(debugInfo) { + this.version++; + globalVersion++; + this.notify(debugInfo); } - let deps = []; - if (type === "clear") { - deps = [...depsMap.values()]; - } else if (key === "length" && isArray(target)) { - const newLength = Number(newValue); - depsMap.forEach((dep, key2) => { - if (key2 === "length" || key2 >= newLength) { - deps.push(dep); - } - }); - } else { - if (key !== void 0) { - deps.push(depsMap.get(key)); - } - switch (type) { - case "add": - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } else if (isIntegerKey(key)) { - deps.push(depsMap.get("length")); - } - break; - case "delete": - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + notify(debugInfo) { + startBatch(); + try { + if (true) { + for (let head = this.subsHead; head; head = head.nextSub) { + if (head.sub.onTrigger && !(head.sub.flags & 8)) { + head.sub.onTrigger( + extend( + { + effect: head.sub + }, + debugInfo + ) + ); } } - break; - case "set": - if (isMap(target)) { - deps.push(depsMap.get(ITERATE_KEY)); + } + for (let link = this.subs; link; link = link.prevSub) { + if (link.sub.notify()) { + ; + link.sub.dep.notify(); } - break; + } + } finally { + endBatch(); } } - const eventInfo = { target, type, key, newValue, oldValue, oldTarget } ; - if (deps.length === 1) { - if (deps[0]) { - { - triggerEffects(deps[0], eventInfo); +} +function addSub(link) { + link.dep.sc++; + if (link.sub.flags & 4) { + const computed = link.dep.computed; + if (computed && !link.dep.subs) { + computed.flags |= 4 | 16; + for (let l = computed.deps; l; l = l.nextDep) { + addSub(l); } } - } else { - const effects = []; - for (const dep of deps) { - if (dep) { - effects.push(...dep); - } + const currentTail = link.dep.subs; + if (currentTail !== link) { + link.prevSub = currentTail; + if (currentTail) currentTail.nextSub = link; } - { - triggerEffects(createDep(effects), eventInfo); + if (link.dep.subsHead === void 0) { + link.dep.subsHead = link; } + link.dep.subs = link; } } -function triggerEffects(dep, debuggerEventExtraInfo) { - const effects = isArray(dep) ? dep : [...dep]; - for (const effect2 of effects) { - if (effect2.computed) { - triggerEffect(effect2, debuggerEventExtraInfo); - } - } - for (const effect2 of effects) { - if (!effect2.computed) { - triggerEffect(effect2, debuggerEventExtraInfo); +const targetMap = /* @__PURE__ */ new WeakMap(); +const ITERATE_KEY = Symbol( + "Object iterate" +); +const MAP_KEY_ITERATE_KEY = Symbol( + "Map keys iterate" +); +const ARRAY_ITERATE_KEY = Symbol( + "Array iterate" +); +function track(target, type, key) { + if (shouldTrack && activeSub) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); } - } -} -function triggerEffect(effect2, debuggerEventExtraInfo) { - if (effect2 !== activeEffect || effect2.allowRecurse) { - if (effect2.onTrigger) { - effect2.onTrigger(extend({ effect: effect2 }, debuggerEventExtraInfo)); + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = new Dep()); + dep.map = depsMap; + dep.key = key; } - if (effect2.scheduler) { - effect2.scheduler(); - } else { - effect2.run(); + { + dep.track({ + target, + type, + key + }); } } } -function getDepFromReactive(object, key) { - var _a; - return (_a = targetMap.get(object)) == null ? void 0 : _a.get(key); -} - -const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); -const builtInSymbols = new Set( - /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) -); -const get$1 = /* @__PURE__ */ createGetter(); -const shallowGet = /* @__PURE__ */ createGetter(false, true); -const readonlyGet = /* @__PURE__ */ createGetter(true); -const shallowReadonlyGet = /* @__PURE__ */ createGetter(true, true); -const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations(); -function createArrayInstrumentations() { - const instrumentations = {}; - ["includes", "indexOf", "lastIndexOf"].forEach((key) => { - instrumentations[key] = function(...args) { - const arr = toRaw(this); - for (let i = 0, l = this.length; i < l; i++) { - track(arr, "get", i + ""); - } - const res = arr[key](...args); - if (res === -1 || res === false) { - return arr[key](...args.map(toRaw)); - } else { - return res; +function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + globalVersion++; + return; + } + const run = (dep) => { + if (dep) { + { + dep.trigger({ + target, + type, + key, + newValue, + oldValue, + oldTarget + }); } + } + }; + startBatch(); + if (type === "clear") { + depsMap.forEach(run); + } else { + const targetIsArray = isArray(target); + const isArrayIndex = targetIsArray && isIntegerKey(key); + if (targetIsArray && key === "length") { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) { + run(dep); + } + }); + } else { + if (key !== void 0) { + run(depsMap.get(key)); + } + if (isArrayIndex) { + run(depsMap.get(ARRAY_ITERATE_KEY)); + } + switch (type) { + case "add": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isArrayIndex) { + run(depsMap.get("length")); + } + break; + case "delete": + if (!targetIsArray) { + run(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + run(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + run(depsMap.get(ITERATE_KEY)); + } + break; + } + } + } + endBatch(); +} +function getDepFromReactive(object, key) { + const depMap = targetMap.get(object); + return depMap && depMap.get(key); +} + +function reactiveReadArray(array) { + const raw = toRaw(array); + if (raw === array) return raw; + track(raw, "iterate", ARRAY_ITERATE_KEY); + return isShallow(array) ? raw : raw.map(toReactive); +} +function shallowReadArray(arr) { + track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY); + return arr; +} +const arrayInstrumentations = { + __proto__: null, + [Symbol.iterator]() { + return iterator(this, Symbol.iterator, toReactive); + }, + concat(...args) { + return reactiveReadArray(this).concat( + ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x) + ); + }, + entries() { + return iterator(this, "entries", (value) => { + value[1] = toReactive(value[1]); + return value; + }); + }, + every(fn, thisArg) { + return apply(this, "every", fn, thisArg, void 0, arguments); + }, + filter(fn, thisArg) { + return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments); + }, + find(fn, thisArg) { + return apply(this, "find", fn, thisArg, toReactive, arguments); + }, + findIndex(fn, thisArg) { + return apply(this, "findIndex", fn, thisArg, void 0, arguments); + }, + findLast(fn, thisArg) { + return apply(this, "findLast", fn, thisArg, toReactive, arguments); + }, + findLastIndex(fn, thisArg) { + return apply(this, "findLastIndex", fn, thisArg, void 0, arguments); + }, + // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement + forEach(fn, thisArg) { + return apply(this, "forEach", fn, thisArg, void 0, arguments); + }, + includes(...args) { + return searchProxy(this, "includes", args); + }, + indexOf(...args) { + return searchProxy(this, "indexOf", args); + }, + join(separator) { + return reactiveReadArray(this).join(separator); + }, + // keys() iterator only reads `length`, no optimisation required + lastIndexOf(...args) { + return searchProxy(this, "lastIndexOf", args); + }, + map(fn, thisArg) { + return apply(this, "map", fn, thisArg, void 0, arguments); + }, + pop() { + return noTracking(this, "pop"); + }, + push(...args) { + return noTracking(this, "push", args); + }, + reduce(fn, ...args) { + return reduce(this, "reduce", fn, args); + }, + reduceRight(fn, ...args) { + return reduce(this, "reduceRight", fn, args); + }, + shift() { + return noTracking(this, "shift"); + }, + // slice could use ARRAY_ITERATE but also seems to beg for range tracking + some(fn, thisArg) { + return apply(this, "some", fn, thisArg, void 0, arguments); + }, + splice(...args) { + return noTracking(this, "splice", args); + }, + toReversed() { + return reactiveReadArray(this).toReversed(); + }, + toSorted(comparer) { + return reactiveReadArray(this).toSorted(comparer); + }, + toSpliced(...args) { + return reactiveReadArray(this).toSpliced(...args); + }, + unshift(...args) { + return noTracking(this, "unshift", args); + }, + values() { + return iterator(this, "values", toReactive); + } +}; +function iterator(self, method, wrapValue) { + const arr = shallowReadArray(self); + const iter = arr[method](); + if (arr !== self && !isShallow(self)) { + iter._next = iter.next; + iter.next = () => { + const result = iter._next(); + if (result.value) { + result.value = wrapValue(result.value); + } + return result; }; - }); - ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { - instrumentations[key] = function(...args) { - pauseTracking(); - const res = toRaw(this)[key].apply(this, args); - resetTracking(); - return res; - }; - }); - return instrumentations; + } + return iter; +} +const arrayProto = Array.prototype; +function apply(self, method, fn, thisArg, wrappedRetFn, args) { + const arr = shallowReadArray(self); + const needsWrap = arr !== self && !isShallow(self); + const methodFn = arr[method]; + if (methodFn !== arrayProto[method]) { + const result2 = methodFn.apply(self, args); + return needsWrap ? toReactive(result2) : result2; + } + let wrappedFn = fn; + if (arr !== self) { + if (needsWrap) { + wrappedFn = function(item, index) { + return fn.call(this, toReactive(item), index, self); + }; + } else if (fn.length > 2) { + wrappedFn = function(item, index) { + return fn.call(this, item, index, self); + }; + } + } + const result = methodFn.call(arr, wrappedFn, thisArg); + return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result; +} +function reduce(self, method, fn, args) { + const arr = shallowReadArray(self); + let wrappedFn = fn; + if (arr !== self) { + if (!isShallow(self)) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, toReactive(item), index, self); + }; + } else if (fn.length > 3) { + wrappedFn = function(acc, item, index) { + return fn.call(this, acc, item, index, self); + }; + } + } + return arr[method](wrappedFn, ...args); +} +function searchProxy(self, method, args) { + const arr = toRaw(self); + track(arr, "iterate", ARRAY_ITERATE_KEY); + const res = arr[method](...args); + if ((res === -1 || res === false) && isProxy(args[0])) { + args[0] = toRaw(args[0]); + return arr[method](...args); + } + return res; +} +function noTracking(self, method, args = []) { + pauseTracking(); + startBatch(); + const res = toRaw(self)[method].apply(self, args); + endBatch(); + resetTracking(); + return res; } + +const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`); +const builtInSymbols = new Set( + /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) +); function hasOwnProperty(key) { + if (!isSymbol(key)) key = String(key); const obj = toRaw(this); track(obj, "has", key); return obj.hasOwnProperty(key); } -function createGetter(isReadonly2 = false, shallow = false) { - return function get2(target, key, receiver) { +class BaseReactiveHandler { + constructor(_isReadonly = false, _isShallow = false) { + this._isReadonly = _isReadonly; + this._isShallow = _isShallow; + } + get(target, key, receiver) { + const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; if (key === "__v_isReactive") { return !isReadonly2; } else if (key === "__v_isReadonly") { return isReadonly2; } else if (key === "__v_isShallow") { - return shallow; - } else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) { - return target; + return isShallow2; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the receiver is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; } const targetIsArray = isArray(target); if (!isReadonly2) { - if (targetIsArray && hasOwn(arrayInstrumentations, key)) { - return Reflect.get(arrayInstrumentations, key, receiver); + let fn; + if (targetIsArray && (fn = arrayInstrumentations[key])) { + return fn; } if (key === "hasOwnProperty") { return hasOwnProperty; } } - const res = Reflect.get(target, key, receiver); + const res = Reflect.get( + target, + key, + // if this is a proxy wrapping a ref, return methods using the raw ref + // as receiver so that we don't have to call `toRaw` on the ref in all + // its class methods + isRef(target) ? target : receiver + ); if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { return res; } if (!isReadonly2) { track(target, "get", key); } - if (shallow) { + if (isShallow2) { return res; } if (isRef(res)) { @@ -766,28 +1313,36 @@ function createGetter(isReadonly2 = false, shallow = false) { return isReadonly2 ? readonly(res) : reactive(res); } return res; - }; + } } -const set$1 = /* @__PURE__ */ createSetter(); -const shallowSet = /* @__PURE__ */ createSetter(true); -function createSetter(shallow = false) { - return function set2(target, key, value, receiver) { +class MutableReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(false, isShallow2); + } + set(target, key, value, receiver) { let oldValue = target[key]; - if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) { - return false; - } - if (!shallow) { + if (!this._isShallow) { + const isOldValueReadonly = isReadonly(oldValue); if (!isShallow(value) && !isReadonly(value)) { oldValue = toRaw(oldValue); value = toRaw(value); } if (!isArray(target) && isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } } } const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); - const result = Reflect.set(target, key, value, receiver); + const result = Reflect.set( + target, + key, + value, + isRef(target) ? target : receiver + ); if (target === toRaw(receiver)) { if (!hadKey) { trigger(target, "add", key, value); @@ -796,86 +1351,74 @@ function createSetter(shallow = false) { } } return result; - }; -} -function deleteProperty(target, key) { - const hadKey = hasOwn(target, key); - const oldValue = target[key]; - const result = Reflect.deleteProperty(target, key); - if (result && hadKey) { - trigger(target, "delete", key, void 0, oldValue); } - return result; -} -function has$1(target, key) { - const result = Reflect.has(target, key); - if (!isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has", key); + deleteProperty(target, key) { + const hadKey = hasOwn(target, key); + const oldValue = target[key]; + const result = Reflect.deleteProperty(target, key); + if (result && hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + } + has(target, key) { + const result = Reflect.has(target, key); + if (!isSymbol(key) || !builtInSymbols.has(key)) { + track(target, "has", key); + } + return result; + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); + return Reflect.ownKeys(target); } - return result; -} -function ownKeys(target) { - track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY); - return Reflect.ownKeys(target); } -const mutableHandlers = { - get: get$1, - set: set$1, - deleteProperty, - has: has$1, - ownKeys -}; -const readonlyHandlers = { - get: readonlyGet, +class ReadonlyReactiveHandler extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(true, isShallow2); + } set(target, key) { { - warn$1( + warn$2( `Set operation on key "${String(key)}" failed: target is readonly.`, target ); } return true; - }, + } deleteProperty(target, key) { { - warn$1( + warn$2( `Delete operation on key "${String(key)}" failed: target is readonly.`, target ); } return true; } -}; -const shallowReactiveHandlers = /* @__PURE__ */ extend( - {}, - mutableHandlers, - { - get: shallowGet, - set: shallowSet - } -); -const shallowReadonlyHandlers = /* @__PURE__ */ extend( - {}, - readonlyHandlers, - { - get: shallowReadonlyGet - } -); +} +const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler(); +const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(); +const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true); +const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true); const toShallow = (value) => value; const getProto = (v) => Reflect.getPrototypeOf(v); -function get(target, key, isReadonly = false, isShallow = false) { +function get(target, key, isReadonly2 = false, isShallow2 = false) { target = target["__v_raw"]; const rawTarget = toRaw(target); const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { + if (!isReadonly2) { + if (hasChanged(key, rawKey)) { track(rawTarget, "get", key); } track(rawTarget, "get", rawKey); } const { has: has2 } = getProto(rawTarget); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; if (has2.call(rawTarget, key)) { return wrap(target.get(key)); } else if (has2.call(rawTarget, rawKey)) { @@ -884,25 +1427,27 @@ function get(target, key, isReadonly = false, isShallow = false) { target.get(key); } } -function has(key, isReadonly = false) { +function has(key, isReadonly2 = false) { const target = this["__v_raw"]; const rawTarget = toRaw(target); const rawKey = toRaw(key); - if (!isReadonly) { - if (key !== rawKey) { + if (!isReadonly2) { + if (hasChanged(key, rawKey)) { track(rawTarget, "has", key); } track(rawTarget, "has", rawKey); } return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); } -function size(target, isReadonly = false) { +function size(target, isReadonly2 = false) { target = target["__v_raw"]; - !isReadonly && track(toRaw(target), "iterate", ITERATE_KEY); + !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY); return Reflect.get(target, "size", target); } -function add(value) { - value = toRaw(value); +function add(value, _isShallow = false) { + if (!_isShallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } const target = toRaw(this); const proto = getProto(target); const hadKey = proto.has.call(target, value); @@ -912,8 +1457,10 @@ function add(value) { } return this; } -function set(key, value) { - value = toRaw(value); +function set(key, value, _isShallow = false) { + if (!_isShallow && !isShallow(value) && !isReadonly(value)) { + value = toRaw(value); + } const target = toRaw(this); const { has: has2, get: get2 } = getProto(target); let hadKey = has2.call(target, key); @@ -959,19 +1506,19 @@ function clear() { } return result; } -function createForEach(isReadonly, isShallow) { +function createForEach(isReadonly2, isShallow2) { return function forEach(callback, thisArg) { const observed = this; const target = observed["__v_raw"]; const rawTarget = toRaw(target); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && track(rawTarget, "iterate", ITERATE_KEY); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY); return target.forEach((value, key) => { return callback.call(thisArg, wrap(value), wrap(key), observed); }); }; } -function createIterableMethod(method, isReadonly, isShallow) { +function createIterableMethod(method, isReadonly2, isShallow2) { return function(...args) { const target = this["__v_raw"]; const rawTarget = toRaw(target); @@ -979,8 +1526,8 @@ function createIterableMethod(method, isReadonly, isShallow) { const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; const isKeyOnly = method === "keys" && targetIsMap; const innerIterator = target[method](...args); - const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive; - !isReadonly && track( + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track( rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY @@ -1005,12 +1552,12 @@ function createReadonlyMethod(type) { return function(...args) { { const key = args[0] ? `on key "${args[0]}" ` : ``; - console.warn( + warn$2( `${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this) ); } - return type === "delete" ? false : this; + return type === "delete" ? false : type === "clear" ? void 0 : this; }; } function createInstrumentations() { @@ -1036,8 +1583,12 @@ function createInstrumentations() { return size(this); }, has, - add, - set, + add(value) { + return add.call(this, value, true); + }, + set(key, value) { + return set.call(this, key, value, true); + }, delete: deleteEntry, clear, forEach: createForEach(false, true) @@ -1074,23 +1625,16 @@ function createInstrumentations() { clear: createReadonlyMethod("clear"), forEach: createForEach(true, true) }; - const iteratorMethods = ["keys", "values", "entries", Symbol.iterator]; + const iteratorMethods = [ + "keys", + "values", + "entries", + Symbol.iterator + ]; iteratorMethods.forEach((method) => { - mutableInstrumentations2[method] = createIterableMethod( - method, - false, - false - ); - readonlyInstrumentations2[method] = createIterableMethod( - method, - true, - false - ); - shallowInstrumentations2[method] = createIterableMethod( - method, - false, - true - ); + mutableInstrumentations2[method] = createIterableMethod(method, false, false); + readonlyInstrumentations2[method] = createIterableMethod(method, true, false); + shallowInstrumentations2[method] = createIterableMethod(method, false, true); shallowReadonlyInstrumentations2[method] = createIterableMethod( method, true, @@ -1110,13 +1654,13 @@ const [ shallowInstrumentations, shallowReadonlyInstrumentations ] = /* @__PURE__ */ createInstrumentations(); -function createInstrumentationGetter(isReadonly, shallow) { - const instrumentations = shallow ? isReadonly ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly ? readonlyInstrumentations : mutableInstrumentations; +function createInstrumentationGetter(isReadonly2, shallow) { + const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations; return (target, key, receiver) => { if (key === "__v_isReactive") { - return !isReadonly; + return !isReadonly2; } else if (key === "__v_isReadonly") { - return isReadonly; + return isReadonly2; } else if (key === "__v_raw") { return target; } @@ -1143,7 +1687,7 @@ function checkIdentityKeys(target, has2, key) { const rawKey = toRaw(key); if (rawKey !== key && has2.call(target, rawKey)) { const type = toRawType(target); - console.warn( + warn$2( `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` ); } @@ -1212,7 +1756,11 @@ function shallowReadonly(target) { function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { if (!isObject(target)) { { - console.warn(`value cannot be made reactive: ${String(target)}`); + warn$2( + `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( + target + )}` + ); } return target; } @@ -1247,47 +1795,23 @@ function isShallow(value) { return !!(value && value["__v_isShallow"]); } function isProxy(value) { - return isReactive(value) || isReadonly(value); + return value ? !!value["__v_raw"] : false; } function toRaw(observed) { const raw = observed && observed["__v_raw"]; return raw ? toRaw(raw) : observed; } function markRaw(value) { - def(value, "__v_skip", true); + if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) { + def(value, "__v_skip", true); + } return value; } const toReactive = (value) => isObject(value) ? reactive(value) : value; const toReadonly = (value) => isObject(value) ? readonly(value) : value; -function trackRefValue(ref2) { - if (shouldTrack && activeEffect) { - ref2 = toRaw(ref2); - { - trackEffects(ref2.dep || (ref2.dep = createDep()), { - target: ref2, - type: "get", - key: "value" - }); - } - } -} -function triggerRefValue(ref2, newVal) { - ref2 = toRaw(ref2); - const dep = ref2.dep; - if (dep) { - { - triggerEffects(dep, { - target: ref2, - type: "set", - key: "value", - newValue: newVal - }); - } - } -} function isRef(r) { - return !!(r && r.__v_isRef === true); + return r ? r["__v_isRef"] === true : false; } function ref(value) { return createRef(value, false); @@ -1302,29 +1826,54 @@ function createRef(rawValue, shallow) { return new RefImpl(rawValue, shallow); } class RefImpl { - constructor(value, __v_isShallow) { - this.__v_isShallow = __v_isShallow; - this.dep = void 0; - this.__v_isRef = true; - this._rawValue = __v_isShallow ? value : toRaw(value); - this._value = __v_isShallow ? value : toReactive(value); + constructor(value, isShallow2) { + this.dep = new Dep(); + this["__v_isRef"] = true; + this["__v_isShallow"] = false; + this._rawValue = isShallow2 ? value : toRaw(value); + this._value = isShallow2 ? value : toReactive(value); + this["__v_isShallow"] = isShallow2; } get value() { - trackRefValue(this); + { + this.dep.track({ + target: this, + type: "get", + key: "value" + }); + } return this._value; } - set value(newVal) { - const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); - newVal = useDirectValue ? newVal : toRaw(newVal); - if (hasChanged(newVal, this._rawValue)) { - this._rawValue = newVal; - this._value = useDirectValue ? newVal : toReactive(newVal); - triggerRefValue(this, newVal); + set value(newValue) { + const oldValue = this._rawValue; + const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue); + newValue = useDirectValue ? newValue : toRaw(newValue); + if (hasChanged(newValue, oldValue)) { + this._rawValue = newValue; + this._value = useDirectValue ? newValue : toReactive(newValue); + { + this.dep.trigger({ + target: this, + type: "set", + key: "value", + newValue, + oldValue + }); + } } } } function triggerRef(ref2) { - triggerRefValue(ref2, ref2.value ); + if (ref2.dep) { + { + ref2.dep.trigger({ + target: ref2, + type: "set", + key: "value", + newValue: ref2._value + }); + } + } } function unref(ref2) { return isRef(ref2) ? ref2.value : ref2; @@ -1333,7 +1882,7 @@ function toValue(source) { return isFunction(source) ? source() : unref(source); } const shallowUnwrapHandlers = { - get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), + get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)), set: (target, key, value, receiver) => { const oldValue = target[key]; if (isRef(oldValue) && !isRef(value)) { @@ -1349,17 +1898,15 @@ function proxyRefs(objectWithRefs) { } class CustomRefImpl { constructor(factory) { - this.dep = void 0; - this.__v_isRef = true; - const { get, set } = factory( - () => trackRefValue(this), - () => triggerRefValue(this) - ); + this["__v_isRef"] = true; + this._value = void 0; + const dep = this.dep = new Dep(); + const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep)); this._get = get; this._set = set; } get value() { - return this._get(); + return this._value = this._get(); } set value(newVal) { this._set(newVal); @@ -1370,7 +1917,7 @@ function customRef(factory) { } function toRefs(object) { if (!isProxy(object)) { - console.warn(`toRefs() expects a reactive object but received a plain one.`); + warn$2(`toRefs() expects a reactive object but received a plain one.`); } const ret = isArray(object) ? new Array(object.length) : {}; for (const key in object) { @@ -1383,11 +1930,12 @@ class ObjectRefImpl { this._object = _object; this._key = _key; this._defaultValue = _defaultValue; - this.__v_isRef = true; + this["__v_isRef"] = true; + this._value = void 0; } get value() { const val = this._object[this._key]; - return val === void 0 ? this._defaultValue : val; + return this._value = val === void 0 ? this._defaultValue : val; } set value(newVal) { this._object[this._key] = newVal; @@ -1399,11 +1947,12 @@ class ObjectRefImpl { class GetterRefImpl { constructor(_getter) { this._getter = _getter; - this.__v_isRef = true; - this.__v_isReadonly = true; + this["__v_isRef"] = true; + this["__v_isReadonly"] = true; + this._value = void 0; } get value() { - return this._getter(); + return this._value = this._getter(); } } function toRef(source, key, defaultValue) { @@ -1419,83 +1968,344 @@ function toRef(source, key, defaultValue) { } function propertyToRef(source, key, defaultValue) { const val = source[key]; - return isRef(val) ? val : new ObjectRefImpl( - source, - key, - defaultValue - ); + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); } class ComputedRefImpl { - constructor(getter, _setter, isReadonly, isSSR) { - this._setter = _setter; - this.dep = void 0; + constructor(fn, setter, isSSR) { + this.fn = fn; + this.setter = setter; + /** + * @internal + */ + this._value = void 0; + /** + * @internal + */ + this.dep = new Dep(this); + /** + * @internal + */ this.__v_isRef = true; - this["__v_isReadonly"] = false; - this._dirty = true; - this.effect = new ReactiveEffect(getter, () => { - if (!this._dirty) { - this._dirty = true; - triggerRefValue(this); - } - }); - this.effect.computed = this; - this.effect.active = this._cacheable = !isSSR; - this["__v_isReadonly"] = isReadonly; + // TODO isolatedDeclarations "__v_isReadonly" + // A computed is also a subscriber that tracks other deps + /** + * @internal + */ + this.deps = void 0; + /** + * @internal + */ + this.depsTail = void 0; + /** + * @internal + */ + this.flags = 16; + /** + * @internal + */ + this.globalVersion = globalVersion - 1; + /** + * @internal + */ + this.next = void 0; + // for backwards compat + this.effect = this; + this["__v_isReadonly"] = !setter; + this.isSSR = isSSR; + } + /** + * @internal + */ + notify() { + this.flags |= 16; + if (!(this.flags & 8) && // avoid infinite self recursion + activeSub !== this) { + batch(this, true); + return true; + } } get value() { - const self = toRaw(this); - trackRefValue(self); - if (self._dirty || !self._cacheable) { - self._dirty = false; - self._value = self.effect.run(); + const link = this.dep.track({ + target: this, + type: "get", + key: "value" + }) ; + refreshComputed(this); + if (link) { + link.version = this.dep.version; } - return self._value; + return this._value; } set value(newValue) { - this._setter(newValue); + if (this.setter) { + this.setter(newValue); + } else { + warn$2("Write operation failed: computed value is readonly"); + } } } function computed$1(getterOrOptions, debugOptions, isSSR = false) { let getter; let setter; - const onlyGetter = isFunction(getterOrOptions); - if (onlyGetter) { + if (isFunction(getterOrOptions)) { getter = getterOrOptions; - setter = () => { - console.warn("Write operation failed: computed value is readonly"); - } ; } else { getter = getterOrOptions.get; setter = getterOrOptions.set; } - const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); + const cRef = new ComputedRefImpl(getter, setter, isSSR); if (debugOptions && !isSSR) { - cRef.effect.onTrack = debugOptions.onTrack; - cRef.effect.onTrigger = debugOptions.onTrigger; + cRef.onTrack = debugOptions.onTrack; + cRef.onTrigger = debugOptions.onTrigger; } return cRef; } -const stack = []; -function pushWarningContext(vnode) { - stack.push(vnode); -} -function popWarningContext() { - stack.pop(); +const TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" +}; +const TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" +}; + +const INITIAL_WATCHER_VALUE = {}; +const cleanupMap = /* @__PURE__ */ new WeakMap(); +let activeWatcher = void 0; +function getCurrentWatcher() { + return activeWatcher; +} +function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) { + if (owner) { + let cleanups = cleanupMap.get(owner); + if (!cleanups) cleanupMap.set(owner, cleanups = []); + cleanups.push(cleanupFn); + } else if (!failSilently) { + warn$2( + `onWatcherCleanup() was called when there was no active watcher to associate with.` + ); + } } -function warn(msg, ...args) { - pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling( - appWarnHandler, +function watch$1(source, cb, options = EMPTY_OBJ) { + const { immediate, deep, once, scheduler, augmentJob, call } = options; + const warnInvalidSource = (s) => { + (options.onWarn || warn$2)( + `Invalid watch source: `, + s, + `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` + ); + }; + const reactiveGetter = (source2) => { + if (deep) return source2; + if (isShallow(source2) || deep === false || deep === 0) + return traverse(source2, 1); + return traverse(source2); + }; + let effect; + let getter; + let cleanup; + let boundCleanup; + let forceTrigger = false; + let isMultiSource = false; + if (isRef(source)) { + getter = () => source.value; + forceTrigger = isShallow(source); + } else if (isReactive(source)) { + getter = () => reactiveGetter(source); + forceTrigger = true; + } else if (isArray(source)) { + isMultiSource = true; + forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); + getter = () => source.map((s) => { + if (isRef(s)) { + return s.value; + } else if (isReactive(s)) { + return reactiveGetter(s); + } else if (isFunction(s)) { + return call ? call(s, 2) : s(); + } else { + warnInvalidSource(s); + } + }); + } else if (isFunction(source)) { + if (cb) { + getter = call ? () => call(source, 2) : source; + } else { + getter = () => { + if (cleanup) { + pauseTracking(); + try { + cleanup(); + } finally { + resetTracking(); + } + } + const currentEffect = activeWatcher; + activeWatcher = effect; + try { + return call ? call(source, 3, [boundCleanup]) : source(boundCleanup); + } finally { + activeWatcher = currentEffect; + } + }; + } + } else { + getter = NOOP; + warnInvalidSource(source); + } + if (cb && deep) { + const baseGetter = getter; + const depth = deep === true ? Infinity : deep; + getter = () => traverse(baseGetter(), depth); + } + const scope = getCurrentScope(); + const watchHandle = () => { + effect.stop(); + if (scope) { + remove(scope.effects, effect); + } + }; + if (once && cb) { + const _cb = cb; + cb = (...args) => { + _cb(...args); + watchHandle(); + }; + } + let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; + const job = (immediateFirstRun) => { + if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) { + return; + } + if (cb) { + const newValue = effect.run(); + if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) { + if (cleanup) { + cleanup(); + } + const currentWatcher = activeWatcher; + activeWatcher = effect; + try { + const args = [ + newValue, + // pass undefined as the old value when it's changed for the first time + oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, + boundCleanup + ]; + call ? call(cb, 3, args) : ( + // @ts-expect-error + cb(...args) + ); + oldValue = newValue; + } finally { + activeWatcher = currentWatcher; + } + } + } else { + effect.run(); + } + }; + if (augmentJob) { + augmentJob(job); + } + effect = new ReactiveEffect(getter); + effect.scheduler = scheduler ? () => scheduler(job, false) : job; + boundCleanup = (fn) => onWatcherCleanup(fn, false, effect); + cleanup = effect.onStop = () => { + const cleanups = cleanupMap.get(effect); + if (cleanups) { + if (call) { + call(cleanups, 4); + } else { + for (const cleanup2 of cleanups) cleanup2(); + } + cleanupMap.delete(effect); + } + }; + { + effect.onTrack = options.onTrack; + effect.onTrigger = options.onTrigger; + } + if (cb) { + if (immediate) { + job(true); + } else { + oldValue = effect.run(); + } + } else if (scheduler) { + scheduler(job.bind(null, true), true); + } else { + effect.run(); + } + watchHandle.pause = effect.pause.bind(effect); + watchHandle.resume = effect.resume.bind(effect); + watchHandle.stop = watchHandle; + return watchHandle; +} +function traverse(value, depth = Infinity, seen) { + if (depth <= 0 || !isObject(value) || value["__v_skip"]) { + return value; + } + seen = seen || /* @__PURE__ */ new Set(); + if (seen.has(value)) { + return value; + } + seen.add(value); + depth--; + if (isRef(value)) { + traverse(value.value, depth, seen); + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + traverse(value[i], depth, seen); + } + } else if (isSet(value) || isMap(value)) { + value.forEach((v) => { + traverse(v, depth, seen); + }); + } else if (isPlainObject(value)) { + for (const key in value) { + traverse(value[key], depth, seen); + } + for (const key of Object.getOwnPropertySymbols(value)) { + if (Object.prototype.propertyIsEnumerable.call(value, key)) { + traverse(value[key], depth, seen); + } + } + } + return value; +} + +const stack$1 = []; +function pushWarningContext(vnode) { + stack$1.push(vnode); +} +function popWarningContext() { + stack$1.pop(); +} +let isWarning = false; +function warn$1(msg, ...args) { + if (isWarning) return; + isWarning = true; + pauseTracking(); + const instance = stack$1.length ? stack$1[stack$1.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, instance, 11, [ - msg + args.join(""), + // eslint-disable-next-line no-restricted-syntax + msg + args.map((a) => { + var _a, _b; + return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); + }).join(""), instance && instance.proxy, trace.map( ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` @@ -1513,9 +2323,10 @@ function warn(msg, ...args) { console.warn(...warnArgs); } resetTracking(); + isWarning = false; } function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; + let currentVNode = stack$1[stack$1.length - 1]; if (!currentVNode) { return []; } @@ -1585,13 +2396,43 @@ function assertNumber(val, type) { if (val === void 0) { return; } else if (typeof val !== "number") { - warn(`${type} is not a valid number - got ${JSON.stringify(val)}.`); + warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); } else if (isNaN(val)) { - warn(`${type} is NaN - the duration expression might be incorrect.`); + warn$1(`${type} is NaN - the duration expression might be incorrect.`); } } -const ErrorTypeStrings = { +const ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER", + "COMPONENT_UPDATE": 15, + "15": "COMPONENT_UPDATE", + "APP_UNMOUNT_CLEANUP": 16, + "16": "APP_UNMOUNT_CLEANUP" +}; +const ErrorTypeStrings$1 = { ["sp"]: "serverPrefetch hook", ["bc"]: "beforeCreate hook", ["c"]: "created hook", @@ -1620,16 +2461,16 @@ const ErrorTypeStrings = { [11]: "app warnHandler", [12]: "ref function", [13]: "async component loader", - [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core" + [14]: "scheduler flush", + [15]: "component update", + [16]: "app unmount cleanup function" }; function callWithErrorHandling(fn, instance, type, args) { - let res; try { - res = args ? fn(...args) : fn(); + return args ? fn(...args) : fn(); } catch (err) { handleError(err, instance, type); } - return res; } function callWithAsyncErrorHandling(fn, instance, type, args) { if (isFunction(fn)) { @@ -1641,18 +2482,25 @@ function callWithAsyncErrorHandling(fn, instance, type, args) { } return res; } - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + if (isArray(fn)) { + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; + } else { + warn$1( + `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}` + ); } - return values; } function handleError(err, instance, type, throwInDev = true) { const contextVNode = instance ? instance.vnode : null; + const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ; if (instance) { let cur = instance.parent; const exposedInstance = instance.proxy; - const errorInfo = ErrorTypeStrings[type] ; + const errorInfo = ErrorTypeStrings$1[type] ; while (cur) { const errorCapturedHooks = cur.ec; if (errorCapturedHooks) { @@ -1664,26 +2512,26 @@ function handleError(err, instance, type, throwInDev = true) { } cur = cur.parent; } - const appErrorHandler = instance.appContext.config.errorHandler; - if (appErrorHandler) { - callWithErrorHandling( - appErrorHandler, - null, - 10, - [err, exposedInstance, errorInfo] - ); + if (errorHandler) { + pauseTracking(); + callWithErrorHandling(errorHandler, null, 10, [ + err, + exposedInstance, + errorInfo + ]); + resetTracking(); return; } } - logError(err, type, contextVNode, throwInDev); + logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction); } -function logError(err, type, contextVNode, throwInDev = true) { +function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) { { - const info = ErrorTypeStrings[type]; + const info = ErrorTypeStrings$1[type]; if (contextVNode) { pushWarningContext(contextVNode); } - warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); if (contextVNode) { popWarningContext(); } @@ -1695,10 +2543,8 @@ function logError(err, type, contextVNode, throwInDev = true) { } } -let isFlushing = false; -let isFlushPending = false; const queue = []; -let flushIndex = 0; +let flushIndex = -1; const pendingPostFlushCbs = []; let activePostFlushCbs = null; let postFlushIndex = 0; @@ -1714,68 +2560,78 @@ function findInsertionIndex(id) { let end = queue.length; while (start < end) { const middle = start + end >>> 1; - const middleJobId = getId(queue[middle]); - middleJobId < id ? start = middle + 1 : end = middle; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.flags & 2) { + start = middle + 1; + } else { + end = middle; + } } return start; } function queueJob(job) { - if (!queue.length || !queue.includes( - job, - isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex - )) { - if (job.id == null) { + if (!(job.flags & 1)) { + const jobId = getId(job); + const lastJob = queue[queue.length - 1]; + if (!lastJob || // fast path when the job id is larger than the tail + !(job.flags & 2) && jobId >= getId(lastJob)) { queue.push(job); } else { - queue.splice(findInsertionIndex(job.id), 0, job); + queue.splice(findInsertionIndex(jobId), 0, job); } + job.flags |= 1; queueFlush(); } } function queueFlush() { - if (!isFlushing && !isFlushPending) { - isFlushPending = true; + if (!currentFlushPromise) { currentFlushPromise = resolvedPromise.then(flushJobs); } } -function invalidateJob(job) { - const i = queue.indexOf(job); - if (i > flushIndex) { - queue.splice(i, 1); - } -} function queuePostFlushCb(cb) { if (!isArray(cb)) { - if (!activePostFlushCbs || !activePostFlushCbs.includes( - cb, - cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex - )) { + if (activePostFlushCbs && cb.id === -1) { + activePostFlushCbs.splice(postFlushIndex + 1, 0, cb); + } else if (!(cb.flags & 1)) { pendingPostFlushCbs.push(cb); + cb.flags |= 1; } } else { pendingPostFlushCbs.push(...cb); } queueFlush(); } -function flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) { +function flushPreFlushCbs(instance, seen, i = flushIndex + 1) { { seen = seen || /* @__PURE__ */ new Map(); } for (; i < queue.length; i++) { const cb = queue[i]; - if (cb && cb.pre) { + if (cb && cb.flags & 2) { + if (instance && cb.id !== instance.uid) { + continue; + } if (checkRecursiveUpdates(seen, cb)) { continue; } queue.splice(i, 1); i--; + if (cb.flags & 4) { + cb.flags &= ~1; + } cb(); + if (!(cb.flags & 4)) { + cb.flags &= ~1; + } } } } function flushPostFlushCbs(seen) { if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)]; + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); pendingPostFlushCbs.length = 0; if (activePostFlushCbs) { activePostFlushCbs.push(...deduped); @@ -1785,51 +2641,57 @@ function flushPostFlushCbs(seen) { { seen = seen || /* @__PURE__ */ new Map(); } - activePostFlushCbs.sort((a, b) => getId(a) - getId(b)); for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - if (checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) { + const cb = activePostFlushCbs[postFlushIndex]; + if (checkRecursiveUpdates(seen, cb)) { continue; } - activePostFlushCbs[postFlushIndex](); + if (cb.flags & 4) { + cb.flags &= ~1; + } + if (!(cb.flags & 8)) cb(); + cb.flags &= ~1; } activePostFlushCbs = null; postFlushIndex = 0; } } -const getId = (job) => job.id == null ? Infinity : job.id; -const comparator = (a, b) => { - const diff = getId(a) - getId(b); - if (diff === 0) { - if (a.pre && !b.pre) - return -1; - if (b.pre && !a.pre) - return 1; - } - return diff; -}; +const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id; function flushJobs(seen) { - isFlushPending = false; - isFlushing = true; { seen = seen || /* @__PURE__ */ new Map(); } - queue.sort(comparator); const check = (job) => checkRecursiveUpdates(seen, job) ; try { for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { const job = queue[flushIndex]; - if (job && job.active !== false) { + if (job && !(job.flags & 8)) { if (check(job)) { continue; } - callWithErrorHandling(job, null, 14); + if (job.flags & 4) { + job.flags &= ~1; + } + callWithErrorHandling( + job, + job.i, + job.i ? 15 : 14 + ); + if (!(job.flags & 4)) { + job.flags &= ~1; + } } } } finally { - flushIndex = 0; + for (; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job) { + job.flags &= ~1; + } + } + flushIndex = -1; queue.length = 0; flushPostFlushCbs(seen); - isFlushing = false; currentFlushPromise = null; if (queue.length || pendingPostFlushCbs.length) { flushJobs(seen); @@ -1837,25 +2699,23 @@ function flushJobs(seen) { } } function checkRecursiveUpdates(seen, fn) { - if (!seen.has(fn)) { - seen.set(fn, 1); - } else { - const count = seen.get(fn); - if (count > RECURSION_LIMIT) { - const instance = fn.ownerInstance; - const componentName = instance && getComponentName(instance.type); - warn( - `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.` - ); - return true; - } else { - seen.set(fn, count + 1); - } + const count = seen.get(fn) || 0; + if (count > RECURSION_LIMIT) { + const instance = fn.i; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; } + seen.set(fn, count + 1); + return false; } let isHmrUpdating = false; -const hmrDirtyComponents = /* @__PURE__ */ new Set(); +const hmrDirtyComponents = /* @__PURE__ */ new Map(); { getGlobalThis().__VUE_HMR_RUNTIME__ = { createRecord: tryWrap(createRecord), @@ -1908,28 +2768,35 @@ function rerender(id, newRender) { } function reload(id, newComp) { const record = map.get(id); - if (!record) - return; + if (!record) return; newComp = normalizeClassComponent(newComp); updateComponentDef(record.initialDef, newComp); const instances = [...record.instances]; - for (const instance of instances) { + for (let i = 0; i < instances.length; i++) { + const instance = instances[i]; const oldComp = normalizeClassComponent(instance.type); - if (!hmrDirtyComponents.has(oldComp)) { + let dirtyInstances = hmrDirtyComponents.get(oldComp); + if (!dirtyInstances) { if (oldComp !== record.initialDef) { updateComponentDef(oldComp, newComp); } - hmrDirtyComponents.add(oldComp); + hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set()); } + dirtyInstances.add(instance); instance.appContext.propsCache.delete(instance.type); instance.appContext.emitsCache.delete(instance.type); instance.appContext.optionsCache.delete(instance.type); if (instance.ceReload) { - hmrDirtyComponents.add(oldComp); + dirtyInstances.add(instance); instance.ceReload(newComp.styles); - hmrDirtyComponents.delete(oldComp); + dirtyInstances.delete(instance); } else if (instance.parent) { - queueJob(instance.parent.update); + queueJob(() => { + isHmrUpdating = true; + instance.parent.update(); + isHmrUpdating = false; + dirtyInstances.delete(instance); + }); } else if (instance.appContext.reload) { instance.appContext.reload(); } else if (typeof window !== "undefined") { @@ -1939,13 +2806,12 @@ function reload(id, newComp) { "[HMR] Root or manually mounted instance modified. Full reload required." ); } + if (instance.root.ce && instance !== instance.root) { + instance.root.ce._removeChildStyle(oldComp); + } } queuePostFlushCb(() => { - for (const instance of instances) { - hmrDirtyComponents.delete( - normalizeClassComponent(instance.type) - ); - } + hmrDirtyComponents.clear(); }); } function updateComponentDef(oldComp, newComp) { @@ -1969,22 +2835,22 @@ function tryWrap(fn) { }; } -let devtools; +let devtools$1; let buffer = []; let devtoolsNotInstalled = false; function emit$1(event, ...args) { - if (devtools) { - devtools.emit(event, ...args); + if (devtools$1) { + devtools$1.emit(event, ...args); } else if (!devtoolsNotInstalled) { buffer.push({ event, args }); } } -function setDevtoolsHook(hook, target) { +function setDevtoolsHook$1(hook, target) { var _a, _b; - devtools = hook; - if (devtools) { - devtools.enabled = true; - buffer.forEach(({ event, args }) => devtools.emit(event, ...args)); + devtools$1 = hook; + if (devtools$1) { + devtools$1.enabled = true; + buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); buffer = []; } else if ( // handle late devtools injection - only do this if we are in an actual @@ -1992,14 +2858,15 @@ function setDevtoolsHook(hook, target) { // (#4815) typeof window !== "undefined" && // some envs mock window but not fully window.HTMLElement && // also exclude jsdom + // eslint-disable-next-line no-restricted-syntax !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) ) { const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; replay.push((newHook) => { - setDevtoolsHook(newHook, target); + setDevtoolsHook$1(newHook, target); }); setTimeout(() => { - if (!devtools) { + if (!devtools$1) { target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; devtoolsNotInstalled = true; buffer = []; @@ -2021,19 +2888,19 @@ function devtoolsInitApp(app, version) { function devtoolsUnmountApp(app) { emit$1("app:unmount" /* APP_UNMOUNT */, app); } -const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook( - "component:added" /* COMPONENT_ADDED */ -); +const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */); const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */); const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook( "component:removed" /* COMPONENT_REMOVED */ ); const devtoolsComponentRemoved = (component) => { - if (devtools && typeof devtools.cleanupBuffer === "function" && // remove the component if it wasn't buffered - !devtools.cleanupBuffer(component)) { + if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools$1.cleanupBuffer(component)) { _devtoolsComponentRemoved(component); } }; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ function createDevtoolsComponentHook(hook) { return (component) => { emit$1( @@ -2045,12 +2912,8 @@ function createDevtoolsComponentHook(hook) { ); }; } -const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook( - "perf:start" /* PERFORMANCE_START */ -); -const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook( - "perf:end" /* PERFORMANCE_END */ -); +const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */); +const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */); function createDevtoolsPerformanceHook(hook) { return (component, type, time) => { emit$1(hook, component.appContext.app, component.uid, component, type, time); @@ -2066,6029 +2929,6564 @@ function devtoolsComponentEmit(component, event, params) { ); } -function emit(instance, event, ...rawArgs) { - if (instance.isUnmounted) - return; - const props = instance.vnode.props || EMPTY_OBJ; - { - const { - emitsOptions, - propsOptions: [propsOptions] - } = instance; - if (emitsOptions) { - if (!(event in emitsOptions) && true) { - if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { - warn( - `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.` - ); - } - } else { - const validator = emitsOptions[event]; - if (isFunction(validator)) { - const isValid = validator(...rawArgs); - if (!isValid) { - warn( - `Invalid event arguments: event validation failed for event "${event}".` - ); - } - } - } - } +let currentRenderingInstance = null; +let currentScopeId = null; +function setCurrentRenderingInstance(instance) { + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; +} +function pushScopeId(id) { + currentScopeId = id; +} +function popScopeId() { + currentScopeId = null; +} +const withScopeId = (_id) => withCtx; +function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) return fn; + if (fn._n) { + return fn; } - let args = rawArgs; - const isModelListener = event.startsWith("update:"); - const modelArg = isModelListener && event.slice(7); - if (modelArg && modelArg in props) { - const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; - const { number, trim } = props[modifiersKey] || EMPTY_OBJ; - if (trim) { - args = rawArgs.map((a) => isString(a) ? a.trim() : a); + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); } - if (number) { - args = rawArgs.map(looseToNumber); + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } } - } - { - devtoolsComponentEmit(instance, event, args); - } - { - const lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { - warn( - `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( - instance, - instance.type - )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate(event)}" instead of "${event}".` - ); + { + devtoolsComponentUpdated(ctx); } - } - let handlerName; - let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) - props[handlerName = toHandlerKey(camelize(event))]; - if (!handler && isModelListener) { - handler = props[handlerName = toHandlerKey(hyphenate(event))]; - } - if (handler) { - callWithAsyncErrorHandling( - handler, - instance, - 6, - args - ); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling( - onceHandler, - instance, - 6, - args - ); + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; +} + +function validateDirectiveName(name) { + if (isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); } } -function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache = appContext.emitsCache; - const cached = cache.get(comp); - if (cached !== void 0) { - return cached; +function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + warn$1(`withDirectives can only be used inside render functions.`); + return vnode; } - const raw = comp.emits; - let normalized = {}; - let hasExtends = false; - if (!isFunction(comp)) { - const extendEmits = (raw2) => { - const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - extend(normalized, normalizedFromExtend); + const instance = getComponentPublicInstance(currentRenderingInstance); + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; + if (dir) { + if (isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; } - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } - } - if (!raw && !hasExtends) { - if (isObject(comp)) { - cache.set(comp, null); + if (dir.deep) { + traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); } - return null; - } - if (isArray(raw)) { - raw.forEach((key) => normalized[key] = null); - } else { - extend(normalized, raw); - } - if (isObject(comp)) { - cache.set(comp, normalized); - } - return normalized; -} -function isEmitListener(options, key) { - if (!options || !isOn(key)) { - return false; } - key = key.slice(2).replace(/Once$/, ""); - return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); -} - -let currentRenderingInstance = null; -let currentScopeId = null; -function setCurrentRenderingInstance(instance) { - const prev = currentRenderingInstance; - currentRenderingInstance = instance; - currentScopeId = instance && instance.type.__scopeId || null; - return prev; -} -function pushScopeId(id) { - currentScopeId = id; -} -function popScopeId() { - currentScopeId = null; + return vnode; } -const withScopeId = (_id) => withCtx; -function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { - if (!ctx) - return fn; - if (fn._n) { - return fn; - } - const renderFnWithContext = (...args) => { - if (renderFnWithContext._d) { - setBlockTracking(-1); - } - const prevInstance = setCurrentRenderingInstance(ctx); - let res; - try { - res = fn(...args); - } finally { - setCurrentRenderingInstance(prevInstance); - if (renderFnWithContext._d) { - setBlockTracking(1); - } +function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; } - { - devtoolsComponentUpdated(ctx); + let hook = binding.dir[name]; + if (hook) { + pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + resetTracking(); } - return res; - }; - renderFnWithContext._n = true; - renderFnWithContext._c = true; - renderFnWithContext._d = true; - return renderFnWithContext; + } } -let accessedAttrs = false; -function markAttrsAccessed() { - accessedAttrs = true; -} -function renderComponentRoot(instance) { - const { - type: Component, - vnode, - proxy, - withProxy, - props, - propsOptions: [propsOptions], - slots, - attrs, - emit, - render, - renderCache, - data, - setupState, - ctx, - inheritAttrs - } = instance; - let result; - let fallthroughAttrs; - const prev = setCurrentRenderingInstance(instance); - { - accessedAttrs = false; - } - try { - if (vnode.shapeFlag & 4) { - const proxyToUse = withProxy || proxy; - result = normalizeVNode( - render.call( - proxyToUse, - proxyToUse, - renderCache, - props, - setupState, - data, - ctx - ) +const TeleportEndKey = Symbol("_vte"); +const isTeleport = (type) => type.__isTeleport; +const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === ""); +const isTeleportDeferred = (props) => props && (props.defer || props.defer === ""); +const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement; +const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement; +const resolveTarget = (props, select) => { + const targetSelector = props && props.to; + if (isString(targetSelector)) { + if (!select) { + warn$1( + `Current renderer does not support string target for Teleports. (missing querySelector renderer option)` ); - fallthroughAttrs = attrs; + return null; } else { - const render2 = Component; - if (attrs === props) { - markAttrsAccessed(); + const target = select(targetSelector); + if (!target && !isTeleportDisabled(props)) { + warn$1( + `Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.` + ); } - result = normalizeVNode( - render2.length > 1 ? render2( - props, - true ? { - get attrs() { - markAttrsAccessed(); - return attrs; - }, - slots, - emit - } : { attrs, slots, emit } - ) : render2( - props, - null - /* we know it doesn't need it */ - ) - ); - fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + return target; } - } catch (err) { - blockStack.length = 0; - handleError(err, instance, 1); - result = createVNode(Comment); - } - let root = result; - let setRoot = void 0; - if (result.patchFlag > 0 && result.patchFlag & 2048) { - [root, setRoot] = getChildRoot(result); + } else { + if (!targetSelector && !isTeleportDisabled(props)) { + warn$1(`Invalid Teleport target: ${targetSelector}`); + } + return targetSelector; } - if (fallthroughAttrs && inheritAttrs !== false) { - const keys = Object.keys(fallthroughAttrs); - const { shapeFlag } = root; - if (keys.length) { - if (shapeFlag & (1 | 6)) { - if (propsOptions && keys.some(isModelListener)) { - fallthroughAttrs = filterModelListeners( - fallthroughAttrs, - propsOptions - ); - } - root = cloneVNode(root, fallthroughAttrs); - } else if (!accessedAttrs && root.type !== Comment) { - const allAttrs = Object.keys(attrs); - const eventAttrs = []; - const extraAttrs = []; - for (let i = 0, l = allAttrs.length; i < l; i++) { - const key = allAttrs[i]; - if (isOn(key)) { - if (!isModelListener(key)) { - eventAttrs.push(key[2].toLowerCase() + key.slice(3)); - } - } else { - extraAttrs.push(key); +}; +const TeleportImpl = { + name: "Teleport", + __isTeleport: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) { + const { + mc: mountChildren, + pc: patchChildren, + pbc: patchBlockChildren, + o: { insert, querySelector, createText, createComment } + } = internals; + const disabled = isTeleportDisabled(n2.props); + let { shapeFlag, children, dynamicChildren } = n2; + if (isHmrUpdating) { + optimized = false; + dynamicChildren = null; + } + if (n1 == null) { + const placeholder = n2.el = createComment("teleport start") ; + const mainAnchor = n2.anchor = createComment("teleport end") ; + insert(placeholder, container, anchor); + insert(mainAnchor, container, anchor); + const mount = (container2, anchor2) => { + if (shapeFlag & 16) { + if (parentComponent && parentComponent.isCE) { + parentComponent.ce._teleportTarget = container2; } + mountChildren( + children, + container2, + anchor2, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized + ); } - if (extraAttrs.length) { - warn( - `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.` + }; + const mountToTarget = () => { + const target = n2.target = resolveTarget(n2.props, querySelector); + const targetAnchor = prepareAnchor(target, n2, createText, insert); + if (target) { + if (namespace !== "svg" && isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace !== "mathml" && isTargetMathML(target)) { + namespace = "mathml"; + } + if (!disabled) { + mount(target, targetAnchor); + updateCssVars(n2); + } + } else if (!disabled) { + warn$1( + "Invalid Teleport target on mount:", + target, + `(${typeof target})` ); } - if (eventAttrs.length) { - warn( - `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + }; + if (disabled) { + mount(container, mainAnchor); + updateCssVars(n2); + } + if (isTeleportDeferred(n2.props)) { + queuePostRenderEffect(mountToTarget, parentSuspense); + } else { + mountToTarget(); + } + } else { + n2.el = n1.el; + n2.targetStart = n1.targetStart; + const mainAnchor = n2.anchor = n1.anchor; + const target = n2.target = n1.target; + const targetAnchor = n2.targetAnchor = n1.targetAnchor; + const wasDisabled = isTeleportDisabled(n1.props); + const currentContainer = wasDisabled ? container : target; + const currentAnchor = wasDisabled ? mainAnchor : targetAnchor; + if (namespace === "svg" || isTargetSVG(target)) { + namespace = "svg"; + } else if (namespace === "mathml" || isTargetMathML(target)) { + namespace = "mathml"; + } + if (dynamicChildren) { + patchBlockChildren( + n1.dynamicChildren, + dynamicChildren, + currentContainer, + parentComponent, + parentSuspense, + namespace, + slotScopeIds + ); + traverseStaticChildren(n1, n2, true); + } else if (!optimized) { + patchChildren( + n1, + n2, + currentContainer, + currentAnchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + false + ); + } + if (disabled) { + if (!wasDisabled) { + moveTeleport( + n2, + container, + mainAnchor, + internals, + 1 + ); + } else { + if (n2.props && n1.props && n2.props.to !== n1.props.to) { + n2.props.to = n1.props.to; + } + } + } else { + if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) { + const nextTarget = n2.target = resolveTarget( + n2.props, + querySelector + ); + if (nextTarget) { + moveTeleport( + n2, + nextTarget, + null, + internals, + 0 + ); + } else { + warn$1( + "Invalid Teleport target on update:", + target, + `(${typeof target})` + ); + } + } else if (wasDisabled) { + moveTeleport( + n2, + target, + targetAnchor, + internals, + 1 ); } } + updateCssVars(n2); } - } - if (vnode.dirs) { - if (!isElementRoot(root)) { - warn( - `Runtime directive used on component with non-element root node. The directives will not function as intended.` - ); + }, + remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) { + const { + shapeFlag, + children, + anchor, + targetStart, + targetAnchor, + target, + props + } = vnode; + if (target) { + hostRemove(targetStart); + hostRemove(targetAnchor); } - root = cloneVNode(root); - root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; - } - if (vnode.transition) { - if (!isElementRoot(root)) { - warn( - `Component inside renders non-element root node that cannot be animated.` - ); + doRemove && hostRemove(anchor); + if (shapeFlag & 16) { + const shouldRemove = doRemove || !isTeleportDisabled(props); + for (let i = 0; i < children.length; i++) { + const child = children[i]; + unmount( + child, + parentComponent, + parentSuspense, + shouldRemove, + !!child.dynamicChildren + ); + } } - root.transition = vnode.transition; - } - if (setRoot) { - setRoot(root); - } else { - result = root; + }, + move: moveTeleport, + hydrate: hydrateTeleport +}; +function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) { + if (moveType === 0) { + insert(vnode.targetAnchor, container, parentAnchor); } - setCurrentRenderingInstance(prev); - return result; -} -const getChildRoot = (vnode) => { - const rawChildren = vnode.children; - const dynamicChildren = vnode.dynamicChildren; - const childRoot = filterSingleRoot(rawChildren); - if (!childRoot) { - return [vnode, void 0]; + const { el, anchor, shapeFlag, children, props } = vnode; + const isReorder = moveType === 2; + if (isReorder) { + insert(el, container, parentAnchor); } - const index = rawChildren.indexOf(childRoot); - const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; - const setRoot = (updatedRoot) => { - rawChildren[index] = updatedRoot; - if (dynamicChildren) { - if (dynamicIndex > -1) { - dynamicChildren[dynamicIndex] = updatedRoot; - } else if (updatedRoot.patchFlag > 0) { - vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + if (!isReorder || isTeleportDisabled(props)) { + if (shapeFlag & 16) { + for (let i = 0; i < children.length; i++) { + move( + children[i], + container, + parentAnchor, + 2 + ); } } - }; - return [normalizeVNode(childRoot), setRoot]; -}; -function filterSingleRoot(children) { - let singleRoot; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isVNode(child)) { - if (child.type !== Comment || child.children === "v-if") { - if (singleRoot) { - return; - } else { - singleRoot = child; + } + if (isReorder) { + insert(anchor, container, parentAnchor); + } +} +function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { + o: { nextSibling, parentNode, querySelector, insert, createText } +}, hydrateChildren) { + const target = vnode.target = resolveTarget( + vnode.props, + querySelector + ); + if (target) { + const targetNode = target._lpa || target.firstChild; + if (vnode.shapeFlag & 16) { + if (isTeleportDisabled(vnode.props)) { + vnode.anchor = hydrateChildren( + nextSibling(node), + vnode, + parentNode(node), + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + vnode.targetStart = targetNode; + vnode.targetAnchor = targetNode && nextSibling(targetNode); + } else { + vnode.anchor = nextSibling(node); + let targetAnchor = targetNode; + while (targetAnchor) { + if (targetAnchor && targetAnchor.nodeType === 8) { + if (targetAnchor.data === "teleport start anchor") { + vnode.targetStart = targetAnchor; + } else if (targetAnchor.data === "teleport anchor") { + vnode.targetAnchor = targetAnchor; + target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor); + break; + } + } + targetAnchor = nextSibling(targetAnchor); } + if (!vnode.targetAnchor) { + prepareAnchor(target, vnode, createText, insert); + } + hydrateChildren( + targetNode && nextSibling(targetNode), + vnode, + target, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); } - } else { - return; } + updateCssVars(vnode); } - return singleRoot; + return vnode.anchor && nextSibling(vnode.anchor); } -const getFunctionalFallthrough = (attrs) => { - let res; - for (const key in attrs) { - if (key === "class" || key === "style" || isOn(key)) { - (res || (res = {}))[key] = attrs[key]; - } - } - return res; -}; -const filterModelListeners = (attrs, props) => { - const res = {}; - for (const key in attrs) { - if (!isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs[key]; +const Teleport = TeleportImpl; +function updateCssVars(vnode) { + const ctx = vnode.ctx; + if (ctx && ctx.ut) { + let node = vnode.targetStart; + while (node && node !== vnode.targetAnchor) { + if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid); + node = node.nextSibling; } + ctx.ut(); } - return res; +} +function prepareAnchor(target, vnode, createText, insert) { + const targetStart = vnode.targetStart = createText(""); + const targetAnchor = vnode.targetAnchor = createText(""); + targetStart[TeleportEndKey] = targetAnchor; + if (target) { + insert(targetStart, target); + insert(targetAnchor, target); + } + return targetAnchor; +} + +const leaveCbKey = Symbol("_leaveCb"); +const enterCbKey$1 = Symbol("_enterCb"); +function useTransitionState() { + const state = { + isMounted: false, + isLeaving: false, + isUnmounting: false, + leavingVNodes: /* @__PURE__ */ new Map() + }; + onMounted(() => { + state.isMounted = true; + }); + onBeforeUnmount(() => { + state.isUnmounting = true; + }); + return state; +} +const TransitionHookValidator = [Function, Array]; +const BaseTransitionPropsValidators = { + mode: String, + appear: Boolean, + persisted: Boolean, + // enter + onBeforeEnter: TransitionHookValidator, + onEnter: TransitionHookValidator, + onAfterEnter: TransitionHookValidator, + onEnterCancelled: TransitionHookValidator, + // leave + onBeforeLeave: TransitionHookValidator, + onLeave: TransitionHookValidator, + onAfterLeave: TransitionHookValidator, + onLeaveCancelled: TransitionHookValidator, + // appear + onBeforeAppear: TransitionHookValidator, + onAppear: TransitionHookValidator, + onAfterAppear: TransitionHookValidator, + onAppearCancelled: TransitionHookValidator }; -const isElementRoot = (vnode) => { - return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; +const recursiveGetSubtree = (instance) => { + const subTree = instance.subTree; + return subTree.component ? recursiveGetSubtree(subTree.component) : subTree; }; -function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - if ((prevChildren || nextChildren) && isHmrUpdating) { - return true; - } - if (nextVNode.dirs || nextVNode.transition) { - return true; - } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024) { - return true; - } - if (patchFlag & 16) { - if (!prevProps) { - return !!nextProps; +const BaseTransitionImpl = { + name: `BaseTransition`, + props: BaseTransitionPropsValidators, + setup(props, { slots }) { + const instance = getCurrentInstance(); + const state = useTransitionState(); + return () => { + const children = slots.default && getTransitionRawChildren(slots.default(), true); + if (!children || !children.length) { + return; } - return hasPropsChanged(prevProps, nextProps, emits); - } else if (patchFlag & 8) { - const dynamicProps = nextVNode.dynamicProps; - for (let i = 0; i < dynamicProps.length; i++) { - const key = dynamicProps[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { - return true; - } + const child = findNonCommentChild(children); + const rawProps = toRaw(props); + const { mode } = rawProps; + if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { + warn$1(`invalid mode: ${mode}`); } - } - } else { - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; + if (state.isLeaving) { + return emptyPlaceholder(child); } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); - } - return false; -} -function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; + const innerChild = getInnerChild$1(child); + if (!innerChild) { + return emptyPlaceholder(child); + } + let enterHooks = resolveTransitionHooks( + innerChild, + rawProps, + state, + instance, + // #11061, ensure enterHooks is fresh after clone + (hooks) => enterHooks = hooks + ); + if (innerChild.type !== Comment) { + setTransitionHooks(innerChild, enterHooks); + } + const oldChild = instance.subTree; + const oldInnerChild = oldChild && getInnerChild$1(oldChild); + if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) { + const leavingHooks = resolveTransitionHooks( + oldInnerChild, + rawProps, + state, + instance + ); + setTransitionHooks(oldInnerChild, leavingHooks); + if (mode === "out-in" && innerChild.type !== Comment) { + state.isLeaving = true; + leavingHooks.afterLeave = () => { + state.isLeaving = false; + if (!(instance.job.flags & 8)) { + instance.update(); + } + delete leavingHooks.afterLeave; + }; + return emptyPlaceholder(child); + } else if (mode === "in-out" && innerChild.type !== Comment) { + leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { + const leavingVNodesCache = getLeavingNodesForType( + state, + oldInnerChild + ); + leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; + el[leaveCbKey] = () => { + earlyRemove(); + el[leaveCbKey] = void 0; + delete enterHooks.delayedLeave; + }; + enterHooks.delayedLeave = delayedLeave; + }; + } + } + return child; + }; } - for (let i = 0; i < nextKeys.length; i++) { - const key = nextKeys[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { - return true; +}; +function findNonCommentChild(children) { + let child = children[0]; + if (children.length > 1) { + let hasFound = false; + for (const c of children) { + if (c.type !== Comment) { + if (hasFound) { + warn$1( + " can only be used on a single element or component. Use for lists." + ); + break; + } + child = c; + hasFound = true; + } } } - return false; -} -function updateHOCHostEl({ vnode, parent }, el) { - while (parent && parent.subTree === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; - } + return child; } - -const isSuspense = (type) => type.__isSuspense; -const SuspenseImpl = { - name: "Suspense", - // In order to make Suspense tree-shakable, we need to avoid importing it - // directly in the renderer. The renderer checks for the __isSuspense flag - // on a vnode's type and calls the `process` method, passing in renderer - // internals. - __isSuspense: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) { - if (n1 == null) { - mountSuspense( - n2, - container, - anchor, - parentComponent, - parentSuspense, - isSVG, - slotScopeIds, - optimized, - rendererInternals - ); - } else { - patchSuspense( - n1, - n2, - container, - anchor, - parentComponent, - isSVG, - slotScopeIds, - optimized, - rendererInternals - ); - } - }, - hydrate: hydrateSuspense, - create: createSuspenseBoundary, - normalize: normalizeSuspenseChildren -}; -const Suspense = SuspenseImpl ; -function triggerEvent(vnode, name) { - const eventListener = vnode.props && vnode.props[name]; - if (isFunction(eventListener)) { - eventListener(); +const BaseTransition = BaseTransitionImpl; +function getLeavingNodesForType(state, vnode) { + const { leavingVNodes } = state; + let leavingVNodesCache = leavingVNodes.get(vnode.type); + if (!leavingVNodesCache) { + leavingVNodesCache = /* @__PURE__ */ Object.create(null); + leavingVNodes.set(vnode.type, leavingVNodesCache); } + return leavingVNodesCache; } -function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) { +function resolveTransitionHooks(vnode, props, state, instance, postClone) { const { - p: patch, - o: { createElement } - } = rendererInternals; - const hiddenContainer = createElement("div"); - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - container, - hiddenContainer, - anchor, - isSVG, - slotScopeIds, - optimized, - rendererInternals - ); - patch( - null, - suspense.pendingBranch = vnode.ssContent, - hiddenContainer, - null, - parentComponent, - suspense, - isSVG, - slotScopeIds - ); - if (suspense.deps > 0) { - triggerEvent(vnode, "onPending"); - triggerEvent(vnode, "onFallback"); - patch( - null, - vnode.ssFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - isSVG, - slotScopeIds + appear, + mode, + persisted = false, + onBeforeEnter, + onEnter, + onAfterEnter, + onEnterCancelled, + onBeforeLeave, + onLeave, + onAfterLeave, + onLeaveCancelled, + onBeforeAppear, + onAppear, + onAfterAppear, + onAppearCancelled + } = props; + const key = String(vnode.key); + const leavingVNodesCache = getLeavingNodesForType(state, vnode); + const callHook = (hook, args) => { + hook && callWithAsyncErrorHandling( + hook, + instance, + 9, + args ); - setActiveBranch(suspense, vnode.ssFallback); - } else { - suspense.resolve(false, true); - } -} -function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { - const suspense = n2.suspense = n1.suspense; - suspense.vnode = n2; - n2.el = n1.el; - const newBranch = n2.ssContent; - const newFallback = n2.ssFallback; - const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; - if (pendingBranch) { - suspense.pendingBranch = newBranch; - if (isSameVNodeType(newBranch, pendingBranch)) { - patch( - pendingBranch, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - isSVG, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else if (isInFallback) { - patch( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - isSVG, - slotScopeIds, - optimized + }; + const callAsyncHook = (hook, args) => { + const done = args[1]; + callHook(hook, args); + if (isArray(hook)) { + if (hook.every((hook2) => hook2.length <= 1)) done(); + } else if (hook.length <= 1) { + done(); + } + }; + const hooks = { + mode, + persisted, + beforeEnter(el) { + let hook = onBeforeEnter; + if (!state.isMounted) { + if (appear) { + hook = onBeforeAppear || onBeforeEnter; + } else { + return; + } + } + if (el[leaveCbKey]) { + el[leaveCbKey]( + true + /* cancelled */ ); - setActiveBranch(suspense, newFallback); } - } else { - suspense.pendingId++; - if (isHydrating) { - suspense.isHydrating = false; - suspense.activeBranch = pendingBranch; - } else { - unmount(pendingBranch, parentComponent, suspense); + const leavingVNode = leavingVNodesCache[key]; + if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) { + leavingVNode.el[leaveCbKey](); } - suspense.deps = 0; - suspense.effects.length = 0; - suspense.hiddenContainer = createElement("div"); - if (isInFallback) { - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - isSVG, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); + callHook(hook, [el]); + }, + enter(el) { + let hook = onEnter; + let afterHook = onAfterEnter; + let cancelHook = onEnterCancelled; + if (!state.isMounted) { + if (appear) { + hook = onAppear || onEnter; + afterHook = onAfterAppear || onAfterEnter; + cancelHook = onAppearCancelled || onEnterCancelled; } else { - patch( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - isSVG, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); + return; } - } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - isSVG, - slotScopeIds, - optimized - ); - suspense.resolve(true); + } + let called = false; + const done = el[enterCbKey$1] = (cancelled) => { + if (called) return; + called = true; + if (cancelled) { + callHook(cancelHook, [el]); + } else { + callHook(afterHook, [el]); + } + if (hooks.delayedLeave) { + hooks.delayedLeave(); + } + el[enterCbKey$1] = void 0; + }; + if (hook) { + callAsyncHook(hook, [el, done]); } else { - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - isSVG, - slotScopeIds, - optimized + done(); + } + }, + leave(el, remove) { + const key2 = String(vnode.key); + if (el[enterCbKey$1]) { + el[enterCbKey$1]( + true + /* cancelled */ ); - if (suspense.deps <= 0) { - suspense.resolve(); - } } - } - } else { - if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - isSVG, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newBranch); - } else { - triggerEvent(n2, "onPending"); - suspense.pendingBranch = newBranch; - suspense.pendingId++; - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - isSVG, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - const { timeout, pendingId } = suspense; - if (timeout > 0) { - setTimeout(() => { - if (suspense.pendingId === pendingId) { - suspense.fallback(newFallback); - } - }, timeout); - } else if (timeout === 0) { - suspense.fallback(newFallback); + if (state.isUnmounting) { + return remove(); + } + callHook(onBeforeLeave, [el]); + let called = false; + const done = el[leaveCbKey] = (cancelled) => { + if (called) return; + called = true; + remove(); + if (cancelled) { + callHook(onLeaveCancelled, [el]); + } else { + callHook(onAfterLeave, [el]); + } + el[leaveCbKey] = void 0; + if (leavingVNodesCache[key2] === vnode) { + delete leavingVNodesCache[key2]; } + }; + leavingVNodesCache[key2] = vnode; + if (onLeave) { + callAsyncHook(onLeave, [el, done]); + } else { + done(); } + }, + clone(vnode2) { + const hooks2 = resolveTransitionHooks( + vnode2, + props, + state, + instance, + postClone + ); + if (postClone) postClone(hooks2); + return hooks2; } + }; + return hooks; +} +function emptyPlaceholder(vnode) { + if (isKeepAlive(vnode)) { + vnode = cloneVNode(vnode); + vnode.children = null; + return vnode; } } -let hasWarned = false; -function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) { - if (!hasWarned) { - hasWarned = true; - console[console.info ? "info" : "log"]( - ` is an experimental feature and its API will likely change.` - ); +function getInnerChild$1(vnode) { + if (!isKeepAlive(vnode)) { + if (isTeleport(vnode.type) && vnode.children) { + return findNonCommentChild(vnode.children); + } + return vnode; } - const { - p: patch, - m: move, - um: unmount, - n: next, - o: { parentNode, remove } - } = rendererInternals; - let parentSuspenseId; - const isSuspensible = isVNodeSuspensible(vnode); - if (isSuspensible) { - if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) { - parentSuspenseId = parentSuspense.pendingId; - parentSuspense.deps++; + if (vnode.component) { + return vnode.component.subTree; + } + const { shapeFlag, children } = vnode; + if (children) { + if (shapeFlag & 16) { + return children[0]; + } + if (shapeFlag & 32 && isFunction(children.default)) { + return children.default(); } } - const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; +} +function setTransitionHooks(vnode, hooks) { + if (vnode.shapeFlag & 6 && vnode.component) { + vnode.transition = hooks; + setTransitionHooks(vnode.component.subTree, hooks); + } else if (vnode.shapeFlag & 128) { + vnode.ssContent.transition = hooks.clone(vnode.ssContent); + vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); + } else { + vnode.transition = hooks; + } +} +function getTransitionRawChildren(children, keepComment = false, parentKey) { + let ret = []; + let keyedFragmentCount = 0; + for (let i = 0; i < children.length; i++) { + let child = children[i]; + const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); + if (child.type === Fragment) { + if (child.patchFlag & 128) keyedFragmentCount++; + ret = ret.concat( + getTransitionRawChildren(child.children, keepComment, key) + ); + } else if (keepComment || child.type !== Comment) { + ret.push(key != null ? cloneVNode(child, { key }) : child); + } + } + if (keyedFragmentCount > 1) { + for (let i = 0; i < ret.length; i++) { + ret[i].patchFlag = -2; + } + } + return ret; +} + +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineComponent(options, extraOptions) { + return isFunction(options) ? ( + // #8236: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; +} + +function useId() { + const i = getCurrentInstance(); + if (i) { + return (i.appContext.config.idPrefix || "v") + "-" + i.ids[0] + i.ids[1]++; + } else { + warn$1( + `useId() is called when there is no active component instance to be associated with.` + ); + } + return ""; +} +function markAsyncBoundary(instance) { + instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0]; +} + +const knownTemplateRefs = /* @__PURE__ */ new WeakSet(); +function useTemplateRef(key) { + const i = getCurrentInstance(); + const r = shallowRef(null); + if (i) { + const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs; + let desc; + if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) { + warn$1(`useTemplateRef('${key}') already exists.`); + } else { + Object.defineProperty(refs, key, { + enumerable: true, + get: () => r.value, + set: (val) => r.value = val + }); + } + } else { + warn$1( + `useTemplateRef() is called when there is no active component instance to be associated with.` + ); + } + const ret = readonly(r) ; { - assertNumber(timeout, `Suspense timeout`); + knownTemplateRefs.add(ret); } - const suspense = { - vnode, - parent: parentSuspense, - parentComponent, - isSVG, - container, - hiddenContainer, - anchor, - deps: 0, - pendingId: 0, - timeout: typeof timeout === "number" ? timeout : -1, - activeBranch: null, - pendingBranch: null, - isInFallback: true, - isHydrating, - isUnmounted: false, - effects: [], - resolve(resume = false, sync = false) { - { - if (!resume && !suspense.pendingBranch) { - throw new Error( - `suspense.resolve() is called without a pending branch.` - ); - } - if (suspense.isUnmounted) { - throw new Error( - `suspense.resolve() is called on an already unmounted suspense boundary.` - ); - } + return ret; +} + +function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) { + if (isArray(rawRef)) { + rawRef.forEach( + (r, i) => setRef( + r, + oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef), + parentSuspense, + vnode, + isUnmount + ) + ); + return; + } + if (isAsyncWrapper(vnode) && !isUnmount) { + return; + } + const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el; + const value = isUnmount ? null : refValue; + const { i: owner, r: ref } = rawRef; + if (!owner) { + warn$1( + `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.` + ); + return; + } + const oldRef = oldRawRef && oldRawRef.r; + const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs; + const setupState = owner.setupState; + const rawSetupState = toRaw(setupState); + const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => { + if (knownTemplateRefs.has(rawSetupState[key])) { + return false; + } + return hasOwn(rawSetupState, key); + }; + if (oldRef != null && oldRef !== ref) { + if (isString(oldRef)) { + refs[oldRef] = null; + if (canSetSetupRef(oldRef)) { + setupState[oldRef] = null; } - const { - vnode: vnode2, - activeBranch, - pendingBranch, - pendingId, - effects, - parentComponent: parentComponent2, - container: container2 - } = suspense; - if (suspense.isHydrating) { - suspense.isHydrating = false; - } else if (!resume) { - const delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = () => { - if (pendingId === suspense.pendingId) { - move(pendingBranch, container2, anchor2, 0); + } else if (isRef(oldRef)) { + oldRef.value = null; + } + } + if (isFunction(ref)) { + callWithErrorHandling(ref, owner, 12, [value, refs]); + } else { + const _isString = isString(ref); + const _isRef = isRef(ref); + if (_isString || _isRef) { + const doSet = () => { + if (rawRef.f) { + const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value; + if (isUnmount) { + isArray(existing) && remove(existing, refValue); + } else { + if (!isArray(existing)) { + if (_isString) { + refs[ref] = [refValue]; + if (canSetSetupRef(ref)) { + setupState[ref] = refs[ref]; + } + } else { + ref.value = [refValue]; + if (rawRef.k) refs[rawRef.k] = ref.value; + } + } else if (!existing.includes(refValue)) { + existing.push(refValue); } - }; - } - let { anchor: anchor2 } = suspense; - if (activeBranch) { - anchor2 = next(activeBranch); - unmount(activeBranch, parentComponent2, suspense, true); - } - if (!delayEnter) { - move(pendingBranch, container2, anchor2, 0); - } - } - setActiveBranch(suspense, pendingBranch); - suspense.pendingBranch = null; - suspense.isInFallback = false; - let parent = suspense.parent; - let hasUnresolvedAncestor = false; - while (parent) { - if (parent.pendingBranch) { - parent.effects.push(...effects); - hasUnresolvedAncestor = true; - break; - } - parent = parent.parent; - } - if (!hasUnresolvedAncestor) { - queuePostFlushCb(effects); - } - suspense.effects = []; - if (isSuspensible) { - if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0 && !sync) { - parentSuspense.resolve(); } + } else if (_isString) { + refs[ref] = value; + if (canSetSetupRef(ref)) { + setupState[ref] = value; + } + } else if (_isRef) { + ref.value = value; + if (rawRef.k) refs[rawRef.k] = value; + } else { + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); } - } - triggerEvent(vnode2, "onResolve"); - }, - fallback(fallbackVNode) { - if (!suspense.pendingBranch) { - return; - } - const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense; - triggerEvent(vnode2, "onFallback"); - const anchor2 = next(activeBranch); - const mountFallback = () => { - if (!suspense.isInFallback) { - return; - } - patch( - null, - fallbackVNode, - container2, - anchor2, - parentComponent2, - null, - // fallback tree will not have suspense context - isSVG2, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, fallbackVNode); }; - const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = mountFallback; + if (value) { + doSet.id = -1; + queuePostRenderEffect(doSet, parentSuspense); + } else { + doSet(); } - suspense.isInFallback = true; - unmount( - activeBranch, - parentComponent2, - null, - // no suspense so unmount hooks fire now - true - // shouldRemove - ); - if (!delayEnter) { - mountFallback(); - } - }, - move(container2, anchor2, type) { - suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); - suspense.container = container2; - }, - next() { - return suspense.activeBranch && next(suspense.activeBranch); - }, - registerDep(instance, setupRenderEffect) { - const isInPendingSuspense = !!suspense.pendingBranch; - if (isInPendingSuspense) { - suspense.deps++; - } - const hydratedEl = instance.vnode.el; - instance.asyncDep.catch((err) => { - handleError(err, instance, 0); - }).then((asyncSetupResult) => { - if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { - return; - } - instance.asyncResolved = true; - const { vnode: vnode2 } = instance; - { - pushWarningContext(vnode2); - } - handleSetupResult(instance, asyncSetupResult, false); - if (hydratedEl) { - vnode2.el = hydratedEl; - } - const placeholder = !hydratedEl && instance.subTree.el; - setupRenderEffect( - instance, - vnode2, - // component may have been moved before resolve. - // if this is not a hydration, instance.subTree will be the comment - // placeholder. - parentNode(hydratedEl || instance.subTree.el), - // anchor will not be used if this is hydration, so only need to - // consider the comment placeholder case. - hydratedEl ? null : next(instance.subTree), - suspense, - isSVG, - optimized - ); - if (placeholder) { - remove(placeholder); - } - updateHOCHostEl(instance, vnode2.el); - { - popWarningContext(); - } - if (isInPendingSuspense && --suspense.deps === 0) { - suspense.resolve(); - } - }); - }, - unmount(parentSuspense2, doRemove) { - suspense.isUnmounted = true; - if (suspense.activeBranch) { - unmount( - suspense.activeBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - if (suspense.pendingBranch) { - unmount( - suspense.pendingBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - } - }; - return suspense; -} -function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) { - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - node.parentNode, - document.createElement("div"), - null, - isSVG, - slotScopeIds, - optimized, - rendererInternals, - true - /* hydrating */ - ); - const result = hydrateNode( - node, - suspense.pendingBranch = vnode.ssContent, - parentComponent, - suspense, - slotScopeIds, - optimized - ); - if (suspense.deps === 0) { - suspense.resolve(false, true); - } - return result; -} -function normalizeSuspenseChildren(vnode) { - const { shapeFlag, children } = vnode; - const isSlotChildren = shapeFlag & 32; - vnode.ssContent = normalizeSuspenseSlot( - isSlotChildren ? children.default : children - ); - vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); -} -function normalizeSuspenseSlot(s) { - let block; - if (isFunction(s)) { - const trackBlock = isBlockTreeEnabled && s._c; - if (trackBlock) { - s._d = false; - openBlock(); - } - s = s(); - if (trackBlock) { - s._d = true; - block = currentBlock; - closeBlock(); - } - } - if (isArray(s)) { - const singleChild = filterSingleRoot(s); - if (!singleChild) { - warn(` slots expect a single root node.`); - } - s = singleChild; - } - s = normalizeVNode(s); - if (block && !s.dynamicChildren) { - s.dynamicChildren = block.filter((c) => c !== s); - } - return s; -} -function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (isArray(fn)) { - suspense.effects.push(...fn); } else { - suspense.effects.push(fn); + warn$1("Invalid template ref type:", ref, `(${typeof ref})`); } - } else { - queuePostFlushCb(fn); - } -} -function setActiveBranch(suspense, branch) { - suspense.activeBranch = branch; - const { vnode, parentComponent } = suspense; - const el = vnode.el = branch.el; - if (parentComponent && parentComponent.subTree === vnode) { - parentComponent.vnode.el = el; - updateHOCHostEl(parentComponent, el); } } -function isVNodeSuspensible(vnode) { - var _a; - return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false; -} -function watchEffect(effect, options) { - return doWatch(effect, null, options); -} -function watchPostEffect(effect, options) { - return doWatch( - effect, - null, - extend({}, options, { flush: "post" }) - ); -} -function watchSyncEffect(effect, options) { - return doWatch( - effect, - null, - extend({}, options, { flush: "sync" }) - ); -} -const INITIAL_WATCHER_VALUE = {}; -function watch(source, cb, options) { - if (!isFunction(cb)) { - warn( - `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.` - ); +let hasLoggedMismatchError = false; +const logMismatchError = () => { + if (hasLoggedMismatchError) { + return; } - return doWatch(source, cb, options); -} -function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) { - var _a; - if (!cb) { - if (immediate !== void 0) { - warn( - `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.` - ); + console.error("Hydration completed but contains mismatches."); + hasLoggedMismatchError = true; +}; +const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject"; +const isMathMLContainer = (container) => container.namespaceURI.includes("MathML"); +const getContainerType = (container) => { + if (container.nodeType !== 1) return void 0; + if (isSVGContainer(container)) return "svg"; + if (isMathMLContainer(container)) return "mathml"; + return void 0; +}; +const isComment = (node) => node.nodeType === 8; +function createHydrationFunctions(rendererInternals) { + const { + mt: mountComponent, + p: patch, + o: { + patchProp, + createText, + nextSibling, + parentNode, + remove, + insert, + createComment } - if (deep !== void 0) { - warn( - `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.` + } = rendererInternals; + const hydrate = (vnode, container) => { + if (!container.hasChildNodes()) { + warn$1( + `Attempting to hydrate existing markup but container is empty. Performing full mount instead.` ); + patch(null, vnode, container); + flushPostFlushCbs(); + container._vnode = vnode; + return; } - } - const warnInvalidSource = (s) => { - warn( - `Invalid watch source: `, - s, - `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.` - ); + hydrateNode(container.firstChild, vnode, null, null, null); + flushPostFlushCbs(); + container._vnode = vnode; }; - const instance = getCurrentScope() === ((_a = currentInstance) == null ? void 0 : _a.scope) ? currentInstance : null; - let getter; - let forceTrigger = false; - let isMultiSource = false; - if (isRef(source)) { - getter = () => source.value; - forceTrigger = isShallow(source); - } else if (isReactive(source)) { - getter = () => source; - deep = true; - } else if (isArray(source)) { - isMultiSource = true; - forceTrigger = source.some((s) => isReactive(s) || isShallow(s)); - getter = () => source.map((s) => { - if (isRef(s)) { - return s.value; - } else if (isReactive(s)) { - return traverse(s); - } else if (isFunction(s)) { - return callWithErrorHandling(s, instance, 2); - } else { - warnInvalidSource(s); - } - }); - } else if (isFunction(source)) { - if (cb) { - getter = () => callWithErrorHandling(source, instance, 2); - } else { - getter = () => { - if (instance && instance.isUnmounted) { - return; - } - if (cleanup) { - cleanup(); - } - return callWithAsyncErrorHandling( - source, - instance, - 3, - [onCleanup] - ); - }; - } - } else { - getter = NOOP; - warnInvalidSource(source); - } - if (cb && deep) { - const baseGetter = getter; - getter = () => traverse(baseGetter()); - } - let cleanup; - let onCleanup = (fn) => { - cleanup = effect.onStop = () => { - callWithErrorHandling(fn, instance, 4); - }; + const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => { + optimized = optimized || !!vnode.dynamicChildren; + const isFragmentStart = isComment(node) && node.data === "["; + const onMismatch = () => handleMismatch( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + isFragmentStart + ); + const { type, ref, shapeFlag, patchFlag } = vnode; + let domType = node.nodeType; + vnode.el = node; + { + def(node, "__vnode", vnode, true); + def(node, "__vueParentComponent", parentComponent, true); + } + if (patchFlag === -2) { + optimized = false; + vnode.dynamicChildren = null; + } + let nextNode = null; + switch (type) { + case Text: + if (domType !== 3) { + if (vnode.children === "") { + insert(vnode.el = createText(""), parentNode(node), node); + nextNode = node; + } else { + nextNode = onMismatch(); + } + } else { + if (node.data !== vnode.children) { + warn$1( + `Hydration text mismatch in`, + node.parentNode, + ` + - rendered on server: ${JSON.stringify( + node.data + )} + - expected on client: ${JSON.stringify(vnode.children)}` + ); + logMismatchError(); + node.data = vnode.children; + } + nextNode = nextSibling(node); + } + break; + case Comment: + if (isTemplateNode(node)) { + nextNode = nextSibling(node); + replaceNode( + vnode.el = node.content.firstChild, + node, + parentComponent + ); + } else if (domType !== 8 || isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = nextSibling(node); + } + break; + case Static: + if (isFragmentStart) { + node = nextSibling(node); + domType = node.nodeType; + } + if (domType === 1 || domType === 3) { + nextNode = node; + const needToAdoptContent = !vnode.children.length; + for (let i = 0; i < vnode.staticCount; i++) { + if (needToAdoptContent) + vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data; + if (i === vnode.staticCount - 1) { + vnode.anchor = nextNode; + } + nextNode = nextSibling(nextNode); + } + return isFragmentStart ? nextSibling(nextNode) : nextNode; + } else { + onMismatch(); + } + break; + case Fragment: + if (!isFragmentStart) { + nextNode = onMismatch(); + } else { + nextNode = hydrateFragment( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + break; + default: + if (shapeFlag & 1) { + if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) { + nextNode = onMismatch(); + } else { + nextNode = hydrateElement( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } + } else if (shapeFlag & 6) { + vnode.slotScopeIds = slotScopeIds; + const container = parentNode(node); + if (isFragmentStart) { + nextNode = locateClosingAnchor(node); + } else if (isComment(node) && node.data === "teleport start") { + nextNode = locateClosingAnchor(node, node.data, "teleport end"); + } else { + nextNode = nextSibling(node); + } + mountComponent( + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + optimized + ); + if (isAsyncWrapper(vnode)) { + let subTree; + if (isFragmentStart) { + subTree = createVNode(Fragment); + subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild; + } else { + subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div"); + } + subTree.el = node; + vnode.component.subTree = subTree; + } + } else if (shapeFlag & 64) { + if (domType !== 8) { + nextNode = onMismatch(); + } else { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized, + rendererInternals, + hydrateChildren + ); + } + } else if (shapeFlag & 128) { + nextNode = vnode.type.hydrate( + node, + vnode, + parentComponent, + parentSuspense, + getContainerType(parentNode(node)), + slotScopeIds, + optimized, + rendererInternals, + hydrateNode + ); + } else { + warn$1("Invalid HostVNode type:", type, `(${typeof type})`); + } + } + if (ref != null) { + setRef(ref, null, parentSuspense, vnode); + } + return nextNode; }; - let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE; - const job = () => { - if (!effect.active) { - return; + const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!vnode.dynamicChildren; + const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode; + const forcePatch = type === "input" || type === "option"; + { + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "created"); + } + let needCallTransitionHooks = false; + if (isTemplateNode(el)) { + needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear; + const content = el.content.firstChild; + if (needCallTransitionHooks) { + transition.beforeEnter(content); + } + replaceNode(content, el, parentComponent); + vnode.el = el = content; + } + if (shapeFlag & 16 && // skip if element has innerHTML / textContent + !(props && (props.innerHTML || props.textContent))) { + let next = hydrateChildren( + el.firstChild, + vnode, + el, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + let hasWarned = false; + while (next) { + if (!isMismatchAllowed(el, 1 /* CHILDREN */)) { + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + el, + ` +Server rendered element contains more child nodes than client vdom.` + ); + hasWarned = true; + } + logMismatchError(); + } + const cur = next; + next = next.nextSibling; + remove(cur); + } + } else if (shapeFlag & 8) { + let clientText = vnode.children; + if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) { + clientText = clientText.slice(1); + } + if (el.textContent !== clientText) { + if (!isMismatchAllowed(el, 0 /* TEXT */)) { + warn$1( + `Hydration text content mismatch on`, + el, + ` + - rendered on server: ${el.textContent} + - expected on client: ${vnode.children}` + ); + logMismatchError(); + } + el.textContent = vnode.children; + } + } + if (props) { + { + const isCustomElement = el.tagName.includes("-"); + for (const key in props) { + if (// #11189 skip if this node has directives that have created hooks + // as it could have mutated the DOM in any possible way + !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) { + logMismatchError(); + } + if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers + key[0] === "." || isCustomElement) { + patchProp(el, key, null, props[key], void 0, parentComponent); + } + } + } + } + let vnodeHooks; + if (vnodeHooks = props && props.onVnodeBeforeMount) { + invokeVNodeHook(vnodeHooks, parentComponent, vnode); + } + if (dirs) { + invokeDirectiveHook(vnode, null, parentComponent, "beforeMount"); + } + if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) { + queueEffectWithSuspense(() => { + vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode); + needCallTransitionHooks && transition.enter(el); + dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted"); + }, parentSuspense); + } } - if (cb) { - const newValue = effect.run(); - if (deep || forceTrigger || (isMultiSource ? newValue.some( - (v, i) => hasChanged(v, oldValue[i]) - ) : hasChanged(newValue, oldValue)) || false) { - if (cleanup) { - cleanup(); + return el.nextSibling; + }; + const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => { + optimized = optimized || !!parentVNode.dynamicChildren; + const children = parentVNode.children; + const l = children.length; + let hasWarned = false; + for (let i = 0; i < l; i++) { + const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]); + const isText = vnode.type === Text; + if (node) { + if (isText && !optimized) { + if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) { + insert( + createText( + node.data.slice(vnode.children.length) + ), + container, + nextSibling(node) + ); + node.data = vnode.children; + } } - callWithAsyncErrorHandling(cb, instance, 3, [ - newValue, - // pass undefined as the old value when it's changed for the first time - oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue, - onCleanup - ]); - oldValue = newValue; + node = hydrateNode( + node, + vnode, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + } else if (isText && !vnode.children) { + insert(vnode.el = createText(""), container); + } else { + if (!isMismatchAllowed(container, 1 /* CHILDREN */)) { + if (!hasWarned) { + warn$1( + `Hydration children mismatch on`, + container, + ` +Server rendered element contains fewer child nodes than client vdom.` + ); + hasWarned = true; + } + logMismatchError(); + } + patch( + null, + vnode, + container, + null, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds + ); } - } else { - effect.run(); } + return node; }; - job.allowRecurse = !!cb; - let scheduler; - if (flush === "sync") { - scheduler = job; - } else if (flush === "post") { - scheduler = () => queuePostRenderEffect(job, instance && instance.suspense); - } else { - job.pre = true; - if (instance) - job.id = instance.uid; - scheduler = () => queueJob(job); - } - const effect = new ReactiveEffect(getter, scheduler); - { - effect.onTrack = onTrack; - effect.onTrigger = onTrigger; - } - if (cb) { - if (immediate) { - job(); + const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => { + const { slotScopeIds: fragmentSlotScopeIds } = vnode; + if (fragmentSlotScopeIds) { + slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds; + } + const container = parentNode(node); + const next = hydrateChildren( + nextSibling(node), + vnode, + container, + parentComponent, + parentSuspense, + slotScopeIds, + optimized + ); + if (next && isComment(next) && next.data === "]") { + return nextSibling(vnode.anchor = next); } else { - oldValue = effect.run(); + logMismatchError(); + insert(vnode.anchor = createComment(`]`), container, next); + return next; + } + }; + const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => { + if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) { + warn$1( + `Hydration node mismatch: +- rendered on server:`, + node, + node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, + ` +- expected on client:`, + vnode.type + ); + logMismatchError(); + } + vnode.el = null; + if (isFragment) { + const end = locateClosingAnchor(node); + while (true) { + const next2 = nextSibling(node); + if (next2 && next2 !== end) { + remove(next2); + } else { + break; + } + } } - } else if (flush === "post") { - queuePostRenderEffect( - effect.run.bind(effect), - instance && instance.suspense + const next = nextSibling(node); + const container = parentNode(node); + remove(node); + patch( + null, + vnode, + container, + next, + parentComponent, + parentSuspense, + getContainerType(container), + slotScopeIds ); - } else { - effect.run(); - } - const unwatch = () => { - effect.stop(); - if (instance && instance.scope) { - remove(instance.scope.effects, effect); + return next; + }; + const locateClosingAnchor = (node, open = "[", close = "]") => { + let match = 0; + while (node) { + node = nextSibling(node); + if (node && isComment(node)) { + if (node.data === open) match++; + if (node.data === close) { + if (match === 0) { + return nextSibling(node); + } else { + match--; + } + } + } } + return node; }; - return unwatch; + const replaceNode = (newNode, oldNode, parentComponent) => { + const parentNode2 = oldNode.parentNode; + if (parentNode2) { + parentNode2.replaceChild(newNode, oldNode); + } + let parent = parentComponent; + while (parent) { + if (parent.vnode.el === oldNode) { + parent.vnode.el = parent.subTree.el = newNode; + } + parent = parent.parent; + } + }; + const isTemplateNode = (node) => { + return node.nodeType === 1 && node.tagName === "TEMPLATE"; + }; + return [hydrate, hydrateNode]; } -function instanceWatch(source, value, options) { - const publicThis = this.proxy; - const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis); - let cb; - if (isFunction(value)) { - cb = value; - } else { - cb = value.handler; - options = value; +function propHasMismatch(el, key, clientValue, vnode, instance) { + let mismatchType; + let mismatchKey; + let actual; + let expected; + if (key === "class") { + actual = el.getAttribute("class"); + expected = normalizeClass(clientValue); + if (!isSetEqual(toClassSet(actual || ""), toClassSet(expected))) { + mismatchType = 2 /* CLASS */; + mismatchKey = `class`; + } + } else if (key === "style") { + actual = el.getAttribute("style") || ""; + expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue)); + const actualMap = toStyleMap(actual); + const expectedMap = toStyleMap(expected); + if (vnode.dirs) { + for (const { dir, value } of vnode.dirs) { + if (dir.name === "show" && !value) { + expectedMap.set("display", "none"); + } + } + } + if (instance) { + resolveCssVars(instance, vnode, expectedMap); + } + if (!isMapEqual(actualMap, expectedMap)) { + mismatchType = 3 /* STYLE */; + mismatchKey = "style"; + } + } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) { + if (isBooleanAttr(key)) { + actual = el.hasAttribute(key); + expected = includeBooleanAttr(clientValue); + } else if (clientValue == null) { + actual = el.hasAttribute(key); + expected = false; + } else { + if (el.hasAttribute(key)) { + actual = el.getAttribute(key); + } else if (key === "value" && el.tagName === "TEXTAREA") { + actual = el.value; + } else { + actual = false; + } + expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false; + } + if (actual !== expected) { + mismatchType = 4 /* ATTRIBUTE */; + mismatchKey = key; + } } - const cur = currentInstance; - setCurrentInstance(this); - const res = doWatch(getter, cb.bind(publicThis), options); - if (cur) { - setCurrentInstance(cur); - } else { - unsetCurrentInstance(); + if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) { + const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`; + const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`; + const postSegment = ` + - rendered on server: ${format(actual)} + - expected on client: ${format(expected)} + Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead. + You should fix the source of the mismatch.`; + { + warn$1(preSegment, el, postSegment); + } + return true; } - return res; + return false; } -function createPathGetter(ctx, path) { - const segments = path.split("."); - return () => { - let cur = ctx; - for (let i = 0; i < segments.length && cur; i++) { - cur = cur[segments[i]]; - } - return cur; - }; +function toClassSet(str) { + return new Set(str.trim().split(/\s+/)); } -function traverse(value, seen) { - if (!isObject(value) || value["__v_skip"]) { - return value; +function isSetEqual(a, b) { + if (a.size !== b.size) { + return false; } - seen = seen || /* @__PURE__ */ new Set(); - if (seen.has(value)) { - return value; + for (const s of a) { + if (!b.has(s)) { + return false; + } } - seen.add(value); - if (isRef(value)) { - traverse(value.value, seen); - } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - traverse(value[i], seen); + return true; +} +function toStyleMap(str) { + const styleMap = /* @__PURE__ */ new Map(); + for (const item of str.split(";")) { + let [key, value] = item.split(":"); + key = key.trim(); + value = value && value.trim(); + if (key && value) { + styleMap.set(key, value); } - } else if (isSet(value) || isMap(value)) { - value.forEach((v) => { - traverse(v, seen); - }); - } else if (isPlainObject(value)) { - for (const key in value) { - traverse(value[key], seen); + } + return styleMap; +} +function isMapEqual(a, b) { + if (a.size !== b.size) { + return false; + } + for (const [key, value] of a) { + if (value !== b.get(key)) { + return false; } } - return value; + return true; } - -function validateDirectiveName(name) { - if (isBuiltInDirective(name)) { - warn("Do not use built-in directive ids as custom directive id: " + name); +function resolveCssVars(instance, vnode, expectedMap) { + const root = instance.subTree; + if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) { + const cssVars = instance.getCssVars(); + for (const key in cssVars) { + expectedMap.set( + `--${getEscapedCssVarName(key)}`, + String(cssVars[key]) + ); + } + } + if (vnode === root && instance.parent) { + resolveCssVars(instance.parent, instance.vnode, expectedMap); } } -function withDirectives(vnode, directives) { - const internalInstance = currentRenderingInstance; - if (internalInstance === null) { - warn(`withDirectives can only be used inside render functions.`); - return vnode; +const allowMismatchAttr = "data-allow-mismatch"; +const MismatchTypeString = { + [0 /* TEXT */]: "text", + [1 /* CHILDREN */]: "children", + [2 /* CLASS */]: "class", + [3 /* STYLE */]: "style", + [4 /* ATTRIBUTE */]: "attribute" +}; +function isMismatchAllowed(el, allowedType) { + if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) { + while (el && !el.hasAttribute(allowMismatchAttr)) { + el = el.parentElement; + } } - const instance = getExposeProxy(internalInstance) || internalInstance.proxy; - const bindings = vnode.dirs || (vnode.dirs = []); - for (let i = 0; i < directives.length; i++) { - let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; - if (dir) { - if (isFunction(dir)) { - dir = { - mounted: dir, - updated: dir - }; - } - if (dir.deep) { - traverse(value); - } - bindings.push({ - dir, - instance, - value, - oldValue: void 0, - arg, - modifiers - }); + const allowedAttr = el && el.getAttribute(allowMismatchAttr); + if (allowedAttr == null) { + return false; + } else if (allowedAttr === "") { + return true; + } else { + const list = allowedAttr.split(","); + if (allowedType === 0 /* TEXT */ && list.includes("children")) { + return true; + } + return allowedAttr.split(",").includes(MismatchTypeString[allowedType]); + } +} + +const hydrateOnIdle = (timeout = 1e4) => (hydrate) => { + const id = requestIdleCallback(hydrate, { timeout }); + return () => cancelIdleCallback(id); +}; +function elementIsVisibleInViewport(el) { + const { top, left, bottom, right } = el.getBoundingClientRect(); + const { innerHeight, innerWidth } = window; + return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth); +} +const hydrateOnVisible = (opts) => (hydrate, forEach) => { + const ob = new IntersectionObserver((entries) => { + for (const e of entries) { + if (!e.isIntersecting) continue; + ob.disconnect(); + hydrate(); + break; + } + }, opts); + forEach((el) => { + if (!(el instanceof Element)) return; + if (elementIsVisibleInViewport(el)) { + hydrate(); + ob.disconnect(); + return false; + } + ob.observe(el); + }); + return () => ob.disconnect(); +}; +const hydrateOnMediaQuery = (query) => (hydrate) => { + if (query) { + const mql = matchMedia(query); + if (mql.matches) { + hydrate(); + } else { + mql.addEventListener("change", hydrate, { once: true }); + return () => mql.removeEventListener("change", hydrate); } } - return vnode; -} -function invokeDirectiveHook(vnode, prevVNode, instance, name) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i]; - if (oldBindings) { - binding.oldValue = oldBindings[i].value; +}; +const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => { + if (isString(interactions)) interactions = [interactions]; + let hasHydrated = false; + const doHydrate = (e) => { + if (!hasHydrated) { + hasHydrated = true; + teardown(); + hydrate(); + e.target.dispatchEvent(new e.constructor(e.type, e)); } - let hook = binding.dir[name]; - if (hook) { - pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8, [ - vnode.el, - binding, - vnode, - prevVNode - ]); - resetTracking(); + }; + const teardown = () => { + forEach((el) => { + for (const i of interactions) { + el.removeEventListener(i, doHydrate); + } + }); + }; + forEach((el) => { + for (const i of interactions) { + el.addEventListener(i, doHydrate, { once: true }); + } + }); + return teardown; +}; +function forEachElement(node, cb) { + if (isComment(node) && node.data === "[") { + let depth = 1; + let next = node.nextSibling; + while (next) { + if (next.nodeType === 1) { + const result = cb(next); + if (result === false) { + break; + } + } else if (isComment(next)) { + if (next.data === "]") { + if (--depth === 0) break; + } else if (next.data === "[") { + depth++; + } + } + next = next.nextSibling; } + } else { + cb(node); } } -function useTransitionState() { - const state = { - isMounted: false, - isLeaving: false, - isUnmounting: false, - leavingVNodes: /* @__PURE__ */ new Map() +const isAsyncWrapper = (i) => !!i.type.__asyncLoader; +/*! #__NO_SIDE_EFFECTS__ */ +// @__NO_SIDE_EFFECTS__ +function defineAsyncComponent(source) { + if (isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + hydrate: hydrateStrategy, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); }; - onMounted(() => { - state.isMounted = true; - }); - onBeforeUnmount(() => { - state.isUnmounting = true; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve, reject) => { + const userRetry = () => resolve(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (!comp) { + warn$1( + `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` + ); + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + if (comp && !isObject(comp) && !isFunction(comp)) { + throw new Error(`Invalid async component load result: ${comp}`); + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + __asyncHydrate(el, instance, hydrate) { + const doHydrate = hydrateStrategy ? () => { + const teardown = hydrateStrategy( + hydrate, + (cb) => forEachElement(el, cb) + ); + if (teardown) { + (instance.bum || (instance.bum = [])).push(teardown); + } + } : hydrate; + if (resolvedComp) { + doHydrate(); + } else { + load().then(() => !instance.isUnmounted && doHydrate()); + } + }, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + markAsyncBoundary(instance); + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { + pendingRequest = null; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || isInSSRComponentSetup) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = ref(false); + const error = ref(); + const delayed = ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.update(); + } + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } }); - return state; } -const TransitionHookValidator = [Function, Array]; -const BaseTransitionPropsValidators = { - mode: String, - appear: Boolean, - persisted: Boolean, - // enter - onBeforeEnter: TransitionHookValidator, - onEnter: TransitionHookValidator, - onAfterEnter: TransitionHookValidator, - onEnterCancelled: TransitionHookValidator, - // leave - onBeforeLeave: TransitionHookValidator, - onLeave: TransitionHookValidator, - onAfterLeave: TransitionHookValidator, - onLeaveCancelled: TransitionHookValidator, - // appear - onBeforeAppear: TransitionHookValidator, - onAppear: TransitionHookValidator, - onAfterAppear: TransitionHookValidator, - onAppearCancelled: TransitionHookValidator -}; -const BaseTransitionImpl = { - name: `BaseTransition`, - props: BaseTransitionPropsValidators, +function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; +} + +const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; +const KeepAliveImpl = { + name: `KeepAlive`, + // Marker for special handling inside the renderer. We are not using a === + // check directly on KeepAlive in the renderer, because importing it directly + // would prevent it from being tree-shaken. + __isKeepAlive: true, + props: { + include: [String, RegExp, Array], + exclude: [String, RegExp, Array], + max: [String, Number] + }, setup(props, { slots }) { const instance = getCurrentInstance(); - const state = useTransitionState(); - let prevTransitionKey; - return () => { - const children = slots.default && getTransitionRawChildren(slots.default(), true); - if (!children || !children.length) { - return; + const sharedContext = instance.ctx; + if (!sharedContext.renderer) { + return () => { + const children = slots.default && slots.default(); + return children && children.length === 1 ? children[0] : children; + }; + } + const cache = /* @__PURE__ */ new Map(); + const keys = /* @__PURE__ */ new Set(); + let current = null; + { + instance.__v_cache = cache; + } + const parentSuspense = instance.suspense; + const { + renderer: { + p: patch, + m: move, + um: _unmount, + o: { createElement } } - let child = children[0]; - if (children.length > 1) { - let hasFound = false; - for (const c of children) { - if (c.type !== Comment) { - if (hasFound) { - warn( - " can only be used on a single element or component. Use for lists." - ); - break; - } - child = c; - hasFound = true; - } + } = sharedContext; + const storageContainer = createElement("div"); + sharedContext.activate = (vnode, container, anchor, namespace, optimized) => { + const instance2 = vnode.component; + move(vnode, container, anchor, 0, parentSuspense); + patch( + instance2.vnode, + vnode, + container, + anchor, + instance2, + parentSuspense, + namespace, + vnode.slotScopeIds, + optimized + ); + queuePostRenderEffect(() => { + instance2.isDeactivated = false; + if (instance2.a) { + invokeArrayFns(instance2.a); } + const vnodeHook = vnode.props && vnode.props.onVnodeMounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); + } + }, parentSuspense); + { + devtoolsComponentAdded(instance2); } - const rawProps = toRaw(props); - const { mode } = rawProps; - if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") { - warn(`invalid mode: ${mode}`); - } - if (state.isLeaving) { - return emptyPlaceholder(child); - } - const innerChild = getKeepAliveChild(child); - if (!innerChild) { - return emptyPlaceholder(child); - } - const enterHooks = resolveTransitionHooks( - innerChild, - rawProps, - state, - instance - ); - setTransitionHooks(innerChild, enterHooks); - const oldChild = instance.subTree; - const oldInnerChild = oldChild && getKeepAliveChild(oldChild); - let transitionKeyChanged = false; - const { getTransitionKey } = innerChild.type; - if (getTransitionKey) { - const key = getTransitionKey(); - if (prevTransitionKey === void 0) { - prevTransitionKey = key; - } else if (key !== prevTransitionKey) { - prevTransitionKey = key; - transitionKeyChanged = true; - } - } - if (oldInnerChild && oldInnerChild.type !== Comment && (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) { - const leavingHooks = resolveTransitionHooks( - oldInnerChild, - rawProps, - state, - instance - ); - setTransitionHooks(oldInnerChild, leavingHooks); - if (mode === "out-in") { - state.isLeaving = true; - leavingHooks.afterLeave = () => { - state.isLeaving = false; - if (instance.update.active !== false) { - instance.update(); - } - }; - return emptyPlaceholder(child); - } else if (mode === "in-out" && innerChild.type !== Comment) { - leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => { - const leavingVNodesCache = getLeavingNodesForType( - state, - oldInnerChild - ); - leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild; - el._leaveCb = () => { - earlyRemove(); - el._leaveCb = void 0; - delete enterHooks.delayedLeave; - }; - enterHooks.delayedLeave = delayedLeave; - }; + }; + sharedContext.deactivate = (vnode) => { + const instance2 = vnode.component; + invalidateMount(instance2.m); + invalidateMount(instance2.a); + move(vnode, storageContainer, null, 1, parentSuspense); + queuePostRenderEffect(() => { + if (instance2.da) { + invokeArrayFns(instance2.da); + } + const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; + if (vnodeHook) { + invokeVNodeHook(vnodeHook, instance2.parent, vnode); } + instance2.isDeactivated = true; + }, parentSuspense); + { + devtoolsComponentAdded(instance2); } - return child; }; - } -}; -const BaseTransition = BaseTransitionImpl; -function getLeavingNodesForType(state, vnode) { - const { leavingVNodes } = state; - let leavingVNodesCache = leavingVNodes.get(vnode.type); - if (!leavingVNodesCache) { - leavingVNodesCache = /* @__PURE__ */ Object.create(null); - leavingVNodes.set(vnode.type, leavingVNodesCache); - } - return leavingVNodesCache; -} -function resolveTransitionHooks(vnode, props, state, instance) { - const { - appear, - mode, - persisted = false, - onBeforeEnter, - onEnter, - onAfterEnter, - onEnterCancelled, - onBeforeLeave, - onLeave, - onAfterLeave, - onLeaveCancelled, - onBeforeAppear, - onAppear, - onAfterAppear, - onAppearCancelled - } = props; - const key = String(vnode.key); - const leavingVNodesCache = getLeavingNodesForType(state, vnode); - const callHook = (hook, args) => { - hook && callWithAsyncErrorHandling( - hook, - instance, - 9, - args - ); - }; - const callAsyncHook = (hook, args) => { - const done = args[1]; - callHook(hook, args); - if (isArray(hook)) { - if (hook.every((hook2) => hook2.length <= 1)) - done(); - } else if (hook.length <= 1) { - done(); + function unmount(vnode) { + resetShapeFlag(vnode); + _unmount(vnode, instance, parentSuspense, true); } - }; - const hooks = { - mode, - persisted, - beforeEnter(el) { - let hook = onBeforeEnter; - if (!state.isMounted) { - if (appear) { - hook = onBeforeAppear || onBeforeEnter; - } else { - return; + function pruneCache(filter) { + cache.forEach((vnode, key) => { + const name = getComponentName(vnode.type); + if (name && !filter(name)) { + pruneCacheEntry(key); } + }); + } + function pruneCacheEntry(key) { + const cached = cache.get(key); + if (cached && (!current || !isSameVNodeType(cached, current))) { + unmount(cached); + } else if (current) { + resetShapeFlag(current); } - if (el._leaveCb) { - el._leaveCb( - true - /* cancelled */ - ); - } - const leavingVNode = leavingVNodesCache[key]; - if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el._leaveCb) { - leavingVNode.el._leaveCb(); - } - callHook(hook, [el]); - }, - enter(el) { - let hook = onEnter; - let afterHook = onAfterEnter; - let cancelHook = onEnterCancelled; - if (!state.isMounted) { - if (appear) { - hook = onAppear || onEnter; - afterHook = onAfterAppear || onAfterEnter; - cancelHook = onAppearCancelled || onEnterCancelled; + cache.delete(key); + keys.delete(key); + } + watch( + () => [props.include, props.exclude], + ([include, exclude]) => { + include && pruneCache((name) => matches(include, name)); + exclude && pruneCache((name) => !matches(exclude, name)); + }, + // prune post-render after `current` has been updated + { flush: "post", deep: true } + ); + let pendingCacheKey = null; + const cacheSubtree = () => { + if (pendingCacheKey != null) { + if (isSuspense(instance.subTree.type)) { + queuePostRenderEffect(() => { + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + }, instance.subTree.suspense); } else { - return; + cache.set(pendingCacheKey, getInnerChild(instance.subTree)); } } - let called = false; - const done = el._enterCb = (cancelled) => { - if (called) + }; + onMounted(cacheSubtree); + onUpdated(cacheSubtree); + onBeforeUnmount(() => { + cache.forEach((cached) => { + const { subTree, suspense } = instance; + const vnode = getInnerChild(subTree); + if (cached.type === vnode.type && cached.key === vnode.key) { + resetShapeFlag(vnode); + const da = vnode.component.da; + da && queuePostRenderEffect(da, suspense); return; - called = true; - if (cancelled) { - callHook(cancelHook, [el]); - } else { - callHook(afterHook, [el]); } - if (hooks.delayedLeave) { - hooks.delayedLeave(); + unmount(cached); + }); + }); + return () => { + pendingCacheKey = null; + if (!slots.default) { + return current = null; + } + const children = slots.default(); + const rawVNode = children[0]; + if (children.length > 1) { + { + warn$1(`KeepAlive should contain exactly one component child.`); } - el._enterCb = void 0; - }; - if (hook) { - callAsyncHook(hook, [el, done]); - } else { - done(); + current = null; + return children; + } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { + current = null; + return rawVNode; } - }, - leave(el, remove) { - const key2 = String(vnode.key); - if (el._enterCb) { - el._enterCb( - true - /* cancelled */ - ); + let vnode = getInnerChild(rawVNode); + if (vnode.type === Comment) { + current = null; + return vnode; } - if (state.isUnmounting) { - return remove(); + const comp = vnode.type; + const name = getComponentName( + isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + ); + const { include, exclude, max } = props; + if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) { + vnode.shapeFlag &= ~256; + current = vnode; + return rawVNode; } - callHook(onBeforeLeave, [el]); - let called = false; - const done = el._leaveCb = (cancelled) => { - if (called) - return; - called = true; - remove(); - if (cancelled) { - callHook(onLeaveCancelled, [el]); - } else { - callHook(onAfterLeave, [el]); + const key = vnode.key == null ? comp : vnode.key; + const cachedVNode = cache.get(key); + if (vnode.el) { + vnode = cloneVNode(vnode); + if (rawVNode.shapeFlag & 128) { + rawVNode.ssContent = vnode; } - el._leaveCb = void 0; - if (leavingVNodesCache[key2] === vnode) { - delete leavingVNodesCache[key2]; + } + pendingCacheKey = key; + if (cachedVNode) { + vnode.el = cachedVNode.el; + vnode.component = cachedVNode.component; + if (vnode.transition) { + setTransitionHooks(vnode, vnode.transition); } - }; - leavingVNodesCache[key2] = vnode; - if (onLeave) { - callAsyncHook(onLeave, [el, done]); + vnode.shapeFlag |= 512; + keys.delete(key); + keys.add(key); } else { - done(); + keys.add(key); + if (max && keys.size > parseInt(max, 10)) { + pruneCacheEntry(keys.values().next().value); + } } - }, - clone(vnode2) { - return resolveTransitionHooks(vnode2, props, state, instance); - } - }; - return hooks; -} -function emptyPlaceholder(vnode) { - if (isKeepAlive(vnode)) { - vnode = cloneVNode(vnode); - vnode.children = null; - return vnode; + vnode.shapeFlag |= 256; + current = vnode; + return isSuspense(rawVNode.type) ? rawVNode : vnode; + }; + } +}; +const KeepAlive = KeepAliveImpl; +function matches(pattern, name) { + if (isArray(pattern)) { + return pattern.some((p) => matches(p, name)); + } else if (isString(pattern)) { + return pattern.split(",").includes(name); + } else if (isRegExp(pattern)) { + pattern.lastIndex = 0; + return pattern.test(name); } + return false; } -function getKeepAliveChild(vnode) { - return isKeepAlive(vnode) ? vnode.children ? vnode.children[0] : void 0 : vnode; +function onActivated(hook, target) { + registerKeepAliveHook(hook, "a", target); } -function setTransitionHooks(vnode, hooks) { - if (vnode.shapeFlag & 6 && vnode.component) { - setTransitionHooks(vnode.component.subTree, hooks); - } else if (vnode.shapeFlag & 128) { - vnode.ssContent.transition = hooks.clone(vnode.ssContent); - vnode.ssFallback.transition = hooks.clone(vnode.ssFallback); - } else { - vnode.transition = hooks; - } +function onDeactivated(hook, target) { + registerKeepAliveHook(hook, "da", target); } -function getTransitionRawChildren(children, keepComment = false, parentKey) { - let ret = []; - let keyedFragmentCount = 0; - for (let i = 0; i < children.length; i++) { - let child = children[i]; - const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i); - if (child.type === Fragment) { - if (child.patchFlag & 128) - keyedFragmentCount++; - ret = ret.concat( - getTransitionRawChildren(child.children, keepComment, key) - ); - } else if (keepComment || child.type !== Comment) { - ret.push(key != null ? cloneVNode(child, { key }) : child); +function registerKeepAliveHook(hook, type, target = currentInstance) { + const wrappedHook = hook.__wdc || (hook.__wdc = () => { + let current = target; + while (current) { + if (current.isDeactivated) { + return; + } + current = current.parent; } - } - if (keyedFragmentCount > 1) { - for (let i = 0; i < ret.length; i++) { - ret[i].patchFlag = -2; + return hook(); + }); + injectHook(type, wrappedHook, target); + if (target) { + let current = target.parent; + while (current && current.parent) { + if (isKeepAlive(current.parent.vnode)) { + injectToKeepAliveRoot(wrappedHook, type, target, current); + } + current = current.parent; } } - return ret; +} +function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) { + const injected = injectHook( + type, + hook, + keepAliveRoot, + true + /* prepend */ + ); + onUnmounted(() => { + remove(keepAliveRoot[type], injected); + }, target); +} +function resetShapeFlag(vnode) { + vnode.shapeFlag &= ~256; + vnode.shapeFlag &= ~512; +} +function getInnerChild(vnode) { + return vnode.shapeFlag & 128 ? vnode.ssContent : vnode; } -function defineComponent(options, extraOptions) { - return isFunction(options) ? ( - // #8326: extend call and options.name access are considered side-effects - // by Rollup, so we have to wrap it in a pure-annotated IIFE. - /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))() - ) : options; +function injectHook(type, hook, target = currentInstance, prepend = false) { + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); + } + return wrappedHook; + } else { + const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` ) + ); + } +} +const createHook = (lifecycle) => (hook, target = currentInstance) => { + if (!isInSSRComponentSetup || lifecycle === "sp") { + injectHook(lifecycle, (...args) => hook(...args), target); + } +}; +const onBeforeMount = createHook("bm"); +const onMounted = createHook("m"); +const onBeforeUpdate = createHook( + "bu" +); +const onUpdated = createHook("u"); +const onBeforeUnmount = createHook( + "bum" +); +const onUnmounted = createHook("um"); +const onServerPrefetch = createHook( + "sp" +); +const onRenderTriggered = createHook("rtg"); +const onRenderTracked = createHook("rtc"); +function onErrorCaptured(hook, target = currentInstance) { + injectHook("ec", hook, target); } -const isAsyncWrapper = (i) => !!i.type.__asyncLoader; -function defineAsyncComponent(source) { - if (isFunction(source)) { - source = { loader: source }; +const COMPONENTS = "components"; +const DIRECTIVES = "directives"; +function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; +} +const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); +function resolveDynamicComponent(component) { + if (isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; } - const { - loader, - loadingComponent, - errorComponent, - delay = 200, - timeout, - // undefined = never times out - suspensible = true, - onError: userOnError - } = source; - let pendingRequest = null; - let resolvedComp; - let retries = 0; - const retry = () => { - retries++; - pendingRequest = null; - return load(); - }; - const load = () => { - let thisRequest; - return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { - err = err instanceof Error ? err : new Error(String(err)); - if (userOnError) { - return new Promise((resolve, reject) => { - const userRetry = () => resolve(retry()); - const userFail = () => reject(err); - userOnError(err, userRetry, userFail, retries + 1); - }); - } else { - throw err; - } - }).then((comp) => { - if (thisRequest !== pendingRequest && pendingRequest) { - return pendingRequest; - } - if (!comp) { - warn( - `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` - ); - } - if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { - comp = comp.default; - } - if (comp && !isObject(comp) && !isFunction(comp)) { - throw new Error(`Invalid async component load result: ${comp}`); - } - resolvedComp = comp; - return comp; - })); - }; - return defineComponent({ - name: "AsyncComponentWrapper", - __asyncLoader: load, - get __asyncResolved() { - return resolvedComp; - }, - setup() { - const instance = currentInstance; - if (resolvedComp) { - return () => createInnerComp(resolvedComp, instance); - } - const onError = (err) => { - pendingRequest = null; - handleError( - err, - instance, - 13, - !errorComponent - /* do not throw in dev if user provided error component */ - ); - }; - if (suspensible && instance.suspense || false) { - return load().then((comp) => { - return () => createInnerComp(comp, instance); - }).catch((err) => { - onError(err); - return () => errorComponent ? createVNode(errorComponent, { - error: err - }) : null; - }); - } - const loaded = ref(false); - const error = ref(); - const delayed = ref(!!delay); - if (delay) { - setTimeout(() => { - delayed.value = false; - }, delay); - } - if (timeout != null) { - setTimeout(() => { - if (!loaded.value && !error.value) { - const err = new Error( - `Async component timed out after ${timeout}ms.` - ); - onError(err); - error.value = err; - } - }, timeout); +} +function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); +} +function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { + return Component; } - load().then(() => { - loaded.value = true; - if (instance.parent && isKeepAlive(instance.parent.vnode)) { - queueJob(instance.parent.update); - } - }).catch((err) => { - onError(err); - error.value = err; - }); - return () => { - if (loaded.value && resolvedComp) { - return createInnerComp(resolvedComp, instance); - } else if (error.value && errorComponent) { - return createVNode(errorComponent, { - error: error.value - }); - } else if (loadingComponent && !delayed.value) { - return createVNode(loadingComponent); - } - }; } - }); + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + if (warnMissing && !res) { + const extra = type === COMPONENTS ? ` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; + warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); + } + return res; + } else { + warn$1( + `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` + ); + } } -function createInnerComp(comp, parent) { - const { ref: ref2, props, children, ce } = parent.vnode; - const vnode = createVNode(comp, props, children); - vnode.ref = ref2; - vnode.ce = ce; - delete parent.vnode.ce; - return vnode; +function resolve(registry, name) { + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); } -const isKeepAlive = (vnode) => vnode.type.__isKeepAlive; -const KeepAliveImpl = { - name: `KeepAlive`, - // Marker for special handling inside the renderer. We are not using a === - // check directly on KeepAlive in the renderer, because importing it directly - // would prevent it from being tree-shaken. - __isKeepAlive: true, - props: { - include: [String, RegExp, Array], - exclude: [String, RegExp, Array], - max: [String, Number] - }, - setup(props, { slots }) { - const instance = getCurrentInstance(); - const sharedContext = instance.ctx; - const cache = /* @__PURE__ */ new Map(); - const keys = /* @__PURE__ */ new Set(); - let current = null; - { - instance.__v_cache = cache; +function renderList(source, renderItem, cache, index) { + let ret; + const cached = cache && cache[index]; + const sourceIsArray = isArray(source); + if (sourceIsArray || isString(source)) { + const sourceIsReactiveArray = sourceIsArray && isReactive(source); + let needsWrap = false; + if (sourceIsReactiveArray) { + needsWrap = !isShallow(source); + source = shallowReadArray(source); } - const parentSuspense = instance.suspense; - const { - renderer: { - p: patch, - m: move, - um: _unmount, - o: { createElement } - } - } = sharedContext; - const storageContainer = createElement("div"); - sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => { - const instance2 = vnode.component; - move(vnode, container, anchor, 0, parentSuspense); - patch( - instance2.vnode, - vnode, - container, - anchor, - instance2, - parentSuspense, - isSVG, - vnode.slotScopeIds, - optimized + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem( + needsWrap ? toReactive(source[i]) : source[i], + i, + void 0, + cached && cached[i] ); - queuePostRenderEffect(() => { - instance2.isDeactivated = false; - if (instance2.a) { - invokeArrayFns(instance2.a); - } - const vnodeHook = vnode.props && vnode.props.onVnodeMounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance2.parent, vnode); - } - }, parentSuspense); - { - devtoolsComponentAdded(instance2); + } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn$1(`The v-for range expect an integer value but got ${source}.`); + } + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); + } + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); } - }; - sharedContext.deactivate = (vnode) => { - const instance2 = vnode.component; - move(vnode, storageContainer, null, 1, parentSuspense); - queuePostRenderEffect(() => { - if (instance2.da) { - invokeArrayFns(instance2.da); - } - const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted; - if (vnodeHook) { - invokeVNodeHook(vnodeHook, instance2.parent, vnode); - } - instance2.isDeactivated = true; - }, parentSuspense); - { - devtoolsComponentAdded(instance2); + } + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; +} + +function createSlots(slots, dynamicSlots) { + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; } - }; - function unmount(vnode) { - resetShapeFlag(vnode); - _unmount(vnode, instance, parentSuspense, true); + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) res.key = slot.key; + return res; + } : slot.fn; + } + } + return slots; +} + +function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) { + if (name !== "default") props.name = name; + return openBlock(), createBlock( + Fragment, + null, + [createVNode("slot", props, fallback && fallback())], + 64 + ); + } + let slot = slots[name]; + if (slot && slot.length > 1) { + warn$1( + `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` + ); + slot = () => []; + } + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const rendered = createBlock( + Fragment, + { + key: (props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content + (!validSlotContent && fallback ? "_fb" : "") + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; +} +function ensureValidVNode(vnodes) { + return vnodes.some((child) => { + if (!isVNode(child)) return true; + if (child.type === Comment) return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; +} + +function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + if (!isObject(obj)) { + warn$1(`v-on with no argument expects an object value.`); + return ret; + } + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; + } + return ret; +} + +const getPublicInstance = (i) => { + if (!i) return null; + if (isStatefulComponent(i)) return getComponentPublicInstance(i); + return getPublicInstance(i.parent); +}; +const publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => shallowReadonly(i.props) , + $attrs: (i) => shallowReadonly(i.attrs) , + $slots: (i) => shallowReadonly(i.slots) , + $refs: (i) => shallowReadonly(i.refs) , + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $host: (i) => i.ce, + $emit: (i) => i.emit, + $options: (i) => resolveMergedOptions(i) , + $forceUpdate: (i) => i.f || (i.f = () => { + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => instanceWatch.bind(i) + }) +); +const isReservedPrefix = (key) => key === "_" || key === "$"; +const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); +const PublicInstanceProxyHandlers = { + get({ _: instance }, key) { + if (key === "__v_skip") { + return true; } - function pruneCache(filter) { - cache.forEach((vnode, key) => { - const name = getComponentName(vnode.type); - if (name && (!filter || !filter(name))) { - pruneCacheEntry(key); - } - }); + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (key === "__isVue") { + return true; } - function pruneCacheEntry(key) { - const cached = cache.get(key); - if (!current || !isSameVNodeType(cached, current)) { - unmount(cached); - } else if (current) { - resetShapeFlag(current); + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1 /* SETUP */: + return setupState[key]; + case 2 /* DATA */: + return data[key]; + case 4 /* CONTEXT */: + return ctx[key]; + case 3 /* PROPS */: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1 /* SETUP */; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2 /* DATA */; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3 /* PROPS */; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if (shouldCacheAccess) { + accessCache[key] = 0 /* OTHER */; } - cache.delete(key); - keys.delete(key); } - watch( - () => [props.include, props.exclude], - ([include, exclude]) => { - include && pruneCache((name) => matches(include, name)); - exclude && pruneCache((name) => !matches(exclude, name)); - }, - // prune post-render after `current` has been updated - { flush: "post", deep: true } - ); - let pendingCacheKey = null; - const cacheSubtree = () => { - if (pendingCacheKey != null) { - cache.set(pendingCacheKey, getInnerChild(instance.subTree)); + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance.attrs, "get", ""); + markAttrsAccessed(); + } else if (key === "$slots") { + track(instance, "get", key); } - }; - onMounted(cacheSubtree); - onUpdated(cacheSubtree); - onBeforeUnmount(() => { - cache.forEach((cached) => { - const { subTree, suspense } = instance; - const vnode = getInnerChild(subTree); - if (cached.type === vnode.type && cached.key === vnode.key) { - resetShapeFlag(vnode); - const da = vnode.component.da; - da && queuePostRenderEffect(da, suspense); - return; - } - unmount(cached); - }); - }); - return () => { - pendingCacheKey = null; - if (!slots.default) { - return null; + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4 /* CONTEXT */; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; } - const children = slots.default(); - const rawVNode = children[0]; - if (children.length > 1) { - { - warn(`KeepAlive should contain exactly one component child.`); - } - current = null; - return children; - } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) { - current = null; - return rawVNode; + } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); } - let vnode = getInnerChild(rawVNode); - const comp = vnode.type; - const name = getComponentName( - isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { + warn$1(`Cannot mutate