react-luminus-components 1.1.7 → 1.1.10
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/.vite/manifest.json +44 -44
- package/dist/{DataKey-C-RyQIZQ.mjs → DataKey-BSoaCf9L.mjs} +1 -1
- package/dist/DataKey-C5l4FOL1.js +1 -0
- package/dist/{EmployeesDropdown.module-AbK-MkT0.mjs → SimplePicker.module--OMl78Ir.mjs} +524 -507
- package/dist/SimplePicker.module-De0azFIA.js +212 -0
- package/dist/{SimpleTooltip-eeSv-6cG.mjs → SimpleTooltip-CnmY5QiG.mjs} +2 -2
- package/dist/SimpleTooltip-D42eUFjD.js +1 -0
- package/dist/components/Buttons/FloatingSubmit/FloatingFormSubmit.d.ts +3 -2
- package/dist/components/Buttons/PrimaryButton/PrimaryButton.d.ts +1 -1
- package/dist/components/Form/DropdownPicker/DropdownPicker.d.ts +19 -0
- package/dist/components/Form/index.d.ts +1 -1
- package/dist/components/HookForm/DropdownPicker/HookFormDropdownPicker.d.ts +15 -0
- package/dist/components/HookForm/index.d.ts +1 -1
- package/dist/components/common/SimplePicker/SimplePicker.d.ts +15 -0
- package/dist/components/common/index.d.ts +1 -1
- package/dist/contexts/luminus-components/LuminusComponentsContext.d.ts +2 -2
- package/dist/contexts/luminus-components/LuminusComponentsProvider.d.ts +3 -3
- package/dist/contexts.cjs.js +1 -1
- package/dist/contexts.es.js +41 -41
- package/dist/{hasClass-6QP28uKO.mjs → hasClass-D4r9EJyq.mjs} +1 -1
- package/dist/{hasClass-Do_vMvLD.js → hasClass-DXhjqDzJ.js} +5 -5
- package/dist/hooks/useNotifications/useNotifications.d.ts +1 -1
- package/dist/hooks.cjs.js +1 -1
- package/dist/hooks.es.js +3 -3
- package/dist/layout.cjs.js +1 -1
- package/dist/layout.es.js +2 -2
- package/dist/main.cjs.js +1 -1
- package/dist/main.d.ts +3 -3
- package/dist/main.es.js +1518 -1514
- package/dist/models/index.d.ts +3 -2
- package/dist/models/prop-types/{HookFormEmployeePickerProps.d.ts → HookFormDropdownPickerProps.d.ts} +3 -2
- package/dist/models/texts/DropdownPickerTexts.d.ts +5 -0
- package/dist/models/texts/FormSubmitTexts.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/useConfirm-BG0v5BwQ.js +1 -0
- package/dist/{useConfirm-CsFA8Y7z.mjs → useConfirm-CGg-p14L.mjs} +1 -1
- package/package.json +1 -1
- package/dist/DataKey-CBpWR2M6.js +0 -1
- package/dist/EmployeesDropdown.module-4iGuBkjc.js +0 -212
- package/dist/SimpleTooltip-BwmrrMt1.js +0 -1
- package/dist/components/Form/EmployeePicker/EmployeePicker.d.ts +0 -14
- package/dist/components/HookForm/EmployeePicker/HookFormEmployeePicker.d.ts +0 -10
- package/dist/components/common/EmployeesDropdown/EmployeesDropdown.d.ts +0 -11
- package/dist/models/texts/EmployeesDropdownTexts.d.ts +0 -4
- package/dist/useConfirm-DGeJryJS.js +0 -1
package/dist/contexts.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./EmployeesDropdown.module-4iGuBkjc.js"),l=require("react"),v=require("./DataKey-CBpWR2M6.js"),Fe=require("./useConfirm-DGeJryJS.js"),a=require("./hasClass-Do_vMvLD.js"),Ie=require("react-dom");function We(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,n.get?n:{enumerable:!0,get:()=>t[s]})}}return e.default=t,Object.freeze(e)}const h=We(l),$e=({children:t})=>{const[e,s]=l.useState(!1),[n,r]=l.useState(""),i=l.useCallback(g=>{s(!0),r(g)},[]),f=l.useCallback(()=>{s(!1)},[]),u=l.useMemo(()=>({show:e,text:n,showConfirm:i,hideConfirm:f}),[e,n,i,f]);return o.jsxRuntimeExports.jsxs(o.ConfirmContext.Provider,{value:u,children:[o.jsxRuntimeExports.jsx(ft,{}),t]})},Ue=({axiosInstance:t,LinkComponent:e,language:s,axiosTexts:n,confirmTexts:r,formValidationTexts:i,employeesDropdownTexts:f,homeDashboardTexts:u,children:g})=>{const x=l.useMemo(()=>({axiosInstance:t,LinkComponent:e,language:s,axiosTexts:n,confirmTexts:r,formValidationTexts:i,employeesDropdownTexts:f,homeDashboardTexts:u}),[t,e,s,n,r,i,f,u]);return o.jsxRuntimeExports.jsx(o.LuminusComponentsContext.Provider,{value:x,children:o.jsxRuntimeExports.jsxs($e,{children:[o.jsxRuntimeExports.jsx(o.Ie,{}),g]})})},Pe=({children:t})=>{const[e,s]=l.useState(!1),[n]=l.useState(new Set),r=l.useCallback(u=>{n.add(u),s(!0)},[n]),i=l.useCallback(u=>{n.delete(u),n.size===0&&s(!1)},[n]),f=l.useMemo(()=>({isLoading:e,startLoading:r,stopLoading:i}),[e,r,i]);return o.jsxRuntimeExports.jsxs(o.LoadingContext.Provider,{value:f,children:[e&&o.jsxRuntimeExports.jsx(v.Loading,{}),t]})},_e=({children:t})=>{const e=o.useAxios(),s=l.useCallback(()=>{const m=localStorage.getItem("user")??null;return m?JSON.parse(m):null},[]),[n,r]=l.useState(s()),i=l.useCallback(async()=>{let m=null;return await e.get("/user/detail").then(R=>{m=R.data}).catch(()=>{m=null}),localStorage.setItem("user",JSON.stringify(m)),m},[e]),f=l.useCallback(()=>{localStorage.removeItem("user")},[]),u=l.useCallback(async()=>{const m=await i();return m?(r(m),!0):!1},[i]),g=l.useCallback(()=>{f(),r(null)},[f]),x=l.useMemo(()=>({user:n,loginUser:u,logoutUser:g}),[n,u,g]);return l.useEffect(()=>{r(s())},[s]),o.jsxRuntimeExports.jsx(o.UserContext.Provider,{value:x,children:t})},He=t=>h.forwardRef((e,s)=>o.jsxRuntimeExports.jsx("div",{...e,ref:s,className:o.classNames(e.className,t)})),qe={"aria-label":a.PropTypes.string,onClick:a.PropTypes.func,variant:a.PropTypes.oneOf(["white"])},me=h.forwardRef(({className:t,variant:e,"aria-label":s="Close",...n},r)=>o.jsxRuntimeExports.jsx("button",{ref:r,type:"button",className:o.classNames("btn-close",e&&`btn-close-${e}`,t),"aria-label":s,...n}));me.displayName="CloseButton";me.propTypes=qe;const Ke=me;var J;function he(t){if((!J&&J!==0||t)&&a.canUseDOM){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),J=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return J}function ce(t){t===void 0&&(t=a.ownerDocument());try{var e=t.activeElement;return!e||!e.nodeName?null:e}catch{return t.body}}function ze(t=document){const e=t.defaultView;return Math.abs(e.innerWidth-t.documentElement.clientWidth)}const xe=v.dataAttr("modal-open");class Ge{constructor({ownerDocument:e,handleContainerOverflow:s=!0,isRTL:n=!1}={}){this.handleContainerOverflow=s,this.isRTL=n,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return ze(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const s={overflow:"hidden"},n=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();e.style={overflow:r.style.overflow,[n]:r.style[n]},e.scrollBarWidth&&(s[n]=`${parseInt(a.style(r,n)||"0",10)+e.scrollBarWidth}px`),r.setAttribute(xe,""),a.style(r,s)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){const s=this.getElement();s.removeAttribute(xe),Object.assign(s.style,e.style)}add(e){let s=this.modals.indexOf(e);return s!==-1||(s=this.modals.length,this.modals.push(e),this.setModalAttributes(e),s!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),s}remove(e){const s=this.modals.indexOf(e);s!==-1&&(this.modals.splice(s,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}const fe=Ge,Ve=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function Xe(t,e){if(t==null)return{};var s={},n=Object.keys(t),r,i;for(i=0;i<n.length;i++)r=n[i],!(e.indexOf(r)>=0)&&(s[r]=t[r]);return s}let de;function Ye(t){return de||(de=new fe({ownerDocument:t==null?void 0:t.document})),de}function Je(t){const e=a.useWindow(),s=t||Ye(e),n=l.useRef({dialog:null,backdrop:null});return Object.assign(n.current,{add:()=>s.add(n.current),remove:()=>s.remove(n.current),isTopModal:()=>s.isTopModal(n.current),setDialogRef:l.useCallback(r=>{n.current.dialog=r},[]),setBackdropRef:l.useCallback(r=>{n.current.backdrop=r},[])})}const Ce=l.forwardRef((t,e)=>{let{show:s=!1,role:n="dialog",className:r,style:i,children:f,backdrop:u=!0,keyboard:g=!0,onBackdropClick:x,onEscapeKeyDown:m,transition:R,runTransition:j,backdropTransition:M,runBackdropTransition:Q,autoFocus:U=!0,enforceFocus:Z=!0,restoreFocus:w=!0,restoreFocusOptions:ee,renderDialog:P,renderBackdrop:te=d=>o.jsxRuntimeExports.jsx("div",Object.assign({},d)),manager:se,container:ne,onShow:_,onHide:A=()=>{},onExit:oe,onExited:D,onExiting:H,onEnter:q,onEntering:K,onEntered:z}=t,re=Xe(t,Ve);const C=a.useWindow(),N=a.useWaitForDOMRef(ne),p=Je(se),ae=a.useMounted(),G=v.usePrevious(s),[b,T]=l.useState(!s),E=l.useRef(null);l.useImperativeHandle(e,()=>p,[p]),a.canUseDOM&&!G&&s&&(E.current=ce(C==null?void 0:C.document)),s&&b&&T(!1);const y=a.useEventCallback(()=>{if(p.add(),k.current=a.listen(document,"keydown",le),I.current=a.listen(document,"focus",()=>setTimeout(ie),!0),_&&_(),U){var d,Y;const $=ce((d=(Y=p.dialog)==null?void 0:Y.ownerDocument)!=null?d:C==null?void 0:C.document);p.dialog&&$&&!a.contains(p.dialog,$)&&(E.current=$,p.dialog.focus())}}),F=a.useEventCallback(()=>{if(p.remove(),k.current==null||k.current(),I.current==null||I.current(),w){var d;(d=E.current)==null||d.focus==null||d.focus(ee),E.current=null}});l.useEffect(()=>{!s||!N||y()},[s,N,y]),l.useEffect(()=>{b&&F()},[b,F]),a.useWillUnmount(()=>{F()});const ie=a.useEventCallback(()=>{if(!Z||!ae()||!p.isTopModal())return;const d=ce(C==null?void 0:C.document);p.dialog&&d&&!a.contains(p.dialog,d)&&p.dialog.focus()}),V=a.useEventCallback(d=>{d.target===d.currentTarget&&(x==null||x(d),u===!0&&A())}),le=a.useEventCallback(d=>{g&&a.isEscKey(d)&&p.isTopModal()&&(m==null||m(d),d.defaultPrevented||A())}),I=l.useRef(),k=l.useRef(),X=(...d)=>{T(!0),D==null||D(...d)};if(!N)return null;const S=Object.assign({role:n,ref:p.setDialogRef,"aria-modal":n==="dialog"?!0:void 0},re,{style:i,className:r,tabIndex:-1});let W=P?P(S):o.jsxRuntimeExports.jsx("div",Object.assign({},S,{children:h.cloneElement(f,{role:"document"})}));W=a.renderTransition(R,j,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!s,onExit:oe,onExiting:H,onExited:X,onEnter:q,onEntering:K,onEntered:z,children:W});let O=null;return u&&(O=te({ref:p.setBackdropRef,onClick:V}),O=a.renderTransition(M,Q,{in:!!s,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:O})),o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:Ie.createPortal(o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[O,W]}),N)})});Ce.displayName="Modal";const Qe=Object.assign(Ce,{Manager:fe});function Ze(t,e){t.classList?t.classList.add(e):a.hasClass(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function Ee(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function et(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=Ee(t.className,e):t.setAttribute("class",Ee(t.className&&t.className.baseVal||"",e))}const L={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class tt extends fe{adjustAndStore(e,s,n){const r=s.style[e];s.dataset[e]=r,a.style(s,{[e]:`${parseFloat(a.style(s,e))+n}px`})}restore(e,s){const n=s.dataset[e];n!==void 0&&(delete s.dataset[e],a.style(s,{[e]:n}))}setContainerStyle(e){super.setContainerStyle(e);const s=this.getElement();if(Ze(s,"modal-open"),!e.scrollBarWidth)return;const n=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";v.qsa(s,L.FIXED_CONTENT).forEach(i=>this.adjustAndStore(n,i,e.scrollBarWidth)),v.qsa(s,L.STICKY_CONTENT).forEach(i=>this.adjustAndStore(r,i,-e.scrollBarWidth)),v.qsa(s,L.NAVBAR_TOGGLER).forEach(i=>this.adjustAndStore(r,i,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const s=this.getElement();et(s,"modal-open");const n=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";v.qsa(s,L.FIXED_CONTENT).forEach(i=>this.restore(n,i)),v.qsa(s,L.STICKY_CONTENT).forEach(i=>this.restore(r,i)),v.qsa(s,L.NAVBAR_TOGGLER).forEach(i=>this.restore(r,i))}}let ue;function st(t){return ue||(ue=new tt(t)),ue}const ye=h.forwardRef(({className:t,bsPrefix:e,as:s="div",...n},r)=>(e=a.useBootstrapPrefix(e,"modal-body"),o.jsxRuntimeExports.jsx(s,{ref:r,className:o.classNames(t,e),...n})));ye.displayName="ModalBody";const nt=ye,ot=h.createContext({onHide(){}}),Re=ot,je=h.forwardRef(({bsPrefix:t,className:e,contentClassName:s,centered:n,size:r,fullscreen:i,children:f,scrollable:u,...g},x)=>{t=a.useBootstrapPrefix(t,"modal");const m=`${t}-dialog`,R=typeof i=="string"?`${t}-fullscreen-${i}`:`${t}-fullscreen`;return o.jsxRuntimeExports.jsx("div",{...g,ref:x,className:o.classNames(m,e,r&&`${t}-${r}`,n&&`${m}-centered`,u&&`${m}-scrollable`,i&&R),children:o.jsxRuntimeExports.jsx("div",{className:o.classNames(`${t}-content`,s),children:f})})});je.displayName="ModalDialog";const be=je,Me=h.forwardRef(({className:t,bsPrefix:e,as:s="div",...n},r)=>(e=a.useBootstrapPrefix(e,"modal-footer"),o.jsxRuntimeExports.jsx(s,{ref:r,className:o.classNames(t,e),...n})));Me.displayName="ModalFooter";const rt=Me,at=h.forwardRef(({closeLabel:t="Close",closeVariant:e,closeButton:s=!1,onHide:n,children:r,...i},f)=>{const u=l.useContext(Re),g=a.useEventCallback(()=>{u==null||u.onHide(),n==null||n()});return o.jsxRuntimeExports.jsxs("div",{ref:f,...i,children:[r,s&&o.jsxRuntimeExports.jsx(Ke,{"aria-label":t,variant:e,onClick:g})]})}),it=at,we=h.forwardRef(({bsPrefix:t,className:e,closeLabel:s="Close",closeButton:n=!1,...r},i)=>(t=a.useBootstrapPrefix(t,"modal-header"),o.jsxRuntimeExports.jsx(it,{ref:i,...r,className:o.classNames(e,t),closeLabel:s,closeButton:n})));we.displayName="ModalHeader";const lt=we,ct=He("h4"),Ne=h.forwardRef(({className:t,bsPrefix:e,as:s=ct,...n},r)=>(e=a.useBootstrapPrefix(e,"modal-title"),o.jsxRuntimeExports.jsx(s,{ref:r,className:o.classNames(t,e),...n})));Ne.displayName="ModalTitle";const dt=Ne;function ut(t){return o.jsxRuntimeExports.jsx(a.Fade,{...t,timeout:null})}function mt(t){return o.jsxRuntimeExports.jsx(a.Fade,{...t,timeout:null})}const Te=h.forwardRef(({bsPrefix:t,className:e,style:s,dialogClassName:n,contentClassName:r,children:i,dialogAs:f=be,"data-bs-theme":u,"aria-labelledby":g,"aria-describedby":x,"aria-label":m,show:R=!1,animation:j=!0,backdrop:M=!0,keyboard:Q=!0,onEscapeKeyDown:U,onShow:Z,onHide:w,container:ee,autoFocus:P=!0,enforceFocus:te=!0,restoreFocus:se=!0,restoreFocusOptions:ne,onEntered:_,onExit:A,onExiting:oe,onEnter:D,onEntering:H,onExited:q,backdropClassName:K,manager:z,...re},C)=>{const[N,p]=l.useState({}),[ae,G]=l.useState(!1),b=l.useRef(!1),T=l.useRef(!1),E=l.useRef(null),[y,F]=a.useCallbackRef(),ie=a.useMergedRefs(C,F),V=a.useEventCallback(w),le=a.useIsRTL();t=a.useBootstrapPrefix(t,"modal");const I=l.useMemo(()=>({onHide:V}),[V]);function k(){return z||st({isRTL:le})}function X(c){if(!a.canUseDOM)return;const B=k().getScrollbarWidth()>0,ge=c.scrollHeight>a.ownerDocument(c).documentElement.clientHeight;p({paddingRight:B&&!ge?he():void 0,paddingLeft:!B&&ge?he():void 0})}const S=a.useEventCallback(()=>{y&&X(y.dialog)});a.useWillUnmount(()=>{a.removeEventListener(window,"resize",S),E.current==null||E.current()});const W=()=>{b.current=!0},O=c=>{b.current&&y&&c.target===y.dialog&&(T.current=!0),b.current=!1},d=()=>{G(!0),E.current=a.transitionEnd(y.dialog,()=>{G(!1)})},Y=c=>{c.target===c.currentTarget&&d()},$=c=>{if(M==="static"){Y(c);return}if(T.current||c.target!==c.currentTarget){T.current=!1;return}w==null||w()},ke=c=>{Q?U==null||U(c):(c.preventDefault(),M==="static"&&d())},Se=(c,B)=>{c&&X(c),D==null||D(c,B)},Oe=c=>{E.current==null||E.current(),A==null||A(c)},Be=(c,B)=>{H==null||H(c,B),a.addEventListener(window,"resize",S)},Le=c=>{c&&(c.style.display=""),q==null||q(c),a.removeEventListener(window,"resize",S)},Ae=l.useCallback(c=>o.jsxRuntimeExports.jsx("div",{...c,className:o.classNames(`${t}-backdrop`,K,!j&&"show")}),[j,K,t]),pe={...s,...N};pe.display="block";const De=c=>o.jsxRuntimeExports.jsx("div",{role:"dialog",...c,style:pe,className:o.classNames(e,t,ae&&`${t}-static`,!j&&"show"),onClick:M?$:void 0,onMouseUp:O,"data-bs-theme":u,"aria-label":m,"aria-labelledby":g,"aria-describedby":x,children:o.jsxRuntimeExports.jsx(f,{...re,onMouseDown:W,className:n,contentClassName:r,children:i})});return o.jsxRuntimeExports.jsx(Re.Provider,{value:I,children:o.jsxRuntimeExports.jsx(Qe,{show:R,ref:ie,backdrop:M,container:ee,keyboard:!0,autoFocus:P,enforceFocus:te,restoreFocus:se,restoreFocusOptions:ne,onEscapeKeyDown:ke,onShow:Z,onHide:w,onEnter:Se,onEntering:Be,onEntered:_,onExit:Oe,onExiting:oe,onExited:Le,manager:k(),transition:j?ut:void 0,backdropTransition:j?mt:void 0,renderBackdrop:Ae,renderDialog:De})})});Te.displayName="Modal";const ve=Object.assign(Te,{Body:nt,Header:lt,Title:dt,Footer:rt,Dialog:be,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),ft=()=>{const{confirmTexts:t}=l.useContext(o.LuminusComponentsContext),{onConfirm:e,onCancel:s,text:n,show:r}=Fe.useConfirm();return o.jsxRuntimeExports.jsx(ve,{show:r,size:"sm",centered:!0,onHide:s,children:o.jsxRuntimeExports.jsxs(ve.Body,{children:[o.jsxRuntimeExports.jsx("div",{className:"mb-5 text-center",children:o.jsxRuntimeExports.jsx(v.Typography,{variant:"h6",children:n})}),o.jsxRuntimeExports.jsxs("div",{className:"w-100 d-flex gap-5",children:[o.jsxRuntimeExports.jsx("button",{type:"button",className:"btn btn-secondary w-100",onClick:s,children:t.no}),o.jsxRuntimeExports.jsx("button",{type:"button",className:"btn btn-primary w-100 ml",onClick:e,children:t.yes})]})]})})};exports.LoadingContext=o.LoadingContext;exports.LuminusComponentsContext=o.LuminusComponentsContext;exports.UserContext=o.UserContext;exports.LoadingProvider=Pe;exports.LuminusComponentsProvider=Ue;exports.UserProvider=_e;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./SimplePicker.module-De0azFIA.js"),l=require("react"),v=require("./DataKey-C5l4FOL1.js"),Fe=require("./useConfirm-BG0v5BwQ.js"),a=require("./hasClass-DXhjqDzJ.js"),Ie=require("react-dom");function We(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,n.get?n:{enumerable:!0,get:()=>t[s]})}}return e.default=t,Object.freeze(e)}const h=We(l),$e=({children:t})=>{const[e,s]=l.useState(!1),[n,r]=l.useState(""),i=l.useCallback(g=>{s(!0),r(g)},[]),f=l.useCallback(()=>{s(!1)},[]),u=l.useMemo(()=>({show:e,text:n,showConfirm:i,hideConfirm:f}),[e,n,i,f]);return o.jsxRuntimeExports.jsxs(o.ConfirmContext.Provider,{value:u,children:[o.jsxRuntimeExports.jsx(ft,{}),t]})},Ue=({axiosInstance:t,LinkComponent:e,language:s,axiosTexts:n,confirmTexts:r,formValidationTexts:i,homeDashboardTexts:f,formSubmitTexts:u,children:g})=>{const x=l.useMemo(()=>({axiosInstance:t,LinkComponent:e,language:s,axiosTexts:n,confirmTexts:r,formValidationTexts:i,homeDashboardTexts:f,formSubmitTexts:u}),[t,e,s,n,r,i,f,u]);return o.jsxRuntimeExports.jsx(o.LuminusComponentsContext.Provider,{value:x,children:o.jsxRuntimeExports.jsxs($e,{children:[o.jsxRuntimeExports.jsx(o.Ie,{}),g]})})},Pe=({children:t})=>{const[e,s]=l.useState(!1),[n]=l.useState(new Set),r=l.useCallback(u=>{n.add(u),s(!0)},[n]),i=l.useCallback(u=>{n.delete(u),n.size===0&&s(!1)},[n]),f=l.useMemo(()=>({isLoading:e,startLoading:r,stopLoading:i}),[e,r,i]);return o.jsxRuntimeExports.jsxs(o.LoadingContext.Provider,{value:f,children:[e&&o.jsxRuntimeExports.jsx(v.Loading,{}),t]})},_e=({children:t})=>{const e=o.useAxios(),s=l.useCallback(()=>{const m=localStorage.getItem("user")??null;return m?JSON.parse(m):null},[]),[n,r]=l.useState(s()),i=l.useCallback(async()=>{let m=null;return await e.get("/user/detail").then(R=>{m=R.data}).catch(()=>{m=null}),localStorage.setItem("user",JSON.stringify(m)),m},[e]),f=l.useCallback(()=>{localStorage.removeItem("user")},[]),u=l.useCallback(async()=>{const m=await i();return m?(r(m),!0):!1},[i]),g=l.useCallback(()=>{f(),r(null)},[f]),x=l.useMemo(()=>({user:n,loginUser:u,logoutUser:g}),[n,u,g]);return l.useEffect(()=>{r(s())},[s]),o.jsxRuntimeExports.jsx(o.UserContext.Provider,{value:x,children:t})},He=t=>h.forwardRef((e,s)=>o.jsxRuntimeExports.jsx("div",{...e,ref:s,className:o.classNames(e.className,t)})),qe={"aria-label":a.PropTypes.string,onClick:a.PropTypes.func,variant:a.PropTypes.oneOf(["white"])},me=h.forwardRef(({className:t,variant:e,"aria-label":s="Close",...n},r)=>o.jsxRuntimeExports.jsx("button",{ref:r,type:"button",className:o.classNames("btn-close",e&&`btn-close-${e}`,t),"aria-label":s,...n}));me.displayName="CloseButton";me.propTypes=qe;const Ke=me;var J;function he(t){if((!J&&J!==0||t)&&a.canUseDOM){var e=document.createElement("div");e.style.position="absolute",e.style.top="-9999px",e.style.width="50px",e.style.height="50px",e.style.overflow="scroll",document.body.appendChild(e),J=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return J}function ce(t){t===void 0&&(t=a.ownerDocument());try{var e=t.activeElement;return!e||!e.nodeName?null:e}catch{return t.body}}function ze(t=document){const e=t.defaultView;return Math.abs(e.innerWidth-t.documentElement.clientWidth)}const xe=v.dataAttr("modal-open");class Ge{constructor({ownerDocument:e,handleContainerOverflow:s=!0,isRTL:n=!1}={}){this.handleContainerOverflow=s,this.isRTL=n,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return ze(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const s={overflow:"hidden"},n=this.isRTL?"paddingLeft":"paddingRight",r=this.getElement();e.style={overflow:r.style.overflow,[n]:r.style[n]},e.scrollBarWidth&&(s[n]=`${parseInt(a.style(r,n)||"0",10)+e.scrollBarWidth}px`),r.setAttribute(xe,""),a.style(r,s)}reset(){[...this.modals].forEach(e=>this.remove(e))}removeContainerStyle(e){const s=this.getElement();s.removeAttribute(xe),Object.assign(s.style,e.style)}add(e){let s=this.modals.indexOf(e);return s!==-1||(s=this.modals.length,this.modals.push(e),this.setModalAttributes(e),s!==0)||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state)),s}remove(e){const s=this.modals.indexOf(e);s!==-1&&(this.modals.splice(s,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}const fe=Ge,Ve=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];function Xe(t,e){if(t==null)return{};var s={},n=Object.keys(t),r,i;for(i=0;i<n.length;i++)r=n[i],!(e.indexOf(r)>=0)&&(s[r]=t[r]);return s}let de;function Ye(t){return de||(de=new fe({ownerDocument:t==null?void 0:t.document})),de}function Je(t){const e=a.useWindow(),s=t||Ye(e),n=l.useRef({dialog:null,backdrop:null});return Object.assign(n.current,{add:()=>s.add(n.current),remove:()=>s.remove(n.current),isTopModal:()=>s.isTopModal(n.current),setDialogRef:l.useCallback(r=>{n.current.dialog=r},[]),setBackdropRef:l.useCallback(r=>{n.current.backdrop=r},[])})}const Ce=l.forwardRef((t,e)=>{let{show:s=!1,role:n="dialog",className:r,style:i,children:f,backdrop:u=!0,keyboard:g=!0,onBackdropClick:x,onEscapeKeyDown:m,transition:R,runTransition:j,backdropTransition:M,runBackdropTransition:Q,autoFocus:U=!0,enforceFocus:Z=!0,restoreFocus:w=!0,restoreFocusOptions:ee,renderDialog:P,renderBackdrop:te=d=>o.jsxRuntimeExports.jsx("div",Object.assign({},d)),manager:se,container:ne,onShow:_,onHide:A=()=>{},onExit:oe,onExited:D,onExiting:H,onEnter:q,onEntering:K,onEntered:z}=t,re=Xe(t,Ve);const C=a.useWindow(),N=a.useWaitForDOMRef(ne),p=Je(se),ae=a.useMounted(),G=v.usePrevious(s),[b,T]=l.useState(!s),E=l.useRef(null);l.useImperativeHandle(e,()=>p,[p]),a.canUseDOM&&!G&&s&&(E.current=ce(C==null?void 0:C.document)),s&&b&&T(!1);const y=a.useEventCallback(()=>{if(p.add(),k.current=a.listen(document,"keydown",le),I.current=a.listen(document,"focus",()=>setTimeout(ie),!0),_&&_(),U){var d,Y;const $=ce((d=(Y=p.dialog)==null?void 0:Y.ownerDocument)!=null?d:C==null?void 0:C.document);p.dialog&&$&&!a.contains(p.dialog,$)&&(E.current=$,p.dialog.focus())}}),F=a.useEventCallback(()=>{if(p.remove(),k.current==null||k.current(),I.current==null||I.current(),w){var d;(d=E.current)==null||d.focus==null||d.focus(ee),E.current=null}});l.useEffect(()=>{!s||!N||y()},[s,N,y]),l.useEffect(()=>{b&&F()},[b,F]),a.useWillUnmount(()=>{F()});const ie=a.useEventCallback(()=>{if(!Z||!ae()||!p.isTopModal())return;const d=ce(C==null?void 0:C.document);p.dialog&&d&&!a.contains(p.dialog,d)&&p.dialog.focus()}),V=a.useEventCallback(d=>{d.target===d.currentTarget&&(x==null||x(d),u===!0&&A())}),le=a.useEventCallback(d=>{g&&a.isEscKey(d)&&p.isTopModal()&&(m==null||m(d),d.defaultPrevented||A())}),I=l.useRef(),k=l.useRef(),X=(...d)=>{T(!0),D==null||D(...d)};if(!N)return null;const S=Object.assign({role:n,ref:p.setDialogRef,"aria-modal":n==="dialog"?!0:void 0},re,{style:i,className:r,tabIndex:-1});let W=P?P(S):o.jsxRuntimeExports.jsx("div",Object.assign({},S,{children:h.cloneElement(f,{role:"document"})}));W=a.renderTransition(R,j,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!s,onExit:oe,onExiting:H,onExited:X,onEnter:q,onEntering:K,onEntered:z,children:W});let O=null;return u&&(O=te({ref:p.setBackdropRef,onClick:V}),O=a.renderTransition(M,Q,{in:!!s,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:O})),o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:Ie.createPortal(o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[O,W]}),N)})});Ce.displayName="Modal";const Qe=Object.assign(Ce,{Manager:fe});function Ze(t,e){t.classList?t.classList.add(e):a.hasClass(t,e)||(typeof t.className=="string"?t.className=t.className+" "+e:t.setAttribute("class",(t.className&&t.className.baseVal||"")+" "+e))}function Ee(t,e){return t.replace(new RegExp("(^|\\s)"+e+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function et(t,e){t.classList?t.classList.remove(e):typeof t.className=="string"?t.className=Ee(t.className,e):t.setAttribute("class",Ee(t.className&&t.className.baseVal||"",e))}const L={FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"};class tt extends fe{adjustAndStore(e,s,n){const r=s.style[e];s.dataset[e]=r,a.style(s,{[e]:`${parseFloat(a.style(s,e))+n}px`})}restore(e,s){const n=s.dataset[e];n!==void 0&&(delete s.dataset[e],a.style(s,{[e]:n}))}setContainerStyle(e){super.setContainerStyle(e);const s=this.getElement();if(Ze(s,"modal-open"),!e.scrollBarWidth)return;const n=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";v.qsa(s,L.FIXED_CONTENT).forEach(i=>this.adjustAndStore(n,i,e.scrollBarWidth)),v.qsa(s,L.STICKY_CONTENT).forEach(i=>this.adjustAndStore(r,i,-e.scrollBarWidth)),v.qsa(s,L.NAVBAR_TOGGLER).forEach(i=>this.adjustAndStore(r,i,e.scrollBarWidth))}removeContainerStyle(e){super.removeContainerStyle(e);const s=this.getElement();et(s,"modal-open");const n=this.isRTL?"paddingLeft":"paddingRight",r=this.isRTL?"marginLeft":"marginRight";v.qsa(s,L.FIXED_CONTENT).forEach(i=>this.restore(n,i)),v.qsa(s,L.STICKY_CONTENT).forEach(i=>this.restore(r,i)),v.qsa(s,L.NAVBAR_TOGGLER).forEach(i=>this.restore(r,i))}}let ue;function st(t){return ue||(ue=new tt(t)),ue}const ye=h.forwardRef(({className:t,bsPrefix:e,as:s="div",...n},r)=>(e=a.useBootstrapPrefix(e,"modal-body"),o.jsxRuntimeExports.jsx(s,{ref:r,className:o.classNames(t,e),...n})));ye.displayName="ModalBody";const nt=ye,ot=h.createContext({onHide(){}}),Re=ot,je=h.forwardRef(({bsPrefix:t,className:e,contentClassName:s,centered:n,size:r,fullscreen:i,children:f,scrollable:u,...g},x)=>{t=a.useBootstrapPrefix(t,"modal");const m=`${t}-dialog`,R=typeof i=="string"?`${t}-fullscreen-${i}`:`${t}-fullscreen`;return o.jsxRuntimeExports.jsx("div",{...g,ref:x,className:o.classNames(m,e,r&&`${t}-${r}`,n&&`${m}-centered`,u&&`${m}-scrollable`,i&&R),children:o.jsxRuntimeExports.jsx("div",{className:o.classNames(`${t}-content`,s),children:f})})});je.displayName="ModalDialog";const be=je,Me=h.forwardRef(({className:t,bsPrefix:e,as:s="div",...n},r)=>(e=a.useBootstrapPrefix(e,"modal-footer"),o.jsxRuntimeExports.jsx(s,{ref:r,className:o.classNames(t,e),...n})));Me.displayName="ModalFooter";const rt=Me,at=h.forwardRef(({closeLabel:t="Close",closeVariant:e,closeButton:s=!1,onHide:n,children:r,...i},f)=>{const u=l.useContext(Re),g=a.useEventCallback(()=>{u==null||u.onHide(),n==null||n()});return o.jsxRuntimeExports.jsxs("div",{ref:f,...i,children:[r,s&&o.jsxRuntimeExports.jsx(Ke,{"aria-label":t,variant:e,onClick:g})]})}),it=at,we=h.forwardRef(({bsPrefix:t,className:e,closeLabel:s="Close",closeButton:n=!1,...r},i)=>(t=a.useBootstrapPrefix(t,"modal-header"),o.jsxRuntimeExports.jsx(it,{ref:i,...r,className:o.classNames(e,t),closeLabel:s,closeButton:n})));we.displayName="ModalHeader";const lt=we,ct=He("h4"),Ne=h.forwardRef(({className:t,bsPrefix:e,as:s=ct,...n},r)=>(e=a.useBootstrapPrefix(e,"modal-title"),o.jsxRuntimeExports.jsx(s,{ref:r,className:o.classNames(t,e),...n})));Ne.displayName="ModalTitle";const dt=Ne;function ut(t){return o.jsxRuntimeExports.jsx(a.Fade,{...t,timeout:null})}function mt(t){return o.jsxRuntimeExports.jsx(a.Fade,{...t,timeout:null})}const Te=h.forwardRef(({bsPrefix:t,className:e,style:s,dialogClassName:n,contentClassName:r,children:i,dialogAs:f=be,"data-bs-theme":u,"aria-labelledby":g,"aria-describedby":x,"aria-label":m,show:R=!1,animation:j=!0,backdrop:M=!0,keyboard:Q=!0,onEscapeKeyDown:U,onShow:Z,onHide:w,container:ee,autoFocus:P=!0,enforceFocus:te=!0,restoreFocus:se=!0,restoreFocusOptions:ne,onEntered:_,onExit:A,onExiting:oe,onEnter:D,onEntering:H,onExited:q,backdropClassName:K,manager:z,...re},C)=>{const[N,p]=l.useState({}),[ae,G]=l.useState(!1),b=l.useRef(!1),T=l.useRef(!1),E=l.useRef(null),[y,F]=a.useCallbackRef(),ie=a.useMergedRefs(C,F),V=a.useEventCallback(w),le=a.useIsRTL();t=a.useBootstrapPrefix(t,"modal");const I=l.useMemo(()=>({onHide:V}),[V]);function k(){return z||st({isRTL:le})}function X(c){if(!a.canUseDOM)return;const B=k().getScrollbarWidth()>0,ge=c.scrollHeight>a.ownerDocument(c).documentElement.clientHeight;p({paddingRight:B&&!ge?he():void 0,paddingLeft:!B&&ge?he():void 0})}const S=a.useEventCallback(()=>{y&&X(y.dialog)});a.useWillUnmount(()=>{a.removeEventListener(window,"resize",S),E.current==null||E.current()});const W=()=>{b.current=!0},O=c=>{b.current&&y&&c.target===y.dialog&&(T.current=!0),b.current=!1},d=()=>{G(!0),E.current=a.transitionEnd(y.dialog,()=>{G(!1)})},Y=c=>{c.target===c.currentTarget&&d()},$=c=>{if(M==="static"){Y(c);return}if(T.current||c.target!==c.currentTarget){T.current=!1;return}w==null||w()},ke=c=>{Q?U==null||U(c):(c.preventDefault(),M==="static"&&d())},Se=(c,B)=>{c&&X(c),D==null||D(c,B)},Oe=c=>{E.current==null||E.current(),A==null||A(c)},Be=(c,B)=>{H==null||H(c,B),a.addEventListener(window,"resize",S)},Le=c=>{c&&(c.style.display=""),q==null||q(c),a.removeEventListener(window,"resize",S)},Ae=l.useCallback(c=>o.jsxRuntimeExports.jsx("div",{...c,className:o.classNames(`${t}-backdrop`,K,!j&&"show")}),[j,K,t]),pe={...s,...N};pe.display="block";const De=c=>o.jsxRuntimeExports.jsx("div",{role:"dialog",...c,style:pe,className:o.classNames(e,t,ae&&`${t}-static`,!j&&"show"),onClick:M?$:void 0,onMouseUp:O,"data-bs-theme":u,"aria-label":m,"aria-labelledby":g,"aria-describedby":x,children:o.jsxRuntimeExports.jsx(f,{...re,onMouseDown:W,className:n,contentClassName:r,children:i})});return o.jsxRuntimeExports.jsx(Re.Provider,{value:I,children:o.jsxRuntimeExports.jsx(Qe,{show:R,ref:ie,backdrop:M,container:ee,keyboard:!0,autoFocus:P,enforceFocus:te,restoreFocus:se,restoreFocusOptions:ne,onEscapeKeyDown:ke,onShow:Z,onHide:w,onEnter:Se,onEntering:Be,onEntered:_,onExit:Oe,onExiting:oe,onExited:Le,manager:k(),transition:j?ut:void 0,backdropTransition:j?mt:void 0,renderBackdrop:Ae,renderDialog:De})})});Te.displayName="Modal";const ve=Object.assign(Te,{Body:nt,Header:lt,Title:dt,Footer:rt,Dialog:be,TRANSITION_DURATION:300,BACKDROP_TRANSITION_DURATION:150}),ft=()=>{const{confirmTexts:t}=l.useContext(o.LuminusComponentsContext),{onConfirm:e,onCancel:s,text:n,show:r}=Fe.useConfirm();return o.jsxRuntimeExports.jsx(ve,{show:r,size:"sm",centered:!0,onHide:s,children:o.jsxRuntimeExports.jsxs(ve.Body,{children:[o.jsxRuntimeExports.jsx("div",{className:"mb-5 text-center",children:o.jsxRuntimeExports.jsx(v.Typography,{variant:"h6",children:n})}),o.jsxRuntimeExports.jsxs("div",{className:"w-100 d-flex gap-5",children:[o.jsxRuntimeExports.jsx("button",{type:"button",className:"btn btn-secondary w-100",onClick:s,children:t.no}),o.jsxRuntimeExports.jsx("button",{type:"button",className:"btn btn-primary w-100 ml",onClick:e,children:t.yes})]})]})})};exports.LoadingContext=o.LoadingContext;exports.LuminusComponentsContext=o.LuminusComponentsContext;exports.UserContext=o.UserContext;exports.LoadingProvider=Pe;exports.LuminusComponentsProvider=Ue;exports.UserProvider=_e;
|
package/dist/contexts.es.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { j as a, C as tt, L as Ae, I as ot, g as nt, b as st, U as rt, d as y } from "./
|
|
2
|
-
import * as
|
|
3
|
-
import { useState as M, useCallback as
|
|
4
|
-
import { L as lt, d as dt, u as ct, q as D, T as ut } from "./DataKey-
|
|
5
|
-
import { u as ft } from "./useConfirm-
|
|
6
|
-
import { P as
|
|
1
|
+
import { j as a, C as tt, L as Ae, I as ot, g as nt, b as st, U as rt, d as y } from "./SimplePicker.module--OMl78Ir.mjs";
|
|
2
|
+
import * as m from "react";
|
|
3
|
+
import { useState as M, useCallback as g, useMemo as G, useEffect as Ce, forwardRef as at, useRef as N, useImperativeHandle as it, useContext as Le } from "react";
|
|
4
|
+
import { L as lt, d as dt, u as ct, q as D, T as ut } from "./DataKey-BSoaCf9L.mjs";
|
|
5
|
+
import { u as ft } from "./useConfirm-CGg-p14L.mjs";
|
|
6
|
+
import { P as me, c as Ee, o as De, s as z, u as Fe, a as ht, b as gt, d as w, l as Te, e as Ne, f as Ie, i as mt, r as Re, h as pt, g as I, j as vt, k as yt, m as Ct, n as je, F as $e, p as Et, t as wt } from "./hasClass-D4r9EJyq.mjs";
|
|
7
7
|
import Mt from "react-dom";
|
|
8
8
|
const xt = ({ children: t }) => {
|
|
9
|
-
const [e, o] = M(!1), [n, s] = M(""), r =
|
|
9
|
+
const [e, o] = M(!1), [n, s] = M(""), r = g((h) => {
|
|
10
10
|
o(!0), s(h);
|
|
11
|
-
}, []), u =
|
|
11
|
+
}, []), u = g(() => {
|
|
12
12
|
o(!1);
|
|
13
13
|
}, []), d = G(() => ({ show: e, text: n, showConfirm: r, hideConfirm: u }), [e, n, r, u]);
|
|
14
14
|
return /* @__PURE__ */ a.jsxs(tt.Provider, { value: d, children: [
|
|
15
15
|
/* @__PURE__ */ a.jsx(Xt, {}),
|
|
16
16
|
t
|
|
17
17
|
] });
|
|
18
|
-
}, to = ({ axiosInstance: t, LinkComponent: e, language: o, axiosTexts: n, confirmTexts: s, formValidationTexts: r,
|
|
18
|
+
}, to = ({ axiosInstance: t, LinkComponent: e, language: o, axiosTexts: n, confirmTexts: s, formValidationTexts: r, homeDashboardTexts: u, formSubmitTexts: d, children: h }) => {
|
|
19
19
|
const p = G(() => ({
|
|
20
20
|
axiosInstance: t,
|
|
21
21
|
LinkComponent: e,
|
|
@@ -23,8 +23,8 @@ const xt = ({ children: t }) => {
|
|
|
23
23
|
axiosTexts: n,
|
|
24
24
|
confirmTexts: s,
|
|
25
25
|
formValidationTexts: r,
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
homeDashboardTexts: u,
|
|
27
|
+
formSubmitTexts: d
|
|
28
28
|
}), [
|
|
29
29
|
t,
|
|
30
30
|
e,
|
|
@@ -40,9 +40,9 @@ const xt = ({ children: t }) => {
|
|
|
40
40
|
h
|
|
41
41
|
] }) });
|
|
42
42
|
}, oo = ({ children: t }) => {
|
|
43
|
-
const [e, o] = M(!1), [n] = M(/* @__PURE__ */ new Set()), s =
|
|
43
|
+
const [e, o] = M(!1), [n] = M(/* @__PURE__ */ new Set()), s = g((d) => {
|
|
44
44
|
n.add(d), o(!0);
|
|
45
|
-
}, [n]), r =
|
|
45
|
+
}, [n]), r = g((d) => {
|
|
46
46
|
n.delete(d), n.size === 0 && o(!1);
|
|
47
47
|
}, [n]), u = G(() => ({ isLoading: e, startLoading: s, stopLoading: r }), [e, s, r]);
|
|
48
48
|
return /* @__PURE__ */ a.jsxs(nt.Provider, { value: u, children: [
|
|
@@ -50,43 +50,43 @@ const xt = ({ children: t }) => {
|
|
|
50
50
|
t
|
|
51
51
|
] });
|
|
52
52
|
}, no = ({ children: t }) => {
|
|
53
|
-
const e = st(), o =
|
|
53
|
+
const e = st(), o = g(() => {
|
|
54
54
|
const c = localStorage.getItem("user") ?? null;
|
|
55
55
|
return c ? JSON.parse(c) : null;
|
|
56
|
-
}, []), [n, s] = M(o()), r =
|
|
56
|
+
}, []), [n, s] = M(o()), r = g(async () => {
|
|
57
57
|
let c = null;
|
|
58
58
|
return await e.get("/user/detail").then((x) => {
|
|
59
59
|
c = x.data;
|
|
60
60
|
}).catch(() => {
|
|
61
61
|
c = null;
|
|
62
62
|
}), localStorage.setItem("user", JSON.stringify(c)), c;
|
|
63
|
-
}, [e]), u =
|
|
63
|
+
}, [e]), u = g(() => {
|
|
64
64
|
localStorage.removeItem("user");
|
|
65
|
-
}, []), d =
|
|
65
|
+
}, []), d = g(async () => {
|
|
66
66
|
const c = await r();
|
|
67
67
|
return c ? (s(c), !0) : !1;
|
|
68
|
-
}, [r]), h =
|
|
68
|
+
}, [r]), h = g(() => {
|
|
69
69
|
u(), s(null);
|
|
70
70
|
}, [u]), p = G(() => ({ user: n, loginUser: d, logoutUser: h }), [n, d, h]);
|
|
71
71
|
return Ce(() => {
|
|
72
72
|
s(o());
|
|
73
73
|
}, [o]), /* @__PURE__ */ a.jsx(rt.Provider, { value: p, children: t });
|
|
74
|
-
}, bt = (t) => /* @__PURE__ */
|
|
74
|
+
}, bt = (t) => /* @__PURE__ */ m.forwardRef((e, o) => /* @__PURE__ */ a.jsx("div", {
|
|
75
75
|
...e,
|
|
76
76
|
ref: o,
|
|
77
77
|
className: y(e.className, t)
|
|
78
78
|
})), Tt = {
|
|
79
79
|
/** An accessible label indicating the relevant information about the Close Button. */
|
|
80
|
-
"aria-label":
|
|
80
|
+
"aria-label": me.string,
|
|
81
81
|
/** A callback fired after the Close Button is clicked. */
|
|
82
|
-
onClick:
|
|
82
|
+
onClick: me.func,
|
|
83
83
|
/**
|
|
84
84
|
* Render different color variant for the button.
|
|
85
85
|
*
|
|
86
86
|
* Omitting this will render the default dark color.
|
|
87
87
|
*/
|
|
88
|
-
variant:
|
|
89
|
-
}, we = /* @__PURE__ */
|
|
88
|
+
variant: me.oneOf(["white"])
|
|
89
|
+
}, we = /* @__PURE__ */ m.forwardRef(({
|
|
90
90
|
className: t,
|
|
91
91
|
variant: e,
|
|
92
92
|
"aria-label": o = "Close",
|
|
@@ -196,10 +196,10 @@ function Bt(t) {
|
|
|
196
196
|
add: () => o.add(n.current),
|
|
197
197
|
remove: () => o.remove(n.current),
|
|
198
198
|
isTopModal: () => o.isTopModal(n.current),
|
|
199
|
-
setDialogRef:
|
|
199
|
+
setDialogRef: g((s) => {
|
|
200
200
|
n.current.dialog = s;
|
|
201
201
|
}, []),
|
|
202
|
-
setBackdropRef:
|
|
202
|
+
setBackdropRef: g((s) => {
|
|
203
203
|
n.current.backdrop = s;
|
|
204
204
|
}, [])
|
|
205
205
|
});
|
|
@@ -237,10 +237,10 @@ const We = /* @__PURE__ */ at((t, e) => {
|
|
|
237
237
|
onEntering: J,
|
|
238
238
|
onEntered: Q
|
|
239
239
|
} = t, ue = Ot(t, kt);
|
|
240
|
-
const C = Fe(), k = ht(de), f = Bt(le), fe =
|
|
240
|
+
const C = Fe(), k = ht(de), f = Bt(le), fe = gt(), Z = ct(o), [T, O] = M(!o), v = N(null);
|
|
241
241
|
it(e, () => f, [f]), Ee && !Z && o && (v.current = pe(C == null ? void 0 : C.document)), o && T && O(!1);
|
|
242
242
|
const E = w(() => {
|
|
243
|
-
if (f.add(), S.current = Te(document, "keydown",
|
|
243
|
+
if (f.add(), S.current = Te(document, "keydown", ge), H.current = Te(
|
|
244
244
|
document,
|
|
245
245
|
"focus",
|
|
246
246
|
// the timeout is necessary b/c this will run before the new modal is mounted
|
|
@@ -277,8 +277,8 @@ const We = /* @__PURE__ */ at((t, e) => {
|
|
|
277
277
|
f.dialog && l && !Ne(f.dialog, l) && f.dialog.focus();
|
|
278
278
|
}), ee = w((l) => {
|
|
279
279
|
l.target === l.currentTarget && (p == null || p(l), d === !0 && $());
|
|
280
|
-
}),
|
|
281
|
-
h &&
|
|
280
|
+
}), ge = w((l) => {
|
|
281
|
+
h && mt(l) && f.isTopModal() && (c == null || c(l), l.defaultPrevented || $());
|
|
282
282
|
}), H = N(), S = N(), te = (...l) => {
|
|
283
283
|
O(!0), W == null || W(...l);
|
|
284
284
|
};
|
|
@@ -295,7 +295,7 @@ const We = /* @__PURE__ */ at((t, e) => {
|
|
|
295
295
|
tabIndex: -1
|
|
296
296
|
});
|
|
297
297
|
let _ = V ? V(B) : /* @__PURE__ */ a.jsx("div", Object.assign({}, B, {
|
|
298
|
-
children: /* @__PURE__ */
|
|
298
|
+
children: /* @__PURE__ */ m.cloneElement(u, {
|
|
299
299
|
role: "document"
|
|
300
300
|
})
|
|
301
301
|
}));
|
|
@@ -379,7 +379,7 @@ let ye;
|
|
|
379
379
|
function It(t) {
|
|
380
380
|
return ye || (ye = new Ft(t)), ye;
|
|
381
381
|
}
|
|
382
|
-
const Ue = /* @__PURE__ */
|
|
382
|
+
const Ue = /* @__PURE__ */ m.forwardRef(({
|
|
383
383
|
className: t,
|
|
384
384
|
bsPrefix: e,
|
|
385
385
|
as: o = "div",
|
|
@@ -390,11 +390,11 @@ const Ue = /* @__PURE__ */ g.forwardRef(({
|
|
|
390
390
|
...n
|
|
391
391
|
})));
|
|
392
392
|
Ue.displayName = "ModalBody";
|
|
393
|
-
const $t = Ue, Wt = /* @__PURE__ */
|
|
393
|
+
const $t = Ue, Wt = /* @__PURE__ */ m.createContext({
|
|
394
394
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
395
395
|
onHide() {
|
|
396
396
|
}
|
|
397
|
-
}), He = Wt, _e = /* @__PURE__ */
|
|
397
|
+
}), He = Wt, _e = /* @__PURE__ */ m.forwardRef(({
|
|
398
398
|
bsPrefix: t,
|
|
399
399
|
className: e,
|
|
400
400
|
contentClassName: o,
|
|
@@ -418,7 +418,7 @@ const $t = Ue, Wt = /* @__PURE__ */ g.createContext({
|
|
|
418
418
|
});
|
|
419
419
|
});
|
|
420
420
|
_e.displayName = "ModalDialog";
|
|
421
|
-
const Ke = _e, ze = /* @__PURE__ */
|
|
421
|
+
const Ke = _e, ze = /* @__PURE__ */ m.forwardRef(({
|
|
422
422
|
className: t,
|
|
423
423
|
bsPrefix: e,
|
|
424
424
|
as: o = "div",
|
|
@@ -429,7 +429,7 @@ const Ke = _e, ze = /* @__PURE__ */ g.forwardRef(({
|
|
|
429
429
|
...n
|
|
430
430
|
})));
|
|
431
431
|
ze.displayName = "ModalFooter";
|
|
432
|
-
const Ut = ze, Ht = /* @__PURE__ */
|
|
432
|
+
const Ut = ze, Ht = /* @__PURE__ */ m.forwardRef(({
|
|
433
433
|
closeLabel: t = "Close",
|
|
434
434
|
closeVariant: e,
|
|
435
435
|
closeButton: o = !1,
|
|
@@ -449,7 +449,7 @@ const Ut = ze, Ht = /* @__PURE__ */ g.forwardRef(({
|
|
|
449
449
|
onClick: h
|
|
450
450
|
})]
|
|
451
451
|
});
|
|
452
|
-
}), _t = Ht, Ge = /* @__PURE__ */
|
|
452
|
+
}), _t = Ht, Ge = /* @__PURE__ */ m.forwardRef(({
|
|
453
453
|
bsPrefix: t,
|
|
454
454
|
className: e,
|
|
455
455
|
closeLabel: o = "Close",
|
|
@@ -463,7 +463,7 @@ const Ut = ze, Ht = /* @__PURE__ */ g.forwardRef(({
|
|
|
463
463
|
closeButton: n
|
|
464
464
|
})));
|
|
465
465
|
Ge.displayName = "ModalHeader";
|
|
466
|
-
const Kt = Ge, zt = bt("h4"), Pe = /* @__PURE__ */
|
|
466
|
+
const Kt = Ge, zt = bt("h4"), Pe = /* @__PURE__ */ m.forwardRef(({
|
|
467
467
|
className: t,
|
|
468
468
|
bsPrefix: e,
|
|
469
469
|
as: o = zt,
|
|
@@ -487,7 +487,7 @@ function Vt(t) {
|
|
|
487
487
|
timeout: null
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
|
-
const Ve = /* @__PURE__ */
|
|
490
|
+
const Ve = /* @__PURE__ */ m.forwardRef(({
|
|
491
491
|
bsPrefix: t,
|
|
492
492
|
className: e,
|
|
493
493
|
style: o,
|
|
@@ -522,14 +522,14 @@ const Ve = /* @__PURE__ */ g.forwardRef(({
|
|
|
522
522
|
manager: Q,
|
|
523
523
|
...ue
|
|
524
524
|
}, C) => {
|
|
525
|
-
const [k, f] = M({}), [fe, Z] = M(!1), T = N(!1), O = N(!1), v = N(null), [E, U] = vt(), he = yt(C, U), ee = w(j),
|
|
525
|
+
const [k, f] = M({}), [fe, Z] = M(!1), T = N(!1), O = N(!1), v = N(null), [E, U] = vt(), he = yt(C, U), ee = w(j), ge = Ct();
|
|
526
526
|
t = I(t, "modal");
|
|
527
527
|
const H = G(() => ({
|
|
528
528
|
onHide: ee
|
|
529
529
|
}), [ee]);
|
|
530
530
|
function S() {
|
|
531
531
|
return Q || It({
|
|
532
|
-
isRTL:
|
|
532
|
+
isRTL: ge
|
|
533
533
|
});
|
|
534
534
|
}
|
|
535
535
|
function te(i) {
|
|
@@ -577,7 +577,7 @@ const Ve = /* @__PURE__ */ g.forwardRef(({
|
|
|
577
577
|
Y == null || Y(i, L), Et(window, "resize", B);
|
|
578
578
|
}, Qe = (i) => {
|
|
579
579
|
i && (i.style.display = ""), q == null || q(i), je(window, "resize", B);
|
|
580
|
-
}, Ze =
|
|
580
|
+
}, Ze = g((i) => /* @__PURE__ */ a.jsx("div", {
|
|
581
581
|
...i,
|
|
582
582
|
className: y(`${t}-backdrop`, J, !b && "show")
|
|
583
583
|
}), [b, J, t]), xe = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as ue from "react";
|
|
2
2
|
import K, { useContext as ne, useMemo as ot, useRef as Y, useCallback as $, useEffect as H, useState as Ae, useLayoutEffect as it, createContext as at, cloneElement as De } from "react";
|
|
3
|
-
import { h as st, j as Q, d as ut } from "./
|
|
3
|
+
import { h as st, j as Q, d as ut } from "./SimplePicker.module--OMl78Ir.mjs";
|
|
4
4
|
import ee from "react-dom";
|
|
5
5
|
function ct(e, n) {
|
|
6
6
|
if (e == null)
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";const p=require("react"),G=require("./
|
|
1
|
+
"use strict";const p=require("react"),G=require("./SimplePicker.module-De0azFIA.js"),J=require("react-dom");function ut(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(n,i,r.get?r:{enumerable:!0,get:()=>e[i]})}}return n.default=e,Object.freeze(n)}const ie=ut(p);function Ve(e,n){if(e==null)return{};var i={},r=Object.keys(e),o,t;for(t=0;t<r.length;t++)o=r[t],!(n.indexOf(o)>=0)&&(i[o]=e[o]);return i}function Oe(e,n){return Oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},Oe(e,n)}function ct(e,n){e.prototype=Object.create(n.prototype),e.prototype.constructor=e,Oe(e,n)}const ft=["xxl","xl","lg","md","sm","xs"],lt="xs",se=ie.createContext({prefixes:{},breakpoints:ft,minBreakpoint:lt});function dt(e,n){const{prefixes:i}=p.useContext(se);return e||i[n]||n}function pt(){const{breakpoints:e}=p.useContext(se);return e}function vt(){const{minBreakpoint:e}=p.useContext(se);return e}function Et(){const{dir:e}=p.useContext(se);return e==="rtl"}function we(e){return e&&e.ownerDocument||document}function yt(e){var n=we(e);return n&&n.defaultView||window}function mt(e,n){return yt(e).getComputedStyle(e,n)}var ht=/([A-Z])/g;function bt(e){return e.replace(ht,"-$1").toLowerCase()}var xt=/^ms-/;function re(e){return bt(e).replace(xt,"-ms-")}var Tt=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;function gt(e){return!!(e&&Tt.test(e))}function je(e,n){var i="",r="";if(typeof n=="string")return e.style.getPropertyValue(re(n))||mt(e).getPropertyValue(re(n));Object.keys(n).forEach(function(o){var t=n[o];!t&&t!==0?e.style.removeProperty(re(o)):gt(o)?r+=o+"("+t+") ":i+=re(o)+": "+t+";"}),r&&(i+="transform: "+r+";"),e.style.cssText+=";"+i}var Se={exports:{}},oe={exports:{}},_={};/** @license React v16.13.1
|
|
2
2
|
* react-is.production.min.js
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
5
5
|
*
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/var Ie;function Rt(){if(Ie)return _;Ie=1;var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,t=e?Symbol.for("react.profiler"):60114,
|
|
8
|
+
*/var Ie;function Rt(){if(Ie)return _;Ie=1;var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,t=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,v=e?Symbol.for("react.concurrent_mode"):60111,E=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,C=e?Symbol.for("react.suspense_list"):60120,k=e?Symbol.for("react.memo"):60115,M=e?Symbol.for("react.lazy"):60116,j=e?Symbol.for("react.block"):60121,I=e?Symbol.for("react.fundamental"):60117,L=e?Symbol.for("react.responder"):60118,F=e?Symbol.for("react.scope"):60119;function A(c){if(typeof c=="object"&&c!==null){var N=c.$$typeof;switch(N){case n:switch(c=c.type,c){case d:case v:case r:case t:case o:case y:return c;default:switch(c=c&&c.$$typeof,c){case u:case E:case M:case k:case s:return c;default:return N}}case i:return N}}}function D(c){return A(c)===v}return _.AsyncMode=d,_.ConcurrentMode=v,_.ContextConsumer=u,_.ContextProvider=s,_.Element=n,_.ForwardRef=E,_.Fragment=r,_.Lazy=M,_.Memo=k,_.Portal=i,_.Profiler=t,_.StrictMode=o,_.Suspense=y,_.isAsyncMode=function(c){return D(c)||A(c)===d},_.isConcurrentMode=D,_.isContextConsumer=function(c){return A(c)===u},_.isContextProvider=function(c){return A(c)===s},_.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===n},_.isForwardRef=function(c){return A(c)===E},_.isFragment=function(c){return A(c)===r},_.isLazy=function(c){return A(c)===M},_.isMemo=function(c){return A(c)===k},_.isPortal=function(c){return A(c)===i},_.isProfiler=function(c){return A(c)===t},_.isStrictMode=function(c){return A(c)===o},_.isSuspense=function(c){return A(c)===y},_.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===r||c===v||c===t||c===o||c===y||c===C||typeof c=="object"&&c!==null&&(c.$$typeof===M||c.$$typeof===k||c.$$typeof===s||c.$$typeof===u||c.$$typeof===E||c.$$typeof===I||c.$$typeof===L||c.$$typeof===F||c.$$typeof===j)},_.typeOf=A,_}var P={};/** @license React v16.13.1
|
|
9
9
|
* react-is.development.js
|
|
10
10
|
*
|
|
11
11
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
12
12
|
*
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/var Le;function Ot(){return Le||(Le=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,t=e?Symbol.for("react.profiler"):60114,
|
|
15
|
+
*/var Le;function Ot(){return Le||(Le=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,n=e?Symbol.for("react.element"):60103,i=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,t=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,u=e?Symbol.for("react.context"):60110,d=e?Symbol.for("react.async_mode"):60111,v=e?Symbol.for("react.concurrent_mode"):60111,E=e?Symbol.for("react.forward_ref"):60112,y=e?Symbol.for("react.suspense"):60113,C=e?Symbol.for("react.suspense_list"):60120,k=e?Symbol.for("react.memo"):60115,M=e?Symbol.for("react.lazy"):60116,j=e?Symbol.for("react.block"):60121,I=e?Symbol.for("react.fundamental"):60117,L=e?Symbol.for("react.responder"):60118,F=e?Symbol.for("react.scope"):60119;function A(f){return typeof f=="string"||typeof f=="function"||f===r||f===v||f===t||f===o||f===y||f===C||typeof f=="object"&&f!==null&&(f.$$typeof===M||f.$$typeof===k||f.$$typeof===s||f.$$typeof===u||f.$$typeof===E||f.$$typeof===I||f.$$typeof===L||f.$$typeof===F||f.$$typeof===j)}function D(f){if(typeof f=="object"&&f!==null){var q=f.$$typeof;switch(q){case n:var ne=f.type;switch(ne){case d:case v:case r:case t:case o:case y:return ne;default:var Ae=ne&&ne.$$typeof;switch(Ae){case u:case E:case M:case k:case s:return Ae;default:return q}}case i:return q}}}var c=d,N=v,V=u,ce=s,fe=n,le=E,ee=r,de=M,pe=k,K=i,ve=t,W=o,X=y,te=!1;function Ee(f){return te||(te=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),a(f)||D(f)===d}function a(f){return D(f)===v}function l(f){return D(f)===u}function g(f){return D(f)===s}function x(f){return typeof f=="object"&&f!==null&&f.$$typeof===n}function m(f){return D(f)===E}function R(f){return D(f)===r}function b(f){return D(f)===M}function T(f){return D(f)===k}function O(f){return D(f)===i}function w(f){return D(f)===t}function S(f){return D(f)===o}function $(f){return D(f)===y}P.AsyncMode=c,P.ConcurrentMode=N,P.ContextConsumer=V,P.ContextProvider=ce,P.Element=fe,P.ForwardRef=le,P.Fragment=ee,P.Lazy=de,P.Memo=pe,P.Portal=K,P.Profiler=ve,P.StrictMode=W,P.Suspense=X,P.isAsyncMode=Ee,P.isConcurrentMode=a,P.isContextConsumer=l,P.isContextProvider=g,P.isElement=x,P.isForwardRef=m,P.isFragment=R,P.isLazy=b,P.isMemo=T,P.isPortal=O,P.isProfiler=w,P.isStrictMode=S,P.isSuspense=$,P.isValidElementType=A,P.typeOf=D}()),P}var Ne;function Xe(){return Ne||(Ne=1,process.env.NODE_ENV==="production"?oe.exports=Rt():oe.exports=Ot()),oe.exports}/*
|
|
16
16
|
object-assign
|
|
17
17
|
(c) Sindre Sorhus
|
|
18
18
|
@license MIT
|
|
19
|
-
*/var ye,$e;function St(){if($e)return ye;$e=1;var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function r(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function o(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var
|
|
20
|
-
Valid keys: `+JSON.stringify(Object.keys(s),null," "));var f=$(T,S,m,R,b+"."+S,i);if(f)return f}return null}return I(l)}function K(s){switch(typeof s){case"number":case"string":case"undefined":return!0;case"boolean":return!s;case"object":if(Array.isArray(s))return s.every(K);if(s===null||u(s))return!0;var l=y(s);if(l){var g=l.call(s),x;if(l!==s.entries){for(;!(x=g.next()).done;)if(!K(x.value))return!1}else for(;!(x=g.next()).done;){var m=x.value;if(m&&!K(m[1]))return!1}}else return!1;return!0;default:return!1}}function ve(s,l){return s==="symbol"?!0:l?l["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&l instanceof Symbol:!1}function W(s){var l=typeof s;return Array.isArray(s)?"array":s instanceof RegExp?"object":ve(l,s)?"symbol":l}function X(s){if(typeof s>"u"||s===null)return""+s;var l=W(s);if(l==="object"){if(s instanceof Date)return"date";if(s instanceof RegExp)return"regexp"}return l}function te(s){var l=X(s);switch(l){case"array":case"object":return"an "+l;case"boolean":case"date":case"regexp":return"a "+l;default:return l}}function Ee(s){return!s.constructor||!s.constructor.name?C:s.constructor.name}return M.checkPropTypes=o,M.resetWarningCache=o.resetWarningCache,M.PropTypes=M,M},xe}var Te,Ye;function Pt(){if(Ye)return Te;Ye=1;var e=De();function n(){}function i(){}return i.resetWarningCache=n,Te=function(){function r(a,u,d,v,E,y){if(y!==e){var C=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw C.name="Invariant Violation",C}}r.isRequired=r;function o(){return r}var t={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:i,resetWarningCache:n};return t.PropTypes=t,t},Te}if(process.env.NODE_ENV!=="production"){var wt=Xe(),jt=!0;Se.exports=_t()(wt.isElement,jt)}else Se.exports=Pt()();var Dt=Se.exports;const h=G.getDefaultExportFromCjs(Dt),Be={disabled:!1};var Mt=process.env.NODE_ENV!=="production"?h.oneOfType([h.number,h.shape({enter:h.number,exit:h.number,appear:h.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&h.oneOfType([h.string,h.shape({enter:h.string,exit:h.string,active:h.string}),h.shape({enter:h.string,enterDone:h.string,enterActive:h.string,exit:h.string,exitDone:h.string,exitActive:h.string})]);const He=p.createContext(null);var kt=function(n){return n.scrollTop},Z="unmounted",B="exited",U="entering",z="entered",se="exiting",Y=function(e){ct(n,e);function n(r,o){var t;t=e.call(this,r,o)||this;var a=o,u=a&&!a.isMounting?r.enter:r.appear,d;return t.appearStatus=null,r.in?u?(d=B,t.appearStatus=U):d=z:r.unmountOnExit||r.mountOnEnter?d=Z:d=B,t.state={status:d},t.nextCallback=null,t}n.getDerivedStateFromProps=function(o,t){var a=o.in;return a&&t.status===Z?{status:B}:null};var i=n.prototype;return i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(o){var t=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==U&&a!==z&&(t=U):(a===U||a===z)&&(t=se)}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var o=this.props.timeout,t,a,u;return t=a=u=o,o!=null&&typeof o!="number"&&(t=o.exit,a=o.enter,u=o.appear!==void 0?o.appear:a),{exit:t,enter:a,appear:u}},i.updateStatus=function(o,t){if(o===void 0&&(o=!1),t!==null)if(this.cancelNextCallback(),t===U){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:J.findDOMNode(this);a&&kt(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===B&&this.setState({status:Z})},i.performEnter=function(o){var t=this,a=this.props.enter,u=this.context?this.context.isMounting:o,d=this.props.nodeRef?[u]:[J.findDOMNode(this),u],v=d[0],E=d[1],y=this.getTimeouts(),C=u?y.appear:y.enter;if(!o&&!a||Be.disabled){this.safeSetState({status:z},function(){t.props.onEntered(v)});return}this.props.onEnter(v,E),this.safeSetState({status:U},function(){t.props.onEntering(v,E),t.onTransitionEnd(C,function(){t.safeSetState({status:z},function(){t.props.onEntered(v,E)})})})},i.performExit=function(){var o=this,t=this.props.exit,a=this.getTimeouts(),u=this.props.nodeRef?void 0:J.findDOMNode(this);if(!t||Be.disabled){this.safeSetState({status:B},function(){o.props.onExited(u)});return}this.props.onExit(u),this.safeSetState({status:se},function(){o.props.onExiting(u),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:B},function(){o.props.onExited(u)})})})},i.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(o,t){t=this.setNextCallback(t),this.setState(o,t)},i.setNextCallback=function(o){var t=this,a=!0;return this.nextCallback=function(u){a&&(a=!1,t.nextCallback=null,o(u))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},i.onTransitionEnd=function(o,t){this.setNextCallback(t);var a=this.props.nodeRef?this.props.nodeRef.current:J.findDOMNode(this),u=o==null&&!this.props.addEndListener;if(!a||u){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var d=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],v=d[0],E=d[1];this.props.addEndListener(v,E)}o!=null&&setTimeout(this.nextCallback,o)},i.render=function(){var o=this.state.status;if(o===Z)return null;var t=this.props,a=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var u=Ve(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return p.createElement(He.Provider,{value:null},typeof a=="function"?a(o,u):p.cloneElement(p.Children.only(a),u))},n}(p.Component);Y.contextType=He;Y.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:h.shape({current:typeof Element>"u"?h.any:function(e,n,i,r,o,t){var a=e[n];return h.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,n,i,r,o,t)}}),children:h.oneOfType([h.func.isRequired,h.element.isRequired]).isRequired,in:h.bool,mountOnEnter:h.bool,unmountOnExit:h.bool,appear:h.bool,enter:h.bool,exit:h.bool,timeout:function(n){var i=Mt;n.addEndListener||(i=i.isRequired);for(var r=arguments.length,o=new Array(r>1?r-1:0),t=1;t<r;t++)o[t-1]=arguments[t];return i.apply(void 0,[n].concat(o))},addEndListener:h.func,onEnter:h.func,onEntering:h.func,onEntered:h.func,onExit:h.func,onExiting:h.func,onExited:h.func}:{};function H(){}Y.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:H,onEntering:H,onEntered:H,onExit:H,onExiting:H,onExited:H};Y.UNMOUNTED=Z;Y.EXITED=B;Y.ENTERING=U;Y.ENTERED=z;Y.EXITING=se;const At=Y,ue=!!(typeof window<"u"&&window.document&&window.document.createElement);var Ce=!1,_e=!1;try{var ge={get passive(){return Ce=!0},get once(){return _e=Ce=!0}};ue&&(window.addEventListener("test",ge,ge),window.removeEventListener("test",ge,!0))}catch{}function Je(e,n,i,r){if(r&&typeof r!="boolean"&&!_e){var o=r.once,t=r.capture,a=i;!_e&&o&&(a=i.__once||function u(d){this.removeEventListener(n,u,t),i.call(this,d)},i.__once=a),e.addEventListener(n,a,Ce?r:t)}e.addEventListener(n,i,r)}function Ze(e,n,i,r){var o=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(n,i,o),i.__once&&e.removeEventListener(n,i.__once,o)}function Me(e,n,i,r){return Je(e,n,i,r),function(){Ze(e,n,i,r)}}function It(e,n,i,r){if(i===void 0&&(i=!1),r===void 0&&(r=!0),e){var o=document.createEvent("HTMLEvents");o.initEvent(n,i,r),e.dispatchEvent(o)}}function Lt(e){var n=je(e,"transitionDuration")||"",i=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*i}function Nt(e,n,i){i===void 0&&(i=5);var r=!1,o=setTimeout(function(){r||It(e,"transitionend",!0)},n+i),t=Me(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(o),t()}}function Qe(e,n,i,r){i==null&&(i=Lt(e)||0);var o=Nt(e,i,r),t=Me(e,"transitionend",n);return function(){o(),t()}}function ze(e,n){const i=je(e,n)||"",r=i.indexOf("ms")===-1?1e3:1;return parseFloat(i)*r}function et(e,n){const i=ze(e,"transitionDuration"),r=ze(e,"transitionDelay"),o=Qe(e,t=>{t.target===e&&(o(),n(t))},i+r)}function tt(e){e.offsetHeight}const Ge=e=>!e||typeof e=="function"?e:n=>{e.current=n};function $t(e,n){const i=Ge(e),r=Ge(n);return o=>{i&&i(o),r&&r(o)}}function Q(e,n){return p.useMemo(()=>$t(e,n),[e,n])}function nt(e){return e&&"setState"in e?J.findDOMNode(e):e??null}const Wt=p.forwardRef(({onEnter:e,onEntering:n,onEntered:i,onExit:r,onExiting:o,onExited:t,addEndListener:a,children:u,childRef:d,...v},E)=>{const y=p.useRef(null),C=Q(y,d),M=N=>{C(nt(N))},k=N=>V=>{N&&y.current&&N(y.current,V)},j=p.useCallback(k(e),[e]),I=p.useCallback(k(n),[n]),L=p.useCallback(k(i),[i]),F=p.useCallback(k(r),[r]),A=p.useCallback(k(o),[o]),D=p.useCallback(k(t),[t]),c=p.useCallback(k(a),[a]);return G.jsxRuntimeExports.jsx(At,{ref:E,...v,onEnter:j,onEntered:L,onEntering:I,onExit:F,onExited:D,onExiting:A,addEndListener:c,nodeRef:y,children:typeof u=="function"?(N,V)=>u(N,{...V,ref:M}):p.cloneElement(u,{ref:M})})}),rt=Wt;function qt(e){const n=p.useRef(e);return p.useEffect(()=>{n.current=e},[e]),n}function ke(e){const n=qt(e);return p.useCallback(function(...i){return n.current&&n.current(...i)},[n])}function Ft(){return p.useState(null)}function Ut(){const e=p.useRef(!0),n=p.useRef(()=>e.current);return p.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),n.current}const Yt=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",Bt=typeof document<"u",Pe=Bt||Yt?p.useLayoutEffect:p.useEffect,zt={[U]:"show",[z]:"show"},ot=ie.forwardRef(({className:e,children:n,transitionClasses:i={},onEnter:r,...o},t)=>{const a={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...o},u=p.useCallback((d,v)=>{tt(d),r==null||r(d,v)},[r]);return G.jsxRuntimeExports.jsx(rt,{ref:t,addEndListener:et,...a,onEnter:u,childRef:n.ref,children:(d,v)=>ie.cloneElement(n,{...v,className:G.classNames("fade",e,n.props.className,zt[d],i[d])})})});ot.displayName="Fade";const Gt=ot;function Vt(e){const n=p.useRef(e);return n.current=e,n}function Xt(e){const n=Vt(e);p.useEffect(()=>()=>n.current(),[])}function Kt(e,n){if(e.contains)return e.contains(n);if(e.compareDocumentPosition)return e===n||!!(e.compareDocumentPosition(n)&16)}const it=p.createContext(ue?window:void 0);it.Provider;function st(){return p.useContext(it)}const Re=(e,n)=>ue?e==null?(n||we()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function Ht(e,n){const i=st(),[r,o]=p.useState(()=>Re(e,i==null?void 0:i.document));if(!r){const t=Re(e);t&&o(t)}return p.useEffect(()=>{n&&r&&n(r)},[n,r]),p.useEffect(()=>{const t=Re(e);t!==r&&o(t)},[e,r]),r}function at({children:e,in:n,onExited:i,mountOnEnter:r,unmountOnExit:o}){const t=p.useRef(null),a=p.useRef(n),u=ke(i);p.useEffect(()=>{n?a.current=!0:u(t.current)},[n,u]);const d=Q(t,e.ref),v=p.cloneElement(e,{ref:d});return n?v:o||!a.current&&r?null:v}const Jt=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function Zt(e,n){if(e==null)return{};var i={},r=Object.keys(e),o,t;for(t=0;t<r.length;t++)o=r[t],!(n.indexOf(o)>=0)&&(i[o]=e[o]);return i}function Qt(e){let{onEnter:n,onEntering:i,onEntered:r,onExit:o,onExiting:t,onExited:a,addEndListener:u,children:d}=e,v=Zt(e,Jt);const E=p.useRef(null),y=Q(E,typeof d=="function"?null:d.ref),C=D=>c=>{D&&E.current&&D(E.current,c)},M=p.useCallback(C(n),[n]),k=p.useCallback(C(i),[i]),j=p.useCallback(C(r),[r]),I=p.useCallback(C(o),[o]),L=p.useCallback(C(t),[t]),F=p.useCallback(C(a),[a]),A=p.useCallback(C(u),[u]);return Object.assign({},v,{nodeRef:E},n&&{onEnter:M},i&&{onEntering:k},r&&{onEntered:j},o&&{onExit:I},t&&{onExiting:L},a&&{onExited:F},u&&{addEndListener:A},{children:typeof d=="function"?(D,c)=>d(D,Object.assign({},c,{ref:y})):p.cloneElement(d,{ref:y})})}const en=["component"];function tn(e,n){if(e==null)return{};var i={},r=Object.keys(e),o,t;for(t=0;t<r.length;t++)o=r[t],!(n.indexOf(o)>=0)&&(i[o]=e[o]);return i}const nn=ie.forwardRef((e,n)=>{let{component:i}=e,r=tn(e,en);const o=Qt(r);return G.jsxRuntimeExports.jsx(i,Object.assign({ref:n},o))}),rn=nn;function on({in:e,onTransition:n}){const i=p.useRef(null),r=p.useRef(!0),o=ke(n);return Pe(()=>{if(!i.current)return;let t=!1;return o({in:e,element:i.current,initial:r.current,isStale:()=>t}),()=>{t=!0}},[e,o]),Pe(()=>(r.current=!1,()=>{r.current=!0}),[]),i}function sn({children:e,in:n,onExited:i,onEntered:r,transition:o}){const[t,a]=p.useState(!n);n&&t&&a(!1);const u=on({in:!!n,onTransition:v=>{const E=()=>{v.isStale()||(v.in?r==null||r(v.element,v.initial):(a(!0),i==null||i(v.element)))};Promise.resolve(o(v)).then(E,y=>{throw v.in||a(!0),y})}}),d=Q(u,e.ref);return t&&!n?null:p.cloneElement(e,{ref:d})}function an(e,n,i){return e?G.jsxRuntimeExports.jsx(rn,Object.assign({},i,{component:e})):n?G.jsxRuntimeExports.jsx(sn,Object.assign({},i,{transition:n})):G.jsxRuntimeExports.jsx(at,Object.assign({},i))}function un(e){return e.code==="Escape"||e.keyCode===27}function cn(e,n){return e.classList?!!n&&e.classList.contains(n):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+n+" ")!==-1}exports.ENTERED=z;exports.ENTERING=U;exports.EXITED=B;exports.EXITING=se;exports.Fade=Gt;exports.NoopTransition=at;exports.PropTypes=h;exports.TransitionWrapper=rt;exports._objectWithoutPropertiesLoose=Ve;exports.addEventListener=Je;exports.canUseDOM=ue;exports.contains=Kt;exports.hasClass=cn;exports.isEscKey=un;exports.listen=Me;exports.ownerDocument=we;exports.removeEventListener=Ze;exports.renderTransition=an;exports.safeFindDOMNode=nt;exports.style=je;exports.transitionEnd=Qe;exports.transitionEndListener=et;exports.triggerBrowserReflow=tt;exports.useBootstrapBreakpoints=pt;exports.useBootstrapMinBreakpoint=vt;exports.useBootstrapPrefix=dt;exports.useCallbackRef=Ft;exports.useEventCallback=ke;exports.useIsRTL=Et;exports.useIsomorphicEffect=Pe;exports.useMergedRefs=Q;exports.useMounted=Ut;exports.useWaitForDOMRef=Ht;exports.useWillUnmount=Xt;exports.useWindow=st;
|
|
19
|
+
*/var ye,$e;function St(){if($e)return ye;$e=1;var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function r(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function o(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var s={},u=0;u<10;u++)s["_"+String.fromCharCode(u)]=u;var d=Object.getOwnPropertyNames(s).map(function(E){return s[E]});if(d.join("")!=="0123456789")return!1;var v={};return"abcdefghijklmnopqrst".split("").forEach(function(E){v[E]=E}),Object.keys(Object.assign({},v)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ye=o()?Object.assign:function(t,s){for(var u,d=r(t),v,E=1;E<arguments.length;E++){u=Object(arguments[E]);for(var y in u)n.call(u,y)&&(d[y]=u[y]);if(e){v=e(u);for(var C=0;C<v.length;C++)i.call(u,v[C])&&(d[v[C]]=u[v[C]])}}return d},ye}var me,We;function De(){if(We)return me;We=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return me=e,me}var he,qe;function Ke(){return qe||(qe=1,he=Function.call.bind(Object.prototype.hasOwnProperty)),he}var be,Fe;function Ct(){if(Fe)return be;Fe=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var n=De(),i={},r=Ke();e=function(t){var s="Warning: "+t;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function o(t,s,u,d,v){if(process.env.NODE_ENV!=="production"){for(var E in t)if(r(t,E)){var y;try{if(typeof t[E]!="function"){var C=Error((d||"React class")+": "+u+" type `"+E+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[E]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw C.name="Invariant Violation",C}y=t[E](s,E,d,u,null,n)}catch(M){y=M}if(y&&!(y instanceof Error)&&e((d||"React class")+": type specification of "+u+" `"+E+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof y+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),y instanceof Error&&!(y.message in i)){i[y.message]=!0;var k=v?v():"";e("Failed "+u+" type: "+y.message+(k??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(i={})},be=o,be}var xe,Ue;function _t(){if(Ue)return xe;Ue=1;var e=Xe(),n=St(),i=De(),r=Ke(),o=Ct(),t=function(){};process.env.NODE_ENV!=="production"&&(t=function(u){var d="Warning: "+u;typeof console<"u"&&console.error(d);try{throw new Error(d)}catch{}});function s(){return null}return xe=function(u,d){var v=typeof Symbol=="function"&&Symbol.iterator,E="@@iterator";function y(a){var l=a&&(v&&a[v]||a[E]);if(typeof l=="function")return l}var C="<<anonymous>>",k={array:L("array"),bigint:L("bigint"),bool:L("boolean"),func:L("function"),number:L("number"),object:L("object"),string:L("string"),symbol:L("symbol"),any:F(),arrayOf:A,element:D(),elementType:c(),instanceOf:N,node:le(),objectOf:ce,oneOf:V,oneOfType:fe,shape:de,exact:pe};function M(a,l){return a===l?a!==0||1/a===1/l:a!==a&&l!==l}function j(a,l){this.message=a,this.data=l&&typeof l=="object"?l:{},this.stack=""}j.prototype=Error.prototype;function I(a){if(process.env.NODE_ENV!=="production")var l={},g=0;function x(R,b,T,O,w,S,$){if(O=O||C,S=S||T,$!==i){if(d){var f=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 f.name="Invariant Violation",f}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var q=O+":"+T;!l[q]&&g<3&&(t("You are manually calling a React.PropTypes validation function for the `"+S+"` prop on `"+O+"`. 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."),l[q]=!0,g++)}}return b[T]==null?R?b[T]===null?new j("The "+w+" `"+S+"` is marked as required "+("in `"+O+"`, but its value is `null`.")):new j("The "+w+" `"+S+"` is marked as required in "+("`"+O+"`, but its value is `undefined`.")):null:a(b,T,O,w,S)}var m=x.bind(null,!1);return m.isRequired=x.bind(null,!0),m}function L(a){function l(g,x,m,R,b,T){var O=g[x],w=W(O);if(w!==a){var S=X(O);return new j("Invalid "+R+" `"+b+"` of type "+("`"+S+"` supplied to `"+m+"`, expected ")+("`"+a+"`."),{expectedType:a})}return null}return I(l)}function F(){return I(s)}function A(a){function l(g,x,m,R,b){if(typeof a!="function")return new j("Property `"+b+"` of component `"+m+"` has invalid PropType notation inside arrayOf.");var T=g[x];if(!Array.isArray(T)){var O=W(T);return new j("Invalid "+R+" `"+b+"` of type "+("`"+O+"` supplied to `"+m+"`, expected an array."))}for(var w=0;w<T.length;w++){var S=a(T,w,m,R,b+"["+w+"]",i);if(S instanceof Error)return S}return null}return I(l)}function D(){function a(l,g,x,m,R){var b=l[g];if(!u(b)){var T=W(b);return new j("Invalid "+m+" `"+R+"` of type "+("`"+T+"` supplied to `"+x+"`, expected a single ReactElement."))}return null}return I(a)}function c(){function a(l,g,x,m,R){var b=l[g];if(!e.isValidElementType(b)){var T=W(b);return new j("Invalid "+m+" `"+R+"` of type "+("`"+T+"` supplied to `"+x+"`, expected a single ReactElement type."))}return null}return I(a)}function N(a){function l(g,x,m,R,b){if(!(g[x]instanceof a)){var T=a.name||C,O=Ee(g[x]);return new j("Invalid "+R+" `"+b+"` of type "+("`"+O+"` supplied to `"+m+"`, expected ")+("instance of `"+T+"`."))}return null}return I(l)}function V(a){if(!Array.isArray(a))return process.env.NODE_ENV!=="production"&&(arguments.length>1?t("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])."):t("Invalid argument supplied to oneOf, expected an array.")),s;function l(g,x,m,R,b){for(var T=g[x],O=0;O<a.length;O++)if(M(T,a[O]))return null;var w=JSON.stringify(a,function($,f){var q=X(f);return q==="symbol"?String(f):f});return new j("Invalid "+R+" `"+b+"` of value `"+String(T)+"` "+("supplied to `"+m+"`, expected one of "+w+"."))}return I(l)}function ce(a){function l(g,x,m,R,b){if(typeof a!="function")return new j("Property `"+b+"` of component `"+m+"` has invalid PropType notation inside objectOf.");var T=g[x],O=W(T);if(O!=="object")return new j("Invalid "+R+" `"+b+"` of type "+("`"+O+"` supplied to `"+m+"`, expected an object."));for(var w in T)if(r(T,w)){var S=a(T,w,m,R,b+"."+w,i);if(S instanceof Error)return S}return null}return I(l)}function fe(a){if(!Array.isArray(a))return process.env.NODE_ENV!=="production"&&t("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var l=0;l<a.length;l++){var g=a[l];if(typeof g!="function")return t("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+te(g)+" at index "+l+"."),s}function x(m,R,b,T,O){for(var w=[],S=0;S<a.length;S++){var $=a[S],f=$(m,R,b,T,O,i);if(f==null)return null;f.data&&r(f.data,"expectedType")&&w.push(f.data.expectedType)}var q=w.length>0?", expected one of type ["+w.join(", ")+"]":"";return new j("Invalid "+T+" `"+O+"` supplied to "+("`"+b+"`"+q+"."))}return I(x)}function le(){function a(l,g,x,m,R){return K(l[g])?null:new j("Invalid "+m+" `"+R+"` supplied to "+("`"+x+"`, expected a ReactNode."))}return I(a)}function ee(a,l,g,x,m){return new j((a||"React class")+": "+l+" type `"+g+"."+x+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+m+"`.")}function de(a){function l(g,x,m,R,b){var T=g[x],O=W(T);if(O!=="object")return new j("Invalid "+R+" `"+b+"` of type `"+O+"` "+("supplied to `"+m+"`, expected `object`."));for(var w in a){var S=a[w];if(typeof S!="function")return ee(m,R,b,w,X(S));var $=S(T,w,m,R,b+"."+w,i);if($)return $}return null}return I(l)}function pe(a){function l(g,x,m,R,b){var T=g[x],O=W(T);if(O!=="object")return new j("Invalid "+R+" `"+b+"` of type `"+O+"` "+("supplied to `"+m+"`, expected `object`."));var w=n({},g[x],a);for(var S in w){var $=a[S];if(r(a,S)&&typeof $!="function")return ee(m,R,b,S,X($));if(!$)return new j("Invalid "+R+" `"+b+"` key `"+S+"` supplied to `"+m+"`.\nBad object: "+JSON.stringify(g[x],null," ")+`
|
|
20
|
+
Valid keys: `+JSON.stringify(Object.keys(a),null," "));var f=$(T,S,m,R,b+"."+S,i);if(f)return f}return null}return I(l)}function K(a){switch(typeof a){case"number":case"string":case"undefined":return!0;case"boolean":return!a;case"object":if(Array.isArray(a))return a.every(K);if(a===null||u(a))return!0;var l=y(a);if(l){var g=l.call(a),x;if(l!==a.entries){for(;!(x=g.next()).done;)if(!K(x.value))return!1}else for(;!(x=g.next()).done;){var m=x.value;if(m&&!K(m[1]))return!1}}else return!1;return!0;default:return!1}}function ve(a,l){return a==="symbol"?!0:l?l["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&l instanceof Symbol:!1}function W(a){var l=typeof a;return Array.isArray(a)?"array":a instanceof RegExp?"object":ve(l,a)?"symbol":l}function X(a){if(typeof a>"u"||a===null)return""+a;var l=W(a);if(l==="object"){if(a instanceof Date)return"date";if(a instanceof RegExp)return"regexp"}return l}function te(a){var l=X(a);switch(l){case"array":case"object":return"an "+l;case"boolean":case"date":case"regexp":return"a "+l;default:return l}}function Ee(a){return!a.constructor||!a.constructor.name?C:a.constructor.name}return k.checkPropTypes=o,k.resetWarningCache=o.resetWarningCache,k.PropTypes=k,k},xe}var Te,Ye;function Pt(){if(Ye)return Te;Ye=1;var e=De();function n(){}function i(){}return i.resetWarningCache=n,Te=function(){function r(s,u,d,v,E,y){if(y!==e){var C=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw C.name="Invariant Violation",C}}r.isRequired=r;function o(){return r}var t={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:i,resetWarningCache:n};return t.PropTypes=t,t},Te}if(process.env.NODE_ENV!=="production"){var wt=Xe(),jt=!0;Se.exports=_t()(wt.isElement,jt)}else Se.exports=Pt()();var Dt=Se.exports;const h=G.getDefaultExportFromCjs(Dt),Be={disabled:!1};var kt=process.env.NODE_ENV!=="production"?h.oneOfType([h.number,h.shape({enter:h.number,exit:h.number,appear:h.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&h.oneOfType([h.string,h.shape({enter:h.string,exit:h.string,active:h.string}),h.shape({enter:h.string,enterDone:h.string,enterActive:h.string,exit:h.string,exitDone:h.string,exitActive:h.string})]);const He=p.createContext(null);var Mt=function(n){return n.scrollTop},Z="unmounted",B="exited",U="entering",z="entered",ae="exiting",Y=function(e){ct(n,e);function n(r,o){var t;t=e.call(this,r,o)||this;var s=o,u=s&&!s.isMounting?r.enter:r.appear,d;return t.appearStatus=null,r.in?u?(d=B,t.appearStatus=U):d=z:r.unmountOnExit||r.mountOnEnter?d=Z:d=B,t.state={status:d},t.nextCallback=null,t}n.getDerivedStateFromProps=function(o,t){var s=o.in;return s&&t.status===Z?{status:B}:null};var i=n.prototype;return i.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},i.componentDidUpdate=function(o){var t=null;if(o!==this.props){var s=this.state.status;this.props.in?s!==U&&s!==z&&(t=U):(s===U||s===z)&&(t=ae)}this.updateStatus(!1,t)},i.componentWillUnmount=function(){this.cancelNextCallback()},i.getTimeouts=function(){var o=this.props.timeout,t,s,u;return t=s=u=o,o!=null&&typeof o!="number"&&(t=o.exit,s=o.enter,u=o.appear!==void 0?o.appear:s),{exit:t,enter:s,appear:u}},i.updateStatus=function(o,t){if(o===void 0&&(o=!1),t!==null)if(this.cancelNextCallback(),t===U){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:J.findDOMNode(this);s&&Mt(s)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===B&&this.setState({status:Z})},i.performEnter=function(o){var t=this,s=this.props.enter,u=this.context?this.context.isMounting:o,d=this.props.nodeRef?[u]:[J.findDOMNode(this),u],v=d[0],E=d[1],y=this.getTimeouts(),C=u?y.appear:y.enter;if(!o&&!s||Be.disabled){this.safeSetState({status:z},function(){t.props.onEntered(v)});return}this.props.onEnter(v,E),this.safeSetState({status:U},function(){t.props.onEntering(v,E),t.onTransitionEnd(C,function(){t.safeSetState({status:z},function(){t.props.onEntered(v,E)})})})},i.performExit=function(){var o=this,t=this.props.exit,s=this.getTimeouts(),u=this.props.nodeRef?void 0:J.findDOMNode(this);if(!t||Be.disabled){this.safeSetState({status:B},function(){o.props.onExited(u)});return}this.props.onExit(u),this.safeSetState({status:ae},function(){o.props.onExiting(u),o.onTransitionEnd(s.exit,function(){o.safeSetState({status:B},function(){o.props.onExited(u)})})})},i.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},i.safeSetState=function(o,t){t=this.setNextCallback(t),this.setState(o,t)},i.setNextCallback=function(o){var t=this,s=!0;return this.nextCallback=function(u){s&&(s=!1,t.nextCallback=null,o(u))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},i.onTransitionEnd=function(o,t){this.setNextCallback(t);var s=this.props.nodeRef?this.props.nodeRef.current:J.findDOMNode(this),u=o==null&&!this.props.addEndListener;if(!s||u){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var d=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],v=d[0],E=d[1];this.props.addEndListener(v,E)}o!=null&&setTimeout(this.nextCallback,o)},i.render=function(){var o=this.state.status;if(o===Z)return null;var t=this.props,s=t.children;t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef;var u=Ve(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return p.createElement(He.Provider,{value:null},typeof s=="function"?s(o,u):p.cloneElement(p.Children.only(s),u))},n}(p.Component);Y.contextType=He;Y.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:h.shape({current:typeof Element>"u"?h.any:function(e,n,i,r,o,t){var s=e[n];return h.instanceOf(s&&"ownerDocument"in s?s.ownerDocument.defaultView.Element:Element)(e,n,i,r,o,t)}}),children:h.oneOfType([h.func.isRequired,h.element.isRequired]).isRequired,in:h.bool,mountOnEnter:h.bool,unmountOnExit:h.bool,appear:h.bool,enter:h.bool,exit:h.bool,timeout:function(n){var i=kt;n.addEndListener||(i=i.isRequired);for(var r=arguments.length,o=new Array(r>1?r-1:0),t=1;t<r;t++)o[t-1]=arguments[t];return i.apply(void 0,[n].concat(o))},addEndListener:h.func,onEnter:h.func,onEntering:h.func,onEntered:h.func,onExit:h.func,onExiting:h.func,onExited:h.func}:{};function H(){}Y.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:H,onEntering:H,onEntered:H,onExit:H,onExiting:H,onExited:H};Y.UNMOUNTED=Z;Y.EXITED=B;Y.ENTERING=U;Y.ENTERED=z;Y.EXITING=ae;const At=Y,ue=!!(typeof window<"u"&&window.document&&window.document.createElement);var Ce=!1,_e=!1;try{var ge={get passive(){return Ce=!0},get once(){return _e=Ce=!0}};ue&&(window.addEventListener("test",ge,ge),window.removeEventListener("test",ge,!0))}catch{}function Je(e,n,i,r){if(r&&typeof r!="boolean"&&!_e){var o=r.once,t=r.capture,s=i;!_e&&o&&(s=i.__once||function u(d){this.removeEventListener(n,u,t),i.call(this,d)},i.__once=s),e.addEventListener(n,s,Ce?r:t)}e.addEventListener(n,i,r)}function Ze(e,n,i,r){var o=r&&typeof r!="boolean"?r.capture:r;e.removeEventListener(n,i,o),i.__once&&e.removeEventListener(n,i.__once,o)}function ke(e,n,i,r){return Je(e,n,i,r),function(){Ze(e,n,i,r)}}function It(e,n,i,r){if(i===void 0&&(i=!1),r===void 0&&(r=!0),e){var o=document.createEvent("HTMLEvents");o.initEvent(n,i,r),e.dispatchEvent(o)}}function Lt(e){var n=je(e,"transitionDuration")||"",i=n.indexOf("ms")===-1?1e3:1;return parseFloat(n)*i}function Nt(e,n,i){i===void 0&&(i=5);var r=!1,o=setTimeout(function(){r||It(e,"transitionend",!0)},n+i),t=ke(e,"transitionend",function(){r=!0},{once:!0});return function(){clearTimeout(o),t()}}function Qe(e,n,i,r){i==null&&(i=Lt(e)||0);var o=Nt(e,i,r),t=ke(e,"transitionend",n);return function(){o(),t()}}function ze(e,n){const i=je(e,n)||"",r=i.indexOf("ms")===-1?1e3:1;return parseFloat(i)*r}function et(e,n){const i=ze(e,"transitionDuration"),r=ze(e,"transitionDelay"),o=Qe(e,t=>{t.target===e&&(o(),n(t))},i+r)}function tt(e){e.offsetHeight}const Ge=e=>!e||typeof e=="function"?e:n=>{e.current=n};function $t(e,n){const i=Ge(e),r=Ge(n);return o=>{i&&i(o),r&&r(o)}}function Q(e,n){return p.useMemo(()=>$t(e,n),[e,n])}function nt(e){return e&&"setState"in e?J.findDOMNode(e):e??null}const Wt=p.forwardRef(({onEnter:e,onEntering:n,onEntered:i,onExit:r,onExiting:o,onExited:t,addEndListener:s,children:u,childRef:d,...v},E)=>{const y=p.useRef(null),C=Q(y,d),k=N=>{C(nt(N))},M=N=>V=>{N&&y.current&&N(y.current,V)},j=p.useCallback(M(e),[e]),I=p.useCallback(M(n),[n]),L=p.useCallback(M(i),[i]),F=p.useCallback(M(r),[r]),A=p.useCallback(M(o),[o]),D=p.useCallback(M(t),[t]),c=p.useCallback(M(s),[s]);return G.jsxRuntimeExports.jsx(At,{ref:E,...v,onEnter:j,onEntered:L,onEntering:I,onExit:F,onExited:D,onExiting:A,addEndListener:c,nodeRef:y,children:typeof u=="function"?(N,V)=>u(N,{...V,ref:k}):p.cloneElement(u,{ref:k})})}),rt=Wt;function qt(e){const n=p.useRef(e);return p.useEffect(()=>{n.current=e},[e]),n}function Me(e){const n=qt(e);return p.useCallback(function(...i){return n.current&&n.current(...i)},[n])}function Ft(){return p.useState(null)}function Ut(){const e=p.useRef(!0),n=p.useRef(()=>e.current);return p.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),n.current}const Yt=typeof global<"u"&&global.navigator&&global.navigator.product==="ReactNative",Bt=typeof document<"u",Pe=Bt||Yt?p.useLayoutEffect:p.useEffect,zt={[U]:"show",[z]:"show"},ot=ie.forwardRef(({className:e,children:n,transitionClasses:i={},onEnter:r,...o},t)=>{const s={in:!1,timeout:300,mountOnEnter:!1,unmountOnExit:!1,appear:!1,...o},u=p.useCallback((d,v)=>{tt(d),r==null||r(d,v)},[r]);return G.jsxRuntimeExports.jsx(rt,{ref:t,addEndListener:et,...s,onEnter:u,childRef:n.ref,children:(d,v)=>ie.cloneElement(n,{...v,className:G.classNames("fade",e,n.props.className,zt[d],i[d])})})});ot.displayName="Fade";const Gt=ot;function Vt(e){const n=p.useRef(e);return n.current=e,n}function Xt(e){const n=Vt(e);p.useEffect(()=>()=>n.current(),[])}function Kt(e,n){if(e.contains)return e.contains(n);if(e.compareDocumentPosition)return e===n||!!(e.compareDocumentPosition(n)&16)}const it=p.createContext(ue?window:void 0);it.Provider;function at(){return p.useContext(it)}const Re=(e,n)=>ue?e==null?(n||we()).body:(typeof e=="function"&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function Ht(e,n){const i=at(),[r,o]=p.useState(()=>Re(e,i==null?void 0:i.document));if(!r){const t=Re(e);t&&o(t)}return p.useEffect(()=>{n&&r&&n(r)},[n,r]),p.useEffect(()=>{const t=Re(e);t!==r&&o(t)},[e,r]),r}function st({children:e,in:n,onExited:i,mountOnEnter:r,unmountOnExit:o}){const t=p.useRef(null),s=p.useRef(n),u=Me(i);p.useEffect(()=>{n?s.current=!0:u(t.current)},[n,u]);const d=Q(t,e.ref),v=p.cloneElement(e,{ref:d});return n?v:o||!s.current&&r?null:v}const Jt=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];function Zt(e,n){if(e==null)return{};var i={},r=Object.keys(e),o,t;for(t=0;t<r.length;t++)o=r[t],!(n.indexOf(o)>=0)&&(i[o]=e[o]);return i}function Qt(e){let{onEnter:n,onEntering:i,onEntered:r,onExit:o,onExiting:t,onExited:s,addEndListener:u,children:d}=e,v=Zt(e,Jt);const E=p.useRef(null),y=Q(E,typeof d=="function"?null:d.ref),C=D=>c=>{D&&E.current&&D(E.current,c)},k=p.useCallback(C(n),[n]),M=p.useCallback(C(i),[i]),j=p.useCallback(C(r),[r]),I=p.useCallback(C(o),[o]),L=p.useCallback(C(t),[t]),F=p.useCallback(C(s),[s]),A=p.useCallback(C(u),[u]);return Object.assign({},v,{nodeRef:E},n&&{onEnter:k},i&&{onEntering:M},r&&{onEntered:j},o&&{onExit:I},t&&{onExiting:L},s&&{onExited:F},u&&{addEndListener:A},{children:typeof d=="function"?(D,c)=>d(D,Object.assign({},c,{ref:y})):p.cloneElement(d,{ref:y})})}const en=["component"];function tn(e,n){if(e==null)return{};var i={},r=Object.keys(e),o,t;for(t=0;t<r.length;t++)o=r[t],!(n.indexOf(o)>=0)&&(i[o]=e[o]);return i}const nn=ie.forwardRef((e,n)=>{let{component:i}=e,r=tn(e,en);const o=Qt(r);return G.jsxRuntimeExports.jsx(i,Object.assign({ref:n},o))}),rn=nn;function on({in:e,onTransition:n}){const i=p.useRef(null),r=p.useRef(!0),o=Me(n);return Pe(()=>{if(!i.current)return;let t=!1;return o({in:e,element:i.current,initial:r.current,isStale:()=>t}),()=>{t=!0}},[e,o]),Pe(()=>(r.current=!1,()=>{r.current=!0}),[]),i}function an({children:e,in:n,onExited:i,onEntered:r,transition:o}){const[t,s]=p.useState(!n);n&&t&&s(!1);const u=on({in:!!n,onTransition:v=>{const E=()=>{v.isStale()||(v.in?r==null||r(v.element,v.initial):(s(!0),i==null||i(v.element)))};Promise.resolve(o(v)).then(E,y=>{throw v.in||s(!0),y})}}),d=Q(u,e.ref);return t&&!n?null:p.cloneElement(e,{ref:d})}function sn(e,n,i){return e?G.jsxRuntimeExports.jsx(rn,Object.assign({},i,{component:e})):n?G.jsxRuntimeExports.jsx(an,Object.assign({},i,{transition:n})):G.jsxRuntimeExports.jsx(st,Object.assign({},i))}function un(e){return e.code==="Escape"||e.keyCode===27}function cn(e,n){return e.classList?!!n&&e.classList.contains(n):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+n+" ")!==-1}exports.ENTERED=z;exports.ENTERING=U;exports.EXITED=B;exports.EXITING=ae;exports.Fade=Gt;exports.NoopTransition=st;exports.PropTypes=h;exports.TransitionWrapper=rt;exports._objectWithoutPropertiesLoose=Ve;exports.addEventListener=Je;exports.canUseDOM=ue;exports.contains=Kt;exports.hasClass=cn;exports.isEscKey=un;exports.listen=ke;exports.ownerDocument=we;exports.removeEventListener=Ze;exports.renderTransition=sn;exports.safeFindDOMNode=nt;exports.style=je;exports.transitionEnd=Qe;exports.transitionEndListener=et;exports.triggerBrowserReflow=tt;exports.useBootstrapBreakpoints=pt;exports.useBootstrapMinBreakpoint=vt;exports.useBootstrapPrefix=dt;exports.useCallbackRef=Ft;exports.useEventCallback=Me;exports.useIsRTL=Et;exports.useIsomorphicEffect=Pe;exports.useMergedRefs=Q;exports.useMounted=Ut;exports.useWaitForDOMRef=Ht;exports.useWillUnmount=Xt;exports.useWindow=at;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const useNotifications: () => {
|
|
2
|
-
addNotification: (message: string, type: 'success' | 'info' | 'danger' | 'warning') => void;
|
|
2
|
+
addNotification: (message: string, type: 'success' | 'info' | 'danger' | 'warning' | 'prompt') => void;
|
|
3
3
|
};
|
|
4
4
|
export default useNotifications;
|