beesoft-components 0.4.5 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +2 -2
- package/dist/index.es.js.gz +0 -0
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.gz +0 -0
- package/dist/style.css +1 -1
- package/dist/style.css.gz +0 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -7632,7 +7632,7 @@ const bp = ({
|
|
|
7632
7632
|
children: /* @__PURE__ */ p.jsxs("div", { className: J, children: [
|
|
7633
7633
|
t && /* @__PURE__ */ p.jsx("div", { className: ne, onClick: oe, children: Q.current }),
|
|
7634
7634
|
/* @__PURE__ */ p.jsx("div", { className: "bc-dt-time-hour-increase bsc-cursor-pointer bsc-text-center", children: /* @__PURE__ */ p.jsx(Ze, { className: "bsc-bg-transparent bsc-p-2 focus:bsc-outline-none", onClick: H, children: /* @__PURE__ */ p.jsx(Lr, {}) }) }),
|
|
7635
|
-
/* @__PURE__ */ p.jsx("div", {
|
|
7635
|
+
/* @__PURE__ */ p.jsx("div", {}),
|
|
7636
7636
|
/* @__PURE__ */ p.jsx("div", { className: "bc-dt-time-minute-increase bsc-cursor-pointer bsc-text-center", children: /* @__PURE__ */ p.jsx(Ze, { className: "bsc-bg-transparent bsc-p-2 focus:bsc-outline-none", onClick: F, children: /* @__PURE__ */ p.jsx(Lr, {}) }) }),
|
|
7637
7637
|
n === Se.TwelveHour && /* @__PURE__ */ p.jsx("div", { className: "bc-dt-time-meridian-increase bsc-cursor-pointer bsc-text-center", children: /* @__PURE__ */ p.jsx(Ze, { className: "bsc-bg-transparent bsc-p-2 focus:bsc-outline-none", onClick: X, children: /* @__PURE__ */ p.jsx(Lr, {}) }) }),
|
|
7638
7638
|
/* @__PURE__ */ p.jsx("div", { className: "bc-dt-time-hour-value bsc-text-center", children: u.current[w] }),
|
|
@@ -7640,7 +7640,7 @@ const bp = ({
|
|
|
7640
7640
|
/* @__PURE__ */ p.jsx("div", { className: "bc-dt-time-minute-value bsc-text-center", children: l.current[C] }),
|
|
7641
7641
|
n === Se.TwelveHour && /* @__PURE__ */ p.jsx("div", { className: "bc-dt-time-meridian-value bsc-text-center", children: f.current[R] }),
|
|
7642
7642
|
/* @__PURE__ */ p.jsx("div", { className: "bc-dt-time-hour-decrease bsc-cursor-pointer bsc-text-center", children: /* @__PURE__ */ p.jsx(Ze, { className: "bsc-bg-transparent bsc-p-2 focus:bsc-outline-none", onClick: g, children: /* @__PURE__ */ p.jsx(Ar, {}) }) }),
|
|
7643
|
-
/* @__PURE__ */ p.jsx("div", {
|
|
7643
|
+
/* @__PURE__ */ p.jsx("div", {}),
|
|
7644
7644
|
/* @__PURE__ */ p.jsx("div", { className: "bc-dt-time-minute-decrease bsc-cursor-pointer bsc-text-center", children: /* @__PURE__ */ p.jsx(Ze, { className: "bsc-bg-transparent bsc-p-2 focus:bsc-outline-none", onClick: K, children: /* @__PURE__ */ p.jsx(Ar, {}) }) }),
|
|
7645
7645
|
n === Se.TwelveHour && /* @__PURE__ */ p.jsx("div", { className: "bc-dt-time-meridian-decrease bsc-cursor-pointer bsc-text-center", children: /* @__PURE__ */ p.jsx(Ze, { className: "bsc-bg-transparent bsc-p-2 focus:bsc-outline-none", onClick: X, children: /* @__PURE__ */ p.jsx(Ar, {}) }) })
|
|
7646
7646
|
] })
|
package/dist/index.es.js.gz
CHANGED
|
Binary file
|
package/dist/index.umd.js
CHANGED
|
@@ -48,4 +48,4 @@ object-assign
|
|
|
48
48
|
(c) Sindre Sorhus
|
|
49
49
|
@license MIT
|
|
50
50
|
*/var Xr,qa;function gh(){if(qa)return Xr;qa=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function a(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var o={},s=0;s<10;s++)o["_"+String.fromCharCode(s)]=s;var u=Object.getOwnPropertyNames(o).map(function(f){return o[f]});if(u.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(f){l[f]=f}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Xr=a()?Object.assign:function(i,o){for(var s,u=n(i),l,f=1;f<arguments.length;f++){s=Object(arguments[f]);for(var h in s)t.call(s,h)&&(u[h]=s[h]);if(e){l=e(s);for(var b=0;b<l.length;b++)r.call(s,l[b])&&(u[l[b]]=s[l[b]])}}return u},Xr}var Jr,Ga;function en(){if(Ga)return Jr;Ga=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Jr=e,Jr}var tn,Qa;function Ka(){return Qa||(Qa=1,tn=Function.call.bind(Object.prototype.hasOwnProperty)),tn}var rn,Za;function yh(){if(Za)return rn;Za=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=en(),r={},n=Ka();e=function(i){var o="Warning: "+i;typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}}function a(i,o,s,u,l){if(process.env.NODE_ENV!=="production"){for(var f in i)if(n(i,f)){var h;try{if(typeof i[f]!="function"){var b=Error((u||"React class")+": "+s+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw b.name="Invariant Violation",b}h=i[f](o,f,u,s,null,t)}catch(x){h=x}if(h&&!(h instanceof Error)&&e((u||"React class")+": type specification of "+s+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in r)){r[h.message]=!0;var T=l?l():"";e("Failed "+s+" type: "+h.message+(T??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},rn=a,rn}var nn,Xa;function bh(){if(Xa)return nn;Xa=1;var e=Ba(),t=gh(),r=en(),n=Ka(),a=yh(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var u="Warning: "+s;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function o(){return null}return nn=function(s,u){var l=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function h(v){var E=v&&(l&&v[l]||v[f]);if(typeof E=="function")return E}var b="<<anonymous>>",T={array:_("array"),bigint:_("bigint"),bool:_("boolean"),func:_("function"),number:_("number"),object:_("object"),string:_("string"),symbol:_("symbol"),any:z(),arrayOf:K,element:W(),elementType:y(),instanceOf:$,node:oe(),objectOf:ee,oneOf:X,oneOfType:B,shape:ae,exact:g};function x(v,E){return v===E?v!==0||1/v===1/E:v!==v&&E!==E}function D(v,E){this.message=v,this.data=E&&typeof E=="object"?E:{},this.stack=""}D.prototype=Error.prototype;function P(v){if(process.env.NODE_ENV!=="production")var E={},H=0;function d(O,M,A,j,k,V,Ee){if(j=j||b,V=V||A,Ee!==r){if(u){var C=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 C.name="Invariant Violation",C}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ke=j+":"+A;!E[ke]&&H<3&&(i("You are manually calling a React.PropTypes validation function for the `"+V+"` prop on `"+j+"`. 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."),E[ke]=!0,H++)}}return M[A]==null?O?M[A]===null?new D("The "+k+" `"+V+"` is marked as required "+("in `"+j+"`, but its value is `null`.")):new D("The "+k+" `"+V+"` is marked as required in "+("`"+j+"`, but its value is `undefined`.")):null:v(M,A,j,k,V)}var S=d.bind(null,!1);return S.isRequired=d.bind(null,!0),S}function _(v){function E(H,d,S,O,M,A){var j=H[d],k=F(j);if(k!==v){var V=re(j);return new D("Invalid "+O+" `"+M+"` of type "+("`"+V+"` supplied to `"+S+"`, expected ")+("`"+v+"`."),{expectedType:v})}return null}return P(E)}function z(){return P(o)}function K(v){function E(H,d,S,O,M){if(typeof v!="function")return new D("Property `"+M+"` of component `"+S+"` has invalid PropType notation inside arrayOf.");var A=H[d];if(!Array.isArray(A)){var j=F(A);return new D("Invalid "+O+" `"+M+"` of type "+("`"+j+"` supplied to `"+S+"`, expected an array."))}for(var k=0;k<A.length;k++){var V=v(A,k,S,O,M+"["+k+"]",r);if(V instanceof Error)return V}return null}return P(E)}function W(){function v(E,H,d,S,O){var M=E[H];if(!s(M)){var A=F(M);return new D("Invalid "+S+" `"+O+"` of type "+("`"+A+"` supplied to `"+d+"`, expected a single ReactElement."))}return null}return P(v)}function y(){function v(E,H,d,S,O){var M=E[H];if(!e.isValidElementType(M)){var A=F(M);return new D("Invalid "+S+" `"+O+"` of type "+("`"+A+"` supplied to `"+d+"`, expected a single ReactElement type."))}return null}return P(v)}function $(v){function E(H,d,S,O,M){if(!(H[d]instanceof v)){var A=v.name||b,j=he(H[d]);return new D("Invalid "+O+" `"+M+"` of type "+("`"+j+"` supplied to `"+S+"`, expected ")+("instance of `"+A+"`."))}return null}return P(E)}function X(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("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])."):i("Invalid argument supplied to oneOf, expected an array.")),o;function E(H,d,S,O,M){for(var A=H[d],j=0;j<v.length;j++)if(x(A,v[j]))return null;var k=JSON.stringify(v,function(Ee,C){var ke=re(C);return ke==="symbol"?String(C):C});return new D("Invalid "+O+" `"+M+"` of value `"+String(A)+"` "+("supplied to `"+S+"`, expected one of "+k+"."))}return P(E)}function ee(v){function E(H,d,S,O,M){if(typeof v!="function")return new D("Property `"+M+"` of component `"+S+"` has invalid PropType notation inside objectOf.");var A=H[d],j=F(A);if(j!=="object")return new D("Invalid "+O+" `"+M+"` of type "+("`"+j+"` supplied to `"+S+"`, expected an object."));for(var k in A)if(n(A,k)){var V=v(A,k,S,O,M+"."+k,r);if(V instanceof Error)return V}return null}return P(E)}function B(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),o;for(var E=0;E<v.length;E++){var H=v[E];if(typeof H!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+L(H)+" at index "+E+"."),o}function d(S,O,M,A,j){for(var k=[],V=0;V<v.length;V++){var Ee=v[V],C=Ee(S,O,M,A,j,r);if(C==null)return null;C.data&&n(C.data,"expectedType")&&k.push(C.data.expectedType)}var ke=k.length>0?", expected one of type ["+k.join(", ")+"]":"";return new D("Invalid "+A+" `"+j+"` supplied to "+("`"+M+"`"+ke+"."))}return P(d)}function oe(){function v(E,H,d,S,O){return Y(E[H])?null:new D("Invalid "+S+" `"+O+"` supplied to "+("`"+d+"`, expected a ReactNode."))}return P(v)}function te(v,E,H,d,S){return new D((v||"React class")+": "+E+" type `"+H+"."+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+S+"`.")}function ae(v){function E(H,d,S,O,M){var A=H[d],j=F(A);if(j!=="object")return new D("Invalid "+O+" `"+M+"` of type `"+j+"` "+("supplied to `"+S+"`, expected `object`."));for(var k in v){var V=v[k];if(typeof V!="function")return te(S,O,M,k,re(V));var Ee=V(A,k,S,O,M+"."+k,r);if(Ee)return Ee}return null}return P(E)}function g(v){function E(H,d,S,O,M){var A=H[d],j=F(A);if(j!=="object")return new D("Invalid "+O+" `"+M+"` of type `"+j+"` "+("supplied to `"+S+"`, expected `object`."));var k=t({},H[d],v);for(var V in k){var Ee=v[V];if(n(v,V)&&typeof Ee!="function")return te(S,O,M,V,re(Ee));if(!Ee)return new D("Invalid "+O+" `"+M+"` key `"+V+"` supplied to `"+S+"`.\nBad object: "+JSON.stringify(H[d],null," ")+`
|
|
51
|
-
Valid keys: `+JSON.stringify(Object.keys(v),null," "));var C=Ee(A,V,S,O,M+"."+V,r);if(C)return C}return null}return P(E)}function Y(v){switch(typeof v){case"number":case"string":case"undefined":return!0;case"boolean":return!v;case"object":if(Array.isArray(v))return v.every(Y);if(v===null||s(v))return!0;var E=h(v);if(E){var H=E.call(v),d;if(E!==v.entries){for(;!(d=H.next()).done;)if(!Y(d.value))return!1}else for(;!(d=H.next()).done;){var S=d.value;if(S&&!Y(S[1]))return!1}}else return!1;return!0;default:return!1}}function q(v,E){return v==="symbol"?!0:E?E["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&E instanceof Symbol:!1}function F(v){var E=typeof v;return Array.isArray(v)?"array":v instanceof RegExp?"object":q(E,v)?"symbol":E}function re(v){if(typeof v>"u"||v===null)return""+v;var E=F(v);if(E==="object"){if(v instanceof Date)return"date";if(v instanceof RegExp)return"regexp"}return E}function L(v){var E=re(v);switch(E){case"array":case"object":return"an "+E;case"boolean":case"date":case"regexp":return"a "+E;default:return E}}function he(v){return!v.constructor||!v.constructor.name?b:v.constructor.name}return T.checkPropTypes=a,T.resetWarningCache=a.resetWarningCache,T.PropTypes=T,T},nn}var an,Ja;function wh(){if(Ja)return an;Ja=1;var e=en();function t(){}function r(){}return r.resetWarningCache=t,an=function(){function n(o,s,u,l,f,h){if(h!==e){var b=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 b.name="Invariant Violation",b}}n.isRequired=n;function a(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},an}if(process.env.NODE_ENV!=="production"){var Th=Ba(),xh=!0;Zr.exports=bh()(Th.isElement,xh)}else Zr.exports=wh()();var Ph=Zr.exports;const J=et(Ph),eo={disabled:!1};var Eh=process.env.NODE_ENV!=="production"?J.oneOfType([J.number,J.shape({enter:J.number,exit:J.number,appear:J.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&J.oneOfType([J.string,J.shape({enter:J.string,exit:J.string,active:J.string}),J.shape({enter:J.string,enterDone:J.string,enterActive:J.string,exit:J.string,exitDone:J.string,exitActive:J.string})]);const to=p.createContext(null);var Sh=function(t){return t.scrollTop},Ht="unmounted",ct="exited",lt="entering",Tt="entered",on="exiting",Ze=function(e){ph(t,e);function t(n,a){var i;i=e.call(this,n,a)||this;var o=a,s=o&&!o.isMounting?n.enter:n.appear,u;return i.appearStatus=null,n.in?s?(u=ct,i.appearStatus=lt):u=Tt:n.unmountOnExit||n.mountOnEnter?u=Ht:u=ct,i.state={status:u},i.nextCallback=null,i}t.getDerivedStateFromProps=function(a,i){var o=a.in;return o&&i.status===Ht?{status:ct}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(a){var i=null;if(a!==this.props){var o=this.state.status;this.props.in?o!==lt&&o!==Tt&&(i=lt):(o===lt||o===Tt)&&(i=on)}this.updateStatus(!1,i)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var a=this.props.timeout,i,o,s;return i=o=s=a,a!=null&&typeof a!="number"&&(i=a.exit,o=a.enter,s=a.appear!==void 0?a.appear:o),{exit:i,enter:o,appear:s}},r.updateStatus=function(a,i){if(a===void 0&&(a=!1),i!==null)if(this.cancelNextCallback(),i===lt){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:Ue.findDOMNode(this);o&&Sh(o)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ct&&this.setState({status:Ht})},r.performEnter=function(a){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:a,u=this.props.nodeRef?[s]:[Ue.findDOMNode(this),s],l=u[0],f=u[1],h=this.getTimeouts(),b=s?h.appear:h.enter;if(!a&&!o||eo.disabled){this.safeSetState({status:Tt},function(){i.props.onEntered(l)});return}this.props.onEnter(l,f),this.safeSetState({status:lt},function(){i.props.onEntering(l,f),i.onTransitionEnd(b,function(){i.safeSetState({status:Tt},function(){i.props.onEntered(l,f)})})})},r.performExit=function(){var a=this,i=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:Ue.findDOMNode(this);if(!i||eo.disabled){this.safeSetState({status:ct},function(){a.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:on},function(){a.props.onExiting(s),a.onTransitionEnd(o.exit,function(){a.safeSetState({status:ct},function(){a.props.onExited(s)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(a,i){i=this.setNextCallback(i),this.setState(a,i)},r.setNextCallback=function(a){var i=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,i.nextCallback=null,a(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},r.onTransitionEnd=function(a,i){this.setNextCallback(i);var o=this.props.nodeRef?this.props.nodeRef.current:Ue.findDOMNode(this),s=a==null&&!this.props.addEndListener;if(!o||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],l=u[0],f=u[1];this.props.addEndListener(l,f)}a!=null&&setTimeout(this.nextCallback,a)},r.render=function(){var a=this.state.status;if(a===Ht)return null;var i=this.props,o=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=hh(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return p.createElement(to.Provider,{value:null},typeof o=="function"?o(a,s):p.cloneElement(p.Children.only(o),s))},t}(p.Component);Ze.contextType=to,Ze.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:J.shape({current:typeof Element>"u"?J.any:function(e,t,r,n,a,i){var o=e[t];return J.instanceOf(o&&"ownerDocument"in o?o.ownerDocument.defaultView.Element:Element)(e,t,r,n,a,i)}}),children:J.oneOfType([J.func.isRequired,J.element.isRequired]).isRequired,in:J.bool,mountOnEnter:J.bool,unmountOnExit:J.bool,appear:J.bool,enter:J.bool,exit:J.bool,timeout:function(t){var r=Eh;t.addEndListener||(r=r.isRequired);for(var n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];return r.apply(void 0,[t].concat(a))},addEndListener:J.func,onEnter:J.func,onEntering:J.func,onEntered:J.func,onExit:J.func,onExiting:J.func,onExited:J.func}:{};function xt(){}Ze.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:xt,onEntering:xt,onEntered:xt,onExit:xt,onExiting:xt,onExited:xt},Ze.UNMOUNTED=Ht,Ze.EXITED=ct,Ze.ENTERING=lt,Ze.ENTERED=Tt,Ze.EXITING=on;const Ch=Ze,ro=({start:e,timeout:t=400,defaultStyle:r,transitionStyles:n,showTransitionOptions:a="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:i="linear",unmountOnExit:o=!1,onEntering:s,onEntered:u,onExit:l,onExited:f,children:h})=>{const b=r||{transition:`opacity ${t}ms ${a}`,opacity:0},T=n||{entering:{opacity:1},entered:{opacity:1},exiting:{transition:`opacity ${t}ms ${i}`,opacity:0},exited:{transition:`opacity ${t}ms ${i}`,opacity:0},unmounted:{}};return m.jsx(Ch,{in:e,timeout:t,onEntering:s,onEntered:u,onExit:l,onExited:f,unmountOnExit:o,children:x=>h({state:x,defaultStyle:b,transitionStyles:T})})};function no(e){return e.target?e.target:e}const ao=({visible:e,target:t,appendTo:r=document.body,unmountWhenHidden:n=!1,transitionDuration:a=400,showTransitionOptions:i="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:o="linear",approveText:s="DONE",shown:u,hidden:l,isClickedWithin:f,children:h})=>{const[b,T]=p.useState(-1),[x,D]=p.useState(-1),[P,_]=p.useState(e),z=p.useRef(100),K=p.useRef(101),W=p.useRef(),y=p.useRef(),$=p.useRef();p.useEffect(()=>{t&&(W.current=no(t));const g=Ma("zIndex",Y=>Y==="auto"||Y==="-1"?!1:parseInt(Y)>100).map(Y=>parseInt(Y,10));g.length>0&&(z.current=Math.max(...g)+1,K.current=Math.max(...g)+2),_(e)},[e,t]);const X=g=>{y.current=g},ee=()=>{D(z.current),T(K.current)},B=()=>{if(!y.current)return;u==null||u();let g;W.current&&(g=[W.current]);const Y=q=>{q?f==null||f():_(!1)};$.current=Ua(y.current,Y,g)},oe=()=>{$.current&&Ha($.current)},te=()=>{D(-1),T(-1),l==null||l()},ae={entering:{opacity:.5},entered:{opacity:.5}};return Ue.createPortal(m.jsx(ro,{start:P,timeout:a,showTransitionOptions:i,hideTransitionOptions:o,onEntering:ee,onEntered:B,onExit:oe,onExited:te,unmountOnExit:n,children:({state:g,defaultStyle:Y,transitionStyles:q})=>m.jsxs("div",{ref:F=>F&&X(F),children:[m.jsx("div",{className:"bsc-fixed bsc-left-0 bsc-top-0 bsc-h-full bsc-w-full bsc-bg-mono-dark-1",style:{zIndex:x,...q[g],...ae[g]}}),m.jsxs("div",{className:"dark:bsck-border-mono-light-1 bsc-fixed bsc-bottom-0 bsc-left-0 bsc-w-full bsc-bg-white dark:bsc-border-t dark:bsc-border-solid dark:bsc-bg-mono-dark-1 dark:bsc-text-mono-light-1",style:{zIndex:b,...Y,...q[g]},children:[m.jsx("div",{className:"bsc-w-full",children:h}),m.jsx(m.Fragment,{children:m.jsx(We,{buttonType:"primary",fullWidth:!0,onClick:()=>_(!1),className:"bsc-text-xs bsc-font-bold",children:s})})]})]})}),r)};var oo=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(oo||{}),io=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(io||{});class _e{static positionToTarget(t,r=2){const n=t.getBoundingClientRect();let a=0,i=0;const o=window.scrollY;switch(r){case 2:a=n.top+n.height+o,i=n.left;break;case 0:a=n.top+o,i=n.left;break;case 3:a=n.top+n.height+o,i=n.left+n.width;break;case 1:a=n.top+o,i=n.left+n.width}return{top:a,left:i}}static positionElementToTarget(t,r,n=0,a=2){let{left:i,top:o}=_e.positionToTarget(r,a);const s=t.getBoundingClientRect();switch(n){case 0:break;case 1:i=i-s.width;break;case 2:o=o-s.height;break;case 3:o=o-s.height,i=i-s.width;break}return{top:o,left:i}}static canPositionElementOnScreen(t,r){const n=_e.getScreenDimensions(),a=t.getBoundingClientRect(),i=_e.positionElementToTarget(t,r,0,2);if(i.left+a.width<n.width&&i.top+a.height<n.height||_e.positionElementToTarget(t,r,1,3).left>=0&&i.top+a.height<n.height)return!0;const s=_e.positionElementToTarget(t,r,2,0);if(s.left+a.width<n.width&&s.top>=0)return!0;const u=_e.positionElementToTarget(t,r,3,1);return u.left>=0&&u.top>=0}static positionElementToTargetOnScreen(t,r,n=0,a=2){const{left:i,top:o}=_e.positionElementToTarget(t,r,n,a),s=t.getBoundingClientRect(),u=_e.determineOffScreenLocation(s);if(u){if(n===0&&a===2){if(u.right&&!u.bottom)return _e.positionElementToTarget(t,r,1,3);if(u.bottom&&!u.right)return _e.positionElementToTarget(t,r,2,0);if(u.right&&u.bottom)return _e.positionElementToTarget(t,r,3,1)}else if(n===1&&a===3){if(u.left&&!u.bottom)return _e.positionElementToTarget(t,r,0,2);if(u.bottom&&!u.left)return _e.positionElementToTarget(t,r,3,1);if(u.left&&u.bottom)return _e.positionElementToTarget(t,r,2,0)}}return{top:o,left:i}}static determineOffScreenLocation(t){const r=_e.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 so=({visible:e,target:t,targetPosition:r=oo.BottomLeft,elementAlignment:n=io.TopLeft,shouldTargetCloseOverlay:a=!0,shouldMatchTargetWidth:i=!1,shouldScrollCloseOverlay:o=!1,shouldCheckZIndex:s=!1,shouldRemainOnScreen:u=!1,unmountWhenHidden:l=!1,transitionDuration:f=400,showTransitionOptions:h="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:b="linear",shown:T,hidden:x,isClickedWithin:D,markupCreated:P,children:_})=>{const[z,K]=p.useState(-1),[W,y]=p.useState(e),[$,X]=p.useState(!1),ee=p.useRef(!1),B=p.useRef(100),oe=p.useRef({left:0,top:0,width:0}),te=p.useRef(),ae=p.useRef(),g=p.useRef(),Y=p.useRef(),q=p.useRef(),F=p.useRef();p.useEffect(()=>(u===!0&&(F.current=new ResizeObserver(re)),()=>{var O,M;u===!0&&(ae.current&&((O=F.current)==null||O.unobserve(ae.current)),(M=F.current)==null||M.disconnect())}),[u]),p.useEffect(()=>{if(t&&(te.current=no(t),o&&(g.current=_a(te.current,{overflow:"scroll, auto",overflowX:"scroll, auto",overflowY:"scroll, auto"}),g.current.tagName.toLowerCase()==="html"&&(g.current=document))),s){const O=Ma("zIndex",M=>parseInt(M)>=100).map(M=>parseInt(M));O.length>0&&(B.current=Math.max(...O)+1)}e!==void 0&&y(e)},[t,e,o,s]);const re=O=>{if(ae.current){const M=_e.getScreenDimensions(),A=O[O.length-1].target,j=A.getBoundingClientRect(),k=_e.determineOffScreenLocation(j);if(k){if(te.current&&_e.canPositionElementOnScreen(A,te.current)){const V=_e.positionElementToTargetOnScreen(ae.current,te.current,n,r);oe.current={...oe.current,...V}}else k.right?oe.current.left=M.width-j.width:k.left&&(oe.current.left=0),k.bottom?oe.current.top=M.height-j.height:k.top&&(oe.current.top=0);L()}}},L=At(()=>{ee.current=!ee.current,X(ee.current)},20),he=()=>{K(B.current)},v=()=>{if(!ae.current)return;T==null||T();let O;!a&&te.current&&(O=[te.current]);const M=A=>{A?D==null||D():y(!1)};Y.current=Ua(ae.current,M,O),o&&(q.current=qc(A=>ae.current&&Pd(A,ae.current)&&y(!1),100,{leading:!0}),g.current&&g.current.addEventListener("scroll",q.current))},E=()=>{g.current&&q.current&&(g.current.removeEventListener("scroll",q.current),q.current=void 0),Y.current&&Ha(Y.current)},H=()=>{K(-1),x==null||x()},d=O=>{var M,A;if(ae.current=O,P==null||P(O),te.current){const j=_e.positionElementToTarget(ae.current,te.current,n,r);oe.current={...j,width:te.current.offsetWidth}}u===!0&&((M=F.current)==null||M.unobserve(ae.current),(A=F.current)==null||A.observe(ae.current))},S=p.useMemo(()=>{const O={top:`${oe.current.top}px`,left:`${oe.current.left}px`,zIndex:z};return i&&(O.width=`${oe.current.width}px`),O},[$,z,i]);return m.jsx(ro,{start:W,timeout:f,showTransitionOptions:h,hideTransitionOptions:b,onEntering:he,onEntered:v,onExit:E,onExited:H,unmountOnExit:l,children:({state:O,defaultStyle:M,transitionStyles:A})=>m.jsx("div",{className:"bsc-fixed bsc-border bsc-border-solid bsc-bg-white bsc-shadow dark:bsc-border-mono-light-1 dark:bsc-bg-mono-dark-1 dark:bsc-text-mono-light-1",style:{...S,...M,...A[O]},ref:j=>j&&d(j),children:_})})};let lr;const Dh=new Uint8Array(16);function Oh(){if(!lr&&(lr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!lr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return lr(Dh)}const Re=[];for(let e=0;e<256;++e)Re.push((e+256).toString(16).slice(1));function Ih(e,t=0){return Re[e[t+0]]+Re[e[t+1]]+Re[e[t+2]]+Re[e[t+3]]+"-"+Re[e[t+4]]+Re[e[t+5]]+"-"+Re[e[t+6]]+Re[e[t+7]]+"-"+Re[e[t+8]]+Re[e[t+9]]+"-"+Re[e[t+10]]+Re[e[t+11]]+Re[e[t+12]]+Re[e[t+13]]+Re[e[t+14]]+Re[e[t+15]]}const uo={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Nh(e,t,r){if(uo.randomUUID&&!t&&!e)return uo.randomUUID();e=e||{};const n=e.random||(e.rng||Oh)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let a=0;a<16;++a)t[r+a]=n[a];return t}return Ih(n)}class fr{static create(t){const r=[];let n=0;for(let a=0,i=t.formatParts.length;a<i;a++){const o=t.formatParts[a],s=n,u=s+o.characterCount;r.push({startPosition:s,endPosition:u,...o}),n=u}return r}}class _h{constructor(t,r){U(this,"instanceCollection");U(this,"formatPartList");U(this,"inputSlotCollection");U(this,"currentPartIndex",0);U(this,"currentCursorPosition",0);U(this,"inputElement");U(this,"inputSelection",null);U(this,"inputRange");U(this,"textNode");this.instanceCollection=Pt.getInstance(),this.formatPartList=fr.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t)}getCursorPosition(){return this.currentCursorPosition}getCurrentPartIndex(){return this.currentPartIndex}setInputElement(t){this.inputElement=t}setCursorToCurrentPosition(){this.setCursorSelection(this.currentCursorPosition)}setCursorPosition(t){this.setCursorSelection(t)}setCursorSelection(t,r){this.createInputRangeSelection(),this.inputRange&&this.textNode&&(this.inputRange.setStart(this.textNode,t),this.inputRange.setEnd(this.textNode,r||t),this.currentCursorPosition=r||t,this.setPartIndexByCursorPosition())}findCursorPosition(){var r,n;const t=(r=window.getSelection())==null?void 0:r.getRangeAt(0);if(this.inputElement&&t){const a=document.createTreeWalker(this.inputElement,NodeFilter.SHOW_TEXT,u=>{const l=document.createRange();return l.selectNodeContents(u),l.compareBoundaryPoints(Range.END_TO_END,t)<1?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let i=0;for(;a.nextNode();)i+=((n=a.currentNode.textContent)==null?void 0:n.length)||0;t.startContainer.nodeType===Node.TEXT_NODE&&(i+=t.startOffset);const o=this.inputSlotCollection.getLastSlotWithData(),s=o.startPosition+o.partText.length;this.setCursorSelection(i>s?s:i)}}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.currentCursorPosition>0){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--)r=this.formatPartList[n],t>=r.startPosition&&t<=r.endPosition&&(r.isSeparator?this.setCursorSelection(this.formatPartList[n-1].endPosition):this.setCursorSelection(t))}}moveCursorRight(){const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length;if(this.currentCursorPosition<r){const n=this.currentCursorPosition+1;let a=this.formatPartList[this.currentPartIndex];if(n>=a.startPosition&&n<=a.endPosition)this.setCursorSelection(n);else for(let i=this.currentPartIndex+1,o=this.formatPartList.length;i<o;i++)a=this.formatPartList[i],n>=a.startPosition&&n<=a.endPosition&&(a.isSeparator?this.setCursorSelection(this.formatPartList[i+1].startPosition):this.setCursorSelection(n))}}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))}}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}}}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 Mh{static create(t){const r=[];for(let n=0,a=t.length;n<a;n++){const i=t[n];i.isSeparator||r.push({partIndex:n,partText:"",isComplete:!1,...i})}return r}}class jh{constructor(t){U(this,"inputSlots");this.inputSlots=Mh.create(fr.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)}getFirstSlot(){return this.inputSlots[0]}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,a=this.inputSlots.length;n<a;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 Pt{static getInstance(){return this.instance||(this.instance=new kh),this.instance}}U(Pt,"instance");class kh{constructor(){U(this,"navigatorInstances");U(this,"inputSlotInstances");this.navigatorInstances={},this.inputSlotInstances={}}getNavigatorInstance(t,r){return this.navigatorInstances[t]||(this.navigatorInstances[t]=new _h(r,t)),this.navigatorInstances[t]}getInputSlotInstance(t,r){return this.inputSlotInstances[t]||(this.inputSlotInstances[t]=new jh(r)),this.inputSlotInstances[t]}removeInstances(t){this.navigatorInstances[t]&&delete this.navigatorInstances[t],this.inputSlotInstances[t]&&delete this.inputSlotInstances[t]}}class sn{constructor(t,r){U(this,"instanceCollection");U(this,"formatPartList");U(this,"inputSlotCollection");U(this,"inputElement");this.instanceCollection=Pt.getInstance(),this.formatPartList=fr.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t)}setInputElement(t){this.inputElement=t}render(){var r;let t="";for(let n=0,a=this.formatPartList.length;n<a;n++){const i=this.formatPartList[n];if(i.isSeparator)t+=i.inputText;else{const o=this.inputSlotCollection.getSlot(n);o&&(t+=o.partText+((r=o.inputText)==null?void 0:r.repeat(o.characterCount-o.partText.length)))}}this.inputElement&&(this.inputElement.innerHTML=t)}}var qe=(e=>(e[e.Text=0]="Text",e[e.Numeric=1]="Numeric",e))(qe||{});class co{constructor(){U(this,"numberKeys",["0","1","2","3","4","5","6","7","8","9"]);U(this,"movementKeys",["ArrowLeft","ArrowRight","Home","End"]);U(this,"editingKeys",["Backspace","Delete"]);U(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 Rh{constructor(t){U(this,"_currentIndex",0);U(this,"index",0);U(this,"formatParts");this.formatParts=fr.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 lo{constructor(t,r){U(this,"instanceCollection");U(this,"inputSlotCollection");U(this,"formatNavigator");U(this,"keyTypeChecker");U(this,"formatRenderer");U(this,"formatPartList");this.format=t,this.instanceCollection=Pt.getInstance(),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.keyTypeChecker=new co,this.formatRenderer=new sn(t,r),this.formatPartList=new Rh(t)}setInputElement(t){this.formatRenderer.setInputElement(t)}processKeyPress(t){if(this.keyTypeChecker.isEditingKey(t)){this.processEditRules(t);return}this.processInputRules(t)}processInputValue(t){var n;this.inputSlotCollection.clearAllSlots(),this.formatPartList.reset();let r=0;for(;this.formatPartList.hasNext();){const a=this.formatPartList.next();if(a&&!a.isSeparator)if(((n=this.formatPartList.peek())==null?void 0:n.isSeparator)===!0){const i=this.formatPartList.currentIndex,o=this.formatPartList.next();if(o&&o.inputText){const s=t.indexOf(o.inputText,r),u=this.inputSlotCollection.getSlot(i);if(u&&s>-1){const l=s-r>u.characterCount?r+u.characterCount:s;u.partText=t.substring(r,l),this.processSlotRules(u),r=s+o.characterCount}}}else{const i=this.inputSlotCollection.getSlot(this.formatPartList.currentIndex);i&&(i.partText=t.substring(r,r+i.characterCount),this.processSlotRules(i))}}}processEditRules(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const n=this.formatNavigator.getCursorPosition(),a=n-r.startPosition,i=this.format.deleteShiftsFormatPart||!1;switch(t.key){case"Backspace":{if(!(r.startPosition===n))r.partText=r.partText.substring(0,a-1)+r.partText.substring(a),i&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.moveCursorLeft(),this.processSlotRules(r,!0);else{this.processSlotRules(r,!0);const s=this.inputSlotCollection.getPreviousSlot(r.partIndex);s&&(s.partText=s.partText.substring(0,s.partText.length-1),i&&this.shiftFormatParts(s),this.formatRenderer.render(),this.formatNavigator.setCursorPosition(s.startPosition+s.partText.length),this.processSlotRules(s,!0))}break}case"Delete":r.partText=r.partText.substring(0,a)+r.partText.substring(a+1),i&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.setCursorToCurrentPosition(),this.processSlotRules(r,!0);break}}shiftFormatParts(t){let r=t,n;for(;(n=this.inputSlotCollection.getNextSlot(r.partIndex))!==void 0;){const a=n.partText.substring(0,1);n.partText=n.partText.substring(1),r.partText=r.partText+a,r=n}}processInputRules(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const{key:n}=t,a=r.characterCount,i=r.partText;if(r.valueType===qe.Numeric){if(!this.keyTypeChecker.isNumberKey(n))return;const o=r.maximumValue,s=r.exceedingMaximumValueCausesTab||!1,u=r.padWithZeros||!1,l=parseInt(this.createNewValue(r,n));if(o&&l>o)if(s){u&&(r.partText=r.partText.padStart(a,"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 i.length+1===a?(this.addToInputSlot(n),r.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):i.length+1<a&&(this.addToInputSlot(n),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}else i.length+1===a?(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,a=this.formatNavigator.getCursorPosition();if(a>=t.startPosition+t.partText.length)return n+r;{const i=a-t.startPosition;return n.substring(0,i)+r+n.substring(i)}}processSlotRules(t,r=!1){const n=t.characterCount,a=t.allCharactersRequired||!1;if(t.valueType===qe.Numeric){const i=t.minimumValue,o=t.maximumValue;if(a)t.isComplete=t.partText.length===n;else if(i!==void 0&&o!==void 0){const s=t.padWithZeros||!1,u=parseInt(t.partText);t.isComplete=u>=i&&u<=o,t.isComplete&&s&&!r&&(t.partText=t.partText.padStart(n,"0"))}else t.isComplete=t.partText.length>0}else a?t.isComplete=t.partText.length===n:t.isComplete=t.partText.length>0}}class Lh{constructor(t,r){U(this,"instanceCollection");U(this,"formatNavigator");U(this,"ruleProcessor");U(this,"keyTypeChecker");U(this,"formatRenderer");this.format=t,this.instanceCollection=Pt.getInstance(),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.ruleProcessor=new lo(t,r),this.keyTypeChecker=new co,this.formatRenderer=new sn(t,r)}setInputElement(t){this.ruleProcessor.setInputElement(t),this.formatRenderer.setInputElement(t)}processMovementKey(t){const{key:r,metaKey:n}=t;switch(r){case"ArrowLeft":n?this.formatNavigator.moveHome():this.formatNavigator.moveCursorLeft();break;case"ArrowRight":n?this.formatNavigator.moveEnd():this.formatNavigator.moveCursorRight();break;case"Home":this.formatNavigator.moveHome();break;case"End":this.formatNavigator.moveEnd();break}}processKeyPress(t){return this.keyTypeChecker.isIgnoreKey(t)?!1:this.keyTypeChecker.isMovementKey(t)?(this.processMovementKey(t),!1):(this.ruleProcessor.processKeyPress(t),!0)}}class Ah{constructor(t,r=""){U(this,"instanceId");U(this,"instanceCollection");U(this,"keyProcessor");U(this,"formatNavigator");U(this,"formatRenderer");U(this,"inputSlotCollection");U(this,"inputRuleProcessor");U(this,"previousOutputValue","");U(this,"inputElementSet",!1);U(this,"isInputFocused",!1);U(this,"inputElement");U(this,"onFormatChange");this.inputValue=r,this.instanceId=Nh(),this.instanceCollection=Pt.getInstance(),this.keyProcessor=new Lh(t,this.instanceId),this.formatNavigator=this.instanceCollection.getNavigatorInstance(this.instanceId,t),this.formatRenderer=new sn(t,this.instanceId),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(this.instanceId,t),this.inputRuleProcessor=new lo(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),setTimeout(()=>{var r;this.formatRenderer.render(),this.isInputFocused&&this.formatNavigator.setCursorToCurrentPosition(),this.inputValue.length>0&&(this.previousOutputValue=(r=this.inputElement)==null?void 0:r.innerHTML)}))}registerFormatChangeEvent(t){this.onFormatChange=t}mouseUpHandler(){this.formatNavigator.findCursorPosition()}keyDownHandler(t){t.key!=="Tab"&&(t.preventDefault(),t.stopPropagation(),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)}}const Fh=(e,t)=>{const{value:r="",format:n,readOnly:a=!1,debounceTime:i=800,fillContainer:o=!0,leftElement:s,rightElement:u,className:l,leftElementClassName:f,rightElementClassName:h,isSingleLine:b=!1,allowSingleLineScroll:T=!1,isInputValid:x,onChange:D,onFocus:P,onBlur:_,onElementCreate:z,onLeftElementClick:K,onRightElementClick:W}=e,[y,$]=p.useState(!0),X=p.useRef(),ee=p.useRef(),B=p.useRef();p.useEffect(()=>()=>{var L;(L=B.current)==null||L.dispose()},[]),p.useEffect(()=>{var L;(L=B.current)==null||L.inputValuePassed(r)},[r]),p.useEffect(()=>{var L,he,v;(L=B.current)==null||L.dispose(),n&&(B.current=new Ah(n,r),ee.current&&((he=B.current)==null||he.inputElementCreated(ee.current)),(v=B.current)==null||v.registerFormatChangeEvent(oe))},[n]);const oe=p.useCallback(L=>{x?x(L)?($(!0),D==null||D(L)):$(!1):D==null||D(L)},[D]),te=p.useCallback(L=>{var he;(he=B.current)==null||he.inputFocused(),P==null||P(L)},[P]),ae=p.useCallback(L=>{var he;(he=B.current)==null||he.inputBlurred(),_==null||_(L)},[_]),g=p.useCallback(()=>{var L;(L=B.current)==null||L.mouseUpHandler()},[]),Y=p.useCallback(L=>{var he;(he=B.current)==null||he.keyDownHandler(L)},[]),q=p.useCallback(L=>{var he,v,E,H,d,S,O,M,A;(v=(he=X.current)==null?void 0:he.inputElement)==null||v.removeEventListener("keydown",Y),(H=(E=X.current)==null?void 0:E.inputElement)==null||H.removeEventListener("mouseup",g),X.current=L,(S=(d=X.current)==null?void 0:d.inputElement)==null||S.addEventListener("keydown",Y),(M=(O=X.current)==null?void 0:O.inputElement)==null||M.addEventListener("mouseup",g),ee.current=(A=X.current)==null?void 0:A.inputElement},[]),F=p.useCallback(()=>{var L;(L=X.current)==null||L.focus()},[]);p.useImperativeHandle(t,()=>({focus:F}));const re=Ge(l,{"!bsc-border-error":!y});return m.jsx(Kt,{ref:L=>L&&q(L),readOnly:a,debounceTime:i,fillContainer:o,leftElement:s,rightElement:u,className:re,leftElementClassName:f,rightElementClassName:h,isSingleLine:b,allowSingleLineScroll:T,onFocus:te,onBlur:ae,onElementCreate:z,onLeftElementClick:K,onRightElementClick:W})},fo=p.forwardRef(Fh),un=p.createContext(void 0);function ho(e,t,r=!0){var b,T;const n=ya(e),a=da(e),i=tf(e);let o=Vr(a)-(((b=t.options)==null?void 0:b.weekStartsOn)||0);o=o===-1?6:o;const s=Vr(i)-(((T=t.options)==null?void 0:T.weekStartsOn)||0),u=el({start:a,end:i}),l=n+o>35?6:5,f=po(l,7,{dayValue:null,isCurrent:!0});let h=1;for(let x=0,D=l;x<D;x++){for(let P=x>0?0:o;P<7;P++){const _=u[h-1];if(_.setHours(e.getHours(),e.getMinutes(),e.getSeconds()),f[x][P].dayValue=_,++h>n)break}if(h>n)break}if(o>0&&r)for(let x=0;x<o;x++)f[0][x].dayValue=rd(a,o-x),f[0][x].isCurrent=!1;if(s>-1&&r)for(let x=6;x>s;x--)f[l-1][x].dayValue=Zt(i,x-s),f[l-1][x].isCurrent=!1;return f}function po(e,t,r){const n=[];for(let a=0,i=e;a<i;a++){const o=[];for(let s=0,u=t;s<u;s++){const l=Yh(r)?r:{...r};o.push(l)}n.push(o)}return n}function Yh(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"||e instanceof Date}function $h(e){var n;const t=nd(new Date,((n=e.options)==null?void 0:n.weekStartsOn)||0),r=[];for(let a=0;a<7;a++)r.push(Zt(t,a).toLocaleDateString(e.code,{weekday:"short"}));return r}function Uh(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 a=0;a<3;a++)for(let i=0;i<4;i++)r[a][i]={monthNumber:n,monthName:st(t,n++).toLocaleDateString(e.code,{month:"short"})};return r}function Hh(e,t){const r=new Date(e.getTime()),n=Math.floor(r.getFullYear()/10)*10;r.setFullYear(n);const a=tl({start:r,end:Xt(r,9)}),i=po(3,4,"");let o=0;for(let s=0;s<3;s++)for(let u=0;u<4&&(i[s][u]=a[o++].toLocaleDateString(t.code,{year:"numeric"}),o!==a.length);u++);return i}function Wh(e){const t=new Date;return t.setHours(0,0,0,0),t.toLocaleTimeString(e.code)}function Vh(e,t,r){return e.getTime()>=t.getTime()&&e.getTime()<=r.getTime()}async function mo(e){return(await import(`/node_modules/date-fns/locale/${zh(e)}`)).default}function zh(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 Wt(e,t){const r=ad(e);if(isNaN(r.valueOf())){let n=Be(e,"P pp",new Date,{locale:t});return!isNaN(n.valueOf())||(n=Be(e,"Pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P HH:mm",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P hh:mm a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P HH:mm:ss",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P hh:mm:ss a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P p",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"p",new Date,{locale:t}),!isNaN(n.valueOf()))?n:void 0}return r}function vo(e,t){const r=e.split("-");if(r.length!==2)return;const n=Wt(r[0].trim(),t);if(!n)return;const a=Wt(r[1].trim(),t);if(a)return[n,a]}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||{}),Vt=(e=>(e[e.Day=0]="Day",e[e.Month=1]="Month",e[e.Year=2]="Year",e[e.Range=3]="Range",e))(Vt||{}),dr=(e=>(e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e))(dr||{}),De=(e=>(e[e.TwelveHour=0]="TwelveHour",e[e.TwentyFourHour=1]="TwentyFourHour",e))(De||{}),rt=(e=>(e[e.Normal=0]="Normal",e[e.Range=1]="Range",e))(rt||{}),hr=(e=>(e[e.Right=0]="Right",e[e.Left=1]="Left",e[e.None=2]="None",e))(hr||{}),Z=(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[e.SetViewDate=5]="SetViewDate",e[e.SetSelectedDate=6]="SetSelectedDate",e[e.SetSelectedDateRange=7]="SetSelectedDateRange",e[e.SetSelectedStartDate=8]="SetSelectedStartDate",e[e.SetSelectedEndDate=9]="SetSelectedEndDate",e[e.SetTimeFormat=10]="SetTimeFormat",e[e.ClearDates=11]="ClearDates",e[e.InitializeDates=12]="InitializeDates",e))(Z||{});const Bh=(e,t)=>{switch(t.type){case 0:return{...e,currentSelector:0,currentViewDate:t.viewDate||e.currentViewDate};case 1:return{...e,currentSelector:1,currentViewDate:t.viewDate||e.currentViewDate};case 2:return{...e,currentSelector:2};case 3:return{...e,currentSelector:3};case 4:return{...e,currentSelector:4,currentViewDate:t.viewDate||e.currentViewDate};case 5:return{...e,currentViewDate:t.viewDate||new Date,dateInitialized:!0};case 6:return{...e,selectedDate:t.selectedDate||e.selectedDate,currentViewDate:t.viewDate||e.currentViewDate};case 7:return{...e,selectedStartDate:t.selectedStartDate||e.selectedStartDate,selectedEndDate:t.selectedEndDate||e.selectedEndDate};case 8:return{...e,selectedStartDate:t.selectedStartDate,selectedEndDate:void 0};case 9:return{...e,selectedEndDate:t.selectedEndDate};case 10:return{...e,timeFormat:t.timeFormat||e.timeFormat};case 11:return{currentSelector:e.currentSelector,currentViewDate:e.currentViewDate,timeFormat:e.timeFormat,dateInitialized:!0};case 12:const r={...e,currentViewDate:qh(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:0}}};function qh(e){return e?Array.isArray(e)?e[0]:e:new Date}const pr=({viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:a=rt.Normal,locale:i,onDateSelected:o,selectableDate:s,isValidDate:u,dispatcher:l})=>{var q;const[f,h]=p.useState(!1),[b,T]=p.useState(),[x,D]=p.useState(),[P,_]=p.useState(),[z,K]=p.useState(),W=p.useRef(),y=p.useRef(),$=p.useContext(un),X=p.useMemo(()=>$.calendarTemplate,[$.calendarTemplate]),ee=async()=>i||await mo(Na());p.useEffect(()=>{ee().then(F=>{W.current=F,y.current=$h(W.current),h(!0)}).catch(F=>console.error(F))},[]),p.useEffect(()=>{e&&W.current&&_(ho(e,W.current,a===rt.Normal))},[e,f]),p.useEffect(()=>{K(t?new Date(t.getFullYear(),t.getMonth(),t.getDate()):void 0)},[t]),p.useEffect(()=>{T(r?new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0).getTime():void 0),D(n?new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59).getTime():void 0)},[r,n]),p.useEffect(()=>{W.current&&i&&(W.current=i,_(ho(e,W.current,a===rt.Normal)))},[i]);const B=F=>{if(a===rt.Normal)l==null||l({type:Z.SetSelectedDate,selectedDate:F,viewDate:F}),o==null||o(F);else{if(!o)throw new Error("Range selection mode requires onDateSelected to be set");!r||rf(F,r)?o(F):r&&!n?o(F,{setEndDate:!0}):r&&n&&o(F)}},oe=F=>(z==null?void 0:z.toLocaleDateString())===F.toLocaleDateString(),te=F=>{if(b&&x){const re=F.getTime();return re>=b&&re<=x}return!1},ae={viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:a,locale:i,weekDays:y.current,monthMatrix:P,selectableDate:s,isValidDate:u,onDateClicked:B,isSelectedDate:oe,isInSelectedDateRange:te},Y=X||((F,re)=>m.jsx("div",{className:"bsc-w-full bc-dt-calendar",children:re}));return m.jsx(Gr,{props:ae,template:Y,children:m.jsxs("div",{className:"bsc-grid bsc-grid-cols-7 bsc-gap-3 bc-dt-day-row bsc-min-w-[329px]",children:[(q=y.current)==null?void 0:q.map((F,re)=>m.jsx("div",{className:"bsc-text-center bsc-font-bold bc-dt-day-cell",children:F},re)),P==null?void 0:P.map((F,re)=>F.map((L,he)=>{var H,d;const v=L.dayValue!==null&&(s===void 0||s(L.dayValue)),E=Ge("bsc-text-center bsc-py-1",{"bsc-text-gray-3":!L.isCurrent,"bsc-bg-primary-3 dark:bsc-bg-mono-light-1 dark:bsc-text-mono-dark-1":L&&L.dayValue&&(z&&oe(L.dayValue)||b&&!x&&fa(b,L.dayValue)||b&&x&&te(L.dayValue)),"bsc-cursor-pointer":v,"bsc-text-error bsc-cursor-not-allowed":!v,"bsc-bg-primary-5 dark:bsc-bg-mono-light-3 dark:bsc-text-mono-dark-1":L.dayValue&&td(L.dayValue)&&!(oe(L.dayValue)||te(L.dayValue))},"bc-dt-date-cell");return m.jsx("div",{className:E,onClick:()=>L&&L.dayValue&&v&&(u===void 0||u(L.dayValue))&&B(L.dayValue),children:(d=L.dayValue)==null?void 0:d.getDate().toLocaleString((H=W.current)==null?void 0:H.code)},re.toString()+he.toString())}))]})})},mr=({title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:a})=>{const o=p.useContext(un).dateScrollerTemplate,s={title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:a},l=o||((f,h)=>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:h}));return m.jsxs(Gr,{props:s,template:l,children:[m.jsx("div",{className:"bc-dt-scroller-left bsc-flex-shrink bsc-cursor-pointer",children:m.jsx(We,{className:"bsc-bg-transparent focus:bsc-outline-none",onClick:n,children:m.jsx(Rd,{size:24})})}),m.jsx("div",{className:"bc-dt-scroller-title bsc-flex-grow bsc-cursor-pointer bsc-text-center",onClick:r,children:e}),m.jsx("div",{className:"bc-dt-scroller-right bsc-flex-shrink bsc-cursor-pointer",children:m.jsx(We,{className:"bsc-bg-transparent focus:bsc-outline-none",onClick:a,children:m.jsx(Hd,{size:24})})})]})},Gh=({selectedDate:e,viewDate:t,locale:r,showTimeSelector:n,selectableDate:a,isValidDate:i,onChange:o,dispatcher:s})=>{const u=()=>{t&&s({type:Z.SetViewDate,viewDate:Oa(t,1)})},l=()=>{t&&s({type:Z.SetViewDate,viewDate:st(t,1)})},f=()=>{s({type:Z.MonthSelector})},h=()=>{s({type:Z.TimeSelector})},b=()=>t?t.toLocaleDateString(r.code,{month:"long",year:"numeric"}):"";return m.jsxs("div",{className:"bsc-p-2 bc-dt-day-selector",children:[m.jsx(mr,{title:b(),scrollerType:Vt.Day,onTitleClicked:f,onMovePrevious:u,onMoveNext:l}),m.jsx(pr,{viewDate:t,selectedDate:e,locale:r,selectableDate:a,isValidDate:i,onDateSelected:o,dispatcher:s}),n&&m.jsx("div",{className:"bsc-w-full bsc-flex bsc-flex-row bsc-p-2 bsc-justify-center bc-dt-time-value-wrapper",children:m.jsx("div",{className:"bsc-p-2 bsc-cursor-pointer hover:bsc-bg-gray-4 dark:hover:bsc-bg-mono-light-2 dark:hover:bsc-text-mono-dark-2 dark:bsc-bg-mono-dark-1 dark:bsc-text-mono-light-1 bc-dt-time-value",onClick:h,children:(e==null?void 0:e.toLocaleTimeString(r.code))||Wh(r)})})]})},Qh=({viewDate:e,locale:t,dateSelection:r=we.DateTime,dispatcher:n})=>{const a=p.useRef(Uh(t)),i=()=>{const f=Ia(e,1);n({type:Z.SetViewDate,viewDate:f})},o=()=>{const f=Xt(e,1);n({type:Z.SetViewDate,viewDate:f})},s=f=>{n({type:r!==we.DateRange?Z.DaySelector:Z.DateRangeSelector,viewDate:wd(e,f)})},u=()=>e.toLocaleDateString(t.code,{year:"numeric"}),l=()=>{n({type:Z.YearSelector})};return m.jsxs("div",{className:"bsc-p-2 bc-dt-month-selector",style:{minWidth:"20rem"},children:[m.jsx(mr,{title:u(),scrollerType:Vt.Month,onTitleClicked:l,onMovePrevious:i,onMoveNext:o}),m.jsx("div",{className:"bsc-w-full bsc-grid bsc-grid-cols-4 bsc-gap-4 bc-dt-month-grid",children:a.current.map((f,h)=>f.map((b,T)=>m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-month-cell",onClick:()=>s(b.monthNumber),children:b.monthName},h.toString()+T.toString())))})]})};function Kh(e,t){if(t===e)return!1;const r=Object.values(t),n=Object.values(e);if(r.length!==n.length||r.some((i,o)=>i!==n[o]))return!0;const a=Object.keys(e);return Object.keys(t).some((i,o)=>i!==a[o])}function Zh(e,t){return e.matches[t]=!1,e.mediaQueries[t]={},e}function go(e){const t=Object.keys(e);return typeof window>"u"?t.reduce(Zh,{mediaQueries:{},matches:{}}):t.reduce((r,n)=>{const a=window.matchMedia(e[n]);return r.mediaQueries[n]=a,r.matches[n]=a.matches,r},{mediaQueries:{},matches:{}})}function Xh(e,t){function r(n,a){return n[a]=e.mediaQueries[a].matches,n}switch(t.type){case"updateMatches":return{matches:Object.keys(e.mediaQueries).reduce(r,{}),mediaQueries:e.mediaQueries};case"setQueries":return go(t.queries)}}function Jh(e){const t=Nt.useRef(e),[r,n]=Nt.useReducer(Xh,e,go);Nt.useEffect(()=>{Kh(e,t.current)&&(n({type:"setQueries",queries:e}),t.current=e)},[e]);function a(){return n({type:"updateMatches"})}function i(u){const l=a;return typeof u.addListener<"u"?u.addListener(l):u.addEventListener("change",l),l}Nt.useEffect(()=>{const u=Object.values(r.mediaQueries),l=u.map(i);function f(h,b){typeof h.addListener<"u"?h.removeListener(l[b]):h.removeEventListener("change",l[b])}return()=>{u.forEach(f)}},[r.mediaQueries]);const{matches:o}=r,s=Nt.useMemo(()=>Object.values(o),[o]);return{matches:o,matchesAny:s.some(Boolean),matchesAll:s.length>0&&s.every(Boolean)}}function yo(e){return Jh(ep(e)).matchesAll}const cn={};function ep(e){return cn[e]===void 0&&(cn[e]={default:e}),cn[e]}const tp=({viewDate:e,selectedStartDate:t,selectedEndDate:r,locale:n,onChange:a,dispatcher:i})=>{const o=yo("not all and (min-width: 640px)"),s=st(e,1),u=(T,x)=>{!x||!x.setEndDate?i({type:Z.SetSelectedStartDate,selectedStartDate:T}):(i({type:Z.SetSelectedEndDate,selectedEndDate:T}),t&&(a==null||a([t,T])))},l=()=>{i({type:Z.MonthSelector})},f=()=>o?`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})}`:`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})} - ${s.toLocaleDateString(n.code,{month:"long"})} ${s.toLocaleDateString(n.code,{year:"numeric"})}`,h=()=>{e&&i({type:Z.SetViewDate,viewDate:Oa(e,1)})},b=()=>{e&&i({type:Z.SetViewDate,viewDate:st(e,1)})};return m.jsxs("div",{className:"bsc-flex bsc-flex-col bc-dt-range-selector",children:[m.jsx("div",{className:"bsc-flex-shrink bc-dt-range-scroller-wrapper",children:m.jsx(mr,{title:f(),scrollerType:Vt.Range,onTitleClicked:l,onMovePrevious:h,onMoveNext:b})}),m.jsx("div",{className:"bsc-flex-grow",children:o?m.jsx("div",{className:"bsc-py-1 bsc-px-2 bc-dt-range-calendar",children:m.jsx(pr,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:rt.Range,onDateSelected:u,locale:n,dispatcher:i})}):m.jsxs("div",{className:"bsc-flex bsc-flex-row bsc-py-1 bsc-px-2 bc-dt-range-wrapper",children:[m.jsx("div",{className:"bsc-border-r bsc-border-solid bsc-border-gray-3 bsc-pr-4 bc-dt-range-calendar-1",children:m.jsx(pr,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:rt.Range,onDateSelected:u,locale:n,dispatcher:i})}),m.jsx("div",{className:"bsc-pl-4 bc-dt-range-calendar-2",children:m.jsx(pr,{viewDate:s,selectedStartDate:t,selectedEndDate:r,selectionMode:rt.Range,onDateSelected:u,locale:n,dispatcher:i})})]})})]})},rp=({viewDate:e,showDateSelector:t,locale:r,timeFormat:n=De.TwelveHour,timeConstraints:a,onChange:i,dispatcher:o})=>{const s=p.useRef(n===De.TwelveHour?11:23),u=p.useRef(n===De.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"]),l=p.useRef(xd(0,59,g=>g.toString().padStart(2,"0"))),f=p.useRef(["AM","PM"]),h=p.useRef(Uc(e)),b=g=>g>11?g-12:g,[T,x]=p.useState(b(e.getHours())),[D,P]=p.useState(e.getMinutes()),[_,z]=p.useState(e.getHours()<=12?0:1),K=p.useRef(e.toLocaleDateString(r.code));p.useEffect(()=>{const g=e.getHours(),Y=e.getMinutes();if(g!==T&&x(n===De.TwelveHour?b(g):g),Y!==D&&P(Y),n===De.TwelveHour){const q=g<=11?0:1;q!==_&&z(q)}},[e]);const W=()=>{var q;const g=((q=a==null?void 0:a.hours)==null?void 0:q.step)||1,Y=T<s.current?T+g:0;x(Y),B(Y,D,_)},y=()=>{var q;const g=((q=a==null?void 0:a.hours)==null?void 0:q.step)||1,Y=T>0?T-g:s.current;x(Y),B(Y,D,_)},$=()=>{var q,F,re;const g=((q=a==null?void 0:a.minutes)==null?void 0:q.step)||1,Y=D+g<(((F=a==null?void 0:a.minutes)==null?void 0:F.max)||59)?D+g:((re=a==null?void 0:a.minutes)==null?void 0:re.min)||0;P(Y),B(T,Y,_)},X=()=>{var q,F,re;const g=((q=a==null?void 0:a.minutes)==null?void 0:q.step)||1,Y=D-g>=(((F=a==null?void 0:a.minutes)==null?void 0:F.min)||0)?D-g:(((re=a==null?void 0:a.minutes)==null?void 0:re.max)||60)-g;P(Y),B(T,Y,_)},ee=()=>{const g=_===0?1:0;z(g),B(T,D,g)},B=(g,Y,q)=>{const F=n===De.TwelveHour&&q===1?g+12:g;h.current.setHours(F,Y),o({type:Z.SetSelectedDate,selectedDate:h.current,viewDate:h.current}),i==null||i(h.current)},oe=()=>{o({type:Z.DaySelector})},te=Ge("bsc-w-full bsc-grid bsc-grid-rows-3 bsc-gap-4 bc-dt-time-grid",{"bsc-grid-cols-4":n===De.TwelveHour,"bsc-grid-cols-3":n===De.TwentyFourHour}),ae=Ge("bsc-text-center bsc-cursor-pointer hover:bsc-bg-gray-4 dark:bsc-text-mono-light-1 dark:hover:bsc-bg-mono-light-1 dark:hover:bsc-text-mono-dark-1 bc-dt-time-date-value",{"bsc-col-span-4":n===De.TwelveHour,"bsc-col-span-3":n===De.TwentyFourHour});return m.jsx("div",{className:"bc-dt-time-selector bsc-flex bsc-flex-row bsc-justify-center bsc-p-2",style:{minWidth:n===De.TwelveHour?"15rem":"11rem"},children:m.jsxs("div",{className:te,children:[t&&m.jsx("div",{className:ae,onClick:oe,children:K.current}),m.jsx("div",{className:"bc-dt-time-hour-increase bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:W,children:m.jsx(Qr,{})})}),m.jsx("div",{children:" "}),m.jsx("div",{className:"bc-dt-time-minute-increase bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:$,children:m.jsx(Qr,{})})}),n===De.TwelveHour&&m.jsx("div",{className:"bc-dt-time-meridian-increase bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:ee,children:m.jsx(Qr,{})})}),m.jsx("div",{className:"bc-dt-time-hour-value bsc-text-center",children:u.current[T]}),m.jsx("div",{className:"bc-dt-time-separator bsc-text-center",children:":"}),m.jsx("div",{className:"bc-dt-time-minute-value bsc-text-center",children:l.current[D]}),n===De.TwelveHour&&m.jsx("div",{className:"bc-dt-time-meridian-value bsc-text-center",children:f.current[_]}),m.jsx("div",{className:"bc-dt-time-hour-decrease bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:y,children:m.jsx(Kr,{})})}),m.jsx("div",{children:" "}),m.jsx("div",{className:"bc-dt-time-minute-decrease bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:X,children:m.jsx(Kr,{})})}),n===De.TwelveHour&&m.jsx("div",{className:"bc-dt-time-meridian-decrease bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:ee,children:m.jsx(Kr,{})})})]})})},np=({viewDate:e,locale:t,dispatcher:r})=>{const n=Hh(e,t),a=()=>{const u=Ia(e,10);r({type:Z.SetViewDate,viewDate:u})},i=()=>{const u=Xt(e,10);r({type:Z.SetViewDate,viewDate:u})},o=u=>{const l=parseInt(u);r({type:Z.MonthSelector,viewDate:Td(e,l)})},s=()=>`${n[0][0].toString()} - ${n[2][1].toString()}`;return m.jsxs("div",{className:"bc-dt-year-selector",style:{minWidth:"20rem"},children:[m.jsx(mr,{title:s(),scrollerType:Vt.Year,onMovePrevious:a,onMoveNext:i}),m.jsx("div",{className:"bsc-w-full bc-dt-year-wrapper",children:m.jsx("div",{className:"bsc-grid bsc-grid-cols-4 bsc-gap-4 bc-dt-year-grid",children:n.map((u,l)=>u.map((f,h)=>f.length>0?m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-year-cell",onClick:()=>o(f),children:f},l.toString()+h.toString()):m.jsx("div",{},l.toString()+h.toString())))})})]})};class ap{constructor(t,r){U(this,"dateFormat");U(this,"timeFormat");U(this,"use24HourTime");U(this,"monthPart");U(this,"dayPart");U(this,"yearPart");U(this,"twelveHourPart");U(this,"twentyFourHourPart");U(this,"minutePart");U(this,"meridianPart");this.dateSelection=t;const n=2023,a=12,i=20,s=new Date(n,a-1,i).toLocaleDateString(r,{year:"numeric",month:"numeric",day:"numeric"});this.dateFormat=s.replace(`${n}`,"YYYY").replace(`${a}`,"MM").replace(`${i}`,"DD");const u=new Date,l=18,f=24,h=37,b=317;u.setHours(l,f,h,b);const T=u.toLocaleTimeString(r);this.use24HourTime=T.startsWith("18"),this.timeFormat=T.replace(`${this.use24HourTime?l:"6"}`,"HH").replace(`${f}`,"MM").replace(`${h}`,"SS").replace(`${b}`,"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 a={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("YYYY"),n=t.substring(0,r);const i={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.monthPart,a,this.dayPart,i,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 a={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("YYYY"),n=t.substring(0,r);const i={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.dayPart,a,this.monthPart,i,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 a={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("DD"),n=t.substring(0,r);const i={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.yearPart,a,this.monthPart,i,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),a={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0},i={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return[this.twelveHourPart,a,this.minutePart,i,this.meridianPart]}return[]}createTwentyFourHourFormatParts(){if(this.twentyFourHourPart&&this.minutePart){const t=this.timeFormat.replace("HH",""),r=t.indexOf("MM"),n=t.substring(0,r),a={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.twentyFourHourPart,a,this.minutePart]}return[]}createDateParts(){this.monthPart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:qe.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.dayPart={characterCount:2,placeholder:"D",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:qe.Numeric,minimumValue:1,maximumValue:31,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.yearPart={characterCount:4,placeholder:"Y",inputText:"_",isSeparator:!1,allCharactersRequired:!0,valueType:qe.Numeric},this.twelveHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:qe.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.twentyFourHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:qe.Numeric,minimumValue:0,maximumValue:23,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.minutePart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:qe.Numeric,minimumValue:0,maximumValue:59,exceedingMaximumValueCausesError:!0,padWithZeros:!0},this.meridianPart={characterCount:2,inputText:"_",isSeparator:!1,valueType:qe.Text,possibleValues:["AM","PM"]}}}const op=(e,t)=>{var i;const[r,n]=p.useState(),a=p.useRef();return p.useEffect(()=>{t&&!r&&(a.current=new ap(e,t),n(a.current.createInputFormat()))},[t]),[r,(i=a.current)==null?void 0:i.is24HourTime]},ip=({value:e,readOnly:t=!1,label:r,useDefaultDateValue:n=!1,useFormattedInput:a=!1,allowClear:i=!1,locale:o,className:s,dateSelection:u=we.DateTime,dateFormat:l,timeConstraints:f,icon:h,iconPosition:b=hr.Right,inputElement:T,selectableDate:x,isValidDate:D,onChange:P,calendarTemplate:_,dateScrollerTemplate:z,inputTemplate:K})=>{const[W,y]=p.useState(!1),[$,X]=p.useState(),[ee,B]=p.useState(),oe=p.useRef(),te=p.useRef(!1),ae=p.useRef(o||Na()),g=p.useRef(),Y=p.useRef(),q=p.useRef(),[F,re]=op(u,$),L=yo("not all and (min-width: 640px)"),he=p.useRef({calendarTemplate:_,dateScrollerTemplate:z});p.useEffect(()=>{ae.current&&v(ae.current)},[ae]),p.useEffect(()=>{o&&v(o)},[o]),p.useEffect(()=>{if(e){const G=E();S({type:Z.InitializeDates,initialDate:G})}else S({type:Z.ClearDates})},[e,g.current]),p.useEffect(()=>{re&&S({type:Z.SetTimeFormat,timeFormat:re?De.TwentyFourHour:De.TwelveHour})},[re]),p.useEffect(()=>{T&&(Y.current=T)},[T]);const v=G=>{mo(G).then(be=>{X(be.code),g.current=be;const Ye=E();S(e||n?{type:Z.InitializeDates,initialDate:Array.isArray(Ye)?Ye[0]:Ye}:{type:Z.SetViewDate,viewDate:Array.isArray(Ye)?Ye[0]:Ye})}).catch(be=>console.error(be))},E=()=>{const G=new Date;return G.setHours(0,0,0,0),e?typeof e=="string"?u!==we.DateRange?Wt(e,g.current):vo(e,g.current):e:G},H={currentSelector:u===we.TimeOnly?Z.TimeSelector:u===we.DateTime||u===we.DateOnly?Z.DaySelector:Z.DateRangeSelector,currentViewDate:new Date,timeFormat:De.TwelveHour,dateInitialized:!1},[d,S]=p.useReducer(Bh,H),O=()=>{Fe(),y(!0)},M=p.useMemo(()=>At(()=>{y(!1)},250),[]),A=p.useMemo(()=>At(()=>{M.cancel()},5),[M]),j=G=>{const be=G.target.innerText;Ee(be)},k=G=>{if(G){const be=Wt(G,g.current);return be?D?D(be):!0:!1}else return!0},V=G=>{Ee(G||"")},Ee=G=>{const be=u!==we.DateRange?Wt(G,g.current):vo(G,g.current);be?(Array.isArray(be)?(Vh(be[0],da(d.currentViewDate),Jc(st(d.currentViewDate,1)))||S({type:Z.SetViewDate,viewDate:be[0]}),S({type:Z.SetSelectedDateRange,selectedStartDate:be[0],selectedEndDate:be[1]})):S({type:Z.SetSelectedDate,selectedDate:be,viewDate:be}),P==null||P(be)):G===""&&(S({type:Z.ClearDates}),P==null||P())},C=()=>{Fe(),y(!W)},ke=()=>{S({type:Z.ClearDates}),y(!1),P==null||P()},Ae=(G,be)=>{(!Y.current||oe.current!==be)&&(Y.current=G,oe.current=be,te.current=!0)},Fe=()=>{(!q.current||te.current)&&Y.current&&(q.current=Y.current,B(Y.current),te.current=!1)},ft=()=>{y(!1),S({type:u===we.TimeOnly?Z.TimeSelector:u===we.DateTime||u===we.DateOnly?Z.DaySelector:Z.DateRangeSelector})},vr=()=>{switch(l){case dr.Short:return"short";case dr.Medium:return"medium";case dr.Long:return"long";default:return}},dt=()=>{var be,Ye,zt,Ct,yr,br,wr,Tr,xr,Pr,Er,Dt;const G=vr();switch(u){case we.DateTime:return d.selectedDate?G?d.selectedDate.toLocaleString((be=g.current)==null?void 0:be.code,{dateStyle:G,timeStyle:G}):d.selectedDate.toLocaleString((Ye=g.current)==null?void 0:Ye.code):"";case we.DateOnly:return d.selectedDate?G?d.selectedDate.toLocaleDateString((zt=g.current)==null?void 0:zt.code,{dateStyle:G}):d.selectedDate.toLocaleDateString((Ct=g.current)==null?void 0:Ct.code):"";case we.TimeOnly:return d.selectedDate?G?d.selectedDate.toLocaleTimeString((yr=g.current)==null?void 0:yr.code,{timeStyle:G,hour12:d.timeFormat===De.TwelveHour,hourCycle:d.timeFormat===De.TwentyFourHour?"h23":void 0}):d.selectedDate.toLocaleTimeString((br=g.current)==null?void 0:br.code,{hour12:d.timeFormat===De.TwelveHour,hourCycle:d.timeFormat===De.TwentyFourHour?"h23":void 0}):"";case we.DateRange:return d.selectedStartDate&&d.selectedEndDate?G?`${d.selectedStartDate.toLocaleDateString((wr=g.current)==null?void 0:wr.code,{dateStyle:G})} - ${d.selectedEndDate.toLocaleDateString((Tr=g.current)==null?void 0:Tr.code,{dateStyle:G})}`:`${d.selectedStartDate.toLocaleDateString((xr=g.current)==null?void 0:xr.code)} - ${d.selectedEndDate.toLocaleDateString((Pr=g.current)==null?void 0:Pr.code)}`:"";default:return d.selectedDate?G?d.selectedDate.toLocaleString((Er=g.current)==null?void 0:Er.code,{dateStyle:G,timeStyle:G}):d.selectedDate.toLocaleString((Dt=g.current)==null?void 0:Dt.code):""}},Xe=u===we.DateTime||u===we.DateOnly||u===we.DateRange,ln=u===we.DateTime||u===we.TimeOnly,ht=b===hr.None?{}:b===hr.Right?{rightElement:m.jsxs("div",{className:"bsc-flex bsc-text-black dark:bsc-text-mono-light-1",children:[i&&!t&&m.jsx("div",{children:m.jsx(La,{size:16,className:"bsc-cursor-pointer bsc-text-sm",onClick:ke})}),m.jsx("div",{className:"bsc-ml-2",children:h||m.jsx(Fa,{size:16,className:t?void 0:"bsc-cursor-pointer",onClick:t?void 0:C})})]}),rightElementClassName:"bsc-justify-center"}:{leftElement:m.jsxs("div",{className:"bsc-flex bsc-text-black dark:bsc-text-mono-light-1",children:[m.jsx("div",{className:"bsc-mr-2",children:h||m.jsx(Fa,{size:16,className:t?void 0:"bsc-cursor-pointer",onClick:t?void 0:C})}),i&&!t&&m.jsx("div",{children:m.jsx(La,{size:16,className:"bsc-cursor-pointer bsc-text-sm",onClick:ke})})]}),leftElementClassName:"bsc-justify-center"},Et=()=>m.jsxs(m.Fragment,{children:[d.currentSelector===Z.DaySelector&&Xe&&d.dateInitialized&&g.current&&m.jsx(Gh,{selectedDate:d.selectedDate,viewDate:d.currentViewDate,locale:g.current,showTimeSelector:u===we.DateTime,selectableDate:x,isValidDate:D,dispatcher:S,onChange:P}),d.currentSelector===Z.MonthSelector&&Xe&&d.dateInitialized&&g.current&&m.jsx(Qh,{viewDate:d.currentViewDate,locale:g.current,dateSelection:u,dispatcher:S}),d.currentSelector===Z.YearSelector&&Xe&&d.dateInitialized&&g.current&&m.jsx(np,{viewDate:d.currentViewDate,locale:g.current,dispatcher:S}),d.currentSelector===Z.TimeSelector&&ln&&d.dateInitialized&&g.current&&m.jsx(rp,{viewDate:d.currentViewDate,showDateSelector:u===we.DateTime,locale:g.current,timeFormat:d.timeFormat,timeConstraints:f,onChange:P,dispatcher:S}),d.currentSelector===Z.DateRangeSelector&&Xe&&d.dateInitialized&&g.current&&m.jsx(tp,{viewDate:d.currentViewDate,selectedStartDate:d.selectedStartDate,selectedEndDate:d.selectedEndDate,locale:g.current,onChange:P,dispatcher:S})]}),fn={label:r,readOnly:t,allowClear:i,getValue:dt,onFocus:O,onInput:j,iconPosition:b,iconElement:ht.rightElement||ht.leftElement},gr=K||((G,be)=>m.jsx(m.Fragment,{children:be})),St=Ge("bsc-text-left",{"bsc-bg-gray-2":t,"bsc-bg-white":!t},"dark:bsc-bg-mono-dark-1 bc-dt-input",s);return m.jsx(un.Provider,{value:he.current,children:m.jsxs("div",{className:"bc-date-time",children:[r&&m.jsx("label",{className:"bc-dt-label dark:bsc-text-mono-light-1",children:r}),L?m.jsxs(m.Fragment,{children:[m.jsx(Kt,{value:dt(),readOnly:t,inputMode:"none",className:St,onFocus:O,onElementCreate:G=>Ae(G,!1),...ht}),m.jsx(ao,{visible:W,target:ee,hidden:ft,unmountWhenHidden:!0,children:Et()})]}):m.jsxs(m.Fragment,{children:[m.jsx(Gr,{props:fn,template:gr,children:a===!1?m.jsx(Kt,{value:dt(),readOnly:t,className:St,onFocus:O,onBlur:M,onInput:j,onElementCreate:G=>Ae(G,!1),...ht}):m.jsx(fo,{value:dt(),readOnly:t,className:St,format:F,isInputValid:k,onFocus:O,onBlur:M,onChange:V,onElementCreate:G=>Ae(G,!0),...ht})}),m.jsx(so,{visible:W,target:ee,shouldTargetCloseOverlay:!1,shouldScrollCloseOverlay:!0,shouldCheckZIndex:!0,shouldRemainOnScreen:!0,hidden:ft,isClickedWithin:A,unmountWhenHidden:!0,children:Et()})]})]})})},wp="";le.Button=We,le.ContentEditableInput=Kt,le.DateTime=ip,le.FormattedInput=fo,le.MobileOverlayPanel=ao,le.OverlayPanel=so,le.applyBeeSoftTheme=Dd,le.createBeeSoftTheme=Od,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
|
|
51
|
+
Valid keys: `+JSON.stringify(Object.keys(v),null," "));var C=Ee(A,V,S,O,M+"."+V,r);if(C)return C}return null}return P(E)}function Y(v){switch(typeof v){case"number":case"string":case"undefined":return!0;case"boolean":return!v;case"object":if(Array.isArray(v))return v.every(Y);if(v===null||s(v))return!0;var E=h(v);if(E){var H=E.call(v),d;if(E!==v.entries){for(;!(d=H.next()).done;)if(!Y(d.value))return!1}else for(;!(d=H.next()).done;){var S=d.value;if(S&&!Y(S[1]))return!1}}else return!1;return!0;default:return!1}}function q(v,E){return v==="symbol"?!0:E?E["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&E instanceof Symbol:!1}function F(v){var E=typeof v;return Array.isArray(v)?"array":v instanceof RegExp?"object":q(E,v)?"symbol":E}function re(v){if(typeof v>"u"||v===null)return""+v;var E=F(v);if(E==="object"){if(v instanceof Date)return"date";if(v instanceof RegExp)return"regexp"}return E}function L(v){var E=re(v);switch(E){case"array":case"object":return"an "+E;case"boolean":case"date":case"regexp":return"a "+E;default:return E}}function he(v){return!v.constructor||!v.constructor.name?b:v.constructor.name}return T.checkPropTypes=a,T.resetWarningCache=a.resetWarningCache,T.PropTypes=T,T},nn}var an,Ja;function wh(){if(Ja)return an;Ja=1;var e=en();function t(){}function r(){}return r.resetWarningCache=t,an=function(){function n(o,s,u,l,f,h){if(h!==e){var b=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 b.name="Invariant Violation",b}}n.isRequired=n;function a(){return n}var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},an}if(process.env.NODE_ENV!=="production"){var Th=Ba(),xh=!0;Zr.exports=bh()(Th.isElement,xh)}else Zr.exports=wh()();var Ph=Zr.exports;const J=et(Ph),eo={disabled:!1};var Eh=process.env.NODE_ENV!=="production"?J.oneOfType([J.number,J.shape({enter:J.number,exit:J.number,appear:J.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&J.oneOfType([J.string,J.shape({enter:J.string,exit:J.string,active:J.string}),J.shape({enter:J.string,enterDone:J.string,enterActive:J.string,exit:J.string,exitDone:J.string,exitActive:J.string})]);const to=p.createContext(null);var Sh=function(t){return t.scrollTop},Ht="unmounted",ct="exited",lt="entering",Tt="entered",on="exiting",Ze=function(e){ph(t,e);function t(n,a){var i;i=e.call(this,n,a)||this;var o=a,s=o&&!o.isMounting?n.enter:n.appear,u;return i.appearStatus=null,n.in?s?(u=ct,i.appearStatus=lt):u=Tt:n.unmountOnExit||n.mountOnEnter?u=Ht:u=ct,i.state={status:u},i.nextCallback=null,i}t.getDerivedStateFromProps=function(a,i){var o=a.in;return o&&i.status===Ht?{status:ct}:null};var r=t.prototype;return r.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},r.componentDidUpdate=function(a){var i=null;if(a!==this.props){var o=this.state.status;this.props.in?o!==lt&&o!==Tt&&(i=lt):(o===lt||o===Tt)&&(i=on)}this.updateStatus(!1,i)},r.componentWillUnmount=function(){this.cancelNextCallback()},r.getTimeouts=function(){var a=this.props.timeout,i,o,s;return i=o=s=a,a!=null&&typeof a!="number"&&(i=a.exit,o=a.enter,s=a.appear!==void 0?a.appear:o),{exit:i,enter:o,appear:s}},r.updateStatus=function(a,i){if(a===void 0&&(a=!1),i!==null)if(this.cancelNextCallback(),i===lt){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:Ue.findDOMNode(this);o&&Sh(o)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===ct&&this.setState({status:Ht})},r.performEnter=function(a){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:a,u=this.props.nodeRef?[s]:[Ue.findDOMNode(this),s],l=u[0],f=u[1],h=this.getTimeouts(),b=s?h.appear:h.enter;if(!a&&!o||eo.disabled){this.safeSetState({status:Tt},function(){i.props.onEntered(l)});return}this.props.onEnter(l,f),this.safeSetState({status:lt},function(){i.props.onEntering(l,f),i.onTransitionEnd(b,function(){i.safeSetState({status:Tt},function(){i.props.onEntered(l,f)})})})},r.performExit=function(){var a=this,i=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:Ue.findDOMNode(this);if(!i||eo.disabled){this.safeSetState({status:ct},function(){a.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:on},function(){a.props.onExiting(s),a.onTransitionEnd(o.exit,function(){a.safeSetState({status:ct},function(){a.props.onExited(s)})})})},r.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},r.safeSetState=function(a,i){i=this.setNextCallback(i),this.setState(a,i)},r.setNextCallback=function(a){var i=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,i.nextCallback=null,a(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},r.onTransitionEnd=function(a,i){this.setNextCallback(i);var o=this.props.nodeRef?this.props.nodeRef.current:Ue.findDOMNode(this),s=a==null&&!this.props.addEndListener;if(!o||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var u=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],l=u[0],f=u[1];this.props.addEndListener(l,f)}a!=null&&setTimeout(this.nextCallback,a)},r.render=function(){var a=this.state.status;if(a===Ht)return null;var i=this.props,o=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=hh(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return p.createElement(to.Provider,{value:null},typeof o=="function"?o(a,s):p.cloneElement(p.Children.only(o),s))},t}(p.Component);Ze.contextType=to,Ze.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:J.shape({current:typeof Element>"u"?J.any:function(e,t,r,n,a,i){var o=e[t];return J.instanceOf(o&&"ownerDocument"in o?o.ownerDocument.defaultView.Element:Element)(e,t,r,n,a,i)}}),children:J.oneOfType([J.func.isRequired,J.element.isRequired]).isRequired,in:J.bool,mountOnEnter:J.bool,unmountOnExit:J.bool,appear:J.bool,enter:J.bool,exit:J.bool,timeout:function(t){var r=Eh;t.addEndListener||(r=r.isRequired);for(var n=arguments.length,a=new Array(n>1?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];return r.apply(void 0,[t].concat(a))},addEndListener:J.func,onEnter:J.func,onEntering:J.func,onEntered:J.func,onExit:J.func,onExiting:J.func,onExited:J.func}:{};function xt(){}Ze.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:xt,onEntering:xt,onEntered:xt,onExit:xt,onExiting:xt,onExited:xt},Ze.UNMOUNTED=Ht,Ze.EXITED=ct,Ze.ENTERING=lt,Ze.ENTERED=Tt,Ze.EXITING=on;const Ch=Ze,ro=({start:e,timeout:t=400,defaultStyle:r,transitionStyles:n,showTransitionOptions:a="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:i="linear",unmountOnExit:o=!1,onEntering:s,onEntered:u,onExit:l,onExited:f,children:h})=>{const b=r||{transition:`opacity ${t}ms ${a}`,opacity:0},T=n||{entering:{opacity:1},entered:{opacity:1},exiting:{transition:`opacity ${t}ms ${i}`,opacity:0},exited:{transition:`opacity ${t}ms ${i}`,opacity:0},unmounted:{}};return m.jsx(Ch,{in:e,timeout:t,onEntering:s,onEntered:u,onExit:l,onExited:f,unmountOnExit:o,children:x=>h({state:x,defaultStyle:b,transitionStyles:T})})};function no(e){return e.target?e.target:e}const ao=({visible:e,target:t,appendTo:r=document.body,unmountWhenHidden:n=!1,transitionDuration:a=400,showTransitionOptions:i="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:o="linear",approveText:s="DONE",shown:u,hidden:l,isClickedWithin:f,children:h})=>{const[b,T]=p.useState(-1),[x,D]=p.useState(-1),[P,_]=p.useState(e),z=p.useRef(100),K=p.useRef(101),W=p.useRef(),y=p.useRef(),$=p.useRef();p.useEffect(()=>{t&&(W.current=no(t));const g=Ma("zIndex",Y=>Y==="auto"||Y==="-1"?!1:parseInt(Y)>100).map(Y=>parseInt(Y,10));g.length>0&&(z.current=Math.max(...g)+1,K.current=Math.max(...g)+2),_(e)},[e,t]);const X=g=>{y.current=g},ee=()=>{D(z.current),T(K.current)},B=()=>{if(!y.current)return;u==null||u();let g;W.current&&(g=[W.current]);const Y=q=>{q?f==null||f():_(!1)};$.current=Ua(y.current,Y,g)},oe=()=>{$.current&&Ha($.current)},te=()=>{D(-1),T(-1),l==null||l()},ae={entering:{opacity:.5},entered:{opacity:.5}};return Ue.createPortal(m.jsx(ro,{start:P,timeout:a,showTransitionOptions:i,hideTransitionOptions:o,onEntering:ee,onEntered:B,onExit:oe,onExited:te,unmountOnExit:n,children:({state:g,defaultStyle:Y,transitionStyles:q})=>m.jsxs("div",{ref:F=>F&&X(F),children:[m.jsx("div",{className:"bsc-fixed bsc-left-0 bsc-top-0 bsc-h-full bsc-w-full bsc-bg-mono-dark-1",style:{zIndex:x,...q[g],...ae[g]}}),m.jsxs("div",{className:"dark:bsck-border-mono-light-1 bsc-fixed bsc-bottom-0 bsc-left-0 bsc-w-full bsc-bg-white dark:bsc-border-t dark:bsc-border-solid dark:bsc-bg-mono-dark-1 dark:bsc-text-mono-light-1",style:{zIndex:b,...Y,...q[g]},children:[m.jsx("div",{className:"bsc-w-full",children:h}),m.jsx(m.Fragment,{children:m.jsx(We,{buttonType:"primary",fullWidth:!0,onClick:()=>_(!1),className:"bsc-text-xs bsc-font-bold",children:s})})]})]})}),r)};var oo=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(oo||{}),io=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(io||{});class _e{static positionToTarget(t,r=2){const n=t.getBoundingClientRect();let a=0,i=0;const o=window.scrollY;switch(r){case 2:a=n.top+n.height+o,i=n.left;break;case 0:a=n.top+o,i=n.left;break;case 3:a=n.top+n.height+o,i=n.left+n.width;break;case 1:a=n.top+o,i=n.left+n.width}return{top:a,left:i}}static positionElementToTarget(t,r,n=0,a=2){let{left:i,top:o}=_e.positionToTarget(r,a);const s=t.getBoundingClientRect();switch(n){case 0:break;case 1:i=i-s.width;break;case 2:o=o-s.height;break;case 3:o=o-s.height,i=i-s.width;break}return{top:o,left:i}}static canPositionElementOnScreen(t,r){const n=_e.getScreenDimensions(),a=t.getBoundingClientRect(),i=_e.positionElementToTarget(t,r,0,2);if(i.left+a.width<n.width&&i.top+a.height<n.height||_e.positionElementToTarget(t,r,1,3).left>=0&&i.top+a.height<n.height)return!0;const s=_e.positionElementToTarget(t,r,2,0);if(s.left+a.width<n.width&&s.top>=0)return!0;const u=_e.positionElementToTarget(t,r,3,1);return u.left>=0&&u.top>=0}static positionElementToTargetOnScreen(t,r,n=0,a=2){const{left:i,top:o}=_e.positionElementToTarget(t,r,n,a),s=t.getBoundingClientRect(),u=_e.determineOffScreenLocation(s);if(u){if(n===0&&a===2){if(u.right&&!u.bottom)return _e.positionElementToTarget(t,r,1,3);if(u.bottom&&!u.right)return _e.positionElementToTarget(t,r,2,0);if(u.right&&u.bottom)return _e.positionElementToTarget(t,r,3,1)}else if(n===1&&a===3){if(u.left&&!u.bottom)return _e.positionElementToTarget(t,r,0,2);if(u.bottom&&!u.left)return _e.positionElementToTarget(t,r,3,1);if(u.left&&u.bottom)return _e.positionElementToTarget(t,r,2,0)}}return{top:o,left:i}}static determineOffScreenLocation(t){const r=_e.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 so=({visible:e,target:t,targetPosition:r=oo.BottomLeft,elementAlignment:n=io.TopLeft,shouldTargetCloseOverlay:a=!0,shouldMatchTargetWidth:i=!1,shouldScrollCloseOverlay:o=!1,shouldCheckZIndex:s=!1,shouldRemainOnScreen:u=!1,unmountWhenHidden:l=!1,transitionDuration:f=400,showTransitionOptions:h="cubic-bezier(0, 0, 0.2, 1)",hideTransitionOptions:b="linear",shown:T,hidden:x,isClickedWithin:D,markupCreated:P,children:_})=>{const[z,K]=p.useState(-1),[W,y]=p.useState(e),[$,X]=p.useState(!1),ee=p.useRef(!1),B=p.useRef(100),oe=p.useRef({left:0,top:0,width:0}),te=p.useRef(),ae=p.useRef(),g=p.useRef(),Y=p.useRef(),q=p.useRef(),F=p.useRef();p.useEffect(()=>(u===!0&&(F.current=new ResizeObserver(re)),()=>{var O,M;u===!0&&(ae.current&&((O=F.current)==null||O.unobserve(ae.current)),(M=F.current)==null||M.disconnect())}),[u]),p.useEffect(()=>{if(t&&(te.current=no(t),o&&(g.current=_a(te.current,{overflow:"scroll, auto",overflowX:"scroll, auto",overflowY:"scroll, auto"}),g.current.tagName.toLowerCase()==="html"&&(g.current=document))),s){const O=Ma("zIndex",M=>parseInt(M)>=100).map(M=>parseInt(M));O.length>0&&(B.current=Math.max(...O)+1)}e!==void 0&&y(e)},[t,e,o,s]);const re=O=>{if(ae.current){const M=_e.getScreenDimensions(),A=O[O.length-1].target,j=A.getBoundingClientRect(),k=_e.determineOffScreenLocation(j);if(k){if(te.current&&_e.canPositionElementOnScreen(A,te.current)){const V=_e.positionElementToTargetOnScreen(ae.current,te.current,n,r);oe.current={...oe.current,...V}}else k.right?oe.current.left=M.width-j.width:k.left&&(oe.current.left=0),k.bottom?oe.current.top=M.height-j.height:k.top&&(oe.current.top=0);L()}}},L=At(()=>{ee.current=!ee.current,X(ee.current)},20),he=()=>{K(B.current)},v=()=>{if(!ae.current)return;T==null||T();let O;!a&&te.current&&(O=[te.current]);const M=A=>{A?D==null||D():y(!1)};Y.current=Ua(ae.current,M,O),o&&(q.current=qc(A=>ae.current&&Pd(A,ae.current)&&y(!1),100,{leading:!0}),g.current&&g.current.addEventListener("scroll",q.current))},E=()=>{g.current&&q.current&&(g.current.removeEventListener("scroll",q.current),q.current=void 0),Y.current&&Ha(Y.current)},H=()=>{K(-1),x==null||x()},d=O=>{var M,A;if(ae.current=O,P==null||P(O),te.current){const j=_e.positionElementToTarget(ae.current,te.current,n,r);oe.current={...j,width:te.current.offsetWidth}}u===!0&&((M=F.current)==null||M.unobserve(ae.current),(A=F.current)==null||A.observe(ae.current))},S=p.useMemo(()=>{const O={top:`${oe.current.top}px`,left:`${oe.current.left}px`,zIndex:z};return i&&(O.width=`${oe.current.width}px`),O},[$,z,i]);return m.jsx(ro,{start:W,timeout:f,showTransitionOptions:h,hideTransitionOptions:b,onEntering:he,onEntered:v,onExit:E,onExited:H,unmountOnExit:l,children:({state:O,defaultStyle:M,transitionStyles:A})=>m.jsx("div",{className:"bsc-fixed bsc-border bsc-border-solid bsc-bg-white bsc-shadow dark:bsc-border-mono-light-1 dark:bsc-bg-mono-dark-1 dark:bsc-text-mono-light-1",style:{...S,...M,...A[O]},ref:j=>j&&d(j),children:_})})};let lr;const Dh=new Uint8Array(16);function Oh(){if(!lr&&(lr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!lr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return lr(Dh)}const Re=[];for(let e=0;e<256;++e)Re.push((e+256).toString(16).slice(1));function Ih(e,t=0){return Re[e[t+0]]+Re[e[t+1]]+Re[e[t+2]]+Re[e[t+3]]+"-"+Re[e[t+4]]+Re[e[t+5]]+"-"+Re[e[t+6]]+Re[e[t+7]]+"-"+Re[e[t+8]]+Re[e[t+9]]+"-"+Re[e[t+10]]+Re[e[t+11]]+Re[e[t+12]]+Re[e[t+13]]+Re[e[t+14]]+Re[e[t+15]]}const uo={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Nh(e,t,r){if(uo.randomUUID&&!t&&!e)return uo.randomUUID();e=e||{};const n=e.random||(e.rng||Oh)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let a=0;a<16;++a)t[r+a]=n[a];return t}return Ih(n)}class fr{static create(t){const r=[];let n=0;for(let a=0,i=t.formatParts.length;a<i;a++){const o=t.formatParts[a],s=n,u=s+o.characterCount;r.push({startPosition:s,endPosition:u,...o}),n=u}return r}}class _h{constructor(t,r){U(this,"instanceCollection");U(this,"formatPartList");U(this,"inputSlotCollection");U(this,"currentPartIndex",0);U(this,"currentCursorPosition",0);U(this,"inputElement");U(this,"inputSelection",null);U(this,"inputRange");U(this,"textNode");this.instanceCollection=Pt.getInstance(),this.formatPartList=fr.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t)}getCursorPosition(){return this.currentCursorPosition}getCurrentPartIndex(){return this.currentPartIndex}setInputElement(t){this.inputElement=t}setCursorToCurrentPosition(){this.setCursorSelection(this.currentCursorPosition)}setCursorPosition(t){this.setCursorSelection(t)}setCursorSelection(t,r){this.createInputRangeSelection(),this.inputRange&&this.textNode&&(this.inputRange.setStart(this.textNode,t),this.inputRange.setEnd(this.textNode,r||t),this.currentCursorPosition=r||t,this.setPartIndexByCursorPosition())}findCursorPosition(){var r,n;const t=(r=window.getSelection())==null?void 0:r.getRangeAt(0);if(this.inputElement&&t){const a=document.createTreeWalker(this.inputElement,NodeFilter.SHOW_TEXT,u=>{const l=document.createRange();return l.selectNodeContents(u),l.compareBoundaryPoints(Range.END_TO_END,t)<1?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT});let i=0;for(;a.nextNode();)i+=((n=a.currentNode.textContent)==null?void 0:n.length)||0;t.startContainer.nodeType===Node.TEXT_NODE&&(i+=t.startOffset);const o=this.inputSlotCollection.getLastSlotWithData(),s=o.startPosition+o.partText.length;this.setCursorSelection(i>s?s:i)}}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.currentCursorPosition>0){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--)r=this.formatPartList[n],t>=r.startPosition&&t<=r.endPosition&&(r.isSeparator?this.setCursorSelection(this.formatPartList[n-1].endPosition):this.setCursorSelection(t))}}moveCursorRight(){const t=this.inputSlotCollection.getLastSlotWithData(),r=t.startPosition+t.partText.length;if(this.currentCursorPosition<r){const n=this.currentCursorPosition+1;let a=this.formatPartList[this.currentPartIndex];if(n>=a.startPosition&&n<=a.endPosition)this.setCursorSelection(n);else for(let i=this.currentPartIndex+1,o=this.formatPartList.length;i<o;i++)a=this.formatPartList[i],n>=a.startPosition&&n<=a.endPosition&&(a.isSeparator?this.setCursorSelection(this.formatPartList[i+1].startPosition):this.setCursorSelection(n))}}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))}}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}}}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 Mh{static create(t){const r=[];for(let n=0,a=t.length;n<a;n++){const i=t[n];i.isSeparator||r.push({partIndex:n,partText:"",isComplete:!1,...i})}return r}}class jh{constructor(t){U(this,"inputSlots");this.inputSlots=Mh.create(fr.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)}getFirstSlot(){return this.inputSlots[0]}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,a=this.inputSlots.length;n<a;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 Pt{static getInstance(){return this.instance||(this.instance=new kh),this.instance}}U(Pt,"instance");class kh{constructor(){U(this,"navigatorInstances");U(this,"inputSlotInstances");this.navigatorInstances={},this.inputSlotInstances={}}getNavigatorInstance(t,r){return this.navigatorInstances[t]||(this.navigatorInstances[t]=new _h(r,t)),this.navigatorInstances[t]}getInputSlotInstance(t,r){return this.inputSlotInstances[t]||(this.inputSlotInstances[t]=new jh(r)),this.inputSlotInstances[t]}removeInstances(t){this.navigatorInstances[t]&&delete this.navigatorInstances[t],this.inputSlotInstances[t]&&delete this.inputSlotInstances[t]}}class sn{constructor(t,r){U(this,"instanceCollection");U(this,"formatPartList");U(this,"inputSlotCollection");U(this,"inputElement");this.instanceCollection=Pt.getInstance(),this.formatPartList=fr.create(t),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t)}setInputElement(t){this.inputElement=t}render(){var r;let t="";for(let n=0,a=this.formatPartList.length;n<a;n++){const i=this.formatPartList[n];if(i.isSeparator)t+=i.inputText;else{const o=this.inputSlotCollection.getSlot(n);o&&(t+=o.partText+((r=o.inputText)==null?void 0:r.repeat(o.characterCount-o.partText.length)))}}this.inputElement&&(this.inputElement.innerHTML=t)}}var qe=(e=>(e[e.Text=0]="Text",e[e.Numeric=1]="Numeric",e))(qe||{});class co{constructor(){U(this,"numberKeys",["0","1","2","3","4","5","6","7","8","9"]);U(this,"movementKeys",["ArrowLeft","ArrowRight","Home","End"]);U(this,"editingKeys",["Backspace","Delete"]);U(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 Rh{constructor(t){U(this,"_currentIndex",0);U(this,"index",0);U(this,"formatParts");this.formatParts=fr.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 lo{constructor(t,r){U(this,"instanceCollection");U(this,"inputSlotCollection");U(this,"formatNavigator");U(this,"keyTypeChecker");U(this,"formatRenderer");U(this,"formatPartList");this.format=t,this.instanceCollection=Pt.getInstance(),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.keyTypeChecker=new co,this.formatRenderer=new sn(t,r),this.formatPartList=new Rh(t)}setInputElement(t){this.formatRenderer.setInputElement(t)}processKeyPress(t){if(this.keyTypeChecker.isEditingKey(t)){this.processEditRules(t);return}this.processInputRules(t)}processInputValue(t){var n;this.inputSlotCollection.clearAllSlots(),this.formatPartList.reset();let r=0;for(;this.formatPartList.hasNext();){const a=this.formatPartList.next();if(a&&!a.isSeparator)if(((n=this.formatPartList.peek())==null?void 0:n.isSeparator)===!0){const i=this.formatPartList.currentIndex,o=this.formatPartList.next();if(o&&o.inputText){const s=t.indexOf(o.inputText,r),u=this.inputSlotCollection.getSlot(i);if(u&&s>-1){const l=s-r>u.characterCount?r+u.characterCount:s;u.partText=t.substring(r,l),this.processSlotRules(u),r=s+o.characterCount}}}else{const i=this.inputSlotCollection.getSlot(this.formatPartList.currentIndex);i&&(i.partText=t.substring(r,r+i.characterCount),this.processSlotRules(i))}}}processEditRules(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const n=this.formatNavigator.getCursorPosition(),a=n-r.startPosition,i=this.format.deleteShiftsFormatPart||!1;switch(t.key){case"Backspace":{if(!(r.startPosition===n))r.partText=r.partText.substring(0,a-1)+r.partText.substring(a),i&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.moveCursorLeft(),this.processSlotRules(r,!0);else{this.processSlotRules(r,!0);const s=this.inputSlotCollection.getPreviousSlot(r.partIndex);s&&(s.partText=s.partText.substring(0,s.partText.length-1),i&&this.shiftFormatParts(s),this.formatRenderer.render(),this.formatNavigator.setCursorPosition(s.startPosition+s.partText.length),this.processSlotRules(s,!0))}break}case"Delete":r.partText=r.partText.substring(0,a)+r.partText.substring(a+1),i&&this.shiftFormatParts(r),this.formatRenderer.render(),this.formatNavigator.setCursorToCurrentPosition(),this.processSlotRules(r,!0);break}}shiftFormatParts(t){let r=t,n;for(;(n=this.inputSlotCollection.getNextSlot(r.partIndex))!==void 0;){const a=n.partText.substring(0,1);n.partText=n.partText.substring(1),r.partText=r.partText+a,r=n}}processInputRules(t){const r=this.inputSlotCollection.getSlot(this.formatNavigator.getCurrentPartIndex());if(!r)return;const{key:n}=t,a=r.characterCount,i=r.partText;if(r.valueType===qe.Numeric){if(!this.keyTypeChecker.isNumberKey(n))return;const o=r.maximumValue,s=r.exceedingMaximumValueCausesTab||!1,u=r.padWithZeros||!1,l=parseInt(this.createNewValue(r,n));if(o&&l>o)if(s){u&&(r.partText=r.partText.padStart(a,"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 i.length+1===a?(this.addToInputSlot(n),r.isComplete=!0,this.formatRenderer.render(),this.formatNavigator.isAtLastPart()?this.formatNavigator.moveCursorRight():this.formatNavigator.moveToNextInputPart()):i.length+1<a&&(this.addToInputSlot(n),this.formatRenderer.render(),this.formatNavigator.moveCursorRight())}else i.length+1===a?(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,a=this.formatNavigator.getCursorPosition();if(a>=t.startPosition+t.partText.length)return n+r;{const i=a-t.startPosition;return n.substring(0,i)+r+n.substring(i)}}processSlotRules(t,r=!1){const n=t.characterCount,a=t.allCharactersRequired||!1;if(t.valueType===qe.Numeric){const i=t.minimumValue,o=t.maximumValue;if(a)t.isComplete=t.partText.length===n;else if(i!==void 0&&o!==void 0){const s=t.padWithZeros||!1,u=parseInt(t.partText);t.isComplete=u>=i&&u<=o,t.isComplete&&s&&!r&&(t.partText=t.partText.padStart(n,"0"))}else t.isComplete=t.partText.length>0}else a?t.isComplete=t.partText.length===n:t.isComplete=t.partText.length>0}}class Lh{constructor(t,r){U(this,"instanceCollection");U(this,"formatNavigator");U(this,"ruleProcessor");U(this,"keyTypeChecker");U(this,"formatRenderer");this.format=t,this.instanceCollection=Pt.getInstance(),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.ruleProcessor=new lo(t,r),this.keyTypeChecker=new co,this.formatRenderer=new sn(t,r)}setInputElement(t){this.ruleProcessor.setInputElement(t),this.formatRenderer.setInputElement(t)}processMovementKey(t){const{key:r,metaKey:n}=t;switch(r){case"ArrowLeft":n?this.formatNavigator.moveHome():this.formatNavigator.moveCursorLeft();break;case"ArrowRight":n?this.formatNavigator.moveEnd():this.formatNavigator.moveCursorRight();break;case"Home":this.formatNavigator.moveHome();break;case"End":this.formatNavigator.moveEnd();break}}processKeyPress(t){return this.keyTypeChecker.isIgnoreKey(t)?!1:this.keyTypeChecker.isMovementKey(t)?(this.processMovementKey(t),!1):(this.ruleProcessor.processKeyPress(t),!0)}}class Ah{constructor(t,r=""){U(this,"instanceId");U(this,"instanceCollection");U(this,"keyProcessor");U(this,"formatNavigator");U(this,"formatRenderer");U(this,"inputSlotCollection");U(this,"inputRuleProcessor");U(this,"previousOutputValue","");U(this,"inputElementSet",!1);U(this,"isInputFocused",!1);U(this,"inputElement");U(this,"onFormatChange");this.inputValue=r,this.instanceId=Nh(),this.instanceCollection=Pt.getInstance(),this.keyProcessor=new Lh(t,this.instanceId),this.formatNavigator=this.instanceCollection.getNavigatorInstance(this.instanceId,t),this.formatRenderer=new sn(t,this.instanceId),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(this.instanceId,t),this.inputRuleProcessor=new lo(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),setTimeout(()=>{var r;this.formatRenderer.render(),this.isInputFocused&&this.formatNavigator.setCursorToCurrentPosition(),this.inputValue.length>0&&(this.previousOutputValue=(r=this.inputElement)==null?void 0:r.innerHTML)}))}registerFormatChangeEvent(t){this.onFormatChange=t}mouseUpHandler(){this.formatNavigator.findCursorPosition()}keyDownHandler(t){t.key!=="Tab"&&(t.preventDefault(),t.stopPropagation(),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)}}const Fh=(e,t)=>{const{value:r="",format:n,readOnly:a=!1,debounceTime:i=800,fillContainer:o=!0,leftElement:s,rightElement:u,className:l,leftElementClassName:f,rightElementClassName:h,isSingleLine:b=!1,allowSingleLineScroll:T=!1,isInputValid:x,onChange:D,onFocus:P,onBlur:_,onElementCreate:z,onLeftElementClick:K,onRightElementClick:W}=e,[y,$]=p.useState(!0),X=p.useRef(),ee=p.useRef(),B=p.useRef();p.useEffect(()=>()=>{var L;(L=B.current)==null||L.dispose()},[]),p.useEffect(()=>{var L;(L=B.current)==null||L.inputValuePassed(r)},[r]),p.useEffect(()=>{var L,he,v;(L=B.current)==null||L.dispose(),n&&(B.current=new Ah(n,r),ee.current&&((he=B.current)==null||he.inputElementCreated(ee.current)),(v=B.current)==null||v.registerFormatChangeEvent(oe))},[n]);const oe=p.useCallback(L=>{x?x(L)?($(!0),D==null||D(L)):$(!1):D==null||D(L)},[D]),te=p.useCallback(L=>{var he;(he=B.current)==null||he.inputFocused(),P==null||P(L)},[P]),ae=p.useCallback(L=>{var he;(he=B.current)==null||he.inputBlurred(),_==null||_(L)},[_]),g=p.useCallback(()=>{var L;(L=B.current)==null||L.mouseUpHandler()},[]),Y=p.useCallback(L=>{var he;(he=B.current)==null||he.keyDownHandler(L)},[]),q=p.useCallback(L=>{var he,v,E,H,d,S,O,M,A;(v=(he=X.current)==null?void 0:he.inputElement)==null||v.removeEventListener("keydown",Y),(H=(E=X.current)==null?void 0:E.inputElement)==null||H.removeEventListener("mouseup",g),X.current=L,(S=(d=X.current)==null?void 0:d.inputElement)==null||S.addEventListener("keydown",Y),(M=(O=X.current)==null?void 0:O.inputElement)==null||M.addEventListener("mouseup",g),ee.current=(A=X.current)==null?void 0:A.inputElement},[]),F=p.useCallback(()=>{var L;(L=X.current)==null||L.focus()},[]);p.useImperativeHandle(t,()=>({focus:F}));const re=Ge(l,{"!bsc-border-error":!y});return m.jsx(Kt,{ref:L=>L&&q(L),readOnly:a,debounceTime:i,fillContainer:o,leftElement:s,rightElement:u,className:re,leftElementClassName:f,rightElementClassName:h,isSingleLine:b,allowSingleLineScroll:T,onFocus:te,onBlur:ae,onElementCreate:z,onLeftElementClick:K,onRightElementClick:W})},fo=p.forwardRef(Fh),un=p.createContext(void 0);function ho(e,t,r=!0){var b,T;const n=ya(e),a=da(e),i=tf(e);let o=Vr(a)-(((b=t.options)==null?void 0:b.weekStartsOn)||0);o=o===-1?6:o;const s=Vr(i)-(((T=t.options)==null?void 0:T.weekStartsOn)||0),u=el({start:a,end:i}),l=n+o>35?6:5,f=po(l,7,{dayValue:null,isCurrent:!0});let h=1;for(let x=0,D=l;x<D;x++){for(let P=x>0?0:o;P<7;P++){const _=u[h-1];if(_.setHours(e.getHours(),e.getMinutes(),e.getSeconds()),f[x][P].dayValue=_,++h>n)break}if(h>n)break}if(o>0&&r)for(let x=0;x<o;x++)f[0][x].dayValue=rd(a,o-x),f[0][x].isCurrent=!1;if(s>-1&&r)for(let x=6;x>s;x--)f[l-1][x].dayValue=Zt(i,x-s),f[l-1][x].isCurrent=!1;return f}function po(e,t,r){const n=[];for(let a=0,i=e;a<i;a++){const o=[];for(let s=0,u=t;s<u;s++){const l=Yh(r)?r:{...r};o.push(l)}n.push(o)}return n}function Yh(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"||e instanceof Date}function $h(e){var n;const t=nd(new Date,((n=e.options)==null?void 0:n.weekStartsOn)||0),r=[];for(let a=0;a<7;a++)r.push(Zt(t,a).toLocaleDateString(e.code,{weekday:"short"}));return r}function Uh(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 a=0;a<3;a++)for(let i=0;i<4;i++)r[a][i]={monthNumber:n,monthName:st(t,n++).toLocaleDateString(e.code,{month:"short"})};return r}function Hh(e,t){const r=new Date(e.getTime()),n=Math.floor(r.getFullYear()/10)*10;r.setFullYear(n);const a=tl({start:r,end:Xt(r,9)}),i=po(3,4,"");let o=0;for(let s=0;s<3;s++)for(let u=0;u<4&&(i[s][u]=a[o++].toLocaleDateString(t.code,{year:"numeric"}),o!==a.length);u++);return i}function Wh(e){const t=new Date;return t.setHours(0,0,0,0),t.toLocaleTimeString(e.code)}function Vh(e,t,r){return e.getTime()>=t.getTime()&&e.getTime()<=r.getTime()}async function mo(e){return(await import(`/node_modules/date-fns/locale/${zh(e)}`)).default}function zh(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 Wt(e,t){const r=ad(e);if(isNaN(r.valueOf())){let n=Be(e,"P pp",new Date,{locale:t});return!isNaN(n.valueOf())||(n=Be(e,"Pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P HH:mm",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P hh:mm a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P HH:mm:ss",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P hh:mm:ss a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"P p",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=Be(e,"p",new Date,{locale:t}),!isNaN(n.valueOf()))?n:void 0}return r}function vo(e,t){const r=e.split("-");if(r.length!==2)return;const n=Wt(r[0].trim(),t);if(!n)return;const a=Wt(r[1].trim(),t);if(a)return[n,a]}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||{}),Vt=(e=>(e[e.Day=0]="Day",e[e.Month=1]="Month",e[e.Year=2]="Year",e[e.Range=3]="Range",e))(Vt||{}),dr=(e=>(e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e))(dr||{}),De=(e=>(e[e.TwelveHour=0]="TwelveHour",e[e.TwentyFourHour=1]="TwentyFourHour",e))(De||{}),rt=(e=>(e[e.Normal=0]="Normal",e[e.Range=1]="Range",e))(rt||{}),hr=(e=>(e[e.Right=0]="Right",e[e.Left=1]="Left",e[e.None=2]="None",e))(hr||{}),Z=(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[e.SetViewDate=5]="SetViewDate",e[e.SetSelectedDate=6]="SetSelectedDate",e[e.SetSelectedDateRange=7]="SetSelectedDateRange",e[e.SetSelectedStartDate=8]="SetSelectedStartDate",e[e.SetSelectedEndDate=9]="SetSelectedEndDate",e[e.SetTimeFormat=10]="SetTimeFormat",e[e.ClearDates=11]="ClearDates",e[e.InitializeDates=12]="InitializeDates",e))(Z||{});const Bh=(e,t)=>{switch(t.type){case 0:return{...e,currentSelector:0,currentViewDate:t.viewDate||e.currentViewDate};case 1:return{...e,currentSelector:1,currentViewDate:t.viewDate||e.currentViewDate};case 2:return{...e,currentSelector:2};case 3:return{...e,currentSelector:3};case 4:return{...e,currentSelector:4,currentViewDate:t.viewDate||e.currentViewDate};case 5:return{...e,currentViewDate:t.viewDate||new Date,dateInitialized:!0};case 6:return{...e,selectedDate:t.selectedDate||e.selectedDate,currentViewDate:t.viewDate||e.currentViewDate};case 7:return{...e,selectedStartDate:t.selectedStartDate||e.selectedStartDate,selectedEndDate:t.selectedEndDate||e.selectedEndDate};case 8:return{...e,selectedStartDate:t.selectedStartDate,selectedEndDate:void 0};case 9:return{...e,selectedEndDate:t.selectedEndDate};case 10:return{...e,timeFormat:t.timeFormat||e.timeFormat};case 11:return{currentSelector:e.currentSelector,currentViewDate:e.currentViewDate,timeFormat:e.timeFormat,dateInitialized:!0};case 12:const r={...e,currentViewDate:qh(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:0}}};function qh(e){return e?Array.isArray(e)?e[0]:e:new Date}const pr=({viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:a=rt.Normal,locale:i,onDateSelected:o,selectableDate:s,isValidDate:u,dispatcher:l})=>{var q;const[f,h]=p.useState(!1),[b,T]=p.useState(),[x,D]=p.useState(),[P,_]=p.useState(),[z,K]=p.useState(),W=p.useRef(),y=p.useRef(),$=p.useContext(un),X=p.useMemo(()=>$.calendarTemplate,[$.calendarTemplate]),ee=async()=>i||await mo(Na());p.useEffect(()=>{ee().then(F=>{W.current=F,y.current=$h(W.current),h(!0)}).catch(F=>console.error(F))},[]),p.useEffect(()=>{e&&W.current&&_(ho(e,W.current,a===rt.Normal))},[e,f]),p.useEffect(()=>{K(t?new Date(t.getFullYear(),t.getMonth(),t.getDate()):void 0)},[t]),p.useEffect(()=>{T(r?new Date(r.getFullYear(),r.getMonth(),r.getDate(),0,0,0).getTime():void 0),D(n?new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59).getTime():void 0)},[r,n]),p.useEffect(()=>{W.current&&i&&(W.current=i,_(ho(e,W.current,a===rt.Normal)))},[i]);const B=F=>{if(a===rt.Normal)l==null||l({type:Z.SetSelectedDate,selectedDate:F,viewDate:F}),o==null||o(F);else{if(!o)throw new Error("Range selection mode requires onDateSelected to be set");!r||rf(F,r)?o(F):r&&!n?o(F,{setEndDate:!0}):r&&n&&o(F)}},oe=F=>(z==null?void 0:z.toLocaleDateString())===F.toLocaleDateString(),te=F=>{if(b&&x){const re=F.getTime();return re>=b&&re<=x}return!1},ae={viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:a,locale:i,weekDays:y.current,monthMatrix:P,selectableDate:s,isValidDate:u,onDateClicked:B,isSelectedDate:oe,isInSelectedDateRange:te},Y=X||((F,re)=>m.jsx("div",{className:"bsc-w-full bc-dt-calendar",children:re}));return m.jsx(Gr,{props:ae,template:Y,children:m.jsxs("div",{className:"bsc-grid bsc-grid-cols-7 bsc-gap-3 bc-dt-day-row bsc-min-w-[329px]",children:[(q=y.current)==null?void 0:q.map((F,re)=>m.jsx("div",{className:"bsc-text-center bsc-font-bold bc-dt-day-cell",children:F},re)),P==null?void 0:P.map((F,re)=>F.map((L,he)=>{var H,d;const v=L.dayValue!==null&&(s===void 0||s(L.dayValue)),E=Ge("bsc-text-center bsc-py-1",{"bsc-text-gray-3":!L.isCurrent,"bsc-bg-primary-3 dark:bsc-bg-mono-light-1 dark:bsc-text-mono-dark-1":L&&L.dayValue&&(z&&oe(L.dayValue)||b&&!x&&fa(b,L.dayValue)||b&&x&&te(L.dayValue)),"bsc-cursor-pointer":v,"bsc-text-error bsc-cursor-not-allowed":!v,"bsc-bg-primary-5 dark:bsc-bg-mono-light-3 dark:bsc-text-mono-dark-1":L.dayValue&&td(L.dayValue)&&!(oe(L.dayValue)||te(L.dayValue))},"bc-dt-date-cell");return m.jsx("div",{className:E,onClick:()=>L&&L.dayValue&&v&&(u===void 0||u(L.dayValue))&&B(L.dayValue),children:(d=L.dayValue)==null?void 0:d.getDate().toLocaleString((H=W.current)==null?void 0:H.code)},re.toString()+he.toString())}))]})})},mr=({title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:a})=>{const o=p.useContext(un).dateScrollerTemplate,s={title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:a},l=o||((f,h)=>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:h}));return m.jsxs(Gr,{props:s,template:l,children:[m.jsx("div",{className:"bc-dt-scroller-left bsc-flex-shrink bsc-cursor-pointer",children:m.jsx(We,{className:"bsc-bg-transparent focus:bsc-outline-none",onClick:n,children:m.jsx(Rd,{size:24})})}),m.jsx("div",{className:"bc-dt-scroller-title bsc-flex-grow bsc-cursor-pointer bsc-text-center",onClick:r,children:e}),m.jsx("div",{className:"bc-dt-scroller-right bsc-flex-shrink bsc-cursor-pointer",children:m.jsx(We,{className:"bsc-bg-transparent focus:bsc-outline-none",onClick:a,children:m.jsx(Hd,{size:24})})})]})},Gh=({selectedDate:e,viewDate:t,locale:r,showTimeSelector:n,selectableDate:a,isValidDate:i,onChange:o,dispatcher:s})=>{const u=()=>{t&&s({type:Z.SetViewDate,viewDate:Oa(t,1)})},l=()=>{t&&s({type:Z.SetViewDate,viewDate:st(t,1)})},f=()=>{s({type:Z.MonthSelector})},h=()=>{s({type:Z.TimeSelector})},b=()=>t?t.toLocaleDateString(r.code,{month:"long",year:"numeric"}):"";return m.jsxs("div",{className:"bsc-p-2 bc-dt-day-selector",children:[m.jsx(mr,{title:b(),scrollerType:Vt.Day,onTitleClicked:f,onMovePrevious:u,onMoveNext:l}),m.jsx(pr,{viewDate:t,selectedDate:e,locale:r,selectableDate:a,isValidDate:i,onDateSelected:o,dispatcher:s}),n&&m.jsx("div",{className:"bsc-w-full bsc-flex bsc-flex-row bsc-p-2 bsc-justify-center bc-dt-time-value-wrapper",children:m.jsx("div",{className:"bsc-p-2 bsc-cursor-pointer hover:bsc-bg-gray-4 dark:hover:bsc-bg-mono-light-2 dark:hover:bsc-text-mono-dark-2 dark:bsc-bg-mono-dark-1 dark:bsc-text-mono-light-1 bc-dt-time-value",onClick:h,children:(e==null?void 0:e.toLocaleTimeString(r.code))||Wh(r)})})]})},Qh=({viewDate:e,locale:t,dateSelection:r=we.DateTime,dispatcher:n})=>{const a=p.useRef(Uh(t)),i=()=>{const f=Ia(e,1);n({type:Z.SetViewDate,viewDate:f})},o=()=>{const f=Xt(e,1);n({type:Z.SetViewDate,viewDate:f})},s=f=>{n({type:r!==we.DateRange?Z.DaySelector:Z.DateRangeSelector,viewDate:wd(e,f)})},u=()=>e.toLocaleDateString(t.code,{year:"numeric"}),l=()=>{n({type:Z.YearSelector})};return m.jsxs("div",{className:"bsc-p-2 bc-dt-month-selector",style:{minWidth:"20rem"},children:[m.jsx(mr,{title:u(),scrollerType:Vt.Month,onTitleClicked:l,onMovePrevious:i,onMoveNext:o}),m.jsx("div",{className:"bsc-w-full bsc-grid bsc-grid-cols-4 bsc-gap-4 bc-dt-month-grid",children:a.current.map((f,h)=>f.map((b,T)=>m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-month-cell",onClick:()=>s(b.monthNumber),children:b.monthName},h.toString()+T.toString())))})]})};function Kh(e,t){if(t===e)return!1;const r=Object.values(t),n=Object.values(e);if(r.length!==n.length||r.some((i,o)=>i!==n[o]))return!0;const a=Object.keys(e);return Object.keys(t).some((i,o)=>i!==a[o])}function Zh(e,t){return e.matches[t]=!1,e.mediaQueries[t]={},e}function go(e){const t=Object.keys(e);return typeof window>"u"?t.reduce(Zh,{mediaQueries:{},matches:{}}):t.reduce((r,n)=>{const a=window.matchMedia(e[n]);return r.mediaQueries[n]=a,r.matches[n]=a.matches,r},{mediaQueries:{},matches:{}})}function Xh(e,t){function r(n,a){return n[a]=e.mediaQueries[a].matches,n}switch(t.type){case"updateMatches":return{matches:Object.keys(e.mediaQueries).reduce(r,{}),mediaQueries:e.mediaQueries};case"setQueries":return go(t.queries)}}function Jh(e){const t=Nt.useRef(e),[r,n]=Nt.useReducer(Xh,e,go);Nt.useEffect(()=>{Kh(e,t.current)&&(n({type:"setQueries",queries:e}),t.current=e)},[e]);function a(){return n({type:"updateMatches"})}function i(u){const l=a;return typeof u.addListener<"u"?u.addListener(l):u.addEventListener("change",l),l}Nt.useEffect(()=>{const u=Object.values(r.mediaQueries),l=u.map(i);function f(h,b){typeof h.addListener<"u"?h.removeListener(l[b]):h.removeEventListener("change",l[b])}return()=>{u.forEach(f)}},[r.mediaQueries]);const{matches:o}=r,s=Nt.useMemo(()=>Object.values(o),[o]);return{matches:o,matchesAny:s.some(Boolean),matchesAll:s.length>0&&s.every(Boolean)}}function yo(e){return Jh(ep(e)).matchesAll}const cn={};function ep(e){return cn[e]===void 0&&(cn[e]={default:e}),cn[e]}const tp=({viewDate:e,selectedStartDate:t,selectedEndDate:r,locale:n,onChange:a,dispatcher:i})=>{const o=yo("not all and (min-width: 640px)"),s=st(e,1),u=(T,x)=>{!x||!x.setEndDate?i({type:Z.SetSelectedStartDate,selectedStartDate:T}):(i({type:Z.SetSelectedEndDate,selectedEndDate:T}),t&&(a==null||a([t,T])))},l=()=>{i({type:Z.MonthSelector})},f=()=>o?`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})}`:`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})} - ${s.toLocaleDateString(n.code,{month:"long"})} ${s.toLocaleDateString(n.code,{year:"numeric"})}`,h=()=>{e&&i({type:Z.SetViewDate,viewDate:Oa(e,1)})},b=()=>{e&&i({type:Z.SetViewDate,viewDate:st(e,1)})};return m.jsxs("div",{className:"bsc-flex bsc-flex-col bc-dt-range-selector",children:[m.jsx("div",{className:"bsc-flex-shrink bc-dt-range-scroller-wrapper",children:m.jsx(mr,{title:f(),scrollerType:Vt.Range,onTitleClicked:l,onMovePrevious:h,onMoveNext:b})}),m.jsx("div",{className:"bsc-flex-grow",children:o?m.jsx("div",{className:"bsc-py-1 bsc-px-2 bc-dt-range-calendar",children:m.jsx(pr,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:rt.Range,onDateSelected:u,locale:n,dispatcher:i})}):m.jsxs("div",{className:"bsc-flex bsc-flex-row bsc-py-1 bsc-px-2 bc-dt-range-wrapper",children:[m.jsx("div",{className:"bsc-border-r bsc-border-solid bsc-border-gray-3 bsc-pr-4 bc-dt-range-calendar-1",children:m.jsx(pr,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:rt.Range,onDateSelected:u,locale:n,dispatcher:i})}),m.jsx("div",{className:"bsc-pl-4 bc-dt-range-calendar-2",children:m.jsx(pr,{viewDate:s,selectedStartDate:t,selectedEndDate:r,selectionMode:rt.Range,onDateSelected:u,locale:n,dispatcher:i})})]})})]})},rp=({viewDate:e,showDateSelector:t,locale:r,timeFormat:n=De.TwelveHour,timeConstraints:a,onChange:i,dispatcher:o})=>{const s=p.useRef(n===De.TwelveHour?11:23),u=p.useRef(n===De.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"]),l=p.useRef(xd(0,59,g=>g.toString().padStart(2,"0"))),f=p.useRef(["AM","PM"]),h=p.useRef(Uc(e)),b=g=>g>11?g-12:g,[T,x]=p.useState(b(e.getHours())),[D,P]=p.useState(e.getMinutes()),[_,z]=p.useState(e.getHours()<=12?0:1),K=p.useRef(e.toLocaleDateString(r.code));p.useEffect(()=>{const g=e.getHours(),Y=e.getMinutes();if(g!==T&&x(n===De.TwelveHour?b(g):g),Y!==D&&P(Y),n===De.TwelveHour){const q=g<=11?0:1;q!==_&&z(q)}},[e]);const W=()=>{var q;const g=((q=a==null?void 0:a.hours)==null?void 0:q.step)||1,Y=T<s.current?T+g:0;x(Y),B(Y,D,_)},y=()=>{var q;const g=((q=a==null?void 0:a.hours)==null?void 0:q.step)||1,Y=T>0?T-g:s.current;x(Y),B(Y,D,_)},$=()=>{var q,F,re;const g=((q=a==null?void 0:a.minutes)==null?void 0:q.step)||1,Y=D+g<(((F=a==null?void 0:a.minutes)==null?void 0:F.max)||59)?D+g:((re=a==null?void 0:a.minutes)==null?void 0:re.min)||0;P(Y),B(T,Y,_)},X=()=>{var q,F,re;const g=((q=a==null?void 0:a.minutes)==null?void 0:q.step)||1,Y=D-g>=(((F=a==null?void 0:a.minutes)==null?void 0:F.min)||0)?D-g:(((re=a==null?void 0:a.minutes)==null?void 0:re.max)||60)-g;P(Y),B(T,Y,_)},ee=()=>{const g=_===0?1:0;z(g),B(T,D,g)},B=(g,Y,q)=>{const F=n===De.TwelveHour&&q===1?g+12:g;h.current.setHours(F,Y),o({type:Z.SetSelectedDate,selectedDate:h.current,viewDate:h.current}),i==null||i(h.current)},oe=()=>{o({type:Z.DaySelector})},te=Ge("bsc-w-full bsc-grid bsc-grid-rows-3 bsc-gap-4 bc-dt-time-grid",{"bsc-grid-cols-4":n===De.TwelveHour,"bsc-grid-cols-3":n===De.TwentyFourHour}),ae=Ge("bsc-text-center bsc-cursor-pointer hover:bsc-bg-gray-4 dark:bsc-text-mono-light-1 dark:hover:bsc-bg-mono-light-1 dark:hover:bsc-text-mono-dark-1 bc-dt-time-date-value",{"bsc-col-span-4":n===De.TwelveHour,"bsc-col-span-3":n===De.TwentyFourHour});return m.jsx("div",{className:"bc-dt-time-selector bsc-flex bsc-flex-row bsc-justify-center bsc-p-2",style:{minWidth:n===De.TwelveHour?"15rem":"11rem"},children:m.jsxs("div",{className:te,children:[t&&m.jsx("div",{className:ae,onClick:oe,children:K.current}),m.jsx("div",{className:"bc-dt-time-hour-increase bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:W,children:m.jsx(Qr,{})})}),m.jsx("div",{}),m.jsx("div",{className:"bc-dt-time-minute-increase bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:$,children:m.jsx(Qr,{})})}),n===De.TwelveHour&&m.jsx("div",{className:"bc-dt-time-meridian-increase bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:ee,children:m.jsx(Qr,{})})}),m.jsx("div",{className:"bc-dt-time-hour-value bsc-text-center",children:u.current[T]}),m.jsx("div",{className:"bc-dt-time-separator bsc-text-center",children:":"}),m.jsx("div",{className:"bc-dt-time-minute-value bsc-text-center",children:l.current[D]}),n===De.TwelveHour&&m.jsx("div",{className:"bc-dt-time-meridian-value bsc-text-center",children:f.current[_]}),m.jsx("div",{className:"bc-dt-time-hour-decrease bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:y,children:m.jsx(Kr,{})})}),m.jsx("div",{}),m.jsx("div",{className:"bc-dt-time-minute-decrease bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:X,children:m.jsx(Kr,{})})}),n===De.TwelveHour&&m.jsx("div",{className:"bc-dt-time-meridian-decrease bsc-cursor-pointer bsc-text-center",children:m.jsx(We,{className:"bsc-bg-transparent bsc-p-2 focus:bsc-outline-none",onClick:ee,children:m.jsx(Kr,{})})})]})})},np=({viewDate:e,locale:t,dispatcher:r})=>{const n=Hh(e,t),a=()=>{const u=Ia(e,10);r({type:Z.SetViewDate,viewDate:u})},i=()=>{const u=Xt(e,10);r({type:Z.SetViewDate,viewDate:u})},o=u=>{const l=parseInt(u);r({type:Z.MonthSelector,viewDate:Td(e,l)})},s=()=>`${n[0][0].toString()} - ${n[2][1].toString()}`;return m.jsxs("div",{className:"bc-dt-year-selector",style:{minWidth:"20rem"},children:[m.jsx(mr,{title:s(),scrollerType:Vt.Year,onMovePrevious:a,onMoveNext:i}),m.jsx("div",{className:"bsc-w-full bc-dt-year-wrapper",children:m.jsx("div",{className:"bsc-grid bsc-grid-cols-4 bsc-gap-4 bc-dt-year-grid",children:n.map((u,l)=>u.map((f,h)=>f.length>0?m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-year-cell",onClick:()=>o(f),children:f},l.toString()+h.toString()):m.jsx("div",{},l.toString()+h.toString())))})})]})};class ap{constructor(t,r){U(this,"dateFormat");U(this,"timeFormat");U(this,"use24HourTime");U(this,"monthPart");U(this,"dayPart");U(this,"yearPart");U(this,"twelveHourPart");U(this,"twentyFourHourPart");U(this,"minutePart");U(this,"meridianPart");this.dateSelection=t;const n=2023,a=12,i=20,s=new Date(n,a-1,i).toLocaleDateString(r,{year:"numeric",month:"numeric",day:"numeric"});this.dateFormat=s.replace(`${n}`,"YYYY").replace(`${a}`,"MM").replace(`${i}`,"DD");const u=new Date,l=18,f=24,h=37,b=317;u.setHours(l,f,h,b);const T=u.toLocaleTimeString(r);this.use24HourTime=T.startsWith("18"),this.timeFormat=T.replace(`${this.use24HourTime?l:"6"}`,"HH").replace(`${f}`,"MM").replace(`${h}`,"SS").replace(`${b}`,"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 a={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("YYYY"),n=t.substring(0,r);const i={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.monthPart,a,this.dayPart,i,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 a={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("YYYY"),n=t.substring(0,r);const i={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.dayPart,a,this.monthPart,i,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 a={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};r=t.indexOf("DD"),n=t.substring(0,r);const i={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.yearPart,a,this.monthPart,i,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),a={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0},i={characterCount:1,placeholder:" ",inputText:" ",isSeparator:!0};return[this.twelveHourPart,a,this.minutePart,i,this.meridianPart]}return[]}createTwentyFourHourFormatParts(){if(this.twentyFourHourPart&&this.minutePart){const t=this.timeFormat.replace("HH",""),r=t.indexOf("MM"),n=t.substring(0,r),a={characterCount:n.length,placeholder:n,inputText:n,isSeparator:!0};return[this.twentyFourHourPart,a,this.minutePart]}return[]}createDateParts(){this.monthPart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:qe.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.dayPart={characterCount:2,placeholder:"D",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:qe.Numeric,minimumValue:1,maximumValue:31,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.yearPart={characterCount:4,placeholder:"Y",inputText:"_",isSeparator:!1,allCharactersRequired:!0,valueType:qe.Numeric},this.twelveHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:qe.Numeric,minimumValue:1,maximumValue:12,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.twentyFourHourPart={characterCount:2,placeholder:"H",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:qe.Numeric,minimumValue:0,maximumValue:23,exceedingMaximumValueCausesTab:!0,padWithZeros:!0},this.minutePart={characterCount:2,placeholder:"M",inputText:"_",isSeparator:!1,allCharactersRequired:!1,valueType:qe.Numeric,minimumValue:0,maximumValue:59,exceedingMaximumValueCausesError:!0,padWithZeros:!0},this.meridianPart={characterCount:2,inputText:"_",isSeparator:!1,valueType:qe.Text,possibleValues:["AM","PM"]}}}const op=(e,t)=>{var i;const[r,n]=p.useState(),a=p.useRef();return p.useEffect(()=>{t&&!r&&(a.current=new ap(e,t),n(a.current.createInputFormat()))},[t]),[r,(i=a.current)==null?void 0:i.is24HourTime]},ip=({value:e,readOnly:t=!1,label:r,useDefaultDateValue:n=!1,useFormattedInput:a=!1,allowClear:i=!1,locale:o,className:s,dateSelection:u=we.DateTime,dateFormat:l,timeConstraints:f,icon:h,iconPosition:b=hr.Right,inputElement:T,selectableDate:x,isValidDate:D,onChange:P,calendarTemplate:_,dateScrollerTemplate:z,inputTemplate:K})=>{const[W,y]=p.useState(!1),[$,X]=p.useState(),[ee,B]=p.useState(),oe=p.useRef(),te=p.useRef(!1),ae=p.useRef(o||Na()),g=p.useRef(),Y=p.useRef(),q=p.useRef(),[F,re]=op(u,$),L=yo("not all and (min-width: 640px)"),he=p.useRef({calendarTemplate:_,dateScrollerTemplate:z});p.useEffect(()=>{ae.current&&v(ae.current)},[ae]),p.useEffect(()=>{o&&v(o)},[o]),p.useEffect(()=>{if(e){const G=E();S({type:Z.InitializeDates,initialDate:G})}else S({type:Z.ClearDates})},[e,g.current]),p.useEffect(()=>{re&&S({type:Z.SetTimeFormat,timeFormat:re?De.TwentyFourHour:De.TwelveHour})},[re]),p.useEffect(()=>{T&&(Y.current=T)},[T]);const v=G=>{mo(G).then(be=>{X(be.code),g.current=be;const Ye=E();S(e||n?{type:Z.InitializeDates,initialDate:Array.isArray(Ye)?Ye[0]:Ye}:{type:Z.SetViewDate,viewDate:Array.isArray(Ye)?Ye[0]:Ye})}).catch(be=>console.error(be))},E=()=>{const G=new Date;return G.setHours(0,0,0,0),e?typeof e=="string"?u!==we.DateRange?Wt(e,g.current):vo(e,g.current):e:G},H={currentSelector:u===we.TimeOnly?Z.TimeSelector:u===we.DateTime||u===we.DateOnly?Z.DaySelector:Z.DateRangeSelector,currentViewDate:new Date,timeFormat:De.TwelveHour,dateInitialized:!1},[d,S]=p.useReducer(Bh,H),O=()=>{Fe(),y(!0)},M=p.useMemo(()=>At(()=>{y(!1)},250),[]),A=p.useMemo(()=>At(()=>{M.cancel()},5),[M]),j=G=>{const be=G.target.innerText;Ee(be)},k=G=>{if(G){const be=Wt(G,g.current);return be?D?D(be):!0:!1}else return!0},V=G=>{Ee(G||"")},Ee=G=>{const be=u!==we.DateRange?Wt(G,g.current):vo(G,g.current);be?(Array.isArray(be)?(Vh(be[0],da(d.currentViewDate),Jc(st(d.currentViewDate,1)))||S({type:Z.SetViewDate,viewDate:be[0]}),S({type:Z.SetSelectedDateRange,selectedStartDate:be[0],selectedEndDate:be[1]})):S({type:Z.SetSelectedDate,selectedDate:be,viewDate:be}),P==null||P(be)):G===""&&(S({type:Z.ClearDates}),P==null||P())},C=()=>{Fe(),y(!W)},ke=()=>{S({type:Z.ClearDates}),y(!1),P==null||P()},Ae=(G,be)=>{(!Y.current||oe.current!==be)&&(Y.current=G,oe.current=be,te.current=!0)},Fe=()=>{(!q.current||te.current)&&Y.current&&(q.current=Y.current,B(Y.current),te.current=!1)},ft=()=>{y(!1),S({type:u===we.TimeOnly?Z.TimeSelector:u===we.DateTime||u===we.DateOnly?Z.DaySelector:Z.DateRangeSelector})},vr=()=>{switch(l){case dr.Short:return"short";case dr.Medium:return"medium";case dr.Long:return"long";default:return}},dt=()=>{var be,Ye,zt,Ct,yr,br,wr,Tr,xr,Pr,Er,Dt;const G=vr();switch(u){case we.DateTime:return d.selectedDate?G?d.selectedDate.toLocaleString((be=g.current)==null?void 0:be.code,{dateStyle:G,timeStyle:G}):d.selectedDate.toLocaleString((Ye=g.current)==null?void 0:Ye.code):"";case we.DateOnly:return d.selectedDate?G?d.selectedDate.toLocaleDateString((zt=g.current)==null?void 0:zt.code,{dateStyle:G}):d.selectedDate.toLocaleDateString((Ct=g.current)==null?void 0:Ct.code):"";case we.TimeOnly:return d.selectedDate?G?d.selectedDate.toLocaleTimeString((yr=g.current)==null?void 0:yr.code,{timeStyle:G,hour12:d.timeFormat===De.TwelveHour,hourCycle:d.timeFormat===De.TwentyFourHour?"h23":void 0}):d.selectedDate.toLocaleTimeString((br=g.current)==null?void 0:br.code,{hour12:d.timeFormat===De.TwelveHour,hourCycle:d.timeFormat===De.TwentyFourHour?"h23":void 0}):"";case we.DateRange:return d.selectedStartDate&&d.selectedEndDate?G?`${d.selectedStartDate.toLocaleDateString((wr=g.current)==null?void 0:wr.code,{dateStyle:G})} - ${d.selectedEndDate.toLocaleDateString((Tr=g.current)==null?void 0:Tr.code,{dateStyle:G})}`:`${d.selectedStartDate.toLocaleDateString((xr=g.current)==null?void 0:xr.code)} - ${d.selectedEndDate.toLocaleDateString((Pr=g.current)==null?void 0:Pr.code)}`:"";default:return d.selectedDate?G?d.selectedDate.toLocaleString((Er=g.current)==null?void 0:Er.code,{dateStyle:G,timeStyle:G}):d.selectedDate.toLocaleString((Dt=g.current)==null?void 0:Dt.code):""}},Xe=u===we.DateTime||u===we.DateOnly||u===we.DateRange,ln=u===we.DateTime||u===we.TimeOnly,ht=b===hr.None?{}:b===hr.Right?{rightElement:m.jsxs("div",{className:"bsc-flex bsc-text-black dark:bsc-text-mono-light-1",children:[i&&!t&&m.jsx("div",{children:m.jsx(La,{size:16,className:"bsc-cursor-pointer bsc-text-sm",onClick:ke})}),m.jsx("div",{className:"bsc-ml-2",children:h||m.jsx(Fa,{size:16,className:t?void 0:"bsc-cursor-pointer",onClick:t?void 0:C})})]}),rightElementClassName:"bsc-justify-center"}:{leftElement:m.jsxs("div",{className:"bsc-flex bsc-text-black dark:bsc-text-mono-light-1",children:[m.jsx("div",{className:"bsc-mr-2",children:h||m.jsx(Fa,{size:16,className:t?void 0:"bsc-cursor-pointer",onClick:t?void 0:C})}),i&&!t&&m.jsx("div",{children:m.jsx(La,{size:16,className:"bsc-cursor-pointer bsc-text-sm",onClick:ke})})]}),leftElementClassName:"bsc-justify-center"},Et=()=>m.jsxs(m.Fragment,{children:[d.currentSelector===Z.DaySelector&&Xe&&d.dateInitialized&&g.current&&m.jsx(Gh,{selectedDate:d.selectedDate,viewDate:d.currentViewDate,locale:g.current,showTimeSelector:u===we.DateTime,selectableDate:x,isValidDate:D,dispatcher:S,onChange:P}),d.currentSelector===Z.MonthSelector&&Xe&&d.dateInitialized&&g.current&&m.jsx(Qh,{viewDate:d.currentViewDate,locale:g.current,dateSelection:u,dispatcher:S}),d.currentSelector===Z.YearSelector&&Xe&&d.dateInitialized&&g.current&&m.jsx(np,{viewDate:d.currentViewDate,locale:g.current,dispatcher:S}),d.currentSelector===Z.TimeSelector&&ln&&d.dateInitialized&&g.current&&m.jsx(rp,{viewDate:d.currentViewDate,showDateSelector:u===we.DateTime,locale:g.current,timeFormat:d.timeFormat,timeConstraints:f,onChange:P,dispatcher:S}),d.currentSelector===Z.DateRangeSelector&&Xe&&d.dateInitialized&&g.current&&m.jsx(tp,{viewDate:d.currentViewDate,selectedStartDate:d.selectedStartDate,selectedEndDate:d.selectedEndDate,locale:g.current,onChange:P,dispatcher:S})]}),fn={label:r,readOnly:t,allowClear:i,getValue:dt,onFocus:O,onInput:j,iconPosition:b,iconElement:ht.rightElement||ht.leftElement},gr=K||((G,be)=>m.jsx(m.Fragment,{children:be})),St=Ge("bsc-text-left",{"bsc-bg-gray-2":t,"bsc-bg-white":!t},"dark:bsc-bg-mono-dark-1 bc-dt-input",s);return m.jsx(un.Provider,{value:he.current,children:m.jsxs("div",{className:"bc-date-time",children:[r&&m.jsx("label",{className:"bc-dt-label dark:bsc-text-mono-light-1",children:r}),L?m.jsxs(m.Fragment,{children:[m.jsx(Kt,{value:dt(),readOnly:t,inputMode:"none",className:St,onFocus:O,onElementCreate:G=>Ae(G,!1),...ht}),m.jsx(ao,{visible:W,target:ee,hidden:ft,unmountWhenHidden:!0,children:Et()})]}):m.jsxs(m.Fragment,{children:[m.jsx(Gr,{props:fn,template:gr,children:a===!1?m.jsx(Kt,{value:dt(),readOnly:t,className:St,onFocus:O,onBlur:M,onInput:j,onElementCreate:G=>Ae(G,!1),...ht}):m.jsx(fo,{value:dt(),readOnly:t,className:St,format:F,isInputValid:k,onFocus:O,onBlur:M,onChange:V,onElementCreate:G=>Ae(G,!0),...ht})}),m.jsx(so,{visible:W,target:ee,shouldTargetCloseOverlay:!1,shouldScrollCloseOverlay:!0,shouldCheckZIndex:!0,shouldRemainOnScreen:!0,hidden:ft,isClickedWithin:A,unmountWhenHidden:!0,children:Et()})]})]})})},wp="";le.Button=We,le.ContentEditableInput=Kt,le.DateTime=ip,le.FormattedInput=fo,le.MobileOverlayPanel=ao,le.OverlayPanel=so,le.applyBeeSoftTheme=Dd,le.createBeeSoftTheme=Od,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
|
package/dist/index.umd.js.gz
CHANGED
|
Binary file
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.bsc-fixed{position:fixed}.bsc-bottom-0{bottom:0}.bsc-left-0{left:0}.bsc-top-0{top:0}.bsc-col-span-3{grid-column:span 3 / span 3}.bsc-col-span-4{grid-column:span 4 / span 4}.bsc-ml-2{margin-left:.5rem}.bsc-mr-2{margin-right:.5rem}.bsc-flex{display:flex}.bsc-grid{display:grid}.bsc-h-3\/4{height:75%}.bsc-h-full{height:100%}.bsc-h-screen{height:100vh}.bsc-w-24{width:6rem}.bsc-w-full{width:100%}.bsc-min-w-\[329px\]{min-width:329px}.bsc-flex-shrink{flex-shrink:1}.bsc-flex-grow{flex-grow:1}.bsc-cursor-not-allowed{cursor:not-allowed}.bsc-cursor-pointer{cursor:pointer}.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-row{flex-direction:row}.bsc-flex-col{flex-direction:column}.bsc-items-center{align-items:center}.bsc-justify-center{justify-content:center}.bsc-gap-3{gap:.75rem}.bsc-gap-4{gap:1rem}.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-whitespace-pre{white-space:pre}.bsc-rounded-md{border-radius:.375rem}.bsc-border{border-width:1px}.bsc-border-r{border-right-width:1px}.bsc-border-solid{border-style:solid}.\!bsc-border-none{border-style:none!important}.\!bsc-border-error{border-color:var(--theme-bsc-error)!important}.\!bsc-border-transparent{border-color:transparent!important}.bsc-border-black{--tw-border-opacity: 1;border-color:rgb(0 0 0 / var(--tw-border-opacity))}.bsc-border-gray-3{border-color:var(--theme-bsc-gray-3)}.bsc-bg-error{background-color:var(--theme-bsc-error)}.bsc-bg-gray-2{background-color:var(--theme-bsc-gray-2)}.bsc-bg-gray-3{background-color:var(--theme-bsc-gray-3)}.bsc-bg-info{background-color:var(--theme-bsc-info)}.bsc-bg-mono-dark-1{background-color:var(--theme-bsc-mono-dark-1)}.bsc-bg-primary-1{background-color:var(--theme-bsc-primary-1)}.bsc-bg-primary-2{background-color:var(--theme-bsc-primary-2)}.bsc-bg-primary-3{background-color:var(--theme-bsc-primary-3)}.bsc-bg-primary-5{background-color:var(--theme-bsc-primary-5)}.bsc-bg-success{background-color:var(--theme-bsc-success)}.bsc-bg-transparent{background-color:transparent}.bsc-bg-warning{background-color:var(--theme-bsc-warning)}.bsc-bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bsc-p-2{padding:.5rem}.bsc-p-4{padding:1rem}.bsc-px-2{padding-left:.5rem;padding-right:.5rem}.bsc-py-1{padding-top:.25rem;padding-bottom:.25rem}.bsc-pb-2{padding-bottom:.5rem}.bsc-pb-8{padding-bottom:2rem}.bsc-pl-4{padding-left:1rem}.bsc-pr-2{padding-right:.5rem}.bsc-pr-4{padding-right:1rem}.bsc-text-left{text-align:left}.bsc-text-center{text-align:center}.\!bsc-text-sm{font-size:.875rem!important;line-height:1.25rem!important}.bsc-text-sm{font-size:.875rem;line-height:1.25rem}.bsc-text-xs{font-size:.75rem;line-height:1rem}.bsc-font-bold{font-weight:700}.bsc-text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.bsc-text-error{color:var(--theme-bsc-error)}.bsc-text-gray-2{color:var(--theme-bsc-gray-2)}.bsc-text-gray-3{color:var(--theme-bsc-gray-3)}.bsc-text-gray-4{color:var(--theme-bsc-gray-4)}.bsc-text-mono-dark-1{color:var(--theme-bsc-mono-dark-1)}.bsc-text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.bsc-shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.bsc-shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji",sans-serif}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace,sans-serif;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:var(--theme-bsc-gray-4)}input::placeholder,textarea::placeholder{opacity:1;color:var(--theme-bsc-gray-4)}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}:root{--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: #eeeeee;--theme-bsc-mono-dark-1: #222222;--theme-bsc-mono-dark-2: #3c3c3c;--theme-bsc-mono-dark-3: #4e4e4e;--theme-bsc-mono-light-1: #fefefe;--theme-bsc-mono-light-2: #eeeeee;--theme-bsc-mono-light-3: #cccccc;--theme-bsc-info: #2e7ff8;--theme-bsc-success: #53ae0c;--theme-bsc-warning: #ff6914;--theme-bsc-error: #f01616}.hover\:bsc-bg-gray-4:hover{background-color:var(--theme-bsc-gray-4)}.hover\:bsc-bg-primary-2:hover{background-color:var(--theme-bsc-primary-2)}.focus\:bsc-outline-none:focus{outline:2px solid transparent;outline-offset:2px}:is(.bsc-dark .dark\:bsc-border-t){border-top-width:1px}:is(.bsc-dark .dark\:bsc-border-solid){border-style:solid}:is(.bsc-dark .dark\:bsc-border-mono-light-1){border-color:var(--theme-bsc-mono-light-1)}:is(.bsc-dark .dark\:bsc-border-white){--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}:is(.bsc-dark .dark\:bsc-bg-mono-dark-1){background-color:var(--theme-bsc-mono-dark-1)}:is(.bsc-dark .dark\:bsc-bg-mono-light-1){background-color:var(--theme-bsc-mono-light-1)}:is(.bsc-dark .dark\:bsc-bg-mono-light-3){background-color:var(--theme-bsc-mono-light-3)}:is(.bsc-dark .dark\:bsc-text-mono-dark-1){color:var(--theme-bsc-mono-dark-1)}:is(.bsc-dark .dark\:bsc-text-mono-light-1){color:var(--theme-bsc-mono-light-1)}:is(.bsc-dark .dark\:hover\:bsc-bg-mono-light-1:hover){background-color:var(--theme-bsc-mono-light-1)}:is(.bsc-dark .dark\:hover\:bsc-bg-mono-light-2:hover){background-color:var(--theme-bsc-mono-light-2)}:is(.bsc-dark .dark\:hover\:bsc-text-mono-dark-1:hover){color:var(--theme-bsc-mono-dark-1)}:is(.bsc-dark .dark\:hover\:bsc-text-mono-dark-2:hover){color:var(--theme-bsc-mono-dark-2)}@media not all and (min-width: 640px){.max-sm\:bsc-p-4{padding:1rem}}@media (min-width: 768px){.md\:bsc-p-2{padding:.5rem}}
|
|
1
|
+
*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.bsc-fixed{position:fixed}.bsc-bottom-0{bottom:0}.bsc-left-0{left:0}.bsc-top-0{top:0}.bsc-col-span-3{grid-column:span 3 / span 3}.bsc-col-span-4{grid-column:span 4 / span 4}.bsc-ml-2{margin-left:.5rem}.bsc-mr-2{margin-right:.5rem}.bsc-flex{display:flex}.bsc-grid{display:grid}.bsc-h-3\/4{height:75%}.bsc-h-full{height:100%}.bsc-h-screen{height:100vh}.bsc-w-24{width:6rem}.bsc-w-full{width:100%}.bsc-min-w-\[329px\]{min-width:329px}.bsc-flex-shrink{flex-shrink:1}.bsc-flex-grow{flex-grow:1}.bsc-cursor-not-allowed{cursor:not-allowed}.bsc-cursor-pointer{cursor:pointer}.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-row{flex-direction:row}.bsc-flex-col{flex-direction:column}.bsc-items-center{align-items:center}.bsc-justify-center{justify-content:center}.bsc-gap-3{gap:.75rem}.bsc-gap-4{gap:1rem}.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-whitespace-pre{white-space:pre}.bsc-rounded-md{border-radius:.375rem}.bsc-border{border-width:1px}.bsc-border-r{border-right-width:1px}.bsc-border-solid{border-style:solid}.\!bsc-border-none{border-style:none!important}.\!bsc-border-error{border-color:var(--theme-bsc-error)!important}.\!bsc-border-transparent{border-color:transparent!important}.bsc-border-black{--tw-border-opacity: 1;border-color:rgb(0 0 0 / var(--tw-border-opacity))}.bsc-border-gray-3{border-color:var(--theme-bsc-gray-3)}.bsc-bg-error{background-color:var(--theme-bsc-error)}.bsc-bg-gray-2{background-color:var(--theme-bsc-gray-2)}.bsc-bg-gray-3{background-color:var(--theme-bsc-gray-3)}.bsc-bg-info{background-color:var(--theme-bsc-info)}.bsc-bg-mono-dark-1{background-color:var(--theme-bsc-mono-dark-1)}.bsc-bg-primary-1{background-color:var(--theme-bsc-primary-1)}.bsc-bg-primary-2{background-color:var(--theme-bsc-primary-2)}.bsc-bg-primary-3{background-color:var(--theme-bsc-primary-3)}.bsc-bg-primary-5{background-color:var(--theme-bsc-primary-5)}.bsc-bg-success{background-color:var(--theme-bsc-success)}.bsc-bg-transparent{background-color:transparent}.bsc-bg-warning{background-color:var(--theme-bsc-warning)}.bsc-bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bsc-p-2{padding:.5rem}.bsc-p-4{padding:1rem}.bsc-px-2{padding-left:.5rem;padding-right:.5rem}.bsc-py-1{padding-top:.25rem;padding-bottom:.25rem}.bsc-pb-2{padding-bottom:.5rem}.bsc-pb-8{padding-bottom:2rem}.bsc-pl-4{padding-left:1rem}.bsc-pr-2{padding-right:.5rem}.bsc-pr-4{padding-right:1rem}.bsc-text-left{text-align:left}.bsc-text-center{text-align:center}.\!bsc-text-sm{font-size:.875rem!important;line-height:1.25rem!important}.bsc-text-sm{font-size:.875rem;line-height:1.25rem}.bsc-text-xs{font-size:.75rem;line-height:1rem}.bsc-font-bold{font-weight:700}.bsc-text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.bsc-text-error{color:var(--theme-bsc-error)}.bsc-text-gray-2{color:var(--theme-bsc-gray-2)}.bsc-text-gray-3{color:var(--theme-bsc-gray-3)}.bsc-text-gray-4{color:var(--theme-bsc-gray-4)}.bsc-text-mono-dark-1{color:var(--theme-bsc-mono-dark-1)}.bsc-text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.bsc-shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.bsc-shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}: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: #eeeeee;--theme-bsc-mono-dark-1: #222222;--theme-bsc-mono-dark-2: #3c3c3c;--theme-bsc-mono-dark-3: #4e4e4e;--theme-bsc-mono-light-1: #fefefe;--theme-bsc-mono-light-2: #eeeeee;--theme-bsc-mono-light-3: #cccccc;--theme-bsc-info: #2e7ff8;--theme-bsc-success: #53ae0c;--theme-bsc-warning: #ff6914;--theme-bsc-error: #f01616}.hover\:bsc-bg-gray-4:hover{background-color:var(--theme-bsc-gray-4)}.hover\:bsc-bg-primary-2:hover{background-color:var(--theme-bsc-primary-2)}.focus\:bsc-outline-none:focus{outline:2px solid transparent;outline-offset:2px}:is(.bsc-dark .dark\:bsc-border-t){border-top-width:1px}:is(.bsc-dark .dark\:bsc-border-solid){border-style:solid}:is(.bsc-dark .dark\:bsc-border-mono-light-1){border-color:var(--theme-bsc-mono-light-1)}:is(.bsc-dark .dark\:bsc-border-white){--tw-border-opacity: 1;border-color:rgb(255 255 255 / var(--tw-border-opacity))}:is(.bsc-dark .dark\:bsc-bg-mono-dark-1){background-color:var(--theme-bsc-mono-dark-1)}:is(.bsc-dark .dark\:bsc-bg-mono-light-1){background-color:var(--theme-bsc-mono-light-1)}:is(.bsc-dark .dark\:bsc-bg-mono-light-3){background-color:var(--theme-bsc-mono-light-3)}:is(.bsc-dark .dark\:bsc-text-mono-dark-1){color:var(--theme-bsc-mono-dark-1)}:is(.bsc-dark .dark\:bsc-text-mono-light-1){color:var(--theme-bsc-mono-light-1)}:is(.bsc-dark .dark\:hover\:bsc-bg-mono-light-1:hover){background-color:var(--theme-bsc-mono-light-1)}:is(.bsc-dark .dark\:hover\:bsc-bg-mono-light-2:hover){background-color:var(--theme-bsc-mono-light-2)}:is(.bsc-dark .dark\:hover\:bsc-text-mono-dark-1:hover){color:var(--theme-bsc-mono-dark-1)}:is(.bsc-dark .dark\:hover\:bsc-text-mono-dark-2:hover){color:var(--theme-bsc-mono-dark-2)}@media not all and (min-width: 640px){.max-sm\:bsc-p-4{padding:1rem}}@media (min-width: 768px){.md\:bsc-p-2{padding:.5rem}}
|
package/dist/style.css.gz
CHANGED
|
Binary file
|