beesoft-components 0.10.1-7 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- /*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */@layer bsh-theme{:root,:host{--bsh-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bsh-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bsh-default-font-family:var(--bsh-font-sans);--bsh-default-mono-font-family:var(--bsh-font-mono)}}@layer bsh-base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--bsh-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--bsh-default-font-feature-settings,normal);font-variation-settings:var(--bsh-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--bsh-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--bsh-default-mono-font-feature-settings,normal);font-variation-settings:var(--bsh-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer bsh-components;@layer bsh-utilities{.bsh\:\[visibility\:hidden\]{visibility:hidden}.bsh\:absolute\!{position:absolute!important}.bsh\:left-\[-1000px\]\!{left:-1000px!important}.bsh\:flex{display:flex}.bsh\:size-\[21px\]{width:21px;height:21px}.bsh\:appearance-none\!{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important}.bsh\:flex-col{flex-direction:column}.bsh\:flex-row{flex-direction:row}.bsh\:items-center{align-items:center}.bsh\:overflow-y-auto{overflow-y:auto}.bsh\:stroke-2{stroke-width:2px}.bsh\:opacity-0{opacity:0}.bsh\:\[stroke-linecap\:round\]{stroke-linecap:round}.bsh\:\[stroke-linejoin\:round\]{stroke-linejoin:round}.bsh\:group-data-checked\:visible:is(:where(.bsh\:group)[data-checked] *){visibility:visible}.bsh\:group-data-checked\:opacity-100:is(:where(.bsh\:group)[data-checked] *){opacity:1}.bsh\:group-data-partial\:visible:is(:where(.bsh\:group)[data-partial] *){visibility:visible}.bsh\:group-data-partial\:opacity-100:is(:where(.bsh\:group)[data-partial] *){opacity:1}@media (hover:hover){.bsh\:hover\:cursor-pointer:hover{cursor:pointer}}}/*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer bsc-theme{:root,:host{--bsc-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bsc-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bsc-spacing:.25rem;--bsc-text-xs:.75rem;--bsc-text-xs--line-height:calc(1/.75);--bsc-text-sm:.875rem;--bsc-text-sm--line-height:calc(1.25/.875);--bsc-font-weight-medium:500;--bsc-font-weight-bold:700;--bsc-radius-md:.375rem;--bsc-animate-bounce:bounce .4s ease-in-out forwards .2s;--bsc-default-font-family:var(--bsc-font-sans);--bsc-default-mono-font-family:var(--bsc-font-mono);--bsc-color-white:var(--theme-bsc-white);--bsc-color-black:var(--theme-bsc-black);--bsc-color-primary-1:var(--theme-bsc-primary-1);--bsc-color-primary-2:var(--theme-bsc-primary-2);--bsc-color-primary-3:var(--theme-bsc-primary-3);--bsc-color-primary-4:var(--theme-bsc-primary-4);--bsc-color-primary-5:var(--theme-bsc-primary-5);--bsc-color-gray-2:var(--theme-bsc-gray-2);--bsc-color-gray-3:var(--theme-bsc-gray-3);--bsc-color-gray-4:var(--theme-bsc-gray-4);--bsc-color-gray-5:var(--theme-bsc-gray-5);--bsc-color-mono-dark-1:var(--theme-bsc-mono-dark-1);--bsc-color-mono-dark-2:var(--theme-bsc-mono-dark-2);--bsc-color-mono-dark-3:var(--theme-bsc-mono-dark-3);--bsc-color-mono-light-1:var(--theme-bsc-mono-light-1);--bsc-color-mono-light-2:var(--theme-bsc-mono-light-2);--bsc-color-mono-light-3:var(--theme-bsc-mono-light-3);--bsc-color-info:var(--theme-bsc-info);--bsc-color-success:var(--theme-bsc-success);--bsc-color-warning:var(--theme-bsc-warning);--bsc-color-error:var(--theme-bsc-error)}}@layer bsc-base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--bsc-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--bsc-default-font-feature-settings,normal);font-variation-settings:var(--bsc-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--bsc-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--bsc-default-mono-font-feature-settings,normal);font-variation-settings:var(--bsc-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*,:after,:before,::backdrop{border-color:var(--color-gray-200,currentcolor)}::file-selector-button{border-color:var(--color-gray-200,currentcolor)}}@layer bsc-components{:is(.bsc-radio-item,.bsc-radio-item-read-only) svg{stroke-width:1px;fill:none}:is(.bsc-radio-item,.bsc-radio-item-read-only) input+svg circle~circle{display:none}.bsc-radio-item-animate input:checked+svg circle~circle{animation:var(--bsc-animate-bounce)}:not(.dark) .bsc-radio-item svg{stroke:var(--theme-bsc-gray-2)}:not(.dark) .bsc-radio-item-read-only svg{stroke:var(--theme-bsc-gray-4)}:not(.dark) .bsc-radio-item input:checked+svg circle{fill:var(--theme-bsc-primary-1)}:not(.dark) .bsc-radio-item-read-only input:checked+svg circle{fill:var(--theme-bsc-primary-4)}:not(.dark) :is(.bsc-radio-item,.bsc-radio-item-read-only) input:checked+svg circle~circle{fill:var(--theme-bsc-white);display:block}.dark .bsc-radio-item svg{stroke:var(--theme-bsc-mono-light-2)}.dark .bsc-radio-item-read-only svg{stroke:var(--theme-bsc-mono-light-3)}.dark .bsc-radio-item input:checked+svg circle{fill:var(--theme-bsc-mono-light-2)}.dark .bsc-radio-item-read-only input:checked+svg circle{fill:var(--theme-bsc-mono-light-3)}.dark :is(.bsc-radio-item,.bsc-radio-item-read-only) input:checked+svg circle~circle{fill:var(--theme-bsc-mono-dark-1);display:block}.bsc-toggle-switch input:checked+#switch{transform:translate(35px)}}@layer bsc-utilities{.bsc\:pointer-events-none{pointer-events:none}.bsc\:\[visibility\:hidden\]{visibility:hidden}.bsc\:absolute{position:absolute}.bsc\:fixed{position:fixed}.bsc\:relative{position:relative}.bsc\:top-0{top:calc(var(--bsc-spacing)*0)}.bsc\:top-\[4px\]{top:4px}.bsc\:bottom-0{bottom:calc(var(--bsc-spacing)*0)}.bsc\:left-0{left:calc(var(--bsc-spacing)*0)}.bsc\:left-\[4px\]{left:4px}.bsc\:col-span-3{grid-column:span 3/span 3}.bsc\:col-span-4{grid-column:span 4/span 4}.bsc\:mt-0\.5{margin-top:calc(var(--bsc-spacing)*.5)}.bsc\:mr-2{margin-right:calc(var(--bsc-spacing)*2)}.bsc\:mr-3{margin-right:calc(var(--bsc-spacing)*3)}.bsc\:mb-2{margin-bottom:calc(var(--bsc-spacing)*2)}.bsc\:ml-2{margin-left:calc(var(--bsc-spacing)*2)}.bsc\:flex{display:flex}.bsc\:grid{display:grid}.bsc\:hidden{display:none}.bsc\:h-3\/4{height:75%}.bsc\:h-6{height:calc(var(--bsc-spacing)*6)}.bsc\:h-\[18px\]{height:18px}.bsc\:h-\[20px\]{height:20px}.bsc\:h-\[24px\]{height:24px}.bsc\:h-\[26px\]{height:26px}.bsc\:h-full{height:100%}.bsc\:h-screen{height:100vh}.bsc\:w-6{width:calc(var(--bsc-spacing)*6)}.bsc\:w-24{width:calc(var(--bsc-spacing)*24)}.bsc\:w-\[18px\]{width:18px}.bsc\:w-\[20px\]{width:20px}.bsc\:w-\[24px\]{width:24px}.bsc\:w-\[60px\]{width:60px}.bsc\:w-full{width:100%}.bsc\:w-max{width:max-content}.bsc\:min-w-\[329px\]{min-width:329px}.bsc\:flex-1{flex:1}.bsc\:flex-shrink,.bsc\:shrink{flex-shrink:1}.bsc\:flex-grow,.bsc\:grow{flex-grow:1}.bsc\:\[transform\:scale\(0\)\]{transform:scale(0)}.bsc\:cursor-not-allowed{cursor:not-allowed}.bsc\:cursor-pointer{cursor:pointer}.bsc\:appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.bsc\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.bsc\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.bsc\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.bsc\:grid-rows-3{grid-template-rows:repeat(3,minmax(0,1fr))}.bsc\:flex-col{flex-direction:column}.bsc\:flex-row{flex-direction:row}.bsc\:items-center{align-items:center}.bsc\:justify-center{justify-content:center}.bsc\:gap-1{gap:calc(var(--bsc-spacing)*1)}.bsc\:gap-2{gap:calc(var(--bsc-spacing)*2)}.bsc\:gap-3{gap:calc(var(--bsc-spacing)*3)}.bsc\:gap-4{gap:calc(var(--bsc-spacing)*4)}.bsc\:overflow-hidden{overflow:hidden}.bsc\:overflow-scroll{overflow:scroll}.bsc\:overflow-x-auto{overflow-x:auto}.bsc\:overflow-y-hidden{overflow-y:hidden}.bsc\:rounded{border-radius:.25rem}.bsc\:rounded-full{border-radius:3.40282e38px}.bsc\:rounded-md{border-radius:var(--bsc-radius-md)}.bsc\:rounded-t-md{border-top-left-radius:var(--bsc-radius-md);border-top-right-radius:var(--bsc-radius-md)}.bsc\:rounded-l-md{border-top-left-radius:var(--bsc-radius-md);border-bottom-left-radius:var(--bsc-radius-md)}.bsc\:rounded-r-md{border-top-right-radius:var(--bsc-radius-md);border-bottom-right-radius:var(--bsc-radius-md)}.bsc\:rounded-b-md{border-bottom-right-radius:var(--bsc-radius-md);border-bottom-left-radius:var(--bsc-radius-md)}.bsc\:border{border-style:var(--tw-border-style);border-width:1px}.bsc\:border\!{border-style:var(--tw-border-style)!important;border-width:1px!important}.bsc\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.bsc\:border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.bsc\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.bsc\:border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.bsc\:border-none\!{--tw-border-style:none!important;border-style:none!important}.bsc\:border-solid{--tw-border-style:solid;border-style:solid}.bsc\:border-solid\!{--tw-border-style:solid!important;border-style:solid!important}.bsc\:border-black{border-color:var(--bsc-color-black)}.bsc\:border-error\!{border-color:var(--bsc-color-error)!important}.bsc\:border-gray-3{border-color:var(--bsc-color-gray-3)}.bsc\:border-gray-4{border-color:var(--bsc-color-gray-4)}.bsc\:border-transparent\!{border-color:#0000!important}.bsc\:bg-error{background-color:var(--bsc-color-error)}.bsc\:bg-gray-2{background-color:var(--bsc-color-gray-2)}.bsc\:bg-gray-3{background-color:var(--bsc-color-gray-3)}.bsc\:bg-gray-4{background-color:var(--bsc-color-gray-4)}.bsc\:bg-gray-5{background-color:var(--bsc-color-gray-5)}.bsc\:bg-info{background-color:var(--bsc-color-info)}.bsc\:bg-mono-dark-1{background-color:var(--bsc-color-mono-dark-1)}.bsc\:bg-primary-1{background-color:var(--bsc-color-primary-1)}.bsc\:bg-primary-2{background-color:var(--bsc-color-primary-2)}.bsc\:bg-primary-5{background-color:var(--bsc-color-primary-5)}.bsc\:bg-success{background-color:var(--bsc-color-success)}.bsc\:bg-transparent{background-color:#0000}.bsc\:bg-warning{background-color:var(--bsc-color-warning)}.bsc\:bg-white{background-color:var(--bsc-color-white)}.bsc\:stroke-mono-light-1{stroke:var(--bsc-color-mono-light-1)}.bsc\:stroke-2{stroke-width:2px}.bsc\:p-2{padding:calc(var(--bsc-spacing)*2)}.bsc\:p-4{padding:calc(var(--bsc-spacing)*4)}.bsc\:p-10{padding:calc(var(--bsc-spacing)*10)}.bsc\:px-2{padding-inline:calc(var(--bsc-spacing)*2)}.bsc\:px-4\!{padding-inline:calc(var(--bsc-spacing)*4)!important}.bsc\:py-1{padding-block:calc(var(--bsc-spacing)*1)}.bsc\:py-2{padding-block:calc(var(--bsc-spacing)*2)}.bsc\:pr-1{padding-right:calc(var(--bsc-spacing)*1)}.bsc\:pr-2{padding-right:calc(var(--bsc-spacing)*2)}.bsc\:pr-4{padding-right:calc(var(--bsc-spacing)*4)}.bsc\:pb-2{padding-bottom:calc(var(--bsc-spacing)*2)}.bsc\:pb-8{padding-bottom:calc(var(--bsc-spacing)*8)}.bsc\:pl-1{padding-left:calc(var(--bsc-spacing)*1)}.bsc\:pl-2{padding-left:calc(var(--bsc-spacing)*2)}.bsc\:pl-4{padding-left:calc(var(--bsc-spacing)*4)}.bsc\:text-center{text-align:center}.bsc\:text-left{text-align:left}.bsc\:text-sm{font-size:var(--bsc-text-sm);line-height:var(--tw-leading,var(--bsc-text-sm--line-height))}.bsc\:text-sm\!{font-size:var(--bsc-text-sm)!important;line-height:var(--tw-leading,var(--bsc-text-sm--line-height))!important}.bsc\:text-xs{font-size:var(--bsc-text-xs);line-height:var(--tw-leading,var(--bsc-text-xs--line-height))}.bsc\:font-bold{--tw-font-weight:var(--bsc-font-weight-bold);font-weight:var(--bsc-font-weight-bold)}.bsc\:font-medium{--tw-font-weight:var(--bsc-font-weight-medium);font-weight:var(--bsc-font-weight-medium)}.bsc\:whitespace-pre{white-space:pre}.bsc\:text-black{color:var(--bsc-color-black)}.bsc\:text-error{color:var(--bsc-color-error)}.bsc\:text-gray-2{color:var(--bsc-color-gray-2)}.bsc\:text-gray-3{color:var(--bsc-color-gray-3)}.bsc\:text-gray-4{color:var(--bsc-color-gray-4)}.bsc\:text-primary-1{color:var(--bsc-color-primary-1)}.bsc\:text-white{color:var(--bsc-color-white)}.bsc\:shadow,.bsc\:shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.bsc\:inset-shadow-\[0_0_0_1px\]{--tw-inset-shadow:inset 0 0 0 1px var(--tw-inset-shadow-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.bsc\:inset-shadow-gray-2{--tw-inset-shadow-color:var(--bsc-color-gray-2)}@supports (color:color-mix(in lab,red,red)){.bsc\:inset-shadow-gray-2{--tw-inset-shadow-color:color-mix(in oklab,var(--bsc-color-gray-2)var(--tw-inset-shadow-alpha),transparent)}}.bsc\:\[stroke-linecap\:round\]{stroke-linecap:round}.bsc\:\[stroke-linejoin\:round\]{stroke-linejoin:round}.bsc\:\[transition\:0\.3s\]{transition:all .3s}.bsc\:\[transition\:background-color_1s\]{transition:background-color 1s}.bsc\:\[transition\:box-shadow_0\.3s\]{transition:box-shadow .3s}:is(.bsc\:\*\:block>*){display:block}:is(.bsc\:\*\:size-\[21px\]>*){width:21px;height:21px}:is(.bsc\:\*\:cursor-pointer>*){cursor:pointer}:is(.bsc\:\*\:pr-2>*){padding-right:calc(var(--bsc-spacing)*2)}@media (hover:hover){.bsc\:group-hover\/wrapper\:not-data-checked\:inset-shadow-\[0_0_0_2px\]:is(:where(.bsc\:group\/wrapper):hover *):not([data-checked]){--tw-inset-shadow:inset 0 0 0 2px var(--tw-inset-shadow-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.bsc\:group-hover\/wrapper\:not-data-checked\:inset-shadow-gray-4:is(:where(.bsc\:group\/wrapper):hover *):not([data-checked]){--tw-inset-shadow-color:var(--bsc-color-gray-4)}@supports (color:color-mix(in lab,red,red)){.bsc\:group-hover\/wrapper\:not-data-checked\:inset-shadow-gray-4:is(:where(.bsc\:group\/wrapper):hover *):not([data-checked]){--tw-inset-shadow-color:color-mix(in oklab,var(--bsc-color-gray-4)var(--tw-inset-shadow-alpha),transparent)}}}.bsc\:group-data-checked\/checkbox\:visible:is(:where(.bsc\:group\/checkbox)[data-checked] *){visibility:visible}.bsc\:group-data-checked\/checkbox\:\[transform\:scale\(1\)\]:is(:where(.bsc\:group\/checkbox)[data-checked] *){transform:scale(1)}.bsc\:group-data-checked\/checkbox\:animate-bounce:is(:where(.bsc\:group\/checkbox)[data-checked] *){animation:var(--bsc-animate-bounce)}.bsc\:group-data-checked\/checkbox\:bg-primary-1:is(:where(.bsc\:group\/checkbox)[data-checked] *){background-color:var(--bsc-color-primary-1)}.bsc\:group-data-checked\/checkbox\:bg-primary-4:is(:where(.bsc\:group\/checkbox)[data-checked] *){background-color:var(--bsc-color-primary-4)}.bsc\:group-data-checked\/checkbox\:fill-primary-1:is(:where(.bsc\:group\/checkbox)[data-checked] *){fill:var(--bsc-color-primary-1)}.bsc\:group-data-checked\/checkbox\:fill-primary-4:is(:where(.bsc\:group\/checkbox)[data-checked] *){fill:var(--bsc-color-primary-4)}.bsc\:group-data-partial\/checkbox\:visible:is(:where(.bsc\:group\/checkbox)[data-partial] *){visibility:visible}.bsc\:group-data-partial\/checkbox\:\[transform\:scale\(1\)\]:is(:where(.bsc\:group\/checkbox)[data-partial] *){transform:scale(1)}.bsc\:group-data-partial\/checkbox\:animate-bounce:is(:where(.bsc\:group\/checkbox)[data-partial] *){animation:var(--bsc-animate-bounce)}.bsc\:group-data-partial\/checkbox\:bg-primary-1:is(:where(.bsc\:group\/checkbox)[data-partial] *){background-color:var(--bsc-color-primary-1)}.bsc\:group-data-partial\/checkbox\:bg-primary-4:is(:where(.bsc\:group\/checkbox)[data-partial] *){background-color:var(--bsc-color-primary-4)}.bsc\:group-data-partial\/checkbox\:fill-primary-1:is(:where(.bsc\:group\/checkbox)[data-partial] *){fill:var(--bsc-color-primary-1)}.bsc\:group-data-partial\/checkbox\:fill-primary-4:is(:where(.bsc\:group\/checkbox)[data-partial] *){fill:var(--bsc-color-primary-4)}.bsc\:focus-within\:ring-3:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.bsc\:focus-within\:ring-primary-2:focus-within{--tw-ring-color:var(--bsc-color-primary-2)}.bsc\:focus-within\:ring-offset-2:focus-within{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}@media (hover:hover){.bsc\:hover\:bg-primary-1:hover{background-color:var(--bsc-color-primary-1)}.bsc\:hover\:bg-primary-2:hover{background-color:var(--bsc-color-primary-2)}.bsc\:hover\:bg-primary-3:hover{background-color:var(--bsc-color-primary-3)}.bsc\:hover\:text-primary-2:hover{color:var(--bsc-color-primary-2)}.bsc\:hover\:text-white:hover{color:var(--bsc-color-white)}}.bsc\:focus\:ring-3:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.bsc\:focus\:ring-error:focus{--tw-ring-color:var(--bsc-color-error)}.bsc\:focus\:ring-info:focus{--tw-ring-color:var(--bsc-color-info)}.bsc\:focus\:ring-primary-1:focus{--tw-ring-color:var(--bsc-color-primary-1)}.bsc\:focus\:ring-primary-2:focus{--tw-ring-color:var(--bsc-color-primary-2)}.bsc\:focus\:ring-success:focus{--tw-ring-color:var(--bsc-color-success)}.bsc\:focus\:ring-warning:focus{--tw-ring-color:var(--bsc-color-warning)}.bsc\:focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.bsc\:focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.bsc\:focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.bsc\:has-checked\:bg-primary-1:has(:checked){background-color:var(--bsc-color-primary-1)}.bsc\:has-checked\:bg-primary-4:has(:checked){background-color:var(--bsc-color-primary-4)}.bsc\:has-checked\:text-gray-5:has(:checked){color:var(--bsc-color-gray-5)}.bsc\:has-checked\:text-white:has(:checked){color:var(--bsc-color-white)}@media not all and (min-width:40rem){.bsc\:max-sm\:p-4{padding:calc(var(--bsc-spacing)*4)}}@media (min-width:48rem){.bsc\:md\:p-2{padding:calc(var(--bsc-spacing)*2)}}.bsc\:dark\:border:is(.dark *){border-style:var(--tw-border-style);border-width:1px}.bsc\:dark\:border-t:is(.dark *){border-top-style:var(--tw-border-style);border-top-width:1px}.bsc\:dark\:border-solid:is(.dark *){--tw-border-style:solid;border-style:solid}.bsc\:dark\:border-mono-dark-1:is(.dark *){border-color:var(--bsc-color-mono-dark-1)}.bsc\:dark\:border-mono-light-1:is(.dark *){border-color:var(--bsc-color-mono-light-1)}.bsc\:dark\:border-mono-light-2:is(.dark *){border-color:var(--bsc-color-mono-light-2)}.bsc\:dark\:border-mono-light-3:is(.dark *){border-color:var(--bsc-color-mono-light-3)}.bsc\:dark\:border-white:is(.dark *){border-color:var(--bsc-color-white)}.bsc\:dark\:bg-mono-dark-1:is(.dark *){background-color:var(--bsc-color-mono-dark-1)}.bsc\:dark\:bg-mono-dark-2:is(.dark *){background-color:var(--bsc-color-mono-dark-2)}.bsc\:dark\:bg-mono-dark-3:is(.dark *){background-color:var(--bsc-color-mono-dark-3)}.bsc\:dark\:bg-mono-light-1:is(.dark *){background-color:var(--bsc-color-mono-light-1)}.bsc\:dark\:bg-mono-light-3:is(.dark *){background-color:var(--bsc-color-mono-light-3)}.bsc\:dark\:stroke-mono-dark-3:is(.dark *){stroke:var(--bsc-color-mono-dark-3)}.bsc\:dark\:text-mono-dark-1:is(.dark *){color:var(--bsc-color-mono-dark-1)}.bsc\:dark\:text-mono-light-1:is(.dark *){color:var(--bsc-color-mono-light-1)}.bsc\:dark\:text-mono-light-3:is(.dark *){color:var(--bsc-color-mono-light-3)}.bsc\:dark\:inset-shadow-\[0_0_0_1px\]:is(.dark *){--tw-inset-shadow:inset 0 0 0 1px var(--tw-inset-shadow-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.bsc\:dark\:ring-mono-light-2:is(.dark *){--tw-ring-color:var(--bsc-color-mono-light-2)}.bsc\:dark\:inset-shadow-mono-light-2:is(.dark *){--tw-inset-shadow-color:var(--bsc-color-mono-light-2)}@supports (color:color-mix(in lab,red,red)){.bsc\:dark\:inset-shadow-mono-light-2:is(.dark *){--tw-inset-shadow-color:color-mix(in oklab,var(--bsc-color-mono-light-2)var(--tw-inset-shadow-alpha),transparent)}}.bsc\:dark\:ring-offset-mono-dark-1:is(.dark *){--tw-ring-offset-color:var(--bsc-color-mono-dark-1)}@media (hover:hover){.bsc\:dark\:group-hover\/wrapper\:not-data-checked\:inset-shadow-\[0_0_0_2px\]:is(.dark *):is(:where(.bsc\:group\/wrapper):hover *):not([data-checked]){--tw-inset-shadow:inset 0 0 0 2px var(--tw-inset-shadow-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.bsc\:dark\:group-data-checked\/checkbox\:bg-mono-light-1:is(.dark *):is(:where(.bsc\:group\/checkbox)[data-checked] *){background-color:var(--bsc-color-mono-light-1)}.bsc\:dark\:group-data-checked\/checkbox\:bg-mono-light-3:is(.dark *):is(:where(.bsc\:group\/checkbox)[data-checked] *){background-color:var(--bsc-color-mono-light-3)}.bsc\:dark\:group-data-checked\/checkbox\:fill-mono-light-1:is(.dark *):is(:where(.bsc\:group\/checkbox)[data-checked] *){fill:var(--bsc-color-mono-light-1)}.bsc\:dark\:group-data-checked\/checkbox\:fill-mono-light-3:is(.dark *):is(:where(.bsc\:group\/checkbox)[data-checked] *){fill:var(--bsc-color-mono-light-3)}.bsc\:dark\:group-data-partial\/checkbox\:bg-mono-light-1:is(.dark *):is(:where(.bsc\:group\/checkbox)[data-partial] *){background-color:var(--bsc-color-mono-light-1)}.bsc\:dark\:group-data-partial\/checkbox\:bg-mono-light-3:is(.dark *):is(:where(.bsc\:group\/checkbox)[data-partial] *){background-color:var(--bsc-color-mono-light-3)}.bsc\:dark\:group-data-partial\/checkbox\:fill-mono-light-1:is(.dark *):is(:where(.bsc\:group\/checkbox)[data-partial] *){fill:var(--bsc-color-mono-light-1)}.bsc\:dark\:group-data-partial\/checkbox\:fill-mono-light-3:is(.dark *):is(:where(.bsc\:group\/checkbox)[data-partial] *){fill:var(--bsc-color-mono-light-3)}@media (hover:hover){.bsc\:dark\:hover\:bg-mono-light-1:is(.dark *):hover{background-color:var(--bsc-color-mono-light-1)}.bsc\:dark\:hover\:bg-mono-light-2:is(.dark *):hover{background-color:var(--bsc-color-mono-light-2)}.bsc\:dark\:hover\:bg-mono-light-3:is(.dark *):hover{background-color:var(--bsc-color-mono-light-3)}.bsc\:dark\:hover\:text-mono-dark-1:is(.dark *):hover{color:var(--bsc-color-mono-dark-1)}.bsc\:dark\:hover\:text-mono-dark-2:is(.dark *):hover{color:var(--bsc-color-mono-dark-2)}.bsc\:dark\:hover\:text-mono-light-3:is(.dark *):hover{color:var(--bsc-color-mono-light-3)}}.bsc\:dark\:has-checked\:bg-mono-light-1:is(.dark *):has(:checked){background-color:var(--bsc-color-mono-light-1)}.bsc\:dark\:has-checked\:bg-mono-light-2:is(.dark *):has(:checked){background-color:var(--bsc-color-mono-light-2)}.bsc\:dark\:has-checked\:bg-mono-light-3:is(.dark *):has(:checked){background-color:var(--bsc-color-mono-light-3)}.bsc\:dark\:has-checked\:text-mono-dark-1:is(.dark *):has(:checked){color:var(--bsc-color-mono-dark-1)}.bsc\:dark\:has-checked\:text-mono-dark-3:is(.dark *):has(:checked){color:var(--bsc-color-mono-dark-3)}}:root{--theme-bsc-primary-1:#2f54ff;--theme-bsc-primary-2:#5f7bff;--theme-bsc-primary-3:#899eff;--theme-bsc-primary-4:#b4c1ff;--theme-bsc-primary-5:#dee4ff;--theme-bsc-gray-1:#303030;--theme-bsc-gray-2:#5f5f5f;--theme-bsc-gray-3:#8f8f8f;--theme-bsc-gray-4:#bebebe;--theme-bsc-gray-5:#eee;--theme-bsc-black:#000;--theme-bsc-white:#fff;--theme-bsc-mono-dark-1:#222;--theme-bsc-mono-dark-2:#3c3c3c;--theme-bsc-mono-dark-3:#4e4e4e;--theme-bsc-mono-light-1:#fefefe;--theme-bsc-mono-light-2:#eee;--theme-bsc-mono-light-3:#ccc;--theme-bsc-info:#2e7ff8;--theme-bsc-success:#53ae0c;--theme-bsc-warning:#ff6914;--theme-bsc-error:#f01616}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@keyframes bounce{50%{transform:scale(1.2)}75%{transform:scale(.9)}to{transform:scale(1)}}
1
+ /*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */@layer bsh-theme{:root,:host{--bsh-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bsh-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bsh-default-font-family:var(--bsh-font-sans);--bsh-default-mono-font-family:var(--bsh-font-mono)}}@layer bsh-base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--bsh-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--bsh-default-font-feature-settings,normal);font-variation-settings:var(--bsh-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--bsh-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--bsh-default-mono-font-feature-settings,normal);font-variation-settings:var(--bsh-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer bsh-components;@layer bsh-utilities{.bsh\:\[visibility\:hidden\]{visibility:hidden}.bsh\:absolute\!{position:absolute!important}.bsh\:left-\[-1000px\]\!{left:-1000px!important}.bsh\:flex{display:flex}.bsh\:size-\[21px\]{width:21px;height:21px}.bsh\:appearance-none\!{-webkit-appearance:none!important;-moz-appearance:none!important;appearance:none!important}.bsh\:flex-col{flex-direction:column}.bsh\:flex-row{flex-direction:row}.bsh\:items-center{align-items:center}.bsh\:overflow-y-auto{overflow-y:auto}.bsh\:stroke-2{stroke-width:2px}.bsh\:opacity-0{opacity:0}.bsh\:\[stroke-linecap\:round\]{stroke-linecap:round}.bsh\:\[stroke-linejoin\:round\]{stroke-linejoin:round}.bsh\:group-data-checked\:visible:is(:where(.bsh\:group)[data-checked] *){visibility:visible}.bsh\:group-data-checked\:opacity-100:is(:where(.bsh\:group)[data-checked] *){opacity:1}.bsh\:group-data-partial\:visible:is(:where(.bsh\:group)[data-partial] *){visibility:visible}.bsh\:group-data-partial\:opacity-100:is(:where(.bsh\:group)[data-partial] *){opacity:1}@media (hover:hover){.bsh\:hover\:cursor-pointer:hover{cursor:pointer}}}/*! tailwindcss v4.1.10 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer bsc-theme{:root,:host{--bsc-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bsc-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bsc-spacing:.25rem;--bsc-text-xs:.75rem;--bsc-text-xs--line-height:calc(1/.75);--bsc-text-sm:.875rem;--bsc-text-sm--line-height:calc(1.25/.875);--bsc-font-weight-medium:500;--bsc-font-weight-bold:700;--bsc-radius-md:.375rem;--bsc-animate-bounce:bounce .4s ease-in-out forwards .2s;--bsc-default-font-family:var(--bsc-font-sans);--bsc-default-mono-font-family:var(--bsc-font-mono);--bsc-color-white:var(--theme-bsc-white);--bsc-color-black:var(--theme-bsc-black);--bsc-color-primary-1:var(--theme-bsc-primary-1);--bsc-color-primary-2:var(--theme-bsc-primary-2);--bsc-color-primary-3:var(--theme-bsc-primary-3);--bsc-color-primary-4:var(--theme-bsc-primary-4);--bsc-color-primary-5:var(--theme-bsc-primary-5);--bsc-color-gray-2:var(--theme-bsc-gray-2);--bsc-color-gray-3:var(--theme-bsc-gray-3);--bsc-color-gray-4:var(--theme-bsc-gray-4);--bsc-color-gray-5:var(--theme-bsc-gray-5);--bsc-color-mono-dark-1:var(--theme-bsc-mono-dark-1);--bsc-color-mono-dark-2:var(--theme-bsc-mono-dark-2);--bsc-color-mono-dark-3:var(--theme-bsc-mono-dark-3);--bsc-color-mono-light-1:var(--theme-bsc-mono-light-1);--bsc-color-mono-light-2:var(--theme-bsc-mono-light-2);--bsc-color-mono-light-3:var(--theme-bsc-mono-light-3);--bsc-color-info:var(--theme-bsc-info);--bsc-color-success:var(--theme-bsc-success);--bsc-color-warning:var(--theme-bsc-warning);--bsc-color-error:var(--theme-bsc-error)}}@layer bsc-base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--bsc-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--bsc-default-font-feature-settings,normal);font-variation-settings:var(--bsc-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--bsc-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--bsc-default-mono-font-feature-settings,normal);font-variation-settings:var(--bsc-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*,:after,:before,::backdrop{border-color:var(--color-gray-200,currentcolor)}::file-selector-button{border-color:var(--color-gray-200,currentcolor)}}@layer bsc-components{:is(.bsc-radio-item,.bsc-radio-item-read-only) svg{stroke-width:1px;fill:none}:is(.bsc-radio-item,.bsc-radio-item-read-only) input+svg circle~circle{display:none}.bsc-radio-item-animate input:checked+svg circle~circle{animation:var(--bsc-animate-bounce)}:not(.dark) .bsc-radio-item svg{stroke:var(--theme-bsc-gray-2)}:not(.dark) .bsc-radio-item-read-only svg{stroke:var(--theme-bsc-gray-4)}:not(.dark) .bsc-radio-item input:checked+svg circle{fill:var(--theme-bsc-primary-1)}:not(.dark) .bsc-radio-item-read-only input:checked+svg circle{fill:var(--theme-bsc-primary-4)}:not(.dark) :is(.bsc-radio-item,.bsc-radio-item-read-only) input:checked+svg circle~circle{fill:var(--theme-bsc-white);display:block}.dark .bsc-radio-item svg{stroke:var(--theme-bsc-mono-light-2)}.dark .bsc-radio-item-read-only svg{stroke:var(--theme-bsc-mono-light-3)}.dark .bsc-radio-item input:checked+svg circle{fill:var(--theme-bsc-mono-light-2)}.dark .bsc-radio-item-read-only input:checked+svg circle{fill:var(--theme-bsc-mono-light-3)}.dark :is(.bsc-radio-item,.bsc-radio-item-read-only) input:checked+svg circle~circle{fill:var(--theme-bsc-mono-dark-1);display:block}.bsc-toggle-switch input:checked+#switch{transform:translate(35px)}}@layer bsc-utilities{.bsc\:pointer-events-none{pointer-events:none}.bsc\:\[visibility\:hidden\]{visibility:hidden}.bsc\:absolute{position:absolute}.bsc\:fixed{position:fixed}.bsc\:relative{position:relative}.bsc\:top-0{top:calc(var(--bsc-spacing)*0)}.bsc\:top-\[4px\]{top:4px}.bsc\:bottom-0{bottom:calc(var(--bsc-spacing)*0)}.bsc\:left-0{left:calc(var(--bsc-spacing)*0)}.bsc\:left-\[4px\]{left:4px}.bsc\:col-span-3{grid-column:span 3/span 3}.bsc\:col-span-4{grid-column:span 4/span 4}.bsc\:mt-0\.5{margin-top:calc(var(--bsc-spacing)*.5)}.bsc\:mr-2{margin-right:calc(var(--bsc-spacing)*2)}.bsc\:mr-3{margin-right:calc(var(--bsc-spacing)*3)}.bsc\:mb-2{margin-bottom:calc(var(--bsc-spacing)*2)}.bsc\:ml-2{margin-left:calc(var(--bsc-spacing)*2)}.bsc\:flex{display:flex}.bsc\:grid{display:grid}.bsc\:hidden{display:none}.bsc\:h-3\/4{height:75%}.bsc\:h-6{height:calc(var(--bsc-spacing)*6)}.bsc\:h-\[18px\]{height:18px}.bsc\:h-\[20px\]{height:20px}.bsc\:h-\[24px\]{height:24px}.bsc\:h-\[26px\]{height:26px}.bsc\:h-full{height:100%}.bsc\:h-screen{height:100vh}.bsc\:w-6{width:calc(var(--bsc-spacing)*6)}.bsc\:w-24{width:calc(var(--bsc-spacing)*24)}.bsc\:w-\[18px\]{width:18px}.bsc\:w-\[20px\]{width:20px}.bsc\:w-\[24px\]{width:24px}.bsc\:w-\[60px\]{width:60px}.bsc\:w-full{width:100%}.bsc\:w-max{width:max-content}.bsc\:min-w-\[329px\]{min-width:329px}.bsc\:flex-1{flex:1}.bsc\:flex-shrink,.bsc\:shrink{flex-shrink:1}.bsc\:flex-grow,.bsc\:grow{flex-grow:1}.bsc\:\[transform\:scale\(0\)\]{transform:scale(0)}.bsc\:cursor-not-allowed{cursor:not-allowed}.bsc\:cursor-pointer{cursor:pointer}.bsc\:appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.bsc\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.bsc\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.bsc\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.bsc\:grid-rows-3{grid-template-rows:repeat(3,minmax(0,1fr))}.bsc\:flex-col{flex-direction:column}.bsc\:flex-row{flex-direction:row}.bsc\:items-center{align-items:center}.bsc\:justify-center{justify-content:center}.bsc\:gap-1{gap:calc(var(--bsc-spacing)*1)}.bsc\:gap-2{gap:calc(var(--bsc-spacing)*2)}.bsc\:gap-3{gap:calc(var(--bsc-spacing)*3)}.bsc\:gap-4{gap:calc(var(--bsc-spacing)*4)}.bsc\:overflow-hidden{overflow:hidden}.bsc\:overflow-scroll{overflow:scroll}.bsc\:overflow-x-auto{overflow-x:auto}.bsc\:overflow-y-hidden{overflow-y:hidden}.bsc\:rounded{border-radius:.25rem}.bsc\:rounded-full{border-radius:3.40282e38px}.bsc\:rounded-md{border-radius:var(--bsc-radius-md)}.bsc\:rounded-t-md{border-top-left-radius:var(--bsc-radius-md);border-top-right-radius:var(--bsc-radius-md)}.bsc\:rounded-l-md{border-top-left-radius:var(--bsc-radius-md);border-bottom-left-radius:var(--bsc-radius-md)}.bsc\:rounded-r-md{border-top-right-radius:var(--bsc-radius-md);border-bottom-right-radius:var(--bsc-radius-md)}.bsc\:rounded-b-md{border-bottom-right-radius:var(--bsc-radius-md);border-bottom-left-radius:var(--bsc-radius-md)}.bsc\:border{border-style:var(--tw-border-style);border-width:1px}.bsc\:border\!{border-style:var(--tw-border-style)!important;border-width:1px!important}.bsc\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.bsc\:border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.bsc\:border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.bsc\:border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.bsc\:border-none\!{--tw-border-style:none!important;border-style:none!important}.bsc\:border-solid{--tw-border-style:solid;border-style:solid}.bsc\:border-solid\!{--tw-border-style:solid!important;border-style:solid!important}.bsc\:border-black{border-color:var(--bsc-color-black)}.bsc\:border-error\!{border-color:var(--bsc-color-error)!important}.bsc\:border-gray-3{border-color:var(--bsc-color-gray-3)}.bsc\:border-gray-4{border-color:var(--bsc-color-gray-4)}.bsc\:border-transparent\!{border-color:#0000!important}.bsc\:bg-error{background-color:var(--bsc-color-error)}.bsc\:bg-gray-2{background-color:var(--bsc-color-gray-2)}.bsc\:bg-gray-3{background-color:var(--bsc-color-gray-3)}.bsc\:bg-gray-4{background-color:var(--bsc-color-gray-4)}.bsc\:bg-gray-5{background-color:var(--bsc-color-gray-5)}.bsc\:bg-info{background-color:var(--bsc-color-info)}.bsc\:bg-mono-dark-1{background-color:var(--bsc-color-mono-dark-1)}.bsc\:bg-primary-1{background-color:var(--bsc-color-primary-1)}.bsc\:bg-primary-2{background-color:var(--bsc-color-primary-2)}.bsc\:bg-primary-5{background-color:var(--bsc-color-primary-5)}.bsc\:bg-success{background-color:var(--bsc-color-success)}.bsc\:bg-transparent{background-color:#0000}.bsc\:bg-warning{background-color:var(--bsc-color-warning)}.bsc\:bg-white{background-color:var(--bsc-color-white)}.bsc\:stroke-mono-light-1{stroke:var(--bsc-color-mono-light-1)}.bsc\:stroke-2{stroke-width:2px}.bsc\:p-2{padding:calc(var(--bsc-spacing)*2)}.bsc\:p-4{padding:calc(var(--bsc-spacing)*4)}.bsc\:p-10{padding:calc(var(--bsc-spacing)*10)}.bsc\:px-2{padding-inline:calc(var(--bsc-spacing)*2)}.bsc\:px-4\!{padding-inline:calc(var(--bsc-spacing)*4)!important}.bsc\:py-1{padding-block:calc(var(--bsc-spacing)*1)}.bsc\:py-2{padding-block:calc(var(--bsc-spacing)*2)}.bsc\:pr-1{padding-right:calc(var(--bsc-spacing)*1)}.bsc\:pr-2{padding-right:calc(var(--bsc-spacing)*2)}.bsc\:pr-4{padding-right:calc(var(--bsc-spacing)*4)}.bsc\:pb-2{padding-bottom:calc(var(--bsc-spacing)*2)}.bsc\:pb-8{padding-bottom:calc(var(--bsc-spacing)*8)}.bsc\:pl-1{padding-left:calc(var(--bsc-spacing)*1)}.bsc\:pl-2{padding-left:calc(var(--bsc-spacing)*2)}.bsc\:pl-4{padding-left:calc(var(--bsc-spacing)*4)}.bsc\:text-center{text-align:center}.bsc\:text-left{text-align:left}.bsc\:text-sm{font-size:var(--bsc-text-sm);line-height:var(--tw-leading,var(--bsc-text-sm--line-height))}.bsc\:text-sm\!{font-size:var(--bsc-text-sm)!important;line-height:var(--tw-leading,var(--bsc-text-sm--line-height))!important}.bsc\:text-xs{font-size:var(--bsc-text-xs);line-height:var(--tw-leading,var(--bsc-text-xs--line-height))}.bsc\:font-bold{--tw-font-weight:var(--bsc-font-weight-bold);font-weight:var(--bsc-font-weight-bold)}.bsc\:font-medium{--tw-font-weight:var(--bsc-font-weight-medium);font-weight:var(--bsc-font-weight-medium)}.bsc\:whitespace-pre{white-space:pre}.bsc\:text-black{color:var(--bsc-color-black)}.bsc\:text-error{color:var(--bsc-color-error)}.bsc\:text-gray-2{color:var(--bsc-color-gray-2)}.bsc\:text-gray-3{color:var(--bsc-color-gray-3)}.bsc\:text-gray-4{color:var(--bsc-color-gray-4)}.bsc\:text-primary-1{color:var(--bsc-color-primary-1)}.bsc\:text-white{color:var(--bsc-color-white)}.bsc\:shadow,.bsc\:shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.bsc\:inset-shadow-\[0_0_0_1px\]{--tw-inset-shadow:inset 0 0 0 1px var(--tw-inset-shadow-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.bsc\:inset-shadow-gray-2{--tw-inset-shadow-color:var(--bsc-color-gray-2)}@supports (color:color-mix(in lab,red,red)){.bsc\:inset-shadow-gray-2{--tw-inset-shadow-color:color-mix(in oklab,var(--bsc-color-gray-2)var(--tw-inset-shadow-alpha),transparent)}}.bsc\:\[stroke-linecap\:round\]{stroke-linecap:round}.bsc\:\[stroke-linejoin\:round\]{stroke-linejoin:round}.bsc\:\[transition\:0\.3s\]{transition:all .3s}.bsc\:\[transition\:background-color_1s\]{transition:background-color 1s}.bsc\:\[transition\:box-shadow_0\.3s\]{transition:box-shadow .3s}:is(.bsc\:\*\:block>*){display:block}:is(.bsc\:\*\:size-\[21px\]>*){width:21px;height:21px}:is(.bsc\:\*\:cursor-pointer>*){cursor:pointer}:is(.bsc\:\*\:pr-2>*){padding-right:calc(var(--bsc-spacing)*2)}@media (hover:hover){.bsc\:group-hover\/wrapper\:not-data-checked\:inset-shadow-\[0_0_0_2px\]:is(:where(.bsc\:group\/wrapper):hover *):not([data-checked]){--tw-inset-shadow:inset 0 0 0 2px var(--tw-inset-shadow-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.bsc\:group-hover\/wrapper\:not-data-checked\:inset-shadow-gray-4:is(:where(.bsc\:group\/wrapper):hover *):not([data-checked]){--tw-inset-shadow-color:var(--bsc-color-gray-4)}@supports (color:color-mix(in lab,red,red)){.bsc\:group-hover\/wrapper\:not-data-checked\:inset-shadow-gray-4:is(:where(.bsc\:group\/wrapper):hover *):not([data-checked]){--tw-inset-shadow-color:color-mix(in oklab,var(--bsc-color-gray-4)var(--tw-inset-shadow-alpha),transparent)}}}.bsc\:group-data-checked\/checkbox\:visible:is(:where(.bsc\:group\/checkbox)[data-checked] *){visibility:visible}.bsc\:group-data-checked\/checkbox\:\[transform\:scale\(1\)\]:is(:where(.bsc\:group\/checkbox)[data-checked] *){transform:scale(1)}.bsc\:group-data-checked\/checkbox\:animate-bounce:is(:where(.bsc\:group\/checkbox)[data-checked] *){animation:var(--bsc-animate-bounce)}.bsc\:group-data-checked\/checkbox\:bg-primary-1:is(:where(.bsc\:group\/checkbox)[data-checked] *){background-color:var(--bsc-color-primary-1)}.bsc\:group-data-checked\/checkbox\:bg-primary-4:is(:where(.bsc\:group\/checkbox)[data-checked] *){background-color:var(--bsc-color-primary-4)}.bsc\:group-data-checked\/checkbox\:fill-primary-1:is(:where(.bsc\:group\/checkbox)[data-checked] *){fill:var(--bsc-color-primary-1)}.bsc\:group-data-checked\/checkbox\:fill-primary-4:is(:where(.bsc\:group\/checkbox)[data-checked] *){fill:var(--bsc-color-primary-4)}.bsc\:group-data-partial\/checkbox\:visible:is(:where(.bsc\:group\/checkbox)[data-partial] *){visibility:visible}.bsc\:group-data-partial\/checkbox\:\[transform\:scale\(1\)\]:is(:where(.bsc\:group\/checkbox)[data-partial] *){transform:scale(1)}.bsc\:group-data-partial\/checkbox\:animate-bounce:is(:where(.bsc\:group\/checkbox)[data-partial] *){animation:var(--bsc-animate-bounce)}.bsc\:group-data-partial\/checkbox\:bg-primary-1:is(:where(.bsc\:group\/checkbox)[data-partial] *){background-color:var(--bsc-color-primary-1)}.bsc\:group-data-partial\/checkbox\:bg-primary-4:is(:where(.bsc\:group\/checkbox)[data-partial] *){background-color:var(--bsc-color-primary-4)}.bsc\:group-data-partial\/checkbox\:fill-primary-1:is(:where(.bsc\:group\/checkbox)[data-partial] *){fill:var(--bsc-color-primary-1)}.bsc\:group-data-partial\/checkbox\:fill-primary-4:is(:where(.bsc\:group\/checkbox)[data-partial] *){fill:var(--bsc-color-primary-4)}.bsc\:focus-within\:ring-3:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.bsc\:focus-within\:ring-primary-2:focus-within{--tw-ring-color:var(--bsc-color-primary-2)}.bsc\:focus-within\:ring-offset-2:focus-within{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}@media (hover:hover){.bsc\:hover\:bg-primary-1\!:hover{background-color:var(--bsc-color-primary-1)!important}.bsc\:hover\:bg-primary-2:hover{background-color:var(--bsc-color-primary-2)}.bsc\:hover\:bg-primary-3:hover{background-color:var(--bsc-color-primary-3)}.bsc\:hover\:text-primary-2:hover{color:var(--bsc-color-primary-2)}.bsc\:hover\:text-white:hover{color:var(--bsc-color-white)}.bsc\:hover\:text-white\!:hover{color:var(--bsc-color-white)!important}}.bsc\:focus\:ring-3:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(3px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.bsc\:focus\:ring-error:focus{--tw-ring-color:var(--bsc-color-error)}.bsc\:focus\:ring-info:focus{--tw-ring-color:var(--bsc-color-info)}.bsc\:focus\:ring-primary-1:focus{--tw-ring-color:var(--bsc-color-primary-1)}.bsc\:focus\:ring-primary-2:focus{--tw-ring-color:var(--bsc-color-primary-2)}.bsc\:focus\:ring-success:focus{--tw-ring-color:var(--bsc-color-success)}.bsc\:focus\:ring-warning:focus{--tw-ring-color:var(--bsc-color-warning)}.bsc\:focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.bsc\:focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media (forced-colors:active){.bsc\:focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.bsc\:has-checked\:bg-primary-1:has(:checked){background-color:var(--bsc-color-primary-1)}.bsc\:has-checked\:bg-primary-4:has(:checked){background-color:var(--bsc-color-primary-4)}.bsc\:has-checked\:text-gray-5:has(:checked){color:var(--bsc-color-gray-5)}.bsc\:has-checked\:text-white:has(:checked){color:var(--bsc-color-white)}@media not all and (min-width:40rem){.bsc\:max-sm\:p-4{padding:calc(var(--bsc-spacing)*4)}}@media (min-width:48rem){.bsc\:md\:p-2{padding:calc(var(--bsc-spacing)*2)}}.bsc\:dark\:border:is(.dark *){border-style:var(--tw-border-style);border-width:1px}.bsc\:dark\:border-t:is(.dark *){border-top-style:var(--tw-border-style);border-top-width:1px}.bsc\:dark\:border-solid:is(.dark *){--tw-border-style:solid;border-style:solid}.bsc\:dark\:border-mono-dark-1:is(.dark *){border-color:var(--bsc-color-mono-dark-1)}.bsc\:dark\:border-mono-light-1:is(.dark *){border-color:var(--bsc-color-mono-light-1)}.bsc\:dark\:border-mono-light-2:is(.dark *){border-color:var(--bsc-color-mono-light-2)}.bsc\:dark\:border-mono-light-3:is(.dark *){border-color:var(--bsc-color-mono-light-3)}.bsc\:dark\:border-white:is(.dark *){border-color:var(--bsc-color-white)}.bsc\:dark\:bg-mono-dark-1:is(.dark *){background-color:var(--bsc-color-mono-dark-1)}.bsc\:dark\:bg-mono-dark-2:is(.dark *){background-color:var(--bsc-color-mono-dark-2)}.bsc\:dark\:bg-mono-dark-3:is(.dark *){background-color:var(--bsc-color-mono-dark-3)}.bsc\:dark\:bg-mono-light-1:is(.dark *){background-color:var(--bsc-color-mono-light-1)}.bsc\:dark\:bg-mono-light-3:is(.dark *){background-color:var(--bsc-color-mono-light-3)}.bsc\:dark\:stroke-mono-dark-3:is(.dark *){stroke:var(--bsc-color-mono-dark-3)}.bsc\:dark\:text-mono-dark-1:is(.dark *){color:var(--bsc-color-mono-dark-1)}.bsc\:dark\:text-mono-light-1:is(.dark *){color:var(--bsc-color-mono-light-1)}.bsc\:dark\:text-mono-light-3:is(.dark *){color:var(--bsc-color-mono-light-3)}.bsc\:dark\:inset-shadow-\[0_0_0_1px\]:is(.dark *){--tw-inset-shadow:inset 0 0 0 1px var(--tw-inset-shadow-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.bsc\:dark\:ring-mono-light-2:is(.dark *){--tw-ring-color:var(--bsc-color-mono-light-2)}.bsc\:dark\:inset-shadow-mono-light-2:is(.dark *){--tw-inset-shadow-color:var(--bsc-color-mono-light-2)}@supports (color:color-mix(in lab,red,red)){.bsc\:dark\:inset-shadow-mono-light-2:is(.dark *){--tw-inset-shadow-color:color-mix(in oklab,var(--bsc-color-mono-light-2)var(--tw-inset-shadow-alpha),transparent)}}.bsc\:dark\:ring-offset-mono-dark-1:is(.dark *){--tw-ring-offset-color:var(--bsc-color-mono-dark-1)}@media (hover:hover){.bsc\:dark\:group-hover\/wrapper\:not-data-checked\:inset-shadow-\[0_0_0_2px\]:is(.dark *):is(:where(.bsc\:group\/wrapper):hover *):not([data-checked]){--tw-inset-shadow:inset 0 0 0 2px var(--tw-inset-shadow-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.bsc\:dark\:group-data-checked\/checkbox\:bg-mono-light-1:is(.dark *):is(:where(.bsc\:group\/checkbox)[data-checked] *){background-color:var(--bsc-color-mono-light-1)}.bsc\:dark\:group-data-checked\/checkbox\:bg-mono-light-3:is(.dark *):is(:where(.bsc\:group\/checkbox)[data-checked] *){background-color:var(--bsc-color-mono-light-3)}.bsc\:dark\:group-data-checked\/checkbox\:fill-mono-light-1:is(.dark *):is(:where(.bsc\:group\/checkbox)[data-checked] *){fill:var(--bsc-color-mono-light-1)}.bsc\:dark\:group-data-checked\/checkbox\:fill-mono-light-3:is(.dark *):is(:where(.bsc\:group\/checkbox)[data-checked] *){fill:var(--bsc-color-mono-light-3)}.bsc\:dark\:group-data-partial\/checkbox\:bg-mono-light-1:is(.dark *):is(:where(.bsc\:group\/checkbox)[data-partial] *){background-color:var(--bsc-color-mono-light-1)}.bsc\:dark\:group-data-partial\/checkbox\:bg-mono-light-3:is(.dark *):is(:where(.bsc\:group\/checkbox)[data-partial] *){background-color:var(--bsc-color-mono-light-3)}.bsc\:dark\:group-data-partial\/checkbox\:fill-mono-light-1:is(.dark *):is(:where(.bsc\:group\/checkbox)[data-partial] *){fill:var(--bsc-color-mono-light-1)}.bsc\:dark\:group-data-partial\/checkbox\:fill-mono-light-3:is(.dark *):is(:where(.bsc\:group\/checkbox)[data-partial] *){fill:var(--bsc-color-mono-light-3)}@media (hover:hover){.bsc\:dark\:hover\:bg-mono-light-1:is(.dark *):hover{background-color:var(--bsc-color-mono-light-1)}.bsc\:dark\:hover\:bg-mono-light-2:is(.dark *):hover{background-color:var(--bsc-color-mono-light-2)}.bsc\:dark\:hover\:bg-mono-light-3\!:is(.dark *):hover{background-color:var(--bsc-color-mono-light-3)!important}.bsc\:dark\:hover\:text-mono-dark-1:is(.dark *):hover{color:var(--bsc-color-mono-dark-1)}.bsc\:dark\:hover\:text-mono-dark-2:is(.dark *):hover{color:var(--bsc-color-mono-dark-2)}.bsc\:dark\:hover\:text-mono-light-3:is(.dark *):hover{color:var(--bsc-color-mono-light-3)}}.bsc\:dark\:has-checked\:bg-mono-light-1:is(.dark *):has(:checked){background-color:var(--bsc-color-mono-light-1)}.bsc\:dark\:has-checked\:bg-mono-light-2:is(.dark *):has(:checked){background-color:var(--bsc-color-mono-light-2)}.bsc\:dark\:has-checked\:bg-mono-light-3:is(.dark *):has(:checked){background-color:var(--bsc-color-mono-light-3)}.bsc\:dark\:has-checked\:text-mono-dark-1:is(.dark *):has(:checked){color:var(--bsc-color-mono-dark-1)}.bsc\:dark\:has-checked\:text-mono-dark-3:is(.dark *):has(:checked){color:var(--bsc-color-mono-dark-3)}}:root{--theme-bsc-primary-1:#2f54ff;--theme-bsc-primary-2:#5f7bff;--theme-bsc-primary-3:#899eff;--theme-bsc-primary-4:#b4c1ff;--theme-bsc-primary-5:#dee4ff;--theme-bsc-gray-1:#303030;--theme-bsc-gray-2:#5f5f5f;--theme-bsc-gray-3:#8f8f8f;--theme-bsc-gray-4:#bebebe;--theme-bsc-gray-5:#eee;--theme-bsc-black:#000;--theme-bsc-white:#fff;--theme-bsc-mono-dark-1:#222;--theme-bsc-mono-dark-2:#3c3c3c;--theme-bsc-mono-dark-3:#4e4e4e;--theme-bsc-mono-light-1:#fefefe;--theme-bsc-mono-light-2:#eee;--theme-bsc-mono-light-3:#ccc;--theme-bsc-info:#2e7ff8;--theme-bsc-success:#53ae0c;--theme-bsc-warning:#ff6914;--theme-bsc-error:#f01616}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@keyframes bounce{50%{transform:scale(1.2)}75%{transform:scale(.9)}to{transform:scale(1)}}
Binary file
package/dist/index.es.js CHANGED
@@ -8726,10 +8726,17 @@ const ds = (e, t, r) => {
8726
8726
  },
8727
8727
  o,
8728
8728
  i
8729
- ), f = "bsc:bg-transparent bsc:cursor-pointer bsc:focus:outline-hidden bsc:hover:bg-primary-1 bsc:hover:text-white bsc:dark:hover:bg-mono-light-3", w = u || ((l, d) => /* @__PURE__ */ m.jsx("div", { className: "bc-dt-scroller bsc:flex bsc:w-full bsc:flex-row bsc:items-center bsc:px-2 bsc:py-1", children: d }));
8729
+ ), f = "bsc:bg-transparent bsc:cursor-pointer bsc:focus:outline-hidden bsc:hover:bg-primary-1! bsc:hover:text-white! bsc:dark:hover:bg-mono-light-3!", w = u || ((l, d) => /* @__PURE__ */ m.jsx("div", { className: "bc-dt-scroller bsc:flex bsc:w-full bsc:flex-row bsc:items-center bsc:px-2 bsc:py-1", children: d }));
8730
8730
  return /* @__PURE__ */ m.jsxs(It, { props: h, template: w, children: [
8731
8731
  /* @__PURE__ */ m.jsx("div", { className: "bc-dt-scroller-left bsc:shrink bsc:cursor-pointer", children: /* @__PURE__ */ m.jsx(lt, { className: f, onClick: n, children: /* @__PURE__ */ m.jsx(Ze, { icon: "chevronLeft", size: We.Regular }) }) }),
8732
- /* @__PURE__ */ m.jsx("div", { className: "bc-dt-scroller-title bsc:grow bsc:cursor-pointer bsc:text-center bsc:hover:text-primary-2 bsc:dark:hover:text-mono-light-3", onClick: r, children: e }),
8732
+ /* @__PURE__ */ m.jsx(
8733
+ "div",
8734
+ {
8735
+ className: "bc-dt-scroller-title bsc:grow bsc:cursor-pointer bsc:text-center bsc:hover:text-primary-2 bsc:dark:hover:text-mono-light-3",
8736
+ onClick: r,
8737
+ children: e
8738
+ }
8739
+ ),
8733
8740
  /* @__PURE__ */ m.jsx("div", { className: "bc-dt-scroller-right bsc:shrink bsc:cursor-pointer", children: /* @__PURE__ */ m.jsx(lt, { className: f, onClick: s, children: /* @__PURE__ */ m.jsx(Ze, { icon: "chevronRight", size: We.Regular }) }) })
8734
8741
  ] });
