beesoft-components 0.3.5 → 0.3.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
|
@@ -7861,7 +7861,7 @@ const lp = (e, t) => {
|
|
|
7861
7861
|
}) : d.selectedDate.toLocaleString((Jt = w.current) == null ? void 0 : Jt.code) : "";
|
|
7862
7862
|
}
|
|
7863
7863
|
}, rt = u === we.DateTime || u === we.DateOnly || u === we.DateRange, pt = u === we.DateTime || u === we.TimeOnly, vt = b === ir.None ? {} : b === ir.Right ? {
|
|
7864
|
-
rightElement: /* @__PURE__ */ m.jsxs("div", { className: "bsc-flex bsc-text-
|
|
7864
|
+
rightElement: /* @__PURE__ */ m.jsxs("div", { className: "bsc-flex bsc-text-black dark:bsc-text-mono-light-1", children: [
|
|
7865
7865
|
i && !t && /* @__PURE__ */ m.jsx("div", { children: /* @__PURE__ */ m.jsx(na, { size: 16, className: "bsc-cursor-pointer bsc-text-sm", onClick: E }) }),
|
|
7866
7866
|
/* @__PURE__ */ m.jsx("div", { className: "bsc-ml-2", children: h || /* @__PURE__ */ m.jsx(
|
|
7867
7867
|
oa,
|
|
@@ -7874,7 +7874,7 @@ const lp = (e, t) => {
|
|
|
7874
7874
|
] }),
|
|
7875
7875
|
rightElementClassName: "bsc-justify-center"
|
|
7876
7876
|
} : {
|
|
7877
|
-
leftElement: /* @__PURE__ */ m.jsxs("div", { className: "bsc-flex bsc-text-
|
|
7877
|
+
leftElement: /* @__PURE__ */ m.jsxs("div", { className: "bsc-flex bsc-text-black dark:bsc-text-mono-light-1", children: [
|
|
7878
7878
|
/* @__PURE__ */ m.jsx("div", { className: "bsc-mr-2", children: h || /* @__PURE__ */ m.jsx(
|
|
7879
7879
|
oa,
|
|
7880
7880
|
{
|
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 Gr,Ua;function ih(){if(Ua)return Gr;Ua=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 Gr=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 w=0;w<l.length;w++)r.call(s,l[w])&&(u[l[w]]=s[l[w]])}}return u},Gr}var Kr,Ha;function Qr(){if(Ha)return Kr;Ha=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Kr=e,Kr}var Xr,Wa;function Va(){return Wa||(Wa=1,Xr=Function.call.bind(Object.prototype.hasOwnProperty)),Xr}var Zr,za;function sh(){if(za)return Zr;za=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Qr(),r={},n=Va();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 w=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 w.name="Invariant Violation",w}h=i[f](o,f,u,s,null,t)}catch(E){h=E}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 g=l?l():"";e("Failed "+s+" type: "+h.message+(g??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Zr=a,Zr}var Jr,qa;function uh(){if(qa)return Jr;qa=1;var e=Ya(),t=ih(),r=Qr(),n=Va(),a=sh(),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 Jr=function(s,u){var l=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function h(v){var P=v&&(l&&v[l]||v[f]);if(typeof P=="function")return P}var w="<<anonymous>>",g={array:R("array"),bigint:R("bigint"),bool:R("boolean"),func:R("function"),number:R("number"),object:R("object"),string:R("string"),symbol:R("symbol"),any:H(),arrayOf:G,element:V(),elementType:y(),instanceOf:U,node:ue(),objectOf:Q,oneOf:ee,oneOfType:X,shape:se,exact:T};function E(v,P){return v===P?v!==0||1/v===1/P:v!==v&&P!==P}function D(v,P){this.message=v,this.data=P&&typeof P=="object"?P:{},this.stack=""}D.prototype=Error.prototype;function x(v){if(process.env.NODE_ENV!=="production")var P={},d=0;function C(z,O,k,_,M,$,Pe){if(_=_||w,$=$||k,Pe!==r){if(u){var S=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 S.name="Invariant Violation",S}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ke=_+":"+k;!P[ke]&&d<3&&(i("You are manually calling a React.PropTypes validation function for the `"+$+"` prop on `"+_+"`. 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."),P[ke]=!0,d++)}}return O[k]==null?z?O[k]===null?new D("The "+M+" `"+$+"` is marked as required "+("in `"+_+"`, but its value is `null`.")):new D("The "+M+" `"+$+"` is marked as required in "+("`"+_+"`, but its value is `undefined`.")):null:v(O,k,_,M,$)}var L=C.bind(null,!1);return L.isRequired=C.bind(null,!0),L}function R(v){function P(d,C,L,z,O,k){var _=d[C],M=F(_);if(M!==v){var $=te(_);return new D("Invalid "+z+" `"+O+"` of type "+("`"+$+"` supplied to `"+L+"`, expected ")+("`"+v+"`."),{expectedType:v})}return null}return x(P)}function H(){return x(o)}function G(v){function P(d,C,L,z,O){if(typeof v!="function")return new D("Property `"+O+"` of component `"+L+"` has invalid PropType notation inside arrayOf.");var k=d[C];if(!Array.isArray(k)){var _=F(k);return new D("Invalid "+z+" `"+O+"` of type "+("`"+_+"` supplied to `"+L+"`, expected an array."))}for(var M=0;M<k.length;M++){var $=v(k,M,L,z,O+"["+M+"]",r);if($ instanceof Error)return $}return null}return x(P)}function V(){function v(P,d,C,L,z){var O=P[d];if(!s(O)){var k=F(O);return new D("Invalid "+L+" `"+z+"` of type "+("`"+k+"` supplied to `"+C+"`, expected a single ReactElement."))}return null}return x(v)}function y(){function v(P,d,C,L,z){var O=P[d];if(!e.isValidElementType(O)){var k=F(O);return new D("Invalid "+L+" `"+z+"` of type "+("`"+k+"` supplied to `"+C+"`, expected a single ReactElement type."))}return null}return x(v)}function U(v){function P(d,C,L,z,O){if(!(d[C]instanceof v)){var k=v.name||w,_=de(d[C]);return new D("Invalid "+z+" `"+O+"` of type "+("`"+_+"` supplied to `"+L+"`, expected ")+("instance of `"+k+"`."))}return null}return x(P)}function ee(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 P(d,C,L,z,O){for(var k=d[C],_=0;_<v.length;_++)if(E(k,v[_]))return null;var M=JSON.stringify(v,function(Pe,S){var ke=te(S);return ke==="symbol"?String(S):S});return new D("Invalid "+z+" `"+O+"` of value `"+String(k)+"` "+("supplied to `"+L+"`, expected one of "+M+"."))}return x(P)}function Q(v){function P(d,C,L,z,O){if(typeof v!="function")return new D("Property `"+O+"` of component `"+L+"` has invalid PropType notation inside objectOf.");var k=d[C],_=F(k);if(_!=="object")return new D("Invalid "+z+" `"+O+"` of type "+("`"+_+"` supplied to `"+L+"`, expected an object."));for(var M in k)if(n(k,M)){var $=v(k,M,L,z,O+"."+M,r);if($ instanceof Error)return $}return null}return x(P)}function X(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 P=0;P<v.length;P++){var d=v[P];if(typeof d!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+A(d)+" at index "+P+"."),o}function C(L,z,O,k,_){for(var M=[],$=0;$<v.length;$++){var Pe=v[$],S=Pe(L,z,O,k,_,r);if(S==null)return null;S.data&&n(S.data,"expectedType")&&M.push(S.data.expectedType)}var ke=M.length>0?", expected one of type ["+M.join(", ")+"]":"";return new D("Invalid "+k+" `"+_+"` supplied to "+("`"+O+"`"+ke+"."))}return x(C)}function ue(){function v(P,d,C,L,z){return W(P[d])?null:new D("Invalid "+L+" `"+z+"` supplied to "+("`"+C+"`, expected a ReactNode."))}return x(v)}function ie(v,P,d,C,L){return new D((v||"React class")+": "+P+" type `"+d+"."+C+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+L+"`.")}function se(v){function P(d,C,L,z,O){var k=d[C],_=F(k);if(_!=="object")return new D("Invalid "+z+" `"+O+"` of type `"+_+"` "+("supplied to `"+L+"`, expected `object`."));for(var M in v){var $=v[M];if(typeof $!="function")return ie(L,z,O,M,te($));var Pe=$(k,M,L,z,O+"."+M,r);if(Pe)return Pe}return null}return x(P)}function T(v){function P(d,C,L,z,O){var k=d[C],_=F(k);if(_!=="object")return new D("Invalid "+z+" `"+O+"` of type `"+_+"` "+("supplied to `"+L+"`, expected `object`."));var M=t({},d[C],v);for(var $ in M){var Pe=v[$];if(n(v,$)&&typeof Pe!="function")return ie(L,z,O,$,te(Pe));if(!Pe)return new D("Invalid "+z+" `"+O+"` key `"+$+"` supplied to `"+L+"`.\nBad object: "+JSON.stringify(d[C],null," ")+`
|
|
51
|
-
Valid keys: `+JSON.stringify(Object.keys(v),null," "));var S=Pe(k,$,L,z,O+"."+$,r);if(S)return S}return null}return x(P)}function W(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(W);if(v===null||s(v))return!0;var P=h(v);if(P){var d=P.call(v),C;if(P!==v.entries){for(;!(C=d.next()).done;)if(!W(C.value))return!1}else for(;!(C=d.next()).done;){var L=C.value;if(L&&!W(L[1]))return!1}}else return!1;return!0;default:return!1}}function q(v,P){return v==="symbol"?!0:P?P["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&P instanceof Symbol:!1}function F(v){var P=typeof v;return Array.isArray(v)?"array":v instanceof RegExp?"object":q(P,v)?"symbol":P}function te(v){if(typeof v>"u"||v===null)return""+v;var P=F(v);if(P==="object"){if(v instanceof Date)return"date";if(v instanceof RegExp)return"regexp"}return P}function A(v){var P=te(v);switch(P){case"array":case"object":return"an "+P;case"boolean":case"date":case"regexp":return"a "+P;default:return P}}function de(v){return!v.constructor||!v.constructor.name?w:v.constructor.name}return g.checkPropTypes=a,g.resetWarningCache=a.resetWarningCache,g.PropTypes=g,g},Jr}var en,Ba;function ch(){if(Ba)return en;Ba=1;var e=Qr();function t(){}function r(){}return r.resetWarningCache=t,en=function(){function n(o,s,u,l,f,h){if(h!==e){var w=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 w.name="Invariant Violation",w}}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},en}if(process.env.NODE_ENV!=="production"){var lh=Ya(),fh=!0;Br.exports=uh()(lh.isElement,fh)}else Br.exports=ch()();var dh=Br.exports;const J=Xe(dh),Ga={disabled:!1};var hh=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 Ka=p.createContext(null);var ph=function(t){return t.scrollTop},Ft="unmounted",it="exited",st="entering",gt="entered",tn="exiting",Ke=function(e){nh(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=it,i.appearStatus=st):u=gt:n.unmountOnExit||n.mountOnEnter?u=Ft:u=it,i.state={status:u},i.nextCallback=null,i}t.getDerivedStateFromProps=function(a,i){var o=a.in;return o&&i.status===Ft?{status:it}: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!==st&&o!==gt&&(i=st):(o===st||o===gt)&&(i=tn)}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===st){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:He.findDOMNode(this);o&&ph(o)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===it&&this.setState({status:Ft})},r.performEnter=function(a){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:a,u=this.props.nodeRef?[s]:[He.findDOMNode(this),s],l=u[0],f=u[1],h=this.getTimeouts(),w=s?h.appear:h.enter;if(!a&&!o||Ga.disabled){this.safeSetState({status:gt},function(){i.props.onEntered(l)});return}this.props.onEnter(l,f),this.safeSetState({status:st},function(){i.props.onEntering(l,f),i.onTransitionEnd(w,function(){i.safeSetState({status:gt},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:He.findDOMNode(this);if(!i||Ga.disabled){this.safeSetState({status:it},function(){a.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:tn},function(){a.props.onExiting(s),a.onTransitionEnd(o.exit,function(){a.safeSetState({status:it},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:He.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===Ft)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=rh(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return p.createElement(Ka.Provider,{value:null},typeof o=="function"?o(a,s):p.cloneElement(p.Children.only(o),s))},t}(p.Component);Ke.contextType=Ka,Ke.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=hh;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 yt(){}Ke.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:yt,onEntering:yt,onEntered:yt,onExit:yt,onExiting:yt,onExited:yt},Ke.UNMOUNTED=Ft,Ke.EXITED=it,Ke.ENTERING=st,Ke.ENTERED=gt,Ke.EXITING=tn;const vh=Ke,mh=({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 w=r||{transition:`opacity ${t}ms ${a}`,opacity:0},g=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(vh,{in:e,timeout:t,onEntering:s,onEntered:u,onExit:l,onExited:f,unmountOnExit:o,children:E=>h({state:E,defaultStyle:w,transitionStyles:g})})};var Qa=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(Qa||{}),Xa=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(Xa||{});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 Za=({visible:e,target:t,targetPosition:r=Qa.BottomLeft,elementAlignment:n=Xa.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:w="linear",shown:g,hidden:E,isClickedWithin:D,markupCreated:x,children:R})=>{const[H,G]=p.useState(-1),[V,y]=p.useState(e),[U,ee]=p.useState(!1),Q=p.useRef(!1),X=p.useRef(100),ue=p.useRef({left:0,top:0,width:0}),ie=p.useRef(),se=p.useRef(),T=p.useRef(),W=p.useRef(),q=p.useRef(),F=p.useRef();p.useEffect(()=>(u===!0&&(F.current=new ResizeObserver(A)),()=>{var O,k;u===!0&&(se.current&&((O=F.current)==null||O.unobserve(se.current)),(k=F.current)==null||k.disconnect())}),[u]),p.useEffect(()=>{if(t&&(ie.current=te(t),o&&(T.current=Oa(ie.current,{overflow:"scroll, auto",overflowX:"scroll, auto",overflowY:"scroll, auto"}),T.current.tagName.toLowerCase()==="html"&&(T.current=document))),s){const O=hd("zIndex",k=>parseInt(k)>=100).map(k=>parseInt(k));O.length>0&&(X.current=Math.max(...O)+1)}e!==void 0&&y(e)},[t,e,o,s]);const te=O=>O.target?O.target:O,A=O=>{if(se.current){const k=_e.getScreenDimensions(),_=O[O.length-1].target,M=_.getBoundingClientRect(),$=_e.determineOffScreenLocation(M);if($){if(ie.current&&_e.canPositionElementOnScreen(_,ie.current)){const Pe=_e.positionElementToTargetOnScreen(se.current,ie.current,n,r);ue.current={...ue.current,...Pe}}else $.right?ue.current.left=k.width-M.width:$.left&&(ue.current.left=0),$.bottom?ue.current.top=k.height-M.height:$.top&&(ue.current.top=0);de()}}},de=Rt(()=>{Q.current=!Q.current,ee(Q.current)},20),v=()=>{G(X.current)},P=()=>{if(!se.current)return;g==null||g();let O;!a&&ie.current&&(O=[ie.current]);const k=_=>{_?D==null||D():y(!1)};W.current=eh(se.current,k,O),o&&(q.current=Rc(_=>se.current&&cd(_,se.current)&&y(!1),100,{leading:!0}),T.current&&T.current.addEventListener("scroll",q.current))},d=()=>{T.current&&q.current&&(T.current.removeEventListener("scroll",q.current),q.current=void 0),W.current&&th(W.current)},C=()=>{G(-1),E==null||E()},L=O=>{var k,_;if(se.current=O,x==null||x(O),ie.current){const M=_e.positionElementToTarget(se.current,ie.current,n,r);ue.current={...M,width:ie.current.offsetWidth}}u===!0&&((k=F.current)==null||k.unobserve(se.current),(_=F.current)==null||_.observe(se.current))},z=p.useMemo(()=>{const O={top:`${ue.current.top}px`,left:`${ue.current.left}px`,zIndex:H};return i&&(O.width=`${ue.current.width}px`),O},[U,H,i]);return m.jsx(mh,{start:V,timeout:f,showTransitionOptions:h,hideTransitionOptions:w,onEntering:v,onEntered:P,onExit:d,onExited:C,unmountOnExit:l,children:({state:O,defaultStyle:k,transitionStyles:_})=>m.jsx("div",{className:"bsc-fixed bsc-bg-white dark:bsc-bg-mono-dark-1 bsc-border bsc-border-solid dark:bsc-text-mono-light-1 dark:bsc-border-mono-light-1 bsc-shadow",style:{...z,...k,..._[O]},ref:M=>M&&L(M),children:R})})};let ir;const gh=new Uint8Array(16);function yh(){if(!ir&&(ir=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ir))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ir(gh)}const je=[];for(let e=0;e<256;++e)je.push((e+256).toString(16).slice(1));function bh(e,t=0){return je[e[t+0]]+je[e[t+1]]+je[e[t+2]]+je[e[t+3]]+"-"+je[e[t+4]]+je[e[t+5]]+"-"+je[e[t+6]]+je[e[t+7]]+"-"+je[e[t+8]]+je[e[t+9]]+"-"+je[e[t+10]]+je[e[t+11]]+je[e[t+12]]+je[e[t+13]]+je[e[t+14]]+je[e[t+15]]}const Ja={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function wh(e,t,r){if(Ja.randomUUID&&!t&&!e)return Ja.randomUUID();e=e||{};const n=e.random||(e.rng||yh)();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 bh(n)}class sr{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 Th{constructor(t,r){Y(this,"instanceCollection");Y(this,"formatPartList");Y(this,"inputSlotCollection");Y(this,"currentPartIndex",0);Y(this,"currentCursorPosition",0);Y(this,"inputElement");Y(this,"inputSelection",null);Y(this,"inputRange");Y(this,"textNode");this.instanceCollection=bt.getInstance(),this.formatPartList=sr.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 xh{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 Ph{constructor(t){Y(this,"inputSlots");this.inputSlots=xh.create(sr.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 bt{static getInstance(){return this.instance||(this.instance=new Eh),this.instance}}Y(bt,"instance");class Eh{constructor(){Y(this,"navigatorInstances");Y(this,"inputSlotInstances");this.navigatorInstances={},this.inputSlotInstances={}}getNavigatorInstance(t,r){return this.navigatorInstances[t]||(this.navigatorInstances[t]=new Th(r,t)),this.navigatorInstances[t]}getInputSlotInstance(t,r){return this.inputSlotInstances[t]||(this.inputSlotInstances[t]=new Ph(r)),this.inputSlotInstances[t]}removeInstances(t){this.navigatorInstances[t]&&delete this.navigatorInstances[t],this.inputSlotInstances[t]&&delete this.inputSlotInstances[t]}}class rn{constructor(t,r){Y(this,"instanceCollection");Y(this,"formatPartList");Y(this,"inputSlotCollection");Y(this,"inputElement");this.instanceCollection=bt.getInstance(),this.formatPartList=sr.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 eo{constructor(){Y(this,"numberKeys",["0","1","2","3","4","5","6","7","8","9"]);Y(this,"movementKeys",["ArrowLeft","ArrowRight","Home","End"]);Y(this,"editingKeys",["Backspace","Delete"]);Y(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 Sh{constructor(t){Y(this,"_currentIndex",0);Y(this,"index",0);Y(this,"formatParts");this.formatParts=sr.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 to{constructor(t,r){Y(this,"instanceCollection");Y(this,"inputSlotCollection");Y(this,"formatNavigator");Y(this,"keyTypeChecker");Y(this,"formatRenderer");Y(this,"formatPartList");this.format=t,this.instanceCollection=bt.getInstance(),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.keyTypeChecker=new eo,this.formatRenderer=new rn(t,r),this.formatPartList=new Sh(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 Ch{constructor(t,r){Y(this,"instanceCollection");Y(this,"formatNavigator");Y(this,"ruleProcessor");Y(this,"keyTypeChecker");Y(this,"formatRenderer");this.format=t,this.instanceCollection=bt.getInstance(),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.ruleProcessor=new to(t,r),this.keyTypeChecker=new eo,this.formatRenderer=new rn(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 Dh{constructor(t,r=""){Y(this,"instanceId");Y(this,"instanceCollection");Y(this,"keyProcessor");Y(this,"formatNavigator");Y(this,"formatRenderer");Y(this,"inputSlotCollection");Y(this,"inputRuleProcessor");Y(this,"previousOutputValue","");Y(this,"inputElementSet",!1);Y(this,"isInputFocused",!1);Y(this,"inputElement");Y(this,"onFormatChange");this.inputValue=r,this.instanceId=wh(),this.instanceCollection=bt.getInstance(),this.keyProcessor=new Ch(t,this.instanceId),this.formatNavigator=this.instanceCollection.getNavigatorInstance(this.instanceId,t),this.formatRenderer=new rn(t,this.instanceId),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(this.instanceId,t),this.inputRuleProcessor=new to(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 Oh=(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:w=!1,allowSingleLineScroll:g=!1,isInputValid:E,onChange:D,onFocus:x,onBlur:R,onElementCreate:H,onLeftElementClick:G,onRightElementClick:V}=e,[y,U]=p.useState(!0),ee=p.useRef(),Q=p.useRef(),X=p.useRef();p.useEffect(()=>()=>{var A;(A=X.current)==null||A.dispose()},[]),p.useEffect(()=>{var A;(A=X.current)==null||A.inputValuePassed(r)},[r]),p.useEffect(()=>{var A,de,v;(A=X.current)==null||A.dispose(),n&&(X.current=new Dh(n,r),Q.current&&((de=X.current)==null||de.inputElementCreated(Q.current)),(v=X.current)==null||v.registerFormatChangeEvent(ue))},[n]);const ue=p.useCallback(A=>{E?E(A)?(U(!0),D==null||D(A)):U(!1):D==null||D(A)},[D]),ie=p.useCallback(A=>{var de;(de=X.current)==null||de.inputFocused(),x==null||x(A)},[x]),se=p.useCallback(A=>{var de;(de=X.current)==null||de.inputBlurred(),R==null||R(A)},[R]),T=p.useCallback(()=>{var A;(A=X.current)==null||A.mouseUpHandler()},[]),W=p.useCallback(A=>{var de;(de=X.current)==null||de.keyDownHandler(A)},[]),q=p.useCallback(A=>{var de,v,P,d,C,L,z,O,k;(v=(de=ee.current)==null?void 0:de.inputElement)==null||v.removeEventListener("keydown",W),(d=(P=ee.current)==null?void 0:P.inputElement)==null||d.removeEventListener("mouseup",T),ee.current=A,(L=(C=ee.current)==null?void 0:C.inputElement)==null||L.addEventListener("keydown",W),(O=(z=ee.current)==null?void 0:z.inputElement)==null||O.addEventListener("mouseup",T),Q.current=(k=ee.current)==null?void 0:k.inputElement},[]),F=p.useCallback(()=>{var A;(A=ee.current)==null||A.focus()},[]);p.useImperativeHandle(t,()=>({focus:F}));const te=Ze(l,{"!bsc-border-error":!y});return m.jsx(Lr,{ref:A=>A&&q(A),readOnly:a,debounceTime:i,fillContainer:o,leftElement:s,rightElement:u,className:te,leftElementClassName:f,rightElementClassName:h,isSingleLine:w,allowSingleLineScroll:g,onFocus:ie,onBlur:se,onElementCreate:H,onLeftElementClick:G,onRightElementClick:V})},ro=p.forwardRef(Oh),nn=p.createContext(void 0);function no(e,t,r=!0){var w,g;const n=va(e),a=ca(e),i=Ul(e);let o=Yr(a)-(((w=t.options)==null?void 0:w.weekStartsOn)||0);o=o===-1?6:o;const s=Yr(i)-(((g=t.options)==null?void 0:g.weekStartsOn)||0),u=Yc({start:a,end:i}),l=n+o>35?6:5,f=ao(l,7,{dayValue:null,isCurrent:!0});let h=1;for(let E=0,D=l;E<D;E++){for(let x=E>0?0:o;x<7;x++){const R=u[h-1];if(R.setHours(e.getHours(),e.getMinutes(),e.getSeconds()),f[E][x].dayValue=R,++h>n)break}if(h>n)break}if(o>0&&r)for(let E=0;E<o;E++)f[0][E].dayValue=Hf(a,o-E),f[0][E].isCurrent=!1;if(s>-1&&r)for(let E=6;E>s;E--)f[l-1][E].dayValue=Bt(i,E-s),f[l-1][E].isCurrent=!1;return f}function ao(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=Nh(r)?r:{...r};o.push(l)}n.push(o)}return n}function Nh(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"||e instanceof Date}function Ih(e){var n;const t=Wf(new Date,((n=e.options)==null?void 0:n.weekStartsOn)||0),r=[];for(let a=0;a<7;a++)r.push(Bt(t,a).toLocaleDateString(e.code,{weekday:"short"}));return r}function _h(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:at(t,n++).toLocaleDateString(e.code,{month:"short"})};return r}function Mh(e,t){const r=new Date(e.getTime()),n=Math.floor(r.getFullYear()/10)*10;r.setFullYear(n);const a=Uc({start:r,end:Gt(r,9)}),i=ao(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 Rh(e){const t=new Date;return t.setHours(0,0,0,0),t.toLocaleTimeString(e.code)}function kh(e,t,r){return e.getTime()>=t.getTime()&&e.getTime()<=r.getTime()}async function oo(e){return(await import(`/node_modules/date-fns/locale/${jh(e)}`)).default}function jh(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 $t(e,t){const r=Vf(e);if(isNaN(r.valueOf())){let n=ze(e,"P pp",new Date,{locale:t});return!isNaN(n.valueOf())||(n=ze(e,"Pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ze(e,"P HH:mm",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ze(e,"P hh:mm a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ze(e,"P HH:mm:ss",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ze(e,"P hh:mm:ss a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ze(e,"P",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ze(e,"P p",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ze(e,"pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ze(e,"p",new Date,{locale:t}),!isNaN(n.valueOf()))?n:void 0}return r}function io(e,t){const r=e.split("-");if(r.length!==2)return;const n=$t(r[0].trim(),t);if(!n)return;const a=$t(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||{}),Yt=(e=>(e[e.Day=0]="Day",e[e.Month=1]="Month",e[e.Year=2]="Year",e[e.Range=3]="Range",e))(Yt||{}),ur=(e=>(e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e))(ur||{}),De=(e=>(e[e.TwelveHour=0]="TwelveHour",e[e.TwentyFourHour=1]="TwentyFourHour",e))(De||{}),ut=(e=>(e[e.Normal=0]="Normal",e[e.Range=1]="Range",e))(ut||{}),cr=(e=>(e[e.Right=0]="Right",e[e.Left=1]="Left",e[e.None=2]="None",e))(cr||{}),K=(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))(K||{});const Lh=(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:Ah(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 Ah(e){return e?Array.isArray(e)?e[0]:e:new Date}const an=({viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:a=ut.Normal,locale:i,onDateSelected:o,selectableDate:s,isValidDate:u,dispatcher:l})=>{var q;const[f,h]=p.useState(!1),[w,g]=p.useState(),[E,D]=p.useState(),[x,R]=p.useState(),[H,G]=p.useState(),V=p.useRef(),y=p.useRef(),U=p.useContext(nn),ee=p.useMemo(()=>U.calendarTemplate,[U.calendarTemplate]),Q=async()=>i||await oo(Da());p.useEffect(()=>{Q().then(F=>{V.current=F,y.current=Ih(V.current),h(!0)}).catch(F=>console.error(F))},[]),p.useEffect(()=>{e&&V.current&&R(no(e,V.current,a===ut.Normal))},[e,f]),p.useEffect(()=>{G(t?new Date(t.getFullYear(),t.getMonth(),t.getDate()):void 0)},[t]),p.useEffect(()=>{g(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(()=>{V.current&&i&&(V.current=i,R(no(e,V.current,a===ut.Normal)))},[i]);const X=F=>{if(a===ut.Normal)l==null||l({type:K.SetSelectedDate,selectedDate:F,viewDate:F}),o==null||o(F);else{if(!o)throw new Error("Range selection mode requires onDateSelected to be set");!r||Hl(F,r)?o(F):r&&!n?o(F,{setEndDate:!0}):r&&n&&o(F)}},ue=F=>(H==null?void 0:H.toLocaleDateString())===F.toLocaleDateString(),ie=F=>{if(w&&E){const te=F.getTime();return te>=w&&te<=E}return!1},se={viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:a,locale:i,weekDays:y.current,monthMatrix:x,selectableDate:s,isValidDate:u,onDateClicked:X,isSelectedDate:ue,isInSelectedDateRange:ie},W=ee||((F,te)=>m.jsx("div",{className:"bsc-w-full bc-dt-calendar",children:te}));return m.jsx(Vr,{props:se,template:W,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,te)=>m.jsx("div",{className:"bsc-text-center bsc-font-bold bc-dt-day-cell",children:F},te)),x==null?void 0:x.map((F,te)=>F.map((A,de)=>{var d,C;const v=A.dayValue!==null&&(s===void 0||s(A.dayValue)),P=Ze("bsc-text-center bsc-py-1",{"bsc-text-gray-3":!A.isCurrent,"bsc-bg-primary-3 dark:bsc-bg-mono-light-1 dark:bsc-text-mono-dark-1":A&&A.dayValue&&(H&&ue(A.dayValue)||w&&!E&&ua(w,A.dayValue)||w&&E&&ie(A.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":A.dayValue&&Uf(A.dayValue)&&!(ue(A.dayValue)||ie(A.dayValue))},"bc-dt-date-cell");return m.jsx("div",{className:P,onClick:()=>A&&A.dayValue&&v&&(u===void 0||u(A.dayValue))&&X(A.dayValue),children:(C=A.dayValue)==null?void 0:C.getDate().toLocaleString((d=V.current)==null?void 0:d.code)},te.toString()+de.toString())}))]})})},lr=({title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:a})=>{const o=p.useContext(nn).dateScrollerTemplate,s={title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:a},l=o||((f,h)=>m.jsx("div",{className:"bsc-w-full bsc-flex bsc-flex-row bsc-py-1 bsc-px-2 bc-dt-scroller",children:h}));return m.jsxs(Vr,{props:s,template:l,children:[m.jsx("div",{className:"bsc-flex-shrink bsc-cursor-pointer bc-dt-scroller-left",children:m.jsx("button",{className:"focus:bsc-outline-none",onClick:n,children:m.jsx(xd,{size:24})})}),m.jsx("div",{className:"bsc-flex-grow bsc-text-center bsc-cursor-pointer bc-dt-scroller-title",onClick:r,children:e}),m.jsx("div",{className:"bsc-flex-shrink bsc-cursor-pointer bc-dt-scroller-right",children:m.jsx("button",{className:"focus:bsc-outline-none",onClick:a,children:m.jsx(Nd,{size:24})})})]})},Fh=({selectedDate:e,viewDate:t,locale:r,showTimeSelector:n,selectableDate:a,isValidDate:i,onChange:o,dispatcher:s})=>{const u=()=>{t&&s({type:K.SetViewDate,viewDate:Sa(t,1)})},l=()=>{t&&s({type:K.SetViewDate,viewDate:at(t,1)})},f=()=>{s({type:K.MonthSelector})},h=()=>{s({type:K.TimeSelector})},w=()=>t?t.toLocaleDateString(r.code,{month:"long",year:"numeric"}):"";return m.jsxs("div",{className:"bsc-p-2 bc-dt-day-selector",children:[m.jsx(lr,{title:w(),scrollerType:Yt.Day,onTitleClicked:f,onMovePrevious:u,onMoveNext:l}),m.jsx(an,{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))||Rh(r)})})]})},$h=({viewDate:e,locale:t,dateSelection:r=we.DateTime,dispatcher:n})=>{const a=p.useRef(_h(t)),i=()=>{const f=Ca(e,1);n({type:K.SetViewDate,viewDate:f})},o=()=>{const f=Gt(e,1);n({type:K.SetViewDate,viewDate:f})},s=f=>{n({type:r!==we.DateRange?K.DaySelector:K.DateRangeSelector,viewDate:id(e,f)})},u=()=>e.toLocaleDateString(t.code,{year:"numeric"}),l=()=>{n({type:K.YearSelector})};return m.jsxs("div",{className:"bsc-p-2 bc-dt-month-selector",style:{minWidth:"20rem"},children:[m.jsx(lr,{title:u(),scrollerType:Yt.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((w,g)=>m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-month-cell",onClick:()=>s(w.monthNumber),children:w.monthName},h.toString()+g.toString())))})]})},Yh=({viewDate:e,selectedStartDate:t,selectedEndDate:r,locale:n,onChange:a,dispatcher:i})=>{const o=at(e,1),s=(w,g)=>{!g||!g.setEndDate?i({type:K.SetSelectedStartDate,selectedStartDate:w}):(i({type:K.SetSelectedEndDate,selectedEndDate:w}),t&&(a==null||a([t,w])))},u=()=>{i({type:K.MonthSelector})},l=()=>`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})} - ${o.toLocaleDateString(n.code,{month:"long"})} ${o.toLocaleDateString(n.code,{year:"numeric"})}`,f=()=>{e&&i({type:K.SetViewDate,viewDate:Sa(e,1)})},h=()=>{e&&i({type:K.SetViewDate,viewDate:at(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(lr,{title:l(),scrollerType:Yt.Range,onTitleClicked:u,onMovePrevious:f,onMoveNext:h})}),m.jsx("div",{className:"bsc-flex-grow",children: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(an,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:ut.Range,onDateSelected:s,locale:n,dispatcher:i})}),m.jsx("div",{className:"bsc-pl-4 bc-dt-range-calendar-2",children:m.jsx(an,{viewDate:o,selectedStartDate:t,selectedEndDate:r,selectionMode:ut.Range,onDateSelected:s,locale:n,dispatcher:i})})]})})]})},Uh=({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(ud(0,59,T=>T.toString().padStart(2,"0"))),f=p.useRef(["AM","PM"]),h=p.useRef(Dc(e)),w=T=>T>11?T-12:T,[g,E]=p.useState(w(e.getHours())),[D,x]=p.useState(e.getMinutes()),[R,H]=p.useState(e.getHours()<=12?0:1),G=p.useRef(e.toLocaleDateString(r.code));p.useEffect(()=>{const T=e.getHours(),W=e.getMinutes();if(T!==g&&E(n===De.TwelveHour?w(T):T),W!==D&&x(W),n===De.TwelveHour){const q=T<=11?0:1;q!==R&&H(q)}},[e]);const V=()=>{var q;const T=((q=a==null?void 0:a.hours)==null?void 0:q.step)||1,W=g<s.current?g+T:0;E(W),X(W,D,R)},y=()=>{var q;const T=((q=a==null?void 0:a.hours)==null?void 0:q.step)||1,W=g>0?g-T:s.current;E(W),X(W,D,R)},U=()=>{var q,F,te;const T=((q=a==null?void 0:a.minutes)==null?void 0:q.step)||1,W=D+T<(((F=a==null?void 0:a.minutes)==null?void 0:F.max)||59)?D+T:((te=a==null?void 0:a.minutes)==null?void 0:te.min)||0;x(W),X(g,W,R)},ee=()=>{var q,F,te;const T=((q=a==null?void 0:a.minutes)==null?void 0:q.step)||1,W=D-T>=(((F=a==null?void 0:a.minutes)==null?void 0:F.min)||0)?D-T:(((te=a==null?void 0:a.minutes)==null?void 0:te.max)||60)-T;x(W),X(g,W,R)},Q=()=>{const T=R===0?1:0;H(T),X(g,D,T)},X=(T,W,q)=>{const F=n===De.TwelveHour&&q===1?T+12:T;h.current.setHours(F,W),o({type:K.SetSelectedDate,selectedDate:h.current,viewDate:h.current}),i==null||i(h.current)},ue=()=>{o({type:K.DaySelector})},ie=Ze("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}),se=Ze("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:"bsc-flex bsc-flex-row bsc-justify-center bsc-p-2 bc-dt-time-selector",style:{minWidth:n===De.TwelveHour?"15rem":"11rem"},children:m.jsxs("div",{className:ie,children:[t&&m.jsx("div",{className:se,onClick:ue,children:G.current}),m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-time-hour-increase",children:m.jsx("button",{className:"focus:bsc-outline-none",onClick:V,children:m.jsx(zr,{})})}),m.jsx("div",{children:" "}),m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-time-minute-increase",children:m.jsx("button",{className:"focus:bsc-outline-none",onClick:U,children:m.jsx(zr,{})})}),n===De.TwelveHour&&m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-time-meridian-increase",children:m.jsx("button",{className:"focus:bsc-outline-none",onClick:Q,children:m.jsx(zr,{})})}),m.jsx("div",{className:"bsc-text-center bc-dt-time-hour-value",children:u.current[g]}),m.jsx("div",{className:"bsc-text-center bc-dt-time-separator",children:":"}),m.jsx("div",{className:"bsc-text-center bc-dt-time-minute-value",children:l.current[D]}),n===De.TwelveHour&&m.jsx("div",{className:"bsc-text-center bc-dt-time-meridian-value",children:f.current[R]}),m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-time-hour-decrease",children:m.jsx("button",{className:"focus:bsc-outline-none",onClick:y,children:m.jsx(qr,{})})}),m.jsx("div",{children:" "}),m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-time-minute-decrease",children:m.jsx("button",{className:"focus:bsc-outline-none",onClick:ee,children:m.jsx(qr,{})})}),n===De.TwelveHour&&m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-time-meridian-decrease",children:m.jsx("button",{className:"focus:bsc-outline-none",onClick:Q,children:m.jsx(qr,{})})})]})})},Hh=({viewDate:e,locale:t,dispatcher:r})=>{const n=Mh(e,t),a=()=>{const u=Ca(e,10);r({type:K.SetViewDate,viewDate:u})},i=()=>{const u=Gt(e,10);r({type:K.SetViewDate,viewDate:u})},o=u=>{const l=parseInt(u);r({type:K.MonthSelector,viewDate:sd(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(lr,{title:s(),scrollerType:Yt.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 Wh{constructor(t,r){Y(this,"dateFormat");Y(this,"timeFormat");Y(this,"use24HourTime");Y(this,"monthPart");Y(this,"dayPart");Y(this,"yearPart");Y(this,"twelveHourPart");Y(this,"twentyFourHourPart");Y(this,"minutePart");Y(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,w=317;u.setHours(l,f,h,w);const g=u.toLocaleTimeString(r);this.use24HourTime=g.startsWith("18"),this.timeFormat=g.replace(`${this.use24HourTime?l:"6"}`,"HH").replace(`${f}`,"MM").replace(`${h}`,"SS").replace(`${w}`,"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 Vh=(e,t)=>{var i;const[r,n]=p.useState(),a=p.useRef();return p.useEffect(()=>{t&&!r&&(a.current=new Wh(e,t),n(a.current.createInputFormat()))},[t]),[r,(i=a.current)==null?void 0:i.is24HourTime]},zh=({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:w=cr.Right,inputElement:g,selectableDate:E,isValidDate:D,onChange:x,calendarTemplate:R,dateScrollerTemplate:H,inputTemplate:G})=>{const[V,y]=p.useState(!1),[U,ee]=p.useState(),[Q,X]=p.useState(),ue=p.useRef(),ie=p.useRef(!1),se=p.useRef(o||Da()),T=p.useRef(),W=p.useRef(),q=p.useRef(),[F,te]=Vh(u,U),A=p.useRef({calendarTemplate:R,dateScrollerTemplate:H});p.useEffect(()=>{se.current&&de(se.current)},[se]),p.useEffect(()=>{o&&de(o)},[o]),p.useEffect(()=>{if(e){const Z=v();C({type:K.InitializeDates,initialDate:Z})}else C({type:K.ClearDates})},[e,T.current]),p.useEffect(()=>{te&&C({type:K.SetTimeFormat,timeFormat:te?De.TwentyFourHour:De.TwelveHour})},[te]),p.useEffect(()=>{g&&(W.current=g)},[g]);const de=Z=>{oo(Z).then(be=>{ee(be.code),T.current=be;const Le=v();C(e||n?{type:K.InitializeDates,initialDate:Array.isArray(Le)?Le[0]:Le}:{type:K.SetViewDate,viewDate:Array.isArray(Le)?Le[0]:Le})}).catch(be=>console.error(be))},v=()=>{const Z=new Date;return Z.setHours(0,0,0,0),e?typeof e=="string"?u!==we.DateRange?$t(e,T.current):io(e,T.current):e:Z},P={currentSelector:u===we.TimeOnly?K.TimeSelector:u===we.DateTime||u===we.DateOnly?K.DaySelector:K.DateRangeSelector,currentViewDate:new Date,timeFormat:De.TwelveHour,dateInitialized:!1},[d,C]=p.useReducer(Lh,P),L=()=>{Fe(),y(!0)},z=p.useMemo(()=>Rt(()=>{y(!1)},250),[]),O=p.useMemo(()=>Rt(()=>{z.cancel()},5),[z]),k=Z=>{const be=Z.target.innerText;$(be)},_=Z=>{if(Z){const be=$t(Z,T.current);return be?D?D(be):!0:!1}else return!0},M=Z=>{$(Z||"")},$=Z=>{const be=u!==we.DateRange?$t(Z,T.current):io(Z,T.current);be?(Array.isArray(be)?(kh(be[0],ca(d.currentViewDate),$c(at(d.currentViewDate,1)))||C({type:K.SetViewDate,viewDate:be[0]}),C({type:K.SetSelectedDateRange,selectedStartDate:be[0],selectedEndDate:be[1]})):C({type:K.SetSelectedDate,selectedDate:be,viewDate:be}),x==null||x(be)):Z===""&&(C({type:K.ClearDates}),x==null||x())},Pe=()=>{Fe(),y(!V)},S=()=>{C({type:K.ClearDates}),y(!1),x==null||x()},ke=(Z,be)=>{(!W.current||ue.current!==be)&&(W.current=Z,ue.current=be,ie.current=!0)},Fe=()=>{(!q.current||ie.current)&&W.current&&(q.current=W.current,X(W.current),ie.current=!1)},$e=()=>{y(!1),C({type:u===we.TimeOnly?K.TimeSelector:u===we.DateTime||u===we.DateOnly?K.DaySelector:K.DateRangeSelector})},wt=()=>{switch(l){case ur.Short:return"short";case ur.Medium:return"medium";case ur.Long:return"long";default:return}},Tt=()=>{var be,Le,hr,Ut,Ht,Et,pr,vr,mr,gr,yr,br;const Z=wt();switch(u){case we.DateTime:return d.selectedDate?Z?d.selectedDate.toLocaleString((be=T.current)==null?void 0:be.code,{dateStyle:Z,timeStyle:Z}):d.selectedDate.toLocaleString((Le=T.current)==null?void 0:Le.code):"";case we.DateOnly:return d.selectedDate?Z?d.selectedDate.toLocaleDateString((hr=T.current)==null?void 0:hr.code,{dateStyle:Z}):d.selectedDate.toLocaleDateString((Ut=T.current)==null?void 0:Ut.code):"";case we.TimeOnly:return d.selectedDate?Z?d.selectedDate.toLocaleTimeString((Ht=T.current)==null?void 0:Ht.code,{timeStyle:Z,hour12:d.timeFormat===De.TwelveHour,hourCycle:d.timeFormat===De.TwentyFourHour?"h23":void 0}):d.selectedDate.toLocaleTimeString((Et=T.current)==null?void 0:Et.code,{hour12:d.timeFormat===De.TwelveHour,hourCycle:d.timeFormat===De.TwentyFourHour?"h23":void 0}):"";case we.DateRange:return d.selectedStartDate&&d.selectedEndDate?Z?`${d.selectedStartDate.toLocaleDateString((pr=T.current)==null?void 0:pr.code,{dateStyle:Z})} - ${d.selectedEndDate.toLocaleDateString((vr=T.current)==null?void 0:vr.code,{dateStyle:Z})}`:`${d.selectedStartDate.toLocaleDateString((mr=T.current)==null?void 0:mr.code)} - ${d.selectedEndDate.toLocaleDateString((gr=T.current)==null?void 0:gr.code)}`:"";default:return d.selectedDate?Z?d.selectedDate.toLocaleString((yr=T.current)==null?void 0:yr.code,{dateStyle:Z,timeStyle:Z}):d.selectedDate.toLocaleString((br=T.current)==null?void 0:br.code):""}},ct=u===we.DateTime||u===we.DateOnly||u===we.DateRange,xt=u===we.DateTime||u===we.TimeOnly,Pt=w===cr.None?{}:w===cr.Right?{rightElement:m.jsxs("div",{className:"bsc-flex bsc-text-primary-1 dark:bsc-text-mono-light-1",children:[i&&!t&&m.jsx("div",{children:m.jsx(Ma,{size:16,className:"bsc-cursor-pointer bsc-text-sm",onClick:S})}),m.jsx("div",{className:"bsc-ml-2",children:h||m.jsx(ka,{size:16,className:t?void 0:"bsc-cursor-pointer",onClick:t?void 0:Pe})})]}),rightElementClassName:"bsc-justify-center"}:{leftElement:m.jsxs("div",{className:"bsc-flex bsc-text-primary-1 dark:bsc-text-mono-light-1",children:[m.jsx("div",{className:"bsc-mr-2",children:h||m.jsx(ka,{size:16,className:t?void 0:"bsc-cursor-pointer",onClick:t?void 0:Pe})}),i&&!t&&m.jsx("div",{children:m.jsx(Ma,{size:16,className:"bsc-cursor-pointer bsc-text-sm",onClick:S})})]}),leftElementClassName:"bsc-justify-center"},on={label:r,readOnly:t,allowClear:i,getValue:Tt,onFocus:L,onInput:k,iconPosition:w,iconElement:Pt.rightElement||Pt.leftElement},sn=G||((Z,be)=>m.jsx(m.Fragment,{children:be})),dr=Ze("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(nn.Provider,{value:A.current,children:m.jsxs("div",{className:"bc-date-time",children:[r&&m.jsx("label",{className:"dark:bsc-text-mono-light-1 bc-dt-label",children:r}),m.jsx(Vr,{props:on,template:sn,children:a===!1?m.jsx(Lr,{value:Tt(),readOnly:t,className:dr,onFocus:L,onBlur:z,onInput:k,onElementCreate:Z=>ke(Z,!1),...Pt}):m.jsx(ro,{value:Tt(),readOnly:t,className:dr,format:F,isInputValid:_,onFocus:L,onBlur:z,onChange:M,onElementCreate:Z=>ke(Z,!0),...Pt})}),m.jsx(Za,{visible:V,target:Q,shouldTargetCloseOverlay:!1,shouldScrollCloseOverlay:!0,shouldCheckZIndex:!0,shouldRemainOnScreen:!0,hidden:$e,isClickedWithin:O,unmountWhenHidden:!0,children:m.jsxs(m.Fragment,{children:[d.currentSelector===K.DaySelector&&ct&&d.dateInitialized&&T.current&&m.jsx(Fh,{selectedDate:d.selectedDate,viewDate:d.currentViewDate,locale:T.current,showTimeSelector:u===we.DateTime,selectableDate:E,isValidDate:D,dispatcher:C,onChange:x}),d.currentSelector===K.MonthSelector&&ct&&d.dateInitialized&&T.current&&m.jsx($h,{viewDate:d.currentViewDate,locale:T.current,dateSelection:u,dispatcher:C}),d.currentSelector===K.YearSelector&&ct&&d.dateInitialized&&T.current&&m.jsx(Hh,{viewDate:d.currentViewDate,locale:T.current,dispatcher:C}),d.currentSelector===K.TimeSelector&&xt&&d.dateInitialized&&T.current&&m.jsx(Uh,{viewDate:d.currentViewDate,showDateSelector:u===we.DateTime,locale:T.current,timeFormat:d.timeFormat,timeConstraints:f,onChange:x,dispatcher:C}),d.currentSelector===K.DateRangeSelector&&ct&&d.dateInitialized&&T.current&&m.jsx(Yh,{viewDate:d.currentViewDate,selectedStartDate:d.selectedStartDate,selectedEndDate:d.selectedEndDate,locale:T.current,onChange:x,dispatcher:C})]})})]})})},ip="";he.ContentEditableInput=Lr,he.DateTime=zh,he.FormattedInput=ro,he.OverlayPanel=Za,he.applyBeeSoftTheme=pd,he.createBeeSoftTheme=vd,Object.defineProperty(he,Symbol.toStringTag,{value:"Module"})});
|
|
51
|
+
Valid keys: `+JSON.stringify(Object.keys(v),null," "));var S=Pe(k,$,L,z,O+"."+$,r);if(S)return S}return null}return x(P)}function W(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(W);if(v===null||s(v))return!0;var P=h(v);if(P){var d=P.call(v),C;if(P!==v.entries){for(;!(C=d.next()).done;)if(!W(C.value))return!1}else for(;!(C=d.next()).done;){var L=C.value;if(L&&!W(L[1]))return!1}}else return!1;return!0;default:return!1}}function q(v,P){return v==="symbol"?!0:P?P["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&P instanceof Symbol:!1}function F(v){var P=typeof v;return Array.isArray(v)?"array":v instanceof RegExp?"object":q(P,v)?"symbol":P}function te(v){if(typeof v>"u"||v===null)return""+v;var P=F(v);if(P==="object"){if(v instanceof Date)return"date";if(v instanceof RegExp)return"regexp"}return P}function A(v){var P=te(v);switch(P){case"array":case"object":return"an "+P;case"boolean":case"date":case"regexp":return"a "+P;default:return P}}function de(v){return!v.constructor||!v.constructor.name?w:v.constructor.name}return g.checkPropTypes=a,g.resetWarningCache=a.resetWarningCache,g.PropTypes=g,g},Jr}var en,Ba;function ch(){if(Ba)return en;Ba=1;var e=Qr();function t(){}function r(){}return r.resetWarningCache=t,en=function(){function n(o,s,u,l,f,h){if(h!==e){var w=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 w.name="Invariant Violation",w}}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},en}if(process.env.NODE_ENV!=="production"){var lh=Ya(),fh=!0;Br.exports=uh()(lh.isElement,fh)}else Br.exports=ch()();var dh=Br.exports;const J=Xe(dh),Ga={disabled:!1};var hh=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 Ka=p.createContext(null);var ph=function(t){return t.scrollTop},Ft="unmounted",it="exited",st="entering",gt="entered",tn="exiting",Ke=function(e){nh(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=it,i.appearStatus=st):u=gt:n.unmountOnExit||n.mountOnEnter?u=Ft:u=it,i.state={status:u},i.nextCallback=null,i}t.getDerivedStateFromProps=function(a,i){var o=a.in;return o&&i.status===Ft?{status:it}: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!==st&&o!==gt&&(i=st):(o===st||o===gt)&&(i=tn)}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===st){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:He.findDOMNode(this);o&&ph(o)}this.performEnter(a)}else this.performExit();else this.props.unmountOnExit&&this.state.status===it&&this.setState({status:Ft})},r.performEnter=function(a){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:a,u=this.props.nodeRef?[s]:[He.findDOMNode(this),s],l=u[0],f=u[1],h=this.getTimeouts(),w=s?h.appear:h.enter;if(!a&&!o||Ga.disabled){this.safeSetState({status:gt},function(){i.props.onEntered(l)});return}this.props.onEnter(l,f),this.safeSetState({status:st},function(){i.props.onEntering(l,f),i.onTransitionEnd(w,function(){i.safeSetState({status:gt},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:He.findDOMNode(this);if(!i||Ga.disabled){this.safeSetState({status:it},function(){a.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:tn},function(){a.props.onExiting(s),a.onTransitionEnd(o.exit,function(){a.safeSetState({status:it},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:He.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===Ft)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=rh(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return p.createElement(Ka.Provider,{value:null},typeof o=="function"?o(a,s):p.cloneElement(p.Children.only(o),s))},t}(p.Component);Ke.contextType=Ka,Ke.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=hh;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 yt(){}Ke.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:yt,onEntering:yt,onEntered:yt,onExit:yt,onExiting:yt,onExited:yt},Ke.UNMOUNTED=Ft,Ke.EXITED=it,Ke.ENTERING=st,Ke.ENTERED=gt,Ke.EXITING=tn;const vh=Ke,mh=({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 w=r||{transition:`opacity ${t}ms ${a}`,opacity:0},g=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(vh,{in:e,timeout:t,onEntering:s,onEntered:u,onExit:l,onExited:f,unmountOnExit:o,children:E=>h({state:E,defaultStyle:w,transitionStyles:g})})};var Qa=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(Qa||{}),Xa=(e=>(e[e.TopLeft=0]="TopLeft",e[e.TopRight=1]="TopRight",e[e.BottomLeft=2]="BottomLeft",e[e.BottomRight=3]="BottomRight",e))(Xa||{});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 Za=({visible:e,target:t,targetPosition:r=Qa.BottomLeft,elementAlignment:n=Xa.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:w="linear",shown:g,hidden:E,isClickedWithin:D,markupCreated:x,children:R})=>{const[H,G]=p.useState(-1),[V,y]=p.useState(e),[U,ee]=p.useState(!1),Q=p.useRef(!1),X=p.useRef(100),ue=p.useRef({left:0,top:0,width:0}),ie=p.useRef(),se=p.useRef(),T=p.useRef(),W=p.useRef(),q=p.useRef(),F=p.useRef();p.useEffect(()=>(u===!0&&(F.current=new ResizeObserver(A)),()=>{var O,k;u===!0&&(se.current&&((O=F.current)==null||O.unobserve(se.current)),(k=F.current)==null||k.disconnect())}),[u]),p.useEffect(()=>{if(t&&(ie.current=te(t),o&&(T.current=Oa(ie.current,{overflow:"scroll, auto",overflowX:"scroll, auto",overflowY:"scroll, auto"}),T.current.tagName.toLowerCase()==="html"&&(T.current=document))),s){const O=hd("zIndex",k=>parseInt(k)>=100).map(k=>parseInt(k));O.length>0&&(X.current=Math.max(...O)+1)}e!==void 0&&y(e)},[t,e,o,s]);const te=O=>O.target?O.target:O,A=O=>{if(se.current){const k=_e.getScreenDimensions(),_=O[O.length-1].target,M=_.getBoundingClientRect(),$=_e.determineOffScreenLocation(M);if($){if(ie.current&&_e.canPositionElementOnScreen(_,ie.current)){const Pe=_e.positionElementToTargetOnScreen(se.current,ie.current,n,r);ue.current={...ue.current,...Pe}}else $.right?ue.current.left=k.width-M.width:$.left&&(ue.current.left=0),$.bottom?ue.current.top=k.height-M.height:$.top&&(ue.current.top=0);de()}}},de=Rt(()=>{Q.current=!Q.current,ee(Q.current)},20),v=()=>{G(X.current)},P=()=>{if(!se.current)return;g==null||g();let O;!a&&ie.current&&(O=[ie.current]);const k=_=>{_?D==null||D():y(!1)};W.current=eh(se.current,k,O),o&&(q.current=Rc(_=>se.current&&cd(_,se.current)&&y(!1),100,{leading:!0}),T.current&&T.current.addEventListener("scroll",q.current))},d=()=>{T.current&&q.current&&(T.current.removeEventListener("scroll",q.current),q.current=void 0),W.current&&th(W.current)},C=()=>{G(-1),E==null||E()},L=O=>{var k,_;if(se.current=O,x==null||x(O),ie.current){const M=_e.positionElementToTarget(se.current,ie.current,n,r);ue.current={...M,width:ie.current.offsetWidth}}u===!0&&((k=F.current)==null||k.unobserve(se.current),(_=F.current)==null||_.observe(se.current))},z=p.useMemo(()=>{const O={top:`${ue.current.top}px`,left:`${ue.current.left}px`,zIndex:H};return i&&(O.width=`${ue.current.width}px`),O},[U,H,i]);return m.jsx(mh,{start:V,timeout:f,showTransitionOptions:h,hideTransitionOptions:w,onEntering:v,onEntered:P,onExit:d,onExited:C,unmountOnExit:l,children:({state:O,defaultStyle:k,transitionStyles:_})=>m.jsx("div",{className:"bsc-fixed bsc-bg-white dark:bsc-bg-mono-dark-1 bsc-border bsc-border-solid dark:bsc-text-mono-light-1 dark:bsc-border-mono-light-1 bsc-shadow",style:{...z,...k,..._[O]},ref:M=>M&&L(M),children:R})})};let ir;const gh=new Uint8Array(16);function yh(){if(!ir&&(ir=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ir))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ir(gh)}const je=[];for(let e=0;e<256;++e)je.push((e+256).toString(16).slice(1));function bh(e,t=0){return je[e[t+0]]+je[e[t+1]]+je[e[t+2]]+je[e[t+3]]+"-"+je[e[t+4]]+je[e[t+5]]+"-"+je[e[t+6]]+je[e[t+7]]+"-"+je[e[t+8]]+je[e[t+9]]+"-"+je[e[t+10]]+je[e[t+11]]+je[e[t+12]]+je[e[t+13]]+je[e[t+14]]+je[e[t+15]]}const Ja={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function wh(e,t,r){if(Ja.randomUUID&&!t&&!e)return Ja.randomUUID();e=e||{};const n=e.random||(e.rng||yh)();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 bh(n)}class sr{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 Th{constructor(t,r){Y(this,"instanceCollection");Y(this,"formatPartList");Y(this,"inputSlotCollection");Y(this,"currentPartIndex",0);Y(this,"currentCursorPosition",0);Y(this,"inputElement");Y(this,"inputSelection",null);Y(this,"inputRange");Y(this,"textNode");this.instanceCollection=bt.getInstance(),this.formatPartList=sr.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 xh{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 Ph{constructor(t){Y(this,"inputSlots");this.inputSlots=xh.create(sr.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 bt{static getInstance(){return this.instance||(this.instance=new Eh),this.instance}}Y(bt,"instance");class Eh{constructor(){Y(this,"navigatorInstances");Y(this,"inputSlotInstances");this.navigatorInstances={},this.inputSlotInstances={}}getNavigatorInstance(t,r){return this.navigatorInstances[t]||(this.navigatorInstances[t]=new Th(r,t)),this.navigatorInstances[t]}getInputSlotInstance(t,r){return this.inputSlotInstances[t]||(this.inputSlotInstances[t]=new Ph(r)),this.inputSlotInstances[t]}removeInstances(t){this.navigatorInstances[t]&&delete this.navigatorInstances[t],this.inputSlotInstances[t]&&delete this.inputSlotInstances[t]}}class rn{constructor(t,r){Y(this,"instanceCollection");Y(this,"formatPartList");Y(this,"inputSlotCollection");Y(this,"inputElement");this.instanceCollection=bt.getInstance(),this.formatPartList=sr.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 eo{constructor(){Y(this,"numberKeys",["0","1","2","3","4","5","6","7","8","9"]);Y(this,"movementKeys",["ArrowLeft","ArrowRight","Home","End"]);Y(this,"editingKeys",["Backspace","Delete"]);Y(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 Sh{constructor(t){Y(this,"_currentIndex",0);Y(this,"index",0);Y(this,"formatParts");this.formatParts=sr.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 to{constructor(t,r){Y(this,"instanceCollection");Y(this,"inputSlotCollection");Y(this,"formatNavigator");Y(this,"keyTypeChecker");Y(this,"formatRenderer");Y(this,"formatPartList");this.format=t,this.instanceCollection=bt.getInstance(),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(r,t),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.keyTypeChecker=new eo,this.formatRenderer=new rn(t,r),this.formatPartList=new Sh(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 Ch{constructor(t,r){Y(this,"instanceCollection");Y(this,"formatNavigator");Y(this,"ruleProcessor");Y(this,"keyTypeChecker");Y(this,"formatRenderer");this.format=t,this.instanceCollection=bt.getInstance(),this.formatNavigator=this.instanceCollection.getNavigatorInstance(r,t),this.ruleProcessor=new to(t,r),this.keyTypeChecker=new eo,this.formatRenderer=new rn(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 Dh{constructor(t,r=""){Y(this,"instanceId");Y(this,"instanceCollection");Y(this,"keyProcessor");Y(this,"formatNavigator");Y(this,"formatRenderer");Y(this,"inputSlotCollection");Y(this,"inputRuleProcessor");Y(this,"previousOutputValue","");Y(this,"inputElementSet",!1);Y(this,"isInputFocused",!1);Y(this,"inputElement");Y(this,"onFormatChange");this.inputValue=r,this.instanceId=wh(),this.instanceCollection=bt.getInstance(),this.keyProcessor=new Ch(t,this.instanceId),this.formatNavigator=this.instanceCollection.getNavigatorInstance(this.instanceId,t),this.formatRenderer=new rn(t,this.instanceId),this.inputSlotCollection=this.instanceCollection.getInputSlotInstance(this.instanceId,t),this.inputRuleProcessor=new to(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 Oh=(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:w=!1,allowSingleLineScroll:g=!1,isInputValid:E,onChange:D,onFocus:x,onBlur:R,onElementCreate:H,onLeftElementClick:G,onRightElementClick:V}=e,[y,U]=p.useState(!0),ee=p.useRef(),Q=p.useRef(),X=p.useRef();p.useEffect(()=>()=>{var A;(A=X.current)==null||A.dispose()},[]),p.useEffect(()=>{var A;(A=X.current)==null||A.inputValuePassed(r)},[r]),p.useEffect(()=>{var A,de,v;(A=X.current)==null||A.dispose(),n&&(X.current=new Dh(n,r),Q.current&&((de=X.current)==null||de.inputElementCreated(Q.current)),(v=X.current)==null||v.registerFormatChangeEvent(ue))},[n]);const ue=p.useCallback(A=>{E?E(A)?(U(!0),D==null||D(A)):U(!1):D==null||D(A)},[D]),ie=p.useCallback(A=>{var de;(de=X.current)==null||de.inputFocused(),x==null||x(A)},[x]),se=p.useCallback(A=>{var de;(de=X.current)==null||de.inputBlurred(),R==null||R(A)},[R]),T=p.useCallback(()=>{var A;(A=X.current)==null||A.mouseUpHandler()},[]),W=p.useCallback(A=>{var de;(de=X.current)==null||de.keyDownHandler(A)},[]),q=p.useCallback(A=>{var de,v,P,d,C,L,z,O,k;(v=(de=ee.current)==null?void 0:de.inputElement)==null||v.removeEventListener("keydown",W),(d=(P=ee.current)==null?void 0:P.inputElement)==null||d.removeEventListener("mouseup",T),ee.current=A,(L=(C=ee.current)==null?void 0:C.inputElement)==null||L.addEventListener("keydown",W),(O=(z=ee.current)==null?void 0:z.inputElement)==null||O.addEventListener("mouseup",T),Q.current=(k=ee.current)==null?void 0:k.inputElement},[]),F=p.useCallback(()=>{var A;(A=ee.current)==null||A.focus()},[]);p.useImperativeHandle(t,()=>({focus:F}));const te=Ze(l,{"!bsc-border-error":!y});return m.jsx(Lr,{ref:A=>A&&q(A),readOnly:a,debounceTime:i,fillContainer:o,leftElement:s,rightElement:u,className:te,leftElementClassName:f,rightElementClassName:h,isSingleLine:w,allowSingleLineScroll:g,onFocus:ie,onBlur:se,onElementCreate:H,onLeftElementClick:G,onRightElementClick:V})},ro=p.forwardRef(Oh),nn=p.createContext(void 0);function no(e,t,r=!0){var w,g;const n=va(e),a=ca(e),i=Ul(e);let o=Yr(a)-(((w=t.options)==null?void 0:w.weekStartsOn)||0);o=o===-1?6:o;const s=Yr(i)-(((g=t.options)==null?void 0:g.weekStartsOn)||0),u=Yc({start:a,end:i}),l=n+o>35?6:5,f=ao(l,7,{dayValue:null,isCurrent:!0});let h=1;for(let E=0,D=l;E<D;E++){for(let x=E>0?0:o;x<7;x++){const R=u[h-1];if(R.setHours(e.getHours(),e.getMinutes(),e.getSeconds()),f[E][x].dayValue=R,++h>n)break}if(h>n)break}if(o>0&&r)for(let E=0;E<o;E++)f[0][E].dayValue=Hf(a,o-E),f[0][E].isCurrent=!1;if(s>-1&&r)for(let E=6;E>s;E--)f[l-1][E].dayValue=Bt(i,E-s),f[l-1][E].isCurrent=!1;return f}function ao(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=Nh(r)?r:{...r};o.push(l)}n.push(o)}return n}function Nh(e){const t=typeof e;return t==="string"||t==="number"||t==="boolean"||e instanceof Date}function Ih(e){var n;const t=Wf(new Date,((n=e.options)==null?void 0:n.weekStartsOn)||0),r=[];for(let a=0;a<7;a++)r.push(Bt(t,a).toLocaleDateString(e.code,{weekday:"short"}));return r}function _h(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:at(t,n++).toLocaleDateString(e.code,{month:"short"})};return r}function Mh(e,t){const r=new Date(e.getTime()),n=Math.floor(r.getFullYear()/10)*10;r.setFullYear(n);const a=Uc({start:r,end:Gt(r,9)}),i=ao(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 Rh(e){const t=new Date;return t.setHours(0,0,0,0),t.toLocaleTimeString(e.code)}function kh(e,t,r){return e.getTime()>=t.getTime()&&e.getTime()<=r.getTime()}async function oo(e){return(await import(`/node_modules/date-fns/locale/${jh(e)}`)).default}function jh(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 $t(e,t){const r=Vf(e);if(isNaN(r.valueOf())){let n=ze(e,"P pp",new Date,{locale:t});return!isNaN(n.valueOf())||(n=ze(e,"Pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ze(e,"P HH:mm",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ze(e,"P hh:mm a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ze(e,"P HH:mm:ss",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ze(e,"P hh:mm:ss a..aaa",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ze(e,"P",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ze(e,"P p",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ze(e,"pp",new Date,{locale:t}),!isNaN(n.valueOf()))||(n=ze(e,"p",new Date,{locale:t}),!isNaN(n.valueOf()))?n:void 0}return r}function io(e,t){const r=e.split("-");if(r.length!==2)return;const n=$t(r[0].trim(),t);if(!n)return;const a=$t(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||{}),Yt=(e=>(e[e.Day=0]="Day",e[e.Month=1]="Month",e[e.Year=2]="Year",e[e.Range=3]="Range",e))(Yt||{}),ur=(e=>(e[e.Short=0]="Short",e[e.Medium=1]="Medium",e[e.Long=2]="Long",e))(ur||{}),De=(e=>(e[e.TwelveHour=0]="TwelveHour",e[e.TwentyFourHour=1]="TwentyFourHour",e))(De||{}),ut=(e=>(e[e.Normal=0]="Normal",e[e.Range=1]="Range",e))(ut||{}),cr=(e=>(e[e.Right=0]="Right",e[e.Left=1]="Left",e[e.None=2]="None",e))(cr||{}),K=(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))(K||{});const Lh=(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:Ah(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 Ah(e){return e?Array.isArray(e)?e[0]:e:new Date}const an=({viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:a=ut.Normal,locale:i,onDateSelected:o,selectableDate:s,isValidDate:u,dispatcher:l})=>{var q;const[f,h]=p.useState(!1),[w,g]=p.useState(),[E,D]=p.useState(),[x,R]=p.useState(),[H,G]=p.useState(),V=p.useRef(),y=p.useRef(),U=p.useContext(nn),ee=p.useMemo(()=>U.calendarTemplate,[U.calendarTemplate]),Q=async()=>i||await oo(Da());p.useEffect(()=>{Q().then(F=>{V.current=F,y.current=Ih(V.current),h(!0)}).catch(F=>console.error(F))},[]),p.useEffect(()=>{e&&V.current&&R(no(e,V.current,a===ut.Normal))},[e,f]),p.useEffect(()=>{G(t?new Date(t.getFullYear(),t.getMonth(),t.getDate()):void 0)},[t]),p.useEffect(()=>{g(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(()=>{V.current&&i&&(V.current=i,R(no(e,V.current,a===ut.Normal)))},[i]);const X=F=>{if(a===ut.Normal)l==null||l({type:K.SetSelectedDate,selectedDate:F,viewDate:F}),o==null||o(F);else{if(!o)throw new Error("Range selection mode requires onDateSelected to be set");!r||Hl(F,r)?o(F):r&&!n?o(F,{setEndDate:!0}):r&&n&&o(F)}},ue=F=>(H==null?void 0:H.toLocaleDateString())===F.toLocaleDateString(),ie=F=>{if(w&&E){const te=F.getTime();return te>=w&&te<=E}return!1},se={viewDate:e,selectedDate:t,selectedStartDate:r,selectedEndDate:n,selectionMode:a,locale:i,weekDays:y.current,monthMatrix:x,selectableDate:s,isValidDate:u,onDateClicked:X,isSelectedDate:ue,isInSelectedDateRange:ie},W=ee||((F,te)=>m.jsx("div",{className:"bsc-w-full bc-dt-calendar",children:te}));return m.jsx(Vr,{props:se,template:W,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,te)=>m.jsx("div",{className:"bsc-text-center bsc-font-bold bc-dt-day-cell",children:F},te)),x==null?void 0:x.map((F,te)=>F.map((A,de)=>{var d,C;const v=A.dayValue!==null&&(s===void 0||s(A.dayValue)),P=Ze("bsc-text-center bsc-py-1",{"bsc-text-gray-3":!A.isCurrent,"bsc-bg-primary-3 dark:bsc-bg-mono-light-1 dark:bsc-text-mono-dark-1":A&&A.dayValue&&(H&&ue(A.dayValue)||w&&!E&&ua(w,A.dayValue)||w&&E&&ie(A.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":A.dayValue&&Uf(A.dayValue)&&!(ue(A.dayValue)||ie(A.dayValue))},"bc-dt-date-cell");return m.jsx("div",{className:P,onClick:()=>A&&A.dayValue&&v&&(u===void 0||u(A.dayValue))&&X(A.dayValue),children:(C=A.dayValue)==null?void 0:C.getDate().toLocaleString((d=V.current)==null?void 0:d.code)},te.toString()+de.toString())}))]})})},lr=({title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:a})=>{const o=p.useContext(nn).dateScrollerTemplate,s={title:e,scrollerType:t,onTitleClicked:r,onMovePrevious:n,onMoveNext:a},l=o||((f,h)=>m.jsx("div",{className:"bsc-w-full bsc-flex bsc-flex-row bsc-py-1 bsc-px-2 bc-dt-scroller",children:h}));return m.jsxs(Vr,{props:s,template:l,children:[m.jsx("div",{className:"bsc-flex-shrink bsc-cursor-pointer bc-dt-scroller-left",children:m.jsx("button",{className:"focus:bsc-outline-none",onClick:n,children:m.jsx(xd,{size:24})})}),m.jsx("div",{className:"bsc-flex-grow bsc-text-center bsc-cursor-pointer bc-dt-scroller-title",onClick:r,children:e}),m.jsx("div",{className:"bsc-flex-shrink bsc-cursor-pointer bc-dt-scroller-right",children:m.jsx("button",{className:"focus:bsc-outline-none",onClick:a,children:m.jsx(Nd,{size:24})})})]})},Fh=({selectedDate:e,viewDate:t,locale:r,showTimeSelector:n,selectableDate:a,isValidDate:i,onChange:o,dispatcher:s})=>{const u=()=>{t&&s({type:K.SetViewDate,viewDate:Sa(t,1)})},l=()=>{t&&s({type:K.SetViewDate,viewDate:at(t,1)})},f=()=>{s({type:K.MonthSelector})},h=()=>{s({type:K.TimeSelector})},w=()=>t?t.toLocaleDateString(r.code,{month:"long",year:"numeric"}):"";return m.jsxs("div",{className:"bsc-p-2 bc-dt-day-selector",children:[m.jsx(lr,{title:w(),scrollerType:Yt.Day,onTitleClicked:f,onMovePrevious:u,onMoveNext:l}),m.jsx(an,{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))||Rh(r)})})]})},$h=({viewDate:e,locale:t,dateSelection:r=we.DateTime,dispatcher:n})=>{const a=p.useRef(_h(t)),i=()=>{const f=Ca(e,1);n({type:K.SetViewDate,viewDate:f})},o=()=>{const f=Gt(e,1);n({type:K.SetViewDate,viewDate:f})},s=f=>{n({type:r!==we.DateRange?K.DaySelector:K.DateRangeSelector,viewDate:id(e,f)})},u=()=>e.toLocaleDateString(t.code,{year:"numeric"}),l=()=>{n({type:K.YearSelector})};return m.jsxs("div",{className:"bsc-p-2 bc-dt-month-selector",style:{minWidth:"20rem"},children:[m.jsx(lr,{title:u(),scrollerType:Yt.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((w,g)=>m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-month-cell",onClick:()=>s(w.monthNumber),children:w.monthName},h.toString()+g.toString())))})]})},Yh=({viewDate:e,selectedStartDate:t,selectedEndDate:r,locale:n,onChange:a,dispatcher:i})=>{const o=at(e,1),s=(w,g)=>{!g||!g.setEndDate?i({type:K.SetSelectedStartDate,selectedStartDate:w}):(i({type:K.SetSelectedEndDate,selectedEndDate:w}),t&&(a==null||a([t,w])))},u=()=>{i({type:K.MonthSelector})},l=()=>`${e.toLocaleDateString(n.code,{month:"long"})} ${e.toLocaleDateString(n.code,{year:"numeric"})} - ${o.toLocaleDateString(n.code,{month:"long"})} ${o.toLocaleDateString(n.code,{year:"numeric"})}`,f=()=>{e&&i({type:K.SetViewDate,viewDate:Sa(e,1)})},h=()=>{e&&i({type:K.SetViewDate,viewDate:at(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(lr,{title:l(),scrollerType:Yt.Range,onTitleClicked:u,onMovePrevious:f,onMoveNext:h})}),m.jsx("div",{className:"bsc-flex-grow",children: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(an,{viewDate:e,selectedStartDate:t,selectedEndDate:r,selectionMode:ut.Range,onDateSelected:s,locale:n,dispatcher:i})}),m.jsx("div",{className:"bsc-pl-4 bc-dt-range-calendar-2",children:m.jsx(an,{viewDate:o,selectedStartDate:t,selectedEndDate:r,selectionMode:ut.Range,onDateSelected:s,locale:n,dispatcher:i})})]})})]})},Uh=({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(ud(0,59,T=>T.toString().padStart(2,"0"))),f=p.useRef(["AM","PM"]),h=p.useRef(Dc(e)),w=T=>T>11?T-12:T,[g,E]=p.useState(w(e.getHours())),[D,x]=p.useState(e.getMinutes()),[R,H]=p.useState(e.getHours()<=12?0:1),G=p.useRef(e.toLocaleDateString(r.code));p.useEffect(()=>{const T=e.getHours(),W=e.getMinutes();if(T!==g&&E(n===De.TwelveHour?w(T):T),W!==D&&x(W),n===De.TwelveHour){const q=T<=11?0:1;q!==R&&H(q)}},[e]);const V=()=>{var q;const T=((q=a==null?void 0:a.hours)==null?void 0:q.step)||1,W=g<s.current?g+T:0;E(W),X(W,D,R)},y=()=>{var q;const T=((q=a==null?void 0:a.hours)==null?void 0:q.step)||1,W=g>0?g-T:s.current;E(W),X(W,D,R)},U=()=>{var q,F,te;const T=((q=a==null?void 0:a.minutes)==null?void 0:q.step)||1,W=D+T<(((F=a==null?void 0:a.minutes)==null?void 0:F.max)||59)?D+T:((te=a==null?void 0:a.minutes)==null?void 0:te.min)||0;x(W),X(g,W,R)},ee=()=>{var q,F,te;const T=((q=a==null?void 0:a.minutes)==null?void 0:q.step)||1,W=D-T>=(((F=a==null?void 0:a.minutes)==null?void 0:F.min)||0)?D-T:(((te=a==null?void 0:a.minutes)==null?void 0:te.max)||60)-T;x(W),X(g,W,R)},Q=()=>{const T=R===0?1:0;H(T),X(g,D,T)},X=(T,W,q)=>{const F=n===De.TwelveHour&&q===1?T+12:T;h.current.setHours(F,W),o({type:K.SetSelectedDate,selectedDate:h.current,viewDate:h.current}),i==null||i(h.current)},ue=()=>{o({type:K.DaySelector})},ie=Ze("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}),se=Ze("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:"bsc-flex bsc-flex-row bsc-justify-center bsc-p-2 bc-dt-time-selector",style:{minWidth:n===De.TwelveHour?"15rem":"11rem"},children:m.jsxs("div",{className:ie,children:[t&&m.jsx("div",{className:se,onClick:ue,children:G.current}),m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-time-hour-increase",children:m.jsx("button",{className:"focus:bsc-outline-none",onClick:V,children:m.jsx(zr,{})})}),m.jsx("div",{children:" "}),m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-time-minute-increase",children:m.jsx("button",{className:"focus:bsc-outline-none",onClick:U,children:m.jsx(zr,{})})}),n===De.TwelveHour&&m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-time-meridian-increase",children:m.jsx("button",{className:"focus:bsc-outline-none",onClick:Q,children:m.jsx(zr,{})})}),m.jsx("div",{className:"bsc-text-center bc-dt-time-hour-value",children:u.current[g]}),m.jsx("div",{className:"bsc-text-center bc-dt-time-separator",children:":"}),m.jsx("div",{className:"bsc-text-center bc-dt-time-minute-value",children:l.current[D]}),n===De.TwelveHour&&m.jsx("div",{className:"bsc-text-center bc-dt-time-meridian-value",children:f.current[R]}),m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-time-hour-decrease",children:m.jsx("button",{className:"focus:bsc-outline-none",onClick:y,children:m.jsx(qr,{})})}),m.jsx("div",{children:" "}),m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-time-minute-decrease",children:m.jsx("button",{className:"focus:bsc-outline-none",onClick:ee,children:m.jsx(qr,{})})}),n===De.TwelveHour&&m.jsx("div",{className:"bsc-text-center bsc-cursor-pointer bc-dt-time-meridian-decrease",children:m.jsx("button",{className:"focus:bsc-outline-none",onClick:Q,children:m.jsx(qr,{})})})]})})},Hh=({viewDate:e,locale:t,dispatcher:r})=>{const n=Mh(e,t),a=()=>{const u=Ca(e,10);r({type:K.SetViewDate,viewDate:u})},i=()=>{const u=Gt(e,10);r({type:K.SetViewDate,viewDate:u})},o=u=>{const l=parseInt(u);r({type:K.MonthSelector,viewDate:sd(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(lr,{title:s(),scrollerType:Yt.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 Wh{constructor(t,r){Y(this,"dateFormat");Y(this,"timeFormat");Y(this,"use24HourTime");Y(this,"monthPart");Y(this,"dayPart");Y(this,"yearPart");Y(this,"twelveHourPart");Y(this,"twentyFourHourPart");Y(this,"minutePart");Y(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,w=317;u.setHours(l,f,h,w);const g=u.toLocaleTimeString(r);this.use24HourTime=g.startsWith("18"),this.timeFormat=g.replace(`${this.use24HourTime?l:"6"}`,"HH").replace(`${f}`,"MM").replace(`${h}`,"SS").replace(`${w}`,"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 Vh=(e,t)=>{var i;const[r,n]=p.useState(),a=p.useRef();return p.useEffect(()=>{t&&!r&&(a.current=new Wh(e,t),n(a.current.createInputFormat()))},[t]),[r,(i=a.current)==null?void 0:i.is24HourTime]},zh=({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:w=cr.Right,inputElement:g,selectableDate:E,isValidDate:D,onChange:x,calendarTemplate:R,dateScrollerTemplate:H,inputTemplate:G})=>{const[V,y]=p.useState(!1),[U,ee]=p.useState(),[Q,X]=p.useState(),ue=p.useRef(),ie=p.useRef(!1),se=p.useRef(o||Da()),T=p.useRef(),W=p.useRef(),q=p.useRef(),[F,te]=Vh(u,U),A=p.useRef({calendarTemplate:R,dateScrollerTemplate:H});p.useEffect(()=>{se.current&&de(se.current)},[se]),p.useEffect(()=>{o&&de(o)},[o]),p.useEffect(()=>{if(e){const Z=v();C({type:K.InitializeDates,initialDate:Z})}else C({type:K.ClearDates})},[e,T.current]),p.useEffect(()=>{te&&C({type:K.SetTimeFormat,timeFormat:te?De.TwentyFourHour:De.TwelveHour})},[te]),p.useEffect(()=>{g&&(W.current=g)},[g]);const de=Z=>{oo(Z).then(be=>{ee(be.code),T.current=be;const Le=v();C(e||n?{type:K.InitializeDates,initialDate:Array.isArray(Le)?Le[0]:Le}:{type:K.SetViewDate,viewDate:Array.isArray(Le)?Le[0]:Le})}).catch(be=>console.error(be))},v=()=>{const Z=new Date;return Z.setHours(0,0,0,0),e?typeof e=="string"?u!==we.DateRange?$t(e,T.current):io(e,T.current):e:Z},P={currentSelector:u===we.TimeOnly?K.TimeSelector:u===we.DateTime||u===we.DateOnly?K.DaySelector:K.DateRangeSelector,currentViewDate:new Date,timeFormat:De.TwelveHour,dateInitialized:!1},[d,C]=p.useReducer(Lh,P),L=()=>{Fe(),y(!0)},z=p.useMemo(()=>Rt(()=>{y(!1)},250),[]),O=p.useMemo(()=>Rt(()=>{z.cancel()},5),[z]),k=Z=>{const be=Z.target.innerText;$(be)},_=Z=>{if(Z){const be=$t(Z,T.current);return be?D?D(be):!0:!1}else return!0},M=Z=>{$(Z||"")},$=Z=>{const be=u!==we.DateRange?$t(Z,T.current):io(Z,T.current);be?(Array.isArray(be)?(kh(be[0],ca(d.currentViewDate),$c(at(d.currentViewDate,1)))||C({type:K.SetViewDate,viewDate:be[0]}),C({type:K.SetSelectedDateRange,selectedStartDate:be[0],selectedEndDate:be[1]})):C({type:K.SetSelectedDate,selectedDate:be,viewDate:be}),x==null||x(be)):Z===""&&(C({type:K.ClearDates}),x==null||x())},Pe=()=>{Fe(),y(!V)},S=()=>{C({type:K.ClearDates}),y(!1),x==null||x()},ke=(Z,be)=>{(!W.current||ue.current!==be)&&(W.current=Z,ue.current=be,ie.current=!0)},Fe=()=>{(!q.current||ie.current)&&W.current&&(q.current=W.current,X(W.current),ie.current=!1)},$e=()=>{y(!1),C({type:u===we.TimeOnly?K.TimeSelector:u===we.DateTime||u===we.DateOnly?K.DaySelector:K.DateRangeSelector})},wt=()=>{switch(l){case ur.Short:return"short";case ur.Medium:return"medium";case ur.Long:return"long";default:return}},Tt=()=>{var be,Le,hr,Ut,Ht,Et,pr,vr,mr,gr,yr,br;const Z=wt();switch(u){case we.DateTime:return d.selectedDate?Z?d.selectedDate.toLocaleString((be=T.current)==null?void 0:be.code,{dateStyle:Z,timeStyle:Z}):d.selectedDate.toLocaleString((Le=T.current)==null?void 0:Le.code):"";case we.DateOnly:return d.selectedDate?Z?d.selectedDate.toLocaleDateString((hr=T.current)==null?void 0:hr.code,{dateStyle:Z}):d.selectedDate.toLocaleDateString((Ut=T.current)==null?void 0:Ut.code):"";case we.TimeOnly:return d.selectedDate?Z?d.selectedDate.toLocaleTimeString((Ht=T.current)==null?void 0:Ht.code,{timeStyle:Z,hour12:d.timeFormat===De.TwelveHour,hourCycle:d.timeFormat===De.TwentyFourHour?"h23":void 0}):d.selectedDate.toLocaleTimeString((Et=T.current)==null?void 0:Et.code,{hour12:d.timeFormat===De.TwelveHour,hourCycle:d.timeFormat===De.TwentyFourHour?"h23":void 0}):"";case we.DateRange:return d.selectedStartDate&&d.selectedEndDate?Z?`${d.selectedStartDate.toLocaleDateString((pr=T.current)==null?void 0:pr.code,{dateStyle:Z})} - ${d.selectedEndDate.toLocaleDateString((vr=T.current)==null?void 0:vr.code,{dateStyle:Z})}`:`${d.selectedStartDate.toLocaleDateString((mr=T.current)==null?void 0:mr.code)} - ${d.selectedEndDate.toLocaleDateString((gr=T.current)==null?void 0:gr.code)}`:"";default:return d.selectedDate?Z?d.selectedDate.toLocaleString((yr=T.current)==null?void 0:yr.code,{dateStyle:Z,timeStyle:Z}):d.selectedDate.toLocaleString((br=T.current)==null?void 0:br.code):""}},ct=u===we.DateTime||u===we.DateOnly||u===we.DateRange,xt=u===we.DateTime||u===we.TimeOnly,Pt=w===cr.None?{}:w===cr.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(Ma,{size:16,className:"bsc-cursor-pointer bsc-text-sm",onClick:S})}),m.jsx("div",{className:"bsc-ml-2",children:h||m.jsx(ka,{size:16,className:t?void 0:"bsc-cursor-pointer",onClick:t?void 0:Pe})})]}),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(ka,{size:16,className:t?void 0:"bsc-cursor-pointer",onClick:t?void 0:Pe})}),i&&!t&&m.jsx("div",{children:m.jsx(Ma,{size:16,className:"bsc-cursor-pointer bsc-text-sm",onClick:S})})]}),leftElementClassName:"bsc-justify-center"},on={label:r,readOnly:t,allowClear:i,getValue:Tt,onFocus:L,onInput:k,iconPosition:w,iconElement:Pt.rightElement||Pt.leftElement},sn=G||((Z,be)=>m.jsx(m.Fragment,{children:be})),dr=Ze("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(nn.Provider,{value:A.current,children:m.jsxs("div",{className:"bc-date-time",children:[r&&m.jsx("label",{className:"dark:bsc-text-mono-light-1 bc-dt-label",children:r}),m.jsx(Vr,{props:on,template:sn,children:a===!1?m.jsx(Lr,{value:Tt(),readOnly:t,className:dr,onFocus:L,onBlur:z,onInput:k,onElementCreate:Z=>ke(Z,!1),...Pt}):m.jsx(ro,{value:Tt(),readOnly:t,className:dr,format:F,isInputValid:_,onFocus:L,onBlur:z,onChange:M,onElementCreate:Z=>ke(Z,!0),...Pt})}),m.jsx(Za,{visible:V,target:Q,shouldTargetCloseOverlay:!1,shouldScrollCloseOverlay:!0,shouldCheckZIndex:!0,shouldRemainOnScreen:!0,hidden:$e,isClickedWithin:O,unmountWhenHidden:!0,children:m.jsxs(m.Fragment,{children:[d.currentSelector===K.DaySelector&&ct&&d.dateInitialized&&T.current&&m.jsx(Fh,{selectedDate:d.selectedDate,viewDate:d.currentViewDate,locale:T.current,showTimeSelector:u===we.DateTime,selectableDate:E,isValidDate:D,dispatcher:C,onChange:x}),d.currentSelector===K.MonthSelector&&ct&&d.dateInitialized&&T.current&&m.jsx($h,{viewDate:d.currentViewDate,locale:T.current,dateSelection:u,dispatcher:C}),d.currentSelector===K.YearSelector&&ct&&d.dateInitialized&&T.current&&m.jsx(Hh,{viewDate:d.currentViewDate,locale:T.current,dispatcher:C}),d.currentSelector===K.TimeSelector&&xt&&d.dateInitialized&&T.current&&m.jsx(Uh,{viewDate:d.currentViewDate,showDateSelector:u===we.DateTime,locale:T.current,timeFormat:d.timeFormat,timeConstraints:f,onChange:x,dispatcher:C}),d.currentSelector===K.DateRangeSelector&&ct&&d.dateInitialized&&T.current&&m.jsx(Yh,{viewDate:d.currentViewDate,selectedStartDate:d.selectedStartDate,selectedEndDate:d.selectedEndDate,locale:T.current,onChange:x,dispatcher:C})]})})]})})},ip="";he.ContentEditableInput=Lr,he.DateTime=zh,he.FormattedInput=ro,he.OverlayPanel=Za,he.applyBeeSoftTheme=pd,he.createBeeSoftTheme=vd,Object.defineProperty(he,Symbol.toStringTag,{value:"Module"})});
|
package/dist/index.umd.js.gz
CHANGED
|
Binary file
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
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-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,: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-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-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-gray-2{background-color:var(--theme-bsc-gray-2)}.bsc-bg-mono-dark-1{background-color:var(--theme-bsc-mono-dark-1)}.bsc-bg-primary-3{background-color:var(--theme-bsc-primary-3)}.bsc-bg-primary-5{background-color:var(--theme-bsc-primary-5)}.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-font-bold{font-weight:700}.bsc-text-
|
|
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-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,: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-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-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-gray-2{background-color:var(--theme-bsc-gray-2)}.bsc-bg-mono-dark-1{background-color:var(--theme-bsc-mono-dark-1)}.bsc-bg-primary-3{background-color:var(--theme-bsc-primary-3)}.bsc-bg-primary-5{background-color:var(--theme-bsc-primary-5)}.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-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-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-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)}.focus\:bsc-outline-none:focus{outline:2px solid transparent;outline-offset:2px}: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)}
|
package/dist/style.css.gz
CHANGED
|
Binary file
|