Add files via upload
This commit is contained in:
1 parent
46816797eb
commit
369afd8999
5 files changed
+134
-11
No files matched your search
Vendored
+111
@@ -0,0 +1,111 @@
|
||||
function oD(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const l in r)if(l!=="default"&&!(l in e)){const o=Object.getOwnPropertyDescriptor(r,l);o&&Object.defineProperty(e,l,o.get?o:{enumerable:!0,get:()=>r[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function ua(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fv={exports:{}},fu={};var yS;function uD(){if(yS)return fu;yS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,l,o){var s=null;if(o!==void 0&&(s=""+o),l.key!==void 0&&(s=""+l.key),"key"in l){o={};for(var f in l)f!=="key"&&(o[f]=l[f])}else o=l;return l=o.ref,{$$typeof:e,type:r,key:s,ref:l!==void 0?l:null,props:o}}return fu.Fragment=t,fu.jsx=n,fu.jsxs=n,fu}var gS;function sD(){return gS||(gS=1,fv.exports=uD()),fv.exports}var y=sD(),dv={exports:{}},je={};var bS;function cD(){if(bS)return je;bS=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),x=Symbol.iterator;function w(D){return D===null||typeof D!="object"?null:(D=x&&D[x]||D["@@iterator"],typeof D=="function"?D:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,O={};function E(D,F,ae){this.props=D,this.context=F,this.refs=O,this.updater=ae||j}E.prototype.isReactComponent={},E.prototype.setState=function(D,F){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,F,"setState")},E.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function N(){}N.prototype=E.prototype;function k(D,F,ae){this.props=D,this.context=F,this.refs=O,this.updater=ae||j}var T=k.prototype=new N;T.constructor=k,S(T,E.prototype),T.isPureReactComponent=!0;var C=Array.isArray;function M(){}var z={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function H(D,F,ae){var le=ae.ref;return{$$typeof:e,type:D,key:F,ref:le!==void 0?le:null,props:ae}}function ee(D,F){return H(D.type,F,D.props)}function G(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function B(D){var F={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(ae){return F[ae]})}var ne=/\/+/g;function oe(D,F){return typeof D=="object"&&D!==null&&D.key!=null?B(""+D.key):F.toString(36)}function he(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(M,M):(D.status="pending",D.then(function(F){D.status==="pending"&&(D.status="fulfilled",D.value=F)},function(F){D.status==="pending"&&(D.status="rejected",D.reason=F)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function I(D,F,ae,le,ve){var xe=typeof D;(xe==="undefined"||xe==="boolean")&&(D=null);var be=!1;if(D===null)be=!0;else switch(xe){case"bigint":case"string":case"number":be=!0;break;case"object":switch(D.$$typeof){case e:case t:be=!0;break;case m:return be=D._init,I(be(D._payload),F,ae,le,ve)}}if(be)return ve=ve(D),be=le===""?"."+oe(D,0):le,C(ve)?(ae="",be!=null&&(ae=be.replace(ne,"$&/")+"/"),I(ve,F,ae,"",function(ye){return ye})):ve!=null&&(G(ve)&&(ve=ee(ve,ae+(ve.key==null||D&&D.key===ve.key?"":(""+ve.key).replace(ne,"$&/")+"/")+be)),F.push(ve)),1;be=0;var Me=le===""?".":le+":";if(C(D))for(var Z=0;Z<D.length;Z++)le=D[Z],xe=Me+oe(le,Z),be+=I(le,F,ae,xe,ve);else if(Z=w(D),typeof Z=="function")for(D=Z.call(D),Z=0;!(le=D.next()).done;)le=le.value,xe=Me+oe(le,Z++),be+=I(le,F,ae,xe,ve);else if(xe==="object"){if(typeof D.then=="function")return I(he(D),F,ae,le,ve);throw F=String(D),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":F)+"). If you meant to render a collection of chilLine truncated
|
||||
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
||||
`+re+a+jt}var Ot=!1;function ht(a,i){if(!a||Ot)return"";Ot=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var J=function(){throw Error()};if(Object.defineProperty(J.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(J,[])}catch(Y){var K=Y}Reflect.construct(a,[],J)}else{try{J.call()}catch(Y){K=Y}a.call(J.prototype)}}else{try{throw Error()}catch(Y){K=Y}(J=a())&&typeof J.catch=="function"&&J.catch(function(){})}}catch(Y){if(Y&&K&&typeof Y.stack=="string")return[Y.stack,K.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var v=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");v&&v.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=c.DetermineComponentFrameRoot(),A=g[0],_=g[1];if(A&&_){var P=A.split(`
|
||||
`),q=_.split(`
|
||||
`);for(v=c=0;c<P.length&&!P[c].includes("DetermineComponentFrameRoot");)c++;for(;v<q.length&&!q[v].includes("DetermineComponentFrameRoot");)v++;if(c===P.length||v===q.length)for(c=P.length-1,v=q.length-1;1<=c&&0<=v&&P[c]!==q[v];)v--;for(;1<=c&&0<=v;c--,v--)if(P[c]!==q[v]){if(c!==1||v!==1)do if(c--,v--,0>v||P[c]!==q[v]){var X=`
|
||||
`+P[c].replace(" at new "," at ");return a.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",a.displayName)),X}while(1<=c&&0<=v);break}}}finally{Ot=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?Se(u):""}function hn(a,i){switch(a.tag){case 26:case 27:case 5:return Se(a.type);case 16:return Se("Lazy");case 13:return a.child!==i&&i!==null?Se("Suspense Fallback"):Se("Suspense");case 19:return Se("SuspenseList");case 0:case 15:return ht(a.type,!1);case 11:return ht(a.type.render,!1);case 1:return ht(a.type,!0);case 31:return Se("Activity");default:return""}}function pa(a){try{var i="",u=null;do i+=hn(a,u),u=a,a=a.return;while(a);return i}catch(c){return`
|
||||
Error generating stack: `+c.message+`
|
||||
`+c.stack}}var Ki=Object.prototype.hasOwnProperty,ai=e.unstable_scheduleCallback,bo=e.unstable_cancelCallback,xo=e.unstable_shouldYield,Zd=e.unstable_requestPaint,Ze=e.unstable_now,Vi=e.unstable_getCurrentPriorityLevel,Yi=e.unstable_ImmediatePriority,ws=e.unstable_UserBlockingPriority,ya=e.unstable_NormalPriority,Ss=e.unstable_LowPriority,js=e.unstable_IdlePriority,Wd=e.log,Qd=e.unstable_setDisableYieldValue,ii=null,ln=null;function pr(a){if(typeof Wd=="function"&&Qd(a),ln&&typeof ln.setStrictMode=="function")try{ln.setStrictMode(ii,a)}catch{}}var on=Math.clz32?Math.clz32:Ve,te=Math.log,Pe=Math.LN2;function Ve(a){return a>>>=0,a===0?32:31-(te(a)/Pe|0)|0}var qe=256,We=262144,yr=4194304;function ar(a){var i=a&42;if(i!==0)return i;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function Gi(a,i,u){var c=a.pendingLanes;if(c===0)return 0;var v=0,g=a.suspendedLanes,A=a.pingedLanes;a=a.warmLanes;var _=c&134217727;return _!==0?(c=_&~g,c!==0?v=ar(c):(A&=_,A!==0?v=ar(A):u||(u=_&~a,u!==0&&(v=ar(u))))):(_=c&~g,_!==0?v=ar(_):A!==0?v=ar(A):u||(u=c&~a,u!==0&&(v=ar(u)))),v===0?0:i!==0&&i!==v&&(i&g)===0&&(g=v&-v,u=i&-i,g>=u||g===32&&(u&4194048)!==0)?i:v}function ga(a,i){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&i)===0}function XT(a,i){switch(a){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function wb(){var a=yr;return yr<<=1,(yr&62914560)===0&&(yr=4194304),a}function Jd(a){for(var i=[],u=0;31>u;u++)i.push(a);return i}function wo(a,i){a.pendingLanes|=i,i!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function FT(a,i,u,c,v,g){var A=a.pendingLanes;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=u,a.entangledLanes&=u,a.errorRecoveryDisabledLanes&=u,a.shellSuspendCounter=0;var _=a.entanglements,P=a.expirationTimes,q=a.hiddenUpdates;for(u=A&~u;0<u;){var X=31-on(u),J=1<<X;_[X]=0,P[X]=-1;var K=q[X];if(K!==null)for(q[X]=null,X=0;X<K.length;X++){var Y=K[X];Y!==null&&(Y.lane&=-536870913)}u&=~J}c!==0&&Sb(a,c,0),g!==0&&v===0&&a.tag!==0&&(a.suspendedLanes|=g&~(A&~i))}function Sb(a,i,u){a.pendingLanes|=i,a.suspendedLanes&=~i;var c=31-on(i);a.entangledLanes|=i,a.entanglements[c]=a.entanglements[c]|1073741824|u&261930}function jb(a,i){var u=a.entangledLanes|=i;for(a=a.entanglements;u;){var c=31-on(u),v=1<<c;v&i|a[c]&i&&(a[c]|=i),u&=~v}}function Ob(a,i){var u=i&-i;return u=(u&42)!==0?1:eh(u),(u&(a.suspendedLanes|i))!==0?0:u}function eh(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function th(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function Ab(){var a=Q.p;return a!==0?a:(a=window.event,a===void 0?32:cS(a.type))}function Eb(a,i){var u=Q.p;try{return Q.p=a,i()}finally{Q.p=u}}var ba=Math.random().toString(36).slice(2),Gt="__reactFiber$"+ba,mn="__reactProps$"+ba,Xi="__reactContainer$"+ba,nh="__reactEvents$"+ba,ZT="__reactListeners$"+ba,WT="__reactHandles$"+ba,_b="__reactResources$"+ba,So="__reactMarker$"+ba;function rh(a){delete a[Gt],delete a[mn],delete a[nh],delete a[ZT],delete a[WT]}function Fi(a){var i=a[Gt];if(i)return i;for(var u=a.parentNode;u;){if(i=u[Xi]||u[Gt]){if(u=i.alternate,i.child!==null||u!==null&&u.child!==null)for(a=Xw(a);a!==null;){if(u=a[Gt])return u;a=Xw(a)}return i}a=u,u=a.parentNode}return null}function Zi(a){if(a=a[Gt]||a[Xi]){var i=a.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return a}return null}function jo(a){var i=a.tag;if(i===5||i===26||i===27||i===6)return a.stateNode;throw Error(r(33))}function Wi(a){var i=a[_b];return i||(i=a[_b]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Ut(a){a[So]=!0}var kb=new Set,Nb={};function li(a,i){Qi(a,i),Qi(a+"Capture",i)}function Qi(a,i){for(Nb[a]=i,a=0;a<i.length;a++)kb.add(i[a])}var QT=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u21
Line truncated
|
||||
`).replace(NP,"")}function Bw(a,i){return i=Lw(i),Lw(a)===i}function Ge(a,i,u,c,v,g){switch(u){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||el(a,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&el(a,""+c);break;case"className":As(a,"class",c);break;case"tabIndex":As(a,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":As(a,u,c);break;case"style":Bb(a,c,g);break;case"data":if(i!=="object"){As(a,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||u!=="href")){a.removeAttribute(u);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){a.removeAttribute(u);break}c=_s(""+c),a.setAttribute(u,c);break;case"action":case"formAction":if(typeof c=="function"){a.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof g=="function"&&(u==="formAction"?(i!=="input"&&Ge(a,i,"name",v.name,v,null),Ge(a,i,"formEncType",v.formEncType,v,null),Ge(a,i,"formMethod",v.formMethod,v,null),Ge(a,i,"formTarget",v.formTarget,v,null)):(Ge(a,i,"encType",v.encType,v,null),Ge(a,i,"method",v.method,v,null),Ge(a,i,"target",v.target,v,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){a.removeAttribute(u);break}c=_s(""+c),a.setAttribute(u,c);break;case"onClick":c!=null&&(a.onclick=kr);break;case"onScroll":c!=null&&Ne("scroll",a);break;case"onScrollEnd":c!=null&&Ne("scrollend",a);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(u=c.__html,u!=null){if(v.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"multiple":a.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":a.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){a.removeAttribute("xlink:href");break}u=_s(""+c),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?a.setAttribute(u,""+c):a.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?a.setAttribute(u,""):a.removeAttribute(u);break;case"capture":case"download":c===!0?a.setAttribute(u,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?a.setAttribute(u,c):a.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?a.setAttribute(u,c):a.removeAttribute(u);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?a.removeAttribute(u):a.setAttribute(u,c);break;case"popover":Ne("beforetoggle",a),Ne("toggle",a),Os(a,"popover",c);break;case"xlinkActuate":_r(a,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":_r(a,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":_r(a,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":_r(a,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":_r(a,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":_r(a,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":_r(a,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":_r(a,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":_r(a,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Os(a,"is",c);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=rM.get(u)||u,Os(a,u,c))}}function Gm(a,i,u,c,v,g){switch(u){case"style":Bb(a,c,g);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(u=c.__html,u!=null){if(v.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"children":typeof c=="string"?el(a,c):(typeof c=="number"||typeof c=="bigint")&&el(a,""+c);break;case"onScroll":c!=null&&Ne("scroll",a);break;case"onScrollEnd":c!=null&&Ne("scrollend",a);break;case"onClick":c!=null&&(a.onclick=kr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"inne
Line truncated
|
||||
|
||||
Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let x=ei(),w;if(t){let N=typeof t=="string"?no(t):t;ft(m==="/"||N.pathname?.startsWith(m),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${m}" but pathname "${N.pathname}" was given in the \`location\` prop.`),w=N}else w=x;let j=w.pathname||"/",S=j;if(m!=="/"){let N=m.replace(/^\//,"").split("/");S="/"+j.replace(/^\//,"").split("/").slice(N.length).join("/")}let O=hE(e,{pathname:S});Jn(p||O!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),Jn(O==null||O[O.length-1].route.element!==void 0||O[O.length-1].route.Component!==void 0||O[O.length-1].route.lazy!==void 0,`Matched leaf route at location "${w.pathname}${w.search}${w.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let E=n4(O&&O.map(N=>Object.assign({},N,{params:Object.assign({},d,N.params),pathname:Wr([m,o.encodeLocation?o.encodeLocation(N.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?m:Wr([m,o.encodeLocation?o.encodeLocation(N.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),s,n,r,l);return t&&E?b.createElement(Gu.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...w},navigationType:"POP"}},E):E}function QD(){let e=o4(),t=HD(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:o},"ErrorBoundary")," or"," ",b.createElement("code",{style:o},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:l},n):null,s)}var JD=b.createElement(QD,null),e4=class extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){return this.state.error!==void 0?b.createElement(mr.Provider,{value:this.props.routeContext},b.createElement(oy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function t4({routeContext:e,match:t,children:n}){let r=b.useContext(ro);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),b.createElement(mr.Provider,{value:e},n)}function n4(e,t=[],n=null,r=null,l=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,s=n?.errors;if(s!=null){let m=o.findIndex(p=>p.route.id&&s?.[p.route.id]!==void 0);ft(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),o=o.slice(0,Math.min(o.length,m+1))}let f=!1,d=-1;if(n)for(let m=0;m<o.length;m++){let p=o[m];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(d=m),p.route.id){let{loaderData:x,errors:w}=n,j=p.route.loader&&!x.hasOwnProperty(p.route.id)&&(!w||w[p.route.id]===void 0);if(p.route.lazy||j){f=!0,d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}let h=n&&r?(m,p)=>{r(m,{location:n.location,params:n.matches?.[0]?.params??{},errorInfo:p})}:void 0;return o.reduceRight((m,p,x)=>{let w,j=!1,S=null,O=null;n&&(w=s&&p.route.id?s[p.route.id]:void 0,S=p.route.errorElement||JD,f&&(d<0&&x===0?(wE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),j=!0,O=null):d===x&&(j=!0,O=p.route.hydrateFallbackElement||null)));let E=t.concat(o.slice(0,x+1)),N=()=>{let k;return w?k=S:j?k=O:p.route.Component?k=b.createElement(p.route.Component,null):p.route.element?k=p.route.element:k=m,b.createElement(t4,{match:p,routeContext:{outlet:m,matches:E,isDataRoute:n!=null},children:k})};return n&&(p.route.ErrorBoundary||p.route.errorElement||x===0)?Line truncated
|
||||
A`).concat(o,",").concat(o,",0,1,1,").concat(2*s,",").concat(l,`
|
||||
H`).concat(Wn,"M").concat(2*s,",").concat(l,`
|
||||
A`).concat(o,",").concat(o,",0,1,1,").concat(s,",").concat(l),className:"recharts-legend-icon"});if(d==="rect")return b.createElement("path",{stroke:"none",fill:f,d:"M0,".concat(Wn/8,"h").concat(Wn,"v").concat(Wn*3/4,"h").concat(-Wn,"z"),className:"recharts-legend-icon"});if(b.isValidElement(t.legendIcon)){var m=xz({},t);return delete m.legendIcon,b.cloneElement(t.legendIcon,m)}return b.createElement(jy,{fill:f,cx:l,cy:l,size:Wn,sizeType:"diameter",type:d})}function Ez(e){var{payload:t,iconSize:n,layout:r,formatter:l,inactiveColor:o,iconType:s}=e,f={x:0,y:0,width:Wn,height:Wn},d={display:r==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((m,p)=>{var x=m.formatter||l,w=Be({"recharts-legend-item":!0,["legend-item-".concat(p)]:!0,inactive:m.inactive});if(m.type==="none")return null;var j=m.inactive?o:m.color,S=x?x(m.value,m,p):m.value;return b.createElement("li",mf({className:w,style:d,key:"legend-item-".concat(p)},Qu(e,m,p)),b.createElement(py,{width:n,height:n,viewBox:f,style:h,"aria-label":"".concat(S," legend icon")},b.createElement(Az,{data:m,iconType:s,inactiveColor:o})),b.createElement("span",{className:"recharts-legend-item-text",style:{color:j}},S))})}var _z=e=>{var t=Pt(e,Oz),{payload:n,layout:r,align:l}=t;if(!n||!n.length)return null;var o={padding:0,margin:0,textAlign:r==="horizontal"?l:"left"};return b.createElement("ul",{className:"recharts-default-legend",style:o},b.createElement(Ez,mf({},t,{payload:n})))},kv={},Nv={},JS;function kz(){return JS||(JS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const l=new Map;for(let o=0;o<n.length;o++){const s=n[o],f=r(s);l.has(f)||l.set(f,s)}return Array.from(l.values())}e.uniqBy=t})(Nv)),Nv}var Cv={},ej;function c_(){return ej||(ej=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(Cv)),Cv}var Tv={},Mv={},Pv={},tj;function Nz(){return tj||(tj=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t})(Pv)),Pv}var nj;function Ay(){return nj||(nj=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Nz();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(Mv)),Mv}var Dv={},rj;function Cz(){return rj||(rj=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(Dv)),Dv}var aj;function Tz(){return aj||(aj=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ay(),n=Cz();function r(l){return n.isObjectLike(l)&&t.isArrayLike(l)}e.isArrayLikeObject=r})(Tv)),Tv}var Rv={},zv={},ij;function Mz(){return ij||(ij=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Sy();function n(r){return function(l){return t.get(l,r)}}e.property=n})(zv)),zv}var Lv={},Bv={},Iv={},Uv={},lj;function f_(){return lj||(lj=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t})(Uv)),Uv}var qv={},oj;function d_(){return oj||(oj=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t})(qv)),qv}var $v={},uj;function h_(){return uj||(uj=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.eq=t})($v)),$v}var sj;function Pz(){return sj||(sj=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=f_(),n=d_(),r=h_();function l(m,p,x){return typeof x!="function"?l(m,p,()=>{}):o(m,p,function w(j,S,O,E,N,k){const T=x(j,S,O,E,N,k);return T!==void 0?!!T:o(j,S,w,k)},new Map)}function o(m,p,x,w){if(p===m)return!0;switch(typeof p){case"object":return s(m,p,x,w);case"function":return Object.keys(p).length>0?o(m,{...p},x,w):r.eq(m,p);default:return t.isObject(m)?typeof p=="string"?p==="":!0:r.eq(m,p)}}function s(m,p,x,w){if(p==null)return!0;if(Array.isArray(p))return d(m,p,x,w);if(p instanceof Map)return f(m,p,x,w);if(p instanceof Set)return h(m,p,x,w);const j=Object.keys(p);if(m==null)return j.length===0;if(j.length===0)return!0;if(w?.has(p))return w.get(p)===m;w?.set(p,m);try{for(let S=0;S<j.length;S++){const O=j[S];if(!n.isPrimitive(m)&&!(O in m)||p[O]===void 0&&m[O]!==void 0||p[O]===null&&m[O]!==null||!x(m[O],p[O],O,m,p,w))return!1}return!0}finally{w?.delete(p)}}function f(m,p,x,w){if(p.size===0)return!0;if(!(m instanceof Map))return!1;for(const[j,S]of p.entries()){const O=m.get(j);if(x(O,S,j,m,p,w)===!1)return!1}return!0}function d(m,p,x,w){if(p.length===0)return!0;if(!Array.isArray(m))return!1;const j=new Set;for(let S=0;S<p.length;S++){const O=p[S];let E=!1;for(let N=0;N<m.length;N+
Line truncated
|
||||
please check the style of container, or the props width(%s) and height(%s),
|
||||
or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
|
||||
height and width.`,M,z,l,o,s,f,n),b.createElement("div",{id:p?"".concat(p):void 0,className:Be("recharts-responsive-container",x),style:m2(m2({},j),{},{width:l,height:o,minWidth:s,minHeight:f,maxHeight:d}),ref:S},b.createElement("div",{style:i8({width:l,height:o})},b.createElement(sk,{width:M,height:z},h)))}),ql=b.forwardRef((e,t)=>{var n=zy();if(Ar(n.width)&&Ar(n.height))return e.children;var{width:r,height:l}=l8({width:e.width,height:e.height,aspect:e.aspect}),{calculatedWidth:o,calculatedHeight:s}=ok(void 0,void 0,{width:r,height:l,aspect:e.aspect,maxHeight:e.maxHeight});return se(o)&&se(s)?b.createElement(sk,{width:o,height:s},e.children):b.createElement(f8,S0({},e,{width:r,height:l,ref:t}))});function ck(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var Sd=()=>{var e,t=an(),n=ce(G5),r=ce(wd),l=(e=ce(xd))===null||e===void 0?void 0:e.padding;return!t||!r||!l?n:{width:r.width-l.left-l.right,height:r.height-l.top-l.bottom,x:l.left,y:l.top}},d8={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},fk=()=>{var e;return(e=ce(zt))!==null&&e!==void 0?e:d8},Ly=()=>ce(ca),By=()=>ce(fa),h8=()=>ce(e=>e.layout.margin),Re=e=>e.layout.layoutType,lo=()=>ce(Re),m8=()=>{var e=lo();if(e==="horizontal"||e==="vertical")return e},v8=()=>{var e=lo();return e!==void 0},jd=e=>{var t=nt(),n=an(),{width:r,height:l}=e,o=zy(),s=r,f=l;return o&&(s=o.width>0?o.width:r,f=o.height>0?o.height:l),b.useEffect(()=>{!n&&Ar(s)&&Ar(f)&&t(b5({width:s,height:f}))},[t,n,s,f]),null},dk=Symbol.for("immer-nothing"),v2=Symbol.for("immer-draftable"),Ln=Symbol.for("immer-state");function sr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Mu=Object.getPrototypeOf;function Zl(e){return!!e&&!!e[Ln]}function Li(e){return e?hk(e)||Array.isArray(e)||!!e[v2]||!!e.constructor?.[v2]||rs(e)||Ad(e):!1}var p8=Object.prototype.constructor.toString(),p2=new WeakMap;function hk(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=p2.get(n);return r===void 0&&(r=Function.toString.call(n),p2.set(n,r)),r===p8}function Of(e,t,n=!0){Od(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(l=>{t(l,e[l],e)}):e.forEach((r,l)=>t(l,r,e))}function Od(e){const t=e[Ln];return t?t.type_:Array.isArray(e)?1:rs(e)?2:Ad(e)?3:0}function j0(e,t){return Od(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function mk(e,t,n){const r=Od(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function y8(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function rs(e){return e instanceof Map}function Ad(e){return e instanceof Set}function Ai(e){return e.copy_||e.base_}function O0(e,t){if(rs(e))return new Map(e);if(Ad(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=hk(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[Ln];let l=Reflect.ownKeys(r);for(let o=0;o<l.length;o++){const s=l[o],f=r[s];f.writable===!1&&(f.writable=!0,f.configurable=!0),(f.get||f.set)&&(r[s]={configurable:!0,writable:!0,enumerable:f.enumerable,value:e[s]})}return Object.create(Mu(e),r)}else{const r=Mu(e);if(r!==null&&n)return{...e};const l=Object.create(r);return Object.assign(l,e)}}function Iy(e,t=!1){return Ed(e)||Zl(e)||!Li(e)||(Od(e)>1&&Object.defineProperties(e,{set:Kc,add:Kc,clear:Kc,delete:Kc}),Object.freeze(e),t&&Object.values(e).forEach(n=>Iy(n,!0))),e}function g8(){sr(2)}var Kc={value:g8};function Ed(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var b8={};function Bi(e){const t=b8[e];return t||sr(0,e),t}var Pu;function vk(){return Pu}function x8(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function y2(e,t){t&&(Bi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function A0(e){E0(e),e.drafts_.forEach(w8),e.drafts_=null}function E0(e){e===Pu&&(Pu=e.parent_)}function g2(e){return Pu=x8(Pu,e)}function w8(e){const t=e[Ln];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function b2(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Ln].modified_&&(A0(t),sr(4)),Li(e)&&(e=Af(t,e),t.parent_||Ef(t,e)),t.patches_&&Bi("Patches").generateReplacementPatches_(n[Ln].base_,e,t.patches_,t.inversePatches_)):e=Af(t,n,[]),A0(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==dk?e:void 0}function Af(e,t,n){if(Ed(t))return t;const r=e.immer_.shouldUseStrictIteration(),l=t[Ln];if(!l)return Of(t,(o,s)=>x2(e,l,t,o,s,n),r),t;if(l.scope_!==e)return t;if(!l.modified_)return Ef(e,l.base_,!0),l.base_;if(!l.finalized_){l.finalized_=!0,l.scope_.unfinalizedDrafts_--;const o=l.copy_;let s=o,f=!1;l.type_===3&&(s=new Set(o),o.clear(),f=!0),Of(s,(d,h)=>x2(e,l,o,d,h,n,f),r),Ef(e,o,!1),n&&e.
Line truncated
|
||||
`).concat(e+n,",").concat(t+s*m[1])),h+="L ".concat(e+n,",").concat(t+r-s*m[2]),m[2]>0&&(h+="A ".concat(m[2],",").concat(m[2],",0,0,").concat(d,`,
|
||||
`).concat(e+n-f*m[2],",").concat(t+r)),h+="L ".concat(e+f*m[3],",").concat(t+r),m[3]>0&&(h+="A ".concat(m[3],",").concat(m[3],",0,0,").concat(d,`,
|
||||
`).concat(e,",").concat(t+r-s*m[3])),h+="Z"}else if(o>0&&l===+l&&l>0){var w=Math.min(o,l);h="M ".concat(e,",").concat(t+s*w,`
|
||||
A `).concat(w,",").concat(w,",0,0,").concat(d,",").concat(e+f*w,",").concat(t,`
|
||||
L `).concat(e+n-f*w,",").concat(t,`
|
||||
A `).concat(w,",").concat(w,",0,0,").concat(d,",").concat(e+n,",").concat(t+s*w,`
|
||||
L `).concat(e+n,",").concat(t+r-s*w,`
|
||||
A `).concat(w,",").concat(w,",0,0,").concat(d,",").concat(e+n-f*w,",").concat(t+r,`
|
||||
L `).concat(e+f*w,",").concat(t+r,`
|
||||
A `).concat(w,",").concat(w,",0,0,").concat(d,",").concat(e,",").concat(t+r-s*w," Z")}else h="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return h},q2={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},_k=e=>{var t=Pt(e,q2),n=b.useRef(null),[r,l]=b.useState(-1);b.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var Q=n.current.getTotalLength();Q&&l(Q)}catch{}},[]);var{x:o,y:s,width:f,height:d,radius:h,className:m}=t,{animationEasing:p,animationDuration:x,animationBegin:w,isAnimationActive:j,isUpdateAnimationActive:S}=t,O=b.useRef(f),E=b.useRef(d),N=b.useRef(o),k=b.useRef(s),T=b.useMemo(()=>({x:o,y:s,width:f,height:d,radius:h}),[o,s,f,d,h]),C=is(T,"rectangle-");if(o!==+o||s!==+s||f!==+f||d!==+d||f===0||d===0)return null;var M=Be("recharts-rectangle",m);if(!S){var z=fn(t),{radius:V}=z,H=I2(z,IL);return b.createElement("path",Cf({},H,{radius:typeof h=="number"?h:void 0,className:M,d:U2(o,s,f,d,h)}))}var ee=O.current,G=E.current,B=N.current,ne=k.current,oe="0px ".concat(r===-1?1:r,"px"),he="".concat(r,"px 0px"),I=jk(["strokeDasharray"],x,typeof p=="string"?p:q2.animationEasing);return b.createElement(as,{animationId:C,key:C,canBegin:r>0,duration:x,easing:p,isActive:S,begin:w},Q=>{var ie=lt(ee,f,Q),ue=lt(G,d,Q),we=lt(B,o,Q),D=lt(ne,s,Q);n.current&&(O.current=ie,E.current=ue,N.current=we,k.current=D);var F;j?Q>0?F={transition:I,strokeDasharray:he}:F={strokeDasharray:oe}:F={strokeDasharray:he};var ae=fn(t),{radius:le}=ae,ve=I2(ae,UL);return b.createElement("path",Cf({},ve,{radius:typeof h=="number"?h:void 0,className:M,d:U2(we,D,ie,ue,h),ref:n,style:B2(B2({},F),t.style)}))})};function $2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),n.push.apply(n,r)}return n}function H2(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$2(Object(n),!0).forEach(function(r){VL(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VL(e,t,n){return(t=YL(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YL(e){var t=GL(e,"string");return typeof t=="symbol"?t:t+""}function GL(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Tf=Math.PI/180,XL=e=>e*180/Math.PI,Ct=(e,t,n,r)=>({x:e+Math.cos(-Tf*r)*n,y:t+Math.sin(-Tf*r)*n}),kk=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},FL=(e,t)=>{var{x:n,y:r}=e,{x:l,y:o}=t;return Math.sqrt((n-l)**2+(r-o)**2)},ZL=(e,t)=>{var{x:n,y:r}=e,{cx:l,cy:o}=t,s=FL({x:n,y:r},{x:l,y:o});if(s<=0)return{radius:s,angle:0};var f=(n-l)/s,d=Math.acos(f);return r>o&&(d=2*Math.PI-d),{radius:s,angle:XL(d),angleInRadian:d}},WL=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),l=Math.floor(n/360),o=Math.min(r,l);return{startAngle:t-o*360,endAngle:n-o*360}},QL=(e,t)=>{var{startAngle:n,endAngle:r}=t,l=Math.floor(n/360),o=Math.floor(r/360),s=Math.min(l,o);return e+s*360},JL=(e,t)=>{var{chartX:n,chartY:r}=e,{radius:l,angle:o}=ZL({x:n,y:r},t),{innerRadius:s,outerRadius:f}=t;if(l<s||l>f||l===0)return null;var{startAngle:d,endAngle:h}=WL(t),m=o,p;if(d<=h){for(;m>h;)m-=360;for(;m<d;)m+=360;p=m>=d&&m<=h}else{for(;m>d;)m-=360;for(;m<h;)m+=360;p=m>=h&&m<=d}return p?H2(H2({},t),{},{radius:l,angle:QL(m,t)}):null};function Nk(e){var{cx:t,cy:n,radius:r,startAngle:l,endAngle:o}=e,s=Ct(t,n,r,l),f=Ct(t,n,r,o);return{points:[s,f],cx:t,cy:n,radius:r,startAngle:l,endAngle:o}}function R0(){return R0=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},R0.apply(null,arguments)}var e7=(e,t)=>{var n=Vt(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},Yc=e=>{var{cx:t,cy:n,radius:r,angle:l,sign:o,isExternal:s,cornerRadius:f,cornerIsExternal:d}=e,h=f*(s?1:-1)+r,m=Math.asin(f/h)/Tf,p=d?l:l+o*m,x=Ct(t,n,h,p),w=Ct(t,n,r,p),j=d?l-o*m:l,S=Ct(t,n,h*Math.cos(m*Tf),j);return{center:x,circleTangency:w,lineTangency:S,theta:m}},Ck=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:l,startAngle:o,endAngle:s}=e,f=e7(o,s),d=o+f,h=Ct(t,n,l,o),m=Ct(t,n,l,d),p="M ".concat(h.x,",").concat(h.y,`
|
||||
A `).concat(l,",").concat(l,`,0,
|
||||
`).concat(+(Math.abs(f)>180),",").concat(+(o>d),`,
|
||||
`).concat(m.x,",").concat(m.y,`
|
||||
`);if(r>0){var x=Ct(t,n,r,o),w=Ct(t,n,r,d);p+="L ".concat(w.x,",").concat(w.y,`
|
||||
A `).concat(r,",").concat(r,`,0,
|
||||
`).concat(+(Math.abs(f)>180),",").concat(+(o<=d),`,
|
||||
`).concat(x.x,",").concat(x.y," Z")}else p+="L ".concat(t,",").concat(n," Z");return p},t7=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:l,cornerRadius:o,forceCornerRadius:s,cornerIsExternal:f,startAngle:d,endAngle:h}=e,m=Vt(h-d),{circleTangency:p,lineTangency:x,theta:w}=Yc({cx:t,cy:n,radius:l,angle:d,sign:m,cornerRadius:o,cornerIsExternal:f}),{circleTangency:j,lineTangency:S,theta:O}=Yc({cx:t,cy:n,radius:l,angle:h,sign:-m,cornerRadius:o,cornerIsExternal:f}),E=f?Math.abs(d-h):Math.abs(d-h)-w-O;if(E<0)return s?"M ".concat(x.x,",").concat(x.y,`
|
||||
a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
|
||||
a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
|
||||
`):Ck({cx:t,cy:n,innerRadius:r,outerRadius:l,startAngle:d,endAngle:h});var N="M ".concat(x.x,",").concat(x.y,`
|
||||
A`).concat(o,",").concat(o,",0,0,").concat(+(m<0),",").concat(p.x,",").concat(p.y,`
|
||||
A`).concat(l,",").concat(l,",0,").concat(+(E>180),",").concat(+(m<0),",").concat(j.x,",").concat(j.y,`
|
||||
A`).concat(o,",").concat(o,",0,0,").concat(+(m<0),",").concat(S.x,",").concat(S.y,`
|
||||
`);if(r>0){var{circleTangency:k,lineTangency:T,theta:C}=Yc({cx:t,cy:n,radius:r,angle:d,sign:m,isExternal:!0,cornerRadius:o,cornerIsExternal:f}),{circleTangency:M,lineTangency:z,theta:V}=Yc({cx:t,cy:n,radius:r,angle:h,sign:-m,isExternal:!0,cornerRadius:o,cornerIsExternal:f}),H=f?Math.abs(d-h):Math.abs(d-h)-C-V;if(H<0&&o===0)return"".concat(N,"L").concat(t,",").concat(n,"Z");N+="L".concat(z.x,",").concat(z.y,`
|
||||
A`).concat(o,",").concat(o,",0,0,").concat(+(m<0),",").concat(M.x,",").concat(M.y,`
|
||||
A`).concat(r,",").concat(r,",0,").concat(+(H>180),",").concat(+(m>0),",").concat(k.x,",").concat(k.y,`
|
||||
A`).concat(o,",").concat(o,",0,0,").concat(+(m<0),",").concat(T.x,",").concat(T.y,"Z")}else N+="L".concat(t,",").concat(n,"Z");return N},n7={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},Tk=e=>{var t=Pt(e,n7),{cx:n,cy:r,innerRadius:l,outerRadius:o,cornerRadius:s,forceCornerRadius:f,cornerIsExternal:d,startAngle:h,endAngle:m,className:p}=t;if(o<l||h===m)return null;var x=Be("recharts-sector",p),w=o-l,j=rn(s,w,0,!0),S;return j>0&&Math.abs(h-m)<360?S=t7({cx:n,cy:r,innerRadius:l,outerRadius:o,cornerRadius:Math.min(j,w/2),forceCornerRadius:f,cornerIsExternal:d,startAngle:h,endAngle:m}):S=Ck({cx:n,cy:r,innerRadius:l,outerRadius:o,startAngle:h,endAngle:m}),b.createElement("path",R0({},fn(t),{className:x,d:S}))};function r7(e,t,n){if(e==="horizontal")return[{x:t.x,y:n.top},{x:t.x,y:n.top+n.height}];if(e==="vertical")return[{x:n.left,y:t.y},{x:n.left+n.width,y:t.y}];if(s_(t)){if(e==="centric"){var{cx:r,cy:l,innerRadius:o,outerRadius:s,angle:f}=t,d=Ct(r,l,o,f),h=Ct(r,l,s,f);return[{x:d.x,y:d.y},{x:h.x,y:h.y}]}return Nk(t)}}var Ap={},Ep={},_p={},K2;function a7(){return K2||(K2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=w_();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(_p)),_p}var V2;function i7(){return V2||(V2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=a7();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(Ep)),Ep}var Y2;function l7(){return Y2||(Y2=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=S_(),n=i7();function r(l,o,s){s&&typeof s!="number"&&t.isIterateeCall(l,o,s)&&(o=s=void 0),l=n.toFinite(l),o===void 0?(o=l,l=0):o=n.toFinite(o),s=s===void 0?l<o?1:-1:n.toFinite(s);const f=Math.max(Math.ceil((o-l)/(s||1)),0),d=new Array(f);for(let h=0;h<f;h++)d[h]=l,l+=s;return d}e.range=r})(Ap)),Ap}var kp,G2;function o7(){return G2||(G2=1,kp=l7().range),kp}var u7=o7();const Mk=ua(u7);function Xa(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function s7(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function $y(e){let t,n,r;e.length!==2?(t=Xa,n=(f,d)=>Xa(e(f),d),r=(f,d)=>e(f)-d):(t=e===Xa||e===s7?e:c7,n=e,r=e);function l(f,d,h=0,m=f.length){if(h<m){if(t(d,d)!==0)return m;do{const p=h+m>>>1;n(f[p],d)<0?h=p+1:m=p}while(h<m)}return h}function o(f,d,h=0,m=f.length){if(h<m){if(t(d,d)!==0)return m;do{const p=h+m>>>1;n(f[p],d)<=0?h=p+1:m=p}while(h<m)}return h}function s(f,d,h=0,m=f.length){const p=l(f,d,h,m-1);return p>h&&r(f[p-1],d)>-r(f[p],d)?p-1:p}return{left:l,center:s,right:o}}function c7(){return 0}function Pk(e){return e===null?NaN:+e}function*f7(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const d7=$y(Xa),ls=d7.right;$y(Pk).center;class X2 extends Map{constructor(t,n=v7){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,l]of t)this.set(r,l)}get(t){return super.get(F2(this,t))}has(t){return super.has(F2(this,t))}set(t,n){return super.set(h7(this,t),n)}delete(t){return super.delete(m7(this,t))}}function F2({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function h7({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function m7({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function v7(e){return e!==null&&typeof e=="object"?e.valueOf():e}function p7(e=Xa){if(e===Xa)return Dk;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Dk(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const y7=Math.sqrt(50),g7=Math.sqrt(10),b7=Math.sqrt(2);function Mf(e,t,n){const r=(t-e)/Math.max(0,n),l=Math.floor(Math.log10(r)),o=r/Math.pow(10,l),s=o>=y7?10:o>=g7?5:o>=b7?2:1;let f,d,h;return l<0?(h=Math.pow(10,-l)/s,f=Math.round(e*h),d=Math.round(t*h),f/h<e&&++f,d/h>t&&--d,h=-h):(h=Math.pow(10,l)*s,f=Math.round(e/h),d=Math.round(t/h),f*h<e&&++f,d*h>t&&--d),d<f&&.5<=n&&n<2?Mf(e,t,n*2):[f,d,h]}function z0(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[l,o,s]=r?Mf(t,e,n):Mf(e,t,n);if(!(o>=l))return[];const f=o-l+1,d=new Array(f);if(r)if(s<0)for(let h=0;h<f;++h)d[h]=(o-h)/-s;else for(let h=0;h<f;++h)d[h]=(o-h)*s;else if(s<0)for(let h=0;h<f;++h)d[h]=(l+h)/-s;else for(let h=0;h<f;++h)d[h]=(l+h)*s;return d}function L0(e,t,n){return t=+t,e=+e,n=+n,Mf(e,t,n)[2]}function B0(e,t,n){t=+t,e=+e,n=+n;const r=t<e,l=r?L0(t,e,n):L0(e,t,n);return(r?-1:1)*(l<0?1/-l:l)}function Z2(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function W2(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function Rk(e,t,n=0,r=1/0,l){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(l=l===void 0?Dk:
Line truncated
|
||||
A`).concat(j,",").concat(j,",0,1,").concat(N?0:1,`,
|
||||
`).concat(T.x,",").concat(T.y),M=mt(e.id)?ku("recharts-radial-line-"):e.id;return b.createElement("text",Gr({},r,{dominantBaseline:"central",className:Be("recharts-radial-bar-label",s)}),b.createElement("defs",null,b.createElement("path",{id:M,d:C})),b.createElement("textPath",{xlinkHref:"#".concat(M)},n))},F$=(e,t,n)=>{var{cx:r,cy:l,innerRadius:o,outerRadius:s,startAngle:f,endAngle:d}=e,h=(f+d)/2;if(n==="outside"){var{x:m,y:p}=Ct(r,l,s+t,h);return{x:m,y:p,textAnchor:m>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:l,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:l,textAnchor:"middle",verticalAnchor:"end"};var x=(o+s)/2,{x:w,y:j}=Ct(r,l,x,h);return{x:w,y:j,textAnchor:"middle",verticalAnchor:"middle"}},W0=e=>"cx"in e&&se(e.cx),Z$=(e,t)=>{var{parentViewBox:n,offset:r,position:l}=e,o;n!=null&&!W0(n)&&(o=n);var{x:s,y:f,upperWidth:d,lowerWidth:h,height:m}=t,p=s,x=s+(d-h)/2,w=(p+x)/2,j=(d+h)/2,S=p+d/2,O=m>=0?1:-1,E=O*r,N=O>0?"end":"start",k=O>0?"start":"end",T=d>=0?1:-1,C=T*r,M=T>0?"end":"start",z=T>0?"start":"end";if(l==="top"){var V={x:p+d/2,y:f-E,textAnchor:"middle",verticalAnchor:N};return wt(wt({},V),o?{height:Math.max(f-o.y,0),width:d}:{})}if(l==="bottom"){var H={x:x+h/2,y:f+m+E,textAnchor:"middle",verticalAnchor:k};return wt(wt({},H),o?{height:Math.max(o.y+o.height-(f+m),0),width:h}:{})}if(l==="left"){var ee={x:w-C,y:f+m/2,textAnchor:M,verticalAnchor:"middle"};return wt(wt({},ee),o?{width:Math.max(ee.x-o.x,0),height:m}:{})}if(l==="right"){var G={x:w+j+C,y:f+m/2,textAnchor:z,verticalAnchor:"middle"};return wt(wt({},G),o?{width:Math.max(o.x+o.width-G.x,0),height:m}:{})}var B=o?{width:j,height:m}:{};return l==="insideLeft"?wt({x:w+C,y:f+m/2,textAnchor:z,verticalAnchor:"middle"},B):l==="insideRight"?wt({x:w+j-C,y:f+m/2,textAnchor:M,verticalAnchor:"middle"},B):l==="insideTop"?wt({x:p+d/2,y:f+E,textAnchor:"middle",verticalAnchor:k},B):l==="insideBottom"?wt({x:x+h/2,y:f+m-E,textAnchor:"middle",verticalAnchor:N},B):l==="insideTopLeft"?wt({x:p+C,y:f+E,textAnchor:z,verticalAnchor:k},B):l==="insideTopRight"?wt({x:p+d-C,y:f+E,textAnchor:M,verticalAnchor:k},B):l==="insideBottomLeft"?wt({x:x+C,y:f+m-E,textAnchor:z,verticalAnchor:N},B):l==="insideBottomRight"?wt({x:x+h-C,y:f+m-E,textAnchor:M,verticalAnchor:N},B):l&&typeof l=="object"&&(se(l.x)||ta(l.x))&&(se(l.y)||ta(l.y))?wt({x:s+rn(l.x,j),y:f+rn(l.y,m),textAnchor:"end",verticalAnchor:"end"},B):wt({x:S,y:f+m/2,textAnchor:"middle",verticalAnchor:"middle"},B)},W$={angle:0,offset:5,zIndex:Tt.label,position:"middle",textBreakAll:!1};function Ya(e){var t=Pt(e,W$),{viewBox:n,position:r,value:l,children:o,content:s,className:f="",textBreakAll:d,labelRef:h}=t,m=V$(),p=VC(),x=r==="center"?p:m??p,w,j,S;if(n==null?w=x:W0(n)?w=n:w=ck(n),!w||mt(l)&&mt(o)&&!b.isValidElement(s)&&typeof s!="function")return null;var O=wt(wt({},t),{},{viewBox:w});if(b.isValidElement(s)){var{labelRef:E}=O,N=B$(O,L$);return b.cloneElement(s,N)}if(typeof s=="function"){if(j=b.createElement(s,O),b.isValidElement(j))return j}else j=Y$(t);var k=fn(t);if(W0(w)){if(r==="insideStart"||r==="insideEnd"||r==="end")return X$(t,r,j,k,w);S=F$(w,t.offset,t.position)}else S=Z$(t,w);return b.createElement(An,{zIndex:t.zIndex},b.createElement(Vd,Gr({ref:h,className:Be("recharts-label",f)},k,S,{textAnchor:M$(k.textAnchor)?k.textAnchor:S.textAnchor,breakAll:d}),j))}Ya.displayName="Label";var Q$=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?b.createElement(Ya,Gr({key:"label-implicit"},r)):Or(e)?b.createElement(Ya,Gr({key:"label-implicit",value:e},r)):b.isValidElement(e)?e.type===Ya?b.cloneElement(e,wt({key:"label-implicit"},r)):b.createElement(Ya,Gr({key:"label-implicit",content:e},r)):Qg(e)?b.createElement(Ya,Gr({key:"label-implicit",content:e},r)):e&&typeof e=="object"?b.createElement(Ya,Gr({},e,{key:"label-implicit"},r)):null};function J$(e){var{label:t,labelRef:n}=e,r=VC();return Q$(t,r,n)||null}var Ip={},Up={},dA;function eH(){return dA||(dA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n[n.length-1]}e.last=t})(Up)),Up}var qp={},hA;function tH(){return hA||(hA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Array.isArray(n)?n:Array.from(n)}e.toArray=t})(qp)),qp}var mA;function nH(){return mA||(mA=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eH(),n=tH(),r=Ay();function l(o){if(r.isArrayLike(o))return t.last(n.toArray(o))}e.last=l})(Ip)),Ip}var $p,vA;function rH(){return vA||(vA=1,$p=nH().last),$p}var aH=rH();const iH=ua(aH);var lH=["valueAccessor"],oH=["dataKey","clockWise","id","textBreakAll","zIndex"];function Vf(){return Vf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vf.apply(null,arguments)}func
Line truncated
|
||||
@media print {
|
||||
body * { visibility: hidden; }
|
||||
#printable-receipt, #printable-receipt * { visibility: visible; }
|
||||
#printable-receipt {
|
||||
display: block !important;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
background: white;
|
||||
color: black;
|
||||
font-family: monospace;
|
||||
padding: 20px;
|
||||
z-index: 99999;
|
||||
-webkit-print-color-adjust: exact; /* Ensure images/colors print */
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
.no-print { display: none !important; }
|
||||
}
|
||||
`}),y.jsxs("div",{className:"flex flex-col lg:flex-row justify-between items-start lg:items-center gap-4 no-print",children:[y.jsxs("div",{children:[y.jsx("h2",{className:"text-2xl font-bold text-slate-800 dark:text-white",children:"Sales History"}),y.jsx("p",{className:"text-slate-600 dark:text-slate-400 text-sm",children:"Monitor transactions, refunds, and voided sales."})]}),y.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 w-full lg:w-auto",children:[y.jsxs("div",{className:"relative w-full sm:w-64",children:[y.jsx(Eu,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-400",size:18}),y.jsx("input",{type:"text",placeholder:"Search ID or Customer...",value:O,onChange:H=>E(H.target.value),className:"w-full pl-10 p-2.5 border rounded-lg dark:bg-slate-700 dark:border-slate-600 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none transition"})]}),y.jsxs("select",{value:N,onChange:H=>k(H.target.value),className:"w-full sm:w-48 p-2.5 border rounded-lg dark:bg-slate-700 dark:border-slate-600 dark:text-white focus:ring-2 focus:ring-blue-500 outline-none transition cursor-pointer",children:[y.jsx("option",{value:"all",children:"All Status"}),y.jsx("option",{value:"completed",children:"Completed"}),y.jsx("option",{value:"void",children:"Void"}),y.jsx("option",{value:"refunded",children:"Refunded"})]})]})]}),y.jsx("div",{className:"bg-white dark:bg-slate-800 rounded-lg shadow overflow-hidden border border-slate-200 dark:border-slate-700 no-print",children:y.jsx("div",{className:"overflow-x-auto",children:y.jsxs("table",{className:"w-full text-left whitespace-nowrap",children:[y.jsx("thead",{className:"bg-slate-50 dark:bg-slate-700/50 text-slate-600 dark:text-slate-300 text-sm",children:y.jsxs("tr",{children:[y.jsx("th",{className:"p-4",children:"Date"}),y.jsx("th",{className:"p-4",children:"Transaction ID"}),y.jsx("th",{className:"p-4",children:"Customer"}),y.jsx("th",{className:"p-4",children:"Total"}),y.jsx("th",{className:"p-4",children:"Payment"}),y.jsx("th",{className:"p-4",children:"Status"}),y.jsx("th",{className:"p-4 text-right",children:"Actions"})]})}),y.jsxs("tbody",{className:"divide-y divide-slate-100 dark:divide-slate-700",children:[n.map(H=>y.jsxs("tr",{className:"hover:bg-slate-50 dark:hover:bg-slate-700/30 transition",children:[y.jsxs("td",{className:"p-4 text-sm text-slate-600 dark:text-slate-300",children:[new Date(H.sale_date).toLocaleDateString(),y.jsx("div",{className:"text-xs text-slate-400",children:new Date(H.sale_date).toLocaleTimeString()})]}),y.jsxs("td",{className:"p-4 font-mono text-xs text-slate-500 dark:text-slate-400",children:[H.id?.slice(0,8),"..."]}),y.jsx("td",{className:"p-4 text-slate-800 dark:text-white font-medium",children:H.customer_name||"Walk-in"}),y.jsxs("td",{className:"p-4 text-slate-800 dark:text-white font-bold",children:["₱",H.total_amount.toFixed(2)]}),y.jsx("td",{className:"p-4 text-sm text-slate-600 dark:text-slate-300",children:H.payment_type}),y.jsx("td",{className:"p-4",children:y.jsx("span",{className:`px-2 py-1 rounded text-xs font-bold uppercase ${V(H.status)}`,children:H.status})}),y.jsxs("td",{className:"p-4 text-right flex justify-end gap-2",children:[y.jsx("button",{onClick:()=>C(H,"view"),className:"p-2 text-blue-600 hover:bg-blue-50 rounded-lg dark:hover:bg-blue-900/30 transition",title:"View Details",children:y.jsx(n0,{size:18})}),H.status==="completed"&&y.jsxs(y.Fragment,{children:[y.jsx("button",{onClick:()=>C(H,"refund"),className:"p-2 text-orange-600 hover:bg-orange-50 rounded-lg dark:hover:bg-orange-900/30 transition",title:"Refund",children:y.jsx(Fu,{size:18})}),y.jsx("button",{onClick:()=>C(H,"void"),className:"p-2 text-red-600 hover:bg-red-50 rounded-lg dark:hover:bg-red-900/30 transition",title:"Void",children:y.jsx(TE,{size:18})})]})]})]},H.id)),n.length===0&&y.jsx("tr",{children:y.jsx("td",{colSpan:7,className:"p-8 text-center text-slate-500 dark:text-slate-400",children:"No sales found matching your criteria."})})]})]})})}),d&&s&&y.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50 animate-in fade-in duration-200 backdrop-blur-sm no-print",children:y.jsxs("div",{className:"bg-white dark:bg-slate-800 rounded-xl shadow-2xl w-full max-w-lg overflow-hidden flex flex-col max-h-[90vh]",children:[y.jsxs("div",{className:"p-6 border-b border-slate-200 dark:border-slate-700 flex justify-between items-center bg-slate-50 dark:bg-slate-800/80",children:[y.jsx("h3",{className:"text-xl font-bold text-slate-800 dark:text-white",children:m==="view"?"Transaction Details":m==="void"?"Void Transaction":"Process Refund"}),y.jsx("button",{onClick:()=>h(!1),className:"p-1 hover:bg-slate-200 dark:hover:bg-slate-700 rounded-full transition",children:y.jsx(Il,{className:"text-slate-500 dark:text-slate-400",size:20})})]}),y.jsx("div",{className:"p-6 overflow-y-auto",children:m==="view"?y.jsxs("div",{className:"space-y-5",children:[y.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm b
Line truncated
|
||||
@media print {
|
||||
body * { visibility: hidden; }
|
||||
#report-content, #report-content * { visibility: visible; }
|
||||
#report-content { position: absolute; left: 0; top: 0; width: 100%; }
|
||||
.no-print { display: none !important; }
|
||||
}
|
||||
`}),y.jsxs("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center gap-4 no-print",children:[y.jsxs("div",{children:[y.jsx("h2",{className:"text-2xl font-bold text-slate-800 dark:text-white",children:"Financial Reports"}),y.jsx("p",{className:"text-slate-600 dark:text-slate-400 text-sm",children:"Sales performance and business analytics."})]}),y.jsxs("div",{className:"flex flex-wrap gap-2 items-center",children:[y.jsxs("div",{className:"flex bg-white dark:bg-slate-800 rounded-lg border dark:border-slate-700 p-1",children:[["today","week","month","year"].map(S=>y.jsx("button",{onClick:()=>f(S),className:`px-3 py-1.5 text-sm rounded-md capitalize transition ${s===S?"bg-blue-600 text-white font-medium shadow-sm":"text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-700"}`,children:S},S)),y.jsx("button",{onClick:()=>f("custom"),className:`px-3 py-1.5 text-sm rounded-md capitalize transition ${s==="custom"?"bg-blue-600 text-white font-medium shadow-sm":"text-slate-600 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-700"}`,children:"Custom"})]}),s==="custom"&&y.jsxs("div",{className:"flex gap-2 bg-white dark:bg-slate-800 p-1 rounded-lg border dark:border-slate-700",children:[y.jsx("input",{type:"date",className:"p-1 text-sm border rounded dark:bg-slate-700 dark:border-slate-600 dark:text-white",onChange:S=>h(S.target.value)}),y.jsx("span",{className:"self-center text-slate-400",children:"-"}),y.jsx("input",{type:"date",className:"p-1 text-sm border rounded dark:bg-slate-700 dark:border-slate-600 dark:text-white",onChange:S=>p(S.target.value)})]}),y.jsxs("button",{onClick:j,className:"flex items-center gap-2 bg-slate-800 hover:bg-slate-700 text-white px-4 py-2 rounded-lg text-sm font-medium transition",children:[y.jsx(id,{size:16})," Print"]})]})]}),y.jsxs("div",{id:"report-content",className:"space-y-6",children:[y.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:[y.jsxs("div",{className:"bg-white dark:bg-slate-800 p-6 rounded-xl shadow-sm border border-slate-200 dark:border-slate-700 flex items-center gap-4",children:[y.jsx("div",{className:"p-3 bg-blue-100 dark:bg-blue-900/30 rounded-full text-blue-600 dark:text-blue-400",children:y.jsx(LE,{size:24})}),y.jsxs("div",{children:[y.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:"Total Orders"}),y.jsx("h3",{className:"text-2xl font-bold text-slate-800 dark:text-white",children:x.totalOrders})]})]}),y.jsxs("div",{className:"bg-white dark:bg-slate-800 p-6 rounded-xl shadow-sm border border-slate-200 dark:border-slate-700 flex items-center gap-4",children:[y.jsx("div",{className:"p-3 bg-green-100 dark:bg-green-900/30 rounded-full text-green-600 dark:text-green-400",children:y.jsx(BE,{size:24})}),y.jsxs("div",{children:[y.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:"Total Sales"}),y.jsxs("h3",{className:"text-2xl font-bold text-slate-800 dark:text-white",children:["₱",x.totalSales.toLocaleString()]})]})]}),y.jsxs("div",{className:"bg-white dark:bg-slate-800 p-6 rounded-xl shadow-sm border border-slate-200 dark:border-slate-700 flex items-center gap-4",children:[y.jsx("div",{className:"p-3 bg-orange-100 dark:bg-orange-900/30 rounded-full text-orange-600 dark:text-orange-400",children:y.jsx(Fu,{size:24})}),y.jsxs("div",{children:[y.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:"Total Refunds"}),y.jsxs("h3",{className:"text-2xl font-bold text-slate-800 dark:text-white",children:["₱",x.totalRefund.toLocaleString()]})]})]}),y.jsxs("div",{className:"bg-white dark:bg-slate-800 p-6 rounded-xl shadow-sm border border-slate-200 dark:border-slate-700 flex items-center gap-4",children:[y.jsx("div",{className:"p-3 bg-red-100 dark:bg-red-900/30 rounded-full text-red-600 dark:text-red-400",children:y.jsx(r0,{size:24})}),y.jsxs("div",{children:[y.jsx("p",{className:"text-sm text-slate-500 dark:text-slate-400",children:"Total Voided"}),y.jsxs("h3",{className:"text-2xl font-bold text-slate-800 dark:text-white",children:["₱",x.totalVoid.toLocaleString()]})]})]})]}),y.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[y.jsxs("div",{className:"lg:col-span-2 bg-white dark:bg-slate-800 p-6 rounded-xl shadow-sm border border-slate-200 dark:border-slate-700",children:[y.jsx("h3",{className:"text-lg font-bold text-slate-800 dark:text-white mb-6",children:"Sales Trend"}),y.jsx("div",{className:"h-72 w-full",children:y.jsx(ql,{width:"100%",height:"100%",children:y.jsxs(HT,{data:w.trendData,children:[y.jsx("defs",{children:y.jsxs("linearGradient",{id:"colorSales",x1:"0",y1:"0",x2:"0",y2:"1",children:[y.jsx("stop",{offset:"5%",stopColor:"#3b82f6",stopOpacity:.8}),y.jsx("stop",{offset:"95%",stopColor:"#3b82f6",stopOpacity:0})]})}),y.jsx(Hu,{strokeDasharray:"3 3",vertical:!1,stroke:"#e2e8f0"}),y.jsx(Ku,{dataKey:"name",axisLine:!1,tickLine:!1,tick:{fill:"#64748b",fontSize:12}}),y.jsx(Vu,
Line truncated
|
||||
@media print {
|
||||
body * { visibility: hidden; }
|
||||
#receipt-modal, #receipt-modal * { visibility: visible; }
|
||||
#receipt-modal {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: white;
|
||||
color: black;
|
||||
z-index: 9999;
|
||||
display: block !important;
|
||||
}
|
||||
#receipt-content {
|
||||
box-shadow: none !important;
|
||||
border: none !important;
|
||||
max-width: 100% !important;
|
||||
width: 300px !important;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.no-print { display: none !important; }
|
||||
}
|
||||
`}),y.jsxs("div",{className:"flex-1 flex flex-col h-full overflow-hidden no-print",children:[y.jsxs("div",{className:"bg-white dark:bg-slate-800 p-4 border-b dark:border-slate-700 flex justify-between items-center shrink-0",children:[y.jsxs("div",{children:[y.jsx("h1",{className:"text-xl font-bold text-slate-800 dark:text-white",children:"POS Terminal"}),y.jsxs("p",{className:"text-xs text-slate-500 dark:text-slate-400",children:["Cashier: ",t?.name]})]}),y.jsxs("div",{className:"flex gap-4 items-center",children:[y.jsxs("button",{onClick:()=>H(!0),className:"flex items-center gap-1 text-slate-600 dark:text-slate-300 hover:text-orange-600 dark:hover:text-orange-400 text-sm font-medium",children:[y.jsx(Fu,{size:18})," Refund"]}),y.jsx("button",{onClick:e,className:"text-red-600 hover:underline text-sm",children:"Logout"})]})]}),y.jsxs("div",{className:"p-4 space-y-4 shrink-0",children:[y.jsxs("div",{className:"relative",children:[y.jsx(Eu,{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-400",size:18}),y.jsx("input",{type:"text",placeholder:"Search products...",value:d,onChange:te=>h(te.target.value),className:"w-full pl-10 p-3 rounded-lg border dark:bg-slate-700 dark:border-slate-600 dark:text-white"})]}),y.jsx("div",{className:"flex gap-2 overflow-x-auto pb-2 scrollbar-hide",children:on.map(te=>y.jsx("button",{onClick:()=>p(te),className:`px-4 py-2 rounded-full text-sm whitespace-nowrap transition ${m===te?"bg-blue-600 text-white":"bg-white dark:bg-slate-800 text-slate-600 dark:text-slate-300 border dark:border-slate-600"}`,children:te},te))})]}),y.jsx("div",{className:"flex-1 overflow-y-auto p-4 pt-0 grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4 pb-24 md:pb-4",children:l?y.jsx("p",{className:"col-span-full text-center p-10 text-slate-500",children:"Loading products..."}):pr.map(te=>{const Pe=te.quantity<=te.minQuantity,Ve=te.quantity===0;return y.jsxs("div",{onClick:()=>!Ve&&ws(te),className:`
|
||||
bg-white dark:bg-slate-800 p-4 rounded-xl shadow-sm border transition flex flex-col justify-between h-40 relative group
|
||||
${Ve?"opacity-50 cursor-not-allowed border-slate-200 dark:border-slate-700":"hover:shadow-md cursor-pointer active:scale-95 border-transparent dark:border-slate-700"}
|
||||
${Pe&&!Ve?"border-orange-300 dark:border-orange-500/50 ring-1 ring-orange-100 dark:ring-orange-900/20":""}
|
||||
`,children:[y.jsxs("div",{className:"absolute top-2 right-2 flex gap-1",children:[Ve&&y.jsx("span",{className:"bg-slate-100 dark:bg-slate-700 text-slate-500 dark:text-slate-300 text-[10px] font-bold px-2 py-1 rounded-full",children:"OUT OF STOCK"}),Pe&&!Ve&&y.jsxs("span",{className:"bg-orange-100 dark:bg-orange-900/30 text-orange-600 dark:text-orange-400 text-[10px] font-bold px-2 py-1 rounded-full flex items-center gap-1",children:[y.jsx(_u,{size:10})," LOW"]})]}),y.jsxs("div",{children:[y.jsx("h3",{className:"font-semibold text-slate-800 dark:text-white line-clamp-2 leading-tight pr-14 text-sm",children:te.name}),y.jsx("p",{className:"text-xs text-slate-500 dark:text-slate-400 mt-1",children:te.category})]}),y.jsxs("div",{className:"mt-2",children:[y.jsxs("div",{className:"flex justify-between items-center mb-1",children:[y.jsx("span",{className:"text-[10px] text-slate-500 dark:text-slate-400 uppercase tracking-wide",children:"In Stock"}),y.jsxs("span",{className:`text-xs font-medium ${Pe?"text-orange-600 dark:text-orange-400":"text-slate-700 dark:text-slate-300"}`,children:[te.quantity," ",y.jsxs("span",{className:"text-slate-400 text-[10px]",children:["(Min: ",te.minQuantity,")"]})]})]}),y.jsxs("div",{className:"flex justify-between items-end",children:[y.jsxs("span",{className:"font-bold text-blue-600 dark:text-blue-400",children:["₱",te.price]}),y.jsx("div",{className:`
|
||||
p-1.5 rounded-lg transition
|
||||
${Ve?"bg-slate-100 dark:bg-slate-700 text-slate-400":"bg-blue-100 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400 group-hover:bg-blue-600 group-hover:text-white"}
|
||||
`,children:y.jsx(a0,{size:16})})]})]})]},te.id)})})]}),y.jsxs("div",{className:`
|
||||
bg-white dark:bg-slate-800 border-l dark:border-slate-700 flex flex-col shadow-2xl z-20
|
||||
fixed md:relative bottom-0 left-0 right-0 md:w-96
|
||||
transition-all duration-300 ease-in-out no-print
|
||||
${x?"h-20 md:h-full":"h-[85vh] md:h-full"}
|
||||
`,children:[y.jsxs("div",{onClick:()=>w(!x),className:"md:hidden h-20 bg-slate-900 text-white flex items-center justify-between px-6 cursor-pointer shrink-0",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsxs("div",{className:"bg-blue-600 p-2 rounded-full relative",children:[y.jsx(uf,{size:20}),y.jsx("span",{className:"absolute -top-1 -right-1 bg-red-500 text-white text-[10px] w-4 h-4 rounded-full flex items-center justify-center",children:ye.length})]}),y.jsxs("div",{className:"font-bold",children:["Total: ₱",Ze.grandTotal.toFixed(2)]})]}),x?y.jsx(y3,{}):y.jsx(f3,{})]}),y.jsxs("div",{className:"hidden md:flex p-4 border-b dark:border-slate-700 justify-between items-center shrink-0",children:[y.jsx("h2",{className:"font-bold text-lg text-slate-800 dark:text-white",children:"Current Order"}),y.jsxs("span",{className:"bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded-full",children:[ye.length," Items"]})]}),y.jsx("div",{className:"flex-1 overflow-y-auto p-4 space-y-3",children:ye.length===0?y.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-slate-400 space-y-2 opacity-50",children:[y.jsx(uf,{size:48}),y.jsx("p",{children:"No items selected"})]}):ye.map(te=>y.jsxs("div",{className:"flex justify-between items-center group",children:[y.jsxs("div",{className:"flex-1",children:[y.jsx("p",{className:"font-medium text-slate-800 dark:text-white text-sm",children:te.name}),y.jsxs("p",{className:"text-xs text-blue-600 dark:text-blue-400",children:["₱",te.price," x ",te.cartQty]})]}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsxs("div",{className:"flex items-center bg-slate-100 dark:bg-slate-700 rounded-lg",children:[y.jsx("button",{onClick:()=>ya(te.id,-1),className:"p-1 hover:bg-slate-200 dark:hover:bg-slate-600 rounded-l-lg transition",children:y.jsx(I3,{size:14})}),y.jsx("span",{className:"w-6 text-center text-sm font-medium",children:te.cartQty}),y.jsx("button",{onClick:()=>ya(te.id,1),className:"p-1 hover:bg-slate-200 dark:hover:bg-slate-600 rounded-r-lg transition",children:y.jsx(a0,{size:14})})]}),y.jsx("button",{onClick:()=>ya(te.id,-100),className:"text-slate-400 hover:text-red-500 transition",children:y.jsx(rR,{size:16})})]})]},te.id))}),y.jsxs("div",{className:"border-t dark:border-slate-700 bg-slate-50 dark:bg-slate-800/50 p-4 space-y-3 shrink-0",children:[y.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[y.jsx("input",{type:"text",placeholder:"Customer (Optional)",className:"col-span-2 p-2 text-sm border rounded dark:bg-slate-700 dark:border-slate-600 dark:text-white",value:pa,onChange:te=>Ki(te.target.value)}),y.jsxs("select",{className:"p-2 text-sm border rounded dark:bg-slate-700 dark:border-slate-600 dark:text-white",value:re,onChange:te=>jt(te.target.value),children:[y.jsx("option",{value:"None",children:"No Discount"}),y.jsx("option",{value:"Senior",children:"Senior Citizen"}),y.jsx("option",{value:"PWD",children:"PWD"})]}),y.jsxs("select",{className:"p-2 text-sm border rounded dark:bg-slate-700 dark:border-slate-600 dark:text-white",value:Se,onChange:te=>Ot(te.target.value),children:[y.jsx("option",{value:"Cash",children:"Cash"}),y.jsx("option",{value:"GCash",children:"GCash"}),y.jsx("option",{value:"Card",children:"Card"}),y.jsx("option",{value:"QRPh",children:"QRPh"})]}),y.jsxs("div",{className:"col-span-2 flex items-center gap-2",children:[y.jsx("label",{className:"text-xs text-slate-500 whitespace-nowrap",children:"Tax Rate %:"}),y.jsx("input",{type:"number",min:"0",max:"100",className:"w-full p-2 text-sm border rounded dark:bg-slate-700 dark:border-slate-600 dark:text-white",value:s,onChange:te=>f(Number(te.target.value))})]})]}),y.jsxs("div",{className:"flex gap-2 text-slate-400 justify-center pb-2",children:[y.jsx(i3,{className:Se==="Cash"?"text-green-600":"",size:20}),y.jsx(J3,{className:Se==="GCash"?"text-blue-600":"",size:20}),y.jsx(DE,{className:Se==="Card"?"text-orange-600":"",size:20}),y.jsx(V3,{className:Se==="QRPh"?"text-purple-600":"",size:20})]}),y.jsxs("div",{className:"space-y-1 text-sm text-slate-600 dark:text-slate-400",children:[y.jsxs("div",{className:"flex justify-between",children:[y.jsx("span",{children:"Gross Total"}),y.jsxs("span",{children:["₱",Ze.grossTotal.toFixed(2)]})]}),y.jsxs("div",{className:"flex justify-between text-xs text-slate-500",children:[y.jsx("span",{children:"Vatable Sales (Base)"}),y.jsxs("span",{children:["₱",Ze.vatableSales.toFixed(2)]})]}),re==="None"?y.jsxs("div",{className:"flex justify-between text-xs",children:[y.jsxs("span",{children:["VAT (",s,"%)"]}),y.jsxs("span",{children:["₱",Ze.vatAmount.toFixed(2)]})]}):y.jsxs("div",{className:"flex justify-between text-green-600",children:[y.jsx("span",{children:"VAT Exempt + 20% Discount"}),y.jsxs("span",{children:["-₱",Ze.discountAmount.toFixed(2)]})]}),y.jsxs("div",{className:"flex justify-between font-bold text-xl text-slate-800 dark:text-white border-t pt-2 dark:border-slate-600",children:[y.jsx(
Line truncated
|
||||
Vendored
+1
-1
@@ -10,7 +10,7 @@
|
||||
/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Store POS</title>
|
||||
<script type="module" crossorigin src="/assets/index-esU7DBOx.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-CGsiCkCg.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-Bs3aXOOt.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -15,18 +15,28 @@ interface AuthProviderProps {
|
||||
}
|
||||
|
||||
export const AuthProvider = ({ children }: AuthProviderProps) => {
|
||||
// 1. Initialize state from LocalStorage to prevent logout on refresh
|
||||
// 1. Initialize state from LocalStorage synchronously
|
||||
// This runs BEFORE the first render, preventing the 'null' flash that causes redirects
|
||||
const [user, setUser] = useState<User | null>(() => {
|
||||
const savedUser = localStorage.getItem("currentUser");
|
||||
return savedUser ? JSON.parse(savedUser) : null;
|
||||
try {
|
||||
const savedUser = localStorage.getItem("currentUser");
|
||||
return savedUser ? JSON.parse(savedUser) : null;
|
||||
} catch (error) {
|
||||
console.error("Failed to parse user from local storage:", error);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
// 2. Save to LocalStorage whenever user state changes
|
||||
useEffect(() => {
|
||||
if (user) {
|
||||
localStorage.setItem("currentUser", JSON.stringify(user));
|
||||
} else {
|
||||
localStorage.removeItem("currentUser");
|
||||
try {
|
||||
if (user) {
|
||||
localStorage.setItem("currentUser", JSON.stringify(user));
|
||||
} else {
|
||||
localStorage.removeItem("currentUser");
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Failed to save user to local storage:", error);
|
||||
}
|
||||
}, [user]);
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ import {
|
||||
ChevronUp,
|
||||
ChevronDown,
|
||||
AlertTriangle,
|
||||
LifeBuoy,
|
||||
X,
|
||||
Printer,
|
||||
RotateCcw,
|
||||
@@ -492,12 +491,12 @@ const POSDashboard = () => {
|
||||
>
|
||||
<RotateCcw size={18} /> Refund
|
||||
</button>
|
||||
<button
|
||||
{/* <button
|
||||
onClick={() => setShowSupportModal(true)}
|
||||
className="flex items-center gap-1 text-slate-600 dark:text-slate-300 hover:text-blue-600 text-sm font-medium"
|
||||
>
|
||||
<LifeBuoy size={18} /> Report Issue
|
||||
</button>
|
||||
</button> */}
|
||||
<button
|
||||
onClick={logout}
|
||||
className="text-red-600 hover:underline text-sm"
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
|
||||
}
|
||||
Reference in new issue
Block a user