8735
8742
  }, Op = ({
Binary file
package/dist/index.umd.js CHANGED
@@ -83,4 +83,4 @@ object-assign
83
83
  (c) Sindre Sorhus
84
84
  @license MIT
85
85
  */var $n,ni;function Wh(){if(ni)return $n;ni=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function s(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var i={},c=0;c<10;c++)i["_"+String.fromCharCode(c)]=c;var u=Object.getOwnPropertyNames(i).map(function(f){return i[f]});if(u.join("")!=="0123456789")return!1;var h={};return"abcdefghijklmnopqrst".split("").forEach(function(f){h[f]=f}),Object.keys(Object.assign({},h)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return $n=s()?Object.assign:function(o,i){for(var c,u=n(o),h,f=1;f<arguments.length;f++){c=Object(arguments[f]);for(var v in c)t.call(c,v)&&(u[v]=c[v]);if(e){h=e(c);for(var P=0;P<h.length;P++)r.call(c,h[P])&&(u[h[P]]=c[h[P]])}}return u},$n}var Hn,si;function Yn(){if(si)return Hn;si=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Hn=e,Hn}var Wn,oi;function ii(){return oi||(oi=1,Wn=Function.call.bind(Object.prototype.hasOwnProperty)),Wn}var Vn,ai;function Vh(){if(ai)return Vn;ai=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Yn(),r={},n=ii();e=function(o){var i="Warning: "+o;typeof console<"u"&&console.error(i);try{throw new Error(i)}catch{}}}function s(o,i,c,u,h){if(process.env.NODE_ENV!=="production"){for(var f in o)if(n(o,f)){var v;try{if(typeof o[f]!="function"){var P=Error((u||"React class")+": "+c+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw P.name="Invariant Violation",P}v=o[f](i,f,u,c,null,t)}catch(d){v=d}if(v&&!(v instanceof Error)&&e((u||"React class")+": type specification of "+c+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof v+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),v instanceof Error&&!(v.message in r)){r[v.message]=!0;var l=h?h():"";e("Failed "+c+" type: "+v.message+(l??""))}}}}return s.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Vn=s,Vn}var Bn,ci;function Bh(){if(ci)return Bn;ci=1;var e=ri(),t=Wh(),r=Yn(),n=ii(),s=Vh(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(c){var u="Warning: "+c;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function i(){return null}return Bn=function(c,u){var h=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function v(k){var M=k&&(h&&k[h]||k[f]);if(typeof M=="function")return M}var P="<<anonymous>>",l={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:E(),arrayOf:V,element:R(),elementType:S(),instanceOf:$,node:se(),objectOf:q,oneOf:O,oneOfType:z,shape:re,exact:K};function d(k,M){return k===M?k!==0||1/k===1/M:k!==k&&M!==M}function b(k,M){this.message=k,this.data=M&&typeof M=="object"?M:{},this.stack=""}b.prototype=Error.prototype;function x(k){if(process.env.NODE_ENV!=="production")var M={},N=0;function _(J,H,U,Z,te,D,ie){if(Z=Z||P,D=D||U,ie!==r){if(u){var A=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw A.name="Invariant Violation",A}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ne=Z+":"+U;!M[Ne]&&N<3&&(o("You are manually calling a React.PropTypes validation function for the `"+D+"` prop on `"+Z+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),M[Ne]=!0,N++)}}return H[U]==null?J?H[U]===null?new b("The "+te+" `"+D+"` is marked as required "+("in `"+Z+"`, but its value is `null`.")):new b("The "+te+" `"+D+"` is marked as required in "+("`"+Z+"`, but its value is `undefined`.")):null:k(H,U,Z,te,D)}var W=_.bind(null,!1);return W.isRequired=_.bind(null,!0),W}function y(k){function M(N,_,W,J,H,U){var Z=N[_],te=C(Z);if(te!==k){var D=Q(Z);return new b("Invalid "+J+" `"+H+"` of type "+("`"+D+"` supplied to `"+W+"`, expected ")+("`"+k+"`."),{expectedType:k})}return null}return x(M)}function E(){return x(i)}function V(k){function M(N,_,W,J,H){if(typeof k!="function")return new b("Property `"+H+"` of component `"+W+"` has invalid PropType notation inside arrayOf.");var U=N[_];if(!Array.isArray(U)){var Z=C(U);return new b("Invalid "+J+" `"+H+"` of type "+("`"+Z+"` supplied to `"+W+"`, expected an array."))}for(var te=0;te<U.length;te++){var D=k(U,te,W,J,H+"["+te+"]",r);if(D instanceof Error)return D}return null}return x(M)}function R(){function k(M,N,_,W,J){var H=M[N];if(!c(H)){var U=C(H);return new b("Invalid "+W+" `"+J+"` of type "+("`"+U+"` supplied to `"+_+"`, expected a single ReactElement."))}return null}return x(k)}function S(){function k(M,N,_,W,J){var H=M[N];if(!e.isValidElementType(H)){var U=C(H);return new b("Invalid "+W+" `"+J+"` of type "+("`"+U+"` supplied to `"+_+"`, expected a single ReactElement type."))}return null}return x(k)}function $(k){function M(N,_,W,J,H){if(!(N[_]instanceof k)){var U=k.name||P,Z=he(N[_]);return new b("Invalid "+J+" `"+H+"` of type "+("`"+Z+"` supplied to `"+W+"`, expected ")+("instance of `"+U+"`."))}return null}return x(M)}function O(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),i;function M(N,_,W,J,H){for(var U=N[_],Z=0;Z<k.length;Z++)if(d(U,k[Z]))return null;var te=JSON.stringify(k,function(ie,A){var Ne=Q(A);return Ne==="symbol"?String(A):A});return new b("Invalid "+J+" `"+H+"` of value `"+String(U)+"` "+("supplied to `"+W+"`, expected one of "+te+"."))}return x(M)}function q(k){function M(N,_,W,J,H){if(typeof k!="function")return new b("Property `"+H+"` of component `"+W+"` has invalid PropType notation inside objectOf.");var U=N[_],Z=C(U);if(Z!=="object")return new b("Invalid "+J+" `"+H+"` of type "+("`"+Z+"` supplied to `"+W+"`, expected an object."));for(var te in U)if(n(U,te)){var D=k(U,te,W,J,H+"."+te,r);if(D instanceof Error)return D}return null}return x(M)}function z(k){if(!Array.isArray(k))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var M=0;M<k.length;M++){var N=k[M];if(typeof N!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+I(N)+" at index "+M+"."),i}function _(W,J,H,U,Z){for(var te=[],D=0;D<k.length;D++){var ie=k[D],A=ie(W,J,H,U,Z,r);if(A==null)return null;A.data&&n(A.data,"expectedType")&&te.push(A.data.expectedType)}var Ne=te.length>0?", expected one of type ["+te.join(", ")+"]":"";return new b("Invalid "+U+" `"+Z+"` supplied to "+("`"+H+"`"+Ne+"."))}return x(_)}function se(){function k(M,N,_,W,J){return L(M[N])?null:new b("Invalid "+W+" `"+J+"` supplied to "+("`"+_+"`, expected a ReactNode."))}return x(k)}function ae(k,M,N,_,W){return new b((k||"React class")+": "+M+" type `"+N+"."+_+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+W+"`.")}function re(k){function M(N,_,W,J,H){var U=N[_],Z=C(U);if(Z!=="object")return new b("Invalid "+J+" `"+H+"` of type `"+Z+"` "+("supplied to `"+W+"`, expected `object`."));for(var te in k){var D=k[te];if(typeof D!="function")return ae(W,J,H,te,Q(D));var ie=D(U,te,W,J,H+"."+te,r);if(ie)return ie}return null}return x(M)}function K(k){function M(N,_,W,J,H){var U=N[_],Z=C(U);if(Z!=="object")return new b("Invalid "+J+" `"+H+"` of type `"+Z+"` "+("supplied to `"+W+"`, expected `object`."));var te=t({},N[_],k);for(var D in te){var ie=k[D];if(n(k,D)&&typeof ie!="function")return ae(W,J,H,D,Q(ie));if(!ie)return new b("Invalid "+J+" `"+H+"` key `"+D+"` supplied to `"+W+"`.\nBad object: "+JSON.stringify(N[_],null," ")+`
86
- Valid keys: `+JSON.stringify(Object.keys(k),null," "));var A=ie(U,D,W,J,H+"."+D,r);if(A)return A}return null}return x(M)}function L(k){switch(typeof k){case"number":case"string":case"undefined":return!0;case"boolean":return!k;case"object":if(Array.isArray(k))return k.every(L);if(k===null||c(k))return!0;var M=v(k);if(M){var N=M.call(k),_;if(M!==k.entries){for(;!(_=N.next()).done;)if(!L(_.value))return!1}else for(;!(_=N.next()).done;){var W=_.value;if(W&&!L(W[1]))return!1}}else return!1;return!0;default:return!1}}function F(k,M){return k==="symbol"?!0:M?M["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&M instanceof Symbol:!1}function C(k){var M=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":F(M,k)?"symbol":M}function Q(k){if(typeof k>"u"||k===null)return""+k;var M=C(k);if(M==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return M}function I(k){var M=Q(k);switch(M){case"array":case"object":return"an "+M;case"boolean":case"date":case"regexp":return"a "+M;default:return M}}function he(k){return!k.constructor||!k.constructor.name?P:k.constructor.name}return l.checkPropTypes=s,l.resetWarningCache=s.resetWarningCache,l.PropTypes=l,l},Bn}var Un,ui;function Uh(){if(ui)return Un;ui=1;var e=Yn();function t(){}function r(){}return r.resetWarningCache=t,Un=function(){function n(i,c,u,h,f,v){if(v!==e){var P=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw P.name="Invariant Violation",P}}n.isRequired=n;function s(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:s,element:n,elementType:n,instanceOf:s,node:n,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o},Un}var li;function qh(){if(li)return zr.exports;if(li=1,process.env.NODE_ENV!=="production"){var e=ri(),t=!0;zr.exports=Bh()(e.isElement,t)}else zr.exports=Uh()();return zr.exports}var zh=qh();const ue=rn(zh),fi={disabled:!1};var Kh=process.env.NODE_ENV!=="production"?ue.oneOfType([ue.number,ue.shape({enter:ue.number,exit:ue.number,appear:ue.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&ue.oneOfType([ue.string,ue.shape({enter:ue.string,exit:ue.string,active:ue.string}),ue.shape({enter:ue.string,enterDone:ue.string,enterActive:ue.string,exit:ue.string,exitDone:ue.string,exitActive:ue.string})]);const di=p.createContext(null);var Zh=function(t){return t.scrollTop},Sr="unmounted",Ct="exited",Dt="entering",Bt="entered",qn="exiting",pt=function(e){$h(t,e);function t(n,s){var o;o=e.call(this,n,s)||this;var i=s,c=i&&!i.isMounting?n.enter:n.appear,u;return o.appearStatus=null,n.in?c?(u=Ct,o.appearStatus=Dt):u=Bt:n.unmountOnExit||n.mountOnEnter?u=Sr:u=Ct,o.state={status:u},o.nextCallback=null,o}t.getDerivedStateFromProps=function(s,o){var i=s.in;return i&&o.status===Sr?{status:Ct}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(s){var o=null;if(s!==this.props){var i=this.state.status;this.props.in?i!==Dt&&i!==Bt&&(o=Dt):(i===Dt||i===Bt)&&(o=qn)}this.updateStatus(!1,o)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var s=this.props.timeout,o,i,c;return o=i=c=s,s!=null&&typeof s!="number"&&(o=s.exit,i=s.enter,c=s.appear!==void 0?s.appear:i),{exit:o,enter:i,appear:c}},r.updateStatus=function(s,o){if(s===void 0&&(s=!1),o!==null)if(this.cancelNextCallback(),o===Dt){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Je.findDOMNode(this);i&&Zh(i)}this.performEnter(s)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ct&&this.setState({status:Sr})},r.performEnter=function(s){var o=this,i=this.props.enter,c=this.context?this.context.isMounting:s,u=this.props.nodeRef?[c]:[Je.findDOMNode(this),c],h=u[0],f=u[1],v=this.getTimeouts(),P=c?v.appear:v.enter;if(!s&&!i||fi.disabled){this.safeSetState({status:Bt},function(){o.props.onEntered(h)});return}this.props.onEnter(h,f),this.safeSetState({status:Dt},function(){o.props.onEntering(h,f),o.onTransitionEnd(P,function(){o.safeSetState({status:Bt},function(){o.props.onEntered(h,f)})})})},r.performExit=function(){var s=this,o=this.props.exit,i=this.getTimeouts(),c=this.props.nodeRef?void 0:Je.findDOMNode(this);if(!o||fi.disabled){this.safeSetState({status:Ct},function(){s.props.onExited(c)});return}this.props.onExit(c),this.safeSetState({status:qn},function(){s.props.onExiting(c),s.onTransitionEnd(i.exit,function(){s.safeSetState({status:Ct},function(){s.props.onExited(c)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(s,o){o=this.setNextCallback(o),this.setState(s,o)},r.setNextCallback=function(s){var o=this,i=!0;return this.nextCallback=function(c){i&&(i=!1,o.nextCallback=null,s(c))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},r.onTransitionEnd=function(s,o){this.setNextCallback(o);var i=this.props.nodeRef?this.props.nodeRef.current:Je.findDOMNode(this),c=s==null&&!this.props.addEndListener;if(!i||c){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],h=u[0],f=u[1];this.props.addEndListener(h,f)}s!=null&&setTimeout(this.nextCallback,s)},r.render=function(){var s=this.state.status;if(s===Sr)return null;var o=this.props,i=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var c=Fh(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return p.createElement(di.Provider,{value:null},typeof i=="function"?i(s,c):p.cloneElement(p.Children.only(i),c))},t}(p.Component);pt.contextType=di,pt.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:ue.shape({current:typeof Element>"u"?ue.any:function(e,t,r,n,s,o){var i=e[t];return ue.instanceOf(i&&"ownerDocument"in i?i.ownerDocument.defaultView.Element:Element)(e,t,r,n,s,o)}}),children:ue.oneOfType([ue.func.isRequired,ue.element.isRequired]).isRequired,in:ue.bool,mountOnEnter:ue.bool,unmountOnExit:ue.bool,appear:ue.bool,enter:ue.bool,exit:ue.bool,timeout:function(t){var r=Kh;t.addEndListener||(r=r.isRequired);for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];return r.apply(void 0,[t].concat(s))},addEndListener:ue.func,onEnter:ue.func,onEntering:ue.func,onEntered:ue.func,onExit:ue.func,onExiting:ue.func,onExited:ue.func}:{};function Ut(){}pt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ut,onEntering:Ut,onEntered:Ut,onExit:Ut,onExiting:Ut,onExited:Ut},pt.UNMOUNTED=Sr,pt.EXITED=Ct,pt.ENTERING=Dt,pt.ENTERED=Bt,pt.EXITING=qn;const hi=({start:e,timeout:t=400,defaultStyle:r,transitionStyles:n,showTransitionOptions:s="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:o="linear",unmountOnExit:i=!1,onEntering:c,onEntered:u,onExit:h,onExited:f,children:v})=>{const P=r||{transition:`opacity ${t}ms ${s}`,opacity:0},l=n||{entering:{opacity:1},entered:{opacity:1},exiting:{transition:`opacity ${t}ms ${o}`,opacity:0},exited:{transition:`opacity ${t}ms ${o}`,opacity:0},unmounted:{}};return g.jsx(pt,{in:e,timeout:t,onEntering:c,onEntered:u,onExit:h,onExited:f,unmountOnExit:i,children:d=>v({state:d,defaultStyle:P,transitionStyles:l})})};function pi(e){return e.target?e.target:e}const mi=({visible:e,target:t,appendTo:r=document.body,unmountWhenHidden:n=!1,transitionDuration:s=400,showTransitionOptions:o="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:i="linear",approveText:c="DONE",shown:u,hidden:h,isClickedWithin:f,children:v})=>{const[P,l]=p.useState(-1),[d,b]=p.useState(-1),[x,y]=p.useState(e),E=p.useRef(100),V=p.useRef(101),R=p.useRef(),S=p.useRef(),$=p.useRef();p.useEffect(()=>{t&&(R.current=pi(t));const K=Ko("zIndex",L=>L==="auto"||L==="-1"?!1:parseInt(L)>100).map(L=>parseInt(L,10));K.length>0&&(E.current=Math.max(...K)+1,V.current=Math.max(...K)+2),y(e)},[e,t]);const O=K=>{S.current=K},q=()=>{b(E.current),l(V.current)},z=()=>{if(!S.current)return;u==null||u();let K;R.current&&(K=[R.current]);const L=F=>{F?f==null||f():y(!1)};$.current=Qo(S.current,L,K)},se=()=>{$.current&&Xo($.current)},ae=()=>{b(-1),l(-1),h==null||h()},re={entering:{opacity:.5},entered:{opacity:.5}};return Je.createPortal(g.jsx(hi,{start:x,timeout:s,showTransitionOptions:o,hideTransitionOptions:i,onEntering:q,onEntered:z,onExit:se,onExited:ae,unmountOnExit:n,children:({state:K,defaultStyle:L,transitionStyles:F})=>g.jsxs("div",{ref:C=>C&&O(C),children:[g.jsx("div",{className:"bsc:fixed bsc:left-0 bsc:top-0 bsc:h-full bsc:w-full bsc:bg-mono-dark-1",style:{zIndex:d,...F[K],...re[K]}}),g.jsxs("div",{className:"dark:bsck-border-mono-light-1 bsc:fixed bsc:bottom-0 bsc:left-0 bsc:w-full bsc:bg-white bsc:dark:border-t bsc:dark:border-solid bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1",style:{zIndex:P,...L,...F[K]},children:[g.jsx("div",{className:"bsc:w-full",children:v}),g.jsx(g.Fragment,{children:g.jsx(et,{buttonType:"primary",fullWidth:!0,onClick:()=>y(!1),className:"bsc:text-xs bsc:font-bold",children:c})})]})]})}),r)};var gi=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(gi||{}),bi=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(bi||{});class ke{static positionToTarget(t,r=2){const n=t.getBoundingClientRect();let s=0,o=0;const i=window.scrollY;switch(r){case 2:s=n.top+n.height+i,o=n.left;break;case 0:s=n.top+i,o=n.left;break;case 3:s=n.top+n.height+i,o=n.left+n.width;break;case 1:s=n.top+i,o=n.left+n.width}return{top:s,left:o}}static positionElementToTarget(t,r,n=0,s=2){let{left:o,top:i}=ke.positionToTarget(r,s);const c=t.getBoundingClientRect();switch(n){case 0:break;case 1:o=o-c.width;break;case 2:i=i-c.height;break;case 3:i=i-c.height,o=o-c.width;break}return{top:i,left:o}}static canPositionElementOnScreenWithTarget(t,r){const n=ke.getScreenDimensions(),s=t.getBoundingClientRect(),o=ke.positionElementToTarget(t,r,0,2);if(o.left+s.width<n.width&&o.top+s.height<n.height||ke.positionElementToTarget(t,r,1,3).left>=0&&o.top+s.height<n.height)return!0;const c=ke.positionElementToTarget(t,r,2,0);if(c.left+s.width<n.width&&c.top>=0)return!0;const u=ke.positionElementToTarget(t,r,3,1);return u.left>=0&&u.top>=0}static canPositionElementOnScreen(t){const r=ke.getScreenDimensions(),n=t.getBoundingClientRect();return n.width<=r.width&&n.height<=r.height}static positionElementToTargetOnScreen(t,r,n=0,s=2){const{left:o,top:i}=ke.positionElementToTarget(t,r,n,s),c=t.getBoundingClientRect(),u=ke.determineOffScreenLocation(c);if(u){if(n===0&&s===2){if(u.right&&!u.bottom)return ke.positionElementToTarget(t,r,1,3);if(u.bottom&&!u.right)return ke.positionElementToTarget(t,r,2,0);if(u.right&&u.bottom)return ke.positionElementToTarget(t,r,3,1)}else if(n===1&&s===3){if(u.left&&!u.bottom)return ke.positionElementToTarget(t,r,0,2);if(u.bottom&&!u.left)return ke.positionElementToTarget(t,r,3,1);if(u.left&&u.bottom)return ke.positionElementToTarget(t,r,2,0)}}return{top:i,left:o}}static determineOffScreenLocation(t){const r=ke.getScreenDimensions(),n={left:t.left<0,top:t.top<0,right:t.left+t.width>r.width,bottom:t.top+t.height>r.height};return n.left||n.top||n.right||n.bottom?n:void 0}static getScreenDimensions(){return{width:window.innerWidth,height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}}}const yi=({visible:e,target:t,targetPosition:r=gi.BottomLeft,elementAlignment:n=bi.TopLeft,shouldTargetCloseOverlay:s=!0,shouldMatchTargetWidth:o=!1,shouldScrollCloseOverlay:i=!1,shouldCheckZIndex:c=!1,shouldRemainOnScreen:u=!1,unmountWhenHidden:h=!1,transitionDuration:f=400,showTransitionOptions:v="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:P="linear",shown:l,hidden:d,isClickedWithin:b,markupCreated:x,children:y})=>{const[E,V]=p.useState(-1),[R,S]=p.useState(e),[$,O]=p.useState(!1),q=p.useRef(!1),z=p.useRef(100),se=p.useRef({left:0,top:0,width:0}),ae=p.useRef(),re=p.useRef(),K=p.useRef(),L=p.useRef(),F=p.useRef(),C=p.useRef(),Q=cs();p.useEffect(()=>(u===!0&&(C.current=new ResizeObserver(I)),()=>{var H,U;u===!0&&(re.current&&((H=C.current)==null||H.unobserve(re.current)),(U=C.current)==null||U.disconnect())}),[]),p.useEffect(()=>{if(t&&(ae.current=pi(t),i)){const H=Q==null?void 0:Q.isValidScrollableElement;K.current=zo(ae.current,{overflow:"scroll, auto",overflowX:"scroll, auto",overflowY:"scroll, auto"},!1,H),K.current.tagName.toLowerCase()==="html"&&(K.current=document)}if(c){const H=Ko("zIndex",U=>parseInt(U)>=100).map(U=>parseInt(U));H.length>0&&(z.current=Math.max(...H)+1)}e!==void 0&&S(e)},[t,e,i,c]);const I=H=>{if(re.current){const U=ke.getScreenDimensions(),Z=H[H.length-1].target,te=Z.getBoundingClientRect(),D=ke.determineOffScreenLocation(te);if(D){if(ae.current&&ke.canPositionElementOnScreenWithTarget(Z,ae.current)){const ie=ke.positionElementToTargetOnScreen(re.current,ae.current,n,r);se.current={...se.current,...ie}}else D.right?se.current.left=U.width-te.width:D.left&&(se.current.left=0),D.bottom?se.current.top=U.height-te.height:D.top&&(se.current.top=0);he()}}},he=yr(()=>{q.current=!q.current,O(q.current)},20),k=()=>{V(z.current)},M=()=>{if(!re.current)return;l==null||l();let H;!s&&ae.current&&(H=[ae.current]);const U=Z=>{Z?b==null||b():S(!1)};L.current=Qo(re.current,U,H),i&&(F.current=of(Z=>re.current&&Ph(Z,re.current)&&S(!1),100,{leading:!0}),K.current&&K.current.addEventListener("scroll",F.current))},N=()=>{K.current&&F.current&&(K.current.removeEventListener("scroll",F.current),F.current=void 0),L.current&&Xo(L.current)},_=()=>{V(-1),d==null||d()},W=H=>{var U,Z;if(u===!0&&re.current&&((U=C.current)==null||U.unobserve(re.current)),re.current=H,x==null||x(H),ae.current){const te=ke.positionElementToTarget(re.current,ae.current,n,r);se.current={...te,width:ae.current.offsetWidth},u===!0&&(ke.canPositionElementOnScreenWithTarget(re.current,ae.current)||ke.canPositionElementOnScreen(re.current))&&((Z=C.current)==null||Z.observe(re.current))}},J=p.useMemo(()=>{const H={top:`${se.current.top}px`,left:`${se.current.left}px`,zIndex:E};return o&&(H.width=`${se.current.width}px`),H},[$,E,o]);return g.jsx(hi,{start:R,timeout:f,showTransitionOptions:v,hideTransitionOptions:P,onEntering:k,onEntered:M,onExit:N,onExited:_,unmountOnExit:h,children:({state:H,defaultStyle:U,transitionStyles:Z})=>g.jsx("div",{className:"bsc:fixed bsc:border! bsc:border-solid! bsc:border-black bsc:bg-white bsc:shadow bsc:dark:border-mono-light-1 bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1",style:{...J,...U,...Z[H]},ref:te=>te&&W(te),children:y})})};let Zr;const Gh=new Uint8Array(16);function Qh(){if(!Zr&&(Zr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Zr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Zr(Gh)}const Fe=[];for(let e=0;e<256;++e)Fe.push((e+256).toString(16).slice(1));function Xh(e,t=0){return Fe[e[t+0]]+Fe[e[t+1]]+Fe[e[t+2]]+Fe[e[t+3]]+"-"+Fe[e[t+4]]+Fe[e[t+5]]+"-"+Fe[e[t+6]]+Fe[e[t+7]]+"-"+Fe[e[t+8]]+Fe[e[t+9]]+"-"+Fe[e[t+10]]+Fe[e[t+11]]+Fe[e[t+12]]+Fe[e[t+13]]+Fe[e[t+14]]+Fe[e[t+15]]}const vi={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Jh(e,t,r){if(vi.randomUUID&&!e)return vi.randomUUID();e=e||{};const n=e.random||(e.rng||Qh)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Xh(n)}class Er{static create(t){const r=[];let n=0;for(let s=0,o=t.formatParts.length;s<o;s++){const i=t.formatParts[s],c=n,u=c+i.characterCount;r.push({startPosition:c,endPosition:u,...i}),n=u}return r}}class ep{constructor(t,r){T(this,"instanceCollection");T(this,"formatPartList");T(this,"inputSlotCollection");T(this,"currentPartIndex",0);T(this,"currentPartIndices",[]);T(this,"currentCursorPosition",0);T(this,"highlightCursorPosition",0);T(this,"currentCursorStartPosition",-1);T(this,"currentCursorEndPosition",-1);T(this,"inputElement");T(this,"inputSelection",null);T(this,"inputRange");T(this,"textNode");this.instanceCollection=qt.getInstance(),this.formatPartList=Er.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t)}get isSelection(){return this.inputRange!==void 0&&this.inputRange.startOffset!==this.inputRange.endOffset}get isAllSelected(){var r;const t=this.inputSlotCollection.getLastSlot();return this.isSelection&&((r=this.inputRange)==null?void 0:r.startOffset)===0&&this.inputRange.endOffset===t.endPosition}getCursorPosition(){return this.currentCursorPosition}getCursorStartPosition(){return this.currentCursorStartPosition}getCursorEndPosition(){return this.currentCursorEndPosition}getCurrentPartIndex(){return this.currentPartIndex}getCurrentPartIndices(){return this.currentPartIndices}setInputElement(t){this.inputElement=t}setCursorToCurrentPosition(){this.setCursorSelection(this.currentCursorPosition>-1?this.currentCursorPosition:this.highlightCursorPosition)}setCursorPosition(t){this.setCursorSelection(t)}setCursorSelection(t,r){if(this.createInputRangeSelection(),this.inputRange&&this.textNode){let n,s,o=!0;r===void 0?(n=t,s=t):t<r?(n=t,s=r):(o=!1,n=r,s=t),this.inputRange.setStart(this.textNode,n),this.inputRange.setEnd(this.textNode,s),this.currentPartIndices=[],n===s?(this.currentCursorPosition=s,this.highlightCursorPosition=s,this.currentCursorStartPosition=-1,this.currentCursorEndPosition=-1,this.setPartIndexByCursorPosition()):(o?this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=s:this.currentCursorStartPosition!==n?this.highlightCursorPosition=n:this.currentCursorEndPosition!==s&&(this.highlightCursorPosition=s):this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=n:this.currentCursorStartPosition!==s?this.highlightCursorPosition=s:this.currentCursorEndPosition!==n&&(this.highlightCursorPosition=n),this.currentCursorStartPosition=n,this.currentCursorEndPosition=s,this.currentCursorPosition=-1,this.setPartIndexByHighlightPosition(),this.setPartIndicesByCursorPositions())}}findCursorPosition(){var n;const t=window.getSelection(),r=t==null?void 0:t.getRangeAt(0);if(this.inputElement&&t&&r){const s=document.createTreeWalker(this.inputElement,NodeFilter.SHOW_TEXT,u=>{const h=document.createRange();return h.selectNodeContents(u),h.compareBoundaryPoints(Range.END_TO_END,r)<1?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let o=0;for(;s.nextNode();)o+=((n=s.currentNode.textContent)==null?void 0:n.length)||0;r.startContainer.nodeType===Node.TEXT_NODE&&(o+=r.startOffset);const i=this.inputSlotCollection.getLastSlotWithData(),c=i.startPosition+i.partText.length;t.anchorOffset===t.focusOffset?this.setCursorSelection(o>c?c:o):this.setCursorSelection(t.anchorOffset,t.focusOffset)}}isAtLastPart(){return this.currentPartIndex===this.formatPartList.length-1}moveHome(){const t=this.inputSlotCollection.getFirstSlot();this.setCursorSelection(t.startPosition)}moveEnd(){const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length;this.setCursorSelection(r)}moveCursorLeft(){if(this.updateCursorPosition(),this.currentCursorPosition>0&&!this.isSelection){const t=this.currentCursorPosition-1;let r=this.formatPartList[this.currentPartIndex];if(t>=r.startPosition&&t<=r.endPosition)this.setCursorSelection(t);else for(let n=this.currentPartIndex-1;n>=0;n--)if(r=this.formatPartList[n],t>=r.startPosition&&t<=r.endPosition){r.isSeparator?this.setCursorSelection(this.formatPartList[n-1].endPosition):this.setCursorSelection(t);break}}else this.isSelection?this.setCursorSelection(this.currentCursorPosition):this.moveHome()}moveCursorRight(){this.updateCursorPosition(!1);const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length;if(this.currentCursorPosition<r&&!this.isSelection){const n=this.currentCursorPosition+1;let s=this.formatPartList[this.currentPartIndex];if(n>=s.startPosition&&n<=s.endPosition)this.setCursorSelection(n);else for(let o=this.currentPartIndex+1,i=this.formatPartList.length;o<i;o++)if(s=this.formatPartList[o],n>=s.startPosition&&n<=s.endPosition){s.isSeparator?this.setCursorSelection(this.formatPartList[o+1].startPosition):this.setCursorSelection(n);break}}else this.setCursorSelection(this.currentCursorPosition)}moveToNextInputPart(){if(this.currentPartIndex<this.formatPartList.length-1){const t=this.findNextEditablePart();t&&(this.currentPartIndex=t.partIndex,this.setCursorSelection(t.startPosition))}}moveToPreviousInputPart(){if(this.currentPartIndex>0){const t=this.findPreviousEditablePart();t&&(this.currentPartIndex=t.partIndex,this.setCursorSelection(t.endPosition))}}highlightAll(){const t=this.formatPartList[this.formatPartList.length-1].endPosition;this.setCursorSelection(0,t)}moveHighlightLeft(){this.updateHighlightPositions();const t=this.highlightCursorPosition>this.currentCursorStartPosition;if(this.currentCursorStartPosition>0||t){let r=t?this.currentCursorStartPosition:this.currentCursorStartPosition-1,n=t?this.highlightCursorPosition-1:this.currentCursorEndPosition,s=this.formatPartList[this.currentPartIndex];if(r>=s.startPosition&&r<=s.endPosition||t&&n>=s.startPosition&&n<=s.endPosition)this.setCursorSelection(r,n);else for(let o=this.currentPartIndex-1;o>=0;o--)if(s=this.formatPartList[o],r>=s.startPosition&&r<=s.endPosition||t&&n>=s.startPosition&&n<=s.endPosition){s.isSeparator?(t?n=this.formatPartList[o-1].endPosition:r=this.formatPartList[o-1].endPosition,this.setCursorSelection(r,n)):this.setCursorSelection(r,n);break}}}moveHighlightRight(){this.updateHighlightPositions();const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length,n=this.highlightCursorPosition<this.currentCursorEndPosition;if(this.currentCursorEndPosition<r||n){let s=n?this.highlightCursorPosition+1:this.currentCursorStartPosition,o=n?this.currentCursorEndPosition:this.currentCursorEndPosition+1,i=this.formatPartList[this.currentPartIndex];if(o>=i.startPosition&&o<=i.endPosition||n&&s>=i.startPosition&&s<=i.endPosition)this.setCursorSelection(s,o);else for(let c=this.currentPartIndex+1,u=this.formatPartList.length;c<u;c++)if(i=this.formatPartList[c],o>=i.startPosition&&o<=i.endPosition||n&&s>=i.startPosition&&s<=i.endPosition){i.isSeparator?(n?s=this.formatPartList[c+1].startPosition:o=this.formatPartList[c+1].startPosition,this.setCursorSelection(s,o)):this.setCursorSelection(s,o);break}}}updateHighlightPositions(){this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1&&this.currentCursorPosition>-1&&(this.currentCursorStartPosition=this.currentCursorPosition,this.currentCursorEndPosition=this.currentCursorPosition,this.highlightCursorPosition=this.currentCursorPosition)}updateCursorPosition(t=!0){this.currentCursorPosition===-1&&this.currentCursorStartPosition>-1&&this.currentCursorEndPosition>-1&&(t?this.currentCursorPosition=this.currentCursorStartPosition:this.currentCursorPosition=this.currentCursorEndPosition)}findNextEditablePart(){return this.inputSlotCollection.getNextSlot(this.currentPartIndex)}findPreviousEditablePart(){return this.inputSlotCollection.getPreviousSlot(this.currentPartIndex)}setPartIndexByCursorPosition(){for(let t=0;t<this.formatPartList.length;t++){const r=this.formatPartList[t];if(this.currentCursorPosition>=r.startPosition&&this.currentCursorPosition<=r.endPosition){if(r.isSeparator){this.currentCursorPosition=this.formatPartList[t+1].startPosition,this.currentPartIndex=t+1;break}this.currentPartIndex=t;break}}}setPartIndexByHighlightPosition(){for(let t=0;t<this.formatPartList.length;t++){const r=this.formatPartList[t];if(this.highlightCursorPosition>=r.startPosition&&this.highlightCursorPosition<=r.endPosition){if(r.isSeparator){this.highlightCursorPosition=this.formatPartList[t+1].startPosition,this.currentPartIndex=t+1;break}this.currentPartIndex=t;break}}}setPartIndicesByCursorPositions(){for(let t=0,r=this.formatPartList.length;t<r;t++){const n=this.formatPartList[t];n.isSeparator||(n.startPosition>=this.currentCursorStartPosition&&n.startPosition<=this.currentCursorEndPosition||n.endPosition>=this.currentCursorStartPosition&&n.endPosition<=this.currentCursorEndPosition||n.startPosition<this.currentCursorStartPosition&&n.endPosition>this.currentCursorEndPosition)&&this.currentPartIndices.push(t)}}createInputRangeSelection(){var t,r;this.inputElement&&(this.inputSelection=window.getSelection(),this.inputRange=document.createRange(),(t=this.inputSelection)==null||t.removeAllRanges(),this.inputRange.selectNodeContents(this.inputElement),this.inputRange.collapse(!0),(r=this.inputSelection)==null||r.addRange(this.inputRange),this.inputElement.firstChild&&(this.textNode=this.inputElement.firstChild))}}class tp{static create(t){const r=[];for(let n=0,s=t.length;n<s;n++){const o=t[n];o.isSeparator||r.push({partIndex:n,partText:"",isComplete:!1,...o})}return r}}class rp{constructor(t){T(this,"inputSlots");this.inputSlots=tp.create(Er.create(t))}clearAllSlots(){for(let t=0,r=this.inputSlots.length;t<r;t++)this.inputSlots[t].partText=""}getSlot(t){return this.inputSlots.find(r=>r.partIndex===t)}getSlots(t){return this.inputSlots.filter(r=>t.includes(r.partIndex))}getSlotsFromCursorPosition(t){let r=-1;for(let n=0,s=this.inputSlots.length;n<s;n++){const o=this.inputSlots[n];if(t>=o.startPosition&&t<=o.endPosition){r=o.partIndex;break}}return r>-1?this.inputSlots.filter(n=>n.partIndex>=r):void 0}getFirstSlot(){return this.inputSlots[0]}getLastSlot(){return this.inputSlots[this.inputSlots.length-1]}getNextSlot(t){const r=this.inputSlots.findIndex(n=>n.partIndex===t);if(r>-1&&r+1<this.inputSlots.length)return this.inputSlots[r+1]}getPreviousSlot(t){const r=this.inputSlots.findIndex(n=>n.partIndex===t);if(r>-1&&r-1>=0)return this.inputSlots[r-1]}getLastSlotWithData(){const t=this.inputSlots.findIndex(n=>!n.isComplete);let r=t;for(let n=t+1,s=this.inputSlots.length;n<s;n++)this.inputSlots[n].partText.length>0&&(r=n);return this.inputSlots[r>-1?r:0]}allSlotsCompleted(){return this.inputSlots.every(t=>t.isComplete)}allSlotsEmpty(){return this.inputSlots.every(t=>t.partText.length===0)}}class qt{static getInstance(){return this.instance||(this.instance=new np),this.instance}}T(qt,"instance");class np{constructor(){T(this,"navigatorInstances");T(this,"inputSlotInstances");this.navigatorInstances={},this.inputSlotInstances={}}getNavigatorInstance(t,r){return this.navigatorInstances[t]||(this.navigatorInstances[t]=new ep(r,t)),this.navigatorInstances[t]}getInputSlotInstance(t,r){return this.inputSlotInstances[t]||(this.inputSlotInstances[t]=new rp(r)),this.inputSlotInstances[t]}removeInstances(t){this.navigatorInstances[t]&&delete this.navigatorInstances[t],this.inputSlotInstances[t]&&delete this.inputSlotInstances[t]}}class zn{constructor(t,r){T(this,"instanceCollection");T(this,"formatPartList");T(this,"inputSlotCollection");T(this,"inputElement");this.instanceCollection=qt.getInstance(),this.formatPartList=Er.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t)}setInputElement(t){this.inputElement=t}render(){var r;let t="";for(let n=0,s=this.formatPartList.length;n<s;n++){const o=this.formatPartList[n];if(o.isSeparator)t+=o.inputText;else{const i=this.inputSlotCollection.getSlot(n);i&&(t+=i.partText+((r=i.inputText)==null?void 0:r.repeat(i.characterCount-i.partText.length)))}}this.inputElement&&(this.inputElement.innerHTML=t)}}var st=(e=>(e[e.Text=0]="Text",e[e.Numeric=1]="Numeric",e))(st||{});class xi{constructor(){T(this,"numberKeys",["0","1","2","3","4","5","6","7","8","9"]);T(this,"movementKeys",["ArrowLeft","ArrowRight","Home","End","a"]);T(this,"editingKeys",["Backspace","Delete"]);T(this,"ignoreKeys",["Shift","Alt","Control","Fn","Meta"])}isNumberKey(t){return this.numberKeys.includes(t)}isMovementKey(t){return this.movementKeys.includes(t.key)}isEditingKey(t){return this.editingKeys.includes(t.key)}isIgnoreKey(t){return this.ignoreKeys.includes(t.key)}}class sp{constructor(t){T(this,"_currentIndex",0);T(this,"index",0);T(this,"formatParts");this.formatParts=Er.create(t)}get currentIndex(){return this._currentIndex}hasNext(){return this.index<this.formatParts.length}next(){if(this.index<this.formatParts.length)return this._currentIndex=this.index++,this.formatParts[this._currentIndex]}peek(){if(this.index<this.formatParts.length)return this.formatParts[this.index]}reset(){this.index=0}}class op{constructor(t){T(this,"formatParts");this.formatParts=Er.create(t)}getUniqueSeparators(){const t=[],r=this.formatParts.filter(n=>n.isSeparator);for(let n=0,s=r.length;n<s;n++){const o=r[n];o.inputText&&!t.includes(o.inputText)&&t.push(o.inputText)}return t}}class wi{constructor(t,r){T(this,"instanceCollection");T(this,"inputSlotCollection");T(this,"formatNavigator");T(this,"keyTypeChecker");T(this,"formatRenderer");T(this,"formatPartList");T(this,"partEntryList");this.format=t,this.instanceCollection=qt.getInstance(),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.keyTypeChecker=new xi,this.formatRenderer=new zn(t,r),this.formatPartList=new sp(t),this.partEntryList=new op(t)}setInputElement(t){this.formatRenderer.setInputElement(t)}processKeyPress(t){if(this.keyTypeChecker.isEditingKey(t)){this.processEditRules(t);return}this.formatNavigator.isSelection?(this.processSelectionEditRules(),setTimeout(()=>this.processInputRules(t))):this.processInputRules(t)}processInputValue(t){var n;this.inputSlotCollection.clearAllSlots(),this.formatPartList.reset();let r=0;for(;this.formatPartList.hasNext();){const s=this.formatPartList.next();if(s&&!s.isSeparator)if(((n=this.formatPartList.peek())==null?void 0:n.isSeparator)===!0){const o=this.formatPartList.currentIndex,i=this.formatPartList.next();if(i&&i.inputText){const c=t.indexOf(i.inputText,r),u=this.inputSlotCollection.getSlot(o);if(u&&c>-1){const h=c-r>u.characterCount?r+u.characterCount:c;u.partText=t.substring(r,h),this.processSlotRules(u),r=c+i.characterCount}}}else{const o=this.inputSlotCollection.getSlot(this.formatPartList.currentIndex);o&&(o.partText=t.substring(r,r+o.characterCount),this.processSlotRules(o))}}}processPastedValue(t,r=!1){r&&this.processSelectionEditRules();const n=this.formatNavigator.getCursorPosition(),s=this.inputSlotCollection.getSlotsFromCursorPosition(n);if(s){const o=n-s[0].startPosition,i=s[0].partText.substring(0,o);let c=s[0].partText.substring(o);s[0].partText="";for(let v=1,P=s.length;v<P;v++)c+=s[v].partText,s[v].partText="";const u=this.removeSeparatorsFromValue(t),h=i+u+c;let f=0;for(let v=0,P=s.length;v<P;v++){const l=s[v];l.partText=h.substring(f,l.characterCount+f),f+=l.characterCount,this.processSlotRules(l)}}}removeSeparatorsFromValue(t){let r=t;const n=this.partEntryList.getUniqueSeparators();for(let s=0,o=n.length;s<o;s++){const i=n[s];r=r.replaceAll(i,"")}return r}processEditRules(t){this.formatNavigator.isSelection?this.processSelectionEditRules():this.processNonSelectionEditRules(t)}processNonSelectionEditRules(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const n=this.formatNavigator.getCursorPosition(),s=n-r.startPosition,o=this.format.deleteShiftsFormatPart||!1;switch(t.key){case"Backspace":{if(!(r.startPosition===n))r.partText=r.partText.substring(0,s-1)+r.partText.substring(s),o&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.moveCursorLeft(),this.processSlotRules(r,!0);else{this.processSlotRules(r,!0);const c=this.inputSlotCollection.getPreviousSlot(r.partIndex);c&&(c.partText=c.partText.substring(0,c.partText.length-1),o&&this.shiftFormatParts(c),this.formatRenderer.render(),this.formatNavigator.setCursorPosition(c.startPosition+c.partText.length),this.processSlotRules(c,!0))}break}case"Delete":r.partText=r.partText.substring(0,s)+r.partText.substring(s+1),o&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.setCursorToCurrentPosition(),this.processSlotRules(r,!0);break}}processSelectionEditRules(){const t=this.inputSlotCollection.getSlots(this.formatNavigator.getCurrentPartIndices());if(t.length<=0)return;const r=this.formatNavigator.getCursorStartPosition(),n=this.formatNavigator.getCursorEndPosition();for(let s=0,o=t.length;s<o;s++){const i=t[s];i.startPosition>=r&&i.endPosition<=n?i.partText="":i.startPosition>=r&&i.endPosition>n?i.partText=i.partText.substring(n-i.startPosition):i.startPosition<r&&i.endPosition<=n?i.partText=i.partText.substring(0,r-i.startPosition):i.startPosition<r&&i.endPosition>n&&(i.partText=i.partText.substring(0,r-i.startPosition)+i.partText.substring(n-i.startPosition))}this.formatRenderer.render(),this.formatNavigator.setCursorPosition(r);for(let s=0,o=t.length;s<o;s++)this.processSlotRules(t[s])}shiftFormatParts(t){let r=t,n;for(;(n=this.inputSlotCollection.getNextSlot(r.partIndex))!==void 0;){const s=n.partText.substring(0,1);n.partText=n.partText.substring(1),r.partText=r.partText+s,r=n}}processInputRules(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const{key:n}=t,s=r.characterCount,o=r.partText;if(r.valueType===st.Numeric){if(!this.keyTypeChecker.isNumberKey(n))return;const i=r.maximumValue,c=r.exceedingMaximumValueCausesTab||!1,u=r.padWithZeros||!1,h=parseInt(this.createNewValue(r,n));if(i&&h>i)if(c){u&&(r.partText=r.partText.padStart(s,"0")),r.isComplete=!0;const f=this.inputSlotCollection.getNextSlot(r.partIndex);f&&!f.isComplete&&(f.partText=n),this.formatRenderer.render(),f&&this.formatNavigator.setCursorPosition(f.isComplete?f.startPosition:f.startPosition+1)}else return;else o.length+1===s?(this.addToInputSlot(n),r.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):o.length+1<s&&(this.addToInputSlot(n),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}else o.length+1===s?(this.addToInputSlot(n),r.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):(this.addToInputSlot(n),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}addToInputSlot(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());r&&(r.partText=this.createNewValue(r,t))}createNewValue(t,r){const n=t.partText,s=this.formatNavigator.getCursorPosition();if(s>=t.startPosition+t.partText.length)return n+r;{const o=s-t.startPosition;return n.substring(0,o)+r+n.substring(o)}}processSlotRules(t,r=!1){const n=t.characterCount,s=t.allCharactersRequired||!1;if(t.valueType===st.Numeric){const o=t.minimumValue,i=t.maximumValue;if(s)t.isComplete=t.partText.length===n;else if(o!==void 0&&i!==void 0){const c=t.padWithZeros||!1,u=parseInt(t.partText);t.isComplete=u>=o&&u<=i,t.isComplete&&c&&!r&&(t.partText=t.partText.padStart(n,"0"))}else t.isComplete=t.partText.length>0}else s?t.isComplete=t.partText.length===n:t.isComplete=t.partText.length>0}}class ip{constructor(t,r){T(this,"instanceCollection");T(this,"formatNavigator");T(this,"ruleProcessor");T(this,"keyTypeChecker");T(this,"formatRenderer");this.format=t,this.instanceCollection=qt.getInstance(),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.ruleProcessor=new wi(t,r),this.keyTypeChecker=new xi,this.formatRenderer=new zn(t,r)}setInputElement(t){this.ruleProcessor.setInputElement(t),this.formatRenderer.setInputElement(t)}processMovementKey(t){const{key:r,metaKey:n,ctrlKey:s,shiftKey:o}=t;switch(r){case"ArrowLeft":o?this.formatNavigator.moveHighlightLeft():n?this.formatNavigator.moveHome():this.formatNavigator.moveCursorLeft();break;case"ArrowRight":o?this.formatNavigator.moveHighlightRight():n?this.formatNavigator.moveEnd():this.formatNavigator.moveCursorRight();break;case"Home":this.formatNavigator.moveHome();break;case"End":this.formatNavigator.moveEnd();break;case"a":(n||s)&&this.formatNavigator.highlightAll();break}}processKeyPress(t){return this.keyTypeChecker.isIgnoreKey(t)?!1:this.keyTypeChecker.isMovementKey(t)?(this.processMovementKey(t),!1):(this.ruleProcessor.processKeyPress(t),!0)}}class ap{constructor(t,r=""){T(this,"instanceId");T(this,"instanceCollection");T(this,"keyProcessor");T(this,"formatNavigator");T(this,"formatRenderer");T(this,"inputSlotCollection");T(this,"inputRuleProcessor");T(this,"previousOutputValue","");T(this,"inputElementSet",!1);T(this,"isInputFocused",!1);T(this,"inputElement");T(this,"onFormatChange");this.inputValue=r,this.instanceId=Jh(),this.instanceCollection=qt.getInstance(),this.keyProcessor=new ip(t,this.instanceId),this.formatNavigator=this.instanceCollection.getNavigatorInstance(this.instanceId,t),this.formatRenderer=new zn(t,this.instanceId),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(this.instanceId,t),this.inputRuleProcessor=new wi(t,this.instanceId)}inputElementCreated(t){this.keyProcessor.setInputElement(t),this.formatNavigator.setInputElement(t),this.formatRenderer.setInputElement(t),this.inputElement=t,this.inputElementSet=!0,this.inputElementSet&&this.inputValue.length>0&&this.inputValuePassed(this.inputValue)}inputFocused(){this.isInputFocused=!0,this.formatRenderer.render(),setTimeout(()=>this.formatNavigator.findCursorPosition())}inputBlurred(){this.isInputFocused=!1}inputValuePassed(t){this.inputValue=t,this.inputElementSet&&(this.inputValue.length>0?this.inputRuleProcessor.processInputValue(t):(this.inputSlotCollection.clearAllSlots(),this.previousOutputValue=void 0),this.renderFormat())}pastedValue(t){t.length>0&&(this.formatNavigator.isSelection?this.formatNavigator.isAllSelected?this.inputValuePassed(t):this.inputRuleProcessor.processPastedValue(t,!0):this.inputValue.length===0?this.inputValuePassed(t):this.inputRuleProcessor.processPastedValue(t),this.renderFormat(!0))}registerFormatChangeEvent(t){this.onFormatChange=t}mouseUpHandler(){this.formatNavigator.findCursorPosition()}keyDownHandler(t){if(t.key!=="Tab"){if(!(t.key==="c"&&(t.ctrlKey||t.metaKey))&&!(t.key==="x"&&(t.ctrlKey||t.metaKey))&&!(t.key==="v"&&(t.ctrlKey||t.metaKey)))t.preventDefault(),t.stopPropagation();else return;this.keyProcessor.processKeyPress(t)&&this.inputElement&&this.onFormatChange&&(this.inputSlotCollection.allSlotsCompleted()&&this.previousOutputValue!==this.inputElement.innerHTML?(this.previousOutputValue=this.inputElement.innerHTML,this.onFormatChange(this.inputElement.innerHTML)):this.inputSlotCollection.allSlotsEmpty()&&this.previousOutputValue!==void 0&&(this.previousOutputValue=void 0,this.onFormatChange()))}}dispose(){this.instanceCollection.removeInstances(this.instanceId)}renderFormat(t=!1){setTimeout(()=>{var r,n;this.formatRenderer.render(),this.isInputFocused&&this.formatNavigator.setCursorToCurrentPosition(),this.inputValue.length>0&&(this.previousOutputValue=(r=this.inputElement)==null?void 0:r.innerHTML),t&&((n=this.inputElement)!=null&&n.innerHTML)&&this.onFormatChange&&this.onFormatChange(this.inputElement.innerHTML)})}}const cp=(e,t)=>{const{value:r="",format:n,readOnly:s=!1,debounceTime:o=800,fillContainer:i=!0,leftElement:c,rightElement:u,className:h,leftElementClassName:f,rightElementClassName:v,isSingleLine:P=!1,allowSingleLineScroll:l=!1,isInputValid:d,onChange:b,onFocus:x,onBlur:y,onElementCreate:E,onLeftElementClick:V,onRightElementClick:R}=e,[S,$]=p.useState(!0),O=p.useRef(),q=p.useRef(),z=p.useRef(),se=p.useRef(!1);p.useEffect(()=>(document.addEventListener("mouseup",C),()=>{var N;(N=z.current)==null||N.dispose(),document.removeEventListener("mouseup",C)}),[]),p.useEffect(()=>{var N;(N=z.current)==null||N.inputValuePassed(r)},[r]),p.useEffect(()=>{var N,_,W;(N=z.current)==null||N.dispose(),n&&(z.current=new ap(n,r),q.current&&((_=z.current)==null||_.inputElementCreated(q.current)),(W=z.current)==null||W.registerFormatChangeEvent(ae))},[n]);const ae=p.useCallback(N=>{d?d(N)?($(!0),b==null||b(N)):$(!1):b==null||b(N)},[b]),re=p.useCallback(N=>{var _;(_=z.current)==null||_.inputFocused(),x==null||x(N)},[x]),K=p.useCallback(N=>{var _;(_=z.current)==null||_.inputBlurred(),y==null||y(N)},[y]),L=p.useCallback(()=>{se.current=!0},[]),F=p.useCallback(()=>{var N;if(se.current)se.current=!1,(N=z.current)==null||N.mouseUpHandler();else{const _=new MouseEvent("mouseup");document.dispatchEvent(_)}},[]),C=p.useCallback(()=>{var N;se.current&&(se.current=!1,(N=z.current)==null||N.mouseUpHandler())},[]),Q=p.useCallback(N=>{var _;(_=z.current)==null||_.keyDownHandler(N)},[]),I=p.useCallback(N=>{var W,J;N.preventDefault(),N.stopPropagation();const _=(W=N.clipboardData)==null?void 0:W.getData("text/plain");_&&((J=z.current)==null||J.pastedValue(_))},[]),he=p.useCallback(N=>{var _,W,J,H,U,Z,te,D,ie,A,Ne,qe,Le,Ye,ot,Ge,Ve;(W=(_=O.current)==null?void 0:_.inputElement)==null||W.removeEventListener("keydown",Q),(H=(J=O.current)==null?void 0:J.inputElement)==null||H.removeEventListener("mousedown",L),(Z=(U=O.current)==null?void 0:U.inputElement)==null||Z.removeEventListener("mouseup",F),(D=(te=O.current)==null?void 0:te.inputElement)==null||D.removeEventListener("paste",I),O.current=N,(A=(ie=O.current)==null?void 0:ie.inputElement)==null||A.addEventListener("keydown",Q),(qe=(Ne=O.current)==null?void 0:Ne.inputElement)==null||qe.addEventListener("mousedown",L),(Ye=(Le=O.current)==null?void 0:Le.inputElement)==null||Ye.addEventListener("mouseup",F),(Ge=(ot=O.current)==null?void 0:ot.inputElement)==null||Ge.addEventListener("paste",I),q.current=(Ve=O.current)==null?void 0:Ve.inputElement},[]),k=p.useCallback(()=>{var N;(N=O.current)==null||N.focus()},[]);p.useImperativeHandle(t,()=>({focus:k}));const M=de(h,{"bsc:border-error!":!S});return g.jsx(Vr,{ref:N=>N&&he(N),readOnly:s,debounceTime:o,fillContainer:i,leftElement:c,rightElement:u,className:M,leftElementClassName:f,rightElementClassName:v,isSingleLine:P,allowSingleLineScroll:l,onFocus:re,onBlur:K,onElementCreate:E,onLeftElementClick:V,onRightElementClick:R})},Pi=p.forwardRef(cp),Kn=p.createContext(void 0);function Ti(e,t,r=!0){var P,l;const n=Ho(e),s=Mo(e),o=sd(e);let i=On(s)-(((P=t.options)==null?void 0:P.weekStartsOn)||0);i=i===-1?6:i;const c=On(o)-(((l=t.options)==null?void 0:l.weekStartsOn)||0),u=hf({start:s,end:o}),h=n+i>35?6:5,f=Si(h,7,{dayValue:null,isCurrent:!0});let v=1;for(let d=0,b=h;d<b;d++){for(let x=d>0?0:i;x<7;x++){const y=u[v-1];if(y.setHours(e.getHours(),e.getMinutes(),e.getSeconds()),f[d][x].dayValue=y,++v>n)break}if(v>n)break}if(i>0&&r)for(let d=0;d<i;d++)f[0][d].dayValue=th(s,i-d),f[0][d].isCurrent=!1;if(c>-1&&r)for(let d=6;d>c;d--)f[h-1][d].dayValue=Wt(o,d-c),f[h-1][d].isCurrent=!1;return f}function Si(e,t,r){const n=[];for(let s=0,o=e;s<o;s++){const i=[];for(let c=0,u=t;c<u;c++){const h=up(r)?r:{...r};i.push(h)}n.push(i)}return n}function up(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"||e instanceof Date}function lp(e){var n;const t=rh(new Date,((n=e.options)==null?void 0:n.weekStartsOn)||0),r=[];for(let s=0;s<7;s++)r.push(Wt(t,s).toLocaleDateString(e.code,{weekday:"short"}));return r}function fp(e){const t=new Date(Date.UTC(2020,0,1)),r=[[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}],[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}],[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}]];let n=0;for(let s=0;s<3;s++)for(let o=0;o<4;o++)r[s][o]={monthNumber:n,monthName:bt(t,n++).toLocaleDateString(e.code,{month:"short"})};return r}function dp(e,t){const r=new Date(e.getTime()),n=Math.floor(r.getFullYear()/10)*10;r.setFullYear(n);const s=pf({start:r,end:xr(r,9)}),o=Si(3,4,"");let i=0;for(let c=0;c<3;c++)for(let u=0;u<4&&(o[c][u]=s[i++].toLocaleDateString(t.code,{year:"numeric"}),i!==s.length);u++);return o}function hp(e){const t=new Date;return t.setHours(0,0,0,0),t.toLocaleTimeString(e.code)}function pp(e,t,r){return e.getTime()>=t.getTime()&&e.getTime()<=r.getTime()}async function Ei(e){return(await import(`/node_modules/date-fns/locale/${mp(e)}`)).default}function mp(e){const[t,r]=e.split("-");switch(t){case"af":return"af";case"ar":switch(r){case"DZ":return"ar-DZ";case"EG":return"ar-EG";case"MA":return"ar-MA";case"SA":return"ar-SA";case"TN":return"ar-TN";default:return"ar"}case"az":return"az";case"be":switch(r){case"tarask":return"be-tarask";default:return"be"}case"bg":return"bg";case"bn":return"bn";case"bs":return"bs";case"ca":return"ca";case"cs":return"cs";case"cy":return"cy";case"da":return"da";case"de":switch(r){case"AT":return"de-AT";default:return"de"}case"el":return"el";case"en":switch(r){case"AU":return"en-AU";case"CA":return"en-CA";case"GB":return"en-GB";case"IE":return"en-IE";case"IN":return"en-IN";case"NZ":return"en-NZ";case"US":return"en-US";default:return"en-ZA"}case"eo":return"eo";case"es":return"es";case"et":return"et";case"eu":return"eu";case"fa":return"fa-IR";case"fi":return"fi";case"fr":switch(r){case"CA":return"fr-CA";case"CH":return"fr-CH";default:return"fr"}case"fy":return"fy";case"gd":return"gd";case"gl":return"gl";case"gu":return"gu";case"he":return"he";case"hi":return"hi";case"hr":return"hr";case"ht":return"ht";case"hu":return"hu";case"hy":return"hy";case"id":return"id";case"is":return"is";case"it":switch(r){case"CH":return"it-CH";default:return"it"}case"ja":switch(r){case"Hira":return"ja-Hira";default:return"ja"}case"ka":return"ka";case"kk":return"kk";case"km":return"km";case"kn":return"kn";case"ko":return"ko";case"lb":return"lb";case"lt":return"lt";case"lv":return"lv";case"mk":return"mk";case"mn":return"mn";case"ms":return"ms";case"mt":return"mt";case"nb":return"nb";case"nl":switch(r){case"BE":return"nl-BE";default:return"nl"}case"nn":return"nn";case"oc":return"oc";case"pl":return"pl";case"pt":switch(r){case"BR":return"pt-BR";default:return"pt"}case"ro":return"ro";case"ru":return"ru";case"sk":return"sk";case"sl":return"sl";case"sq":return"sq";case"sr":switch(r){case"Latn":return"sr-Latn";default:return"sr"}case"sv":return"sv";case"ta":return"ta";case"te":return"te";case"th":return"th";case"tr":return"tr";case"ug":return"ug";case"uk":return"uk";case"uz":switch(r){case"Cyrl":return"uz-Cyrl";default:return"uz"}case"vi":return"vi";case"zh":switch(r){case"CN":return"zh-CN";case"HK":return"zh-HK";default:return"zh-TW"}default:return"en-AU"}}function _r(e,t){const r=nh(e);if(isNaN(r.valueOf())){let n=nt(e,"P pp",new Date,{locale:t});return!isNaN(n.valueOf())||(n=nt(e,"Pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P HH:mm",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P hh:mm a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P HH:mm:ss",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P hh:mm:ss a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P p",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"p",new Date,{locale:t}),!isNaN(n.valueOf()))?n:void 0}return r}function Zn(e,t){const r=e.split("-");if(r.length!==2)return;const n=_r(r[0].trim(),t);if(!n)return;const s=_r(r[1].trim(),t);if(s)return[n,s]}var we=(e=>(e[e.DateTime=0]="DateTime",e[e.DateOnly=1]="DateOnly",e[e.TimeOnly=2]="TimeOnly",e[e.DateRange=3]="DateRange",e))(we||{}),Re=(e=>(e[e.DaySelector=0]="DaySelector",e[e.MonthSelector=1]="MonthSelector",e[e.YearSelector=2]="YearSelector",e[e.TimeSelector=3]="TimeSelector",e[e.DateRangeSelector=4]="DateRangeSelector",e))(Re||{}),zt=(e=>(e[e.Day=0]="Day",e[e.Month=1]="Month",e[e.Year=2]="Year",e[e.Range=3]="Range",e))(zt||{}),kr=(e=>(e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e))(kr||{}),Oe=(e=>(e[e.TwelveHour=0]="TwelveHour",e[e.TwentyFourHour=1]="TwentyFourHour",e))(Oe||{}),vt=(e=>(e[e.Normal=0]="Normal",e[e.Range=1]="Range",e))(vt||{}),Gr=(e=>(e[e.Right=0]="Right",e[e.Left=1]="Left",e[e.None=2]="None",e))(Gr||{}),le=(e=>(e[e.SetDateSelector=0]="SetDateSelector",e[e.SetViewDate=1]="SetViewDate",e[e.SetSelectedDate=2]="SetSelectedDate",e[e.SetSelectedDateRange=3]="SetSelectedDateRange",e[e.SetSelectedStartDate=4]="SetSelectedStartDate",e[e.SetSelectedEndDate=5]="SetSelectedEndDate",e[e.SetTimeFormat=6]="SetTimeFormat",e[e.ClearDates=7]="ClearDates",e[e.InitializeDates=8]="InitializeDates",e))(le||{});const gp=(e,t)=>{switch(t.type){case 0:return t.dateSelector!==void 0?{...e,currentSelector:t.dateSelector,currentViewDate:t.viewDate||e.currentViewDate}:{...e};case 1:return{...e,currentViewDate:t.viewDate||new Date,dateInitialized:!0};case 2:return{...e,selectedDate:t.selectedDate||e.selectedDate,currentViewDate:t.viewDate||e.currentViewDate};case 3:return{...e,selectedStartDate:t.selectedStartDate||e.selectedStartDate,selectedEndDate:t.selectedEndDate||e.selectedEndDate};case 4:return{...e,selectedStartDate:t.selectedStartDate,selectedEndDate:void 0};case 5:return{...e,selectedEndDate:t.selectedEndDate};case 6:return{...e,timeFormat:t.timeFormat||e.timeFormat};case 7:return{currentSelector:e.currentSelector,currentViewDate:e.currentViewDate,timeFormat:e.timeFormat,dateInitialized:!0};case 8:{const r={...e,currentViewDate:bp(t.initialDate),dateInitialized:!0};return Array.isArray(t.initialDate)?{...r,selectedStartDate:t.initialDate[0],selectedEndDate:t.initialDate[1]}:{...r,selectedDate:t.initialDate}}default:return{...e,currentSelector:Re.DaySelector}}};function bp(e){return e?Array.isArray(e)?e[0]:e:new Date}const Gn=(e,t,r)=>{const n=p.useCallback(u=>{r({type:le.SetViewDate,viewDate:bt(t,u)})},[t]),s=p.useCallback(u=>{r({type:le.SetViewDate,viewDate:Mn(t,u)})},[t]),o=p.useCallback(u=>{r({type:le.SetViewDate,viewDate:xr(t,u)})},[t]),i=p.useCallback(u=>{r({type:le.SetViewDate,viewDate:Rn(t,u)})},[t]),c=p.useCallback(u=>{r({type:le.SetDateSelector,dateSelector:u})},[]);return{...e,incrementViewMonths:n,decrementViewMonths:s,incrementViewYears:o,decrementViewYears:i,setDateSelector:c}},Qr=({viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:s=vt.Normal,locale:o,onDateSelected:i,selectableDate:c,isValidDate:u,dispatcher:h})=>{var F;const[f,v]=p.useState(!1),[P,l]=p.useState(),[d,b]=p.useState(),[x,y]=p.useState(),[E,V]=p.useState(),R=p.useRef(),S=p.useRef(),$=p.useContext(Kn),O=p.useMemo(()=>$.calendarTemplate,[$.calendarTemplate]),q=async()=>o||await Ei(qo());p.useEffect(()=>{q().then(C=>{R.current=C,S.current=lp(R.current),v(!0)}).catch(C=>console.error(C))},[]),p.useEffect(()=>{e&&R.current&&y(Ti(e,R.current,s===vt.Normal))},[e,f]),p.useEffect(()=>{V(t?new Date(t.getFullYear(),t.getMonth(),t.getDate()):void 0)},[t]),p.useEffect(()=>{l(r?new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0).getTime():void 0),b(n?new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59).getTime():void 0)},[r,n]),p.useEffect(()=>{R.current&&o&&(R.current=o,y(Ti(e,R.current,s===vt.Normal)))},[o]);const z=C=>{if(s===vt.Normal)h==null||h({type:le.SetSelectedDate,selectedDate:C,viewDate:C}),i==null||i(C);else{if(!i)throw new Error("Range selection mode requires onDateSelected to be set");!r||od(C,r)?i(C):r&&!n?i(C,{setEndDate:!0}):r&&n&&i(C)}},se=C=>(E==null?void 0:E.toLocaleDateString())===C.toLocaleDateString(),ae=C=>{if(P&&d){const Q=C.getTime();return Q>=P&&Q<=d}return!1},re=Gn({viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:s,locale:o,weekDays:S.current,monthMatrix:x,selectableDate:c,isValidDate:u,onDateClicked:z,isSelectedDate:se,isInSelectedDateRange:ae},e,h),L=O||((C,Q)=>g.jsx("div",{className:"bc-dt-calendar bsc:w-full",children:Q}));return g.jsx(kt,{props:re,template:L,children:g.jsxs("div",{className:"bc-dt-day-row bsc:grid bsc:min-w-[329px] bsc:grid-cols-7 bsc:gap-3",children:[(F=S.current)==null?void 0:F.map((C,Q)=>g.jsx("div",{className:"bc-dt-day-cell bsc:text-center bsc:font-bold",children:C},Q)),x==null?void 0:x.map((C,Q)=>C.map((I,he)=>{var N,_;const k=I.dayValue!==null&&(c===void 0||c(I.dayValue)),M=de("bsc:text-center bsc:py-1 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",{"bsc:text-gray-3":!I.isCurrent,"bsc:bg-primary-1 bsc:text-white bsc:dark:bg-mono-light-1 bsc:dark:text-mono-dark-1":I&&I.dayValue&&(E&&se(I.dayValue)||P&&!d&&Io(P,I.dayValue)||P&&d&&ae(I.dayValue)),"bsc:cursor-pointer":k,"bsc:text-error bsc:cursor-not-allowed":!k,"bsc:bg-primary-5 bsc:dark:bg-mono-light-3 bsc:dark:text-mono-dark-1":I.dayValue&&eh(I.dayValue)&&!(se(I.dayValue)||ae(I.dayValue))},"bc-dt-date-cell");return g.jsx("div",{className:M,onClick:()=>I&&I.dayValue&&k&&(u===void 0||u(I.dayValue))&&z(I.dayValue),children:(_=I.dayValue)==null?void 0:_.getDate().toLocaleString((N=R.current)==null?void 0:N.code)},Q.toString()+he.toString())}))]})})},Xr=({title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:s,viewDate:o,dispatcher:i})=>{const u=p.useContext(Kn).dateScrollerTemplate,h=Gn({title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:s},o,i),f="bsc:bg-transparent bsc:cursor-pointer bsc:focus:outline-hidden bsc:hover:bg-primary-1 bsc:hover:text-white bsc:dark:hover:bg-mono-light-3",P=u||((l,d)=>g.jsx("div",{className:"bc-dt-scroller bsc:flex bsc:w-full bsc:flex-row bsc:items-center bsc:px-2 bsc:py-1",children:d}));return g.jsxs(kt,{props:h,template:P,children:[g.jsx("div",{className:"bc-dt-scroller-left bsc:shrink bsc:cursor-pointer",children:g.jsx(et,{className:f,onClick:n,children:g.jsx(Ke,{icon:"chevronLeft",size:He.Regular})})}),g.jsx("div",{className:"bc-dt-scroller-title bsc:grow bsc:cursor-pointer bsc:text-center bsc:hover:text-primary-2 bsc:dark:hover:text-mono-light-3",onClick:r,children:e}),g.jsx("div",{className:"bc-dt-scroller-right bsc:shrink bsc:cursor-pointer",children:g.jsx(et,{className:f,onClick:s,children:g.jsx(Ke,{icon:"chevronRight",size:He.Regular})})})]})},yp=({selectedDate:e,viewDate:t,locale:r,showTimeSelector:n,selectableDate:s,isValidDate:o,onChange:i,dispatcher:c})=>{const u=()=>{t&&c({type:le.SetViewDate,viewDate:Mn(t,1)})},h=()=>{t&&c({type:le.SetViewDate,viewDate:bt(t,1)})},f=()=>{c({type:le.SetDateSelector,dateSelector:Re.MonthSelector})},v=()=>{c({type:le.SetDateSelector,dateSelector:Re.TimeSelector})},P=()=>t?t.toLocaleDateString(r.code,{month:"long",year:"numeric"}):"";return g.jsxs("div",{className:"bc-dt-day-selector bsc:p-2",children:[g.jsx(Xr,{title:P(),scrollerType:zt.Day,onTitleClicked:f,onMovePrevious:u,onMoveNext:h,viewDate:t,dispatcher:c}),g.jsx(Qr,{viewDate:t,selectedDate:e,locale:r,selectableDate:s,isValidDate:o,onDateSelected:i,dispatcher:c}),n&&g.jsx("div",{className:"bc-dt-time-value-wrapper bsc:flex bsc:w-full bsc:flex-row bsc:justify-center bsc:p-2",children:g.jsx("div",{className:"bc-dt-time-value bsc:cursor-pointer bsc:p-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1 bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-2",onClick:v,children:(e==null?void 0:e.toLocaleTimeString(r.code))||hp(r)})})]})},vp=({viewDate:e,locale:t,dateSelection:r=we.DateTime,dispatcher:n})=>{const s=p.useRef(fp(t)),o=()=>{const f=Rn(e,1);n({type:le.SetViewDate,viewDate:f})},i=()=>{const f=xr(e,1);n({type:le.SetViewDate,viewDate:f})},c=f=>{n({type:le.SetDateSelector,dateSelector:r!==we.DateRange?Re.DaySelector:Re.DateRangeSelector,viewDate:vh(e,f)})},u=()=>e.toLocaleDateString(t.code,{year:"numeric"}),h=()=>{n({type:le.SetDateSelector,dateSelector:Re.YearSelector})};return g.jsxs("div",{className:"bc-dt-month-selector bsc:p-2",style:{minWidth:"20rem"},children:[g.jsx(Xr,{title:u(),scrollerType:zt.Month,onTitleClicked:h,onMovePrevious:o,onMoveNext:i,viewDate:e,dispatcher:n}),g.jsx("div",{className:"bc-dt-month-grid bsc:grid bsc:w-full bsc:grid-cols-4 bsc:gap-4",children:s.current.map((f,v)=>f.map((P,l)=>g.jsx("div",{className:"bc-dt-month-cell bsc:cursor-pointer bsc:text-center bsc:py-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",onClick:()=>c(P.monthNumber),children:P.monthName},v.toString()+l.toString())))})]})},xp=({viewDate:e,selectedStartDate:t,selectedEndDate:r,locale:n,onChange:s,dispatcher:o})=>{const i=qr("screen and (max-device-width: 40rem)"),c=bt(e,1),u=(l,d)=>{!d||!d.setEndDate?o({type:le.SetSelectedStartDate,selectedStartDate:l}):(o({type:le.SetSelectedEndDate,selectedEndDate:l}),t&&s&&s([t,l]))},h=()=>{o({type:le.SetDateSelector,dateSelector:Re.MonthSelector})},f=()=>i?`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})}`:`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})} - ${c.toLocaleDateString(n.code,{month:"long"})} ${c.toLocaleDateString(n.code,{year:"numeric"})}`,v=()=>{e&&o({type:le.SetViewDate,viewDate:Mn(e,1)})},P=()=>{e&&o({type:le.SetViewDate,viewDate:bt(e,1)})};return g.jsxs("div",{className:"bc-dt-range-selector bsc:flex bsc:flex-col",children:[g.jsx("div",{className:"bc-dt-range-scroller-wrapper bsc:shrink",children:g.jsx(Xr,{title:f(),scrollerType:zt.Range,onTitleClicked:h,onMovePrevious:v,onMoveNext:P,viewDate:e,dispatcher:o})}),g.jsx("div",{className:"bsc-flex-grow",children:g.jsx(An,{mobileMarkup:g.jsx("div",{className:"bc-dt-range-calendar bsc:px-2 bsc:py-1",children:g.jsx(Qr,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:vt.Range,onDateSelected:u,locale:n,dispatcher:o})}),aboveMobileMarkup:g.jsxs("div",{className:"bc-dt-range-wrapper bsc:flex bsc:flex-row bsc:px-2 bsc:py-1",children:[g.jsx("div",{className:"bc-dt-range-calendar-1 bsc:border-r bsc:border-solid bsc:border-gray-3 bsc:pr-4",children:g.jsx(Qr,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:vt.Range,onDateSelected:u,locale:n,dispatcher:o})}),g.jsx("div",{className:"bc-dt-range-calendar-2 bsc:pl-4",children:g.jsx(Qr,{viewDate:c,selectedStartDate:t,selectedEndDate:r,selectionMode:vt.Range,onDateSelected:u,locale:n,dispatcher:o})})]})})})]})},wp=({viewDate:e,showDateSelector:t,locale:r,timeFormat:n=Oe.TwelveHour,timeConstraints:s,onChange:o,dispatcher:i})=>{const c=p.useRef(n===Oe.TwelveHour?11:23),u=p.useRef(n===Oe.TwelveHour?["12","01","02","03","04","05","06","07","08","09","10","11"]:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"]),h=p.useRef(wh(0,59,L=>L.toString().padStart(2,"0"))),f=p.useRef(["AM","PM"]),v=p.useRef(ef(e)),P=L=>L>11?L-12:L,[l,d]=p.useState(P(e.getHours())),[b,x]=p.useState(e.getMinutes()),[y,E]=p.useState(e.getHours()<=12?0:1),V=p.useRef(e.toLocaleDateString(r.code));p.useEffect(()=>{const L=e.getHours(),F=e.getMinutes();if(L!==l&&d(n===Oe.TwelveHour?P(L):L),F!==b&&x(F),n===Oe.TwelveHour){const C=L<=11?0:1;C!==y&&E(C)}},[e]);const R=()=>{var C;const L=((C=s==null?void 0:s.hours)==null?void 0:C.step)||1,F=l<c.current?l+L:0;d(F),z(F,b,y)},S=()=>{var C;const L=((C=s==null?void 0:s.hours)==null?void 0:C.step)||1,F=l>0?l-L:c.current;d(F),z(F,b,y)},$=()=>{var C,Q,I;const L=((C=s==null?void 0:s.minutes)==null?void 0:C.step)||1,F=b+L<(((Q=s==null?void 0:s.minutes)==null?void 0:Q.max)||59)?b+L:((I=s==null?void 0:s.minutes)==null?void 0:I.min)||0;x(F),z(l,F,y)},O=()=>{var C,Q,I;const L=((C=s==null?void 0:s.minutes)==null?void 0:C.step)||1,F=b-L>=(((Q=s==null?void 0:s.minutes)==null?void 0:Q.min)||0)?b-L:(((I=s==null?void 0:s.minutes)==null?void 0:I.max)||60)-L;x(F),z(l,F,y)},q=()=>{const L=y===0?1:0;E(L),z(l,b,L)},z=(L,F,C)=>{const Q=n===Oe.TwelveHour&&C===1?L+12:L;v.current.setHours(Q,F),i({type:le.SetSelectedDate,selectedDate:v.current,viewDate:v.current}),o==null||o(v.current)},se=()=>{i({type:le.SetDateSelector,dateSelector:Re.DaySelector})},ae=de("bsc:w-full bsc:grid bsc:grid-rows-3 bsc:gap-4 bsc:items-center bc-dt-time-grid",{"bsc:grid-cols-4":n===Oe.TwelveHour,"bsc:grid-cols-3":n===Oe.TwentyFourHour}),re=de("bsc:text-center bsc:cursor-pointer bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:text-mono-light-1 bsc:dark:hover:bg-mono-light-1 bsc:dark:hover:text-mono-dark-1 bc-dt-time-date-value",{"bsc:col-span-4":n===Oe.TwelveHour,"bsc:col-span-3":n===Oe.TwentyFourHour}),K="bsc-bg-transparent bsc:p-2 bsc:cursor-pointer bsc:focus:outline-hidden bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-1 bsc:dark:hover:text-mono-dark-1";return g.jsx("div",{className:"bc-dt-time-selector bsc:flex bsc:flex-row bsc:justify-center bsc:p-2",style:{minWidth:n===Oe.TwelveHour?"15rem":"11rem"},children:g.jsxs("div",{className:ae,children:[t&&g.jsx("div",{className:re,onClick:se,children:V.current}),g.jsx("div",{className:"bc-dt-time-hour-increase bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:R,children:g.jsx(Ke,{icon:"chevronUp",size:He.Regular})})}),g.jsx("div",{}),g.jsx("div",{className:"bc-dt-time-minute-increase bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:$,children:g.jsx(Ke,{icon:"chevronUp",size:He.Regular})})}),n===Oe.TwelveHour&&g.jsx("div",{className:"bc-dt-time-meridian-increase bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:q,children:g.jsx(Ke,{icon:"chevronUp",size:He.Regular})})}),g.jsx("div",{className:"bc-dt-time-hour-value bsc:text-center",children:u.current[l]}),g.jsx("div",{className:"bc-dt-time-separator bsc:text-center",children:":"}),g.jsx("div",{className:"bc-dt-time-minute-value bsc:text-center",children:h.current[b]}),n===Oe.TwelveHour&&g.jsx("div",{className:"bc-dt-time-meridian-value bsc:text-center",children:f.current[y]}),g.jsx("div",{className:"bc-dt-time-hour-decrease bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:S,children:g.jsx(Ke,{icon:"chevronDown",size:He.Regular})})}),g.jsx("div",{}),g.jsx("div",{className:"bc-dt-time-minute-decrease bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:O,children:g.jsx(Ke,{icon:"chevronDown",size:He.Regular})})}),n===Oe.TwelveHour&&g.jsx("div",{className:"bc-dt-time-meridian-decrease bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:q,children:g.jsx(Ke,{icon:"chevronDown",size:He.Regular})})})]})})},Pp=({viewDate:e,locale:t,dispatcher:r})=>{const n=dp(e,t),s=()=>{const u=Rn(e,10);r({type:le.SetViewDate,viewDate:u})},o=()=>{const u=xr(e,10);r({type:le.SetViewDate,viewDate:u})},i=u=>{const h=parseInt(u);r({type:le.SetDateSelector,dateSelector:Re.MonthSelector,viewDate:xh(e,h)})},c=()=>`${n[0][0].toString()} - ${n[2][1].toString()}`;return g.jsxs("div",{className:"bc-dt-year-selector bsc:p-2",style:{minWidth:"20rem"},children:[g.jsx(Xr,{title:c(),scrollerType:zt.Year,onMovePrevious:s,onMoveNext:o,viewDate:e,dispatcher:r}),g.jsx("div",{className:"bc-dt-year-wrapper bsc:w-full",children:g.jsx("div",{className:"bc-dt-year-grid bsc:grid bsc:grid-cols-4 bsc:gap-4",children:n.map((u,h)=>u.map((f,v)=>f.length>0?g.jsx("div",{className:"bc-dt-year-cell bsc:cursor-pointer bsc:text-center bsc:py-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",onClick:()=>i(f),children:f},h.toString()+v.toString()):g.jsx("div",{},h.toString()+v.toString())))})})]})};class Tp{constructor(t,r){T(this,"dateFormat");T(this,"timeFormat");T(this,"use24HourTime");T(this,"monthPart");T(this,"dayPart");T(this,"yearPart");T(this,"twelveHourPart");T(this,"twentyFourHourPart");T(this,"minutePart");T(this,"meridianPart");this.dateSelection=t;const n=2023,s=12,o=20,c=new Date(n,s-1,o).toLocaleDateString(r,{year:"numeric",month:"numeric",day:"numeric"});this.dateFormat=c.replace(`${n}`,"YYYY").replace(`${s}`,"MM").replace(`${o}`,"DD");const u=new Date,h=18,f=24,v=37,P=317;u.setHours(h,f,v,P);const l=u.toLocaleTimeString(r);this.use24HourTime=l.startsWith("18"),this.timeFormat=l.replace(`${this.use24HourTime?h:"6"}`,"HH").replace(`${f}`,"MM").replace(`${v}`,"SS").replace(`${P}`,"LLL"),this.createDateParts()}get is24HourTime(){return this.use24HourTime}createInputFormat(){const t={deleteShiftsFormatPart:!1,formatParts:[]};switch(this.dateSelection){case we.DateOnly:return this.createDateFormat(t);case we.TimeOnly:return this.createTimeFormat(t);case we.DateRange:return this.createDateRangeFormat(t);case we.DateTime:return this.createDateTimeFormat(t)}}createDateFormat(t){return this.dateFormat.startsWith("MM")?t.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?t.formatParts.push(...this.createDayMonthYearFormatParts()):t.formatParts.push(...this.createYearMonthDayFormatParts()),t}createTimeFormat(t){return this.use24HourTime?t.formatParts.push(...this.createTwentyFourHourFormatParts()):t.formatParts.push(...this.createTwelveHourFormatParts()),t}createDateRangeFormat(t){const r=[];this.dateFormat.startsWith("MM")?r.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?r.push(...this.createDayMonthYearFormatParts()):r.push(...this.createYearMonthDayFormatParts());const n={characterCount:3,placeholder:" - ",inputText:" - ",isSeparator:!0};return t.formatParts.push(...r,n,...r),t}createDateTimeFormat(t){this.dateFormat.startsWith("MM")?t.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?t.formatParts.push(...this.createDayMonthYearFormatParts()):t.formatParts.push(...this.createYearMonthDayFormatParts());const r={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return t.formatParts.push(r),this.use24HourTime?t.formatParts.push(...this.createTwentyFourHourFormatParts()):t.formatParts.push(...this.createTwelveHourFormatParts()),t}createMonthDayYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("MM",""),r=t.indexOf("DD"),n=t.substring(0,r);t=t.replace(n,"").replace("DD","");const s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("YYYY"),n=t.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.monthPart,s,this.dayPart,o,this.yearPart]}return[]}createDayMonthYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("DD",""),r=t.indexOf("MM"),n=t.substring(0,r);t=t.replace(n,"").replace("MM","");const s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("YYYY"),n=t.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.dayPart,s,this.monthPart,o,this.yearPart]}return[]}createYearMonthDayFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("YYYY",""),r=t.indexOf("MM"),n=t.substring(0,r);t=t.replace(n,"").replace("MM","");const s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("DD"),n=t.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.yearPart,s,this.monthPart,o,this.dayPart]}return[]}createTwelveHourFormatParts(){if(this.twelveHourPart&&this.minutePart&&this.meridianPart){const t=this.timeFormat.replace("HH",""),r=t.indexOf("MM"),n=t.substring(0,r),s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0},o={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return[this.twelveHourPart,s,this.minutePart,o,this.meridianPart]}return[]}createTwentyFourHourFormatParts(){if(this.twentyFourHourPart&&this.minutePart){const t=this.timeFormat.replace("HH",""),r=t.indexOf("MM"),n=t.substring(0,r),s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.twentyFourHourPart,s,this.minutePart]}return[]}createDateParts(){this.monthPart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:st.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.dayPart={characterCount:2,placeholder:"D",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:st.Numeric,minimumValue:1,maximumValue:31,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.yearPart={characterCount:4,placeholder:"Y",inputText:"_",isSeparator:!1,allCharactersRequired:!0,valueType:st.Numeric},this.twelveHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:st.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.twentyFourHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:st.Numeric,minimumValue:0,maximumValue:23,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.minutePart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:st.Numeric,minimumValue:0,maximumValue:59,exceedingMaximumValueCausesError:!0,padWithZeros:!0},this.meridianPart={characterCount:2,inputText:"_",isSeparator:!1,valueType:st.Text,possibleValues:["AM","PM"]}}}const Sp=(e,t)=>{var o;const[r,n]=p.useState(),s=p.useRef();return p.useEffect(()=>{t&&!r&&(s.current=new Tp(e,t),n(s.current.createInputFormat()))},[t]),[r,(o=s.current)==null?void 0:o.is24HourTime]},Ep=({value:e,readOnly:t=!1,label:r,useDefaultDateValue:n=!1,useFormattedInput:s=!1,allowClear:o=!1,closeSelector:i=!1,locale:c,className:u,dateSelection:h=we.DateTime,dateFormat:f,timeConstraints:v,icon:P,iconPosition:l=Gr.Right,inputElement:d,selectableDate:b,isValidDate:x,onChange:y,calendarTemplate:E,dateScrollerTemplate:V,inputTemplate:R,wrapperTemplate:S})=>{const[$,O]=p.useState(!1),[q,z]=p.useState(),[se,ae]=p.useState(),[re,K,L]=ga(h),F=p.useRef(),C=p.useRef(!1),Q=p.useRef(c||qo()),I=p.useRef(),he=p.useRef(),k=p.useRef(),M=p.useRef(null),N=p.useRef(null),[_,W]=Sp(h,q),J=p.useRef({calendarTemplate:E,dateScrollerTemplate:V});p.useEffect(()=>{Q.current&&U(Q.current)},[Q]),p.useEffect(()=>{c&&U(c)},[c]),p.useEffect(()=>{if(e){const ee=Z();ie({type:le.InitializeDates,initialDate:ee})}else ie({type:le.ClearDates})},[e,I.current]),p.useEffect(()=>{W&&ie({type:le.SetTimeFormat,timeFormat:W?Oe.TwentyFourHour:Oe.TwelveHour})},[W]),p.useEffect(()=>{d&&(he.current=d)},[d]),p.useEffect(()=>{ie({type:le.SetDateSelector,dateSelector:H()})},[re]);const H=p.useCallback(()=>L.current===we.TimeOnly?Re.TimeSelector:L.current===we.DateTime||L.current===we.DateOnly?Re.DaySelector:Re.DateRangeSelector,[]),U=ee=>{Ei(ee).then(fe=>{z(fe.code),I.current=fe;const Ee=Z();ie(e||n?{type:le.InitializeDates,initialDate:Array.isArray(Ee)?Ee[0]:Ee}:{type:le.SetViewDate,viewDate:Array.isArray(Ee)?Ee[0]:Ee})}).catch(fe=>console.error(fe))},Z=()=>{const ee=new Date;return ee.setHours(0,0,0,0),e?typeof e=="string"?L.current!==we.DateRange?_r(e,I.current):Zn(e,I.current):e:ee},te={currentSelector:H(),currentViewDate:new Date,timeFormat:Oe.TwelveHour,dateInitialized:!1},[D,ie]=p.useReducer(gp,te),A=()=>{Gt(),O(!0)},Ne=p.useMemo(()=>yr(()=>{O(!1)},250),[]),qe=p.useMemo(()=>yr(()=>{Ne.cancel()},5),[Ne]),Le=ee=>{const fe=ee.target.innerText;Ge(fe)},Ye=ee=>{if(ee){const fe=L.current!==we.DateRange?_r(ee,I.current):Zn(ee,I.current);return fe?x?Array.isArray(fe)?fe.every(Ee=>x(Ee)):x(fe):!0:!1}else return!0},ot=ee=>{Ge(ee||"")},Ge=ee=>{const fe=L.current!==we.DateRange?_r(ee,I.current):Zn(ee,I.current);fe?(Array.isArray(fe)?(pp(fe[0],Mo(D.currentViewDate),df(bt(D.currentViewDate,1)))||ie({type:le.SetViewDate,viewDate:fe[0]}),ie({type:le.SetSelectedDateRange,selectedStartDate:fe[0],selectedEndDate:fe[1]})):ie({type:le.SetSelectedDate,selectedDate:fe,viewDate:fe}),y==null||y(fe)):ee===""&&(ie({type:le.ClearDates}),y==null||y())},Ve=ee=>{L.current===we.DateOnly&&i===!0&&O(!1),y==null||y(ee)},Kt=()=>{Gt(),O(!$),N.current?N.current.focus():M.current&&M.current.focus()},Zt=()=>{ie({type:le.ClearDates}),O(!1),y==null||y()},Qe=(ee,fe)=>{(!he.current||F.current!==fe)&&(he.current=ee,F.current=fe,C.current=!0)},Gt=()=>{(!k.current||C.current)&&he.current&&(k.current=he.current,ae(he.current),C.current=!1)},Qt=()=>{O(!1),ie({type:le.SetDateSelector,dateSelector:H()})},Ot=()=>{switch(f){case kr.Short:return"short";case kr.Medium:return"medium";case kr.Long:return"long";default:return}},it=()=>{var fe,Ee,ct,ut,xt,tr,wt,rr,Pt,Tt,nr,sr;const ee=Ot();switch(L.current){case we.DateTime:return D.selectedDate?ee?D.selectedDate.toLocaleString((fe=I.current)==null?void 0:fe.code,{dateStyle:ee,timeStyle:ee}):D.selectedDate.toLocaleString((Ee=I.current)==null?void 0:Ee.code):"";case we.DateOnly:return D.selectedDate?ee?D.selectedDate.toLocaleDateString((ct=I.current)==null?void 0:ct.code,{dateStyle:ee}):D.selectedDate.toLocaleDateString((ut=I.current)==null?void 0:ut.code):"";case we.TimeOnly:return D.selectedDate?ee?D.selectedDate.toLocaleTimeString((xt=I.current)==null?void 0:xt.code,{timeStyle:ee,hour12:D.timeFormat===Oe.TwelveHour,hourCycle:D.timeFormat===Oe.TwentyFourHour?"h23":void 0}):D.selectedDate.toLocaleTimeString((tr=I.current)==null?void 0:tr.code,{hour12:D.timeFormat===Oe.TwelveHour,hourCycle:D.timeFormat===Oe.TwentyFourHour?"h23":void 0}):"";case we.DateRange:return D.selectedStartDate&&D.selectedEndDate?ee?`${D.selectedStartDate.toLocaleDateString((wt=I.current)==null?void 0:wt.code,{dateStyle:ee})} - ${D.selectedEndDate.toLocaleDateString((rr=I.current)==null?void 0:rr.code,{dateStyle:ee})}`:`${D.selectedStartDate.toLocaleDateString((Pt=I.current)==null?void 0:Pt.code)} - ${D.selectedEndDate.toLocaleDateString((Tt=I.current)==null?void 0:Tt.code)}`:"";default:return D.selectedDate?ee?D.selectedDate.toLocaleString((nr=I.current)==null?void 0:nr.code,{dateStyle:ee,timeStyle:ee}):D.selectedDate.toLocaleString((sr=I.current)==null?void 0:sr.code):""}},at=re===we.DateTime||re===we.DateOnly||re===we.DateRange,Cr=re===we.DateTime||re===we.TimeOnly,Xe=l===Gr.None?{}:l===Gr.Right?{rightElement:g.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[o&&!t&&g.jsx("div",{children:g.jsx(Ke,{icon:"close",size:He.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:Zt})}),g.jsx("div",{className:"bsc:ml-2",onClick:t?void 0:Kt,children:P||g.jsx(Ke,{icon:"calendar",size:He.Small,className:t?void 0:"bsc:cursor-pointer"})})]}),rightElementClassName:"bsc:justify-center"}:{leftElement:g.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[g.jsx("div",{className:"bsc:mr-2",onClick:t?void 0:Kt,children:P||g.jsx(Ke,{icon:"calendar",size:He.Small,className:t?void 0:"bsc:cursor-pointer"})}),o&&!t&&g.jsx("div",{children:g.jsx(Ke,{icon:"close",size:He.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:Zt})})]}),leftElementClassName:"bsc:justify-center"},Nt={setDateSelector:ee=>K(ee)},Dr=S||((ee,fe)=>g.jsx(g.Fragment,{children:fe})),Xt=()=>g.jsx(kt,{props:Nt,template:Dr,children:g.jsxs(g.Fragment,{children:[D.currentSelector===Re.DaySelector&&at&&D.dateInitialized&&I.current&&g.jsx(yp,{selectedDate:D.selectedDate,viewDate:D.currentViewDate,locale:I.current,showTimeSelector:L.current===we.DateTime,selectableDate:b,isValidDate:x,dispatcher:ie,onChange:Ve}),D.currentSelector===Re.MonthSelector&&at&&D.dateInitialized&&I.current&&g.jsx(vp,{viewDate:D.currentViewDate,locale:I.current,dateSelection:L.current,dispatcher:ie}),D.currentSelector===Re.YearSelector&&at&&D.dateInitialized&&I.current&&g.jsx(Pp,{viewDate:D.currentViewDate,locale:I.current,dispatcher:ie}),D.currentSelector===Re.TimeSelector&&Cr&&D.dateInitialized&&I.current&&g.jsx(wp,{viewDate:D.currentViewDate,showDateSelector:L.current===we.DateTime,locale:I.current,timeFormat:D.timeFormat,timeConstraints:v,onChange:y,dispatcher:ie}),D.currentSelector===Re.DateRangeSelector&&at&&D.dateInitialized&&I.current&&g.jsx(xp,{viewDate:D.currentViewDate,selectedStartDate:D.selectedStartDate,selectedEndDate:D.selectedEndDate,locale:I.current,onChange:y,dispatcher:ie})]})}),Jt=Gn({label:r,readOnly:t,allowClear:o,getValue:it,onFocus:A,onInput:Le,iconPosition:l,iconElement:Xe.rightElement||Xe.leftElement},D.currentViewDate,ie),er=R||((ee,fe)=>g.jsx(g.Fragment,{children:fe})),jt=de("bsc:text-left",{"bc-read-only bsc:bg-gray-4 bsc:dark:bg-mono-dark-3":t,"bsc:bg-white bsc:dark:bg-mono-dark-1":!t},"bc-dt-input",u);return g.jsx(Kn.Provider,{value:J.current,children:g.jsxs("div",{className:"bc-date-time",children:[r&&g.jsx(ft,{label:r,readOnly:t,className:"bc-dt-label"}),g.jsx(An,{mobileMarkup:g.jsxs(g.Fragment,{children:[g.jsx(kt,{props:Jt,template:er,children:g.jsx(Vr,{ref:M,value:it(),readOnly:t,inputMode:"none",className:jt,onFocus:A,onElementCreate:ee=>Qe(ee,!1),...Xe})}),g.jsx(mi,{visible:$,target:se,hidden:Qt,unmountWhenHidden:!0,children:Xt()})]}),aboveMobileMarkup:g.jsxs(g.Fragment,{children:[g.jsx(kt,{props:Jt,template:er,children:s===!1?g.jsx(Vr,{ref:M,value:it(),readOnly:t,className:jt,onFocus:A,onBlur:Ne,onInput:Le,onElementCreate:ee=>Qe(ee,!1),...Xe}):g.jsx(Pi,{ref:N,value:it(),readOnly:t,className:jt,format:_,isInputValid:Ye,onFocus:A,onBlur:Ne,onChange:ot,onElementCreate:ee=>Qe(ee,!0),...Xe})}),g.jsx(yi,{visible:$,target:se,shouldTargetCloseOverlay:!1,shouldScrollCloseOverlay:!0,shouldCheckZIndex:!0,shouldRemainOnScreen:!0,hidden:Qt,isClickedWithin:qe,unmountWhenHidden:!0,children:Xt()})]})})]})})};var Qn,_i;function _p(){if(_i)return Qn;_i=1;function e(l,d){var b,x;if(typeof d=="function")x=d(l),x!==void 0&&(l=x);else if(Array.isArray(d))for(b=0;b<d.length;b++)x=d[b](l),x!==void 0&&(l=x);return l}function t(l,d){return l[0]==="-"&&Array.isArray(d)&&/^-\d+$/.test(l)?d.length+parseInt(l,10):l}function r(l){return/^\d+$/.test(l)}function n(l){return Object.prototype.toString.call(l)==="[object Object]"}function s(l){return Object(l)===l}function o(l){return Object.keys(l).length===0}var i=["__proto__","prototype","constructor"],c=function(l){return i.indexOf(l)===-1};function u(l,d){l.indexOf("[")>=0&&(l=l.replace(/\[/g,d).replace(/]/g,""));var b=l.split(d),x=b.filter(c);if(x.length!==b.length)throw Error("Refusing to update blacklisted property "+l);return b}var h=Object.prototype.hasOwnProperty;function f(l,d,b,x){if(!(this instanceof f))return new f(l,d,b,x);typeof d>"u"&&(d=!1),typeof b>"u"&&(b=!0),typeof x>"u"&&(x=!0),this.separator=l||".",this.override=d,this.useArray=b,this.useBrackets=x,this.keepArray=!1,this.cleanup=[]}var v=new f(".",!1,!0,!0);function P(l){return function(){return v[l].apply(v,arguments)}}return f.prototype._fill=function(l,d,b,x){var y=l.shift();if(l.length>0){if(d[y]=d[y]||(this.useArray&&r(l[0])?[]:{}),!s(d[y]))if(this.override)d[y]={};else{if(!(s(b)&&o(b)))throw new Error("Trying to redefine `"+y+"` which is a "+typeof d[y]);return}this._fill(l,d[y],b,x)}else{if(!this.override&&s(d[y])&&!o(d[y])){if(!(s(b)&&o(b)))throw new Error("Trying to redefine non-empty obj['"+y+"']");return}d[y]=e(b,x)}},f.prototype.object=function(l,d){var b=this;return Object.keys(l).forEach(function(x){var y=d===void 0?null:d[x],E=u(x,b.separator).join(b.separator);E.indexOf(b.separator)!==-1?(b._fill(E.split(b.separator),l,l[x],y),delete l[x]):l[x]=e(l[x],y)}),l},f.prototype.str=function(l,d,b,x){var y=u(l,this.separator).join(this.separator);return l.indexOf(this.separator)!==-1?this._fill(y.split(this.separator),b,d,x):b[l]=e(d,x),b},f.prototype.pick=function(l,d,b,x){var y,E,V,R,S;for(E=u(l,this.separator),y=0;y<E.length;y++)if(R=t(E[y],d),d&&typeof d=="object"&&R in d){if(y===E.length-1)return b?(V=d[R],x&&Array.isArray(d)?d.splice(R,1):delete d[R],Array.isArray(d)&&(S=E.slice(0,-1).join("."),this.cleanup.indexOf(S)===-1&&this.cleanup.push(S)),V):d[R];d=d[R]}else return;return b&&Array.isArray(d)&&(d=d.filter(function($){return $!==void 0})),d},f.prototype.delete=function(l,d){return this.remove(l,d,!0)},f.prototype.remove=function(l,d,b){var x;if(this.cleanup=[],Array.isArray(l)){for(x=0;x<l.length;x++)this.pick(l[x],d,!0,b);return b||this._cleanup(d),d}else return this.pick(l,d,!0,b)},f.prototype._cleanup=function(l){var d,b,x,y;if(this.cleanup.length){for(b=0;b<this.cleanup.length;b++)x=this.cleanup[b].split("."),y=x.splice(0,-1).join("."),d=y?this.pick(y,l):l,d=d[x[0]].filter(function(E){return E!==void 0}),this.set(this.cleanup[b],d,l);this.cleanup=[]}},f.prototype.del=f.prototype.remove,f.prototype.move=function(l,d,b,x,y){return typeof x=="function"||Array.isArray(x)?this.set(d,e(this.pick(l,b,!0),x),b,y):(y=x,this.set(d,this.pick(l,b,!0),b,y)),b},f.prototype.transfer=function(l,d,b,x,y,E){return typeof y=="function"||Array.isArray(y)?this.set(d,e(this.pick(l,b,!0),y),x,E):(E=y,this.set(d,this.pick(l,b,!0),x,E)),x},f.prototype.copy=function(l,d,b,x,y,E){return typeof y=="function"||Array.isArray(y)?this.set(d,e(JSON.parse(JSON.stringify(this.pick(l,b,!1))),y),x,E):(E=y,this.set(d,this.pick(l,b,!1),x,E)),x},f.prototype.set=function(l,d,b,x){var y,E,V,R;if(typeof d>"u")return b;for(V=u(l,this.separator),y=0;y<V.length;y++){if(R=V[y],y===V.length-1)if(x&&n(d)&&n(b[R]))for(E in d)h.call(d,E)&&(b[R][E]=d[E]);else if(x&&Array.isArray(b[R])&&Array.isArray(d))for(var S=0;S<d.length;S++)b[V[y]].push(d[S]);else b[R]=d;else(!h.call(b,R)||!n(b[R])&&!Array.isArray(b[R]))&&(/^\d+$/.test(V[y+1])?b[R]=[]:b[R]={});b=b[R]}return b},f.prototype.transform=function(l,d,b){return d=d||{},b=b||{},Object.keys(l).forEach((function(x){this.set(l[x],this.pick(x,d),b)}).bind(this)),b},f.prototype.dot=function(l,d,b){d=d||{},b=b||[];var x=Array.isArray(l);return Object.keys(l).forEach((function(y){var E=x&&this.useBrackets?"["+y+"]":y;if(s(l[y])&&(n(l[y])&&!o(l[y])||Array.isArray(l[y])&&!this.keepArray&&l[y].length!==0))if(x&&this.useBrackets){var V=b[b.length-1]||"";return this.dot(l[y],d,b.slice(0,-1).concat(V+E))}else return this.dot(l[y],d,b.concat(E));else x&&this.useBrackets?d[b.join(this.separator).concat("["+y+"]")]=l[y]:d[b.concat(E).join(this.separator)]=l[y]}).bind(this)),d},f.pick=P("pick"),f.move=P("move"),f.transfer=P("transfer"),f.transform=P("transform"),f.copy=P("copy"),f.object=P("object"),f.str=P("str"),f.set=P("set"),f.delete=P("delete"),f.del=f.remove=P("remove"),f.dot=P("dot"),["override","overwrite"].forEach(function(l){Object.defineProperty(f,l,{get:function(){return v.override},set:function(d){v.override=!!d}})}),["useArray","keepArray","useBrackets"].forEach(function(l){Object.defineProperty(f,l,{get:function(){return v[l]},set:function(d){v[l]=d}})}),f._process=e,Qn=f,Qn}var kp=_p();const Jr=rn(kp),Cp=({name:e,label:t,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,orientation:c=$e.Horizontal,isMultiSelect:u=!1,className:h,onChange:f,itemTemplate:v})=>{const[P,l]=p.useState(),[d,b]=p.useState([]),x=gn(()=>n,[n]),y=p.useId();p.useEffect(()=>{if(u){const F=Array.isArray(r)?r.map(C=>C.toString()):r?[String(r)]:void 0;b(F??[])}else r&&l(r.toString())},[r]);const E=F=>u?d.findIndex(C=>C===F)>-1:P===F,V=F=>{const C=F.toString();if(u){const Q=E(C);let I;Q?I=d.filter(he=>he!=C):I=[...d,C],b(I),f==null||f({name:e,value:I})}else C!==P&&(l(C),f==null||f({name:e,value:C}))},R=F=>{const{value:C}=F.target;l(C),f==null||f({name:e,value:C})},S=F=>{const{value:C,checked:Q}=F.target;let I;Q?I=[...d,C]:I=d.filter(he=>he!=C),b(I),f==null||f({name:e,value:I})},$=(F,C,Q,I)=>g.jsxs("label",{htmlFor:F,className:I,children:[g.jsx("input",{id:F,name:e,value:Q,type:"checkbox",onChange:S,checked:E(Q),className:"bsc:appearance-none"}),C]},F),O=(F,C,Q,I)=>g.jsxs("label",{htmlFor:F,className:I,children:[g.jsx("input",{id:F,name:e,value:Q,type:"radio",onChange:R,checked:E(Q),className:"bsc:appearance-none"}),C]},F),q=Ir(cr.FocusWithin),z=p.useCallback((F,C)=>g.jsx(g.Fragment,{children:C}),[]),se=v||z,ae=(F,C,Q)=>{const I=`element_${y}_${C}`,he=Jr.pick(s,F),k=String(Jr.pick(o,F)),M=C===0,N=C===Q.length-1,_=de("bc-group-button-item bsc:cursor-pointer bsc:border-solid bsc:p-2 bsc:font-medium",{"bsc:has-checked:bg-primary-1 bsc:dark:has-checked:bg-mono-light-1 bsc:has-checked:text-white bsc:dark:has-checked:text-mono-dark-1 bsc:dark:text-mono-light-1 bsc:text-gray-2 bsc:border-gray-3 bsc:dark:border-mono-light-2":!i,"bc-read-only bsc:has-checked:bg-primary-4 bsc:dark:has-checked:bg-mono-light-3 bsc:has-checked:text-gray-5 bsc:dark:has-checked:text-mono-dark-3 bsc:dark:text-mono-light-3 bsc:text-gray-3 bsc:border-gray-4 bsc:dark:border-mono-light-3 bsc:pointer-events-none":i,"bsc:border-t bsc:border-l bsc:border-b bsc:rounded-l-md bsc:pl-2":M&&c===$e.Horizontal,"bsc:border-t bsc:border-r bsc:border-l bsc:border-b bsc:rounded-r-md bsc:pr-2":N&&c===$e.Horizontal,"bsc:border-t bsc:border-b":!M&&!N&&c===$e.Horizontal,"bsc:border-l":!M&&c===$e.Horizontal,"bsc:border-l bsc:border-r bsc:border-t bsc:rounded-t-md":M&&c===$e.Vertical,"bsc:border bsc:rounded-b-md":N&&c===$e.Vertical,"bsc:border-t bsc:border-l bsc:border-r":!M&&!N&&c===$e.Vertical},q),W={itemId:I,selectedValue:u?d:P,itemText:he,itemValue:k,itemData:F,itemStyles:_,isSelected:E(k),isFirstItem:M,isLastItem:N,onItemChanged:V};return u?g.jsx(kt,{props:W,template:se,children:$(I,he,k,_)}):g.jsx(kt,{props:W,template:se,children:O(I,he,k,_)})},re=de("bsc:flex bsc:flex-col bsc:gap-2",h),K=de("bsc:flex",{"bsc:flex-col bsc:w-max":c===$e.Vertical}),L=F=>g.jsx("div",{className:K,children:F.map(ae)});return g.jsxs("div",{className:re,children:[t&&g.jsx(ft,{label:t,readOnly:i}),x&&L(x)]})},Dp=p.memo(Cp),Op=({id:e,name:t,label:r,value:n,checked:s=!1,labelLocation:o=Be.Right,readOnly:i=!1,useAnimation:c,onChange:u})=>{const h=hn(c),f=p.useCallback(l=>{u==null||u(l)},[u]),v=de("bc-radio-item-wrapper bsc:flex bsc:items-center bsc:*:cursor-pointer",{"bc-read-only":i}),P=de("bc-radio-item-outer bsc:relative bsc:*:size-[21px]",{"bsc:pl-1":o===Be.Left,"bsc:pr-1":o===Be.Right,"bsc-radio-item-animate":!i&&h,"bsc-radio-item":!i,"bc-read-only bsc-radio-item-read-only":i});return g.jsxs("div",{className:v,children:[o===Be.Left&&g.jsx(ft,{label:r,htmlFor:e,readOnly:i}),g.jsxs("label",{className:P,children:[g.jsx("input",{id:e,name:t,value:n,type:"radio",checked:s,onChange:f,className:"bc-radio-item-input-hidden bsc:hidden"}),g.jsxs("svg",{viewBox:"0 0 30 30",preserveAspectRatio:"xMidYMid meet",className:"bc-radio-item-svg",children:[g.jsx("circle",{cx:15,cy:15,r:13}),g.jsx("circle",{cx:"50%",cy:"50%",r:7})]})]}),o===Be.Right&&g.jsx(ft,{label:r,htmlFor:e,readOnly:i})]})},Np=p.memo(Op),jp=({name:e,label:t,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,labelLocation:c=Be.Right,orientation:u=$e.Vertical,className:h,useAnimation:f,onChange:v})=>{const[P,l]=p.useState(r),d=gn(()=>n,[n]),b=p.useId(),x=p.useCallback(S=>{const $=S.target.value;l($),v==null||v({name:e,value:$,originalEvent:S})},[e]),y=(S,$)=>{const O=`${b}_radio_${$}`,q=Jr.pick(o,S);return g.jsx(Np,{id:O,name:e,label:Jr.pick(s,S),value:q,checked:q==P,labelLocation:c,readOnly:i,useAnimation:f,onChange:x},O)},E=de("bc-radio-container bsc:flex bsc:flex-col bsc:gap-1",h),V=de("bc-radio-wrapper bsc:flex bsc:gap-1",{"bsc:flex-col":u===$e.Vertical,"bsc:*:pr-2":u===$e.Horizontal}),R=S=>g.jsx("div",{className:V,children:S.map(y)});return g.jsxs("div",{className:E,children:[t&&g.jsx(ft,{label:t,readOnly:i}),d&&R(d)]})},Ip=p.memo(jp),Mp=({name:e,label:t,value:r,checked:n=!1,readOnly:s=!1,useAnimation:o,className:i,onChange:c})=>{const[u,h]=p.useState(!1),f=p.useId(),v=hn(o);p.useEffect(()=>{h(n)},[n]);const P=y=>{const{checked:E}=y.target;h(E),c==null||c({originalEvent:y,name:e||y.target.name,value:r||y.target.value,checked:E})},l=de("bc-toggle-wrapper bsc:flex bsc:flex-col",i),d=Ir(cr.FocusWithin),b=de("bc-toggle-container bsc-toggle-switch bsc:flex bsc:mt-0.5 bsc:relative bsc:w-[60px] bsc:h-[26px] bsc:rounded-full bsc:[transition:background-color_1s]",{"bsc:cursor-pointer bsc:bg-gray-3 bsc:dark:bg-mono-dark-3 bsc:has-checked:bg-primary-1 bsc:dark:has-checked:bg-mono-light-2":!s,"bc-read-only bsc:pointer-events-none bsc:bg-gray-4 bsc:dark:bg-mono-dark-2 bsc:has-checked:bg-primary-4 bsc:dark:has-checked:bg-mono-light-3":s},d),x=de("bc-toggle-switch bsc:absolute bsc:rounded-full bsc:dark:border bsc:dark:border-solid bsc:dark:border-mono-dark-1 bsc:w-[18px] bsc:h-[18px] bsc:top-[4px] bsc:left-[4px]",{"bsc:bg-white bsc:cursor-pointer":!s,"bc-read-only bsc:bg-gray-5 bsc:pointer-events-none":s,"bsc:[transition:0.3s]":!s&&v});return g.jsxs("div",{className:l,children:[t&&g.jsx(ft,{label:t,htmlFor:f,readOnly:s}),g.jsxs("label",{className:b,children:[g.jsx("input",{id:f,name:e,value:r,type:"checkbox",checked:u,onChange:P,className:"bsc:appearance-none"}),g.jsx("div",{id:"switch",className:x})]})]})},Rp=p.memo(Mp);ne.BeeSoftProvider=Ni,ne.Button=et,ne.Checkbox=Ys,ne.CheckboxGroup=ya,ne.ContentEditableInput=Vr,ne.DateFormatType=kr,ne.DateScrollerType=zt,ne.DateSelectionType=we,ne.DateTime=Ep,ne.FormGroupItemOrientation=$e,ne.FormattedInput=Pi,ne.GroupButton=Dp,ne.MediaQuery=An,ne.MobileOverlayPanel=mi,ne.OverlayPanel=yi,ne.RadioButton=Ip,ne.SelectionLabelLocation=Be,ne.Toggle=Rp,ne.applyBeeSoftTheme=_h,ne.createBeeSoftTheme=kh,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
86
+ Valid keys: `+JSON.stringify(Object.keys(k),null," "));var A=ie(U,D,W,J,H+"."+D,r);if(A)return A}return null}return x(M)}function L(k){switch(typeof k){case"number":case"string":case"undefined":return!0;case"boolean":return!k;case"object":if(Array.isArray(k))return k.every(L);if(k===null||c(k))return!0;var M=v(k);if(M){var N=M.call(k),_;if(M!==k.entries){for(;!(_=N.next()).done;)if(!L(_.value))return!1}else for(;!(_=N.next()).done;){var W=_.value;if(W&&!L(W[1]))return!1}}else return!1;return!0;default:return!1}}function F(k,M){return k==="symbol"?!0:M?M["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&M instanceof Symbol:!1}function C(k){var M=typeof k;return Array.isArray(k)?"array":k instanceof RegExp?"object":F(M,k)?"symbol":M}function Q(k){if(typeof k>"u"||k===null)return""+k;var M=C(k);if(M==="object"){if(k instanceof Date)return"date";if(k instanceof RegExp)return"regexp"}return M}function I(k){var M=Q(k);switch(M){case"array":case"object":return"an "+M;case"boolean":case"date":case"regexp":return"a "+M;default:return M}}function he(k){return!k.constructor||!k.constructor.name?P:k.constructor.name}return l.checkPropTypes=s,l.resetWarningCache=s.resetWarningCache,l.PropTypes=l,l},Bn}var Un,ui;function Uh(){if(ui)return Un;ui=1;var e=Yn();function t(){}function r(){}return r.resetWarningCache=t,Un=function(){function n(i,c,u,h,f,v){if(v!==e){var P=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw P.name="Invariant Violation",P}}n.isRequired=n;function s(){return n}var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:s,element:n,elementType:n,instanceOf:s,node:n,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o},Un}var li;function qh(){if(li)return zr.exports;if(li=1,process.env.NODE_ENV!=="production"){var e=ri(),t=!0;zr.exports=Bh()(e.isElement,t)}else zr.exports=Uh()();return zr.exports}var zh=qh();const ue=rn(zh),fi={disabled:!1};var Kh=process.env.NODE_ENV!=="production"?ue.oneOfType([ue.number,ue.shape({enter:ue.number,exit:ue.number,appear:ue.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&ue.oneOfType([ue.string,ue.shape({enter:ue.string,exit:ue.string,active:ue.string}),ue.shape({enter:ue.string,enterDone:ue.string,enterActive:ue.string,exit:ue.string,exitDone:ue.string,exitActive:ue.string})]);const di=p.createContext(null);var Zh=function(t){return t.scrollTop},Sr="unmounted",Ct="exited",Dt="entering",Bt="entered",qn="exiting",pt=function(e){$h(t,e);function t(n,s){var o;o=e.call(this,n,s)||this;var i=s,c=i&&!i.isMounting?n.enter:n.appear,u;return o.appearStatus=null,n.in?c?(u=Ct,o.appearStatus=Dt):u=Bt:n.unmountOnExit||n.mountOnEnter?u=Sr:u=Ct,o.state={status:u},o.nextCallback=null,o}t.getDerivedStateFromProps=function(s,o){var i=s.in;return i&&o.status===Sr?{status:Ct}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(s){var o=null;if(s!==this.props){var i=this.state.status;this.props.in?i!==Dt&&i!==Bt&&(o=Dt):(i===Dt||i===Bt)&&(o=qn)}this.updateStatus(!1,o)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var s=this.props.timeout,o,i,c;return o=i=c=s,s!=null&&typeof s!="number"&&(o=s.exit,i=s.enter,c=s.appear!==void 0?s.appear:i),{exit:o,enter:i,appear:c}},r.updateStatus=function(s,o){if(s===void 0&&(s=!1),o!==null)if(this.cancelNextCallback(),o===Dt){if(this.props.unmountOnExit||this.props.mountOnEnter){var i=this.props.nodeRef?this.props.nodeRef.current:Je.findDOMNode(this);i&&Zh(i)}this.performEnter(s)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ct&&this.setState({status:Sr})},r.performEnter=function(s){var o=this,i=this.props.enter,c=this.context?this.context.isMounting:s,u=this.props.nodeRef?[c]:[Je.findDOMNode(this),c],h=u[0],f=u[1],v=this.getTimeouts(),P=c?v.appear:v.enter;if(!s&&!i||fi.disabled){this.safeSetState({status:Bt},function(){o.props.onEntered(h)});return}this.props.onEnter(h,f),this.safeSetState({status:Dt},function(){o.props.onEntering(h,f),o.onTransitionEnd(P,function(){o.safeSetState({status:Bt},function(){o.props.onEntered(h,f)})})})},r.performExit=function(){var s=this,o=this.props.exit,i=this.getTimeouts(),c=this.props.nodeRef?void 0:Je.findDOMNode(this);if(!o||fi.disabled){this.safeSetState({status:Ct},function(){s.props.onExited(c)});return}this.props.onExit(c),this.safeSetState({status:qn},function(){s.props.onExiting(c),s.onTransitionEnd(i.exit,function(){s.safeSetState({status:Ct},function(){s.props.onExited(c)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(s,o){o=this.setNextCallback(o),this.setState(s,o)},r.setNextCallback=function(s){var o=this,i=!0;return this.nextCallback=function(c){i&&(i=!1,o.nextCallback=null,s(c))},this.nextCallback.cancel=function(){i=!1},this.nextCallback},r.onTransitionEnd=function(s,o){this.setNextCallback(o);var i=this.props.nodeRef?this.props.nodeRef.current:Je.findDOMNode(this),c=s==null&&!this.props.addEndListener;if(!i||c){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[i,this.nextCallback],h=u[0],f=u[1];this.props.addEndListener(h,f)}s!=null&&setTimeout(this.nextCallback,s)},r.render=function(){var s=this.state.status;if(s===Sr)return null;var o=this.props,i=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var c=Fh(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return p.createElement(di.Provider,{value:null},typeof i=="function"?i(s,c):p.cloneElement(p.Children.only(i),c))},t}(p.Component);pt.contextType=di,pt.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:ue.shape({current:typeof Element>"u"?ue.any:function(e,t,r,n,s,o){var i=e[t];return ue.instanceOf(i&&"ownerDocument"in i?i.ownerDocument.defaultView.Element:Element)(e,t,r,n,s,o)}}),children:ue.oneOfType([ue.func.isRequired,ue.element.isRequired]).isRequired,in:ue.bool,mountOnEnter:ue.bool,unmountOnExit:ue.bool,appear:ue.bool,enter:ue.bool,exit:ue.bool,timeout:function(t){var r=Kh;t.addEndListener||(r=r.isRequired);for(var n=arguments.length,s=new Array(n>1?n-1:0),o=1;o<n;o++)s[o-1]=arguments[o];return r.apply(void 0,[t].concat(s))},addEndListener:ue.func,onEnter:ue.func,onEntering:ue.func,onEntered:ue.func,onExit:ue.func,onExiting:ue.func,onExited:ue.func}:{};function Ut(){}pt.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Ut,onEntering:Ut,onEntered:Ut,onExit:Ut,onExiting:Ut,onExited:Ut},pt.UNMOUNTED=Sr,pt.EXITED=Ct,pt.ENTERING=Dt,pt.ENTERED=Bt,pt.EXITING=qn;const hi=({start:e,timeout:t=400,defaultStyle:r,transitionStyles:n,showTransitionOptions:s="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:o="linear",unmountOnExit:i=!1,onEntering:c,onEntered:u,onExit:h,onExited:f,children:v})=>{const P=r||{transition:`opacity ${t}ms ${s}`,opacity:0},l=n||{entering:{opacity:1},entered:{opacity:1},exiting:{transition:`opacity ${t}ms ${o}`,opacity:0},exited:{transition:`opacity ${t}ms ${o}`,opacity:0},unmounted:{}};return g.jsx(pt,{in:e,timeout:t,onEntering:c,onEntered:u,onExit:h,onExited:f,unmountOnExit:i,children:d=>v({state:d,defaultStyle:P,transitionStyles:l})})};function pi(e){return e.target?e.target:e}const mi=({visible:e,target:t,appendTo:r=document.body,unmountWhenHidden:n=!1,transitionDuration:s=400,showTransitionOptions:o="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:i="linear",approveText:c="DONE",shown:u,hidden:h,isClickedWithin:f,children:v})=>{const[P,l]=p.useState(-1),[d,b]=p.useState(-1),[x,y]=p.useState(e),E=p.useRef(100),V=p.useRef(101),R=p.useRef(),S=p.useRef(),$=p.useRef();p.useEffect(()=>{t&&(R.current=pi(t));const K=Ko("zIndex",L=>L==="auto"||L==="-1"?!1:parseInt(L)>100).map(L=>parseInt(L,10));K.length>0&&(E.current=Math.max(...K)+1,V.current=Math.max(...K)+2),y(e)},[e,t]);const O=K=>{S.current=K},q=()=>{b(E.current),l(V.current)},z=()=>{if(!S.current)return;u==null||u();let K;R.current&&(K=[R.current]);const L=F=>{F?f==null||f():y(!1)};$.current=Qo(S.current,L,K)},se=()=>{$.current&&Xo($.current)},ae=()=>{b(-1),l(-1),h==null||h()},re={entering:{opacity:.5},entered:{opacity:.5}};return Je.createPortal(g.jsx(hi,{start:x,timeout:s,showTransitionOptions:o,hideTransitionOptions:i,onEntering:q,onEntered:z,onExit:se,onExited:ae,unmountOnExit:n,children:({state:K,defaultStyle:L,transitionStyles:F})=>g.jsxs("div",{ref:C=>C&&O(C),children:[g.jsx("div",{className:"bsc:fixed bsc:left-0 bsc:top-0 bsc:h-full bsc:w-full bsc:bg-mono-dark-1",style:{zIndex:d,...F[K],...re[K]}}),g.jsxs("div",{className:"dark:bsck-border-mono-light-1 bsc:fixed bsc:bottom-0 bsc:left-0 bsc:w-full bsc:bg-white bsc:dark:border-t bsc:dark:border-solid bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1",style:{zIndex:P,...L,...F[K]},children:[g.jsx("div",{className:"bsc:w-full",children:v}),g.jsx(g.Fragment,{children:g.jsx(et,{buttonType:"primary",fullWidth:!0,onClick:()=>y(!1),className:"bsc:text-xs bsc:font-bold",children:c})})]})]})}),r)};var gi=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(gi||{}),bi=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(bi||{});class ke{static positionToTarget(t,r=2){const n=t.getBoundingClientRect();let s=0,o=0;const i=window.scrollY;switch(r){case 2:s=n.top+n.height+i,o=n.left;break;case 0:s=n.top+i,o=n.left;break;case 3:s=n.top+n.height+i,o=n.left+n.width;break;case 1:s=n.top+i,o=n.left+n.width}return{top:s,left:o}}static positionElementToTarget(t,r,n=0,s=2){let{left:o,top:i}=ke.positionToTarget(r,s);const c=t.getBoundingClientRect();switch(n){case 0:break;case 1:o=o-c.width;break;case 2:i=i-c.height;break;case 3:i=i-c.height,o=o-c.width;break}return{top:i,left:o}}static canPositionElementOnScreenWithTarget(t,r){const n=ke.getScreenDimensions(),s=t.getBoundingClientRect(),o=ke.positionElementToTarget(t,r,0,2);if(o.left+s.width<n.width&&o.top+s.height<n.height||ke.positionElementToTarget(t,r,1,3).left>=0&&o.top+s.height<n.height)return!0;const c=ke.positionElementToTarget(t,r,2,0);if(c.left+s.width<n.width&&c.top>=0)return!0;const u=ke.positionElementToTarget(t,r,3,1);return u.left>=0&&u.top>=0}static canPositionElementOnScreen(t){const r=ke.getScreenDimensions(),n=t.getBoundingClientRect();return n.width<=r.width&&n.height<=r.height}static positionElementToTargetOnScreen(t,r,n=0,s=2){const{left:o,top:i}=ke.positionElementToTarget(t,r,n,s),c=t.getBoundingClientRect(),u=ke.determineOffScreenLocation(c);if(u){if(n===0&&s===2){if(u.right&&!u.bottom)return ke.positionElementToTarget(t,r,1,3);if(u.bottom&&!u.right)return ke.positionElementToTarget(t,r,2,0);if(u.right&&u.bottom)return ke.positionElementToTarget(t,r,3,1)}else if(n===1&&s===3){if(u.left&&!u.bottom)return ke.positionElementToTarget(t,r,0,2);if(u.bottom&&!u.left)return ke.positionElementToTarget(t,r,3,1);if(u.left&&u.bottom)return ke.positionElementToTarget(t,r,2,0)}}return{top:i,left:o}}static determineOffScreenLocation(t){const r=ke.getScreenDimensions(),n={left:t.left<0,top:t.top<0,right:t.left+t.width>r.width,bottom:t.top+t.height>r.height};return n.left||n.top||n.right||n.bottom?n:void 0}static getScreenDimensions(){return{width:window.innerWidth,height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}}}const yi=({visible:e,target:t,targetPosition:r=gi.BottomLeft,elementAlignment:n=bi.TopLeft,shouldTargetCloseOverlay:s=!0,shouldMatchTargetWidth:o=!1,shouldScrollCloseOverlay:i=!1,shouldCheckZIndex:c=!1,shouldRemainOnScreen:u=!1,unmountWhenHidden:h=!1,transitionDuration:f=400,showTransitionOptions:v="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:P="linear",shown:l,hidden:d,isClickedWithin:b,markupCreated:x,children:y})=>{const[E,V]=p.useState(-1),[R,S]=p.useState(e),[$,O]=p.useState(!1),q=p.useRef(!1),z=p.useRef(100),se=p.useRef({left:0,top:0,width:0}),ae=p.useRef(),re=p.useRef(),K=p.useRef(),L=p.useRef(),F=p.useRef(),C=p.useRef(),Q=cs();p.useEffect(()=>(u===!0&&(C.current=new ResizeObserver(I)),()=>{var H,U;u===!0&&(re.current&&((H=C.current)==null||H.unobserve(re.current)),(U=C.current)==null||U.disconnect())}),[]),p.useEffect(()=>{if(t&&(ae.current=pi(t),i)){const H=Q==null?void 0:Q.isValidScrollableElement;K.current=zo(ae.current,{overflow:"scroll, auto",overflowX:"scroll, auto",overflowY:"scroll, auto"},!1,H),K.current.tagName.toLowerCase()==="html"&&(K.current=document)}if(c){const H=Ko("zIndex",U=>parseInt(U)>=100).map(U=>parseInt(U));H.length>0&&(z.current=Math.max(...H)+1)}e!==void 0&&S(e)},[t,e,i,c]);const I=H=>{if(re.current){const U=ke.getScreenDimensions(),Z=H[H.length-1].target,te=Z.getBoundingClientRect(),D=ke.determineOffScreenLocation(te);if(D){if(ae.current&&ke.canPositionElementOnScreenWithTarget(Z,ae.current)){const ie=ke.positionElementToTargetOnScreen(re.current,ae.current,n,r);se.current={...se.current,...ie}}else D.right?se.current.left=U.width-te.width:D.left&&(se.current.left=0),D.bottom?se.current.top=U.height-te.height:D.top&&(se.current.top=0);he()}}},he=yr(()=>{q.current=!q.current,O(q.current)},20),k=()=>{V(z.current)},M=()=>{if(!re.current)return;l==null||l();let H;!s&&ae.current&&(H=[ae.current]);const U=Z=>{Z?b==null||b():S(!1)};L.current=Qo(re.current,U,H),i&&(F.current=of(Z=>re.current&&Ph(Z,re.current)&&S(!1),100,{leading:!0}),K.current&&K.current.addEventListener("scroll",F.current))},N=()=>{K.current&&F.current&&(K.current.removeEventListener("scroll",F.current),F.current=void 0),L.current&&Xo(L.current)},_=()=>{V(-1),d==null||d()},W=H=>{var U,Z;if(u===!0&&re.current&&((U=C.current)==null||U.unobserve(re.current)),re.current=H,x==null||x(H),ae.current){const te=ke.positionElementToTarget(re.current,ae.current,n,r);se.current={...te,width:ae.current.offsetWidth},u===!0&&(ke.canPositionElementOnScreenWithTarget(re.current,ae.current)||ke.canPositionElementOnScreen(re.current))&&((Z=C.current)==null||Z.observe(re.current))}},J=p.useMemo(()=>{const H={top:`${se.current.top}px`,left:`${se.current.left}px`,zIndex:E};return o&&(H.width=`${se.current.width}px`),H},[$,E,o]);return g.jsx(hi,{start:R,timeout:f,showTransitionOptions:v,hideTransitionOptions:P,onEntering:k,onEntered:M,onExit:N,onExited:_,unmountOnExit:h,children:({state:H,defaultStyle:U,transitionStyles:Z})=>g.jsx("div",{className:"bsc:fixed bsc:border! bsc:border-solid! bsc:border-black bsc:bg-white bsc:shadow bsc:dark:border-mono-light-1 bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1",style:{...J,...U,...Z[H]},ref:te=>te&&W(te),children:y})})};let Zr;const Gh=new Uint8Array(16);function Qh(){if(!Zr&&(Zr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Zr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Zr(Gh)}const Fe=[];for(let e=0;e<256;++e)Fe.push((e+256).toString(16).slice(1));function Xh(e,t=0){return Fe[e[t+0]]+Fe[e[t+1]]+Fe[e[t+2]]+Fe[e[t+3]]+"-"+Fe[e[t+4]]+Fe[e[t+5]]+"-"+Fe[e[t+6]]+Fe[e[t+7]]+"-"+Fe[e[t+8]]+Fe[e[t+9]]+"-"+Fe[e[t+10]]+Fe[e[t+11]]+Fe[e[t+12]]+Fe[e[t+13]]+Fe[e[t+14]]+Fe[e[t+15]]}const vi={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Jh(e,t,r){if(vi.randomUUID&&!e)return vi.randomUUID();e=e||{};const n=e.random||(e.rng||Qh)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Xh(n)}class Er{static create(t){const r=[];let n=0;for(let s=0,o=t.formatParts.length;s<o;s++){const i=t.formatParts[s],c=n,u=c+i.characterCount;r.push({startPosition:c,endPosition:u,...i}),n=u}return r}}class ep{constructor(t,r){T(this,"instanceCollection");T(this,"formatPartList");T(this,"inputSlotCollection");T(this,"currentPartIndex",0);T(this,"currentPartIndices",[]);T(this,"currentCursorPosition",0);T(this,"highlightCursorPosition",0);T(this,"currentCursorStartPosition",-1);T(this,"currentCursorEndPosition",-1);T(this,"inputElement");T(this,"inputSelection",null);T(this,"inputRange");T(this,"textNode");this.instanceCollection=qt.getInstance(),this.formatPartList=Er.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t)}get isSelection(){return this.inputRange!==void 0&&this.inputRange.startOffset!==this.inputRange.endOffset}get isAllSelected(){var r;const t=this.inputSlotCollection.getLastSlot();return this.isSelection&&((r=this.inputRange)==null?void 0:r.startOffset)===0&&this.inputRange.endOffset===t.endPosition}getCursorPosition(){return this.currentCursorPosition}getCursorStartPosition(){return this.currentCursorStartPosition}getCursorEndPosition(){return this.currentCursorEndPosition}getCurrentPartIndex(){return this.currentPartIndex}getCurrentPartIndices(){return this.currentPartIndices}setInputElement(t){this.inputElement=t}setCursorToCurrentPosition(){this.setCursorSelection(this.currentCursorPosition>-1?this.currentCursorPosition:this.highlightCursorPosition)}setCursorPosition(t){this.setCursorSelection(t)}setCursorSelection(t,r){if(this.createInputRangeSelection(),this.inputRange&&this.textNode){let n,s,o=!0;r===void 0?(n=t,s=t):t<r?(n=t,s=r):(o=!1,n=r,s=t),this.inputRange.setStart(this.textNode,n),this.inputRange.setEnd(this.textNode,s),this.currentPartIndices=[],n===s?(this.currentCursorPosition=s,this.highlightCursorPosition=s,this.currentCursorStartPosition=-1,this.currentCursorEndPosition=-1,this.setPartIndexByCursorPosition()):(o?this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=s:this.currentCursorStartPosition!==n?this.highlightCursorPosition=n:this.currentCursorEndPosition!==s&&(this.highlightCursorPosition=s):this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1?this.highlightCursorPosition=n:this.currentCursorStartPosition!==s?this.highlightCursorPosition=s:this.currentCursorEndPosition!==n&&(this.highlightCursorPosition=n),this.currentCursorStartPosition=n,this.currentCursorEndPosition=s,this.currentCursorPosition=-1,this.setPartIndexByHighlightPosition(),this.setPartIndicesByCursorPositions())}}findCursorPosition(){var n;const t=window.getSelection(),r=t==null?void 0:t.getRangeAt(0);if(this.inputElement&&t&&r){const s=document.createTreeWalker(this.inputElement,NodeFilter.SHOW_TEXT,u=>{const h=document.createRange();return h.selectNodeContents(u),h.compareBoundaryPoints(Range.END_TO_END,r)<1?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let o=0;for(;s.nextNode();)o+=((n=s.currentNode.textContent)==null?void 0:n.length)||0;r.startContainer.nodeType===Node.TEXT_NODE&&(o+=r.startOffset);const i=this.inputSlotCollection.getLastSlotWithData(),c=i.startPosition+i.partText.length;t.anchorOffset===t.focusOffset?this.setCursorSelection(o>c?c:o):this.setCursorSelection(t.anchorOffset,t.focusOffset)}}isAtLastPart(){return this.currentPartIndex===this.formatPartList.length-1}moveHome(){const t=this.inputSlotCollection.getFirstSlot();this.setCursorSelection(t.startPosition)}moveEnd(){const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length;this.setCursorSelection(r)}moveCursorLeft(){if(this.updateCursorPosition(),this.currentCursorPosition>0&&!this.isSelection){const t=this.currentCursorPosition-1;let r=this.formatPartList[this.currentPartIndex];if(t>=r.startPosition&&t<=r.endPosition)this.setCursorSelection(t);else for(let n=this.currentPartIndex-1;n>=0;n--)if(r=this.formatPartList[n],t>=r.startPosition&&t<=r.endPosition){r.isSeparator?this.setCursorSelection(this.formatPartList[n-1].endPosition):this.setCursorSelection(t);break}}else this.isSelection?this.setCursorSelection(this.currentCursorPosition):this.moveHome()}moveCursorRight(){this.updateCursorPosition(!1);const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length;if(this.currentCursorPosition<r&&!this.isSelection){const n=this.currentCursorPosition+1;let s=this.formatPartList[this.currentPartIndex];if(n>=s.startPosition&&n<=s.endPosition)this.setCursorSelection(n);else for(let o=this.currentPartIndex+1,i=this.formatPartList.length;o<i;o++)if(s=this.formatPartList[o],n>=s.startPosition&&n<=s.endPosition){s.isSeparator?this.setCursorSelection(this.formatPartList[o+1].startPosition):this.setCursorSelection(n);break}}else this.setCursorSelection(this.currentCursorPosition)}moveToNextInputPart(){if(this.currentPartIndex<this.formatPartList.length-1){const t=this.findNextEditablePart();t&&(this.currentPartIndex=t.partIndex,this.setCursorSelection(t.startPosition))}}moveToPreviousInputPart(){if(this.currentPartIndex>0){const t=this.findPreviousEditablePart();t&&(this.currentPartIndex=t.partIndex,this.setCursorSelection(t.endPosition))}}highlightAll(){const t=this.formatPartList[this.formatPartList.length-1].endPosition;this.setCursorSelection(0,t)}moveHighlightLeft(){this.updateHighlightPositions();const t=this.highlightCursorPosition>this.currentCursorStartPosition;if(this.currentCursorStartPosition>0||t){let r=t?this.currentCursorStartPosition:this.currentCursorStartPosition-1,n=t?this.highlightCursorPosition-1:this.currentCursorEndPosition,s=this.formatPartList[this.currentPartIndex];if(r>=s.startPosition&&r<=s.endPosition||t&&n>=s.startPosition&&n<=s.endPosition)this.setCursorSelection(r,n);else for(let o=this.currentPartIndex-1;o>=0;o--)if(s=this.formatPartList[o],r>=s.startPosition&&r<=s.endPosition||t&&n>=s.startPosition&&n<=s.endPosition){s.isSeparator?(t?n=this.formatPartList[o-1].endPosition:r=this.formatPartList[o-1].endPosition,this.setCursorSelection(r,n)):this.setCursorSelection(r,n);break}}}moveHighlightRight(){this.updateHighlightPositions();const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length,n=this.highlightCursorPosition<this.currentCursorEndPosition;if(this.currentCursorEndPosition<r||n){let s=n?this.highlightCursorPosition+1:this.currentCursorStartPosition,o=n?this.currentCursorEndPosition:this.currentCursorEndPosition+1,i=this.formatPartList[this.currentPartIndex];if(o>=i.startPosition&&o<=i.endPosition||n&&s>=i.startPosition&&s<=i.endPosition)this.setCursorSelection(s,o);else for(let c=this.currentPartIndex+1,u=this.formatPartList.length;c<u;c++)if(i=this.formatPartList[c],o>=i.startPosition&&o<=i.endPosition||n&&s>=i.startPosition&&s<=i.endPosition){i.isSeparator?(n?s=this.formatPartList[c+1].startPosition:o=this.formatPartList[c+1].startPosition,this.setCursorSelection(s,o)):this.setCursorSelection(s,o);break}}}updateHighlightPositions(){this.currentCursorStartPosition===-1&&this.currentCursorEndPosition===-1&&this.currentCursorPosition>-1&&(this.currentCursorStartPosition=this.currentCursorPosition,this.currentCursorEndPosition=this.currentCursorPosition,this.highlightCursorPosition=this.currentCursorPosition)}updateCursorPosition(t=!0){this.currentCursorPosition===-1&&this.currentCursorStartPosition>-1&&this.currentCursorEndPosition>-1&&(t?this.currentCursorPosition=this.currentCursorStartPosition:this.currentCursorPosition=this.currentCursorEndPosition)}findNextEditablePart(){return this.inputSlotCollection.getNextSlot(this.currentPartIndex)}findPreviousEditablePart(){return this.inputSlotCollection.getPreviousSlot(this.currentPartIndex)}setPartIndexByCursorPosition(){for(let t=0;t<this.formatPartList.length;t++){const r=this.formatPartList[t];if(this.currentCursorPosition>=r.startPosition&&this.currentCursorPosition<=r.endPosition){if(r.isSeparator){this.currentCursorPosition=this.formatPartList[t+1].startPosition,this.currentPartIndex=t+1;break}this.currentPartIndex=t;break}}}setPartIndexByHighlightPosition(){for(let t=0;t<this.formatPartList.length;t++){const r=this.formatPartList[t];if(this.highlightCursorPosition>=r.startPosition&&this.highlightCursorPosition<=r.endPosition){if(r.isSeparator){this.highlightCursorPosition=this.formatPartList[t+1].startPosition,this.currentPartIndex=t+1;break}this.currentPartIndex=t;break}}}setPartIndicesByCursorPositions(){for(let t=0,r=this.formatPartList.length;t<r;t++){const n=this.formatPartList[t];n.isSeparator||(n.startPosition>=this.currentCursorStartPosition&&n.startPosition<=this.currentCursorEndPosition||n.endPosition>=this.currentCursorStartPosition&&n.endPosition<=this.currentCursorEndPosition||n.startPosition<this.currentCursorStartPosition&&n.endPosition>this.currentCursorEndPosition)&&this.currentPartIndices.push(t)}}createInputRangeSelection(){var t,r;this.inputElement&&(this.inputSelection=window.getSelection(),this.inputRange=document.createRange(),(t=this.inputSelection)==null||t.removeAllRanges(),this.inputRange.selectNodeContents(this.inputElement),this.inputRange.collapse(!0),(r=this.inputSelection)==null||r.addRange(this.inputRange),this.inputElement.firstChild&&(this.textNode=this.inputElement.firstChild))}}class tp{static create(t){const r=[];for(let n=0,s=t.length;n<s;n++){const o=t[n];o.isSeparator||r.push({partIndex:n,partText:"",isComplete:!1,...o})}return r}}class rp{constructor(t){T(this,"inputSlots");this.inputSlots=tp.create(Er.create(t))}clearAllSlots(){for(let t=0,r=this.inputSlots.length;t<r;t++)this.inputSlots[t].partText=""}getSlot(t){return this.inputSlots.find(r=>r.partIndex===t)}getSlots(t){return this.inputSlots.filter(r=>t.includes(r.partIndex))}getSlotsFromCursorPosition(t){let r=-1;for(let n=0,s=this.inputSlots.length;n<s;n++){const o=this.inputSlots[n];if(t>=o.startPosition&&t<=o.endPosition){r=o.partIndex;break}}return r>-1?this.inputSlots.filter(n=>n.partIndex>=r):void 0}getFirstSlot(){return this.inputSlots[0]}getLastSlot(){return this.inputSlots[this.inputSlots.length-1]}getNextSlot(t){const r=this.inputSlots.findIndex(n=>n.partIndex===t);if(r>-1&&r+1<this.inputSlots.length)return this.inputSlots[r+1]}getPreviousSlot(t){const r=this.inputSlots.findIndex(n=>n.partIndex===t);if(r>-1&&r-1>=0)return this.inputSlots[r-1]}getLastSlotWithData(){const t=this.inputSlots.findIndex(n=>!n.isComplete);let r=t;for(let n=t+1,s=this.inputSlots.length;n<s;n++)this.inputSlots[n].partText.length>0&&(r=n);return this.inputSlots[r>-1?r:0]}allSlotsCompleted(){return this.inputSlots.every(t=>t.isComplete)}allSlotsEmpty(){return this.inputSlots.every(t=>t.partText.length===0)}}class qt{static getInstance(){return this.instance||(this.instance=new np),this.instance}}T(qt,"instance");class np{constructor(){T(this,"navigatorInstances");T(this,"inputSlotInstances");this.navigatorInstances={},this.inputSlotInstances={}}getNavigatorInstance(t,r){return this.navigatorInstances[t]||(this.navigatorInstances[t]=new ep(r,t)),this.navigatorInstances[t]}getInputSlotInstance(t,r){return this.inputSlotInstances[t]||(this.inputSlotInstances[t]=new rp(r)),this.inputSlotInstances[t]}removeInstances(t){this.navigatorInstances[t]&&delete this.navigatorInstances[t],this.inputSlotInstances[t]&&delete this.inputSlotInstances[t]}}class zn{constructor(t,r){T(this,"instanceCollection");T(this,"formatPartList");T(this,"inputSlotCollection");T(this,"inputElement");this.instanceCollection=qt.getInstance(),this.formatPartList=Er.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t)}setInputElement(t){this.inputElement=t}render(){var r;let t="";for(let n=0,s=this.formatPartList.length;n<s;n++){const o=this.formatPartList[n];if(o.isSeparator)t+=o.inputText;else{const i=this.inputSlotCollection.getSlot(n);i&&(t+=i.partText+((r=i.inputText)==null?void 0:r.repeat(i.characterCount-i.partText.length)))}}this.inputElement&&(this.inputElement.innerHTML=t)}}var st=(e=>(e[e.Text=0]="Text",e[e.Numeric=1]="Numeric",e))(st||{});class xi{constructor(){T(this,"numberKeys",["0","1","2","3","4","5","6","7","8","9"]);T(this,"movementKeys",["ArrowLeft","ArrowRight","Home","End","a"]);T(this,"editingKeys",["Backspace","Delete"]);T(this,"ignoreKeys",["Shift","Alt","Control","Fn","Meta"])}isNumberKey(t){return this.numberKeys.includes(t)}isMovementKey(t){return this.movementKeys.includes(t.key)}isEditingKey(t){return this.editingKeys.includes(t.key)}isIgnoreKey(t){return this.ignoreKeys.includes(t.key)}}class sp{constructor(t){T(this,"_currentIndex",0);T(this,"index",0);T(this,"formatParts");this.formatParts=Er.create(t)}get currentIndex(){return this._currentIndex}hasNext(){return this.index<this.formatParts.length}next(){if(this.index<this.formatParts.length)return this._currentIndex=this.index++,this.formatParts[this._currentIndex]}peek(){if(this.index<this.formatParts.length)return this.formatParts[this.index]}reset(){this.index=0}}class op{constructor(t){T(this,"formatParts");this.formatParts=Er.create(t)}getUniqueSeparators(){const t=[],r=this.formatParts.filter(n=>n.isSeparator);for(let n=0,s=r.length;n<s;n++){const o=r[n];o.inputText&&!t.includes(o.inputText)&&t.push(o.inputText)}return t}}class wi{constructor(t,r){T(this,"instanceCollection");T(this,"inputSlotCollection");T(this,"formatNavigator");T(this,"keyTypeChecker");T(this,"formatRenderer");T(this,"formatPartList");T(this,"partEntryList");this.format=t,this.instanceCollection=qt.getInstance(),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.keyTypeChecker=new xi,this.formatRenderer=new zn(t,r),this.formatPartList=new sp(t),this.partEntryList=new op(t)}setInputElement(t){this.formatRenderer.setInputElement(t)}processKeyPress(t){if(this.keyTypeChecker.isEditingKey(t)){this.processEditRules(t);return}this.formatNavigator.isSelection?(this.processSelectionEditRules(),setTimeout(()=>this.processInputRules(t))):this.processInputRules(t)}processInputValue(t){var n;this.inputSlotCollection.clearAllSlots(),this.formatPartList.reset();let r=0;for(;this.formatPartList.hasNext();){const s=this.formatPartList.next();if(s&&!s.isSeparator)if(((n=this.formatPartList.peek())==null?void 0:n.isSeparator)===!0){const o=this.formatPartList.currentIndex,i=this.formatPartList.next();if(i&&i.inputText){const c=t.indexOf(i.inputText,r),u=this.inputSlotCollection.getSlot(o);if(u&&c>-1){const h=c-r>u.characterCount?r+u.characterCount:c;u.partText=t.substring(r,h),this.processSlotRules(u),r=c+i.characterCount}}}else{const o=this.inputSlotCollection.getSlot(this.formatPartList.currentIndex);o&&(o.partText=t.substring(r,r+o.characterCount),this.processSlotRules(o))}}}processPastedValue(t,r=!1){r&&this.processSelectionEditRules();const n=this.formatNavigator.getCursorPosition(),s=this.inputSlotCollection.getSlotsFromCursorPosition(n);if(s){const o=n-s[0].startPosition,i=s[0].partText.substring(0,o);let c=s[0].partText.substring(o);s[0].partText="";for(let v=1,P=s.length;v<P;v++)c+=s[v].partText,s[v].partText="";const u=this.removeSeparatorsFromValue(t),h=i+u+c;let f=0;for(let v=0,P=s.length;v<P;v++){const l=s[v];l.partText=h.substring(f,l.characterCount+f),f+=l.characterCount,this.processSlotRules(l)}}}removeSeparatorsFromValue(t){let r=t;const n=this.partEntryList.getUniqueSeparators();for(let s=0,o=n.length;s<o;s++){const i=n[s];r=r.replaceAll(i,"")}return r}processEditRules(t){this.formatNavigator.isSelection?this.processSelectionEditRules():this.processNonSelectionEditRules(t)}processNonSelectionEditRules(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const n=this.formatNavigator.getCursorPosition(),s=n-r.startPosition,o=this.format.deleteShiftsFormatPart||!1;switch(t.key){case"Backspace":{if(!(r.startPosition===n))r.partText=r.partText.substring(0,s-1)+r.partText.substring(s),o&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.moveCursorLeft(),this.processSlotRules(r,!0);else{this.processSlotRules(r,!0);const c=this.inputSlotCollection.getPreviousSlot(r.partIndex);c&&(c.partText=c.partText.substring(0,c.partText.length-1),o&&this.shiftFormatParts(c),this.formatRenderer.render(),this.formatNavigator.setCursorPosition(c.startPosition+c.partText.length),this.processSlotRules(c,!0))}break}case"Delete":r.partText=r.partText.substring(0,s)+r.partText.substring(s+1),o&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.setCursorToCurrentPosition(),this.processSlotRules(r,!0);break}}processSelectionEditRules(){const t=this.inputSlotCollection.getSlots(this.formatNavigator.getCurrentPartIndices());if(t.length<=0)return;const r=this.formatNavigator.getCursorStartPosition(),n=this.formatNavigator.getCursorEndPosition();for(let s=0,o=t.length;s<o;s++){const i=t[s];i.startPosition>=r&&i.endPosition<=n?i.partText="":i.startPosition>=r&&i.endPosition>n?i.partText=i.partText.substring(n-i.startPosition):i.startPosition<r&&i.endPosition<=n?i.partText=i.partText.substring(0,r-i.startPosition):i.startPosition<r&&i.endPosition>n&&(i.partText=i.partText.substring(0,r-i.startPosition)+i.partText.substring(n-i.startPosition))}this.formatRenderer.render(),this.formatNavigator.setCursorPosition(r);for(let s=0,o=t.length;s<o;s++)this.processSlotRules(t[s])}shiftFormatParts(t){let r=t,n;for(;(n=this.inputSlotCollection.getNextSlot(r.partIndex))!==void 0;){const s=n.partText.substring(0,1);n.partText=n.partText.substring(1),r.partText=r.partText+s,r=n}}processInputRules(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const{key:n}=t,s=r.characterCount,o=r.partText;if(r.valueType===st.Numeric){if(!this.keyTypeChecker.isNumberKey(n))return;const i=r.maximumValue,c=r.exceedingMaximumValueCausesTab||!1,u=r.padWithZeros||!1,h=parseInt(this.createNewValue(r,n));if(i&&h>i)if(c){u&&(r.partText=r.partText.padStart(s,"0")),r.isComplete=!0;const f=this.inputSlotCollection.getNextSlot(r.partIndex);f&&!f.isComplete&&(f.partText=n),this.formatRenderer.render(),f&&this.formatNavigator.setCursorPosition(f.isComplete?f.startPosition:f.startPosition+1)}else return;else o.length+1===s?(this.addToInputSlot(n),r.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):o.length+1<s&&(this.addToInputSlot(n),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}else o.length+1===s?(this.addToInputSlot(n),r.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):(this.addToInputSlot(n),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}addToInputSlot(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());r&&(r.partText=this.createNewValue(r,t))}createNewValue(t,r){const n=t.partText,s=this.formatNavigator.getCursorPosition();if(s>=t.startPosition+t.partText.length)return n+r;{const o=s-t.startPosition;return n.substring(0,o)+r+n.substring(o)}}processSlotRules(t,r=!1){const n=t.characterCount,s=t.allCharactersRequired||!1;if(t.valueType===st.Numeric){const o=t.minimumValue,i=t.maximumValue;if(s)t.isComplete=t.partText.length===n;else if(o!==void 0&&i!==void 0){const c=t.padWithZeros||!1,u=parseInt(t.partText);t.isComplete=u>=o&&u<=i,t.isComplete&&c&&!r&&(t.partText=t.partText.padStart(n,"0"))}else t.isComplete=t.partText.length>0}else s?t.isComplete=t.partText.length===n:t.isComplete=t.partText.length>0}}class ip{constructor(t,r){T(this,"instanceCollection");T(this,"formatNavigator");T(this,"ruleProcessor");T(this,"keyTypeChecker");T(this,"formatRenderer");this.format=t,this.instanceCollection=qt.getInstance(),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.ruleProcessor=new wi(t,r),this.keyTypeChecker=new xi,this.formatRenderer=new zn(t,r)}setInputElement(t){this.ruleProcessor.setInputElement(t),this.formatRenderer.setInputElement(t)}processMovementKey(t){const{key:r,metaKey:n,ctrlKey:s,shiftKey:o}=t;switch(r){case"ArrowLeft":o?this.formatNavigator.moveHighlightLeft():n?this.formatNavigator.moveHome():this.formatNavigator.moveCursorLeft();break;case"ArrowRight":o?this.formatNavigator.moveHighlightRight():n?this.formatNavigator.moveEnd():this.formatNavigator.moveCursorRight();break;case"Home":this.formatNavigator.moveHome();break;case"End":this.formatNavigator.moveEnd();break;case"a":(n||s)&&this.formatNavigator.highlightAll();break}}processKeyPress(t){return this.keyTypeChecker.isIgnoreKey(t)?!1:this.keyTypeChecker.isMovementKey(t)?(this.processMovementKey(t),!1):(this.ruleProcessor.processKeyPress(t),!0)}}class ap{constructor(t,r=""){T(this,"instanceId");T(this,"instanceCollection");T(this,"keyProcessor");T(this,"formatNavigator");T(this,"formatRenderer");T(this,"inputSlotCollection");T(this,"inputRuleProcessor");T(this,"previousOutputValue","");T(this,"inputElementSet",!1);T(this,"isInputFocused",!1);T(this,"inputElement");T(this,"onFormatChange");this.inputValue=r,this.instanceId=Jh(),this.instanceCollection=qt.getInstance(),this.keyProcessor=new ip(t,this.instanceId),this.formatNavigator=this.instanceCollection.getNavigatorInstance(this.instanceId,t),this.formatRenderer=new zn(t,this.instanceId),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(this.instanceId,t),this.inputRuleProcessor=new wi(t,this.instanceId)}inputElementCreated(t){this.keyProcessor.setInputElement(t),this.formatNavigator.setInputElement(t),this.formatRenderer.setInputElement(t),this.inputElement=t,this.inputElementSet=!0,this.inputElementSet&&this.inputValue.length>0&&this.inputValuePassed(this.inputValue)}inputFocused(){this.isInputFocused=!0,this.formatRenderer.render(),setTimeout(()=>this.formatNavigator.findCursorPosition())}inputBlurred(){this.isInputFocused=!1}inputValuePassed(t){this.inputValue=t,this.inputElementSet&&(this.inputValue.length>0?this.inputRuleProcessor.processInputValue(t):(this.inputSlotCollection.clearAllSlots(),this.previousOutputValue=void 0),this.renderFormat())}pastedValue(t){t.length>0&&(this.formatNavigator.isSelection?this.formatNavigator.isAllSelected?this.inputValuePassed(t):this.inputRuleProcessor.processPastedValue(t,!0):this.inputValue.length===0?this.inputValuePassed(t):this.inputRuleProcessor.processPastedValue(t),this.renderFormat(!0))}registerFormatChangeEvent(t){this.onFormatChange=t}mouseUpHandler(){this.formatNavigator.findCursorPosition()}keyDownHandler(t){if(t.key!=="Tab"){if(!(t.key==="c"&&(t.ctrlKey||t.metaKey))&&!(t.key==="x"&&(t.ctrlKey||t.metaKey))&&!(t.key==="v"&&(t.ctrlKey||t.metaKey)))t.preventDefault(),t.stopPropagation();else return;this.keyProcessor.processKeyPress(t)&&this.inputElement&&this.onFormatChange&&(this.inputSlotCollection.allSlotsCompleted()&&this.previousOutputValue!==this.inputElement.innerHTML?(this.previousOutputValue=this.inputElement.innerHTML,this.onFormatChange(this.inputElement.innerHTML)):this.inputSlotCollection.allSlotsEmpty()&&this.previousOutputValue!==void 0&&(this.previousOutputValue=void 0,this.onFormatChange()))}}dispose(){this.instanceCollection.removeInstances(this.instanceId)}renderFormat(t=!1){setTimeout(()=>{var r,n;this.formatRenderer.render(),this.isInputFocused&&this.formatNavigator.setCursorToCurrentPosition(),this.inputValue.length>0&&(this.previousOutputValue=(r=this.inputElement)==null?void 0:r.innerHTML),t&&((n=this.inputElement)!=null&&n.innerHTML)&&this.onFormatChange&&this.onFormatChange(this.inputElement.innerHTML)})}}const cp=(e,t)=>{const{value:r="",format:n,readOnly:s=!1,debounceTime:o=800,fillContainer:i=!0,leftElement:c,rightElement:u,className:h,leftElementClassName:f,rightElementClassName:v,isSingleLine:P=!1,allowSingleLineScroll:l=!1,isInputValid:d,onChange:b,onFocus:x,onBlur:y,onElementCreate:E,onLeftElementClick:V,onRightElementClick:R}=e,[S,$]=p.useState(!0),O=p.useRef(),q=p.useRef(),z=p.useRef(),se=p.useRef(!1);p.useEffect(()=>(document.addEventListener("mouseup",C),()=>{var N;(N=z.current)==null||N.dispose(),document.removeEventListener("mouseup",C)}),[]),p.useEffect(()=>{var N;(N=z.current)==null||N.inputValuePassed(r)},[r]),p.useEffect(()=>{var N,_,W;(N=z.current)==null||N.dispose(),n&&(z.current=new ap(n,r),q.current&&((_=z.current)==null||_.inputElementCreated(q.current)),(W=z.current)==null||W.registerFormatChangeEvent(ae))},[n]);const ae=p.useCallback(N=>{d?d(N)?($(!0),b==null||b(N)):$(!1):b==null||b(N)},[b]),re=p.useCallback(N=>{var _;(_=z.current)==null||_.inputFocused(),x==null||x(N)},[x]),K=p.useCallback(N=>{var _;(_=z.current)==null||_.inputBlurred(),y==null||y(N)},[y]),L=p.useCallback(()=>{se.current=!0},[]),F=p.useCallback(()=>{var N;if(se.current)se.current=!1,(N=z.current)==null||N.mouseUpHandler();else{const _=new MouseEvent("mouseup");document.dispatchEvent(_)}},[]),C=p.useCallback(()=>{var N;se.current&&(se.current=!1,(N=z.current)==null||N.mouseUpHandler())},[]),Q=p.useCallback(N=>{var _;(_=z.current)==null||_.keyDownHandler(N)},[]),I=p.useCallback(N=>{var W,J;N.preventDefault(),N.stopPropagation();const _=(W=N.clipboardData)==null?void 0:W.getData("text/plain");_&&((J=z.current)==null||J.pastedValue(_))},[]),he=p.useCallback(N=>{var _,W,J,H,U,Z,te,D,ie,A,Ne,qe,Le,Ye,ot,Ge,Ve;(W=(_=O.current)==null?void 0:_.inputElement)==null||W.removeEventListener("keydown",Q),(H=(J=O.current)==null?void 0:J.inputElement)==null||H.removeEventListener("mousedown",L),(Z=(U=O.current)==null?void 0:U.inputElement)==null||Z.removeEventListener("mouseup",F),(D=(te=O.current)==null?void 0:te.inputElement)==null||D.removeEventListener("paste",I),O.current=N,(A=(ie=O.current)==null?void 0:ie.inputElement)==null||A.addEventListener("keydown",Q),(qe=(Ne=O.current)==null?void 0:Ne.inputElement)==null||qe.addEventListener("mousedown",L),(Ye=(Le=O.current)==null?void 0:Le.inputElement)==null||Ye.addEventListener("mouseup",F),(Ge=(ot=O.current)==null?void 0:ot.inputElement)==null||Ge.addEventListener("paste",I),q.current=(Ve=O.current)==null?void 0:Ve.inputElement},[]),k=p.useCallback(()=>{var N;(N=O.current)==null||N.focus()},[]);p.useImperativeHandle(t,()=>({focus:k}));const M=de(h,{"bsc:border-error!":!S});return g.jsx(Vr,{ref:N=>N&&he(N),readOnly:s,debounceTime:o,fillContainer:i,leftElement:c,rightElement:u,className:M,leftElementClassName:f,rightElementClassName:v,isSingleLine:P,allowSingleLineScroll:l,onFocus:re,onBlur:K,onElementCreate:E,onLeftElementClick:V,onRightElementClick:R})},Pi=p.forwardRef(cp),Kn=p.createContext(void 0);function Ti(e,t,r=!0){var P,l;const n=Ho(e),s=Mo(e),o=sd(e);let i=On(s)-(((P=t.options)==null?void 0:P.weekStartsOn)||0);i=i===-1?6:i;const c=On(o)-(((l=t.options)==null?void 0:l.weekStartsOn)||0),u=hf({start:s,end:o}),h=n+i>35?6:5,f=Si(h,7,{dayValue:null,isCurrent:!0});let v=1;for(let d=0,b=h;d<b;d++){for(let x=d>0?0:i;x<7;x++){const y=u[v-1];if(y.setHours(e.getHours(),e.getMinutes(),e.getSeconds()),f[d][x].dayValue=y,++v>n)break}if(v>n)break}if(i>0&&r)for(let d=0;d<i;d++)f[0][d].dayValue=th(s,i-d),f[0][d].isCurrent=!1;if(c>-1&&r)for(let d=6;d>c;d--)f[h-1][d].dayValue=Wt(o,d-c),f[h-1][d].isCurrent=!1;return f}function Si(e,t,r){const n=[];for(let s=0,o=e;s<o;s++){const i=[];for(let c=0,u=t;c<u;c++){const h=up(r)?r:{...r};i.push(h)}n.push(i)}return n}function up(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"||e instanceof Date}function lp(e){var n;const t=rh(new Date,((n=e.options)==null?void 0:n.weekStartsOn)||0),r=[];for(let s=0;s<7;s++)r.push(Wt(t,s).toLocaleDateString(e.code,{weekday:"short"}));return r}function fp(e){const t=new Date(Date.UTC(2020,0,1)),r=[[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}],[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}],[{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""},{monthNumber:0,monthName:""}]];let n=0;for(let s=0;s<3;s++)for(let o=0;o<4;o++)r[s][o]={monthNumber:n,monthName:bt(t,n++).toLocaleDateString(e.code,{month:"short"})};return r}function dp(e,t){const r=new Date(e.getTime()),n=Math.floor(r.getFullYear()/10)*10;r.setFullYear(n);const s=pf({start:r,end:xr(r,9)}),o=Si(3,4,"");let i=0;for(let c=0;c<3;c++)for(let u=0;u<4&&(o[c][u]=s[i++].toLocaleDateString(t.code,{year:"numeric"}),i!==s.length);u++);return o}function hp(e){const t=new Date;return t.setHours(0,0,0,0),t.toLocaleTimeString(e.code)}function pp(e,t,r){return e.getTime()>=t.getTime()&&e.getTime()<=r.getTime()}async function Ei(e){return(await import(`/node_modules/date-fns/locale/${mp(e)}`)).default}function mp(e){const[t,r]=e.split("-");switch(t){case"af":return"af";case"ar":switch(r){case"DZ":return"ar-DZ";case"EG":return"ar-EG";case"MA":return"ar-MA";case"SA":return"ar-SA";case"TN":return"ar-TN";default:return"ar"}case"az":return"az";case"be":switch(r){case"tarask":return"be-tarask";default:return"be"}case"bg":return"bg";case"bn":return"bn";case"bs":return"bs";case"ca":return"ca";case"cs":return"cs";case"cy":return"cy";case"da":return"da";case"de":switch(r){case"AT":return"de-AT";default:return"de"}case"el":return"el";case"en":switch(r){case"AU":return"en-AU";case"CA":return"en-CA";case"GB":return"en-GB";case"IE":return"en-IE";case"IN":return"en-IN";case"NZ":return"en-NZ";case"US":return"en-US";default:return"en-ZA"}case"eo":return"eo";case"es":return"es";case"et":return"et";case"eu":return"eu";case"fa":return"fa-IR";case"fi":return"fi";case"fr":switch(r){case"CA":return"fr-CA";case"CH":return"fr-CH";default:return"fr"}case"fy":return"fy";case"gd":return"gd";case"gl":return"gl";case"gu":return"gu";case"he":return"he";case"hi":return"hi";case"hr":return"hr";case"ht":return"ht";case"hu":return"hu";case"hy":return"hy";case"id":return"id";case"is":return"is";case"it":switch(r){case"CH":return"it-CH";default:return"it"}case"ja":switch(r){case"Hira":return"ja-Hira";default:return"ja"}case"ka":return"ka";case"kk":return"kk";case"km":return"km";case"kn":return"kn";case"ko":return"ko";case"lb":return"lb";case"lt":return"lt";case"lv":return"lv";case"mk":return"mk";case"mn":return"mn";case"ms":return"ms";case"mt":return"mt";case"nb":return"nb";case"nl":switch(r){case"BE":return"nl-BE";default:return"nl"}case"nn":return"nn";case"oc":return"oc";case"pl":return"pl";case"pt":switch(r){case"BR":return"pt-BR";default:return"pt"}case"ro":return"ro";case"ru":return"ru";case"sk":return"sk";case"sl":return"sl";case"sq":return"sq";case"sr":switch(r){case"Latn":return"sr-Latn";default:return"sr"}case"sv":return"sv";case"ta":return"ta";case"te":return"te";case"th":return"th";case"tr":return"tr";case"ug":return"ug";case"uk":return"uk";case"uz":switch(r){case"Cyrl":return"uz-Cyrl";default:return"uz"}case"vi":return"vi";case"zh":switch(r){case"CN":return"zh-CN";case"HK":return"zh-HK";default:return"zh-TW"}default:return"en-AU"}}function _r(e,t){const r=nh(e);if(isNaN(r.valueOf())){let n=nt(e,"P pp",new Date,{locale:t});return!isNaN(n.valueOf())||(n=nt(e,"Pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P HH:mm",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P hh:mm a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P HH:mm:ss",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P hh:mm:ss a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"P p",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=nt(e,"p",new Date,{locale:t}),!isNaN(n.valueOf()))?n:void 0}return r}function Zn(e,t){const r=e.split("-");if(r.length!==2)return;const n=_r(r[0].trim(),t);if(!n)return;const s=_r(r[1].trim(),t);if(s)return[n,s]}var we=(e=>(e[e.DateTime=0]="DateTime",e[e.DateOnly=1]="DateOnly",e[e.TimeOnly=2]="TimeOnly",e[e.DateRange=3]="DateRange",e))(we||{}),Re=(e=>(e[e.DaySelector=0]="DaySelector",e[e.MonthSelector=1]="MonthSelector",e[e.YearSelector=2]="YearSelector",e[e.TimeSelector=3]="TimeSelector",e[e.DateRangeSelector=4]="DateRangeSelector",e))(Re||{}),zt=(e=>(e[e.Day=0]="Day",e[e.Month=1]="Month",e[e.Year=2]="Year",e[e.Range=3]="Range",e))(zt||{}),kr=(e=>(e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e))(kr||{}),Oe=(e=>(e[e.TwelveHour=0]="TwelveHour",e[e.TwentyFourHour=1]="TwentyFourHour",e))(Oe||{}),vt=(e=>(e[e.Normal=0]="Normal",e[e.Range=1]="Range",e))(vt||{}),Gr=(e=>(e[e.Right=0]="Right",e[e.Left=1]="Left",e[e.None=2]="None",e))(Gr||{}),le=(e=>(e[e.SetDateSelector=0]="SetDateSelector",e[e.SetViewDate=1]="SetViewDate",e[e.SetSelectedDate=2]="SetSelectedDate",e[e.SetSelectedDateRange=3]="SetSelectedDateRange",e[e.SetSelectedStartDate=4]="SetSelectedStartDate",e[e.SetSelectedEndDate=5]="SetSelectedEndDate",e[e.SetTimeFormat=6]="SetTimeFormat",e[e.ClearDates=7]="ClearDates",e[e.InitializeDates=8]="InitializeDates",e))(le||{});const gp=(e,t)=>{switch(t.type){case 0:return t.dateSelector!==void 0?{...e,currentSelector:t.dateSelector,currentViewDate:t.viewDate||e.currentViewDate}:{...e};case 1:return{...e,currentViewDate:t.viewDate||new Date,dateInitialized:!0};case 2:return{...e,selectedDate:t.selectedDate||e.selectedDate,currentViewDate:t.viewDate||e.currentViewDate};case 3:return{...e,selectedStartDate:t.selectedStartDate||e.selectedStartDate,selectedEndDate:t.selectedEndDate||e.selectedEndDate};case 4:return{...e,selectedStartDate:t.selectedStartDate,selectedEndDate:void 0};case 5:return{...e,selectedEndDate:t.selectedEndDate};case 6:return{...e,timeFormat:t.timeFormat||e.timeFormat};case 7:return{currentSelector:e.currentSelector,currentViewDate:e.currentViewDate,timeFormat:e.timeFormat,dateInitialized:!0};case 8:{const r={...e,currentViewDate:bp(t.initialDate),dateInitialized:!0};return Array.isArray(t.initialDate)?{...r,selectedStartDate:t.initialDate[0],selectedEndDate:t.initialDate[1]}:{...r,selectedDate:t.initialDate}}default:return{...e,currentSelector:Re.DaySelector}}};function bp(e){return e?Array.isArray(e)?e[0]:e:new Date}const Gn=(e,t,r)=>{const n=p.useCallback(u=>{r({type:le.SetViewDate,viewDate:bt(t,u)})},[t]),s=p.useCallback(u=>{r({type:le.SetViewDate,viewDate:Mn(t,u)})},[t]),o=p.useCallback(u=>{r({type:le.SetViewDate,viewDate:xr(t,u)})},[t]),i=p.useCallback(u=>{r({type:le.SetViewDate,viewDate:Rn(t,u)})},[t]),c=p.useCallback(u=>{r({type:le.SetDateSelector,dateSelector:u})},[]);return{...e,incrementViewMonths:n,decrementViewMonths:s,incrementViewYears:o,decrementViewYears:i,setDateSelector:c}},Qr=({viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:s=vt.Normal,locale:o,onDateSelected:i,selectableDate:c,isValidDate:u,dispatcher:h})=>{var F;const[f,v]=p.useState(!1),[P,l]=p.useState(),[d,b]=p.useState(),[x,y]=p.useState(),[E,V]=p.useState(),R=p.useRef(),S=p.useRef(),$=p.useContext(Kn),O=p.useMemo(()=>$.calendarTemplate,[$.calendarTemplate]),q=async()=>o||await Ei(qo());p.useEffect(()=>{q().then(C=>{R.current=C,S.current=lp(R.current),v(!0)}).catch(C=>console.error(C))},[]),p.useEffect(()=>{e&&R.current&&y(Ti(e,R.current,s===vt.Normal))},[e,f]),p.useEffect(()=>{V(t?new Date(t.getFullYear(),t.getMonth(),t.getDate()):void 0)},[t]),p.useEffect(()=>{l(r?new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0).getTime():void 0),b(n?new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59).getTime():void 0)},[r,n]),p.useEffect(()=>{R.current&&o&&(R.current=o,y(Ti(e,R.current,s===vt.Normal)))},[o]);const z=C=>{if(s===vt.Normal)h==null||h({type:le.SetSelectedDate,selectedDate:C,viewDate:C}),i==null||i(C);else{if(!i)throw new Error("Range selection mode requires onDateSelected to be set");!r||od(C,r)?i(C):r&&!n?i(C,{setEndDate:!0}):r&&n&&i(C)}},se=C=>(E==null?void 0:E.toLocaleDateString())===C.toLocaleDateString(),ae=C=>{if(P&&d){const Q=C.getTime();return Q>=P&&Q<=d}return!1},re=Gn({viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:s,locale:o,weekDays:S.current,monthMatrix:x,selectableDate:c,isValidDate:u,onDateClicked:z,isSelectedDate:se,isInSelectedDateRange:ae},e,h),L=O||((C,Q)=>g.jsx("div",{className:"bc-dt-calendar bsc:w-full",children:Q}));return g.jsx(kt,{props:re,template:L,children:g.jsxs("div",{className:"bc-dt-day-row bsc:grid bsc:min-w-[329px] bsc:grid-cols-7 bsc:gap-3",children:[(F=S.current)==null?void 0:F.map((C,Q)=>g.jsx("div",{className:"bc-dt-day-cell bsc:text-center bsc:font-bold",children:C},Q)),x==null?void 0:x.map((C,Q)=>C.map((I,he)=>{var N,_;const k=I.dayValue!==null&&(c===void 0||c(I.dayValue)),M=de("bsc:text-center bsc:py-1 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",{"bsc:text-gray-3":!I.isCurrent,"bsc:bg-primary-1 bsc:text-white bsc:dark:bg-mono-light-1 bsc:dark:text-mono-dark-1":I&&I.dayValue&&(E&&se(I.dayValue)||P&&!d&&Io(P,I.dayValue)||P&&d&&ae(I.dayValue)),"bsc:cursor-pointer":k,"bsc:text-error bsc:cursor-not-allowed":!k,"bsc:bg-primary-5 bsc:dark:bg-mono-light-3 bsc:dark:text-mono-dark-1":I.dayValue&&eh(I.dayValue)&&!(se(I.dayValue)||ae(I.dayValue))},"bc-dt-date-cell");return g.jsx("div",{className:M,onClick:()=>I&&I.dayValue&&k&&(u===void 0||u(I.dayValue))&&z(I.dayValue),children:(_=I.dayValue)==null?void 0:_.getDate().toLocaleString((N=R.current)==null?void 0:N.code)},Q.toString()+he.toString())}))]})})},Xr=({title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:s,viewDate:o,dispatcher:i})=>{const u=p.useContext(Kn).dateScrollerTemplate,h=Gn({title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:s},o,i),f="bsc:bg-transparent bsc:cursor-pointer bsc:focus:outline-hidden bsc:hover:bg-primary-1! bsc:hover:text-white! bsc:dark:hover:bg-mono-light-3!",P=u||((l,d)=>g.jsx("div",{className:"bc-dt-scroller bsc:flex bsc:w-full bsc:flex-row bsc:items-center bsc:px-2 bsc:py-1",children:d}));return g.jsxs(kt,{props:h,template:P,children:[g.jsx("div",{className:"bc-dt-scroller-left bsc:shrink bsc:cursor-pointer",children:g.jsx(et,{className:f,onClick:n,children:g.jsx(Ke,{icon:"chevronLeft",size:He.Regular})})}),g.jsx("div",{className:"bc-dt-scroller-title bsc:grow bsc:cursor-pointer bsc:text-center bsc:hover:text-primary-2 bsc:dark:hover:text-mono-light-3",onClick:r,children:e}),g.jsx("div",{className:"bc-dt-scroller-right bsc:shrink bsc:cursor-pointer",children:g.jsx(et,{className:f,onClick:s,children:g.jsx(Ke,{icon:"chevronRight",size:He.Regular})})})]})},yp=({selectedDate:e,viewDate:t,locale:r,showTimeSelector:n,selectableDate:s,isValidDate:o,onChange:i,dispatcher:c})=>{const u=()=>{t&&c({type:le.SetViewDate,viewDate:Mn(t,1)})},h=()=>{t&&c({type:le.SetViewDate,viewDate:bt(t,1)})},f=()=>{c({type:le.SetDateSelector,dateSelector:Re.MonthSelector})},v=()=>{c({type:le.SetDateSelector,dateSelector:Re.TimeSelector})},P=()=>t?t.toLocaleDateString(r.code,{month:"long",year:"numeric"}):"";return g.jsxs("div",{className:"bc-dt-day-selector bsc:p-2",children:[g.jsx(Xr,{title:P(),scrollerType:zt.Day,onTitleClicked:f,onMovePrevious:u,onMoveNext:h,viewDate:t,dispatcher:c}),g.jsx(Qr,{viewDate:t,selectedDate:e,locale:r,selectableDate:s,isValidDate:o,onDateSelected:i,dispatcher:c}),n&&g.jsx("div",{className:"bc-dt-time-value-wrapper bsc:flex bsc:w-full bsc:flex-row bsc:justify-center bsc:p-2",children:g.jsx("div",{className:"bc-dt-time-value bsc:cursor-pointer bsc:p-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:bg-mono-dark-1 bsc:dark:text-mono-light-1 bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-2",onClick:v,children:(e==null?void 0:e.toLocaleTimeString(r.code))||hp(r)})})]})},vp=({viewDate:e,locale:t,dateSelection:r=we.DateTime,dispatcher:n})=>{const s=p.useRef(fp(t)),o=()=>{const f=Rn(e,1);n({type:le.SetViewDate,viewDate:f})},i=()=>{const f=xr(e,1);n({type:le.SetViewDate,viewDate:f})},c=f=>{n({type:le.SetDateSelector,dateSelector:r!==we.DateRange?Re.DaySelector:Re.DateRangeSelector,viewDate:vh(e,f)})},u=()=>e.toLocaleDateString(t.code,{year:"numeric"}),h=()=>{n({type:le.SetDateSelector,dateSelector:Re.YearSelector})};return g.jsxs("div",{className:"bc-dt-month-selector bsc:p-2",style:{minWidth:"20rem"},children:[g.jsx(Xr,{title:u(),scrollerType:zt.Month,onTitleClicked:h,onMovePrevious:o,onMoveNext:i,viewDate:e,dispatcher:n}),g.jsx("div",{className:"bc-dt-month-grid bsc:grid bsc:w-full bsc:grid-cols-4 bsc:gap-4",children:s.current.map((f,v)=>f.map((P,l)=>g.jsx("div",{className:"bc-dt-month-cell bsc:cursor-pointer bsc:text-center bsc:py-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",onClick:()=>c(P.monthNumber),children:P.monthName},v.toString()+l.toString())))})]})},xp=({viewDate:e,selectedStartDate:t,selectedEndDate:r,locale:n,onChange:s,dispatcher:o})=>{const i=qr("screen and (max-device-width: 40rem)"),c=bt(e,1),u=(l,d)=>{!d||!d.setEndDate?o({type:le.SetSelectedStartDate,selectedStartDate:l}):(o({type:le.SetSelectedEndDate,selectedEndDate:l}),t&&s&&s([t,l]))},h=()=>{o({type:le.SetDateSelector,dateSelector:Re.MonthSelector})},f=()=>i?`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})}`:`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})} - ${c.toLocaleDateString(n.code,{month:"long"})} ${c.toLocaleDateString(n.code,{year:"numeric"})}`,v=()=>{e&&o({type:le.SetViewDate,viewDate:Mn(e,1)})},P=()=>{e&&o({type:le.SetViewDate,viewDate:bt(e,1)})};return g.jsxs("div",{className:"bc-dt-range-selector bsc:flex bsc:flex-col",children:[g.jsx("div",{className:"bc-dt-range-scroller-wrapper bsc:shrink",children:g.jsx(Xr,{title:f(),scrollerType:zt.Range,onTitleClicked:h,onMovePrevious:v,onMoveNext:P,viewDate:e,dispatcher:o})}),g.jsx("div",{className:"bsc-flex-grow",children:g.jsx(An,{mobileMarkup:g.jsx("div",{className:"bc-dt-range-calendar bsc:px-2 bsc:py-1",children:g.jsx(Qr,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:vt.Range,onDateSelected:u,locale:n,dispatcher:o})}),aboveMobileMarkup:g.jsxs("div",{className:"bc-dt-range-wrapper bsc:flex bsc:flex-row bsc:px-2 bsc:py-1",children:[g.jsx("div",{className:"bc-dt-range-calendar-1 bsc:border-r bsc:border-solid bsc:border-gray-3 bsc:pr-4",children:g.jsx(Qr,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:vt.Range,onDateSelected:u,locale:n,dispatcher:o})}),g.jsx("div",{className:"bc-dt-range-calendar-2 bsc:pl-4",children:g.jsx(Qr,{viewDate:c,selectedStartDate:t,selectedEndDate:r,selectionMode:vt.Range,onDateSelected:u,locale:n,dispatcher:o})})]})})})]})},wp=({viewDate:e,showDateSelector:t,locale:r,timeFormat:n=Oe.TwelveHour,timeConstraints:s,onChange:o,dispatcher:i})=>{const c=p.useRef(n===Oe.TwelveHour?11:23),u=p.useRef(n===Oe.TwelveHour?["12","01","02","03","04","05","06","07","08","09","10","11"]:["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"]),h=p.useRef(wh(0,59,L=>L.toString().padStart(2,"0"))),f=p.useRef(["AM","PM"]),v=p.useRef(ef(e)),P=L=>L>11?L-12:L,[l,d]=p.useState(P(e.getHours())),[b,x]=p.useState(e.getMinutes()),[y,E]=p.useState(e.getHours()<=12?0:1),V=p.useRef(e.toLocaleDateString(r.code));p.useEffect(()=>{const L=e.getHours(),F=e.getMinutes();if(L!==l&&d(n===Oe.TwelveHour?P(L):L),F!==b&&x(F),n===Oe.TwelveHour){const C=L<=11?0:1;C!==y&&E(C)}},[e]);const R=()=>{var C;const L=((C=s==null?void 0:s.hours)==null?void 0:C.step)||1,F=l<c.current?l+L:0;d(F),z(F,b,y)},S=()=>{var C;const L=((C=s==null?void 0:s.hours)==null?void 0:C.step)||1,F=l>0?l-L:c.current;d(F),z(F,b,y)},$=()=>{var C,Q,I;const L=((C=s==null?void 0:s.minutes)==null?void 0:C.step)||1,F=b+L<(((Q=s==null?void 0:s.minutes)==null?void 0:Q.max)||59)?b+L:((I=s==null?void 0:s.minutes)==null?void 0:I.min)||0;x(F),z(l,F,y)},O=()=>{var C,Q,I;const L=((C=s==null?void 0:s.minutes)==null?void 0:C.step)||1,F=b-L>=(((Q=s==null?void 0:s.minutes)==null?void 0:Q.min)||0)?b-L:(((I=s==null?void 0:s.minutes)==null?void 0:I.max)||60)-L;x(F),z(l,F,y)},q=()=>{const L=y===0?1:0;E(L),z(l,b,L)},z=(L,F,C)=>{const Q=n===Oe.TwelveHour&&C===1?L+12:L;v.current.setHours(Q,F),i({type:le.SetSelectedDate,selectedDate:v.current,viewDate:v.current}),o==null||o(v.current)},se=()=>{i({type:le.SetDateSelector,dateSelector:Re.DaySelector})},ae=de("bsc:w-full bsc:grid bsc:grid-rows-3 bsc:gap-4 bsc:items-center bc-dt-time-grid",{"bsc:grid-cols-4":n===Oe.TwelveHour,"bsc:grid-cols-3":n===Oe.TwentyFourHour}),re=de("bsc:text-center bsc:cursor-pointer bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:text-mono-light-1 bsc:dark:hover:bg-mono-light-1 bsc:dark:hover:text-mono-dark-1 bc-dt-time-date-value",{"bsc:col-span-4":n===Oe.TwelveHour,"bsc:col-span-3":n===Oe.TwentyFourHour}),K="bsc-bg-transparent bsc:p-2 bsc:cursor-pointer bsc:focus:outline-hidden bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-1 bsc:dark:hover:text-mono-dark-1";return g.jsx("div",{className:"bc-dt-time-selector bsc:flex bsc:flex-row bsc:justify-center bsc:p-2",style:{minWidth:n===Oe.TwelveHour?"15rem":"11rem"},children:g.jsxs("div",{className:ae,children:[t&&g.jsx("div",{className:re,onClick:se,children:V.current}),g.jsx("div",{className:"bc-dt-time-hour-increase bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:R,children:g.jsx(Ke,{icon:"chevronUp",size:He.Regular})})}),g.jsx("div",{}),g.jsx("div",{className:"bc-dt-time-minute-increase bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:$,children:g.jsx(Ke,{icon:"chevronUp",size:He.Regular})})}),n===Oe.TwelveHour&&g.jsx("div",{className:"bc-dt-time-meridian-increase bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:q,children:g.jsx(Ke,{icon:"chevronUp",size:He.Regular})})}),g.jsx("div",{className:"bc-dt-time-hour-value bsc:text-center",children:u.current[l]}),g.jsx("div",{className:"bc-dt-time-separator bsc:text-center",children:":"}),g.jsx("div",{className:"bc-dt-time-minute-value bsc:text-center",children:h.current[b]}),n===Oe.TwelveHour&&g.jsx("div",{className:"bc-dt-time-meridian-value bsc:text-center",children:f.current[y]}),g.jsx("div",{className:"bc-dt-time-hour-decrease bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:S,children:g.jsx(Ke,{icon:"chevronDown",size:He.Regular})})}),g.jsx("div",{}),g.jsx("div",{className:"bc-dt-time-minute-decrease bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:O,children:g.jsx(Ke,{icon:"chevronDown",size:He.Regular})})}),n===Oe.TwelveHour&&g.jsx("div",{className:"bc-dt-time-meridian-decrease bsc:cursor-pointer bsc:text-center",children:g.jsx(et,{className:K,onClick:q,children:g.jsx(Ke,{icon:"chevronDown",size:He.Regular})})})]})})},Pp=({viewDate:e,locale:t,dispatcher:r})=>{const n=dp(e,t),s=()=>{const u=Rn(e,10);r({type:le.SetViewDate,viewDate:u})},o=()=>{const u=xr(e,10);r({type:le.SetViewDate,viewDate:u})},i=u=>{const h=parseInt(u);r({type:le.SetDateSelector,dateSelector:Re.MonthSelector,viewDate:xh(e,h)})},c=()=>`${n[0][0].toString()} - ${n[2][1].toString()}`;return g.jsxs("div",{className:"bc-dt-year-selector bsc:p-2",style:{minWidth:"20rem"},children:[g.jsx(Xr,{title:c(),scrollerType:zt.Year,onMovePrevious:s,onMoveNext:o,viewDate:e,dispatcher:r}),g.jsx("div",{className:"bc-dt-year-wrapper bsc:w-full",children:g.jsx("div",{className:"bc-dt-year-grid bsc:grid bsc:grid-cols-4 bsc:gap-4",children:n.map((u,h)=>u.map((f,v)=>f.length>0?g.jsx("div",{className:"bc-dt-year-cell bsc:cursor-pointer bsc:text-center bsc:py-2 bsc:hover:bg-primary-2 bsc:hover:text-white bsc:dark:hover:bg-mono-light-2 bsc:dark:hover:text-mono-dark-1",onClick:()=>i(f),children:f},h.toString()+v.toString()):g.jsx("div",{},h.toString()+v.toString())))})})]})};class Tp{constructor(t,r){T(this,"dateFormat");T(this,"timeFormat");T(this,"use24HourTime");T(this,"monthPart");T(this,"dayPart");T(this,"yearPart");T(this,"twelveHourPart");T(this,"twentyFourHourPart");T(this,"minutePart");T(this,"meridianPart");this.dateSelection=t;const n=2023,s=12,o=20,c=new Date(n,s-1,o).toLocaleDateString(r,{year:"numeric",month:"numeric",day:"numeric"});this.dateFormat=c.replace(`${n}`,"YYYY").replace(`${s}`,"MM").replace(`${o}`,"DD");const u=new Date,h=18,f=24,v=37,P=317;u.setHours(h,f,v,P);const l=u.toLocaleTimeString(r);this.use24HourTime=l.startsWith("18"),this.timeFormat=l.replace(`${this.use24HourTime?h:"6"}`,"HH").replace(`${f}`,"MM").replace(`${v}`,"SS").replace(`${P}`,"LLL"),this.createDateParts()}get is24HourTime(){return this.use24HourTime}createInputFormat(){const t={deleteShiftsFormatPart:!1,formatParts:[]};switch(this.dateSelection){case we.DateOnly:return this.createDateFormat(t);case we.TimeOnly:return this.createTimeFormat(t);case we.DateRange:return this.createDateRangeFormat(t);case we.DateTime:return this.createDateTimeFormat(t)}}createDateFormat(t){return this.dateFormat.startsWith("MM")?t.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?t.formatParts.push(...this.createDayMonthYearFormatParts()):t.formatParts.push(...this.createYearMonthDayFormatParts()),t}createTimeFormat(t){return this.use24HourTime?t.formatParts.push(...this.createTwentyFourHourFormatParts()):t.formatParts.push(...this.createTwelveHourFormatParts()),t}createDateRangeFormat(t){const r=[];this.dateFormat.startsWith("MM")?r.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?r.push(...this.createDayMonthYearFormatParts()):r.push(...this.createYearMonthDayFormatParts());const n={characterCount:3,placeholder:" - ",inputText:" - ",isSeparator:!0};return t.formatParts.push(...r,n,...r),t}createDateTimeFormat(t){this.dateFormat.startsWith("MM")?t.formatParts.push(...this.createMonthDayYearFormatParts()):this.dateFormat.startsWith("DD")?t.formatParts.push(...this.createDayMonthYearFormatParts()):t.formatParts.push(...this.createYearMonthDayFormatParts());const r={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return t.formatParts.push(r),this.use24HourTime?t.formatParts.push(...this.createTwentyFourHourFormatParts()):t.formatParts.push(...this.createTwelveHourFormatParts()),t}createMonthDayYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("MM",""),r=t.indexOf("DD"),n=t.substring(0,r);t=t.replace(n,"").replace("DD","");const s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("YYYY"),n=t.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.monthPart,s,this.dayPart,o,this.yearPart]}return[]}createDayMonthYearFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("DD",""),r=t.indexOf("MM"),n=t.substring(0,r);t=t.replace(n,"").replace("MM","");const s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("YYYY"),n=t.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.dayPart,s,this.monthPart,o,this.yearPart]}return[]}createYearMonthDayFormatParts(){if(this.monthPart&&this.dayPart&&this.yearPart){let t=this.dateFormat.replace("YYYY",""),r=t.indexOf("MM"),n=t.substring(0,r);t=t.replace(n,"").replace("MM","");const s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("DD"),n=t.substring(0,r);const o={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.yearPart,s,this.monthPart,o,this.dayPart]}return[]}createTwelveHourFormatParts(){if(this.twelveHourPart&&this.minutePart&&this.meridianPart){const t=this.timeFormat.replace("HH",""),r=t.indexOf("MM"),n=t.substring(0,r),s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0},o={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return[this.twelveHourPart,s,this.minutePart,o,this.meridianPart]}return[]}createTwentyFourHourFormatParts(){if(this.twentyFourHourPart&&this.minutePart){const t=this.timeFormat.replace("HH",""),r=t.indexOf("MM"),n=t.substring(0,r),s={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.twentyFourHourPart,s,this.minutePart]}return[]}createDateParts(){this.monthPart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:st.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.dayPart={characterCount:2,placeholder:"D",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:st.Numeric,minimumValue:1,maximumValue:31,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.yearPart={characterCount:4,placeholder:"Y",inputText:"_",isSeparator:!1,allCharactersRequired:!0,valueType:st.Numeric},this.twelveHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:st.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.twentyFourHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:st.Numeric,minimumValue:0,maximumValue:23,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.minutePart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:st.Numeric,minimumValue:0,maximumValue:59,exceedingMaximumValueCausesError:!0,padWithZeros:!0},this.meridianPart={characterCount:2,inputText:"_",isSeparator:!1,valueType:st.Text,possibleValues:["AM","PM"]}}}const Sp=(e,t)=>{var o;const[r,n]=p.useState(),s=p.useRef();return p.useEffect(()=>{t&&!r&&(s.current=new Tp(e,t),n(s.current.createInputFormat()))},[t]),[r,(o=s.current)==null?void 0:o.is24HourTime]},Ep=({value:e,readOnly:t=!1,label:r,useDefaultDateValue:n=!1,useFormattedInput:s=!1,allowClear:o=!1,closeSelector:i=!1,locale:c,className:u,dateSelection:h=we.DateTime,dateFormat:f,timeConstraints:v,icon:P,iconPosition:l=Gr.Right,inputElement:d,selectableDate:b,isValidDate:x,onChange:y,calendarTemplate:E,dateScrollerTemplate:V,inputTemplate:R,wrapperTemplate:S})=>{const[$,O]=p.useState(!1),[q,z]=p.useState(),[se,ae]=p.useState(),[re,K,L]=ga(h),F=p.useRef(),C=p.useRef(!1),Q=p.useRef(c||qo()),I=p.useRef(),he=p.useRef(),k=p.useRef(),M=p.useRef(null),N=p.useRef(null),[_,W]=Sp(h,q),J=p.useRef({calendarTemplate:E,dateScrollerTemplate:V});p.useEffect(()=>{Q.current&&U(Q.current)},[Q]),p.useEffect(()=>{c&&U(c)},[c]),p.useEffect(()=>{if(e){const ee=Z();ie({type:le.InitializeDates,initialDate:ee})}else ie({type:le.ClearDates})},[e,I.current]),p.useEffect(()=>{W&&ie({type:le.SetTimeFormat,timeFormat:W?Oe.TwentyFourHour:Oe.TwelveHour})},[W]),p.useEffect(()=>{d&&(he.current=d)},[d]),p.useEffect(()=>{ie({type:le.SetDateSelector,dateSelector:H()})},[re]);const H=p.useCallback(()=>L.current===we.TimeOnly?Re.TimeSelector:L.current===we.DateTime||L.current===we.DateOnly?Re.DaySelector:Re.DateRangeSelector,[]),U=ee=>{Ei(ee).then(fe=>{z(fe.code),I.current=fe;const Ee=Z();ie(e||n?{type:le.InitializeDates,initialDate:Array.isArray(Ee)?Ee[0]:Ee}:{type:le.SetViewDate,viewDate:Array.isArray(Ee)?Ee[0]:Ee})}).catch(fe=>console.error(fe))},Z=()=>{const ee=new Date;return ee.setHours(0,0,0,0),e?typeof e=="string"?L.current!==we.DateRange?_r(e,I.current):Zn(e,I.current):e:ee},te={currentSelector:H(),currentViewDate:new Date,timeFormat:Oe.TwelveHour,dateInitialized:!1},[D,ie]=p.useReducer(gp,te),A=()=>{Gt(),O(!0)},Ne=p.useMemo(()=>yr(()=>{O(!1)},250),[]),qe=p.useMemo(()=>yr(()=>{Ne.cancel()},5),[Ne]),Le=ee=>{const fe=ee.target.innerText;Ge(fe)},Ye=ee=>{if(ee){const fe=L.current!==we.DateRange?_r(ee,I.current):Zn(ee,I.current);return fe?x?Array.isArray(fe)?fe.every(Ee=>x(Ee)):x(fe):!0:!1}else return!0},ot=ee=>{Ge(ee||"")},Ge=ee=>{const fe=L.current!==we.DateRange?_r(ee,I.current):Zn(ee,I.current);fe?(Array.isArray(fe)?(pp(fe[0],Mo(D.currentViewDate),df(bt(D.currentViewDate,1)))||ie({type:le.SetViewDate,viewDate:fe[0]}),ie({type:le.SetSelectedDateRange,selectedStartDate:fe[0],selectedEndDate:fe[1]})):ie({type:le.SetSelectedDate,selectedDate:fe,viewDate:fe}),y==null||y(fe)):ee===""&&(ie({type:le.ClearDates}),y==null||y())},Ve=ee=>{L.current===we.DateOnly&&i===!0&&O(!1),y==null||y(ee)},Kt=()=>{Gt(),O(!$),N.current?N.current.focus():M.current&&M.current.focus()},Zt=()=>{ie({type:le.ClearDates}),O(!1),y==null||y()},Qe=(ee,fe)=>{(!he.current||F.current!==fe)&&(he.current=ee,F.current=fe,C.current=!0)},Gt=()=>{(!k.current||C.current)&&he.current&&(k.current=he.current,ae(he.current),C.current=!1)},Qt=()=>{O(!1),ie({type:le.SetDateSelector,dateSelector:H()})},Ot=()=>{switch(f){case kr.Short:return"short";case kr.Medium:return"medium";case kr.Long:return"long";default:return}},it=()=>{var fe,Ee,ct,ut,xt,tr,wt,rr,Pt,Tt,nr,sr;const ee=Ot();switch(L.current){case we.DateTime:return D.selectedDate?ee?D.selectedDate.toLocaleString((fe=I.current)==null?void 0:fe.code,{dateStyle:ee,timeStyle:ee}):D.selectedDate.toLocaleString((Ee=I.current)==null?void 0:Ee.code):"";case we.DateOnly:return D.selectedDate?ee?D.selectedDate.toLocaleDateString((ct=I.current)==null?void 0:ct.code,{dateStyle:ee}):D.selectedDate.toLocaleDateString((ut=I.current)==null?void 0:ut.code):"";case we.TimeOnly:return D.selectedDate?ee?D.selectedDate.toLocaleTimeString((xt=I.current)==null?void 0:xt.code,{timeStyle:ee,hour12:D.timeFormat===Oe.TwelveHour,hourCycle:D.timeFormat===Oe.TwentyFourHour?"h23":void 0}):D.selectedDate.toLocaleTimeString((tr=I.current)==null?void 0:tr.code,{hour12:D.timeFormat===Oe.TwelveHour,hourCycle:D.timeFormat===Oe.TwentyFourHour?"h23":void 0}):"";case we.DateRange:return D.selectedStartDate&&D.selectedEndDate?ee?`${D.selectedStartDate.toLocaleDateString((wt=I.current)==null?void 0:wt.code,{dateStyle:ee})} - ${D.selectedEndDate.toLocaleDateString((rr=I.current)==null?void 0:rr.code,{dateStyle:ee})}`:`${D.selectedStartDate.toLocaleDateString((Pt=I.current)==null?void 0:Pt.code)} - ${D.selectedEndDate.toLocaleDateString((Tt=I.current)==null?void 0:Tt.code)}`:"";default:return D.selectedDate?ee?D.selectedDate.toLocaleString((nr=I.current)==null?void 0:nr.code,{dateStyle:ee,timeStyle:ee}):D.selectedDate.toLocaleString((sr=I.current)==null?void 0:sr.code):""}},at=re===we.DateTime||re===we.DateOnly||re===we.DateRange,Cr=re===we.DateTime||re===we.TimeOnly,Xe=l===Gr.None?{}:l===Gr.Right?{rightElement:g.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[o&&!t&&g.jsx("div",{children:g.jsx(Ke,{icon:"close",size:He.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:Zt})}),g.jsx("div",{className:"bsc:ml-2",onClick:t?void 0:Kt,children:P||g.jsx(Ke,{icon:"calendar",size:He.Small,className:t?void 0:"bsc:cursor-pointer"})})]}),rightElementClassName:"bsc:justify-center"}:{leftElement:g.jsxs("div",{className:"bsc:flex bsc:text-black bsc:dark:text-mono-light-1",children:[g.jsx("div",{className:"bsc:mr-2",onClick:t?void 0:Kt,children:P||g.jsx(Ke,{icon:"calendar",size:He.Small,className:t?void 0:"bsc:cursor-pointer"})}),o&&!t&&g.jsx("div",{children:g.jsx(Ke,{icon:"close",size:He.Small,className:"bsc:cursor-pointer bsc:text-sm",onClick:Zt})})]}),leftElementClassName:"bsc:justify-center"},Nt={setDateSelector:ee=>K(ee)},Dr=S||((ee,fe)=>g.jsx(g.Fragment,{children:fe})),Xt=()=>g.jsx(kt,{props:Nt,template:Dr,children:g.jsxs(g.Fragment,{children:[D.currentSelector===Re.DaySelector&&at&&D.dateInitialized&&I.current&&g.jsx(yp,{selectedDate:D.selectedDate,viewDate:D.currentViewDate,locale:I.current,showTimeSelector:L.current===we.DateTime,selectableDate:b,isValidDate:x,dispatcher:ie,onChange:Ve}),D.currentSelector===Re.MonthSelector&&at&&D.dateInitialized&&I.current&&g.jsx(vp,{viewDate:D.currentViewDate,locale:I.current,dateSelection:L.current,dispatcher:ie}),D.currentSelector===Re.YearSelector&&at&&D.dateInitialized&&I.current&&g.jsx(Pp,{viewDate:D.currentViewDate,locale:I.current,dispatcher:ie}),D.currentSelector===Re.TimeSelector&&Cr&&D.dateInitialized&&I.current&&g.jsx(wp,{viewDate:D.currentViewDate,showDateSelector:L.current===we.DateTime,locale:I.current,timeFormat:D.timeFormat,timeConstraints:v,onChange:y,dispatcher:ie}),D.currentSelector===Re.DateRangeSelector&&at&&D.dateInitialized&&I.current&&g.jsx(xp,{viewDate:D.currentViewDate,selectedStartDate:D.selectedStartDate,selectedEndDate:D.selectedEndDate,locale:I.current,onChange:y,dispatcher:ie})]})}),Jt=Gn({label:r,readOnly:t,allowClear:o,getValue:it,onFocus:A,onInput:Le,iconPosition:l,iconElement:Xe.rightElement||Xe.leftElement},D.currentViewDate,ie),er=R||((ee,fe)=>g.jsx(g.Fragment,{children:fe})),jt=de("bsc:text-left",{"bc-read-only bsc:bg-gray-4 bsc:dark:bg-mono-dark-3":t,"bsc:bg-white bsc:dark:bg-mono-dark-1":!t},"bc-dt-input",u);return g.jsx(Kn.Provider,{value:J.current,children:g.jsxs("div",{className:"bc-date-time",children:[r&&g.jsx(ft,{label:r,readOnly:t,className:"bc-dt-label"}),g.jsx(An,{mobileMarkup:g.jsxs(g.Fragment,{children:[g.jsx(kt,{props:Jt,template:er,children:g.jsx(Vr,{ref:M,value:it(),readOnly:t,inputMode:"none",className:jt,onFocus:A,onElementCreate:ee=>Qe(ee,!1),...Xe})}),g.jsx(mi,{visible:$,target:se,hidden:Qt,unmountWhenHidden:!0,children:Xt()})]}),aboveMobileMarkup:g.jsxs(g.Fragment,{children:[g.jsx(kt,{props:Jt,template:er,children:s===!1?g.jsx(Vr,{ref:M,value:it(),readOnly:t,className:jt,onFocus:A,onBlur:Ne,onInput:Le,onElementCreate:ee=>Qe(ee,!1),...Xe}):g.jsx(Pi,{ref:N,value:it(),readOnly:t,className:jt,format:_,isInputValid:Ye,onFocus:A,onBlur:Ne,onChange:ot,onElementCreate:ee=>Qe(ee,!0),...Xe})}),g.jsx(yi,{visible:$,target:se,shouldTargetCloseOverlay:!1,shouldScrollCloseOverlay:!0,shouldCheckZIndex:!0,shouldRemainOnScreen:!0,hidden:Qt,isClickedWithin:qe,unmountWhenHidden:!0,children:Xt()})]})})]})})};var Qn,_i;function _p(){if(_i)return Qn;_i=1;function e(l,d){var b,x;if(typeof d=="function")x=d(l),x!==void 0&&(l=x);else if(Array.isArray(d))for(b=0;b<d.length;b++)x=d[b](l),x!==void 0&&(l=x);return l}function t(l,d){return l[0]==="-"&&Array.isArray(d)&&/^-\d+$/.test(l)?d.length+parseInt(l,10):l}function r(l){return/^\d+$/.test(l)}function n(l){return Object.prototype.toString.call(l)==="[object Object]"}function s(l){return Object(l)===l}function o(l){return Object.keys(l).length===0}var i=["__proto__","prototype","constructor"],c=function(l){return i.indexOf(l)===-1};function u(l,d){l.indexOf("[")>=0&&(l=l.replace(/\[/g,d).replace(/]/g,""));var b=l.split(d),x=b.filter(c);if(x.length!==b.length)throw Error("Refusing to update blacklisted property "+l);return b}var h=Object.prototype.hasOwnProperty;function f(l,d,b,x){if(!(this instanceof f))return new f(l,d,b,x);typeof d>"u"&&(d=!1),typeof b>"u"&&(b=!0),typeof x>"u"&&(x=!0),this.separator=l||".",this.override=d,this.useArray=b,this.useBrackets=x,this.keepArray=!1,this.cleanup=[]}var v=new f(".",!1,!0,!0);function P(l){return function(){return v[l].apply(v,arguments)}}return f.prototype._fill=function(l,d,b,x){var y=l.shift();if(l.length>0){if(d[y]=d[y]||(this.useArray&&r(l[0])?[]:{}),!s(d[y]))if(this.override)d[y]={};else{if(!(s(b)&&o(b)))throw new Error("Trying to redefine `"+y+"` which is a "+typeof d[y]);return}this._fill(l,d[y],b,x)}else{if(!this.override&&s(d[y])&&!o(d[y])){if(!(s(b)&&o(b)))throw new Error("Trying to redefine non-empty obj['"+y+"']");return}d[y]=e(b,x)}},f.prototype.object=function(l,d){var b=this;return Object.keys(l).forEach(function(x){var y=d===void 0?null:d[x],E=u(x,b.separator).join(b.separator);E.indexOf(b.separator)!==-1?(b._fill(E.split(b.separator),l,l[x],y),delete l[x]):l[x]=e(l[x],y)}),l},f.prototype.str=function(l,d,b,x){var y=u(l,this.separator).join(this.separator);return l.indexOf(this.separator)!==-1?this._fill(y.split(this.separator),b,d,x):b[l]=e(d,x),b},f.prototype.pick=function(l,d,b,x){var y,E,V,R,S;for(E=u(l,this.separator),y=0;y<E.length;y++)if(R=t(E[y],d),d&&typeof d=="object"&&R in d){if(y===E.length-1)return b?(V=d[R],x&&Array.isArray(d)?d.splice(R,1):delete d[R],Array.isArray(d)&&(S=E.slice(0,-1).join("."),this.cleanup.indexOf(S)===-1&&this.cleanup.push(S)),V):d[R];d=d[R]}else return;return b&&Array.isArray(d)&&(d=d.filter(function($){return $!==void 0})),d},f.prototype.delete=function(l,d){return this.remove(l,d,!0)},f.prototype.remove=function(l,d,b){var x;if(this.cleanup=[],Array.isArray(l)){for(x=0;x<l.length;x++)this.pick(l[x],d,!0,b);return b||this._cleanup(d),d}else return this.pick(l,d,!0,b)},f.prototype._cleanup=function(l){var d,b,x,y;if(this.cleanup.length){for(b=0;b<this.cleanup.length;b++)x=this.cleanup[b].split("."),y=x.splice(0,-1).join("."),d=y?this.pick(y,l):l,d=d[x[0]].filter(function(E){return E!==void 0}),this.set(this.cleanup[b],d,l);this.cleanup=[]}},f.prototype.del=f.prototype.remove,f.prototype.move=function(l,d,b,x,y){return typeof x=="function"||Array.isArray(x)?this.set(d,e(this.pick(l,b,!0),x),b,y):(y=x,this.set(d,this.pick(l,b,!0),b,y)),b},f.prototype.transfer=function(l,d,b,x,y,E){return typeof y=="function"||Array.isArray(y)?this.set(d,e(this.pick(l,b,!0),y),x,E):(E=y,this.set(d,this.pick(l,b,!0),x,E)),x},f.prototype.copy=function(l,d,b,x,y,E){return typeof y=="function"||Array.isArray(y)?this.set(d,e(JSON.parse(JSON.stringify(this.pick(l,b,!1))),y),x,E):(E=y,this.set(d,this.pick(l,b,!1),x,E)),x},f.prototype.set=function(l,d,b,x){var y,E,V,R;if(typeof d>"u")return b;for(V=u(l,this.separator),y=0;y<V.length;y++){if(R=V[y],y===V.length-1)if(x&&n(d)&&n(b[R]))for(E in d)h.call(d,E)&&(b[R][E]=d[E]);else if(x&&Array.isArray(b[R])&&Array.isArray(d))for(var S=0;S<d.length;S++)b[V[y]].push(d[S]);else b[R]=d;else(!h.call(b,R)||!n(b[R])&&!Array.isArray(b[R]))&&(/^\d+$/.test(V[y+1])?b[R]=[]:b[R]={});b=b[R]}return b},f.prototype.transform=function(l,d,b){return d=d||{},b=b||{},Object.keys(l).forEach((function(x){this.set(l[x],this.pick(x,d),b)}).bind(this)),b},f.prototype.dot=function(l,d,b){d=d||{},b=b||[];var x=Array.isArray(l);return Object.keys(l).forEach((function(y){var E=x&&this.useBrackets?"["+y+"]":y;if(s(l[y])&&(n(l[y])&&!o(l[y])||Array.isArray(l[y])&&!this.keepArray&&l[y].length!==0))if(x&&this.useBrackets){var V=b[b.length-1]||"";return this.dot(l[y],d,b.slice(0,-1).concat(V+E))}else return this.dot(l[y],d,b.concat(E));else x&&this.useBrackets?d[b.join(this.separator).concat("["+y+"]")]=l[y]:d[b.concat(E).join(this.separator)]=l[y]}).bind(this)),d},f.pick=P("pick"),f.move=P("move"),f.transfer=P("transfer"),f.transform=P("transform"),f.copy=P("copy"),f.object=P("object"),f.str=P("str"),f.set=P("set"),f.delete=P("delete"),f.del=f.remove=P("remove"),f.dot=P("dot"),["override","overwrite"].forEach(function(l){Object.defineProperty(f,l,{get:function(){return v.override},set:function(d){v.override=!!d}})}),["useArray","keepArray","useBrackets"].forEach(function(l){Object.defineProperty(f,l,{get:function(){return v[l]},set:function(d){v[l]=d}})}),f._process=e,Qn=f,Qn}var kp=_p();const Jr=rn(kp),Cp=({name:e,label:t,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,orientation:c=$e.Horizontal,isMultiSelect:u=!1,className:h,onChange:f,itemTemplate:v})=>{const[P,l]=p.useState(),[d,b]=p.useState([]),x=gn(()=>n,[n]),y=p.useId();p.useEffect(()=>{if(u){const F=Array.isArray(r)?r.map(C=>C.toString()):r?[String(r)]:void 0;b(F??[])}else r&&l(r.toString())},[r]);const E=F=>u?d.findIndex(C=>C===F)>-1:P===F,V=F=>{const C=F.toString();if(u){const Q=E(C);let I;Q?I=d.filter(he=>he!=C):I=[...d,C],b(I),f==null||f({name:e,value:I})}else C!==P&&(l(C),f==null||f({name:e,value:C}))},R=F=>{const{value:C}=F.target;l(C),f==null||f({name:e,value:C})},S=F=>{const{value:C,checked:Q}=F.target;let I;Q?I=[...d,C]:I=d.filter(he=>he!=C),b(I),f==null||f({name:e,value:I})},$=(F,C,Q,I)=>g.jsxs("label",{htmlFor:F,className:I,children:[g.jsx("input",{id:F,name:e,value:Q,type:"checkbox",onChange:S,checked:E(Q),className:"bsc:appearance-none"}),C]},F),O=(F,C,Q,I)=>g.jsxs("label",{htmlFor:F,className:I,children:[g.jsx("input",{id:F,name:e,value:Q,type:"radio",onChange:R,checked:E(Q),className:"bsc:appearance-none"}),C]},F),q=Ir(cr.FocusWithin),z=p.useCallback((F,C)=>g.jsx(g.Fragment,{children:C}),[]),se=v||z,ae=(F,C,Q)=>{const I=`element_${y}_${C}`,he=Jr.pick(s,F),k=String(Jr.pick(o,F)),M=C===0,N=C===Q.length-1,_=de("bc-group-button-item bsc:cursor-pointer bsc:border-solid bsc:p-2 bsc:font-medium",{"bsc:has-checked:bg-primary-1 bsc:dark:has-checked:bg-mono-light-1 bsc:has-checked:text-white bsc:dark:has-checked:text-mono-dark-1 bsc:dark:text-mono-light-1 bsc:text-gray-2 bsc:border-gray-3 bsc:dark:border-mono-light-2":!i,"bc-read-only bsc:has-checked:bg-primary-4 bsc:dark:has-checked:bg-mono-light-3 bsc:has-checked:text-gray-5 bsc:dark:has-checked:text-mono-dark-3 bsc:dark:text-mono-light-3 bsc:text-gray-3 bsc:border-gray-4 bsc:dark:border-mono-light-3 bsc:pointer-events-none":i,"bsc:border-t bsc:border-l bsc:border-b bsc:rounded-l-md bsc:pl-2":M&&c===$e.Horizontal,"bsc:border-t bsc:border-r bsc:border-l bsc:border-b bsc:rounded-r-md bsc:pr-2":N&&c===$e.Horizontal,"bsc:border-t bsc:border-b":!M&&!N&&c===$e.Horizontal,"bsc:border-l":!M&&c===$e.Horizontal,"bsc:border-l bsc:border-r bsc:border-t bsc:rounded-t-md":M&&c===$e.Vertical,"bsc:border bsc:rounded-b-md":N&&c===$e.Vertical,"bsc:border-t bsc:border-l bsc:border-r":!M&&!N&&c===$e.Vertical},q),W={itemId:I,selectedValue:u?d:P,itemText:he,itemValue:k,itemData:F,itemStyles:_,isSelected:E(k),isFirstItem:M,isLastItem:N,onItemChanged:V};return u?g.jsx(kt,{props:W,template:se,children:$(I,he,k,_)}):g.jsx(kt,{props:W,template:se,children:O(I,he,k,_)})},re=de("bsc:flex bsc:flex-col bsc:gap-2",h),K=de("bsc:flex",{"bsc:flex-col bsc:w-max":c===$e.Vertical}),L=F=>g.jsx("div",{className:K,children:F.map(ae)});return g.jsxs("div",{className:re,children:[t&&g.jsx(ft,{label:t,readOnly:i}),x&&L(x)]})},Dp=p.memo(Cp),Op=({id:e,name:t,label:r,value:n,checked:s=!1,labelLocation:o=Be.Right,readOnly:i=!1,useAnimation:c,onChange:u})=>{const h=hn(c),f=p.useCallback(l=>{u==null||u(l)},[u]),v=de("bc-radio-item-wrapper bsc:flex bsc:items-center bsc:*:cursor-pointer",{"bc-read-only":i}),P=de("bc-radio-item-outer bsc:relative bsc:*:size-[21px]",{"bsc:pl-1":o===Be.Left,"bsc:pr-1":o===Be.Right,"bsc-radio-item-animate":!i&&h,"bsc-radio-item":!i,"bc-read-only bsc-radio-item-read-only":i});return g.jsxs("div",{className:v,children:[o===Be.Left&&g.jsx(ft,{label:r,htmlFor:e,readOnly:i}),g.jsxs("label",{className:P,children:[g.jsx("input",{id:e,name:t,value:n,type:"radio",checked:s,onChange:f,className:"bc-radio-item-input-hidden bsc:hidden"}),g.jsxs("svg",{viewBox:"0 0 30 30",preserveAspectRatio:"xMidYMid meet",className:"bc-radio-item-svg",children:[g.jsx("circle",{cx:15,cy:15,r:13}),g.jsx("circle",{cx:"50%",cy:"50%",r:7})]})]}),o===Be.Right&&g.jsx(ft,{label:r,htmlFor:e,readOnly:i})]})},Np=p.memo(Op),jp=({name:e,label:t,value:r,data:n,textField:s,valueField:o,readOnly:i=!1,labelLocation:c=Be.Right,orientation:u=$e.Vertical,className:h,useAnimation:f,onChange:v})=>{const[P,l]=p.useState(r),d=gn(()=>n,[n]),b=p.useId(),x=p.useCallback(S=>{const $=S.target.value;l($),v==null||v({name:e,value:$,originalEvent:S})},[e]),y=(S,$)=>{const O=`${b}_radio_${$}`,q=Jr.pick(o,S);return g.jsx(Np,{id:O,name:e,label:Jr.pick(s,S),value:q,checked:q==P,labelLocation:c,readOnly:i,useAnimation:f,onChange:x},O)},E=de("bc-radio-container bsc:flex bsc:flex-col bsc:gap-1",h),V=de("bc-radio-wrapper bsc:flex bsc:gap-1",{"bsc:flex-col":u===$e.Vertical,"bsc:*:pr-2":u===$e.Horizontal}),R=S=>g.jsx("div",{className:V,children:S.map(y)});return g.jsxs("div",{className:E,children:[t&&g.jsx(ft,{label:t,readOnly:i}),d&&R(d)]})},Ip=p.memo(jp),Mp=({name:e,label:t,value:r,checked:n=!1,readOnly:s=!1,useAnimation:o,className:i,onChange:c})=>{const[u,h]=p.useState(!1),f=p.useId(),v=hn(o);p.useEffect(()=>{h(n)},[n]);const P=y=>{const{checked:E}=y.target;h(E),c==null||c({originalEvent:y,name:e||y.target.name,value:r||y.target.value,checked:E})},l=de("bc-toggle-wrapper bsc:flex bsc:flex-col",i),d=Ir(cr.FocusWithin),b=de("bc-toggle-container bsc-toggle-switch bsc:flex bsc:mt-0.5 bsc:relative bsc:w-[60px] bsc:h-[26px] bsc:rounded-full bsc:[transition:background-color_1s]",{"bsc:cursor-pointer bsc:bg-gray-3 bsc:dark:bg-mono-dark-3 bsc:has-checked:bg-primary-1 bsc:dark:has-checked:bg-mono-light-2":!s,"bc-read-only bsc:pointer-events-none bsc:bg-gray-4 bsc:dark:bg-mono-dark-2 bsc:has-checked:bg-primary-4 bsc:dark:has-checked:bg-mono-light-3":s},d),x=de("bc-toggle-switch bsc:absolute bsc:rounded-full bsc:dark:border bsc:dark:border-solid bsc:dark:border-mono-dark-1 bsc:w-[18px] bsc:h-[18px] bsc:top-[4px] bsc:left-[4px]",{"bsc:bg-white bsc:cursor-pointer":!s,"bc-read-only bsc:bg-gray-5 bsc:pointer-events-none":s,"bsc:[transition:0.3s]":!s&&v});return g.jsxs("div",{className:l,children:[t&&g.jsx(ft,{label:t,htmlFor:f,readOnly:s}),g.jsxs("label",{className:b,children:[g.jsx("input",{id:f,name:e,value:r,type:"checkbox",checked:u,onChange:P,className:"bsc:appearance-none"}),g.jsx("div",{id:"switch",className:x})]})]})},Rp=p.memo(Mp);ne.BeeSoftProvider=Ni,ne.Button=et,ne.Checkbox=Ys,ne.CheckboxGroup=ya,ne.ContentEditableInput=Vr,ne.DateFormatType=kr,ne.DateScrollerType=zt,ne.DateSelectionType=we,ne.DateTime=Ep,ne.FormGroupItemOrientation=$e,ne.FormattedInput=Pi,ne.GroupButton=Dp,ne.MediaQuery=An,ne.MobileOverlayPanel=mi,ne.OverlayPanel=yi,ne.RadioButton=Ip,ne.SelectionLabelLocation=Be,ne.Toggle=Rp,ne.applyBeeSoftTheme=_h,ne.createBeeSoftTheme=kh,Object.defineProperty(ne,Symbol.toStringTag,{value:"Module"})});
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "beesoft-components",
3
- "version": "0.10.1-7",
3
+ "version": "0.10.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "author": {