diff --git a/assets/index-79d1d6a2.js b/assets/index-92526942.js similarity index 98% rename from assets/index-79d1d6a2.js rename to assets/index-92526942.js index 348235c..bd3261e 100644 --- a/assets/index-79d1d6a2.js +++ b/assets/index-92526942.js @@ -385,7 +385,7 @@ Error generating stack: `+i.message+` `)},Uj=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=b.useMemo(function(){return Vj(o)},[o]);return b.createElement(Wj,{styles:Hj(i,!t,o,n?"":"!important")})},yh=!1;if(typeof window<"u")try{var Hs=Object.defineProperty({},"passive",{get:function(){return yh=!0,!0}});window.addEventListener("test",Hs,Hs),window.removeEventListener("test",Hs,Hs)}catch{yh=!1}var mo=yh?{passive:!1}:!1,Gj=function(e){return e.tagName==="TEXTAREA"},ek=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Gj(e)&&n[t]==="visible")},Kj=function(e){return ek(e,"overflowY")},Yj=function(e){return ek(e,"overflowX")},fy=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=tk(e,r);if(o){var i=nk(e,r),a=i[1],s=i[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},qj=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Xj=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},tk=function(e,t){return e==="v"?Kj(t):Yj(t)},nk=function(e,t){return e==="v"?qj(t):Xj(t)},Qj=function(e,t){return e==="h"&&t==="rtl"?-1:1},Zj=function(e,t,n,r,o){var i=Qj(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),u=!1,c=a>0,d=0,f=0;do{var h=nk(e,s),v=h[0],g=h[1],x=h[2],m=g-x-i*v;(v||m)&&tk(e,s)&&(d+=m,f+=v),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&(o&&d===0||!o&&a>d)||!c&&(o&&f===0||!o&&-a>f))&&(u=!0),u},Us=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},hy=function(e){return[e.deltaX,e.deltaY]},py=function(e){return e&&"current"in e?e.current:e},Jj=function(e,t){return e[0]===t[0]&&e[1]===t[1]},eB=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},tB=0,vo=[];function nB(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),o=b.useState(tB++)[0],i=b.useState(Jw)[0],a=b.useRef(e);b.useEffect(function(){a.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=eL([e.lockRef.current],(e.shards||[]).map(py),!0).filter(Boolean);return g.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=b.useCallback(function(g,x){if("touches"in g&&g.touches.length===2)return!a.current.allowPinchZoom;var m=Us(g),p=n.current,y="deltaX"in g?g.deltaX:p[0]-m[0],k="deltaY"in g?g.deltaY:p[1]-m[1],P,A=g.target,T=Math.abs(y)>Math.abs(k)?"h":"v";if("touches"in g&&T==="h"&&A.type==="range")return!1;var $=fy(T,A);if(!$)return!0;if($?P=T:(P=T==="v"?"h":"v",$=fy(T,A)),!$)return!1;if(!r.current&&"changedTouches"in g&&(y||k)&&(r.current=P),!P)return!0;var O=r.current||P;return Zj(O,x,g,O==="h"?y:k,!0)},[]),l=b.useCallback(function(g){var x=g;if(!(!vo.length||vo[vo.length-1]!==i)){var m="deltaY"in x?hy(x):Us(x),p=t.current.filter(function(P){return P.name===x.type&&P.target===x.target&&Jj(P.delta,m)})[0];if(p&&p.should){x.cancelable&&x.preventDefault();return}if(!p){var y=(a.current.shards||[]).map(py).filter(Boolean).filter(function(P){return P.contains(x.target)}),k=y.length>0?s(x,y[0]):!a.current.noIsolation;k&&x.cancelable&&x.preventDefault()}}},[]),u=b.useCallback(function(g,x,m,p){var y={name:g,delta:x,target:m,should:p};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(k){return k!==y})},1)},[]),c=b.useCallback(function(g){n.current=Us(g),r.current=void 0},[]),d=b.useCallback(function(g){u(g.type,hy(g),g.target,s(g,e.lockRef.current))},[]),f=b.useCallback(function(g){u(g.type,Us(g),g.target,s(g,e.lockRef.current))},[]);b.useEffect(function(){return vo.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,mo),document.addEventListener("touchmove",l,mo),document.addEventListener("touchstart",c,mo),function(){vo=vo.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,mo),document.removeEventListener("touchmove",l,mo),document.removeEventListener("touchstart",c,mo)}},[]);var h=e.removeScrollBar,v=e.inert;return b.createElement(b.Fragment,null,v?b.createElement(i,{styles:eB(o)}):null,h?b.createElement(Uj,{gapMode:e.gapMode}):null)}const rB=tL(Zw,nB);var rk=b.forwardRef(function(e,t){return b.createElement(sc,hn({},e,{ref:t,sideCar:rB}))});rk.classNames=sc.classNames;const oB=rk;function iB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:i,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:c,isOpen:d}=pi(),[f,h]=Bx();b.useEffect(()=>{!f&&h&&setTimeout(h)},[f,h]);const v=qw(r,d);return w.jsx(Hw,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:c,children:w.jsx(oB,{removeScrollBar:!u,allowPinchZoom:a,enabled:v===1&&i,forwardProps:!0,children:e.children})})}var[aB,sB]=Gt(),lB={start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}};function uB(e,t){var n,r;if(e)return(r=(n=lB[e])==null?void 0:n[t])!=null?r:e}function cB(e){var t;const{isOpen:n,onClose:r,placement:o="right",children:i,...a}=e,s=tS(),l=(t=s.components)==null?void 0:t.Drawer,u=uB(o,s.direction);return w.jsx(aB,{value:{placement:u},children:w.jsx(Qw,{isOpen:n,onClose:r,styleConfig:l,...a,children:i})})}var dB=X(aw),ok=ue((e,t)=>{const{className:n,children:r,motionProps:o,containerProps:i,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=pi(),c=s(a,t),d=l(i),f=ye("chakra-modal__content",n),h=hi(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...h.dialog},g={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...h.dialogContainer},{placement:x}=sB();return w.jsx(iB,{children:w.jsx(X.div,{...d,className:"chakra-modal__content-container",__css:g,children:w.jsx(dB,{motionProps:o,direction:x,in:u,className:f,...c,__css:v,children:r})})})});ok.displayName="DrawerContent";var ik=ue((e,t)=>{const{className:n,...r}=e,o=ye("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...hi().footer};return w.jsx(X.footer,{ref:t,...r,__css:a,className:o})});ik.displayName="ModalFooter";var ak=ue((e,t)=>{const{className:n,...r}=e,{headerId:o,setHeaderMounted:i}=pi();b.useEffect(()=>(i(!0),()=>i(!1)),[i]);const a=ye("chakra-modal__header",n),l={flex:0,...hi().header};return w.jsx(X.header,{ref:t,className:a,id:o,...r,__css:l})});ak.displayName="ModalHeader";var fB=X(rc.div),sk=ue((e,t)=>{const{className:n,transition:r,motionProps:o,...i}=e,a=ye("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...hi().overlay},{motionPreset:u}=pi(),d=o||(u==="none"?{}:iw);return w.jsx(fB,{...d,__css:l,ref:t,className:a,...i})});sk.displayName="ModalOverlay";var lk=ue((e,t)=>{const{className:n,...r}=e,{bodyId:o,setBodyMounted:i}=pi();b.useEffect(()=>(i(!0),()=>i(!1)),[i]);const a=ye("chakra-modal__body",n),s=hi();return w.jsx(X.div,{ref:t,className:a,id:o,...r,__css:s.body})});lk.displayName="ModalBody";var uk=ue((e,t)=>{const{onClick:n,className:r,...o}=e,{onClose:i}=pi(),a=ye("chakra-modal__close-btn",r),s=hi();return w.jsx(tm,{ref:t,__css:s.closeButton,className:a,onClick:Ge(n,l=>{l.stopPropagation(),i()}),...o})});uk.displayName="ModalCloseButton";var ck=ue(function(t,n){const{children:r,placeholder:o,className:i,...a}=t;return w.jsxs(X.select,{...a,ref:n,className:ye("chakra-select",i),children:[o&&w.jsx("option",{value:"",children:o}),r]})});ck.displayName="SelectField";function hB(e,t){const n={},r={};for(const[o,i]of Object.entries(e))t.includes(o)?n[o]=i:r[o]=i;return[n,r]}var dk=ue((e,t)=>{var n;const r=fi("Select",e),{rootProps:o,placeholder:i,icon:a,color:s,height:l,h:u,minH:c,minHeight:d,iconColor:f,iconSize:h,...v}=rn(e),[g,x]=hB(v,yE),m=cw(x),p={width:"100%",height:"fit-content",position:"relative",color:s},y={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return w.jsxs(X.div,{className:"chakra-select__wrapper",__css:p,...g,...o,children:[w.jsx(ck,{ref:t,height:u??l,minH:c??d,placeholder:i,...m,__css:y,children:e.children}),w.jsx(fk,{"data-disabled":Ie(m.disabled),...(f||s)&&{color:f||s},__css:r.icon,...h&&{fontSize:h},children:a})]})});dk.displayName="Select";var pB=e=>w.jsx("svg",{viewBox:"0 0 24 24",...e,children:w.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),mB=X("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),fk=e=>{const{children:t=w.jsx(pB,{}),...n}=e,r=b.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return w.jsx(mB,{...n,className:"chakra-select__icon-wrapper",children:b.isValidElement(t)?r:null})};fk.displayName="SelectIcon";const vB=({title:e,actions:t})=>w.jsxs(mh,{alignItems:"center",spacing:2,height:16,bgColor:"white",borderBottom:"1px",borderColor:"gray.200",position:"relative",children:[w.jsx(dm,{mx:6,flex:1,textAlign:"left",fontSize:"xl",fontWeight:"medium",color:"gray.600",children:e}),t!=null?w.jsx(mh,{position:"absolute",right:2,spacing:0,bottom:0,top:0,children:t}):null]});var hk={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},my=yt.createContext&&yt.createContext(hk),vr=globalThis&&globalThis.__assign||function(){return vr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=z?V:""+Array(z+1-H.length).join(R)+V},k={s:y,z:function(V){var z=-V.utcOffset(),R=Math.abs(z),H=Math.floor(R/60),L=R%60;return(z<=0?"+":"-")+y(H,2,"0")+":"+y(L,2,"0")},m:function V(z,R){if(z.date()1)return V(F[0])}else{var j=z.name;A[j]=z,L=j}return!H&&L&&(P=L),L||!H&&P},O=function(V,z){if(T(V))return V.clone();var R=typeof z=="object"?z:{};return R.date=V,R.args=arguments,new Q(R)},D=k;D.l=$,D.i=T,D.w=function(V,z){return O(V,{locale:z.$L,utc:z.$u,x:z.$x,$offset:z.$offset})};var Q=function(){function V(R){this.$L=$(R.locale,null,!0),this.parse(R)}var z=V.prototype;return z.parse=function(R){this.$d=function(H){var L=H.date,M=H.utc;if(L===null)return new Date(NaN);if(D.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var F=L.match(x);if(F){var j=F[2]-1||0,B=(F[7]||"0").substring(0,3);return M?new Date(Date.UTC(F[1],j,F[3]||1,F[4]||0,F[5]||0,F[6]||0,B)):new Date(F[1],j,F[3]||1,F[4]||0,F[5]||0,F[6]||0,B)}}return new Date(L)}(R),this.$x=R.x||{},this.init()},z.init=function(){var R=this.$d;this.$y=R.getFullYear(),this.$M=R.getMonth(),this.$D=R.getDate(),this.$W=R.getDay(),this.$H=R.getHours(),this.$m=R.getMinutes(),this.$s=R.getSeconds(),this.$ms=R.getMilliseconds()},z.$utils=function(){return D},z.isValid=function(){return this.$d.toString()!==g},z.isSame=function(R,H){var L=O(R);return this.startOf(H)<=L&&L<=this.endOf(H)},z.isAfter=function(R,H){return O(R){let t;const n=new Set,r=(l,u)=>{const c=typeof l=="function"?l(t):l;if(!Object.is(c,t)){const d=t;t=u??typeof c!="object"?c:Object.assign({},t,c),n.forEach(f=>f(t,d))}},o=()=>t,s={setState:r,getState:o,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,s),s},xB=e=>e?vy(e):vy;var yk={exports:{}},bk={},Sk={exports:{}},xk={};/** +`)},tB=0,vo=[];function nB(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),o=b.useState(tB++)[0],i=b.useState(Jw)[0],a=b.useRef(e);b.useEffect(function(){a.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=eL([e.lockRef.current],(e.shards||[]).map(py),!0).filter(Boolean);return g.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=b.useCallback(function(g,x){if("touches"in g&&g.touches.length===2)return!a.current.allowPinchZoom;var m=Us(g),p=n.current,y="deltaX"in g?g.deltaX:p[0]-m[0],k="deltaY"in g?g.deltaY:p[1]-m[1],P,A=g.target,T=Math.abs(y)>Math.abs(k)?"h":"v";if("touches"in g&&T==="h"&&A.type==="range")return!1;var $=fy(T,A);if(!$)return!0;if($?P=T:(P=T==="v"?"h":"v",$=fy(T,A)),!$)return!1;if(!r.current&&"changedTouches"in g&&(y||k)&&(r.current=P),!P)return!0;var O=r.current||P;return Zj(O,x,g,O==="h"?y:k,!0)},[]),l=b.useCallback(function(g){var x=g;if(!(!vo.length||vo[vo.length-1]!==i)){var m="deltaY"in x?hy(x):Us(x),p=t.current.filter(function(P){return P.name===x.type&&P.target===x.target&&Jj(P.delta,m)})[0];if(p&&p.should){x.cancelable&&x.preventDefault();return}if(!p){var y=(a.current.shards||[]).map(py).filter(Boolean).filter(function(P){return P.contains(x.target)}),k=y.length>0?s(x,y[0]):!a.current.noIsolation;k&&x.cancelable&&x.preventDefault()}}},[]),u=b.useCallback(function(g,x,m,p){var y={name:g,delta:x,target:m,should:p};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(k){return k!==y})},1)},[]),c=b.useCallback(function(g){n.current=Us(g),r.current=void 0},[]),d=b.useCallback(function(g){u(g.type,hy(g),g.target,s(g,e.lockRef.current))},[]),f=b.useCallback(function(g){u(g.type,Us(g),g.target,s(g,e.lockRef.current))},[]);b.useEffect(function(){return vo.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,mo),document.addEventListener("touchmove",l,mo),document.addEventListener("touchstart",c,mo),function(){vo=vo.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,mo),document.removeEventListener("touchmove",l,mo),document.removeEventListener("touchstart",c,mo)}},[]);var h=e.removeScrollBar,v=e.inert;return b.createElement(b.Fragment,null,v?b.createElement(i,{styles:eB(o)}):null,h?b.createElement(Uj,{gapMode:e.gapMode}):null)}const rB=tL(Zw,nB);var rk=b.forwardRef(function(e,t){return b.createElement(sc,hn({},e,{ref:t,sideCar:rB}))});rk.classNames=sc.classNames;const oB=rk;function iB(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:o,blockScrollOnMount:i,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:u,lockFocusAcrossFrames:c,isOpen:d}=pi(),[f,h]=Bx();b.useEffect(()=>{!f&&h&&setTimeout(h)},[f,h]);const v=qw(r,d);return w.jsx(Hw,{autoFocus:t,isDisabled:!n,initialFocusRef:o,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:c,children:w.jsx(oB,{removeScrollBar:!u,allowPinchZoom:a,enabled:v===1&&i,forwardProps:!0,children:e.children})})}var[aB,sB]=Gt(),lB={start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}};function uB(e,t){var n,r;if(e)return(r=(n=lB[e])==null?void 0:n[t])!=null?r:e}function cB(e){var t;const{isOpen:n,onClose:r,placement:o="right",children:i,...a}=e,s=tS(),l=(t=s.components)==null?void 0:t.Drawer,u=uB(o,s.direction);return w.jsx(aB,{value:{placement:u},children:w.jsx(Qw,{isOpen:n,onClose:r,styleConfig:l,...a,children:i})})}var dB=X(aw),ok=ue((e,t)=>{const{className:n,children:r,motionProps:o,containerProps:i,...a}=e,{getDialogProps:s,getDialogContainerProps:l,isOpen:u}=pi(),c=s(a,t),d=l(i),f=ye("chakra-modal__content",n),h=hi(),v={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...h.dialog},g={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...h.dialogContainer},{placement:x}=sB();return w.jsx(iB,{children:w.jsx(X.div,{...d,className:"chakra-modal__content-container",__css:g,children:w.jsx(dB,{motionProps:o,direction:x,in:u,className:f,...c,__css:v,children:r})})})});ok.displayName="DrawerContent";var ik=ue((e,t)=>{const{className:n,...r}=e,o=ye("chakra-modal__footer",n),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...hi().footer};return w.jsx(X.footer,{ref:t,...r,__css:a,className:o})});ik.displayName="ModalFooter";var ak=ue((e,t)=>{const{className:n,...r}=e,{headerId:o,setHeaderMounted:i}=pi();b.useEffect(()=>(i(!0),()=>i(!1)),[i]);const a=ye("chakra-modal__header",n),l={flex:0,...hi().header};return w.jsx(X.header,{ref:t,className:a,id:o,...r,__css:l})});ak.displayName="ModalHeader";var fB=X(rc.div),sk=ue((e,t)=>{const{className:n,transition:r,motionProps:o,...i}=e,a=ye("chakra-modal__overlay",n),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...hi().overlay},{motionPreset:u}=pi(),d=o||(u==="none"?{}:iw);return w.jsx(fB,{...d,__css:l,ref:t,className:a,...i})});sk.displayName="ModalOverlay";var lk=ue((e,t)=>{const{className:n,...r}=e,{bodyId:o,setBodyMounted:i}=pi();b.useEffect(()=>(i(!0),()=>i(!1)),[i]);const a=ye("chakra-modal__body",n),s=hi();return w.jsx(X.div,{ref:t,className:a,id:o,...r,__css:s.body})});lk.displayName="ModalBody";var uk=ue((e,t)=>{const{onClick:n,className:r,...o}=e,{onClose:i}=pi(),a=ye("chakra-modal__close-btn",r),s=hi();return w.jsx(tm,{ref:t,__css:s.closeButton,className:a,onClick:Ge(n,l=>{l.stopPropagation(),i()}),...o})});uk.displayName="ModalCloseButton";var ck=ue(function(t,n){const{children:r,placeholder:o,className:i,...a}=t;return w.jsxs(X.select,{...a,ref:n,className:ye("chakra-select",i),children:[o&&w.jsx("option",{value:"",children:o}),r]})});ck.displayName="SelectField";function hB(e,t){const n={},r={};for(const[o,i]of Object.entries(e))t.includes(o)?n[o]=i:r[o]=i;return[n,r]}var dk=ue((e,t)=>{var n;const r=fi("Select",e),{rootProps:o,placeholder:i,icon:a,color:s,height:l,h:u,minH:c,minHeight:d,iconColor:f,iconSize:h,...v}=rn(e),[g,x]=hB(v,yE),m=cw(x),p={width:"100%",height:"fit-content",position:"relative",color:s},y={paddingEnd:"2rem",...r.field,_focus:{zIndex:"unset",...(n=r.field)==null?void 0:n._focus}};return w.jsxs(X.div,{className:"chakra-select__wrapper",__css:p,...g,...o,children:[w.jsx(ck,{ref:t,height:u??l,minH:c??d,placeholder:i,...m,__css:y,children:e.children}),w.jsx(fk,{"data-disabled":Ie(m.disabled),...(f||s)&&{color:f||s},__css:r.icon,...h&&{fontSize:h},children:a})]})});dk.displayName="Select";var pB=e=>w.jsx("svg",{viewBox:"0 0 24 24",...e,children:w.jsx("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),mB=X("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),fk=e=>{const{children:t=w.jsx(pB,{}),...n}=e,r=b.cloneElement(t,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return w.jsx(mB,{...n,className:"chakra-select__icon-wrapper",children:b.isValidElement(t)?r:null})};fk.displayName="SelectIcon";const vB=({title:e,actions:t})=>w.jsxs(mh,{alignItems:"center",spacing:2,height:16,bgColor:"white",borderBottom:"1px",borderColor:"gray.200",position:"relative",children:[w.jsx(dm,{mx:6,flex:1,textAlign:"left",fontSize:"xl",fontWeight:"medium",color:"gray.600",children:e}),t!=null?w.jsx(mh,{position:"absolute",right:2,spacing:0,bottom:0,top:0,children:t}):null]});var hk={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},my=yt.createContext&&yt.createContext(hk),vr=globalThis&&globalThis.__assign||function(){return vr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=z?V:""+Array(z+1-H.length).join(R)+V},k={s:y,z:function(V){var z=-V.utcOffset(),R=Math.abs(z),H=Math.floor(R/60),L=R%60;return(z<=0?"+":"-")+y(H,2,"0")+":"+y(L,2,"0")},m:function V(z,R){if(z.date()1)return V(F[0])}else{var j=z.name;A[j]=z,L=j}return!H&&L&&(P=L),L||!H&&P},O=function(V,z){if(T(V))return V.clone();var R=typeof z=="object"?z:{};return R.date=V,R.args=arguments,new Q(R)},D=k;D.l=$,D.i=T,D.w=function(V,z){return O(V,{locale:z.$L,utc:z.$u,x:z.$x,$offset:z.$offset})};var Q=function(){function V(R){this.$L=$(R.locale,null,!0),this.parse(R)}var z=V.prototype;return z.parse=function(R){this.$d=function(H){var L=H.date,M=H.utc;if(L===null)return new Date(NaN);if(D.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var F=L.match(x);if(F){var j=F[2]-1||0,B=(F[7]||"0").substring(0,3);return M?new Date(Date.UTC(F[1],j,F[3]||1,F[4]||0,F[5]||0,F[6]||0,B)):new Date(F[1],j,F[3]||1,F[4]||0,F[5]||0,F[6]||0,B)}}return new Date(L)}(R),this.$x=R.x||{},this.init()},z.init=function(){var R=this.$d;this.$y=R.getFullYear(),this.$M=R.getMonth(),this.$D=R.getDate(),this.$W=R.getDay(),this.$H=R.getHours(),this.$m=R.getMinutes(),this.$s=R.getSeconds(),this.$ms=R.getMilliseconds()},z.$utils=function(){return D},z.isValid=function(){return this.$d.toString()!==g},z.isSame=function(R,H){var L=O(R);return this.startOf(H)<=L&&L<=this.endOf(H)},z.isAfter=function(R,H){return O(R){let t;const n=new Set,r=(l,u)=>{const c=typeof l=="function"?l(t):l;if(!Object.is(c,t)){const d=t;t=u??typeof c!="object"?c:Object.assign({},t,c),n.forEach(f=>f(t,d))}},o=()=>t,s={setState:r,getState:o,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{({BASE_URL:"/loli-license",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,s),s},xB=e=>e?vy(e):vy;var yk={exports:{}},bk={},Sk={exports:{}},xk={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -401,4 +401,4 @@ Error generating stack: `+i.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var lc=b,RB=MB;function zB(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var FB=typeof Object.is=="function"?Object.is:zB,IB=RB.useSyncExternalStore,DB=lc.useRef,OB=lc.useEffect,LB=lc.useMemo,jB=lc.useDebugValue;bk.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=DB(null);if(i.current===null){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=LB(function(){function l(h){if(!u){if(u=!0,c=h,h=r(h),o!==void 0&&a.hasValue){var v=a.value;if(o(v,h))return d=v}return d=h}if(v=d,FB(c,h))return v;var g=r(h);return o!==void 0&&o(v,g)?v:(c=h,d=g)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,o]);var s=IB(e,i[0],i[1]);return OB(function(){a.hasValue=!0,a.value=s},[s]),jB(s),s};yk.exports=bk;var BB=yk.exports;const NB=Va(BB),{useSyncExternalStoreWithSelector:VB}=NB;function WB(e,t=e.getState,n){const r=VB(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return b.useDebugValue(r),r}const gy=e=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?xB(e):e,n=(r,o)=>WB(t,r,o);return Object.assign(n,t),n},HB=e=>e?gy(e):gy,UB="/assets/mahirussy-15408101.jpg",yy=(e=1)=>{let t="";const n="abcdefghijklmnopqrstuvwxyz".toUpperCase();for(let r=0;ryy()+"-"+yy(2)+Math.round(Math.random()*9999).toString().padStart(4,"0"),wk=HB(e=>({name:"Mahiro Oyama",idNo:GB(),accessLevel:"Headpats and hugs only",sex:"Male",birthday:wl().format("YYYY-MM-DD"),photo:UB,expYears:5,showWatermarkOnExport:!0,setValues:t=>e({...t})})),KB=(e,t,n,r,o,i)=>{for(var a=t.split(" "),s="",l=0;lo&&l>0?(e.fillText(s,n,r),s=a[l]+" ",r+=i):s=u}e.fillText(s,n,r)},YB=e=>{e=e.replace(/^\s+|\s+$/g,""),e=e.toLowerCase();for(var t="àáãäâèéëêìíïîòóöôùúüûñç·/_,:;",n="aaaaaeeeeiiiioooouuuunc------",r=0,o=t.length;r{a=typeof a=="number"?a:.5,s=typeof s=="number"?s:.5,a<0&&(a=0),s<0&&(s=0),a>1&&(a=1),s>1&&(s=1);var l=t.width,u=t.height,c=Math.min(o/l,i/u),d=l*c,f=u*c,h,v,g,x,m=1;dl&&(g=l),x>u&&(x=u),e.drawImage(t,h,v,g,x,n,r,o,i)},by=e=>new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t(n)}}),XB=e=>new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>{t(r.result)},r.onerror=o=>{n(o)}}),QB=({isOpen:e,onClose:t})=>{const n=wk(),r=b.useRef(null),o=async i=>{var l;if(!((l=i.target.files)!=null&&l.length))return;const a=i.target.files[0],s=await XB(a);n.setValues({photo:s})};return w.jsxs(cB,{isOpen:e,placement:"right",onClose:t,children:[w.jsx(sk,{}),w.jsxs(ok,{children:[w.jsx(uk,{}),w.jsx(ak,{children:"Card Detail"}),w.jsx(lk,{children:w.jsxs(Kw,{spacing:3,alignItems:"stretch",children:[w.jsxs(cu,{w:"120px",h:40,bg:"white",shadow:"md",rounded:"md",p:2,overflow:"hidden",position:"relative",onClick:()=>{var i;return(i=r.current)==null?void 0:i.click()},children:[w.jsx(sw,{src:n.photo,w:"full",h:"full",objectFit:"cover"}),w.jsx(os,{position:"absolute",top:1,right:1,color:"gray.900",bg:"whiteAlpha.800",p:1,rounded:"md",children:w.jsx(vk,{})})]}),w.jsx("input",{ref:r,type:"file",accept:"image/*",onChange:o,style:{display:"none"}}),w.jsxs(Rr,{children:[w.jsx(zr,{children:"Agent Name"}),w.jsx(Dr,{value:n.name,onChange:i=>n.setValues({name:i.target.value})})]}),w.jsxs(Rr,{children:[w.jsx(zr,{children:"ID Number"}),w.jsx(Dr,{value:n.idNo,onChange:i=>n.setValues({idNo:i.target.value})})]}),w.jsxs(Rr,{children:[w.jsx(zr,{children:"Sex"}),w.jsx(Dr,{value:n.sex,onChange:i=>n.setValues({sex:i.target.value})})]}),w.jsxs(Rr,{children:[w.jsx(zr,{children:"Birthday"}),w.jsx(Dr,{type:"date",value:n.birthday,onChange:i=>n.setValues({birthday:i.target.value})})]}),w.jsxs(Rr,{children:[w.jsx(zr,{children:"Access Level"}),w.jsx(Dr,{value:n.accessLevel,onChange:i=>n.setValues({accessLevel:i.target.value})})]}),w.jsxs(Rr,{children:[w.jsx(zr,{children:"Expires in"}),w.jsx(dk,{value:n.expYears.toString(),onChange:i=>n.setValues({expYears:parseInt(i.target.value,10)||1}),children:[...Array(10)].map((i,a)=>w.jsx("option",{value:(a+1).toString(),children:`${a+1} years`},a))})]}),w.jsx(fw,{isChecked:n.showWatermarkOnExport,onChange:i=>n.setValues({showWatermarkOnExport:i.target.checked}),children:"Show Watermark on Export"})]})}),w.jsx(ik,{children:w.jsx(cu,{colorScheme:"blue",onClick:()=>t(),children:"Save"})})]})]})},ZB="/assets/base-card-bg-2a2686cb.png",JB=({onRef:e})=>{const t=b.useRef(null),n=wk(),[r,o]=b.useState({base:null,photo:null});b.useEffect(()=>{by(ZB).then(s=>{o(l=>({...l,base:s}))})},[]),b.useEffect(()=>{const s=n.photo;s&&by(s).then(l=>{o(u=>({...u,photo:l}))})},[n.photo]);const i=(s=!1)=>{if(!t.current)return;const l=t.current,u=l.getContext("2d");if(!u||!r.base)return;l.width=r.base.width,l.height=r.base.height+(s?12:0),u.clearRect(0,0,l.width,l.height),u.rect(0,0,l.width,l.height),u.fillStyle="#f3f3f3",u.fill(),r.photo&&qB(u,r.photo,640,40,172,230),u.drawImage(r.base,0,0),u.fillStyle="#111",u.font="normal 24px Arial",u.fillText(n.name,190,152),u.fillText(n.idNo,190,220),KB(u,n.accessLevel,190,290,180,28),u.fillText(n.sex,418,152),u.fillText(wl(n.birthday).format("DD-MMM-YYYY"),418,220),u.fillText("One at time",418,290);const c=wl().add(n.expYears,"year");u.fillText(wl(c).format("YYYYMMMDD").toUpperCase(),320,416),s&&(u.fillStyle="#333",u.font="normal 16px Arial",u.fillText("Wanna join FBI watch list? s.id/loli-license",20,l.height-8))};b.useEffect(()=>{i()},[i,r,n]);const a=()=>{t.current&&(i(n.showWatermarkOnExport),setTimeout(()=>{const s=document.createElement("a");s.download=`loli_license_${YB(n.name)}.png`,s.href=t.current.toDataURL(),s.click(),i(!1)},100))};return b.useEffect(()=>{e&&e({onExport:a})},[]),w.jsx(os,{flex:1,display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",padding:3,children:w.jsx("canvas",{ref:t,style:{maxWidth:"100%",maxHeight:"100%"}})})},eN=()=>{const e=b.useRef(null),t=mj();return w.jsxs(cO,{children:[w.jsx(QB,{isOpen:t.isOpen,onClose:t.onClose}),w.jsxs(os,{bg:"gray.100",display:"flex",flexDir:"column",height:"100vh",alignItems:"stretch",overflow:"hidden",children:[w.jsx(vB,{title:"My Loli License",actions:w.jsxs(w.Fragment,{children:[w.jsx(sh,{size:"lg",fontSize:"xl","aria-label":"Save",icon:w.jsx(bB,{}),variant:"ghost",onClick:()=>e.current&&e.current.onExport()}),w.jsx(sh,{size:"lg",fontSize:"xl","aria-label":"Edit",icon:w.jsx(vk,{}),variant:"ghost",onClick:t.onOpen})]})}),w.jsx(JB,{onRef:n=>{e.current=n}}),w.jsxs(dm,{textAlign:"center",my:2,children:["Artwork by:"," ",w.jsx(vh,{fontWeight:"bold",href:"https://www.artstation.com/artwork/14orKL",children:"FLying Cookie"}),"  | Fork on ",w.jsx(vh,{fontWeight:"bold",href:"https://github.com/khairul169/loli-license.git",children:"Github"})]})]})]})};Fd.createRoot(document.getElementById("root")).render(w.jsx(yt.StrictMode,{children:w.jsx(eN,{})})); + */var lc=b,RB=MB;function zB(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var FB=typeof Object.is=="function"?Object.is:zB,IB=RB.useSyncExternalStore,DB=lc.useRef,OB=lc.useEffect,LB=lc.useMemo,jB=lc.useDebugValue;bk.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var i=DB(null);if(i.current===null){var a={hasValue:!1,value:null};i.current=a}else a=i.current;i=LB(function(){function l(h){if(!u){if(u=!0,c=h,h=r(h),o!==void 0&&a.hasValue){var v=a.value;if(o(v,h))return d=v}return d=h}if(v=d,FB(c,h))return v;var g=r(h);return o!==void 0&&o(v,g)?v:(c=h,d=g)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,o]);var s=IB(e,i[0],i[1]);return OB(function(){a.hasValue=!0,a.value=s},[s]),jB(s),s};yk.exports=bk;var BB=yk.exports;const NB=Va(BB),{useSyncExternalStoreWithSelector:VB}=NB;function WB(e,t=e.getState,n){const r=VB(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return b.useDebugValue(r),r}const gy=e=>{({BASE_URL:"/loli-license",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?xB(e):e,n=(r,o)=>WB(t,r,o);return Object.assign(n,t),n},HB=e=>e?gy(e):gy,UB="/loli-license/assets/mahirussy-15408101.jpg",yy=(e=1)=>{let t="";const n="abcdefghijklmnopqrstuvwxyz".toUpperCase();for(let r=0;ryy()+"-"+yy(2)+Math.round(Math.random()*9999).toString().padStart(4,"0"),wk=HB(e=>({name:"Mahiro Oyama",idNo:GB(),accessLevel:"Headpats and hugs only",sex:"Male",birthday:wl().format("YYYY-MM-DD"),photo:UB,expYears:5,showWatermarkOnExport:!0,setValues:t=>e({...t})})),KB=(e,t,n,r,o,i)=>{for(var a=t.split(" "),s="",l=0;lo&&l>0?(e.fillText(s,n,r),s=a[l]+" ",r+=i):s=u}e.fillText(s,n,r)},YB=e=>{e=e.replace(/^\s+|\s+$/g,""),e=e.toLowerCase();for(var t="àáãäâèéëêìíïîòóöôùúüûñç·/_,:;",n="aaaaaeeeeiiiioooouuuunc------",r=0,o=t.length;r{a=typeof a=="number"?a:.5,s=typeof s=="number"?s:.5,a<0&&(a=0),s<0&&(s=0),a>1&&(a=1),s>1&&(s=1);var l=t.width,u=t.height,c=Math.min(o/l,i/u),d=l*c,f=u*c,h,v,g,x,m=1;dl&&(g=l),x>u&&(x=u),e.drawImage(t,h,v,g,x,n,r,o,i)},by=e=>new Promise(t=>{const n=new Image;n.src=e,n.onload=()=>{t(n)}}),XB=e=>new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>{t(r.result)},r.onerror=o=>{n(o)}}),QB=({isOpen:e,onClose:t})=>{const n=wk(),r=b.useRef(null),o=async i=>{var l;if(!((l=i.target.files)!=null&&l.length))return;const a=i.target.files[0],s=await XB(a);n.setValues({photo:s})};return w.jsxs(cB,{isOpen:e,placement:"right",onClose:t,children:[w.jsx(sk,{}),w.jsxs(ok,{children:[w.jsx(uk,{}),w.jsx(ak,{children:"Card Detail"}),w.jsx(lk,{children:w.jsxs(Kw,{spacing:3,alignItems:"stretch",children:[w.jsxs(cu,{w:"120px",h:40,bg:"white",shadow:"md",rounded:"md",p:2,overflow:"hidden",position:"relative",onClick:()=>{var i;return(i=r.current)==null?void 0:i.click()},children:[w.jsx(sw,{src:n.photo,w:"full",h:"full",objectFit:"cover"}),w.jsx(os,{position:"absolute",top:1,right:1,color:"gray.900",bg:"whiteAlpha.800",p:1,rounded:"md",children:w.jsx(vk,{})})]}),w.jsx("input",{ref:r,type:"file",accept:"image/*",onChange:o,style:{display:"none"}}),w.jsxs(Rr,{children:[w.jsx(zr,{children:"Agent Name"}),w.jsx(Dr,{value:n.name,onChange:i=>n.setValues({name:i.target.value})})]}),w.jsxs(Rr,{children:[w.jsx(zr,{children:"ID Number"}),w.jsx(Dr,{value:n.idNo,onChange:i=>n.setValues({idNo:i.target.value})})]}),w.jsxs(Rr,{children:[w.jsx(zr,{children:"Sex"}),w.jsx(Dr,{value:n.sex,onChange:i=>n.setValues({sex:i.target.value})})]}),w.jsxs(Rr,{children:[w.jsx(zr,{children:"Birthday"}),w.jsx(Dr,{type:"date",value:n.birthday,onChange:i=>n.setValues({birthday:i.target.value})})]}),w.jsxs(Rr,{children:[w.jsx(zr,{children:"Access Level"}),w.jsx(Dr,{value:n.accessLevel,onChange:i=>n.setValues({accessLevel:i.target.value})})]}),w.jsxs(Rr,{children:[w.jsx(zr,{children:"Expires in"}),w.jsx(dk,{value:n.expYears.toString(),onChange:i=>n.setValues({expYears:parseInt(i.target.value,10)||1}),children:[...Array(10)].map((i,a)=>w.jsx("option",{value:(a+1).toString(),children:`${a+1} years`},a))})]}),w.jsx(fw,{isChecked:n.showWatermarkOnExport,onChange:i=>n.setValues({showWatermarkOnExport:i.target.checked}),children:"Show Watermark on Export"})]})}),w.jsx(ik,{children:w.jsx(cu,{colorScheme:"blue",onClick:()=>t(),children:"Save"})})]})]})},ZB="/loli-license/assets/base-card-bg-2a2686cb.png",JB=({onRef:e})=>{const t=b.useRef(null),n=wk(),[r,o]=b.useState({base:null,photo:null});b.useEffect(()=>{by(ZB).then(s=>{o(l=>({...l,base:s}))})},[]),b.useEffect(()=>{const s=n.photo;s&&by(s).then(l=>{o(u=>({...u,photo:l}))})},[n.photo]);const i=(s=!1)=>{if(!t.current)return;const l=t.current,u=l.getContext("2d");if(!u||!r.base)return;l.width=r.base.width,l.height=r.base.height+(s?12:0),u.clearRect(0,0,l.width,l.height),u.rect(0,0,l.width,l.height),u.fillStyle="#f3f3f3",u.fill(),r.photo&&qB(u,r.photo,640,40,172,230),u.drawImage(r.base,0,0),u.fillStyle="#111",u.font="normal 24px Arial",u.fillText(n.name,190,152),u.fillText(n.idNo,190,220),KB(u,n.accessLevel,190,290,180,28),u.fillText(n.sex,418,152),u.fillText(wl(n.birthday).format("DD-MMM-YYYY"),418,220),u.fillText("One at time",418,290);const c=wl().add(n.expYears,"year");u.fillText(wl(c).format("YYYYMMMDD").toUpperCase(),320,416),s&&(u.fillStyle="#333",u.font="normal 16px Arial",u.fillText("Wanna join FBI watch list? s.id/loli-license",20,l.height-8))};b.useEffect(()=>{i()},[i,r,n]);const a=()=>{t.current&&(i(n.showWatermarkOnExport),setTimeout(()=>{const s=document.createElement("a");s.download=`loli_license_${YB(n.name)}.png`,s.href=t.current.toDataURL(),s.click(),i(!1)},100))};return b.useEffect(()=>{e&&e({onExport:a})},[]),w.jsx(os,{flex:1,display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden",padding:3,children:w.jsx("canvas",{ref:t,style:{maxWidth:"100%",maxHeight:"100%"}})})},eN=()=>{const e=b.useRef(null),t=mj();return w.jsxs(cO,{children:[w.jsx(QB,{isOpen:t.isOpen,onClose:t.onClose}),w.jsxs(os,{bg:"gray.100",display:"flex",flexDir:"column",height:"100vh",alignItems:"stretch",overflow:"hidden",children:[w.jsx(vB,{title:"My Loli License",actions:w.jsxs(w.Fragment,{children:[w.jsx(sh,{size:"lg",fontSize:"xl","aria-label":"Save",icon:w.jsx(bB,{}),variant:"ghost",onClick:()=>e.current&&e.current.onExport()}),w.jsx(sh,{size:"lg",fontSize:"xl","aria-label":"Edit",icon:w.jsx(vk,{}),variant:"ghost",onClick:t.onOpen})]})}),w.jsx(JB,{onRef:n=>{e.current=n}}),w.jsxs(dm,{textAlign:"center",my:2,children:["Artwork by:"," ",w.jsx(vh,{fontWeight:"bold",href:"https://www.artstation.com/artwork/14orKL",children:"FLying Cookie"}),"  | Fork on ",w.jsx(vh,{fontWeight:"bold",href:"https://github.com/khairul169/loli-license.git",children:"Github"})]})]})]})};Fd.createRoot(document.getElementById("root")).render(w.jsx(yt.StrictMode,{children:w.jsx(eN,{})})); diff --git a/index.html b/index.html index 85da3a5..8ad8e43 100644 --- a/index.html +++ b/index.html @@ -2,10 +2,10 @@ - + License to Have Lolis Generator - +