@accounter/client 0.0.7-alpha-20250929123127-151bca55c3133242e7a2a4c32c23770b625f0707 → 0.0.7-alpha-20250929125323-5355d31e5c7d8eda021cb18442e38a7a31c26501
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -664,7 +664,7 @@ Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}
|
|
|
664
664
|
|
|
665
665
|
`)}m.write("payload.value = newResult;"),m.write("return payload;");const x=m.compile();return(k,S)=>x(h,k,S)};let a;const o=aS,s=!SM.jitless,c=s&&T8e.value,u=t.catchall;let f;e._zod.parse=(h,m)=>{f??(f=r.value);const p=h.value;return o(p)?s&&c&&m?.async===!1&&m.jitless!==!0?(a||(a=i(t.shape)),h=a(h,m),u?P7e([],p,h,m,f,e):h):n(h,m):(h.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),h)}});function ibe(e,t,n,r){for(const a of e)if(a.issues.length===0)return t.value=a.value,t;const i=e.filter(a=>!Sb(a));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(a=>a.issues.map(o=>Kh(o,r,Hc())))}),t)}const Sre=ut("$ZodUnion",(e,t)=>{Pr.init(e,t),di(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),di(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),di(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),di(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){const i=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${i.map(a=>P3(a.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1;const s=[];for(const l of t.options){const c=l._zod.run({value:i.value,issues:[]},a);if(c instanceof Promise)s.push(c),o=!0;else{if(c.issues.length===0)return c;s.push(c)}}return o?Promise.all(s).then(l=>ibe(l,i,e,a)):ibe(s,i,e,a)}}),$7e=ut("$ZodDiscriminatedUnion",(e,t)=>{Sre.init(e,t);const n=e._zod.parse;di(e._zod,"propValues",()=>{const i={};for(const a of t.options){const o=a._zod.propValues;if(!o||Object.keys(o).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(const[s,l]of Object.entries(o)){i[s]||(i[s]=new Set);for(const c of l)i[s].add(c)}}return i});const r=gD(()=>{const i=t.options,a=new Map;for(const o of i){const s=o._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const l of s){if(a.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);a.set(l,o)}}return a});e._zod.parse=(i,a)=>{const o=i.value;if(!aS(o))return i.issues.push({code:"invalid_type",expected:"object",input:o,inst:e}),i;const s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),L7e=ut("$ZodIntersection",(e,t)=>{Pr.init(e,t),e._zod.parse=(n,r)=>{const i=n.value,a=t.left._zod.run({value:i,issues:[]},r),o=t.right._zod.run({value:i,issues:[]},r);return a instanceof Promise||o instanceof Promise?Promise.all([a,o]).then(([l,c])=>abe(n,l,c)):abe(n,a,o)}});function JY(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(ux(e)&&ux(t)){const n=Object.keys(t),r=Object.keys(e).filter(a=>n.indexOf(a)!==-1),i={...e,...t};for(const a of r){const o=JY(e[a],t[a]);if(!o.valid)return{valid:!1,mergeErrorPath:[a,...o.mergeErrorPath]};i[a]=o.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const i=e[r],a=t[r],o=JY(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function abe(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),Sb(e))return e;const r=JY(t.value,n.value);if(!r.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);return e.value=r.data,e}const Cre=ut("$ZodTuple",(e,t)=>{Pr.init(e,t);const n=t.items,r=n.length-[...n].reverse().findIndex(i=>i._zod.optin!=="optional");e._zod.parse=(i,a)=>{const o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];const s=[];if(!t.rest){const c=o.length>n.length,u=o.length<r-1;if(c||u)return i.issues.push({...c?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},input:o,inst:e,origin:"array"}),i}let l=-1;for(const c of n){if(l++,l>=o.length&&l>=r)continue;const u=c._zod.run({value:o[l],issues:[]},a);u instanceof Promise?s.push(u.then(f=>D5(f,i,l))):D5(u,i,l)}if(t.rest){const c=o.slice(n.length);for(const u of c){l++;const f=t.rest._zod.run({value:u,issues:[]},a);f instanceof Promise?s.push(f.then(h=>D5(h,i,l))):D5(f,i,l)}}return s.length?Promise.all(s).then(()=>i):i}});function D5(e,t,n){e.issues.length&&t.issues.push(...Bh(n,e.issues)),t.value[n]=e.value}const U7e=ut("$ZodRecord",(e,t)=>{Pr.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!ux(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;const a=[];if(t.keyType._zod.values){const o=t.keyType._zod.values;n.value={};for(const l of o)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){const c=t.valueType._zod.run({value:i[l],issues:[]},r);c instanceof Promise?a.push(c.then(u=>{u.issues.length&&n.issues.push(...Bh(l,u.issues)),n.value[l]=u.value})):(c.issues.length&&n.issues.push(...Bh(l,c.issues)),n.value[l]=c.value)}let s;for(const l in i)o.has(l)||(s=s??[],s.push(l));s&&s.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:s})}else{n.value={};for(const o of Reflect.ownKeys(i)){if(o==="__proto__")continue;const s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(s.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(c=>Kh(c,r,Hc())),input:o,path:[o],inst:e}),n.value[s.value]=s.value;continue}const l=t.valueType._zod.run({value:i[o],issues:[]},r);l instanceof Promise?a.push(l.then(c=>{c.issues.length&&n.issues.push(...Bh(o,c.issues)),n.value[s.value]=c.value})):(l.issues.length&&n.issues.push(...Bh(o,l.issues)),n.value[s.value]=l.value)}}return a.length?Promise.all(a).then(()=>n):n}}),z7e=ut("$ZodMap",(e,t)=>{Pr.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!(i instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),n;const a=[];n.value=new Map;for(const[o,s]of i){const l=t.keyType._zod.run({value:o,issues:[]},r),c=t.valueType._zod.run({value:s,issues:[]},r);l instanceof Promise||c instanceof Promise?a.push(Promise.all([l,c]).then(([u,f])=>{obe(u,f,n,o,i,e,r)})):obe(l,c,n,o,i,e,r)}return a.length?Promise.all(a).then(()=>n):n}});function obe(e,t,n,r,i,a,o){e.issues.length&&(_M.has(typeof r)?n.issues.push(...Bh(r,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:i,inst:a,issues:e.issues.map(s=>Kh(s,o,Hc()))})),t.issues.length&&(_M.has(typeof r)?n.issues.push(...Bh(r,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:i,inst:a,key:r,issues:t.issues.map(s=>Kh(s,o,Hc()))})),n.value.set(e.value,t.value)}const H7e=ut("$ZodSet",(e,t)=>{Pr.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),n;const a=[];n.value=new Set;for(const o of i){const s=t.valueType._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(l=>sbe(l,n))):sbe(s,n)}return a.length?Promise.all(a).then(()=>n):n}});function sbe(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const V7e=ut("$ZodEnum",(e,t)=>{Pr.init(e,t);const n=rre(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(i=>_M.has(typeof i)).map(i=>typeof i=="string"?wy(i):i.toString()).join("|")})$`),e._zod.parse=(i,a)=>{const o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:n,input:o,inst:e}),i}}),Q7e=ut("$ZodLiteral",(e,t)=>{if(Pr.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?wy(n):n?wy(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,r)=>{const i=n.value;return e._zod.values.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}}),q7e=ut("$ZodFile",(e,t)=>{Pr.init(e,t),e._zod.parse=(n,r)=>{const i=n.value;return i instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),n}}),G7e=ut("$ZodTransform",(e,t)=>{Pr.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new j3(e.constructor.name);const i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(o=>(n.value=o,n));if(i instanceof Promise)throw new Qb;return n.value=i,n}});function lbe(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const W7e=ut("$ZodOptional",(e,t)=>{Pr.init(e,t),e._zod.optin="optional",e._zod.optout="optional",di(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),di(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${P3(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(a=>lbe(a,n.value)):lbe(i,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),K7e=ut("$ZodNullable",(e,t)=>{Pr.init(e,t),di(e._zod,"optin",()=>t.innerType._zod.optin),di(e._zod,"optout",()=>t.innerType._zod.optout),di(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${P3(n.source)}|null)$`):void 0}),di(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),Y7e=ut("$ZodDefault",(e,t)=>{Pr.init(e,t),e._zod.optin="optional",di(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(a=>cbe(a,t)):cbe(i,t)}});function cbe(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const X7e=ut("$ZodPrefault",(e,t)=>{Pr.init(e,t),e._zod.optin="optional",di(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),Z7e=ut("$ZodNonOptional",(e,t)=>{Pr.init(e,t),di(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(a=>ube(a,e)):ube(i,e)}});function ube(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const J7e=ut("$ZodSuccess",(e,t)=>{Pr.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new j3("ZodSuccess");const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(a=>(n.value=a.issues.length===0,n)):(n.value=i.issues.length===0,n)}}),eze=ut("$ZodCatch",(e,t)=>{Pr.init(e,t),di(e._zod,"optin",()=>t.innerType._zod.optin),di(e._zod,"optout",()=>t.innerType._zod.optout),di(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(a=>(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(o=>Kh(o,r,Hc()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(a=>Kh(a,r,Hc()))},input:n.value}),n.issues=[]),n)}}),tze=ut("$ZodNaN",(e,t)=>{Pr.init(e,t),e._zod.parse=(n,r)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),nze=ut("$ZodPipe",(e,t)=>{Pr.init(e,t),di(e._zod,"values",()=>t.in._zod.values),di(e._zod,"optin",()=>t.in._zod.optin),di(e._zod,"optout",()=>t.out._zod.optout),di(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const a=t.out._zod.run(n,r);return a instanceof Promise?a.then(o=>T5(o,t.in,r)):T5(a,t.in,r)}const i=t.in._zod.run(n,r);return i instanceof Promise?i.then(a=>T5(a,t.out,r)):T5(i,t.out,r)}});function T5(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const _re=ut("$ZodCodec",(e,t)=>{Pr.init(e,t),di(e._zod,"values",()=>t.in._zod.values),di(e._zod,"optin",()=>t.in._zod.optin),di(e._zod,"optout",()=>t.out._zod.optout),di(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if((r.direction||"forward")==="forward"){const a=t.in._zod.run(n,r);return a instanceof Promise?a.then(o=>O5(o,t,r)):O5(a,t,r)}else{const a=t.out._zod.run(n,r);return a instanceof Promise?a.then(o=>O5(o,t,r)):O5(a,t,r)}}});function O5(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){const i=t.transform(e.value,e);return i instanceof Promise?i.then(a=>B5(e,a,t.out,n)):B5(e,i,t.out,n)}else{const i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(a=>B5(e,a,t.in,n)):B5(e,i,t.in,n)}}function B5(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}const rze=ut("$ZodReadonly",(e,t)=>{Pr.init(e,t),di(e._zod,"propValues",()=>t.innerType._zod.propValues),di(e._zod,"values",()=>t.innerType._zod.values),di(e._zod,"optin",()=>t.innerType._zod.optin),di(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(dbe):dbe(i)}});function dbe(e){return e.value=Object.freeze(e.value),e}const ize=ut("$ZodTemplateLiteral",(e,t)=>{Pr.init(e,t);const n=[];for(const r of t.parts)if(typeof r=="object"&&r!==null){if(!r._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...r._zod.traits].shift()}`);const i=r._zod.pattern instanceof RegExp?r._zod.pattern.source:r._zod.pattern;if(!i)throw new Error(`Invalid template literal part: ${r._zod.traits}`);const a=i.startsWith("^")?1:0,o=i.endsWith("$")?i.length-1:i.length;n.push(i.slice(a,o))}else if(r===null||O8e.has(typeof r))n.push(wy(`${r}`));else throw new Error(`Invalid template literal part: ${r}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(r,i)=>typeof r.value!="string"?(r.issues.push({input:r.value,inst:e,expected:"template_literal",code:"invalid_type"}),r):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(r.value)||r.issues.push({input:r.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),r)}),aze=ut("$ZodFunction",(e,t)=>(Pr.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...r){const i=e._def.input?NM(e._def.input,r):r,a=Reflect.apply(n,this,i);return e._def.output?NM(e._def.output,a):a}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...r){const i=e._def.input?await EM(e._def.input,r):r,a=await Reflect.apply(n,this,i);return e._def.output?await EM(e._def.output,a):a}},e._zod.parse=(n,r)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{const r=e.constructor;return Array.isArray(n[0])?new r({type:"function",input:new Cre({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new r({type:"function",input:n[0],output:e._def.output})},e.output=n=>{const r=e.constructor;return new r({type:"function",input:e._def.input,output:n})},e)),oze=ut("$ZodPromise",(e,t)=>{Pr.init(e,t),e._zod.parse=(n,r)=>Promise.resolve(n.value).then(i=>t.innerType._zod.run({value:i,issues:[]},r))}),sze=ut("$ZodLazy",(e,t)=>{Pr.init(e,t),di(e._zod,"innerType",()=>t.getter()),di(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),di(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),di(e._zod,"optin",()=>e._zod.innerType._zod.optin??void 0),di(e._zod,"optout",()=>e._zod.innerType._zod.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),lze=ut("$ZodCustom",(e,t)=>{$o.init(e,t),Pr.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(a=>fbe(a,n,r,e));fbe(i,n,r,e)}});function fbe(e,t,n,r){if(!e){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(oS(i))}}const _3t=()=>{const e={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"};return i=>{switch(i.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${i.expected}، ولكن تم إدخال ${n(i.input)}`;case"invalid_value":return i.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${Er(i.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?` أكبر من اللازم: يفترض أن تكون ${i.origin??"القيمة"} ${a} ${i.maximum.toString()} ${o.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${i.origin??"القيمة"} ${a} ${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`أصغر من اللازم: يفترض لـ ${i.origin} أن يكون ${a} ${i.minimum.toString()} ${o.unit}`:`أصغر من اللازم: يفترض لـ ${i.origin} أن يكون ${a} ${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${i.prefix}"`:a.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${a.suffix}"`:a.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${a.includes}"`:a.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${a.pattern}`:`${r[a.format]??i.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${i.divisor}`;case"unrecognized_keys":return`معرف${i.keys.length>1?"ات":""} غريب${i.keys.length>1?"ة":""}: ${Jt(i.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${i.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${i.origin}`;default:return"مدخل غير مقبول"}}};function N3t(){return{localeError:_3t()}}const E3t=()=>{const e={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${i.expected}, daxil olan ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Yanlış dəyər: gözlənilən ${Er(i.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`Çox böyük: gözlənilən ${i.origin??"dəyər"} ${a}${i.maximum.toString()} ${o.unit??"element"}`:`Çox böyük: gözlənilən ${i.origin??"dəyər"} ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`Çox kiçik: gözlənilən ${i.origin} ${a}${i.minimum.toString()} ${o.unit}`:`Çox kiçik: gözlənilən ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Yanlış mətn: "${a.prefix}" ilə başlamalıdır`:a.format==="ends_with"?`Yanlış mətn: "${a.suffix}" ilə bitməlidir`:a.format==="includes"?`Yanlış mətn: "${a.includes}" daxil olmalıdır`:a.format==="regex"?`Yanlış mətn: ${a.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${r[a.format]??i.format}`}case"not_multiple_of":return`Yanlış ədəd: ${i.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${i.keys.length>1?"lar":""}: ${Jt(i.keys,", ")}`;case"invalid_key":return`${i.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${i.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function F3t(){return{localeError:E3t()}}function hbe(e,t,n,r){const i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}const D3t=()=>{const e={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"лік";case"object":{if(Array.isArray(i))return"масіў";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"};return i=>{switch(i.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${i.expected}, атрымана ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Няправільны ўвод: чакалася ${Er(i.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);if(o){const s=Number(i.maximum),l=hbe(s,o.unit.one,o.unit.few,o.unit.many);return`Занадта вялікі: чакалася, што ${i.origin??"значэнне"} павінна ${o.verb} ${a}${i.maximum.toString()} ${l}`}return`Занадта вялікі: чакалася, што ${i.origin??"значэнне"} павінна быць ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);if(o){const s=Number(i.minimum),l=hbe(s,o.unit.one,o.unit.few,o.unit.many);return`Занадта малы: чакалася, што ${i.origin} павінна ${o.verb} ${a}${i.minimum.toString()} ${l}`}return`Занадта малы: чакалася, што ${i.origin} павінна быць ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${a.prefix}"`:a.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${a.suffix}"`:a.format==="includes"?`Няправільны радок: павінен змяшчаць "${a.includes}"`:a.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${a.pattern}`:`Няправільны ${r[a.format]??i.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${i.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${i.keys.length>1?"ключы":"ключ"}: ${Jt(i.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${i.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${i.origin}`;default:return"Няправільны ўвод"}}};function T3t(){return{localeError:D3t()}}const O3t=()=>{const e={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return i=>{switch(i.code){case"invalid_type":return`Tipus invàlid: s'esperava ${i.expected}, s'ha rebut ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Valor invàlid: s'esperava ${Er(i.values[0])}`:`Opció invàlida: s'esperava una de ${Jt(i.values," o ")}`;case"too_big":{const a=i.inclusive?"com a màxim":"menys de",o=t(i.origin);return o?`Massa gran: s'esperava que ${i.origin??"el valor"} contingués ${a} ${i.maximum.toString()} ${o.unit??"elements"}`:`Massa gran: s'esperava que ${i.origin??"el valor"} fos ${a} ${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?"com a mínim":"més de",o=t(i.origin);return o?`Massa petit: s'esperava que ${i.origin} contingués ${a} ${i.minimum.toString()} ${o.unit}`:`Massa petit: s'esperava que ${i.origin} fos ${a} ${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Format invàlid: ha de començar amb "${a.prefix}"`:a.format==="ends_with"?`Format invàlid: ha d'acabar amb "${a.suffix}"`:a.format==="includes"?`Format invàlid: ha d'incloure "${a.includes}"`:a.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${a.pattern}`:`Format invàlid per a ${r[a.format]??i.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${i.divisor}`;case"unrecognized_keys":return`Clau${i.keys.length>1?"s":""} no reconeguda${i.keys.length>1?"s":""}: ${Jt(i.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${i.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${i.origin}`;default:return"Entrada invàlida"}}};function B3t(){return{localeError:O3t()}}const I3t=()=>{const e={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"číslo";case"string":return"řetězec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(i))return"pole";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"};return i=>{switch(i.code){case"invalid_type":return`Neplatný vstup: očekáváno ${i.expected}, obdrženo ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Neplatný vstup: očekáváno ${Er(i.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`Hodnota je příliš velká: ${i.origin??"hodnota"} musí mít ${a}${i.maximum.toString()} ${o.unit??"prvků"}`:`Hodnota je příliš velká: ${i.origin??"hodnota"} musí být ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`Hodnota je příliš malá: ${i.origin??"hodnota"} musí mít ${a}${i.minimum.toString()} ${o.unit??"prvků"}`:`Hodnota je příliš malá: ${i.origin??"hodnota"} musí být ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Neplatný řetězec: musí začínat na "${a.prefix}"`:a.format==="ends_with"?`Neplatný řetězec: musí končit na "${a.suffix}"`:a.format==="includes"?`Neplatný řetězec: musí obsahovat "${a.includes}"`:a.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${a.pattern}`:`Neplatný formát ${r[a.format]??i.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${i.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${Jt(i.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${i.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${i.origin}`;default:return"Neplatný vstup"}}};function j3t(){return{localeError:I3t()}}const P3t=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},t={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};function n(o){return e[o]??null}function r(o){return t[o]??o}const i=o=>{const s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"tal";case"object":return Array.isArray(o)?"liste":o===null?"null":Object.getPrototypeOf(o)!==Object.prototype&&o.constructor?o.constructor.name:"objekt"}return s},a={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return o=>{switch(o.code){case"invalid_type":return`Ugyldigt input: forventede ${r(o.expected)}, fik ${r(i(o.input))}`;case"invalid_value":return o.values.length===1?`Ugyldig værdi: forventede ${Er(o.values[0])}`:`Ugyldigt valg: forventede en af følgende ${Jt(o.values,"|")}`;case"too_big":{const s=o.inclusive?"<=":"<",l=n(o.origin),c=r(o.origin);return l?`For stor: forventede ${c??"value"} ${l.verb} ${s} ${o.maximum.toString()} ${l.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${s} ${o.maximum.toString()}`}case"too_small":{const s=o.inclusive?">=":">",l=n(o.origin),c=r(o.origin);return l?`For lille: forventede ${c} ${l.verb} ${s} ${o.minimum.toString()} ${l.unit}`:`For lille: forventede ${c} havde ${s} ${o.minimum.toString()}`}case"invalid_format":{const s=o;return s.format==="starts_with"?`Ugyldig streng: skal starte med "${s.prefix}"`:s.format==="ends_with"?`Ugyldig streng: skal ende med "${s.suffix}"`:s.format==="includes"?`Ugyldig streng: skal indeholde "${s.includes}"`:s.format==="regex"?`Ugyldig streng: skal matche mønsteret ${s.pattern}`:`Ugyldig ${a[s.format]??o.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${o.divisor}`;case"unrecognized_keys":return`${o.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${Jt(o.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${o.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${o.origin}`;default:return"Ugyldigt input"}}};function M3t(){return{localeError:P3t()}}const R3t=()=>{const e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"Zahl";case"object":{if(Array.isArray(i))return"Array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"};return i=>{switch(i.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${i.expected}, erhalten ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Ungültige Eingabe: erwartet ${Er(i.values[0])}`:`Ungültige Option: erwartet eine von ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`Zu groß: erwartet, dass ${i.origin??"Wert"} ${a}${i.maximum.toString()} ${o.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${i.origin??"Wert"} ${a}${i.maximum.toString()} ist`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`Zu klein: erwartet, dass ${i.origin} ${a}${i.minimum.toString()} ${o.unit} hat`:`Zu klein: erwartet, dass ${i.origin} ${a}${i.minimum.toString()} ist`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Ungültiger String: muss mit "${a.prefix}" beginnen`:a.format==="ends_with"?`Ungültiger String: muss mit "${a.suffix}" enden`:a.format==="includes"?`Ungültiger String: muss "${a.includes}" enthalten`:a.format==="regex"?`Ungültiger String: muss dem Muster ${a.pattern} entsprechen`:`Ungültig: ${r[a.format]??i.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${i.divisor} sein`;case"unrecognized_keys":return`${i.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${Jt(i.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${i.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${i.origin}`;default:return"Ungültige Eingabe"}}};function $3t(){return{localeError:R3t()}}const L3t=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},U3t=()=>{const e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function t(r){return e[r]??null}const n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"};return r=>{switch(r.code){case"invalid_type":return`Invalid input: expected ${r.expected}, received ${L3t(r.input)}`;case"invalid_value":return r.values.length===1?`Invalid input: expected ${Er(r.values[0])}`:`Invalid option: expected one of ${Jt(r.values,"|")}`;case"too_big":{const i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Too big: expected ${r.origin??"value"} to have ${i}${r.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${i}${r.maximum.toString()}`}case"too_small":{const i=r.inclusive?">=":">",a=t(r.origin);return a?`Too small: expected ${r.origin} to have ${i}${r.minimum.toString()} ${a.unit}`:`Too small: expected ${r.origin} to be ${i}${r.minimum.toString()}`}case"invalid_format":{const i=r;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${n[i.format]??r.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${r.divisor}`;case"unrecognized_keys":return`Unrecognized key${r.keys.length>1?"s":""}: ${Jt(r.keys,", ")}`;case"invalid_key":return`Invalid key in ${r.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function cze(){return{localeError:U3t()}}const z3t=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombro";case"object":{if(Array.isArray(e))return"tabelo";if(e===null)return"senvalora";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},H3t=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}const n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"};return r=>{switch(r.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${r.expected}, riceviĝis ${z3t(r.input)}`;case"invalid_value":return r.values.length===1?`Nevalida enigo: atendiĝis ${Er(r.values[0])}`:`Nevalida opcio: atendiĝis unu el ${Jt(r.values,"|")}`;case"too_big":{const i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Tro granda: atendiĝis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()}`}case"too_small":{const i=r.inclusive?">=":">",a=t(r.origin);return a?`Tro malgranda: atendiĝis ke ${r.origin} havu ${i}${r.minimum.toString()} ${a.unit}`:`Tro malgranda: atendiĝis ke ${r.origin} estu ${i}${r.minimum.toString()}`}case"invalid_format":{const i=r;return i.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${n[i.format]??r.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${r.divisor}`;case"unrecognized_keys":return`Nekonata${r.keys.length>1?"j":""} ŝlosilo${r.keys.length>1?"j":""}: ${Jt(r.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${r.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${r.origin}`;default:return"Nevalida enigo"}}};function V3t(){return{localeError:H3t()}}const Q3t=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},t={string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};function n(o){return e[o]??null}function r(o){return t[o]??o}const i=o=>{const s=typeof o;switch(s){case"number":return Number.isNaN(o)?"NaN":"number";case"object":return Array.isArray(o)?"array":o===null?"null":Object.getPrototypeOf(o)!==Object.prototype?o.constructor.name:"object"}return s},a={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return o=>{switch(o.code){case"invalid_type":return`Entrada inválida: se esperaba ${r(o.expected)}, recibido ${r(i(o.input))}`;case"invalid_value":return o.values.length===1?`Entrada inválida: se esperaba ${Er(o.values[0])}`:`Opción inválida: se esperaba una de ${Jt(o.values,"|")}`;case"too_big":{const s=o.inclusive?"<=":"<",l=n(o.origin),c=r(o.origin);return l?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${s}${o.maximum.toString()} ${l.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${s}${o.maximum.toString()}`}case"too_small":{const s=o.inclusive?">=":">",l=n(o.origin),c=r(o.origin);return l?`Demasiado pequeño: se esperaba que ${c} tuviera ${s}${o.minimum.toString()} ${l.unit}`:`Demasiado pequeño: se esperaba que ${c} fuera ${s}${o.minimum.toString()}`}case"invalid_format":{const s=o;return s.format==="starts_with"?`Cadena inválida: debe comenzar con "${s.prefix}"`:s.format==="ends_with"?`Cadena inválida: debe terminar en "${s.suffix}"`:s.format==="includes"?`Cadena inválida: debe incluir "${s.includes}"`:s.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${s.pattern}`:`Inválido ${a[s.format]??o.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${o.divisor}`;case"unrecognized_keys":return`Llave${o.keys.length>1?"s":""} desconocida${o.keys.length>1?"s":""}: ${Jt(o.keys,", ")}`;case"invalid_key":return`Llave inválida en ${r(o.origin)}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${r(o.origin)}`;default:return"Entrada inválida"}}};function q3t(){return{localeError:Q3t()}}const G3t=()=>{const e={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"عدد";case"object":{if(Array.isArray(i))return"آرایه";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"};return i=>{switch(i.code){case"invalid_type":return`ورودی نامعتبر: میبایست ${i.expected} میبود، ${n(i.input)} دریافت شد`;case"invalid_value":return i.values.length===1?`ورودی نامعتبر: میبایست ${Er(i.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${Jt(i.values,"|")} میبود`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`خیلی بزرگ: ${i.origin??"مقدار"} باید ${a}${i.maximum.toString()} ${o.unit??"عنصر"} باشد`:`خیلی بزرگ: ${i.origin??"مقدار"} باید ${a}${i.maximum.toString()} باشد`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`خیلی کوچک: ${i.origin} باید ${a}${i.minimum.toString()} ${o.unit} باشد`:`خیلی کوچک: ${i.origin} باید ${a}${i.minimum.toString()} باشد`}case"invalid_format":{const a=i;return a.format==="starts_with"?`رشته نامعتبر: باید با "${a.prefix}" شروع شود`:a.format==="ends_with"?`رشته نامعتبر: باید با "${a.suffix}" تمام شود`:a.format==="includes"?`رشته نامعتبر: باید شامل "${a.includes}" باشد`:a.format==="regex"?`رشته نامعتبر: باید با الگوی ${a.pattern} مطابقت داشته باشد`:`${r[a.format]??i.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${i.divisor} باشد`;case"unrecognized_keys":return`کلید${i.keys.length>1?"های":""} ناشناس: ${Jt(i.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${i.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${i.origin}`;default:return"ورودی نامعتبر"}}};function W3t(){return{localeError:G3t()}}const K3t=()=>{const e={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"};return i=>{switch(i.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${i.expected}, oli ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Virheellinen syöte: täytyy olla ${Er(i.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`Liian suuri: ${o.subject} täytyy olla ${a}${i.maximum.toString()} ${o.unit}`.trim():`Liian suuri: arvon täytyy olla ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`Liian pieni: ${o.subject} täytyy olla ${a}${i.minimum.toString()} ${o.unit}`.trim():`Liian pieni: arvon täytyy olla ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${a.prefix}"`:a.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${a.suffix}"`:a.format==="includes"?`Virheellinen syöte: täytyy sisältää "${a.includes}"`:a.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${a.pattern}`:`Virheellinen ${r[a.format]??i.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${i.divisor} monikerta`;case"unrecognized_keys":return`${i.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${Jt(i.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function Y3t(){return{localeError:K3t()}}const X3t=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"nombre";case"object":{if(Array.isArray(i))return"tableau";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return i=>{switch(i.code){case"invalid_type":return`Entrée invalide : ${i.expected} attendu, ${n(i.input)} reçu`;case"invalid_value":return i.values.length===1?`Entrée invalide : ${Er(i.values[0])} attendu`:`Option invalide : une valeur parmi ${Jt(i.values,"|")} attendue`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`Trop grand : ${i.origin??"valeur"} doit ${o.verb} ${a}${i.maximum.toString()} ${o.unit??"élément(s)"}`:`Trop grand : ${i.origin??"valeur"} doit être ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`Trop petit : ${i.origin} doit ${o.verb} ${a}${i.minimum.toString()} ${o.unit}`:`Trop petit : ${i.origin} doit être ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Chaîne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Chaîne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Chaîne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${a.pattern}`:`${r[a.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${i.divisor}`;case"unrecognized_keys":return`Clé${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${Jt(i.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${i.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entrée invalide"}}};function Z3t(){return{localeError:X3t()}}const J3t=()=>{const e={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"};return i=>{switch(i.code){case"invalid_type":return`Entrée invalide : attendu ${i.expected}, reçu ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Entrée invalide : attendu ${Er(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"≤":"<",o=t(i.origin);return o?`Trop grand : attendu que ${i.origin??"la valeur"} ait ${a}${i.maximum.toString()} ${o.unit}`:`Trop grand : attendu que ${i.origin??"la valeur"} soit ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?"≥":">",o=t(i.origin);return o?`Trop petit : attendu que ${i.origin} ait ${a}${i.minimum.toString()} ${o.unit}`:`Trop petit : attendu que ${i.origin} soit ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Chaîne invalide : doit commencer par "${a.prefix}"`:a.format==="ends_with"?`Chaîne invalide : doit se terminer par "${a.suffix}"`:a.format==="includes"?`Chaîne invalide : doit inclure "${a.includes}"`:a.format==="regex"?`Chaîne invalide : doit correspondre au motif ${a.pattern}`:`${r[a.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${i.divisor}`;case"unrecognized_keys":return`Clé${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${Jt(i.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${i.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entrée invalide"}}};function eLt(){return{localeError:J3t()}}const tLt=()=>{const e={string:{unit:"אותיות",verb:"לכלול"},file:{unit:"בייטים",verb:"לכלול"},array:{unit:"פריטים",verb:"לכלול"},set:{unit:"פריטים",verb:"לכלול"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"קלט",email:"כתובת אימייל",url:"כתובת רשת",emoji:"אימוג'י",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"תאריך וזמן ISO",date:"תאריך ISO",time:"זמן ISO",duration:"משך זמן ISO",ipv4:"כתובת IPv4",ipv6:"כתובת IPv6",cidrv4:"טווח IPv4",cidrv6:"טווח IPv6",base64:"מחרוזת בבסיס 64",base64url:"מחרוזת בבסיס 64 לכתובות רשת",json_string:"מחרוזת JSON",e164:"מספר E.164",jwt:"JWT",template_literal:"קלט"};return i=>{switch(i.code){case"invalid_type":return`קלט לא תקין: צריך ${i.expected}, התקבל ${n(i.input)}`;case"invalid_value":return i.values.length===1?`קלט לא תקין: צריך ${Er(i.values[0])}`:`קלט לא תקין: צריך אחת מהאפשרויות ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`גדול מדי: ${i.origin??"value"} צריך להיות ${a}${i.maximum.toString()} ${o.unit??"elements"}`:`גדול מדי: ${i.origin??"value"} צריך להיות ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`קטן מדי: ${i.origin} צריך להיות ${a}${i.minimum.toString()} ${o.unit}`:`קטן מדי: ${i.origin} צריך להיות ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`מחרוזת לא תקינה: חייבת להתחיל ב"${a.prefix}"`:a.format==="ends_with"?`מחרוזת לא תקינה: חייבת להסתיים ב "${a.suffix}"`:a.format==="includes"?`מחרוזת לא תקינה: חייבת לכלול "${a.includes}"`:a.format==="regex"?`מחרוזת לא תקינה: חייבת להתאים לתבנית ${a.pattern}`:`${r[a.format]??i.format} לא תקין`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${i.divisor}`;case"unrecognized_keys":return`מפתח${i.keys.length>1?"ות":""} לא מזוה${i.keys.length>1?"ים":"ה"}: ${Jt(i.keys,", ")}`;case"invalid_key":return`מפתח לא תקין ב${i.origin}`;case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${i.origin}`;default:return"קלט לא תקין"}}};function nLt(){return{localeError:tLt()}}const rLt=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"szám";case"object":{if(Array.isArray(i))return"tömb";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"};return i=>{switch(i.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${i.expected}, a kapott érték ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Érvénytelen bemenet: a várt érték ${Er(i.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`Túl nagy: ${i.origin??"érték"} mérete túl nagy ${a}${i.maximum.toString()} ${o.unit??"elem"}`:`Túl nagy: a bemeneti érték ${i.origin??"érték"} túl nagy: ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`Túl kicsi: a bemeneti érték ${i.origin} mérete túl kicsi ${a}${i.minimum.toString()} ${o.unit}`:`Túl kicsi: a bemeneti érték ${i.origin} túl kicsi ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Érvénytelen string: "${a.prefix}" értékkel kell kezdődnie`:a.format==="ends_with"?`Érvénytelen string: "${a.suffix}" értékkel kell végződnie`:a.format==="includes"?`Érvénytelen string: "${a.includes}" értéket kell tartalmaznia`:a.format==="regex"?`Érvénytelen string: ${a.pattern} mintának kell megfelelnie`:`Érvénytelen ${r[a.format]??i.format}`}case"not_multiple_of":return`Érvénytelen szám: ${i.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${i.keys.length>1?"s":""}: ${Jt(i.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${i.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${i.origin}`;default:return"Érvénytelen bemenet"}}};function iLt(){return{localeError:rLt()}}const aLt=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input tidak valid: diharapkan ${i.expected}, diterima ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Input tidak valid: diharapkan ${Er(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`Terlalu besar: diharapkan ${i.origin??"value"} memiliki ${a}${i.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: diharapkan ${i.origin??"value"} menjadi ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`Terlalu kecil: diharapkan ${i.origin} memiliki ${a}${i.minimum.toString()} ${o.unit}`:`Terlalu kecil: diharapkan ${i.origin} menjadi ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`String tidak valid: harus dimulai dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak valid: harus berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak valid: harus menyertakan "${a.includes}"`:a.format==="regex"?`String tidak valid: harus sesuai pola ${a.pattern}`:`${r[a.format]??i.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${i.keys.length>1?"s":""}: ${Jt(i.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${i.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${i.origin}`;default:return"Input tidak valid"}}};function oLt(){return{localeError:aLt()}}const sLt=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"númer";case"object":{if(Array.isArray(e))return"fylki";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},lLt=()=>{const e={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function t(r){return e[r]??null}const n={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"};return r=>{switch(r.code){case"invalid_type":return`Rangt gildi: Þú slóst inn ${sLt(r.input)} þar sem á að vera ${r.expected}`;case"invalid_value":return r.values.length===1?`Rangt gildi: gert ráð fyrir ${Er(r.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${Jt(r.values,"|")}`;case"too_big":{const i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Of stórt: gert er ráð fyrir að ${r.origin??"gildi"} hafi ${i}${r.maximum.toString()} ${a.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${r.origin??"gildi"} sé ${i}${r.maximum.toString()}`}case"too_small":{const i=r.inclusive?">=":">",a=t(r.origin);return a?`Of lítið: gert er ráð fyrir að ${r.origin} hafi ${i}${r.minimum.toString()} ${a.unit}`:`Of lítið: gert er ráð fyrir að ${r.origin} sé ${i}${r.minimum.toString()}`}case"invalid_format":{const i=r;return i.format==="starts_with"?`Ógildur strengur: verður að byrja á "${i.prefix}"`:i.format==="ends_with"?`Ógildur strengur: verður að enda á "${i.suffix}"`:i.format==="includes"?`Ógildur strengur: verður að innihalda "${i.includes}"`:i.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${i.pattern}`:`Rangt ${n[i.format]??r.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${r.divisor}`;case"unrecognized_keys":return`Óþekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${Jt(r.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${r.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${r.origin}`;default:return"Rangt gildi"}}};function cLt(){return{localeError:lLt()}}const uLt=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"numero";case"object":{if(Array.isArray(i))return"vettore";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input non valido: atteso ${i.expected}, ricevuto ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Input non valido: atteso ${Er(i.values[0])}`:`Opzione non valida: atteso uno tra ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`Troppo grande: ${i.origin??"valore"} deve avere ${a}${i.maximum.toString()} ${o.unit??"elementi"}`:`Troppo grande: ${i.origin??"valore"} deve essere ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`Troppo piccolo: ${i.origin} deve avere ${a}${i.minimum.toString()} ${o.unit}`:`Troppo piccolo: ${i.origin} deve essere ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Stringa non valida: deve iniziare con "${a.prefix}"`:a.format==="ends_with"?`Stringa non valida: deve terminare con "${a.suffix}"`:a.format==="includes"?`Stringa non valida: deve includere "${a.includes}"`:a.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${a.pattern}`:`Invalid ${r[a.format]??i.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${i.divisor}`;case"unrecognized_keys":return`Chiav${i.keys.length>1?"i":"e"} non riconosciut${i.keys.length>1?"e":"a"}: ${Jt(i.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${i.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${i.origin}`;default:return"Input non valido"}}};function dLt(){return{localeError:uLt()}}const fLt=()=>{const e={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"数値";case"object":{if(Array.isArray(i))return"配列";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"};return i=>{switch(i.code){case"invalid_type":return`無効な入力: ${i.expected}が期待されましたが、${n(i.input)}が入力されました`;case"invalid_value":return i.values.length===1?`無効な入力: ${Er(i.values[0])}が期待されました`:`無効な選択: ${Jt(i.values,"、")}のいずれかである必要があります`;case"too_big":{const a=i.inclusive?"以下である":"より小さい",o=t(i.origin);return o?`大きすぎる値: ${i.origin??"値"}は${i.maximum.toString()}${o.unit??"要素"}${a}必要があります`:`大きすぎる値: ${i.origin??"値"}は${i.maximum.toString()}${a}必要があります`}case"too_small":{const a=i.inclusive?"以上である":"より大きい",o=t(i.origin);return o?`小さすぎる値: ${i.origin}は${i.minimum.toString()}${o.unit}${a}必要があります`:`小さすぎる値: ${i.origin}は${i.minimum.toString()}${a}必要があります`}case"invalid_format":{const a=i;return a.format==="starts_with"?`無効な文字列: "${a.prefix}"で始まる必要があります`:a.format==="ends_with"?`無効な文字列: "${a.suffix}"で終わる必要があります`:a.format==="includes"?`無効な文字列: "${a.includes}"を含む必要があります`:a.format==="regex"?`無効な文字列: パターン${a.pattern}に一致する必要があります`:`無効な${r[a.format]??i.format}`}case"not_multiple_of":return`無効な数値: ${i.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${i.keys.length>1?"群":""}: ${Jt(i.keys,"、")}`;case"invalid_key":return`${i.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${i.origin}内の無効な値`;default:return"無効な入力"}}};function hLt(){return{localeError:fLt()}}const mLt=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"რიცხვი";case"object":{if(Array.isArray(e))return"მასივი";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return{string:"სტრინგი",boolean:"ბულეანი",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"ფუნქცია"}[t]??t},pLt=()=>{const e={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function t(r){return e[r]??null}const n={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"};return r=>{switch(r.code){case"invalid_type":return`არასწორი შეყვანა: მოსალოდნელი ${r.expected}, მიღებული ${mLt(r.input)}`;case"invalid_value":return r.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${Er(r.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${Jt(r.values,"|")}-დან`;case"too_big":{const i=r.inclusive?"<=":"<",a=t(r.origin);return a?`ზედმეტად დიდი: მოსალოდნელი ${r.origin??"მნიშვნელობა"} ${a.verb} ${i}${r.maximum.toString()} ${a.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${r.origin??"მნიშვნელობა"} იყოს ${i}${r.maximum.toString()}`}case"too_small":{const i=r.inclusive?">=":">",a=t(r.origin);return a?`ზედმეტად პატარა: მოსალოდნელი ${r.origin} ${a.verb} ${i}${r.minimum.toString()} ${a.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${r.origin} იყოს ${i}${r.minimum.toString()}`}case"invalid_format":{const i=r;return i.format==="starts_with"?`არასწორი სტრინგი: უნდა იწყებოდეს "${i.prefix}"-ით`:i.format==="ends_with"?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${i.suffix}"-ით`:i.format==="includes"?`არასწორი სტრინგი: უნდა შეიცავდეს "${i.includes}"-ს`:i.format==="regex"?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${i.pattern}`:`არასწორი ${n[i.format]??r.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${r.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${r.keys.length>1?"ები":"ი"}: ${Jt(r.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${r.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${r.origin}-ში`;default:return"არასწორი შეყვანა"}}};function ALt(){return{localeError:pLt()}}const gLt=()=>{const e={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":{if(Array.isArray(i))return"អារេ (Array)";if(i===null)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"};return i=>{switch(i.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${i.expected} ប៉ុន្តែទទួលបាន ${n(i.input)}`;case"invalid_value":return i.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${Er(i.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`ធំពេក៖ ត្រូវការ ${i.origin??"តម្លៃ"} ${a} ${i.maximum.toString()} ${o.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${i.origin??"តម្លៃ"} ${a} ${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`តូចពេក៖ ត្រូវការ ${i.origin} ${a} ${i.minimum.toString()} ${o.unit}`:`តូចពេក៖ ត្រូវការ ${i.origin} ${a} ${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${a.prefix}"`:a.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${a.suffix}"`:a.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${a.includes}"`:a.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${a.pattern}`:`មិនត្រឹមត្រូវ៖ ${r[a.format]??i.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${i.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${Jt(i.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${i.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${i.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function uze(){return{localeError:gLt()}}function vLt(){return uze()}const yLt=()=>{const e={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"};return i=>{switch(i.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${i.expected}, 받은 타입은 ${n(i.input)}입니다`;case"invalid_value":return i.values.length===1?`잘못된 입력: 값은 ${Er(i.values[0])} 이어야 합니다`:`잘못된 옵션: ${Jt(i.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const a=i.inclusive?"이하":"미만",o=a==="미만"?"이어야 합니다":"여야 합니다",s=t(i.origin),l=s?.unit??"요소";return s?`${i.origin??"값"}이 너무 큽니다: ${i.maximum.toString()}${l} ${a}${o}`:`${i.origin??"값"}이 너무 큽니다: ${i.maximum.toString()} ${a}${o}`}case"too_small":{const a=i.inclusive?"이상":"초과",o=a==="이상"?"이어야 합니다":"여야 합니다",s=t(i.origin),l=s?.unit??"요소";return s?`${i.origin??"값"}이 너무 작습니다: ${i.minimum.toString()}${l} ${a}${o}`:`${i.origin??"값"}이 너무 작습니다: ${i.minimum.toString()} ${a}${o}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`잘못된 문자열: "${a.prefix}"(으)로 시작해야 합니다`:a.format==="ends_with"?`잘못된 문자열: "${a.suffix}"(으)로 끝나야 합니다`:a.format==="includes"?`잘못된 문자열: "${a.includes}"을(를) 포함해야 합니다`:a.format==="regex"?`잘못된 문자열: 정규식 ${a.pattern} 패턴과 일치해야 합니다`:`잘못된 ${r[a.format]??i.format}`}case"not_multiple_of":return`잘못된 숫자: ${i.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${Jt(i.keys,", ")}`;case"invalid_key":return`잘못된 키: ${i.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${i.origin}`;default:return"잘못된 입력"}}};function bLt(){return{localeError:yLt()}}const xLt=e=>zN(typeof e,e),zN=(e,t=void 0)=>{switch(e){case"number":return Number.isNaN(t)?"NaN":"skaičius";case"bigint":return"sveikasis skaičius";case"string":return"eilutė";case"boolean":return"loginė reikšmė";case"undefined":case"void":return"neapibrėžta reikšmė";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return t===void 0?"nežinomas objektas":t===null?"nulinė reikšmė":Array.isArray(t)?"masyvas":Object.getPrototypeOf(t)!==Object.prototype&&t.constructor?t.constructor.name:"objektas";case"null":return"nulinė reikšmė"}return e},Z_=e=>e.charAt(0).toUpperCase()+e.slice(1);function mbe(e){const t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?"many":n===1?"one":"few"}const wLt=()=>{const e={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function t(r,i,a,o){const s=e[r]??null;return s===null?s:{unit:s.unit[i],verb:s.verb[o][a?"inclusive":"notInclusive"]}}const n={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"};return r=>{switch(r.code){case"invalid_type":return`Gautas tipas ${xLt(r.input)}, o tikėtasi - ${zN(r.expected)}`;case"invalid_value":return r.values.length===1?`Privalo būti ${Er(r.values[0])}`:`Privalo būti vienas iš ${Jt(r.values,"|")} pasirinkimų`;case"too_big":{const i=zN(r.origin),a=t(r.origin,mbe(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${Z_(i??r.origin??"reikšmė")} ${a.verb} ${r.maximum.toString()} ${a.unit??"elementų"}`;const o=r.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Z_(i??r.origin??"reikšmė")} turi būti ${o} ${r.maximum.toString()} ${a?.unit}`}case"too_small":{const i=zN(r.origin),a=t(r.origin,mbe(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${Z_(i??r.origin??"reikšmė")} ${a.verb} ${r.minimum.toString()} ${a.unit??"elementų"}`;const o=r.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Z_(i??r.origin??"reikšmė")} turi būti ${o} ${r.minimum.toString()} ${a?.unit}`}case"invalid_format":{const i=r;return i.format==="starts_with"?`Eilutė privalo prasidėti "${i.prefix}"`:i.format==="ends_with"?`Eilutė privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilutė privalo įtraukti "${i.includes}"`:i.format==="regex"?`Eilutė privalo atitikti ${i.pattern}`:`Neteisingas ${n[i.format]??r.format}`}case"not_multiple_of":return`Skaičius privalo būti ${r.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${Jt(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{const i=zN(r.origin);return`${Z_(i??r.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function kLt(){return{localeError:wLt()}}const SLt=()=>{const e={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"број";case"object":{if(Array.isArray(i))return"низа";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"};return i=>{switch(i.code){case"invalid_type":return`Грешен внес: се очекува ${i.expected}, примено ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${Er(i.values[0])}`:`Грешана опција: се очекува една ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`Премногу голем: се очекува ${i.origin??"вредноста"} да има ${a}${i.maximum.toString()} ${o.unit??"елементи"}`:`Премногу голем: се очекува ${i.origin??"вредноста"} да биде ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`Премногу мал: се очекува ${i.origin} да има ${a}${i.minimum.toString()} ${o.unit}`:`Премногу мал: се очекува ${i.origin} да биде ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Неважечка низа: мора да започнува со "${a.prefix}"`:a.format==="ends_with"?`Неважечка низа: мора да завршува со "${a.suffix}"`:a.format==="includes"?`Неважечка низа: мора да вклучува "${a.includes}"`:a.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${a.pattern}`:`Invalid ${r[a.format]??i.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${Jt(i.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${i.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${i.origin}`;default:return"Грешен внес"}}};function CLt(){return{localeError:SLt()}}const _Lt=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"nombor";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Input tidak sah: dijangka ${i.expected}, diterima ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Input tidak sah: dijangka ${Er(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`Terlalu besar: dijangka ${i.origin??"nilai"} ${o.verb} ${a}${i.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: dijangka ${i.origin??"nilai"} adalah ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`Terlalu kecil: dijangka ${i.origin} ${o.verb} ${a}${i.minimum.toString()} ${o.unit}`:`Terlalu kecil: dijangka ${i.origin} adalah ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`String tidak sah: mesti bermula dengan "${a.prefix}"`:a.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${a.suffix}"`:a.format==="includes"?`String tidak sah: mesti mengandungi "${a.includes}"`:a.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${a.pattern}`:`${r[a.format]??i.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${Jt(i.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${i.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${i.origin}`;default:return"Input tidak sah"}}};function NLt(){return{localeError:_Lt()}}const ELt=()=>{const e={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"getal";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"};return i=>{switch(i.code){case"invalid_type":return`Ongeldige invoer: verwacht ${i.expected}, ontving ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Ongeldige invoer: verwacht ${Er(i.values[0])}`:`Ongeldige optie: verwacht één van ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`Te lang: verwacht dat ${i.origin??"waarde"} ${a}${i.maximum.toString()} ${o.unit??"elementen"} bevat`:`Te lang: verwacht dat ${i.origin??"waarde"} ${a}${i.maximum.toString()} is`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`Te kort: verwacht dat ${i.origin} ${a}${i.minimum.toString()} ${o.unit} bevat`:`Te kort: verwacht dat ${i.origin} ${a}${i.minimum.toString()} is`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Ongeldige tekst: moet met "${a.prefix}" beginnen`:a.format==="ends_with"?`Ongeldige tekst: moet op "${a.suffix}" eindigen`:a.format==="includes"?`Ongeldige tekst: moet "${a.includes}" bevatten`:a.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${a.pattern}`:`Ongeldig: ${r[a.format]??i.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${i.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${i.keys.length>1?"s":""}: ${Jt(i.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${i.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${i.origin}`;default:return"Ongeldige invoer"}}};function FLt(){return{localeError:ELt()}}const DLt=()=>{const e={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"tall";case"object":{if(Array.isArray(i))return"liste";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`Ugyldig input: forventet ${i.expected}, fikk ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Ugyldig verdi: forventet ${Er(i.values[0])}`:`Ugyldig valg: forventet en av ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`For stor(t): forventet ${i.origin??"value"} til å ha ${a}${i.maximum.toString()} ${o.unit??"elementer"}`:`For stor(t): forventet ${i.origin??"value"} til å ha ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`For lite(n): forventet ${i.origin} til å ha ${a}${i.minimum.toString()} ${o.unit}`:`For lite(n): forventet ${i.origin} til å ha ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Ugyldig streng: må starte med "${a.prefix}"`:a.format==="ends_with"?`Ugyldig streng: må ende med "${a.suffix}"`:a.format==="includes"?`Ugyldig streng: må inneholde "${a.includes}"`:a.format==="regex"?`Ugyldig streng: må matche mønsteret ${a.pattern}`:`Ugyldig ${r[a.format]??i.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${Jt(i.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${i.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${i.origin}`;default:return"Ugyldig input"}}};function TLt(){return{localeError:DLt()}}const OLt=()=>{const e={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"numara";case"object":{if(Array.isArray(i))return"saf";if(i===null)return"gayb";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"};return i=>{switch(i.code){case"invalid_type":return`Fâsit giren: umulan ${i.expected}, alınan ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Fâsit giren: umulan ${Er(i.values[0])}`:`Fâsit tercih: mûteberler ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`Fazla büyük: ${i.origin??"value"}, ${a}${i.maximum.toString()} ${o.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${i.origin??"value"}, ${a}${i.maximum.toString()} olmalıydı.`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`Fazla küçük: ${i.origin}, ${a}${i.minimum.toString()} ${o.unit} sahip olmalıydı.`:`Fazla küçük: ${i.origin}, ${a}${i.minimum.toString()} olmalıydı.`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Fâsit metin: "${a.prefix}" ile başlamalı.`:a.format==="ends_with"?`Fâsit metin: "${a.suffix}" ile bitmeli.`:a.format==="includes"?`Fâsit metin: "${a.includes}" ihtivâ etmeli.`:a.format==="regex"?`Fâsit metin: ${a.pattern} nakşına uymalı.`:`Fâsit ${r[a.format]??i.format}`}case"not_multiple_of":return`Fâsit sayı: ${i.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${i.keys.length>1?"s":""}: ${Jt(i.keys,", ")}`;case"invalid_key":return`${i.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${i.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function BLt(){return{localeError:OLt()}}const ILt=()=>{const e={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"عدد";case"object":{if(Array.isArray(i))return"ارې";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"};return i=>{switch(i.code){case"invalid_type":return`ناسم ورودي: باید ${i.expected} وای, مګر ${n(i.input)} ترلاسه شو`;case"invalid_value":return i.values.length===1?`ناسم ورودي: باید ${Er(i.values[0])} وای`:`ناسم انتخاب: باید یو له ${Jt(i.values,"|")} څخه وای`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`ډیر لوی: ${i.origin??"ارزښت"} باید ${a}${i.maximum.toString()} ${o.unit??"عنصرونه"} ولري`:`ډیر لوی: ${i.origin??"ارزښت"} باید ${a}${i.maximum.toString()} وي`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`ډیر کوچنی: ${i.origin} باید ${a}${i.minimum.toString()} ${o.unit} ولري`:`ډیر کوچنی: ${i.origin} باید ${a}${i.minimum.toString()} وي`}case"invalid_format":{const a=i;return a.format==="starts_with"?`ناسم متن: باید د "${a.prefix}" سره پیل شي`:a.format==="ends_with"?`ناسم متن: باید د "${a.suffix}" سره پای ته ورسيږي`:a.format==="includes"?`ناسم متن: باید "${a.includes}" ولري`:a.format==="regex"?`ناسم متن: باید د ${a.pattern} سره مطابقت ولري`:`${r[a.format]??i.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${i.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${i.keys.length>1?"کلیډونه":"کلیډ"}: ${Jt(i.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${i.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${i.origin} کې`;default:return"ناسمه ورودي"}}};function jLt(){return{localeError:ILt()}}const PLt=()=>{const e={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"liczba";case"object":{if(Array.isArray(i))return"tablica";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"};return i=>{switch(i.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${i.expected}, otrzymano ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${Er(i.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`Za duża wartość: oczekiwano, że ${i.origin??"wartość"} będzie mieć ${a}${i.maximum.toString()} ${o.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${i.origin??"wartość"} będzie wynosić ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`Za mała wartość: oczekiwano, że ${i.origin??"wartość"} będzie mieć ${a}${i.minimum.toString()} ${o.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${i.origin??"wartość"} będzie wynosić ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${a.prefix}"`:a.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${a.suffix}"`:a.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${a.includes}"`:a.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${a.pattern}`:`Nieprawidłow(y/a/e) ${r[a.format]??i.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${i.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${i.keys.length>1?"s":""}: ${Jt(i.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${i.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${i.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function MLt(){return{localeError:PLt()}}const RLt=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"número";case"object":{if(Array.isArray(i))return"array";if(i===null)return"nulo";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"};return i=>{switch(i.code){case"invalid_type":return`Tipo inválido: esperado ${i.expected}, recebido ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Entrada inválida: esperado ${Er(i.values[0])}`:`Opção inválida: esperada uma das ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`Muito grande: esperado que ${i.origin??"valor"} tivesse ${a}${i.maximum.toString()} ${o.unit??"elementos"}`:`Muito grande: esperado que ${i.origin??"valor"} fosse ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`Muito pequeno: esperado que ${i.origin} tivesse ${a}${i.minimum.toString()} ${o.unit}`:`Muito pequeno: esperado que ${i.origin} fosse ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Texto inválido: deve começar com "${a.prefix}"`:a.format==="ends_with"?`Texto inválido: deve terminar com "${a.suffix}"`:a.format==="includes"?`Texto inválido: deve incluir "${a.includes}"`:a.format==="regex"?`Texto inválido: deve corresponder ao padrão ${a.pattern}`:`${r[a.format]??i.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${i.divisor}`;case"unrecognized_keys":return`Chave${i.keys.length>1?"s":""} desconhecida${i.keys.length>1?"s":""}: ${Jt(i.keys,", ")}`;case"invalid_key":return`Chave inválida em ${i.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${i.origin}`;default:return"Campo inválido"}}};function $Lt(){return{localeError:RLt()}}function pbe(e,t,n,r){const i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}const LLt=()=>{const e={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"число";case"object":{if(Array.isArray(i))return"массив";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"};return i=>{switch(i.code){case"invalid_type":return`Неверный ввод: ожидалось ${i.expected}, получено ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Неверный ввод: ожидалось ${Er(i.values[0])}`:`Неверный вариант: ожидалось одно из ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);if(o){const s=Number(i.maximum),l=pbe(s,o.unit.one,o.unit.few,o.unit.many);return`Слишком большое значение: ожидалось, что ${i.origin??"значение"} будет иметь ${a}${i.maximum.toString()} ${l}`}return`Слишком большое значение: ожидалось, что ${i.origin??"значение"} будет ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);if(o){const s=Number(i.minimum),l=pbe(s,o.unit.one,o.unit.few,o.unit.many);return`Слишком маленькое значение: ожидалось, что ${i.origin} будет иметь ${a}${i.minimum.toString()} ${l}`}return`Слишком маленькое значение: ожидалось, что ${i.origin} будет ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Неверная строка: должна начинаться с "${a.prefix}"`:a.format==="ends_with"?`Неверная строка: должна заканчиваться на "${a.suffix}"`:a.format==="includes"?`Неверная строка: должна содержать "${a.includes}"`:a.format==="regex"?`Неверная строка: должна соответствовать шаблону ${a.pattern}`:`Неверный ${r[a.format]??i.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${i.divisor}`;case"unrecognized_keys":return`Нераспознанн${i.keys.length>1?"ые":"ый"} ключ${i.keys.length>1?"и":""}: ${Jt(i.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${i.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${i.origin}`;default:return"Неверные входные данные"}}};function ULt(){return{localeError:LLt()}}const zLt=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"število";case"object":{if(Array.isArray(i))return"tabela";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"};return i=>{switch(i.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${i.expected}, prejeto ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Neveljaven vnos: pričakovano ${Er(i.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`Preveliko: pričakovano, da bo ${i.origin??"vrednost"} imelo ${a}${i.maximum.toString()} ${o.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${i.origin??"vrednost"} ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`Premajhno: pričakovano, da bo ${i.origin} imelo ${a}${i.minimum.toString()} ${o.unit}`:`Premajhno: pričakovano, da bo ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Neveljaven niz: mora se začeti z "${a.prefix}"`:a.format==="ends_with"?`Neveljaven niz: mora se končati z "${a.suffix}"`:a.format==="includes"?`Neveljaven niz: mora vsebovati "${a.includes}"`:a.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${a.pattern}`:`Neveljaven ${r[a.format]??i.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${i.divisor}`;case"unrecognized_keys":return`Neprepoznan${i.keys.length>1?"i ključi":" ključ"}: ${Jt(i.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${i.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${i.origin}`;default:return"Neveljaven vnos"}}};function HLt(){return{localeError:zLt()}}const VLt=()=>{const e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"antal";case"object":{if(Array.isArray(i))return"lista";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"};return i=>{switch(i.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${i.expected}, fick ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Ogiltig inmatning: förväntat ${Er(i.values[0])}`:`Ogiltigt val: förväntade en av ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`För stor(t): förväntade ${i.origin??"värdet"} att ha ${a}${i.maximum.toString()} ${o.unit??"element"}`:`För stor(t): förväntat ${i.origin??"värdet"} att ha ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`För lite(t): förväntade ${i.origin??"värdet"} att ha ${a}${i.minimum.toString()} ${o.unit}`:`För lite(t): förväntade ${i.origin??"värdet"} att ha ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Ogiltig sträng: måste börja med "${a.prefix}"`:a.format==="ends_with"?`Ogiltig sträng: måste sluta med "${a.suffix}"`:a.format==="includes"?`Ogiltig sträng: måste innehålla "${a.includes}"`:a.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${a.pattern}"`:`Ogiltig(t) ${r[a.format]??i.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${Jt(i.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${i.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${i.origin??"värdet"}`;default:return"Ogiltig input"}}};function QLt(){return{localeError:VLt()}}const qLt=()=>{const e={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"எண் அல்லாதது":"எண்";case"object":{if(Array.isArray(i))return"அணி";if(i===null)return"வெறுமை";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"};return i=>{switch(i.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${i.expected}, பெறப்பட்டது ${n(i.input)}`;case"invalid_value":return i.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${Er(i.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${Jt(i.values,"|")} இல் ஒன்று`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${i.origin??"மதிப்பு"} ${a}${i.maximum.toString()} ${o.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${i.origin??"மதிப்பு"} ${a}${i.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${i.origin} ${a}${i.minimum.toString()} ${o.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${i.origin} ${a}${i.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const a=i;return a.format==="starts_with"?`தவறான சரம்: "${a.prefix}" இல் தொடங்க வேண்டும்`:a.format==="ends_with"?`தவறான சரம்: "${a.suffix}" இல் முடிவடைய வேண்டும்`:a.format==="includes"?`தவறான சரம்: "${a.includes}" ஐ உள்ளடக்க வேண்டும்`:a.format==="regex"?`தவறான சரம்: ${a.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${r[a.format]??i.format}`}case"not_multiple_of":return`தவறான எண்: ${i.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${i.keys.length>1?"கள்":""}: ${Jt(i.keys,", ")}`;case"invalid_key":return`${i.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${i.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function GLt(){return{localeError:qLt()}}const WLt=()=>{const e={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":{if(Array.isArray(i))return"อาร์เรย์ (Array)";if(i===null)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"};return i=>{switch(i.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${i.expected} แต่ได้รับ ${n(i.input)}`;case"invalid_value":return i.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${Er(i.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"ไม่เกิน":"น้อยกว่า",o=t(i.origin);return o?`เกินกำหนด: ${i.origin??"ค่า"} ควรมี${a} ${i.maximum.toString()} ${o.unit??"รายการ"}`:`เกินกำหนด: ${i.origin??"ค่า"} ควรมี${a} ${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?"อย่างน้อย":"มากกว่า",o=t(i.origin);return o?`น้อยกว่ากำหนด: ${i.origin} ควรมี${a} ${i.minimum.toString()} ${o.unit}`:`น้อยกว่ากำหนด: ${i.origin} ควรมี${a} ${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${a.prefix}"`:a.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${a.suffix}"`:a.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${a.includes}" อยู่ในข้อความ`:a.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${a.pattern}`:`รูปแบบไม่ถูกต้อง: ${r[a.format]??i.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${i.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${Jt(i.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${i.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${i.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function KLt(){return{localeError:WLt()}}const YLt=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},XLt=()=>{const e={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function t(r){return e[r]??null}const n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"};return r=>{switch(r.code){case"invalid_type":return`Geçersiz değer: beklenen ${r.expected}, alınan ${YLt(r.input)}`;case"invalid_value":return r.values.length===1?`Geçersiz değer: beklenen ${Er(r.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${Jt(r.values,"|")}`;case"too_big":{const i=r.inclusive?"<=":"<",a=t(r.origin);return a?`Çok büyük: beklenen ${r.origin??"değer"} ${i}${r.maximum.toString()} ${a.unit??"öğe"}`:`Çok büyük: beklenen ${r.origin??"değer"} ${i}${r.maximum.toString()}`}case"too_small":{const i=r.inclusive?">=":">",a=t(r.origin);return a?`Çok küçük: beklenen ${r.origin} ${i}${r.minimum.toString()} ${a.unit}`:`Çok küçük: beklenen ${r.origin} ${i}${r.minimum.toString()}`}case"invalid_format":{const i=r;return i.format==="starts_with"?`Geçersiz metin: "${i.prefix}" ile başlamalı`:i.format==="ends_with"?`Geçersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Geçersiz metin: "${i.includes}" içermeli`:i.format==="regex"?`Geçersiz metin: ${i.pattern} desenine uymalı`:`Geçersiz ${n[i.format]??r.format}`}case"not_multiple_of":return`Geçersiz sayı: ${r.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${r.keys.length>1?"lar":""}: ${Jt(r.keys,", ")}`;case"invalid_key":return`${r.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${r.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function ZLt(){return{localeError:XLt()}}const JLt=()=>{const e={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"число";case"object":{if(Array.isArray(i))return"масив";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"};return i=>{switch(i.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${i.expected}, отримано ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Неправильні вхідні дані: очікується ${Er(i.values[0])}`:`Неправильна опція: очікується одне з ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`Занадто велике: очікується, що ${i.origin??"значення"} ${o.verb} ${a}${i.maximum.toString()} ${o.unit??"елементів"}`:`Занадто велике: очікується, що ${i.origin??"значення"} буде ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`Занадто мале: очікується, що ${i.origin} ${o.verb} ${a}${i.minimum.toString()} ${o.unit}`:`Занадто мале: очікується, що ${i.origin} буде ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Неправильний рядок: повинен починатися з "${a.prefix}"`:a.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${a.suffix}"`:a.format==="includes"?`Неправильний рядок: повинен містити "${a.includes}"`:a.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${a.pattern}`:`Неправильний ${r[a.format]??i.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${i.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${i.keys.length>1?"і":""}: ${Jt(i.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${i.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${i.origin}`;default:return"Неправильні вхідні дані"}}};function dze(){return{localeError:JLt()}}function e6t(){return dze()}const t6t=()=>{const e={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"نمبر";case"object":{if(Array.isArray(i))return"آرے";if(i===null)return"نل";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"};return i=>{switch(i.code){case"invalid_type":return`غلط ان پٹ: ${i.expected} متوقع تھا، ${n(i.input)} موصول ہوا`;case"invalid_value":return i.values.length===1?`غلط ان پٹ: ${Er(i.values[0])} متوقع تھا`:`غلط آپشن: ${Jt(i.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`بہت بڑا: ${i.origin??"ویلیو"} کے ${a}${i.maximum.toString()} ${o.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${i.origin??"ویلیو"} کا ${a}${i.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`بہت چھوٹا: ${i.origin} کے ${a}${i.minimum.toString()} ${o.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${i.origin} کا ${a}${i.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const a=i;return a.format==="starts_with"?`غلط سٹرنگ: "${a.prefix}" سے شروع ہونا چاہیے`:a.format==="ends_with"?`غلط سٹرنگ: "${a.suffix}" پر ختم ہونا چاہیے`:a.format==="includes"?`غلط سٹرنگ: "${a.includes}" شامل ہونا چاہیے`:a.format==="regex"?`غلط سٹرنگ: پیٹرن ${a.pattern} سے میچ ہونا چاہیے`:`غلط ${r[a.format]??i.format}`}case"not_multiple_of":return`غلط نمبر: ${i.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${i.keys.length>1?"ز":""}: ${Jt(i.keys,"، ")}`;case"invalid_key":return`${i.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${i.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function n6t(){return{localeError:t6t()}}const r6t=()=>{const e={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"số";case"object":{if(Array.isArray(i))return"mảng";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"};return i=>{switch(i.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${i.expected}, nhận được ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Đầu vào không hợp lệ: mong đợi ${Er(i.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`Quá lớn: mong đợi ${i.origin??"giá trị"} ${o.verb} ${a}${i.maximum.toString()} ${o.unit??"phần tử"}`:`Quá lớn: mong đợi ${i.origin??"giá trị"} ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`Quá nhỏ: mong đợi ${i.origin} ${o.verb} ${a}${i.minimum.toString()} ${o.unit}`:`Quá nhỏ: mong đợi ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${a.prefix}"`:a.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${a.suffix}"`:a.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${a.includes}"`:a.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${a.pattern}`:`${r[a.format]??i.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${i.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${Jt(i.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${i.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${i.origin}`;default:return"Đầu vào không hợp lệ"}}};function i6t(){return{localeError:r6t()}}const a6t=()=>{const e={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"非数字(NaN)":"数字";case"object":{if(Array.isArray(i))return"数组";if(i===null)return"空值(null)";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"};return i=>{switch(i.code){case"invalid_type":return`无效输入:期望 ${i.expected},实际接收 ${n(i.input)}`;case"invalid_value":return i.values.length===1?`无效输入:期望 ${Er(i.values[0])}`:`无效选项:期望以下之一 ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`数值过大:期望 ${i.origin??"值"} ${a}${i.maximum.toString()} ${o.unit??"个元素"}`:`数值过大:期望 ${i.origin??"值"} ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`数值过小:期望 ${i.origin} ${a}${i.minimum.toString()} ${o.unit}`:`数值过小:期望 ${i.origin} ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`无效字符串:必须以 "${a.prefix}" 开头`:a.format==="ends_with"?`无效字符串:必须以 "${a.suffix}" 结尾`:a.format==="includes"?`无效字符串:必须包含 "${a.includes}"`:a.format==="regex"?`无效字符串:必须满足正则表达式 ${a.pattern}`:`无效${r[a.format]??i.format}`}case"not_multiple_of":return`无效数字:必须是 ${i.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${Jt(i.keys,", ")}`;case"invalid_key":return`${i.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${i.origin} 中包含无效值(value)`;default:return"无效输入"}}};function o6t(){return{localeError:a6t()}}const s6t=()=>{const e={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"number";case"object":{if(Array.isArray(i))return"array";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"};return i=>{switch(i.code){case"invalid_type":return`無效的輸入值:預期為 ${i.expected},但收到 ${n(i.input)}`;case"invalid_value":return i.values.length===1?`無效的輸入值:預期為 ${Er(i.values[0])}`:`無效的選項:預期為以下其中之一 ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`數值過大:預期 ${i.origin??"值"} 應為 ${a}${i.maximum.toString()} ${o.unit??"個元素"}`:`數值過大:預期 ${i.origin??"值"} 應為 ${a}${i.maximum.toString()}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`數值過小:預期 ${i.origin} 應為 ${a}${i.minimum.toString()} ${o.unit}`:`數值過小:預期 ${i.origin} 應為 ${a}${i.minimum.toString()}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`無效的字串:必須以 "${a.prefix}" 開頭`:a.format==="ends_with"?`無效的字串:必須以 "${a.suffix}" 結尾`:a.format==="includes"?`無效的字串:必須包含 "${a.includes}"`:a.format==="regex"?`無效的字串:必須符合格式 ${a.pattern}`:`無效的 ${r[a.format]??i.format}`}case"not_multiple_of":return`無效的數字:必須為 ${i.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${i.keys.length>1?"們":""}:${Jt(i.keys,"、")}`;case"invalid_key":return`${i.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${i.origin} 中有無效的值`;default:return"無效的輸入值"}}};function l6t(){return{localeError:s6t()}}const c6t=()=>{const e={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function t(i){return e[i]??null}const n=i=>{const a=typeof i;switch(a){case"number":return Number.isNaN(i)?"NaN":"nọ́mbà";case"object":{if(Array.isArray(i))return"akopọ";if(i===null)return"null";if(Object.getPrototypeOf(i)!==Object.prototype&&i.constructor)return i.constructor.name}}return a},r={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"};return i=>{switch(i.code){case"invalid_type":return`Ìbáwọlé aṣìṣe: a ní láti fi ${i.expected}, àmọ̀ a rí ${n(i.input)}`;case"invalid_value":return i.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${Er(i.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${Jt(i.values,"|")}`;case"too_big":{const a=i.inclusive?"<=":"<",o=t(i.origin);return o?`Tó pọ̀ jù: a ní láti jẹ́ pé ${i.origin??"iye"} ${o.verb} ${a}${i.maximum} ${o.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${a}${i.maximum}`}case"too_small":{const a=i.inclusive?">=":">",o=t(i.origin);return o?`Kéré ju: a ní láti jẹ́ pé ${i.origin} ${o.verb} ${a}${i.minimum} ${o.unit}`:`Kéré ju: a ní láti jẹ́ ${a}${i.minimum}`}case"invalid_format":{const a=i;return a.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${a.prefix}"`:a.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${a.suffix}"`:a.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${a.includes}"`:a.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${a.pattern}`:`Aṣìṣe: ${r[a.format]??i.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${i.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${Jt(i.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${i.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${i.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function u6t(){return{localeError:c6t()}}const fze=Object.freeze(Object.defineProperty({__proto__:null,ar:N3t,az:F3t,be:T3t,ca:B3t,cs:j3t,da:M3t,de:$3t,en:cze,eo:V3t,es:q3t,fa:W3t,fi:Y3t,fr:Z3t,frCA:eLt,he:nLt,hu:iLt,id:oLt,is:cLt,it:dLt,ja:hLt,ka:ALt,kh:vLt,km:uze,ko:bLt,lt:kLt,mk:CLt,ms:NLt,nl:FLt,no:TLt,ota:BLt,pl:MLt,ps:jLt,pt:$Lt,ru:ULt,sl:HLt,sv:QLt,ta:GLt,th:KLt,tr:ZLt,ua:e6t,uk:dze,ur:n6t,vi:i6t,yo:u6t,zhCN:o6t,zhTW:l6t},Symbol.toStringTag,{value:"Module"})),hze=Symbol("ZodOutput"),mze=Symbol("ZodInput");class Nre{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];if(this._map.set(t,r),r&&typeof r=="object"&&"id"in r){if(this._idmap.has(r.id))throw new Error(`ID ${r.id} already exists in the registry`);this._idmap.set(r.id,t)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const i={...r,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function Ere(){return new Nre}const Cb=Ere();function pze(e,t){return new e({type:"string",...Ut(t)})}function Aze(e,t){return new e({type:"string",coerce:!0,...Ut(t)})}function Fre(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Ut(t)})}function DM(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Ut(t)})}function Dre(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Ut(t)})}function Tre(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Ut(t)})}function Ore(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Ut(t)})}function Bre(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Ut(t)})}function U3(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Ut(t)})}function Ire(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Ut(t)})}function jre(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Ut(t)})}function Pre(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Ut(t)})}function Mre(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Ut(t)})}function Rre(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Ut(t)})}function $re(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Ut(t)})}function Lre(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Ut(t)})}function Ure(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Ut(t)})}function zre(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Ut(t)})}function Hre(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Ut(t)})}function Vre(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Ut(t)})}function Qre(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Ut(t)})}function qre(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Ut(t)})}function Gre(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Ut(t)})}function Wre(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Ut(t)})}const gze={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function vze(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Ut(t)})}function yze(e,t){return new e({type:"string",format:"date",check:"string_format",...Ut(t)})}function bze(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Ut(t)})}function xze(e,t){return new e({type:"string",format:"duration",check:"string_format",...Ut(t)})}function wze(e,t){return new e({type:"number",checks:[],...Ut(t)})}function kze(e,t){return new e({type:"number",coerce:!0,checks:[],...Ut(t)})}function Sze(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Ut(t)})}function Cze(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...Ut(t)})}function _ze(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...Ut(t)})}function Nze(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...Ut(t)})}function Eze(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...Ut(t)})}function Fze(e,t){return new e({type:"boolean",...Ut(t)})}function Dze(e,t){return new e({type:"boolean",coerce:!0,...Ut(t)})}function Tze(e,t){return new e({type:"bigint",...Ut(t)})}function Oze(e,t){return new e({type:"bigint",coerce:!0,...Ut(t)})}function Bze(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...Ut(t)})}function Ize(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...Ut(t)})}function jze(e,t){return new e({type:"symbol",...Ut(t)})}function Pze(e,t){return new e({type:"undefined",...Ut(t)})}function Mze(e,t){return new e({type:"null",...Ut(t)})}function Rze(e){return new e({type:"any"})}function $ze(e){return new e({type:"unknown"})}function Lze(e,t){return new e({type:"never",...Ut(t)})}function Uze(e,t){return new e({type:"void",...Ut(t)})}function zze(e,t){return new e({type:"date",...Ut(t)})}function Hze(e,t){return new e({type:"date",coerce:!0,...Ut(t)})}function Vze(e,t){return new e({type:"nan",...Ut(t)})}function dx(e,t){return new vre({check:"less_than",...Ut(t),value:e,inclusive:!1})}function Rh(e,t){return new vre({check:"less_than",...Ut(t),value:e,inclusive:!0})}function fx(e,t){return new yre({check:"greater_than",...Ut(t),value:e,inclusive:!1})}function hd(e,t){return new yre({check:"greater_than",...Ut(t),value:e,inclusive:!0})}function Qze(e){return fx(0,e)}function qze(e){return dx(0,e)}function Gze(e){return Rh(0,e)}function Wze(e){return hd(0,e)}function gE(e,t){return new OUe({check:"multiple_of",...Ut(t),value:e})}function z3(e,t){return new jUe({check:"max_size",...Ut(t),maximum:e})}function vE(e,t){return new PUe({check:"min_size",...Ut(t),minimum:e})}function Kre(e,t){return new MUe({check:"size_equals",...Ut(t),size:e})}function H3(e,t){return new RUe({check:"max_length",...Ut(t),maximum:e})}function lS(e,t){return new $Ue({check:"min_length",...Ut(t),minimum:e})}function V3(e,t){return new LUe({check:"length_equals",...Ut(t),length:e})}function Yre(e,t){return new UUe({check:"string_format",format:"regex",...Ut(t),pattern:e})}function Xre(e){return new zUe({check:"string_format",format:"lowercase",...Ut(e)})}function Zre(e){return new HUe({check:"string_format",format:"uppercase",...Ut(e)})}function Jre(e,t){return new VUe({check:"string_format",format:"includes",...Ut(t),includes:e})}function eie(e,t){return new QUe({check:"string_format",format:"starts_with",...Ut(t),prefix:e})}function tie(e,t){return new qUe({check:"string_format",format:"ends_with",...Ut(t),suffix:e})}function Kze(e,t,n){return new GUe({check:"property",property:e,schema:t,...Ut(n)})}function nie(e,t){return new WUe({check:"mime_type",mime:e,...Ut(t)})}function Zx(e){return new KUe({check:"overwrite",tx:e})}function rie(e){return Zx(t=>t.normalize(e))}function iie(){return Zx(e=>e.trim())}function aie(){return Zx(e=>e.toLowerCase())}function oie(){return Zx(e=>e.toUpperCase())}function Yze(e,t,n){return new e({type:"array",element:t,...Ut(n)})}function d6t(e,t,n){return new e({type:"union",options:t,...Ut(n)})}function f6t(e,t,n,r){return new e({type:"union",options:n,discriminator:t,...Ut(r)})}function h6t(e,t,n){return new e({type:"intersection",left:t,right:n})}function m6t(e,t,n,r){const i=n instanceof Pr,a=i?r:n,o=i?n:null;return new e({type:"tuple",items:t,rest:o,...Ut(a)})}function p6t(e,t,n,r){return new e({type:"record",keyType:t,valueType:n,...Ut(r)})}function A6t(e,t,n,r){return new e({type:"map",keyType:t,valueType:n,...Ut(r)})}function g6t(e,t,n){return new e({type:"set",valueType:t,...Ut(n)})}function v6t(e,t,n){const r=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new e({type:"enum",entries:r,...Ut(n)})}function y6t(e,t,n){return new e({type:"enum",entries:t,...Ut(n)})}function b6t(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...Ut(n)})}function Xze(e,t){return new e({type:"file",...Ut(t)})}function x6t(e,t){return new e({type:"transform",transform:t})}function w6t(e,t){return new e({type:"optional",innerType:t})}function k6t(e,t){return new e({type:"nullable",innerType:t})}function S6t(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():M3(n)}})}function C6t(e,t,n){return new e({type:"nonoptional",innerType:t,...Ut(n)})}function _6t(e,t){return new e({type:"success",innerType:t})}function N6t(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function E6t(e,t,n){return new e({type:"pipe",in:t,out:n})}function F6t(e,t){return new e({type:"readonly",innerType:t})}function D6t(e,t,n){return new e({type:"template_literal",parts:t,...Ut(n)})}function T6t(e,t){return new e({type:"lazy",getter:t})}function O6t(e,t){return new e({type:"promise",innerType:t})}function Zze(e,t,n){const r=Ut(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function Jze(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Ut(n)})}function e9e(e){const t=t9e(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(oS(r,n.value,t._zod.def));else{const i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=t),i.continue??(i.continue=!t._zod.def.abort),n.issues.push(oS(i))}},e(n.value,n)));return t}function t9e(e,t){const n=new $o({check:"custom",...Ut(t)});return n._zod.check=e,n}function n9e(e,t){const n=Ut(t);let r=n.truthy??["true","1","yes","on","y","enabled"],i=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(r=r.map(m=>typeof m=="string"?m.toLowerCase():m),i=i.map(m=>typeof m=="string"?m.toLowerCase():m));const a=new Set(r),o=new Set(i),s=e.Codec??_re,l=e.Boolean??wre,c=e.String??CD,u=new c({type:"string",error:n.error}),f=new l({type:"boolean",error:n.error}),h=new s({type:"pipe",in:u,out:f,transform:((m,p)=>{let A=m;return n.case!=="sensitive"&&(A=A.toLowerCase()),a.has(A)?!0:o.has(A)?!1:(p.issues.push({code:"invalid_value",expected:"stringbool",values:[...a,...o],input:p.value,inst:h,continue:!1}),{})}),reverseTransform:((m,p)=>m===!0?r[0]||"true":i[0]||"false"),error:n.error});return h}function _D(e,t,n,r={}){const i=Ut(r),a={...Ut(r),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:s=>n.test(s),...i};return n instanceof RegExp&&(a.pattern=n),new e(a)}class eX{constructor(t){this.counter=0,this.metadataRegistry=t?.metadata??Cb,this.target=t?.target??"draft-2020-12",this.unrepresentable=t?.unrepresentable??"throw",this.override=t?.override??(()=>{}),this.io=t?.io??"output",this.seen=new Map}process(t,n={path:[],schemaPath:[]}){var r;const i=t._zod.def,a={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},o=this.seen.get(t);if(o)return o.count++,n.schemaPath.includes(t)&&(o.cycle=n.path),o.schema;const s={schema:{},count:1,cycle:void 0,path:n.path};this.seen.set(t,s);const l=t._zod.toJSONSchema?.();if(l)s.schema=l;else{const f={...n,schemaPath:[...n.schemaPath,t],path:n.path},h=t._zod.parent;if(h)s.ref=h,this.process(h,f),this.seen.get(h).isParent=!0;else{const m=s.schema;switch(i.type){case"string":{const p=m;p.type="string";const{minimum:A,maximum:v,format:y,patterns:x,contentEncoding:k}=t._zod.bag;if(typeof A=="number"&&(p.minLength=A),typeof v=="number"&&(p.maxLength=v),y&&(p.format=a[y]??y,p.format===""&&delete p.format),k&&(p.contentEncoding=k),x&&x.size>0){const S=[...x];S.length===1?p.pattern=S[0].source:S.length>1&&(s.schema.allOf=[...S.map(C=>({...this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{},pattern:C.source}))])}break}case"number":{const p=m,{minimum:A,maximum:v,format:y,multipleOf:x,exclusiveMaximum:k,exclusiveMinimum:S}=t._zod.bag;typeof y=="string"&&y.includes("int")?p.type="integer":p.type="number",typeof S=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(p.minimum=S,p.exclusiveMinimum=!0):p.exclusiveMinimum=S),typeof A=="number"&&(p.minimum=A,typeof S=="number"&&this.target!=="draft-4"&&(S>=A?delete p.minimum:delete p.exclusiveMinimum)),typeof k=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(p.maximum=k,p.exclusiveMaximum=!0):p.exclusiveMaximum=k),typeof v=="number"&&(p.maximum=v,typeof k=="number"&&this.target!=="draft-4"&&(k<=v?delete p.maximum:delete p.exclusiveMaximum)),typeof x=="number"&&(p.multipleOf=x);break}case"boolean":{const p=m;p.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{this.target==="openapi-3.0"?(m.type="string",m.nullable=!0,m.enum=[null]):m.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{m.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const p=m,{minimum:A,maximum:v}=t._zod.bag;typeof A=="number"&&(p.minItems=A),typeof v=="number"&&(p.maxItems=v),p.type="array",p.items=this.process(i.element,{...f,path:[...f.path,"items"]});break}case"object":{const p=m;p.type="object",p.properties={};const A=i.shape;for(const x in A)p.properties[x]=this.process(A[x],{...f,path:[...f.path,"properties",x]});const v=new Set(Object.keys(A)),y=new Set([...v].filter(x=>{const k=i.shape[x]._zod;return this.io==="input"?k.optin===void 0:k.optout===void 0}));y.size>0&&(p.required=Array.from(y)),i.catchall?._zod.def.type==="never"?p.additionalProperties=!1:i.catchall?i.catchall&&(p.additionalProperties=this.process(i.catchall,{...f,path:[...f.path,"additionalProperties"]})):this.io==="output"&&(p.additionalProperties=!1);break}case"union":{const p=m,A=i.options.map((v,y)=>this.process(v,{...f,path:[...f.path,"anyOf",y]}));p.anyOf=A;break}case"intersection":{const p=m,A=this.process(i.left,{...f,path:[...f.path,"allOf",0]}),v=this.process(i.right,{...f,path:[...f.path,"allOf",1]}),y=k=>"allOf"in k&&Object.keys(k).length===1,x=[...y(A)?A.allOf:[A],...y(v)?v.allOf:[v]];p.allOf=x;break}case"tuple":{const p=m;p.type="array";const A=this.target==="draft-2020-12"?"prefixItems":"items",v=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",y=i.items.map((C,N)=>this.process(C,{...f,path:[...f.path,A,N]})),x=i.rest?this.process(i.rest,{...f,path:[...f.path,v,...this.target==="openapi-3.0"?[i.items.length]:[]]}):null;this.target==="draft-2020-12"?(p.prefixItems=y,x&&(p.items=x)):this.target==="openapi-3.0"?(p.items={anyOf:y},x&&p.items.anyOf.push(x),p.minItems=y.length,x||(p.maxItems=y.length)):(p.items=y,x&&(p.additionalItems=x));const{minimum:k,maximum:S}=t._zod.bag;typeof k=="number"&&(p.minItems=k),typeof S=="number"&&(p.maxItems=S);break}case"record":{const p=m;p.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(p.propertyNames=this.process(i.keyType,{...f,path:[...f.path,"propertyNames"]})),p.additionalProperties=this.process(i.valueType,{...f,path:[...f.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{const p=m,A=rre(i.entries);A.every(v=>typeof v=="number")&&(p.type="number"),A.every(v=>typeof v=="string")&&(p.type="string"),p.enum=A;break}case"literal":{const p=m,A=[];for(const v of i.values)if(v===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof v=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");A.push(Number(v))}else A.push(v);if(A.length!==0)if(A.length===1){const v=A[0];p.type=v===null?"null":typeof v,this.target==="draft-4"||this.target==="openapi-3.0"?p.enum=[v]:p.const=v}else A.every(v=>typeof v=="number")&&(p.type="number"),A.every(v=>typeof v=="string")&&(p.type="string"),A.every(v=>typeof v=="boolean")&&(p.type="string"),A.every(v=>v===null)&&(p.type="null"),p.enum=A;break}case"file":{const p=m,A={type:"string",format:"binary",contentEncoding:"binary"},{minimum:v,maximum:y,mime:x}=t._zod.bag;v!==void 0&&(A.minLength=v),y!==void 0&&(A.maxLength=y),x?x.length===1?(A.contentMediaType=x[0],Object.assign(p,A)):p.anyOf=x.map(k=>({...A,contentMediaType:k})):Object.assign(p,A);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const p=this.process(i.innerType,f);this.target==="openapi-3.0"?(s.ref=i.innerType,m.nullable=!0):m.anyOf=[p,{type:"null"}];break}case"nonoptional":{this.process(i.innerType,f),s.ref=i.innerType;break}case"success":{const p=m;p.type="boolean";break}case"default":{this.process(i.innerType,f),s.ref=i.innerType,m.default=JSON.parse(JSON.stringify(i.defaultValue));break}case"prefault":{this.process(i.innerType,f),s.ref=i.innerType,this.io==="input"&&(m._prefault=JSON.parse(JSON.stringify(i.defaultValue)));break}case"catch":{this.process(i.innerType,f),s.ref=i.innerType;let p;try{p=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}m.default=p;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const p=m,A=t._zod.pattern;if(!A)throw new Error("Pattern not found in template literal");p.type="string",p.pattern=A.source;break}case"pipe":{const p=this.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;this.process(p,f),s.ref=p;break}case"readonly":{this.process(i.innerType,f),s.ref=i.innerType,m.readOnly=!0;break}case"promise":{this.process(i.innerType,f),s.ref=i.innerType;break}case"optional":{this.process(i.innerType,f),s.ref=i.innerType;break}case"lazy":{const p=t._zod.innerType;this.process(p,f),s.ref=p;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case"function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}}}}const c=this.metadataRegistry.get(t);return c&&Object.assign(s.schema,c),this.io==="input"&&Ls(t)&&(delete s.schema.examples,delete s.schema.default),this.io==="input"&&s.schema._prefault&&((r=s.schema).default??(r.default=s.schema._prefault)),delete s.schema._prefault,this.seen.get(t).schema}emit(t,n){const r={cycles:n?.cycles??"ref",reused:n?.reused??"inline",external:n?.external??void 0},i=this.seen.get(t);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const a=u=>{const f=this.target==="draft-2020-12"?"$defs":"definitions";if(r.external){const A=r.external.registry.get(u[0])?.id,v=r.external.uri??(x=>x);if(A)return{ref:v(A)};const y=u[1].defId??u[1].schema.id??`schema${this.counter++}`;return u[1].defId=y,{defId:y,ref:`${v("__shared")}#/${f}/${y}`}}if(u[1]===i)return{ref:"#"};const m=`#/${f}/`,p=u[1].schema.id??`__schema${this.counter++}`;return{defId:p,ref:m+p}},o=u=>{if(u[1].schema.$ref)return;const f=u[1],{ref:h,defId:m}=a(u);f.def={...f.schema},m&&(f.defId=m);const p=f.schema;for(const A in p)delete p[A];p.$ref=h};if(r.cycles==="throw")for(const u of this.seen.entries()){const f=u[1];if(f.cycle)throw new Error(`Cycle detected: #/${f.cycle?.join("/")}/<root>
|
|
666
666
|
|
|
667
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of this.seen.entries()){const f=u[1];if(t===u[0]){o(u);continue}if(r.external){const m=r.external.registry.get(u[0])?.id;if(t!==u[0]&&m){o(u);continue}}if(this.metadataRegistry.get(u[0])?.id){o(u);continue}if(f.cycle){o(u);continue}if(f.count>1&&r.reused==="ref"){o(u);continue}}const s=(u,f)=>{const h=this.seen.get(u),m=h.def??h.schema,p={...m};if(h.ref===null)return;const A=h.ref;if(h.ref=null,A){s(A,f);const v=this.seen.get(A).schema;v.$ref&&(f.target==="draft-7"||f.target==="draft-4"||f.target==="openapi-3.0")?(m.allOf=m.allOf??[],m.allOf.push(v)):(Object.assign(m,v),Object.assign(m,p))}h.isParent||this.override({zodSchema:u,jsonSchema:m,path:h.path??[]})};for(const u of[...this.seen.entries()].reverse())s(u[0],{target:this.target});const l={};if(this.target==="draft-2020-12"?l.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?l.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?l.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),r.external?.uri){const u=r.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");l.$id=r.external.uri(u)}Object.assign(l,i.def);const c=r.external?.defs??{};for(const u of this.seen.entries()){const f=u[1];f.def&&f.defId&&(c[f.defId]=f.def)}r.external||Object.keys(c).length>0&&(this.target==="draft-2020-12"?l.$defs=c:l.definitions=c);try{return JSON.parse(JSON.stringify(l))}catch{throw new Error("Error converting schema to JSON.")}}}function r9e(e,t){if(e instanceof Nre){const r=new eX(t),i={};for(const s of e._idmap.entries()){const[l,c]=s;r.process(c)}const a={},o={registry:e,uri:t?.uri,defs:i};for(const s of e._idmap.entries()){const[l,c]=s;a[l]=r.emit(c,{...t,external:o})}if(Object.keys(i).length>0){const s=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[s]:i}}return{schemas:a}}const n=new eX(t);return n.process(e),n.emit(e,t)}function Ls(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;switch(i.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Ls(i.element,n);case"object":{for(const a in i.shape)if(Ls(i.shape[a],n))return!0;return!1}case"union":{for(const a of i.options)if(Ls(a,n))return!0;return!1}case"intersection":return Ls(i.left,n)||Ls(i.right,n);case"tuple":{for(const a of i.items)if(Ls(a,n))return!0;return!!(i.rest&&Ls(i.rest,n))}case"record":return Ls(i.keyType,n)||Ls(i.valueType,n);case"map":return Ls(i.keyType,n)||Ls(i.valueType,n);case"set":return Ls(i.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Ls(i.innerType,n);case"lazy":return Ls(i.getter(),n);case"default":return Ls(i.innerType,n);case"prefault":return Ls(i.innerType,n);case"custom":return!1;case"transform":return!0;case"pipe":return Ls(i.in,n)||Ls(i.out,n);case"success":return!1;case"catch":return!1;case"function":return!1}throw new Error(`Unknown schema type: ${i.type}`)}const B6t=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),I6t=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:F7e,$ZodArray:I7e,$ZodAsyncError:Qb,$ZodBase64:g7e,$ZodBase64URL:y7e,$ZodBigInt:kre,$ZodBigIntFormat:C7e,$ZodBoolean:wre,$ZodCIDRv4:p7e,$ZodCIDRv6:A7e,$ZodCUID:i7e,$ZodCUID2:a7e,$ZodCatch:eze,$ZodCheck:$o,$ZodCheckBigIntFormat:IUe,$ZodCheckEndsWith:qUe,$ZodCheckGreaterThan:yre,$ZodCheckIncludes:VUe,$ZodCheckLengthEquals:LUe,$ZodCheckLessThan:vre,$ZodCheckLowerCase:zUe,$ZodCheckMaxLength:RUe,$ZodCheckMaxSize:jUe,$ZodCheckMimeType:WUe,$ZodCheckMinLength:$Ue,$ZodCheckMinSize:PUe,$ZodCheckMultipleOf:OUe,$ZodCheckNumberFormat:BUe,$ZodCheckOverwrite:KUe,$ZodCheckProperty:GUe,$ZodCheckRegex:UUe,$ZodCheckSizeEquals:MUe,$ZodCheckStartsWith:QUe,$ZodCheckStringFormat:SD,$ZodCheckUpperCase:HUe,$ZodCodec:_re,$ZodCustom:lze,$ZodCustomStringFormat:k7e,$ZodDate:B7e,$ZodDefault:Y7e,$ZodDiscriminatedUnion:$7e,$ZodE164:b7e,$ZodEmail:e7e,$ZodEmoji:n7e,$ZodEncodeError:j3,$ZodEnum:V7e,$ZodError:L3,$ZodFile:q7e,$ZodFunction:aze,$ZodGUID:ZUe,$ZodIPv4:h7e,$ZodIPv6:m7e,$ZodISODate:u7e,$ZodISODateTime:c7e,$ZodISODuration:f7e,$ZodISOTime:d7e,$ZodIntersection:L7e,$ZodJWT:w7e,$ZodKSUID:l7e,$ZodLazy:sze,$ZodLiteral:Q7e,$ZodMap:z7e,$ZodNaN:tze,$ZodNanoID:r7e,$ZodNever:T7e,$ZodNonOptional:Z7e,$ZodNull:E7e,$ZodNullable:K7e,$ZodNumber:xre,$ZodNumberFormat:S7e,$ZodObject:M7e,$ZodObjectJIT:R7e,$ZodOptional:W7e,$ZodPipe:nze,$ZodPrefault:X7e,$ZodPromise:oze,$ZodReadonly:rze,$ZodRealError:Td,$ZodRecord:U7e,$ZodRegistry:Nre,$ZodSet:H7e,$ZodString:CD,$ZodStringFormat:Sa,$ZodSuccess:J7e,$ZodSymbol:_7e,$ZodTemplateLiteral:ize,$ZodTransform:G7e,$ZodTuple:Cre,$ZodType:Pr,$ZodULID:o7e,$ZodURL:t7e,$ZodUUID:JUe,$ZodUndefined:N7e,$ZodUnion:Sre,$ZodUnknown:D7e,$ZodVoid:O7e,$ZodXID:s7e,$brand:F8e,$constructor:ut,$input:mze,$output:hze,Doc:YUe,JSONSchema:B6t,JSONSchemaGenerator:eX,NEVER:E8e,TimePrecision:gze,_any:Rze,_array:Yze,_base64:Qre,_base64url:qre,_bigint:Tze,_boolean:Fze,_catch:N6t,_check:t9e,_cidrv4:Hre,_cidrv6:Vre,_coercedBigint:Oze,_coercedBoolean:Dze,_coercedDate:Hze,_coercedNumber:kze,_coercedString:Aze,_cuid:Pre,_cuid2:Mre,_custom:Zze,_date:zze,_decode:lre,_decodeAsync:ure,_default:S6t,_discriminatedUnion:f6t,_e164:Gre,_email:Fre,_emoji:Ire,_encode:sre,_encodeAsync:cre,_endsWith:tie,_enum:v6t,_file:Xze,_float32:Cze,_float64:_ze,_gt:fx,_gte:hd,_guid:DM,_includes:Jre,_int:Sze,_int32:Nze,_int64:Bze,_intersection:h6t,_ipv4:Ure,_ipv6:zre,_isoDate:yze,_isoDateTime:vze,_isoDuration:xze,_isoTime:bze,_jwt:Wre,_ksuid:Lre,_lazy:T6t,_length:V3,_literal:b6t,_lowercase:Xre,_lt:dx,_lte:Rh,_map:A6t,_max:Rh,_maxLength:H3,_maxSize:z3,_mime:nie,_min:hd,_minLength:lS,_minSize:vE,_multipleOf:gE,_nan:Vze,_nanoid:jre,_nativeEnum:y6t,_negative:qze,_never:Lze,_nonnegative:Wze,_nonoptional:C6t,_nonpositive:Gze,_normalize:rie,_null:Mze,_nullable:k6t,_number:wze,_optional:w6t,_overwrite:Zx,_parse:vD,_parseAsync:yD,_pipe:E6t,_positive:Qze,_promise:O6t,_property:Kze,_readonly:F6t,_record:p6t,_refine:Jze,_regex:Yre,_safeDecode:fre,_safeDecodeAsync:mre,_safeEncode:dre,_safeEncodeAsync:hre,_safeParse:bD,_safeParseAsync:xD,_set:g6t,_size:Kre,_startsWith:eie,_string:pze,_stringFormat:_D,_stringbool:n9e,_success:_6t,_superRefine:e9e,_symbol:jze,_templateLiteral:D6t,_toLowerCase:aie,_toUpperCase:oie,_transform:x6t,_trim:iie,_tuple:m6t,_uint32:Eze,_uint64:Ize,_ulid:Rre,_undefined:Pze,_union:d6t,_unknown:$ze,_uppercase:Zre,_url:U3,_uuid:Dre,_uuidv4:Tre,_uuidv6:Ore,_uuidv7:Bre,_void:Uze,_xid:$re,clone:Qf,config:Hc,decode:K$t,decodeAsync:X$t,encode:W$t,encodeAsync:Y$t,flattenError:are,formatError:ore,globalConfig:SM,globalRegistry:Cb,isValidBase64:bre,isValidBase64URL:v7e,isValidJWT:x7e,locales:fze,parse:NM,parseAsync:EM,prettifyError:K8e,regexes:gre,registry:Ere,safeDecode:J$t,safeDecodeAsync:t3t,safeEncode:Z$t,safeEncodeAsync:e3t,safeParse:Y8e,safeParseAsync:X8e,toDotPath:W8e,toJSONSchema:r9e,treeifyError:G8e,util:Q8e,version:XUe},Symbol.toStringTag,{value:"Module"})),sie=ut("ZodISODateTime",(e,t)=>{c7e.init(e,t),Ma.init(e,t)});function i9e(e){return vze(sie,e)}const lie=ut("ZodISODate",(e,t)=>{u7e.init(e,t),Ma.init(e,t)});function a9e(e){return yze(lie,e)}const cie=ut("ZodISOTime",(e,t)=>{d7e.init(e,t),Ma.init(e,t)});function o9e(e){return bze(cie,e)}const uie=ut("ZodISODuration",(e,t)=>{f7e.init(e,t),Ma.init(e,t)});function s9e(e){return xze(uie,e)}const j6t=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:lie,ZodISODateTime:sie,ZodISODuration:uie,ZodISOTime:cie,date:a9e,datetime:i9e,duration:s9e,time:o9e},Symbol.toStringTag,{value:"Module"})),l9e=(e,t)=>{L3.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>ore(e,n)},flatten:{value:n=>are(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,CM,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,CM,2)}},isEmpty:{get(){return e.issues.length===0}}})},P6t=ut("ZodError",l9e),Od=ut("ZodError",l9e,{Parent:Error}),c9e=vD(Od),u9e=yD(Od),d9e=bD(Od),f9e=xD(Od),h9e=sre(Od),m9e=lre(Od),p9e=cre(Od),A9e=ure(Od),g9e=dre(Od),v9e=fre(Od),y9e=hre(Od),b9e=mre(Od),Yr=ut("ZodType",(e,t)=>(Pr.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Eg(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]})),e.clone=(n,r)=>Qf(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>c9e(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>d9e(e,n,r),e.parseAsync=async(n,r)=>u9e(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>f9e(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>h9e(e,n,r),e.decode=(n,r)=>m9e(e,n,r),e.encodeAsync=async(n,r)=>p9e(e,n,r),e.decodeAsync=async(n,r)=>A9e(e,n,r),e.safeEncode=(n,r)=>g9e(e,n,r),e.safeDecode=(n,r)=>v9e(e,n,r),e.safeEncodeAsync=async(n,r)=>y9e(e,n,r),e.safeDecodeAsync=async(n,r)=>b9e(e,n,r),e.refine=(n,r)=>e.check(aHe(n,r)),e.superRefine=n=>e.check(oHe(n)),e.overwrite=n=>e.check(Zx(n)),e.optional=()=>OM(e),e.nullable=()=>BM(e),e.nullish=()=>OM(BM(e)),e.nonoptional=n=>G9e(e,n),e.array=()=>ED(e),e.or=n=>Bie([e,n]),e.and=n=>B9e(e,n),e.transform=n=>IM(e,jie(n)),e.default=n=>V9e(e,n),e.prefault=n=>q9e(e,n),e.catch=n=>Y9e(e,n),e.pipe=n=>IM(e,n),e.readonly=()=>J9e(e),e.describe=n=>{const r=e.clone();return Cb.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return Cb.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Cb.get(e);const r=e.clone();return Cb.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),die=ut("_ZodString",(e,t)=>{CD.init(e,t),Yr.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(Yre(...r)),e.includes=(...r)=>e.check(Jre(...r)),e.startsWith=(...r)=>e.check(eie(...r)),e.endsWith=(...r)=>e.check(tie(...r)),e.min=(...r)=>e.check(lS(...r)),e.max=(...r)=>e.check(H3(...r)),e.length=(...r)=>e.check(V3(...r)),e.nonempty=(...r)=>e.check(lS(1,...r)),e.lowercase=r=>e.check(Xre(r)),e.uppercase=r=>e.check(Zre(r)),e.trim=()=>e.check(iie()),e.normalize=(...r)=>e.check(rie(...r)),e.toLowerCase=()=>e.check(aie()),e.toUpperCase=()=>e.check(oie())}),Q3=ut("ZodString",(e,t)=>{CD.init(e,t),die.init(e,t),e.email=n=>e.check(Fre(fie,n)),e.url=n=>e.check(U3(q3,n)),e.jwt=n=>e.check(Wre(Nie,n)),e.emoji=n=>e.check(Ire(hie,n)),e.guid=n=>e.check(DM(TM,n)),e.uuid=n=>e.check(Dre(WA,n)),e.uuidv4=n=>e.check(Tre(WA,n)),e.uuidv6=n=>e.check(Ore(WA,n)),e.uuidv7=n=>e.check(Bre(WA,n)),e.nanoid=n=>e.check(jre(mie,n)),e.guid=n=>e.check(DM(TM,n)),e.cuid=n=>e.check(Pre(pie,n)),e.cuid2=n=>e.check(Mre(Aie,n)),e.ulid=n=>e.check(Rre(gie,n)),e.base64=n=>e.check(Qre(Sie,n)),e.base64url=n=>e.check(qre(Cie,n)),e.xid=n=>e.check($re(vie,n)),e.ksuid=n=>e.check(Lre(yie,n)),e.ipv4=n=>e.check(Ure(bie,n)),e.ipv6=n=>e.check(zre(xie,n)),e.cidrv4=n=>e.check(Hre(wie,n)),e.cidrv6=n=>e.check(Vre(kie,n)),e.e164=n=>e.check(Gre(_ie,n)),e.datetime=n=>e.check(i9e(n)),e.date=n=>e.check(a9e(n)),e.time=n=>e.check(o9e(n)),e.duration=n=>e.check(s9e(n))});function ky(e){return pze(Q3,e)}const Ma=ut("ZodStringFormat",(e,t)=>{Sa.init(e,t),die.init(e,t)}),fie=ut("ZodEmail",(e,t)=>{e7e.init(e,t),Ma.init(e,t)});function M6t(e){return Fre(fie,e)}const TM=ut("ZodGUID",(e,t)=>{ZUe.init(e,t),Ma.init(e,t)});function R6t(e){return DM(TM,e)}const WA=ut("ZodUUID",(e,t)=>{JUe.init(e,t),Ma.init(e,t)});function $6t(e){return Dre(WA,e)}function L6t(e){return Tre(WA,e)}function U6t(e){return Ore(WA,e)}function z6t(e){return Bre(WA,e)}const q3=ut("ZodURL",(e,t)=>{t7e.init(e,t),Ma.init(e,t)});function H6t(e){return U3(q3,e)}function V6t(e){return U3(q3,{protocol:/^https?$/,hostname:mUe,...Ut(e)})}const hie=ut("ZodEmoji",(e,t)=>{n7e.init(e,t),Ma.init(e,t)});function Q6t(e){return Ire(hie,e)}const mie=ut("ZodNanoID",(e,t)=>{r7e.init(e,t),Ma.init(e,t)});function q6t(e){return jre(mie,e)}const pie=ut("ZodCUID",(e,t)=>{i7e.init(e,t),Ma.init(e,t)});function G6t(e){return Pre(pie,e)}const Aie=ut("ZodCUID2",(e,t)=>{a7e.init(e,t),Ma.init(e,t)});function W6t(e){return Mre(Aie,e)}const gie=ut("ZodULID",(e,t)=>{o7e.init(e,t),Ma.init(e,t)});function K6t(e){return Rre(gie,e)}const vie=ut("ZodXID",(e,t)=>{s7e.init(e,t),Ma.init(e,t)});function Y6t(e){return $re(vie,e)}const yie=ut("ZodKSUID",(e,t)=>{l7e.init(e,t),Ma.init(e,t)});function X6t(e){return Lre(yie,e)}const bie=ut("ZodIPv4",(e,t)=>{h7e.init(e,t),Ma.init(e,t)});function Z6t(e){return Ure(bie,e)}const xie=ut("ZodIPv6",(e,t)=>{m7e.init(e,t),Ma.init(e,t)});function J6t(e){return zre(xie,e)}const wie=ut("ZodCIDRv4",(e,t)=>{p7e.init(e,t),Ma.init(e,t)});function e8t(e){return Hre(wie,e)}const kie=ut("ZodCIDRv6",(e,t)=>{A7e.init(e,t),Ma.init(e,t)});function t8t(e){return Vre(kie,e)}const Sie=ut("ZodBase64",(e,t)=>{g7e.init(e,t),Ma.init(e,t)});function n8t(e){return Qre(Sie,e)}const Cie=ut("ZodBase64URL",(e,t)=>{y7e.init(e,t),Ma.init(e,t)});function r8t(e){return qre(Cie,e)}const _ie=ut("ZodE164",(e,t)=>{b7e.init(e,t),Ma.init(e,t)});function i8t(e){return Gre(_ie,e)}const Nie=ut("ZodJWT",(e,t)=>{w7e.init(e,t),Ma.init(e,t)});function a8t(e){return Wre(Nie,e)}const ND=ut("ZodCustomStringFormat",(e,t)=>{k7e.init(e,t),Ma.init(e,t)});function o8t(e,t,n={}){return _D(ND,e,t,n)}function s8t(e){return _D(ND,"hostname",Are,e)}function l8t(e){return _D(ND,"hex",DUe,e)}function c8t(e,t){const n=t?.enc??"hex",r=`${e}_${n}`,i=gre[r];if(!i)throw new Error(`Unrecognized hash format: ${r}`);return _D(ND,r,i,t)}const G3=ut("ZodNumber",(e,t)=>{xre.init(e,t),Yr.init(e,t),e.gt=(r,i)=>e.check(fx(r,i)),e.gte=(r,i)=>e.check(hd(r,i)),e.min=(r,i)=>e.check(hd(r,i)),e.lt=(r,i)=>e.check(dx(r,i)),e.lte=(r,i)=>e.check(Rh(r,i)),e.max=(r,i)=>e.check(Rh(r,i)),e.int=r=>e.check(tX(r)),e.safe=r=>e.check(tX(r)),e.positive=r=>e.check(fx(0,r)),e.nonnegative=r=>e.check(hd(0,r)),e.negative=r=>e.check(dx(0,r)),e.nonpositive=r=>e.check(Rh(0,r)),e.multipleOf=(r,i)=>e.check(gE(r,i)),e.step=(r,i)=>e.check(gE(r,i)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function x9e(e){return wze(G3,e)}const yC=ut("ZodNumberFormat",(e,t)=>{S7e.init(e,t),G3.init(e,t)});function tX(e){return Sze(yC,e)}function u8t(e){return Cze(yC,e)}function d8t(e){return _ze(yC,e)}function f8t(e){return Nze(yC,e)}function h8t(e){return Eze(yC,e)}const W3=ut("ZodBoolean",(e,t)=>{wre.init(e,t),Yr.init(e,t)});function Eie(e){return Fze(W3,e)}const K3=ut("ZodBigInt",(e,t)=>{kre.init(e,t),Yr.init(e,t),e.gte=(r,i)=>e.check(hd(r,i)),e.min=(r,i)=>e.check(hd(r,i)),e.gt=(r,i)=>e.check(fx(r,i)),e.gte=(r,i)=>e.check(hd(r,i)),e.min=(r,i)=>e.check(hd(r,i)),e.lt=(r,i)=>e.check(dx(r,i)),e.lte=(r,i)=>e.check(Rh(r,i)),e.max=(r,i)=>e.check(Rh(r,i)),e.positive=r=>e.check(fx(BigInt(0),r)),e.negative=r=>e.check(dx(BigInt(0),r)),e.nonpositive=r=>e.check(Rh(BigInt(0),r)),e.nonnegative=r=>e.check(hd(BigInt(0),r)),e.multipleOf=(r,i)=>e.check(gE(r,i));const n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function m8t(e){return Tze(K3,e)}const Fie=ut("ZodBigIntFormat",(e,t)=>{C7e.init(e,t),K3.init(e,t)});function p8t(e){return Bze(Fie,e)}function A8t(e){return Ize(Fie,e)}const w9e=ut("ZodSymbol",(e,t)=>{_7e.init(e,t),Yr.init(e,t)});function g8t(e){return jze(w9e,e)}const k9e=ut("ZodUndefined",(e,t)=>{N7e.init(e,t),Yr.init(e,t)});function v8t(e){return Pze(k9e,e)}const S9e=ut("ZodNull",(e,t)=>{E7e.init(e,t),Yr.init(e,t)});function C9e(e){return Mze(S9e,e)}const _9e=ut("ZodAny",(e,t)=>{F7e.init(e,t),Yr.init(e,t)});function y8t(){return Rze(_9e)}const N9e=ut("ZodUnknown",(e,t)=>{D7e.init(e,t),Yr.init(e,t)});function cS(){return $ze(N9e)}const E9e=ut("ZodNever",(e,t)=>{T7e.init(e,t),Yr.init(e,t)});function Die(e){return Lze(E9e,e)}const F9e=ut("ZodVoid",(e,t)=>{O7e.init(e,t),Yr.init(e,t)});function b8t(e){return Uze(F9e,e)}const Tie=ut("ZodDate",(e,t)=>{B7e.init(e,t),Yr.init(e,t),e.min=(r,i)=>e.check(hd(r,i)),e.max=(r,i)=>e.check(Rh(r,i));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function x8t(e){return zze(Tie,e)}const D9e=ut("ZodArray",(e,t)=>{I7e.init(e,t),Yr.init(e,t),e.element=t.element,e.min=(n,r)=>e.check(lS(n,r)),e.nonempty=n=>e.check(lS(1,n)),e.max=(n,r)=>e.check(H3(n,r)),e.length=(n,r)=>e.check(V3(n,r)),e.unwrap=()=>e.element});function ED(e,t){return Yze(D9e,e,t)}function w8t(e){const t=e._zod.def.shape;return Z3(Object.keys(t))}const Y3=ut("ZodObject",(e,t)=>{R7e.init(e,t),Yr.init(e,t),di(e,"shape",()=>t.shape),e.keyof=()=>Z3(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:cS()}),e.loose=()=>e.clone({...e._zod.def,catchall:cS()}),e.strict=()=>e.clone({...e._zod.def,catchall:Die()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>R8e(e,n),e.safeExtend=n=>$8e(e,n),e.merge=n=>L8e(e,n),e.pick=n=>P8e(e,n),e.omit=n=>M8e(e,n),e.partial=(...n)=>U8e(Pie,e,n[0]),e.required=(...n)=>z8e(Mie,e,n[0])});function X3(e,t){const n={type:"object",shape:e??{},...Ut(t)};return new Y3(n)}function k8t(e,t){return new Y3({type:"object",shape:e,catchall:Die(),...Ut(t)})}function S8t(e,t){return new Y3({type:"object",shape:e,catchall:cS(),...Ut(t)})}const Oie=ut("ZodUnion",(e,t)=>{Sre.init(e,t),Yr.init(e,t),e.options=t.options});function Bie(e,t){return new Oie({type:"union",options:e,...Ut(t)})}const T9e=ut("ZodDiscriminatedUnion",(e,t)=>{Oie.init(e,t),$7e.init(e,t)});function C8t(e,t,n){return new T9e({type:"union",options:t,discriminator:e,...Ut(n)})}const O9e=ut("ZodIntersection",(e,t)=>{L7e.init(e,t),Yr.init(e,t)});function B9e(e,t){return new O9e({type:"intersection",left:e,right:t})}const I9e=ut("ZodTuple",(e,t)=>{Cre.init(e,t),Yr.init(e,t),e.rest=n=>e.clone({...e._zod.def,rest:n})});function j9e(e,t,n){const r=t instanceof Pr,i=r?n:t,a=r?t:null;return new I9e({type:"tuple",items:e,rest:a,...Ut(i)})}const Iie=ut("ZodRecord",(e,t)=>{U7e.init(e,t),Yr.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function P9e(e,t,n){return new Iie({type:"record",keyType:e,valueType:t,...Ut(n)})}function _8t(e,t,n){const r=Qf(e);return r._zod.values=void 0,new Iie({type:"record",keyType:r,valueType:t,...Ut(n)})}const M9e=ut("ZodMap",(e,t)=>{z7e.init(e,t),Yr.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function N8t(e,t,n){return new M9e({type:"map",keyType:e,valueType:t,...Ut(n)})}const R9e=ut("ZodSet",(e,t)=>{H7e.init(e,t),Yr.init(e,t),e.min=(...n)=>e.check(vE(...n)),e.nonempty=n=>e.check(vE(1,n)),e.max=(...n)=>e.check(z3(...n)),e.size=(...n)=>e.check(Kre(...n))});function E8t(e,t){return new R9e({type:"set",valueType:e,...Ut(t)})}const yE=ut("ZodEnum",(e,t)=>{V7e.init(e,t),Yr.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{const a={};for(const o of r)if(n.has(o))a[o]=t.entries[o];else throw new Error(`Key ${o} not found in enum`);return new yE({...t,checks:[],...Ut(i),entries:a})},e.exclude=(r,i)=>{const a={...t.entries};for(const o of r)if(n.has(o))delete a[o];else throw new Error(`Key ${o} not found in enum`);return new yE({...t,checks:[],...Ut(i),entries:a})}});function Z3(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new yE({type:"enum",entries:n,...Ut(t)})}function F8t(e,t){return new yE({type:"enum",entries:e,...Ut(t)})}const $9e=ut("ZodLiteral",(e,t)=>{Q7e.init(e,t),Yr.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function D8t(e,t){return new $9e({type:"literal",values:Array.isArray(e)?e:[e],...Ut(t)})}const L9e=ut("ZodFile",(e,t)=>{q7e.init(e,t),Yr.init(e,t),e.min=(n,r)=>e.check(vE(n,r)),e.max=(n,r)=>e.check(z3(n,r)),e.mime=(n,r)=>e.check(nie(Array.isArray(n)?n:[n],r))});function T8t(e){return Xze(L9e,e)}const U9e=ut("ZodTransform",(e,t)=>{G7e.init(e,t),Yr.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new j3(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(oS(a,n.value,t));else{const o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=e),n.issues.push(oS(o))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(a=>(n.value=a,n)):(n.value=i,n)}});function jie(e){return new U9e({type:"transform",transform:e})}const Pie=ut("ZodOptional",(e,t)=>{W7e.init(e,t),Yr.init(e,t),e.unwrap=()=>e._zod.def.innerType});function OM(e){return new Pie({type:"optional",innerType:e})}const z9e=ut("ZodNullable",(e,t)=>{K7e.init(e,t),Yr.init(e,t),e.unwrap=()=>e._zod.def.innerType});function BM(e){return new z9e({type:"nullable",innerType:e})}function O8t(e){return OM(BM(e))}const H9e=ut("ZodDefault",(e,t)=>{Y7e.init(e,t),Yr.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function V9e(e,t){return new H9e({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():M3(t)}})}const Q9e=ut("ZodPrefault",(e,t)=>{X7e.init(e,t),Yr.init(e,t),e.unwrap=()=>e._zod.def.innerType});function q9e(e,t){return new Q9e({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():M3(t)}})}const Mie=ut("ZodNonOptional",(e,t)=>{Z7e.init(e,t),Yr.init(e,t),e.unwrap=()=>e._zod.def.innerType});function G9e(e,t){return new Mie({type:"nonoptional",innerType:e,...Ut(t)})}const W9e=ut("ZodSuccess",(e,t)=>{J7e.init(e,t),Yr.init(e,t),e.unwrap=()=>e._zod.def.innerType});function B8t(e){return new W9e({type:"success",innerType:e})}const K9e=ut("ZodCatch",(e,t)=>{eze.init(e,t),Yr.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Y9e(e,t){return new K9e({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const X9e=ut("ZodNaN",(e,t)=>{tze.init(e,t),Yr.init(e,t)});function I8t(e){return Vze(X9e,e)}const Rie=ut("ZodPipe",(e,t)=>{nze.init(e,t),Yr.init(e,t),e.in=t.in,e.out=t.out});function IM(e,t){return new Rie({type:"pipe",in:e,out:t})}const $ie=ut("ZodCodec",(e,t)=>{Rie.init(e,t),_re.init(e,t)});function j8t(e,t,n){return new $ie({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}const Z9e=ut("ZodReadonly",(e,t)=>{rze.init(e,t),Yr.init(e,t),e.unwrap=()=>e._zod.def.innerType});function J9e(e){return new Z9e({type:"readonly",innerType:e})}const eHe=ut("ZodTemplateLiteral",(e,t)=>{ize.init(e,t),Yr.init(e,t)});function P8t(e,t){return new eHe({type:"template_literal",parts:e,...Ut(t)})}const tHe=ut("ZodLazy",(e,t)=>{sze.init(e,t),Yr.init(e,t),e.unwrap=()=>e._zod.def.getter()});function nHe(e){return new tHe({type:"lazy",getter:e})}const rHe=ut("ZodPromise",(e,t)=>{oze.init(e,t),Yr.init(e,t),e.unwrap=()=>e._zod.def.innerType});function M8t(e){return new rHe({type:"promise",innerType:e})}const iHe=ut("ZodFunction",(e,t)=>{aze.init(e,t),Yr.init(e,t)});function Abe(e){return new iHe({type:"function",input:Array.isArray(e?.input)?j9e(e?.input):e?.input??ED(cS()),output:e?.output??cS()})}const J3=ut("ZodCustom",(e,t)=>{lze.init(e,t),Yr.init(e,t)});function R8t(e){const t=new $o({check:"custom"});return t._zod.check=e,t}function $8t(e,t){return Zze(J3,e??(()=>!0),t)}function aHe(e,t={}){return Jze(J3,e,t)}function oHe(e){return e9e(e)}function sHe(e,t={error:`Input not instance of ${e.name}`}){const n=new J3({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Ut(t)});return n._zod.bag.Class=e,n}const L8t=(...e)=>n9e({Codec:$ie,Boolean:W3,String:Q3},...e);function U8t(e){const t=nHe(()=>Bie([ky(e),x9e(),Eie(),C9e(),ED(t),P9e(ky(),t)]));return t}function z8t(e,t){return IM(jie(e),t)}const nX={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function H8t(e){Hc({customError:e})}function V8t(){return Hc().customError}var rX;rX||(rX={});function Q8t(e){return Aze(Q3,e)}function q8t(e){return kze(G3,e)}function G8t(e){return Dze(W3,e)}function W8t(e){return Oze(K3,e)}function K8t(e){return Hze(Tie,e)}const Y8t=Object.freeze(Object.defineProperty({__proto__:null,bigint:W8t,boolean:G8t,date:K8t,number:q8t,string:Q8t},Symbol.toStringTag,{value:"Module"}));Hc(cze());const Ch=Object.freeze(Object.defineProperty({__proto__:null,$brand:F8e,$input:mze,$output:hze,NEVER:E8e,TimePrecision:gze,ZodAny:_9e,ZodArray:D9e,ZodBase64:Sie,ZodBase64URL:Cie,ZodBigInt:K3,ZodBigIntFormat:Fie,ZodBoolean:W3,ZodCIDRv4:wie,ZodCIDRv6:kie,ZodCUID:pie,ZodCUID2:Aie,ZodCatch:K9e,ZodCodec:$ie,ZodCustom:J3,ZodCustomStringFormat:ND,ZodDate:Tie,ZodDefault:H9e,ZodDiscriminatedUnion:T9e,ZodE164:_ie,ZodEmail:fie,ZodEmoji:hie,ZodEnum:yE,ZodError:P6t,ZodFile:L9e,get ZodFirstPartyTypeKind(){return rX},ZodFunction:iHe,ZodGUID:TM,ZodIPv4:bie,ZodIPv6:xie,ZodISODate:lie,ZodISODateTime:sie,ZodISODuration:uie,ZodISOTime:cie,ZodIntersection:O9e,ZodIssueCode:nX,ZodJWT:Nie,ZodKSUID:yie,ZodLazy:tHe,ZodLiteral:$9e,ZodMap:M9e,ZodNaN:X9e,ZodNanoID:mie,ZodNever:E9e,ZodNonOptional:Mie,ZodNull:S9e,ZodNullable:z9e,ZodNumber:G3,ZodNumberFormat:yC,ZodObject:Y3,ZodOptional:Pie,ZodPipe:Rie,ZodPrefault:Q9e,ZodPromise:rHe,ZodReadonly:Z9e,ZodRealError:Od,ZodRecord:Iie,ZodSet:R9e,ZodString:Q3,ZodStringFormat:Ma,ZodSuccess:W9e,ZodSymbol:w9e,ZodTemplateLiteral:eHe,ZodTransform:U9e,ZodTuple:I9e,ZodType:Yr,ZodULID:gie,ZodURL:q3,ZodUUID:WA,ZodUndefined:k9e,ZodUnion:Oie,ZodUnknown:N9e,ZodVoid:F9e,ZodXID:vie,_ZodString:die,_default:V9e,_function:Abe,any:y8t,array:ED,base64:n8t,base64url:r8t,bigint:m8t,boolean:Eie,catch:Y9e,check:R8t,cidrv4:e8t,cidrv6:t8t,clone:Qf,codec:j8t,coerce:Y8t,config:Hc,core:I6t,cuid:G6t,cuid2:W6t,custom:$8t,date:x8t,decode:m9e,decodeAsync:A9e,discriminatedUnion:C8t,e164:i8t,email:M6t,emoji:Q6t,encode:h9e,encodeAsync:p9e,endsWith:tie,enum:Z3,file:T8t,flattenError:are,float32:u8t,float64:d8t,formatError:ore,function:Abe,getErrorMap:V8t,globalRegistry:Cb,gt:fx,gte:hd,guid:R6t,hash:c8t,hex:l8t,hostname:s8t,httpUrl:V6t,includes:Jre,instanceof:sHe,int:tX,int32:f8t,int64:p8t,intersection:B9e,ipv4:Z6t,ipv6:J6t,iso:j6t,json:U8t,jwt:a8t,keyof:w8t,ksuid:X6t,lazy:nHe,length:V3,literal:D8t,locales:fze,looseObject:S8t,lowercase:Xre,lt:dx,lte:Rh,map:N8t,maxLength:H3,maxSize:z3,mime:nie,minLength:lS,minSize:vE,multipleOf:gE,nan:I8t,nanoid:q6t,nativeEnum:F8t,negative:qze,never:Die,nonnegative:Wze,nonoptional:G9e,nonpositive:Gze,normalize:rie,null:C9e,nullable:BM,nullish:O8t,number:x9e,object:X3,optional:OM,overwrite:Zx,parse:c9e,parseAsync:u9e,partialRecord:_8t,pipe:IM,positive:Qze,prefault:q9e,preprocess:z8t,prettifyError:K8e,promise:M8t,property:Kze,readonly:J9e,record:P9e,refine:aHe,regex:Yre,regexes:gre,registry:Ere,safeDecode:v9e,safeDecodeAsync:b9e,safeEncode:g9e,safeEncodeAsync:y9e,safeParse:d9e,safeParseAsync:f9e,set:E8t,setErrorMap:H8t,size:Kre,startsWith:eie,strictObject:k8t,string:ky,stringFormat:o8t,stringbool:L8t,success:B8t,superRefine:oHe,symbol:g8t,templateLiteral:P8t,toJSONSchema:r9e,toLowerCase:aie,toUpperCase:oie,transform:jie,treeifyError:G8e,trim:iie,tuple:j9e,uint32:h8t,uint64:A8t,ulid:K6t,undefined:v8t,union:Bie,unknown:cS,uppercase:Zre,url:H6t,util:Q8e,uuid:$6t,uuidv4:L6t,uuidv6:U6t,uuidv7:z6t,void:b8t,xid:Y6t},Symbol.toStringTag,{value:"Module"})),gbe=(e,t,n)=>{if(e&&"reportValidity"in e){const r=nn(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},iX=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?gbe(r.ref,n,e):r&&r.refs&&r.refs.forEach(i=>gbe(i,n,e))}},vbe=(e,t)=>{t.shouldUseNativeValidation&&iX(e,t);const n={};for(const r in e){const i=nn(t.fields,r),a=Object.assign(e[r]||{},{ref:i&&i.ref});if(X8t(t.names||Object.keys(e),r)){const o=Object.assign({},nn(n,r));Mi(o,"root",a),Mi(n,r,o)}else Mi(n,r,a)}return n},X8t=(e,t)=>{const n=ybe(t);return e.some(r=>ybe(r).match(`^${n}\\.\\d+`))};function ybe(e){return e.replace(/\]|\[/g,"")}function bbe(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function Z8t(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(".");if(!n[o])if("unionErrors"in r){var s=r.unionErrors[0].errors[0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(u){return u.errors.forEach(function(f){return e.push(f)})}),t){var l=n[o].types,c=l&&l[r.code];n[o]=Wne(o,t,n,i,c?[].concat(c,r.message):r.message)}e.shift()}return n}function J8t(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(".");if(!n[o])if(r.code==="invalid_union"&&r.errors.length>0){var s=r.errors[0][0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:i};if(r.code==="invalid_union"&&r.errors.forEach(function(u){return u.forEach(function(f){return e.push(f)})}),t){var l=n[o].types,c=l&&l[r.code];n[o]=Wne(o,t,n,i,c?[].concat(c,r.message):r.message)}e.shift()}return n}function eL(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,i,a){try{return Promise.resolve(bbe(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(o){return a.shouldUseNativeValidation&&iX({},a),{errors:{},values:n.raw?Object.assign({},r):o}})},function(o){if((function(s){return Array.isArray(s?.issues)})(o))return{values:{},errors:vbe(Z8t(o.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,i,a){try{return Promise.resolve(bbe(function(){return Promise.resolve((n.mode==="sync"?NM:EM)(e,r,t)).then(function(o){return a.shouldUseNativeValidation&&iX({},a),{errors:{},values:n.raw?Object.assign({},r):o}})},function(o){if((function(s){return s instanceof L3})(o))return{values:{},errors:vbe(J8t(o.issues,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}};throw new Error("Invalid input: not a Zod schema")}var eUt="Label",lHe=w.forwardRef((e,t)=>d.jsx(wn.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));lHe.displayName=eUt;var tUt=lHe;function Mn({className:e,...t}){return d.jsx(tUt,{"data-slot":"label",className:St("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const oi=t4t,cHe=L.createContext({}),en=({...e})=>d.jsx(cHe.Provider,{value:{name:e.name},children:d.jsx(xt,{...e})}),Lie=()=>{const e=L.useContext(cHe),t=L.useContext(uHe),{getFieldState:n}=pD(),r=t6e({name:e.name}),i=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...i}},uHe=L.createContext({});function tn({className:e,...t}){const n=L.useId();return d.jsx(uHe.Provider,{value:{id:n},children:d.jsx("div",{"data-slot":"form-item",className:St("grid gap-2",e),...t})})}function gn({className:e,...t}){const{error:n,formItemId:r}=Lie();return d.jsx(Mn,{"data-slot":"form-label","data-error":!!n,className:St("data-[error=true]:text-red-500 dark:data-[error=true]:text-red-900",e),htmlFor:r,...t})}function fn({...e}){const{error:t,formItemId:n,formDescriptionId:r,formMessageId:i}=Lie();return d.jsx(Tne,{"data-slot":"form-control",id:n,"aria-describedby":t?`${r} ${i}`:String(r),"aria-invalid":!!t,...e})}function Tn({className:e,...t}){const{error:n,formMessageId:r}=Lie(),i=n?String(n?.message??""):t.children;return i?d.jsx("p",{"data-slot":"form-message",id:r,className:St("text-red-500 text-sm dark:text-red-900",e),...t,children:i}):null}function Cn({className:e,type:t,...n}){return d.jsx("input",{type:t,"data-slot":"input",className:St("file:text-gray-950 placeholder:text-gray-500 selection:bg-gray-900 selection:text-gray-50 dark:bg-gray-200/30 border-gray-200 flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:file:text-gray-50 dark:placeholder:text-gray-400 dark:selection:bg-gray-50 dark:selection:text-gray-900 dark:dark:bg-gray-800/30 dark:border-gray-800","focus-visible:border-gray-950 focus-visible:ring-gray-950/50 focus-visible:ring-[3px] dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50","aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",e),...n})}const nUt=X3({username:ky().min(2).max(50),password:ky().min(2).max(50)});function rUt(){const{authService:e}=w.useContext(FD);w.useEffect(()=>{e.logout()},[e]);const t=ZS(),n=fr({resolver:eL(nUt),defaultValues:{username:"",password:""}});function r(i){try{e.login(i.username,i.password).then(a=>{t("/")}),Qe.success("Success",{description:"You have successfully logged in."})}catch(a){console.error(a),Qe.error("Error",{description:"Invalid credentials. Please try again."})}}return d.jsxs("div",{className:"w-full flex flex-col justify-center items-center h-screen lg:grid lg:min-h-[200px] lg:grid-cols-2 xl:min-h-screen",children:[d.jsx("div",{className:"flex items-center justify-center",children:d.jsx(oi,{...n,children:d.jsxs("form",{onSubmit:n.handleSubmit(r),className:"space-y-8 w-[300px]",children:[d.jsxs("div",{className:"grid gap-2 text-center",children:[d.jsx("h1",{className:"text-3xl font-bold",children:"Accounter"}),d.jsx("h1",{className:"text-3xl font-bold",children:"Login"}),d.jsx("p",{className:"text-balance text-muted-foreground",children:"Enter your credentials to login."})]}),d.jsx(en,{control:n.control,name:"username",render:({field:i})=>d.jsxs(tn,{children:[d.jsx(gn,{children:"Username"}),d.jsx(fn,{children:d.jsx(Cn,{placeholder:"Username",...i})}),d.jsx(Tn,{})]})}),d.jsx(en,{control:n.control,name:"password",render:({field:i})=>d.jsxs(tn,{children:[d.jsx(gn,{children:"Password"}),d.jsx(fn,{children:d.jsx(Cn,{placeholder:"Password",type:"password",...i})}),d.jsx(Tn,{})]})}),d.jsx(qe,{disabled:n.formState.isSubmitting||!n.formState.isValid,className:"w-full font-semibold",type:"submit",children:"Login"})]})})}),d.jsx("div",{className:"hidden bg-muted lg:block bg-black rounded-tl-3xl rounded-bl-3xl",children:d.jsx("div",{className:"flex flex-row justify-center items-center h-screen",children:d.jsx("img",{src:"../../icons/guild-logo.svg",alt:"nature",className:"w-[100px] h-[100px] object-cover"})})})]})}const FD=w.createContext({authService:new N8e,setAuthService:()=>{}}),iUt=({children:e})=>{const[t,n]=w.useState(new N8e),r=ZS(),i=t.isLoggedIn();return w.useEffect(()=>{i||r("/login")},[i,r]),d.jsx(FD.Provider,{value:{authService:t,setAuthService:n},children:d.jsxs(MIe,{children:[d.jsx(Lr,{path:"/login",element:d.jsx(rUt,{})}),d.jsx(Lr,{path:"/network-error",element:d.jsx(E$t,{})}),d.jsx(Lr,{path:"*",element:e})]})})},pc=w.createContext({userContext:null,setUserContext:()=>{}});function aUt({children:e}){const{authService:t}=w.useContext(FD),[n,r]=w.useState(null),[i,a]=w.useState(null),[o,s]=w.useState(null),[{data:l,fetching:c},u]=rn({query:LDt,variables:{},pause:!0}),f=t.currentUser();return w.useEffect(()=>{Dd(f,i)||(a(f),u())},[f,i,u]),w.useEffect(()=>{l&&!c&&s(l.userContext)},[l,c]),w.useEffect(()=>{if(i&&o){const h=i&&o?{...i,context:o}:null;r(h)}},[o,i]),c?d.jsx(Vc,{}):d.jsx(pc.Provider,{value:{userContext:n,setUserContext:r},children:e})}function oUt(e){return!e||os(e)?null:encodeURIComponent(JSON.stringify(e))}function sUt({filter:e,setFilter:t,closeModal:n,single:r=!1}){const{control:i,handleSubmit:a}=fr({defaultValues:{...e}}),{selectableBusinesses:o,fetching:s}=Bu(),{userContext:l}=w.useContext(pc),c=f=>{t(f),n()};function u(){t({businessIDs:r?e.businessIDs:void 0}),n()}return d.jsxs(d.Fragment,{children:[s?d.jsx("div",{children:"Loading..."}):d.jsx("div",{}),d.jsxs("form",{onSubmit:a(c),children:[d.jsx(xt,{name:"ownerIds",control:i,defaultValue:e.ownerIds,render:({field:f,fieldState:h})=>d.jsx(dl,{...f,data:o,value:f.value??(l?.context.adminBusinessId?[l.context.adminBusinessId]:void 0),disabled:s,label:"Owners",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:h.error?.message})}),!r&&d.jsx(xt,{name:"businessIDs",control:i,defaultValue:e.businessIDs,render:({field:f,fieldState:h})=>d.jsx(dl,{...f,data:o,value:f.value??void 0,disabled:s,label:"Businesses",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:h.error?.message})}),d.jsx(xt,{name:"fromDate",control:i,defaultValue:e.fromDate,rules:{pattern:{value:_i,message:"Date must be im format yyyy-mm-dd"}},render:({field:f,fieldState:h})=>d.jsx(qi,{...f,onChange:m=>{const p=m?typeof m=="string"?m:Rt(m,"yyyy-MM-dd"):void 0;p!==f.value&&f.onChange(p)},value:f.value?new Date(f.value):void 0,error:h.error?.message,label:"From Date",popoverProps:{withinPortal:!0}})}),d.jsx(xt,{name:"toDate",control:i,defaultValue:e.toDate,rules:{pattern:{value:_i,message:"Date must be im format yyyy-mm-dd"}},render:({field:f,fieldState:h})=>d.jsx(qi,{...f,onChange:m=>{const p=m?typeof m=="string"?m:Rt(m,"yyyy-MM-dd"):void 0;p!==f.value&&f.onChange(p)},value:f.value?new Date(f.value):void 0,error:h.error?.message,label:"To Date",popoverProps:{withinPortal:!0}})}),d.jsx(xt,{name:"type",control:i,defaultValue:null,render:({field:f,fieldState:h})=>d.jsx(ai,{...f,onChange:m=>f.onChange(m==="NULL"?null:m),data:[{value:"NULL",label:"All"},{value:"BUSINESS",label:"Business"},{value:"TAX_CATEGORY",label:"Tax Category"}],error:h.error?.message,label:"Type"})}),d.jsxs("div",{className:"flex justify-center mt-5 gap-3",children:[d.jsx("button",{type:"submit",className:"text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-indigo-600 rounded-sm text-lg",children:"Filter"}),d.jsx("button",{type:"button",className:"text-white bg-orange-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-orange-600 rounded-sm text-lg",onClick:u,children:"Clear"}),d.jsx("button",{type:"button",className:"text-white bg-rose-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-rose-600 rounded-sm text-lg",onClick:n,children:"Cancel"})]})]})]})}function dHe({filter:e,setFilter:t}){const[n,r]=w.useState(!1),[i,a]=w.useState(!os(e)),{get:o,set:s}=gi();function l(u){return Object.entries(u??{}).filter(([h,m])=>m!==void 0&&Array.isArray(m)&&m.length>0).length>0}function c(u){u.fromDate?.trim()===""&&(u.fromDate=void 0),u.toDate?.trim()===""&&(u.toDate=void 0),Dd(u,e)||(t(u),a(l(u)))}return w.useEffect(()=>{const u=os(e)?null:encodeURIComponent(JSON.stringify(e)),f=o("transactionsFilters");u!==f&&s("transactionsFilters",u)},[e,o,s]),d.jsxs(d.Fragment,{children:[d.jsx(Qc,{opened:n,onClose:()=>r(!1),content:d.jsx(sUt,{single:!0,filter:e,setFilter:c,closeModal:()=>r(!1)})}),d.jsx(ba,{inline:!0,size:16,disabled:!i,children:d.jsx(qe,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>r(!0),children:d.jsx(Ul,{className:"size-5"})})})]})}function DD(e){const t=new URLSearchParams,n=oUt(e);return n&&t.append("transactionsFilters",n),`/business-transactions${t.size>0?`?${t}`:""}`}const lUt=()=>{const{get:e}=gi(),{setFiltersContext:t}=w.useContext(ra),[n,r]=w.useState(!1),[i,a]=w.useState(!1),[o,s]=w.useState(e("transactionsFilters")?JSON.parse(decodeURIComponent(e("transactionsFilters"))):{}),[{data:l,fetching:c}]=rn({query:O3e,variables:{filters:o}});w.useEffect(()=>{t(d.jsxs("div",{className:"flex flex-row gap-x-5",children:[d.jsx(dHe,{filter:o,setFilter:s}),d.jsx(zn,{label:"Expand all accounts",children:d.jsx(qe,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>r(h=>!h),children:n?d.jsx(Du,{className:"size-5"}):d.jsx(Tu,{className:"size-5"})})}),d.jsx(zn,{label:"Expand all currencies",children:d.jsx(qe,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>a(h=>!h),children:i?d.jsx(Y3e,{className:"size-5"}):d.jsx(K3e,{className:"size-5"})})})]}))},[l,o,t,s,n,r,i]);const u=w.useMemo(()=>l?.businessTransactionsSumFromLedgerRecords.__typename==="CommonError"?[]:l?.businessTransactionsSumFromLedgerRecords.businessTransactionsSum?l.businessTransactionsSumFromLedgerRecords.businessTransactionsSum.sort((h,m)=>h.business.name.localeCompare(m.business.name)):[],[l?.businessTransactionsSumFromLedgerRecords]),f=[{title:"Business Name",value:h=>h.business.name},{title:"Debit / Credit",value:h=>d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsx("p",{className:"flex flex-row gap-2 whitespace-nowrap",children:d.jsx(er,{c:"red",children:h.debit.formatted})}),d.jsx("p",{className:"flex flex-row gap-2 whitespace-nowrap",children:d.jsx(er,{c:"green",children:h.credit.formatted})})]}),style:{whiteSpace:"nowrap"}},{title:"Total",value:h=>d.jsx(er,{c:h.total.raw<-1e-4?"red":h.total.raw>1e-4?"green":void 0,fw:700,children:h.total.formatted}),style:{whiteSpace:"nowrap"}},...Ov(Qt.Eur),...Ov(Qt.Usd),...Ov(Qt.Gbp),...Ov(Qt.Cad),...Ov(Qt.Jpy),...Ov(Qt.Aud),...Ov(Qt.Sek),...cUt(i)];return d.jsx(Pa,{title:"Business Transactions",description:"Business Transactions Summery",children:c?d.jsx(si,{className:"h-10 w-10 animate-spin mr-2 self-center"}):d.jsxs(yo,{striped:!0,highlightOnHover:!0,children:[d.jsx("thead",{className:"sticky top-0 z-20",children:d.jsxs("tr",{className:"tracking-wider font-medium text-gray-900 text-sm bg-gray-100",children:[f.map((h,m)=>h.disabled?null:d.jsx("th",{children:h.title},String(m))),d.jsx("th",{children:"More Info"})]})}),d.jsx("tbody",{children:u.map((h,m)=>d.jsx(P3e,{columns:f,item:h,moreInfo:()=>d.jsx(S3,{businessID:h.business.id,filter:o}),isShowAll:n},m))})]})})};function Ov(e){return[{title:`${e} Debit / Credit`,value:t=>{const n=t.foreignCurrenciesSum.find(r=>r.currency===e);return n?d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsx("p",{className:"flex flex-row gap-2 whitespace-nowrap",children:d.jsx(er,{c:"red",children:n.debit.formatted})}),d.jsx("p",{className:"flex flex-row gap-2 whitespace-nowrap",children:d.jsx(er,{c:"green",children:n.credit.formatted})})]}):null},style:{whiteSpace:"nowrap"}},{title:`${e} Total`,value:t=>{const n=t.foreignCurrenciesSum.find(r=>r.currency===e);return n?.total?.raw&&(n.total.raw<-1e-4||n.total.raw>1e-4)?d.jsx(yy,{color:n.total.raw>0?"green":"red",children:n.total.formatted}):n?.total?.formatted},style:{whiteSpace:"nowrap"}}]}function cUt(e){return e?Object.values(Qt).filter(n=>!Ene.includes(n)).map(Ov).flat():[]}const uUt=({data:e})=>{const{get:t}=gi(),{counterparty:n,validationData:r,__typename:i}=$t(E3e,e),a=w.useMemo(()=>{switch(i){case"BusinessTripCharge":case"DividendCharge":case"ConversionCharge":case"SalaryCharge":case"InternalTransferCharge":return!1;default:return!0}},[i]),o=w.useMemo(()=>a&&r?.missingInfo?.includes(ly.Counterparty),[a,r?.missingInfo]),{name:s,id:l}=n??{name:"Missing",id:void 0},c=t("chargesFilters"),u=w.useCallback(f=>{const h=c?JSON.parse(decodeURIComponent(c)):{};return DD({fromDate:h.fromDate,toDate:h.toDate,ownerIds:h.byOwners,businessIDs:[f]})},[c]);return d.jsx("td",{children:d.jsx("div",{className:"flex flex-wrap",children:d.jsxs(ba,{inline:!0,size:12,disabled:!o,color:"red",zIndex:"auto",children:[!o&&l&&d.jsx("a",{href:u(l),target:"_blank",rel:"noreferrer",onClick:f=>f.stopPropagation(),children:d.jsx(Wh,{label:s,className:"[&>*>.mantine-NavLink-label]:font-semibold"})}),o&&s]})})})},dUt=({data:e})=>{const t=$t(q2t,e),{minDebitDate:n,minEventDate:r,minDocumentsDate:i}=t,a=n||r||i;return d.jsx("td",{children:d.jsx("div",{children:a&&Rt(new Date(a),"dd/MM/yy")})})},fUt="updateCharge",Uie=()=>{const[{fetching:e},t]=Hn(NDt),n=w.useCallback(async r=>{const i=`Error updating charge ID [${r.chargeId}]`,a=`${fUt}-${r.chargeId}`;Qe.loading("Updating charge",{id:a});try{const o=await t(r),s=Vn(o,i,a,"updateCharge");if(s)return Qe.success("Success",{id:a,description:"Charge updated"}),s.updateCharge.charge}catch(o){console.error(`${i}: ${o}`),Qe.error("Error",{id:a,description:i,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,updateCharge:n}},hUt=({data:e,onChange:t})=>{const[n,r]=w.useState(!1),i=$t(G2t,e),a=w.useMemo(()=>i?.validationData?.missingInfo?.includes(ly.Description),[i?.validationData?.missingInfo]),o=w.useMemo(()=>a&&!!i.missingInfoSuggestions?.description?.trim().length,[a,i.missingInfoSuggestions?.description]),{userDescription:s,id:l}=i,c=w.useMemo(()=>s&&s?.trim()!==""?s:i.missingInfoSuggestions?.description?i.missingInfoSuggestions.description:"Missing",[s,i.missingInfoSuggestions?.description]),{updateCharge:u,fetching:f}=Uie(),h=w.useCallback(async m=>{m!==void 0&&(await u({chargeId:l,fields:{userDescription:m}}),r(!0))},[l,u]);return d.jsxs("td",{children:[d.jsxs("div",{className:"flex flex-wrap",children:[d.jsx("div",{className:"flex flex-col justify-center",children:d.jsx(ba,{inline:!0,size:12,disabled:!a,color:"red",zIndex:"auto",children:d.jsx("p",{className:o?"bg-yellow-400":void 0,children:c})})}),o&&d.jsx(ID,{onClick:m=>{m.stopPropagation(),h(i.missingInfoSuggestions.description)},disabled:f})]}),d.jsx(uoe,{chargeId:l,description:i.missingInfoSuggestions?.description??void 0,open:n,onOpenChange:r,onClose:t})]})},mUt=({data:e})=>{const t=$t(W2t,e),{metadata:n,validationData:r,id:i,__typename:a}=t,o=w.useMemo(()=>{switch(a){case"BusinessTripCharge":case"ConversionCharge":case"DividendCharge":case"InternalTransferCharge":case"SalaryCharge":case"MonthlyVatCharge":case"BankDepositCharge":case"ForeignSecuritiesCharge":case"CreditcardBankCharge":case"FinancialCharge":return!1;default:return!0}},[a]),s=w.useMemo(()=>{switch(a){case"FinancialCharge":return!1;default:return!0}},[a]),l=w.useMemo(()=>s&&r?.missingInfo?.includes(ly.Transactions),[s,r?.missingInfo]),c=w.useMemo(()=>o&&r?.missingInfo?.includes(ly.Documents),[o,r?.missingInfo]),u=w.useMemo(()=>!n?.invalidLedger,[n?.invalidLedger]),f=w.useMemo(()=>n?.invalidLedger,[n?.invalidLedger]),h=w.useMemo(()=>{const m=[];return(l||n?.transactionsCount||s)&&m.push({extraClassName:n?.transactionsCount||!s?void 0:"bg-yellow-400",content:d.jsx(ba,{inline:!0,size:12,disabled:!l,color:"red",zIndex:"auto",children:d.jsxs("div",{className:"whitespace-nowrap",children:["Transactions: ",n?.transactionsCount??0]})},"transactions")}),m.push({content:d.jsx(ba,{inline:!0,size:12,processing:u,disabled:f==="VALID",color:f==="DIFF"?"orange":"red",zIndex:"auto",children:d.jsxs("div",{className:"whitespace-nowrap",children:["Ledger Records: ",n?.ledgerCount??0]})},"ledger")}),(c||n?.documentsCount)&&m.push({content:d.jsx(ba,{inline:!0,size:12,disabled:!c,color:"red",zIndex:"auto",children:d.jsxs("div",{className:"whitespace-nowrap",children:["Documents: ",n?.documentsCount??0]})},"documents"),extraClassName:!r?.missingInfo?.includes(ly.Documents)||!o?void 0:"bg-yellow-400"}),n?.miscExpensesCount&&m.push({content:d.jsxs("div",{className:"whitespace-nowrap",children:["Misc Expenses: ",n?.miscExpensesCount??0]})}),m},[n?.transactionsCount,n?.ledgerCount,n?.documentsCount,n?.miscExpensesCount,o,s,l,c,r?.missingInfo,f,u]);return d.jsx("td",{children:d.jsx(zan,{chargeId:i,children:d.jsx(Hae,{items:h})})})},pUt=({data:e,onChange:t})=>{const{tags:n,id:r,validationData:i,missingInfoSuggestions:a}=$t(F3e,e),{updateCharge:o,fetching:s}=Uie(),[l,c]=w.useState(n??[]),[u,f]=w.useState(!1),h=i?.missingInfo?.includes(ly.Tags),m=h&&!!a?.tags?.length;w.useEffect(()=>{n?.length&&!l.length&&c(n)},[n,l.length]),w.useEffect(()=>{l.length===0&&m&&c(a?.tags??[])},[l.length,m,a?.tags]);const p=w.useCallback(async A=>{await o({chargeId:r,fields:{tags:A?.map(v=>({id:v.id}))}}),f(!0)},[r,o]);return d.jsxs("td",{children:[d.jsx(ba,{inline:!0,size:12,disabled:!h,color:"red",zIndex:"auto",children:d.jsx(Hae,{items:l.map(A=>d.jsx(nS,{children:d.jsxs("div",{children:[A.namePath&&d.jsx(er,{size:"xs",opacity:.65,children:`${A.namePath.join(" > ")} >`}),d.jsx(er,{size:"sm",children:A.name})]})},A.id)),extraClassName:m?"bg-yellow-400":void 0})}),m&&d.jsx(ID,{onClick:A=>{A.stopPropagation(),p(a.tags)},disabled:s}),d.jsx(uoe,{chargeId:r,tagIds:a?.tags?.map(A=>({id:A.id})),open:u,onOpenChange:f,onClose:t})]})},AUt=({data:e})=>{const{validationData:t,taxCategory:n,__typename:r}=$t(D3e,e),i=w.useMemo(()=>{switch(r){case"DividendCharge":case"InternalTransferCharge":case"SalaryCharge":case"BankDepositCharge":case"ForeignSecuritiesCharge":return!1;default:return!0}},[r]),a=w.useMemo(()=>t?.missingInfo?.includes(ly.TaxCategory),[t?.missingInfo]);return i?d.jsx("td",{children:d.jsx(ba,{inline:!0,size:12,disabled:!a,color:"red",zIndex:"auto",children:n?.name??"N/A"})}):d.jsx("td",{})},gUt=({data:e})=>{const t=$t(K2t,e),{__typename:n}=t,{text:r,icon:i}=w.useMemo(()=>({text:kLe(n),icon:Ejt(n)}),[n]);return d.jsxs("td",{children:[d.jsx("div",{children:r}),d.jsx(gne,{radius:"xl",size:"xl",children:i})]})},vUt=({data:e})=>{const{vat:t,totalAmount:n,validationData:r,__typename:i}=$t(Y2t,e),a=w.useMemo(()=>r?.missingInfo?.includes(ly.Vat),[r?.missingInfo]),o=w.useMemo(()=>!t&&n?.currency===Qt.Ils,[t,n?.currency]),s=w.useMemo(()=>(t?.raw??0)>0&&(n?.raw??0)<0||(t?.raw??0)<0&&(n?.raw??0)>0,[t?.raw,n?.raw]),l=o||s;return w.useMemo(()=>{switch(i){case"BusinessTripCharge":case"DividendCharge":case"ConversionCharge":case"SalaryCharge":case"InternalTransferCharge":case"BankDepositCharge":case"ForeignSecuritiesCharge":case"CreditcardBankCharge":return!1;default:return!0}},[i])?d.jsx("td",{children:d.jsx("div",{className:l?"whitespace-nowrap text-red-500":"whitespace-nowrap text-green-700",children:d.jsx(ba,{inline:!0,size:12,disabled:!a,color:"red",zIndex:"auto",children:t?.formatted})})}):d.jsx("td",{})},yUt="deleteCharge",bUt=()=>{const[{fetching:e},t]=Hn(HFt),n=w.useCallback(async r=>{const i=`Error deleting charge ID [${r.chargeId}]`,a=`${yUt}-${r.chargeId}`;Qe.loading("Deleting charge",{id:a});try{const o=await t(r),s=Vn(o,i,a);if(s){if(s.deleteCharge===!1)throw new Error("Unsuccessful deletion");return Qe.success("Success",{id:a,description:"Charge was deleted"}),s.deleteCharge}}catch(o){console.error(`${i}: ${o}`),Qe.error("Error",{id:a,description:i,duration:1e5,closeButton:!0})}return!1},[t]);return{fetching:e,deleteCharge:n}},xUt="insertDepreciationRecord",wUt=()=>{const[{fetching:e},t]=Hn(FFt),n=w.useCallback(async r=>{const i="Error adding depreciation record",a=xUt;Qe.loading("Adding depreciation record",{id:a});try{const o=await t(r),s=Vn(o,i,a,"insertDepreciationRecord");if(s)return Qe.success("Success",{id:a,description:"Depreciation record was added"}),s.insertDepreciationRecord}catch(o){console.error(`${i}: ${o}`),Qe.error("Error",{id:a,description:i,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,addDepreciationRecord:n}};function xbe(e){const{chargeId:t,onAdd:n}=e,[r,{close:i,open:a}]=ss(!1);return d.jsxs(d.Fragment,{children:[d.jsx(zn,{label:"Add Depreciation Record",children:d.jsx(qe,{variant:"outline",size:"icon",className:"size-7.5",onClick:o=>{o.stopPropagation(),a()},children:d.jsx(mc,{className:"size-5"})})}),r&&d.jsx(kUt,{chargeId:t,opened:r,close:i,onAdd:n})]})}function kUt({chargeId:e,opened:t,close:n,onAdd:r}){const{control:i,handleSubmit:a}=fr({defaultValues:{chargeId:e}}),[o,s]=w.useState(!1),[{data:l,fetching:c}]=rn({query:B3e}),{addDepreciationRecord:u,fetching:f}=wUt(),h=p=>{u({fields:p}).then(()=>{r?.(),n()})},m=l?.depreciationCategories?.map(p=>({value:p.id,label:p.name}))??[];return w.useEffect(()=>{s(!!(c||f))},[c,f]),d.jsxs(_r,{opened:t,onClose:n,centered:!0,lockScroll:!0,children:[d.jsx(_r.Title,{children:"Add Depreciation Record"}),d.jsx(_r.Body,{children:d.jsxs("form",{onSubmit:a(h),children:[d.jsx(xt,{name:"activationDate",control:i,rules:{pattern:{value:_i,message:"Date must be im format yyyy-mm-dd"}},render:({field:{value:p,...A}})=>{const v=p?new Date(p):void 0;return d.jsx(qi,{...A,onChange:y=>{const x=y?typeof y=="string"?y:Rt(y,"yyyy-MM-dd"):void 0;x!==p&&A.onChange(x)},value:v,label:"Activation Date",popoverProps:{withinPortal:!0}})}}),d.jsx(xt,{name:"amount",control:i,render:({field:p,fieldState:A})=>d.jsx(xt,{name:"currency",control:i,render:({field:v,fieldState:y})=>d.jsx(Aa,{...p,value:p.value??void 0,error:A.error?.message||y.error?.message,label:"Amount",currencyCodeProps:{...v,label:"Currency"}})})}),d.jsx(xt,{name:"categoryId",control:i,render:({field:p,fieldState:A})=>d.jsx(ai,{...p,disabled:c,data:m,label:"Category",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:A.error?.message,withinPortal:!0})}),d.jsx(xt,{name:"type",control:i,render:({field:p,fieldState:A})=>d.jsx(ai,{...p,data:BHe,value:p.value,label:"Type",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:A.error?.message,withinPortal:!0})}),d.jsx("div",{className:"flex justify-center mt-5 gap-3",children:d.jsx("button",{type:"submit",className:"text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-indigo-600 rounded-sm text-lg",children:"Add"})})]})}),(f||o)&&d.jsx(em,{blur:1,center:!0,children:d.jsx(ao,{})})]})}const SUt="updateDepreciationRecord",CUt=()=>{const[{fetching:e},t]=Hn(EDt),n=w.useCallback(async r=>{const i="Error updating depreciation record",a=SUt;Qe.loading("Updating depreciation record",{id:a});try{const o=await t(r),s=Vn(o,i,a,"updateDepreciationRecord");if(s)return Qe.success("Success",{id:a,description:"Depreciation record was updated"}),s.updateDepreciationRecord}catch(o){console.error(`${i}: ${o}`),Qe.error("Error",{id:a,description:i,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,updateDepreciationRecord:n}},_Ut="deleteDepreciationRecord",NUt=()=>{const[{fetching:e},t]=Hn(VFt),n=w.useCallback(async r=>{const i="Error deleting depreciation record",a=`${_Ut}-${r.depreciationRecordId}`;Qe.loading("Deleting depreciation record",{id:a});try{const o=await t(r),s=Vn(o,i,a);if(s)return Qe.success("Success",{id:a,description:"Depreciation record was deleted"}),s.deleteDepreciationRecord}catch(o){console.error(`${i}: ${o}`),Qe.error("Error",{id:a,description:i,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,deleteDepreciationRecord:n}};function ln(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function EUt(e,t){const n=w.createContext(t),r=a=>{const{children:o,...s}=a,l=w.useMemo(()=>s,Object.values(s));return d.jsx(n.Provider,{value:l,children:o})};r.displayName=e+"Provider";function i(a){const o=w.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function Ac(e,t=[]){let n=[];function r(a,o){const s=w.createContext(o),l=n.length;n=[...n,o];const c=f=>{const{scope:h,children:m,...p}=f,A=h?.[e]?.[l]||s,v=w.useMemo(()=>p,Object.values(p));return d.jsx(A.Provider,{value:v,children:m})};c.displayName=a+"Provider";function u(f,h){const m=h?.[e]?.[l]||s,p=w.useContext(m);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[c,u]}const i=()=>{const a=n.map(o=>w.createContext(o));return function(s){const l=s?.[e]||a;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,FUt(i,...t)]}function FUt(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:l,scopeName:c})=>{const f=l(a)[`__scope${c}`];return{...s,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var cs=globalThis?.document?w.useLayoutEffect:()=>{},DUt=ox[" useId ".trim().toString()]||(()=>{}),TUt=0;function Ns(e){const[t,n]=w.useState(DUt());return cs(()=>{n(r=>r??String(TUt++))},[e]),e||(t?`radix-${t}`:"")}var OUt=ox[" useInsertionEffect ".trim().toString()]||cs;function Cd({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,o]=BUt({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:i;{const u=w.useRef(e!==void 0);w.useEffect(()=>{const f=u.current;f!==s&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=s},[s,r])}const c=w.useCallback(u=>{if(s){const f=IUt(u)?u(e):u;f!==e&&o.current?.(f)}else a(u)},[s,e,a,o]);return[l,c]}function BUt({defaultProp:e,onChange:t}){const[n,r]=w.useState(e),i=w.useRef(n),a=w.useRef(t);return OUt(()=>{a.current=t},[t]),w.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function IUt(e){return typeof e=="function"}function cl(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>t.current?.(...n),[])}function jUt(e,t=globalThis?.document){const n=cl(e);w.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var PUt="DismissableLayer",aX="dismissableLayer.update",MUt="dismissableLayer.pointerDownOutside",RUt="dismissableLayer.focusOutside",wbe,fHe=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bC=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=e,c=w.useContext(fHe),[u,f]=w.useState(null),h=u?.ownerDocument??globalThis?.document,[,m]=w.useState({}),p=Vr(t,E=>f(E)),A=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=A.indexOf(v),x=u?A.indexOf(u):-1,k=c.layersWithOutsidePointerEventsDisabled.size>0,S=x>=y,C=UUt(E=>{const D=E.target,T=[...c.branches].some(j=>j.contains(D));!S||T||(i?.(E),o?.(E),E.defaultPrevented||s?.())},h),N=zUt(E=>{const D=E.target;[...c.branches].some(j=>j.contains(D))||(a?.(E),o?.(E),E.defaultPrevented||s?.())},h);return jUt(E=>{x===c.layers.size-1&&(r?.(E),!E.defaultPrevented&&s&&(E.preventDefault(),s()))},h),w.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(wbe=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),kbe(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=wbe)}},[u,h,n,c]),w.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),kbe())},[u,c]),w.useEffect(()=>{const E=()=>m({});return document.addEventListener(aX,E),()=>document.removeEventListener(aX,E)},[]),d.jsx(wn.div,{...l,ref:p,style:{pointerEvents:k?S?"auto":"none":void 0,...e.style},onFocusCapture:ln(e.onFocusCapture,N.onFocusCapture),onBlurCapture:ln(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:ln(e.onPointerDownCapture,C.onPointerDownCapture)})});bC.displayName=PUt;var $Ut="DismissableLayerBranch",LUt=w.forwardRef((e,t)=>{const n=w.useContext(fHe),r=w.useRef(null),i=Vr(t,r);return w.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),d.jsx(wn.div,{...e,ref:i})});LUt.displayName=$Ut;function UUt(e,t=globalThis?.document){const n=cl(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let l=function(){hHe(MUt,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function zUt(e,t=globalThis?.document){const n=cl(e),r=w.useRef(!1);return w.useEffect(()=>{const i=a=>{a.target&&!r.current&&hHe(RUt,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function kbe(){const e=new CustomEvent(aX);document.dispatchEvent(e)}function hHe(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?NLe(i,a):i.dispatchEvent(a)}var Q9="focusScope.autoFocusOnMount",q9="focusScope.autoFocusOnUnmount",Sbe={bubbles:!1,cancelable:!0},HUt="FocusScope",TD=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,l]=w.useState(null),c=cl(i),u=cl(a),f=w.useRef(null),h=Vr(t,A=>l(A)),m=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let A=function(k){if(m.paused||!s)return;const S=k.target;s.contains(S)?f.current=S:Bv(f.current,{select:!0})},v=function(k){if(m.paused||!s)return;const S=k.relatedTarget;S!==null&&(s.contains(S)||Bv(f.current,{select:!0}))},y=function(k){if(document.activeElement===document.body)for(const C of k)C.removedNodes.length>0&&Bv(s)};document.addEventListener("focusin",A),document.addEventListener("focusout",v);const x=new MutationObserver(y);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",A),document.removeEventListener("focusout",v),x.disconnect()}}},[r,s,m.paused]),w.useEffect(()=>{if(s){_be.add(m);const A=document.activeElement;if(!s.contains(A)){const y=new CustomEvent(Q9,Sbe);s.addEventListener(Q9,c),s.dispatchEvent(y),y.defaultPrevented||(VUt(KUt(mHe(s)),{select:!0}),document.activeElement===A&&Bv(s))}return()=>{s.removeEventListener(Q9,c),setTimeout(()=>{const y=new CustomEvent(q9,Sbe);s.addEventListener(q9,u),s.dispatchEvent(y),y.defaultPrevented||Bv(A??document.body,{select:!0}),s.removeEventListener(q9,u),_be.remove(m)},0)}}},[s,c,u,m]);const p=w.useCallback(A=>{if(!n&&!r||m.paused)return;const v=A.key==="Tab"&&!A.altKey&&!A.ctrlKey&&!A.metaKey,y=document.activeElement;if(v&&y){const x=A.currentTarget,[k,S]=QUt(x);k&&S?!A.shiftKey&&y===S?(A.preventDefault(),n&&Bv(k,{select:!0})):A.shiftKey&&y===k&&(A.preventDefault(),n&&Bv(S,{select:!0})):y===x&&A.preventDefault()}},[n,r,m.paused]);return d.jsx(wn.div,{tabIndex:-1,...o,ref:h,onKeyDown:p})});TD.displayName=HUt;function VUt(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Bv(r,{select:t}),document.activeElement!==n)return}function QUt(e){const t=mHe(e),n=Cbe(t,e),r=Cbe(t.reverse(),e);return[n,r]}function mHe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Cbe(e,t){for(const n of e)if(!qUt(n,{upTo:t}))return n}function qUt(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function GUt(e){return e instanceof HTMLInputElement&&"select"in e}function Bv(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&GUt(e)&&t&&e.select()}}var _be=WUt();function WUt(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Nbe(e,t),e.unshift(t)},remove(t){e=Nbe(e,t),e[0]?.resume()}}}function Nbe(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function KUt(e){return e.filter(t=>t.tagName!=="A")}var YUt="Portal",xC=w.forwardRef((e,t)=>{const{container:n,...r}=e,[i,a]=w.useState(!1);cs(()=>a(!0),[]);const o=n||i&&globalThis?.document?.body;return o?HIe.createPortal(d.jsx(wn.div,{...r,ref:t}),o):null});xC.displayName=YUt;function XUt(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var Ws=e=>{const{present:t,children:n}=e,r=ZUt(t),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),a=Vr(r.ref,JUt(i));return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:a}):null};Ws.displayName="Presence";function ZUt(e){const[t,n]=w.useState(),r=w.useRef(null),i=w.useRef(e),a=w.useRef("none"),o=e?"mounted":"unmounted",[s,l]=XUt(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const c=I5(r.current);a.current=s==="mounted"?c:"none"},[s]),cs(()=>{const c=r.current,u=i.current;if(u!==e){const h=a.current,m=I5(c);e?l("MOUNT"):m==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&h!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),cs(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,f=m=>{const A=I5(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&A&&(l("ANIMATION_END"),!i.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=m=>{m.target===t&&(a.current=I5(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:w.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function I5(e){return e?.animationName||"none"}function JUt(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var G9=0;function tL(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ebe()),document.body.insertAdjacentElement("beforeend",e[1]??Ebe()),G9++,()=>{G9===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),G9--}},[])}function Ebe(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var nL="Dialog",[pHe]=Ac(nL),[e7t,nm]=pHe(nL),AHe=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=w.useRef(null),l=w.useRef(null),[c,u]=Cd({prop:r,defaultProp:i??!1,onChange:a,caller:nL});return d.jsx(e7t,{scope:t,triggerRef:s,contentRef:l,contentId:Ns(),titleId:Ns(),descriptionId:Ns(),open:c,onOpenChange:u,onOpenToggle:w.useCallback(()=>u(f=>!f),[u]),modal:o,children:n})};AHe.displayName=nL;var gHe="DialogTrigger",vHe=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=nm(gHe,n),a=Vr(t,i.triggerRef);return d.jsx(wn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Vie(i.open),...r,ref:a,onClick:ln(e.onClick,i.onOpenToggle)})});vHe.displayName=gHe;var zie="DialogPortal",[t7t,yHe]=pHe(zie,{forceMount:void 0}),bHe=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=nm(zie,t);return d.jsx(t7t,{scope:t,forceMount:n,children:w.Children.map(r,o=>d.jsx(Ws,{present:n||a.open,children:d.jsx(xC,{asChild:!0,container:i,children:o})}))})};bHe.displayName=zie;var jM="DialogOverlay",xHe=w.forwardRef((e,t)=>{const n=yHe(jM,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=nm(jM,e.__scopeDialog);return a.modal?d.jsx(Ws,{present:r||a.open,children:d.jsx(r7t,{...i,ref:t})}):null});xHe.displayName=jM;var n7t=by("DialogOverlay.RemoveScroll"),r7t=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=nm(jM,n);return d.jsx(rC,{as:n7t,allowPinchZoom:!0,shards:[i.contentRef],children:d.jsx(wn.div,{"data-state":Vie(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),hx="DialogContent",wHe=w.forwardRef((e,t)=>{const n=yHe(hx,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=nm(hx,e.__scopeDialog);return d.jsx(Ws,{present:r||a.open,children:a.modal?d.jsx(i7t,{...i,ref:t}):d.jsx(a7t,{...i,ref:t})})});wHe.displayName=hx;var i7t=w.forwardRef((e,t)=>{const n=nm(hx,e.__scopeDialog),r=w.useRef(null),i=Vr(t,n.contentRef,r);return w.useEffect(()=>{const a=r.current;if(a)return c3(a)},[]),d.jsx(kHe,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ln(e.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:ln(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:ln(e.onFocusOutside,a=>a.preventDefault())})}),a7t=w.forwardRef((e,t)=>{const n=nm(hx,e.__scopeDialog),r=w.useRef(!1),i=w.useRef(!1);return d.jsx(kHe,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;n.triggerRef.current?.contains(o)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),kHe=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=nm(hx,n),l=w.useRef(null),c=Vr(t,l);return tL(),d.jsxs(d.Fragment,{children:[d.jsx(TD,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:d.jsx(bC,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Vie(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(o7t,{titleId:s.titleId}),d.jsx(l7t,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Hie="DialogTitle",SHe=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=nm(Hie,n);return d.jsx(wn.h2,{id:i.titleId,...r,ref:t})});SHe.displayName=Hie;var CHe="DialogDescription",_He=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=nm(CHe,n);return d.jsx(wn.p,{id:i.descriptionId,...r,ref:t})});_He.displayName=CHe;var NHe="DialogClose",EHe=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=nm(NHe,n);return d.jsx(wn.button,{type:"button",...r,ref:t,onClick:ln(e.onClick,()=>i.onOpenChange(!1))})});EHe.displayName=NHe;function Vie(e){return e?"open":"closed"}var FHe="DialogTitleWarning",[JWn,DHe]=EUt(FHe,{contentName:hx,titleName:Hie,docsSlug:"dialog"}),o7t=({titleId:e})=>{const t=DHe(FHe),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
667
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of this.seen.entries()){const f=u[1];if(t===u[0]){o(u);continue}if(r.external){const m=r.external.registry.get(u[0])?.id;if(t!==u[0]&&m){o(u);continue}}if(this.metadataRegistry.get(u[0])?.id){o(u);continue}if(f.cycle){o(u);continue}if(f.count>1&&r.reused==="ref"){o(u);continue}}const s=(u,f)=>{const h=this.seen.get(u),m=h.def??h.schema,p={...m};if(h.ref===null)return;const A=h.ref;if(h.ref=null,A){s(A,f);const v=this.seen.get(A).schema;v.$ref&&(f.target==="draft-7"||f.target==="draft-4"||f.target==="openapi-3.0")?(m.allOf=m.allOf??[],m.allOf.push(v)):(Object.assign(m,v),Object.assign(m,p))}h.isParent||this.override({zodSchema:u,jsonSchema:m,path:h.path??[]})};for(const u of[...this.seen.entries()].reverse())s(u[0],{target:this.target});const l={};if(this.target==="draft-2020-12"?l.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?l.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?l.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),r.external?.uri){const u=r.external.registry.get(t)?.id;if(!u)throw new Error("Schema is missing an `id` property");l.$id=r.external.uri(u)}Object.assign(l,i.def);const c=r.external?.defs??{};for(const u of this.seen.entries()){const f=u[1];f.def&&f.defId&&(c[f.defId]=f.def)}r.external||Object.keys(c).length>0&&(this.target==="draft-2020-12"?l.$defs=c:l.definitions=c);try{return JSON.parse(JSON.stringify(l))}catch{throw new Error("Error converting schema to JSON.")}}}function r9e(e,t){if(e instanceof Nre){const r=new eX(t),i={};for(const s of e._idmap.entries()){const[l,c]=s;r.process(c)}const a={},o={registry:e,uri:t?.uri,defs:i};for(const s of e._idmap.entries()){const[l,c]=s;a[l]=r.emit(c,{...t,external:o})}if(Object.keys(i).length>0){const s=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[s]:i}}return{schemas:a}}const n=new eX(t);return n.process(e),n.emit(e,t)}function Ls(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const i=e._zod.def;switch(i.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Ls(i.element,n);case"object":{for(const a in i.shape)if(Ls(i.shape[a],n))return!0;return!1}case"union":{for(const a of i.options)if(Ls(a,n))return!0;return!1}case"intersection":return Ls(i.left,n)||Ls(i.right,n);case"tuple":{for(const a of i.items)if(Ls(a,n))return!0;return!!(i.rest&&Ls(i.rest,n))}case"record":return Ls(i.keyType,n)||Ls(i.valueType,n);case"map":return Ls(i.keyType,n)||Ls(i.valueType,n);case"set":return Ls(i.valueType,n);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Ls(i.innerType,n);case"lazy":return Ls(i.getter(),n);case"default":return Ls(i.innerType,n);case"prefault":return Ls(i.innerType,n);case"custom":return!1;case"transform":return!0;case"pipe":return Ls(i.in,n)||Ls(i.out,n);case"success":return!1;case"catch":return!1;case"function":return!1}throw new Error(`Unknown schema type: ${i.type}`)}const B6t=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),I6t=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:F7e,$ZodArray:I7e,$ZodAsyncError:Qb,$ZodBase64:g7e,$ZodBase64URL:y7e,$ZodBigInt:kre,$ZodBigIntFormat:C7e,$ZodBoolean:wre,$ZodCIDRv4:p7e,$ZodCIDRv6:A7e,$ZodCUID:i7e,$ZodCUID2:a7e,$ZodCatch:eze,$ZodCheck:$o,$ZodCheckBigIntFormat:IUe,$ZodCheckEndsWith:qUe,$ZodCheckGreaterThan:yre,$ZodCheckIncludes:VUe,$ZodCheckLengthEquals:LUe,$ZodCheckLessThan:vre,$ZodCheckLowerCase:zUe,$ZodCheckMaxLength:RUe,$ZodCheckMaxSize:jUe,$ZodCheckMimeType:WUe,$ZodCheckMinLength:$Ue,$ZodCheckMinSize:PUe,$ZodCheckMultipleOf:OUe,$ZodCheckNumberFormat:BUe,$ZodCheckOverwrite:KUe,$ZodCheckProperty:GUe,$ZodCheckRegex:UUe,$ZodCheckSizeEquals:MUe,$ZodCheckStartsWith:QUe,$ZodCheckStringFormat:SD,$ZodCheckUpperCase:HUe,$ZodCodec:_re,$ZodCustom:lze,$ZodCustomStringFormat:k7e,$ZodDate:B7e,$ZodDefault:Y7e,$ZodDiscriminatedUnion:$7e,$ZodE164:b7e,$ZodEmail:e7e,$ZodEmoji:n7e,$ZodEncodeError:j3,$ZodEnum:V7e,$ZodError:L3,$ZodFile:q7e,$ZodFunction:aze,$ZodGUID:ZUe,$ZodIPv4:h7e,$ZodIPv6:m7e,$ZodISODate:u7e,$ZodISODateTime:c7e,$ZodISODuration:f7e,$ZodISOTime:d7e,$ZodIntersection:L7e,$ZodJWT:w7e,$ZodKSUID:l7e,$ZodLazy:sze,$ZodLiteral:Q7e,$ZodMap:z7e,$ZodNaN:tze,$ZodNanoID:r7e,$ZodNever:T7e,$ZodNonOptional:Z7e,$ZodNull:E7e,$ZodNullable:K7e,$ZodNumber:xre,$ZodNumberFormat:S7e,$ZodObject:M7e,$ZodObjectJIT:R7e,$ZodOptional:W7e,$ZodPipe:nze,$ZodPrefault:X7e,$ZodPromise:oze,$ZodReadonly:rze,$ZodRealError:Td,$ZodRecord:U7e,$ZodRegistry:Nre,$ZodSet:H7e,$ZodString:CD,$ZodStringFormat:Sa,$ZodSuccess:J7e,$ZodSymbol:_7e,$ZodTemplateLiteral:ize,$ZodTransform:G7e,$ZodTuple:Cre,$ZodType:Pr,$ZodULID:o7e,$ZodURL:t7e,$ZodUUID:JUe,$ZodUndefined:N7e,$ZodUnion:Sre,$ZodUnknown:D7e,$ZodVoid:O7e,$ZodXID:s7e,$brand:F8e,$constructor:ut,$input:mze,$output:hze,Doc:YUe,JSONSchema:B6t,JSONSchemaGenerator:eX,NEVER:E8e,TimePrecision:gze,_any:Rze,_array:Yze,_base64:Qre,_base64url:qre,_bigint:Tze,_boolean:Fze,_catch:N6t,_check:t9e,_cidrv4:Hre,_cidrv6:Vre,_coercedBigint:Oze,_coercedBoolean:Dze,_coercedDate:Hze,_coercedNumber:kze,_coercedString:Aze,_cuid:Pre,_cuid2:Mre,_custom:Zze,_date:zze,_decode:lre,_decodeAsync:ure,_default:S6t,_discriminatedUnion:f6t,_e164:Gre,_email:Fre,_emoji:Ire,_encode:sre,_encodeAsync:cre,_endsWith:tie,_enum:v6t,_file:Xze,_float32:Cze,_float64:_ze,_gt:fx,_gte:hd,_guid:DM,_includes:Jre,_int:Sze,_int32:Nze,_int64:Bze,_intersection:h6t,_ipv4:Ure,_ipv6:zre,_isoDate:yze,_isoDateTime:vze,_isoDuration:xze,_isoTime:bze,_jwt:Wre,_ksuid:Lre,_lazy:T6t,_length:V3,_literal:b6t,_lowercase:Xre,_lt:dx,_lte:Rh,_map:A6t,_max:Rh,_maxLength:H3,_maxSize:z3,_mime:nie,_min:hd,_minLength:lS,_minSize:vE,_multipleOf:gE,_nan:Vze,_nanoid:jre,_nativeEnum:y6t,_negative:qze,_never:Lze,_nonnegative:Wze,_nonoptional:C6t,_nonpositive:Gze,_normalize:rie,_null:Mze,_nullable:k6t,_number:wze,_optional:w6t,_overwrite:Zx,_parse:vD,_parseAsync:yD,_pipe:E6t,_positive:Qze,_promise:O6t,_property:Kze,_readonly:F6t,_record:p6t,_refine:Jze,_regex:Yre,_safeDecode:fre,_safeDecodeAsync:mre,_safeEncode:dre,_safeEncodeAsync:hre,_safeParse:bD,_safeParseAsync:xD,_set:g6t,_size:Kre,_startsWith:eie,_string:pze,_stringFormat:_D,_stringbool:n9e,_success:_6t,_superRefine:e9e,_symbol:jze,_templateLiteral:D6t,_toLowerCase:aie,_toUpperCase:oie,_transform:x6t,_trim:iie,_tuple:m6t,_uint32:Eze,_uint64:Ize,_ulid:Rre,_undefined:Pze,_union:d6t,_unknown:$ze,_uppercase:Zre,_url:U3,_uuid:Dre,_uuidv4:Tre,_uuidv6:Ore,_uuidv7:Bre,_void:Uze,_xid:$re,clone:Qf,config:Hc,decode:K$t,decodeAsync:X$t,encode:W$t,encodeAsync:Y$t,flattenError:are,formatError:ore,globalConfig:SM,globalRegistry:Cb,isValidBase64:bre,isValidBase64URL:v7e,isValidJWT:x7e,locales:fze,parse:NM,parseAsync:EM,prettifyError:K8e,regexes:gre,registry:Ere,safeDecode:J$t,safeDecodeAsync:t3t,safeEncode:Z$t,safeEncodeAsync:e3t,safeParse:Y8e,safeParseAsync:X8e,toDotPath:W8e,toJSONSchema:r9e,treeifyError:G8e,util:Q8e,version:XUe},Symbol.toStringTag,{value:"Module"})),sie=ut("ZodISODateTime",(e,t)=>{c7e.init(e,t),Ma.init(e,t)});function i9e(e){return vze(sie,e)}const lie=ut("ZodISODate",(e,t)=>{u7e.init(e,t),Ma.init(e,t)});function a9e(e){return yze(lie,e)}const cie=ut("ZodISOTime",(e,t)=>{d7e.init(e,t),Ma.init(e,t)});function o9e(e){return bze(cie,e)}const uie=ut("ZodISODuration",(e,t)=>{f7e.init(e,t),Ma.init(e,t)});function s9e(e){return xze(uie,e)}const j6t=Object.freeze(Object.defineProperty({__proto__:null,ZodISODate:lie,ZodISODateTime:sie,ZodISODuration:uie,ZodISOTime:cie,date:a9e,datetime:i9e,duration:s9e,time:o9e},Symbol.toStringTag,{value:"Module"})),l9e=(e,t)=>{L3.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>ore(e,n)},flatten:{value:n=>are(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,CM,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,CM,2)}},isEmpty:{get(){return e.issues.length===0}}})},P6t=ut("ZodError",l9e),Od=ut("ZodError",l9e,{Parent:Error}),c9e=vD(Od),u9e=yD(Od),d9e=bD(Od),f9e=xD(Od),h9e=sre(Od),m9e=lre(Od),p9e=cre(Od),A9e=ure(Od),g9e=dre(Od),v9e=fre(Od),y9e=hre(Od),b9e=mre(Od),Yr=ut("ZodType",(e,t)=>(Pr.init(e,t),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Eg(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]})),e.clone=(n,r)=>Qf(e,n,r),e.brand=()=>e,e.register=((n,r)=>(n.add(e,r),e)),e.parse=(n,r)=>c9e(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>d9e(e,n,r),e.parseAsync=async(n,r)=>u9e(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>f9e(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>h9e(e,n,r),e.decode=(n,r)=>m9e(e,n,r),e.encodeAsync=async(n,r)=>p9e(e,n,r),e.decodeAsync=async(n,r)=>A9e(e,n,r),e.safeEncode=(n,r)=>g9e(e,n,r),e.safeDecode=(n,r)=>v9e(e,n,r),e.safeEncodeAsync=async(n,r)=>y9e(e,n,r),e.safeDecodeAsync=async(n,r)=>b9e(e,n,r),e.refine=(n,r)=>e.check(aHe(n,r)),e.superRefine=n=>e.check(oHe(n)),e.overwrite=n=>e.check(Zx(n)),e.optional=()=>OM(e),e.nullable=()=>BM(e),e.nullish=()=>OM(BM(e)),e.nonoptional=n=>G9e(e,n),e.array=()=>ED(e),e.or=n=>Bie([e,n]),e.and=n=>B9e(e,n),e.transform=n=>IM(e,jie(n)),e.default=n=>V9e(e,n),e.prefault=n=>q9e(e,n),e.catch=n=>Y9e(e,n),e.pipe=n=>IM(e,n),e.readonly=()=>J9e(e),e.describe=n=>{const r=e.clone();return Cb.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){return Cb.get(e)?.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return Cb.get(e);const r=e.clone();return Cb.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),die=ut("_ZodString",(e,t)=>{CD.init(e,t),Yr.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(Yre(...r)),e.includes=(...r)=>e.check(Jre(...r)),e.startsWith=(...r)=>e.check(eie(...r)),e.endsWith=(...r)=>e.check(tie(...r)),e.min=(...r)=>e.check(lS(...r)),e.max=(...r)=>e.check(H3(...r)),e.length=(...r)=>e.check(V3(...r)),e.nonempty=(...r)=>e.check(lS(1,...r)),e.lowercase=r=>e.check(Xre(r)),e.uppercase=r=>e.check(Zre(r)),e.trim=()=>e.check(iie()),e.normalize=(...r)=>e.check(rie(...r)),e.toLowerCase=()=>e.check(aie()),e.toUpperCase=()=>e.check(oie())}),Q3=ut("ZodString",(e,t)=>{CD.init(e,t),die.init(e,t),e.email=n=>e.check(Fre(fie,n)),e.url=n=>e.check(U3(q3,n)),e.jwt=n=>e.check(Wre(Nie,n)),e.emoji=n=>e.check(Ire(hie,n)),e.guid=n=>e.check(DM(TM,n)),e.uuid=n=>e.check(Dre(WA,n)),e.uuidv4=n=>e.check(Tre(WA,n)),e.uuidv6=n=>e.check(Ore(WA,n)),e.uuidv7=n=>e.check(Bre(WA,n)),e.nanoid=n=>e.check(jre(mie,n)),e.guid=n=>e.check(DM(TM,n)),e.cuid=n=>e.check(Pre(pie,n)),e.cuid2=n=>e.check(Mre(Aie,n)),e.ulid=n=>e.check(Rre(gie,n)),e.base64=n=>e.check(Qre(Sie,n)),e.base64url=n=>e.check(qre(Cie,n)),e.xid=n=>e.check($re(vie,n)),e.ksuid=n=>e.check(Lre(yie,n)),e.ipv4=n=>e.check(Ure(bie,n)),e.ipv6=n=>e.check(zre(xie,n)),e.cidrv4=n=>e.check(Hre(wie,n)),e.cidrv6=n=>e.check(Vre(kie,n)),e.e164=n=>e.check(Gre(_ie,n)),e.datetime=n=>e.check(i9e(n)),e.date=n=>e.check(a9e(n)),e.time=n=>e.check(o9e(n)),e.duration=n=>e.check(s9e(n))});function ky(e){return pze(Q3,e)}const Ma=ut("ZodStringFormat",(e,t)=>{Sa.init(e,t),die.init(e,t)}),fie=ut("ZodEmail",(e,t)=>{e7e.init(e,t),Ma.init(e,t)});function M6t(e){return Fre(fie,e)}const TM=ut("ZodGUID",(e,t)=>{ZUe.init(e,t),Ma.init(e,t)});function R6t(e){return DM(TM,e)}const WA=ut("ZodUUID",(e,t)=>{JUe.init(e,t),Ma.init(e,t)});function $6t(e){return Dre(WA,e)}function L6t(e){return Tre(WA,e)}function U6t(e){return Ore(WA,e)}function z6t(e){return Bre(WA,e)}const q3=ut("ZodURL",(e,t)=>{t7e.init(e,t),Ma.init(e,t)});function H6t(e){return U3(q3,e)}function V6t(e){return U3(q3,{protocol:/^https?$/,hostname:mUe,...Ut(e)})}const hie=ut("ZodEmoji",(e,t)=>{n7e.init(e,t),Ma.init(e,t)});function Q6t(e){return Ire(hie,e)}const mie=ut("ZodNanoID",(e,t)=>{r7e.init(e,t),Ma.init(e,t)});function q6t(e){return jre(mie,e)}const pie=ut("ZodCUID",(e,t)=>{i7e.init(e,t),Ma.init(e,t)});function G6t(e){return Pre(pie,e)}const Aie=ut("ZodCUID2",(e,t)=>{a7e.init(e,t),Ma.init(e,t)});function W6t(e){return Mre(Aie,e)}const gie=ut("ZodULID",(e,t)=>{o7e.init(e,t),Ma.init(e,t)});function K6t(e){return Rre(gie,e)}const vie=ut("ZodXID",(e,t)=>{s7e.init(e,t),Ma.init(e,t)});function Y6t(e){return $re(vie,e)}const yie=ut("ZodKSUID",(e,t)=>{l7e.init(e,t),Ma.init(e,t)});function X6t(e){return Lre(yie,e)}const bie=ut("ZodIPv4",(e,t)=>{h7e.init(e,t),Ma.init(e,t)});function Z6t(e){return Ure(bie,e)}const xie=ut("ZodIPv6",(e,t)=>{m7e.init(e,t),Ma.init(e,t)});function J6t(e){return zre(xie,e)}const wie=ut("ZodCIDRv4",(e,t)=>{p7e.init(e,t),Ma.init(e,t)});function e8t(e){return Hre(wie,e)}const kie=ut("ZodCIDRv6",(e,t)=>{A7e.init(e,t),Ma.init(e,t)});function t8t(e){return Vre(kie,e)}const Sie=ut("ZodBase64",(e,t)=>{g7e.init(e,t),Ma.init(e,t)});function n8t(e){return Qre(Sie,e)}const Cie=ut("ZodBase64URL",(e,t)=>{y7e.init(e,t),Ma.init(e,t)});function r8t(e){return qre(Cie,e)}const _ie=ut("ZodE164",(e,t)=>{b7e.init(e,t),Ma.init(e,t)});function i8t(e){return Gre(_ie,e)}const Nie=ut("ZodJWT",(e,t)=>{w7e.init(e,t),Ma.init(e,t)});function a8t(e){return Wre(Nie,e)}const ND=ut("ZodCustomStringFormat",(e,t)=>{k7e.init(e,t),Ma.init(e,t)});function o8t(e,t,n={}){return _D(ND,e,t,n)}function s8t(e){return _D(ND,"hostname",Are,e)}function l8t(e){return _D(ND,"hex",DUe,e)}function c8t(e,t){const n=t?.enc??"hex",r=`${e}_${n}`,i=gre[r];if(!i)throw new Error(`Unrecognized hash format: ${r}`);return _D(ND,r,i,t)}const G3=ut("ZodNumber",(e,t)=>{xre.init(e,t),Yr.init(e,t),e.gt=(r,i)=>e.check(fx(r,i)),e.gte=(r,i)=>e.check(hd(r,i)),e.min=(r,i)=>e.check(hd(r,i)),e.lt=(r,i)=>e.check(dx(r,i)),e.lte=(r,i)=>e.check(Rh(r,i)),e.max=(r,i)=>e.check(Rh(r,i)),e.int=r=>e.check(tX(r)),e.safe=r=>e.check(tX(r)),e.positive=r=>e.check(fx(0,r)),e.nonnegative=r=>e.check(hd(0,r)),e.negative=r=>e.check(dx(0,r)),e.nonpositive=r=>e.check(Rh(0,r)),e.multipleOf=(r,i)=>e.check(gE(r,i)),e.step=(r,i)=>e.check(gE(r,i)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function x9e(e){return wze(G3,e)}const yC=ut("ZodNumberFormat",(e,t)=>{S7e.init(e,t),G3.init(e,t)});function tX(e){return Sze(yC,e)}function u8t(e){return Cze(yC,e)}function d8t(e){return _ze(yC,e)}function f8t(e){return Nze(yC,e)}function h8t(e){return Eze(yC,e)}const W3=ut("ZodBoolean",(e,t)=>{wre.init(e,t),Yr.init(e,t)});function Eie(e){return Fze(W3,e)}const K3=ut("ZodBigInt",(e,t)=>{kre.init(e,t),Yr.init(e,t),e.gte=(r,i)=>e.check(hd(r,i)),e.min=(r,i)=>e.check(hd(r,i)),e.gt=(r,i)=>e.check(fx(r,i)),e.gte=(r,i)=>e.check(hd(r,i)),e.min=(r,i)=>e.check(hd(r,i)),e.lt=(r,i)=>e.check(dx(r,i)),e.lte=(r,i)=>e.check(Rh(r,i)),e.max=(r,i)=>e.check(Rh(r,i)),e.positive=r=>e.check(fx(BigInt(0),r)),e.negative=r=>e.check(dx(BigInt(0),r)),e.nonpositive=r=>e.check(Rh(BigInt(0),r)),e.nonnegative=r=>e.check(hd(BigInt(0),r)),e.multipleOf=(r,i)=>e.check(gE(r,i));const n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function m8t(e){return Tze(K3,e)}const Fie=ut("ZodBigIntFormat",(e,t)=>{C7e.init(e,t),K3.init(e,t)});function p8t(e){return Bze(Fie,e)}function A8t(e){return Ize(Fie,e)}const w9e=ut("ZodSymbol",(e,t)=>{_7e.init(e,t),Yr.init(e,t)});function g8t(e){return jze(w9e,e)}const k9e=ut("ZodUndefined",(e,t)=>{N7e.init(e,t),Yr.init(e,t)});function v8t(e){return Pze(k9e,e)}const S9e=ut("ZodNull",(e,t)=>{E7e.init(e,t),Yr.init(e,t)});function C9e(e){return Mze(S9e,e)}const _9e=ut("ZodAny",(e,t)=>{F7e.init(e,t),Yr.init(e,t)});function y8t(){return Rze(_9e)}const N9e=ut("ZodUnknown",(e,t)=>{D7e.init(e,t),Yr.init(e,t)});function cS(){return $ze(N9e)}const E9e=ut("ZodNever",(e,t)=>{T7e.init(e,t),Yr.init(e,t)});function Die(e){return Lze(E9e,e)}const F9e=ut("ZodVoid",(e,t)=>{O7e.init(e,t),Yr.init(e,t)});function b8t(e){return Uze(F9e,e)}const Tie=ut("ZodDate",(e,t)=>{B7e.init(e,t),Yr.init(e,t),e.min=(r,i)=>e.check(hd(r,i)),e.max=(r,i)=>e.check(Rh(r,i));const n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function x8t(e){return zze(Tie,e)}const D9e=ut("ZodArray",(e,t)=>{I7e.init(e,t),Yr.init(e,t),e.element=t.element,e.min=(n,r)=>e.check(lS(n,r)),e.nonempty=n=>e.check(lS(1,n)),e.max=(n,r)=>e.check(H3(n,r)),e.length=(n,r)=>e.check(V3(n,r)),e.unwrap=()=>e.element});function ED(e,t){return Yze(D9e,e,t)}function w8t(e){const t=e._zod.def.shape;return Z3(Object.keys(t))}const Y3=ut("ZodObject",(e,t)=>{R7e.init(e,t),Yr.init(e,t),di(e,"shape",()=>t.shape),e.keyof=()=>Z3(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:cS()}),e.loose=()=>e.clone({...e._zod.def,catchall:cS()}),e.strict=()=>e.clone({...e._zod.def,catchall:Die()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>R8e(e,n),e.safeExtend=n=>$8e(e,n),e.merge=n=>L8e(e,n),e.pick=n=>P8e(e,n),e.omit=n=>M8e(e,n),e.partial=(...n)=>U8e(Pie,e,n[0]),e.required=(...n)=>z8e(Mie,e,n[0])});function X3(e,t){const n={type:"object",shape:e??{},...Ut(t)};return new Y3(n)}function k8t(e,t){return new Y3({type:"object",shape:e,catchall:Die(),...Ut(t)})}function S8t(e,t){return new Y3({type:"object",shape:e,catchall:cS(),...Ut(t)})}const Oie=ut("ZodUnion",(e,t)=>{Sre.init(e,t),Yr.init(e,t),e.options=t.options});function Bie(e,t){return new Oie({type:"union",options:e,...Ut(t)})}const T9e=ut("ZodDiscriminatedUnion",(e,t)=>{Oie.init(e,t),$7e.init(e,t)});function C8t(e,t,n){return new T9e({type:"union",options:t,discriminator:e,...Ut(n)})}const O9e=ut("ZodIntersection",(e,t)=>{L7e.init(e,t),Yr.init(e,t)});function B9e(e,t){return new O9e({type:"intersection",left:e,right:t})}const I9e=ut("ZodTuple",(e,t)=>{Cre.init(e,t),Yr.init(e,t),e.rest=n=>e.clone({...e._zod.def,rest:n})});function j9e(e,t,n){const r=t instanceof Pr,i=r?n:t,a=r?t:null;return new I9e({type:"tuple",items:e,rest:a,...Ut(i)})}const Iie=ut("ZodRecord",(e,t)=>{U7e.init(e,t),Yr.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function P9e(e,t,n){return new Iie({type:"record",keyType:e,valueType:t,...Ut(n)})}function _8t(e,t,n){const r=Qf(e);return r._zod.values=void 0,new Iie({type:"record",keyType:r,valueType:t,...Ut(n)})}const M9e=ut("ZodMap",(e,t)=>{z7e.init(e,t),Yr.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function N8t(e,t,n){return new M9e({type:"map",keyType:e,valueType:t,...Ut(n)})}const R9e=ut("ZodSet",(e,t)=>{H7e.init(e,t),Yr.init(e,t),e.min=(...n)=>e.check(vE(...n)),e.nonempty=n=>e.check(vE(1,n)),e.max=(...n)=>e.check(z3(...n)),e.size=(...n)=>e.check(Kre(...n))});function E8t(e,t){return new R9e({type:"set",valueType:e,...Ut(t)})}const yE=ut("ZodEnum",(e,t)=>{V7e.init(e,t),Yr.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{const a={};for(const o of r)if(n.has(o))a[o]=t.entries[o];else throw new Error(`Key ${o} not found in enum`);return new yE({...t,checks:[],...Ut(i),entries:a})},e.exclude=(r,i)=>{const a={...t.entries};for(const o of r)if(n.has(o))delete a[o];else throw new Error(`Key ${o} not found in enum`);return new yE({...t,checks:[],...Ut(i),entries:a})}});function Z3(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new yE({type:"enum",entries:n,...Ut(t)})}function F8t(e,t){return new yE({type:"enum",entries:e,...Ut(t)})}const $9e=ut("ZodLiteral",(e,t)=>{Q7e.init(e,t),Yr.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function D8t(e,t){return new $9e({type:"literal",values:Array.isArray(e)?e:[e],...Ut(t)})}const L9e=ut("ZodFile",(e,t)=>{q7e.init(e,t),Yr.init(e,t),e.min=(n,r)=>e.check(vE(n,r)),e.max=(n,r)=>e.check(z3(n,r)),e.mime=(n,r)=>e.check(nie(Array.isArray(n)?n:[n],r))});function T8t(e){return Xze(L9e,e)}const U9e=ut("ZodTransform",(e,t)=>{G7e.init(e,t),Yr.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new j3(e.constructor.name);n.addIssue=a=>{if(typeof a=="string")n.issues.push(oS(a,n.value,t));else{const o=a;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=e),n.issues.push(oS(o))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(a=>(n.value=a,n)):(n.value=i,n)}});function jie(e){return new U9e({type:"transform",transform:e})}const Pie=ut("ZodOptional",(e,t)=>{W7e.init(e,t),Yr.init(e,t),e.unwrap=()=>e._zod.def.innerType});function OM(e){return new Pie({type:"optional",innerType:e})}const z9e=ut("ZodNullable",(e,t)=>{K7e.init(e,t),Yr.init(e,t),e.unwrap=()=>e._zod.def.innerType});function BM(e){return new z9e({type:"nullable",innerType:e})}function O8t(e){return OM(BM(e))}const H9e=ut("ZodDefault",(e,t)=>{Y7e.init(e,t),Yr.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function V9e(e,t){return new H9e({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():M3(t)}})}const Q9e=ut("ZodPrefault",(e,t)=>{X7e.init(e,t),Yr.init(e,t),e.unwrap=()=>e._zod.def.innerType});function q9e(e,t){return new Q9e({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():M3(t)}})}const Mie=ut("ZodNonOptional",(e,t)=>{Z7e.init(e,t),Yr.init(e,t),e.unwrap=()=>e._zod.def.innerType});function G9e(e,t){return new Mie({type:"nonoptional",innerType:e,...Ut(t)})}const W9e=ut("ZodSuccess",(e,t)=>{J7e.init(e,t),Yr.init(e,t),e.unwrap=()=>e._zod.def.innerType});function B8t(e){return new W9e({type:"success",innerType:e})}const K9e=ut("ZodCatch",(e,t)=>{eze.init(e,t),Yr.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Y9e(e,t){return new K9e({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const X9e=ut("ZodNaN",(e,t)=>{tze.init(e,t),Yr.init(e,t)});function I8t(e){return Vze(X9e,e)}const Rie=ut("ZodPipe",(e,t)=>{nze.init(e,t),Yr.init(e,t),e.in=t.in,e.out=t.out});function IM(e,t){return new Rie({type:"pipe",in:e,out:t})}const $ie=ut("ZodCodec",(e,t)=>{Rie.init(e,t),_re.init(e,t)});function j8t(e,t,n){return new $ie({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}const Z9e=ut("ZodReadonly",(e,t)=>{rze.init(e,t),Yr.init(e,t),e.unwrap=()=>e._zod.def.innerType});function J9e(e){return new Z9e({type:"readonly",innerType:e})}const eHe=ut("ZodTemplateLiteral",(e,t)=>{ize.init(e,t),Yr.init(e,t)});function P8t(e,t){return new eHe({type:"template_literal",parts:e,...Ut(t)})}const tHe=ut("ZodLazy",(e,t)=>{sze.init(e,t),Yr.init(e,t),e.unwrap=()=>e._zod.def.getter()});function nHe(e){return new tHe({type:"lazy",getter:e})}const rHe=ut("ZodPromise",(e,t)=>{oze.init(e,t),Yr.init(e,t),e.unwrap=()=>e._zod.def.innerType});function M8t(e){return new rHe({type:"promise",innerType:e})}const iHe=ut("ZodFunction",(e,t)=>{aze.init(e,t),Yr.init(e,t)});function Abe(e){return new iHe({type:"function",input:Array.isArray(e?.input)?j9e(e?.input):e?.input??ED(cS()),output:e?.output??cS()})}const J3=ut("ZodCustom",(e,t)=>{lze.init(e,t),Yr.init(e,t)});function R8t(e){const t=new $o({check:"custom"});return t._zod.check=e,t}function $8t(e,t){return Zze(J3,e??(()=>!0),t)}function aHe(e,t={}){return Jze(J3,e,t)}function oHe(e){return e9e(e)}function sHe(e,t={error:`Input not instance of ${e.name}`}){const n=new J3({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...Ut(t)});return n._zod.bag.Class=e,n}const L8t=(...e)=>n9e({Codec:$ie,Boolean:W3,String:Q3},...e);function U8t(e){const t=nHe(()=>Bie([ky(e),x9e(),Eie(),C9e(),ED(t),P9e(ky(),t)]));return t}function z8t(e,t){return IM(jie(e),t)}const nX={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function H8t(e){Hc({customError:e})}function V8t(){return Hc().customError}var rX;rX||(rX={});function Q8t(e){return Aze(Q3,e)}function q8t(e){return kze(G3,e)}function G8t(e){return Dze(W3,e)}function W8t(e){return Oze(K3,e)}function K8t(e){return Hze(Tie,e)}const Y8t=Object.freeze(Object.defineProperty({__proto__:null,bigint:W8t,boolean:G8t,date:K8t,number:q8t,string:Q8t},Symbol.toStringTag,{value:"Module"}));Hc(cze());const Ch=Object.freeze(Object.defineProperty({__proto__:null,$brand:F8e,$input:mze,$output:hze,NEVER:E8e,TimePrecision:gze,ZodAny:_9e,ZodArray:D9e,ZodBase64:Sie,ZodBase64URL:Cie,ZodBigInt:K3,ZodBigIntFormat:Fie,ZodBoolean:W3,ZodCIDRv4:wie,ZodCIDRv6:kie,ZodCUID:pie,ZodCUID2:Aie,ZodCatch:K9e,ZodCodec:$ie,ZodCustom:J3,ZodCustomStringFormat:ND,ZodDate:Tie,ZodDefault:H9e,ZodDiscriminatedUnion:T9e,ZodE164:_ie,ZodEmail:fie,ZodEmoji:hie,ZodEnum:yE,ZodError:P6t,ZodFile:L9e,get ZodFirstPartyTypeKind(){return rX},ZodFunction:iHe,ZodGUID:TM,ZodIPv4:bie,ZodIPv6:xie,ZodISODate:lie,ZodISODateTime:sie,ZodISODuration:uie,ZodISOTime:cie,ZodIntersection:O9e,ZodIssueCode:nX,ZodJWT:Nie,ZodKSUID:yie,ZodLazy:tHe,ZodLiteral:$9e,ZodMap:M9e,ZodNaN:X9e,ZodNanoID:mie,ZodNever:E9e,ZodNonOptional:Mie,ZodNull:S9e,ZodNullable:z9e,ZodNumber:G3,ZodNumberFormat:yC,ZodObject:Y3,ZodOptional:Pie,ZodPipe:Rie,ZodPrefault:Q9e,ZodPromise:rHe,ZodReadonly:Z9e,ZodRealError:Od,ZodRecord:Iie,ZodSet:R9e,ZodString:Q3,ZodStringFormat:Ma,ZodSuccess:W9e,ZodSymbol:w9e,ZodTemplateLiteral:eHe,ZodTransform:U9e,ZodTuple:I9e,ZodType:Yr,ZodULID:gie,ZodURL:q3,ZodUUID:WA,ZodUndefined:k9e,ZodUnion:Oie,ZodUnknown:N9e,ZodVoid:F9e,ZodXID:vie,_ZodString:die,_default:V9e,_function:Abe,any:y8t,array:ED,base64:n8t,base64url:r8t,bigint:m8t,boolean:Eie,catch:Y9e,check:R8t,cidrv4:e8t,cidrv6:t8t,clone:Qf,codec:j8t,coerce:Y8t,config:Hc,core:I6t,cuid:G6t,cuid2:W6t,custom:$8t,date:x8t,decode:m9e,decodeAsync:A9e,discriminatedUnion:C8t,e164:i8t,email:M6t,emoji:Q6t,encode:h9e,encodeAsync:p9e,endsWith:tie,enum:Z3,file:T8t,flattenError:are,float32:u8t,float64:d8t,formatError:ore,function:Abe,getErrorMap:V8t,globalRegistry:Cb,gt:fx,gte:hd,guid:R6t,hash:c8t,hex:l8t,hostname:s8t,httpUrl:V6t,includes:Jre,instanceof:sHe,int:tX,int32:f8t,int64:p8t,intersection:B9e,ipv4:Z6t,ipv6:J6t,iso:j6t,json:U8t,jwt:a8t,keyof:w8t,ksuid:X6t,lazy:nHe,length:V3,literal:D8t,locales:fze,looseObject:S8t,lowercase:Xre,lt:dx,lte:Rh,map:N8t,maxLength:H3,maxSize:z3,mime:nie,minLength:lS,minSize:vE,multipleOf:gE,nan:I8t,nanoid:q6t,nativeEnum:F8t,negative:qze,never:Die,nonnegative:Wze,nonoptional:G9e,nonpositive:Gze,normalize:rie,null:C9e,nullable:BM,nullish:O8t,number:x9e,object:X3,optional:OM,overwrite:Zx,parse:c9e,parseAsync:u9e,partialRecord:_8t,pipe:IM,positive:Qze,prefault:q9e,preprocess:z8t,prettifyError:K8e,promise:M8t,property:Kze,readonly:J9e,record:P9e,refine:aHe,regex:Yre,regexes:gre,registry:Ere,safeDecode:v9e,safeDecodeAsync:b9e,safeEncode:g9e,safeEncodeAsync:y9e,safeParse:d9e,safeParseAsync:f9e,set:E8t,setErrorMap:H8t,size:Kre,startsWith:eie,strictObject:k8t,string:ky,stringFormat:o8t,stringbool:L8t,success:B8t,superRefine:oHe,symbol:g8t,templateLiteral:P8t,toJSONSchema:r9e,toLowerCase:aie,toUpperCase:oie,transform:jie,treeifyError:G8e,trim:iie,tuple:j9e,uint32:h8t,uint64:A8t,ulid:K6t,undefined:v8t,union:Bie,unknown:cS,uppercase:Zre,url:H6t,util:Q8e,uuid:$6t,uuidv4:L6t,uuidv6:U6t,uuidv7:z6t,void:b8t,xid:Y6t},Symbol.toStringTag,{value:"Module"})),gbe=(e,t,n)=>{if(e&&"reportValidity"in e){const r=nn(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},iX=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?gbe(r.ref,n,e):r&&r.refs&&r.refs.forEach(i=>gbe(i,n,e))}},vbe=(e,t)=>{t.shouldUseNativeValidation&&iX(e,t);const n={};for(const r in e){const i=nn(t.fields,r),a=Object.assign(e[r]||{},{ref:i&&i.ref});if(X8t(t.names||Object.keys(e),r)){const o=Object.assign({},nn(n,r));Mi(o,"root",a),Mi(n,r,o)}else Mi(n,r,a)}return n},X8t=(e,t)=>{const n=ybe(t);return e.some(r=>ybe(r).match(`^${n}\\.\\d+`))};function ybe(e){return e.replace(/\]|\[/g,"")}function bbe(e,t){try{var n=e()}catch(r){return t(r)}return n&&n.then?n.then(void 0,t):n}function Z8t(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(".");if(!n[o])if("unionErrors"in r){var s=r.unionErrors[0].errors[0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(u){return u.errors.forEach(function(f){return e.push(f)})}),t){var l=n[o].types,c=l&&l[r.code];n[o]=Wne(o,t,n,i,c?[].concat(c,r.message):r.message)}e.shift()}return n}function J8t(e,t){for(var n={};e.length;){var r=e[0],i=r.code,a=r.message,o=r.path.join(".");if(!n[o])if(r.code==="invalid_union"&&r.errors.length>0){var s=r.errors[0][0];n[o]={message:s.message,type:s.code}}else n[o]={message:a,type:i};if(r.code==="invalid_union"&&r.errors.forEach(function(u){return u.forEach(function(f){return e.push(f)})}),t){var l=n[o].types,c=l&&l[r.code];n[o]=Wne(o,t,n,i,c?[].concat(c,r.message):r.message)}e.shift()}return n}function eL(e,t,n){if(n===void 0&&(n={}),(function(r){return"_def"in r&&typeof r._def=="object"&&"typeName"in r._def})(e))return function(r,i,a){try{return Promise.resolve(bbe(function(){return Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(o){return a.shouldUseNativeValidation&&iX({},a),{errors:{},values:n.raw?Object.assign({},r):o}})},function(o){if((function(s){return Array.isArray(s?.issues)})(o))return{values:{},errors:vbe(Z8t(o.errors,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}};if((function(r){return"_zod"in r&&typeof r._zod=="object"})(e))return function(r,i,a){try{return Promise.resolve(bbe(function(){return Promise.resolve((n.mode==="sync"?NM:EM)(e,r,t)).then(function(o){return a.shouldUseNativeValidation&&iX({},a),{errors:{},values:n.raw?Object.assign({},r):o}})},function(o){if((function(s){return s instanceof L3})(o))return{values:{},errors:vbe(J8t(o.issues,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}};throw new Error("Invalid input: not a Zod schema")}var eUt="Label",lHe=w.forwardRef((e,t)=>d.jsx(wn.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));lHe.displayName=eUt;var tUt=lHe;function Mn({className:e,...t}){return d.jsx(tUt,{"data-slot":"label",className:St("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const oi=t4t,cHe=L.createContext({}),en=({...e})=>d.jsx(cHe.Provider,{value:{name:e.name},children:d.jsx(xt,{...e})}),Lie=()=>{const e=L.useContext(cHe),t=L.useContext(uHe),{getFieldState:n}=pD(),r=t6e({name:e.name}),i=n(e.name,r);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...i}},uHe=L.createContext({});function tn({className:e,...t}){const n=L.useId();return d.jsx(uHe.Provider,{value:{id:n},children:d.jsx("div",{"data-slot":"form-item",className:St("grid gap-2",e),...t})})}function gn({className:e,...t}){const{error:n,formItemId:r}=Lie();return d.jsx(Mn,{"data-slot":"form-label","data-error":!!n,className:St("data-[error=true]:text-red-500 dark:data-[error=true]:text-red-900",e),htmlFor:r,...t})}function fn({...e}){const{error:t,formItemId:n,formDescriptionId:r,formMessageId:i}=Lie();return d.jsx(Tne,{"data-slot":"form-control",id:n,"aria-describedby":t?`${r} ${i}`:String(r),"aria-invalid":!!t,...e})}function Tn({className:e,...t}){const{error:n,formMessageId:r}=Lie(),i=n?String(n?.message??""):t.children;return i?d.jsx("p",{"data-slot":"form-message",id:r,className:St("text-red-500 text-sm dark:text-red-900",e),...t,children:i}):null}function Cn({className:e,type:t,...n}){return d.jsx("input",{type:t,"data-slot":"input",className:St("file:text-gray-950 placeholder:text-gray-500 selection:bg-gray-900 selection:text-gray-50 dark:bg-gray-200/30 border-gray-200 flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:file:text-gray-50 dark:placeholder:text-gray-400 dark:selection:bg-gray-50 dark:selection:text-gray-900 dark:dark:bg-gray-800/30 dark:border-gray-800","focus-visible:border-gray-950 focus-visible:ring-gray-950/50 focus-visible:ring-[3px] dark:focus-visible:border-gray-300 dark:focus-visible:ring-gray-300/50","aria-invalid:ring-red-500/20 dark:aria-invalid:ring-red-500/40 aria-invalid:border-red-500 dark:aria-invalid:ring-red-900/20 dark:dark:aria-invalid:ring-red-900/40 dark:aria-invalid:border-red-900",e),...n})}const nUt=X3({username:ky().min(2).max(50),password:ky().min(2).max(50)});function rUt(){const{authService:e}=w.useContext(FD);w.useEffect(()=>{e.logout()},[e]);const t=ZS(),n=fr({resolver:eL(nUt),defaultValues:{username:"",password:""}});function r(i){try{e.login(i.username,i.password).then(a=>{t("/")}),Qe.success("Success",{description:"You have successfully logged in."})}catch(a){console.error(a),Qe.error("Error",{description:"Invalid credentials. Please try again."})}}return d.jsxs("div",{className:"w-full flex flex-col justify-center items-center h-screen lg:grid lg:min-h-[200px] lg:grid-cols-2 xl:min-h-screen",children:[d.jsx("div",{className:"flex items-center justify-center",children:d.jsx(oi,{...n,children:d.jsxs("form",{onSubmit:n.handleSubmit(r),className:"space-y-8 w-[300px]",children:[d.jsxs("div",{className:"grid gap-2 text-center",children:[d.jsx("h1",{className:"text-3xl font-bold",children:"Accounter"}),d.jsx("h1",{className:"text-3xl font-bold",children:"Login"}),d.jsx("p",{className:"text-balance text-muted-foreground",children:"Enter your credentials to login."})]}),d.jsx(en,{control:n.control,name:"username",render:({field:i})=>d.jsxs(tn,{children:[d.jsx(gn,{children:"Username"}),d.jsx(fn,{children:d.jsx(Cn,{placeholder:"Username",...i})}),d.jsx(Tn,{})]})}),d.jsx(en,{control:n.control,name:"password",render:({field:i})=>d.jsxs(tn,{children:[d.jsx(gn,{children:"Password"}),d.jsx(fn,{children:d.jsx(Cn,{placeholder:"Password",type:"password",...i})}),d.jsx(Tn,{})]})}),d.jsx(qe,{disabled:n.formState.isSubmitting||!n.formState.isValid,className:"w-full font-semibold",type:"submit",children:"Login"})]})})}),d.jsx("div",{className:"hidden bg-muted lg:block bg-black rounded-tl-3xl rounded-bl-3xl",children:d.jsx("div",{className:"flex flex-row justify-center items-center h-screen",children:d.jsx("img",{src:"../../icons/guild-logo.svg",alt:"nature",className:"w-[100px] h-[100px] object-cover"})})})]})}const FD=w.createContext({authService:new N8e,setAuthService:()=>{}}),iUt=({children:e})=>{const[t,n]=w.useState(new N8e),r=ZS(),i=t.isLoggedIn();return w.useEffect(()=>{i||r("/login")},[i,r]),d.jsx(FD.Provider,{value:{authService:t,setAuthService:n},children:d.jsxs(MIe,{children:[d.jsx(Lr,{path:"/login",element:d.jsx(rUt,{})}),d.jsx(Lr,{path:"/network-error",element:d.jsx(E$t,{})}),d.jsx(Lr,{path:"*",element:e})]})})},pc=w.createContext({userContext:null,setUserContext:()=>{}});function aUt({children:e}){const{authService:t}=w.useContext(FD),[n,r]=w.useState(null),[i,a]=w.useState(null),[o,s]=w.useState(null),[{data:l,fetching:c},u]=rn({query:LDt,variables:{},pause:!0}),f=t.currentUser();return w.useEffect(()=>{Dd(f,i)||(a(f),u())},[f,i,u]),w.useEffect(()=>{l&&!c&&s(l.userContext)},[l,c]),w.useEffect(()=>{if(i&&o){const h=i&&o?{...i,context:o}:null;r(h)}},[o,i]),c?d.jsx(Vc,{}):d.jsx(pc.Provider,{value:{userContext:n,setUserContext:r},children:e})}function oUt(e){return!e||os(e)?null:encodeURIComponent(JSON.stringify(e))}function sUt({filter:e,setFilter:t,closeModal:n,single:r=!1}){const{control:i,handleSubmit:a}=fr({defaultValues:{...e}}),{selectableBusinesses:o,fetching:s}=Bu(),{userContext:l}=w.useContext(pc),c=f=>{t(f),n()};function u(){t({businessIDs:r?e.businessIDs:void 0}),n()}return d.jsxs(d.Fragment,{children:[s?d.jsx("div",{children:"Loading..."}):d.jsx("div",{}),d.jsxs("form",{onSubmit:a(c),children:[d.jsx(xt,{name:"ownerIds",control:i,defaultValue:e.ownerIds,render:({field:f,fieldState:h})=>d.jsx(dl,{...f,data:o,value:f.value??(l?.context.adminBusinessId?[l.context.adminBusinessId]:void 0),disabled:s,label:"Owners",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:h.error?.message})}),!r&&d.jsx(xt,{name:"businessIDs",control:i,defaultValue:e.businessIDs,render:({field:f,fieldState:h})=>d.jsx(dl,{...f,data:o,value:f.value??void 0,disabled:s,label:"Businesses",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:h.error?.message})}),d.jsx(xt,{name:"fromDate",control:i,defaultValue:e.fromDate,rules:{pattern:{value:_i,message:"Date must be im format yyyy-mm-dd"}},render:({field:f,fieldState:h})=>d.jsx(qi,{...f,onChange:m=>{const p=m?typeof m=="string"?m:Rt(m,"yyyy-MM-dd"):void 0;p!==f.value&&f.onChange(p)},value:f.value?new Date(f.value):void 0,error:h.error?.message,label:"From Date",popoverProps:{withinPortal:!0}})}),d.jsx(xt,{name:"toDate",control:i,defaultValue:e.toDate,rules:{pattern:{value:_i,message:"Date must be im format yyyy-mm-dd"}},render:({field:f,fieldState:h})=>d.jsx(qi,{...f,onChange:m=>{const p=m?typeof m=="string"?m:Rt(m,"yyyy-MM-dd"):void 0;p!==f.value&&f.onChange(p)},value:f.value?new Date(f.value):void 0,error:h.error?.message,label:"To Date",popoverProps:{withinPortal:!0}})}),d.jsx(xt,{name:"type",control:i,defaultValue:null,render:({field:f,fieldState:h})=>d.jsx(ai,{...f,onChange:m=>f.onChange(m==="NULL"?null:m),data:[{value:"NULL",label:"All"},{value:"BUSINESS",label:"Business"},{value:"TAX_CATEGORY",label:"Tax Category"}],error:h.error?.message,label:"Type"})}),d.jsxs("div",{className:"flex justify-center mt-5 gap-3",children:[d.jsx("button",{type:"submit",className:"text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-indigo-600 rounded-sm text-lg",children:"Filter"}),d.jsx("button",{type:"button",className:"text-white bg-orange-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-orange-600 rounded-sm text-lg",onClick:u,children:"Clear"}),d.jsx("button",{type:"button",className:"text-white bg-rose-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-rose-600 rounded-sm text-lg",onClick:n,children:"Cancel"})]})]})]})}function dHe({filter:e,setFilter:t}){const[n,r]=w.useState(!1),[i,a]=w.useState(!os(e)),{get:o,set:s}=gi();function l(u){return Object.entries(u??{}).filter(([h,m])=>m!==void 0&&Array.isArray(m)&&m.length>0).length>0}function c(u){u.fromDate?.trim()===""&&(u.fromDate=void 0),u.toDate?.trim()===""&&(u.toDate=void 0),Dd(u,e)||(t(u),a(l(u)))}return w.useEffect(()=>{const u=os(e)?null:encodeURIComponent(JSON.stringify(e)),f=o("transactionsFilters");u!==f&&s("transactionsFilters",u)},[e,o,s]),d.jsxs(d.Fragment,{children:[d.jsx(Qc,{opened:n,onClose:()=>r(!1),content:d.jsx(sUt,{single:!0,filter:e,setFilter:c,closeModal:()=>r(!1)})}),d.jsx(ba,{inline:!0,size:16,disabled:!i,children:d.jsx(qe,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>r(!0),children:d.jsx(Ul,{className:"size-5"})})})]})}function DD(e){const t=new URLSearchParams,n=oUt(e);return n&&t.append("transactionsFilters",n),`/business-transactions${t.size>0?`?${t}`:""}`}const lUt=()=>{const{get:e}=gi(),{setFiltersContext:t}=w.useContext(ra),[n,r]=w.useState(!1),[i,a]=w.useState(!1),[o,s]=w.useState(e("transactionsFilters")?JSON.parse(decodeURIComponent(e("transactionsFilters"))):{}),[{data:l,fetching:c}]=rn({query:O3e,variables:{filters:o}});w.useEffect(()=>{t(d.jsxs("div",{className:"flex flex-row gap-x-5",children:[d.jsx(dHe,{filter:o,setFilter:s}),d.jsx(zn,{label:"Expand all accounts",children:d.jsx(qe,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>r(h=>!h),children:n?d.jsx(Du,{className:"size-5"}):d.jsx(Tu,{className:"size-5"})})}),d.jsx(zn,{label:"Expand all currencies",children:d.jsx(qe,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>a(h=>!h),children:i?d.jsx(Y3e,{className:"size-5"}):d.jsx(K3e,{className:"size-5"})})})]}))},[l,o,t,s,n,r,i]);const u=w.useMemo(()=>l?.businessTransactionsSumFromLedgerRecords.__typename==="CommonError"?[]:l?.businessTransactionsSumFromLedgerRecords.businessTransactionsSum?l.businessTransactionsSumFromLedgerRecords.businessTransactionsSum.sort((h,m)=>h.business.name.localeCompare(m.business.name)):[],[l?.businessTransactionsSumFromLedgerRecords]),f=[{title:"Business Name",value:h=>h.business.name},{title:"Debit / Credit",value:h=>d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsx("p",{className:"flex flex-row gap-2 whitespace-nowrap",children:d.jsx(er,{c:"red",children:h.debit.formatted})}),d.jsx("p",{className:"flex flex-row gap-2 whitespace-nowrap",children:d.jsx(er,{c:"green",children:h.credit.formatted})})]}),style:{whiteSpace:"nowrap"}},{title:"Total",value:h=>d.jsx(er,{c:h.total.raw<-1e-4?"red":h.total.raw>1e-4?"green":void 0,fw:700,children:h.total.formatted}),style:{whiteSpace:"nowrap"}},...Ov(Qt.Eur),...Ov(Qt.Usd),...Ov(Qt.Gbp),...Ov(Qt.Cad),...Ov(Qt.Jpy),...Ov(Qt.Aud),...Ov(Qt.Sek),...cUt(i)];return d.jsx(Pa,{title:"Business Transactions",description:"Business Transactions Summery",children:c?d.jsx(si,{className:"h-10 w-10 animate-spin mr-2 self-center"}):d.jsxs(yo,{striped:!0,highlightOnHover:!0,children:[d.jsx("thead",{className:"sticky top-0 z-20",children:d.jsxs("tr",{className:"tracking-wider font-medium text-gray-900 text-sm bg-gray-100",children:[f.map((h,m)=>h.disabled?null:d.jsx("th",{children:h.title},String(m))),d.jsx("th",{children:"More Info"})]})}),d.jsx("tbody",{children:u.map((h,m)=>d.jsx(P3e,{columns:f,item:h,moreInfo:()=>d.jsx(S3,{businessID:h.business.id,filter:o}),isShowAll:n},m))})]})})};function Ov(e){return[{title:`${e} Debit / Credit`,value:t=>{const n=t.foreignCurrenciesSum.find(r=>r.currency===e);return n?d.jsxs("div",{className:"flex flex-col items-center",children:[d.jsx("p",{className:"flex flex-row gap-2 whitespace-nowrap",children:d.jsx(er,{c:"red",children:n.debit.formatted})}),d.jsx("p",{className:"flex flex-row gap-2 whitespace-nowrap",children:d.jsx(er,{c:"green",children:n.credit.formatted})})]}):null},style:{whiteSpace:"nowrap"}},{title:`${e} Total`,value:t=>{const n=t.foreignCurrenciesSum.find(r=>r.currency===e);return n?.total?.raw&&(n.total.raw<-1e-4||n.total.raw>1e-4)?d.jsx(yy,{color:n.total.raw>0?"green":"red",children:n.total.formatted}):n?.total?.formatted},style:{whiteSpace:"nowrap"}}]}function cUt(e){return e?Object.values(Qt).filter(n=>!Ene.includes(n)).map(Ov).flat():[]}const uUt=({data:e})=>{const{get:t}=gi(),{counterparty:n,validationData:r,__typename:i}=$t(E3e,e),a=w.useMemo(()=>{switch(i){case"BusinessTripCharge":case"DividendCharge":case"ConversionCharge":case"SalaryCharge":case"InternalTransferCharge":return!1;default:return!0}},[i]),o=w.useMemo(()=>a&&r?.missingInfo?.includes(ly.Counterparty),[a,r?.missingInfo]),{name:s,id:l}=n??{name:"Missing",id:void 0},c=t("chargesFilters"),u=w.useCallback(f=>{const h=c?JSON.parse(decodeURIComponent(c)):{};return DD({fromDate:h.fromDate,toDate:h.toDate,ownerIds:h.byOwners,businessIDs:[f]})},[c]);return d.jsx("td",{children:d.jsx("div",{className:"flex flex-wrap",children:d.jsxs(ba,{inline:!0,size:12,disabled:!o,color:"red",zIndex:"auto",children:[!o&&l&&d.jsx("a",{href:u(l),target:"_blank",rel:"noreferrer",onClick:f=>f.stopPropagation(),children:d.jsx(Wh,{label:s,className:"[&>*>.mantine-NavLink-label]:font-semibold"})}),o&&s]})})})},dUt=({data:e})=>{const t=$t(q2t,e),{minDebitDate:n,minEventDate:r,minDocumentsDate:i}=t,a=n||r||i;return d.jsx("td",{children:d.jsx("div",{children:a&&Rt(new Date(a),"dd/MM/yy")})})},fUt="updateCharge",Uie=()=>{const[{fetching:e},t]=Hn(NDt),n=w.useCallback(async r=>{const i=`Error updating charge ID [${r.chargeId}]`,a=`${fUt}-${r.chargeId}`;Qe.loading("Updating charge",{id:a});try{const o=await t(r),s=Vn(o,i,a,"updateCharge");if(s)return Qe.success("Success",{id:a,description:"Charge updated"}),s.updateCharge.charge}catch(o){console.error(`${i}: ${o}`),Qe.error("Error",{id:a,description:i,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,updateCharge:n}},hUt=({data:e,onChange:t})=>{const[n,r]=w.useState(!1),i=$t(G2t,e),a=w.useMemo(()=>i?.validationData?.missingInfo?.includes(ly.Description),[i?.validationData?.missingInfo]),o=w.useMemo(()=>a&&!!i.missingInfoSuggestions?.description?.trim().length,[a,i.missingInfoSuggestions?.description]),{userDescription:s,id:l}=i,c=w.useMemo(()=>s&&s?.trim()!==""?s:i.missingInfoSuggestions?.description?i.missingInfoSuggestions.description:"Missing",[s,i.missingInfoSuggestions?.description]),{updateCharge:u,fetching:f}=Uie(),h=w.useCallback(async m=>{m!==void 0&&(await u({chargeId:l,fields:{userDescription:m}}),r(!0))},[l,u]);return d.jsxs("td",{children:[d.jsxs("div",{className:"flex flex-wrap",children:[d.jsx("div",{className:"flex flex-col justify-center",children:d.jsx(ba,{inline:!0,size:12,disabled:!a,color:"red",zIndex:"auto",children:d.jsx("p",{className:o?"bg-yellow-400":void 0,children:c})})}),o&&d.jsx(ID,{onClick:m=>{m.stopPropagation(),h(i.missingInfoSuggestions.description)},disabled:f})]}),d.jsx(uoe,{chargeId:l,description:i.missingInfoSuggestions?.description??void 0,open:n,onOpenChange:r,onClose:t})]})},mUt=({data:e})=>{const t=$t(W2t,e),{metadata:n,validationData:r,id:i,__typename:a}=t,o=w.useMemo(()=>{switch(a){case"BusinessTripCharge":case"ConversionCharge":case"DividendCharge":case"InternalTransferCharge":case"SalaryCharge":case"MonthlyVatCharge":case"BankDepositCharge":case"ForeignSecuritiesCharge":case"CreditcardBankCharge":case"FinancialCharge":return!1;default:return!0}},[a]),s=w.useMemo(()=>{switch(a){case"FinancialCharge":return!1;default:return!0}},[a]),l=w.useMemo(()=>s&&r?.missingInfo?.includes(ly.Transactions),[s,r?.missingInfo]),c=w.useMemo(()=>o&&r?.missingInfo?.includes(ly.Documents),[o,r?.missingInfo]),u=w.useMemo(()=>!n?.invalidLedger,[n?.invalidLedger]),f=w.useMemo(()=>n?.invalidLedger,[n?.invalidLedger]),h=w.useMemo(()=>{const m=[];return(l||n?.transactionsCount||s)&&m.push({extraClassName:n?.transactionsCount||!s?void 0:"bg-yellow-400",content:d.jsx(ba,{inline:!0,size:12,disabled:!l,color:"red",zIndex:"auto",children:d.jsxs("div",{className:"whitespace-nowrap",children:["Transactions: ",n?.transactionsCount??0]})},"transactions")}),m.push({content:d.jsx(ba,{inline:!0,size:12,processing:u,disabled:f==="VALID",color:f==="DIFF"?"orange":"red",zIndex:"auto",children:d.jsxs("div",{className:"whitespace-nowrap",children:["Ledger Records: ",n?.ledgerCount??0]})},"ledger")}),(c||n?.documentsCount)&&m.push({content:d.jsx(ba,{inline:!0,size:12,disabled:!c,color:"red",zIndex:"auto",children:d.jsxs("div",{className:"whitespace-nowrap",children:["Documents: ",n?.documentsCount??0]})},"documents"),extraClassName:!r?.missingInfo?.includes(ly.Documents)||!o?void 0:"bg-yellow-400"}),n?.miscExpensesCount&&m.push({content:d.jsxs("div",{className:"whitespace-nowrap",children:["Misc Expenses: ",n?.miscExpensesCount??0]})}),m},[n?.transactionsCount,n?.ledgerCount,n?.documentsCount,n?.miscExpensesCount,o,s,l,c,r?.missingInfo,f,u]);return d.jsx("td",{children:d.jsx(zan,{chargeId:i,children:d.jsx(Hae,{items:h})})})},pUt=({data:e,onChange:t})=>{const{tags:n,id:r,validationData:i,missingInfoSuggestions:a}=$t(F3e,e),{updateCharge:o,fetching:s}=Uie(),[l,c]=w.useState(n??[]),[u,f]=w.useState(!1),h=i?.missingInfo?.includes(ly.Tags),m=h&&!!a?.tags?.length;w.useEffect(()=>{n?.length&&!l.length&&c(n)},[n,l.length]),w.useEffect(()=>{l.length===0&&m&&c(a?.tags??[])},[l.length,m,a?.tags]);const p=w.useCallback(async A=>{await o({chargeId:r,fields:{tags:A?.map(v=>({id:v.id}))}}),f(!0)},[r,o]);return d.jsxs("td",{children:[d.jsx(ba,{inline:!0,size:12,disabled:!h,color:"red",zIndex:"auto",children:d.jsx(Hae,{items:l.map(A=>d.jsx(nS,{children:d.jsxs("div",{children:[A.namePath&&d.jsx(er,{size:"xs",opacity:.65,children:`${A.namePath.join(" > ")} >`}),d.jsx(er,{size:"sm",children:A.name})]})},A.id)),extraClassName:m?"bg-yellow-400":void 0})}),m&&d.jsx(ID,{onClick:A=>{A.stopPropagation(),p(a.tags)},disabled:s}),d.jsx(uoe,{chargeId:r,tagIds:a?.tags?.map(A=>({id:A.id})),open:u,onOpenChange:f,onClose:t})]})},AUt=({data:e})=>{const{validationData:t,taxCategory:n,__typename:r}=$t(D3e,e),i=w.useMemo(()=>{switch(r){case"DividendCharge":case"InternalTransferCharge":case"SalaryCharge":case"BankDepositCharge":case"ForeignSecuritiesCharge":return!1;default:return!0}},[r]),a=w.useMemo(()=>t?.missingInfo?.includes(ly.TaxCategory),[t?.missingInfo]);return i?d.jsx("td",{children:d.jsx(ba,{inline:!0,size:12,disabled:!a,color:"red",zIndex:"auto",children:n?.name??"N/A"})}):d.jsx("td",{})},gUt=({data:e})=>{const t=$t(K2t,e),{__typename:n}=t,{text:r,icon:i}=w.useMemo(()=>({text:kLe(n),icon:Ejt(n)}),[n]);return d.jsxs("td",{children:[d.jsx("div",{children:r}),d.jsx(gne,{radius:"xl",size:"xl",children:i})]})},vUt=({data:e})=>{const{vat:t,totalAmount:n,validationData:r,__typename:i}=$t(Y2t,e),a=w.useMemo(()=>r?.missingInfo?.includes(ly.Vat),[r?.missingInfo]),o=w.useMemo(()=>!t&&n?.currency===Qt.Ils,[t,n?.currency]),s=w.useMemo(()=>(t?.raw??0)>0&&(n?.raw??0)<0||(t?.raw??0)<0&&(n?.raw??0)>0,[t?.raw,n?.raw]),l=o||s;return w.useMemo(()=>{switch(i){case"BusinessTripCharge":case"DividendCharge":case"ConversionCharge":case"SalaryCharge":case"InternalTransferCharge":case"BankDepositCharge":case"ForeignSecuritiesCharge":case"CreditcardBankCharge":return!1;default:return!0}},[i])?d.jsx("td",{children:d.jsx("div",{className:l?"whitespace-nowrap text-red-500":"whitespace-nowrap text-green-700",children:d.jsx(ba,{inline:!0,size:12,disabled:!a,color:"red",zIndex:"auto",children:t?.formatted})})}):d.jsx("td",{})},yUt="deleteCharge",bUt=()=>{const[{fetching:e},t]=Hn(HFt),n=w.useCallback(async r=>{const i=`Error deleting charge ID [${r.chargeId}]`,a=`${yUt}-${r.chargeId}`;Qe.loading("Deleting charge",{id:a});try{const o=await t(r),s=Vn(o,i,a);if(s){if(s.deleteCharge===!1)throw new Error("Unsuccessful deletion");return Qe.success("Success",{id:a,description:"Charge was deleted"}),s.deleteCharge}}catch(o){console.error(`${i}: ${o}`),Qe.error("Error",{id:a,description:i,duration:1e5,closeButton:!0})}return!1},[t]);return{fetching:e,deleteCharge:n}},xUt="insertDepreciationRecord",wUt=()=>{const[{fetching:e},t]=Hn(FFt),n=w.useCallback(async r=>{const i="Error adding depreciation record",a=xUt;Qe.loading("Adding depreciation record",{id:a});try{const o=await t(r),s=Vn(o,i,a,"insertDepreciationRecord");if(s)return Qe.success("Success",{id:a,description:"Depreciation record was added"}),s.insertDepreciationRecord}catch(o){console.error(`${i}: ${o}`),Qe.error("Error",{id:a,description:i,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,addDepreciationRecord:n}};function xbe(e){const{chargeId:t,onAdd:n}=e,[r,{close:i,open:a}]=ss(!1);return d.jsxs(d.Fragment,{children:[d.jsx(zn,{label:"Add Depreciation Record",children:d.jsx(qe,{variant:"outline",size:"icon",className:"size-7.5",onClick:o=>{o.stopPropagation(),a()},children:d.jsx(mc,{className:"size-5"})})}),r&&d.jsx(kUt,{chargeId:t,opened:r,close:i,onAdd:n})]})}function kUt({chargeId:e,opened:t,close:n,onAdd:r}){const{control:i,handleSubmit:a}=fr({defaultValues:{chargeId:e}}),[o,s]=w.useState(!1),[{data:l,fetching:c}]=rn({query:B3e}),{addDepreciationRecord:u,fetching:f}=wUt(),h=p=>{u({fields:p}).then(()=>{r?.(),n()})},m=l?.depreciationCategories?.map(p=>({value:p.id,label:p.name}))??[];return w.useEffect(()=>{s(!!(c||f))},[c,f]),d.jsxs(_r,{opened:t,onClose:n,centered:!0,lockScroll:!0,children:[d.jsx(_r.Title,{children:"Add Depreciation Record"}),d.jsx(_r.Body,{children:d.jsxs("form",{onSubmit:a(h),children:[d.jsx(xt,{name:"activationDate",control:i,rules:{pattern:{value:_i,message:"Date must be im format yyyy-mm-dd"}},render:({field:{value:p,...A}})=>{const v=p?new Date(p):void 0;return d.jsx(qi,{...A,onChange:y=>{const x=y?typeof y=="string"?y:Rt(y,"yyyy-MM-dd"):void 0;x!==p&&A.onChange(x)},value:v,label:"Activation Date",popoverProps:{withinPortal:!0}})}}),d.jsx(xt,{name:"amount",control:i,render:({field:p,fieldState:A})=>d.jsx(xt,{name:"currency",control:i,render:({field:v,fieldState:y})=>d.jsx(Aa,{...p,value:p.value??void 0,error:A.error?.message||y.error?.message,label:"Amount",currencyCodeProps:{...v,label:"Currency"}})})}),d.jsx(xt,{name:"categoryId",control:i,render:({field:p,fieldState:A})=>d.jsx(ai,{...p,disabled:c,data:m,label:"Category",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:A.error?.message,withinPortal:!0})}),d.jsx(xt,{name:"type",control:i,render:({field:p,fieldState:A})=>d.jsx(ai,{...p,data:BHe,value:p.value,label:"Type",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:A.error?.message,withinPortal:!0})}),d.jsx("div",{className:"flex justify-center mt-5 gap-3",children:d.jsx("button",{type:"submit",className:"text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-indigo-600 rounded-sm text-lg",children:"Add"})})]})}),(f||o)&&d.jsx(em,{blur:1,center:!0,children:d.jsx(ao,{})})]})}const SUt="updateDepreciationRecord",CUt=()=>{const[{fetching:e},t]=Hn(EDt),n=w.useCallback(async r=>{const i="Error updating depreciation record",a=SUt;Qe.loading("Updating depreciation record",{id:a});try{const o=await t(r),s=Vn(o,i,a,"updateDepreciationRecord");if(s)return Qe.success("Success",{id:a,description:"Depreciation record was updated"}),s.updateDepreciationRecord}catch(o){console.error(`${i}: ${o}`),Qe.error("Error",{id:a,description:i,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,updateDepreciationRecord:n}},_Ut="deleteDepreciationRecord",NUt=()=>{const[{fetching:e},t]=Hn(VFt),n=w.useCallback(async r=>{const i="Error deleting depreciation record",a=`${_Ut}-${r.depreciationRecordId}`;Qe.loading("Deleting depreciation record",{id:a});try{const o=await t(r),s=Vn(o,i,a);if(s)return Qe.success("Success",{id:a,description:"Depreciation record was deleted"}),s.deleteDepreciationRecord}catch(o){console.error(`${i}: ${o}`),Qe.error("Error",{id:a,description:i,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,deleteDepreciationRecord:n}};function ln(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}function EUt(e,t){const n=w.createContext(t),r=a=>{const{children:o,...s}=a,l=w.useMemo(()=>s,Object.values(s));return d.jsx(n.Provider,{value:l,children:o})};r.displayName=e+"Provider";function i(a){const o=w.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function Ac(e,t=[]){let n=[];function r(a,o){const s=w.createContext(o),l=n.length;n=[...n,o];const c=f=>{const{scope:h,children:m,...p}=f,A=h?.[e]?.[l]||s,v=w.useMemo(()=>p,Object.values(p));return d.jsx(A.Provider,{value:v,children:m})};c.displayName=a+"Provider";function u(f,h){const m=h?.[e]?.[l]||s,p=w.useContext(m);if(p)return p;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[c,u]}const i=()=>{const a=n.map(o=>w.createContext(o));return function(s){const l=s?.[e]||a;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,FUt(i,...t)]}function FUt(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:l,scopeName:c})=>{const f=l(a)[`__scope${c}`];return{...s,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var cs=globalThis?.document?w.useLayoutEffect:()=>{},DUt=ox[" useId ".trim().toString()]||(()=>{}),TUt=0;function Ns(e){const[t,n]=w.useState(DUt());return cs(()=>{n(r=>r??String(TUt++))},[e]),e||(t?`radix-${t}`:"")}var OUt=ox[" useInsertionEffect ".trim().toString()]||cs;function Cd({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,o]=BUt({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:i;{const u=w.useRef(e!==void 0);w.useEffect(()=>{const f=u.current;f!==s&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=s},[s,r])}const c=w.useCallback(u=>{if(s){const f=IUt(u)?u(e):u;f!==e&&o.current?.(f)}else a(u)},[s,e,a,o]);return[l,c]}function BUt({defaultProp:e,onChange:t}){const[n,r]=w.useState(e),i=w.useRef(n),a=w.useRef(t);return OUt(()=>{a.current=t},[t]),w.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function IUt(e){return typeof e=="function"}function cl(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>t.current?.(...n),[])}function jUt(e,t=globalThis?.document){const n=cl(e);w.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var PUt="DismissableLayer",aX="dismissableLayer.update",MUt="dismissableLayer.pointerDownOutside",RUt="dismissableLayer.focusOutside",wbe,fHe=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bC=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=e,c=w.useContext(fHe),[u,f]=w.useState(null),h=u?.ownerDocument??globalThis?.document,[,m]=w.useState({}),p=Vr(t,E=>f(E)),A=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=A.indexOf(v),x=u?A.indexOf(u):-1,k=c.layersWithOutsidePointerEventsDisabled.size>0,S=x>=y,C=UUt(E=>{const D=E.target,T=[...c.branches].some(j=>j.contains(D));!S||T||(i?.(E),o?.(E),E.defaultPrevented||s?.())},h),N=zUt(E=>{const D=E.target;[...c.branches].some(j=>j.contains(D))||(a?.(E),o?.(E),E.defaultPrevented||s?.())},h);return jUt(E=>{x===c.layers.size-1&&(r?.(E),!E.defaultPrevented&&s&&(E.preventDefault(),s()))},h),w.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(wbe=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),kbe(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=wbe)}},[u,h,n,c]),w.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),kbe())},[u,c]),w.useEffect(()=>{const E=()=>m({});return document.addEventListener(aX,E),()=>document.removeEventListener(aX,E)},[]),d.jsx(wn.div,{...l,ref:p,style:{pointerEvents:k?S?"auto":"none":void 0,...e.style},onFocusCapture:ln(e.onFocusCapture,N.onFocusCapture),onBlurCapture:ln(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:ln(e.onPointerDownCapture,C.onPointerDownCapture)})});bC.displayName=PUt;var $Ut="DismissableLayerBranch",LUt=w.forwardRef((e,t)=>{const n=w.useContext(fHe),r=w.useRef(null),i=Vr(t,r);return w.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),d.jsx(wn.div,{...e,ref:i})});LUt.displayName=$Ut;function UUt(e,t=globalThis?.document){const n=cl(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let l=function(){hHe(MUt,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function zUt(e,t=globalThis?.document){const n=cl(e),r=w.useRef(!1);return w.useEffect(()=>{const i=a=>{a.target&&!r.current&&hHe(RUt,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function kbe(){const e=new CustomEvent(aX);document.dispatchEvent(e)}function hHe(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?NLe(i,a):i.dispatchEvent(a)}var Q9="focusScope.autoFocusOnMount",q9="focusScope.autoFocusOnUnmount",Sbe={bubbles:!1,cancelable:!0},HUt="FocusScope",TD=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,l]=w.useState(null),c=cl(i),u=cl(a),f=w.useRef(null),h=Vr(t,A=>l(A)),m=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let A=function(k){if(m.paused||!s)return;const S=k.target;s.contains(S)?f.current=S:Bv(f.current,{select:!0})},v=function(k){if(m.paused||!s)return;const S=k.relatedTarget;S!==null&&(s.contains(S)||Bv(f.current,{select:!0}))},y=function(k){if(document.activeElement===document.body)for(const C of k)C.removedNodes.length>0&&Bv(s)};document.addEventListener("focusin",A),document.addEventListener("focusout",v);const x=new MutationObserver(y);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",A),document.removeEventListener("focusout",v),x.disconnect()}}},[r,s,m.paused]),w.useEffect(()=>{if(s){_be.add(m);const A=document.activeElement;if(!s.contains(A)){const y=new CustomEvent(Q9,Sbe);s.addEventListener(Q9,c),s.dispatchEvent(y),y.defaultPrevented||(VUt(KUt(mHe(s)),{select:!0}),document.activeElement===A&&Bv(s))}return()=>{s.removeEventListener(Q9,c),setTimeout(()=>{const y=new CustomEvent(q9,Sbe);s.addEventListener(q9,u),s.dispatchEvent(y),y.defaultPrevented||Bv(A??document.body,{select:!0}),s.removeEventListener(q9,u),_be.remove(m)},0)}}},[s,c,u,m]);const p=w.useCallback(A=>{if(!n&&!r||m.paused)return;const v=A.key==="Tab"&&!A.altKey&&!A.ctrlKey&&!A.metaKey,y=document.activeElement;if(v&&y){const x=A.currentTarget,[k,S]=QUt(x);k&&S?!A.shiftKey&&y===S?(A.preventDefault(),n&&Bv(k,{select:!0})):A.shiftKey&&y===k&&(A.preventDefault(),n&&Bv(S,{select:!0})):y===x&&A.preventDefault()}},[n,r,m.paused]);return d.jsx(wn.div,{tabIndex:-1,...o,ref:h,onKeyDown:p})});TD.displayName=HUt;function VUt(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Bv(r,{select:t}),document.activeElement!==n)return}function QUt(e){const t=mHe(e),n=Cbe(t,e),r=Cbe(t.reverse(),e);return[n,r]}function mHe(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Cbe(e,t){for(const n of e)if(!qUt(n,{upTo:t}))return n}function qUt(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function GUt(e){return e instanceof HTMLInputElement&&"select"in e}function Bv(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&GUt(e)&&t&&e.select()}}var _be=WUt();function WUt(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Nbe(e,t),e.unshift(t)},remove(t){e=Nbe(e,t),e[0]?.resume()}}}function Nbe(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function KUt(e){return e.filter(t=>t.tagName!=="A")}var YUt="Portal",xC=w.forwardRef((e,t)=>{const{container:n,...r}=e,[i,a]=w.useState(!1);cs(()=>a(!0),[]);const o=n||i&&globalThis?.document?.body;return o?HIe.createPortal(d.jsx(wn.div,{...r,ref:t}),o):null});xC.displayName=YUt;function XUt(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var Ws=e=>{const{present:t,children:n}=e,r=ZUt(t),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),a=Vr(r.ref,JUt(i));return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:a}):null};Ws.displayName="Presence";function ZUt(e){const[t,n]=w.useState(),r=w.useRef(null),i=w.useRef(e),a=w.useRef("none"),o=e?"mounted":"unmounted",[s,l]=XUt(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const c=I5(r.current);a.current=s==="mounted"?c:"none"},[s]),cs(()=>{const c=r.current,u=i.current;if(u!==e){const h=a.current,m=I5(c);e?l("MOUNT"):m==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&h!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),cs(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,f=m=>{const A=I5(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&A&&(l("ANIMATION_END"),!i.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=m=>{m.target===t&&(a.current=I5(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:w.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function I5(e){return e?.animationName||"none"}function JUt(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var G9=0;function tL(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ebe()),document.body.insertAdjacentElement("beforeend",e[1]??Ebe()),G9++,()=>{G9===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),G9--}},[])}function Ebe(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var nL="Dialog",[pHe]=Ac(nL),[e7t,nm]=pHe(nL),AHe=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=w.useRef(null),l=w.useRef(null),[c,u]=Cd({prop:r,defaultProp:i??!1,onChange:a,caller:nL});return d.jsx(e7t,{scope:t,triggerRef:s,contentRef:l,contentId:Ns(),titleId:Ns(),descriptionId:Ns(),open:c,onOpenChange:u,onOpenToggle:w.useCallback(()=>u(f=>!f),[u]),modal:o,children:n})};AHe.displayName=nL;var gHe="DialogTrigger",vHe=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=nm(gHe,n),a=Vr(t,i.triggerRef);return d.jsx(wn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Vie(i.open),...r,ref:a,onClick:ln(e.onClick,i.onOpenToggle)})});vHe.displayName=gHe;var zie="DialogPortal",[t7t,yHe]=pHe(zie,{forceMount:void 0}),bHe=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=nm(zie,t);return d.jsx(t7t,{scope:t,forceMount:n,children:w.Children.map(r,o=>d.jsx(Ws,{present:n||a.open,children:d.jsx(xC,{asChild:!0,container:i,children:o})}))})};bHe.displayName=zie;var jM="DialogOverlay",xHe=w.forwardRef((e,t)=>{const n=yHe(jM,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=nm(jM,e.__scopeDialog);return a.modal?d.jsx(Ws,{present:r||a.open,children:d.jsx(r7t,{...i,ref:t})}):null});xHe.displayName=jM;var n7t=by("DialogOverlay.RemoveScroll"),r7t=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=nm(jM,n);return d.jsx(rC,{as:n7t,allowPinchZoom:!0,shards:[i.contentRef],children:d.jsx(wn.div,{"data-state":Vie(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),hx="DialogContent",wHe=w.forwardRef((e,t)=>{const n=yHe(hx,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=nm(hx,e.__scopeDialog);return d.jsx(Ws,{present:r||a.open,children:a.modal?d.jsx(i7t,{...i,ref:t}):d.jsx(a7t,{...i,ref:t})})});wHe.displayName=hx;var i7t=w.forwardRef((e,t)=>{const n=nm(hx,e.__scopeDialog),r=w.useRef(null),i=Vr(t,n.contentRef,r);return w.useEffect(()=>{const a=r.current;if(a)return c3(a)},[]),d.jsx(kHe,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ln(e.onCloseAutoFocus,a=>{a.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:ln(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:ln(e.onFocusOutside,a=>a.preventDefault())})}),a7t=w.forwardRef((e,t)=>{const n=nm(hx,e.__scopeDialog),r=w.useRef(!1),i=w.useRef(!1);return d.jsx(kHe,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(r.current||n.triggerRef.current?.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;n.triggerRef.current?.contains(o)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),kHe=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=nm(hx,n),l=w.useRef(null),c=Vr(t,l);return tL(),d.jsxs(d.Fragment,{children:[d.jsx(TD,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:d.jsx(bC,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Vie(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(o7t,{titleId:s.titleId}),d.jsx(l7t,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Hie="DialogTitle",SHe=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=nm(Hie,n);return d.jsx(wn.h2,{id:i.titleId,...r,ref:t})});SHe.displayName=Hie;var CHe="DialogDescription",_He=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=nm(CHe,n);return d.jsx(wn.p,{id:i.descriptionId,...r,ref:t})});_He.displayName=CHe;var NHe="DialogClose",EHe=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=nm(NHe,n);return d.jsx(wn.button,{type:"button",...r,ref:t,onClick:ln(e.onClick,()=>i.onOpenChange(!1))})});EHe.displayName=NHe;function Vie(e){return e?"open":"closed"}var FHe="DialogTitleWarning",[ZWn,DHe]=EUt(FHe,{contentName:hx,titleName:Hie,docsSlug:"dialog"}),o7t=({titleId:e})=>{const t=DHe(FHe),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
668
668
|
|
|
669
669
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
670
670
|
|
|
@@ -812,7 +812,7 @@ T* `):Y.join(` Tj
|
|
|
812
812
|
endobj\r
|
|
813
813
|
`},n.outline.count_r=function(r,i){for(var a=0;a<i.children.length;a++)r.count++,this.count_r(r,i.children[a]);return r.count}}])})(Gn.API),(function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(n,r,i,a,o,s){var l,c=this.decode.DCT_DECODE,u=null;if(typeof n=="string"||this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n)){switch(n=o||n,n=this.__addimage__.isArrayBuffer(n)?new Uint8Array(n):n,l=(function(f){for(var h,m=256*f.charCodeAt(4)+f.charCodeAt(5),p=f.length,A={width:0,height:0,numcomponents:1},v=4;v<p;v+=2){if(v+=m,t.indexOf(f.charCodeAt(v+1))!==-1){h=256*f.charCodeAt(v+5)+f.charCodeAt(v+6),A={width:256*f.charCodeAt(v+7)+f.charCodeAt(v+8),height:h,numcomponents:f.charCodeAt(v+9)};break}m=256*f.charCodeAt(v+2)+f.charCodeAt(v+3)}return A})(n=this.__addimage__.isArrayBufferView(n)?this.__addimage__.arrayBufferToBinaryString(n):n),l.numcomponents){case 1:s=this.color_spaces.DEVICE_GRAY;break;case 4:s=this.color_spaces.DEVICE_CMYK;break;case 3:s=this.color_spaces.DEVICE_RGB}u={data:n,width:l.width,height:l.height,colorSpace:s,bitsPerComponent:8,filter:c,index:r,alias:i}}return u}})(Gn.API),Gn.API.processPNG=function(e,t,n,r){if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){var i,a=xZt(e,{checkCrc:!0}),o=a.width,s=a.height,l=a.channels,c=a.palette,u=a.depth;i=c&&l===1?(function(D){for(var T=D.width,j=D.height,O=D.data,B=D.palette,M=D.depth,$=!1,U=[],P=[],V=void 0,Q=!1,X=0,Z=0;Z<B.length;Z++){var le=e1e(B[Z],4),H=le[0],q=le[1],W=le[2],te=le[3];U.push(H,q,W),te!=null&&(te===0?(X++,P.length<1&&P.push(Z)):te<255&&(Q=!0))}if(Q||X>1){$=!0,P=void 0;var ne=T*j;V=new Uint8Array(ne);for(var re=new DataView(O.buffer),de=0;de<ne;de++){var he=qH(re,de,M),pe=e1e(B[he],4)[3];V[de]=pe}}else X===0&&(P=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:$?8:void 0,colorBytes:O,alphaBytes:V,needSMask:$,palette:U,mask:P}})(a):l===2||l===4?(function(D){for(var T=D.data,j=D.width,O=D.height,B=D.channels,M=D.depth,$=B===2?"DeviceGray":"DeviceRGB",U=B-1,P=j*O,V=U,Q=P*V,X=1*P,Z=Math.ceil(Q*M/8),le=Math.ceil(X*M/8),H=new Uint8Array(Z),q=new Uint8Array(le),W=new DataView(T.buffer),te=new DataView(H.buffer),ne=new DataView(q.buffer),re=!1,de=0;de<P;de++){for(var he=de*B,pe=0;pe<V;pe++)awe(te,qH(W,he+pe,M),de*V+pe,M);var oe=qH(W,he+V,M);oe<(1<<M)-1&&(re=!0),awe(ne,oe,1*de,M)}return{colorSpace:$,colorsPerPixel:U,sMaskBitsPerComponent:re?M:void 0,colorBytes:H,alphaBytes:q,needSMask:re}})(a):(function(D){var T=D.data,j=D.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:j,colorsPerPixel:j==="DeviceGray"?1:3,colorBytes:T instanceof Uint16Array?(function(O){for(var B=O.length,M=new Uint8Array(2*B),$=new DataView(M.buffer,M.byteOffset,M.byteLength),U=0;U<B;U++)$.setUint16(2*U,O[U],!1);return M})(T):T,needSMask:!1}})(a);var f,h,m,p=i,A=p.colorSpace,v=p.colorsPerPixel,y=p.sMaskBitsPerComponent,x=p.colorBytes,k=p.alphaBytes,S=p.needSMask,C=p.palette,N=p.mask,E=null;return r!==Gn.API.image_compression.NONE&&typeof VX=="function"?(E=(function(D){var T;switch(D){case Gn.API.image_compression.FAST:T=11;break;case Gn.API.image_compression.MEDIUM:T=13;break;case Gn.API.image_compression.SLOW:T=14;break;default:T=12}return T})(r),f=this.decode.FLATE_DECODE,h="/Predictor ".concat(E," /Colors ").concat(v," /BitsPerComponent ").concat(u," /Columns ").concat(o),e=ewe(x,Math.ceil(o*v*u/8),v,u,r),S&&(m=ewe(k,Math.ceil(o*y/8),1,y,r))):(f=void 0,h=void 0,e=x,S&&(m=k)),(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(m&&this.__addimage__.isArrayBuffer(m)||this.__addimage__.isArrayBufferView(m))&&(m=this.__addimage__.arrayBufferToBinaryString(m)),{alias:n,data:e,index:t,filter:f,decodeParameters:h,transparency:N,palette:C,sMask:m,predictor:E,width:o,height:s,bitsPerComponent:u,sMaskBitsPerComponent:y,colorSpace:A}}},(function(e){e.processGIF89A=function(t,n,r,i){var a=new zZt(t),o=a.width,s=a.height,l=[];a.decodeAndBlitFrameRGBA(0,l);var c={data:l,width:o,height:s},u=new GH(100).encode(c,100);return e.processJPEG.call(this,u,n,r,i)},e.processGIF87A=e.processGIF89A})(Gn.API),bh.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var t=0;t<e;t++){var n=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:i,green:r,blue:n,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},bh.prototype.parseBGR=function(){this.pos=this.offset;try{var e="bit"+this.bitPP,t=this.width*this.height*4;this.data=new Uint8Array(t),this[e]()}catch(n){pa.log("bit decode error:"+n)}},bh.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),n=t%4;for(e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,i=0;i<t;i++)for(var a=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+8*i*4,s=0;s<8&&8*i+s<this.width;s++){var l=this.palette[a>>7-s&1];this.data[o+4*s]=l.blue,this.data[o+4*s+1]=l.green,this.data[o+4*s+2]=l.red,this.data[o+4*s+3]=255}n!==0&&(this.pos+=4-n)}},bh.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<e;i++){var a=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+2*i*4,s=a>>4,l=15&a,c=this.palette[s];if(this.data[o]=c.blue,this.data[o+1]=c.green,this.data[o+2]=c.red,this.data[o+3]=255,2*i+1>=this.width)break;c=this.palette[l],this.data[o+4]=c.blue,this.data[o+4+1]=c.green,this.data[o+4+2]=c.red,this.data[o+4+3]=255}t!==0&&(this.pos+=4-t)}},bh.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var i=this.datav.getUint8(this.pos++,!0),a=n*this.width*4+4*r;if(i<this.palette.length){var o=this.palette[i];this.data[a]=o.red,this.data[a+1]=o.green,this.data[a+2]=o.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}e!==0&&(this.pos+=4-e)}},bh.prototype.bit15=function(){for(var e=this.width%3,t=parseInt("11111",2),n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<this.width;i++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(a&t)/t*255|0,s=(a>>5&t)/t*255|0,l=(a>>10&t)/t*255|0,c=a>>15?255:0,u=r*this.width*4+4*i;this.data[u]=l,this.data[u+1]=s,this.data[u+2]=o,this.data[u+3]=c}this.pos+=e}},bh.prototype.bit16=function(){for(var e=this.width%3,t=parseInt("11111",2),n=parseInt("111111",2),r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,a=0;a<this.width;a++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(o&t)/t*255|0,l=(o>>5&n)/n*255|0,c=(o>>11)/t*255|0,u=i*this.width*4+4*a;this.data[u]=c,this.data[u+1]=l,this.data[u+2]=s,this.data[u+3]=255}this.pos+=e}},bh.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=t*this.width*4+4*n;this.data[o]=a,this.data[o+1]=i,this.data[o+2]=r,this.data[o+3]=255}this.pos+=this.width%4}},bh.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=t*this.width*4+4*n;this.data[s]=a,this.data[s+1]=i,this.data[s+2]=r,this.data[s+3]=o}},bh.prototype.getData=function(){return this.data},(function(e){e.processBMP=function(t,n,r,i){var a=new bh(t,!1),o=a.width,s=a.height,l={data:a.getData(),width:o,height:s},c=new GH(100).encode(l,100);return e.processJPEG.call(this,c,n,r,i)}})(Gn.API),swe.prototype.getData=function(){return this.data},(function(e){e.processWEBP=function(t,n,r,i){var a=new swe(t),o=a.width,s=a.height,l={data:a.getData(),width:o,height:s},c=new GH(100).encode(l,100);return e.processJPEG.call(this,c,n,r,i)}})(Gn.API),Gn.API.processRGBA=function(e,t,n){for(var r=e.data,i=r.length,a=new Uint8Array(i/4*3),o=new Uint8Array(i/4),s=0,l=0,c=0;c<i;c+=4){var u=r[c],f=r[c+1],h=r[c+2],m=r[c+3];a[s++]=u,a[s++]=f,a[s++]=h,o[l++]=m}var p=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:p,index:t,alias:n,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},Gn.API.setLanguage=function(e){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[e]!==void 0&&(this.internal.languageSettings.languageCode=e,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},Sw=Gn.API,gB=Sw.getCharWidthsArray=function(e,t){var n,r,i=(t=t||{}).font||this.internal.getFont(),a=t.fontSize||this.internal.getFontSize(),o=t.charSpace||this.internal.getCharSpace(),s=t.widths?t.widths:i.metadata.Unicode.widths,l=s.fof?s.fof:1,c=t.kerning?t.kerning:i.metadata.Unicode.kerning,u=c.fof?c.fof:1,f=t.doKerning!==!1,h=0,m=e.length,p=0,A=s[0]||l,v=[];for(n=0;n<m;n++)r=e.charCodeAt(n),typeof i.metadata.widthOfString=="function"?v.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(r))+o*(1e3/a)||0)/1e3):(h=f&&ea(c[r])==="object"&&!isNaN(parseInt(c[r][p],10))?c[r][p]/u:0,v.push((s[r]||A)/l+h)),p=r;return v},X1e=Sw.getStringUnitWidth=function(e,t){var n=(t=t||{}).fontSize||this.internal.getFontSize(),r=t.font||this.internal.getFont(),i=t.charSpace||this.internal.getCharSpace();return Sw.processArabic&&(e=Sw.processArabic(e)),typeof r.metadata.widthOfString=="function"?r.metadata.widthOfString(e,n,i)/n:gB.apply(this,arguments).reduce(function(a,o){return a+o},0)},Z1e=function(e,t,n,r){for(var i=[],a=0,o=e.length,s=0;a!==o&&s+t[a]<n;)s+=t[a],a++;i.push(e.slice(0,a));var l=a;for(s=0;a!==o;)s+t[a]>r&&(i.push(e.slice(l,a)),s=0,l=a),s+=t[a],a++;return l!==a&&i.push(e.slice(l,a)),i},J1e=function(e,t,n){n||(n={});var r,i,a,o,s,l,c,u=[],f=[u],h=n.textIndent||0,m=0,p=0,A=e.split(" "),v=gB.apply(this,[" ",n])[0];if(l=n.lineIndent===-1?A[0].length+2:n.lineIndent||0){var y=Array(l).join(" "),x=[];A.map(function(S){(S=S.split(/\s*\n/)).length>1?x=x.concat(S.map(function(C,N){return(N&&C.length?`
|
|
814
814
|
`:"")+C})):x.push(S[0])}),A=x,l=X1e.apply(this,[y,n])}for(a=0,o=A.length;a<o;a++){var k=0;if(r=A[a],l&&r[0]==`
|
|
815
|
-
`&&(r=r.substr(1),k=1),h+m+(p=(i=gB.apply(this,[r,n])).reduce(function(S,C){return S+C},0))>t||k){if(p>t){for(s=Z1e.apply(this,[r,i,t-(h+m),t]),u.push(s.shift()),u=[s.pop()];s.length;)f.push([s.shift()]);p=i.slice(r.length-(u[0]?u[0].length:0)).reduce(function(S,C){return S+C},0)}else u=[r];f.push(u),h=p+l,m=v}else u.push(r),h+=m+p,m=v}return c=l?function(S,C){return(C?y:"")+S.join(" ")}:function(S){return S.join(" ")},f.map(c)},Sw.splitTextToSize=function(e,t,n){var r,i=(n=n||{}).fontSize||this.internal.getFontSize(),a=(function(u){if(u.widths&&u.kerning)return{widths:u.widths,kerning:u.kerning};var f=this.internal.getFont(u.fontName,u.fontStyle),h="Unicode";return f.metadata[h]?{widths:f.metadata[h].widths||{0:1},kerning:f.metadata[h].kerning||{}}:{font:f.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);r=Array.isArray(e)?e:String(e).split(/\r?\n/);var o=1*this.internal.scaleFactor*t/i;a.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=n.lineIndent;var s,l,c=[];for(s=0,l=r.length;s<l;s++)c=c.concat(J1e.apply(this,[r[s],o,a]));return c},(function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="0123456789abcdef",n="klmnopqrstuvwxyz",r={},i={},a=0;a<16;a++)r[n[a]]=t[a],i[t[a]]=n[a];var o=function(h){return"0x"+parseInt(h,10).toString(16)},s=e.__fontmetrics__.compress=function(h){var m,p,A,v,y=["{"];for(var x in h){if(m=h[x],isNaN(parseInt(x,10))?p="'"+x+"'":(x=parseInt(x,10),p=(p=o(x).slice(2)).slice(0,-1)+i[p.slice(-1)]),typeof m=="number")m<0?(A=o(m).slice(3),v="-"):(A=o(m).slice(2),v=""),A=v+A.slice(0,-1)+i[A.slice(-1)];else{if(ea(m)!=="object")throw new Error("Don't know what to do with value type "+ea(m)+".");A=s(m)}y.push(p+A)}return y.push("}"),y.join("")},l=e.__fontmetrics__.uncompress=function(h){if(typeof h!="string")throw new Error("Invalid argument passed to uncompress.");for(var m,p,A,v,y={},x=1,k=y,S=[],C="",N="",E=h.length-1,D=1;D<E;D+=1)(v=h[D])=="'"?m?(A=m.join(""),m=void 0):m=[]:m?m.push(v):v=="{"?(S.push([k,A]),k={},A=void 0):v=="}"?((p=S.pop())[0][p[1]]=k,A=void 0,k=p[0]):v=="-"?x=-1:A===void 0?r.hasOwnProperty(v)?(C+=r[v],A=parseInt(C,16)*x,x=1,C=""):C+=v:r.hasOwnProperty(v)?(N+=r[v],k[A]=parseInt(N,16)*x,x=1,A=void 0,N=""):N+=v;return y},c={codePages:["WinAnsiEncoding"],WinAnsiEncoding:l("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},u={Unicode:{Courier:c,"Courier-Bold":c,"Courier-BoldOblique":c,"Courier-Oblique":c,Helvetica:c,"Helvetica-Bold":c,"Helvetica-BoldOblique":c,"Helvetica-Oblique":c,"Times-Roman":c,"Times-Bold":c,"Times-BoldItalic":c,"Times-Italic":c}},f={Unicode:{"Courier-Oblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":l("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":l("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:l("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:l("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":l("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":l("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(h){var m=h.font,p=f.Unicode[m.postScriptName];p&&(m.metadata.Unicode={},m.metadata.Unicode.widths=p.widths,m.metadata.Unicode.kerning=p.kerning);var A=u.Unicode[m.postScriptName];A&&(m.metadata.Unicode.encoding=A,m.encoding=A.codePages[0])}])})(Gn.API),(function(e){var t=function(n){for(var r=n.length,i=new Uint8Array(r),a=0;a<r;a++)i[a]=n.charCodeAt(a);return i};e.API.events.push(["addFont",function(n){var r=void 0,i=n.font,a=n.instance;if(!i.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(r=a.existsFileInVFS(i.postScriptName)===!1?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(o,s){s=/^\x00\x01\x00\x00/.test(s)?t(s):t(uj(s)),o.metadata=e.API.TTFFont.open(s),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(i,r)}}])})(Gn),Gn.API.addSvgAsImage=function(e,t,n,r,i,a,o,s){if(isNaN(t)||isNaN(n))throw pa.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(i))throw pa.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=r,l.height=i;var c=l.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,l.width,l.height);var u={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},f=this;return(xr.canvg?Promise.resolve(xr.canvg):_H(()=>import("./index.es-DeOIvIZ3.js"),[])).catch(function(h){return Promise.reject(new Error("Could not load canvg: "+h))}).then(function(h){return h.default?h.default:h}).then(function(h){return h.fromString(c,e,u)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(h){return h.render(u)}).then(function(){f.addImage(l.toDataURL("image/jpeg",1),t,n,r,i,o,s)})},Gn.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(t,n);return this},Gn.API.viewerPreferences=function(e,t){var n;e=e||{},t=t||!1;var r,i,a,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(o),l=[],c=0,u=0,f=0;function h(p,A){var v,y=!1;for(v=0;v<p.length;v+=1)p[v]===A&&(y=!0);return y}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,e==="reset"||t===!0){var m=s.length;for(f=0;f<m;f+=1)n[s[f]].value=n[s[f]].defaultValue,n[s[f]].explicitSet=!1}if(ea(e)==="object"){for(i in e)if(a=e[i],h(s,i)&&a!==void 0){if(n[i].type==="boolean"&&typeof a=="boolean")n[i].value=a;else if(n[i].type==="name"&&h(n[i].valueSet,a))n[i].value=a;else if(n[i].type==="integer"&&Number.isInteger(a))n[i].value=a;else if(n[i].type==="array"){for(c=0;c<a.length;c+=1)if(r=!0,a[c].length===1&&typeof a[c][0]=="number")l.push(String(a[c]-1));else if(a[c].length>1){for(u=0;u<a[c].length;u+=1)typeof a[c][u]!="number"&&(r=!1);r===!0&&l.push([a[c][0]-1,a[c][1]-1].join(" "))}n[i].value="["+l.join(" ")+"]"}else n[i].value=n[i].defaultValue;n[i].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var p,A=[];for(p in n)n[p].explicitSet===!0&&(n[p].type==="name"?A.push("/"+p+" /"+n[p].value):A.push("/"+p+" "+n[p].value));A.length!==0&&this.internal.write(`/ViewerPreferences
|
|
815
|
+
`&&(r=r.substr(1),k=1),h+m+(p=(i=gB.apply(this,[r,n])).reduce(function(S,C){return S+C},0))>t||k){if(p>t){for(s=Z1e.apply(this,[r,i,t-(h+m),t]),u.push(s.shift()),u=[s.pop()];s.length;)f.push([s.shift()]);p=i.slice(r.length-(u[0]?u[0].length:0)).reduce(function(S,C){return S+C},0)}else u=[r];f.push(u),h=p+l,m=v}else u.push(r),h+=m+p,m=v}return c=l?function(S,C){return(C?y:"")+S.join(" ")}:function(S){return S.join(" ")},f.map(c)},Sw.splitTextToSize=function(e,t,n){var r,i=(n=n||{}).fontSize||this.internal.getFontSize(),a=(function(u){if(u.widths&&u.kerning)return{widths:u.widths,kerning:u.kerning};var f=this.internal.getFont(u.fontName,u.fontStyle),h="Unicode";return f.metadata[h]?{widths:f.metadata[h].widths||{0:1},kerning:f.metadata[h].kerning||{}}:{font:f.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);r=Array.isArray(e)?e:String(e).split(/\r?\n/);var o=1*this.internal.scaleFactor*t/i;a.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=n.lineIndent;var s,l,c=[];for(s=0,l=r.length;s<l;s++)c=c.concat(J1e.apply(this,[r[s],o,a]));return c},(function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="0123456789abcdef",n="klmnopqrstuvwxyz",r={},i={},a=0;a<16;a++)r[n[a]]=t[a],i[t[a]]=n[a];var o=function(h){return"0x"+parseInt(h,10).toString(16)},s=e.__fontmetrics__.compress=function(h){var m,p,A,v,y=["{"];for(var x in h){if(m=h[x],isNaN(parseInt(x,10))?p="'"+x+"'":(x=parseInt(x,10),p=(p=o(x).slice(2)).slice(0,-1)+i[p.slice(-1)]),typeof m=="number")m<0?(A=o(m).slice(3),v="-"):(A=o(m).slice(2),v=""),A=v+A.slice(0,-1)+i[A.slice(-1)];else{if(ea(m)!=="object")throw new Error("Don't know what to do with value type "+ea(m)+".");A=s(m)}y.push(p+A)}return y.push("}"),y.join("")},l=e.__fontmetrics__.uncompress=function(h){if(typeof h!="string")throw new Error("Invalid argument passed to uncompress.");for(var m,p,A,v,y={},x=1,k=y,S=[],C="",N="",E=h.length-1,D=1;D<E;D+=1)(v=h[D])=="'"?m?(A=m.join(""),m=void 0):m=[]:m?m.push(v):v=="{"?(S.push([k,A]),k={},A=void 0):v=="}"?((p=S.pop())[0][p[1]]=k,A=void 0,k=p[0]):v=="-"?x=-1:A===void 0?r.hasOwnProperty(v)?(C+=r[v],A=parseInt(C,16)*x,x=1,C=""):C+=v:r.hasOwnProperty(v)?(N+=r[v],k[A]=parseInt(N,16)*x,x=1,A=void 0,N=""):N+=v;return y},c={codePages:["WinAnsiEncoding"],WinAnsiEncoding:l("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},u={Unicode:{Courier:c,"Courier-Bold":c,"Courier-BoldOblique":c,"Courier-Oblique":c,Helvetica:c,"Helvetica-Bold":c,"Helvetica-BoldOblique":c,"Helvetica-Oblique":c,"Times-Roman":c,"Times-Bold":c,"Times-BoldItalic":c,"Times-Italic":c}},f={Unicode:{"Courier-Oblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":l("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":l("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:l("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:l("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":l("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":l("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(h){var m=h.font,p=f.Unicode[m.postScriptName];p&&(m.metadata.Unicode={},m.metadata.Unicode.widths=p.widths,m.metadata.Unicode.kerning=p.kerning);var A=u.Unicode[m.postScriptName];A&&(m.metadata.Unicode.encoding=A,m.encoding=A.codePages[0])}])})(Gn.API),(function(e){var t=function(n){for(var r=n.length,i=new Uint8Array(r),a=0;a<r;a++)i[a]=n.charCodeAt(a);return i};e.API.events.push(["addFont",function(n){var r=void 0,i=n.font,a=n.instance;if(!i.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(r=a.existsFileInVFS(i.postScriptName)===!1?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(o,s){s=/^\x00\x01\x00\x00/.test(s)?t(s):t(uj(s)),o.metadata=e.API.TTFFont.open(s),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(i,r)}}])})(Gn),Gn.API.addSvgAsImage=function(e,t,n,r,i,a,o,s){if(isNaN(t)||isNaN(n))throw pa.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(i))throw pa.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=r,l.height=i;var c=l.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,l.width,l.height);var u={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},f=this;return(xr.canvg?Promise.resolve(xr.canvg):_H(()=>import("./index.es-BjYgDrEX.js"),[])).catch(function(h){return Promise.reject(new Error("Could not load canvg: "+h))}).then(function(h){return h.default?h.default:h}).then(function(h){return h.fromString(c,e,u)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(h){return h.render(u)}).then(function(){f.addImage(l.toDataURL("image/jpeg",1),t,n,r,i,o,s)})},Gn.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(t,n);return this},Gn.API.viewerPreferences=function(e,t){var n;e=e||{},t=t||!1;var r,i,a,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(o),l=[],c=0,u=0,f=0;function h(p,A){var v,y=!1;for(v=0;v<p.length;v+=1)p[v]===A&&(y=!0);return y}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,e==="reset"||t===!0){var m=s.length;for(f=0;f<m;f+=1)n[s[f]].value=n[s[f]].defaultValue,n[s[f]].explicitSet=!1}if(ea(e)==="object"){for(i in e)if(a=e[i],h(s,i)&&a!==void 0){if(n[i].type==="boolean"&&typeof a=="boolean")n[i].value=a;else if(n[i].type==="name"&&h(n[i].valueSet,a))n[i].value=a;else if(n[i].type==="integer"&&Number.isInteger(a))n[i].value=a;else if(n[i].type==="array"){for(c=0;c<a.length;c+=1)if(r=!0,a[c].length===1&&typeof a[c][0]=="number")l.push(String(a[c]-1));else if(a[c].length>1){for(u=0;u<a[c].length;u+=1)typeof a[c][u]!="number"&&(r=!1);r===!0&&l.push([a[c][0]-1,a[c][1]-1].join(" "))}n[i].value="["+l.join(" ")+"]"}else n[i].value=n[i].defaultValue;n[i].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var p,A=[];for(p in n)n[p].explicitSet===!0&&(n[p].type==="name"?A.push("/"+p+" /"+n[p].value):A.push("/"+p+" "+n[p].value));A.length!==0&&this.internal.write(`/ViewerPreferences
|
|
816
816
|
<<
|
|
817
817
|
`+A.join(`
|
|
818
818
|
`)+`
|
|
@@ -984,7 +984,7 @@ export default theme;`}function xCe(e){return typeof e=="number"?`${(e*100).toFi
|
|
|
984
984
|
`))):pe=q.stylize("[Circular]","special")),D(he)){if(de&&re.match(/^\d+$/))return pe;he=JSON.stringify(""+re),he.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(he=he.slice(1,-1),he=q.stylize(he,"name")):(he=he.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),he=q.stylize(he,"string"))}return he+": "+pe}function v(q,W,te){var ne=q.reduce(function(re,de){return de.indexOf(`
|
|
985
985
|
`)>=0,re+de.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ne>60?te[0]+(W===""?"":W+`
|
|
986
986
|
`)+" "+q.join(`,
|
|
987
|
-
`)+" "+te[1]:te[0]+W+" "+q.join(", ")+" "+te[1]}e.types=j2n();function y(q){return Array.isArray(q)}e.isArray=y;function x(q){return typeof q=="boolean"}e.isBoolean=x;function k(q){return q===null}e.isNull=k;function S(q){return q==null}e.isNullOrUndefined=S;function C(q){return typeof q=="number"}e.isNumber=C;function N(q){return typeof q=="string"}e.isString=N;function E(q){return typeof q=="symbol"}e.isSymbol=E;function D(q){return q===void 0}e.isUndefined=D;function T(q){return j(q)&&U(q)==="[object RegExp]"}e.isRegExp=T,e.types.isRegExp=T;function j(q){return typeof q=="object"&&q!==null}e.isObject=j;function O(q){return j(q)&&U(q)==="[object Date]"}e.isDate=O,e.types.isDate=O;function B(q){return j(q)&&(U(q)==="[object Error]"||q instanceof Error)}e.isError=B,e.types.isNativeError=B;function M(q){return typeof q=="function"}e.isFunction=M;function $(q){return q===null||typeof q=="boolean"||typeof q=="number"||typeof q=="string"||typeof q=="symbol"||typeof q>"u"}e.isPrimitive=$,e.isBuffer=P2n();function U(q){return Object.prototype.toString.call(q)}function P(q){return q<10?"0"+q.toString(10):q.toString(10)}var V=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Q(){var q=new Date,W=[P(q.getHours()),P(q.getMinutes()),P(q.getSeconds())].join(":");return[q.getDate(),V[q.getMonth()],W].join(" ")}e.log=function(){console.log("%s - %s",Q(),e.format.apply(e,arguments))},e.inherits=h1(),e._extend=function(q,W){if(!W||!j(W))return q;for(var te=Object.keys(W),ne=te.length;ne--;)q[te[ne]]=W[te[ne]];return q};function X(q,W){return Object.prototype.hasOwnProperty.call(q,W)}var Z=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(W){if(typeof W!="function")throw new TypeError('The "original" argument must be of type Function');if(Z&&W[Z]){var te=W[Z];if(typeof te!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(te,Z,{value:te,enumerable:!1,writable:!1,configurable:!0}),te}function te(){for(var ne,re,de=new Promise(function(oe,J){ne=oe,re=J}),he=[],pe=0;pe<arguments.length;pe++)he.push(arguments[pe]);he.push(function(oe,J){oe?re(oe):ne(J)});try{W.apply(this,he)}catch(oe){re(oe)}return de}return Object.setPrototypeOf(te,Object.getPrototypeOf(W)),Z&&Object.defineProperty(te,Z,{value:te,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(te,n(W))},e.promisify.custom=Z;function le(q,W){if(!q){var te=new Error("Promise was rejected with a falsy value");te.reason=q,q=te}return W(q)}function H(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');function W(){for(var te=[],ne=0;ne<arguments.length;ne++)te.push(arguments[ne]);var re=te.pop();if(typeof re!="function")throw new TypeError("The last argument must be of type Function");var de=this,he=function(){return re.apply(de,arguments)};q.apply(this,te).then(function(pe){Yn.nextTick(he.bind(null,null,pe))},function(pe){Yn.nextTick(le.bind(null,pe,he))})}return Object.setPrototypeOf(W,Object.getPrototypeOf(q)),Object.defineProperties(W,n(q)),W}e.callbackify=H})(CQ)),CQ}var DQ,MNe;function M2n(){if(MNe)return DQ;MNe=1;function e(p,A){var v=Object.keys(p);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(p);A&&(y=y.filter(function(x){return Object.getOwnPropertyDescriptor(p,x).enumerable})),v.push.apply(v,y)}return v}function t(p){for(var A=1;A<arguments.length;A++){var v=arguments[A]!=null?arguments[A]:{};A%2?e(Object(v),!0).forEach(function(y){n(p,y,v[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(v)):e(Object(v)).forEach(function(y){Object.defineProperty(p,y,Object.getOwnPropertyDescriptor(v,y))})}return p}function n(p,A,v){return A=o(A),A in p?Object.defineProperty(p,A,{value:v,enumerable:!0,configurable:!0,writable:!0}):p[A]=v,p}function r(p,A){if(!(p instanceof A))throw new TypeError("Cannot call a class as a function")}function i(p,A){for(var v=0;v<A.length;v++){var y=A[v];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,o(y.key),y)}}function a(p,A,v){return A&&i(p.prototype,A),Object.defineProperty(p,"prototype",{writable:!1}),p}function o(p){var A=s(p,"string");return typeof A=="symbol"?A:String(A)}function s(p,A){if(typeof p!="object"||p===null)return p;var v=p[Symbol.toPrimitive];if(v!==void 0){var y=v.call(p,A);if(typeof y!="object")return y;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)}var l=CT(),c=l.Buffer,u=ket(),f=u.inspect,h=f&&f.custom||"inspect";function m(p,A,v){c.prototype.copy.call(p,A,v)}return DQ=(function(){function p(){r(this,p),this.head=null,this.tail=null,this.length=0}return a(p,[{key:"push",value:function(v){var y={data:v,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(v){var y={data:v,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var v=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,v}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(v){if(this.length===0)return"";for(var y=this.head,x=""+y.data;y=y.next;)x+=v+y.data;return x}},{key:"concat",value:function(v){if(this.length===0)return c.alloc(0);for(var y=c.allocUnsafe(v>>>0),x=this.head,k=0;x;)m(x.data,y,k),k+=x.data.length,x=x.next;return y}},{key:"consume",value:function(v,y){var x;return v<this.head.data.length?(x=this.head.data.slice(0,v),this.head.data=this.head.data.slice(v)):v===this.head.data.length?x=this.shift():x=y?this._getString(v):this._getBuffer(v),x}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(v){var y=this.head,x=1,k=y.data;for(v-=k.length;y=y.next;){var S=y.data,C=v>S.length?S.length:v;if(C===S.length?k+=S:k+=S.slice(0,v),v-=C,v===0){C===S.length?(++x,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=S.slice(C));break}++x}return this.length-=x,k}},{key:"_getBuffer",value:function(v){var y=c.allocUnsafe(v),x=this.head,k=1;for(x.data.copy(y),v-=x.data.length;x=x.next;){var S=x.data,C=v>S.length?S.length:v;if(S.copy(y,y.length-v,0,C),v-=C,v===0){C===S.length?(++k,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=S.slice(C));break}++k}return this.length-=k,y}},{key:h,value:function(v,y){return f(this,t(t({},y),{},{depth:0,customInspect:!1}))}}]),p})(),DQ}var TQ,RNe;function Cet(){if(RNe)return TQ;RNe=1;function e(o,s){var l=this,c=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return c||u?(s?s(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Yn.nextTick(i,this,o)):Yn.nextTick(i,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(f){!s&&f?l._writableState?l._writableState.errorEmitted?Yn.nextTick(n,l):(l._writableState.errorEmitted=!0,Yn.nextTick(t,l,f)):Yn.nextTick(t,l,f):s?(Yn.nextTick(n,l),s(f)):Yn.nextTick(n,l)}),this)}function t(o,s){i(o,s),n(o)}function n(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(o,s){o.emit("error",s)}function a(o,s){var l=o._readableState,c=o._writableState;l&&l.autoDestroy||c&&c.autoDestroy?o.destroy(s):o.emit("error",s)}return TQ={destroy:e,undestroy:r,errorOrDestroy:a},TQ}var OQ={},$Ne;function IC(){if($Ne)return OQ;$Ne=1;function e(s,l){s.prototype=Object.create(l.prototype),s.prototype.constructor=s,s.__proto__=l}var t={};function n(s,l,c){c||(c=Error);function u(h,m,p){return typeof l=="string"?l:l(h,m,p)}var f=(function(h){e(m,h);function m(p,A,v){return h.call(this,u(p,A,v))||this}return m})(c);f.prototype.name=c.name,f.prototype.code=s,t[s]=f}function r(s,l){if(Array.isArray(s)){var c=s.length;return s=s.map(function(u){return String(u)}),c>2?"one of ".concat(l," ").concat(s.slice(0,c-1).join(", "),", or ")+s[c-1]:c===2?"one of ".concat(l," ").concat(s[0]," or ").concat(s[1]):"of ".concat(l," ").concat(s[0])}else return"of ".concat(l," ").concat(String(s))}function i(s,l,c){return s.substr(0,l.length)===l}function a(s,l,c){return(c===void 0||c>s.length)&&(c=s.length),s.substring(c-l.length,c)===l}function o(s,l,c){return typeof c!="number"&&(c=0),c+l.length>s.length?!1:s.indexOf(l,c)!==-1}return n("ERR_INVALID_OPT_VALUE",function(s,l){return'The value "'+l+'" is invalid for option "'+s+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(s,l,c){var u;typeof l=="string"&&i(l,"not ")?(u="must not be",l=l.replace(/^not /,"")):u="must be";var f;if(a(s," argument"))f="The ".concat(s," ").concat(u," ").concat(r(l,"type"));else{var h=o(s,".")?"property":"argument";f='The "'.concat(s,'" ').concat(h," ").concat(u," ").concat(r(l,"type"))}return f+=". Received type ".concat(typeof c),f},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),OQ.codes=t,OQ}var BQ,LNe;function _et(){if(LNe)return BQ;LNe=1;var e=IC().codes.ERR_INVALID_OPT_VALUE;function t(r,i,a){return r.highWaterMark!=null?r.highWaterMark:i?r[a]:null}function n(r,i,a,o){var s=t(i,o,a);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var l=o?a:"highWaterMark";throw new e(l,s)}return Math.floor(s)}return r.objectMode?16:16*1024}return BQ={getHighWaterMark:n},BQ}var IQ,UNe;function R2n(){if(UNe)return IQ;UNe=1,IQ=e;function e(n,r){if(t("noDeprecation"))return n;var i=!1;function a(){if(!i){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),i=!0}return n.apply(this,arguments)}return a}function t(n){try{if(!bu.localStorage)return!1}catch{return!1}var r=bu.localStorage[n];return r==null?!1:String(r).toLowerCase()==="true"}return IQ}var jQ,zNe;function Net(){if(zNe)return jQ;zNe=1,jQ=D;function e(ne){var re=this;this.next=null,this.entry=null,this.finish=function(){te(re,ne)}}var t;D.WritableState=N;var n={deprecate:R2n()},r=wet(),i=CT().Buffer,a=(typeof bu<"u"?bu:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(ne){return i.from(ne)}function s(ne){return i.isBuffer(ne)||ne instanceof a}var l=Cet(),c=_et(),u=c.getHighWaterMark,f=IC().codes,h=f.ERR_INVALID_ARG_TYPE,m=f.ERR_METHOD_NOT_IMPLEMENTED,p=f.ERR_MULTIPLE_CALLBACK,A=f.ERR_STREAM_CANNOT_PIPE,v=f.ERR_STREAM_DESTROYED,y=f.ERR_STREAM_NULL_VALUES,x=f.ERR_STREAM_WRITE_AFTER_END,k=f.ERR_UNKNOWN_ENCODING,S=l.errorOrDestroy;h1()(D,r);function C(){}function N(ne,re,de){t=t||DS(),ne=ne||{},typeof de!="boolean"&&(de=re instanceof t),this.objectMode=!!ne.objectMode,de&&(this.objectMode=this.objectMode||!!ne.writableObjectMode),this.highWaterMark=u(this,ne,"writableHighWaterMark",de),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var he=ne.decodeStrings===!1;this.decodeStrings=!he,this.defaultEncoding=ne.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(pe){P(re,pe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=ne.emitClose!==!1,this.autoDestroy=!!ne.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}N.prototype.getBuffer=function(){for(var re=this.bufferedRequest,de=[];re;)de.push(re),re=re.next;return de},(function(){try{Object.defineProperty(N.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var E;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(E=Function.prototype[Symbol.hasInstance],Object.defineProperty(D,Symbol.hasInstance,{value:function(re){return E.call(this,re)?!0:this!==D?!1:re&&re._writableState instanceof N}})):E=function(re){return re instanceof this};function D(ne){t=t||DS();var re=this instanceof t;if(!re&&!E.call(D,this))return new D(ne);this._writableState=new N(ne,this,re),this.writable=!0,ne&&(typeof ne.write=="function"&&(this._write=ne.write),typeof ne.writev=="function"&&(this._writev=ne.writev),typeof ne.destroy=="function"&&(this._destroy=ne.destroy),typeof ne.final=="function"&&(this._final=ne.final)),r.call(this)}D.prototype.pipe=function(){S(this,new A)};function T(ne,re){var de=new x;S(ne,de),Yn.nextTick(re,de)}function j(ne,re,de,he){var pe;return de===null?pe=new y:typeof de!="string"&&!re.objectMode&&(pe=new h("chunk",["string","Buffer"],de)),pe?(S(ne,pe),Yn.nextTick(he,pe),!1):!0}D.prototype.write=function(ne,re,de){var he=this._writableState,pe=!1,oe=!he.objectMode&&s(ne);return oe&&!i.isBuffer(ne)&&(ne=o(ne)),typeof re=="function"&&(de=re,re=null),oe?re="buffer":re||(re=he.defaultEncoding),typeof de!="function"&&(de=C),he.ending?T(this,de):(oe||j(this,he,ne,de))&&(he.pendingcb++,pe=B(this,he,oe,ne,re,de)),pe},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){var ne=this._writableState;ne.corked&&(ne.corked--,!ne.writing&&!ne.corked&&!ne.bufferProcessing&&ne.bufferedRequest&&X(this,ne))},D.prototype.setDefaultEncoding=function(re){if(typeof re=="string"&&(re=re.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((re+"").toLowerCase())>-1))throw new k(re);return this._writableState.defaultEncoding=re,this},Object.defineProperty(D.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function O(ne,re,de){return!ne.objectMode&&ne.decodeStrings!==!1&&typeof re=="string"&&(re=i.from(re,de)),re}Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function B(ne,re,de,he,pe,oe){if(!de){var J=O(re,he,pe);he!==J&&(de=!0,pe="buffer",he=J)}var Se=re.objectMode?1:he.length;re.length+=Se;var we=re.length<re.highWaterMark;if(we||(re.needDrain=!0),re.writing||re.corked){var ke=re.lastBufferedRequest;re.lastBufferedRequest={chunk:he,encoding:pe,isBuf:de,callback:oe,next:null},ke?ke.next=re.lastBufferedRequest:re.bufferedRequest=re.lastBufferedRequest,re.bufferedRequestCount+=1}else M(ne,re,!1,Se,he,pe,oe);return we}function M(ne,re,de,he,pe,oe,J){re.writelen=he,re.writecb=J,re.writing=!0,re.sync=!0,re.destroyed?re.onwrite(new v("write")):de?ne._writev(pe,re.onwrite):ne._write(pe,oe,re.onwrite),re.sync=!1}function $(ne,re,de,he,pe){--re.pendingcb,de?(Yn.nextTick(pe,he),Yn.nextTick(q,ne,re),ne._writableState.errorEmitted=!0,S(ne,he)):(pe(he),ne._writableState.errorEmitted=!0,S(ne,he),q(ne,re))}function U(ne){ne.writing=!1,ne.writecb=null,ne.length-=ne.writelen,ne.writelen=0}function P(ne,re){var de=ne._writableState,he=de.sync,pe=de.writecb;if(typeof pe!="function")throw new p;if(U(de),re)$(ne,de,he,re,pe);else{var oe=Z(de)||ne.destroyed;!oe&&!de.corked&&!de.bufferProcessing&&de.bufferedRequest&&X(ne,de),he?Yn.nextTick(V,ne,de,oe,pe):V(ne,de,oe,pe)}}function V(ne,re,de,he){de||Q(ne,re),re.pendingcb--,he(),q(ne,re)}function Q(ne,re){re.length===0&&re.needDrain&&(re.needDrain=!1,ne.emit("drain"))}function X(ne,re){re.bufferProcessing=!0;var de=re.bufferedRequest;if(ne._writev&&de&&de.next){var he=re.bufferedRequestCount,pe=new Array(he),oe=re.corkedRequestsFree;oe.entry=de;for(var J=0,Se=!0;de;)pe[J]=de,de.isBuf||(Se=!1),de=de.next,J+=1;pe.allBuffers=Se,M(ne,re,!0,re.length,pe,"",oe.finish),re.pendingcb++,re.lastBufferedRequest=null,oe.next?(re.corkedRequestsFree=oe.next,oe.next=null):re.corkedRequestsFree=new e(re),re.bufferedRequestCount=0}else{for(;de;){var we=de.chunk,ke=de.encoding,me=de.callback,K=re.objectMode?1:we.length;if(M(ne,re,!1,K,we,ke,me),de=de.next,re.bufferedRequestCount--,re.writing)break}de===null&&(re.lastBufferedRequest=null)}re.bufferedRequest=de,re.bufferProcessing=!1}D.prototype._write=function(ne,re,de){de(new m("_write()"))},D.prototype._writev=null,D.prototype.end=function(ne,re,de){var he=this._writableState;return typeof ne=="function"?(de=ne,ne=null,re=null):typeof re=="function"&&(de=re,re=null),ne!=null&&this.write(ne,re),he.corked&&(he.corked=1,this.uncork()),he.ending||W(this,he,de),this},Object.defineProperty(D.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Z(ne){return ne.ending&&ne.length===0&&ne.bufferedRequest===null&&!ne.finished&&!ne.writing}function le(ne,re){ne._final(function(de){re.pendingcb--,de&&S(ne,de),re.prefinished=!0,ne.emit("prefinish"),q(ne,re)})}function H(ne,re){!re.prefinished&&!re.finalCalled&&(typeof ne._final=="function"&&!re.destroyed?(re.pendingcb++,re.finalCalled=!0,Yn.nextTick(le,ne,re)):(re.prefinished=!0,ne.emit("prefinish")))}function q(ne,re){var de=Z(re);if(de&&(H(ne,re),re.pendingcb===0&&(re.finished=!0,ne.emit("finish"),re.autoDestroy))){var he=ne._readableState;(!he||he.autoDestroy&&he.endEmitted)&&ne.destroy()}return de}function W(ne,re,de){re.ending=!0,q(ne,re),de&&(re.finished?Yn.nextTick(de):ne.once("finish",de)),re.ended=!0,ne.writable=!1}function te(ne,re,de){var he=ne.entry;for(ne.entry=null;he;){var pe=he.callback;re.pendingcb--,pe(de),he=he.next}re.corkedRequestsFree.next=ne}return Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(re){this._writableState&&(this._writableState.destroyed=re)}}),D.prototype.destroy=l.destroy,D.prototype._undestroy=l.undestroy,D.prototype._destroy=function(ne,re){re(ne)},jQ}var PQ,HNe;function DS(){if(HNe)return PQ;HNe=1;var e=Object.keys||function(c){var u=[];for(var f in c)u.push(f);return u};PQ=o;var t=Eet(),n=Net();h1()(o,t);for(var r=e(n.prototype),i=0;i<r.length;i++){var a=r[i];o.prototype[a]||(o.prototype[a]=n.prototype[a])}function o(c){if(!(this instanceof o))return new o(c);t.call(this,c),n.call(this,c),this.allowHalfOpen=!0,c&&(c.readable===!1&&(this.readable=!1),c.writable===!1&&(this.writable=!1),c.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||Yn.nextTick(l,this)}function l(c){c.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(u){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=u,this._writableState.destroyed=u)}}),PQ}var MQ,VNe;function Jse(){if(VNe)return MQ;VNe=1;var e=IC().codes.ERR_STREAM_PREMATURE_CLOSE;function t(a){var o=!1;return function(){if(!o){o=!0;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];a.apply(this,l)}}}function n(){}function r(a){return a.setHeader&&typeof a.abort=="function"}function i(a,o,s){if(typeof o=="function")return i(a,null,o);o||(o={}),s=t(s||n);var l=o.readable||o.readable!==!1&&a.readable,c=o.writable||o.writable!==!1&&a.writable,u=function(){a.writable||h()},f=a._writableState&&a._writableState.finished,h=function(){c=!1,f=!0,l||s.call(a)},m=a._readableState&&a._readableState.endEmitted,p=function(){l=!1,m=!0,c||s.call(a)},A=function(k){s.call(a,k)},v=function(){var k;if(l&&!m)return(!a._readableState||!a._readableState.ended)&&(k=new e),s.call(a,k);if(c&&!f)return(!a._writableState||!a._writableState.ended)&&(k=new e),s.call(a,k)},y=function(){a.req.on("finish",h)};return r(a)?(a.on("complete",h),a.on("abort",v),a.req?y():a.on("request",y)):c&&!a._writableState&&(a.on("end",u),a.on("close",u)),a.on("end",p),a.on("finish",h),o.error!==!1&&a.on("error",A),a.on("close",v),function(){a.removeListener("complete",h),a.removeListener("abort",v),a.removeListener("request",y),a.req&&a.req.removeListener("finish",h),a.removeListener("end",u),a.removeListener("close",u),a.removeListener("finish",h),a.removeListener("end",p),a.removeListener("error",A),a.removeListener("close",v)}}return MQ=i,MQ}var RQ,QNe;function $2n(){if(QNe)return RQ;QNe=1;var e;function t(k,S,C){return S=n(S),S in k?Object.defineProperty(k,S,{value:C,enumerable:!0,configurable:!0,writable:!0}):k[S]=C,k}function n(k){var S=r(k,"string");return typeof S=="symbol"?S:String(S)}function r(k,S){if(typeof k!="object"||k===null)return k;var C=k[Symbol.toPrimitive];if(C!==void 0){var N=C.call(k,S);if(typeof N!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(k)}var i=Jse(),a=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),u=Symbol("handlePromise"),f=Symbol("stream");function h(k,S){return{value:k,done:S}}function m(k){var S=k[a];if(S!==null){var C=k[f].read();C!==null&&(k[c]=null,k[a]=null,k[o]=null,S(h(C,!1)))}}function p(k){Yn.nextTick(m,k)}function A(k,S){return function(C,N){k.then(function(){if(S[l]){C(h(void 0,!0));return}S[u](C,N)},N)}}var v=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((e={get stream(){return this[f]},next:function(){var S=this,C=this[s];if(C!==null)return Promise.reject(C);if(this[l])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise(function(T,j){Yn.nextTick(function(){S[s]?j(S[s]):T(h(void 0,!0))})});var N=this[c],E;if(N)E=new Promise(A(N,this));else{var D=this[f].read();if(D!==null)return Promise.resolve(h(D,!1));E=new Promise(this[u])}return this[c]=E,E}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var S=this;return new Promise(function(C,N){S[f].destroy(null,function(E){if(E){N(E);return}C(h(void 0,!0))})})}),e),v),x=function(S){var C,N=Object.create(y,(C={},t(C,f,{value:S,writable:!0}),t(C,a,{value:null,writable:!0}),t(C,o,{value:null,writable:!0}),t(C,s,{value:null,writable:!0}),t(C,l,{value:S._readableState.endEmitted,writable:!0}),t(C,u,{value:function(D,T){var j=N[f].read();j?(N[c]=null,N[a]=null,N[o]=null,D(h(j,!1))):(N[a]=D,N[o]=T)},writable:!0}),C));return N[c]=null,i(S,function(E){if(E&&E.code!=="ERR_STREAM_PREMATURE_CLOSE"){var D=N[o];D!==null&&(N[c]=null,N[a]=null,N[o]=null,D(E)),N[s]=E;return}var T=N[a];T!==null&&(N[c]=null,N[a]=null,N[o]=null,T(h(void 0,!0))),N[l]=!0}),S.on("readable",p.bind(null,N)),N};return RQ=x,RQ}var $Q,qNe;function L2n(){return qNe||(qNe=1,$Q=function(){throw new Error("Readable.from is not available in the browser")}),$Q}var LQ,GNe;function Eet(){if(GNe)return LQ;GNe=1,LQ=T;var e;T.ReadableState=D,Zse().EventEmitter;var t=function(J,Se){return J.listeners(Se).length},n=wet(),r=CT().Buffer,i=(typeof bu<"u"?bu:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(oe){return r.from(oe)}function o(oe){return r.isBuffer(oe)||oe instanceof i}var s=ket(),l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var c=M2n(),u=Cet(),f=_et(),h=f.getHighWaterMark,m=IC().codes,p=m.ERR_INVALID_ARG_TYPE,A=m.ERR_STREAM_PUSH_AFTER_EOF,v=m.ERR_METHOD_NOT_IMPLEMENTED,y=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,x,k,S;h1()(T,n);var C=u.errorOrDestroy,N=["error","close","destroy","pause","resume"];function E(oe,J,Se){if(typeof oe.prependListener=="function")return oe.prependListener(J,Se);!oe._events||!oe._events[J]?oe.on(J,Se):Array.isArray(oe._events[J])?oe._events[J].unshift(Se):oe._events[J]=[Se,oe._events[J]]}function D(oe,J,Se){e=e||DS(),oe=oe||{},typeof Se!="boolean"&&(Se=J instanceof e),this.objectMode=!!oe.objectMode,Se&&(this.objectMode=this.objectMode||!!oe.readableObjectMode),this.highWaterMark=h(this,oe,"readableHighWaterMark",Se),this.buffer=new c,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=oe.emitClose!==!1,this.autoDestroy=!!oe.autoDestroy,this.destroyed=!1,this.defaultEncoding=oe.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,oe.encoding&&(x||(x=vJ().StringDecoder),this.decoder=new x(oe.encoding),this.encoding=oe.encoding)}function T(oe){if(e=e||DS(),!(this instanceof T))return new T(oe);var J=this instanceof e;this._readableState=new D(oe,this,J),this.readable=!0,oe&&(typeof oe.read=="function"&&(this._read=oe.read),typeof oe.destroy=="function"&&(this._destroy=oe.destroy)),n.call(this)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(J){this._readableState&&(this._readableState.destroyed=J)}}),T.prototype.destroy=u.destroy,T.prototype._undestroy=u.undestroy,T.prototype._destroy=function(oe,J){J(oe)},T.prototype.push=function(oe,J){var Se=this._readableState,we;return Se.objectMode?we=!0:typeof oe=="string"&&(J=J||Se.defaultEncoding,J!==Se.encoding&&(oe=r.from(oe,J),J=""),we=!0),j(this,oe,J,!1,we)},T.prototype.unshift=function(oe){return j(this,oe,null,!0,!1)};function j(oe,J,Se,we,ke){l("readableAddChunk",J);var me=oe._readableState;if(J===null)me.reading=!1,P(oe,me);else{var K;if(ke||(K=B(me,J)),K)C(oe,K);else if(me.objectMode||J&&J.length>0)if(typeof J!="string"&&!me.objectMode&&Object.getPrototypeOf(J)!==r.prototype&&(J=a(J)),we)me.endEmitted?C(oe,new y):O(oe,me,J,!0);else if(me.ended)C(oe,new A);else{if(me.destroyed)return!1;me.reading=!1,me.decoder&&!Se?(J=me.decoder.write(J),me.objectMode||J.length!==0?O(oe,me,J,!1):X(oe,me)):O(oe,me,J,!1)}else we||(me.reading=!1,X(oe,me))}return!me.ended&&(me.length<me.highWaterMark||me.length===0)}function O(oe,J,Se,we){J.flowing&&J.length===0&&!J.sync?(J.awaitDrain=0,oe.emit("data",Se)):(J.length+=J.objectMode?1:Se.length,we?J.buffer.unshift(Se):J.buffer.push(Se),J.needReadable&&V(oe)),X(oe,J)}function B(oe,J){var Se;return!o(J)&&typeof J!="string"&&J!==void 0&&!oe.objectMode&&(Se=new p("chunk",["string","Buffer","Uint8Array"],J)),Se}T.prototype.isPaused=function(){return this._readableState.flowing===!1},T.prototype.setEncoding=function(oe){x||(x=vJ().StringDecoder);var J=new x(oe);this._readableState.decoder=J,this._readableState.encoding=this._readableState.decoder.encoding;for(var Se=this._readableState.buffer.head,we="";Se!==null;)we+=J.write(Se.data),Se=Se.next;return this._readableState.buffer.clear(),we!==""&&this._readableState.buffer.push(we),this._readableState.length=we.length,this};var M=1073741824;function $(oe){return oe>=M?oe=M:(oe--,oe|=oe>>>1,oe|=oe>>>2,oe|=oe>>>4,oe|=oe>>>8,oe|=oe>>>16,oe++),oe}function U(oe,J){return oe<=0||J.length===0&&J.ended?0:J.objectMode?1:oe!==oe?J.flowing&&J.length?J.buffer.head.data.length:J.length:(oe>J.highWaterMark&&(J.highWaterMark=$(oe)),oe<=J.length?oe:J.ended?J.length:(J.needReadable=!0,0))}T.prototype.read=function(oe){l("read",oe),oe=parseInt(oe,10);var J=this._readableState,Se=oe;if(oe!==0&&(J.emittedReadable=!1),oe===0&&J.needReadable&&((J.highWaterMark!==0?J.length>=J.highWaterMark:J.length>0)||J.ended))return l("read: emitReadable",J.length,J.ended),J.length===0&&J.ended?de(this):V(this),null;if(oe=U(oe,J),oe===0&&J.ended)return J.length===0&&de(this),null;var we=J.needReadable;l("need readable",we),(J.length===0||J.length-oe<J.highWaterMark)&&(we=!0,l("length less than watermark",we)),J.ended||J.reading?(we=!1,l("reading or ended",we)):we&&(l("do read"),J.reading=!0,J.sync=!0,J.length===0&&(J.needReadable=!0),this._read(J.highWaterMark),J.sync=!1,J.reading||(oe=U(Se,J)));var ke;return oe>0?ke=re(oe,J):ke=null,ke===null?(J.needReadable=J.length<=J.highWaterMark,oe=0):(J.length-=oe,J.awaitDrain=0),J.length===0&&(J.ended||(J.needReadable=!0),Se!==oe&&J.ended&&de(this)),ke!==null&&this.emit("data",ke),ke};function P(oe,J){if(l("onEofChunk"),!J.ended){if(J.decoder){var Se=J.decoder.end();Se&&Se.length&&(J.buffer.push(Se),J.length+=J.objectMode?1:Se.length)}J.ended=!0,J.sync?V(oe):(J.needReadable=!1,J.emittedReadable||(J.emittedReadable=!0,Q(oe)))}}function V(oe){var J=oe._readableState;l("emitReadable",J.needReadable,J.emittedReadable),J.needReadable=!1,J.emittedReadable||(l("emitReadable",J.flowing),J.emittedReadable=!0,Yn.nextTick(Q,oe))}function Q(oe){var J=oe._readableState;l("emitReadable_",J.destroyed,J.length,J.ended),!J.destroyed&&(J.length||J.ended)&&(oe.emit("readable"),J.emittedReadable=!1),J.needReadable=!J.flowing&&!J.ended&&J.length<=J.highWaterMark,ne(oe)}function X(oe,J){J.readingMore||(J.readingMore=!0,Yn.nextTick(Z,oe,J))}function Z(oe,J){for(;!J.reading&&!J.ended&&(J.length<J.highWaterMark||J.flowing&&J.length===0);){var Se=J.length;if(l("maybeReadMore read 0"),oe.read(0),Se===J.length)break}J.readingMore=!1}T.prototype._read=function(oe){C(this,new v("_read()"))},T.prototype.pipe=function(oe,J){var Se=this,we=this._readableState;switch(we.pipesCount){case 0:we.pipes=oe;break;case 1:we.pipes=[we.pipes,oe];break;default:we.pipes.push(oe);break}we.pipesCount+=1,l("pipe count=%d opts=%j",we.pipesCount,J);var ke=(!J||J.end!==!1)&&oe!==Yn.stdout&&oe!==Yn.stderr,me=ke?ie:We;we.endEmitted?Yn.nextTick(me):Se.once("end",me),oe.on("unpipe",K);function K(tt,ot){l("onunpipe"),tt===Se&&ot&&ot.hasUnpiped===!1&&(ot.hasUnpiped=!0,ve())}function ie(){l("onend"),oe.end()}var ce=le(Se);oe.on("drain",ce);var ue=!1;function ve(){l("cleanup"),oe.removeListener("close",Me),oe.removeListener("finish",Le),oe.removeListener("drain",ce),oe.removeListener("error",Re),oe.removeListener("unpipe",K),Se.removeListener("end",ie),Se.removeListener("end",We),Se.removeListener("data",be),ue=!0,we.awaitDrain&&(!oe._writableState||oe._writableState.needDrain)&&ce()}Se.on("data",be);function be(tt){l("ondata");var ot=oe.write(tt);l("dest.write",ot),ot===!1&&((we.pipesCount===1&&we.pipes===oe||we.pipesCount>1&&pe(we.pipes,oe)!==-1)&&!ue&&(l("false write response, pause",we.awaitDrain),we.awaitDrain++),Se.pause())}function Re(tt){l("onerror",tt),We(),oe.removeListener("error",Re),t(oe,"error")===0&&C(oe,tt)}E(oe,"error",Re);function Me(){oe.removeListener("finish",Le),We()}oe.once("close",Me);function Le(){l("onfinish"),oe.removeListener("close",Me),We()}oe.once("finish",Le);function We(){l("unpipe"),Se.unpipe(oe)}return oe.emit("pipe",Se),we.flowing||(l("pipe resume"),Se.resume()),oe};function le(oe){return function(){var Se=oe._readableState;l("pipeOnDrain",Se.awaitDrain),Se.awaitDrain&&Se.awaitDrain--,Se.awaitDrain===0&&t(oe,"data")&&(Se.flowing=!0,ne(oe))}}T.prototype.unpipe=function(oe){var J=this._readableState,Se={hasUnpiped:!1};if(J.pipesCount===0)return this;if(J.pipesCount===1)return oe&&oe!==J.pipes?this:(oe||(oe=J.pipes),J.pipes=null,J.pipesCount=0,J.flowing=!1,oe&&oe.emit("unpipe",this,Se),this);if(!oe){var we=J.pipes,ke=J.pipesCount;J.pipes=null,J.pipesCount=0,J.flowing=!1;for(var me=0;me<ke;me++)we[me].emit("unpipe",this,{hasUnpiped:!1});return this}var K=pe(J.pipes,oe);return K===-1?this:(J.pipes.splice(K,1),J.pipesCount-=1,J.pipesCount===1&&(J.pipes=J.pipes[0]),oe.emit("unpipe",this,Se),this)},T.prototype.on=function(oe,J){var Se=n.prototype.on.call(this,oe,J),we=this._readableState;return oe==="data"?(we.readableListening=this.listenerCount("readable")>0,we.flowing!==!1&&this.resume()):oe==="readable"&&!we.endEmitted&&!we.readableListening&&(we.readableListening=we.needReadable=!0,we.flowing=!1,we.emittedReadable=!1,l("on readable",we.length,we.reading),we.length?V(this):we.reading||Yn.nextTick(q,this)),Se},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(oe,J){var Se=n.prototype.removeListener.call(this,oe,J);return oe==="readable"&&Yn.nextTick(H,this),Se},T.prototype.removeAllListeners=function(oe){var J=n.prototype.removeAllListeners.apply(this,arguments);return(oe==="readable"||oe===void 0)&&Yn.nextTick(H,this),J};function H(oe){var J=oe._readableState;J.readableListening=oe.listenerCount("readable")>0,J.resumeScheduled&&!J.paused?J.flowing=!0:oe.listenerCount("data")>0&&oe.resume()}function q(oe){l("readable nexttick read 0"),oe.read(0)}T.prototype.resume=function(){var oe=this._readableState;return oe.flowing||(l("resume"),oe.flowing=!oe.readableListening,W(this,oe)),oe.paused=!1,this};function W(oe,J){J.resumeScheduled||(J.resumeScheduled=!0,Yn.nextTick(te,oe,J))}function te(oe,J){l("resume",J.reading),J.reading||oe.read(0),J.resumeScheduled=!1,oe.emit("resume"),ne(oe),J.flowing&&!J.reading&&oe.read(0)}T.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function ne(oe){var J=oe._readableState;for(l("flow",J.flowing);J.flowing&&oe.read()!==null;);}T.prototype.wrap=function(oe){var J=this,Se=this._readableState,we=!1;oe.on("end",function(){if(l("wrapped end"),Se.decoder&&!Se.ended){var K=Se.decoder.end();K&&K.length&&J.push(K)}J.push(null)}),oe.on("data",function(K){if(l("wrapped data"),Se.decoder&&(K=Se.decoder.write(K)),!(Se.objectMode&&K==null)&&!(!Se.objectMode&&(!K||!K.length))){var ie=J.push(K);ie||(we=!0,oe.pause())}});for(var ke in oe)this[ke]===void 0&&typeof oe[ke]=="function"&&(this[ke]=(function(ie){return function(){return oe[ie].apply(oe,arguments)}})(ke));for(var me=0;me<N.length;me++)oe.on(N[me],this.emit.bind(this,N[me]));return this._read=function(K){l("wrapped _read",K),we&&(we=!1,oe.resume())},this},typeof Symbol=="function"&&(T.prototype[Symbol.asyncIterator]=function(){return k===void 0&&(k=$2n()),k(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(J){this._readableState&&(this._readableState.flowing=J)}}),T._fromList=re,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function re(oe,J){if(J.length===0)return null;var Se;return J.objectMode?Se=J.buffer.shift():!oe||oe>=J.length?(J.decoder?Se=J.buffer.join(""):J.buffer.length===1?Se=J.buffer.first():Se=J.buffer.concat(J.length),J.buffer.clear()):Se=J.buffer.consume(oe,J.decoder),Se}function de(oe){var J=oe._readableState;l("endReadable",J.endEmitted),J.endEmitted||(J.ended=!0,Yn.nextTick(he,J,oe))}function he(oe,J){if(l("endReadableNT",oe.endEmitted,oe.length),!oe.endEmitted&&oe.length===0&&(oe.endEmitted=!0,J.readable=!1,J.emit("end"),oe.autoDestroy)){var Se=J._writableState;(!Se||Se.autoDestroy&&Se.finished)&&J.destroy()}}typeof Symbol=="function"&&(T.from=function(oe,J){return S===void 0&&(S=L2n()),S(T,oe,J)});function pe(oe,J){for(var Se=0,we=oe.length;Se<we;Se++)if(oe[Se]===J)return Se;return-1}return LQ}var UQ,WNe;function Fet(){if(WNe)return UQ;WNe=1,UQ=s;var e=IC().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,n=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=e.ERR_TRANSFORM_WITH_LENGTH_0,a=DS();h1()(s,a);function o(u,f){var h=this._transformState;h.transforming=!1;var m=h.writecb;if(m===null)return this.emit("error",new n);h.writechunk=null,h.writecb=null,f!=null&&this.push(f),m(u);var p=this._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}function s(u){if(!(this instanceof s))return new s(u);a.call(this,u),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",l)}function l(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(f,h){c(u,f,h)}):c(this,null,null)}s.prototype.push=function(u,f){return this._transformState.needTransform=!1,a.prototype.push.call(this,u,f)},s.prototype._transform=function(u,f,h){h(new t("_transform()"))},s.prototype._write=function(u,f,h){var m=this._transformState;if(m.writecb=h,m.writechunk=u,m.writeencoding=f,!m.transforming){var p=this._readableState;(m.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},s.prototype._read=function(u){var f=this._transformState;f.writechunk!==null&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},s.prototype._destroy=function(u,f){a.prototype._destroy.call(this,u,function(h){f(h)})};function c(u,f,h){if(f)return u.emit("error",f);if(h!=null&&u.push(h),u._writableState.length)throw new i;if(u._transformState.transforming)throw new r;return u.push(null)}return UQ}var zQ,KNe;function U2n(){if(KNe)return zQ;KNe=1,zQ=t;var e=Fet();h1()(t,e);function t(n){if(!(this instanceof t))return new t(n);e.call(this,n)}return t.prototype._transform=function(n,r,i){i(null,n)},zQ}var HQ,YNe;function z2n(){if(YNe)return HQ;YNe=1;var e;function t(h){var m=!1;return function(){m||(m=!0,h.apply(void 0,arguments))}}var n=IC().codes,r=n.ERR_MISSING_ARGS,i=n.ERR_STREAM_DESTROYED;function a(h){if(h)throw h}function o(h){return h.setHeader&&typeof h.abort=="function"}function s(h,m,p,A){A=t(A);var v=!1;h.on("close",function(){v=!0}),e===void 0&&(e=Jse()),e(h,{readable:m,writable:p},function(x){if(x)return A(x);v=!0,A()});var y=!1;return function(x){if(!v&&!y){if(y=!0,o(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();A(x||new i("pipe"))}}}function l(h){h()}function c(h,m){return h.pipe(m)}function u(h){return!h.length||typeof h[h.length-1]!="function"?a:h.pop()}function f(){for(var h=arguments.length,m=new Array(h),p=0;p<h;p++)m[p]=arguments[p];var A=u(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new r("streams");var v,y=m.map(function(x,k){var S=k<m.length-1,C=k>0;return s(x,S,C,function(N){v||(v=N),N&&y.forEach(l),!S&&(y.forEach(l),A(v))})});return m.reduce(c)}return HQ=f,HQ}var VQ,XNe;function H2n(){if(XNe)return VQ;XNe=1,VQ=n;var e=Zse().EventEmitter,t=h1();t(n,e),n.Readable=Eet(),n.Writable=Net(),n.Duplex=DS(),n.Transform=Fet(),n.PassThrough=U2n(),n.finished=Jse(),n.pipeline=z2n(),n.Stream=n;function n(){e.call(this)}return n.prototype.pipe=function(r,i){var a=this;function o(m){r.writable&&r.write(m)===!1&&a.pause&&a.pause()}a.on("data",o);function s(){a.readable&&a.resume&&a.resume()}r.on("drain",s),!r._isStdio&&(!i||i.end!==!1)&&(a.on("end",c),a.on("close",u));var l=!1;function c(){l||(l=!0,r.end())}function u(){l||(l=!0,typeof r.destroy=="function"&&r.destroy())}function f(m){if(h(),e.listenerCount(this,"error")===0)throw m}a.on("error",f),r.on("error",f);function h(){a.removeListener("data",o),r.removeListener("drain",s),a.removeListener("end",c),a.removeListener("close",u),a.removeListener("error",f),r.removeListener("error",f),a.removeListener("end",h),a.removeListener("close",h),r.removeListener("close",h)}return a.on("end",h),a.on("close",h),r.on("close",h),r.emit("pipe",a),r},VQ}var ZNe;function V2n(){return ZNe||(ZNe=1,(function(e){var t=a0().Buffer,n=h2n(),r=xet(),i=e.exports;i.encodings=null,i.defaultCharUnicode="�",i.defaultCharSingleByte="?",i.encode=function(s,l,c){s=""+(s||"");var u=i.getEncoder(l,c),f=u.write(s),h=u.end();return h&&h.length>0?t.concat([f,h]):f},i.decode=function(s,l,c){typeof s=="string"&&(i.skipDecodeWarning||(console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding"),i.skipDecodeWarning=!0),s=t.from(""+(s||""),"binary"));var u=i.getDecoder(l,c),f=u.write(s),h=u.end();return h?f+h:f},i.encodingExists=function(s){try{return i.getCodec(s),!0}catch{return!1}},i.toEncoding=i.encode,i.fromEncoding=i.decode,i._codecDataCache={__proto__:null},i.getCodec=function(s){if(!i.encodings){var l=T2n();i.encodings={__proto__:null},r(i.encodings,l)}for(var c=i._canonicalizeEncoding(s),u={};;){var f=i._codecDataCache[c];if(f)return f;var h=i.encodings[c];switch(typeof h){case"string":c=h;break;case"object":for(var m in h)u[m]=h[m];u.encodingName||(u.encodingName=c),c=h.type;break;case"function":return u.encodingName||(u.encodingName=c),f=new h(u,i),i._codecDataCache[u.encodingName]=f,f;default:throw new Error("Encoding not recognized: '"+s+"' (searched as: '"+c+"')")}}},i._canonicalizeEncoding=function(o){return(""+o).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g,"")},i.getEncoder=function(s,l){var c=i.getCodec(s),u=new c.encoder(l,c);return c.bomAware&&l&&l.addBOM&&(u=new n.PrependBOM(u,l)),u},i.getDecoder=function(s,l){var c=i.getCodec(s),u=new c.decoder(l,c);return c.bomAware&&!(l&&l.stripBOM===!1)&&(u=new n.StripBOM(u,l)),u},i.enableStreamingAPI=function(s){if(!i.supportsStreams){var l=O2n()(s);i.IconvLiteEncoderStream=l.IconvLiteEncoderStream,i.IconvLiteDecoderStream=l.IconvLiteDecoderStream,i.encodeStream=function(u,f){return new i.IconvLiteEncoderStream(i.getEncoder(u,f),f)},i.decodeStream=function(u,f){return new i.IconvLiteDecoderStream(i.getDecoder(u,f),f)},i.supportsStreams=!0}};var a;try{a=H2n()}catch{}a&&a.Transform?i.enableStreamingAPI(a):i.encodeStream=i.decodeStream=function(){throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.")}})(uQ)),uQ.exports}var Q2n=V2n();const JNe=Fi(Q2n);function Det({open:e,onOpenChange:t}){const n=Sne(new Date),r=Rt(w3(n),"yyyy-MM-dd"),i=Rt(U3e(n),"yyyy-MM-dd"),[a,o]=w.useState(r),[s,l]=w.useState(i),[c,u]=w.useState(!1),[f,h]=w.useState(""),[m,p]=rn({pause:!0,query:ZEt,variables:{fromDate:a,toDate:s}});w.useEffect(()=>{if(c&&!m.fetching){if(m.error){h("Failed to fetch uniform format data. Please try again."),console.error("GraphQL error:",m.error),u(!1);return}if(m.data?.uniformFormat){const{bkmvdata:y,ini:x}=m.data.uniformFormat;if(!y||!x){h("Incomplete data received from the server. Please try again."),u(!1);return}const k=new File([new Uint8Array(JNe.encode(y,"ISO-8859-8"))],"bkmvdata.txt",{type:"text/plain"}),S=new File([new Uint8Array(JNe.encode(x,"ISO-8859-8"))],"ini.txt",{type:"text/plain"});VY(S),setTimeout(()=>VY(k),100),t(!1),o(r),l(i),u(!1)}else m.stale&&!m.data?.uniformFormat&&(h("No data returned from the server. Please try again."),u(!1))}},[m,c,a,s,r,i,t]);const A=async y=>{if(y.preventDefault(),h(""),!a||!s){h("Please select both from and to dates");return}const x=new Date(a),k=new Date(s);if(x>=k){h("From date must be before to date");return}if(k>new Date){h("To date cannot be in the future");return}u(!0);try{p({requestPolicy:"network-only"})}catch(S){h("Failed to generate files. Please try again."),console.error("Error generating files:",S),u(!1)}},v=y=>{c||(t(y),y||(o(r),l(i),h("")))};return d.jsx(Ra,{open:e,onOpenChange:v,children:d.jsxs($a,{className:"sm:max-w-md",children:[d.jsxs(fs,{children:[d.jsxs(hs,{className:"flex items-center gap-2",children:[d.jsx(iS,{className:"h-5 w-5"}),"Generate Uniform Files"]}),d.jsx(OHe,{children:"Select the date range to generate and download uniform files."})]}),d.jsxs("form",{onSubmit:A,className:"space-y-4",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Mn,{htmlFor:"from-date",children:"From Date"}),d.jsx(Cn,{id:"from-date",type:"date",value:a,onChange:y=>o(y.target.value),disabled:c,required:!0})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Mn,{htmlFor:"to-date",children:"To Date"}),d.jsx(Cn,{id:"to-date",type:"date",value:s,onChange:y=>l(y.target.value),disabled:c,required:!0})]})]}),f&&d.jsx("div",{className:"text-sm text-red-600 bg-red-50 p-3 rounded-md",children:f}),d.jsxs(Hy,{className:"gap-2",children:[d.jsx(qe,{type:"button",variant:"outline",onClick:()=>v(!1),disabled:c,children:"Cancel"}),d.jsx(qe,{type:"submit",disabled:c,className:"gap-2",children:c?d.jsxs(d.Fragment,{children:[d.jsx(si,{className:"h-4 w-4 animate-spin"}),"Generating..."]}):d.jsxs(d.Fragment,{children:[d.jsx(_ne,{className:"h-4 w-4"}),"Generate & Download"]})})]})]})]})})}function q2n({...e}){return d.jsx(rL,{"data-slot":"sheet",...e})}function G2n({...e}){return d.jsx(Qie,{"data-slot":"sheet-trigger",...e})}function W2n({...e}){return d.jsx(iL,{"data-slot":"sheet-portal",...e})}function K2n({className:e,...t}){return d.jsx(aL,{"data-slot":"sheet-overlay",className:St("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-1001 bg-black/50",e),...t})}function Y2n({className:e,children:t,side:n="right",...r}){return d.jsxs(W2n,{children:[d.jsx(K2n,{}),d.jsxs(oL,{"data-slot":"sheet-content",className:St("bg-white data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-1001 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 dark:bg-gray-950",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...r,children:[t,d.jsxs(THe,{className:"ring-offset-white focus:ring-gray-950 data-[state=open]:bg-gray-100 absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none dark:ring-offset-gray-950 dark:focus:ring-gray-300 dark:data-[state=open]:bg-gray-800",children:[d.jsx(Gx,{className:"size-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}var a8="Collapsible",[X2n,Tet]=Ac(a8),[Z2n,ele]=X2n(a8),Oet=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[l,c]=Cd({prop:r,defaultProp:i??!1,onChange:o,caller:a8});return d.jsx(Z2n,{scope:n,disabled:a,contentId:Ns(),open:l,onOpenToggle:w.useCallback(()=>c(u=>!u),[c]),children:d.jsx(wn.div,{"data-state":ile(l),"data-disabled":a?"":void 0,...s,ref:t})})});Oet.displayName=a8;var Bet="CollapsibleTrigger",tle=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=ele(Bet,n);return d.jsx(wn.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":ile(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:ln(e.onClick,i.onOpenToggle)})});tle.displayName=Bet;var nle="CollapsibleContent",rle=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ele(nle,e.__scopeCollapsible);return d.jsx(Ws,{present:n||i.open,children:({present:a})=>d.jsx(J2n,{...r,ref:t,present:a})})});rle.displayName=nle;var J2n=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...a}=e,o=ele(nle,n),[s,l]=w.useState(r),c=w.useRef(null),u=Vr(t,c),f=w.useRef(0),h=f.current,m=w.useRef(0),p=m.current,A=o.open||s,v=w.useRef(A),y=w.useRef(void 0);return w.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),cs(()=>{const x=c.current;if(x){y.current=y.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const k=x.getBoundingClientRect();f.current=k.height,m.current=k.width,v.current||(x.style.transitionDuration=y.current.transitionDuration,x.style.animationName=y.current.animationName),l(r)}},[o.open,r]),d.jsx(wn.div,{"data-state":ile(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!A,...a,ref:u,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...e.style},children:A&&i})});function ile(e){return e?"open":"closed"}var Iet=Oet,eEn=tle,tEn=rle;function nEn({...e}){return d.jsx(Iet,{"data-slot":"collapsible",...e})}function rEn({...e}){return d.jsx(tle,{"data-slot":"collapsible-trigger",...e})}function iEn({...e}){return d.jsx(rle,{"data-slot":"collapsible-content",...e})}var yJ=["Enter"," "],aEn=["ArrowDown","PageUp","Home"],jet=["ArrowUp","PageDown","End"],oEn=[...aEn,...jet],sEn={ltr:[...yJ,"ArrowRight"],rtl:[...yJ,"ArrowLeft"]},lEn={ltr:["ArrowLeft"],rtl:["ArrowRight"]},_T="Menu",[cF,cEn,uEn]=RL(_T),[m1,Pet]=Ac(_T,[uEn,Qy,f6]),o8=Qy(),Met=f6(),[dEn,p1]=m1(_T),[fEn,NT]=m1(_T),Ret=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=o8(t),[l,c]=w.useState(null),u=w.useRef(!1),f=cl(a),h=CC(i);return w.useEffect(()=>{const m=()=>{u.current=!0,document.addEventListener("pointerdown",p,{capture:!0,once:!0}),document.addEventListener("pointermove",p,{capture:!0,once:!0})},p=()=>u.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",p,{capture:!0}),document.removeEventListener("pointermove",p,{capture:!0})}},[]),d.jsx(hL,{...s,children:d.jsx(dEn,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:c,children:d.jsx(fEn,{scope:t,onClose:w.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:h,modal:o,children:r})})})};Ret.displayName=_T;var hEn="MenuAnchor",ale=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=o8(n);return d.jsx(jD,{...i,...r,ref:t})});ale.displayName=hEn;var ole="MenuPortal",[mEn,$et]=m1(ole,{forceMount:void 0}),Let=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=p1(ole,t);return d.jsx(mEn,{scope:t,forceMount:n,children:d.jsx(Ws,{present:n||a.open,children:d.jsx(xC,{asChild:!0,container:i,children:r})})})};Let.displayName=ole;var Df="MenuContent",[pEn,sle]=m1(Df),Uet=w.forwardRef((e,t)=>{const n=$et(Df,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=p1(Df,e.__scopeMenu),o=NT(Df,e.__scopeMenu);return d.jsx(cF.Provider,{scope:e.__scopeMenu,children:d.jsx(Ws,{present:r||a.open,children:d.jsx(cF.Slot,{scope:e.__scopeMenu,children:o.modal?d.jsx(AEn,{...i,ref:t}):d.jsx(gEn,{...i,ref:t})})})})}),AEn=w.forwardRef((e,t)=>{const n=p1(Df,e.__scopeMenu),r=w.useRef(null),i=Vr(t,r);return w.useEffect(()=>{const a=r.current;if(a)return c3(a)},[]),d.jsx(lle,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ln(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),gEn=w.forwardRef((e,t)=>{const n=p1(Df,e.__scopeMenu);return d.jsx(lle,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),vEn=by("MenuContent.ScrollLock"),lle=w.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:m,disableOutsideScroll:p,...A}=e,v=p1(Df,n),y=NT(Df,n),x=o8(n),k=Met(n),S=cEn(n),[C,N]=w.useState(null),E=w.useRef(null),D=Vr(t,E,v.onContentChange),T=w.useRef(0),j=w.useRef(""),O=w.useRef(0),B=w.useRef(null),M=w.useRef("right"),$=w.useRef(0),U=p?rC:w.Fragment,P=p?{as:vEn,allowPinchZoom:!0}:void 0,V=X=>{const Z=j.current+X,le=S().filter(re=>!re.disabled),H=document.activeElement,q=le.find(re=>re.ref.current===H)?.textValue,W=le.map(re=>re.textValue),te=DEn(W,Z,q),ne=le.find(re=>re.textValue===te)?.ref.current;(function re(de){j.current=de,window.clearTimeout(T.current),de!==""&&(T.current=window.setTimeout(()=>re(""),1e3))})(Z),ne&&setTimeout(()=>ne.focus())};w.useEffect(()=>()=>window.clearTimeout(T.current),[]),tL();const Q=w.useCallback(X=>M.current===B.current?.side&&OEn(X,B.current?.area),[]);return d.jsx(pEn,{scope:n,searchRef:j,onItemEnter:w.useCallback(X=>{Q(X)&&X.preventDefault()},[Q]),onItemLeave:w.useCallback(X=>{Q(X)||(E.current?.focus(),N(null))},[Q]),onTriggerLeave:w.useCallback(X=>{Q(X)&&X.preventDefault()},[Q]),pointerGraceTimerRef:O,onPointerGraceIntentChange:w.useCallback(X=>{B.current=X},[]),children:d.jsx(U,{...P,children:d.jsx(TD,{asChild:!0,trapped:i,onMountAutoFocus:ln(a,X=>{X.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:d.jsx(bC,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:d.jsx(lYe,{asChild:!0,...k,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:N,onEntryFocus:ln(l,X=>{y.isUsingKeyboardRef.current||X.preventDefault()}),preventScrollOnEntryFocus:!0,children:d.jsx(mL,{role:"menu","aria-orientation":"vertical","data-state":rtt(v.open),"data-radix-menu-content":"",dir:y.dir,...x,...A,ref:D,style:{outline:"none",...A.style},onKeyDown:ln(A.onKeyDown,X=>{const le=X.target.closest("[data-radix-menu-content]")===X.currentTarget,H=X.ctrlKey||X.altKey||X.metaKey,q=X.key.length===1;le&&(X.key==="Tab"&&X.preventDefault(),!H&&q&&V(X.key));const W=E.current;if(X.target!==W||!oEn.includes(X.key))return;X.preventDefault();const ne=S().filter(re=>!re.disabled).map(re=>re.ref.current);jet.includes(X.key)&&ne.reverse(),EEn(ne)}),onBlur:ln(e.onBlur,X=>{X.currentTarget.contains(X.target)||(window.clearTimeout(T.current),j.current="")}),onPointerMove:ln(e.onPointerMove,uF(X=>{const Z=X.target,le=$.current!==X.clientX;if(X.currentTarget.contains(Z)&&le){const H=X.clientX>$.current?"right":"left";M.current=H,$.current=X.clientX}}))})})})})})})});Uet.displayName=Df;var yEn="MenuGroup",cle=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(wn.div,{role:"group",...r,ref:t})});cle.displayName=yEn;var bEn="MenuLabel",zet=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(wn.div,{...r,ref:t})});zet.displayName=bEn;var KR="MenuItem",e2e="menu.itemSelect",s8=w.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,a=w.useRef(null),o=NT(KR,e.__scopeMenu),s=sle(KR,e.__scopeMenu),l=Vr(t,a),c=w.useRef(!1),u=()=>{const f=a.current;if(!n&&f){const h=new CustomEvent(e2e,{bubbles:!0,cancelable:!0});f.addEventListener(e2e,m=>r?.(m),{once:!0}),NLe(f,h),h.defaultPrevented?c.current=!1:o.onClose()}};return d.jsx(Het,{...i,ref:l,disabled:n,onClick:ln(e.onClick,u),onPointerDown:f=>{e.onPointerDown?.(f),c.current=!0},onPointerUp:ln(e.onPointerUp,f=>{c.current||f.currentTarget?.click()}),onKeyDown:ln(e.onKeyDown,f=>{const h=s.searchRef.current!=="";n||h&&f.key===" "||yJ.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});s8.displayName=KR;var Het=w.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=sle(KR,n),s=Met(n),l=w.useRef(null),c=Vr(t,l),[u,f]=w.useState(!1),[h,m]=w.useState("");return w.useEffect(()=>{const p=l.current;p&&m((p.textContent??"").trim())},[a.children]),d.jsx(cF.ItemSlot,{scope:n,disabled:r,textValue:i??h,children:d.jsx(cYe,{asChild:!0,...s,focusable:!r,children:d.jsx(wn.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:c,onPointerMove:ln(e.onPointerMove,uF(p=>{r?o.onItemLeave(p):(o.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ln(e.onPointerLeave,uF(p=>o.onItemLeave(p))),onFocus:ln(e.onFocus,()=>f(!0)),onBlur:ln(e.onBlur,()=>f(!1))})})})}),xEn="MenuCheckboxItem",Vet=w.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return d.jsx(Ket,{scope:e.__scopeMenu,checked:n,children:d.jsx(s8,{role:"menuitemcheckbox","aria-checked":YR(n)?"mixed":n,...i,ref:t,"data-state":dle(n),onSelect:ln(i.onSelect,()=>r?.(YR(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Vet.displayName=xEn;var Qet="MenuRadioGroup",[wEn,kEn]=m1(Qet,{value:void 0,onValueChange:()=>{}}),qet=w.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,a=cl(r);return d.jsx(wEn,{scope:e.__scopeMenu,value:n,onValueChange:a,children:d.jsx(cle,{...i,ref:t})})});qet.displayName=Qet;var Get="MenuRadioItem",Wet=w.forwardRef((e,t)=>{const{value:n,...r}=e,i=kEn(Get,e.__scopeMenu),a=n===i.value;return d.jsx(Ket,{scope:e.__scopeMenu,checked:a,children:d.jsx(s8,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":dle(a),onSelect:ln(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Wet.displayName=Get;var ule="MenuItemIndicator",[Ket,SEn]=m1(ule,{checked:!1}),Yet=w.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,a=SEn(ule,n);return d.jsx(Ws,{present:r||YR(a.checked)||a.checked===!0,children:d.jsx(wn.span,{...i,ref:t,"data-state":dle(a.checked)})})});Yet.displayName=ule;var CEn="MenuSeparator",Xet=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(wn.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Xet.displayName=CEn;var _En="MenuArrow",Zet=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=o8(n);return d.jsx(pL,{...i,...r,ref:t})});Zet.displayName=_En;var NEn="MenuSub",[sKn,Jet]=m1(NEn),c2="MenuSubTrigger",ett=w.forwardRef((e,t)=>{const n=p1(c2,e.__scopeMenu),r=NT(c2,e.__scopeMenu),i=Jet(c2,e.__scopeMenu),a=sle(c2,e.__scopeMenu),o=w.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=a,c={__scopeMenu:e.__scopeMenu},u=w.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return w.useEffect(()=>u,[u]),w.useEffect(()=>{const f=s.current;return()=>{window.clearTimeout(f),l(null)}},[s,l]),d.jsx(ale,{asChild:!0,...c,children:d.jsx(Het,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":rtt(n.open),...e,ref:fg(t,i.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ln(e.onPointerMove,uF(f=>{a.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:ln(e.onPointerLeave,uF(f=>{u();const h=n.content?.getBoundingClientRect();if(h){const m=n.content?.dataset.side,p=m==="right",A=p?-5:5,v=h[p?"left":"right"],y=h[p?"right":"left"];a.onPointerGraceIntentChange({area:[{x:f.clientX+A,y:f.clientY},{x:v,y:h.top},{x:y,y:h.top},{x:y,y:h.bottom},{x:v,y:h.bottom}],side:m}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(f),f.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:ln(e.onKeyDown,f=>{const h=a.searchRef.current!=="";e.disabled||h&&f.key===" "||sEn[r.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});ett.displayName=c2;var ttt="MenuSubContent",ntt=w.forwardRef((e,t)=>{const n=$et(Df,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=p1(Df,e.__scopeMenu),o=NT(Df,e.__scopeMenu),s=Jet(ttt,e.__scopeMenu),l=w.useRef(null),c=Vr(t,l);return d.jsx(cF.Provider,{scope:e.__scopeMenu,children:d.jsx(Ws,{present:r||a.open,children:d.jsx(cF.Slot,{scope:e.__scopeMenu,children:d.jsx(lle,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:c,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{o.isUsingKeyboardRef.current&&l.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:ln(e.onFocusOutside,u=>{u.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:ln(e.onEscapeKeyDown,u=>{o.onClose(),u.preventDefault()}),onKeyDown:ln(e.onKeyDown,u=>{const f=u.currentTarget.contains(u.target),h=lEn[o.dir].includes(u.key);f&&h&&(a.onOpenChange(!1),s.trigger?.focus(),u.preventDefault())})})})})})});ntt.displayName=ttt;function rtt(e){return e?"open":"closed"}function YR(e){return e==="indeterminate"}function dle(e){return YR(e)?"indeterminate":e?"checked":"unchecked"}function EEn(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function FEn(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function DEn(e,t,n){const i=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=FEn(e,Math.max(a,0));i.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function TEn(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const s=t[a],l=t[o],c=s.x,u=s.y,f=l.x,h=l.y;u>r!=h>r&&n<(f-c)*(r-u)/(h-u)+c&&(i=!i)}return i}function OEn(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return TEn(n,t)}function uF(e){return t=>t.pointerType==="mouse"?e(t):void 0}var BEn=Ret,IEn=ale,jEn=Let,PEn=Uet,MEn=cle,REn=zet,$En=s8,LEn=Vet,UEn=qet,zEn=Wet,HEn=Yet,VEn=Xet,QEn=Zet,qEn=ett,GEn=ntt,l8="DropdownMenu",[WEn]=Ac(l8,[Pet]),qc=Pet(),[KEn,itt]=WEn(l8),att=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,l=qc(t),c=w.useRef(null),[u,f]=Cd({prop:i,defaultProp:a??!1,onChange:o,caller:l8});return d.jsx(KEn,{scope:t,triggerId:Ns(),triggerRef:c,contentId:Ns(),open:u,onOpenChange:f,onOpenToggle:w.useCallback(()=>f(h=>!h),[f]),modal:s,children:d.jsx(BEn,{...l,open:u,onOpenChange:f,dir:r,modal:s,children:n})})};att.displayName=l8;var ott="DropdownMenuTrigger",stt=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=itt(ott,n),o=qc(n);return d.jsx(IEn,{asChild:!0,...o,children:d.jsx(wn.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:fg(t,a.triggerRef),onPointerDown:ln(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:ln(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});stt.displayName=ott;var YEn="DropdownMenuPortal",ltt=e=>{const{__scopeDropdownMenu:t,...n}=e,r=qc(t);return d.jsx(jEn,{...r,...n})};ltt.displayName=YEn;var ctt="DropdownMenuContent",utt=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=itt(ctt,n),a=qc(n),o=w.useRef(!1);return d.jsx(PEn,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:ln(e.onCloseAutoFocus,s=>{o.current||i.triggerRef.current?.focus(),o.current=!1,s.preventDefault()}),onInteractOutside:ln(e.onInteractOutside,s=>{const l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;(!i.modal||u)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});utt.displayName=ctt;var XEn="DropdownMenuGroup",dtt=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx(MEn,{...i,...r,ref:t})});dtt.displayName=XEn;var ZEn="DropdownMenuLabel",ftt=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx(REn,{...i,...r,ref:t})});ftt.displayName=ZEn;var JEn="DropdownMenuItem",htt=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx($En,{...i,...r,ref:t})});htt.displayName=JEn;var eFn="DropdownMenuCheckboxItem",mtt=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx(LEn,{...i,...r,ref:t})});mtt.displayName=eFn;var tFn="DropdownMenuRadioGroup",nFn=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx(UEn,{...i,...r,ref:t})});nFn.displayName=tFn;var rFn="DropdownMenuRadioItem",iFn=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx(zEn,{...i,...r,ref:t})});iFn.displayName=rFn;var aFn="DropdownMenuItemIndicator",ptt=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx(HEn,{...i,...r,ref:t})});ptt.displayName=aFn;var oFn="DropdownMenuSeparator",Att=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx(VEn,{...i,...r,ref:t})});Att.displayName=oFn;var sFn="DropdownMenuArrow",lFn=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx(QEn,{...i,...r,ref:t})});lFn.displayName=sFn;var cFn="DropdownMenuSubTrigger",uFn=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx(qEn,{...i,...r,ref:t})});uFn.displayName=cFn;var dFn="DropdownMenuSubContent",fFn=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx(GEn,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});fFn.displayName=dFn;var hFn=att,mFn=stt,pFn=ltt,AFn=utt,gFn=dtt,vFn=ftt,yFn=htt,bFn=mtt,xFn=ptt,wFn=Att;function ET({...e}){return d.jsx(hFn,{"data-slot":"dropdown-menu",...e})}function FT({...e}){return d.jsx(mFn,{"data-slot":"dropdown-menu-trigger",...e})}function DT({className:e,sideOffset:t=4,...n}){return d.jsx(pFn,{children:d.jsx(AFn,{"data-slot":"dropdown-menu-content",sideOffset:t,className:St("bg-white text-gray-950 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 z-1001 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-gray-200 p-1 shadow-md dark:bg-gray-950 dark:text-gray-50 dark:border-gray-800",e),...n})})}function kFn({...e}){return d.jsx(gFn,{"data-slot":"dropdown-menu-group",...e})}function rg({className:e,inset:t,variant:n="default",...r}){return d.jsx(yFn,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:St("focus:bg-gray-100 focus:text-gray-900 data-[variant=destructive]:text-red-500 data-[variant=destructive]:focus:bg-red-500/10 dark:data-[variant=destructive]:focus:bg-red-500/20 data-[variant=destructive]:focus:text-red-500 data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-gray-500 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:focus:bg-gray-800 dark:focus:text-gray-50 dark:data-[variant=destructive]:text-red-900 dark:data-[variant=destructive]:focus:bg-red-900/10 dark:dark:data-[variant=destructive]:focus:bg-red-900/20 dark:data-[variant=destructive]:focus:text-red-900 dark:[&_svg:not([class*='text-'])]:text-gray-400",e),...r})}function SFn({className:e,children:t,checked:n,...r}){return d.jsxs(bFn,{"data-slot":"dropdown-menu-checkbox-item",className:St("focus:bg-gray-100 focus:text-gray-900 relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:focus:bg-gray-800 dark:focus:text-gray-50",e),checked:n,...r,children:[d.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:d.jsx(xFn,{children:d.jsx(Ds,{className:"size-4"})})}),t]})}function fle({className:e,inset:t,...n}){return d.jsx(vFn,{"data-slot":"dropdown-menu-label","data-inset":t,className:St("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function hle({className:e,...t}){return d.jsx(wFn,{"data-slot":"dropdown-menu-separator",className:St("bg-gray-200 -mx-1 my-1 h-px dark:bg-gray-800",e),...t})}function t2e({className:e,...t}){return d.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:St("text-gray-500 ml-auto text-xs tracking-widest dark:text-gray-400",e),...t})}function gtt({links:e,isCollapsed:t,closeNav:n}){const r=({sub:i,...a})=>{const o=`${a.title}-${a.href}`;return t&&i?w.createElement(NFn,{...a,sub:i,key:o,closeNav:n}):t?w.createElement(_Fn,{...a,key:o,closeNav:n}):i?w.createElement(CFn,{...a,sub:i,key:o,closeNav:n}):w.createElement(vtt,{...a,key:o,closeNav:n})};return d.jsx(YKe,{className:"h-screen pb-40",children:d.jsx(vL,{delayDuration:0,children:d.jsx("nav",{className:"grid grid-cols-1 items-start gap-2",children:e.map(r)})})})}function vtt({title:e,icon:t,label:n,href:r,action:i,closeNav:a,subLink:o=!1}){return i?d.jsxs("button",{onClick:()=>{i(),a()},className:St(hg({variant:"ghost",size:"sm"}),"h-12 font-semibold tracking-tight justify-start text-wrap rounded-none px-6 w-full",o&&"h-10 w-full border-l border-l-slate-500 px-2"),children:[d.jsx("div",{className:"mr-2",children:t}),e,n&&d.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:n})]}):d.jsxs(eC,{to:r,onClick:a,className:St(hg({variant:"ghost",size:"sm"}),"h-12 font-semibold tracking-tight justify-start text-wrap rounded-none px-6",o&&"h-10 w-full border-l border-l-slate-500 px-2"),"aria-current":"page",children:[d.jsx("div",{className:"mr-2",children:t}),e,n&&d.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:n})]})}function CFn({title:e,icon:t,label:n,sub:r,closeNav:i}){const a=!!r?.find(o=>o.href===window.location.pathname);return d.jsxs(nEn,{defaultOpen:a,children:[d.jsxs(rEn,{className:St(hg({variant:"ghost",size:"sm"}),"group h-12 w-full justify-start rounded-none px-6"),children:[d.jsx("div",{className:"mr-2",children:t}),d.jsx("div",{className:"font-semibold tracking-tight",children:e}),n&&d.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:n}),d.jsx("span",{className:St('ml-auto transition-all group-data-[state="open"]:-rotate-180'),children:d.jsx(ti,{})})]}),d.jsx(iEn,{className:"collapsibleDropdown",asChild:!0,children:d.jsx("ul",{children:r.map(o=>d.jsx("li",{className:"my-1 ml-8",children:d.jsx(vtt,{...o,subLink:!0,closeNav:i})},o.title))})})]})}function _Fn({title:e,icon:t,label:n,href:r,action:i}){return d.jsxs(Dg,{delayDuration:0,children:[d.jsx(Tg,{asChild:!0,children:i?d.jsxs(qe,{variant:"ghost",size:"icon",className:"h-12 w-12",onClick:i,children:[t,d.jsx("span",{className:"sr-only",children:e})]}):d.jsxs(eC,{to:r,className:St(hg({variant:"ghost",size:"icon"}),"h-12 w-12"),children:[t,d.jsx("span",{className:"sr-only",children:e})]})}),d.jsxs(Og,{side:"right",className:"flex font-semibold tracking-tight items-center gap-4",children:[e,n&&d.jsx("span",{className:"ml-auto text-muted-foreground",children:n})]})]})}function NFn({title:e,icon:t,label:n,sub:r}){const i=!!r?.find(a=>a.href===window.location.pathname);return d.jsxs(ET,{children:[d.jsxs(Dg,{delayDuration:0,children:[d.jsx(Tg,{asChild:!0,children:d.jsx(FT,{asChild:!0,children:d.jsx(qe,{variant:i?"secondary":"ghost",size:"icon",className:"h-12 w-12",children:t})})}),d.jsxs(Og,{side:"right",className:"flex font-semibold tracking-tight items-center gap-4",children:[e," ",n&&d.jsx("span",{className:"ml-auto text-muted-foreground",children:n}),d.jsx(ti,{size:18,className:"-rotate-90 text-muted-foreground"})]})]}),d.jsxs(DT,{side:"right",align:"start",sideOffset:4,children:[d.jsxs(fle,{children:[e," ",n?`(${n})`:""]}),d.jsx(hle,{}),r.map(({title:a,icon:o,label:s,href:l,action:c})=>d.jsx(rg,{asChild:!c,children:c?d.jsxs("button",{onClick:c,className:St(hg({variant:"ghost",size:"sm"}),"flex h-12 cursor-pointer justify-start text-wrap rounded-none px-6 w-full"),children:[o," ",d.jsx("span",{className:"ml-2 max-w-52 text-wrap font-semibold tracking-tight",children:a}),s&&d.jsx("span",{className:"ml-auto text-xs",children:s})]}):d.jsxs(eC,{to:l,className:St(hg({variant:"ghost",size:"sm"}),"flex h-12 cursor-pointer justify-start text-wrap rounded-none px-6"),children:[o," ",d.jsx("span",{className:"ml-2 max-w-52 text-wrap font-semibold tracking-tight",children:a}),s&&d.jsx("span",{className:"ml-auto text-xs",children:s})]})},`${a}-${l||a}`))]})]})}const XR=[{title:"Charges",label:"",href:"",icon:d.jsx(Ck,{size:18}),sub:[{title:"All Charges",label:"",href:"/charges",icon:d.jsx(Ck,{size:18})},{title:"Missing Info Charges",label:"",href:"/missing-info-charges",icon:d.jsx(nIt,{size:18})},{title:"Ledger Validation",label:"",href:"/charges-ledger-validation",icon:d.jsx(t5t,{size:18})}]},{title:"Reports",label:"",href:"",icon:d.jsx(JBt,{size:18}),sub:[{title:"VAT Monthly Report",label:"",href:"/reports/vat-monthly",icon:d.jsx(Ck,{size:18})},{title:"Trial Balance Report",label:"",href:"/reports/trial-balance",icon:d.jsx(iLe,{size:18})},{title:"Conto Report",label:"",href:"/reports/conto",icon:d.jsx(XBt,{size:18})},{title:"Profit and Loss Report",label:"",href:"/reports/profit-and-loss",icon:d.jsx(LY,{size:18})},{title:"Tax Report",label:"",href:"/reports/tax",icon:d.jsx(Xge,{size:18})},{title:"Corporate Tax Ruling Compliance Report",label:"",href:"/reports/corporate-tax-ruling-compliance",icon:d.jsx(Xge,{size:18})},{title:"Depreciation Report",label:"",href:"/reports/depreciation",icon:d.jsx(m5t,{size:18})},{title:"Shaam 6111 Report",label:"",href:"/reports/shaam6111",icon:d.jsx(LY,{size:18})},{title:"Accountant Approvals",label:"",href:"/accountant-approvals",icon:d.jsx(l5t,{size:18})},{title:"Yearly Ledger Report",label:"",href:"/reports/yearly-ledger",icon:d.jsx(oIt,{size:18})},{title:"Transactions Balance",label:"",href:"/reports/balance",icon:d.jsx(A5t,{size:18})},{title:"Validate Reports",label:"",href:"/reports/validate-reports",icon:d.jsx(v5t,{size:18})},{title:"Generate Uniform Files",label:"",icon:d.jsx(_ne,{size:18})}]},{title:"Financial Entities",label:"",href:"",icon:d.jsx(tLe,{size:18}),sub:[{title:"Businesses",label:"",href:"/businesses",icon:d.jsx(J5t,{size:18})},{title:"Business Transactions",label:"",href:"/business-transactions",icon:d.jsx(GOt,{size:18})},{title:"Tax Categories",label:"",href:"/tax-categories",icon:d.jsx(HOt,{size:18})},{title:"Sort Codes",label:"",href:"/sort-codes",icon:d.jsx(r5t,{size:18})}]},{title:"Documents",label:"",href:"",icon:d.jsx(Yge,{size:18}),sub:[{href:"/documents",title:"All Documents",label:"",icon:d.jsx(Yge,{size:18})},{title:"Issue Documents",label:"",href:"/documents/issue-documents",icon:d.jsx(qge,{size:18})},{title:"Issue Document",label:"",href:"/documents/issue-document",icon:d.jsx(qge,{size:18})}]},{href:"/business-trips",title:"Business Trips",label:"",icon:d.jsx(VBt,{size:18})},{title:"Charts",label:"",href:"",icon:d.jsx(L7,{size:18}),sub:[{title:"Main",label:"",href:"/charts/",icon:d.jsx(L7,{size:18})},{title:"Monthly Income/Expense",label:"",href:"/charts/monthly-income-expense",icon:d.jsx(L7,{size:18})}]},{href:"/salaries",title:"Salaries",label:"",icon:d.jsx(ZOt,{size:18})},{href:"/tags",title:"Tags",label:"",icon:d.jsx(vIt,{size:18})}];function EFn(){const[e,t]=w.useState(!1),[n,r]=w.useState(!1),i=XR.map(a=>a.sub?{...a,sub:a.sub.map(o=>o.title==="Generate Uniform Files"?{...o,action:()=>{t(!1),r(!0)}}:o)}:a);return d.jsxs(d.Fragment,{children:[d.jsxs(q2n,{open:e,onOpenChange:t,children:[d.jsx(G2n,{asChild:!0,children:d.jsx(IBt,{})}),d.jsx(Y2n,{side:"left",className:"px-0!",children:d.jsx("div",{className:"space-y-4 py-4",children:d.jsxs("div",{className:"px-3 py-2",children:[d.jsx("h2",{className:"mb-2 px-4 text-lg font-semibold tracking-tight",children:"Overview"}),d.jsx("div",{className:"space-y-1",children:d.jsx(gtt,{isCollapsed:!1,links:i,closeNav:()=>t(!1)})})]})})})]}),d.jsx(Det,{open:n,onOpenChange:r})]})}const QQ="mergeChargesByTransactionReference",FFn=()=>{const[{fetching:e},t]=Hn(MFt),[{fetching:n},r]=Hn(RFt),[{fetching:i},a]=Hn($Ft),o=w.useCallback(async()=>{let s="Error flagging foreign fee transactions";const l=`${QQ}-fees`,c=`${QQ}-merge`,u=`${QQ}-debit-date`;Qe.loading("Flagging Fees",{id:l});try{const f=await t({}),h=Vn(f,s,l);if(!h)return;if(!h.flagForeignFeeTransactions.success){console.error(`${s} ${h.flagForeignFeeTransactions.errors?`:
|
|
987
|
+
`)+" "+te[1]:te[0]+W+" "+q.join(", ")+" "+te[1]}e.types=j2n();function y(q){return Array.isArray(q)}e.isArray=y;function x(q){return typeof q=="boolean"}e.isBoolean=x;function k(q){return q===null}e.isNull=k;function S(q){return q==null}e.isNullOrUndefined=S;function C(q){return typeof q=="number"}e.isNumber=C;function N(q){return typeof q=="string"}e.isString=N;function E(q){return typeof q=="symbol"}e.isSymbol=E;function D(q){return q===void 0}e.isUndefined=D;function T(q){return j(q)&&U(q)==="[object RegExp]"}e.isRegExp=T,e.types.isRegExp=T;function j(q){return typeof q=="object"&&q!==null}e.isObject=j;function O(q){return j(q)&&U(q)==="[object Date]"}e.isDate=O,e.types.isDate=O;function B(q){return j(q)&&(U(q)==="[object Error]"||q instanceof Error)}e.isError=B,e.types.isNativeError=B;function M(q){return typeof q=="function"}e.isFunction=M;function $(q){return q===null||typeof q=="boolean"||typeof q=="number"||typeof q=="string"||typeof q=="symbol"||typeof q>"u"}e.isPrimitive=$,e.isBuffer=P2n();function U(q){return Object.prototype.toString.call(q)}function P(q){return q<10?"0"+q.toString(10):q.toString(10)}var V=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Q(){var q=new Date,W=[P(q.getHours()),P(q.getMinutes()),P(q.getSeconds())].join(":");return[q.getDate(),V[q.getMonth()],W].join(" ")}e.log=function(){console.log("%s - %s",Q(),e.format.apply(e,arguments))},e.inherits=h1(),e._extend=function(q,W){if(!W||!j(W))return q;for(var te=Object.keys(W),ne=te.length;ne--;)q[te[ne]]=W[te[ne]];return q};function X(q,W){return Object.prototype.hasOwnProperty.call(q,W)}var Z=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(W){if(typeof W!="function")throw new TypeError('The "original" argument must be of type Function');if(Z&&W[Z]){var te=W[Z];if(typeof te!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(te,Z,{value:te,enumerable:!1,writable:!1,configurable:!0}),te}function te(){for(var ne,re,de=new Promise(function(oe,J){ne=oe,re=J}),he=[],pe=0;pe<arguments.length;pe++)he.push(arguments[pe]);he.push(function(oe,J){oe?re(oe):ne(J)});try{W.apply(this,he)}catch(oe){re(oe)}return de}return Object.setPrototypeOf(te,Object.getPrototypeOf(W)),Z&&Object.defineProperty(te,Z,{value:te,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(te,n(W))},e.promisify.custom=Z;function le(q,W){if(!q){var te=new Error("Promise was rejected with a falsy value");te.reason=q,q=te}return W(q)}function H(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');function W(){for(var te=[],ne=0;ne<arguments.length;ne++)te.push(arguments[ne]);var re=te.pop();if(typeof re!="function")throw new TypeError("The last argument must be of type Function");var de=this,he=function(){return re.apply(de,arguments)};q.apply(this,te).then(function(pe){Yn.nextTick(he.bind(null,null,pe))},function(pe){Yn.nextTick(le.bind(null,pe,he))})}return Object.setPrototypeOf(W,Object.getPrototypeOf(q)),Object.defineProperties(W,n(q)),W}e.callbackify=H})(CQ)),CQ}var DQ,MNe;function M2n(){if(MNe)return DQ;MNe=1;function e(p,A){var v=Object.keys(p);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(p);A&&(y=y.filter(function(x){return Object.getOwnPropertyDescriptor(p,x).enumerable})),v.push.apply(v,y)}return v}function t(p){for(var A=1;A<arguments.length;A++){var v=arguments[A]!=null?arguments[A]:{};A%2?e(Object(v),!0).forEach(function(y){n(p,y,v[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(v)):e(Object(v)).forEach(function(y){Object.defineProperty(p,y,Object.getOwnPropertyDescriptor(v,y))})}return p}function n(p,A,v){return A=o(A),A in p?Object.defineProperty(p,A,{value:v,enumerable:!0,configurable:!0,writable:!0}):p[A]=v,p}function r(p,A){if(!(p instanceof A))throw new TypeError("Cannot call a class as a function")}function i(p,A){for(var v=0;v<A.length;v++){var y=A[v];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(p,o(y.key),y)}}function a(p,A,v){return A&&i(p.prototype,A),Object.defineProperty(p,"prototype",{writable:!1}),p}function o(p){var A=s(p,"string");return typeof A=="symbol"?A:String(A)}function s(p,A){if(typeof p!="object"||p===null)return p;var v=p[Symbol.toPrimitive];if(v!==void 0){var y=v.call(p,A);if(typeof y!="object")return y;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(p)}var l=CT(),c=l.Buffer,u=ket(),f=u.inspect,h=f&&f.custom||"inspect";function m(p,A,v){c.prototype.copy.call(p,A,v)}return DQ=(function(){function p(){r(this,p),this.head=null,this.tail=null,this.length=0}return a(p,[{key:"push",value:function(v){var y={data:v,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(v){var y={data:v,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var v=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,v}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(v){if(this.length===0)return"";for(var y=this.head,x=""+y.data;y=y.next;)x+=v+y.data;return x}},{key:"concat",value:function(v){if(this.length===0)return c.alloc(0);for(var y=c.allocUnsafe(v>>>0),x=this.head,k=0;x;)m(x.data,y,k),k+=x.data.length,x=x.next;return y}},{key:"consume",value:function(v,y){var x;return v<this.head.data.length?(x=this.head.data.slice(0,v),this.head.data=this.head.data.slice(v)):v===this.head.data.length?x=this.shift():x=y?this._getString(v):this._getBuffer(v),x}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(v){var y=this.head,x=1,k=y.data;for(v-=k.length;y=y.next;){var S=y.data,C=v>S.length?S.length:v;if(C===S.length?k+=S:k+=S.slice(0,v),v-=C,v===0){C===S.length?(++x,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=S.slice(C));break}++x}return this.length-=x,k}},{key:"_getBuffer",value:function(v){var y=c.allocUnsafe(v),x=this.head,k=1;for(x.data.copy(y),v-=x.data.length;x=x.next;){var S=x.data,C=v>S.length?S.length:v;if(S.copy(y,y.length-v,0,C),v-=C,v===0){C===S.length?(++k,x.next?this.head=x.next:this.head=this.tail=null):(this.head=x,x.data=S.slice(C));break}++k}return this.length-=k,y}},{key:h,value:function(v,y){return f(this,t(t({},y),{},{depth:0,customInspect:!1}))}}]),p})(),DQ}var TQ,RNe;function Cet(){if(RNe)return TQ;RNe=1;function e(o,s){var l=this,c=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return c||u?(s?s(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Yn.nextTick(i,this,o)):Yn.nextTick(i,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(f){!s&&f?l._writableState?l._writableState.errorEmitted?Yn.nextTick(n,l):(l._writableState.errorEmitted=!0,Yn.nextTick(t,l,f)):Yn.nextTick(t,l,f):s?(Yn.nextTick(n,l),s(f)):Yn.nextTick(n,l)}),this)}function t(o,s){i(o,s),n(o)}function n(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(o,s){o.emit("error",s)}function a(o,s){var l=o._readableState,c=o._writableState;l&&l.autoDestroy||c&&c.autoDestroy?o.destroy(s):o.emit("error",s)}return TQ={destroy:e,undestroy:r,errorOrDestroy:a},TQ}var OQ={},$Ne;function IC(){if($Ne)return OQ;$Ne=1;function e(s,l){s.prototype=Object.create(l.prototype),s.prototype.constructor=s,s.__proto__=l}var t={};function n(s,l,c){c||(c=Error);function u(h,m,p){return typeof l=="string"?l:l(h,m,p)}var f=(function(h){e(m,h);function m(p,A,v){return h.call(this,u(p,A,v))||this}return m})(c);f.prototype.name=c.name,f.prototype.code=s,t[s]=f}function r(s,l){if(Array.isArray(s)){var c=s.length;return s=s.map(function(u){return String(u)}),c>2?"one of ".concat(l," ").concat(s.slice(0,c-1).join(", "),", or ")+s[c-1]:c===2?"one of ".concat(l," ").concat(s[0]," or ").concat(s[1]):"of ".concat(l," ").concat(s[0])}else return"of ".concat(l," ").concat(String(s))}function i(s,l,c){return s.substr(0,l.length)===l}function a(s,l,c){return(c===void 0||c>s.length)&&(c=s.length),s.substring(c-l.length,c)===l}function o(s,l,c){return typeof c!="number"&&(c=0),c+l.length>s.length?!1:s.indexOf(l,c)!==-1}return n("ERR_INVALID_OPT_VALUE",function(s,l){return'The value "'+l+'" is invalid for option "'+s+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(s,l,c){var u;typeof l=="string"&&i(l,"not ")?(u="must not be",l=l.replace(/^not /,"")):u="must be";var f;if(a(s," argument"))f="The ".concat(s," ").concat(u," ").concat(r(l,"type"));else{var h=o(s,".")?"property":"argument";f='The "'.concat(s,'" ').concat(h," ").concat(u," ").concat(r(l,"type"))}return f+=". Received type ".concat(typeof c),f},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(s){return"The "+s+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(s){return"Cannot call "+s+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(s){return"Unknown encoding: "+s},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),OQ.codes=t,OQ}var BQ,LNe;function _et(){if(LNe)return BQ;LNe=1;var e=IC().codes.ERR_INVALID_OPT_VALUE;function t(r,i,a){return r.highWaterMark!=null?r.highWaterMark:i?r[a]:null}function n(r,i,a,o){var s=t(i,o,a);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var l=o?a:"highWaterMark";throw new e(l,s)}return Math.floor(s)}return r.objectMode?16:16*1024}return BQ={getHighWaterMark:n},BQ}var IQ,UNe;function R2n(){if(UNe)return IQ;UNe=1,IQ=e;function e(n,r){if(t("noDeprecation"))return n;var i=!1;function a(){if(!i){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),i=!0}return n.apply(this,arguments)}return a}function t(n){try{if(!bu.localStorage)return!1}catch{return!1}var r=bu.localStorage[n];return r==null?!1:String(r).toLowerCase()==="true"}return IQ}var jQ,zNe;function Net(){if(zNe)return jQ;zNe=1,jQ=D;function e(ne){var re=this;this.next=null,this.entry=null,this.finish=function(){te(re,ne)}}var t;D.WritableState=N;var n={deprecate:R2n()},r=wet(),i=CT().Buffer,a=(typeof bu<"u"?bu:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(ne){return i.from(ne)}function s(ne){return i.isBuffer(ne)||ne instanceof a}var l=Cet(),c=_et(),u=c.getHighWaterMark,f=IC().codes,h=f.ERR_INVALID_ARG_TYPE,m=f.ERR_METHOD_NOT_IMPLEMENTED,p=f.ERR_MULTIPLE_CALLBACK,A=f.ERR_STREAM_CANNOT_PIPE,v=f.ERR_STREAM_DESTROYED,y=f.ERR_STREAM_NULL_VALUES,x=f.ERR_STREAM_WRITE_AFTER_END,k=f.ERR_UNKNOWN_ENCODING,S=l.errorOrDestroy;h1()(D,r);function C(){}function N(ne,re,de){t=t||DS(),ne=ne||{},typeof de!="boolean"&&(de=re instanceof t),this.objectMode=!!ne.objectMode,de&&(this.objectMode=this.objectMode||!!ne.writableObjectMode),this.highWaterMark=u(this,ne,"writableHighWaterMark",de),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var he=ne.decodeStrings===!1;this.decodeStrings=!he,this.defaultEncoding=ne.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(pe){P(re,pe)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=ne.emitClose!==!1,this.autoDestroy=!!ne.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}N.prototype.getBuffer=function(){for(var re=this.bufferedRequest,de=[];re;)de.push(re),re=re.next;return de},(function(){try{Object.defineProperty(N.prototype,"buffer",{get:n.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var E;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(E=Function.prototype[Symbol.hasInstance],Object.defineProperty(D,Symbol.hasInstance,{value:function(re){return E.call(this,re)?!0:this!==D?!1:re&&re._writableState instanceof N}})):E=function(re){return re instanceof this};function D(ne){t=t||DS();var re=this instanceof t;if(!re&&!E.call(D,this))return new D(ne);this._writableState=new N(ne,this,re),this.writable=!0,ne&&(typeof ne.write=="function"&&(this._write=ne.write),typeof ne.writev=="function"&&(this._writev=ne.writev),typeof ne.destroy=="function"&&(this._destroy=ne.destroy),typeof ne.final=="function"&&(this._final=ne.final)),r.call(this)}D.prototype.pipe=function(){S(this,new A)};function T(ne,re){var de=new x;S(ne,de),Yn.nextTick(re,de)}function j(ne,re,de,he){var pe;return de===null?pe=new y:typeof de!="string"&&!re.objectMode&&(pe=new h("chunk",["string","Buffer"],de)),pe?(S(ne,pe),Yn.nextTick(he,pe),!1):!0}D.prototype.write=function(ne,re,de){var he=this._writableState,pe=!1,oe=!he.objectMode&&s(ne);return oe&&!i.isBuffer(ne)&&(ne=o(ne)),typeof re=="function"&&(de=re,re=null),oe?re="buffer":re||(re=he.defaultEncoding),typeof de!="function"&&(de=C),he.ending?T(this,de):(oe||j(this,he,ne,de))&&(he.pendingcb++,pe=B(this,he,oe,ne,re,de)),pe},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){var ne=this._writableState;ne.corked&&(ne.corked--,!ne.writing&&!ne.corked&&!ne.bufferProcessing&&ne.bufferedRequest&&X(this,ne))},D.prototype.setDefaultEncoding=function(re){if(typeof re=="string"&&(re=re.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((re+"").toLowerCase())>-1))throw new k(re);return this._writableState.defaultEncoding=re,this},Object.defineProperty(D.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function O(ne,re,de){return!ne.objectMode&&ne.decodeStrings!==!1&&typeof re=="string"&&(re=i.from(re,de)),re}Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function B(ne,re,de,he,pe,oe){if(!de){var J=O(re,he,pe);he!==J&&(de=!0,pe="buffer",he=J)}var Se=re.objectMode?1:he.length;re.length+=Se;var we=re.length<re.highWaterMark;if(we||(re.needDrain=!0),re.writing||re.corked){var ke=re.lastBufferedRequest;re.lastBufferedRequest={chunk:he,encoding:pe,isBuf:de,callback:oe,next:null},ke?ke.next=re.lastBufferedRequest:re.bufferedRequest=re.lastBufferedRequest,re.bufferedRequestCount+=1}else M(ne,re,!1,Se,he,pe,oe);return we}function M(ne,re,de,he,pe,oe,J){re.writelen=he,re.writecb=J,re.writing=!0,re.sync=!0,re.destroyed?re.onwrite(new v("write")):de?ne._writev(pe,re.onwrite):ne._write(pe,oe,re.onwrite),re.sync=!1}function $(ne,re,de,he,pe){--re.pendingcb,de?(Yn.nextTick(pe,he),Yn.nextTick(q,ne,re),ne._writableState.errorEmitted=!0,S(ne,he)):(pe(he),ne._writableState.errorEmitted=!0,S(ne,he),q(ne,re))}function U(ne){ne.writing=!1,ne.writecb=null,ne.length-=ne.writelen,ne.writelen=0}function P(ne,re){var de=ne._writableState,he=de.sync,pe=de.writecb;if(typeof pe!="function")throw new p;if(U(de),re)$(ne,de,he,re,pe);else{var oe=Z(de)||ne.destroyed;!oe&&!de.corked&&!de.bufferProcessing&&de.bufferedRequest&&X(ne,de),he?Yn.nextTick(V,ne,de,oe,pe):V(ne,de,oe,pe)}}function V(ne,re,de,he){de||Q(ne,re),re.pendingcb--,he(),q(ne,re)}function Q(ne,re){re.length===0&&re.needDrain&&(re.needDrain=!1,ne.emit("drain"))}function X(ne,re){re.bufferProcessing=!0;var de=re.bufferedRequest;if(ne._writev&&de&&de.next){var he=re.bufferedRequestCount,pe=new Array(he),oe=re.corkedRequestsFree;oe.entry=de;for(var J=0,Se=!0;de;)pe[J]=de,de.isBuf||(Se=!1),de=de.next,J+=1;pe.allBuffers=Se,M(ne,re,!0,re.length,pe,"",oe.finish),re.pendingcb++,re.lastBufferedRequest=null,oe.next?(re.corkedRequestsFree=oe.next,oe.next=null):re.corkedRequestsFree=new e(re),re.bufferedRequestCount=0}else{for(;de;){var we=de.chunk,ke=de.encoding,me=de.callback,K=re.objectMode?1:we.length;if(M(ne,re,!1,K,we,ke,me),de=de.next,re.bufferedRequestCount--,re.writing)break}de===null&&(re.lastBufferedRequest=null)}re.bufferedRequest=de,re.bufferProcessing=!1}D.prototype._write=function(ne,re,de){de(new m("_write()"))},D.prototype._writev=null,D.prototype.end=function(ne,re,de){var he=this._writableState;return typeof ne=="function"?(de=ne,ne=null,re=null):typeof re=="function"&&(de=re,re=null),ne!=null&&this.write(ne,re),he.corked&&(he.corked=1,this.uncork()),he.ending||W(this,he,de),this},Object.defineProperty(D.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Z(ne){return ne.ending&&ne.length===0&&ne.bufferedRequest===null&&!ne.finished&&!ne.writing}function le(ne,re){ne._final(function(de){re.pendingcb--,de&&S(ne,de),re.prefinished=!0,ne.emit("prefinish"),q(ne,re)})}function H(ne,re){!re.prefinished&&!re.finalCalled&&(typeof ne._final=="function"&&!re.destroyed?(re.pendingcb++,re.finalCalled=!0,Yn.nextTick(le,ne,re)):(re.prefinished=!0,ne.emit("prefinish")))}function q(ne,re){var de=Z(re);if(de&&(H(ne,re),re.pendingcb===0&&(re.finished=!0,ne.emit("finish"),re.autoDestroy))){var he=ne._readableState;(!he||he.autoDestroy&&he.endEmitted)&&ne.destroy()}return de}function W(ne,re,de){re.ending=!0,q(ne,re),de&&(re.finished?Yn.nextTick(de):ne.once("finish",de)),re.ended=!0,ne.writable=!1}function te(ne,re,de){var he=ne.entry;for(ne.entry=null;he;){var pe=he.callback;re.pendingcb--,pe(de),he=he.next}re.corkedRequestsFree.next=ne}return Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(re){this._writableState&&(this._writableState.destroyed=re)}}),D.prototype.destroy=l.destroy,D.prototype._undestroy=l.undestroy,D.prototype._destroy=function(ne,re){re(ne)},jQ}var PQ,HNe;function DS(){if(HNe)return PQ;HNe=1;var e=Object.keys||function(c){var u=[];for(var f in c)u.push(f);return u};PQ=o;var t=Eet(),n=Net();h1()(o,t);for(var r=e(n.prototype),i=0;i<r.length;i++){var a=r[i];o.prototype[a]||(o.prototype[a]=n.prototype[a])}function o(c){if(!(this instanceof o))return new o(c);t.call(this,c),n.call(this,c),this.allowHalfOpen=!0,c&&(c.readable===!1&&(this.readable=!1),c.writable===!1&&(this.writable=!1),c.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||Yn.nextTick(l,this)}function l(c){c.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(u){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=u,this._writableState.destroyed=u)}}),PQ}var MQ,VNe;function Jse(){if(VNe)return MQ;VNe=1;var e=IC().codes.ERR_STREAM_PREMATURE_CLOSE;function t(a){var o=!1;return function(){if(!o){o=!0;for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];a.apply(this,l)}}}function n(){}function r(a){return a.setHeader&&typeof a.abort=="function"}function i(a,o,s){if(typeof o=="function")return i(a,null,o);o||(o={}),s=t(s||n);var l=o.readable||o.readable!==!1&&a.readable,c=o.writable||o.writable!==!1&&a.writable,u=function(){a.writable||h()},f=a._writableState&&a._writableState.finished,h=function(){c=!1,f=!0,l||s.call(a)},m=a._readableState&&a._readableState.endEmitted,p=function(){l=!1,m=!0,c||s.call(a)},A=function(k){s.call(a,k)},v=function(){var k;if(l&&!m)return(!a._readableState||!a._readableState.ended)&&(k=new e),s.call(a,k);if(c&&!f)return(!a._writableState||!a._writableState.ended)&&(k=new e),s.call(a,k)},y=function(){a.req.on("finish",h)};return r(a)?(a.on("complete",h),a.on("abort",v),a.req?y():a.on("request",y)):c&&!a._writableState&&(a.on("end",u),a.on("close",u)),a.on("end",p),a.on("finish",h),o.error!==!1&&a.on("error",A),a.on("close",v),function(){a.removeListener("complete",h),a.removeListener("abort",v),a.removeListener("request",y),a.req&&a.req.removeListener("finish",h),a.removeListener("end",u),a.removeListener("close",u),a.removeListener("finish",h),a.removeListener("end",p),a.removeListener("error",A),a.removeListener("close",v)}}return MQ=i,MQ}var RQ,QNe;function $2n(){if(QNe)return RQ;QNe=1;var e;function t(k,S,C){return S=n(S),S in k?Object.defineProperty(k,S,{value:C,enumerable:!0,configurable:!0,writable:!0}):k[S]=C,k}function n(k){var S=r(k,"string");return typeof S=="symbol"?S:String(S)}function r(k,S){if(typeof k!="object"||k===null)return k;var C=k[Symbol.toPrimitive];if(C!==void 0){var N=C.call(k,S);if(typeof N!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(k)}var i=Jse(),a=Symbol("lastResolve"),o=Symbol("lastReject"),s=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),u=Symbol("handlePromise"),f=Symbol("stream");function h(k,S){return{value:k,done:S}}function m(k){var S=k[a];if(S!==null){var C=k[f].read();C!==null&&(k[c]=null,k[a]=null,k[o]=null,S(h(C,!1)))}}function p(k){Yn.nextTick(m,k)}function A(k,S){return function(C,N){k.then(function(){if(S[l]){C(h(void 0,!0));return}S[u](C,N)},N)}}var v=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((e={get stream(){return this[f]},next:function(){var S=this,C=this[s];if(C!==null)return Promise.reject(C);if(this[l])return Promise.resolve(h(void 0,!0));if(this[f].destroyed)return new Promise(function(T,j){Yn.nextTick(function(){S[s]?j(S[s]):T(h(void 0,!0))})});var N=this[c],E;if(N)E=new Promise(A(N,this));else{var D=this[f].read();if(D!==null)return Promise.resolve(h(D,!1));E=new Promise(this[u])}return this[c]=E,E}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var S=this;return new Promise(function(C,N){S[f].destroy(null,function(E){if(E){N(E);return}C(h(void 0,!0))})})}),e),v),x=function(S){var C,N=Object.create(y,(C={},t(C,f,{value:S,writable:!0}),t(C,a,{value:null,writable:!0}),t(C,o,{value:null,writable:!0}),t(C,s,{value:null,writable:!0}),t(C,l,{value:S._readableState.endEmitted,writable:!0}),t(C,u,{value:function(D,T){var j=N[f].read();j?(N[c]=null,N[a]=null,N[o]=null,D(h(j,!1))):(N[a]=D,N[o]=T)},writable:!0}),C));return N[c]=null,i(S,function(E){if(E&&E.code!=="ERR_STREAM_PREMATURE_CLOSE"){var D=N[o];D!==null&&(N[c]=null,N[a]=null,N[o]=null,D(E)),N[s]=E;return}var T=N[a];T!==null&&(N[c]=null,N[a]=null,N[o]=null,T(h(void 0,!0))),N[l]=!0}),S.on("readable",p.bind(null,N)),N};return RQ=x,RQ}var $Q,qNe;function L2n(){return qNe||(qNe=1,$Q=function(){throw new Error("Readable.from is not available in the browser")}),$Q}var LQ,GNe;function Eet(){if(GNe)return LQ;GNe=1,LQ=T;var e;T.ReadableState=D,Zse().EventEmitter;var t=function(J,Se){return J.listeners(Se).length},n=wet(),r=CT().Buffer,i=(typeof bu<"u"?bu:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(oe){return r.from(oe)}function o(oe){return r.isBuffer(oe)||oe instanceof i}var s=ket(),l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var c=M2n(),u=Cet(),f=_et(),h=f.getHighWaterMark,m=IC().codes,p=m.ERR_INVALID_ARG_TYPE,A=m.ERR_STREAM_PUSH_AFTER_EOF,v=m.ERR_METHOD_NOT_IMPLEMENTED,y=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,x,k,S;h1()(T,n);var C=u.errorOrDestroy,N=["error","close","destroy","pause","resume"];function E(oe,J,Se){if(typeof oe.prependListener=="function")return oe.prependListener(J,Se);!oe._events||!oe._events[J]?oe.on(J,Se):Array.isArray(oe._events[J])?oe._events[J].unshift(Se):oe._events[J]=[Se,oe._events[J]]}function D(oe,J,Se){e=e||DS(),oe=oe||{},typeof Se!="boolean"&&(Se=J instanceof e),this.objectMode=!!oe.objectMode,Se&&(this.objectMode=this.objectMode||!!oe.readableObjectMode),this.highWaterMark=h(this,oe,"readableHighWaterMark",Se),this.buffer=new c,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=oe.emitClose!==!1,this.autoDestroy=!!oe.autoDestroy,this.destroyed=!1,this.defaultEncoding=oe.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,oe.encoding&&(x||(x=vJ().StringDecoder),this.decoder=new x(oe.encoding),this.encoding=oe.encoding)}function T(oe){if(e=e||DS(),!(this instanceof T))return new T(oe);var J=this instanceof e;this._readableState=new D(oe,this,J),this.readable=!0,oe&&(typeof oe.read=="function"&&(this._read=oe.read),typeof oe.destroy=="function"&&(this._destroy=oe.destroy)),n.call(this)}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(J){this._readableState&&(this._readableState.destroyed=J)}}),T.prototype.destroy=u.destroy,T.prototype._undestroy=u.undestroy,T.prototype._destroy=function(oe,J){J(oe)},T.prototype.push=function(oe,J){var Se=this._readableState,we;return Se.objectMode?we=!0:typeof oe=="string"&&(J=J||Se.defaultEncoding,J!==Se.encoding&&(oe=r.from(oe,J),J=""),we=!0),j(this,oe,J,!1,we)},T.prototype.unshift=function(oe){return j(this,oe,null,!0,!1)};function j(oe,J,Se,we,ke){l("readableAddChunk",J);var me=oe._readableState;if(J===null)me.reading=!1,P(oe,me);else{var K;if(ke||(K=B(me,J)),K)C(oe,K);else if(me.objectMode||J&&J.length>0)if(typeof J!="string"&&!me.objectMode&&Object.getPrototypeOf(J)!==r.prototype&&(J=a(J)),we)me.endEmitted?C(oe,new y):O(oe,me,J,!0);else if(me.ended)C(oe,new A);else{if(me.destroyed)return!1;me.reading=!1,me.decoder&&!Se?(J=me.decoder.write(J),me.objectMode||J.length!==0?O(oe,me,J,!1):X(oe,me)):O(oe,me,J,!1)}else we||(me.reading=!1,X(oe,me))}return!me.ended&&(me.length<me.highWaterMark||me.length===0)}function O(oe,J,Se,we){J.flowing&&J.length===0&&!J.sync?(J.awaitDrain=0,oe.emit("data",Se)):(J.length+=J.objectMode?1:Se.length,we?J.buffer.unshift(Se):J.buffer.push(Se),J.needReadable&&V(oe)),X(oe,J)}function B(oe,J){var Se;return!o(J)&&typeof J!="string"&&J!==void 0&&!oe.objectMode&&(Se=new p("chunk",["string","Buffer","Uint8Array"],J)),Se}T.prototype.isPaused=function(){return this._readableState.flowing===!1},T.prototype.setEncoding=function(oe){x||(x=vJ().StringDecoder);var J=new x(oe);this._readableState.decoder=J,this._readableState.encoding=this._readableState.decoder.encoding;for(var Se=this._readableState.buffer.head,we="";Se!==null;)we+=J.write(Se.data),Se=Se.next;return this._readableState.buffer.clear(),we!==""&&this._readableState.buffer.push(we),this._readableState.length=we.length,this};var M=1073741824;function $(oe){return oe>=M?oe=M:(oe--,oe|=oe>>>1,oe|=oe>>>2,oe|=oe>>>4,oe|=oe>>>8,oe|=oe>>>16,oe++),oe}function U(oe,J){return oe<=0||J.length===0&&J.ended?0:J.objectMode?1:oe!==oe?J.flowing&&J.length?J.buffer.head.data.length:J.length:(oe>J.highWaterMark&&(J.highWaterMark=$(oe)),oe<=J.length?oe:J.ended?J.length:(J.needReadable=!0,0))}T.prototype.read=function(oe){l("read",oe),oe=parseInt(oe,10);var J=this._readableState,Se=oe;if(oe!==0&&(J.emittedReadable=!1),oe===0&&J.needReadable&&((J.highWaterMark!==0?J.length>=J.highWaterMark:J.length>0)||J.ended))return l("read: emitReadable",J.length,J.ended),J.length===0&&J.ended?de(this):V(this),null;if(oe=U(oe,J),oe===0&&J.ended)return J.length===0&&de(this),null;var we=J.needReadable;l("need readable",we),(J.length===0||J.length-oe<J.highWaterMark)&&(we=!0,l("length less than watermark",we)),J.ended||J.reading?(we=!1,l("reading or ended",we)):we&&(l("do read"),J.reading=!0,J.sync=!0,J.length===0&&(J.needReadable=!0),this._read(J.highWaterMark),J.sync=!1,J.reading||(oe=U(Se,J)));var ke;return oe>0?ke=re(oe,J):ke=null,ke===null?(J.needReadable=J.length<=J.highWaterMark,oe=0):(J.length-=oe,J.awaitDrain=0),J.length===0&&(J.ended||(J.needReadable=!0),Se!==oe&&J.ended&&de(this)),ke!==null&&this.emit("data",ke),ke};function P(oe,J){if(l("onEofChunk"),!J.ended){if(J.decoder){var Se=J.decoder.end();Se&&Se.length&&(J.buffer.push(Se),J.length+=J.objectMode?1:Se.length)}J.ended=!0,J.sync?V(oe):(J.needReadable=!1,J.emittedReadable||(J.emittedReadable=!0,Q(oe)))}}function V(oe){var J=oe._readableState;l("emitReadable",J.needReadable,J.emittedReadable),J.needReadable=!1,J.emittedReadable||(l("emitReadable",J.flowing),J.emittedReadable=!0,Yn.nextTick(Q,oe))}function Q(oe){var J=oe._readableState;l("emitReadable_",J.destroyed,J.length,J.ended),!J.destroyed&&(J.length||J.ended)&&(oe.emit("readable"),J.emittedReadable=!1),J.needReadable=!J.flowing&&!J.ended&&J.length<=J.highWaterMark,ne(oe)}function X(oe,J){J.readingMore||(J.readingMore=!0,Yn.nextTick(Z,oe,J))}function Z(oe,J){for(;!J.reading&&!J.ended&&(J.length<J.highWaterMark||J.flowing&&J.length===0);){var Se=J.length;if(l("maybeReadMore read 0"),oe.read(0),Se===J.length)break}J.readingMore=!1}T.prototype._read=function(oe){C(this,new v("_read()"))},T.prototype.pipe=function(oe,J){var Se=this,we=this._readableState;switch(we.pipesCount){case 0:we.pipes=oe;break;case 1:we.pipes=[we.pipes,oe];break;default:we.pipes.push(oe);break}we.pipesCount+=1,l("pipe count=%d opts=%j",we.pipesCount,J);var ke=(!J||J.end!==!1)&&oe!==Yn.stdout&&oe!==Yn.stderr,me=ke?ie:We;we.endEmitted?Yn.nextTick(me):Se.once("end",me),oe.on("unpipe",K);function K(tt,ot){l("onunpipe"),tt===Se&&ot&&ot.hasUnpiped===!1&&(ot.hasUnpiped=!0,ve())}function ie(){l("onend"),oe.end()}var ce=le(Se);oe.on("drain",ce);var ue=!1;function ve(){l("cleanup"),oe.removeListener("close",Me),oe.removeListener("finish",Le),oe.removeListener("drain",ce),oe.removeListener("error",Re),oe.removeListener("unpipe",K),Se.removeListener("end",ie),Se.removeListener("end",We),Se.removeListener("data",be),ue=!0,we.awaitDrain&&(!oe._writableState||oe._writableState.needDrain)&&ce()}Se.on("data",be);function be(tt){l("ondata");var ot=oe.write(tt);l("dest.write",ot),ot===!1&&((we.pipesCount===1&&we.pipes===oe||we.pipesCount>1&&pe(we.pipes,oe)!==-1)&&!ue&&(l("false write response, pause",we.awaitDrain),we.awaitDrain++),Se.pause())}function Re(tt){l("onerror",tt),We(),oe.removeListener("error",Re),t(oe,"error")===0&&C(oe,tt)}E(oe,"error",Re);function Me(){oe.removeListener("finish",Le),We()}oe.once("close",Me);function Le(){l("onfinish"),oe.removeListener("close",Me),We()}oe.once("finish",Le);function We(){l("unpipe"),Se.unpipe(oe)}return oe.emit("pipe",Se),we.flowing||(l("pipe resume"),Se.resume()),oe};function le(oe){return function(){var Se=oe._readableState;l("pipeOnDrain",Se.awaitDrain),Se.awaitDrain&&Se.awaitDrain--,Se.awaitDrain===0&&t(oe,"data")&&(Se.flowing=!0,ne(oe))}}T.prototype.unpipe=function(oe){var J=this._readableState,Se={hasUnpiped:!1};if(J.pipesCount===0)return this;if(J.pipesCount===1)return oe&&oe!==J.pipes?this:(oe||(oe=J.pipes),J.pipes=null,J.pipesCount=0,J.flowing=!1,oe&&oe.emit("unpipe",this,Se),this);if(!oe){var we=J.pipes,ke=J.pipesCount;J.pipes=null,J.pipesCount=0,J.flowing=!1;for(var me=0;me<ke;me++)we[me].emit("unpipe",this,{hasUnpiped:!1});return this}var K=pe(J.pipes,oe);return K===-1?this:(J.pipes.splice(K,1),J.pipesCount-=1,J.pipesCount===1&&(J.pipes=J.pipes[0]),oe.emit("unpipe",this,Se),this)},T.prototype.on=function(oe,J){var Se=n.prototype.on.call(this,oe,J),we=this._readableState;return oe==="data"?(we.readableListening=this.listenerCount("readable")>0,we.flowing!==!1&&this.resume()):oe==="readable"&&!we.endEmitted&&!we.readableListening&&(we.readableListening=we.needReadable=!0,we.flowing=!1,we.emittedReadable=!1,l("on readable",we.length,we.reading),we.length?V(this):we.reading||Yn.nextTick(q,this)),Se},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(oe,J){var Se=n.prototype.removeListener.call(this,oe,J);return oe==="readable"&&Yn.nextTick(H,this),Se},T.prototype.removeAllListeners=function(oe){var J=n.prototype.removeAllListeners.apply(this,arguments);return(oe==="readable"||oe===void 0)&&Yn.nextTick(H,this),J};function H(oe){var J=oe._readableState;J.readableListening=oe.listenerCount("readable")>0,J.resumeScheduled&&!J.paused?J.flowing=!0:oe.listenerCount("data")>0&&oe.resume()}function q(oe){l("readable nexttick read 0"),oe.read(0)}T.prototype.resume=function(){var oe=this._readableState;return oe.flowing||(l("resume"),oe.flowing=!oe.readableListening,W(this,oe)),oe.paused=!1,this};function W(oe,J){J.resumeScheduled||(J.resumeScheduled=!0,Yn.nextTick(te,oe,J))}function te(oe,J){l("resume",J.reading),J.reading||oe.read(0),J.resumeScheduled=!1,oe.emit("resume"),ne(oe),J.flowing&&!J.reading&&oe.read(0)}T.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function ne(oe){var J=oe._readableState;for(l("flow",J.flowing);J.flowing&&oe.read()!==null;);}T.prototype.wrap=function(oe){var J=this,Se=this._readableState,we=!1;oe.on("end",function(){if(l("wrapped end"),Se.decoder&&!Se.ended){var K=Se.decoder.end();K&&K.length&&J.push(K)}J.push(null)}),oe.on("data",function(K){if(l("wrapped data"),Se.decoder&&(K=Se.decoder.write(K)),!(Se.objectMode&&K==null)&&!(!Se.objectMode&&(!K||!K.length))){var ie=J.push(K);ie||(we=!0,oe.pause())}});for(var ke in oe)this[ke]===void 0&&typeof oe[ke]=="function"&&(this[ke]=(function(ie){return function(){return oe[ie].apply(oe,arguments)}})(ke));for(var me=0;me<N.length;me++)oe.on(N[me],this.emit.bind(this,N[me]));return this._read=function(K){l("wrapped _read",K),we&&(we=!1,oe.resume())},this},typeof Symbol=="function"&&(T.prototype[Symbol.asyncIterator]=function(){return k===void 0&&(k=$2n()),k(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(J){this._readableState&&(this._readableState.flowing=J)}}),T._fromList=re,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function re(oe,J){if(J.length===0)return null;var Se;return J.objectMode?Se=J.buffer.shift():!oe||oe>=J.length?(J.decoder?Se=J.buffer.join(""):J.buffer.length===1?Se=J.buffer.first():Se=J.buffer.concat(J.length),J.buffer.clear()):Se=J.buffer.consume(oe,J.decoder),Se}function de(oe){var J=oe._readableState;l("endReadable",J.endEmitted),J.endEmitted||(J.ended=!0,Yn.nextTick(he,J,oe))}function he(oe,J){if(l("endReadableNT",oe.endEmitted,oe.length),!oe.endEmitted&&oe.length===0&&(oe.endEmitted=!0,J.readable=!1,J.emit("end"),oe.autoDestroy)){var Se=J._writableState;(!Se||Se.autoDestroy&&Se.finished)&&J.destroy()}}typeof Symbol=="function"&&(T.from=function(oe,J){return S===void 0&&(S=L2n()),S(T,oe,J)});function pe(oe,J){for(var Se=0,we=oe.length;Se<we;Se++)if(oe[Se]===J)return Se;return-1}return LQ}var UQ,WNe;function Fet(){if(WNe)return UQ;WNe=1,UQ=s;var e=IC().codes,t=e.ERR_METHOD_NOT_IMPLEMENTED,n=e.ERR_MULTIPLE_CALLBACK,r=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=e.ERR_TRANSFORM_WITH_LENGTH_0,a=DS();h1()(s,a);function o(u,f){var h=this._transformState;h.transforming=!1;var m=h.writecb;if(m===null)return this.emit("error",new n);h.writechunk=null,h.writecb=null,f!=null&&this.push(f),m(u);var p=this._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}function s(u){if(!(this instanceof s))return new s(u);a.call(this,u),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",l)}function l(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(f,h){c(u,f,h)}):c(this,null,null)}s.prototype.push=function(u,f){return this._transformState.needTransform=!1,a.prototype.push.call(this,u,f)},s.prototype._transform=function(u,f,h){h(new t("_transform()"))},s.prototype._write=function(u,f,h){var m=this._transformState;if(m.writecb=h,m.writechunk=u,m.writeencoding=f,!m.transforming){var p=this._readableState;(m.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},s.prototype._read=function(u){var f=this._transformState;f.writechunk!==null&&!f.transforming?(f.transforming=!0,this._transform(f.writechunk,f.writeencoding,f.afterTransform)):f.needTransform=!0},s.prototype._destroy=function(u,f){a.prototype._destroy.call(this,u,function(h){f(h)})};function c(u,f,h){if(f)return u.emit("error",f);if(h!=null&&u.push(h),u._writableState.length)throw new i;if(u._transformState.transforming)throw new r;return u.push(null)}return UQ}var zQ,KNe;function U2n(){if(KNe)return zQ;KNe=1,zQ=t;var e=Fet();h1()(t,e);function t(n){if(!(this instanceof t))return new t(n);e.call(this,n)}return t.prototype._transform=function(n,r,i){i(null,n)},zQ}var HQ,YNe;function z2n(){if(YNe)return HQ;YNe=1;var e;function t(h){var m=!1;return function(){m||(m=!0,h.apply(void 0,arguments))}}var n=IC().codes,r=n.ERR_MISSING_ARGS,i=n.ERR_STREAM_DESTROYED;function a(h){if(h)throw h}function o(h){return h.setHeader&&typeof h.abort=="function"}function s(h,m,p,A){A=t(A);var v=!1;h.on("close",function(){v=!0}),e===void 0&&(e=Jse()),e(h,{readable:m,writable:p},function(x){if(x)return A(x);v=!0,A()});var y=!1;return function(x){if(!v&&!y){if(y=!0,o(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();A(x||new i("pipe"))}}}function l(h){h()}function c(h,m){return h.pipe(m)}function u(h){return!h.length||typeof h[h.length-1]!="function"?a:h.pop()}function f(){for(var h=arguments.length,m=new Array(h),p=0;p<h;p++)m[p]=arguments[p];var A=u(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new r("streams");var v,y=m.map(function(x,k){var S=k<m.length-1,C=k>0;return s(x,S,C,function(N){v||(v=N),N&&y.forEach(l),!S&&(y.forEach(l),A(v))})});return m.reduce(c)}return HQ=f,HQ}var VQ,XNe;function H2n(){if(XNe)return VQ;XNe=1,VQ=n;var e=Zse().EventEmitter,t=h1();t(n,e),n.Readable=Eet(),n.Writable=Net(),n.Duplex=DS(),n.Transform=Fet(),n.PassThrough=U2n(),n.finished=Jse(),n.pipeline=z2n(),n.Stream=n;function n(){e.call(this)}return n.prototype.pipe=function(r,i){var a=this;function o(m){r.writable&&r.write(m)===!1&&a.pause&&a.pause()}a.on("data",o);function s(){a.readable&&a.resume&&a.resume()}r.on("drain",s),!r._isStdio&&(!i||i.end!==!1)&&(a.on("end",c),a.on("close",u));var l=!1;function c(){l||(l=!0,r.end())}function u(){l||(l=!0,typeof r.destroy=="function"&&r.destroy())}function f(m){if(h(),e.listenerCount(this,"error")===0)throw m}a.on("error",f),r.on("error",f);function h(){a.removeListener("data",o),r.removeListener("drain",s),a.removeListener("end",c),a.removeListener("close",u),a.removeListener("error",f),r.removeListener("error",f),a.removeListener("end",h),a.removeListener("close",h),r.removeListener("close",h)}return a.on("end",h),a.on("close",h),r.on("close",h),r.emit("pipe",a),r},VQ}var ZNe;function V2n(){return ZNe||(ZNe=1,(function(e){var t=a0().Buffer,n=h2n(),r=xet(),i=e.exports;i.encodings=null,i.defaultCharUnicode="�",i.defaultCharSingleByte="?",i.encode=function(s,l,c){s=""+(s||"");var u=i.getEncoder(l,c),f=u.write(s),h=u.end();return h&&h.length>0?t.concat([f,h]):f},i.decode=function(s,l,c){typeof s=="string"&&(i.skipDecodeWarning||(console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding"),i.skipDecodeWarning=!0),s=t.from(""+(s||""),"binary"));var u=i.getDecoder(l,c),f=u.write(s),h=u.end();return h?f+h:f},i.encodingExists=function(s){try{return i.getCodec(s),!0}catch{return!1}},i.toEncoding=i.encode,i.fromEncoding=i.decode,i._codecDataCache={__proto__:null},i.getCodec=function(s){if(!i.encodings){var l=T2n();i.encodings={__proto__:null},r(i.encodings,l)}for(var c=i._canonicalizeEncoding(s),u={};;){var f=i._codecDataCache[c];if(f)return f;var h=i.encodings[c];switch(typeof h){case"string":c=h;break;case"object":for(var m in h)u[m]=h[m];u.encodingName||(u.encodingName=c),c=h.type;break;case"function":return u.encodingName||(u.encodingName=c),f=new h(u,i),i._codecDataCache[u.encodingName]=f,f;default:throw new Error("Encoding not recognized: '"+s+"' (searched as: '"+c+"')")}}},i._canonicalizeEncoding=function(o){return(""+o).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g,"")},i.getEncoder=function(s,l){var c=i.getCodec(s),u=new c.encoder(l,c);return c.bomAware&&l&&l.addBOM&&(u=new n.PrependBOM(u,l)),u},i.getDecoder=function(s,l){var c=i.getCodec(s),u=new c.decoder(l,c);return c.bomAware&&!(l&&l.stripBOM===!1)&&(u=new n.StripBOM(u,l)),u},i.enableStreamingAPI=function(s){if(!i.supportsStreams){var l=O2n()(s);i.IconvLiteEncoderStream=l.IconvLiteEncoderStream,i.IconvLiteDecoderStream=l.IconvLiteDecoderStream,i.encodeStream=function(u,f){return new i.IconvLiteEncoderStream(i.getEncoder(u,f),f)},i.decodeStream=function(u,f){return new i.IconvLiteDecoderStream(i.getDecoder(u,f),f)},i.supportsStreams=!0}};var a;try{a=H2n()}catch{}a&&a.Transform?i.enableStreamingAPI(a):i.encodeStream=i.decodeStream=function(){throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.")}})(uQ)),uQ.exports}var Q2n=V2n();const JNe=Fi(Q2n);function Det({open:e,onOpenChange:t}){const n=Sne(new Date),r=Rt(w3(n),"yyyy-MM-dd"),i=Rt(U3e(n),"yyyy-MM-dd"),[a,o]=w.useState(r),[s,l]=w.useState(i),[c,u]=w.useState(!1),[f,h]=w.useState(""),[m,p]=rn({pause:!0,query:ZEt,variables:{fromDate:a,toDate:s}});w.useEffect(()=>{if(c&&!m.fetching){if(m.error){h("Failed to fetch uniform format data. Please try again."),console.error("GraphQL error:",m.error),u(!1);return}if(m.data?.uniformFormat){const{bkmvdata:y,ini:x}=m.data.uniformFormat;if(!y||!x){h("Incomplete data received from the server. Please try again."),u(!1);return}const k=new File([new Uint8Array(JNe.encode(y,"ISO-8859-8"))],"bkmvdata.txt",{type:"text/plain"}),S=new File([new Uint8Array(JNe.encode(x,"ISO-8859-8"))],"ini.txt",{type:"text/plain"});VY(S),setTimeout(()=>VY(k),100),t(!1),o(r),l(i),u(!1)}else m.stale&&!m.data?.uniformFormat&&(h("No data returned from the server. Please try again."),u(!1))}},[m,c,a,s,r,i,t]);const A=async y=>{if(y.preventDefault(),h(""),!a||!s){h("Please select both from and to dates");return}const x=new Date(a),k=new Date(s);if(x>=k){h("From date must be before to date");return}if(k>new Date){h("To date cannot be in the future");return}u(!0);try{p({requestPolicy:"network-only"})}catch(S){h("Failed to generate files. Please try again."),console.error("Error generating files:",S),u(!1)}},v=y=>{c||(t(y),y||(o(r),l(i),h("")))};return d.jsx(Ra,{open:e,onOpenChange:v,children:d.jsxs($a,{className:"sm:max-w-md",children:[d.jsxs(fs,{children:[d.jsxs(hs,{className:"flex items-center gap-2",children:[d.jsx(iS,{className:"h-5 w-5"}),"Generate Uniform Files"]}),d.jsx(OHe,{children:"Select the date range to generate and download uniform files."})]}),d.jsxs("form",{onSubmit:A,className:"space-y-4",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsx(Mn,{htmlFor:"from-date",children:"From Date"}),d.jsx(Cn,{id:"from-date",type:"date",value:a,onChange:y=>o(y.target.value),disabled:c,required:!0})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsx(Mn,{htmlFor:"to-date",children:"To Date"}),d.jsx(Cn,{id:"to-date",type:"date",value:s,onChange:y=>l(y.target.value),disabled:c,required:!0})]})]}),f&&d.jsx("div",{className:"text-sm text-red-600 bg-red-50 p-3 rounded-md",children:f}),d.jsxs(Hy,{className:"gap-2",children:[d.jsx(qe,{type:"button",variant:"outline",onClick:()=>v(!1),disabled:c,children:"Cancel"}),d.jsx(qe,{type:"submit",disabled:c,className:"gap-2",children:c?d.jsxs(d.Fragment,{children:[d.jsx(si,{className:"h-4 w-4 animate-spin"}),"Generating..."]}):d.jsxs(d.Fragment,{children:[d.jsx(_ne,{className:"h-4 w-4"}),"Generate & Download"]})})]})]})]})})}function q2n({...e}){return d.jsx(rL,{"data-slot":"sheet",...e})}function G2n({...e}){return d.jsx(Qie,{"data-slot":"sheet-trigger",...e})}function W2n({...e}){return d.jsx(iL,{"data-slot":"sheet-portal",...e})}function K2n({className:e,...t}){return d.jsx(aL,{"data-slot":"sheet-overlay",className:St("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-1001 bg-black/50",e),...t})}function Y2n({className:e,children:t,side:n="right",...r}){return d.jsxs(W2n,{children:[d.jsx(K2n,{}),d.jsxs(oL,{"data-slot":"sheet-content",className:St("bg-white data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-1001 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 dark:bg-gray-950",n==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",n==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",n==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",n==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...r,children:[t,d.jsxs(THe,{className:"ring-offset-white focus:ring-gray-950 data-[state=open]:bg-gray-100 absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none dark:ring-offset-gray-950 dark:focus:ring-gray-300 dark:data-[state=open]:bg-gray-800",children:[d.jsx(Gx,{className:"size-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}var a8="Collapsible",[X2n,Tet]=Ac(a8),[Z2n,ele]=X2n(a8),Oet=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[l,c]=Cd({prop:r,defaultProp:i??!1,onChange:o,caller:a8});return d.jsx(Z2n,{scope:n,disabled:a,contentId:Ns(),open:l,onOpenToggle:w.useCallback(()=>c(u=>!u),[c]),children:d.jsx(wn.div,{"data-state":ile(l),"data-disabled":a?"":void 0,...s,ref:t})})});Oet.displayName=a8;var Bet="CollapsibleTrigger",tle=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=ele(Bet,n);return d.jsx(wn.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":ile(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:ln(e.onClick,i.onOpenToggle)})});tle.displayName=Bet;var nle="CollapsibleContent",rle=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=ele(nle,e.__scopeCollapsible);return d.jsx(Ws,{present:n||i.open,children:({present:a})=>d.jsx(J2n,{...r,ref:t,present:a})})});rle.displayName=nle;var J2n=w.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...a}=e,o=ele(nle,n),[s,l]=w.useState(r),c=w.useRef(null),u=Vr(t,c),f=w.useRef(0),h=f.current,m=w.useRef(0),p=m.current,A=o.open||s,v=w.useRef(A),y=w.useRef(void 0);return w.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),cs(()=>{const x=c.current;if(x){y.current=y.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const k=x.getBoundingClientRect();f.current=k.height,m.current=k.width,v.current||(x.style.transitionDuration=y.current.transitionDuration,x.style.animationName=y.current.animationName),l(r)}},[o.open,r]),d.jsx(wn.div,{"data-state":ile(o.open),"data-disabled":o.disabled?"":void 0,id:o.contentId,hidden:!A,...a,ref:u,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...e.style},children:A&&i})});function ile(e){return e?"open":"closed"}var Iet=Oet,eEn=tle,tEn=rle;function nEn({...e}){return d.jsx(Iet,{"data-slot":"collapsible",...e})}function rEn({...e}){return d.jsx(tle,{"data-slot":"collapsible-trigger",...e})}function iEn({...e}){return d.jsx(rle,{"data-slot":"collapsible-content",...e})}var yJ=["Enter"," "],aEn=["ArrowDown","PageUp","Home"],jet=["ArrowUp","PageDown","End"],oEn=[...aEn,...jet],sEn={ltr:[...yJ,"ArrowRight"],rtl:[...yJ,"ArrowLeft"]},lEn={ltr:["ArrowLeft"],rtl:["ArrowRight"]},_T="Menu",[cF,cEn,uEn]=RL(_T),[m1,Pet]=Ac(_T,[uEn,Qy,f6]),o8=Qy(),Met=f6(),[dEn,p1]=m1(_T),[fEn,NT]=m1(_T),Ret=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=o8(t),[l,c]=w.useState(null),u=w.useRef(!1),f=cl(a),h=CC(i);return w.useEffect(()=>{const m=()=>{u.current=!0,document.addEventListener("pointerdown",p,{capture:!0,once:!0}),document.addEventListener("pointermove",p,{capture:!0,once:!0})},p=()=>u.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",p,{capture:!0}),document.removeEventListener("pointermove",p,{capture:!0})}},[]),d.jsx(hL,{...s,children:d.jsx(dEn,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:c,children:d.jsx(fEn,{scope:t,onClose:w.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:h,modal:o,children:r})})})};Ret.displayName=_T;var hEn="MenuAnchor",ale=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=o8(n);return d.jsx(jD,{...i,...r,ref:t})});ale.displayName=hEn;var ole="MenuPortal",[mEn,$et]=m1(ole,{forceMount:void 0}),Let=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=p1(ole,t);return d.jsx(mEn,{scope:t,forceMount:n,children:d.jsx(Ws,{present:n||a.open,children:d.jsx(xC,{asChild:!0,container:i,children:r})})})};Let.displayName=ole;var Df="MenuContent",[pEn,sle]=m1(Df),Uet=w.forwardRef((e,t)=>{const n=$et(Df,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=p1(Df,e.__scopeMenu),o=NT(Df,e.__scopeMenu);return d.jsx(cF.Provider,{scope:e.__scopeMenu,children:d.jsx(Ws,{present:r||a.open,children:d.jsx(cF.Slot,{scope:e.__scopeMenu,children:o.modal?d.jsx(AEn,{...i,ref:t}):d.jsx(gEn,{...i,ref:t})})})})}),AEn=w.forwardRef((e,t)=>{const n=p1(Df,e.__scopeMenu),r=w.useRef(null),i=Vr(t,r);return w.useEffect(()=>{const a=r.current;if(a)return c3(a)},[]),d.jsx(lle,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:ln(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),gEn=w.forwardRef((e,t)=>{const n=p1(Df,e.__scopeMenu);return d.jsx(lle,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),vEn=by("MenuContent.ScrollLock"),lle=w.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:m,disableOutsideScroll:p,...A}=e,v=p1(Df,n),y=NT(Df,n),x=o8(n),k=Met(n),S=cEn(n),[C,N]=w.useState(null),E=w.useRef(null),D=Vr(t,E,v.onContentChange),T=w.useRef(0),j=w.useRef(""),O=w.useRef(0),B=w.useRef(null),M=w.useRef("right"),$=w.useRef(0),U=p?rC:w.Fragment,P=p?{as:vEn,allowPinchZoom:!0}:void 0,V=X=>{const Z=j.current+X,le=S().filter(re=>!re.disabled),H=document.activeElement,q=le.find(re=>re.ref.current===H)?.textValue,W=le.map(re=>re.textValue),te=DEn(W,Z,q),ne=le.find(re=>re.textValue===te)?.ref.current;(function re(de){j.current=de,window.clearTimeout(T.current),de!==""&&(T.current=window.setTimeout(()=>re(""),1e3))})(Z),ne&&setTimeout(()=>ne.focus())};w.useEffect(()=>()=>window.clearTimeout(T.current),[]),tL();const Q=w.useCallback(X=>M.current===B.current?.side&&OEn(X,B.current?.area),[]);return d.jsx(pEn,{scope:n,searchRef:j,onItemEnter:w.useCallback(X=>{Q(X)&&X.preventDefault()},[Q]),onItemLeave:w.useCallback(X=>{Q(X)||(E.current?.focus(),N(null))},[Q]),onTriggerLeave:w.useCallback(X=>{Q(X)&&X.preventDefault()},[Q]),pointerGraceTimerRef:O,onPointerGraceIntentChange:w.useCallback(X=>{B.current=X},[]),children:d.jsx(U,{...P,children:d.jsx(TD,{asChild:!0,trapped:i,onMountAutoFocus:ln(a,X=>{X.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:d.jsx(bC,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:d.jsx(lYe,{asChild:!0,...k,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:N,onEntryFocus:ln(l,X=>{y.isUsingKeyboardRef.current||X.preventDefault()}),preventScrollOnEntryFocus:!0,children:d.jsx(mL,{role:"menu","aria-orientation":"vertical","data-state":rtt(v.open),"data-radix-menu-content":"",dir:y.dir,...x,...A,ref:D,style:{outline:"none",...A.style},onKeyDown:ln(A.onKeyDown,X=>{const le=X.target.closest("[data-radix-menu-content]")===X.currentTarget,H=X.ctrlKey||X.altKey||X.metaKey,q=X.key.length===1;le&&(X.key==="Tab"&&X.preventDefault(),!H&&q&&V(X.key));const W=E.current;if(X.target!==W||!oEn.includes(X.key))return;X.preventDefault();const ne=S().filter(re=>!re.disabled).map(re=>re.ref.current);jet.includes(X.key)&&ne.reverse(),EEn(ne)}),onBlur:ln(e.onBlur,X=>{X.currentTarget.contains(X.target)||(window.clearTimeout(T.current),j.current="")}),onPointerMove:ln(e.onPointerMove,uF(X=>{const Z=X.target,le=$.current!==X.clientX;if(X.currentTarget.contains(Z)&&le){const H=X.clientX>$.current?"right":"left";M.current=H,$.current=X.clientX}}))})})})})})})});Uet.displayName=Df;var yEn="MenuGroup",cle=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(wn.div,{role:"group",...r,ref:t})});cle.displayName=yEn;var bEn="MenuLabel",zet=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(wn.div,{...r,ref:t})});zet.displayName=bEn;var KR="MenuItem",e2e="menu.itemSelect",s8=w.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,a=w.useRef(null),o=NT(KR,e.__scopeMenu),s=sle(KR,e.__scopeMenu),l=Vr(t,a),c=w.useRef(!1),u=()=>{const f=a.current;if(!n&&f){const h=new CustomEvent(e2e,{bubbles:!0,cancelable:!0});f.addEventListener(e2e,m=>r?.(m),{once:!0}),NLe(f,h),h.defaultPrevented?c.current=!1:o.onClose()}};return d.jsx(Het,{...i,ref:l,disabled:n,onClick:ln(e.onClick,u),onPointerDown:f=>{e.onPointerDown?.(f),c.current=!0},onPointerUp:ln(e.onPointerUp,f=>{c.current||f.currentTarget?.click()}),onKeyDown:ln(e.onKeyDown,f=>{const h=s.searchRef.current!=="";n||h&&f.key===" "||yJ.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});s8.displayName=KR;var Het=w.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=sle(KR,n),s=Met(n),l=w.useRef(null),c=Vr(t,l),[u,f]=w.useState(!1),[h,m]=w.useState("");return w.useEffect(()=>{const p=l.current;p&&m((p.textContent??"").trim())},[a.children]),d.jsx(cF.ItemSlot,{scope:n,disabled:r,textValue:i??h,children:d.jsx(cYe,{asChild:!0,...s,focusable:!r,children:d.jsx(wn.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:c,onPointerMove:ln(e.onPointerMove,uF(p=>{r?o.onItemLeave(p):(o.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:ln(e.onPointerLeave,uF(p=>o.onItemLeave(p))),onFocus:ln(e.onFocus,()=>f(!0)),onBlur:ln(e.onBlur,()=>f(!1))})})})}),xEn="MenuCheckboxItem",Vet=w.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return d.jsx(Ket,{scope:e.__scopeMenu,checked:n,children:d.jsx(s8,{role:"menuitemcheckbox","aria-checked":YR(n)?"mixed":n,...i,ref:t,"data-state":dle(n),onSelect:ln(i.onSelect,()=>r?.(YR(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Vet.displayName=xEn;var Qet="MenuRadioGroup",[wEn,kEn]=m1(Qet,{value:void 0,onValueChange:()=>{}}),qet=w.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,a=cl(r);return d.jsx(wEn,{scope:e.__scopeMenu,value:n,onValueChange:a,children:d.jsx(cle,{...i,ref:t})})});qet.displayName=Qet;var Get="MenuRadioItem",Wet=w.forwardRef((e,t)=>{const{value:n,...r}=e,i=kEn(Get,e.__scopeMenu),a=n===i.value;return d.jsx(Ket,{scope:e.__scopeMenu,checked:a,children:d.jsx(s8,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":dle(a),onSelect:ln(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Wet.displayName=Get;var ule="MenuItemIndicator",[Ket,SEn]=m1(ule,{checked:!1}),Yet=w.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,a=SEn(ule,n);return d.jsx(Ws,{present:r||YR(a.checked)||a.checked===!0,children:d.jsx(wn.span,{...i,ref:t,"data-state":dle(a.checked)})})});Yet.displayName=ule;var CEn="MenuSeparator",Xet=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(wn.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Xet.displayName=CEn;var _En="MenuArrow",Zet=w.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=o8(n);return d.jsx(pL,{...i,...r,ref:t})});Zet.displayName=_En;var NEn="MenuSub",[oKn,Jet]=m1(NEn),c2="MenuSubTrigger",ett=w.forwardRef((e,t)=>{const n=p1(c2,e.__scopeMenu),r=NT(c2,e.__scopeMenu),i=Jet(c2,e.__scopeMenu),a=sle(c2,e.__scopeMenu),o=w.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=a,c={__scopeMenu:e.__scopeMenu},u=w.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return w.useEffect(()=>u,[u]),w.useEffect(()=>{const f=s.current;return()=>{window.clearTimeout(f),l(null)}},[s,l]),d.jsx(ale,{asChild:!0,...c,children:d.jsx(Het,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":rtt(n.open),...e,ref:fg(t,i.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:ln(e.onPointerMove,uF(f=>{a.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:ln(e.onPointerLeave,uF(f=>{u();const h=n.content?.getBoundingClientRect();if(h){const m=n.content?.dataset.side,p=m==="right",A=p?-5:5,v=h[p?"left":"right"],y=h[p?"right":"left"];a.onPointerGraceIntentChange({area:[{x:f.clientX+A,y:f.clientY},{x:v,y:h.top},{x:y,y:h.top},{x:y,y:h.bottom},{x:v,y:h.bottom}],side:m}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(f),f.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:ln(e.onKeyDown,f=>{const h=a.searchRef.current!=="";e.disabled||h&&f.key===" "||sEn[r.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});ett.displayName=c2;var ttt="MenuSubContent",ntt=w.forwardRef((e,t)=>{const n=$et(Df,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=p1(Df,e.__scopeMenu),o=NT(Df,e.__scopeMenu),s=Jet(ttt,e.__scopeMenu),l=w.useRef(null),c=Vr(t,l);return d.jsx(cF.Provider,{scope:e.__scopeMenu,children:d.jsx(Ws,{present:r||a.open,children:d.jsx(cF.Slot,{scope:e.__scopeMenu,children:d.jsx(lle,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:c,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{o.isUsingKeyboardRef.current&&l.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:ln(e.onFocusOutside,u=>{u.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:ln(e.onEscapeKeyDown,u=>{o.onClose(),u.preventDefault()}),onKeyDown:ln(e.onKeyDown,u=>{const f=u.currentTarget.contains(u.target),h=lEn[o.dir].includes(u.key);f&&h&&(a.onOpenChange(!1),s.trigger?.focus(),u.preventDefault())})})})})})});ntt.displayName=ttt;function rtt(e){return e?"open":"closed"}function YR(e){return e==="indeterminate"}function dle(e){return YR(e)?"indeterminate":e?"checked":"unchecked"}function EEn(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function FEn(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function DEn(e,t,n){const i=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let o=FEn(e,Math.max(a,0));i.length===1&&(o=o.filter(c=>c!==n));const l=o.find(c=>c.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function TEn(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const s=t[a],l=t[o],c=s.x,u=s.y,f=l.x,h=l.y;u>r!=h>r&&n<(f-c)*(r-u)/(h-u)+c&&(i=!i)}return i}function OEn(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return TEn(n,t)}function uF(e){return t=>t.pointerType==="mouse"?e(t):void 0}var BEn=Ret,IEn=ale,jEn=Let,PEn=Uet,MEn=cle,REn=zet,$En=s8,LEn=Vet,UEn=qet,zEn=Wet,HEn=Yet,VEn=Xet,QEn=Zet,qEn=ett,GEn=ntt,l8="DropdownMenu",[WEn]=Ac(l8,[Pet]),qc=Pet(),[KEn,itt]=WEn(l8),att=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,l=qc(t),c=w.useRef(null),[u,f]=Cd({prop:i,defaultProp:a??!1,onChange:o,caller:l8});return d.jsx(KEn,{scope:t,triggerId:Ns(),triggerRef:c,contentId:Ns(),open:u,onOpenChange:f,onOpenToggle:w.useCallback(()=>f(h=>!h),[f]),modal:s,children:d.jsx(BEn,{...l,open:u,onOpenChange:f,dir:r,modal:s,children:n})})};att.displayName=l8;var ott="DropdownMenuTrigger",stt=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=itt(ott,n),o=qc(n);return d.jsx(IEn,{asChild:!0,...o,children:d.jsx(wn.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:fg(t,a.triggerRef),onPointerDown:ln(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:ln(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});stt.displayName=ott;var YEn="DropdownMenuPortal",ltt=e=>{const{__scopeDropdownMenu:t,...n}=e,r=qc(t);return d.jsx(jEn,{...r,...n})};ltt.displayName=YEn;var ctt="DropdownMenuContent",utt=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=itt(ctt,n),a=qc(n),o=w.useRef(!1);return d.jsx(PEn,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:ln(e.onCloseAutoFocus,s=>{o.current||i.triggerRef.current?.focus(),o.current=!1,s.preventDefault()}),onInteractOutside:ln(e.onInteractOutside,s=>{const l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;(!i.modal||u)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});utt.displayName=ctt;var XEn="DropdownMenuGroup",dtt=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx(MEn,{...i,...r,ref:t})});dtt.displayName=XEn;var ZEn="DropdownMenuLabel",ftt=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx(REn,{...i,...r,ref:t})});ftt.displayName=ZEn;var JEn="DropdownMenuItem",htt=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx($En,{...i,...r,ref:t})});htt.displayName=JEn;var eFn="DropdownMenuCheckboxItem",mtt=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx(LEn,{...i,...r,ref:t})});mtt.displayName=eFn;var tFn="DropdownMenuRadioGroup",nFn=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx(UEn,{...i,...r,ref:t})});nFn.displayName=tFn;var rFn="DropdownMenuRadioItem",iFn=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx(zEn,{...i,...r,ref:t})});iFn.displayName=rFn;var aFn="DropdownMenuItemIndicator",ptt=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx(HEn,{...i,...r,ref:t})});ptt.displayName=aFn;var oFn="DropdownMenuSeparator",Att=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx(VEn,{...i,...r,ref:t})});Att.displayName=oFn;var sFn="DropdownMenuArrow",lFn=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx(QEn,{...i,...r,ref:t})});lFn.displayName=sFn;var cFn="DropdownMenuSubTrigger",uFn=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx(qEn,{...i,...r,ref:t})});uFn.displayName=cFn;var dFn="DropdownMenuSubContent",fFn=w.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=qc(n);return d.jsx(GEn,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});fFn.displayName=dFn;var hFn=att,mFn=stt,pFn=ltt,AFn=utt,gFn=dtt,vFn=ftt,yFn=htt,bFn=mtt,xFn=ptt,wFn=Att;function ET({...e}){return d.jsx(hFn,{"data-slot":"dropdown-menu",...e})}function FT({...e}){return d.jsx(mFn,{"data-slot":"dropdown-menu-trigger",...e})}function DT({className:e,sideOffset:t=4,...n}){return d.jsx(pFn,{children:d.jsx(AFn,{"data-slot":"dropdown-menu-content",sideOffset:t,className:St("bg-white text-gray-950 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 z-1001 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-gray-200 p-1 shadow-md dark:bg-gray-950 dark:text-gray-50 dark:border-gray-800",e),...n})})}function kFn({...e}){return d.jsx(gFn,{"data-slot":"dropdown-menu-group",...e})}function rg({className:e,inset:t,variant:n="default",...r}){return d.jsx(yFn,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:St("focus:bg-gray-100 focus:text-gray-900 data-[variant=destructive]:text-red-500 data-[variant=destructive]:focus:bg-red-500/10 dark:data-[variant=destructive]:focus:bg-red-500/20 data-[variant=destructive]:focus:text-red-500 data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-gray-500 relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:focus:bg-gray-800 dark:focus:text-gray-50 dark:data-[variant=destructive]:text-red-900 dark:data-[variant=destructive]:focus:bg-red-900/10 dark:dark:data-[variant=destructive]:focus:bg-red-900/20 dark:data-[variant=destructive]:focus:text-red-900 dark:[&_svg:not([class*='text-'])]:text-gray-400",e),...r})}function SFn({className:e,children:t,checked:n,...r}){return d.jsxs(bFn,{"data-slot":"dropdown-menu-checkbox-item",className:St("focus:bg-gray-100 focus:text-gray-900 relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 dark:focus:bg-gray-800 dark:focus:text-gray-50",e),checked:n,...r,children:[d.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:d.jsx(xFn,{children:d.jsx(Ds,{className:"size-4"})})}),t]})}function fle({className:e,inset:t,...n}){return d.jsx(vFn,{"data-slot":"dropdown-menu-label","data-inset":t,className:St("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...n})}function hle({className:e,...t}){return d.jsx(wFn,{"data-slot":"dropdown-menu-separator",className:St("bg-gray-200 -mx-1 my-1 h-px dark:bg-gray-800",e),...t})}function t2e({className:e,...t}){return d.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:St("text-gray-500 ml-auto text-xs tracking-widest dark:text-gray-400",e),...t})}function gtt({links:e,isCollapsed:t,closeNav:n}){const r=({sub:i,...a})=>{const o=`${a.title}-${a.href}`;return t&&i?w.createElement(NFn,{...a,sub:i,key:o,closeNav:n}):t?w.createElement(_Fn,{...a,key:o,closeNav:n}):i?w.createElement(CFn,{...a,sub:i,key:o,closeNav:n}):w.createElement(vtt,{...a,key:o,closeNav:n})};return d.jsx(YKe,{className:"h-screen pb-40",children:d.jsx(vL,{delayDuration:0,children:d.jsx("nav",{className:"grid grid-cols-1 items-start gap-2",children:e.map(r)})})})}function vtt({title:e,icon:t,label:n,href:r,action:i,closeNav:a,subLink:o=!1}){return i?d.jsxs("button",{onClick:()=>{i(),a()},className:St(hg({variant:"ghost",size:"sm"}),"h-12 font-semibold tracking-tight justify-start text-wrap rounded-none px-6 w-full",o&&"h-10 w-full border-l border-l-slate-500 px-2"),children:[d.jsx("div",{className:"mr-2",children:t}),e,n&&d.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:n})]}):d.jsxs(eC,{to:r,onClick:a,className:St(hg({variant:"ghost",size:"sm"}),"h-12 font-semibold tracking-tight justify-start text-wrap rounded-none px-6",o&&"h-10 w-full border-l border-l-slate-500 px-2"),"aria-current":"page",children:[d.jsx("div",{className:"mr-2",children:t}),e,n&&d.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:n})]})}function CFn({title:e,icon:t,label:n,sub:r,closeNav:i}){const a=!!r?.find(o=>o.href===window.location.pathname);return d.jsxs(nEn,{defaultOpen:a,children:[d.jsxs(rEn,{className:St(hg({variant:"ghost",size:"sm"}),"group h-12 w-full justify-start rounded-none px-6"),children:[d.jsx("div",{className:"mr-2",children:t}),d.jsx("div",{className:"font-semibold tracking-tight",children:e}),n&&d.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:n}),d.jsx("span",{className:St('ml-auto transition-all group-data-[state="open"]:-rotate-180'),children:d.jsx(ti,{})})]}),d.jsx(iEn,{className:"collapsibleDropdown",asChild:!0,children:d.jsx("ul",{children:r.map(o=>d.jsx("li",{className:"my-1 ml-8",children:d.jsx(vtt,{...o,subLink:!0,closeNav:i})},o.title))})})]})}function _Fn({title:e,icon:t,label:n,href:r,action:i}){return d.jsxs(Dg,{delayDuration:0,children:[d.jsx(Tg,{asChild:!0,children:i?d.jsxs(qe,{variant:"ghost",size:"icon",className:"h-12 w-12",onClick:i,children:[t,d.jsx("span",{className:"sr-only",children:e})]}):d.jsxs(eC,{to:r,className:St(hg({variant:"ghost",size:"icon"}),"h-12 w-12"),children:[t,d.jsx("span",{className:"sr-only",children:e})]})}),d.jsxs(Og,{side:"right",className:"flex font-semibold tracking-tight items-center gap-4",children:[e,n&&d.jsx("span",{className:"ml-auto text-muted-foreground",children:n})]})]})}function NFn({title:e,icon:t,label:n,sub:r}){const i=!!r?.find(a=>a.href===window.location.pathname);return d.jsxs(ET,{children:[d.jsxs(Dg,{delayDuration:0,children:[d.jsx(Tg,{asChild:!0,children:d.jsx(FT,{asChild:!0,children:d.jsx(qe,{variant:i?"secondary":"ghost",size:"icon",className:"h-12 w-12",children:t})})}),d.jsxs(Og,{side:"right",className:"flex font-semibold tracking-tight items-center gap-4",children:[e," ",n&&d.jsx("span",{className:"ml-auto text-muted-foreground",children:n}),d.jsx(ti,{size:18,className:"-rotate-90 text-muted-foreground"})]})]}),d.jsxs(DT,{side:"right",align:"start",sideOffset:4,children:[d.jsxs(fle,{children:[e," ",n?`(${n})`:""]}),d.jsx(hle,{}),r.map(({title:a,icon:o,label:s,href:l,action:c})=>d.jsx(rg,{asChild:!c,children:c?d.jsxs("button",{onClick:c,className:St(hg({variant:"ghost",size:"sm"}),"flex h-12 cursor-pointer justify-start text-wrap rounded-none px-6 w-full"),children:[o," ",d.jsx("span",{className:"ml-2 max-w-52 text-wrap font-semibold tracking-tight",children:a}),s&&d.jsx("span",{className:"ml-auto text-xs",children:s})]}):d.jsxs(eC,{to:l,className:St(hg({variant:"ghost",size:"sm"}),"flex h-12 cursor-pointer justify-start text-wrap rounded-none px-6"),children:[o," ",d.jsx("span",{className:"ml-2 max-w-52 text-wrap font-semibold tracking-tight",children:a}),s&&d.jsx("span",{className:"ml-auto text-xs",children:s})]})},`${a}-${l||a}`))]})]})}const XR=[{title:"Charges",label:"",href:"",icon:d.jsx(Ck,{size:18}),sub:[{title:"All Charges",label:"",href:"/charges",icon:d.jsx(Ck,{size:18})},{title:"Missing Info Charges",label:"",href:"/missing-info-charges",icon:d.jsx(nIt,{size:18})},{title:"Ledger Validation",label:"",href:"/charges-ledger-validation",icon:d.jsx(t5t,{size:18})}]},{title:"Reports",label:"",href:"",icon:d.jsx(JBt,{size:18}),sub:[{title:"VAT Monthly Report",label:"",href:"/reports/vat-monthly",icon:d.jsx(Ck,{size:18})},{title:"Trial Balance Report",label:"",href:"/reports/trial-balance",icon:d.jsx(iLe,{size:18})},{title:"Conto Report",label:"",href:"/reports/conto",icon:d.jsx(XBt,{size:18})},{title:"Profit and Loss Report",label:"",href:"/reports/profit-and-loss",icon:d.jsx(LY,{size:18})},{title:"Tax Report",label:"",href:"/reports/tax",icon:d.jsx(Xge,{size:18})},{title:"Corporate Tax Ruling Compliance Report",label:"",href:"/reports/corporate-tax-ruling-compliance",icon:d.jsx(Xge,{size:18})},{title:"Depreciation Report",label:"",href:"/reports/depreciation",icon:d.jsx(m5t,{size:18})},{title:"Shaam 6111 Report",label:"",href:"/reports/shaam6111",icon:d.jsx(LY,{size:18})},{title:"Accountant Approvals",label:"",href:"/accountant-approvals",icon:d.jsx(l5t,{size:18})},{title:"Yearly Ledger Report",label:"",href:"/reports/yearly-ledger",icon:d.jsx(oIt,{size:18})},{title:"Transactions Balance",label:"",href:"/reports/balance",icon:d.jsx(A5t,{size:18})},{title:"Validate Reports",label:"",href:"/reports/validate-reports",icon:d.jsx(v5t,{size:18})},{title:"Generate Uniform Files",label:"",icon:d.jsx(_ne,{size:18})}]},{title:"Financial Entities",label:"",href:"",icon:d.jsx(tLe,{size:18}),sub:[{title:"Businesses",label:"",href:"/businesses",icon:d.jsx(J5t,{size:18})},{title:"Business Transactions",label:"",href:"/business-transactions",icon:d.jsx(GOt,{size:18})},{title:"Tax Categories",label:"",href:"/tax-categories",icon:d.jsx(HOt,{size:18})},{title:"Sort Codes",label:"",href:"/sort-codes",icon:d.jsx(r5t,{size:18})}]},{title:"Documents",label:"",href:"",icon:d.jsx(Yge,{size:18}),sub:[{href:"/documents",title:"All Documents",label:"",icon:d.jsx(Yge,{size:18})},{title:"Issue Documents",label:"",href:"/documents/issue-documents",icon:d.jsx(qge,{size:18})},{title:"Issue Document",label:"",href:"/documents/issue-document",icon:d.jsx(qge,{size:18})}]},{href:"/business-trips",title:"Business Trips",label:"",icon:d.jsx(VBt,{size:18})},{title:"Charts",label:"",href:"",icon:d.jsx(L7,{size:18}),sub:[{title:"Main",label:"",href:"/charts/",icon:d.jsx(L7,{size:18})},{title:"Monthly Income/Expense",label:"",href:"/charts/monthly-income-expense",icon:d.jsx(L7,{size:18})}]},{href:"/salaries",title:"Salaries",label:"",icon:d.jsx(ZOt,{size:18})},{href:"/tags",title:"Tags",label:"",icon:d.jsx(vIt,{size:18})}];function EFn(){const[e,t]=w.useState(!1),[n,r]=w.useState(!1),i=XR.map(a=>a.sub?{...a,sub:a.sub.map(o=>o.title==="Generate Uniform Files"?{...o,action:()=>{t(!1),r(!0)}}:o)}:a);return d.jsxs(d.Fragment,{children:[d.jsxs(q2n,{open:e,onOpenChange:t,children:[d.jsx(G2n,{asChild:!0,children:d.jsx(IBt,{})}),d.jsx(Y2n,{side:"left",className:"px-0!",children:d.jsx("div",{className:"space-y-4 py-4",children:d.jsxs("div",{className:"px-3 py-2",children:[d.jsx("h2",{className:"mb-2 px-4 text-lg font-semibold tracking-tight",children:"Overview"}),d.jsx("div",{className:"space-y-1",children:d.jsx(gtt,{isCollapsed:!1,links:i,closeNav:()=>t(!1)})})]})})})]}),d.jsx(Det,{open:n,onOpenChange:r})]})}const QQ="mergeChargesByTransactionReference",FFn=()=>{const[{fetching:e},t]=Hn(MFt),[{fetching:n},r]=Hn(RFt),[{fetching:i},a]=Hn($Ft),o=w.useCallback(async()=>{let s="Error flagging foreign fee transactions";const l=`${QQ}-fees`,c=`${QQ}-merge`,u=`${QQ}-debit-date`;Qe.loading("Flagging Fees",{id:l});try{const f=await t({}),h=Vn(f,s,l);if(!h)return;if(!h.flagForeignFeeTransactions.success){console.error(`${s} ${h.flagForeignFeeTransactions.errors?`:
|
|
988
988
|
`+h.flagForeignFeeTransactions.errors?.join(`
|
|
989
989
|
`):""}`),Qe.error("Error",{id:l,description:s});return}Qe.success("Success",{id:l,description:"Foreign fee transactions were successfully tagged"}),s="Error auto-merging charges",Qe.loading("Merging Charges",{id:c});const m=await r({}),p=Vn(m,s,c);if(!p)return;if(!p.mergeChargesByTransactionReference.success){console.error(`${s} ${p.mergeChargesByTransactionReference.errors?`:
|
|
990
990
|
`+p.mergeChargesByTransactionReference.errors?.join(`
|
|
@@ -1157,14 +1157,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1157
1157
|
`);if(i>0){var N=EI({cx:n,cy:r,radius:i,angle:c,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),E=N.circleTangency,D=N.lineTangency,T=N.theta,j=EI({cx:n,cy:r,radius:i,angle:u,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),O=j.circleTangency,B=j.lineTangency,M=j.theta,$=l?Math.abs(c-u):Math.abs(c-u)-T-M;if($<0&&o===0)return"".concat(C,"L").concat(n,",").concat(r,"Z");C+="L".concat(B.x,",").concat(B.y,`
|
|
1158
1158
|
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(O.x,",").concat(O.y,`
|
|
1159
1159
|
A`).concat(i,",").concat(i,",0,").concat(+($>180),",").concat(+(f>0),",").concat(E.x,",").concat(E.y,`
|
|
1160
|
-
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(D.x,",").concat(D.y,"Z")}else C+="L".concat(n,",").concat(r,"Z");return C},H7n={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},dat=function(t){var n=w5e(w5e({},H7n),t),r=n.cx,i=n.cy,a=n.innerRadius,o=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,u=n.startAngle,f=n.endAngle,h=n.className;if(o<a||u===f)return null;var m=Xn("recharts-sector",h),p=o-a,A=jx(s,p,0,!0),v;return A>0&&Math.abs(u-f)<360?v=z7n({cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(A,p/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:f}):v=uat({cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:u,endAngle:f}),L.createElement("path",Fee({},Li(n,!0),{className:m,d:v,role:"img"}))};function BF(e){"@babel/helpers - typeof";return BF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},BF(e)}function Dee(){return Dee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dee.apply(this,arguments)}function k5e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function S5e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k5e(Object(n),!0).forEach(function(r){V7n(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k5e(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function V7n(e,t,n){return t=Q7n(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q7n(e){var t=q7n(e,"string");return BF(t)=="symbol"?t:t+""}function q7n(e,t){if(BF(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(BF(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var C5e={curveBasisClosed:lbn,curveBasisOpen:cbn,curveBasis:sbn,curveBumpX:G0n,curveBumpY:W0n,curveLinearClosed:ubn,curveLinear:R6,curveMonotoneX:dbn,curveMonotoneY:fbn,curveNatural:hbn,curveStep:mbn,curveStepAfter:Abn,curveStepBefore:pbn},FI=function(t){return t.x===+t.x&&t.y===+t.y},jN=function(t){return t.x},PN=function(t){return t.y},G7n=function(t,n){if(ni(t))return t;var r="curve".concat(E8(t));return(r==="curveMonotone"||r==="curveBump")&&n?C5e["".concat(r).concat(n==="vertical"?"Y":"X")]:C5e[r]||R6},W7n=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,a=i===void 0?[]:i,o=t.baseLine,s=t.layout,l=t.connectNulls,c=l===void 0?!1:l,u=G7n(r,s),f=c?a.filter(function(A){return FI(A)}):a,h;if(Array.isArray(o)){var m=c?o.filter(function(A){return FI(A)}):o,p=f.map(function(A,v){return S5e(S5e({},A),{},{base:m[v]})});return s==="vertical"?h=KB().y(PN).x1(jN).x0(function(A){return A.base.x}):h=KB().x(jN).y1(PN).y0(function(A){return A.base.y}),h.defined(FI).curve(u),h(p)}return s==="vertical"&&dn(o)?h=KB().y(PN).x1(jN).x0(o):dn(o)?h=KB().x(jN).y1(PN).y0(o):h=AZe().x(jN).y(PN),h.defined(FI).curve(u),h(f)},_5e=function(t){var n=t.className,r=t.points,i=t.path,a=t.pathRef;if((!r||!r.length)&&!i)return null;var o=r&&r.length?W7n(t):i;return w.createElement("path",Dee({},Li(t,!1),u$(t),{className:Xn("recharts-curve",n),d:o,ref:a}))},K7n=Object.getOwnPropertyNames,Y7n=Object.getOwnPropertySymbols,X7n=Object.prototype.hasOwnProperty;function N5e(e,t){return function(r,i,a){return e(r,i,a)&&t(r,i,a)}}function DI(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);var a=i.cache,o=a.get(n),s=a.get(r);if(o&&s)return o===r&&s===n;a.set(n,r),a.set(r,n);var l=e(n,r,i);return a.delete(n),a.delete(r),l}}function Z7n(e){return e?.[Symbol.toStringTag]}function E5e(e){return K7n(e).concat(Y7n(e))}var J7n=Object.hasOwn||(function(e,t){return X7n.call(e,t)});function v1(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var ezn="__v",tzn="__o",nzn="_owner",F5e=Object.getOwnPropertyDescriptor,D5e=Object.keys;function rzn(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function izn(e,t){return v1(e.getTime(),t.getTime())}function azn(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function ozn(e,t){return e===t}function T5e(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var i=new Array(r),a=e.entries(),o,s,l=0;(o=a.next())&&!o.done;){for(var c=t.entries(),u=!1,f=0;(s=c.next())&&!s.done;){if(i[f]){f++;continue}var h=o.value,m=s.value;if(n.equals(h[0],m[0],l,f,e,t,n)&&n.equals(h[1],m[1],h[0],m[0],e,t,n)){u=i[f]=!0;break}f++}if(!u)return!1;l++}return!0}var szn=v1;function lzn(e,t,n){var r=D5e(e),i=r.length;if(D5e(t).length!==i)return!1;for(;i-- >0;)if(!fat(e,t,n,r[i]))return!1;return!0}function MN(e,t,n){var r=E5e(e),i=r.length;if(E5e(t).length!==i)return!1;for(var a,o,s;i-- >0;)if(a=r[i],!fat(e,t,n,a)||(o=F5e(e,a),s=F5e(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function czn(e,t){return v1(e.valueOf(),t.valueOf())}function uzn(e,t){return e.source===t.source&&e.flags===t.flags}function O5e(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var i=new Array(r),a=e.values(),o,s;(o=a.next())&&!o.done;){for(var l=t.values(),c=!1,u=0;(s=l.next())&&!s.done;){if(!i[u]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){c=i[u]=!0;break}u++}if(!c)return!1}return!0}function dzn(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function fzn(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function fat(e,t,n,r){return(r===nzn||r===tzn||r===ezn)&&(e.$$typeof||t.$$typeof)?!0:J7n(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var hzn="[object Arguments]",mzn="[object Boolean]",pzn="[object Date]",Azn="[object Error]",gzn="[object Map]",vzn="[object Number]",yzn="[object Object]",bzn="[object RegExp]",xzn="[object Set]",wzn="[object String]",kzn="[object URL]",Szn=Array.isArray,B5e=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,I5e=Object.assign,Czn=Object.prototype.toString.call.bind(Object.prototype.toString);function _zn(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,i=e.areFunctionsEqual,a=e.areMapsEqual,o=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,c=e.areRegExpsEqual,u=e.areSetsEqual,f=e.areTypedArraysEqual,h=e.areUrlsEqual,m=e.unknownTagComparators;return function(A,v,y){if(A===v)return!0;if(A==null||v==null)return!1;var x=typeof A;if(x!==typeof v)return!1;if(x!=="object")return x==="number"?o(A,v,y):x==="function"?i(A,v,y):!1;var k=A.constructor;if(k!==v.constructor)return!1;if(k===Object)return s(A,v,y);if(Szn(A))return t(A,v,y);if(B5e!=null&&B5e(A))return f(A,v,y);if(k===Date)return n(A,v,y);if(k===RegExp)return c(A,v,y);if(k===Map)return a(A,v,y);if(k===Set)return u(A,v,y);var S=Czn(A);if(S===pzn)return n(A,v,y);if(S===bzn)return c(A,v,y);if(S===gzn)return a(A,v,y);if(S===xzn)return u(A,v,y);if(S===yzn)return typeof A.then!="function"&&typeof v.then!="function"&&s(A,v,y);if(S===kzn)return h(A,v,y);if(S===Azn)return r(A,v,y);if(S===hzn)return s(A,v,y);if(S===mzn||S===vzn||S===wzn)return l(A,v,y);if(m){var C=m[S];if(!C){var N=Z7n(A);N&&(C=m[N])}if(C)return C(A,v,y)}return!1}}function Nzn(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?MN:rzn,areDatesEqual:izn,areErrorsEqual:azn,areFunctionsEqual:ozn,areMapsEqual:r?N5e(T5e,MN):T5e,areNumbersEqual:szn,areObjectsEqual:r?MN:lzn,arePrimitiveWrappersEqual:czn,areRegExpsEqual:uzn,areSetsEqual:r?N5e(O5e,MN):O5e,areTypedArraysEqual:r?MN:dzn,areUrlsEqual:fzn,unknownTagComparators:void 0};if(n&&(i=I5e({},i,n(i))),t){var a=DI(i.areArraysEqual),o=DI(i.areMapsEqual),s=DI(i.areObjectsEqual),l=DI(i.areSetsEqual);i=I5e({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return i}function Ezn(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function Fzn(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,a=e.strict;if(r)return function(l,c){var u=r(),f=u.cache,h=f===void 0?t?new WeakMap:void 0:f,m=u.meta;return n(l,c,{cache:h,equals:i,meta:m,strict:a})};if(t)return function(l,c){return n(l,c,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(l,c){return n(l,c,o)}}var Dzn=u0();u0({strict:!0});u0({circular:!0});u0({circular:!0,strict:!0});u0({createInternalComparator:function(){return v1}});u0({strict:!0,createInternalComparator:function(){return v1}});u0({circular:!0,createInternalComparator:function(){return v1}});u0({circular:!0,createInternalComparator:function(){return v1},strict:!0});function u0(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,s=Nzn(e),l=_zn(s),c=r?r(l):Ezn(l);return Fzn({circular:n,comparator:l,createState:i,equals:c,strict:o})}function Tzn(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function j5e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(a){n<0&&(n=a),a-n>t?(e(a),n=-1):Tzn(i)};requestAnimationFrame(r)}function Tee(e){"@babel/helpers - typeof";return Tee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tee(e)}function Ozn(e){return Pzn(e)||jzn(e)||Izn(e)||Bzn()}function Bzn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1161
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1162
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1163
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mat(e,t){if(e){if(typeof e=="string")return Oee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Oee(e,t)}}function
|
|
1164
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1165
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gat(e,t){if(e){if(typeof e=="string")return Iee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Iee(e,t)}}function Iee(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function
|
|
1166
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1167
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1160
|
+
A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(D.x,",").concat(D.y,"Z")}else C+="L".concat(n,",").concat(r,"Z");return C},H7n={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},dat=function(t){var n=w5e(w5e({},H7n),t),r=n.cx,i=n.cy,a=n.innerRadius,o=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,u=n.startAngle,f=n.endAngle,h=n.className;if(o<a||u===f)return null;var m=Xn("recharts-sector",h),p=o-a,A=jx(s,p,0,!0),v;return A>0&&Math.abs(u-f)<360?v=z7n({cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(A,p/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:f}):v=uat({cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:u,endAngle:f}),L.createElement("path",Fee({},Li(n,!0),{className:m,d:v,role:"img"}))};function BF(e){"@babel/helpers - typeof";return BF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},BF(e)}function Dee(){return Dee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dee.apply(this,arguments)}function k5e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function S5e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?k5e(Object(n),!0).forEach(function(r){V7n(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k5e(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function V7n(e,t,n){return t=Q7n(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q7n(e){var t=q7n(e,"string");return BF(t)=="symbol"?t:t+""}function q7n(e,t){if(BF(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(BF(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var C5e={curveBasisClosed:lbn,curveBasisOpen:cbn,curveBasis:sbn,curveBumpX:G0n,curveBumpY:W0n,curveLinearClosed:ubn,curveLinear:R6,curveMonotoneX:dbn,curveMonotoneY:fbn,curveNatural:hbn,curveStep:mbn,curveStepAfter:Abn,curveStepBefore:pbn},FI=function(t){return t.x===+t.x&&t.y===+t.y},jN=function(t){return t.x},PN=function(t){return t.y},G7n=function(t,n){if(ni(t))return t;var r="curve".concat(E8(t));return(r==="curveMonotone"||r==="curveBump")&&n?C5e["".concat(r).concat(n==="vertical"?"Y":"X")]:C5e[r]||R6},W7n=function(t){var n=t.type,r=n===void 0?"linear":n,i=t.points,a=i===void 0?[]:i,o=t.baseLine,s=t.layout,l=t.connectNulls,c=l===void 0?!1:l,u=G7n(r,s),f=c?a.filter(function(A){return FI(A)}):a,h;if(Array.isArray(o)){var m=c?o.filter(function(A){return FI(A)}):o,p=f.map(function(A,v){return S5e(S5e({},A),{},{base:m[v]})});return s==="vertical"?h=KB().y(PN).x1(jN).x0(function(A){return A.base.x}):h=KB().x(jN).y1(PN).y0(function(A){return A.base.y}),h.defined(FI).curve(u),h(p)}return s==="vertical"&&dn(o)?h=KB().y(PN).x1(jN).x0(o):dn(o)?h=KB().x(jN).y1(PN).y0(o):h=AZe().x(jN).y(PN),h.defined(FI).curve(u),h(f)},_5e=function(t){var n=t.className,r=t.points,i=t.path,a=t.pathRef;if((!r||!r.length)&&!i)return null;var o=r&&r.length?W7n(t):i;return w.createElement("path",Dee({},Li(t,!1),u$(t),{className:Xn("recharts-curve",n),d:o,ref:a}))},K7n=Object.getOwnPropertyNames,Y7n=Object.getOwnPropertySymbols,X7n=Object.prototype.hasOwnProperty;function N5e(e,t){return function(r,i,a){return e(r,i,a)&&t(r,i,a)}}function DI(e){return function(n,r,i){if(!n||!r||typeof n!="object"||typeof r!="object")return e(n,r,i);var a=i.cache,o=a.get(n),s=a.get(r);if(o&&s)return o===r&&s===n;a.set(n,r),a.set(r,n);var l=e(n,r,i);return a.delete(n),a.delete(r),l}}function E5e(e){return K7n(e).concat(Y7n(e))}var Z7n=Object.hasOwn||(function(e,t){return X7n.call(e,t)});function v1(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var J7n="__v",ezn="__o",tzn="_owner",F5e=Object.getOwnPropertyDescriptor,D5e=Object.keys;function nzn(e,t,n){var r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function rzn(e,t){return v1(e.getTime(),t.getTime())}function izn(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function azn(e,t){return e===t}function T5e(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var i=new Array(r),a=e.entries(),o,s,l=0;(o=a.next())&&!o.done;){for(var c=t.entries(),u=!1,f=0;(s=c.next())&&!s.done;){if(i[f]){f++;continue}var h=o.value,m=s.value;if(n.equals(h[0],m[0],l,f,e,t,n)&&n.equals(h[1],m[1],h[0],m[0],e,t,n)){u=i[f]=!0;break}f++}if(!u)return!1;l++}return!0}var ozn=v1;function szn(e,t,n){var r=D5e(e),i=r.length;if(D5e(t).length!==i)return!1;for(;i-- >0;)if(!fat(e,t,n,r[i]))return!1;return!0}function MN(e,t,n){var r=E5e(e),i=r.length;if(E5e(t).length!==i)return!1;for(var a,o,s;i-- >0;)if(a=r[i],!fat(e,t,n,a)||(o=F5e(e,a),s=F5e(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function lzn(e,t){return v1(e.valueOf(),t.valueOf())}function czn(e,t){return e.source===t.source&&e.flags===t.flags}function O5e(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var i=new Array(r),a=e.values(),o,s;(o=a.next())&&!o.done;){for(var l=t.values(),c=!1,u=0;(s=l.next())&&!s.done;){if(!i[u]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){c=i[u]=!0;break}u++}if(!c)return!1}return!0}function uzn(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function dzn(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function fat(e,t,n,r){return(r===tzn||r===ezn||r===J7n)&&(e.$$typeof||t.$$typeof)?!0:Z7n(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var fzn="[object Arguments]",hzn="[object Boolean]",mzn="[object Date]",pzn="[object Error]",Azn="[object Map]",gzn="[object Number]",vzn="[object Object]",yzn="[object RegExp]",bzn="[object Set]",xzn="[object String]",wzn="[object URL]",kzn=Array.isArray,B5e=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,I5e=Object.assign,Szn=Object.prototype.toString.call.bind(Object.prototype.toString);function Czn(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,i=e.areFunctionsEqual,a=e.areMapsEqual,o=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,c=e.areRegExpsEqual,u=e.areSetsEqual,f=e.areTypedArraysEqual,h=e.areUrlsEqual;return function(p,A,v){if(p===A)return!0;if(p==null||A==null)return!1;var y=typeof p;if(y!==typeof A)return!1;if(y!=="object")return y==="number"?o(p,A,v):y==="function"?i(p,A,v):!1;var x=p.constructor;if(x!==A.constructor)return!1;if(x===Object)return s(p,A,v);if(kzn(p))return t(p,A,v);if(B5e!=null&&B5e(p))return f(p,A,v);if(x===Date)return n(p,A,v);if(x===RegExp)return c(p,A,v);if(x===Map)return a(p,A,v);if(x===Set)return u(p,A,v);var k=Szn(p);return k===mzn?n(p,A,v):k===yzn?c(p,A,v):k===Azn?a(p,A,v):k===bzn?u(p,A,v):k===vzn?typeof p.then!="function"&&typeof A.then!="function"&&s(p,A,v):k===wzn?h(p,A,v):k===pzn?r(p,A,v):k===fzn?s(p,A,v):k===hzn||k===gzn||k===xzn?l(p,A,v):!1}}function _zn(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?MN:nzn,areDatesEqual:rzn,areErrorsEqual:izn,areFunctionsEqual:azn,areMapsEqual:r?N5e(T5e,MN):T5e,areNumbersEqual:ozn,areObjectsEqual:r?MN:szn,arePrimitiveWrappersEqual:lzn,areRegExpsEqual:czn,areSetsEqual:r?N5e(O5e,MN):O5e,areTypedArraysEqual:r?MN:uzn,areUrlsEqual:dzn};if(n&&(i=I5e({},i,n(i))),t){var a=DI(i.areArraysEqual),o=DI(i.areMapsEqual),s=DI(i.areObjectsEqual),l=DI(i.areSetsEqual);i=I5e({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return i}function Nzn(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function Ezn(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,a=e.strict;if(r)return function(l,c){var u=r(),f=u.cache,h=f===void 0?t?new WeakMap:void 0:f,m=u.meta;return n(l,c,{cache:h,equals:i,meta:m,strict:a})};if(t)return function(l,c){return n(l,c,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(l,c){return n(l,c,o)}}var Fzn=u0();u0({strict:!0});u0({circular:!0});u0({circular:!0,strict:!0});u0({createInternalComparator:function(){return v1}});u0({strict:!0,createInternalComparator:function(){return v1}});u0({circular:!0,createInternalComparator:function(){return v1}});u0({circular:!0,createInternalComparator:function(){return v1},strict:!0});function u0(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,s=_zn(e),l=Czn(s),c=r?r(l):Nzn(l);return Ezn({circular:n,comparator:l,createState:i,equals:c,strict:o})}function Dzn(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function j5e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(a){n<0&&(n=a),a-n>t?(e(a),n=-1):Dzn(i)};requestAnimationFrame(r)}function Tee(e){"@babel/helpers - typeof";return Tee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tee(e)}function Tzn(e){return jzn(e)||Izn(e)||Bzn(e)||Ozn()}function Ozn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1161
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bzn(e,t){if(e){if(typeof e=="string")return P5e(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return P5e(e,t)}}function P5e(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Izn(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jzn(e){if(Array.isArray(e))return e}function Pzn(){var e={},t=function(){return null},n=!1,r=function i(a){if(!n){if(Array.isArray(a)){if(!a.length)return;var o=a,s=Tzn(o),l=s[0],c=s.slice(1);if(typeof l=="number"){j5e(i.bind(null,c),l);return}i(l),j5e(i.bind(null,c));return}Tee(a)==="object"&&(e=a,t(e)),typeof a=="function"&&a()}};return{stop:function(){n=!0},start:function(a){n=!1,r(a)},subscribe:function(a){return t=a,function(){t=function(){return null}}}}}function IF(e){"@babel/helpers - typeof";return IF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},IF(e)}function M5e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function R5e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?M5e(Object(n),!0).forEach(function(r){hat(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M5e(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hat(e,t,n){return t=Mzn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mzn(e){var t=Rzn(e,"string");return IF(t)==="symbol"?t:String(t)}function Rzn(e,t){if(IF(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(IF(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $zn=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(r,i){return r.filter(function(a){return i.includes(a)})})},Lzn=function(t){return t},Uzn=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},Z2=function(t,n){return Object.keys(n).reduce(function(r,i){return R5e(R5e({},r),{},hat({},i,t(i,n[i])))},{})},$5e=function(t,n,r){return t.map(function(i){return"".concat(Uzn(i)," ").concat(n,"ms ").concat(r)}).join(",")};function zzn(e,t){return Qzn(e)||Vzn(e,t)||mat(e,t)||Hzn()}function Hzn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1162
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vzn(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function Qzn(e){if(Array.isArray(e))return e}function qzn(e){return Kzn(e)||Wzn(e)||mat(e)||Gzn()}function Gzn(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1163
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mat(e,t){if(e){if(typeof e=="string")return Oee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Oee(e,t)}}function Wzn(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Kzn(e){if(Array.isArray(e))return Oee(e)}function Oee(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var S$=1e-4,pat=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},Aat=function(t,n){return t.map(function(r,i){return r*Math.pow(n,i)}).reduce(function(r,i){return r+i})},L5e=function(t,n){return function(r){var i=pat(t,n);return Aat(i,r)}},Yzn=function(t,n){return function(r){var i=pat(t,n),a=[].concat(qzn(i.map(function(o,s){return o*s}).slice(1)),[0]);return Aat(a,r)}},U5e=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0],a=n[1],o=n[2],s=n[3];if(n.length===1)switch(n[0]){case"linear":i=0,a=0,o=1,s=1;break;case"ease":i=.25,a=.1,o=.25,s=1;break;case"ease-in":i=.42,a=0,o=1,s=1;break;case"ease-out":i=.42,a=0,o=.58,s=1;break;case"ease-in-out":i=0,a=0,o=.58,s=1;break;default:{var l=n[0].split("(");if(l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4){var c=l[1].split(")")[0].split(",").map(function(v){return parseFloat(v)}),u=zzn(c,4);i=u[0],a=u[1],o=u[2],s=u[3]}}}var f=L5e(i,o),h=L5e(a,s),m=Yzn(i,o),p=function(y){return y>1?1:y<0?0:y},A=function(y){for(var x=y>1?1:y,k=x,S=0;S<8;++S){var C=f(k)-x,N=m(k);if(Math.abs(C-x)<S$||N<S$)return h(k);k=p(k-C/N)}return h(k)};return A.isStepper=!1,A},Xzn=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,l=function(u,f,h){var m=-(u-f)*r,p=h*a,A=h+(m-p)*s/1e3,v=h*s/1e3+u;return Math.abs(v-f)<S$&&Math.abs(A)<S$?[f,0]:[v,A]};return l.isStepper=!0,l.dt=s,l},Zzn=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n[0];if(typeof i=="string")switch(i){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return U5e(i);case"spring":return Xzn();default:if(i.split("(")[0]==="cubic-bezier")return U5e(i)}return typeof i=="function"?i:null};function jF(e){"@babel/helpers - typeof";return jF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jF(e)}function z5e(e){return t9n(e)||e9n(e)||gat(e)||Jzn()}function Jzn(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1164
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e9n(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function t9n(e){if(Array.isArray(e))return Iee(e)}function H5e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _l(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?H5e(Object(n),!0).forEach(function(r){Bee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H5e(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Bee(e,t,n){return t=n9n(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function n9n(e){var t=r9n(e,"string");return jF(t)==="symbol"?t:String(t)}function r9n(e,t){if(jF(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jF(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function i9n(e,t){return s9n(e)||o9n(e,t)||gat(e,t)||a9n()}function a9n(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1165
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gat(e,t){if(e){if(typeof e=="string")return Iee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Iee(e,t)}}function Iee(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o9n(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function s9n(e){if(Array.isArray(e))return e}var C$=function(t,n,r){return t+(n-t)*r},jee=function(t){var n=t.from,r=t.to;return n!==r},l9n=function e(t,n,r){var i=Z2(function(a,o){if(jee(o)){var s=t(o.from,o.to,o.velocity),l=i9n(s,2),c=l[0],u=l[1];return _l(_l({},o),{},{from:c,velocity:u})}return o},n);return r<1?Z2(function(a,o){return jee(o)?_l(_l({},o),{},{velocity:C$(o.velocity,i[a].velocity,r),from:C$(o.from,i[a].from,r)}):o},n):e(t,i,r-1)};const c9n=(function(e,t,n,r,i){var a=$zn(e,t),o=a.reduce(function(v,y){return _l(_l({},v),{},Bee({},y,[e[y],t[y]]))},{}),s=a.reduce(function(v,y){return _l(_l({},v),{},Bee({},y,{from:e[y],velocity:0,to:t[y]}))},{}),l=-1,c,u,f=function(){return null},h=function(){return Z2(function(y,x){return x.from},s)},m=function(){return!Object.values(s).filter(jee).length},p=function(y){c||(c=y);var x=y-c,k=x/n.dt;s=l9n(n,s,k),i(_l(_l(_l({},e),t),h())),c=y,m()||(l=requestAnimationFrame(f))},A=function(y){u||(u=y);var x=(y-u)/r,k=Z2(function(C,N){return C$.apply(void 0,z5e(N).concat([n(x)]))},o);if(i(_l(_l(_l({},e),t),k)),x<1)l=requestAnimationFrame(f);else{var S=Z2(function(C,N){return C$.apply(void 0,z5e(N).concat([n(1)]))},o);i(_l(_l(_l({},e),t),S))}};return f=n.isStepper?p:A,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(l)}}});function $S(e){"@babel/helpers - typeof";return $S=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$S(e)}var u9n=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function d9n(e,t){if(e==null)return{};var n=f9n(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function f9n(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function IK(e){return A9n(e)||p9n(e)||m9n(e)||h9n()}function h9n(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1166
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m9n(e,t){if(e){if(typeof e=="string")return Pee(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Pee(e,t)}}function p9n(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function A9n(e){if(Array.isArray(e))return Pee(e)}function Pee(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function V5e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?V5e(Object(n),!0).forEach(function(r){g2(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V5e(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function g2(e,t,n){return t=vat(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g9n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function v9n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,vat(r.key),r)}}function y9n(e,t,n){return t&&v9n(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function vat(e){var t=b9n(e,"string");return $S(t)==="symbol"?t:String(t)}function b9n(e,t){if($S(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($S(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function x9n(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mee(e,t)}function Mee(e,t){return Mee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Mee(e,t)}function w9n(e){var t=k9n();return function(){var r=_$(e),i;if(t){var a=_$(this).constructor;i=Reflect.construct(r,arguments,a)}else i=r.apply(this,arguments);return Ree(this,i)}}function Ree(e,t){if(t&&($S(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return $ee(e)}function $ee(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k9n(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _$(e){return _$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},_$(e)}var $y=(function(e){x9n(n,e);var t=w9n(n);function n(r,i){var a;g9n(this,n),a=t.call(this,r,i);var o=a.props,s=o.isActive,l=o.attributeName,c=o.from,u=o.to,f=o.steps,h=o.children,m=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind($ee(a)),a.changeStyle=a.changeStyle.bind($ee(a)),!s||m<=0)return a.state={style:{}},typeof h=="function"&&(a.state={style:u}),Ree(a);if(f&&f.length)a.state={style:f[0].style};else if(c){if(typeof h=="function")return a.state={style:c},Ree(a);a.state={style:l?g2({},l,c):c}}else a.state={style:{}};return a}return y9n(n,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,c=a.shouldReAnimate,u=a.to,f=a.from,h=this.state.style;if(s){if(!o){var m={style:l?g2({},l,u):u};this.state&&h&&(l&&h[l]!==u||!l&&h!==u)&&this.setState(m);return}if(!(Fzn(i.to,u)&&i.canBegin&&i.isActive)){var p=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var A=p||c?f:i.to;if(this.state&&h){var v={style:l?g2({},l,A):A};(l&&h[l]!==A||!l&&h!==A)&&this.setState(v)}this.runAnimation(xh(xh({},this.props),{},{from:A,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,l=i.duration,c=i.easing,u=i.begin,f=i.onAnimationEnd,h=i.onAnimationStart,m=c9n(o,s,Zzn(c),l,this.changeStyle),p=function(){a.stopJSAnimation=m()};this.manager.start([h,u,p,l,f])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,c=o[0],u=c.style,f=c.duration,h=f===void 0?0:f,m=function(A,v,y){if(y===0)return A;var x=v.duration,k=v.easing,S=k===void 0?"ease":k,C=v.style,N=v.properties,E=v.onAnimationEnd,D=y>0?o[y-1]:v,T=N||Object.keys(C);if(typeof S=="function"||S==="spring")return[].concat(IK(A),[a.runJSAnimation.bind(a,{from:D.style,to:C,duration:x,easing:S}),x]);var j=$5e(T,x,S),O=xh(xh(xh({},D.style),C),{},{transition:j});return[].concat(IK(A),[O,x,E]).filter(Lzn)};return this.manager.start([l].concat(IK(o.reduce(m,[u,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=Pzn());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,c=i.easing,u=i.onAnimationStart,f=i.onAnimationEnd,h=i.steps,m=i.children,p=this.manager;if(this.unSubscribe=p.subscribe(this.handleStyleChange),typeof c=="function"||typeof m=="function"||c==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var A=s?g2({},s,l):l,v=$5e(Object.keys(A),o,c);p.start([u,a,xh(xh({},A),{},{transition:v}),o,f])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=d9n(i,u9n),c=w.Children.count(a),u=this.state.style;if(typeof a=="function")return a(u);if(!s||c===0||o<=0)return a;var f=function(m){var p=m.props,A=p.style,v=A===void 0?{}:A,y=p.className,x=w.cloneElement(m,xh(xh({},l),{},{style:xh(xh({},v),u),className:y}));return x};return c===1?f(w.Children.only(a)):L.createElement("div",null,w.Children.map(a,function(h){return f(h)}))}}]),n})(w.PureComponent);$y.displayName="Animate";$y.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};$y.propTypes={from:Kn.oneOfType([Kn.object,Kn.string]),to:Kn.oneOfType([Kn.object,Kn.string]),attributeName:Kn.string,duration:Kn.number,begin:Kn.number,easing:Kn.oneOfType([Kn.string,Kn.func]),steps:Kn.arrayOf(Kn.shape({duration:Kn.number.isRequired,style:Kn.object.isRequired,easing:Kn.oneOfType([Kn.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Kn.func]),properties:Kn.arrayOf("string"),onAnimationEnd:Kn.func})),children:Kn.oneOfType([Kn.node,Kn.func]),isActive:Kn.bool,canBegin:Kn.bool,onAnimationEnd:Kn.func,shouldReAnimate:Kn.bool,onAnimationStart:Kn.func,onAnimationReStart:Kn.func};function PF(e){"@babel/helpers - typeof";return PF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},PF(e)}function N$(){return N$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},N$.apply(this,arguments)}function S9n(e,t){return E9n(e)||N9n(e,t)||_9n(e,t)||C9n()}function C9n(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1167
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _9n(e,t){if(e){if(typeof e=="string")return Q5e(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Q5e(e,t)}}function Q5e(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function N9n(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function E9n(e){if(Array.isArray(e))return e}function q5e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function G5e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?q5e(Object(n),!0).forEach(function(r){F9n(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q5e(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function F9n(e,t,n){return t=D9n(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D9n(e){var t=T9n(e,"string");return PF(t)=="symbol"?t:t+""}function T9n(e,t){if(PF(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(PF(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var W5e=function(t,n,r,i,a){var o=Math.min(Math.abs(r)/2,Math.abs(i)/2),s=i>=0?1:-1,l=r>=0?1:-1,c=i>=0&&r>=0||i<0&&r<0?1:0,u;if(o>0&&a instanceof Array){for(var f=[0,0,0,0],h=0,m=4;h<m;h++)f[h]=a[h]>o?o:a[h];u="M".concat(t,",").concat(n+s*f[0]),f[0]>0&&(u+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(c,",").concat(t+l*f[0],",").concat(n)),u+="L ".concat(t+r-l*f[1],",").concat(n),f[1]>0&&(u+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(c,`,
|
|
1168
1168
|
`).concat(t+r,",").concat(n+s*f[1])),u+="L ".concat(t+r,",").concat(n+i-s*f[2]),f[2]>0&&(u+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(c,`,
|
|
1169
1169
|
`).concat(t+r-l*f[2],",").concat(n+i)),u+="L ".concat(t+l*f[3],",").concat(n+i),f[3]>0&&(u+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(c,`,
|
|
1170
1170
|
`).concat(t,",").concat(n+i-s*f[3])),u+="Z"}else if(o>0&&a===+a&&a>0){var p=Math.min(o,a);u="M ".concat(t,",").concat(n+s*p,`
|
|
@@ -1174,15 +1174,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1174
1174
|
L `).concat(t+r,",").concat(n+i-s*p,`
|
|
1175
1175
|
A `).concat(p,",").concat(p,",0,0,").concat(c,",").concat(t+r-l*p,",").concat(n+i,`
|
|
1176
1176
|
L `).concat(t+l*p,",").concat(n+i,`
|
|
1177
|
-
A `).concat(p,",").concat(p,",0,0,").concat(c,",").concat(t,",").concat(n+i-s*p," Z")}else u="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return u},
|
|
1178
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J9n(e,t){if(e){if(typeof e=="string")return J5e(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J5e(e,t)}}function J5e(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function eHn(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function tHn(e){if(Array.isArray(e))return e}function eBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tBe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eBe(Object(n),!0).forEach(function(r){nHn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nHn(e,t,n){return t=rHn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rHn(e){var t=iHn(e,"string");return RF(t)=="symbol"?t:t+""}function iHn(e,t){if(RF(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(RF(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nBe=function(t,n,r,i,a){var o=r-i,s;return s="M ".concat(t,",").concat(n),s+="L ".concat(t+r,",").concat(n),s+="L ".concat(t+r-o/2,",").concat(n+a),s+="L ".concat(t+r-o/2-i,",").concat(n+a),s+="L ".concat(t,",").concat(n," Z"),s},aHn={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},oHn=function(t){var n=tBe(tBe({},aHn),t),r=w.useRef(),i=w.useState(-1),a=X9n(i,2),o=a[0],s=a[1];w.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var k=r.current.getTotalLength();k&&s(k)}catch{}},[]);var l=n.x,c=n.y,u=n.upperWidth,f=n.lowerWidth,h=n.height,m=n.className,p=n.animationEasing,A=n.animationDuration,v=n.animationBegin,y=n.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||f!==+f||h!==+h||u===0&&f===0||h===0)return null;var x=Xn("recharts-trapezoid",m);return y?L.createElement($y,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:c},to:{upperWidth:u,lowerWidth:f,height:h,x:l,y:c},duration:A,animationEasing:p,isActive:y},function(k){var S=k.upperWidth,C=k.lowerWidth,N=k.height,E=k.x,D=k.y;return L.createElement($y,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:A,easing:p},L.createElement("path",E$({},Li(n,!0),{className:x,d:nBe(E,D,S,C,N),ref:r})))}):L.createElement("g",null,L.createElement("path",E$({},Li(n,!0),{className:x,d:nBe(l,c,u,f,h)})))},sHn=["option","shapeType","propTransformer","activeClassName","isActive"];function $F(e){"@babel/helpers - typeof";return $F=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$F(e)}function lHn(e,t){if(e==null)return{};var n=cHn(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function cHn(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function rBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function F$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rBe(Object(n),!0).forEach(function(r){uHn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function uHn(e,t,n){return t=dHn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dHn(e){var t=fHn(e,"string");return $F(t)=="symbol"?t:t+""}function fHn(e,t){if($F(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($F(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hHn(e,t){return F$(F$({},t),e)}function mHn(e,t){return e==="symbols"}function iBe(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return L.createElement(Fce,n);case"trapezoid":return L.createElement(oHn,n);case"sector":return L.createElement(dat,n);case"symbols":if(mHn(t))return L.createElement(pce,n);break;default:return null}}function pHn(e){return w.isValidElement(e)?e.props:e}function AHn(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?hHn:r,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,s=e.isActive,l=lHn(e,sHn),c;if(w.isValidElement(t))c=w.cloneElement(t,F$(F$({},l),pHn(t)));else if(ni(t))c=t(l);else if(G9n(t)&&!Y9n(t)){var u=i(t,l);c=L.createElement(iBe,{shapeType:n,elementProps:u})}else{var f=l;c=L.createElement(iBe,{shapeType:n,elementProps:f})}return s?L.createElement(ul,{className:o},c):c}function M8(e,t){return t!=null&&"trapezoids"in e.props}function R8(e,t){return t!=null&&"sectors"in e.props}function LF(e,t){return t!=null&&"points"in e.props}function gHn(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,a=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&a}function vHn(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function yHn(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function bHn(e,t){var n;return M8(e,t)?n=gHn:R8(e,t)?n=vHn:LF(e,t)&&(n=yHn),n}function xHn(e,t){var n;return M8(e,t)?n="trapezoids":R8(e,t)?n="sectors":LF(e,t)&&(n="points"),n}function wHn(e,t){if(M8(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(R8(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return LF(e,t)?t.payload:{}}function kHn(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=xHn(n,t),a=wHn(n,t),o=r.filter(function(l,c){var u=Cce(a,l),f=n.props[i].filter(function(p){var A=bHn(n,t);return A(p,t)}),h=n.props[i].indexOf(f[f.length-1]),m=c===h;return u&&m}),s=r.indexOf(o[o.length-1]);return s}var RK,aBe;function SHn(){if(aBe)return RK;aBe=1;var e=Math.ceil,t=Math.max;function n(r,i,a,o){for(var s=-1,l=t(e((i-r)/(a||1)),0),c=Array(l);l--;)c[o?l:++s]=r,r+=a;return c}return RK=n,RK}var $K,oBe;function bat(){if(oBe)return $K;oBe=1;var e=Bit(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var a=i<0?-1:1;return a*n}return i===i?i:0}return $K=r,$K}var LK,sBe;function CHn(){if(sBe)return LK;sBe=1;var e=SHn(),t=T8(),n=bat();function r(i){return function(a,o,s){return s&&typeof s!="number"&&t(a,o,s)&&(o=s=void 0),a=n(a),o===void 0?(o=a,a=0):o=n(o),s=s===void 0?a<o?1:-1:n(s),e(a,o,s,i)}}return LK=r,LK}var UK,lBe;function _Hn(){if(lBe)return UK;lBe=1;var e=CHn(),t=e();return UK=t,UK}var NHn=_Hn();const D$=Fi(NHn);function UF(e){"@babel/helpers - typeof";return UF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},UF(e)}function cBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uBe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cBe(Object(n),!0).forEach(function(r){xat(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xat(e,t,n){return t=EHn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EHn(e){var t=FHn(e,"string");return UF(t)=="symbol"?t:t+""}function FHn(e,t){if(UF(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(UF(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var DHn=["Webkit","Moz","O","ms"],THn=function(t,n){var r=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=DHn.reduce(function(a,o){return uBe(uBe({},a),{},xat({},o+r,n))},{});return i[t]=n,i};function LS(e){"@babel/helpers - typeof";return LS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},LS(e)}function T$(){return T$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T$.apply(this,arguments)}function dBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dBe(Object(n),!0).forEach(function(r){id(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function OHn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fBe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kat(r.key),r)}}function BHn(e,t,n){return t&&fBe(e.prototype,t),n&&fBe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function IHn(e,t,n){return t=O$(t),jHn(e,wat()?Reflect.construct(t,n||[],O$(e).constructor):t.apply(e,n))}function jHn(e,t){if(t&&(LS(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return PHn(e)}function PHn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wat(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wat=function(){return!!e})()}function O$(e){return O$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},O$(e)}function MHn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zee(e,t)}function zee(e,t){return zee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},zee(e,t)}function id(e,t,n){return t=kat(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kat(e){var t=RHn(e,"string");return LS(t)=="symbol"?t:t+""}function RHn(e,t){if(LS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(LS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var $Hn=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,a=t.x,o=t.width,s=t.travellerWidth;if(!n||!n.length)return{};var l=n.length,c=Rk().domain(D$(0,l)).range([a,a+o-s]),u=c.domain().map(function(f){return c(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(r),endX:c(i),scale:c,scaleValues:u}},hBe=function(t){return t.changedTouches&&!!t.changedTouches.length},US=(function(e){function t(n){var r;return OHn(this,t),r=IHn(this,t,[n]),id(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),id(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),id(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o?.({endIndex:a,startIndex:s})}),r.detachDragEndListener()}),id(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),id(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),id(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),id(r,"handleSlideDragStart",function(i){var a=hBe(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return MHn(t,e),BHn(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,a=r.endX,o=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,u=c.length-1,f=Math.min(i,a),h=Math.max(i,a),m=t.getIndexInRange(o,f),p=t.getIndexInRange(o,h);return{startIndex:m-m%l,endIndex:p===u?u:p-p%l}}},{key:"getTextOfTick",value:function(r){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=Rp(a[r],s,r);return ni(o)?o(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,l=this.props,c=l.x,u=l.width,f=l.travellerWidth,h=l.startIndex,m=l.endIndex,p=l.onChange,A=r.pageX-a;A>0?A=Math.min(A,c+u-f-s,c+u-f-o):A<0&&(A=Math.max(A,c-o,c-s));var v=this.getIndex({startX:o+A,endX:s+A});(v.startIndex!==h||v.endIndex!==m)&&p&&p(v),this.setState({startX:o+A,endX:s+A,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var a=hBe(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,l=i.startX,c=this.state[o],u=this.props,f=u.x,h=u.width,m=u.travellerWidth,p=u.onChange,A=u.gap,v=u.data,y={startX:this.state.startX,endX:this.state.endX},x=r.pageX-a;x>0?x=Math.min(x,f+h-m-c):x<0&&(x=Math.max(x,f-c)),y[o]=c+x;var k=this.getIndex(y),S=k.startIndex,C=k.endIndex,N=function(){var D=v.length-1;return o==="startX"&&(s>l?S%A===0:C%A===0)||s<l&&C===D||o==="endX"&&(s>l?C%A===0:S%A===0)||s>l&&C===D};this.setState(id(id({},o,c+x),"brushMoveStartX",r.pageX),function(){p&&N()&&p(k)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,c=o.endX,u=this.state[i],f=s.indexOf(u);if(f!==-1){var h=f+r;if(!(h===-1||h>=s.length)){var m=s[h];i==="startX"&&m>=c||i==="endX"&&m<=l||this.setState(id({},i,m),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.fill,c=r.stroke;return L.createElement("rect",{stroke:c,fill:l,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.data,c=r.children,u=r.padding,f=w.Children.only(c);return f?L.cloneElement(f,{x:i,y:a,width:o,height:s,margin:u,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,i){var a,o,s=this,l=this.props,c=l.y,u=l.travellerWidth,f=l.height,h=l.traveller,m=l.ariaLabel,p=l.data,A=l.startIndex,v=l.endIndex,y=Math.max(r,this.props.x),x=zK(zK({},Li(this.props,!1)),{},{x:y,y:c,width:u,height:f}),k=m||"Min value: ".concat((a=p[A])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=p[v])===null||o===void 0?void 0:o.name);return L.createElement(ul,{tabIndex:0,role:"slider","aria-label":k,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(C){["ArrowLeft","ArrowRight"].includes(C.key)&&(C.preventDefault(),C.stopPropagation(),s.handleTravellerMoveKeyboard(C.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,x))}},{key:"renderSlide",value:function(r,i){var a=this.props,o=a.y,s=a.height,l=a.stroke,c=a.travellerWidth,u=Math.min(r,i)+c,f=Math.max(Math.abs(i-r)-c,0);return L.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:u,y:o,width:f,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,a=r.endIndex,o=r.y,s=r.height,l=r.travellerWidth,c=r.stroke,u=this.state,f=u.startX,h=u.endX,m=5,p={pointerEvents:"none",fill:c};return L.createElement(ul,{className:"recharts-brush-texts"},L.createElement(g$,T$({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-m,y:o+s/2},p),this.getTextOfTick(i)),L.createElement(g$,T$({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+l+m,y:o+s/2},p),this.getTextOfTick(a)))}},{key:"render",value:function(){var r=this.props,i=r.data,a=r.className,o=r.children,s=r.x,l=r.y,c=r.width,u=r.height,f=r.alwaysShowText,h=this.state,m=h.startX,p=h.endX,A=h.isTextActive,v=h.isSlideMoving,y=h.isTravellerMoving,x=h.isTravellerFocused;if(!i||!i.length||!dn(s)||!dn(l)||!dn(c)||!dn(u)||c<=0||u<=0)return null;var k=Xn("recharts-brush",a),S=L.Children.count(o)===1,C=THn("userSelect","none");return L.createElement(ul,{className:k,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:C},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(m,p),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(p,"endX"),(A||v||y||x||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,a=r.y,o=r.width,s=r.height,l=r.stroke,c=Math.floor(a+s/2)-1;return L.createElement(L.Fragment,null,L.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),L.createElement("line",{x1:i+1,y1:c,x2:i+o-1,y2:c,fill:"none",stroke:"#fff"}),L.createElement("line",{x1:i+1,y1:c+2,x2:i+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var a;return L.isValidElement(r)?a=L.cloneElement(r,i):ni(r)?a=r(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(r,i){var a=r.data,o=r.width,s=r.x,l=r.travellerWidth,c=r.updateId,u=r.startIndex,f=r.endIndex;if(a!==i.prevData||c!==i.prevUpdateId)return zK({prevData:a,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:o},a&&a.length?$Hn({data:a,width:o,x:s,travellerWidth:l,startIndex:u,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+o-l]);var h=i.scale.domain().map(function(m){return i.scale(m)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:o,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var a=r.length,o=0,s=a-1;s-o>1;){var l=Math.floor((o+s)/2);r[l]>i?s=l:o=l}return i>=r[s]?s:o}}])})(w.PureComponent);id(US,"displayName","Brush");id(US,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var HK,mBe;function LHn(){if(mBe)return HK;mBe=1;var e=wce();function t(n,r){var i;return e(n,function(a,o,s){return i=r(a,o,s),!i}),!!i}return HK=t,HK}var VK,pBe;function UHn(){if(pBe)return VK;pBe=1;var e=uit(),t=c0(),n=LHn(),r=Ru(),i=T8();function a(o,s,l){var c=r(o)?e:n;return l&&i(o,s,l)&&(s=void 0),c(o,t(s,3))}return VK=a,VK}var zHn=UHn();const HHn=Fi(zHn);var Np=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},QK,ABe;function VHn(){if(ABe)return QK;ABe=1;var e=Eit();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return QK=t,QK}var qK,gBe;function QHn(){if(gBe)return qK;gBe=1;var e=VHn(),t=_it(),n=c0();function r(i,a){var o={};return a=n(a,3),t(i,function(s,l,c){e(o,l,a(s,l,c))}),o}return qK=r,qK}var qHn=QHn();const GHn=Fi(qHn);var GK,vBe;function WHn(){if(vBe)return GK;vBe=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(!n(t[r],r,t))return!1;return!0}return GK=e,GK}var WK,yBe;function KHn(){if(yBe)return WK;yBe=1;var e=wce();function t(n,r){var i=!0;return e(n,function(a,o,s){return i=!!r(a,o,s),i}),i}return WK=t,WK}var KK,bBe;function YHn(){if(bBe)return KK;bBe=1;var e=WHn(),t=KHn(),n=c0(),r=Ru(),i=T8();function a(o,s,l){var c=r(o)?e:t;return l&&i(o,s,l)&&(s=void 0),c(o,n(s,3))}return KK=a,KK}var XHn=YHn();const Sat=Fi(XHn);var ZHn=["x","y"];function zF(e){"@babel/helpers - typeof";return zF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zF(e)}function Hee(){return Hee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hee.apply(this,arguments)}function xBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function RN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xBe(Object(n),!0).forEach(function(r){JHn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function JHn(e,t,n){return t=eVn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eVn(e){var t=tVn(e,"string");return zF(t)=="symbol"?t:t+""}function tVn(e,t){if(zF(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zF(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nVn(e,t){if(e==null)return{};var n=rVn(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rVn(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function iVn(e,t){var n=e.x,r=e.y,i=nVn(e,ZHn),a="".concat(n),o=parseInt(a,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||i.height),u=parseInt(c,10),f="".concat(t.width||i.width),h=parseInt(f,10);return RN(RN(RN(RN(RN({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:u,width:h,name:t.name,radius:t.radius})}function wBe(e){return L.createElement(AHn,Hee({shapeType:"rectangle",propTransformer:iVn,activeClassName:"recharts-active-bar"},e))}var aVn=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var a=dn(r)||S$n(r);return a?t(r,i):(a||Mx(),n)}},oVn=["value","background"],Cat;function zS(e){"@babel/helpers - typeof";return zS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zS(e)}function sVn(e,t){if(e==null)return{};var n=lVn(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lVn(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function B$(){return B$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},B$.apply(this,arguments)}function kBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kBe(Object(n),!0).forEach(function(r){oy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cVn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SBe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Nat(r.key),r)}}function uVn(e,t,n){return t&&SBe(e.prototype,t),n&&SBe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function dVn(e,t,n){return t=I$(t),fVn(e,_at()?Reflect.construct(t,n||[],I$(e).constructor):t.apply(e,n))}function fVn(e,t){if(t&&(zS(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hVn(e)}function hVn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _at(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_at=function(){return!!e})()}function I$(e){return I$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},I$(e)}function mVn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vee(e,t)}function Vee(e,t){return Vee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Vee(e,t)}function oy(e,t,n){return t=Nat(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nat(e){var t=pVn(e,"string");return zS(t)=="symbol"?t:t+""}function pVn(e,t){if(zS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var pp=(function(e){function t(){var n;cVn(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=dVn(this,t,[].concat(i)),oy(n,"state",{isAnimationFinished:!1}),oy(n,"id",N8("recharts-bar-")),oy(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),o&&o()}),oy(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),o&&o()}),n}return mVn(t,e),uVn(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,a=this.props,o=a.shape,s=a.dataKey,l=a.activeIndex,c=a.activeBar,u=Li(this.props,!1);return r&&r.map(function(f,h){var m=h===l,p=m?c:o,A=bs(bs(bs({},u),f),{},{isActive:m,option:p,index:h,dataKey:s,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return L.createElement(ul,B$({className:"recharts-bar-rectangle"},d$(i.props,f,h),{key:"rectangle-".concat(f?.x,"-").concat(f?.y,"-").concat(f?.value,"-").concat(h)}),L.createElement(wBe,A))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,a=i.data,o=i.layout,s=i.isAnimationActive,l=i.animationBegin,c=i.animationDuration,u=i.animationEasing,f=i.animationId,h=this.state.prevData;return L.createElement($y,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var p=m.t,A=a.map(function(v,y){var x=h&&h[y];if(x){var k=Mw(x.x,v.x),S=Mw(x.y,v.y),C=Mw(x.width,v.width),N=Mw(x.height,v.height);return bs(bs({},v),{},{x:k(p),y:S(p),width:C(p),height:N(p)})}if(o==="horizontal"){var E=Mw(0,v.height),D=E(p);return bs(bs({},v),{},{y:v.y+v.height-D,height:D})}var T=Mw(0,v.width),j=T(p);return bs(bs({},v),{},{width:j})});return L.createElement(ul,null,r.renderRectanglesStatically(A))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,a=r.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!Cce(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,a=i.data,o=i.dataKey,s=i.activeIndex,l=Li(this.props.background,!1);return a.map(function(c,u){c.value;var f=c.background,h=sVn(c,oVn);if(!f)return null;var m=bs(bs(bs(bs(bs({},h),{},{fill:"#eee"},f),l),d$(r.props,c,u)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:o,index:u,className:"recharts-bar-background-rectangle"});return L.createElement(wBe,B$({key:"background-bar-".concat(u),option:r.props.background,isActive:u===s},m))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,s=a.xAxis,l=a.yAxis,c=a.layout,u=a.children,f=zh(u,P8);if(!f)return null;var h=c==="vertical"?o[0].height/2:o[0].width/2,m=function(v,y){var x=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:x,errorVal:Rp(v,y)}},p={clipPath:r?"url(#clipPath-".concat(i,")"):null};return L.createElement(ul,p,f.map(function(A){return L.cloneElement(A,{key:"error-bar-".concat(i,"-").concat(A.props.dataKey),data:o,xAxis:s,yAxis:l,layout:c,offset:h,dataPointFormatter:m})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,a=r.data,o=r.className,s=r.xAxis,l=r.yAxis,c=r.left,u=r.top,f=r.width,h=r.height,m=r.isAnimationActive,p=r.background,A=r.id;if(i||!a||!a.length)return null;var v=this.state.isAnimationFinished,y=Xn("recharts-bar",o),x=s&&s.allowDataOverflow,k=l&&l.allowDataOverflow,S=x||k,C=Ui(A)?this.id:A;return L.createElement(ul,{className:y},x||k?L.createElement("defs",null,L.createElement("clipPath",{id:"clipPath-".concat(C)},L.createElement("rect",{x:x?c:c-f/2,y:k?u:u-h/2,width:x?f:f*2,height:k?h:h*2}))):null,L.createElement(ul,{className:"recharts-bar-rectangles",clipPath:S?"url(#clipPath-".concat(C,")"):null},p?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(S,C),(!m||v)&&ax.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])})(w.PureComponent);Cat=pp;oy(pp,"displayName","Bar");oy(pp,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!$T.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});oy(pp,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,u=e.dataStartIndex,f=e.displayedData,h=e.offset,m=MUn(r,n);if(!m)return null;var p=t.layout,A=n.type.defaultProps,v=A!==void 0?bs(bs({},A),n.props):n.props,y=v.dataKey,x=v.children,k=v.minPointSize,S=p==="horizontal"?o:a,C=c?S.scale.domain():null,N=QUn({numericAxis:S}),E=zh(x,jit),D=f.map(function(T,j){var O,B,M,$,U,P;c?O=RUn(c[u+j],C):(O=Rp(T,y),Array.isArray(O)||(O=[N,O]));var V=aVn(k,Cat.defaultProps.minPointSize)(O[1],j);if(p==="horizontal"){var Q,X=[o.scale(O[0]),o.scale(O[1])],Z=X[0],le=X[1];B=c5e({axis:a,ticks:s,bandSize:i,offset:m.offset,entry:T,index:j}),M=(Q=le??Z)!==null&&Q!==void 0?Q:void 0,$=m.size;var H=Z-le;if(U=Number.isNaN(H)?0:H,P={x:B,y:o.y,width:$,height:o.height},Math.abs(V)>0&&Math.abs(U)<Math.abs(V)){var q=Mh(U||V)*(Math.abs(V)-Math.abs(U));M-=q,U+=q}}else{var W=[a.scale(O[0]),a.scale(O[1])],te=W[0],ne=W[1];if(B=te,M=c5e({axis:o,ticks:l,bandSize:i,offset:m.offset,entry:T,index:j}),$=ne-te,U=m.size,P={x:a.x,y:M,width:a.width,height:U},Math.abs(V)>0&&Math.abs($)<Math.abs(V)){var re=Mh($||V)*(Math.abs(V)-Math.abs($));$+=re}}return bs(bs(bs({},T),{},{x:B,y:M,width:$,height:U,value:c?O:O[1],payload:T,background:P},E&&E[j]&&E[j].props),{},{tooltipPayload:[lat(n,T)],tooltipPosition:{x:B+$/2,y:M+U/2}})});return bs({data:D,layout:p},h)});function HF(e){"@babel/helpers - typeof";return HF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},HF(e)}function AVn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CBe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Eat(r.key),r)}}function gVn(e,t,n){return t&&CBe(e.prototype,t),n&&CBe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Eh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_Be(Object(n),!0).forEach(function(r){$8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_Be(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $8(e,t,n){return t=Eat(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eat(e){var t=vVn(e,"string");return HF(t)=="symbol"?t:t+""}function vVn(e,t){if(HF(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(HF(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yVn=function(t,n,r,i,a){var o=t.width,s=t.height,l=t.layout,c=t.children,u=Object.keys(n),f={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:s-r.bottom,bottomMirror:s-r.bottom},h=!!sd(c,pp);return u.reduce(function(m,p){var A=n[p],v=A.orientation,y=A.domain,x=A.padding,k=x===void 0?{}:x,S=A.mirror,C=A.reversed,N="".concat(v).concat(S?"Mirror":""),E,D,T,j,O;if(A.type==="number"&&(A.padding==="gap"||A.padding==="no-gap")){var B=y[1]-y[0],M=1/0,$=A.categoricalDomain.sort(N$n);if($.forEach(function(W,te){te>0&&(M=Math.min((W||0)-($[te-1]||0),M))}),Number.isFinite(M)){var U=M/B,P=A.layout==="vertical"?r.height:r.width;if(A.padding==="gap"&&(E=U*P/2),A.padding==="no-gap"){var V=jx(t.barCategoryGap,U*P),Q=U*P/2;E=Q-V-(Q-V)/P*V}}}i==="xAxis"?D=[r.left+(k.left||0)+(E||0),r.left+r.width-(k.right||0)-(E||0)]:i==="yAxis"?D=l==="horizontal"?[r.top+r.height-(k.bottom||0),r.top+(k.top||0)]:[r.top+(k.top||0)+(E||0),r.top+r.height-(k.bottom||0)-(E||0)]:D=A.range,C&&(D=[D[1],D[0]]);var X=jUn(A,a,h),Z=X.scale,le=X.realScaleType;Z.domain(y).range(D),PUn(Z);var H=VUn(Z,Eh(Eh({},A),{},{realScaleType:le}));i==="xAxis"?(O=v==="top"&&!S||v==="bottom"&&S,T=r.left,j=f[N]-O*A.height):i==="yAxis"&&(O=v==="left"&&!S||v==="right"&&S,T=f[N]-O*A.width,j=r.top);var q=Eh(Eh(Eh({},A),H),{},{realScaleType:le,x:T,y:j,scale:Z,width:i==="xAxis"?r.width:A.width,height:i==="yAxis"?r.height:A.height});return q.bandSize=x$(q,H),!A.hide&&i==="xAxis"?f[N]+=(O?-1:1)*q.height:A.hide||(f[N]+=(O?-1:1)*q.width),Eh(Eh({},m),{},$8({},p,q))},{})},Fat=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return{x:Math.min(r,a),y:Math.min(i,o),width:Math.abs(a-r),height:Math.abs(o-i)}},bVn=function(t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2;return Fat({x:n,y:r},{x:i,y:a})},Dat=(function(){function e(t){AVn(this,e),this.scale=t}return gVn(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,a=r.position;if(n!==void 0){if(a)switch(a){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],a=r[r.length-1];return i<=a?n>=i&&n<=a:n>=a&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])})();$8(Dat,"EPS",1e-4);var Dce=function(t){var n=Object.keys(t).reduce(function(r,i){return Eh(Eh({},r),{},$8({},i,Dat.create(t[i])))},{});return Eh(Eh({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return GHn(i,function(l,c){return n[c].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return Sat(i,function(a,o){return n[o].isInRange(a)})}})};function xVn(e){return(e%180+180)%180}var wVn=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=xVn(i),o=a*Math.PI/180,s=Math.atan(r/n),l=o>s&&o<Math.PI-s?r/Math.sin(o):n/Math.cos(o);return Math.abs(l)},YK,NBe;function kVn(){if(NBe)return YK;NBe=1;var e=c0(),t=RT(),n=F8();function r(i){return function(a,o,s){var l=Object(a);if(!t(a)){var c=e(o,3);a=n(a),o=function(f){return c(l[f],f,l)}}var u=i(a,o,s);return u>-1?l[c?a[u]:u]:void 0}}return YK=r,YK}var XK,EBe;function SVn(){if(EBe)return XK;EBe=1;var e=bat();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return XK=t,XK}var ZK,FBe;function CVn(){if(FBe)return ZK;FBe=1;var e=xit(),t=c0(),n=SVn(),r=Math.max;function i(a,o,s){var l=a==null?0:a.length;if(!l)return-1;var c=s==null?0:n(s);return c<0&&(c=r(l+c,0)),e(a,t(o,3),c)}return ZK=i,ZK}var JK,DBe;function _Vn(){if(DBe)return JK;DBe=1;var e=kVn(),t=CVn(),n=e(t);return JK=n,JK}var NVn=_Vn();const EVn=Fi(NVn);var FVn=Jrt();const DVn=Fi(FVn);var TVn=DVn(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),Tce=w.createContext(void 0),Oce=w.createContext(void 0),Tat=w.createContext(void 0),Oat=w.createContext({}),Bat=w.createContext(void 0),Iat=w.createContext(0),jat=w.createContext(0),TBe=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,a=n.offset,o=t.clipPathId,s=t.children,l=t.width,c=t.height,u=TVn(a);return L.createElement(Tce.Provider,{value:r},L.createElement(Oce.Provider,{value:i},L.createElement(Oat.Provider,{value:a},L.createElement(Tat.Provider,{value:u},L.createElement(Bat.Provider,{value:o},L.createElement(Iat.Provider,{value:c},L.createElement(jat.Provider,{value:l},s)))))))},OVn=function(){return w.useContext(Bat)},Pat=function(t){var n=w.useContext(Tce);n==null&&Mx();var r=n[t];return r==null&&Mx(),r},BVn=function(){var t=w.useContext(Tce);return qv(t)},IVn=function(){var t=w.useContext(Oce),n=EVn(t,function(r){return Sat(r.domain,Number.isFinite)});return n||qv(t)},Mat=function(t){var n=w.useContext(Oce);n==null&&Mx();var r=n[t];return r==null&&Mx(),r},jVn=function(){var t=w.useContext(Tat);return t},PVn=function(){return w.useContext(Oat)},Bce=function(){return w.useContext(jat)},Ice=function(){return w.useContext(Iat)};function HS(e){"@babel/helpers - typeof";return HS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},HS(e)}function MVn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RVn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$at(r.key),r)}}function $Vn(e,t,n){return t&&RVn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function LVn(e,t,n){return t=j$(t),UVn(e,Rat()?Reflect.construct(t,n||[],j$(e).constructor):t.apply(e,n))}function UVn(e,t){if(t&&(HS(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zVn(e)}function zVn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rat(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Rat=function(){return!!e})()}function j$(e){return j$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},j$(e)}function HVn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qee(e,t)}function Qee(e,t){return Qee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Qee(e,t)}function OBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function BBe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OBe(Object(n),!0).forEach(function(r){jce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jce(e,t,n){return t=$at(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $at(e){var t=VVn(e,"string");return HS(t)=="symbol"?t:t+""}function VVn(e,t){if(HS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(HS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function QVn(e,t){return KVn(e)||WVn(e,t)||GVn(e,t)||qVn()}function qVn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1179
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GVn(e,t){if(e){if(typeof e=="string")return IBe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IBe(e,t)}}function IBe(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function WVn(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function KVn(e){if(Array.isArray(e))return e}function qee(){return qee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qee.apply(this,arguments)}var YVn=function(t,n){var r;return L.isValidElement(t)?r=L.cloneElement(t,n):ni(t)?r=t(n):r=L.createElement("line",qee({},n,{className:"recharts-reference-line-line"})),r},XVn=function(t,n,r,i,a,o,s,l,c){var u=a.x,f=a.y,h=a.width,m=a.height;if(r){var p=c.y,A=t.y.apply(p,{position:o});if(Np(c,"discard")&&!t.y.isInRange(A))return null;var v=[{x:u+h,y:A},{x:u,y:A}];return l==="left"?v.reverse():v}if(n){var y=c.x,x=t.x.apply(y,{position:o});if(Np(c,"discard")&&!t.x.isInRange(x))return null;var k=[{x,y:f+m},{x,y:f}];return s==="top"?k.reverse():k}if(i){var S=c.segment,C=S.map(function(N){return t.apply(N,{position:o})});return Np(c,"discard")&&HHn(C,function(N){return!t.isInRange(N)})?null:C}return null};function ZVn(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,s=e.className,l=e.alwaysShow,c=OVn(),u=Pat(i),f=Mat(a),h=jVn();if(!c||!h)return null;ug(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=Dce({x:u.scale,y:f.scale}),p=qs(t),A=qs(n),v=r&&r.length===2,y=XVn(m,p,A,v,h,e.position,u.orientation,f.orientation,e);if(!y)return null;var x=QVn(y,2),k=x[0],S=k.x,C=k.y,N=x[1],E=N.x,D=N.y,T=Np(e,"hidden")?"url(#".concat(c,")"):void 0,j=BBe(BBe({clipPath:T},Li(e,!0)),{},{x1:S,y1:C,x2:E,y2:D});return L.createElement(ul,{className:Xn("recharts-reference-line",s)},YVn(o,j),lc.renderCallByParent(e,bVn({x1:S,y1:C,x2:E,y2:D})))}var Pce=(function(e){function t(){return MVn(this,t),LVn(this,t,arguments)}return HVn(t,e),$Vn(t,[{key:"render",value:function(){return L.createElement(ZVn,this.props)}}])})(L.Component);jce(Pce,"displayName","ReferenceLine");jce(Pce,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Gee(){return Gee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gee.apply(this,arguments)}function VS(e){"@babel/helpers - typeof";return VS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},VS(e)}function jBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function PBe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jBe(Object(n),!0).forEach(function(r){L8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function JVn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eQn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Uat(r.key),r)}}function tQn(e,t,n){return t&&eQn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function nQn(e,t,n){return t=P$(t),rQn(e,Lat()?Reflect.construct(t,n||[],P$(e).constructor):t.apply(e,n))}function rQn(e,t){if(t&&(VS(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iQn(e)}function iQn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lat(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lat=function(){return!!e})()}function P$(e){return P$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},P$(e)}function aQn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wee(e,t)}function Wee(e,t){return Wee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Wee(e,t)}function L8(e,t,n){return t=Uat(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uat(e){var t=oQn(e,"string");return VS(t)=="symbol"?t:t+""}function oQn(e,t){if(VS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(VS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var sQn=function(t){var n=t.x,r=t.y,i=t.xAxis,a=t.yAxis,o=Dce({x:i.scale,y:a.scale}),s=o.apply({x:n,y:r},{bandAware:!0});return Np(t,"discard")&&!o.isInRange(s)?null:s},U8=(function(e){function t(){return JVn(this,t),nQn(this,t,arguments)}return aQn(t,e),tQn(t,[{key:"render",value:function(){var r=this.props,i=r.x,a=r.y,o=r.r,s=r.alwaysShow,l=r.clipPathId,c=qs(i),u=qs(a);if(ug(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!u)return null;var f=sQn(this.props);if(!f)return null;var h=f.x,m=f.y,p=this.props,A=p.shape,v=p.className,y=Np(this.props,"hidden")?"url(#".concat(l,")"):void 0,x=PBe(PBe({clipPath:y},Li(this.props,!0)),{},{cx:h,cy:m});return L.createElement(ul,{className:Xn("recharts-reference-dot",v)},t.renderDot(A,x),lc.renderCallByParent(this.props,{x:h-o,y:m-o,width:2*o,height:2*o}))}}])})(L.Component);L8(U8,"displayName","ReferenceDot");L8(U8,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});L8(U8,"renderDot",function(e,t){var n;return L.isValidElement(e)?n=L.cloneElement(e,t):ni(e)?n=e(t):n=L.createElement(yat,Gee({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function Kee(){return Kee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kee.apply(this,arguments)}function QS(e){"@babel/helpers - typeof";return QS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},QS(e)}function MBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function RBe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MBe(Object(n),!0).forEach(function(r){z8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lQn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cQn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Hat(r.key),r)}}function uQn(e,t,n){return t&&cQn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function dQn(e,t,n){return t=M$(t),fQn(e,zat()?Reflect.construct(t,n||[],M$(e).constructor):t.apply(e,n))}function fQn(e,t){if(t&&(QS(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hQn(e)}function hQn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zat(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zat=function(){return!!e})()}function M$(e){return M$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},M$(e)}function mQn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yee(e,t)}function Yee(e,t){return Yee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Yee(e,t)}function z8(e,t,n){return t=Hat(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hat(e){var t=pQn(e,"string");return QS(t)=="symbol"?t:t+""}function pQn(e,t){if(QS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(QS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var AQn=function(t,n,r,i,a){var o=a.x1,s=a.x2,l=a.y1,c=a.y2,u=a.xAxis,f=a.yAxis;if(!u||!f)return null;var h=Dce({x:u.scale,y:f.scale}),m={x:t?h.x.apply(o,{position:"start"}):h.x.rangeMin,y:r?h.y.apply(l,{position:"start"}):h.y.rangeMin},p={x:n?h.x.apply(s,{position:"end"}):h.x.rangeMax,y:i?h.y.apply(c,{position:"end"}):h.y.rangeMax};return Np(a,"discard")&&(!h.isInRange(m)||!h.isInRange(p))?null:Fat(m,p)},H8=(function(e){function t(){return lQn(this,t),dQn(this,t,arguments)}return mQn(t,e),uQn(t,[{key:"render",value:function(){var r=this.props,i=r.x1,a=r.x2,o=r.y1,s=r.y2,l=r.className,c=r.alwaysShow,u=r.clipPathId;ug(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=qs(i),h=qs(a),m=qs(o),p=qs(s),A=this.props.shape;if(!f&&!h&&!m&&!p&&!A)return null;var v=AQn(f,h,m,p,this.props);if(!v&&!A)return null;var y=Np(this.props,"hidden")?"url(#".concat(u,")"):void 0;return L.createElement(ul,{className:Xn("recharts-reference-area",l)},t.renderRect(A,RBe(RBe({clipPath:y},Li(this.props,!0)),v)),lc.renderCallByParent(this.props,v))}}])})(L.Component);z8(H8,"displayName","ReferenceArea");z8(H8,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});z8(H8,"renderRect",function(e,t){var n;return L.isValidElement(e)?n=L.cloneElement(e,t):ni(e)?n=e(t):n=L.createElement(Fce,Kee({},t,{className:"recharts-reference-area-rect"})),n});function Vat(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function gQn(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return wVn(r,n)}function vQn(e,t,n){var r=n==="width",i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:r?i:a,end:r?i+o:a+s}:{start:r?i+o:a+s,end:r?i:a}}function R$(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function yQn(e,t){return Vat(e,t+1)}function bQn(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,s=t.end,l=0,c=1,u=o,f=function(){var p=r?.[l];if(p===void 0)return{v:Vat(r,c)};var A=l,v,y=function(){return v===void 0&&(v=n(p,A)),v},x=p.coordinate,k=l===0||R$(e,x,y,u,s);k||(l=0,u=o,c+=1),k&&(u=x+e*(y()/2+i),l+=c)},h;c<=a.length;)if(h=f(),h)return h.v;return[]}function VF(e){"@babel/helpers - typeof";return VF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},VF(e)}function $Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$Be(Object(n),!0).forEach(function(r){xQn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$Be(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xQn(e,t,n){return t=wQn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wQn(e){var t=kQn(e,"string");return VF(t)=="symbol"?t:t+""}function kQn(e,t){if(VF(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(VF(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function SQn(e,t,n,r,i){for(var a=(r||[]).slice(),o=a.length,s=t.start,l=t.end,c=function(h){var m=a[h],p,A=function(){return p===void 0&&(p=n(m,h)),p};if(h===o-1){var v=e*(m.coordinate+e*A()/2-l);a[h]=m=rc(rc({},m),{},{tickCoord:v>0?m.coordinate-v*e:m.coordinate})}else a[h]=m=rc(rc({},m),{},{tickCoord:m.coordinate});var y=R$(e,m.tickCoord,A,s,l);y&&(l=m.tickCoord-e*(A()/2+i),a[h]=rc(rc({},m),{},{isShow:!0}))},u=o-1;u>=0;u--)c(u);return a}function CQn(e,t,n,r,i,a){var o=(r||[]).slice(),s=o.length,l=t.start,c=t.end;if(a){var u=r[s-1],f=n(u,s-1),h=e*(u.coordinate+e*f/2-c);o[s-1]=u=rc(rc({},u),{},{tickCoord:h>0?u.coordinate-h*e:u.coordinate});var m=R$(e,u.tickCoord,function(){return f},l,c);m&&(c=u.tickCoord-e*(f/2+i),o[s-1]=rc(rc({},u),{},{isShow:!0}))}for(var p=a?s-1:s,A=function(x){var k=o[x],S,C=function(){return S===void 0&&(S=n(k,x)),S};if(x===0){var N=e*(k.coordinate-e*C()/2-l);o[x]=k=rc(rc({},k),{},{tickCoord:N<0?k.coordinate-N*e:k.coordinate})}else o[x]=k=rc(rc({},k),{},{tickCoord:k.coordinate});var E=R$(e,k.tickCoord,C,l,c);E&&(l=k.tickCoord+e*(C()/2+i),o[x]=rc(rc({},k),{},{isShow:!0}))},v=0;v<p;v++)A(v);return o}function Mce(e,t,n){var r=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,s=e.orientation,l=e.interval,c=e.tickFormatter,u=e.unit,f=e.angle;if(!i||!i.length||!r)return[];if(dn(l)||$T.isSsr)return yQn(i,typeof l=="number"&&dn(l)?l:0);var h=[],m=s==="top"||s==="bottom"?"width":"height",p=u&&m==="width"?Y2(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},A=function(k,S){var C=ni(c)?c(k.value,S):k.value;return m==="width"?gQn(Y2(C,{fontSize:t,letterSpacing:n}),p,f):Y2(C,{fontSize:t,letterSpacing:n})[m]},v=i.length>=2?Mh(i[1].coordinate-i[0].coordinate):1,y=vQn(a,v,m);return l==="equidistantPreserveStart"?bQn(v,y,A,i,o):(l==="preserveStart"||l==="preserveStartEnd"?h=CQn(v,y,A,i,o,l==="preserveStartEnd"):h=SQn(v,y,A,i,o),h.filter(function(x){return x.isShow}))}var _Qn=["viewBox"],NQn=["viewBox"],EQn=["ticks"];function qS(e){"@babel/helpers - typeof";return qS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qS(e)}function Ak(){return Ak=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ak.apply(this,arguments)}function LBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $s(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LBe(Object(n),!0).forEach(function(r){Rce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eY(e,t){if(e==null)return{};var n=FQn(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function FQn(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function DQn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UBe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qat(r.key),r)}}function TQn(e,t,n){return t&&UBe(e.prototype,t),n&&UBe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function OQn(e,t,n){return t=$$(t),BQn(e,Qat()?Reflect.construct(t,n||[],$$(e).constructor):t.apply(e,n))}function BQn(e,t){if(t&&(qS(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return IQn(e)}function IQn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qat(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qat=function(){return!!e})()}function $$(e){return $$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$$(e)}function jQn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xee(e,t)}function Xee(e,t){return Xee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Xee(e,t)}function Rce(e,t,n){return t=qat(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qat(e){var t=PQn(e,"string");return qS(t)=="symbol"?t:t+""}function PQn(e,t){if(qS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var zC=(function(e){function t(n){var r;return DQn(this,t),r=OQn(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return jQn(t,e),TQn(t,[{key:"shouldComponentUpdate",value:function(r,i){var a=r.viewBox,o=eY(r,_Qn),s=this.props,l=s.viewBox,c=eY(s,NQn);return!Vk(a,l)||!Vk(o,c)||!Vk(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,a=i.x,o=i.y,s=i.width,l=i.height,c=i.orientation,u=i.tickSize,f=i.mirror,h=i.tickMargin,m,p,A,v,y,x,k=f?-1:1,S=r.tickSize||u,C=dn(r.tickCoord)?r.tickCoord:r.coordinate;switch(c){case"top":m=p=r.coordinate,v=o+ +!f*l,A=v-k*S,x=A-k*h,y=C;break;case"left":A=v=r.coordinate,p=a+ +!f*s,m=p-k*S,y=m-k*h,x=C;break;case"right":A=v=r.coordinate,p=a+ +f*s,m=p+k*S,y=m+k*h,x=C;break;default:m=p=r.coordinate,v=o+ +f*l,A=v+k*S,x=A+k*h,y=C;break}return{line:{x1:m,y1:A,x2:p,y2:v},tick:{x:y,y:x}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.orientation,c=r.mirror,u=r.axisLine,f=$s($s($s({},Li(this.props,!1)),Li(u,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var h=+(l==="top"&&!c||l==="bottom"&&c);f=$s($s({},f),{},{x1:i,y1:a+h*s,x2:i+o,y2:a+h*s})}else{var m=+(l==="left"&&!c||l==="right"&&c);f=$s($s({},f),{},{x1:i+m*o,y1:a,x2:i+m*o,y2:a+s})}return L.createElement("line",Ak({},f,{className:Xn("recharts-cartesian-axis-line",Tf(u,"className"))}))}},{key:"renderTicks",value:function(r,i,a){var o=this,s=this.props,l=s.tickLine,c=s.stroke,u=s.tick,f=s.tickFormatter,h=s.unit,m=Mce($s($s({},this.props),{},{ticks:r}),i,a),p=this.getTickTextAnchor(),A=this.getTickVerticalAnchor(),v=Li(this.props,!1),y=Li(u,!1),x=$s($s({},v),{},{fill:"none"},Li(l,!1)),k=m.map(function(S,C){var N=o.getTickLineCoord(S),E=N.line,D=N.tick,T=$s($s($s($s({textAnchor:p,verticalAnchor:A},v),{},{stroke:"none",fill:c},y),D),{},{index:C,payload:S,visibleTicksCount:m.length,tickFormatter:f});return L.createElement(ul,Ak({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},d$(o.props,S,C)),l&&L.createElement("line",Ak({},x,E,{className:Xn("recharts-cartesian-axis-tick-line",Tf(l,"className"))})),u&&t.renderTickItem(u,T,"".concat(ni(f)?f(S.value,C):S.value).concat(h||"")))});return L.createElement("g",{className:"recharts-cartesian-axis-ticks"},k)}},{key:"render",value:function(){var r=this,i=this.props,a=i.axisLine,o=i.width,s=i.height,l=i.ticksGenerator,c=i.className,u=i.hide;if(u)return null;var f=this.props,h=f.ticks,m=eY(f,EQn),p=h;return ni(l)&&(p=h&&h.length>0?l(this.props):l(m)),o<=0||s<=0||!p||!p.length?null:L.createElement(ul,{className:Xn("recharts-cartesian-axis",c),ref:function(v){r.layerReference=v}},a&&this.renderAxisLine(),this.renderTicks(p,this.state.fontSize,this.state.letterSpacing),lc.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,a){var o,s=Xn(i.className,"recharts-cartesian-axis-tick-value");return L.isValidElement(r)?o=L.cloneElement(r,$s($s({},i),{},{className:s})):ni(r)?o=r($s($s({},i),{},{className:s})):o=L.createElement(g$,Ak({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(w.Component);Rce(zC,"displayName","CartesianAxis");Rce(zC,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var MQn=["x1","y1","x2","y2","key"],RQn=["offset"];function Rx(e){"@babel/helpers - typeof";return Rx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rx(e)}function zBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zBe(Object(n),!0).forEach(function(r){$Qn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $Qn(e,t,n){return t=LQn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function LQn(e){var t=UQn(e,"string");return Rx(t)=="symbol"?t:t+""}function UQn(e,t){if(Rx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mb(){return Mb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mb.apply(this,arguments)}function HBe(e,t){if(e==null)return{};var n=zQn(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function zQn(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var HQn=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,a=t.y,o=t.width,s=t.height,l=t.ry;return L.createElement("rect",{x:i,y:a,ry:l,width:o,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function Gat(e,t){var n;if(L.isValidElement(e))n=L.cloneElement(e,t);else if(ni(e))n=e(t);else{var r=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,l=HBe(t,MQn),c=Li(l,!1);c.offset;var u=HBe(c,RQn);n=L.createElement("line",Mb({},u,{x1:r,y1:i,x2:a,y2:o,fill:"none",key:s}))}return n}function VQn(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var c=cc(cc({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return Gat(i,c)});return L.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function QQn(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var c=cc(cc({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return Gat(i,c)});return L.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function qQn(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var u=s.map(function(h){return Math.round(h+i-i)}).sort(function(h,m){return h-m});i!==u[0]&&u.unshift(0);var f=u.map(function(h,m){var p=!u[m+1],A=p?i+o-h:u[m+1]-h;if(A<=0)return null;var v=m%t.length;return L.createElement("rect",{key:"react-".concat(m),y:h,x:r,height:A,width:a,stroke:"none",fill:t[v],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return L.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function GQn(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!n||!r||!r.length)return null;var u=c.map(function(h){return Math.round(h+a-a)}).sort(function(h,m){return h-m});a!==u[0]&&u.unshift(0);var f=u.map(function(h,m){var p=!u[m+1],A=p?a+s-h:u[m+1]-h;if(A<=0)return null;var v=m%r.length;return L.createElement("rect",{key:"react-".concat(m),x:h,y:o,width:A,height:l,stroke:"none",fill:r[v],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return L.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var WQn=function(t,n){var r=t.xAxis,i=t.width,a=t.height,o=t.offset;return oat(Mce(cc(cc(cc({},zC.defaultProps),r),{},{ticks:ig(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,n)},KQn=function(t,n){var r=t.yAxis,i=t.width,a=t.height,o=t.offset;return oat(Mce(cc(cc(cc({},zC.defaultProps),r),{},{ticks:ig(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,n)},$w={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Wat(e){var t,n,r,i,a,o,s=Bce(),l=Ice(),c=PVn(),u=cc(cc({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:$w.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:$w.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:$w.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:$w.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:$w.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:$w.verticalFill,x:dn(e.x)?e.x:c.left,y:dn(e.y)?e.y:c.top,width:dn(e.width)?e.width:c.width,height:dn(e.height)?e.height:c.height}),f=u.x,h=u.y,m=u.width,p=u.height,A=u.syncWithTicks,v=u.horizontalValues,y=u.verticalValues,x=BVn(),k=IVn();if(!dn(m)||m<=0||!dn(p)||p<=0||!dn(f)||f!==+f||!dn(h)||h!==+h)return null;var S=u.verticalCoordinatesGenerator||WQn,C=u.horizontalCoordinatesGenerator||KQn,N=u.horizontalPoints,E=u.verticalPoints;if((!N||!N.length)&&ni(C)){var D=v&&v.length,T=C({yAxis:k?cc(cc({},k),{},{ticks:D?v:k.ticks}):void 0,width:s,height:l,offset:c},D?!0:A);ug(Array.isArray(T),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Rx(T),"]")),Array.isArray(T)&&(N=T)}if((!E||!E.length)&&ni(S)){var j=y&&y.length,O=S({xAxis:x?cc(cc({},x),{},{ticks:j?y:x.ticks}):void 0,width:s,height:l,offset:c},j?!0:A);ug(Array.isArray(O),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Rx(O),"]")),Array.isArray(O)&&(E=O)}return L.createElement("g",{className:"recharts-cartesian-grid"},L.createElement(HQn,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),L.createElement(VQn,Mb({},u,{offset:c,horizontalPoints:N,xAxis:x,yAxis:k})),L.createElement(QQn,Mb({},u,{offset:c,verticalPoints:E,xAxis:x,yAxis:k})),L.createElement(qQn,Mb({},u,{horizontalPoints:N})),L.createElement(GQn,Mb({},u,{verticalPoints:E})))}Wat.displayName="CartesianGrid";function GS(e){"@babel/helpers - typeof";return GS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},GS(e)}function YQn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function XQn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xat(r.key),r)}}function ZQn(e,t,n){return t&&XQn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function JQn(e,t,n){return t=L$(t),eqn(e,Kat()?Reflect.construct(t,n||[],L$(e).constructor):t.apply(e,n))}function eqn(e,t){if(t&&(GS(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return tqn(e)}function tqn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kat(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Kat=function(){return!!e})()}function L$(e){return L$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},L$(e)}function nqn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zee(e,t)}function Zee(e,t){return Zee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Zee(e,t)}function Yat(e,t,n){return t=Xat(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xat(e){var t=rqn(e,"string");return GS(t)=="symbol"?t:t+""}function rqn(e,t){if(GS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(GS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Jee(){return Jee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jee.apply(this,arguments)}function iqn(e){var t=e.xAxisId,n=Bce(),r=Ice(),i=Pat(t);return i==null?null:w.createElement(zC,Jee({},i,{className:Xn("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(o){return ig(o,!0)}}))}var V8=(function(e){function t(){return YQn(this,t),JQn(this,t,arguments)}return nqn(t,e),ZQn(t,[{key:"render",value:function(){return w.createElement(iqn,this.props)}}])})(w.Component);Yat(V8,"displayName","XAxis");Yat(V8,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function WS(e){"@babel/helpers - typeof";return WS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},WS(e)}function aqn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oqn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eot(r.key),r)}}function sqn(e,t,n){return t&&oqn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function lqn(e,t,n){return t=U$(t),cqn(e,Zat()?Reflect.construct(t,n||[],U$(e).constructor):t.apply(e,n))}function cqn(e,t){if(t&&(WS(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uqn(e)}function uqn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zat(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Zat=function(){return!!e})()}function U$(e){return U$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},U$(e)}function dqn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ete(e,t)}function ete(e,t){return ete=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ete(e,t)}function Jat(e,t,n){return t=eot(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eot(e){var t=fqn(e,"string");return WS(t)=="symbol"?t:t+""}function fqn(e,t){if(WS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(WS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tte(){return tte=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tte.apply(this,arguments)}var hqn=function(t){var n=t.yAxisId,r=Bce(),i=Ice(),a=Mat(n);return a==null?null:w.createElement(zC,tte({},a,{className:Xn("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(s){return ig(s,!0)}}))},$ce=(function(e){function t(){return aqn(this,t),lqn(this,t,arguments)}return dqn(t,e),sqn(t,[{key:"render",value:function(){return w.createElement(hqn,this.props)}}])})(w.Component);Jat($ce,"displayName","YAxis");Jat($ce,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function VBe(e){return gqn(e)||Aqn(e)||pqn(e)||mqn()}function mqn(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1180
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pqn(e,t){if(e){if(typeof e=="string")return nte(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nte(e,t)}}function Aqn(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gqn(e){if(Array.isArray(e))return nte(e)}function nte(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var rte=function(t,n,r,i,a){var o=zh(t,Pce),s=zh(t,U8),l=[].concat(VBe(o),VBe(s)),c=zh(t,H8),u="".concat(i,"Id"),f=i[0],h=n;if(l.length&&(h=l.reduce(function(A,v){if(v.props[u]===r&&Np(v.props,"extendDomain")&&dn(v.props[f])){var y=v.props[f];return[Math.min(A[0],y),Math.max(A[1],y)]}return A},h)),c.length){var m="".concat(f,"1"),p="".concat(f,"2");h=c.reduce(function(A,v){if(v.props[u]===r&&Np(v.props,"extendDomain")&&dn(v.props[m])&&dn(v.props[p])){var y=v.props[m],x=v.props[p];return[Math.min(A[0],y,x),Math.max(A[1],y,x)]}return A},h)}return a&&a.length&&(h=a.reduce(function(A,v){return dn(v)?[Math.min(A[0],v),Math.max(A[1],v)]:A},h)),h},tY={exports:{}},QBe;function vqn(){return QBe||(QBe=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function a(l,c,u,f,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var m=new i(u,f||l,h),p=n?n+c:c;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],m]:l._events[p].push(m):(l._events[p]=m,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,f;if(this._eventsCount===0)return c;for(f in u=this._events)t.call(u,f)&&c.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=n?n+c:c,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,m=f.length,p=new Array(m);h<m;h++)p[h]=f[h].fn;return p},s.prototype.listenerCount=function(c){var u=n?n+c:c,f=this._events[u];return f?f.fn?1:f.length:0},s.prototype.emit=function(c,u,f,h,m,p){var A=n?n+c:c;if(!this._events[A])return!1;var v=this._events[A],y=arguments.length,x,k;if(v.fn){switch(v.once&&this.removeListener(c,v.fn,void 0,!0),y){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,u),!0;case 3:return v.fn.call(v.context,u,f),!0;case 4:return v.fn.call(v.context,u,f,h),!0;case 5:return v.fn.call(v.context,u,f,h,m),!0;case 6:return v.fn.call(v.context,u,f,h,m,p),!0}for(k=1,x=new Array(y-1);k<y;k++)x[k-1]=arguments[k];v.fn.apply(v.context,x)}else{var S=v.length,C;for(k=0;k<S;k++)switch(v[k].once&&this.removeListener(c,v[k].fn,void 0,!0),y){case 1:v[k].fn.call(v[k].context);break;case 2:v[k].fn.call(v[k].context,u);break;case 3:v[k].fn.call(v[k].context,u,f);break;case 4:v[k].fn.call(v[k].context,u,f,h);break;default:if(!x)for(C=1,x=new Array(y-1);C<y;C++)x[C-1]=arguments[C];v[k].fn.apply(v[k].context,x)}}return!0},s.prototype.on=function(c,u,f){return a(this,c,u,f,!1)},s.prototype.once=function(c,u,f){return a(this,c,u,f,!0)},s.prototype.removeListener=function(c,u,f,h){var m=n?n+c:c;if(!this._events[m])return this;if(!u)return o(this,m),this;var p=this._events[m];if(p.fn)p.fn===u&&(!h||p.once)&&(!f||p.context===f)&&o(this,m);else{for(var A=0,v=[],y=p.length;A<y;A++)(p[A].fn!==u||h&&!p[A].once||f&&p[A].context!==f)&&v.push(p[A]);v.length?this._events[m]=v.length===1?v[0]:v:o(this,m)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&o(this,u)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(tY)),tY.exports}var yqn=vqn();const bqn=Fi(yqn);var nY=new bqn,rY="recharts.syncMouseEvents";function QF(e){"@babel/helpers - typeof";return QF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},QF(e)}function xqn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wqn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tot(r.key),r)}}function kqn(e,t,n){return t&&wqn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function iY(e,t,n){return t=tot(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tot(e){var t=Sqn(e,"string");return QF(t)=="symbol"?t:t+""}function Sqn(e,t){if(QF(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(QF(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Cqn=(function(){function e(){xqn(this,e),iY(this,"activeIndex",0),iY(this,"coordinateList",[]),iY(this,"layout","horizontal")}return kqn(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,a=i===void 0?null:i,o=n.container,s=o===void 0?null:o,l=n.layout,c=l===void 0?null:l,u=n.offset,f=u===void 0?null:u,h=n.mouseHandlerCallback,m=h===void 0?null:h;this.coordinateList=(r=a??this.coordinateList)!==null&&r!==void 0?r:[],this.container=s??this.container,this.layout=c??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=m??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,o=i.y,s=i.height,l=this.coordinateList[this.activeIndex].coordinate,c=((n=window)===null||n===void 0?void 0:n.scrollX)||0,u=((r=window)===null||r===void 0?void 0:r.scrollY)||0,f=a+l+c,h=o+this.offset.top+s/2+u;this.mouseHandlerCallback({pageX:f,pageY:h})}}}])})();function _qn(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e?.[0],i=e?.[1];if(r&&i&&dn(r)&&dn(i))return!0}return!1}function Nqn(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function not(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle,o=Pl(t,n,r,i),s=Pl(t,n,r,a);return{points:[o,s],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function Eqn(e,t,n){var r,i,a,o;if(e==="horizontal")r=t.x,a=r,i=n.top,o=n.top+n.height;else if(e==="vertical")i=t.y,o=i,r=n.left,a=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,c=t.innerRadius,u=t.outerRadius,f=t.angle,h=Pl(s,l,c,f),m=Pl(s,l,u,f);r=h.x,i=h.y,a=m.x,o=m.y}else return not(t);return[{x:r,y:i},{x:a,y:o}]}function qF(e){"@babel/helpers - typeof";return qF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qF(e)}function qBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function TI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qBe(Object(n),!0).forEach(function(r){Fqn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Fqn(e,t,n){return t=Dqn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dqn(e){var t=Tqn(e,"string");return qF(t)=="symbol"?t:t+""}function Tqn(e,t){if(qF(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qF(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Oqn(e){var t,n,r=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,s=e.activePayload,l=e.offset,c=e.activeTooltipIndex,u=e.tooltipAxisBandSize,f=e.layout,h=e.chartName,m=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!m||!a||!o||h!=="ScatterChart"&&i!=="axis")return null;var p,A=_5e;if(h==="ScatterChart")p=o,A=H9n;else if(h==="BarChart")p=Nqn(f,o,l,u),A=Fce;else if(f==="radial"){var v=not(o),y=v.cx,x=v.cy,k=v.radius,S=v.startAngle,C=v.endAngle;p={cx:y,cy:x,startAngle:S,endAngle:C,innerRadius:k,outerRadius:k},A=dat}else p={points:Eqn(f,o,l)},A=_5e;var N=TI(TI(TI(TI({stroke:"#ccc",pointerEvents:"none"},l),p),Li(m,!1)),{},{payload:s,payloadIndex:c,className:Xn("recharts-tooltip-cursor",m.className)});return w.isValidElement(m)?w.cloneElement(m,N):w.createElement(A,N)}var Bqn=["item"],Iqn=["children","className","width","height","style","compact","title","desc"];function KS(e){"@babel/helpers - typeof";return KS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},KS(e)}function gk(){return gk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gk.apply(this,arguments)}function GBe(e,t){return Mqn(e)||Pqn(e,t)||iot(e,t)||jqn()}function jqn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1181
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
1182
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iot(e,t){if(e){if(typeof e=="string")return ate(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ate(e,t)}}function Gqn(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Wqn(e){if(Array.isArray(e))return ate(e)}function ate(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function KBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Nt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KBe(Object(n),!0).forEach(function(r){lr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lr(e,t,n){return t=aot(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aot(e){var t=Kqn(e,"string");return KS(t)=="symbol"?t:t+""}function Kqn(e,t){if(KS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(KS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Yqn={xAxis:["bottom","top"],yAxis:["left","right"]},Xqn={width:"100%",height:"100%"},oot={x:0,y:0};function OI(e){return e}var Zqn=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},Jqn=function(t,n,r,i){var a=n.find(function(u){return u&&u.index===r});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,s=i.radius;return Nt(Nt(Nt({},i),Pl(i.cx,i.cy,s,o)),{},{angle:o,radius:s})}var l=a.coordinate,c=i.angle;return Nt(Nt(Nt({},i),Pl(i.cx,i.cy,l,c)),{},{angle:c,radius:l})}return oot},Q8=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,a=n.dataEndIndex,o=(r??[]).reduce(function(s,l){var c=l.props.data;return c&&c.length?[].concat(YS(s),YS(c)):s},[]);return o.length>0?o:t&&t.length&&dn(i)&&dn(a)?t.slice(i,a+1):[]};function sot(e){return e==="number"?[0,"auto"]:void 0}var ote=function(t,n,r,i){var a=t.graphicalItems,o=t.tooltipAxis,s=Q8(n,t);return r<0||!a||!a.length||r>=s.length?null:a.reduce(function(l,c){var u,f=(u=c.props.data)!==null&&u!==void 0?u:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(o.dataKey&&!o.allowDuplicatedCategory){var m=f===void 0?s:f;h=ree(m,o.dataKey,i)}else h=f&&f[r]||s[r];return h?[].concat(YS(l),[lat(c,h)]):l},[])},YBe=function(t,n,r,i){var a=i||{x:t.chartX,y:t.chartY},o=Zqn(a,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,u=FUn(o,s,c,l);if(u>=0&&c){var f=c[u]&&c[u].value,h=ote(t,n,u,f),m=Jqn(r,s,u,a);return{activeTooltipIndex:u,activeLabel:f,activePayload:h,activeCoordinate:m}}return null},eGn=function(t,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.layout,f=t.children,h=t.stackOffset,m=aat(u,a);return r.reduce(function(p,A){var v,y=A.type.defaultProps!==void 0?Nt(Nt({},A.type.defaultProps),A.props):A.props,x=y.type,k=y.dataKey,S=y.allowDataOverflow,C=y.allowDuplicatedCategory,N=y.scale,E=y.ticks,D=y.includeHidden,T=y[o];if(p[T])return p;var j=Q8(t.data,{graphicalItems:i.filter(function(H){var q,W=o in H.props?H.props[o]:(q=H.type.defaultProps)===null||q===void 0?void 0:q[o];return W===T}),dataStartIndex:l,dataEndIndex:c}),O=j.length,B,M,$;_qn(y.domain,S,x)&&(B=_ee(y.domain,null,S),m&&(x==="number"||N!=="auto")&&($=X2(j,k,"category")));var U=sot(x);if(!B||B.length===0){var P,V=(P=y.domain)!==null&&P!==void 0?P:U;if(k){if(B=X2(j,k,x),x==="category"&&m){var Q=_$n(B);C&&Q?(M=B,B=D$(0,O)):C||(B=f5e(V,B,A).reduce(function(H,q){return H.indexOf(q)>=0?H:[].concat(YS(H),[q])},[]))}else if(x==="category")C?B=B.filter(function(H){return H!==""&&!Ui(H)}):B=f5e(V,B,A).reduce(function(H,q){return H.indexOf(q)>=0||q===""||Ui(q)?H:[].concat(YS(H),[q])},[]);else if(x==="number"){var X=IUn(j,i.filter(function(H){var q,W,te=o in H.props?H.props[o]:(q=H.type.defaultProps)===null||q===void 0?void 0:q[o],ne="hide"in H.props?H.props.hide:(W=H.type.defaultProps)===null||W===void 0?void 0:W.hide;return te===T&&(D||!ne)}),k,a,u);X&&(B=X)}m&&(x==="number"||N!=="auto")&&($=X2(j,k,"category"))}else m?B=D$(0,O):s&&s[T]&&s[T].hasStack&&x==="number"?B=h==="expand"?[0,1]:sat(s[T].stackGroups,l,c):B=iat(j,i.filter(function(H){var q=o in H.props?H.props[o]:H.type.defaultProps[o],W="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return q===T&&(D||!W)}),x,u,!0);if(x==="number")B=rte(f,B,T,a,E),V&&(B=_ee(V,B,S));else if(x==="category"&&V){var Z=V,le=B.every(function(H){return Z.indexOf(H)>=0});le&&(B=Z)}}return Nt(Nt({},p),{},lr({},T,Nt(Nt({},y),{},{axisType:a,domain:B,categoricalDomain:$,duplicateDomain:M,originalDomain:(v=y.domain)!==null&&v!==void 0?v:U,isCategorical:m,layout:u})))},{})},tGn=function(t,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.layout,f=t.children,h=Q8(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),m=h.length,p=aat(u,a),A=-1;return r.reduce(function(v,y){var x=y.type.defaultProps!==void 0?Nt(Nt({},y.type.defaultProps),y.props):y.props,k=x[o],S=sot("number");if(!v[k]){A++;var C;return p?C=D$(0,m):s&&s[k]&&s[k].hasStack?(C=sat(s[k].stackGroups,l,c),C=rte(f,C,k,a)):(C=_ee(S,iat(h,r.filter(function(N){var E,D,T=o in N.props?N.props[o]:(E=N.type.defaultProps)===null||E===void 0?void 0:E[o],j="hide"in N.props?N.props.hide:(D=N.type.defaultProps)===null||D===void 0?void 0:D.hide;return T===k&&!j}),"number",u),i.defaultProps.allowDataOverflow),C=rte(f,C,k,a)),Nt(Nt({},v),{},lr({},k,Nt(Nt({axisType:a},i.defaultProps),{},{hide:!0,orientation:Tf(Yqn,"".concat(a,".").concat(A%2),null),domain:C,originalDomain:S,isCategorical:p,layout:u})))}return v},{})},nGn=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,o=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.children,f="".concat(i,"Id"),h=zh(u,a),m={};return h&&h.length?m=eGn(t,{axes:h,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):o&&o.length&&(m=tGn(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),m},rGn=function(t){var n=qv(t),r=ig(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:kce(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:x$(n,r)}},XBe=function(t){var n=t.children,r=t.defaultShowTooltip,i=sd(n,US),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},iGn=function(t){return!t||!t.length?!1:t.some(function(n){var r=cg(n&&n.type);return r&&r.indexOf("Bar")>=0})},ZBe=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},aGn=function(t,n){var r=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,c=r.width,u=r.height,f=r.children,h=r.margin||{},m=sd(f,US),p=sd(f,rx),A=Object.keys(l).reduce(function(C,N){var E=l[N],D=E.orientation;return!E.mirror&&!E.hide?Nt(Nt({},C),{},lr({},D,C[D]+E.width)):C},{left:h.left||0,right:h.right||0}),v=Object.keys(o).reduce(function(C,N){var E=o[N],D=E.orientation;return!E.mirror&&!E.hide?Nt(Nt({},C),{},lr({},D,Tf(C,"".concat(D))+E.height)):C},{top:h.top||0,bottom:h.bottom||0}),y=Nt(Nt({},v),A),x=y.bottom;m&&(y.bottom+=m.props.height||US.defaultProps.height),p&&n&&(y=OUn(y,i,r,n));var k=c-y.left-y.right,S=u-y.top-y.bottom;return Nt(Nt({brushBottom:x},y),{},{width:Math.max(k,0),height:Math.max(S,0)})},oGn=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},sGn=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,c=t.legendContent,u=t.formatAxisMap,f=t.defaultProps,h=function(y,x){var k=x.graphicalItems,S=x.stackGroups,C=x.offset,N=x.updateId,E=x.dataStartIndex,D=x.dataEndIndex,T=y.barSize,j=y.layout,O=y.barGap,B=y.barCategoryGap,M=y.maxBarSize,$=ZBe(j),U=$.numericAxisName,P=$.cateAxisName,V=iGn(k),Q=[];return k.forEach(function(X,Z){var le=Q8(y.data,{graphicalItems:[X],dataStartIndex:E,dataEndIndex:D}),H=X.type.defaultProps!==void 0?Nt(Nt({},X.type.defaultProps),X.props):X.props,q=H.dataKey,W=H.maxBarSize,te=H["".concat(U,"Id")],ne=H["".concat(P,"Id")],re={},de=l.reduce(function(ve,be){var Re=x["".concat(be.axisType,"Map")],Me=H["".concat(be.axisType,"Id")];Re&&Re[Me]||be.axisType==="zAxis"||Mx();var Le=Re[Me];return Nt(Nt({},ve),{},lr(lr({},be.axisType,Le),"".concat(be.axisType,"Ticks"),ig(Le)))},re),he=de[P],pe=de["".concat(P,"Ticks")],oe=S&&S[te]&&S[te].hasStack&&qUn(X,S[te].stackGroups),J=cg(X.type).indexOf("Bar")>=0,Se=x$(he,pe),we=[],ke=V&&DUn({barSize:T,stackGroups:S,totalSize:oGn(de,P)});if(J){var me,K,ie=Ui(W)?M:W,ce=(me=(K=x$(he,pe,!0))!==null&&K!==void 0?K:ie)!==null&&me!==void 0?me:0;we=TUn({barGap:O,barCategoryGap:B,bandSize:ce!==Se?ce:Se,sizeList:ke[ne],maxBarSize:ie}),ce!==Se&&(we=we.map(function(ve){return Nt(Nt({},ve),{},{position:Nt(Nt({},ve.position),{},{offset:ve.position.offset-ce/2})})}))}var ue=X&&X.type&&X.type.getComposedData;ue&&Q.push({props:Nt(Nt({},ue(Nt(Nt({},de),{},{displayedData:le,props:y,dataKey:q,item:X,bandSize:Se,barPosition:we,offset:C,stackedData:oe,layout:j,dataStartIndex:E,dataEndIndex:D}))),{},lr(lr(lr({key:X.key||"item-".concat(Z)},U,de[U]),P,de[P]),"animationId",N)),childIndex:R$n(X,y.children),item:X})}),Q},m=function(y,x){var k=y.props,S=y.dataStartIndex,C=y.dataEndIndex,N=y.updateId;if(!mDe({props:k}))return null;var E=k.children,D=k.layout,T=k.stackOffset,j=k.data,O=k.reverseStackOrder,B=ZBe(D),M=B.numericAxisName,$=B.cateAxisName,U=zh(E,r),P=HUn(j,U,"".concat(M,"Id"),"".concat($,"Id"),T,O),V=l.reduce(function(H,q){var W="".concat(q.axisType,"Map");return Nt(Nt({},H),{},lr({},W,nGn(k,Nt(Nt({},q),{},{graphicalItems:U,stackGroups:q.axisType===M&&P,dataStartIndex:S,dataEndIndex:C}))))},{}),Q=aGn(Nt(Nt({},V),{},{props:k,graphicalItems:U}),x?.legendBBox);Object.keys(V).forEach(function(H){V[H]=u(k,V[H],Q,H.replace("Map",""),n)});var X=V["".concat($,"Map")],Z=rGn(X),le=h(k,Nt(Nt({},V),{},{dataStartIndex:S,dataEndIndex:C,updateId:N,graphicalItems:U,stackGroups:P,offset:Q}));return Nt(Nt({formattedGraphicalItems:le,graphicalItems:U,offset:Q,stackGroups:P},Z),V)},p=(function(v){function y(x){var k,S,C;return $qn(this,y),C=zqn(this,y,[x]),lr(C,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),lr(C,"accessibilityManager",new Cqn),lr(C,"handleLegendBBoxUpdate",function(N){if(N){var E=C.state,D=E.dataStartIndex,T=E.dataEndIndex,j=E.updateId;C.setState(Nt({legendBBox:N},m({props:C.props,dataStartIndex:D,dataEndIndex:T,updateId:j},Nt(Nt({},C.state),{},{legendBBox:N}))))}}),lr(C,"handleReceiveSyncEvent",function(N,E,D){if(C.props.syncId===N){if(D===C.eventEmitterSymbol&&typeof C.props.syncMethod!="function")return;C.applySyncEvent(E)}}),lr(C,"handleBrushChange",function(N){var E=N.startIndex,D=N.endIndex;if(E!==C.state.dataStartIndex||D!==C.state.dataEndIndex){var T=C.state.updateId;C.setState(function(){return Nt({dataStartIndex:E,dataEndIndex:D},m({props:C.props,dataStartIndex:E,dataEndIndex:D,updateId:T},C.state))}),C.triggerSyncEvent({dataStartIndex:E,dataEndIndex:D})}}),lr(C,"handleMouseEnter",function(N){var E=C.getMouseInfo(N);if(E){var D=Nt(Nt({},E),{},{isTooltipActive:!0});C.setState(D),C.triggerSyncEvent(D);var T=C.props.onMouseEnter;ni(T)&&T(D,N)}}),lr(C,"triggeredAfterMouseMove",function(N){var E=C.getMouseInfo(N),D=E?Nt(Nt({},E),{},{isTooltipActive:!0}):{isTooltipActive:!1};C.setState(D),C.triggerSyncEvent(D);var T=C.props.onMouseMove;ni(T)&&T(D,N)}),lr(C,"handleItemMouseEnter",function(N){C.setState(function(){return{isTooltipActive:!0,activeItem:N,activePayload:N.tooltipPayload,activeCoordinate:N.tooltipPosition||{x:N.cx,y:N.cy}}})}),lr(C,"handleItemMouseLeave",function(){C.setState(function(){return{isTooltipActive:!1}})}),lr(C,"handleMouseMove",function(N){N.persist(),C.throttleTriggeredAfterMouseMove(N)}),lr(C,"handleMouseLeave",function(N){C.throttleTriggeredAfterMouseMove.cancel();var E={isTooltipActive:!1};C.setState(E),C.triggerSyncEvent(E);var D=C.props.onMouseLeave;ni(D)&&D(E,N)}),lr(C,"handleOuterEvent",function(N){var E=M$n(N),D=Tf(C.props,"".concat(E));if(E&&ni(D)){var T,j;/.*touch.*/i.test(E)?j=C.getMouseInfo(N.changedTouches[0]):j=C.getMouseInfo(N),D((T=j)!==null&&T!==void 0?T:{},N)}}),lr(C,"handleClick",function(N){var E=C.getMouseInfo(N);if(E){var D=Nt(Nt({},E),{},{isTooltipActive:!0});C.setState(D),C.triggerSyncEvent(D);var T=C.props.onClick;ni(T)&&T(D,N)}}),lr(C,"handleMouseDown",function(N){var E=C.props.onMouseDown;if(ni(E)){var D=C.getMouseInfo(N);E(D,N)}}),lr(C,"handleMouseUp",function(N){var E=C.props.onMouseUp;if(ni(E)){var D=C.getMouseInfo(N);E(D,N)}}),lr(C,"handleTouchMove",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&C.throttleTriggeredAfterMouseMove(N.changedTouches[0])}),lr(C,"handleTouchStart",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&C.handleMouseDown(N.changedTouches[0])}),lr(C,"handleTouchEnd",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&C.handleMouseUp(N.changedTouches[0])}),lr(C,"handleDoubleClick",function(N){var E=C.props.onDoubleClick;if(ni(E)){var D=C.getMouseInfo(N);E(D,N)}}),lr(C,"handleContextMenu",function(N){var E=C.props.onContextMenu;if(ni(E)){var D=C.getMouseInfo(N);E(D,N)}}),lr(C,"triggerSyncEvent",function(N){C.props.syncId!==void 0&&nY.emit(rY,C.props.syncId,N,C.eventEmitterSymbol)}),lr(C,"applySyncEvent",function(N){var E=C.props,D=E.layout,T=E.syncMethod,j=C.state.updateId,O=N.dataStartIndex,B=N.dataEndIndex;if(N.dataStartIndex!==void 0||N.dataEndIndex!==void 0)C.setState(Nt({dataStartIndex:O,dataEndIndex:B},m({props:C.props,dataStartIndex:O,dataEndIndex:B,updateId:j},C.state)));else if(N.activeTooltipIndex!==void 0){var M=N.chartX,$=N.chartY,U=N.activeTooltipIndex,P=C.state,V=P.offset,Q=P.tooltipTicks;if(!V)return;if(typeof T=="function")U=T(Q,N);else if(T==="value"){U=-1;for(var X=0;X<Q.length;X++)if(Q[X].value===N.activeLabel){U=X;break}}var Z=Nt(Nt({},V),{},{x:V.left,y:V.top}),le=Math.min(M,Z.x+Z.width),H=Math.min($,Z.y+Z.height),q=Q[U]&&Q[U].value,W=ote(C.state,C.props.data,U),te=Q[U]?{x:D==="horizontal"?Q[U].coordinate:le,y:D==="horizontal"?H:Q[U].coordinate}:oot;C.setState(Nt(Nt({},N),{},{activeLabel:q,activeCoordinate:te,activePayload:W,activeTooltipIndex:U}))}else C.setState(N)}),lr(C,"renderCursor",function(N){var E,D=C.state,T=D.isTooltipActive,j=D.activeCoordinate,O=D.activePayload,B=D.offset,M=D.activeTooltipIndex,$=D.tooltipAxisBandSize,U=C.getTooltipEventType(),P=(E=N.props.active)!==null&&E!==void 0?E:T,V=C.props.layout,Q=N.key||"_recharts-cursor";return L.createElement(Oqn,{key:Q,activeCoordinate:j,activePayload:O,activeTooltipIndex:M,chartName:n,element:N,isActive:P,layout:V,offset:B,tooltipAxisBandSize:$,tooltipEventType:U})}),lr(C,"renderPolarAxis",function(N,E,D){var T=Tf(N,"type.axisType"),j=Tf(C.state,"".concat(T,"Map")),O=N.type.defaultProps,B=O!==void 0?Nt(Nt({},O),N.props):N.props,M=j&&j[B["".concat(T,"Id")]];return w.cloneElement(N,Nt(Nt({},M),{},{className:Xn(T,M.className),key:N.key||"".concat(E,"-").concat(D),ticks:ig(M,!0)}))}),lr(C,"renderPolarGrid",function(N){var E=N.props,D=E.radialLines,T=E.polarAngles,j=E.polarRadius,O=C.state,B=O.radiusAxisMap,M=O.angleAxisMap,$=qv(B),U=qv(M),P=U.cx,V=U.cy,Q=U.innerRadius,X=U.outerRadius;return w.cloneElement(N,{polarAngles:Array.isArray(T)?T:ig(U,!0).map(function(Z){return Z.coordinate}),polarRadius:Array.isArray(j)?j:ig($,!0).map(function(Z){return Z.coordinate}),cx:P,cy:V,innerRadius:Q,outerRadius:X,key:N.key||"polar-grid",radialLines:D})}),lr(C,"renderLegend",function(){var N=C.state.formattedGraphicalItems,E=C.props,D=E.children,T=E.width,j=E.height,O=C.props.margin||{},B=T-(O.left||0)-(O.right||0),M=nat({children:D,formattedGraphicalItems:N,legendWidth:B,legendContent:c});if(!M)return null;var $=M.item,U=WBe(M,Bqn);return w.cloneElement($,Nt(Nt({},U),{},{chartWidth:T,chartHeight:j,margin:O,onBBoxUpdate:C.handleLegendBBoxUpdate}))}),lr(C,"renderTooltip",function(){var N,E=C.props,D=E.children,T=E.accessibilityLayer,j=sd(D,ip);if(!j)return null;var O=C.state,B=O.isTooltipActive,M=O.activeCoordinate,$=O.activePayload,U=O.activeLabel,P=O.offset,V=(N=j.props.active)!==null&&N!==void 0?N:B;return w.cloneElement(j,{viewBox:Nt(Nt({},P),{},{x:P.left,y:P.top}),active:V,label:U,payload:V?$:[],coordinate:M,accessibilityLayer:T})}),lr(C,"renderBrush",function(N){var E=C.props,D=E.margin,T=E.data,j=C.state,O=j.offset,B=j.dataStartIndex,M=j.dataEndIndex,$=j.updateId;return w.cloneElement(N,{key:N.key||"_recharts-brush",onChange:NI(C.handleBrushChange,N.props.onChange),data:T,x:dn(N.props.x)?N.props.x:O.left,y:dn(N.props.y)?N.props.y:O.top+O.height+O.brushBottom-(D.bottom||0),width:dn(N.props.width)?N.props.width:O.width,startIndex:B,endIndex:M,updateId:"brush-".concat($)})}),lr(C,"renderReferenceElement",function(N,E,D){if(!N)return null;var T=C,j=T.clipPathId,O=C.state,B=O.xAxisMap,M=O.yAxisMap,$=O.offset,U=N.type.defaultProps||{},P=N.props,V=P.xAxisId,Q=V===void 0?U.xAxisId:V,X=P.yAxisId,Z=X===void 0?U.yAxisId:X;return w.cloneElement(N,{key:N.key||"".concat(E,"-").concat(D),xAxis:B[Q],yAxis:M[Z],viewBox:{x:$.left,y:$.top,width:$.width,height:$.height},clipPathId:j})}),lr(C,"renderActivePoints",function(N){var E=N.item,D=N.activePoint,T=N.basePoint,j=N.childIndex,O=N.isRange,B=[],M=E.props.key,$=E.item.type.defaultProps!==void 0?Nt(Nt({},E.item.type.defaultProps),E.item.props):E.item.props,U=$.activeDot,P=$.dataKey,V=Nt(Nt({index:j,dataKey:P,cx:D.x,cy:D.y,r:4,fill:Ece(E.item),strokeWidth:2,stroke:"#fff",payload:D.payload,value:D.value},Li(U,!1)),u$(U));return B.push(y.renderActiveDot(U,V,"".concat(M,"-activePoint-").concat(j))),T?B.push(y.renderActiveDot(U,Nt(Nt({},V),{},{cx:T.x,cy:T.y}),"".concat(M,"-basePoint-").concat(j))):O&&B.push(null),B}),lr(C,"renderGraphicChild",function(N,E,D){var T=C.filterFormatItem(N,E,D);if(!T)return null;var j=C.getTooltipEventType(),O=C.state,B=O.isTooltipActive,M=O.tooltipAxis,$=O.activeTooltipIndex,U=O.activeLabel,P=C.props.children,V=sd(P,ip),Q=T.props,X=Q.points,Z=Q.isRange,le=Q.baseLine,H=T.item.type.defaultProps!==void 0?Nt(Nt({},T.item.type.defaultProps),T.item.props):T.item.props,q=H.activeDot,W=H.hide,te=H.activeBar,ne=H.activeShape,re=!!(!W&&B&&V&&(q||te||ne)),de={};j!=="axis"&&V&&V.props.trigger==="click"?de={onClick:NI(C.handleItemMouseEnter,N.props.onClick)}:j!=="axis"&&(de={onMouseLeave:NI(C.handleItemMouseLeave,N.props.onMouseLeave),onMouseEnter:NI(C.handleItemMouseEnter,N.props.onMouseEnter)});var he=w.cloneElement(N,Nt(Nt({},T.props),de));function pe(be){return typeof M.dataKey=="function"?M.dataKey(be.payload):null}if(re)if($>=0){var oe,J;if(M.dataKey&&!M.allowDuplicatedCategory){var Se=typeof M.dataKey=="function"?pe:"payload.".concat(M.dataKey.toString());oe=ree(X,Se,U),J=Z&&le&&ree(le,Se,U)}else oe=X?.[$],J=Z&&le&&le[$];if(ne||te){var we=N.props.activeIndex!==void 0?N.props.activeIndex:$;return[w.cloneElement(N,Nt(Nt(Nt({},T.props),de),{},{activeIndex:we})),null,null]}if(!Ui(oe))return[he].concat(YS(C.renderActivePoints({item:T,activePoint:oe,basePoint:J,childIndex:$,isRange:Z})))}else{var ke,me=(ke=C.getItemByXY(C.state.activeCoordinate))!==null&&ke!==void 0?ke:{graphicalItem:he},K=me.graphicalItem,ie=K.item,ce=ie===void 0?N:ie,ue=K.childIndex,ve=Nt(Nt(Nt({},T.props),de),{},{activeIndex:ue});return[w.cloneElement(ce,ve),null,null]}return Z?[he,null,null]:[he,null]}),lr(C,"renderCustomized",function(N,E,D){return w.cloneElement(N,Nt(Nt({key:"recharts-customized-".concat(D)},C.props),C.state))}),lr(C,"renderMap",{CartesianGrid:{handler:OI,once:!0},ReferenceArea:{handler:C.renderReferenceElement},ReferenceLine:{handler:OI},ReferenceDot:{handler:C.renderReferenceElement},XAxis:{handler:OI},YAxis:{handler:OI},Brush:{handler:C.renderBrush,once:!0},Bar:{handler:C.renderGraphicChild},Line:{handler:C.renderGraphicChild},Area:{handler:C.renderGraphicChild},Radar:{handler:C.renderGraphicChild},RadialBar:{handler:C.renderGraphicChild},Scatter:{handler:C.renderGraphicChild},Pie:{handler:C.renderGraphicChild},Funnel:{handler:C.renderGraphicChild},Tooltip:{handler:C.renderCursor,once:!0},PolarGrid:{handler:C.renderPolarGrid,once:!0},PolarAngleAxis:{handler:C.renderPolarAxis},PolarRadiusAxis:{handler:C.renderPolarAxis},Customized:{handler:C.renderCustomized}}),C.clipPathId="".concat((k=x.id)!==null&&k!==void 0?k:N8("recharts"),"-clip"),C.throttleTriggeredAfterMouseMove=Iit(C.triggeredAfterMouseMove,(S=x.throttleDelay)!==null&&S!==void 0?S:1e3/60),C.state={},C}return Qqn(y,v),Uqn(y,[{key:"componentDidMount",value:function(){var k,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(k=this.props.margin.left)!==null&&k!==void 0?k:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var k=this.props,S=k.children,C=k.data,N=k.height,E=k.layout,D=sd(S,ip);if(D){var T=D.props.defaultIndex;if(!(typeof T!="number"||T<0||T>this.state.tooltipTicks.length-1)){var j=this.state.tooltipTicks[T]&&this.state.tooltipTicks[T].value,O=ote(this.state,C,T,j),B=this.state.tooltipTicks[T].coordinate,M=(this.state.offset.top+N)/2,$=E==="horizontal",U=$?{x:B,y:M}:{y:B,x:M},P=this.state.formattedGraphicalItems.find(function(Q){var X=Q.item;return X.type.name==="Scatter"});P&&(U=Nt(Nt({},U),P.props.points[T].tooltipPosition),O=P.props.points[T].tooltipPayload);var V={activeTooltipIndex:T,isTooltipActive:!0,activeLabel:j,activePayload:O,activeCoordinate:U};this.setState(V),this.renderCursor(D),this.accessibilityManager.setIndex(T)}}}},{key:"getSnapshotBeforeUpdate",value:function(k,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==k.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==k.margin){var C,N;this.accessibilityManager.setDetails({offset:{left:(C=this.props.margin.left)!==null&&C!==void 0?C:0,top:(N=this.props.margin.top)!==null&&N!==void 0?N:0}})}return null}},{key:"componentDidUpdate",value:function(k){aee([sd(k.children,ip)],[sd(this.props.children,ip)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var k=sd(this.props.children,ip);if(k&&typeof k.props.shared=="boolean"){var S=k.props.shared?"axis":"item";return s.indexOf(S)>=0?S:a}return a}},{key:"getMouseInfo",value:function(k){if(!this.container)return null;var S=this.container,C=S.getBoundingClientRect(),N=q6n(C),E={chartX:Math.round(k.pageX-N.left),chartY:Math.round(k.pageY-N.top)},D=C.width/S.offsetWidth||1,T=this.inRange(E.chartX,E.chartY,D);if(!T)return null;var j=this.state,O=j.xAxisMap,B=j.yAxisMap,M=this.getTooltipEventType(),$=YBe(this.state,this.props.data,this.props.layout,T);if(M!=="axis"&&O&&B){var U=qv(O).scale,P=qv(B).scale,V=U&&U.invert?U.invert(E.chartX):null,Q=P&&P.invert?P.invert(E.chartY):null;return Nt(Nt({},E),{},{xValue:V,yValue:Q},$)}return $?Nt(Nt({},E),$):null}},{key:"inRange",value:function(k,S){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,N=this.props.layout,E=k/C,D=S/C;if(N==="horizontal"||N==="vertical"){var T=this.state.offset,j=E>=T.left&&E<=T.left+T.width&&D>=T.top&&D<=T.top+T.height;return j?{x:E,y:D}:null}var O=this.state,B=O.angleAxisMap,M=O.radiusAxisMap;if(B&&M){var $=qv(B);return p5e({x:E,y:D},$)}return null}},{key:"parseEventsOfWrapper",value:function(){var k=this.props.children,S=this.getTooltipEventType(),C=sd(k,ip),N={};C&&S==="axis"&&(C.props.trigger==="click"?N={onClick:this.handleClick}:N={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var E=u$(this.props,this.handleOuterEvent);return Nt(Nt({},E),N)}},{key:"addListener",value:function(){nY.on(rY,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){nY.removeListener(rY,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(k,S,C){for(var N=this.state.formattedGraphicalItems,E=0,D=N.length;E<D;E++){var T=N[E];if(T.item===k||T.props.key===k.key||S===cg(T.item.type)&&C===T.childIndex)return T}return null}},{key:"renderClipPath",value:function(){var k=this.clipPathId,S=this.state.offset,C=S.left,N=S.top,E=S.height,D=S.width;return L.createElement("defs",null,L.createElement("clipPath",{id:k},L.createElement("rect",{x:C,y:N,height:E,width:D})))}},{key:"getXScales",value:function(){var k=this.state.xAxisMap;return k?Object.entries(k).reduce(function(S,C){var N=GBe(C,2),E=N[0],D=N[1];return Nt(Nt({},S),{},lr({},E,D.scale))},{}):null}},{key:"getYScales",value:function(){var k=this.state.yAxisMap;return k?Object.entries(k).reduce(function(S,C){var N=GBe(C,2),E=N[0],D=N[1];return Nt(Nt({},S),{},lr({},E,D.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(k){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[k])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(k){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[k])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(k){var S=this.state,C=S.formattedGraphicalItems,N=S.activeItem;if(C&&C.length)for(var E=0,D=C.length;E<D;E++){var T=C[E],j=T.props,O=T.item,B=O.type.defaultProps!==void 0?Nt(Nt({},O.type.defaultProps),O.props):O.props,M=cg(O.type);if(M==="Bar"){var $=(j.data||[]).find(function(Q){return B9n(k,Q)});if($)return{graphicalItem:T,payload:$}}else if(M==="RadialBar"){var U=(j.data||[]).find(function(Q){return p5e(k,Q)});if(U)return{graphicalItem:T,payload:U}}else if(M8(T,N)||R8(T,N)||LF(T,N)){var P=kHn({graphicalItem:T,activeTooltipItem:N,itemData:B.data}),V=B.activeIndex===void 0?P:B.activeIndex;return{graphicalItem:Nt(Nt({},T),{},{childIndex:V}),payload:LF(T,N)?B.data[P]:T.props.data[P]}}}return null}},{key:"render",value:function(){var k=this;if(!mDe(this))return null;var S=this.props,C=S.children,N=S.className,E=S.width,D=S.height,T=S.style,j=S.compact,O=S.title,B=S.desc,M=WBe(S,Iqn),$=Li(M,!1);if(j)return L.createElement(TBe,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},L.createElement(see,gk({},$,{width:E,height:D,title:O,desc:B}),this.renderClipPath(),ADe(C,this.renderMap)));if(this.props.accessibilityLayer){var U,P;$.tabIndex=(U=this.props.tabIndex)!==null&&U!==void 0?U:0,$.role=(P=this.props.role)!==null&&P!==void 0?P:"application",$.onKeyDown=function(Q){k.accessibilityManager.keyboardEvent(Q)},$.onFocus=function(){k.accessibilityManager.focus()}}var V=this.parseEventsOfWrapper();return L.createElement(TBe,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},L.createElement("div",gk({className:Xn("recharts-wrapper",N),style:Nt({position:"relative",cursor:"default",width:E,height:D},T)},V,{ref:function(X){k.container=X}}),L.createElement(see,gk({},$,{width:E,height:D,title:O,desc:B,style:Xqn}),this.renderClipPath(),ADe(C,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(w.Component);lr(p,"displayName",n),lr(p,"defaultProps",Nt({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),lr(p,"getDerivedStateFromProps",function(v,y){var x=v.dataKey,k=v.data,S=v.children,C=v.width,N=v.height,E=v.layout,D=v.stackOffset,T=v.margin,j=y.dataStartIndex,O=y.dataEndIndex;if(y.updateId===void 0){var B=XBe(v);return Nt(Nt(Nt({},B),{},{updateId:0},m(Nt(Nt({props:v},B),{},{updateId:0}),y)),{},{prevDataKey:x,prevData:k,prevWidth:C,prevHeight:N,prevLayout:E,prevStackOffset:D,prevMargin:T,prevChildren:S})}if(x!==y.prevDataKey||k!==y.prevData||C!==y.prevWidth||N!==y.prevHeight||E!==y.prevLayout||D!==y.prevStackOffset||!Vk(T,y.prevMargin)){var M=XBe(v),$={chartX:y.chartX,chartY:y.chartY,isTooltipActive:y.isTooltipActive},U=Nt(Nt({},YBe(y,k,E)),{},{updateId:y.updateId+1}),P=Nt(Nt(Nt({},M),$),U);return Nt(Nt(Nt({},P),m(Nt({props:v},P),y)),{},{prevDataKey:x,prevData:k,prevWidth:C,prevHeight:N,prevLayout:E,prevStackOffset:D,prevMargin:T,prevChildren:S})}if(!aee(S,y.prevChildren)){var V,Q,X,Z,le=sd(S,US),H=le&&(V=(Q=le.props)===null||Q===void 0?void 0:Q.startIndex)!==null&&V!==void 0?V:j,q=le&&(X=(Z=le.props)===null||Z===void 0?void 0:Z.endIndex)!==null&&X!==void 0?X:O,W=H!==j||q!==O,te=!Ui(k),ne=te&&!W?y.updateId:y.updateId+1;return Nt(Nt({updateId:ne},m(Nt(Nt({props:v},y),{},{updateId:ne,dataStartIndex:H,dataEndIndex:q}),y)),{},{prevChildren:S,dataStartIndex:H,dataEndIndex:q})}return null}),lr(p,"renderActiveDot",function(v,y,x){var k;return w.isValidElement(v)?k=w.cloneElement(v,y):ni(v)?k=v(y):k=L.createElement(yat,y),L.createElement(ul,{className:"recharts-active-dot",key:x},k)});var A=w.forwardRef(function(y,x){return L.createElement(p,gk({},y,{ref:x}))});return A.displayName=p.displayName,A},lGn=sGn({chartName:"BarChart",GraphicalChild:pp,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:V8},{axisType:"yAxis",AxisComp:$ce}],formatAxisMap:yVn});const cGn={light:"",dark:".dark"},lot=L.createContext(null);function cot(){const e=L.useContext(lot);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}function uGn({id:e,className:t,children:n,config:r,...i}){const a=L.useId(),o=`chart-${e||a.replace(/:/g,"")}`;return d.jsx(lot.Provider,{value:{config:r},children:d.jsxs("div",{"data-slot":"chart","data-chart":o,className:St("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",t),...i,children:[d.jsx(dGn,{id:o,config:r}),d.jsx($6n,{children:n})]})})}const dGn=({id:e,config:t})=>{const n=Object.entries(t).filter(([,r])=>r.theme||r.color);return n.length?d.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(cGn).map(([r,i])=>`
|
|
1177
|
+
A `).concat(p,",").concat(p,",0,0,").concat(c,",").concat(t,",").concat(n+i-s*p," Z")}else u="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return u},O9n=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,a=n.x,o=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var c=Math.min(a,a+s),u=Math.max(a,a+s),f=Math.min(o,o+l),h=Math.max(o,o+l);return r>=c&&r<=u&&i>=f&&i<=h}return!1},B9n={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Fce=function(t){var n=G5e(G5e({},B9n),t),r=w.useRef(),i=w.useState(-1),a=S9n(i,2),o=a[0],s=a[1];w.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var S=r.current.getTotalLength();S&&s(S)}catch{}},[]);var l=n.x,c=n.y,u=n.width,f=n.height,h=n.radius,m=n.className,p=n.animationEasing,A=n.animationDuration,v=n.animationBegin,y=n.isAnimationActive,x=n.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||f!==+f||u===0||f===0)return null;var k=Xn("recharts-rectangle",m);return x?L.createElement($y,{canBegin:o>0,from:{width:u,height:f,x:l,y:c},to:{width:u,height:f,x:l,y:c},duration:A,animationEasing:p,isActive:x},function(S){var C=S.width,N=S.height,E=S.x,D=S.y;return L.createElement($y,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:A,isActive:y,easing:p},L.createElement("path",N$({},Li(n,!0),{className:k,d:W5e(E,D,C,N,h),ref:r})))}):L.createElement("path",N$({},Li(n,!0),{className:k,d:W5e(l,c,u,f,h)}))};function Lee(){return Lee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lee.apply(this,arguments)}var yat=function(t){var n=t.cx,r=t.cy,i=t.r,a=t.className,o=Xn("recharts-dot",a);return n===+n&&r===+r&&i===+i?w.createElement("circle",Lee({},Li(t,!1),u$(t),{className:o,cx:n,cy:r,r:i})):null};function MF(e){"@babel/helpers - typeof";return MF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},MF(e)}var I9n=["x","y","top","left","width","height","className"];function Uee(){return Uee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uee.apply(this,arguments)}function K5e(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function j9n(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?K5e(Object(n),!0).forEach(function(r){P9n(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K5e(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function P9n(e,t,n){return t=M9n(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M9n(e){var t=R9n(e,"string");return MF(t)=="symbol"?t:t+""}function R9n(e,t){if(MF(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(MF(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $9n(e,t){if(e==null)return{};var n=L9n(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function L9n(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var U9n=function(t,n,r,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},z9n=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,l=t.left,c=l===void 0?0:l,u=t.width,f=u===void 0?0:u,h=t.height,m=h===void 0?0:h,p=t.className,A=$9n(t,I9n),v=j9n({x:r,y:a,top:s,left:c,width:f,height:m},A);return!dn(r)||!dn(a)||!dn(f)||!dn(m)||!dn(s)||!dn(c)?null:L.createElement("path",Uee({},Li(v,!0),{className:Xn("recharts-cross",p),d:U9n(r,a,f,m,s,c)}))},jK,Y5e;function H9n(){if(Y5e)return jK;Y5e=1;var e=git(),t=e(Object.getPrototypeOf,Object);return jK=t,jK}var PK,X5e;function V9n(){if(X5e)return PK;X5e=1;var e=Mg(),t=H9n(),n=Rg(),r="[object Object]",i=Function.prototype,a=Object.prototype,o=i.toString,s=a.hasOwnProperty,l=o.call(Object);function c(u){if(!n(u)||e(u)!=r)return!1;var f=t(u);if(f===null)return!0;var h=s.call(f,"constructor")&&f.constructor;return typeof h=="function"&&h instanceof h&&o.call(h)==l}return PK=c,PK}var Q9n=V9n();const q9n=Fi(Q9n);var MK,Z5e;function G9n(){if(Z5e)return MK;Z5e=1;var e=Mg(),t=Rg(),n="[object Boolean]";function r(i){return i===!0||i===!1||t(i)&&e(i)==n}return MK=r,MK}var W9n=G9n();const K9n=Fi(W9n);function RF(e){"@babel/helpers - typeof";return RF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},RF(e)}function E$(){return E$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},E$.apply(this,arguments)}function Y9n(e,t){return eHn(e)||J9n(e,t)||Z9n(e,t)||X9n()}function X9n(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1178
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Z9n(e,t){if(e){if(typeof e=="string")return J5e(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J5e(e,t)}}function J5e(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function J9n(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function eHn(e){if(Array.isArray(e))return e}function eBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tBe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eBe(Object(n),!0).forEach(function(r){tHn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tHn(e,t,n){return t=nHn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nHn(e){var t=rHn(e,"string");return RF(t)=="symbol"?t:t+""}function rHn(e,t){if(RF(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(RF(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nBe=function(t,n,r,i,a){var o=r-i,s;return s="M ".concat(t,",").concat(n),s+="L ".concat(t+r,",").concat(n),s+="L ".concat(t+r-o/2,",").concat(n+a),s+="L ".concat(t+r-o/2-i,",").concat(n+a),s+="L ".concat(t,",").concat(n," Z"),s},iHn={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},aHn=function(t){var n=tBe(tBe({},iHn),t),r=w.useRef(),i=w.useState(-1),a=Y9n(i,2),o=a[0],s=a[1];w.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var k=r.current.getTotalLength();k&&s(k)}catch{}},[]);var l=n.x,c=n.y,u=n.upperWidth,f=n.lowerWidth,h=n.height,m=n.className,p=n.animationEasing,A=n.animationDuration,v=n.animationBegin,y=n.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||f!==+f||h!==+h||u===0&&f===0||h===0)return null;var x=Xn("recharts-trapezoid",m);return y?L.createElement($y,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:c},to:{upperWidth:u,lowerWidth:f,height:h,x:l,y:c},duration:A,animationEasing:p,isActive:y},function(k){var S=k.upperWidth,C=k.lowerWidth,N=k.height,E=k.x,D=k.y;return L.createElement($y,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:A,easing:p},L.createElement("path",E$({},Li(n,!0),{className:x,d:nBe(E,D,S,C,N),ref:r})))}):L.createElement("g",null,L.createElement("path",E$({},Li(n,!0),{className:x,d:nBe(l,c,u,f,h)})))},oHn=["option","shapeType","propTransformer","activeClassName","isActive"];function $F(e){"@babel/helpers - typeof";return $F=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$F(e)}function sHn(e,t){if(e==null)return{};var n=lHn(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lHn(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function rBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function F$(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rBe(Object(n),!0).forEach(function(r){cHn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cHn(e,t,n){return t=uHn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uHn(e){var t=dHn(e,"string");return $F(t)=="symbol"?t:t+""}function dHn(e,t){if($F(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($F(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fHn(e,t){return F$(F$({},t),e)}function hHn(e,t){return e==="symbols"}function iBe(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return L.createElement(Fce,n);case"trapezoid":return L.createElement(aHn,n);case"sector":return L.createElement(dat,n);case"symbols":if(hHn(t))return L.createElement(pce,n);break;default:return null}}function mHn(e){return w.isValidElement(e)?e.props:e}function pHn(e){var t=e.option,n=e.shapeType,r=e.propTransformer,i=r===void 0?fHn:r,a=e.activeClassName,o=a===void 0?"recharts-active-shape":a,s=e.isActive,l=sHn(e,oHn),c;if(w.isValidElement(t))c=w.cloneElement(t,F$(F$({},l),mHn(t)));else if(ni(t))c=t(l);else if(q9n(t)&&!K9n(t)){var u=i(t,l);c=L.createElement(iBe,{shapeType:n,elementProps:u})}else{var f=l;c=L.createElement(iBe,{shapeType:n,elementProps:f})}return s?L.createElement(ul,{className:o},c):c}function M8(e,t){return t!=null&&"trapezoids"in e.props}function R8(e,t){return t!=null&&"sectors"in e.props}function LF(e,t){return t!=null&&"points"in e.props}function AHn(e,t){var n,r,i=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,a=e.y===(t==null||(r=t.labelViewBox)===null||r===void 0?void 0:r.y)||e.y===t.y;return i&&a}function gHn(e,t){var n=e.endAngle===t.endAngle,r=e.startAngle===t.startAngle;return n&&r}function vHn(e,t){var n=e.x===t.x,r=e.y===t.y,i=e.z===t.z;return n&&r&&i}function yHn(e,t){var n;return M8(e,t)?n=AHn:R8(e,t)?n=gHn:LF(e,t)&&(n=vHn),n}function bHn(e,t){var n;return M8(e,t)?n="trapezoids":R8(e,t)?n="sectors":LF(e,t)&&(n="points"),n}function xHn(e,t){if(M8(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(R8(e,t)){var r;return(r=t.tooltipPayload)===null||r===void 0||(r=r[0])===null||r===void 0||(r=r.payload)===null||r===void 0?void 0:r.payload}return LF(e,t)?t.payload:{}}function wHn(e){var t=e.activeTooltipItem,n=e.graphicalItem,r=e.itemData,i=bHn(n,t),a=xHn(n,t),o=r.filter(function(l,c){var u=Cce(a,l),f=n.props[i].filter(function(p){var A=yHn(n,t);return A(p,t)}),h=n.props[i].indexOf(f[f.length-1]),m=c===h;return u&&m}),s=r.indexOf(o[o.length-1]);return s}var RK,aBe;function kHn(){if(aBe)return RK;aBe=1;var e=Math.ceil,t=Math.max;function n(r,i,a,o){for(var s=-1,l=t(e((i-r)/(a||1)),0),c=Array(l);l--;)c[o?l:++s]=r,r+=a;return c}return RK=n,RK}var $K,oBe;function bat(){if(oBe)return $K;oBe=1;var e=Bit(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var a=i<0?-1:1;return a*n}return i===i?i:0}return $K=r,$K}var LK,sBe;function SHn(){if(sBe)return LK;sBe=1;var e=kHn(),t=T8(),n=bat();function r(i){return function(a,o,s){return s&&typeof s!="number"&&t(a,o,s)&&(o=s=void 0),a=n(a),o===void 0?(o=a,a=0):o=n(o),s=s===void 0?a<o?1:-1:n(s),e(a,o,s,i)}}return LK=r,LK}var UK,lBe;function CHn(){if(lBe)return UK;lBe=1;var e=SHn(),t=e();return UK=t,UK}var _Hn=CHn();const D$=Fi(_Hn);function UF(e){"@babel/helpers - typeof";return UF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},UF(e)}function cBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function uBe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cBe(Object(n),!0).forEach(function(r){xat(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xat(e,t,n){return t=NHn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NHn(e){var t=EHn(e,"string");return UF(t)=="symbol"?t:t+""}function EHn(e,t){if(UF(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(UF(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var FHn=["Webkit","Moz","O","ms"],DHn=function(t,n){var r=t.replace(/(\w)/,function(a){return a.toUpperCase()}),i=FHn.reduce(function(a,o){return uBe(uBe({},a),{},xat({},o+r,n))},{});return i[t]=n,i};function LS(e){"@babel/helpers - typeof";return LS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},LS(e)}function T$(){return T$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},T$.apply(this,arguments)}function dBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zK(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dBe(Object(n),!0).forEach(function(r){id(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function THn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fBe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,kat(r.key),r)}}function OHn(e,t,n){return t&&fBe(e.prototype,t),n&&fBe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function BHn(e,t,n){return t=O$(t),IHn(e,wat()?Reflect.construct(t,n||[],O$(e).constructor):t.apply(e,n))}function IHn(e,t){if(t&&(LS(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jHn(e)}function jHn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wat(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(wat=function(){return!!e})()}function O$(e){return O$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},O$(e)}function PHn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zee(e,t)}function zee(e,t){return zee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},zee(e,t)}function id(e,t,n){return t=kat(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kat(e){var t=MHn(e,"string");return LS(t)=="symbol"?t:t+""}function MHn(e,t){if(LS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(LS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var RHn=function(t){var n=t.data,r=t.startIndex,i=t.endIndex,a=t.x,o=t.width,s=t.travellerWidth;if(!n||!n.length)return{};var l=n.length,c=Rk().domain(D$(0,l)).range([a,a+o-s]),u=c.domain().map(function(f){return c(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:c(r),endX:c(i),scale:c,scaleValues:u}},hBe=function(t){return t.changedTouches&&!!t.changedTouches.length},US=(function(e){function t(n){var r;return THn(this,t),r=BHn(this,t,[n]),id(r,"handleDrag",function(i){r.leaveTimer&&(clearTimeout(r.leaveTimer),r.leaveTimer=null),r.state.isTravellerMoving?r.handleTravellerMove(i):r.state.isSlideMoving&&r.handleSlideDrag(i)}),id(r,"handleTouchMove",function(i){i.changedTouches!=null&&i.changedTouches.length>0&&r.handleDrag(i.changedTouches[0])}),id(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o?.({endIndex:a,startIndex:s})}),r.detachDragEndListener()}),id(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),id(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),id(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),id(r,"handleSlideDragStart",function(i){var a=hBe(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return PHn(t,e),OHn(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,a=r.endX,o=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,u=c.length-1,f=Math.min(i,a),h=Math.max(i,a),m=t.getIndexInRange(o,f),p=t.getIndexInRange(o,h);return{startIndex:m-m%l,endIndex:p===u?u:p-p%l}}},{key:"getTextOfTick",value:function(r){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=Rp(a[r],s,r);return ni(o)?o(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,l=this.props,c=l.x,u=l.width,f=l.travellerWidth,h=l.startIndex,m=l.endIndex,p=l.onChange,A=r.pageX-a;A>0?A=Math.min(A,c+u-f-s,c+u-f-o):A<0&&(A=Math.max(A,c-o,c-s));var v=this.getIndex({startX:o+A,endX:s+A});(v.startIndex!==h||v.endIndex!==m)&&p&&p(v),this.setState({startX:o+A,endX:s+A,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var a=hBe(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,l=i.startX,c=this.state[o],u=this.props,f=u.x,h=u.width,m=u.travellerWidth,p=u.onChange,A=u.gap,v=u.data,y={startX:this.state.startX,endX:this.state.endX},x=r.pageX-a;x>0?x=Math.min(x,f+h-m-c):x<0&&(x=Math.max(x,f-c)),y[o]=c+x;var k=this.getIndex(y),S=k.startIndex,C=k.endIndex,N=function(){var D=v.length-1;return o==="startX"&&(s>l?S%A===0:C%A===0)||s<l&&C===D||o==="endX"&&(s>l?C%A===0:S%A===0)||s>l&&C===D};this.setState(id(id({},o,c+x),"brushMoveStartX",r.pageX),function(){p&&N()&&p(k)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,c=o.endX,u=this.state[i],f=s.indexOf(u);if(f!==-1){var h=f+r;if(!(h===-1||h>=s.length)){var m=s[h];i==="startX"&&m>=c||i==="endX"&&m<=l||this.setState(id({},i,m),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.fill,c=r.stroke;return L.createElement("rect",{stroke:c,fill:l,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.data,c=r.children,u=r.padding,f=w.Children.only(c);return f?L.cloneElement(f,{x:i,y:a,width:o,height:s,margin:u,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,i){var a,o,s=this,l=this.props,c=l.y,u=l.travellerWidth,f=l.height,h=l.traveller,m=l.ariaLabel,p=l.data,A=l.startIndex,v=l.endIndex,y=Math.max(r,this.props.x),x=zK(zK({},Li(this.props,!1)),{},{x:y,y:c,width:u,height:f}),k=m||"Min value: ".concat((a=p[A])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=p[v])===null||o===void 0?void 0:o.name);return L.createElement(ul,{tabIndex:0,role:"slider","aria-label":k,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(C){["ArrowLeft","ArrowRight"].includes(C.key)&&(C.preventDefault(),C.stopPropagation(),s.handleTravellerMoveKeyboard(C.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,x))}},{key:"renderSlide",value:function(r,i){var a=this.props,o=a.y,s=a.height,l=a.stroke,c=a.travellerWidth,u=Math.min(r,i)+c,f=Math.max(Math.abs(i-r)-c,0);return L.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:u,y:o,width:f,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,a=r.endIndex,o=r.y,s=r.height,l=r.travellerWidth,c=r.stroke,u=this.state,f=u.startX,h=u.endX,m=5,p={pointerEvents:"none",fill:c};return L.createElement(ul,{className:"recharts-brush-texts"},L.createElement(g$,T$({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-m,y:o+s/2},p),this.getTextOfTick(i)),L.createElement(g$,T$({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+l+m,y:o+s/2},p),this.getTextOfTick(a)))}},{key:"render",value:function(){var r=this.props,i=r.data,a=r.className,o=r.children,s=r.x,l=r.y,c=r.width,u=r.height,f=r.alwaysShowText,h=this.state,m=h.startX,p=h.endX,A=h.isTextActive,v=h.isSlideMoving,y=h.isTravellerMoving,x=h.isTravellerFocused;if(!i||!i.length||!dn(s)||!dn(l)||!dn(c)||!dn(u)||c<=0||u<=0)return null;var k=Xn("recharts-brush",a),S=L.Children.count(o)===1,C=DHn("userSelect","none");return L.createElement(ul,{className:k,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:C},this.renderBackground(),S&&this.renderPanorama(),this.renderSlide(m,p),this.renderTravellerLayer(m,"startX"),this.renderTravellerLayer(p,"endX"),(A||v||y||x||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,a=r.y,o=r.width,s=r.height,l=r.stroke,c=Math.floor(a+s/2)-1;return L.createElement(L.Fragment,null,L.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),L.createElement("line",{x1:i+1,y1:c,x2:i+o-1,y2:c,fill:"none",stroke:"#fff"}),L.createElement("line",{x1:i+1,y1:c+2,x2:i+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var a;return L.isValidElement(r)?a=L.cloneElement(r,i):ni(r)?a=r(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(r,i){var a=r.data,o=r.width,s=r.x,l=r.travellerWidth,c=r.updateId,u=r.startIndex,f=r.endIndex;if(a!==i.prevData||c!==i.prevUpdateId)return zK({prevData:a,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:o},a&&a.length?RHn({data:a,width:o,x:s,travellerWidth:l,startIndex:u,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+o-l]);var h=i.scale.domain().map(function(m){return i.scale(m)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:o,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var a=r.length,o=0,s=a-1;s-o>1;){var l=Math.floor((o+s)/2);r[l]>i?s=l:o=l}return i>=r[s]?s:o}}])})(w.PureComponent);id(US,"displayName","Brush");id(US,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var HK,mBe;function $Hn(){if(mBe)return HK;mBe=1;var e=wce();function t(n,r){var i;return e(n,function(a,o,s){return i=r(a,o,s),!i}),!!i}return HK=t,HK}var VK,pBe;function LHn(){if(pBe)return VK;pBe=1;var e=uit(),t=c0(),n=$Hn(),r=Ru(),i=T8();function a(o,s,l){var c=r(o)?e:n;return l&&i(o,s,l)&&(s=void 0),c(o,t(s,3))}return VK=a,VK}var UHn=LHn();const zHn=Fi(UHn);var Np=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},QK,ABe;function HHn(){if(ABe)return QK;ABe=1;var e=Eit();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return QK=t,QK}var qK,gBe;function VHn(){if(gBe)return qK;gBe=1;var e=HHn(),t=_it(),n=c0();function r(i,a){var o={};return a=n(a,3),t(i,function(s,l,c){e(o,l,a(s,l,c))}),o}return qK=r,qK}var QHn=VHn();const qHn=Fi(QHn);var GK,vBe;function GHn(){if(vBe)return GK;vBe=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(!n(t[r],r,t))return!1;return!0}return GK=e,GK}var WK,yBe;function WHn(){if(yBe)return WK;yBe=1;var e=wce();function t(n,r){var i=!0;return e(n,function(a,o,s){return i=!!r(a,o,s),i}),i}return WK=t,WK}var KK,bBe;function KHn(){if(bBe)return KK;bBe=1;var e=GHn(),t=WHn(),n=c0(),r=Ru(),i=T8();function a(o,s,l){var c=r(o)?e:t;return l&&i(o,s,l)&&(s=void 0),c(o,n(s,3))}return KK=a,KK}var YHn=KHn();const Sat=Fi(YHn);var XHn=["x","y"];function zF(e){"@babel/helpers - typeof";return zF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zF(e)}function Hee(){return Hee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hee.apply(this,arguments)}function xBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function RN(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xBe(Object(n),!0).forEach(function(r){ZHn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ZHn(e,t,n){return t=JHn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JHn(e){var t=eVn(e,"string");return zF(t)=="symbol"?t:t+""}function eVn(e,t){if(zF(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zF(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tVn(e,t){if(e==null)return{};var n=nVn(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nVn(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function rVn(e,t){var n=e.x,r=e.y,i=tVn(e,XHn),a="".concat(n),o=parseInt(a,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||i.height),u=parseInt(c,10),f="".concat(t.width||i.width),h=parseInt(f,10);return RN(RN(RN(RN(RN({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:u,width:h,name:t.name,radius:t.radius})}function wBe(e){return L.createElement(pHn,Hee({shapeType:"rectangle",propTransformer:rVn,activeClassName:"recharts-active-bar"},e))}var iVn=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var a=dn(r)||S$n(r);return a?t(r,i):(a||Mx(),n)}},aVn=["value","background"],Cat;function zS(e){"@babel/helpers - typeof";return zS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zS(e)}function oVn(e,t){if(e==null)return{};var n=sVn(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sVn(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function B$(){return B$=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},B$.apply(this,arguments)}function kBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kBe(Object(n),!0).forEach(function(r){oy(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lVn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SBe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Nat(r.key),r)}}function cVn(e,t,n){return t&&SBe(e.prototype,t),n&&SBe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function uVn(e,t,n){return t=I$(t),dVn(e,_at()?Reflect.construct(t,n||[],I$(e).constructor):t.apply(e,n))}function dVn(e,t){if(t&&(zS(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fVn(e)}function fVn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _at(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_at=function(){return!!e})()}function I$(e){return I$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},I$(e)}function hVn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vee(e,t)}function Vee(e,t){return Vee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Vee(e,t)}function oy(e,t,n){return t=Nat(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nat(e){var t=mVn(e,"string");return zS(t)=="symbol"?t:t+""}function mVn(e,t){if(zS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var pp=(function(e){function t(){var n;lVn(this,t);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return n=uVn(this,t,[].concat(i)),oy(n,"state",{isAnimationFinished:!1}),oy(n,"id",N8("recharts-bar-")),oy(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),o&&o()}),oy(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),o&&o()}),n}return hVn(t,e),cVn(t,[{key:"renderRectanglesStatically",value:function(r){var i=this,a=this.props,o=a.shape,s=a.dataKey,l=a.activeIndex,c=a.activeBar,u=Li(this.props,!1);return r&&r.map(function(f,h){var m=h===l,p=m?c:o,A=bs(bs(bs({},u),f),{},{isActive:m,option:p,index:h,dataKey:s,onAnimationStart:i.handleAnimationStart,onAnimationEnd:i.handleAnimationEnd});return L.createElement(ul,B$({className:"recharts-bar-rectangle"},d$(i.props,f,h),{key:"rectangle-".concat(f?.x,"-").concat(f?.y,"-").concat(f?.value,"-").concat(h)}),L.createElement(wBe,A))})}},{key:"renderRectanglesWithAnimation",value:function(){var r=this,i=this.props,a=i.data,o=i.layout,s=i.isAnimationActive,l=i.animationBegin,c=i.animationDuration,u=i.animationEasing,f=i.animationId,h=this.state.prevData;return L.createElement($y,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(m){var p=m.t,A=a.map(function(v,y){var x=h&&h[y];if(x){var k=Mw(x.x,v.x),S=Mw(x.y,v.y),C=Mw(x.width,v.width),N=Mw(x.height,v.height);return bs(bs({},v),{},{x:k(p),y:S(p),width:C(p),height:N(p)})}if(o==="horizontal"){var E=Mw(0,v.height),D=E(p);return bs(bs({},v),{},{y:v.y+v.height-D,height:D})}var T=Mw(0,v.width),j=T(p);return bs(bs({},v),{},{width:j})});return L.createElement(ul,null,r.renderRectanglesStatically(A))})}},{key:"renderRectangles",value:function(){var r=this.props,i=r.data,a=r.isAnimationActive,o=this.state.prevData;return a&&i&&i.length&&(!o||!Cce(o,i))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(i)}},{key:"renderBackground",value:function(){var r=this,i=this.props,a=i.data,o=i.dataKey,s=i.activeIndex,l=Li(this.props.background,!1);return a.map(function(c,u){c.value;var f=c.background,h=oVn(c,aVn);if(!f)return null;var m=bs(bs(bs(bs(bs({},h),{},{fill:"#eee"},f),l),d$(r.props,c,u)),{},{onAnimationStart:r.handleAnimationStart,onAnimationEnd:r.handleAnimationEnd,dataKey:o,index:u,className:"recharts-bar-background-rectangle"});return L.createElement(wBe,B$({key:"background-bar-".concat(u),option:r.props.background,isActive:u===s},m))})}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var a=this.props,o=a.data,s=a.xAxis,l=a.yAxis,c=a.layout,u=a.children,f=zh(u,P8);if(!f)return null;var h=c==="vertical"?o[0].height/2:o[0].width/2,m=function(v,y){var x=Array.isArray(v.value)?v.value[1]:v.value;return{x:v.x,y:v.y,value:x,errorVal:Rp(v,y)}},p={clipPath:r?"url(#clipPath-".concat(i,")"):null};return L.createElement(ul,p,f.map(function(A){return L.cloneElement(A,{key:"error-bar-".concat(i,"-").concat(A.props.dataKey),data:o,xAxis:s,yAxis:l,layout:c,offset:h,dataPointFormatter:m})}))}},{key:"render",value:function(){var r=this.props,i=r.hide,a=r.data,o=r.className,s=r.xAxis,l=r.yAxis,c=r.left,u=r.top,f=r.width,h=r.height,m=r.isAnimationActive,p=r.background,A=r.id;if(i||!a||!a.length)return null;var v=this.state.isAnimationFinished,y=Xn("recharts-bar",o),x=s&&s.allowDataOverflow,k=l&&l.allowDataOverflow,S=x||k,C=Ui(A)?this.id:A;return L.createElement(ul,{className:y},x||k?L.createElement("defs",null,L.createElement("clipPath",{id:"clipPath-".concat(C)},L.createElement("rect",{x:x?c:c-f/2,y:k?u:u-h/2,width:x?f:f*2,height:k?h:h*2}))):null,L.createElement(ul,{className:"recharts-bar-rectangles",clipPath:S?"url(#clipPath-".concat(C,")"):null},p?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(S,C),(!m||v)&&ax.renderCallByParent(this.props,a))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curData:r.data,prevData:i.curData}:r.data!==i.curData?{curData:r.data}:null}}])})(w.PureComponent);Cat=pp;oy(pp,"displayName","Bar");oy(pp,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!$T.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});oy(pp,"getComposedData",function(e){var t=e.props,n=e.item,r=e.barPosition,i=e.bandSize,a=e.xAxis,o=e.yAxis,s=e.xAxisTicks,l=e.yAxisTicks,c=e.stackedData,u=e.dataStartIndex,f=e.displayedData,h=e.offset,m=MUn(r,n);if(!m)return null;var p=t.layout,A=n.type.defaultProps,v=A!==void 0?bs(bs({},A),n.props):n.props,y=v.dataKey,x=v.children,k=v.minPointSize,S=p==="horizontal"?o:a,C=c?S.scale.domain():null,N=QUn({numericAxis:S}),E=zh(x,jit),D=f.map(function(T,j){var O,B,M,$,U,P;c?O=RUn(c[u+j],C):(O=Rp(T,y),Array.isArray(O)||(O=[N,O]));var V=iVn(k,Cat.defaultProps.minPointSize)(O[1],j);if(p==="horizontal"){var Q,X=[o.scale(O[0]),o.scale(O[1])],Z=X[0],le=X[1];B=c5e({axis:a,ticks:s,bandSize:i,offset:m.offset,entry:T,index:j}),M=(Q=le??Z)!==null&&Q!==void 0?Q:void 0,$=m.size;var H=Z-le;if(U=Number.isNaN(H)?0:H,P={x:B,y:o.y,width:$,height:o.height},Math.abs(V)>0&&Math.abs(U)<Math.abs(V)){var q=Mh(U||V)*(Math.abs(V)-Math.abs(U));M-=q,U+=q}}else{var W=[a.scale(O[0]),a.scale(O[1])],te=W[0],ne=W[1];if(B=te,M=c5e({axis:o,ticks:l,bandSize:i,offset:m.offset,entry:T,index:j}),$=ne-te,U=m.size,P={x:a.x,y:M,width:a.width,height:U},Math.abs(V)>0&&Math.abs($)<Math.abs(V)){var re=Mh($||V)*(Math.abs(V)-Math.abs($));$+=re}}return bs(bs(bs({},T),{},{x:B,y:M,width:$,height:U,value:c?O:O[1],payload:T,background:P},E&&E[j]&&E[j].props),{},{tooltipPayload:[lat(n,T)],tooltipPosition:{x:B+$/2,y:M+U/2}})});return bs({data:D,layout:p},h)});function HF(e){"@babel/helpers - typeof";return HF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},HF(e)}function pVn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function CBe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Eat(r.key),r)}}function AVn(e,t,n){return t&&CBe(e.prototype,t),n&&CBe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Eh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_Be(Object(n),!0).forEach(function(r){$8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_Be(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $8(e,t,n){return t=Eat(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eat(e){var t=gVn(e,"string");return HF(t)=="symbol"?t:t+""}function gVn(e,t){if(HF(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(HF(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vVn=function(t,n,r,i,a){var o=t.width,s=t.height,l=t.layout,c=t.children,u=Object.keys(n),f={left:r.left,leftMirror:r.left,right:o-r.right,rightMirror:o-r.right,top:r.top,topMirror:r.top,bottom:s-r.bottom,bottomMirror:s-r.bottom},h=!!sd(c,pp);return u.reduce(function(m,p){var A=n[p],v=A.orientation,y=A.domain,x=A.padding,k=x===void 0?{}:x,S=A.mirror,C=A.reversed,N="".concat(v).concat(S?"Mirror":""),E,D,T,j,O;if(A.type==="number"&&(A.padding==="gap"||A.padding==="no-gap")){var B=y[1]-y[0],M=1/0,$=A.categoricalDomain.sort(N$n);if($.forEach(function(W,te){te>0&&(M=Math.min((W||0)-($[te-1]||0),M))}),Number.isFinite(M)){var U=M/B,P=A.layout==="vertical"?r.height:r.width;if(A.padding==="gap"&&(E=U*P/2),A.padding==="no-gap"){var V=jx(t.barCategoryGap,U*P),Q=U*P/2;E=Q-V-(Q-V)/P*V}}}i==="xAxis"?D=[r.left+(k.left||0)+(E||0),r.left+r.width-(k.right||0)-(E||0)]:i==="yAxis"?D=l==="horizontal"?[r.top+r.height-(k.bottom||0),r.top+(k.top||0)]:[r.top+(k.top||0)+(E||0),r.top+r.height-(k.bottom||0)-(E||0)]:D=A.range,C&&(D=[D[1],D[0]]);var X=jUn(A,a,h),Z=X.scale,le=X.realScaleType;Z.domain(y).range(D),PUn(Z);var H=VUn(Z,Eh(Eh({},A),{},{realScaleType:le}));i==="xAxis"?(O=v==="top"&&!S||v==="bottom"&&S,T=r.left,j=f[N]-O*A.height):i==="yAxis"&&(O=v==="left"&&!S||v==="right"&&S,T=f[N]-O*A.width,j=r.top);var q=Eh(Eh(Eh({},A),H),{},{realScaleType:le,x:T,y:j,scale:Z,width:i==="xAxis"?r.width:A.width,height:i==="yAxis"?r.height:A.height});return q.bandSize=x$(q,H),!A.hide&&i==="xAxis"?f[N]+=(O?-1:1)*q.height:A.hide||(f[N]+=(O?-1:1)*q.width),Eh(Eh({},m),{},$8({},p,q))},{})},Fat=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return{x:Math.min(r,a),y:Math.min(i,o),width:Math.abs(a-r),height:Math.abs(o-i)}},yVn=function(t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2;return Fat({x:n,y:r},{x:i,y:a})},Dat=(function(){function e(t){pVn(this,e),this.scale=t}return AVn(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,a=r.position;if(n!==void 0){if(a)switch(a){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],a=r[r.length-1];return i<=a?n>=i&&n<=a:n>=a&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])})();$8(Dat,"EPS",1e-4);var Dce=function(t){var n=Object.keys(t).reduce(function(r,i){return Eh(Eh({},r),{},$8({},i,Dat.create(t[i])))},{});return Eh(Eh({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return qHn(i,function(l,c){return n[c].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return Sat(i,function(a,o){return n[o].isInRange(a)})}})};function bVn(e){return(e%180+180)%180}var xVn=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=bVn(i),o=a*Math.PI/180,s=Math.atan(r/n),l=o>s&&o<Math.PI-s?r/Math.sin(o):n/Math.cos(o);return Math.abs(l)},YK,NBe;function wVn(){if(NBe)return YK;NBe=1;var e=c0(),t=RT(),n=F8();function r(i){return function(a,o,s){var l=Object(a);if(!t(a)){var c=e(o,3);a=n(a),o=function(f){return c(l[f],f,l)}}var u=i(a,o,s);return u>-1?l[c?a[u]:u]:void 0}}return YK=r,YK}var XK,EBe;function kVn(){if(EBe)return XK;EBe=1;var e=bat();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return XK=t,XK}var ZK,FBe;function SVn(){if(FBe)return ZK;FBe=1;var e=xit(),t=c0(),n=kVn(),r=Math.max;function i(a,o,s){var l=a==null?0:a.length;if(!l)return-1;var c=s==null?0:n(s);return c<0&&(c=r(l+c,0)),e(a,t(o,3),c)}return ZK=i,ZK}var JK,DBe;function CVn(){if(DBe)return JK;DBe=1;var e=wVn(),t=SVn(),n=e(t);return JK=n,JK}var _Vn=CVn();const NVn=Fi(_Vn);var EVn=Jrt();const FVn=Fi(EVn);var DVn=FVn(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),Tce=w.createContext(void 0),Oce=w.createContext(void 0),Tat=w.createContext(void 0),Oat=w.createContext({}),Bat=w.createContext(void 0),Iat=w.createContext(0),jat=w.createContext(0),TBe=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,a=n.offset,o=t.clipPathId,s=t.children,l=t.width,c=t.height,u=DVn(a);return L.createElement(Tce.Provider,{value:r},L.createElement(Oce.Provider,{value:i},L.createElement(Oat.Provider,{value:a},L.createElement(Tat.Provider,{value:u},L.createElement(Bat.Provider,{value:o},L.createElement(Iat.Provider,{value:c},L.createElement(jat.Provider,{value:l},s)))))))},TVn=function(){return w.useContext(Bat)},Pat=function(t){var n=w.useContext(Tce);n==null&&Mx();var r=n[t];return r==null&&Mx(),r},OVn=function(){var t=w.useContext(Tce);return qv(t)},BVn=function(){var t=w.useContext(Oce),n=NVn(t,function(r){return Sat(r.domain,Number.isFinite)});return n||qv(t)},Mat=function(t){var n=w.useContext(Oce);n==null&&Mx();var r=n[t];return r==null&&Mx(),r},IVn=function(){var t=w.useContext(Tat);return t},jVn=function(){return w.useContext(Oat)},Bce=function(){return w.useContext(jat)},Ice=function(){return w.useContext(Iat)};function HS(e){"@babel/helpers - typeof";return HS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},HS(e)}function PVn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MVn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,$at(r.key),r)}}function RVn(e,t,n){return t&&MVn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function $Vn(e,t,n){return t=j$(t),LVn(e,Rat()?Reflect.construct(t,n||[],j$(e).constructor):t.apply(e,n))}function LVn(e,t){if(t&&(HS(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return UVn(e)}function UVn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rat(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Rat=function(){return!!e})()}function j$(e){return j$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},j$(e)}function zVn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qee(e,t)}function Qee(e,t){return Qee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Qee(e,t)}function OBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function BBe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?OBe(Object(n),!0).forEach(function(r){jce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jce(e,t,n){return t=$at(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $at(e){var t=HVn(e,"string");return HS(t)=="symbol"?t:t+""}function HVn(e,t){if(HS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(HS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function VVn(e,t){return WVn(e)||GVn(e,t)||qVn(e,t)||QVn()}function QVn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1179
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qVn(e,t){if(e){if(typeof e=="string")return IBe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return IBe(e,t)}}function IBe(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function GVn(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function WVn(e){if(Array.isArray(e))return e}function qee(){return qee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qee.apply(this,arguments)}var KVn=function(t,n){var r;return L.isValidElement(t)?r=L.cloneElement(t,n):ni(t)?r=t(n):r=L.createElement("line",qee({},n,{className:"recharts-reference-line-line"})),r},YVn=function(t,n,r,i,a,o,s,l,c){var u=a.x,f=a.y,h=a.width,m=a.height;if(r){var p=c.y,A=t.y.apply(p,{position:o});if(Np(c,"discard")&&!t.y.isInRange(A))return null;var v=[{x:u+h,y:A},{x:u,y:A}];return l==="left"?v.reverse():v}if(n){var y=c.x,x=t.x.apply(y,{position:o});if(Np(c,"discard")&&!t.x.isInRange(x))return null;var k=[{x,y:f+m},{x,y:f}];return s==="top"?k.reverse():k}if(i){var S=c.segment,C=S.map(function(N){return t.apply(N,{position:o})});return Np(c,"discard")&&zHn(C,function(N){return!t.isInRange(N)})?null:C}return null};function XVn(e){var t=e.x,n=e.y,r=e.segment,i=e.xAxisId,a=e.yAxisId,o=e.shape,s=e.className,l=e.alwaysShow,c=TVn(),u=Pat(i),f=Mat(a),h=IVn();if(!c||!h)return null;ug(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var m=Dce({x:u.scale,y:f.scale}),p=qs(t),A=qs(n),v=r&&r.length===2,y=YVn(m,p,A,v,h,e.position,u.orientation,f.orientation,e);if(!y)return null;var x=VVn(y,2),k=x[0],S=k.x,C=k.y,N=x[1],E=N.x,D=N.y,T=Np(e,"hidden")?"url(#".concat(c,")"):void 0,j=BBe(BBe({clipPath:T},Li(e,!0)),{},{x1:S,y1:C,x2:E,y2:D});return L.createElement(ul,{className:Xn("recharts-reference-line",s)},KVn(o,j),lc.renderCallByParent(e,yVn({x1:S,y1:C,x2:E,y2:D})))}var Pce=(function(e){function t(){return PVn(this,t),$Vn(this,t,arguments)}return zVn(t,e),RVn(t,[{key:"render",value:function(){return L.createElement(XVn,this.props)}}])})(L.Component);jce(Pce,"displayName","ReferenceLine");jce(Pce,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function Gee(){return Gee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gee.apply(this,arguments)}function VS(e){"@babel/helpers - typeof";return VS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},VS(e)}function jBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function PBe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jBe(Object(n),!0).forEach(function(r){L8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ZVn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JVn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Uat(r.key),r)}}function eQn(e,t,n){return t&&JVn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function tQn(e,t,n){return t=P$(t),nQn(e,Lat()?Reflect.construct(t,n||[],P$(e).constructor):t.apply(e,n))}function nQn(e,t){if(t&&(VS(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return rQn(e)}function rQn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lat(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lat=function(){return!!e})()}function P$(e){return P$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},P$(e)}function iQn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wee(e,t)}function Wee(e,t){return Wee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Wee(e,t)}function L8(e,t,n){return t=Uat(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uat(e){var t=aQn(e,"string");return VS(t)=="symbol"?t:t+""}function aQn(e,t){if(VS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(VS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var oQn=function(t){var n=t.x,r=t.y,i=t.xAxis,a=t.yAxis,o=Dce({x:i.scale,y:a.scale}),s=o.apply({x:n,y:r},{bandAware:!0});return Np(t,"discard")&&!o.isInRange(s)?null:s},U8=(function(e){function t(){return ZVn(this,t),tQn(this,t,arguments)}return iQn(t,e),eQn(t,[{key:"render",value:function(){var r=this.props,i=r.x,a=r.y,o=r.r,s=r.alwaysShow,l=r.clipPathId,c=qs(i),u=qs(a);if(ug(s===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!c||!u)return null;var f=oQn(this.props);if(!f)return null;var h=f.x,m=f.y,p=this.props,A=p.shape,v=p.className,y=Np(this.props,"hidden")?"url(#".concat(l,")"):void 0,x=PBe(PBe({clipPath:y},Li(this.props,!0)),{},{cx:h,cy:m});return L.createElement(ul,{className:Xn("recharts-reference-dot",v)},t.renderDot(A,x),lc.renderCallByParent(this.props,{x:h-o,y:m-o,width:2*o,height:2*o}))}}])})(L.Component);L8(U8,"displayName","ReferenceDot");L8(U8,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});L8(U8,"renderDot",function(e,t){var n;return L.isValidElement(e)?n=L.cloneElement(e,t):ni(e)?n=e(t):n=L.createElement(yat,Gee({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function Kee(){return Kee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kee.apply(this,arguments)}function QS(e){"@babel/helpers - typeof";return QS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},QS(e)}function MBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function RBe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MBe(Object(n),!0).forEach(function(r){z8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sQn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lQn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Hat(r.key),r)}}function cQn(e,t,n){return t&&lQn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function uQn(e,t,n){return t=M$(t),dQn(e,zat()?Reflect.construct(t,n||[],M$(e).constructor):t.apply(e,n))}function dQn(e,t){if(t&&(QS(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fQn(e)}function fQn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zat(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(zat=function(){return!!e})()}function M$(e){return M$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},M$(e)}function hQn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yee(e,t)}function Yee(e,t){return Yee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Yee(e,t)}function z8(e,t,n){return t=Hat(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hat(e){var t=mQn(e,"string");return QS(t)=="symbol"?t:t+""}function mQn(e,t){if(QS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(QS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var pQn=function(t,n,r,i,a){var o=a.x1,s=a.x2,l=a.y1,c=a.y2,u=a.xAxis,f=a.yAxis;if(!u||!f)return null;var h=Dce({x:u.scale,y:f.scale}),m={x:t?h.x.apply(o,{position:"start"}):h.x.rangeMin,y:r?h.y.apply(l,{position:"start"}):h.y.rangeMin},p={x:n?h.x.apply(s,{position:"end"}):h.x.rangeMax,y:i?h.y.apply(c,{position:"end"}):h.y.rangeMax};return Np(a,"discard")&&(!h.isInRange(m)||!h.isInRange(p))?null:Fat(m,p)},H8=(function(e){function t(){return sQn(this,t),uQn(this,t,arguments)}return hQn(t,e),cQn(t,[{key:"render",value:function(){var r=this.props,i=r.x1,a=r.x2,o=r.y1,s=r.y2,l=r.className,c=r.alwaysShow,u=r.clipPathId;ug(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=qs(i),h=qs(a),m=qs(o),p=qs(s),A=this.props.shape;if(!f&&!h&&!m&&!p&&!A)return null;var v=pQn(f,h,m,p,this.props);if(!v&&!A)return null;var y=Np(this.props,"hidden")?"url(#".concat(u,")"):void 0;return L.createElement(ul,{className:Xn("recharts-reference-area",l)},t.renderRect(A,RBe(RBe({clipPath:y},Li(this.props,!0)),v)),lc.renderCallByParent(this.props,v))}}])})(L.Component);z8(H8,"displayName","ReferenceArea");z8(H8,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});z8(H8,"renderRect",function(e,t){var n;return L.isValidElement(e)?n=L.cloneElement(e,t):ni(e)?n=e(t):n=L.createElement(Fce,Kee({},t,{className:"recharts-reference-area-rect"})),n});function Vat(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function AQn(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return xVn(r,n)}function gQn(e,t,n){var r=n==="width",i=e.x,a=e.y,o=e.width,s=e.height;return t===1?{start:r?i:a,end:r?i+o:a+s}:{start:r?i+o:a+s,end:r?i:a}}function R$(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function vQn(e,t){return Vat(e,t+1)}function yQn(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,s=t.end,l=0,c=1,u=o,f=function(){var p=r?.[l];if(p===void 0)return{v:Vat(r,c)};var A=l,v,y=function(){return v===void 0&&(v=n(p,A)),v},x=p.coordinate,k=l===0||R$(e,x,y,u,s);k||(l=0,u=o,c+=1),k&&(u=x+e*(y()/2+i),l+=c)},h;c<=a.length;)if(h=f(),h)return h.v;return[]}function VF(e){"@babel/helpers - typeof";return VF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},VF(e)}function $Be(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function rc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$Be(Object(n),!0).forEach(function(r){bQn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$Be(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bQn(e,t,n){return t=xQn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xQn(e){var t=wQn(e,"string");return VF(t)=="symbol"?t:t+""}function wQn(e,t){if(VF(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(VF(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kQn(e,t,n,r,i){for(var a=(r||[]).slice(),o=a.length,s=t.start,l=t.end,c=function(h){var m=a[h],p,A=function(){return p===void 0&&(p=n(m,h)),p};if(h===o-1){var v=e*(m.coordinate+e*A()/2-l);a[h]=m=rc(rc({},m),{},{tickCoord:v>0?m.coordinate-v*e:m.coordinate})}else a[h]=m=rc(rc({},m),{},{tickCoord:m.coordinate});var y=R$(e,m.tickCoord,A,s,l);y&&(l=m.tickCoord-e*(A()/2+i),a[h]=rc(rc({},m),{},{isShow:!0}))},u=o-1;u>=0;u--)c(u);return a}function SQn(e,t,n,r,i,a){var o=(r||[]).slice(),s=o.length,l=t.start,c=t.end;if(a){var u=r[s-1],f=n(u,s-1),h=e*(u.coordinate+e*f/2-c);o[s-1]=u=rc(rc({},u),{},{tickCoord:h>0?u.coordinate-h*e:u.coordinate});var m=R$(e,u.tickCoord,function(){return f},l,c);m&&(c=u.tickCoord-e*(f/2+i),o[s-1]=rc(rc({},u),{},{isShow:!0}))}for(var p=a?s-1:s,A=function(x){var k=o[x],S,C=function(){return S===void 0&&(S=n(k,x)),S};if(x===0){var N=e*(k.coordinate-e*C()/2-l);o[x]=k=rc(rc({},k),{},{tickCoord:N<0?k.coordinate-N*e:k.coordinate})}else o[x]=k=rc(rc({},k),{},{tickCoord:k.coordinate});var E=R$(e,k.tickCoord,C,l,c);E&&(l=k.tickCoord+e*(C()/2+i),o[x]=rc(rc({},k),{},{isShow:!0}))},v=0;v<p;v++)A(v);return o}function Mce(e,t,n){var r=e.tick,i=e.ticks,a=e.viewBox,o=e.minTickGap,s=e.orientation,l=e.interval,c=e.tickFormatter,u=e.unit,f=e.angle;if(!i||!i.length||!r)return[];if(dn(l)||$T.isSsr)return vQn(i,typeof l=="number"&&dn(l)?l:0);var h=[],m=s==="top"||s==="bottom"?"width":"height",p=u&&m==="width"?Y2(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},A=function(k,S){var C=ni(c)?c(k.value,S):k.value;return m==="width"?AQn(Y2(C,{fontSize:t,letterSpacing:n}),p,f):Y2(C,{fontSize:t,letterSpacing:n})[m]},v=i.length>=2?Mh(i[1].coordinate-i[0].coordinate):1,y=gQn(a,v,m);return l==="equidistantPreserveStart"?yQn(v,y,A,i,o):(l==="preserveStart"||l==="preserveStartEnd"?h=SQn(v,y,A,i,o,l==="preserveStartEnd"):h=kQn(v,y,A,i,o),h.filter(function(x){return x.isShow}))}var CQn=["viewBox"],_Qn=["viewBox"],NQn=["ticks"];function qS(e){"@babel/helpers - typeof";return qS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qS(e)}function Ak(){return Ak=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ak.apply(this,arguments)}function LBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function $s(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LBe(Object(n),!0).forEach(function(r){Rce(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eY(e,t){if(e==null)return{};var n=EQn(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function EQn(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function FQn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UBe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,qat(r.key),r)}}function DQn(e,t,n){return t&&UBe(e.prototype,t),n&&UBe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function TQn(e,t,n){return t=$$(t),OQn(e,Qat()?Reflect.construct(t,n||[],$$(e).constructor):t.apply(e,n))}function OQn(e,t){if(t&&(qS(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return BQn(e)}function BQn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qat(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Qat=function(){return!!e})()}function $$(e){return $$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},$$(e)}function IQn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xee(e,t)}function Xee(e,t){return Xee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Xee(e,t)}function Rce(e,t,n){return t=qat(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qat(e){var t=jQn(e,"string");return qS(t)=="symbol"?t:t+""}function jQn(e,t){if(qS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var zC=(function(e){function t(n){var r;return FQn(this,t),r=TQn(this,t,[n]),r.state={fontSize:"",letterSpacing:""},r}return IQn(t,e),DQn(t,[{key:"shouldComponentUpdate",value:function(r,i){var a=r.viewBox,o=eY(r,CQn),s=this.props,l=s.viewBox,c=eY(s,_Qn);return!Vk(a,l)||!Vk(o,c)||!Vk(i,this.state)}},{key:"componentDidMount",value:function(){var r=this.layerReference;if(r){var i=r.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];i&&this.setState({fontSize:window.getComputedStyle(i).fontSize,letterSpacing:window.getComputedStyle(i).letterSpacing})}}},{key:"getTickLineCoord",value:function(r){var i=this.props,a=i.x,o=i.y,s=i.width,l=i.height,c=i.orientation,u=i.tickSize,f=i.mirror,h=i.tickMargin,m,p,A,v,y,x,k=f?-1:1,S=r.tickSize||u,C=dn(r.tickCoord)?r.tickCoord:r.coordinate;switch(c){case"top":m=p=r.coordinate,v=o+ +!f*l,A=v-k*S,x=A-k*h,y=C;break;case"left":A=v=r.coordinate,p=a+ +!f*s,m=p-k*S,y=m-k*h,x=C;break;case"right":A=v=r.coordinate,p=a+ +f*s,m=p+k*S,y=m+k*h,x=C;break;default:m=p=r.coordinate,v=o+ +f*l,A=v+k*S,x=A+k*h,y=C;break}return{line:{x1:m,y1:A,x2:p,y2:v},tick:{x:y,y:x}}}},{key:"getTickTextAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o;switch(i){case"left":o=a?"start":"end";break;case"right":o=a?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var r=this.props,i=r.orientation,a=r.mirror,o="end";switch(i){case"left":case"right":o="middle";break;case"top":o=a?"start":"end";break;default:o=a?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.orientation,c=r.mirror,u=r.axisLine,f=$s($s($s({},Li(this.props,!1)),Li(u,!1)),{},{fill:"none"});if(l==="top"||l==="bottom"){var h=+(l==="top"&&!c||l==="bottom"&&c);f=$s($s({},f),{},{x1:i,y1:a+h*s,x2:i+o,y2:a+h*s})}else{var m=+(l==="left"&&!c||l==="right"&&c);f=$s($s({},f),{},{x1:i+m*o,y1:a,x2:i+m*o,y2:a+s})}return L.createElement("line",Ak({},f,{className:Xn("recharts-cartesian-axis-line",Tf(u,"className"))}))}},{key:"renderTicks",value:function(r,i,a){var o=this,s=this.props,l=s.tickLine,c=s.stroke,u=s.tick,f=s.tickFormatter,h=s.unit,m=Mce($s($s({},this.props),{},{ticks:r}),i,a),p=this.getTickTextAnchor(),A=this.getTickVerticalAnchor(),v=Li(this.props,!1),y=Li(u,!1),x=$s($s({},v),{},{fill:"none"},Li(l,!1)),k=m.map(function(S,C){var N=o.getTickLineCoord(S),E=N.line,D=N.tick,T=$s($s($s($s({textAnchor:p,verticalAnchor:A},v),{},{stroke:"none",fill:c},y),D),{},{index:C,payload:S,visibleTicksCount:m.length,tickFormatter:f});return L.createElement(ul,Ak({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},d$(o.props,S,C)),l&&L.createElement("line",Ak({},x,E,{className:Xn("recharts-cartesian-axis-tick-line",Tf(l,"className"))})),u&&t.renderTickItem(u,T,"".concat(ni(f)?f(S.value,C):S.value).concat(h||"")))});return L.createElement("g",{className:"recharts-cartesian-axis-ticks"},k)}},{key:"render",value:function(){var r=this,i=this.props,a=i.axisLine,o=i.width,s=i.height,l=i.ticksGenerator,c=i.className,u=i.hide;if(u)return null;var f=this.props,h=f.ticks,m=eY(f,NQn),p=h;return ni(l)&&(p=h&&h.length>0?l(this.props):l(m)),o<=0||s<=0||!p||!p.length?null:L.createElement(ul,{className:Xn("recharts-cartesian-axis",c),ref:function(v){r.layerReference=v}},a&&this.renderAxisLine(),this.renderTicks(p,this.state.fontSize,this.state.letterSpacing),lc.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,a){var o,s=Xn(i.className,"recharts-cartesian-axis-tick-value");return L.isValidElement(r)?o=L.cloneElement(r,$s($s({},i),{},{className:s})):ni(r)?o=r($s($s({},i),{},{className:s})):o=L.createElement(g$,Ak({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])})(w.Component);Rce(zC,"displayName","CartesianAxis");Rce(zC,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var PQn=["x1","y1","x2","y2","key"],MQn=["offset"];function Rx(e){"@babel/helpers - typeof";return Rx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rx(e)}function zBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zBe(Object(n),!0).forEach(function(r){RQn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RQn(e,t,n){return t=$Qn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $Qn(e){var t=LQn(e,"string");return Rx(t)=="symbol"?t:t+""}function LQn(e,t){if(Rx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Rx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Mb(){return Mb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mb.apply(this,arguments)}function HBe(e,t){if(e==null)return{};var n=UQn(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UQn(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var zQn=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,a=t.y,o=t.width,s=t.height,l=t.ry;return L.createElement("rect",{x:i,y:a,ry:l,width:o,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function Gat(e,t){var n;if(L.isValidElement(e))n=L.cloneElement(e,t);else if(ni(e))n=e(t);else{var r=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,l=HBe(t,PQn),c=Li(l,!1);c.offset;var u=HBe(c,MQn);n=L.createElement("line",Mb({},u,{x1:r,y1:i,x2:a,y2:o,fill:"none",key:s}))}return n}function HQn(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var c=cc(cc({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return Gat(i,c)});return L.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function VQn(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var c=cc(cc({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return Gat(i,c)});return L.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function QQn(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var u=s.map(function(h){return Math.round(h+i-i)}).sort(function(h,m){return h-m});i!==u[0]&&u.unshift(0);var f=u.map(function(h,m){var p=!u[m+1],A=p?i+o-h:u[m+1]-h;if(A<=0)return null;var v=m%t.length;return L.createElement("rect",{key:"react-".concat(m),y:h,x:r,height:A,width:a,stroke:"none",fill:t[v],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return L.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function qQn(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!n||!r||!r.length)return null;var u=c.map(function(h){return Math.round(h+a-a)}).sort(function(h,m){return h-m});a!==u[0]&&u.unshift(0);var f=u.map(function(h,m){var p=!u[m+1],A=p?a+s-h:u[m+1]-h;if(A<=0)return null;var v=m%r.length;return L.createElement("rect",{key:"react-".concat(m),x:h,y:o,width:A,height:l,stroke:"none",fill:r[v],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return L.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var GQn=function(t,n){var r=t.xAxis,i=t.width,a=t.height,o=t.offset;return oat(Mce(cc(cc(cc({},zC.defaultProps),r),{},{ticks:ig(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,n)},WQn=function(t,n){var r=t.yAxis,i=t.width,a=t.height,o=t.offset;return oat(Mce(cc(cc(cc({},zC.defaultProps),r),{},{ticks:ig(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,n)},$w={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Wat(e){var t,n,r,i,a,o,s=Bce(),l=Ice(),c=jVn(),u=cc(cc({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:$w.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:$w.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:$w.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:$w.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:$w.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:$w.verticalFill,x:dn(e.x)?e.x:c.left,y:dn(e.y)?e.y:c.top,width:dn(e.width)?e.width:c.width,height:dn(e.height)?e.height:c.height}),f=u.x,h=u.y,m=u.width,p=u.height,A=u.syncWithTicks,v=u.horizontalValues,y=u.verticalValues,x=OVn(),k=BVn();if(!dn(m)||m<=0||!dn(p)||p<=0||!dn(f)||f!==+f||!dn(h)||h!==+h)return null;var S=u.verticalCoordinatesGenerator||GQn,C=u.horizontalCoordinatesGenerator||WQn,N=u.horizontalPoints,E=u.verticalPoints;if((!N||!N.length)&&ni(C)){var D=v&&v.length,T=C({yAxis:k?cc(cc({},k),{},{ticks:D?v:k.ticks}):void 0,width:s,height:l,offset:c},D?!0:A);ug(Array.isArray(T),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Rx(T),"]")),Array.isArray(T)&&(N=T)}if((!E||!E.length)&&ni(S)){var j=y&&y.length,O=S({xAxis:x?cc(cc({},x),{},{ticks:j?y:x.ticks}):void 0,width:s,height:l,offset:c},j?!0:A);ug(Array.isArray(O),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Rx(O),"]")),Array.isArray(O)&&(E=O)}return L.createElement("g",{className:"recharts-cartesian-grid"},L.createElement(zQn,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),L.createElement(HQn,Mb({},u,{offset:c,horizontalPoints:N,xAxis:x,yAxis:k})),L.createElement(VQn,Mb({},u,{offset:c,verticalPoints:E,xAxis:x,yAxis:k})),L.createElement(QQn,Mb({},u,{horizontalPoints:N})),L.createElement(qQn,Mb({},u,{verticalPoints:E})))}Wat.displayName="CartesianGrid";function GS(e){"@babel/helpers - typeof";return GS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},GS(e)}function KQn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YQn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xat(r.key),r)}}function XQn(e,t,n){return t&&YQn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function ZQn(e,t,n){return t=L$(t),JQn(e,Kat()?Reflect.construct(t,n||[],L$(e).constructor):t.apply(e,n))}function JQn(e,t){if(t&&(GS(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return eqn(e)}function eqn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kat(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Kat=function(){return!!e})()}function L$(e){return L$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},L$(e)}function tqn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zee(e,t)}function Zee(e,t){return Zee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Zee(e,t)}function Yat(e,t,n){return t=Xat(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xat(e){var t=nqn(e,"string");return GS(t)=="symbol"?t:t+""}function nqn(e,t){if(GS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(GS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Jee(){return Jee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jee.apply(this,arguments)}function rqn(e){var t=e.xAxisId,n=Bce(),r=Ice(),i=Pat(t);return i==null?null:w.createElement(zC,Jee({},i,{className:Xn("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:n,height:r},ticksGenerator:function(o){return ig(o,!0)}}))}var V8=(function(e){function t(){return KQn(this,t),ZQn(this,t,arguments)}return tqn(t,e),XQn(t,[{key:"render",value:function(){return w.createElement(rqn,this.props)}}])})(w.Component);Yat(V8,"displayName","XAxis");Yat(V8,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function WS(e){"@babel/helpers - typeof";return WS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},WS(e)}function iqn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function aqn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,eot(r.key),r)}}function oqn(e,t,n){return t&&aqn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sqn(e,t,n){return t=U$(t),lqn(e,Zat()?Reflect.construct(t,n||[],U$(e).constructor):t.apply(e,n))}function lqn(e,t){if(t&&(WS(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cqn(e)}function cqn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zat(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Zat=function(){return!!e})()}function U$(e){return U$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},U$(e)}function uqn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ete(e,t)}function ete(e,t){return ete=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ete(e,t)}function Jat(e,t,n){return t=eot(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eot(e){var t=dqn(e,"string");return WS(t)=="symbol"?t:t+""}function dqn(e,t){if(WS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(WS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tte(){return tte=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tte.apply(this,arguments)}var fqn=function(t){var n=t.yAxisId,r=Bce(),i=Ice(),a=Mat(n);return a==null?null:w.createElement(zC,tte({},a,{className:Xn("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:r,height:i},ticksGenerator:function(s){return ig(s,!0)}}))},$ce=(function(e){function t(){return iqn(this,t),sqn(this,t,arguments)}return uqn(t,e),oqn(t,[{key:"render",value:function(){return w.createElement(fqn,this.props)}}])})(w.Component);Jat($ce,"displayName","YAxis");Jat($ce,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function VBe(e){return Aqn(e)||pqn(e)||mqn(e)||hqn()}function hqn(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1180
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function mqn(e,t){if(e){if(typeof e=="string")return nte(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nte(e,t)}}function pqn(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Aqn(e){if(Array.isArray(e))return nte(e)}function nte(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var rte=function(t,n,r,i,a){var o=zh(t,Pce),s=zh(t,U8),l=[].concat(VBe(o),VBe(s)),c=zh(t,H8),u="".concat(i,"Id"),f=i[0],h=n;if(l.length&&(h=l.reduce(function(A,v){if(v.props[u]===r&&Np(v.props,"extendDomain")&&dn(v.props[f])){var y=v.props[f];return[Math.min(A[0],y),Math.max(A[1],y)]}return A},h)),c.length){var m="".concat(f,"1"),p="".concat(f,"2");h=c.reduce(function(A,v){if(v.props[u]===r&&Np(v.props,"extendDomain")&&dn(v.props[m])&&dn(v.props[p])){var y=v.props[m],x=v.props[p];return[Math.min(A[0],y,x),Math.max(A[1],y,x)]}return A},h)}return a&&a.length&&(h=a.reduce(function(A,v){return dn(v)?[Math.min(A[0],v),Math.max(A[1],v)]:A},h)),h},tY={exports:{}},QBe;function gqn(){return QBe||(QBe=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function a(l,c,u,f,h){if(typeof u!="function")throw new TypeError("The listener must be a function");var m=new i(u,f||l,h),p=n?n+c:c;return l._events[p]?l._events[p].fn?l._events[p]=[l._events[p],m]:l._events[p].push(m):(l._events[p]=m,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,f;if(this._eventsCount===0)return c;for(f in u=this._events)t.call(u,f)&&c.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=n?n+c:c,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var h=0,m=f.length,p=new Array(m);h<m;h++)p[h]=f[h].fn;return p},s.prototype.listenerCount=function(c){var u=n?n+c:c,f=this._events[u];return f?f.fn?1:f.length:0},s.prototype.emit=function(c,u,f,h,m,p){var A=n?n+c:c;if(!this._events[A])return!1;var v=this._events[A],y=arguments.length,x,k;if(v.fn){switch(v.once&&this.removeListener(c,v.fn,void 0,!0),y){case 1:return v.fn.call(v.context),!0;case 2:return v.fn.call(v.context,u),!0;case 3:return v.fn.call(v.context,u,f),!0;case 4:return v.fn.call(v.context,u,f,h),!0;case 5:return v.fn.call(v.context,u,f,h,m),!0;case 6:return v.fn.call(v.context,u,f,h,m,p),!0}for(k=1,x=new Array(y-1);k<y;k++)x[k-1]=arguments[k];v.fn.apply(v.context,x)}else{var S=v.length,C;for(k=0;k<S;k++)switch(v[k].once&&this.removeListener(c,v[k].fn,void 0,!0),y){case 1:v[k].fn.call(v[k].context);break;case 2:v[k].fn.call(v[k].context,u);break;case 3:v[k].fn.call(v[k].context,u,f);break;case 4:v[k].fn.call(v[k].context,u,f,h);break;default:if(!x)for(C=1,x=new Array(y-1);C<y;C++)x[C-1]=arguments[C];v[k].fn.apply(v[k].context,x)}}return!0},s.prototype.on=function(c,u,f){return a(this,c,u,f,!1)},s.prototype.once=function(c,u,f){return a(this,c,u,f,!0)},s.prototype.removeListener=function(c,u,f,h){var m=n?n+c:c;if(!this._events[m])return this;if(!u)return o(this,m),this;var p=this._events[m];if(p.fn)p.fn===u&&(!h||p.once)&&(!f||p.context===f)&&o(this,m);else{for(var A=0,v=[],y=p.length;A<y;A++)(p[A].fn!==u||h&&!p[A].once||f&&p[A].context!==f)&&v.push(p[A]);v.length?this._events[m]=v.length===1?v[0]:v:o(this,m)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&o(this,u)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(tY)),tY.exports}var vqn=gqn();const yqn=Fi(vqn);var nY=new yqn,rY="recharts.syncMouseEvents";function QF(e){"@babel/helpers - typeof";return QF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},QF(e)}function bqn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xqn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,tot(r.key),r)}}function wqn(e,t,n){return t&&xqn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function iY(e,t,n){return t=tot(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tot(e){var t=kqn(e,"string");return QF(t)=="symbol"?t:t+""}function kqn(e,t){if(QF(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(QF(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Sqn=(function(){function e(){bqn(this,e),iY(this,"activeIndex",0),iY(this,"coordinateList",[]),iY(this,"layout","horizontal")}return wqn(e,[{key:"setDetails",value:function(n){var r,i=n.coordinateList,a=i===void 0?null:i,o=n.container,s=o===void 0?null:o,l=n.layout,c=l===void 0?null:l,u=n.offset,f=u===void 0?null:u,h=n.mouseHandlerCallback,m=h===void 0?null:h;this.coordinateList=(r=a??this.coordinateList)!==null&&r!==void 0?r:[],this.container=s??this.container,this.layout=c??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=m??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,r;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var i=this.container.getBoundingClientRect(),a=i.x,o=i.y,s=i.height,l=this.coordinateList[this.activeIndex].coordinate,c=((n=window)===null||n===void 0?void 0:n.scrollX)||0,u=((r=window)===null||r===void 0?void 0:r.scrollY)||0,f=a+l+c,h=o+this.offset.top+s/2+u;this.mouseHandlerCallback({pageX:f,pageY:h})}}}])})();function Cqn(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var r=e?.[0],i=e?.[1];if(r&&i&&dn(r)&&dn(i))return!0}return!1}function _qn(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function not(e){var t=e.cx,n=e.cy,r=e.radius,i=e.startAngle,a=e.endAngle,o=Pl(t,n,r,i),s=Pl(t,n,r,a);return{points:[o,s],cx:t,cy:n,radius:r,startAngle:i,endAngle:a}}function Nqn(e,t,n){var r,i,a,o;if(e==="horizontal")r=t.x,a=r,i=n.top,o=n.top+n.height;else if(e==="vertical")i=t.y,o=i,r=n.left,a=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var s=t.cx,l=t.cy,c=t.innerRadius,u=t.outerRadius,f=t.angle,h=Pl(s,l,c,f),m=Pl(s,l,u,f);r=h.x,i=h.y,a=m.x,o=m.y}else return not(t);return[{x:r,y:i},{x:a,y:o}]}function qF(e){"@babel/helpers - typeof";return qF=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qF(e)}function qBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function TI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qBe(Object(n),!0).forEach(function(r){Eqn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Eqn(e,t,n){return t=Fqn(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fqn(e){var t=Dqn(e,"string");return qF(t)=="symbol"?t:t+""}function Dqn(e,t){if(qF(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(qF(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Tqn(e){var t,n,r=e.element,i=e.tooltipEventType,a=e.isActive,o=e.activeCoordinate,s=e.activePayload,l=e.offset,c=e.activeTooltipIndex,u=e.tooltipAxisBandSize,f=e.layout,h=e.chartName,m=(t=r.props.cursor)!==null&&t!==void 0?t:(n=r.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!r||!m||!a||!o||h!=="ScatterChart"&&i!=="axis")return null;var p,A=_5e;if(h==="ScatterChart")p=o,A=z9n;else if(h==="BarChart")p=_qn(f,o,l,u),A=Fce;else if(f==="radial"){var v=not(o),y=v.cx,x=v.cy,k=v.radius,S=v.startAngle,C=v.endAngle;p={cx:y,cy:x,startAngle:S,endAngle:C,innerRadius:k,outerRadius:k},A=dat}else p={points:Nqn(f,o,l)},A=_5e;var N=TI(TI(TI(TI({stroke:"#ccc",pointerEvents:"none"},l),p),Li(m,!1)),{},{payload:s,payloadIndex:c,className:Xn("recharts-tooltip-cursor",m.className)});return w.isValidElement(m)?w.cloneElement(m,N):w.createElement(A,N)}var Oqn=["item"],Bqn=["children","className","width","height","style","compact","title","desc"];function KS(e){"@babel/helpers - typeof";return KS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},KS(e)}function gk(){return gk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gk.apply(this,arguments)}function GBe(e,t){return Pqn(e)||jqn(e,t)||iot(e,t)||Iqn()}function Iqn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1181
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jqn(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}function Pqn(e){if(Array.isArray(e))return e}function WBe(e,t){if(e==null)return{};var n=Mqn(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)r=a[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Mqn(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Rqn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $qn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,aot(r.key),r)}}function Lqn(e,t,n){return t&&$qn(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Uqn(e,t,n){return t=z$(t),zqn(e,rot()?Reflect.construct(t,n||[],z$(e).constructor):t.apply(e,n))}function zqn(e,t){if(t&&(KS(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Hqn(e)}function Hqn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rot(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rot=function(){return!!e})()}function z$(e){return z$=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},z$(e)}function Vqn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ite(e,t)}function ite(e,t){return ite=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},ite(e,t)}function YS(e){return Gqn(e)||qqn(e)||iot(e)||Qqn()}function Qqn(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1182
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iot(e,t){if(e){if(typeof e=="string")return ate(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ate(e,t)}}function qqn(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gqn(e){if(Array.isArray(e))return ate(e)}function ate(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function KBe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Nt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KBe(Object(n),!0).forEach(function(r){lr(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KBe(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lr(e,t,n){return t=aot(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aot(e){var t=Wqn(e,"string");return KS(t)=="symbol"?t:t+""}function Wqn(e,t){if(KS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(KS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Kqn={xAxis:["bottom","top"],yAxis:["left","right"]},Yqn={width:"100%",height:"100%"},oot={x:0,y:0};function OI(e){return e}var Xqn=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},Zqn=function(t,n,r,i){var a=n.find(function(u){return u&&u.index===r});if(a){if(t==="horizontal")return{x:a.coordinate,y:i.y};if(t==="vertical")return{x:i.x,y:a.coordinate};if(t==="centric"){var o=a.coordinate,s=i.radius;return Nt(Nt(Nt({},i),Pl(i.cx,i.cy,s,o)),{},{angle:o,radius:s})}var l=a.coordinate,c=i.angle;return Nt(Nt(Nt({},i),Pl(i.cx,i.cy,l,c)),{},{angle:c,radius:l})}return oot},Q8=function(t,n){var r=n.graphicalItems,i=n.dataStartIndex,a=n.dataEndIndex,o=(r??[]).reduce(function(s,l){var c=l.props.data;return c&&c.length?[].concat(YS(s),YS(c)):s},[]);return o.length>0?o:t&&t.length&&dn(i)&&dn(a)?t.slice(i,a+1):[]};function sot(e){return e==="number"?[0,"auto"]:void 0}var ote=function(t,n,r,i){var a=t.graphicalItems,o=t.tooltipAxis,s=Q8(n,t);return r<0||!a||!a.length||r>=s.length?null:a.reduce(function(l,c){var u,f=(u=c.props.data)!==null&&u!==void 0?u:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(o.dataKey&&!o.allowDuplicatedCategory){var m=f===void 0?s:f;h=ree(m,o.dataKey,i)}else h=f&&f[r]||s[r];return h?[].concat(YS(l),[lat(c,h)]):l},[])},YBe=function(t,n,r,i){var a=i||{x:t.chartX,y:t.chartY},o=Xqn(a,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,u=FUn(o,s,c,l);if(u>=0&&c){var f=c[u]&&c[u].value,h=ote(t,n,u,f),m=Zqn(r,s,u,a);return{activeTooltipIndex:u,activeLabel:f,activePayload:h,activeCoordinate:m}}return null},Jqn=function(t,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.layout,f=t.children,h=t.stackOffset,m=aat(u,a);return r.reduce(function(p,A){var v,y=A.type.defaultProps!==void 0?Nt(Nt({},A.type.defaultProps),A.props):A.props,x=y.type,k=y.dataKey,S=y.allowDataOverflow,C=y.allowDuplicatedCategory,N=y.scale,E=y.ticks,D=y.includeHidden,T=y[o];if(p[T])return p;var j=Q8(t.data,{graphicalItems:i.filter(function(H){var q,W=o in H.props?H.props[o]:(q=H.type.defaultProps)===null||q===void 0?void 0:q[o];return W===T}),dataStartIndex:l,dataEndIndex:c}),O=j.length,B,M,$;Cqn(y.domain,S,x)&&(B=_ee(y.domain,null,S),m&&(x==="number"||N!=="auto")&&($=X2(j,k,"category")));var U=sot(x);if(!B||B.length===0){var P,V=(P=y.domain)!==null&&P!==void 0?P:U;if(k){if(B=X2(j,k,x),x==="category"&&m){var Q=_$n(B);C&&Q?(M=B,B=D$(0,O)):C||(B=f5e(V,B,A).reduce(function(H,q){return H.indexOf(q)>=0?H:[].concat(YS(H),[q])},[]))}else if(x==="category")C?B=B.filter(function(H){return H!==""&&!Ui(H)}):B=f5e(V,B,A).reduce(function(H,q){return H.indexOf(q)>=0||q===""||Ui(q)?H:[].concat(YS(H),[q])},[]);else if(x==="number"){var X=IUn(j,i.filter(function(H){var q,W,te=o in H.props?H.props[o]:(q=H.type.defaultProps)===null||q===void 0?void 0:q[o],ne="hide"in H.props?H.props.hide:(W=H.type.defaultProps)===null||W===void 0?void 0:W.hide;return te===T&&(D||!ne)}),k,a,u);X&&(B=X)}m&&(x==="number"||N!=="auto")&&($=X2(j,k,"category"))}else m?B=D$(0,O):s&&s[T]&&s[T].hasStack&&x==="number"?B=h==="expand"?[0,1]:sat(s[T].stackGroups,l,c):B=iat(j,i.filter(function(H){var q=o in H.props?H.props[o]:H.type.defaultProps[o],W="hide"in H.props?H.props.hide:H.type.defaultProps.hide;return q===T&&(D||!W)}),x,u,!0);if(x==="number")B=rte(f,B,T,a,E),V&&(B=_ee(V,B,S));else if(x==="category"&&V){var Z=V,le=B.every(function(H){return Z.indexOf(H)>=0});le&&(B=Z)}}return Nt(Nt({},p),{},lr({},T,Nt(Nt({},y),{},{axisType:a,domain:B,categoricalDomain:$,duplicateDomain:M,originalDomain:(v=y.domain)!==null&&v!==void 0?v:U,isCategorical:m,layout:u})))},{})},eGn=function(t,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.layout,f=t.children,h=Q8(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),m=h.length,p=aat(u,a),A=-1;return r.reduce(function(v,y){var x=y.type.defaultProps!==void 0?Nt(Nt({},y.type.defaultProps),y.props):y.props,k=x[o],S=sot("number");if(!v[k]){A++;var C;return p?C=D$(0,m):s&&s[k]&&s[k].hasStack?(C=sat(s[k].stackGroups,l,c),C=rte(f,C,k,a)):(C=_ee(S,iat(h,r.filter(function(N){var E,D,T=o in N.props?N.props[o]:(E=N.type.defaultProps)===null||E===void 0?void 0:E[o],j="hide"in N.props?N.props.hide:(D=N.type.defaultProps)===null||D===void 0?void 0:D.hide;return T===k&&!j}),"number",u),i.defaultProps.allowDataOverflow),C=rte(f,C,k,a)),Nt(Nt({},v),{},lr({},k,Nt(Nt({axisType:a},i.defaultProps),{},{hide:!0,orientation:Tf(Kqn,"".concat(a,".").concat(A%2),null),domain:C,originalDomain:S,isCategorical:p,layout:u})))}return v},{})},tGn=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,o=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.children,f="".concat(i,"Id"),h=zh(u,a),m={};return h&&h.length?m=Jqn(t,{axes:h,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):o&&o.length&&(m=eGn(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),m},nGn=function(t){var n=qv(t),r=ig(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:kce(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:x$(n,r)}},XBe=function(t){var n=t.children,r=t.defaultShowTooltip,i=sd(n,US),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},rGn=function(t){return!t||!t.length?!1:t.some(function(n){var r=cg(n&&n.type);return r&&r.indexOf("Bar")>=0})},ZBe=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},iGn=function(t,n){var r=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,c=r.width,u=r.height,f=r.children,h=r.margin||{},m=sd(f,US),p=sd(f,rx),A=Object.keys(l).reduce(function(C,N){var E=l[N],D=E.orientation;return!E.mirror&&!E.hide?Nt(Nt({},C),{},lr({},D,C[D]+E.width)):C},{left:h.left||0,right:h.right||0}),v=Object.keys(o).reduce(function(C,N){var E=o[N],D=E.orientation;return!E.mirror&&!E.hide?Nt(Nt({},C),{},lr({},D,Tf(C,"".concat(D))+E.height)):C},{top:h.top||0,bottom:h.bottom||0}),y=Nt(Nt({},v),A),x=y.bottom;m&&(y.bottom+=m.props.height||US.defaultProps.height),p&&n&&(y=OUn(y,i,r,n));var k=c-y.left-y.right,S=u-y.top-y.bottom;return Nt(Nt({brushBottom:x},y),{},{width:Math.max(k,0),height:Math.max(S,0)})},aGn=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},oGn=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,c=t.legendContent,u=t.formatAxisMap,f=t.defaultProps,h=function(y,x){var k=x.graphicalItems,S=x.stackGroups,C=x.offset,N=x.updateId,E=x.dataStartIndex,D=x.dataEndIndex,T=y.barSize,j=y.layout,O=y.barGap,B=y.barCategoryGap,M=y.maxBarSize,$=ZBe(j),U=$.numericAxisName,P=$.cateAxisName,V=rGn(k),Q=[];return k.forEach(function(X,Z){var le=Q8(y.data,{graphicalItems:[X],dataStartIndex:E,dataEndIndex:D}),H=X.type.defaultProps!==void 0?Nt(Nt({},X.type.defaultProps),X.props):X.props,q=H.dataKey,W=H.maxBarSize,te=H["".concat(U,"Id")],ne=H["".concat(P,"Id")],re={},de=l.reduce(function(ve,be){var Re=x["".concat(be.axisType,"Map")],Me=H["".concat(be.axisType,"Id")];Re&&Re[Me]||be.axisType==="zAxis"||Mx();var Le=Re[Me];return Nt(Nt({},ve),{},lr(lr({},be.axisType,Le),"".concat(be.axisType,"Ticks"),ig(Le)))},re),he=de[P],pe=de["".concat(P,"Ticks")],oe=S&&S[te]&&S[te].hasStack&&qUn(X,S[te].stackGroups),J=cg(X.type).indexOf("Bar")>=0,Se=x$(he,pe),we=[],ke=V&&DUn({barSize:T,stackGroups:S,totalSize:aGn(de,P)});if(J){var me,K,ie=Ui(W)?M:W,ce=(me=(K=x$(he,pe,!0))!==null&&K!==void 0?K:ie)!==null&&me!==void 0?me:0;we=TUn({barGap:O,barCategoryGap:B,bandSize:ce!==Se?ce:Se,sizeList:ke[ne],maxBarSize:ie}),ce!==Se&&(we=we.map(function(ve){return Nt(Nt({},ve),{},{position:Nt(Nt({},ve.position),{},{offset:ve.position.offset-ce/2})})}))}var ue=X&&X.type&&X.type.getComposedData;ue&&Q.push({props:Nt(Nt({},ue(Nt(Nt({},de),{},{displayedData:le,props:y,dataKey:q,item:X,bandSize:Se,barPosition:we,offset:C,stackedData:oe,layout:j,dataStartIndex:E,dataEndIndex:D}))),{},lr(lr(lr({key:X.key||"item-".concat(Z)},U,de[U]),P,de[P]),"animationId",N)),childIndex:R$n(X,y.children),item:X})}),Q},m=function(y,x){var k=y.props,S=y.dataStartIndex,C=y.dataEndIndex,N=y.updateId;if(!mDe({props:k}))return null;var E=k.children,D=k.layout,T=k.stackOffset,j=k.data,O=k.reverseStackOrder,B=ZBe(D),M=B.numericAxisName,$=B.cateAxisName,U=zh(E,r),P=HUn(j,U,"".concat(M,"Id"),"".concat($,"Id"),T,O),V=l.reduce(function(H,q){var W="".concat(q.axisType,"Map");return Nt(Nt({},H),{},lr({},W,tGn(k,Nt(Nt({},q),{},{graphicalItems:U,stackGroups:q.axisType===M&&P,dataStartIndex:S,dataEndIndex:C}))))},{}),Q=iGn(Nt(Nt({},V),{},{props:k,graphicalItems:U}),x?.legendBBox);Object.keys(V).forEach(function(H){V[H]=u(k,V[H],Q,H.replace("Map",""),n)});var X=V["".concat($,"Map")],Z=nGn(X),le=h(k,Nt(Nt({},V),{},{dataStartIndex:S,dataEndIndex:C,updateId:N,graphicalItems:U,stackGroups:P,offset:Q}));return Nt(Nt({formattedGraphicalItems:le,graphicalItems:U,offset:Q,stackGroups:P},Z),V)},p=(function(v){function y(x){var k,S,C;return Rqn(this,y),C=Uqn(this,y,[x]),lr(C,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),lr(C,"accessibilityManager",new Sqn),lr(C,"handleLegendBBoxUpdate",function(N){if(N){var E=C.state,D=E.dataStartIndex,T=E.dataEndIndex,j=E.updateId;C.setState(Nt({legendBBox:N},m({props:C.props,dataStartIndex:D,dataEndIndex:T,updateId:j},Nt(Nt({},C.state),{},{legendBBox:N}))))}}),lr(C,"handleReceiveSyncEvent",function(N,E,D){if(C.props.syncId===N){if(D===C.eventEmitterSymbol&&typeof C.props.syncMethod!="function")return;C.applySyncEvent(E)}}),lr(C,"handleBrushChange",function(N){var E=N.startIndex,D=N.endIndex;if(E!==C.state.dataStartIndex||D!==C.state.dataEndIndex){var T=C.state.updateId;C.setState(function(){return Nt({dataStartIndex:E,dataEndIndex:D},m({props:C.props,dataStartIndex:E,dataEndIndex:D,updateId:T},C.state))}),C.triggerSyncEvent({dataStartIndex:E,dataEndIndex:D})}}),lr(C,"handleMouseEnter",function(N){var E=C.getMouseInfo(N);if(E){var D=Nt(Nt({},E),{},{isTooltipActive:!0});C.setState(D),C.triggerSyncEvent(D);var T=C.props.onMouseEnter;ni(T)&&T(D,N)}}),lr(C,"triggeredAfterMouseMove",function(N){var E=C.getMouseInfo(N),D=E?Nt(Nt({},E),{},{isTooltipActive:!0}):{isTooltipActive:!1};C.setState(D),C.triggerSyncEvent(D);var T=C.props.onMouseMove;ni(T)&&T(D,N)}),lr(C,"handleItemMouseEnter",function(N){C.setState(function(){return{isTooltipActive:!0,activeItem:N,activePayload:N.tooltipPayload,activeCoordinate:N.tooltipPosition||{x:N.cx,y:N.cy}}})}),lr(C,"handleItemMouseLeave",function(){C.setState(function(){return{isTooltipActive:!1}})}),lr(C,"handleMouseMove",function(N){N.persist(),C.throttleTriggeredAfterMouseMove(N)}),lr(C,"handleMouseLeave",function(N){C.throttleTriggeredAfterMouseMove.cancel();var E={isTooltipActive:!1};C.setState(E),C.triggerSyncEvent(E);var D=C.props.onMouseLeave;ni(D)&&D(E,N)}),lr(C,"handleOuterEvent",function(N){var E=M$n(N),D=Tf(C.props,"".concat(E));if(E&&ni(D)){var T,j;/.*touch.*/i.test(E)?j=C.getMouseInfo(N.changedTouches[0]):j=C.getMouseInfo(N),D((T=j)!==null&&T!==void 0?T:{},N)}}),lr(C,"handleClick",function(N){var E=C.getMouseInfo(N);if(E){var D=Nt(Nt({},E),{},{isTooltipActive:!0});C.setState(D),C.triggerSyncEvent(D);var T=C.props.onClick;ni(T)&&T(D,N)}}),lr(C,"handleMouseDown",function(N){var E=C.props.onMouseDown;if(ni(E)){var D=C.getMouseInfo(N);E(D,N)}}),lr(C,"handleMouseUp",function(N){var E=C.props.onMouseUp;if(ni(E)){var D=C.getMouseInfo(N);E(D,N)}}),lr(C,"handleTouchMove",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&C.throttleTriggeredAfterMouseMove(N.changedTouches[0])}),lr(C,"handleTouchStart",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&C.handleMouseDown(N.changedTouches[0])}),lr(C,"handleTouchEnd",function(N){N.changedTouches!=null&&N.changedTouches.length>0&&C.handleMouseUp(N.changedTouches[0])}),lr(C,"handleDoubleClick",function(N){var E=C.props.onDoubleClick;if(ni(E)){var D=C.getMouseInfo(N);E(D,N)}}),lr(C,"handleContextMenu",function(N){var E=C.props.onContextMenu;if(ni(E)){var D=C.getMouseInfo(N);E(D,N)}}),lr(C,"triggerSyncEvent",function(N){C.props.syncId!==void 0&&nY.emit(rY,C.props.syncId,N,C.eventEmitterSymbol)}),lr(C,"applySyncEvent",function(N){var E=C.props,D=E.layout,T=E.syncMethod,j=C.state.updateId,O=N.dataStartIndex,B=N.dataEndIndex;if(N.dataStartIndex!==void 0||N.dataEndIndex!==void 0)C.setState(Nt({dataStartIndex:O,dataEndIndex:B},m({props:C.props,dataStartIndex:O,dataEndIndex:B,updateId:j},C.state)));else if(N.activeTooltipIndex!==void 0){var M=N.chartX,$=N.chartY,U=N.activeTooltipIndex,P=C.state,V=P.offset,Q=P.tooltipTicks;if(!V)return;if(typeof T=="function")U=T(Q,N);else if(T==="value"){U=-1;for(var X=0;X<Q.length;X++)if(Q[X].value===N.activeLabel){U=X;break}}var Z=Nt(Nt({},V),{},{x:V.left,y:V.top}),le=Math.min(M,Z.x+Z.width),H=Math.min($,Z.y+Z.height),q=Q[U]&&Q[U].value,W=ote(C.state,C.props.data,U),te=Q[U]?{x:D==="horizontal"?Q[U].coordinate:le,y:D==="horizontal"?H:Q[U].coordinate}:oot;C.setState(Nt(Nt({},N),{},{activeLabel:q,activeCoordinate:te,activePayload:W,activeTooltipIndex:U}))}else C.setState(N)}),lr(C,"renderCursor",function(N){var E,D=C.state,T=D.isTooltipActive,j=D.activeCoordinate,O=D.activePayload,B=D.offset,M=D.activeTooltipIndex,$=D.tooltipAxisBandSize,U=C.getTooltipEventType(),P=(E=N.props.active)!==null&&E!==void 0?E:T,V=C.props.layout,Q=N.key||"_recharts-cursor";return L.createElement(Tqn,{key:Q,activeCoordinate:j,activePayload:O,activeTooltipIndex:M,chartName:n,element:N,isActive:P,layout:V,offset:B,tooltipAxisBandSize:$,tooltipEventType:U})}),lr(C,"renderPolarAxis",function(N,E,D){var T=Tf(N,"type.axisType"),j=Tf(C.state,"".concat(T,"Map")),O=N.type.defaultProps,B=O!==void 0?Nt(Nt({},O),N.props):N.props,M=j&&j[B["".concat(T,"Id")]];return w.cloneElement(N,Nt(Nt({},M),{},{className:Xn(T,M.className),key:N.key||"".concat(E,"-").concat(D),ticks:ig(M,!0)}))}),lr(C,"renderPolarGrid",function(N){var E=N.props,D=E.radialLines,T=E.polarAngles,j=E.polarRadius,O=C.state,B=O.radiusAxisMap,M=O.angleAxisMap,$=qv(B),U=qv(M),P=U.cx,V=U.cy,Q=U.innerRadius,X=U.outerRadius;return w.cloneElement(N,{polarAngles:Array.isArray(T)?T:ig(U,!0).map(function(Z){return Z.coordinate}),polarRadius:Array.isArray(j)?j:ig($,!0).map(function(Z){return Z.coordinate}),cx:P,cy:V,innerRadius:Q,outerRadius:X,key:N.key||"polar-grid",radialLines:D})}),lr(C,"renderLegend",function(){var N=C.state.formattedGraphicalItems,E=C.props,D=E.children,T=E.width,j=E.height,O=C.props.margin||{},B=T-(O.left||0)-(O.right||0),M=nat({children:D,formattedGraphicalItems:N,legendWidth:B,legendContent:c});if(!M)return null;var $=M.item,U=WBe(M,Oqn);return w.cloneElement($,Nt(Nt({},U),{},{chartWidth:T,chartHeight:j,margin:O,onBBoxUpdate:C.handleLegendBBoxUpdate}))}),lr(C,"renderTooltip",function(){var N,E=C.props,D=E.children,T=E.accessibilityLayer,j=sd(D,ip);if(!j)return null;var O=C.state,B=O.isTooltipActive,M=O.activeCoordinate,$=O.activePayload,U=O.activeLabel,P=O.offset,V=(N=j.props.active)!==null&&N!==void 0?N:B;return w.cloneElement(j,{viewBox:Nt(Nt({},P),{},{x:P.left,y:P.top}),active:V,label:U,payload:V?$:[],coordinate:M,accessibilityLayer:T})}),lr(C,"renderBrush",function(N){var E=C.props,D=E.margin,T=E.data,j=C.state,O=j.offset,B=j.dataStartIndex,M=j.dataEndIndex,$=j.updateId;return w.cloneElement(N,{key:N.key||"_recharts-brush",onChange:NI(C.handleBrushChange,N.props.onChange),data:T,x:dn(N.props.x)?N.props.x:O.left,y:dn(N.props.y)?N.props.y:O.top+O.height+O.brushBottom-(D.bottom||0),width:dn(N.props.width)?N.props.width:O.width,startIndex:B,endIndex:M,updateId:"brush-".concat($)})}),lr(C,"renderReferenceElement",function(N,E,D){if(!N)return null;var T=C,j=T.clipPathId,O=C.state,B=O.xAxisMap,M=O.yAxisMap,$=O.offset,U=N.type.defaultProps||{},P=N.props,V=P.xAxisId,Q=V===void 0?U.xAxisId:V,X=P.yAxisId,Z=X===void 0?U.yAxisId:X;return w.cloneElement(N,{key:N.key||"".concat(E,"-").concat(D),xAxis:B[Q],yAxis:M[Z],viewBox:{x:$.left,y:$.top,width:$.width,height:$.height},clipPathId:j})}),lr(C,"renderActivePoints",function(N){var E=N.item,D=N.activePoint,T=N.basePoint,j=N.childIndex,O=N.isRange,B=[],M=E.props.key,$=E.item.type.defaultProps!==void 0?Nt(Nt({},E.item.type.defaultProps),E.item.props):E.item.props,U=$.activeDot,P=$.dataKey,V=Nt(Nt({index:j,dataKey:P,cx:D.x,cy:D.y,r:4,fill:Ece(E.item),strokeWidth:2,stroke:"#fff",payload:D.payload,value:D.value},Li(U,!1)),u$(U));return B.push(y.renderActiveDot(U,V,"".concat(M,"-activePoint-").concat(j))),T?B.push(y.renderActiveDot(U,Nt(Nt({},V),{},{cx:T.x,cy:T.y}),"".concat(M,"-basePoint-").concat(j))):O&&B.push(null),B}),lr(C,"renderGraphicChild",function(N,E,D){var T=C.filterFormatItem(N,E,D);if(!T)return null;var j=C.getTooltipEventType(),O=C.state,B=O.isTooltipActive,M=O.tooltipAxis,$=O.activeTooltipIndex,U=O.activeLabel,P=C.props.children,V=sd(P,ip),Q=T.props,X=Q.points,Z=Q.isRange,le=Q.baseLine,H=T.item.type.defaultProps!==void 0?Nt(Nt({},T.item.type.defaultProps),T.item.props):T.item.props,q=H.activeDot,W=H.hide,te=H.activeBar,ne=H.activeShape,re=!!(!W&&B&&V&&(q||te||ne)),de={};j!=="axis"&&V&&V.props.trigger==="click"?de={onClick:NI(C.handleItemMouseEnter,N.props.onClick)}:j!=="axis"&&(de={onMouseLeave:NI(C.handleItemMouseLeave,N.props.onMouseLeave),onMouseEnter:NI(C.handleItemMouseEnter,N.props.onMouseEnter)});var he=w.cloneElement(N,Nt(Nt({},T.props),de));function pe(be){return typeof M.dataKey=="function"?M.dataKey(be.payload):null}if(re)if($>=0){var oe,J;if(M.dataKey&&!M.allowDuplicatedCategory){var Se=typeof M.dataKey=="function"?pe:"payload.".concat(M.dataKey.toString());oe=ree(X,Se,U),J=Z&&le&&ree(le,Se,U)}else oe=X?.[$],J=Z&&le&&le[$];if(ne||te){var we=N.props.activeIndex!==void 0?N.props.activeIndex:$;return[w.cloneElement(N,Nt(Nt(Nt({},T.props),de),{},{activeIndex:we})),null,null]}if(!Ui(oe))return[he].concat(YS(C.renderActivePoints({item:T,activePoint:oe,basePoint:J,childIndex:$,isRange:Z})))}else{var ke,me=(ke=C.getItemByXY(C.state.activeCoordinate))!==null&&ke!==void 0?ke:{graphicalItem:he},K=me.graphicalItem,ie=K.item,ce=ie===void 0?N:ie,ue=K.childIndex,ve=Nt(Nt(Nt({},T.props),de),{},{activeIndex:ue});return[w.cloneElement(ce,ve),null,null]}return Z?[he,null,null]:[he,null]}),lr(C,"renderCustomized",function(N,E,D){return w.cloneElement(N,Nt(Nt({key:"recharts-customized-".concat(D)},C.props),C.state))}),lr(C,"renderMap",{CartesianGrid:{handler:OI,once:!0},ReferenceArea:{handler:C.renderReferenceElement},ReferenceLine:{handler:OI},ReferenceDot:{handler:C.renderReferenceElement},XAxis:{handler:OI},YAxis:{handler:OI},Brush:{handler:C.renderBrush,once:!0},Bar:{handler:C.renderGraphicChild},Line:{handler:C.renderGraphicChild},Area:{handler:C.renderGraphicChild},Radar:{handler:C.renderGraphicChild},RadialBar:{handler:C.renderGraphicChild},Scatter:{handler:C.renderGraphicChild},Pie:{handler:C.renderGraphicChild},Funnel:{handler:C.renderGraphicChild},Tooltip:{handler:C.renderCursor,once:!0},PolarGrid:{handler:C.renderPolarGrid,once:!0},PolarAngleAxis:{handler:C.renderPolarAxis},PolarRadiusAxis:{handler:C.renderPolarAxis},Customized:{handler:C.renderCustomized}}),C.clipPathId="".concat((k=x.id)!==null&&k!==void 0?k:N8("recharts"),"-clip"),C.throttleTriggeredAfterMouseMove=Iit(C.triggeredAfterMouseMove,(S=x.throttleDelay)!==null&&S!==void 0?S:1e3/60),C.state={},C}return Vqn(y,v),Lqn(y,[{key:"componentDidMount",value:function(){var k,S;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(k=this.props.margin.left)!==null&&k!==void 0?k:0,top:(S=this.props.margin.top)!==null&&S!==void 0?S:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var k=this.props,S=k.children,C=k.data,N=k.height,E=k.layout,D=sd(S,ip);if(D){var T=D.props.defaultIndex;if(!(typeof T!="number"||T<0||T>this.state.tooltipTicks.length-1)){var j=this.state.tooltipTicks[T]&&this.state.tooltipTicks[T].value,O=ote(this.state,C,T,j),B=this.state.tooltipTicks[T].coordinate,M=(this.state.offset.top+N)/2,$=E==="horizontal",U=$?{x:B,y:M}:{y:B,x:M},P=this.state.formattedGraphicalItems.find(function(Q){var X=Q.item;return X.type.name==="Scatter"});P&&(U=Nt(Nt({},U),P.props.points[T].tooltipPosition),O=P.props.points[T].tooltipPayload);var V={activeTooltipIndex:T,isTooltipActive:!0,activeLabel:j,activePayload:O,activeCoordinate:U};this.setState(V),this.renderCursor(D),this.accessibilityManager.setIndex(T)}}}},{key:"getSnapshotBeforeUpdate",value:function(k,S){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==S.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==k.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==k.margin){var C,N;this.accessibilityManager.setDetails({offset:{left:(C=this.props.margin.left)!==null&&C!==void 0?C:0,top:(N=this.props.margin.top)!==null&&N!==void 0?N:0}})}return null}},{key:"componentDidUpdate",value:function(k){aee([sd(k.children,ip)],[sd(this.props.children,ip)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var k=sd(this.props.children,ip);if(k&&typeof k.props.shared=="boolean"){var S=k.props.shared?"axis":"item";return s.indexOf(S)>=0?S:a}return a}},{key:"getMouseInfo",value:function(k){if(!this.container)return null;var S=this.container,C=S.getBoundingClientRect(),N=q6n(C),E={chartX:Math.round(k.pageX-N.left),chartY:Math.round(k.pageY-N.top)},D=C.width/S.offsetWidth||1,T=this.inRange(E.chartX,E.chartY,D);if(!T)return null;var j=this.state,O=j.xAxisMap,B=j.yAxisMap,M=this.getTooltipEventType(),$=YBe(this.state,this.props.data,this.props.layout,T);if(M!=="axis"&&O&&B){var U=qv(O).scale,P=qv(B).scale,V=U&&U.invert?U.invert(E.chartX):null,Q=P&&P.invert?P.invert(E.chartY):null;return Nt(Nt({},E),{},{xValue:V,yValue:Q},$)}return $?Nt(Nt({},E),$):null}},{key:"inRange",value:function(k,S){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,N=this.props.layout,E=k/C,D=S/C;if(N==="horizontal"||N==="vertical"){var T=this.state.offset,j=E>=T.left&&E<=T.left+T.width&&D>=T.top&&D<=T.top+T.height;return j?{x:E,y:D}:null}var O=this.state,B=O.angleAxisMap,M=O.radiusAxisMap;if(B&&M){var $=qv(B);return p5e({x:E,y:D},$)}return null}},{key:"parseEventsOfWrapper",value:function(){var k=this.props.children,S=this.getTooltipEventType(),C=sd(k,ip),N={};C&&S==="axis"&&(C.props.trigger==="click"?N={onClick:this.handleClick}:N={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var E=u$(this.props,this.handleOuterEvent);return Nt(Nt({},E),N)}},{key:"addListener",value:function(){nY.on(rY,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){nY.removeListener(rY,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(k,S,C){for(var N=this.state.formattedGraphicalItems,E=0,D=N.length;E<D;E++){var T=N[E];if(T.item===k||T.props.key===k.key||S===cg(T.item.type)&&C===T.childIndex)return T}return null}},{key:"renderClipPath",value:function(){var k=this.clipPathId,S=this.state.offset,C=S.left,N=S.top,E=S.height,D=S.width;return L.createElement("defs",null,L.createElement("clipPath",{id:k},L.createElement("rect",{x:C,y:N,height:E,width:D})))}},{key:"getXScales",value:function(){var k=this.state.xAxisMap;return k?Object.entries(k).reduce(function(S,C){var N=GBe(C,2),E=N[0],D=N[1];return Nt(Nt({},S),{},lr({},E,D.scale))},{}):null}},{key:"getYScales",value:function(){var k=this.state.yAxisMap;return k?Object.entries(k).reduce(function(S,C){var N=GBe(C,2),E=N[0],D=N[1];return Nt(Nt({},S),{},lr({},E,D.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(k){var S;return(S=this.state.xAxisMap)===null||S===void 0||(S=S[k])===null||S===void 0?void 0:S.scale}},{key:"getYScaleByAxisId",value:function(k){var S;return(S=this.state.yAxisMap)===null||S===void 0||(S=S[k])===null||S===void 0?void 0:S.scale}},{key:"getItemByXY",value:function(k){var S=this.state,C=S.formattedGraphicalItems,N=S.activeItem;if(C&&C.length)for(var E=0,D=C.length;E<D;E++){var T=C[E],j=T.props,O=T.item,B=O.type.defaultProps!==void 0?Nt(Nt({},O.type.defaultProps),O.props):O.props,M=cg(O.type);if(M==="Bar"){var $=(j.data||[]).find(function(Q){return O9n(k,Q)});if($)return{graphicalItem:T,payload:$}}else if(M==="RadialBar"){var U=(j.data||[]).find(function(Q){return p5e(k,Q)});if(U)return{graphicalItem:T,payload:U}}else if(M8(T,N)||R8(T,N)||LF(T,N)){var P=wHn({graphicalItem:T,activeTooltipItem:N,itemData:B.data}),V=B.activeIndex===void 0?P:B.activeIndex;return{graphicalItem:Nt(Nt({},T),{},{childIndex:V}),payload:LF(T,N)?B.data[P]:T.props.data[P]}}}return null}},{key:"render",value:function(){var k=this;if(!mDe(this))return null;var S=this.props,C=S.children,N=S.className,E=S.width,D=S.height,T=S.style,j=S.compact,O=S.title,B=S.desc,M=WBe(S,Bqn),$=Li(M,!1);if(j)return L.createElement(TBe,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},L.createElement(see,gk({},$,{width:E,height:D,title:O,desc:B}),this.renderClipPath(),ADe(C,this.renderMap)));if(this.props.accessibilityLayer){var U,P;$.tabIndex=(U=this.props.tabIndex)!==null&&U!==void 0?U:0,$.role=(P=this.props.role)!==null&&P!==void 0?P:"application",$.onKeyDown=function(Q){k.accessibilityManager.keyboardEvent(Q)},$.onFocus=function(){k.accessibilityManager.focus()}}var V=this.parseEventsOfWrapper();return L.createElement(TBe,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},L.createElement("div",gk({className:Xn("recharts-wrapper",N),style:Nt({position:"relative",cursor:"default",width:E,height:D},T)},V,{ref:function(X){k.container=X}}),L.createElement(see,gk({},$,{width:E,height:D,title:O,desc:B,style:Yqn}),this.renderClipPath(),ADe(C,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(w.Component);lr(p,"displayName",n),lr(p,"defaultProps",Nt({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),lr(p,"getDerivedStateFromProps",function(v,y){var x=v.dataKey,k=v.data,S=v.children,C=v.width,N=v.height,E=v.layout,D=v.stackOffset,T=v.margin,j=y.dataStartIndex,O=y.dataEndIndex;if(y.updateId===void 0){var B=XBe(v);return Nt(Nt(Nt({},B),{},{updateId:0},m(Nt(Nt({props:v},B),{},{updateId:0}),y)),{},{prevDataKey:x,prevData:k,prevWidth:C,prevHeight:N,prevLayout:E,prevStackOffset:D,prevMargin:T,prevChildren:S})}if(x!==y.prevDataKey||k!==y.prevData||C!==y.prevWidth||N!==y.prevHeight||E!==y.prevLayout||D!==y.prevStackOffset||!Vk(T,y.prevMargin)){var M=XBe(v),$={chartX:y.chartX,chartY:y.chartY,isTooltipActive:y.isTooltipActive},U=Nt(Nt({},YBe(y,k,E)),{},{updateId:y.updateId+1}),P=Nt(Nt(Nt({},M),$),U);return Nt(Nt(Nt({},P),m(Nt({props:v},P),y)),{},{prevDataKey:x,prevData:k,prevWidth:C,prevHeight:N,prevLayout:E,prevStackOffset:D,prevMargin:T,prevChildren:S})}if(!aee(S,y.prevChildren)){var V,Q,X,Z,le=sd(S,US),H=le&&(V=(Q=le.props)===null||Q===void 0?void 0:Q.startIndex)!==null&&V!==void 0?V:j,q=le&&(X=(Z=le.props)===null||Z===void 0?void 0:Z.endIndex)!==null&&X!==void 0?X:O,W=H!==j||q!==O,te=!Ui(k),ne=te&&!W?y.updateId:y.updateId+1;return Nt(Nt({updateId:ne},m(Nt(Nt({props:v},y),{},{updateId:ne,dataStartIndex:H,dataEndIndex:q}),y)),{},{prevChildren:S,dataStartIndex:H,dataEndIndex:q})}return null}),lr(p,"renderActiveDot",function(v,y,x){var k;return w.isValidElement(v)?k=w.cloneElement(v,y):ni(v)?k=v(y):k=L.createElement(yat,y),L.createElement(ul,{className:"recharts-active-dot",key:x},k)});var A=w.forwardRef(function(y,x){return L.createElement(p,gk({},y,{ref:x}))});return A.displayName=p.displayName,A},sGn=oGn({chartName:"BarChart",GraphicalChild:pp,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:V8},{axisType:"yAxis",AxisComp:$ce}],formatAxisMap:vVn});const lGn={light:"",dark:".dark"},lot=L.createContext(null);function cot(){const e=L.useContext(lot);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}function cGn({id:e,className:t,children:n,config:r,...i}){const a=L.useId(),o=`chart-${e||a.replace(/:/g,"")}`;return d.jsx(lot.Provider,{value:{config:r},children:d.jsxs("div",{"data-slot":"chart","data-chart":o,className:St("[&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border flex aspect-video justify-center text-xs [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",t),...i,children:[d.jsx(uGn,{id:o,config:r}),d.jsx($6n,{children:n})]})})}const uGn=({id:e,config:t})=>{const n=Object.entries(t).filter(([,r])=>r.theme||r.color);return n.length?d.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(lGn).map(([r,i])=>`
|
|
1183
1183
|
${i} [data-chart=${e}] {
|
|
1184
1184
|
${n.map(([a,o])=>{const s=o.theme?.[r]||o.color;return s?` --color-${a}: ${s};`:null}).join(`
|
|
1185
1185
|
`)}
|
|
1186
1186
|
}
|
|
1187
1187
|
`).join(`
|
|
1188
|
-
`)}}):null},fGn=ip;function hGn({active:e,payload:t,className:n,indicator:r="dot",hideLabel:i=!1,hideIndicator:a=!1,label:o,labelFormatter:s,labelClassName:l,formatter:c,color:u,nameKey:f,labelKey:h}){const{config:m}=cot(),p=L.useMemo(()=>{if(i||!t?.length)return null;const[v]=t,y=String(h||v?.dataKey||v?.name||"value"),x=ste(m,v,y),k=!h&&typeof o=="string"?m[o]?.label||o:x?.label;return s?d.jsx("div",{className:St("font-medium",l),children:s(k,t)}):k?d.jsx("div",{className:St("font-medium",l),children:k}):null},[o,s,t,i,l,m,h]);if(!e||!t?.length)return null;const A=t.length===1&&r!=="dot";return d.jsxs("div",{className:St("border-gray-200/50 bg-white grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-gray-200 px-2.5 py-1.5 text-xs shadow-xl dark:border-gray-800/50 dark:bg-gray-950 dark:border-gray-800",n),children:[A?null:p,d.jsx("div",{className:"grid gap-1.5",children:t.map((v,y)=>{const x=String(f||v.name||v.dataKey||"value"),k=ste(m,v,x),S=u||v.payload.fill||v.color;return d.jsx("div",{className:St("[&>svg]:text-gray-500 flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 dark:[&>svg]:text-gray-400",r==="dot"&&"items-center"),children:c&&v?.value!==void 0&&v.name?c(v.value,v.name,v,y,v.payload):d.jsxs(d.Fragment,{children:[k?.icon?d.jsx(k.icon,{}):!a&&d.jsx("div",{className:St("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":A&&r==="dashed"}),style:{"--color-bg":S,"--color-border":S}}),d.jsxs("div",{className:St("flex flex-1 justify-between leading-none",A?"items-end":"items-center"),children:[d.jsxs("div",{className:"grid gap-1.5",children:[A?p:null,d.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:k?.label||v.name})]}),v.value&&d.jsx("span",{className:"text-gray-950 font-mono font-medium tabular-nums dark:text-gray-50",children:v.value.toLocaleString()})]})]})},v.dataKey)})})]})}const mGn=rx;function pGn({className:e,hideIcon:t=!1,payload:n,verticalAlign:r="bottom",nameKey:i}){const{config:a}=cot();return n?.length?d.jsx("div",{className:St("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.map(o=>{const s=String(i||o.dataKey||"value"),l=ste(a,o,s);return d.jsxs("div",{className:St("[&>svg]:text-gray-500 flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 dark:[&>svg]:text-gray-400"),children:[l?.icon&&!t?d.jsx(l.icon,{}):d.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:o.color}}),l?.label]},o.value)})}):null}function ste(e,t,n){if(typeof t!="object"||t===null)return;const r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let i=n;return n in t&&typeof t[n]=="string"?i=t[n]:r&&n in r&&typeof r[n]=="string"&&(i=r[n]),i in e?e[i]:e[n]}function AGn(e){return!e||os(e)?null:encodeURIComponent(JSON.stringify(e))}const lte="balanceReportFilters",Ad={MONTHLY:"Monthly",BI_MONTHLY:"Bi-monthly",QUARTERLY:"Quarterly",SEMI_ANNUALLY:"Semi-Annually",ANNUALLY:"Annually"};function gGn({filter:e,setFilter:t,closeModal:n}){const{control:r,handleSubmit:i,watch:a}=fr({defaultValues:{...e}}),{selectableBusinesses:o,fetching:s}=Bu(),{selectableFinancialEntities:l,fetching:c}=Bg(),{selectableTags:u,fetching:f}=ZL(),h=y=>{t(y),n()},m=a("excludedTags"),p=w.useMemo(()=>u.filter(y=>!m.includes(y.value)),[m,u]),A=a("includedTags"),v=w.useMemo(()=>u.filter(y=>!A.includes(y.value)),[A,u]);return d.jsxs("form",{onSubmit:i(h),children:[d.jsxs(pC,{cols:2,children:[d.jsx(xt,{name:"ownerId",control:r,defaultValue:e?.ownerId,render:({field:y,fieldState:x})=>d.jsx(ai,{...y,data:o,value:y.value,disabled:s,label:"Owners",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:x.error?.message,withinPortal:!0})}),d.jsx(xt,{name:"fromDate",control:r,defaultValue:e?.fromDate,rules:{pattern:{value:_i,message:"Date must be im format yyyy-mm-dd"}},render:({field:y,fieldState:x})=>d.jsx(qi,{...y,onChange:k=>{const S=k?typeof k=="string"?k:Rt(k,"yyyy-MM-dd"):void 0;S!==y.value&&y.onChange(S)},value:y.value?new Date(y.value):void 0,error:x.error?.message,label:"From Date",popoverProps:{withinPortal:!0}})}),d.jsx(xt,{name:"toDate",control:r,defaultValue:e?.toDate,rules:{pattern:{value:_i,message:"Date must be im format yyyy-mm-dd"}},render:({field:y,fieldState:x})=>d.jsx(qi,{...y,onChange:k=>{const S=k?typeof k=="string"?k:Rt(k,"yyyy-MM-dd"):void 0;S!==y.value&&y.onChange(S)},value:y.value?new Date(y.value):void 0,error:x.error?.message,label:"To Date",popoverProps:{withinPortal:!0}})}),d.jsx(xt,{name:"period",control:r,defaultValue:Ad.MONTHLY,render:({field:y,fieldState:x})=>d.jsx(ai,{...y,data:Object.values(Ad).map(k=>({value:k,label:k})),value:y.value,label:"Period",maxDropdownHeight:160,error:x.error?.message,withinPortal:!0})}),d.jsx(xt,{name:"excludedCounterparties",control:r,defaultValue:e.excludedCounterparties,render:({field:y,fieldState:x})=>d.jsx(dl,{...y,data:l,value:y.value??[],disabled:c,label:"Excluded Counterparties",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:x.error?.message,withinPortal:!0})}),d.jsx(xt,{name:"includedTags",control:r,defaultValue:e.includedTags,render:({field:y,fieldState:x})=>d.jsx(dl,{...y,data:p,value:y.value??[],disabled:f,label:"Included Tags",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:x.error?.message,withinPortal:!0})}),d.jsx(xt,{name:"excludedTags",control:r,defaultValue:e.excludedTags,render:({field:y,fieldState:x})=>d.jsx(dl,{...y,data:v,value:y.value??[],disabled:f,label:"Excluded Tags",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:x.error?.message,withinPortal:!0})})]}),d.jsxs("div",{className:"flex justify-center mt-5 gap-3",children:[d.jsx("button",{type:"submit",disabled:s,className:"text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-indigo-600 rounded-sm text-lg",children:"Filter"}),d.jsx("button",{type:"button",className:"text-white bg-rose-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-rose-600 rounded-sm text-lg",onClick:n,children:"Cancel"})]})]})}function vGn({filter:e,setFilter:t,initiallyOpened:n=!1}){const[r,i]=w.useState(n),[a,o]=w.useState(!!e),{get:s,set:l}=gi();w.useEffect(()=>{const u=AGn(e),f=s(lte);u!==f&&l(lte,u)},[e,s,l]);const c=w.useCallback(u=>{Dd(u,e)||(t(u),o(!!u))},[e,t]);return d.jsxs("div",{className:"flex flex-row gap-5 items-center",children:[d.jsx(Qc,{opened:r,onClose:()=>i(!1),content:d.jsx(gGn,{filter:e,setFilter:c,closeModal:()=>i(!1)}),modalSize:"xl"}),d.jsx(ba,{inline:!0,size:16,disabled:!a,children:d.jsx(qe,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>i(!0),children:d.jsx(Ul,{className:"size-5"})})})]})}const yGn=({period:e,transactionIDs:t,onCloseExtendedTransactions:n})=>{const[{data:r,fetching:i}]=rn({query:gFt,variables:{transactionIDs:t}}),a=w.useMemo(()=>r?.transactionsByIDs?t.map(o=>r?.transactionsByIDs.find(s=>s.id===o)).filter(Boolean):[],[r,t]);return d.jsx(ls,{className:"mt-5 w-full",children:i?d.jsx(Vc,{}):d.jsxs(d.Fragment,{children:[d.jsx(Uc,{children:d.jsxs(zc,{className:"flex justify-between",children:[d.jsxs("span",{children:[e," Transactions"]}),d.jsx(qe,{variant:"link",onClick:n,children:d.jsx(Gx,{className:"h-4 w-4"})})]})}),d.jsx(Gs,{children:d.jsx(aae,{transactionsProps:a})})]})})},$N={income:{label:"Income",color:"rgba(0, 255, 50, 0.5)"},expense:{label:"Expense",color:"rgba(255, 0, 0, 0.5)"},delta:{label:"Delta",color:"rgba(0, 30, 255, 0.5)"},cumulative:{label:"Cumulative Balance",color:"rgba(100, 0, 255, 0.5)"}};function bGn(e,t,n){switch(n){case Ad.MONTHLY:{const r=String(t).padStart(2,"0");return`${e}-${r}`}case Ad.BI_MONTHLY:{const r=t%2===0?t-1:t,i=String(r).padStart(2,"0");return`${e}-${i}`}case Ad.QUARTERLY:{const r=Math.ceil(t/3);return`${e}-Q${r}`}case Ad.SEMI_ANNUALLY:{const r=t>6?2:1;return`${e}-H${r}`}case Ad.ANNUALLY:return String(e)}}function xGn(e,t){switch(t){case Ad.MONTHLY:{const[n,r]=e.split("-");return`${r}/${n}`}case Ad.BI_MONTHLY:{const[n,r]=e.split("-"),i=Number(r)+1,a=String(i).padStart(2,"0");return`${r}-${a}/${n}`}case Ad.QUARTERLY:{const[n,r]=e.split("-");return`${r}, ${n}`}case Ad.SEMI_ANNUALLY:{const[n,r]=e.split("-");return`${r}, ${n}`}case Ad.ANNUALLY:return e}}const JBe=k3(Qt.Usd),wGn=()=>{const{setFiltersContext:e}=w.useContext(ra),{userContext:t}=w.useContext(pc),{get:n}=gi(),r=w.useMemo(()=>{const p={ownerId:t?.context.adminBusinessId,toDate:Rt(new Date,"yyyy-MM-dd"),period:Ad.MONTHLY,fromDate:Rt(uD(new Date,{years:1}),"yyyy-MM-dd"),excludedCounterparties:[],includedTags:[],excludedTags:[]},A=n(lte);if(A)try{return JSON.parse(decodeURIComponent(A))}catch(v){console.log("Error parsing balance report filters from URL:",v)}return p},[t?.context.adminBusinessId]),[i,a]=w.useState(r),[o,s]=w.useState(void 0),[l,c]=w.useState(Object.keys($N)),u=w.useMemo(()=>{const{ownerId:p,fromDate:A,toDate:v}=i;return{ownerId:p,fromDate:A,toDate:v}},[i]),[{data:f,fetching:h}]=rn({query:vFt,variables:u,pause:!i});w.useEffect(()=>{e(d.jsxs("div",{className:"flex flex-row gap-x-5",children:[d.jsx(vGn,{filter:i,setFilter:a,initiallyOpened:!i}),d.jsx(LWe,{options:Object.entries($N).map(([p,A])=>({label:A.label,value:p})),onValueChange:c,defaultValue:l,placeholder:"Select Data Sets",variant:"default",maxCount:1})]})),s(void 0)},[f,h,i,e,a,l]),w.useEffect(()=>{a(p=>({...p,ownerId:t?.context.adminBusinessId}))},[t]);const m=w.useMemo(()=>{if(!f?.transactionsForBalanceReport)return[];const p=new Map;f.transactionsForBalanceReport.map(v=>{if(v.counterparty?.id&&(!v.isFee&&t?.context.financialAccountsBusinessesIds?.includes(v.counterparty.id)||i.excludedCounterparties?.includes(v.counterparty.id))||i.includedTags.length>0&&(!v.charge?.tags||v.charge.tags.length===0||!v.charge.tags.some(k=>i.includedTags.includes(k.id)))||i.excludedTags.length>0&&v.charge?.tags.length&&v.charge.tags.some(k=>i.excludedTags.includes(k.id)))return;const y=bGn(v.year,v.month,i.period);p.has(y)||p.set(y,{income:0,expense:0,delta:0,transactions:[]});const x=p.get(y);v.amountUsd.raw>0?x.income+=v.amountUsd.raw:x.expense+=v.amountUsd.raw,x.delta+=v.amountUsd.raw,x.transactions.push(v)});let A=0;return Array.from(p.entries()).sort((v,y)=>v[0].localeCompare(y[0])).map(([v,y])=>(A+=y.delta,{period:v,income:y.income,expense:y.expense,delta:y.delta,cumulative:A,transactions:y.transactions.sort((x,k)=>Math.abs(k.amountUsd.raw)-Math.abs(x.amountUsd.raw))}))},[f,i.period,i.excludedCounterparties,t?.context.financialAccountsBusinessesIds,i.includedTags,i.excludedTags]);return d.jsx(Pa,{title:"Balance Report",description:"Accounts periodical balance",children:h?d.jsx(Vc,{}):d.jsxs(d.Fragment,{children:[d.jsxs(ls,{className:"w-full",children:[d.jsx(Uc,{children:d.jsx(XY,{children:"Click specific period to expand it's transactions data"})}),d.jsx(Gs,{children:d.jsx(uGn,{config:$N,className:"h-150 w-full",children:d.jsxs(lGn,{accessibilityLayer:!0,data:m,onClick:p=>s(p.activeLabel),children:[d.jsx(Wat,{vertical:!1}),d.jsx(V8,{dataKey:"period",tickLine:!1,tickMargin:10,axisLine:!1,tickFormatter:p=>xGn(p,i.period)}),d.jsx(fGn,{content:d.jsx(hGn,{formatter:(p,A,v,y)=>{const x=`bg-[var(--color-${A})]`;return y<2?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:`${x} h-2.5 w-2.5 shrink-0 rounded-[2px]`}),$N[A]?.label||A,d.jsx("div",{className:"ml-auto flex items-baseline gap-0.5 font-mono font-medium tabular-nums text-foreground",children:JBe.format(Number(p))})]}):d.jsxs("div",{className:"mt-1.5 flex basis-full items-center border-t pt-1.5 text-xs font-medium text-foreground",children:[d.jsx("div",{className:`h-2.5 w-2.5 shrink-0 rounded-[2px] mr-2 ${x}`}),$N[A]?.label||A,d.jsx("div",{className:"ml-auto flex items-baseline gap-0.5 font-mono font-medium tabular-nums text-foreground",children:JBe.format(Number(p))})]})}})}),d.jsx(mGn,{content:d.jsx(pGn,{})}),l.includes("income")&&d.jsx(pp,{dataKey:"income",fill:"var(--color-income)",radius:4}),l.includes("expense")&&d.jsx(pp,{dataKey:"expense",fill:"var(--color-expense)",radius:4}),l.includes("delta")&&d.jsx(pp,{dataKey:"delta",fill:"var(--color-delta)",radius:4}),l.includes("cumulative")&&d.jsx(pp,{dataKey:"cumulative",fill:"var(--color-cumulative)",radius:4})]})})})]}),o&&d.jsx(yGn,{period:o,onCloseExtendedTransactions:()=>s(void 0),transactionIDs:m.find(p=>p.period===o)?.transactions.map(p=>p.id)??[]})]})})},kGn=({record:e})=>{const t=$t(T3e,e);return d.jsxs(Tr,{children:[d.jsx(Mt,{children:e.description}),d.jsx(Mt,{children:Rt(new Date(e.purchaseDate),"dd/MM/yyyy")}),d.jsx(Mt,{children:e.activationDate?Rt(new Date(e.activationDate),"dd/MM/yyyy"):void 0}),d.jsx(Mt,{children:t.originalCost?ri(t.originalCost,0):void 0}),d.jsx(Mt,{children:t.reportYearDelta?ri(t.reportYearDelta,0):void 0}),d.jsx(Mt,{children:ri(t.totalDepreciableCosts,0)}),d.jsxs(Mt,{children:[ri(e.statutoryDepreciationRate,0),"%"]}),d.jsx(Mt,{children:e.claimedDepreciationRate?`${ri(e.claimedDepreciationRate,1)}%`:"-"}),d.jsx(Mt,{children:t.reportYearClaimedDepreciation?ri(t.reportYearClaimedDepreciation,0):"-"}),d.jsx(Mt,{children:t.pastYearsAccumulatedDepreciation?ri(t.pastYearsAccumulatedDepreciation,0):"-"}),d.jsx(Mt,{children:t.totalDepreciation?ri(t.totalDepreciation,0):"-"}),d.jsx(Mt,{children:t.netValue?ri(t.netValue,0):"-"})]})};function SGn(e){return!e||os(e)?null:encodeURIComponent(JSON.stringify(e))}const cte="depreciationReportFilters";function CGn({filter:e,setFilter:t,close:n}){const r=fr({defaultValues:{...e}}),{control:i,handleSubmit:a}=r,{selectableFinancialEntities:o,fetching:s}=Bg(),l=c=>{t({...c,year:Number(c.year)}),n()};return d.jsx(oi,{...r,children:d.jsxs("form",{onSubmit:a(l),className:"space-y-4",children:[d.jsx(en,{name:"year",control:i,rules:{required:"Year is required",validate:c=>{const u=Number(c);return Number.isNaN(u)||u<2e3||u>2100?"Invalid year":!0}},render:({field:c})=>d.jsxs(tn,{children:[d.jsx(gn,{children:"Year"}),d.jsx(fn,{children:d.jsx(Fy,{...c,hideControls:!0,decimalScale:0})}),d.jsx(Tn,{})]})}),d.jsx(en,{name:"financialEntityId",defaultValue:e?.financialEntityId,control:i,render:({field:c})=>d.jsxs(tn,{children:[d.jsx(gn,{children:"Owner"}),d.jsx(Ey,{...c,data:o,value:c.value??void 0,disabled:s,placeholder:"Select a financial entity",formPart:!0}),d.jsx(Tn,{})]})}),d.jsx(Hy,{children:d.jsx(qe,{type:"submit",disabled:s,children:"Filter"})})]})})}function _Gn({filter:e,setFilter:t}){const[n,r]=w.useState(!1),{get:i,set:a}=gi();w.useEffect(()=>{const s=SGn(e),l=i(cte);s!==l&&a(cte,s)},[e,i,a]);const o=w.useCallback(s=>{Dd(s,e)||t(s)},[e,t]);return d.jsxs(Ra,{open:n,onOpenChange:r,children:[d.jsx(gc,{asChild:!0,children:d.jsx(qe,{variant:"outline",size:"icon",children:d.jsx(Ul,{size:20})})}),d.jsx($a,{className:"sm:max-w-[425px]",children:d.jsx(CGn,{filter:e,setFilter:o,close:()=>r(!1)})})]})}const eIe=({data:e,groupName:t})=>{const n=$t(T3e,e);return d.jsxs(Tr,{className:"font-bold border-b border-black",children:[d.jsx(Mt,{children:t?"Group Total":"Overall Total"}),d.jsx(Mt,{colSpan:2,children:t}),d.jsx(Mt,{children:n.originalCost?ri(n.originalCost,0):void 0}),d.jsx(Mt,{children:n.reportYearDelta?ri(n.reportYearDelta,0):void 0}),d.jsx(Mt,{children:n.totalDepreciableCosts?ri(n.totalDepreciableCosts,0):void 0}),d.jsx(Mt,{}),d.jsx(Mt,{}),d.jsx(Mt,{children:n.reportYearClaimedDepreciation?ri(n.reportYearClaimedDepreciation,0):void 0}),d.jsx(Mt,{children:n.pastYearsAccumulatedDepreciation?ri(n.pastYearsAccumulatedDepreciation,0):void 0}),d.jsx(Mt,{children:n.totalDepreciation?ri(n.totalDepreciation,0):void 0}),d.jsx(Mt,{children:n.netValue?ri(n.netValue,0):void 0})]})},NGn=()=>{const{setFiltersContext:e}=w.useContext(ra),{userContext:t}=w.useContext(pc),{get:n}=gi(),r=w.useMemo(()=>{const c={financialEntityId:t?.context.adminBusinessId,year:new Date().getFullYear()},u=n(cte);if(u)try{return JSON.parse(decodeURIComponent(u))}catch(f){console.error("Failed to parse depreciation report filters from URL",f)}return c},[t?.context.adminBusinessId]),[i,a]=w.useState(r),[{data:o,fetching:s}]=rn({query:yFt,variables:{filters:i}});w.useEffect(()=>{e(d.jsx("div",{className:"flex flex-row gap-x-5",children:d.jsx(_Gn,{filter:i,setFilter:a})}))},[i,e,a]);const l=w.useMemo(()=>`Depreciation Report for ${i.year}`,[i.year]);return d.jsx(Pa,{title:"Depreciation Report",description:l,children:s?d.jsx(Vc,{}):d.jsxs(Iu,{children:[d.jsxs(ju,{children:[d.jsxs(Tr,{className:"font-bold text-xl",children:[d.jsx(Kr,{colSpan:6,className:"text-center border-x",children:"List of Assets and Costs"}),d.jsx(Kr,{colSpan:5,className:"text-center border-x",children:"Depreciation"}),d.jsx(Kr,{className:"text-center border-x",children:"Remaining"})]}),d.jsxs(Tr,{className:"border-b border-black",children:[d.jsx(Kr,{className:"whitespace-normal",children:"Assets List and Descriptions"}),d.jsx(Kr,{className:"whitespace-normal",children:"Date of Purchase"}),d.jsx(Kr,{className:"whitespace-normal",children:"Activation Date"}),d.jsx(Kr,{className:"whitespace-normal",children:"Original Cost"}),d.jsx(Kr,{className:"whitespace-normal",children:"Changes During the Year"}),d.jsx(Kr,{className:"whitespace-normal",children:"Total Depreciable Assets"}),d.jsx(Kr,{className:"whitespace-normal",children:"Statutory Depreciation Rate"}),d.jsx(Kr,{className:"whitespace-normal",children:"Claimed Depreciation Rate"}),d.jsx(Kr,{className:"whitespace-normal",children:"Depreciation Claimed This Year"}),d.jsx(Kr,{className:"whitespace-normal",children:"Previous Tax Years Accumulated Depreciation"}),d.jsx(Kr,{className:"whitespace-normal",children:"Total Depreciation"}),d.jsx(Kr,{className:"whitespace-normal",children:"Net Book Value"})]})]}),d.jsx(Pu,{children:o?.depreciationReport&&d.jsxs(d.Fragment,{children:[o.depreciationReport.categories.map((c,u)=>d.jsxs(w.Fragment,{children:[d.jsxs(Tr,{className:"font-bold",children:[d.jsx(Mt,{children:`Category ${u+1}`}),d.jsx(Mt,{colSpan:2,children:c.category.name}),d.jsx(Mt,{colSpan:3}),d.jsxs(Mt,{children:[ri(c.category.percentage,0),"%"]}),d.jsx(Mt,{colSpan:5})]}),c.records.sort((f,h)=>f.purchaseDate.localeCompare(h.purchaseDate)).map(f=>d.jsx(kGn,{record:f},f.id)),d.jsx(eIe,{data:c.summary,groupName:c.category.name})]},c.id)),d.jsx(eIe,{data:o.depreciationReport.summary})]})})]})})},BI=["2020","2021","2022","2023"];function EGn({selectedBusiness:e,setSelectedBusiness:t,selectedYear:n,setSelectedYear:r,referenceYear:i,setReferenceYear:a}){const[o,s]=w.useState(!n||!e),{selectableBusinesses:l,fetching:c}=Bu(),u=w.useMemo(()=>e?l.find(h=>h.value===e)?.label??"":"",[l,e]);return d.jsxs(Ra,{open:o,onOpenChange:s,children:[d.jsx(gc,{asChild:!0,children:d.jsxs(qe,{variant:"outline",className:"flex items-center gap-2",children:[d.jsx(Ul,{className:"h-4 w-4"}),"מסננים",d.jsxs("span",{className:"text-xs bg-blue-100 text-blue-800 px-2 py-0.5 rounded-full",children:[u," • ",n]})]})}),d.jsxs($a,{className:"sm:max-w-md",dir:"rtl",children:[d.jsx(fs,{children:d.jsxs(hs,{className:"flex items-center gap-2",children:[d.jsx(Ul,{className:"h-5 w-5"}),"מסנני דוח"]})}),d.jsxs("div",{className:"space-y-6 py-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsxs(Mn,{htmlFor:"business-select",className:"flex items-center gap-2",children:[d.jsx(o5t,{className:"h-4 w-4"}),"בחירת עסק"]}),d.jsx(Ey,{onChange:f=>t(f??void 0),data:l,value:e,disabled:c,placeholder:"Scroll to see all options",triggerProps:{className:"w-full"}})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs(Mn,{htmlFor:"year-select",className:"flex items-center gap-2",children:[d.jsx(iS,{className:"h-4 w-4"}),"שנת דיווח"]}),d.jsxs(Oo,{value:n,onValueChange:r,children:[d.jsx(Io,{id:"year-select",children:d.jsx(Bo,{})}),d.jsx(jo,{children:BI.map(f=>d.jsx(eo,{value:f,children:f},f))})]}),d.jsxs("p",{className:"text-xs text-gray-500",children:["זמינות נתונים: ",BI.join(", ")]})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs(Mn,{htmlFor:"reference-year-select",className:"flex items-center gap-2",children:[d.jsx(iS,{className:"h-4 w-4"}),"שנת השוואה"]}),d.jsxs(Oo,{value:i,onValueChange:f=>a(f==="none"?void 0:f),children:[d.jsx(Io,{id:"reference-year-select",children:d.jsx(Bo,{})}),d.jsxs(jo,{children:[d.jsx(eo,{value:"none",children:"ללא"},"none"),BI.map(f=>d.jsx(eo,{value:f,children:f},f))]})]}),d.jsxs("p",{className:"text-xs text-gray-500",children:["זמינות נתונים: ",BI.join(", ")]})]}),d.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[d.jsx(qe,{variant:"outline",onClick:()=>s(!1),children:"ביטול"}),d.jsx(qe,{onClick:()=>s(!1),children:"אישור"})]})]})]})]})}const fo=({label:e,value:t,code:n,referenceValue:r,showEmptyFields:i,showChange:a=!1})=>{const o=u=>i?!0:!s(u),s=u=>!u||u.trim()===""||u==="0"||u==="0.00",l=(u,f)=>{if(!f)return null;const h=v=>Number.parseFloat(v.replace(/[,\s₪]/g,""))||0,m=h(u),p=h(f);return p===0?null:(m-p)/p*100};if(!o(t))return null;const c=a?l(t,r):null;return d.jsxs("div",{className:"flex justify-between items-center py-2 border-b border-gray-200",dir:"rtl",children:[d.jsxs("span",{className:"text-sm text-gray-600",children:[e," ",n&&`(${n})`]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:`font-medium ${s(t)?"text-gray-400":""}`,children:s(t)?"0":t}),c!==null&&d.jsxs("span",{className:`text-xs px-1 py-0.5 rounded ${c>0?"text-green-700 bg-green-100":c<0?"text-red-700 bg-red-100":"text-gray-700 bg-gray-100"}`,children:[c>0?"+":"",c.toFixed(1),"%"]})]})]})},Jo=({codes:e,referenceCodes:t,code:n,showEmptyFields:r})=>{const{value:i,label:a}=w.useMemo(()=>{const s=e.find(l=>l.code===n);return{value:s?.amount||0,label:s?.label||"לא זוהה קוד"}},[e,n]),o=w.useMemo(()=>t?.find(s=>s.code===n)?.amount.toString()||"",[t,n]);return d.jsx(fo,{label:a,value:ri(i,0),code:String(n),showChange:!0,showEmptyFields:r,referenceValue:o})},FGn=[{title:"מזומנים ושווי מזומנים",codes:[7110,7120,7150],sumCode:7100},{title:"ניירות ערך",codes:[7215,7225,7230,7290,7295],sumCode:7200},{title:"לקוחות",codes:[7310,7320,7330,7350,7360,7380,7390],sumCode:7300},{title:"חייבים ויתרות חובה",codes:[7410,7420,7430,7440,7450,7461,7462,7470,7490],sumCode:7400},{title:"מסים נדחים לזמן קצר",codes:[7610,7620,7690],sumCode:7600},{title:"הלוואות לזמן קצר",codes:[7711,7712,7720],sumCode:7700},{title:"מלאי",codes:[7805,7810,7815,7820,7825,7830,7840,7850,7860,7870,7890],sumCode:7800}],DGn=[{title:"רכוש קבוע",codes:[8010,8020,8025,8030,8040,8050,8060,8080,8090,8095,8100,8105,8110,8120,8130,8140,8150,8160,8170,8180,8190],sumCode:8e3},{title:"נכסים לא שוטפים מוחזקים למכירה",codes:[8710],sumCode:8700},{title:"הוצאות מראש לזמן ארוך",codes:[8210,8220,8290],sumCode:8200},{title:"השקעות בחברות מוחזקות כלולות ומאוחדות",codes:[8315,8325,8335,8340,8350],sumCode:8300},{title:'השקעות בחברות אחרות כולל ני"ע סחירים מוחזקים לזמן ארוך',codes:[8410,8420,8440,8450,8460,8490],sumCode:8400},{title:"מסים נדחים לזמן ארוך",codes:[8510,8520,8590],sumCode:8500},{title:"הוצאות נדחות ורכוש אחר",codes:[8610,8620,8630,8640,8690],sumCode:8600}],TGn=[{title:"בנקים והלואות לזמן קצר",codes:[9110,9120,9130,9140,9151,9152,9190],sumCode:9100},{title:"ספקים ונותני שירותים",codes:[9210,9220,9230,9290],sumCode:9200},{title:"זכאים ויתרות זכות",codes:[9310,9320,9330,9340,9350,9360,9370,9410,9420,9431,9432,9435,9440,9450,9460,9470,9480,9490],sumCode:9400},{title:"עתודה למסים נדחים לזמן קצר",codes:[9510,9520,9530],sumCode:9500}],OGn=[{title:"התחייבויות לזמן ארוך",codes:[9605,9610,9620,9631,9632,9640,9650,9660,9670,9690],sumCode:9600},{title:"התחייבויות בשל סיום יחסי עובד-מעביד",codes:[9710,9720,9790],sumCode:9700},{title:"עתודה למסים נדחים לזמן ארוך",codes:[9810,9820,9890],sumCode:9800}],BGn=[{title:"הון עצמי",codes:[9910,9920,9930,9940,9950,9960,9980],sumCode:9900}];function IGn({data:e,referenceData:t,showEmptyFields:n=!1}){const i=$t(Dge,e).balanceSheet||[],o=$t(Dge,t)?.balanceSheet||[];return d.jsx(pS,{value:"balanceSheet",className:"border rounded-md p-4",children:d.jsxs("div",{className:"space-y-6",dir:"rtl",children:[d.jsx("h3",{className:"text-lg font-bold border-b pb-2",children:"נתוני המאזן"}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[d.jsxs("div",{className:"space-y-4",children:[d.jsx("h4",{className:"text-lg font-bold text-blue-800 border-b pb-2",children:"נכסים"}),d.jsx("div",{className:"bg-blue-100 p-4 rounded-md border-2 border-blue-300",children:d.jsx("h5",{className:"font-bold",children:"רכוש שוטף"})}),FGn.map(s=>d.jsxs("div",{className:"bg-blue-50 p-4 rounded-md",children:[d.jsx("h6",{className:"font-bold mb-3",children:s.title}),d.jsxs("div",{className:"space-y-2",children:[s.codes.map(l=>d.jsx(Jo,{codes:i,referenceCodes:o,code:l,showEmptyFields:n},l)),d.jsx("div",{className:"border-2 rounded-md border-gray-300",children:d.jsx(Jo,{codes:i,referenceCodes:o,code:s.sumCode,showEmptyFields:n})})]})]},s.title)),d.jsx("div",{className:"bg-blue-100 p-4 rounded-md border-2 border-blue-300",children:d.jsx(Jo,{codes:i,code:7e3,showEmptyFields:n})}),DGn.map(s=>d.jsxs("div",{className:"bg-blue-50 p-4 rounded-md",children:[d.jsx("h6",{className:"font-bold mb-3",children:s.title}),d.jsxs("div",{className:"space-y-2",children:[s.codes.map(l=>d.jsx(Jo,{codes:i,referenceCodes:o,code:l,showEmptyFields:n},l)),d.jsx("div",{className:"border-2 rounded-md border-gray-300",children:d.jsx(Jo,{codes:i,referenceCodes:o,code:s.sumCode,showEmptyFields:n})})]})]},s.title)),d.jsx("div",{className:"bg-blue-100 p-4 rounded-md border-2 border-blue-300",children:d.jsx(Jo,{codes:i,code:8888,showEmptyFields:n})})]}),d.jsxs("div",{className:"space-y-4",children:[d.jsx("h4",{className:"text-lg font-bold text-red-800 border-b pb-2",children:"התחייבויות והון"}),d.jsx("div",{className:"bg-red-100 p-4 rounded-md border-2 border-red-300",children:d.jsx("h5",{className:"font-bold",children:"התחייבויות שוטפות"})}),TGn.map(s=>d.jsxs("div",{className:"bg-red-50 p-4 rounded-md",children:[d.jsx("h6",{className:"font-bold mb-3",children:s.title}),d.jsxs("div",{className:"space-y-2",children:[s.codes.map(l=>d.jsx(Jo,{codes:i,referenceCodes:o,code:l,showEmptyFields:n},l)),d.jsx("div",{className:"border-2 rounded-md border-gray-300",children:d.jsx(Jo,{codes:i,referenceCodes:o,code:s.sumCode,showEmptyFields:n})})]})]},s.title)),d.jsx("div",{className:"bg-red-100 p-4 rounded-md border-2 border-red-300",children:d.jsx(Jo,{codes:i,code:9e3,showEmptyFields:n})}),OGn.map(s=>d.jsxs("div",{className:"bg-red-50 p-4 rounded-md",children:[d.jsx("h6",{className:"font-bold mb-3",children:s.title}),d.jsxs("div",{className:"space-y-2",children:[s.codes.map(l=>d.jsx(Jo,{codes:i,referenceCodes:o,code:l,showEmptyFields:n},l)),d.jsx("div",{className:"border-2 rounded-md border-gray-300",children:d.jsx(Jo,{codes:i,referenceCodes:o,code:s.sumCode,showEmptyFields:n})})]})]},s.title)),BGn.map(s=>d.jsxs("div",{className:"bg-green-50 p-4 rounded-md",children:[d.jsx("h5",{className:"font-bold mb-3",children:s.title}),d.jsx("div",{className:"space-y-2",children:s.codes.map(l=>d.jsx(Jo,{codes:i,referenceCodes:o,code:l,showEmptyFields:n},l))})]},s.title)),d.jsx("div",{className:"bg-red-100 p-4 rounded-md border-2 border-red-300",children:d.jsx(Jo,{codes:i,code:9999,showEmptyFields:n})})]})]})]})})}const jGn=e=>{switch(e){case"1":return"תעשייתי";case"2":return"מסחרי";case"3":return"נותני שירותים";case"99":return"הדיווח כולל יותר מעסק אחד";default:return""}},PGn=e=>{switch(e){case tj.Cash:return"מזומן";case tj.Accrual:return"מצטבר";case tj.DollarRegulations:return"לפי תקנות דולריות";default:return""}},MGn=e=>{switch(e){case Cge.Shekels:return"שקלים";case Cge.Dollars:return"דולרים";default:return""}},RGn=e=>{switch(e){case kge.DoubleEntry:return"כפולה";case kge.SingleEntry:return"חד-צידית";default:return""}},$Gn=e=>{switch(e){case Sge.Computerized:return"ממוחשב";case Sge.Manual:return"ידני";default:return""}},LGn=e=>{switch(e){case A5.Option_1:return"חלופה 1";case A5.Option_2Adjustments:return"התאמות חשבונאיות למי שיישם את חלופה 2 בהוראת ביצוע 7/2010";case A5.Option_3Adjustments:return"התאמות חשבונאיות למי שיישם את חלופה 3 בהוראת ביצוע 7/2010";case A5.None:return"ללא חלופה";default:return""}},UGn=e=>{switch(e){case V0.Unqualified:return"נוסח אחיד (בלתי מסוייג)";case V0.UnqualifiedWithGoingConcern:return"בנוסח אחיד עם הפניית תשומת לב להערת עסק חי";case V0.UnqualifiedWithOtherEmphases:return"בנוסח אחיד עם הפניות תשומת לב אחרת";case V0.Qualified:return"הסתייגות";case V0.Adverse:return"שלילית";case V0.Disclaimer:return"המנעות";case V0.None:return"אין חוות דעת";default:return""}},II=e=>e==null?"":e?"כן":"לא";function zGn({data:e,businessInfo:t}){const{header:n}=$t(AEt,e),r=$t(pEt,t);return d.jsx(pS,{value:"header",className:"border rounded-md p-4",children:d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",dir:"rtl",children:[d.jsxs("div",{className:"space-y-4",children:[d.jsx("h3",{className:"text-lg font-bold border-b pb-2",children:"פרטים מזהים"}),d.jsx(fo,{label:"השם הרשום",value:r.name,showEmptyFields:!0}),d.jsx(fo,{label:"תיאור העיסוק המדווח",value:n.businessDescription??"",showEmptyFields:!0}),d.jsx(fo,{label:"מספר זהות",value:n.idNumber,showEmptyFields:!0}),d.jsx(fo,{label:"מספר תיק",value:n.taxFileNumber,showEmptyFields:!0}),d.jsx(fo,{label:'תיק מדווח למע"מ',value:n.vatFileNumber??"",showEmptyFields:!0}),d.jsx(fo,{label:"מספר תיק ניכויים",value:n.withholdingTaxFileNumber??"",showEmptyFields:!0})]}),d.jsxs("div",{className:"space-y-4",children:[d.jsx("h3",{className:"text-lg font-bold border-b pb-2",children:"פרטי העסק"}),d.jsx(fo,{value:jGn(n.businessType),label:"סוג העסק המדווח",showEmptyFields:!0}),d.jsx(fo,{label:"שיטת דיווח",value:PGn(n.reportingMethod),showEmptyFields:!0}),n.reportingMethod===tj.DollarRegulations&&d.jsx(fo,{label:"מטבע הסכומים",value:MGn(n.currencyType),showEmptyFields:!0}),d.jsx(fo,{label:"הסכום באלפים",value:II(n.amountsInThousands),showEmptyFields:!0}),d.jsx(fo,{label:"שיטת חשבונאות",value:RGn(n.accountingMethod),showEmptyFields:!0}),d.jsx(fo,{label:"הנהלת חשבונות",value:$Gn(n.accountingSystem),showEmptyFields:!0}),d.jsx(fo,{label:"חייב ברישום תוכנה",value:II(!!n.softwareRegistrationNumber),showEmptyFields:!0}),n.softwareRegistrationNumber&&d.jsx(fo,{label:"מספר תעודת רישום",value:n.softwareRegistrationNumber,showEmptyFields:!0}),d.jsx(fo,{label:"דוח בגין שותפות",value:II(!!n.isPartnership),showEmptyFields:!0}),n.isPartnership&&d.jsxs(d.Fragment,{children:[d.jsx(fo,{label:"מספר שותפים",value:n.partnershipCount?.toString()??"",showEmptyFields:!0}),d.jsx(fo,{label:"חלקי ברווחי השותפות",value:`${n.partnershipProfitShare}%`,showEmptyFields:!0})]}),d.jsx(fo,{label:"יישום תקני חשבונאות (IFRS)",value:II(!!n.ifrsImplementationYear||!!n.ifrsReportingOption),showEmptyFields:!0}),(!!n.ifrsImplementationYear||!!n.ifrsReportingOption)&&d.jsxs(d.Fragment,{children:[d.jsx(fo,{label:"החל משנת המס",value:n.ifrsImplementationYear??"",showEmptyFields:!0}),d.jsx(fo,{label:"דווח בחלופה",value:LGn(n.ifrsReportingOption),showEmptyFields:!0})]}),d.jsx(fo,{label:"מספר ענף כלכלי של המדווח",value:n.industryCode,showEmptyFields:!0}),d.jsx(fo,{label:"חוות דעת המבקר",value:UGn(n.auditOpinionType),showEmptyFields:!0})]})]})})}const HGn=[{title:"הכנסות ממכירות ומתן שירותים",color:"text-blue-700",codes:[1010,1015,1020,1025,1030,1040,1051,1052,1090],sumCode:1e3},{title:"עלות המכירות ומתן השירותים וביצוע עבודות",color:"text-purple-700",codes:[1306,1308,1307,1310,1320,1330,1340,1350,1360,1371,1372,1390,1400,1450],sumCode:1300},{title:"עלויות ייצור ועלויות אצל קבלן בונה",color:"text-rose-700",codes:[2005,2006,2011,2012,2015,2020,2025,2030,2035,2040,2045,2050,2060,2066,2067,2068,2070,2075,2080,2085,2090,2095],sumCode:2e3},{title:"הוצאות מחקר ופיתוח",color:"text-amber-700",codes:[2510,2520,2530,2540,2550,2560,2570,2590],sumCode:2500},{title:"הוצאות מכירה",color:"text-green-700",codes:[3011,3013,3012,3015,3020,3025,3030,3040,3045,3050,3060,3066,3067,3068,3070,3075,3080,3085,3090,3100,3120,3190],sumCode:3e3},{title:"הוצאות הנהלה וכלליות",color:"text-cyan-700",codes:[3511,3513,3512,3515,3520,3530,3535,3540,3545,3550,3560,3566,3567,3568,3570,3575,3580,3590,3595,3600,3610,3620,3625,3631,3632,3640,3650,3660,3665,3680,3685,3690],sumCode:3500},{title:"הוצאות מימון",color:"text-indigo-700",codes:[5010,5020,5025,5030,5040,5050,5051,5090],sumCode:5e3},{title:"הכנסות מימון",color:"text-fuchsia-700",codes:[5110,5121,5122,5130,5150,5160,5190],sumCode:5100},{title:"הכנסות אחרות",color:"text-red-700",codes:[5210,5220,5230,5236,5237,5240,5250,5260,5270,5290],sumCode:5200},{title:"הוצאות אחרות",color:"text-yellow-700",codes:[5310,5320,5330,5390],sumCode:5300}],VGn=[{title:"מסים על הכנסה",color:"text-sky-700",codes:[5610,5620,5630],sumCode:5600},{title:"ייעוד הרווחים",color:"text-violet-700",codes:[5710],sumCode:5700},{title:"רווח/הפסד אקויטי",color:"text-pink-700",codes:[5810],sumCode:5800}];function QGn({selectedYear:e,referenceYear:t,data:n,referenceData:r,showEmptyFields:i=!1}){const{profitAndLoss:a}=$t(Ege,n),s=$t(Ege,r)?.profitAndLoss||[];return d.jsx(pS,{value:"profitLoss",className:"border rounded-md p-4",children:d.jsxs("div",{className:"space-y-6",dir:"rtl",children:[d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("h3",{className:"text-lg font-bold border-b pb-2",children:"נתוני רווח והפסד"}),t&&e!==t&&d.jsxs("span",{className:"text-sm text-blue-600 bg-blue-50 px-2 py-1 rounded",children:["מציג שינויים לעומת ",t]})]}),HGn.map(l=>d.jsxs("div",{className:"bg-gray-50 p-4 rounded-md",children:[d.jsx("h4",{className:`font-bold mb-4 ${l.color}`,children:l.title}),d.jsxs("div",{className:"space-y-2",children:[l.codes.map(c=>d.jsx(Jo,{codes:a,referenceCodes:s,code:c,showEmptyFields:i},c)),d.jsx("div",{className:"border-2 rounded-md border-gray-300",children:d.jsx(Jo,{codes:a,referenceCodes:s,code:l.sumCode,showEmptyFields:i})})]})]},l.title)),d.jsx("div",{className:"bg-emerald-50 p-4 rounded-md border-2 border-emerald-200",children:d.jsx(Jo,{codes:a,referenceCodes:s,code:6666,showEmptyFields:i})}),VGn.map(l=>d.jsxs("div",{className:"bg-gray-50 p-4 rounded-md",children:[d.jsx("h4",{className:`font-bold mb-4 ${l.color}`,children:l.title}),d.jsxs("div",{className:"space-y-2",children:[l.codes.map(c=>d.jsx(Jo,{codes:a,referenceCodes:s,code:c,showEmptyFields:i},c)),d.jsx("div",{className:"border-2 rounded-md border-gray-300",children:d.jsx(Jo,{codes:a,referenceCodes:s,code:l.sumCode,showEmptyFields:i})})]})]},l.title))]})})}const qGn=[{title:"התאמות חשבונאיות למי שיישם את חלופה 2 בהוראת ביצוע 7/2010 בנושא IFRS",color:"red",codes:[103,104]},{title:"התאמות נדרשות לצרכי מס (הוסף/הפחת)",color:"yellow",codes:[110,120,130,135,140,150,160,170,180,181,182,183,184,190,200,300,310,320,330,350,360],sumCode:370},{title:"התאמות חשבונאיות למי שיישם את חלופה 3 בהוראת ביצוע 7/2010 בנושא IFRS שלא מצאו את ביטויין בהתאמות הנדרשות לצרכי מס",color:"emerald",codes:[383],sumCode:400},{title:"יישום הוראות חוקי מס נוספים",color:"sky",codes:[430,480,490],sumCode:500},{title:"נתונים נוספים",color:"violet",codes:[510,520,530,540,550,570,575,580,585,590]},{title:"בשותפות",color:"pink",codes:[600]}],tIe={red:{header:"text-red-700",sum:"bg-red-50 border-red-200"},yellow:{header:"text-yellow-700",sum:"bg-yellow-50 border-yellow-200"},emerald:{header:"text-emerald-700",sum:"bg-emerald-50 border-emerald-200"},sky:{header:"text-sky-700",sum:"bg-sky-50 border-sky-200"},violet:{header:"text-violet-700",sum:"bg-violet-50 border-violet-200"},pink:{header:"text-pink-700",sum:"bg-pink-50 border-pink-200"}};function GGn({data:e,referenceData:t,showEmptyFields:n=!1}){const{taxAdjustment:r}=$t(Fge,e),a=$t(Fge,t)?.taxAdjustment||[];return d.jsx(pS,{value:"taxAdjustment",className:"border rounded-md p-4",children:d.jsxs("div",{className:"space-y-6",dir:"rtl",children:[d.jsx("h3",{className:"text-lg font-bold border-b pb-2",children:'נתוני דו"ח התאמה למס'}),d.jsx("div",{className:"bg-emerald-50 p-4 rounded-md border-2 border-emerald-200",children:d.jsx(Jo,{codes:r,referenceCodes:a,code:100,showEmptyFields:n})}),qGn.map(o=>{const{header:s,sum:l}=tIe[o.color]||tIe.red;return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"bg-gray-50 p-4 rounded-md",children:[d.jsx("h4",{className:"font-bold mb-4 "+s,children:o.title}),d.jsx("div",{className:"space-y-2",children:o.codes.map(c=>d.jsx(Jo,{codes:r,referenceCodes:a,code:c,showEmptyFields:n},c))})]}),o.sumCode&&d.jsx("div",{className:"p-4 rounded-md border-2 "+l,children:d.jsx(Jo,{codes:r,referenceCodes:a,code:o.sumCode,showEmptyFields:n})})]},o.title)})]})})}function WGn({data:e,referenceData:t,businessInfo:n,selectedYear:r,referenceYear:i}){const a=$t(Tge,e),o=$t(Tge,t),[s,l]=w.useState("header"),[c,u]=w.useState(!0);return d.jsxs("div",{className:"p-4 border-gray-300",dir:"rtl",children:[d.jsxs("div",{className:"flex justify-between items-center mb-4",children:[d.jsx("div",{className:"flex items-center gap-4",children:d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs(qe,{variant:c?"outline":"default",size:"sm",onClick:()=>u(!c),className:"flex items-center gap-2",children:[c?d.jsx(Y5t,{className:"h-4 w-4"}):d.jsx(Nne,{className:"h-4 w-4"}),c?"הסתר שדות ריקים":"הצג שדות ריקים"]}),d.jsx("span",{className:"text-sm text-gray-500",children:c?"מציג את כל השדות":"מציג רק שדות עם נתונים"})]})}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs(qe,{variant:"outline",className:"flex items-center gap-2",children:[d.jsx(_ne,{className:"h-4 w-4"}),"הורד"]}),d.jsxs(qe,{variant:"outline",className:"flex items-center gap-2",children:[d.jsx(lIt,{className:"h-4 w-4"}),"שמור"]})]})]}),d.jsxs(bYe,{value:s,onValueChange:l,className:"w-full",children:[d.jsxs(xYe,{className:"grid grid-cols-4 w-full",dir:"rtl",children:[d.jsx(sk,{value:"header",children:"פרטים מזהים"}),d.jsx(sk,{value:"profitLoss",children:"רווח והפסד"}),d.jsx(sk,{value:"taxAdjustment",children:"התאמה למס"}),d.jsx(sk,{value:"balanceSheet",children:"מאזן"})]}),d.jsx(zGn,{data:a,businessInfo:n}),d.jsx(QGn,{selectedYear:r,referenceYear:i,data:a,referenceData:o,showEmptyFields:c}),d.jsx(GGn,{data:a,referenceData:o,showEmptyFields:c}),d.jsx(IGn,{data:a,referenceData:o,showEmptyFields:c})]})]})}function KGn(){const{setFiltersContext:e}=w.useContext(ra),[t,n]=w.useState(void 0),[r,i]=w.useState(void 0),[a,o]=w.useState(void 0),[{data:s,fetching:l}]=rn({query:bFt,variables:{year:r?Number.parseInt(r,10):0,businessId:t},pause:!r||!t});return w.useEffect(()=>{e(d.jsx("div",{className:"flex flex-row gap-x-5",dir:"rtl",children:d.jsx(EGn,{selectedBusiness:t,setSelectedBusiness:n,selectedYear:r,setSelectedYear:i,referenceYear:a,setReferenceYear:o})}))},[e,t,r,a]),d.jsx("div",{className:"container mx-auto",dir:"rtl",children:d.jsxs(ls,{className:"border-2 border-gray-300",children:[d.jsx(Uc,{className:"bg-gray-100 border-b-2 border-gray-300 flex flex-row justify-between items-center",children:d.jsxs("div",{className:"text-center w-full",children:[d.jsx("h1",{className:"text-2xl font-bold",children:'נספח לטופס הדו"ח השנתי ליחיד ולחבר בני אדם'}),d.jsxs("h2",{className:"text-xl",children:["לשנת המס ",r]}),d.jsx("p",{className:"text-sm",children:'נתוני הדוחות הכספיים, מאזן, רווח והפסד ודו"ח ההתאמה למס'})]})}),d.jsx(Gs,{className:"p-0",children:d.jsx(YGn,{fetching:l,data:s,selectedBusiness:t,selectedYear:r,referenceYear:a})})]})})}function YGn({fetching:e,data:t,selectedBusiness:n,selectedYear:r,referenceYear:i}){if(e)return d.jsx("div",{className:"container mx-auto p-8 text-center",dir:"rtl",children:d.jsx("p",{className:"text-lg text-gray-600",children:"טוען נתונים..."})});if(!r||!n)return d.jsx("div",{className:"container mx-auto p-8 text-center",dir:"rtl",children:d.jsx("p",{className:"text-lg text-gray-600",children:"יש לבחור עסק ושנת דיווח"})});const a=t?.shaam6111.data;return a?d.jsx(WGn,{data:a,businessInfo:t.shaam6111.business,selectedBusiness:n,selectedYear:r,referenceYear:i}):d.jsx("div",{className:"container mx-auto p-8 text-center",dir:"rtl",children:d.jsx("p",{className:"text-lg text-gray-600",children:"אין נתונים זמינים עבור העסק והשנה שנבחרו"})})}const nIe=[{id:"key",accessorKey:"key",cell:({row:e})=>d.jsx(Mt,{children:e.original.key}),header:({column:e})=>d.jsxs(qe,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Key",d.jsx(cd,{})]})},{id:"name",accessorKey:"name",cell:({row:e})=>d.jsx(Mt,{children:e.original.name}),header:({column:e})=>d.jsxs(qe,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Name",d.jsx(cd,{})]})},{id:"defaultIrsCode",accessorKey:"defaultIrsCode",cell:({row:e})=>d.jsx(Mt,{className:"flex flex-wrap gap-1 p-1",children:e.original.defaultIrsCode&&d.jsx(qe,{variant:"outline",disabled:!0,className:"p-1 w-15",children:e.original.defaultIrsCode})}),header:"Default IRS Code"},{id:"edit",cell:({row:e})=>d.jsx(Pon,{sortCodeKey:e.original.key,onAdd:e.original.refetchSortCodes})}],XGn=()=>{const[{data:e,fetching:t,error:n},r]=rn({query:xFt}),{setFiltersContext:i}=w.useContext(ra),a=w.useMemo(()=>e?.allSortCodes?.map(l=>({...l,refetchSortCodes:r}))??[],[e?.allSortCodes,r]),o=im({data:a,columns:nIe,getCoreRowModel:rm(),getPaginationRowModel:BD(),getSortedRowModel:Fg(),initialState:{pagination:{pageSize:100}}}),s=o.getPageOptions();return w.useEffect(()=>{i(d.jsx("div",{className:"flex items-center justify-end gap-10 space-x-2 py-4",children:d.jsx(zL,{table:o})}))},[i,o,s]),w.useEffect(()=>{n&&(console.error("Error fetching sort codes",n),Qe.error("Error",{description:"Error fetching sort codes"}))},[n]),d.jsx(Pa,{title:`Sort Codes (${a.length})`,description:"All sort codes",headerActions:d.jsx(Gon,{onAdd:()=>r()}),children:t?d.jsx("div",{className:"flex flex-row justify-center",children:d.jsx(si,{className:"h-10 w-10 animate-spin mr-2"})}):d.jsx("div",{className:"flex flex-col gap-4 rounded-md border",children:d.jsxs(Iu,{children:[d.jsx(ju,{children:o.getHeaderGroups().map(l=>d.jsx(Tr,{children:l.headers.map(c=>d.jsx(Kr,{children:c.isPlaceholder?null:Ro(c.column.columnDef.header,c.getContext())},c.id))},l.id))}),d.jsx(Pu,{children:o.getRowModel().rows.length===0?d.jsx(Tr,{children:d.jsx(Mt,{colSpan:nIe.length,className:"text-center py-8",children:"No sort codes found"})}):o.getRowModel().rows.map(l=>d.jsx(Tr,{children:l.getVisibleCells().map(c=>d.jsx(Mt,{children:Ro(c.column.columnDef.cell,c.getContext())},c.id))},l.id))})]})})})},ZGn="addTag",JGn=()=>{const[{fetching:e},t]=Hn(TFt),n=w.useCallback(async r=>{const i=`Error adding new tag [${r.tagName}]`,a=`${ZGn}-${r.tagName}`;Qe.loading("Adding tag",{id:a});try{const o=await t(r);Vn(o,i,a)&&Qe.success("Success",{id:a,description:`"${r.tagName}" tag was successfully added`})}catch(o){console.error(`${i}: ${o}`),Qe.error("Error",{id:a,description:i,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,addTag:n}},eWn="deleteTag",tWn=()=>{const[{fetching:e},t]=Hn(WFt),n=w.useCallback(async r=>{const i=`Error deleting new tag [${r.name}]`,a=`${eWn}-${r.tagId}`;Qe.loading(`Deleting tag [${r.name}]`,{id:a});try{const o=await t(r);Vn(o,i,a)&&Qe.success("Tag Deleted",{id:a,description:`[${r.name}] tag was successfully removed`})}catch(o){console.error(`${i}: ${o}`),Qe.error("Error",{id:a,description:i,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,deleteTag:n}},nWn=()=>{const{setFiltersContext:e}=w.useContext(ra),[t,n]=w.useState(""),[{data:r,fetching:i},a]=rn({query:wFt}),{addTag:o}=JGn(),{deleteTag:s}=tWn();e(null);const l=CLe(r?.allTags??[]),c=w.useCallback(f=>{f.length>2&&o({tagName:f}).then(()=>{a()})},[o,a]),u=w.useCallback((f,h)=>{s({tagId:f,name:h}).then(()=>{a()})},[s,a]);return d.jsx(Pa,{title:"Tags",description:"Manage tags for your bookmarks.",children:i?d.jsx(si,{className:"h-10 w-10 animate-spin mr-2 self-center"}):d.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[l?.map(f=>d.jsxs("div",{className:"flex items-center gap-2 text-gray-600 mb-2",children:[d.jsxs("div",{className:"w-full mt-1 relative rounded-md shadow-xs",children:[f.namePath?.map((h,m)=>d.jsx("span",{className:"ms-2"},m)),f.name]}),d.jsx($on,{data:f}),d.jsx(qe,{variant:"ghost",size:"icon",className:"size-7.5",onClick:()=>u(f.id,f.name),children:d.jsx(Ly,{className:"size-5"})})]},f.id)),d.jsxs("div",{className:"flex justify-start items-center gap-2 text-gray-600 mb-2",children:[d.jsx(Cn,{className:"w-80",value:t,onChange:f=>n(f.currentTarget.value),placeholder:"Add new tag",required:!0}),d.jsx(qe,{variant:"ghost",size:"icon",className:"size-7.5",disabled:t.length<2,onClick:()=>c(t),children:d.jsx(yp,{className:"size-5"})})]})]})})},rWn="updateTaxCategory",iWn=()=>{const[{fetching:e},t]=Hn(IDt),n=w.useCallback(async r=>{const i="Error updating tax category",a=`${rWn}-${r.taxCategoryId}`;Qe.loading("Uploading Tax Category",{id:a});try{const o=await t(r),s=Vn(o,i,a,"updateTaxCategory");if(s)return Qe.success("Success",{id:a,description:`${s.updateTaxCategory.name} was updated`}),s.updateTaxCategory}catch(o){console.error(`${i}: ${o}`),Qe.error("Error",{id:a,description:i,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,updateTaxCategory:n}};function aWn({taxCategoryId:e,onAdd:t}){const[n,r]=w.useState(!1);return d.jsxs(Ra,{open:n,onOpenChange:r,children:[d.jsx(gc,{asChild:!0,children:d.jsx(qe,{variant:"outline",size:"icon",children:d.jsx(Ou,{})})}),d.jsxs($a,{className:"w-[400px] max-w-screen-md",children:[d.jsx(fs,{children:d.jsx(hs,{children:"Edit Tax Category"})}),d.jsx(oWn,{taxCategoryId:e,close:()=>r(!1),onAdd:t})]})]})}function oWn({taxCategoryId:e,close:t,onAdd:n}){const[{data:r,fetching:i}]=rn({query:QEt,variables:{id:e}}),a=r?.taxCategory;return!a&&!i&&Qe.error("Error",{description:"Couldn'nt find tax category"}),i?d.jsx(si,{className:"h-10 w-10 animate-spin"}):d.jsx(sWn,{taxCategory:a,close:t,onAdd:n})}function sWn({taxCategory:e,close:t,onAdd:n}){const r=fr({defaultValues:{sortCode:e.sortCode?.key,name:e.name,irsCode:e.irsCode}}),{handleSubmit:i}=r,[a,o]=w.useState(!1),{updateTaxCategory:s,fetching:l}=iWn(),c=u=>{u.sortCode&&=parseInt(u.sortCode.toString()),s({fields:u,taxCategoryId:e.id}).then(f=>{f?.id&&(n?.(f.id),t())})};return d.jsx(oi,{...r,children:d.jsxs("form",{onSubmit:i(c),children:[d.jsx("div",{className:"flex flex-col gap-4 my-4",children:d.jsx(JWe,{isInsert:!1,formManager:r,setFetching:o})}),d.jsx("div",{className:"flex justify-end mt-4",children:d.jsx(qe,{type:"submit",disabled:l||a,children:"Update"})})]})})}const lWn=({data:e})=>d.jsx("td",{children:e.name}),cWn=({data:e})=>d.jsx("td",{children:e.sortCode?d.jsxs("span",{children:[e.sortCode?.name," (",e.sortCode?.id,")"]}):"N/A"}),rIe=[{id:"name",accessorKey:"name",cell:({row:e})=>d.jsx(lWn,{data:e.original}),header:({column:e})=>d.jsxs(qe,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Name",d.jsx(cd,{})]})},{id:"sortCode",accessorKey:"sortCode.key",cell:({row:e})=>d.jsx(cWn,{data:e.original}),header:({column:e})=>d.jsxs(qe,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Sort Code",d.jsx(cd,{})]})},{id:"edit",cell:({row:e})=>d.jsx(aWn,{taxCategoryId:e.original.id})}],uWn=()=>{const[{data:e,fetching:t,error:n},r]=rn({query:kFt}),{setFiltersContext:i}=w.useContext(ra),a=e?.taxCategories??[],o=im({data:a,columns:rIe,getCoreRowModel:rm(),getPaginationRowModel:BD(),getSortedRowModel:Fg(),initialState:{pagination:{pageSize:30}}}),s=o.getPageOptions();return w.useEffect(()=>{i(d.jsx("div",{className:"flex items-center justify-end gap-10 space-x-2 py-4",children:d.jsx("div",{className:"flex items-center justify-between px-2",children:d.jsx(zL,{table:o})})}))},[i,o,s]),w.useEffect(()=>{n&&Qe.error("Error",{description:"Error fetching tax categories"})},[n]),d.jsx(Pa,{title:`Tax Categories (${a.length})`,description:"All tax categories",headerActions:d.jsx(Xon,{onAdd:()=>r()}),children:t?d.jsx("div",{className:"flex flex-row justify-center",children:d.jsx(si,{className:"h-10 w-10 animate-spin mr-2"})}):d.jsx("div",{className:"flex flex-col gap-4 rounded-md border",children:d.jsxs(Iu,{children:[d.jsx(ju,{children:o.getHeaderGroups().map(l=>d.jsx(Tr,{children:l.headers.map(c=>d.jsx(Kr,{children:c.isPlaceholder?null:Ro(c.column.columnDef.header,c.getContext())},c.id))},l.id))}),d.jsx(Pu,{children:o.getRowModel().rows.length===0?d.jsx(Tr,{children:d.jsx(Mt,{colSpan:rIe.length,className:"text-center py-8",children:"No tax categories found"})}):o.getRowModel().rows.map(l=>d.jsx(Tr,{children:l.getVisibleCells().map(c=>d.jsx(Mt,{children:Ro(c.column.columnDef.cell,c.getContext())},c.id))},l.id))})]})})})};function dWn(){const[e,t]=w.useState(null);return d.jsx(ra.Provider,{value:{filtersContext:e,setFiltersContext:t},children:d.jsx(XFn,{filtersContext:e,children:d.jsxs(MIe,{children:[d.jsx(Lr,{path:"/",element:d.jsx(iFe,{})}),d.jsx(Lr,{path:"charges",element:d.jsx(iFe,{})}),d.jsx(Lr,{path:"missing-info-charges",element:d.jsx(CRn,{})}),d.jsx(Lr,{path:"charges-ledger-validation",element:d.jsx(bdn,{})}),d.jsx(Lr,{path:"charges/:chargeId",element:d.jsx(X9t,{})}),d.jsx(Lr,{path:"businesses",element:d.jsx(Adn,{})}),d.jsx(Lr,{path:"business-trips",element:d.jsx(ddn,{})}),d.jsx(Lr,{path:"business-trips/:businessTripId",element:d.jsx(cdn,{})}),d.jsx(Lr,{path:"business-transactions",element:d.jsx(lUt,{})}),d.jsx(Lr,{path:"business-transactions/:businessId",element:d.jsx(Ycn,{})}),d.jsxs(Lr,{path:"charts",children:[d.jsx(Lr,{path:"",element:d.jsx(zgn,{})}),d.jsx(Lr,{path:"monthly-income-expense",element:d.jsx(a2n,{})})]}),d.jsxs(Lr,{path:"documents",children:[d.jsx(Lr,{path:"",element:d.jsx(ERn,{})}),d.jsx(Lr,{path:"issue-documents",element:d.jsx(PRn,{})}),d.jsx(Lr,{path:"issue-document",element:d.jsx(FRn,{})})]}),d.jsx(Lr,{path:"accountant-approvals",element:d.jsx(ZFn,{})}),d.jsxs(Lr,{path:"reports",children:[d.jsx(Lr,{path:"trial-balance",element:d.jsx(wMn,{})}),d.jsx(Lr,{path:"conto",element:d.jsx(aMn,{})}),d.jsx(Lr,{path:"vat-monthly",element:d.jsx(oRn,{})}),d.jsx(Lr,{path:"profit-and-loss",element:d.jsx(JEe,{})}),d.jsx(Lr,{path:"profit-and-loss/:year",element:d.jsx(JEe,{})}),d.jsx(Lr,{path:"tax",element:d.jsx(eFe,{})}),d.jsx(Lr,{path:"tax/:year",element:d.jsx(eFe,{})}),d.jsx(Lr,{path:"depreciation",element:d.jsx(NGn,{})}),d.jsx(Lr,{path:"shaam6111",element:d.jsx(KGn,{})}),d.jsx(Lr,{path:"yearly-ledger",element:d.jsx(uRn,{})}),d.jsx(Lr,{path:"corporate-tax-ruling-compliance",element:d.jsx(ZEe,{})}),d.jsx(Lr,{path:"corporate-tax-ruling-compliance/:year",element:d.jsx(ZEe,{})}),d.jsx(Lr,{path:"balance",element:d.jsx(wGn,{})}),d.jsx(Lr,{path:"validate-reports",element:d.jsx(KMn,{})})]}),d.jsx(Lr,{path:"salaries",element:d.jsx(SRn,{})}),d.jsx(Lr,{path:"tags",element:d.jsx(nWn,{})}),d.jsx(Lr,{path:"tax-categories",element:d.jsx(uWn,{})}),d.jsx(Lr,{path:"sort-codes",element:d.jsx(XGn,{})}),d.jsx(Lr,{path:"*",element:d.jsx(MRn,{})})]})})})}var q8=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},fWn={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},hWn=class{#e=fWn;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},ute=new hWn;function mWn(e){setTimeout(e,0)}var G8=typeof window>"u"||"Deno"in globalThis;function _h(){}function pWn(e,t){return typeof e=="function"?e(t):e}function AWn(e){return typeof e=="number"&&e>=0&&e!==1/0}function gWn(e,t){return Math.max(e+(t||0)-Date.now(),0)}function dte(e,t){return typeof e=="function"?e(t):e}function vWn(e,t){return typeof e=="function"?e(t):e}function iIe(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Lce(o,t.options))return!1}else if(!WF(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function aIe(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(GF(t.options.mutationKey)!==GF(a))return!1}else if(!WF(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Lce(e,t){return(t?.queryKeyHashFn||GF)(e)}function GF(e){return JSON.stringify(e,(t,n)=>fte(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function WF(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>WF(e[n],t[n])):!1}var yWn=Object.prototype.hasOwnProperty;function uot(e,t){if(e===t)return e;const n=oIe(e)&&oIe(t);if(!n&&!(fte(e)&&fte(t)))return t;const i=(n?e:Object.keys(e)).length,a=n?t:Object.keys(t),o=a.length,s=n?new Array(o):{};let l=0;for(let c=0;c<o;c++){const u=n?c:a[c],f=e[u],h=t[u];if(f===h){s[u]=f,(n?c<i:yWn.call(e,u))&&l++;continue}if(f===null||h===null||typeof f!="object"||typeof h!="object"){s[u]=h;continue}const m=uot(f,h);s[u]=m,m===f&&l++}return i===o&&l===i?e:s}function oIe(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function fte(e){if(!sIe(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!sIe(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function sIe(e){return Object.prototype.toString.call(e)==="[object Object]"}function bWn(e){return new Promise(t=>{ute.setTimeout(t,e)})}function xWn(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?uot(e,t):t}function wWn(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function kWn(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Uce=Symbol();function dot(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Uce?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var SWn=class extends q8{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!G8&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},fot=new SWn;function CWn(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var _Wn=mWn;function NWn(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=_Wn;const a=s=>{t?e.push(s):i(()=>{n(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var Bc=NWn(),EWn=class extends q8{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!G8&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},H$=new EWn;function FWn(e){return Math.min(1e3*2**e,3e4)}function hot(e){return(e??"online")==="online"?H$.isOnline():!0}var hte=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function mot(e){let t=!1,n=0,r;const i=CWn(),a=()=>i.status!=="pending",o=A=>{if(!a()){const v=new hte(A);h(v),e.onCancel?.(v)}},s=()=>{t=!0},l=()=>{t=!1},c=()=>fot.isFocused()&&(e.networkMode==="always"||H$.isOnline())&&e.canRun(),u=()=>hot(e.networkMode)&&e.canRun(),f=A=>{a()||(r?.(),i.resolve(A))},h=A=>{a()||(r?.(),i.reject(A))},m=()=>new Promise(A=>{r=v=>{(a()||c())&&A(v)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),p=()=>{if(a())return;let A;const v=n===0?e.initialPromise:void 0;try{A=v??e.fn()}catch(y){A=Promise.reject(y)}Promise.resolve(A).then(f).catch(y=>{if(a())return;const x=e.retry??(G8?0:3),k=e.retryDelay??FWn,S=typeof k=="function"?k(n,y):k,C=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,y);if(t||!C){h(y);return}n++,e.onFail?.(n,y),bWn(S).then(()=>c()?void 0:m()).then(()=>{t?h(y):p()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:l,canStart:u,start:()=>(u()?p():m().then(p),i)}}var pot=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),AWn(this.gcTime)&&(this.#e=ute.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(G8?1/0:300*1e3))}clearGcTimeout(){this.#e&&(ute.clearTimeout(this.#e),this.#e=void 0)}},DWn=class extends pot{#e;#t;#n;#r;#a;#i;#o;constructor(e){super(),this.#o=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=lIe(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=lIe(this.options);t.data!==void 0&&(this.setData(t.data,{updatedAt:t.dataUpdatedAt,manual:!0}),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=xWn(this.state.data,e,this.options);return this.#s({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(_h).catch(_h):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>vWn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Uce||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>dte(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!gWn(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#o?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){const s=this.observers.find(l=>l.options.queryFn);s&&this.setOptions(s.options)}const n=new AbortController,r=s=>{Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{const s=dot(this.options,t),c=(()=>{const u={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(u),u})();return this.#o=!1,this.options.persister?this.options.persister(s,c,this):s(c)},o=(()=>{const s={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(s),s})();this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#s({type:"fetch",meta:o.fetchOptions?.meta}),this.#a=mot({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:s=>{s instanceof hte&&s.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(s,l)=>{this.#s({type:"failed",failureCount:s,error:l})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const s=await this.#a.start();if(s===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(s),this.#n.config.onSuccess?.(s,this),this.#n.config.onSettled?.(s,this.state.error,this),s}catch(s){if(s instanceof hte){if(s.silent)return this.#a.promise;if(s.revert){if(this.state.data===void 0)throw s;return this.state.data}}throw this.#s({type:"error",error:s}),this.#n.config.onError?.(s,this),this.#n.config.onSettled?.(this.state.data,s,this),s}finally{this.scheduleGc()}}#s(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...TWn(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Bc.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function TWn(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:hot(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function lIe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}function cIe(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let u=!1;const f=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(t.signal.aborted?u=!0:t.signal.addEventListener("abort",()=>{u=!0}),t.signal)})},h=dot(t.options,t.fetchOptions),m=async(p,A,v)=>{if(u)return Promise.reject();if(A==null&&p.pages.length)return Promise.resolve(p);const x=(()=>{const N={client:t.client,queryKey:t.queryKey,pageParam:A,direction:v?"backward":"forward",meta:t.options.meta};return f(N),N})(),k=await h(x),{maxPages:S}=t.options,C=v?kWn:wWn;return{pages:C(p.pages,k,S),pageParams:C(p.pageParams,A,S)}};if(i&&a.length){const p=i==="backward",A=p?OWn:uIe,v={pages:a,pageParams:o},y=A(r,v);s=await m(v,y,p)}else{const p=e??a.length;do{const A=l===0?o[0]??r.initialPageParam:uIe(r,s);if(l>0&&A==null)break;s=await m(s,A),l++}while(l<p)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=c}}}function uIe(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function OWn(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var BWn=class extends pot{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||IWn(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#a({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=mot({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(a,o)=>{this.#a({type:"failed",failureCount:a,error:o})},onPause:()=>{this.#a({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",i=!this.#r.canStart();try{if(r)t();else{this.#a({type:"pending",variables:e,isPaused:i}),await this.#n.config.onMutate?.(e,this,n);const o=await this.options.onMutate?.(e,n);o!==this.state.context&&this.#a({type:"pending",context:o,variables:e,isPaused:i})}const a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#a({type:"success",data:a}),a}catch(a){try{throw await this.#n.config.onError?.(a,e,this.state.context,this,n),await this.options.onError?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,a,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,a,e,this.state.context,n),a}finally{this.#a({type:"error",error:a})}}finally{this.#n.runNext(this)}}#a(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Bc.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function IWn(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var jWn=class extends q8{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new BWn({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=jI(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=jI(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=jI(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=jI(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Bc.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>aIe(t,n))}findAll(e={}){return this.getAll().filter(t=>aIe(e,t))}notify(e){Bc.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Bc.batch(()=>Promise.all(e.map(t=>t.continue().catch(_h))))}};function jI(e){return e.options.scope?.id}var PWn=class extends q8{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??Lce(r,t);let a=this.get(i);return a||(a=new DWn({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Bc.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>iIe(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>iIe(e,n)):t}notify(e){Bc.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Bc.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Bc.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},MWn=class{#e;#t;#n;#r;#a;#i;#o;#s;constructor(e={}){this.#e=e.queryCache||new PWn,this.#t=e.mutationCache||new jWn,this.#n=e.defaultOptions||{},this.#r=new Map,this.#a=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#o=fot.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=H$.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(dte(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=this.#e.get(r.queryHash)?.state.data,o=pWn(t,a);if(o!==void 0)return this.#e.build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Bc.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Bc.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Bc.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Bc.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(_h).catch(_h)}invalidateQueries(e,t={}){return Bc.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Bc.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(_h)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(_h)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(dte(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(_h).catch(_h)}fetchInfiniteQuery(e){return e.behavior=cIe(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(_h).catch(_h)}ensureInfiniteQueryData(e){return e.behavior=cIe(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return H$.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(GF(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{WF(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#a.set(GF(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#a.values()],n={};return t.forEach(r=>{WF(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Lce(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Uce&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},RWn=w.createContext(void 0),$Wn=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(RWn.Provider,{value:e,children:t})),LWn=(e,t,n,r,i,a,o,s)=>{let l=document.documentElement,c=["light","dark"];function u(m){(Array.isArray(e)?e:[e]).forEach(p=>{let A=p==="class",v=A&&a?i.map(y=>a[y]||y):i;A?(l.classList.remove(...v),l.classList.add(a&&a[m]?a[m]:m)):l.setAttribute(p,m)}),f(m)}function f(m){s&&c.includes(m)&&(l.style.colorScheme=m)}function h(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)u(r);else try{let m=localStorage.getItem(t)||n,p=o&&m==="system"?h():m;u(p)}catch{}},UWn=w.createContext(void 0),zWn={setTheme:e=>{},themes:[]},HWn=()=>{var e;return(e=w.useContext(UWn))!=null?e:zWn};w.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:a,value:o,themes:s,nonce:l,scriptProps:c})=>{let u=JSON.stringify([n,t,a,e,s,o,r,i]).slice(1,-1);return w.createElement("script",{...c,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${LWn.toString()})(${u})`}})});const VWn=({...e})=>{const{theme:t="system"}=HWn();return d.jsx(BOt,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-white group-[.toaster]:text-gray-950 group-[.toaster]:border-gray-200 group-[.toaster]:shadow-lg dark:group-[.toaster]:bg-gray-950 dark:group-[.toaster]:text-gray-50 dark:group-[.toaster]:border-gray-800",description:"group-[.toast]:text-gray-500 dark:group-[.toast]:text-gray-400",actionButton:"group-[.toast]:bg-gray-900 group-[.toast]:text-gray-50 font-medium dark:group-[.toast]:bg-gray-50 dark:group-[.toast]:text-gray-900",cancelButton:"group-[.toast]:bg-gray-100 group-[.toast]:text-gray-500 font-medium dark:group-[.toast]:bg-gray-800 dark:group-[.toast]:text-gray-400"}},...e})};var aY=(e,t)=>Yj(e.kind,e,{...e.context,authAttempt:t});function QWn(e){return({client:t,forward:n})=>{var r=new Set,i=mY(),a=mY(),o=new Map;function s(){c=void 0;var f=o;o=new Map,f.forEach(i.next)}function l(f){c=void 0;var h=o;o=new Map,h.forEach((m=>{a.next(XIe(m,f))}))}var c,u=null;return f=>{function h(){c=Promise.resolve().then((()=>e({mutate(y,x,k){var S=t.createRequestOperation("mutation",bk(y,x),k);return _te(K$(1)(xu((C=>C.operation.key===S.key&&S.context._instance===C.operation.context._instance))(hY((()=>{var C=p(S);r.add(C.context._instance),i.next(C)}))(v))))},appendHeaders(y,x){var k=typeof y.context.fetchOptions=="function"?y.context.fetchOptions():y.context.fetchOptions||{};return Yj(y.kind,y,{...y.context,fetchOptions:{...k,headers:{...k.headers,...x}}})}}))).then((y=>{y&&(u=y),s()})).catch((y=>{l(y)}))}h();function m(y){o.set(y.key,aY(y,!0)),u&&!c&&(c=u.refreshAuth().then(s).catch(l))}function p(y){return u?u.addAuthToOperation(y):y}var A=xu(Boolean)(QIe((y=>y.kind==="teardown"?(o.delete(y.key),y):y.context._instance&&r.has(y.context._instance)?y:y.context.authAttempt?p(y):c||!u?(c||h(),o.has(y.key)||o.set(y.key,aY(y,!1)),null):(function(k){return!k.context.authAttempt&&u&&u.willAuthError&&u.willAuthError(k)})(y)?(m(y),null):p(aY(y,!1))))(rE([i.source,f]))),v=n(A);return rE([a.source,xu((y=>!r.has(y.operation.context._instance)&&y.error&&(function(k){return u&&u.didAuthError&&u.didAuthError(k.error,k.operation)})(y)&&!y.operation.context.authAttempt?(m(y.operation),!1):(r.has(y.operation.context._instance)&&r.delete(y.operation.context._instance),!0)))(v)])}}}function qWn({children:e}){const{authService:t}=w.useContext(FD),n=ZS(),r=t.isLoggedIn(),i=w.useMemo(()=>t.authToken(),[t]),a=w.useMemo(()=>{if(!r)return null;let o;return o="https://accounter.onrender.com/graphql",Nut({url:o,exchanges:[Sut({onResult(s){if(s.error?.networkError){console.error("Network Error:",s.error.networkError),n("/network-error");return}(s?.error?.graphQLErrors.some(c=>c.extensions?.code==="FORBIDDEN")||s?.error?.response?.status===401)&&n("/login",{state:{message:"You are not authorized to access this page"}})}}),QWn(async s=>({addAuthToOperation(l){return i?s.appendHeaders(l,{Authorization:i}):l},didAuthError(l,c){return l?.response?.status===401||l?.graphQLErrors?.some(u=>u.extensions?.code==="FORBIDDEN")},async refreshAuth(){t.logout()}})),wut]})},[r,n,i,t]);return w.useEffect(()=>{a||n("/login")},[a,n]),a?d.jsx(Fut,{value:a,children:e}):d.jsx(act,{to:"/login",state:{prevPath:window.location.pathname}})}const GWn=new MWn;function WWn({children:e}){const t=Xoe({palette:{primary:{main:"#556cd6"},secondary:{main:"#19857b"},error:{main:cb.A400}}});return d.jsx(Tje,{withGlobalStyles:!0,theme:{fontFamily:"Roboto, sans-serif",fontSizes:{md:"14"}},children:d.jsxs(j0n,{theme:t,children:[d.jsx(P4n,{}),d.jsx(VWn,{}),d.jsx(iUt,{children:d.jsx(qWn,{children:d.jsx($Wn,{client:GWn,children:d.jsx(aUt,{children:e})})})})]})})}const KWn=document.getElementById("root"),YWn=Ost.createRoot(KWn),XWn=Dct(sct(d.jsx(Lr,{path:"*",element:d.jsx(WWn,{children:d.jsx(dWn,{})}),errorElement:d.jsx("p",{children:"error"})})));YWn.render(d.jsx(w.StrictMode,{children:d.jsx(zct,{router:XWn})}));export{ea as _,bu as c,Fi as g,Yn as p};
|
|
1188
|
+
`)}}):null},dGn=ip;function fGn({active:e,payload:t,className:n,indicator:r="dot",hideLabel:i=!1,hideIndicator:a=!1,label:o,labelFormatter:s,labelClassName:l,formatter:c,color:u,nameKey:f,labelKey:h}){const{config:m}=cot(),p=L.useMemo(()=>{if(i||!t?.length)return null;const[v]=t,y=String(h||v?.dataKey||v?.name||"value"),x=ste(m,v,y),k=!h&&typeof o=="string"?m[o]?.label||o:x?.label;return s?d.jsx("div",{className:St("font-medium",l),children:s(k,t)}):k?d.jsx("div",{className:St("font-medium",l),children:k}):null},[o,s,t,i,l,m,h]);if(!e||!t?.length)return null;const A=t.length===1&&r!=="dot";return d.jsxs("div",{className:St("border-gray-200/50 bg-white grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-gray-200 px-2.5 py-1.5 text-xs shadow-xl dark:border-gray-800/50 dark:bg-gray-950 dark:border-gray-800",n),children:[A?null:p,d.jsx("div",{className:"grid gap-1.5",children:t.map((v,y)=>{const x=String(f||v.name||v.dataKey||"value"),k=ste(m,v,x),S=u||v.payload.fill||v.color;return d.jsx("div",{className:St("[&>svg]:text-gray-500 flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 dark:[&>svg]:text-gray-400",r==="dot"&&"items-center"),children:c&&v?.value!==void 0&&v.name?c(v.value,v.name,v,y,v.payload):d.jsxs(d.Fragment,{children:[k?.icon?d.jsx(k.icon,{}):!a&&d.jsx("div",{className:St("shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":A&&r==="dashed"}),style:{"--color-bg":S,"--color-border":S}}),d.jsxs("div",{className:St("flex flex-1 justify-between leading-none",A?"items-end":"items-center"),children:[d.jsxs("div",{className:"grid gap-1.5",children:[A?p:null,d.jsx("span",{className:"text-gray-500 dark:text-gray-400",children:k?.label||v.name})]}),v.value&&d.jsx("span",{className:"text-gray-950 font-mono font-medium tabular-nums dark:text-gray-50",children:v.value.toLocaleString()})]})]})},v.dataKey)})})]})}const hGn=rx;function mGn({className:e,hideIcon:t=!1,payload:n,verticalAlign:r="bottom",nameKey:i}){const{config:a}=cot();return n?.length?d.jsx("div",{className:St("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.map(o=>{const s=String(i||o.dataKey||"value"),l=ste(a,o,s);return d.jsxs("div",{className:St("[&>svg]:text-gray-500 flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 dark:[&>svg]:text-gray-400"),children:[l?.icon&&!t?d.jsx(l.icon,{}):d.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:o.color}}),l?.label]},o.value)})}):null}function ste(e,t,n){if(typeof t!="object"||t===null)return;const r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let i=n;return n in t&&typeof t[n]=="string"?i=t[n]:r&&n in r&&typeof r[n]=="string"&&(i=r[n]),i in e?e[i]:e[n]}function pGn(e){return!e||os(e)?null:encodeURIComponent(JSON.stringify(e))}const lte="balanceReportFilters",Ad={MONTHLY:"Monthly",BI_MONTHLY:"Bi-monthly",QUARTERLY:"Quarterly",SEMI_ANNUALLY:"Semi-Annually",ANNUALLY:"Annually"};function AGn({filter:e,setFilter:t,closeModal:n}){const{control:r,handleSubmit:i,watch:a}=fr({defaultValues:{...e}}),{selectableBusinesses:o,fetching:s}=Bu(),{selectableFinancialEntities:l,fetching:c}=Bg(),{selectableTags:u,fetching:f}=ZL(),h=y=>{t(y),n()},m=a("excludedTags"),p=w.useMemo(()=>u.filter(y=>!m.includes(y.value)),[m,u]),A=a("includedTags"),v=w.useMemo(()=>u.filter(y=>!A.includes(y.value)),[A,u]);return d.jsxs("form",{onSubmit:i(h),children:[d.jsxs(pC,{cols:2,children:[d.jsx(xt,{name:"ownerId",control:r,defaultValue:e?.ownerId,render:({field:y,fieldState:x})=>d.jsx(ai,{...y,data:o,value:y.value,disabled:s,label:"Owners",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:x.error?.message,withinPortal:!0})}),d.jsx(xt,{name:"fromDate",control:r,defaultValue:e?.fromDate,rules:{pattern:{value:_i,message:"Date must be im format yyyy-mm-dd"}},render:({field:y,fieldState:x})=>d.jsx(qi,{...y,onChange:k=>{const S=k?typeof k=="string"?k:Rt(k,"yyyy-MM-dd"):void 0;S!==y.value&&y.onChange(S)},value:y.value?new Date(y.value):void 0,error:x.error?.message,label:"From Date",popoverProps:{withinPortal:!0}})}),d.jsx(xt,{name:"toDate",control:r,defaultValue:e?.toDate,rules:{pattern:{value:_i,message:"Date must be im format yyyy-mm-dd"}},render:({field:y,fieldState:x})=>d.jsx(qi,{...y,onChange:k=>{const S=k?typeof k=="string"?k:Rt(k,"yyyy-MM-dd"):void 0;S!==y.value&&y.onChange(S)},value:y.value?new Date(y.value):void 0,error:x.error?.message,label:"To Date",popoverProps:{withinPortal:!0}})}),d.jsx(xt,{name:"period",control:r,defaultValue:Ad.MONTHLY,render:({field:y,fieldState:x})=>d.jsx(ai,{...y,data:Object.values(Ad).map(k=>({value:k,label:k})),value:y.value,label:"Period",maxDropdownHeight:160,error:x.error?.message,withinPortal:!0})}),d.jsx(xt,{name:"excludedCounterparties",control:r,defaultValue:e.excludedCounterparties,render:({field:y,fieldState:x})=>d.jsx(dl,{...y,data:l,value:y.value??[],disabled:c,label:"Excluded Counterparties",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:x.error?.message,withinPortal:!0})}),d.jsx(xt,{name:"includedTags",control:r,defaultValue:e.includedTags,render:({field:y,fieldState:x})=>d.jsx(dl,{...y,data:p,value:y.value??[],disabled:f,label:"Included Tags",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:x.error?.message,withinPortal:!0})}),d.jsx(xt,{name:"excludedTags",control:r,defaultValue:e.excludedTags,render:({field:y,fieldState:x})=>d.jsx(dl,{...y,data:v,value:y.value??[],disabled:f,label:"Excluded Tags",placeholder:"Scroll to see all options",maxDropdownHeight:160,searchable:!0,error:x.error?.message,withinPortal:!0})})]}),d.jsxs("div",{className:"flex justify-center mt-5 gap-3",children:[d.jsx("button",{type:"submit",disabled:s,className:"text-white bg-indigo-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-indigo-600 rounded-sm text-lg",children:"Filter"}),d.jsx("button",{type:"button",className:"text-white bg-rose-500 border-0 py-2 px-8 focus:outline-hidden hover:bg-rose-600 rounded-sm text-lg",onClick:n,children:"Cancel"})]})]})}function gGn({filter:e,setFilter:t,initiallyOpened:n=!1}){const[r,i]=w.useState(n),[a,o]=w.useState(!!e),{get:s,set:l}=gi();w.useEffect(()=>{const u=pGn(e),f=s(lte);u!==f&&l(lte,u)},[e,s,l]);const c=w.useCallback(u=>{Dd(u,e)||(t(u),o(!!u))},[e,t]);return d.jsxs("div",{className:"flex flex-row gap-5 items-center",children:[d.jsx(Qc,{opened:r,onClose:()=>i(!1),content:d.jsx(AGn,{filter:e,setFilter:c,closeModal:()=>i(!1)}),modalSize:"xl"}),d.jsx(ba,{inline:!0,size:16,disabled:!a,children:d.jsx(qe,{variant:"outline",size:"icon",className:"size-7.5",onClick:()=>i(!0),children:d.jsx(Ul,{className:"size-5"})})})]})}const vGn=({period:e,transactionIDs:t,onCloseExtendedTransactions:n})=>{const[{data:r,fetching:i}]=rn({query:gFt,variables:{transactionIDs:t}}),a=w.useMemo(()=>r?.transactionsByIDs?t.map(o=>r?.transactionsByIDs.find(s=>s.id===o)).filter(Boolean):[],[r,t]);return d.jsx(ls,{className:"mt-5 w-full",children:i?d.jsx(Vc,{}):d.jsxs(d.Fragment,{children:[d.jsx(Uc,{children:d.jsxs(zc,{className:"flex justify-between",children:[d.jsxs("span",{children:[e," Transactions"]}),d.jsx(qe,{variant:"link",onClick:n,children:d.jsx(Gx,{className:"h-4 w-4"})})]})}),d.jsx(Gs,{children:d.jsx(aae,{transactionsProps:a})})]})})},$N={income:{label:"Income",color:"rgba(0, 255, 50, 0.5)"},expense:{label:"Expense",color:"rgba(255, 0, 0, 0.5)"},delta:{label:"Delta",color:"rgba(0, 30, 255, 0.5)"},cumulative:{label:"Cumulative Balance",color:"rgba(100, 0, 255, 0.5)"}};function yGn(e,t,n){switch(n){case Ad.MONTHLY:{const r=String(t).padStart(2,"0");return`${e}-${r}`}case Ad.BI_MONTHLY:{const r=t%2===0?t-1:t,i=String(r).padStart(2,"0");return`${e}-${i}`}case Ad.QUARTERLY:{const r=Math.ceil(t/3);return`${e}-Q${r}`}case Ad.SEMI_ANNUALLY:{const r=t>6?2:1;return`${e}-H${r}`}case Ad.ANNUALLY:return String(e)}}function bGn(e,t){switch(t){case Ad.MONTHLY:{const[n,r]=e.split("-");return`${r}/${n}`}case Ad.BI_MONTHLY:{const[n,r]=e.split("-"),i=Number(r)+1,a=String(i).padStart(2,"0");return`${r}-${a}/${n}`}case Ad.QUARTERLY:{const[n,r]=e.split("-");return`${r}, ${n}`}case Ad.SEMI_ANNUALLY:{const[n,r]=e.split("-");return`${r}, ${n}`}case Ad.ANNUALLY:return e}}const JBe=k3(Qt.Usd),xGn=()=>{const{setFiltersContext:e}=w.useContext(ra),{userContext:t}=w.useContext(pc),{get:n}=gi(),r=w.useMemo(()=>{const p={ownerId:t?.context.adminBusinessId,toDate:Rt(new Date,"yyyy-MM-dd"),period:Ad.MONTHLY,fromDate:Rt(uD(new Date,{years:1}),"yyyy-MM-dd"),excludedCounterparties:[],includedTags:[],excludedTags:[]},A=n(lte);if(A)try{return JSON.parse(decodeURIComponent(A))}catch(v){console.log("Error parsing balance report filters from URL:",v)}return p},[t?.context.adminBusinessId]),[i,a]=w.useState(r),[o,s]=w.useState(void 0),[l,c]=w.useState(Object.keys($N)),u=w.useMemo(()=>{const{ownerId:p,fromDate:A,toDate:v}=i;return{ownerId:p,fromDate:A,toDate:v}},[i]),[{data:f,fetching:h}]=rn({query:vFt,variables:u,pause:!i});w.useEffect(()=>{e(d.jsxs("div",{className:"flex flex-row gap-x-5",children:[d.jsx(gGn,{filter:i,setFilter:a,initiallyOpened:!i}),d.jsx(LWe,{options:Object.entries($N).map(([p,A])=>({label:A.label,value:p})),onValueChange:c,defaultValue:l,placeholder:"Select Data Sets",variant:"default",maxCount:1})]})),s(void 0)},[f,h,i,e,a,l]),w.useEffect(()=>{a(p=>({...p,ownerId:t?.context.adminBusinessId}))},[t]);const m=w.useMemo(()=>{if(!f?.transactionsForBalanceReport)return[];const p=new Map;f.transactionsForBalanceReport.map(v=>{if(v.counterparty?.id&&(!v.isFee&&t?.context.financialAccountsBusinessesIds?.includes(v.counterparty.id)||i.excludedCounterparties?.includes(v.counterparty.id))||i.includedTags.length>0&&(!v.charge?.tags||v.charge.tags.length===0||!v.charge.tags.some(k=>i.includedTags.includes(k.id)))||i.excludedTags.length>0&&v.charge?.tags.length&&v.charge.tags.some(k=>i.excludedTags.includes(k.id)))return;const y=yGn(v.year,v.month,i.period);p.has(y)||p.set(y,{income:0,expense:0,delta:0,transactions:[]});const x=p.get(y);v.amountUsd.raw>0?x.income+=v.amountUsd.raw:x.expense+=v.amountUsd.raw,x.delta+=v.amountUsd.raw,x.transactions.push(v)});let A=0;return Array.from(p.entries()).sort((v,y)=>v[0].localeCompare(y[0])).map(([v,y])=>(A+=y.delta,{period:v,income:y.income,expense:y.expense,delta:y.delta,cumulative:A,transactions:y.transactions.sort((x,k)=>Math.abs(k.amountUsd.raw)-Math.abs(x.amountUsd.raw))}))},[f,i.period,i.excludedCounterparties,t?.context.financialAccountsBusinessesIds,i.includedTags,i.excludedTags]);return d.jsx(Pa,{title:"Balance Report",description:"Accounts periodical balance",children:h?d.jsx(Vc,{}):d.jsxs(d.Fragment,{children:[d.jsxs(ls,{className:"w-full",children:[d.jsx(Uc,{children:d.jsx(XY,{children:"Click specific period to expand it's transactions data"})}),d.jsx(Gs,{children:d.jsx(cGn,{config:$N,className:"h-150 w-full",children:d.jsxs(sGn,{accessibilityLayer:!0,data:m,onClick:p=>s(p.activeLabel),children:[d.jsx(Wat,{vertical:!1}),d.jsx(V8,{dataKey:"period",tickLine:!1,tickMargin:10,axisLine:!1,tickFormatter:p=>bGn(p,i.period)}),d.jsx(dGn,{content:d.jsx(fGn,{formatter:(p,A,v,y)=>{const x=`bg-[var(--color-${A})]`;return y<2?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:`${x} h-2.5 w-2.5 shrink-0 rounded-[2px]`}),$N[A]?.label||A,d.jsx("div",{className:"ml-auto flex items-baseline gap-0.5 font-mono font-medium tabular-nums text-foreground",children:JBe.format(Number(p))})]}):d.jsxs("div",{className:"mt-1.5 flex basis-full items-center border-t pt-1.5 text-xs font-medium text-foreground",children:[d.jsx("div",{className:`h-2.5 w-2.5 shrink-0 rounded-[2px] mr-2 ${x}`}),$N[A]?.label||A,d.jsx("div",{className:"ml-auto flex items-baseline gap-0.5 font-mono font-medium tabular-nums text-foreground",children:JBe.format(Number(p))})]})}})}),d.jsx(hGn,{content:d.jsx(mGn,{})}),l.includes("income")&&d.jsx(pp,{dataKey:"income",fill:"var(--color-income)",radius:4}),l.includes("expense")&&d.jsx(pp,{dataKey:"expense",fill:"var(--color-expense)",radius:4}),l.includes("delta")&&d.jsx(pp,{dataKey:"delta",fill:"var(--color-delta)",radius:4}),l.includes("cumulative")&&d.jsx(pp,{dataKey:"cumulative",fill:"var(--color-cumulative)",radius:4})]})})})]}),o&&d.jsx(vGn,{period:o,onCloseExtendedTransactions:()=>s(void 0),transactionIDs:m.find(p=>p.period===o)?.transactions.map(p=>p.id)??[]})]})})},wGn=({record:e})=>{const t=$t(T3e,e);return d.jsxs(Tr,{children:[d.jsx(Mt,{children:e.description}),d.jsx(Mt,{children:Rt(new Date(e.purchaseDate),"dd/MM/yyyy")}),d.jsx(Mt,{children:e.activationDate?Rt(new Date(e.activationDate),"dd/MM/yyyy"):void 0}),d.jsx(Mt,{children:t.originalCost?ri(t.originalCost,0):void 0}),d.jsx(Mt,{children:t.reportYearDelta?ri(t.reportYearDelta,0):void 0}),d.jsx(Mt,{children:ri(t.totalDepreciableCosts,0)}),d.jsxs(Mt,{children:[ri(e.statutoryDepreciationRate,0),"%"]}),d.jsx(Mt,{children:e.claimedDepreciationRate?`${ri(e.claimedDepreciationRate,1)}%`:"-"}),d.jsx(Mt,{children:t.reportYearClaimedDepreciation?ri(t.reportYearClaimedDepreciation,0):"-"}),d.jsx(Mt,{children:t.pastYearsAccumulatedDepreciation?ri(t.pastYearsAccumulatedDepreciation,0):"-"}),d.jsx(Mt,{children:t.totalDepreciation?ri(t.totalDepreciation,0):"-"}),d.jsx(Mt,{children:t.netValue?ri(t.netValue,0):"-"})]})};function kGn(e){return!e||os(e)?null:encodeURIComponent(JSON.stringify(e))}const cte="depreciationReportFilters";function SGn({filter:e,setFilter:t,close:n}){const r=fr({defaultValues:{...e}}),{control:i,handleSubmit:a}=r,{selectableFinancialEntities:o,fetching:s}=Bg(),l=c=>{t({...c,year:Number(c.year)}),n()};return d.jsx(oi,{...r,children:d.jsxs("form",{onSubmit:a(l),className:"space-y-4",children:[d.jsx(en,{name:"year",control:i,rules:{required:"Year is required",validate:c=>{const u=Number(c);return Number.isNaN(u)||u<2e3||u>2100?"Invalid year":!0}},render:({field:c})=>d.jsxs(tn,{children:[d.jsx(gn,{children:"Year"}),d.jsx(fn,{children:d.jsx(Fy,{...c,hideControls:!0,decimalScale:0})}),d.jsx(Tn,{})]})}),d.jsx(en,{name:"financialEntityId",defaultValue:e?.financialEntityId,control:i,render:({field:c})=>d.jsxs(tn,{children:[d.jsx(gn,{children:"Owner"}),d.jsx(Ey,{...c,data:o,value:c.value??void 0,disabled:s,placeholder:"Select a financial entity",formPart:!0}),d.jsx(Tn,{})]})}),d.jsx(Hy,{children:d.jsx(qe,{type:"submit",disabled:s,children:"Filter"})})]})})}function CGn({filter:e,setFilter:t}){const[n,r]=w.useState(!1),{get:i,set:a}=gi();w.useEffect(()=>{const s=kGn(e),l=i(cte);s!==l&&a(cte,s)},[e,i,a]);const o=w.useCallback(s=>{Dd(s,e)||t(s)},[e,t]);return d.jsxs(Ra,{open:n,onOpenChange:r,children:[d.jsx(gc,{asChild:!0,children:d.jsx(qe,{variant:"outline",size:"icon",children:d.jsx(Ul,{size:20})})}),d.jsx($a,{className:"sm:max-w-[425px]",children:d.jsx(SGn,{filter:e,setFilter:o,close:()=>r(!1)})})]})}const eIe=({data:e,groupName:t})=>{const n=$t(T3e,e);return d.jsxs(Tr,{className:"font-bold border-b border-black",children:[d.jsx(Mt,{children:t?"Group Total":"Overall Total"}),d.jsx(Mt,{colSpan:2,children:t}),d.jsx(Mt,{children:n.originalCost?ri(n.originalCost,0):void 0}),d.jsx(Mt,{children:n.reportYearDelta?ri(n.reportYearDelta,0):void 0}),d.jsx(Mt,{children:n.totalDepreciableCosts?ri(n.totalDepreciableCosts,0):void 0}),d.jsx(Mt,{}),d.jsx(Mt,{}),d.jsx(Mt,{children:n.reportYearClaimedDepreciation?ri(n.reportYearClaimedDepreciation,0):void 0}),d.jsx(Mt,{children:n.pastYearsAccumulatedDepreciation?ri(n.pastYearsAccumulatedDepreciation,0):void 0}),d.jsx(Mt,{children:n.totalDepreciation?ri(n.totalDepreciation,0):void 0}),d.jsx(Mt,{children:n.netValue?ri(n.netValue,0):void 0})]})},_Gn=()=>{const{setFiltersContext:e}=w.useContext(ra),{userContext:t}=w.useContext(pc),{get:n}=gi(),r=w.useMemo(()=>{const c={financialEntityId:t?.context.adminBusinessId,year:new Date().getFullYear()},u=n(cte);if(u)try{return JSON.parse(decodeURIComponent(u))}catch(f){console.error("Failed to parse depreciation report filters from URL",f)}return c},[t?.context.adminBusinessId]),[i,a]=w.useState(r),[{data:o,fetching:s}]=rn({query:yFt,variables:{filters:i}});w.useEffect(()=>{e(d.jsx("div",{className:"flex flex-row gap-x-5",children:d.jsx(CGn,{filter:i,setFilter:a})}))},[i,e,a]);const l=w.useMemo(()=>`Depreciation Report for ${i.year}`,[i.year]);return d.jsx(Pa,{title:"Depreciation Report",description:l,children:s?d.jsx(Vc,{}):d.jsxs(Iu,{children:[d.jsxs(ju,{children:[d.jsxs(Tr,{className:"font-bold text-xl",children:[d.jsx(Kr,{colSpan:6,className:"text-center border-x",children:"List of Assets and Costs"}),d.jsx(Kr,{colSpan:5,className:"text-center border-x",children:"Depreciation"}),d.jsx(Kr,{className:"text-center border-x",children:"Remaining"})]}),d.jsxs(Tr,{className:"border-b border-black",children:[d.jsx(Kr,{className:"whitespace-normal",children:"Assets List and Descriptions"}),d.jsx(Kr,{className:"whitespace-normal",children:"Date of Purchase"}),d.jsx(Kr,{className:"whitespace-normal",children:"Activation Date"}),d.jsx(Kr,{className:"whitespace-normal",children:"Original Cost"}),d.jsx(Kr,{className:"whitespace-normal",children:"Changes During the Year"}),d.jsx(Kr,{className:"whitespace-normal",children:"Total Depreciable Assets"}),d.jsx(Kr,{className:"whitespace-normal",children:"Statutory Depreciation Rate"}),d.jsx(Kr,{className:"whitespace-normal",children:"Claimed Depreciation Rate"}),d.jsx(Kr,{className:"whitespace-normal",children:"Depreciation Claimed This Year"}),d.jsx(Kr,{className:"whitespace-normal",children:"Previous Tax Years Accumulated Depreciation"}),d.jsx(Kr,{className:"whitespace-normal",children:"Total Depreciation"}),d.jsx(Kr,{className:"whitespace-normal",children:"Net Book Value"})]})]}),d.jsx(Pu,{children:o?.depreciationReport&&d.jsxs(d.Fragment,{children:[o.depreciationReport.categories.map((c,u)=>d.jsxs(w.Fragment,{children:[d.jsxs(Tr,{className:"font-bold",children:[d.jsx(Mt,{children:`Category ${u+1}`}),d.jsx(Mt,{colSpan:2,children:c.category.name}),d.jsx(Mt,{colSpan:3}),d.jsxs(Mt,{children:[ri(c.category.percentage,0),"%"]}),d.jsx(Mt,{colSpan:5})]}),c.records.sort((f,h)=>f.purchaseDate.localeCompare(h.purchaseDate)).map(f=>d.jsx(wGn,{record:f},f.id)),d.jsx(eIe,{data:c.summary,groupName:c.category.name})]},c.id)),d.jsx(eIe,{data:o.depreciationReport.summary})]})})]})})},BI=["2020","2021","2022","2023"];function NGn({selectedBusiness:e,setSelectedBusiness:t,selectedYear:n,setSelectedYear:r,referenceYear:i,setReferenceYear:a}){const[o,s]=w.useState(!n||!e),{selectableBusinesses:l,fetching:c}=Bu(),u=w.useMemo(()=>e?l.find(h=>h.value===e)?.label??"":"",[l,e]);return d.jsxs(Ra,{open:o,onOpenChange:s,children:[d.jsx(gc,{asChild:!0,children:d.jsxs(qe,{variant:"outline",className:"flex items-center gap-2",children:[d.jsx(Ul,{className:"h-4 w-4"}),"מסננים",d.jsxs("span",{className:"text-xs bg-blue-100 text-blue-800 px-2 py-0.5 rounded-full",children:[u," • ",n]})]})}),d.jsxs($a,{className:"sm:max-w-md",dir:"rtl",children:[d.jsx(fs,{children:d.jsxs(hs,{className:"flex items-center gap-2",children:[d.jsx(Ul,{className:"h-5 w-5"}),"מסנני דוח"]})}),d.jsxs("div",{className:"space-y-6 py-4",children:[d.jsxs("div",{className:"space-y-2",children:[d.jsxs(Mn,{htmlFor:"business-select",className:"flex items-center gap-2",children:[d.jsx(o5t,{className:"h-4 w-4"}),"בחירת עסק"]}),d.jsx(Ey,{onChange:f=>t(f??void 0),data:l,value:e,disabled:c,placeholder:"Scroll to see all options",triggerProps:{className:"w-full"}})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs(Mn,{htmlFor:"year-select",className:"flex items-center gap-2",children:[d.jsx(iS,{className:"h-4 w-4"}),"שנת דיווח"]}),d.jsxs(Oo,{value:n,onValueChange:r,children:[d.jsx(Io,{id:"year-select",children:d.jsx(Bo,{})}),d.jsx(jo,{children:BI.map(f=>d.jsx(eo,{value:f,children:f},f))})]}),d.jsxs("p",{className:"text-xs text-gray-500",children:["זמינות נתונים: ",BI.join(", ")]})]}),d.jsxs("div",{className:"space-y-2",children:[d.jsxs(Mn,{htmlFor:"reference-year-select",className:"flex items-center gap-2",children:[d.jsx(iS,{className:"h-4 w-4"}),"שנת השוואה"]}),d.jsxs(Oo,{value:i,onValueChange:f=>a(f==="none"?void 0:f),children:[d.jsx(Io,{id:"reference-year-select",children:d.jsx(Bo,{})}),d.jsxs(jo,{children:[d.jsx(eo,{value:"none",children:"ללא"},"none"),BI.map(f=>d.jsx(eo,{value:f,children:f},f))]})]}),d.jsxs("p",{className:"text-xs text-gray-500",children:["זמינות נתונים: ",BI.join(", ")]})]}),d.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[d.jsx(qe,{variant:"outline",onClick:()=>s(!1),children:"ביטול"}),d.jsx(qe,{onClick:()=>s(!1),children:"אישור"})]})]})]})]})}const fo=({label:e,value:t,code:n,referenceValue:r,showEmptyFields:i,showChange:a=!1})=>{const o=u=>i?!0:!s(u),s=u=>!u||u.trim()===""||u==="0"||u==="0.00",l=(u,f)=>{if(!f)return null;const h=v=>Number.parseFloat(v.replace(/[,\s₪]/g,""))||0,m=h(u),p=h(f);return p===0?null:(m-p)/p*100};if(!o(t))return null;const c=a?l(t,r):null;return d.jsxs("div",{className:"flex justify-between items-center py-2 border-b border-gray-200",dir:"rtl",children:[d.jsxs("span",{className:"text-sm text-gray-600",children:[e," ",n&&`(${n})`]}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("span",{className:`font-medium ${s(t)?"text-gray-400":""}`,children:s(t)?"0":t}),c!==null&&d.jsxs("span",{className:`text-xs px-1 py-0.5 rounded ${c>0?"text-green-700 bg-green-100":c<0?"text-red-700 bg-red-100":"text-gray-700 bg-gray-100"}`,children:[c>0?"+":"",c.toFixed(1),"%"]})]})]})},Jo=({codes:e,referenceCodes:t,code:n,showEmptyFields:r})=>{const{value:i,label:a}=w.useMemo(()=>{const s=e.find(l=>l.code===n);return{value:s?.amount||0,label:s?.label||"לא זוהה קוד"}},[e,n]),o=w.useMemo(()=>t?.find(s=>s.code===n)?.amount.toString()||"",[t,n]);return d.jsx(fo,{label:a,value:ri(i,0),code:String(n),showChange:!0,showEmptyFields:r,referenceValue:o})},EGn=[{title:"מזומנים ושווי מזומנים",codes:[7110,7120,7150],sumCode:7100},{title:"ניירות ערך",codes:[7215,7225,7230,7290,7295],sumCode:7200},{title:"לקוחות",codes:[7310,7320,7330,7350,7360,7380,7390],sumCode:7300},{title:"חייבים ויתרות חובה",codes:[7410,7420,7430,7440,7450,7461,7462,7470,7490],sumCode:7400},{title:"מסים נדחים לזמן קצר",codes:[7610,7620,7690],sumCode:7600},{title:"הלוואות לזמן קצר",codes:[7711,7712,7720],sumCode:7700},{title:"מלאי",codes:[7805,7810,7815,7820,7825,7830,7840,7850,7860,7870,7890],sumCode:7800}],FGn=[{title:"רכוש קבוע",codes:[8010,8020,8025,8030,8040,8050,8060,8080,8090,8095,8100,8105,8110,8120,8130,8140,8150,8160,8170,8180,8190],sumCode:8e3},{title:"נכסים לא שוטפים מוחזקים למכירה",codes:[8710],sumCode:8700},{title:"הוצאות מראש לזמן ארוך",codes:[8210,8220,8290],sumCode:8200},{title:"השקעות בחברות מוחזקות כלולות ומאוחדות",codes:[8315,8325,8335,8340,8350],sumCode:8300},{title:'השקעות בחברות אחרות כולל ני"ע סחירים מוחזקים לזמן ארוך',codes:[8410,8420,8440,8450,8460,8490],sumCode:8400},{title:"מסים נדחים לזמן ארוך",codes:[8510,8520,8590],sumCode:8500},{title:"הוצאות נדחות ורכוש אחר",codes:[8610,8620,8630,8640,8690],sumCode:8600}],DGn=[{title:"בנקים והלואות לזמן קצר",codes:[9110,9120,9130,9140,9151,9152,9190],sumCode:9100},{title:"ספקים ונותני שירותים",codes:[9210,9220,9230,9290],sumCode:9200},{title:"זכאים ויתרות זכות",codes:[9310,9320,9330,9340,9350,9360,9370,9410,9420,9431,9432,9435,9440,9450,9460,9470,9480,9490],sumCode:9400},{title:"עתודה למסים נדחים לזמן קצר",codes:[9510,9520,9530],sumCode:9500}],TGn=[{title:"התחייבויות לזמן ארוך",codes:[9605,9610,9620,9631,9632,9640,9650,9660,9670,9690],sumCode:9600},{title:"התחייבויות בשל סיום יחסי עובד-מעביד",codes:[9710,9720,9790],sumCode:9700},{title:"עתודה למסים נדחים לזמן ארוך",codes:[9810,9820,9890],sumCode:9800}],OGn=[{title:"הון עצמי",codes:[9910,9920,9930,9940,9950,9960,9980],sumCode:9900}];function BGn({data:e,referenceData:t,showEmptyFields:n=!1}){const i=$t(Dge,e).balanceSheet||[],o=$t(Dge,t)?.balanceSheet||[];return d.jsx(pS,{value:"balanceSheet",className:"border rounded-md p-4",children:d.jsxs("div",{className:"space-y-6",dir:"rtl",children:[d.jsx("h3",{className:"text-lg font-bold border-b pb-2",children:"נתוני המאזן"}),d.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[d.jsxs("div",{className:"space-y-4",children:[d.jsx("h4",{className:"text-lg font-bold text-blue-800 border-b pb-2",children:"נכסים"}),d.jsx("div",{className:"bg-blue-100 p-4 rounded-md border-2 border-blue-300",children:d.jsx("h5",{className:"font-bold",children:"רכוש שוטף"})}),EGn.map(s=>d.jsxs("div",{className:"bg-blue-50 p-4 rounded-md",children:[d.jsx("h6",{className:"font-bold mb-3",children:s.title}),d.jsxs("div",{className:"space-y-2",children:[s.codes.map(l=>d.jsx(Jo,{codes:i,referenceCodes:o,code:l,showEmptyFields:n},l)),d.jsx("div",{className:"border-2 rounded-md border-gray-300",children:d.jsx(Jo,{codes:i,referenceCodes:o,code:s.sumCode,showEmptyFields:n})})]})]},s.title)),d.jsx("div",{className:"bg-blue-100 p-4 rounded-md border-2 border-blue-300",children:d.jsx(Jo,{codes:i,code:7e3,showEmptyFields:n})}),FGn.map(s=>d.jsxs("div",{className:"bg-blue-50 p-4 rounded-md",children:[d.jsx("h6",{className:"font-bold mb-3",children:s.title}),d.jsxs("div",{className:"space-y-2",children:[s.codes.map(l=>d.jsx(Jo,{codes:i,referenceCodes:o,code:l,showEmptyFields:n},l)),d.jsx("div",{className:"border-2 rounded-md border-gray-300",children:d.jsx(Jo,{codes:i,referenceCodes:o,code:s.sumCode,showEmptyFields:n})})]})]},s.title)),d.jsx("div",{className:"bg-blue-100 p-4 rounded-md border-2 border-blue-300",children:d.jsx(Jo,{codes:i,code:8888,showEmptyFields:n})})]}),d.jsxs("div",{className:"space-y-4",children:[d.jsx("h4",{className:"text-lg font-bold text-red-800 border-b pb-2",children:"התחייבויות והון"}),d.jsx("div",{className:"bg-red-100 p-4 rounded-md border-2 border-red-300",children:d.jsx("h5",{className:"font-bold",children:"התחייבויות שוטפות"})}),DGn.map(s=>d.jsxs("div",{className:"bg-red-50 p-4 rounded-md",children:[d.jsx("h6",{className:"font-bold mb-3",children:s.title}),d.jsxs("div",{className:"space-y-2",children:[s.codes.map(l=>d.jsx(Jo,{codes:i,referenceCodes:o,code:l,showEmptyFields:n},l)),d.jsx("div",{className:"border-2 rounded-md border-gray-300",children:d.jsx(Jo,{codes:i,referenceCodes:o,code:s.sumCode,showEmptyFields:n})})]})]},s.title)),d.jsx("div",{className:"bg-red-100 p-4 rounded-md border-2 border-red-300",children:d.jsx(Jo,{codes:i,code:9e3,showEmptyFields:n})}),TGn.map(s=>d.jsxs("div",{className:"bg-red-50 p-4 rounded-md",children:[d.jsx("h6",{className:"font-bold mb-3",children:s.title}),d.jsxs("div",{className:"space-y-2",children:[s.codes.map(l=>d.jsx(Jo,{codes:i,referenceCodes:o,code:l,showEmptyFields:n},l)),d.jsx("div",{className:"border-2 rounded-md border-gray-300",children:d.jsx(Jo,{codes:i,referenceCodes:o,code:s.sumCode,showEmptyFields:n})})]})]},s.title)),OGn.map(s=>d.jsxs("div",{className:"bg-green-50 p-4 rounded-md",children:[d.jsx("h5",{className:"font-bold mb-3",children:s.title}),d.jsx("div",{className:"space-y-2",children:s.codes.map(l=>d.jsx(Jo,{codes:i,referenceCodes:o,code:l,showEmptyFields:n},l))})]},s.title)),d.jsx("div",{className:"bg-red-100 p-4 rounded-md border-2 border-red-300",children:d.jsx(Jo,{codes:i,code:9999,showEmptyFields:n})})]})]})]})})}const IGn=e=>{switch(e){case"1":return"תעשייתי";case"2":return"מסחרי";case"3":return"נותני שירותים";case"99":return"הדיווח כולל יותר מעסק אחד";default:return""}},jGn=e=>{switch(e){case tj.Cash:return"מזומן";case tj.Accrual:return"מצטבר";case tj.DollarRegulations:return"לפי תקנות דולריות";default:return""}},PGn=e=>{switch(e){case Cge.Shekels:return"שקלים";case Cge.Dollars:return"דולרים";default:return""}},MGn=e=>{switch(e){case kge.DoubleEntry:return"כפולה";case kge.SingleEntry:return"חד-צידית";default:return""}},RGn=e=>{switch(e){case Sge.Computerized:return"ממוחשב";case Sge.Manual:return"ידני";default:return""}},$Gn=e=>{switch(e){case A5.Option_1:return"חלופה 1";case A5.Option_2Adjustments:return"התאמות חשבונאיות למי שיישם את חלופה 2 בהוראת ביצוע 7/2010";case A5.Option_3Adjustments:return"התאמות חשבונאיות למי שיישם את חלופה 3 בהוראת ביצוע 7/2010";case A5.None:return"ללא חלופה";default:return""}},LGn=e=>{switch(e){case V0.Unqualified:return"נוסח אחיד (בלתי מסוייג)";case V0.UnqualifiedWithGoingConcern:return"בנוסח אחיד עם הפניית תשומת לב להערת עסק חי";case V0.UnqualifiedWithOtherEmphases:return"בנוסח אחיד עם הפניות תשומת לב אחרת";case V0.Qualified:return"הסתייגות";case V0.Adverse:return"שלילית";case V0.Disclaimer:return"המנעות";case V0.None:return"אין חוות דעת";default:return""}},II=e=>e==null?"":e?"כן":"לא";function UGn({data:e,businessInfo:t}){const{header:n}=$t(AEt,e),r=$t(pEt,t);return d.jsx(pS,{value:"header",className:"border rounded-md p-4",children:d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",dir:"rtl",children:[d.jsxs("div",{className:"space-y-4",children:[d.jsx("h3",{className:"text-lg font-bold border-b pb-2",children:"פרטים מזהים"}),d.jsx(fo,{label:"השם הרשום",value:r.name,showEmptyFields:!0}),d.jsx(fo,{label:"תיאור העיסוק המדווח",value:n.businessDescription??"",showEmptyFields:!0}),d.jsx(fo,{label:"מספר זהות",value:n.idNumber,showEmptyFields:!0}),d.jsx(fo,{label:"מספר תיק",value:n.taxFileNumber,showEmptyFields:!0}),d.jsx(fo,{label:'תיק מדווח למע"מ',value:n.vatFileNumber??"",showEmptyFields:!0}),d.jsx(fo,{label:"מספר תיק ניכויים",value:n.withholdingTaxFileNumber??"",showEmptyFields:!0})]}),d.jsxs("div",{className:"space-y-4",children:[d.jsx("h3",{className:"text-lg font-bold border-b pb-2",children:"פרטי העסק"}),d.jsx(fo,{value:IGn(n.businessType),label:"סוג העסק המדווח",showEmptyFields:!0}),d.jsx(fo,{label:"שיטת דיווח",value:jGn(n.reportingMethod),showEmptyFields:!0}),n.reportingMethod===tj.DollarRegulations&&d.jsx(fo,{label:"מטבע הסכומים",value:PGn(n.currencyType),showEmptyFields:!0}),d.jsx(fo,{label:"הסכום באלפים",value:II(n.amountsInThousands),showEmptyFields:!0}),d.jsx(fo,{label:"שיטת חשבונאות",value:MGn(n.accountingMethod),showEmptyFields:!0}),d.jsx(fo,{label:"הנהלת חשבונות",value:RGn(n.accountingSystem),showEmptyFields:!0}),d.jsx(fo,{label:"חייב ברישום תוכנה",value:II(!!n.softwareRegistrationNumber),showEmptyFields:!0}),n.softwareRegistrationNumber&&d.jsx(fo,{label:"מספר תעודת רישום",value:n.softwareRegistrationNumber,showEmptyFields:!0}),d.jsx(fo,{label:"דוח בגין שותפות",value:II(!!n.isPartnership),showEmptyFields:!0}),n.isPartnership&&d.jsxs(d.Fragment,{children:[d.jsx(fo,{label:"מספר שותפים",value:n.partnershipCount?.toString()??"",showEmptyFields:!0}),d.jsx(fo,{label:"חלקי ברווחי השותפות",value:`${n.partnershipProfitShare}%`,showEmptyFields:!0})]}),d.jsx(fo,{label:"יישום תקני חשבונאות (IFRS)",value:II(!!n.ifrsImplementationYear||!!n.ifrsReportingOption),showEmptyFields:!0}),(!!n.ifrsImplementationYear||!!n.ifrsReportingOption)&&d.jsxs(d.Fragment,{children:[d.jsx(fo,{label:"החל משנת המס",value:n.ifrsImplementationYear??"",showEmptyFields:!0}),d.jsx(fo,{label:"דווח בחלופה",value:$Gn(n.ifrsReportingOption),showEmptyFields:!0})]}),d.jsx(fo,{label:"מספר ענף כלכלי של המדווח",value:n.industryCode,showEmptyFields:!0}),d.jsx(fo,{label:"חוות דעת המבקר",value:LGn(n.auditOpinionType),showEmptyFields:!0})]})]})})}const zGn=[{title:"הכנסות ממכירות ומתן שירותים",color:"text-blue-700",codes:[1010,1015,1020,1025,1030,1040,1051,1052,1090],sumCode:1e3},{title:"עלות המכירות ומתן השירותים וביצוע עבודות",color:"text-purple-700",codes:[1306,1308,1307,1310,1320,1330,1340,1350,1360,1371,1372,1390,1400,1450],sumCode:1300},{title:"עלויות ייצור ועלויות אצל קבלן בונה",color:"text-rose-700",codes:[2005,2006,2011,2012,2015,2020,2025,2030,2035,2040,2045,2050,2060,2066,2067,2068,2070,2075,2080,2085,2090,2095],sumCode:2e3},{title:"הוצאות מחקר ופיתוח",color:"text-amber-700",codes:[2510,2520,2530,2540,2550,2560,2570,2590],sumCode:2500},{title:"הוצאות מכירה",color:"text-green-700",codes:[3011,3013,3012,3015,3020,3025,3030,3040,3045,3050,3060,3066,3067,3068,3070,3075,3080,3085,3090,3100,3120,3190],sumCode:3e3},{title:"הוצאות הנהלה וכלליות",color:"text-cyan-700",codes:[3511,3513,3512,3515,3520,3530,3535,3540,3545,3550,3560,3566,3567,3568,3570,3575,3580,3590,3595,3600,3610,3620,3625,3631,3632,3640,3650,3660,3665,3680,3685,3690],sumCode:3500},{title:"הוצאות מימון",color:"text-indigo-700",codes:[5010,5020,5025,5030,5040,5050,5051,5090],sumCode:5e3},{title:"הכנסות מימון",color:"text-fuchsia-700",codes:[5110,5121,5122,5130,5150,5160,5190],sumCode:5100},{title:"הכנסות אחרות",color:"text-red-700",codes:[5210,5220,5230,5236,5237,5240,5250,5260,5270,5290],sumCode:5200},{title:"הוצאות אחרות",color:"text-yellow-700",codes:[5310,5320,5330,5390],sumCode:5300}],HGn=[{title:"מסים על הכנסה",color:"text-sky-700",codes:[5610,5620,5630],sumCode:5600},{title:"ייעוד הרווחים",color:"text-violet-700",codes:[5710],sumCode:5700},{title:"רווח/הפסד אקויטי",color:"text-pink-700",codes:[5810],sumCode:5800}];function VGn({selectedYear:e,referenceYear:t,data:n,referenceData:r,showEmptyFields:i=!1}){const{profitAndLoss:a}=$t(Ege,n),s=$t(Ege,r)?.profitAndLoss||[];return d.jsx(pS,{value:"profitLoss",className:"border rounded-md p-4",children:d.jsxs("div",{className:"space-y-6",dir:"rtl",children:[d.jsxs("div",{className:"flex justify-between items-center",children:[d.jsx("h3",{className:"text-lg font-bold border-b pb-2",children:"נתוני רווח והפסד"}),t&&e!==t&&d.jsxs("span",{className:"text-sm text-blue-600 bg-blue-50 px-2 py-1 rounded",children:["מציג שינויים לעומת ",t]})]}),zGn.map(l=>d.jsxs("div",{className:"bg-gray-50 p-4 rounded-md",children:[d.jsx("h4",{className:`font-bold mb-4 ${l.color}`,children:l.title}),d.jsxs("div",{className:"space-y-2",children:[l.codes.map(c=>d.jsx(Jo,{codes:a,referenceCodes:s,code:c,showEmptyFields:i},c)),d.jsx("div",{className:"border-2 rounded-md border-gray-300",children:d.jsx(Jo,{codes:a,referenceCodes:s,code:l.sumCode,showEmptyFields:i})})]})]},l.title)),d.jsx("div",{className:"bg-emerald-50 p-4 rounded-md border-2 border-emerald-200",children:d.jsx(Jo,{codes:a,referenceCodes:s,code:6666,showEmptyFields:i})}),HGn.map(l=>d.jsxs("div",{className:"bg-gray-50 p-4 rounded-md",children:[d.jsx("h4",{className:`font-bold mb-4 ${l.color}`,children:l.title}),d.jsxs("div",{className:"space-y-2",children:[l.codes.map(c=>d.jsx(Jo,{codes:a,referenceCodes:s,code:c,showEmptyFields:i},c)),d.jsx("div",{className:"border-2 rounded-md border-gray-300",children:d.jsx(Jo,{codes:a,referenceCodes:s,code:l.sumCode,showEmptyFields:i})})]})]},l.title))]})})}const QGn=[{title:"התאמות חשבונאיות למי שיישם את חלופה 2 בהוראת ביצוע 7/2010 בנושא IFRS",color:"red",codes:[103,104]},{title:"התאמות נדרשות לצרכי מס (הוסף/הפחת)",color:"yellow",codes:[110,120,130,135,140,150,160,170,180,181,182,183,184,190,200,300,310,320,330,350,360],sumCode:370},{title:"התאמות חשבונאיות למי שיישם את חלופה 3 בהוראת ביצוע 7/2010 בנושא IFRS שלא מצאו את ביטויין בהתאמות הנדרשות לצרכי מס",color:"emerald",codes:[383],sumCode:400},{title:"יישום הוראות חוקי מס נוספים",color:"sky",codes:[430,480,490],sumCode:500},{title:"נתונים נוספים",color:"violet",codes:[510,520,530,540,550,570,575,580,585,590]},{title:"בשותפות",color:"pink",codes:[600]}],tIe={red:{header:"text-red-700",sum:"bg-red-50 border-red-200"},yellow:{header:"text-yellow-700",sum:"bg-yellow-50 border-yellow-200"},emerald:{header:"text-emerald-700",sum:"bg-emerald-50 border-emerald-200"},sky:{header:"text-sky-700",sum:"bg-sky-50 border-sky-200"},violet:{header:"text-violet-700",sum:"bg-violet-50 border-violet-200"},pink:{header:"text-pink-700",sum:"bg-pink-50 border-pink-200"}};function qGn({data:e,referenceData:t,showEmptyFields:n=!1}){const{taxAdjustment:r}=$t(Fge,e),a=$t(Fge,t)?.taxAdjustment||[];return d.jsx(pS,{value:"taxAdjustment",className:"border rounded-md p-4",children:d.jsxs("div",{className:"space-y-6",dir:"rtl",children:[d.jsx("h3",{className:"text-lg font-bold border-b pb-2",children:'נתוני דו"ח התאמה למס'}),d.jsx("div",{className:"bg-emerald-50 p-4 rounded-md border-2 border-emerald-200",children:d.jsx(Jo,{codes:r,referenceCodes:a,code:100,showEmptyFields:n})}),QGn.map(o=>{const{header:s,sum:l}=tIe[o.color]||tIe.red;return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"bg-gray-50 p-4 rounded-md",children:[d.jsx("h4",{className:"font-bold mb-4 "+s,children:o.title}),d.jsx("div",{className:"space-y-2",children:o.codes.map(c=>d.jsx(Jo,{codes:r,referenceCodes:a,code:c,showEmptyFields:n},c))})]}),o.sumCode&&d.jsx("div",{className:"p-4 rounded-md border-2 "+l,children:d.jsx(Jo,{codes:r,referenceCodes:a,code:o.sumCode,showEmptyFields:n})})]},o.title)})]})})}function GGn({data:e,referenceData:t,businessInfo:n,selectedYear:r,referenceYear:i}){const a=$t(Tge,e),o=$t(Tge,t),[s,l]=w.useState("header"),[c,u]=w.useState(!0);return d.jsxs("div",{className:"p-4 border-gray-300",dir:"rtl",children:[d.jsxs("div",{className:"flex justify-between items-center mb-4",children:[d.jsx("div",{className:"flex items-center gap-4",children:d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs(qe,{variant:c?"outline":"default",size:"sm",onClick:()=>u(!c),className:"flex items-center gap-2",children:[c?d.jsx(Y5t,{className:"h-4 w-4"}):d.jsx(Nne,{className:"h-4 w-4"}),c?"הסתר שדות ריקים":"הצג שדות ריקים"]}),d.jsx("span",{className:"text-sm text-gray-500",children:c?"מציג את כל השדות":"מציג רק שדות עם נתונים"})]})}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs(qe,{variant:"outline",className:"flex items-center gap-2",children:[d.jsx(_ne,{className:"h-4 w-4"}),"הורד"]}),d.jsxs(qe,{variant:"outline",className:"flex items-center gap-2",children:[d.jsx(lIt,{className:"h-4 w-4"}),"שמור"]})]})]}),d.jsxs(bYe,{value:s,onValueChange:l,className:"w-full",children:[d.jsxs(xYe,{className:"grid grid-cols-4 w-full",dir:"rtl",children:[d.jsx(sk,{value:"header",children:"פרטים מזהים"}),d.jsx(sk,{value:"profitLoss",children:"רווח והפסד"}),d.jsx(sk,{value:"taxAdjustment",children:"התאמה למס"}),d.jsx(sk,{value:"balanceSheet",children:"מאזן"})]}),d.jsx(UGn,{data:a,businessInfo:n}),d.jsx(VGn,{selectedYear:r,referenceYear:i,data:a,referenceData:o,showEmptyFields:c}),d.jsx(qGn,{data:a,referenceData:o,showEmptyFields:c}),d.jsx(BGn,{data:a,referenceData:o,showEmptyFields:c})]})]})}function WGn(){const{setFiltersContext:e}=w.useContext(ra),[t,n]=w.useState(void 0),[r,i]=w.useState(void 0),[a,o]=w.useState(void 0),[{data:s,fetching:l}]=rn({query:bFt,variables:{year:r?Number.parseInt(r,10):0,businessId:t},pause:!r||!t});return w.useEffect(()=>{e(d.jsx("div",{className:"flex flex-row gap-x-5",dir:"rtl",children:d.jsx(NGn,{selectedBusiness:t,setSelectedBusiness:n,selectedYear:r,setSelectedYear:i,referenceYear:a,setReferenceYear:o})}))},[e,t,r,a]),d.jsx("div",{className:"container mx-auto",dir:"rtl",children:d.jsxs(ls,{className:"border-2 border-gray-300",children:[d.jsx(Uc,{className:"bg-gray-100 border-b-2 border-gray-300 flex flex-row justify-between items-center",children:d.jsxs("div",{className:"text-center w-full",children:[d.jsx("h1",{className:"text-2xl font-bold",children:'נספח לטופס הדו"ח השנתי ליחיד ולחבר בני אדם'}),d.jsxs("h2",{className:"text-xl",children:["לשנת המס ",r]}),d.jsx("p",{className:"text-sm",children:'נתוני הדוחות הכספיים, מאזן, רווח והפסד ודו"ח ההתאמה למס'})]})}),d.jsx(Gs,{className:"p-0",children:d.jsx(KGn,{fetching:l,data:s,selectedBusiness:t,selectedYear:r,referenceYear:a})})]})})}function KGn({fetching:e,data:t,selectedBusiness:n,selectedYear:r,referenceYear:i}){if(e)return d.jsx("div",{className:"container mx-auto p-8 text-center",dir:"rtl",children:d.jsx("p",{className:"text-lg text-gray-600",children:"טוען נתונים..."})});if(!r||!n)return d.jsx("div",{className:"container mx-auto p-8 text-center",dir:"rtl",children:d.jsx("p",{className:"text-lg text-gray-600",children:"יש לבחור עסק ושנת דיווח"})});const a=t?.shaam6111.data;return a?d.jsx(GGn,{data:a,businessInfo:t.shaam6111.business,selectedBusiness:n,selectedYear:r,referenceYear:i}):d.jsx("div",{className:"container mx-auto p-8 text-center",dir:"rtl",children:d.jsx("p",{className:"text-lg text-gray-600",children:"אין נתונים זמינים עבור העסק והשנה שנבחרו"})})}const nIe=[{id:"key",accessorKey:"key",cell:({row:e})=>d.jsx(Mt,{children:e.original.key}),header:({column:e})=>d.jsxs(qe,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Key",d.jsx(cd,{})]})},{id:"name",accessorKey:"name",cell:({row:e})=>d.jsx(Mt,{children:e.original.name}),header:({column:e})=>d.jsxs(qe,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Name",d.jsx(cd,{})]})},{id:"defaultIrsCode",accessorKey:"defaultIrsCode",cell:({row:e})=>d.jsx(Mt,{className:"flex flex-wrap gap-1 p-1",children:e.original.defaultIrsCode&&d.jsx(qe,{variant:"outline",disabled:!0,className:"p-1 w-15",children:e.original.defaultIrsCode})}),header:"Default IRS Code"},{id:"edit",cell:({row:e})=>d.jsx(Pon,{sortCodeKey:e.original.key,onAdd:e.original.refetchSortCodes})}],YGn=()=>{const[{data:e,fetching:t,error:n},r]=rn({query:xFt}),{setFiltersContext:i}=w.useContext(ra),a=w.useMemo(()=>e?.allSortCodes?.map(l=>({...l,refetchSortCodes:r}))??[],[e?.allSortCodes,r]),o=im({data:a,columns:nIe,getCoreRowModel:rm(),getPaginationRowModel:BD(),getSortedRowModel:Fg(),initialState:{pagination:{pageSize:100}}}),s=o.getPageOptions();return w.useEffect(()=>{i(d.jsx("div",{className:"flex items-center justify-end gap-10 space-x-2 py-4",children:d.jsx(zL,{table:o})}))},[i,o,s]),w.useEffect(()=>{n&&(console.error("Error fetching sort codes",n),Qe.error("Error",{description:"Error fetching sort codes"}))},[n]),d.jsx(Pa,{title:`Sort Codes (${a.length})`,description:"All sort codes",headerActions:d.jsx(Gon,{onAdd:()=>r()}),children:t?d.jsx("div",{className:"flex flex-row justify-center",children:d.jsx(si,{className:"h-10 w-10 animate-spin mr-2"})}):d.jsx("div",{className:"flex flex-col gap-4 rounded-md border",children:d.jsxs(Iu,{children:[d.jsx(ju,{children:o.getHeaderGroups().map(l=>d.jsx(Tr,{children:l.headers.map(c=>d.jsx(Kr,{children:c.isPlaceholder?null:Ro(c.column.columnDef.header,c.getContext())},c.id))},l.id))}),d.jsx(Pu,{children:o.getRowModel().rows.length===0?d.jsx(Tr,{children:d.jsx(Mt,{colSpan:nIe.length,className:"text-center py-8",children:"No sort codes found"})}):o.getRowModel().rows.map(l=>d.jsx(Tr,{children:l.getVisibleCells().map(c=>d.jsx(Mt,{children:Ro(c.column.columnDef.cell,c.getContext())},c.id))},l.id))})]})})})},XGn="addTag",ZGn=()=>{const[{fetching:e},t]=Hn(TFt),n=w.useCallback(async r=>{const i=`Error adding new tag [${r.tagName}]`,a=`${XGn}-${r.tagName}`;Qe.loading("Adding tag",{id:a});try{const o=await t(r);Vn(o,i,a)&&Qe.success("Success",{id:a,description:`"${r.tagName}" tag was successfully added`})}catch(o){console.error(`${i}: ${o}`),Qe.error("Error",{id:a,description:i,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,addTag:n}},JGn="deleteTag",eWn=()=>{const[{fetching:e},t]=Hn(WFt),n=w.useCallback(async r=>{const i=`Error deleting new tag [${r.name}]`,a=`${JGn}-${r.tagId}`;Qe.loading(`Deleting tag [${r.name}]`,{id:a});try{const o=await t(r);Vn(o,i,a)&&Qe.success("Tag Deleted",{id:a,description:`[${r.name}] tag was successfully removed`})}catch(o){console.error(`${i}: ${o}`),Qe.error("Error",{id:a,description:i,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,deleteTag:n}},tWn=()=>{const{setFiltersContext:e}=w.useContext(ra),[t,n]=w.useState(""),[{data:r,fetching:i},a]=rn({query:wFt}),{addTag:o}=ZGn(),{deleteTag:s}=eWn();e(null);const l=CLe(r?.allTags??[]),c=w.useCallback(f=>{f.length>2&&o({tagName:f}).then(()=>{a()})},[o,a]),u=w.useCallback((f,h)=>{s({tagId:f,name:h}).then(()=>{a()})},[s,a]);return d.jsx(Pa,{title:"Tags",description:"Manage tags for your bookmarks.",children:i?d.jsx(si,{className:"h-10 w-10 animate-spin mr-2 self-center"}):d.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[l?.map(f=>d.jsxs("div",{className:"flex items-center gap-2 text-gray-600 mb-2",children:[d.jsxs("div",{className:"w-full mt-1 relative rounded-md shadow-xs",children:[f.namePath?.map((h,m)=>d.jsx("span",{className:"ms-2"},m)),f.name]}),d.jsx($on,{data:f}),d.jsx(qe,{variant:"ghost",size:"icon",className:"size-7.5",onClick:()=>u(f.id,f.name),children:d.jsx(Ly,{className:"size-5"})})]},f.id)),d.jsxs("div",{className:"flex justify-start items-center gap-2 text-gray-600 mb-2",children:[d.jsx(Cn,{className:"w-80",value:t,onChange:f=>n(f.currentTarget.value),placeholder:"Add new tag",required:!0}),d.jsx(qe,{variant:"ghost",size:"icon",className:"size-7.5",disabled:t.length<2,onClick:()=>c(t),children:d.jsx(yp,{className:"size-5"})})]})]})})},nWn="updateTaxCategory",rWn=()=>{const[{fetching:e},t]=Hn(IDt),n=w.useCallback(async r=>{const i="Error updating tax category",a=`${nWn}-${r.taxCategoryId}`;Qe.loading("Uploading Tax Category",{id:a});try{const o=await t(r),s=Vn(o,i,a,"updateTaxCategory");if(s)return Qe.success("Success",{id:a,description:`${s.updateTaxCategory.name} was updated`}),s.updateTaxCategory}catch(o){console.error(`${i}: ${o}`),Qe.error("Error",{id:a,description:i,duration:1e5,closeButton:!0})}},[t]);return{fetching:e,updateTaxCategory:n}};function iWn({taxCategoryId:e,onAdd:t}){const[n,r]=w.useState(!1);return d.jsxs(Ra,{open:n,onOpenChange:r,children:[d.jsx(gc,{asChild:!0,children:d.jsx(qe,{variant:"outline",size:"icon",children:d.jsx(Ou,{})})}),d.jsxs($a,{className:"w-[400px] max-w-screen-md",children:[d.jsx(fs,{children:d.jsx(hs,{children:"Edit Tax Category"})}),d.jsx(aWn,{taxCategoryId:e,close:()=>r(!1),onAdd:t})]})]})}function aWn({taxCategoryId:e,close:t,onAdd:n}){const[{data:r,fetching:i}]=rn({query:QEt,variables:{id:e}}),a=r?.taxCategory;return!a&&!i&&Qe.error("Error",{description:"Couldn'nt find tax category"}),i?d.jsx(si,{className:"h-10 w-10 animate-spin"}):d.jsx(oWn,{taxCategory:a,close:t,onAdd:n})}function oWn({taxCategory:e,close:t,onAdd:n}){const r=fr({defaultValues:{sortCode:e.sortCode?.key,name:e.name,irsCode:e.irsCode}}),{handleSubmit:i}=r,[a,o]=w.useState(!1),{updateTaxCategory:s,fetching:l}=rWn(),c=u=>{u.sortCode&&=parseInt(u.sortCode.toString()),s({fields:u,taxCategoryId:e.id}).then(f=>{f?.id&&(n?.(f.id),t())})};return d.jsx(oi,{...r,children:d.jsxs("form",{onSubmit:i(c),children:[d.jsx("div",{className:"flex flex-col gap-4 my-4",children:d.jsx(JWe,{isInsert:!1,formManager:r,setFetching:o})}),d.jsx("div",{className:"flex justify-end mt-4",children:d.jsx(qe,{type:"submit",disabled:l||a,children:"Update"})})]})})}const sWn=({data:e})=>d.jsx("td",{children:e.name}),lWn=({data:e})=>d.jsx("td",{children:e.sortCode?d.jsxs("span",{children:[e.sortCode?.name," (",e.sortCode?.id,")"]}):"N/A"}),rIe=[{id:"name",accessorKey:"name",cell:({row:e})=>d.jsx(sWn,{data:e.original}),header:({column:e})=>d.jsxs(qe,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Name",d.jsx(cd,{})]})},{id:"sortCode",accessorKey:"sortCode.key",cell:({row:e})=>d.jsx(lWn,{data:e.original}),header:({column:e})=>d.jsxs(qe,{variant:"ghost",onClick:()=>e.toggleSorting(e.getIsSorted()==="asc"),children:["Sort Code",d.jsx(cd,{})]})},{id:"edit",cell:({row:e})=>d.jsx(iWn,{taxCategoryId:e.original.id})}],cWn=()=>{const[{data:e,fetching:t,error:n},r]=rn({query:kFt}),{setFiltersContext:i}=w.useContext(ra),a=e?.taxCategories??[],o=im({data:a,columns:rIe,getCoreRowModel:rm(),getPaginationRowModel:BD(),getSortedRowModel:Fg(),initialState:{pagination:{pageSize:30}}}),s=o.getPageOptions();return w.useEffect(()=>{i(d.jsx("div",{className:"flex items-center justify-end gap-10 space-x-2 py-4",children:d.jsx("div",{className:"flex items-center justify-between px-2",children:d.jsx(zL,{table:o})})}))},[i,o,s]),w.useEffect(()=>{n&&Qe.error("Error",{description:"Error fetching tax categories"})},[n]),d.jsx(Pa,{title:`Tax Categories (${a.length})`,description:"All tax categories",headerActions:d.jsx(Xon,{onAdd:()=>r()}),children:t?d.jsx("div",{className:"flex flex-row justify-center",children:d.jsx(si,{className:"h-10 w-10 animate-spin mr-2"})}):d.jsx("div",{className:"flex flex-col gap-4 rounded-md border",children:d.jsxs(Iu,{children:[d.jsx(ju,{children:o.getHeaderGroups().map(l=>d.jsx(Tr,{children:l.headers.map(c=>d.jsx(Kr,{children:c.isPlaceholder?null:Ro(c.column.columnDef.header,c.getContext())},c.id))},l.id))}),d.jsx(Pu,{children:o.getRowModel().rows.length===0?d.jsx(Tr,{children:d.jsx(Mt,{colSpan:rIe.length,className:"text-center py-8",children:"No tax categories found"})}):o.getRowModel().rows.map(l=>d.jsx(Tr,{children:l.getVisibleCells().map(c=>d.jsx(Mt,{children:Ro(c.column.columnDef.cell,c.getContext())},c.id))},l.id))})]})})})};function uWn(){const[e,t]=w.useState(null);return d.jsx(ra.Provider,{value:{filtersContext:e,setFiltersContext:t},children:d.jsx(XFn,{filtersContext:e,children:d.jsxs(MIe,{children:[d.jsx(Lr,{path:"/",element:d.jsx(iFe,{})}),d.jsx(Lr,{path:"charges",element:d.jsx(iFe,{})}),d.jsx(Lr,{path:"missing-info-charges",element:d.jsx(CRn,{})}),d.jsx(Lr,{path:"charges-ledger-validation",element:d.jsx(bdn,{})}),d.jsx(Lr,{path:"charges/:chargeId",element:d.jsx(X9t,{})}),d.jsx(Lr,{path:"businesses",element:d.jsx(Adn,{})}),d.jsx(Lr,{path:"business-trips",element:d.jsx(ddn,{})}),d.jsx(Lr,{path:"business-trips/:businessTripId",element:d.jsx(cdn,{})}),d.jsx(Lr,{path:"business-transactions",element:d.jsx(lUt,{})}),d.jsx(Lr,{path:"business-transactions/:businessId",element:d.jsx(Ycn,{})}),d.jsxs(Lr,{path:"charts",children:[d.jsx(Lr,{path:"",element:d.jsx(zgn,{})}),d.jsx(Lr,{path:"monthly-income-expense",element:d.jsx(a2n,{})})]}),d.jsxs(Lr,{path:"documents",children:[d.jsx(Lr,{path:"",element:d.jsx(ERn,{})}),d.jsx(Lr,{path:"issue-documents",element:d.jsx(PRn,{})}),d.jsx(Lr,{path:"issue-document",element:d.jsx(FRn,{})})]}),d.jsx(Lr,{path:"accountant-approvals",element:d.jsx(ZFn,{})}),d.jsxs(Lr,{path:"reports",children:[d.jsx(Lr,{path:"trial-balance",element:d.jsx(wMn,{})}),d.jsx(Lr,{path:"conto",element:d.jsx(aMn,{})}),d.jsx(Lr,{path:"vat-monthly",element:d.jsx(oRn,{})}),d.jsx(Lr,{path:"profit-and-loss",element:d.jsx(JEe,{})}),d.jsx(Lr,{path:"profit-and-loss/:year",element:d.jsx(JEe,{})}),d.jsx(Lr,{path:"tax",element:d.jsx(eFe,{})}),d.jsx(Lr,{path:"tax/:year",element:d.jsx(eFe,{})}),d.jsx(Lr,{path:"depreciation",element:d.jsx(_Gn,{})}),d.jsx(Lr,{path:"shaam6111",element:d.jsx(WGn,{})}),d.jsx(Lr,{path:"yearly-ledger",element:d.jsx(uRn,{})}),d.jsx(Lr,{path:"corporate-tax-ruling-compliance",element:d.jsx(ZEe,{})}),d.jsx(Lr,{path:"corporate-tax-ruling-compliance/:year",element:d.jsx(ZEe,{})}),d.jsx(Lr,{path:"balance",element:d.jsx(xGn,{})}),d.jsx(Lr,{path:"validate-reports",element:d.jsx(KMn,{})})]}),d.jsx(Lr,{path:"salaries",element:d.jsx(SRn,{})}),d.jsx(Lr,{path:"tags",element:d.jsx(tWn,{})}),d.jsx(Lr,{path:"tax-categories",element:d.jsx(cWn,{})}),d.jsx(Lr,{path:"sort-codes",element:d.jsx(YGn,{})}),d.jsx(Lr,{path:"*",element:d.jsx(MRn,{})})]})})})}var q8=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},dWn={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},fWn=class{#e=dWn;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},ute=new fWn;function hWn(e){setTimeout(e,0)}var G8=typeof window>"u"||"Deno"in globalThis;function _h(){}function mWn(e,t){return typeof e=="function"?e(t):e}function pWn(e){return typeof e=="number"&&e>=0&&e!==1/0}function AWn(e,t){return Math.max(e+(t||0)-Date.now(),0)}function dte(e,t){return typeof e=="function"?e(t):e}function gWn(e,t){return typeof e=="function"?e(t):e}function iIe(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==Lce(o,t.options))return!1}else if(!WF(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function aIe(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(GF(t.options.mutationKey)!==GF(a))return!1}else if(!WF(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Lce(e,t){return(t?.queryKeyHashFn||GF)(e)}function GF(e){return JSON.stringify(e,(t,n)=>fte(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function WF(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>WF(e[n],t[n])):!1}var vWn=Object.prototype.hasOwnProperty;function uot(e,t){if(e===t)return e;const n=oIe(e)&&oIe(t);if(!n&&!(fte(e)&&fte(t)))return t;const i=(n?e:Object.keys(e)).length,a=n?t:Object.keys(t),o=a.length,s=n?new Array(o):{};let l=0;for(let c=0;c<o;c++){const u=n?c:a[c],f=e[u],h=t[u];if(f===h){s[u]=f,(n?c<i:vWn.call(e,u))&&l++;continue}if(f===null||h===null||typeof f!="object"||typeof h!="object"){s[u]=h;continue}const m=uot(f,h);s[u]=m,m===f&&l++}return i===o&&l===i?e:s}function oIe(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function fte(e){if(!sIe(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!sIe(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function sIe(e){return Object.prototype.toString.call(e)==="[object Object]"}function yWn(e){return new Promise(t=>{ute.setTimeout(t,e)})}function bWn(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?uot(e,t):t}function xWn(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function wWn(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Uce=Symbol();function dot(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Uce?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var kWn=class extends q8{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!G8&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},fot=new kWn;function SWn(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var CWn=hWn;function _Wn(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=CWn;const a=s=>{t?e.push(s):i(()=>{n(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var Bc=_Wn(),NWn=class extends q8{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!G8&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},H$=new NWn;function EWn(e){return Math.min(1e3*2**e,3e4)}function hot(e){return(e??"online")==="online"?H$.isOnline():!0}var hte=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function mot(e){let t=!1,n=0,r;const i=SWn(),a=()=>i.status!=="pending",o=A=>{if(!a()){const v=new hte(A);h(v),e.onCancel?.(v)}},s=()=>{t=!0},l=()=>{t=!1},c=()=>fot.isFocused()&&(e.networkMode==="always"||H$.isOnline())&&e.canRun(),u=()=>hot(e.networkMode)&&e.canRun(),f=A=>{a()||(r?.(),i.resolve(A))},h=A=>{a()||(r?.(),i.reject(A))},m=()=>new Promise(A=>{r=v=>{(a()||c())&&A(v)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),p=()=>{if(a())return;let A;const v=n===0?e.initialPromise:void 0;try{A=v??e.fn()}catch(y){A=Promise.reject(y)}Promise.resolve(A).then(f).catch(y=>{if(a())return;const x=e.retry??(G8?0:3),k=e.retryDelay??EWn,S=typeof k=="function"?k(n,y):k,C=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,y);if(t||!C){h(y);return}n++,e.onFail?.(n,y),yWn(S).then(()=>c()?void 0:m()).then(()=>{t?h(y):p()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:l,canStart:u,start:()=>(u()?p():m().then(p),i)}}var pot=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),pWn(this.gcTime)&&(this.#e=ute.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(G8?1/0:300*1e3))}clearGcTimeout(){this.#e&&(ute.clearTimeout(this.#e),this.#e=void 0)}},FWn=class extends pot{#e;#t;#n;#r;#a;#i;#o;constructor(e){super(),this.#o=!1,this.#i=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=lIe(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#i,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=lIe(this.options);t.data!==void 0&&(this.setData(t.data,{updatedAt:t.dataUpdatedAt,manual:!0}),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=bWn(this.state.data,e,this.options);return this.#s({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(_h).catch(_h):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>gWn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Uce||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>dte(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!AWn(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#o?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){const s=this.observers.find(l=>l.options.queryFn);s&&this.setOptions(s.options)}const n=new AbortController,r=s=>{Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{const s=dot(this.options,t),c=(()=>{const u={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(u),u})();return this.#o=!1,this.options.persister?this.options.persister(s,c,this):s(c)},o=(()=>{const s={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(s),s})();this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#s({type:"fetch",meta:o.fetchOptions?.meta}),this.#a=mot({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:s=>{s instanceof hte&&s.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(s,l)=>{this.#s({type:"failed",failureCount:s,error:l})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{const s=await this.#a.start();if(s===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(s),this.#n.config.onSuccess?.(s,this),this.#n.config.onSettled?.(s,this.state.error,this),s}catch(s){if(s instanceof hte){if(s.silent)return this.#a.promise;if(s.revert){if(this.state.data===void 0)throw s;return this.state.data}}throw this.#s({type:"error",error:s}),this.#n.config.onError?.(s,this),this.#n.config.onSettled?.(this.state.data,s,this),s}finally{this.scheduleGc()}}#s(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...DWn(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const i=e.error;return{...n,error:i,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Bc.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function DWn(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:hot(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function lIe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}function cIe(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let u=!1;const f=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(t.signal.aborted?u=!0:t.signal.addEventListener("abort",()=>{u=!0}),t.signal)})},h=dot(t.options,t.fetchOptions),m=async(p,A,v)=>{if(u)return Promise.reject();if(A==null&&p.pages.length)return Promise.resolve(p);const x=(()=>{const N={client:t.client,queryKey:t.queryKey,pageParam:A,direction:v?"backward":"forward",meta:t.options.meta};return f(N),N})(),k=await h(x),{maxPages:S}=t.options,C=v?wWn:xWn;return{pages:C(p.pages,k,S),pageParams:C(p.pageParams,A,S)}};if(i&&a.length){const p=i==="backward",A=p?TWn:uIe,v={pages:a,pageParams:o},y=A(r,v);s=await m(v,y,p)}else{const p=e??a.length;do{const A=l===0?o[0]??r.initialPageParam:uIe(r,s);if(l>0&&A==null)break;s=await m(s,A),l++}while(l<p)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=c}}}function uIe(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function TWn(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var OWn=class extends pot{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||BWn(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#a({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=mot({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(a,o)=>{this.#a({type:"failed",failureCount:a,error:o})},onPause:()=>{this.#a({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",i=!this.#r.canStart();try{if(r)t();else{this.#a({type:"pending",variables:e,isPaused:i}),await this.#n.config.onMutate?.(e,this,n);const o=await this.options.onMutate?.(e,n);o!==this.state.context&&this.#a({type:"pending",context:o,variables:e,isPaused:i})}const a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#a({type:"success",data:a}),a}catch(a){try{throw await this.#n.config.onError?.(a,e,this.state.context,this,n),await this.options.onError?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,a,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,a,e,this.state.context,n),a}finally{this.#a({type:"error",error:a})}}finally{this.#n.runNext(this)}}#a(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Bc.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function BWn(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var IWn=class extends q8{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new OWn({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=jI(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=jI(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=jI(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(i=>i.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=jI(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Bc.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>aIe(t,n))}findAll(e={}){return this.getAll().filter(t=>aIe(e,t))}notify(e){Bc.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Bc.batch(()=>Promise.all(e.map(t=>t.continue().catch(_h))))}};function jI(e){return e.options.scope?.id}var jWn=class extends q8{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??Lce(r,t);let a=this.get(i);return a||(a=new FWn({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Bc.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>iIe(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>iIe(e,n)):t}notify(e){Bc.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Bc.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Bc.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},PWn=class{#e;#t;#n;#r;#a;#i;#o;#s;constructor(e={}){this.#e=e.queryCache||new jWn,this.#t=e.mutationCache||new IWn,this.#n=e.defaultOptions||{},this.#r=new Map,this.#a=new Map,this.#i=0}mount(){this.#i++,this.#i===1&&(this.#o=fot.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=H$.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#i--,this.#i===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(dte(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=this.#e.get(r.queryHash)?.state.data,o=mWn(t,a);if(o!==void 0)return this.#e.build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Bc.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Bc.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Bc.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Bc.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(_h).catch(_h)}invalidateQueries(e,t={}){return Bc.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Bc.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(_h)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(_h)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(dte(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(_h).catch(_h)}fetchInfiniteQuery(e){return e.behavior=cIe(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(_h).catch(_h)}ensureInfiniteQueryData(e){return e.behavior=cIe(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return H$.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(GF(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{WF(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#a.set(GF(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#a.values()],n={};return t.forEach(r=>{WF(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Lce(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Uce&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},MWn=w.createContext(void 0),RWn=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(MWn.Provider,{value:e,children:t})),$Wn=(e,t,n,r,i,a,o,s)=>{let l=document.documentElement,c=["light","dark"];function u(m){(Array.isArray(e)?e:[e]).forEach(p=>{let A=p==="class",v=A&&a?i.map(y=>a[y]||y):i;A?(l.classList.remove(...v),l.classList.add(a&&a[m]?a[m]:m)):l.setAttribute(p,m)}),f(m)}function f(m){s&&c.includes(m)&&(l.style.colorScheme=m)}function h(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(r)u(r);else try{let m=localStorage.getItem(t)||n,p=o&&m==="system"?h():m;u(p)}catch{}},LWn=w.createContext(void 0),UWn={setTheme:e=>{},themes:[]},zWn=()=>{var e;return(e=w.useContext(LWn))!=null?e:UWn};w.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:a,value:o,themes:s,nonce:l,scriptProps:c})=>{let u=JSON.stringify([n,t,a,e,s,o,r,i]).slice(1,-1);return w.createElement("script",{...c,suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(${$Wn.toString()})(${u})`}})});const HWn=({...e})=>{const{theme:t="system"}=zWn();return d.jsx(BOt,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-white group-[.toaster]:text-gray-950 group-[.toaster]:border-gray-200 group-[.toaster]:shadow-lg dark:group-[.toaster]:bg-gray-950 dark:group-[.toaster]:text-gray-50 dark:group-[.toaster]:border-gray-800",description:"group-[.toast]:text-gray-500 dark:group-[.toast]:text-gray-400",actionButton:"group-[.toast]:bg-gray-900 group-[.toast]:text-gray-50 font-medium dark:group-[.toast]:bg-gray-50 dark:group-[.toast]:text-gray-900",cancelButton:"group-[.toast]:bg-gray-100 group-[.toast]:text-gray-500 font-medium dark:group-[.toast]:bg-gray-800 dark:group-[.toast]:text-gray-400"}},...e})};var aY=(e,t)=>Yj(e.kind,e,{...e.context,authAttempt:t});function VWn(e){return({client:t,forward:n})=>{var r=new Set,i=mY(),a=mY(),o=new Map;function s(){c=void 0;var f=o;o=new Map,f.forEach(i.next)}function l(f){c=void 0;var h=o;o=new Map,h.forEach((m=>{a.next(XIe(m,f))}))}var c,u=null;return f=>{function h(){c=Promise.resolve().then((()=>e({mutate(y,x,k){var S=t.createRequestOperation("mutation",bk(y,x),k);return _te(K$(1)(xu((C=>C.operation.key===S.key&&S.context._instance===C.operation.context._instance))(hY((()=>{var C=p(S);r.add(C.context._instance),i.next(C)}))(v))))},appendHeaders(y,x){var k=typeof y.context.fetchOptions=="function"?y.context.fetchOptions():y.context.fetchOptions||{};return Yj(y.kind,y,{...y.context,fetchOptions:{...k,headers:{...k.headers,...x}}})}}))).then((y=>{y&&(u=y),s()})).catch((y=>{l(y)}))}h();function m(y){o.set(y.key,aY(y,!0)),u&&!c&&(c=u.refreshAuth().then(s).catch(l))}function p(y){return u?u.addAuthToOperation(y):y}var A=xu(Boolean)(QIe((y=>y.kind==="teardown"?(o.delete(y.key),y):y.context._instance&&r.has(y.context._instance)?y:y.context.authAttempt?p(y):c||!u?(c||h(),o.has(y.key)||o.set(y.key,aY(y,!1)),null):(function(k){return!k.context.authAttempt&&u&&u.willAuthError&&u.willAuthError(k)})(y)?(m(y),null):p(aY(y,!1))))(rE([i.source,f]))),v=n(A);return rE([a.source,xu((y=>!r.has(y.operation.context._instance)&&y.error&&(function(k){return u&&u.didAuthError&&u.didAuthError(k.error,k.operation)})(y)&&!y.operation.context.authAttempt?(m(y.operation),!1):(r.has(y.operation.context._instance)&&r.delete(y.operation.context._instance),!0)))(v)])}}}function QWn({children:e}){const{authService:t}=w.useContext(FD),n=ZS(),r=t.isLoggedIn(),i=w.useMemo(()=>t.authToken(),[t]),a=w.useMemo(()=>{if(!r)return null;let o;return o="https://accounter.onrender.com/graphql",Nut({url:o,exchanges:[Sut({onResult(s){if(s.error?.networkError){console.error("Network Error:",s.error.networkError),n("/network-error");return}(s?.error?.graphQLErrors.some(c=>c.extensions?.code==="FORBIDDEN")||s?.error?.response?.status===401)&&n("/login",{state:{message:"You are not authorized to access this page"}})}}),VWn(async s=>({addAuthToOperation(l){return i?s.appendHeaders(l,{Authorization:i}):l},didAuthError(l,c){return l?.response?.status===401||l?.graphQLErrors?.some(u=>u.extensions?.code==="FORBIDDEN")},async refreshAuth(){t.logout()}})),wut]})},[r,n,i,t]);return w.useEffect(()=>{a||n("/login")},[a,n]),a?d.jsx(Fut,{value:a,children:e}):d.jsx(act,{to:"/login",state:{prevPath:window.location.pathname}})}const qWn=new PWn;function GWn({children:e}){const t=Xoe({palette:{primary:{main:"#556cd6"},secondary:{main:"#19857b"},error:{main:cb.A400}}});return d.jsx(Tje,{withGlobalStyles:!0,theme:{fontFamily:"Roboto, sans-serif",fontSizes:{md:"14"}},children:d.jsxs(j0n,{theme:t,children:[d.jsx(P4n,{}),d.jsx(HWn,{}),d.jsx(iUt,{children:d.jsx(QWn,{children:d.jsx(RWn,{client:qWn,children:d.jsx(aUt,{children:e})})})})]})})}const WWn=document.getElementById("root"),KWn=Ost.createRoot(WWn),YWn=Dct(sct(d.jsx(Lr,{path:"*",element:d.jsx(GWn,{children:d.jsx(uWn,{})}),errorElement:d.jsx("p",{children:"error"})})));KWn.render(d.jsx(w.StrictMode,{children:d.jsx(zct,{router:YWn})}));export{ea as _,bu as c,Fi as g,Yn as p};
|