react-fluent-grid
Version:
A powerful, customizable data grid component built with React, TypeScript, and TanStack Table v8
30 lines (28 loc) • 572 kB
JavaScript
(function(We,fe){typeof exports=="object"&&typeof module<"u"?fe(exports,require("react"),require("@tanstack/react-table"),require("lucide-react"),require("@radix-ui/react-slot"),require("class-variance-authority"),require("clsx"),require("tailwind-merge"),require("@radix-ui/react-checkbox"),require("@radix-ui/react-dropdown-menu"),require("@radix-ui/react-popover"),require("@radix-ui/react-scroll-area"),require("@radix-ui/react-select"),require("react-day-picker"),require("@radix-ui/react-dialog")):typeof define=="function"&&define.amd?define(["exports","react","@tanstack/react-table","lucide-react","@radix-ui/react-slot","class-variance-authority","clsx","tailwind-merge","@radix-ui/react-checkbox","@radix-ui/react-dropdown-menu","@radix-ui/react-popover","@radix-ui/react-scroll-area","@radix-ui/react-select","react-day-picker","@radix-ui/react-dialog"],fe):(We=typeof globalThis<"u"?globalThis:We||self,fe(We.FluentGrid={},We.React,We.TanStackTable,We.LucideReact,We.reactSlot,We.cva,We.clsx,We.twMerge,We.CheckboxPrimitive,We.DropdownMenuPrimitive,We.PopoverPrimitive,We.ScrollAreaPrimitive,We.SelectPrimitive,We.ReactDayPicker,We.DialogPrimitive))})(this,function(We,fe,ra,he,ll,f0,ul,hl,dl,xl,pl,ml,vl,gl,_l){"use strict";function ta(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Xe=ta(fe),bs=ta(dl),_r=ta(xl),Va=ta(pl),aa=ta(ml),wr=ta(vl),_t=ta(_l);var wl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var As={exports:{}},za={};/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var l0;function yl(){if(l0)return za;l0=1;var e=fe,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,n=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(c,o,f){var l,u={},d=null,p=null;f!==void 0&&(d=""+f),o.key!==void 0&&(d=""+o.key),o.ref!==void 0&&(p=o.ref);for(l in o)a.call(o,l)&&!s.hasOwnProperty(l)&&(u[l]=o[l]);if(c&&c.defaultProps)for(l in o=c.defaultProps,o)u[l]===void 0&&(u[l]=o[l]);return{$$typeof:t,type:c,key:d,ref:p,props:u,_owner:n.current}}return za.Fragment=r,za.jsx=i,za.jsxs=i,za}var Ga={};/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var u0;function El(){return u0||(u0=1,process.env.NODE_ENV!=="production"&&function(){var e=fe,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),c=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),v=Symbol.iterator,h="@@iterator";function g(x){if(x===null||typeof x!="object")return null;var _=v&&x[v]||x[h];return typeof _=="function"?_:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function A(x){{for(var _=arguments.length,F=new Array(_>1?_-1:0),b=1;b<_;b++)F[b-1]=arguments[b];w("error",x,F)}}function w(x,_,F){{var b=S.ReactDebugCurrentFrame,G=b.getStackAddendum();G!==""&&(_+="%s",F=F.concat([G]));var Y=F.map(function(V){return String(V)});Y.unshift("Warning: "+_),Function.prototype.apply.call(console[x],console,Y)}}var O=!1,H=!1,B=!1,T=!1,E=!1,k;k=Symbol.for("react.module.reference");function R(x){return!!(typeof x=="string"||typeof x=="function"||x===a||x===s||E||x===n||x===f||x===l||T||x===p||O||H||B||typeof x=="object"&&x!==null&&(x.$$typeof===d||x.$$typeof===u||x.$$typeof===i||x.$$typeof===c||x.$$typeof===o||x.$$typeof===k||x.getModuleId!==void 0))}function L(x,_,F){var b=x.displayName;if(b)return b;var G=_.displayName||_.name||"";return G!==""?F+"("+G+")":F}function I(x){return x.displayName||"Context"}function U(x){if(x==null)return null;if(typeof x.tag=="number"&&A("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof x=="function")return x.displayName||x.name||null;if(typeof x=="string")return x;switch(x){case a:return"Fragment";case r:return"Portal";case s:return"Profiler";case n:return"StrictMode";case f:return"Suspense";case l:return"SuspenseList"}if(typeof x=="object")switch(x.$$typeof){case c:var _=x;return I(_)+".Consumer";case i:var F=x;return I(F._context)+".Provider";case o:return L(x,x.render,"ForwardRef");case u:var b=x.displayName||null;return b!==null?b:U(x.type)||"Memo";case d:{var G=x,Y=G._payload,V=G._init;try{return U(V(Y))}catch{return null}}}return null}var ne=Object.assign,se=0,xe,J,Te,W,ye,le,C;function P(){}P.__reactDisabledLog=!0;function j(){{if(se===0){xe=console.log,J=console.info,Te=console.warn,W=console.error,ye=console.group,le=console.groupCollapsed,C=console.groupEnd;var x={configurable:!0,enumerable:!0,value:P,writable:!0};Object.defineProperties(console,{info:x,log:x,warn:x,error:x,group:x,groupCollapsed:x,groupEnd:x})}se++}}function M(){{if(se--,se===0){var x={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:ne({},x,{value:xe}),info:ne({},x,{value:J}),warn:ne({},x,{value:Te}),error:ne({},x,{value:W}),group:ne({},x,{value:ye}),groupCollapsed:ne({},x,{value:le}),groupEnd:ne({},x,{value:C})})}se<0&&A("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=S.ReactCurrentDispatcher,ce;function Z(x,_,F){{if(ce===void 0)try{throw Error()}catch(G){var b=G.stack.trim().match(/\n( *(at )?)/);ce=b&&b[1]||""}return`
`+ce+x}}var Q=!1,re;{var pe=typeof WeakMap=="function"?WeakMap:Map;re=new pe}function N(x,_){if(!x||Q)return"";{var F=re.get(x);if(F!==void 0)return F}var b;Q=!0;var G=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Y;Y=q.current,q.current=null,j();try{if(_){var V=function(){throw Error()};if(Object.defineProperty(V.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(V,[])}catch(Ae){b=Ae}Reflect.construct(x,[],V)}else{try{V.call()}catch(Ae){b=Ae}x.call(V.prototype)}}else{try{throw Error()}catch(Ae){b=Ae}x()}}catch(Ae){if(Ae&&b&&typeof Ae.stack=="string"){for(var z=Ae.stack.split(`
`),K=b.stack.split(`
`),ae=z.length-1,ue=K.length-1;ae>=1&&ue>=0&&z[ae]!==K[ue];)ue--;for(;ae>=1&&ue>=0;ae--,ue--)if(z[ae]!==K[ue]){if(ae!==1||ue!==1)do if(ae--,ue--,ue<0||z[ae]!==K[ue]){var we=`
`+z[ae].replace(" at new "," at ");return x.displayName&&we.includes("<anonymous>")&&(we=we.replace("<anonymous>",x.displayName)),typeof x=="function"&&re.set(x,we),we}while(ae>=1&&ue>=0);break}}}finally{Q=!1,q.current=Y,M(),Error.prepareStackTrace=G}var de=x?x.displayName||x.name:"",ke=de?Z(de):"";return typeof x=="function"&&re.set(x,ke),ke}function Ne(x,_,F){return N(x,!1)}function be(x){var _=x.prototype;return!!(_&&_.isReactComponent)}function Se(x,_,F){if(x==null)return"";if(typeof x=="function")return N(x,be(x));if(typeof x=="string")return Z(x);switch(x){case f:return Z("Suspense");case l:return Z("SuspenseList")}if(typeof x=="object")switch(x.$$typeof){case o:return Ne(x.render);case u:return Se(x.type,_,F);case d:{var b=x,G=b._payload,Y=b._init;try{return Se(Y(G),_,F)}catch{}}}return""}var _e=Object.prototype.hasOwnProperty,me={},Fe=S.ReactDebugCurrentFrame;function Le(x){if(x){var _=x._owner,F=Se(x.type,x._source,_?_.type:null);Fe.setExtraStackFrame(F)}else Fe.setExtraStackFrame(null)}function tr(x,_,F,b,G){{var Y=Function.call.bind(_e);for(var V in x)if(Y(x,V)){var z=void 0;try{if(typeof x[V]!="function"){var K=Error((b||"React class")+": "+F+" type `"+V+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof x[V]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw K.name="Invariant Violation",K}z=x[V](_,V,b,F,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ae){z=ae}z&&!(z instanceof Error)&&(Le(G),A("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",b||"React class",F,V,typeof z),Le(null)),z instanceof Error&&!(z.message in me)&&(me[z.message]=!0,Le(G),A("Failed %s type: %s",F,z.message),Le(null))}}}var br=Array.isArray;function pr(x){return br(x)}function Dr(x){{var _=typeof Symbol=="function"&&Symbol.toStringTag,F=_&&x[Symbol.toStringTag]||x.constructor.name||"Object";return F}}function $e(x){try{return ur(x),!1}catch{return!0}}function ur(x){return""+x}function qe(x){if($e(x))return A("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Dr(x)),ur(x)}var sr=S.ReactCurrentOwner,ar={key:!0,ref:!0,__self:!0,__source:!0},Ar,te,X;X={};function oe(x){if(_e.call(x,"ref")){var _=Object.getOwnPropertyDescriptor(x,"ref").get;if(_&&_.isReactWarning)return!1}return x.ref!==void 0}function Ee(x){if(_e.call(x,"key")){var _=Object.getOwnPropertyDescriptor(x,"key").get;if(_&&_.isReactWarning)return!1}return x.key!==void 0}function He(x,_){if(typeof x.ref=="string"&&sr.current&&_&&sr.current.stateNode!==_){var F=U(sr.current.type);X[F]||(A('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',U(sr.current.type),x.ref),X[F]=!0)}}function ir(x,_){{var F=function(){Ar||(Ar=!0,A("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",_))};F.isReactWarning=!0,Object.defineProperty(x,"key",{get:F,configurable:!0})}}function Be(x,_){{var F=function(){te||(te=!0,A("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",_))};F.isReactWarning=!0,Object.defineProperty(x,"ref",{get:F,configurable:!0})}}var Pe=function(x,_,F,b,G,Y,V){var z={$$typeof:t,type:x,key:_,ref:F,props:V,_owner:Y};return z._store={},Object.defineProperty(z._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(z,"_self",{configurable:!1,enumerable:!1,writable:!1,value:b}),Object.defineProperty(z,"_source",{configurable:!1,enumerable:!1,writable:!1,value:G}),Object.freeze&&(Object.freeze(z.props),Object.freeze(z)),z};function Pr(x,_,F,b,G){{var Y,V={},z=null,K=null;F!==void 0&&(qe(F),z=""+F),Ee(_)&&(qe(_.key),z=""+_.key),oe(_)&&(K=_.ref,He(_,G));for(Y in _)_e.call(_,Y)&&!ar.hasOwnProperty(Y)&&(V[Y]=_[Y]);if(x&&x.defaultProps){var ae=x.defaultProps;for(Y in ae)V[Y]===void 0&&(V[Y]=ae[Y])}if(z||K){var ue=typeof x=="function"?x.displayName||x.name||"Unknown":x;z&&ir(V,ue),K&&Be(V,ue)}return Pe(x,z,K,G,b,sr.current,V)}}var Wr=S.ReactCurrentOwner,gt=S.ReactDebugCurrentFrame;function Ge(x){if(x){var _=x._owner,F=Se(x.type,x._source,_?_.type:null);gt.setExtraStackFrame(F)}else gt.setExtraStackFrame(null)}var Ze;Ze=!1;function qr(x){return typeof x=="object"&&x!==null&&x.$$typeof===t}function ys(){{if(Wr.current){var x=U(Wr.current.type);if(x)return`
Check the render method of \``+x+"`."}return""}}function t0(x){return""}var Es={};function a0(x){{var _=ys();if(!_){var F=typeof x=="string"?x:x.displayName||x.name;F&&(_=`
Check the top-level render call using <`+F+">.")}return _}}function Ts(x,_){{if(!x._store||x._store.validated||x.key!=null)return;x._store.validated=!0;var F=a0(_);if(Es[F])return;Es[F]=!0;var b="";x&&x._owner&&x._owner!==Wr.current&&(b=" It was passed a child from "+U(x._owner.type)+"."),Ge(x),A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',F,b),Ge(null)}}function Ss(x,_){{if(typeof x!="object")return;if(pr(x))for(var F=0;F<x.length;F++){var b=x[F];qr(b)&&Ts(b,_)}else if(qr(x))x._store&&(x._store.validated=!0);else if(x){var G=g(x);if(typeof G=="function"&&G!==x.entries)for(var Y=G.call(x),V;!(V=Y.next()).done;)qr(V.value)&&Ts(V.value,_)}}}function n0(x){{var _=x.type;if(_==null||typeof _=="string")return;var F;if(typeof _=="function")F=_.propTypes;else if(typeof _=="object"&&(_.$$typeof===o||_.$$typeof===u))F=_.propTypes;else return;if(F){var b=U(_);tr(F,x.props,"prop",b,x)}else if(_.PropTypes!==void 0&&!Ze){Ze=!0;var G=U(_);A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",G||"Unknown")}typeof _.getDefaultProps=="function"&&!_.getDefaultProps.isReactClassApproved&&A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function s0(x){{for(var _=Object.keys(x.props),F=0;F<_.length;F++){var b=_[F];if(b!=="children"&&b!=="key"){Ge(x),A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",b),Ge(null);break}}x.ref!==null&&(Ge(x),A("Invalid attribute `ref` supplied to `React.Fragment`."),Ge(null))}}var Ha={};function Fs(x,_,F,b,G,Y){{var V=R(x);if(!V){var z="";(x===void 0||typeof x=="object"&&x!==null&&Object.keys(x).length===0)&&(z+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var K=t0();K?z+=K:z+=ys();var ae;x===null?ae="null":pr(x)?ae="array":x!==void 0&&x.$$typeof===t?(ae="<"+(U(x.type)||"Unknown")+" />",z=" Did you accidentally export a JSX literal instead of a component?"):ae=typeof x,A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ae,z)}var ue=Pr(x,_,F,G,Y);if(ue==null)return ue;if(V){var we=_.children;if(we!==void 0)if(b)if(pr(we)){for(var de=0;de<we.length;de++)Ss(we[de],x);Object.freeze&&Object.freeze(we)}else A("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ss(we,x)}if(_e.call(_,"key")){var ke=U(x),Ae=Object.keys(_).filter(function(Lr){return Lr!=="key"}),cr=Ae.length>0?"{key: someKey, "+Ae.join(": ..., ")+": ...}":"{key: someKey}";if(!Ha[ke+cr]){var hr=Ae.length>0?"{"+Ae.join(": ..., ")+": ...}":"{}";A(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,cr,ke,hr,ke),Ha[ke+cr]=!0}}return x===a?s0(ue):n0(ue),ue}}function i0(x,_,F){return Fs(x,_,F,!0)}function c0(x,_,F){return Fs(x,_,F,!1)}var y=c0,D=i0;Ga.Fragment=a,Ga.jsx=y,Ga.jsxs=D}()),Ga}process.env.NODE_ENV==="production"?As.exports=yl():As.exports=El();var m=As.exports;function je(...e){return hl.twMerge(ul.clsx(e))}const Cs=f0.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Oe=Xe.forwardRef(({className:e,variant:t,size:r,asChild:a=!1,...n},s)=>{const i=a?ll.Slot:"button";return m.jsx(i,{className:je(Cs({variant:t,size:r,className:e})),ref:s,...n})});Oe.displayName="Button";const na=Xe.forwardRef(({className:e,...t},r)=>m.jsx(bs.Root,{ref:r,className:je("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:m.jsx(bs.Indicator,{className:je("flex items-center justify-center text-current"),children:m.jsx(he.Check,{className:"h-4 w-4"})})}));na.displayName=bs.Root.displayName;const Ns=_r.Root,Ds=_r.Trigger,Tl=Xe.forwardRef(({className:e,inset:t,children:r,...a},n)=>m.jsxs(_r.SubTrigger,{ref:n,className:je("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...a,children:[r,m.jsx(he.ChevronRight,{className:"ml-auto h-4 w-4"})]}));Tl.displayName=_r.SubTrigger.displayName;const Sl=Xe.forwardRef(({className:e,...t},r)=>m.jsx(_r.SubContent,{ref:r,className:je("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Sl.displayName=_r.SubContent.displayName;const On=Xe.forwardRef(({className:e,sideOffset:t=4,...r},a)=>m.jsx(_r.Portal,{children:m.jsx(_r.Content,{ref:a,sideOffset:t,className:je("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));On.displayName=_r.Content.displayName;const at=Xe.forwardRef(({className:e,inset:t,...r},a)=>m.jsx(_r.Item,{ref:a,className:je("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...r}));at.displayName=_r.Item.displayName;const Fl=Xe.forwardRef(({className:e,children:t,checked:r,...a},n)=>m.jsxs(_r.CheckboxItem,{ref:n,className:je("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...a,children:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(_r.ItemIndicator,{children:m.jsx(he.Check,{className:"h-4 w-4"})})}),t]}));Fl.displayName=_r.CheckboxItem.displayName;const bl=Xe.forwardRef(({className:e,children:t,...r},a)=>m.jsxs(_r.RadioItem,{ref:a,className:je("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(_r.ItemIndicator,{children:m.jsx(he.Circle,{className:"h-2 w-2 fill-current"})})}),t]}));bl.displayName=_r.RadioItem.displayName;const Al=Xe.forwardRef(({className:e,inset:t,...r},a)=>m.jsx(_r.Label,{ref:a,className:je("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Al.displayName=_r.Label.displayName;const Cl=Xe.forwardRef(({className:e,...t},r)=>m.jsx(_r.Separator,{ref:r,className:je("-mx-1 my-1 h-px bg-muted",e),...t}));Cl.displayName=_r.Separator.displayName;const Nl=1,Dl=1e6;let Os=0;function Ol(){return Os=(Os+1)%Number.MAX_SAFE_INTEGER,Os.toString()}const Rs=new Map,h0=e=>{if(Rs.has(e))return;const t=setTimeout(()=>{Rs.delete(e),Xa({type:"REMOVE_TOAST",toastId:e})},Dl);Rs.set(e,t)},Rl=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Nl)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?h0(r):e.toasts.forEach(a=>{h0(a.id)}),{...e,toasts:e.toasts.map(a=>a.id===r||r===void 0?{...a,open:!1}:a)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Rn=[];let In={toasts:[]};function Xa(e){In=Rl(In,e),Rn.forEach(t=>{t(In)})}function Il({...e}){const t=Ol(),r=n=>Xa({type:"UPDATE_TOAST",toast:{...n,id:t}}),a=()=>Xa({type:"DISMISS_TOAST",toastId:t});return Xa({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||a()}}}),{id:t,dismiss:a,update:r}}function Is(){const[e,t]=Xe.useState(In);return Xe.useEffect(()=>(Rn.push(t),()=>{const r=Rn.indexOf(t);r>-1&&Rn.splice(r,1)}),[e]),{...e,toast:Il,dismiss:r=>Xa({type:"DISMISS_TOAST",toastId:r})}}function Pn(){return(Pn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}function d0(e,t){if(e==null)return{};var r,a,n={},s=Object.keys(e);for(a=0;a<s.length;a++)t.indexOf(r=s[a])>=0||(n[r]=e[r]);return n}function Ps(e){var t=fe.useRef(e),r=fe.useRef(function(a){t.current&&t.current(a)});return t.current=e,r.current}var $a=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=1),e>r?r:e<t?t:e},Ka=function(e){return"touches"in e},Ls=function(e){return e&&e.ownerDocument.defaultView||self},x0=function(e,t,r){var a=e.getBoundingClientRect(),n=Ka(t)?function(s,i){for(var c=0;c<s.length;c++)if(s[c].identifier===i)return s[c];return s[0]}(t.touches,r):t;return{left:$a((n.pageX-(a.left+Ls(e).pageXOffset))/a.width),top:$a((n.pageY-(a.top+Ls(e).pageYOffset))/a.height)}},p0=function(e){!Ka(e)&&e.preventDefault()},m0=fe.memo(function(e){var t=e.onMove,r=e.onKey,a=d0(e,["onMove","onKey"]),n=fe.useRef(null),s=Ps(t),i=Ps(r),c=fe.useRef(null),o=fe.useRef(!1),f=fe.useMemo(function(){var p=function(g){p0(g),(Ka(g)?g.touches.length>0:g.buttons>0)&&n.current?s(x0(n.current,g,c.current)):h(!1)},v=function(){return h(!1)};function h(g){var S=o.current,A=Ls(n.current),w=g?A.addEventListener:A.removeEventListener;w(S?"touchmove":"mousemove",p),w(S?"touchend":"mouseup",v)}return[function(g){var S=g.nativeEvent,A=n.current;if(A&&(p0(S),!function(O,H){return H&&!Ka(O)}(S,o.current)&&A)){if(Ka(S)){o.current=!0;var w=S.changedTouches||[];w.length&&(c.current=w[0].identifier)}A.focus(),s(x0(A,S,c.current)),h(!0)}},function(g){var S=g.which||g.keyCode;S<37||S>40||(g.preventDefault(),i({left:S===39?.05:S===37?-.05:0,top:S===40?.05:S===38?-.05:0}))},h]},[i,s]),l=f[0],u=f[1],d=f[2];return fe.useEffect(function(){return d},[d]),fe.createElement("div",Pn({},a,{onTouchStart:l,onMouseDown:l,className:"react-colorful__interactive",ref:n,onKeyDown:u,tabIndex:0,role:"slider"}))}),Ms=function(e){return e.filter(Boolean).join(" ")},v0=function(e){var t=e.color,r=e.left,a=e.top,n=a===void 0?.5:a,s=Ms(["react-colorful__pointer",e.className]);return fe.createElement("div",{className:s,style:{top:100*n+"%",left:100*r+"%"}},fe.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Mr=function(e,t,r){return t===void 0&&(t=0),r===void 0&&(r=Math.pow(10,t)),Math.round(r*e)/r},Pl=function(e){return Ul(Bs(e))},Bs=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?Mr(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?Mr(parseInt(e.substring(6,8),16)/255,2):1}},Ll=function(e){return jl(Bl(e))},Ml=function(e){var t=e.s,r=e.v,a=e.a,n=(200-t)*r/100;return{h:Mr(e.h),s:Mr(n>0&&n<200?t*r/100/(n<=100?n:200-n)*100:0),l:Mr(n/2),a:Mr(a,2)}},js=function(e){var t=Ml(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Bl=function(e){var t=e.h,r=e.s,a=e.v,n=e.a;t=t/360*6,r/=100,a/=100;var s=Math.floor(t),i=a*(1-r),c=a*(1-(t-s)*r),o=a*(1-(1-t+s)*r),f=s%6;return{r:Mr(255*[a,c,i,i,o,a][f]),g:Mr(255*[o,a,a,c,i,i][f]),b:Mr(255*[i,i,o,a,a,c][f]),a:Mr(n,2)}},Ln=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},jl=function(e){var t=e.r,r=e.g,a=e.b,n=e.a,s=n<1?Ln(Mr(255*n)):"";return"#"+Ln(t)+Ln(r)+Ln(a)+s},Ul=function(e){var t=e.r,r=e.g,a=e.b,n=e.a,s=Math.max(t,r,a),i=s-Math.min(t,r,a),c=i?s===t?(r-a)/i:s===r?2+(a-t)/i:4+(t-r)/i:0;return{h:Mr(60*(c<0?c+6:c)),s:Mr(s?i/s*100:0),v:Mr(s/255*100),a:n}},Wl=fe.memo(function(e){var t=e.hue,r=e.onChange,a=Ms(["react-colorful__hue",e.className]);return fe.createElement("div",{className:a},fe.createElement(m0,{onMove:function(n){r({h:360*n.left})},onKey:function(n){r({h:$a(t+360*n.left,0,360)})},"aria-label":"Hue","aria-valuenow":Mr(t),"aria-valuemax":"360","aria-valuemin":"0"},fe.createElement(v0,{className:"react-colorful__hue-pointer",left:t/360,color:js({h:t,s:100,v:100,a:1})})))}),Hl=fe.memo(function(e){var t=e.hsva,r=e.onChange,a={backgroundColor:js({h:t.h,s:100,v:100,a:1})};return fe.createElement("div",{className:"react-colorful__saturation",style:a},fe.createElement(m0,{onMove:function(n){r({s:100*n.left,v:100-100*n.top})},onKey:function(n){r({s:$a(t.s+100*n.left,0,100),v:$a(t.v-100*n.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Mr(t.s)+"%, Brightness "+Mr(t.v)+"%"},fe.createElement(v0,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:js(t)})))}),g0=function(e,t){if(e===t)return!0;for(var r in e)if(e[r]!==t[r])return!1;return!0},Vl=function(e,t){return e.toLowerCase()===t.toLowerCase()||g0(Bs(e),Bs(t))};function zl(e,t,r){var a=Ps(r),n=fe.useState(function(){return e.toHsva(t)}),s=n[0],i=n[1],c=fe.useRef({color:t,hsva:s});fe.useEffect(function(){if(!e.equal(t,c.current.color)){var f=e.toHsva(t);c.current={hsva:f,color:t},i(f)}},[t,e]),fe.useEffect(function(){var f;g0(s,c.current.hsva)||e.equal(f=e.fromHsva(s),c.current.color)||(c.current={hsva:s,color:f},a(f))},[s,e,a]);var o=fe.useCallback(function(f){i(function(l){return Object.assign({},l,f)})},[]);return[s,o]}var Gl=typeof window<"u"?fe.useLayoutEffect:fe.useEffect,Xl=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},_0=new Map,$l=function(e){Gl(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!_0.has(t)){var r=t.createElement("style");r.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,_0.set(t,r);var a=Xl();a&&r.setAttribute("nonce",a),t.head.appendChild(r)}},[])},Kl=function(e){var t=e.className,r=e.colorModel,a=e.color,n=a===void 0?r.defaultColor:a,s=e.onChange,i=d0(e,["className","colorModel","color","onChange"]),c=fe.useRef(null);$l(c);var o=zl(r,n,s),f=o[0],l=o[1],u=Ms(["react-colorful",t]);return fe.createElement("div",Pn({},i,{ref:c,className:u}),fe.createElement(Hl,{hsva:f,onChange:l}),fe.createElement(Wl,{hue:f.h,onChange:l,className:"react-colorful__last-control"}))},Yl={defaultColor:"000",toHsva:Pl,fromHsva:function(e){return Ll({h:e.h,s:e.s,v:e.v,a:1})},equal:Vl},ql=function(e){return fe.createElement(Kl,Pn({},e,{colorModel:Yl}))};const Us=Va.Root,Ws=Va.Trigger,Mn=Xe.forwardRef(({className:e,align:t="center",sideOffset:r=4,...a},n)=>m.jsx(Va.Portal,{children:m.jsx(Va.Content,{ref:n,align:t,sideOffset:r,className:je("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Mn.displayName=Va.Content.displayName;const w0=Xe.forwardRef(({className:e,...t},r)=>m.jsx("div",{ref:r,className:je("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));w0.displayName="Card";const Jl=Xe.forwardRef(({className:e,...t},r)=>m.jsx("div",{ref:r,className:je("flex flex-col space-y-1.5 p-6",e),...t}));Jl.displayName="CardHeader";const Zl=Xe.forwardRef(({className:e,...t},r)=>m.jsx("h3",{ref:r,className:je("text-2xl font-semibold leading-none tracking-tight",e),...t}));Zl.displayName="CardTitle";const Ql=Xe.forwardRef(({className:e,...t},r)=>m.jsx("p",{ref:r,className:je("text-sm text-muted-foreground",e),...t}));Ql.displayName="CardDescription";const eu=Xe.forwardRef(({className:e,...t},r)=>m.jsx("div",{ref:r,className:je("p-6 pt-0",e),...t}));eu.displayName="CardContent";const ru=Xe.forwardRef(({className:e,...t},r)=>m.jsx("div",{ref:r,className:je("flex items-center p-6 pt-0",e),...t}));ru.displayName="CardFooter";const tu=["#3B82F6","#8B5CF6","#10B981","#F59E0B","#EF4444","#EC4899","#6366F1","#14B8A6"];function k0({theme:e,onThemeChange:t}){const[r,a]=fe.useState(!1),[n,s]=fe.useState(e.primaryColor||"#3B82F6"),i=f=>{s(f)},c=f=>{const l=au(f);document.documentElement.style.setProperty("--primary",l),document.documentElement.style.setProperty("--primary-hover",`${l.split(" ")[0]} ${l.split(" ")[1]} ${Math.max(parseInt(l.split(" ")[2])-5,5)}%`),document.documentElement.style.setProperty("--primary-light",`${l.split(" ")[0]} ${l.split(" ")[1]} 85%`),t({...e,primaryColor:f}),a(!1)},o=()=>{const f=e.mode==="light"?"dark":"light";document.documentElement.classList.toggle("dark",f==="dark"),t({...e,mode:f})};return m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsxs(Oe,{variant:"outline",size:"sm",onClick:o,className:"flex items-center gap-2",children:[e.mode==="light"?m.jsx(he.Sun,{className:"w-4 h-4"}):m.jsx(he.Moon,{className:"w-4 h-4"}),e.mode==="light"?"Light":"Dark"]}),m.jsxs(Us,{open:r,onOpenChange:a,children:[m.jsx(Ws,{asChild:!0,children:m.jsxs(Oe,{variant:"outline",size:"sm",className:"flex items-center gap-2",children:[m.jsx(he.Palette,{className:"w-4 h-4"}),"Theme"]})}),m.jsx(Mn,{className:"w-80 p-4",align:"end",children:m.jsx(w0,{className:"p-4",children:m.jsxs("div",{className:"space-y-4",children:[m.jsxs("div",{children:[m.jsx("h4",{className:"text-sm font-medium mb-3",children:"Choose Primary Color"}),m.jsx("div",{className:"grid grid-cols-4 gap-2 mb-4",children:tu.map(f=>m.jsx("button",{className:"w-8 h-8 rounded border-2 border-border hover:scale-110 transition-transform",style:{backgroundColor:f},onClick:()=>c(f)},f))})]}),m.jsxs("div",{children:[m.jsx("h4",{className:"text-sm font-medium mb-3",children:"Custom Color"}),m.jsxs("div",{className:"space-y-3",children:[m.jsx(ql,{color:n,onChange:i,style:{width:"100%",height:"150px"}}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("input",{type:"text",value:n,onChange:f=>s(f.target.value),className:"flex-1 px-2 py-1 text-sm border rounded bg-background",placeholder:"#3B82F6"}),m.jsx(Oe,{size:"sm",onClick:()=>c(n),children:"Apply"})]})]})]})]})})})]})]})}function au(e){const t=parseInt(e.slice(1,3),16)/255,r=parseInt(e.slice(3,5),16)/255,a=parseInt(e.slice(5,7),16)/255,n=Math.max(t,r,a),s=Math.min(t,r,a);let i,c,o=(n+s)/2;if(n===s)i=c=0;else{const f=n-s;switch(c=o>.5?f/(2-n-s):f/(n+s),n){case t:i=(r-a)/f+(r<a?6:0);break;case r:i=(a-t)/f+2;break;case a:i=(t-r)/f+4;break;default:i=0}i/=6}return`${Math.round(i*360)} ${Math.round(c*100)}% ${Math.round(o*100)}%`}/*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */var Bn={};Bn.version="0.18.5";var y0=1252,nu=[874,932,936,949,950,1250,1251,1252,1253,1254,1255,1256,1257,1258,1e4],Hs={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969},Vs=function(e){nu.indexOf(e)!=-1&&(y0=Hs[0]=e)};function su(){Vs(1252)}var wt=function(e){Vs(e)};function zs(){wt(1200),su()}function E0(e){for(var t=[],r=0,a=e.length;r<a;++r)t[r]=e.charCodeAt(r);return t}function iu(e){for(var t=[],r=0;r<e.length>>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r)+(e.charCodeAt(2*r+1)<<8));return t.join("")}function T0(e){for(var t=[],r=0;r<e.length>>1;++r)t[r]=String.fromCharCode(e.charCodeAt(2*r+1)+(e.charCodeAt(2*r)<<8));return t.join("")}var Ya=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1);return t==255&&r==254?iu(e.slice(2)):t==254&&r==255?T0(e.slice(2)):t==65279?e.slice(1):e},jn=function(t){return String.fromCharCode(t)},S0=function(t){return String.fromCharCode(t)},Wt,Ht="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function qa(e){for(var t="",r=0,a=0,n=0,s=0,i=0,c=0,o=0,f=0;f<e.length;)r=e.charCodeAt(f++),s=r>>2,a=e.charCodeAt(f++),i=(r&3)<<4|a>>4,n=e.charCodeAt(f++),c=(a&15)<<2|n>>6,o=n&63,isNaN(a)?c=o=64:isNaN(n)&&(o=64),t+=Ht.charAt(s)+Ht.charAt(i)+Ht.charAt(c)+Ht.charAt(o);return t}function nt(e){var t="",r=0,a=0,n=0,s=0,i=0,c=0,o=0;e=e.replace(/[^\w\+\/\=]/g,"");for(var f=0;f<e.length;)s=Ht.indexOf(e.charAt(f++)),i=Ht.indexOf(e.charAt(f++)),r=s<<2|i>>4,t+=String.fromCharCode(r),c=Ht.indexOf(e.charAt(f++)),a=(i&15)<<4|c>>2,c!==64&&(t+=String.fromCharCode(a)),o=Ht.indexOf(e.charAt(f++)),n=(c&3)<<6|o,o!==64&&(t+=String.fromCharCode(n));return t}var Ve=function(){return typeof Buffer<"u"&&typeof process<"u"&&typeof process.versions<"u"&&!!process.versions.node}(),Ot=function(){if(typeof Buffer<"u"){var e=!Buffer.from;if(!e)try{Buffer.from("foo","utf8")}catch{e=!0}return e?function(t,r){return r?new Buffer(t,r):new Buffer(t)}:Buffer.from.bind(Buffer)}return function(){}}();function Vt(e){return Ve?Buffer.alloc?Buffer.alloc(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}function F0(e){return Ve?Buffer.allocUnsafe?Buffer.allocUnsafe(e):new Buffer(e):typeof Uint8Array<"u"?new Uint8Array(e):new Array(e)}var st=function(t){return Ve?Ot(t,"binary"):t.split("").map(function(r){return r.charCodeAt(0)&255})};function Un(e){if(typeof ArrayBuffer>"u")return st(e);for(var t=new ArrayBuffer(e.length),r=new Uint8Array(t),a=0;a!=e.length;++a)r[a]=e.charCodeAt(a)&255;return t}function zt(e){if(Array.isArray(e))return e.map(function(a){return String.fromCharCode(a)}).join("");for(var t=[],r=0;r<e.length;++r)t[r]=String.fromCharCode(e[r]);return t.join("")}function cu(e){if(typeof Uint8Array>"u")throw new Error("Unsupported");return new Uint8Array(e)}function Gs(e){if(typeof ArrayBuffer>"u")throw new Error("Unsupported");if(e instanceof ArrayBuffer)return Gs(new Uint8Array(e));for(var t=new Array(e.length),r=0;r<e.length;++r)t[r]=e[r];return t}var Or=Ve?function(e){return Buffer.concat(e.map(function(t){return Buffer.isBuffer(t)?t:Ot(t)}))}:function(e){if(typeof Uint8Array<"u"){var t=0,r=0;for(t=0;t<e.length;++t)r+=e[t].length;var a=new Uint8Array(r),n=0;for(t=0,r=0;t<e.length;r+=n,++t)if(n=e[t].length,e[t]instanceof Uint8Array)a.set(e[t],r);else{if(typeof e[t]=="string")throw"wtf";a.set(new Uint8Array(e[t]),r)}return a}return[].concat.apply([],e.map(function(s){return Array.isArray(s)?s:[].slice.call(s)}))};function ou(e){for(var t=[],r=0,a=e.length+250,n=Vt(e.length+255),s=0;s<e.length;++s){var i=e.charCodeAt(s);if(i<128)n[r++]=i;else if(i<2048)n[r++]=192|i>>6&31,n[r++]=128|i&63;else if(i>=55296&&i<57344){i=(i&1023)+64;var c=e.charCodeAt(++s)&1023;n[r++]=240|i>>8&7,n[r++]=128|i>>2&63,n[r++]=128|c>>6&15|(i&3)<<4,n[r++]=128|c&63}else n[r++]=224|i>>12&15,n[r++]=128|i>>6&63,n[r++]=128|i&63;r>a&&(t.push(n.slice(0,r)),r=0,n=Vt(65535),a=65530)}return t.push(n.slice(0,r)),Or(t)}var Jr=/\u0000/g,Ja=/[\u0001-\u0006]/g;function Fa(e){for(var t="",r=e.length-1;r>=0;)t+=e.charAt(r--);return t}function kt(e,t){var r=""+e;return r.length>=t?r:vr("0",t-r.length)+r}function Xs(e,t){var r=""+e;return r.length>=t?r:vr(" ",t-r.length)+r}function Wn(e,t){var r=""+e;return r.length>=t?r:r+vr(" ",t-r.length)}function fu(e,t){var r=""+Math.round(e);return r.length>=t?r:vr("0",t-r.length)+r}function lu(e,t){var r=""+e;return r.length>=t?r:vr("0",t-r.length)+r}var b0=Math.pow(2,32);function ba(e,t){if(e>b0||e<-b0)return fu(e,t);var r=Math.round(e);return lu(r,t)}function Hn(e,t){return t=t||0,e.length>=7+t&&(e.charCodeAt(t)|32)===103&&(e.charCodeAt(t+1)|32)===101&&(e.charCodeAt(t+2)|32)===110&&(e.charCodeAt(t+3)|32)===101&&(e.charCodeAt(t+4)|32)===114&&(e.charCodeAt(t+5)|32)===97&&(e.charCodeAt(t+6)|32)===108}var A0=[["Sun","Sunday"],["Mon","Monday"],["Tue","Tuesday"],["Wed","Wednesday"],["Thu","Thursday"],["Fri","Friday"],["Sat","Saturday"]],$s=[["J","Jan","January"],["F","Feb","February"],["M","Mar","March"],["A","Apr","April"],["M","May","May"],["J","Jun","June"],["J","Jul","July"],["A","Aug","August"],["S","Sep","September"],["O","Oct","October"],["N","Nov","November"],["D","Dec","December"]];function uu(e){return e||(e={}),e[0]="General",e[1]="0",e[2]="0.00",e[3]="#,##0",e[4]="#,##0.00",e[9]="0%",e[10]="0.00%",e[11]="0.00E+00",e[12]="# ?/?",e[13]="# ??/??",e[14]="m/d/yy",e[15]="d-mmm-yy",e[16]="d-mmm",e[17]="mmm-yy",e[18]="h:mm AM/PM",e[19]="h:mm:ss AM/PM",e[20]="h:mm",e[21]="h:mm:ss",e[22]="m/d/yy h:mm",e[37]="#,##0 ;(#,##0)",e[38]="#,##0 ;[Red](#,##0)",e[39]="#,##0.00;(#,##0.00)",e[40]="#,##0.00;[Red](#,##0.00)",e[45]="mm:ss",e[46]="[h]:mm:ss",e[47]="mmss.0",e[48]="##0.0E+0",e[49]="@",e[56]='"上午/下午 "hh"時"mm"分"ss"秒 "',e}var De={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@",56:'"上午/下午 "hh"時"mm"分"ss"秒 "'},C0={5:37,6:38,7:39,8:40,23:0,24:0,25:0,26:0,27:14,28:14,29:14,30:14,31:14,50:14,51:14,52:14,53:14,54:14,55:14,56:14,57:14,58:14,59:1,60:2,61:3,62:4,67:9,68:10,69:12,70:13,71:14,72:14,73:15,74:16,75:17,76:20,77:21,78:22,79:45,80:46,81:47,82:0},hu={5:'"$"#,##0_);\\("$"#,##0\\)',63:'"$"#,##0_);\\("$"#,##0\\)',6:'"$"#,##0_);[Red]\\("$"#,##0\\)',64:'"$"#,##0_);[Red]\\("$"#,##0\\)',7:'"$"#,##0.00_);\\("$"#,##0.00\\)',65:'"$"#,##0.00_);\\("$"#,##0.00\\)',8:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',66:'"$"#,##0.00_);[Red]\\("$"#,##0.00\\)',41:'_(* #,##0_);_(* \\(#,##0\\);_(* "-"_);_(@_)',42:'_("$"* #,##0_);_("$"* \\(#,##0\\);_("$"* "-"_);_(@_)',43:'_(* #,##0.00_);_(* \\(#,##0.00\\);_(* "-"??_);_(@_)',44:'_("$"* #,##0.00_);_("$"* \\(#,##0.00\\);_("$"* "-"??_);_(@_)'};function Vn(e,t,r){for(var a=e<0?-1:1,n=e*a,s=0,i=1,c=0,o=1,f=0,l=0,u=Math.floor(n);f<t&&(u=Math.floor(n),c=u*i+s,l=u*f+o,!(n-u<5e-8));)n=1/(n-u),s=i,i=c,o=f,f=l;if(l>t&&(f>t?(l=o,c=s):(l=f,c=i)),!r)return[0,a*c,l];var d=Math.floor(a*c/l);return[d,a*c-d*l,l]}function sa(e,t,r){if(e>2958465||e<0)return null;var a=e|0,n=Math.floor(86400*(e-a)),s=0,i=[],c={D:a,T:n,u:86400*(e-a)-n,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(c.u)<1e-6&&(c.u=0),t&&t.date1904&&(a+=1462),c.u>.9999&&(c.u=0,++n==86400&&(c.T=n=0,++a,++c.D)),a===60)i=r?[1317,10,29]:[1900,2,29],s=3;else if(a===0)i=r?[1317,8,29]:[1900,1,0],s=6;else{a>60&&--a;var o=new Date(1900,0,1);o.setDate(o.getDate()+a-1),i=[o.getFullYear(),o.getMonth()+1,o.getDate()],s=o.getDay(),a<60&&(s=(s+6)%7),r&&(s=gu(o,i))}return c.y=i[0],c.m=i[1],c.d=i[2],c.S=n%60,n=Math.floor(n/60),c.M=n%60,n=Math.floor(n/60),c.H=n,c.q=s,c}var N0=new Date(1899,11,31,0,0,0),du=N0.getTime(),xu=new Date(1900,2,1,0,0,0);function D0(e,t){var r=e.getTime();return t?r-=1461*24*60*60*1e3:e>=xu&&(r+=24*60*60*1e3),(r-(du+(e.getTimezoneOffset()-N0.getTimezoneOffset())*6e4))/(24*60*60*1e3)}function Ks(e){return e.indexOf(".")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)$/,"$1")}function pu(e){return e.indexOf("E")==-1?e:e.replace(/(?:\.0*|(\.\d*[1-9])0+)[Ee]/,"$1E").replace(/(E[+-])(\d)$/,"$10$2")}function mu(e){var t=e<0?12:11,r=Ks(e.toFixed(12));return r.length<=t||(r=e.toPrecision(10),r.length<=t)?r:e.toExponential(5)}function vu(e){var t=Ks(e.toFixed(11));return t.length>(e<0?12:11)||t==="0"||t==="-0"?e.toPrecision(6):t}function Za(e){var t=Math.floor(Math.log(Math.abs(e))*Math.LOG10E),r;return t>=-4&&t<=-1?r=e.toPrecision(10+t):Math.abs(t)<=9?r=mu(e):t===10?r=e.toFixed(10).substr(0,12):r=vu(e),Ks(pu(r.toUpperCase()))}function ia(e,t){switch(typeof e){case"string":return e;case"boolean":return e?"TRUE":"FALSE";case"number":return(e|0)===e?e.toString(10):Za(e);case"undefined":return"";case"object":if(e==null)return"";if(e instanceof Date)return lt(14,D0(e,t&&t.date1904),t)}throw new Error("unsupported value in General format: "+e)}function gu(e,t){t[0]-=581;var r=e.getDay();return e<60&&(r=(r+6)%7),r}function _u(e,t,r,a){var n="",s=0,i=0,c=r.y,o,f=0;switch(e){case 98:c=r.y+543;case 121:switch(t.length){case 1:case 2:o=c%100,f=2;break;default:o=c%1e4,f=4;break}break;case 109:switch(t.length){case 1:case 2:o=r.m,f=t.length;break;case 3:return $s[r.m-1][1];case 5:return $s[r.m-1][0];default:return $s[r.m-1][2]}break;case 100:switch(t.length){case 1:case 2:o=r.d,f=t.length;break;case 3:return A0[r.q][0];default:return A0[r.q][1]}break;case 104:switch(t.length){case 1:case 2:o=1+(r.H+11)%12,f=t.length;break;default:throw"bad hour format: "+t}break;case 72:switch(t.length){case 1:case 2:o=r.H,f=t.length;break;default:throw"bad hour format: "+t}break;case 77:switch(t.length){case 1:case 2:o=r.M,f=t.length;break;default:throw"bad minute format: "+t}break;case 115:if(t!="s"&&t!="ss"&&t!=".0"&&t!=".00"&&t!=".000")throw"bad second format: "+t;return r.u===0&&(t=="s"||t=="ss")?kt(r.S,t.length):(a>=2?i=a===3?1e3:100:i=a===1?10:1,s=Math.round(i*(r.S+r.u)),s>=60*i&&(s=0),t==="s"?s===0?"0":""+s/i:(n=kt(s,2+a),t==="ss"?n.substr(0,2):"."+n.substr(2,t.length-1)));case 90:switch(t){case"[h]":case"[hh]":o=r.D*24+r.H;break;case"[m]":case"[mm]":o=(r.D*24+r.H)*60+r.M;break;case"[s]":case"[ss]":o=((r.D*24+r.H)*60+r.M)*60+Math.round(r.S+r.u);break;default:throw"bad abstime format: "+t}f=t.length===3?1:2;break;case 101:o=c,f=1;break}var l=f>0?kt(o,f):"";return l}function Gt(e){var t=3;if(e.length<=t)return e;for(var r=e.length%t,a=e.substr(0,r);r!=e.length;r+=t)a+=(a.length>0?",":"")+e.substr(r,t);return a}var O0=/%/g;function wu(e,t,r){var a=t.replace(O0,""),n=t.length-a.length;return Rt(e,a,r*Math.pow(10,2*n))+vr("%",n)}function ku(e,t,r){for(var a=t.length-1;t.charCodeAt(a-1)===44;)--a;return Rt(e,t.substr(0,a),r/Math.pow(10,3*(t.length-a)))}function R0(e,t){var r,a=e.indexOf("E")-e.indexOf(".")-1;if(e.match(/^#+0.0E\+0$/)){if(t==0)return"0.0E+0";if(t<0)return"-"+R0(e,-t);var n=e.indexOf(".");n===-1&&(n=e.indexOf("E"));var s=Math.floor(Math.log(t)*Math.LOG10E)%n;if(s<0&&(s+=n),r=(t/Math.pow(10,s)).toPrecision(a+1+(n+s)%n),r.indexOf("e")===-1){var i=Math.floor(Math.log(t)*Math.LOG10E);for(r.indexOf(".")===-1?r=r.charAt(0)+"."+r.substr(1)+"E+"+(i-r.length+s):r+="E+"+(i-s);r.substr(0,2)==="0.";)r=r.charAt(0)+r.substr(2,n)+"."+r.substr(2+n),r=r.replace(/^0+([1-9])/,"$1").replace(/^0+\./,"0.");r=r.replace(/\+-/,"-")}r=r.replace(/^([+-]?)(\d*)\.(\d*)[Ee]/,function(c,o,f,l){return o+f+l.substr(0,(n+s)%n)+"."+l.substr(s)+"E"})}else r=t.toExponential(a);return e.match(/E\+00$/)&&r.match(/e[+-]\d$/)&&(r=r.substr(0,r.length-1)+"0"+r.charAt(r.length-1)),e.match(/E\-/)&&r.match(/e\+/)&&(r=r.replace(/e\+/,"e")),r.replace("e","E")}var I0=/# (\?+)( ?)\/( ?)(\d+)/;function yu(e,t,r){var a=parseInt(e[4],10),n=Math.round(t*a),s=Math.floor(n/a),i=n-s*a,c=a;return r+(s===0?"":""+s)+" "+(i===0?vr(" ",e[1].length+1+e[4].length):Xs(i,e[1].length)+e[2]+"/"+e[3]+kt(c,e[4].length))}function Eu(e,t,r){return r+(t===0?"":""+t)+vr(" ",e[1].length+2+e[4].length)}var P0=/^#*0*\.([0#]+)/,L0=/\).*[0#]/,M0=/\(###\) ###\\?-####/;function Zr(e){for(var t="",r,a=0;a!=e.length;++a)switch(r=e.charCodeAt(a)){case 35:break;case 63:t+=" ";break;case 48:t+="0";break;default:t+=String.fromCharCode(r)}return t}function B0(e,t){var r=Math.pow(10,t);return""+Math.round(e*r)/r}function j0(e,t){var r=e-Math.floor(e),a=Math.pow(10,t);return t<(""+Math.round(r*a)).length?0:Math.round(r*a)}function Tu(e,t){return t<(""+Math.round((e-Math.floor(e))*Math.pow(10,t))).length?1:0}function Su(e){return e<2147483647&&e>-2147483648?""+(e>=0?e|0:e-1|0):""+Math.floor(e)}function ft(e,t,r){if(e.charCodeAt(0)===40&&!t.match(L0)){var a=t.replace(/\( */,"").replace(/ \)/,"").replace(/\)/,"");return r>=0?ft("n",a,r):"("+ft("n",a,-r)+")"}if(t.charCodeAt(t.length-1)===44)return ku(e,t,r);if(t.indexOf("%")!==-1)return wu(e,t,r);if(t.indexOf("E")!==-1)return R0(t,r);if(t.charCodeAt(0)===36)return"$"+ft(e,t.substr(t.charAt(1)==" "?2:1),r);var n,s,i,c,o=Math.abs(r),f=r<0?"-":"";if(t.match(/^00+$/))return f+ba(o,t.length);if(t.match(/^[#?]+$/))return n=ba(r,0),n==="0"&&(n=""),n.length>t.length?n:Zr(t.substr(0,t.length-n.length))+n;if(s=t.match(I0))return yu(s,o,f);if(t.match(/^#+0+$/))return f+ba(o,t.length-t.indexOf("0"));if(s=t.match(P0))return n=B0(r,s[1].length).replace(/^([^\.]+)$/,"$1."+Zr(s[1])).replace(/\.$/,"."+Zr(s[1])).replace(/\.(\d*)$/,function(v,h){return"."+h+vr("0",Zr(s[1]).length-h.length)}),t.indexOf("0.")!==-1?n:n.replace(/^0\./,".");if(t=t.replace(/^#+([0.])/,"$1"),s=t.match(/^(0*)\.(#*)$/))return f+B0(o,s[2].length).replace(/\.(\d*[1-9])0*$/,".$1").replace(/^(-?\d*)$/,"$1.").replace(/^0\./,s[1].length?"0.":".");if(s=t.match(/^#{1,3},##0(\.?)$/))return f+Gt(ba(o,0));if(s=t.match(/^#,##0\.([#0]*0)$/))return r<0?"-"+ft(e,t,-r):Gt(""+(Math.floor(r)+Tu(r,s[1].length)))+"."+kt(j0(r,s[1].length),s[1].length);if(s=t.match(/^#,#*,#0/))return ft(e,t.replace(/^#,#*,/,""),r);if(s=t.match(/^([0#]+)(\\?-([0#]+))+$/))return n=Fa(ft(e,t.replace(/[\\-]/g,""),r)),i=0,Fa(Fa(t.replace(/\\/g,"")).replace(/[0#]/g,function(v){return i<n.length?n.charAt(i++):v==="0"?"0":""}));if(t.match(M0))return n=ft(e,"##########",r),"("+n.substr(0,3)+") "+n.substr(3,3)+"-"+n.substr(6);var l="";if(s=t.match(/^([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(s[4].length,7),c=Vn(o,Math.pow(10,i)-1,!1),n=""+f,l=Rt("n",s[1],c[1]),l.charAt(l.length-1)==" "&&(l=l.substr(0,l.length-1)+"0"),n+=l+s[2]+"/"+s[3],l=Wn(c[2],i),l.length<s[4].length&&(l=Zr(s[4].substr(s[4].length-l.length))+l),n+=l,n;if(s=t.match(/^# ([#0?]+)( ?)\/( ?)([#0?]+)/))return i=Math.min(Math.max(s[1].length,s[4].length),7),c=Vn(o,Math.pow(10,i)-1,!0),f+(c[0]||(c[1]?"":"0"))+" "+(c[1]?Xs(c[1],i)+s[2]+"/"+s[3]+Wn(c[2],i):vr(" ",2*i+1+s[2].length+s[3].length));if(s=t.match(/^[#0?]+$/))return n=ba(r,0),t.length<=n.length?n:Zr(t.substr(0,t.length-n.length))+n;if(s=t.match(/^([#0?]+)\.([#0]+)$/)){n=""+r.toFixed(Math.min(s[2].length,10)).replace(/([^0])0+$/,"$1"),i=n.indexOf(".");var u=t.indexOf(".")-i,d=t.length-n.length-u;return Zr(t.substr(0,u)+n+t.substr(t.length-d))}if(s=t.match(/^00,000\.([#0]*0)$/))return i=j0(r,s[1].length),r<0?"-"+ft(e,t,-r):Gt(Su(r)).replace(/^\d,\d{3}$/,"0$&").replace(/^\d*$/,function(v){return"00,"+(v.length<3?kt(0,3-v.length):"")+v})+"."+kt(i,s[1].length);switch(t){case"###,##0.00":return ft(e,"#,##0.00",r);case"###,###":case"##,###":case"#,###":var p=Gt(ba(o,0));return p!=="0"?f+p:"";case"###,###.00":return ft(e,"###,##0.00",r).replace(/^0\./,".");case